From 89cac8b2a85b2bed87a529b78aa2783f64cfa5f5 Mon Sep 17 00:00:00 2001 From: pmeridian Date: Thu, 30 May 2013 08:18:55 -0700 Subject: [PATCH 001/475] Initial commit --- .gitignore | 11 +++++++++++ README.md | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 .gitignore create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..fa65f0bdb90 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Build and Release Folders +bin/ +bin-debug/ +bin-release/ + +# Other files and folders +.settings/ + +# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` +# should NOT be excluded as they contain compiler settings and other important +# information for Eclipse / Flash Builder. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000000..0980676a1cc --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +ECALELF +======= + +Code for electron calibration in CMS From cebfb128aaf5e3a4a473c72bd727628ebc5219eb Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 30 Jun 2013 22:02:38 +0200 Subject: [PATCH 002/475] added loose,medium and tight selection value maps --- ...SimpleCutBasedElectronIDSelectionFunctor.h | 338 +++++++++++------- .../src/EleSelectionProducers.cc | 247 ++++++++----- 2 files changed, 357 insertions(+), 228 deletions(-) diff --git a/calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index d9470d2c586..f3325d07073 100644 --- a/calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -12,8 +12,6 @@ #include - - // system include files #include #include @@ -44,23 +42,16 @@ #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" -#define RECHIT -#ifdef RECHIT #include "DataFormats/EcalRecHit/interface/EcalRecHit.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -#endif // //#include "Calibration/EcalCalibAlgos/interface/ElectronCalibAnalyzer.h" -#define NEWRELEASE #define REGRESSION //#define REGRESSIONv3 //#define REGRESSIONv2 //#define REGRESSIONv1 -#define ClusterTools -#ifdef ClusterTools #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h" #include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h" -#endif #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" @@ -76,15 +67,13 @@ // #include "DataFormats/TrackReco/interface/TrackFwd.h" // #include "DataFormats/TrackReco/interface/Track.h" -#define CONVERSIONS -#ifdef CONVERSIONS //#include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h" #include "RecoEgamma/EgammaTools/interface/ConversionFinder.h" #include "RecoEgamma/EgammaTools/interface/ConversionInfo.h" #include "RecoEgamma/EgammaTools/interface/ConversionTools.h" -#endif +#include "EgammaAnalysis/ElectronTools/interface/EGammaCutBasedEleId.h" //#include "DataFormats/BeamSpot/interface/BeamSpot.h" /* ___________________________________________________________________________________ @@ -141,7 +130,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector("maxNumberOfExpectedMissingHits")); retInternal_ = getBitTemplate(); } -#endif + // initialize it by using only the version name - SimpleCutBasedElectronIDSelectionFunctor(Version_t version, const edm::Handle& ConversionsHandle, const edm::Handle& BeamSpotHandle, const edm::Handle& rhoHandle): + SimpleCutBasedElectronIDSelectionFunctor(Version_t version, + const edm::Handle& ConversionsHandle, + const edm::Handle& BeamSpotHandle, + const edm::Handle& rhoHandle, + //edm::Handle< edm::ValueMap >, + edm::Handle< edm::ValueMap > &isoVals + ): ConversionsHandle_(ConversionsHandle), BeamSpotHandle_(BeamSpotHandle), - rhoHandle_(rhoHandle) + rhoHandle_(rhoHandle),EgammaCutBasedEleId::IsoDepositMaps { if (version == NONE) { std::cout << "SimpleCutBasedElectronIDSelectionFunctor: If you want to use version NONE " @@ -187,10 +182,22 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector& ConversionsHandle, const edm::Handle& BeamSpotHandle, const edm::Handle& rhoHandle): + SimpleCutBasedElectronIDSelectionFunctor(TString versionStr, + const edm::Handle& ConversionsHandle, + const edm::Handle& BeamSpotHandle, + const edm::Handle& VertexHandle, + edm::Handle< edm::ValueMap >& chIsoValsHandle, + edm::Handle< edm::ValueMap >& emIsoValsHandle, + edm::Handle< edm::ValueMap >& nhIsoValsHandle, + const edm::Handle& rhoHandle): ConversionsHandle_(ConversionsHandle), BeamSpotHandle_(BeamSpotHandle), + VertexHandle_(VertexHandle), + chIsoValsHandle_(chIsoHandle), + emIsoValsHandle_(emIsoHandle), + nhIsoValsHandle_(nhIsoHandle), rhoHandle_(rhoHandle) { Version_t version=NONE; @@ -256,7 +263,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector::operator(); // function with the Spring10 variable definitions - bool WPxx_PU( const reco::GsfElectron & electron, pat::strbitset& ret) + bool WPxx_PU( const reco::GsfElectronRef electronRef, pat::strbitset& ret) { - + reco:GsfElectron& electron = *electronRef; + // ret.set(false); // effective areas float AeffTk_EB = 0; @@ -422,15 +419,50 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selectoreta(); + // effective area for isolation + float AEff = ElectronEffectiveArea::GetElectronEffectiveArea(ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03, + etaSC, ElectronEffectiveArea::kEleEAData2011); + + + float ooemoop = (1.0/ele.ecalEnergy() - ele.eSuperClusterOverP()/ele.ecalEnergy()); // Double_t etSCEle = electron.superCluster()->energy() *sin(electron.superCluster()->position().theta()); Double_t trackIso = electron.dr03TkSumPt()/eleET; - Double_t ecalIso = electron.dr03EcalRecHitSumEt()/eleET; - Double_t hcalIso = electron.dr03HcalTowerSumEt()/eleET; - Double_t sihih = electron.sigmaIetaIeta(); - Double_t Dphi = electron.deltaPhiSuperClusterTrackAtVtx(); - Double_t Deta = electron.deltaEtaSuperClusterTrackAtVtx(); - Double_t HoE = electron.hadronicOverEm(); - Double_t pfMVA = electron.mva(); + Double_t ecalIso = electron.dr03EcalRecHitSumEt()/eleET; + Double_t hcalIso = electron.dr03HcalTowerSumEt()/eleET; + Double_t sihih = electron.sigmaIetaIeta(); + Double_t Dphi = electron.deltaPhiSuperClusterTrackAtVtx(); + Double_t Deta = electron.deltaEtaSuperClusterTrackAtVtx(); + Double_t HoE = electron.hadronicOverEm(); + Double_t pfMVA = electron.mva(); + // get the variables + bool isEB = ele.isEB() ? true : false; + Double_t pt = ele.pt(); + + // impact parameter variables + float d0vtx = 0.0; + float dzvtx = 0.0; + if (VertexHandle_->size() > 0) { + reco::VertexRef vtx(VertexHandle_, 0); + d0vtx = ele.gsfTrack()->dxy(vtx->position()); + dzvtx = ele.gsfTrack()->dz(vtx->position()); + } else { + d0vtx = ele.gsfTrack()->dxy(); + dzvtx = ele.gsfTrack()->dz(); + } + + // get particle flow isolation + double iso_ch = chIsoValsHandle_[ele]; + double iso_em = emIsoValsHandle_[ele]; + double iso_nh = nhIsoValsHandle_[ele]; + + // apply to neutrals + double rhoPrime = std::max(*rhoHandle_, 0.0); + double iso_n = std::max(iso_nh + iso_em - rhoPrime * AEff, 0.0); + + // compute final isolation + double iso = (iso_n + iso_ch) / pt; + #ifdef shervin Double_t cIso = 0; if (electron.isEB()) { cIso = @@ -442,7 +474,6 @@ class SimpleCutBasedElectronIDSelectionFunctor : public SelectortrackerExpectedHitsInner().numberOfHits(); // in 39 conversion rejection variables are accessible from Gsf electron #ifdef shervin Double_t dist = electron.convDist(); // default value is -9999 if conversion partner not found @@ -450,72 +481,106 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selectorsize() << "\t" << BeamSpotHandle_.isValid() << "\t" << *rhoHandle_ << std::endl; -#endif + Int_t innerHits = electron.gsfTrack()->trackerExpectedHitsInner().numberOfHits(); bool hasMatchedConversion = ConversionTools::hasMatchedConversion(electron, ConversionsHandle_, BeamSpotHandle_->position()); + Double_t absEtaSC = fabs(electron.superCluster()->eta()); Double_t rhoRel = *rhoHandle_ / eleET; + // conversion rejection variables + + + //------------------------------ Fiducial region cut if ( (absEtaSC < 1.4442 || (absEtaSC > 1.566 && absEtaSC < 2.5) ) || ignoreCut("fiducial")) passCut(retInternal_, "fiducial"); //------------------------------ conversion rejection cut - if ( innerHits < cut("maxNumberOfExpectedMissingHits", int()) || ignoreCut("maxNumberOfExpectedMissingHits")) + if ( innerHits <= cut("maxNumberOfExpectedMissingHits", int()) || ignoreCut("maxNumberOfExpectedMissingHits")) passCut(retInternal_, "maxNumberOfExpectedMissingHits"); if ( (!hasMatchedConversion) || ignoreCut("hasMatchedConversion")) passCut(retInternal_, "hasMatchedConversion"); - // now apply the cuts - if (electron.isEB()) { // BARREL case - // check the EB cuts - - if ( HoE < cut("hoe_EB", double()) || ignoreCut("hoe_EB") ) passCut(retInternal_, "hoe_EB"); - if ( fabs(Deta) < cut("deta_EB", double()) || ignoreCut("deta_EB") ) passCut(retInternal_, "deta_EB"); - if ( fabs(Dphi) < cut("dphi_EB", double()) || ignoreCut("dphi_EB") ) passCut(retInternal_, "dphi_EB"); - if ( sihih < cut("sihih_EB", double()) || ignoreCut("sihih_EB") ) passCut(retInternal_, "sihih_EB"); - if ( pfMVA > cut("pfmva_EB", double()) || ignoreCut("pfmva_EB") ) passCut(retInternal_, "pfmva_EB"); - - if ( trackIso - AeffTk_EB *rhoRel < cut("relTrackIso_EB", double()) || ignoreCut("relTrackIso_EB")) - passCut(retInternal_, "relTrackIso_EB"); - if ( ecalIso - AeffECAL_EB *rhoRel < cut("relEcalIso_EB", double()) || ignoreCut("relEcalIso_EB") ) - passCut(retInternal_, "relEcalIso_EB"); - if ( hcalIso - AeffHCAL_EB *rhoRel < cut("relHcalIso_EB", double()) || ignoreCut("relHcalIso_EB") ) - passCut(retInternal_, "relHcalIso_EB"); - - // pass all the EE cuts - passCut(retInternal_, "hoe_EE"); - passCut(retInternal_, "deta_EE"); - passCut(retInternal_, "dphi_EE"); - passCut(retInternal_, "sihih_EE"); - passCut(retInternal_, "pfmva_EE"); - passCut(retInternal_, "relTrackIso_EE"); - passCut(retInternal_, "relEcalIso_EE"); - passCut(retInternal_, "relHcalIso_EE"); - + if ( fabs(Deta) < cut("deta_EB", double()) || ignoreCut("deta_EB") ) passCut(retInternal_, "deta_EB"); + if ( fabs(Dphi) < cut("dphi_EB", double()) || ignoreCut("dphi_EB") ) passCut(retInternal_, "dphi_EB"); + if ( sihih < cut("sihih_EB", double()) || ignoreCut("sihih_EB") ) passCut(retInternal_, "sihih_EB"); + if ( HoE < cut("hoe_EB", double()) || ignoreCut("hoe_EB") ) passCut(retInternal_, "hoe_EB"); + if ( ooemoop < cut("ooemoop", double()) || ignoreCut("ooemoop_EB") ) passCut(retInternal_, "ooemoop_EB"); + if ( fabs(d0vtx) < cut("d0vtx", double()) || ignoreCut("d0vtx_EB") ) passCut(retInternal_, "d0vtx_EB"); + if ( fabs(dzvtx) < cut("dzvtx", double()) || ignoreCut("dzvtx_EB") ) passCut(retInternal_, "dzvtx_EB"); + + if ( pfMVA > cut("pfmva_EB", double()) || ignoreCut("pfmva_EB") ) passCut(retInternal_, "pfmva_EB"); + + if ( trackIso - AeffTk_EB *rhoRel < cut("relTrackIso_EB", double()) || ignoreCut("relTrackIso_EB")) + passCut(retInternal_, "relTrackIso_EB"); + if ( ecalIso - AeffECAL_EB *rhoRel < cut("relEcalIso_EB", double()) || ignoreCut("relEcalIso_EB") ) + passCut(retInternal_, "relEcalIso_EB"); + if ( hcalIso - AeffHCAL_EB *rhoRel < cut("relHcalIso_EB", double()) || ignoreCut("relHcalIso_EB") ) + passCut(retInternal_, "relHcalIso_EB"); + if(pt>=20){ + if(iso < cut("pfIso_EB", double()) || ignoreCut("pfIso_EB") ) + passCut(retInternal_, "pfIso_EB"); + passCut(retInternal_, "pfIsoLowPt_EB"); + }else{ + if(iso < cut("pfIsoLowPt_EB", double()) || ignoreCut("pfIsoLowPt_EB") ) + passCut(retInternal_, "pfIsoLowPt_EB"); + passCut(retInternal_, "pfIso_EB"); + } + + // pass all the EE cuts + passCut(retInternal_, "deta_EE"); + passCut(retInternal_, "dphi_EE"); + passCut(retInternal_, "sihih_EE"); + passCut(retInternal_, "hoe_EE"); + passCut(retInternal_, "ooemoop_EE"); + passCut(retInternal_, "d0vtx_EE"); + passCut(retInternal_, "dzvtx_EE"); + passCut(retInternal_, "pfmva_EE"); + passCut(retInternal_, "relTrackIso_EE"); + passCut(retInternal_, "relEcalIso_EE"); + passCut(retInternal_, "relHcalIso_EE"); + passCut(retInternal_, "pfIso_EE"); + passCut(retInternal_, "pfIsoLowPt_EE"); } else { // ENDCAPS case - if ( HoE < cut("hoe_EE", double()) || ignoreCut("hoe_EE") ) passCut(retInternal_, "hoe_EE"); - if ( fabs(Deta) < cut("deta_EE", double()) || ignoreCut("deta_EE") ) passCut(retInternal_, "deta_EE"); - if ( fabs(Dphi) < cut("dphi_EE", double()) || ignoreCut("dphi_EE") ) passCut(retInternal_, "dphi_EE"); - if ( sihih < cut("sihih_EE", double()) || ignoreCut("sihih_EE") ) passCut(retInternal_, "sihih_EE"); - if ( pfMVA > cut("pfmva_EE", double()) || ignoreCut("pfmva_EE") ) passCut(retInternal_, "pfmva_EE"); - - if ( trackIso - AeffTk_EE *rhoRel < cut("relTrackIso_EE", double()) || ignoreCut("relTrackIso_EE")) - passCut(retInternal_, "relTrackIso_EE"); - if ( ecalIso - AeffECAL_EE *rhoRel < cut("relEcalIso_EE", double()) || ignoreCut("relEcalIso_EE") ) - passCut(retInternal_, "relEcalIso_EE"); - if ( hcalIso - AeffHCAL_EE *rhoRel < cut("relHcalIso_EE", double()) || ignoreCut("relHcalIso_EE") ) - passCut(retInternal_, "relHcalIso_EE"); - - // pass all the EB cuts - passCut(retInternal_, "hoe_EB"); - passCut(retInternal_, "deta_EB"); - passCut(retInternal_, "dphi_EB"); - passCut(retInternal_, "sihih_EB"); - passCut(retInternal_, "pfmva_EB"); - passCut(retInternal_, "relTrackIso_EB"); - passCut(retInternal_, "relEcalIso_EB"); - passCut(retInternal_, "relHcalIso_EB"); + if ( fabs(Deta) < cut("deta_EE", double()) || ignoreCut("deta_EE") ) passCut(retInternal_, "deta_EE"); + if ( fabs(Dphi) < cut("dphi_EE", double()) || ignoreCut("dphi_EE") ) passCut(retInternal_, "dphi_EE"); + if ( sihih < cut("sihih_EE", double()) || ignoreCut("sihih_EE") ) passCut(retInternal_, "sihih_EE"); + if ( HoE < cut("hoe_EE", double()) || ignoreCut("hoe_EE") ) passCut(retInternal_, "hoe_EE"); + if ( ooemoop < cut("ooemoop", double()) || ignoreCut("ooemoop_EE") ) passCut(retInternal_, "ooemoop_EE"); + if ( fabs(d0vtx) < cut("d0vtx", double()) || ignoreCut("d0vtx_EE") ) passCut(retInternal_, "d0vtx_EE"); + if ( fabs(dzvtx) < cut("dzvtx", double()) || ignoreCut("dzvtx_EE") ) passCut(retInternal_, "dzvtx_EE"); + + if ( pfMVA > cut("pfmva_EE", double()) || ignoreCut("pfmva_EE") ) passCut(retInternal_, "pfmva_EE"); + + if ( trackIso - AeffTk_EE *rhoRel < cut("relTrackIso_EE", double()) || ignoreCut("relTrackIso_EE")) + passCut(retInternal_, "relTrackIso_EE"); + if ( ecalIso - AeffECAL_EE *rhoRel < cut("relEcalIso_EE", double()) || ignoreCut("relEcalIso_EE") ) + passCut(retInternal_, "relEcalIso_EE"); + if ( hcalIso - AeffHCAL_EE *rhoRel < cut("relHcalIso_EE", double()) || ignoreCut("relHcalIso_EE") ) + passCut(retInternal_, "relHcalIso_EE"); + if(pt>=20){ + if(iso < cut("pfIso_EE", double()) || ignoreCut("pfIso_EE") ) + passCut(retInternal_, "pfIso_EE"); + passCut(retInternal_, "pfIsoLowPt_EE"); + }else{ + if(iso < cut("pfIsoLowPt_EE", double()) || ignoreCut("pfIsoLowPt_EE") ) + passCut(retInternal_, "pfIsoLowPt_EE"); + passCut(retInternal_, "pfIso_EE"); + } + + // pass all the EB cuts + passCut(retInternal_, "deta_EB"); + passCut(retInternal_, "dphi_EB"); + passCut(retInternal_, "sihih_EB"); + passCut(retInternal_, "hoe_EB"); + passCut(retInternal_, "ooemoop_EB"); + passCut(retInternal_, "d0vtx_EB"); + passCut(retInternal_, "dzvtx_EB"); + passCut(retInternal_, "pfmva_EB"); + passCut(retInternal_, "relTrackIso_EB"); + passCut(retInternal_, "relEcalIso_EB"); + passCut(retInternal_, "relHcalIso_EB"); + passCut(retInternal_, "pfIso_EB"); + passCut(retInternal_, "pfIsoLowPt_EB"); } setIgnored(retInternal_); @@ -548,6 +613,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector& ConversionsHandle_; const edm::Handle& BeamSpotHandle_; const edm::Handle& rhoHandle_; + }; diff --git a/calibration/EleSelectionProducers/src/EleSelectionProducers.cc b/calibration/EleSelectionProducers/src/EleSelectionProducers.cc index 97569e29ee5..5fa5500ad01 100644 --- a/calibration/EleSelectionProducers/src/EleSelectionProducers.cc +++ b/calibration/EleSelectionProducers/src/EleSelectionProducers.cc @@ -5,10 +5,10 @@ // /**\class EleSelectionProducers EleSelectionProducers.cc calibration/EleSelectionProducers/src/EleSelectionProducers.cc - Description: [one line class summary] +Description: [one line class summary] - Implementation: - [Notes on implementation] +Implementation: +[Notes on implementation] */ // // Original Author: Shervin Nourbakhsh,40 1-B24,+41227671643, @@ -35,6 +35,8 @@ #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" #include "calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h" +#include "DataFormats/RecoCandidate/interface/IsoDeposit.h" + // // class declaration // @@ -44,84 +46,101 @@ class EleSelectionProducers : public edm::EDProducer { // typedef pat::strbitset SelectionValue_t; typedef float SelectionValue_t; typedef edm::ValueMap SelectionMap; + typedef std::vector< edm::Handle< edm::ValueMap > > IsoDepositValsHandles_t; - public: - explicit EleSelectionProducers(const edm::ParameterSet&); - ~EleSelectionProducers(); +public: + explicit EleSelectionProducers(const edm::ParameterSet&); + ~EleSelectionProducers(); - static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); - private: - virtual void beginJob() ; - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; +private: + virtual void beginJob() ; + virtual void produce(edm::Event&, const edm::EventSetup&); + virtual void endJob() ; - virtual void beginRun(edm::Run&, edm::EventSetup const&); - virtual void endRun(edm::Run&, edm::EventSetup const&); - virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); - virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + virtual void beginRun(edm::Run&, edm::EventSetup const&); + virtual void endRun(edm::Run&, edm::EventSetup const&); + virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); - // ----------member data --------------------------- + // ----------member data --------------------------- private: edm::Handle > electronsHandle; edm::Handle conversionsHandle; edm::Handle bsHandle; + edm::Handle vertexHandle; + edm::Handle< edm::ValueMap > chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle; edm::Handle rhoHandle; + /// input tag for electrons edm::InputTag electronsTAG; // conversions edm::InputTag conversionsProducerTAG; edm::InputTag BeamSpotTAG; + edm::InputTag VertexTAG; + // isolation + edm::InputTag chIsoValsTAG, emIsoValsTAG, nhIsoValsTAG; /// input rho edm::InputTag rhoTAG; + SimpleCutBasedElectronIDSelectionFunctor fiducial_selector; SimpleCutBasedElectronIDSelectionFunctor WP70_PU_selector; SimpleCutBasedElectronIDSelectionFunctor WP80_PU_selector; SimpleCutBasedElectronIDSelectionFunctor WP90_PU_selector; + SimpleCutBasedElectronIDSelectionFunctor loose_selector; + SimpleCutBasedElectronIDSelectionFunctor medium_selector; + SimpleCutBasedElectronIDSelectionFunctor tight_selector; }; -// -// constants, enums and typedefs -// - -// -// static data member definitions -// - -// -// constructors and destructor -// EleSelectionProducers::EleSelectionProducers(const edm::ParameterSet& iConfig): electronsTAG(iConfig.getParameter("electronCollection")), conversionsProducerTAG(iConfig.getParameter("conversionCollection")), BeamSpotTAG(iConfig.getParameter("BeamSpotCollection")), + VertexTAG(iConfig.getParameter("vertexCollection")), + chIsoValsTAG(iConfig.getParameter("chIsoVals")), + emIsoValsTAG(iConfig.getParameter("emIsoVals")), + nhIsoValsTAG(iConfig.getParameter("nhIsoVals")), rhoTAG(iConfig.getParameter("rhoFastJet")), - fiducial_selector("fiducial", conversionsHandle, bsHandle, rhoHandle), - WP70_PU_selector("WP70PU", conversionsHandle, bsHandle, rhoHandle), - WP80_PU_selector("WP80PU", conversionsHandle, bsHandle, rhoHandle), - WP90_PU_selector("WP90PU", conversionsHandle, bsHandle, rhoHandle) + fiducial_selector("fiducial", conversionsHandle, bsHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + WP70_PU_selector("WP70PU", conversionsHandle, bsHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + WP80_PU_selector("WP80PU", conversionsHandle, bsHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + WP90_PU_selector("WP90PU", conversionsHandle, bsHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + loose_selector("loose", conversionsHandle, bsHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + medium_selector("medium", conversionsHandle, bsHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + tight_selector("tight", conversionsHandle, bsHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), { - //register your products -/* Examples - produces(); + //register your products + /* Examples + produces(); - //if do put with a label - produces("label"); + //if do put with a label + produces("label"); - //if you want to put into the Run - produces(); -*/ + //if you want to put into the Run + produces(); + */ produces< SelectionMap >("fiducial"); produces< SelectionMap >("WP70PU"); produces< SelectionMap >("WP80PU"); produces< SelectionMap >("WP90PU"); + produces< SelectionMap >("loose"); + produces< SelectionMap >("medium"); + produces< SelectionMap >("tight"); - //now do what ever other initialization is needed + //now do what ever other initialization is needed } @@ -129,8 +148,8 @@ EleSelectionProducers::EleSelectionProducers(const edm::ParameterSet& iConfig): EleSelectionProducers::~EleSelectionProducers() { - // do anything here that needs to be done at desctruction time - // (e.g. close files, deallocate resources etc.) + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) } @@ -140,67 +159,97 @@ EleSelectionProducers::~EleSelectionProducers() // // ------------ method called to produce the data ------------ -void -EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) +void EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { - using namespace edm; - - std::vector fiducial_vec; - std::vector WP70_PU_vec; - std::vector WP80_PU_vec; - std::vector WP90_PU_vec; - std::auto_ptr fiducialMap(new SelectionMap()); - std::auto_ptr WP70_PUMap(new SelectionMap()); - std::auto_ptr WP80_PUMap(new SelectionMap()); - std::auto_ptr WP90_PUMap(new SelectionMap()); - - - //------------------------------ ELECTRON - iEvent.getByLabel(electronsTAG, electronsHandle); - //if(!electronsHandle.isValid()){ - // std::cerr << "[ERROR] electron collection not found" << std::endl; - // return; - //} + using namespace edm; + + std::vector fiducial_vec; + std::vector WP70_PU_vec; + std::vector WP80_PU_vec; + std::vector WP90_PU_vec; + std::auto_ptr fiducialMap(new SelectionMap()); + std::auto_ptr WP70_PUMap(new SelectionMap()); + std::auto_ptr WP80_PUMap(new SelectionMap()); + std::auto_ptr WP90_PUMap(new SelectionMap()); + std::vector loose_vec; + std::vector medium_vec; + std::vector tight_vec; + std::auto_ptr looseMap(new SelectionMap()); + std::auto_ptr mediumMap(new SelectionMap()); + std::auto_ptr tightMap(new SelectionMap()); + + + //------------------------------ ELECTRON + iEvent.getByLabel(electronsTAG, electronsHandle); + //if(!electronsHandle.isValid()){ + // std::cerr << "[ERROR] electron collection not found" << std::endl; + // return; + //} - //------------------------------ CONVERSIONS - iEvent.getByLabel(conversionsProducerTAG, conversionsHandle); - // std::cout << conversionsHandle.isValid() << std::endl; - iEvent.getByLabel(BeamSpotTAG, bsHandle); - // bs = bsHandle.product(); - - //------------------------------ RHO - iEvent.getByLabel(rhoTAG,rhoHandle); + //------------------------------ CONVERSIONS + iEvent.getByLabel(conversionsProducerTAG, conversionsHandle); + // std::cout << conversionsHandle.isValid() << std::endl; + iEvent.getByLabel(BeamSpotTAG, bsHandle); + iEvent.getByLabel(VertexTAG, vertexHandle); + //------------------------------ RHO + iEvent.getByLabel(rhoTAG,rhoHandle); + + //------------------------------ ISO DEPOSITS + iEvent.getByLabel(chIsoValsTAG, chIsoValsHandle); + iEvent.getByLabel(emIsoValsTAG, emIsoValsHandle); + iEvent.getByLabel(nhIsoValsTAG, nhIsoValsHandle); + #ifdef DEBUG - std::cout << "[DEBUG] Starting loop over electrons" << std::endl; + std::cout << "[DEBUG] Starting loop over electrons" << std::endl; #endif - for(reco::GsfElectronCollection::const_iterator ele_itr = (electronsHandle)->begin(); - ele_itr != (electronsHandle)->end(); ele_itr++){ - // the new tree has one event per each electron - pat::strbitset fiducial_ret; - pat::strbitset WP70_PU_ret; - pat::strbitset WP80_PU_ret; - pat::strbitset WP90_PU_ret; + for(reco::GsfElectronCollection::const_iterator ele_itr = (electronsHandle)->begin(); + ele_itr != (electronsHandle)->end(); ele_itr++){ + reco::GsfElectronRef eleRef(electronsHandle, ele_itr-electronsHandle->begin()); + + // the new tree has one event per each electron + pat::strbitset fiducial_ret; + pat::strbitset WP70_PU_ret; + pat::strbitset WP80_PU_ret; + pat::strbitset WP90_PU_ret; + pat::strbitset loose_ret; + pat::strbitset medium_ret; + pat::strbitset tight_ret; + + + fiducial_selector(eleRef, fiducial_ret); + fiducial_vec.push_back(fiducial_selector.result()); + + WP70_PU_selector(eleRef, WP70_PU_ret); + WP80_PU_selector(eleRef, WP80_PU_ret); + WP90_PU_selector(eleRef, WP90_PU_ret); + + WP70_PU_vec.push_back(WP70_PU_selector.result()); // result gives a float + WP80_PU_vec.push_back(WP80_PU_selector.result()); // result gives a float + WP90_PU_vec.push_back(WP90_PU_selector.result()); // result gives a float + WP70_PU_selector(eleRef, WP70_PU_ret); + WP80_PU_selector(eleRef, WP80_PU_ret); + WP90_PU_selector(eleRef, WP90_PU_ret); - fiducial_selector(*ele_itr, fiducial_ret); - fiducial_vec.push_back(fiducial_selector.result()); + loose_selector(eleRef, loose_ret); + loose_vec.push_back(loose_selector.result()); + medium_selector(eleRef, medium_ret); + medium_vec.push_back(medium_selector.result()); + tight_selector(eleRef, tight_ret); + tight_vec.push_back(tight_selector.result()); - WP70_PU_selector(*ele_itr, WP70_PU_ret); - WP80_PU_selector(*ele_itr, WP80_PU_ret); - WP90_PU_selector(*ele_itr, WP90_PU_ret); - - WP70_PU_vec.push_back(WP70_PU_selector.result()); // result gives a float - WP80_PU_vec.push_back(WP80_PU_selector.result()); // result gives a float - WP90_PU_vec.push_back(WP90_PU_selector.result()); // result gives a float - // WP80_PU_vec.push_back((SelectionValue_t)WP80_PU_selector.bitMask()); - // WP90_PU_vec.push_back((SelectionValue_t)WP90_PU_selector.bitMask()); + // WP80_PU_vec.push_back((SelectionValue_t)WP80_PU_selector.bitMask()); + // WP90_PU_vec.push_back((SelectionValue_t)WP90_PU_selector.bitMask()); #ifdef DEBUG - std::cout << "[DEBUG] ret=" << WP80_PU_selector.bitMask() << std::endl; - std::cout << "[DEBUG] ret= (float)" << (SelectionValue_t) WP80_PU_selector.bitMask() << std::endl; + std::cout << "[DEBUG] WP80 ret=" << WP80_PU_selector.bitMask() << std::endl; + std::cout << "[DEBUG] WP80 ret= (float)" << (SelectionValue_t) WP80_PU_selector.bitMask() << std::endl; + std::cout << "[DEBUG] loose ret=" << loose_selector.bitMask() << std::endl; + std::cout << "[DEBUG] loose ret= (float)" << (SelectionValue_t) loose_selector.bitMask() << std::endl; + #endif - } + } //prepare product // declare the filler of the ValueMap @@ -208,16 +257,27 @@ EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& iSetup SelectionMap::Filler WP70_PU_filler(*WP70_PUMap); SelectionMap::Filler WP80_PU_filler(*WP80_PUMap); SelectionMap::Filler WP90_PU_filler(*WP90_PUMap); + SelectionMap::Filler loose_filler(*looseMap); + SelectionMap::Filler medium_filler(*mediumMap); + SelectionMap::Filler tight_filler(*tightMap); + //fill and insert valuemap fiducial_filler.insert(electronsHandle,fiducial_vec.begin(),fiducial_vec.end()); WP70_PU_filler.insert(electronsHandle,WP70_PU_vec.begin(),WP70_PU_vec.end()); WP80_PU_filler.insert(electronsHandle,WP80_PU_vec.begin(),WP80_PU_vec.end()); WP90_PU_filler.insert(electronsHandle,WP90_PU_vec.begin(),WP90_PU_vec.end()); + loose_filler.insert(electronsHandle,loose_vec.begin(),loose_vec.end()); + medium_filler.insert(electronsHandle,medium_vec.begin(),medium_vec.end()); + tight_filler.insert(electronsHandle,tight_vec.begin(),tight_vec.end()); + fiducial_filler.fill(); WP70_PU_filler.fill(); WP80_PU_filler.fill(); WP90_PU_filler.fill(); + loose_filler.fill(); + medium_filler.fill(); + tight_filler.fill(); //------------------------------ @@ -226,6 +286,9 @@ EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& iSetup iEvent.put(WP70_PUMap, "WP70PU"); iEvent.put(WP80_PUMap, "WP80PU"); iEvent.put(WP90_PUMap, "WP90PU"); + iEvent.put(looseMap, "loose"); + iEvent.put(mediumMap, "medium"); + iEvent.put(tightMap, "tight"); } From a08b72c2546ec943c3b03d5efad6d28ef752eeb0 Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 30 Jun 2013 22:12:03 +0200 Subject: [PATCH 003/475] removed calibration subdirectory --- {calibration/ALCARAW_RECO => ALCARAW_RECO}/BuildFile.xml | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/alcaraw_datasets.dat | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/alcareco_datasets.dat | 0 .../ALCARAW_RECO => ALCARAW_RECO}/alcarereco_datasets.dat | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/awk/compact.awk | 0 .../config/reRecoTags/13Jul_AlphaEFlow_v1.py | 0 .../config/reRecoTags/13Jul_AlphaEFlow_v2.py | 0 .../config/reRecoTags/13Jul_AlphaEle_v1.py | 0 .../config/reRecoTags/13Jul_AlphaPiZero_v1.py | 0 .../config/reRecoTags/13Jul_AlphaRef.py | 0 .../config/reRecoTags/13Jul_ICcomb_v1.py | 0 .../config/reRecoTags/13Jul_ICcomb_v2.py | 0 .../config/reRecoTags/13Jul_ICcomb_v3.py | 0 .../config/reRecoTags/13Jul_ICcomb_v4.py | 0 .../config/reRecoTags/13Jul_ICcomb_v5.py | 0 .../config/reRecoTags/13Jul_ICcomb_v6.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2010v3.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2011v1.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py | 0 .../config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py | 0 .../reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py | 0 .../reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py | 0 .../config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py | 0 .../config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py | 0 .../config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py | 0 .../config/reRecoTags/16Jan_ICpiZero_v1.py | 0 .../config/reRecoTags/16Jan_ICpiZero_v2.py | 0 .../config/reRecoTags/Cal_2011B53X.py | 0 .../config/reRecoTags/Cal_2011B53X_locCont_v1.py | 0 .../config/reRecoTags/Cal_AlphaJarry2012_v0.py | 0 .../config/reRecoTags/Cal_AlphaJarry2012_v1.py | 0 .../config/reRecoTags/Cal_Dic2012.py | 0 .../config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py | 0 .../reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py | 0 .../reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py | 0 .../config/reRecoTags/Cal_Dic2012_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012newLAS.py | 0 .../config/reRecoTags/Cal_Feb2013.py | 0 .../config/reRecoTags/Cal_Feb2013_ICComb_v4.py | 0 .../config/reRecoTags/Cal_Feb2013_ICEle_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v2.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v3.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v5.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v6.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py | 0 .../config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py | 0 .../config/reRecoTags/Cal_Jan2013.py | 0 .../config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py | 0 .../config/reRecoTags/Cal_Jan2013_LC_v1.py | 0 .../config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py | 0 .../config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py | 0 .../config/reRecoTags/Cal_Nov2012.py | 0 .../config/reRecoTags/Cal_Nov2012_ICEle_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICEle_v2.py | 0 .../config/reRecoTags/Cal_Nov2012_ICEle_v3.py | 0 .../config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py | 0 .../config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/HggPaper.py | 0 .../IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py | 0 .../IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py | 0 .../config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py | 0 .../reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py | 0 .../IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py | 0 ...20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py | 0 .../IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py | 0 .../IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py | 0 .../IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py | 0 .../IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py | 0 .../IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py | 0 .../IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py | 0 .../reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py | 0 .../config/reRecoTags/IC_V20120530_allComb_Eflow3200.py | 0 .../config/reRecoTags/IC_V20120530_v1.py | 0 .../config/reRecoTags/IC_V20120611_EFlow.py | 0 .../config/reRecoTags/IC_V20120613_2010_2011.py | 0 .../config/reRecoTags/LC_Phot_data_20120512_189410_193761.py | 0 .../config/reRecoTags/LC_Quant_data_20120512_190262_193774.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012.py | 0 .../config/reRecoTags/Prompt2012C.py | 0 .../config/reRecoTags/Prompt2012C_ADC_v1.py | 0 .../config/reRecoTags/Prompt2012C_LAS20112012v3.py | 0 .../config/reRecoTags/Prompt2012D.py | 0 .../config/reRecoTags/RUN2012AB_ICESEE_v1.py | 0 .../config/reRecoTags/RUN2012AB_ICESEE_v2.py | 0 .../config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py | 0 .../config/reRecoTags/RUN2012C_AlphaEFlow_v1.py | 0 .../config/reRecoTags/RUN2012C_AlphaEFlow_v2.py | 0 .../config/reRecoTags/RUN2012C_AlphaEle_v1.py | 0 .../config/reRecoTags/RUN2012C_AlphaPiZero_v1.py | 0 .../config/reRecoTags/RUN2012C_AlphaRef.py | 0 .../config/reRecoTags/RUN2012C_AlphaRef_ICES.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v1.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v2.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v3.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v4.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v5.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v6.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v7.py | 0 .../config/reRecoTags/V20121130_ICEle.py | 0 .../config/reRecoTags/V20121130_ICEle_2012AB.py | 0 .../config/reRecoTags/V20121130_ICcomb.py | 0 .../config/reRecoTags/V20121130_ICcomb_2012AB.py | 0 .../config/reRecoTags/V20121130_ICcomb_v2.py | 0 .../config/reRecoTags/V20121130_ICpiZero.py | 0 .../config/reRecoTags/V20121130_ICpiZero_2012AB.py | 0 .../config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py | 0 .../config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py | 0 .../config/reRecoTags/V20121214_PizCorPhiEle.py | 0 .../config/reRecoTags/combo2012v1.py | 0 .../config/reRecoTags/prompt_LCPv2.py | 0 .../config/reRecoTags/prompt_alpha116_LCPv2.py | 0 .../config/reRecoTags/prompt_alpha120.py | 0 .../config/reRecoTags/prompt_alpha120_ESv2.py | 0 .../config/reRecoTags/prompt_alpha120_IC2012v1.py | 0 .../config/reRecoTags/prompt_alpha120_LCPv1.py | 0 .../config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py | 0 .../config/reRecoTags/prompt_alpha120_LCPv2.py | 0 .../config/reRecoTags/prompt_alpha120_LCQv1.py | 0 .../config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py | 0 .../config/reRecoTags/rereco16Jan.py | 0 .../config/reRecoTags/rereco16Jan_las2012v1.py | 0 .../config/reRecoTags/rereco16Jan_las2012v1_alpha116.py | 0 .../config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py | 0 .../config/reRecoTags/rereco30Nov.py | 0 .../config/reRecoTags/rerecoICHEP2012.py | 0 .../reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py | 0 .../reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/rerecoICHEP_IC2012EtaScale.py | 0 .../config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py | 0 .../reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py | 0 .../rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py | 0 .../rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py | 0 .../reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py | 0 .../reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py | 0 .../config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py | 0 .../config/reRecoTags/rerecoICHEP_LCQonline.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/test.py | 0 .../config/reRecoTags/trivialCond.py | 0 .../config/reRecoTags/tutorial_mo4.py | 0 .../config/reRecoTags/tutorial_ric.py | 0 .../config/reRecoTags/tutorial_shervin.py | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/README | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcaraw.dump | 0 .../doc/alcaraw_alcareco_production.txt | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/dataformats.txt | 0 .../ALCARAW_RECO => ALCARAW_RECO}/doc/ntuple_production.txt | 0 .../ALCARAW_RECO => ALCARAW_RECO}/doc/quick_instructions.txt | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/rereco.txt | 0 .../interface/AlCaECALRecHitReducer.h | 0 .../interface/AlCaElectronTracksReducer.h | 0 .../interface/ElectronRecalibSuperClusterAssociatorSH.h | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/ntuple_datasets.dat | 0 .../python/ALCARECOEcalCalIsolElectron_Output_cff.py | 0 .../python/ALCARECOEcalCalIsolElectron_cff.py | 0 .../python/AlCaElectronTracksReducer_cfi.py | 0 .../python/ZElectronSkimSandbox_cff.py | 0 .../python/alCaIsolatedElectrons_cfi.py | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/alcaSkimming.py | 0 .../python/electronRecalibSCAssociatorSH_cfi.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/reRecoValidation.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/sandboxOutput_cff.py | 0 .../python/sandboxRerecoOutput_cff.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/sandboxRerecoSeq_cff.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/sandboxSeq_cff.py | 0 .../python/trackerDrivenFinder_cff.py | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/RerecoQuick.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/SandboxQuick.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/applyPatches.sh | 0 .../scripts/checkAndResubmitRereco.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkEOS.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/checkSandboxFiles.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/filelistDatasets.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/getSkimEff.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mergeOutput.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mvNtuple.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/parseDatasetFile.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcaraw.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcareco.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcarereco.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/prodFunctions.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodNtuples.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/removeEmptyFiles.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/removeRereco.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/rereco.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/rerecoSandboxQuick.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/resubmitCrab.sh | 0 .../scripts/splittedOutputFilesCrabPatch.sh | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/test.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/updateLastDataset.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/src/AlCaECALRecHitReducer.cc | 0 .../src/AlCaElectronTracksReducer.cc | 0 .../src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch | 0 .../test/AlCaElectronsProducer.cc-calibRecHit | 0 .../test/AlCaElectronsProducer.h-calibRecHit | 0 .../test/EcalClusterLazyTools.cc_patch | 0 .../test/EcalClusterLazyTools.h_patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools_h.sed | 0 .../test/EcalRecalibRecHitProducer.cc.patch | 0 .../test/ReducedESRecHitCollectionProducer.cc.patch | 0 .../test/ReducedESRecHitCollectionProducer.h.patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/class_def.xml.patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/clusterLazyTools.patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/electronRegression.patch | 0 {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/nPU_mc.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/recHitsValidation.py | 0 calibration/BuildFile.xml => BuildFile.xml | 0 .../BuildFile.xml | 0 .../data/copy.url | 0 .../data/download.url | 0 .../EleNewEnergiesProducer => EleNewEnergiesProducer}/doc/README | 0 .../elenewenergiesproducer_cfg.py | 0 .../interface/EGEnergyCorrector_fra.h | 0 .../python/elenewenergiesproducer_cfi.py | 0 .../src/EGEnergyCorrector_fra.cc | 0 .../src/EleNewEnergiesProducer.cc | 0 .../EleSelectionProducers => EleSelectionProducers}/BuildFile.xml | 0 .../eleselectionproducers_cfg.py | 0 .../interface/SimpleCutBasedElectronIDSelectionFunctor.h | 0 .../python/eleselectionproducers_cfi.py | 0 .../src/EleSelectionProducers.cc | 0 .../src/SimpleCutBasedElectronIDSelectionFunctor.cc | 0 {calibration/JsonFilter => JsonFilter}/BuildFile.xml | 0 {calibration/JsonFilter => JsonFilter}/python/jsonFilter_cfi.py | 0 {calibration/JsonFilter => JsonFilter}/src/JsonFilter.cc | 0 calibration/README => README | 0 {calibration/ZFitter => ZFitter}/BuildFile.xml | 0 {calibration/ZFitter => ZFitter}/Makefile | 0 {calibration/ZFitter => ZFitter}/awk/Hgg_resCorr.awk | 0 {calibration/ZFitter => ZFitter}/awk/format.awk | 0 {calibration/ZFitter => ZFitter}/awk/newResolution.awk | 0 {calibration/ZFitter => ZFitter}/awk/recalibOutput.awk | 0 {calibration/ZFitter => ZFitter}/awk/recalibOutput_H4l.awk | 0 {calibration/ZFitter => ZFitter}/bin/BuildFile.xml | 0 {calibration/ZFitter => ZFitter}/bin/ZFitter.cpp | 0 {calibration/ZFitter => ZFitter}/data/regions/absEta.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/absEtaSingleEle.dat | 0 .../data/regions/invMassRelSigma_SC_regrCorr_pho.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/nHits.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/refReg.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/scaleStep0.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/scaleStep1.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/scaleStep2.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep2smearing_1.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep2smearing_2.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/scaleStep3.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep3_withZPt.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep4smearing_1.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep4smearing_2.dat | 0 .../ZFitter => ZFitter}/data/regions/smearing_energy_EB.dat | 0 .../ZFitter => ZFitter}/data/regions/smearing_energy_EE.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/stability.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/systematics.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/test.dat | 0 {calibration/ZFitter => ZFitter}/data/regions/validation.dat | 0 .../ZFitter => ZFitter}/data/regions/validation_smearing.dat | 0 {calibration/ZFitter => ZFitter}/data/runRanges/monitoring.dat | 0 {calibration/ZFitter => ZFitter}/data/runRanges/monitoring2.dat | 0 .../ZFitter => ZFitter}/data/runRanges/monitoring_2011.dat | 0 {calibration/ZFitter => ZFitter}/data/runRanges/runPeriods.dat | 0 .../ZFitter => ZFitter}/data/runRanges/runRangeLimits.dat | 0 {calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.dat | 0 {calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.txt | 0 .../data/runRanges/runranges_29Jun-RUN2011.dat | 0 .../data/runRanges/runranges_ECALpaper2011.dat | 0 .../data/runRanges/runranges_ECALpaper2011_v2.dat | 0 .../ZFitter => ZFitter}/data/runRanges/runranges_HCP2012.dat | 0 .../ZFitter => ZFitter}/data/runRanges/runranges_Moriond2013.dat | 0 .../data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/13Jul.dat | 0 .../ZFitter => ZFitter}/data/validation/16Jan_42X-newGT.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/16Jan_42X.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/HCP2012.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/NewG4.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/NewG4X0Max.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/RUNC.dat | 0 .../ZFitter => ZFitter}/data/validation/Winter13-powheg.dat | 0 .../ZFitter => ZFitter}/data/validation/monitoring_2012_53X.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/moriond2013.dat | 0 .../ZFitter => ZFitter}/data/validation/moriond2013Checks.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat | 0 .../data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat | 0 .../data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat | 0 .../data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat | 0 .../data/validation/rereco/2011_data/rereco_2011A.dat | 0 .../data/validation/rereco/2011_data/rereco_2011B.dat | 0 .../data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat | 0 .../data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat | 0 .../validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat | 0 .../validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat | 0 .../validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat | 0 .../data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat | 0 .../validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat | 0 .../data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat | 0 .../validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat | 0 .../validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat | 0 .../validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat | 0 .../rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat | 0 .../data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat | 0 .../data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat | 0 .../data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat | 0 .../data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat | 0 .../rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat | 0 .../rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat | 0 .../validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat | 0 .../validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat | 0 .../rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat | 0 .../rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat | 0 .../validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat | 0 .../validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat | 0 .../data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat | 0 .../data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat | 0 .../data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat | 0 .../data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat | 0 .../rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat | 0 .../V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat | 0 .../V20121211_pizphiele_runC_AllR9EtaScale.dat | 0 .../V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat | 0 .../V20121211_pizphiele_runC_HR9EtaScale_v2.dat | 0 .../V20121211_pizphiele_runC_HR9EtaScale_v3.dat | 0 .../rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat | 0 .../validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat | 0 .../data/validation/rereco/ungrouped/Moriond2013.dat | 0 .../data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat | 0 .../data/validation/rereco/ungrouped/Winter13.dat | 0 .../data/validation/rereco/ungrouped/Winter13_noIC.dat | 0 .../data/validation/rereco/ungrouped/Winter13_noLas.dat | 0 .../data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat | 0 .../data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat | 0 .../rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat | 0 .../ZFitter => ZFitter}/data/validation/rereco/ungrouped/test.dat | 0 {calibration/ZFitter => ZFitter}/data/validation/test.dat | 0 {calibration/ZFitter => ZFitter}/doc/Hgg_systematics.txt | 0 {calibration/ZFitter => ZFitter}/doc/README | 0 {calibration/ZFitter => ZFitter}/interface/BW_CB_pdf_class.hh | 0 {calibration/ZFitter => ZFitter}/interface/Cruijff_pdf_class.hh | 0 .../ZFitter => ZFitter}/interface/ElectronCategory_class.hh | 0 .../ZFitter => ZFitter}/interface/EnergyScaleCorrection_class.h | 0 {calibration/ZFitter => ZFitter}/interface/RooCruijff.hh | 0 {calibration/ZFitter => ZFitter}/interface/RooMinimizer.hh | 0 {calibration/ZFitter => ZFitter}/interface/RooSmearer.hh | 0 {calibration/ZFitter => ZFitter}/interface/SmearingImporter.hh | 0 {calibration/ZFitter => ZFitter}/interface/ZFit_class.hh | 0 {calibration/ZFitter => ZFitter}/interface/ZeeEvent.hh | 0 {calibration/ZFitter => ZFitter}/interface/addBranch_class.hh | 0 {calibration/ZFitter => ZFitter}/interface/puWeights_class.hh | 0 {calibration/ZFitter => ZFitter}/interface/r9Weights_class.hh | 0 {calibration/ZFitter => ZFitter}/interface/runDivide_class.hh | 0 {calibration/ZFitter => ZFitter}/interface/setTDRStyle.hh | 0 {calibration/ZFitter => ZFitter}/macro/Hgg_systematic_plots.C | 0 {calibration/ZFitter => ZFitter}/macro/PlotDataMC.C | 0 {calibration/ZFitter => ZFitter}/macro/macro_fit.C | 0 {calibration/ZFitter => ZFitter}/macro/mcmcDraw.C | 0 {calibration/ZFitter => ZFitter}/macro/new_branch.C | 0 {calibration/ZFitter => ZFitter}/macro/periods.C | 0 {calibration/ZFitter => ZFitter}/macro/periodsPlot.C | 0 {calibration/ZFitter => ZFitter}/macro/plot_data_mc.C | 0 {calibration/ZFitter => ZFitter}/macro/propaganda_plot.C | 0 {calibration/ZFitter => ZFitter}/macro/propaganda_plot2.C | 0 {calibration/ZFitter => ZFitter}/macro/quantile.cc | 0 {calibration/ZFitter => ZFitter}/macro/sigmaE_plot.C | 0 {calibration/ZFitter => ZFitter}/macro/stability.C | 0 {calibration/ZFitter => ZFitter}/macro/standardDataMC.C | 0 {calibration/ZFitter => ZFitter}/macro/standardMCMC.C | 0 {calibration/ZFitter => ZFitter}/script/CalcResCorrection.sh | 0 {calibration/ZFitter => ZFitter}/script/FitResultTostep2.sh | 0 {calibration/ZFitter => ZFitter}/script/GenRootChain.sh | 0 {calibration/ZFitter => ZFitter}/script/compareColumns.sh | 0 {calibration/ZFitter => ZFitter}/script/dataPU.sh | 0 {calibration/ZFitter => ZFitter}/script/energyScale.sh | 0 {calibration/ZFitter => ZFitter}/script/formatTable.sh | 0 {calibration/ZFitter => ZFitter}/script/justOnce/materialStudy.sh | 0 .../ZFitter => ZFitter}/script/justOnce/materialStudyPlot.sh | 0 {calibration/ZFitter => ZFitter}/script/justOnce/smearing.sh | 0 {calibration/ZFitter => ZFitter}/script/makeCorrVsRunNumber.py | 0 {calibration/ZFitter => ZFitter}/script/makeTable.sh | 0 {calibration/ZFitter => ZFitter}/script/makeValidationSlides.sh | 0 {calibration/ZFitter => ZFitter}/script/makehtml.py | 0 {calibration/ZFitter => ZFitter}/script/monitoring_validation.sh | 0 {calibration/ZFitter => ZFitter}/script/publish.sh | 0 {calibration/ZFitter => ZFitter}/script/report.sh | 0 {calibration/ZFitter => ZFitter}/script/selEff.sh | 0 {calibration/ZFitter => ZFitter}/script/slidesFunctions.sh | 0 {calibration/ZFitter => ZFitter}/script/stability.sh | 0 {calibration/ZFitter => ZFitter}/script/systematics.sh | 0 {calibration/ZFitter => ZFitter}/script/tex2txt.sh | 0 {calibration/ZFitter => ZFitter}/script/validation.sh | 0 {calibration/ZFitter => ZFitter}/sed/run2time.sed | 0 {calibration/ZFitter => ZFitter}/sed/tex.sed | 0 {calibration/ZFitter => ZFitter}/src/BW_CB_pdf_class.cc | 0 {calibration/ZFitter => ZFitter}/src/Cruijff_pdf_class.cc | 0 {calibration/ZFitter => ZFitter}/src/ElectronCategory_class.cc | 0 .../ZFitter => ZFitter}/src/EnergyScaleCorrection_class.cc | 0 {calibration/ZFitter => ZFitter}/src/RooCruijff.cc | 0 {calibration/ZFitter => ZFitter}/src/RooMinimizer.cxx | 0 {calibration/ZFitter => ZFitter}/src/RooSmearer.cc | 0 {calibration/ZFitter => ZFitter}/src/SmearingImporter.cc | 0 {calibration/ZFitter => ZFitter}/src/ZFit_class.cc | 0 {calibration/ZFitter => ZFitter}/src/addBranch_class.cc | 0 {calibration/ZFitter => ZFitter}/src/nllProfile.cc | 0 {calibration/ZFitter => ZFitter}/src/puWeights_class.cc | 0 {calibration/ZFitter => ZFitter}/src/r9Weights_class.cc | 0 {calibration/ZFitter => ZFitter}/src/runDivide_class.cc | 0 {calibration/ZFitter => ZFitter}/src/setTDRStyle.C | 0 {calibration/ZFitter => ZFitter}/test/launch.sh | 0 {calibration/ZFitter => ZFitter}/test/runDivide_macro.C | 0 {calibration/ZFitter => ZFitter}/test/test.cpp | 0 {calibration/ZFitter => ZFitter}/tex/FitSlides_template.tex | 0 {calibration/ZFitter => ZFitter}/tex/fitSlides.tex | 0 {calibration/ZFitter => ZFitter}/tex/stabilitySlides.tex | 0 {calibration/ZFitter => ZFitter}/tex/tableSlides.tex | 0 {calibration/ZNtupleDumper => ZNtupleDumper}/BuildFile.xml | 0 {calibration/ZNtupleDumper => ZNtupleDumper}/doc/README | 0 .../ZNtupleDumper => ZNtupleDumper}/interface/readJsonFile.h | 0 .../ZNtupleDumper => ZNtupleDumper}/macro/nPV_dataMC_plot.C | 0 {calibration/ZNtupleDumper => ZNtupleDumper}/python/elePat_cfi.py | 0 .../ZNtupleDumper => ZNtupleDumper}/python/patSequence_cff.py | 0 .../ZNtupleDumper => ZNtupleDumper}/python/zntupledumper_cfi.py | 0 .../ZNtupleDumper => ZNtupleDumper}/script/mcPUweights.sh | 0 .../ZNtupleDumper => ZNtupleDumper}/script/puWeightTree.sh | 0 {calibration/ZNtupleDumper => ZNtupleDumper}/script/puWeights.sh | 0 {calibration/ZNtupleDumper => ZNtupleDumper}/src/ZNtupleDumper.cc | 0 {calibration/ZNtupleDumper => ZNtupleDumper}/src/readJsonFile.cc | 0 calibration/fulldoc => fulldoc | 0 calibration/setup.sh => setup.sh | 0 559 files changed, 0 insertions(+), 0 deletions(-) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/BuildFile.xml (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/alcaraw_datasets.dat (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/alcareco_datasets.dat (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/alcarereco_datasets.dat (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/awk/compact.awk (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaEFlow_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaEFlow_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaEle_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaPiZero_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaRef.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v5.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v6.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_ICpiZero_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_ICpiZero_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_2011B53X.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_2011B53X_locCont_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_AlphaJarry2012_v0.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_AlphaJarry2012_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_RUNAB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012newLAS.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICComb_v4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICEle_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jan2013.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jan2013_LC_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICEle_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICEle_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICEle_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/HggPaper.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120530_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120611_EFlow.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120613_2010_2011.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012C.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012C_ADC_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012C_LAS20112012v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012D.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012AB_ICESEE_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012AB_ICESEE_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaEle_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaRef.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaRef_ICES.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v5.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v6.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v7.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICEle.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICEle_2012AB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICcomb.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICcomb_2012AB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICcomb_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICpiZero.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICpiZero_2012AB.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121214_PizCorPhiEle.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/combo2012v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_LCPv2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha116_LCPv2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_ESv2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_IC2012v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCPv1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCPv2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCQv1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan_las2012v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco30Nov.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_LCQonline.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/test.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/trivialCond.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/tutorial_mo4.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/tutorial_ric.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/tutorial_shervin.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/README (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcaraw.dump (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcaraw_alcareco_production.txt (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/dataformats.txt (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/ntuple_production.txt (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/quick_instructions.txt (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/rereco.txt (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/AlCaECALRecHitReducer.h (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/AlCaElectronTracksReducer.h (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/ElectronRecalibSuperClusterAssociatorSH.h (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/ntuple_datasets.dat (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/ALCARECOEcalCalIsolElectron_Output_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/ALCARECOEcalCalIsolElectron_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/AlCaElectronTracksReducer_cfi.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/ZElectronSkimSandbox_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/alCaIsolatedElectrons_cfi.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/alcaSkimming.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/electronRecalibSCAssociatorSH_cfi.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/reRecoValidation.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxOutput_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxRerecoOutput_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxRerecoSeq_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxSeq_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/python/trackerDrivenFinder_cff.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/RerecoQuick.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/SandboxQuick.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/applyPatches.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkAndResubmitRereco.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkEOS.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkSandboxFiles.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/filelistDatasets.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/getSkimEff.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mergeOutput.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mvNtuple.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/parseDatasetFile.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcaraw.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcareco.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcarereco.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodFunctions.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodNtuples.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/removeEmptyFiles.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/removeRereco.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/rereco.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/rerecoSandboxQuick.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/resubmitCrab.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/splittedOutputFilesCrabPatch.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/test.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/updateLastDataset.sh (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/src/AlCaECALRecHitReducer.cc (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/src/AlCaElectronTracksReducer.cc (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/AlCaElectronsProducer.cc-calibRecHit (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/AlCaElectronsProducer.h-calibRecHit (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools.cc_patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools.h_patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools_h.sed (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalRecalibRecHitProducer.cc.patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/ReducedESRecHitCollectionProducer.cc.patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/ReducedESRecHitCollectionProducer.h.patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/class_def.xml.patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/clusterLazyTools.patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/electronRegression.patch (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/nPU_mc.py (100%) rename {calibration/ALCARAW_RECO => ALCARAW_RECO}/test/recHitsValidation.py (100%) rename calibration/BuildFile.xml => BuildFile.xml (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/BuildFile.xml (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/data/copy.url (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/data/download.url (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/doc/README (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/elenewenergiesproducer_cfg.py (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/interface/EGEnergyCorrector_fra.h (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/python/elenewenergiesproducer_cfi.py (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/src/EGEnergyCorrector_fra.cc (100%) rename {calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/src/EleNewEnergiesProducer.cc (100%) rename {calibration/EleSelectionProducers => EleSelectionProducers}/BuildFile.xml (100%) rename {calibration/EleSelectionProducers => EleSelectionProducers}/eleselectionproducers_cfg.py (100%) rename {calibration/EleSelectionProducers => EleSelectionProducers}/interface/SimpleCutBasedElectronIDSelectionFunctor.h (100%) rename {calibration/EleSelectionProducers => EleSelectionProducers}/python/eleselectionproducers_cfi.py (100%) rename {calibration/EleSelectionProducers => EleSelectionProducers}/src/EleSelectionProducers.cc (100%) rename {calibration/EleSelectionProducers => EleSelectionProducers}/src/SimpleCutBasedElectronIDSelectionFunctor.cc (100%) rename {calibration/JsonFilter => JsonFilter}/BuildFile.xml (100%) rename {calibration/JsonFilter => JsonFilter}/python/jsonFilter_cfi.py (100%) rename {calibration/JsonFilter => JsonFilter}/src/JsonFilter.cc (100%) rename calibration/README => README (100%) rename {calibration/ZFitter => ZFitter}/BuildFile.xml (100%) rename {calibration/ZFitter => ZFitter}/Makefile (100%) rename {calibration/ZFitter => ZFitter}/awk/Hgg_resCorr.awk (100%) rename {calibration/ZFitter => ZFitter}/awk/format.awk (100%) rename {calibration/ZFitter => ZFitter}/awk/newResolution.awk (100%) rename {calibration/ZFitter => ZFitter}/awk/recalibOutput.awk (100%) rename {calibration/ZFitter => ZFitter}/awk/recalibOutput_H4l.awk (100%) rename {calibration/ZFitter => ZFitter}/bin/BuildFile.xml (100%) rename {calibration/ZFitter => ZFitter}/bin/ZFitter.cpp (100%) rename {calibration/ZFitter => ZFitter}/data/regions/absEta.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/absEtaSingleEle.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/invMassRelSigma_SC_regrCorr_pho.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/nHits.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/refReg.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep0.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep2smearing_1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep2smearing_2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep3_withZPt.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep4smearing_1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/scaleStep4smearing_2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/smearing_energy_EB.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/smearing_energy_EE.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/stability.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/systematics.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/test.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/validation.dat (100%) rename {calibration/ZFitter => ZFitter}/data/regions/validation_smearing.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/monitoring.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/monitoring2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/monitoring_2011.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runPeriods.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runRangeLimits.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.txt (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runranges_29Jun-RUN2011.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runranges_ECALpaper2011.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runranges_ECALpaper2011_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runranges_HCP2012.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/runranges_Moriond2013.dat (100%) rename {calibration/ZFitter => ZFitter}/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/13Jul.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/16Jan_42X-newGT.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/16Jan_42X.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/HCP2012.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/NewG4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/NewG4X0Max.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/RUNC.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/Winter13-powheg.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/monitoring_2012_53X.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/moriond2013.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/moriond2013Checks.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/2011_data/rereco_2011A.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/2011_data/rereco_2011B.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Moriond2013.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13_noIC.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13_noLas.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/test.dat (100%) rename {calibration/ZFitter => ZFitter}/data/validation/test.dat (100%) rename {calibration/ZFitter => ZFitter}/doc/Hgg_systematics.txt (100%) rename {calibration/ZFitter => ZFitter}/doc/README (100%) rename {calibration/ZFitter => ZFitter}/interface/BW_CB_pdf_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/Cruijff_pdf_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/ElectronCategory_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/EnergyScaleCorrection_class.h (100%) rename {calibration/ZFitter => ZFitter}/interface/RooCruijff.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/RooMinimizer.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/RooSmearer.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/SmearingImporter.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/ZFit_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/ZeeEvent.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/addBranch_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/puWeights_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/r9Weights_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/runDivide_class.hh (100%) rename {calibration/ZFitter => ZFitter}/interface/setTDRStyle.hh (100%) rename {calibration/ZFitter => ZFitter}/macro/Hgg_systematic_plots.C (100%) rename {calibration/ZFitter => ZFitter}/macro/PlotDataMC.C (100%) rename {calibration/ZFitter => ZFitter}/macro/macro_fit.C (100%) rename {calibration/ZFitter => ZFitter}/macro/mcmcDraw.C (100%) rename {calibration/ZFitter => ZFitter}/macro/new_branch.C (100%) rename {calibration/ZFitter => ZFitter}/macro/periods.C (100%) rename {calibration/ZFitter => ZFitter}/macro/periodsPlot.C (100%) rename {calibration/ZFitter => ZFitter}/macro/plot_data_mc.C (100%) rename {calibration/ZFitter => ZFitter}/macro/propaganda_plot.C (100%) rename {calibration/ZFitter => ZFitter}/macro/propaganda_plot2.C (100%) rename {calibration/ZFitter => ZFitter}/macro/quantile.cc (100%) rename {calibration/ZFitter => ZFitter}/macro/sigmaE_plot.C (100%) rename {calibration/ZFitter => ZFitter}/macro/stability.C (100%) rename {calibration/ZFitter => ZFitter}/macro/standardDataMC.C (100%) rename {calibration/ZFitter => ZFitter}/macro/standardMCMC.C (100%) rename {calibration/ZFitter => ZFitter}/script/CalcResCorrection.sh (100%) rename {calibration/ZFitter => ZFitter}/script/FitResultTostep2.sh (100%) rename {calibration/ZFitter => ZFitter}/script/GenRootChain.sh (100%) rename {calibration/ZFitter => ZFitter}/script/compareColumns.sh (100%) rename {calibration/ZFitter => ZFitter}/script/dataPU.sh (100%) rename {calibration/ZFitter => ZFitter}/script/energyScale.sh (100%) rename {calibration/ZFitter => ZFitter}/script/formatTable.sh (100%) rename {calibration/ZFitter => ZFitter}/script/justOnce/materialStudy.sh (100%) rename {calibration/ZFitter => ZFitter}/script/justOnce/materialStudyPlot.sh (100%) rename {calibration/ZFitter => ZFitter}/script/justOnce/smearing.sh (100%) rename {calibration/ZFitter => ZFitter}/script/makeCorrVsRunNumber.py (100%) rename {calibration/ZFitter => ZFitter}/script/makeTable.sh (100%) rename {calibration/ZFitter => ZFitter}/script/makeValidationSlides.sh (100%) rename {calibration/ZFitter => ZFitter}/script/makehtml.py (100%) rename {calibration/ZFitter => ZFitter}/script/monitoring_validation.sh (100%) rename {calibration/ZFitter => ZFitter}/script/publish.sh (100%) rename {calibration/ZFitter => ZFitter}/script/report.sh (100%) rename {calibration/ZFitter => ZFitter}/script/selEff.sh (100%) rename {calibration/ZFitter => ZFitter}/script/slidesFunctions.sh (100%) rename {calibration/ZFitter => ZFitter}/script/stability.sh (100%) rename {calibration/ZFitter => ZFitter}/script/systematics.sh (100%) rename {calibration/ZFitter => ZFitter}/script/tex2txt.sh (100%) rename {calibration/ZFitter => ZFitter}/script/validation.sh (100%) rename {calibration/ZFitter => ZFitter}/sed/run2time.sed (100%) rename {calibration/ZFitter => ZFitter}/sed/tex.sed (100%) rename {calibration/ZFitter => ZFitter}/src/BW_CB_pdf_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/Cruijff_pdf_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/ElectronCategory_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/EnergyScaleCorrection_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/RooCruijff.cc (100%) rename {calibration/ZFitter => ZFitter}/src/RooMinimizer.cxx (100%) rename {calibration/ZFitter => ZFitter}/src/RooSmearer.cc (100%) rename {calibration/ZFitter => ZFitter}/src/SmearingImporter.cc (100%) rename {calibration/ZFitter => ZFitter}/src/ZFit_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/addBranch_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/nllProfile.cc (100%) rename {calibration/ZFitter => ZFitter}/src/puWeights_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/r9Weights_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/runDivide_class.cc (100%) rename {calibration/ZFitter => ZFitter}/src/setTDRStyle.C (100%) rename {calibration/ZFitter => ZFitter}/test/launch.sh (100%) rename {calibration/ZFitter => ZFitter}/test/runDivide_macro.C (100%) rename {calibration/ZFitter => ZFitter}/test/test.cpp (100%) rename {calibration/ZFitter => ZFitter}/tex/FitSlides_template.tex (100%) rename {calibration/ZFitter => ZFitter}/tex/fitSlides.tex (100%) rename {calibration/ZFitter => ZFitter}/tex/stabilitySlides.tex (100%) rename {calibration/ZFitter => ZFitter}/tex/tableSlides.tex (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/BuildFile.xml (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/doc/README (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/interface/readJsonFile.h (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/macro/nPV_dataMC_plot.C (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/python/elePat_cfi.py (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/python/patSequence_cff.py (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/python/zntupledumper_cfi.py (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/script/mcPUweights.sh (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/script/puWeightTree.sh (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/script/puWeights.sh (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/src/ZNtupleDumper.cc (100%) rename {calibration/ZNtupleDumper => ZNtupleDumper}/src/readJsonFile.cc (100%) rename calibration/fulldoc => fulldoc (100%) rename calibration/setup.sh => setup.sh (100%) diff --git a/calibration/ALCARAW_RECO/BuildFile.xml b/ALCARAW_RECO/BuildFile.xml similarity index 100% rename from calibration/ALCARAW_RECO/BuildFile.xml rename to ALCARAW_RECO/BuildFile.xml diff --git a/calibration/ALCARAW_RECO/alcaraw_datasets.dat b/ALCARAW_RECO/alcaraw_datasets.dat similarity index 100% rename from calibration/ALCARAW_RECO/alcaraw_datasets.dat rename to ALCARAW_RECO/alcaraw_datasets.dat diff --git a/calibration/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat similarity index 100% rename from calibration/ALCARAW_RECO/alcareco_datasets.dat rename to ALCARAW_RECO/alcareco_datasets.dat diff --git a/calibration/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat similarity index 100% rename from calibration/ALCARAW_RECO/alcarereco_datasets.dat rename to ALCARAW_RECO/alcarereco_datasets.dat diff --git a/calibration/ALCARAW_RECO/awk/compact.awk b/ALCARAW_RECO/awk/compact.awk similarity index 100% rename from calibration/ALCARAW_RECO/awk/compact.awk rename to ALCARAW_RECO/awk/compact.awk diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py b/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py b/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py rename to ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py b/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py rename to ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/HggPaper.py b/ALCARAW_RECO/config/reRecoTags/HggPaper.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/HggPaper.py rename to ALCARAW_RECO/config/reRecoTags/HggPaper.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py b/ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py rename to ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py b/ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py rename to ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012C.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012C.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012D.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012D.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012D.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012D.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py b/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py b/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py b/ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py rename to ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/combo2012v1.py b/ALCARAW_RECO/config/reRecoTags/combo2012v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/combo2012v1.py rename to ALCARAW_RECO/config/reRecoTags/combo2012v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco30Nov.py b/ALCARAW_RECO/config/reRecoTags/rereco30Nov.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco30Nov.py rename to ALCARAW_RECO/config/reRecoTags/rereco30Nov.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/test.py b/ALCARAW_RECO/config/reRecoTags/test.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/test.py rename to ALCARAW_RECO/config/reRecoTags/test.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/trivialCond.py b/ALCARAW_RECO/config/reRecoTags/trivialCond.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/trivialCond.py rename to ALCARAW_RECO/config/reRecoTags/trivialCond.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py b/ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py rename to ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/tutorial_ric.py b/ALCARAW_RECO/config/reRecoTags/tutorial_ric.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/tutorial_ric.py rename to ALCARAW_RECO/config/reRecoTags/tutorial_ric.py diff --git a/calibration/ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py b/ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py similarity index 100% rename from calibration/ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py rename to ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py diff --git a/calibration/ALCARAW_RECO/doc/README b/ALCARAW_RECO/doc/README similarity index 100% rename from calibration/ALCARAW_RECO/doc/README rename to ALCARAW_RECO/doc/README diff --git a/calibration/ALCARAW_RECO/doc/alcaraw.dump b/ALCARAW_RECO/doc/alcaraw.dump similarity index 100% rename from calibration/ALCARAW_RECO/doc/alcaraw.dump rename to ALCARAW_RECO/doc/alcaraw.dump diff --git a/calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt similarity index 100% rename from calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt rename to ALCARAW_RECO/doc/alcaraw_alcareco_production.txt diff --git a/calibration/ALCARAW_RECO/doc/dataformats.txt b/ALCARAW_RECO/doc/dataformats.txt similarity index 100% rename from calibration/ALCARAW_RECO/doc/dataformats.txt rename to ALCARAW_RECO/doc/dataformats.txt diff --git a/calibration/ALCARAW_RECO/doc/ntuple_production.txt b/ALCARAW_RECO/doc/ntuple_production.txt similarity index 100% rename from calibration/ALCARAW_RECO/doc/ntuple_production.txt rename to ALCARAW_RECO/doc/ntuple_production.txt diff --git a/calibration/ALCARAW_RECO/doc/quick_instructions.txt b/ALCARAW_RECO/doc/quick_instructions.txt similarity index 100% rename from calibration/ALCARAW_RECO/doc/quick_instructions.txt rename to ALCARAW_RECO/doc/quick_instructions.txt diff --git a/calibration/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt similarity index 100% rename from calibration/ALCARAW_RECO/doc/rereco.txt rename to ALCARAW_RECO/doc/rereco.txt diff --git a/calibration/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h b/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h similarity index 100% rename from calibration/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h rename to ALCARAW_RECO/interface/AlCaECALRecHitReducer.h diff --git a/calibration/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h b/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h similarity index 100% rename from calibration/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h rename to ALCARAW_RECO/interface/AlCaElectronTracksReducer.h diff --git a/calibration/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h b/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h similarity index 100% rename from calibration/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h rename to ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h diff --git a/calibration/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat similarity index 100% rename from calibration/ALCARAW_RECO/ntuple_datasets.dat rename to ALCARAW_RECO/ntuple_datasets.dat diff --git a/calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py rename to ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py diff --git a/calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py rename to ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py diff --git a/calibration/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py b/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py similarity index 100% rename from calibration/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py rename to ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py diff --git a/calibration/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py b/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py rename to ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py diff --git a/calibration/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py b/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py similarity index 100% rename from calibration/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py rename to ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py diff --git a/calibration/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py similarity index 100% rename from calibration/ALCARAW_RECO/python/alcaSkimming.py rename to ALCARAW_RECO/python/alcaSkimming.py diff --git a/calibration/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py b/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py similarity index 100% rename from calibration/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py rename to ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py diff --git a/calibration/ALCARAW_RECO/python/reRecoValidation.py b/ALCARAW_RECO/python/reRecoValidation.py similarity index 100% rename from calibration/ALCARAW_RECO/python/reRecoValidation.py rename to ALCARAW_RECO/python/reRecoValidation.py diff --git a/calibration/ALCARAW_RECO/python/sandboxOutput_cff.py b/ALCARAW_RECO/python/sandboxOutput_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/sandboxOutput_cff.py rename to ALCARAW_RECO/python/sandboxOutput_cff.py diff --git a/calibration/ALCARAW_RECO/python/sandboxRerecoOutput_cff.py b/ALCARAW_RECO/python/sandboxRerecoOutput_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/sandboxRerecoOutput_cff.py rename to ALCARAW_RECO/python/sandboxRerecoOutput_cff.py diff --git a/calibration/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py rename to ALCARAW_RECO/python/sandboxRerecoSeq_cff.py diff --git a/calibration/ALCARAW_RECO/python/sandboxSeq_cff.py b/ALCARAW_RECO/python/sandboxSeq_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/sandboxSeq_cff.py rename to ALCARAW_RECO/python/sandboxSeq_cff.py diff --git a/calibration/ALCARAW_RECO/python/trackerDrivenFinder_cff.py b/ALCARAW_RECO/python/trackerDrivenFinder_cff.py similarity index 100% rename from calibration/ALCARAW_RECO/python/trackerDrivenFinder_cff.py rename to ALCARAW_RECO/python/trackerDrivenFinder_cff.py diff --git a/calibration/ALCARAW_RECO/scripts/RerecoQuick.sh b/ALCARAW_RECO/scripts/RerecoQuick.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/RerecoQuick.sh rename to ALCARAW_RECO/scripts/RerecoQuick.sh diff --git a/calibration/ALCARAW_RECO/scripts/SandboxQuick.sh b/ALCARAW_RECO/scripts/SandboxQuick.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/SandboxQuick.sh rename to ALCARAW_RECO/scripts/SandboxQuick.sh diff --git a/calibration/ALCARAW_RECO/scripts/applyPatches.sh b/ALCARAW_RECO/scripts/applyPatches.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/applyPatches.sh rename to ALCARAW_RECO/scripts/applyPatches.sh diff --git a/calibration/ALCARAW_RECO/scripts/checkAndResubmitRereco.sh b/ALCARAW_RECO/scripts/checkAndResubmitRereco.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/checkAndResubmitRereco.sh rename to ALCARAW_RECO/scripts/checkAndResubmitRereco.sh diff --git a/calibration/ALCARAW_RECO/scripts/checkEOS.sh b/ALCARAW_RECO/scripts/checkEOS.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/checkEOS.sh rename to ALCARAW_RECO/scripts/checkEOS.sh diff --git a/calibration/ALCARAW_RECO/scripts/checkSandboxFiles.sh b/ALCARAW_RECO/scripts/checkSandboxFiles.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/checkSandboxFiles.sh rename to ALCARAW_RECO/scripts/checkSandboxFiles.sh diff --git a/calibration/ALCARAW_RECO/scripts/filelistDatasets.sh b/ALCARAW_RECO/scripts/filelistDatasets.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/filelistDatasets.sh rename to ALCARAW_RECO/scripts/filelistDatasets.sh diff --git a/calibration/ALCARAW_RECO/scripts/getSkimEff.sh b/ALCARAW_RECO/scripts/getSkimEff.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/getSkimEff.sh rename to ALCARAW_RECO/scripts/getSkimEff.sh diff --git a/calibration/ALCARAW_RECO/scripts/mergeOutput.sh b/ALCARAW_RECO/scripts/mergeOutput.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/mergeOutput.sh rename to ALCARAW_RECO/scripts/mergeOutput.sh diff --git a/calibration/ALCARAW_RECO/scripts/mvNtuple.sh b/ALCARAW_RECO/scripts/mvNtuple.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/mvNtuple.sh rename to ALCARAW_RECO/scripts/mvNtuple.sh diff --git a/calibration/ALCARAW_RECO/scripts/parseDatasetFile.sh b/ALCARAW_RECO/scripts/parseDatasetFile.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/parseDatasetFile.sh rename to ALCARAW_RECO/scripts/parseDatasetFile.sh diff --git a/calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh b/ALCARAW_RECO/scripts/prodAlcaraw.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh rename to ALCARAW_RECO/scripts/prodAlcaraw.sh diff --git a/calibration/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/prodAlcareco.sh rename to ALCARAW_RECO/scripts/prodAlcareco.sh diff --git a/calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh rename to ALCARAW_RECO/scripts/prodAlcarereco.sh diff --git a/calibration/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/prodFunctions.sh rename to ALCARAW_RECO/scripts/prodFunctions.sh diff --git a/calibration/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/prodNtuples.sh rename to ALCARAW_RECO/scripts/prodNtuples.sh diff --git a/calibration/ALCARAW_RECO/scripts/removeEmptyFiles.sh b/ALCARAW_RECO/scripts/removeEmptyFiles.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/removeEmptyFiles.sh rename to ALCARAW_RECO/scripts/removeEmptyFiles.sh diff --git a/calibration/ALCARAW_RECO/scripts/removeRereco.sh b/ALCARAW_RECO/scripts/removeRereco.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/removeRereco.sh rename to ALCARAW_RECO/scripts/removeRereco.sh diff --git a/calibration/ALCARAW_RECO/scripts/rereco.sh b/ALCARAW_RECO/scripts/rereco.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/rereco.sh rename to ALCARAW_RECO/scripts/rereco.sh diff --git a/calibration/ALCARAW_RECO/scripts/rerecoSandboxQuick.sh b/ALCARAW_RECO/scripts/rerecoSandboxQuick.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/rerecoSandboxQuick.sh rename to ALCARAW_RECO/scripts/rerecoSandboxQuick.sh diff --git a/calibration/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/resubmitCrab.sh rename to ALCARAW_RECO/scripts/resubmitCrab.sh diff --git a/calibration/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh rename to ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh diff --git a/calibration/ALCARAW_RECO/scripts/test.sh b/ALCARAW_RECO/scripts/test.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/test.sh rename to ALCARAW_RECO/scripts/test.sh diff --git a/calibration/ALCARAW_RECO/scripts/updateLastDataset.sh b/ALCARAW_RECO/scripts/updateLastDataset.sh similarity index 100% rename from calibration/ALCARAW_RECO/scripts/updateLastDataset.sh rename to ALCARAW_RECO/scripts/updateLastDataset.sh diff --git a/calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc b/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc similarity index 100% rename from calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc rename to ALCARAW_RECO/src/AlCaECALRecHitReducer.cc diff --git a/calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc b/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc similarity index 100% rename from calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc rename to ALCARAW_RECO/src/AlCaElectronTracksReducer.cc diff --git a/calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch b/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch similarity index 100% rename from calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch rename to ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch diff --git a/calibration/ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit b/ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit similarity index 100% rename from calibration/ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit rename to ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit diff --git a/calibration/ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit b/ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit similarity index 100% rename from calibration/ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit rename to ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit diff --git a/calibration/ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch b/ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch similarity index 100% rename from calibration/ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch rename to ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch diff --git a/calibration/ALCARAW_RECO/test/EcalClusterLazyTools.h_patch b/ALCARAW_RECO/test/EcalClusterLazyTools.h_patch similarity index 100% rename from calibration/ALCARAW_RECO/test/EcalClusterLazyTools.h_patch rename to ALCARAW_RECO/test/EcalClusterLazyTools.h_patch diff --git a/calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed b/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed similarity index 100% rename from calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed rename to ALCARAW_RECO/test/EcalClusterLazyTools_h.sed diff --git a/calibration/ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch b/ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch similarity index 100% rename from calibration/ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch rename to ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch diff --git a/calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch b/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch similarity index 100% rename from calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch rename to ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch diff --git a/calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch b/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch similarity index 100% rename from calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch rename to ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch diff --git a/calibration/ALCARAW_RECO/test/class_def.xml.patch b/ALCARAW_RECO/test/class_def.xml.patch similarity index 100% rename from calibration/ALCARAW_RECO/test/class_def.xml.patch rename to ALCARAW_RECO/test/class_def.xml.patch diff --git a/calibration/ALCARAW_RECO/test/clusterLazyTools.patch b/ALCARAW_RECO/test/clusterLazyTools.patch similarity index 100% rename from calibration/ALCARAW_RECO/test/clusterLazyTools.patch rename to ALCARAW_RECO/test/clusterLazyTools.patch diff --git a/calibration/ALCARAW_RECO/test/electronRegression.patch b/ALCARAW_RECO/test/electronRegression.patch similarity index 100% rename from calibration/ALCARAW_RECO/test/electronRegression.patch rename to ALCARAW_RECO/test/electronRegression.patch diff --git a/calibration/ALCARAW_RECO/test/nPU_mc.py b/ALCARAW_RECO/test/nPU_mc.py similarity index 100% rename from calibration/ALCARAW_RECO/test/nPU_mc.py rename to ALCARAW_RECO/test/nPU_mc.py diff --git a/calibration/ALCARAW_RECO/test/recHitsValidation.py b/ALCARAW_RECO/test/recHitsValidation.py similarity index 100% rename from calibration/ALCARAW_RECO/test/recHitsValidation.py rename to ALCARAW_RECO/test/recHitsValidation.py diff --git a/calibration/BuildFile.xml b/BuildFile.xml similarity index 100% rename from calibration/BuildFile.xml rename to BuildFile.xml diff --git a/calibration/EleNewEnergiesProducer/BuildFile.xml b/EleNewEnergiesProducer/BuildFile.xml similarity index 100% rename from calibration/EleNewEnergiesProducer/BuildFile.xml rename to EleNewEnergiesProducer/BuildFile.xml diff --git a/calibration/EleNewEnergiesProducer/data/copy.url b/EleNewEnergiesProducer/data/copy.url similarity index 100% rename from calibration/EleNewEnergiesProducer/data/copy.url rename to EleNewEnergiesProducer/data/copy.url diff --git a/calibration/EleNewEnergiesProducer/data/download.url b/EleNewEnergiesProducer/data/download.url similarity index 100% rename from calibration/EleNewEnergiesProducer/data/download.url rename to EleNewEnergiesProducer/data/download.url diff --git a/calibration/EleNewEnergiesProducer/doc/README b/EleNewEnergiesProducer/doc/README similarity index 100% rename from calibration/EleNewEnergiesProducer/doc/README rename to EleNewEnergiesProducer/doc/README diff --git a/calibration/EleNewEnergiesProducer/elenewenergiesproducer_cfg.py b/EleNewEnergiesProducer/elenewenergiesproducer_cfg.py similarity index 100% rename from calibration/EleNewEnergiesProducer/elenewenergiesproducer_cfg.py rename to EleNewEnergiesProducer/elenewenergiesproducer_cfg.py diff --git a/calibration/EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h b/EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h similarity index 100% rename from calibration/EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h rename to EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h diff --git a/calibration/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py similarity index 100% rename from calibration/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py rename to EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py diff --git a/calibration/EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc b/EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc similarity index 100% rename from calibration/EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc rename to EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc diff --git a/calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc similarity index 100% rename from calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc rename to EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc diff --git a/calibration/EleSelectionProducers/BuildFile.xml b/EleSelectionProducers/BuildFile.xml similarity index 100% rename from calibration/EleSelectionProducers/BuildFile.xml rename to EleSelectionProducers/BuildFile.xml diff --git a/calibration/EleSelectionProducers/eleselectionproducers_cfg.py b/EleSelectionProducers/eleselectionproducers_cfg.py similarity index 100% rename from calibration/EleSelectionProducers/eleselectionproducers_cfg.py rename to EleSelectionProducers/eleselectionproducers_cfg.py diff --git a/calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h similarity index 100% rename from calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h rename to EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h diff --git a/calibration/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py similarity index 100% rename from calibration/EleSelectionProducers/python/eleselectionproducers_cfi.py rename to EleSelectionProducers/python/eleselectionproducers_cfi.py diff --git a/calibration/EleSelectionProducers/src/EleSelectionProducers.cc b/EleSelectionProducers/src/EleSelectionProducers.cc similarity index 100% rename from calibration/EleSelectionProducers/src/EleSelectionProducers.cc rename to EleSelectionProducers/src/EleSelectionProducers.cc diff --git a/calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc b/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc similarity index 100% rename from calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc rename to EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc diff --git a/calibration/JsonFilter/BuildFile.xml b/JsonFilter/BuildFile.xml similarity index 100% rename from calibration/JsonFilter/BuildFile.xml rename to JsonFilter/BuildFile.xml diff --git a/calibration/JsonFilter/python/jsonFilter_cfi.py b/JsonFilter/python/jsonFilter_cfi.py similarity index 100% rename from calibration/JsonFilter/python/jsonFilter_cfi.py rename to JsonFilter/python/jsonFilter_cfi.py diff --git a/calibration/JsonFilter/src/JsonFilter.cc b/JsonFilter/src/JsonFilter.cc similarity index 100% rename from calibration/JsonFilter/src/JsonFilter.cc rename to JsonFilter/src/JsonFilter.cc diff --git a/calibration/README b/README similarity index 100% rename from calibration/README rename to README diff --git a/calibration/ZFitter/BuildFile.xml b/ZFitter/BuildFile.xml similarity index 100% rename from calibration/ZFitter/BuildFile.xml rename to ZFitter/BuildFile.xml diff --git a/calibration/ZFitter/Makefile b/ZFitter/Makefile similarity index 100% rename from calibration/ZFitter/Makefile rename to ZFitter/Makefile diff --git a/calibration/ZFitter/awk/Hgg_resCorr.awk b/ZFitter/awk/Hgg_resCorr.awk similarity index 100% rename from calibration/ZFitter/awk/Hgg_resCorr.awk rename to ZFitter/awk/Hgg_resCorr.awk diff --git a/calibration/ZFitter/awk/format.awk b/ZFitter/awk/format.awk similarity index 100% rename from calibration/ZFitter/awk/format.awk rename to ZFitter/awk/format.awk diff --git a/calibration/ZFitter/awk/newResolution.awk b/ZFitter/awk/newResolution.awk similarity index 100% rename from calibration/ZFitter/awk/newResolution.awk rename to ZFitter/awk/newResolution.awk diff --git a/calibration/ZFitter/awk/recalibOutput.awk b/ZFitter/awk/recalibOutput.awk similarity index 100% rename from calibration/ZFitter/awk/recalibOutput.awk rename to ZFitter/awk/recalibOutput.awk diff --git a/calibration/ZFitter/awk/recalibOutput_H4l.awk b/ZFitter/awk/recalibOutput_H4l.awk similarity index 100% rename from calibration/ZFitter/awk/recalibOutput_H4l.awk rename to ZFitter/awk/recalibOutput_H4l.awk diff --git a/calibration/ZFitter/bin/BuildFile.xml b/ZFitter/bin/BuildFile.xml similarity index 100% rename from calibration/ZFitter/bin/BuildFile.xml rename to ZFitter/bin/BuildFile.xml diff --git a/calibration/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp similarity index 100% rename from calibration/ZFitter/bin/ZFitter.cpp rename to ZFitter/bin/ZFitter.cpp diff --git a/calibration/ZFitter/data/regions/absEta.dat b/ZFitter/data/regions/absEta.dat similarity index 100% rename from calibration/ZFitter/data/regions/absEta.dat rename to ZFitter/data/regions/absEta.dat diff --git a/calibration/ZFitter/data/regions/absEtaSingleEle.dat b/ZFitter/data/regions/absEtaSingleEle.dat similarity index 100% rename from calibration/ZFitter/data/regions/absEtaSingleEle.dat rename to ZFitter/data/regions/absEtaSingleEle.dat diff --git a/calibration/ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat b/ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat similarity index 100% rename from calibration/ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat rename to ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat diff --git a/calibration/ZFitter/data/regions/nHits.dat b/ZFitter/data/regions/nHits.dat similarity index 100% rename from calibration/ZFitter/data/regions/nHits.dat rename to ZFitter/data/regions/nHits.dat diff --git a/calibration/ZFitter/data/regions/refReg.dat b/ZFitter/data/regions/refReg.dat similarity index 100% rename from calibration/ZFitter/data/regions/refReg.dat rename to ZFitter/data/regions/refReg.dat diff --git a/calibration/ZFitter/data/regions/scaleStep0.dat b/ZFitter/data/regions/scaleStep0.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep0.dat rename to ZFitter/data/regions/scaleStep0.dat diff --git a/calibration/ZFitter/data/regions/scaleStep1.dat b/ZFitter/data/regions/scaleStep1.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep1.dat rename to ZFitter/data/regions/scaleStep1.dat diff --git a/calibration/ZFitter/data/regions/scaleStep2.dat b/ZFitter/data/regions/scaleStep2.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep2.dat rename to ZFitter/data/regions/scaleStep2.dat diff --git a/calibration/ZFitter/data/regions/scaleStep2smearing_1.dat b/ZFitter/data/regions/scaleStep2smearing_1.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep2smearing_1.dat rename to ZFitter/data/regions/scaleStep2smearing_1.dat diff --git a/calibration/ZFitter/data/regions/scaleStep2smearing_2.dat b/ZFitter/data/regions/scaleStep2smearing_2.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep2smearing_2.dat rename to ZFitter/data/regions/scaleStep2smearing_2.dat diff --git a/calibration/ZFitter/data/regions/scaleStep3.dat b/ZFitter/data/regions/scaleStep3.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep3.dat rename to ZFitter/data/regions/scaleStep3.dat diff --git a/calibration/ZFitter/data/regions/scaleStep3_withZPt.dat b/ZFitter/data/regions/scaleStep3_withZPt.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep3_withZPt.dat rename to ZFitter/data/regions/scaleStep3_withZPt.dat diff --git a/calibration/ZFitter/data/regions/scaleStep4smearing_1.dat b/ZFitter/data/regions/scaleStep4smearing_1.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep4smearing_1.dat rename to ZFitter/data/regions/scaleStep4smearing_1.dat diff --git a/calibration/ZFitter/data/regions/scaleStep4smearing_2.dat b/ZFitter/data/regions/scaleStep4smearing_2.dat similarity index 100% rename from calibration/ZFitter/data/regions/scaleStep4smearing_2.dat rename to ZFitter/data/regions/scaleStep4smearing_2.dat diff --git a/calibration/ZFitter/data/regions/smearing_energy_EB.dat b/ZFitter/data/regions/smearing_energy_EB.dat similarity index 100% rename from calibration/ZFitter/data/regions/smearing_energy_EB.dat rename to ZFitter/data/regions/smearing_energy_EB.dat diff --git a/calibration/ZFitter/data/regions/smearing_energy_EE.dat b/ZFitter/data/regions/smearing_energy_EE.dat similarity index 100% rename from calibration/ZFitter/data/regions/smearing_energy_EE.dat rename to ZFitter/data/regions/smearing_energy_EE.dat diff --git a/calibration/ZFitter/data/regions/stability.dat b/ZFitter/data/regions/stability.dat similarity index 100% rename from calibration/ZFitter/data/regions/stability.dat rename to ZFitter/data/regions/stability.dat diff --git a/calibration/ZFitter/data/regions/systematics.dat b/ZFitter/data/regions/systematics.dat similarity index 100% rename from calibration/ZFitter/data/regions/systematics.dat rename to ZFitter/data/regions/systematics.dat diff --git a/calibration/ZFitter/data/regions/test.dat b/ZFitter/data/regions/test.dat similarity index 100% rename from calibration/ZFitter/data/regions/test.dat rename to ZFitter/data/regions/test.dat diff --git a/calibration/ZFitter/data/regions/validation.dat b/ZFitter/data/regions/validation.dat similarity index 100% rename from calibration/ZFitter/data/regions/validation.dat rename to ZFitter/data/regions/validation.dat diff --git a/calibration/ZFitter/data/regions/validation_smearing.dat b/ZFitter/data/regions/validation_smearing.dat similarity index 100% rename from calibration/ZFitter/data/regions/validation_smearing.dat rename to ZFitter/data/regions/validation_smearing.dat diff --git a/calibration/ZFitter/data/runRanges/monitoring.dat b/ZFitter/data/runRanges/monitoring.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/monitoring.dat rename to ZFitter/data/runRanges/monitoring.dat diff --git a/calibration/ZFitter/data/runRanges/monitoring2.dat b/ZFitter/data/runRanges/monitoring2.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/monitoring2.dat rename to ZFitter/data/runRanges/monitoring2.dat diff --git a/calibration/ZFitter/data/runRanges/monitoring_2011.dat b/ZFitter/data/runRanges/monitoring_2011.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/monitoring_2011.dat rename to ZFitter/data/runRanges/monitoring_2011.dat diff --git a/calibration/ZFitter/data/runRanges/runPeriods.dat b/ZFitter/data/runRanges/runPeriods.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runPeriods.dat rename to ZFitter/data/runRanges/runPeriods.dat diff --git a/calibration/ZFitter/data/runRanges/runRangeLimits.dat b/ZFitter/data/runRanges/runRangeLimits.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runRangeLimits.dat rename to ZFitter/data/runRanges/runRangeLimits.dat diff --git a/calibration/ZFitter/data/runRanges/runRangePlot.dat b/ZFitter/data/runRanges/runRangePlot.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runRangePlot.dat rename to ZFitter/data/runRanges/runRangePlot.dat diff --git a/calibration/ZFitter/data/runRanges/runRangePlot.txt b/ZFitter/data/runRanges/runRangePlot.txt similarity index 100% rename from calibration/ZFitter/data/runRanges/runRangePlot.txt rename to ZFitter/data/runRanges/runRangePlot.txt diff --git a/calibration/ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat b/ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat rename to ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat diff --git a/calibration/ZFitter/data/runRanges/runranges_ECALpaper2011.dat b/ZFitter/data/runRanges/runranges_ECALpaper2011.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runranges_ECALpaper2011.dat rename to ZFitter/data/runRanges/runranges_ECALpaper2011.dat diff --git a/calibration/ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat b/ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat rename to ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat diff --git a/calibration/ZFitter/data/runRanges/runranges_HCP2012.dat b/ZFitter/data/runRanges/runranges_HCP2012.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runranges_HCP2012.dat rename to ZFitter/data/runRanges/runranges_HCP2012.dat diff --git a/calibration/ZFitter/data/runRanges/runranges_Moriond2013.dat b/ZFitter/data/runRanges/runranges_Moriond2013.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/runranges_Moriond2013.dat rename to ZFitter/data/runRanges/runranges_Moriond2013.dat diff --git a/calibration/ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat b/ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat similarity index 100% rename from calibration/ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat rename to ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat diff --git a/calibration/ZFitter/data/validation/13Jul.dat b/ZFitter/data/validation/13Jul.dat similarity index 100% rename from calibration/ZFitter/data/validation/13Jul.dat rename to ZFitter/data/validation/13Jul.dat diff --git a/calibration/ZFitter/data/validation/16Jan_42X-newGT.dat b/ZFitter/data/validation/16Jan_42X-newGT.dat similarity index 100% rename from calibration/ZFitter/data/validation/16Jan_42X-newGT.dat rename to ZFitter/data/validation/16Jan_42X-newGT.dat diff --git a/calibration/ZFitter/data/validation/16Jan_42X.dat b/ZFitter/data/validation/16Jan_42X.dat similarity index 100% rename from calibration/ZFitter/data/validation/16Jan_42X.dat rename to ZFitter/data/validation/16Jan_42X.dat diff --git a/calibration/ZFitter/data/validation/HCP2012.dat b/ZFitter/data/validation/HCP2012.dat similarity index 100% rename from calibration/ZFitter/data/validation/HCP2012.dat rename to ZFitter/data/validation/HCP2012.dat diff --git a/calibration/ZFitter/data/validation/NewG4.dat b/ZFitter/data/validation/NewG4.dat similarity index 100% rename from calibration/ZFitter/data/validation/NewG4.dat rename to ZFitter/data/validation/NewG4.dat diff --git a/calibration/ZFitter/data/validation/NewG4X0Max.dat b/ZFitter/data/validation/NewG4X0Max.dat similarity index 100% rename from calibration/ZFitter/data/validation/NewG4X0Max.dat rename to ZFitter/data/validation/NewG4X0Max.dat diff --git a/calibration/ZFitter/data/validation/RUNC.dat b/ZFitter/data/validation/RUNC.dat similarity index 100% rename from calibration/ZFitter/data/validation/RUNC.dat rename to ZFitter/data/validation/RUNC.dat diff --git a/calibration/ZFitter/data/validation/Winter13-powheg.dat b/ZFitter/data/validation/Winter13-powheg.dat similarity index 100% rename from calibration/ZFitter/data/validation/Winter13-powheg.dat rename to ZFitter/data/validation/Winter13-powheg.dat diff --git a/calibration/ZFitter/data/validation/monitoring_2012_53X.dat b/ZFitter/data/validation/monitoring_2012_53X.dat similarity index 100% rename from calibration/ZFitter/data/validation/monitoring_2012_53X.dat rename to ZFitter/data/validation/monitoring_2012_53X.dat diff --git a/calibration/ZFitter/data/validation/moriond2013.dat b/ZFitter/data/validation/moriond2013.dat similarity index 100% rename from calibration/ZFitter/data/validation/moriond2013.dat rename to ZFitter/data/validation/moriond2013.dat diff --git a/calibration/ZFitter/data/validation/moriond2013Checks.dat b/ZFitter/data/validation/moriond2013Checks.dat similarity index 100% rename from calibration/ZFitter/data/validation/moriond2013Checks.dat rename to ZFitter/data/validation/moriond2013Checks.dat diff --git a/calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat diff --git a/calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat b/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat rename to ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat b/ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat rename to ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat diff --git a/calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat b/ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat rename to ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat diff --git a/calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat b/ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat rename to ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat diff --git a/calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat b/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat rename to ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat diff --git a/calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat b/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat rename to ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat diff --git a/calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat b/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat rename to ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat b/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat b/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat b/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat rename to ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat b/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat rename to ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat b/ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat rename to ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat b/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat rename to ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat b/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat rename to ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat diff --git a/calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat diff --git a/calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat diff --git a/calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat diff --git a/calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat diff --git a/calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat diff --git a/calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat diff --git a/calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat diff --git a/calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat diff --git a/calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat b/ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat rename to ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat b/ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat rename to ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/Winter13.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/Winter13.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat b/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat rename to ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat b/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat rename to ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat diff --git a/calibration/ZFitter/data/validation/rereco/ungrouped/test.dat b/ZFitter/data/validation/rereco/ungrouped/test.dat similarity index 100% rename from calibration/ZFitter/data/validation/rereco/ungrouped/test.dat rename to ZFitter/data/validation/rereco/ungrouped/test.dat diff --git a/calibration/ZFitter/data/validation/test.dat b/ZFitter/data/validation/test.dat similarity index 100% rename from calibration/ZFitter/data/validation/test.dat rename to ZFitter/data/validation/test.dat diff --git a/calibration/ZFitter/doc/Hgg_systematics.txt b/ZFitter/doc/Hgg_systematics.txt similarity index 100% rename from calibration/ZFitter/doc/Hgg_systematics.txt rename to ZFitter/doc/Hgg_systematics.txt diff --git a/calibration/ZFitter/doc/README b/ZFitter/doc/README similarity index 100% rename from calibration/ZFitter/doc/README rename to ZFitter/doc/README diff --git a/calibration/ZFitter/interface/BW_CB_pdf_class.hh b/ZFitter/interface/BW_CB_pdf_class.hh similarity index 100% rename from calibration/ZFitter/interface/BW_CB_pdf_class.hh rename to ZFitter/interface/BW_CB_pdf_class.hh diff --git a/calibration/ZFitter/interface/Cruijff_pdf_class.hh b/ZFitter/interface/Cruijff_pdf_class.hh similarity index 100% rename from calibration/ZFitter/interface/Cruijff_pdf_class.hh rename to ZFitter/interface/Cruijff_pdf_class.hh diff --git a/calibration/ZFitter/interface/ElectronCategory_class.hh b/ZFitter/interface/ElectronCategory_class.hh similarity index 100% rename from calibration/ZFitter/interface/ElectronCategory_class.hh rename to ZFitter/interface/ElectronCategory_class.hh diff --git a/calibration/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h similarity index 100% rename from calibration/ZFitter/interface/EnergyScaleCorrection_class.h rename to ZFitter/interface/EnergyScaleCorrection_class.h diff --git a/calibration/ZFitter/interface/RooCruijff.hh b/ZFitter/interface/RooCruijff.hh similarity index 100% rename from calibration/ZFitter/interface/RooCruijff.hh rename to ZFitter/interface/RooCruijff.hh diff --git a/calibration/ZFitter/interface/RooMinimizer.hh b/ZFitter/interface/RooMinimizer.hh similarity index 100% rename from calibration/ZFitter/interface/RooMinimizer.hh rename to ZFitter/interface/RooMinimizer.hh diff --git a/calibration/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh similarity index 100% rename from calibration/ZFitter/interface/RooSmearer.hh rename to ZFitter/interface/RooSmearer.hh diff --git a/calibration/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh similarity index 100% rename from calibration/ZFitter/interface/SmearingImporter.hh rename to ZFitter/interface/SmearingImporter.hh diff --git a/calibration/ZFitter/interface/ZFit_class.hh b/ZFitter/interface/ZFit_class.hh similarity index 100% rename from calibration/ZFitter/interface/ZFit_class.hh rename to ZFitter/interface/ZFit_class.hh diff --git a/calibration/ZFitter/interface/ZeeEvent.hh b/ZFitter/interface/ZeeEvent.hh similarity index 100% rename from calibration/ZFitter/interface/ZeeEvent.hh rename to ZFitter/interface/ZeeEvent.hh diff --git a/calibration/ZFitter/interface/addBranch_class.hh b/ZFitter/interface/addBranch_class.hh similarity index 100% rename from calibration/ZFitter/interface/addBranch_class.hh rename to ZFitter/interface/addBranch_class.hh diff --git a/calibration/ZFitter/interface/puWeights_class.hh b/ZFitter/interface/puWeights_class.hh similarity index 100% rename from calibration/ZFitter/interface/puWeights_class.hh rename to ZFitter/interface/puWeights_class.hh diff --git a/calibration/ZFitter/interface/r9Weights_class.hh b/ZFitter/interface/r9Weights_class.hh similarity index 100% rename from calibration/ZFitter/interface/r9Weights_class.hh rename to ZFitter/interface/r9Weights_class.hh diff --git a/calibration/ZFitter/interface/runDivide_class.hh b/ZFitter/interface/runDivide_class.hh similarity index 100% rename from calibration/ZFitter/interface/runDivide_class.hh rename to ZFitter/interface/runDivide_class.hh diff --git a/calibration/ZFitter/interface/setTDRStyle.hh b/ZFitter/interface/setTDRStyle.hh similarity index 100% rename from calibration/ZFitter/interface/setTDRStyle.hh rename to ZFitter/interface/setTDRStyle.hh diff --git a/calibration/ZFitter/macro/Hgg_systematic_plots.C b/ZFitter/macro/Hgg_systematic_plots.C similarity index 100% rename from calibration/ZFitter/macro/Hgg_systematic_plots.C rename to ZFitter/macro/Hgg_systematic_plots.C diff --git a/calibration/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C similarity index 100% rename from calibration/ZFitter/macro/PlotDataMC.C rename to ZFitter/macro/PlotDataMC.C diff --git a/calibration/ZFitter/macro/macro_fit.C b/ZFitter/macro/macro_fit.C similarity index 100% rename from calibration/ZFitter/macro/macro_fit.C rename to ZFitter/macro/macro_fit.C diff --git a/calibration/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C similarity index 100% rename from calibration/ZFitter/macro/mcmcDraw.C rename to ZFitter/macro/mcmcDraw.C diff --git a/calibration/ZFitter/macro/new_branch.C b/ZFitter/macro/new_branch.C similarity index 100% rename from calibration/ZFitter/macro/new_branch.C rename to ZFitter/macro/new_branch.C diff --git a/calibration/ZFitter/macro/periods.C b/ZFitter/macro/periods.C similarity index 100% rename from calibration/ZFitter/macro/periods.C rename to ZFitter/macro/periods.C diff --git a/calibration/ZFitter/macro/periodsPlot.C b/ZFitter/macro/periodsPlot.C similarity index 100% rename from calibration/ZFitter/macro/periodsPlot.C rename to ZFitter/macro/periodsPlot.C diff --git a/calibration/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C similarity index 100% rename from calibration/ZFitter/macro/plot_data_mc.C rename to ZFitter/macro/plot_data_mc.C diff --git a/calibration/ZFitter/macro/propaganda_plot.C b/ZFitter/macro/propaganda_plot.C similarity index 100% rename from calibration/ZFitter/macro/propaganda_plot.C rename to ZFitter/macro/propaganda_plot.C diff --git a/calibration/ZFitter/macro/propaganda_plot2.C b/ZFitter/macro/propaganda_plot2.C similarity index 100% rename from calibration/ZFitter/macro/propaganda_plot2.C rename to ZFitter/macro/propaganda_plot2.C diff --git a/calibration/ZFitter/macro/quantile.cc b/ZFitter/macro/quantile.cc similarity index 100% rename from calibration/ZFitter/macro/quantile.cc rename to ZFitter/macro/quantile.cc diff --git a/calibration/ZFitter/macro/sigmaE_plot.C b/ZFitter/macro/sigmaE_plot.C similarity index 100% rename from calibration/ZFitter/macro/sigmaE_plot.C rename to ZFitter/macro/sigmaE_plot.C diff --git a/calibration/ZFitter/macro/stability.C b/ZFitter/macro/stability.C similarity index 100% rename from calibration/ZFitter/macro/stability.C rename to ZFitter/macro/stability.C diff --git a/calibration/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C similarity index 100% rename from calibration/ZFitter/macro/standardDataMC.C rename to ZFitter/macro/standardDataMC.C diff --git a/calibration/ZFitter/macro/standardMCMC.C b/ZFitter/macro/standardMCMC.C similarity index 100% rename from calibration/ZFitter/macro/standardMCMC.C rename to ZFitter/macro/standardMCMC.C diff --git a/calibration/ZFitter/script/CalcResCorrection.sh b/ZFitter/script/CalcResCorrection.sh similarity index 100% rename from calibration/ZFitter/script/CalcResCorrection.sh rename to ZFitter/script/CalcResCorrection.sh diff --git a/calibration/ZFitter/script/FitResultTostep2.sh b/ZFitter/script/FitResultTostep2.sh similarity index 100% rename from calibration/ZFitter/script/FitResultTostep2.sh rename to ZFitter/script/FitResultTostep2.sh diff --git a/calibration/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh similarity index 100% rename from calibration/ZFitter/script/GenRootChain.sh rename to ZFitter/script/GenRootChain.sh diff --git a/calibration/ZFitter/script/compareColumns.sh b/ZFitter/script/compareColumns.sh similarity index 100% rename from calibration/ZFitter/script/compareColumns.sh rename to ZFitter/script/compareColumns.sh diff --git a/calibration/ZFitter/script/dataPU.sh b/ZFitter/script/dataPU.sh similarity index 100% rename from calibration/ZFitter/script/dataPU.sh rename to ZFitter/script/dataPU.sh diff --git a/calibration/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh similarity index 100% rename from calibration/ZFitter/script/energyScale.sh rename to ZFitter/script/energyScale.sh diff --git a/calibration/ZFitter/script/formatTable.sh b/ZFitter/script/formatTable.sh similarity index 100% rename from calibration/ZFitter/script/formatTable.sh rename to ZFitter/script/formatTable.sh diff --git a/calibration/ZFitter/script/justOnce/materialStudy.sh b/ZFitter/script/justOnce/materialStudy.sh similarity index 100% rename from calibration/ZFitter/script/justOnce/materialStudy.sh rename to ZFitter/script/justOnce/materialStudy.sh diff --git a/calibration/ZFitter/script/justOnce/materialStudyPlot.sh b/ZFitter/script/justOnce/materialStudyPlot.sh similarity index 100% rename from calibration/ZFitter/script/justOnce/materialStudyPlot.sh rename to ZFitter/script/justOnce/materialStudyPlot.sh diff --git a/calibration/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh similarity index 100% rename from calibration/ZFitter/script/justOnce/smearing.sh rename to ZFitter/script/justOnce/smearing.sh diff --git a/calibration/ZFitter/script/makeCorrVsRunNumber.py b/ZFitter/script/makeCorrVsRunNumber.py similarity index 100% rename from calibration/ZFitter/script/makeCorrVsRunNumber.py rename to ZFitter/script/makeCorrVsRunNumber.py diff --git a/calibration/ZFitter/script/makeTable.sh b/ZFitter/script/makeTable.sh similarity index 100% rename from calibration/ZFitter/script/makeTable.sh rename to ZFitter/script/makeTable.sh diff --git a/calibration/ZFitter/script/makeValidationSlides.sh b/ZFitter/script/makeValidationSlides.sh similarity index 100% rename from calibration/ZFitter/script/makeValidationSlides.sh rename to ZFitter/script/makeValidationSlides.sh diff --git a/calibration/ZFitter/script/makehtml.py b/ZFitter/script/makehtml.py similarity index 100% rename from calibration/ZFitter/script/makehtml.py rename to ZFitter/script/makehtml.py diff --git a/calibration/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh similarity index 100% rename from calibration/ZFitter/script/monitoring_validation.sh rename to ZFitter/script/monitoring_validation.sh diff --git a/calibration/ZFitter/script/publish.sh b/ZFitter/script/publish.sh similarity index 100% rename from calibration/ZFitter/script/publish.sh rename to ZFitter/script/publish.sh diff --git a/calibration/ZFitter/script/report.sh b/ZFitter/script/report.sh similarity index 100% rename from calibration/ZFitter/script/report.sh rename to ZFitter/script/report.sh diff --git a/calibration/ZFitter/script/selEff.sh b/ZFitter/script/selEff.sh similarity index 100% rename from calibration/ZFitter/script/selEff.sh rename to ZFitter/script/selEff.sh diff --git a/calibration/ZFitter/script/slidesFunctions.sh b/ZFitter/script/slidesFunctions.sh similarity index 100% rename from calibration/ZFitter/script/slidesFunctions.sh rename to ZFitter/script/slidesFunctions.sh diff --git a/calibration/ZFitter/script/stability.sh b/ZFitter/script/stability.sh similarity index 100% rename from calibration/ZFitter/script/stability.sh rename to ZFitter/script/stability.sh diff --git a/calibration/ZFitter/script/systematics.sh b/ZFitter/script/systematics.sh similarity index 100% rename from calibration/ZFitter/script/systematics.sh rename to ZFitter/script/systematics.sh diff --git a/calibration/ZFitter/script/tex2txt.sh b/ZFitter/script/tex2txt.sh similarity index 100% rename from calibration/ZFitter/script/tex2txt.sh rename to ZFitter/script/tex2txt.sh diff --git a/calibration/ZFitter/script/validation.sh b/ZFitter/script/validation.sh similarity index 100% rename from calibration/ZFitter/script/validation.sh rename to ZFitter/script/validation.sh diff --git a/calibration/ZFitter/sed/run2time.sed b/ZFitter/sed/run2time.sed similarity index 100% rename from calibration/ZFitter/sed/run2time.sed rename to ZFitter/sed/run2time.sed diff --git a/calibration/ZFitter/sed/tex.sed b/ZFitter/sed/tex.sed similarity index 100% rename from calibration/ZFitter/sed/tex.sed rename to ZFitter/sed/tex.sed diff --git a/calibration/ZFitter/src/BW_CB_pdf_class.cc b/ZFitter/src/BW_CB_pdf_class.cc similarity index 100% rename from calibration/ZFitter/src/BW_CB_pdf_class.cc rename to ZFitter/src/BW_CB_pdf_class.cc diff --git a/calibration/ZFitter/src/Cruijff_pdf_class.cc b/ZFitter/src/Cruijff_pdf_class.cc similarity index 100% rename from calibration/ZFitter/src/Cruijff_pdf_class.cc rename to ZFitter/src/Cruijff_pdf_class.cc diff --git a/calibration/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc similarity index 100% rename from calibration/ZFitter/src/ElectronCategory_class.cc rename to ZFitter/src/ElectronCategory_class.cc diff --git a/calibration/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc similarity index 100% rename from calibration/ZFitter/src/EnergyScaleCorrection_class.cc rename to ZFitter/src/EnergyScaleCorrection_class.cc diff --git a/calibration/ZFitter/src/RooCruijff.cc b/ZFitter/src/RooCruijff.cc similarity index 100% rename from calibration/ZFitter/src/RooCruijff.cc rename to ZFitter/src/RooCruijff.cc diff --git a/calibration/ZFitter/src/RooMinimizer.cxx b/ZFitter/src/RooMinimizer.cxx similarity index 100% rename from calibration/ZFitter/src/RooMinimizer.cxx rename to ZFitter/src/RooMinimizer.cxx diff --git a/calibration/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc similarity index 100% rename from calibration/ZFitter/src/RooSmearer.cc rename to ZFitter/src/RooSmearer.cc diff --git a/calibration/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc similarity index 100% rename from calibration/ZFitter/src/SmearingImporter.cc rename to ZFitter/src/SmearingImporter.cc diff --git a/calibration/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc similarity index 100% rename from calibration/ZFitter/src/ZFit_class.cc rename to ZFitter/src/ZFit_class.cc diff --git a/calibration/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc similarity index 100% rename from calibration/ZFitter/src/addBranch_class.cc rename to ZFitter/src/addBranch_class.cc diff --git a/calibration/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc similarity index 100% rename from calibration/ZFitter/src/nllProfile.cc rename to ZFitter/src/nllProfile.cc diff --git a/calibration/ZFitter/src/puWeights_class.cc b/ZFitter/src/puWeights_class.cc similarity index 100% rename from calibration/ZFitter/src/puWeights_class.cc rename to ZFitter/src/puWeights_class.cc diff --git a/calibration/ZFitter/src/r9Weights_class.cc b/ZFitter/src/r9Weights_class.cc similarity index 100% rename from calibration/ZFitter/src/r9Weights_class.cc rename to ZFitter/src/r9Weights_class.cc diff --git a/calibration/ZFitter/src/runDivide_class.cc b/ZFitter/src/runDivide_class.cc similarity index 100% rename from calibration/ZFitter/src/runDivide_class.cc rename to ZFitter/src/runDivide_class.cc diff --git a/calibration/ZFitter/src/setTDRStyle.C b/ZFitter/src/setTDRStyle.C similarity index 100% rename from calibration/ZFitter/src/setTDRStyle.C rename to ZFitter/src/setTDRStyle.C diff --git a/calibration/ZFitter/test/launch.sh b/ZFitter/test/launch.sh similarity index 100% rename from calibration/ZFitter/test/launch.sh rename to ZFitter/test/launch.sh diff --git a/calibration/ZFitter/test/runDivide_macro.C b/ZFitter/test/runDivide_macro.C similarity index 100% rename from calibration/ZFitter/test/runDivide_macro.C rename to ZFitter/test/runDivide_macro.C diff --git a/calibration/ZFitter/test/test.cpp b/ZFitter/test/test.cpp similarity index 100% rename from calibration/ZFitter/test/test.cpp rename to ZFitter/test/test.cpp diff --git a/calibration/ZFitter/tex/FitSlides_template.tex b/ZFitter/tex/FitSlides_template.tex similarity index 100% rename from calibration/ZFitter/tex/FitSlides_template.tex rename to ZFitter/tex/FitSlides_template.tex diff --git a/calibration/ZFitter/tex/fitSlides.tex b/ZFitter/tex/fitSlides.tex similarity index 100% rename from calibration/ZFitter/tex/fitSlides.tex rename to ZFitter/tex/fitSlides.tex diff --git a/calibration/ZFitter/tex/stabilitySlides.tex b/ZFitter/tex/stabilitySlides.tex similarity index 100% rename from calibration/ZFitter/tex/stabilitySlides.tex rename to ZFitter/tex/stabilitySlides.tex diff --git a/calibration/ZFitter/tex/tableSlides.tex b/ZFitter/tex/tableSlides.tex similarity index 100% rename from calibration/ZFitter/tex/tableSlides.tex rename to ZFitter/tex/tableSlides.tex diff --git a/calibration/ZNtupleDumper/BuildFile.xml b/ZNtupleDumper/BuildFile.xml similarity index 100% rename from calibration/ZNtupleDumper/BuildFile.xml rename to ZNtupleDumper/BuildFile.xml diff --git a/calibration/ZNtupleDumper/doc/README b/ZNtupleDumper/doc/README similarity index 100% rename from calibration/ZNtupleDumper/doc/README rename to ZNtupleDumper/doc/README diff --git a/calibration/ZNtupleDumper/interface/readJsonFile.h b/ZNtupleDumper/interface/readJsonFile.h similarity index 100% rename from calibration/ZNtupleDumper/interface/readJsonFile.h rename to ZNtupleDumper/interface/readJsonFile.h diff --git a/calibration/ZNtupleDumper/macro/nPV_dataMC_plot.C b/ZNtupleDumper/macro/nPV_dataMC_plot.C similarity index 100% rename from calibration/ZNtupleDumper/macro/nPV_dataMC_plot.C rename to ZNtupleDumper/macro/nPV_dataMC_plot.C diff --git a/calibration/ZNtupleDumper/python/elePat_cfi.py b/ZNtupleDumper/python/elePat_cfi.py similarity index 100% rename from calibration/ZNtupleDumper/python/elePat_cfi.py rename to ZNtupleDumper/python/elePat_cfi.py diff --git a/calibration/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py similarity index 100% rename from calibration/ZNtupleDumper/python/patSequence_cff.py rename to ZNtupleDumper/python/patSequence_cff.py diff --git a/calibration/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py similarity index 100% rename from calibration/ZNtupleDumper/python/zntupledumper_cfi.py rename to ZNtupleDumper/python/zntupledumper_cfi.py diff --git a/calibration/ZNtupleDumper/script/mcPUweights.sh b/ZNtupleDumper/script/mcPUweights.sh similarity index 100% rename from calibration/ZNtupleDumper/script/mcPUweights.sh rename to ZNtupleDumper/script/mcPUweights.sh diff --git a/calibration/ZNtupleDumper/script/puWeightTree.sh b/ZNtupleDumper/script/puWeightTree.sh similarity index 100% rename from calibration/ZNtupleDumper/script/puWeightTree.sh rename to ZNtupleDumper/script/puWeightTree.sh diff --git a/calibration/ZNtupleDumper/script/puWeights.sh b/ZNtupleDumper/script/puWeights.sh similarity index 100% rename from calibration/ZNtupleDumper/script/puWeights.sh rename to ZNtupleDumper/script/puWeights.sh diff --git a/calibration/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc similarity index 100% rename from calibration/ZNtupleDumper/src/ZNtupleDumper.cc rename to ZNtupleDumper/src/ZNtupleDumper.cc diff --git a/calibration/ZNtupleDumper/src/readJsonFile.cc b/ZNtupleDumper/src/readJsonFile.cc similarity index 100% rename from calibration/ZNtupleDumper/src/readJsonFile.cc rename to ZNtupleDumper/src/readJsonFile.cc diff --git a/calibration/fulldoc b/fulldoc similarity index 100% rename from calibration/fulldoc rename to fulldoc diff --git a/calibration/setup.sh b/setup.sh similarity index 100% rename from calibration/setup.sh rename to setup.sh From ec303d0b4db96fe82a94bcc6d1b07985a6fb40d0 Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 30 Jun 2013 23:49:19 +0200 Subject: [PATCH 004/475] electronRef used in selector, but does not work --- ...SimpleCutBasedElectronIDSelectionFunctor.h | 53 ++++++++++--------- .../python/eleselectionproducers_cfi.py | 11 ++-- .../src/EleSelectionProducers.cc | 20 +++---- 3 files changed, 43 insertions(+), 41 deletions(-) diff --git a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index f3325d07073..39f41884a8c 100644 --- a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -44,12 +44,8 @@ #include "DataFormats/EcalRecHit/interface/EcalRecHit.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -// //#include "Calibration/EcalCalibAlgos/interface/ElectronCalibAnalyzer.h" +#include "EgammaAnalysis/ElectronTools/interface/ElectronEffectiveArea.h" -#define REGRESSION -//#define REGRESSIONv3 -//#define REGRESSIONv2 -//#define REGRESSIONv1 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h" #include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h" @@ -126,7 +122,7 @@ Strongly modified by Shervin */ -class SimpleCutBasedElectronIDSelectionFunctor : public Selector { +class SimpleCutBasedElectronIDSelectionFunctor : public Selector { public: // interface @@ -185,19 +181,21 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector& electronsHandle, const edm::Handle& ConversionsHandle, const edm::Handle& BeamSpotHandle, const edm::Handle& VertexHandle, - edm::Handle< edm::ValueMap >& chIsoValsHandle, - edm::Handle< edm::ValueMap >& emIsoValsHandle, - edm::Handle< edm::ValueMap >& nhIsoValsHandle, + const edm::Handle< edm::ValueMap >& chIsoValsHandle, + const edm::Handle< edm::ValueMap >& emIsoValsHandle, + const edm::Handle< edm::ValueMap >& nhIsoValsHandle, const edm::Handle& rhoHandle): + electronsHandle_(electronsHandle), ConversionsHandle_(ConversionsHandle), BeamSpotHandle_(BeamSpotHandle), VertexHandle_(VertexHandle), - chIsoValsHandle_(chIsoHandle), - emIsoValsHandle_(emIsoHandle), - nhIsoValsHandle_(nhIsoHandle), + chIsoValsHandle_(chIsoValsHandle), + emIsoValsHandle_(emIsoValsHandle), + nhIsoValsHandle_(nhIsoValsHandle), rhoHandle_(rhoHandle) { Version_t version=NONE; @@ -381,7 +379,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector::operator(); + using Selector::operator(); // function with the Spring10 variable definitions bool WPxx_PU( const reco::GsfElectronRef electronRef, pat::strbitset& ret) { - reco:GsfElectron& electron = *electronRef; + const reco::GsfElectron electron = *electronRef; // ret.set(false); // effective areas @@ -425,7 +423,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selectorenergy() *sin(electron.superCluster()->position().theta()); Double_t trackIso = electron.dr03TkSumPt()/eleET; Double_t ecalIso = electron.dr03EcalRecHitSumEt()/eleET; @@ -436,25 +434,24 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selectorsize() > 0) { reco::VertexRef vtx(VertexHandle_, 0); - d0vtx = ele.gsfTrack()->dxy(vtx->position()); - dzvtx = ele.gsfTrack()->dz(vtx->position()); + d0vtx = electron.gsfTrack()->dxy(vtx->position()); + dzvtx = electron.gsfTrack()->dz(vtx->position()); } else { - d0vtx = ele.gsfTrack()->dxy(); - dzvtx = ele.gsfTrack()->dz(); + d0vtx = electron.gsfTrack()->dxy(); + dzvtx = electron.gsfTrack()->dz(); } // get particle flow isolation - double iso_ch = chIsoValsHandle_[ele]; - double iso_em = emIsoValsHandle_[ele]; - double iso_nh = nhIsoValsHandle_[ele]; + double iso_ch = 0;// (*chIsoValsHandle_)[electron]; + double iso_em = 0;// (*emIsoValsHandle_)[electron]; + double iso_nh = 0;// (*nhIsoValsHandle_)[electron]; // apply to neutrals double rhoPrime = std::max(*rhoHandle_, 0.0); @@ -610,10 +607,14 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector& electronsHandle_; const edm::Handle& ConversionsHandle_; const edm::Handle& BeamSpotHandle_; + const edm::Handle& VertexHandle_; + const edm::Handle< edm::ValueMap >& chIsoValsHandle_; + const edm::Handle< edm::ValueMap >& emIsoValsHandle_; + const edm::Handle< edm::ValueMap >& nhIsoValsHandle_; const edm::Handle& rhoHandle_; - }; diff --git a/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py index 27da36791ef..3805c1a5673 100644 --- a/EleSelectionProducers/python/eleselectionproducers_cfi.py +++ b/EleSelectionProducers/python/eleselectionproducers_cfi.py @@ -5,10 +5,11 @@ #recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB", "ALCARECO"), #recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE", "ALCARECO"), rhoFastJet = cms.InputTag('kt6PFJetsForRhoCorrection',"rho"), - #vertexCollection = cms.InputTag('offlinePrimaryVerticesWithBS'), + vertexCollection = cms.InputTag('offlinePrimaryVertices'), conversionCollection = cms.InputTag('allConversions'), - BeamSpotCollection = cms.InputTag('offlineBeamSpot') - - -) + BeamSpotCollection = cms.InputTag('offlineBeamSpot'), + chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), + emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), + nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso') + ) diff --git a/EleSelectionProducers/src/EleSelectionProducers.cc b/EleSelectionProducers/src/EleSelectionProducers.cc index 5fa5500ad01..a66f93ac5b0 100644 --- a/EleSelectionProducers/src/EleSelectionProducers.cc +++ b/EleSelectionProducers/src/EleSelectionProducers.cc @@ -107,20 +107,20 @@ EleSelectionProducers::EleSelectionProducers(const edm::ParameterSet& iConfig): nhIsoValsTAG(iConfig.getParameter("nhIsoVals")), rhoTAG(iConfig.getParameter("rhoFastJet")), - fiducial_selector("fiducial", conversionsHandle, bsHandle, + fiducial_selector("fiducial", electronsHandle, conversionsHandle, bsHandle, vertexHandle, chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), - WP70_PU_selector("WP70PU", conversionsHandle, bsHandle, + WP70_PU_selector("WP70PU", electronsHandle, conversionsHandle, bsHandle, vertexHandle, chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), - WP80_PU_selector("WP80PU", conversionsHandle, bsHandle, + WP80_PU_selector("WP80PU", electronsHandle, conversionsHandle, bsHandle, vertexHandle, chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), - WP90_PU_selector("WP90PU", conversionsHandle, bsHandle, + WP90_PU_selector("WP90PU", electronsHandle, conversionsHandle, bsHandle, vertexHandle, chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), - loose_selector("loose", conversionsHandle, bsHandle, + loose_selector("loose", electronsHandle, conversionsHandle, bsHandle, vertexHandle, chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), - medium_selector("medium", conversionsHandle, bsHandle, - chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), - tight_selector("tight", conversionsHandle, bsHandle, + medium_selector("medium", electronsHandle, conversionsHandle, bsHandle, vertexHandle, chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + tight_selector("tight", electronsHandle, conversionsHandle, bsHandle, vertexHandle, + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle) { //register your products /* Examples @@ -205,7 +205,7 @@ void EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& i #endif for(reco::GsfElectronCollection::const_iterator ele_itr = (electronsHandle)->begin(); ele_itr != (electronsHandle)->end(); ele_itr++){ - reco::GsfElectronRef eleRef(electronsHandle, ele_itr-electronsHandle->begin()); + const reco::GsfElectronRef eleRef(electronsHandle, ele_itr-electronsHandle->begin()); // the new tree has one event per each electron pat::strbitset fiducial_ret; @@ -217,7 +217,7 @@ void EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& i pat::strbitset tight_ret; - fiducial_selector(eleRef, fiducial_ret); + fiducial_selector.PassCut(eleRef, fiducial_ret); fiducial_vec.push_back(fiducial_selector.result()); WP70_PU_selector(eleRef, WP70_PU_ret); From 0ecd5b3a21e2b356c11ccdff61a8615fc89ec942 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 1 Jul 2013 00:38:02 +0200 Subject: [PATCH 005/475] fixed compilation --- .../interface/SimpleCutBasedElectronIDSelectionFunctor.h | 2 +- EleSelectionProducers/src/EleSelectionProducers.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index 39f41884a8c..ee67f81bf66 100644 --- a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -379,7 +379,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector Date: Mon, 1 Jul 2013 02:14:08 +0200 Subject: [PATCH 006/475] fixing and testing selection --- ...SimpleCutBasedElectronIDSelectionFunctor.h | 69 ++++++++++++++++--- 1 file changed, 60 insertions(+), 9 deletions(-) diff --git a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index ee67f81bf66..9857fc9be7a 100644 --- a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -1,7 +1,7 @@ #ifndef SimpleCutBasedElectronIDSelectionFunctorShervin_h #define SimpleCutBasedElectronIDSelectionFunctorShervin_h -//#define DEBUG +#define DEBUG #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -209,6 +209,9 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector cut("pfmva_EB", double()) || ignoreCut("pfmva_EB") ) passCut(retInternal_, "pfmva_EB"); @@ -514,7 +560,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector=20){ - if(iso < cut("pfIso_EB", double()) || ignoreCut("pfIso_EB") ) + if( ignoreCut("pfIso_EB") || iso < cut("pfIso_EB", double())) passCut(retInternal_, "pfIso_EB"); passCut(retInternal_, "pfIsoLowPt_EB"); }else{ @@ -538,13 +584,14 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector cut("pfmva_EE", double()) || ignoreCut("pfmva_EE") ) passCut(retInternal_, "pfmva_EE"); @@ -582,11 +629,15 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector Date: Mon, 1 Jul 2013 11:30:58 +0200 Subject: [PATCH 008/475] added commits in svn until r1752 with PUDumper --- ALCARAW_RECO/BuildFile.xml | 1 + .../reRecoTags/Cal_Jun2013_AlphaComb_v1.py | 30 + .../reRecoTags/Cal_Jun2013_AlphaComb_v2.py | 34 + ALCARAW_RECO/doc/alcaraw.dump | 31 + ALCARAW_RECO/interface/PUDumper.h | 50 + ALCARAW_RECO/src/PUDumper.cc | 59 ++ ...SimpleCutBasedElectronIDSelectionFunctor.h | 26 +- ZFitter/data/regions/nHits.dat | 11 + ZFitter/data/regions/scaleStep4smearing_1.dat | 8 + ZFitter/data/regions/scaleStep4smearing_2.dat | 6 + ZFitter/data/runRanges/runPeriods.dat | 8 + ZFitter/data/validation/16Jan_42X-newGT.dat | 8 + .../Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat | 10 + .../Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat | 12 + ZFitter/interface/RooMinimizer.hh | 126 +++ ZFitter/macro/periods.C | 50 + ZFitter/macro/periodsPlot.C | 45 + ZFitter/macro/standardMCMC.C | 103 ++ ZFitter/script/FitResultTostep2.sh | 13 + ZFitter/script/justOnce/smearing.sh | 34 + ZFitter/script/selEff.sh | 57 ++ ZFitter/src/RooMinimizer.cxx | 887 ++++++++++++++++++ 22 files changed, 1596 insertions(+), 13 deletions(-) create mode 100644 ALCARAW_RECO/interface/PUDumper.h create mode 100644 ALCARAW_RECO/src/PUDumper.cc diff --git a/ALCARAW_RECO/BuildFile.xml b/ALCARAW_RECO/BuildFile.xml index 2745052161b..c0a6cd17b8d 100644 --- a/ALCARAW_RECO/BuildFile.xml +++ b/ALCARAW_RECO/BuildFile.xml @@ -1,3 +1,4 @@ + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py index 65c683b7b37..dff20a00b19 100644 --- a/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py @@ -28,3 +28,33 @@ ) +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +#### Please fill with comments +#tag di alpha che ha nel barrel il valore ottenuto dalla media pesata +#di alpha dei pi0, di Eflow e di EsuP , previa aver riscalato tutte le +#alpha ad avere la stessa media che Eflow. +#Per i cinesi ho preso il valore di Eflow ma mediato sui cinesi di +#quel SM, perche` non tutti i SM hanno alpha 1.52 per i cinesi. +#questo tag contiene per quasi tutti i SM il valore 1.52 eccetto per +#quelli patologici. + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), #22Jan rereco (RUND) + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string('EcalADCToGeVConstant_Bon_V20111129'), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20120620_piZPhiSEtaScale2012_IOV2_AlphaStudies'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py index fa1435bbc46..aca23fa7a22 100644 --- a/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py @@ -32,3 +32,37 @@ ) +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +#### Please fill with comments +#tag di alpha che ha nel barrel il valore ottenuto dalla media pesata +#di alpha dei pi0, di Eflow e di EsuP , previa aver riscalato tutte le +#alpha ad avere la stessa media che Eflow. +#Per i cinesi ho preso il valore di Eflow ma mediato sui cinesi di +#quel SM, perche` non tutti i SM hanno alpha 1.52 per i cinesi. +#questo tag contiene per quasi tutti i SM il valore 1.52 eccetto per +#quelli patologici. + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), #22Jan rereco (RUND) + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string('EcalADCToGeVConstant_Bon_V20111129'), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_2012avgps_EE_sic1_btcp116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ), + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20120620_piZPhiSEtaScale2012_IOV2_AlphaStudies'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + + diff --git a/ALCARAW_RECO/doc/alcaraw.dump b/ALCARAW_RECO/doc/alcaraw.dump index 58108b76958..bb51934f7d3 100644 --- a/ALCARAW_RECO/doc/alcaraw.dump +++ b/ALCARAW_RECO/doc/alcaraw.dump @@ -29,3 +29,34 @@ set "ecalDetIdToBeRecovered" "eeFE" set "ecalDetIdToBeRecovered" "ebFE" "ALCASKIM" vector "alcaElectronTracksReducer" "" "ALCASKIM" vector "alcaElectronTracksReducer" "alCaElectronTracksExtra" "ALCASKIM" +Type Module Label Process +------------------------------------------------------------------------------------------------- +edm::TriggerResults "TriggerResults" "" "HLT" +double "kt6PFJets" "rho" "RECO" +edm::TriggerResults "TriggerResults" "" "RECO" +reco::BeamSpot "offlineBeamSpot" "" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "allConversions" "" "RECO" +vector "conversions" "" "RECO" +vector "gsfElectrons" "" "RECO" +vector "gsfElectronCores" "" "RECO" +vector "electronGsfTracks" "" "RECO" +vector "electronGsfTracks" "" "RECO" +vector "pfMet" "" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "offlinePrimaryVerticesWithBS" "" "RECO" +ESDigiCollection "ecalPreshowerDigis" "" "ALCASKIM" +double "kt6PFJetsForRhoCorrection" "rho" "ALCASKIM" +edm::SortedCollection > "ecalPreshowerDigis" "" "ALCASKIM" +edm::SortedCollection > "ecalPreshowerDigis" "" "ALCASKIM" +edm::SortedCollection > "ecalDigis" "EcalTriggerPrimitives" "ALCASKIM" +edm::SortedCollection > "ecalGlobalUncalibRecHit" "EcalUncalibRecHitsEB" "ALCASKIM" +edm::SortedCollection > "ecalGlobalUncalibRecHit" "EcalUncalibRecHitsEE" "ALCASKIM" +edm::TriggerResults "TriggerResults" "" "ALCASKIM" +set "ecalDetIdToBeRecovered" "ebDetId" "ALCASKIM" +set "ecalDetIdToBeRecovered" "eeDetId" "ALCASKIM" +set "ecalDetIdToBeRecovered" "eeFE" "ALCASKIM" +set "ecalDetIdToBeRecovered" "ebFE" "ALCASKIM" +vector "alcaElectronTracksReducer" "" "ALCASKIM" +vector "alcaElectronTracksReducer" "alCaElectronTracksExtra" "ALCASKIM" diff --git a/ALCARAW_RECO/interface/PUDumper.h b/ALCARAW_RECO/interface/PUDumper.h new file mode 100644 index 00000000000..ce3d2924eba --- /dev/null +++ b/ALCARAW_RECO/interface/PUDumper.h @@ -0,0 +1,50 @@ +#ifndef PUDumper_h +#define PUDumper_h + +#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "CommonTools/UtilAlgos/interface/TFileService.h" + +#include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h" + +#include "TTree.h" + + + +class PUDumper : public edm::EDAnalyzer +{ + public: + + //! ctor + explicit PUDumper(const edm::ParameterSet&); + + //! dtor + ~PUDumper(); + + + + private: + + //! the actual analyze method + virtual void analyze(const edm::Event&, const edm::EventSetup&); + + + + private: + + edm::InputTag MCPileupTag_; + + TTree* PUTree_; + + int runNumber_; + int BX_; + int nPUtrue_; + int nPUobs_; +}; + +#endif diff --git a/ALCARAW_RECO/src/PUDumper.cc b/ALCARAW_RECO/src/PUDumper.cc new file mode 100644 index 00000000000..9226fa205db --- /dev/null +++ b/ALCARAW_RECO/src/PUDumper.cc @@ -0,0 +1,59 @@ +#include "calibration/ALCARAW_RECO/interface/PUDumper.h" + + + +//! ctor +PUDumper::PUDumper(const edm::ParameterSet& iConfig) +{ + MCPileupTag_ = iConfig.getParameter("MCPileupTag"); + + // create TTree + edm::Service fs; + PUTree_ = fs -> make("pileup","pileup"); + + PUTree_ -> Branch("runNumber",&runNumber_,"runNumber/I"); + PUTree_ -> Branch("BX", &BX_, "BX/I"); + PUTree_ -> Branch("nPUtrue", &nPUtrue_, "nPUtrue/I"); + PUTree_ -> Branch("nPUobs", &nPUobs_, "nPUobs/I"); +} + +// ---------------------------------------------------------------- + + + +//! dtor +PUDumper::~PUDumper() +{} + +// ---------------------------------------------------------------- + + + +//! loop over the reco particles and count leptons +void PUDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + // get the PU collection + edm::Handle > PupInfo; + iEvent.getByLabel(MCPileupTag_,PupInfo); + + + // loop on BX + std::vector::const_iterator PVI; + for(PVI = PupInfo->begin(); PVI != PupInfo->end(); ++PVI) + { + runNumber_ = iEvent.id().run(); + BX_ = PVI -> getBunchCrossing(); + nPUtrue_ = PVI -> getTrueNumInteractions(); + nPUobs_ = PVI -> getPU_NumInteractions(); + + std::cout << "PUDumper::runNumber: " << runNumber_ + << " BX: " << BX_ + << " nPUtrue: " << nPUtrue_ + << " nPUobs: " << nPUobs_ + << std::endl; + + PUTree_ -> Fill(); + } +} + +DEFINE_FWK_MODULE(PUDumper); diff --git a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index 9857fc9be7a..9911934f531 100644 --- a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -351,12 +351,12 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector +#include "TMatrixDSymfwd.h" + + +#include "Fit/Fitter.h" +#include "RooMinimizerFcn.h" + +class RooAbsReal ; +class RooFitResult ; +class RooArgList ; +class RooRealVar ; +class RooArgSet ; +class TH2F ; +class RooPlot ; + +class RooMinimizer : public TObject { +public: + + RooMinimizer(RooAbsReal& function) ; + virtual ~RooMinimizer() ; + + enum Strategy { Speed=0, Balance=1, Robustness=2 } ; + enum PrintLevel { None=-1, Reduced=0, Normal=1, ExtraForProblem=2, Maximum=3 } ; + void setStrategy(Int_t strat) ; + void setErrorLevel(Double_t level) ; + void setEps(Double_t eps) ; + void optimizeConst(Int_t flag) ; + void setEvalErrorWall(Bool_t flag) { _fcn->SetEvalErrorWall(flag); } + void setOffsetting(Bool_t flag) ; + + RooFitResult* fit(const char* options) ; + + Int_t migrad() ; + Int_t hesse() ; + Int_t minos() ; + Int_t minos(const RooArgSet& minosParamList) ; + Int_t seek() ; + Int_t simplex() ; + Int_t improve() ; + + Int_t minimize(const char* type, const char* alg=0) ; + + RooFitResult* save(const char* name=0, const char* title=0) ; + RooPlot* contour(RooRealVar& var1, RooRealVar& var2, + Double_t n1=1, Double_t n2=2, Double_t n3=0, + Double_t n4=0, Double_t n5=0, Double_t n6=0) ; + + Int_t setPrintLevel(Int_t newLevel) ; + void setPrintEvalErrors(Int_t numEvalErrors) { _fcn->SetPrintEvalErrors(numEvalErrors); } + void setVerbose(Bool_t flag=kTRUE) { _verbose = flag ; _fcn->SetVerbose(flag); } + void setProfile(Bool_t flag=kTRUE) { _profile = flag ; } + Bool_t setLogFile(const char* logf=0) { return _fcn->SetLogFile(logf); } + + void setMinimizerType(const char* type) ; + + static void cleanup() ; + static RooFitResult* lastMinuitFit(const RooArgList& varList=RooArgList()) ; + + void saveStatus(const char* label, Int_t status) { _statusHistory.push_back(std::pair(label,status)) ; } + + static ROOT::Fit::Fitter *_theFitter ; + +protected: + + friend class RooAbsPdf ; + void applyCovarianceMatrix(TMatrixDSym& V) ; + + void profileStart() ; + void profileStop() ; + + inline Int_t getNPar() const { return _fcn->NDim() ; } + inline std::ofstream* logfile() const { return _fcn->GetLogFile(); } + inline Double_t& maxFCN() { return _fcn->GetMaxFCN() ; } + +private: + + Int_t _printLevel ; + Int_t _status ; + Bool_t _optConst ; + Bool_t _profile ; + RooAbsReal* _func ; + + Bool_t _verbose ; + TStopwatch _timer ; + TStopwatch _cumulTimer ; + Bool_t _profileStart ; + + TMatrixDSym* _extV ; + + RooMinimizerFcn *_fcn; + std::string _minimizerType; + + + std::vector > _statusHistory ; + + RooMinimizer(const RooMinimizer&) ; + + ClassDef(RooMinimizer,0) // RooFit interface to ROOT::Fit::Fitter +} ; + + #endif #endif diff --git a/ZFitter/macro/periods.C b/ZFitter/macro/periods.C index 2d06ffe433f..682f397cac9 100644 --- a/ZFitter/macro/periods.C +++ b/ZFitter/macro/periods.C @@ -7,6 +7,56 @@ + TH1F *runA = (TH1F *) runA_->DrawNormalized(); + TH1F *runB = (TH1F *) runB_->DrawNormalized("same"); + TH1F *runC = (TH1F *) runC_->DrawNormalized("same"); + //TH1F *runD = (TH1F *) runD_->DrawNormalized("same"); + + runA->GetXaxis()->SetTitle("R9"); + runA->GetYaxis()->SetRangeUser(0.0000000001,0.16); + runB->GetYaxis()->SetRangeUser(0.0000000001,0.16); + runC->GetYaxis()->SetRangeUser(0.0000000001,0.16); + //runD->GetYaxis()->SetRangeUser(0.0000000001,0.16); + + runA->SetLineColor(kRed); + runB->SetLineColor(kGreen); + runC->SetLineColor(kBlue); + //runD->SetLineColor(kBlack); + + runA->SetFillColor(kRed); + runB->SetFillColor(kGreen); + runC->SetFillColor(kBlue); + //runD->SetFillColor(kBlack); + + runA->SetFillStyle(0); + runB->SetFillStyle(0); + runC->SetFillStyle(0); + //runD->SetFillStyle(0); + + runA->SetLineWidth(3); + runB->SetLineWidth(2); + runC->SetLineWidth(2); + //runD->SetLineWidth(3); + + TLegend *leg = new TLegend(0.7,0.7,0.9,0.9); + leg->AddEntry(runA, "RUN A","lf"); + leg->AddEntry(runB, "RUN B","lf"); + leg->AddEntry(runC, "RUN C","lf"); + //leg->AddEntry(runD, "RUN D","lf"); + + leg->Draw(); + + +} +{ + TString histName="mc_hist"; + TH1F *runA_ = (TH1F *) _file0->Get(histName); + TH1F *runB_ = (TH1F *) _file1->Get(histName); + TH1F *runC_ = (TH1F *) _file2->Get(histName); + // TH1F *runD_ = (TH1F *) _file3->Get(histName); + + + TH1F *runA = (TH1F *) runA_->DrawNormalized(); TH1F *runB = (TH1F *) runB_->DrawNormalized("same"); TH1F *runC = (TH1F *) runC_->DrawNormalized("same"); diff --git a/ZFitter/macro/periodsPlot.C b/ZFitter/macro/periodsPlot.C index 0074187cdf5..ad5a404ec33 100644 --- a/ZFitter/macro/periodsPlot.C +++ b/ZFitter/macro/periodsPlot.C @@ -43,3 +43,48 @@ } +{ + vector runPeriods, labels; + + //runPeriods.push_back("-runNumber_190456_193621"); labels.push_back("RUN2012A"); + //runPeriods.push_back("-runNumber_193834_196531"); labels.push_back("RUN2012B"); + runPeriods.push_back("-runNumber_190456_196531"); labels.push_back("RUN2012AB"); + runPeriods.push_back("-runNumber_198111_203002"); labels.push_back("RUN2012C"); + runPeriods.push_back("-runNumber_203756_208686"); labels.push_back("RUN2012D"); + + + TH1F *h=NULL; + std::vector::const_iterator l_itr=labels.begin(); + for(std::vector::const_iterator p_itr = runPeriods.begin(); + p_itr != runPeriods.end(); + p_itr++,l_itr++){ + int index=p_itr-runPeriods.begin(); + // c = PlotDataMC(data, signal, "nHitsSCEle", "(180,0,180)", "EB-eleID_7-Et_25"+*p_itr,"", *l_itr+" (Winter13)", "Simulation", "nHits SC", ""); + //c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-eleID_7-Et_25"+*p_itr,"", *l_itr+" (Winter13)", "Simulation", "nHits SC", ""); + c = PlotDataMC(data, signal, "nPV", "(30,0,30)", "eleID_7-Et_25"+*p_itr,"",*l_itr+" (Winter13)", "Simulation runDep", "nVtx", "",false,false); + + c->SaveAs(outputPath+"/nPV"+*p_itr+".eps"); + delete c; + h = (TH1F *) gROOT->FindObject("data_hist"); + h->SaveAs(TString("tmp/d_hist-nPV")+(*l_itr)+".root"); + + h = (TH1F *) gROOT->FindObject("mc_hist"); + h->SaveAs(TString("tmp/s_hist-nPV")+(*l_itr)+".root"); + +// c = PlotDataMC(data, signal, "nHitsSCEle", "(180,0,180)", "EB-eleID_7-Et_25"+*p_itr,"", *l_itr+" (Winter13)", "Simulation", "nHits SC", "", true); +// c->SaveAs(outputPath+"/nHitsSCEle-EB"+*p_itr+"-log.eps"); +// delete c; + +// c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EE-eleID_7-Et_25"+*p_itr,"", *l_itr+" (Winter13)", "Simulation", "nHits SC", ""); +// c->SaveAs(outputPath+"/nHitsSCEle-EE"+*p_itr+".eps"); +// delete c; + +// c = PlotDataMC(data, signal, "nHitsSCEle", "(180,0,180)", "EE-eleID_7-Et_25"+*p_itr,"", *l_itr+" (Winter13)", "Simulation", "nHits SC", "", true); +// c->SaveAs(outputPath+"/nHitsSCEle-EE"+*p_itr+"-log.eps"); +// delete c; + + } + +} + + diff --git a/ZFitter/macro/standardMCMC.C b/ZFitter/macro/standardMCMC.C index dfb34053a3d..3bfa6f2c2c3 100644 --- a/ZFitter/macro/standardMCMC.C +++ b/ZFitter/macro/standardMCMC.C @@ -101,3 +101,106 @@ // PlotDataMC(data, signal, "R9Ele:etaEle", "(100,-3,3,100,0,1.1)", "", mc1Label, "DY Summer 12", "#eta", "R9"); } +{ + //TString outputPath="tmp/"; //test/dato/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011/WP80_PU/img/"; + //TString outputPath="test/dato/moriond2013/WP80_PU/img/"; + TString mc1Label="standard Madgraph"; + TString mc2Label="runDep Madgraph"; + + // regression comparison + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_7-Et_25","", mc1Label,mc2Label, "Electron (Hgg) regression/std. SC -1 ", "", false, false); + c->SaveAs(outputPath+"/regrSCEle_stdSC-EB.eps"); + delete c; + + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_7-Et_25","", mc1Label,mc2Label, "Photon (Hgg) regression/std. SC -1 ", "", false, false); + c->SaveAs(outputPath+"/regrSCPho_stdSC-EB.eps"); + delete c; + + c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_7-Et_25","", mc1Label,mc2Label, "Electron (Egamma) regression/std. SC -1 ", "", false, false); + c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EB.eps"); + delete c; + + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_7-Et_25","", mc1Label,mc2Label, "Electron (Hgg) regression/std. SC -1 ", "", false, false); + c->SaveAs(outputPath+"/regrSCEle_stdSC-EE.eps"); + delete c; + + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_7-Et_25","", mc1Label,mc2Label, "Photon (Hgg) regression/std. SC -1 ", "", false, false); + c->SaveAs(outputPath+"/regrSCPho_stdSC-EE.eps"); + delete c; + + c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_7-Et_25","", mc1Label,mc2Label, "Electron (Egamma) regression/std. SC -1 ", "", false, false); + c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EE.eps"); + delete c; + + + // cluster corrections and ES energy fraction + c = PlotDataMC(data, signal, "esEnergySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0,0.2)", "absEta_1.7_2.5-eleID_7-Et_25","", mc1Label,mc2Label, "ES energy fraction: ES/(rawSC+ES) ", "", false, false); + c->SaveAs(outputPath+"/esEnergyFraction.eps"); + delete c; + + c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EB-eleID_7-Et_25","", mc1Label,mc2Label, "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", "", false, false); + c->SaveAs(outputPath+"/energyCorrections_EB.eps"); + delete c; + + c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EE-eleID_7-Et_25","", mc1Label,mc2Label, "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", "", false, false); + c->SaveAs(outputPath+"/energyCorrections_EE.eps"); + delete c; + + // pileup + c = PlotDataMC(data, signal, "nPV", "(30,0,30)", "eleID_7-Et_25", "", mc1Label,mc2Label, "nVtx", "", false, false); + c->SaveAs(outputPath+"nPV.eps"); + delete c; + + c = PlotDataMC(data, signal, "rho", "(60,-1,29)", "eleID_7-Et_25", "", mc1Label,mc2Label, "#rho", "", false, false); + c->SaveAs(outputPath+"rho.eps"); + delete c; + + // kinematic variables + c = PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "eleID_7", "", mc1Label,mc2Label, "energy SC [GeV]", "", false, false); + c->SaveAs(outputPath+"energySCEle.eps"); + delete c; + + c = PlotDataMC(data, signal, "etaEle", "(100,-2.5,2.5)", "eleID_7-Et_25", "", mc1Label,mc2Label, "#eta", "", false, false); + c->SaveAs(outputPath+"etaEle.eps"); + delete c; + + c = PlotDataMC(data, signal, "phiEle", "(100,-5,5)", "eleID_7-Et_25", "", mc1Label,mc2Label, "#phi", "", false, false); + c->SaveAs(outputPath+"phiEle.eps"); + delete c; + + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-eleID_7-Et_25", "", mc1Label,mc2Label, "R_{9}", "", false, false); + c->SaveAs(outputPath+"R9Ele_EB.eps"); + delete c; + + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-eleID_7-Et_25", "", mc1Label,mc2Label, "R_{9}", "",true, false); + c->SaveAs(outputPath+"R9Ele_EB-log.eps"); + delete c; + + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-eleID_7-Et_25", "", mc1Label,mc2Label, "R_{9}", "", false, false); + c->SaveAs(outputPath+"R9Ele_EE.eps"); + delete c; + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-eleID_7-Et_25", "", mc1Label,mc2Label, "R_{9}", "",true, false); + c->SaveAs(outputPath+"R9Ele_EE-log.eps"); + + // Checking fit selection +} + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-eleID_7-Et_25","", mc1Label,mc2Label, "Reference Region map", "",1, false, false); + c->SaveAs(outputPath+"EERefRegMap.eps"); + delete c; + +} + + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(171,-85,86,361,0,361)", "EBRefReg-gold-eleID_7-Et_25","", mc1Label,mc2Label, "Reference Region map", "",1, false, false); + c->SaveAs(outputPath+"EBRefRegMap.eps"); + delete c; + + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-eleID_7-Et_25","", mc1Label,mc2Label, "Reference Region map", "",1, false, false); + c->SaveAs(outputPath+"EERefRegMap.eps"); + delete c; + + //PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "", mc1Label, "DY Summer 12", "energy SC [GeV]", ""); + //PlotDataMC(data, signal, "R9Ele", "(100,0,1.1)", "abs(etaEle)<1.5", mc1Label, "DY Summer 12", "R9", ""); + //PlotDataMC(data, signal, "R9Ele", "(100,0,1.1)", "abs(etaEle)>1.5", mc1Label, "DY Summer 12", "R9", ""); +// PlotDataMC(data, signal, "R9Ele:etaEle", "(100,-3,3,100,0,1.1)", "", mc1Label, "DY Summer 12", "#eta", "R9"); +} + diff --git a/ZFitter/script/FitResultTostep2.sh b/ZFitter/script/FitResultTostep2.sh index f94779b1e0b..3c011199335 100755 --- a/ZFitter/script/FitResultTostep2.sh +++ b/ZFitter/script/FitResultTostep2.sh @@ -9,5 +9,18 @@ grep scale ${file1} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|- grep scale ${file2} | grep EE | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${file3} |grep -v '#' > ${outFile}.dat +./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${file3} |sed -f sed/tex.sed > ${outFile}.tex +#!/bin/bash +commonCut="Et_20" +file1=$1 +file2=$2 +file3=$3 +outFile=$4 + +grep scale ${file1} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat +grep scale ${file2} | grep EE | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat + + ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${file3} |grep -v '#' > ${outFile}.dat ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${file3} |sed -f sed/tex.sed > ${outFile}.tex diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index ef1718b8a73..e629a838ad3 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -32,3 +32,37 @@ EOF done wait done +#!/bin/bash +#1000 100000 +dir=test/dato/fitres/Hgg_Et-toys +for nToys in `seq 4 5`; + do + echo "[[[[[[[[[[[ nToys ]]]]]]]]]]] $nToys" + for nEventsPerToy in 0 10000 1000000 + do + echo "[[[[[[[[[[[ nEventsPerToy ]]]]]]]]]]] ${nEventsPerToy}" + for alpha in 0.00 0.01 0.03 0.05 0.07 + do + for const in 0.005 0.01 0.02 0.001 + do + echo "[[[[[[[[[[[ const:alpha ]]]]]]]]]]] ${const}:${alpha}" + newDir=${dir}/${nEventsPerToy}/${const}-${alpha}/${nToys} + mkdir -p $newDir + cat > $newDir/mcToy.txt < ${newDir}/log.log ) & + done + wait + done + wait + done + wait +done diff --git a/ZFitter/script/selEff.sh b/ZFitter/script/selEff.sh index a77edb5db7e..6c5465f8891 100755 --- a/ZFitter/script/selEff.sh +++ b/ZFitter/script/selEff.sh @@ -55,3 +55,60 @@ for runRange in $runRanges sed -i "/$runRange/ {s|$|\t$lumi|}" tmp/`basename $runRangesFile` done +#!/bin/bash +##! Script for filling the luminosity per run range in the runRangesFile + +usage(){ + echo "`basename $0` [options]" + echo "----- mandatory" + echo " --runRangesFile arg: run ranges for stability plots" + echo " --json arg: json file for lumiCalc" +} + +desc(){ + echo "#####################################################################" + echo "## This script make the usual validation table and stability plots" + echo "## " + echo "#####################################################################" +} + +#------------------------------ parsing + + +# options may be followed by one colon to indicate they have a required argument +if ! options=$(getopt -u -o h -l help,runRangesFile:,json: -- "$@") +then + # something went wrong, getopt will put out an error message for us + exit 1 +fi + + +set -- $options + +while [ $# -gt 0 ] +do + case $1 in + -h|--help) desc;usage; exit 0;; + --runRangesFile) runRangesFile=$2; echo "[OPTION] runRangesFile = ${runRangesFile}"; shift;; + --json) JSON=$2; shift;; + (--) shift; break;; + (-*) usage; echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; + (*) break;; + esac + shift +done + +runRanges=`cat $runRangesFile |sed -r 's|[ ]+|\t|g' | cut -f 1` +#JSON=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt +cp $runRangesFile tmp/`basename $runRangesFile` +for runRange in $runRanges + do + runMin=`echo $runRange | cut -d '-' -f 1` + runMax=`echo $runRange | cut -d '-' -f 2` +# echo $runRange $runMin $runMax +# filterJSON.py --min=$runMin --max=$runMax $JSON > tmp/json.txt || exit 1 +# lumiCalc2.py -i tmp/json.txt --nowarning -o tmp/$runRange.lumi overview + lumi=`cat tmp/$runRange.lumi | sed 's|.*\][\"]*,||' | awk '{sum+=$1};END{print sum/1e6}'` + sed -i "/$runRange/ {s|$|\t$lumi|}" tmp/`basename $runRangesFile` +done + diff --git a/ZFitter/src/RooMinimizer.cxx b/ZFitter/src/RooMinimizer.cxx index 674de09ccf4..5a58371a5da 100644 --- a/ZFitter/src/RooMinimizer.cxx +++ b/ZFitter/src/RooMinimizer.cxx @@ -885,3 +885,890 @@ RooFitResult* RooMinimizer::lastMinuitFit(const RooArgList& varList) } #endif +/***************************************************************************** + * Project: RooFit * + * Package: RooFitCore * + * @(#)root/roofitcore:$Id$ + * Authors: * + * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * + * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * + * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it * + * * + * Redistribution and use in source and binary forms, * + * with or without modification, are permitted according to the terms * + * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * + *****************************************************************************/ + +////////////////////////////////////////////////////////////////////////////// +// +// BEGIN_HTML +// RooMinimizer is a wrapper class around ROOT::Fit:Fitter that +// provides a seamless interface between the minimizer functionality +// and the native RooFit interface. +//

+// By default the Minimizer is MINUIT. +//

+// RooMinimizer can minimize any RooAbsReal function with respect to +// its parameters. Usual choices for minimization are RooNLLVar +// and RooChi2Var +//

+// RooMinimizer has methods corresponding to MINUIT functions like +// hesse(), migrad(), minos() etc. In each of these function calls +// the state of the MINUIT engine is synchronized with the state +// of the RooFit variables: any change in variables, change +// in the constant status etc is forwarded to MINUIT prior to +// execution of the MINUIT call. Afterwards the RooFit objects +// are resynchronized with the output state of MINUIT: changes +// parameter values, errors are propagated. +//

+// Various methods are available to control verbosity, profiling, +// automatic PDF optimization. +// END_HTML +// + +#ifndef __ROOFIT_NOROOMINIMIZER + +#include "RooFit.h" +#include "Riostream.h" + +#include "TClass.h" + +#include +#include + +#include "TH1.h" +#include "TH2.h" +#include "TMarker.h" +#include "TGraph.h" +#include "TStopwatch.h" +#include "TDirectory.h" +#include "TMatrixDSym.h" + +#include "RooArgSet.h" +#include "RooArgList.h" +#include "RooAbsReal.h" +#include "RooAbsRealLValue.h" +#include "RooRealVar.h" +#include "RooAbsPdf.h" +#include "RooSentinel.h" +#include "RooMsgService.h" +#include "RooPlot.h" + + +#include "../interface/RooMinimizer.hh" +#include "RooFitResult.h" + +#include "Math/Minimizer.h" + +#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3) +char* operator+( streampos&, char* ); +#endif + +using namespace std; + +ClassImp(RooMinimizer) +; + +ROOT::Fit::Fitter *RooMinimizer::_theFitter = 0 ; + + + +//_____________________________________________________________________________ +void RooMinimizer::cleanup() +{ + // Cleanup method called by atexit handler installed by RooSentinel + // to delete all global heap objects when the program is terminated + if (_theFitter) { + delete _theFitter ; + _theFitter =0 ; + } +} + + + +//_____________________________________________________________________________ +RooMinimizer::RooMinimizer(RooAbsReal& function) +{ + // Construct MINUIT interface to given function. Function can be anything, + // but is typically a -log(likelihood) implemented by RooNLLVar or a chi^2 + // (implemented by RooChi2Var). Other frequent use cases are a RooAddition + // of a RooNLLVar plus a penalty or constraint term. This class propagates + // all RooFit information (floating parameters, their values and errors) + // to MINUIT before each MINUIT call and propagates all MINUIT information + // back to the RooFit object at the end of each call (updated parameter + // values, their (asymmetric errors) etc. The default MINUIT error level + // for HESSE and MINOS error analysis is taken from the defaultErrorLevel() + // value of the input function. + + RooSentinel::activate() ; + + // Store function reference + _extV = 0 ; + _func = &function ; + _optConst = kFALSE ; + _verbose = kFALSE ; + _profile = kFALSE ; + _profileStart = kFALSE ; + _printLevel = 1 ; + _minimizerType = "Minuit"; // default minimizer + + if (_theFitter) delete _theFitter ; + _theFitter = new ROOT::Fit::Fitter; + _fcn = new RooMinimizerFcn(_func,this,_verbose); + _theFitter->Config().SetMinimizer(_minimizerType.c_str()); + setEps(1.0); // default tolerance + // default max number of calls + _theFitter->Config().MinimizerOptions().SetMaxIterations(500*_fcn->NDim()); + _theFitter->Config().MinimizerOptions().SetMaxFunctionCalls(500*_fcn->NDim()); + + // Shut up for now + setPrintLevel(-1) ; + + // Use +0.5 for 1-sigma errors + setErrorLevel(_func->defaultErrorLevel()) ; + + // Declare our parameters to MINUIT + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + + // Now set default verbosity + if (RooMsgService::instance().silentMode()) { + setPrintLevel(-1) ; + } else { + setPrintLevel(1) ; + } +} + + + +//_____________________________________________________________________________ +RooMinimizer::~RooMinimizer() +{ + // Destructor + + if (_extV) { + delete _extV ; + } + + if (_fcn) { + delete _fcn; + } + +} + + + +//_____________________________________________________________________________ +void RooMinimizer::setStrategy(Int_t istrat) +{ + // Change MINUIT strategy to istrat. Accepted codes + // are 0,1,2 and represent MINUIT strategies for dealing + // most efficiently with fast FCNs (0), expensive FCNs (2) + // and 'intermediate' FCNs (1) + + _theFitter->Config().MinimizerOptions().SetStrategy(istrat); + +} + + + +//_____________________________________________________________________________ +void RooMinimizer::setErrorLevel(Double_t level) +{ + // Set the level for MINUIT error analysis to the given + // value. This function overrides the default value + // that is taken in the RooMinimizer constructor from + // the defaultErrorLevel() method of the input function + + _theFitter->Config().MinimizerOptions().SetErrorDef(level); + +} + + + +//_____________________________________________________________________________ +void RooMinimizer::setEps(Double_t eps) +{ + // Change MINUIT epsilon + + _theFitter->Config().MinimizerOptions().SetTolerance(eps); + +} + + +//_____________________________________________________________________________ +void RooMinimizer::setOffsetting(Bool_t flag) +{ + // Enable internal likelihood offsetting for enhanced numeric precision + //_func->enableOffsetting(flag) ; +} + + + + +//_____________________________________________________________________________ +void RooMinimizer::setMinimizerType(const char* type) +{ + // Choose the minimzer algorithm. + _minimizerType = type; +} + + + + +//_____________________________________________________________________________ +RooFitResult* RooMinimizer::fit(const char* options) +{ + // Parse traditional RooAbsPdf::fitTo driver options + // + // m - Run Migrad only + // h - Run Hesse to estimate errors + // v - Verbose mode + // l - Log parameters after each Minuit steps to file + // t - Activate profile timer + // r - Save fit result + // 0 - Run Migrad with strategy 0 + + TString opts(options) ; + opts.ToLower() ; + + // Initial configuration + if (opts.Contains("v")) setVerbose(1) ; + if (opts.Contains("t")) setProfile(1) ; + if (opts.Contains("l")) setLogFile(Form("%s.log",_func->GetName())) ; + if (opts.Contains("c")) optimizeConst(1) ; + + // Fitting steps + if (opts.Contains("0")) setStrategy(0) ; + migrad() ; + if (opts.Contains("0")) setStrategy(1) ; + if (opts.Contains("h")||!opts.Contains("m")) hesse() ; + if (!opts.Contains("m")) minos() ; + + return (opts.Contains("r")) ? save() : 0 ; +} + + + + +//_____________________________________________________________________________ +Int_t RooMinimizer::minimize(const char* type, const char* alg) +{ + std::cout << "Hacker Shervin in action" << std::endl; + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + + // _theFitter->Config().SetMinimizer(type,alg); + + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + bool ret = _theFitter->FitFCN(*_fcn); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("MINIMIZE",_status) ; + + return _status ; +} + + + + +//_____________________________________________________________________________ +Int_t RooMinimizer::migrad() +{ + // Execute MIGRAD. Changes in parameter values + // and calculated errors are automatically + // propagated back the RooRealVars representing + // the floating parameters in the MINUIT operation + + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"migrad"); + bool ret = _theFitter->FitFCN(*_fcn); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("MIGRAD",_status) ; + + return _status ; +} + + + +//_____________________________________________________________________________ +Int_t RooMinimizer::hesse() +{ + // Execute HESSE. Changes in parameter values + // and calculated errors are automatically + // propagated back the RooRealVars representing + // the floating parameters in the MINUIT operation + + if (_theFitter->GetMinimizer()==0) { + coutW(Minimization) << "RooMinimizer::hesse: Error, run Migrad before Hesse!" + << endl ; + _status = -1; + } + else { + + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + _theFitter->Config().SetMinimizer(_minimizerType.c_str()); + bool ret = _theFitter->CalculateHessErrors(); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("HESSE",_status) ; + + } + + return _status ; + +} + +//_____________________________________________________________________________ +Int_t RooMinimizer::minos() +{ + // Execute MINOS. Changes in parameter values + // and calculated errors are automatically + // propagated back the RooRealVars representing + // the floating parameters in the MINUIT operation + + if (_theFitter->GetMinimizer()==0) { + coutW(Minimization) << "RooMinimizer::minos: Error, run Migrad before Minos!" + << endl ; + _status = -1; + } + else { + + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + _theFitter->Config().SetMinimizer(_minimizerType.c_str()); + bool ret = _theFitter->CalculateMinosErrors(); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("MINOS",_status) ; + + } + + return _status ; + +} + + +//_____________________________________________________________________________ +Int_t RooMinimizer::minos(const RooArgSet& minosParamList) +{ + // Execute MINOS for given list of parameters. Changes in parameter values + // and calculated errors are automatically + // propagated back the RooRealVars representing + // the floating parameters in the MINUIT operation + + if (_theFitter->GetMinimizer()==0) { + coutW(Minimization) << "RooMinimizer::minos: Error, run Migrad before Minos!" + << endl ; + _status = -1; + } + else if (minosParamList.getSize()>0) { + + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + // get list of parameters for Minos + TIterator* aIter = minosParamList.createIterator() ; + RooAbsArg* arg ; + std::vector paramInd; + while((arg=(RooAbsArg*)aIter->Next())) { + RooAbsArg* par = _fcn->GetFloatParamList()->find(arg->GetName()); + if (par && !par->isConstant()) { + Int_t index = _fcn->GetFloatParamList()->index(par); + paramInd.push_back(index); + } + } + delete aIter ; + + if (paramInd.size()) { + // set the parameter indeces + _theFitter->Config().SetMinosErrors(paramInd); + + _theFitter->Config().SetMinimizer(_minimizerType.c_str()); + bool ret = _theFitter->CalculateMinosErrors(); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + } + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("MINOS",_status) ; + + } + + return _status ; +} + + + +//_____________________________________________________________________________ +Int_t RooMinimizer::seek() +{ + // Execute SEEK. Changes in parameter values + // and calculated errors are automatically + // propagated back the RooRealVars representing + // the floating parameters in the MINUIT operation + + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"seek"); + bool ret = _theFitter->FitFCN(*_fcn); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("SEEK",_status) ; + + return _status ; +} + + + +//_____________________________________________________________________________ +Int_t RooMinimizer::simplex() +{ + // Execute SIMPLEX. Changes in parameter values + // and calculated errors are automatically + // propagated back the RooRealVars representing + // the floating parameters in the MINUIT operation + + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"simplex"); + bool ret = _theFitter->FitFCN(*_fcn); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("SEEK",_status) ; + + return _status ; +} + + + +//_____________________________________________________________________________ +Int_t RooMinimizer::improve() +{ + // Execute IMPROVE. Changes in parameter values + // and calculated errors are automatically + // propagated back the RooRealVars representing + // the floating parameters in the MINUIT operation + + _fcn->Synchronize(_theFitter->Config().ParamsSettings(), + _optConst,_verbose) ; + profileStart() ; + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + RooAbsReal::clearEvalErrorLog() ; + + _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"migradimproved"); + bool ret = _theFitter->FitFCN(*_fcn); + _status = ((ret) ? _theFitter->Result().Status() : -1); + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + profileStop() ; + _fcn->BackProp(_theFitter->Result()); + + saveStatus("IMPROVE",_status) ; + + return _status ; +} + + + +//_____________________________________________________________________________ +Int_t RooMinimizer::setPrintLevel(Int_t newLevel) +{ + // Change the MINUIT internal printing level + + Int_t ret = _printLevel ; + _theFitter->Config().MinimizerOptions().SetPrintLevel(newLevel+1); + _printLevel = newLevel+1 ; + return ret ; +} + +//_____________________________________________________________________________ +void RooMinimizer::optimizeConst(Int_t flag) +{ + // If flag is true, perform constant term optimization on + // function being minimized. + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; + + if (_optConst && !flag){ + if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: deactivating const optimization" << endl ; + _func->constOptimizeTestStatistic(RooAbsArg::DeActivate) ; + _optConst = flag ; + } else if (!_optConst && flag) { + if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: activating const optimization" << endl ; + _func->constOptimizeTestStatistic(RooAbsArg::Activate,flag>1) ; + _optConst = flag ; + } else if (_optConst && flag) { + if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: const optimization already active" << endl ; + } else { + if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: const optimization wasn't active" << endl ; + } + + RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; + +} + + + +//_____________________________________________________________________________ +RooFitResult* RooMinimizer::save(const char* userName, const char* userTitle) +{ + // Save and return a RooFitResult snaphot of current minimizer status. + // This snapshot contains the values of all constant parameters, + // the value of all floating parameters at RooMinimizer construction and + // after the last MINUIT operation, the MINUIT status, variance quality, + // EDM setting, number of calls with evaluation problems, the minimized + // function value and the full correlation matrix + + if (_theFitter->GetMinimizer()==0) { + coutW(Minimization) << "RooMinimizer::save: Error, run minimization before!" + << endl ; + return 0; + } + + TString name,title ; + name = userName ? userName : Form("%s", _func->GetName()) ; + title = userTitle ? userTitle : Form("%s", _func->GetTitle()) ; + RooFitResult* fitRes = new RooFitResult(name,title) ; + + // Move eventual fixed parameters in floatList to constList + Int_t i ; + RooArgList saveConstList(*(_fcn->GetConstParamList())) ; + RooArgList saveFloatInitList(*(_fcn->GetInitFloatParamList())) ; + RooArgList saveFloatFinalList(*(_fcn->GetFloatParamList())) ; + for (i=0 ; i<_fcn->GetFloatParamList()->getSize() ; i++) { + RooAbsArg* par = _fcn->GetFloatParamList()->at(i) ; + if (par->isConstant()) { + saveFloatInitList.remove(*saveFloatInitList.find(par->GetName()),kTRUE) ; + saveFloatFinalList.remove(*par) ; + saveConstList.add(*par) ; + } + } + saveConstList.sort() ; + + fitRes->setConstParList(saveConstList) ; + fitRes->setInitParList(saveFloatInitList) ; + + fitRes->setStatus(_status) ; + fitRes->setCovQual(_theFitter->GetMinimizer()->CovMatrixStatus()) ; + fitRes->setMinNLL(_theFitter->Result().MinFcnValue()) ; + fitRes->setNumInvalidNLL(_fcn->GetNumInvalidNLL()) ; + fitRes->setEDM(_theFitter->Result().Edm()) ; + fitRes->setFinalParList(saveFloatFinalList) ; + if (!_extV) { + std::vector globalCC; + TMatrixDSym corrs(_theFitter->Result().Parameters().size()) ; + TMatrixDSym covs(_theFitter->Result().Parameters().size()) ; + for (UInt_t ic=0; ic<_theFitter->Result().Parameters().size(); ic++) { + globalCC.push_back(_theFitter->Result().GlobalCC(ic)); + for (UInt_t ii=0; ii<_theFitter->Result().Parameters().size(); ii++) { + corrs(ic,ii) = _theFitter->Result().Correlation(ic,ii); + covs(ic,ii) = _theFitter->Result().CovMatrix(ic,ii); + } + } + fitRes->fillCorrMatrix(globalCC,corrs,covs) ; + } else { + fitRes->setCovarianceMatrix(*_extV) ; + } + + fitRes->setStatusHistory(_statusHistory) ; + + return fitRes ; + +} + +//_____________________________________________________________________________ +RooPlot* RooMinimizer::contour(RooRealVar& var1, RooRealVar& var2, + Double_t n1, Double_t n2, Double_t n3, + Double_t n4, Double_t n5, Double_t n6) +{ + // Create and draw a TH2 with the error contours in parameters var1 and v2 at up to 6 'sigma' settings + // where 'sigma' is calculated as n*n*errorLevel + + RooArgList* params = _fcn->GetFloatParamList() ; + RooArgList* paramSave = (RooArgList*) params->snapshot() ; + + // Verify that both variables are floating parameters of PDF + Int_t index1= _fcn->GetFloatParamList()->index(&var1); + if(index1 < 0) { + coutE(Minimization) << "RooMinimizer::contour(" << GetName() + << ") ERROR: " << var1.GetName() + << " is not a floating parameter of " + << _func->GetName() << endl ; + return 0; + } + + Int_t index2= _fcn->GetFloatParamList()->index(&var2); + if(index2 < 0) { + coutE(Minimization) << "RooMinimizer::contour(" << GetName() + << ") ERROR: " << var2.GetName() + << " is not a floating parameter of PDF " + << _func->GetName() << endl ; + return 0; + } + + // create and draw a frame + RooPlot* frame = new RooPlot(var1,var2) ; + + // draw a point at the current parameter values + TMarker *point= new TMarker(var1.getVal(), var2.getVal(), 8); + frame->addObject(point) ; + + // remember our original value of ERRDEF + Double_t errdef= _theFitter->Config().MinimizerOptions().ErrorDef(); + + Double_t n[6] ; + n[0] = n1 ; n[1] = n2 ; n[2] = n3 ; n[3] = n4 ; n[4] = n5 ; n[5] = n6 ; + unsigned int npoints(50); + + for (Int_t ic = 0 ; ic<6 ; ic++) { + if(n[ic] > 0) { + // set the value corresponding to an n1-sigma contour + _theFitter->Config().MinimizerOptions().SetErrorDef(n[ic]*n[ic]*errdef); + + // calculate and draw the contour + Double_t *xcoor = new Double_t[npoints+1]; + Double_t *ycoor = new Double_t[npoints+1]; + bool ret = _theFitter->GetMinimizer()->Contour(index1,index2,npoints,xcoor,ycoor); + + if (!ret) { + coutE(Minimization) << "RooMinimizer::contour(" + << GetName() + << ") ERROR: MINUIT did not return a contour graph for n=" + << n[ic] << endl ; + } else { + xcoor[npoints] = xcoor[0]; + ycoor[npoints] = ycoor[0]; + TGraph* graph = new TGraph(npoints+1,xcoor,ycoor); + + graph->SetName(Form("contour_%s_n%f",_func->GetName(),n[ic])) ; + graph->SetLineStyle(ic+1) ; + graph->SetLineWidth(2) ; + graph->SetLineColor(kBlue) ; + frame->addObject(graph,"L") ; + } + + delete [] xcoor; + delete [] ycoor; + } + } + + + // restore the original ERRDEF + _theFitter->Config().MinimizerOptions().SetErrorDef(errdef); + + // restore parameter values + *params = *paramSave ; + delete paramSave ; + + return frame ; + +} + + +//_____________________________________________________________________________ +void RooMinimizer::profileStart() +{ + // Start profiling timer + if (_profile) { + _timer.Start() ; + _cumulTimer.Start(_profileStart?kFALSE:kTRUE) ; + _profileStart = kTRUE ; + } +} + + +//_____________________________________________________________________________ +void RooMinimizer::profileStop() +{ + // Stop profiling timer and report results of last session + if (_profile) { + _timer.Stop() ; + _cumulTimer.Stop() ; + coutI(Minimization) << "Command timer: " ; _timer.Print() ; + coutI(Minimization) << "Session timer: " ; _cumulTimer.Print() ; + } +} + + + + + +//_____________________________________________________________________________ +void RooMinimizer::applyCovarianceMatrix(TMatrixDSym& V) +{ + // Apply results of given external covariance matrix. i.e. propagate its errors + // to all RRV parameter representations and give this matrix instead of the + // HESSE matrix at the next save() call + + _extV = (TMatrixDSym*) V.Clone() ; + _fcn->ApplyCovarianceMatrix(*_extV); + +} + + + +RooFitResult* RooMinimizer::lastMinuitFit(const RooArgList& varList) +{ + // Import the results of the last fit performed, interpreting + // the fit parameters as the given varList of parameters. + + if (_theFitter==0 || _theFitter->GetMinimizer()==0) { + oocoutE((TObject*)0,InputArguments) << "RooMinimizer::save: Error, run minimization before!" + << endl ; + return 0; + } + + // Verify length of supplied varList + if (varList.getSize()>0 && varList.getSize()!=Int_t(_theFitter->Result().NTotalParameters())) { + oocoutE((TObject*)0,InputArguments) + << "RooMinimizer::lastMinuitFit: ERROR: supplied variable list must be either empty " << endl + << " or match the number of variables of the last fit (" + << _theFitter->Result().NTotalParameters() << ")" << endl ; + return 0 ; + } + + + // Verify that all members of varList are of type RooRealVar + TIterator* iter = varList.createIterator() ; + RooAbsArg* arg ; + while((arg=(RooAbsArg*)iter->Next())) { + if (!dynamic_cast(arg)) { + oocoutE((TObject*)0,InputArguments) << "RooMinimizer::lastMinuitFit: ERROR: variable '" + << arg->GetName() << "' is not of type RooRealVar" << endl ; + return 0 ; + } + } + delete iter ; + + RooFitResult* res = new RooFitResult("lastMinuitFit","Last MINUIT fit") ; + + // Extract names of fit parameters + // and construct corresponding RooRealVars + RooArgList constPars("constPars") ; + RooArgList floatPars("floatPars") ; + + UInt_t i ; + for (i = 0; i < _theFitter->Result().NTotalParameters(); ++i) { + + TString varName(_theFitter->Result().GetParameterName(i)); + Bool_t isConst(_theFitter->Result().IsParameterFixed(i)) ; + + Double_t xlo = _theFitter->Config().ParSettings(i).LowerLimit(); + Double_t xhi = _theFitter->Config().ParSettings(i).UpperLimit(); + Double_t xerr = _theFitter->Result().Error(i); + Double_t xval = _theFitter->Result().Value(i); + + RooRealVar* var ; + if (varList.getSize()==0) { + + if ((xlosetConstant(isConst) ; + } else { + + var = (RooRealVar*) varList.at(i)->Clone() ; + var->setConstant(isConst) ; + var->setVal(xval) ; + if (xlosetRange(xlo,xhi) ; + } + + if (varName.CompareTo(var->GetName())) { + oocoutI((TObject*)0,Eval) << "RooMinimizer::lastMinuitFit: fit parameter '" << varName + << "' stored in variable '" << var->GetName() << "'" << endl ; + } + + } + + if (isConst) { + constPars.addOwned(*var) ; + } else { + var->setError(xerr) ; + floatPars.addOwned(*var) ; + } + } + + res->setConstParList(constPars) ; + res->setInitParList(floatPars) ; + res->setFinalParList(floatPars) ; + res->setMinNLL(_theFitter->Result().MinFcnValue()) ; + res->setEDM(_theFitter->Result().Edm()) ; + res->setCovQual(_theFitter->GetMinimizer()->CovMatrixStatus()) ; + res->setStatus(_theFitter->Result().Status()) ; + std::vector globalCC; + TMatrixDSym corrs(_theFitter->Result().Parameters().size()) ; + TMatrixDSym covs(_theFitter->Result().Parameters().size()) ; + for (UInt_t ic=0; ic<_theFitter->Result().Parameters().size(); ic++) { + globalCC.push_back(_theFitter->Result().GlobalCC(ic)); + for (UInt_t ii=0; ii<_theFitter->Result().Parameters().size(); ii++) { + corrs(ic,ii) = _theFitter->Result().Correlation(ic,ii); + covs(ic,ii) = _theFitter->Result().CovMatrix(ic,ii); + } + } + res->fillCorrMatrix(globalCC,corrs,covs) ; + + return res; + +} + +#endif From 903afb2c6f1a94a726384f88051f88e281ffa5a0 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 1 Jul 2013 11:48:13 +0200 Subject: [PATCH 009/475] fixed patch result --- ZFitter/interface/RooMinimizer.hh | 127 ----- ZFitter/src/RooMinimizer.cxx | 886 ------------------------------ 2 files changed, 1013 deletions(-) diff --git a/ZFitter/interface/RooMinimizer.hh b/ZFitter/interface/RooMinimizer.hh index 35109dbac68..a90f96bead4 100644 --- a/ZFitter/interface/RooMinimizer.hh +++ b/ZFitter/interface/RooMinimizer.hh @@ -122,131 +122,4 @@ private: #endif - -#endif -/***************************************************************************** - * Project: RooFit * - * Package: RooFitCore * - * File: $Id$ - * Authors: * - * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * - * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * - * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it * - * * - * * - * Redistribution and use in source and binary forms, * - * with or without modification, are permitted according to the terms * - * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * - *****************************************************************************/ - -#ifndef __ROOFIT_NOROOMINIMIZER - -#ifndef ROO_MINIMIZER -#define ROO_MINIMIZER - -#include "TObject.h" -#include "TStopwatch.h" -#include -#include "TMatrixDSymfwd.h" - - -#include "Fit/Fitter.h" -#include "RooMinimizerFcn.h" - -class RooAbsReal ; -class RooFitResult ; -class RooArgList ; -class RooRealVar ; -class RooArgSet ; -class TH2F ; -class RooPlot ; - -class RooMinimizer : public TObject { -public: - - RooMinimizer(RooAbsReal& function) ; - virtual ~RooMinimizer() ; - - enum Strategy { Speed=0, Balance=1, Robustness=2 } ; - enum PrintLevel { None=-1, Reduced=0, Normal=1, ExtraForProblem=2, Maximum=3 } ; - void setStrategy(Int_t strat) ; - void setErrorLevel(Double_t level) ; - void setEps(Double_t eps) ; - void optimizeConst(Int_t flag) ; - void setEvalErrorWall(Bool_t flag) { _fcn->SetEvalErrorWall(flag); } - void setOffsetting(Bool_t flag) ; - - RooFitResult* fit(const char* options) ; - - Int_t migrad() ; - Int_t hesse() ; - Int_t minos() ; - Int_t minos(const RooArgSet& minosParamList) ; - Int_t seek() ; - Int_t simplex() ; - Int_t improve() ; - - Int_t minimize(const char* type, const char* alg=0) ; - - RooFitResult* save(const char* name=0, const char* title=0) ; - RooPlot* contour(RooRealVar& var1, RooRealVar& var2, - Double_t n1=1, Double_t n2=2, Double_t n3=0, - Double_t n4=0, Double_t n5=0, Double_t n6=0) ; - - Int_t setPrintLevel(Int_t newLevel) ; - void setPrintEvalErrors(Int_t numEvalErrors) { _fcn->SetPrintEvalErrors(numEvalErrors); } - void setVerbose(Bool_t flag=kTRUE) { _verbose = flag ; _fcn->SetVerbose(flag); } - void setProfile(Bool_t flag=kTRUE) { _profile = flag ; } - Bool_t setLogFile(const char* logf=0) { return _fcn->SetLogFile(logf); } - - void setMinimizerType(const char* type) ; - - static void cleanup() ; - static RooFitResult* lastMinuitFit(const RooArgList& varList=RooArgList()) ; - - void saveStatus(const char* label, Int_t status) { _statusHistory.push_back(std::pair(label,status)) ; } - - static ROOT::Fit::Fitter *_theFitter ; - -protected: - - friend class RooAbsPdf ; - void applyCovarianceMatrix(TMatrixDSym& V) ; - - void profileStart() ; - void profileStop() ; - - inline Int_t getNPar() const { return _fcn->NDim() ; } - inline std::ofstream* logfile() const { return _fcn->GetLogFile(); } - inline Double_t& maxFCN() { return _fcn->GetMaxFCN() ; } - -private: - - Int_t _printLevel ; - Int_t _status ; - Bool_t _optConst ; - Bool_t _profile ; - RooAbsReal* _func ; - - Bool_t _verbose ; - TStopwatch _timer ; - TStopwatch _cumulTimer ; - Bool_t _profileStart ; - - TMatrixDSym* _extV ; - - RooMinimizerFcn *_fcn; - std::string _minimizerType; - - - std::vector > _statusHistory ; - - RooMinimizer(const RooMinimizer&) ; - - ClassDef(RooMinimizer,0) // RooFit interface to ROOT::Fit::Fitter -} ; - - -#endif - #endif diff --git a/ZFitter/src/RooMinimizer.cxx b/ZFitter/src/RooMinimizer.cxx index 5a58371a5da..75ecb2f750e 100644 --- a/ZFitter/src/RooMinimizer.cxx +++ b/ZFitter/src/RooMinimizer.cxx @@ -885,890 +885,4 @@ RooFitResult* RooMinimizer::lastMinuitFit(const RooArgList& varList) } #endif -/***************************************************************************** - * Project: RooFit * - * Package: RooFitCore * - * @(#)root/roofitcore:$Id$ - * Authors: * - * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * - * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * - * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it * - * * - * Redistribution and use in source and binary forms, * - * with or without modification, are permitted according to the terms * - * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * - *****************************************************************************/ - -////////////////////////////////////////////////////////////////////////////// -// -// BEGIN_HTML -// RooMinimizer is a wrapper class around ROOT::Fit:Fitter that -// provides a seamless interface between the minimizer functionality -// and the native RooFit interface. -//

-// By default the Minimizer is MINUIT. -//

-// RooMinimizer can minimize any RooAbsReal function with respect to -// its parameters. Usual choices for minimization are RooNLLVar -// and RooChi2Var -//

-// RooMinimizer has methods corresponding to MINUIT functions like -// hesse(), migrad(), minos() etc. In each of these function calls -// the state of the MINUIT engine is synchronized with the state -// of the RooFit variables: any change in variables, change -// in the constant status etc is forwarded to MINUIT prior to -// execution of the MINUIT call. Afterwards the RooFit objects -// are resynchronized with the output state of MINUIT: changes -// parameter values, errors are propagated. -//

-// Various methods are available to control verbosity, profiling, -// automatic PDF optimization. -// END_HTML -// - -#ifndef __ROOFIT_NOROOMINIMIZER - -#include "RooFit.h" -#include "Riostream.h" - -#include "TClass.h" - -#include -#include - -#include "TH1.h" -#include "TH2.h" -#include "TMarker.h" -#include "TGraph.h" -#include "TStopwatch.h" -#include "TDirectory.h" -#include "TMatrixDSym.h" - -#include "RooArgSet.h" -#include "RooArgList.h" -#include "RooAbsReal.h" -#include "RooAbsRealLValue.h" -#include "RooRealVar.h" -#include "RooAbsPdf.h" -#include "RooSentinel.h" -#include "RooMsgService.h" -#include "RooPlot.h" - - -#include "../interface/RooMinimizer.hh" -#include "RooFitResult.h" - -#include "Math/Minimizer.h" - -#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3) -char* operator+( streampos&, char* ); -#endif - -using namespace std; - -ClassImp(RooMinimizer) -; - -ROOT::Fit::Fitter *RooMinimizer::_theFitter = 0 ; - - - -//_____________________________________________________________________________ -void RooMinimizer::cleanup() -{ - // Cleanup method called by atexit handler installed by RooSentinel - // to delete all global heap objects when the program is terminated - if (_theFitter) { - delete _theFitter ; - _theFitter =0 ; - } -} - - - -//_____________________________________________________________________________ -RooMinimizer::RooMinimizer(RooAbsReal& function) -{ - // Construct MINUIT interface to given function. Function can be anything, - // but is typically a -log(likelihood) implemented by RooNLLVar or a chi^2 - // (implemented by RooChi2Var). Other frequent use cases are a RooAddition - // of a RooNLLVar plus a penalty or constraint term. This class propagates - // all RooFit information (floating parameters, their values and errors) - // to MINUIT before each MINUIT call and propagates all MINUIT information - // back to the RooFit object at the end of each call (updated parameter - // values, their (asymmetric errors) etc. The default MINUIT error level - // for HESSE and MINOS error analysis is taken from the defaultErrorLevel() - // value of the input function. - - RooSentinel::activate() ; - - // Store function reference - _extV = 0 ; - _func = &function ; - _optConst = kFALSE ; - _verbose = kFALSE ; - _profile = kFALSE ; - _profileStart = kFALSE ; - _printLevel = 1 ; - _minimizerType = "Minuit"; // default minimizer - - if (_theFitter) delete _theFitter ; - _theFitter = new ROOT::Fit::Fitter; - _fcn = new RooMinimizerFcn(_func,this,_verbose); - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - setEps(1.0); // default tolerance - // default max number of calls - _theFitter->Config().MinimizerOptions().SetMaxIterations(500*_fcn->NDim()); - _theFitter->Config().MinimizerOptions().SetMaxFunctionCalls(500*_fcn->NDim()); - - // Shut up for now - setPrintLevel(-1) ; - - // Use +0.5 for 1-sigma errors - setErrorLevel(_func->defaultErrorLevel()) ; - - // Declare our parameters to MINUIT - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - - // Now set default verbosity - if (RooMsgService::instance().silentMode()) { - setPrintLevel(-1) ; - } else { - setPrintLevel(1) ; - } -} - - - -//_____________________________________________________________________________ -RooMinimizer::~RooMinimizer() -{ - // Destructor - - if (_extV) { - delete _extV ; - } - - if (_fcn) { - delete _fcn; - } - -} - - - -//_____________________________________________________________________________ -void RooMinimizer::setStrategy(Int_t istrat) -{ - // Change MINUIT strategy to istrat. Accepted codes - // are 0,1,2 and represent MINUIT strategies for dealing - // most efficiently with fast FCNs (0), expensive FCNs (2) - // and 'intermediate' FCNs (1) - - _theFitter->Config().MinimizerOptions().SetStrategy(istrat); - -} - - - -//_____________________________________________________________________________ -void RooMinimizer::setErrorLevel(Double_t level) -{ - // Set the level for MINUIT error analysis to the given - // value. This function overrides the default value - // that is taken in the RooMinimizer constructor from - // the defaultErrorLevel() method of the input function - - _theFitter->Config().MinimizerOptions().SetErrorDef(level); - -} - - - -//_____________________________________________________________________________ -void RooMinimizer::setEps(Double_t eps) -{ - // Change MINUIT epsilon - - _theFitter->Config().MinimizerOptions().SetTolerance(eps); - -} - - -//_____________________________________________________________________________ -void RooMinimizer::setOffsetting(Bool_t flag) -{ - // Enable internal likelihood offsetting for enhanced numeric precision - //_func->enableOffsetting(flag) ; -} - - - - -//_____________________________________________________________________________ -void RooMinimizer::setMinimizerType(const char* type) -{ - // Choose the minimzer algorithm. - _minimizerType = type; -} - - - - -//_____________________________________________________________________________ -RooFitResult* RooMinimizer::fit(const char* options) -{ - // Parse traditional RooAbsPdf::fitTo driver options - // - // m - Run Migrad only - // h - Run Hesse to estimate errors - // v - Verbose mode - // l - Log parameters after each Minuit steps to file - // t - Activate profile timer - // r - Save fit result - // 0 - Run Migrad with strategy 0 - - TString opts(options) ; - opts.ToLower() ; - - // Initial configuration - if (opts.Contains("v")) setVerbose(1) ; - if (opts.Contains("t")) setProfile(1) ; - if (opts.Contains("l")) setLogFile(Form("%s.log",_func->GetName())) ; - if (opts.Contains("c")) optimizeConst(1) ; - - // Fitting steps - if (opts.Contains("0")) setStrategy(0) ; - migrad() ; - if (opts.Contains("0")) setStrategy(1) ; - if (opts.Contains("h")||!opts.Contains("m")) hesse() ; - if (!opts.Contains("m")) minos() ; - - return (opts.Contains("r")) ? save() : 0 ; -} - - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::minimize(const char* type, const char* alg) -{ - std::cout << "Hacker Shervin in action" << std::endl; - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - - // _theFitter->Config().SetMinimizer(type,alg); - - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MINIMIZE",_status) ; - - return _status ; -} - - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::migrad() -{ - // Execute MIGRAD. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"migrad"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MIGRAD",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::hesse() -{ - // Execute HESSE. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::hesse: Error, run Migrad before Hesse!" - << endl ; - _status = -1; - } - else { - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - bool ret = _theFitter->CalculateHessErrors(); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("HESSE",_status) ; - - } - - return _status ; - -} - -//_____________________________________________________________________________ -Int_t RooMinimizer::minos() -{ - // Execute MINOS. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::minos: Error, run Migrad before Minos!" - << endl ; - _status = -1; - } - else { - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - bool ret = _theFitter->CalculateMinosErrors(); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MINOS",_status) ; - - } - - return _status ; - -} - - -//_____________________________________________________________________________ -Int_t RooMinimizer::minos(const RooArgSet& minosParamList) -{ - // Execute MINOS for given list of parameters. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::minos: Error, run Migrad before Minos!" - << endl ; - _status = -1; - } - else if (minosParamList.getSize()>0) { - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - // get list of parameters for Minos - TIterator* aIter = minosParamList.createIterator() ; - RooAbsArg* arg ; - std::vector paramInd; - while((arg=(RooAbsArg*)aIter->Next())) { - RooAbsArg* par = _fcn->GetFloatParamList()->find(arg->GetName()); - if (par && !par->isConstant()) { - Int_t index = _fcn->GetFloatParamList()->index(par); - paramInd.push_back(index); - } - } - delete aIter ; - - if (paramInd.size()) { - // set the parameter indeces - _theFitter->Config().SetMinosErrors(paramInd); - - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - bool ret = _theFitter->CalculateMinosErrors(); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - } - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MINOS",_status) ; - - } - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::seek() -{ - // Execute SEEK. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"seek"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("SEEK",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::simplex() -{ - // Execute SIMPLEX. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"simplex"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("SEEK",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::improve() -{ - // Execute IMPROVE. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"migradimproved"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("IMPROVE",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::setPrintLevel(Int_t newLevel) -{ - // Change the MINUIT internal printing level - - Int_t ret = _printLevel ; - _theFitter->Config().MinimizerOptions().SetPrintLevel(newLevel+1); - _printLevel = newLevel+1 ; - return ret ; -} - -//_____________________________________________________________________________ -void RooMinimizer::optimizeConst(Int_t flag) -{ - // If flag is true, perform constant term optimization on - // function being minimized. - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - - if (_optConst && !flag){ - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: deactivating const optimization" << endl ; - _func->constOptimizeTestStatistic(RooAbsArg::DeActivate) ; - _optConst = flag ; - } else if (!_optConst && flag) { - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: activating const optimization" << endl ; - _func->constOptimizeTestStatistic(RooAbsArg::Activate,flag>1) ; - _optConst = flag ; - } else if (_optConst && flag) { - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: const optimization already active" << endl ; - } else { - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: const optimization wasn't active" << endl ; - } - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - -} - - - -//_____________________________________________________________________________ -RooFitResult* RooMinimizer::save(const char* userName, const char* userTitle) -{ - // Save and return a RooFitResult snaphot of current minimizer status. - // This snapshot contains the values of all constant parameters, - // the value of all floating parameters at RooMinimizer construction and - // after the last MINUIT operation, the MINUIT status, variance quality, - // EDM setting, number of calls with evaluation problems, the minimized - // function value and the full correlation matrix - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::save: Error, run minimization before!" - << endl ; - return 0; - } - - TString name,title ; - name = userName ? userName : Form("%s", _func->GetName()) ; - title = userTitle ? userTitle : Form("%s", _func->GetTitle()) ; - RooFitResult* fitRes = new RooFitResult(name,title) ; - - // Move eventual fixed parameters in floatList to constList - Int_t i ; - RooArgList saveConstList(*(_fcn->GetConstParamList())) ; - RooArgList saveFloatInitList(*(_fcn->GetInitFloatParamList())) ; - RooArgList saveFloatFinalList(*(_fcn->GetFloatParamList())) ; - for (i=0 ; i<_fcn->GetFloatParamList()->getSize() ; i++) { - RooAbsArg* par = _fcn->GetFloatParamList()->at(i) ; - if (par->isConstant()) { - saveFloatInitList.remove(*saveFloatInitList.find(par->GetName()),kTRUE) ; - saveFloatFinalList.remove(*par) ; - saveConstList.add(*par) ; - } - } - saveConstList.sort() ; - - fitRes->setConstParList(saveConstList) ; - fitRes->setInitParList(saveFloatInitList) ; - - fitRes->setStatus(_status) ; - fitRes->setCovQual(_theFitter->GetMinimizer()->CovMatrixStatus()) ; - fitRes->setMinNLL(_theFitter->Result().MinFcnValue()) ; - fitRes->setNumInvalidNLL(_fcn->GetNumInvalidNLL()) ; - fitRes->setEDM(_theFitter->Result().Edm()) ; - fitRes->setFinalParList(saveFloatFinalList) ; - if (!_extV) { - std::vector globalCC; - TMatrixDSym corrs(_theFitter->Result().Parameters().size()) ; - TMatrixDSym covs(_theFitter->Result().Parameters().size()) ; - for (UInt_t ic=0; ic<_theFitter->Result().Parameters().size(); ic++) { - globalCC.push_back(_theFitter->Result().GlobalCC(ic)); - for (UInt_t ii=0; ii<_theFitter->Result().Parameters().size(); ii++) { - corrs(ic,ii) = _theFitter->Result().Correlation(ic,ii); - covs(ic,ii) = _theFitter->Result().CovMatrix(ic,ii); - } - } - fitRes->fillCorrMatrix(globalCC,corrs,covs) ; - } else { - fitRes->setCovarianceMatrix(*_extV) ; - } - - fitRes->setStatusHistory(_statusHistory) ; - - return fitRes ; - -} - -//_____________________________________________________________________________ -RooPlot* RooMinimizer::contour(RooRealVar& var1, RooRealVar& var2, - Double_t n1, Double_t n2, Double_t n3, - Double_t n4, Double_t n5, Double_t n6) -{ - // Create and draw a TH2 with the error contours in parameters var1 and v2 at up to 6 'sigma' settings - // where 'sigma' is calculated as n*n*errorLevel - - RooArgList* params = _fcn->GetFloatParamList() ; - RooArgList* paramSave = (RooArgList*) params->snapshot() ; - - // Verify that both variables are floating parameters of PDF - Int_t index1= _fcn->GetFloatParamList()->index(&var1); - if(index1 < 0) { - coutE(Minimization) << "RooMinimizer::contour(" << GetName() - << ") ERROR: " << var1.GetName() - << " is not a floating parameter of " - << _func->GetName() << endl ; - return 0; - } - - Int_t index2= _fcn->GetFloatParamList()->index(&var2); - if(index2 < 0) { - coutE(Minimization) << "RooMinimizer::contour(" << GetName() - << ") ERROR: " << var2.GetName() - << " is not a floating parameter of PDF " - << _func->GetName() << endl ; - return 0; - } - - // create and draw a frame - RooPlot* frame = new RooPlot(var1,var2) ; - - // draw a point at the current parameter values - TMarker *point= new TMarker(var1.getVal(), var2.getVal(), 8); - frame->addObject(point) ; - - // remember our original value of ERRDEF - Double_t errdef= _theFitter->Config().MinimizerOptions().ErrorDef(); - - Double_t n[6] ; - n[0] = n1 ; n[1] = n2 ; n[2] = n3 ; n[3] = n4 ; n[4] = n5 ; n[5] = n6 ; - unsigned int npoints(50); - - for (Int_t ic = 0 ; ic<6 ; ic++) { - if(n[ic] > 0) { - // set the value corresponding to an n1-sigma contour - _theFitter->Config().MinimizerOptions().SetErrorDef(n[ic]*n[ic]*errdef); - - // calculate and draw the contour - Double_t *xcoor = new Double_t[npoints+1]; - Double_t *ycoor = new Double_t[npoints+1]; - bool ret = _theFitter->GetMinimizer()->Contour(index1,index2,npoints,xcoor,ycoor); - - if (!ret) { - coutE(Minimization) << "RooMinimizer::contour(" - << GetName() - << ") ERROR: MINUIT did not return a contour graph for n=" - << n[ic] << endl ; - } else { - xcoor[npoints] = xcoor[0]; - ycoor[npoints] = ycoor[0]; - TGraph* graph = new TGraph(npoints+1,xcoor,ycoor); - - graph->SetName(Form("contour_%s_n%f",_func->GetName(),n[ic])) ; - graph->SetLineStyle(ic+1) ; - graph->SetLineWidth(2) ; - graph->SetLineColor(kBlue) ; - frame->addObject(graph,"L") ; - } - - delete [] xcoor; - delete [] ycoor; - } - } - - - // restore the original ERRDEF - _theFitter->Config().MinimizerOptions().SetErrorDef(errdef); - - // restore parameter values - *params = *paramSave ; - delete paramSave ; - - return frame ; - -} - - -//_____________________________________________________________________________ -void RooMinimizer::profileStart() -{ - // Start profiling timer - if (_profile) { - _timer.Start() ; - _cumulTimer.Start(_profileStart?kFALSE:kTRUE) ; - _profileStart = kTRUE ; - } -} - - -//_____________________________________________________________________________ -void RooMinimizer::profileStop() -{ - // Stop profiling timer and report results of last session - if (_profile) { - _timer.Stop() ; - _cumulTimer.Stop() ; - coutI(Minimization) << "Command timer: " ; _timer.Print() ; - coutI(Minimization) << "Session timer: " ; _cumulTimer.Print() ; - } -} - - - - - -//_____________________________________________________________________________ -void RooMinimizer::applyCovarianceMatrix(TMatrixDSym& V) -{ - // Apply results of given external covariance matrix. i.e. propagate its errors - // to all RRV parameter representations and give this matrix instead of the - // HESSE matrix at the next save() call - - _extV = (TMatrixDSym*) V.Clone() ; - _fcn->ApplyCovarianceMatrix(*_extV); - -} - - - -RooFitResult* RooMinimizer::lastMinuitFit(const RooArgList& varList) -{ - // Import the results of the last fit performed, interpreting - // the fit parameters as the given varList of parameters. - - if (_theFitter==0 || _theFitter->GetMinimizer()==0) { - oocoutE((TObject*)0,InputArguments) << "RooMinimizer::save: Error, run minimization before!" - << endl ; - return 0; - } - - // Verify length of supplied varList - if (varList.getSize()>0 && varList.getSize()!=Int_t(_theFitter->Result().NTotalParameters())) { - oocoutE((TObject*)0,InputArguments) - << "RooMinimizer::lastMinuitFit: ERROR: supplied variable list must be either empty " << endl - << " or match the number of variables of the last fit (" - << _theFitter->Result().NTotalParameters() << ")" << endl ; - return 0 ; - } - - - // Verify that all members of varList are of type RooRealVar - TIterator* iter = varList.createIterator() ; - RooAbsArg* arg ; - while((arg=(RooAbsArg*)iter->Next())) { - if (!dynamic_cast(arg)) { - oocoutE((TObject*)0,InputArguments) << "RooMinimizer::lastMinuitFit: ERROR: variable '" - << arg->GetName() << "' is not of type RooRealVar" << endl ; - return 0 ; - } - } - delete iter ; - - RooFitResult* res = new RooFitResult("lastMinuitFit","Last MINUIT fit") ; - - // Extract names of fit parameters - // and construct corresponding RooRealVars - RooArgList constPars("constPars") ; - RooArgList floatPars("floatPars") ; - - UInt_t i ; - for (i = 0; i < _theFitter->Result().NTotalParameters(); ++i) { - - TString varName(_theFitter->Result().GetParameterName(i)); - Bool_t isConst(_theFitter->Result().IsParameterFixed(i)) ; - - Double_t xlo = _theFitter->Config().ParSettings(i).LowerLimit(); - Double_t xhi = _theFitter->Config().ParSettings(i).UpperLimit(); - Double_t xerr = _theFitter->Result().Error(i); - Double_t xval = _theFitter->Result().Value(i); - - RooRealVar* var ; - if (varList.getSize()==0) { - - if ((xlosetConstant(isConst) ; - } else { - - var = (RooRealVar*) varList.at(i)->Clone() ; - var->setConstant(isConst) ; - var->setVal(xval) ; - if (xlosetRange(xlo,xhi) ; - } - - if (varName.CompareTo(var->GetName())) { - oocoutI((TObject*)0,Eval) << "RooMinimizer::lastMinuitFit: fit parameter '" << varName - << "' stored in variable '" << var->GetName() << "'" << endl ; - } - - } - if (isConst) { - constPars.addOwned(*var) ; - } else { - var->setError(xerr) ; - floatPars.addOwned(*var) ; - } - } - - res->setConstParList(constPars) ; - res->setInitParList(floatPars) ; - res->setFinalParList(floatPars) ; - res->setMinNLL(_theFitter->Result().MinFcnValue()) ; - res->setEDM(_theFitter->Result().Edm()) ; - res->setCovQual(_theFitter->GetMinimizer()->CovMatrixStatus()) ; - res->setStatus(_theFitter->Result().Status()) ; - std::vector globalCC; - TMatrixDSym corrs(_theFitter->Result().Parameters().size()) ; - TMatrixDSym covs(_theFitter->Result().Parameters().size()) ; - for (UInt_t ic=0; ic<_theFitter->Result().Parameters().size(); ic++) { - globalCC.push_back(_theFitter->Result().GlobalCC(ic)); - for (UInt_t ii=0; ii<_theFitter->Result().Parameters().size(); ii++) { - corrs(ic,ii) = _theFitter->Result().Correlation(ic,ii); - covs(ic,ii) = _theFitter->Result().CovMatrix(ic,ii); - } - } - res->fillCorrMatrix(globalCC,corrs,covs) ; - - return res; - -} - -#endif From f4de6f72b134b2f468e285c3737fefa2cb06bf87 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 1 Jul 2013 13:57:44 +0200 Subject: [PATCH 010/475] updated selection value map production, dumping and ntuple selection cuts --- ZFitter/bin/ZFitter.cpp | 14 ++++---------- ZFitter/interface/RooSmearer.hh | 4 ++-- ZFitter/interface/SmearingImporter.hh | 4 ++-- ZFitter/interface/ZFit_class.hh | 2 +- ZFitter/src/ElectronCategory_class.cc | 12 ++++++++---- ZFitter/src/RooSmearer.cc | 2 +- ZFitter/src/SmearingImporter.cc | 6 ++---- ZFitter/src/ZFit_class.cc | 4 +--- ZFitter/src/addBranch_class.cc | 2 +- 9 files changed, 22 insertions(+), 28 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 269d3235171..1df4ffd5512 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -31,7 +31,7 @@ #include #include "Math/Minimizer.h" -#include "calibration/ZFitter/interface/RooMinimizer.hh" +#include "../interface/RooMinimizer.hh" #include #include @@ -934,7 +934,7 @@ int main(int argc, char **argv) { std::string initFileName; // bool savePUweightTree; std::string imgFormat="eps", outDirFitResMC="test/MC/fitres", outDirFitResData="test/dato/fitres", outDirImgMC="test/MC/img", outDirImgData="test/dato/img", outDirTable="test/dato/table", selection; - int eleID=0; + TString eleID=""; //std::vector signalFiles, bkgFiles, dataFiles; std::string commonCut; std::string corrEleFile, corrEleType; @@ -1107,13 +1107,6 @@ int main(int argc, char **argv) { return 1; } - if(selection=="WP80_PU") eleID=7; - else if (selection=="WP90_PU") eleID=3; - else if (selection=="fiducial") eleID=1; - else { // use better boost options - std::cerr << "[ERROR] Selection: " << selection << " not valid" << std::endl; - return 1; - } //if((vm.count("corrEleType") != vm.count("corrEleFile"))&&(vm.count("corrEleType") != vm.count("readDirect")) ){ //std::cout << "[ERROR] Either provide correction file name, or provide read direct option" << std::endl; @@ -1582,7 +1575,8 @@ int main(int argc, char **argv) { || vm.count("saveR9TreeWeight") ) return 0; - + eleID=selection.c_str(); + eleID.ReplaceAll("_",""); //------------------------------ RooSmearer RooArgSet args; diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index bdce0d68034..fbba4d19610 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -135,7 +135,7 @@ public: importer._scaleToy=scaleToy; importer._constTermToy=constTermToy; } - inline void SetEleID(int value){importer.SetEleID(value);}; + inline void SetEleID(TString value){importer.SetEleID(value);}; inline void SetCommonCut(TString cut){importer.SetCommonCut(cut);}; inline void SetHistBinning(double min, double max, double width){ @@ -147,7 +147,7 @@ public: } /// Initialize the categories: import from the tree - void Init(TString commonCut, int eleID, Long64_t nEvents=0, bool mcToy=false, TString initFile=""); + void Init(TString commonCut, TString eleID, Long64_t nEvents=0, bool mcToy=false, TString initFile=""); // TH1F *GetSmearedHisto(TString categoryName, // bool smearEnergy=false, TString histoName="") const; // TH1F *GetSmearedHisto(int categoryIndex, diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index b01c0da698a..002036bfcd1 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -40,7 +40,7 @@ public: inline void SetR9Weight(bool value){_useR9weight=value;}; inline void SetPtWeight(bool value){_usePtweight=value;}; inline void SetOnlyDiagonal(bool value){_onlyDiagonal=value;}; - inline void SetEleID(int value){_eleID=value;}; + inline void SetEleID(TString value){_eleID=value;}; inline void SetCommonCut(TString cut){_commonCut=cut;}; inline void SetSmearingEt(bool value){_isSmearingEt=value;}; @@ -53,7 +53,7 @@ private: TString _energyBranchName; TString _commonCut; - int _eleID; + TString _eleID; bool _isMC; bool _odd; bool _usePUweight; diff --git a/ZFitter/interface/ZFit_class.hh b/ZFitter/interface/ZFit_class.hh index 427593d23ce..ae4c7b02c11 100644 --- a/ZFitter/interface/ZFit_class.hh +++ b/ZFitter/interface/ZFit_class.hh @@ -106,7 +106,7 @@ public: TString GetEnergyVarName(TString name); //std::map ReadInitValuesFromFile(TString fileName); - void Import(TString commonCut, int eleID, std::set& branchList); + void Import(TString commonCut, TString eleID_, std::set& branchList); // this method makes the fit on data and MC void Fit(TString region="", bool doPlot=true); diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 4d24da74863..08071752fc7 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -643,10 +643,14 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TObjString *Objstring1 = (TObjString *) splitted->At(1); TString string1 = Objstring1->GetString(); - - - TCut cutEle1("eleID_ele1 >= "+string1); - TCut cutEle2("eleID_ele2 >= "+string1); + if(string1=="loose") string1="2"; + if(string1=="medium") string1="6"; + if(string1=="tight") string1="14"; + if(string1=="WP90PU") string1="16"; + if(string1=="WP80PU") string1="48"; + + TCut cutEle1("(eleID_ele1 & "+string1+")=="+string1); + TCut cutEle2("(eleID_ele2 & "+string1+")=="+string1); cut_string+=cutEle1 && cutEle2; cutSet.insert(TString(cutEle1 && cutEle2)); diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index e463d4d4afb..51e1aa7f3a4 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -937,7 +937,7 @@ void RooSmearer::SetNSmear(unsigned int n_smear, unsigned int nlltoy){ } -void RooSmearer::Init(TString commonCut, int eleID, Long64_t nEvents, bool mcToy, TString initFile){ +void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool mcToy, TString initFile){ _isDataSmeared=mcToy; bool toytoy=false; if(initFile.Sizeof()>1){ diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 84f2bbe4921..83e532bd944 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -14,7 +14,7 @@ SmearingImporter::SmearingImporter(std::vector regionList, TString ener _constTermToy(0.01), _energyBranchName(energyBranchName), _commonCut(commonCut), - _eleID(0), + _eleID("loose"), _usePUweight(true), _useR9weight(false), _usePtweight(false), @@ -360,9 +360,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, bool isMC, bool odd, Long64_t nEvents){ - TString eleID_="eleID_"; - eleID_+=_eleID; - + TString eleID_=_eleID; TString oddString; if(odd) oddString+="-odd"; diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index b01711d03f8..7e713652644 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -99,12 +99,10 @@ ZFit_class::ZFit_class(TChain *data_chain_, } -void ZFit_class::Import(TString commonCut, int eleID, std::set& branchList){ +void ZFit_class::Import(TString commonCut, TString eleID_, std::set& branchList){ signal_chain->Draw(">>list","runNumber>1","entrylist",10); TEntryList *l = (TEntryList*) gROOT->FindObject("list"); - TString eleID_; - eleID_+=eleID; commonCut+="-eleID_"+eleID_; TString mcCut, dataCut; if(l->GetN()>0){ // runDependent MC, treat it has data diff --git a/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc index 6a3131639fd..6363fc0a730 100644 --- a/ZFitter/src/addBranch_class.cc +++ b/ZFitter/src/addBranch_class.cc @@ -1,5 +1,5 @@ #include "../interface/addBranch_class.hh" -#include "calibration/ZFitter/interface/ElectronCategory_class.hh" +#include "../interface/ElectronCategory_class.hh" #include //#define NOFRIEND From 95e7e0a01f78322738d353d79273c87e7103ae39 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 1 Jul 2013 14:02:32 +0200 Subject: [PATCH 011/475] removed old WP selection from ntuple --- .../ALCARECOEcalCalIsolElectron_Output_cff.py | 2 +- ZNtupleDumper/python/elePat_cfi.py | 2 +- ZNtupleDumper/python/patSequence_cff.py | 7 ++++-- ZNtupleDumper/python/zntupledumper_cfi.py | 2 +- ZNtupleDumper/src/ZNtupleDumper.cc | 22 +++++++++++-------- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index 0a10a289353..0b040c17129 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -20,7 +20,7 @@ 'keep *_pfMet_*_*', 'keep *_kt6PFJetsForRhoCorrection_rho_*', 'keep *_kt6PFJets_rho_*', - 'keep *_offlinePrimaryVerticesWithBS_*_*', + 'keep *_offlinePrimaryVertices*_*_*', 'keep *BeamSpot_offlineBeamSpot_*_*', 'keep *_allConversions_*_*', 'keep *_conversions_*_*', diff --git a/ZNtupleDumper/python/elePat_cfi.py b/ZNtupleDumper/python/elePat_cfi.py index dc07e2ce400..18b82d47dd7 100644 --- a/ZNtupleDumper/python/elePat_cfi.py +++ b/ZNtupleDumper/python/elePat_cfi.py @@ -7,7 +7,7 @@ patElectrons.useParticleFlow = cms.bool( False ) patElectrons.addElectronID = cms.bool(False) patElectrons.addGenMatch = cms.bool(True) -patElectrons.pvSrc = cms.InputTag("offlinePrimaryVerticesWithBS") +patElectrons.pvSrc = cms.InputTag("offlinePrimaryVertices") #patElectrons.reducedBarrelRecHitCollection = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB") #patElectrons.reducedEndcapRecHitCollection = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE") patElectrons.reducedBarrelRecHitCollection = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits") diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index b69a28d5131..51f73aee2a5 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -23,7 +23,7 @@ eleRegressionEnergy.useRecHitCollections = cms.bool(True) eleRegressionEnergy.produceValueMaps = cms.bool(True) eleRegressionEnergy.rhoCollection = cms.InputTag('kt6PFJetsForRhoCorrection',"rho") -eleRegressionEnergy.vertexCollection = cms.InputTag('offlinePrimaryVerticesWithBS') +eleRegressionEnergy.vertexCollection = cms.InputTag('offlinePrimaryVertices') #------------------------------ electronID producer from calibration.EleSelectionProducers.eleselectionproducers_cfi import * @@ -56,7 +56,10 @@ fiducial = cms.InputTag("eleSelectionProducers", "fiducial"), WP70PU = cms.InputTag("eleSelectionProducers", "WP70PU"), WP80PU = cms.InputTag("eleSelectionProducers", "WP80PU"), - WP90PU = cms.InputTag("eleSelectionProducers", "WP90PU") + WP90PU = cms.InputTag("eleSelectionProducers", "WP90PU"), + loose = cms.InputTag("eleSelectionProducers", "loose"), + medium = cms.InputTag("eleSelectionProducers", "medium"), + tight = cms.InputTag("eleSelectionProducers", "tight") ) diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index a242c3a157a..dac4f2ea455 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -9,7 +9,7 @@ recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits"), recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits"), rhoFastJet = cms.InputTag('kt6PFJetsForRhoCorrection',"rho"), - vertexCollection = cms.InputTag('offlinePrimaryVerticesWithBS'), + vertexCollection = cms.InputTag('offlinePrimaryVertices'), BeamSpotCollection = cms.InputTag('offlineBeamSpot'), conversionCollection = cms.InputTag('allConversions'), metCollection = cms.InputTag('pfMet'), diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 46eaf52456d..d67d3df8571 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -460,12 +460,12 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); eleIter1++){ - if( eleIter1->electronID("WP70PU") ) + if( eleIter1->electronID("tight") ) { ++nWP70; continue; } - if( eleIter1->electronID("WP90PU") ) + if( eleIter1->electronID("loose") ) { ++nWP90; continue; @@ -475,9 +475,9 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); eleIter1++){ - if(! eleIter1->electronID("WP90PU") ) continue; + if(! eleIter1->electronID("loose") ) continue; if(isWenu){ - if(! eleIter1->electronID("WP70PU") ) continue; + if(! eleIter1->electronID("tight") ) continue; if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event // MET/MT selection @@ -498,7 +498,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe eleIter2 != electronsHandle->end(); eleIter2++){ // should exit when eleIter1 == end-1 - if(! eleIter2->electronID("WP90PU") ) continue; + if(! eleIter2->electronID("loose") ) continue; //pat::CompositeCandidate zeeCandidate; //if(! (eleIter1->electronID("WP90PU") && eleIter1->electronID("fiducial"))) continue; @@ -787,7 +787,8 @@ void ZNtupleDumper::TreeSetPileupVar(void){ //weight = puWeights.GetWeight( PVI->getPU_NumInteractions()); //weight = puWeights.GetWeight( PVI->getTrueNumInteractions()); //weight = 1.; - nPU[0]=PVI->getPU_NumInteractions(); + //nPU[0]=PVI->getPU_NumInteractions(); + nPU[0]=PVI->getTrueNumInteractions(); } } } else { @@ -928,9 +929,12 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int // make it a function eleID[index] = ((bool) electron1.electronID("fiducial")) << 0; - eleID[index] += ((bool) electron1.electronID("WP90PU")) << 1; - eleID[index] += ((bool) electron1.electronID("WP80PU")) << 2; - eleID[index] += ((bool) electron1.electronID("WP70PU")) << 3; + eleID[index] += ((bool) electron1.electronID("loose")) << 1; + eleID[index] += ((bool) electron1.electronID("medium")) << 2; + eleID[index] += ((bool) electron1.electronID("tight")) << 3; +// eleID[index] += ((bool) electron1.electronID("WP90PU")) << 4; +// eleID[index] += ((bool) electron1.electronID("WP80PU")) << 5; +// eleID[index] += ((bool) electron1.electronID("WP70PU")) << 6; classificationEle[index] = electron1.classification(); From a37eb2c01f24c7078b7046da76a479200722e572 Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 2 Jul 2013 00:46:58 +0200 Subject: [PATCH 012/475] fixed PUDumper with array for bunchcrossing, ntuple dumper with MET cut --- ALCARAW_RECO/interface/PUDumper.h | 15 ++++--- ALCARAW_RECO/python/alcaSkimming.py | 20 ++++++++- ALCARAW_RECO/src/PUDumper.cc | 44 ++++++++++++------- ...SimpleCutBasedElectronIDSelectionFunctor.h | 2 +- .../src/EleSelectionProducers.cc | 15 ++++++- ZNtupleDumper/src/ZNtupleDumper.cc | 6 ++- 6 files changed, 77 insertions(+), 25 deletions(-) diff --git a/ALCARAW_RECO/interface/PUDumper.h b/ALCARAW_RECO/interface/PUDumper.h index ce3d2924eba..2a710e57cd8 100644 --- a/ALCARAW_RECO/interface/PUDumper.h +++ b/ALCARAW_RECO/interface/PUDumper.h @@ -37,14 +37,19 @@ class PUDumper : public edm::EDAnalyzer private: - edm::InputTag MCPileupTag_; + //edm::InputTag MCPileupTag_; TTree* PUTree_; + + Int_t runNumber; ///< + Long64_t eventNumber; ///< + Int_t lumiBlock; ///< lumi section + //UInt_t runTime; ///< unix time - int runNumber_; - int BX_; - int nPUtrue_; - int nPUobs_; + Int_t nBX; + Int_t BX_[100]; + Int_t nPUtrue_[100]; + Int_t nPUobs_[100]; }; #endif diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index e9af75e5b6f..2ec8ed6a3b0 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -276,6 +276,15 @@ ################################# FILTERING EVENTS process.filterSeq = cms.Sequence() #process.load('calibration.ALCARAW_RECO.trackerDrivenFinder_cff') +if(options.type == "ALCARECOSIM"): + # PUDumper + process.load("calibration.ALCARAW_RECO.PUDumper_cfi") + process.TFileService = cms.Service( + "TFileService", + fileName = cms.string("PUDumper.root") + ) + process.filterSeq *= process.PUDumper + if (ZSkim): process.load('calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') @@ -301,6 +310,13 @@ +# +# particle flow isolation +# + +from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso +process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons') +process.pfiso = cms.Sequence(process.pfParticleSelectionSequence + process.eleIsoSequence) ############################### # ECAL Recalibration @@ -367,9 +383,9 @@ process.kt6PFJetsForRhoCorrection = process.kt6PFJets.clone(doRhoFastjet = True) process.kt6PFJetsForRhoCorrection.Rho_EtaMax = cms.double(2.5) if(options.skim!="fromWSkim"): - process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection) + process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection * process.pfiso) else: - process.rhoFastJetSeq = cms.Sequence() + process.rhoFastJetSeq = cms.Sequence(process.pfiso) ########################### diff --git a/ALCARAW_RECO/src/PUDumper.cc b/ALCARAW_RECO/src/PUDumper.cc index 9226fa205db..108f0845251 100644 --- a/ALCARAW_RECO/src/PUDumper.cc +++ b/ALCARAW_RECO/src/PUDumper.cc @@ -5,16 +5,20 @@ //! ctor PUDumper::PUDumper(const edm::ParameterSet& iConfig) { - MCPileupTag_ = iConfig.getParameter("MCPileupTag"); + // MCPileupTag_ = iConfig.getParameter("MCPileupTag"); // create TTree edm::Service fs; PUTree_ = fs -> make("pileup","pileup"); - PUTree_ -> Branch("runNumber",&runNumber_,"runNumber/I"); - PUTree_ -> Branch("BX", &BX_, "BX/I"); - PUTree_ -> Branch("nPUtrue", &nPUtrue_, "nPUtrue/I"); - PUTree_ -> Branch("nPUobs", &nPUobs_, "nPUobs/I"); + PUTree_ -> Branch("runNumber", &runNumber, "runNumber/I"); + PUTree_ -> Branch("eventNumber", &eventNumber, "eventNumber/l"); + PUTree_ -> Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); + + PUTree_ -> Branch("nBX", &nBX, "nBX/I"); + PUTree_ -> Branch("BX", BX_, "BX[nBX]/I"); + PUTree_ -> Branch("nPUtrue", nPUtrue_, "nPUtrue[nBX]/I"); + PUTree_ -> Branch("nPUobs", nPUobs_, "nPUobs[nBX]/I"); } // ---------------------------------------------------------------- @@ -34,26 +38,36 @@ void PUDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { // get the PU collection edm::Handle > PupInfo; - iEvent.getByLabel(MCPileupTag_,PupInfo); + if( !iEvent.isRealData() ){ + iEvent.getByLabel(edm::InputTag("addPileupInfo"), PupInfo); + } else return; + runNumber = iEvent.id().run(); + eventNumber = iEvent.id().event(); + if( iEvent.isRealData() ) { + lumiBlock = iEvent.luminosityBlock(); + } else { + lumiBlock = -1; + } + // loop on BX + nBX=0; std::vector::const_iterator PVI; - for(PVI = PupInfo->begin(); PVI != PupInfo->end(); ++PVI) - { - runNumber_ = iEvent.id().run(); - BX_ = PVI -> getBunchCrossing(); - nPUtrue_ = PVI -> getTrueNumInteractions(); - nPUobs_ = PVI -> getPU_NumInteractions(); - + for(PVI = PupInfo->begin(); PVI != PupInfo->end(); ++PVI){ + BX_[nBX] = PVI -> getBunchCrossing(); + nPUtrue_[nBX] = PVI -> getTrueNumInteractions(); + nPUobs_[nBX] = PVI -> getPU_NumInteractions(); +#ifdef DEBUG std::cout << "PUDumper::runNumber: " << runNumber_ << " BX: " << BX_ << " nPUtrue: " << nPUtrue_ << " nPUobs: " << nPUobs_ << std::endl; - - PUTree_ -> Fill(); +#endif + nBX++; } + PUTree_ -> Fill(); } DEFINE_FWK_MODULE(PUDumper); diff --git a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index 9911934f531..8b91e844c0f 100644 --- a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -1,7 +1,7 @@ #ifndef SimpleCutBasedElectronIDSelectionFunctorShervin_h #define SimpleCutBasedElectronIDSelectionFunctorShervin_h -#define DEBUG +//#define DEBUG #include "FWCore/MessageLogger/interface/MessageLogger.h" diff --git a/EleSelectionProducers/src/EleSelectionProducers.cc b/EleSelectionProducers/src/EleSelectionProducers.cc index f55b1202436..c304455504a 100644 --- a/EleSelectionProducers/src/EleSelectionProducers.cc +++ b/EleSelectionProducers/src/EleSelectionProducers.cc @@ -239,7 +239,20 @@ void EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& i tight_selector(eleRef, tight_ret); tight_vec.push_back(tight_selector.result()); - + if(((bool)tight_selector.result())){ + if(!(bool) medium_selector.result() || !(bool) loose_selector.result()){ + edm::LogError("Incoherent selection") << "passing tight but not medium or loose"; + exit (1); + } + } + + if(((bool)medium_selector.result())){ + if( !(bool) loose_selector.result()){ + edm::LogError("Incoherent selection") << "passing medium but not loose"; + exit (1); + } + } + // WP80_PU_vec.push_back((SelectionValue_t)WP80_PU_selector.bitMask()); // WP90_PU_vec.push_back((SelectionValue_t)WP90_PU_selector.bitMask()); #ifdef DEBUG diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index d67d3df8571..e8e90e55fe4 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -31,6 +31,7 @@ // root include files #include #include +#include #include #include @@ -480,8 +481,11 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(! eleIter1->electronID("tight") ) continue; if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event + reco::PFMET met = (*metHandle); /// \todo use corrected phi distribution + // MET/MT selection - // manca la met?!? -> ho aggiunto metHandle + if( met.et() < 25. ) continue; + if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 30. ) continue; TreeSetDiElectronVar(*eleIter1, *eleIter1); tree->Fill(); From d020b2950afd5af259c2e3bd73588a6537ae0eed Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 2 Jul 2013 01:04:13 +0200 Subject: [PATCH 013/475] fixed nPUtrue --- ALCARAW_RECO/interface/PUDumper.h | 2 +- ALCARAW_RECO/src/PUDumper.cc | 9 +++++---- ZNtupleDumper/src/ZNtupleDumper.cc | 5 ++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ALCARAW_RECO/interface/PUDumper.h b/ALCARAW_RECO/interface/PUDumper.h index 2a710e57cd8..d2d2bc9ba60 100644 --- a/ALCARAW_RECO/interface/PUDumper.h +++ b/ALCARAW_RECO/interface/PUDumper.h @@ -48,7 +48,7 @@ class PUDumper : public edm::EDAnalyzer Int_t nBX; Int_t BX_[100]; - Int_t nPUtrue_[100]; + Int_t nPUtrue_; Int_t nPUobs_[100]; }; diff --git a/ALCARAW_RECO/src/PUDumper.cc b/ALCARAW_RECO/src/PUDumper.cc index 108f0845251..3cb722116bc 100644 --- a/ALCARAW_RECO/src/PUDumper.cc +++ b/ALCARAW_RECO/src/PUDumper.cc @@ -17,7 +17,7 @@ PUDumper::PUDumper(const edm::ParameterSet& iConfig) PUTree_ -> Branch("nBX", &nBX, "nBX/I"); PUTree_ -> Branch("BX", BX_, "BX[nBX]/I"); - PUTree_ -> Branch("nPUtrue", nPUtrue_, "nPUtrue[nBX]/I"); + PUTree_ -> Branch("nPUtrue", &nPUtrue_, "nPUtrue/I"); PUTree_ -> Branch("nPUobs", nPUobs_, "nPUobs[nBX]/I"); } @@ -54,15 +54,16 @@ void PUDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) // loop on BX nBX=0; std::vector::const_iterator PVI; + nPUtrue_ = PupInfo -> begin()->getTrueNumInteractions(); + for(PVI = PupInfo->begin(); PVI != PupInfo->end(); ++PVI){ BX_[nBX] = PVI -> getBunchCrossing(); - nPUtrue_[nBX] = PVI -> getTrueNumInteractions(); nPUobs_[nBX] = PVI -> getPU_NumInteractions(); #ifdef DEBUG std::cout << "PUDumper::runNumber: " << runNumber_ - << " BX: " << BX_ + << " BX[1]: " << BX_[1] << " nPUtrue: " << nPUtrue_ - << " nPUobs: " << nPUobs_ + << " nPUobs[1]: " << nPUobs_[1] << std::endl; #endif nBX++; diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index e8e90e55fe4..ab954a3bace 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -12,7 +12,10 @@ - recHitCollection is included in the PAT electron collection, take it from there - take the R9 from the PAT electron: electron->r9() - flag for Zee or Wenu dump - - check maxNumberOfExpectedMissingHits[index] = electron1.gsfTrack()->trackerExpectedHitsInner().numberOfLostHits(); + - Use MET corrections + - https://twiki.cern.ch/twiki/bin/view/CMS/MissingET + - https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookMetAnalysis + - https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMETRecipe53X * */ From 6c0f3b58ccfc0419ad23f6a432cd7f2231b9d3d1 Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 2 Jul 2013 01:43:33 +0200 Subject: [PATCH 014/475] removed cout --- .../interface/SimpleCutBasedElectronIDSelectionFunctor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index 8b91e844c0f..80eba283a1b 100644 --- a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -541,7 +541,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector Date: Tue, 2 Jul 2013 09:45:12 +0200 Subject: [PATCH 015/475] starting parameter documentation --- EleSelectionProducers/src/EleSelectionProducers.cc | 14 +++++++++----- JsonFilter/src/JsonFilter.cc | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/EleSelectionProducers/src/EleSelectionProducers.cc b/EleSelectionProducers/src/EleSelectionProducers.cc index c304455504a..1c3f0d6706e 100644 --- a/EleSelectionProducers/src/EleSelectionProducers.cc +++ b/EleSelectionProducers/src/EleSelectionProducers.cc @@ -5,10 +5,6 @@ // /**\class EleSelectionProducers EleSelectionProducers.cc calibration/EleSelectionProducers/src/EleSelectionProducers.cc -Description: [one line class summary] - -Implementation: -[Notes on implementation] */ // // Original Author: Shervin Nourbakhsh,40 1-B24,+41227671643, @@ -346,7 +342,15 @@ EleSelectionProducers::fillDescriptions(edm::ConfigurationDescriptions& descript //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; - desc.setUnknown(); + desc.add("electronCollection","gsfElectrons"); + desc.add("rhoFastJet","kt6PFJetsForRhoCorrection:rho"); + desc.add("vertexCollection","offlinePrimaryVertices"); + desc.add("conversionCollection","allConversions"); + desc.add("BeamSpotCollection","offlineBeamSpot"); + desc.add("chIsoVals","elPFIsoValueCharged03PFIdPFIso"); + desc.add("emIsoVals","elPFIsoValueGamma03PFIdPFIso"); + desc.add("nhIsoVals","elPFIsoValueNeutral03PFIdPFIso"); + //desc.setUnknown(); descriptions.addDefault(desc); } diff --git a/JsonFilter/src/JsonFilter.cc b/JsonFilter/src/JsonFilter.cc index 957506fb53e..24ea785c528 100644 --- a/JsonFilter/src/JsonFilter.cc +++ b/JsonFilter/src/JsonFilter.cc @@ -274,7 +274,7 @@ JsonFilter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; desc.add("jsonFileName",""); - desc.setUnknown(); + //desc.setUnknown(); descriptions.addDefault(desc); } //define this as a plug-in From 11371ce9a04dc0b61e754c414f52f075136b6b80 Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 2 Jul 2013 12:49:04 +0200 Subject: [PATCH 016/475] progressing --- ALCARAW_RECO/alcareco_datasets.dat | 10 +++++++--- ALCARAW_RECO/python/alcaSkimming.py | 4 ++-- ALCARAW_RECO/scripts/prodAlcareco.sh | 12 ++++++++---- ALCARAW_RECO/scripts/prodFunctions.sh | 10 ++++++++++ 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index b2b71d34052..548d3abb0f9 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -1,12 +1,16 @@ ################### MC 53 +allRangeNew /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco +#allRangeNew /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/alcareco +allRangeNew /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco +#group/alca_ecalcalib/ecalelf/alcareco allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco #allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/alcareco allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco #group/alca_ecalcalib/ecalelf/alcareco ################### MC 53 RUN dependent -194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/alcareco -200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/alcareco -206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/alcareco +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco ################### MC geometries and material allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat10S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat10S30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat20S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat20S30 caf group/alca_ecalcalib/alcareco diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 2ec8ed6a3b0..10dd8601656 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -399,7 +399,7 @@ process.zNtupleDumper.recHitCollectionEE = process.patElectrons.reducedEndcapRecHitCollection.value() if(MC): - process.ntupleSeq = cms.Sequence(process.patSequenceMC * process.zNtupleDumper) + process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequenceMC * process.zNtupleDumper) else: process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequence * process.zNtupleDumper) @@ -543,7 +543,7 @@ process.jsonFilter.jsonFileName = cms.string(options.jsonFile) else: if(len(options.jsonFile)>0): - if(re.match("CMSSW_5_.*_.*",CMSSW_VERSION)): + if(re.match("CMSSW_5_.*_.*",CMSSW_VERSION) or re.match("CMSSW_6_.*_.*",CMSSW_VERSION)): # from CMSSW 5.0.0 import FWCore.PythonUtilities.LumiList as LumiList process.source.lumisToProcess = LumiList.LumiList(filename = options.jsonFile).getVLuminosityBlockRange() diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 29e645c0a34..9ecfd0f228d 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -31,6 +31,8 @@ usage(){ echo " --createOnly" echo " --submitOnly" echo " --check" + echo " --json_name jsonName: additional name in the folder structure to keep track of the used json" + echo " --json jsonFile.root" echo "----------" echo " --tutorial: tutorial mode, produces only one sample in you user area" } @@ -40,7 +42,7 @@ usage(){ #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check -- "$@") +if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name: -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -65,6 +67,8 @@ do --createOnly) unset SUBMIT;; --submitOnly) echo "[OPTION] submitOnly"; unset CREATE;; --check) echo "[OPTION] checking jobs"; unset CREATE; unset SUBMIT; CHECK=y; EXTRAOPTION="--check";; + --json) JSONFILE=$2; shift;; + --json_name) JSONNAME=$2; shift;; (--) shift; break;; (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; (*) break;; @@ -155,7 +159,7 @@ checkRelease ${DATASETPATH} USER_REMOTE_DIR=$USER_REMOTE_DIR_BASE/${ENERGY}/${DATASETNAME}/${RUNRANGE:-allRange} UI_WORKING_DIR=prod_alcareco/${DATASETNAME}/${RUNRANGE} -if [ "$RUNRANGE" == "allRange" ];then +if [ "$RUNRANGE" == "allRange" -o "`echo $RUNRANGE |grep -c -P '[0-9]+-[0-9]+'`" == "0" ];then unset RUNRANGE fi @@ -177,7 +181,7 @@ queue = cmscaf1nd datasetpath=${DATASETPATH} pset=python/alcaSkimming.py -pycfg_params=output=${OUTPUTFILE}.root skim=${SKIM} type=$TYPE +pycfg_params=output=${OUTPUTFILE}.root skim=${SKIM} type=$TYPE jsonFile=${JSONFILE} runselection=${RUNRANGE} split_by_run=0 @@ -208,7 +212,7 @@ use_parent=${USEPARENT} ui_working_dir=$UI_WORKING_DIR return_data = 0 copy_data = 1 -local_stage_out = 0 +local_stage_out = 1 storage_element=$STORAGE_ELEMENT user_remote_dir=$USER_REMOTE_DIR storage_path=$STORAGE_PATH diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index a58bbfc5aef..40e28a07d6f 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -102,3 +102,13 @@ setUserRemoteDirNtuple(){ if [ -n "${EXTRANAME}" ];then USER_REMOTE_DIR=$USER_REMOTE_DIR/${EXTRANAME}; fi # USER_REMOTE_DIR=$USER_REMOTE_DIR/unmerged } + +setUserRemoteDirAlcareco(){ + #$1=USER_REMOTE_DIR_BASE + if [ -z "${ENERGY}" -o -z "${DATASETNAME}" -o -z "${RUNRANGE}" ];then + echo "[ERROR] `basename $0`: ENERGY or DATASETNAME or RUNRANGE not defined" >> /dev/stderr + echo " ${ENERGY} or ${DATASETNAME} or ${RUNRANGE}" >> /dev/stderr + exit 1 + fi + USER_REMOTE_DIR=$1/${ENERGY}/${DATASETNAME}/${RUNRANGE} +} From 1df6a3bea3d6e059fe05fb614d0489b1ece5443e Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 2 Jul 2013 14:13:13 +0200 Subject: [PATCH 017/475] parameter check not fixed --- .../src/EleSelectionProducers.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/EleSelectionProducers/src/EleSelectionProducers.cc b/EleSelectionProducers/src/EleSelectionProducers.cc index 1c3f0d6706e..7e43215adb7 100644 --- a/EleSelectionProducers/src/EleSelectionProducers.cc +++ b/EleSelectionProducers/src/EleSelectionProducers.cc @@ -342,15 +342,15 @@ EleSelectionProducers::fillDescriptions(edm::ConfigurationDescriptions& descript //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; - desc.add("electronCollection","gsfElectrons"); - desc.add("rhoFastJet","kt6PFJetsForRhoCorrection:rho"); - desc.add("vertexCollection","offlinePrimaryVertices"); - desc.add("conversionCollection","allConversions"); - desc.add("BeamSpotCollection","offlineBeamSpot"); - desc.add("chIsoVals","elPFIsoValueCharged03PFIdPFIso"); - desc.add("emIsoVals","elPFIsoValueGamma03PFIdPFIso"); - desc.add("nhIsoVals","elPFIsoValueNeutral03PFIdPFIso"); - //desc.setUnknown(); +// desc.add("electronCollection","gsfElectrons"); +// desc.add("rhoFastJet","kt6PFJetsForRhoCorrection:rho"); +// desc.add("vertexCollection","offlinePrimaryVertices"); +// desc.add("conversionCollection","allConversions"); +// desc.add("BeamSpotCollection","offlineBeamSpot"); +// desc.add("chIsoVals","elPFIsoValueCharged03PFIdPFIso"); +// desc.add("emIsoVals","elPFIsoValueGamma03PFIdPFIso"); +// desc.add("nhIsoVals","elPFIsoValueNeutral03PFIdPFIso"); + desc.setUnknown(); descriptions.addDefault(desc); } From 5d7c5a4ae53e2285e52a49d746f6843714698240 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 3 Jul 2013 09:40:28 +0200 Subject: [PATCH 018/475] PFiso collections in ALCARECO --- ALCARAW_RECO/alcareco_datasets.dat | 12 ++--- ALCARAW_RECO/doc/alcareco.dump | 46 +++++++++++++++++++ .../ALCARECOEcalCalIsolElectron_Output_cff.py | 9 +++- 3 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 ALCARAW_RECO/doc/alcareco.dump diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 548d3abb0f9..3dac39d1435 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -1,11 +1,11 @@ ################### MC 53 -allRangeNew /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco -#allRangeNew /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/alcareco -allRangeNew /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco +#allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/ecalelf/alcareco +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco #group/alca_ecalcalib/ecalelf/alcareco -allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco -#allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/alcareco -allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/alcareco +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco +#allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/ecalelf/alcareco +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco #group/alca_ecalcalib/ecalelf/alcareco ################### MC 53 RUN dependent 194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco diff --git a/ALCARAW_RECO/doc/alcareco.dump b/ALCARAW_RECO/doc/alcareco.dump new file mode 100644 index 00000000000..5a3e98362a5 --- /dev/null +++ b/ALCARAW_RECO/doc/alcareco.dump @@ -0,0 +1,46 @@ +Type Module Label Process +------------------------------------------------------------------------------------------------- +edm::TriggerResults "TriggerResults" "" "HLT" +trigger::TriggerEvent "hltTriggerSummaryAOD" "" "HLT" +L1GlobalTriggerObjectMaps "l1L1GtObjectMap" "" "RECO" +L1GlobalTriggerReadoutRecord "gtDigis" "" "RECO" +double "kt6PFJets" "rho" "RECO" +edm::ConditionsInEventBlock "conditionsInEdm" "" "RECO" +edm::TriggerResults "TriggerResults" "" "RECO" +reco::BeamSpot "offlineBeamSpot" "" "RECO" +vector "l1extraParticles" "Isolated" "RECO" +vector "l1extraParticles" "NonIsolated" "RECO" +vector "l1extraParticles" "MET" "RECO" +vector "l1extraParticles" "MHT" "RECO" +vector "l1extraParticles" "" "RECO" +vector "l1extraParticles" "Central" "RECO" +vector "l1extraParticles" "Forward" "RECO" +vector "l1extraParticles" "Tau" "RECO" +vector "l1extraParticles" "" "RECO" +vector "hybridSuperClusters" "hybridBarrelBasicClusters" "RECO" +vector "multi5x5SuperClusters" "multi5x5EndcapBasicClusters" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "allConversions" "" "RECO" +vector "conversions" "" "RECO" +vector "gsfElectrons" "" "RECO" +vector "gsfElectronCores" "" "RECO" +vector "electronGsfTracks" "" "RECO" +vector "electronGsfTracks" "" "RECO" +vector "pfMet" "" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "multi5x5SuperClustersWithPreshower" "preshowerXClusters" "RECO" +vector "multi5x5SuperClustersWithPreshower" "preshowerYClusters" "RECO" +vector "multi5x5PreshowerClusterShape" "multi5x5PreshowerXClustersShape" "RECO" +vector "multi5x5PreshowerClusterShape" "multi5x5PreshowerYClustersShape" "RECO" +vector "correctedHybridSuperClusters" "" "RECO" +vector "correctedMulti5x5SuperClustersWithPreshower" "" "RECO" +vector "hybridSuperClusters" "" "RECO" +vector "multi5x5SuperClustersWithPreshower" "" "RECO" +vector "multi5x5SuperClusters" "multi5x5EndcapSuperClusters" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "offlinePrimaryVertices" "" "RECO" +vector "offlinePrimaryVerticesWithBS" "" "RECO" +double "kt6PFJetsForRhoCorrection" "rho" "ALCARECO" +edm::SortedCollection > "alCaIsolatedElectrons" "alcaBarrelHits" "ALCARECO" +edm::SortedCollection > "alCaIsolatedElectrons" "alcaEndcapHits" "ALCARECO" +edm::TriggerResults "TriggerResults" "" "ALCARECO" diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index 0b040c17129..45ff7b47ae1 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -50,7 +50,14 @@ 'keep edmConditionsInLumiBlock_conditionsInEdm_*_*', 'keep edmConditionsInRunBlock_conditionsInEdm_*_*', 'keep *_TriggerResults_*_*', - 'keep *_hltTriggerSummaryAOD_*_HLT' + 'keep *_hltTriggerSummaryAOD_*_HLT', + # pfisolation + 'keep *_elPFIsoValueCharged03PFIdPFIso_*_*', + 'keep *_elPFIsoValueGamma03PFIdPFIso_*_*', + 'keep *_elPFIsoValueNeutral03PFIdPFIso_*_*', + 'keep *_*_elPFIsoValueCharged03PFIdPFIso_*', + 'keep *_*_elPFIsoValueGamma03PFIdPFIso_*', + 'keep *_*_elPFIsoValueNeutral03PFIdPFIso_*' ) ) From 53934e3aada8b8f725b5e163fcfedd9c5d7e6993 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 3 Jul 2013 11:24:08 +0200 Subject: [PATCH 019/475] updating alcareco content --- .gitignore | 39 +++++++++++++++++++ ALCARAW_RECO/doc/alcareco.dump | 3 ++ ALCARAW_RECO/doc/alcareco.eventSize | 55 +++++++++++++++++++++++++++ ALCARAW_RECO/doc/alcarecoMC.dump | 47 +++++++++++++++++++++++ ALCARAW_RECO/doc/alcarecoMC.eventSize | 53 ++++++++++++++++++++++++++ ALCARAW_RECO/python/PUDumper_cfi.py | 6 +++ ALCARAW_RECO/python/alcaSkimming.py | 4 +- ALCARAW_RECO/tmp/.gitignore | 1 + 8 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 ALCARAW_RECO/doc/alcareco.eventSize create mode 100644 ALCARAW_RECO/doc/alcarecoMC.dump create mode 100644 ALCARAW_RECO/doc/alcarecoMC.eventSize create mode 100644 ALCARAW_RECO/python/PUDumper_cfi.py create mode 100644 ALCARAW_RECO/tmp/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..6ea95f24b4a --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +*.root +*.log +*~ +.svn +#.gitignore +prod_alcareco +prod_alcaraw +prod_ntuples +prod_alcarereco + +# root compiled macros +*_C.d +*_C.so + +# Compiled Object files +*.slo +*.lo +*.o + +# Compiled Dynamic libraries +*.so +*.dylib + +# Compiled Static libraries +*.lai +*.la +*.a + +# Compiled programs +*.exe + +*# + +# python +*.pyc +*__init__.py + +# patch +*.rej diff --git a/ALCARAW_RECO/doc/alcareco.dump b/ALCARAW_RECO/doc/alcareco.dump index 5a3e98362a5..8ed222aff6f 100644 --- a/ALCARAW_RECO/doc/alcareco.dump +++ b/ALCARAW_RECO/doc/alcareco.dump @@ -44,3 +44,6 @@ double "kt6PFJetsForRhoCorrection" "rho" edm::SortedCollection > "alCaIsolatedElectrons" "alcaBarrelHits" "ALCARECO" edm::SortedCollection > "alCaIsolatedElectrons" "alcaEndcapHits" "ALCARECO" edm::TriggerResults "TriggerResults" "" "ALCARECO" +edm::ValueMap "elPFIsoValueCharged03PFIdPFIso" "" "ALCARECO" +edm::ValueMap "elPFIsoValueGamma03PFIdPFIso" "" "ALCARECO" +edm::ValueMap "elPFIsoValueNeutral03PFIdPFIso" "" "ALCARECO" diff --git a/ALCARAW_RECO/doc/alcareco.eventSize b/ALCARAW_RECO/doc/alcareco.eventSize new file mode 100644 index 00000000000..2e6e99a6223 --- /dev/null +++ b/ALCARAW_RECO/doc/alcareco.eventSize @@ -0,0 +1,55 @@ + +File DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/alcareco_31_1_qHm.root Events 18753 +Branch Name | Average Uncompressed Size (Bytes/Event) | Average Compressed Size (Bytes/Event) +recoGsfTrackExtras_electronGsfTracks__RECO. 13745 11025.7 +triggerTriggerEvent_hltTriggerSummaryAOD__HLT. 17736.7 5996.67 +recoCaloClusters_multi5x5SuperClusters_multi5x5EndcapBasicClusters_RECO. 9820.42 3062.86 +recoConversions_allConversions__RECO. 10340.7 2221.79 +EcalRecHitsSorted_alCaIsolatedElectrons_alcaBarrelHits_ALCARECO. 3088.17 1741.96 +recoVertexs_offlinePrimaryVertices__RECO. 10899.7 1728.45 +recoVertexs_offlinePrimaryVerticesWithBS__RECO. 10896.3 1713.79 +EcalRecHitsSorted_alCaIsolatedElectrons_alcaEndcapHits_ALCARECO. 1814.24 1007.57 +recoGsfElectrons_gsfElectrons__RECO. 2291.9 855.276 +recoSuperClusters_correctedMulti5x5SuperClustersWithPreshower__RECO. 2984.34 823.662 +recoSuperClusters_multi5x5SuperClustersWithPreshower__RECO. 2984.24 687.069 +recoPreshowerClusters_multi5x5SuperClustersWithPreshower_preshowerYClusters_RECO. 2821.08 675.189 +recoPreshowerClusters_multi5x5SuperClustersWithPreshower_preshowerXClusters_RECO. 2686.04 637.657 +recoSuperClusters_multi5x5SuperClusters_multi5x5EndcapSuperClusters_RECO. 2984.39 609.229 +recoCaloClusters_hybridSuperClusters_hybridBarrelBasicClusters_RECO. 2598.38 600.726 +recoPreshowerClusters_pfElectronTranslator_pf_RECO. 3067.15 597.468 +recoGsfTracks_electronGsfTracks__RECO. 2158.55 597.214 +recoCaloClusters_pfElectronTranslator_pf_RECO. 1784.59 586.863 +recoSuperClusters_pfElectronTranslator_pf_RECO. 1952.36 567.932 +recoSuperClusters_correctedHybridSuperClusters__RECO. 2510.12 565.189 +recoConversions_conversions__RECO. 2596.49 531.694 +L1GlobalTriggerObjectMaps_l1L1GtObjectMap__RECO. 4363.76 494.201 +recoSuperClusters_hybridSuperClusters__RECO. 2510.03 464.837 +EventProductProvenance 2767.9 220.958 +L1GlobalTriggerReadoutRecord_gtDigis__RECO. 2134.28 160.064 +recoPFMETs_pfMet__RECO. 199.477 101.871 +edmTriggerResults_TriggerResults__HLT. 934.786 41.3388 +EventAuxiliary 130.509 39.1364 +recoPreshowerClusterShapes_multi5x5PreshowerClusterShape_multi5x5PreshowerYClustersShape_RECO. 110.48 31.6739 +recoPreshowerClusterShapes_multi5x5PreshowerClusterShape_multi5x5PreshowerXClustersShape_RECO. 110.48 28.6793 +l1extraL1EmParticles_l1extraParticles_Isolated_RECO. 347.688 22.8891 +l1extraL1JetParticles_l1extraParticles_Tau_RECO. 212.318 17.1153 +recoGsfElectronCores_gsfElectronCores__RECO. 173.559 14.5369 +doubleedmValueMap_elPFIsoValueGamma03PFIdPFIso__ALCARECO. 69.0283 14.5246 +l1extraL1EtMissParticles_l1extraParticles_MET_RECO. 157.573 11.6706 +l1extraL1EtMissParticles_l1extraParticles_MHT_RECO. 157.573 9.81651 +doubleedmValueMap_elPFIsoValueCharged03PFIdPFIso__ALCARECO. 69.0354 8.85336 +double_kt6PFJetsForRhoCorrection_rho_ALCARECO. 9.48275 8.09838 +l1extraL1EmParticles_l1extraParticles_NonIsolated_RECO. 66.0719 8.07199 +double_kt6PFJets_rho_RECO. 9.41449 8.02848 +doubleedmValueMap_elPFIsoValueNeutral03PFIdPFIso__ALCARECO. 69.0354 7.56188 +l1extraL1MuonParticles_l1extraParticles__RECO. 35.1031 7.29094 +recoBeamSpot_offlineBeamSpot__RECO. 367.573 7.13576 +edmConditionsInEventBlock_conditionsInEdm__RECO. 17.5051 6.7643 +l1extraL1JetParticles_l1extraParticles_Central_RECO. 41.5401 5.92044 +l1extraL1JetParticles_l1extraParticles_Forward_RECO. 43.5407 5.72372 +EventSelections 108.242 5.36421 +l1extraL1HFRingss_l1extraParticles__RECO. 101.511 5.02112 +edmTriggerResults_TriggerResults__RECO. 88.5024 3.8877 +edmTriggerResults_TriggerResults__ALCARECO. 76.5093 3.41647 +BranchListIndexes 22.4318 2.63771 + diff --git a/ALCARAW_RECO/doc/alcarecoMC.dump b/ALCARAW_RECO/doc/alcarecoMC.dump new file mode 100644 index 00000000000..c00485ca3a4 --- /dev/null +++ b/ALCARAW_RECO/doc/alcarecoMC.dump @@ -0,0 +1,47 @@ +Type Module Label Process +------------------------------------------------------------------------------------------------- +GenEventInfoProduct "generator" "" "SIM" +edm::TriggerResults "TriggerResults" "" "SIM" +vector "genParticles" "" "SIM" +vector "genParticles" "" "SIM" +edm::TriggerResults "TriggerResults" "" "HLT" +vector "addPileupInfo" "" "HLT" +trigger::TriggerEvent "hltTriggerSummaryAOD" "" "HLT" +L1GlobalTriggerObjectMaps "l1L1GtObjectMap" "" "RECO" +L1GlobalTriggerReadoutRecord "gtDigis" "" "RECO" +double "kt6PFJets" "rho" "RECO" +edm::ConditionsInEventBlock "conditionsInEdm" "" "RECO" +edm::TriggerResults "TriggerResults" "" "RECO" +reco::BeamSpot "offlineBeamSpot" "" "RECO" +vector "l1extraParticles" "Isolated" "RECO" +vector "l1extraParticles" "NonIsolated" "RECO" +vector "l1extraParticles" "MET" "RECO" +vector "l1extraParticles" "MHT" "RECO" +vector "l1extraParticles" "" "RECO" +vector "l1extraParticles" "Central" "RECO" +vector "l1extraParticles" "Forward" "RECO" +vector "l1extraParticles" "Tau" "RECO" +vector "l1extraParticles" "" "RECO" +vector "hybridSuperClusters" "hybridBarrelBasicClusters" "RECO" +vector "multi5x5SuperClusters" "multi5x5EndcapBasicClusters" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "allConversions" "" "RECO" +vector "conversions" "" "RECO" +vector "gsfElectrons" "" "RECO" +vector "gsfElectronCores" "" "RECO" +vector "electronGsfTracks" "" "RECO" +vector "pfMet" "" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "multi5x5SuperClustersWithPreshower" "preshowerXClusters" "RECO" +vector "multi5x5SuperClustersWithPreshower" "preshowerYClusters" "RECO" +vector "multi5x5PreshowerClusterShape" "multi5x5PreshowerXClustersShape" "RECO" +vector "multi5x5PreshowerClusterShape" "multi5x5PreshowerYClustersShape" "RECO" +vector "correctedHybridSuperClusters" "" "RECO" +vector "correctedMulti5x5SuperClustersWithPreshower" "" "RECO" +vector "pfElectronTranslator" "pf" "RECO" +vector "offlinePrimaryVertices" "" "RECO" +vector "offlinePrimaryVerticesWithBS" "" "RECO" +double "kt6PFJetsForRhoCorrection" "rho" "ALCARECO" +edm::SortedCollection > "alCaIsolatedElectrons" "alcaBarrelHits" "ALCARECO" +edm::SortedCollection > "alCaIsolatedElectrons" "alcaEndcapHits" "ALCARECO" +edm::TriggerResults "TriggerResults" "" "ALCARECO" diff --git a/ALCARAW_RECO/doc/alcarecoMC.eventSize b/ALCARAW_RECO/doc/alcarecoMC.eventSize new file mode 100644 index 00000000000..44b0418f9a2 --- /dev/null +++ b/ALCARAW_RECO/doc/alcarecoMC.eventSize @@ -0,0 +1,53 @@ + +File DYJets-Summer12-START53-ZSkim/allRange/alcareco_1_1_v8b.root Events 48342 +Branch Name | Average Uncompressed Size (Bytes/Event) | Average Compressed Size (Bytes/Event) +recoGenParticles_genParticles__SIM. 70959.9 11459.3 +triggerTriggerEvent_hltTriggerSummaryAOD__HLT. 29473.5 8889.52 +recoCaloClusters_multi5x5SuperClusters_multi5x5EndcapBasicClusters_RECO. 14672.4 5160.05 +recoSuperClusters_correctedMulti5x5SuperClustersWithPreshower__RECO. 8534.56 2351.57 +recoConversions_allConversions__RECO. 10799.7 2266.21 +recoVertexs_offlinePrimaryVertices__RECO. 13804.3 1968.74 +recoVertexs_offlinePrimaryVerticesWithBS__RECO. 13801.1 1944.55 +EcalRecHitsSorted_alCaIsolatedElectrons_alcaEndcapHits_ALCARECO. 3558.46 1924.9 +EcalRecHitsSorted_alCaIsolatedElectrons_alcaBarrelHits_ALCARECO. 2778.24 1408.71 +recoPreshowerClusters_multi5x5SuperClustersWithPreshower_preshowerYClusters_RECO. 8950.28 1371.3 +recoPreshowerClusters_multi5x5SuperClustersWithPreshower_preshowerXClusters_RECO. 8634.97 1314.05 +recoGsfElectrons_gsfElectrons__RECO. 2178.49 1212.21 +PileupSummaryInfos_addPileupInfo__HLT. 1458.33 920.299 +recoGsfTracks_electronGsfTracks__RECO. 2095.03 637.449 +recoCaloClusters_hybridSuperClusters_hybridBarrelBasicClusters_RECO. 2604.76 630.854 +recoSuperClusters_correctedHybridSuperClusters__RECO. 2560.81 606.91 +recoSuperClusters_pfElectronTranslator_pf_RECO. 1924.71 579.722 +recoCaloClusters_pfElectronTranslator_pf_RECO. 1666.7 578.294 +recoConversions_conversions__RECO. 2580.76 575.412 +recoPreshowerClusters_pfElectronTranslator_pf_RECO. 3523.59 536.256 +L1GlobalTriggerObjectMaps_l1L1GtObjectMap__RECO. 4371.85 450.816 +recoPFMETs_pfMet__RECO. 267.284 151.116 +L1GlobalTriggerReadoutRecord_gtDigis__RECO. 1951.73 103.397 +EventProductProvenance 2986.65 94.7541 +ints_genParticles__SIM. 2211.19 53.9183 +edmTriggerResults_TriggerResults__HLT. 960.603 52.2427 +l1extraL1EtMissParticles_l1extraParticles_MET_RECO. 178.476 44.5787 +l1extraL1EmParticles_l1extraParticles_Isolated_RECO. 296.062 44.5586 +l1extraL1EtMissParticles_l1extraParticles_MHT_RECO. 178.476 43.4775 +GenEventInfoProduct_generator__SIM. 190.506 43.1935 +l1extraL1JetParticles_l1extraParticles_Forward_RECO. 294.451 42.3591 +l1extraL1JetParticles_l1extraParticles_Tau_RECO. 296.906 41.9695 +recoGsfElectronCores_gsfElectronCores__RECO. 149.509 30.5239 +recoPreshowerClusterShapes_multi5x5PreshowerClusterShape_multi5x5PreshowerYClustersShape_RECO. 79.3693 28.653 +l1extraL1EmParticles_l1extraParticles_NonIsolated_RECO. 122.218 26.6034 +recoPreshowerClusterShapes_multi5x5PreshowerClusterShape_multi5x5PreshowerXClustersShape_RECO. 79.3693 25.0071 +l1extraL1JetParticles_l1extraParticles_Central_RECO. 118.629 24.5678 +l1extraL1HFRingss_l1extraParticles__RECO. 102.917 17.057 +l1extraL1MuonParticles_l1extraParticles__RECO. 115.34 16.4308 +EventAuxiliary 129.209 12.3274 +recoBeamSpot_offlineBeamSpot__RECO. 325.165 8.54392 +double_kt6PFJetsForRhoCorrection_rho_ALCARECO. 9.51163 8.15616 +double_kt6PFJets_rho_RECO. 9.43881 8.0892 +edmTriggerResults_TriggerResults__RECO. 82.5094 3.50811 +edmTriggerResults_TriggerResults__SIM. 78.5029 3.46274 +edmTriggerResults_TriggerResults__ALCARECO. 76.5213 3.4602 +EventSelections 107.209 3.3708 +BranchListIndexes 24.2029 2.29583 +edmConditionsInEventBlock_conditionsInEdm__RECO. 7.94373 1.08748 + diff --git a/ALCARAW_RECO/python/PUDumper_cfi.py b/ALCARAW_RECO/python/PUDumper_cfi.py new file mode 100644 index 00000000000..2c6fc8cc7e0 --- /dev/null +++ b/ALCARAW_RECO/python/PUDumper_cfi.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +PUDumper = cms.EDAnalyzer('PUDumper', +# vertexCollection = cms.InputTag('offlinePrimaryVertices'), +# foutName = cms.string("ZShervinNtuple.root"), + ) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 10dd8601656..555c59e2d80 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -238,8 +238,8 @@ process.GlobalTag.globaltag = 'GR_R_53_V9F::All' # GT for 53 rereco (2011) elif(re.match("CMSSW_5_3_7.*",CMSSW_VERSION)): if(MC): - print "[INFO] Using GT START53_V22::All" - process.GlobalTag.globaltag = 'START53_V22::All' + print "[INFO] Using GT START53_V24::All" + process.GlobalTag.globaltag = 'START53_V24::All' else: process.GlobalTag.globaltag = 'FT_R_53_V21::All' #22Jan rereco elif(re.match("CMSSW_5_3_9_patch3",CMSSW_VERSION)): diff --git a/ALCARAW_RECO/tmp/.gitignore b/ALCARAW_RECO/tmp/.gitignore new file mode 100644 index 00000000000..72e8ffc0db8 --- /dev/null +++ b/ALCARAW_RECO/tmp/.gitignore @@ -0,0 +1 @@ +* From be707df7d88fedc3bf17c739c3ce1cd2f07cbd94 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 3 Jul 2013 22:51:40 +0200 Subject: [PATCH 020/475] minor fix --- ALCARAW_RECO/scripts/prodAlcareco.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 9ecfd0f228d..995f8794324 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -154,7 +154,7 @@ setEnergy $DATASETPATH setStoragePath $STORAGE_ELEMENT $SCHEDULER -checkRelease ${DATASETPATH} +if [ -z "${CHECK}" ];then checkRelease ${DATASETPATH}; fi USER_REMOTE_DIR=$USER_REMOTE_DIR_BASE/${ENERGY}/${DATASETNAME}/${RUNRANGE:-allRange} UI_WORKING_DIR=prod_alcareco/${DATASETNAME}/${RUNRANGE} @@ -240,7 +240,7 @@ fi if [ -n "$SUBMIT" ]; then crab -c ${UI_WORKING_DIR} -submit all -else +elif [ -z "${CHECK}" ];then echo "##############################" echo "To start the crab jobs:" echo "crab -c ${UI_WORKING_DIR} -submit all" From 2dd9cde68df92bbf4db2bd4fc3241649425fd4c8 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 4 Jul 2013 02:53:35 +0200 Subject: [PATCH 021/475] no events passing the trigger, bug --- ZNtupleDumper/python/zntupledumper_cfi.py | 4 ++- ZNtupleDumper/src/ZNtupleDumper.cc | 37 ++++++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index dac4f2ea455..b5da8cde85c 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -18,7 +18,9 @@ doStandardTree = cms.bool(True), doExtraCalibTree = cms.bool(False), doEleIDTree = cms.bool(False), - isWenu = cms.bool(False) + isWenu = cms.bool(False), + #hltPaths = cms.vstring() + hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v17') #isMC = cms.bool(False), # jsonFile = cms.string(options.json), diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index ab954a3bace..105bf8a2289 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -114,7 +114,7 @@ #include //#define DEBUG - +#define TRIGGER //////////////////////////////////////////////// // class declaration // @@ -172,6 +172,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::InputTag conversionsProducerTAG; edm::InputTag metTAG; edm::InputTag triggerResultsTAG; + std::vector< std::string> hltPaths; private: std::string foutName; std::string regrPhoFile; @@ -196,6 +197,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { std::vector< std::string > HLTNames[1]; ///< List of HLT names std::vector HLTResults[1]; ///< 0=fail, 1=fire + std::map HLTBits; //pileup Float_t rho; ///< rho fast jet @@ -373,7 +375,8 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): triggerResultsTAG(iConfig.getParameter("triggerResultsCollection")), foutName(iConfig.getParameter("foutName")), doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), - doEleIDTree(iConfig.getParameter("doEleIDTree")) + doEleIDTree(iConfig.getParameter("doEleIDTree")), + hltPaths(iConfig.getParameter< std::vector >("hltPaths")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), //puWeightFile(iConfig.getParameter("puWeightFile")), //puWeights() @@ -454,8 +457,33 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetEventSummaryVar(iEvent); TreeSetPileupVar(); // this can be filled once per event - - + + // at least one of the triggers +#ifdef TRIGGER + bool triggerFire=false; + if(!hltPaths.empty()){ + for(std::vector::const_iterator hltPath_itr = hltPaths.begin(); + hltPath_itr != hltPaths.end(); + hltPath_itr++){ + if(hltPath_itr->empty()) continue; + std::map::const_iterator it = HLTBits.find(*hltPath_itr); + if(it!=HLTBits.end()){ + triggerFire+=it->second; + // std::cout << "Not empty:" << hltPaths[0] << "\t" << it->first << "\t" << it->second << "\t" << triggerFire << std::endl; + }else{ + + for(std::map::const_iterator it_ = HLTBits.begin(); + it_!=HLTBits.end(); + it_++){ + std::cout << "\t" << it_->first << "\t" << it_->second << std::endl; + } + edm::LogError("ZNtupleDumper") << "HLT path required but not find in TriggerResults" << " " << HLTBits.size(); + exit(1); + } + } + } + if(!triggerFire) return; +#endif // pat::CompositeCandidateCollection ZCandidatesCollection; // count electrons @@ -769,6 +797,7 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ std::string hltName_str(HLTNames_.triggerName(i)); (HLTNames[0]).push_back(hltName_str); HLTResults->push_back(triggerResultsHandle->accept(i)); + HLTBits.insert(std::pair( hltName_str, triggerResultsHandle->accept(i))); } // for i #endif From 2a90cb54381c28b18ce4e8724eaecd63fd813e38 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 4 Jul 2013 03:25:35 +0200 Subject: [PATCH 022/475] more trigger paths --- ZNtupleDumper/python/zntupledumper_cfi.py | 6 +++++- ZNtupleDumper/src/ZNtupleDumper.cc | 18 +++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index b5da8cde85c..8758eb22697 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -20,7 +20,11 @@ doEleIDTree = cms.bool(False), isWenu = cms.bool(False), #hltPaths = cms.vstring() - hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v17') + hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v15', +# 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v16', + 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v17', + 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v18', + ) #isMC = cms.bool(False), # jsonFile = cms.string(options.json), diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 105bf8a2289..df3bce22cbf 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -470,15 +470,15 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(it!=HLTBits.end()){ triggerFire+=it->second; // std::cout << "Not empty:" << hltPaths[0] << "\t" << it->first << "\t" << it->second << "\t" << triggerFire << std::endl; - }else{ - - for(std::map::const_iterator it_ = HLTBits.begin(); - it_!=HLTBits.end(); - it_++){ - std::cout << "\t" << it_->first << "\t" << it_->second << std::endl; - } - edm::LogError("ZNtupleDumper") << "HLT path required but not find in TriggerResults" << " " << HLTBits.size(); - exit(1); + //}else{ +// for(std::map::const_iterator it_ = HLTBits.begin(); +// it_!=HLTBits.end(); +// it_++){ +// std::cout << "\t" << it_->first << "\t" << it_->second << std::endl; +// } +// edm::LogError("ZNtupleDumper") << "HLT path required but not find in TriggerResults" << " " << HLTBits.size(); + //edm::LogWarning("ZNtupleDumper") << "HLT path " << *hltPath_itr << " required but not found in TriggerResults" << " " << HLTBits.size(); + //exit(1); } } } From fc8054b0ce15918b5beb65dfbac9b56af072ddab Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 4 Jul 2013 09:33:32 +0200 Subject: [PATCH 023/475] removed old datasets --- ALCARAW_RECO/alcareco_datasets.dat | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 3dac39d1435..d3ad52053fb 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -1,12 +1,6 @@ ################### MC 53 allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco -#allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/ecalelf/alcareco allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco -#group/alca_ecalcalib/ecalelf/alcareco -allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco -#allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-noSkim caf group/alca_ecalcalib/ecalelf/alcareco -allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco -#group/alca_ecalcalib/ecalelf/alcareco ################### MC 53 RUN dependent 194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco From 78cc0295bb7604f3f51af195f64d523b66917583 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 5 Jul 2013 10:12:59 +0200 Subject: [PATCH 024/475] removed HLT info from ntuples (too heavy), added trigger bit selection at ntuple production, script fixes --- ALCARAW_RECO/ntuple_datasets.dat | 34 ++++++++++++++++++++++++ ALCARAW_RECO/python/alcaSkimming.py | 2 +- ALCARAW_RECO/scripts/filelistDatasets.sh | 8 ++++++ ALCARAW_RECO/scripts/prodNtuples.sh | 12 ++++----- ALCARAW_RECO/scripts/resubmitCrab.sh | 3 +++ 5 files changed, 52 insertions(+), 7 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index f0dad507c0e..a1a5f75078a 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -93,3 +93,37 @@ allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10 203777-208686 /DoubleElectron/Run2012D-EcalCalElectron-22Jan2013-v1/ALCARECO DoubleElectron-ZAlcaSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 555c59e2d80..2d907576f15 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -276,7 +276,7 @@ ################################# FILTERING EVENTS process.filterSeq = cms.Sequence() #process.load('calibration.ALCARAW_RECO.trackerDrivenFinder_cff') -if(options.type == "ALCARECOSIM"): +if(options.type == "ALCARECOSIM" and (options.doTree==0 or (options.doTree==1 and options.doTreeOnly==0))): # PUDumper process.load("calibration.ALCARAW_RECO.PUDumper_cfi") process.TFileService = cms.Service( diff --git a/ALCARAW_RECO/scripts/filelistDatasets.sh b/ALCARAW_RECO/scripts/filelistDatasets.sh index 21d3b228a50..1909cdb0261 100755 --- a/ALCARAW_RECO/scripts/filelistDatasets.sh +++ b/ALCARAW_RECO/scripts/filelistDatasets.sh @@ -153,3 +153,11 @@ else fi fi + + +# remove PUDumper files! +if [ -n "$TAG" ];then + sed -i '/PUDumper/ d' filelist/*/*.list +else + sed -i '/PUDumper/ d' filelist/*.list +fi diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index e3537c91813..d8f854c6099 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -197,11 +197,11 @@ if [ "${TYPE}" == "ALCARERECO" ];then echo "[WARNING] Ntuple for rereco $TAG already done for ${RUNRAGE} ${DATASETNAME}" exit 0 fi -else - if [ "`cat ntuple_datasets.dat | grep -v ALCARERECO | grep ${DATASETNAME} | grep ${JSONNAME} | grep -c $RUNRANGE`" != "0" ];then - echo "[WARNING] Ntuple for $JSONNAME already done for ${RUNRANGE} ${DATASETNAME}" - exit 0 - fi +#else +# if [ "`cat ntuple_datasets.dat | grep -v ALCARERECO | grep ${DATASETNAME} | grep ${JSONNAME} | grep -c $RUNRANGE`" != "0" ];then +# echo "[WARNING] Ntuple for $JSONNAME already done for ${RUNRANGE} ${DATASETNAME}" +# exit 0 +# fi fi fi @@ -373,7 +373,7 @@ if [ -n "${CHECK}" ];then #echo $dir >> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" # else -# mergeOutput.sh -u ${UI_WORKING_DIR} + mergeOutput.sh -u ${UI_WORKING_DIR} fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" fi diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index 4375ded8dc5..b4ba20a52f9 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -132,6 +132,9 @@ for jobID in `seq 1 $nJobs` 9*9) intervals="$intervals $jobID" ;; + 50660*143) + intervals="$intervals $jobID" + ;; *) echo $jobID $ExitCode From 8cd8831f6936c698034039b094f87af3a6eb67aa Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 5 Jul 2013 14:31:51 +0200 Subject: [PATCH 025/475] new branch for trigger, hltPaths in cfg and full eleID loose etc. and WP80 etc. --- ALCARAW_RECO/scripts/resubmitCrab.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index b4ba20a52f9..059795c1c28 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -58,8 +58,8 @@ for jobID in `seq 1 $nJobs` continue; fi # se non c'e' deve essere running, accertarsene - jobReport=`find $ui_working_dir/res/ -name crab_fjr_$jobID.xml | head -1` - logReport=`find $ui_working_dir/res/ -name CMSSW_$jobID.stdout` + jobReport=`find $ui_working_dir/res/ -name crab_fjr_$jobID.xml |sort -r | head -1` + logReport=`find $ui_working_dir/res/ -name CMSSW_$jobID.stdout |sort -r | head -1` if [ ! -e "$jobReport" ];then echo "-> Missing $jobReport" From ad5394b8745fa448584cd0d5d48df71869cac857 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 5 Jul 2013 14:52:22 +0200 Subject: [PATCH 026/475] new branch for trigger, hltPaths in cfg and full eleID loose etc. and WP80 etc. --- ALCARAW_RECO/ntuple_datasets.dat | 7 +++++++ ZNtupleDumper/python/zntupledumper_cfi.py | 5 +++-- ZNtupleDumper/src/ZNtupleDumper.cc | 25 ++++++++++++++--------- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index a1a5f75078a..405ce0f55bd 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -127,3 +127,10 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index 8758eb22697..af3c9542f8e 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -19,11 +19,12 @@ doExtraCalibTree = cms.bool(False), doEleIDTree = cms.bool(False), isWenu = cms.bool(False), - #hltPaths = cms.vstring() +# hltPaths = cms.vstring() hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v15', -# 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v16', + 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v16', 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v17', 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v18', + 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v19' ) #isMC = cms.bool(False), diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index df3bce22cbf..49d99f33ddf 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -198,6 +198,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { std::vector< std::string > HLTNames[1]; ///< List of HLT names std::vector HLTResults[1]; ///< 0=fail, 1=fire std::map HLTBits; + Bool_t HLTfire; ///< true if pass the triggers indicated by hltPaths in cfg //pileup Float_t rho; ///< rho fast jet @@ -460,7 +461,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // at least one of the triggers #ifdef TRIGGER - bool triggerFire=false; + bool HLTfire=false; if(!hltPaths.empty()){ for(std::vector::const_iterator hltPath_itr = hltPaths.begin(); hltPath_itr != hltPaths.end(); @@ -468,7 +469,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(hltPath_itr->empty()) continue; std::map::const_iterator it = HLTBits.find(*hltPath_itr); if(it!=HLTBits.end()){ - triggerFire+=it->second; + HLTfire+=it->second; // std::cout << "Not empty:" << hltPaths[0] << "\t" << it->first << "\t" << it->second << "\t" << triggerFire << std::endl; //}else{ // for(std::map::const_iterator it_ = HLTBits.begin(); @@ -481,8 +482,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe //exit(1); } } - } - if(!triggerFire) return; + } else HLTfire=true; + //if(!triggerFire) return; #endif // pat::CompositeCandidateCollection ZCandidatesCollection; @@ -674,8 +675,11 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); tree->Branch("runTime", &runTime, "runTime/i"); - tree->Branch("HLTNames",&(HLTNames[0])); - tree->Branch("HLTResults",&(HLTResults[0])); +#ifdef TRIGGER + tree->Branch("HLTfire", &HLTfire, "HLTfire/B"); + //tree->Branch("HLTNames",&(HLTNames[0])); + //tree->Branch("HLTResults",&(HLTResults[0])); +#endif //extraCalibTree->Branch("XRecHitSCEle1", &(XRecHitSCEle[0])); // tree->Branch("nBX", &nBX, "nBX/I"); @@ -793,10 +797,11 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ edm::TriggerNames HLTNames_ = iEvent.triggerNames(*triggerResultsHandle); int hltCount = triggerResultsHandle->size(); HLTNames[0].clear(); + HLTBits.clear(); for (int i = 0 ; i != hltCount; ++i) { std::string hltName_str(HLTNames_.triggerName(i)); (HLTNames[0]).push_back(hltName_str); - HLTResults->push_back(triggerResultsHandle->accept(i)); + (HLTResults[0]).push_back(triggerResultsHandle->accept(i)); HLTBits.insert(std::pair( hltName_str, triggerResultsHandle->accept(i))); } // for i #endif @@ -968,9 +973,9 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int eleID[index] += ((bool) electron1.electronID("loose")) << 1; eleID[index] += ((bool) electron1.electronID("medium")) << 2; eleID[index] += ((bool) electron1.electronID("tight")) << 3; -// eleID[index] += ((bool) electron1.electronID("WP90PU")) << 4; -// eleID[index] += ((bool) electron1.electronID("WP80PU")) << 5; -// eleID[index] += ((bool) electron1.electronID("WP70PU")) << 6; + eleID[index] += ((bool) electron1.electronID("WP90PU")) << 4; + eleID[index] += ((bool) electron1.electronID("WP80PU")) << 5; + eleID[index] += ((bool) electron1.electronID("WP70PU")) << 6; classificationEle[index] = electron1.classification(); From 3b690df6df395a54df2fdeacfadab3d7a85f389a Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 5 Jul 2013 17:34:02 +0200 Subject: [PATCH 027/475] selection for trigger bit added --- ZFitter/bin/ZFitter.cpp | 2 +- ZFitter/script/energyScale.sh | 2 +- ZFitter/script/monitoring_validation.sh | 2 +- ZFitter/src/ElectronCategory_class.cc | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 1df4ffd5512..bbf400f04fd 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -988,7 +988,7 @@ int main(int argc, char **argv) { ("saveRootMacro","") // ("selection", po::value(&selection)->default_value("WP80_PU"),"") - ("commonCut", po::value(&commonCut)->default_value("Et_25"),"") + ("commonCut", po::value(&commonCut)->default_value("Et_25-trigger"),"") ("invMass_var", po::value(&invMass_var)->default_value("invMass_SC_regrCorr_ele"),"") ("invMass_min", po::value(&invMass_min)->default_value(65.),"") ("invMass_max", po::value(&invMass_max)->default_value(115.),"") diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 1c7874dba57..376eff42f1c 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -5,7 +5,7 @@ # - material dependence (step2) # - closure test (step3) -commonCut=Et_25 +commonCut=Et_25-trigger selection=WP90_PU invMass_var=invMass_SC_regrCorr_pho baseDir=test diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index a607d5441a5..f68bd73873d 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -1,7 +1,7 @@ #!/bin/bash #tag_name="" -commonCut=Et_25 +commonCut=Et_25-trigger selection=WP80_PU invMass_var=invMass_SC_regrCorr_ele invMass_min=65 diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 08071752fc7..84275fb5907 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -633,6 +633,7 @@ std::set ElectronCategory_class::GetCutSet(TString region){ } + //--------------- eleID if(string.Contains("eleID_")){ TObjArray *splitted = string.Tokenize("_"); @@ -1020,6 +1021,13 @@ std::set ElectronCategory_class::GetCutSet(TString region){ } + if(string.CompareTo("trigger")){ + cutSet.insert("HLTfire==1"); + } + if(string.CompareTo("notrigger")){ + cutSet.insert("HLTfire==0"); + } + //------------------------------ categorie particolari if(string.CompareTo("RefReg",TString::kIgnoreCase)==0 || string.CompareTo("REF_REG")==0 || string.CompareTo("EBRefReg",TString::kIgnoreCase)==0){ From 4e0d0969e7ba1e496b7194d087e4bae81476cfcd Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 6 Jul 2013 16:14:17 +0200 Subject: [PATCH 028/475] restored merging of ntuples --- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index d8f854c6099..217561fe669 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -372,7 +372,7 @@ if [ -n "${CHECK}" ];then if [ ! -e "${UI_WORKING_DIR}/res/finished" ];then #echo $dir >> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" -# else + else mergeOutput.sh -u ${UI_WORKING_DIR} fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" From 8878f8940f518575d7d00e9528ed899c6a1e4a16 Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 6 Jul 2013 18:21:39 +0200 Subject: [PATCH 029/475] new dat files with true PU --- ZFitter/bin/ZFitter.cpp | 15 ++++++----- .../data/validation/22Jan2012-runDepMC.dat | 26 +++++++++++++++++++ ZFitter/data/validation/22Jan2012-stdMC.dat | 22 ++++++++++++++++ 3 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 ZFitter/data/validation/22Jan2012-runDepMC.dat create mode 100644 ZFitter/data/validation/22Jan2012-stdMC.dat diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 1df4ffd5512..7b221ec8f1c 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1323,13 +1323,14 @@ int main(int argc, char **argv) { for(unsigned int i=0; i < mcPUFileNameVec.size(); i++){ TString mcPUFileName_=mcPUFileNameVec[i]; TString dataPUFileName_=dataPUFileNameVec[i]; - TString runMin_ = ""; - if(mcPUFileName_.Index(".runMin_")!=-1){ - runMin_=mcPUFileName_; - runMin_.Remove(0,runMin_.Index(".runMin_")+1); - runMin_.Remove(runMin_.First('.')); - runMin_.ReplaceAll("runMin_",""); - } + TString runMin_ = ""; + if(!mcPUFileName_.Contains("nPU")){ +// if(mcPUFileName_.Index(".runMin_")!=-1){ + runMin_=mcPUFileName_; + runMin_.Remove(runMin_.First('-')); +// runMin_.Remove(runMin_.First('.')); +// runMin_.ReplaceAll("runMin_",""); + } int runMin = runMin_.Sizeof()>1 ? runMin_.Atoi() : 1; std::cout << "********* runMin = " << runMin << "\t" << runMin_ << std::endl; puWeights.ReadFromFiles(mcPUFileName_.Data(),dataPUFileName_.Data(), runMin); diff --git a/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat new file mode 100644 index 00000000000..5fffbe2c310 --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-runDepMC.dat @@ -0,0 +1,26 @@ +############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection +########### standard MC +##### Madgraph +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/withTrgBit/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/withTrgBit/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/withTrgBit/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +########### Data +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/198022-203742-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root +##### PU trees +#s pileup mcPUTree-Winter13-powheg-RUNABCD.root +##### Scale correction trees +#d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root +##### Smearer category trees +#d smearerCat_d smearerCat_data-scaleStep2smearing_8.root +#s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat new file mode 100644 index 00000000000..de826f73c95 --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -0,0 +1,22 @@ +############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection +########### standard MC +##### Madgraph +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit/DYJets-Summer12-START53-ZSkim-allRange.root +s selected ##### Powheg +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root +########### Data +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root +##### PU trees +#s pileup mcPUTree-Winter13-powheg-RUNABCD.root +##### Scale correction trees +#d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root +##### Smearer category trees +#d smearerCat_d smearerCat_data-scaleStep2smearing_8.root +#s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root From cdd5b45e385e4cf72bc72295946384a2e58c3b1e Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 6 Jul 2013 18:23:50 +0200 Subject: [PATCH 030/475] fixes --- ALCARAW_RECO/scripts/mergeOutput.sh | 3 ++ ZFitter/script/PUDumperToHist.sh | 49 +++++++++++++++++++++++++++++ ZFitter/tmp/.gitignore | 1 + 3 files changed, 53 insertions(+) create mode 100755 ZFitter/script/PUDumperToHist.sh create mode 100644 ZFitter/tmp/.gitignore diff --git a/ALCARAW_RECO/scripts/mergeOutput.sh b/ALCARAW_RECO/scripts/mergeOutput.sh index bd9bf6ec9d2..3c53ed64dab 100755 --- a/ALCARAW_RECO/scripts/mergeOutput.sh +++ b/ALCARAW_RECO/scripts/mergeOutput.sh @@ -58,6 +58,9 @@ fi USER_REMOTE_DIR=`grep '^user_remote_dir=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` STORAGE_PATH=`grep 'storage_path=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` echo "RUNRANGE=${RUNRANGE:=`grep 'runselection=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2`}" +if [ -z "$RUNRANGE" ];then + echo "RUNRANGE=${RUNRANGE:=allRange}" +fi DATASETNAME=`echo ${USER_REMOTE_DIR} | sed "s|${RUNRANGE}.*||"` DATASETNAME=`basename $DATASETNAME` diff --git a/ZFitter/script/PUDumperToHist.sh b/ZFitter/script/PUDumperToHist.sh new file mode 100755 index 00000000000..67df827ffe4 --- /dev/null +++ b/ZFitter/script/PUDumperToHist.sh @@ -0,0 +1,49 @@ +#!/bin/bash + + +usage(){ + echo "`basename $0` " +} + +# options may be followed by one colon to indicate they have a required argument +if ! options=$(getopt -u -o hf: -l help -- "$@") +then + # something went wrong, getopt will put out an error message for us + exit 1 +fi + +set -- $options + +while [ $# -gt 0 ] +do + case $1 in + -h|--help) usage; exit 0;; + -f) FILE=$2; shift;; + (--) shift; break;; + (-*) usage; echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; + (*) break;; + esac + shift +done + + + +if [ -z "${FILE}" ];then + echo "[ERROR] PUDumper file not provided" >> /dev/stderr + exit 1 +fi + +FILEDIR=`dirname ${FILE}` + +cat >tmp/PUDumperToHist.C <>pileup","BX==0"); + TH1F *hist = gROOT->FindObject("pileup"); + hist->SaveAs("${FILEDIR}/nPUtrue.root"); +} +EOF + + +root -l -b -q tmp/PUDumperToHist.C diff --git a/ZFitter/tmp/.gitignore b/ZFitter/tmp/.gitignore new file mode 100644 index 00000000000..72e8ffc0db8 --- /dev/null +++ b/ZFitter/tmp/.gitignore @@ -0,0 +1 @@ +* From 0efa43983f325099ba7cb3301e7824b4243e4ccf Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 6 Jul 2013 19:29:18 +0200 Subject: [PATCH 031/475] fixed triggerBit requirement, reproducing ntuples --- ALCARAW_RECO/ntuple_datasets.dat | 3 +++ ZFitter/bin/ZFitter.cpp | 1 + ZFitter/data/validation/22Jan2012-stdMC.dat | 2 +- ZFitter/macro/PlotDataMC.C | 7 +++-- ZFitter/src/ElectronCategory_class.cc | 29 +++++++++++---------- ZNtupleDumper/src/ZNtupleDumper.cc | 2 +- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 405ce0f55bd..27e442dcba8 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -134,3 +134,6 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 451b79fbd51..f84384f3d0b 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1327,6 +1327,7 @@ int main(int argc, char **argv) { if(!mcPUFileName_.Contains("nPU")){ // if(mcPUFileName_.Index(".runMin_")!=-1){ runMin_=mcPUFileName_; + runMin_.Remove(0,runMin_.Last('/')+1); runMin_.Remove(runMin_.First('-')); // runMin_.Remove(runMin_.First('.')); // runMin_.ReplaceAll("runMin_",""); diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index de826f73c95..69f904c6a81 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -2,7 +2,7 @@ ########### standard MC ##### Madgraph s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit/DYJets-Summer12-START53-ZSkim-allRange.root -s selected ##### Powheg +##### Powheg s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root ########### Data d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 2cd5bfdd917..4d93ca00520 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -248,7 +248,7 @@ TCanvas *PlotDataMC(TChain *data, TChain *mc, TString branchname, TString binnin } - +#ifdef shervin TCanvas *PlotHLTDataMC(TChain *data, TChain *mc, TString branchname, TString binning, TString category, TString selection, @@ -280,7 +280,7 @@ TCanvas *PlotHLTDataMC(TChain *data, TChain *mc, TString branchname, TString bin for(std::vector::const_iterator hlt_itr=HLTNames[0].begin(); hlt_itr!=HLTNames[0].end(); hlt_itr++,hltRes_itr++){ - hlt_data->SetBinLabel(hlt_itr-HLTNames[0].begin()+1,(*hlt_itr).c_str()); + hlt_data->GetXaxis()->SetBinLabel(hlt_itr-HLTNames[0].begin()+1,(*hlt_itr).c_str()); } TCanvas *c = new TCanvas("c",""); @@ -288,3 +288,6 @@ TCanvas *PlotHLTDataMC(TChain *data, TChain *mc, TString branchname, TString bin hlt_data->Draw(); return c; } + + +#endif diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 84275fb5907..0a7f7cf5363 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -1,4 +1,4 @@ -//#define DEBUG +#define DEBUG #include "../interface/ElectronCategory_class.hh" #define OldDefinitions #define GAP @@ -1021,11 +1021,13 @@ std::set ElectronCategory_class::GetCutSet(TString region){ } - if(string.CompareTo("trigger")){ - cutSet.insert("HLTfire==1"); - } - if(string.CompareTo("notrigger")){ - cutSet.insert("HLTfire==0"); + if(string.CompareTo("trigger")==0){ + cutSet.insert(TString("HLTfire==1")); + continue; + } + if(string.CompareTo("notrigger")==0){ + cutSet.insert(TString("HLTfire==0")); + continue; } @@ -1165,22 +1167,21 @@ std::set ElectronCategory_class::GetCutSet(TString region){ - - std::cout << "[WARNING] Region " << string << " not found" << std::endl; } #ifdef DEBUG std::cout << "Cut string: " << std::endl; - cut_string.Print(); + for(std::set::const_iterator itr = cutSet.begin(); + itr != cutSet.end(); + itr++){ + TString cut_string = *itr; + std::cout << cut_string << std::endl; + } + // cut_string.Print(); #endif - if(TString(cut_string).Sizeof()<=1){ - std::cerr << "[ERROR]: region " << region << " not defined" << std::endl; - // return "error"; - } - // noPF electrons for the calibration cut_string+=noPFEle_cut; cutSet.insert(TString(noPFEle_cut)); diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 49d99f33ddf..43fcd979b62 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -461,7 +461,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // at least one of the triggers #ifdef TRIGGER - bool HLTfire=false; + HLTfire=false; if(!hltPaths.empty()){ for(std::vector::const_iterator hltPath_itr = hltPaths.begin(); hltPath_itr != hltPaths.end(); From ecacb14d0e8e37074fc44fd360883927cb93cb35 Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 7 Jul 2013 01:14:30 +0200 Subject: [PATCH 032/475] fixed electron category selection --- ZFitter/macro/PlotDataMC.C | 4 +++- ZFitter/src/ElectronCategory_class.cc | 16 ++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 4d93ca00520..3a77d5c281f 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -180,7 +180,9 @@ TCanvas *PlotDataMC(TChain *data, TChain *mc, TString branchname, TString binnin s->GetMaximum() ///s->Integral() ); max=1.1*d->GetMaximum(); - std::cout << max << std::endl; + std::cout << "max = " << max << std::endl; + std::cout << "nEvents data: " << d->Integral() << "\t" << d->GetEntries() << std::endl; + std::cout << "nEvents signal: " << s->Integral() << "\t" << s->GetEntries() << std::endl; if(logy){ max*=10; d->GetYaxis()->SetRangeUser(0.1,max); diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 0a7f7cf5363..7bf22e84d5c 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -1,4 +1,4 @@ -#define DEBUG +//#define DEBUG #include "../interface/ElectronCategory_class.hh" #define OldDefinitions #define GAP @@ -1165,7 +1165,16 @@ std::set ElectronCategory_class::GetCutSet(TString region){ // } + if(string.Contains("fiducial")){ + cut_string+=fiducial_cut; + cutSet.insert(TString(fiducial_cut)); + } + if(string.Contains("noPF")){ + // noPF electrons for the calibration + cut_string+=noPFEle_cut; + cutSet.insert(TString(noPFEle_cut)); + } std::cout << "[WARNING] Region " << string << " not found" << std::endl; @@ -1182,11 +1191,6 @@ std::set ElectronCategory_class::GetCutSet(TString region){ // cut_string.Print(); #endif - // noPF electrons for the calibration - cut_string+=noPFEle_cut; - cutSet.insert(TString(noPFEle_cut)); - cut_string+=fiducial_cut; - cutSet.insert(TString(fiducial_cut)); #ifdef DEBUG From f2547f09e184e82a3ba41a307948a5be13a3c0b1 Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 7 Jul 2013 01:31:23 +0200 Subject: [PATCH 033/475] fixed electron category selection --- ZFitter/src/ElectronCategory_class.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 7bf22e84d5c..0dc6a95a8f8 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -1168,12 +1168,14 @@ std::set ElectronCategory_class::GetCutSet(TString region){ if(string.Contains("fiducial")){ cut_string+=fiducial_cut; cutSet.insert(TString(fiducial_cut)); + continue; } if(string.Contains("noPF")){ // noPF electrons for the calibration cut_string+=noPFEle_cut; cutSet.insert(TString(noPFEle_cut)); + continue; } std::cout << "[WARNING] Region " << string << " not found" << std::endl; From 67a17be603a2c3555fcd8c919901dff6817ea42d Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 7 Jul 2013 17:48:55 +0200 Subject: [PATCH 034/475] removed loose preselection for ntuple production, many fixes --- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- ALCARAW_RECO/scripts/resubmitCrab.sh | 6 +- .../data/validation/22Jan2012-runDepMC.dat | 14 ++-- ZFitter/data/validation/22Jan2012-stdMC.dat | 14 ++-- ZFitter/macro/standardDataMC.C | 84 ++++++++++--------- ZFitter/src/ElectronCategory_class.cc | 2 +- ZNtupleDumper/src/ZNtupleDumper.cc | 4 +- 7 files changed, 64 insertions(+), 62 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index d8f854c6099..217561fe669 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -372,7 +372,7 @@ if [ -n "${CHECK}" ];then if [ ! -e "${UI_WORKING_DIR}/res/finished" ];then #echo $dir >> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" -# else + else mergeOutput.sh -u ${UI_WORKING_DIR} fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index 059795c1c28..4bd169c9cbf 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -122,9 +122,9 @@ for jobID in `seq 1 $nJobs` # echo $jobID $ExitCode intervals="$intervals $jobID" ;; - 6*6) - intervals="$intervals $jobID" - ;; +# 6*6) +# intervals="$intervals $jobID" +# ;; 8001*8001) echo $jobID $ExitCode # intervals="$intervals $jobID" diff --git a/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat index 5fffbe2c310..47eefc88b2d 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMC.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMC.dat @@ -1,14 +1,14 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/withTrgBit/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/withTrgBit/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/withTrgBit/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root ########### Data -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root ########### Friend trees ##### PU histograms d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index 69f904c6a81..d9073048961 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -1,20 +1,20 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit/DYJets-Summer12-START53-ZSkim-allRange.root +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-allRange.root ##### Powheg -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root ########### Data -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root ########### Friend trees ##### PU histograms d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root ##### PU trees -#s pileup mcPUTree-Winter13-powheg-RUNABCD.root +s pileup mcPUtree-RUNABCD-stdMC.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees diff --git a/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C index ab686518842..81cb0f239e4 100644 --- a/ZFitter/macro/standardDataMC.C +++ b/ZFitter/macro/standardDataMC.C @@ -1,111 +1,113 @@ { + TString commonCut="eleID_WP80PU-Et_25-noPF-trigger"; //TString outputPath="tmp/"; //test/dato/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011/WP80_PU/img/"; //TString outputPath="test/dato/moriond2013/WP80_PU/img/"; - c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EB-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "nHits SC", ""); + outputPath+="/"+commonCut+"/"; + c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", ""); c->SaveAs(outputPath+"/nHitsSCEle-EB.eps"); delete c; - - c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EB-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "nHits SC", "",true); + + c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", "",true); c->SaveAs(outputPath+"/nHitsSCEle-EB-log.eps"); delete c; - - c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EE-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "nHits SC", ""); + + c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", ""); c->SaveAs(outputPath+"/nHitsSCEle-EE.eps"); delete c; - - c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EE-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "nHits SC", "",true ); + + c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", "",true ); c->SaveAs(outputPath+"/nHitsSCEle-EE-log.eps"); delete c; -} + // regression comparison - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Electron (Hgg) regression/std. SC -1 ", ""); + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCEle_stdSC-EB.eps"); delete c; - - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Photon (Hgg) regression/std. SC -1 ", ""); + + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Photon (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCPho_stdSC-EB.eps"); delete c; - - c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Electron (Egamma) regression/std. SC -1 ", ""); + + c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Egamma) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EB.eps"); delete c; - - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Electron (Hgg) regression/std. SC -1 ", ""); + + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCEle_stdSC-EE.eps"); delete c; - - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Photon (Hgg) regression/std. SC -1 ", ""); + + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Photon (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCPho_stdSC-EE.eps"); delete c; - - c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Electron (Egamma) regression/std. SC -1 ", ""); + + c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Egamma) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EE.eps"); delete c; - - + + // cluster corrections and ES energy fraction - c = PlotDataMC(data, signal, "esEnergySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0,0.2)", "absEta_1.7_2.5-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "ES energy fraction: ES/(rawSC+ES) ", ""); + c = PlotDataMC(data, signal, "esEnergySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0,0.2)", "absEta_1.7_2.5-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "ES energy fraction: ES/(rawSC+ES) ", ""); c->SaveAs(outputPath+"/esEnergyFraction.eps"); delete c; - c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EB-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); + c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); c->SaveAs(outputPath+"/energyCorrections_EB.eps"); delete c; - - c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EE-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); + + c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); c->SaveAs(outputPath+"/energyCorrections_EE.eps"); delete c; // pileup - c = PlotDataMC(data, signal, "nPV", "(30,0,30)", "eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "nVtx", ""); + c = PlotDataMC(data, signal, "nPV", "(30,0,30)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "nVtx", ""); c->SaveAs(outputPath+"nPV.eps"); delete c; - c = PlotDataMC(data, signal, "rho", "(60,-1,29)", "eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "#rho", ""); + c = PlotDataMC(data, signal, "rho", "(60,-1,29)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "#rho", ""); c->SaveAs(outputPath+"rho.eps"); delete c; - + // kinematic variables - c = PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "eleID_7", "", "Data 2012 (Winter13)", "Simulation", "energy SC [GeV]", ""); + c = PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "eleID_WP80PU", "", "Data 2012 (Winter13)", "Simulation", "energy SC [GeV]", ""); c->SaveAs(outputPath+"energySCEle.eps"); delete c; - c = PlotDataMC(data, signal, "etaEle", "(100,-2.5,2.5)", "eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "#eta", ""); + c = PlotDataMC(data, signal, "etaEle", "(100,-2.5,2.5)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "#eta", ""); c->SaveAs(outputPath+"etaEle.eps"); delete c; - c = PlotDataMC(data, signal, "phiEle", "(100,-5,5)", "eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "#phi", ""); + c = PlotDataMC(data, signal, "phiEle", "(100,-5,5)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "#phi", ""); c->SaveAs(outputPath+"phiEle.eps"); delete c; - - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "R_{9}", ""); + + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", ""); c->SaveAs(outputPath+"R9Ele_EB.eps"); delete c; - - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "R_{9}", "",true); + + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", "",true); c->SaveAs(outputPath+"R9Ele_EB-log.eps"); delete c; - - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "R_{9}", ""); + + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", ""); c->SaveAs(outputPath+"R9Ele_EE.eps"); delete c; - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-eleID_7-Et_25", "", "Data 2012 (Winter13)", "Simulation", "R_{9}", "",true); + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", "",true); c->SaveAs(outputPath+"R9Ele_EE-log.eps"); // Checking fit selection } - c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); c->SaveAs(outputPath+"EERefRegMap.eps"); delete c; } - c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(171,-85,86,361,0,361)", "EBRefReg-gold-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(171,-85,86,361,0,361)", "EBRefReg-gold-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); c->SaveAs(outputPath+"EBRefRegMap.eps"); delete c; - c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-eleID_7-Et_25","", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); c->SaveAs(outputPath+"EERefRegMap.eps"); delete c; diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 0dc6a95a8f8..77e5b361193 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -192,7 +192,7 @@ std::set ElectronCategory_class::GetCutSet(TString region){ // EB+ : 2, 4, 5, 8, 11 // (17:58:27) Riccardo Paramatti: EB- : 7, 9, 10, 16, 17 TCut noPFEle_cut = "recoFlagsEle_ele1 > 1 && recoFlagsEle_ele2 > 1"; - TCut fiducial_cut = "eleID%2==1"; + TCut fiducial_cut = "eleID[0]%2==1 && eleID[1]%2==1"; /* se region contiene runNumber: prendi il primo range dal primo _ _ dopo runNumber diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 43fcd979b62..8f87f9d4e08 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -508,7 +508,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); eleIter1++){ - if(! eleIter1->electronID("loose") ) continue; + //if(! eleIter1->electronID("loose") ) continue; if(isWenu){ if(! eleIter1->electronID("tight") ) continue; if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event @@ -534,7 +534,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe eleIter2 != electronsHandle->end(); eleIter2++){ // should exit when eleIter1 == end-1 - if(! eleIter2->electronID("loose") ) continue; + //if(! eleIter2->electronID("loose") ) continue; //pat::CompositeCandidate zeeCandidate; //if(! (eleIter1->electronID("WP90PU") && eleIter1->electronID("fiducial"))) continue; From ebd1cb9b9aa1baa877746c35d12dd94b29532074 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 7 Jul 2013 17:56:41 +0200 Subject: [PATCH 035/475] pileup weight tree on afs --- ZFitter/data/validation/22Jan2012-stdMC.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index d9073048961..b7274c04968 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -14,7 +14,7 @@ d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8Te d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root ##### PU trees -s pileup mcPUtree-RUNABCD-stdMC.root +s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMC_powheg-RUN2012ABCD.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees From 2296da1f620ebc621dd8786911969ae3bcae7838 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 9 Jul 2013 09:19:29 +0200 Subject: [PATCH 036/475] fixing plot and script for run dependent mc --- ZFitter/bin/ZFitter.cpp | 4 +- ZFitter/macro/PlotDataMC.C | 4 +- ZFitter/macro/standardDataMC.C | 86 ++++++++++++++++--------- ZFitter/script/GenRootChain.sh | 2 +- ZFitter/script/monitoring_validation.sh | 16 +++-- ZFitter/src/puWeights_class.cc | 43 +++++++++++-- 6 files changed, 105 insertions(+), 50 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index f84384f3d0b..368c9c25443 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -987,8 +987,8 @@ int main(int argc, char **argv) { ("saveR9TreeWeight", "") ("saveRootMacro","") // - ("selection", po::value(&selection)->default_value("WP80_PU"),"") - ("commonCut", po::value(&commonCut)->default_value("Et_25-trigger"),"") + ("selection", po::value(&selection)->default_value("WP80PU"),"") + ("commonCut", po::value(&commonCut)->default_value("Et_25-trigger-noPF"),"") ("invMass_var", po::value(&invMass_var)->default_value("invMass_SC_regrCorr_ele"),"") ("invMass_min", po::value(&invMass_min)->default_value(65.),"") ("invMass_max", po::value(&invMass_max)->default_value(115.),"") diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 3a77d5c281f..415fdd68f54 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -229,12 +229,12 @@ TCanvas *PlotDataMC(TChain *data, TChain *mc, TString branchname, TString binnin std::cout << "$\\Chi^2$ " << d->Chi2Test(s_norm, "UW CHI2/NDF NORM") << std::endl; - TLegend *leg = new TLegend(0.7,0.8,1,1); + TLegend *leg = new TLegend(0.6,0.8,1,1); if(dataLabel !="") leg->AddEntry(d,dataLabel,"p"); if(mcLabel !="") leg->AddEntry(s,mcLabel, "lf"); leg->SetBorderSize(1); leg->SetFillColor(0); - leg->SetTextSize(0.05); + leg->SetTextSize(0.04); if(dataLabel !="" && mcLabel !="") leg->Draw(); //c->GetListOfPrimitives()->Add(leg,""); diff --git a/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C index 81cb0f239e4..c7ad083765d 100644 --- a/ZFitter/macro/standardDataMC.C +++ b/ZFitter/macro/standardDataMC.C @@ -1,119 +1,141 @@ { - TString commonCut="eleID_WP80PU-Et_25-noPF-trigger"; + TString dataLabel="22Jan ", mcLabel="Simulation"; + std::vector runPeriods, labels; + + //runPeriods.push_back("-runNumber_190456_193621"); labels.push_back("RUN2012A"); + //runPeriods.push_back("-runNumber_193834_196531"); labels.push_back("RUN2012B"); + runPeriods.push_back("-runNumber_190456_196531"); labels.push_back("RUN2012AB"); + runPeriods.push_back("-runNumber_198111_203002"); labels.push_back("RUN2012C"); + runPeriods.push_back("-runNumber_203756_208686"); labels.push_back("RUN2012D"); + runPeriods.push_back(""); labels.push_back(""); + + std::vector::const_iterator l_itr=labels.begin(); + TString outPath=outputPath; + for(std::vector::const_iterator p_itr = runPeriods.begin(); + p_itr != runPeriods.end(); + p_itr++,l_itr++){ + int index=p_itr-runPeriods.begin(); + + TString commonCut="eleID_WP80PU-Et_25-noPF-trigger"+*p_itr; //TString outputPath="tmp/"; //test/dato/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011/WP80_PU/img/"; //TString outputPath="test/dato/moriond2013/WP80_PU/img/"; - outputPath+="/"+commonCut+"/"; - c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", ""); + outputPath=outPath+"/"+commonCut+"/"; + + system(("mkdir -p "+outputPath).Data()); + + c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EB-"+commonCut,"", dataLabel+*l_itr, mcLabel, "nHits SC", ""); c->SaveAs(outputPath+"/nHitsSCEle-EB.eps"); delete c; - c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", "",true); + c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EB-"+commonCut,"", dataLabel+*l_itr, mcLabel, "nHits SC", "",true); c->SaveAs(outputPath+"/nHitsSCEle-EB-log.eps"); delete c; - c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", ""); + c = PlotDataMC(data, signal, "nHitsSCEle", "(100,0,100)", "EE-"+commonCut,"", dataLabel+*l_itr, mcLabel, "nHits SC", ""); c->SaveAs(outputPath+"/nHitsSCEle-EE.eps"); delete c; - c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "nHits SC", "",true ); + c = PlotDataMC(data, signal, "nHitsSCEle", "(200,0,200)", "EE-"+commonCut,"", dataLabel+*l_itr, mcLabel, "nHits SC", "",true ); c->SaveAs(outputPath+"/nHitsSCEle-EE-log.eps"); delete c; // regression comparison - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Hgg) regression/std. SC -1 ", ""); + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Electron (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCEle_stdSC-EB.eps"); delete c; - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Photon (Hgg) regression/std. SC -1 ", ""); + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Photon (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCPho_stdSC-EB.eps"); delete c; - c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Egamma) regression/std. SC -1 ", ""); + c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.2,0.2)", "EB-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Electron (Egamma) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EB.eps"); delete c; - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Hgg) regression/std. SC -1 ", ""); + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Electron (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCEle_stdSC-EE.eps"); delete c; - c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Photon (Hgg) regression/std. SC -1 ", ""); + c = PlotDataMC(data, signal, "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Photon (Hgg) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrSCPho_stdSC-EE.eps"); delete c; - c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Electron (Egamma) regression/std. SC -1 ", ""); + c = PlotDataMC(data, signal, "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.1,0.1)", "EE-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Electron (Egamma) regression/std. SC -1 ", ""); c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EE.eps"); delete c; // cluster corrections and ES energy fraction - c = PlotDataMC(data, signal, "esEnergySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0,0.2)", "absEta_1.7_2.5-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "ES energy fraction: ES/(rawSC+ES) ", ""); + c = PlotDataMC(data, signal, "esEnergySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0,0.2)", "absEta_1.7_2.5-"+commonCut,"", dataLabel+*l_itr, mcLabel, "ES energy fraction: ES/(rawSC+ES) ", ""); c->SaveAs(outputPath+"/esEnergyFraction.eps"); delete c; - c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EB-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); + c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EB-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); c->SaveAs(outputPath+"/energyCorrections_EB.eps"); delete c; - c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EE-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); + c = PlotDataMC(data, signal, "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EE-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", ""); c->SaveAs(outputPath+"/energyCorrections_EE.eps"); delete c; // pileup - c = PlotDataMC(data, signal, "nPV", "(30,0,30)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "nVtx", ""); + c = PlotDataMC(data, signal, "nPV", "(30,0,30)", ""+commonCut, "", dataLabel+*l_itr, mcLabel, "nVtx", ""); c->SaveAs(outputPath+"nPV.eps"); delete c; - c = PlotDataMC(data, signal, "rho", "(60,-1,29)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "#rho", ""); + c = PlotDataMC(data, signal, "rho", "(60,-1,29)", ""+commonCut, "", dataLabel+*l_itr, mcLabel, "#rho", ""); c->SaveAs(outputPath+"rho.eps"); delete c; // kinematic variables - c = PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "eleID_WP80PU", "", "Data 2012 (Winter13)", "Simulation", "energy SC [GeV]", ""); + c = PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "eleID_WP80PU", "", dataLabel+*l_itr, mcLabel, "energy SC [GeV]", ""); c->SaveAs(outputPath+"energySCEle.eps"); delete c; - c = PlotDataMC(data, signal, "etaEle", "(100,-2.5,2.5)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "#eta", ""); + c = PlotDataMC(data, signal, "etaEle", "(100,-2.5,2.5)", ""+commonCut, "", dataLabel+*l_itr, mcLabel, "#eta", ""); c->SaveAs(outputPath+"etaEle.eps"); delete c; - c = PlotDataMC(data, signal, "phiEle", "(100,-5,5)", ""+commonCut, "", "Data 2012 (Winter13)", "Simulation", "#phi", ""); + c = PlotDataMC(data, signal, "phiEle", "(100,-5,5)", ""+commonCut, "", dataLabel+*l_itr, mcLabel, "#phi", ""); c->SaveAs(outputPath+"phiEle.eps"); delete c; - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", ""); + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-"+commonCut, "", dataLabel+*l_itr, mcLabel, "R_{9}", ""); c->SaveAs(outputPath+"R9Ele_EB.eps"); delete c; - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", "",true); + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EB-"+commonCut, "", dataLabel+*l_itr, mcLabel, "R_{9}", "",true); c->SaveAs(outputPath+"R9Ele_EB-log.eps"); delete c; - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", ""); + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-"+commonCut, "", dataLabel+*l_itr, mcLabel, "R_{9}", ""); c->SaveAs(outputPath+"R9Ele_EE.eps"); delete c; - c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-"+commonCut, "", "Data 2012 (Winter13)", "Simulation", "R_{9}", "",true); + c = PlotDataMC(data, signal, "R9Ele", "(110,0.3,1.4)", "EE-"+commonCut, "", dataLabel+*l_itr, mcLabel, "R_{9}", "",true); c->SaveAs(outputPath+"R9Ele_EE-log.eps"); // Checking fit selection } - c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); +} + + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Reference Region map", "",1); c->SaveAs(outputPath+"EERefRegMap.eps"); delete c; } - c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(171,-85,86,361,0,361)", "EBRefReg-gold-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(171,-85,86,361,0,361)", "EBRefReg-gold-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Reference Region map", "",1); c->SaveAs(outputPath+"EBRefRegMap.eps"); delete c; - c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-"+commonCut,"", "Data 2012 (Winter13)", "Simulation", "Reference Region map", "",1); + c = PlotDataMC2D(data, signal, "seedYSCEle:seedXSCEle", "(100,0,100,100,0,100)", "EERefReg-gold-"+commonCut,"", dataLabel+*l_itr, mcLabel, "Reference Region map", "",1); c->SaveAs(outputPath+"EERefRegMap.eps"); delete c; - //PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "", "Data 2012 (Winter13)", "DY Summer 12", "energy SC [GeV]", ""); - //PlotDataMC(data, signal, "R9Ele", "(100,0,1.1)", "abs(etaEle)<1.5", "Data 2012 (Winter13)", "DY Summer 12", "R9", ""); - //PlotDataMC(data, signal, "R9Ele", "(100,0,1.1)", "abs(etaEle)>1.5", "Data 2012 (Winter13)", "DY Summer 12", "R9", ""); -// PlotDataMC(data, signal, "R9Ele:etaEle", "(100,-3,3,100,0,1.1)", "", "Data 2012 (Winter13)", "DY Summer 12", "#eta", "R9"); + //PlotDataMC(data, signal, "energySCEle", "(100,0,200)", "", dataLabel+*l_itr, "DY Summer 12", "energy SC [GeV]", ""); + //PlotDataMC(data, signal, "R9Ele", "(100,0,1.1)", "abs(etaEle)<1.5", dataLabel+*l_itr, "DY Summer 12", "R9", ""); + //PlotDataMC(data, signal, "R9Ele", "(100,0,1.1)", "abs(etaEle)>1.5", dataLabel+*l_itr, "DY Summer 12", "R9", ""); +// PlotDataMC(data, signal, "R9Ele:etaEle", "(100,-3,3,100,0,1.1)", "", dataLabel+*l_itr, "DY Summer 12", "#eta", "R9"); +} } - diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index 0d8499b4da3..b4cdaac8591 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -129,7 +129,7 @@ fi # saving the root files with the chains rm tmp/*_chain.root -./bin/ZFitter.exe --saveRootMacro -f ${configFile} ${noPU} +./bin/ZFitter.exe --saveRootMacro -f ${configFile} ${noPU} || exit 1 # adding all the chains in one file hadd tmp/s_chain.root tmp/s_*_chain.root diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index f68bd73873d..756ba4801cf 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -1,8 +1,8 @@ #!/bin/bash #tag_name="" -commonCut=Et_25-trigger -selection=WP80_PU +commonCut=Et_25-trigger-noPF +selection=WP80PU invMass_var=invMass_SC_regrCorr_ele invMass_min=65 invMass_max=115 @@ -12,8 +12,8 @@ configFile=data/validation/monitoring_2012_53X.dat runRangesFile=data/runRanges/monitoring.dat baseDir=test -#updateOnly="--updateOnly" -extraOptions="--addBranch iSM --forceNewFit" +updateOnly="--updateOnly" +#extraOptions="--addBranch iSM --forceNewFit" # VALIDATION=y # STABILITY=y @@ -127,9 +127,13 @@ elif [ -z "${configFile}" -a -n "${TEST}" ];then fi case ${selection} in - WP80_PU) + WP80PU) ;; - WP90_PU) + WP90PU) + ;; + loose) + ;; + medium) ;; *) echo "[ERROR] Selection ${selection} not configured" >> /dev/stderr diff --git a/ZFitter/src/puWeights_class.cc b/ZFitter/src/puWeights_class.cc index dd1f603ee7a..85a305017c6 100644 --- a/ZFitter/src/puWeights_class.cc +++ b/ZFitter/src/puWeights_class.cc @@ -1,4 +1,6 @@ #include "../interface/puWeights_class.hh" +#include +#include //#define DEBUG puWeights_class::~puWeights_class(){ @@ -113,36 +115,51 @@ void puWeights_class::ReadFromFiles(std::string mcPUFile, std::string dataPUFile if(!data.IsOpen() || !mc.IsOpen()){ std::cerr << "[ERROR] data or mc PU file not opened" << std::endl; + exit(1); return; } TH1D* puMC_hist = (TH1D*) mc.Get("pileup"); if(puMC_hist==NULL){ - std::cerr << "[ERROR] mc pileup histogram is NULL" << std::endl; - return; + TTree *puMC_tree = (TTree*) mc.Get("PUDumper/pileup"); + if(puMC_tree==NULL){ + std::cerr << "[ERROR] mc pileup histogram is NULL" << std::endl; + exit(1); + return; + } + puMC_tree->Draw("nPUtrue>>pileupHist_mc(60,0,60)","BX==0"); + puMC_hist = (TH1D *) gROOT->FindObject("pileupHist_mc"); + puMC_hist->SaveAs("tmp/puMC_hist.root"); } + TH1D *puData_hist = (TH1D *) data.Get("pileup"); // puData_hist->GetBinWidth(3); if(puData_hist==NULL){ - std::cerr << "[ERROR] data pileup histogram is NULL" << std::endl; - return; + puData_hist = (TH1D *) data.Get("PUDumper/pileup"); + if(puData_hist==NULL){ + std::cerr << "[ERROR] data pileup histogram is NULL" << std::endl; + exit(1); + return; + } } // they should have bin width = 1 if(puMC_hist->GetBinWidth(2) != 1){ std::cerr << "[ERROR] Bin width for mc pileup distribution different from 1" << std::endl; + exit(1); return; } if(puData_hist->GetBinWidth(2) != 1){ std::cerr << "[ERROR] Bin width for data pileup distribution different from 1" << std::endl; + exit(1); return; } // they should have the same binning otherwise PU weights until the max between them int nBins = MAX_PU_REWEIGHT; if(puData_hist->GetNbinsX() != puMC_hist->GetNbinsX()){ - std::cerr << "[WARNING] Different binning between data and mc pileup distributions" << std::endl; + std::cerr << "[WARNING] Different binning between data and mc pileup distributions:" << puData_hist->GetNbinsX() << "\t" << puMC_hist->GetNbinsX() << std::endl; nBins=std::min(puData_hist->GetNbinsX(),puMC_hist->GetNbinsX()); //std::cerr << "Pileup reweighted until nPU max = " << nBins; } @@ -156,10 +173,21 @@ void puWeights_class::ReadFromFiles(std::string mcPUFile, std::string dataPUFile double puMCweight_int=0; for (int i = 0; iGetBinContent(i+1)/puMC_hist->GetBinContent(i+1); + double binContent=puMC_hist->GetBinContent(i+1); + if(binContent==0 && puData_hist->GetBinContent(i+1)!=0){ + if(puData_hist->GetBinContent(i+1) < 1e-4){ + std::cerr << "[WARNING] mc bin empty while data not: iBin = " << i+1 << std::endl; + std::cerr << " data bin = " << puData_hist->GetBinContent(i+1) << std::endl; + } else { + std::cerr << "[ERROR] mc bin empty while data not: iBin = " << i+1 << std::endl; + std::cerr << " data bin = " << puData_hist->GetBinContent(i+1) << std::endl; + exit(1); + } + } + double weight = binContent>0 ? puData_hist->GetBinContent(i+1)/binContent : 0; // the MC normalization should not change, so calculate the // integral of the MC and rescale the weights by that - puMCweight_int+=weight * puMC_hist->GetBinContent(i+1); + puMCweight_int+=weight * binContent; weights_itr->second.insert(std::pair(i,weight)); #ifdef DEBUG std::cout << "[DEBUG] " << weights_itr->first << "\t" << weights_itr->second[i] << "\t" << weights_itr->second.size() << std::endl; @@ -170,6 +198,7 @@ void puWeights_class::ReadFromFiles(std::string mcPUFile, std::string dataPUFile weights_itr->second[i]/=puMCweight_int; } PUweights_itr=PUWeightsRunDepMap.begin(); + if(TString(puMC_hist->GetName()).Contains("Hist")) delete puMC_hist; return; } From 64902c60d9680a60c125579b95fca451dc3da178 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 9 Jul 2013 09:55:21 +0200 Subject: [PATCH 037/475] fixes --- ZFitter/bin/ZFitter.cpp | 1 + ZFitter/data/runRanges/monitoring.dat | 1 + ZFitter/data/validation/22Jan2012-runDepMC.dat | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 368c9c25443..0c9e77239a8 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1078,6 +1078,7 @@ int main(int argc, char **argv) { else if(invMass_var=="invMass_regrCorr_fra") energyBranchName = "energyEle_regrCorr_fra"; else if(invMass_var=="invMass_regrCorr_egamma") energyBranchName = "energyEle_regrCorr_egamma"; else if(invMass_var=="invMass_SC") energyBranchName = "energySCEle"; + else if(invMass_var=="invMass_SC_corr") energyBranchName = "energySCEle_corr"; else { std::cerr << "Energy branch name not define for invariant mass branch: " << invMass_var << std::endl; exit(1); diff --git a/ZFitter/data/runRanges/monitoring.dat b/ZFitter/data/runRanges/monitoring.dat index 63b8ce5ad87..671e664de3a 100644 --- a/ZFitter/data/runRanges/monitoring.dat +++ b/ZFitter/data/runRanges/monitoring.dat @@ -31,6 +31,7 @@ 202205-202332 106574 1346761268-1347003730 202333-202972 104407 1347004663-1347747404 202973-203002 58677 1347747620-1347854472 +203003-203852 0 0-0 203853-204099 103449 1348893072-1349173533 204100-204562 103992 1349210234-1349484356 204563-205085 124160 1349494802-1349657887 diff --git a/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat index 47eefc88b2d..b53025f7e00 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMC.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMC.dat @@ -18,7 +18,7 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533- s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root ##### PU trees -#s pileup mcPUTree-Winter13-powheg-RUNABCD.root +s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees From d6aad19d8926cdacdf2acae5c46f925913af42e9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 9 Jul 2013 13:36:46 +0200 Subject: [PATCH 038/475] fixes --- ZFitter/script/monitoring_validation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index 756ba4801cf..70e753b9d1c 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -207,7 +207,7 @@ esac ## pileup reweight name if [ -z "$puName" ];then puCount=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3 |wc -l` - if [ "${puCount}" != "1" ];then + if [ "${puCount}" == "0" ];then echo "[ERROR] No or too mani pileupHist files for data" exit 1 fi From 8c21a2d4fca2dc0f3aef3ba07da76068ae98b66c Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 9 Jul 2013 13:37:13 +0200 Subject: [PATCH 039/475] fixes --- .gitignore | 1 + ALCARAW_RECO/python/alcaSkimming.py | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6ea95f24b4a..41acdfc2f13 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ prod_alcarereco # patch *.rej +.__afs* \ No newline at end of file diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 2d907576f15..c72f63b1c6f 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -554,3 +554,4 @@ myLumis = LumiList.LumiList(filename = options.jsonFile).getCMSSWString().split(',') process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange() process.source.lumisToProcess.extend(myLumis) + From a94ac67465c3f96f2e270129562339b50406bc35 Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 9 Jul 2013 14:41:57 +0200 Subject: [PATCH 040/475] changed name from calibration to Calibration --- Calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc | 2 +- Calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc | 2 +- Calibration/ALCARAW_RECO/src/PUDumper.cc | 2 +- .../EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc | 2 +- .../EleSelectionProducers/src/EleSelectionProducers.cc | 4 ++-- .../src/SimpleCutBasedElectronIDSelectionFunctor.cc | 2 +- Calibration/JsonFilter/src/JsonFilter.cc | 2 +- Calibration/ZFitter/interface/BW_CB_pdf_class.hh | 2 +- Calibration/ZFitter/interface/Cruijff_pdf_class.hh | 2 +- Calibration/ZFitter/interface/addBranch_class.hh | 2 +- Calibration/ZFitter/src/ZFit_class.cc | 2 +- Calibration/ZNtupleDumper/src/ZNtupleDumper.cc | 4 ++-- Calibration/ZNtupleDumper/src/readJsonFile.cc | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc b/Calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc index 6901fcdccb7..dcc59f741fd 100644 --- a/Calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc +++ b/Calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc @@ -1,4 +1,4 @@ -#include "calibration/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h" +#include "Calibration/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h" #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" #include "DataFormats/EgammaCandidates/interface/SiStripElectron.h" diff --git a/Calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc b/Calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc index 688bd345b1a..dac9025c16e 100644 --- a/Calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc +++ b/Calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc @@ -1,4 +1,4 @@ -#include "calibration/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h" +#include "Calibration/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h" #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" diff --git a/Calibration/ALCARAW_RECO/src/PUDumper.cc b/Calibration/ALCARAW_RECO/src/PUDumper.cc index 3cb722116bc..ec61614d5b0 100644 --- a/Calibration/ALCARAW_RECO/src/PUDumper.cc +++ b/Calibration/ALCARAW_RECO/src/PUDumper.cc @@ -1,4 +1,4 @@ -#include "calibration/ALCARAW_RECO/interface/PUDumper.h" +#include "Calibration/ALCARAW_RECO/interface/PUDumper.h" diff --git a/Calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/Calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index 450f8ad04ce..4b4007dcd8c 100644 --- a/Calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/Calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -3,7 +3,7 @@ // Package: EleNewEnergiesProducer // Class: EleNewEnergiesProducer // -/**\class EleNewEnergiesProducer EleNewEnergiesProducer.cc calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +/**\class EleNewEnergiesProducer EleNewEnergiesProducer.cc Calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc Description: [one line class summary] diff --git a/Calibration/EleSelectionProducers/src/EleSelectionProducers.cc b/Calibration/EleSelectionProducers/src/EleSelectionProducers.cc index 7e43215adb7..9f180af21df 100644 --- a/Calibration/EleSelectionProducers/src/EleSelectionProducers.cc +++ b/Calibration/EleSelectionProducers/src/EleSelectionProducers.cc @@ -3,7 +3,7 @@ // Package: EleSelectionProducers // Class: EleSelectionProducers // -/**\class EleSelectionProducers EleSelectionProducers.cc calibration/EleSelectionProducers/src/EleSelectionProducers.cc +/**\class EleSelectionProducers EleSelectionProducers.cc Calibration/EleSelectionProducers/src/EleSelectionProducers.cc */ // @@ -29,7 +29,7 @@ #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" -#include "calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h" +#include "Calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h" #include "DataFormats/RecoCandidate/interface/IsoDeposit.h" diff --git a/Calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc b/Calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc index 9591c263ddd..a845f5af95f 100644 --- a/Calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc +++ b/Calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc @@ -1,2 +1,2 @@ //#include "PhysicsTools/SelectorUtils/interface/SimpleCutBasedElectronIDSelectionFunctor.h" -#include "calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h" +#include "Calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h" diff --git a/Calibration/JsonFilter/src/JsonFilter.cc b/Calibration/JsonFilter/src/JsonFilter.cc index 24ea785c528..c06564d0f88 100644 --- a/Calibration/JsonFilter/src/JsonFilter.cc +++ b/Calibration/JsonFilter/src/JsonFilter.cc @@ -3,7 +3,7 @@ // Package: JsonFilter // Class: JsonFilter // -/**\class JsonFilter JsonFilter.cc calibration/JsonFilter/src/JsonFilter.cc +/**\class JsonFilter JsonFilter.cc Calibration/JsonFilter/src/JsonFilter.cc Description: [one line class summary] diff --git a/Calibration/ZFitter/interface/BW_CB_pdf_class.hh b/Calibration/ZFitter/interface/BW_CB_pdf_class.hh index c14b677cede..fb32458c72c 100644 --- a/Calibration/ZFitter/interface/BW_CB_pdf_class.hh +++ b/Calibration/ZFitter/interface/BW_CB_pdf_class.hh @@ -3,7 +3,7 @@ /// Breit-Wigner convoluted with Crystal Ball function PDF -/**\class BW_CB_pdf_class BW_CB_pdf_class.cc calibration/ZFitter/interface/BW_CB_pdf_class.hh +/**\class BW_CB_pdf_class BW_CB_pdf_class.cc Calibration/ZFitter/interface/BW_CB_pdf_class.hh Class providing a RooPdf correspoding to the convolution of a Breit-Wigner and Crystal Ball diff --git a/Calibration/ZFitter/interface/Cruijff_pdf_class.hh b/Calibration/ZFitter/interface/Cruijff_pdf_class.hh index d5773757a5f..10d1edbc4c6 100644 --- a/Calibration/ZFitter/interface/Cruijff_pdf_class.hh +++ b/Calibration/ZFitter/interface/Cruijff_pdf_class.hh @@ -3,7 +3,7 @@ /// Cruijff function -/**\class Cruijff_pdf_class Cruijff_pdf_class.cc calibration/ZFitter/interface/Cruijff_pdf_class.hh +/**\class Cruijff_pdf_class Cruijff_pdf_class.cc Calibration/ZFitter/interface/Cruijff_pdf_class.hh Class providing a RooPdf corresponding to a Cruijff function (Gaussian with exponential tails) */ diff --git a/Calibration/ZFitter/interface/addBranch_class.hh b/Calibration/ZFitter/interface/addBranch_class.hh index 9231943c749..8f02f67e67b 100644 --- a/Calibration/ZFitter/interface/addBranch_class.hh +++ b/Calibration/ZFitter/interface/addBranch_class.hh @@ -2,7 +2,7 @@ #define ADDBRANCH_HH /// starting from standard ntuple, produce new tree with additional branches /** - * \class addBranch_class addBranch_class.cc calibration/ZFitter/interface/addBranch_class.hh + * \class addBranch_class addBranch_class.cc Calibration/ZFitter/interface/addBranch_class.hh * * create tree with following branches: * - ZPt diff --git a/Calibration/ZFitter/src/ZFit_class.cc b/Calibration/ZFitter/src/ZFit_class.cc index 7e713652644..26ac0ffdde3 100644 --- a/Calibration/ZFitter/src/ZFit_class.cc +++ b/Calibration/ZFitter/src/ZFit_class.cc @@ -1,6 +1,6 @@ /// Zee Fit class: BW+CB and Cruijff -/**\class ZFit_class ZFit_class.cc calibration/ZFitter/src/ZNtupleDumper.cc +/**\class ZFit_class ZFit_class.cc Calibration/ZFitter/src/ZNtupleDumper.cc Description: class that provide flexible and simple way to fit the Zee invariant mass shape with different pdfs: - BW+CB - Cruijff diff --git a/Calibration/ZNtupleDumper/src/ZNtupleDumper.cc b/Calibration/ZNtupleDumper/src/ZNtupleDumper.cc index 8f87f9d4e08..6e8bb9aac90 100644 --- a/Calibration/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/Calibration/ZNtupleDumper/src/ZNtupleDumper.cc @@ -4,7 +4,7 @@ // Class: ZNtupleDumper // /// Zee and E/p ntuple dumper from patElectrons -/**\class ZNtupleDumper ZNtupleDumper.cc calibration/ZNtupleDumper/src/ZNtupleDumper.cc +/**\class ZNtupleDumper ZNtupleDumper.cc Calibration/ZNtupleDumper/src/ZNtupleDumper.cc * * Description: Zee and E/p ntuple dumper from patElectrons * @@ -57,7 +57,7 @@ #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" -//#include "calibration/ZNtupleDumper/interface/puWeights_class.hh" +//#include "Calibration/ZNtupleDumper/interface/puWeights_class.hh" #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h" #include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h" diff --git a/Calibration/ZNtupleDumper/src/readJsonFile.cc b/Calibration/ZNtupleDumper/src/readJsonFile.cc index 520d3f0c06b..d9630b71fa9 100644 --- a/Calibration/ZNtupleDumper/src/readJsonFile.cc +++ b/Calibration/ZNtupleDumper/src/readJsonFile.cc @@ -1,4 +1,4 @@ -#include "calibration/ZNtupleDumper/interface/readJsonFile.h" +#include "Calibration/ZNtupleDumper/interface/readJsonFile.h" From 24b15d43849c865312b1fde27a9551fad30ef8bb Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 9 Jul 2013 14:42:58 +0200 Subject: [PATCH 041/475] changed name from calibration to Calibration --- Calibration/ALCARAW_RECO/python/alcaSkimming.py | 2 +- Calibration/ALCARAW_RECO/scripts/SandboxQuick.sh | 4 ++-- Calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh | 4 ++-- Calibration/ALCARAW_RECO/scripts/prodAlcareco.sh | 2 +- Calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh | 2 +- Calibration/ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- Calibration/ALCARAW_RECO/scripts/removeRereco.sh | 2 +- Calibration/ALCARAW_RECO/scripts/resubmitCrab.sh | 2 +- Calibration/ZNtupleDumper/python/patSequence_cff.py | 6 +++--- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Calibration/ALCARAW_RECO/python/alcaSkimming.py b/Calibration/ALCARAW_RECO/python/alcaSkimming.py index c72f63b1c6f..943d0fa4df9 100644 --- a/Calibration/ALCARAW_RECO/python/alcaSkimming.py +++ b/Calibration/ALCARAW_RECO/python/alcaSkimming.py @@ -422,7 +422,7 @@ if(re.match("CMSSW_4_4_.*", CMSSW_VERSION)): process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2011Weights_V1.root") if(re.match("CMSSW_4_2_.*", CMSSW_VERSION)): - pathPrefix=CMSSW_BASE+'/src/calibration/EleNewEnergiesProducer/' + pathPrefix=CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' print '[INFO] Using v2 regression for CMSSW_4_2_X' process.eleNewEnergiesProducer.regrPhoFile=cms.string(pathPrefix+'data/gbrv2ph.root') process.eleNewEnergiesProducer.regrEleFile=cms.string(pathPrefix+'data/gbrv2ele.root') diff --git a/Calibration/ALCARAW_RECO/scripts/SandboxQuick.sh b/Calibration/ALCARAW_RECO/scripts/SandboxQuick.sh index 26603cd6b41..1a9dd4dac24 100755 --- a/Calibration/ALCARAW_RECO/scripts/SandboxQuick.sh +++ b/Calibration/ALCARAW_RECO/scripts/SandboxQuick.sh @@ -2,7 +2,7 @@ ################ # Semplified script for rereco and ntuple of 2011 and 2012 data ############## -NTUPLE_REMOTE_DIR=caf/user/shervin/calibration/8TeV/ZNtuples +NTUPLE_REMOTE_DIR=caf/user/shervin/Calibration/8TeV/ZNtuples SCHEDULER=caf CREATE=y SUBMIT=y @@ -46,7 +46,7 @@ do --tutorial) echo "[OPTION] Entering in tutorial mode" TUTORIAL=y; SCHEDULER=caf; - NTUPLE_REMOTE_DIR=group/alca_ecalcalib/sandbox/tutorial/${USER}/calibration/8TeV/ZNtuples; + NTUPLE_REMOTE_DIR=group/alca_ecalcalib/sandbox/tutorial/${USER}/Calibration/8TeV/ZNtuples; echo "Ntuple output directory: /eos/cms/store/${NTUPLE_REMOTE_DIR}" echo -n "Check if exists: " eos.select ls -s /eos/cms/store/${NTUPLE_REMOTE_DIR} &> /dev/null || { diff --git a/Calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh b/Calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh index 8cc0f6e9e6c..c418e55c548 100755 --- a/Calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh +++ b/Calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh @@ -1,6 +1,6 @@ #!/bin/bash -source $CMSSW_BASE/src/calibration/ALCARAW_RECO/scripts/prodFunctions.sh -#source /tmp/calibration/ALCARAW_RECO/scripts/prodFunctions.sh +source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh +#source /tmp/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh ############################### OPTIONS #------------------------------ default diff --git a/Calibration/ALCARAW_RECO/scripts/prodAlcareco.sh b/Calibration/ALCARAW_RECO/scripts/prodAlcareco.sh index 995f8794324..42d40d58b77 100755 --- a/Calibration/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/Calibration/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $CMSSW_BASE/src/calibration/ALCARAW_RECO/scripts/prodFunctions.sh +source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh ############################### OPTIONS #------------------------------ default diff --git a/Calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh b/Calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh index 680d35bb6bd..3799d844607 100755 --- a/Calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/Calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -1,5 +1,5 @@ #!/bin/bash -#source $CMSSW_BASE/src/calibration/ALCARAW_RECO/scripts/prodFunctions.sh +#source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh source ./scripts/prodFunctions.sh ############################### OPTIONS diff --git a/Calibration/ALCARAW_RECO/scripts/prodNtuples.sh b/Calibration/ALCARAW_RECO/scripts/prodNtuples.sh index 217561fe669..a4c7593bfee 100755 --- a/Calibration/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/Calibration/ALCARAW_RECO/scripts/prodNtuples.sh @@ -1,5 +1,5 @@ #!/bin/bash -source $CMSSW_BASE/src/calibration/ALCARAW_RECO/scripts/prodFunctions.sh +source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh ############################### OPTIONS #------------------------------ default diff --git a/Calibration/ALCARAW_RECO/scripts/removeRereco.sh b/Calibration/ALCARAW_RECO/scripts/removeRereco.sh index 027e5888fef..ec71e3ba99f 100755 --- a/Calibration/ALCARAW_RECO/scripts/removeRereco.sh +++ b/Calibration/ALCARAW_RECO/scripts/removeRereco.sh @@ -1,6 +1,6 @@ #!/bin/bash ################ -source $CMSSW_BASE/src/calibration/ALCARAW_RECO/scripts/prodFunctions.sh +source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh ############## #fileList=./alcarereco_datasets.dat usage(){ diff --git a/Calibration/ALCARAW_RECO/scripts/resubmitCrab.sh b/Calibration/ALCARAW_RECO/scripts/resubmitCrab.sh index 4bd169c9cbf..6fd2730c38c 100755 --- a/Calibration/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/Calibration/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -147,7 +147,7 @@ done echo $intervals | sed 's| |,|' if [ -n "$intervals" ];then - crab -c $ui_working_dir/ -resubmit `echo $intervals | sed 's| |\n|g' | awk -f $CMSSW_BASE/src/calibration/ALCARAW_RECO/awk/compact.awk | sed 's|,$||'` + crab -c $ui_working_dir/ -resubmit `echo $intervals | sed 's| |\n|g' | awk -f $CMSSW_BASE/src/Calibration/ALCARAW_RECO/awk/compact.awk | sed 's|,$||'` else if [ "`echo $okJobList |wc -w`" == "$nJobs" ];then echo "[STATUS] All jobs are finished SUCCESSFULLY!" diff --git a/Calibration/ZNtupleDumper/python/patSequence_cff.py b/Calibration/ZNtupleDumper/python/patSequence_cff.py index 51f73aee2a5..6e8aa235273 100644 --- a/Calibration/ZNtupleDumper/python/patSequence_cff.py +++ b/Calibration/ZNtupleDumper/python/patSequence_cff.py @@ -12,9 +12,9 @@ #------------------------------ new energies from calibration.EleNewEnergiesProducer.elenewenergiesproducer_cfi import * -eleNewEnergiesProducer.regrPhoFile='src/calibration/EleNewEnergiesProducer/data/gbrv3ph_52x.root' -eleNewEnergiesProducer.regrEleFile='src/calibration/EleNewEnergiesProducer/data/gbrv3ele_52x.root' -eleNewEnergiesProducer.regrEleFile_fra='src/calibration/EleNewEnergiesProducer/data/eleEnergyRegWeights_V1.root' +eleNewEnergiesProducer.regrPhoFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ph_52x.root' +eleNewEnergiesProducer.regrEleFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ele_52x.root' +eleNewEnergiesProducer.regrEleFile_fra='src/Calibration/EleNewEnergiesProducer/data/eleEnergyRegWeights_V1.root' eleNewEnergiesProducer.ptSplit=cms.bool(False) from EgammaAnalysis.ElectronTools.electronRegressionEnergyProducer_cfi import * From b1d8209e2002d5d875c1db554d4835c7d6237cde Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 9 Jul 2013 14:44:01 +0200 Subject: [PATCH 042/475] changed name from calibration to Calibration --- .../ALCARAW_RECO/doc/alcaraw_alcareco_production.txt | 6 +++--- Calibration/ALCARAW_RECO/doc/dataformats.txt | 2 +- Calibration/ALCARAW_RECO/doc/rereco.txt | 2 +- .../src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch | 2 +- Calibration/ZFitter/bin/BuildFile.xml | 2 +- Calibration/ZFitter/doc/README | 2 +- Calibration/ZFitter/macro/propaganda_plot.C | 2 +- Calibration/ZFitter/macro/propaganda_plot2.C | 2 +- Calibration/ZNtupleDumper/doc/README | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/Calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt index 912925c1841..216d9809ff7 100644 --- a/Calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt +++ b/Calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt @@ -8,10 +8,10 @@ Steps for the production using the CERN batch system (launch from lxplus): #### ALCARAW private production The following instructions correspond to point: 1a), 1.1a), 2a) indicated in -calibration/README: -https://svnweb.cern.ch/cern/wsvn/analysis/trunk/calibration/README +Calibration/README: +https://svnweb.cern.ch/cern/wsvn/analysis/trunk/Calibration/README -For the detailed content of alcaraw format consult the calibration/doc/alcaraw.dump file +For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.dump file 1) Fill the alcaraw_datasets.dat with the information of the desired run range It is convenient to add the new line at the bottom of the file. diff --git a/Calibration/ALCARAW_RECO/doc/dataformats.txt b/Calibration/ALCARAW_RECO/doc/dataformats.txt index dcfa5e8ca0e..de7d91ee7b3 100644 --- a/Calibration/ALCARAW_RECO/doc/dataformats.txt +++ b/Calibration/ALCARAW_RECO/doc/dataformats.txt @@ -4,7 +4,7 @@ samples) will be performed using the alcareco data format that contains only relevant collections for the ECAL calibration with electrons. -If you have not followed the instructions in the calibration/README +If you have not followed the instructions in the Calibration/README file please do it. diff --git a/Calibration/ALCARAW_RECO/doc/rereco.txt b/Calibration/ALCARAW_RECO/doc/rereco.txt index 716c52f7e87..0f21dbbc8f9 100644 --- a/Calibration/ALCARAW_RECO/doc/rereco.txt +++ b/Calibration/ALCARAW_RECO/doc/rereco.txt @@ -34,7 +34,7 @@ svn ci -m "rereco tag_name done" #============================== TAG FILES To run the Rereco with a new set of conditions it is necessary to have a configuration file with the tags. -An example of a configuration file can be found in calibration/ALCARAW_RECO/config/reRecoTags/test.py +An example of a configuration file can be found in Calibration/ALCARAW_RECO/config/reRecoTags/test.py Here an example: ############################################################## diff --git a/Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch b/Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch index a810be159c5..881010c9cc5 100644 --- a/Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch +++ b/Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch @@ -7,7 +7,7 @@ #include "DataFormats/EgammaReco/interface/SuperCluster.h" #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" -#include "calibration/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h" +#include "Calibration/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h" #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" diff --git a/Calibration/ZFitter/bin/BuildFile.xml b/Calibration/ZFitter/bin/BuildFile.xml index 33c774e4652..f2bda2c4b4a 100644 --- a/Calibration/ZFitter/bin/BuildFile.xml +++ b/Calibration/ZFitter/bin/BuildFile.xml @@ -3,7 +3,7 @@ - + diff --git a/Calibration/ZFitter/doc/README b/Calibration/ZFitter/doc/README index 2f5b128d14e..6eb16a44eef 100644 --- a/Calibration/ZFitter/doc/README +++ b/Calibration/ZFitter/doc/README @@ -95,7 +95,7 @@ s pileupTree file.root 1) If it does not exist yet, create the PU distribution in data with the proper script in ZNtupleDumper - See PU data section in calibration/ZNtupleDumper/doc/README for details + See PU data section in Calibration/ZNtupleDumper/doc/README for details 2) Create the .dat config file and put it into (see previous section for details) ./data/validation/rereco/rerecoGroupName/ diff --git a/Calibration/ZFitter/macro/propaganda_plot.C b/Calibration/ZFitter/macro/propaganda_plot.C index dd721f2757f..a8c1745e71c 100644 --- a/Calibration/ZFitter/macro/propaganda_plot.C +++ b/Calibration/ZFitter/macro/propaganda_plot.C @@ -18,7 +18,7 @@ TString goldString=""; TString selectedTreeDir="/u2/shervin/Higgs/selected/"; - // TString selectedTreeDir="root://eoscms//cms/store/caf/user/shervin/calibration/7TeV/Higgs/selected/"; + // TString selectedTreeDir="root://eoscms//cms/store/caf/user/shervin/Calibration/7TeV/Higgs/selected/"; //--------------- prendo il file con gli eventi selezionati // mi serve una chain per i dati, una per il segnale MC ed una per i fondi TChain *data_chain = new TChain("selected","data"); diff --git a/Calibration/ZFitter/macro/propaganda_plot2.C b/Calibration/ZFitter/macro/propaganda_plot2.C index f6662f7bb26..034a8fde563 100644 --- a/Calibration/ZFitter/macro/propaganda_plot2.C +++ b/Calibration/ZFitter/macro/propaganda_plot2.C @@ -212,7 +212,7 @@ TString selectedTreeDir="/u2/shervin/Higgs/selected/"; - // TString selectedTreeDir="root://eoscms//cms/store/caf/user/shervin/calibration/7TeV/Higgs/selected/"; + // TString selectedTreeDir="root://eoscms//cms/store/caf/user/shervin/Calibration/7TeV/Higgs/selected/"; //--------------- prendo il file con gli eventi selezionati // mi serve una chain per i dati, una per il segnale MC ed una per i fondi TChain *data_chain = new TChain("selected","data"); diff --git a/Calibration/ZNtupleDumper/doc/README b/Calibration/ZNtupleDumper/doc/README index d73995a5782..f85c3b98e52 100644 --- a/Calibration/ZNtupleDumper/doc/README +++ b/Calibration/ZNtupleDumper/doc/README @@ -59,7 +59,7 @@ prodNtuples.sh [options] --ui_working_dir dir: do not use the default crab ui_working_dir (optional) --store: storage element for crab: (def=caf) --remote_dir: user remote dir on the storage element: --remote_dir group/alca_ecalcalib/alcareco - --ntuple_remote_dir DIR: base directory storing the ntuples: --ntuple_remote_dir caf/user/shervin/calibration/8TeV/ZNtuples + --ntuple_remote_dir DIR: base directory storing the ntuples: --ntuple_remote_dir caf/user/shervin/Calibration/8TeV/ZNtuples Ex. ./script/prodNtuples.sh --type alcareco \ --json tmp/201230-201678.json --json_name 201230-201678-Prompt \ From e362480d60d73abe7143ea16c6253ba5b58e7039 Mon Sep 17 00:00:00 2001 From: chiara la licata Date: Tue, 9 Jul 2013 15:05:09 +0200 Subject: [PATCH 043/475] moving stuff from Calibration to main directory because I don't know how to sparse checkout --- {Calibration/ALCARAW_RECO => ALCARAW_RECO}/BuildFile.xml | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/alcaraw_datasets.dat | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/alcareco_datasets.dat | 0 .../ALCARAW_RECO => ALCARAW_RECO}/alcarereco_datasets.dat | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/awk/compact.awk | 0 .../config/reRecoTags/13Jul_AlphaEFlow_v1.py | 0 .../config/reRecoTags/13Jul_AlphaEFlow_v2.py | 0 .../config/reRecoTags/13Jul_AlphaEle_v1.py | 0 .../config/reRecoTags/13Jul_AlphaPiZero_v1.py | 0 .../config/reRecoTags/13Jul_AlphaRef.py | 0 .../config/reRecoTags/13Jul_ICcomb_v1.py | 0 .../config/reRecoTags/13Jul_ICcomb_v2.py | 0 .../config/reRecoTags/13Jul_ICcomb_v3.py | 0 .../config/reRecoTags/13Jul_ICcomb_v4.py | 0 .../config/reRecoTags/13Jul_ICcomb_v5.py | 0 .../config/reRecoTags/13Jul_ICcomb_v6.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2010v3.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2011v1.py | 0 .../config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py | 0 .../config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py | 0 .../reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py | 0 .../reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py | 0 .../reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py | 0 .../config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py | 0 .../config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py | 0 .../config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py | 0 .../config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py | 0 .../16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py | 0 .../config/reRecoTags/16Jan_ICpiZero_v1.py | 0 .../config/reRecoTags/16Jan_ICpiZero_v2.py | 0 .../config/reRecoTags/Cal_2011B53X.py | 0 .../config/reRecoTags/Cal_2011B53X_locCont_v1.py | 0 .../config/reRecoTags/Cal_AlphaJarry2012_v0.py | 0 .../config/reRecoTags/Cal_AlphaJarry2012_v1.py | 0 .../config/reRecoTags/Cal_Dic2012.py | 0 .../config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py | 0 .../reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py | 0 .../reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py | 0 .../config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py | 0 .../config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py | 0 .../config/reRecoTags/Cal_Dic2012_RUNAB.py | 0 .../config/reRecoTags/Cal_Dic2012newLAS.py | 0 .../config/reRecoTags/Cal_Feb2013.py | 0 .../config/reRecoTags/Cal_Feb2013_ICComb_v4.py | 0 .../config/reRecoTags/Cal_Feb2013_ICEle_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v2.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v3.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v5.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v6.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py | 0 .../config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py | 0 .../config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py | 0 .../config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py | 0 .../config/reRecoTags/Cal_Jan2013.py | 0 .../config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py | 0 .../config/reRecoTags/Cal_Jan2013_LC_v1.py | 0 .../config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py | 0 .../config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py | 0 .../config/reRecoTags/Cal_Nov2012.py | 0 .../config/reRecoTags/Cal_Nov2012_ICEle_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICEle_v2.py | 0 .../config/reRecoTags/Cal_Nov2012_ICEle_v3.py | 0 .../config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py | 0 .../config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py | 0 .../config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/HggPaper.py | 0 .../IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py | 0 .../IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py | 0 .../config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py | 0 .../reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py | 0 .../IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py | 0 ...20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py | 0 .../IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py | 0 .../IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py | 0 .../IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py | 0 .../IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py | 0 .../IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py | 0 .../IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py | 0 .../reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py | 0 .../config/reRecoTags/IC_V20120530_allComb_Eflow3200.py | 0 .../config/reRecoTags/IC_V20120530_v1.py | 0 .../config/reRecoTags/IC_V20120611_EFlow.py | 0 .../config/reRecoTags/IC_V20120613_2010_2011.py | 0 .../config/reRecoTags/LC_Phot_data_20120512_189410_193761.py | 0 .../config/reRecoTags/LC_Quant_data_20120512_190262_193774.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012.py | 0 .../config/reRecoTags/Prompt2012C.py | 0 .../config/reRecoTags/Prompt2012C_ADC_v1.py | 0 .../config/reRecoTags/Prompt2012C_LAS20112012v3.py | 0 .../config/reRecoTags/Prompt2012D.py | 0 .../config/reRecoTags/RUN2012AB_ICESEE_v1.py | 0 .../config/reRecoTags/RUN2012AB_ICESEE_v2.py | 0 .../config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py | 0 .../config/reRecoTags/RUN2012C_AlphaEFlow_v1.py | 0 .../config/reRecoTags/RUN2012C_AlphaEFlow_v2.py | 0 .../config/reRecoTags/RUN2012C_AlphaEle_v1.py | 0 .../config/reRecoTags/RUN2012C_AlphaPiZero_v1.py | 0 .../config/reRecoTags/RUN2012C_AlphaRef.py | 0 .../config/reRecoTags/RUN2012C_AlphaRef_ICES.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v1.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v2.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v3.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v4.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v5.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v6.py | 0 .../config/reRecoTags/RUN2012C_ICcomb_v7.py | 0 .../config/reRecoTags/V20121130_ICEle.py | 0 .../config/reRecoTags/V20121130_ICEle_2012AB.py | 0 .../config/reRecoTags/V20121130_ICcomb.py | 0 .../config/reRecoTags/V20121130_ICcomb_2012AB.py | 0 .../config/reRecoTags/V20121130_ICcomb_v2.py | 0 .../config/reRecoTags/V20121130_ICpiZero.py | 0 .../config/reRecoTags/V20121130_ICpiZero_2012AB.py | 0 .../config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py | 0 .../config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py | 0 .../config/reRecoTags/V20121214_PizCorPhiEle.py | 0 .../config/reRecoTags/combo2012v1.py | 0 .../config/reRecoTags/prompt_LCPv2.py | 0 .../config/reRecoTags/prompt_alpha116_LCPv2.py | 0 .../config/reRecoTags/prompt_alpha120.py | 0 .../config/reRecoTags/prompt_alpha120_ESv2.py | 0 .../config/reRecoTags/prompt_alpha120_IC2012v1.py | 0 .../config/reRecoTags/prompt_alpha120_LCPv1.py | 0 .../config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py | 0 .../config/reRecoTags/prompt_alpha120_LCPv2.py | 0 .../config/reRecoTags/prompt_alpha120_LCQv1.py | 0 .../config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py | 0 .../config/reRecoTags/rereco16Jan.py | 0 .../config/reRecoTags/rereco16Jan_las2012v1.py | 0 .../config/reRecoTags/rereco16Jan_las2012v1_alpha116.py | 0 .../config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py | 0 .../config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py | 0 .../config/reRecoTags/rereco30Nov.py | 0 .../config/reRecoTags/rerecoICHEP2012.py | 0 .../reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py | 0 .../reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py | 0 .../config/reRecoTags/rerecoICHEP_IC2012EtaScale.py | 0 .../config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py | 0 .../reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py | 0 .../rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py | 0 .../rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py | 0 .../reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py | 0 .../reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py | 0 .../config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py | 0 .../config/reRecoTags/rerecoICHEP_LCQonline.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py | 0 .../reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/test.py | 0 .../config/reRecoTags/trivialCond.py | 0 .../config/reRecoTags/tutorial_mo4.py | 0 .../config/reRecoTags/tutorial_ric.py | 0 .../config/reRecoTags/tutorial_shervin.py | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/README | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcaraw.dump | 0 .../doc/alcaraw_alcareco_production.txt | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcareco.dump | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcareco.eventSize | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcarecoMC.dump | 0 .../ALCARAW_RECO => ALCARAW_RECO}/doc/alcarecoMC.eventSize | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/dataformats.txt | 0 .../ALCARAW_RECO => ALCARAW_RECO}/doc/ntuple_production.txt | 0 .../ALCARAW_RECO => ALCARAW_RECO}/doc/quick_instructions.txt | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/rereco.txt | 0 .../interface/AlCaECALRecHitReducer.h | 0 .../interface/AlCaElectronTracksReducer.h | 0 .../interface/ElectronRecalibSuperClusterAssociatorSH.h | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/PUDumper.h | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/ntuple_datasets.dat | 0 .../python/ALCARECOEcalCalIsolElectron_Output_cff.py | 0 .../python/ALCARECOEcalCalIsolElectron_cff.py | 0 .../python/AlCaElectronTracksReducer_cfi.py | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/PUDumper_cfi.py | 0 .../python/ZElectronSkimSandbox_cff.py | 0 .../python/alCaIsolatedElectrons_cfi.py | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/alcaSkimming.py | 0 .../python/electronRecalibSCAssociatorSH_cfi.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/reRecoValidation.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/sandboxOutput_cff.py | 0 .../python/sandboxRerecoOutput_cff.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/sandboxRerecoSeq_cff.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/python/sandboxSeq_cff.py | 0 .../python/trackerDrivenFinder_cff.py | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/RerecoQuick.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/SandboxQuick.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/applyPatches.sh | 0 .../scripts/checkAndResubmitRereco.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkEOS.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/checkSandboxFiles.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/filelistDatasets.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/getSkimEff.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mergeOutput.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mvNtuple.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/parseDatasetFile.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcaraw.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcareco.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcarereco.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/prodFunctions.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodNtuples.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/removeEmptyFiles.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/removeRereco.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/rereco.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/rerecoSandboxQuick.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/resubmitCrab.sh | 0 .../scripts/splittedOutputFilesCrabPatch.sh | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/test.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/scripts/updateLastDataset.sh | 0 .../ALCARAW_RECO => ALCARAW_RECO}/src/AlCaECALRecHitReducer.cc | 0 .../src/AlCaElectronTracksReducer.cc | 0 .../src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/src/PUDumper.cc | 0 .../test/AlCaElectronsProducer.cc-calibRecHit | 0 .../test/AlCaElectronsProducer.h-calibRecHit | 0 .../test/EcalClusterLazyTools.cc_patch | 0 .../test/EcalClusterLazyTools.h_patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools_h.sed | 0 .../test/EcalRecalibRecHitProducer.cc.patch | 0 .../test/ReducedESRecHitCollectionProducer.cc.patch | 0 .../test/ReducedESRecHitCollectionProducer.h.patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/class_def.xml.patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/clusterLazyTools.patch | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/electronRegression.patch | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/nPU_mc.py | 0 .../ALCARAW_RECO => ALCARAW_RECO}/test/recHitsValidation.py | 0 {Calibration/ALCARAW_RECO => ALCARAW_RECO}/tmp/.gitignore | 0 Calibration/BuildFile.xml => BuildFile.xml | 0 .../BuildFile.xml | 0 .../data/copy.url | 0 .../data/download.url | 0 .../EleNewEnergiesProducer => EleNewEnergiesProducer}/doc/README | 0 .../elenewenergiesproducer_cfg.py | 0 .../interface/EGEnergyCorrector_fra.h | 0 .../python/elenewenergiesproducer_cfi.py | 0 .../src/EGEnergyCorrector_fra.cc | 0 .../src/EleNewEnergiesProducer.cc | 0 .../EleSelectionProducers => EleSelectionProducers}/BuildFile.xml | 0 .../eleselectionproducers_cfg.py | 0 .../interface/SimpleCutBasedElectronIDSelectionFunctor.h | 0 .../python/eleselectionproducers_cfi.py | 0 .../src/EleSelectionProducers.cc | 0 .../src/SimpleCutBasedElectronIDSelectionFunctor.cc | 0 {Calibration/JsonFilter => JsonFilter}/BuildFile.xml | 0 {Calibration/JsonFilter => JsonFilter}/python/jsonFilter_cfi.py | 0 {Calibration/JsonFilter => JsonFilter}/src/JsonFilter.cc | 0 Calibration/README => README | 0 {Calibration/ZFitter => ZFitter}/BuildFile.xml | 0 {Calibration/ZFitter => ZFitter}/Makefile | 0 {Calibration/ZFitter => ZFitter}/awk/Hgg_resCorr.awk | 0 {Calibration/ZFitter => ZFitter}/awk/format.awk | 0 {Calibration/ZFitter => ZFitter}/awk/newResolution.awk | 0 {Calibration/ZFitter => ZFitter}/awk/recalibOutput.awk | 0 {Calibration/ZFitter => ZFitter}/awk/recalibOutput_H4l.awk | 0 {Calibration/ZFitter => ZFitter}/bin/BuildFile.xml | 0 {Calibration/ZFitter => ZFitter}/bin/ZFitter.cpp | 0 {Calibration/ZFitter => ZFitter}/data/regions/absEta.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/absEtaSingleEle.dat | 0 .../data/regions/invMassRelSigma_SC_regrCorr_pho.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/nHits.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/refReg.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/scaleStep0.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/scaleStep1.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/scaleStep2.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep2smearing_1.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep2smearing_2.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/scaleStep3.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep3_withZPt.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep4smearing_1.dat | 0 .../ZFitter => ZFitter}/data/regions/scaleStep4smearing_2.dat | 0 .../ZFitter => ZFitter}/data/regions/smearing_energy_EB.dat | 0 .../ZFitter => ZFitter}/data/regions/smearing_energy_EE.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/stability.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/systematics.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/test.dat | 0 {Calibration/ZFitter => ZFitter}/data/regions/validation.dat | 0 .../ZFitter => ZFitter}/data/regions/validation_smearing.dat | 0 {Calibration/ZFitter => ZFitter}/data/runRanges/monitoring.dat | 0 {Calibration/ZFitter => ZFitter}/data/runRanges/monitoring2.dat | 0 .../ZFitter => ZFitter}/data/runRanges/monitoring_2011.dat | 0 {Calibration/ZFitter => ZFitter}/data/runRanges/runPeriods.dat | 0 .../ZFitter => ZFitter}/data/runRanges/runRangeLimits.dat | 0 {Calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.dat | 0 {Calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.txt | 0 .../data/runRanges/runranges_29Jun-RUN2011.dat | 0 .../data/runRanges/runranges_ECALpaper2011.dat | 0 .../data/runRanges/runranges_ECALpaper2011_v2.dat | 0 .../ZFitter => ZFitter}/data/runRanges/runranges_HCP2012.dat | 0 .../ZFitter => ZFitter}/data/runRanges/runranges_Moriond2013.dat | 0 .../data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/13Jul.dat | 0 .../ZFitter => ZFitter}/data/validation/16Jan_42X-newGT.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/16Jan_42X.dat | 0 .../ZFitter => ZFitter}/data/validation/22Jan2012-runDepMC.dat | 0 .../ZFitter => ZFitter}/data/validation/22Jan2012-stdMC.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/HCP2012.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/NewG4.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/NewG4X0Max.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/RUNC.dat | 0 .../ZFitter => ZFitter}/data/validation/Winter13-powheg.dat | 0 .../ZFitter => ZFitter}/data/validation/monitoring_2012_53X.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/moriond2013.dat | 0 .../ZFitter => ZFitter}/data/validation/moriond2013Checks.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat | 0 .../data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat | 0 .../data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat | 0 .../data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat | 0 .../data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat | 0 .../data/validation/rereco/2011_data/rereco_2011A.dat | 0 .../data/validation/rereco/2011_data/rereco_2011B.dat | 0 .../data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat | 0 .../data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat | 0 .../validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat | 0 .../validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat | 0 .../validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat | 0 .../data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat | 0 .../validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat | 0 .../data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat | 0 .../validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat | 0 .../validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat | 0 .../validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat | 0 .../rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat | 0 .../data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat | 0 .../data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat | 0 .../rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat | 0 .../data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat | 0 .../data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat | 0 .../validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat | 0 .../rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat | 0 .../rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat | 0 .../data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat | 0 .../validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat | 0 .../validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat | 0 .../rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat | 0 .../rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat | 0 .../validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat | 0 .../validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat | 0 .../validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat | 0 .../data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat | 0 .../data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat | 0 .../data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat | 0 .../data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat | 0 .../rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat | 0 .../data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat | 0 .../V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat | 0 .../V20121211_pizphiele_runC_AllR9EtaScale.dat | 0 .../V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat | 0 .../V20121211_pizphiele_runC_HR9EtaScale_v2.dat | 0 .../V20121211_pizphiele_runC_HR9EtaScale_v3.dat | 0 .../rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat | 0 .../validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat | 0 .../rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat | 0 .../data/validation/rereco/ungrouped/Moriond2013.dat | 0 .../data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat | 0 .../data/validation/rereco/ungrouped/Winter13.dat | 0 .../data/validation/rereco/ungrouped/Winter13_noIC.dat | 0 .../data/validation/rereco/ungrouped/Winter13_noLas.dat | 0 .../data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat | 0 .../data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat | 0 .../rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat | 0 .../ZFitter => ZFitter}/data/validation/rereco/ungrouped/test.dat | 0 {Calibration/ZFitter => ZFitter}/data/validation/test.dat | 0 {Calibration/ZFitter => ZFitter}/doc/Hgg_systematics.txt | 0 {Calibration/ZFitter => ZFitter}/doc/README | 0 {Calibration/ZFitter => ZFitter}/interface/BW_CB_pdf_class.hh | 0 {Calibration/ZFitter => ZFitter}/interface/Cruijff_pdf_class.hh | 0 .../ZFitter => ZFitter}/interface/ElectronCategory_class.hh | 0 .../ZFitter => ZFitter}/interface/EnergyScaleCorrection_class.h | 0 {Calibration/ZFitter => ZFitter}/interface/RooCruijff.hh | 0 {Calibration/ZFitter => ZFitter}/interface/RooMinimizer.hh | 0 {Calibration/ZFitter => ZFitter}/interface/RooSmearer.hh | 0 {Calibration/ZFitter => ZFitter}/interface/SmearingImporter.hh | 0 {Calibration/ZFitter => ZFitter}/interface/ZFit_class.hh | 0 {Calibration/ZFitter => ZFitter}/interface/ZeeEvent.hh | 0 {Calibration/ZFitter => ZFitter}/interface/addBranch_class.hh | 0 {Calibration/ZFitter => ZFitter}/interface/puWeights_class.hh | 0 {Calibration/ZFitter => ZFitter}/interface/r9Weights_class.hh | 0 {Calibration/ZFitter => ZFitter}/interface/runDivide_class.hh | 0 {Calibration/ZFitter => ZFitter}/interface/setTDRStyle.hh | 0 {Calibration/ZFitter => ZFitter}/macro/Hgg_systematic_plots.C | 0 {Calibration/ZFitter => ZFitter}/macro/PlotDataMC.C | 0 {Calibration/ZFitter => ZFitter}/macro/macro_fit.C | 0 {Calibration/ZFitter => ZFitter}/macro/mcmcDraw.C | 0 {Calibration/ZFitter => ZFitter}/macro/new_branch.C | 0 {Calibration/ZFitter => ZFitter}/macro/periods.C | 0 {Calibration/ZFitter => ZFitter}/macro/periodsPlot.C | 0 {Calibration/ZFitter => ZFitter}/macro/plot_data_mc.C | 0 {Calibration/ZFitter => ZFitter}/macro/propaganda_plot.C | 0 {Calibration/ZFitter => ZFitter}/macro/propaganda_plot2.C | 0 {Calibration/ZFitter => ZFitter}/macro/quantile.cc | 0 {Calibration/ZFitter => ZFitter}/macro/sigmaE_plot.C | 0 {Calibration/ZFitter => ZFitter}/macro/stability.C | 0 {Calibration/ZFitter => ZFitter}/macro/standardDataMC.C | 0 {Calibration/ZFitter => ZFitter}/macro/standardMCMC.C | 0 {Calibration/ZFitter => ZFitter}/script/CalcResCorrection.sh | 0 {Calibration/ZFitter => ZFitter}/script/FitResultTostep2.sh | 0 {Calibration/ZFitter => ZFitter}/script/GenRootChain.sh | 0 {Calibration/ZFitter => ZFitter}/script/PUDumperToHist.sh | 0 {Calibration/ZFitter => ZFitter}/script/compareColumns.sh | 0 {Calibration/ZFitter => ZFitter}/script/dataPU.sh | 0 {Calibration/ZFitter => ZFitter}/script/energyScale.sh | 0 {Calibration/ZFitter => ZFitter}/script/formatTable.sh | 0 {Calibration/ZFitter => ZFitter}/script/justOnce/materialStudy.sh | 0 .../ZFitter => ZFitter}/script/justOnce/materialStudyPlot.sh | 0 {Calibration/ZFitter => ZFitter}/script/justOnce/smearing.sh | 0 {Calibration/ZFitter => ZFitter}/script/makeCorrVsRunNumber.py | 0 {Calibration/ZFitter => ZFitter}/script/makeTable.sh | 0 {Calibration/ZFitter => ZFitter}/script/makeValidationSlides.sh | 0 {Calibration/ZFitter => ZFitter}/script/makehtml.py | 0 {Calibration/ZFitter => ZFitter}/script/monitoring_validation.sh | 0 {Calibration/ZFitter => ZFitter}/script/publish.sh | 0 {Calibration/ZFitter => ZFitter}/script/report.sh | 0 {Calibration/ZFitter => ZFitter}/script/selEff.sh | 0 {Calibration/ZFitter => ZFitter}/script/slidesFunctions.sh | 0 {Calibration/ZFitter => ZFitter}/script/stability.sh | 0 {Calibration/ZFitter => ZFitter}/script/systematics.sh | 0 {Calibration/ZFitter => ZFitter}/script/tex2txt.sh | 0 {Calibration/ZFitter => ZFitter}/script/validation.sh | 0 {Calibration/ZFitter => ZFitter}/sed/run2time.sed | 0 {Calibration/ZFitter => ZFitter}/sed/tex.sed | 0 {Calibration/ZFitter => ZFitter}/src/BW_CB_pdf_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/Cruijff_pdf_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/ElectronCategory_class.cc | 0 .../ZFitter => ZFitter}/src/EnergyScaleCorrection_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/RooCruijff.cc | 0 {Calibration/ZFitter => ZFitter}/src/RooMinimizer.cxx | 0 {Calibration/ZFitter => ZFitter}/src/RooSmearer.cc | 0 {Calibration/ZFitter => ZFitter}/src/SmearingImporter.cc | 0 {Calibration/ZFitter => ZFitter}/src/ZFit_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/addBranch_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/nllProfile.cc | 0 {Calibration/ZFitter => ZFitter}/src/puWeights_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/r9Weights_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/runDivide_class.cc | 0 {Calibration/ZFitter => ZFitter}/src/setTDRStyle.C | 0 {Calibration/ZFitter => ZFitter}/test/launch.sh | 0 {Calibration/ZFitter => ZFitter}/test/runDivide_macro.C | 0 {Calibration/ZFitter => ZFitter}/test/test.cpp | 0 {Calibration/ZFitter => ZFitter}/tex/FitSlides_template.tex | 0 {Calibration/ZFitter => ZFitter}/tex/fitSlides.tex | 0 {Calibration/ZFitter => ZFitter}/tex/stabilitySlides.tex | 0 {Calibration/ZFitter => ZFitter}/tex/tableSlides.tex | 0 {Calibration/ZFitter => ZFitter}/tmp/.gitignore | 0 {Calibration/ZNtupleDumper => ZNtupleDumper}/BuildFile.xml | 0 {Calibration/ZNtupleDumper => ZNtupleDumper}/doc/README | 0 .../ZNtupleDumper => ZNtupleDumper}/interface/readJsonFile.h | 0 .../ZNtupleDumper => ZNtupleDumper}/macro/nPV_dataMC_plot.C | 0 {Calibration/ZNtupleDumper => ZNtupleDumper}/python/elePat_cfi.py | 0 .../ZNtupleDumper => ZNtupleDumper}/python/patSequence_cff.py | 0 .../ZNtupleDumper => ZNtupleDumper}/python/zntupledumper_cfi.py | 0 .../ZNtupleDumper => ZNtupleDumper}/script/mcPUweights.sh | 0 .../ZNtupleDumper => ZNtupleDumper}/script/puWeightTree.sh | 0 {Calibration/ZNtupleDumper => ZNtupleDumper}/script/puWeights.sh | 0 {Calibration/ZNtupleDumper => ZNtupleDumper}/src/ZNtupleDumper.cc | 0 {Calibration/ZNtupleDumper => ZNtupleDumper}/src/readJsonFile.cc | 0 Calibration/fulldoc => fulldoc | 0 Calibration/setup.sh => setup.sh | 0 571 files changed, 0 insertions(+), 0 deletions(-) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/BuildFile.xml (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/alcaraw_datasets.dat (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/alcareco_datasets.dat (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/alcarereco_datasets.dat (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/awk/compact.awk (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaEFlow_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaEFlow_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaEle_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaPiZero_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_AlphaRef.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v5.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/13Jul_ICcomb_v6.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_ICpiZero_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/16Jan_ICpiZero_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_2011B53X.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_2011B53X_locCont_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_AlphaJarry2012_v0.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_AlphaJarry2012_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012_RUNAB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Dic2012newLAS.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICComb_v4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICEle_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jan2013.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jan2013_LC_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICEle_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICEle_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICEle_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/HggPaper.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120530_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120611_EFlow.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/IC_V20120613_2010_2011.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012C.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012C_ADC_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012C_LAS20112012v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/Prompt2012D.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012AB_ICESEE_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012AB_ICESEE_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaEle_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaRef.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_AlphaRef_ICES.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v5.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v6.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/RUN2012C_ICcomb_v7.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICEle.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICEle_2012AB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICcomb.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICcomb_2012AB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICcomb_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICpiZero.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_ICpiZero_2012AB.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/V20121214_PizCorPhiEle.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/combo2012v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_LCPv2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha116_LCPv2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_ESv2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_IC2012v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCPv1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCPv2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCQv1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan_las2012v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco30Nov.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rerecoICHEP_LCQonline.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/test.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/trivialCond.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/tutorial_mo4.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/tutorial_ric.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/config/reRecoTags/tutorial_shervin.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/README (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcaraw.dump (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcaraw_alcareco_production.txt (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcareco.dump (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcareco.eventSize (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcarecoMC.dump (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/alcarecoMC.eventSize (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/dataformats.txt (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/ntuple_production.txt (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/quick_instructions.txt (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/doc/rereco.txt (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/AlCaECALRecHitReducer.h (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/AlCaElectronTracksReducer.h (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/ElectronRecalibSuperClusterAssociatorSH.h (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/interface/PUDumper.h (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/ntuple_datasets.dat (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/ALCARECOEcalCalIsolElectron_Output_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/ALCARECOEcalCalIsolElectron_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/AlCaElectronTracksReducer_cfi.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/PUDumper_cfi.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/ZElectronSkimSandbox_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/alCaIsolatedElectrons_cfi.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/alcaSkimming.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/electronRecalibSCAssociatorSH_cfi.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/reRecoValidation.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxOutput_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxRerecoOutput_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxRerecoSeq_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/sandboxSeq_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/python/trackerDrivenFinder_cff.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/RerecoQuick.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/SandboxQuick.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/applyPatches.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkAndResubmitRereco.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkEOS.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/checkSandboxFiles.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/filelistDatasets.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/getSkimEff.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mergeOutput.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/mvNtuple.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/parseDatasetFile.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcaraw.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcareco.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodAlcarereco.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodFunctions.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/prodNtuples.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/removeEmptyFiles.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/removeRereco.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/rereco.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/rerecoSandboxQuick.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/resubmitCrab.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/splittedOutputFilesCrabPatch.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/test.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/scripts/updateLastDataset.sh (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/src/AlCaECALRecHitReducer.cc (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/src/AlCaElectronTracksReducer.cc (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/src/PUDumper.cc (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/AlCaElectronsProducer.cc-calibRecHit (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/AlCaElectronsProducer.h-calibRecHit (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools.cc_patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools.h_patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalClusterLazyTools_h.sed (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/EcalRecalibRecHitProducer.cc.patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/ReducedESRecHitCollectionProducer.cc.patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/ReducedESRecHitCollectionProducer.h.patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/class_def.xml.patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/clusterLazyTools.patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/electronRegression.patch (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/nPU_mc.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/test/recHitsValidation.py (100%) rename {Calibration/ALCARAW_RECO => ALCARAW_RECO}/tmp/.gitignore (100%) rename Calibration/BuildFile.xml => BuildFile.xml (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/BuildFile.xml (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/data/copy.url (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/data/download.url (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/doc/README (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/elenewenergiesproducer_cfg.py (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/interface/EGEnergyCorrector_fra.h (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/python/elenewenergiesproducer_cfi.py (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/src/EGEnergyCorrector_fra.cc (100%) rename {Calibration/EleNewEnergiesProducer => EleNewEnergiesProducer}/src/EleNewEnergiesProducer.cc (100%) rename {Calibration/EleSelectionProducers => EleSelectionProducers}/BuildFile.xml (100%) rename {Calibration/EleSelectionProducers => EleSelectionProducers}/eleselectionproducers_cfg.py (100%) rename {Calibration/EleSelectionProducers => EleSelectionProducers}/interface/SimpleCutBasedElectronIDSelectionFunctor.h (100%) rename {Calibration/EleSelectionProducers => EleSelectionProducers}/python/eleselectionproducers_cfi.py (100%) rename {Calibration/EleSelectionProducers => EleSelectionProducers}/src/EleSelectionProducers.cc (100%) rename {Calibration/EleSelectionProducers => EleSelectionProducers}/src/SimpleCutBasedElectronIDSelectionFunctor.cc (100%) rename {Calibration/JsonFilter => JsonFilter}/BuildFile.xml (100%) rename {Calibration/JsonFilter => JsonFilter}/python/jsonFilter_cfi.py (100%) rename {Calibration/JsonFilter => JsonFilter}/src/JsonFilter.cc (100%) rename Calibration/README => README (100%) rename {Calibration/ZFitter => ZFitter}/BuildFile.xml (100%) rename {Calibration/ZFitter => ZFitter}/Makefile (100%) rename {Calibration/ZFitter => ZFitter}/awk/Hgg_resCorr.awk (100%) rename {Calibration/ZFitter => ZFitter}/awk/format.awk (100%) rename {Calibration/ZFitter => ZFitter}/awk/newResolution.awk (100%) rename {Calibration/ZFitter => ZFitter}/awk/recalibOutput.awk (100%) rename {Calibration/ZFitter => ZFitter}/awk/recalibOutput_H4l.awk (100%) rename {Calibration/ZFitter => ZFitter}/bin/BuildFile.xml (100%) rename {Calibration/ZFitter => ZFitter}/bin/ZFitter.cpp (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/absEta.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/absEtaSingleEle.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/invMassRelSigma_SC_regrCorr_pho.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/nHits.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/refReg.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep0.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep2smearing_1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep2smearing_2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep3_withZPt.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep4smearing_1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/scaleStep4smearing_2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/smearing_energy_EB.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/smearing_energy_EE.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/stability.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/systematics.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/test.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/validation.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/regions/validation_smearing.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/monitoring.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/monitoring2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/monitoring_2011.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runPeriods.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runRangeLimits.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runRangePlot.txt (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runranges_29Jun-RUN2011.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runranges_ECALpaper2011.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runranges_ECALpaper2011_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runranges_HCP2012.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/runranges_Moriond2013.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/13Jul.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/16Jan_42X-newGT.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/16Jan_42X.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/22Jan2012-runDepMC.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/22Jan2012-stdMC.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/HCP2012.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/NewG4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/NewG4X0Max.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/RUNC.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/Winter13-powheg.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/monitoring_2012_53X.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/moriond2013.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/moriond2013Checks.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/2011_data/rereco_2011A.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/2011_data/rereco_2011B.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Moriond2013.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13_noIC.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13_noLas.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/rereco/ungrouped/test.dat (100%) rename {Calibration/ZFitter => ZFitter}/data/validation/test.dat (100%) rename {Calibration/ZFitter => ZFitter}/doc/Hgg_systematics.txt (100%) rename {Calibration/ZFitter => ZFitter}/doc/README (100%) rename {Calibration/ZFitter => ZFitter}/interface/BW_CB_pdf_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/Cruijff_pdf_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/ElectronCategory_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/EnergyScaleCorrection_class.h (100%) rename {Calibration/ZFitter => ZFitter}/interface/RooCruijff.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/RooMinimizer.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/RooSmearer.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/SmearingImporter.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/ZFit_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/ZeeEvent.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/addBranch_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/puWeights_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/r9Weights_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/runDivide_class.hh (100%) rename {Calibration/ZFitter => ZFitter}/interface/setTDRStyle.hh (100%) rename {Calibration/ZFitter => ZFitter}/macro/Hgg_systematic_plots.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/PlotDataMC.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/macro_fit.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/mcmcDraw.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/new_branch.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/periods.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/periodsPlot.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/plot_data_mc.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/propaganda_plot.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/propaganda_plot2.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/quantile.cc (100%) rename {Calibration/ZFitter => ZFitter}/macro/sigmaE_plot.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/stability.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/standardDataMC.C (100%) rename {Calibration/ZFitter => ZFitter}/macro/standardMCMC.C (100%) rename {Calibration/ZFitter => ZFitter}/script/CalcResCorrection.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/FitResultTostep2.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/GenRootChain.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/PUDumperToHist.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/compareColumns.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/dataPU.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/energyScale.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/formatTable.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/justOnce/materialStudy.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/justOnce/materialStudyPlot.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/justOnce/smearing.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/makeCorrVsRunNumber.py (100%) rename {Calibration/ZFitter => ZFitter}/script/makeTable.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/makeValidationSlides.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/makehtml.py (100%) rename {Calibration/ZFitter => ZFitter}/script/monitoring_validation.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/publish.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/report.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/selEff.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/slidesFunctions.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/stability.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/systematics.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/tex2txt.sh (100%) rename {Calibration/ZFitter => ZFitter}/script/validation.sh (100%) rename {Calibration/ZFitter => ZFitter}/sed/run2time.sed (100%) rename {Calibration/ZFitter => ZFitter}/sed/tex.sed (100%) rename {Calibration/ZFitter => ZFitter}/src/BW_CB_pdf_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/Cruijff_pdf_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/ElectronCategory_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/EnergyScaleCorrection_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/RooCruijff.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/RooMinimizer.cxx (100%) rename {Calibration/ZFitter => ZFitter}/src/RooSmearer.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/SmearingImporter.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/ZFit_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/addBranch_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/nllProfile.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/puWeights_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/r9Weights_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/runDivide_class.cc (100%) rename {Calibration/ZFitter => ZFitter}/src/setTDRStyle.C (100%) rename {Calibration/ZFitter => ZFitter}/test/launch.sh (100%) rename {Calibration/ZFitter => ZFitter}/test/runDivide_macro.C (100%) rename {Calibration/ZFitter => ZFitter}/test/test.cpp (100%) rename {Calibration/ZFitter => ZFitter}/tex/FitSlides_template.tex (100%) rename {Calibration/ZFitter => ZFitter}/tex/fitSlides.tex (100%) rename {Calibration/ZFitter => ZFitter}/tex/stabilitySlides.tex (100%) rename {Calibration/ZFitter => ZFitter}/tex/tableSlides.tex (100%) rename {Calibration/ZFitter => ZFitter}/tmp/.gitignore (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/BuildFile.xml (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/doc/README (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/interface/readJsonFile.h (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/macro/nPV_dataMC_plot.C (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/python/elePat_cfi.py (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/python/patSequence_cff.py (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/python/zntupledumper_cfi.py (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/script/mcPUweights.sh (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/script/puWeightTree.sh (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/script/puWeights.sh (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/src/ZNtupleDumper.cc (100%) rename {Calibration/ZNtupleDumper => ZNtupleDumper}/src/readJsonFile.cc (100%) rename Calibration/fulldoc => fulldoc (100%) rename Calibration/setup.sh => setup.sh (100%) diff --git a/Calibration/ALCARAW_RECO/BuildFile.xml b/ALCARAW_RECO/BuildFile.xml similarity index 100% rename from Calibration/ALCARAW_RECO/BuildFile.xml rename to ALCARAW_RECO/BuildFile.xml diff --git a/Calibration/ALCARAW_RECO/alcaraw_datasets.dat b/ALCARAW_RECO/alcaraw_datasets.dat similarity index 100% rename from Calibration/ALCARAW_RECO/alcaraw_datasets.dat rename to ALCARAW_RECO/alcaraw_datasets.dat diff --git a/Calibration/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat similarity index 100% rename from Calibration/ALCARAW_RECO/alcareco_datasets.dat rename to ALCARAW_RECO/alcareco_datasets.dat diff --git a/Calibration/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat similarity index 100% rename from Calibration/ALCARAW_RECO/alcarereco_datasets.dat rename to ALCARAW_RECO/alcarereco_datasets.dat diff --git a/Calibration/ALCARAW_RECO/awk/compact.awk b/ALCARAW_RECO/awk/compact.awk similarity index 100% rename from Calibration/ALCARAW_RECO/awk/compact.awk rename to ALCARAW_RECO/awk/compact.awk diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEFlow_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaEle_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaPiZero_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py b/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_AlphaRef.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v5.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py b/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py rename to ALCARAW_RECO/config/reRecoTags/13Jul_ICcomb_v6.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alpha116_IC2011v1_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflow_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv10_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv11_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv12_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv2_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv3_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv4_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv5_IC2011v1_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv6_IC2011v1_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2010v3_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv7_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv8_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_AlphaEflowv9_IC2011v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp110.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp114.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py b/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_Alphas_EE_sic1_btcp118.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp150_EE_sic1_btcp124.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp154_EE_sic1_btcp120.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp156_EE_sic1_btcp132.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp158_EE_sic1_btcp136.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py b/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_EcalLaserAlphas_EB_sic_btcp_EE_sic1_btcp128.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py b/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py rename to ALCARAW_RECO/config/reRecoTags/16Jan_ICpiZero_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py b/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py rename to ALCARAW_RECO/config/reRecoTags/Cal_2011B53X.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_2011B53X_locCont_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py b/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py rename to ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v0.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_AlphaJarry2012_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v1_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCEle_v2_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v1_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v2_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v3_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v4_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_lasPrompt.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noIC.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCcomb_v5_offGT_noLas_noIC.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v1_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v2_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v3_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCphiSym_v4_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcombTCpiZero_v1_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v1_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICcomb_v2_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_ICpiZero_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012_RUNAB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Dic2012newLAS.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICComb_v4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICEle_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcombTCphiSym_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v5.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v6.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noIC.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICcomb_v7_noLas_noIC.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICphiSym_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_ICpiZero_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py b/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Feb2013_PhisySc_TagOneABCD.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jan2013.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_ICphiSymTCphiSym_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jan2013_LC_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICEle_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICcombHighR9_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICphiSym_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/Cal_Nov2012_ICpiZero_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/HggPaper.py b/ALCARAW_RECO/config/reRecoTags/HggPaper.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/HggPaper.py rename to ALCARAW_RECO/config/reRecoTags/HggPaper.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120424_PiZeroEtaSepOct2011_PhiSymmTimeCorr_EtaScale.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120429_PiZeroEtaSepOct2011_EnergyFlow3200TimeCorr.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_Electron2011_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_ElectronOld2011_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryAverage2011_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PhiSymmetryPiZeroElectronCombination_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_EtaScaleHighR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroElectronCombination_PrecalibEtaScale.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_EtaScaleHighR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011OldLaser_PrecalibEtaScale.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120510_PiZeroEta2011SepOct_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120530_allComb_Eflow3200.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120530_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120611_EFlow.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py b/ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py rename to ALCARAW_RECO/config/reRecoTags/IC_V20120613_2010_2011.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py b/ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py rename to ALCARAW_RECO/config/reRecoTags/LC_Phot_data_20120512_189410_193761.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py b/ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py rename to ALCARAW_RECO/config/reRecoTags/LC_Quant_data_20120512_190262_193774.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012C.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012C.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012C_ADC_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012C_LAS20112012v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012D.py b/ALCARAW_RECO/config/reRecoTags/Prompt2012D.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/Prompt2012D.py rename to ALCARAW_RECO/config/reRecoTags/Prompt2012D.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py b/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py b/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012AB_ICESEE_v2_newClustering.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEFlow_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaEle_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaPiZero_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_AlphaRef_ICES.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v5.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v6.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py b/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py rename to ALCARAW_RECO/config/reRecoTags/RUN2012C_ICcomb_v7.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICEle.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICEle_2012AB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_2012AB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICcomb_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py b/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_ICpiZero_2012AB.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012AB_ICcomb_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py b/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py rename to ALCARAW_RECO/config/reRecoTags/V20121130_RUN2012C_ICcomb_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py b/ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py rename to ALCARAW_RECO/config/reRecoTags/V20121214_PizCorPhiEle.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/combo2012v1.py b/ALCARAW_RECO/config/reRecoTags/combo2012v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/combo2012v1.py rename to ALCARAW_RECO/config/reRecoTags/combo2012v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_LCPv2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha116_LCPv2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_ESv2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_IC2012v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv1_IC2012v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCPv2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py b/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py rename to ALCARAW_RECO/config/reRecoTags/prompt_alpha120_LCQv1_IC2012v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alpha116.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py b/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py rename to ALCARAW_RECO/config/reRecoTags/rereco16Jan_las2012v1_alphaTestPrompt.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v1.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py b/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py rename to ALCARAW_RECO/config/reRecoTags/rereco29Jun-RUN2011_ADC_v5.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco30Nov.py b/ALCARAW_RECO/config/reRecoTags/rereco30Nov.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco30Nov.py rename to ALCARAW_RECO/config/reRecoTags/rereco30Nov.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv5_IC2011v1_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_Eflowv6_IC2011v1_EtaScaleAllR9.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC2012EtaScale.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZero2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120616_piZeroPhiSymm2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120620_piZeroPhiSymmEtaScale2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120718_piZeroPhiSymEleEtaScale2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120802_Ele2012EtaScale2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_ICV20120805_piZero2012EtaScale2012.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_IC_Pi0Eta_20120608.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py b/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py rename to ALCARAW_RECO/config/reRecoTags/rerecoICHEP_LCQonline.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runAB_HR9EtaScale.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_AllR9EtaScale.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v2.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v3.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py b/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py rename to ALCARAW_RECO/config/reRecoTags/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/test.py b/ALCARAW_RECO/config/reRecoTags/test.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/test.py rename to ALCARAW_RECO/config/reRecoTags/test.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/trivialCond.py b/ALCARAW_RECO/config/reRecoTags/trivialCond.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/trivialCond.py rename to ALCARAW_RECO/config/reRecoTags/trivialCond.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py b/ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py rename to ALCARAW_RECO/config/reRecoTags/tutorial_mo4.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/tutorial_ric.py b/ALCARAW_RECO/config/reRecoTags/tutorial_ric.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/tutorial_ric.py rename to ALCARAW_RECO/config/reRecoTags/tutorial_ric.py diff --git a/Calibration/ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py b/ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py similarity index 100% rename from Calibration/ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py rename to ALCARAW_RECO/config/reRecoTags/tutorial_shervin.py diff --git a/Calibration/ALCARAW_RECO/doc/README b/ALCARAW_RECO/doc/README similarity index 100% rename from Calibration/ALCARAW_RECO/doc/README rename to ALCARAW_RECO/doc/README diff --git a/Calibration/ALCARAW_RECO/doc/alcaraw.dump b/ALCARAW_RECO/doc/alcaraw.dump similarity index 100% rename from Calibration/ALCARAW_RECO/doc/alcaraw.dump rename to ALCARAW_RECO/doc/alcaraw.dump diff --git a/Calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt similarity index 100% rename from Calibration/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt rename to ALCARAW_RECO/doc/alcaraw_alcareco_production.txt diff --git a/Calibration/ALCARAW_RECO/doc/alcareco.dump b/ALCARAW_RECO/doc/alcareco.dump similarity index 100% rename from Calibration/ALCARAW_RECO/doc/alcareco.dump rename to ALCARAW_RECO/doc/alcareco.dump diff --git a/Calibration/ALCARAW_RECO/doc/alcareco.eventSize b/ALCARAW_RECO/doc/alcareco.eventSize similarity index 100% rename from Calibration/ALCARAW_RECO/doc/alcareco.eventSize rename to ALCARAW_RECO/doc/alcareco.eventSize diff --git a/Calibration/ALCARAW_RECO/doc/alcarecoMC.dump b/ALCARAW_RECO/doc/alcarecoMC.dump similarity index 100% rename from Calibration/ALCARAW_RECO/doc/alcarecoMC.dump rename to ALCARAW_RECO/doc/alcarecoMC.dump diff --git a/Calibration/ALCARAW_RECO/doc/alcarecoMC.eventSize b/ALCARAW_RECO/doc/alcarecoMC.eventSize similarity index 100% rename from Calibration/ALCARAW_RECO/doc/alcarecoMC.eventSize rename to ALCARAW_RECO/doc/alcarecoMC.eventSize diff --git a/Calibration/ALCARAW_RECO/doc/dataformats.txt b/ALCARAW_RECO/doc/dataformats.txt similarity index 100% rename from Calibration/ALCARAW_RECO/doc/dataformats.txt rename to ALCARAW_RECO/doc/dataformats.txt diff --git a/Calibration/ALCARAW_RECO/doc/ntuple_production.txt b/ALCARAW_RECO/doc/ntuple_production.txt similarity index 100% rename from Calibration/ALCARAW_RECO/doc/ntuple_production.txt rename to ALCARAW_RECO/doc/ntuple_production.txt diff --git a/Calibration/ALCARAW_RECO/doc/quick_instructions.txt b/ALCARAW_RECO/doc/quick_instructions.txt similarity index 100% rename from Calibration/ALCARAW_RECO/doc/quick_instructions.txt rename to ALCARAW_RECO/doc/quick_instructions.txt diff --git a/Calibration/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt similarity index 100% rename from Calibration/ALCARAW_RECO/doc/rereco.txt rename to ALCARAW_RECO/doc/rereco.txt diff --git a/Calibration/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h b/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h similarity index 100% rename from Calibration/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h rename to ALCARAW_RECO/interface/AlCaECALRecHitReducer.h diff --git a/Calibration/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h b/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h similarity index 100% rename from Calibration/ALCARAW_RECO/interface/AlCaElectronTracksReducer.h rename to ALCARAW_RECO/interface/AlCaElectronTracksReducer.h diff --git a/Calibration/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h b/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h similarity index 100% rename from Calibration/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h rename to ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h diff --git a/Calibration/ALCARAW_RECO/interface/PUDumper.h b/ALCARAW_RECO/interface/PUDumper.h similarity index 100% rename from Calibration/ALCARAW_RECO/interface/PUDumper.h rename to ALCARAW_RECO/interface/PUDumper.h diff --git a/Calibration/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat similarity index 100% rename from Calibration/ALCARAW_RECO/ntuple_datasets.dat rename to ALCARAW_RECO/ntuple_datasets.dat diff --git a/Calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py rename to ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py diff --git a/Calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py rename to ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py diff --git a/Calibration/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py b/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py rename to ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py diff --git a/Calibration/ALCARAW_RECO/python/PUDumper_cfi.py b/ALCARAW_RECO/python/PUDumper_cfi.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/PUDumper_cfi.py rename to ALCARAW_RECO/python/PUDumper_cfi.py diff --git a/Calibration/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py b/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py rename to ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py diff --git a/Calibration/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py b/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py rename to ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py diff --git a/Calibration/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/alcaSkimming.py rename to ALCARAW_RECO/python/alcaSkimming.py diff --git a/Calibration/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py b/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py rename to ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py diff --git a/Calibration/ALCARAW_RECO/python/reRecoValidation.py b/ALCARAW_RECO/python/reRecoValidation.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/reRecoValidation.py rename to ALCARAW_RECO/python/reRecoValidation.py diff --git a/Calibration/ALCARAW_RECO/python/sandboxOutput_cff.py b/ALCARAW_RECO/python/sandboxOutput_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/sandboxOutput_cff.py rename to ALCARAW_RECO/python/sandboxOutput_cff.py diff --git a/Calibration/ALCARAW_RECO/python/sandboxRerecoOutput_cff.py b/ALCARAW_RECO/python/sandboxRerecoOutput_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/sandboxRerecoOutput_cff.py rename to ALCARAW_RECO/python/sandboxRerecoOutput_cff.py diff --git a/Calibration/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py rename to ALCARAW_RECO/python/sandboxRerecoSeq_cff.py diff --git a/Calibration/ALCARAW_RECO/python/sandboxSeq_cff.py b/ALCARAW_RECO/python/sandboxSeq_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/sandboxSeq_cff.py rename to ALCARAW_RECO/python/sandboxSeq_cff.py diff --git a/Calibration/ALCARAW_RECO/python/trackerDrivenFinder_cff.py b/ALCARAW_RECO/python/trackerDrivenFinder_cff.py similarity index 100% rename from Calibration/ALCARAW_RECO/python/trackerDrivenFinder_cff.py rename to ALCARAW_RECO/python/trackerDrivenFinder_cff.py diff --git a/Calibration/ALCARAW_RECO/scripts/RerecoQuick.sh b/ALCARAW_RECO/scripts/RerecoQuick.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/RerecoQuick.sh rename to ALCARAW_RECO/scripts/RerecoQuick.sh diff --git a/Calibration/ALCARAW_RECO/scripts/SandboxQuick.sh b/ALCARAW_RECO/scripts/SandboxQuick.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/SandboxQuick.sh rename to ALCARAW_RECO/scripts/SandboxQuick.sh diff --git a/Calibration/ALCARAW_RECO/scripts/applyPatches.sh b/ALCARAW_RECO/scripts/applyPatches.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/applyPatches.sh rename to ALCARAW_RECO/scripts/applyPatches.sh diff --git a/Calibration/ALCARAW_RECO/scripts/checkAndResubmitRereco.sh b/ALCARAW_RECO/scripts/checkAndResubmitRereco.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/checkAndResubmitRereco.sh rename to ALCARAW_RECO/scripts/checkAndResubmitRereco.sh diff --git a/Calibration/ALCARAW_RECO/scripts/checkEOS.sh b/ALCARAW_RECO/scripts/checkEOS.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/checkEOS.sh rename to ALCARAW_RECO/scripts/checkEOS.sh diff --git a/Calibration/ALCARAW_RECO/scripts/checkSandboxFiles.sh b/ALCARAW_RECO/scripts/checkSandboxFiles.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/checkSandboxFiles.sh rename to ALCARAW_RECO/scripts/checkSandboxFiles.sh diff --git a/Calibration/ALCARAW_RECO/scripts/filelistDatasets.sh b/ALCARAW_RECO/scripts/filelistDatasets.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/filelistDatasets.sh rename to ALCARAW_RECO/scripts/filelistDatasets.sh diff --git a/Calibration/ALCARAW_RECO/scripts/getSkimEff.sh b/ALCARAW_RECO/scripts/getSkimEff.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/getSkimEff.sh rename to ALCARAW_RECO/scripts/getSkimEff.sh diff --git a/Calibration/ALCARAW_RECO/scripts/mergeOutput.sh b/ALCARAW_RECO/scripts/mergeOutput.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/mergeOutput.sh rename to ALCARAW_RECO/scripts/mergeOutput.sh diff --git a/Calibration/ALCARAW_RECO/scripts/mvNtuple.sh b/ALCARAW_RECO/scripts/mvNtuple.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/mvNtuple.sh rename to ALCARAW_RECO/scripts/mvNtuple.sh diff --git a/Calibration/ALCARAW_RECO/scripts/parseDatasetFile.sh b/ALCARAW_RECO/scripts/parseDatasetFile.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/parseDatasetFile.sh rename to ALCARAW_RECO/scripts/parseDatasetFile.sh diff --git a/Calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh b/ALCARAW_RECO/scripts/prodAlcaraw.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/prodAlcaraw.sh rename to ALCARAW_RECO/scripts/prodAlcaraw.sh diff --git a/Calibration/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/prodAlcareco.sh rename to ALCARAW_RECO/scripts/prodAlcareco.sh diff --git a/Calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/prodAlcarereco.sh rename to ALCARAW_RECO/scripts/prodAlcarereco.sh diff --git a/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/prodFunctions.sh rename to ALCARAW_RECO/scripts/prodFunctions.sh diff --git a/Calibration/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/prodNtuples.sh rename to ALCARAW_RECO/scripts/prodNtuples.sh diff --git a/Calibration/ALCARAW_RECO/scripts/removeEmptyFiles.sh b/ALCARAW_RECO/scripts/removeEmptyFiles.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/removeEmptyFiles.sh rename to ALCARAW_RECO/scripts/removeEmptyFiles.sh diff --git a/Calibration/ALCARAW_RECO/scripts/removeRereco.sh b/ALCARAW_RECO/scripts/removeRereco.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/removeRereco.sh rename to ALCARAW_RECO/scripts/removeRereco.sh diff --git a/Calibration/ALCARAW_RECO/scripts/rereco.sh b/ALCARAW_RECO/scripts/rereco.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/rereco.sh rename to ALCARAW_RECO/scripts/rereco.sh diff --git a/Calibration/ALCARAW_RECO/scripts/rerecoSandboxQuick.sh b/ALCARAW_RECO/scripts/rerecoSandboxQuick.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/rerecoSandboxQuick.sh rename to ALCARAW_RECO/scripts/rerecoSandboxQuick.sh diff --git a/Calibration/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/resubmitCrab.sh rename to ALCARAW_RECO/scripts/resubmitCrab.sh diff --git a/Calibration/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh rename to ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh diff --git a/Calibration/ALCARAW_RECO/scripts/test.sh b/ALCARAW_RECO/scripts/test.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/test.sh rename to ALCARAW_RECO/scripts/test.sh diff --git a/Calibration/ALCARAW_RECO/scripts/updateLastDataset.sh b/ALCARAW_RECO/scripts/updateLastDataset.sh similarity index 100% rename from Calibration/ALCARAW_RECO/scripts/updateLastDataset.sh rename to ALCARAW_RECO/scripts/updateLastDataset.sh diff --git a/Calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc b/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc similarity index 100% rename from Calibration/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc rename to ALCARAW_RECO/src/AlCaECALRecHitReducer.cc diff --git a/Calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc b/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc similarity index 100% rename from Calibration/ALCARAW_RECO/src/AlCaElectronTracksReducer.cc rename to ALCARAW_RECO/src/AlCaElectronTracksReducer.cc diff --git a/Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch b/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch similarity index 100% rename from Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch rename to ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch diff --git a/Calibration/ALCARAW_RECO/src/PUDumper.cc b/ALCARAW_RECO/src/PUDumper.cc similarity index 100% rename from Calibration/ALCARAW_RECO/src/PUDumper.cc rename to ALCARAW_RECO/src/PUDumper.cc diff --git a/Calibration/ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit b/ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit similarity index 100% rename from Calibration/ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit rename to ALCARAW_RECO/test/AlCaElectronsProducer.cc-calibRecHit diff --git a/Calibration/ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit b/ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit similarity index 100% rename from Calibration/ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit rename to ALCARAW_RECO/test/AlCaElectronsProducer.h-calibRecHit diff --git a/Calibration/ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch b/ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch rename to ALCARAW_RECO/test/EcalClusterLazyTools.cc_patch diff --git a/Calibration/ALCARAW_RECO/test/EcalClusterLazyTools.h_patch b/ALCARAW_RECO/test/EcalClusterLazyTools.h_patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/EcalClusterLazyTools.h_patch rename to ALCARAW_RECO/test/EcalClusterLazyTools.h_patch diff --git a/Calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed b/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed similarity index 100% rename from Calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed rename to ALCARAW_RECO/test/EcalClusterLazyTools_h.sed diff --git a/Calibration/ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch b/ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch rename to ALCARAW_RECO/test/EcalRecalibRecHitProducer.cc.patch diff --git a/Calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch b/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch rename to ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.cc.patch diff --git a/Calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch b/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch rename to ALCARAW_RECO/test/ReducedESRecHitCollectionProducer.h.patch diff --git a/Calibration/ALCARAW_RECO/test/class_def.xml.patch b/ALCARAW_RECO/test/class_def.xml.patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/class_def.xml.patch rename to ALCARAW_RECO/test/class_def.xml.patch diff --git a/Calibration/ALCARAW_RECO/test/clusterLazyTools.patch b/ALCARAW_RECO/test/clusterLazyTools.patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/clusterLazyTools.patch rename to ALCARAW_RECO/test/clusterLazyTools.patch diff --git a/Calibration/ALCARAW_RECO/test/electronRegression.patch b/ALCARAW_RECO/test/electronRegression.patch similarity index 100% rename from Calibration/ALCARAW_RECO/test/electronRegression.patch rename to ALCARAW_RECO/test/electronRegression.patch diff --git a/Calibration/ALCARAW_RECO/test/nPU_mc.py b/ALCARAW_RECO/test/nPU_mc.py similarity index 100% rename from Calibration/ALCARAW_RECO/test/nPU_mc.py rename to ALCARAW_RECO/test/nPU_mc.py diff --git a/Calibration/ALCARAW_RECO/test/recHitsValidation.py b/ALCARAW_RECO/test/recHitsValidation.py similarity index 100% rename from Calibration/ALCARAW_RECO/test/recHitsValidation.py rename to ALCARAW_RECO/test/recHitsValidation.py diff --git a/Calibration/ALCARAW_RECO/tmp/.gitignore b/ALCARAW_RECO/tmp/.gitignore similarity index 100% rename from Calibration/ALCARAW_RECO/tmp/.gitignore rename to ALCARAW_RECO/tmp/.gitignore diff --git a/Calibration/BuildFile.xml b/BuildFile.xml similarity index 100% rename from Calibration/BuildFile.xml rename to BuildFile.xml diff --git a/Calibration/EleNewEnergiesProducer/BuildFile.xml b/EleNewEnergiesProducer/BuildFile.xml similarity index 100% rename from Calibration/EleNewEnergiesProducer/BuildFile.xml rename to EleNewEnergiesProducer/BuildFile.xml diff --git a/Calibration/EleNewEnergiesProducer/data/copy.url b/EleNewEnergiesProducer/data/copy.url similarity index 100% rename from Calibration/EleNewEnergiesProducer/data/copy.url rename to EleNewEnergiesProducer/data/copy.url diff --git a/Calibration/EleNewEnergiesProducer/data/download.url b/EleNewEnergiesProducer/data/download.url similarity index 100% rename from Calibration/EleNewEnergiesProducer/data/download.url rename to EleNewEnergiesProducer/data/download.url diff --git a/Calibration/EleNewEnergiesProducer/doc/README b/EleNewEnergiesProducer/doc/README similarity index 100% rename from Calibration/EleNewEnergiesProducer/doc/README rename to EleNewEnergiesProducer/doc/README diff --git a/Calibration/EleNewEnergiesProducer/elenewenergiesproducer_cfg.py b/EleNewEnergiesProducer/elenewenergiesproducer_cfg.py similarity index 100% rename from Calibration/EleNewEnergiesProducer/elenewenergiesproducer_cfg.py rename to EleNewEnergiesProducer/elenewenergiesproducer_cfg.py diff --git a/Calibration/EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h b/EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h similarity index 100% rename from Calibration/EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h rename to EleNewEnergiesProducer/interface/EGEnergyCorrector_fra.h diff --git a/Calibration/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py similarity index 100% rename from Calibration/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py rename to EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py diff --git a/Calibration/EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc b/EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc similarity index 100% rename from Calibration/EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc rename to EleNewEnergiesProducer/src/EGEnergyCorrector_fra.cc diff --git a/Calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc similarity index 100% rename from Calibration/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc rename to EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc diff --git a/Calibration/EleSelectionProducers/BuildFile.xml b/EleSelectionProducers/BuildFile.xml similarity index 100% rename from Calibration/EleSelectionProducers/BuildFile.xml rename to EleSelectionProducers/BuildFile.xml diff --git a/Calibration/EleSelectionProducers/eleselectionproducers_cfg.py b/EleSelectionProducers/eleselectionproducers_cfg.py similarity index 100% rename from Calibration/EleSelectionProducers/eleselectionproducers_cfg.py rename to EleSelectionProducers/eleselectionproducers_cfg.py diff --git a/Calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h similarity index 100% rename from Calibration/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h rename to EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h diff --git a/Calibration/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py similarity index 100% rename from Calibration/EleSelectionProducers/python/eleselectionproducers_cfi.py rename to EleSelectionProducers/python/eleselectionproducers_cfi.py diff --git a/Calibration/EleSelectionProducers/src/EleSelectionProducers.cc b/EleSelectionProducers/src/EleSelectionProducers.cc similarity index 100% rename from Calibration/EleSelectionProducers/src/EleSelectionProducers.cc rename to EleSelectionProducers/src/EleSelectionProducers.cc diff --git a/Calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc b/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc similarity index 100% rename from Calibration/EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc rename to EleSelectionProducers/src/SimpleCutBasedElectronIDSelectionFunctor.cc diff --git a/Calibration/JsonFilter/BuildFile.xml b/JsonFilter/BuildFile.xml similarity index 100% rename from Calibration/JsonFilter/BuildFile.xml rename to JsonFilter/BuildFile.xml diff --git a/Calibration/JsonFilter/python/jsonFilter_cfi.py b/JsonFilter/python/jsonFilter_cfi.py similarity index 100% rename from Calibration/JsonFilter/python/jsonFilter_cfi.py rename to JsonFilter/python/jsonFilter_cfi.py diff --git a/Calibration/JsonFilter/src/JsonFilter.cc b/JsonFilter/src/JsonFilter.cc similarity index 100% rename from Calibration/JsonFilter/src/JsonFilter.cc rename to JsonFilter/src/JsonFilter.cc diff --git a/Calibration/README b/README similarity index 100% rename from Calibration/README rename to README diff --git a/Calibration/ZFitter/BuildFile.xml b/ZFitter/BuildFile.xml similarity index 100% rename from Calibration/ZFitter/BuildFile.xml rename to ZFitter/BuildFile.xml diff --git a/Calibration/ZFitter/Makefile b/ZFitter/Makefile similarity index 100% rename from Calibration/ZFitter/Makefile rename to ZFitter/Makefile diff --git a/Calibration/ZFitter/awk/Hgg_resCorr.awk b/ZFitter/awk/Hgg_resCorr.awk similarity index 100% rename from Calibration/ZFitter/awk/Hgg_resCorr.awk rename to ZFitter/awk/Hgg_resCorr.awk diff --git a/Calibration/ZFitter/awk/format.awk b/ZFitter/awk/format.awk similarity index 100% rename from Calibration/ZFitter/awk/format.awk rename to ZFitter/awk/format.awk diff --git a/Calibration/ZFitter/awk/newResolution.awk b/ZFitter/awk/newResolution.awk similarity index 100% rename from Calibration/ZFitter/awk/newResolution.awk rename to ZFitter/awk/newResolution.awk diff --git a/Calibration/ZFitter/awk/recalibOutput.awk b/ZFitter/awk/recalibOutput.awk similarity index 100% rename from Calibration/ZFitter/awk/recalibOutput.awk rename to ZFitter/awk/recalibOutput.awk diff --git a/Calibration/ZFitter/awk/recalibOutput_H4l.awk b/ZFitter/awk/recalibOutput_H4l.awk similarity index 100% rename from Calibration/ZFitter/awk/recalibOutput_H4l.awk rename to ZFitter/awk/recalibOutput_H4l.awk diff --git a/Calibration/ZFitter/bin/BuildFile.xml b/ZFitter/bin/BuildFile.xml similarity index 100% rename from Calibration/ZFitter/bin/BuildFile.xml rename to ZFitter/bin/BuildFile.xml diff --git a/Calibration/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp similarity index 100% rename from Calibration/ZFitter/bin/ZFitter.cpp rename to ZFitter/bin/ZFitter.cpp diff --git a/Calibration/ZFitter/data/regions/absEta.dat b/ZFitter/data/regions/absEta.dat similarity index 100% rename from Calibration/ZFitter/data/regions/absEta.dat rename to ZFitter/data/regions/absEta.dat diff --git a/Calibration/ZFitter/data/regions/absEtaSingleEle.dat b/ZFitter/data/regions/absEtaSingleEle.dat similarity index 100% rename from Calibration/ZFitter/data/regions/absEtaSingleEle.dat rename to ZFitter/data/regions/absEtaSingleEle.dat diff --git a/Calibration/ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat b/ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat similarity index 100% rename from Calibration/ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat rename to ZFitter/data/regions/invMassRelSigma_SC_regrCorr_pho.dat diff --git a/Calibration/ZFitter/data/regions/nHits.dat b/ZFitter/data/regions/nHits.dat similarity index 100% rename from Calibration/ZFitter/data/regions/nHits.dat rename to ZFitter/data/regions/nHits.dat diff --git a/Calibration/ZFitter/data/regions/refReg.dat b/ZFitter/data/regions/refReg.dat similarity index 100% rename from Calibration/ZFitter/data/regions/refReg.dat rename to ZFitter/data/regions/refReg.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep0.dat b/ZFitter/data/regions/scaleStep0.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep0.dat rename to ZFitter/data/regions/scaleStep0.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep1.dat b/ZFitter/data/regions/scaleStep1.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep1.dat rename to ZFitter/data/regions/scaleStep1.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep2.dat b/ZFitter/data/regions/scaleStep2.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep2.dat rename to ZFitter/data/regions/scaleStep2.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep2smearing_1.dat b/ZFitter/data/regions/scaleStep2smearing_1.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep2smearing_1.dat rename to ZFitter/data/regions/scaleStep2smearing_1.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep2smearing_2.dat b/ZFitter/data/regions/scaleStep2smearing_2.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep2smearing_2.dat rename to ZFitter/data/regions/scaleStep2smearing_2.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep3.dat b/ZFitter/data/regions/scaleStep3.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep3.dat rename to ZFitter/data/regions/scaleStep3.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep3_withZPt.dat b/ZFitter/data/regions/scaleStep3_withZPt.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep3_withZPt.dat rename to ZFitter/data/regions/scaleStep3_withZPt.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep4smearing_1.dat b/ZFitter/data/regions/scaleStep4smearing_1.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep4smearing_1.dat rename to ZFitter/data/regions/scaleStep4smearing_1.dat diff --git a/Calibration/ZFitter/data/regions/scaleStep4smearing_2.dat b/ZFitter/data/regions/scaleStep4smearing_2.dat similarity index 100% rename from Calibration/ZFitter/data/regions/scaleStep4smearing_2.dat rename to ZFitter/data/regions/scaleStep4smearing_2.dat diff --git a/Calibration/ZFitter/data/regions/smearing_energy_EB.dat b/ZFitter/data/regions/smearing_energy_EB.dat similarity index 100% rename from Calibration/ZFitter/data/regions/smearing_energy_EB.dat rename to ZFitter/data/regions/smearing_energy_EB.dat diff --git a/Calibration/ZFitter/data/regions/smearing_energy_EE.dat b/ZFitter/data/regions/smearing_energy_EE.dat similarity index 100% rename from Calibration/ZFitter/data/regions/smearing_energy_EE.dat rename to ZFitter/data/regions/smearing_energy_EE.dat diff --git a/Calibration/ZFitter/data/regions/stability.dat b/ZFitter/data/regions/stability.dat similarity index 100% rename from Calibration/ZFitter/data/regions/stability.dat rename to ZFitter/data/regions/stability.dat diff --git a/Calibration/ZFitter/data/regions/systematics.dat b/ZFitter/data/regions/systematics.dat similarity index 100% rename from Calibration/ZFitter/data/regions/systematics.dat rename to ZFitter/data/regions/systematics.dat diff --git a/Calibration/ZFitter/data/regions/test.dat b/ZFitter/data/regions/test.dat similarity index 100% rename from Calibration/ZFitter/data/regions/test.dat rename to ZFitter/data/regions/test.dat diff --git a/Calibration/ZFitter/data/regions/validation.dat b/ZFitter/data/regions/validation.dat similarity index 100% rename from Calibration/ZFitter/data/regions/validation.dat rename to ZFitter/data/regions/validation.dat diff --git a/Calibration/ZFitter/data/regions/validation_smearing.dat b/ZFitter/data/regions/validation_smearing.dat similarity index 100% rename from Calibration/ZFitter/data/regions/validation_smearing.dat rename to ZFitter/data/regions/validation_smearing.dat diff --git a/Calibration/ZFitter/data/runRanges/monitoring.dat b/ZFitter/data/runRanges/monitoring.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/monitoring.dat rename to ZFitter/data/runRanges/monitoring.dat diff --git a/Calibration/ZFitter/data/runRanges/monitoring2.dat b/ZFitter/data/runRanges/monitoring2.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/monitoring2.dat rename to ZFitter/data/runRanges/monitoring2.dat diff --git a/Calibration/ZFitter/data/runRanges/monitoring_2011.dat b/ZFitter/data/runRanges/monitoring_2011.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/monitoring_2011.dat rename to ZFitter/data/runRanges/monitoring_2011.dat diff --git a/Calibration/ZFitter/data/runRanges/runPeriods.dat b/ZFitter/data/runRanges/runPeriods.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runPeriods.dat rename to ZFitter/data/runRanges/runPeriods.dat diff --git a/Calibration/ZFitter/data/runRanges/runRangeLimits.dat b/ZFitter/data/runRanges/runRangeLimits.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runRangeLimits.dat rename to ZFitter/data/runRanges/runRangeLimits.dat diff --git a/Calibration/ZFitter/data/runRanges/runRangePlot.dat b/ZFitter/data/runRanges/runRangePlot.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runRangePlot.dat rename to ZFitter/data/runRanges/runRangePlot.dat diff --git a/Calibration/ZFitter/data/runRanges/runRangePlot.txt b/ZFitter/data/runRanges/runRangePlot.txt similarity index 100% rename from Calibration/ZFitter/data/runRanges/runRangePlot.txt rename to ZFitter/data/runRanges/runRangePlot.txt diff --git a/Calibration/ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat b/ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat rename to ZFitter/data/runRanges/runranges_29Jun-RUN2011.dat diff --git a/Calibration/ZFitter/data/runRanges/runranges_ECALpaper2011.dat b/ZFitter/data/runRanges/runranges_ECALpaper2011.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runranges_ECALpaper2011.dat rename to ZFitter/data/runRanges/runranges_ECALpaper2011.dat diff --git a/Calibration/ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat b/ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat rename to ZFitter/data/runRanges/runranges_ECALpaper2011_v2.dat diff --git a/Calibration/ZFitter/data/runRanges/runranges_HCP2012.dat b/ZFitter/data/runRanges/runranges_HCP2012.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runranges_HCP2012.dat rename to ZFitter/data/runRanges/runranges_HCP2012.dat diff --git a/Calibration/ZFitter/data/runRanges/runranges_Moriond2013.dat b/ZFitter/data/runRanges/runranges_Moriond2013.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/runranges_Moriond2013.dat rename to ZFitter/data/runRanges/runranges_Moriond2013.dat diff --git a/Calibration/ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat b/ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat similarity index 100% rename from Calibration/ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat rename to ZFitter/data/runRanges/scaleStep1-13Jul_Prompt_Cal_Nov2012.dat diff --git a/Calibration/ZFitter/data/validation/13Jul.dat b/ZFitter/data/validation/13Jul.dat similarity index 100% rename from Calibration/ZFitter/data/validation/13Jul.dat rename to ZFitter/data/validation/13Jul.dat diff --git a/Calibration/ZFitter/data/validation/16Jan_42X-newGT.dat b/ZFitter/data/validation/16Jan_42X-newGT.dat similarity index 100% rename from Calibration/ZFitter/data/validation/16Jan_42X-newGT.dat rename to ZFitter/data/validation/16Jan_42X-newGT.dat diff --git a/Calibration/ZFitter/data/validation/16Jan_42X.dat b/ZFitter/data/validation/16Jan_42X.dat similarity index 100% rename from Calibration/ZFitter/data/validation/16Jan_42X.dat rename to ZFitter/data/validation/16Jan_42X.dat diff --git a/Calibration/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat similarity index 100% rename from Calibration/ZFitter/data/validation/22Jan2012-runDepMC.dat rename to ZFitter/data/validation/22Jan2012-runDepMC.dat diff --git a/Calibration/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat similarity index 100% rename from Calibration/ZFitter/data/validation/22Jan2012-stdMC.dat rename to ZFitter/data/validation/22Jan2012-stdMC.dat diff --git a/Calibration/ZFitter/data/validation/HCP2012.dat b/ZFitter/data/validation/HCP2012.dat similarity index 100% rename from Calibration/ZFitter/data/validation/HCP2012.dat rename to ZFitter/data/validation/HCP2012.dat diff --git a/Calibration/ZFitter/data/validation/NewG4.dat b/ZFitter/data/validation/NewG4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/NewG4.dat rename to ZFitter/data/validation/NewG4.dat diff --git a/Calibration/ZFitter/data/validation/NewG4X0Max.dat b/ZFitter/data/validation/NewG4X0Max.dat similarity index 100% rename from Calibration/ZFitter/data/validation/NewG4X0Max.dat rename to ZFitter/data/validation/NewG4X0Max.dat diff --git a/Calibration/ZFitter/data/validation/RUNC.dat b/ZFitter/data/validation/RUNC.dat similarity index 100% rename from Calibration/ZFitter/data/validation/RUNC.dat rename to ZFitter/data/validation/RUNC.dat diff --git a/Calibration/ZFitter/data/validation/Winter13-powheg.dat b/ZFitter/data/validation/Winter13-powheg.dat similarity index 100% rename from Calibration/ZFitter/data/validation/Winter13-powheg.dat rename to ZFitter/data/validation/Winter13-powheg.dat diff --git a/Calibration/ZFitter/data/validation/monitoring_2012_53X.dat b/ZFitter/data/validation/monitoring_2012_53X.dat similarity index 100% rename from Calibration/ZFitter/data/validation/monitoring_2012_53X.dat rename to ZFitter/data/validation/monitoring_2012_53X.dat diff --git a/Calibration/ZFitter/data/validation/moriond2013.dat b/ZFitter/data/validation/moriond2013.dat similarity index 100% rename from Calibration/ZFitter/data/validation/moriond2013.dat rename to ZFitter/data/validation/moriond2013.dat diff --git a/Calibration/ZFitter/data/validation/moriond2013Checks.dat b/ZFitter/data/validation/moriond2013Checks.dat similarity index 100% rename from Calibration/ZFitter/data/validation/moriond2013Checks.dat rename to ZFitter/data/validation/moriond2013Checks.dat diff --git a/Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat b/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat rename to ZFitter/data/validation/rereco/13Jul_ICcomb/13Jul_ICcomb_v5.dat diff --git a/Calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat b/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat rename to ZFitter/data/validation/rereco/16Jan_ICpiZero/16Jan_ICpiZero_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat b/ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat rename to ZFitter/data/validation/rereco/16Jan_ICpiZero/rereco16Jan.dat diff --git a/Calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat b/ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat rename to ZFitter/data/validation/rereco/2011_data/rereco_2011A.dat diff --git a/Calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat b/ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat rename to ZFitter/data/validation/rereco/2011_data/rereco_2011B.dat diff --git a/Calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat b/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat rename to ZFitter/data/validation/rereco/53X_GR_R_53_V9F/53X_GR_R_53_V9F.dat diff --git a/Calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat b/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat rename to ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X.dat diff --git a/Calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat b/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat rename to ZFitter/data/validation/rereco/53X_GR_R_53_V9F/Cal_2011B53X_locCont_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEFlow_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaEle_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaPiZero_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/13Jul_AlphaRef.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEFlow_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaEle_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaPiZero_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat b/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat rename to ZFitter/data/validation/rereco/AlphaStudies2012/RUN2012C_AlphaRef.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_AlphaComb_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCEle_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCcomb_v5_offGT.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCphiSym_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcombTCpiZero_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICcomb_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat b/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat rename to ZFitter/data/validation/rereco/Cal_Dic2012/Cal_Dic2012_ICpiZero_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICComb_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICEle_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcombTCphiSym_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v5.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICcomb_v7.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICphiSym_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_ICpiZero_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat b/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat rename to ZFitter/data/validation/rereco/Cal_Feb2013/Cal_Feb2013_PhisySc_TagOneABCD.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat b/ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat rename to ZFitter/data/validation/rereco/Cal_Jan2013/Cal_Jan2013_ICphiSymTCphiSym_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat b/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat rename to ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat b/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat rename to ZFitter/data/validation/rereco/Cal_Jun2013/Cal_Jun2013_AlphaComb_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v5.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat b/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat rename to ZFitter/data/validation/rereco/Cal_Mar2013/Cal_Mar2013_ICpiZero_v6.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat b/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat rename to ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v0.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat b/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat rename to ZFitter/data/validation/rereco/Cal_Nov2012/Cal_AlphaJarry2012_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat b/ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat rename to ZFitter/data/validation/rereco/Cal_Nov2012_ICcombAllR9_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat b/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat rename to ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat b/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat rename to ZFitter/data/validation/rereco/RUN2012AB_ESEE/RUN2012AB_ICESEE_v2_newClustering.dat diff --git a/Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat b/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat rename to ZFitter/data/validation/rereco/RUN2012C_ICcomb/RUN2012C_ICcomb_v5.dat diff --git a/Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runAB_HR9EtaScale.dat diff --git a/Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_AllR9EtaScale.dat diff --git a/Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale.dat diff --git a/Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/V20121211_pizphiele_runC_HR9EtaScale_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat b/ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat rename to ZFitter/data/validation/rereco/V20121211_pizphiele/rereco_V20121211_pizphiele_runC_HR9EtaScale_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011.dat diff --git a/Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v2.dat diff --git a/Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v3.dat diff --git a/Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v4.dat diff --git a/Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat b/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat rename to ZFitter/data/validation/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011_ADC_v5.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat b/ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat rename to ZFitter/data/validation/rereco/ungrouped/Moriond2013.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat b/ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat rename to ZFitter/data/validation/rereco/ungrouped/Prompt2012C_ADC_v1.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13_noIC.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13_noLas.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat b/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat rename to ZFitter/data/validation/rereco/ungrouped/Winter13_noLas_noIC.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat b/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat rename to ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat b/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat rename to ZFitter/data/validation/rereco/ungrouped/rereco29Jun-RUN2011_allMassRange.dat diff --git a/Calibration/ZFitter/data/validation/rereco/ungrouped/test.dat b/ZFitter/data/validation/rereco/ungrouped/test.dat similarity index 100% rename from Calibration/ZFitter/data/validation/rereco/ungrouped/test.dat rename to ZFitter/data/validation/rereco/ungrouped/test.dat diff --git a/Calibration/ZFitter/data/validation/test.dat b/ZFitter/data/validation/test.dat similarity index 100% rename from Calibration/ZFitter/data/validation/test.dat rename to ZFitter/data/validation/test.dat diff --git a/Calibration/ZFitter/doc/Hgg_systematics.txt b/ZFitter/doc/Hgg_systematics.txt similarity index 100% rename from Calibration/ZFitter/doc/Hgg_systematics.txt rename to ZFitter/doc/Hgg_systematics.txt diff --git a/Calibration/ZFitter/doc/README b/ZFitter/doc/README similarity index 100% rename from Calibration/ZFitter/doc/README rename to ZFitter/doc/README diff --git a/Calibration/ZFitter/interface/BW_CB_pdf_class.hh b/ZFitter/interface/BW_CB_pdf_class.hh similarity index 100% rename from Calibration/ZFitter/interface/BW_CB_pdf_class.hh rename to ZFitter/interface/BW_CB_pdf_class.hh diff --git a/Calibration/ZFitter/interface/Cruijff_pdf_class.hh b/ZFitter/interface/Cruijff_pdf_class.hh similarity index 100% rename from Calibration/ZFitter/interface/Cruijff_pdf_class.hh rename to ZFitter/interface/Cruijff_pdf_class.hh diff --git a/Calibration/ZFitter/interface/ElectronCategory_class.hh b/ZFitter/interface/ElectronCategory_class.hh similarity index 100% rename from Calibration/ZFitter/interface/ElectronCategory_class.hh rename to ZFitter/interface/ElectronCategory_class.hh diff --git a/Calibration/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h similarity index 100% rename from Calibration/ZFitter/interface/EnergyScaleCorrection_class.h rename to ZFitter/interface/EnergyScaleCorrection_class.h diff --git a/Calibration/ZFitter/interface/RooCruijff.hh b/ZFitter/interface/RooCruijff.hh similarity index 100% rename from Calibration/ZFitter/interface/RooCruijff.hh rename to ZFitter/interface/RooCruijff.hh diff --git a/Calibration/ZFitter/interface/RooMinimizer.hh b/ZFitter/interface/RooMinimizer.hh similarity index 100% rename from Calibration/ZFitter/interface/RooMinimizer.hh rename to ZFitter/interface/RooMinimizer.hh diff --git a/Calibration/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh similarity index 100% rename from Calibration/ZFitter/interface/RooSmearer.hh rename to ZFitter/interface/RooSmearer.hh diff --git a/Calibration/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh similarity index 100% rename from Calibration/ZFitter/interface/SmearingImporter.hh rename to ZFitter/interface/SmearingImporter.hh diff --git a/Calibration/ZFitter/interface/ZFit_class.hh b/ZFitter/interface/ZFit_class.hh similarity index 100% rename from Calibration/ZFitter/interface/ZFit_class.hh rename to ZFitter/interface/ZFit_class.hh diff --git a/Calibration/ZFitter/interface/ZeeEvent.hh b/ZFitter/interface/ZeeEvent.hh similarity index 100% rename from Calibration/ZFitter/interface/ZeeEvent.hh rename to ZFitter/interface/ZeeEvent.hh diff --git a/Calibration/ZFitter/interface/addBranch_class.hh b/ZFitter/interface/addBranch_class.hh similarity index 100% rename from Calibration/ZFitter/interface/addBranch_class.hh rename to ZFitter/interface/addBranch_class.hh diff --git a/Calibration/ZFitter/interface/puWeights_class.hh b/ZFitter/interface/puWeights_class.hh similarity index 100% rename from Calibration/ZFitter/interface/puWeights_class.hh rename to ZFitter/interface/puWeights_class.hh diff --git a/Calibration/ZFitter/interface/r9Weights_class.hh b/ZFitter/interface/r9Weights_class.hh similarity index 100% rename from Calibration/ZFitter/interface/r9Weights_class.hh rename to ZFitter/interface/r9Weights_class.hh diff --git a/Calibration/ZFitter/interface/runDivide_class.hh b/ZFitter/interface/runDivide_class.hh similarity index 100% rename from Calibration/ZFitter/interface/runDivide_class.hh rename to ZFitter/interface/runDivide_class.hh diff --git a/Calibration/ZFitter/interface/setTDRStyle.hh b/ZFitter/interface/setTDRStyle.hh similarity index 100% rename from Calibration/ZFitter/interface/setTDRStyle.hh rename to ZFitter/interface/setTDRStyle.hh diff --git a/Calibration/ZFitter/macro/Hgg_systematic_plots.C b/ZFitter/macro/Hgg_systematic_plots.C similarity index 100% rename from Calibration/ZFitter/macro/Hgg_systematic_plots.C rename to ZFitter/macro/Hgg_systematic_plots.C diff --git a/Calibration/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C similarity index 100% rename from Calibration/ZFitter/macro/PlotDataMC.C rename to ZFitter/macro/PlotDataMC.C diff --git a/Calibration/ZFitter/macro/macro_fit.C b/ZFitter/macro/macro_fit.C similarity index 100% rename from Calibration/ZFitter/macro/macro_fit.C rename to ZFitter/macro/macro_fit.C diff --git a/Calibration/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C similarity index 100% rename from Calibration/ZFitter/macro/mcmcDraw.C rename to ZFitter/macro/mcmcDraw.C diff --git a/Calibration/ZFitter/macro/new_branch.C b/ZFitter/macro/new_branch.C similarity index 100% rename from Calibration/ZFitter/macro/new_branch.C rename to ZFitter/macro/new_branch.C diff --git a/Calibration/ZFitter/macro/periods.C b/ZFitter/macro/periods.C similarity index 100% rename from Calibration/ZFitter/macro/periods.C rename to ZFitter/macro/periods.C diff --git a/Calibration/ZFitter/macro/periodsPlot.C b/ZFitter/macro/periodsPlot.C similarity index 100% rename from Calibration/ZFitter/macro/periodsPlot.C rename to ZFitter/macro/periodsPlot.C diff --git a/Calibration/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C similarity index 100% rename from Calibration/ZFitter/macro/plot_data_mc.C rename to ZFitter/macro/plot_data_mc.C diff --git a/Calibration/ZFitter/macro/propaganda_plot.C b/ZFitter/macro/propaganda_plot.C similarity index 100% rename from Calibration/ZFitter/macro/propaganda_plot.C rename to ZFitter/macro/propaganda_plot.C diff --git a/Calibration/ZFitter/macro/propaganda_plot2.C b/ZFitter/macro/propaganda_plot2.C similarity index 100% rename from Calibration/ZFitter/macro/propaganda_plot2.C rename to ZFitter/macro/propaganda_plot2.C diff --git a/Calibration/ZFitter/macro/quantile.cc b/ZFitter/macro/quantile.cc similarity index 100% rename from Calibration/ZFitter/macro/quantile.cc rename to ZFitter/macro/quantile.cc diff --git a/Calibration/ZFitter/macro/sigmaE_plot.C b/ZFitter/macro/sigmaE_plot.C similarity index 100% rename from Calibration/ZFitter/macro/sigmaE_plot.C rename to ZFitter/macro/sigmaE_plot.C diff --git a/Calibration/ZFitter/macro/stability.C b/ZFitter/macro/stability.C similarity index 100% rename from Calibration/ZFitter/macro/stability.C rename to ZFitter/macro/stability.C diff --git a/Calibration/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C similarity index 100% rename from Calibration/ZFitter/macro/standardDataMC.C rename to ZFitter/macro/standardDataMC.C diff --git a/Calibration/ZFitter/macro/standardMCMC.C b/ZFitter/macro/standardMCMC.C similarity index 100% rename from Calibration/ZFitter/macro/standardMCMC.C rename to ZFitter/macro/standardMCMC.C diff --git a/Calibration/ZFitter/script/CalcResCorrection.sh b/ZFitter/script/CalcResCorrection.sh similarity index 100% rename from Calibration/ZFitter/script/CalcResCorrection.sh rename to ZFitter/script/CalcResCorrection.sh diff --git a/Calibration/ZFitter/script/FitResultTostep2.sh b/ZFitter/script/FitResultTostep2.sh similarity index 100% rename from Calibration/ZFitter/script/FitResultTostep2.sh rename to ZFitter/script/FitResultTostep2.sh diff --git a/Calibration/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh similarity index 100% rename from Calibration/ZFitter/script/GenRootChain.sh rename to ZFitter/script/GenRootChain.sh diff --git a/Calibration/ZFitter/script/PUDumperToHist.sh b/ZFitter/script/PUDumperToHist.sh similarity index 100% rename from Calibration/ZFitter/script/PUDumperToHist.sh rename to ZFitter/script/PUDumperToHist.sh diff --git a/Calibration/ZFitter/script/compareColumns.sh b/ZFitter/script/compareColumns.sh similarity index 100% rename from Calibration/ZFitter/script/compareColumns.sh rename to ZFitter/script/compareColumns.sh diff --git a/Calibration/ZFitter/script/dataPU.sh b/ZFitter/script/dataPU.sh similarity index 100% rename from Calibration/ZFitter/script/dataPU.sh rename to ZFitter/script/dataPU.sh diff --git a/Calibration/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh similarity index 100% rename from Calibration/ZFitter/script/energyScale.sh rename to ZFitter/script/energyScale.sh diff --git a/Calibration/ZFitter/script/formatTable.sh b/ZFitter/script/formatTable.sh similarity index 100% rename from Calibration/ZFitter/script/formatTable.sh rename to ZFitter/script/formatTable.sh diff --git a/Calibration/ZFitter/script/justOnce/materialStudy.sh b/ZFitter/script/justOnce/materialStudy.sh similarity index 100% rename from Calibration/ZFitter/script/justOnce/materialStudy.sh rename to ZFitter/script/justOnce/materialStudy.sh diff --git a/Calibration/ZFitter/script/justOnce/materialStudyPlot.sh b/ZFitter/script/justOnce/materialStudyPlot.sh similarity index 100% rename from Calibration/ZFitter/script/justOnce/materialStudyPlot.sh rename to ZFitter/script/justOnce/materialStudyPlot.sh diff --git a/Calibration/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh similarity index 100% rename from Calibration/ZFitter/script/justOnce/smearing.sh rename to ZFitter/script/justOnce/smearing.sh diff --git a/Calibration/ZFitter/script/makeCorrVsRunNumber.py b/ZFitter/script/makeCorrVsRunNumber.py similarity index 100% rename from Calibration/ZFitter/script/makeCorrVsRunNumber.py rename to ZFitter/script/makeCorrVsRunNumber.py diff --git a/Calibration/ZFitter/script/makeTable.sh b/ZFitter/script/makeTable.sh similarity index 100% rename from Calibration/ZFitter/script/makeTable.sh rename to ZFitter/script/makeTable.sh diff --git a/Calibration/ZFitter/script/makeValidationSlides.sh b/ZFitter/script/makeValidationSlides.sh similarity index 100% rename from Calibration/ZFitter/script/makeValidationSlides.sh rename to ZFitter/script/makeValidationSlides.sh diff --git a/Calibration/ZFitter/script/makehtml.py b/ZFitter/script/makehtml.py similarity index 100% rename from Calibration/ZFitter/script/makehtml.py rename to ZFitter/script/makehtml.py diff --git a/Calibration/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh similarity index 100% rename from Calibration/ZFitter/script/monitoring_validation.sh rename to ZFitter/script/monitoring_validation.sh diff --git a/Calibration/ZFitter/script/publish.sh b/ZFitter/script/publish.sh similarity index 100% rename from Calibration/ZFitter/script/publish.sh rename to ZFitter/script/publish.sh diff --git a/Calibration/ZFitter/script/report.sh b/ZFitter/script/report.sh similarity index 100% rename from Calibration/ZFitter/script/report.sh rename to ZFitter/script/report.sh diff --git a/Calibration/ZFitter/script/selEff.sh b/ZFitter/script/selEff.sh similarity index 100% rename from Calibration/ZFitter/script/selEff.sh rename to ZFitter/script/selEff.sh diff --git a/Calibration/ZFitter/script/slidesFunctions.sh b/ZFitter/script/slidesFunctions.sh similarity index 100% rename from Calibration/ZFitter/script/slidesFunctions.sh rename to ZFitter/script/slidesFunctions.sh diff --git a/Calibration/ZFitter/script/stability.sh b/ZFitter/script/stability.sh similarity index 100% rename from Calibration/ZFitter/script/stability.sh rename to ZFitter/script/stability.sh diff --git a/Calibration/ZFitter/script/systematics.sh b/ZFitter/script/systematics.sh similarity index 100% rename from Calibration/ZFitter/script/systematics.sh rename to ZFitter/script/systematics.sh diff --git a/Calibration/ZFitter/script/tex2txt.sh b/ZFitter/script/tex2txt.sh similarity index 100% rename from Calibration/ZFitter/script/tex2txt.sh rename to ZFitter/script/tex2txt.sh diff --git a/Calibration/ZFitter/script/validation.sh b/ZFitter/script/validation.sh similarity index 100% rename from Calibration/ZFitter/script/validation.sh rename to ZFitter/script/validation.sh diff --git a/Calibration/ZFitter/sed/run2time.sed b/ZFitter/sed/run2time.sed similarity index 100% rename from Calibration/ZFitter/sed/run2time.sed rename to ZFitter/sed/run2time.sed diff --git a/Calibration/ZFitter/sed/tex.sed b/ZFitter/sed/tex.sed similarity index 100% rename from Calibration/ZFitter/sed/tex.sed rename to ZFitter/sed/tex.sed diff --git a/Calibration/ZFitter/src/BW_CB_pdf_class.cc b/ZFitter/src/BW_CB_pdf_class.cc similarity index 100% rename from Calibration/ZFitter/src/BW_CB_pdf_class.cc rename to ZFitter/src/BW_CB_pdf_class.cc diff --git a/Calibration/ZFitter/src/Cruijff_pdf_class.cc b/ZFitter/src/Cruijff_pdf_class.cc similarity index 100% rename from Calibration/ZFitter/src/Cruijff_pdf_class.cc rename to ZFitter/src/Cruijff_pdf_class.cc diff --git a/Calibration/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc similarity index 100% rename from Calibration/ZFitter/src/ElectronCategory_class.cc rename to ZFitter/src/ElectronCategory_class.cc diff --git a/Calibration/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc similarity index 100% rename from Calibration/ZFitter/src/EnergyScaleCorrection_class.cc rename to ZFitter/src/EnergyScaleCorrection_class.cc diff --git a/Calibration/ZFitter/src/RooCruijff.cc b/ZFitter/src/RooCruijff.cc similarity index 100% rename from Calibration/ZFitter/src/RooCruijff.cc rename to ZFitter/src/RooCruijff.cc diff --git a/Calibration/ZFitter/src/RooMinimizer.cxx b/ZFitter/src/RooMinimizer.cxx similarity index 100% rename from Calibration/ZFitter/src/RooMinimizer.cxx rename to ZFitter/src/RooMinimizer.cxx diff --git a/Calibration/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc similarity index 100% rename from Calibration/ZFitter/src/RooSmearer.cc rename to ZFitter/src/RooSmearer.cc diff --git a/Calibration/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc similarity index 100% rename from Calibration/ZFitter/src/SmearingImporter.cc rename to ZFitter/src/SmearingImporter.cc diff --git a/Calibration/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc similarity index 100% rename from Calibration/ZFitter/src/ZFit_class.cc rename to ZFitter/src/ZFit_class.cc diff --git a/Calibration/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc similarity index 100% rename from Calibration/ZFitter/src/addBranch_class.cc rename to ZFitter/src/addBranch_class.cc diff --git a/Calibration/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc similarity index 100% rename from Calibration/ZFitter/src/nllProfile.cc rename to ZFitter/src/nllProfile.cc diff --git a/Calibration/ZFitter/src/puWeights_class.cc b/ZFitter/src/puWeights_class.cc similarity index 100% rename from Calibration/ZFitter/src/puWeights_class.cc rename to ZFitter/src/puWeights_class.cc diff --git a/Calibration/ZFitter/src/r9Weights_class.cc b/ZFitter/src/r9Weights_class.cc similarity index 100% rename from Calibration/ZFitter/src/r9Weights_class.cc rename to ZFitter/src/r9Weights_class.cc diff --git a/Calibration/ZFitter/src/runDivide_class.cc b/ZFitter/src/runDivide_class.cc similarity index 100% rename from Calibration/ZFitter/src/runDivide_class.cc rename to ZFitter/src/runDivide_class.cc diff --git a/Calibration/ZFitter/src/setTDRStyle.C b/ZFitter/src/setTDRStyle.C similarity index 100% rename from Calibration/ZFitter/src/setTDRStyle.C rename to ZFitter/src/setTDRStyle.C diff --git a/Calibration/ZFitter/test/launch.sh b/ZFitter/test/launch.sh similarity index 100% rename from Calibration/ZFitter/test/launch.sh rename to ZFitter/test/launch.sh diff --git a/Calibration/ZFitter/test/runDivide_macro.C b/ZFitter/test/runDivide_macro.C similarity index 100% rename from Calibration/ZFitter/test/runDivide_macro.C rename to ZFitter/test/runDivide_macro.C diff --git a/Calibration/ZFitter/test/test.cpp b/ZFitter/test/test.cpp similarity index 100% rename from Calibration/ZFitter/test/test.cpp rename to ZFitter/test/test.cpp diff --git a/Calibration/ZFitter/tex/FitSlides_template.tex b/ZFitter/tex/FitSlides_template.tex similarity index 100% rename from Calibration/ZFitter/tex/FitSlides_template.tex rename to ZFitter/tex/FitSlides_template.tex diff --git a/Calibration/ZFitter/tex/fitSlides.tex b/ZFitter/tex/fitSlides.tex similarity index 100% rename from Calibration/ZFitter/tex/fitSlides.tex rename to ZFitter/tex/fitSlides.tex diff --git a/Calibration/ZFitter/tex/stabilitySlides.tex b/ZFitter/tex/stabilitySlides.tex similarity index 100% rename from Calibration/ZFitter/tex/stabilitySlides.tex rename to ZFitter/tex/stabilitySlides.tex diff --git a/Calibration/ZFitter/tex/tableSlides.tex b/ZFitter/tex/tableSlides.tex similarity index 100% rename from Calibration/ZFitter/tex/tableSlides.tex rename to ZFitter/tex/tableSlides.tex diff --git a/Calibration/ZFitter/tmp/.gitignore b/ZFitter/tmp/.gitignore similarity index 100% rename from Calibration/ZFitter/tmp/.gitignore rename to ZFitter/tmp/.gitignore diff --git a/Calibration/ZNtupleDumper/BuildFile.xml b/ZNtupleDumper/BuildFile.xml similarity index 100% rename from Calibration/ZNtupleDumper/BuildFile.xml rename to ZNtupleDumper/BuildFile.xml diff --git a/Calibration/ZNtupleDumper/doc/README b/ZNtupleDumper/doc/README similarity index 100% rename from Calibration/ZNtupleDumper/doc/README rename to ZNtupleDumper/doc/README diff --git a/Calibration/ZNtupleDumper/interface/readJsonFile.h b/ZNtupleDumper/interface/readJsonFile.h similarity index 100% rename from Calibration/ZNtupleDumper/interface/readJsonFile.h rename to ZNtupleDumper/interface/readJsonFile.h diff --git a/Calibration/ZNtupleDumper/macro/nPV_dataMC_plot.C b/ZNtupleDumper/macro/nPV_dataMC_plot.C similarity index 100% rename from Calibration/ZNtupleDumper/macro/nPV_dataMC_plot.C rename to ZNtupleDumper/macro/nPV_dataMC_plot.C diff --git a/Calibration/ZNtupleDumper/python/elePat_cfi.py b/ZNtupleDumper/python/elePat_cfi.py similarity index 100% rename from Calibration/ZNtupleDumper/python/elePat_cfi.py rename to ZNtupleDumper/python/elePat_cfi.py diff --git a/Calibration/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py similarity index 100% rename from Calibration/ZNtupleDumper/python/patSequence_cff.py rename to ZNtupleDumper/python/patSequence_cff.py diff --git a/Calibration/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py similarity index 100% rename from Calibration/ZNtupleDumper/python/zntupledumper_cfi.py rename to ZNtupleDumper/python/zntupledumper_cfi.py diff --git a/Calibration/ZNtupleDumper/script/mcPUweights.sh b/ZNtupleDumper/script/mcPUweights.sh similarity index 100% rename from Calibration/ZNtupleDumper/script/mcPUweights.sh rename to ZNtupleDumper/script/mcPUweights.sh diff --git a/Calibration/ZNtupleDumper/script/puWeightTree.sh b/ZNtupleDumper/script/puWeightTree.sh similarity index 100% rename from Calibration/ZNtupleDumper/script/puWeightTree.sh rename to ZNtupleDumper/script/puWeightTree.sh diff --git a/Calibration/ZNtupleDumper/script/puWeights.sh b/ZNtupleDumper/script/puWeights.sh similarity index 100% rename from Calibration/ZNtupleDumper/script/puWeights.sh rename to ZNtupleDumper/script/puWeights.sh diff --git a/Calibration/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc similarity index 100% rename from Calibration/ZNtupleDumper/src/ZNtupleDumper.cc rename to ZNtupleDumper/src/ZNtupleDumper.cc diff --git a/Calibration/ZNtupleDumper/src/readJsonFile.cc b/ZNtupleDumper/src/readJsonFile.cc similarity index 100% rename from Calibration/ZNtupleDumper/src/readJsonFile.cc rename to ZNtupleDumper/src/readJsonFile.cc diff --git a/Calibration/fulldoc b/fulldoc similarity index 100% rename from Calibration/fulldoc rename to fulldoc diff --git a/Calibration/setup.sh b/setup.sh similarity index 100% rename from Calibration/setup.sh rename to setup.sh From 1ef83e6950030beaf8e81f4872735efb4f948897 Mon Sep 17 00:00:00 2001 From: chiara la licata Date: Tue, 9 Jul 2013 15:06:42 +0200 Subject: [PATCH 044/475] moving also .gitignore --- .gitignore | 47 ++++++++++++++++++++++++++++++++++-------- Calibration/.gitignore | 40 ----------------------------------- 2 files changed, 38 insertions(+), 49 deletions(-) delete mode 100644 Calibration/.gitignore diff --git a/.gitignore b/.gitignore index fa65f0bdb90..41acdfc2f13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,40 @@ -# Build and Release Folders -bin/ -bin-debug/ -bin-release/ +*.root +*.log +*~ +.svn +#.gitignore +prod_alcareco +prod_alcaraw +prod_ntuples +prod_alcarereco -# Other files and folders -.settings/ +# root compiled macros +*_C.d +*_C.so -# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` -# should NOT be excluded as they contain compiler settings and other important -# information for Eclipse / Flash Builder. \ No newline at end of file +# Compiled Object files +*.slo +*.lo +*.o + +# Compiled Dynamic libraries +*.so +*.dylib + +# Compiled Static libraries +*.lai +*.la +*.a + +# Compiled programs +*.exe + +*# + +# python +*.pyc +*__init__.py + +# patch +*.rej +.__afs* \ No newline at end of file diff --git a/Calibration/.gitignore b/Calibration/.gitignore deleted file mode 100644 index 41acdfc2f13..00000000000 --- a/Calibration/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -*.root -*.log -*~ -.svn -#.gitignore -prod_alcareco -prod_alcaraw -prod_ntuples -prod_alcarereco - -# root compiled macros -*_C.d -*_C.so - -# Compiled Object files -*.slo -*.lo -*.o - -# Compiled Dynamic libraries -*.so -*.dylib - -# Compiled Static libraries -*.lai -*.la -*.a - -# Compiled programs -*.exe - -*# - -# python -*.pyc -*__init__.py - -# patch -*.rej -.__afs* \ No newline at end of file From 82f91453fc1cf9ffe216943d9b060d7908e305cc Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 9 Jul 2013 15:18:09 +0200 Subject: [PATCH 045/475] test change --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0980676a1cc..3c5e62a0dd5 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,4 @@ ECALELF ======= Code for electron calibration in CMS +Testing \ No newline at end of file From 43769db421fea9c55c17bed7abd2c589283807ca Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 9 Jul 2013 19:05:32 +0200 Subject: [PATCH 046/475] fixed setup to use git? --- setup.sh | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/setup.sh b/setup.sh index fdd0062ab68..457218eda19 100755 --- a/setup.sh +++ b/setup.sh @@ -61,10 +61,10 @@ sed -i 's|[/]*assert|////assert|' DataFormats/EgammaCandidates/src/GsfElectron.c ######################################################################################### echo "[STATUS] Download ECALELF directory" -if [ ! -d calibration ];then - svn co svn+ssh://svn.cern.ch/reps/analysis/trunk/calibration/ >> ../setup.log || exit 1 #setup.sh #ZFitter +if [ ! -d Calibration ];then + git clone git@github.com:ECALELFS/ECALELF.git # >> ../setup.log || exit 1 #setup.sh #ZFitter fi -cd calibration +cd Calibration cd ALCARAW_RECO/ @@ -79,9 +79,9 @@ svn co svn+ssh://svn.cern.ch/reps/analysis/trunk/bin bin ### echo "[WARNING] Remember to do this after all cmsenv:" echo "# for bash -PATH=$PATH:$CMSSW_BASE/src/calibration/ALCARAW_RECO/bin +PATH=$PATH:$CMSSW_BASE/src/Calibration/ALCARAW_RECO/bin # for tcsh -setenv PATH $PATH\":$CMSSW_BASE/src//calibration/ALCARAW_RECO/bin\" +setenv PATH $PATH\":$CMSSW_BASE/src/Calibration/ALCARAW_RECO/bin\" " fi @@ -109,19 +109,19 @@ case $CMSSW_VERSION in ###### - Regression from Josh 5_3_X # cvs co -r regressionMay18b RecoEgamma/EgammaTools #checkdeps -a - cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root calibration/EleNewEnergiesProducer/data/ + cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root Calibration/EleNewEnergiesProducer/data/ echo "[STATUS] applying patch for CMSSW_6_X" - sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc if [ ! -e "$CMSSW_BASE/src/RecoEcal/EgammaCoreTools" ];then addpkg RecoEcal/EgammaCoreTools #V05-08-24 fi if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then echo "[STATUS] patching clusterLazyTools" - sed -i -f calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h + sed -i -f Calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h #patch -p0 < test/clusterLazyTools.patch fi - patch -p0 < calibration/ALCARAW_RECO/test/class_def.xml.patch + patch -p0 < Calibration/ALCARAW_RECO/test/class_def.xml.patch ;; CMSSW_5_*) @@ -137,7 +137,7 @@ case $CMSSW_VERSION in cvs co -r V09-00-01 RecoEgamma/EgammaTools >> setup.log # cvs co -r V00-00-02 EgammaAnalysis/ElectronTools cvs co -r MD-21Apr2013-test-2 EgammaAnalysis/ElectronTools - patch -p0 < calibration/ALCARAW_RECO/test/electronRegression.patch + patch -p0 < Calibration/ALCARAW_RECO/test/electronRegression.patch cd EgammaAnalysis/ElectronTools/data/ cat download.url | xargs wget @@ -145,17 +145,17 @@ case $CMSSW_VERSION in ###### - Regression from Josh 5_3_X # cvs co -r regressionMay18b RecoEgamma/EgammaTools #checkdeps -a - cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root calibration/EleNewEnergiesProducer/data/ + cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root Calibration/EleNewEnergiesProducer/data/ echo "[STATUS] applying patch for CMSSW_5_X" - sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc if [ ! -e "$CMSSW_BASE/src/RecoEcal/EgammaCoreTools" ];then addpkg RecoEcal/EgammaCoreTools #V05-08-24 fi if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then - patch -p0 < calibration/ALCARAW_RECO/test/clusterLazyTools.patch + patch -p0 < Calibration/ALCARAW_RECO/test/clusterLazyTools.patch fi - patch -p0 < calibration/ALCARAW_RECO/test/class_def.xml.patch + patch -p0 < Calibration/ALCARAW_RECO/test/class_def.xml.patch ;; CMSSW_4_4*) @@ -175,7 +175,7 @@ case $CMSSW_VERSION in cvs co -r V05-08-24 RecoEcal/EgammaCoreTools >> setup.log || exit 1 cvs co -r V08-11-10-02 RecoEgamma/EgammaTools >> setup.log || exit 1 cvs co -r V00-00-02-44X EgammaAnalysis/ElectronTools >> setup.log || exit 1 - patch -p0 < calibration/ALCARAW_RECO/test/electronRegression.patch + patch -p0 < Calibration/ALCARAW_RECO/test/electronRegression.patch cd EgammaAnalysis/ElectronTools/data/ cat download.url | xargs wget || exit 1 cd - @@ -195,7 +195,7 @@ case $CMSSW_VERSION in cvs co RecoEgamma/EgammaTools/interface/EGEnergyCorrector.h >> setup.log || exit 1 echo "[STATUS] applying patch for CMSSW_4_4_X" - sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc sed -i 's|hadTowOverEm|hadronicOverEm|' ${CMSSW_BASE}/src/RecoEgamma/EgammaTools/src/EGEnergyCorrector.cc if [ "`grep -c RecoEcal/EgammaCoreTool ${CMSSW_BASE}/src/RecoEgamma/EgammaTools/BuildFile.xml`" == "0" ];then @@ -204,13 +204,13 @@ case $CMSSW_VERSION in if [ "`grep -c CondFormats/EgammaObjects ${CMSSW_BASE}/src/RecoEgamma/EgammaTools/BuildFile.xml`" == "0" ];then echo "" >> ${CMSSW_BASE}/src/RecoEgamma/EgammaTools/BuildFile.xml fi - patch -p0 < calibration/ALCARAW_RECO/test/class_def.xml.patch + patch -p0 < Calibration/ALCARAW_RECO/test/class_def.xml.patch if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then - patch -p0 < calibration/ALCARAW_RECO/test/clusterLazyTools.patch + patch -p0 < Calibration/ALCARAW_RECO/test/clusterLazyTools.patch fi - sed -i ';s|REGRESSION=3|REGRESSION=1|' calibration/*/BuildFile.xml - sed -i 's|#||;s|REGRESSION=3|REGRESSION=2|' calibration/ZNtupleDumper/BuildFile.xml + sed -i ';s|REGRESSION=3|REGRESSION=1|' Calibration/*/BuildFile.xml + sed -i 's|#||;s|REGRESSION=3|REGRESSION=2|' Calibration/ZNtupleDumper/BuildFile.xml ;; @@ -229,7 +229,7 @@ case $CMSSW_VERSION in cvs co -r regression42x_Dec3 CondFormats/DataRecord - cp calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + cp Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch Calibration/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc if [ ! -e "$CMSSW_BASE/src/RecoEcal/EgammaCoreTools" ];then addpkg RecoEcal/EgammaCoreTools #V05-08-24 cvs update -r V05-08-02 RecoEcal/EgammaCoreTools/src/EcalClusterTools.cc @@ -240,10 +240,10 @@ case $CMSSW_VERSION in cvs update -r V05-08-14 RecoEcal/EgammaCoreTools/BuildFile.xml fi if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then - sed -i -f calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h + sed -i -f Calibration/ALCARAW_RECO/test/EcalClusterLazyTools_h.sed $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h fi - sed -i 's|#||;s|REGRESSION=3|REGRESSION=2|' calibration/*/BuildFile.xml + sed -i 's|#||;s|REGRESSION=3|REGRESSION=2|' Calibration/*/BuildFile.xml if [ "`grep -c reducedBarrelRecHitCollection $CMSSW_BASE/src/PhysicsTools/PatAlgos/plugins/PATElectronProducer.h`" == "0" ]; then sed -i '/embedPFCandidate_/ i edm::InputTag reducedEBRecHitCollection;\nedm::InputTag reducedEERecHitCollection;' $CMSSW_BASE/src/PhysicsTools/PatAlgos/plugins/PATElectronProducer.h @@ -253,10 +253,10 @@ case $CMSSW_VERSION in fi - sed -i '/patSequence/ {s|+[ ]*eleRegressionEnergy||}' calibration/ZNtupleDumper/python/patSequence_cff.py - sed -i '/electronRegressionEnergyProducer_cfi/ d;/eleRegressionEnergy/ d' calibration/ZNtupleDumper/python/patSequence_cff.py + sed -i '/patSequence/ {s|+[ ]*eleRegressionEnergy||}' Calibration/ZNtupleDumper/python/patSequence_cff.py + sed -i '/electronRegressionEnergyProducer_cfi/ d;/eleRegressionEnergy/ d' Calibration/ZNtupleDumper/python/patSequence_cff.py - patch -p0 < calibration/ALCARAW_RECO/test/class_def.xml.patch + patch -p0 < Calibration/ALCARAW_RECO/test/class_def.xml.patch ;; @@ -287,6 +287,6 @@ for file in `find -name '*.url'`; done ####--------> Each time you set your environment! -#PATH=$PATH:$CMSSW_BASE/calibration/ALCARAW_RECO/bin +#PATH=$PATH:$CMSSW_BASE/Calibration/ALCARAW_RECO/bin #Previous command MUST be executed every time you log in From b5c0eb9ad98f8bd2b8090eb6beea9d757c55399d Mon Sep 17 00:00:00 2001 From: chiara la licata Date: Tue, 9 Jul 2013 19:13:49 +0200 Subject: [PATCH 047/475] variable for SingleEle ntuple production included --- ALCARAW_RECO/alcaraw_datasets.dat | 2 +- .../python/ALCARECOEcalCalIsolElectron_cff.py | 4 +-- ALCARAW_RECO/python/alcaSkimming.py | 34 +++++++++++-------- ALCARAW_RECO/python/sandboxRerecoSeq_cff.py | 2 +- ALCARAW_RECO/python/sandboxSeq_cff.py | 2 +- ALCARAW_RECO/scripts/prodAlcarereco.sh | 2 +- ALCARAW_RECO/scripts/prodNtuples.sh | 10 +++++- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/ALCARAW_RECO/alcaraw_datasets.dat b/ALCARAW_RECO/alcaraw_datasets.dat index 7a71b93f08e..1c84b0dcb18 100644 --- a/ALCARAW_RECO/alcaraw_datasets.dat +++ b/ALCARAW_RECO/alcaraw_datasets.dat @@ -46,7 +46,7 @@ 198934-203755 /DoubleElectron/Run2012C-ZElectron-PromptSkim-v3/RAW-RECO DoubleElectron-ZSkim-RUN2012C-v3 caf group/alca_ecalcalib/ecalelf/alcaraw INVALID RUN2012ABCD,RUN2012C,RUN2012ABC,Cal_Dic2012 203773-209465 /DoubleElectron/Run2012D-ZElectron-PromptSkim-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-v1 caf group/alca_ecalcalib/ecalelf/alcaraw INVALID RUN2012D,RUN2012ABCD ##### SingleElectron -190456-193621 /SingleElectron/Run2012A-WElectron-13Jul2012-v1/USER SingleElectron-WSkim-RUN2012A-13Jul-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABCD,Cal_Nov2012,Cal_Dic2012,RUN2012AB,RUN2012ABC, +190456-193621 /SingleElectron/Run2012A-WElectron-13Jul2012-v1/USER SingleElectron-WSkim-RUN2012A-13Jul-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABCD,Cal_Nov2012,Cal_Dic2012,RUN2012AB,RUN2012ABC,RUN2012A 193834-196531 /SingleElectron/Run2012B-WElectron-13Jul2012-v1/USER SingleElectron-WSkim-RUN2012B-13Jul-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABCD,Cal_Nov2012,Cal_Dic2012,RUN2012AB,RUN2012ABC, 198111-198913 /SingleElectron/Run2012C-WElectron-PromptSkim-v2/USER SingleElectron-WSkim-RUN2012C-v2 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABCD,Cal_Nov2012,Cal_Dic2012,RUN2012C,RUN2012ABC, 198934-203755 /SingleElectron/Run2012C-WElectron-PromptSkim-v3/USER SingleElectron-WSkim-RUN2012C-v3 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABCD,RUN2012C,RUN2012ABC, diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py index baecbe891f3..e3815142bbf 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms -from calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi import * -from calibration.ALCARAW_RECO.AlCaElectronTracksReducer_cfi import * +from Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi import * +from Calibration.ALCARAW_RECO.AlCaElectronTracksReducer_cfi import * alcarecoEcalRecHitReducerSeq = cms.Sequence(alCaIsolatedElectrons) alcarecoElectronTracksReducerSeq = cms.Sequence(alcaElectronTracksReducer) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 943d0fa4df9..d9edb1b3b62 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -41,6 +41,11 @@ VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float "doTree=0: no tree; 1: standard tree; 2: onlyExtraTree; 3: standard+extra; 4:only eleID; 5:eleID+standard; 6: eleID+extra; 7: standard+extra+eleID") +options.register('isSingleEle', + 0, #default value False + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.int, # string, int, or float + "sSingleEle=0: false") options.register('doTreeOnly', 1, #default value False VarParsing.VarParsing.multiplicity.singleton, # singleton or list @@ -130,7 +135,7 @@ process.load('Configuration.StandardSequences.GeometryDB_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') #process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') -process.load('calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') process.load('Configuration.EventContent.EventContent_cff') @@ -275,10 +280,10 @@ ################################# FILTERING EVENTS process.filterSeq = cms.Sequence() -#process.load('calibration.ALCARAW_RECO.trackerDrivenFinder_cff') +#process.load('Calibration.ALCARAW_RECO.trackerDrivenFinder_cff') if(options.type == "ALCARECOSIM" and (options.doTree==0 or (options.doTree==1 and options.doTreeOnly==0))): # PUDumper - process.load("calibration.ALCARAW_RECO.PUDumper_cfi") + process.load("Calibration.ALCARAW_RECO.PUDumper_cfi") process.TFileService = cms.Service( "TFileService", fileName = cms.string("PUDumper.root") @@ -287,7 +292,7 @@ if (ZSkim): - process.load('calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') + process.load('Calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') process.filterSeq *= process.ZeeFilterSeq elif (WSkim): process.load("DPGAnalysis.Skims.WElectronSkim_cff") @@ -323,12 +328,12 @@ ############################### if (options.type=="ALCARAW"): - process.load('calibration.ALCARAW_RECO.sandboxSeq_cff') + process.load('Calibration.ALCARAW_RECO.sandboxSeq_cff') # this module provides: #process.sandboxSeq = uncalibRecHitSeq else: # I want to reduce the recHit collections to save space - process.load('calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') + process.load('Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') #============================== TO BE CHECKED FOR PRESHOWER process.load("RecoEcal.EgammaClusterProducers.reducedRecHitsSequence_cff") process.reducedEcalRecHitsES.scEtThreshold = cms.double(0.) @@ -354,7 +359,7 @@ print "sure, it was defined." process.trivialCond = cms.Sequence( EcalTrivialConditionRetriever ) - process.load('calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') + process.load('Calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') # this module provides: # process.electronRecoSeq # process.electronClusteringSeq # with ele-SC reassociation @@ -392,12 +397,13 @@ # Tree production ########################### if(options.doTree>0): - process.load('calibration.ZNtupleDumper.patSequence_cff') - process.load("calibration.ZNtupleDumper.zntupledumper_cfi") - process.load("calibration.JsonFilter.jsonFilter_cfi") + process.load('Calibration.ZNtupleDumper.patSequence_cff') + process.load("Calibration.ZNtupleDumper.zntupledumper_cfi") + process.load("Calibration.JsonFilter.jsonFilter_cfi") process.zNtupleDumper.recHitCollectionEB = process.patElectrons.reducedBarrelRecHitCollection.value() process.zNtupleDumper.recHitCollectionEE = process.patElectrons.reducedEndcapRecHitCollection.value() - + if(options.isSingleEle==1): + process.zNtupleDumper.isWenu = cms.bool(True) if(MC): process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequenceMC * process.zNtupleDumper) else: @@ -476,14 +482,14 @@ process.ZPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) -process.load('calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') if(options.type=="ALCARAW"): - from calibration.ALCARAW_RECO.sandboxOutput_cff import * + from Calibration.ALCARAW_RECO.sandboxOutput_cff import * process.OutALCARECOEcalCalElectron.outputCommands += sandboxOutputCommands if(options.type == "ALCARERECO"): - from calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * + from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * process.OutALCARECOEcalCalElectron.outputCommands += sandboxRerecoOutputCommands fileName = cms.untracked.string(options.output) diff --git a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py index db272d2a405..0e83eb99ade 100644 --- a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py +++ b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py @@ -17,7 +17,7 @@ # multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" # process.load("Calibration.EcalCalibAlgos.electronRecalibSCAssociator_cfi") -from calibration.ALCARAW_RECO.electronRecalibSCAssociatorSH_cfi import * +from Calibration.ALCARAW_RECO.electronRecalibSCAssociatorSH_cfi import * #electronRecalibSCAssociator.scIslandCollection = cms.string('endcapRecalibSC') #electronRecalibSCAssociator.scIslandProducer = cms.string('correctedMulti5x5SuperClustersWithPreshower') #electronRecalibSCAssociator.scProducer = cms.string('correctedHybridSuperClusters') diff --git a/ALCARAW_RECO/python/sandboxSeq_cff.py b/ALCARAW_RECO/python/sandboxSeq_cff.py index 3b5c60a62de..3a5f0bbb697 100644 --- a/ALCARAW_RECO/python/sandboxSeq_cff.py +++ b/ALCARAW_RECO/python/sandboxSeq_cff.py @@ -8,7 +8,7 @@ #process.ecalRecHit.laserCorrection=cms.bool(ApplyLaser) # can add a flag for ICs? -#no switch in standard recHit producer to apply new intercalibrations +#no switch in standard recHit producer to apply new interCalibration. uncalibRecHitSeq = cms.Sequence( (ecalDigis + ecalPreshowerDigis) * ecalUncalibRecHitSequence) sandboxSeq = uncalibRecHitSeq diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index 3799d844607..ba9faba5d26 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -194,7 +194,7 @@ esac ALCARAW_REMOTE_DIR=$ALCARAW_REMOTE_DIR_BASE/${ENERGY}/${DATASETNAME}/${RUNRANGE} -setUserRemoteDirAlcarereco +setUserRemoteDirAlcarereco $ALCARAW_REMOTE_DIR_BASE #USER_REMOTE_DIR=$USER_REMOTE_DIR_BASE/${ENERGY}/${TAG}/${DATASETNAME}/${RUNRANGE} NTUPLE_REMOTE_DIR=$NTUPLE_REMOTE_DIR_BASE/${ENERGY}/${TYPE} diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index a4c7593bfee..025e3564bdd 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -232,6 +232,14 @@ if [ -z "$USER_REMOTE_DIR_BASE" ];then exit 1 fi +case ${DATASETNAME} in + *SingleElectron*) + isSingleEle=1 + ;; + *) + isSingleEle=0 + ;; +esac @@ -314,7 +322,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 jsonFile=${JSONFILE} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 jsonFile=${JSONFILE} isSingleEle=${isSingleEle} get_edm_output=1 output_file=${OUTFILES} From 45e2528101fb1fc548e496ffaf2e4335399b9854 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 9 Jul 2013 19:51:54 +0200 Subject: [PATCH 048/475] added full rereco in case of ALCARAW production --- ALCARAW_RECO/python/alcaSkimming.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 943d0fa4df9..1499a70d79b 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -125,10 +125,15 @@ # ) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') +process.load('Configuration.StandardSequences.RawToDigi_Data_cff') +process.load('Configuration.StandardSequences.L1Reco_cff') +process.load('Configuration.StandardSequences.Reconstruction_Data_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.StandardSequences.GeometryDB_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') #process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') process.load('calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') @@ -314,15 +319,18 @@ # particle flow isolation # -from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso -process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons') -process.pfiso = cms.Sequence(process.pfParticleSelectionSequence + process.eleIsoSequence) +process.pfiso = cms.Sequence() ############################### # ECAL Recalibration ############################### if (options.type=="ALCARAW"): + process.raw2digi_step = cms.Path(process.RawToDigi) + process.L1Reco_step = cms.Path(process.L1Reco) + process.reconstruction_step = cms.Path(process.reconstruction) + process.endjob_step = cms.EndPath(process.endOfProcess) + process.load('calibration.ALCARAW_RECO.sandboxSeq_cff') # this module provides: #process.sandboxSeq = uncalibRecHitSeq @@ -378,10 +386,17 @@ else: process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * process.alcarecoSeq) +if(options.type=="ALCARECO"): + from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso + process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons') + process.pfiso = cms.Sequence(process.pfParticleSelectionSequence + process.eleIsoSequence) + if((not options.type=="ALCARERECO") ): process.load('RecoJets.Configuration.RecoPFJets_cff') process.kt6PFJetsForRhoCorrection = process.kt6PFJets.clone(doRhoFastjet = True) process.kt6PFJetsForRhoCorrection.Rho_EtaMax = cms.double(2.5) + + if(options.skim!="fromWSkim"): process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection * process.pfiso) else: @@ -555,3 +570,9 @@ process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange() process.source.lumisToProcess.extend(myLumis) + +# Schedule definition +if(options.type=='ALCARAW'): + process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step, process.ZPath, process.ALCARECOoutput_step) +else: + process.schedule = cms.Schedule(process.ZPath, process.ALCARECOoutput_step) From 16ddd8640f30d66c24386907c35eb1f22206a7d0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 11 Jul 2013 10:22:08 +0200 Subject: [PATCH 049/475] fixing stability fits with run dependent MC --- ZFitter/script/energyScale.sh | 22 +++++++++++++--------- ZFitter/script/makeTable.sh | 21 ++++++++++++++++++++- ZFitter/script/monitoring_validation.sh | 10 ++++++++-- ZFitter/src/ZFit_class.cc | 16 ++++++++++++++++ 4 files changed, 57 insertions(+), 12 deletions(-) diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 376eff42f1c..b1f7ff23945 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -5,7 +5,7 @@ # - material dependence (step2) # - closure test (step3) -commonCut=Et_25-trigger +commonCut=Et_25-trigger-noPF selection=WP90_PU invMass_var=invMass_SC_regrCorr_pho baseDir=test @@ -65,19 +65,23 @@ if [ -z "${runRangesFile}" ];then exit 1 fi -case ${selection} in - WP80_PU) +case ${selection} in + WP80PU) + ;; + WP90PU) ;; - WP90_PU) + loose) ;; - *) - echo "[ERROR] Selection ${selection} not yet implemented" >> /dev/stderr - usage >> /dev/stderr - exit 1 + medium) ;; + *) + echo "[ERROR] Selection ${selection} not configured" >> /dev/stderr + exit 1 + ;; esac + case ${STEP} in 1) STEP1=y;; 2) STEP2=y;; @@ -106,7 +110,7 @@ esac ## pileup reweight name if [ -z "$puName" ];then puCount=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3 |wc -l` - if [ "${puCount}" != "1" ];then + if [ "${puCount}" == "0" ];then echo "[ERROR] No or too mani pileupHist files for data" exit 1 fi diff --git a/ZFitter/script/makeTable.sh b/ZFitter/script/makeTable.sh index 1d0e4b7bdc5..a77139aa5c7 100755 --- a/ZFitter/script/makeTable.sh +++ b/ZFitter/script/makeTable.sh @@ -103,7 +103,26 @@ echo "#category & events & DeltaM_data & DeltaM_MC & DeltaP & width_data & width for category in $categories do # echo $category - categoryMC=`echo $category | sed 's|-runNumber_[0-9]*_[0-9]*||'` + case $category in + *runNumber*) + runrange=`echo $category | sed 's|.*runNumber|runNumber|;s|.*runNumber_\([0-9]*\)_\([0-9]*\).*|\1_\2|'` + ;; + *) + unset runrange + ;; + esac + if [ -n "${runrange}" ];then + runrange="-runNumber_${runrange}" + runMin=`echo ${runrange} | cut -d '_' -f 2` + runMax=`echo ${runrange} | cut -d '_' -f 3` + #for runDependent mc + if [ "$runMin" -ge "190456" -a "$runMax" -le "196531" ];then runrange="-runNumber_194533_194533"; + elif [ "$runMin" -ge "198111" -a "$runMax" -le "203742" ];then runrange="-runNumber_200519_200519"; + elif [ "$runMin" -ge "203756" -a "$runMax" -le "208686" ];then runrange="-runNumber_206859_206859"; + else runrange=""; + fi + fi + categoryMC=`echo $category | sed "s|-runNumber_[0-9]*_[0-9]*|${runrange}|"` fileMC="${outDirFitResMC}/$categoryMC.tex" if [ ! -r "${fileMC}" ];then echo "[ERROR] ${fileMC} not found" >> /dev/stderr diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index 70e753b9d1c..d0672621f33 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -211,9 +211,15 @@ if [ -z "$puName" ];then echo "[ERROR] No or too mani pileupHist files for data" exit 1 fi - puFile=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3` + puFiles=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3` + for puFile in $puFiles + do + puName="${puName}_`basename $puFile .root | sed 's|\..*||'`" + done + #echo $puFile - puName=`basename $puFile .root | sed 's|\..*||'` + #puName=`basename $puFile .root | sed 's|\..*||'` + puName=`echo $puName | sed 's|^_||'` #echo $puName fi diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index 7e713652644..07ecfd79c44 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -633,10 +633,26 @@ void ZFit_class::Fit(TString region, bool doPlot){ TString regionMC=region; int p = regionMC.Index("-runNumber"); int pp = regionMC.Index("-", p+1); + if(p>0){ + TString region_tmp=region; + region_tmp.Remove(0,p); + if(pp>0) region_tmp.Remove(p,pp-p); + region_tmp.ReplaceAll("-runNumber_",""); + TString region_tmp2=region_tmp; + region_tmp.Remove(region_tmp.First('_')); + region_tmp2.Remove(0,region_tmp2.First('_')+1); + int runMin=region_tmp.Atoi(); + int runMax=region_tmp2.Atoi(); + std::cout << region << "\t" << p << " " << pp << "\ttmp " << region_tmp << "\ttmp2 " << region_tmp2 << "\trunMin " << runMin << "\t" << runMax << std::endl; if(pp<=0) regionMC.Remove(p); else regionMC.Remove(p,pp-p); + // cuts for runDependentMC! + if(runMin>=190456 && runMax<=196531) regionMC.Insert(p,"-runNumber_194533_194533"); + if(runMin>=198111 && runMax<=203742) regionMC.Insert(p,"-runNumber_200519_200519"); + if(runMin>=203756 && runMax<=208686) regionMC.Insert(p,"-runNumber_206859_206859"); } + TString paramsMCFileName=outDirFitResMC+"/"+regionMC+".txt"; TString fitResMCFileName=outDirFitResMC+"/"+regionMC+".root"; TString plotMCFileName=outDirImgMC+"/"+regionMC+"."+imgFormat; From 11f27b25869513b5774edc09568d2b8e1b458290 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 11 Jul 2013 10:22:43 +0200 Subject: [PATCH 050/475] function to plot 2 MC vs data --- ZFitter/data/runRanges/runPeriods.dat | 10 +- ZFitter/macro/PlotDataMC.C | 165 +++++++++++++++++++++++++- 2 files changed, 165 insertions(+), 10 deletions(-) diff --git a/ZFitter/data/runRanges/runPeriods.dat b/ZFitter/data/runRanges/runPeriods.dat index 2b3280289a5..51f902545ff 100644 --- a/ZFitter/data/runRanges/runPeriods.dat +++ b/ZFitter/data/runRanges/runPeriods.dat @@ -3,14 +3,6 @@ # RUN2012B 193834-196531 -1 1336636536-1340017197 # RUN2012C -198111-203002 -1 1341250120-1347854472 -# RUN2012D -203756-208686 -1 1348812152-1354753876 -# RUN2012A -190456-193621 -1 1333632936-1336460266 -# RUN2012B -193834-196531 -1 1336636536-1340017197 -# RUN2012C -198111-203002 -1 1341250120-1347854472 +198111-203742 -1 1341250120-1347854472 # RUN2012D 203756-208686 -1 1348812152-1354753876 diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 415fdd68f54..20d59cbaa05 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -171,7 +171,7 @@ TCanvas *PlotDataMC(TChain *data, TChain *mc, TString branchname, TString binnin TH1F *d = (TH1F *) gROOT->FindObject("data_hist"); TH1F *s = (TH1F *) gROOT->FindObject("mc_hist"); if(s==NULL) s=d; - d->SaveAs("tmp/d_hist.root"); + //d->SaveAs("tmp/d_hist.root"); s->SaveAs("tmp/s_hist.root"); yLabel.Form("Events /(%.2f %s)", s->GetBinWidth(2), yLabelUnit.Data()); @@ -293,3 +293,166 @@ TCanvas *PlotHLTDataMC(TChain *data, TChain *mc, TString branchname, TString bin #endif + + +TCanvas *PlotDataMCMC(TChain *data, TChain *mc, TChain *mc2, + TString branchname, TString binning, + TString category, TString selection, + TString dataLabel, TString mcLabel, TString mc2Label, + TString xLabel, TString yLabelUnit, + bool logy=false, bool usePU=true, bool smear=false, bool scale=false){ + + TString yLabel; + + TCanvas *c = new TCanvas("c",""); + TString branchNameData=branchname; + TString branchNameMC=branchname; + + ElectronCategory_class cutter; + TCut selection_data=""; + if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0); + selection_data+=selection; + TCut selection_MC=""; + if(category.Sizeof()>1) selection_MC = cutter.GetCut(category, true,0); + selection_MC+=selection; + + if(smear){ + branchNameMC.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(smearEle[0]*smearEle[1]))"); + branchNameMC.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*smearEle) "); + branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*smearEle[0])"); + branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*smearEle[1])"); + + } + if(scale){ + branchNameData.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(corrEle[0]*corrEle[1]))"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*corrEle)"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*corrEle[0])"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*corrEle[1])"); + } + //std::cout << branchNameData << "\t" << branchNameMC << std::endl; + + + data->Draw(branchNameData+">>data_hist"+binning, selection_data); + if(mc!=NULL){ + if(usePU) mc->Draw(branchNameMC+">>mc_hist"+binning, selection_MC *"puWeight"); + else mc->Draw(branchNameMC+">>mc_hist"+binning, selection_MC); + } + if(mc2!=NULL){ + if(usePU) mc2->Draw(branchNameMC+">>mc2_hist"+binning, selection_data *"puWeight"); + else mc2->Draw(branchNameMC+">>mc2_hist"+binning, selection_data); + } + + + c->Clear(); + TH1F *d = (TH1F *) gROOT->FindObject("data_hist"); + TH1F *s = (TH1F *) gROOT->FindObject("mc_hist"); + TH1F *s2 = (TH1F *) gROOT->FindObject("mc2_hist"); + if(s==NULL){ + std::cerr << "[WARNING] no mc" << std::endl; + s=d; + } + if(s2==NULL){ + std::cerr << "[WARNING] no mc2" << std::endl; + s2=s; + } + std::cout << s->GetEntries() << "\t" << s2->GetEntries() << "\t" << d->GetEntries() << std::endl; + + //d->SaveAs("tmp/d_hist.root"); + s->SaveAs("tmp/s_hist.root"); + s2->SaveAs("tmp/s2_hist.root"); + + + yLabel.Form("Events /(%.2f %s)", s->GetBinWidth(2), yLabelUnit.Data()); + float max = 1.1 * std::max( + d->GetMaximum(),///d->Integral(), + s->GetMaximum() ///s->Integral() + ); + max=1.1*d->GetMaximum(); + std::cout << "max = " << max << std::endl; + std::cout << "nEvents data: " << d->Integral() << "\t" << d->GetEntries() << std::endl; + std::cout << "nEvents signal: " << s->Integral() << "\t" << s->GetEntries() << std::endl; + std::cout << "nEvents signal2: " << s2->Integral() << "\t" << s2->GetEntries() << std::endl; + if(logy){ + max*=10; + d->GetYaxis()->SetRangeUser(0.1,max); + s->GetYaxis()->SetRangeUser(0.1,max); + s2->GetYaxis()->SetRangeUser(0.1,max); + c->SetLogy(); + } else { + d->GetYaxis()->SetRangeUser(0,max); + s->GetYaxis()->SetRangeUser(0,max); + s2->GetYaxis()->SetRangeUser(0,max); + } + s->GetYaxis()->SetTitle(yLabel); + s->GetXaxis()->SetTitle(xLabel); + s2->GetYaxis()->SetTitle(yLabel); + s2->GetXaxis()->SetTitle(xLabel); + d->GetYaxis()->SetTitle(yLabel); + d->GetXaxis()->SetTitle(xLabel); + + + d->SetMarkerStyle(20); + d->SetMarkerSize(1); + if(d != s){ + s->SetMarkerStyle(20); + s->SetMarkerSize(1); + s->SetFillStyle(3001); + s->SetFillColor(kRed); + } + if(s2 != s){ + //s2->SetMarkerStyle(1); + //s2->SetMarkerSize(0); + //s->SetFillStyle(0); + //s->SetFillColor(kB); + s2->SetLineWidth(3); + s2->SetLineColor(kBlack); + } + + + TH1F* s_norm = (TH1F *) (s->DrawNormalized("hist", d->Integral())); + TH1F* s2_norm = (TH1F *) (s2->DrawNormalized("hist same", d->Integral())); + //TH1F* d_norm = s_norm; + //if(d!=s) d_norm = (TH1F *) (d->DrawNormalized("p same", d->Integral())); + if(d!=s) d->Draw("p same"); + + if(logy){ + //d_norm->GetYaxis()->SetRangeUser(0.1,max); + s_norm->GetYaxis()->SetRangeUser(0.1,max); + c->SetLogy(); + } else { + //d_norm->GetYaxis()->SetRangeUser(0,max); + s_norm->GetYaxis()->SetRangeUser(0,max); + } + std::cout << "Variable & Data & Simulation & Simulation2 \\" << std::endl; + std::cout << "Mean & " << d->GetMean() << " " << d->GetMeanError() + << " & " << s_norm->GetMean() << " " << s_norm->GetMeanError() + << " & " << s2_norm->GetMean() << " " << s2_norm->GetMeanError() + << " \\" << std::endl; + std::cout << "Std. dev. & " << d->GetRMS() << " " << d->GetRMSError() + << " & " << s_norm->GetRMS() << " " << s_norm->GetRMSError() + << " & " << s2_norm->GetRMS() << " " << s2_norm->GetRMSError() + << " \\" << std::endl; + std::cout << "\\hline" << std::endl; + std::cout << "$\\Chi^2$ " << d->Chi2Test(s_norm, "UW CHI2/NDF NORM") << std::endl; + + + TLegend *leg = new TLegend(0.6,0.8,1,1); + if(dataLabel !="") leg->AddEntry(d,dataLabel,"p"); + if(mcLabel !="") leg->AddEntry(s,mcLabel, "lf"); + if(mc2Label !="") leg->AddEntry(s2,mc2Label, "l"); + leg->SetBorderSize(1); + leg->SetFillColor(0); + leg->SetTextSize(0.04); + if(dataLabel !="" && mcLabel !="") leg->Draw(); + //c->GetListOfPrimitives()->Add(leg,""); + + TPaveText *pv = new TPaveText(0.23,0.95,0.6,1,"NDC"); + pv->AddText("CMS Preliminary 2012"); + pv->SetFillColor(0); + pv->SetBorderSize(0); + pv->Draw(); + + + return c; + +} From cd6e062b1b65dc842bad37790ebfd99d8bbe13fc Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 11 Jul 2013 10:23:22 +0200 Subject: [PATCH 051/475] config file with only the std madgraph sample --- .../data/validation/22Jan2012-stdMadgraph.dat | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ZFitter/data/validation/22Jan2012-stdMadgraph.dat diff --git a/ZFitter/data/validation/22Jan2012-stdMadgraph.dat b/ZFitter/data/validation/22Jan2012-stdMadgraph.dat new file mode 100644 index 00000000000..df5d87f9cd2 --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-stdMadgraph.dat @@ -0,0 +1,22 @@ +############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection +########### standard MC +##### Madgraph +s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-allRange.root +##### Powheg +#s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root +########### Data +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root +##### PU trees +#s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMC_powheg-RUN2012ABCD.root +##### Scale correction trees +#d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root +##### Smearer category trees +#d smearerCat_d smearerCat_data-scaleStep2smearing_8.root +#s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root From 83ce8810609bcad618604b307883e7e037c341ce Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 11 Jul 2013 11:26:45 +0200 Subject: [PATCH 052/475] how to produce smearerCat tree --- ZFitter/doc/README | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ZFitter/doc/README b/ZFitter/doc/README index 2f5b128d14e..10e0df8ec9b 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -274,3 +274,13 @@ then in .dat file: energy_SC_A_B_gold(bad) # # list of plots: + + + +################# SmearerFit instructions + - create the tree with the smearerCat category to speed up further running with same categories +./bin/ZFitter.exe -f data/validation/22Jan2012-stdMC.dat --regionsFile=data/regions/scaleStep2smearing_9.dat \ + --commonCut=Et_25-trigger-noPF-EB --smearerFit \ + --outDirFitResData=test/dato/fitres/Hgg_Et_v1/ \ + --autoNsmear --constTermFix --smearerType=profile --saveRootMacro --addBranch=smearerCat \ + >&test/dato/fitres/Hgg_Et_v1/log.log From d9da4d06b2282ed6f8912ed194a25e2e562ee60e Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 11 Jul 2013 15:40:37 +0200 Subject: [PATCH 053/475] fixed paths and ready for RAW to ALCARAW --- .../python/ALCARECOEcalCalIsolElectron_cff.py | 4 +-- ALCARAW_RECO/python/alcaSkimming.py | 27 ++++++++++--------- ALCARAW_RECO/python/sandboxRerecoSeq_cff.py | 2 +- ALCARAW_RECO/python/sandboxSeq_cff.py | 2 +- ZNtupleDumper/python/patSequence_cff.py | 6 ++--- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py index baecbe891f3..e3815142bbf 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms -from calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi import * -from calibration.ALCARAW_RECO.AlCaElectronTracksReducer_cfi import * +from Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi import * +from Calibration.ALCARAW_RECO.AlCaElectronTracksReducer_cfi import * alcarecoEcalRecHitReducerSeq = cms.Sequence(alCaIsolatedElectrons) alcarecoElectronTracksReducerSeq = cms.Sequence(alcaElectronTracksReducer) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 1499a70d79b..8b62e541ae2 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -135,7 +135,7 @@ process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') #process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') -process.load('calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') process.load('Configuration.EventContent.EventContent_cff') @@ -246,6 +246,7 @@ print "[INFO] Using GT START53_V24::All" process.GlobalTag.globaltag = 'START53_V24::All' else: + print "[INFO] Using GT FT_R_53_V21::All" process.GlobalTag.globaltag = 'FT_R_53_V21::All' #22Jan rereco elif(re.match("CMSSW_5_3_9_patch3",CMSSW_VERSION)): if(MC): @@ -280,10 +281,10 @@ ################################# FILTERING EVENTS process.filterSeq = cms.Sequence() -#process.load('calibration.ALCARAW_RECO.trackerDrivenFinder_cff') +#process.load('Calibration.ALCARAW_RECO.trackerDrivenFinder_cff') if(options.type == "ALCARECOSIM" and (options.doTree==0 or (options.doTree==1 and options.doTreeOnly==0))): # PUDumper - process.load("calibration.ALCARAW_RECO.PUDumper_cfi") + process.load("Calibration.ALCARAW_RECO.PUDumper_cfi") process.TFileService = cms.Service( "TFileService", fileName = cms.string("PUDumper.root") @@ -292,7 +293,7 @@ if (ZSkim): - process.load('calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') + process.load('Calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') process.filterSeq *= process.ZeeFilterSeq elif (WSkim): process.load("DPGAnalysis.Skims.WElectronSkim_cff") @@ -331,12 +332,12 @@ process.reconstruction_step = cms.Path(process.reconstruction) process.endjob_step = cms.EndPath(process.endOfProcess) - process.load('calibration.ALCARAW_RECO.sandboxSeq_cff') + process.load('Calibration.ALCARAW_RECO.sandboxSeq_cff') # this module provides: #process.sandboxSeq = uncalibRecHitSeq else: # I want to reduce the recHit collections to save space - process.load('calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') + process.load('Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') #============================== TO BE CHECKED FOR PRESHOWER process.load("RecoEcal.EgammaClusterProducers.reducedRecHitsSequence_cff") process.reducedEcalRecHitsES.scEtThreshold = cms.double(0.) @@ -362,7 +363,7 @@ print "sure, it was defined." process.trivialCond = cms.Sequence( EcalTrivialConditionRetriever ) - process.load('calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') + process.load('Calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') # this module provides: # process.electronRecoSeq # process.electronClusteringSeq # with ele-SC reassociation @@ -407,9 +408,9 @@ # Tree production ########################### if(options.doTree>0): - process.load('calibration.ZNtupleDumper.patSequence_cff') - process.load("calibration.ZNtupleDumper.zntupledumper_cfi") - process.load("calibration.JsonFilter.jsonFilter_cfi") + process.load('Calibration.ZNtupleDumper.patSequence_cff') + process.load("Calibration.ZNtupleDumper.zntupledumper_cfi") + process.load("Calibration.JsonFilter.jsonFilter_cfi") process.zNtupleDumper.recHitCollectionEB = process.patElectrons.reducedBarrelRecHitCollection.value() process.zNtupleDumper.recHitCollectionEE = process.patElectrons.reducedEndcapRecHitCollection.value() @@ -491,14 +492,14 @@ process.ZPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) -process.load('calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') if(options.type=="ALCARAW"): - from calibration.ALCARAW_RECO.sandboxOutput_cff import * + from Calibration.ALCARAW_RECO.sandboxOutput_cff import * process.OutALCARECOEcalCalElectron.outputCommands += sandboxOutputCommands if(options.type == "ALCARERECO"): - from calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * + from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * process.OutALCARECOEcalCalElectron.outputCommands += sandboxRerecoOutputCommands fileName = cms.untracked.string(options.output) diff --git a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py index db272d2a405..0e83eb99ade 100644 --- a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py +++ b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py @@ -17,7 +17,7 @@ # multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" # process.load("Calibration.EcalCalibAlgos.electronRecalibSCAssociator_cfi") -from calibration.ALCARAW_RECO.electronRecalibSCAssociatorSH_cfi import * +from Calibration.ALCARAW_RECO.electronRecalibSCAssociatorSH_cfi import * #electronRecalibSCAssociator.scIslandCollection = cms.string('endcapRecalibSC') #electronRecalibSCAssociator.scIslandProducer = cms.string('correctedMulti5x5SuperClustersWithPreshower') #electronRecalibSCAssociator.scProducer = cms.string('correctedHybridSuperClusters') diff --git a/ALCARAW_RECO/python/sandboxSeq_cff.py b/ALCARAW_RECO/python/sandboxSeq_cff.py index 3b5c60a62de..3a5f0bbb697 100644 --- a/ALCARAW_RECO/python/sandboxSeq_cff.py +++ b/ALCARAW_RECO/python/sandboxSeq_cff.py @@ -8,7 +8,7 @@ #process.ecalRecHit.laserCorrection=cms.bool(ApplyLaser) # can add a flag for ICs? -#no switch in standard recHit producer to apply new intercalibrations +#no switch in standard recHit producer to apply new interCalibration. uncalibRecHitSeq = cms.Sequence( (ecalDigis + ecalPreshowerDigis) * ecalUncalibRecHitSequence) sandboxSeq = uncalibRecHitSeq diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 6e8aa235273..02baac2fbbd 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -3,7 +3,7 @@ from Configuration.StandardSequences.MagneticField_cff import * #------------------------------ pattuple -from calibration.ZNtupleDumper.elePat_cfi import * +from Calibration.ZNtupleDumper.elePat_cfi import * #process.patElectrons.electronSource = cms.InputTag("gsfElectrons") #process.patElectrons.addElectronID = cms.bool(False) #process.patElectrons.addGenMatch = cms.bool(True) @@ -11,7 +11,7 @@ #print process.patElectrons.reducedBarrelRecHitCollection #------------------------------ new energies -from calibration.EleNewEnergiesProducer.elenewenergiesproducer_cfi import * +from Calibration.EleNewEnergiesProducer.elenewenergiesproducer_cfi import * eleNewEnergiesProducer.regrPhoFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ph_52x.root' eleNewEnergiesProducer.regrEleFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ele_52x.root' eleNewEnergiesProducer.regrEleFile_fra='src/Calibration/EleNewEnergiesProducer/data/eleEnergyRegWeights_V1.root' @@ -26,7 +26,7 @@ eleRegressionEnergy.vertexCollection = cms.InputTag('offlinePrimaryVertices') #------------------------------ electronID producer -from calibration.EleSelectionProducers.eleselectionproducers_cfi import * +from Calibration.EleSelectionProducers.eleselectionproducers_cfi import * # process.EleSelectionProducers #============================== Adding new energies to patElectrons From 6476b83429fb7875f2a9947a715845e84bfaa2db Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 12 Jul 2013 11:55:01 +0200 Subject: [PATCH 054/475] fixed selection for smearing and new 1d find minimum function --- ZFitter/bin/ZFitter.cpp | 75 +++++++++++++++++++-- ZFitter/data/validation/22Jan2012-stdMC.dat | 4 +- ZFitter/src/SmearingImporter.cc | 2 +- 3 files changed, 74 insertions(+), 7 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 0c9e77239a8..f0ddb1462c3 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -468,6 +468,67 @@ bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iPro return changed; } + +Double_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t& iMin, RooSmearer& smearer){ + Int_t iMinStart= iMin; + var->SetVal(X[iMinStart]); + Double_t chi2, chi2init=smearer.evaluate(); + + Double_t locmin=1e20; + Int_t iLocMin=0; + std::queue chi2old; + + for(Int_t i =iMinStart; i setVal(X[i]); + chi2=smearer.evaluate(); + + // if(update==true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(chi2<=locmin){ //local minimum + iLocMin=i; + locmin=chi2; + } + + if(!chi2old.empty() && chi22 && chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm + if(chi2old.size()>2 && chi2-chi2old.back() >40 && chi2-locmin >400) break; // jump to the next constTerm + if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >500) break; + + chi2old.push(chi2); + } + + for(Int_t i =iMinStart; i >=0; i--){ //loop versus positive side + var->setVal(X[i]); + chi2=smearer.evaluate(); + + // if(update==true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(chi2<=locmin){ //local minimum + iLocMin=i; + locmin=chi2; + } + + if(!chi2old.empty() && chi22 && chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm + if(chi2old.size()>2 && chi2-chi2old.back() >40 && chi2-locmin >400) break; // jump to the next constTerm + if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >500) break; + + chi2old.push(chi2); + } + + iMin=iLocMin; //update min point + return locmin; +} + + /** min is updated */ @@ -507,6 +568,11 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i std::queue chi2old; for(Int_t i2 =0; i2 (&selection)->default_value("WP80PU"),"") + ("selection", po::value(&selection)->default_value("loose"),"") ("commonCut", po::value(&commonCut)->default_value("Et_25-trigger-noPF"),"") ("invMass_var", po::value(&invMass_var)->default_value("invMass_SC_regrCorr_ele"),"") ("invMass_min", po::value(&invMass_min)->default_value(65.),"") @@ -1578,7 +1644,7 @@ int main(int argc, char **argv) { || vm.count("saveR9TreeWeight") ) return 0; - eleID=selection.c_str(); + eleID+=selection.c_str(); eleID.ReplaceAll("_",""); //------------------------------ RooSmearer @@ -1928,6 +1994,7 @@ int main(int argc, char **argv) { TString of=outFile; of.ReplaceAll(".root",name+".root"); smearer.dataset->SaveAs(of); } + continue; std::cout << "Doing " << name << "\t" << var->getVal() << std::endl; TGraph *profil = GetProfile(var, smearer,0); diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index b7274c04968..b41efcaaf64 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -18,5 +18,5 @@ s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-st ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees -#d smearerCat_d smearerCat_data-scaleStep2smearing_8.root -#s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root +d smearerCat_d smearerCat-22Jan-stdMC_data-scaleStep2smearing_7.root +s smearerCat_s smearerCat-22Jan-stdMC_mc-scaleStep2smearing_7.root diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 83e532bd944..0d29cb68f58 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -360,7 +360,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, bool isMC, bool odd, Long64_t nEvents){ - TString eleID_=_eleID; + TString eleID_="eleID_"+_eleID; TString oddString; if(odd) oddString+="-odd"; From 8b5a2bbb8e1512b2eaf6632f5482febae9647070 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 12 Jul 2013 14:45:15 +0200 Subject: [PATCH 055/475] reduced difference for findmin1d --- ZFitter/bin/ZFitter.cpp | 73 +++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 43 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index f0ddb1462c3..deb7def9a7c 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -469,9 +469,8 @@ bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iPro } -Double_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t& iMin, RooSmearer& smearer){ - Int_t iMinStart= iMin; - var->SetVal(X[iMinStart]); +Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, RooSmearer& smearer, bool update=true){ + var->setVal(X[iMinStart]); Double_t chi2, chi2init=smearer.evaluate(); Double_t locmin=1e20; @@ -481,8 +480,9 @@ Double_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t& iMin, RooSmeare for(Int_t i =iMinStart; i setVal(X[i]); chi2=smearer.evaluate(); - - // if(update==true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + + if(update==true) + std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -495,37 +495,40 @@ Double_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t& iMin, RooSmeare } if(chi2old.size()>2 && chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()>2 && chi2-chi2old.back() >40 && chi2-locmin >400) break; // jump to the next constTerm - if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >500) break; - + if(chi2old.size()>3 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm + if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; + chi2old.push(chi2); } + while(!chi2old.empty()){ + chi2old.pop(); + } for(Int_t i =iMinStart; i >=0; i--){ //loop versus positive side var->setVal(X[i]); chi2=smearer.evaluate(); - // if(update==true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(update==true) + std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; - } - + } + if(!chi2old.empty() && chi22 && chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()>2 && chi2-chi2old.back() >40 && chi2-locmin >400) break; // jump to the next constTerm - if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >500) break; + if(chi2old.size()>3 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm + if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; chi2old.push(chi2); } - iMin=iLocMin; //update min point - return locmin; + return iLocMin; } @@ -557,7 +560,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i Double_t chi2, chi2init=smearer.evaluate(); Double_t locmin=1e20; - Int_t iLocMin1=0, iLocMin2; + Int_t iLocMin1=0, iLocMin2, iLocMin2Prev=0; TStopwatch myClock; myClock.Start(); @@ -567,34 +570,18 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i var1->setVal(X1[i1]); std::queue chi2old; - for(Int_t i2 =0; i2 getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; - if(chi2<=locmin){ //local minimum - iLocMin1=i1; - iLocMin2=i2; - locmin=chi2; - } - - if(!chi2old.empty() && chi22 && chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()>2 && chi2-chi2old.back() >40 && chi2-locmin >400) break; // jump to the next constTerm - if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >500) break; - - chi2old.push(chi2); + var2->setVal(X2[iLocMin2Prev]); + chi2=smearer.evaluate(); + + if(update==true || true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(chi2<=locmin){ //local minimum + iLocMin1=i1; + iLocMin2=iLocMin2Prev; + locmin=chi2; } + } // reset to initial value From 4f5638de6d8fec4acfd1efd527281798b8b121ab Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 14 Jul 2013 13:59:07 +0200 Subject: [PATCH 056/475] isolation value maps added correctly --- .../ALCARECOEcalCalIsolElectron_Output_cff.py | 9 +- ALCARAW_RECO/python/alcaSkimming.py | 421 ++++++++---------- ALCARAW_RECO/python/eleIsoSequence_cff.py | 127 ++++++ ALCARAW_RECO/src/PUDumper.cc | 2 +- .../python/eleselectionproducers_cfi.py | 6 +- ZNtupleDumper/python/patSequence_cff.py | 2 +- 6 files changed, 331 insertions(+), 236 deletions(-) create mode 100644 ALCARAW_RECO/python/eleIsoSequence_cff.py diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index 45ff7b47ae1..2479f016a67 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -52,12 +52,9 @@ 'keep *_TriggerResults_*_*', 'keep *_hltTriggerSummaryAOD_*_HLT', # pfisolation - 'keep *_elPFIsoValueCharged03PFIdPFIso_*_*', - 'keep *_elPFIsoValueGamma03PFIdPFIso_*_*', - 'keep *_elPFIsoValueNeutral03PFIdPFIso_*_*', - 'keep *_*_elPFIsoValueCharged03PFIdPFIso_*', - 'keep *_*_elPFIsoValueGamma03PFIdPFIso_*', - 'keep *_*_elPFIsoValueNeutral03PFIdPFIso_*' + 'keep *_elPFIsoValueCharged03PFIdGsf*_*_*', + 'keep *_elPFIsoValueGamma03PFIdGsf*_*_*', + 'keep *_elPFIsoValueNeutral03PFIdGsf*_*_*' ) ) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 8b62e541ae2..2f346bea9a5 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -2,19 +2,15 @@ import os, sys, imp, re import FWCore.ParameterSet.VarParsing as VarParsing import subprocess +import copy +from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet + + #sys.path(".") -# -# _____ __ _ _ _ -# / ____| / _(_) | | (_) -# | | ___ _ __ | |_ _ __ _ _ _ _ __ __ _| |_ _ ___ _ __ -# | | / _ \| '_ \| _| |/ _` | | | | '__/ _` | __| |/ _ \| '_ \ -# | |___| (_) | | | | | | | (_| | |_| | | | (_| | |_| | (_) | | | | -# \_____\___/|_| |_|_| |_|\__, |\__,_|_| \__,_|\__|_|\___/|_| |_| -# __/ | -# |___/ - -### setup 'ALCARAW' options + +############################################################ +### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register ('type', "ALCARAW", @@ -48,18 +44,16 @@ "bool: doTreeOnly=1 true, doTreeOnly=0 false") ### setup any defaults you want -#options.outputFile = '/uscms/home/cplager/nobackup/outputFiles/try_3.root' options.output="alcaSkimALCARAW.root" options.secondaryOutput="ntuple.root" -#options.files= "file:///tmp/shervin/RAW-RECO.root" options.files= "root://eoscms//eos/cms/store/group/alca_ecalcalib/ALCARAW/RAW-RECO_533.root" -#options.files= "file:///tmp/shervin/MC-AODSIM.root" -#'file1.root', 'file2.root' options.maxEvents = -1 # -1 means all events ### get and parse the command line arguments options.parseArguments() print options + +############################################################ # Use the options # Do you want to filter events? @@ -134,11 +128,34 @@ process.load('Configuration.StandardSequences.GeometryDB_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') -#process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') -process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') - process.load('Configuration.EventContent.EventContent_cff') +# import of ALCARECO sequences +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') +from Calibration.ALCARAW_RECO.sandboxOutput_cff import * +from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * + +#process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') # this is for official ALCARAW ALCARECO production +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') # reduction of recHits +process.load("Calibration.ALCARAW_RECO.PUDumper_cfi") +process.load('Calibration.ALCARAW_RECO.sandboxSeq_cff') # ALCARAW +# this module provides: +#process.sandboxSeq = uncalibRecHitSeq +process.load('Calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') # ALCARERECO +# this module provides: +# process.electronRecoSeq +# process.electronClusteringSeq # with ele-SC reassociation +# process.sandboxRerecoSeq = (electronRecoSeq * electronClusteringSeq) + +# Tree production +process.load('Calibration.ZNtupleDumper.patSequence_cff') +process.load("Calibration.ZNtupleDumper.zntupledumper_cfi") +process.load("Calibration.JsonFilter.jsonFilter_cfi") + +# I want to reduce the recHit collections to save space: alcareco +process.load('Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') + +# ntuple # added by Shervin for ES recHits (saved as in AOD): large window 15x3 (strip x row) process.load('RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi') @@ -282,9 +299,8 @@ ################################# FILTERING EVENTS process.filterSeq = cms.Sequence() #process.load('Calibration.ALCARAW_RECO.trackerDrivenFinder_cff') -if(options.type == "ALCARECOSIM" and (options.doTree==0 or (options.doTree==1 and options.doTreeOnly==0))): +if(MC): # PUDumper - process.load("Calibration.ALCARAW_RECO.PUDumper_cfi") process.TFileService = cms.Service( "TFileService", fileName = cms.string("PUDumper.root") @@ -320,241 +336,138 @@ # particle flow isolation # -process.pfiso = cms.Sequence() +#process.pfiso = cms.Sequence() ############################### # ECAL Recalibration ############################### - -if (options.type=="ALCARAW"): - process.raw2digi_step = cms.Path(process.RawToDigi) - process.L1Reco_step = cms.Path(process.L1Reco) - process.reconstruction_step = cms.Path(process.reconstruction) - process.endjob_step = cms.EndPath(process.endOfProcess) - - process.load('Calibration.ALCARAW_RECO.sandboxSeq_cff') - # this module provides: - #process.sandboxSeq = uncalibRecHitSeq -else: - # I want to reduce the recHit collections to save space - process.load('Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') - #============================== TO BE CHECKED FOR PRESHOWER - process.load("RecoEcal.EgammaClusterProducers.reducedRecHitsSequence_cff") - process.reducedEcalRecHitsES.scEtThreshold = cms.double(0.) - - process.reducedEcalRecHitsES.EcalRecHitCollectionES = cms.InputTag('ecalPreshowerRecHit','EcalRecHitsES') - process.reducedEcalRecHitsES.noFlag = cms.bool(True) - process.reducedEcalRecHitsES.OutputLabel_ES = cms.string('alCaRecHitsES') - - if(not options.type=="ALCARERECO"): # in ALCARECO production starting from AOD or RECO the ES recHits are reduced - process.alcarecoSeq = cms.Sequence(process.alCaIsolatedElectrons) # + process.alcaElectronTracksReducer) - else: - process.alcarecoSeq = cms.Sequence(process.alCaIsolatedElectrons + process.reducedEcalRecHitsES) - - #============================== +#============================== TO BE CHECKED FOR PRESHOWER +process.load("RecoEcal.EgammaClusterProducers.reducedRecHitsSequence_cff") +process.reducedEcalRecHitsES.scEtThreshold = cms.double(0.) + +process.reducedEcalRecHitsES.EcalRecHitCollectionES = cms.InputTag('ecalPreshowerRecHit','EcalRecHitsES') +process.reducedEcalRecHitsES.noFlag = cms.bool(True) +process.reducedEcalRecHitsES.OutputLabel_ES = cms.string('alCaRecHitsES') + +#============================== +#Define the sequences +process.alcarecoSeq = cms.Sequence(process.alCaIsolatedElectrons) # + process.alcaElectronTracksReducer) +if(options.type=="ALCARERECO"): # in ALCARECO production starting from AOD or RECO the ES recHits are reduced + process.alcarecoSeq += process.reducedEcalRecHitsES -if(options.type=="ALCARERECO"): - try: - EcalTrivialConditionRetriever - except NameError: - print "well, it WASN'T defined after all!" - process.trivialCond = cms.Sequence() - else: - print "sure, it was defined." - process.trivialCond = cms.Sequence( EcalTrivialConditionRetriever ) - - process.load('Calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') - # this module provides: - # process.electronRecoSeq - # process.electronClusteringSeq # with ele-SC reassociation - # process.sandboxRerecoSeq = (electronRecoSeq * electronClusteringSeq) - process.ecalRecHit.EBuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEB") - process.ecalRecHit.EEuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEE") - - process.correctedHybridSuperClusters.corectedSuperClusterCollection = 'recalibSC' - process.correctedMulti5x5SuperClustersWithPreshower.corectedSuperClusterCollection = 'endcapRecalibSC' - if(re.match("CMSSW_5_.*",CMSSW_VERSION) or re.match("CMSSW_6_.*", CMSSW_VERSION)): - process.multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" +try: + EcalTrivialConditionRetriever +except NameError: + print "well, it WASN'T defined after all!" + process.trivialCond = cms.Sequence() +else: + print "sure, it was defined." + process.trivialCond = cms.Sequence( EcalTrivialConditionRetriever ) - # in sandboxRereco - process.reducedEcalRecHitsES.EndcapSuperClusterCollection= cms.InputTag('correctedMulti5x5SuperClustersWithPreshower','endcapRecalibSC',processName) +if(re.match("CMSSW_6_.*", CMSSW_VERSION)): + process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxPFRerecoSeq * process.alcarecoSeq) +else: + process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * process.alcarecoSeq) - process.alCaIsolatedElectrons.electronLabel = cms.InputTag("electronRecalibSCAssociator") - process.alCaIsolatedElectrons.ebRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB") - process.alCaIsolatedElectrons.eeRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE") - if(re.match("CMSSW_6_.*", CMSSW_VERSION)): - process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxPFRerecoSeq * process.alcarecoSeq) - else: - process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * process.alcarecoSeq) +process.load('Calibration.ALCARAW_RECO.eleIsoSequence_cff') -if(options.type=="ALCARECO"): - from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso - process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons') - process.pfiso = cms.Sequence(process.pfParticleSelectionSequence + process.eleIsoSequence) - +process.load('RecoJets.Configuration.RecoPFJets_cff') +process.kt6PFJetsForRhoCorrection = process.kt6PFJets.clone(doRhoFastjet = True) +process.kt6PFJetsForRhoCorrection.Rho_EtaMax = cms.double(2.5) if((not options.type=="ALCARERECO") ): - process.load('RecoJets.Configuration.RecoPFJets_cff') - process.kt6PFJetsForRhoCorrection = process.kt6PFJets.clone(doRhoFastjet = True) - process.kt6PFJetsForRhoCorrection.Rho_EtaMax = cms.double(2.5) - - if(options.skim!="fromWSkim"): process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection * process.pfiso) else: process.rhoFastJetSeq = cms.Sequence(process.pfiso) -########################### -# Tree production -########################### -if(options.doTree>0): - process.load('Calibration.ZNtupleDumper.patSequence_cff') - process.load("Calibration.ZNtupleDumper.zntupledumper_cfi") - process.load("Calibration.JsonFilter.jsonFilter_cfi") - process.zNtupleDumper.recHitCollectionEB = process.patElectrons.reducedBarrelRecHitCollection.value() - process.zNtupleDumper.recHitCollectionEE = process.patElectrons.reducedEndcapRecHitCollection.value() - - if(MC): - process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequenceMC * process.zNtupleDumper) - else: - process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequence * process.zNtupleDumper) - - if(options.doTree==2 or options.doTree==4 or options.doTree==6 or options.doTree==8): - process.zNtupleDumper.doStandardTree = cms.bool(False) - if(options.doTree==2 or options.doTree==3 or options.doTree==6 or options.doTree==7 or options.doTree==10 or options.doTree==11 or options.doTree==14 or options.doTree==15): # it's a bit mask - process.zNtupleDumper.doExtraCalibTree=cms.bool(True) - if(options.doTree==4 or options.doTree==5 or options.doTree==6 or options.doTree==7 or options.doTree==12 or options.doTree==13 or options.doTree==14 or options.doTree==15): # it's a bit mask - process.zNtupleDumper.doEleIDTree=cms.bool(True) - process.zNtupleDumper.foutName=options.secondaryOutput - # this includes the sequence: patSequence - # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) - - pathPrefix=CMSSW_BASE+"/" - process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() - process.eleNewEnergiesProducer.regrEleFile=pathPrefix+process.eleNewEnergiesProducer.regrEleFile.value() - process.eleNewEnergiesProducer.regrEleFile_fra=pathPrefix+process.eleNewEnergiesProducer.regrEleFile_fra.value() -# process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2012Weights_V1.root") #eleEnergyRegWeights_WithSubClusters_VApr15.root") - process.eleRegressionEnergy.energyRegressionType=cms.uint32(2) - if(re.match("CMSSW_4_4_.*", CMSSW_VERSION)): - process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2011Weights_V1.root") - if(re.match("CMSSW_4_2_.*", CMSSW_VERSION)): - pathPrefix=CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' - print '[INFO] Using v2 regression for CMSSW_4_2_X' - process.eleNewEnergiesProducer.regrPhoFile=cms.string(pathPrefix+'data/gbrv2ph.root') - process.eleNewEnergiesProducer.regrEleFile=cms.string(pathPrefix+'data/gbrv2ele.root') - process.eleNewEnergiesProducer.regrEleFile_fra=cms.string('nocorrections') - #process.eleNewEnergiesProducer.regrEleFile_fra=cms.string(pathPrefix+'data/eleEnergyRegWeights_V1.root') +if(MC): + process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequenceMC * process.zNtupleDumper) +else: + process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequence * process.zNtupleDumper) + +if(options.doTree==2 or options.doTree==4 or options.doTree==6 or options.doTree==8): + process.zNtupleDumper.doStandardTree = cms.bool(False) +if(options.doTree==2 or options.doTree==3 or options.doTree==6 or options.doTree==7 or options.doTree==10 or options.doTree==11 or options.doTree==14 or options.doTree==15): # it's a bit mask + process.zNtupleDumper.doExtraCalibTree=cms.bool(True) +if(options.doTree==4 or options.doTree==5 or options.doTree==6 or options.doTree==7 or options.doTree==12 or options.doTree==13 or options.doTree==14 or options.doTree==15): # it's a bit mask + process.zNtupleDumper.doEleIDTree=cms.bool(True) -################################ -# Setting Path -################################ -if(options.type=="ALCARAW"): - process.ZPath = cms.Path( process.filterSeq * - (process.rhoFastJetSeq + process.alcarecoElectronTracksReducerSeq + - process.sandboxSeq )) -elif(options.type=="ALCARERECO"): - if(options.doTree>0): - process.eleRegressionEnergy.inputElectronsTag = cms.InputTag('electronRecalibSCAssociator') - process.eleSelectionProducers.electronCollection = 'electronRecalibSCAssociator' - process.eleNewEnergiesProducer.electronCollection = 'electronRecalibSCAssociator' - process.patElectrons.electronSource = 'electronRecalibSCAssociator' - - if(doTreeOnly): - process.NtuplePath = cms.Path(process.ntupleSeq) - else: - process.ZPath = cms.Path(process.alcarerecoSeq) - process.NtuplePath = cms.Path(process.alcarerecoSeq * process.ntupleSeq) - else: - process.ZPath = cms.Path(process.alcarerecoSeq) - -elif(options.type == "ALCARECO"): - if(options.doTree>0): - if(doTreeOnly): - process.NtuplePath = cms.Path(process.filterSeq * process.ntupleSeq) - else: - process.ZPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) - process.NtuplePath = cms.Path(process.filterSeq *(process.rhoFastJetSeq+process.alcarecoSeq) * process.ntupleSeq) - else: - process.ZPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) -elif(options.type == "ALCARECOSIM"): - print "Alcarecosim" - if(options.doTree>0): - if(doTreeOnly): - print "Only ntuple path" - process.NtuplePath = cms.Path(process.ntupleSeq) - else: - process.ZPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) - process.NtuplePath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq ) - *process.ntupleSeq) - else: - process.ZPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) -process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') -if(options.type=="ALCARAW"): - from Calibration.ALCARAW_RECO.sandboxOutput_cff import * - process.OutALCARECOEcalCalElectron.outputCommands += sandboxOutputCommands - -if(options.type == "ALCARERECO"): - from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * - process.OutALCARECOEcalCalElectron.outputCommands += sandboxRerecoOutputCommands +process.OutALCARECOEcalUncalElectron = copy.deepcopy(process.OutALCARECOEcalCalElectron) +process.OutALCARECOEcalUncalElectron.outputCommands +=sandboxOutputCommands fileName = cms.untracked.string(options.output) -process.output = cms.OutputModule("PoolOutputModule", - # after 5 GB split the file - maxSize = cms.untracked.int32(5120000), - outputCommands = process.OutALCARECOEcalCalElectron.outputCommands, - fileName = fileName, - SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('ZPath')), - dataset = cms.untracked.PSet( +process.outputALCARAW = cms.OutputModule("PoolOutputModule", + # after 5 GB split the file + maxSize = cms.untracked.int32(5120000), + outputCommands = process.OutALCARECOEcalUncalElectron.outputCommands, + #fileName = fileName, + fileName = cms.untracked.string('alcaraw.root'), + SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('ZALCARAWPath')), + dataset = cms.untracked.PSet( + filterName = cms.untracked.string(''), + dataTier = cms.untracked.string('ALCARECO') + ) + ) + +process.outputALCARECO = cms.OutputModule("PoolOutputModule", + # after 5 GB split the file + maxSize = cms.untracked.int32(5120000), + outputCommands = process.OutALCARECOEcalCalElectron.outputCommands, + fileName = cms.untracked.string('alcareco.root'), + SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('ZALCARECOPath')), + dataset = cms.untracked.PSet( filterName = cms.untracked.string(''), dataTier = cms.untracked.string('ALCARECO') ) - ) + ) #print "OUTPUTCOMMANDS" #print process.output.outputCommands -if(not doTreeOnly): - process.ALCARECOoutput_step = cms.EndPath(process.output) - -debug=False -if(debug): - process.DEBUGoutput = cms.OutputModule("PoolOutputModule", - # after 5 GB split the file - maxSize = cms.untracked.int32(5120000), - outputCommands = cms.untracked.vstring([ 'keep *_*_*_*' ]), - fileName = cms.untracked.string('/tmp/shervin/patDUMP.root'), - # SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('ZPath, NtuplePath')), - dataset = cms.untracked.PSet( - filterName = cms.untracked.string(''), - dataTier = cms.untracked.string('ALCARECO') - ) - ) - - process.DEBUGoutput_step = cms.EndPath(process.DEBUGoutput) - -#process.schedule = cms.Schedule(process.zFilterPath,process.ALCARECOoutput_step) - -if(options.doTree>0): - #process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB") - #process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE") - process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits") - process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits") - process.patElectrons.reducedBarrelRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEB - process.patElectrons.reducedEndcapRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEE - process.zNtupleDumper.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB - process.zNtupleDumper.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE - process.eleRegressionEnergy.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB.value() - process.eleRegressionEnergy.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE.value() - - print process.eleNewEnergiesProducer.recHitCollectionEB - + +############################################################## +# Setting Path +################################ +process.raw2digi_step = cms.Path(process.RawToDigi) +process.L1Reco_step = cms.Path(process.L1Reco) +process.reconstruction_step = cms.Path(process.reconstruction) +process.endjob_step = cms.EndPath(process.endOfProcess) + +process.ZALCARAWPath = cms.Path( process.filterSeq * + (process.rhoFastJetSeq + process.alcarecoElectronTracksReducerSeq + + process.sandboxSeq )) +process.ZALCARERECOPath = cms.Path(process.alcarerecoSeq) +process.NtuplePath = cms.Path(process.filterSeq * process.ntupleSeq) +process.ZALCARECOPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) + +process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) +process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) + + +############################################################ +# Setting collection names +############################## +#process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB") +#process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE") +process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits") +process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits") +process.patElectrons.reducedBarrelRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEB +process.patElectrons.reducedEndcapRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEE +process.zNtupleDumper.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB +process.zNtupleDumper.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE +process.eleRegressionEnergy.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB.value() +process.eleRegressionEnergy.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE.value() + + +############### JSON Filter if(options.doTree>0 and options.doTreeOnly==0): process.jsonFilter.jsonFileName = cms.string(options.jsonFile) else: @@ -572,8 +485,66 @@ process.source.lumisToProcess.extend(myLumis) + # Schedule definition if(options.type=='ALCARAW'): - process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step, process.ZPath, process.ALCARECOoutput_step) + process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step, process.ZALCARAWPath, process.ALCARAWoutput_step, process.ZALCARECOPath, process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules +elif(options.type=='ALCARERECO'): + process.schedule = cms.Schedule(process.ZALCARERECOPath, process.ALCARECOoutput_step) # add ntuple else: - process.schedule = cms.Schedule(process.ZPath, process.ALCARECOoutput_step) + process.schedule = cms.Schedule(process.ZALCARECOPath, process.ALCARECOoutput_step) # add ntuple + + + + +if(options.type=="ALCARERECO"): + process.ecalRecHit.EBuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEB") + process.ecalRecHit.EEuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEE") + + process.correctedHybridSuperClusters.corectedSuperClusterCollection = 'recalibSC' + process.correctedMulti5x5SuperClustersWithPreshower.corectedSuperClusterCollection = 'endcapRecalibSC' + if(re.match("CMSSW_5_.*",CMSSW_VERSION) or re.match("CMSSW_6_.*", CMSSW_VERSION)): + process.multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" + + # in sandboxRereco + process.reducedEcalRecHitsES.EndcapSuperClusterCollection= cms.InputTag('correctedMulti5x5SuperClustersWithPreshower','endcapRecalibSC',processName) + + process.alCaIsolatedElectrons.electronLabel = cms.InputTag("electronRecalibSCAssociator") + process.alCaIsolatedElectrons.ebRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB") + process.alCaIsolatedElectrons.eeRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE") + + process.eleRegressionEnergy.inputElectronsTag = cms.InputTag('electronRecalibSCAssociator') + process.eleSelectionProducers.electronCollection = 'electronRecalibSCAssociator' + process.eleNewEnergiesProducer.electronCollection = 'electronRecalibSCAssociator' + process.patElectrons.electronSource = 'electronRecalibSCAssociator' + + process.OutALCARECOEcalCalElectron.outputCommands += sandboxRerecoOutputCommands + process.outputALCARECO.fileName=cms.untracked.string('alcarereco.root') + +process.zNtupleDumper.recHitCollectionEB = process.patElectrons.reducedBarrelRecHitCollection.value() +process.zNtupleDumper.recHitCollectionEE = process.patElectrons.reducedEndcapRecHitCollection.value() + + +process.zNtupleDumper.foutName=options.secondaryOutput +# this includes the sequence: patSequence +# patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) + +pathPrefix=CMSSW_BASE+"/" +process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() +process.eleNewEnergiesProducer.regrEleFile=pathPrefix+process.eleNewEnergiesProducer.regrEleFile.value() +process.eleNewEnergiesProducer.regrEleFile_fra=pathPrefix+process.eleNewEnergiesProducer.regrEleFile_fra.value() +# process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2012Weights_V1.root") #eleEnergyRegWeights_WithSubClusters_VApr15.root") +process.eleRegressionEnergy.energyRegressionType=cms.uint32(2) +if(re.match("CMSSW_4_4_.*", CMSSW_VERSION)): + process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2011Weights_V1.root") +if(re.match("CMSSW_4_2_.*", CMSSW_VERSION)): + pathPrefix=CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' + print '[INFO] Using v2 regression for CMSSW_4_2_X' + process.eleNewEnergiesProducer.regrPhoFile=cms.string(pathPrefix+'data/gbrv2ph.root') + process.eleNewEnergiesProducer.regrEleFile=cms.string(pathPrefix+'data/gbrv2ele.root') + process.eleNewEnergiesProducer.regrEleFile_fra=cms.string('nocorrections') + #process.eleNewEnergiesProducer.regrEleFile_fra=cms.string(pathPrefix+'data/eleEnergyRegWeights_V1.root') + + +process.load('Calibration.ValueMapTraslator.valuemaptraslator_cfi') +process.sandboxRerecoSeq*=process.elPFIsoValueCharged03PFIdRecalib diff --git a/ALCARAW_RECO/python/eleIsoSequence_cff.py b/ALCARAW_RECO/python/eleIsoSequence_cff.py new file mode 100644 index 00000000000..a9ce27b1fec --- /dev/null +++ b/ALCARAW_RECO/python/eleIsoSequence_cff.py @@ -0,0 +1,127 @@ +#from RecoParticleFlow.PFProducer.electronPFIsolationValues_cff import * +#from CommonTools.ParticleFlow.PFBRECO_cff import * +from CommonTools.ParticleFlow.Isolation.tools_cfi import * +import FWCore.ParameterSet.Config as cms +#Now prepare the iso deposits +elPFIsoDepositChargedGsf=isoDepositReplace('gsfElectrons','pfAllChargedHadrons') +elPFIsoDepositChargedAllGsf=isoDepositReplace('gsfElectrons','pfAllChargedParticles') +elPFIsoDepositNeutralGsf=isoDepositReplace('gsfElectrons','pfAllNeutralHadrons') +elPFIsoDepositPUGsf=isoDepositReplace('gsfElectrons','pfPileUpAllChargedParticles') +#elPFIsoDepositGamma=isoDepositReplace('pfSelectedElectrons','pfAllPhotons') +elPFIsoDepositGammaGsf= cms.EDProducer("CandIsoDepositProducer", + src = cms.InputTag("gsfElectrons"), + MultipleDepositsFlag = cms.bool(False), + trackType = cms.string('candidate'), + ExtractorPSet = cms.PSet( + Diff_z = cms.double(99999.99), + ComponentName = cms.string('PFCandWithSuperClusterExtractor'), + DR_Max = cms.double(1.0), + Diff_r = cms.double(99999.99), + inputCandView = cms.InputTag("pfAllPhotons"), + DR_Veto = cms.double(0), + SCMatch_Veto = cms.bool(False), + MissHitSCMatch_Veto = cms.bool(True), + DepositLabel = cms.untracked.string('') + ) + ) + +# elPFIsoDepositChargedGsf= elPFIsoDepositCharged.clone() +# elPFIsoDepositChargedGsf.src = 'gsfElectrons' +# elPFIsoDepositChargedAllGsf = elPFIsoDepositChargedAll.clone() +# elPFIsoDepositChargedAllGsf.src = 'gsfElectrons' +# elPFIsoDepositNeutralGsf = elPFIsoDepositNeutral.clone() +# elPFIsoDepositNeutralGsf.src = 'gsfElectrons' +# elPFIsoDepositGammaGsf = elPFIsoDepositGamma.clone() +# elPFIsoDepositGammaGsf.src = 'gsfElectrons' +# elPFIsoDepositPUGsf = elPFIsoDepositPU.clone() +# elPFIsoDepositPUGsf.src = 'gsfElectrons' + +elPFIsoValueCharged03PFIdGsf = cms.EDProducer("PFCandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("elPFIsoDepositChargedGsf"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('EcalEndcaps:ConeVeto(0.015)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum'), + PivotCoordinatesForEBEE = cms.bool(True) + ) + ) + ) +elPFIsoValueChargedAll03PFIdGsf = cms.EDProducer("PFCandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("elPFIsoDepositChargedAllGsf"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('EcalEndcaps:ConeVeto(0.015)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum'), + PivotCoordinatesForEBEE = cms.bool(True) + ) + ) + ) + +elPFIsoValueGamma03PFIdGsf = cms.EDProducer("PFCandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("elPFIsoDepositGammaGsf"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('EcalEndcaps:ConeVeto(0.08)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum'), + PivotCoordinatesForEBEE = cms.bool(True) + ) + ) +) + +elPFIsoValueNeutral03PFIdGsf = cms.EDProducer("PFCandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("elPFIsoDepositNeutralGsf"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring(), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum'), + PivotCoordinatesForEBEE = cms.bool(True) + ) + ) + ) + +elPFIsoValuePU03PFIdGsf = cms.EDProducer("PFCandIsolatorFromDeposits", + deposits = cms.VPSet( + cms.PSet( + src = cms.InputTag("elPFIsoDepositPUGsf"), + deltaR = cms.double(0.3), + weight = cms.string('1'), + vetos = cms.vstring('EcalEndcaps:ConeVeto(0.015)'), + skipDefaultVeto = cms.bool(True), + mode = cms.string('sum'), + PivotCoordinatesForEBEE = cms.bool(True) + ) + ) + ) + + +# elPFIsoValueCharged03PFIdGsf = elPFIsoValueCharged03PFId.clone() +# #elPFIsoValueCharged03PFIdGsf.deposits[0].src = cms.InputTag(elPFIsoDepositChargedGsf) + +# elPFIsoValueChargedAll03PFIdGsf = elPFIsoValueChargedAll03PFId.clone() +# #elPFIsoValueChargedAll03PFIdGsf.deposits[0].src = cms.InputTag(elPFIsoDepositChargedAllGsf) + +# elPFIsoValueGamma03PFIdGsf = elPFIsoValueGamma03PFId.clone() +# #elPFIsoValueGamma03PFIdGsf.deposits[0].src = cms.InputTag(elPFIsoDepositGammaGsf) + + +# elPFIsoValueNeutral03PFIdGsf = elPFIsoValueNeutral03PFId.clone() +# #elPFIsoValueNeutral03PFIdGsf.deposits[0].src = cms.InputTag(elPFIsoDepositNeutralGsf) + +# elPFIsoValuePU03PFIdGsf = elPFIsoValuePU03PFId.clone() +# #elPFIsoValuePU03PFIdGsf.deposits[0].src = cms.InputTag(elPFIsoDepositPUGsf) + +eleIsoSequence = cms.Sequence((elPFIsoDepositChargedGsf + elPFIsoDepositChargedAllGsf + elPFIsoDepositNeutralGsf + elPFIsoDepositGammaGsf + elPFIsoDepositPUGsf)) +eleIsoSequence *= cms.Sequence(elPFIsoValueCharged03PFIdGsf+elPFIsoValueChargedAll03PFIdGsf+elPFIsoValueGamma03PFIdGsf+elPFIsoValueNeutral03PFIdGsf+elPFIsoValuePU03PFIdGsf ) +pfiso = cms.Sequence(eleIsoSequence) #pfParticleSelectionSequence + eleIsoSequence) diff --git a/ALCARAW_RECO/src/PUDumper.cc b/ALCARAW_RECO/src/PUDumper.cc index ec61614d5b0..cf9c3d5a4e5 100644 --- a/ALCARAW_RECO/src/PUDumper.cc +++ b/ALCARAW_RECO/src/PUDumper.cc @@ -39,7 +39,7 @@ void PUDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) // get the PU collection edm::Handle > PupInfo; if( !iEvent.isRealData() ){ - iEvent.getByLabel(edm::InputTag("addPileupInfo"), PupInfo); + iEvent.getByLabel(edm::InputTag("addPileupInfo"), PupInfo); ///\todo put it in the cfi! } else return; diff --git a/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py index 3805c1a5673..6d6a2b88714 100644 --- a/EleSelectionProducers/python/eleselectionproducers_cfi.py +++ b/EleSelectionProducers/python/eleselectionproducers_cfi.py @@ -8,8 +8,8 @@ vertexCollection = cms.InputTag('offlinePrimaryVertices'), conversionCollection = cms.InputTag('allConversions'), BeamSpotCollection = cms.InputTag('offlineBeamSpot'), - chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), - emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), - nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso') + chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), + emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), + nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdGsf') ) diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 02baac2fbbd..5c6456cfc35 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import * -from Configuration.StandardSequences.MagneticField_cff import * +#from Configuration.StandardSequences.MagneticField_cff import * #------------------------------ pattuple from Calibration.ZNtupleDumper.elePat_cfi import * From bebbda0d0908a788c30d8f5f593cb34921dc79ad Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 14 Jul 2013 18:50:52 +0200 Subject: [PATCH 057/475] reordered import and modules, renamed files and modules as in CMSSW --- .../ALCARECOEcalCalIsolElectron_Output_cff.py | 26 ++--- .../python/ALCARECOEcalCalIsolElectron_cff.py | 23 +++- ...LCARECOEcalUncalIsolElectron_Output_cff.py | 51 +++++++++ .../ALCARECOEcalUncalIsolElectron_cff.py | 25 +++++ ALCARAW_RECO/python/alcaSkimming.py | 101 +++++++++--------- ALCARAW_RECO/python/sandboxOutput_cff.py | 21 ---- ALCARAW_RECO/python/sandboxSeq_cff.py | 14 --- 7 files changed, 162 insertions(+), 99 deletions(-) create mode 100644 ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py create mode 100644 ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_cff.py delete mode 100644 ALCARAW_RECO/python/sandboxOutput_cff.py delete mode 100644 ALCARAW_RECO/python/sandboxSeq_cff.py diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index 2479f016a67..ed40b5d64f5 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -4,18 +4,24 @@ # output block for alcastream Electron OutALCARECOEcalCalElectron_specific = cms.untracked.vstring( + 'drop reco*Clusters_hfEMClusters_*_*', + 'drop reco*Clusters_pfPhotonTranslator_*_*', 'drop *EcalRecHit*_ecalRecHit_*_*', 'drop *EcalrecHit*_*ecalPreshowerRecHit*_*EcalRecHitsES*_*', 'drop *EcalRecHit*_reducedEcalRecHitsE*_*_*', 'keep *EcalRecHit*_alCaIsolatedElectrons_*_*', - 'keep *EcalRecHit*_reducedEcalRecHitsES_alCaRecHitsES_*' + 'keep *EcalRecHit*_reducedEcalRecHitsES_alCaRecHitsES_*', + 'drop *_*Unclean*_*_*', + 'drop *_*unclean*_*_*', + 'drop *_*_*Unclean*_*', + 'drop *_*_*unclean*_*', ) OutALCARECOEcalCalElectron_noDrop = cms.PSet( # put this if you have a filter -# SelectEvents = cms.untracked.PSet( -# SelectEvents = cms.vstring('pathALCARECOEcalCalElectron') -# ), + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron') + ), outputCommands = cms.untracked.vstring( 'keep *_pfMet_*_*', 'keep *_kt6PFJetsForRhoCorrection_rho_*', @@ -32,12 +38,6 @@ 'keep recoCaloClusters_*_*_*', 'keep recoSuperClusters_*_*_*', 'keep recoPreshowerCluster*_*_*_*', - 'drop reco*Clusters_hfEMClusters_*_*', - 'drop reco*Clusters_pfPhotonTranslator_*_*', - 'drop *_*Unclean*_*_*', - 'drop *_*unclean*_*_*', - 'drop *_*_*Unclean*_*', - 'drop *_*_*unclean*_*', #'keep *_*_*_HLT', #'keep *_generalTracks_*_*', #'keep reco*Track*Extra*_generalTracks_*_*', @@ -58,9 +58,9 @@ ) ) -OutALCARECOEcalCalElectron_noDrop.outputCommands+=OutALCARECOEcalCalElectron_specific - - import copy OutALCARECOEcalCalElectron=copy.deepcopy(OutALCARECOEcalCalElectron_noDrop) OutALCARECOEcalCalElectron.outputCommands.insert(0, "drop *") +OutALCARECOEcalCalElectron.outputCommands+=OutALCARECOEcalCalElectron_specific + + diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py index e3815142bbf..b8ce3b47acd 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py @@ -2,9 +2,30 @@ from Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi import * from Calibration.ALCARAW_RECO.AlCaElectronTracksReducer_cfi import * +from Calibration.ALCARAW_RECO.eleIsoSequence_cff import * + +from RecoJets.Configuration.RecoPFJets_cff import kt6PFJets +kt6PFJetsForRhoCorrection = kt6PFJets.clone(doRhoFastjet = True) +kt6PFJetsForRhoCorrection.Rho_EtaMax = cms.double(2.5) alcarecoEcalRecHitReducerSeq = cms.Sequence(alCaIsolatedElectrons) alcarecoElectronTracksReducerSeq = cms.Sequence(alcaElectronTracksReducer) -seqALCARECOEcalCalElectronRECO = cms.Sequence(alCaIsolatedElectrons + alcaElectronTracksReducer) + +seqALCARECOEcalCalElectronRECO = cms.Sequence( alCaIsolatedElectrons) + +ALCARECOEcalCalElectronPreSeq = cms.Sequence( kt6PFJetsForRhoCorrection + + alcaElectronTracksReducer + + pfiso ) + +seqALCARECOEcalCalElectron = cms.Sequence( ALCARECOEcalCalElectronPreSeq + + seqALCARECOEcalCalElectronRECO + ) + + +############################################### FINAL SEQUENCES +#seqALCARECOEcalCalZElectron = cms.Sequence( ZSkimSeq * seqALCARECOEcalCalElectron) +#seqALCARECOEcalCalWElectron = cms.Sequence( WSkimSeq * seqALCARECOEcalCalElectron) +#seqALCARECOEcalCalZSCElectron = cms.Sequence( ZSCSkimSeq * seqALCARECOEcalCalElectron) + diff --git a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py new file mode 100644 index 00000000000..3ae6c946840 --- /dev/null +++ b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py @@ -0,0 +1,51 @@ +import FWCore.ParameterSet.Config as cms +from Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff import * +import copy + +OutALCARECOEcalUncalElectron_noDrop=copy.deepcopy(OutALCARECOEcalCalElectron_noDrop) +OutALCARECOEcalUncalElectron_noDrop.outputCommands+=cms.untracked.vstring( + 'keep *EcalTriggerPrimitiveDigi*_ecalDigis_*_*', + 'keep *_ecalGlobalUncalibRecHit_*_*', + 'keep *_ecalPreshowerDigis_*_*', + 'keep *_ecalDetIdToBeRecovered_*_*', + 'keep reco*Clusters_pfElectronTranslator_*_*' + ) + +OutALCARECOEcalUncalElectron=copy.deepcopy(OutALCARECOEcalUncalElectron_noDrop) +OutALCARECOEcalUncalElectron.outputCommands.insert(0, "drop *") +OutALCARECOEcalUncalElectron.outputCommands += cms.untracked.vstring( + 'drop recoCaloClusters_*_*_*', + 'drop recoSuperClusters_*_*_*', + 'drop recoPreshowerCluster*_*_*_*', + 'drop *EcalRecHit*_reducedEcalRecHitsES*_*_*', + ) + +OutALCARECOEcalUncalElectron.SelectEvents = cms.untracked.PSet( + #SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron', 'pathALCARECOEcalUncalWElectron') + SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron') + ) + + + +# OutALCARECOEcalUncalElectron = copy.deepcopy(OutALCARECOEcalCalElectron) +# OutALCARECOEcalUncalElectron.outputCommands +=OutALCARECOEcalUncalElectronOutputCommands + +# OutALCARECOEcalUncalElectronOutputCommands = cms.untracked.vstring( [ +# # 'drop *_TriggerResults_*_RECO', +# # 'keep *_TriggerResults_*_*', +# # 'keep recoGsfElectrons_gsfElectrons_*_RECO', +# # 'keep recoGsfElectronCores_gsfElectronCores_*_RECO', +# 'keep *EcalTriggerPrimitiveDigi*_ecalDigis_*_*', +# 'keep *_ecalGlobalUncalibRecHit_*_*', +# 'keep *_ecalPreshowerDigis_*_*', +# 'keep *_ecalDetIdToBeRecovered_*_*', +# # these are not recreated +# 'keep reco*Clusters_pfElectronTranslator_*_*', + +# # this are recreated, so they are not needed at this step +# 'drop recoCaloClusters_*_*_*', +# 'drop recoSuperClusters_*_*_*', +# 'drop recoPreshowerCluster*_*_*_*', +# 'drop *EcalRecHit*_reducedEcalRecHitsES*_*_*', +# # keep the new alca track collections +# ] ) diff --git a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_cff.py new file mode 100644 index 00000000000..d247604fbbe --- /dev/null +++ b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_cff.py @@ -0,0 +1,25 @@ +import FWCore.ParameterSet.Config as cms + +#restarting from ECAL RAW to reconstruct amplitudes and energies +# create uncalib recHit collections +from Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff import * +from Configuration.StandardSequences.RawToDigi_Data_cff import * +from RecoLocalCalo.Configuration.RecoLocalCalo_cff import * +ecalUncalibRecHitSequence = cms.Sequence(ecalGlobalUncalibRecHit * ecalDetIdToBeRecovered) + +uncalibRecHitSeq = cms.Sequence( (ecalDigis + ecalPreshowerDigis) * ecalUncalibRecHitSequence) + +seqALCARECOEcalUncalElectron = cms.Sequence( uncalibRecHitSeq ) + +############################################### FINAL SEQUENCES +#seqALCARECOEcalUncalZElectron = cms.Sequence( ZSkimSeq * +# (seqALCARECOEcalUncalElectron + ALCARECOEcalCalElectronPreSeq) +# ) +#seqALCARECOEcalUncalZSCElectron = cms.Sequence( ZSCSkimSeq * +# (seqALCARECOEcalUncalElectron + ALCARECOEcalCalElectronPreSeq) +# ) +#seqALCARECOEcalUncalWElectron = cms.Sequence( WSkimSeq * +# (seqALCARECOEcalUncalElectron + ALCARECOEcalCalElectronPreSeq) +# ) + + diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 2f346bea9a5..0ca0267b003 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -72,7 +72,7 @@ if(options.type=="ALCARAW"): print "[ERROR] no skim selected" # sys.exit(-1) - + doTreeOnly=False if(options.doTree>0 and options.doTreeOnly==1): @@ -132,15 +132,15 @@ # import of ALCARECO sequences process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') -from Calibration.ALCARAW_RECO.sandboxOutput_cff import * +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalUncalIsolElectron_Output_cff') from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * #process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') # this is for official ALCARAW ALCARECO production process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') # reduction of recHits process.load("Calibration.ALCARAW_RECO.PUDumper_cfi") -process.load('Calibration.ALCARAW_RECO.sandboxSeq_cff') # ALCARAW +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalUncalIsolElectron_cff') # ALCARAW # this module provides: -#process.sandboxSeq = uncalibRecHitSeq +#process.seqALCARECOEcalUncalElectron = uncalibRecHitSeq process.load('Calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') # ALCARERECO # this module provides: # process.electronRecoSeq @@ -148,12 +148,7 @@ # process.sandboxRerecoSeq = (electronRecoSeq * electronClusteringSeq) # Tree production -process.load('Calibration.ZNtupleDumper.patSequence_cff') -process.load("Calibration.ZNtupleDumper.zntupledumper_cfi") -process.load("Calibration.JsonFilter.jsonFilter_cfi") - -# I want to reduce the recHit collections to save space: alcareco -process.load('Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') +process.load('Calibration.ZNtupleDumper.ntupledumper_cff') # ntuple # added by Shervin for ES recHits (saved as in AOD): large window 15x3 (strip x row) @@ -290,13 +285,14 @@ ############################### # Event filter sequence: process.filterSeq -# sanbox sequence: process.sandboxSeq + process.alcarecoElectronTracksReducerSeq +# sanbox sequence: process.seqALCARECOEcalUncalElectron + process.alcarecoElectronTracksReducerSeq # sandbox rereco sequence: process.sandboxRerecoSeq # alcareco event reduction: process.alcarecoSeq # ################################# FILTERING EVENTS +process.PUDumperSeq = cms.Sequence() process.filterSeq = cms.Sequence() #process.load('Calibration.ALCARAW_RECO.trackerDrivenFinder_cff') if(MC): @@ -305,22 +301,19 @@ "TFileService", fileName = cms.string("PUDumper.root") ) - process.filterSeq *= process.PUDumper + process.PUDumperSeq *= process.PUDumper - -if (ZSkim): - process.load('Calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') - process.filterSeq *= process.ZeeFilterSeq -elif (WSkim): - process.load("DPGAnalysis.Skims.WElectronSkim_cff") - process.filterSeq *= process.elecMetSeq -elif(options.skim=="EleSkim"): - process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", - src = cms.InputTag("gsfElectrons"), - minNumber = cms.uint32(1) - ) - process.filterSeq *= process.MinEleNumberFilter - +process.load('Calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') +#process.filterSeq *= process.ZeeFilterSeq +process.load("DPGAnalysis.Skims.WElectronSkim_cff") +#process.filterSeq *= process.elecMetSeq +process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", + src = cms.InputTag("gsfElectrons"), + minNumber = cms.uint32(1) + ) +if(options.skim=="" or options.skim=="none" or options.skim=="no"): + process.ZeeFilterSeq = cms.Sequence(process.MinEleNumberFilter) + process.elecMetSeq = cms.Sequence(process.MinEleNumberFilter) if (HLTFilter): import copy @@ -351,7 +344,7 @@ #============================== #Define the sequences -process.alcarecoSeq = cms.Sequence(process.alCaIsolatedElectrons) # + process.alcaElectronTracksReducer) +process.alcarecoSeq = process.seqALCARECOEcalCalElectronRECO if(options.type=="ALCARERECO"): # in ALCARECO production starting from AOD or RECO the ES recHits are reduced process.alcarecoSeq += process.reducedEcalRecHitsES @@ -369,16 +362,13 @@ else: process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * process.alcarecoSeq) -process.load('Calibration.ALCARAW_RECO.eleIsoSequence_cff') -process.load('RecoJets.Configuration.RecoPFJets_cff') -process.kt6PFJetsForRhoCorrection = process.kt6PFJets.clone(doRhoFastjet = True) -process.kt6PFJetsForRhoCorrection.Rho_EtaMax = cms.double(2.5) +process.rhoFastJetSeq = cms.Sequence() if((not options.type=="ALCARERECO") ): if(options.skim!="fromWSkim"): - process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection * process.pfiso) + process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection) else: - process.rhoFastJetSeq = cms.Sequence(process.pfiso) + process.rhoFastJetSeq = cms.Sequence() if(MC): @@ -394,13 +384,9 @@ process.zNtupleDumper.doEleIDTree=cms.bool(True) - - - - -process.OutALCARECOEcalUncalElectron = copy.deepcopy(process.OutALCARECOEcalCalElectron) -process.OutALCARECOEcalUncalElectron.outputCommands +=sandboxOutputCommands - +############################################################ +# OUTPUT MODULES +############################## fileName = cms.untracked.string(options.output) process.outputALCARAW = cms.OutputModule("PoolOutputModule", @@ -409,7 +395,7 @@ outputCommands = process.OutALCARECOEcalUncalElectron.outputCommands, #fileName = fileName, fileName = cms.untracked.string('alcaraw.root'), - SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('ZALCARAWPath')), + SelectEvents = process.OutALCARECOEcalUncalElectron.SelectEvents, dataset = cms.untracked.PSet( filterName = cms.untracked.string(''), dataTier = cms.untracked.string('ALCARECO') @@ -421,7 +407,7 @@ maxSize = cms.untracked.int32(5120000), outputCommands = process.OutALCARECOEcalCalElectron.outputCommands, fileName = cms.untracked.string('alcareco.root'), - SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('ZALCARECOPath')), + SelectEvents = process.OutALCARECOEcalCalElectron.SelectEvents, dataset = cms.untracked.PSet( filterName = cms.untracked.string(''), dataTier = cms.untracked.string('ALCARECO') @@ -440,13 +426,22 @@ process.L1Reco_step = cms.Path(process.L1Reco) process.reconstruction_step = cms.Path(process.reconstruction) process.endjob_step = cms.EndPath(process.endOfProcess) - -process.ZALCARAWPath = cms.Path( process.filterSeq * - (process.rhoFastJetSeq + process.alcarecoElectronTracksReducerSeq + - process.sandboxSeq )) +# ALCARAW +process.pathALCARECOEcalUncalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * + (process.ALCARECOEcalCalElectronPreSeq + + process.seqALCARECOEcalUncalElectron )) +process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.elecMetSeq * + (process.ALCARECOEcalCalElectronPreSeq + + process.seqALCARECOEcalUncalElectron )) +# ALCARERECO process.ZALCARERECOPath = cms.Path(process.alcarerecoSeq) +# ALCARECO +process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * + process.seqALCARECOEcalCalElectron) +process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.elecMetSeq * + process.seqALCARECOEcalCalElectron) + process.NtuplePath = cms.Path(process.filterSeq * process.ntupleSeq) -process.ZALCARECOPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) @@ -485,14 +480,20 @@ process.source.lumisToProcess.extend(myLumis) - +############################################################ # Schedule definition +############################## if(options.type=='ALCARAW'): - process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step, process.ZALCARAWPath, process.ALCARAWoutput_step, process.ZALCARECOPath, process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules + process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step, + process.reconstruction_step,process.endjob_step, + process.pathALCARECOEcalUncalZElectron, process.pathALCARECOEcalUncalWElectron, + process.ALCARAWoutput_step, + process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules elif(options.type=='ALCARERECO'): process.schedule = cms.Schedule(process.ZALCARERECOPath, process.ALCARECOoutput_step) # add ntuple else: - process.schedule = cms.Schedule(process.ZALCARECOPath, process.ALCARECOoutput_step) # add ntuple + process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.ALCARECOoutput_step) # add ntuple diff --git a/ALCARAW_RECO/python/sandboxOutput_cff.py b/ALCARAW_RECO/python/sandboxOutput_cff.py deleted file mode 100644 index 351648a5cd3..00000000000 --- a/ALCARAW_RECO/python/sandboxOutput_cff.py +++ /dev/null @@ -1,21 +0,0 @@ -import FWCore.ParameterSet.Config as cms - - -sandboxOutputCommands = cms.untracked.vstring( [ -# 'drop *_TriggerResults_*_RECO', -# 'keep *_TriggerResults_*_*', -# 'keep recoGsfElectrons_gsfElectrons_*_RECO', -# 'keep recoGsfElectronCores_gsfElectronCores_*_RECO', - 'keep *EcalTriggerPrimitiveDigi*_ecalDigis_*_*', - 'keep *_ecalGlobalUncalibRecHit_*_*', - 'keep *_ecalPreshowerDigis_*_*', - 'keep *_ecalDetIdToBeRecovered_*_*', -# this are recreated, so they are not needed at this step - 'drop recoCaloClusters_*_*_*', - 'drop recoSuperClusters_*_*_*', - 'drop recoPreshowerCluster*_*_*_*', - 'drop *EcalRecHit*_reducedEcalRecHitsES*_*_*', - # these are not recreated - 'keep reco*Clusters_pfElectronTranslator_*_*', - # keep the new alca track collections - ] ) diff --git a/ALCARAW_RECO/python/sandboxSeq_cff.py b/ALCARAW_RECO/python/sandboxSeq_cff.py deleted file mode 100644 index 3a5f0bbb697..00000000000 --- a/ALCARAW_RECO/python/sandboxSeq_cff.py +++ /dev/null @@ -1,14 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -#restarting from ECAL RAW to reconstruct amplitudes and energies -# create uncalib recHit collections -from Configuration.StandardSequences.RawToDigi_Data_cff import * -from RecoLocalCalo.Configuration.RecoLocalCalo_cff import * -ecalUncalibRecHitSequence = cms.Sequence(ecalGlobalUncalibRecHit * ecalDetIdToBeRecovered) - -#process.ecalRecHit.laserCorrection=cms.bool(ApplyLaser) -# can add a flag for ICs? -#no switch in standard recHit producer to apply new interCalibration. -uncalibRecHitSeq = cms.Sequence( (ecalDigis + ecalPreshowerDigis) * ecalUncalibRecHitSequence) - -sandboxSeq = uncalibRecHitSeq From 469b8d1ecb797313aeb7d6f7b4ecf4c6fc8e2bf9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 14 Jul 2013 18:51:15 +0200 Subject: [PATCH 058/475] added ValueMapTraslator for the rereco --- ValueMapTraslator/BuildFile.xml | 7 + .../python/valuemaptraslator_cfi.py | 8 + ValueMapTraslator/src/ValueMapTraslator.cc | 175 ++++++++++++++++++ ValueMapTraslator/valuemaptraslator_cfg.py | 26 +++ 4 files changed, 216 insertions(+) create mode 100644 ValueMapTraslator/BuildFile.xml create mode 100644 ValueMapTraslator/python/valuemaptraslator_cfi.py create mode 100644 ValueMapTraslator/src/ValueMapTraslator.cc create mode 100644 ValueMapTraslator/valuemaptraslator_cfg.py diff --git a/ValueMapTraslator/BuildFile.xml b/ValueMapTraslator/BuildFile.xml new file mode 100644 index 00000000000..e18030de98b --- /dev/null +++ b/ValueMapTraslator/BuildFile.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py new file mode 100644 index 00000000000..e854257d72c --- /dev/null +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', + inputCollection = cms.InputTag('elPFIsoValueCharged03PFId'), + outputCollection = cms.untracked.string(''), + referenceCollection = cms.InputTag('electronRecalibSCAssociator') + ) + diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc new file mode 100644 index 00000000000..b6547864978 --- /dev/null +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -0,0 +1,175 @@ +// -*- C++ -*- +// +// Package: ValueMapTraslator +// Class: ValueMapTraslator +// +/**\class ValueMapTraslator ValueMapTraslator.cc Calibration/ValueMapTraslator/src/ValueMapTraslator.cc + + Description: [one line class summary] + + Implementation: + [Notes on implementation] +*/ +// +// Original Author: Shervin Nourbakhsh,32 4-C03,+41227672087, +// Created: Sat Jul 13 15:40:56 CEST 2013 +// $Id$ +// +// + + +// system include files +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDProducer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" + +// +// class declaration +// + +class ValueMapTraslator : public edm::EDProducer { + typedef double value_t; + typedef edm::ValueMap Map_t; + + public: + explicit ValueMapTraslator(const edm::ParameterSet&); + ~ValueMapTraslator(); + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + private: + virtual void beginJob() ; + virtual void produce(edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + + virtual void beginRun(edm::Run&, edm::EventSetup const&); + virtual void endRun(edm::Run&, edm::EventSetup const&); + virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + + // ----------member data --------------------------- + edm::InputTag referenceCollectionTAG; + edm::InputTag inputCollectionTAG; + std::string outputCollectionName; + edm::Handle referenceHandle; + edm::Handle inputHandle; +}; + +// +// constants, enums and typedefs +// + + +// +// static data member definitions +// + +// +// constructors and destructor +// +ValueMapTraslator::ValueMapTraslator(const edm::ParameterSet& iConfig): + referenceCollectionTAG(iConfig.getParameter("referenceCollection")), + inputCollectionTAG(iConfig.getParameter("inputCollection")), + outputCollectionName(iConfig.getParameter("outputCollection")) +{ + //now do what ever other initialization is needed + /// \todo outputCollectionName = inputCollection+postfix + produces< Map_t >(outputCollectionName); + +} + + +ValueMapTraslator::~ValueMapTraslator() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to produce the data ------------ +void +ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + std::vector valueVector; + std::auto_ptr valueVectorPtr(new Map_t()); + + //------------------------------ + iEvent.getByLabel(referenceCollectionTAG, referenceHandle); + iEvent.getByLabel(inputCollectionTAG, inputHandle); + + for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); + valueMap_itr != inputHandle->end(); + valueMap_itr++){ + } + Map_t::Filler filler(*valueVectorPtr); + filler.insert(referenceHandle, valueVector.begin(), valueVector.end()); + filler.fill(); + + iEvent.put(valueVectorPtr); + +} + +// ------------ method called once each job just before starting event loop ------------ +void +ValueMapTraslator::beginJob() +{ +} + +// ------------ method called once each job just after ending the event loop ------------ +void +ValueMapTraslator::endJob() { +} + +// ------------ method called when starting to processes a run ------------ +void +ValueMapTraslator::beginRun(edm::Run&, edm::EventSetup const&) +{ +} + +// ------------ method called when ending the processing of a run ------------ +void +ValueMapTraslator::endRun(edm::Run&, edm::EventSetup const&) +{ +} + +// ------------ method called when starting to processes a luminosity block ------------ +void +ValueMapTraslator::beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) +{ +} + +// ------------ method called when ending the processing of a luminosity block ------------ +void +ValueMapTraslator::endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) +{ +} + +// ------------ method fills 'descriptions' with the allowed parameters for the module ------------ +void +ValueMapTraslator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + //The following says we do not know what parameters are allowed so do no validation + // Please change this to state exactly what you do use, even if it is no parameters + edm::ParameterSetDescription desc; + desc.setUnknown(); + descriptions.addDefault(desc); +} + +//define this as a plug-in +DEFINE_FWK_MODULE(ValueMapTraslator); diff --git a/ValueMapTraslator/valuemaptraslator_cfg.py b/ValueMapTraslator/valuemaptraslator_cfg.py new file mode 100644 index 00000000000..58f3adea002 --- /dev/null +++ b/ValueMapTraslator/valuemaptraslator_cfg.py @@ -0,0 +1,26 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("OWNPARTICLES") + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + # replace 'myfile.root' with the source file you want to use + fileNames = cms.untracked.vstring( + 'file:myfile.root' + ) +) + +process.myProducerLabel = cms.EDProducer('ValueMapTraslator' +) + +process.out = cms.OutputModule("PoolOutputModule", + fileName = cms.untracked.string('myOutputFile.root') +) + + +process.p = cms.Path(process.myProducerLabel) + +process.e = cms.EndPath(process.out) From c14e58d523abbb913cd96049e5488962fe866d62 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 15 Jul 2013 12:25:27 +0200 Subject: [PATCH 059/475] fixed alcaraw, alcareco, alcarereco production, ntuple from alcarereco to be fixed --- .../ALCARECOEcalCalIsolElectron_Output_cff.py | 13 +-- ...LCARECOEcalUncalIsolElectron_Output_cff.py | 2 +- ALCARAW_RECO/python/alcaSkimming.py | 102 ++++++++++++------ .../python/valuemaptraslator_cfi.py | 15 ++- ValueMapTraslator/src/ValueMapTraslator.cc | 20 +++- ZNtupleDumper/python/ntupledumper_cff.py | 5 + 6 files changed, 112 insertions(+), 45 deletions(-) create mode 100644 ZNtupleDumper/python/ntupledumper_cff.py diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index ed40b5d64f5..51a95f8bc80 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -3,7 +3,7 @@ # output block for alcastream Electron -OutALCARECOEcalCalElectron_specific = cms.untracked.vstring( +OutALCARECOEcalCalElectron_specific_ = cms.untracked.vstring( 'drop reco*Clusters_hfEMClusters_*_*', 'drop reco*Clusters_pfPhotonTranslator_*_*', 'drop *EcalRecHit*_ecalRecHit_*_*', @@ -14,10 +14,10 @@ 'drop *_*Unclean*_*_*', 'drop *_*unclean*_*_*', 'drop *_*_*Unclean*_*', - 'drop *_*_*unclean*_*', + 'drop *_*_*unclean*_*' ) -OutALCARECOEcalCalElectron_noDrop = cms.PSet( +OutALCARECOEcalCalElectron_noDrop_ = cms.PSet( # put this if you have a filter SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron') @@ -38,6 +38,7 @@ 'keep recoCaloClusters_*_*_*', 'keep recoSuperClusters_*_*_*', 'keep recoPreshowerCluster*_*_*_*', + 'keep *_pfElectronTranslator_*_*', #'keep *_*_*_HLT', #'keep *_generalTracks_*_*', #'keep reco*Track*Extra*_generalTracks_*_*', @@ -59,8 +60,8 @@ ) import copy -OutALCARECOEcalCalElectron=copy.deepcopy(OutALCARECOEcalCalElectron_noDrop) -OutALCARECOEcalCalElectron.outputCommands.insert(0, "drop *") -OutALCARECOEcalCalElectron.outputCommands+=OutALCARECOEcalCalElectron_specific +OutALCARECOEcalCalElectron_=copy.deepcopy(OutALCARECOEcalCalElectron_noDrop_) +OutALCARECOEcalCalElectron_.outputCommands.insert(0, "drop *") +OutALCARECOEcalCalElectron_.outputCommands+=OutALCARECOEcalCalElectron_specific_ diff --git a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py index 3ae6c946840..5a8a200039e 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py @@ -2,7 +2,7 @@ from Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff import * import copy -OutALCARECOEcalUncalElectron_noDrop=copy.deepcopy(OutALCARECOEcalCalElectron_noDrop) +OutALCARECOEcalUncalElectron_noDrop=copy.deepcopy(OutALCARECOEcalCalElectron_noDrop_) OutALCARECOEcalUncalElectron_noDrop.outputCommands+=cms.untracked.vstring( 'keep *EcalTriggerPrimitiveDigi*_ecalDigis_*_*', 'keep *_ecalGlobalUncalibRecHit_*_*', diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 0ca0267b003..e6b9d738545 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -405,17 +405,42 @@ process.outputALCARECO = cms.OutputModule("PoolOutputModule", # after 5 GB split the file maxSize = cms.untracked.int32(5120000), - outputCommands = process.OutALCARECOEcalCalElectron.outputCommands, - fileName = cms.untracked.string('alcareco.root'), + outputCommands = process.OutALCARECOEcalCalElectron_.outputCommands, + fileName = cms.untracked.string('alcarereco.root'), SelectEvents = process.OutALCARECOEcalCalElectron.SelectEvents, dataset = cms.untracked.PSet( filterName = cms.untracked.string(''), dataTier = cms.untracked.string('ALCARECO') ) ) +process.outputALCARERECO = cms.OutputModule("PoolOutputModule", + # after 5 GB split the file + maxSize = cms.untracked.int32(5120000), + outputCommands = process.OutALCARECOEcalCalElectron_.outputCommands, + fileName = cms.untracked.string('alcarereco.root'), + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARERECOEcalCalElectron') + ), + dataset = cms.untracked.PSet( + filterName = cms.untracked.string(''), + dataTier = cms.untracked.string('ALCARECO') + ) + ) + +process.outputRECO = cms.OutputModule("PoolOutputModule", + # after 5 GB split the file + maxSize = cms.untracked.int32(5120000), + outputCommands = cms.untracked.vstring('keep *'), + fileName = cms.untracked.string('RECO.root'), + SelectEvents = process.OutALCARECOEcalCalElectron.SelectEvents, + dataset = cms.untracked.PSet( + filterName = cms.untracked.string(''), + dataTier = cms.untracked.string('RECO') + ) + ) #print "OUTPUTCOMMANDS" -#print process.output.outputCommands +print process.outputALCARECO.outputCommands @@ -426,6 +451,7 @@ process.L1Reco_step = cms.Path(process.L1Reco) process.reconstruction_step = cms.Path(process.reconstruction) process.endjob_step = cms.EndPath(process.endOfProcess) +#process.endjob_step*=process.outputRECO # ALCARAW process.pathALCARECOEcalUncalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * (process.ALCARECOEcalCalElectronPreSeq + @@ -434,7 +460,7 @@ (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) # ALCARERECO -process.ZALCARERECOPath = cms.Path(process.alcarerecoSeq) +process.pathALCARERECOEcalCalElectron = cms.Path(process.alcarerecoSeq) # ALCARECO process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * process.seqALCARECOEcalCalElectron) @@ -444,6 +470,7 @@ process.NtuplePath = cms.Path(process.filterSeq * process.ntupleSeq) process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) +process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) @@ -454,6 +481,34 @@ #process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE") process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits") process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits") +if(options.type=="ALCARERECO"): + process.ecalRecHit.EBuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEB") + process.ecalRecHit.EEuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEE") + + process.correctedHybridSuperClusters.corectedSuperClusterCollection = 'recalibSC' + process.correctedMulti5x5SuperClustersWithPreshower.corectedSuperClusterCollection = 'endcapRecalibSC' + if(re.match("CMSSW_5_.*",CMSSW_VERSION) or re.match("CMSSW_6_.*", CMSSW_VERSION)): + process.multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" + + # in sandboxRereco + process.reducedEcalRecHitsES.EndcapSuperClusterCollection= cms.InputTag('correctedMulti5x5SuperClustersWithPreshower','endcapRecalibSC',processName) + + process.alCaIsolatedElectrons.electronLabel = cms.InputTag("electronRecalibSCAssociator") + process.alCaIsolatedElectrons.ebRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB") + process.alCaIsolatedElectrons.eeRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE") + + process.eleRegressionEnergy.inputElectronsTag = cms.InputTag('electronRecalibSCAssociator') + process.eleSelectionProducers.electronCollection = 'electronRecalibSCAssociator' + process.eleNewEnergiesProducer.electronCollection = 'electronRecalibSCAssociator' + process.patElectrons.electronSource = 'electronRecalibSCAssociator' + process.eleSelectionProducers.chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdRecalib') + process.eleSelectionProducers.emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdRecalib') + process.eleSelectionProducers.nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdRecalib') + + process.outputALCARECO.outputCommands += sandboxRerecoOutputCommands + process.outputALCARECO.fileName=cms.untracked.string('alcarereco.root') + print process.outputALCARECO.outputCommands + print process.patElectrons.electronSource process.patElectrons.reducedBarrelRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEB process.patElectrons.reducedEndcapRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEE process.zNtupleDumper.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB @@ -485,45 +540,20 @@ ############################## if(options.type=='ALCARAW'): process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step, - process.reconstruction_step,process.endjob_step, + process.reconstruction_step,process.endjob_step, process.pathALCARECOEcalUncalZElectron, process.pathALCARECOEcalUncalWElectron, process.ALCARAWoutput_step, process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules elif(options.type=='ALCARERECO'): - process.schedule = cms.Schedule(process.ZALCARERECOPath, process.ALCARECOoutput_step) # add ntuple -else: - process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.ALCARECOoutput_step) # add ntuple - - - - -if(options.type=="ALCARERECO"): - process.ecalRecHit.EBuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEB") - process.ecalRecHit.EEuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEE") - - process.correctedHybridSuperClusters.corectedSuperClusterCollection = 'recalibSC' - process.correctedMulti5x5SuperClustersWithPreshower.corectedSuperClusterCollection = 'endcapRecalibSC' - if(re.match("CMSSW_5_.*",CMSSW_VERSION) or re.match("CMSSW_6_.*", CMSSW_VERSION)): - process.multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" + process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, process.NtuplePath) +elif(options.type=='ALCARECO'): + process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.ALCARECOoutput_step, process.NtuplePath + ) # fix the output modules - # in sandboxRereco - process.reducedEcalRecHitsES.EndcapSuperClusterCollection= cms.InputTag('correctedMulti5x5SuperClustersWithPreshower','endcapRecalibSC',processName) - - process.alCaIsolatedElectrons.electronLabel = cms.InputTag("electronRecalibSCAssociator") - process.alCaIsolatedElectrons.ebRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB") - process.alCaIsolatedElectrons.eeRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE") - process.eleRegressionEnergy.inputElectronsTag = cms.InputTag('electronRecalibSCAssociator') - process.eleSelectionProducers.electronCollection = 'electronRecalibSCAssociator' - process.eleNewEnergiesProducer.electronCollection = 'electronRecalibSCAssociator' - process.patElectrons.electronSource = 'electronRecalibSCAssociator' - process.OutALCARECOEcalCalElectron.outputCommands += sandboxRerecoOutputCommands - process.outputALCARECO.fileName=cms.untracked.string('alcarereco.root') - -process.zNtupleDumper.recHitCollectionEB = process.patElectrons.reducedBarrelRecHitCollection.value() -process.zNtupleDumper.recHitCollectionEE = process.patElectrons.reducedEndcapRecHitCollection.value() process.zNtupleDumper.foutName=options.secondaryOutput @@ -549,3 +579,5 @@ process.load('Calibration.ValueMapTraslator.valuemaptraslator_cfi') process.sandboxRerecoSeq*=process.elPFIsoValueCharged03PFIdRecalib +process.sandboxRerecoSeq*=process.elPFIsoValueGamma03PFIdRecalib +process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index e854257d72c..2669c984642 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -1,8 +1,19 @@ import FWCore.ParameterSet.Config as cms elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueCharged03PFId'), - outputCollection = cms.untracked.string(''), + inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), + outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) +elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', + inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), + outputCollection = cms.string(''), + referenceCollection = cms.InputTag('electronRecalibSCAssociator') + ) + +elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', + inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdGsf'), + outputCollection = cms.string(''), + referenceCollection = cms.InputTag('electronRecalibSCAssociator') + ) diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index b6547864978..54868145ee3 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -33,6 +33,7 @@ #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" +//#define DEBUG // // class declaration // @@ -113,11 +114,28 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) //------------------------------ iEvent.getByLabel(referenceCollectionTAG, referenceHandle); iEvent.getByLabel(inputCollectionTAG, inputHandle); - + for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); valueMap_itr != inputHandle->end(); valueMap_itr++){ + for(unsigned int i = 0; i < valueMap_itr.size(); i++){ +#ifdef DEBUG + std::cout << valueMap_itr[i] << std::endl; +#endif + valueVector.push_back((valueMap_itr[i])); //valueMap_itr-inputHandle->begin()])); + } + } + +#ifdef DEBUG + std::cout << "Size: " << referenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; + + for(reco::GsfElectronCollection::const_iterator electron = referenceHandle->begin(); + electron!= referenceHandle->end(); + electron++){ + reco::GsfElectronRef eleRef(referenceHandle, electron-referenceHandle->begin()); + std::cout << (*inputHandle)[eleRef] << std::endl; } +#endif Map_t::Filler filler(*valueVectorPtr); filler.insert(referenceHandle, valueVector.begin(), valueVector.end()); filler.fill(); diff --git a/ZNtupleDumper/python/ntupledumper_cff.py b/ZNtupleDumper/python/ntupledumper_cff.py new file mode 100644 index 00000000000..98490dc0c7e --- /dev/null +++ b/ZNtupleDumper/python/ntupledumper_cff.py @@ -0,0 +1,5 @@ +from Calibration.ZNtupleDumper.patSequence_cff import * +from Calibration.ZNtupleDumper.zntupledumper_cfi import * +from Calibration.JsonFilter.jsonFilter_cfi import * + + From 53682b9235bc7c5498af70bce3c471387c291fd9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 15 Jul 2013 22:17:28 +0200 Subject: [PATCH 060/475] all fixed --- ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py | 1 + ZNtupleDumper/python/elePat_cfi.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py index 5a8a200039e..0fbec1419d8 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py @@ -18,6 +18,7 @@ 'drop recoSuperClusters_*_*_*', 'drop recoPreshowerCluster*_*_*_*', 'drop *EcalRecHit*_reducedEcalRecHitsES*_*_*', + 'keep reco*Clusters_pfElectronTranslator_*_*' ) OutALCARECOEcalUncalElectron.SelectEvents = cms.untracked.PSet( diff --git a/ZNtupleDumper/python/elePat_cfi.py b/ZNtupleDumper/python/elePat_cfi.py index 18b82d47dd7..6862d79f72c 100644 --- a/ZNtupleDumper/python/elePat_cfi.py +++ b/ZNtupleDumper/python/elePat_cfi.py @@ -13,7 +13,7 @@ patElectrons.reducedBarrelRecHitCollection = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits") patElectrons.reducedEndcapRecHitCollection = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits") patElectrons.embedPFCandidate = cms.bool(True) ## embed in AOD externally stored particle flow candidate -patElectrons.embedTrack = cms.bool(False) ## embed in AOD externally stored track (note: gsf electrons don't have a track) +patElectrons.embedTrack = cms.bool(False) ## embed in AOD externally stored track (note: gsf electrons don't have a track), make it point to reducedtrack collection # #------------------------------ trigger information producer From 14d2d08e1c59d3c89c4bb43ec99f2044c8777301 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 16 Jul 2013 16:53:21 +0200 Subject: [PATCH 061/475] skims fixed and added in one file --- ALCARAW_RECO/doc/README | 4 + ALCARAW_RECO/python/WZElectronSkims_cff.py | 148 ++++++++++++++++++ .../python/ZElectronSkimSandbox_cff.py | 60 ------- ALCARAW_RECO/python/alcaSkimming.py | 35 +++-- 4 files changed, 176 insertions(+), 71 deletions(-) create mode 100644 ALCARAW_RECO/python/WZElectronSkims_cff.py delete mode 100644 ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py diff --git a/ALCARAW_RECO/doc/README b/ALCARAW_RECO/doc/README index 5e24ee421c2..8b4268a1a7a 100644 --- a/ALCARAW_RECO/doc/README +++ b/ALCARAW_RECO/doc/README @@ -1,4 +1,8 @@ +Testing the alcaraw + alcareco production +cmsRun ALCARAW_RECO/python/alcaSkimming.py files=file://../../../B292A7F8-3A7F-E111-A1A5-001D09F29114.root maxEvents=6 &> log2.log +Testing the alcarereco production +cmsRun ALCARAW_RECO/python/alcaSkimming.py files=file://alcaraw.root maxEvents=4 type=ALCARERECO tagFile=ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py &> log.log #============================== RERECO Instructions: diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py new file mode 100644 index 00000000000..c35ee1a00e1 --- /dev/null +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -0,0 +1,148 @@ +import FWCore.ParameterSet.Config as cms + +HLTPath = "HLT_Ele*" +HLTProcessName = "HLT" + +## ____ __ _____ _ _ +## / ___|___ / _| ____| | ___ ___| |_ _ __ ___ _ __ +## | | _/ __| |_| _| | |/ _ \/ __| __| '__/ _ \| '_ \ +## | |_| \__ \ _| |___| | __/ (__| |_| | | (_) | | | | +## \____|___/_| |_____|_|\___|\___|\__|_| \___/|_| |_| +## +# GsfElectron ################ + +GsfMatchedPhotonCands = cms.EDProducer("ElectronMatchedCandidateProducer", + src = cms.InputTag("goodPhotons"), + ReferenceElectronCollection = cms.untracked.InputTag("goodElectrons"), + deltaR = cms.untracked.double(0.3) +) + +## _____ _ _ ___ _ +## | ____| | ___ ___| |_ _ __ ___ _ __ |_ _|__| | +## | _| | |/ _ \/ __| __| '__/ _ \| '_ \ | |/ _` | +## | |___| | __/ (__| |_| | | (_) | | | | | | (_| | +## |_____|_|\___|\___|\__|_| \___/|_| |_| |___\__,_| +## +# Electron ID ###### + + + +## _____ _ __ __ _ _ _ +## |_ _| __(_) __ _ __ _ ___ _ __ | \/ | __ _| |_ ___| |__ (_)_ __ __ _ +## | || '__| |/ _` |/ _` |/ _ \ '__| | |\/| |/ _` | __/ __| '_ \| | '_ \ / _` | +## | || | | | (_| | (_| | __/ | | | | | (_| | || (__| | | | | | | | (_| | +## |_||_| |_|\__, |\__, |\___|_| |_| |_|\__,_|\__\___|_| |_|_|_| |_|\__, | +## |___/ |___/ |___/ +## +# Trigger ################## +PassingHLT = cms.EDProducer("trgMatchGsfElectronProducer", + InputProducer = cms.InputTag( 'gsfElectrons' ), + hltTags = cms.untracked.string( HLTPath ), + triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLTProcessName), + triggerResultsTag = cms.untracked.InputTag("TriggerResults","",HLTProcessName) +) + +# WElecTagHLT = PassingHLT.clone( +# InputProducer = cms.InputTag( "PassingWP80" ) +# ) + +# ele_sequence = cms.Sequence( +# goodElectrons + +# PassingWP80 + +# WElecTagHLT +# ) + + +# import HLTrigger.HLTfilters.hltHighLevel_cfi +# WEnuHltFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone( +# throw = cms.bool(False), +# HLTPaths = [HLTPath] +# ) + +# elecMetSeq = cms.Sequence( WEnuHltFilter * ele_sequence * elecMetFilter ) + + +selectedElectrons = cms.EDFilter("GsfElectronRefSelector", + src = cms.InputTag( 'gsfElectrons' ), + cut = cms.string( + "(abs(superCluster.eta)<2.5) && (energy*sin(superClusterPosition.theta)> 15)") + ) +# This are the cuts at trigger level except ecalIso +PassingVeryLooseId = selectedElectrons.clone( + cut = cms.string( + selectedElectrons.cut.value() + + " && (gsfTrack.trackerExpectedHitsInner.numberOfHits<=1)" #wrt std WP90 allowing 1 numberOfMissingExpectedHits + " && ((isEB" + " && ( dr03TkSumPt/p4.Pt <0.2 "#&& dr03EcalRecHitSumEt/p4.Pt < 0.3 + " && dr03HcalTowerSumEt/p4.Pt < 0.2 )" + " && (sigmaIetaIeta<0.01)" + " && ( -0.15 50") + ) + + + +#met, mt cuts for W selection +MT="sqrt(2*daughter(0).pt*daughter(1).pt*(1 - cos(daughter(0).phi - daughter(1).phi)))" +MET_CUT_MIN = 20. +W_ELECTRON_ET_CUT_MIN = 27.0 +MT_CUT_MIN = 50. + +WenuSelector = cms.EDProducer("CandViewShallowCloneCombiner", + decay = cms.string("pfMet PassingVeryLooseId"), # charge coniugate states are implied + checkCharge = cms.bool(False), + cut = cms.string(("daughter(0).pt > %f && daughter(1).pt > %f && "+MT+" > %f") % (MET_CUT_MIN, W_ELECTRON_ET_CUT_MIN, MT_CUT_MIN)) +) + + +WZSelector = cms.EDProducer("CandMerger", + src = cms.VInputTag("WenuSelector", "ZeeSelector") + ) + +############################################################ +# Filters +############################## +WenuFilter = cms.EDFilter("CandViewCountFilter", + src = cms.InputTag("WenuSelector"), + minNumber = cms.uint32(1) + ) +# filter events with at least one Zee candidate as identified by the ZeeSelector +ZeeFilter = cms.EDFilter("CandViewCountFilter", + src = cms.InputTag("ZeeSelector"), + minNumber = cms.uint32(1) + ) + +WZFilter = cms.EDFilter("CandViewCountFilter", + src = cms.InputTag("WZSelector"), + minNumber = cms.uint32(1) + ) + +ZeeFilterSeq = cms.Sequence(eleSelSeq * ZeeSelector * ZeeFilter) +WenuFilterSeq = cms.Sequence(eleSelSeq * WenuSelector * WenuFilter) +WZFilterSeq = cms.Sequence(eleSelSeq * WZFilter) diff --git a/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py b/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py deleted file mode 100644 index 74c0ceaa2e5..00000000000 --- a/ALCARAW_RECO/python/ZElectronSkimSandbox_cff.py +++ /dev/null @@ -1,60 +0,0 @@ -import FWCore.ParameterSet.Config as cms - - -#met, mt cuts (for Wenu selection) -#W_ELECTRON_ET_CUT_MIN = 27.0 -#MET_CUT_MIN = 20. -#MT_CUT_MIN = 50. - - -selectedElectrons = cms.EDFilter("GsfElectronRefSelector", - src = cms.InputTag( 'gsfElectrons' ), - cut = cms.string( - "(abs(superCluster.eta)<2.5) && (energy*sin(superClusterPosition.theta)> 15)") - ) - -PassingVeryLooseId = selectedElectrons.clone( - cut = cms.string( - selectedElectrons.cut.value() + - " && (gsfTrack.trackerExpectedHitsInner.numberOfHits<=1)" #wrt std WP90 allowing 1 numberOfMissingExpectedHits - " && ((isEB" - " && ( dr03TkSumPt/p4.Pt <0.2 "#&& dr03EcalRecHitSumEt/p4.Pt < 0.3 - " && dr03HcalTowerSumEt/p4.Pt < 0.2 )" - " && (sigmaIetaIeta<0.01)" - " && ( -0.15 50") - ) - -# filter events with at least one Zee candidate as identified by the ZeeSelector -ZeeFilter = cms.EDFilter("CandViewCountFilter", - src = cms.InputTag("ZeeSelector"), - minNumber = cms.uint32(1) - ) - -ZeeFilterSeq = cms.Sequence(eleSelSeq * ZeeSelector * ZeeFilter) - diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index e6b9d738545..7591c980ca6 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -303,26 +303,39 @@ ) process.PUDumperSeq *= process.PUDumper -process.load('Calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') +process.load('Calibration.ALCARAW_RECO.WZElectronSkims_cff') #process.filterSeq *= process.ZeeFilterSeq -process.load("DPGAnalysis.Skims.WElectronSkim_cff") -#process.filterSeq *= process.elecMetSeq +#process.filterSeq *= process.WenuFilterSeq process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("gsfElectrons"), minNumber = cms.uint32(1) ) if(options.skim=="" or options.skim=="none" or options.skim=="no"): process.ZeeFilterSeq = cms.Sequence(process.MinEleNumberFilter) - process.elecMetSeq = cms.Sequence(process.MinEleNumberFilter) + process.WenuFilterSeq = cms.Sequence(process.MinEleNumberFilter) if (HLTFilter): - import copy from HLTrigger.HLTfilters.hltHighLevel_cfi import * process.ZEEHltFilter = copy.deepcopy(hltHighLevel) process.ZEEHltFilter.throw = cms.bool(False) process.ZEEHltFilter.HLTPaths = ["HLT_Ele*"] process.filterSeq *= process.ZEEHltFilter +from HLTrigger.HLTfilters.hltHighLevel_cfi import * +process.NtupleFilter = copy.deepcopy(hltHighLevel) +process.NtupleFilter.throw = cms.bool(False) +process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron', + 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron' + ] +process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCASKIM") +if(ZSkim): + process.NtupleFilterSeq= cms.Sequence(process.ZeeFilterSeq) +elif(WSkim): + process.NtupleFilterSeq= cms.Sequence(process.WenuFilterSeq) +else: + process.NtupleFilterSeq = cms.Sequence() +#process.NtupleFilter) +#process.filterSeq *= process.NtupleFilter # @@ -440,7 +453,7 @@ ) #print "OUTPUTCOMMANDS" -print process.outputALCARECO.outputCommands +#print process.outputALCARECO.outputCommands @@ -456,7 +469,7 @@ process.pathALCARECOEcalUncalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) -process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.elecMetSeq * +process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.WenuFilterSeq * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) # ALCARERECO @@ -464,10 +477,10 @@ # ALCARECO process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * process.seqALCARECOEcalCalElectron) -process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.elecMetSeq * +process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * ~process.ZeeFilter * process.WenuFilterSeq * process.seqALCARECOEcalCalElectron) -process.NtuplePath = cms.Path(process.filterSeq * process.ntupleSeq) +process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) @@ -507,8 +520,7 @@ process.outputALCARECO.outputCommands += sandboxRerecoOutputCommands process.outputALCARECO.fileName=cms.untracked.string('alcarereco.root') - print process.outputALCARECO.outputCommands - print process.patElectrons.electronSource + process.patElectrons.reducedBarrelRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEB process.patElectrons.reducedEndcapRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEE process.zNtupleDumper.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB @@ -581,3 +593,4 @@ process.sandboxRerecoSeq*=process.elPFIsoValueCharged03PFIdRecalib process.sandboxRerecoSeq*=process.elPFIsoValueGamma03PFIdRecalib process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib + From c7c7898132174415733ac549886c72192936bc8d Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 16 Jul 2013 17:24:00 +0200 Subject: [PATCH 062/475] double sided Zee mass cut --- ALCARAW_RECO/python/WZElectronSkims_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index c35ee1a00e1..d4e2886122d 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -103,7 +103,7 @@ ZeeSelector = cms.EDProducer("CandViewShallowCloneCombiner", decay = cms.string("PassingVeryLooseId PassingVeryLooseId"), checkCharge = cms.bool(False), - cut = cms.string("mass > 50") + cut = cms.string("mass > 40 && mass < 130") ) From 3b548e17d3ad78528704083876a805c708223d37 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 19 Jul 2013 14:00:41 +0200 Subject: [PATCH 063/475] Tight selection for SingleElectron --- ALCARAW_RECO/python/WZElectronSkims_cff.py | 89 +++++++++++++++++++--- ALCARAW_RECO/python/alcaSkimming.py | 30 ++++++-- 2 files changed, 105 insertions(+), 14 deletions(-) diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index d4e2886122d..7cd7a33fbec 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -53,11 +53,11 @@ # ) -# import HLTrigger.HLTfilters.hltHighLevel_cfi -# WEnuHltFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone( -# throw = cms.bool(False), -# HLTPaths = [HLTPath] -# ) +import HLTrigger.HLTfilters.hltHighLevel_cfi +ZSCHltFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone( + throw = cms.bool(False), + HLTPaths = ['HLT_Ele27_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele15_CaloIdT_CaloIsoVL_trackless_v*'] + ) # elecMetSeq = cms.Sequence( WEnuHltFilter * ele_sequence * elecMetFilter ) @@ -91,11 +91,68 @@ "))" ) ) +PassingMediumId = selectedElectrons.clone( + cut = cms.string( + selectedElectrons.cut.value() + + " && (gsfTrack.trackerExpectedHitsInner.numberOfHits<=1)" #wrt std WP90 allowing 1 numberOfMissingExpectedHits + " && ((isEB" + " && ( dr03TkSumPt/p4.Pt <0.2 "#&& dr03EcalRecHitSumEt/p4.Pt < 0.3 + " && dr03HcalTowerSumEt/p4.Pt < 0.2 )" + " && (sigmaIetaIeta<0.01)" + " && ( -0.062.4 || eta<-2.4) && (energy*sin(position.theta)> 15)') + ) + +### Build candidates from all the merged superclusters +eleSC = cms.EDProducer('ConcreteEcalCandidateProducer', + src = cms.InputTag('SCselector'), + particleType = cms.string('gamma') + ) + +eleSelSeq = cms.Sequence( + PassingVeryLooseId + PassingMediumId + PassingTightId +SCselector+eleSC ) + ############################################################ # Selectors @@ -103,7 +160,7 @@ ZeeSelector = cms.EDProducer("CandViewShallowCloneCombiner", decay = cms.string("PassingVeryLooseId PassingVeryLooseId"), checkCharge = cms.bool(False), - cut = cms.string("mass > 40 && mass < 130") + cut = cms.string("mass > 40 && mass < 140") ) @@ -115,7 +172,7 @@ MT_CUT_MIN = 50. WenuSelector = cms.EDProducer("CandViewShallowCloneCombiner", - decay = cms.string("pfMet PassingVeryLooseId"), # charge coniugate states are implied + decay = cms.string("pfMet PassingTightId"), # charge coniugate states are implied checkCharge = cms.bool(False), cut = cms.string(("daughter(0).pt > %f && daughter(1).pt > %f && "+MT+" > %f") % (MET_CUT_MIN, W_ELECTRON_ET_CUT_MIN, MT_CUT_MIN)) ) @@ -125,6 +182,13 @@ src = cms.VInputTag("WenuSelector", "ZeeSelector") ) + +EleSCSelector = cms.EDProducer("CandViewShallowCloneCombiner", + decay = cms.string("PassingTightId eleSC"), + checkCharge = cms.bool(False), + cut = cms.string("mass > 40 && mass < 140") + ) + ############################################################ # Filters ############################## @@ -143,6 +207,13 @@ minNumber = cms.uint32(1) ) +ZSCFilter = cms.EDFilter("CandViewCountFilter", + src = cms.InputTag("eleSC"), + minNumber = cms.uint32(1) + ) ZeeFilterSeq = cms.Sequence(eleSelSeq * ZeeSelector * ZeeFilter) WenuFilterSeq = cms.Sequence(eleSelSeq * WenuSelector * WenuFilter) WZFilterSeq = cms.Sequence(eleSelSeq * WZFilter) +ZSCFilterSeq = cms.Sequence(ZSCHltFilter * eleSelSeq * EleSCSelector * ZSCFilter) + + diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 7591c980ca6..eb7a957acb5 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -60,11 +60,15 @@ HLTFilter = False ZSkim = False WSkim = False +ZSCSkim = False if(options.skim=="ZSkim"): ZSkim=True elif(options.skim=="WSkim"): WSkim=True +elif(options.skim=="ZSCSkim"): + ZSCSkim=True + elif(options.skim=="fromWSkim"): print "[INFO] producing from WSkim files (USER format)" WSkim=False @@ -313,6 +317,7 @@ if(options.skim=="" or options.skim=="none" or options.skim=="no"): process.ZeeFilterSeq = cms.Sequence(process.MinEleNumberFilter) process.WenuFilterSeq = cms.Sequence(process.MinEleNumberFilter) + process.ZSCFilterSeq = cms.Sequence(process.MinEleNumberFilter) if (HLTFilter): from HLTrigger.HLTfilters.hltHighLevel_cfi import * @@ -332,6 +337,9 @@ process.NtupleFilterSeq= cms.Sequence(process.ZeeFilterSeq) elif(WSkim): process.NtupleFilterSeq= cms.Sequence(process.WenuFilterSeq) +elif(ZSCSkim): + process.NtupleFilterSeq= cms.Sequence(process.ZSCFilterSeq) + else: process.NtupleFilterSeq = cms.Sequence() #process.NtupleFilter) @@ -419,7 +427,7 @@ # after 5 GB split the file maxSize = cms.untracked.int32(5120000), outputCommands = process.OutALCARECOEcalCalElectron_.outputCommands, - fileName = cms.untracked.string('alcarereco.root'), + fileName = cms.untracked.string('alcareco.root'), SelectEvents = process.OutALCARECOEcalCalElectron.SelectEvents, dataset = cms.untracked.PSet( filterName = cms.untracked.string(''), @@ -469,16 +477,26 @@ process.pathALCARECOEcalUncalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) -process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.WenuFilterSeq * +process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * + ~process.ZeeFilter * process.WenuFilterSeq * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) +process.pathALCARECOEcalUncalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * + ~process.ZeeFilter * process.ZSCFilterSeq * + (process.ALCARECOEcalCalElectronPreSeq + + process.seqALCARECOEcalUncalElectron )) + # ALCARERECO process.pathALCARERECOEcalCalElectron = cms.Path(process.alcarerecoSeq) # ALCARECO process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * process.seqALCARECOEcalCalElectron) -process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * ~process.ZeeFilter * process.WenuFilterSeq * +process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * + ~process.ZeeFilter * process.WenuFilterSeq * process.seqALCARECOEcalCalElectron) +process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * + ~process.ZeeFilter * process.ZSCFilterSeq * + process.seqALCARECOEcalCalElectron) process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) @@ -554,16 +572,18 @@ process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step, process.reconstruction_step,process.endjob_step, process.pathALCARECOEcalUncalZElectron, process.pathALCARECOEcalUncalWElectron, + process.pathALCARECOEcalUncalZSCElectron, process.ALCARAWoutput_step, process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules elif(options.type=='ALCARERECO'): process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, process.NtuplePath) elif(options.type=='ALCARECO'): - process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step, process.NtuplePath ) # fix the output modules - + From c9504da520adf38323c3fea8728bc651e91d1bfd Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 20 Jul 2013 17:21:38 +0200 Subject: [PATCH 064/475] Fixes in SelectEvents and in script --- ALCARAW_RECO/alcaraw_datasets.dat | 5 +++++ .../python/ALCARECOEcalCalIsolElectron_Output_cff.py | 3 ++- .../python/ALCARECOEcalUncalIsolElectron_Output_cff.py | 4 ++-- ALCARAW_RECO/python/alcaSkimming.py | 10 ++++++++++ ALCARAW_RECO/scripts/prodAlcaraw.sh | 7 +++++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/alcaraw_datasets.dat b/ALCARAW_RECO/alcaraw_datasets.dat index 7a71b93f08e..d73000a14f7 100644 --- a/ALCARAW_RECO/alcaraw_datasets.dat +++ b/ALCARAW_RECO/alcaraw_datasets.dat @@ -58,3 +58,8 @@ 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012C,RUN2012ABC,RUN2012ABCD 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012D,RUN2012ABCD # +##### SingleElectron +190645-193621 /SingleElectron/Run2012A-v1/RAW SingleElectron-WSkim-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD +193834-196531 /SingleElectron/Run2012B-v1/RAW SingleElectron-WSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD +198022-203742 /SingleElectron/Run2012C-v1/RAW SingleElectron-WSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012C,RUN2012ABC,RUN2012ABCD +203777-208686 /SingleElectron/Run2012D-v1/RAW SingleElectron-WSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABCD,RUN2012D diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index 51a95f8bc80..5f42a4bb1ba 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -20,7 +20,8 @@ OutALCARECOEcalCalElectron_noDrop_ = cms.PSet( # put this if you have a filter SelectEvents = cms.untracked.PSet( - SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron') +# SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron') + SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron', 'pathALCARECOEcalUncalWElectron') ), outputCommands = cms.untracked.vstring( 'keep *_pfMet_*_*', diff --git a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py index 0fbec1419d8..51ea213eb2f 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalUncalIsolElectron_Output_cff.py @@ -22,8 +22,8 @@ ) OutALCARECOEcalUncalElectron.SelectEvents = cms.untracked.PSet( - #SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron', 'pathALCARECOEcalUncalWElectron') - SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron') + SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron', 'pathALCARECOEcalUncalWElectron') + #SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron') ) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index eb7a957acb5..1acfee39286 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -577,6 +577,16 @@ process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules + + if(options.skim=='WSkim'): + process.outputALCARAW.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalUncalWElectron') + ) + elif(options.skim=='ZSkim'): + process.outputALCARAW.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron') + ) + elif(options.type=='ALCARERECO'): process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, process.NtuplePath) elif(options.type=='ALCARECO'): diff --git a/ALCARAW_RECO/scripts/prodAlcaraw.sh b/ALCARAW_RECO/scripts/prodAlcaraw.sh index c418e55c548..e10f6c5f3c6 100755 --- a/ALCARAW_RECO/scripts/prodAlcaraw.sh +++ b/ALCARAW_RECO/scripts/prodAlcaraw.sh @@ -146,6 +146,9 @@ case $DATASETPATH in */USER) USEPARENT=0 ;; + */RAW) + USEPARENT=0 + ;; *) echo "[ERROR] Dataset format not recognized: ${DATASETPATH}" exit 1 @@ -161,6 +164,10 @@ if [ -z "${SKIM}" ];then SKIM=fromWSkim let LUMIS_PER_JOBS=${LUMIS_PER_JOBS}/4 ;; + *SingleElectron*RAW) + SKIM=WSkim + let LUMIS_PER_JOBS=${LUMIS_PER_JOBS}/20 + ;; *SingleElectron*) SKIM=WSkim let LUMIS_PER_JOBS=${LUMIS_PER_JOBS}/10 From 5a55f27d87c611a00cf2af851be7f4d43d966553 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 21 Jul 2013 11:54:37 +0200 Subject: [PATCH 065/475] puNames in script --- ZFitter/script/energyScale.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index b1f7ff23945..d2d8019a43b 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -114,9 +114,15 @@ if [ -z "$puName" ];then echo "[ERROR] No or too mani pileupHist files for data" exit 1 fi - puFile=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3` + puFiles=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3` + for puFile in $puFiles + do + puName="${puName}_`basename $puFile .root | sed 's|\..*||'`" + done + #echo $puFile - puName=`basename $puFile .root | sed 's|\..*||'` + #puName=`basename $puFile .root | sed 's|\..*||'` + puName=`echo $puName | sed 's|^_||'` #echo $puName fi From f7a26f99b633e0681f137285efe700c251f5cba0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 21 Jul 2013 11:54:40 +0200 Subject: [PATCH 066/475] fixes for TH2F filling for smoothing --- ZFitter/bin/ZFitter.cpp | 182 ++++++++++++++++++++++++++--- ZFitter/src/RooSmearer.cc | 21 ++-- ZNtupleDumper/src/ZNtupleDumper.cc | 2 +- 3 files changed, 180 insertions(+), 25 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index deb7def9a7c..a9d6fdaa0a0 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "../interface/ZFit_class.hh" #include "../interface/puWeights_class.hh" @@ -45,6 +46,7 @@ #define PROFILE_NBINS 200 //#define DEBUG +#define smooth #include "../src/nllProfile.cc" using namespace std; using namespace RooStats; @@ -233,7 +235,7 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w //std::cout << "[INFO] Updating to range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; if(nBin <=0) exit(1); } - while(nBin >40 && level!=4){ + while(nBin >40 && level<4){ bin_width*=1.1; range_min = bin_width*((floor)(range_min / bin_width)); range_max = bin_width*((floor)(range_max / bin_width)); @@ -469,20 +471,126 @@ bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iPro } -Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, RooSmearer& smearer, bool update=true){ +void Smooth(TH2F *h, Int_t ntimes, Option_t *option) +{ + Double_t k5a[5][5] = { { 0, 0, 1, 0, 0 }, + { 0, 2, 2, 2, 0 }, + { 1, 2, 5, 2, 1 }, + { 0, 2, 2, 2, 0 }, + { 0, 0, 1, 0, 0 } }; + Double_t k5b[5][5] = { { 0, 1, 2, 1, 0 }, + { 1, 2, 4, 2, 1 }, + { 2, 4, 8, 4, 2 }, + { 1, 2, 4, 2, 1 }, + { 0, 1, 2, 1, 0 } }; + Double_t k3a[3][3] = { { 0, 1, 0 }, + { 1, 2, 1 }, + { 0, 1, 0 } }; + + // if (ntimes > 1) { + // Warning("Smooth","Currently only ntimes=1 is supported"); + // } + TString opt = option; + opt.ToLower(); + Int_t ksize_x=5; + Int_t ksize_y=5; + Double_t *kernel = &k5a[0][0]; + if (opt.Contains("k5b")) kernel = &k5b[0][0]; + if (opt.Contains("k3a")) { + kernel = &k3a[0][0]; + ksize_x=3; + ksize_y=3; + } + + // find i,j ranges + Int_t ifirst = h->GetXaxis()->GetFirst(); + Int_t ilast = h->GetXaxis()->GetLast(); + Int_t jfirst = h->GetYaxis()->GetFirst(); + Int_t jlast = h->GetYaxis()->GetLast(); + + // Determine the size of the bin buffer(s) needed + //Double_t nentries = h->GetEntries(); + Int_t nx = h->GetNbinsX(); + Int_t ny = h->GetNbinsY(); + Int_t bufSize = (nx+2)*(ny+2); + Double_t *buf = new Double_t[bufSize]; + Double_t *ebuf = 0; + if (h->GetSumw2()->fN) ebuf = new Double_t[bufSize]; + + // Copy all the data to the temporary buffers + Int_t i,j,bin; + for (i=ifirst; i<=ilast; i++){ + for (j=jfirst; j<=jlast; j++){ + bin = h->GetBin(i,j); + buf[bin] =h->GetBinContent(bin); + if (ebuf) ebuf[bin]=h->GetBinError(bin); + } + } + + // Kernel tail sizes (kernel sizes must be odd for this to work!) + Int_t x_push = (ksize_x-1)/2; + Int_t y_push = (ksize_y-1)/2; + + // main work loop + for (i=ifirst; i<=ilast; i++){ + for (j=jfirst; j<=jlast; j++) { + Double_t content = 0.0; + Double_t error = 0.0; + Double_t norm = 0.0; + + for (Int_t n=0; n= 1) && (xb <= nx) && (yb >= 1) && (yb <= ny)) { + bin = h->GetBin(xb,yb); + if(buf[bin]!=0){ + Double_t k = kernel[n*ksize_y +m]; + //if ( (k != 0.0 ) && (buf[bin] != 0.0) ) { // General version probably does not want the second condition + if ( k != 0.0 ) { + norm += k; + content += k*buf[bin]; + if (ebuf) error += k*k*buf[bin]*buf[bin]; + } + } + } + } + } + + if ( norm != 0.0 ) { + h->SetBinContent(i,j,content/norm); + if (ebuf) { + error /= (norm*norm); + h->SetBinError(i,j,sqrt(error)); + } + } + } + } + //fEntries = nentries; + + delete [] buf; + delete [] ebuf; +} + + +Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Int_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL){ var->setVal(X[iMinStart]); Double_t chi2, chi2init=smearer.evaluate(); Double_t locmin=1e20; Int_t iLocMin=0; std::queue chi2old; + Double_t NY[200]={0.}; for(Int_t i =iMinStart; i setVal(X[i]); chi2=smearer.evaluate(); - + if(Y!=NULL){ + Y[i] += chi2; + NY[i]++; + } if(update==true) - std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; + std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -494,9 +602,12 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, RooSmear } } - if(chi2old.size()>2 && chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()>3 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm - if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; + if(chi2old.size()>2 && chi2-min > 500) break; + if(chi2old.size()>4){ + if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm + if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm + if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; + } chi2old.push(chi2); } @@ -507,6 +618,10 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, RooSmear for(Int_t i =iMinStart; i >=0; i--){ //loop versus positive side var->setVal(X[i]); chi2=smearer.evaluate(); + if(Y!=NULL){ + Y[i] += chi2; + NY[i]++; + } if(update==true) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; @@ -521,13 +636,21 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, RooSmear } } - if(chi2old.size()>2 && chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()>3 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm - if(chi2old.size()>3 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; - + if(chi2old.size()>2 && chi2-min > 500) break; + if(chi2old.size()>4){ + if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm + if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm + if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; + } chi2old.push(chi2); } + if(Y!=NULL){ //take the mean! + for(Int_t i =0; i < N; i++){ + if(Y[i]!=0) Y[i] /= NY[i]; + } + } + return iLocMin; } @@ -552,6 +675,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i Double_t *X2 = g2->GetX(); Int_t N1 = g1->GetN(); Int_t N2 = g2->GetN(); + Double_t *Y = new Double_t[N2]; std::cout << "--------------------------------- Init eval " << std::endl; //initial values @@ -560,34 +684,61 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i Double_t chi2, chi2init=smearer.evaluate(); Double_t locmin=1e20; - Int_t iLocMin1=0, iLocMin2, iLocMin2Prev=0; + Int_t iLocMin1=0, iLocMin2, iLocMin2Prev=N2/3; TStopwatch myClock; myClock.Start(); std::cout << "--------------------------------- Grid eval " << std::endl; + TH2F h("hist2","",N1,0,N1,N2,0,N2); for(Int_t i1 =0; i1 setVal(X1[i1]); std::queue chi2old; - iLocMin2Prev = FindMin1D(var2, X2, N2, iLocMin2Prev, smearer, true); + iLocMin2Prev = FindMin1D(var2, X2, N2, iLocMin2Prev, locmin, smearer, true, Y); + for(Int_t i2=0; i2 < N2; i2++){ + if(Y[i2]!=0) std::cout << i1 << "\t" << i2 << "\t" << X1[i1] << "\t" << X2[i2] << "\t" << Y[i2]; + h.Fill(i1,i2,Y[i2]); + if(Y[i2]!=0) std::cout << "\t" << h.GetBinContent(i1+1,i2+1) << std::endl; + } var2->setVal(X2[iLocMin2Prev]); chi2=smearer.evaluate(); - + +#ifndef smooth if(update==true || true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin1=i1; iLocMin2=iLocMin2Prev; locmin=chi2; } - +#endif } // reset to initial value var1->setVal(v1); var2->setVal(v2); +#ifdef smooth + Smooth(&h, 1, "k3a"); + for(Int_t i1=0; i10){ + if(update==true || true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(content>0 && locmin > content){ + locmin=content; + iLocMin1=i1; + iLocMin2=i2; + } + } + } + } +#endif if(update && locminsize(); - category.nSmearToy=(int)(200000./catSize); - if(category.nSmearToy <3) category.nSmearToy = 3; // fix the min to 3 - else if( category.nSmearToy > 30) category.nSmearToy = 30; // fix the max to 20 + category.nSmearToy=(int)(300000./catSize); + if(category.nSmearToy <7) category.nSmearToy = 7; // fix the min to 3 + else if( category.nSmearToy > 40) category.nSmearToy = 40; // fix the max to 20 if(!smearscan) return; //------------------------------ rescale mc histograms - double stdDev=0; + double stdDev=10; double min=10; int nBin_min=0; int n=0; unsigned int nSmearToyLim=130; category.nLLtoy=1; - for(category.nBins=(int) ((category.invMass_max-category.invMass_min)/2.); - category.nBins<161; category.nBins*=2){ - ResetBinning(category); + for(int iBin=0; iBin<1; iBin++){ + //category.nBins=(int) ((category.invMass_max-category.invMass_min)/2.); + //category.nBins<161; category.nBins*=2){ + //ResetBinning(category); TH1F *data = GetSmearedHisto(category, false, _isDataSmeared); ///-----> not need to repeate! for(category.nLLtoy=1; category.nLLtoy < 2; category.nLLtoy+=2){ - for(; category.nSmearToy <= nSmearToyLim; category.nSmearToy*=2){ + for(; category.nSmearToy <= nSmearToyLim && stdDev>1; category.nSmearToy*=2){ double sum=0, sum2=0; - for(n=0; n<500; n++){ + for(n=0; n<300; n++){ UpdateCategoryNLL(category, category.nLLtoy); //the new nll has been updated for the category sum+=category.nll; @@ -749,8 +750,10 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ << "\tdataEvents=" << category.data_events->size() << std::endl; } + if(category.nSmearToy > nSmearToyLim) category.nSmearToy/=2; } } + // exit(0); return; #ifdef DD diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 8f87f9d4e08..d8d550393d9 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -1029,7 +1029,7 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const invMass_regrCorr_egamma = sqrt(2* energyEle_regrCorr_egamma[0] * energyEle_regrCorr_egamma[1] *angle); if(electron1.genLepton()!=0 && electron2.genLepton()!=0){ - invMass_MC = sqrt(2*electron1.genLepton()->energy() *electron1.genLepton()->energy() * + invMass_MC = sqrt(2*electron1.genLepton()->energy() *electron2.genLepton()->energy() * angle); } else invMass_MC = 0; // invMass_genMC = (electron1.genLepton()->p4 + electron2.genLepton()->p4()).M(); From d817f00b8d4df975f0884f01846c53167ff285e9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 22 Jul 2013 14:57:59 +0200 Subject: [PATCH 067/475] fixes --- ZFitter/bin/ZFitter.cpp | 18 ++-- ZFitter/macro/mcmcDraw.C | 134 +++++++++++++++++++++++++- ZFitter/script/energyScale.sh | 2 +- ZFitter/src/ElectronCategory_class.cc | 2 +- ZFitter/src/ZFit_class.cc | 12 +-- 5 files changed, 148 insertions(+), 20 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index a9d6fdaa0a0..dbf9333110b 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -537,14 +537,14 @@ void Smooth(TH2F *h, Int_t ntimes, Option_t *option) Double_t content = 0.0; Double_t error = 0.0; Double_t norm = 0.0; - + if(h->GetBinContent(i,j)<=0) continue; for (Int_t n=0; n= 1) && (xb <= nx) && (yb >= 1) && (yb <= ny)) { bin = h->GetBin(xb,yb); - if(buf[bin]!=0){ + if(buf[bin]>0){ Double_t k = kernel[n*ksize_y +m]; //if ( (k != 0.0 ) && (buf[bin] != 0.0) ) { // General version probably does not want the second condition if ( k != 0.0 ) { @@ -596,13 +596,13 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Int_t mi locmin=chi2; } - if(!chi2old.empty() && chi22 && chi2-min > 500) break; + if(chi2old.size()>2 && chi2-locmin > 300) break; if(chi2old.size()>4){ if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm @@ -630,13 +630,13 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Int_t mi locmin=chi2; } - if(!chi2old.empty() && chi22 && chi2-min > 500) break; + if(chi2old.size()>2 && chi2-locmin > 300) break; if(chi2old.size()>4){ if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm @@ -767,7 +767,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i std::cout << "------------------------------" << std::endl; // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; - smearer.SetNSmear(0,1); + // smearer.SetNSmear(0,1); delete g1; delete g2; delete Y; @@ -2103,7 +2103,7 @@ int main(int argc, char **argv) { //smearer.SetNSmear(10); std::cout <<"==================PROFILE=================="<SaveAs(of); } - continue; + //if(!name.Contains("scale")) continue; std::cout << "Doing " << name << "\t" << var->getVal() << std::endl; TGraph *profil = GetProfile(var, smearer,0); diff --git a/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C index 160a6312aae..d552dfb4c65 100644 --- a/ZFitter/macro/mcmcDraw.C +++ b/ZFitter/macro/mcmcDraw.C @@ -42,6 +42,128 @@ #include #include +#include +#include + +void Smooth(TH2F *h, Int_t ntimes, Option_t *option) +{ + // Smooth bin contents of this 2-d histogram using kernel algorithms + // similar to the ones used in the raster graphics community. + // Bin contents in the active range are replaced by their smooth values. + // If Errors are defined via Sumw2, they are scaled. + // 3 kernels are proposed k5a, k5b and k3a. + // k5a and k5b act on 5x5 cells (i-2,i-1,i,i+1,i+2, and same for j) + // k5b is a bit more stronger in smoothing + // k3a acts only on 3x3 cells (i-1,i,i+1, and same for j). + // By default the kernel "k5a" is used. You can select the kernels "k5b" or "k3a" + // via the option argument. + // If TAxis::SetRange has been called on the x or/and y axis, only the bins + // in the specified range are smoothed. + // In the current implementation if the first argument is not used (default value=1). + // + // implementation by David McKee (dmckee@bama.ua.edu). Extended by Rene Brun + + Double_t k5a[5][5] = { { 0, 0, 1, 0, 0 }, + { 0, 2, 2, 2, 0 }, + { 1, 2, 5, 2, 1 }, + { 0, 2, 2, 2, 0 }, + { 0, 0, 1, 0, 0 } }; + Double_t k5b[5][5] = { { 0, 1, 2, 1, 0 }, + { 1, 2, 4, 2, 1 }, + { 2, 4, 8, 4, 2 }, + { 1, 2, 4, 2, 1 }, + { 0, 1, 2, 1, 0 } }; + Double_t k3a[3][3] = { { 0, 1, 0 }, + { 1, 2, 1 }, + { 0, 1, 0 } }; + + // if (ntimes > 1) { + // Warning("Smooth","Currently only ntimes=1 is supported"); + // } + TString opt = option; + opt.ToLower(); + Int_t ksize_x=5; + Int_t ksize_y=5; + Double_t *kernel = &k5a[0][0]; + if (opt.Contains("k5b")) kernel = &k5b[0][0]; + if (opt.Contains("k3a")) { + kernel = &k3a[0][0]; + ksize_x=3; + ksize_y=3; + } + + // find i,j ranges + Int_t ifirst = h->GetXaxis()->GetFirst(); + Int_t ilast = h->GetXaxis()->GetLast(); + Int_t jfirst = h->GetYaxis()->GetFirst(); + Int_t jlast = h->GetYaxis()->GetLast(); + + // Determine the size of the bin buffer(s) needed + Double_t nentries = h->GetEntries(); + Int_t nx = h->GetNbinsX(); + Int_t ny = h->GetNbinsY(); + Int_t bufSize = (nx+2)*(ny+2); + Double_t *buf = new Double_t[bufSize]; + Double_t *ebuf = 0; + if (h->GetSumw2()->fN) ebuf = new Double_t[bufSize]; + + // Copy all the data to the temporary buffers + Int_t i,j,bin; + for (i=ifirst; i<=ilast; i++){ + for (j=jfirst; j<=jlast; j++){ + bin = h->GetBin(i,j); + buf[bin] =h->GetBinContent(bin); + if (ebuf) ebuf[bin]=h->GetBinError(bin); + } + } + + // Kernel tail sizes (kernel sizes must be odd for this to work!) + Int_t x_push = (ksize_x-1)/2; + Int_t y_push = (ksize_y-1)/2; + + // main work loop + for (i=ifirst; i<=ilast; i++){ + for (j=jfirst; j<=jlast; j++) { + Double_t content = 0.0; + Double_t error = 0.0; + Double_t norm = 0.0; + if(h->GetBinContent(i,j)<=0) continue; + for (Int_t n=0; n= 1) && (xb <= nx) && (yb >= 1) && (yb <= ny)) { + bin = h->GetBin(xb,yb); + if(buf[bin]>0){ + if(xb>9 && xb < 12) std::cout << bin << "\t" << xb << "\t" << yb << "\t" << buf[bin] << "\t" << h->GetBinContent(xb,yb) << std::endl; + Double_t k = kernel[n*ksize_y +m]; + //if ( (k != 0.0 ) && (buf[bin] != 0.0) ) { // General version probably does not want the second condition + if ( k != 0.0 ) { + norm += k; + content += k*buf[bin]; + if (ebuf) error += k*k*buf[bin]*buf[bin]; + } + } + } + } + } + + if ( norm != 0.0 ) { + h->SetBinContent(i,j,content/norm); + if (ebuf) { + error /= (norm*norm); + h->SetBinError(i,j,sqrt(error)); + } + } + } + } + //fEntries = nentries; + + delete [] buf; + delete [] ebuf; +} + + TGraph* bestFit(TTree *t, TString x, TString y, TString nll) { t->Draw(y+":"+x, nll+" == 0"); TGraph *gr0 = (TGraph*) gROOT->FindObject("Graph")->Clone(); @@ -282,7 +404,7 @@ RooHistPdf *nllToL(TH2F* hist){ return histPdf; } -TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, TString binning="(40,0,0.05,40,0,0.2)", bool delta=false){ +TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, TString binning="(40,0,0.05,40,0,0.2)", bool delta=false, bool smooth=false){ var1Name.ReplaceAll("-","_"); var2Name.ReplaceAll("-","_"); @@ -304,6 +426,10 @@ TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, T delete hEntries; Double_t min=1e20, max=0; + if(smooth){ + Smooth(h, 1, "k3a"); + } + if(delta){ for(Int_t iBinX=1; iBinX <= h->GetNbinsX(); iBinX++){ for(Int_t iBinY=1; iBinY <= h->GetNbinsY(); iBinY++){ @@ -317,13 +443,13 @@ TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, T for(Int_t iBinY=1; iBinY <= h->GetNbinsY(); iBinY++){ Double_t binContent=h->GetBinContent(iBinX, iBinY); //std::cout << binContent << std::endl; - if(binContent!=0) binContent-=min; + if(binContent!=0) binContent-=min-0.0002; else binContent=-1; h->SetBinContent(iBinX,iBinY,binContent); } } } - h->GetZaxis()->SetRangeUser(0,500); + h->GetZaxis()->SetRangeUser(0.000001,50); //std::cerr << "io sono qui 3" << std::endl; return h; // Double_t variables[2]; @@ -672,3 +798,5 @@ void MakePlots(TString filename, TString energy="8TeV", TString lumi=""){ //lowEtaGold //tree->Draw(constTermName+":"+alphaName+">>h(16,0.0,0.08,20,0,0.02)",nllVarName+"-1.170791e+07-4","colz",10226-9995,9995) + + diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index d2d8019a43b..2d33c92cc5a 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -9,7 +9,7 @@ commonCut=Et_25-trigger-noPF selection=WP90_PU invMass_var=invMass_SC_regrCorr_pho baseDir=test -updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" +#updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" #updateOnly="" usage(){ diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 77e5b361193..215d7c95280 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -36,7 +36,7 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co itr++){ TString cut_string = *itr; - if(isMC && cut_string.Contains("runNumber")) continue; + //if(isMC && cut_string.Contains("runNumber")) continue; if(isMC && cut_string.Contains("lumiBlock")) continue; // std::cout << "[DEBUG] Skipping runNumber cut for MC " << isMC << "\t" << string << std::endl; diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index 07ecfd79c44..915f20d2704 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -634,14 +634,14 @@ void ZFit_class::Fit(TString region, bool doPlot){ int p = regionMC.Index("-runNumber"); int pp = regionMC.Index("-", p+1); - if(p>0){ + if(p>0){ //there is the runNumber string TString region_tmp=region; - region_tmp.Remove(0,p); - if(pp>0) region_tmp.Remove(p,pp-p); - region_tmp.ReplaceAll("-runNumber_",""); + region_tmp.Remove(0,p); // remove the part before + if(pp>0) region_tmp.Remove(pp-p); // remove the part after if exists + region_tmp.ReplaceAll("-runNumber_",""); // remove runNumber string TString region_tmp2=region_tmp; - region_tmp.Remove(region_tmp.First('_')); - region_tmp2.Remove(0,region_tmp2.First('_')+1); + region_tmp.Remove(region_tmp.First('_')); // take the runMin + region_tmp2.Remove(0,region_tmp2.First('_')+1); //take the runMax int runMin=region_tmp.Atoi(); int runMax=region_tmp2.Atoi(); std::cout << region << "\t" << p << " " << pp << "\ttmp " << region_tmp << "\ttmp2 " << region_tmp2 << "\trunMin " << runMin << "\t" << runMax << std::endl; From 435dab2e5ca459eac797c1e88391150c839ae983 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 25 Jul 2013 17:40:08 +0200 Subject: [PATCH 068/475] generate smearing tree with alpha --- .../interface/EnergyScaleCorrection_class.h | 4 +++- ZFitter/src/EnergyScaleCorrection_class.cc | 24 +++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index 27b0eeb92c5..c3ae2aee669 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -54,7 +54,9 @@ class EnergyScaleCorrection_class{ TRandom3 *rgen_; correction_map_t smearings; - void AddSmearing(TString category_, int runMin_, int runMax_, double smearing_, double err_smearing_); + void AddSmearing(TString category_, int runMin_, int runMax_, //double smearing_, double err_smearing_); + double constTerm, double err_constTerm, double alpha, double err_alpha); + float getSmearing(float energy, bool isEBEle, float R9Ele, float etaSCEle); diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 0ff36ff51a8..17d27957e31 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -357,8 +357,8 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, //============================== SMEARING void EnergyScaleCorrection_class::AddSmearing(TString category_, int runMin_, int runMax_, - double smearing_, double err_smearing_){ - + double constTerm, double err_constTerm, double alpha, double err_alpha){ + //double smearing_, double err_smearing_){ // se le corrections non sono definite per Hgg (gold e bad) allora ignoro le righe che si riferiscono a queste categorie if( (!isHggCat) && (category_.Contains("gold",TString::kIgnoreCase) || category_.Contains("bad",TString::kIgnoreCase))) { return; @@ -371,8 +371,8 @@ void EnergyScaleCorrection_class::AddSmearing(TString category_, int runMin_, in correction_t corr; corr.runMax=runMax_; std::pair pair_tmp; - pair_tmp.first=smearing_; - pair_tmp.second=err_smearing_; + pair_tmp.first=constTerm; + pair_tmp.second=alpha; smearings[category_]=pair_tmp; return; @@ -388,15 +388,16 @@ void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ int runMin=0, runMax=900000; TString category, region2; - double smearing, err_smearing; - + //double smearing, err_smearing; + double constTerm, err_constTerm, alpha, err_alpha; for(f_in >> category; f_in.good(); f_in >> category){ f_in //>> region2 //>> runMin >> runMax - >> smearing >> err_smearing; + >> constTerm >> alpha; + //>> smearing >> err_smearing; - AddSmearing(category, runMin, runMax, smearing, err_smearing); + AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha); } f_in.close(); @@ -407,6 +408,7 @@ void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ } + float EnergyScaleCorrection_class::getSmearingSigma(float energy, bool isEBEle, float R9Ele, float etaSCEle){ //const correction_map_t *correction_map_p = &(runCorrection_itr->second.correction_map); TString category=GetElectronCategory(isEBEle, R9Ele, etaSCEle); @@ -415,8 +417,10 @@ float EnergyScaleCorrection_class::getSmearingSigma(float energy, bool isEBEle, std::cerr << "[ERROR] Electron category " << category << " not found!!!! Smearing not applied" << std::endl; exit(1); } - - return smearings.find(category)->second.first; + + double constTerm=smearings.find(category)->second.first; + double alpha=smearings.find(category)->second.second; + return sqrt(constTerm*constTerm + alpha*alpha/energy); } float EnergyScaleCorrection_class::getSmearing(float energy, bool isEBEle, float R9Ele, float etaSCEle){ From 9bcb114a1113d1981f7e69eedd3480329afedb2c Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 25 Jul 2013 17:40:51 +0200 Subject: [PATCH 069/475] fixed runNumber cut for run dependent MC --- ZFitter/src/ElectronCategory_class.cc | 2 +- ZFitter/src/ZFit_class.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 215d7c95280..77e5b361193 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -36,7 +36,7 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co itr++){ TString cut_string = *itr; - //if(isMC && cut_string.Contains("runNumber")) continue; + if(isMC && cut_string.Contains("runNumber")) continue; if(isMC && cut_string.Contains("lumiBlock")) continue; // std::cout << "[DEBUG] Skipping runNumber cut for MC " << isMC << "\t" << string << std::endl; diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index 915f20d2704..7dc7ccbf18e 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -106,9 +106,11 @@ void ZFit_class::Import(TString commonCut, TString eleID_, std::set& br commonCut+="-eleID_"+eleID_; TString mcCut, dataCut; if(l->GetN()>0){ // runDependent MC, treat it has data + std::cout << "[INFO] Importing run dependent MC" << std::endl; if(_oddMC) mcCut = cutter.GetCut(commonCut+"-odd", false); else mcCut = cutter.GetCut(commonCut, false); } else { + std::cout << "[INFO] Importing std MC" << std::endl; if(_oddMC) mcCut = cutter.GetCut(commonCut+"-odd", true); else mcCut = cutter.GetCut(commonCut, true); } From fdaa65d82ebc9ca298dbd5a1d651e4a40c38ec4a Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 25 Jul 2013 17:41:46 +0200 Subject: [PATCH 070/475] fixed and reduced number of points in the 2d scan --- ZFitter/bin/ZFitter.cpp | 45 ++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index dbf9333110b..a4e50468c0d 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -573,12 +573,12 @@ void Smooth(TH2F *h, Int_t ntimes, Option_t *option) } -Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Int_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL){ +Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL){ var->setVal(X[iMinStart]); Double_t chi2, chi2init=smearer.evaluate(); Double_t locmin=1e20; - Int_t iLocMin=0; + Int_t iLocMin=iMinStart; std::queue chi2old; Double_t NY[200]={0.}; @@ -596,17 +596,20 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Int_t mi locmin=chi2; } - if(!chi2old.empty() && chi22 && chi2-locmin > 300) break; + if(chi2old.size()>2 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} + if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} if(chi2old.size()>4){ if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm - if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; + if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100) break; // jump to the next constTerm + if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >150) break; } chi2old.push(chi2); @@ -630,17 +633,20 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Int_t mi locmin=chi2; } - if(!chi2old.empty() && chi22 && chi2-locmin > 300) break; + if(chi2old.size()>2 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} + if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} if(chi2old.size()>4){ - if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >200) break; // jump to the next constTerm - if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >300) break; + if(chi2-chi2old.back() >80 && chi2-locmin >100){ std::cout << "stop 5" << std::endl; break;} + if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100){ std::cout << "stop 6" << std::endl; break;} + if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>50 && chi2-locmin >100){ std::cout << "stop 7" << std::endl; break;} } chi2old.push(chi2); } @@ -683,7 +689,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i Double_t v2=var2->getVal(); Double_t chi2, chi2init=smearer.evaluate(); - Double_t locmin=1e20; + Double_t locmin=1e20, locminSmooth=1e20; Int_t iLocMin1=0, iLocMin2, iLocMin2Prev=N2/3; TStopwatch myClock; @@ -711,12 +717,12 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i #ifndef smooth if(update==true || true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; +#endif if(chi2<=locmin){ //local minimum iLocMin1=i1; iLocMin2=iLocMin2Prev; locmin=chi2; } -#endif } // reset to initial value @@ -729,15 +735,16 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i for(Int_t i2=0; i20){ - if(update==true || true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; - if(content>0 && locmin > content){ - locmin=content; - iLocMin1=i1; - iLocMin2=i2; - } + if(update==true || true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locminSmooth-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(content>0 && locminSmooth > content){ + locminSmooth=content; + iLocMin1=i1; + iLocMin2=i2; + } } } } + locmin=locminSmooth; #endif if(update && locmin Date: Thu, 25 Jul 2013 17:42:11 +0200 Subject: [PATCH 071/475] fixes --- ZFitter/script/energyScale.sh | 2 +- ZFitter/script/makeTable.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 2d33c92cc5a..d2d8019a43b 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -9,7 +9,7 @@ commonCut=Et_25-trigger-noPF selection=WP90_PU invMass_var=invMass_SC_regrCorr_pho baseDir=test -#updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" +updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" #updateOnly="" usage(){ diff --git a/ZFitter/script/makeTable.sh b/ZFitter/script/makeTable.sh index a77139aa5c7..65da81ebf59 100755 --- a/ZFitter/script/makeTable.sh +++ b/ZFitter/script/makeTable.sh @@ -116,9 +116,9 @@ for category in $categories runMin=`echo ${runrange} | cut -d '_' -f 2` runMax=`echo ${runrange} | cut -d '_' -f 3` #for runDependent mc - if [ "$runMin" -ge "190456" -a "$runMax" -le "196531" ];then runrange="-runNumber_194533_194533"; - elif [ "$runMin" -ge "198111" -a "$runMax" -le "203742" ];then runrange="-runNumber_200519_200519"; - elif [ "$runMin" -ge "203756" -a "$runMax" -le "208686" ];then runrange="-runNumber_206859_206859"; + if [ "$runMin" -ge "190456" -a "$runMin" -le "196531" -a "$runMax" -le "198115" ];then runrange="-runNumber_194533_194533"; + elif [ "$runMin" -ge "198111" -a "$runMin" -le "203742" -a "$runMax" -le "203852" ];then runrange="-runNumber_200519_200519"; + elif [ "$runMin" -ge "203756" -a "$runMin" -le "208686" ];then runrange="-runNumber_206859_206859"; else runrange=""; fi fi From 0c32b6c18281bb11d793f38855d4d00b0b9e03dd Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 25 Jul 2013 17:42:45 +0200 Subject: [PATCH 072/475] new functions for the check of toy studies --- ZFitter/macro/mcmcDraw.C | 125 +++++++++++++++++++++++++++++++++++---- 1 file changed, 114 insertions(+), 11 deletions(-) diff --git a/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C index d552dfb4c65..2b0207ae4e9 100644 --- a/ZFitter/macro/mcmcDraw.C +++ b/ZFitter/macro/mcmcDraw.C @@ -135,7 +135,7 @@ void Smooth(TH2F *h, Int_t ntimes, Option_t *option) if ( (xb >= 1) && (xb <= nx) && (yb >= 1) && (yb <= ny)) { bin = h->GetBin(xb,yb); if(buf[bin]>0){ - if(xb>9 && xb < 12) std::cout << bin << "\t" << xb << "\t" << yb << "\t" << buf[bin] << "\t" << h->GetBinContent(xb,yb) << std::endl; + //if(xb>9 && xb < 12) std::cout << bin << "\t" << xb << "\t" << yb << "\t" << buf[bin] << "\t" << h->GetBinContent(xb,yb) << std::endl; Double_t k = kernel[n*ksize_y +m]; //if ( (k != 0.0 ) && (buf[bin] != 0.0) ) { // General version probably does not want the second condition if ( k != 0.0 ) { @@ -302,7 +302,7 @@ TGraphErrors g(TTree *tree, TString alphaName, TString constTermName){ Double_t const2=constTerm*constTerm; for(Double_t energy=20; energy<150; energy+=10){ Double_t addSmearing = (sqrt(alpha2/energy+const2)); - + std::cout << alpha << "\t" << constTerm << "\t" << addSmearing << std::endl; graph.SetPoint(iPoint, energy, addSmearing); graph.SetPointError(iPoint,0, 0); iPoint++; @@ -387,7 +387,7 @@ RooHistPdf *nllToL(TH2F* hist){ for(Int_t iBinY=1; iBinY <= hist->GetNbinsY(); iBinY++){ Double_t binContent=hist->GetBinContent(iBinX, iBinY); Double_t b = binContent <= 0 ? 0 : exp(-binContent+min+50); - if(binContent != 0 && binContent-min<100) std::cout << iBinX << "\t" << iBinY << "\t" << binContent << "\t" << -binContent+min << "\t" << b << std::endl; + // if(binContent != 0 && binContent-min<100) std::cout << iBinX << "\t" << iBinY << "\t" << binContent << "\t" << -binContent+min << "\t" << b << std::endl; //h->Fill(hist->GetXaxis()->GetBinLowEdge(iBinX), hist->GetYaxis()->GetBinLowEdge(iBinY),b); h->SetBinContent(iBinX, iBinY,b); } @@ -681,7 +681,7 @@ TGraphErrors plot(RooDataSet *dataset, TString alpha, TString constTerm){ -void MakePlots(TString filename, TString energy="8TeV", TString lumi=""){ +void MakePlots(TString filename, float zmax=50, bool invert=false, TString energy="8TeV", TString lumi=""){ TString outDir=filename; outDir.ReplaceAll("fitres","img"); outDir="tmp/"; //std::map deltaNLL_map; @@ -708,9 +708,19 @@ void MakePlots(TString filename, TString energy="8TeV", TString lumi=""){ TTree *tree = dataset2tree(dataset); TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); - TH2F *hist = prof2d(tree, alphaName, constTermName, "nll", "(12,-0.0005,0.0115,29,-0.0025,0.1425)",true); - -// // deltaNLL_map.insert(std::pair (keyName,hist)); + TString binning="(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; + if(invert){ + binning="(61,-0.0022975,0.1401475,40,0.00025,0.02025)"; + } + TH2F *hist = invert ? prof2d(tree, constTermName, alphaName, "nll", binning, true,true) : + prof2d(tree, alphaName, constTermName, "nll", binning, true,true); + if(invert){ + hist->GetXaxis()->SetTitle("#Delta #alpha"); + hist->GetYaxis()->SetTitle("#Delta #sigma"); + } else { + hist->GetYaxis()->SetTitle("#Delta #alpha"); + hist->GetXaxis()->SetTitle("#Delta #sigma"); + } hist->SaveAs(outDir+"/deltaNLL-"+constTermName+".root"); hist->Draw("colz"); bestFit_.Draw("P same"); @@ -718,26 +728,30 @@ void MakePlots(TString filename, TString energy="8TeV", TString lumi=""){ Int_t iBinX, iBinY; Double_t x,y; - hist->GetBinWithContent2(0,iBinX,iBinY); + hist->GetBinWithContent2(1.99999660253524780e-04,iBinX,iBinY); x= hist->GetXaxis()->GetBinCenter(iBinX); y= hist->GetYaxis()->GetBinCenter(iBinY); TGraph nllBestFit(1,&x,&y); + nllBestFit.SetMarkerStyle(3); nllBestFit.SetMarkerColor(kRed); TList* contour68 = contourFromTH2(hist, 0.68); hist->Draw("colz"); - hist->GetZaxis()->SetRangeUser(0,50); - bestFit_.Draw("P same"); + hist->GetZaxis()->SetRangeUser(0,zmax); + //bestFit_.Draw("P same"); nllBestFit.Draw("P same"); //contour68->Draw("same"); c->SaveAs(outDir+"/deltaNLL-"+constTermName+".png"); + c->SaveAs(outDir+"/deltaNLL-"+constTermName+".eps"); + c->Clear(); hist->SaveAs("tmp/hist-"+constTermName+".root"); nllBestFit.SaveAs("tmp/nllBestFit.root"); contour68->SaveAs("tmp/contour68.root"); delete hist; - hist = prof2d(tree, alphaName, constTermName, "nll", "(12,-0.0005,0.0115,29,-0.0025,0.1425)"); + hist = prof2d(tree, alphaName, constTermName, "nll", + "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", false,true); RooHistPdf *histPdf = nllToL(hist); delete hist; RooDataSet *gen_dataset=histPdf->generate(*histPdf->getVariables(),1000000,kTRUE,kFALSE); @@ -790,6 +804,95 @@ void MakePlots(TString filename, TString energy="8TeV", TString lumi=""){ return; } + +TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString fname="outProfile-scaleStep2smearing_7-Et_25-trigger-noPF-EB.root"){ + TString outDir=dirname; outDir.ReplaceAll("fitres","img"); + outDir="tmp/"; + //std::map deltaNLL_map; + + /*------------------------------ Plotto */ + TCanvas c("ctoy","c"); + + + TTree *toys = new TTree("toys",""); + Double_t constTerm_tree, constTermTrue_tree; + Double_t alpha_tree, alphaTrue_tree; + char catName[100]; + Int_t catIndex; + toys->Branch("constTerm", &constTerm_tree, "constTerm/D"); + toys->Branch("alpha", &alpha_tree, "alpha/D"); + toys->Branch("constTermTrue", &constTermTrue_tree, "constTermTrue/D"); + toys->Branch("alphaTrue", &alphaTrue_tree, "alphaTrue/D"); + + toys->Branch("catName", catName, "catName/C"); + toys->Branch("catIndex", &catIndex, "catIndex/I"); + std::map catIndexMap; + + ///1/ + for(int itoy =1; itoy <= 200; itoy++){ + TString filename=dirname+"/"; filename+=itoy; filename+="/"+fname; + + TFile f_in(filename, "read"); + if(f_in.IsZombie()){ + std::cerr << "File opening error: " << filename << std::endl; + return NULL; + } + + TList *KeyList = f_in.GetListOfKeys(); + std::cout << KeyList->GetEntries() << std::endl; + for(int i =0; i < KeyList->GetEntries(); i++){ + c.Clear(); + TKey *key = (TKey *)KeyList->At(i); + if(TString(key->GetClassName())!="RooDataSet") continue; + RooDataSet *dataset = (RooDataSet *) key->ReadObj(); + + TString constTermName = dataset->GetName(); + TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); + + TTree *tree = dataset2tree(dataset); + TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); + TH2F *hist = prof2d(tree, alphaName, constTermName, "nll", + "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", true,true); + + Int_t iBinX, iBinY; + hist->GetBinWithContent2(1.99999660253524780e-04,iBinX,iBinY); + + TString catName_=constTermName; catName_.ReplaceAll("constTerm_",""); catName_.ReplaceAll("-","_"); + if(catIndexMap.count(catName_)==0) catIndexMap.insert(std::pair(catName_,catIndexMap.size())); + catIndex=catIndexMap[catName_]; + + constTerm_tree = hist->GetXaxis()->GetBinCenter(iBinX); + alpha_tree = hist->GetYaxis()->GetBinCenter(iBinY); + sprintf(catName,"%s", catName_.Data()); + bestFit_.GetPoint(0, constTermTrue_tree,alphaTrue_tree); + + toys->Fill(); + + delete tree; + delete hist; + + } + f_in.Close(); + } + //toys->SaveAs("tmp/toysTree.root"); + + + return toys; +} + +TH1F *PlotToys(TTree *tree, Int_t catIndex, bool constTerm){ + TH1F *h= NULL; + TString cutString="catIndex=="; cutString+=catIndex; + if(constTerm){ + tree->Draw("constTerm-constTermTrue>>constTerm", cutString); + h = (TH1F *) gROOT->FindObject("constTerm"); + } else{ + tree->Draw("alpha-alphaTrue>>alpha",cutString); + h = (TH1F *) gROOT->FindObject("alpha"); + } + return h; +} + // lowEtaBad //tree->Draw(constTermName+":"+alphaName+">>h(16,0.0,0.08,20,0,0.02)",nllVarName+"-1.170791e+07","colz",10442-10232,10232) From 32440f27781a2411c369ff6e4392ea546f9f71b6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 25 Jul 2013 17:43:49 +0200 Subject: [PATCH 073/475] corrected pileup weight tree distribution --- ZFitter/data/validation/22Jan2012-stdMadgraph.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/data/validation/22Jan2012-stdMadgraph.dat b/ZFitter/data/validation/22Jan2012-stdMadgraph.dat index df5d87f9cd2..d0e1ff10bae 100644 --- a/ZFitter/data/validation/22Jan2012-stdMadgraph.dat +++ b/ZFitter/data/validation/22Jan2012-stdMadgraph.dat @@ -14,7 +14,7 @@ d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8Te d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root ##### PU trees -#s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMC_powheg-RUN2012ABCD.root +s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMadgraph-RUN2012ABCD.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees From 81e18e09d37a43077335ff9f36d4f38b472cf1b0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 25 Jul 2013 17:44:19 +0200 Subject: [PATCH 074/475] modifying to make toy studies --- ZFitter/script/justOnce/smearing.sh | 82 +++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index e629a838ad3..01e782c90ca 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -1,3 +1,83 @@ +#!/bin/bash +#1000 100000 +dir=test/dato/fitres/Hgg_Et-toys +for const in 0.01 0.02 0.005 + do + for alpha in 0.00 #0.01 0.03 0.05 0.07 + do + echo "[[[[[[[[[[[ const:alpha ]]]]]]]]]]] ${const}:${alpha}" + baseDir=${dir}/${nEventsPerToy}/${const}-${alpha}/ + mkdir -p $baseDir + cat > ${baseDir}/smearEleFile.dat < ${baseDir}/invertedToyMC.dat + if [ ! -e "smearEle_HggRunEtaR9_mc-${const}-${alpha}.root" ];then + ./bin/ZFitter.exe -f ${baseDir}/invertedToyMC.dat --regionsFile=data/regions/scaleStep2smearing_7.dat \ + --commonCut=Et_25-trigger-noPF-EB \ + --autoNsmear --constTermFix --saveRootMacro --noPU \ + --smearEleType=HggRunEtaR9 --smearEleFile=${baseDir}/smearEleFile.dat > ${baseDir}/treeGen.log + mv tmp/smearEle_HggRunEtaR9_mc.root smearEle_HggRunEtaR9_mc-${const}-${alpha}.root + fi + cat > $baseDir/mcToy.txt < $baseDir/toyMC.dat + echo "d smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_mc-${const}-${alpha}.root" >> $baseDir/toyMC.dat + continue + for nToys in `seq 1 200`; + do + newDir=${baseDir}/${nToys} + mkdir -p $newDir + + bsub -q 2nd \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch5/src/calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ + --regionsFile=data/regions/scaleStep2smearing_7.dat \ + --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ + --autoNsmear --constTermFix --smearerType=profile --noPU \ + --initFile=${baseDir}/mcToy.txt --profileOnly > ${newDir}/log2.log" + done + wait + done + wait +done + +exit 0 + #!/bin/bash #1000 100000 dir=test/dato/fitres/Hgg_Et-toys @@ -32,6 +112,8 @@ EOF done wait done + + #!/bin/bash #1000 100000 dir=test/dato/fitres/Hgg_Et-toys From 15808fc9636e5eaf0279fa4cdda30c1d97300d73 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 26 Jul 2013 09:26:58 +0200 Subject: [PATCH 075/475] using 2D profile also in caso of alpha constant --- ZFitter/bin/ZFitter.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index a4e50468c0d..d8a261e94a0 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -687,6 +687,16 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i //initial values Double_t v1=var1->getVal(); Double_t v2=var2->getVal(); + if(var1->isConstant()){ + X1[0] = v1; + N1=1; + } + if(var2->isConstant()){ + X2[0] = v2; + N2=1; + } + + Double_t chi2, chi2init=smearer.evaluate(); Double_t locmin=1e20, locminSmooth=1e20; @@ -911,7 +921,7 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList_.find(alphaName): NULL; if(name.Contains("alpha")) continue; - if(var2!=NULL && var2->isConstant()) var2=NULL; + //if(var2!=NULL && var2->isConstant()) var2=NULL; // to use MinProfile 1D instead of 2D //taking large profile for(int iProfile=2; iProfile<4; iProfile++){ if(var2==NULL) MinProfile(var, smearer, iProfile, min_old, min); //updateError += MinProfile(var, smearer, iProfile, min_old, min); From 4a7a5761a95bb8f3d7b155b05a95afff020ebe7f Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 26 Jul 2013 13:16:06 +0200 Subject: [PATCH 076/475] fixed filters for skims for ntuples --- ALCARAW_RECO/python/WZElectronSkims_cff.py | 26 +++++++++++++++------- ALCARAW_RECO/python/alcaSkimming.py | 12 +++++----- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index 7cd7a33fbec..be296645420 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -139,6 +139,10 @@ ) ) +#------------------------------ electronID producer +from Calibration.EleSelectionProducers.eleselectionproducers_cfi import * +# process.EleSelectionProducers + SCselector = cms.EDFilter("SuperClusterSelector", src = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower'), cut = cms.string('(eta>2.4 || eta<-2.4) && (energy*sin(position.theta)> 15)') @@ -150,8 +154,14 @@ particleType = cms.string('gamma') ) +selectedCands = cms.EDFilter("AssociatedVariableMaxCutCandRefSelector", + src = cms.InputTag("eleSelectionProducers:loose"), + max = cms.double("0.5") + ) + eleSelSeq = cms.Sequence( - PassingVeryLooseId + PassingMediumId + PassingTightId +SCselector+eleSC ) + PassingVeryLooseId + PassingMediumId + PassingTightId + #(eleSelectionProducers * selectedCands) + + (SCselector*eleSC)) ############################################################ @@ -164,7 +174,6 @@ ) - #met, mt cuts for W selection MT="sqrt(2*daughter(0).pt*daughter(1).pt*(1 - cos(daughter(0).phi - daughter(1).phi)))" MET_CUT_MIN = 20. @@ -178,16 +187,16 @@ ) -WZSelector = cms.EDProducer("CandMerger", - src = cms.VInputTag("WenuSelector", "ZeeSelector") - ) - - EleSCSelector = cms.EDProducer("CandViewShallowCloneCombiner", - decay = cms.string("PassingTightId eleSC"), + decay = cms.string("PassingVeryLooseId eleSC"), checkCharge = cms.bool(False), cut = cms.string("mass > 40 && mass < 140") ) +WZSelector = cms.EDProducer("CandMerger", + src = cms.VInputTag("WenuSelector", "ZeeSelector", "EleSCSelector") + ) + + ############################################################ # Filters @@ -211,6 +220,7 @@ src = cms.InputTag("eleSC"), minNumber = cms.uint32(1) ) +FilterSeq = cms.Sequence(eleSelSeq * (ZeeSelector + WenuSelector + EleSCSelector)) ZeeFilterSeq = cms.Sequence(eleSelSeq * ZeeSelector * ZeeFilter) WenuFilterSeq = cms.Sequence(eleSelSeq * WenuSelector * WenuFilter) WZFilterSeq = cms.Sequence(eleSelSeq * WZFilter) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 1acfee39286..65f5682d426 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -334,11 +334,11 @@ ] process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCASKIM") if(ZSkim): - process.NtupleFilterSeq= cms.Sequence(process.ZeeFilterSeq) + process.NtupleFilterSeq= cms.Sequence(process.ZeeFilter) elif(WSkim): - process.NtupleFilterSeq= cms.Sequence(process.WenuFilterSeq) + process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter) elif(ZSCSkim): - process.NtupleFilterSeq= cms.Sequence(process.ZSCFilterSeq) + process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * process.ZSCFilterSeq) else: process.NtupleFilterSeq = cms.Sequence() @@ -478,7 +478,7 @@ (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * - ~process.ZeeFilter * process.WenuFilterSeq * + ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilterSeq * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) process.pathALCARECOEcalUncalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * @@ -492,9 +492,11 @@ process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * process.seqALCARECOEcalCalElectron) process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * - ~process.ZeeFilter * process.WenuFilterSeq * + process.FilterSeq * + ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter * process.seqALCARECOEcalCalElectron) process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * + process.FilterSeq * ~process.ZeeFilter * process.ZSCFilterSeq * process.seqALCARECOEcalCalElectron) From 6419633995e9749c11052ca0427167382310485a Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 26 Jul 2013 15:42:02 +0200 Subject: [PATCH 077/475] first import of documentation --- README | 119 ---------------------------------------------------- README.md | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 118 insertions(+), 123 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 3aff2f0c16a..00000000000 --- a/README +++ /dev/null @@ -1,119 +0,0 @@ -/** -* \mainpage -* Introduction: \ref page1 -* -*/ -/** -* \page page1 Code instructions and explanations -* \verbatim -############################################################ -## ECALELF (Ecal CALibration with ELectrons Framework) -## study and calibration with Zee and E/p -## Code instructions and explanations -############################################################ - -All the code needed to the ECAL studies and calibration with Zee is -available in this package. - -This and other README file in the package are the only documentation -provided. - -The code in this package takes the name of ECALELF -(Ecal CALibration with ELectrons Framework) -In each subfolder you will find a README in the doc/ directory -containing all the relevant informations about the module and it's -use. - -Informations for the implementation or re-implementation can be -obtained looking the the various header files that will be completed -with exaustive documentation (in the future) - -If you have doxygen, you can run the command -doxygen fulldoc -from the calibration/ directory and you can navigate instructions and code with -firefox doc/doxygen/fulldoc/html/index.html - -============================== Introduction - -The general calibration workflow is: - 1a) start from RAW-RECO - 1.1a) apply a ZSkim or WSkim selection to reduce the size of the dataset - 2a) produce the ALCARAW: - in this format most of the collections are - dropped and only the electrons, the uncalibrated rec hits - and few other collections like the beamspot, the conversions, the - rhoFastJet are kept - 3a) Apply whatever ECAL tags (ADCtoGeV, IC, LC, Alpha) needed for test - or calibration and produce a new file in ALCARECO format. - The new file has a reduced collection of calibrated rechit of the - reco electrons, new SC collections produced with the new calibrated - recHits, the old reco electrons with a new SC associated - CAVEAT: all the electron variables are still the old RECO one, - only the reference to the new SC has been updated. This will not be - fixed, since it's a wanted feature that ensures that the selected - events are not changed and permit to check effectively the impact - of the calibration on the same events. - 4) calculate new electron energies with the EleNewEnergiesProducer - that creates ValueMaps that associate a float (the new energy) to - the electrons - 5) define if the electron pass some selections running the - EleSelectionProducer that creates valueMaps of floats with the - following meaning: - for cut-based selections 1=pass, 0=fail - for MVA selections the float is the output of the MVA - 6.0) for MC, produce an association map between reco electron and gen - electron (data-MC match) - 6.1) produce a patElectron collection where the electronID floats and - the new energies are imported by the patElectron and accessible by - electron.electronID("selectionName") - electron.userFloat("energyName") - the gen electron identified by the data-MC matching step are - embended in the patElectron and accessible by: - electron.genLepton().eta() - electron.genLepton().energy() - 7) Filter the events requiring that the electron has passed at least - one selection - 8) dump the event content to a flat tree with one entry for Zee - candidate (the variables are array of two elements with one electron - per element) - 9) Run the analysis tools (Z fitter, smearing, etc.) - - - -In case the purpose is just to run on a particular dataset without any -recalibration step, the 1-3a) steps can be replaced by - - 1b) Start from RECO or AOD - 2b) Produce directly the ALCARECO, dropping all the unuseful - collections and reducing the recHit maps to the one related to - the electrons - 3b) nothing - -## For further implementations -#Step 5) could be done after step 1) since electronID and isolations -#are not updated by the sandbox recalibration and then could be -#performed just once. - - -============================== Code download and setup area (for bash shell) -The recommended release for 2012 data is the 5_3_7_patch5 -The recommended release for 2011 data is 4_2_8_patch7 - -if you have not the release area: -svn export svn+ssh://svn.cern.ch/reps/analysis/trunk/calibration/setup.sh -./setup.sh CMSSW_5_3_7_patch5 -cd CMSSW_5_3_7_patch5/src/ -cmsenv - - -Instructions for ALCARAW and/or ALCARECO production are in -calibration/ALCARAW_RECO/doc/README - -Instructions for ntuple production is in -calibration/ZNtupledDumper/doc/README - - - -Good luck! -\endverbatim -*/ diff --git a/README.md b/README.md index 3c5e62a0dd5..3aff2f0c16a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,119 @@ -ECALELF -======= +/** +* \mainpage +* Introduction: \ref page1 +* +*/ +/** +* \page page1 Code instructions and explanations +* \verbatim +############################################################ +## ECALELF (Ecal CALibration with ELectrons Framework) +## study and calibration with Zee and E/p +## Code instructions and explanations +############################################################ -Code for electron calibration in CMS -Testing \ No newline at end of file +All the code needed to the ECAL studies and calibration with Zee is +available in this package. + +This and other README file in the package are the only documentation +provided. + +The code in this package takes the name of ECALELF +(Ecal CALibration with ELectrons Framework) +In each subfolder you will find a README in the doc/ directory +containing all the relevant informations about the module and it's +use. + +Informations for the implementation or re-implementation can be +obtained looking the the various header files that will be completed +with exaustive documentation (in the future) + +If you have doxygen, you can run the command +doxygen fulldoc +from the calibration/ directory and you can navigate instructions and code with +firefox doc/doxygen/fulldoc/html/index.html + +============================== Introduction + +The general calibration workflow is: + 1a) start from RAW-RECO + 1.1a) apply a ZSkim or WSkim selection to reduce the size of the dataset + 2a) produce the ALCARAW: + in this format most of the collections are + dropped and only the electrons, the uncalibrated rec hits + and few other collections like the beamspot, the conversions, the + rhoFastJet are kept + 3a) Apply whatever ECAL tags (ADCtoGeV, IC, LC, Alpha) needed for test + or calibration and produce a new file in ALCARECO format. + The new file has a reduced collection of calibrated rechit of the + reco electrons, new SC collections produced with the new calibrated + recHits, the old reco electrons with a new SC associated + CAVEAT: all the electron variables are still the old RECO one, + only the reference to the new SC has been updated. This will not be + fixed, since it's a wanted feature that ensures that the selected + events are not changed and permit to check effectively the impact + of the calibration on the same events. + 4) calculate new electron energies with the EleNewEnergiesProducer + that creates ValueMaps that associate a float (the new energy) to + the electrons + 5) define if the electron pass some selections running the + EleSelectionProducer that creates valueMaps of floats with the + following meaning: + for cut-based selections 1=pass, 0=fail + for MVA selections the float is the output of the MVA + 6.0) for MC, produce an association map between reco electron and gen + electron (data-MC match) + 6.1) produce a patElectron collection where the electronID floats and + the new energies are imported by the patElectron and accessible by + electron.electronID("selectionName") + electron.userFloat("energyName") + the gen electron identified by the data-MC matching step are + embended in the patElectron and accessible by: + electron.genLepton().eta() + electron.genLepton().energy() + 7) Filter the events requiring that the electron has passed at least + one selection + 8) dump the event content to a flat tree with one entry for Zee + candidate (the variables are array of two elements with one electron + per element) + 9) Run the analysis tools (Z fitter, smearing, etc.) + + + +In case the purpose is just to run on a particular dataset without any +recalibration step, the 1-3a) steps can be replaced by + + 1b) Start from RECO or AOD + 2b) Produce directly the ALCARECO, dropping all the unuseful + collections and reducing the recHit maps to the one related to + the electrons + 3b) nothing + +## For further implementations +#Step 5) could be done after step 1) since electronID and isolations +#are not updated by the sandbox recalibration and then could be +#performed just once. + + +============================== Code download and setup area (for bash shell) +The recommended release for 2012 data is the 5_3_7_patch5 +The recommended release for 2011 data is 4_2_8_patch7 + +if you have not the release area: +svn export svn+ssh://svn.cern.ch/reps/analysis/trunk/calibration/setup.sh +./setup.sh CMSSW_5_3_7_patch5 +cd CMSSW_5_3_7_patch5/src/ +cmsenv + + +Instructions for ALCARAW and/or ALCARECO production are in +calibration/ALCARAW_RECO/doc/README + +Instructions for ntuple production is in +calibration/ZNtupledDumper/doc/README + + + +Good luck! +\endverbatim +*/ From e8d596c821fbcc43c626ee0ec98ce2626bb7fe83 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 27 Jul 2013 19:28:05 +0200 Subject: [PATCH 078/475] skim filters for al the processes --- ALCARAW_RECO/python/alcaSkimming.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 65f5682d426..41c85d3c66e 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -570,6 +570,21 @@ ############################################################ # Schedule definition ############################## +if(options.skim=='WSkim'): + process.outputALCARAW.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalUncalWElectron') + ) + process.outputALCARECO.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalCalWElectron') + ) +elif(options.skim=='ZSkim'): + process.outputALCARAW.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron') + ) + process.outputALCARECO.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalZSCElectron') + ) + if(options.type=='ALCARAW'): process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step, process.reconstruction_step,process.endjob_step, @@ -580,14 +595,6 @@ process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules - if(options.skim=='WSkim'): - process.outputALCARAW.SelectEvents = cms.untracked.PSet( - SelectEvents = cms.vstring('pathALCARECOEcalUncalWElectron') - ) - elif(options.skim=='ZSkim'): - process.outputALCARAW.SelectEvents = cms.untracked.PSet( - SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron') - ) elif(options.type=='ALCARERECO'): process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, process.NtuplePath) From 652fa6254bc8786c54995727f72f5e91e59a8133 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 29 Jul 2013 10:36:20 +0200 Subject: [PATCH 079/475] added ValueMapTraslator --- ValueMapTraslator/BuildFile.xml | 7 + .../python/valuemaptraslator_cfi.py | 8 + ValueMapTraslator/src/ValueMapTraslator.cc | 175 ++++++++++++++++++ ValueMapTraslator/valuemaptraslator_cfg.py | 26 +++ 4 files changed, 216 insertions(+) create mode 100644 ValueMapTraslator/BuildFile.xml create mode 100644 ValueMapTraslator/python/valuemaptraslator_cfi.py create mode 100644 ValueMapTraslator/src/ValueMapTraslator.cc create mode 100644 ValueMapTraslator/valuemaptraslator_cfg.py diff --git a/ValueMapTraslator/BuildFile.xml b/ValueMapTraslator/BuildFile.xml new file mode 100644 index 00000000000..e18030de98b --- /dev/null +++ b/ValueMapTraslator/BuildFile.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py new file mode 100644 index 00000000000..e854257d72c --- /dev/null +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', + inputCollection = cms.InputTag('elPFIsoValueCharged03PFId'), + outputCollection = cms.untracked.string(''), + referenceCollection = cms.InputTag('electronRecalibSCAssociator') + ) + diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc new file mode 100644 index 00000000000..b6547864978 --- /dev/null +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -0,0 +1,175 @@ +// -*- C++ -*- +// +// Package: ValueMapTraslator +// Class: ValueMapTraslator +// +/**\class ValueMapTraslator ValueMapTraslator.cc Calibration/ValueMapTraslator/src/ValueMapTraslator.cc + + Description: [one line class summary] + + Implementation: + [Notes on implementation] +*/ +// +// Original Author: Shervin Nourbakhsh,32 4-C03,+41227672087, +// Created: Sat Jul 13 15:40:56 CEST 2013 +// $Id$ +// +// + + +// system include files +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDProducer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" + +// +// class declaration +// + +class ValueMapTraslator : public edm::EDProducer { + typedef double value_t; + typedef edm::ValueMap Map_t; + + public: + explicit ValueMapTraslator(const edm::ParameterSet&); + ~ValueMapTraslator(); + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + private: + virtual void beginJob() ; + virtual void produce(edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + + virtual void beginRun(edm::Run&, edm::EventSetup const&); + virtual void endRun(edm::Run&, edm::EventSetup const&); + virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + + // ----------member data --------------------------- + edm::InputTag referenceCollectionTAG; + edm::InputTag inputCollectionTAG; + std::string outputCollectionName; + edm::Handle referenceHandle; + edm::Handle inputHandle; +}; + +// +// constants, enums and typedefs +// + + +// +// static data member definitions +// + +// +// constructors and destructor +// +ValueMapTraslator::ValueMapTraslator(const edm::ParameterSet& iConfig): + referenceCollectionTAG(iConfig.getParameter("referenceCollection")), + inputCollectionTAG(iConfig.getParameter("inputCollection")), + outputCollectionName(iConfig.getParameter("outputCollection")) +{ + //now do what ever other initialization is needed + /// \todo outputCollectionName = inputCollection+postfix + produces< Map_t >(outputCollectionName); + +} + + +ValueMapTraslator::~ValueMapTraslator() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to produce the data ------------ +void +ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + std::vector valueVector; + std::auto_ptr valueVectorPtr(new Map_t()); + + //------------------------------ + iEvent.getByLabel(referenceCollectionTAG, referenceHandle); + iEvent.getByLabel(inputCollectionTAG, inputHandle); + + for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); + valueMap_itr != inputHandle->end(); + valueMap_itr++){ + } + Map_t::Filler filler(*valueVectorPtr); + filler.insert(referenceHandle, valueVector.begin(), valueVector.end()); + filler.fill(); + + iEvent.put(valueVectorPtr); + +} + +// ------------ method called once each job just before starting event loop ------------ +void +ValueMapTraslator::beginJob() +{ +} + +// ------------ method called once each job just after ending the event loop ------------ +void +ValueMapTraslator::endJob() { +} + +// ------------ method called when starting to processes a run ------------ +void +ValueMapTraslator::beginRun(edm::Run&, edm::EventSetup const&) +{ +} + +// ------------ method called when ending the processing of a run ------------ +void +ValueMapTraslator::endRun(edm::Run&, edm::EventSetup const&) +{ +} + +// ------------ method called when starting to processes a luminosity block ------------ +void +ValueMapTraslator::beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) +{ +} + +// ------------ method called when ending the processing of a luminosity block ------------ +void +ValueMapTraslator::endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) +{ +} + +// ------------ method fills 'descriptions' with the allowed parameters for the module ------------ +void +ValueMapTraslator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + //The following says we do not know what parameters are allowed so do no validation + // Please change this to state exactly what you do use, even if it is no parameters + edm::ParameterSetDescription desc; + desc.setUnknown(); + descriptions.addDefault(desc); +} + +//define this as a plug-in +DEFINE_FWK_MODULE(ValueMapTraslator); diff --git a/ValueMapTraslator/valuemaptraslator_cfg.py b/ValueMapTraslator/valuemaptraslator_cfg.py new file mode 100644 index 00000000000..58f3adea002 --- /dev/null +++ b/ValueMapTraslator/valuemaptraslator_cfg.py @@ -0,0 +1,26 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("OWNPARTICLES") + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + # replace 'myfile.root' with the source file you want to use + fileNames = cms.untracked.vstring( + 'file:myfile.root' + ) +) + +process.myProducerLabel = cms.EDProducer('ValueMapTraslator' +) + +process.out = cms.OutputModule("PoolOutputModule", + fileName = cms.untracked.string('myOutputFile.root') +) + + +process.p = cms.Path(process.myProducerLabel) + +process.e = cms.EndPath(process.out) From 2163a873add64b4ced0c0662d6545dfd36d45858 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 29 Jul 2013 10:42:57 +0200 Subject: [PATCH 080/475] added valuemap traslator sequence in rereco, to be checked --- .../python/valuemaptraslator_cfi.py | 15 ++++++++++++-- ValueMapTraslator/src/ValueMapTraslator.cc | 20 ++++++++++++++++++- ZNtupleDumper/python/ntupledumper_cff.py | 5 +++++ 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 ZNtupleDumper/python/ntupledumper_cff.py diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index e854257d72c..2669c984642 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -1,8 +1,19 @@ import FWCore.ParameterSet.Config as cms elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueCharged03PFId'), - outputCollection = cms.untracked.string(''), + inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), + outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) +elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', + inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), + outputCollection = cms.string(''), + referenceCollection = cms.InputTag('electronRecalibSCAssociator') + ) + +elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', + inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdGsf'), + outputCollection = cms.string(''), + referenceCollection = cms.InputTag('electronRecalibSCAssociator') + ) diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index b6547864978..54868145ee3 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -33,6 +33,7 @@ #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" +//#define DEBUG // // class declaration // @@ -113,11 +114,28 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) //------------------------------ iEvent.getByLabel(referenceCollectionTAG, referenceHandle); iEvent.getByLabel(inputCollectionTAG, inputHandle); - + for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); valueMap_itr != inputHandle->end(); valueMap_itr++){ + for(unsigned int i = 0; i < valueMap_itr.size(); i++){ +#ifdef DEBUG + std::cout << valueMap_itr[i] << std::endl; +#endif + valueVector.push_back((valueMap_itr[i])); //valueMap_itr-inputHandle->begin()])); + } + } + +#ifdef DEBUG + std::cout << "Size: " << referenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; + + for(reco::GsfElectronCollection::const_iterator electron = referenceHandle->begin(); + electron!= referenceHandle->end(); + electron++){ + reco::GsfElectronRef eleRef(referenceHandle, electron-referenceHandle->begin()); + std::cout << (*inputHandle)[eleRef] << std::endl; } +#endif Map_t::Filler filler(*valueVectorPtr); filler.insert(referenceHandle, valueVector.begin(), valueVector.end()); filler.fill(); diff --git a/ZNtupleDumper/python/ntupledumper_cff.py b/ZNtupleDumper/python/ntupledumper_cff.py new file mode 100644 index 00000000000..98490dc0c7e --- /dev/null +++ b/ZNtupleDumper/python/ntupledumper_cff.py @@ -0,0 +1,5 @@ +from Calibration.ZNtupleDumper.patSequence_cff import * +from Calibration.ZNtupleDumper.zntupledumper_cfi import * +from Calibration.JsonFilter.jsonFilter_cfi import * + + From 7a5bcd82650c1de05f5cffef515e2037c9cf333d Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 31 Jul 2013 16:25:58 +0200 Subject: [PATCH 081/475] removed points in dataset if nll not updated --- ZFitter/src/RooSmearer.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 22e8d31482a..bb8a5f7fde9 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -504,6 +504,11 @@ float RooSmearer::getCompatibility() const #endif } //if(withSmearToy) std::cout << "[DEBUG] Compatibility2: " << compatibility << "\t" << compatibility - nllMin << std::endl; + if(dataset!=NULL && lastNLL!=compatibility){ + myClass->nllVar.setVal(compatibility); + myClass->dataset->add(RooArgSet(_paramSet,nllVar)); + } + myClass->lastNLL=compatibility; myClass->lastNLLrms=sqrt(lastNLLrms); @@ -514,6 +519,7 @@ float RooSmearer::getCompatibility() const myClass->nllMin=compatibility; } } + // myClock->Stop(); // myClock->Print(); return compatibility; @@ -558,10 +564,6 @@ Double_t RooSmearer::evaluate() const double weight=(nllBase*2-comp_mean); if(weight<0) weight=1; myClass->_markov.AddFast(myClass->_paramSet, comp_mean, weight); - if(dataset!=NULL){ - myClass->nllVar.setVal(comp_mean); - myClass->dataset->add(RooArgSet(_paramSet,nllVar)); - } #ifdef CPU_DEBUG /// myClock->Stop(); // std::cout << "Elapsed time for add to MarkovChain: CPU " << myClock->CpuTime() << "; Real " << myClock->RealTime() << " s " << std::endl; From 45c882841d4cefd54f255438f66fb457c9df3f0d Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 2 Aug 2013 15:12:41 +0200 Subject: [PATCH 082/475] fixing the script --- ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 4ed355f3ad4..060665c747f 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -36,7 +36,7 @@ if [ -z "${UI_WORKING_DIR}" ]; then fi -echo "" > tmp/sed.sed +echo "/# check output file/ i file_list=\"\"" > tmp/sed.sed outFiles=`grep 'if \[ -e .*root' ${UI_WORKING_DIR}/job/CMSSW.sh | sed 's|.*-e ./||;s|.root.*|.root|'` #echo $outFiles for outFile in $outFiles @@ -48,18 +48,21 @@ done outFiles_base=`echo $outFiles_base | sed 's|^,|{|;s|$|}|'` #echo $outFiles_base + + for outFile in $outFiles do outFile_base=`basename $outFile .root` cat >> tmp/sed.sed < tmp/CMSSW.sh From 17cb560d1b1e3fe3528677301ebac45bb6bb9a26 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 2 Aug 2013 15:18:54 +0200 Subject: [PATCH 083/475] split arguments to be fixed --- ALCARAW_RECO/scripts/splitArguments.sh | 153 +++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100755 ALCARAW_RECO/scripts/splitArguments.sh diff --git a/ALCARAW_RECO/scripts/splitArguments.sh b/ALCARAW_RECO/scripts/splitArguments.sh new file mode 100755 index 00000000000..3b421b780fc --- /dev/null +++ b/ALCARAW_RECO/scripts/splitArguments.sh @@ -0,0 +1,153 @@ +#!/bin/bash +usage(){ + echo "`basename $0` -u crab_workind_dir" + echo " -u | --ui_working_dir crab_working_dir" +} + +if ! options=$(getopt -u -o hu: -l help,ui_working_dir: -- "$@") +then + # something went wrong, getopt will put out an error message for us + exit 1 +fi + +set -- $options + +while [ $# -gt 0 ] +do + case $1 in + -h|--help) usage; exit 0;; + -u | --ui_working_dir) UI_WORKING_DIR=$2; shift;; + (--) shift; break;; + (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; + (*) break;; + esac + shift +done + +if [ -z "${UI_WORKING_DIR}" ]; then + echo "[ERROR] crab working directory not specified" >> /dev/stderr + usage >> /dev/stderr + exit 1 +fi + + +argumentfile=${UI_WORKING_DIR}/share/arguments.xml + +if [ -e "${UI_WORKING_DIR}/share/arguments.xml-bak" ];then + cp ${UI_WORKING_DIR}/share/arguments.xml-bak $argumentfile +else + cp $argumentfile ${UI_WORKING_DIR}/share/arguments.xml-bak +fi + +filelist=`sed 's|.*InputFiles="||;s|".*||;/Job/ d;/arguments/ d;s|,| |g' $argumentfile | sort | uniq` + +#if [ ! -e "${UI_WORKING_DIR}/share/eventList.dat" ];then +# cp eventList.dat ${UI_WORKING_DIR}/share/eventList.dat +#fi + +# list of events per file +if [ ! -e "${UI_WORKING_DIR}/share/eventList.dat" ];then + for file in $filelist + do + nEvents=`DAS.py --query="file file=$file | grep file.nevents" | sed '1,3 d'` + echo -e "$nEvents\t$file" >> ${UI_WORKING_DIR}/share/eventList.dat + done +fi + +# remove the line with the end-tag and place it at the end of the corresponding tag +sed -i '\c[ ]*c d; s| >| >|;' $argumentfile + +for file in $filelist + do + nEvents=`grep $file ${UI_WORKING_DIR}/share/eventList.dat | cut -f 1` + # remove empty files + if [ "${nEvents}" == "0" ];then + sed -i "s|$file||" $argumentfile + else + if [ "${nEvents}" -le "4000" ];then + a=1 + else + jobIDs=`grep $file $argumentfile | sed 's|.*JobID="||;s|".*||'` + if [ "`echo $jobIDs | wc -w`" != "1" ];then + + emptyJobID=`grep 'InputFiles=""' $argumentfile | head -1 | sed 's|.*JobID="||;s|".*||'` + if [ "${emptyJobID}" != "" ];then + echo "Replacing empty job ${emptyJobID} with file $file" + sed -i "s|$file||" $argumentfile + sed -i "/JobID=\"${emptyJobID}\"/{s|InputFiles=\"\"|InputFiles=\"$file\"|}" $argumentfile + else + sed "/${jobIDs[0]}/ {p;s|${jobIDs[0]}|${newJobID}|} " + # have to put a new job + echo "Error: $file" + exit 1 + fi + fi + jobID=${jobIDs[0]} + while [ "$nEvents" -gt "4000" ]; do + let nEvents=$nEvents-3000 + emptyJobID=`grep 'InputFiles=""' $argumentfile | head -1 | sed 's|.*JobID="||;s|".*||'` + if [ "${emptyJobID}" != "" ];then + newJobID=${emptyJobID} + sed -i "/JobID=\"${emptyJobID}\"/ d" $argumentfile + else + let jobIDmax=$jobIDmax+1 + newJobID=${jobIDmax}; + fi + echo $jobID $jobIDmax $newJobID $nEvents + sed -i "/JobID=\"$jobID\"/ {/MaxEvents=\"-1\"/{p;s|MaxEvents=\"-1\"|MaxEvents=\"3000\"|;s|SkipEvents=\"0\"|SkipEvents=\"${nEvents}\"|;s|JobID=\"$jobID\"|JobID=\"${newJobID}\"|;s|$||}}" ${argumentfile} + done + sed -i "/JobID=\"$jobID\"/ {s|MaxEvents=\"-1\"|MaxEvents=\"$nEvents\"|}" $argumentfile + + #else + # echo "Error $file not in $argumentfile" + #fi + fi + fi + +done + +exit 0 + +sed -i '\c^[ ]*c d; s| >$| >|;' $argumentfile +sed -i 's|||' $argumentfile + +exit 0 +#removing jobID without input files +echo "JobIDmax = $jobIDmax" +emptyJobID=`sed '/InputFiles=""/ d;s|.*JobID="||;s|".*||;\cc d;/arguments/ d;/InputFiles=\"\"/ d' prod_alcaraw/SingleElectron-WSkim-RUN2012A-22Jan-v1/190645-193621/share/arguments.xml | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` +while [ "${emptyJobID}" != "1" ]; do + echo "remove emptyJob: ${emptyJobID}" + sed -i "\cJobID=\"${emptyJobID}\"c d" ${argumentfile} + sed -i "s|JobID=\"${jobIDmax}\"|JobID=\"${emptyJobID}\"|" ${argumentfile} + emptyJobID=`sed '/InputFiles=""/ d;s|.*JobID="||;s|".*||;\cc d;/arguments/ d;/InputFiles=\"\"/ d' prod_alcaraw/SingleElectron-WSkim-RUN2012A-22Jan-v1/190645-193621/share/arguments.xml | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` +done +echo "JobIDmax = $jobIDmax" + +jobIDmax=`grep JobID ${argumentfile} | wc -l` +cp $argumentfile tmp/arguments.xml || exit 1 +while [ "${jobIDmax}" -gt "5000" ];do + let jobIDmax=$jobIDmax-4000 + sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=4000\nnumber_of_jobs=4000\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 + sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-${jobIDmax}" tmp/crab.cfg + sed -i "/user_remote_dir/ {s|\$|/sub-${jobIDmax}|}" tmp/crab.cfg +# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 + crab -cfg tmp/crab.cfg -create || exit 1 + awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID>$jobIDmax && jobID<$jobIDmax+4000){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-${jobIDmax}/share/arguments.xml || exit 1 + +done + +sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=${jobIDmax}\nnumber_of_jobs=${jobIDmax}\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 +sed -i '/user_remote_dir/ {s|$|/sub-0|}' tmp/crab.cfg || exit 1 + sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-0" tmp/crab.cfg +# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 + crab -cfg tmp/crab.cfg -create || exit 1 + awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID<=$jobIDmax){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-0/share/arguments.xml || exit 1 + + +exit 0 + +exit 0 + + + +#/store/data/Run2012A/SingleElectron/RAW/v1/000/190/949/B825DB4C-FC83-E111-B69D-0019B9F581C9.root \ No newline at end of file From 33b27337b33d94a6143c2b2071775f70623b34cb Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 3 Aug 2013 13:30:20 +0200 Subject: [PATCH 084/475] toy mc generation with 1/3 of mc events as data --- ZFitter/bin/ZFitter.cpp | 6 ++- ZFitter/interface/RooSmearer.hh | 4 +- ZFitter/interface/SmearingImporter.hh | 4 +- ZFitter/src/RooSmearer.cc | 62 +++++++++++++-------------- ZFitter/src/SmearingImporter.cc | 27 +++++++++--- 5 files changed, 59 insertions(+), 44 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index d8a261e94a0..b4f1bf70513 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1819,6 +1819,8 @@ int main(int argc, char **argv) { TString varName=*region_itr; TPRegexp reg("Et_[0-9]*_[0-9]*"); reg.Substitute(varName,""); + TPRegexp reg2("energySC_[0-9]*_[0-9]*"); + reg2.Substitute(varName,""); varName.ReplaceAll("--","-"); if(varName.First("-")==0) varName.Remove(0,1); @@ -1832,7 +1834,7 @@ int main(int argc, char **argv) { //const_term_v->setConstant(true); args.add(*const_term_v); } - if(reg.MatchB(*region_itr) && vm.count("constTermFix")==1){ + if((reg.MatchB(*region_itr) || reg2.MatchB(*region_itr) )&& vm.count("constTermFix")==1){ const_term_ = new RooFormulaVar("constTerm_"+*region_itr, "constTerm_"+varName,"@0", *const_term_v); const_term_v->setConstant(false); } else const_term_ = const_term_v; @@ -2140,7 +2142,7 @@ int main(int argc, char **argv) { double min=0.; TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList.find(alphaName): NULL; - if(var2!=NULL && name.Contains("constTerm") && var2->isConstant()==false){ + if(var2!=NULL && name.Contains("constTerm")){ // && var2->isConstant()==false){ smearer.SetDataSet(name,TString(var->GetName())+TString(var2->GetName())); MinProfile2D(var, var2, smearer, -1, 0., min, false); //MinMCMC2D(var, var2, smearer, 1, 0., min, 1200, false); diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index fbba4d19610..6fb37c233f4 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -147,7 +147,7 @@ public: } /// Initialize the categories: import from the tree - void Init(TString commonCut, TString eleID, Long64_t nEvents=0, bool mcToy=false, TString initFile=""); + void Init(TString commonCut, TString eleID, Long64_t nEvents=0, bool mcToy=false, bool externToy=true,TString initFile=""); // TH1F *GetSmearedHisto(TString categoryName, // bool smearEnergy=false, TString histoName="") const; // TH1F *GetSmearedHisto(int categoryIndex, @@ -216,7 +216,7 @@ public: RooStats::MarkovChain _markov; private: - void SetCache(Long64_t nEvents=0, bool cacheToy=false); + void SetCache(Long64_t nEvents=0, bool cacheToy=false, bool externToy=true); void InitCategories(bool mcToy=false); //double smearedEnergy(float ene,float scale,float alpha,float diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index 002036bfcd1..13eca5c5402 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -33,7 +33,7 @@ public: inline void SetRegionList(std::vector regionList){ _regionList=regionList;}; - regions_cache_t GetCache(TChain *_chain, bool isMC, bool odd, Long64_t nEvents=0); + regions_cache_t GetCache(TChain *_chain, bool isMC, bool odd, Long64_t nEvents=0, bool isToy=false, bool externToy=true); regions_cache_t GetCacheToy(Long64_t nEvents, bool isMC); inline void SetPuWeight(bool value){_usePUweight=value;}; @@ -65,7 +65,7 @@ private: void Import(TTree *chain, event_cache_t& eventCache, TEntryList *entryList, bool swap=false); //void Import(TTree *chain, event_cache_t& eventCache, TTreeFormula *selector, bool swap=false); - void Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents=0); + void Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents=0, bool isToy=false, bool externToy=true); void ImportToy(Long64_t nEvents, event_cache_t& eventCache, bool isMC); }; diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index bb8a5f7fde9..a76bae7574e 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -85,14 +85,14 @@ RooSmearer::RooSmearer(const char *name, ///< name of the variable } -void RooSmearer::SetCache(Long64_t nEvents, bool cacheToy){ +void RooSmearer::SetCache(Long64_t nEvents, bool cacheToy, bool externToy){ std::cout << "------------------------------------------------------------" << std::endl; std::cout << "[STATUS] Importing cache events" << std::endl; if(data_events_cache.empty()){ if(cacheToy){ std::cout << "[STATUS] --- Setting toy cache for data" << std::endl; - data_events_cache = importer.GetCacheToy(nEvents, false); + data_events_cache = importer.GetCache(_data_chain, false, false, nEvents, true, externToy); //importer.GetCacheToy(nEvents, false); }else { std::cout << "[STATUS] --- Setting cache for data" << std::endl; data_events_cache = importer.GetCache(_data_chain, false, false, nEvents); @@ -101,7 +101,7 @@ void RooSmearer::SetCache(Long64_t nEvents, bool cacheToy){ if(mc_events_cache.empty()){ if(cacheToy){ std::cout << "[STATUS] --- Setting toy cache for mc" << std::endl; - mc_events_cache = importer.GetCacheToy(nEvents, true); + mc_events_cache = importer.GetCache(_signal_chain, true, false, nEvents,true); //importer.GetCacheToy(nEvents, true); }else { std::cout << "[STATUS] --- Setting cache for mc" << std::endl; mc_events_cache = importer.GetCache(_signal_chain, true, false, nEvents); @@ -134,11 +134,12 @@ void RooSmearer::InitCategories(bool mcToy){ cat.categoryIndex1 = region_ele1_itr - importer._regionList.begin(); cat.categoryIndex2 = region_ele2_itr - importer._regionList.begin(); - if(!mcToy) cat.data_events = &(data_events_cache[index]); - else { - std::cout << "[INFO] Initializing data_events with mc" << std::endl; - cat.data_events = &(mc_events_cache[index]); - } +// if(!mcToy) cat.data_events = &(data_events_cache[index]); +// else { +// std::cout << "[INFO] Initializing data_events with mc" << std::endl; +// cat.data_events = &(mc_events_cache[index]); +// } + cat.data_events = &(data_events_cache[index]); cat.mc_events = &(mc_events_cache[index]); cat.categoryName1 += *region_ele1_itr; @@ -942,30 +943,29 @@ void RooSmearer::SetNSmear(unsigned int n_smear, unsigned int nlltoy){ } -void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool mcToy, TString initFile){ - _isDataSmeared=mcToy; - bool toytoy=false; - if(initFile.Sizeof()>1){ - std::cout << "[INFO] Truth values for toys initialized to " << std::endl; - //truthSet->readFromFile(initFile); - //truthSet->writeToStream(std::cout, kFALSE); - std::cout << "------------------------------ Read init toy MC:" << std::endl; - _paramSet.readFromFile(initFile); - _paramSet.writeToStream(std::cout, kFALSE); - } - SetCommonCut(commonCut); SetEleID(eleID); - SetCache(nEvents,toytoy); InitCategories(mcToy); - evaluate(); - if(mcToy){ - RooArgList argList(_paramSet); - TIterator *it = argList.createIterator(); - for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; var = (RooRealVar *)it->Next()){ - var->randomize(); - } - std::cout << "------------------------------ Randomize initial value:" << std::endl; - _paramSet.writeToStream(std::cout, kFALSE); +void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool mcToy, bool externToy, TString initFile){ + _isDataSmeared=externToy; //mcToy; + if(initFile.Sizeof()>1){ + std::cout << "[INFO] Truth values for toys initialized to " << std::endl; + //truthSet->readFromFile(initFile); + //truthSet->writeToStream(std::cout, kFALSE); + std::cout << "------------------------------ Read init toy MC:" << std::endl; + _paramSet.readFromFile(initFile); + _paramSet.writeToStream(std::cout, kFALSE); + } + SetCommonCut(commonCut); SetEleID(eleID); + SetCache(nEvents, mcToy, externToy); InitCategories(mcToy); + evaluate(); + if(mcToy){ + RooArgList argList(_paramSet); + TIterator *it = argList.createIterator(); + for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; var = (RooRealVar *)it->Next()){ + var->randomize(); } - return; + std::cout << "------------------------------ Randomize initial value:" << std::endl; + _paramSet.writeToStream(std::cout, kFALSE); + } + return; } void RooSmearer::UpdateCategoryNLL(ZeeCategory& cat, unsigned int nLLtoy, bool multiSmearToy){ diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 0d29cb68f58..c70c4f3e6c9 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -177,7 +177,7 @@ void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryLis } -void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents){ +void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents, bool isToy, bool externToy){ // for the energy calculation Float_t energyEle[2]; @@ -194,7 +194,13 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Int_t smearerCat[2]; bool hasSmearerCat=false; + + // for toy repartition + Long64_t eventNumber; + //------------------------------ + chain->SetBranchAddress("eventNumber", &eventNumber); + chain->SetBranchAddress(_energyBranchName, energyEle); if(chain->GetBranch("scaleEle")!=NULL){ std::cout << "[STATUS] Adding electron energy correction branch from friend" << std::endl; @@ -202,9 +208,11 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } if(chain->GetBranch("smearEle")!=NULL){ - std::cout << "[STATUS] Adding electron energy smearing branch from friend" << std::endl; - chain->SetBranchAddress("smearEle", smearEle_); - } + if(isToy==false || (externToy==true && isToy==true)){ + std::cout << "[STATUS] Adding electron energy smearing branch from friend" << std::endl; + chain->SetBranchAddress("smearEle", smearEle_); + } + } chain->SetBranchAddress("etaEle", etaEle); chain->SetBranchAddress("phiEle", phiEle); @@ -278,6 +286,11 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS for(Long64_t jentry=0; jentry < entries; jentry++){ Long64_t entryNumber= chain->GetEntryNumber(jentry); chain->GetEntry(entryNumber); + if(isToy){ + if(isMC && eventNumber%3==0) continue; + if(!isMC && eventNumber%3!=0) continue; + } + if (hasSmearerCat==false && chain->GetTreeNumber() != treenumber) { treenumber = chain->GetTreeNumber(); for(std::vector< std::pair >::const_iterator catSelector_itr = catSelectors.begin(); @@ -358,7 +371,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } -SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, bool isMC, bool odd, Long64_t nEvents){ +SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, bool isMC, bool odd, Long64_t nEvents, bool isToy, bool externToy){ TString eleID_="eleID_"+_eleID; @@ -374,7 +387,7 @@ SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, boo _chain->SetBranchStatus("etaEle", 1); _chain->SetBranchStatus("phiEle", 1); _chain->SetBranchStatus(_energyBranchName, 1); - + if(isToy) _chain->SetBranchStatus("eventNumber",1); // std::cout << _chain->GetBranchStatus("seedXSCEle") << std::endl; // std::cout << _chain->GetBranchStatus("etaEle") << std::endl; @@ -428,7 +441,7 @@ SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, boo } } - Import(_chain, cache, oddString, isMC, nEvents); + Import(_chain, cache, oddString, isMC, nEvents, isToy, externToy); #ifdef DEBUG int index=0; for(std::vector::const_iterator region_ele1_itr = _regionList.begin(); From 845242a3c1280e6f04158285781d392d87448ac8 Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 3 Aug 2013 16:58:43 +0200 Subject: [PATCH 085/475] fixed? splitArgument --- ALCARAW_RECO/scripts/splitArguments.sh | 125 ++++++++++++++++--------- 1 file changed, 82 insertions(+), 43 deletions(-) diff --git a/ALCARAW_RECO/scripts/splitArguments.sh b/ALCARAW_RECO/scripts/splitArguments.sh index 3b421b780fc..ff799eb947b 100755 --- a/ALCARAW_RECO/scripts/splitArguments.sh +++ b/ALCARAW_RECO/scripts/splitArguments.sh @@ -33,6 +33,18 @@ fi argumentfile=${UI_WORKING_DIR}/share/arguments.xml +while [ "${emptyJobID}" != "1" ]; do + echo "remove emptyJob: ${emptyJobID}" + sed -i "\cJobID=\"${emptyJobID}\"c d" ${argumentfile} + sed -i "s|JobID=\"${jobIDmax}\"|JobID=\"${emptyJobID}\"|" ${argumentfile} + emptyJobID=`sed '/InputFiles=""/ d;s|.*JobID="||;s|".*||;\cc d;/arguments/ d;/InputFiles=\"\"/ d' prod_alcaraw/SingleElectron-WSkim-RUN2012A-22Jan-v1/190645-193621/share/arguments.xml | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` +done +exit 0 + +#jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` +#awk "BEGIN{n=0};{if(/JobID=\"${jobIDmax}\"/){n++;job=${jobIDmax}+n;print job;line=\$0;sub(\"JobID=\\\"${jobIDmax}\\\"\",\"JobID=\\\"\"job\"\\\"\",line); print line} }" > tmp/argument.tmp + + if [ -e "${UI_WORKING_DIR}/share/arguments.xml-bak" ];then cp ${UI_WORKING_DIR}/share/arguments.xml-bak $argumentfile else @@ -57,46 +69,80 @@ fi # remove the line with the end-tag and place it at the end of the corresponding tag sed -i '\c[ ]*c d; s| >| >|;' $argumentfile -for file in $filelist +eventList=`cat ${UI_WORKING_DIR}/share/eventList.dat` +IFS=$'\n' +# for list in $eventList +# do +# #echo $list +# nEvents=`echo $list | cut -f 1` +# file=`echo $list | cut -f 2` + +# if [ "${nEvents}" == "0" ];then +# sed -i "s|$file||" $argumentfile +# fi +# done + +jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` +echo $jobIDmax +let jobIDmax=$jobIDmax+1 +sed -i "/InputFiles=\"[-/0-Z.]*,.*\"/{ + h; + :first + { + s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.]*\\).*\"|InputFiles=\"\\1\"|; p; + g;s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.,]*\\)\"|InputFiles=\"\\2\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; h; + }; } + :successive + { + /InputFiles=\"[-/0-Z.]*,.*\"/{ + s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.,]*\\)\"|InputFiles=\"\\1\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; p; + g;s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.,]*\\)\"|InputFiles=\"\\2\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; h; + } + }; t successive" $argumentfile + +nJobMax=`grep "jobID=\"$jobIDmax\"" $argumentfile |wc -l` +awk "BEGIN{n=0};{if(/JobID=\"${jobIDmax}\"/){n++;job=${jobIDmax}+n;print job;line=\$0;sub(\"JobID=\\\"${jobIDmax}\\\"\",\"JobID=\\\"\"job\"\\\"\",line); print line}else{print \$0} }" $argumentfile > tmp/argument.tmp +mv tmp/argument.tmp $argumentfile + +for list in $eventList do - nEvents=`grep $file ${UI_WORKING_DIR}/share/eventList.dat | cut -f 1` - # remove empty files - if [ "${nEvents}" == "0" ];then - sed -i "s|$file||" $argumentfile + #echo $list + nEvents=`echo $list | cut -f 1` + file=`echo $list | cut -f 2` + if [ "${nEvents}" == "0" ];then + continue; + fi + jobIDs=`grep $file $argumentfile | sed 's|.*JobID="||;s|".*||'` + jobID=${jobIDs[0]} + if [ "`echo $jobIDs | wc -w`" != "1" ];then + grep $file $argumentfile + echo "$nEvents $file" + continue + fi + + if [ "${nEvents}" -gt "4000" ];then + while [ "$nEvents" -gt "4000" ]; do + let nEvents=$nEvents-3000 + let jobIDmax=$jobIDmax+1 + newJobID=${jobIDmax}; +# echo $jobID $jobIDmax $newJobID $nEvents + sed -i "/JobID=\"$jobID\"/ {/MaxEvents=\"-1\"/{p;s|MaxEvents=\"-1\"|MaxEvents=\"3000\"|;s|SkipEvents=\"0\"|SkipEvents=\"${nEvents}\"|;s|JobID=\"$jobID\"|JobID=\"${newJobID}\"|}}" ${argumentfile} + done + sed -i "/JobID=\"$jobID\"/ {s|MaxEvents=\"-1\"|MaxEvents=\"$nEvents\"|}" $argumentfile + fi +done + +exit 0 +emptyJobID=`grep '/InputFiles=""/' $argumentfile` #| sed '{s|.*JobID="||;s|".*||}' | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` +echo $emptyJobID +exit 0 + +# remove empty files + echo else - if [ "${nEvents}" -le "4000" ];then - a=1 - else - jobIDs=`grep $file $argumentfile | sed 's|.*JobID="||;s|".*||'` - if [ "`echo $jobIDs | wc -w`" != "1" ];then - - emptyJobID=`grep 'InputFiles=""' $argumentfile | head -1 | sed 's|.*JobID="||;s|".*||'` - if [ "${emptyJobID}" != "" ];then - echo "Replacing empty job ${emptyJobID} with file $file" - sed -i "s|$file||" $argumentfile - sed -i "/JobID=\"${emptyJobID}\"/{s|InputFiles=\"\"|InputFiles=\"$file\"|}" $argumentfile - else - sed "/${jobIDs[0]}/ {p;s|${jobIDs[0]}|${newJobID}|} " - # have to put a new job - echo "Error: $file" - exit 1 - fi + fi jobID=${jobIDs[0]} - while [ "$nEvents" -gt "4000" ]; do - let nEvents=$nEvents-3000 - emptyJobID=`grep 'InputFiles=""' $argumentfile | head -1 | sed 's|.*JobID="||;s|".*||'` - if [ "${emptyJobID}" != "" ];then - newJobID=${emptyJobID} - sed -i "/JobID=\"${emptyJobID}\"/ d" $argumentfile - else - let jobIDmax=$jobIDmax+1 - newJobID=${jobIDmax}; - fi - echo $jobID $jobIDmax $newJobID $nEvents - sed -i "/JobID=\"$jobID\"/ {/MaxEvents=\"-1\"/{p;s|MaxEvents=\"-1\"|MaxEvents=\"3000\"|;s|SkipEvents=\"0\"|SkipEvents=\"${nEvents}\"|;s|JobID=\"$jobID\"|JobID=\"${newJobID}\"|;s|$||}}" ${argumentfile} - done - sed -i "/JobID=\"$jobID\"/ {s|MaxEvents=\"-1\"|MaxEvents=\"$nEvents\"|}" $argumentfile #else # echo "Error $file not in $argumentfile" @@ -114,13 +160,6 @@ sed -i 's|||' $argumentfile exit 0 #removing jobID without input files echo "JobIDmax = $jobIDmax" -emptyJobID=`sed '/InputFiles=""/ d;s|.*JobID="||;s|".*||;\cc d;/arguments/ d;/InputFiles=\"\"/ d' prod_alcaraw/SingleElectron-WSkim-RUN2012A-22Jan-v1/190645-193621/share/arguments.xml | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` -while [ "${emptyJobID}" != "1" ]; do - echo "remove emptyJob: ${emptyJobID}" - sed -i "\cJobID=\"${emptyJobID}\"c d" ${argumentfile} - sed -i "s|JobID=\"${jobIDmax}\"|JobID=\"${emptyJobID}\"|" ${argumentfile} - emptyJobID=`sed '/InputFiles=""/ d;s|.*JobID="||;s|".*||;\cc d;/arguments/ d;/InputFiles=\"\"/ d' prod_alcaraw/SingleElectron-WSkim-RUN2012A-22Jan-v1/190645-193621/share/arguments.xml | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` -done echo "JobIDmax = $jobIDmax" jobIDmax=`grep JobID ${argumentfile} | wc -l` From e69a984f4635f6e97e3ca4b3f1599d4ab916fd43 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 5 Aug 2013 09:46:29 +0200 Subject: [PATCH 086/475] fixed splitArguments, now to be checked --- ALCARAW_RECO/scripts/splitArguments.sh | 112 +++++++++++++------------ 1 file changed, 57 insertions(+), 55 deletions(-) diff --git a/ALCARAW_RECO/scripts/splitArguments.sh b/ALCARAW_RECO/scripts/splitArguments.sh index ff799eb947b..724659fd1a9 100755 --- a/ALCARAW_RECO/scripts/splitArguments.sh +++ b/ALCARAW_RECO/scripts/splitArguments.sh @@ -32,19 +32,30 @@ fi argumentfile=${UI_WORKING_DIR}/share/arguments.xml +jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` + +cp $argumentfile tmp/arguments.xml || exit 1 +while [ "${jobIDmax}" -gt "5000" ];do + let jobIDmax=$jobIDmax-4000 + sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=4000\nnumber_of_jobs=4000\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 + sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-${jobIDmax}" tmp/crab.cfg + sed -i "/user_remote_dir/ {s|\$|/sub-${jobIDmax}|}" tmp/crab.cfg +# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 + crab -cfg tmp/crab.cfg -create || exit 1 + awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID>$jobIDmax && jobID<$jobIDmax+4000){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-${jobIDmax}/share/arguments.xml || exit 1 -while [ "${emptyJobID}" != "1" ]; do - echo "remove emptyJob: ${emptyJobID}" - sed -i "\cJobID=\"${emptyJobID}\"c d" ${argumentfile} - sed -i "s|JobID=\"${jobIDmax}\"|JobID=\"${emptyJobID}\"|" ${argumentfile} - emptyJobID=`sed '/InputFiles=""/ d;s|.*JobID="||;s|".*||;\cc d;/arguments/ d;/InputFiles=\"\"/ d' prod_alcaraw/SingleElectron-WSkim-RUN2012A-22Jan-v1/190645-193621/share/arguments.xml | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` done -exit 0 -#jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` -#awk "BEGIN{n=0};{if(/JobID=\"${jobIDmax}\"/){n++;job=${jobIDmax}+n;print job;line=\$0;sub(\"JobID=\\\"${jobIDmax}\\\"\",\"JobID=\\\"\"job\"\\\"\",line); print line} }" > tmp/argument.tmp +sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=${jobIDmax}\nnumber_of_jobs=${jobIDmax}\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 +sed -i '/user_remote_dir/ {s|$|/sub-0|}' tmp/crab.cfg || exit 1 + sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-0" tmp/crab.cfg +# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 + crab -cfg tmp/crab.cfg -create || exit 1 + awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID<=$jobIDmax){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-0/share/arguments.xml || exit 1 +exit 0 + if [ -e "${UI_WORKING_DIR}/share/arguments.xml-bak" ];then cp ${UI_WORKING_DIR}/share/arguments.xml-bak $argumentfile else @@ -71,32 +82,30 @@ sed -i '\c[ ]*c d; s| >| >|;' $argumentfile eventList=`cat ${UI_WORKING_DIR}/share/eventList.dat` IFS=$'\n' -# for list in $eventList -# do -# #echo $list -# nEvents=`echo $list | cut -f 1` -# file=`echo $list | cut -f 2` +for list in $eventList + do + #echo $list + nEvents=`echo $list | cut -f 1` + file=`echo $list | cut -f 2` -# if [ "${nEvents}" == "0" ];then -# sed -i "s|$file||" $argumentfile -# fi -# done + if [ "${nEvents}" == "0" ];then + sed -i "s|$file||;s|,,|,|" $argumentfile + fi +done jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` echo $jobIDmax let jobIDmax=$jobIDmax+1 -sed -i "/InputFiles=\"[-/0-Z.]*,.*\"/{ +sed -i "/InputFiles=\".*,.*\"/{ h; - :first - { - s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.]*\\).*\"|InputFiles=\"\\1\"|; p; - g;s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.,]*\\)\"|InputFiles=\"\\2\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; h; - }; } + s|InputFiles=\"\\([^,]*\\),\\(.*\\).*\"|InputFiles=\"\\1\"|; p; + g;s|InputFiles=\"\\([^,]*\\),\\(.*\\)\"|InputFiles=\"\\2\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; h; + }; :successive { - /InputFiles=\"[-/0-Z.]*,.*\"/{ - s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.,]*\\)\"|InputFiles=\"\\1\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; p; - g;s|InputFiles=\"\\([-/0-Z.]*\\),\\([-/0-Z.,]*\\)\"|InputFiles=\"\\2\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; h; + /InputFiles=\".*,.*\"/{ + s|InputFiles=\"\\([^,]*\\),\\(.*\\)\"|InputFiles=\"\\1\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; p; + g;s|InputFiles=\"\\([^,]*\\),\\(.*\\)\"|InputFiles=\"\\2\"|;s|JobID=\"[0-9]*\"|JobID=\"${jobIDmax}\"|; h; } }; t successive" $argumentfile @@ -104,6 +113,24 @@ nJobMax=`grep "jobID=\"$jobIDmax\"" $argumentfile |wc -l` awk "BEGIN{n=0};{if(/JobID=\"${jobIDmax}\"/){n++;job=${jobIDmax}+n;print job;line=\$0;sub(\"JobID=\\\"${jobIDmax}\\\"\",\"JobID=\\\"\"job\"\\\"\",line); print line}else{print \$0} }" $argumentfile > tmp/argument.tmp mv tmp/argument.tmp $argumentfile + +jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` +emptyJobIDs=`grep 'InputFiles=\"\"' $argumentfile | sed '{s|.*JobID="||;s|".*||}' | sort -n -r` + +for emptyJobID in $emptyJobIDs + do + if [ "${jobIDmax}" == "${emptyJobID}" ];then + let jobIDmax=$jobIDmax-1 + sed -i "/JobID=\"${emptyJobID}\"/ d;" $argumentfile + continue + fi +# echo $emptyJobID +# grep "JobID=\"$jobIDmax\"" $argumentfile + sed -i "/JobID=\"${emptyJobID}\"/ d; s|JobID=\"${jobIDmax}\"|JobID=\"${emptyJobID}\"|" $argumentfile + let jobIDmax=$jobIDmax-1 +done + + for list in $eventList do #echo $list @@ -115,7 +142,7 @@ for list in $eventList jobIDs=`grep $file $argumentfile | sed 's|.*JobID="||;s|".*||'` jobID=${jobIDs[0]} if [ "`echo $jobIDs | wc -w`" != "1" ];then - grep $file $argumentfile +# grep $file $argumentfile echo "$nEvents $file" continue fi @@ -133,36 +160,11 @@ for list in $eventList done exit 0 -emptyJobID=`grep '/InputFiles=""/' $argumentfile` #| sed '{s|.*JobID="||;s|".*||}' | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` -echo $emptyJobID -exit 0 +# emptyJobID=`grep '/InputFiles=""/' $argumentfile` #| sed '{s|.*JobID="||;s|".*||}' | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` +# echo $emptyJobID +#exit 0 -# remove empty files - echo - else - - fi - jobID=${jobIDs[0]} - - #else - # echo "Error $file not in $argumentfile" - #fi - fi - fi - -done - -exit 0 - -sed -i '\c^[ ]*c d; s| >$| >|;' $argumentfile -sed -i 's|||' $argumentfile - -exit 0 -#removing jobID without input files -echo "JobIDmax = $jobIDmax" -echo "JobIDmax = $jobIDmax" -jobIDmax=`grep JobID ${argumentfile} | wc -l` cp $argumentfile tmp/arguments.xml || exit 1 while [ "${jobIDmax}" -gt "5000" ];do let jobIDmax=$jobIDmax-4000 From 91b3a287b8879367f1be00d70651140542176473 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 5 Aug 2013 09:47:17 +0200 Subject: [PATCH 087/475] harder cuts on W skim, splitting jobs for alcaraw production from RAW --- ALCARAW_RECO/python/WZElectronSkims_cff.py | 4 +-- ALCARAW_RECO/scripts/prodAlcaraw.sh | 30 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index be296645420..b121e4f557c 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -176,8 +176,8 @@ #met, mt cuts for W selection MT="sqrt(2*daughter(0).pt*daughter(1).pt*(1 - cos(daughter(0).phi - daughter(1).phi)))" -MET_CUT_MIN = 20. -W_ELECTRON_ET_CUT_MIN = 27.0 +MET_CUT_MIN = 25. +W_ELECTRON_ET_CUT_MIN = 30.0 MT_CUT_MIN = 50. WenuSelector = cms.EDProducer("CandViewShallowCloneCombiner", diff --git a/ALCARAW_RECO/scripts/prodAlcaraw.sh b/ALCARAW_RECO/scripts/prodAlcaraw.sh index e10f6c5f3c6..5754dd56c91 100755 --- a/ALCARAW_RECO/scripts/prodAlcaraw.sh +++ b/ALCARAW_RECO/scripts/prodAlcaraw.sh @@ -274,13 +274,33 @@ EOF if [ -n "${CREATE}" ];then crab -cfg ${crabFile} -create - ./scripts/splittedOutputFilesCrabPatch.sh -u ${UI_WORKING_DIR} + ./scripts/splitArguments.sh -u ${UI_WORKING_DIR} + if [ -d "${UI_WORKING_DIR}/sub-0" ];then + UI_WORKING_DIRS=`ls -d ${UI_WORKING_DIR}/sub-*` + else + UI_WORKING_DIRS=${UI_WORKING_DIR} + fi + for ui_working_dir in ${UI_WORKING_DIRS} + do + ./scripts/splittedOutputFilesCrabPatch.sh -u ${ui_working_dir} + done + #crabMonitorID.sh -r ${RUNRANGE} -n $DATASETNAME -u ${UI_WORKING_DIR} --type ALCARAW fi +if [ -d "${UI_WORKING_DIR}/sub-0" ];then + UI_WORKING_DIRS=`ls -d ${UI_WORKING_DIR}/sub-*` +else + UI_WORKING_DIRS=${UI_WORKING_DIR} +fi + if [ -n "$SUBMIT" ]; then if [ -z "${TUTORIAL}" ];then - crab -c ${UI_WORKING_DIR} -submit all + for ui_working_dir in ${UI_WORKING_DIRS} + do + echo "[STATUS] Submitting ${ui_working_dir}" + crab -c ${ui_working_dir} -submit all + done else crab -c ${UI_WORKING_DIR} -submit 1 fi @@ -303,7 +323,11 @@ else fi if [ -n "${CHECK}" ];then - resubmitCrab.sh -u ${UI_WORKING_DIR} + for ui_working_dir in ${UI_WORKING_DIRS} + do + echo "[STATUS] Checking ${ui_working_dir}" + resubmitCrab.sh -u ${ui_working_dir} + done if [ ! -e "${UI_WORKING_DIR}/res/finished" ];then #echo $dir >> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" From 2180aca645bd79211c695681cbcdbd44576a88be Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 5 Aug 2013 12:11:02 +0200 Subject: [PATCH 088/475] fixing output directory name --- ALCARAW_RECO/scripts/prodAlcarereco.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index 3799d844607..1bf5679232b 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -194,7 +194,7 @@ esac ALCARAW_REMOTE_DIR=$ALCARAW_REMOTE_DIR_BASE/${ENERGY}/${DATASETNAME}/${RUNRANGE} -setUserRemoteDirAlcarereco +setUserRemoteDirAlcarereco $USER_REMOTE_DIR_BASE #USER_REMOTE_DIR=$USER_REMOTE_DIR_BASE/${ENERGY}/${TAG}/${DATASETNAME}/${RUNRANGE} NTUPLE_REMOTE_DIR=$NTUPLE_REMOTE_DIR_BASE/${ENERGY}/${TYPE} From 6615189e673a489cbeed8b6fd46f1aa62a67eafd Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 5 Aug 2013 13:06:41 +0200 Subject: [PATCH 089/475] a --- ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 4ed355f3ad4..060665c747f 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -36,7 +36,7 @@ if [ -z "${UI_WORKING_DIR}" ]; then fi -echo "" > tmp/sed.sed +echo "/# check output file/ i file_list=\"\"" > tmp/sed.sed outFiles=`grep 'if \[ -e .*root' ${UI_WORKING_DIR}/job/CMSSW.sh | sed 's|.*-e ./||;s|.root.*|.root|'` #echo $outFiles for outFile in $outFiles @@ -48,18 +48,21 @@ done outFiles_base=`echo $outFiles_base | sed 's|^,|{|;s|$|}|'` #echo $outFiles_base + + for outFile in $outFiles do outFile_base=`basename $outFile .root` cat >> tmp/sed.sed < tmp/CMSSW.sh From 5322ae88caf4222b8cf45291ca92ce4e3c66b0b3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 5 Aug 2013 13:35:11 +0200 Subject: [PATCH 090/475] fixed path names from calibration to Calibration --- .../python/ALCARECOEcalCalIsolElectron_cff.py | 4 +-- ALCARAW_RECO/python/alcaSkimming.py | 26 +++++++++---------- ALCARAW_RECO/python/sandboxRerecoSeq_cff.py | 2 +- ALCARAW_RECO/python/sandboxSeq_cff.py | 2 +- .../scripts/splittedOutputFilesCrabPatch.sh | 2 +- ZNtupleDumper/python/patSequence_cff.py | 8 +++--- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py index baecbe891f3..e3815142bbf 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms -from calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi import * -from calibration.ALCARAW_RECO.AlCaElectronTracksReducer_cfi import * +from Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi import * +from Calibration.ALCARAW_RECO.AlCaElectronTracksReducer_cfi import * alcarecoEcalRecHitReducerSeq = cms.Sequence(alCaIsolatedElectrons) alcarecoElectronTracksReducerSeq = cms.Sequence(alcaElectronTracksReducer) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 1499a70d79b..d7db2325b1e 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -135,7 +135,7 @@ process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') #process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') -process.load('calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') process.load('Configuration.EventContent.EventContent_cff') @@ -280,10 +280,10 @@ ################################# FILTERING EVENTS process.filterSeq = cms.Sequence() -#process.load('calibration.ALCARAW_RECO.trackerDrivenFinder_cff') +#process.load('Calibration.ALCARAW_RECO.trackerDrivenFinder_cff') if(options.type == "ALCARECOSIM" and (options.doTree==0 or (options.doTree==1 and options.doTreeOnly==0))): # PUDumper - process.load("calibration.ALCARAW_RECO.PUDumper_cfi") + process.load("Calibration.ALCARAW_RECO.PUDumper_cfi") process.TFileService = cms.Service( "TFileService", fileName = cms.string("PUDumper.root") @@ -292,7 +292,7 @@ if (ZSkim): - process.load('calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') + process.load('Calibration.ALCARAW_RECO.ZElectronSkimSandbox_cff') process.filterSeq *= process.ZeeFilterSeq elif (WSkim): process.load("DPGAnalysis.Skims.WElectronSkim_cff") @@ -331,12 +331,12 @@ process.reconstruction_step = cms.Path(process.reconstruction) process.endjob_step = cms.EndPath(process.endOfProcess) - process.load('calibration.ALCARAW_RECO.sandboxSeq_cff') + process.load('Calibration.ALCARAW_RECO.sandboxSeq_cff') # this module provides: #process.sandboxSeq = uncalibRecHitSeq else: # I want to reduce the recHit collections to save space - process.load('calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') + process.load('Calibration.ALCARAW_RECO.alCaIsolatedElectrons_cfi') #============================== TO BE CHECKED FOR PRESHOWER process.load("RecoEcal.EgammaClusterProducers.reducedRecHitsSequence_cff") process.reducedEcalRecHitsES.scEtThreshold = cms.double(0.) @@ -362,7 +362,7 @@ print "sure, it was defined." process.trivialCond = cms.Sequence( EcalTrivialConditionRetriever ) - process.load('calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') + process.load('Calibration.ALCARAW_RECO.sandboxRerecoSeq_cff') # this module provides: # process.electronRecoSeq # process.electronClusteringSeq # with ele-SC reassociation @@ -407,9 +407,9 @@ # Tree production ########################### if(options.doTree>0): - process.load('calibration.ZNtupleDumper.patSequence_cff') - process.load("calibration.ZNtupleDumper.zntupledumper_cfi") - process.load("calibration.JsonFilter.jsonFilter_cfi") + process.load('Calibration.ZNtupleDumper.patSequence_cff') + process.load("Calibration.ZNtupleDumper.zntupledumper_cfi") + process.load("Calibration.JsonFilter.jsonFilter_cfi") process.zNtupleDumper.recHitCollectionEB = process.patElectrons.reducedBarrelRecHitCollection.value() process.zNtupleDumper.recHitCollectionEE = process.patElectrons.reducedEndcapRecHitCollection.value() @@ -491,14 +491,14 @@ process.ZPath = cms.Path( process.filterSeq * ( process.rhoFastJetSeq + process.alcarecoSeq )) -process.load('calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') +process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') if(options.type=="ALCARAW"): - from calibration.ALCARAW_RECO.sandboxOutput_cff import * + from Calibration.ALCARAW_RECO.sandboxOutput_cff import * process.OutALCARECOEcalCalElectron.outputCommands += sandboxOutputCommands if(options.type == "ALCARERECO"): - from calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * + from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * process.OutALCARECOEcalCalElectron.outputCommands += sandboxRerecoOutputCommands fileName = cms.untracked.string(options.output) diff --git a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py index db272d2a405..0e83eb99ade 100644 --- a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py +++ b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py @@ -17,7 +17,7 @@ # multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" # process.load("Calibration.EcalCalibAlgos.electronRecalibSCAssociator_cfi") -from calibration.ALCARAW_RECO.electronRecalibSCAssociatorSH_cfi import * +from Calibration.ALCARAW_RECO.electronRecalibSCAssociatorSH_cfi import * #electronRecalibSCAssociator.scIslandCollection = cms.string('endcapRecalibSC') #electronRecalibSCAssociator.scIslandProducer = cms.string('correctedMulti5x5SuperClustersWithPreshower') #electronRecalibSCAssociator.scProducer = cms.string('correctedHybridSuperClusters') diff --git a/ALCARAW_RECO/python/sandboxSeq_cff.py b/ALCARAW_RECO/python/sandboxSeq_cff.py index 3b5c60a62de..3a5f0bbb697 100644 --- a/ALCARAW_RECO/python/sandboxSeq_cff.py +++ b/ALCARAW_RECO/python/sandboxSeq_cff.py @@ -8,7 +8,7 @@ #process.ecalRecHit.laserCorrection=cms.bool(ApplyLaser) # can add a flag for ICs? -#no switch in standard recHit producer to apply new intercalibrations +#no switch in standard recHit producer to apply new interCalibration. uncalibRecHitSeq = cms.Sequence( (ecalDigis + ecalPreshowerDigis) * ecalUncalibRecHitSequence) sandboxSeq = uncalibRecHitSeq diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 060665c747f..90f76e17642 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -56,7 +56,7 @@ for outFile in $outFiles cat >> tmp/sed.sed < Date: Mon, 5 Aug 2013 13:55:04 +0200 Subject: [PATCH 091/475] removed output from endpath --- ALCARAW_RECO/python/alcaSkimming.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 41c85d3c66e..16b1ef52ba0 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -503,7 +503,8 @@ process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) -process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) +if (options.type=="ALCARERECO"): + process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) From f4b90171fcccabd853a489a863420b4529b4b869 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 5 Aug 2013 13:59:06 +0200 Subject: [PATCH 092/475] no comment --- ALCARAW_RECO/scripts/splitArguments.sh | 47 ++++++++++--------- .../scripts/splittedOutputFilesCrabPatch.sh | 2 +- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/ALCARAW_RECO/scripts/splitArguments.sh b/ALCARAW_RECO/scripts/splitArguments.sh index 724659fd1a9..a082e8550b3 100755 --- a/ALCARAW_RECO/scripts/splitArguments.sh +++ b/ALCARAW_RECO/scripts/splitArguments.sh @@ -32,29 +32,6 @@ fi argumentfile=${UI_WORKING_DIR}/share/arguments.xml -jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` - -cp $argumentfile tmp/arguments.xml || exit 1 -while [ "${jobIDmax}" -gt "5000" ];do - let jobIDmax=$jobIDmax-4000 - sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=4000\nnumber_of_jobs=4000\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 - sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-${jobIDmax}" tmp/crab.cfg - sed -i "/user_remote_dir/ {s|\$|/sub-${jobIDmax}|}" tmp/crab.cfg -# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 - crab -cfg tmp/crab.cfg -create || exit 1 - awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID>$jobIDmax && jobID<$jobIDmax+4000){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-${jobIDmax}/share/arguments.xml || exit 1 - -done - -sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=${jobIDmax}\nnumber_of_jobs=${jobIDmax}\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 -sed -i '/user_remote_dir/ {s|$|/sub-0|}' tmp/crab.cfg || exit 1 - sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-0" tmp/crab.cfg -# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 - crab -cfg tmp/crab.cfg -create || exit 1 - awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID<=$jobIDmax){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-0/share/arguments.xml || exit 1 - - -exit 0 if [ -e "${UI_WORKING_DIR}/share/arguments.xml-bak" ];then cp ${UI_WORKING_DIR}/share/arguments.xml-bak $argumentfile @@ -159,6 +136,30 @@ for list in $eventList fi done +jobIDmax=`sed 's|.*JobID="||;s|".*||' $argumentfile |sort -n | tail -1` + +cp $argumentfile tmp/arguments.xml || exit 1 +while [ "${jobIDmax}" -gt "5000" ];do + let jobIDmax=$jobIDmax-4000 + sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=4000\nnumber_of_jobs=4000\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 + sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-${jobIDmax}" tmp/crab.cfg + sed -i "/user_remote_dir/ {s|\$|/sub-${jobIDmax}|}" tmp/crab.cfg +# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 + crab -cfg tmp/crab.cfg -create || exit 1 + awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID>$jobIDmax && jobID<$jobIDmax+4000){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-${jobIDmax}/share/arguments.xml || exit 1 + +done + +sed "/ui_working_dir/ d;/datasetpath/ d;/total_number_of_lumis/ d;/lumis_per_job/ d;/\[CMSSW\]/ a total_number_of_events=${jobIDmax}\nnumber_of_jobs=${jobIDmax}\ndatasetpath=None\n" ${UI_WORKING_DIR}/share/crab.cfg > tmp/crab.cfg || exit 1 +sed -i '/user_remote_dir/ {s|$|/sub-0|}' tmp/crab.cfg || exit 1 + sed -i "/\[USER\]/ a ui_working_dir=${UI_WORKING_DIR}/sub-0" tmp/crab.cfg +# mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 + crab -cfg tmp/crab.cfg -create || exit 1 + awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID<=$jobIDmax){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-0/share/arguments.xml || exit 1 + + +exit 0 + exit 0 # emptyJobID=`grep '/InputFiles=""/' $argumentfile` #| sed '{s|.*JobID="||;s|".*||}' | sort -n | awk '($1!=++old){print $1; old=$1}' | head -1` # echo $emptyJobID diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 060665c747f..90f76e17642 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -56,7 +56,7 @@ for outFile in $outFiles cat >> tmp/sed.sed < Date: Mon, 5 Aug 2013 15:34:16 +0200 Subject: [PATCH 093/475] comment of the line from Configuration.StandardSequences.MagneticField_cff import --- ZNtupleDumper/python/patSequence_cff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 6e8aa235273..5c6456cfc35 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -1,9 +1,9 @@ import FWCore.ParameterSet.Config as cms from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import * -from Configuration.StandardSequences.MagneticField_cff import * +#from Configuration.StandardSequences.MagneticField_cff import * #------------------------------ pattuple -from calibration.ZNtupleDumper.elePat_cfi import * +from Calibration.ZNtupleDumper.elePat_cfi import * #process.patElectrons.electronSource = cms.InputTag("gsfElectrons") #process.patElectrons.addElectronID = cms.bool(False) #process.patElectrons.addGenMatch = cms.bool(True) @@ -11,7 +11,7 @@ #print process.patElectrons.reducedBarrelRecHitCollection #------------------------------ new energies -from calibration.EleNewEnergiesProducer.elenewenergiesproducer_cfi import * +from Calibration.EleNewEnergiesProducer.elenewenergiesproducer_cfi import * eleNewEnergiesProducer.regrPhoFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ph_52x.root' eleNewEnergiesProducer.regrEleFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ele_52x.root' eleNewEnergiesProducer.regrEleFile_fra='src/Calibration/EleNewEnergiesProducer/data/eleEnergyRegWeights_V1.root' @@ -26,7 +26,7 @@ eleRegressionEnergy.vertexCollection = cms.InputTag('offlinePrimaryVertices') #------------------------------ electronID producer -from calibration.EleSelectionProducers.eleselectionproducers_cfi import * +from Calibration.EleSelectionProducers.eleselectionproducers_cfi import * # process.EleSelectionProducers #============================== Adding new energies to patElectrons From b0a62f444f61d838fed60d5a204aa996563f9fc0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 5 Aug 2013 16:36:30 +0200 Subject: [PATCH 094/475] reverted --- ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 90f76e17642..060665c747f 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -56,7 +56,7 @@ for outFile in $outFiles cat >> tmp/sed.sed < Date: Mon, 5 Aug 2013 17:14:22 +0200 Subject: [PATCH 095/475] fixing splitOutput --- ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 90f76e17642..332a6209ad0 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -56,7 +56,7 @@ for outFile in $outFiles cat >> tmp/sed.sed < Date: Mon, 5 Aug 2013 17:25:10 +0200 Subject: [PATCH 096/475] fixed --- ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 060665c747f..c9ed23b6ea2 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -56,7 +56,7 @@ for outFile in $outFiles cat >> tmp/sed.sed < Date: Tue, 6 Aug 2013 10:35:31 +0200 Subject: [PATCH 097/475] removing scheduler to try to fix ntuple production --- ALCARAW_RECO/python/alcaSkimming.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index d7db2325b1e..b6b047ccf4c 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -571,8 +571,8 @@ process.source.lumisToProcess.extend(myLumis) -# Schedule definition -if(options.type=='ALCARAW'): - process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step, process.ZPath, process.ALCARECOoutput_step) -else: - process.schedule = cms.Schedule(process.ZPath, process.ALCARECOoutput_step) +# # Schedule definition +# if(options.type=='ALCARAW'): +# process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step, process.ZPath, process.ALCARECOoutput_step) +# else: +# process.schedule = cms.Schedule(process.ZPath, process.ALCARECOoutput_step, process.ntuple) From 16054aec47efa32ea99c9c50cd084a48120e9cfe Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 6 Aug 2013 12:57:46 +0200 Subject: [PATCH 098/475] added traslator for valuemaps in rereco --- ALCARAW_RECO/python/alcaSkimming.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index b6b047ccf4c..0dfa11e19b3 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -576,3 +576,8 @@ # process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.endjob_step, process.ZPath, process.ALCARECOoutput_step) # else: # process.schedule = cms.Schedule(process.ZPath, process.ALCARECOoutput_step, process.ntuple) + +process.load('Calibration.ValueMapTraslator.valuemaptraslator_cfi') +process.sandboxRerecoSeq*=process.elPFIsoValueCharged03PFIdRecalib +process.sandboxRerecoSeq*=process.elPFIsoValueGamma03PFIdRecalib +process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib From 7f119791dbcd869d4262c7ea5ce8342bb26f2cd8 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 6 Aug 2013 15:16:33 +0200 Subject: [PATCH 099/475] pf deposit name as standard egamma ones produced on RECO --- ValueMapTraslator/python/valuemaptraslator_cfi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index 2669c984642..903f4e01a00 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -1,19 +1,19 @@ import FWCore.ParameterSet.Config as cms elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), + inputCollection = cms.InputTag('elPFIsoValueCharged03PFId'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), + inputCollection = cms.InputTag('elPFIsoValueGamma03PFId'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdGsf'), + inputCollection = cms.InputTag('elPFIsoValueNeutral03PFId'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) From 8507329d0e64a958db58cf97ef165e67800b2606 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 6 Aug 2013 18:44:37 +0200 Subject: [PATCH 100/475] pf deposit name as standard egamma ones produced on RECO --- ValueMapTraslator/python/valuemaptraslator_cfi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index 903f4e01a00..ff7f2b5e62d 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -1,19 +1,19 @@ import FWCore.ParameterSet.Config as cms elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueCharged03PFId'), + inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueGamma03PFId'), + inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueNeutral03PFId'), + inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator') ) From f497377e0b708026bb44e4180c6c972bc2980708 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 6 Aug 2013 19:16:03 +0200 Subject: [PATCH 101/475] alcarereco endpath removed as default --- ALCARAW_RECO/python/alcaSkimming.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 41c85d3c66e..87f9d760ddf 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -503,7 +503,8 @@ process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) -process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) +if(options.type=="ALCARERECO"): + process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) From 1b2c2ce23fc4b6c34500a1a921df8190bbcba148 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 6 Aug 2013 19:16:22 +0200 Subject: [PATCH 102/475] run dependent MC samples --- ALCARAW_RECO/alcareco_datasets.dat | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index d3ad52053fb..aa5ad565b6a 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -5,6 +5,14 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +# +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +# +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco ################### MC geometries and material allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat10S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat10S30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat20S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat20S30 caf group/alca_ecalcalib/alcareco From 2e4b624d7dc119bf82f98a434a8c2cc6c6ff6e41 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 6 Aug 2013 19:23:09 +0200 Subject: [PATCH 103/475] alcaraw endpath removed as default --- ALCARAW_RECO/python/alcaSkimming.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 87f9d760ddf..9c979d5c002 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -505,7 +505,8 @@ process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) if(options.type=="ALCARERECO"): process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) -process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) +if(options.type=="ALCARAW"): + process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) ############################################################ From 3bd21adaa486cbcd4d6b918cf1b0d4e42ea5818f Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 8 Aug 2013 11:41:40 +0200 Subject: [PATCH 104/475] pf deposit name as standard egamma ones produced on RECO for alcarereco --- ALCARAW_RECO/python/alcaSkimming.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 0dfa11e19b3..b0ac0a37689 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -581,3 +581,9 @@ process.sandboxRerecoSeq*=process.elPFIsoValueCharged03PFIdRecalib process.sandboxRerecoSeq*=process.elPFIsoValueGamma03PFIdRecalib process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib + +if(options.type=="ALCARERECO"): + process.eleSelectionProducers.chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdRecalib') + process.eleSelectionProducers.emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdRecalib') + process.eleSelectionProducers.nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdRecalib') + From 40d24ec03f3bf02e19c2defb95343df56eb282d9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 8 Aug 2013 17:05:02 +0200 Subject: [PATCH 105/475] only ntuple option --- ALCARAW_RECO/python/alcaSkimming.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 16b1ef52ba0..3d1a1b51baa 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -598,11 +598,19 @@ elif(options.type=='ALCARERECO'): - process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, process.NtuplePath) + if(doTreeOnly): + process.schedule = cms.Schedule(process.NtuplePath) + else: + process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, + process.NtuplePath) elif(options.type=='ALCARECO'): - process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step, process.NtuplePath - ) # fix the output modules + if(doTreeOnly): + process.schedule = cms.Schedule(process.NtuplePath) + else: + process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.pathALCARECOEcalCalZSCElectron, + process.ALCARECOoutput_step, process.NtuplePath + ) # fix the output modules From 654381c841a55fa37d6e237ff259a03c60a84fc3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 8 Aug 2013 17:07:28 +0200 Subject: [PATCH 106/475] valuemap traslator fixed for different number of electrons from original to rereco electron collection --- .../python/valuemaptraslator_cfi.py | 9 ++-- ValueMapTraslator/src/ValueMapTraslator.cc | 43 ++++++++++++++----- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index 2669c984642..ac50271d781 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -3,17 +3,20 @@ elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), outputCollection = cms.string(''), - referenceCollection = cms.InputTag('electronRecalibSCAssociator') + referenceCollection = cms.InputTag('electronRecalibSCAssociator'), + oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), outputCollection = cms.string(''), - referenceCollection = cms.InputTag('electronRecalibSCAssociator') + referenceCollection = cms.InputTag('electronRecalibSCAssociator'), + oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdGsf'), outputCollection = cms.string(''), - referenceCollection = cms.InputTag('electronRecalibSCAssociator') + referenceCollection = cms.InputTag('electronRecalibSCAssociator'), + oldreferenceCollection = cms.InputTag('gsfElectrons') ) diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index 54868145ee3..5da6785336e 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -59,10 +59,10 @@ class ValueMapTraslator : public edm::EDProducer { virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); // ----------member data --------------------------- - edm::InputTag referenceCollectionTAG; + edm::InputTag referenceCollectionTAG,oldreferenceCollectionTAG; edm::InputTag inputCollectionTAG; std::string outputCollectionName; - edm::Handle referenceHandle; + edm::Handle referenceHandle,oldreferenceHandle; edm::Handle inputHandle; }; @@ -81,7 +81,8 @@ class ValueMapTraslator : public edm::EDProducer { ValueMapTraslator::ValueMapTraslator(const edm::ParameterSet& iConfig): referenceCollectionTAG(iConfig.getParameter("referenceCollection")), inputCollectionTAG(iConfig.getParameter("inputCollection")), - outputCollectionName(iConfig.getParameter("outputCollection")) + outputCollectionName(iConfig.getParameter("outputCollection")), + oldreferenceCollectionTAG(iConfig.getParameter("oldreferenceCollection")) { //now do what ever other initialization is needed /// \todo outputCollectionName = inputCollection+postfix @@ -113,6 +114,9 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) //------------------------------ iEvent.getByLabel(referenceCollectionTAG, referenceHandle); +#ifdef DEBUG + iEvent.getByLabel(oldreferenceCollectionTAG, oldreferenceHandle); +#endif iEvent.getByLabel(inputCollectionTAG, inputHandle); for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); @@ -122,18 +126,35 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) #ifdef DEBUG std::cout << valueMap_itr[i] << std::endl; #endif - valueVector.push_back((valueMap_itr[i])); //valueMap_itr-inputHandle->begin()])); + // valueVector.push_back((valueMap_itr[i])); //valueMap_itr-inputHandle->begin()])); } + break; } #ifdef DEBUG - std::cout << "Size: " << referenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; - - for(reco::GsfElectronCollection::const_iterator electron = referenceHandle->begin(); - electron!= referenceHandle->end(); - electron++){ - reco::GsfElectronRef eleRef(referenceHandle, electron-referenceHandle->begin()); - std::cout << (*inputHandle)[eleRef] << std::endl; + std::cout << "Size: " << referenceHandle->size() << "\t" << oldreferenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; + + for(reco::GsfElectronCollection::const_iterator electronNew = referenceHandle->begin(); + electronNew!= referenceHandle->end(); + electronNew++){ + + for(reco::GsfElectronCollection::const_iterator electron = oldreferenceHandle->begin(); + electron!= oldreferenceHandle->end(); + electron++){ + if(fabs(electronNew->eta() - electron->eta())>0.0001) continue; + if(fabs(electronNew->phi() - electron->phi())>0.0001) continue; + + reco::GsfElectronRef eleRef(oldreferenceHandle, electron-oldreferenceHandle->begin()); + reco::GsfElectronRef eleRef2(referenceHandle, electronNew-referenceHandle->begin()); + +#ifdef DEBUG + std::cout << eleRef->eta() << "\t" << eleRef2->eta() << "\t" + << eleRef->energy() << "\t" << eleRef2->energy() << "\t" + << (eleRef == eleRef2) << "\t" + << (*inputHandle)[eleRef] << std::endl; +#endif + valueVector.push_back((*inputHandle)[eleRef]); //valueMap_itr-inputHandle->begin()])); + } } #endif Map_t::Filler filler(*valueVectorPtr); From 8bcb14fa563fca04abe7aaf40ede648f5a28aeb3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 8 Aug 2013 17:11:42 +0200 Subject: [PATCH 107/475] minor fixes --- ALCARAW_RECO/alcareco_datasets.dat | 8 ++++++++ ALCARAW_RECO/scripts/prodAlcaraw.sh | 6 +++--- ALCARAW_RECO/scripts/splitArguments.sh | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index d3ad52053fb..aa5ad565b6a 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -5,6 +5,14 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +# +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +# +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco ################### MC geometries and material allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat10S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat10S30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat20S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat20S30 caf group/alca_ecalcalib/alcareco diff --git a/ALCARAW_RECO/scripts/prodAlcaraw.sh b/ALCARAW_RECO/scripts/prodAlcaraw.sh index 5754dd56c91..a42fbf82b17 100755 --- a/ALCARAW_RECO/scripts/prodAlcaraw.sh +++ b/ALCARAW_RECO/scripts/prodAlcaraw.sh @@ -166,7 +166,7 @@ if [ -z "${SKIM}" ];then ;; *SingleElectron*RAW) SKIM=WSkim - let LUMIS_PER_JOBS=${LUMIS_PER_JOBS}/20 + #let LUMIS_PER_JOBS=${LUMIS_PER_JOBS}/20 ;; *SingleElectron*) SKIM=WSkim @@ -267,8 +267,8 @@ eMail = shervin@cern.ch rb = HC rb = CERN proxy_server = myproxy.cern.ch -se_white_list=$WHITELIST -se_black_list=$BLACKLIST +#se_white_list=$WHITELIST +#se_black_list=$BLACKLIST EOF diff --git a/ALCARAW_RECO/scripts/splitArguments.sh b/ALCARAW_RECO/scripts/splitArguments.sh index a082e8550b3..9bfbc8a2523 100755 --- a/ALCARAW_RECO/scripts/splitArguments.sh +++ b/ALCARAW_RECO/scripts/splitArguments.sh @@ -146,7 +146,7 @@ while [ "${jobIDmax}" -gt "5000" ];do sed -i "/user_remote_dir/ {s|\$|/sub-${jobIDmax}|}" tmp/crab.cfg # mv ${UI_WORKING_DIR} `echo ${UI_WORKING_DIR} | sed 's|/$||'`-bis || exit 1 crab -cfg tmp/crab.cfg -create || exit 1 - awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID>$jobIDmax && jobID<$jobIDmax+4000){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-${jobIDmax}/share/arguments.xml || exit 1 + awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID>$jobIDmax && jobID<$jobIDmax+4000){jobID-=$jobIDmax;j=\"JobID=\\\"\"jobID\"\\\"\"; gsub(\"JobID=\\\"[0-9]*\\\"\",j,line);print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-${jobIDmax}/share/arguments.xml || exit 1 done @@ -157,7 +157,6 @@ sed -i '/user_remote_dir/ {s|$|/sub-0|}' tmp/crab.cfg || exit 1 crab -cfg tmp/crab.cfg -create || exit 1 awk "(/JobID/){line=\$0;jobID=line;gsub(\".*JobID=\\\"\",\"\",jobID); gsub(\"\\\" .*\",\"\",jobID);if(jobID<=$jobIDmax){print line}};(!/JobID/){print \$0}" tmp/arguments.xml > ${UI_WORKING_DIR}/sub-0/share/arguments.xml || exit 1 - exit 0 exit 0 From f82de2a3f0457c5efd54d7ee286bcdc670f4a745 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 8 Aug 2013 17:07:28 +0200 Subject: [PATCH 108/475] valuemap traslator fixed for different number of electrons from original to rereco electron collection --- .../python/valuemaptraslator_cfi.py | 9 ++-- ValueMapTraslator/src/ValueMapTraslator.cc | 43 ++++++++++++++----- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index ff7f2b5e62d..25ef0a1781e 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -3,17 +3,20 @@ elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), outputCollection = cms.string(''), - referenceCollection = cms.InputTag('electronRecalibSCAssociator') + referenceCollection = cms.InputTag('electronRecalibSCAssociator'), + oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), outputCollection = cms.string(''), - referenceCollection = cms.InputTag('electronRecalibSCAssociator') + referenceCollection = cms.InputTag('electronRecalibSCAssociator'), + oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso'), outputCollection = cms.string(''), - referenceCollection = cms.InputTag('electronRecalibSCAssociator') + referenceCollection = cms.InputTag('electronRecalibSCAssociator'), + oldreferenceCollection = cms.InputTag('gsfElectrons') ) diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index 54868145ee3..5da6785336e 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -59,10 +59,10 @@ class ValueMapTraslator : public edm::EDProducer { virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); // ----------member data --------------------------- - edm::InputTag referenceCollectionTAG; + edm::InputTag referenceCollectionTAG,oldreferenceCollectionTAG; edm::InputTag inputCollectionTAG; std::string outputCollectionName; - edm::Handle referenceHandle; + edm::Handle referenceHandle,oldreferenceHandle; edm::Handle inputHandle; }; @@ -81,7 +81,8 @@ class ValueMapTraslator : public edm::EDProducer { ValueMapTraslator::ValueMapTraslator(const edm::ParameterSet& iConfig): referenceCollectionTAG(iConfig.getParameter("referenceCollection")), inputCollectionTAG(iConfig.getParameter("inputCollection")), - outputCollectionName(iConfig.getParameter("outputCollection")) + outputCollectionName(iConfig.getParameter("outputCollection")), + oldreferenceCollectionTAG(iConfig.getParameter("oldreferenceCollection")) { //now do what ever other initialization is needed /// \todo outputCollectionName = inputCollection+postfix @@ -113,6 +114,9 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) //------------------------------ iEvent.getByLabel(referenceCollectionTAG, referenceHandle); +#ifdef DEBUG + iEvent.getByLabel(oldreferenceCollectionTAG, oldreferenceHandle); +#endif iEvent.getByLabel(inputCollectionTAG, inputHandle); for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); @@ -122,18 +126,35 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) #ifdef DEBUG std::cout << valueMap_itr[i] << std::endl; #endif - valueVector.push_back((valueMap_itr[i])); //valueMap_itr-inputHandle->begin()])); + // valueVector.push_back((valueMap_itr[i])); //valueMap_itr-inputHandle->begin()])); } + break; } #ifdef DEBUG - std::cout << "Size: " << referenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; - - for(reco::GsfElectronCollection::const_iterator electron = referenceHandle->begin(); - electron!= referenceHandle->end(); - electron++){ - reco::GsfElectronRef eleRef(referenceHandle, electron-referenceHandle->begin()); - std::cout << (*inputHandle)[eleRef] << std::endl; + std::cout << "Size: " << referenceHandle->size() << "\t" << oldreferenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; + + for(reco::GsfElectronCollection::const_iterator electronNew = referenceHandle->begin(); + electronNew!= referenceHandle->end(); + electronNew++){ + + for(reco::GsfElectronCollection::const_iterator electron = oldreferenceHandle->begin(); + electron!= oldreferenceHandle->end(); + electron++){ + if(fabs(electronNew->eta() - electron->eta())>0.0001) continue; + if(fabs(electronNew->phi() - electron->phi())>0.0001) continue; + + reco::GsfElectronRef eleRef(oldreferenceHandle, electron-oldreferenceHandle->begin()); + reco::GsfElectronRef eleRef2(referenceHandle, electronNew-referenceHandle->begin()); + +#ifdef DEBUG + std::cout << eleRef->eta() << "\t" << eleRef2->eta() << "\t" + << eleRef->energy() << "\t" << eleRef2->energy() << "\t" + << (eleRef == eleRef2) << "\t" + << (*inputHandle)[eleRef] << std::endl; +#endif + valueVector.push_back((*inputHandle)[eleRef]); //valueMap_itr-inputHandle->begin()])); + } } #endif Map_t::Filler filler(*valueVectorPtr); From 8f619ef6791571971cd2ad754cb334e16b18832b Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 8 Aug 2013 17:52:03 +0200 Subject: [PATCH 109/475] fixing value map traslator in case of different number of electrons in old and new electron collection --- ValueMapTraslator/python/valuemaptraslator_cfi.py | 6 +++--- ValueMapTraslator/src/ValueMapTraslator.cc | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index 25ef0a1781e..ac50271d781 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -1,21 +1,21 @@ import FWCore.ParameterSet.Config as cms elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), + inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), + inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso'), + inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdGsf'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), oldreferenceCollection = cms.InputTag('gsfElectrons') diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index 5da6785336e..df17a8d8f02 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -114,9 +114,7 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) //------------------------------ iEvent.getByLabel(referenceCollectionTAG, referenceHandle); -#ifdef DEBUG iEvent.getByLabel(oldreferenceCollectionTAG, oldreferenceHandle); -#endif iEvent.getByLabel(inputCollectionTAG, inputHandle); for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); @@ -133,30 +131,30 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) #ifdef DEBUG std::cout << "Size: " << referenceHandle->size() << "\t" << oldreferenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; - +#endif for(reco::GsfElectronCollection::const_iterator electronNew = referenceHandle->begin(); electronNew!= referenceHandle->end(); electronNew++){ - + for(reco::GsfElectronCollection::const_iterator electron = oldreferenceHandle->begin(); electron!= oldreferenceHandle->end(); electron++){ if(fabs(electronNew->eta() - electron->eta())>0.0001) continue; if(fabs(electronNew->phi() - electron->phi())>0.0001) continue; - + reco::GsfElectronRef eleRef(oldreferenceHandle, electron-oldreferenceHandle->begin()); reco::GsfElectronRef eleRef2(referenceHandle, electronNew-referenceHandle->begin()); - + #ifdef DEBUG std::cout << eleRef->eta() << "\t" << eleRef2->eta() << "\t" << eleRef->energy() << "\t" << eleRef2->energy() << "\t" << (eleRef == eleRef2) << "\t" << (*inputHandle)[eleRef] << std::endl; #endif - valueVector.push_back((*inputHandle)[eleRef]); //valueMap_itr-inputHandle->begin()])); + valueVector.push_back((*inputHandle)[eleRef]); //valueMap_itr-inputHandle->begin()])); } } -#endif + Map_t::Filler filler(*valueVectorPtr); filler.insert(referenceHandle, valueVector.begin(), valueVector.end()); filler.fill(); From 4e0d450aeec7e4ec1c27022724fe12ce90810b38 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 9 Aug 2013 11:55:09 +0200 Subject: [PATCH 110/475] moved sandboxRerecoSeq --- ALCARAW_RECO/python/alcaSkimming.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 7871cb06bcf..cb5c6a278de 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -200,7 +200,8 @@ # ) process.options = cms.untracked.PSet( - wantSummary = cms.untracked.bool(True) + wantSummary = cms.untracked.bool(True), + #SkipEvent = cms.untracked.vstring('ProductNotFound'), ) # Other statements @@ -585,12 +586,12 @@ # process.schedule = cms.Schedule(process.ZPath, process.ALCARECOoutput_step, process.ntuple) process.load('Calibration.ValueMapTraslator.valuemaptraslator_cfi') -process.sandboxRerecoSeq*=process.elPFIsoValueCharged03PFIdRecalib -process.sandboxRerecoSeq*=process.elPFIsoValueGamma03PFIdRecalib -process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib if(options.type=="ALCARERECO"): process.eleSelectionProducers.chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdRecalib') process.eleSelectionProducers.emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdRecalib') process.eleSelectionProducers.nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdRecalib') + process.sandboxRerecoSeq*=process.elPFIsoValueCharged03PFIdRecalib + process.sandboxRerecoSeq*=process.elPFIsoValueGamma03PFIdRecalib + process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib From aa3ca4fb354ca59f82a27589487614f0bae8991d Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 9 Aug 2013 11:56:24 +0200 Subject: [PATCH 111/475] fixed name of collections --- EleSelectionProducers/python/eleselectionproducers_cfi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py index 3805c1a5673..6d6a2b88714 100644 --- a/EleSelectionProducers/python/eleselectionproducers_cfi.py +++ b/EleSelectionProducers/python/eleselectionproducers_cfi.py @@ -8,8 +8,8 @@ vertexCollection = cms.InputTag('offlinePrimaryVertices'), conversionCollection = cms.InputTag('allConversions'), BeamSpotCollection = cms.InputTag('offlineBeamSpot'), - chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), - emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), - nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso') + chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), + emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), + nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdGsf') ) From 487b1713f127735ddbceceda311df7ae8b4b9edd Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 9 Aug 2013 11:57:47 +0200 Subject: [PATCH 112/475] fixed met handle to take the collection --- ZNtupleDumper/src/ZNtupleDumper.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 6e8bb9aac90..005b01cbdbe 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -107,6 +107,7 @@ #include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecord.h" #include "DataFormats/METReco/interface/PFMET.h" +#include "DataFormats/METReco/interface/PFMETFwd.h" // HLT trigger #include "FWCore/Framework/interface/TriggerNamesService.h" @@ -155,7 +156,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::Handle rhoHandle; edm::Handle > PupInfo; edm::Handle conversionsHandle; - edm::Handle metHandle; + edm::Handle< reco::PFMETCollection > metHandle; edm::Handle triggerResultsHandle; //------------------------------ Input Tags @@ -428,7 +429,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } else isMC=false; //------------------------------ RECHIT - //iEvent.getByLabel(recHitCollectionEBTAG, recHitCollectionEBHandle); + +//iEvent.getByLabel(recHitCollectionEBTAG, recHitCollectionEBHandle); //iEvent.getByLabel(recHitCollectionEETAG, recHitCollectionEEHandle); //------------------------------ CONVERSIONS @@ -455,7 +457,9 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe iEvent.getByLabel(rhoTAG,rhoHandle); iEvent.getByLabel(metTAG, metHandle); - + //if(metHandle.isValid()==false) iEvent.getByType(metHandle); + reco::PFMET met = ((*metHandle))[0]; /// \todo use corrected phi distribution + TreeSetEventSummaryVar(iEvent); TreeSetPileupVar(); // this can be filled once per event @@ -513,12 +517,13 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(! eleIter1->electronID("tight") ) continue; if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event - reco::PFMET met = (*metHandle); /// \todo use corrected phi distribution + //reco::PFMET met = (*metHandle); /// \todo use corrected phi distribution // MET/MT selection if( met.et() < 25. ) continue; - if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 30. ) continue; - + if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 50. ) continue; + if( eleIter1->et()<30) continue; + TreeSetDiElectronVar(*eleIter1, *eleIter1); tree->Fill(); if(doExtraCalibTree){ From 5d9941941de843727430ea3a0783b8582d9a1d9f Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 10 Aug 2013 12:07:16 +0200 Subject: [PATCH 113/475] fixed iso deposits for alcareco only production --- .../python/ALCARECOEcalCalIsolElectron_cff.py | 4 +- ALCARAW_RECO/python/alcaSkimming.py | 45 ++++++++++++------- ALCARAW_RECO/python/eleIsoSequence_cff.py | 2 +- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py index b8ce3b47acd..0af43c24a6e 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_cff.py @@ -11,11 +11,13 @@ alcarecoEcalRecHitReducerSeq = cms.Sequence(alCaIsolatedElectrons) alcarecoElectronTracksReducerSeq = cms.Sequence(alcaElectronTracksReducer) +# sequence that reduces the RECO format (only ECAL part) into ALCARECO seqALCARECOEcalCalElectronRECO = cms.Sequence( alCaIsolatedElectrons) +# sequence that reduces the RECO format (not ECAL part) into ALCARECO ALCARECOEcalCalElectronPreSeq = cms.Sequence( kt6PFJetsForRhoCorrection + alcaElectronTracksReducer + - pfiso ) + pfisoALCARECO ) seqALCARECOEcalCalElectron = cms.Sequence( ALCARECOEcalCalElectronPreSeq + seqALCARECOEcalCalElectronRECO diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 9c979d5c002..c6dc90112cf 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -12,6 +12,11 @@ ############################################################ ### SETUP OPTIONS options = VarParsing.VarParsing('standard') +options.register('isCrab', + '1', # default Value = true + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.int, # string, int, or float + "change files path in case of local test") options.register ('type', "ALCARAW", VarParsing.VarParsing.multiplicity.singleton, @@ -138,6 +143,15 @@ process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') process.load('Calibration.ALCARAW_RECO.ALCARECOEcalUncalIsolElectron_Output_cff') from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * +#Define the sequences +# +# particle flow isolation +# +process.pfIsoEgamma = cms.Sequence() +if(options.type=='ALCARECO' or options.type=='ALCARECOSIM'): + from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso + process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') + process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) #process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') # this is for official ALCARAW ALCARECO production process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') # reduction of recHits @@ -346,12 +360,6 @@ #process.filterSeq *= process.NtupleFilter -# -# particle flow isolation -# - -#process.pfiso = cms.Sequence() - ############################### # ECAL Recalibration ############################### @@ -364,10 +372,8 @@ process.reducedEcalRecHitsES.OutputLabel_ES = cms.string('alCaRecHitsES') #============================== -#Define the sequences -process.alcarecoSeq = process.seqALCARECOEcalCalElectronRECO -if(options.type=="ALCARERECO"): # in ALCARECO production starting from AOD or RECO the ES recHits are reduced - process.alcarecoSeq += process.reducedEcalRecHitsES + + try: EcalTrivialConditionRetriever @@ -378,10 +384,11 @@ print "sure, it was defined." process.trivialCond = cms.Sequence( EcalTrivialConditionRetriever ) + if(re.match("CMSSW_6_.*", CMSSW_VERSION)): - process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxPFRerecoSeq * process.alcarecoSeq) + process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxPFRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) else: - process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * process.alcarecoSeq) + process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) process.rhoFastJetSeq = cms.Sequence() @@ -490,14 +497,17 @@ process.pathALCARERECOEcalCalElectron = cms.Path(process.alcarerecoSeq) # ALCARECO process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * + process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter * + process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * ~process.ZeeFilter * process.ZSCFilterSeq * + process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) @@ -552,7 +562,8 @@ ############### JSON Filter -if(options.doTree>0 and options.doTreeOnly==0): +if((options.doTree>0 and options.doTreeOnly==0)): + # or (options.type=='ALCARECOSIM' and len(options.jsonFile)>0) ): process.jsonFilter.jsonFileName = cms.string(options.jsonFile) else: if(len(options.jsonFile)>0): @@ -600,7 +611,7 @@ elif(options.type=='ALCARERECO'): process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, process.NtuplePath) -elif(options.type=='ALCARECO'): +elif(options.type=='ALCARECO' or options.type=='ALCARECOSIM'): process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step, process.NtuplePath ) # fix the output modules @@ -613,7 +624,11 @@ # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -pathPrefix=CMSSW_BASE+"/" +if(options.isCrab): + pathPrefix="./" +else: + pathPrefix=CMSSW_BASE+"/" + process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() process.eleNewEnergiesProducer.regrEleFile=pathPrefix+process.eleNewEnergiesProducer.regrEleFile.value() process.eleNewEnergiesProducer.regrEleFile_fra=pathPrefix+process.eleNewEnergiesProducer.regrEleFile_fra.value() diff --git a/ALCARAW_RECO/python/eleIsoSequence_cff.py b/ALCARAW_RECO/python/eleIsoSequence_cff.py index a9ce27b1fec..4c1c43a5560 100644 --- a/ALCARAW_RECO/python/eleIsoSequence_cff.py +++ b/ALCARAW_RECO/python/eleIsoSequence_cff.py @@ -124,4 +124,4 @@ eleIsoSequence = cms.Sequence((elPFIsoDepositChargedGsf + elPFIsoDepositChargedAllGsf + elPFIsoDepositNeutralGsf + elPFIsoDepositGammaGsf + elPFIsoDepositPUGsf)) eleIsoSequence *= cms.Sequence(elPFIsoValueCharged03PFIdGsf+elPFIsoValueChargedAll03PFIdGsf+elPFIsoValueGamma03PFIdGsf+elPFIsoValueNeutral03PFIdGsf+elPFIsoValuePU03PFIdGsf ) -pfiso = cms.Sequence(eleIsoSequence) #pfParticleSelectionSequence + eleIsoSequence) +pfisoALCARECO = cms.Sequence(eleIsoSequence) #pfParticleSelectionSequence + eleIsoSequence) From ef45af3c2ba63d082d37de029d41d6a7bbaa1271 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 10 Aug 2013 15:24:22 +0200 Subject: [PATCH 114/475] fixed removing of first comma in file list --- ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index 332a6209ad0..c9ed23b6ea2 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -56,7 +56,7 @@ for outFile in $outFiles cat >> tmp/sed.sed < Date: Sun, 11 Aug 2013 15:43:21 +0200 Subject: [PATCH 115/475] added the splittedOutputFilesCrabPatch in ntuple creation --- ALCARAW_RECO/scripts/prodNtuples.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index a4c7593bfee..9f31bf27ee7 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -356,6 +356,7 @@ if [ -n "${CREATE}" ];then if [ -n "$FILELIST" ];then makeArguments.sh -f $FILELIST -u $UI_WORKING_DIR -n $FILE_PER_JOB || exit 1 fi + splittedOutputFilesCrabPatch -u $UI_WORKING_DIR fi if [ -n "$SUBMIT" ];then From 8b4bd189848b0ed76576516e90fa4deee2ef5951 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 12 Aug 2013 10:06:46 +0200 Subject: [PATCH 116/475] fixed dataSmeared if not toy --- ZFitter/src/RooSmearer.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index a76bae7574e..6b852b1b29b 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -92,7 +92,7 @@ void RooSmearer::SetCache(Long64_t nEvents, bool cacheToy, bool externToy){ if(data_events_cache.empty()){ if(cacheToy){ std::cout << "[STATUS] --- Setting toy cache for data" << std::endl; - data_events_cache = importer.GetCache(_data_chain, false, false, nEvents, true, externToy); //importer.GetCacheToy(nEvents, false); + data_events_cache = importer.GetCache(_signal_chain, false, false, nEvents, true, externToy); //importer.GetCacheToy(nEvents, false); }else { std::cout << "[STATUS] --- Setting cache for data" << std::endl; data_events_cache = importer.GetCache(_data_chain, false, false, nEvents); @@ -101,7 +101,7 @@ void RooSmearer::SetCache(Long64_t nEvents, bool cacheToy, bool externToy){ if(mc_events_cache.empty()){ if(cacheToy){ std::cout << "[STATUS] --- Setting toy cache for mc" << std::endl; - mc_events_cache = importer.GetCache(_signal_chain, true, false, nEvents,true); //importer.GetCacheToy(nEvents, true); + mc_events_cache = importer.GetCache(_signal_chain, true, false, nEvents,true, externToy); //importer.GetCacheToy(nEvents, true); }else { std::cout << "[STATUS] --- Setting cache for mc" << std::endl; mc_events_cache = importer.GetCache(_signal_chain, true, false, nEvents); @@ -944,7 +944,7 @@ void RooSmearer::SetNSmear(unsigned int n_smear, unsigned int nlltoy){ void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool mcToy, bool externToy, TString initFile){ - _isDataSmeared=externToy; //mcToy; + if(mcToy) _isDataSmeared=externToy; //mcToy; if(initFile.Sizeof()>1){ std::cout << "[INFO] Truth values for toys initialized to " << std::endl; //truthSet->readFromFile(initFile); @@ -956,7 +956,7 @@ void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool m SetCommonCut(commonCut); SetEleID(eleID); SetCache(nEvents, mcToy, externToy); InitCategories(mcToy); evaluate(); - if(mcToy){ + if(mcToy && false){ RooArgList argList(_paramSet); TIterator *it = argList.createIterator(); for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; var = (RooRealVar *)it->Next()){ From 17f16be47c550525f3da49dea1b924bc187465fa Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 12 Aug 2013 13:06:25 +0200 Subject: [PATCH 117/475] powheg run dependent mc ntuples ready --- ALCARAW_RECO/ntuple_datasets.dat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 27e442dcba8..e9159401ceb 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -134,6 +134,11 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1 +#### madgraph 194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +#### powheg +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM From 92860c17896b6cc502c0ab562908b13e703b43e6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 12 Aug 2013 16:01:21 +0200 Subject: [PATCH 118/475] endpath removed in case of treeonly option on --- ALCARAW_RECO/python/alcaSkimming.py | 13 +++++++------ ALCARAW_RECO/scripts/resubmitCrab.sh | 8 ++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 45ad500b6b3..a9e421141d8 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -512,12 +512,13 @@ process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) -process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) -if(options.type=="ALCARERECO"): - process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) -if(options.type=="ALCARAW"): - process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) - +if(options.doTreeOnly==0): + process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) + if(options.type=="ALCARERECO"): + process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) + if(options.type=="ALCARAW"): + process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) + ############################################################ # Setting collection names diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index 6fd2730c38c..c9923e79813 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -135,6 +135,14 @@ for jobID in `seq 1 $nJobs` 50660*143) intervals="$intervals $jobID" ;; + 60302*0) +# intervals="$intervals $jobID" + ;; + 0*60302) +# intervals="$intervals $jobID" +# crab -c $ui_working_dir -resubmit $jobID + ;; + *) echo $jobID $ExitCode From d3b2f3582a279dd65fb1ba8bd3e36913dd455b7b Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 13 Aug 2013 10:24:25 +0200 Subject: [PATCH 119/475] new regression V4 and V5 added in energy producer and ntuple --- EleNewEnergiesProducer/BuildFile.xml | 2 + .../python/elenewenergiesproducer_cfi.py | 6 +- .../src/EleNewEnergiesProducer.cc | 318 +++++++++++++++++- ZNtupleDumper/python/patSequence_cff.py | 33 ++ ZNtupleDumper/src/ZNtupleDumper.cc | 29 +- 5 files changed, 377 insertions(+), 11 deletions(-) diff --git a/EleNewEnergiesProducer/BuildFile.xml b/EleNewEnergiesProducer/BuildFile.xml index 3571536aff4..1f4af0a8981 100644 --- a/EleNewEnergiesProducer/BuildFile.xml +++ b/EleNewEnergiesProducer/BuildFile.xml @@ -19,6 +19,8 @@ + + # diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index 112b8f83838..d6ea37a8680 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -15,6 +15,10 @@ regrEleFile_fra = cms.string('nocorrection.root'), correctionFileName = cms.string(''), correctionType = cms.string(''), - ptSplit = cms.bool(True) + ptSplit = cms.bool(True), + regrEleJoshV4_SemiParamFile = cms.string('./data/regweights_v4_forest_ele.root'), + regrEleJoshV5_SemiParamFile = cms.string('./data/regweights_v5_forest_ele.root'), + regrPhoJoshV4_SemiParamFile = cms.string('./data/regweights_v4_forest_ph.root'), + regrPhoJoshV5_SemiParamFile = cms.string('./data/regweights_v5_forest_ph.root'), ) diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index 4b4007dcd8c..bd1c1a5e3a6 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -70,13 +70,18 @@ #include "../interface/EGEnergyCorrector_fra.h" #include "RecoEgamma/EgammaTools/interface/EGEnergyCorrector.h" +//#include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h" +#include "HiggsAnalysis/GBRLikelihoodEGTools/interface/EGEnergyCorrectorSemiParm.h" +//#include "DataFormats/EgammaCandidates/interface/Photon.h" + // // class declaration // class EleNewEnergiesProducer : public edm::EDProducer { - - typedef edm::ValueMap NewEnergyMap; + + typedef float v_t; + typedef edm::ValueMap NewEnergyMap; public: explicit EleNewEnergiesProducer(const edm::ParameterSet&); @@ -135,9 +140,19 @@ class EleNewEnergiesProducer : public edm::EDProducer { EGEnergyCorrector josh_Ele; EGEnergyCorrector josh_Pho; EGEnergyCorrector_fra fra_Ele; + EGEnergyCorrectorSemiParm corV4_ele; + EGEnergyCorrectorSemiParm corV5_ele; + EGEnergyCorrectorSemiParm corV4_pho; + EGEnergyCorrectorSemiParm corV5_pho; + + std::string regrEleFile; //weights std::string regrPhoFile; std::string regrEleFile_fra; + std::string regrEleJoshV4_SemiParamFile; + std::string regrEleJoshV5_SemiParamFile; + std::string regrPhoJoshV4_SemiParamFile; + std::string regrPhoJoshV5_SemiParamFile; bool ptSplit; }; @@ -167,6 +182,10 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) regrEleFile(iConfig.getParameter("regrEleFile")), regrPhoFile(iConfig.getParameter("regrPhoFile")), regrEleFile_fra(iConfig.getParameter("regrEleFile_fra")), + regrEleJoshV4_SemiParamFile(iConfig.getParameter("regrEleJoshV4_SemiParamFile")), + regrEleJoshV5_SemiParamFile(iConfig.getParameter("regrEleJoshV5_SemiParamFile")), + regrPhoJoshV4_SemiParamFile(iConfig.getParameter("regrPhoJoshV4_SemiParamFile")), + regrPhoJoshV5_SemiParamFile(iConfig.getParameter("regrPhoJoshV5_SemiParamFile")), ptSplit(iConfig.getParameter("ptSplit")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), // puWeightFile(iConfig.getParameter("puWeightFile")), @@ -196,6 +215,39 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energySCEleJoshPhoVar"); produces< NewEnergyMap >("energyEleFra"); produces< NewEnergyMap >("energyEleFraVar"); + + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_pdfval"); + + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_pdfval"); + //now do what ever other initialization is needed } @@ -237,12 +289,25 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iSetup.get().get(pSetup); */ - std::vector energySCEleJoshEle; - std::vector energySCEleJoshEleVar; - std::vector energySCEleJoshPho; - std::vector energySCEleJoshPhoVar; - std::vector energyEleFra; - std::vector energyEleFraVar; + std::vector energySCEleJoshEle; + std::vector energySCEleJoshEleVar; + std::vector energySCEleJoshPho; + std::vector energySCEleJoshPhoVar; + std::vector energyEleFra; + std::vector energyEleFraVar; + std::vector energySCEleJoshEleSemiParamV4_ecorr, energySCEleJoshEleSemiParamV4_sigma, + energySCEleJoshEleSemiParamV4_alpha1, energySCEleJoshEleSemiParamV4_gamma1, energySCEleJoshEleSemiParamV4_alpha2, + energySCEleJoshEleSemiParamV4_gamma2, energySCEleJoshEleSemiParamV4_pdfval; + std::vector energySCEleJoshPhoSemiParamV4_ecorr, energySCEleJoshPhoSemiParamV4_sigma, + energySCEleJoshPhoSemiParamV4_alpha1, energySCEleJoshPhoSemiParamV4_gamma1, energySCEleJoshPhoSemiParamV4_alpha2, + energySCEleJoshPhoSemiParamV4_gamma2, energySCEleJoshPhoSemiParamV4_pdfval; + std::vector energySCEleJoshEleSemiParamV5_ecorr, energySCEleJoshEleSemiParamV5_sigma, + energySCEleJoshEleSemiParamV5_alpha1, energySCEleJoshEleSemiParamV5_gamma1, energySCEleJoshEleSemiParamV5_alpha2, + energySCEleJoshEleSemiParamV5_gamma2, energySCEleJoshEleSemiParamV5_pdfval; + std::vector energySCEleJoshPhoSemiParamV5_ecorr, energySCEleJoshPhoSemiParamV5_sigma, + energySCEleJoshPhoSemiParamV5_alpha1, energySCEleJoshPhoSemiParamV5_gamma1, energySCEleJoshPhoSemiParamV5_alpha2, + energySCEleJoshPhoSemiParamV5_gamma2, energySCEleJoshPhoSemiParamV5_pdfval; + std::auto_ptr energySCEleJoshEleMap(new NewEnergyMap()); std::auto_ptr energySCEleJoshEleVarMap(new NewEnergyMap()); @@ -250,6 +315,37 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu std::auto_ptr energySCEleJoshPhoVarMap(new NewEnergyMap()); std::auto_ptr energyEleFraMap(new NewEnergyMap()); std::auto_ptr energyEleFraVarMap(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV4_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV4_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV4_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV4_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV4_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV4_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV4_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParamV4_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV4_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV4_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV4_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV4_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV4_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV4_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshEleSemiParamV5_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV5_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV5_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV5_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV5_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV5_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV5_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParamV5_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV5_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV5_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV5_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV5_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV5_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV5_pdfval_Map(new NewEnergyMap()); //------------------------------ ELECTRON iEvent.getByLabel(electronsTAG, electronsHandle); @@ -313,6 +409,65 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu #endif corEle_fra = fra_Ele.CorrectedEnergyWithErrorTracker(*ele_itr,*primaryVertexHandle, *rhoHandle, lazyTools,iSetup,ptSplit); + + double ecor, sigma, alpha1, n1, alpha2, n2, pdfval; + + + corV4_ele.CorrectedEnergyWithErrorV4(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParamV4_ecorr.push_back(ecor); + energySCEleJoshEleSemiParamV4_sigma.push_back(sigma); + energySCEleJoshEleSemiParamV4_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParamV4_gamma1.push_back(n1); + energySCEleJoshEleSemiParamV4_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParamV4_gamma2.push_back(n2); + energySCEleJoshEleSemiParamV4_pdfval.push_back(pdfval); + +#if DEBUG == 2 + printf("V4: sceta = %5f, default = %5f, corrected = %5f, sigma = %5f, alpha1 = %5f, n1 = %5f, alpha2 = %5f, n2 = %5f, pdfval = %5f\n", it->superCluster()->eta(), it->energy(),ecor,sigma,alpha1,n1,alpha2,n2,pdfval); +#endif + + corV5_ele.CorrectedEnergyWithErrorV5(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParamV5_ecorr.push_back(ecor); + energySCEleJoshEleSemiParamV5_sigma.push_back(sigma); + energySCEleJoshEleSemiParamV5_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParamV5_gamma1.push_back(n1); + energySCEleJoshEleSemiParamV5_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParamV5_gamma2.push_back(n2); + energySCEleJoshEleSemiParamV5_pdfval.push_back(pdfval); + +#if DEBUG == 2 + printf("V5: sceta = %5f, default = %5f, corrected = %5f, sigma = %5f, alpha1 = %5f, n1 = %5f, alpha2 = %5f, n2 = %5f, pdfval = %5f\n", it->superCluster()->eta(), it->energy(),ecor,sigma,alpha1,n1,alpha2,n2,pdfval); +#endif + + + + corV4_pho.CorrectedEnergyWithErrorV4(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParamV4_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParamV4_sigma.push_back(sigma); + energySCEleJoshPhoSemiParamV4_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParamV4_gamma1.push_back(n1); + energySCEleJoshPhoSemiParamV4_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParamV4_gamma2.push_back(n2); + energySCEleJoshPhoSemiParamV4_pdfval.push_back(pdfval); + +#if DEBUG == 2 + printf("V4: sceta = %5f, default = %5f, corrected = %5f, sigma = %5f, alpha1 = %5f, n1 = %5f, alpha2 = %5f, n2 = %5f, pdfval = %5f\n", it->superCluster()->eta(), it->energy(),ecor,sigma,alpha1,n1,alpha2,n2,pdfval); +#endif + + corV5_pho.CorrectedEnergyWithErrorV5(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParamV5_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParamV5_sigma.push_back(sigma); + energySCEleJoshPhoSemiParamV5_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParamV5_gamma1.push_back(n1); + energySCEleJoshPhoSemiParamV5_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParamV5_gamma2.push_back(n2); + energySCEleJoshPhoSemiParamV5_pdfval.push_back(pdfval); + +#if DEBUG == 2 + printf("V5: sceta = %5f, default = %5f, corrected = %5f, sigma = %5f, alpha1 = %5f, n1 = %5f, alpha2 = %5f, n2 = %5f, pdfval = %5f\n", it->superCluster()->eta(), it->energy(),ecor,sigma,alpha1,n1,alpha2,n2,pdfval); +#endif + + // std::cout< hltPaths; private: std::string foutName; - std::string regrPhoFile; - std::string regrEleFile; bool doExtraCalibTree; bool doEleIDTree; @@ -240,6 +238,11 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t energySigmaSCEle_regrCorr_ele[2]; Float_t energySigmaSCEle_regrCorr_pho[2]; + Float_t energySCEle_regrCorrSemiParV4_pho[2], energySigmaSCEle_regrCorrSemiParV4_pho[2]; + Float_t energySCEle_regrCorrSemiParV4_ele[2], energySigmaSCEle_regrCorrSemiParV4_ele[2]; + Float_t energySCEle_regrCorrSemiParV5_pho[2], energySigmaSCEle_regrCorrSemiParV5_pho[2]; + Float_t energySCEle_regrCorrSemiParV5_ele[2], energySigmaSCEle_regrCorrSemiParV5_ele[2]; + Float_t energySCEle_corr[2]; ///< ecal energy with corrections base on type of electron (see #classificationEle) Float_t energyEle_regrCorr_egamma[2]; ///< Egamma POG electron regression energy @@ -265,6 +268,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t invMass_SC_regrCorr_pho; Float_t invMass_regrCorr_fra; Float_t invMass_regrCorr_egamma; + Float_t invMass_SC_regrCorrSemiParV4_ele,invMass_SC_regrCorrSemiParV4_pho; + Float_t invMass_SC_regrCorrSemiParV5_ele,invMass_SC_regrCorrSemiParV5_pho; Float_t invMass_MC; Float_t etaMCEle[2], phiMCEle[2]; @@ -730,6 +735,12 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("energySigmaSCEle_regrCorr_ele", energySigmaSCEle_regrCorr_ele, "energySigmaSCEle_regrCorr_ele[2]/F"); tree->Branch("energySigmaSCEle_regrCorr_pho", energySigmaSCEle_regrCorr_pho, "energySigmaSCEle_regrCorr_pho[2]/F"); + // semi parametric regression V4 + tree->Branch("energySCEle_regrCorrSemiParV4_ele", energySCEle_regrCorrSemiParV4_ele, "energySCEle_regrCorrSemiParV4_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiParV4_pho", energySCEle_regrCorrSemiParV4_pho, "energySCEle_regrCorrSemiParV4_pho[2]/F"); + tree->Branch("energySCEle_regrCorrSemiParV5_ele", energySCEle_regrCorrSemiParV5_ele, "energySCEle_regrCorrSemiParV5_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiParV5_pho", energySCEle_regrCorrSemiParV5_pho, "energySCEle_regrCorrSemiParV5_pho[2]/F"); + tree->Branch("R9Ele", R9Ele, "R9Ele[2]/F"); tree->Branch("e5x5SCEle", e5x5SCEle, "e5x5SCEle[2]/F"); @@ -749,6 +760,10 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("invMass_SC_regrCorr_pho", &invMass_SC_regrCorr_pho, "invMass_SC_regrCorr_pho/F"); tree->Branch("invMass_regrCorr_fra", &invMass_regrCorr_fra, "invMass_regrCorr_fra/F"); tree->Branch("invMass_regrCorr_egamma", &invMass_regrCorr_egamma, "invMass_regrCorr_egamma/F"); + tree->Branch("invMass_SC_regrCorrSemiParV4_pho", &invMass_SC_regrCorrSemiParV4_pho, "invMass_SC_regrCorrSemiParV4_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiParV4_ele", &invMass_SC_regrCorrSemiParV4_ele, "invMass_SC_regrCorrSemiParV4_ele/F"); + tree->Branch("invMass_SC_regrCorrSemiParV5_pho", &invMass_SC_regrCorrSemiParV5_pho, "invMass_SC_regrCorrSemiParV5_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiParV5_ele", &invMass_SC_regrCorrSemiParV5_ele, "invMass_SC_regrCorrSemiParV5_ele/F"); tree->Branch("invMass_MC", &invMass_MC, "invMass_MC/F"); tree->Branch("etaMCEle", etaMCEle, "etaMCEle[2]/F"); //[nEle] @@ -952,6 +967,16 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int energySigmaEle_regrCorr_fra[index] = electron1.userFloat("eleNewEnergiesProducer:energyEleFraVar"); energySigmaEle_regrCorr_egamma[index] = electron1.userFloat("eleRegressionEnergy:eneErrorRegForGsfEle"); + energySCEle_regrCorrSemiParV4_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV4_ecorr"); + energySCEle_regrCorrSemiParV4_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV4_ecorr"); + energySigmaSCEle_regrCorrSemiParV4_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV4_sigma"); + energySigmaSCEle_regrCorrSemiParV4_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV4_sigma"); + + energySCEle_regrCorrSemiParV5_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV5_ecorr"); + energySCEle_regrCorrSemiParV5_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV5_ecorr"); + energySigmaSCEle_regrCorrSemiParV5_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV5_sigma"); + energySigmaSCEle_regrCorrSemiParV5_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV5_sigma"); + // change in an electron properties please, EleNewEnergyProducer e3x3SCEle[index] = clustertools->e3x3(*electron1.superCluster()->seed()); e5x5SCEle[index] = clustertools->e5x5(*electron1.superCluster()->seed()); From 0eaccbeabd72a37628c605e73699e2ace560aee3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:36:10 +0200 Subject: [PATCH 120/475] less debug output and fixed initFile for toys --- ZFitter/bin/ZFitter.cpp | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index b4f1bf70513..a853a1651b5 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -589,8 +589,10 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t Y[i] += chi2; NY[i]++; } +#ifdef DEBUG if(update==true) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; +#endif if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -625,9 +627,11 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t Y[i] += chi2; NY[i]++; } - + +#ifdef DEBUG if(update==true) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; +#endif if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -653,7 +657,7 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t if(Y!=NULL){ //take the mean! for(Int_t i =0; i < N; i++){ - if(Y[i]!=0) Y[i] /= NY[i]; + if(NY[i]!=0) Y[i] /= NY[i]; } } @@ -717,9 +721,13 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i iLocMin2Prev = FindMin1D(var2, X2, N2, iLocMin2Prev, locmin, smearer, true, Y); for(Int_t i2=0; i2 < N2; i2++){ +#ifdef DEBUG if(Y[i2]!=0) std::cout << i1 << "\t" << i2 << "\t" << X1[i1] << "\t" << X2[i2] << "\t" << Y[i2]; +#endif h.Fill(i1,i2,Y[i2]); +#ifdef DEBUG if(Y[i2]!=0) std::cout << "\t" << h.GetBinContent(i1+1,i2+1) << std::endl; +#endif } var2->setVal(X2[iLocMin2Prev]); @@ -745,7 +753,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i for(Int_t i2=0; i20){ - if(update==true || true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locminSmooth-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(update==true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locminSmooth-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; if(content>0 && locminSmooth > content){ locminSmooth=content; iLocMin1=i1; @@ -1949,11 +1957,11 @@ int main(int argc, char **argv) { myClock.Reset(); if(vm.count("smearerFit")){ - + smearer.SetHistBinning(80,100,invMass_binWidth); // to do before Init if(vm.count("runToy")){ smearer.SetToyScale(1, constTermToy); - if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), initFileName.c_str()); + if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), true,initFileName.c_str()); else smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy")); std::cout << "[DEBUG] " << constTermToy << std::endl; } else{ @@ -1961,23 +1969,7 @@ int main(int argc, char **argv) { args.writeToStream(std::cout, kFALSE); smearer.Init(commonCut.c_str(), eleID); } -// for(std::vector::iterator cat_itr = smearer.ZeeCategories.begin(); -// cat_itr != smearer.ZeeCategories.end(); -// cat_itr++){ -// if((cat_itr->categoryName1.Contains("absEta_1_1.4442-gold") && !cat_itr->categoryName2.Contains("absEta_0_1-gold")) -// || -// (cat_itr->categoryName2.Contains("absEta_1_1.4442-gold") && !cat_itr->categoryName1.Contains("absEta_0_1-gold")) -// ) cat_itr->active=false; -// } - - - //RooArgList list(args); - //m.simplex(); - //for(int i =0; i < list.getSize(); i++){ - // list[i].Print(); - //if(TString(list[i].GetName()).Contains("constTerm")) ((RooRealVar *)list.at(i))->setConstant(kFALSE); - // list[i].Print(); - //} + //if(vm.count("plotOnly")) //smearer.SetNSmear(10); RooMinuit m(smearer); if(! vm.count("plotOnly") && ! vm.count("profileOnly")){ From 074ab712c33b676379b3c995e89e15086afa0895 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:37:11 +0200 Subject: [PATCH 121/475] fixed regions for step4 checks --- ZFitter/data/regions/scaleStep4smearing_0.dat | 2 ++ ZFitter/data/regions/scaleStep4smearing_0a.dat | 10 ++++++++++ ZFitter/data/regions/scaleStep4smearing_1.dat | 12 ------------ ZFitter/data/regions/scaleStep4smearing_2.dat | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 ZFitter/data/regions/scaleStep4smearing_0.dat create mode 100644 ZFitter/data/regions/scaleStep4smearing_0a.dat diff --git a/ZFitter/data/regions/scaleStep4smearing_0.dat b/ZFitter/data/regions/scaleStep4smearing_0.dat new file mode 100644 index 00000000000..5ff96a311d3 --- /dev/null +++ b/ZFitter/data/regions/scaleStep4smearing_0.dat @@ -0,0 +1,2 @@ +EB +EE diff --git a/ZFitter/data/regions/scaleStep4smearing_0a.dat b/ZFitter/data/regions/scaleStep4smearing_0a.dat new file mode 100644 index 00000000000..42702ffc925 --- /dev/null +++ b/ZFitter/data/regions/scaleStep4smearing_0a.dat @@ -0,0 +1,10 @@ +# regions defined for condition validation +EB-absEta_0_1-bad +EB-absEta_0_1-gold +EB-absEta_1_1.4442-bad +EB-absEta_1_1.4442-gold +EE-absEta_1.566_2-bad +EE-absEta_1.566_2-gold +EE-absEta_2_2.5-bad +EE-absEta_2_2.5-gold +# regions defined for condition validation diff --git a/ZFitter/data/regions/scaleStep4smearing_1.dat b/ZFitter/data/regions/scaleStep4smearing_1.dat index 272b6ec7947..5fd1d6539f5 100644 --- a/ZFitter/data/regions/scaleStep4smearing_1.dat +++ b/ZFitter/data/regions/scaleStep4smearing_1.dat @@ -2,15 +2,3 @@ EB-absEta_0_1-bad EB-absEta_0_1-gold EB-absEta_1_1.4442-bad EB-absEta_1_1.4442-gold -#EE-absEta_1.566_2-bad -#EE-absEta_1.566_2-gold -#EE-absEta_2_2.5-bad -#EE-absEta_2_2.5-gold -EB-absEta_0_1-bad -EB-absEta_0_1-gold -EB-absEta_1_1.4442-bad -EB-absEta_1_1.4442-gold -#EE-absEta_1.566_2-bad -#EE-absEta_1.566_2-gold -#EE-absEta_2_2.5-bad -#EE-absEta_2_2.5-gold diff --git a/ZFitter/data/regions/scaleStep4smearing_2.dat b/ZFitter/data/regions/scaleStep4smearing_2.dat index 84cfa71c311..a0ce3643dd0 100644 --- a/ZFitter/data/regions/scaleStep4smearing_2.dat +++ b/ZFitter/data/regions/scaleStep4smearing_2.dat @@ -5,8 +5,8 @@ EE-absEta_1.566_2-gold EE-absEta_2_2.5-bad EE-absEta_2_2.5-gold # regions defined for condition validation -EB-absEta_0_1-gold -EE-absEta_1.566_2-bad -EE-absEta_1.566_2-gold -EE-absEta_2_2.5-bad -EE-absEta_2_2.5-gold +#EB-absEta_0_1-gold +#EE-absEta_1.566_2-bad +#EE-absEta_1.566_2-gold +#EE-absEta_2_2.5-bad +#EE-absEta_2_2.5-gold From fe6dfcdff5e28143ebccd2b800343b186bf1d564 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:38:26 +0200 Subject: [PATCH 122/475] rookeys smoothing added --- ZFitter/macro/mcmcDraw.C | 145 +++++++++++++++++++++++++++++++-------- 1 file changed, 118 insertions(+), 27 deletions(-) diff --git a/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C index 2b0207ae4e9..8d1bd43aa24 100644 --- a/ZFitter/macro/mcmcDraw.C +++ b/ZFitter/macro/mcmcDraw.C @@ -42,11 +42,72 @@ #include #include +#include + #include #include -void Smooth(TH2F *h, Int_t ntimes, Option_t *option) +Double_t getMinimumFromTree(TTree *tree, TString minimumVar, TString returnVar){ + Double_t var, minVar; + Double_t min=1e20, minimum; + + tree->SetBranchAddress(returnVar, &var); + tree->SetBranchAddress(minimumVar, &minVar); + + tree->SetBranchStatus("*",0); + tree->SetBranchStatus(returnVar,1); + tree->SetBranchStatus(minimumVar,1); + + tree->GetEntries(); + for(Long64_t jentry=0; jentryGetEntriesFast(); jentry++){ + tree->GetEntry(jentry); + //std::cout << returnVar << "\t" << min << "\t" << minVar << "\t" << minimum << "\t" << var << std::endl; + if(minVar minimum = " << minimum << std::endl; + tree->SetBranchStatus("*",1); + tree->ResetBranchAddresses(); + return minimum; +} + +RooDataSet *th22dataset(TH2F *hist){ + RooRealVar *v1 = new RooRealVar("constTerm","",0.01,0,0.02); + RooRealVar *v2 = new RooRealVar("alpha","",0.0,0,0.2); + RooRealVar *nll = new RooRealVar("nll",0,0,1e20); + RooArgSet argSet(*v1,*v2, *nll); + RooDataSet *dataset = new RooDataSet(TString(hist->GetName())+"_dataset", "", argSet,"nll"); + + for(Int_t iBinX=1; iBinX <= hist->GetNbinsX(); iBinX++){ + for(Int_t iBinY=1; iBinY <= hist->GetNbinsY(); iBinY++){ + Double_t binContent=hist->GetBinContent(iBinX, iBinY); + if(binContent!=0){ + v1->setVal(hist->GetXaxis()->GetBinCenter(iBinX)); + v2->setVal(hist->GetYaxis()->GetBinCenter(iBinY)); + nll->setVal(binContent); + dataset->add(argSet); + } + } + } + return dataset; +} + +Roo2DKeysPdf *SmoothKeys(TH2F *h) +{ + RooDataSet *dataset = th22dataset(h); + RooRealVar *v1 = (RooRealVar *) dataset->get()->find("constTerm"); + RooRealVar *v2 = (RooRealVar *) dataset->get()->find("alpha"); + + + Roo2DKeysPdf *myPdf = new Roo2DKeysPdf("mypdf","", *v1, *v2, *dataset); + return myPdf; + +} +Roo2DKeysPdf *Smooth(TH2F *h, Int_t ntimes, Option_t *option) { + // Smooth bin contents of this 2-d histogram using kernel algorithms // similar to the ones used in the raster graphics community. // Bin contents in the active range are replaced by their smooth values. @@ -82,6 +143,8 @@ void Smooth(TH2F *h, Int_t ntimes, Option_t *option) // } TString opt = option; opt.ToLower(); + if(opt.Contains("keys")) return SmoothKeys(h); + Int_t ksize_x=5; Int_t ksize_y=5; Double_t *kernel = &k5a[0][0]; @@ -297,12 +360,12 @@ TGraphErrors g(TTree *tree, TString alphaName, TString constTermName){ Int_t iPoint=0; tree->GetEntry(0); - std::cout << alpha << "\t" << constTerm << std::endl; + //std::cout << alpha << "\t" << constTerm << std::endl; Double_t alpha2=alpha*alpha; Double_t const2=constTerm*constTerm; for(Double_t energy=20; energy<150; energy+=10){ Double_t addSmearing = (sqrt(alpha2/energy+const2)); - std::cout << alpha << "\t" << constTerm << "\t" << addSmearing << std::endl; + //std::cout << alpha << "\t" << constTerm << "\t" << addSmearing << std::endl; graph.SetPoint(iPoint, energy, addSmearing); graph.SetPointError(iPoint,0, 0); iPoint++; @@ -410,7 +473,7 @@ TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, T var2Name.ReplaceAll("-","_"); // tree->Print(); TString histName="h"; - std::cout << var1Name << "\t" << var2Name << "\t" << histName << std::endl; + //std::cout << var1Name << "\t" << var2Name << "\t" << histName << std::endl; tree->Draw(var1Name+":"+var2Name+">>"+histName+binning); TH2F *hEntries = (TH2F*)gROOT->FindObject(histName); if(hEntries==NULL) return NULL; @@ -428,6 +491,8 @@ TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, T if(smooth){ Smooth(h, 1, "k3a"); + Smooth(h, 1, "k3a"); + Smooth(h, 1, "k3a"); } if(delta){ @@ -438,7 +503,7 @@ TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, T if(max deltaNLL_map; @@ -750,9 +815,17 @@ void MakePlots(TString filename, float zmax=50, bool invert=false, TString energ nllBestFit.SaveAs("tmp/nllBestFit.root"); contour68->SaveAs("tmp/contour68.root"); delete hist; - hist = prof2d(tree, alphaName, constTermName, "nll", - "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", false,true); - RooHistPdf *histPdf = nllToL(hist); + RooAbsPdf *histPdf = NULL; + if(!opt.Contains("keys")){ + hist = prof2d(tree, alphaName, constTermName, "nll", + "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", false,true); + + histPdf = nllToL(hist); + }else{ + hist = prof2d(tree, alphaName, constTermName, "nll", + "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", false,false); + histPdf = Smooth(hist,1,"keys"); + } delete hist; RooDataSet *gen_dataset=histPdf->generate(*histPdf->getVariables(),1000000,kTRUE,kFALSE); TTree *genTree = dataset2tree(gen_dataset); @@ -805,16 +878,21 @@ void MakePlots(TString filename, float zmax=50, bool invert=false, TString energ } -TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString fname="outProfile-scaleStep2smearing_7-Et_25-trigger-noPF-EB.root"){ +TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString fname="outProfile-scaleStep2smearing_7-Et_25-trigger-noPF-EB.root", TString opt=""){ TString outDir=dirname; outDir.ReplaceAll("fitres","img"); outDir="tmp/"; //std::map deltaNLL_map; + + bool smooth=false; + if(opt.Contains("smooth")) smooth=true; + /*------------------------------ Plotto */ TCanvas c("ctoy","c"); TTree *toys = new TTree("toys",""); + toys->SetDirectory(0); Double_t constTerm_tree, constTermTrue_tree; Double_t alpha_tree, alphaTrue_tree; char catName[100]; @@ -835,11 +913,11 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString TFile f_in(filename, "read"); if(f_in.IsZombie()){ std::cerr << "File opening error: " << filename << std::endl; - return NULL; + continue; //return NULL; } TList *KeyList = f_in.GetListOfKeys(); - std::cout << KeyList->GetEntries() << std::endl; + //std::cout << KeyList->GetEntries() << std::endl; for(int i =0; i < KeyList->GetEntries(); i++){ c.Clear(); TKey *key = (TKey *)KeyList->At(i); @@ -850,24 +928,37 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); TTree *tree = dataset2tree(dataset); + TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); TH2F *hist = prof2d(tree, alphaName, constTermName, "nll", - "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", true,true); - + "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", true,smooth); + //hist->SaveAs("myhist.root"); + Int_t iBinX, iBinY; - hist->GetBinWithContent2(1.99999660253524780e-04,iBinX,iBinY); - - TString catName_=constTermName; catName_.ReplaceAll("constTerm_",""); catName_.ReplaceAll("-","_"); - if(catIndexMap.count(catName_)==0) catIndexMap.insert(std::pair(catName_,catIndexMap.size())); - catIndex=catIndexMap[catName_]; - - constTerm_tree = hist->GetXaxis()->GetBinCenter(iBinX); - alpha_tree = hist->GetYaxis()->GetBinCenter(iBinY); - sprintf(catName,"%s", catName_.Data()); - bestFit_.GetPoint(0, constTermTrue_tree,alphaTrue_tree); - - toys->Fill(); - + hist->GetBinWithContent2(0.0002,iBinX,iBinY, 1,-1,1,-1,0.00001); + + if(iBinX!=0 && iBinY!=0 && iBinX < 41 && iBinY < 62){ + TString catName_=constTermName; catName_.ReplaceAll("constTerm_",""); catName_.ReplaceAll("-","_"); + if(catIndexMap.count(catName_)==0) catIndexMap.insert(std::pair(catName_,catIndexMap.size())); + catIndex=catIndexMap[catName_]; + + constTerm_tree = hist->GetXaxis()->GetBinCenter(iBinX); + alpha_tree = hist->GetYaxis()->GetBinCenter(iBinY); + sprintf(catName,"%s", catName_.Data()); + bestFit_.GetPoint(0, constTermTrue_tree,alphaTrue_tree); + + if(opt.Contains("scandiff")){ + constTermTrue_tree = getMinimumFromTree(tree, "nll",TString(constTermName).ReplaceAll("-","_")); + } else if(opt.Contains("scan")){ + constTerm_tree = getMinimumFromTree(tree, "nll",TString(constTermName).ReplaceAll("-","_")); + } + //std::cout << iBinX << "\t" << iBinY << "\t" << constTerm_tree - getMinimumFromTree(tree, "nll",TString(constTermName).ReplaceAll("-","_")) << std::endl; + + toys->Fill(); + }else{ + hist->SaveAs("myhist.root"); + exit(0); + } delete tree; delete hist; From 32e428f12b2adb0967c9d7fb63f47940dce3f5f0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:39:05 +0200 Subject: [PATCH 123/475] detailed options and comments --- ZFitter/script/FitResultTostep2.sh | 80 ++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/ZFitter/script/FitResultTostep2.sh b/ZFitter/script/FitResultTostep2.sh index 3c011199335..51be76afbaa 100755 --- a/ZFitter/script/FitResultTostep2.sh +++ b/ZFitter/script/FitResultTostep2.sh @@ -1,9 +1,77 @@ #!/bin/bash -commonCut="Et_20" -file1=$1 -file2=$2 -file3=$3 -outFile=$4 +commonCut=Et_25-trigger-noPF +selection=WP90_PU +invMass_var=invMass_SC_regrCorr_pho +baseDir=test +updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" +#updateOnly="" + +usage(){ + echo "`basename $0` [options]" + echo " --fileEB arg" + echo " --fileEE arg" + echo " --fileStep1 arg" + echo " --outFile arg" +# echo " --runRangesFile arg " +# echo " --selection arg (=$selection)" +# echo " --invMass_var arg" + echo " --commonCut arg (=$commonCut)" +# echo " --step arg: 1, 2, 2fit, 3, 3weight, slide, 3stability, syst, 1-2,1-3,1-3stability and all ordered combination" +} +#------------------------------ parsing + + +# options may be followed by one colon to indicate they have a required argument +if ! options=$(getopt -u -o hf:s: -l help,fileEB:,fileEE:,fileStep1:,outFile:,selection:,invMass_var:,step:,baseDir:,commonCut: -- "$@") +then + # something went wrong, getopt will put out an error message for us + exit 1 +fi + +set -- $options + +while [ $# -gt 0 ] +do + case $1 in + -h|--help) usage; exit 0;; + --fileEB) file1=$2; shift;; + --fileEE) file2=$2; shift;; + --fileStep1) file3=$2; shift;; + --outFile) outFile=$2; shift;; +# -s|--step) STEP=$2; shift;; +# --invMass_var) invMass_var=$2; echo "[OPTION] invMass_var = ${invMass_var}"; shift;; +# --runRangesFile) runRangesFile=$2; echo "[OPTION] runRangesFile = ${runRangesFile}"; shift;; +# --selection) selection=$2; echo "[OPTION] selection = ${selection}"; shift;; +# --baseDir) baseDir=$2; echo "[OPTION] baseDir = $baseDir"; shift;; + --commonCut) commonCut=$2; echo "[OPTION] commonCut = $commonCut"; shift;; + (--) shift; break;; + (-*) usage; echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; + (*) break;; + esac + shift +done + + +if [ -z "${file1}" ];then + echo "[ERROR] fileEB not provided" >> /dev/stderr + exit 1 +fi + +if [ -z "${file2}" ];then + echo "[ERROR] fileEE not provided" >> /dev/stderr + exit 1 +fi + +if [ -z "${outFile}" ];then + echo "[ERROR] outFile not provided" >> /dev/stderr + exit 1 +fi + +if [ -z "${file3}" ];then + echo "[ERROR] fileStep1 not provided" >> /dev/stderr + exit 1 +fi + grep scale ${file1} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat grep scale ${file2} | grep EE | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat @@ -11,6 +79,8 @@ grep scale ${file2} | grep EE | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|sc ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${file3} |grep -v '#' > ${outFile}.dat ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${file3} |sed -f sed/tex.sed > ${outFile}.tex + +exit 0 #!/bin/bash commonCut="Et_20" file1=$1 From df82a1fbe1a1fad01284f33e7a013b799e9e5d2d Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:39:34 +0200 Subject: [PATCH 124/475] fixing step4 --- ZFitter/script/energyScale.sh | 46 ++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index d2d8019a43b..0d7a54ed190 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -273,35 +273,57 @@ if [ -n "${STEP3}" ];then fi if [ -n "${STEP4}" ];then - regionFile=data/regions/scaleStep4smearing_1.dat + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi if [ ! -e "${outDirData}/step4/fitres" ];then mkdir ${outDirData}/step4/fitres -p; fi if [ ! -e "${outDirData}/step4/img" ];then mkdir ${outDirData}/step4/img -p; fi - + regionFile=data/regions/scaleStep4smearing_0.dat + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ + --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ + --profileOnly --initFile=init.txt \ + > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + + regionFile=data/regions/scaleStep4smearing_0a.dat ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ + --profileOnly --initFile=init.txt \ + > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + + regionFile=data/regions/scaleStep4smearing_1.dat + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ + --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ + --profileOnly --initFile=init.txt \ + > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 - -# cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_1.txt -# cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_1.root -# cp ${outDirData}/step4/fitres/outProfile.root ${outDirData}/step4/fitres/outProfile_step4smearing_1.root + + # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_1.txt + # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_1.root + # cp ${outDirData}/step4/fitres/outProfile.root ${outDirData}/step4/fitres/outProfile_step4smearing_1.root regionFile=data/regions/scaleStep4smearing_2.dat -# --initFile=${outDirData}/step4/fitres/params.txt \ - + # --initFile=${outDirData}/step4/fitres/params.txt \ + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ + --profileOnly --initFile=init.txt \ + > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_2.txt # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_2.root From 8dd358f2f94c6e47923b7eb8276143aec9e0b33d Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:40:14 +0200 Subject: [PATCH 125/475] mcToy file differentiated for alphaFixed and alphaFloating cases --- ZFitter/script/justOnce/smearing.sh | 131 ++++++++++++++++++---------- 1 file changed, 83 insertions(+), 48 deletions(-) diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index 01e782c90ca..2388eaaffe3 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -1,9 +1,15 @@ #!/bin/bash #1000 100000 -dir=test/dato/fitres/Hgg_Et-toys -for const in 0.01 0.02 0.005 +#regionsFile=scaleStep2smearing_7 +nEventsPerToy=new +for regionsFile in scaleStep2smearing_8 #scaleStep2smearing_5 scaleStep2smearing_6 + do +dir=test/dato/fitres/Hgg_Et-toys/${regionsFile} +alphaConst=C + +for const in 0.01 0.02 #0.005 do - for alpha in 0.00 #0.01 0.03 0.05 0.07 + for alpha in 0.00 0.15 #0.01 0.03 0.07 do echo "[[[[[[[[[[[ const:alpha ]]]]]]]]]]] ${const}:${alpha}" baseDir=${dir}/${nEventsPerToy}/${const}-${alpha}/ @@ -13,69 +19,98 @@ EB-absEta_0_1-bad ${const} ${alpha} EB-absEta_0_1-gold ${const} ${alpha} EB-absEta_1_1.4442-bad ${const} ${alpha} EB-absEta_1_1.4442-gold ${const} ${alpha} -EE-absEta_1.566_2-bad 0 0 -EE-absEta_1.566_2-gold 0 0 -EE-absEta_2_2.5-bad 0 0 -EE-absEta_2_2.5-gold 0 0 +EE-absEta_1.566_2-bad ${const} ${alpha} +EE-absEta_1.566_2-gold ${const} ${alpha} +EE-absEta_2_2.5-bad ${const} ${alpha} +EE-absEta_2_2.5-gold ${const} ${alpha} EOF - cat data/validation/toyMC.dat | sed 's|^d|k|;s|^s|d|;s|^k|s|;/smearEle/ d' > ${baseDir}/invertedToyMC.dat + cat data/validation/toyMC2.dat | sed 's|^d|k|;s|^s|d|;s|^k|s|;/smearEle/ d;/smaerCat/ d' | sed "s|scaleStep2smearing_7|$regionsFile|" > ${baseDir}/invertedToyMC.dat if [ ! -e "smearEle_HggRunEtaR9_mc-${const}-${alpha}.root" ];then - ./bin/ZFitter.exe -f ${baseDir}/invertedToyMC.dat --regionsFile=data/regions/scaleStep2smearing_7.dat \ + ./bin/ZFitter.exe -f ${baseDir}/invertedToyMC.dat --regionsFile=data/regions/${regionsFile}.dat \ + --commonCut=Et_25-trigger-noPF-EB \ + --autoNsmear --constTermFix --saveRootMacro --noPU \ + --smearEleType=HggRunEtaR9 --smearEleFile=${baseDir}/smearEleFile.dat > ${baseDir}/treeGen.log || exit 1 + mv tmp/smearEle_HggRunEtaR9_mc.root smearEle_HggRunEtaR9_mc-${const}-${alpha}.root || exit 1 + fi +# if [ ! -e "smearerCat_stdPowheg-${regionsFile}.root" -o ! -e "smearerCat_stdMadgraph-${regionsFile}.root" ];then +# echo "[STATUS] Generating smearerCat for data and mc!" +# ./bin/ZFitter.exe -f data/validation/toyMC2.dat --regionsFile=data/regions/${regionsFile}.dat \ +# --commonCut=Et_25-trigger-noPF-EB \ +# --autoNsmear --constTermFix --saveRootMacro --noPU \ +# --addBranch smearerCat > ${baseDir}/smearerCatGen.log || exit 1 +# mv tmp/smearerCat_mc.root smearerCat_stdPowheg-${regionsFile}.root || exit 1 +# mv tmp/smearerCat_data.root smearerCat_stdMadgraph-${regionsFile}.root || exit 1 +# fi + + + if [ ! -e "smearerCat-22Jan-stdMC_data-${regionsFile}.root" -o ! -e "smearerCat-22Jan-stdMC_mc-${regionsFile}.root" ];then + echo "[STATUS] Generating smearerCat for data and mc!" + ./bin/ZFitter.exe -f data/validation/toyMC2.dat --regionsFile=data/regions/${regionsFile}.dat \ --commonCut=Et_25-trigger-noPF-EB \ --autoNsmear --constTermFix --saveRootMacro --noPU \ - --smearEleType=HggRunEtaR9 --smearEleFile=${baseDir}/smearEleFile.dat > ${baseDir}/treeGen.log - mv tmp/smearEle_HggRunEtaR9_mc.root smearEle_HggRunEtaR9_mc-${const}-${alpha}.root + --addBranch smearerCat > ${baseDir}/smearerCatGen.log || exit 1 + mv tmp/smearerCat_mc.root smearerCat-22Jan-stdMC_mc-${regionsFile}.root || exit 1 + mv tmp/smearerCat_data.root smearerCat-22Jan-stdMC_data-${regionsFile}.root || exit 1 fi - cat > $baseDir/mcToy.txt < $baseDir/${alphaConst}/mcToy.txt < $baseDir/toyMC.dat - echo "d smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_mc-${const}-${alpha}.root" >> $baseDir/toyMC.dat - continue + + sed '/smearEle/ d' data/validation/toyMC2.dat | sed "s|scaleStep2smearing_7|$regionsFile|" > $baseDir/toyMC.dat + echo "s smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_mc-${const}-${alpha}.root" >> $baseDir/toyMC.dat + for nToys in `seq 1 200`; do - newDir=${baseDir}/${nToys} + newDir=${baseDir}/${alphaConst}/${nToys} mkdir -p $newDir - - bsub -q 2nd \ + + bsub -q 2nd -oo ${newDir}/stdout.log -eo ${newDir}/stderr.log -J "$regionsFile-$const-$alpha" \ "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch5/src/calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ - --regionsFile=data/regions/scaleStep2smearing_7.dat \ + --regionsFile=data/regions/${regionsFile}.dat \ --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ --autoNsmear --constTermFix --smearerType=profile --noPU \ - --initFile=${baseDir}/mcToy.txt --profileOnly > ${newDir}/log2.log" + --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy > ${newDir}/log2.log" +# ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ +# --regionsFile=data/regions/${regionsFile}.dat \ +# --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ +# --autoNsmear --constTermFix --smearerType=profile --noPU \ +# --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy #> ${newDir}/log2.log done wait done wait done +done + exit 0 #!/bin/bash From b4a8561586c07137b3c6c44c0e849aee55dbe4e1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:41:17 +0200 Subject: [PATCH 126/475] toys with all the MC samples but 1/3 of the statistics as data --- ZFitter/src/SmearingImporter.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index c70c4f3e6c9..d900a088421 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -196,7 +196,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS bool hasSmearerCat=false; // for toy repartition - Long64_t eventNumber; + ULong64_t eventNumber; //------------------------------ chain->SetBranchAddress("eventNumber", &eventNumber); @@ -208,7 +208,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } if(chain->GetBranch("smearEle")!=NULL){ - if(isToy==false || (externToy==true && isToy==true)){ + if(isToy==false || (externToy==true && isToy==true && isMC==false)){ std::cout << "[STATUS] Adding electron energy smearing branch from friend" << std::endl; chain->SetBranchAddress("smearEle", smearEle_); } @@ -287,6 +287,9 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Long64_t entryNumber= chain->GetEntryNumber(jentry); chain->GetEntry(entryNumber); if(isToy){ + if(jentry<10){ + std::cout << isMC << "\t" << eventNumber << "\t" << eventNumber%3 << std::endl; + } if(isMC && eventNumber%3==0) continue; if(!isMC && eventNumber%3!=0) continue; } @@ -419,16 +422,19 @@ SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, boo } } - + std::cout << "Eventlist" << std::endl; TString evListName="evList_"; evListName+=_chain->GetTitle(); evListName+="_all"; + TEntryList *oldList = _chain->GetEntryList(); + if(oldList==NULL){ _chain->Draw(">>"+evListName, cutter.GetCut(_commonCut+"-"+eleID_,true), "entrylist"); //_chain->Draw(">>"+evListName, "", "entrylist"); TEntryList *elist_all = (TEntryList*)gDirectory->Get(evListName); // elist_all->SetBit(!kCanDelete); _chain->SetEntryList(elist_all); - + } + std::cout << "Eventlist" << std::endl; for(std::vector::const_iterator region_ele1_itr = _regionList.begin(); region_ele1_itr != _regionList.end(); region_ele1_itr++){ From d32bebff8068d68487d8408d6a139b00811c3c9d Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:41:37 +0200 Subject: [PATCH 127/475] fixing scripts and macros --- ZFitter/data/validation/22Jan2012-stdMC.dat | 4 +- ZFitter/macro/PlotDataMC.C | 146 ++++++++++++++++++++ ZFitter/macro/macro_fit.C | 10 +- ZFitter/macro/plot_data_mc.C | 5 +- ZFitter/src/EnergyScaleCorrection_class.cc | 3 + 5 files changed, 161 insertions(+), 7 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index b41efcaaf64..7b4c8375a77 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -18,5 +18,5 @@ s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-st ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees -d smearerCat_d smearerCat-22Jan-stdMC_data-scaleStep2smearing_7.root -s smearerCat_s smearerCat-22Jan-stdMC_mc-scaleStep2smearing_7.root +#d smearerCat_d smearerCat-22Jan-stdMC_data-scaleStep2smearing_7.root +#s smearerCat_s smearerCat-22Jan-stdMC_mc-scaleStep2smearing_7.root diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 20d59cbaa05..bf812c531dd 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -456,3 +456,149 @@ TCanvas *PlotDataMCMC(TChain *data, TChain *mc, TChain *mc2, return c; } + + + +TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchname, TString binning, + TString category, TString selection, + TString dataLabel, std::vector mcLabel_vec, TString xLabel, TString yLabelUnit, + bool logy=false, bool usePU=true, bool smear=false, bool scale=false){ + + int nHist= mc_vec.size(); + TString yLabel; + + TCanvas *c = new TCanvas("c",""); + TString branchNameData=branchname; + TString branchNameMC=branchname; + + ElectronCategory_class cutter; + TCut selection_data=""; + if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0); + selection_data+=selection; + TCut selection_MC=""; + if(category.Sizeof()>1) selection_MC = cutter.GetCut(category, false,0); + selection_MC+=selection; + + if(smear){ + branchNameMC.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(smearEle[0]*smearEle[1]))"); + branchNameMC.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*smearEle) "); + branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*smearEle[0])"); + branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*smearEle[1])"); + + } + if(scale){ + branchNameData.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(corrEle[0]*corrEle[1]))"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*corrEle)"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*corrEle[0])"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*corrEle[1])"); + } + //std::cout << branchNameData << "\t" << branchNameMC << std::endl; + + + + // Draw histograms + data->Draw(branchNameData+">>data_hist"+binning, selection_data); + if(nHist > 0){ + for(std::vector mc_itr = mc_vec.begin(); + mc_itr != mc_vec.end(); + mc_itr++){ + TChain *mc = *mc_itr; + TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; + if(usePU) mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *"puWeight"); + else mc->Draw(branchNameMC+">>mc_hist"+binning, selection_MC); + } + } + + + c->Clear(); + TH1F *d = (TH1F *) gROOT->FindObject("data_hist"); + //d->SaveAs("tmp/d_hist.root"); + //s->SaveAs("tmp/s_hist.root"); + + yLabel.Form("Events /(%.2f %s)", d->GetBinWidth(2), yLabelUnit.Data()); + + float max = 0; //1.1 * std::max( + //d->GetMaximum(),///d->Integral(), + //s->GetMaximum() ///s->Integral() + //); + max=1.1*d->GetMaximum(); + std::cout << "max = " << max << std::endl; + std::cout << "nEvents data: " << d->Integral() << "\t" << d->GetEntries() << std::endl; + + + d->GetYaxis()->SetTitle(yLabel); + d->GetXaxis()->SetTitle(xLabel); + if(logy){ + max*=10; + d->GetYaxis()->SetRangeUser(0.1,max); + c->SetLogy(); + } else { + d->GetYaxis()->SetRangeUser(0,max); + } + + d->SetMarkerStyle(20); + d->SetMarkerSize(1); + + for(int i=0; i < nHist; i++){ + TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; + TH1F *s = (TH1F *) gROOT->FindObject(mcHistName); + + std::cout << "nEvents signal: " << s->Integral() << "\t" << s->GetEntries() << std::endl; + if(logy){ + s->GetYaxis()->SetRangeUser(0.1,max); + } else { + s->GetYaxis()->SetRangeUser(0,max); + } + s->GetYaxis()->SetTitle(yLabel); + s->GetXaxis()->SetTitle(xLabel); + + s->SetMarkerStyle(20); + s->SetMarkerSize(1); + s->SetFillStyle(3001+i); + s->SetFillColor(kRed+i); + TH1F* s_norm = NULL; + if(i==0) s_norm = (TH1F *) (s->DrawNormalized("hist", d->Integral())); + else s_norm = (TH1F *) (s->DrawNormalized("hist same", d->Integral())); + if(logy){ + //d_norm->GetYaxis()->SetRangeUser(0.1,max); + s_norm->GetYaxis()->SetRangeUser(0.1,max); + } else { + //d_norm->GetYaxis()->SetRangeUser(0,max); + s_norm->GetYaxis()->SetRangeUser(0,max); + } + + } + + //TH1F* d_norm = s_norm; + //if(d!=s) d_norm = (TH1F *) (d->DrawNormalized("p same", d->Integral())); + if(nHist>0) d->Draw("p same"); + else d->Draw("p"); + +// std::cout << "Variable & Data & Simulation \\" << std::endl; +// std::cout << "Mean & " << d->GetMean() << " " << d->GetMeanError() +// << " & " << s_norm->GetMean() << " " << s_norm->GetMeanError() << " \\" << std::endl; +// std::cout << "Std. dev. & " << d->GetRMS() << " " << d->GetRMSError() +// << " & " << s_norm->GetRMS() << " " << s_norm->GetRMSError() << " \\" << std::endl; +// std::cout << "\\hline" << std::endl; +// std::cout << "$\\Chi^2$ " << d->Chi2Test(s_norm, "UW CHI2/NDF NORM") << std::endl; + + +// TLegend *leg = new TLegend(0.6,0.8,1,1); +// if(dataLabel !="") leg->AddEntry(d,dataLabel,"p"); +// if(mcLabel !="") leg->AddEntry(s,mcLabel, "lf"); +// leg->SetBorderSize(1); +// leg->SetFillColor(0); +// leg->SetTextSize(0.04); +// if(dataLabel !="" && mcLabel !="") leg->Draw(); +// //c->GetListOfPrimitives()->Add(leg,""); + + TPaveText *pv = new TPaveText(0.2,0.95,0.7,1,"NDC"); + pv->AddText("CMS Preliminary 2012"); + pv->SetFillColor(0); + pv->SetBorderSize(0); + pv->Draw(); + + + return c; + +} diff --git a/ZFitter/macro/macro_fit.C b/ZFitter/macro/macro_fit.C index 8110ad02530..fe1654999fc 100644 --- a/ZFitter/macro/macro_fit.C +++ b/ZFitter/macro/macro_fit.C @@ -620,7 +620,7 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ TString region= map_region_itr->first; TString variable = map_itr->first; bool isScale=map_itr->first.CompareTo("scale")==0; - //if(isScale) continue; + if(!isScale) continue; std::cout << region << " " << variable << std::endl; @@ -678,8 +678,12 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ g->GetXaxis()->SetTitle("1+#DeltaP "); }else{ - g->GetXaxis()->SetRangeUser(std::max(fun->GetXmin()-sigma,0.), std::min(fun->GetXmax()+sigma,0.15)); - g->GetYaxis()->SetRangeUser(-5, std::max(fun->Eval(fun->GetXmin()-1.5*sigma), fun->Eval(fun->GetXmax()+1.5*sigma))); + Double_t xMin=0., xMax=0.03; + //xMin=std::max(fun->GetXmin()-sigma,0.); + //xMax=std::min(fun->GetXmax()+sigma,0.15); + g->GetXaxis()->SetRangeUser(xMin, xMax); + g->GetYaxis()->SetRangeUser(-5, 100); + //g->GetYaxis()->SetRangeUser(-5, std::max(fun->Eval(fun->GetXmin()-1.5*sigma), fun->Eval(fun->GetXmax()+1.5*sigma))); g->Draw("AP"); g->GetYaxis()->SetTitle("#Delta L (a. u.)"); g->GetXaxis()->SetTitle("#Delta#sigma"); diff --git a/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C index 432cd03542e..43a7bde9cb9 100644 --- a/ZFitter/macro/plot_data_mc.C +++ b/ZFitter/macro/plot_data_mc.C @@ -186,7 +186,7 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen legend->SetFillStyle(1001); legend->Draw(); - + std::cout << "Saving into " << img_filename(filename, region, ".eps") << std::endl; c->SaveAs(img_filename(filename, region, ".eps")); c->SaveAs(img_filename(filename, region, ".png")); c->SaveAs(img_filename(filename, region, ".C")); @@ -240,7 +240,7 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ /*------------------------------ somma sugli istogrammi */ std::cout << "Data Entries in " << keyName << "\t" << h->GetEntries() << std::endl; - if(type.CompareTo("data")==0){ + if(type.CompareTo("data")==0 || type.CompareTo("smeardata")==0 ){ if(dataHist.find(region)==dataHist.end()){ hist_t hist_vec; // vector of bins of ONE histogram AddHist(hist_vec, h); // add the content of the histogram h to the vector @@ -283,6 +283,7 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ itr!= dataHist.end(); itr++){ c->cd(); TString region=itr->first; + std::cout << region << std::endl; // for(int i_region=0; i_region < n_region -1; i_region++){ // for(int j_region=i_region; j_region < n_region; j_region++){ // region="region_"; diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 17d27957e31..2f044f9c62f 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -18,6 +18,9 @@ EnergyScaleCorrection_class::EnergyScaleCorrection_class(TString correctionFileN if(smearingFileName.Sizeof()>1) noSmearings=false; else noSmearings=true; + if(correctionFileName.Sizeof()>1) noCorrections=false; + else noCorrections=true; + if(correctionType.Sizeof()<=1 && smearingType.Sizeof()>1) correctionType=smearingType; #ifdef DEBUG std::cout << "[DEBUG] Using correctionType: " << correctionType << std::endl; From 7d2f8512c466fbb2efc0dfe32a3a161f094f468f Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:42:13 +0200 Subject: [PATCH 128/475] new regions for toy testing Et dependence of scale and smearings --- ZFitter/data/regions/scaleStep2smearing_5.dat | 26 +++++++++++++++++++ ZFitter/data/regions/scaleStep2smearing_6.dat | 23 ++++++++++++++++ ZFitter/data/regions/scaleStep2smearing_7.dat | 26 +++++++++++++++++++ ZFitter/data/regions/scaleStep2smearing_8.dat | 26 +++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 ZFitter/data/regions/scaleStep2smearing_5.dat create mode 100644 ZFitter/data/regions/scaleStep2smearing_6.dat create mode 100644 ZFitter/data/regions/scaleStep2smearing_7.dat create mode 100644 ZFitter/data/regions/scaleStep2smearing_8.dat diff --git a/ZFitter/data/regions/scaleStep2smearing_5.dat b/ZFitter/data/regions/scaleStep2smearing_5.dat new file mode 100644 index 00000000000..48bb79fbcbd --- /dev/null +++ b/ZFitter/data/regions/scaleStep2smearing_5.dat @@ -0,0 +1,26 @@ +# regions defined for condition validation +energySC_27_33-absEta_0_1-bad +energySC_33_39-absEta_0_1-bad +energySC_39_45-absEta_0_1-bad +energySC_45_50-absEta_0_1-bad +energySC_50_58-absEta_0_1-bad +energySC_58_65-absEta_0_1-bad +#energySC_65_80-absEta_0_1-bad +energySC_27_35-absEta_0_1-gold +energySC_35_43-absEta_0_1-gold +energySC_43_50-absEta_0_1-gold +energySC_50_55-absEta_0_1-gold +energySC_55_75-absEta_0_1-gold +#energySC_75_100-absEta_0_1-gold +# +energySC_27_33-absEta_1_1.4442-bad +energySC_33_39-absEta_1_1.4442-bad +energySC_39_45-absEta_1_1.4442-bad +energySC_45_50-absEta_1_1.4442-bad +energySC_50_58-absEta_1_1.4442-bad +energySC_58_65-absEta_1_1.4442-bad +#energySC_65_80-absEta_1_1.4442-bad +energySC_27_40-absEta_1_1.4442-gold +energySC_40_50-absEta_1_1.4442-gold +energySC_50_75-absEta_1_1.4442-gold +#energySC_75_100-absEta_1_1.4442-gold diff --git a/ZFitter/data/regions/scaleStep2smearing_6.dat b/ZFitter/data/regions/scaleStep2smearing_6.dat new file mode 100644 index 00000000000..857c4dd65ae --- /dev/null +++ b/ZFitter/data/regions/scaleStep2smearing_6.dat @@ -0,0 +1,23 @@ +# regions defined for condition validation +Et_27_33-absEta_0_1-bad +Et_33_39-absEta_0_1-bad +Et_39_50-absEta_0_1-bad +Et_50_58-absEta_0_1-bad +Et_58_65-absEta_0_1-bad +#Et_65_80-absEta_0_1-bad +Et_27_35-absEta_0_1-gold +Et_35_50-absEta_0_1-gold +Et_50_55-absEta_0_1-gold +Et_55_75-absEta_0_1-gold +#Et_75_100-absEta_0_1-gold +# +Et_27_33-absEta_1_1.4442-bad +Et_33_39-absEta_1_1.4442-bad +Et_39_50-absEta_1_1.4442-bad +Et_50_58-absEta_1_1.4442-bad +Et_58_65-absEta_1_1.4442-bad +#Et_65_80-absEta_1_1.4442-bad +Et_27_40-absEta_1_1.4442-gold +Et_40_50-absEta_1_1.4442-gold +Et_50_75-absEta_1_1.4442-gold +#Et_75_100-absEta_1_1.4442-gold diff --git a/ZFitter/data/regions/scaleStep2smearing_7.dat b/ZFitter/data/regions/scaleStep2smearing_7.dat new file mode 100644 index 00000000000..d8443abd5f6 --- /dev/null +++ b/ZFitter/data/regions/scaleStep2smearing_7.dat @@ -0,0 +1,26 @@ +# regions defined for condition validation +Et_27_33-absEta_0_0.8-bad +Et_33_39-absEta_0_0.8-bad +Et_39_45-absEta_0_0.8-bad +Et_45_50-absEta_0_0.8-bad +Et_50_58-absEta_0_0.8-bad +Et_58_65-absEta_0_0.8-bad +#Et_65_80-absEta_0_0.8-bad +Et_27_35-absEta_0_0.8-gold +Et_35_43-absEta_0_0.8-gold +Et_43_50-absEta_0_0.8-gold +Et_50_55-absEta_0_0.8-gold +Et_55_75-absEta_0_0.8-gold +#Et_75_100-absEta_0_0.8-gold +# +Et_27_33-absEta_0.8_1.4442-bad +Et_33_39-absEta_0.8_1.4442-bad +Et_39_45-absEta_0.8_1.4442-bad +Et_45_50-absEta_0.8_1.4442-bad +Et_50_58-absEta_0.8_1.4442-bad +Et_58_65-absEta_0.8_1.4442-bad +#Et_65_80-absEta_0.8_1.4442-bad +Et_27_40-absEta_0.8_1.4442-gold +Et_40_50-absEta_0.8_1.4442-gold +Et_50_75-absEta_0.8_1.4442-gold +#Et_75_100-absEta_0.8_1.4442-gold diff --git a/ZFitter/data/regions/scaleStep2smearing_8.dat b/ZFitter/data/regions/scaleStep2smearing_8.dat new file mode 100644 index 00000000000..8696bf0f41d --- /dev/null +++ b/ZFitter/data/regions/scaleStep2smearing_8.dat @@ -0,0 +1,26 @@ +# regions defined for condition validation +Et_27_33-absEta_0_1-bad +Et_33_39-absEta_0_1-bad +Et_39_45-absEta_0_1-bad +Et_45_50-absEta_0_1-bad +Et_50_58-absEta_0_1-bad +Et_58_65-absEta_0_1-bad +#Et_65_80-absEta_0_1-bad +Et_27_35-absEta_0_1-gold +Et_35_43-absEta_0_1-gold +Et_43_50-absEta_0_1-gold +Et_50_55-absEta_0_1-gold +Et_55_75-absEta_0_1-gold +#Et_75_100-absEta_0_1-gold +# +Et_27_33-absEta_1_1.4442-bad +Et_33_39-absEta_1_1.4442-bad +Et_39_45-absEta_1_1.4442-bad +Et_45_50-absEta_1_1.4442-bad +Et_50_58-absEta_1_1.4442-bad +Et_58_65-absEta_1_1.4442-bad +#Et_65_80-absEta_1_1.4442-bad +Et_27_40-absEta_1_1.4442-gold +Et_40_50-absEta_1_1.4442-gold +Et_50_75-absEta_1_1.4442-gold +#Et_75_100-absEta_1_1.4442-gold From 469c2a0afbb78c0264080242d68dcb3c7f2da4f4 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 08:43:06 +0200 Subject: [PATCH 129/475] temporary scripts for toy plotting --- ZFitter/m.C | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ZFitter/p.C | 35 ++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 ZFitter/m.C create mode 100644 ZFitter/p.C diff --git a/ZFitter/m.C b/ZFitter/m.C new file mode 100644 index 00000000000..f8d57332ba8 --- /dev/null +++ b/ZFitter/m.C @@ -0,0 +1,83 @@ +{ + gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); + gROOT->ProcessLine(".L macro/mcmcDraw.C+"); + TString outDir="tmp/v8-alphaFloat-noSmooth-0.02-0.00"; + system(("mkdir -p "+outDir).Data()); + // TTree *toys = ToyTree("test/dato/fitres/Hgg_Et-toys/old/scaleStep2smearing_5/0.01-0.00/C/","outProfile-scaleStep2smearing_5-Et_25-trigger-noPF-EB.root","scan"); + TTree *toys = ToyTree("test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/0.02-0.00//","outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root",""); + + toys->Scan("catName:catIndex:constTermTrue:alphaTrue","","col=50"); + + + toys->Draw("constTerm-constTermTrue>>constTerm_0","catIndex==0"); + toys->Draw("constTerm-constTermTrue>>constTerm_1","catIndex==1"); + toys->Draw("constTerm-constTermTrue>>constTerm_2","catIndex==2"); + toys->Draw("constTerm-constTermTrue>>constTerm_3","catIndex==3"); + toys->Draw("alpha-alphaTrue>>alpha_3","catIndex==3"); + toys->Draw("alpha-alphaTrue>>alpha_2","catIndex==2"); + toys->Draw("alpha-alphaTrue>>alpha_1","catIndex==1"); + toys->Draw("alpha-alphaTrue>>alpha_0","catIndex==0"); + toys->Draw("constTerm:alpha>>constTerm_alpha_0","catIndex==0"); + toys->Draw("constTerm:alpha>>constTerm_alpha_1","catIndex==1"); + toys->Draw("constTerm:alpha>>constTerm_alpha_2","catIndex==2"); + toys->Draw("constTerm:alpha>>constTerm_alpha_3","catIndex==3"); + + gStyle->SetOptStat(1); + + TCanvas *c = new TCanvas("c",""); + + constTerm_alpha_0->Draw("colz"); + constTerm_alpha_0->GetYaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_alpha_0->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/constTerm_alpha_0.png"); + + constTerm_alpha_1->Draw("colz"); + constTerm_alpha_1->GetYaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_alpha_1->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/constTerm_alpha_1.png"); + + constTerm_alpha_2->Draw("colz"); + constTerm_alpha_2->GetYaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_alpha_2->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/constTerm_alpha_2.png"); + + constTerm_alpha_3->Draw("colz"); + constTerm_alpha_3->GetYaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_alpha_3->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/constTerm_alpha_3.png"); + + constTerm_0->Draw(); + constTerm_0->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + c->SaveAs(outDir+"/constTerm_0.png"); + + constTerm_1->Draw(); + constTerm_1->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + c->SaveAs(outDir+"/constTerm_1.png"); + + constTerm_2->Draw(); + constTerm_2->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + // constTerm_2->GetXaxis()->SetRangeUser(-0.005,0.005); + c->SaveAs(outDir+"/constTerm_2.png"); + + constTerm_3->Draw(); + constTerm_3->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + c->SaveAs(outDir+"/constTerm_3.png"); + + alpha_0->Draw(); + alpha_0->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/alpha_0.png"); + + alpha_1->Draw(); + alpha_1->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/alpha_1.png"); + + alpha_2->Draw(); + alpha_2->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/alpha_2.png"); + + alpha_3->Draw(); + alpha_3->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + c->SaveAs(outDir+"/alpha_3.png"); + +} + diff --git a/ZFitter/p.C b/ZFitter/p.C new file mode 100644 index 00000000000..abbad4a708c --- /dev/null +++ b/ZFitter/p.C @@ -0,0 +1,35 @@ +{ + gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); + gROOT->ProcessLine(".L macro/mcmcDraw.C+"); + // gROOT->ProcessLine(".L ~/smooth.C+"); + TString constTermName="constTerm_absEta_1_1.4442-bad-Et_25-trigger-noPF-EB"; + //TString constTermName="constTerm_absEta_0_0.8-gold-Et_25-trigger-noPF-EB"; + //TString constTermName="constTerm_absEta_0.8_1.4442-bad-Et_25-trigger-noPF-EB"; + //TString constTermName="constTerm_absEta_0.8_1.4442-gold-Et_25-trigger-noPF-EB"; + TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); + RooDataSet *data = (RooDataSet *)_file0->Get(constTermName); + + TTree *tree = dataset2tree(data); + double min=tree->GetMinimum("nll"); + TString minString; minString+=min; + // tree->Draw(TString(constTermName).ReplaceAll("-","_")+":"+TString(alphaName).ReplaceAll("-","_")+">>hist(31,-0.0022975,0.1401475,40,0.00025,0.02025)","nll-"+minString,"colz",800,5); + // TH2F *h = (TH2F*) gROOT->FindObject("hist"); + // h->GetZaxis()->SetRangeUser(0,100); + TH2F *hprof = prof2d(tree, TString(constTermName).ReplaceAll("-","_"), TString(alphaName).ReplaceAll("-","_"), "nll", + "(241,-0.00025,0.24025,60,0.00025,0.03025)", true,true); + hprof->Draw("colz"); + hprof->GetZaxis()->SetRangeUser(0,30); + hprof->GetXaxis()->SetTitle("#Delta #alpha"); + hprof->GetYaxis()->SetTitle("#Delta #sigma"); + Int_t iBinX, iBinY; + Double_t x,y; + hprof->GetBinWithContent2(1.99999660253524780e-04,iBinX,iBinY); + x= hprof->GetXaxis()->GetBinCenter(iBinX); + y= hprof->GetYaxis()->GetBinCenter(iBinY); + TGraph nllBestFit(1,&x,&y); + + nllBestFit.SetMarkerStyle(3); + nllBestFit.SetMarkerColor(kRed); + nllBestFit.Draw("P same"); + +} From c672bc36c9463a908f0165bed869d9e9cd4f879d Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 10:55:47 +0200 Subject: [PATCH 130/475] new regression collection names without _ --- .../src/EleNewEnergiesProducer.cc | 118 +++++++++--------- ZNtupleDumper/python/patSequence_cff.py | 62 ++++----- ZNtupleDumper/src/ZNtupleDumper.cc | 31 +++-- 3 files changed, 113 insertions(+), 98 deletions(-) diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index bd1c1a5e3a6..993d2ecb639 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -216,37 +216,37 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energyEleFra"); produces< NewEnergyMap >("energyEleFraVar"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_ecorr"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_sigma"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_alpha1"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_gamma1"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_alpha2"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_gamma2"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4_pdfval"); - - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_ecorr"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_sigma"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_alpha1"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_gamma1"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_alpha2"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_gamma2"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5_pdfval"); - - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_ecorr"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_sigma"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_alpha1"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_gamma1"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_alpha2"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_gamma2"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4_pdfval"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4pdfval"); + + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4pdfval"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_ecorr"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_sigma"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_alpha1"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_gamma1"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_alpha2"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_gamma2"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5_pdfval"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5pdfval"); //now do what ever other initialization is needed @@ -609,37 +609,37 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.put(energyEleFraVarMap, "energyEleFraVar");//fra // electron - iEvent.put(energySCEleJoshEleSemiParamV4_ecorr_Map, "energySCEleJoshEleSemiParamV4_ecorr"); - iEvent.put(energySCEleJoshEleSemiParamV4_sigma_Map, "energySCEleJoshEleSemiParamV4_sigma"); - iEvent.put(energySCEleJoshEleSemiParamV4_alpha1_Map, "energySCEleJoshEleSemiParamV4_alpha1"); - iEvent.put(energySCEleJoshEleSemiParamV4_gamma1_Map, "energySCEleJoshEleSemiParamV4_gamma1"); - iEvent.put(energySCEleJoshEleSemiParamV4_alpha2_Map, "energySCEleJoshEleSemiParamV4_alpha2"); - iEvent.put(energySCEleJoshEleSemiParamV4_gamma2_Map, "energySCEleJoshEleSemiParamV4_gamma2"); - iEvent.put(energySCEleJoshEleSemiParamV4_pdfval_Map, "energySCEleJoshEleSemiParamV4_pdfval"); + iEvent.put(energySCEleJoshEleSemiParamV4_ecorr_Map, "energySCEleJoshEleSemiParamV4ecorr"); + iEvent.put(energySCEleJoshEleSemiParamV4_sigma_Map, "energySCEleJoshEleSemiParamV4sigma"); + iEvent.put(energySCEleJoshEleSemiParamV4_alpha1_Map, "energySCEleJoshEleSemiParamV4alpha1"); + iEvent.put(energySCEleJoshEleSemiParamV4_gamma1_Map, "energySCEleJoshEleSemiParamV4gamma1"); + iEvent.put(energySCEleJoshEleSemiParamV4_alpha2_Map, "energySCEleJoshEleSemiParamV4alpha2"); + iEvent.put(energySCEleJoshEleSemiParamV4_gamma2_Map, "energySCEleJoshEleSemiParamV4gamma2"); + iEvent.put(energySCEleJoshEleSemiParamV4_pdfval_Map, "energySCEleJoshEleSemiParamV4pdfval"); - iEvent.put(energySCEleJoshEleSemiParamV5_ecorr_Map, "energySCEleJoshEleSemiParamV5_ecorr"); - iEvent.put(energySCEleJoshEleSemiParamV5_sigma_Map, "energySCEleJoshEleSemiParamV5_sigma"); - iEvent.put(energySCEleJoshEleSemiParamV5_alpha1_Map, "energySCEleJoshEleSemiParamV5_alpha1"); - iEvent.put(energySCEleJoshEleSemiParamV5_gamma1_Map, "energySCEleJoshEleSemiParamV5_gamma1"); - iEvent.put(energySCEleJoshEleSemiParamV5_alpha2_Map, "energySCEleJoshEleSemiParamV5_alpha2"); - iEvent.put(energySCEleJoshEleSemiParamV5_gamma2_Map, "energySCEleJoshEleSemiParamV5_gamma2"); - iEvent.put(energySCEleJoshEleSemiParamV5_pdfval_Map, "energySCEleJoshEleSemiParamV5_pdfval"); + iEvent.put(energySCEleJoshEleSemiParamV5_ecorr_Map, "energySCEleJoshEleSemiParamV5ecorr"); + iEvent.put(energySCEleJoshEleSemiParamV5_sigma_Map, "energySCEleJoshEleSemiParamV5sigma"); + iEvent.put(energySCEleJoshEleSemiParamV5_alpha1_Map, "energySCEleJoshEleSemiParamV5alpha1"); + iEvent.put(energySCEleJoshEleSemiParamV5_gamma1_Map, "energySCEleJoshEleSemiParamV5gamma1"); + iEvent.put(energySCEleJoshEleSemiParamV5_alpha2_Map, "energySCEleJoshEleSemiParamV5alpha2"); + iEvent.put(energySCEleJoshEleSemiParamV5_gamma2_Map, "energySCEleJoshEleSemiParamV5gamma2"); + iEvent.put(energySCEleJoshEleSemiParamV5_pdfval_Map, "energySCEleJoshEleSemiParamV5pdfval"); // photon - iEvent.put(energySCEleJoshPhoSemiParamV4_ecorr_Map, "energySCEleJoshPhoSemiParamV4_ecorr"); - iEvent.put(energySCEleJoshPhoSemiParamV4_sigma_Map, "energySCEleJoshPhoSemiParamV4_sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV4_alpha1_Map, "energySCEleJoshPhoSemiParamV4_alpha1"); - iEvent.put(energySCEleJoshPhoSemiParamV4_gamma1_Map, "energySCEleJoshPhoSemiParamV4_gamma1"); - iEvent.put(energySCEleJoshPhoSemiParamV4_alpha2_Map, "energySCEleJoshPhoSemiParamV4_alpha2"); - iEvent.put(energySCEleJoshPhoSemiParamV4_gamma2_Map, "energySCEleJoshPhoSemiParamV4_gamma2"); - iEvent.put(energySCEleJoshPhoSemiParamV4_pdfval_Map, "energySCEleJoshPhoSemiParamV4_pdfval"); - - iEvent.put(energySCEleJoshPhoSemiParamV5_ecorr_Map, "energySCEleJoshPhoSemiParamV5_ecorr"); - iEvent.put(energySCEleJoshPhoSemiParamV5_sigma_Map, "energySCEleJoshPhoSemiParamV5_sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV5_alpha1_Map, "energySCEleJoshPhoSemiParamV5_alpha1"); - iEvent.put(energySCEleJoshPhoSemiParamV5_gamma1_Map, "energySCEleJoshPhoSemiParamV5_gamma1"); - iEvent.put(energySCEleJoshPhoSemiParamV5_alpha2_Map, "energySCEleJoshPhoSemiParamV5_alpha2"); - iEvent.put(energySCEleJoshPhoSemiParamV5_gamma2_Map, "energySCEleJoshPhoSemiParamV5_gamma2"); - iEvent.put(energySCEleJoshPhoSemiParamV5_pdfval_Map, "energySCEleJoshPhoSemiParamV5_pdfval"); + iEvent.put(energySCEleJoshPhoSemiParamV4_ecorr_Map, "energySCEleJoshPhoSemiParamV4ecorr"); + iEvent.put(energySCEleJoshPhoSemiParamV4_sigma_Map, "energySCEleJoshPhoSemiParamV4sigma"); + iEvent.put(energySCEleJoshPhoSemiParamV4_alpha1_Map, "energySCEleJoshPhoSemiParamV4alpha1"); + iEvent.put(energySCEleJoshPhoSemiParamV4_gamma1_Map, "energySCEleJoshPhoSemiParamV4gamma1"); + iEvent.put(energySCEleJoshPhoSemiParamV4_alpha2_Map, "energySCEleJoshPhoSemiParamV4alpha2"); + iEvent.put(energySCEleJoshPhoSemiParamV4_gamma2_Map, "energySCEleJoshPhoSemiParamV4gamma2"); + iEvent.put(energySCEleJoshPhoSemiParamV4_pdfval_Map, "energySCEleJoshPhoSemiParamV4pdfval"); + + iEvent.put(energySCEleJoshPhoSemiParamV5_ecorr_Map, "energySCEleJoshPhoSemiParamV5ecorr"); + iEvent.put(energySCEleJoshPhoSemiParamV5_sigma_Map, "energySCEleJoshPhoSemiParamV5sigma"); + iEvent.put(energySCEleJoshPhoSemiParamV5_alpha1_Map, "energySCEleJoshPhoSemiParamV5alpha1"); + iEvent.put(energySCEleJoshPhoSemiParamV5_gamma1_Map, "energySCEleJoshPhoSemiParamV5gamma1"); + iEvent.put(energySCEleJoshPhoSemiParamV5_alpha2_Map, "energySCEleJoshPhoSemiParamV5alpha2"); + iEvent.put(energySCEleJoshPhoSemiParamV5_gamma2_Map, "energySCEleJoshPhoSemiParamV5gamma2"); + iEvent.put(energySCEleJoshPhoSemiParamV5_pdfval_Map, "energySCEleJoshPhoSemiParamV5pdfval"); } diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 0ce19f00c4c..07f81e77a79 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -44,37 +44,37 @@ cms.InputTag("eleNewEnergiesProducer", "energyEleFra" ), cms.InputTag("eleNewEnergiesProducer", "energyEleFraVar" ), cms.InputTag("eleNewEnergiesProducer", "energyEleFra" ), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4_ecorr"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4_sigma"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4_alpha1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4_gamma1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4_alpha2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4_gamma2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4_pdfval"), - - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5_ecorr"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5_sigma"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5_alpha1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5_gamma1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5_alpha2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5_gamma2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5_pdfval"), - - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4_ecorr"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4_sigma"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4_alpha1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4_gamma1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4_alpha2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4_gamma2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4_pdfval"), - - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5_ecorr"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5_sigma"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5_alpha1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5_gamma1"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5_alpha2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5_gamma2"), - cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5_pdfval"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV4pdfval"), + + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV5pdfval"), + + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV4pdfval"), + + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5pdfval"), cms.InputTag("eleRegressionEnergy:eneRegForGsfEle"), cms.InputTag("eleRegressionEnergy", "eneErrorRegForGsfEle") diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index b767841b3c2..cfe8d272793 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -741,6 +741,12 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("energySCEle_regrCorrSemiParV5_ele", energySCEle_regrCorrSemiParV5_ele, "energySCEle_regrCorrSemiParV5_ele[2]/F"); tree->Branch("energySCEle_regrCorrSemiParV5_pho", energySCEle_regrCorrSemiParV5_pho, "energySCEle_regrCorrSemiParV5_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV4_ele", energySigmaSCEle_regrCorrSemiParV4_ele, "energySigmaSCEle_regrCorrSemiParV4_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV4_pho", energySigmaSCEle_regrCorrSemiParV4_pho, "energySigmaSCEle_regrCorrSemiParV4_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV5_ele", energySigmaSCEle_regrCorrSemiParV5_ele, "energySigmaSCEle_regrCorrSemiParV5_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV5_pho", energySigmaSCEle_regrCorrSemiParV5_pho, "energySigmaSCEle_regrCorrSemiParV5_pho[2]/F"); + + tree->Branch("R9Ele", R9Ele, "R9Ele[2]/F"); tree->Branch("e5x5SCEle", e5x5SCEle, "e5x5SCEle[2]/F"); @@ -967,15 +973,15 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int energySigmaEle_regrCorr_fra[index] = electron1.userFloat("eleNewEnergiesProducer:energyEleFraVar"); energySigmaEle_regrCorr_egamma[index] = electron1.userFloat("eleRegressionEnergy:eneErrorRegForGsfEle"); - energySCEle_regrCorrSemiParV4_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV4_ecorr"); - energySCEle_regrCorrSemiParV4_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV4_ecorr"); - energySigmaSCEle_regrCorrSemiParV4_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV4_sigma"); - energySigmaSCEle_regrCorrSemiParV4_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV4_sigma"); + energySCEle_regrCorrSemiParV4_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV4ecorr"); + energySCEle_regrCorrSemiParV4_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV4ecorr"); + energySigmaSCEle_regrCorrSemiParV4_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV4sigma"); + energySigmaSCEle_regrCorrSemiParV4_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV4sigma"); - energySCEle_regrCorrSemiParV5_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV5_ecorr"); - energySCEle_regrCorrSemiParV5_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV5_ecorr"); - energySigmaSCEle_regrCorrSemiParV5_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV5_sigma"); - energySigmaSCEle_regrCorrSemiParV5_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV5_sigma"); + energySCEle_regrCorrSemiParV5_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV5ecorr"); + energySCEle_regrCorrSemiParV5_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV5ecorr"); + energySigmaSCEle_regrCorrSemiParV5_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV5sigma"); + energySigmaSCEle_regrCorrSemiParV5_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV5sigma"); // change in an electron properties please, EleNewEnergyProducer e3x3SCEle[index] = clustertools->e3x3(*electron1.superCluster()->seed()); @@ -1050,6 +1056,15 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const invMass_SC_regrCorr_pho = sqrt(2* energySCEle_regrCorr_pho[0] * energySCEle_regrCorr_pho[1] * angle); + invMass_SC_regrCorrSemiParV4_ele = sqrt(2* energySCEle_regrCorrSemiParV4_ele[0] * energySCEle_regrCorrSemiParV4_ele[1] * + angle); + invMass_SC_regrCorrSemiParV4_pho = sqrt(2* energySCEle_regrCorrSemiParV4_pho[0] * energySCEle_regrCorrSemiParV4_pho[1] * + angle); + invMass_SC_regrCorrSemiParV5_ele = sqrt(2* energySCEle_regrCorrSemiParV5_ele[0] * energySCEle_regrCorrSemiParV5_ele[1] * + angle); + invMass_SC_regrCorrSemiParV5_pho = sqrt(2* energySCEle_regrCorrSemiParV5_pho[0] * energySCEle_regrCorrSemiParV5_pho[1] * + angle); + invMass_regrCorr_fra = sqrt(2* energyEle_regrCorr_fra[0] * energyEle_regrCorr_fra[1] *angle); invMass_regrCorr_egamma = sqrt(2* energyEle_regrCorr_egamma[0] * energyEle_regrCorr_egamma[1] *angle); From 34a489a7cf3df5a4ffab02a8d63f4b6c928f4ea4 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 14 Aug 2013 15:26:49 +0200 Subject: [PATCH 131/475] prefix for new regression weights --- ALCARAW_RECO/ntuple_datasets.dat | 6 ++++++ ALCARAW_RECO/python/alcaSkimming.py | 11 ++++++++--- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- ALCARAW_RECO/scripts/resubmitCrab.sh | 5 ++++- ALCARAW_RECO/tmp/.gitignore | 1 - .../python/elenewenergiesproducer_cfi.py | 8 ++++---- .../python/eleselectionproducers_cfi.py | 4 ++++ 7 files changed, 27 insertions(+), 10 deletions(-) delete mode 100644 ALCARAW_RECO/tmp/.gitignore diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index e9159401ceb..9f6fd79eb40 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -142,3 +142,9 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index a9e421141d8..4ec492fad80 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -13,7 +13,7 @@ ### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register('isCrab', - '1', # default Value = true + '0', # default Value = true VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float "change files path in case of local test") @@ -632,13 +632,18 @@ # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) if(options.isCrab): - pathPrefix="./" + pathPrefix="" else: - pathPrefix=CMSSW_BASE+"/" + pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() process.eleNewEnergiesProducer.regrEleFile=pathPrefix+process.eleNewEnergiesProducer.regrEleFile.value() process.eleNewEnergiesProducer.regrEleFile_fra=pathPrefix+process.eleNewEnergiesProducer.regrEleFile_fra.value() +process.eleNewEnergiesProducer.regrEleJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV4_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile.value() + # process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2012Weights_V1.root") #eleEnergyRegWeights_WithSubClusters_VApr15.root") process.eleRegressionEnergy.energyRegressionType=cms.uint32(2) if(re.match("CMSSW_4_4_.*", CMSSW_VERSION)): diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 9f31bf27ee7..b74d387762a 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -356,7 +356,7 @@ if [ -n "${CREATE}" ];then if [ -n "$FILELIST" ];then makeArguments.sh -f $FILELIST -u $UI_WORKING_DIR -n $FILE_PER_JOB || exit 1 fi - splittedOutputFilesCrabPatch -u $UI_WORKING_DIR + splittedOutputFilesCrabPatch.sh -u $UI_WORKING_DIR fi if [ -n "$SUBMIT" ];then diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index c9923e79813..fa08c5a7ff7 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -142,7 +142,10 @@ for jobID in `seq 1 $nJobs` # intervals="$intervals $jobID" # crab -c $ui_working_dir -resubmit $jobID ;; - + 50115*50115) + intervals="$intervals $jobID" + ;; + *) echo $jobID $ExitCode diff --git a/ALCARAW_RECO/tmp/.gitignore b/ALCARAW_RECO/tmp/.gitignore deleted file mode 100644 index 72e8ffc0db8..00000000000 --- a/ALCARAW_RECO/tmp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index d6ea37a8680..7ca1a589905 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -16,9 +16,9 @@ correctionFileName = cms.string(''), correctionType = cms.string(''), ptSplit = cms.bool(True), - regrEleJoshV4_SemiParamFile = cms.string('./data/regweights_v4_forest_ele.root'), - regrEleJoshV5_SemiParamFile = cms.string('./data/regweights_v5_forest_ele.root'), - regrPhoJoshV4_SemiParamFile = cms.string('./data/regweights_v4_forest_ph.root'), - regrPhoJoshV5_SemiParamFile = cms.string('./data/regweights_v5_forest_ph.root'), + regrEleJoshV4_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v4_forest_ele.root'), + regrEleJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ele.root'), + regrPhoJoshV4_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v4_forest_ph.root'), + regrPhoJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ph.root'), ) diff --git a/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py index 6d6a2b88714..ddd02a3b369 100644 --- a/EleSelectionProducers/python/eleselectionproducers_cfi.py +++ b/EleSelectionProducers/python/eleselectionproducers_cfi.py @@ -8,8 +8,12 @@ vertexCollection = cms.InputTag('offlinePrimaryVertices'), conversionCollection = cms.InputTag('allConversions'), BeamSpotCollection = cms.InputTag('offlineBeamSpot'), +# chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), +# emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), +# nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso') chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdGsf') + ) From e5fe148b624a94ae49a83bd84f804d3c84aee080 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 15 Aug 2013 10:25:40 +0200 Subject: [PATCH 132/475] removed unuseful things --- ZNtupleDumper/src/ZNtupleDumper.cc | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index cfe8d272793..d5677079b4a 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -343,8 +343,6 @@ class ZNtupleDumper : public edm::EDAnalyzer { // --------------- selection cuts private: - Long64_t nentries; - Long64_t epsilonected; @@ -424,33 +422,23 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe pEvent = &iEvent; pSetup = &iSetup; - - nentries++; // filling infos runNumber, eventNumber, lumi if( !iEvent.isRealData() ){ iEvent.getByLabel(edm::InputTag("addPileupInfo"), PupInfo); isMC=true; } else isMC=false; - //------------------------------ RECHIT - //iEvent.getByLabel(recHitCollectionEBTAG, recHitCollectionEBHandle); - //iEvent.getByLabel(recHitCollectionEETAG, recHitCollectionEEHandle); - //------------------------------ CONVERSIONS iEvent.getByLabel(conversionsProducerTAG, conversionsHandle); //------------------------------ HLT -#ifdef TRIGGER iEvent.getByLabel(triggerResultsTAG, triggerResultsHandle); -#endif + //------------------------------ clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, recHitCollectionEETAG); - - // Handle to the Zee collection - // edm::Handle ZCandidatesHandle; - // iEvent.getByLabel(ZCandidateTAG, ZCandidatesHandle); + //------------------------------ electrons iEvent.getByLabel(electronsTAG, electronsHandle); // for conversions with full vertex fit @@ -461,11 +449,11 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe iEvent.getByLabel(metTAG, metHandle); + //------------------------------ TreeSetEventSummaryVar(iEvent); TreeSetPileupVar(); // this can be filled once per event // at least one of the triggers -#ifdef TRIGGER HLTfire=false; if(!hltPaths.empty()){ for(std::vector::const_iterator hltPath_itr = hltPaths.begin(); @@ -487,11 +475,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe //exit(1); } } - } else HLTfire=true; - //if(!triggerFire) return; -#endif - // pat::CompositeCandidateCollection ZCandidatesCollection; - + } + // count electrons int nWP70 = 0; //only WP70 int nWP90 = 0; //only WP90 @@ -513,7 +498,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); eleIter1++){ - //if(! eleIter1->electronID("loose") ) continue; if(isWenu){ if(! eleIter1->electronID("tight") ) continue; if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event From ddedb71167566cf931504449bb475e0dc64fac98 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 9 Aug 2013 11:57:47 +0200 Subject: [PATCH 133/475] met corrected --- ZNtupleDumper/src/ZNtupleDumper.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index d5677079b4a..77c627f1474 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -107,6 +107,7 @@ #include "CalibCalorimetry/EcalLaserCorrection/interface/EcalLaserDbRecord.h" #include "DataFormats/METReco/interface/PFMET.h" +#include "DataFormats/METReco/interface/PFMETFwd.h" // HLT trigger #include "FWCore/Framework/interface/TriggerNamesService.h" @@ -155,7 +156,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::Handle rhoHandle; edm::Handle > PupInfo; edm::Handle conversionsHandle; - edm::Handle metHandle; + edm::Handle< reco::PFMETCollection > metHandle; edm::Handle triggerResultsHandle; //------------------------------ Input Tags @@ -448,8 +449,9 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe iEvent.getByLabel(rhoTAG,rhoHandle); iEvent.getByLabel(metTAG, metHandle); - - //------------------------------ + //if(metHandle.isValid()==false) iEvent.getByType(metHandle); + reco::PFMET met = ((*metHandle))[0]; /// \todo use corrected phi distribution + TreeSetEventSummaryVar(iEvent); TreeSetPileupVar(); // this can be filled once per event @@ -501,13 +503,12 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(isWenu){ if(! eleIter1->electronID("tight") ) continue; if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event - - reco::PFMET met = (*metHandle); /// \todo use corrected phi distribution - + // MET/MT selection if( met.et() < 25. ) continue; - if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 30. ) continue; - + if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 50. ) continue; + if( eleIter1->et()<30) continue; + TreeSetDiElectronVar(*eleIter1, *eleIter1); tree->Fill(); if(doExtraCalibTree){ From 03e3088aa0f2a63dfe96950bd165ab31a7b99768 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 15 Aug 2013 11:49:41 +0200 Subject: [PATCH 134/475] removed unuseful ifdef --- ZNtupleDumper/src/ZNtupleDumper.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 77c627f1474..5b11830fd42 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -114,8 +114,8 @@ #include #include -//#define DEBUG -#define TRIGGER +#define DEBUG + //////////////////////////////////////////////// // class declaration // @@ -665,11 +665,10 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); tree->Branch("runTime", &runTime, "runTime/i"); -#ifdef TRIGGER tree->Branch("HLTfire", &HLTfire, "HLTfire/B"); //tree->Branch("HLTNames",&(HLTNames[0])); //tree->Branch("HLTResults",&(HLTResults[0])); -#endif + //extraCalibTree->Branch("XRecHitSCEle1", &(XRecHitSCEle[0])); // tree->Branch("nBX", &nBX, "nBX/I"); @@ -799,7 +798,6 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ lumiBlock = -1; } -#ifdef TRIGGER edm::TriggerNames HLTNames_ = iEvent.triggerNames(*triggerResultsHandle); int hltCount = triggerResultsHandle->size(); HLTNames[0].clear(); @@ -810,7 +808,7 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ (HLTResults[0]).push_back(triggerResultsHandle->accept(i)); HLTBits.insert(std::pair( hltName_str, triggerResultsHandle->accept(i))); } // for i -#endif + return; } From ada5d895b0fdfb317dc8e1aa77dab1ea7bef2682 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 16 Aug 2013 10:26:37 +0200 Subject: [PATCH 135/475] ntuple with new regression from Josh --- ALCARAW_RECO/ntuple_datasets.dat | 4 ++ ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- .../src/EleNewEnergiesProducer.cc | 4 ++ ZFitter/data/validation/test.dat | 45 ++++++++++++++----- 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 9f6fd79eb40..9d5745bdbea 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -148,3 +148,7 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1/semiParamRegression +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1/semiParamRegression +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1/semiParamRegression +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1/semiParamRegression diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index b74d387762a..b3055a1eebb 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -314,7 +314,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 jsonFile=${JSONFILE} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 jsonFile=${JSONFILE} isCrab=1 get_edm_output=1 output_file=${OUTFILES} diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index 993d2ecb639..b311c494677 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -648,18 +648,22 @@ void EleNewEnergiesProducer::beginJob() { if (!corV4_ele.IsInitialized()) { + std::cout << "[STATUS] Initializing V4 regrEle: " << regrEleJoshV4_SemiParamFile << std::endl; corV4_ele.Initialize(regrEleJoshV4_SemiParamFile); //"/afs/cern.ch/user/b/bendavid/CMSSWhgg/CMSSW_5_3_11_patch5/src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ph.root"); } if (!corV5_ele.IsInitialized()) { + std::cout << "[STATUS] Initializing V5 regrEle: " << regrEleJoshV5_SemiParamFile < Date: Fri, 16 Aug 2013 22:35:50 +0200 Subject: [PATCH 136/475] multiple mcs --- ZFitter/bin/ZFitter.cpp | 123 +++++++++++++++++++++++-------- ZFitter/data/validation/test.dat | 13 ++-- ZFitter/lib/.gitignore | 1 + ZFitter/macro/PlotDataMC.C | 30 ++++++-- ZFitter/script/GenRootChain.sh | 10 ++- ZFitter/script/energyScale.sh | 18 ++++- 6 files changed, 145 insertions(+), 50 deletions(-) create mode 100644 ZFitter/lib/.gitignore diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index a853a1651b5..d52aa15416a 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "../interface/ZFit_class.hh" #include "../interface/puWeights_class.hh" @@ -1309,6 +1310,10 @@ int main(int argc, char **argv) { else if(invMass_var=="invMass_regrCorr_egamma") energyBranchName = "energyEle_regrCorr_egamma"; else if(invMass_var=="invMass_SC") energyBranchName = "energySCEle"; else if(invMass_var=="invMass_SC_corr") energyBranchName = "energySCEle_corr"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV4_ele") energyBranchName = "energySCEle_regrCorrSemiParV4_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV4_pho") energyBranchName = "energySCEle_regrCorrSemiParV4_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV5_ele") energyBranchName = "energySCEle_regrCorrSemiParV5_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV5_pho") energyBranchName = "energySCEle_regrCorrSemiParV5_pho"; else { std::cerr << "Energy branch name not define for invariant mass branch: " << invMass_var << std::endl; exit(1); @@ -1424,6 +1429,8 @@ int main(int argc, char **argv) { #endif } + + //init chains for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ @@ -1440,7 +1447,7 @@ int main(int argc, char **argv) { } } - + ///------------------------------ to obtain run ranges if(vm.count("runDivide")){ @@ -1483,6 +1490,7 @@ int main(int argc, char **argv) { }else categories.push_back((*region_itr)+"-"+commonCut.c_str()); } + ///------------------------------ to obtain r9weights r9Weights_class r9Weights; @@ -1492,9 +1500,9 @@ int main(int argc, char **argv) { } if(vm.count("r9WeightFile")){ r9Weights.ReadFromFile(r9WeightFile); - + // mc // save it in a file and reload it as a chain to be safe against the reference directory for the tree - + TFile r9File_mc("tmp/r9mcTree.root","recreate"); if(r9File_mc.IsOpen()){ r9File_mc.cd(); @@ -1511,7 +1519,7 @@ int main(int argc, char **argv) { std::cerr << "[ERROR] " << std::endl; return 1; } - + // data TFile r9File_data("tmp/r9dataTree.root","recreate"); @@ -1529,16 +1537,16 @@ int main(int argc, char **argv) { } } if(vm.count("saveR9TreeWeight")) return 0; - if((tagChainMap["s"]).count("r9Weight")){ - std::cout << "[STATUS] Adding r9Weight chain to signal chain as friend chain" << std::endl; - } - if((tagChainMap["d"]).count("r9Weight")){ - std::cout << "[STATUS] Adding r9Weight chain to data chain as friend chain" << std::endl; - // if((tagChainMap["d"])["selected"]->AddFriend((tagChainMap["d"])["r9Weight"])==NULL) return 2; -#ifdef DEBUG - std::cout << "[DEBUG] r9Weight branch address " << (tagChainMap["d"])["selected"]->GetBranch("r9Weight") << std::endl; -#endif - } +// if((tagChainMap["s"]).count("r9Weight")){ +// std::cout << "[STATUS] Adding r9Weight chain to signal chain as friend chain" << std::endl; +// } +// if((tagChainMap["d"]).count("r9Weight")){ +// std::cout << "[STATUS] Adding r9Weight chain to data chain as friend chain" << std::endl; +// // if((tagChainMap["d"])["selected"]->AddFriend((tagChainMap["d"])["r9Weight"])==NULL) return 2; +// #ifdef DEBUG +// std::cout << "[DEBUG] r9Weight branch address " << (tagChainMap["d"])["selected"]->GetBranch("r9Weight") << std::endl; +// #endif +// } //============================== @@ -1546,10 +1554,10 @@ int main(int argc, char **argv) { // if(vm.count("dataPU")==0 && (tagChainMap["s"]).count("pileupHist")==0 && (tagChainMap["s"]).count("pileup")==0){ if(vm.count("noPU")==0 && !vm.count("runToy")){ - if(dataPUFileNameVec.empty() && (tagChainMap["s"]).count("pileup")==0){ + if(dataPUFileNameVec.empty() && (tagChainMap.count("s")!=0) && (tagChainMap["s"]).count("pileup")==0){ std::cerr << "[ERROR] Nor pileup mc tree configured in chain list file either dataPU histograms are not provided" << std::endl; return 1; - }else if( vm.count("dataPU")!=0 || (!dataPUFileNameVec.empty() && (tagChainMap["s"]).count("pileup")==0)){ + }else if( vm.count("dataPU")!=0 || (!dataPUFileNameVec.empty() && ((tagChainMap.count("s")==0) || (tagChainMap["s"]).count("pileup")==0))){ std::cout << "[STATUS] Creating pileup weighting tree and saving it" << std::endl; for(unsigned int i=0; i < mcPUFileNameVec.size(); i++){ TString mcPUFileName_=mcPUFileNameVec[i]; @@ -1567,23 +1575,33 @@ int main(int argc, char **argv) { std::cout << "********* runMin = " << runMin << "\t" << runMin_ << std::endl; puWeights.ReadFromFiles(mcPUFileName_.Data(),dataPUFileName_.Data(), runMin); } - TFile f("tmp/mcPUtree.root","recreate"); - if(f.IsOpen()){ - f.cd(); - TTree *puTree = puWeights.GetTreeWeight((tagChainMap["s"])["selected"],true); - puTree->Write(); - delete puTree; - f.Write(); - f.Close(); - std::pair pair_tmp("pileup", new TChain("pileup")); - (tagChainMap["s"]).insert(pair_tmp); - (tagChainMap["s"])["pileup"]->SetTitle("s"); - (tagChainMap["s"])["pileup"]->Add("tmp/mcPUtree.root"); + + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //do it for each sample + + TString fpuname="tmp/mcPUtree"+tag_chain_itr->first+".root"; + TFile f(fpuname,"recreate"); + if(f.IsOpen()){ + f.cd(); + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + TTree *puTree = puWeights.GetTreeWeight(ch,true); + puTree->Write(); + delete puTree; + f.Write(); + f.Close(); + std::pair pair_tmp("pileup", new TChain("pileup")); + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(fpuname); + // adding pu weight also to chain "s" + } + } } } - //read corrections directly from file if (vm.count("corrEleType")){ std::cout << "[STATUS] Getting energy scale corrections from file: " << corrEleFile << std::endl; @@ -1783,8 +1801,53 @@ int main(int argc, char **argv) { //(tagChainMap["s"])["selected"]->GetEntries(); - UpdateFriends(tagChainMap); + + //create tag "s" if not present (due to multiple mc samples) + tag="s"; chainName="selected"; + if(!tagChainMap.count(tag)){ + //#ifdef DEBUG + std::cout << "==============================" << std::endl; + std::cout << "==============================" << std::endl; + + std::cout << "[DEBUG] Create new tag map for tag: " << tag << std::endl; + //#endif + std::pair pair_tmp_tag(tag,chain_map_t()); // make_pair not work with scram b + tagChainMap.insert(pair_tmp_tag); + + std::pair pair_tmp(chainName, new TChain(chainName)); + (tagChainMap[tag]).insert(pair_tmp); + (tagChainMap[tag])[chainName]->SetTitle(tag); + + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ +#ifdef DEBUG + std::cout << tag_chain_itr->first << std::endl; +#endif + if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; + + for(chain_map_t::const_iterator chain_itr=tag_chain_itr->second.begin(); + chain_itr!=tag_chain_itr->second.end(); + chain_itr++){ + chain_itr->second->GetEntries(); + std::cout <<"Adding chain to s: " << chain_itr->first << "\t" << chain_itr->second->GetName() << "\t" << chain_itr->second->GetTitle() << std::endl; + if((tagChainMap[tag])[chainName]->Add(chain_itr->second)==0) exit(1); + + TList *friendList= chain_itr->second->GetListOfFriends(); + if(friendList!=NULL){ + friendList->Print(); + TIter friend_itr(friendList); + for(TFriendElement *friendElement = (TFriendElement*) friend_itr.Next(); + friendElement != NULL; friendElement = (TFriendElement*) friend_itr.Next()){ + std::cout << "[STATUS] Adding friend " << friendElement->GetTreeName() << std::endl; + (tagChainMap[tag])[chainName]->AddFriend(friendElement->GetTree()); + } + } + } + } + } + if(vm.count("saveRootMacro")){ for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); diff --git a/ZFitter/data/validation/test.dat b/ZFitter/data/validation/test.dat index d0110cc4397..4dfbd48b540 100644 --- a/ZFitter/data/validation/test.dat +++ b/ZFitter/data/validation/test.dat @@ -1,17 +1,17 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +#s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +#s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +#s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Powheg s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Sherpa -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root ########### Data d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root @@ -25,6 +25,7 @@ d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777- s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root +s pileup mcPUtree_powheg.root ##### PU trees #s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root ##### Scale correction trees diff --git a/ZFitter/lib/.gitignore b/ZFitter/lib/.gitignore new file mode 100644 index 00000000000..72e8ffc0db8 --- /dev/null +++ b/ZFitter/lib/.gitignore @@ -0,0 +1 @@ +* diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index bf812c531dd..dda5a27b6f4 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -463,8 +463,10 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn TString category, TString selection, TString dataLabel, std::vector mcLabel_vec, TString xLabel, TString yLabelUnit, bool logy=false, bool usePU=true, bool smear=false, bool scale=false){ - int nHist= mc_vec.size(); + int colors[4]={kRed,kGreen,kBlue,0}; + int fillstyle[4]={0,0,0,0}; + if(nHist>4) return NULL; TString yLabel; TCanvas *c = new TCanvas("c",""); @@ -499,13 +501,13 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn // Draw histograms data->Draw(branchNameData+">>data_hist"+binning, selection_data); if(nHist > 0){ - for(std::vector mc_itr = mc_vec.begin(); + for(std::vector::const_iterator mc_itr = mc_vec.begin(); mc_itr != mc_vec.end(); mc_itr++){ TChain *mc = *mc_itr; TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; if(usePU) mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *"puWeight"); - else mc->Draw(branchNameMC+">>mc_hist"+binning, selection_MC); + else mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC); } } @@ -540,9 +542,9 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn d->SetMarkerSize(1); for(int i=0; i < nHist; i++){ - TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; + TString mcHistName; mcHistName+=i; mcHistName+="_hist"; TH1F *s = (TH1F *) gROOT->FindObject(mcHistName); - + if(s==NULL) continue; std::cout << "nEvents signal: " << s->Integral() << "\t" << s->GetEntries() << std::endl; if(logy){ s->GetYaxis()->SetRangeUser(0.1,max); @@ -553,9 +555,12 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn s->GetXaxis()->SetTitle(xLabel); s->SetMarkerStyle(20); - s->SetMarkerSize(1); - s->SetFillStyle(3001+i); - s->SetFillColor(kRed+i); + s->SetMarkerSize(2); + s->SetMarkerColor(colors[i]); + s->SetFillStyle(fillstyle[i]); + s->SetFillColor(colors[i]); + s->SetLineColor(colors[i]); + TH1F* s_norm = NULL; if(i==0) s_norm = (TH1F *) (s->DrawNormalized("hist", d->Integral())); else s_norm = (TH1F *) (s->DrawNormalized("hist same", d->Integral())); @@ -602,3 +607,12 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn return c; } + + +std::vector MakeChainVector(TChain *v1, TChain *v2, TChain *v3){ + std::vector vec; + vec.push_back(v1); + vec.push_back(v2); + vec.push_back(v3); + return vec; +} diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index b4cdaac8591..b5febd67ca4 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -132,8 +132,14 @@ rm tmp/*_chain.root ./bin/ZFitter.exe --saveRootMacro -f ${configFile} ${noPU} || exit 1 # adding all the chains in one file -hadd tmp/s_chain.root tmp/s_*_chain.root -hadd tmp/d_chain.root tmp/d_*_chain.root +for file in tmp/{s,d}[0-9]*_selected_chain.root + do + name=`basename $file .root | sed 's|_.*||'` + hadd tmp/${name}_chain.root tmp/${name}_*_chain.root + +done +#hadd tmp/s_chain.root tmp/s_*_chain.root +#hadd tmp/d_chain.root tmp/d_*_chain.root cat > tmp/load.C < Date: Sat, 17 Aug 2013 12:28:33 +0200 Subject: [PATCH 137/475] intermediate step working --- ZFitter/bin/ZFitter.cpp | 43 +++++++++++++++++++++++++++++++- ZFitter/data/validation/test.dat | 20 +++++++-------- ZFitter/script/GenRootChain.sh | 10 +++++--- 3 files changed, 58 insertions(+), 15 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index d52aa15416a..6820afb94db 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -89,7 +89,7 @@ std::vector ReadRegionsFromFile(TString fileName){ } -void UpdateFriends(tag_chain_map_t& tagChainMap){ +void UpdateFriends(tag_chain_map_t& tagChainMap, bool merge=false){ for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); @@ -112,6 +112,47 @@ void UpdateFriends(tag_chain_map_t& tagChainMap){ return; } + +TChain * addChainAndFriends(TString chainName, std::vector chain_vec){ + TChain *sumChain = new TChain(chainName,""); + + std::map friends_map; + for(std::vector::const_iterator chain_itr = chain_vec.begin(); + chain_itr!=chain_vec.end(); + chain_itr++){ + + TList *friendList= (*chain_itr)->GetListOfFriends(); + TIter newfriend_itr(friendList); + + for(TFriendElement *friendElement = (TFriendElement*) newfriend_itr.Next(); + friendElement != NULL; friendElement = (TFriendElement*) newfriend_itr.Next()){ + TString treeName=friendElement->GetTreeName(); + std::cout << "[STATUS] Adding new friend " << treeName << std::endl; + std::map::iterator map_itr = friends_map.find(treeName); + if(map_itr==friends_map.end()){ + friends_map[treeName] = new TChain(treeName,""); + } + friends_map[treeName]->Add((TChain *)friendElement->GetTree()); + } + } + + for(std::vector::const_iterator chain_itr = chain_vec.begin(); + chain_itr!=chain_vec.end(); + chain_itr++){ + sumChain->Add(*chain_itr); + } + + for(std::map::const_iterator map_itr = friends_map.begin(); + map_itr != friends_map.end(); + map_itr++){ + sumChain->AddFriend(map_itr->second); + } + sumChain->GetListOfFriends()->Print(); + return sumChain; +} + + + //Get Profile after smearing TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=1, bool warningEnable=true, bool trueEval=true); TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval){ diff --git a/ZFitter/data/validation/test.dat b/ZFitter/data/validation/test.dat index 4dfbd48b540..833c8c5b395 100644 --- a/ZFitter/data/validation/test.dat +++ b/ZFitter/data/validation/test.dat @@ -1,17 +1,17 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -#s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -#s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -#s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Powheg -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Sherpa -#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root ########### Data d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root @@ -25,7 +25,7 @@ d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777- s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root -s pileup mcPUtree_powheg.root +#s pileup mcPUtree_powheg.root ##### PU trees #s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root ##### Scale correction trees diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index b5febd67ca4..e654f5bd841 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -132,11 +132,12 @@ rm tmp/*_chain.root ./bin/ZFitter.exe --saveRootMacro -f ${configFile} ${noPU} || exit 1 # adding all the chains in one file -for file in tmp/{s,d}[0-9]*_selected_chain.root +for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root do name=`basename $file .root | sed 's|_.*||'` + echo $name hadd tmp/${name}_chain.root tmp/${name}_*_chain.root - + filelist="$filelist tmp/${name}_chain.root" done #hadd tmp/s_chain.root tmp/s_*_chain.root #hadd tmp/d_chain.root tmp/d_*_chain.root @@ -169,5 +170,6 @@ cat > tmp/load.C < Date: Sun, 18 Aug 2013 11:33:09 +0200 Subject: [PATCH 138/475] new fixes --- ZFitter/bin/ZFitter.cpp | 70 ++++++++++++--------------- ZFitter/macro/PlotDataMC.C | 18 ++++--- ZFitter/script/GenRootChain.sh | 2 +- ZFitter/src/ElectronCategory_class.cc | 5 +- 4 files changed, 46 insertions(+), 49 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 6820afb94db..5ee739e7b72 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -112,6 +112,34 @@ void UpdateFriends(tag_chain_map_t& tagChainMap, bool merge=false){ return; } +void MergeSamples(tag_chain_map_t& tagChainMap, TString tag="s"){ + + std::pair pair_tmp_tag(tag,chain_map_t()); // make_pair not work with scram b + tagChainMap.insert(pair_tmp_tag); + + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + + if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //do it for each sample + //TChain *chain = (tag_chain_itr->second.find("selected"))->second; + // std::cout << chain->GetName() << std::endl; + for(chain_map_t::const_iterator chain_itr=tag_chain_itr->second.begin(); + chain_itr!=tag_chain_itr->second.end(); + chain_itr++){ + TString chainName = chain_itr->first; + if(tagChainMap.count(chainName)==0){ // create the new chain if does not exist for tag + std::pair pair_tmp(chainName, new TChain(chainName)); + (tagChainMap[tag]).insert(pair_tmp); + (tagChainMap[tag])[chainName]->SetTitle(tag); + } + (tagChainMap[tag])[chainName]->Add(chain_itr->second); + } + } + UpdateFriends(tagChainMap); + return; +} + TChain * addChainAndFriends(TString chainName, std::vector chain_vec){ TChain *sumChain = new TChain(chainName,""); @@ -1845,50 +1873,14 @@ int main(int argc, char **argv) { UpdateFriends(tagChainMap); //create tag "s" if not present (due to multiple mc samples) - tag="s"; chainName="selected"; - if(!tagChainMap.count(tag)){ + if(!tagChainMap.count("s")){ //#ifdef DEBUG std::cout << "==============================" << std::endl; std::cout << "==============================" << std::endl; - - std::cout << "[DEBUG] Create new tag map for tag: " << tag << std::endl; - //#endif - std::pair pair_tmp_tag(tag,chain_map_t()); // make_pair not work with scram b - tagChainMap.insert(pair_tmp_tag); - - std::pair pair_tmp(chainName, new TChain(chainName)); - (tagChainMap[tag]).insert(pair_tmp); - (tagChainMap[tag])[chainName]->SetTitle(tag); - - for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); - tag_chain_itr!=tagChainMap.end(); - tag_chain_itr++){ -#ifdef DEBUG - std::cout << tag_chain_itr->first << std::endl; -#endif - if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; - - for(chain_map_t::const_iterator chain_itr=tag_chain_itr->second.begin(); - chain_itr!=tag_chain_itr->second.end(); - chain_itr++){ - chain_itr->second->GetEntries(); - std::cout <<"Adding chain to s: " << chain_itr->first << "\t" << chain_itr->second->GetName() << "\t" << chain_itr->second->GetTitle() << std::endl; - if((tagChainMap[tag])[chainName]->Add(chain_itr->second)==0) exit(1); - - TList *friendList= chain_itr->second->GetListOfFriends(); - if(friendList!=NULL){ - friendList->Print(); - TIter friend_itr(friendList); - for(TFriendElement *friendElement = (TFriendElement*) friend_itr.Next(); - friendElement != NULL; friendElement = (TFriendElement*) friend_itr.Next()){ - std::cout << "[STATUS] Adding friend " << friendElement->GetTreeName() << std::endl; - (tagChainMap[tag])[chainName]->AddFriend(friendElement->GetTree()); - } - } - } - } + MergeSamples(tagChainMap, "s"); } + if(vm.count("saveRootMacro")){ for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index dda5a27b6f4..7a50052605b 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -465,7 +465,7 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn bool logy=false, bool usePU=true, bool smear=false, bool scale=false){ int nHist= mc_vec.size(); int colors[4]={kRed,kGreen,kBlue,0}; - int fillstyle[4]={0,0,0,0}; + int fillstyle[4]={0,0,0,0}; //3003,3004,3005,3006}; if(nHist>4) return NULL; TString yLabel; @@ -514,19 +514,24 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn c->Clear(); TH1F *d = (TH1F *) gROOT->FindObject("data_hist"); + + d->SetMarkerStyle(20); + d->SetMarkerSize(1); + + if(d->GetEntries()==0 || d->Integral()==0){ + d=(TH1F *) gROOT->FindObject("0_hist"); + d->SetMarkerSize(0); + } //d->SaveAs("tmp/d_hist.root"); //s->SaveAs("tmp/s_hist.root"); yLabel.Form("Events /(%.2f %s)", d->GetBinWidth(2), yLabelUnit.Data()); float max = 0; //1.1 * std::max( - //d->GetMaximum(),///d->Integral(), - //s->GetMaximum() ///s->Integral() - //); max=1.1*d->GetMaximum(); std::cout << "max = " << max << std::endl; std::cout << "nEvents data: " << d->Integral() << "\t" << d->GetEntries() << std::endl; - + d->GetYaxis()->SetTitle(yLabel); d->GetXaxis()->SetTitle(xLabel); @@ -538,9 +543,6 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn d->GetYaxis()->SetRangeUser(0,max); } - d->SetMarkerStyle(20); - d->SetMarkerSize(1); - for(int i=0; i < nHist; i++){ TString mcHistName; mcHistName+=i; mcHistName+="_hist"; TH1F *s = (TH1F *) gROOT->FindObject(mcHistName); diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index e654f5bd841..7f569879593 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -132,7 +132,7 @@ rm tmp/*_chain.root ./bin/ZFitter.exe --saveRootMacro -f ${configFile} ${noPU} || exit 1 # adding all the chains in one file -for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root +for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root tmp/s_selected_chain.root do name=`basename $file .root | sed 's|_.*||'` echo $name diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 77e5b361193..f8a7fb7b84d 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -36,7 +36,10 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co itr++){ TString cut_string = *itr; - if(isMC && cut_string.Contains("runNumber")) continue; + if(isMC && cut_string.Contains("runNumber")){ + cut_string.Insert(0,"("); + cut_string+="|| runNumber==1)"; + } if(isMC && cut_string.Contains("lumiBlock")) continue; // std::cout << "[DEBUG] Skipping runNumber cut for MC " << isMC << "\t" << string << std::endl; From b434dbda079f0801943ba90964787ff868bac9ad Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 19 Aug 2013 12:13:41 +0200 Subject: [PATCH 139/475] script for stability plots with multiple files --- ZFitter/macro/stability.C | 540 ++++++++++++++++++++++++++++++++- ZFitter/script/stability.sh | 217 +++++++++++-- ZFitter/sed/FitResultToTex.sed | 2 + 3 files changed, 736 insertions(+), 23 deletions(-) create mode 100644 ZFitter/sed/FitResultToTex.sed diff --git a/ZFitter/macro/stability.C b/ZFitter/macro/stability.C index df1a5878aaa..8b7a26ec337 100644 --- a/ZFitter/macro/stability.C +++ b/ZFitter/macro/stability.C @@ -19,6 +19,24 @@ //#define DEBUG //#define lightLabels +TH1F *stabilityHist(TGraphErrors *g_data, double& y_err_mean){ + //------------------------------ + Double_t *Y=g_data->GetY(); + Double_t *EY = g_data->GetEY(); + + TH1 *obj = (TH1*) g_data->GetYaxis()->GetParent(); + TH1F *hist_corr = new TH1F("hist_"+TString(g_data->GetName()),"", + g_data->GetN(), obj->GetMinimum(), obj->GetMaximum()); + hist_corr->GetXaxis()->SetLabelSize(0); + hist_corr->GetYaxis()->SetLabelSize(0); + for(int i =0; i < g_data->GetN(); i++){ + hist_corr -> Fill(Y[i]); + y_err_mean+=EY[i]; + } + y_err_mean/=g_data->GetN(); + return hist_corr; +} + TGraphErrors *columns_vs_var(TString filename, TString region_, int column, double rMin=1, double rMax=0){ TString region; @@ -62,14 +80,14 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub >> deltaM_data >> err_deltaM_data >> deltaM_MC >> err_deltaM_MC; - // std::cout << region << "\t" << xVar << "\t" << rangeMin << "\t" << rangeMax << "\t" << deltaM_data << "\t" << deltaM_MC << "\t" << err_deltaM_MC << "\t" << f_in.peek() << std::endl; + // std::cout << region << "\t" << xVar << "\t" << rangeMin << "\t" << rangeMax << "\t" << deltaM_data << "\t" << deltaM_MC << "\t" << err_deltaM_MC << "\t" << f_in.peek() << std::endl; if(f_in.peek()!=10){ // 10 = \n isDeltaG=true; f_in >> deltaG >> err_deltaG; } - if(region.CompareTo(region_)==0){ + if(region_=="" || region.CompareTo(region_)==0){ deltaM_data_hist.Fill(deltaM_data); if(xVar.CompareTo("runNumber")==0){ deltaM_data_graph.SetPoint(i_point, i_point, deltaM_data); @@ -121,6 +139,7 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub return NULL; } else std::cout << i_point << std::endl; + deltaM_data_graph.Set(i_point); deltaM_MC_graph.Set(i_point); deltaG_graph.Set(i_point); @@ -144,7 +163,8 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub g_out->SetHistogram(hist_g); g_out->Draw("AP"); return g_out; - + + } @@ -152,6 +172,7 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub void SetLegendStyle(TLegend *legend){ //legend->SetTextFont(22); // 132 legend->SetTextSize(0.12); // l'ho preso mettendo i punti con l'editor e poi ho ricavato il valore con il metodo GetTextSize + //legend->SetTextSize(0.06); // l'ho preso mettendo i punti con l'editor e poi ho ricavato il valore con il metodo GetTextSize legend->SetBorderSize(0); legend->SetFillColor(0); // colore di riempimento bianco legend->SetMargin(0.2); // percentuale della larghezza del simbolo @@ -646,3 +667,516 @@ TCanvas *var_Stability(TString filename_corr, TString region, double rMin=3, dou return c; } + +enum plotType { onlyData=0, onlyDataBis, dataMC, dataMCs, dataOverMC, dataOverMCfit, onlyMCs}; + +TCanvas *var_Stability(std::vector filenameList, std::vector legendList,TString region, double rMin=3, double rMax=2, bool color=false, int column=1, TString xTitle="", TString yTitle="" ){ + + + // column<0: same as >0 but without numbers + // column=0: only data + // column=1: only data + // column=2: data and MC (only 1 MC) + // column=3: data and MC (all MCs) + // column=4: data/MC + // column=41: data/MC with linear fit + // column=51: data, MC and data/MC with data/MC linear fit + // column=6: only MCs + // column=61: + // column=-10: ECAL paper + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + + std::cout << "REGION=" << region << std::endl; + float labelScale=1; + // if(column>3) labelScale=2; + + TString yTitle2; + if (yTitle.Contains("#Delta")){ + yTitle2 = "#Delta P [%]"; + } + else if (yTitle.Contains("#sigma")&&yTitle.Contains("peak")){ + yTitle2 = "#Add.Smearing [%]"; + } + + + TCanvas *c; + TLegend *legend; + TPaveText *pt; + + if(column<0) c = new TCanvas("c", region); + else c = new TCanvas("c", region, 900,500); + c->cd(); + + + if(column<0) legend = new TLegend(0.15,0.6,0.4,0.95); + else if(column>=0){ + legend = new TLegend(0,0.6,1,1); + pt = new TPaveText(0.,0.,1,0.6,"NDC"); + pt -> SetFillStyle(0); + pt->SetTextSize(0.1); + pt->SetFillColor(kWhite); + pt->SetBorderSize(0); + } + + SetLegendStyle(legend); + if(column<0){ + legend->SetTextSize(0.06); + } + + TMultiGraph *g_multi = new TMultiGraph(); + for(std::vector::const_iterator filename_itr= filenameList.begin(); + filename_itr != filenameList.end(); + filename_itr++){ + int index=filename_itr-filenameList.begin(); + TGraphErrors *g_data = columns_vs_var(*filename_itr, region, 0,rMin, rMax); + TGraphErrors *g_MC = columns_vs_var(*filename_itr, region, 1,rMin, rMax); + TGraphErrors *g_dataMC=columns_vs_var(*filename_itr, region, 2,rMin, rMax); + if(g_data==NULL || g_MC==NULL || g_dataMC==NULL) return c; + + g_data->SetName(region); + //------------------------------ style + g_data -> SetMarkerStyle(20+index); + g_data->SetMarkerSize(1.2); + //g_data->SetMarkerSize(3); + g_data -> SetMarkerColor(kBlack+index); + + g_data -> SetFillColor(0); + g_data -> SetDrawOption("P"); + g_MC -> SetMarkerStyle(0); + //g_MC -> SetMarkerSize(0); + g_MC -> SetFillColor(kGray); + g_MC -> SetMarkerColor(kRed+2+index); + g_MC -> SetFillColor(kRed+2+index); + if(column==dataMCs || column==onlyMCs){ + g_MC -> SetFillStyle(3003+index); + g_MC -> SetFillColor(kBlack+index); + g_MC -> SetMarkerColor(kBlack+index); + g_MC -> SetMarkerStyle(20+index); + } + g_MC -> SetLineWidth(0); + g_MC -> SetLineColor(1); + + if(column>1 && column!=dataOverMC && column!=dataMC || (column==dataMC && index==0)){ + TString plotOption="L3"; + if(column==onlyMCs) plotOption="P"; + g_multi->Add(g_MC,plotOption); + if (column==dataMC) legend->AddEntry(g_MC,"Simulation", plotOption); + else legend->AddEntry(g_MC,TString("MC: ")+legendList[index], plotOption); + } + if(column!=dataOverMC){ + if(pt!=NULL){ + double y_mean_error=0; + TH1F *hist = (column!=onlyMCs) ? stabilityHist(g_data, y_mean_error) : stabilityHist(g_MC, y_mean_error); + pt->AddText(""); + pt->AddLine(); + pt->AddText(legendList[index]); + //sprintf(out_char,"Mean = %.2f", hist_corr->GetMean()); + pt->AddText(TString::Format("Mean = %.2f", hist->GetMean())); + pt->AddText(TString::Format("Std. dev. = %.2f", hist->GetRMS())); + pt->AddText(TString::Format("Mean Error = %.2f", y_mean_error)); + } + if(column!=onlyMCs){ + legend->AddEntry(g_data,legendList[index], "P"); + g_multi->Add(g_data,"P"); + } + }else{ + legend->AddEntry(g_dataMC,legendList[index], "P"); + g_multi->Add(g_dataMC,"P"); + } + + if(xTitle.Contains("runNumber")){ + //std::cout << "ciao" << "\t" << index << std::endl; + g_multi->Draw("A"); + TAxis *axis = g_multi->GetXaxis(); + TAxis *axis_data = g_data->GetXaxis(); + for(int i_bin =0; i_bin < (int) axis_data->GetNbins()-4; i_bin++){ + axis->SetBinLabel(i_bin+5, axis_data->GetBinLabel(i_bin)); // + } + } + } + c->Clear(); + g_multi->Draw("A"); + + //########## graph settings + g_multi->GetYaxis()->SetTitle(yTitle); + g_multi->GetXaxis()->SetTitle(xTitle); + g_multi->GetXaxis()->SetLabelSize(0.05 * labelScale); +#ifdef lightLabels + g_multi->GetXaxis()->SetLabelSize(g_multi->GetXaxis()->GetLabelSize()*1.5); +#endif + g_multi->GetXaxis()->SetNdivisions(5); + if(xTitle.Contains("Time") || xTitle.Contains("date")){ + g_multi->GetXaxis()->SetTimeDisplay(true); + g_multi->GetXaxis()->SetTimeOffset(0); + g_multi->GetXaxis()->SetLabelSize(0.05 * labelScale); + g_multi->GetXaxis()->SetTimeFormat("%d/%m"); + } + + g_multi->GetXaxis()->SetTitleSize(g_multi->GetXaxis()->GetTitleSize()*labelScale); + g_multi->GetXaxis()->SetTitleOffset(g_multi->GetXaxis()->GetTitleOffset()/labelScale); + + g_multi->GetYaxis()->SetTitleSize(g_multi->GetYaxis()->GetTitleSize()*labelScale); + g_multi->GetYaxis()->SetTitleOffset(g_multi->GetYaxis()->GetTitleOffset()/labelScale); + g_multi->GetYaxis()->SetLabelSize(g_multi->GetYaxis()->GetLabelSize()*labelScale); + + if( rMax == rMin || rMax < rMin){ + g_multi->GetYaxis()->SetRangeUser(g_multi->GetYaxis()->GetXmin(), g_multi->GetYaxis()->GetXmax() *1.1); + } else { + if(rMin > g_multi->GetYaxis()->GetXmin()) rMin=g_multi->GetYaxis()->GetXmin(); + if(rMax < g_multi->GetYaxis()->GetXmax()) rMax=g_multi->GetYaxis()->GetXmax(); + g_multi->GetYaxis()->SetRangeUser(rMin,rMax); + } + + + // automatic setting of the range + TPad *pad1=NULL; + TPad *pad2=NULL; + TPad *pad3=NULL; + TPad *pad4=NULL; + + if(column>5 && column!=onlyMCs){ + pad1= new TPad("pad1","", 0,0.4,0.75,1); + pad2= new TPad("pad2","", 0.75,0.4,1,1); + pad3= new TPad("pad3","", 0,0.,0.75,0.4); + pad4= new TPad("pad4","", 0.75,0.,1,0.4); + } else if(column<0) pad1= new TPad("pad1","", 0,0.,0.95,0.95); + else{ + pad1= new TPad("pad1","", 0,0.,0.75,1); + pad2= new TPad("pad2","", 0.75,0.,1,1); + } + c->Clear(); + if(column>=0) pad2->Draw(); + pad1->Draw(); + if(column>5 && column!=onlyMCs){ + pad3->Draw(); + pad4->Draw(); + pad3->SetRightMargin(0.01); + pad3->SetGridy(); + } + pad1->cd(); + + g_multi->Draw("A"); + if(xTitle.Contains("runNumber")){ + TAxis *axis = g_multi->GetXaxis(); + pad1->SetBottomMargin(0.28); +// if(column>=0)pad2->SetBottomMargin(0.28); + axis->SetTitleOffset(-0.3); +// if(rMin >= rMax){ +// if(g_multi->GetYaxis()->GetXmin() > 0) +// g_multi->GetYaxis()->SetRangeUser(g_multi->GetYaxis()->GetXmin()*0.9,g_multi->GetYaxis()->GetXmax()); +// else +// g_multi->GetYaxis()->SetRangeUser(g_multi->GetYaxis()->GetXmin()*1.2,g_multi->GetYaxis()->GetXmax()); +// } + } else { + pad1->SetGridx(); + } + + pad1->SetRightMargin(0.01); + pad1->SetGridy(); + + if(column>0){ + pad2->cd(); + } + legend->Draw(); + if(pt!=NULL) pt->Draw(); + // g_multi->Draw("Psame"); + // g_data->GetXaxis()->Draw(); + // } + + + + return c; +} + +#ifdef shervin + + + + + //------------------------------ + Double_t *Y=NULL, *Y_uncorr=NULL, *EY = NULL, *EY_uncorr = NULL; + double y_err_mean=0,y_err_uncorr_mean=0; + + Y = g_data->GetY(); + EY = g_data->GetEY(); + if( g_data_unCorr!=NULL){ + Y_uncorr = g_data_unCorr->GetY(); + EY_uncorr = g_data_unCorr->GetEY(); + } + + TH1 *obj = (TH1*) g_multi->GetYaxis()->GetParent(); + TH1F *hist_corr = new TH1F("hist_corr","hist_corr", + g_data->GetN(), obj->GetMinimum(), obj->GetMaximum()); + TH1F *hist_uncorr = new TH1F("hist_uncorr","hist_uncorr", + g_data->GetN(), obj->GetMinimum(), obj->GetMaximum()); + hist_corr->GetXaxis()->SetLabelSize(0); + hist_corr->GetYaxis()->SetLabelSize(0); + for(int i =0; i < g_data->GetN(); i++){ + hist_corr -> Fill(Y[i]); + y_err_mean+=EY[i]; + + if(Y_uncorr!=NULL){ + hist_uncorr -> Fill(Y_uncorr[i]); + y_err_uncorr_mean+=EY_uncorr[i]; + } + } + y_err_mean/=g_data->GetN(); + y_err_uncorr_mean/=g_data->GetN(); + + if(column>=0) pad2->cd(); + hist_corr->SetFillColor(g_data->GetMarkerColor()); + // hist_uncorr->SetFillColor(g_data_unCorr->GetMarkerColor()); + + // hist_corr->SetFillStyle(3001); + hist_corr->SetFillStyle(1001); + hist_uncorr->SetFillStyle(3002); + + if(column >=0 && column<2 && g_data_unCorr==NULL){ + hist_corr->Draw("hbar"); + hist_uncorr->Draw("hbar same"); + } + + + if(column == -2){ + if(region.CompareTo("EB")==0) + legend = new TLegend(0.35,0.2,0.7,0.4); + else + legend = new TLegend(0.35,0.15,0.9,0.4); + pt = new TPaveText(0.15,0.73,0.6,0.94,"NDC"); + pt -> SetFillColor(0); + pt -> SetFillStyle(0); + } else + if(column == -3){ + legend = new TLegend(0.35,0.35,0.95,0.55); + pt = new TPaveText(0.15,0.73,0.6,0.94,"NDC"); + pt -> SetFillColor(0); + pt -> SetFillStyle(0); + }else if(column <0){ + if(region.CompareTo("EB")==0) + legend = new TLegend(0.35,0.35,0.9,0.6); + else + legend = new TLegend(0.35,0.15,0.9,0.4); + pt = new TPaveText(0.15,0.73,0.6,0.94,"NDC"); + pt -> SetFillColor(0); + pt -> SetFillStyle(0); + }else if(column >=0 && column<2 && g_data_unCorr==NULL){ + legend = new TLegend(0,0.,1,0.10); + pt = new TPaveText(0,0.11,1,0.28,"NDC"); + } else { + if(g_data_unCorr==NULL){ + legend = new TLegend(0,0.1,1,0.4); + pt = new TPaveText(0,0.4,1,1,"NDC"); + } else { + legend = new TLegend(0,0.,1,0.3); + pt = new TPaveText(0,0.3,1,0.9,"NDC"); + } + } + + + TGraphErrors *g_data_leg = (TGraphErrors *)g_data->Clone("leg_g_data"); + TGraphErrors *g_data_unCorr_leg =NULL; + + if(g_data_unCorr!=NULL){ + g_data_unCorr_leg = (TGraphErrors *)g_data_unCorr->Clone("leg_g_data_unCorr"); + g_data_unCorr_leg->SetMarkerSize(3); + legend->AddEntry(g_data_unCorr_leg, f_uncorr_legend,"p"); + } + g_data_leg->SetMarkerSize(3); + legend->AddEntry(g_data_leg, f_corr_legend,"p"); + + + SetLegendStyle(legend); + if(column==-10) legend->SetTextSize(0.04); + if(column<0) legend->SetTextSize(0.05); + legend->SetEntrySeparation(0.01); + + + // pt->SetLabel("Data"); + + if(hist_uncorr->GetEntries()>0){ + pt->AddText(""); + pt->AddLine(); + pt->AddText(f_uncorr_legend); + sprintf(out_char,"Mean = %.2f", hist_uncorr->GetMean()); + pt->AddText(out_char); + + sprintf(out_char,"Std. dev. = %.2f", hist_uncorr->GetRMS()); + pt->AddText(out_char); + + sprintf(out_char,"Mean Error = %.2f", y_err_uncorr_mean); + pt->AddText(out_char); + } + + if(xTitle.Contains("runNumber")){ + pt->SetY1NDC(0.11); + pt->SetY2NDC(0.28); + } + + if(column!=2){ + if(column<0 ){ + pt->Clear(); + pt->AddText("CMS Preliminary 2012"); + pt->AddText("#sqrt{s} = 8TeV, L = 19.6 fb^{-1}"); + if(region.Contains("EB")) pt->AddText("ECAL Barrel"); + if(region.Contains("EE")) pt->AddText("ECAL Endcap"); + pt->Draw("NDC"); + pt->SetTextSize(0.045); + pt->SetTextAlign(11); + pt->SetFillStyle(1001); + } else pt->Draw("NDC"); + } + + + if(column>0) legend->AddEntry(g_MC, "Simulation", "lf"); + if(column!=-1 && column!=2) legend->Draw("NDC"); + + + TLine *line = new TLine(0,0,1,0); + line->SetLineWidth(2); + //line->Draw(); + + if(abs(column)>=2){ + if(column>2) pad3->cd(); + else pad1->cd(); + + g_dataMC->SetTitle(0); + if(column!=2){ + g_dataMC->GetXaxis()->SetLabelSize(0); + } else { + pad1->SetGridy(); + g_dataMC->GetXaxis()->SetTitle(xTitle); + g_dataMC->GetXaxis()->SetTitleSize(g_multi->GetXaxis()->GetTitleSize()*labelScale); + g_dataMC->GetXaxis()->SetLabelSize(g_multi->GetXaxis()->GetLabelSize()*labelScale); + } + g_dataMC->GetYaxis()->SetTitleSize(g_dataMC->GetYaxis()->GetTitleSize()*labelScale*1.3); + g_dataMC->GetYaxis()->SetTitleOffset(g_dataMC->GetYaxis()->GetTitleOffset()/labelScale/1.3); + g_dataMC->GetYaxis()->SetLabelSize(g_dataMC->GetYaxis()->GetLabelSize()*labelScale*1.3); + // g_dataMC->GetXaxis()->SetRangeUser(g_multi->GetYaxis()->SetRangeUser(g_multi->GetYaxis()->GetXmin(), g_multi->GetYaxis()->GetXmax() *1.1); + + g_dataMC->SetMarkerStyle(22); + g_dataMC->SetMarkerSize(1.5); + + g_dataMC->GetYaxis()->SetTitle(yTitle2); + g_dataMC->Draw("AP"); + if(g_dataMC_unCorr!=NULL) g_dataMC_unCorr->Draw("Psame"); + + //------------------------------ + Double_t *Y1=NULL, *Y1_uncorr=NULL, *EY1 = NULL, *EY1_uncorr = NULL; + double y1_err_mean=0,y1_err_uncorr_mean=0; + + Y1 = g_dataMC->GetY(); + EY1 = g_dataMC->GetEY(); + if( g_dataMC_unCorr!=NULL){ + Y1_uncorr = g_dataMC_unCorr->GetY(); + EY1_uncorr = g_dataMC_unCorr->GetEY(); + } + + TH1 *obj1 = (TH1*) g_dataMC->GetYaxis()->GetParent(); + TH1F *hist_corr1 = new TH1F("hist_corr1","hist_corr1", + g_dataMC->GetN(), obj1->GetMinimum(), obj1->GetMaximum()); + TH1F *hist_uncorr1 = new TH1F("hist_uncorr1","hist_uncorr1", + g_dataMC->GetN(), obj1->GetMinimum(), obj1->GetMaximum()); + for(int i =0; i < g_dataMC->GetN(); i++){ + hist_corr1 -> Fill(Y1[i]); + y1_err_mean+=EY1[i]; + + if(Y1_uncorr!=NULL){ + hist_uncorr1 -> Fill(Y1_uncorr[i]); + y1_err_uncorr_mean+=EY1_uncorr[i]; + } + } + y1_err_mean/=g_dataMC->GetN(); + y1_err_uncorr_mean/=g_dataMC->GetN(); + + if(column>2) pad4->cd(); + else pad2->cd(); + + TLegend *legend1; + TPaveText *pt1; + if(column<2 && g_dataMC_unCorr==NULL){ + legend1 = new TLegend(0,0.,1,0.10); + pt1 = new TPaveText(0,0.11,1,0.28,"NDC"); + } else { + if(g_dataMC_unCorr==NULL){ + legend1 = new TLegend(0,0.,1,0.4); + pt1 = new TPaveText(0,0.4,1,1,"NDC"); + } else { + legend1 = new TLegend(0,0.,1,0.3); + pt1 = new TPaveText(0,0.3,1,0.9,"NDC"); + } + } + + TGraphErrors *g_dataMC_leg = (TGraphErrors *)g_dataMC->Clone("leg_g_dataMC"); + TGraphErrors *g_dataMC_unCorr_leg =NULL; + + g_dataMC_leg->SetMarkerSize(3); + + + if(g_dataMC_unCorr!=NULL){ + legend1->AddEntry(g_dataMC_leg, "#DeltaP "+f_corr_legend,"p"); + g_dataMC_unCorr_leg = (TGraphErrors *)g_dataMC_unCorr->Clone("leg_g_dataMC_unCorr"); + g_dataMC_unCorr_leg->SetMarkerSize(3); + legend1->AddEntry(g_dataMC_unCorr_leg, "#DeltaP "+f_uncorr_legend,"p"); + } else legend1->AddEntry(g_dataMC_leg, "#DeltaP ","p"); + + SetLegendStyle(legend1); + // legend->SetTextSize(0.12); + legend1->SetEntrySeparation(0.01); + + // pt1->SetLabel("Data"); + pt1->SetTextSize(0.1); + pt1->SetFillColor(kWhite); + pt1->SetBorderSize(0); + // char out_char[300]; + //pt1->AddLine(); + pt1->AddText(f_corr_legend); + sprintf(out_char,"Mean = %.2f", hist_corr1->GetMean()); + pt1->AddText(out_char); + + sprintf(out_char,"Std. dev. = %.2f", hist_corr1->GetRMS()); + pt1->AddText(out_char); + + sprintf(out_char,"Mean Error = %.2f", y1_err_mean); + pt1->AddText(out_char); + + if(hist_uncorr1->GetEntries()>0){ + pt1->AddText(""); + pt1->AddLine(); + pt1->AddText(f_uncorr_legend); + sprintf(out_char,"Mean = %.2f", hist_uncorr1->GetMean()); + pt1->AddText(out_char); + + sprintf(out_char,"Std. dev. = %.2f", hist_uncorr1->GetRMS()); + pt1->AddText(out_char); + + sprintf(out_char,"Mean Error = %.2f", y1_err_uncorr_mean); + pt1->AddText(out_char); + } + + if(fabs(column/10) >0 && abs(column)%10==1){ + TFitResultPtr ptr = g_dataMC->Fit("pol1","s"); + TFitResult *fitres = ptr.Get(); + pt1->AddText(""); + pt1->AddLine(); + sprintf(out_char,"Chi2/ndf = %.2f", fitres->Chi2()/fitres->Ndf()); + pt1->AddText(out_char); + sprintf(out_char,"slope = %.2f #pm %.2f", fitres->GetParams()[1], fitres->GetErrors()[1]); + pt1->AddText(out_char); + sprintf(out_char,"inter. = %.2f #pm %.2f", fitres->GetParams()[0], fitres->GetErrors()[0]); + pt1->AddText(out_char); + } + + if(xTitle.Contains("runNumber")){ + pt1->SetY1NDC(0.11); + pt1->SetY2NDC(0.28); + } + + pt1->Draw("NDC"); + legend1->Draw("NDC"); + } + + return c; + +} +#endif diff --git a/ZFitter/script/stability.sh b/ZFitter/script/stability.sh index 45203857e7b..f957df3d614 100755 --- a/ZFitter/script/stability.sh +++ b/ZFitter/script/stability.sh @@ -11,15 +11,15 @@ usage(){ echo " --noPlot: does not make the stability plot" echo " --xMin" echo " --xMax" - echo " --tableFile2 file: secondary file for comparisons" - echo " --titleFile1 arg: name in the legend for data of file 1 (def=$titleOne)" - echo " --titleFile2 arg: name in the legend for data of file 2 (def=$titleTwo)" + echo " -l legend" echo " --color: make coloured plot (def=$color)" echo " --column arg (def=$column)" + echo " --allRegions" + echo " --norm: normalized the y axis to the first point" } # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o ht:x:y: -l help,tableFile:,xVar:,yVar:,outDirImgData:,noPlot,xMin:,xMax:,tableFile2:,titleFile1:,titleFile2:,color,column: -- "$@") +if ! options=$(getopt -u -o ht:x:y:l: -l help,tableFile:,xVar:,yVar:,outDirImgData:,noPlot,xMin:,xMax:,tableFile2:,titleFile1:,titleFile2:,color,column:,allRegions,norm -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -27,12 +27,13 @@ fi set -- $options +index=0 while [ $# -gt 0 ] do case $1 in -h|--help) usage; exit 0;; - -t|--tableFile) TABLEFILE=$2; shift;; - --tableFile2) TABLEFILETWO=$2; shift;; + -t) TABLEFILES="${TABLEFILES} $2"; shift;; + -l) LEGENDS[${index}]="$2"; echo $index; echo ${LEGENDS[$index]}; let index=$index+1; shift;; -x|--xVar) xVar=$2; shift;; -y|--yVar) yVar=$2; shift;; --outDirImgData) outDirImgData=$2; shift;; @@ -44,6 +45,8 @@ do --color) color=true;; --xMean) XMEAN=true;; --column) column=$2; shift;; + --allRegions) MULTIREGION=y;; + --norm) NORM=y;; #--titleFile1) titleOne=$2; shift;; #--titleFile2) titleTwo=$2; shift;; (--) shift; break;; @@ -53,15 +56,12 @@ do shift done -if [ -z "${TABLEFILE}" ];then + +if [ -z "${TABLEFILE}" -a -z "${TABLEFILES}" ];then echo "[ERROR] Table file not specified: mandatory paramater" >> /dev/stderr exit 1 fi -if [ ! -r "${TABLEFILE}" ];then - echo "[ERROR] Table file ${TABLEFILE} not found or not readable" >> /dev/stderr - exit 1 -fi if [ -n "${TABLEFILETWO}" -a ! -r "${TABLEFILETWO}" ];then echo "[ERROR] Second table file ${TABLEFILETWO} not found or not readable" >> /dev/stderr @@ -104,7 +104,12 @@ case $xVar in ADC) xVarName="scale shift [%]" ;; - + nHitsSCEle) + xVarName="num Hits SC" + ;; + Et) + xVarName="Et (GeV)" + ;; esac case $yVar in @@ -140,13 +145,183 @@ case $yVar in yMin=0 yMax=10 ;; - + selEff) + columns=13 + yVarName="nEvents * pb" + yMin=1 + yMax=0 + ;; *) echo "[ERROR] yVar not defined" >> /dev/stderr exit 1 ;; esac -#xVar=runNumber + +if [ ! -e "tmp/stability/dat/" ]; then + mkdir -p tmp/stability/dat +else + rm tmp/stability -Rf + mkdir -p tmp/stability/dat +fi + +cat > tmp/stability_macro.C <ProcessLine(".L src/setTDRStyle.C+"); + gROOT->ProcessLine(".L macro/stability.C+"); + + setTDRStyle1(); + tdrStyle->SetOptTitle(0); + gROOT->SetStyle("tdrStyle"); + TCanvas *c; + +std::vector filenameList; +std::vector labelList; + //============================== +EOF + +index=0 +for TABLEFILE in $TABLEFILES + do + if [ ! -r "${TABLEFILE}" ];then + echo "[ERROR] Table file ${TABLEFILE} not found or not readable" >> /dev/stderr + exit 1 + fi + echo $TABLEFILE + tmpFile=tmp/stability/tmpFile-${index}.tex + tmpFileDat=tmp/stability/dat/tmpFile-${index}.dat + echo $tmpFile + echo $tmpFileDat + case $xVar in + *) + grep -v '#' $TABLEFILE | grep -v '^%' | grep ${xVar} | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;s|^\t${xVar}|noname\t${xVar}|;s|^-||" |cut -d '&' -f 1,2,$columns > $tmpFile + ;; +esac + NF=`head -1 $tmpFile | awk -F '&' '{print NF}'` + case $NF in + 5) + ;; + 4) + sed -i 's|\\\\$| \& -- \\\\|' $tmpFile + ;; + 3) + sed -i 's|\\\\$| \& -- \& -- \\\\|' $tmpFile + ;; + esac + + ./script/tex2txt.sh $tmpFile | sed 's| $||;s|--|0\t0|g' > $tmpFileDat # the double 0\t0 is num+-err + cp $tmpFileDat tmp/tmpFile_tmp.dat + +# remove the values for the x axis out of xMin <= x <= xMax range + if [ -n "$xMin" -a -n "$xMax" ];then + awk "(\$1!=\"#\" && \$3>=$xMin && \$4<=$xMax){print \$0}" tmp/tmpFile_tmp.dat > $tmpFileDat + elif [ -n "$xMin" ];then + awk "(\$1!=\"#\" && \$3>=$xMin){print \$0}" tmp/tmpFile_tmp.dat > $tmpFileDat + elif [ -n "$xMax" ];then + awk "(\$1!=\"#\" && \$4<=$xMax){print \$0}" tmp/tmpFile_tmp.dat > $tmpFileDat + fi + + cat >> tmp/stability_macro.C<> tmp/stability_macro.C< ${tmpFileDatNew} + else + grep -P "${region}\t" $tmpFileDat |awk '(NR==1){a=$6};(NF!=0){print $1,$2,$3,$4,$5,$6/a,$7,$8,$9,$10,$11}' > ${tmpFileDatNew} + fi + + cat >> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<SaveAs("${outDirImgData}/${yVar}_vs_${xVar}.eps"); + delete c; + +EOF + + else + for region in $regions + do + cat >> tmp/stability_macro.C<SaveAs("${outDirImgData}/${yVar}_vs_${xVar}-${region}.eps"); + delete c; + +EOF + done +fi + +cat >> tmp/stability_macro.C< tmp/stability_sum_table-$yVar.tex + + echo -n -e "$region\t&\t" >> tmp/stability_sum_table-$yVar.tex + grep -P "$region\t" tmp/tmpFile.dat | awk '{n+=1;sum[6]+=$6; sum2[6]+=$6*$6; sum[7]+=$7;};END{printf("%.2f & %.2f & %.2f \\\\\n", sum[6]/n, sqrt(sum2[6]/n-(sum[6]/n)*(sum[6]/n)), sum[7]/n)}' >> tmp/stability_sum_table-$yVar.tex + + +if [ -n "${TABLEFILETWO}" ];then + tableTwo=tmp/tmpFile2.dat +fi + +done + +if [ -z "$NOPLOT" ];then + root -l -b -q tmp/stability_macro.C +fi + +exit 0 case $xVar in unixTime) grep -v '%' $TABLEFILE | grep -v '#' | cut -d '&' -f 1 | sed 's|.*runNumber_\([0-9]*\)_\([0-9]*\)|\1-\2|' |sort | uniq > tmp/runList.txt @@ -179,13 +354,19 @@ case $xVar in grep -v '#' $TABLEFILETWO | grep -v '^%' | grep ${xVar} | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;" |cut -d '&' -f 1,2,$columns > tmp/tmpFile2.tex fi ;; - - *) + runNumber) grep -v '#' $TABLEFILE | grep -v '^%' | grep ${xVar} | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;" |cut -d '&' -f 1,2,$columns > tmp/tmpFile.tex if [ -n "${TABLEFILETWO}" ];then grep -v '#' $TABLEFILETWO | grep -v '^%' | grep ${xVar} | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;" |cut -d '&' -f 1,2,$columns > tmp/tmpFile2.tex fi ;; + *) + grep -v '#' $TABLEFILE | grep -v '^%' | grep ${xVar} | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;s|^\t${xVar}|noname\t${xVar}|;s|^-||" |cut -d '&' -f 1,2,$columns > tmp/tmpFile.tex + if [ -n "${TABLEFILETWO}" ];then + grep -v '#' $TABLEFILETWO | grep -v '^%' | grep ${xVar} | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;s|^\t${xVar}|noname\t${xVar}|;s|^-||" |cut -d '&' -f 1,2,$columns > tmp/tmpFile2.tex + fi + ;; + esac #take the categories from the table @@ -263,8 +444,4 @@ cat >> tmp/stability_macro.C< Date: Mon, 19 Aug 2013 17:08:11 +0200 Subject: [PATCH 140/475] fixed pileup tree production --- ZFitter/bin/ZFitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 5ee739e7b72..76f78083fcb 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1649,7 +1649,7 @@ int main(int argc, char **argv) { tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //do it for each sample - + if(tag_chain_itr->second.count("pileup")!=0) continue; // already have pileup file TString fpuname="tmp/mcPUtree"+tag_chain_itr->first+".root"; TFile f(fpuname,"recreate"); if(f.IsOpen()){ From d01a40ea12690ff06a4728c2ef68eb5485d69c68 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 19 Aug 2013 17:09:10 +0200 Subject: [PATCH 141/475] fixing dataMC plots for multiple samples and friends --- ZFitter/macro/PlotDataMC.C | 39 ++++++++++++++++++++++++---------- ZFitter/script/GenRootChain.sh | 11 ++++------ 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 7a50052605b..17362561d76 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -462,7 +462,7 @@ TCanvas *PlotDataMCMC(TChain *data, TChain *mc, TChain *mc2, TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchname, TString binning, TString category, TString selection, TString dataLabel, std::vector mcLabel_vec, TString xLabel, TString yLabelUnit, - bool logy=false, bool usePU=true, bool smear=false, bool scale=false){ + bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false){ int nHist= mc_vec.size(); int colors[4]={kRed,kGreen,kBlue,0}; int fillstyle[4]={0,0,0,0}; //3003,3004,3005,3006}; @@ -513,7 +513,16 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn c->Clear(); + TLegend *leg = new TLegend(0.65,0.8,1,1); + leg->SetBorderSize(1); + leg->SetFillColor(0); + leg->SetTextSize(0.04); +// if(dataLabel !="" && mcLabel !="") leg->Draw(); +// //c->GetListOfPrimitives()->Add(leg,""); + + TH1F *d = (TH1F *) gROOT->FindObject("data_hist"); + if(dataLabel !="") leg->AddEntry(d,dataLabel,"p"); d->SetMarkerStyle(20); d->SetMarkerSize(1); @@ -562,6 +571,7 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn s->SetFillStyle(fillstyle[i]); s->SetFillColor(colors[i]); s->SetLineColor(colors[i]); + s->SetLineWidth(2); TH1F* s_norm = NULL; if(i==0) s_norm = (TH1F *) (s->DrawNormalized("hist", d->Integral())); @@ -573,6 +583,8 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn //d_norm->GetYaxis()->SetRangeUser(0,max); s_norm->GetYaxis()->SetRangeUser(0,max); } + + if(mcLabel_vec[i] !="") leg->AddEntry(s,mcLabel_vec[i], "lf"); } @@ -589,17 +601,9 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn // std::cout << "\\hline" << std::endl; // std::cout << "$\\Chi^2$ " << d->Chi2Test(s_norm, "UW CHI2/NDF NORM") << std::endl; + if(mcLabel_vec.size()!=0) leg->Draw(); -// TLegend *leg = new TLegend(0.6,0.8,1,1); -// if(dataLabel !="") leg->AddEntry(d,dataLabel,"p"); -// if(mcLabel !="") leg->AddEntry(s,mcLabel, "lf"); -// leg->SetBorderSize(1); -// leg->SetFillColor(0); -// leg->SetTextSize(0.04); -// if(dataLabel !="" && mcLabel !="") leg->Draw(); -// //c->GetListOfPrimitives()->Add(leg,""); - - TPaveText *pv = new TPaveText(0.2,0.95,0.7,1,"NDC"); + TPaveText *pv = new TPaveText(0.25,0.95,0.65,1,"NDC"); pv->AddText("CMS Preliminary 2012"); pv->SetFillColor(0); pv->SetBorderSize(0); @@ -618,3 +622,16 @@ std::vector MakeChainVector(TChain *v1, TChain *v2, TChain *v3){ vec.push_back(v3); return vec; } + +std::vector MakeChainVector(TChain *v1, TChain *v2){ + std::vector vec; + vec.push_back(v1); + vec.push_back(v2); + return vec; +} + +std::vector MakeChainVector(TChain *v1){ + std::vector vec; + vec.push_back(v1); + return vec; +} diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index 7f569879593..e99332c197d 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -146,18 +146,15 @@ cat > tmp/load.C <ProcessLine(".L macro/PlotDataMC.C+"); gROOT->ProcessLine(".L src/setTDRStyle.C"); + gROOT->ProcessLine(".L macro/addChainWithFriends.C+"); + setTDRStyle1(); TChain *signal = (TChain *) _file0->Get("selected"); TChain *data = (TChain *) _file1->Get("selected"); - _file0->cd(); - signal->GetEntries(); - signal->LoadTree(0); - - _file1->cd(); - data->GetEntries(); - data->LoadTree(0); + ReassociateFriends(_file0, signal); + ReassociateFriends(_file1, data); TDirectory *curDir = new TDirectory("curDir",""); curDir->cd(); From 9ac37a054df1b754423c7c0b9c5c8d7f670c197b Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 19 Aug 2013 17:09:38 +0200 Subject: [PATCH 142/475] fixing selection in monitoring_validation script --- ZFitter/script/monitoring_validation.sh | 89 +++++++++---------------- 1 file changed, 31 insertions(+), 58 deletions(-) diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index d0672621f33..d54af73488b 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -1,8 +1,8 @@ #!/bin/bash - +source script/functions.sh #tag_name="" commonCut=Et_25-trigger-noPF -selection=WP80PU +selection=loose invMass_var=invMass_SC_regrCorr_ele invMass_min=65 invMass_max=115 @@ -13,6 +13,7 @@ configFile=data/validation/monitoring_2012_53X.dat runRangesFile=data/runRanges/monitoring.dat baseDir=test updateOnly="--updateOnly" +#extraOptions="--updateOnly" #extraOptions="--addBranch iSM --forceNewFit" # VALIDATION=y @@ -204,41 +205,12 @@ case $PERIOD in ;; esac - ## pileup reweight name -if [ -z "$puName" ];then - puCount=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3 |wc -l` - if [ "${puCount}" == "0" ];then - echo "[ERROR] No or too mani pileupHist files for data" - exit 1 - fi - puFiles=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3` - for puFile in $puFiles - do - puName="${puName}_`basename $puFile .root | sed 's|\..*||'`" - done - - #echo $puFile - #puName=`basename $puFile .root | sed 's|\..*||'` - puName=`echo $puName | sed 's|^_||'` - #echo $puName -fi - - ## MC name -if [ -z "${mcName}" ];then - mcCount=`grep -v '#' ${configFile} | grep 'selected' | grep '^s' | cut -f 3 |wc -l` - #if [ "${mcCount}" != "1" ];then -# echo "[ERROR] No or too mani MC files to extract the mcName" -# exit 1 -# fi - mcFiles=`grep -v '#' ${configFile} | grep 'selected' | grep '^s' | cut -f 3` - for mcFile in $mcFiles - do - mcName="${mcName}_`basename $mcFile .root | sed 's|\..*||'`" - done - mcName=`echo $mcName | sed 's|^_||'` -# echo $mcName -fi +## pileup reweight name +puName ${configFile} +echo "PUName: $puName" +mcName ${configFile} +echo "mcName: ${mcName}" #################### NAMING OUTPUT FOLDERS if [ -n "${rereco}" ];then @@ -298,7 +270,7 @@ if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --invMass_var ${invMass_var} \ ${extraOptions} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ - --commonCut=${commonCut} --invMass_min=${invMass_min} --invMass_max=${invMass_max} \ + --commonCut=${commonCut} --selection=${selection} --invMass_min=${invMass_min} --invMass_max=${invMass_max} \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/validation.log|| exit 1 fi @@ -319,7 +291,8 @@ if [ -n "$STABILITY" ];then ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ ${extraOptions} \ $updateOnly --commonCut=${commonCut} \ - --invMass_var ${invMass_var} --invMass_min=${invMass_min} --invMass_max=${invMass_max} \ + --invMass_var ${invMass_var} --selection=${selection} \ + --invMass_min=${invMass_min} --invMass_max=${invMass_max} \ --outDirFitResMC=${outDirMC}/fitres \ --outDirImgMC=${outDirMC}/img \ --outDirFitResData=${outDirData}/fitres --outDirImgData=${outDirData}/img \ @@ -359,7 +332,7 @@ if [ -n "$ETA" ];then if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/absEta.log || exit 1 fi @@ -384,7 +357,7 @@ if [ -n "${REFREG}" ];then if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/RefReg.log || exit 1 fi @@ -402,26 +375,26 @@ if [ -n "$SYSTEMATICS" ];then # pileup EB, pileup EE # - regionFile=data/regions/test.dat - tableFile=${outDirTable}/alphaSM-${invMass_var}-${selection}.tex - if [ -z "${ONLYTABLE}" ];then - ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ - ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/alphaSM.log || exit 1 - fi - ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ - > ${tableFile} || exit 1 - exit 0 +# regionFile=data/regions/test.dat +# tableFile=${outDirTable}/alphaSM-${invMass_var}-${selection}.tex +# if [ -z "${ONLYTABLE}" ];then +# ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ +# ${extraOptions} \ +# $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/alphaSM.log || exit 1 +# fi +# ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ +# > ${tableFile} || exit 1 +# exit 0 regionFile=data/regions/systematics.dat tableFile=${outDirTable}/systematics-${invMass_var}-${selection}.tex if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/systematics.log || exit 1 fi @@ -449,7 +422,7 @@ if [ -n "$SYSTEMATICS" ];then if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/floating \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img/floating \ --fit_type_value=0 > ${outDirData}/log/fit_systematics_floating.log @@ -462,7 +435,7 @@ if [ -n "$SYSTEMATICS" ];then if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/invMass_range \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img/invMass_range \ --invMass_min=70 --invMass_max=110 > ${outDirData}/log/fit_systematics_invMass_range.log @@ -475,7 +448,7 @@ if [ -n "$SYSTEMATICS" ];then if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/invMass_range2 \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img/invMass_range2 \ --invMass_min=75 --invMass_max=105 > ${outDirData}/log/fit_systematics_invMass_range2.log @@ -500,7 +473,7 @@ if [ -n "$SYSTEMATICSD" ];then if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/systematics.log || exit 1 fi From c6da65be44d394e8a7c3a01ebe88391ff6c7fc8c Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 19 Aug 2013 17:11:14 +0200 Subject: [PATCH 143/475] removed R9 correction for MC --- ZNtupleDumper/src/ZNtupleDumper.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 5b11830fd42..39ab591e842 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -975,12 +975,12 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int R9Ele[index] = e3x3SCEle[index]/electron1.superCluster()->rawEnergy(); - if(isMC){ - if(electron1.isEB()) - R9Ele[index] = R9Ele[index]*1.0045+0.0010; - else - R9Ele[index] = R9Ele[index]*1.0086-0.0007; - } +// if(isMC){ +// if(electron1.isEB()) +// R9Ele[index] = R9Ele[index]*1.0045+0.0010; +// else +// R9Ele[index] = R9Ele[index]*1.0086-0.0007; +// } // make it a function eleID[index] = ((bool) electron1.electronID("fiducial")) << 0; From 0f9b590bc786d586016d2f02fb9518dfea222649 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 21 Aug 2013 10:14:39 +0200 Subject: [PATCH 144/475] fixed merge of ntuples --- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index b3055a1eebb..05ab410f959 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -374,7 +374,7 @@ if [ -n "${CHECK}" ];then #echo $dir >> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" else - mergeOutput.sh -u ${UI_WORKING_DIR} + mergeOutput.sh -u ${UI_WORKING_DIR} -g ntuple fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" fi From ebe323b6d495f5519150153d00574d4c4125a2f2 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 21 Aug 2013 10:15:20 +0200 Subject: [PATCH 145/475] updated test ntuples --- ZFitter/data/validation/test.dat | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ZFitter/data/validation/test.dat b/ZFitter/data/validation/test.dat index 833c8c5b395..1a6a7af7097 100644 --- a/ZFitter/data/validation/test.dat +++ b/ZFitter/data/validation/test.dat @@ -1,17 +1,17 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9Shift/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9Shift/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9Shift/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Powheg -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9Shift/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9Shift/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9Shift/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Sherpa -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root ########### Data d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root From e5c54936c9cf9a7b07d6ca87811f11ea29023194 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 21 Aug 2013 11:30:40 +0200 Subject: [PATCH 146/475] updated stability scripts for multiple output --- ZFitter/macro/stability.C | 71 +++++++++++++++++++++++++------------ ZFitter/script/stability.sh | 36 ++++++++++++++----- 2 files changed, 76 insertions(+), 31 deletions(-) diff --git a/ZFitter/macro/stability.C b/ZFitter/macro/stability.C index 8b7a26ec337..795de1e7d2f 100644 --- a/ZFitter/macro/stability.C +++ b/ZFitter/macro/stability.C @@ -18,6 +18,7 @@ #include //#define DEBUG //#define lightLabels +enum plotType { onlyData=0, onlyDataBis, dataMC, dataMCs, dataOverMC, dataOverMCfit, onlyMCs}; TH1F *stabilityHist(TGraphErrors *g_data, double& y_err_mean){ //------------------------------ @@ -37,7 +38,7 @@ TH1F *stabilityHist(TGraphErrors *g_data, double& y_err_mean){ return hist_corr; } -TGraphErrors *columns_vs_var(TString filename, TString region_, int column, double rMin=1, double rMax=0){ +TGraphErrors *columns_vs_var(TString filename, TString region_, int column, double& rMin, double& rMax, bool updateRange=false){ TString region; TString xVar, rangeMin, rangeMax,numEvents; @@ -46,7 +47,7 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub double deltaG, err_deltaG; bool isDeltaG=false; std::vector xLabels; - + double rMin_=10, rMax_=-10; TGraphErrors deltaM_data_graph(100), deltaM_MC_graph(100), deltaG_graph(100); TH1F deltaM_data_hist("deltaM_data_hist", "#Delta m [GeV/c^{2}]", 1000, -5, 5); @@ -86,7 +87,11 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub isDeltaG=true; f_in >> deltaG >> err_deltaG; } - + if(deltaM_data< rMin_) rMin_=deltaM_data; + if(deltaM_MC< rMin_) rMin_=deltaM_MC; + if(deltaM_data > rMax_) rMax_=deltaM_data; + if(deltaM_MC > rMax_) rMax_=deltaM_MC; + if(region_=="" || region.CompareTo(region_)==0){ deltaM_data_hist.Fill(deltaM_data); if(xVar.CompareTo("runNumber")==0){ @@ -161,6 +166,11 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub } } g_out->SetHistogram(hist_g); + if(updateRange){ + std:: cout << rMin_ << "\t" << rMax_ << std::endl; + if(rMin_rMax) rMax=rMax_+0.1; + } g_out->Draw("AP"); return g_out; @@ -462,6 +472,7 @@ TCanvas *var_Stability(TString filename_corr, TString region, double rMin=3, dou SetLegendStyle(legend); if(column==-10) legend->SetTextSize(0.04); if(column<0) legend->SetTextSize(0.05); + legend->SetEntrySeparation(0.01); @@ -668,7 +679,6 @@ TCanvas *var_Stability(TString filename_corr, TString region, double rMin=3, dou } -enum plotType { onlyData=0, onlyDataBis, dataMC, dataMCs, dataOverMC, dataOverMCfit, onlyMCs}; TCanvas *var_Stability(std::vector filenameList, std::vector legendList,TString region, double rMin=3, double rMax=2, bool color=false, int column=1, TString xTitle="", TString yTitle="" ){ @@ -708,30 +718,41 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l else c = new TCanvas("c", region, 900,500); c->cd(); - + bool doStatistics= (column%10==1); + if(column>10){ + column-=(column%10); + column/=10; + } if(column<0) legend = new TLegend(0.15,0.6,0.4,0.95); else if(column>=0){ - legend = new TLegend(0,0.6,1,1); - pt = new TPaveText(0.,0.,1,0.6,"NDC"); - pt -> SetFillStyle(0); - pt->SetTextSize(0.1); - pt->SetFillColor(kWhite); - pt->SetBorderSize(0); + if(doStatistics){ + legend = new TLegend(0,0.6,1,1); + pt = new TPaveText(0.,0.,1,0.6,"NDC"); + pt -> SetFillStyle(0); + pt->SetTextSize(0.1); + pt->SetFillColor(kWhite); + pt->SetBorderSize(0); + } else{ + legend = new TLegend(0,0.,1,1); + pt=NULL; + } } SetLegendStyle(legend); if(column<0){ legend->SetTextSize(0.06); + } else { + legend->SetTextSize(0.06); } - TMultiGraph *g_multi = new TMultiGraph(); + bool updateRange=rMin>=rMax; for(std::vector::const_iterator filename_itr= filenameList.begin(); filename_itr != filenameList.end(); filename_itr++){ int index=filename_itr-filenameList.begin(); - TGraphErrors *g_data = columns_vs_var(*filename_itr, region, 0,rMin, rMax); - TGraphErrors *g_MC = columns_vs_var(*filename_itr, region, 1,rMin, rMax); - TGraphErrors *g_dataMC=columns_vs_var(*filename_itr, region, 2,rMin, rMax); + TGraphErrors *g_data = columns_vs_var(*filename_itr, region, 0,rMin, rMax, updateRange); + TGraphErrors *g_MC = columns_vs_var(*filename_itr, region, 1,rMin, rMax, updateRange); + TGraphErrors *g_dataMC=columns_vs_var(*filename_itr, region, 2,rMin, rMax, false); if(g_data==NULL || g_MC==NULL || g_dataMC==NULL) return c; g_data->SetName(region); @@ -748,7 +769,12 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l g_MC -> SetFillColor(kGray); g_MC -> SetMarkerColor(kRed+2+index); g_MC -> SetFillColor(kRed+2+index); - if(column==dataMCs || column==onlyMCs){ + if(abs(column)==dataMCs){ + g_MC -> SetFillStyle(1001); //+index); + g_MC -> SetFillColor(g_data->GetMarkerColor()); + g_MC -> SetMarkerColor(g_data->GetMarkerColor()); //kBlack+index); + g_MC -> SetMarkerStyle(20+index); + }else if(abs(column)==onlyMCs){ g_MC -> SetFillStyle(3003+index); g_MC -> SetFillColor(kBlack+index); g_MC -> SetMarkerColor(kBlack+index); @@ -757,14 +783,14 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l g_MC -> SetLineWidth(0); g_MC -> SetLineColor(1); - if(column>1 && column!=dataOverMC && column!=dataMC || (column==dataMC && index==0)){ + if(column!=onlyData && abs(column)!=dataOverMC && abs(column)!=onlyDataBis && abs(column)!=dataMC || (abs(column)==dataMC && index==0)){ TString plotOption="L3"; - if(column==onlyMCs) plotOption="P"; + if(abs(column)==onlyMCs) plotOption="P"; g_multi->Add(g_MC,plotOption); if (column==dataMC) legend->AddEntry(g_MC,"Simulation", plotOption); - else legend->AddEntry(g_MC,TString("MC: ")+legendList[index], plotOption); + else legend->AddEntry(g_MC,TString("MC: ")+legendList[index], plotOption+"f"); } - if(column!=dataOverMC){ + if(abs(column)!=dataOverMC){ if(pt!=NULL){ double y_mean_error=0; TH1F *hist = (column!=onlyMCs) ? stabilityHist(g_data, y_mean_error) : stabilityHist(g_MC, y_mean_error); @@ -776,8 +802,8 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l pt->AddText(TString::Format("Std. dev. = %.2f", hist->GetRMS())); pt->AddText(TString::Format("Mean Error = %.2f", y_mean_error)); } - if(column!=onlyMCs){ - legend->AddEntry(g_data,legendList[index], "P"); + if(abs(column)!=onlyMCs){ + legend->AddEntry(g_data,"Data: "+legendList[index], "P"); g_multi->Add(g_data,"P"); } }else{ @@ -821,6 +847,7 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l g_multi->GetYaxis()->SetLabelSize(g_multi->GetYaxis()->GetLabelSize()*labelScale); if( rMax == rMin || rMax < rMin){ + std::cout << g_multi->GetYaxis()->GetXmin() << "\t" << g_multi->GetYaxis()->GetXmax() *1.1 << std::endl; g_multi->GetYaxis()->SetRangeUser(g_multi->GetYaxis()->GetXmin(), g_multi->GetYaxis()->GetXmax() *1.1); } else { if(rMin > g_multi->GetYaxis()->GetXmin()) rMin=g_multi->GetYaxis()->GetXmin(); diff --git a/ZFitter/script/stability.sh b/ZFitter/script/stability.sh index f957df3d614..753af10d81a 100755 --- a/ZFitter/script/stability.sh +++ b/ZFitter/script/stability.sh @@ -2,7 +2,7 @@ titleOne="Data" titleTwo="" color=false -column=1 +column=3 usage(){ echo "`basename $0` -t tableFile -x xVar -y yVar --outDirImgData dir" echo " xVar: runNumber | absEta" @@ -77,6 +77,7 @@ if [ -z "${outDirImgData}" -a -z "${NOPLOT}" ];then echo "[ERROR] outDirImgData not specified: mandatory paramater" >> /dev/stderr exit 1 fi + if [ ! -e "tmp/" ];then mkdir tmp/; fi tmpFile=tmp/tmpFile.dat @@ -225,6 +226,7 @@ esac //------------------------------ filenameList.push_back("${tmpFileDat}"); labelList.push_back("${LEGENDS[$index]}"); +//labelList.push_back("${region}"); EOF let index=${index}+1 @@ -233,13 +235,15 @@ done regions=`cat tmp/stability/dat/*.dat | cut -f 1 | sort | uniq` + + if [ -n "${MULTIREGION}" ];then cat >> tmp/stability_macro.C< ${tmpFileDatNew} fi - + cat >> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C< Date: Wed, 21 Aug 2013 11:32:28 +0200 Subject: [PATCH 147/475] mm --- ZFitter/script/energyScale.sh | 52 +++++------------------------------ 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index aa4c88e0a06..eeb35902060 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -1,4 +1,5 @@ #!/bin/bash +source script/functions.sh # # energy scale derived in different steps: # - time dependence (step1) @@ -6,7 +7,7 @@ # - closure test (step3) commonCut=Et_25-trigger-noPF -selection=WP90_PU +selection=loose invMass_var=invMass_SC_regrCorr_pho baseDir=test updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" @@ -106,51 +107,12 @@ case ${STEP} in esac +## pileup reweight name +puName ${configFile} +echo "PUName: $puName" - ## pileup reweight name -if [ -z "$puName" ];then - puCount=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3 |wc -l` - if [ "${puCount}" == "0" ];then - echo "[ERROR] No or too mani pileupHist files for data" - exit 1 - fi - puFiles=`grep -v '#' ${configFile} | grep 'pileupHist' | grep '^d' | cut -f 3` - for puFile in $puFiles - do - puName="${puName}_`basename $puFile .root | sed 's|\..*||'`" - done - - #echo $puFile - #puName=`basename $puFile .root | sed 's|\..*||'` - puName=`echo $puName | sed 's|^_||'` - #echo $puName -fi - - ## MC name -if [ -z "${mcName}" ];then - mcCount=`grep -v '#' ${configFile} | grep 'selected' | grep '^s' | cut -f 3 |wc -l` - #if [ "${mcCount}" != "1" ];then -# echo "[ERROR] No or too mani MC files to extract the mcName" -# exit 1 -# fi - - mcTags=`grep -v '#' ${configFile} | grep 'selected' | grep '^s' | cut -f 1` - for mcTag in ${mcTags} - do - mcFiles=`grep -v '#' ${configFile} | grep 'selected' | grep "^${mcTags}" | cut -f 3` - for mcFile in $mcFiles - do -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root - - mcNames="${mcNames} `basename $mcFile .root | sed 's|\..*||;s|-[0-9]*-[0-9]*|'`" - done - done - - mcName=`echo $mcNames | sort | uniq sed 's| |_|;s|^_||'` -# echo $mcName -fi +mcName ${configFile} +echo "mcName: ${mcName}" if [ "${invMass_var}" == "invMass_regrCorr_egamma" ];then outDirMC=$baseDir/MCodd/${mcName}/${puName}/${selection}/${invMass_var} From 8bcb2f87e4426c2df6f7052128dc260fca63eff2 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 24 Aug 2013 09:17:39 +0200 Subject: [PATCH 148/475] new ntuples, but not indicated extraName --- ALCARAW_RECO/ntuple_datasets.dat | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 9d5745bdbea..bd55fb2704e 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -152,3 +152,15 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1/semiParamRegression 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1/semiParamRegression 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22Jan-v1/semiParamRegression +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM From 2903afabcd23bee2dc1a6e17ad6e659d08f1f574 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 24 Aug 2013 09:18:46 +0200 Subject: [PATCH 149/475] re-activated systematics as function of PU --- ZFitter/data/regions/systematics.dat | 66 +++++++++++++++++++++------- 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/ZFitter/data/regions/systematics.dat b/ZFitter/data/regions/systematics.dat index 4645be136fc..69678a23736 100644 --- a/ZFitter/data/regions/systematics.dat +++ b/ZFitter/data/regions/systematics.dat @@ -57,23 +57,57 @@ EE-R9_0.85_0.90-nPV_14_18 EE-R9_0.85_0.90-nPV_18_22 EE-R9_0.85_0.90-nPV_22_26 EE-R9_0.85_0.90-nPV_26_30 - # -#EB-R9Ele_0.00_0.60 -#EB-R9Ele_0.60_0.70 -#EB-R9Ele_0.70_0.80 -#EB-R9Ele_0.80_0.82 -#EB-R9Ele_0.82_0.84 -#EB-R9Ele_0.84_0.86 -#EB-R9Ele_0.86_0.88 -#EB-R9Ele_0.88_0.90 -#EB-R9Ele_0.90_0.92 -#EB-R9Ele_0.92_0.93 -#EB-R9Ele_0.93_0.94 -#EB-R9Ele_0.94_0.95 -#EB-R9Ele_0.95_0.96 -#EB-R9Ele_0.96_0.97 -#EB-R9Ele_0.97_1.20 +EB-R9_0.90_0.94-nPV_0_4 +EB-R9_0.90_0.94-nPV_4_8 +EB-R9_0.90_0.94-nPV_8_12 +EB-R9_0.90_0.94-nPV_12_14 +EB-R9_0.90_0.94-nPV_14_18 +EB-R9_0.90_0.94-nPV_18_22 +EB-R9_0.90_0.94-nPV_22_26 +EB-R9_0.90_0.94-nPV_26_30 +#EE-R9_0.90_0.04-nPV_0_4 +EE-R9_0.90_0.94-nPV_4_8 +EE-R9_0.90_0.94-nPV_8_12 +EE-R9_0.90_0.94-nPV_12_14 +EE-R9_0.90_0.94-nPV_14_18 +EE-R9_0.90_0.94-nPV_18_22 +EE-R9_0.90_0.94-nPV_22_26 +EE-R9_0.90_0.94-nPV_26_30 +# +EB-gold-nPV_0_4 +EB-gold-nPV_4_8 +EB-gold-nPV_8_12 +EB-gold-nPV_12_14 +EB-gold-nPV_14_18 +EB-gold-nPV_18_22 +EB-gold-nPV_22_26 +EB-gold-nPV_26_30 +#EE-R9_0.90_0.04-nPV_0_4 +EE-gold-nPV_4_8 +EE-gold-nPV_8_12 +EE-gold-nPV_12_14 +EE-gold-nPV_14_18 +EE-gold-nPV_18_22 +EE-gold-nPV_22_26 +EE-gold-nPV_26_30 +# +# +EB-R9Ele_0.00_0.60 +EB-R9Ele_0.60_0.70 +EB-R9Ele_0.70_0.80 +EB-R9Ele_0.80_0.82 +EB-R9Ele_0.82_0.84 +EB-R9Ele_0.84_0.86 +EB-R9Ele_0.86_0.88 +EB-R9Ele_0.88_0.90 +EB-R9Ele_0.90_0.92 +EB-R9Ele_0.92_0.93 +EB-R9Ele_0.93_0.94 +EB-R9Ele_0.94_0.95 +EB-R9Ele_0.95_0.96 +EB-R9Ele_0.96_0.97 +EB-R9Ele_0.97_1.20 # #EB-iSMSingleEle_1 #EB-iSMSingleEle_2 From 8fb2c7e0a22575ea378bfe6ecbc869e158e436e9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 24 Aug 2013 09:20:00 +0200 Subject: [PATCH 150/475] MC Generator Weight in ntuples --- ZNtupleDumper/src/ZNtupleDumper.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 39ab591e842..159e1ad1267 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -51,6 +51,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h" +#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/GsfTrackReco/interface/GsfTrack.h" @@ -155,6 +156,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::ESHandle topologyHandle; edm::Handle rhoHandle; edm::Handle > PupInfo; + edm::Handle< GenEventInfoProduct > GenEventInfoHandle; edm::Handle conversionsHandle; edm::Handle< reco::PFMETCollection > metHandle; edm::Handle triggerResultsHandle; @@ -194,6 +196,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t lumiBlock; ///< lumi section UInt_t runTime; ///< unix time + Float_t mcGenWeight; ///< weight in generator for MC + std::vector< std::string > HLTNames[1]; ///< List of HLT names std::vector HLTResults[1]; ///< 0=fail, 1=fire std::map HLTBits; @@ -426,6 +430,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // filling infos runNumber, eventNumber, lumi if( !iEvent.isRealData() ){ iEvent.getByLabel(edm::InputTag("addPileupInfo"), PupInfo); + iEvent.getByLabel(edm::InputTag("generator"), GenEventInfoHandle); isMC=true; } else isMC=false; @@ -664,6 +669,8 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("eventNumber", &eventNumber, "eventNumber/l"); tree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); tree->Branch("runTime", &runTime, "runTime/i"); + + tree->Branch("mcGenWeight", &mcGenWeight, "mcGenWeight/F"); tree->Branch("HLTfire", &HLTfire, "HLTfire/B"); //tree->Branch("HLTNames",&(HLTNames[0])); @@ -836,9 +843,13 @@ void ZNtupleDumper::TreeSetPileupVar(void){ nPU[0]=PVI->getTrueNumInteractions(); } } + + mcGenWeight=(GenEventInfoHandle->weights())[0]; + } else { //weight= 1.; nPU[0]=-1; + mcGenWeight=-1; } return; } From 51c2ca76a7d4ac91bea3f78a3aae113a952da26f Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 24 Aug 2013 19:00:31 +0200 Subject: [PATCH 151/475] profile in separate file and fix multiple samples for add branch --- ZFitter/bin/ZFitter.cpp | 1298 ++++--------------------------------- ZFitter/src/nllProfile.cc | 1048 ++++++++++++++++++++++++++++++ 2 files changed, 1192 insertions(+), 1154 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index d52aa15416a..2b25c52e00e 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -33,7 +33,7 @@ #include #include "Math/Minimizer.h" -#include "../interface/RooMinimizer.hh" +//#include "../interface/RooMinimizer.hh" #include #include @@ -112,1039 +112,8 @@ void UpdateFriends(tag_chain_map_t& tagChainMap){ return; } -//Get Profile after smearing -TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=1, bool warningEnable=true, bool trueEval=true); -TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval){ - TString name(var->GetName()); - double minValue=var->getVal(); - double minYvalue=compatibility.evaluate(); - std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << std::endl; - - //std::cout << "Prof: " << name << "\t" << minValue << "\t" << minYvalue << std::endl; - //double error=var->getError(); - - double bin_width=0., range_min=0., range_max=0., sigma=0.; - int nBin=0; - switch(level){ - case -1: - return GetProfile(var, compatibility, 5,false,false); - break; - case 0: - TGraph *g1; g1 =GetProfile(var, compatibility, 1,false); - TGraph *g2; g2 =GetProfile(var, compatibility, 2,false); - Double_t X[PROFILE_NBINS], Y[PROFILE_NBINS]; - - Int_t N_; N_=g1->GetN(); - Double_t *X_, *Y_; X_=g1->GetX(); Y_=g1->GetY(); - - for(Int_t i=0; i < N_; i++){ - X[i]=X_[i]; - Y[i] =Y_[i]; - } - nBin=N_; - N_=g2->GetN(); - X_=g2->GetX(); Y_=g2->GetY(); - - for(Int_t i=0; i < N_; i++){ - X[i+nBin]=X_[i]; - Y[i+nBin] =Y_[i]; - } - nBin+=N_; - return new TGraph(nBin,X,Y); - - break; - - case 1: - if(name.Contains("scale")){ - bin_width=0.005; - } else if(name.Contains("const")){ - bin_width=0.005; - } else if(name.Contains("alpha")){ - bin_width=0.01; - } - - range_min = var->getMin(); - range_max = var->getMax(); - - break; - case 2: - if(name.Contains("scale")){ - bin_width=0.0005; // level1/10 - sigma=10*bin_width; // - }else if(name.Contains("const")){ - bin_width=0.0005; //level1/10 - sigma=10*bin_width; // +/- 0.5% - } else if(name.Contains("alpha")){ - bin_width=0.005; - sigma=5*bin_width; // +/- 0.5% - } - - - //sigma=var->getError(); - range_min = std::max(var->getMin(), minValue - sigma); - range_max = std::min(var->getMax(), minValue + sigma); - break; - case 3: - if(name.Contains("scale")){ - bin_width=0.0001; // level2/5 - sigma=8*bin_width; // - }else if(name.Contains("const")){ - bin_width=0.0002; // level2 /3 - sigma=6*bin_width; - } else if(name.Contains("alpha")){ - bin_width=0.003; - sigma=5*bin_width; // +/- 0.5% - } - - //sigma=var->getError(); - range_min = std::max(var->getMin(), minValue - sigma); //4sigma - range_max = std::min(var->getMax(), minValue + sigma); - break; - case 4: - if(name.Contains("scale")){ - bin_width=0.0005; // level1/10 - }else if(name.Contains("const")){ - bin_width=0.001; //level1/10 - } else if(name.Contains("alpha")){ - bin_width=0.005; - } - - range_min = var->getMin(); - range_max = var->getMax(); - break; - - case 5: - if(name.Contains("scale")){ - bin_width=0.0005; // level1/10 - }else if(name.Contains("const")){ - bin_width=0.0005; //level1/10 - } else if(name.Contains("alpha")){ - bin_width=0.001; - } - range_min = var->getMin(); - range_max = var->getMax(); - break; - } - - nBin=(int)((range_max-range_min)/bin_width); - while(nBin <10){ - //std::cout << "[INFO] Updating from range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; - bin_width*=0.9; - range_min = std::max(var->getMin(),bin_width*((floor)(range_min / bin_width))- bin_width); - range_max = std::min(var->getMax(),bin_width*((floor)(range_max / bin_width))+ bin_width); - nBin=(int)((range_max-range_min)/bin_width); - //std::cout << "[INFO] Updating to range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; - if(nBin <=0) exit(1); - } - while(nBin >40 && level<4){ - bin_width*=1.1; - range_min = bin_width*((floor)(range_min / bin_width)); - range_max = bin_width*((floor)(range_max / bin_width)); - nBin=(int)((range_max-range_min)/bin_width); - } - - double chi2[PROFILE_NBINS]; - double xValues[PROFILE_NBINS]; - if(trueEval) std::cout << "------------------------------" << std::endl; - TStopwatch myClock; - myClock.Start(); - for (int iVal=0;iValsetVal(value); - xValues[iVal]=value; - if(trueEval) chi2[iVal]=compatibility.evaluate(); //-minYvalue; - else chi2[iVal]=0; - if (warningEnable && trueEval && chi2[iVal] < minYvalue ){ - std::cout << "[WARNING]: min in likelihood profile < min in MIGRAD: " << chi2[iVal]-minYvalue << " < " << minYvalue << std::endl; - std::cout << "xValue = " << value << "\t" << "[" << range_min << ":" << range_max << "]" << std::endl; - } -#ifdef DEBUG - std::cout << "value is " << chi2[iVal] << std::endl; -#endif - } - myClock.Stop(); - if(trueEval){ - std::cout << name << "\tlevel=" << level << "; nBins=" << nBin << "; range_min=" << range_min << "; range_max=" << range_max << "; bin_width=" << bin_width << "\t"; - myClock.Print(); - std::cout << "------------------------------" << std::endl; - } - - var->setVal(minValue); - TGraph *profil = new TGraph(nBin,xValues,chi2); - return profil; -} - -TTree *dataset2tree(RooDataSet *dataset){ - - const RooArgSet *args = dataset->get(); - RooArgList argList(*args); - - Double_t variables[50]; - Long64_t nEntries= dataset->numEntries(); - //nEntries=1; - TTree *tree = new TTree("tree","tree"); - tree->SetDirectory(0); - TIterator *it1=NULL; - it1 = argList.createIterator(); - int index1=0; - for(RooRealVar *var = (RooRealVar *) it1->Next(); var!=NULL; - var = (RooRealVar *) it1->Next(),index1++){ - TString name(var->GetName()); - name.ReplaceAll("-","_"); - tree->Branch(name, &(variables[index1]), name+"/D"); - } - - // tree->Print(); - - for(Long64_t jentry=0; jentryget(jentry))); - it = argList1.createIterator(); - //(dataset->get(jentry))->Print(); - int index=0; - for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; - var = (RooRealVar *) it->Next(), index++){ - variables[index]=var->getVal(); - //var->Print(); - } - - delete it; - tree->Fill(); - } - - // tree->Print(); - return tree; -} - -TMatrixDSym* GetCovariance( RooStats::MarkovChain *chain, TString var1, TString var2){ - -// RooRealVar *nll = chain->GetNLLVar(); -// //RooRealVar *weight= chain->GetWeightVar(); -// RooFormulaVar newWeight("f","","-@0",*nll); - - const RooArgSet *args = chain->Get(); - RooArgSet newArg; -// RooArgSet oldArg; -// oldArg.add(*(args->find(var1))); -// oldArg.add(*(args->find(var2))); -// oldArg.add(*nll); -// oldArg.Print(); - newArg.add(*(args->find(var1))); - newArg.add(*(args->find(var2))); -// newArg.Print(); -// //newArg.add(*nll); -// //newArg.add(newWeight); - -// RooDataSet dataset("dataset","", chain->GetAsDataSet(), RooArgSet(oldArg,newWeight), "", newWeight.GetName()); - chain->GetAsDataSet()->covarianceMatrix()->Print(); - return chain->GetAsDataSet()->covarianceMatrix(); -} - -bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, - Double_t min_old, Double_t& min, long unsigned int nIter, bool update=true){ - Double_t chi2, chi2init=smearer.evaluate(); - bool changed=false; - - TStopwatch myClock; - myClock.Start(); - - Double_t v1=var1->getVal(); - Double_t v2=var2->getVal(); - - // fix the scales to constant! - RooArgSet floatingVars; - RooArgList argList_(smearer.GetParams()); - TIterator *it_ = argList_.createIterator(); - for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ - if (var->isConstant() || !var->isLValue()) continue; - TString name(var->GetName()); - if(name!=var1->GetName() && name!=var2->GetName()){ - floatingVars.add(*var); - var->setConstant(); - } - } - delete it_; - - //creating MCMC proposal - RooStats::ProposalHelper ph; - ph.SetVariables(smearer.GetParams()); - if(iProfile>1){ - ph.SetCovMatrix(*smearer._markov.GetAsDataSet()->covarianceMatrix(smearer.GetParams())); ////*GetCovariance(&smearer._markov, var1->GetName(), var2->GetName())); - ph.SetUniformFraction(0.2/iProfile); - if(iProfile==2) ph.SetWidthRangeDivisor(5); - if(iProfile==3) ph.SetWidthRangeDivisor(20); - }else{ - ph.SetUniformFraction(1); - ph.SetWidthRangeDivisor(1); - } - - //running the mcmc - RooStats::MetropolisHastings MCMC(smearer, smearer.GetParams(), *(ph.GetProposalFunction()), nIter); - MCMC.SetNumBurnInSteps(10); - MCMC.SetSign(RooStats::MetropolisHastings::kNegative); - MCMC.SetType(RooStats::MetropolisHastings::kLog); - RooStats::MarkovChain *mcChain = (MCMC.ConstructChain()); - - //taking the results - RooDataSet *dataset = mcChain->GetAsDataSet(); - TTree *tree=dataset2tree(dataset); - TString nllVarName=mcChain->GetNLLVar()->GetName(); - chi2= tree->GetMinimum(nllVarName); - std::cout << "[DEBUG] chi2 = tree->GetMinimum(nllVarName): " << chi2 << std::endl; - TString selMin=nllVarName+" == "; selMin+=chi2; - - tree->Draw(">>entrylist",selMin,"entrylist"); - TEntryList *entrylist=(TEntryList*) gROOT->FindObject("entrylist"); - if(entrylist->GetN()!=1){ - std::cout << "Entrylist N=" << entrylist->GetN() << std::endl; - return ""; - } - Long64_t minEntry = entrylist->GetEntry(0); - - TString var1Name=var1->GetName(); var1Name.ReplaceAll("-","_"); - TString var2Name=var2->GetName(); var2Name.ReplaceAll("-","_"); - - TObjArray *branchArray = tree->GetListOfBranches(); - for(int i=0; i < branchArray->GetEntriesFast(); i++){ - TBranch *b= (TBranch *) branchArray->At(i); - TString name=b->GetName(); - if(name!=var1Name && name!=var2Name) continue; - Double_t address; - b->SetAddress(&address); - b->GetEntry(minEntry); - if(name==var1Name) var1->setVal(address); - else var2->setVal(address); - } - - chi2=smearer.evaluate(); // local minimum - - if(chi2GetName() << "\t" << var1->getVal() << std::endl - << " " << var2->GetName() << "\t" << var2->getVal() << std::endl - << " " << min-chi2init << "\t" << chi2-chi2init << "\t" << chi2init << std::endl; - changed=true; - } else { - if(chi2GetName() << "\t" << var1->getVal() << std::endl - << " " << var2->GetName() << "\t" << var2->getVal() << std::endl - << " " << min-chi2init << "\t" << chi2-chi2init << std::endl; - var1->setVal(v1); - var2->setVal(v2); - std::cout - << " " << var1->GetName() << "\t" << var1->getVal() << std::endl - << " " << var2->GetName() << "\t" << var2->getVal() << std::endl - << " " << min-chi2init << std::endl; - } - } - - std::cout << "------------------------------" << std::endl; - myClock.Stop(); - myClock.Print(); - std::cout << "------------------------------" << std::endl; - - // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; - - - - //floating the scales - RooArgList argList(floatingVars); - it_ = argList.createIterator(); - for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ - var->setConstant(kFALSE); - } - delete it_; - - delete mcChain; - delete tree; - delete entrylist; - - return changed; -} - - -void Smooth(TH2F *h, Int_t ntimes, Option_t *option) -{ - Double_t k5a[5][5] = { { 0, 0, 1, 0, 0 }, - { 0, 2, 2, 2, 0 }, - { 1, 2, 5, 2, 1 }, - { 0, 2, 2, 2, 0 }, - { 0, 0, 1, 0, 0 } }; - Double_t k5b[5][5] = { { 0, 1, 2, 1, 0 }, - { 1, 2, 4, 2, 1 }, - { 2, 4, 8, 4, 2 }, - { 1, 2, 4, 2, 1 }, - { 0, 1, 2, 1, 0 } }; - Double_t k3a[3][3] = { { 0, 1, 0 }, - { 1, 2, 1 }, - { 0, 1, 0 } }; - - // if (ntimes > 1) { - // Warning("Smooth","Currently only ntimes=1 is supported"); - // } - TString opt = option; - opt.ToLower(); - Int_t ksize_x=5; - Int_t ksize_y=5; - Double_t *kernel = &k5a[0][0]; - if (opt.Contains("k5b")) kernel = &k5b[0][0]; - if (opt.Contains("k3a")) { - kernel = &k3a[0][0]; - ksize_x=3; - ksize_y=3; - } - - // find i,j ranges - Int_t ifirst = h->GetXaxis()->GetFirst(); - Int_t ilast = h->GetXaxis()->GetLast(); - Int_t jfirst = h->GetYaxis()->GetFirst(); - Int_t jlast = h->GetYaxis()->GetLast(); - - // Determine the size of the bin buffer(s) needed - //Double_t nentries = h->GetEntries(); - Int_t nx = h->GetNbinsX(); - Int_t ny = h->GetNbinsY(); - Int_t bufSize = (nx+2)*(ny+2); - Double_t *buf = new Double_t[bufSize]; - Double_t *ebuf = 0; - if (h->GetSumw2()->fN) ebuf = new Double_t[bufSize]; - - // Copy all the data to the temporary buffers - Int_t i,j,bin; - for (i=ifirst; i<=ilast; i++){ - for (j=jfirst; j<=jlast; j++){ - bin = h->GetBin(i,j); - buf[bin] =h->GetBinContent(bin); - if (ebuf) ebuf[bin]=h->GetBinError(bin); - } - } - - // Kernel tail sizes (kernel sizes must be odd for this to work!) - Int_t x_push = (ksize_x-1)/2; - Int_t y_push = (ksize_y-1)/2; - - // main work loop - for (i=ifirst; i<=ilast; i++){ - for (j=jfirst; j<=jlast; j++) { - Double_t content = 0.0; - Double_t error = 0.0; - Double_t norm = 0.0; - if(h->GetBinContent(i,j)<=0) continue; - for (Int_t n=0; n= 1) && (xb <= nx) && (yb >= 1) && (yb <= ny)) { - bin = h->GetBin(xb,yb); - if(buf[bin]>0){ - Double_t k = kernel[n*ksize_y +m]; - //if ( (k != 0.0 ) && (buf[bin] != 0.0) ) { // General version probably does not want the second condition - if ( k != 0.0 ) { - norm += k; - content += k*buf[bin]; - if (ebuf) error += k*k*buf[bin]*buf[bin]; - } - } - } - } - } - - if ( norm != 0.0 ) { - h->SetBinContent(i,j,content/norm); - if (ebuf) { - error /= (norm*norm); - h->SetBinError(i,j,sqrt(error)); - } - } - } - } - //fEntries = nentries; - - delete [] buf; - delete [] ebuf; -} - - -Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL){ - var->setVal(X[iMinStart]); - Double_t chi2, chi2init=smearer.evaluate(); - - Double_t locmin=1e20; - Int_t iLocMin=iMinStart; - std::queue chi2old; - Double_t NY[200]={0.}; - - for(Int_t i =iMinStart; i setVal(X[i]); - chi2=smearer.evaluate(); - if(Y!=NULL){ - Y[i] += chi2; - NY[i]++; - } -#ifdef DEBUG - if(update==true) - std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; -#endif - if(chi2<=locmin){ //local minimum - iLocMin=i; - locmin=chi2; - } - - if(!chi2old.empty() && chi22 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} - if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} - if(chi2old.size()>4){ - if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >150) break; - } - - chi2old.push(chi2); - } - - while(!chi2old.empty()){ - chi2old.pop(); - } - for(Int_t i =iMinStart; i >=0; i--){ //loop versus positive side - var->setVal(X[i]); - chi2=smearer.evaluate(); - if(Y!=NULL){ - Y[i] += chi2; - NY[i]++; - } - -#ifdef DEBUG - if(update==true) - std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; -#endif - if(chi2<=locmin){ //local minimum - iLocMin=i; - locmin=chi2; - } - - if(!chi2old.empty() && chi22 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} - if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} - if(chi2old.size()>4){ - if(chi2-chi2old.back() >80 && chi2-locmin >100){ std::cout << "stop 5" << std::endl; break;} - if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100){ std::cout << "stop 6" << std::endl; break;} - if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>50 && chi2-locmin >100){ std::cout << "stop 7" << std::endl; break;} - } - chi2old.push(chi2); - } - - if(Y!=NULL){ //take the mean! - for(Int_t i =0; i < N; i++){ - if(NY[i]!=0) Y[i] /= NY[i]; - } - } - - return iLocMin; -} - - -/** - min is updated - */ -bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, - Double_t min_old, Double_t& min, bool update=true){ - if(iProfile==2) iProfile=-1; - if(iProfile>2) return false; - //smearer.SetNSmear(0,10); - bool changed=false; - std::cout << "------------------------------ MinProfile2D: iProfile==" << iProfile << std::endl; - std::cout << "--------------------------------- GetProfile for " << var1->GetName() << std::endl; - TGraph *g1 = GetProfile(var1, smearer, iProfile, false, false); // take only the binning - std::cout << "--------------------------------- GetProfile for " << var2->GetName() << std::endl; - TGraph *g2 = GetProfile(var2, smearer, iProfile, false, false); // take only the binning - - - Double_t *X1 = g1->GetX(); - Double_t *X2 = g2->GetX(); - Int_t N1 = g1->GetN(); - Int_t N2 = g2->GetN(); - Double_t *Y = new Double_t[N2]; - - std::cout << "--------------------------------- Init eval " << std::endl; - //initial values - Double_t v1=var1->getVal(); - Double_t v2=var2->getVal(); - if(var1->isConstant()){ - X1[0] = v1; - N1=1; - } - if(var2->isConstant()){ - X2[0] = v2; - N2=1; - } - - - Double_t chi2, chi2init=smearer.evaluate(); - - Double_t locmin=1e20, locminSmooth=1e20; - Int_t iLocMin1=0, iLocMin2, iLocMin2Prev=N2/3; - - TStopwatch myClock; - myClock.Start(); - - std::cout << "--------------------------------- Grid eval " << std::endl; - TH2F h("hist2","",N1,0,N1,N2,0,N2); - for(Int_t i1 =0; i1 setVal(X1[i1]); - std::queue chi2old; - - iLocMin2Prev = FindMin1D(var2, X2, N2, iLocMin2Prev, locmin, smearer, true, Y); - for(Int_t i2=0; i2 < N2; i2++){ -#ifdef DEBUG - if(Y[i2]!=0) std::cout << i1 << "\t" << i2 << "\t" << X1[i1] << "\t" << X2[i2] << "\t" << Y[i2]; -#endif - h.Fill(i1,i2,Y[i2]); -#ifdef DEBUG - if(Y[i2]!=0) std::cout << "\t" << h.GetBinContent(i1+1,i2+1) << std::endl; -#endif - } - - var2->setVal(X2[iLocMin2Prev]); - chi2=smearer.evaluate(); - -#ifndef smooth - if(update==true || true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; -#endif - if(chi2<=locmin){ //local minimum - iLocMin1=i1; - iLocMin2=iLocMin2Prev; - locmin=chi2; - } - } - - // reset to initial value - var1->setVal(v1); - var2->setVal(v2); - -#ifdef smooth - Smooth(&h, 1, "k3a"); - for(Int_t i1=0; i10){ - if(update==true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locminSmooth-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; - if(content>0 && locminSmooth > content){ - locminSmooth=content; - iLocMin1=i1; - iLocMin2=i2; - } - } - } - } - locmin=locminSmooth; -#endif - if(update && locminGetName() << "\t" << v1 << " -> " << X1[iLocMin1] << std::endl - << " " << var2->GetName() << "\t" << v2 << " -> " << X2[iLocMin2] << std::endl - << " " << min << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; - var1->setVal(X1[iLocMin1]); - var2->setVal(X2[iLocMin2]); - } else{ - std::cout << "[INFO] Not-Updating variable:" << std::endl - << " " << var1->GetName() << "\t" << v1 << " -> " << X1[iLocMin1] << std::endl - << " " << var2->GetName() << "\t" << v2 << " -> " << X2[iLocMin2] << std::endl - << " " << min << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; - } - - std::cout << "------------------------------" << std::endl; - myClock.Stop(); - std::cout << var1->GetName() << "\tlevel=" << iProfile << "; nBins=" << N1 << "; range_min=" << X1[0] << "; range_max=" << X1[N1-1] << "; bin_width=" << X1[1]-X1[0] << std::endl; - std::cout << var2->GetName() << "\tlevel=" << iProfile << "; nBins=" << N2 << "; range_min=" << X2[0] << "; range_max=" << X2[N2-1] << "; bin_width=" << X2[1]-X2[0] << std::endl; - myClock.Print(); - std::cout << "------------------------------" << std::endl; - - // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; - // smearer.SetNSmear(0,1); - delete g1; - delete g2; - delete Y; - return changed; -} - - - - -bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, - Double_t min_old, Double_t& min){ - bool changed=false; - std::cout << "[STATUS] Starting MinProfile for " << var->GetName() << "\t" << iProfile << std::endl; - TGraph *profil = GetProfile(var, smearer, iProfile, false); - TGraphErrors g(profil->GetN(),profil->GetX(), profil->GetY()); - - - Double_t *X = g.GetX(); - Double_t *Y = g.GetY(); - Int_t N = g.GetN(); - Double_t chi2=Y[0]; - Double_t chi2init=smearer.evaluate(); - //Int_t iMin = 1; //, iLow=1, iHigh=1; - Int_t iMin_=1; // minimum of the graph - //find minimum - for(Int_t i =0; i GetName() << ": " << i << " " << X[i] << " " << Y[i]-chi2init << " " << chi2-chi2init << " " << min-chi2 << std::endl; - } - - if(chi2getVal() != X[iMin_]) changed=true; //the value has been updated, need a new iteration - } - - if(chi2< chi2init && (iMin_<=1 || iMin_>=N-1)){ // on the border, need a new iteration - var->setVal(X[iMin_]); - std::cout << "[INFO] Minimized at the border of the interval: need another iteration" << std::endl; - MinProfile(var, smearer, iProfile, min_old, min); - changed=true; - return changed; - } - - if(minGetName() << "\t" << X[iMin_] - << " " << min << " " << Y[iMin_]-min << std::endl; - var->setVal(X[iMin_]); - //var->setError(newError); - } else{ - std::cout << "[INFO] Not-Updating variable:" << var->GetName() << "\t" << X[iMin_] - << " " << min << " " << Y[iMin_]-min << std::endl; - } - std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; - - delete profil; - return changed; -} - -void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int nIterMCMC, bool mcmc=false){ - std::cout << "[INFO] Minimization: profile" << std::endl; - std::cout << "[INFO] Re-initialize nllMin: 1e20" << std::endl; - smearer.nllMin=1e20; - Double_t min_old = 9999999999.; - Double_t min = 999999999.; - bool updateError = false; - int nIter=0; - TStopwatch myClock; - myClock.Start(); - - RooArgList argList_(args); - TIterator *it_ = NULL; - while((min < min_old || updateError==true) && nIter <1){ - updateError=false; - TStopwatch iterClock; - iterClock.Start(); - if(min < min_old) min_old=min; - it_ = argList_.createIterator(); - for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ - if (var->isConstant() || !var->isLValue()) continue; - TString name(var->GetName()); - if(!name.Contains("scale")) continue; // looping only for the scale - for(int iProfile=1; iProfile<2; iProfile++){ - updateError += MinProfile(var, smearer, iProfile, min_old, min); - } - } - delete it_; - iterClock.Stop(); - std::cout << "[INFO] nIter scale: " << nIter; - iterClock.Print(); - nIter++; - } - - - //minimization of additional smearing - updateError=true; - min_old=min; - nIter=0; - while((min < min_old || updateError==true) && nIter <2){ - updateError=false; - TStopwatch iterClock; - iterClock.Start(); - if(min < min_old) min_old=min; - - it_= argList_.createIterator(); - for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ - if (var->isConstant() || !var->isLValue()) continue; - TString name(var->GetName()); - if(!name.Contains("scale")) continue; // looping only for the scale - for(int iProfile=2; iProfile<4; iProfile++){ - updateError += MinProfile(var, smearer, iProfile, min_old, min); - } - } - delete it_; - iterClock.Stop(); - std::cout << "[INFO] nIter fine scale: " << nIter; - iterClock.Print(); - nIter++; - } - - updateError=true; - min_old = min; - nIter=0; - while((min < min_old && nIter < 5) || (updateError==true && nIter <2)){ - updateError=false; - TStopwatch iterClock; - iterClock.Start(); - it_= argList_.createIterator(); - if(min < min_old) min_old=min; - for(RooRealVar *var = (RooRealVar*)it_->Next(); var!=NULL; var = (RooRealVar*)it_->Next()){ - if (var->isConstant()) continue; - TString name(var->GetName()); - - // special part for alpha fitting - TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); - RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList_.find(alphaName): NULL; - if(name.Contains("alpha")) continue; - //if(var2!=NULL && var2->isConstant()) var2=NULL; // to use MinProfile 1D instead of 2D - //taking large profile - for(int iProfile=2; iProfile<4; iProfile++){ - if(var2==NULL) MinProfile(var, smearer, iProfile, min_old, min); //updateError += MinProfile(var, smearer, iProfile, min_old, min); - else { - if(mcmc && iProfile>2) updateError += MinMCMC2D(var, var2, smearer, iProfile, min_old, min, nIterMCMC); - else updateError+=MinProfile2D(var, var2, smearer, iProfile, min_old, min); - } - } - } - delete it_; - iterClock.Stop(); - std::cout << "[DEBUG] nIter= " << nIter << "\t"; iterClock.Print(); - nIter++; - smearer.GetParams().writeToStream(std::cout, kFALSE); - } -} - - -class ShervinMinuit: public PdfProposal { - -public: - //inline ShervinMinuit(){}; - //ShervinMinuit(int nBurnSteps); - ShervinMinuit(int nBurnSteps, RooSmearer& smearer); - - ProposalHelper *ph; - ProposalFunction* proposal; - void Propose(RooArgSet& xPrime, RooArgSet& x); - inline Bool_t IsSymmetric(RooArgSet& xPrime, RooArgSet& x){return true;}; //proposal->IsSymmetric(xPrime,x);}; - inline Double_t GetProposalDensity(RooArgSet& xPrime, RooArgSet& x){return 0;}; //proposal->GetProposalDensity(xPrime, x);}; - - inline void SetMinuit(RooMinuit& m){_m = &m;}; -private: - int _nBurnSteps; - int _iStep; - int _iBurnStep; - RooMinuit* _m; - - - RooSmearer& _smearer; - //RooArgSet& _params; - RooArgSet _paramSet; - RooStats::UniformProposal propUnif; - RooMultiVarGaussian *gausPdf; - TRandom3 gen; - std::vector rmsHist; - float fSigmaRangeDivisor; -}; - - -ShervinMinuit::ShervinMinuit(int nBurnSteps, RooSmearer& smearer): - _smearer(smearer),gausPdf(NULL), gen(1245), fSigmaRangeDivisor(-1) - // _params(smearer.GetParams()) -{ - - _iStep =0; - - _nBurnSteps = nBurnSteps; - - RooArgList argList(smearer.GetParams()); - TIterator *it = argList.createIterator(); - std::cout << "###############################" << std::endl; - for(RooRealVar *v = (RooRealVar*)it->Next(); v!=NULL; v = (RooRealVar*)it->Next()){ - if(! v->isConstant()){ - _paramSet.add((*v)); - rmsHist.push_back(new TH1F(v->GetName(),"",1000, v->getMin(), v->getMax())); - } - } - delete it; - // _paramSet.Print(); -// ph = new ProposalHelper(); -// ph->SetVariables(_paramSet); -// ph->SetUpdateProposalParameters(kTRUE); // auto-create mean vars and add mappings -// ph->SetUniformFraction(1); -// ph->SetCluesFraction(0); -// ph->SetWidthRangeDivisor(100); - // proposal = ph->GetProposalFunction(); - - RooArgList xVec(_paramSet); - Int_t size = xVec.getSize(); - Float_t fSigmaRangeDivisor = 100; - TMatrixDSym *fCovMatrix = new TMatrixDSym(size); - RooRealVar* r; - for (Int_t i = 0; i < size; i++) { - r = (RooRealVar*)xVec.at(i); - Double_t range = r->getMax() - r->getMin(); - (*fCovMatrix)(i,i) = range / fSigmaRangeDivisor; - } - -// gausPdf = new RooMultiVarGaussian("multiVar","", RooArgList(_paramSet), *fCovMatrix); -// gausPdf->initGenerator(12345); -// gausPdf-> generateEvent(1); -// SetPdf(*gausPdf); - -// // gausPdf->generate(_paramSet,10)->Print(); -// SetCacheSize(10); - //proposal = ph->GetProposalFunction(); - //proposal = &propUnif; - //_iBurnStep = (int) _nBurnSteps/100; - //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/10; - //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/5; -} - - -void ShervinMinuit::Propose(RooArgSet& xPrime, RooArgSet& x){ - TIterator *it=NULL; -// RooRealVar v1("v1","",0.01,0,0.04); -// RooRealVar v2("v2","",0.02,0,0.04); -// RooArgSet arg1(v1); -// RooArgSet arg2(v2); - - if(_iStep==20){ - fSigmaRangeDivisor=4; - RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); - float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - } - else if(_iStep==50){ - fSigmaRangeDivisor=10; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; - RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); - float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - - } - else if(_iStep==80){ - fSigmaRangeDivisor=15; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; - RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); - float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - var = (RooRealVar *)x.find("scale_EB-absEta_0_1-gold-Et_25"); - varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - - // } else if(_iStep==100){ -// fSigmaRangeDivisor=20; -// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; -// RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); -// float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; -// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor -// << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr -// << std::endl; - - } - - - //else if(_iStep==100) fSigmaRangeDivisor=10; - - it = RooArgList(xPrime).createIterator(); - int index=0; - for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; - var = (RooRealVar *) it->Next()){ - - //var->setError(var->getError()/100); - - - RooRealVar *v_x = ((RooRealVar *)x.find(var->GetName())); - rmsHist[index]->Fill(v_x->getVal()); - - float varErr = std::min(rmsHist[index]->GetRMS(), (var->getMax()-var->getMin())/fSigmaRangeDivisor); - - - if(fSigmaRangeDivisor<3) var->setVal(gen.Uniform(v_x->getMin(), v_x->getMax())); - else { - if(varErr < (var->getMax()-var->getMin())/100) std::cout << "[WARNING] " << varErr << std::endl; - var->setVal(gen.Gaus( - ((RooRealVar *)x.find(var->GetName()))->getVal(), - varErr) - ); - } - -// if(TString(var->GetName())=="constTerm_EB-absEta_0_1-gold-Et_25"){ -// std::cout << var->GetName() << "\t" << v_x->getVal() << " --> " << var->getVal() << "\t" << varErr << std::endl; -// } - index++; - } - - _iStep++; - return; - - - - if(_iStep == _nBurnSteps){ - std::cout << "Now Gaussian proposal" << std::endl; - - it = xPrime.createIterator(); - for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; - var = (RooRealVar *) it->Next()){ - //var->setError(var->getError()/100); - //float varErr = var->getVal()/100; - //if(TString(var->GetName()).Contains("constTerm")) varErr*=10; - //var->setMin(std::max(var->getMin(),var->getVal()- varErr*3)); - //var->setMax(std::min(var->getMax(),var->getVal()+ varErr*3)); - var->setMin(0.0); - var->setMax(0.05); - //var->setVal(0.03); - std::cout << var -> GetName() << "\t" << var->getError() << "\t" << var -> getMin() << "\t" << var->getMax()<< std::endl; - } - //_m->hesse(); - //RooFitResult *fitres = _m->save(); - } -} - int main(int argc, char **argv) { TStopwatch myClock; TStopwatch globalClock; @@ -1389,6 +358,10 @@ int main(int argc, char **argv) { //============================== Reading the config file with the list of chains tag_chain_map_t tagChainMap; TString tag, chainName, fileName; + + TString chainFileListTag=chainFileListName; + chainFileListTag.Remove(0,chainFileListTag.Last('/')+1); + chainFileListTag.ReplaceAll(".dat",""); std::ifstream chainFileList(chainFileListName.c_str()); while(chainFileList >> tag, chainFileList.good()){ @@ -1576,121 +549,152 @@ int main(int argc, char **argv) { puWeights.ReadFromFiles(mcPUFileName_.Data(),dataPUFileName_.Data(), runMin); } + // for each mc sample create a tree with the per-event-weight + // but exclude the chain "s" since it's supposed to be created mergin alle the s-type samples for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ - if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //do it for each sample - - TString fpuname="tmp/mcPUtree"+tag_chain_itr->first+".root"; - TFile f(fpuname,"recreate"); + if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + TString treeName="pileup"; + TString fileame="tmp/mcPUtree"+tag_chain_itr->first+".root"; + TFile f(filename,"recreate"); if(f.IsOpen()){ f.cd(); - TChain *ch = (tag_chain_itr->second.find("selected"))->second; + TTree *puTree = puWeights.GetTreeWeight(ch,true); + puTree->SetName(treeName); puTree->Write(); delete puTree; f.Write(); f.Close(); - std::pair pair_tmp("pileup", new TChain("pileup")); + std::pair pair_tmp(treeName, new TChain(treeName)); chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; chain_itr->second->SetTitle(tag_chain_itr->first); - chain_itr->second->Add(fpuname); - // adding pu weight also to chain "s" + chain_itr->second->Add(filename); } - } } } //read corrections directly from file if (vm.count("corrEleType")){ + std::cout << "------------------------------------------------------------" << std::endl; std::cout << "[STATUS] Getting energy scale corrections from file: " << corrEleFile << std::endl; TString treeName="scaleEle_"+corrEleType; - if((tagChainMap["d"]).count(treeName)==0){ - if (vm.count("readDirect")){ - std::pair pair_tmp(treeName, new TChain(treeName)); - (tagChainMap["d"]).insert(pair_tmp); - (tagChainMap["d"])[treeName]->SetTitle("d"); - if((tagChainMap["d"])[treeName]->Add(TString(corrEleFile))<=0) return 1; - } - else { - //std::cout<<"here, read ele corr from command line: "<GetEntries() << std::endl; - TFile f(TString(corrEleType+".root"),"recreate"); - if(f.IsOpen()){ - TTree *corrTree = eScaler.GetCorrTree((tagChainMap["d"])["selected"]); - //corrTree->SetName("scaleEle"); - //corrTree->SetTitle(corrEleType.c_str()); - f.cd(); - corrTree->Write(); - std::cout << "corrEle entries: " << corrTree->GetEntries() << std::endl; - delete corrTree; - - f.Write(); - f.Close(); - std::pair pair_tmp(treeName, new TChain(treeName)); - (tagChainMap["d"]).insert(pair_tmp); - (tagChainMap["d"])[treeName]->SetTitle("d"); - if((tagChainMap["d"])[treeName]->Add(TString(corrEleType+".root"))<=0) return 1; + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + if(tag_chain_itr->first.CompareTo("d")==0 || !tag_chain_itr->first.Contains("d")) continue; //only data + if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + + TString filename="tmp/scaleEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; + EnergyScaleCorrection_class eScaler(corrEleFile,corrEleType); + std::cout << "[STATUS] Saving electron scale corrections to root file:" << filename << std::endl; + + TFile f(filename,"recreate"); + if(!f.IsOpen() || f.IsZombie()){ + std::cerr << "[ERROR] File for scale corrections: " << filename << " not opened" << std::endl; + exit(1); } - } - } - //if( (tagChainMap["d"])["selected"]->AddFriend((tagChainMap["d"])[treeName])==NULL) return 2; - } - - //read corrections directly from file - if (vm.count("smearEleType")){ - std::cout << "[STATUS] Getting energy smearings from file: " << smearEleFile << std::endl; - EnergyScaleCorrection_class eScaler("","", smearEleFile,smearEleType); - TString treeName="smearEle_"+smearEleType; - TString treeFile="tmp/smearEle_"+smearEleType+"_mc.root"; - if((tagChainMap["s"]).count(treeName)==0){ - std::cout << "[STATUS] Saving electron smearings to root file:" << treeFile << std::endl; - std::cout << "data entries: " << (tagChainMap["s"])["selected"]->GetEntries() << std::endl; - TFile f(treeFile,"recreate"); - if(f.IsOpen()){ - TTree *corrTree = eScaler.GetSmearTree((tagChainMap["s"])["selected"], true, energyBranchName ); + TTree *corrTree = eScaler.GetCorrTree(ch); + //corrTree->SetName("scaleEle"); + //corrTree->SetTitle(corrEleType.c_str()); f.cd(); corrTree->Write(); - std::cout << "smearEle entries: " << corrTree->GetEntries() << std::endl; + std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; + std::cout << " corrEle entries: " << corrTree->GetEntries() << std::endl; delete corrTree; - + f.Write(); f.Close(); std::pair pair_tmp(treeName, new TChain(treeName)); - (tagChainMap["s"]).insert(pair_tmp); - (tagChainMap["s"])[treeName]->SetTitle("s"); - if((tagChainMap["s"])[treeName]->Add(treeFile)<=0) return 1; - //(tagChainMap["s"])["selected"]->AddFriend((tagChainMap["s"])[treeName]); - } - } + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(filename); + + } // end of data samples loop + } // end of corrEle loop -#ifdef TOBEFIXED - treeFile="tmp/smearEle_"+smearEleType+"_data.root"; - if((tagChainMap["d"]).count(treeName)==0){ - std::cout << "[STATUS] Saving electron smearings to root file:" << treeFile << std::endl; - std::cout << "data entries: " << (tagChainMap["d"])["selected"]->GetEntries() << std::endl; - TFile f(treeFile,"recreate"); - if(f.IsOpen()){ - TTree *corrTree = eScaler.GetSmearTree((tagChainMap["d"])["selected"], true, energyBranchName ); + //read corrections directly from file + if (vm.count("corrEleType")){ + std::cout << "------------------------------------------------------------" << std::endl; + std::cout << "[STATUS] Getting energy scale corrections from file: " << corrEleFile << std::endl; + TString treeName="scaleEle_"+corrEleType; + EnergyScaleCorrection_class eScaler(corrEleFile,corrEleType); + + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + if(tag_chain_itr->first.CompareTo("d")==0 || !tag_chain_itr->first.Contains("d")) continue; //only data + if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + + TString filename="tmp/scaleEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; + std::cout << "[STATUS] Saving electron scale corrections to root file:" << filename << std::endl; + + TFile f(filename,"recreate"); + if(!f.IsOpen() || f.IsZombie()){ + std::cerr << "[ERROR] File for scale corrections: " << filename << " not opened" << std::endl; + exit(1); + } + TTree *corrTree = eScaler.GetCorrTree(ch); + //corrTree->SetName("scaleEle"); + //corrTree->SetTitle(corrEleType.c_str()); f.cd(); corrTree->Write(); - std::cout << "smearEle entries: " << corrTree->GetEntries() << std::endl; + std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; + std::cout << " corrEle entries: " << corrTree->GetEntries() << std::endl; delete corrTree; - + f.Write(); f.Close(); std::pair pair_tmp(treeName, new TChain(treeName)); - (tagChainMap["d"]).insert(pair_tmp); - (tagChainMap["d"])[treeName]->SetTitle("d"); - if((tagChainMap["d"])[treeName]->Add(treeFile)<=0) return 1; + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(filename); + + } // end of data samples loop + } // end of corrEle loop + //read corrections directly from file + if (vm.count("smearEleType")){ + std::cout << "------------------------------------------------------------" << std::endl; + std::cout << "[STATUS] Getting energy smearings from file: " << smearEleFile << std::endl; + TString treeName="smearEle_"+smearEleType; + EnergyScaleCorrection_class eScaler("","", smearEleFile,smearEleType); + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //only data + if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + + TString filename="tmp/smearEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; + std::cout << "[STATUS] Saving electron smearings to root file:" << filename << std::endl; + + TFile f(filename,"recreate"); + if(!f.IsOpen() || f.IsZombie()){ + std::cerr << "[ERROR] File for scale corrections: " << filename << " not opened" << std::endl; + exit(1); } + TTree *corrTree = eScaler.GetSmearTree((tagChainMap["s"])["selected"], true, energyBranchName ); + f.cd(); + corrTree->Write(); + std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; + std::cout << " smearEle entries: " << corrTree->GetEntries() << std::endl; + delete corrTree; + + f.Write(); + f.Close(); + std::pair pair_tmp(treeName, new TChain(treeName)); + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(filename); } -#endif + // \todo need the data part in case of needs } @@ -1706,55 +710,41 @@ int main(int argc, char **argv) { if(treeName.Contains("invMassSigma")){ newBrancher.scaler= new EnergyScaleCorrection_class("","", smearEleFile,smearEleType); } - //data - std::cout <<"[STATUS] Adding branch " << *branch_itr << " to data..." <Write(); - delete newTree; - f.Write(); - f.Close(); - std::pair pair_tmp(treeName+"_d", new TChain(treeName+"_d")); - (tagChainMap["d"]).insert(pair_tmp); - (tagChainMap["d"])[treeName+"_d"]->SetTitle("d"); - if((tagChainMap["d"])[treeName+"_d"]->Add(TString("tmp/"+*branch_itr+"_data.root"))<=0) return 1; - // if( (tagChainMap["d"])["selected"]->AddFriend((tagChainMap["d"])[treeName])==NULL) return 2; - - //mc - std::cout <<"[STATUS] Adding branch " << *branch_itr << " to mc..." <Write(); - delete newTree; - f_mc.Write(); - f_mc.Close(); - pair_tmp = std::make_pair(treeName+"_s", new TChain(treeName+"_s")); - (tagChainMap["s"]).insert(pair_tmp); - (tagChainMap["s"])[treeName+"_s"]->SetTitle("s"); - if((tagChainMap["s"])[treeName+"_s"]->Add(TString("tmp/"+*branch_itr+"_mc.root"))<=0) return 1; - // if( (tagChainMap["s"])["selected"]->AddFriend((tagChainMap["s"])[treeName])==NULL) return 2; - } + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + if(tag_chain_itr->first.CompareTo("s")==0 || tag_chain_itr->first.CompareTo("d")==0) continue; //only data + if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + + //data + std::cout <<"[STATUS] Adding branch " << treeName << " to " << tag_chain_itr->first <first+"-"+chainFileListTag+".root"; + + TFile f(filename,"recreate"); + if (!f.IsOpen()){ + std::cerr << "[ERROR] File for branch " << treeName << " not created" << std::endl; + return 1; + } + TTree *newTree = newBrancher.AddBranch(ch,treeName+tag_chain_itr->first, treeName); + if(newTree==NULL){ + std::cerr << "[ERROR] New tree for branch " << treeName << " is NULL" << std::endl; + return 1; + } + f.cd(); + newTree->Write(); + delete newTree; + f.Write(); + f.Close(); + std::pair pair_tmp(treeName, new TChain(treeName)); + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(filename); + } //end of sample loop + } //end of branches loop if (vm.count("addPtBranches")){ TString treeName="AddedCorrPtBranches"; diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index bc8a03200a3..d80e30a018b 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -35,6 +35,16 @@ #include #include +#include +#include +#include +//#include +#include +#include +#include "RooBinning.h" +//#include "../src/ShervinMinuit.cc" +#include +#include #include @@ -156,3 +166,1041 @@ TF1* IterMinimumFit(TGraphErrors *g, RooRealVar *xVar) return f2; } + + + + + + + +//Get Profile after smearing +TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=1, bool warningEnable=true, bool trueEval=true); +TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval){ + TString name(var->GetName()); + double minValue=var->getVal(); + double minYvalue=compatibility.evaluate(); + std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << std::endl; + + //std::cout << "Prof: " << name << "\t" << minValue << "\t" << minYvalue << std::endl; + //double error=var->getError(); + + double bin_width=0., range_min=0., range_max=0., sigma=0.; + int nBin=0; + switch(level){ + case -1: + return GetProfile(var, compatibility, 5,false,false); + break; + case 0: + TGraph *g1; g1 =GetProfile(var, compatibility, 1,false); + TGraph *g2; g2 =GetProfile(var, compatibility, 2,false); + Double_t X[PROFILE_NBINS], Y[PROFILE_NBINS]; + + Int_t N_; N_=g1->GetN(); + Double_t *X_, *Y_; X_=g1->GetX(); Y_=g1->GetY(); + + for(Int_t i=0; i < N_; i++){ + X[i]=X_[i]; + Y[i] =Y_[i]; + } + nBin=N_; + N_=g2->GetN(); + X_=g2->GetX(); Y_=g2->GetY(); + + for(Int_t i=0; i < N_; i++){ + X[i+nBin]=X_[i]; + Y[i+nBin] =Y_[i]; + } + nBin+=N_; + return new TGraph(nBin,X,Y); + + break; + + case 1: + if(name.Contains("scale")){ + bin_width=0.005; + } else if(name.Contains("const")){ + bin_width=0.005; + } else if(name.Contains("alpha")){ + bin_width=0.01; + } + + range_min = var->getMin(); + range_max = var->getMax(); + + break; + case 2: + if(name.Contains("scale")){ + bin_width=0.0005; // level1/10 + sigma=10*bin_width; // + }else if(name.Contains("const")){ + bin_width=0.0005; //level1/10 + sigma=10*bin_width; // +/- 0.5% + } else if(name.Contains("alpha")){ + bin_width=0.005; + sigma=5*bin_width; // +/- 0.5% + } + + + //sigma=var->getError(); + range_min = std::max(var->getMin(), minValue - sigma); + range_max = std::min(var->getMax(), minValue + sigma); + break; + case 3: + if(name.Contains("scale")){ + bin_width=0.0001; // level2/5 + sigma=8*bin_width; // + }else if(name.Contains("const")){ + bin_width=0.0002; // level2 /3 + sigma=6*bin_width; + } else if(name.Contains("alpha")){ + bin_width=0.003; + sigma=5*bin_width; // +/- 0.5% + } + + //sigma=var->getError(); + range_min = std::max(var->getMin(), minValue - sigma); //4sigma + range_max = std::min(var->getMax(), minValue + sigma); + break; + case 4: + if(name.Contains("scale")){ + bin_width=0.0005; // level1/10 + }else if(name.Contains("const")){ + bin_width=0.001; //level1/10 + } else if(name.Contains("alpha")){ + bin_width=0.005; + } + + range_min = var->getMin(); + range_max = var->getMax(); + break; + + case 5: + if(name.Contains("scale")){ + bin_width=0.0005; // level1/10 + }else if(name.Contains("const")){ + bin_width=0.0005; //level1/10 + } else if(name.Contains("alpha")){ + bin_width=0.001; + } + range_min = var->getMin(); + range_max = var->getMax(); + break; + } + + nBin=(int)((range_max-range_min)/bin_width); + while(nBin <10){ + //std::cout << "[INFO] Updating from range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; + bin_width*=0.9; + range_min = std::max(var->getMin(),bin_width*((floor)(range_min / bin_width))- bin_width); + range_max = std::min(var->getMax(),bin_width*((floor)(range_max / bin_width))+ bin_width); + nBin=(int)((range_max-range_min)/bin_width); + //std::cout << "[INFO] Updating to range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; + if(nBin <=0) exit(1); + } + while(nBin >40 && level<4){ + bin_width*=1.1; + range_min = bin_width*((floor)(range_min / bin_width)); + range_max = bin_width*((floor)(range_max / bin_width)); + nBin=(int)((range_max-range_min)/bin_width); + } + + double chi2[PROFILE_NBINS]; + double xValues[PROFILE_NBINS]; + if(trueEval) std::cout << "------------------------------" << std::endl; + TStopwatch myClock; + myClock.Start(); + for (int iVal=0;iValsetVal(value); + xValues[iVal]=value; + if(trueEval) chi2[iVal]=compatibility.evaluate(); //-minYvalue; + else chi2[iVal]=0; + if (warningEnable && trueEval && chi2[iVal] < minYvalue ){ + std::cout << "[WARNING]: min in likelihood profile < min in MIGRAD: " << chi2[iVal]-minYvalue << " < " << minYvalue << std::endl; + std::cout << "xValue = " << value << "\t" << "[" << range_min << ":" << range_max << "]" << std::endl; + } +#ifdef DEBUG + std::cout << "value is " << chi2[iVal] << std::endl; +#endif + } + myClock.Stop(); + if(trueEval){ + std::cout << name << "\tlevel=" << level << "; nBins=" << nBin << "; range_min=" << range_min << "; range_max=" << range_max << "; bin_width=" << bin_width << "\t"; + myClock.Print(); + std::cout << "------------------------------" << std::endl; + } + + var->setVal(minValue); + TGraph *profil = new TGraph(nBin,xValues,chi2); + return profil; +} + +TTree *dataset2tree(RooDataSet *dataset){ + + const RooArgSet *args = dataset->get(); + RooArgList argList(*args); + + Double_t variables[50]; + Long64_t nEntries= dataset->numEntries(); + //nEntries=1; + TTree *tree = new TTree("tree","tree"); + tree->SetDirectory(0); + TIterator *it1=NULL; + it1 = argList.createIterator(); + int index1=0; + for(RooRealVar *var = (RooRealVar *) it1->Next(); var!=NULL; + var = (RooRealVar *) it1->Next(),index1++){ + TString name(var->GetName()); + name.ReplaceAll("-","_"); + tree->Branch(name, &(variables[index1]), name+"/D"); + } + + // tree->Print(); + + for(Long64_t jentry=0; jentryget(jentry))); + it = argList1.createIterator(); + //(dataset->get(jentry))->Print(); + int index=0; + for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; + var = (RooRealVar *) it->Next(), index++){ + variables[index]=var->getVal(); + //var->Print(); + } + + delete it; + tree->Fill(); + } + + // tree->Print(); + return tree; +} + +TMatrixDSym* GetCovariance( RooStats::MarkovChain *chain, TString var1, TString var2){ + +// RooRealVar *nll = chain->GetNLLVar(); +// //RooRealVar *weight= chain->GetWeightVar(); +// RooFormulaVar newWeight("f","","-@0",*nll); + + const RooArgSet *args = chain->Get(); + RooArgSet newArg; +// RooArgSet oldArg; +// oldArg.add(*(args->find(var1))); +// oldArg.add(*(args->find(var2))); +// oldArg.add(*nll); +// oldArg.Print(); + newArg.add(*(args->find(var1))); + newArg.add(*(args->find(var2))); +// newArg.Print(); +// //newArg.add(*nll); +// //newArg.add(newWeight); + +// RooDataSet dataset("dataset","", chain->GetAsDataSet(), RooArgSet(oldArg,newWeight), "", newWeight.GetName()); + chain->GetAsDataSet()->covarianceMatrix()->Print(); + return chain->GetAsDataSet()->covarianceMatrix(); +} + +bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, + Double_t min_old, Double_t& min, long unsigned int nIter, bool update=true){ + Double_t chi2, chi2init=smearer.evaluate(); + bool changed=false; + + TStopwatch myClock; + myClock.Start(); + + Double_t v1=var1->getVal(); + Double_t v2=var2->getVal(); + + // fix the scales to constant! + RooArgSet floatingVars; + RooArgList argList_(smearer.GetParams()); + TIterator *it_ = argList_.createIterator(); + for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ + if (var->isConstant() || !var->isLValue()) continue; + TString name(var->GetName()); + if(name!=var1->GetName() && name!=var2->GetName()){ + floatingVars.add(*var); + var->setConstant(); + } + } + delete it_; + + //creating MCMC proposal + RooStats::ProposalHelper ph; + ph.SetVariables(smearer.GetParams()); + if(iProfile>1){ + ph.SetCovMatrix(*smearer._markov.GetAsDataSet()->covarianceMatrix(smearer.GetParams())); ////*GetCovariance(&smearer._markov, var1->GetName(), var2->GetName())); + ph.SetUniformFraction(0.2/iProfile); + if(iProfile==2) ph.SetWidthRangeDivisor(5); + if(iProfile==3) ph.SetWidthRangeDivisor(20); + }else{ + ph.SetUniformFraction(1); + ph.SetWidthRangeDivisor(1); + } + + //running the mcmc + RooStats::MetropolisHastings MCMC(smearer, smearer.GetParams(), *(ph.GetProposalFunction()), nIter); + MCMC.SetNumBurnInSteps(10); + MCMC.SetSign(RooStats::MetropolisHastings::kNegative); + MCMC.SetType(RooStats::MetropolisHastings::kLog); + RooStats::MarkovChain *mcChain = (MCMC.ConstructChain()); + + //taking the results + RooDataSet *dataset = mcChain->GetAsDataSet(); + TTree *tree=dataset2tree(dataset); + TString nllVarName=mcChain->GetNLLVar()->GetName(); + chi2= tree->GetMinimum(nllVarName); + std::cout << "[DEBUG] chi2 = tree->GetMinimum(nllVarName): " << chi2 << std::endl; + TString selMin=nllVarName+" == "; selMin+=chi2; + + tree->Draw(">>entrylist",selMin,"entrylist"); + TEntryList *entrylist=(TEntryList*) gROOT->FindObject("entrylist"); + if(entrylist->GetN()!=1){ + std::cout << "Entrylist N=" << entrylist->GetN() << std::endl; + return ""; + } + Long64_t minEntry = entrylist->GetEntry(0); + + TString var1Name=var1->GetName(); var1Name.ReplaceAll("-","_"); + TString var2Name=var2->GetName(); var2Name.ReplaceAll("-","_"); + + TObjArray *branchArray = tree->GetListOfBranches(); + for(int i=0; i < branchArray->GetEntriesFast(); i++){ + TBranch *b= (TBranch *) branchArray->At(i); + TString name=b->GetName(); + if(name!=var1Name && name!=var2Name) continue; + Double_t address; + b->SetAddress(&address); + b->GetEntry(minEntry); + if(name==var1Name) var1->setVal(address); + else var2->setVal(address); + } + + chi2=smearer.evaluate(); // local minimum + + if(chi2GetName() << "\t" << var1->getVal() << std::endl + << " " << var2->GetName() << "\t" << var2->getVal() << std::endl + << " " << min-chi2init << "\t" << chi2-chi2init << "\t" << chi2init << std::endl; + changed=true; + } else { + if(chi2GetName() << "\t" << var1->getVal() << std::endl + << " " << var2->GetName() << "\t" << var2->getVal() << std::endl + << " " << min-chi2init << "\t" << chi2-chi2init << std::endl; + var1->setVal(v1); + var2->setVal(v2); + std::cout + << " " << var1->GetName() << "\t" << var1->getVal() << std::endl + << " " << var2->GetName() << "\t" << var2->getVal() << std::endl + << " " << min-chi2init << std::endl; + } + } + + std::cout << "------------------------------" << std::endl; + myClock.Stop(); + myClock.Print(); + std::cout << "------------------------------" << std::endl; + + // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; + + + + //floating the scales + RooArgList argList(floatingVars); + it_ = argList.createIterator(); + for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ + var->setConstant(kFALSE); + } + delete it_; + + delete mcChain; + delete tree; + delete entrylist; + + return changed; +} + + +void Smooth(TH2F *h, Int_t ntimes, Option_t *option) +{ + Double_t k5a[5][5] = { { 0, 0, 1, 0, 0 }, + { 0, 2, 2, 2, 0 }, + { 1, 2, 5, 2, 1 }, + { 0, 2, 2, 2, 0 }, + { 0, 0, 1, 0, 0 } }; + Double_t k5b[5][5] = { { 0, 1, 2, 1, 0 }, + { 1, 2, 4, 2, 1 }, + { 2, 4, 8, 4, 2 }, + { 1, 2, 4, 2, 1 }, + { 0, 1, 2, 1, 0 } }; + Double_t k3a[3][3] = { { 0, 1, 0 }, + { 1, 2, 1 }, + { 0, 1, 0 } }; + + // if (ntimes > 1) { + // Warning("Smooth","Currently only ntimes=1 is supported"); + // } + TString opt = option; + opt.ToLower(); + Int_t ksize_x=5; + Int_t ksize_y=5; + Double_t *kernel = &k5a[0][0]; + if (opt.Contains("k5b")) kernel = &k5b[0][0]; + if (opt.Contains("k3a")) { + kernel = &k3a[0][0]; + ksize_x=3; + ksize_y=3; + } + + // find i,j ranges + Int_t ifirst = h->GetXaxis()->GetFirst(); + Int_t ilast = h->GetXaxis()->GetLast(); + Int_t jfirst = h->GetYaxis()->GetFirst(); + Int_t jlast = h->GetYaxis()->GetLast(); + + // Determine the size of the bin buffer(s) needed + //Double_t nentries = h->GetEntries(); + Int_t nx = h->GetNbinsX(); + Int_t ny = h->GetNbinsY(); + Int_t bufSize = (nx+2)*(ny+2); + Double_t *buf = new Double_t[bufSize]; + Double_t *ebuf = 0; + if (h->GetSumw2()->fN) ebuf = new Double_t[bufSize]; + + // Copy all the data to the temporary buffers + Int_t i,j,bin; + for (i=ifirst; i<=ilast; i++){ + for (j=jfirst; j<=jlast; j++){ + bin = h->GetBin(i,j); + buf[bin] =h->GetBinContent(bin); + if (ebuf) ebuf[bin]=h->GetBinError(bin); + } + } + + // Kernel tail sizes (kernel sizes must be odd for this to work!) + Int_t x_push = (ksize_x-1)/2; + Int_t y_push = (ksize_y-1)/2; + + // main work loop + for (i=ifirst; i<=ilast; i++){ + for (j=jfirst; j<=jlast; j++) { + Double_t content = 0.0; + Double_t error = 0.0; + Double_t norm = 0.0; + if(h->GetBinContent(i,j)<=0) continue; + for (Int_t n=0; n= 1) && (xb <= nx) && (yb >= 1) && (yb <= ny)) { + bin = h->GetBin(xb,yb); + if(buf[bin]>0){ + Double_t k = kernel[n*ksize_y +m]; + //if ( (k != 0.0 ) && (buf[bin] != 0.0) ) { // General version probably does not want the second condition + if ( k != 0.0 ) { + norm += k; + content += k*buf[bin]; + if (ebuf) error += k*k*buf[bin]*buf[bin]; + } + } + } + } + } + + if ( norm != 0.0 ) { + h->SetBinContent(i,j,content/norm); + if (ebuf) { + error /= (norm*norm); + h->SetBinError(i,j,sqrt(error)); + } + } + } + } + //fEntries = nentries; + + delete [] buf; + delete [] ebuf; +} + + +Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL){ + var->setVal(X[iMinStart]); + Double_t chi2, chi2init=smearer.evaluate(); + + Double_t locmin=1e20; + Int_t iLocMin=iMinStart; + std::queue chi2old; + Double_t NY[200]={0.}; + + for(Int_t i =iMinStart; i setVal(X[i]); + chi2=smearer.evaluate(); + if(Y!=NULL){ + Y[i] += chi2; + NY[i]++; + } +#ifdef DEBUG + if(update==true) + std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; +#endif + if(chi2<=locmin){ //local minimum + iLocMin=i; + locmin=chi2; + } + + if(!chi2old.empty() && chi22 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} + if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} + if(chi2old.size()>4){ + if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm + if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100) break; // jump to the next constTerm + if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >150) break; + } + + chi2old.push(chi2); + } + + while(!chi2old.empty()){ + chi2old.pop(); + } + for(Int_t i =iMinStart; i >=0; i--){ //loop versus positive side + var->setVal(X[i]); + chi2=smearer.evaluate(); + if(Y!=NULL){ + Y[i] += chi2; + NY[i]++; + } + +#ifdef DEBUG + if(update==true) + std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; +#endif + if(chi2<=locmin){ //local minimum + iLocMin=i; + locmin=chi2; + } + + if(!chi2old.empty() && chi22 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} + if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} + if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} + if(chi2old.size()>4){ + if(chi2-chi2old.back() >80 && chi2-locmin >100){ std::cout << "stop 5" << std::endl; break;} + if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100){ std::cout << "stop 6" << std::endl; break;} + if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>50 && chi2-locmin >100){ std::cout << "stop 7" << std::endl; break;} + } + chi2old.push(chi2); + } + + if(Y!=NULL){ //take the mean! + for(Int_t i =0; i < N; i++){ + if(NY[i]!=0) Y[i] /= NY[i]; + } + } + + return iLocMin; +} + + +/** + min is updated + */ +bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, + Double_t min_old, Double_t& min, bool update=true){ + if(iProfile==2) iProfile=-1; + if(iProfile>2) return false; + //smearer.SetNSmear(0,10); + bool changed=false; + std::cout << "------------------------------ MinProfile2D: iProfile==" << iProfile << std::endl; + std::cout << "--------------------------------- GetProfile for " << var1->GetName() << std::endl; + TGraph *g1 = GetProfile(var1, smearer, iProfile, false, false); // take only the binning + std::cout << "--------------------------------- GetProfile for " << var2->GetName() << std::endl; + TGraph *g2 = GetProfile(var2, smearer, iProfile, false, false); // take only the binning + + + Double_t *X1 = g1->GetX(); + Double_t *X2 = g2->GetX(); + Int_t N1 = g1->GetN(); + Int_t N2 = g2->GetN(); + Double_t *Y = new Double_t[N2]; + + std::cout << "--------------------------------- Init eval " << std::endl; + //initial values + Double_t v1=var1->getVal(); + Double_t v2=var2->getVal(); + if(var1->isConstant()){ + X1[0] = v1; + N1=1; + } + if(var2->isConstant()){ + X2[0] = v2; + N2=1; + } + + + Double_t chi2, chi2init=smearer.evaluate(); + + Double_t locmin=1e20, locminSmooth=1e20; + Int_t iLocMin1=0, iLocMin2, iLocMin2Prev=N2/3; + + TStopwatch myClock; + myClock.Start(); + + std::cout << "--------------------------------- Grid eval " << std::endl; + TH2F h("hist2","",N1,0,N1,N2,0,N2); + for(Int_t i1 =0; i1 setVal(X1[i1]); + std::queue chi2old; + + iLocMin2Prev = FindMin1D(var2, X2, N2, iLocMin2Prev, locmin, smearer, true, Y); + for(Int_t i2=0; i2 < N2; i2++){ +#ifdef DEBUG + if(Y[i2]!=0) std::cout << i1 << "\t" << i2 << "\t" << X1[i1] << "\t" << X2[i2] << "\t" << Y[i2]; +#endif + h.Fill(i1,i2,Y[i2]); +#ifdef DEBUG + if(Y[i2]!=0) std::cout << "\t" << h.GetBinContent(i1+1,i2+1) << std::endl; +#endif + } + + var2->setVal(X2[iLocMin2Prev]); + chi2=smearer.evaluate(); + +#ifndef smooth + if(update==true || true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; +#endif + if(chi2<=locmin){ //local minimum + iLocMin1=i1; + iLocMin2=iLocMin2Prev; + locmin=chi2; + } + } + + // reset to initial value + var1->setVal(v1); + var2->setVal(v2); + +#ifdef smooth + Smooth(&h, 1, "k3a"); + for(Int_t i1=0; i10){ + if(update==true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locminSmooth-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(content>0 && locminSmooth > content){ + locminSmooth=content; + iLocMin1=i1; + iLocMin2=i2; + } + } + } + } + locmin=locminSmooth; +#endif + if(update && locminGetName() << "\t" << v1 << " -> " << X1[iLocMin1] << std::endl + << " " << var2->GetName() << "\t" << v2 << " -> " << X2[iLocMin2] << std::endl + << " " << min << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + var1->setVal(X1[iLocMin1]); + var2->setVal(X2[iLocMin2]); + } else{ + std::cout << "[INFO] Not-Updating variable:" << std::endl + << " " << var1->GetName() << "\t" << v1 << " -> " << X1[iLocMin1] << std::endl + << " " << var2->GetName() << "\t" << v2 << " -> " << X2[iLocMin2] << std::endl + << " " << min << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + } + + std::cout << "------------------------------" << std::endl; + myClock.Stop(); + std::cout << var1->GetName() << "\tlevel=" << iProfile << "; nBins=" << N1 << "; range_min=" << X1[0] << "; range_max=" << X1[N1-1] << "; bin_width=" << X1[1]-X1[0] << std::endl; + std::cout << var2->GetName() << "\tlevel=" << iProfile << "; nBins=" << N2 << "; range_min=" << X2[0] << "; range_max=" << X2[N2-1] << "; bin_width=" << X2[1]-X2[0] << std::endl; + myClock.Print(); + std::cout << "------------------------------" << std::endl; + + // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; + // smearer.SetNSmear(0,1); + delete g1; + delete g2; + delete Y; + return changed; +} + + + + +bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, + Double_t min_old, Double_t& min){ + bool changed=false; + std::cout << "[STATUS] Starting MinProfile for " << var->GetName() << "\t" << iProfile << std::endl; + TGraph *profil = GetProfile(var, smearer, iProfile, false); + TGraphErrors g(profil->GetN(),profil->GetX(), profil->GetY()); + + + Double_t *X = g.GetX(); + Double_t *Y = g.GetY(); + Int_t N = g.GetN(); + Double_t chi2=Y[0]; + Double_t chi2init=smearer.evaluate(); + //Int_t iMin = 1; //, iLow=1, iHigh=1; + Int_t iMin_=1; // minimum of the graph + //find minimum + for(Int_t i =0; i GetName() << ": " << i << " " << X[i] << " " << Y[i]-chi2init << " " << chi2-chi2init << " " << min-chi2 << std::endl; + } + + if(chi2getVal() != X[iMin_]) changed=true; //the value has been updated, need a new iteration + } + + if(chi2< chi2init && (iMin_<=1 || iMin_>=N-1)){ // on the border, need a new iteration + var->setVal(X[iMin_]); + std::cout << "[INFO] Minimized at the border of the interval: need another iteration" << std::endl; + MinProfile(var, smearer, iProfile, min_old, min); + changed=true; + return changed; + } + + if(minGetName() << "\t" << X[iMin_] + << " " << min << " " << Y[iMin_]-min << std::endl; + var->setVal(X[iMin_]); + //var->setError(newError); + } else{ + std::cout << "[INFO] Not-Updating variable:" << var->GetName() << "\t" << X[iMin_] + << " " << min << " " << Y[iMin_]-min << std::endl; + } + std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; + + delete profil; + return changed; +} + +void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int nIterMCMC, bool mcmc=false){ + std::cout << "[INFO] Minimization: profile" << std::endl; + std::cout << "[INFO] Re-initialize nllMin: 1e20" << std::endl; + smearer.nllMin=1e20; + Double_t min_old = 9999999999.; + Double_t min = 999999999.; + bool updateError = false; + int nIter=0; + TStopwatch myClock; + myClock.Start(); + + RooArgList argList_(args); + TIterator *it_ = NULL; + while((min < min_old || updateError==true) && nIter <1){ + updateError=false; + TStopwatch iterClock; + iterClock.Start(); + if(min < min_old) min_old=min; + it_ = argList_.createIterator(); + for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ + if (var->isConstant() || !var->isLValue()) continue; + TString name(var->GetName()); + if(!name.Contains("scale")) continue; // looping only for the scale + for(int iProfile=1; iProfile<2; iProfile++){ + updateError += MinProfile(var, smearer, iProfile, min_old, min); + } + } + delete it_; + iterClock.Stop(); + std::cout << "[INFO] nIter scale: " << nIter; + iterClock.Print(); + nIter++; + } + + + //minimization of additional smearing + updateError=true; + min_old=min; + nIter=0; + while((min < min_old || updateError==true) && nIter <2){ + updateError=false; + TStopwatch iterClock; + iterClock.Start(); + if(min < min_old) min_old=min; + + it_= argList_.createIterator(); + for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ + if (var->isConstant() || !var->isLValue()) continue; + TString name(var->GetName()); + if(!name.Contains("scale")) continue; // looping only for the scale + for(int iProfile=2; iProfile<4; iProfile++){ + updateError += MinProfile(var, smearer, iProfile, min_old, min); + } + } + delete it_; + iterClock.Stop(); + std::cout << "[INFO] nIter fine scale: " << nIter; + iterClock.Print(); + nIter++; + } + + updateError=true; + min_old = min; + nIter=0; + while((min < min_old && nIter < 5) || (updateError==true && nIter <2)){ + updateError=false; + TStopwatch iterClock; + iterClock.Start(); + it_= argList_.createIterator(); + if(min < min_old) min_old=min; + for(RooRealVar *var = (RooRealVar*)it_->Next(); var!=NULL; var = (RooRealVar*)it_->Next()){ + if (var->isConstant()) continue; + TString name(var->GetName()); + + // special part for alpha fitting + TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); + RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList_.find(alphaName): NULL; + if(name.Contains("alpha")) continue; + //if(var2!=NULL && var2->isConstant()) var2=NULL; // to use MinProfile 1D instead of 2D + //taking large profile + for(int iProfile=2; iProfile<4; iProfile++){ + if(var2==NULL) MinProfile(var, smearer, iProfile, min_old, min); //updateError += MinProfile(var, smearer, iProfile, min_old, min); + else { + if(mcmc && iProfile>2) updateError += MinMCMC2D(var, var2, smearer, iProfile, min_old, min, nIterMCMC); + else updateError+=MinProfile2D(var, var2, smearer, iProfile, min_old, min); + } + } + } + delete it_; + iterClock.Stop(); + std::cout << "[DEBUG] nIter= " << nIter << "\t"; iterClock.Print(); + nIter++; + smearer.GetParams().writeToStream(std::cout, kFALSE); + } +} + + + +class ShervinMinuit: public PdfProposal { + +public: + //inline ShervinMinuit(){}; + //ShervinMinuit(int nBurnSteps); + ShervinMinuit(int nBurnSteps, RooSmearer& smearer); + + ProposalHelper *ph; + ProposalFunction* proposal; + void Propose(RooArgSet& xPrime, RooArgSet& x); + inline Bool_t IsSymmetric(RooArgSet& xPrime, RooArgSet& x){return true;}; //proposal->IsSymmetric(xPrime,x);}; + inline Double_t GetProposalDensity(RooArgSet& xPrime, RooArgSet& x){return 0;}; //proposal->GetProposalDensity(xPrime, x);}; + + inline void SetMinuit(RooMinuit& m){_m = &m;}; +private: + int _nBurnSteps; + int _iStep; + int _iBurnStep; + RooMinuit* _m; + + + RooSmearer& _smearer; + //RooArgSet& _params; + RooArgSet _paramSet; + RooStats::UniformProposal propUnif; + RooMultiVarGaussian *gausPdf; + TRandom3 gen; + std::vector rmsHist; + float fSigmaRangeDivisor; +}; + + +ShervinMinuit::ShervinMinuit(int nBurnSteps, RooSmearer& smearer): + _smearer(smearer),gausPdf(NULL), gen(1245), fSigmaRangeDivisor(-1) + // _params(smearer.GetParams()) +{ + + _iStep =0; + + _nBurnSteps = nBurnSteps; + + RooArgList argList(smearer.GetParams()); + TIterator *it = argList.createIterator(); + std::cout << "###############################" << std::endl; + for(RooRealVar *v = (RooRealVar*)it->Next(); v!=NULL; v = (RooRealVar*)it->Next()){ + if(! v->isConstant()){ + _paramSet.add((*v)); + rmsHist.push_back(new TH1F(v->GetName(),"",1000, v->getMin(), v->getMax())); + } + } + delete it; + // _paramSet.Print(); +// ph = new ProposalHelper(); +// ph->SetVariables(_paramSet); +// ph->SetUpdateProposalParameters(kTRUE); // auto-create mean vars and add mappings +// ph->SetUniformFraction(1); +// ph->SetCluesFraction(0); +// ph->SetWidthRangeDivisor(100); + // proposal = ph->GetProposalFunction(); + + RooArgList xVec(_paramSet); + Int_t size = xVec.getSize(); + Float_t fSigmaRangeDivisor = 100; + TMatrixDSym *fCovMatrix = new TMatrixDSym(size); + RooRealVar* r; + for (Int_t i = 0; i < size; i++) { + r = (RooRealVar*)xVec.at(i); + Double_t range = r->getMax() - r->getMin(); + (*fCovMatrix)(i,i) = range / fSigmaRangeDivisor; + } + +// gausPdf = new RooMultiVarGaussian("multiVar","", RooArgList(_paramSet), *fCovMatrix); +// gausPdf->initGenerator(12345); +// gausPdf-> generateEvent(1); +// SetPdf(*gausPdf); + +// // gausPdf->generate(_paramSet,10)->Print(); +// SetCacheSize(10); + //proposal = ph->GetProposalFunction(); + //proposal = &propUnif; + //_iBurnStep = (int) _nBurnSteps/100; + //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/10; + //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/5; +} + + +void ShervinMinuit::Propose(RooArgSet& xPrime, RooArgSet& x){ + TIterator *it=NULL; +// RooRealVar v1("v1","",0.01,0,0.04); +// RooRealVar v2("v2","",0.02,0,0.04); +// RooArgSet arg1(v1); +// RooArgSet arg2(v2); + + if(_iStep==20){ + fSigmaRangeDivisor=4; + RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); + float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + } + else if(_iStep==50){ + fSigmaRangeDivisor=10; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; + RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); + float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + + } + else if(_iStep==80){ + fSigmaRangeDivisor=15; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; + RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); + float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + var = (RooRealVar *)x.find("scale_EB-absEta_0_1-gold-Et_25"); + varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + + // } else if(_iStep==100){ +// fSigmaRangeDivisor=20; +// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; +// RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); +// float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; +// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor +// << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr +// << std::endl; + + } + + + //else if(_iStep==100) fSigmaRangeDivisor=10; + + it = RooArgList(xPrime).createIterator(); + int index=0; + for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; + var = (RooRealVar *) it->Next()){ + + //var->setError(var->getError()/100); + + + RooRealVar *v_x = ((RooRealVar *)x.find(var->GetName())); + rmsHist[index]->Fill(v_x->getVal()); + + float varErr = std::min(rmsHist[index]->GetRMS(), (var->getMax()-var->getMin())/fSigmaRangeDivisor); + + + if(fSigmaRangeDivisor<3) var->setVal(gen.Uniform(v_x->getMin(), v_x->getMax())); + else { + if(varErr < (var->getMax()-var->getMin())/100) std::cout << "[WARNING] " << varErr << std::endl; + var->setVal(gen.Gaus( + ((RooRealVar *)x.find(var->GetName()))->getVal(), + varErr) + ); + } + +// if(TString(var->GetName())=="constTerm_EB-absEta_0_1-gold-Et_25"){ +// std::cout << var->GetName() << "\t" << v_x->getVal() << " --> " << var->getVal() << "\t" << varErr << std::endl; +// } + index++; + } + + _iStep++; + return; + + + + if(_iStep == _nBurnSteps){ + std::cout << "Now Gaussian proposal" << std::endl; + + it = xPrime.createIterator(); + for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; + var = (RooRealVar *) it->Next()){ + //var->setError(var->getError()/100); + //float varErr = var->getVal()/100; + //if(TString(var->GetName()).Contains("constTerm")) varErr*=10; + //var->setMin(std::max(var->getMin(),var->getVal()- varErr*3)); + //var->setMax(std::min(var->getMax(),var->getVal()+ varErr*3)); + var->setMin(0.0); + var->setMax(0.05); + //var->setVal(0.03); + std::cout << var -> GetName() << "\t" << var->getError() << "\t" << var -> getMin() << "\t" << var->getMax()<< std::endl; + } + //_m->hesse(); + //RooFitResult *fitres = _m->save(); + } +} From 7dfbc08ab0b029ffe64f9193157696c07a468417 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 24 Aug 2013 19:06:28 +0200 Subject: [PATCH 152/475] changes --- ZFitter/bin/ZFitter.cpp | 95 ++++++++++++---------- ZFitter/macro/PlotDataMC.C | 93 ++++++++++++++++++++- ZFitter/script/energyScale.sh | 71 ++++++++-------- ZFitter/src/EnergyScaleCorrection_class.cc | 2 +- ZFitter/src/ZFit_class.cc | 14 ++-- 5 files changed, 192 insertions(+), 83 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 76f78083fcb..ab50694b9c7 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -296,14 +296,18 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w } nBin=(int)((range_max-range_min)/bin_width); - while(nBin <10){ + if(var->isConstant()==false){ + while(nBin <10 && nBin>1){ //std::cout << "[INFO] Updating from range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; bin_width*=0.9; range_min = std::max(var->getMin(),bin_width*((floor)(range_min / bin_width))- bin_width); range_max = std::min(var->getMax(),bin_width*((floor)(range_max / bin_width))+ bin_width); nBin=(int)((range_max-range_min)/bin_width); //std::cout << "[INFO] Updating to range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; - if(nBin <=0) exit(1); + if(nBin <=0){ + std::cout << "[ERROR] NBins < 10" << std::endl; + exit(1); + } } while(nBin >40 && level<4){ bin_width*=1.1; @@ -311,7 +315,7 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w range_max = bin_width*((floor)(range_max / bin_width)); nBin=(int)((range_max-range_min)/bin_width); } - + } double chi2[PROFILE_NBINS]; double xValues[PROFILE_NBINS]; if(trueEval) std::cout << "------------------------------" << std::endl; @@ -1672,43 +1676,50 @@ int main(int argc, char **argv) { } //read corrections directly from file - if (vm.count("corrEleType")){ + if(vm.count("corrEleType")){ std::cout << "[STATUS] Getting energy scale corrections from file: " << corrEleFile << std::endl; TString treeName="scaleEle_"+corrEleType; - if((tagChainMap["d"]).count(treeName)==0){ - if (vm.count("readDirect")){ + //std::cout<<"here, read ele corr from command line: "<first.CompareTo("d")==0 || !tag_chain_itr->first.Contains("d")) continue; //do it for each sample + if(tag_chain_itr->second.count(treeName)!=0) continue; // already have correction file + TString fpuname=corrEleTreeFileName+"-"+tag_chain_itr->first+".root"; + std::cout << "[STATUS] Saving electron scale corrections to root file:" << fpuname << std::endl; + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + std::cout << "data entries: " << ch->GetEntries() << std::endl; + TFile f(fpuname,"recreate"); + if(f.IsOpen()){ + f.cd(); + TTree *corrTree = eScaler.GetCorrTree(ch); + std::cout << "corrEle entries: " << corrTree->GetEntries() << std::endl; + + corrTree->Write(); + delete corrTree; + f.Write(); + f.Close(); + // adding pu weight also to chain "s" std::pair pair_tmp(treeName, new TChain(treeName)); - (tagChainMap["d"]).insert(pair_tmp); - (tagChainMap["d"])[treeName]->SetTitle("d"); - if((tagChainMap["d"])[treeName]->Add(TString(corrEleFile))<=0) return 1; - } - else { - //std::cout<<"here, read ele corr from command line: "<GetEntries() << std::endl; - TFile f(TString(corrEleType+".root"),"recreate"); - if(f.IsOpen()){ - TTree *corrTree = eScaler.GetCorrTree((tagChainMap["d"])["selected"]); - //corrTree->SetName("scaleEle"); - //corrTree->SetTitle(corrEleType.c_str()); - f.cd(); - corrTree->Write(); - std::cout << "corrEle entries: " << corrTree->GetEntries() << std::endl; - delete corrTree; - - f.Write(); - f.Close(); - std::pair pair_tmp(treeName, new TChain(treeName)); - (tagChainMap["d"]).insert(pair_tmp); - (tagChainMap["d"])[treeName]->SetTitle("d"); - if((tagChainMap["d"])[treeName]->Add(TString(corrEleType+".root"))<=0) return 1; - } + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(fpuname); } } - //if( (tagChainMap["d"])["selected"]->AddFriend((tagChainMap["d"])[treeName])==NULL) return 2; + } + //if( (tagChainMap["d"])["selected"]->AddFriend((tagChainMap["d"])[treeName])==NULL) return 2; + + //read corrections directly from file if (vm.count("smearEleType")){ std::cout << "[STATUS] Getting energy smearings from file: " << smearEleFile << std::endl; @@ -1772,15 +1783,16 @@ int main(int argc, char **argv) { branch_itr++){ UpdateFriends(tagChainMap); TString treeName=*branch_itr; + TString branchFileName="tmp/"+treeName+"_data.root"; if(treeName.Contains("invMassSigma")){ newBrancher.scaler= new EnergyScaleCorrection_class("","", smearEleFile,smearEleType); } //data - std::cout <<"[STATUS] Adding branch " << *branch_itr << " to data..." <Close(); if(!vm.count("plotOnly")){ Int_t oldMarkovSize=smearer._markov.Size(); - //smearer.SetNSmear(10); + //if(vm.count("profileOnly") && !vm.count("runToy")) smearer.SetNSmear(10); std::cout <<"==================PROFILE=================="<GetName()); + if(name.Contains("scale")) continue; // special part for alpha fitting double min=0.; TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList.find(alphaName): NULL; - if(var2!=NULL && name.Contains("constTerm")){ // && var2->isConstant()==false){ + if(var2!=NULL && name.Contains("constTerm") && var2->isConstant()==false){ smearer.SetDataSet(name,TString(var->GetName())+TString(var2->GetName())); - MinProfile2D(var, var2, smearer, -1, 0., min, false); + //MinProfile2D(var, var2, smearer, -1, 0., min, false); //MinMCMC2D(var, var2, smearer, 1, 0., min, 1200, false); //MinMCMC2D(var, var2, smearer, 2, 0., min, 800, false); //MinMCMC2D(var, var2, smearer, 3, 0., min, 100, false); diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 17362561d76..53838e5c07b 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -9,6 +9,7 @@ #include #include #include +#include #include "src/ElectronCategory_class.cc" #include @@ -463,6 +464,10 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn TString category, TString selection, TString dataLabel, std::vector mcLabel_vec, TString xLabel, TString yLabelUnit, bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false){ + TStopwatch watch; + watch.Start(); + + int nHist= mc_vec.size(); int colors[4]={kRed,kGreen,kBlue,0}; int fillstyle[4]={0,0,0,0}; //3003,3004,3005,3006}; @@ -474,6 +479,16 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn TString branchNameMC=branchname; ElectronCategory_class cutter; + // data->SetBranchStatus("*",0); +// std::set branchList = cutter.GetBranchNameNtuple(category); +// for(std::set::const_iterator itr = branchList.begin(); +// itr != branchList.end(); +// itr++){ +// std::cout << "[STATUS] Enabling branch: " << *itr << std::endl; +// data->SetBranchStatus(*itr, 1); +// } +// data->SetBranchStatus("invMass_SC_regrCorrSemiParV4_ele", 1); +// data->SetBranchStatus("invMass_SC_regrCorrSemiParV5_ele", 1); TCut selection_data=""; if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0); selection_data+=selection; @@ -505,6 +520,17 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn mc_itr != mc_vec.end(); mc_itr++){ TChain *mc = *mc_itr; +// mc->SetBranchStatus("*",0); +// for(std::set::const_iterator itr = branchList.begin(); +// itr != branchList.end(); +// itr++){ +// //std::cout << "[STATUS] Enabling branch: " << *itr << std::endl; +// mc->SetBranchStatus(*itr, 1); +// } +// mc->SetBranchStatus("invMass_SC_regrCorrSemiParV4_ele", 1); +// mc->SetBranchStatus("invMass_SC_regrCorrSemiParV5_ele", 1); +// mc->SetBranchStatus("puWeight",1); + TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; if(usePU) mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *"puWeight"); else mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC); @@ -609,7 +635,8 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn pv->SetBorderSize(0); pv->Draw(); - + watch.Stop(); + watch.Print(); return c; } @@ -635,3 +662,67 @@ std::vector MakeChainVector(TChain *v1){ vec.push_back(v1); return vec; } + + +// TH2F *PlotDataMCs(TChain *data, TString branchname, +// TString category, TString selection, +// bool usePU=true, bool smear=false, bool scale=false){ + +// ElectronCategory_class cutter; +// TCut selection_data=""; +// if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0); +// selection_data+=selection; + +// if(smear){ +// branchNameMC.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(smearEle[0]*smearEle[1]))"); +// branchNameMC.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*smearEle) "); +// branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*smearEle[0])"); +// branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*smearEle[1])"); + +// } +// if(scale){ +// branchNameData.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(corrEle[0]*corrEle[1]))"); +// branchNameData.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*corrEle)"); +// branchNameData.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*corrEle[0])"); +// branchNameData.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*corrEle[1])"); +// } + +// // Draw histograms +// TString branchNameData=branchname; +// data->Draw(branchNameData+">>eventlist", selection_data,"eventlist"); +// TEventList *evlist = (TEventList*) gROOT->FindObject("eventlist"); +// data->SetEventList(evlist); + +// TTreeFormula *selector_ele1 = new TTreeFormula("selector", branchNameData, data); +// TTreeFormula *selector_ele2 = new TTreeFormula("selector", branchNameData.ReplaceAll("[0]","[1]"), data); + +// Long64_t entries = entryList->GetN(); +// std::cout << "___ ENTRIES: " << entries << std::endl; +// data->LoadTree(chain->GetEntryNumber(0)); +// Long64_t treenumber=-1; + +// branchname="seedXSCEle:seedYSCEle"; +// binning="(360,1,361,171,-85,86)"; +// // yLabel="iEta"; +// // xLabel="iPhi"; +// // c->SetGridx(); + +// Float_t iPhi[2], iEta[2]; +// data->SetBranchAddress("seedYSCEle", iPhi); +// data->SetBranchAddress("seedXSCEle", iEta); +// double sum[360][171]=0, sum2[360][171]=0; +// for(Long64_t jentry=0; jentry < entries; jentry++){ +// Long64_t entryNumber= data->GetEntryNumber(jentry); +// data->GetEntry(entryNumber); +// if (data->GetTreeNumber() != treenumber) { +// treenumber = data->GetTreeNumber(); +// selector_ele1->UpdateFormulaLeaves(); +// selector_ele2->UpdateFormulaLeaves(); +// } +// double value=selector_ele1->EvalInstance(); + +// sum+=value; +// sum2+=value*value; +// } + +// } diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index eeb35902060..767103c4919 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -251,51 +251,52 @@ if [ -n "${STEP4}" ];then if [ ! -e "${outDirData}/step4/fitres" ];then mkdir ${outDirData}/step4/fitres -p; fi if [ ! -e "${outDirData}/step4/img" ];then mkdir ${outDirData}/step4/img -p; fi - regionFile=data/regions/scaleStep4smearing_0.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ - --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --profileOnly --initFile=init.txt \ - > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 +# regionFile=data/regions/scaleStep4smearing_0.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ +# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ +# --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ +# > ${outDirData}/log/step4_0-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - regionFile=data/regions/scaleStep4smearing_0a.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ - --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --profileOnly --initFile=init.txt \ - > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 +# regionFile=data/regions/scaleStep4smearing_0a.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ +# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ +# --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ +# > ${outDirData}/log/step4smearing_0a-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - regionFile=data/regions/scaleStep4smearing_1.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ - --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --profileOnly --initFile=init.txt \ - > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 +# regionFile=data/regions/scaleStep4smearing_1.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ +# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ +# --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ +# > ${outDirData}/log/step4smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 +# #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 - # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_1.txt - # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_1.root - # cp ${outDirData}/step4/fitres/outProfile.root ${outDirData}/step4/fitres/outProfile_step4smearing_1.root +# # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_1.txt +# # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_1.root +# # cp ${outDirData}/step4/fitres/outProfile.root ${outDirData}/step4/fitres/outProfile_step4smearing_1.root regionFile=data/regions/scaleStep4smearing_2.dat # --initFile=${outDirData}/step4/fitres/params.txt \ - + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --profileOnly --initFile=init.txt \ - > ${outDirData}/log/step4-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ + --addBranch smearerCat \ + > ${outDirData}/log/step4smearing_2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_2.txt # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_2.root @@ -387,6 +388,8 @@ if [ -n "${STEP1Stability}" ];then --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y peak || exit 1 ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y scaledWidth || exit 1 + ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ + --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y peak --allRegions || exit 1 fi diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 2f044f9c62f..4bf713835a7 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -1,5 +1,5 @@ #include "../interface/EnergyScaleCorrection_class.h" -//#define DEBUG +#define DEBUG // for exit(0) #include diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index 84ac254a7e5..0de4c4b3c78 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -727,16 +727,16 @@ void ZFit_class::FitToy(TString region, int nToys, int nEvents, bool doPlot){ BW_CB_pdf_class tempconvBwCbPdf(invMass); - RooAbsPdf *fit_pdf = &(tempconvBwCbPdf.GetPdf()); //with original initial values + RooAbsPdf *generator_pdf = &(tempconvBwCbPdf.GetPdf()); //with original initial values // cout <<"before reading"<find("\\gamma"))->getVal()<find("\\Delta m"))->getVal()<plotOn(plot, RooFit::LineColor(kRed)); @@ -762,6 +762,7 @@ void ZFit_class::FitToy(TString region, int nToys, int nEvents, bool doPlot){ int numcpu=4; for (int i = 0; i < nToys; ++i){ RooDataSet* toydata = generator_pdf->generate(invMass, nEvents); + SetFitPar(); RooFitResult *fitres_Toy = fit_pdf->fitTo(*toydata,RooFit::Save(), //RooFit::Range(range.c_str()), RooFit::NumCPU(numcpu), RooFit::Verbose(kFALSE),RooFit::PrintLevel(-1), @@ -782,8 +783,9 @@ void ZFit_class::FitToy(TString region, int nToys, int nEvents, bool doPlot){ int numcpu=2; for (int i = 0; i < nToys; ++i){ RooDataHist* toydata = generator_pdf->generateBinned(invMass, nEvents); - - std::cout <<"init gamma: "<fitTo(*toydata,RooFit::Save(), //RooFit::Range(range.c_str()), RooFit::NumCPU(numcpu), RooFit::Verbose(kFALSE),RooFit::PrintLevel(-1), From 3b98bd25f8a7f89ce9fd582b92abe3946dd4a6a1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 24 Aug 2013 19:46:29 +0200 Subject: [PATCH 153/475] fixes --- ZFitter/bin/ZFitter.cpp | 20 +- ZFitter/src/nllProfile.cc | 391 +++++++++++++++++++------------------- 2 files changed, 206 insertions(+), 205 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 1d6a260b884..dc258d1969e 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -22,18 +22,18 @@ #include "../interface/RooSmearer.hh" #include -#include -#include +//#include +//#include //#include #include #include #include "RooBinning.h" //#include "../src/ShervinMinuit.cc" -#include +//#include #include #include "Math/Minimizer.h" -//#include "../interface/RooMinimizer.hh" +#include "../interface/RooMinimizer.hh" #include #include @@ -49,7 +49,7 @@ //#define DEBUG #define smooth #include "../src/nllProfile.cc" -using namespace std; +//using namespace std; using namespace RooStats; /** @@ -625,7 +625,7 @@ int main(int argc, char **argv) { if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; TChain *ch = (tag_chain_itr->second.find("selected"))->second; TString treeName="pileup"; - TString fileame="tmp/mcPUtree"+tag_chain_itr->first+".root"; + TString filename="tmp/mcPUtree"+tag_chain_itr->first+".root"; TFile f(filename,"recreate"); if(f.IsOpen()){ f.cd(); @@ -654,7 +654,7 @@ int main(int argc, char **argv) { tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ if(tag_chain_itr->first.CompareTo("d")==0 || !tag_chain_itr->first.Contains("d")) continue; //only data - if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present TChain *ch = (tag_chain_itr->second.find("selected"))->second; TString filename="tmp/scaleEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; @@ -696,7 +696,7 @@ int main(int argc, char **argv) { tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ if(tag_chain_itr->first.CompareTo("d")==0 || !tag_chain_itr->first.Contains("d")) continue; //only data - if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present TChain *ch = (tag_chain_itr->second.find("selected"))->second; TString filename="tmp/scaleEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; @@ -736,7 +736,7 @@ int main(int argc, char **argv) { tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //only data - if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present TChain *ch = (tag_chain_itr->second.find("selected"))->second; TString filename="tmp/smearEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; @@ -783,7 +783,7 @@ int main(int argc, char **argv) { tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ if(tag_chain_itr->first.CompareTo("s")==0 || tag_chain_itr->first.CompareTo("d")==0) continue; //only data - if(tag_chaint_itr->second.count(treeName)!=0) continue; //skip if already present + if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present TChain *ch = (tag_chain_itr->second.find("selected"))->second; //data diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index d80e30a018b..bdc38cc351b 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -51,6 +51,202 @@ #define FIT_LIMIT 0.01 #define ITER_MAX 20 +#ifndef ShervinMinuit_ +#define ShervinMinuit_ +class ShervinMinuit: public RooStats::PdfProposal { + +public: + //inline ShervinMinuit(){}; + //ShervinMinuit(int nBurnSteps); + ShervinMinuit(int nBurnSteps, RooSmearer& smearer); + + RooStats::ProposalHelper *ph; + RooStats::ProposalFunction* proposal; + void Propose(RooArgSet& xPrime, RooArgSet& x); + inline Bool_t IsSymmetric(RooArgSet& xPrime, RooArgSet& x){return true;}; //proposal->IsSymmetric(xPrime,x);}; + inline Double_t GetProposalDensity(RooArgSet& xPrime, RooArgSet& x){return 0;}; //proposal->GetProposalDensity(xPrime, x);}; + + inline void SetMinuit(RooMinuit& m){_m = &m;}; +private: + int _nBurnSteps; + int _iStep; + int _iBurnStep; + RooMinuit* _m; + + + RooSmearer& _smearer; + //RooArgSet& _params; + RooArgSet _paramSet; + RooStats::UniformProposal propUnif; + RooMultiVarGaussian *gausPdf; + TRandom3 gen; + std::vector rmsHist; + float fSigmaRangeDivisor; +}; +#endif + +ShervinMinuit::ShervinMinuit(int nBurnSteps, RooSmearer& smearer): + _smearer(smearer),gausPdf(NULL), gen(1245), fSigmaRangeDivisor(-1) + // _params(smearer.GetParams()) +{ + + _iStep =0; + + _nBurnSteps = nBurnSteps; + + RooArgList argList(smearer.GetParams()); + TIterator *it = argList.createIterator(); + std::cout << "###############################" << std::endl; + for(RooRealVar *v = (RooRealVar*)it->Next(); v!=NULL; v = (RooRealVar*)it->Next()){ + if(! v->isConstant()){ + _paramSet.add((*v)); + rmsHist.push_back(new TH1F(v->GetName(),"",1000, v->getMin(), v->getMax())); + } + } + delete it; + // _paramSet.Print(); +// ph = new ProposalHelper(); +// ph->SetVariables(_paramSet); +// ph->SetUpdateProposalParameters(kTRUE); // auto-create mean vars and add mappings +// ph->SetUniformFraction(1); +// ph->SetCluesFraction(0); +// ph->SetWidthRangeDivisor(100); + // proposal = ph->GetProposalFunction(); + + RooArgList xVec(_paramSet); + Int_t size = xVec.getSize(); + Float_t fSigmaRangeDivisor = 100; + TMatrixDSym *fCovMatrix = new TMatrixDSym(size); + RooRealVar* r; + for (Int_t i = 0; i < size; i++) { + r = (RooRealVar*)xVec.at(i); + Double_t range = r->getMax() - r->getMin(); + (*fCovMatrix)(i,i) = range / fSigmaRangeDivisor; + } + +// gausPdf = new RooMultiVarGaussian("multiVar","", RooArgList(_paramSet), *fCovMatrix); +// gausPdf->initGenerator(12345); +// gausPdf-> generateEvent(1); +// SetPdf(*gausPdf); + +// // gausPdf->generate(_paramSet,10)->Print(); +// SetCacheSize(10); + //proposal = ph->GetProposalFunction(); + //proposal = &propUnif; + //_iBurnStep = (int) _nBurnSteps/100; + //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/10; + //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/5; +} + + +void ShervinMinuit::Propose(RooArgSet& xPrime, RooArgSet& x){ + TIterator *it=NULL; +// RooRealVar v1("v1","",0.01,0,0.04); +// RooRealVar v2("v2","",0.02,0,0.04); +// RooArgSet arg1(v1); +// RooArgSet arg2(v2); + + if(_iStep==20){ + fSigmaRangeDivisor=4; + RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); + float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + } + else if(_iStep==50){ + fSigmaRangeDivisor=10; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; + RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); + float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + + } + else if(_iStep==80){ + fSigmaRangeDivisor=15; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; + RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); + float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + var = (RooRealVar *)x.find("scale_EB-absEta_0_1-gold-Et_25"); + varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; + std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor + << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr + << std::endl; + + // } else if(_iStep==100){ +// fSigmaRangeDivisor=20; +// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; +// RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); +// float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; +// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor +// << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr +// << std::endl; + + } + + + //else if(_iStep==100) fSigmaRangeDivisor=10; + + it = RooArgList(xPrime).createIterator(); + int index=0; + for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; + var = (RooRealVar *) it->Next()){ + + //var->setError(var->getError()/100); + + + RooRealVar *v_x = ((RooRealVar *)x.find(var->GetName())); + rmsHist[index]->Fill(v_x->getVal()); + + float varErr = std::min(rmsHist[index]->GetRMS(), (var->getMax()-var->getMin())/fSigmaRangeDivisor); + + + if(fSigmaRangeDivisor<3) var->setVal(gen.Uniform(v_x->getMin(), v_x->getMax())); + else { + if(varErr < (var->getMax()-var->getMin())/100) std::cout << "[WARNING] " << varErr << std::endl; + var->setVal(gen.Gaus( + ((RooRealVar *)x.find(var->GetName()))->getVal(), + varErr) + ); + } + +// if(TString(var->GetName())=="constTerm_EB-absEta_0_1-gold-Et_25"){ +// std::cout << var->GetName() << "\t" << v_x->getVal() << " --> " << var->getVal() << "\t" << varErr << std::endl; +// } + index++; + } + + _iStep++; + return; + + + + if(_iStep == _nBurnSteps){ + std::cout << "Now Gaussian proposal" << std::endl; + + it = xPrime.createIterator(); + for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; + var = (RooRealVar *) it->Next()){ + //var->setError(var->getError()/100); + //float varErr = var->getVal()/100; + //if(TString(var->GetName()).Contains("constTerm")) varErr*=10; + //var->setMin(std::max(var->getMin(),var->getVal()- varErr*3)); + //var->setMax(std::min(var->getMax(),var->getVal()+ varErr*3)); + var->setMin(0.0); + var->setMax(0.05); + //var->setVal(0.03); + std::cout << var -> GetName() << "\t" << var->getError() << "\t" << var -> getMin() << "\t" << var->getMax()<< std::endl; + } + //_m->hesse(); + //RooFitResult *fitres = _m->save(); + } +} + Double_t asymmetricParabola(Double_t* x,Double_t* par) { // qualche commento non farebbe male @@ -1009,198 +1205,3 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int } } - - -class ShervinMinuit: public PdfProposal { - -public: - //inline ShervinMinuit(){}; - //ShervinMinuit(int nBurnSteps); - ShervinMinuit(int nBurnSteps, RooSmearer& smearer); - - ProposalHelper *ph; - ProposalFunction* proposal; - void Propose(RooArgSet& xPrime, RooArgSet& x); - inline Bool_t IsSymmetric(RooArgSet& xPrime, RooArgSet& x){return true;}; //proposal->IsSymmetric(xPrime,x);}; - inline Double_t GetProposalDensity(RooArgSet& xPrime, RooArgSet& x){return 0;}; //proposal->GetProposalDensity(xPrime, x);}; - - inline void SetMinuit(RooMinuit& m){_m = &m;}; -private: - int _nBurnSteps; - int _iStep; - int _iBurnStep; - RooMinuit* _m; - - - RooSmearer& _smearer; - //RooArgSet& _params; - RooArgSet _paramSet; - RooStats::UniformProposal propUnif; - RooMultiVarGaussian *gausPdf; - TRandom3 gen; - std::vector rmsHist; - float fSigmaRangeDivisor; -}; - - -ShervinMinuit::ShervinMinuit(int nBurnSteps, RooSmearer& smearer): - _smearer(smearer),gausPdf(NULL), gen(1245), fSigmaRangeDivisor(-1) - // _params(smearer.GetParams()) -{ - - _iStep =0; - - _nBurnSteps = nBurnSteps; - - RooArgList argList(smearer.GetParams()); - TIterator *it = argList.createIterator(); - std::cout << "###############################" << std::endl; - for(RooRealVar *v = (RooRealVar*)it->Next(); v!=NULL; v = (RooRealVar*)it->Next()){ - if(! v->isConstant()){ - _paramSet.add((*v)); - rmsHist.push_back(new TH1F(v->GetName(),"",1000, v->getMin(), v->getMax())); - } - } - delete it; - // _paramSet.Print(); -// ph = new ProposalHelper(); -// ph->SetVariables(_paramSet); -// ph->SetUpdateProposalParameters(kTRUE); // auto-create mean vars and add mappings -// ph->SetUniformFraction(1); -// ph->SetCluesFraction(0); -// ph->SetWidthRangeDivisor(100); - // proposal = ph->GetProposalFunction(); - - RooArgList xVec(_paramSet); - Int_t size = xVec.getSize(); - Float_t fSigmaRangeDivisor = 100; - TMatrixDSym *fCovMatrix = new TMatrixDSym(size); - RooRealVar* r; - for (Int_t i = 0; i < size; i++) { - r = (RooRealVar*)xVec.at(i); - Double_t range = r->getMax() - r->getMin(); - (*fCovMatrix)(i,i) = range / fSigmaRangeDivisor; - } - -// gausPdf = new RooMultiVarGaussian("multiVar","", RooArgList(_paramSet), *fCovMatrix); -// gausPdf->initGenerator(12345); -// gausPdf-> generateEvent(1); -// SetPdf(*gausPdf); - -// // gausPdf->generate(_paramSet,10)->Print(); -// SetCacheSize(10); - //proposal = ph->GetProposalFunction(); - //proposal = &propUnif; - //_iBurnStep = (int) _nBurnSteps/100; - //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/10; - //if(_iBurnStep==0) _iBurnStep = (int) _nBurnSteps/5; -} - - -void ShervinMinuit::Propose(RooArgSet& xPrime, RooArgSet& x){ - TIterator *it=NULL; -// RooRealVar v1("v1","",0.01,0,0.04); -// RooRealVar v2("v2","",0.02,0,0.04); -// RooArgSet arg1(v1); -// RooArgSet arg2(v2); - - if(_iStep==20){ - fSigmaRangeDivisor=4; - RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); - float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - } - else if(_iStep==50){ - fSigmaRangeDivisor=10; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; - RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); - float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - - } - else if(_iStep==80){ - fSigmaRangeDivisor=15; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; - RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); - float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - var = (RooRealVar *)x.find("scale_EB-absEta_0_1-gold-Et_25"); - varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; - std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor - << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr - << std::endl; - - // } else if(_iStep==100){ -// fSigmaRangeDivisor=20; -// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor << std::endl; -// RooRealVar *var = (RooRealVar *)x.find("constTerm_EB-absEta_0_1-gold-Et_25"); -// float varErr = (var->getMax()-var->getMin())/fSigmaRangeDivisor; -// std::cout << "[INFO] Changing sigma divisor to: " << fSigmaRangeDivisor -// << "\t" << var->getVal() << ": " << var->getMin() << " - " << var->getMax() << "\t" << varErr -// << std::endl; - - } - - - //else if(_iStep==100) fSigmaRangeDivisor=10; - - it = RooArgList(xPrime).createIterator(); - int index=0; - for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; - var = (RooRealVar *) it->Next()){ - - //var->setError(var->getError()/100); - - - RooRealVar *v_x = ((RooRealVar *)x.find(var->GetName())); - rmsHist[index]->Fill(v_x->getVal()); - - float varErr = std::min(rmsHist[index]->GetRMS(), (var->getMax()-var->getMin())/fSigmaRangeDivisor); - - - if(fSigmaRangeDivisor<3) var->setVal(gen.Uniform(v_x->getMin(), v_x->getMax())); - else { - if(varErr < (var->getMax()-var->getMin())/100) std::cout << "[WARNING] " << varErr << std::endl; - var->setVal(gen.Gaus( - ((RooRealVar *)x.find(var->GetName()))->getVal(), - varErr) - ); - } - -// if(TString(var->GetName())=="constTerm_EB-absEta_0_1-gold-Et_25"){ -// std::cout << var->GetName() << "\t" << v_x->getVal() << " --> " << var->getVal() << "\t" << varErr << std::endl; -// } - index++; - } - - _iStep++; - return; - - - - if(_iStep == _nBurnSteps){ - std::cout << "Now Gaussian proposal" << std::endl; - - it = xPrime.createIterator(); - for(RooRealVar *var = (RooRealVar *) it->Next(); var!=NULL; - var = (RooRealVar *) it->Next()){ - //var->setError(var->getError()/100); - //float varErr = var->getVal()/100; - //if(TString(var->GetName()).Contains("constTerm")) varErr*=10; - //var->setMin(std::max(var->getMin(),var->getVal()- varErr*3)); - //var->setMax(std::min(var->getMax(),var->getVal()+ varErr*3)); - var->setMin(0.0); - var->setMax(0.05); - //var->setVal(0.03); - std::cout << var -> GetName() << "\t" << var->getError() << "\t" << var -> getMin() << "\t" << var->getMax()<< std::endl; - } - //_m->hesse(); - //RooFitResult *fitres = _m->save(); - } -} From 83444d631e07b27fb4731354f8ab83adb77a838f Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 28 Aug 2013 14:46:13 +0200 Subject: [PATCH 154/475] fixed treatment of friend for multiple samples --- ZFitter/bin/ZFitter.cpp | 91 +++++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 39 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index e7a66e72aa2..88b745600e5 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -89,7 +89,7 @@ std::vector ReadRegionsFromFile(TString fileName){ } -void UpdateFriends(tag_chain_map_t& tagChainMap, bool merge=false){ +void UpdateFriends(tag_chain_map_t& tagChainMap, TString regionsFileNameTag){ for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); @@ -100,11 +100,14 @@ void UpdateFriends(tag_chain_map_t& tagChainMap, bool merge=false){ chain_itr!=tag_chain_itr->second.end(); chain_itr++){ - if(chain_itr->first!="selected" && - chain->GetFriend(chain_itr->first)==NULL){ - std::cout << "[STATUS] Adding friend branch: " << chain_itr->first - << " to tag " << tag_chain_itr->first << std::endl; - chain->AddFriend(chain_itr->second); + if(chain_itr->first!="selected"){ + if(chain->GetFriend(chain_itr->first)==NULL){ + if(!chain_itr->first.Contains("smearerCat") || (chain_itr->first.Contains("smearerCat") && chain_itr->first.Contains(regionsFileNameTag))){ + std::cout << "[STATUS] Adding friend branch: " << chain_itr->first + << " to tag " << tag_chain_itr->first << std::endl; + chain->AddFriend(chain_itr->second); + } + } // already added } chain_itr->second->GetEntries(); } @@ -112,7 +115,7 @@ void UpdateFriends(tag_chain_map_t& tagChainMap, bool merge=false){ return; } -void MergeSamples(tag_chain_map_t& tagChainMap, TString tag="s"){ +void MergeSamples(tag_chain_map_t& tagChainMap, TString regionsFileNameTag, TString tag="s"){ std::pair pair_tmp_tag(tag,chain_map_t()); // make_pair not work with scram b tagChainMap.insert(pair_tmp_tag); @@ -121,7 +124,7 @@ void MergeSamples(tag_chain_map_t& tagChainMap, TString tag="s"){ tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ - if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //do it for each sample + if(tag_chain_itr->first.CompareTo(tag)==0 || !tag_chain_itr->first.Contains(tag)) continue; //do it for each sample //TChain *chain = (tag_chain_itr->second.find("selected"))->second; // std::cout << chain->GetName() << std::endl; for(chain_map_t::const_iterator chain_itr=tag_chain_itr->second.begin(); @@ -136,7 +139,7 @@ void MergeSamples(tag_chain_map_t& tagChainMap, TString tag="s"){ (tagChainMap[tag])[chainName]->Add(chain_itr->second); } } - UpdateFriends(tagChainMap); + UpdateFriends(tagChainMap, regionsFileNameTag); return; } @@ -364,8 +367,8 @@ int main(int argc, char **argv) { if(!vm.count("regionsFile") && !vm.count("runDivide") && !vm.count("savePUTreeWeight") && - !vm.count("saveR9TreeWeight") && !vm.count("saveCorrEleTree") && - !vm.count("saveRootMacro") + !vm.count("saveR9TreeWeight") && !vm.count("saveCorrEleTree") + //&& !vm.count("saveRootMacro") ){ std::cerr << "[ERROR] Missing mandatory option \"regionsFile\"" << std::endl; return 1; @@ -431,6 +434,10 @@ int main(int argc, char **argv) { chainFileListTag.Remove(0,chainFileListTag.Last('/')+1); chainFileListTag.ReplaceAll(".dat",""); + TString regionsFileNameTag=regionsFileName; + regionsFileNameTag.Remove(0,regionsFileNameTag.Last('/')+1); + regionsFileNameTag.ReplaceAll(".dat",""); + std::ifstream chainFileList(chainFileListName.c_str()); while(chainFileList >> tag, chainFileList.good()){ if(tag.Contains('#')){ @@ -650,6 +657,8 @@ int main(int argc, char **argv) { std::cout << "------------------------------------------------------------" << std::endl; std::cout << "[STATUS] Getting energy scale corrections from file: " << corrEleFile << std::endl; TString treeName="scaleEle_"+corrEleType; + EnergyScaleCorrection_class eScaler(corrEleFile,corrEleType); + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ @@ -658,7 +667,6 @@ int main(int argc, char **argv) { TChain *ch = (tag_chain_itr->second.find("selected"))->second; TString filename="tmp/scaleEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; - EnergyScaleCorrection_class eScaler(corrEleFile,corrEleType); std::cout << "[STATUS] Saving electron scale corrections to root file:" << filename << std::endl; TFile f(filename,"recreate"); @@ -733,8 +741,11 @@ int main(int argc, char **argv) { for( std::vector::const_iterator branch_itr = branchList.begin(); branch_itr != branchList.end(); branch_itr++){ - UpdateFriends(tagChainMap); + UpdateFriends(tagChainMap, regionsFileNameTag); TString treeName=*branch_itr; + if(*branch_itr=="smearerCat") treeName+="_"+regionsFileNameTag; + + TString branchName=*branch_itr; if(treeName.Contains("invMassSigma")){ newBrancher.scaler= new EnergyScaleCorrection_class("","", smearEleFile,smearEleType); } @@ -747,22 +758,22 @@ int main(int argc, char **argv) { TChain *ch = (tag_chain_itr->second.find("selected"))->second; //data - std::cout <<"[STATUS] Adding branch " << treeName << " to " << tag_chain_itr->first <first <first+"-"+chainFileListTag+".root"; TFile f(filename,"recreate"); if (!f.IsOpen()){ - std::cerr << "[ERROR] File for branch " << treeName << " not created" << std::endl; + std::cerr << "[ERROR] File for branch " << branchName << " not created" << std::endl; return 1; } - TTree *newTree = newBrancher.AddBranch(ch,treeName+tag_chain_itr->first, treeName); - + TTree *newTree = newBrancher.AddBranch(ch,treeName, branchName); if(newTree==NULL){ std::cerr << "[ERROR] New tree for branch " << treeName << " is NULL" << std::endl; return 1; } f.cd(); + newTree->SetTitle(tag_chain_itr->first); newTree->Write(); delete newTree; f.Write(); @@ -775,14 +786,15 @@ int main(int argc, char **argv) { } //end of branches loop //(tagChainMap["s"])["selected"]->GetEntries(); - UpdateFriends(tagChainMap); + UpdateFriends(tagChainMap, regionsFileNameTag); //create tag "s" if not present (due to multiple mc samples) if(!tagChainMap.count("s")){ //#ifdef DEBUG std::cout << "==============================" << std::endl; std::cout << "==============================" << std::endl; - MergeSamples(tagChainMap, "s"); + MergeSamples(tagChainMap, regionsFileNameTag, "s"); + MergeSamples(tagChainMap, regionsFileNameTag, "d"); } @@ -1091,31 +1103,33 @@ int main(int argc, char **argv) { smearer.GetSmearedHisto(*itr, true, true); smearer.GetSmearedHisto(*itr, false, smearer._isDataSmeared); } - - TFile *f = new TFile(outDirFitResData+"/histos-"+r+"-"+TString(commonCut.c_str())+".root", "recreate"); - f->Print(); - f->cd(); - for(std::vector::iterator itr= smearer.ZeeCategories.begin(); - itr != smearer.ZeeCategories.end(); - itr++){ - //if(!itr->active) continue; - TH1F *MC = smearer.GetSmearedHisto(*itr, true, false); - TH1F *smearMC = smearer.GetSmearedHisto(*itr, true, true); - TH1F *data = smearer.GetSmearedHisto(*itr, false, smearer._isDataSmeared); + + if(vm.count("plotOnly") || !vm.count("profileOnly")){ + TFile *f = new TFile(outDirFitResData+"/histos-"+r+"-"+TString(commonCut.c_str())+".root", "recreate"); + f->Print(); + f->cd(); + for(std::vector::iterator itr= smearer.ZeeCategories.begin(); + itr != smearer.ZeeCategories.end(); + itr++){ + //if(!itr->active) continue; + TH1F *MC = smearer.GetSmearedHisto(*itr, true, false); + TH1F *smearMC = smearer.GetSmearedHisto(*itr, true, true); + TH1F *data = smearer.GetSmearedHisto(*itr, false, smearer._isDataSmeared); - MC->Write(); - smearMC->Write(); - data->Write(); - f->Write(); - } + MC->Write(); + smearMC->Write(); + data->Write(); + f->Write(); + } + f->Close(); + } - f->Close(); - if(!vm.count("plotOnly")){ + if(vm.count("profileOnly") || !vm.count("plotOnly")){ Int_t oldMarkovSize=smearer._markov.Size(); //if(vm.count("profileOnly") && !vm.count("runToy")) smearer.SetNSmear(10); std::cout <<"==================PROFILE=================="<GetName()); - if(name.Contains("scale")) continue; // special part for alpha fitting double min=0.; From 7cd13be27dd2fff0d1ededd068fc9a275c2b5b6b Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 28 Aug 2013 14:47:21 +0200 Subject: [PATCH 155/475] generation of smearerCat --- ZFitter/script/GenRootChain.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index e99332c197d..c2f05c8feb4 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -6,6 +6,7 @@ commonCut=Et_25 selection=WP80_PU invMass_var=invMass_SC_regrCorr_ele configFile=data/validation/monitoring_2012_53X.dat +regionsFile=data/regions/scaleStep4smearing_2.dat runRangesFile=data/runRanges/monitoring.dat baseDir=test @@ -21,7 +22,8 @@ usage(){ echo " -f arg (=${configFile})" echo " --noPU" echo " --outDirImg arg (=${outDirImg})" - + echo " --addBranch arg" + echo " --regionsFile arg (=${regionsFile})" # echo " --puName arg " # echo " --runRangesFile arg (=${runRangesFile}) run ranges for stability plots" # echo " --selection arg (=${selection}) " @@ -49,7 +51,7 @@ desc(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics,slides,onlyTable,test,commonCut:,period:,noPU,outDirImg: -- "$@") +if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics,slides,onlyTable,test,commonCut:,period:,noPU,outDirImg:,addBranch:,regionsFile: -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -64,6 +66,8 @@ do -h|--help) desc;usage; exit 0;; -f) configFile=$2; shift;; --noPU) noPU="--noPU";; + --addBranch) addBranchList="${addBranchList} --addBranch=$2"; shift;; + --regionsFile) regionsFile=$2; shift;; --invMass_var) invMass_var=$2; echo "[OPTION] invMass_var = ${invMass_var}"; shift;; --outDirImg) outDirImg=$2; shift;; --puName) puName=$2; shift;; @@ -129,7 +133,7 @@ fi # saving the root files with the chains rm tmp/*_chain.root -./bin/ZFitter.exe --saveRootMacro -f ${configFile} ${noPU} || exit 1 +./bin/ZFitter.exe --saveRootMacro -f ${configFile} --regionsFile=${regionsFile} ${noPU} ${addBranchList} || exit 1 # adding all the chains in one file for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root tmp/s_selected_chain.root From 3cc24126d1d893fc04d69ddf597aa8192bffc037 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 28 Aug 2013 14:48:23 +0200 Subject: [PATCH 156/475] verbose output --- ZFitter/src/SmearingImporter.cc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index d900a088421..d250692507c 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -66,7 +66,8 @@ void SmearingImporter::ImportToy(Long64_t nEvents, event_cache_t& eventCache, bo void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryList *entryList, bool swap){ - + std::cerr << "[ERROR] Entering wrong function!" << std::endl; + exit(1); // for the energy calculation Float_t energyEle[2]; Float_t corrEle_[2]={1,1}; @@ -248,6 +249,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Long64_t treenumber=-1; std::vector< std::pair > catSelectors; + if(hasSmearerCat==false){ for(std::vector::const_iterator region_ele1_itr = _regionList.begin(); region_ele1_itr != _regionList.end(); region_ele1_itr++){ @@ -282,13 +284,14 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } } + } for(Long64_t jentry=0; jentry < entries; jentry++){ Long64_t entryNumber= chain->GetEntryNumber(jentry); chain->GetEntry(entryNumber); if(isToy){ if(jentry<10){ - std::cout << isMC << "\t" << eventNumber << "\t" << eventNumber%3 << std::endl; + std::cout << "Dividing toyMC events: " << isMC << "\t" << eventNumber << "\t" << eventNumber%3 << std::endl; } if(isMC && eventNumber%3==0) continue; if(!isMC && eventNumber%3!=0) continue; @@ -408,7 +411,10 @@ SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, boo if(_chain->GetBranch("r9Weight")!=NULL) _chain->SetBranchStatus("r9Weight", 1); if(_chain->GetBranch("puWeight")!=NULL) _chain->SetBranchStatus("puWeight", 1); if(_chain->GetBranch("ptWeight")!=NULL) _chain->SetBranchStatus("ptWeight", 1); - if(_chain->GetBranch("smearerCat")!=NULL)_chain->SetBranchStatus("smearerCat", 1); + if(_chain->GetBranch("smearerCat")!=NULL){ + std::cout << "[STATUS] Activating branch smearerCat" << std::endl; + _chain->SetBranchStatus("smearerCat", 1); + } @@ -422,19 +428,18 @@ SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, boo } } - std::cout << "Eventlist" << std::endl; TString evListName="evList_"; evListName+=_chain->GetTitle(); evListName+="_all"; TEntryList *oldList = _chain->GetEntryList(); if(oldList==NULL){ - _chain->Draw(">>"+evListName, cutter.GetCut(_commonCut+"-"+eleID_,true), "entrylist"); - //_chain->Draw(">>"+evListName, "", "entrylist"); - TEntryList *elist_all = (TEntryList*)gDirectory->Get(evListName); - // elist_all->SetBit(!kCanDelete); - _chain->SetEntryList(elist_all); + std::cout << "[STATUS] Setting entry list: " << evListName << std::endl; + _chain->Draw(">>"+evListName, cutter.GetCut(_commonCut+"-"+eleID_,isMC), "entrylist"); + //_chain->Draw(">>"+evListName, "", "entrylist"); + TEntryList *elist_all = (TEntryList*)gDirectory->Get(evListName); + // elist_all->SetBit(!kCanDelete); + _chain->SetEntryList(elist_all); } - std::cout << "Eventlist" << std::endl; for(std::vector::const_iterator region_ele1_itr = _regionList.begin(); region_ele1_itr != _regionList.end(); region_ele1_itr++){ From 4e2164cafc5603e1a2caa0189c008f57f18239c2 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 28 Aug 2013 16:29:00 +0200 Subject: [PATCH 157/475] dividing samples --- ZFitter/data/validation/22Jan2012-stdMC.dat | 23 ++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index 7b4c8375a77..c36bfc6171c 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -1,22 +1,31 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-allRange.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-allRange.root ##### Powheg -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root ########### Data -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d4 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root ########### Friend trees ##### PU histograms d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root ##### PU trees -s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMC_powheg-RUN2012ABCD.root +#s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMC_powheg-RUN2012ABCD.root +s1 pileup mcPUtrees1.root +s2 pileup mcPUtrees2.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees #d smearerCat_d smearerCat-22Jan-stdMC_data-scaleStep2smearing_7.root #s smearerCat_s smearerCat-22Jan-stdMC_mc-scaleStep2smearing_7.root +# +d1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d1-22Jan2012-stdMC.root +d2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d2-22Jan2012-stdMC.root +d3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d3-22Jan2012-stdMC.root +d4 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d4-22Jan2012-stdMC.root +s1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s1-22Jan2012-stdMC.root +s2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s2-22Jan2012-stdMC.root From 49370e9fd1eec7390540650e4234970107081620 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 31 Aug 2013 09:48:59 +0200 Subject: [PATCH 158/475] added comment --- ZFitter/src/addBranch_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc index 6363fc0a730..b970445dbb9 100644 --- a/ZFitter/src/addBranch_class.cc +++ b/ZFitter/src/addBranch_class.cc @@ -280,7 +280,7 @@ TTree* addBranch_class::AddBranch_smearerCat(TChain* originalChain, TString tree if(region_ele2_itr==region_ele1_itr){ TString region=*region_ele1_itr; - region.ReplaceAll(_commonCut,""); + region.ReplaceAll(_commonCut,""); //remove the common Cut! TTreeFormula *selector = new TTreeFormula("selector"+(region), cutter.GetCut(region+oddString, isMC), originalChain); catSelectors.push_back(std::pair(selector,NULL)); //selector->Print(); From 704491f77d2d158436a6973a95f021f7593eb32e Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 31 Aug 2013 09:49:55 +0200 Subject: [PATCH 159/475] removed DEBUG mode --- ZFitter/src/EnergyScaleCorrection_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 4bf713835a7..2f044f9c62f 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -1,5 +1,5 @@ #include "../interface/EnergyScaleCorrection_class.h" -#define DEBUG +//#define DEBUG // for exit(0) #include From e36b905223f352cd1f3bd5231decb3c5ffd199f3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 31 Aug 2013 09:50:41 +0200 Subject: [PATCH 160/475] improved plotting options --- ZFitter/p.C | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/ZFitter/p.C b/ZFitter/p.C index abbad4a708c..46cb36dc332 100644 --- a/ZFitter/p.C +++ b/ZFitter/p.C @@ -1,24 +1,36 @@ { + bool smooth=true; + bool zoom=true; gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); + TCanvas *c = new TCanvas("c",""); // gROOT->ProcessLine(".L ~/smooth.C+"); - TString constTermName="constTerm_absEta_1_1.4442-bad-Et_25-trigger-noPF-EB"; - //TString constTermName="constTerm_absEta_0_0.8-gold-Et_25-trigger-noPF-EB"; - //TString constTermName="constTerm_absEta_0.8_1.4442-bad-Et_25-trigger-noPF-EB"; - //TString constTermName="constTerm_absEta_0.8_1.4442-gold-Et_25-trigger-noPF-EB"; + TString constTermName="constTerm_absEta_0_1-bad-Et_25-trigger-noPF"; + //TString constTermName="constTerm_absEta_0_1-gold-Et_25-trigger-noPF"; + //TString constTermName="constTerm_absEta_1_1.4442-bad-Et_25-trigger-noPF"; + //TString constTermName="constTerm_absEta_1_1.4442-gold-Et_25-trigger-noPF"; TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); RooDataSet *data = (RooDataSet *)_file0->Get(constTermName); - + TTree *tree = dataset2tree(data); double min=tree->GetMinimum("nll"); TString minString; minString+=min; // tree->Draw(TString(constTermName).ReplaceAll("-","_")+":"+TString(alphaName).ReplaceAll("-","_")+">>hist(31,-0.0022975,0.1401475,40,0.00025,0.02025)","nll-"+minString,"colz",800,5); // TH2F *h = (TH2F*) gROOT->FindObject("hist"); // h->GetZaxis()->SetRangeUser(0,100); + TH2F *hprof = prof2d(tree, TString(constTermName).ReplaceAll("-","_"), TString(alphaName).ReplaceAll("-","_"), "nll", - "(241,-0.00025,0.24025,60,0.00025,0.03025)", true,true); + "(241,-0.00025,0.24025,60,0.00025,0.03025)", true,smooth); hprof->Draw("colz"); - hprof->GetZaxis()->SetRangeUser(0,30); + if(zoom){ + hprof->GetZaxis()->SetRangeUser(0,10); + hprof->GetXaxis()->SetRangeUser(0,0.15); + hprof->GetYaxis()->SetRangeUser(0,0.018); + } else { + hprof->GetZaxis()->SetRangeUser(0,30); + hprof->GetXaxis()->SetRangeUser(0,0.15); + hprof->GetYaxis()->SetRangeUser(0,0.018); + } hprof->GetXaxis()->SetTitle("#Delta #alpha"); hprof->GetYaxis()->SetTitle("#Delta #sigma"); Int_t iBinX, iBinY; @@ -27,9 +39,16 @@ x= hprof->GetXaxis()->GetBinCenter(iBinX); y= hprof->GetYaxis()->GetBinCenter(iBinY); TGraph nllBestFit(1,&x,&y); - + std::cout << constTermName << "\t" << x << "\t" << y << std::endl; nllBestFit.SetMarkerStyle(3); nllBestFit.SetMarkerColor(kRed); nllBestFit.Draw("P same"); + TString fileName=constTermName; + if(!smooth) fileName+="-noSmooth"; + if(zoom) fileName+="-zoom"; + + c->SaveAs(fileName+".png"); + c->SaveAs(fileName+".eps"); + } From c223adda365d2bf362a987c6d86dd4f49b8c271a Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 31 Aug 2013 09:51:33 +0200 Subject: [PATCH 161/475] options for 4 MCs and starting to work for ratio plots --- ZFitter/macro/PlotDataMC.C | 44 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 53838e5c07b..505439bd3c8 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -469,12 +469,36 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn int nHist= mc_vec.size(); - int colors[4]={kRed,kGreen,kBlue,0}; + int colors[4]={kRed,kGreen,kBlue,kCyan}; int fillstyle[4]={0,0,0,0}; //3003,3004,3005,3006}; if(nHist>4) return NULL; TString yLabel; TCanvas *c = new TCanvas("c",""); + TPad * pad1 = new TPad("pad1", "pad1",0.01,0.13,0.75,1.); + TPad * pad2 = new TPad("pad2", "pad2",0.01,0.001,0.75,0.2); + TPad * pad3 = new TPad("pad3", "pad3",0.68,0.001,1.,0.2); + + pad1->SetRightMargin(0.1); + pad1->SetLogy(); + pad1->Draw(); + pad1->cd(); + + pad2->SetGrid(); + pad2->SetBottomMargin(0.4); + pad2->SetRightMargin(0.1); + pad2->Draw(); + pad2->cd(); + + pad3->SetGrid(); + //pad2->SetTopMargin(0.01); + pad3->SetBottomMargin(0.4); + pad3->SetRightMargin(0.1); + pad3->Draw(); + pad3->cd(); + + pad1->cd(); + TString branchNameData=branchname; TString branchNameMC=branchname; @@ -611,7 +635,15 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn } if(mcLabel_vec[i] !="") leg->AddEntry(s,mcLabel_vec[i], "lf"); - + +// TH1F *sRatio = (TH1F *) s->Clone(mcHistName+"_ratio"); +// sRatio->Divide(d); +// if(ratio){ +// pad2->cd(); +// if(i==0) sRatio->Draw(); +// else sRatio->Draw("same"); +// } +// pad1->cd(); } //TH1F* d_norm = s_norm; @@ -641,6 +673,14 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn } +std::vector MakeChainVector(TChain *v1, TChain *v2, TChain *v3, TChain *v4){ + std::vector vec; + vec.push_back(v1); + vec.push_back(v2); + vec.push_back(v3); + vec.push_back(v4); + return vec; +} std::vector MakeChainVector(TChain *v1, TChain *v2, TChain *v3){ std::vector vec; From 839802ca253bd4f85a6fb87bc3aa14beaa3fa7c9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 11 Sep 2013 12:09:18 +0200 Subject: [PATCH 162/475] alphaGoldFix option introduced --- ZFitter/bin/ZFitter.cpp | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 88b745600e5..15e8bae9941 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -44,7 +44,6 @@ #include #include #define profile -#define PROFILE_NBINS 200 //#define DEBUG #define smooth @@ -301,6 +300,7 @@ int main(int argc, char **argv) { ("nEventsMinDiag", po::value(&nEventsMinDiag)->default_value(1000), "min num events in diagonal categories") ("nEventsMinOffDiag", po::value(&nEventsMinOffDiag)->default_value(2000), "min num events in off-diagonal categories") ("constTermFix", "constTerm not depending on Et") + ("alphaGoldFix", "alphaTerm for gold electrons fixed to the low eta region") ("smearingEt", "alpha term depend on sqrt(Et) and not on sqrt(E)") ; inputOption.add_options() @@ -707,7 +707,7 @@ int main(int argc, char **argv) { if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present TChain *ch = (tag_chain_itr->second.find("selected"))->second; - TString filename="tmp/smearEle_"+corrEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; + TString filename="tmp/smearEle_"+smearEleType+"_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; std::cout << "[STATUS] Saving electron smearings to root file:" << filename << std::endl; TFile f(filename,"recreate"); @@ -716,7 +716,7 @@ int main(int argc, char **argv) { exit(1); } - TTree *corrTree = eScaler.GetSmearTree((tagChainMap["s"])["selected"], true, energyBranchName ); + TTree *corrTree = eScaler.GetSmearTree(ch, true, energyBranchName ); f.cd(); corrTree->Write(); std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; @@ -869,10 +869,20 @@ int main(int argc, char **argv) { alpha_v->setError(0.01); alpha_v->setConstant(true); //alpha_v->Print(); - args.add(*alpha_v); + if(!vm.count("alphaGoldFix") || !region_itr->Contains("absEta_1_1.4442-gold")){ + args.add(*alpha_v); + } } if(reg.MatchB(*region_itr) && vm.count("constTermFix")==1){ - alpha_ = new RooFormulaVar("alpha_"+*region_itr, "alpha_"+varName,"@0", *alpha_v); + if(vm.count("alphaGoldFix") && region_itr->Contains("absEta_1_1.4442-gold")){ + std::cout << "[STATUS] Fixing alpha term to low eta region " << *region_itr << std::endl; + std::cerr << "[STATUS] Fixing alpha term to low eta region " << *region_itr << std::endl; + TString lowRegionVarName=varName; lowRegionVarName.ReplaceAll("absEta_1_1.4442","absEta_0_1"); + alpha_v = (RooRealVar *)args.find("alpha_"+lowRegionVarName); + alpha_ = new RooFormulaVar("alpha_"+*region_itr, "alpha_"+lowRegionVarName,"@0", *alpha_v); + } else { + alpha_ = new RooFormulaVar("alpha_"+*region_itr, "alpha_"+varName,"@0", *alpha_v); + } alpha_v->setConstant(false); } else alpha_ = alpha_v; @@ -970,11 +980,11 @@ int main(int argc, char **argv) { myClock.Reset(); if(vm.count("smearerFit")){ - smearer.SetHistBinning(80,100,invMass_binWidth); // to do before Init if(vm.count("runToy")){ smearer.SetToyScale(1, constTermToy); - if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), true,initFileName.c_str()); + //if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), true,initFileName.c_str()); + if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), false,initFileName.c_str()); else smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy")); std::cout << "[DEBUG] " << constTermToy << std::endl; } else{ @@ -1082,7 +1092,7 @@ int main(int argc, char **argv) { delete mcChain; } - } + } std::cout << "[INFO] Minimization time: \t"; myClock.Stop(); @@ -1129,7 +1139,7 @@ int main(int argc, char **argv) { //if(vm.count("profileOnly") && !vm.count("runToy")) smearer.SetNSmear(10); std::cout <<"==================PROFILE=================="<GetName()); - + if(name.Contains("absEta_1_1.4442-gold") && vm.count("alphaGoldFix")) continue; // special part for alpha fitting double min=0.; TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList.find(alphaName): NULL; if(var2!=NULL && name.Contains("constTerm") && var2->isConstant()==false){ smearer.SetDataSet(name,TString(var->GetName())+TString(var2->GetName())); - //MinProfile2D(var, var2, smearer, -1, 0., min, false); + if(vm.count("constTermFix")) MinProfile2D(var, var2, smearer, -1, 0., min, false); //MinMCMC2D(var, var2, smearer, 1, 0., min, 1200, false); //MinMCMC2D(var, var2, smearer, 2, 0., min, 800, false); //MinMCMC2D(var, var2, smearer, 3, 0., min, 100, false); From 50b6e1c91903e7345c12df325348b989b437740a Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 11 Sep 2013 12:10:14 +0200 Subject: [PATCH 163/475] splitted signal and data samples in sub samples --- .../data/validation/22Jan2012-runDepMC.dat | 4 +++- ZFitter/data/validation/22Jan2012-stdMC.dat | 4 ++-- .../data/validation/22Jan2012-stdMadgraph.dat | 22 +++++++++++++------ ZFitter/data/validation/moriond2013.dat | 16 +++++++------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat index b53025f7e00..d8c40b5cfa8 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMC.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMC.dat @@ -18,7 +18,9 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533- s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root ##### PU trees -s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root +#s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root +s1 pileup mcPUtree_s1-22Jan2012-runDepMC.dat +s2 pileup mcPUtree_s2-22Jan2012-runDepMC.dat ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index c36bfc6171c..65686587d84 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -15,8 +15,8 @@ d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456- s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root ##### PU trees #s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMC_powheg-RUN2012ABCD.root -s1 pileup mcPUtrees1.root -s2 pileup mcPUtrees2.root +s1 pileup mcPUtree_s1-22Jan2012-stdMC.dat +s2 pileup mcPUtree_s2-22Jan2012-stdMC.dat ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees diff --git a/ZFitter/data/validation/22Jan2012-stdMadgraph.dat b/ZFitter/data/validation/22Jan2012-stdMadgraph.dat index d0e1ff10bae..6262fb7d31d 100644 --- a/ZFitter/data/validation/22Jan2012-stdMadgraph.dat +++ b/ZFitter/data/validation/22Jan2012-stdMadgraph.dat @@ -1,22 +1,30 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-allRange.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-allRange.root ##### Powheg -#s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root +#s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/withTrgBit_nopresel/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root ########### Data -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d4 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root ########### Friend trees ##### PU histograms d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root ##### PU trees -s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMadgraph-RUN2012ABCD.root +#s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-stdMadgraph-RUN2012ABCD.root +s1 pileup mcPUtree_s1-22Jan2012-stdMC.dat +#s2 pileup mcPUtree_s2-22Jan2012-stdMC.dat ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees #d smearerCat_d smearerCat_data-scaleStep2smearing_8.root #s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root +d1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d1-22Jan2012-stdMC.root +d2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d2-22Jan2012-stdMC.root +d3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d3-22Jan2012-stdMC.root +d4 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d4-22Jan2012-stdMC.root +s1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s1-22Jan2012-stdMC.root +#s2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s2-22Jan2012-stdMC.root diff --git a/ZFitter/data/validation/moriond2013.dat b/ZFitter/data/validation/moriond2013.dat index 98d7aca92a7..0f27e745d96 100644 --- a/ZFitter/data/validation/moriond2013.dat +++ b/ZFitter/data/validation/moriond2013.dat @@ -6,25 +6,25 @@ # all treeName are admitted, but some are mandatory: # selected # some are special: pileup, scaleEleHggRunEta, scaleEleHggRunEtaR9 -s selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/DYJets-Summer12-START53-ZSkim-allRange.root +s1 selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/DYJets-Summer12-START53-ZSkim-allRange.root d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-13Julv2_Prompt_Moriond2013.69400.observed.root #d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-203742-22Jan.69400.observed.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Summer12_DD3.observed.root -#s pileupTree /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/tree-nPU-Summer12_DD3-190456-203002-13Jul_PromptTS.69400.observed.root +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/tree-nPU-Summer12_DD3-190456-203002-13Jul_PromptTS.69400.observed.root #d corr DoubleElectron-ZSkim-RUN2012C-v3-201230-201678-JSON_201230-201678-Prompt.root #s pileup mcPUtree.root -d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-RUN2012A-v1-06Aug-recover/190782-190949/190782-190949-06Aug/DoubleElectron-RUN2012A-v1-06Aug-recover-190782-190949.root +d1 selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-RUN2012A-v1-06Aug-recover/190782-190949/190782-190949-06Aug/DoubleElectron-RUN2012A-v1-06Aug-recover-190782-190949.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012A-13Jul-v1/190456-193621/190456-203002-13Jul_PromptTS/DoubleElectron-ZSkim-RUN2012A-13Jul-v1-190456-193621.root -d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012A-13Jul-v1/190456-193621/190456-208686-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012A-13Jul-v1-190456-193621.root +d1 selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012A-13Jul-v1/190456-193621/190456-208686-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012A-13Jul-v1-190456-193621.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012B-13Jul-v1/193834-196531/190456-204567-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012B-13Jul-v1-193834-196531.root -d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012B-13Jul-v1/193834-196531/190456-208686-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012B-13Jul-v1-193834-196531.root +d1 selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012B-13Jul-v1/193834-196531/190456-208686-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012B-13Jul-v1-193834-196531.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v2/198111-198913/190456-204567-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012C-v2-198111-198913.root -d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-24Aug-v1/198022-198523/198022-198523-24Aug/DoubleElectron-ZSkim-RUN2012C-24Aug-v1-198022-198523.root -d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v3/198934-203755/190456-208686-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012C-v3-198934-203755.root +d2 selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-24Aug-v1/198022-198523/198022-198523-24Aug/DoubleElectron-ZSkim-RUN2012C-24Aug-v1-198022-198523.root +d2 selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v3/198934-203755/190456-208686-13Julv2_Prompt/DoubleElectron-ZSkim-RUN2012C-v3-198934-203755.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v3/198934-201678/190456-203002-13Jul_PromptTS/DoubleElectron-ZSkim-RUN2012C-v3-198934-201678.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v3/201679-202016/190456-203002-13Jul_PromptTS/DoubleElectron-ZSkim-RUN2012C-v3-201679-202016.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v3/202017-202305/190456-203002-13Jul_PromptTS/DoubleElectron-ZSkim-RUN2012C-v3-202017-202305.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v3/202306-203002/190456-203002-13Jul_PromptTS/DoubleElectron-ZSkim-RUN2012C-v3-202306-203002.root #d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/alcareco/DoubleElectron-ZSkim-RUN2012C-v3/203003-203755/190456-203853_13Jul_Prompt/DoubleElectron-ZSkim-RUN2012C-v3-203003-203755.root -d selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/officialAlcareco/DoubleElectron-ZAlcaSkim-RUN2012D-v1/203773-208686/190456-208686-13Julv2_Prompt/DoubleElectron-ZAlcaSkim-RUN2012D-v1-203773-208686.root +d3 selected root://eoscms//eos/cms/store/caf/user/shervin/calibration/8TeV/ZNtuples/officialAlcareco/DoubleElectron-ZAlcaSkim-RUN2012D-v1/203773-208686/190456-208686-13Julv2_Prompt/DoubleElectron-ZAlcaSkim-RUN2012D-v1-203773-208686.root #d corr scale-HggRunEtaR9.root From e4b39a60107ccc5c3602ad21ae50feae9c739ed1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 11 Sep 2013 12:11:21 +0200 Subject: [PATCH 164/475] introduced multiple smoothing and simplified plotting scripts --- ZFitter/m.C | 110 ++++--------- ZFitter/macro/mcmcDraw.C | 336 +++++++++++++++++++++++++++++++-------- ZFitter/p.C | 58 ++++--- 3 files changed, 334 insertions(+), 170 deletions(-) diff --git a/ZFitter/m.C b/ZFitter/m.C index f8d57332ba8..b8bc83e41a1 100644 --- a/ZFitter/m.C +++ b/ZFitter/m.C @@ -1,83 +1,37 @@ { + TString optSmooth="k3a"; + TString toyDir="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/reducedPoints_fixed/"; + //0.005-0.00 0.005-0.01 0.005-0.15 0.01-0.00 0.01-0.01 0.01-0.15 0.02-0.00 0.02-0.01 0.02-0.15 gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); - TString outDir="tmp/v8-alphaFloat-noSmooth-0.02-0.00"; - system(("mkdir -p "+outDir).Data()); - // TTree *toys = ToyTree("test/dato/fitres/Hgg_Et-toys/old/scaleStep2smearing_5/0.01-0.00/C/","outProfile-scaleStep2smearing_5-Et_25-trigger-noPF-EB.root","scan"); - TTree *toys = ToyTree("test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/0.02-0.00//","outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root",""); - - toys->Scan("catName:catIndex:constTermTrue:alphaTrue","","col=50"); - - - toys->Draw("constTerm-constTermTrue>>constTerm_0","catIndex==0"); - toys->Draw("constTerm-constTermTrue>>constTerm_1","catIndex==1"); - toys->Draw("constTerm-constTermTrue>>constTerm_2","catIndex==2"); - toys->Draw("constTerm-constTermTrue>>constTerm_3","catIndex==3"); - toys->Draw("alpha-alphaTrue>>alpha_3","catIndex==3"); - toys->Draw("alpha-alphaTrue>>alpha_2","catIndex==2"); - toys->Draw("alpha-alphaTrue>>alpha_1","catIndex==1"); - toys->Draw("alpha-alphaTrue>>alpha_0","catIndex==0"); - toys->Draw("constTerm:alpha>>constTerm_alpha_0","catIndex==0"); - toys->Draw("constTerm:alpha>>constTerm_alpha_1","catIndex==1"); - toys->Draw("constTerm:alpha>>constTerm_alpha_2","catIndex==2"); - toys->Draw("constTerm:alpha>>constTerm_alpha_3","catIndex==3"); - - gStyle->SetOptStat(1); - - TCanvas *c = new TCanvas("c",""); + + std::vector intSmoothVec; + intSmoothVec.push_back(0); + intSmoothVec.push_back(3); + intSmoothVec.push_back(10); + + std::vector toySubDirVec; + toySubDirVec.push_back("0.01-0.00/"); + toySubDirVec.push_back("0.0005-0.05/"); + toySubDirVec.push_back("0.0005-0.10/"); + + for(std::vector::const_iterator toySubDir_itr = toySubDirVec.begin(); + toySubDir_itr!= toySubDirVec.end(); toySubDir_itr++){ + for(int nSmooth=0; nSmooth<=10; nSmooth++){ + if(nSmooth!=0 && nSmooth!=3 && nSmooth!=10) continue; + // for(std::vector::const_iterator nSmooth_itr = intSmoothVec.begin(); + // nSmooth_itr != intSmoothVec.end(); nSmooth_itr++){ + //int nSmooth=*nSmooth_itr; + TString toySubDir=*toySubDir_itr; + std::cout << toySubDir << "\t" << nSmooth << std::endl; + TString outDir=toyDir+toySubDir+"img/"+optSmooth+"/nSmooth_"; outDir+=nSmooth; outDir+="/"; + system(("mkdir -p "+outDir).Data()); + // TTree *toys = ToyTree("test/dato/fitres/Hgg_Et-toys/old/scaleStep2smearing_5/0.01-0.00/C/","outProfile-scaleStep2smearing_5-Et_25-trigger-noPF-EB.root","scan"); + TTree *toys = ToyTree(toyDir+toySubDir,"outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root", optSmooth,nSmooth); + //toys->Scan("catName:catIndex:constTermTrue:alphaTrue:constTerm:alpha","","col=20"); + DrawToyTree(toys, outDir); + delete toys; + } + } - constTerm_alpha_0->Draw("colz"); - constTerm_alpha_0->GetYaxis()->SetTitle("#Delta C - #Delta C True"); - constTerm_alpha_0->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/constTerm_alpha_0.png"); - - constTerm_alpha_1->Draw("colz"); - constTerm_alpha_1->GetYaxis()->SetTitle("#Delta C - #Delta C True"); - constTerm_alpha_1->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/constTerm_alpha_1.png"); - - constTerm_alpha_2->Draw("colz"); - constTerm_alpha_2->GetYaxis()->SetTitle("#Delta C - #Delta C True"); - constTerm_alpha_2->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/constTerm_alpha_2.png"); - - constTerm_alpha_3->Draw("colz"); - constTerm_alpha_3->GetYaxis()->SetTitle("#Delta C - #Delta C True"); - constTerm_alpha_3->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/constTerm_alpha_3.png"); - - constTerm_0->Draw(); - constTerm_0->GetXaxis()->SetTitle("#Delta C - #Delta C True"); - c->SaveAs(outDir+"/constTerm_0.png"); - - constTerm_1->Draw(); - constTerm_1->GetXaxis()->SetTitle("#Delta C - #Delta C True"); - c->SaveAs(outDir+"/constTerm_1.png"); - - constTerm_2->Draw(); - constTerm_2->GetXaxis()->SetTitle("#Delta C - #Delta C True"); - // constTerm_2->GetXaxis()->SetRangeUser(-0.005,0.005); - c->SaveAs(outDir+"/constTerm_2.png"); - - constTerm_3->Draw(); - constTerm_3->GetXaxis()->SetTitle("#Delta C - #Delta C True"); - c->SaveAs(outDir+"/constTerm_3.png"); - - alpha_0->Draw(); - alpha_0->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/alpha_0.png"); - - alpha_1->Draw(); - alpha_1->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/alpha_1.png"); - - alpha_2->Draw(); - alpha_2->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/alpha_2.png"); - - alpha_3->Draw(); - alpha_3->GetXaxis()->SetTitle("#Delta S - #Delta S True"); - c->SaveAs(outDir+"/alpha_3.png"); - } - diff --git a/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C index 8d1bd43aa24..01e4164c8f9 100644 --- a/ZFitter/macro/mcmcDraw.C +++ b/ZFitter/macro/mcmcDraw.C @@ -467,7 +467,7 @@ RooHistPdf *nllToL(TH2F* hist){ return histPdf; } -TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, TString binning="(40,0,0.05,40,0,0.2)", bool delta=false, bool smooth=false){ +TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, TString binning="(241,-0.0005,0.2405,60,0.00025,0.03025)", bool delta=false, int nSmooth=0, TString optSmooth="k3a"){ var1Name.ReplaceAll("-","_"); var2Name.ReplaceAll("-","_"); @@ -489,17 +489,22 @@ TH2F *prof2d(TTree *tree, TString var1Name, TString var2Name, TString nllName, T delete hEntries; Double_t min=1e20, max=0; - if(smooth){ - Smooth(h, 1, "k3a"); - Smooth(h, 1, "k3a"); - Smooth(h, 1, "k3a"); + if(nSmooth>0){ + for(int iSmooth=0; iSmoothGetNbinsX(); iBinX++){ for(Int_t iBinY=1; iBinY <= h->GetNbinsY(); iBinY++){ Double_t binContent=h->GetBinContent(iBinX, iBinY); - if(min>binContent && binContent!=0) min=binContent; + if(min>binContent && binContent!=0){ + min=binContent; + iBinXmin=iBinX; + iBinYmin=iBinY; + } if(maxGetNbinsY(); iBinY++){ Double_t binContent=h->GetBinContent(iBinX, iBinY); //std::cout << binContent << std::endl; + if(binContent==0 && iBinX > 1 && h->GetBinContent(iBinX-1,iBinY) !=0 ){ + binContent=h->GetBinContent(iBinX-1,iBinY); + } if(binContent!=0) binContent-=min-0.0002; else binContent=-1; h->SetBinContent(iBinX,iBinY,binContent); } } } +// std::cout << "iBinXmin = " << iBinXmin +// << "\tiBinYmin = " << iBinYmin +// << "\tminBin content = " << h->GetBinContent(iBinXmin, iBinYmin) +// // << "\tminX = h->GetXaxis()->GetBinCenter( +// << std::endl; h->GetZaxis()->SetRangeUser(0.000001,50); //std::cerr << "io sono qui 3" << std::endl; return h; @@ -609,6 +622,7 @@ RooMultiVarGaussian *MultiVarGaussian(RooDataSet *dataset){ TTree *dataset2tree(RooDataSet *dataset){ const RooArgSet *args = dataset->get(); + if(args==NULL) return NULL; RooArgList argList(*args); Double_t variables[50]; @@ -744,11 +758,9 @@ TGraphErrors plot(RooDataSet *dataset, TString alpha, TString constTerm){ } - - -void MakePlots(TString filename, float zmax=50, bool invert=false, TString opt="", TString energy="8TeV", TString lumi=""){ - TString outDir=filename; outDir.ReplaceAll("fitres","img"); - outDir="tmp/"; +void MakePlots(TString filename, float zmax=30, int nSmooth=10, TString opt="", TString energy="8TeV", TString lumi=""){ + TString outDir=filename; outDir.Remove(outDir.Last('/')); outDir+="/img/"+opt; + //outDir="tmp/k5b/"; //std::map deltaNLL_map; /*------------------------------ Plotto */ @@ -767,69 +779,93 @@ void MakePlots(TString filename, float zmax=50, bool invert=false, TString opt=" TKey *key = (TKey *)KeyList->At(i); if(TString(key->GetClassName())!="RooDataSet") continue; RooDataSet *dataset = (RooDataSet *) key->ReadObj(); - + if(dataset==NULL){ + std::cerr << "[WARNING] No dataset for " << key->GetName() << "\t" << key->GetTitle() << std::endl; + continue; + } TString constTermName = dataset->GetName(); TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); TTree *tree = dataset2tree(dataset); TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); - TString binning="(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; - if(invert){ - binning="(61,-0.0022975,0.1401475,40,0.00025,0.02025)"; - } - TH2F *hist = invert ? prof2d(tree, constTermName, alphaName, "nll", binning, true,true) : - prof2d(tree, alphaName, constTermName, "nll", binning, true,true); - if(invert){ - hist->GetXaxis()->SetTitle("#Delta #alpha"); - hist->GetYaxis()->SetTitle("#Delta #sigma"); - } else { - hist->GetYaxis()->SetTitle("#Delta #alpha"); - hist->GetXaxis()->SetTitle("#Delta #sigma"); - } - hist->SaveAs(outDir+"/deltaNLL-"+constTermName+".root"); + // TString binning="(241,-0.0005,0.2405,60,0.00025,0.03025)"; + TString binning="(241,-0.0005,0.2405,300,0.00025,0.03025)"; + + TH2F *hist = prof2d(tree, constTermName, alphaName, "nll", binning, true,nSmooth, opt); +// std::cout << "Bin width = " << hist->GetXaxis()->GetBinWidth(10) << "\t" << hist->GetYaxis()->GetBinWidth(10) << std::endl; +// std::cout << "Bin 1 center = " << hist->GetXaxis()->GetBinCenter(1) << "\t" << hist->GetYaxis()->GetBinCenter(1) << std::endl; +// std::cout << "Bin 10 center = " << hist->GetXaxis()->GetBinCenter(10) << "\t" << hist->GetYaxis()->GetBinCenter(10) << std::endl; +// return; hist->Draw("colz"); - bestFit_.Draw("P same"); - bestFit_.SetMarkerSize(2); + hist->GetZaxis()->SetRangeUser(0,zmax); + hist->GetXaxis()->SetRangeUser(0,0.15); + hist->GetYaxis()->SetRangeUser(0,0.018); + + hist->GetXaxis()->SetTitle("#Delta S"); + hist->GetYaxis()->SetTitle("#Delta C"); Int_t iBinX, iBinY; Double_t x,y; - hist->GetBinWithContent2(1.99999660253524780e-04,iBinX,iBinY); + hist->GetBinWithContent2(0.0002,iBinX,iBinY,1,-1,1,-1,0.0000001); x= hist->GetXaxis()->GetBinCenter(iBinX); y= hist->GetYaxis()->GetBinCenter(iBinY); + std::cout << "Best Fit: " << x << "\t" << y << std::endl; TGraph nllBestFit(1,&x,&y); + TString fileName=outDir+"/"+constTermName; + fileName+="-"; fileName+=nSmooth; nllBestFit.SetMarkerStyle(3); nllBestFit.SetMarkerColor(kRed); - TList* contour68 = contourFromTH2(hist, 0.68); - - hist->Draw("colz"); - hist->GetZaxis()->SetRangeUser(0,zmax); - //bestFit_.Draw("P same"); nllBestFit.Draw("P same"); - //contour68->Draw("same"); - c->SaveAs(outDir+"/deltaNLL-"+constTermName+".png"); - c->SaveAs(outDir+"/deltaNLL-"+constTermName+".eps"); - c->Clear(); - hist->SaveAs("tmp/hist-"+constTermName+".root"); - nllBestFit.SaveAs("tmp/nllBestFit.root"); - contour68->SaveAs("tmp/contour68.root"); + + std::cout << fileName << std::endl; + ofstream fout(fileName+".dat", ios_base::app); + fout << constTermName << "\t" << x << "\t" << y << std::endl; + + + c->SaveAs(fileName+".png"); + c->SaveAs(fileName+".eps"); + + fileName+="-zoom"; + hist->GetZaxis()->SetRangeUser(0,3); + //hist->GetXaxis()->SetRangeUser(0.00,0.12); + //hist->GetYaxis()->SetRangeUser(0,0.005); + c->SaveAs(fileName+".png"); + c->SaveAs(fileName+".eps"); + + +// hist->SaveAs(outDir+"/deltaNLL-"+constTermName+".root"); +// hist->Draw("colz"); +// bestFit_.Draw("P same"); +// bestFit_.SetMarkerSize(2); + + + +// nllBestFit.SetMarkerStyle(3); +// nllBestFit.SetMarkerColor(kRed); +// TList* contour68 = contourFromTH2(hist, 0.68); + +// hist->Draw("colz"); +// hist->GetZaxis()->SetRangeUser(0,zmax); +// //bestFit_.Draw("P same"); +// nllBestFit.Draw("P same"); +// //contour68->Draw("same"); delete hist; RooAbsPdf *histPdf = NULL; if(!opt.Contains("keys")){ - hist = prof2d(tree, alphaName, constTermName, "nll", - "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", false,true); - - histPdf = nllToL(hist); - }else{ - hist = prof2d(tree, alphaName, constTermName, "nll", - "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", false,false); - histPdf = Smooth(hist,1,"keys"); - } + hist = prof2d(tree, alphaName, constTermName, "nll", + binning, false, nSmooth, opt); + histPdf = nllToL(hist); + }else{ + hist = prof2d(tree, alphaName, constTermName, "nll", + binning, false,nSmooth); + histPdf = Smooth(hist,1,"keys"); + } delete hist; RooDataSet *gen_dataset=histPdf->generate(*histPdf->getVariables(),1000000,kTRUE,kFALSE); TTree *genTree = dataset2tree(gen_dataset); - genTree->SaveAs("tmp/genTree-"+constTermName+".root"); + genTree->SaveAs(fileName+"-genTree.root"); delete gen_dataset; delete histPdf; @@ -858,7 +894,7 @@ void MakePlots(TString filename, float zmax=50, bool invert=false, TString opt=" c->Clear(); g_multi.Draw("A"); c->SaveAs(outDir+"/smearing_vs_energy-"+constTermName+".png"); - + c->SaveAs(outDir+"/smearing_vs_energy-"+constTermName+".eps"); // TPaveText *pv = new TPaveText(0.7,0.7,1, 0.8); // TLegend *legend = new TLegend(0.7,0.8,0.95,0.92); // legend->SetFillStyle(3001); @@ -878,13 +914,14 @@ void MakePlots(TString filename, float zmax=50, bool invert=false, TString opt=" } -TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString fname="outProfile-scaleStep2smearing_7-Et_25-trigger-noPF-EB.root", TString opt=""){ + +TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString fname="outProfile-scaleStep2smearing_7-Et_25-trigger-noPF-EB.root", TString opt="", int nSmooth=10){ TString outDir=dirname; outDir.ReplaceAll("fitres","img"); outDir="tmp/"; //std::map deltaNLL_map; - bool smooth=false; - if(opt.Contains("smooth")) smooth=true; + //bool smooth=false; + //if(opt.Contains("smooth")) smooth=true; /*------------------------------ Plotto */ @@ -907,7 +944,7 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString std::map catIndexMap; ///1/ - for(int itoy =1; itoy <= 200; itoy++){ + for(int itoy =2; itoy <= 200; itoy++){ TString filename=dirname+"/"; filename+=itoy; filename+="/"+fname; TFile f_in(filename, "read"); @@ -915,7 +952,7 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString std::cerr << "File opening error: " << filename << std::endl; continue; //return NULL; } - + //std::cout << filename << std::endl; TList *KeyList = f_in.GetListOfKeys(); //std::cout << KeyList->GetEntries() << std::endl; for(int i =0; i < KeyList->GetEntries(); i++){ @@ -930,23 +967,27 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString TTree *tree = dataset2tree(dataset); TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); - TH2F *hist = prof2d(tree, alphaName, constTermName, "nll", - "(40,0.00025,0.02025,61,-0.0022975,0.1401475)", true,smooth); + TString binning="(241,-0.0005,0.2405,60,0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; + + TH2F *hist = prof2d(tree, constTermName, alphaName, "nll", binning, true, nSmooth, opt); //hist->SaveAs("myhist.root"); Int_t iBinX, iBinY; - hist->GetBinWithContent2(0.0002,iBinX,iBinY, 1,-1,1,-1,0.00001); + hist->GetBinWithContent2(0.0002,iBinX,iBinY,1,-1,1,-1,0.0000001); - if(iBinX!=0 && iBinY!=0 && iBinX < 41 && iBinY < 62){ + // if(iBinX!=0 && iBinY!=0 && iBinX < 41 && iBinY < 62){ + { TString catName_=constTermName; catName_.ReplaceAll("constTerm_",""); catName_.ReplaceAll("-","_"); if(catIndexMap.count(catName_)==0) catIndexMap.insert(std::pair(catName_,catIndexMap.size())); - catIndex=catIndexMap[catName_]; - - constTerm_tree = hist->GetXaxis()->GetBinCenter(iBinX); - alpha_tree = hist->GetYaxis()->GetBinCenter(iBinY); + catIndex=catIndexMap[catName_]; + constTerm_tree = hist->GetYaxis()->GetBinCenter(iBinY); + alpha_tree = hist->GetXaxis()->GetBinCenter(iBinX); sprintf(catName,"%s", catName_.Data()); bestFit_.GetPoint(0, constTermTrue_tree,alphaTrue_tree); - +// std::cout << constTerm_tree << " " << constTermTrue_tree +// << "\t" << alpha_tree << " " << alphaTrue_tree +// << std::endl; + if(opt.Contains("scandiff")){ constTermTrue_tree = getMinimumFromTree(tree, "nll",TString(constTermName).ReplaceAll("-","_")); } else if(opt.Contains("scan")){ @@ -955,9 +996,9 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString //std::cout << iBinX << "\t" << iBinY << "\t" << constTerm_tree - getMinimumFromTree(tree, "nll",TString(constTermName).ReplaceAll("-","_")) << std::endl; toys->Fill(); - }else{ - hist->SaveAs("myhist.root"); - exit(0); +// }else{ +// hist->SaveAs("myhist.root"); +// exit(0); } delete tree; delete hist; @@ -984,6 +1025,161 @@ TH1F *PlotToys(TTree *tree, Int_t catIndex, bool constTerm){ return h; } +void DrawToyTree(TTree *toys, TString outDir){ + +// toys->Draw("constTerm>>constTerm_0","catIndex==0"); +// toys->Draw("constTerm>>constTerm_1","catIndex==1"); +// toys->Draw("constTerm>>constTerm_2","catIndex==2"); +// toys->Draw("constTerm>>constTerm_3","catIndex==3"); +// toys->Draw("alpha>>alpha_3","catIndex==3"); +// toys->Draw("alpha>>alpha_2","catIndex==2"); +// toys->Draw("alpha>>alpha_1","catIndex==1"); +// toys->Draw("alpha>>alpha_0","catIndex==0"); +// toys->Draw("constTerm:alpha>>constTerm_alpha_0","catIndex==0"); +// toys->Draw("constTerm:alpha>>constTerm_alpha_1","catIndex==1"); +// toys->Draw("constTerm:alpha>>constTerm_alpha_2","catIndex==2"); +// toys->Draw("constTerm:alpha>>constTerm_alpha_3","catIndex==3"); + TString binning="(241,-0.0005,0.2405,60,0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; + + TString constTermBinning="(80,-0.02015,0.02025)"; + TString alphaTermBinning="(300,-0.1495,0.1505)"; + toys->Draw("constTerm-constTermTrue>>constTerm_0"+constTermBinning,"catIndex==0"); + toys->Draw("constTerm-constTermTrue>>constTerm_1"+constTermBinning,"catIndex==1"); + toys->Draw("constTerm-constTermTrue>>constTerm_2"+constTermBinning,"catIndex==2"); + toys->Draw("constTerm-constTermTrue>>constTerm_3"+constTermBinning,"catIndex==3"); + toys->Draw("alpha-alphaTrue>>alpha_3"+alphaTermBinning,"catIndex==3"); + toys->Draw("alpha-alphaTrue>>alpha_2"+alphaTermBinning,"catIndex==2"); + toys->Draw("alpha-alphaTrue>>alpha_1"+alphaTermBinning,"catIndex==1"); + toys->Draw("alpha-alphaTrue>>alpha_0"+alphaTermBinning,"catIndex==0"); + toys->Draw("constTerm:alpha>>constTerm_alpha_0"+binning,"catIndex==0"); + toys->Draw("constTerm:alpha>>constTerm_alpha_1"+binning,"catIndex==1"); + toys->Draw("constTerm:alpha>>constTerm_alpha_2"+binning,"catIndex==2"); + toys->Draw("constTerm:alpha>>constTerm_alpha_3"+binning,"catIndex==3"); + + TH1F *constTerm_alpha_0 = (TH1F *) gROOT->FindObject("constTerm_alpha_0"); + TH1F *constTerm_alpha_1 = (TH1F *) gROOT->FindObject("constTerm_alpha_1"); + TH1F *constTerm_alpha_2 = (TH1F *) gROOT->FindObject("constTerm_alpha_2"); + TH1F *constTerm_alpha_3 = (TH1F *) gROOT->FindObject("constTerm_alpha_3"); + + TH1F *constTerm_0 = (TH1F *) gROOT->FindObject("constTerm_0"); + TH1F *constTerm_1 = (TH1F *) gROOT->FindObject("constTerm_1"); + TH1F *constTerm_2 = (TH1F *) gROOT->FindObject("constTerm_2"); + TH1F *constTerm_3 = (TH1F *) gROOT->FindObject("constTerm_3"); + + TH1F *alpha_0 = (TH1F *) gROOT->FindObject("alpha_0"); + TH1F *alpha_1 = (TH1F *) gROOT->FindObject("alpha_1"); + TH1F *alpha_2 = (TH1F *) gROOT->FindObject("alpha_2"); + TH1F *alpha_3 = (TH1F *) gROOT->FindObject("alpha_3"); + + gStyle->SetOptStat(1); + + double xq[3]={0.5,0.68,0.95},yq[3]; + // for (Int_t i=0;iDraw("colz"); + constTerm_alpha_0->GetYaxis()->SetTitle("#Delta C"); + constTerm_alpha_0->GetXaxis()->SetTitle("#Delta S"); + constTerm_alpha_0->GetXaxis()->SetRangeUser(0,0.15); + constTerm_alpha_0->GetYaxis()->SetRangeUser(0,0.015); + c->SaveAs(outDir+"/constTerm_alpha_0.png"); + c->SaveAs(outDir+"/constTerm_alpha_0.eps"); + + constTerm_alpha_1->Draw("colz"); + constTerm_alpha_1->GetYaxis()->SetTitle("#Delta C"); + constTerm_alpha_1->GetXaxis()->SetTitle("#Delta S"); + constTerm_alpha_1->GetXaxis()->SetRangeUser(0,0.15); + constTerm_alpha_1->GetYaxis()->SetRangeUser(0,0.015); + c->SaveAs(outDir+"/constTerm_alpha_1.png"); + c->SaveAs(outDir+"/constTerm_alpha_1.eps"); + + constTerm_alpha_2->Draw("colz"); + constTerm_alpha_2->GetYaxis()->SetTitle("#Delta C"); + constTerm_alpha_2->GetXaxis()->SetTitle("#Delta S"); + constTerm_alpha_2->GetXaxis()->SetRangeUser(0,0.15); + constTerm_alpha_2->GetYaxis()->SetRangeUser(0,0.015); + c->SaveAs(outDir+"/constTerm_alpha_2.png"); + c->SaveAs(outDir+"/constTerm_alpha_2.eps"); + + constTerm_alpha_3->Draw("colz"); + constTerm_alpha_3->GetYaxis()->SetTitle("#Delta C"); + constTerm_alpha_3->GetXaxis()->SetTitle("#Delta S"); + constTerm_alpha_3->GetXaxis()->SetRangeUser(0,0.15); + constTerm_alpha_3->GetYaxis()->SetRangeUser(0,0.015); + c->SaveAs(outDir+"/constTerm_alpha_3.png"); + c->SaveAs(outDir+"/constTerm_alpha_3.eps"); + + ofstream fout(outDir+"/bias.dat"); + fout << "#------------------------------" << std::endl; + fout << "#median\t68%\t95%" << std::endl; + constTerm_0->Draw(); + constTerm_0->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_0->GetQuantiles(3,yq,xq); + fout << "constTerm_0: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + constTerm_0->Rebin(2); + c->SaveAs(outDir+"/constTerm_0.png"); + c->SaveAs(outDir+"/constTerm_0.eps"); + + constTerm_1->Draw(); + constTerm_1->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_1->GetQuantiles(3,yq,xq); + fout << "constTerm_1: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + constTerm_1->Rebin(2); + c->SaveAs(outDir+"/constTerm_1.png"); + c->SaveAs(outDir+"/constTerm_1.eps"); + + constTerm_2->Draw(); + constTerm_2->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_2->GetQuantiles(3,yq,xq); + fout << "constTerm_2: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + // constTerm_2->GetXaxis()->SetRangeUser(-0.005,0.005); + constTerm_2->Rebin(2); + c->SaveAs(outDir+"/constTerm_2.png"); + c->SaveAs(outDir+"/constTerm_2.eps"); + + constTerm_3->Draw(); + constTerm_3->GetXaxis()->SetTitle("#Delta C - #Delta C True"); + constTerm_3->GetQuantiles(3,yq,xq); + fout << "constTerm_3: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + constTerm_3->Rebin(2); + c->SaveAs(outDir+"/constTerm_3.png"); + c->SaveAs(outDir+"/constTerm_3.eps"); + + alpha_0->Draw(); + alpha_0->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + alpha_0->GetQuantiles(3,yq,xq); + fout << "alpha_0: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + alpha_0->Rebin(2); + c->SaveAs(outDir+"/alpha_0.png"); + c->SaveAs(outDir+"/alpha_0.eps"); + + alpha_1->Draw(); + alpha_1->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + alpha_1->GetQuantiles(3,yq,xq); + fout << "alpha_1: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + alpha_1->Rebin(2); + c->SaveAs(outDir+"/alpha_1.png"); + c->SaveAs(outDir+"/alpha_1.eps"); + + alpha_2->Draw(); + alpha_2->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + alpha_2->GetQuantiles(3,yq,xq); + fout << "alpha_2: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + alpha_2->Rebin(2); + c->SaveAs(outDir+"/alpha_2.png"); + c->SaveAs(outDir+"/alpha_2.eps"); + + alpha_3->Draw(); + alpha_3->GetXaxis()->SetTitle("#Delta S - #Delta S True"); + alpha_3->GetQuantiles(3,yq,xq); + fout << "alpha_3: " << yq[0] << "\t" << yq[1] << "\t" << yq[2] << std::endl; + alpha_3->Rebin(2); + c->SaveAs(outDir+"/alpha_3.png"); + c->SaveAs(outDir+"/alpha_3.eps"); + return; +} // lowEtaBad //tree->Draw(constTermName+":"+alphaName+">>h(16,0.0,0.08,20,0,0.02)",nllVarName+"-1.170791e+07","colz",10442-10232,10232) diff --git a/ZFitter/p.C b/ZFitter/p.C index 46cb36dc332..fd2af994eeb 100644 --- a/ZFitter/p.C +++ b/ZFitter/p.C @@ -1,17 +1,24 @@ { - bool smooth=true; - bool zoom=true; + int nSmooth=0; + TString optSmooth="k3a"; gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); + // TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/reducedPoints_fixed/0.01-0.00/2/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; + TString filename="test/dato/22Jan2012-runDepPowheg-noR9shift/loose/invMass_SC_regrCorrSemiParV5_pho/step4_fixed/fitres/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF.root"; + MakePlots(filename, 10, 10, optSmooth); + MakePlots(filename, 10, 3, optSmooth); + MakePlots(filename, 10, 1, optSmooth); + MakePlots(filename, 10, 0, optSmooth); +} TCanvas *c = new TCanvas("c",""); // gROOT->ProcessLine(".L ~/smooth.C+"); - TString constTermName="constTerm_absEta_0_1-bad-Et_25-trigger-noPF"; + //TString constTermName="constTerm_absEta_0_1-bad-Et_25-trigger-noPF"; //TString constTermName="constTerm_absEta_0_1-gold-Et_25-trigger-noPF"; - //TString constTermName="constTerm_absEta_1_1.4442-bad-Et_25-trigger-noPF"; - //TString constTermName="constTerm_absEta_1_1.4442-gold-Et_25-trigger-noPF"; + TString constTermName="constTerm_absEta_1_1.4442-bad-Et_25-trigger-noPF"; + //TString constTermName="constTerm_absEta_1_1.4442-gold-Et_25-trigger-noPF-EB"; TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); RooDataSet *data = (RooDataSet *)_file0->Get(constTermName); - + if(data!=NULL){ TTree *tree = dataset2tree(data); double min=tree->GetMinimum("nll"); TString minString; minString+=min; @@ -20,35 +27,42 @@ // h->GetZaxis()->SetRangeUser(0,100); TH2F *hprof = prof2d(tree, TString(constTermName).ReplaceAll("-","_"), TString(alphaName).ReplaceAll("-","_"), "nll", - "(241,-0.00025,0.24025,60,0.00025,0.03025)", true,smooth); + "(241,-0.00025,0.24025,60,0.00025,0.03025)", true, nSmooth); hprof->Draw("colz"); - if(zoom){ - hprof->GetZaxis()->SetRangeUser(0,10); - hprof->GetXaxis()->SetRangeUser(0,0.15); - hprof->GetYaxis()->SetRangeUser(0,0.018); - } else { - hprof->GetZaxis()->SetRangeUser(0,30); - hprof->GetXaxis()->SetRangeUser(0,0.15); - hprof->GetYaxis()->SetRangeUser(0,0.018); - } - hprof->GetXaxis()->SetTitle("#Delta #alpha"); - hprof->GetYaxis()->SetTitle("#Delta #sigma"); + hprof->GetZaxis()->SetRangeUser(0,30); + hprof->GetXaxis()->SetRangeUser(0,0.15); + hprof->GetYaxis()->SetRangeUser(0,0.018); + + hprof->GetXaxis()->SetTitle("#Delta S"); + hprof->GetYaxis()->SetTitle("#Delta C"); Int_t iBinX, iBinY; Double_t x,y; hprof->GetBinWithContent2(1.99999660253524780e-04,iBinX,iBinY); x= hprof->GetXaxis()->GetBinCenter(iBinX); y= hprof->GetYaxis()->GetBinCenter(iBinY); TGraph nllBestFit(1,&x,&y); - std::cout << constTermName << "\t" << x << "\t" << y << std::endl; + + TString fileName=constTermName; + fileName+="-"; fileName+=nSmooth; + nllBestFit.SetMarkerStyle(3); nllBestFit.SetMarkerColor(kRed); nllBestFit.Draw("P same"); - TString fileName=constTermName; - if(!smooth) fileName+="-noSmooth"; - if(zoom) fileName+="-zoom"; + std::cout << fileName << std::endl; + ofstream fout(fileName+".dat", ios_base::app); + fout << constTermName << "\t" << x << "\t" << y << std::endl; + + + c->SaveAs(fileName+".png"); + c->SaveAs(fileName+".eps"); + fileName+="-zoom"; + hprof->GetZaxis()->SetRangeUser(0,3); + hprof->GetXaxis()->SetRangeUser(0.04,0.12); + hprof->GetYaxis()->SetRangeUser(0,0.005); c->SaveAs(fileName+".png"); c->SaveAs(fileName+".eps"); + } } From 2e848a5809cb1cb1597fe9a8ae52fd135251f90d Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 11 Sep 2013 12:12:05 +0200 Subject: [PATCH 165/475] inclusive histograms plotting added --- ZFitter/macro/plot_data_mc.C | 38 +++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C index 43a7bde9cb9..42d53312872 100644 --- a/ZFitter/macro/plot_data_mc.C +++ b/ZFitter/macro/plot_data_mc.C @@ -186,7 +186,7 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen legend->SetFillStyle(1001); legend->Draw(); - std::cout << "Saving into " << img_filename(filename, region, ".eps") << std::endl; + c->SaveAs(img_filename(filename, region, ".eps")); c->SaveAs(img_filename(filename, region, ".png")); c->SaveAs(img_filename(filename, region, ".C")); @@ -240,7 +240,7 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ /*------------------------------ somma sugli istogrammi */ std::cout << "Data Entries in " << keyName << "\t" << h->GetEntries() << std::endl; - if(type.CompareTo("data")==0 || type.CompareTo("smeardata")==0 ){ + if(type.CompareTo("data")==0 || type.CompareTo("smeardata")==0){ if(dataHist.find(region)==dataHist.end()){ hist_t hist_vec; // vector of bins of ONE histogram AddHist(hist_vec, h); // add the content of the histogram h to the vector @@ -279,11 +279,13 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ legend->SetMargin(0.4); // percentuale della larghezza del simbolo // SetLegendStyle(legend); + TH1F *mc_all[3]={NULL}, *data_all[3]={NULL}, *mcSmeared_all[3]={NULL}; + for(std::map::const_iterator itr = dataHist.begin(); itr!= dataHist.end(); itr++){ c->cd(); TString region=itr->first; - std::cout << region << std::endl; + // for(int i_region=0; i_region < n_region -1; i_region++){ // for(int j_region=i_region; j_region < n_region; j_region++){ // region="region_"; @@ -299,8 +301,38 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ TH1F *data=GetMeanHist(dataHist[region], h_ref, "data_"+region, true); TH1F *mcSmeared=GetMeanHist(mcSmearedHist[region], h_ref, "mcSmeared_"+region); + if(region.Contains("EE")){ + if(mc_all[1] == NULL) mc_all[1]=(TH1F *) mc->Clone("EE_mc_hist"); + else mc_all[1]->Add(mc); + if(data_all[1] == NULL) data_all[1]=(TH1F *) data->Clone("EE_data_hist"); + else data_all[1]->Add(data); + if(mcSmeared_all[1] == NULL) mcSmeared_all[1]=(TH1F *) mcSmeared->Clone("EE_mcSmeared_hist"); + else mcSmeared_all[1]->Add(mcSmeared); + } + + if(region.Contains("EB")){ + if(mc_all[0] == NULL) mc_all[0]=(TH1F *) mc->Clone("EB_mc_hist"); + else mc_all[0]->Add(mc); + if(data_all[0] == NULL) data_all[0]=(TH1F *) data->Clone("EB_data_hist"); + else data_all[0]->Add(data); + if(mcSmeared_all[0] == NULL) mcSmeared_all[0]=(TH1F *) mcSmeared->Clone("EB_mcSmeared_hist"); + else mcSmeared_all[0]->Add(mcSmeared); + } + + if(mc_all[2] == NULL) mc_all[2]=(TH1F *) mc->Clone("all_mc_hist"); + else mc_all[2]->Add(mc); + if(data_all[2] == NULL) data_all[2]=(TH1F *) data->Clone("all_data_hist"); + else data_all[2]->Add(data); + if(mcSmeared_all[2] == NULL) mcSmeared_all[2]=(TH1F *) mcSmeared->Clone("all_mcSmeared_hist"); + else mcSmeared_all[2]->Add(mcSmeared); + + Plot(c, data,mc,mcSmeared,legend, region, filename, energy, lumi); } + + // Plot(c, data_all[0],mc_all[0],mcSmeared_all[0],legend, "EBinclusive", filename, energy, lumi); + // Plot(c, data_all[1],mc_all[1],mcSmeared_all[1],legend, "EEinclusive", filename, energy, lumi); + // Plot(c, data_all[2],mc_all[2],mcSmeared_all[2],legend, "Allinclusive", filename, energy, lumi); // } delete c; f_in.Close(); From df568883b433de4a7eecbfbab96f4fceabd947a7 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 11 Sep 2013 12:13:21 +0200 Subject: [PATCH 166/475] nSmearToyLimit as pre-processor macro, removed categories with left sholder --- ZFitter/src/RooSmearer.cc | 41 ++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 6b852b1b29b..9abdc2fc8b5 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -1,5 +1,6 @@ #include "../interface/RooSmearer.hh" #include +#define NSMEARTOYLIM 1000 //#define DEBUG //#define CPU_DEBUG #include @@ -210,7 +211,7 @@ void RooSmearer::InitCategories(bool mcToy){ float max=cat.hist_mc->GetMaximum(); float left=cat.hist_mc->GetBinContent(1); float right=cat.hist_mc->GetBinContent(cat.hist_mc->GetNbinsX()); - if((right - left)/max > 0.2){ + if((right - left)/max > 0.2 || (left - right)/max > 0.4){ cat.active=false; std::cout << "[INFO] Category: " << ZeeCategories.size() << ": " << cat.categoryName1 << "\t" << cat.categoryName2 @@ -266,7 +267,7 @@ TH1F *RooSmearer::GetSmearedHisto(ZeeCategory& category, bool isMC, std::cerr << "[ERROR] histogram pointer is NULL!!!" << std::endl; exit(1); } - std::cerr << "[DEBUG] isMC: " << isMC << "\tsmearEnergy: " << smearEnergy << std::endl; + //std::cerr << "[DEBUG] isMC: " << isMC << "\tsmearEnergy: " << smearEnergy << std::endl; #endif // to be put as single if @@ -345,11 +346,11 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, //std::cout << "---" << std::endl; //_paramSet.writeToStream(std::cout, kFALSE); #endif - if(nSmearToy>150){ + if(nSmearToy>NSMEARTOYLIM){ std::cerr << "[ERROR] nSmearToy = " << nSmearToy << std::endl; exit(1); } - double smearEne1[150], smearEne2[150]; // _nSmearToy<100 + double smearEne1[NSMEARTOYLIM], smearEne2[NSMEARTOYLIM]; // _nSmearToy<100 for(zee_events_t::const_iterator event_itr = cache.begin(); event_itr!= cache.end(); event_itr++){ @@ -491,11 +492,16 @@ float RooSmearer::getCompatibility() const //bool withSmearToy=(compatibility - nllMin < deltaNLLMaxSmearToy); //std::cout << "[DEBUG] Compatibility1: " << compatibility << "\t" << compatibility - nllMin << std::endl; //compatibility=0; + bool updated=false; for(std::vector::iterator cat_itr = myClass->ZeeCategories.begin(); cat_itr != myClass->ZeeCategories.end(); cat_itr++){ if(!cat_itr->active) continue; if(isCategoryChanged(*cat_itr,true)){ // && withSmearToy){ + updated=true; +#ifdef DEBUG + std::cout << "[DEBUG] " << cat_itr->categoryName1 << " - " << cat_itr->categoryName2 << "\t isupdated" << std::endl; +#endif myClass->UpdateCategoryNLL(*cat_itr, cat_itr->nLLtoy); //the new nll has been updated for the category } compatibility+=cat_itr->nll; @@ -505,7 +511,7 @@ float RooSmearer::getCompatibility() const #endif } //if(withSmearToy) std::cout << "[DEBUG] Compatibility2: " << compatibility << "\t" << compatibility - nllMin << std::endl; - if(dataset!=NULL && lastNLL!=compatibility){ + if(dataset!=NULL && updated){ myClass->nllVar.setVal(compatibility); myClass->dataset->add(RooArgSet(_paramSet,nllVar)); } @@ -707,6 +713,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ category.nSmearToy=(int)(300000./catSize); if(category.nSmearToy <7) category.nSmearToy = 7; // fix the min to 3 else if( category.nSmearToy > 40) category.nSmearToy = 40; // fix the max to 20 + category.nSmearToy=400; if(!smearscan) return; @@ -714,7 +721,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ double stdDev=10; double min=10; int nBin_min=0; int n=0; - unsigned int nSmearToyLim=130; + unsigned int nSmearToyLim=NSMEARTOYLIM-1; category.nLLtoy=1; for(int iBin=0; iBin<1; iBin++){ //category.nBins=(int) ((category.invMass_max-category.invMass_min)/2.); @@ -725,12 +732,15 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ for(category.nLLtoy=1; category.nLLtoy < 2; category.nLLtoy+=2){ for(; category.nSmearToy <= nSmearToyLim && stdDev>1; category.nSmearToy*=2){ double sum=0, sum2=0; - for(n=0; n<300; n++){ + TStopwatch cl; + cl.Start(); + for(n=0; n<50; n++){ UpdateCategoryNLL(category, category.nLLtoy); //the new nll has been updated for the category sum+=category.nll; sum2+=category.nll * category.nll; } + cl.Stop(); sum/=n; sum2/=n; stdDev= sqrt(sum2 - sum*sum); @@ -742,18 +752,21 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ std::cout << "[DEBUG] " << "\t" << category.categoryIndex1 - << "\t" << category.categoryIndex2 + << " " << category.categoryIndex2 << "\t" << stdDev << "\t" << sum - << "\t" << stdDev/sum + << " " << stdDev/sum << "\t" << category.nSmearToy - << "\t" << category.nLLtoy - << "\t" << category.nBins + << " " << category.nLLtoy + << " " << category.nBins << "\tmcEvents=" << category.mc_events->size() << "\tdataEvents=" << category.data_events->size() - << std::endl; + << "\t"; + cl.Print(); + //<< std::endl; } - if(category.nSmearToy > nSmearToyLim) category.nSmearToy/=2; + //if(category.nSmearToy > nSmearToyLim) category.nSmearToy/=2; + category.nSmearToy/=2; } } @@ -944,7 +957,7 @@ void RooSmearer::SetNSmear(unsigned int n_smear, unsigned int nlltoy){ void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool mcToy, bool externToy, TString initFile){ - if(mcToy) _isDataSmeared=externToy; //mcToy; + if(mcToy) _isDataSmeared=!externToy; //mcToy; if(initFile.Sizeof()>1){ std::cout << "[INFO] Truth values for toys initialized to " << std::endl; //truthSet->readFromFile(initFile); From b43ebf41a1f30a49fdf4c31f9f0f6c3be35c08b0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 11 Sep 2013 12:15:18 +0200 Subject: [PATCH 167/475] harder cuts in 2D scan limits, findmin1D introduced in minprofile --- ZFitter/src/nllProfile.cc | 197 +++++++++++++++++++++++++++----------- 1 file changed, 140 insertions(+), 57 deletions(-) diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 225f15f12a7..5ca16e07b7b 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -50,15 +50,19 @@ #define FIT_LIMIT 0.01 #define ITER_MAX 20 +//#define DEBUG +#define PROFILE_NBINS 2000 + using namespace RooStats; //Get Profile after smearing TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=1, bool warningEnable=true, bool trueEval=true); TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval){ TString name(var->GetName()); + std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << std::endl; double minValue=var->getVal(); double minYvalue=compatibility.evaluate(); - std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << std::endl; + //std::cout << "Prof: " << name << "\t" << minValue << "\t" << minYvalue << std::endl; //double error=var->getError(); @@ -155,9 +159,9 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w case 5: if(name.Contains("scale")){ - bin_width=0.0005; // level1/10 + bin_width=0.0001; // level1/10 }else if(name.Contains("const")){ - bin_width=0.0005; //level1/10 + bin_width=0.0001; //level1/10 } else if(name.Contains("alpha")){ bin_width=0.001; } @@ -167,26 +171,29 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w } nBin=(int)((range_max-range_min)/bin_width); - if(var->isConstant()==false){ - while(nBin <10 && nBin>1){ - //std::cout << "[INFO] Updating from range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; - bin_width*=0.9; - range_min = std::max(var->getMin(),bin_width*((floor)(range_min / bin_width))- bin_width); - range_max = std::min(var->getMax(),bin_width*((floor)(range_max / bin_width))+ bin_width); - nBin=(int)((range_max-range_min)/bin_width); - //std::cout << "[INFO] Updating to range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; - if(nBin <=0){ - std::cout << "[ERROR] NBins < 10" << std::endl; - exit(1); - } - } - while(nBin >40 && level<4){ - bin_width*=1.1; - range_min = bin_width*((floor)(range_min / bin_width)); - range_max = bin_width*((floor)(range_max / bin_width)); - nBin=(int)((range_max-range_min)/bin_width); - } - } +#ifdef DEBUG + std::cout << "nBin = " << nBin << std::endl; +#endif +// if(var->isConstant()==false){ +// while(nBin <10 && nBin>1){ +// //std::cout << "[INFO] Updating from range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; +// bin_width*=0.9; +// range_min = std::max(var->getMin(),bin_width*((floor)(range_min / bin_width))- bin_width); +// range_max = std::min(var->getMax(),bin_width*((floor)(range_max / bin_width))+ bin_width); +// nBin=(int)((range_max-range_min)/bin_width); +// //std::cout << "[INFO] Updating to range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; +// if(nBin <=0){ +// std::cout << "[ERROR] NBins < 10" << std::endl; +// exit(1); +// } +// } +// while(nBin >40 && level<4 && level > 0){ +// bin_width*=1.1; +// range_min = bin_width*((floor)(range_min / bin_width)); +// range_max = bin_width*((floor)(range_max / bin_width)); +// nBin=(int)((range_max-range_min)/bin_width); +// } +// } double chi2[PROFILE_NBINS]; double xValues[PROFILE_NBINS]; if(trueEval) std::cout << "------------------------------" << std::endl; @@ -196,18 +203,20 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w { double value = range_min+bin_width*iVal; #ifdef DEBUG - std::cout << "testing function @ " << value << std::endl; + // std::cout << "testing function @ " << value << std::endl; #endif - var->setVal(value); + xValues[iVal]=value; - if(trueEval) chi2[iVal]=compatibility.evaluate(); //-minYvalue; - else chi2[iVal]=0; + if(trueEval){ + var->setVal(value); + chi2[iVal]=compatibility.evaluate(); //-minYvalue; + } else chi2[iVal]=0; if (warningEnable && trueEval && chi2[iVal] < minYvalue ){ std::cout << "[WARNING]: min in likelihood profile < min in MIGRAD: " << chi2[iVal]-minYvalue << " < " << minYvalue << std::endl; std::cout << "xValue = " << value << "\t" << "[" << range_min << ":" << range_max << "]" << std::endl; } #ifdef DEBUG - std::cout << "value is " << chi2[iVal] << std::endl; + if(trueEval) std::cout << "value is " << chi2[iVal] << std::endl; #endif } myClock.Stop(); @@ -517,15 +526,38 @@ void Smooth(TH2F *h, Int_t ntimes, Option_t *option) delete [] ebuf; } +bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t locmin){ + if(abs(i-iLocMin)>2 && chi2-min > 300){ std::cout << "stop 1" << std::endl; return true;} + if(abs(i-iLocMin)>5 && chi2-min > 200){ std::cout << "stop 2" << std::endl; return true;} +// if(abs(i-iLocMin)>6 && chi2-locmin > 120){ std::cout << "stop 3" << std::endl; return true;} +// if(abs(i-iLocMin)>7 && chi2-locmin > 80){ std::cout << "stop 4" << std::endl; return true;} +// if(abs(i-iLocMin)>8 && chi2-locmin > 50){ std::cout << "stop 8" << std::endl; return true;} +// if(abs(i-iLocMin)>9 && chi2-locmin > 20){ std::cout << "stop 9" << std::endl; return true;} +// if(abs(i-iLocMin)>10 && chi2-locmin > 10){ std::cout << "stop 10" << std::endl; return true;} +// if(abs(i-iLocMin)>11 && chi2-locmin > 5){ std::cout << "stop 11" << std::endl; return true;} +// if(abs(i-iLocMin)>12 && chi2-locmin > 3){ std::cout << "stop 12" << std::endl; return true;} + + if(abs(i-iLocMin)>3 && chi2-locmin > 20){ std::cout << "stop 3" << std::endl; return true;} + if(abs(i-iLocMin)>4 && chi2-locmin > 10){ std::cout << "stop 4" << std::endl; return true;} + if(abs(i-iLocMin)>5 && chi2-locmin > 5){ std::cout << "stop 8" << std::endl; return true;} + if(abs(i-iLocMin)>6 && chi2-locmin > 3){ std::cout << "stop 9" << std::endl; return true;} + + return false; +} Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL){ + Double_t vInit=var->getVal(); var->setVal(X[iMinStart]); + TStopwatch timer; + timer.Start(); Double_t chi2, chi2init=smearer.evaluate(); + timer.Stop(); + timer.Print(); Double_t locmin=1e20; Int_t iLocMin=iMinStart; std::queue chi2old; - Double_t NY[200]={0.}; + Double_t NY[PROFILE_NBINS]={0.}; for(Int_t i =iMinStart; i setVal(X[i]); @@ -535,9 +567,10 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t NY[i]++; } #ifdef DEBUG - if(update==true) - std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + // if(update==true) + #endif + std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -549,16 +582,14 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t } } - if(chi2old.size()>2 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} - if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} - if(chi2old.size()>4){ - if(chi2-chi2old.back() >80 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100) break; // jump to the next constTerm - if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>100 && chi2-locmin >150) break; + if(stopFindMin1D(i,iLocMin, chi2, min, locmin)) break; + if(i==iLocMin && i-iMinStart==3 && Y[iMinStart]==Y[iMinStart+1] && Y[iMinStart]==Y[iMinStart+2] && Y[iMinStart]==Y[iMinStart+3]){ + std::cerr << "[WARNING] No sensitivity to variable: " << var->GetName() << std::endl; + std::cerr << " Variable changed to constant" << std::endl; + std::cout << "[WARNING] No sensitivity to variable: " << var->GetName() << std::endl; + std::cout << " Variable changed to constant" << std::endl; + return -1; } - chi2old.push(chi2); } @@ -574,9 +605,11 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t } #ifdef DEBUG - if(update==true) + //if(update==true) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; #endif + std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -587,16 +620,8 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t chi2old.pop(); } } - - if(chi2old.size()>2 && chi2-min > 300){ std::cout << "stop 1" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-min > 200){ std::cout << "stop 2" << std::endl; break;} - if(abs(i-iLocMin)>7 && chi2-locmin > 150){ std::cout << "stop 3" << std::endl; break;} - if(abs(i-iLocMin)>8 && chi2-locmin > 120){ std::cout << "stop 4" << std::endl; break;} - if(chi2old.size()>4){ - if(chi2-chi2old.back() >80 && chi2-locmin >100){ std::cout << "stop 5" << std::endl; break;} - if(chi2old.size()> 6 && chi2-chi2old.back() >40 && chi2-locmin >100){ std::cout << "stop 6" << std::endl; break;} - if(chi2old.size()> 7 && chi2old.front()-chi2old.back()>50 && chi2-locmin >100){ std::cout << "stop 7" << std::endl; break;} - } + + if(stopFindMin1D(i,iLocMin, chi2, min, locmin)) break; chi2old.push(chi2); } @@ -617,7 +642,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i Double_t min_old, Double_t& min, bool update=true){ if(iProfile==2) iProfile=-1; if(iProfile>2) return false; - //smearer.SetNSmear(0,10); + bool changed=false; std::cout << "------------------------------ MinProfile2D: iProfile==" << iProfile << std::endl; std::cout << "--------------------------------- GetProfile for " << var1->GetName() << std::endl; @@ -657,6 +682,16 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i std::cout << "--------------------------------- Grid eval " << std::endl; TH2F h("hist2","",N1,0,N1,N2,0,N2); for(Int_t i1 =0; i1 0.02 && chi2>locmin+200){ + N1=i1; + break; + } + if(chi2>locmin+10){ + std::cout << "[STATUS] Stopping 2D scan in constantTerm direction" << std::endl; + N1=i1; + break; + } + for(Int_t i2=0; i2 < N2; i2++){ // reset Y values Y[i2]=0; } @@ -679,7 +714,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i chi2=smearer.evaluate(); #ifndef smooth - if(update==true || true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; + if(update==true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; #endif if(chi2<=locmin){ //local minimum iLocMin1=i1; @@ -693,12 +728,17 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i var2->setVal(v2); #ifdef smooth - Smooth(&h, 1, "k3a"); + for(int iSmooth=0; iSmooth<10; iSmooth++){ + Smooth(&h, 1, "k3a"); + } + //Smooth(&h, 1, "k3a"); for(Int_t i1=0; i10){ +#ifdef DEBUG if(update==true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locminSmooth-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; +#endif if(content>0 && locminSmooth > content){ locminSmooth=content; iLocMin1=i1; @@ -737,7 +777,7 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i std::cout << "------------------------------" << std::endl; // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; - // smearer.SetNSmear(0,1); + delete g1; delete g2; delete Y; @@ -750,24 +790,55 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, Double_t min_old, Double_t& min){ bool changed=false; + bool trueEval=true; + Double_t v1=var->getVal(); + +#ifndef old + if(iProfile>2) return false; + // don't put SetNSmear here otherwise it will recalculate every category! + if(iProfile>1) iProfile=-1; + else if(iProfile==1) iProfile=2; + + trueEval=false; +#endif + std::cout << "[STATUS] Starting MinProfile for " << var->GetName() << "\t" << iProfile << std::endl; - TGraph *profil = GetProfile(var, smearer, iProfile, false); + TGraph *profil = GetProfile(var, smearer, iProfile, false,trueEval); TGraphErrors g(profil->GetN(),profil->GetX(), profil->GetY()); Double_t *X = g.GetX(); Double_t *Y = g.GetY(); Int_t N = g.GetN(); +#ifndef old + Double_t *Y2 = new Double_t[PROFILE_NBINS]; +#endif Double_t chi2=Y[0]; Double_t chi2init=smearer.evaluate(); //Int_t iMin = 1; //, iLow=1, iHigh=1; Int_t iMin_=1; // minimum of the graph //find minimum +#ifndef old + for(Int_t i2=0; i2 < N; i2++){ // reset Y values + Y2[i2]=0; + } +#endif +#ifdef old for(Int_t i =0; i GetName() << ": " << i << " " << X[i] << " " << Y[i]-chi2init << " " << chi2-chi2init << " " << min-chi2 << std::endl; } - +#else + iMin_= FindMin1D(var, X, N, N/2, min, smearer, true, Y2); + if(iMin_<0){ // in case of no sensitivity to the variable it is put has constant and the minimization is interrupted + var->setVal(v1); + var->setConstant(); + return false; + } + chi2=Y2[iMin_]; + var->setVal(v1); +#endif + if(chi2getVal() != X[iMin_]) changed=true; //the value has been updated, need a new iteration @@ -776,6 +847,14 @@ bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, if(chi2< chi2init && (iMin_<=1 || iMin_>=N-1)){ // on the border, need a new iteration var->setVal(X[iMin_]); std::cout << "[INFO] Minimized at the border of the interval: need another iteration" << std::endl; + std::cout << " iMin_ = " << iMin_ << "\t" << X[iMin_] << std::endl; + for(Int_t i2=0; i2 < N; i2++){ // reset Y values + std::cout << i2 << "\t" << Y2[i2]-Y2[0] << std::endl; + } + +#ifndef old + exit(1); +#endif MinProfile(var, smearer, iProfile, min_old, min); changed=true; return changed; @@ -800,6 +879,9 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int std::cout << "[INFO] Minimization: profile" << std::endl; std::cout << "[INFO] Re-initialize nllMin: 1e20" << std::endl; smearer.nllMin=1e20; + std::cout << "[INFO] Setting initial evaluation" << std::endl; + + smearer.evaluate(); Double_t min_old = 9999999999.; Double_t min = 999999999.; bool updateError = false; @@ -807,6 +889,7 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int TStopwatch myClock; myClock.Start(); + std::cout << "[INFO] Starting minimization" << std::endl; RooArgList argList_(args); TIterator *it_ = NULL; while((min < min_old || updateError==true) && nIter <1){ From 38b39b7d8b6a3bc551db5b399a75d912106dffe5 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 11 Sep 2013 12:16:55 +0200 Subject: [PATCH 168/475] add check --- ZFitter/src/EnergyScaleCorrection_class.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 2f044f9c62f..ba2191c0d4b 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -450,6 +450,10 @@ TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, TTree *newTree = new TTree("smearEle_"+correctionType,correctionType); newTree->Branch("smearEle", smearEle_, "smearEle[2]/F"); + if(tree==NULL){ + std::cerr << "[ERROR] original chain in GetSmearTree is NULL" << std::endl; + exit(1); + } if(fastLoop){ tree->SetBranchStatus("*",0); tree->SetBranchStatus(energyEleBranchName,1); From 53584c8d4fd8a16a64f02f6b7c7972a009ad64cd Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 15 Sep 2013 18:37:21 +0200 Subject: [PATCH 169/475] fixed smearings --- ZFitter/interface/RooSmearer.hh | 6 ++---- ZFitter/interface/ZeeEvent.hh | 2 +- ZFitter/src/RooSmearer.cc | 35 +++++++++++++++++++++------------ ZFitter/src/SmearingImporter.cc | 10 ++++++++-- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index 6fb37c233f4..bca50a5b933 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -60,9 +60,7 @@ public: RooArgSet pars1; RooArgSet pars2; - // RooArgSet pars1_old; - //RooArgSet pars2_old; - + // old values double scale1,constant1, alpha1; double scale2,constant2, alpha2; @@ -221,7 +219,7 @@ private: //double smearedEnergy(float ene,float scale,float alpha,float //constant) const; - double smearedEnergy(double *smear, unsigned int nGen, float ene,float scale,float alpha,float constant) const; + float smearedEnergy(float *smear, unsigned int nGen, float ene,float scale,float alpha,float constant, const float *fixedSmearings=NULL) const; void SetSmearedHisto(const zee_events_t& cache, RooArgSet pars1, RooArgSet pars2, TString categoryName1, TString categoryName2, unsigned int nSmearToy, diff --git a/ZFitter/interface/ZeeEvent.hh b/ZFitter/interface/ZeeEvent.hh index 6f8a0c0c20f..ed3f8820acb 100644 --- a/ZFitter/interface/ZeeEvent.hh +++ b/ZFitter/interface/ZeeEvent.hh @@ -22,7 +22,7 @@ class ZeeEvent{ // float pu_weight; // float r9weight1; // float r9weight2; - + float smearings_ele1[400], smearings_ele2[400]; }; diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 9abdc2fc8b5..7c4246c5a83 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -1,6 +1,7 @@ #include "../interface/RooSmearer.hh" #include -#define NSMEARTOYLIM 1000 +#define NSMEARTOYLIM 10 +#define FIXEDSMEARINGS //#define DEBUG //#define CPU_DEBUG #include @@ -30,7 +31,7 @@ RooSmearer::RooSmearer(const char *name, ///< name of the variable _paramSet("paramSet","Set of parameters",this), invMass_min_(80), invMass_max_(100), invMass_bin_(0.25), deltaNLLMaxSmearToy(330), - _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(1), + _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(NSMEARTOYLIM), nllBase(0), nllVar("nll","",0,1e20), _isDataSmeared(false), @@ -350,21 +351,23 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, std::cerr << "[ERROR] nSmearToy = " << nSmearToy << std::endl; exit(1); } - double smearEne1[NSMEARTOYLIM], smearEne2[NSMEARTOYLIM]; // _nSmearToy<100 + + float smearEne1[NSMEARTOYLIM], smearEne2[NSMEARTOYLIM]; // _nSmearToy<100 + for(zee_events_t::const_iterator event_itr = cache.begin(); event_itr!= cache.end(); event_itr++){ - // random gen time is consuming!!! test different _nSmearToy to verify - smearedEnergy(smearEne1, nSmearToy, event_itr->energy_ele1, scale1, alpha1, constant1); - smearedEnergy(smearEne2, nSmearToy, event_itr->energy_ele2, scale2, alpha2, constant2); +#ifdef FIXEDSMEARINGS + smearedEnergy(smearEne1, nSmearToy, event_itr->energy_ele1, scale1, alpha1, constant1, event_itr->smearings_ele1); + smearedEnergy(smearEne2, nSmearToy, event_itr->energy_ele2, scale2, alpha2, constant2, event_itr->smearings_ele2); +#else + // random gen time is consuming!!! test different _nSmearToy to verify + smearedEnergy(smearEne1, nSmearToy, event_itr->energy_ele1, scale1, alpha1, constant1,NULL); + smearedEnergy(smearEne2, nSmearToy, event_itr->energy_ele2, scale2, alpha2, constant2,NULL); +#endif for(unsigned int iSmearToy=0; iSmearToy < nSmearToy; iSmearToy++){ - // float energy1 = smearedEnergy(event_itr->energy_ele1, scale1, alpha1, constant1) ; - // float energy2 = smearedEnergy(event_itr->energy_ele2, scale2, alpha2, constant2) ; - // float invMass = sqrt(2 * energy1 * energy2 * event_itr->angle_eta_ele1_ele2); hist->Fill(event_itr->invMass * sqrt(smearEne1[iSmearToy] * smearEne2[iSmearToy]), - //smearedEnergy(event_itr->energy_ele1, scale1, alpha1, constant1) * - //smearedEnergy(event_itr->energy_ele2, scale2, alpha2, constant2)), event_itr->weight); } } @@ -380,7 +383,7 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, -double RooSmearer::smearedEnergy(double *smear, unsigned int nGen, float ene,float scale,float alpha,float constant) const +float RooSmearer::smearedEnergy(float *smear, unsigned int nGen, float ene,float scale,float alpha,float constant, const float *fixedSmearings) const { // sigmaMB = sigma Material Budget // if I want to take into account the non perfet simulation of the @@ -394,9 +397,15 @@ double RooSmearer::smearedEnergy(double *smear, unsigned int nGen, float ene,flo // float sigma = sqrt(alpha/sqrt(ene)*alpha/sqrt(ene) + constant * constant + sigmaMB*sigmaMB); float sigma = sqrt(alpha*alpha/ene + constant * constant ); +#ifdef FIXEDSMEARINGS + for(unsigned int i=0; i < nGen; i++){ + smear[i] = (fixedSmearings[i]*sigma)+(scale); + } +#else for(unsigned int i=0; i < nGen; i++){ smear[i] = rgen_->Gaus(scale,sigma); } +#endif return smear[0]; } @@ -713,7 +722,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ category.nSmearToy=(int)(300000./catSize); if(category.nSmearToy <7) category.nSmearToy = 7; // fix the min to 3 else if( category.nSmearToy > 40) category.nSmearToy = 40; // fix the max to 20 - category.nSmearToy=400; + category.nSmearToy=200; if(!smearscan) return; diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index d250692507c..05580b831b4 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -7,6 +7,7 @@ //#define DEBUG #include #define SELECTOR +#define FIXEDSMEARINGS SmearingImporter::SmearingImporter(std::vector regionList, TString energyBranchName, TString commonCut): // _chain(chain), _regionList(regionList), @@ -68,6 +69,7 @@ void SmearingImporter::ImportToy(Long64_t nEvents, event_cache_t& eventCache, bo void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryList *entryList, bool swap){ std::cerr << "[ERROR] Entering wrong function!" << std::endl; exit(1); + TRandom3 gen(0); // for the energy calculation Float_t energyEle[2]; Float_t corrEle_[2]={1,1}; @@ -165,8 +167,12 @@ void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryLis if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; - - +#ifdef FIXEDSMEARINGS + for(int i=0; i < 400; i++){ + event.smearings_ele1[i] = gen.Gaus(0,1); + event.smearings_ele2[i] = gen.Gaus(0,1); + } +#endif eventCache.push_back(event); } From f8fa23331bad3bf8cdd76a74a286a2b507d23fbb Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 17 Sep 2013 10:49:42 +0200 Subject: [PATCH 170/475] fixed for toy study --- ZFitter/bin/ZFitter.cpp | 16 +- ZFitter/interface/RooSmearer.hh | 2 +- ZFitter/interface/SmearingImporter.hh | 2 + ZFitter/interface/ZeeEvent.hh | 3 +- ZFitter/p.C | 5 +- ZFitter/script/energyScale.sh | 76 +++- ZFitter/script/justOnce/smearing.sh | 96 +++-- ZFitter/src/RooSmearer.cc | 32 +- ZFitter/src/SmearingImporter.cc | 28 +- ZFitter/src/nllProfile.cc | 483 +++++++++++--------------- 10 files changed, 397 insertions(+), 346 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 15e8bae9941..a7c0dadfdd7 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -849,8 +849,8 @@ int main(int argc, char **argv) { RooAbsReal *const_term_=NULL; RooRealVar *const_term_v = args.getSize() ==0 ? NULL : (RooRealVar *) args.find("constTerm_"+varName); if(const_term_v==NULL){ - if(vm.count("constTermFix")==0) const_term_v = new RooRealVar("constTerm_"+*region_itr, "constTerm_"+varName,0.01, 0.0005,0.05); - else const_term_v = new RooRealVar("constTerm_"+varName, "constTerm_"+varName,0.01, 0.0005,0.02); + if(vm.count("constTermFix")==0) const_term_v = new RooRealVar("constTerm_"+*region_itr, "constTerm_"+varName,0.01, 0.000,0.05); + else const_term_v = new RooRealVar("constTerm_"+varName, "constTerm_"+varName,0.01, 0.000,0.02); const_term_v->setError(0.03); // 1% //const_term_v->setConstant(true); args.add(*const_term_v); @@ -1159,15 +1159,18 @@ int main(int argc, char **argv) { double min=0.; TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList.find(alphaName): NULL; + TGraph *profilePhi=NULL; if(var2!=NULL && name.Contains("constTerm") && var2->isConstant()==false){ smearer.SetDataSet(name,TString(var->GetName())+TString(var2->GetName())); - if(vm.count("constTermFix")) MinProfile2D(var, var2, smearer, -1, 0., min, false); + + if(vm.count("constTermFix")) MinProfile2D(var, var2, smearer, -1, 0., min, false, &profilePhi); //MinMCMC2D(var, var2, smearer, 1, 0., min, 1200, false); //MinMCMC2D(var, var2, smearer, 2, 0., min, 800, false); //MinMCMC2D(var, var2, smearer, 3, 0., min, 100, false); smearer.dataset->Write(); TString of=outFile; of.ReplaceAll(".root",name+".root"); smearer.dataset->SaveAs(of); + } //if(!name.Contains("scale")) continue; std::cout << "Doing " << name << "\t" << var->getVal() << std::endl; @@ -1180,8 +1183,13 @@ int main(int argc, char **argv) { fOutProfile->cd(); profil->Write(); std::cout << "Saved profile for " << name << std::endl; + profilePhi->SetName(n+"_phi"); + profilePhi->Draw("AP*"); + profilePhi->Write(); + std::cout << "Saved profile for " << name << std::endl; + delete profil; - + delete profilePhi; } std::cout << "Cloning args" << std::endl; // RooArgSet *mu = (RooArgSet *)args.snapshot(); diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index bca50a5b933..b7158636eec 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -219,7 +219,7 @@ private: //double smearedEnergy(float ene,float scale,float alpha,float //constant) const; - float smearedEnergy(float *smear, unsigned int nGen, float ene,float scale,float alpha,float constant, const float *fixedSmearings=NULL) const; + double smearedEnergy(double *smear, unsigned int nGen, float ene,float scale,float alpha,float constant, const float *fixedSmearings=NULL) const; void SetSmearedHisto(const zee_events_t& cache, RooArgSet pars1, RooArgSet pars2, TString categoryName1, TString categoryName2, unsigned int nSmearToy, diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index 13eca5c5402..04fb2882c97 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -8,6 +8,8 @@ #include #include +#define NSMEARTOYLIM 30 + #include "ZeeEvent.hh" #include "ElectronCategory_class.hh" // prende le TChain diff --git a/ZFitter/interface/ZeeEvent.hh b/ZFitter/interface/ZeeEvent.hh index ed3f8820acb..f726cf5bfe3 100644 --- a/ZFitter/interface/ZeeEvent.hh +++ b/ZFitter/interface/ZeeEvent.hh @@ -22,7 +22,8 @@ class ZeeEvent{ // float pu_weight; // float r9weight1; // float r9weight2; - float smearings_ele1[400], smearings_ele2[400]; + float *smearings_ele1, *smearings_ele2; + // float smearings_ele1[NSMEARTOY], *smearings_ele2; }; diff --git a/ZFitter/p.C b/ZFitter/p.C index fd2af994eeb..140c01e4216 100644 --- a/ZFitter/p.C +++ b/ZFitter/p.C @@ -3,8 +3,9 @@ TString optSmooth="k3a"; gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); - // TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/reducedPoints_fixed/0.01-0.00/2/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; - TString filename="test/dato/22Jan2012-runDepPowheg-noR9shift/loose/invMass_SC_regrCorrSemiParV5_pho/step4_fixed/fitres/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF.root"; + TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorized/0.01-0.00/2/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; + // TString filename="test/dato/22Jan2012-runDepPowheg-noR9shift/loose/invMass_SC_regrCorrSemiParV5_pho/step4_fixed/fitres/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF.root"; + MakePlots(filename, 10, 10, optSmooth); MakePlots(filename, 10, 3, optSmooth); MakePlots(filename, 10, 1, optSmooth); diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 767103c4919..bbf92e3049f 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -188,6 +188,37 @@ if [ -n "${STEP2}" ];then if [ ! -e "${outDirData}/step2/fitres" ];then mkdir ${outDirData}/step2/fitres -p; fi if [ ! -e "${outDirData}/step2/img" ];then mkdir ${outDirData}/step2/img -p; fi + if [ ! -e "${outDirData}/step2_fixed/fitres" ];then mkdir ${outDirData}/step2_fixed/fitres -p; fi + if [ ! -e "${outDirData}/step2_fixed/img" ];then mkdir ${outDirData}/step2_fixed/img -p; fi + + if [ ! -e "${outDirData}/step2_0.8bad/fitres" ];then mkdir ${outDirData}/step2_0.8bad/fitres -p; fi + if [ ! -e "${outDirData}/step2_0.8bad/img" ]; then mkdir ${outDirData}/step2_0.8bad/img -p; fi + + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_8.dat + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut}-R9p_0.8 \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2_0.8bad/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2_0.8bad/img \ + --smearerFit --autoNsmear --constTermFix --alphaGoldFix \ + --corrEleType HggRunEta \ + --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ + --initFile=${outDirData}/step2/fitres/params-scaleStep2smearing_8-${commonCut}-R9p_0.8.txt \ + --addBranch=smearerCat > ${outDirData}/log/step20.8badsmearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + + exit 0 + regionFile=data/regions/scaleStep2smearing_8.dat + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --smearerFit --autoNsmear \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ + --addBranch=smearerCat --constTermFix \ + --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat > ${outDirData}/log/step2smearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log + + + exit 0 regionFile=data/regions/scaleStep2smearing_1.dat ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoNsmear \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ @@ -251,6 +282,26 @@ if [ -n "${STEP4}" ];then if [ ! -e "${outDirData}/step4/fitres" ];then mkdir ${outDirData}/step4/fitres -p; fi if [ ! -e "${outDirData}/step4/img" ];then mkdir ${outDirData}/step4/img -p; fi + if [ ! -e "${outDirData}/step4_fixed/fitres" ];then mkdir ${outDirData}/step4_fixed/fitres -p; fi + if [ ! -e "${outDirData}/step4_fixed/img" ];then mkdir ${outDirData}/step4_fixed/img -p; fi + + if [ ! -e "${outDirData}/step4_constOnly/fitres" ];then mkdir ${outDirData}/step4_constOnly/fitres -p; fi + if [ ! -e "${outDirData}/step4_constOnly/img" ];then mkdir ${outDirData}/step4_constOnly/img -p; fi + +# #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ +# regionFile=data/regions/scaleStep2smearing_8.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4_fixed/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4_fixed/img \ +# --smearerFit --autoNsmear --constTermFix --alphaGoldFix \ +# --corrEleType HggRunEta \ +# --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ +# --plotOnly --initFile=${outDirData}/step2/fitres/params-scaleStep2smearing_8-${commonCut}.txt \ +# --addBranch=smearerCat > ${outDirData}/log/step4fixedplotOnlysmearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + + #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 +# exit 0 # regionFile=data/regions/scaleStep4smearing_0.dat # ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ # $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ @@ -271,16 +322,17 @@ if [ -n "${STEP4}" ];then # --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ # > ${outDirData}/log/step4smearing_0a-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 -# regionFile=data/regions/scaleStep4smearing_1.dat -# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ -# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ -# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ -# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ -# --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ -# > ${outDirData}/log/step4smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 -# #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 + regionFile=data/regions/scaleStep4smearing_1.dat + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ + --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ + --plotOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ + --addBranch=smearerCat \ + > ${outDirData}/log/step4smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 # # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_1.txt # # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_1.root @@ -294,8 +346,8 @@ if [ -n "${STEP4}" ];then --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ - --addBranch smearerCat \ + --plotOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ + --addBranch=smearerCat \ > ${outDirData}/log/step4smearing_2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_2.txt diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index 2388eaaffe3..4828efa1c91 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -1,16 +1,25 @@ #!/bin/bash -#1000 100000 +### +###grep "DEBUG" test/dato/smearscan.log | awk '{print $2,$3,$4,$7,$17}' | awk '{if($2!=old){print line; old=$2;line=$0}else{line=$0}}'| awk '($3>1){print $0}' | less + #regionsFile=scaleStep2smearing_7 -nEventsPerToy=new +queue=$1 +nEventsPerToy=factorized_${queue} +#nEventsPerToy=factorized +if [ -z "${queue}" ];then local=y; fi + for regionsFile in scaleStep2smearing_8 #scaleStep2smearing_5 scaleStep2smearing_6 do dir=test/dato/fitres/Hgg_Et-toys/${regionsFile} -alphaConst=C +#alphaConst=C + -for const in 0.01 0.02 #0.005 +for constAlpha in 0.01-0.00 0.000-0.07 0.007-0.05 #0.0005 0.02 0.005 do - for alpha in 0.00 0.15 #0.01 0.03 0.07 - do + const=`echo $constAlpha | cut -d '-' -f 1` + alpha=`echo $constAlpha | cut -d '-' -f 2` + #for alpha in 0.00 # 0.05 #0.10 #0.15 0.00 #0.03 0.07 + # do echo "[[[[[[[[[[[ const:alpha ]]]]]]]]]]] ${const}:${alpha}" baseDir=${dir}/${nEventsPerToy}/${const}-${alpha}/ mkdir -p $baseDir @@ -24,14 +33,18 @@ EE-absEta_1.566_2-gold ${const} ${alpha} EE-absEta_2_2.5-bad ${const} ${alpha} EE-absEta_2_2.5-gold ${const} ${alpha} EOF - cat data/validation/toyMC2.dat | sed 's|^d|k|;s|^s|d|;s|^k|s|;/smearEle/ d;/smaerCat/ d' | sed "s|scaleStep2smearing_7|$regionsFile|" > ${baseDir}/invertedToyMC.dat - if [ ! -e "smearEle_HggRunEtaR9_mc-${const}-${alpha}.root" ];then - ./bin/ZFitter.exe -f ${baseDir}/invertedToyMC.dat --regionsFile=data/regions/${regionsFile}.dat \ - --commonCut=Et_25-trigger-noPF-EB \ - --autoNsmear --constTermFix --saveRootMacro --noPU \ - --smearEleType=HggRunEtaR9 --smearEleFile=${baseDir}/smearEleFile.dat > ${baseDir}/treeGen.log || exit 1 - mv tmp/smearEle_HggRunEtaR9_mc.root smearEle_HggRunEtaR9_mc-${const}-${alpha}.root || exit 1 - fi +#| #sed 's|^d|k|;s|^s|d|;s|^k|s|;/smearEle/ d;/smaerCat/ d' | sed "s|scaleStep2smearing_7|$regionsFile|" > + cat data/validation/toyMC-smearingMethod.dat > ${baseDir}/invertedToyMC.dat +# if [ ! -e "smearEle_HggRunEtaR9_s1-invertedToyMC-${const}-${alpha}.root" ];then +# ./bin/ZFitter.exe -f ${baseDir}/invertedToyMC.dat --regionsFile=data/regions/${regionsFile}.dat \ +# --commonCut=Et_25-trigger-noPF \ +# --autoNsmear --constTermFix --saveRootMacro --noPU \ +# --smearEleType=HggRunEtaR9 --smearEleFile=${baseDir}/smearEleFile.dat #> ${baseDir}/treeGen.log || exit 1 +# mv tmp/smearEle_HggRunEtaR9_s1-invertedToyMC.root smearEle_HggRunEtaR9_s1-invertedToyMC-${const}-${alpha}.root || exit 1 +# mv tmp/smearEle_HggRunEtaR9_s2-invertedToyMC.root smearEle_HggRunEtaR9_s2-invertedToyMC-${const}-${alpha}.root || exit 1 +# fi + + # if [ ! -e "smearerCat_stdPowheg-${regionsFile}.root" -o ! -e "smearerCat_stdMadgraph-${regionsFile}.root" ];then # echo "[STATUS] Generating smearerCat for data and mc!" # ./bin/ZFitter.exe -f data/validation/toyMC2.dat --regionsFile=data/regions/${regionsFile}.dat \ @@ -43,15 +56,15 @@ EOF # fi - if [ ! -e "smearerCat-22Jan-stdMC_data-${regionsFile}.root" -o ! -e "smearerCat-22Jan-stdMC_mc-${regionsFile}.root" ];then - echo "[STATUS] Generating smearerCat for data and mc!" - ./bin/ZFitter.exe -f data/validation/toyMC2.dat --regionsFile=data/regions/${regionsFile}.dat \ - --commonCut=Et_25-trigger-noPF-EB \ - --autoNsmear --constTermFix --saveRootMacro --noPU \ - --addBranch smearerCat > ${baseDir}/smearerCatGen.log || exit 1 - mv tmp/smearerCat_mc.root smearerCat-22Jan-stdMC_mc-${regionsFile}.root || exit 1 - mv tmp/smearerCat_data.root smearerCat-22Jan-stdMC_data-${regionsFile}.root || exit 1 - fi +# if [ ! -e "smearerCat-22Jan-stdMC_data-${regionsFile}.root" -o ! -e "smearerCat-22Jan-stdMC_mc-${regionsFile}.root" ];then +# echo "[STATUS] Generating smearerCat for data and mc!" +# ./bin/ZFitter.exe -f data/validation/toyMC2.dat --regionsFile=data/regions/${regionsFile}.dat \ +# --commonCut=Et_25-trigger-noPF-EB \ +# --autoNsmear --constTermFix --saveRootMacro --noPU \ +# --addBranch smearerCat > ${baseDir}/smearerCatGen.log || exit 1 +# mv tmp/smearerCat_mc.root smearerCat-22Jan-stdMC_mc-${regionsFile}.root || exit 1 +# mv tmp/smearerCat_data.root smearerCat-22Jan-stdMC_data-${regionsFile}.root || exit 1 +# fi cat > $baseDir/${alphaConst}/mcToy.txt < $baseDir/toyMC.dat - echo "s smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_mc-${const}-${alpha}.root" >> $baseDir/toyMC.dat + #sed '/smearEle/ d' + cat data/validation/toyMC-smearingMethod.dat > ${baseDir}/toyMC.dat #| sed "s|scaleStep2smearing_7|$regionsFile|" > $baseDir/toyMC.dat +# echo "s1 smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_s1-invertedToyMC-${const}-${alpha}.root" >> $baseDir/toyMC.dat +# echo "s2 smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_s2-invertedToyMC-${const}-${alpha}.root" >> $baseDir/toyMC.dat for nToys in `seq 1 200`; do newDir=${baseDir}/${alphaConst}/${nToys} mkdir -p $newDir + ls $newDir - bsub -q 2nd -oo ${newDir}/stdout.log -eo ${newDir}/stderr.log -J "$regionsFile-$const-$alpha" \ - "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch5/src/calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ + if [ -z "${local}" ];then + bsub -q ${queue} -oo ${newDir}/stdout.log -eo ${newDir}/stderr.log -J "$regionsFile-$const-$alpha" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ --regionsFile=data/regions/${regionsFile}.dat \ --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ - --autoNsmear --constTermFix --smearerType=profile --noPU \ + --constTermFix --alphaGoldFix --smearerType=profile --noPU \ --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy > ${newDir}/log2.log" -# ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ -# --regionsFile=data/regions/${regionsFile}.dat \ -# --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ -# --autoNsmear --constTermFix --smearerType=profile --noPU \ -# --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy #> ${newDir}/log2.log + else + echo "#============================================================ Toy = $nToys" + ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ + --regionsFile=data/regions/${regionsFile}.dat \ + --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ + --constTermFix --smearerType=profile --noPU --alphaGoldFix \ + --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy |tee ${newDir}/log2.log + fi done wait done wait done -done +#done exit 0 diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 7c4246c5a83..791c82c921d 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -1,6 +1,5 @@ #include "../interface/RooSmearer.hh" #include -#define NSMEARTOYLIM 10 #define FIXEDSMEARINGS //#define DEBUG //#define CPU_DEBUG @@ -31,7 +30,7 @@ RooSmearer::RooSmearer(const char *name, ///< name of the variable _paramSet("paramSet","Set of parameters",this), invMass_min_(80), invMass_max_(100), invMass_bin_(0.25), deltaNLLMaxSmearToy(330), - _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(NSMEARTOYLIM), + _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(NSMEARTOYLIM-1), nllBase(0), nllVar("nll","",0,1e20), _isDataSmeared(false), @@ -302,6 +301,10 @@ TH1F *RooSmearer::GetSmearedHisto(ZeeCategory& category, bool isMC, (*h)->Reset(); // unuseful: histogram should be empty SetHisto(*cache, *h); } + +// if(isMC==false){ +// delete cache; +// } return *h; } @@ -352,8 +355,11 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, exit(1); } - float smearEne1[NSMEARTOYLIM], smearEne2[NSMEARTOYLIM]; // _nSmearToy<100 - + double smearEne1[NSMEARTOYLIM], smearEne2[NSMEARTOYLIM]; // _nSmearToy<100 + if(cache.begin()->smearings_ele1==NULL){ + std::cerr<< "[ERROR] No smearings" << std::endl; + exit(1); + } for(zee_events_t::const_iterator event_itr = cache.begin(); event_itr!= cache.end(); event_itr++){ @@ -366,10 +372,13 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, smearedEnergy(smearEne1, nSmearToy, event_itr->energy_ele1, scale1, alpha1, constant1,NULL); smearedEnergy(smearEne2, nSmearToy, event_itr->energy_ele2, scale2, alpha2, constant2,NULL); #endif - for(unsigned int iSmearToy=0; iSmearToy < nSmearToy; iSmearToy++){ - hist->Fill(event_itr->invMass * sqrt(smearEne1[iSmearToy] * smearEne2[iSmearToy]), - event_itr->weight); - } +// if(event_itr==cache.begin()){ +// std::cout << "fixedSmearings: " << event_itr->smearings_ele1[0] << "\t" << scale1 << "\t" << alpha1 << "\t" << event_itr->energy_ele1 << "\t" << constant1 << "\t" << smearEne1[0] << std::endl; +// } + for(unsigned int iSmearToy=0; iSmearToy < nSmearToy; iSmearToy++){ + hist->Fill(event_itr->invMass * sqrt(smearEne1[iSmearToy] * smearEne2[iSmearToy]), + event_itr->weight); + } } hist->Scale(1./nSmearToy); // hist->Scale(1./hist->Integral()); // now saved as pdf @@ -383,7 +392,7 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, -float RooSmearer::smearedEnergy(float *smear, unsigned int nGen, float ene,float scale,float alpha,float constant, const float *fixedSmearings) const +double RooSmearer::smearedEnergy(double *smear, unsigned int nGen, float ene,float scale,float alpha,float constant, const float *fixedSmearings) const { // sigmaMB = sigma Material Budget // if I want to take into account the non perfet simulation of the @@ -516,7 +525,7 @@ float RooSmearer::getCompatibility() const compatibility+=cat_itr->nll; myClass->lastNLLrms+= (cat_itr->nllRMS*cat_itr->nllRMS); #ifdef DEBUG - std::cout << "[DEBUG] Compatibility: " << compatibility << std::endl; + std::cout << "[DEBUG] Compatibility: " << compatibility << "\t" << compatibility-lastNLL << std::endl; #endif } //if(withSmearToy) std::cout << "[DEBUG] Compatibility2: " << compatibility << "\t" << compatibility - nllMin << std::endl; @@ -722,7 +731,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ category.nSmearToy=(int)(300000./catSize); if(category.nSmearToy <7) category.nSmearToy = 7; // fix the min to 3 else if( category.nSmearToy > 40) category.nSmearToy = 40; // fix the max to 20 - category.nSmearToy=200; + category.nSmearToy=NSMEARTOYLIM; if(!smearscan) return; @@ -1003,6 +1012,7 @@ void RooSmearer::UpdateCategoryNLL(ZeeCategory& cat, unsigned int nLLtoy, bool m } comp/=nLLtoy; comp2/=nLLtoy; + // std::cout << "nll - comp = " << cat.nll +comp << std::endl; cat.nll= -comp; cat.nllRMS= sqrt(comp2-comp*comp); return; diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 05580b831b4..c136a83be11 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -69,7 +69,7 @@ void SmearingImporter::ImportToy(Long64_t nEvents, event_cache_t& eventCache, bo void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryList *entryList, bool swap){ std::cerr << "[ERROR] Entering wrong function!" << std::endl; exit(1); - TRandom3 gen(0); + TRandom3 gen(12345); // for the energy calculation Float_t energyEle[2]; Float_t corrEle_[2]={1,1}; @@ -168,9 +168,12 @@ void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryLis if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; #ifdef FIXEDSMEARINGS - for(int i=0; i < 400; i++){ - event.smearings_ele1[i] = gen.Gaus(0,1); - event.smearings_ele2[i] = gen.Gaus(0,1); + for(int i=0; i < NSMEARTOYLIM; i++){ + event.smearings_ele1[i] = (float) gen.Gaus(0,1); + event.smearings_ele2[i] = (float) gen.Gaus(0,1); +// if(i==0 && eventCache.size()==0){ +// std::cout << event.smearings_ele1[0] << std::endl; +// } } #endif eventCache.push_back(event); @@ -185,7 +188,9 @@ void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryLis } void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents, bool isToy, bool externToy){ - + + TRandom3 gen(12345); + // for the energy calculation Float_t energyEle[2]; Float_t corrEle_[2]={1,1}; @@ -371,6 +376,19 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; +#ifdef FIXEDSMEARINGS + // if(isMC || isToy){ + event.smearings_ele1 = new float[NSMEARTOYLIM]; + event.smearings_ele2 = new float[NSMEARTOYLIM]; + for(int i=0; i < NSMEARTOYLIM; i++){ + event.smearings_ele1[i] = (float) gen.Gaus(0,1); + event.smearings_ele2[i] = (float) gen.Gaus(0,1); + } +// } else { +// event.smearings_ele1 = NULL; +// event.smearings_ele2 = NULL; +// } +#endif cache.at(evIndex).push_back(event); //(cache[evIndex]).push_back(event); diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 5ca16e07b7b..00cf9006d94 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -34,6 +34,8 @@ #include #include #include +#define _USE_MATH_DEFINES +#include #include #include @@ -56,22 +58,18 @@ using namespace RooStats; //Get Profile after smearing -TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=1, bool warningEnable=true, bool trueEval=true); -TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval){ +TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=-1, bool warningEnable=true, bool trueEval=true, float rho=0, float Emean=0); +TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval, float rho, float Emean){ TString name(var->GetName()); - std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << std::endl; + if(trueEval) std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << "\t" << rho << std::endl; double minValue=var->getVal(); - double minYvalue=compatibility.evaluate(); - - - //std::cout << "Prof: " << name << "\t" << minValue << "\t" << minYvalue << std::endl; - //double error=var->getError(); + //double minYvalue=compatibility.evaluate(); double bin_width=0., range_min=0., range_max=0., sigma=0.; int nBin=0; switch(level){ case -1: - return GetProfile(var, compatibility, 5,false,false); + return GetProfile(var, compatibility, 5,false,false,rho, Emean); break; case 0: TGraph *g1; g1 =GetProfile(var, compatibility, 1,false); @@ -165,12 +163,17 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w } else if(name.Contains("alpha")){ bin_width=0.001; } + if((name.Contains("alpha") || name.Contains("const")) && (Emean!=0 && rho!=0)) bin_width=0.025; + range_min = var->getMin(); range_max = var->getMax(); break; + } nBin=(int)((range_max-range_min)/bin_width); + if(Emean!=0 && rho!=0) nBin=(int) (M_PI_2 / bin_width); + #ifdef DEBUG std::cout << "nBin = " << nBin << std::endl; #endif @@ -197,13 +200,16 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w double chi2[PROFILE_NBINS]; double xValues[PROFILE_NBINS]; if(trueEval) std::cout << "------------------------------" << std::endl; - TStopwatch myClock; - myClock.Start(); for (int iVal=0;iValsetVal(value); chi2[iVal]=compatibility.evaluate(); //-minYvalue; } else chi2[iVal]=0; - if (warningEnable && trueEval && chi2[iVal] < minYvalue ){ - std::cout << "[WARNING]: min in likelihood profile < min in MIGRAD: " << chi2[iVal]-minYvalue << " < " << minYvalue << std::endl; - std::cout << "xValue = " << value << "\t" << "[" << range_min << ":" << range_max << "]" << std::endl; - } #ifdef DEBUG if(trueEval) std::cout << "value is " << chi2[iVal] << std::endl; #endif } - myClock.Stop(); if(trueEval){ std::cout << name << "\tlevel=" << level << "; nBins=" << nBin << "; range_min=" << range_min << "; range_max=" << range_max << "; bin_width=" << bin_width << "\t"; - myClock.Print(); std::cout << "------------------------------" << std::endl; } @@ -541,18 +541,19 @@ bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t if(abs(i-iLocMin)>4 && chi2-locmin > 10){ std::cout << "stop 4" << std::endl; return true;} if(abs(i-iLocMin)>5 && chi2-locmin > 5){ std::cout << "stop 8" << std::endl; return true;} if(abs(i-iLocMin)>6 && chi2-locmin > 3){ std::cout << "stop 9" << std::endl; return true;} + if(abs(i-iLocMin)>7 && chi2-locmin > 2){ std::cout << "stop 10" << std::endl; return true;} + if(abs(i-iLocMin)>8 && chi2-locmin > 1){ std::cout << "stop 10" << std::endl; return true;} return false; } -Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL){ +Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL, RooRealVar *var2=NULL, Double_t *X2=NULL){ Double_t vInit=var->getVal(); var->setVal(X[iMinStart]); - TStopwatch timer; - timer.Start(); + if(var2!=NULL) var2->setVal(X2[iMinStart]); + if(Y==NULL) exit(1); + Double_t chi2, chi2init=smearer.evaluate(); - timer.Stop(); - timer.Print(); Double_t locmin=1e20; Int_t iLocMin=iMinStart; @@ -561,16 +562,14 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t for(Int_t i =iMinStart; i setVal(X[i]); + if(var2!=NULL) var2->setVal(X2[i]); chi2=smearer.evaluate(); - if(Y!=NULL){ - Y[i] += chi2; - NY[i]++; - } -#ifdef DEBUG - // if(update==true) - -#endif - std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + Y[i] += chi2; + NY[i]++; + + if(var2!=NULL) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << + chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + else std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -598,17 +597,18 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t } for(Int_t i =iMinStart; i >=0; i--){ //loop versus positive side var->setVal(X[i]); + if(var2!=NULL) var2->setVal(X2[i]); chi2=smearer.evaluate(); - if(Y!=NULL){ - Y[i] += chi2; - NY[i]++; - } + Y[i] += chi2; + NY[i]++; #ifdef DEBUG //if(update==true) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; #endif - std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + if(var2!=NULL) std::cout << "[DEBUG] Neg" << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << + chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + else std::cout << "[DEBUG] Neg" << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; @@ -634,253 +634,217 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t return iLocMin; } - -/** - min is updated - */ -bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, - Double_t min_old, Double_t& min, bool update=true){ - if(iProfile==2) iProfile=-1; - if(iProfile>2) return false; - +bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, + Double_t min_old, Double_t& min, double rho=0, double Emean=0){ bool changed=false; - std::cout << "------------------------------ MinProfile2D: iProfile==" << iProfile << std::endl; - std::cout << "--------------------------------- GetProfile for " << var1->GetName() << std::endl; - TGraph *g1 = GetProfile(var1, smearer, iProfile, false, false); // take only the binning - std::cout << "--------------------------------- GetProfile for " << var2->GetName() << std::endl; - TGraph *g2 = GetProfile(var2, smearer, iProfile, false, false); // take only the binning - - - Double_t *X1 = g1->GetX(); - Double_t *X2 = g2->GetX(); - Int_t N1 = g1->GetN(); - Int_t N2 = g2->GetN(); - Double_t *Y = new Double_t[N2]; - - std::cout << "--------------------------------- Init eval " << std::endl; - //initial values - Double_t v1=var1->getVal(); - Double_t v2=var2->getVal(); - if(var1->isConstant()){ - X1[0] = v1; - N1=1; - } - if(var2->isConstant()){ - X2[0] = v2; - N2=1; - } - - Double_t chi2, chi2init=smearer.evaluate(); - - Double_t locmin=1e20, locminSmooth=1e20; - Int_t iLocMin1=0, iLocMin2, iLocMin2Prev=N2/3; - - TStopwatch myClock; - myClock.Start(); + Double_t v1=var->getVal(); + //Double_t chi2init= + smearer.evaluate(); - std::cout << "--------------------------------- Grid eval " << std::endl; - TH2F h("hist2","",N1,0,N1,N2,0,N2); - for(Int_t i1 =0; i1 0.02 && chi2>locmin+200){ - N1=i1; - break; - } - if(chi2>locmin+10){ - std::cout << "[STATUS] Stopping 2D scan in constantTerm direction" << std::endl; - N1=i1; - break; - } + std::cout << "[STATUS] Starting MinProfile for " << var->GetName() << "\t" << iProfile << std::endl; + TGraph *profil = GetProfile(var, smearer, iProfile, false, false, rho, Emean); + //TGraphErrors g(profil->GetN(),profil->GetX(), profil->GetY()); - for(Int_t i2=0; i2 < N2; i2++){ // reset Y values - Y[i2]=0; - } - var1->setVal(X1[i1]); - std::queue chi2old; + Double_t *X = profil->GetX(); + Double_t *Y = profil->GetY(); + Int_t N = profil->GetN(); - iLocMin2Prev = FindMin1D(var2, X2, N2, iLocMin2Prev, locmin, smearer, true, Y); - for(Int_t i2=0; i2 < N2; i2++){ -#ifdef DEBUG - if(Y[i2]!=0) std::cout << i1 << "\t" << i2 << "\t" << X1[i1] << "\t" << X2[i2] << "\t" << Y[i2]; -#endif - h.Fill(i1,i2,Y[i2]); -#ifdef DEBUG - if(Y[i2]!=0) std::cout << "\t" << h.GetBinContent(i1+1,i2+1) << std::endl; -#endif - } - - var2->setVal(X2[iLocMin2Prev]); - chi2=smearer.evaluate(); + Double_t chi2=Y[0]; -#ifndef smooth - if(update==true) std::cout << "[DEBUG] " << var1->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; -#endif - if(chi2<=locmin){ //local minimum - iLocMin1=i1; - iLocMin2=iLocMin2Prev; - locmin=chi2; - } - } - // reset to initial value - var1->setVal(v1); - var2->setVal(v2); + Int_t iMin_=0; // minimum of the graph -#ifdef smooth - for(int iSmooth=0; iSmooth<10; iSmooth++){ - Smooth(&h, 1, "k3a"); - } - //Smooth(&h, 1, "k3a"); - for(Int_t i1=0; i10){ -#ifdef DEBUG - if(update==true) std::cout << "[DEBUG] " << X1[i1] << "\t" << X2[i2] << "\t" << content-chi2init << "\t" << locminSmooth-chi2init << "\t" << min-chi2init << "\t" << smearer.nllMin-chi2init << std::endl; -#endif - if(content>0 && locminSmooth > content){ - locminSmooth=content; - iLocMin1=i1; - iLocMin2=i2; - } - } - } + for(Int_t i2=0; i2 < N; i2++){ // reset Y values + Y[i2]=0; + if(X[iMin_] < v1) iMin_++; } - locmin=locminSmooth; -#endif - if(update && locminsetVal(v1); + var->setConstant(); + return false; } + chi2=Y[iMin_]; - // if a new minimum has been found now, or due to another variable, need to update the scale - if(update && (minGetName() << "\t" << v1 << " -> " << X1[iLocMin1] << std::endl - << " " << var2->GetName() << "\t" << v2 << " -> " << X2[iLocMin2] << std::endl - << " " << min << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; - var1->setVal(X1[iLocMin1]); - var2->setVal(X2[iLocMin2]); + var->setVal(v1); //reset to initial value + + if(chi2getVal() != X[iMin_]) changed=true; //the value has been updated, need a new iteration + //else a fluctuation changed the min value + } + + if(minGetName() << " from " << v1 << " to " << X[iMin_] << std::endl + << " min = " << min << "; Y[iMin_]-min = " << Y[iMin_]-min << std::endl; + var->setVal(X[iMin_]); + //var->setError(newError); } else{ - std::cout << "[INFO] Not-Updating variable:" << std::endl - << " " << var1->GetName() << "\t" << v1 << " -> " << X1[iLocMin1] << std::endl - << " " << var2->GetName() << "\t" << v2 << " -> " << X2[iLocMin2] << std::endl - << " " << min << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + std::cout << "[INFO] Not-Updating variable:" << var->GetName() << "\t" << X[iMin_] + << " " << min << " " << Y[iMin_]-min << std::endl; } - - std::cout << "------------------------------" << std::endl; - myClock.Stop(); - std::cout << var1->GetName() << "\tlevel=" << iProfile << "; nBins=" << N1 << "; range_min=" << X1[0] << "; range_max=" << X1[N1-1] << "; bin_width=" << X1[1]-X1[0] << std::endl; - std::cout << var2->GetName() << "\tlevel=" << iProfile << "; nBins=" << N2 << "; range_min=" << X2[0] << "; range_max=" << X2[N2-1] << "; bin_width=" << X2[1]-X2[0] << std::endl; - myClock.Print(); - std::cout << "------------------------------" << std::endl; - // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; - - delete g1; - delete g2; - delete Y; + delete profil; return changed; } +/** + min is updated + */ +bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, + Double_t min_old, Double_t& min, bool update=true, TGraph **g=NULL){ + bool changed=false; + std::cout << "------------------------------ MinProfile2D: iProfile==" << iProfile << std::endl; - + std::cout << "--------------------------------- Init eval " << std::endl; + //initial values + Double_t v1=var1->getVal(); + Double_t v2=var2->getVal(); + smearer.evaluate(); + Double_t chi2; //, chi2init=smearer.evaluate(); + Double_t locmin=1e20; -bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, - Double_t min_old, Double_t& min){ - bool changed=false; - bool trueEval=true; - Double_t v1=var->getVal(); + TStopwatch myClock; + myClock.Start(); + + var2->setVal(0); + changed+=MinProfile(var1, smearer, -1, min_old, locmin); // best DeltaC with DeltaS=0 + // rho = best DeltaC with DeltaS=0 + double rho = var1->getVal(); + + locmin=1e20; + var1->setVal(0); + MinProfile(var2, smearer, -1, min_old, locmin); // best DeltaS with DeltaC=0 -#ifndef old - if(iProfile>2) return false; - // don't put SetNSmear here otherwise it will recalculate every category! - if(iProfile>1) iProfile=-1; - else if(iProfile==1) iProfile=2; + //sqrt() = DeltaS/DeltaC + double Emean = var2->getVal()/rho; - trueEval=false; -#endif + std::cout << "--------------------------------- GetProfile for " << var1->GetName() << std::endl; + TGraph *g1 = GetProfile(var1, smearer, iProfile, false, false, rho, Emean); // take only the binning + std::cout << "--------------------------------- GetProfile for " << var2->GetName() << std::endl; + TGraph *g2 = GetProfile(var2, smearer, iProfile, false, false, rho, Emean); // take only the binning + + Double_t *X1 = g1->GetX(); + Double_t *X2 = g2->GetX(); + Int_t N = g1->GetN(); - std::cout << "[STATUS] Starting MinProfile for " << var->GetName() << "\t" << iProfile << std::endl; - TGraph *profil = GetProfile(var, smearer, iProfile, false,trueEval); - TGraphErrors g(profil->GetN(),profil->GetX(), profil->GetY()); + if(N!=g2->GetN()){ + std::cerr << "[ERROR] N1!=N2 for phi minimization: " << N << "\t"<GetN() << std::endl; + exit(1); + } + // Double_t *Y = new Double_t[N2]; + Double_t *Y = g1->GetY(); - Double_t *X = g.GetX(); - Double_t *Y = g.GetY(); - Int_t N = g.GetN(); -#ifndef old - Double_t *Y2 = new Double_t[PROFILE_NBINS]; -#endif - Double_t chi2=Y[0]; - Double_t chi2init=smearer.evaluate(); - //Int_t iMin = 1; //, iLow=1, iHigh=1; - Int_t iMin_=1; // minimum of the graph - //find minimum -#ifndef old + //Int_t iLocMin1=0, iLocMin2, + Int_t iLocMin2Prev=10; + //Double_t *Y2 = new Double_t[PROFILE_NBINS]; for(Int_t i2=0; i2 < N; i2++){ // reset Y values - Y2[i2]=0; + Y[i2]=0; + // if(X1[iLocMin2Prev]GetName() << ": " << i << " " << X[i] << " " << Y[i]-chi2init << " " << chi2-chi2init << " " << min-chi2 << std::endl; - } -#else - iMin_= FindMin1D(var, X, N, N/2, min, smearer, true, Y2); + + + std::cout << "[STATUS] Starting MinProfile for " << "phi" << "\t" << iProfile << "\t" << iLocMin2Prev << std::endl; + Int_t iMin_=-1; // minimum of the graph + locmin=1e20; + //find minimum + iMin_= FindMin1D(var1, X1, N, iLocMin2Prev, locmin, smearer, true, Y, var2, X2); if(iMin_<0){ // in case of no sensitivity to the variable it is put has constant and the minimization is interrupted - var->setVal(v1); - var->setConstant(); + var1->setVal(v1); + var1->setConstant(); + var2->setVal(v2); + var2->setConstant(); return false; } - chi2=Y2[iMin_]; - var->setVal(v1); -#endif - + + chi2=Y[iMin_]; + // reset initial values + var1->setVal(v1); + var2->setVal(v2); + if(chi2getVal() != X[iMin_]) changed=true; //the value has been updated, need a new iteration + if(var1->getVal() != X1[iMin_]) changed=true; //the value has been updated, need a new iteration + if(var2->getVal() != X2[iMin_]) changed=true; //the value has been updated, need a new iteration } - if(chi2< chi2init && (iMin_<=1 || iMin_>=N-1)){ // on the border, need a new iteration - var->setVal(X[iMin_]); - std::cout << "[INFO] Minimized at the border of the interval: need another iteration" << std::endl; - std::cout << " iMin_ = " << iMin_ << "\t" << X[iMin_] << std::endl; - for(Int_t i2=0; i2 < N; i2++){ // reset Y values - std::cout << i2 << "\t" << Y2[i2]-Y2[0] << std::endl; - } + myClock.Stop(); + myClock.Print(); + + //------------------------------ making the 2D scan around the minimum + if(update==false){ + myClock.Start(); + var1->setVal(X1[iMin_]); + var2->setVal(X2[iMin_]); + TGraph *G1 = GetProfile(var1, smearer, -1, false, false); // take only the binning + TGraph *G2 = GetProfile(var2, smearer, -1, false, false); // take only the binning + Double_t *XG1 = G1->GetX(); + Double_t *XG2 = G2->GetX(); + Int_t iBin1=0, iBin2=0; -#ifndef old - exit(1); -#endif - MinProfile(var, smearer, iProfile, min_old, min); - changed=true; - return changed; + + while(XG1[iBin1]setVal(XG1[iBin1]); + for(iBin2=iBin2min; iBin2setVal(XG2[iBin2]); + smearer.evaluate(); + } + } + (*g) = GetProfile(var1, smearer, -1, false, false, rho, Emean); + Double_t *YY = (*g) -> GetY(); + for(int i=0; i < N; i++) YY[i]=Y[i]; + myClock.Stop(); + myClock.Print(); + delete G1; + delete G2; } - if(minGetName() << "\t" << X[iMin_] + + if(update && (minGetName() << "\t" << X1[iMin_] + << "\t" << var2->GetName() << "\t" << X2[iMin_] << " " << min << " " << Y[iMin_]-min << std::endl; - var->setVal(X[iMin_]); - //var->setError(newError); + var1->setVal(X1[iMin_]); + var2->setVal(X2[iMin_]); } else{ - std::cout << "[INFO] Not-Updating variable:" << var->GetName() << "\t" << X[iMin_] + std::cout << "[INFO] Not-Updating variable:" << var1->GetName() << "\t" << X1[iMin_] << std::endl + << " " << var2->GetName() << "\t" << X2[iMin_] << std::endl << " " << min << " " << Y[iMin_]-min << std::endl; } - std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; + std::cout << "[INFO] Level " << iProfile << " variable:" << var1->GetName() << "\t" << var1->getVal() << "\t" << min << std::endl; + std::cout << "[INFO] Level " << iProfile << " variable:" << var2->GetName() << "\t" << var2->getVal() << "\t" << min << std::endl; - delete profil; + delete g1; + delete g2; return changed; } + + + + void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int nIterMCMC, bool mcmc=false){ + std::cout << "------------------------------------------------------------" << std::endl; std::cout << "[INFO] Minimization: profile" << std::endl; std::cout << "[INFO] Re-initialize nllMin: 1e20" << std::endl; smearer.nllMin=1e20; - std::cout << "[INFO] Setting initial evaluation" << std::endl; + std::cout << "[INFO] Setting initial evaluation" << std::endl; smearer.evaluate(); Double_t min_old = 9999999999.; Double_t min = 999999999.; @@ -889,10 +853,10 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int TStopwatch myClock; myClock.Start(); - std::cout << "[INFO] Starting minimization" << std::endl; + std::cout << "[INFO] Starting scale minimization" << std::endl; RooArgList argList_(args); TIterator *it_ = NULL; - while((min < min_old || updateError==true) && nIter <1){ + while((min < min_old || updateError==true) && nIter <3){ updateError=false; TStopwatch iterClock; iterClock.Start(); @@ -902,9 +866,7 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int if (var->isConstant() || !var->isLValue()) continue; TString name(var->GetName()); if(!name.Contains("scale")) continue; // looping only for the scale - for(int iProfile=1; iProfile<2; iProfile++){ - updateError += MinProfile(var, smearer, iProfile, min_old, min); - } + updateError += MinProfile(var, smearer, -1, min_old, min); } delete it_; iterClock.Stop(); @@ -913,33 +875,11 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int nIter++; } - - //minimization of additional smearing - updateError=true; - min_old=min; - nIter=0; - while((min < min_old || updateError==true) && nIter <2){ - updateError=false; - TStopwatch iterClock; - iterClock.Start(); - if(min < min_old) min_old=min; - - it_= argList_.createIterator(); - for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ - if (var->isConstant() || !var->isLValue()) continue; - TString name(var->GetName()); - if(!name.Contains("scale")) continue; // looping only for the scale - for(int iProfile=2; iProfile<4; iProfile++){ - updateError += MinProfile(var, smearer, iProfile, min_old, min); - } - } - delete it_; - iterClock.Stop(); - std::cout << "[INFO] nIter fine scale: " << nIter; - iterClock.Print(); - nIter++; - } + std::cout << "[STATUS] Scale minimization done"; + std::cout << "------------------------------" << std::endl; + std::cout << "[STATUS] Smearing + scale minimization starting" << std::endl; + //minimization of additional smearing updateError=true; min_old = min; nIter=0; @@ -956,15 +896,14 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int // special part for alpha fitting TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList_.find(alphaName): NULL; - if(name.Contains("alpha")) continue; + if(name.Contains("alpha")) continue; //if alpha parameter exists, need a 2D scan //if(var2!=NULL && var2->isConstant()) var2=NULL; // to use MinProfile 1D instead of 2D //taking large profile - for(int iProfile=2; iProfile<4; iProfile++){ - if(var2==NULL) MinProfile(var, smearer, iProfile, min_old, min); //updateError += MinProfile(var, smearer, iProfile, min_old, min); - else { - if(mcmc && iProfile>2) updateError += MinMCMC2D(var, var2, smearer, iProfile, min_old, min, nIterMCMC); - else updateError+=MinProfile2D(var, var2, smearer, iProfile, min_old, min); - } + if(var2==NULL) MinProfile(var, smearer, -1, min_old, min); //updateError += MinProfile(var, smearer, iProfile, min_old, min); + else { + //if(mcmc && iProfile>2) updateError += MinMCMC2D(var, var2, smearer, iProfile, min_old, min, nIterMCMC); + // else + updateError+=MinProfile2D(var, var2, smearer, -1, min_old, min); } } delete it_; From 409a15ce8a0de5d9098b059fae3c4024e8a4011d Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 17 Sep 2013 14:47:22 +0200 Subject: [PATCH 171/475] fixes and more toys --- ZFitter/bin/ZFitter.cpp | 11 +++++++---- ZFitter/interface/SmearingImporter.hh | 2 +- ZFitter/macro/mcmcDraw.C | 6 +++--- ZFitter/p.C | 2 +- ZFitter/script/justOnce/smearing.sh | 4 ++-- ZFitter/src/nllProfile.cc | 6 ++++-- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index a7c0dadfdd7..3ace9b9a166 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1183,10 +1183,13 @@ int main(int argc, char **argv) { fOutProfile->cd(); profil->Write(); std::cout << "Saved profile for " << name << std::endl; - profilePhi->SetName(n+"_phi"); - profilePhi->Draw("AP*"); - profilePhi->Write(); - std::cout << "Saved profile for " << name << std::endl; + if(var2!=NULL && name.Contains("constTerm") && var2->isConstant()==false){ + n.ReplaceAll("constTerm","phi"); + profilePhi->SetName(n); + profilePhi->Draw("AP*"); + profilePhi->Write(); + } + std::cout << "Saved profile for " << n << std::endl; delete profil; delete profilePhi; diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index 04fb2882c97..357d77a0db6 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -8,7 +8,7 @@ #include #include -#define NSMEARTOYLIM 30 +#define NSMEARTOYLIM 51 #include "ZeeEvent.hh" #include "ElectronCategory_class.hh" diff --git a/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C index 01e4164c8f9..7d20db1569e 100644 --- a/ZFitter/macro/mcmcDraw.C +++ b/ZFitter/macro/mcmcDraw.C @@ -828,7 +828,7 @@ void MakePlots(TString filename, float zmax=30, int nSmooth=10, TString opt="", c->SaveAs(fileName+".eps"); fileName+="-zoom"; - hist->GetZaxis()->SetRangeUser(0,3); + hist->GetZaxis()->SetRangeUser(0,1); //hist->GetXaxis()->SetRangeUser(0.00,0.12); //hist->GetYaxis()->SetRangeUser(0,0.005); c->SaveAs(fileName+".png"); @@ -967,7 +967,7 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString TTree *tree = dataset2tree(dataset); TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); - TString binning="(241,-0.0005,0.2405,60,0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; + TString binning="(241,-0.0005,0.2405,61,-0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; TH2F *hist = prof2d(tree, constTermName, alphaName, "nll", binning, true, nSmooth, opt); //hist->SaveAs("myhist.root"); @@ -1039,7 +1039,7 @@ void DrawToyTree(TTree *toys, TString outDir){ // toys->Draw("constTerm:alpha>>constTerm_alpha_1","catIndex==1"); // toys->Draw("constTerm:alpha>>constTerm_alpha_2","catIndex==2"); // toys->Draw("constTerm:alpha>>constTerm_alpha_3","catIndex==3"); - TString binning="(241,-0.0005,0.2405,60,0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; + TString binning="(241,-0.0005,0.2405,61,-0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; TString constTermBinning="(80,-0.02015,0.02025)"; TString alphaTermBinning="(300,-0.1495,0.1505)"; diff --git a/ZFitter/p.C b/ZFitter/p.C index 140c01e4216..d242d0f8b59 100644 --- a/ZFitter/p.C +++ b/ZFitter/p.C @@ -3,7 +3,7 @@ TString optSmooth="k3a"; gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); - TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorized/0.01-0.00/2/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; + TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorizedNew_/0.01-0.00/1/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; // TString filename="test/dato/22Jan2012-runDepPowheg-noR9shift/loose/invMass_SC_regrCorrSemiParV5_pho/step4_fixed/fitres/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF.root"; MakePlots(filename, 10, 10, optSmooth); diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index 4828efa1c91..de37f2ce628 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -4,7 +4,7 @@ #regionsFile=scaleStep2smearing_7 queue=$1 -nEventsPerToy=factorized_${queue} +nEventsPerToy=factorizedNew_${queue} #nEventsPerToy=factorized if [ -z "${queue}" ];then local=y; fi @@ -102,7 +102,7 @@ EOF # echo "s1 smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_s1-invertedToyMC-${const}-${alpha}.root" >> $baseDir/toyMC.dat # echo "s2 smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_s2-invertedToyMC-${const}-${alpha}.root" >> $baseDir/toyMC.dat - for nToys in `seq 1 200`; + for nToys in `seq 2 200`; do newDir=${baseDir}/${alphaConst}/${nToys} mkdir -p $newDir diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 00cf9006d94..0d7825e031e 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -794,8 +794,8 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i } Int_t iBin1min= std::max(iBin1-5,0); Int_t iBin2min= std::max(iBin2-5,0); - Int_t iBin1max= std::max(iBin1+5,N); - Int_t iBin2max= std::max(iBin2+5,N); + Int_t iBin1max= std::min(iBin1+5,N); + Int_t iBin2max= std::min(iBin2+5,N); for(iBin1=iBin1min; iBin1setVal(XG1[iBin1]); @@ -811,6 +811,8 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i myClock.Print(); delete G1; delete G2; + var1->setVal(v1); + var2->setVal(v2); } From dbb16bbdba657f9e1b2649f276ca29009cecbc20 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 18 Sep 2013 16:23:05 +0200 Subject: [PATCH 172/475] new ntuples with mcGenWeight --- ALCARAW_RECO/ntuple_datasets.dat | 15 +++++++++++ ALCARAW_RECO/scripts/mergeOutput.sh | 6 ++++- ALCARAW_RECO/scripts/prodNtuples.sh | 4 +++ .../data/validation/22Jan2012-runDepMC.dat | 26 ++++++++++++------- 4 files changed, 41 insertions(+), 10 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index bd55fb2704e..d4d62abe921 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -164,3 +164,18 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM diff --git a/ALCARAW_RECO/scripts/mergeOutput.sh b/ALCARAW_RECO/scripts/mergeOutput.sh index 3c53ed64dab..1881e17ee35 100755 --- a/ALCARAW_RECO/scripts/mergeOutput.sh +++ b/ALCARAW_RECO/scripts/mergeOutput.sh @@ -98,7 +98,11 @@ fi #if [ -z "$JSON" ];then # JSON=`echo ${USER_REMOTE_DIR} | sed "s|.*${RUNRANGE}/||;s|/unmerged.*||"` -MERGEDFILE=${DATASETNAME}-${RUNRANGE}.root +if [ "${FILENAME_BASE}" == "PUDumper" ];then + MERGEDFILE=PUDumper-${DATASETNAME}-${RUNRANGE}.root +else + MERGEDFILE=${DATASETNAME}-${RUNRANGE}.root +fi #else # MERGEDFILE=${DATASETNAME}-${RUNRANGE}-JSON_${JSON}.root #fi diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 05ab410f959..0a90da3bcb8 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -105,6 +105,7 @@ do fi ;; ALCARECOSIM) + isMC=1 ;; alcarereco | ALCARERECO) TYPE=ALCARERECO @@ -375,6 +376,9 @@ if [ -n "${CHECK}" ];then echo "[STATUS] Unfinished ${UI_WORKING_DIR}" else mergeOutput.sh -u ${UI_WORKING_DIR} -g ntuple + if [ "${isMC}" == "1" ];then + mergeOutput.sh -u ${UI_WORKING_DIR} -g PUDumper + fi fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" fi diff --git a/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat index d8c40b5cfa8..e34e3b6ee26 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMC.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMC.dat @@ -1,14 +1,22 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/withTrgBit_nopresel/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9ShiftMCweight/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9ShiftMCweight/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9ShiftMCweight/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +##### Powheg +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9ShiftMCweight/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9ShiftMCweight/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9ShiftMCweight/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +##### Sherpa +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9ShiftMCweight/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9ShiftMCweight/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9ShiftMCweight/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root ########### Data -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/withTrgBit_nopresel/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d4 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root ########### Friend trees ##### PU histograms d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root @@ -19,8 +27,8 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519- s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root ##### PU trees #s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root -s1 pileup mcPUtree_s1-22Jan2012-runDepMC.dat -s2 pileup mcPUtree_s2-22Jan2012-runDepMC.dat +#s1 pileup mcPUtree_s1-22Jan2012-runDepMC.dat +#s2 pileup mcPUtree_s2-22Jan2012-runDepMC.dat ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees From d55cf1e251d66aef304c7fe433a2d609486ee0e4 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 18 Sep 2013 16:27:15 +0200 Subject: [PATCH 173/475] mcGenWeight and event reject by weight added but to be fixed --- ZFitter/Makefile | 2 +- ZFitter/bin/ZFitter.cpp | 6 +- ZFitter/interface/SmearingImporter.hh | 6 +- ZFitter/src/SmearingImporter.cc | 144 ++++---------------------- 4 files changed, 30 insertions(+), 128 deletions(-) diff --git a/ZFitter/Makefile b/ZFitter/Makefile index 11c6920e836..d5683aba4f3 100644 --- a/ZFitter/Makefile +++ b/ZFitter/Makefile @@ -106,7 +106,7 @@ $(OBJ_DIR)/SmearingImporter.o: $(SRC)/SmearingImporter.cc $(INCLUDEDIR)/Smearing @echo "--> Making class: SmearingImporter" @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/SmearingImporter.o $(SRC)/SmearingImporter.cc -$(OBJ_DIR)/RooSmearer.o: $(SRC)/RooSmearer.cc $(INCLUDEDIR)/RooSmearer.hh +$(OBJ_DIR)/RooSmearer.o: $(SRC)/RooSmearer.cc $(INCLUDEDIR)/RooSmearer.hh $(INCLUDEDIR)/SmearingImporter.hh @echo "--> Making class: RooSmearer" @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/RooSmearer.o $(SRC)/RooSmearer.cc diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 3ace9b9a166..5cc5a113ffb 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -982,6 +982,8 @@ int main(int argc, char **argv) { smearer.SetHistBinning(80,100,invMass_binWidth); // to do before Init if(vm.count("runToy")){ + smearer.SetPuWeight(false); + smearer.SetToyScale(1, constTermToy); //if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), true,initFileName.c_str()); if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), false,initFileName.c_str()); @@ -1139,7 +1141,7 @@ int main(int argc, char **argv) { //if(vm.count("profileOnly") && !vm.count("runToy")) smearer.SetNSmear(10); std::cout <<"==================PROFILE=================="<GetName()); - if(name.Contains("absEta_1_1.4442-gold") && vm.count("alphaGoldFix")) continue; + //if(name.Contains("absEta_1_1.4442-gold") && vm.count("alphaGoldFix")) continue; // special part for alpha fitting double min=0.; TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index 357d77a0db6..c607adb5555 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -39,8 +39,10 @@ public: regions_cache_t GetCacheToy(Long64_t nEvents, bool isMC); inline void SetPuWeight(bool value){_usePUweight=value;}; + inline void SetMCWeight(bool value){_useMCweight=value;}; inline void SetR9Weight(bool value){_useR9weight=value;}; inline void SetPtWeight(bool value){_usePtweight=value;}; + inline void SetExcludeByWeight(bool value){_excludeByWeight=value;}; inline void SetOnlyDiagonal(bool value){_onlyDiagonal=value;}; inline void SetEleID(TString value){_eleID=value;}; inline void SetCommonCut(TString cut){_commonCut=cut;}; @@ -59,14 +61,14 @@ private: bool _isMC; bool _odd; bool _usePUweight; + bool _useMCweight; bool _useR9weight; bool _usePtweight; + bool _excludeByWeight; bool _onlyDiagonal; bool _isSmearingEt; ElectronCategory_class cutter; - void Import(TTree *chain, event_cache_t& eventCache, TEntryList *entryList, bool swap=false); - //void Import(TTree *chain, event_cache_t& eventCache, TTreeFormula *selector, bool swap=false); void Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents=0, bool isToy=false, bool externToy=true); void ImportToy(Long64_t nEvents, event_cache_t& eventCache, bool isMC); diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index c136a83be11..d67453ed6e6 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -17,8 +17,10 @@ SmearingImporter::SmearingImporter(std::vector regionList, TString ener _commonCut(commonCut), _eleID("loose"), _usePUweight(true), + _useMCweight(true), _useR9weight(false), _usePtweight(false), + _excludeByWeight(true), _onlyDiagonal(false), _isSmearingEt(false), cutter(false) @@ -66,130 +68,11 @@ void SmearingImporter::ImportToy(Long64_t nEvents, event_cache_t& eventCache, bo } -void SmearingImporter::Import(TTree *chain, event_cache_t& eventCache, TEntryList *entryList, bool swap){ - std::cerr << "[ERROR] Entering wrong function!" << std::endl; - exit(1); - TRandom3 gen(12345); - // for the energy calculation - Float_t energyEle[2]; - Float_t corrEle_[2]={1,1}; - Float_t smearEle_[2]={1,1}; - // for the angle calculation - Float_t etaEle[2]; - Float_t phiEle[2]; - - // for the weight calculation - Float_t weight=1; - Float_t r9weight[2]={1,1}; - Float_t ptweight[2]={1,1}; - - //------------------------------ - chain->SetBranchAddress(_energyBranchName, energyEle); - if(chain->GetBranch("scaleEle")!=NULL){ - std::cout << "[STATUS] Adding electron energy correction branch from friend" << std::endl; - chain->SetBranchAddress("scaleEle", corrEle_); - } - - if(chain->GetBranch("smearEle")!=NULL){ - std::cout << "[STATUS] Adding electron energy smearing branch from friend" << std::endl; - chain->SetBranchAddress("smearEle", smearEle_); - } - - chain->SetBranchAddress("etaEle", etaEle); - chain->SetBranchAddress("phiEle", phiEle); - - - if(chain->GetBranch("puWeight")!=NULL){ - std::cout << "[STATUS] Getting puWeight branch for tree: " << chain->GetTitle() << std::endl; - chain->SetBranchAddress("puWeight", &weight); - } - - if(chain->GetBranch("r9Weight")!=NULL){ - std::cout << "[STATUS] Getting r9Weight branch for tree: " << chain->GetTitle() << std::endl; - chain->SetBranchAddress("r9Weight", r9weight); - } - - if(chain->GetBranch("ptWeight")!=NULL){ - std::cout << "[STATUS] Getting ptWeight branch for tree: " << chain->GetTitle() << std::endl; - chain->SetBranchAddress("ptWeight", ptweight); - } - - TEntryList *elist_all = (TEntryList*)chain->GetEntryList()->Clone(); - chain->SetEntryList(entryList); - - Long64_t entries = entryList->GetN(); - std::cout << "___ ENTRIES: " << entries << std::endl; - for(Long64_t jentry=0; jentry < entries; jentry++){ - // for(Long64_t jentry=0; jentryGetEntries(); jentry++){ - //chain->LoadTree(jentry); - //chain->GetEntry(jentry); - chain->GetEntry(chain->GetEntryNumber(jentry)); - - ZeeEvent event; - //if(jentry<1){ - //chain->Show(chain->GetEntryNumber(jentry)); -// std::cout << "[INFO] corrEle[0] = " << corrEle_[0] << std::endl; -// std::cout << "[INFO] corrEle[1] = " << corrEle_[1] << std::endl; -// std::cout << "[INFO] smearEle[0] = " << smearEle_[0] << std::endl; -// std::cout << "[INFO] smearEle[1] = " << smearEle_[1] << std::endl; -// } - - float t1=TMath::Exp(-etaEle[0]); - float t2=TMath::Exp(-etaEle[1]); - float t1q = t1*t1; - float t2q = t2*t2; - - //------------------------------ - if(swap){ - event.energy_ele2 = energyEle[0] * corrEle_[0] * smearEle_[0]; - event.energy_ele1 = energyEle[1] * corrEle_[1] * smearEle_[1]; - } else { - event.energy_ele1 = energyEle[0] * corrEle_[0] * smearEle_[0]; - event.energy_ele2 = energyEle[1] * corrEle_[1] * smearEle_[1]; - } - //event.angle_eta_ele1_ele2= (1-((1-t1q)*(1-t2q)+4*t1*t2*cos(phiEle[0]-phiEle[1]))/((1+t1q)*(1+t2q))); - event.invMass= sqrt(2 * event.energy_ele1 * event.energy_ele2 * - (1-((1-t1q)*(1-t2q)+4*t1*t2*cos(phiEle[0]-phiEle[1]))/((1+t1q)*(1+t2q))) - ); - // to calculate the invMass: invMass = sqrt(2 * energy_ele1 * energy_ele2 * angle_eta_ele1_ele2) - - if(_isSmearingEt){ - if(swap){ - event.energy_ele2 /= TMath::CosH(etaEle[0]); - event.energy_ele1 /= TMath::CosH(etaEle[1]); - } else { - event.energy_ele1 /= TMath::CosH(etaEle[0]); - event.energy_ele2 /= TMath::CosH(etaEle[1]); - } - } - - event.weight = 1.; - if(_usePUweight) event.weight *= weight; - if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; - if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; -#ifdef FIXEDSMEARINGS - for(int i=0; i < NSMEARTOYLIM; i++){ - event.smearings_ele1[i] = (float) gen.Gaus(0,1); - event.smearings_ele2[i] = (float) gen.Gaus(0,1); -// if(i==0 && eventCache.size()==0){ -// std::cout << event.smearings_ele1[0] << std::endl; -// } - } -#endif - eventCache.push_back(event); - } - - chain->SetEntryList(elist_all); - chain->ResetBranchAddresses(); - chain->GetEntry(0); - return; - - -} void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents, bool isToy, bool externToy){ - TRandom3 gen(12345); + TRandom3 gen(0); + Long64_t excludedByWeight=0; // for the energy calculation Float_t energyEle[2]; @@ -203,7 +86,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Float_t weight=1; Float_t r9weight[2]={1,1}; Float_t ptweight[2]={1,1}; - + Float_t mcGenWeight=1; Int_t smearerCat[2]; bool hasSmearerCat=false; @@ -245,6 +128,11 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS chain->SetBranchAddress("ptWeight", ptweight); } + if(chain->GetBranch("mcGenWeight")!=NULL){ + std::cout << "[STATUS] Getting mcGenWeight branch for tree: " << chain->GetTitle() << std::endl; + chain->SetBranchAddress("mcGenWeight", &mcGenWeight); + } + if(chain->GetBranch("smearerCat")!=NULL){ std::cout << "[STATUS] Getting smearerCat branch for tree: " << chain->GetTitle() << std::endl; chain->SetBranchAddress("smearerCat", smearerCat); @@ -376,6 +264,15 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; + if(_useMCweight) event.weight *= mcGenWeight; + + if(_excludeByWeight){ + if(event.weight > gen.Rndm()){ + excludedByWeight++; + continue; + } + else event.weight=1; + } #ifdef FIXEDSMEARINGS // if(isMC || isToy){ event.smearings_ele1 = new float[NSMEARTOYLIM]; @@ -393,7 +290,8 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS cache.at(evIndex).push_back(event); //(cache[evIndex]).push_back(event); } - + + std::cout << "[INFO] Importing events: events excluded by weight: " << excludedByWeight << std::endl; chain->ResetBranchAddresses(); chain->GetEntry(0); return; From edc9deef130050171450583ddb0123c97335e6c7 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 19 Sep 2013 20:14:05 +0200 Subject: [PATCH 174/475] last updates --- ZFitter/bin/ZFitter.cpp | 7 +- .../data/validation/22Jan2012-runDepMC.dat | 12 ++- ZFitter/interface/RooSmearer.hh | 3 +- ZFitter/interface/SmearingImporter.hh | 2 +- ZFitter/m.C | 6 +- ZFitter/macro/PlotDataMC.C | 4 +- ZFitter/macro/mcmcDraw.C | 76 +++++++++--------- ZFitter/p.C | 2 +- ZFitter/script/PUDumperToHist.sh | 27 ++++--- ZFitter/script/energyScale.sh | 28 +++---- ZFitter/script/justOnce/smearing.sh | 20 +++-- ZFitter/src/RooSmearer.cc | 12 +-- ZFitter/src/SmearingImporter.cc | 25 ++++-- ZFitter/src/nllProfile.cc | 79 ++++++++++--------- 14 files changed, 169 insertions(+), 134 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 5cc5a113ffb..ce1c326fb80 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -219,6 +219,7 @@ int main(int argc, char **argv) { unsigned int nIter =0; unsigned int nEventsMinDiag=0; unsigned int nEventsMinOffDiag=0; + unsigned int nSmearToy=1; std::string minimType; std::vector branchList; @@ -302,6 +303,7 @@ int main(int argc, char **argv) { ("constTermFix", "constTerm not depending on Et") ("alphaGoldFix", "alphaTerm for gold electrons fixed to the low eta region") ("smearingEt", "alpha term depend on sqrt(Et) and not on sqrt(E)") + ("nSmearToy", po::value(&nSmearToy)->default_value(1), "") ; inputOption.add_options() ("chainFileList,f", po::value< string >(&chainFileListName), "Configuration file with input file list") @@ -605,7 +607,7 @@ int main(int argc, char **argv) { if(dataPUFileNameVec.empty() && (tagChainMap.count("s")!=0) && (tagChainMap["s"]).count("pileup")==0){ std::cerr << "[ERROR] Nor pileup mc tree configured in chain list file either dataPU histograms are not provided" << std::endl; return 1; - }else if( vm.count("dataPU")!=0 || (!dataPUFileNameVec.empty() && ((tagChainMap.count("s")==0) || (tagChainMap["s"]).count("pileup")==0))){ + }else if( !vm.count("runToy") && (vm.count("dataPU")!=0 || (!dataPUFileNameVec.empty() && ((tagChainMap.count("s")==0) || (tagChainMap["s"]).count("pileup")==0)))){ std::cout << "[STATUS] Creating pileup weighting tree and saving it" << std::endl; for(unsigned int i=0; i < mcPUFileNameVec.size(); i++){ TString mcPUFileName_=mcPUFileNameVec[i]; @@ -903,6 +905,7 @@ int main(int argc, char **argv) { categories, args_vec, args, energyBranchName); smearer._isDataSmeared=vm.count("isDataSmeared"); + if(vm.count("runToy")) smearer.SetPuWeight(false); smearer.SetOnlyDiagonal(vm.count("onlyDiagonal")); smearer._autoBin=vm.count("autoBin"); smearer._autoNsmear=vm.count("autoNsmear"); @@ -910,7 +913,7 @@ int main(int argc, char **argv) { //smearer.nEventsMinDiag = nEventsMinDiag; smearer._deactive_minEventsOffDiag = nEventsMinOffDiag; smearer.SetSmearingEt(vm.count("smearingEt")); - + smearer._nSmearToy = nSmearToy; //------------------------------ Take the list of branches needed for the defined categories ElectronCategory_class cutter; std::set activeBranchList; diff --git a/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat index e34e3b6ee26..bebe6b4c12f 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMC.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMC.dat @@ -26,11 +26,21 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533- s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root ##### PU trees -#s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root #s1 pileup mcPUtree_s1-22Jan2012-runDepMC.dat #s2 pileup mcPUtree_s2-22Jan2012-runDepMC.dat +#s3 pileup mcPUtree_s3-22Jan2012-runDepMC.dat +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMC.root +s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMC.root +s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMC.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees #d smearerCat_d smearerCat_data-scaleStep2smearing_8.root #s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root +d1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d1-22Jan2012-runDepMC.root +d2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d2-22Jan2012-runDepMC.root +d3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d3-22Jan2012-runDepMC.root +d4 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d4-22Jan2012-runDepMC.root +s1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s1-22Jan2012-runDepMC.root +s2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s2-22Jan2012-runDepMC.root +s3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s3-22Jan2012-runDepMC.root diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index b7158636eec..c5b47e75c70 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -195,8 +195,9 @@ public: unsigned int _deactive_minEventsDiag; unsigned int _deactive_minEventsOffDiag; double nllMin; -private: unsigned int _nSmearToy; +private: + unsigned int _nLLtoy; TRandom3* rgen_; TStopwatch *myClock; diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index c607adb5555..baad1d6c47d 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -8,7 +8,7 @@ #include #include -#define NSMEARTOYLIM 51 +#define NSMEARTOYLIM 100 #include "ZeeEvent.hh" #include "ElectronCategory_class.hh" diff --git a/ZFitter/m.C b/ZFitter/m.C index b8bc83e41a1..6ff8d9e5327 100644 --- a/ZFitter/m.C +++ b/ZFitter/m.C @@ -1,6 +1,6 @@ { TString optSmooth="k3a"; - TString toyDir="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/reducedPoints_fixed/"; + TString toyDir="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorizedNew_2nd/"; //0.005-0.00 0.005-0.01 0.005-0.15 0.01-0.00 0.01-0.01 0.01-0.15 0.02-0.00 0.02-0.01 0.02-0.15 gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); @@ -12,8 +12,8 @@ std::vector toySubDirVec; toySubDirVec.push_back("0.01-0.00/"); - toySubDirVec.push_back("0.0005-0.05/"); - toySubDirVec.push_back("0.0005-0.10/"); + toySubDirVec.push_back("0.000-0.07/"); + toySubDirVec.push_back("0.007-0.05/"); for(std::vector::const_iterator toySubDir_itr = toySubDirVec.begin(); toySubDir_itr!= toySubDirVec.end(); toySubDir_itr++){ diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 505439bd3c8..9b4bcc1fbe5 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -556,8 +556,8 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn // mc->SetBranchStatus("puWeight",1); TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; - if(usePU) mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *"puWeight"); - else mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC); + if(usePU) mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *"puWeight*mcGenWeight"); + else mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC*"mcGenWeight"); } } diff --git a/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C index 7d20db1569e..06154e12f9d 100644 --- a/ZFitter/macro/mcmcDraw.C +++ b/ZFitter/macro/mcmcDraw.C @@ -863,49 +863,51 @@ void MakePlots(TString filename, float zmax=30, int nSmooth=10, TString opt="", histPdf = Smooth(hist,1,"keys"); } delete hist; - RooDataSet *gen_dataset=histPdf->generate(*histPdf->getVariables(),1000000,kTRUE,kFALSE); - TTree *genTree = dataset2tree(gen_dataset); - genTree->SaveAs(fileName+"-genTree.root"); - delete gen_dataset; - delete histPdf; + + +// RooDataSet *gen_dataset=histPdf->generate(*histPdf->getVariables(),1000000,kTRUE,kFALSE); +// TTree *genTree = dataset2tree(gen_dataset); +// genTree->SaveAs(fileName+"-genTree.root"); +// delete gen_dataset; +// delete histPdf; - TGraphErrors toyGraph = g(genTree, constTermName); - TGraphErrors bestFitGraph = g(tree,alphaName, constTermName); - TGraphErrors bestFitScanGraph = g(y, x); - delete genTree; - delete tree; - toyGraph.SetFillColor(kGreen); - toyGraph.SetLineColor(kBlue); - toyGraph.SetLineStyle(2); - bestFitGraph.SetLineColor(kBlack); - bestFitScanGraph.SetLineColor(kRed); - bestFitScanGraph.SetLineWidth(2); +// TGraphErrors toyGraph = g(genTree, constTermName); +// TGraphErrors bestFitGraph = g(tree,alphaName, constTermName); +// TGraphErrors bestFitScanGraph = g(y, x); +// delete genTree; +// delete tree; +// toyGraph.SetFillColor(kGreen); +// toyGraph.SetLineColor(kBlue); +// toyGraph.SetLineStyle(2); +// bestFitGraph.SetLineColor(kBlack); +// bestFitScanGraph.SetLineColor(kRed); +// bestFitScanGraph.SetLineWidth(2); - TMultiGraph g_multi("multigraph",""); - g_multi.Add(&toyGraph,"L3"); - g_multi.Add(&toyGraph,"L"); - g_multi.Add(&bestFitGraph, "L"); - g_multi.Add(&bestFitScanGraph, "L"); +// TMultiGraph g_multi("multigraph",""); +// g_multi.Add(&toyGraph,"L3"); +// g_multi.Add(&toyGraph,"L"); +// g_multi.Add(&bestFitGraph, "L"); +// g_multi.Add(&bestFitScanGraph, "L"); - g_multi.Draw("A"); - - c->Clear(); - g_multi.Draw("A"); - c->SaveAs(outDir+"/smearing_vs_energy-"+constTermName+".png"); - c->SaveAs(outDir+"/smearing_vs_energy-"+constTermName+".eps"); - // TPaveText *pv = new TPaveText(0.7,0.7,1, 0.8); -// TLegend *legend = new TLegend(0.7,0.8,0.95,0.92); -// legend->SetFillStyle(3001); -// legend->SetFillColor(1); -// legend->SetTextFont(22); // 132 -// legend->SetTextSize(0.04); // l'ho preso mettendo i punti con l'editor e poi ho ricavato il valore con il metodo GetTextSize() -// // legend->SetFillColor(0); // colore di riempimento bianco -// legend->SetMargin(0.4); // percentuale della larghezza del simbolo - // SetLegendStyle(legend); +// g_multi.Draw("A"); + +// c->Clear(); +// g_multi.Draw("A"); +// c->SaveAs(outDir+"/smearing_vs_energy-"+constTermName+".png"); +// c->SaveAs(outDir+"/smearing_vs_energy-"+constTermName+".eps"); +// // TPaveText *pv = new TPaveText(0.7,0.7,1, 0.8); +// // TLegend *legend = new TLegend(0.7,0.8,0.95,0.92); +// // legend->SetFillStyle(3001); +// // legend->SetFillColor(1); +// // legend->SetTextFont(22); // 132 +// // legend->SetTextSize(0.04); // l'ho preso mettendo i punti con l'editor e poi ho ricavato il valore con il metodo GetTextSize() +// // // legend->SetFillColor(0); // colore di riempimento bianco +// // legend->SetMargin(0.4); // percentuale della larghezza del simbolo +// // SetLegendStyle(legend); - //Plot(c, data,mc,mcSmeared,legend, region, filename, energy, lumi); +// //Plot(c, data,mc,mcSmeared,legend, region, filename, energy, lumi); } f_in.Close(); diff --git a/ZFitter/p.C b/ZFitter/p.C index d242d0f8b59..2634687ec1b 100644 --- a/ZFitter/p.C +++ b/ZFitter/p.C @@ -3,7 +3,7 @@ TString optSmooth="k3a"; gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); - TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorizedNew_/0.01-0.00/1/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; + TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorizedSherpa_2nd/0.01-0.00/90/2/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; // TString filename="test/dato/22Jan2012-runDepPowheg-noR9shift/loose/invMass_SC_regrCorrSemiParV5_pho/step4_fixed/fitres/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF.root"; MakePlots(filename, 10, 10, optSmooth); diff --git a/ZFitter/script/PUDumperToHist.sh b/ZFitter/script/PUDumperToHist.sh index 67df827ffe4..8bca16d1a37 100755 --- a/ZFitter/script/PUDumperToHist.sh +++ b/ZFitter/script/PUDumperToHist.sh @@ -1,12 +1,12 @@ #!/bin/bash - +OUTFILE=nPUtrue.root usage(){ - echo "`basename $0` " + echo "`basename $0` -f file.root -d outDir -o outfile.root" } # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hf: -l help -- "$@") +if ! options=$(getopt -u -o hf:o: -l help -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -18,7 +18,9 @@ while [ $# -gt 0 ] do case $1 in -h|--help) usage; exit 0;; - -f) FILE=$2; shift;; + -f) FILES="$FILE $2"; shift;; +# -d) FILEDIR=$2; shift;; + -o) OUTFILE=$2; shift;; (--) shift; break;; (-*) usage; echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; (*) break;; @@ -28,20 +30,27 @@ done -if [ -z "${FILE}" ];then +if [ -z "${FILES}" ];then echo "[ERROR] PUDumper file not provided" >> /dev/stderr exit 1 fi -FILEDIR=`dirname ${FILE}` - +echo $FILES cat >tmp/PUDumperToHist.C <>tmp/PUDumperToHist.C <>pileup","BX==0"); +EOF +done +cat >>tmp/PUDumperToHist.C <>pileup(100,0,100)","BX==0"); TH1F *hist = gROOT->FindObject("pileup"); - hist->SaveAs("${FILEDIR}/nPUtrue.root"); + hist->SaveAs("${OUTFILE}"); } EOF diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index bbf92e3049f..ce0c9cf2740 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -8,7 +8,7 @@ source script/functions.sh commonCut=Et_25-trigger-noPF selection=loose -invMass_var=invMass_SC_regrCorr_pho +invMass_var=invMass_SC_regrCorrSemiParV5_pho baseDir=test updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" #updateOnly="" @@ -182,30 +182,24 @@ fi if [ -n "${STEP2}" ];then - +# extension="_0.8bad" + extension="_factorized" if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step2/fitres" ];then mkdir ${outDirData}/step2/fitres -p; fi - if [ ! -e "${outDirData}/step2/img" ];then mkdir ${outDirData}/step2/img -p; fi - - if [ ! -e "${outDirData}/step2_fixed/fitres" ];then mkdir ${outDirData}/step2_fixed/fitres -p; fi - if [ ! -e "${outDirData}/step2_fixed/img" ];then mkdir ${outDirData}/step2_fixed/img -p; fi - - if [ ! -e "${outDirData}/step2_0.8bad/fitres" ];then mkdir ${outDirData}/step2_0.8bad/fitres -p; fi - if [ ! -e "${outDirData}/step2_0.8bad/img" ]; then mkdir ${outDirData}/step2_0.8bad/img -p; fi - + if [ ! -e "${outDirData}/step2${extension}/fitres" ];then mkdir ${outDirData}/step2${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step2${extension}/img" ];then mkdir ${outDirData}/step2${extension}/img -p; fi #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ regionFile=data/regions/scaleStep2smearing_8.dat ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut}-R9p_0.8 \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2_0.8bad/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2_0.8bad/img \ - --smearerFit --autoNsmear --constTermFix --alphaGoldFix \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2${extension}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2${extension}/img \ + --smearerFit --constTermFix --alphaGoldFix \ --corrEleType HggRunEta \ --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ - --initFile=${outDirData}/step2/fitres/params-scaleStep2smearing_8-${commonCut}-R9p_0.8.txt \ - --addBranch=smearerCat > ${outDirData}/log/step20.8badsmearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + --initFile=${outDirData}/step2/fitres/params-scaleStep2${extension}smearing_8-${commonCut}.txt \ + --addBranch=smearerCat > ${outDirData}/log/step2${extension}smearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 exit 0 regionFile=data/regions/scaleStep2smearing_8.dat diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index de37f2ce628..7bdb59efc4a 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -4,7 +4,9 @@ #regionsFile=scaleStep2smearing_7 queue=$1 -nEventsPerToy=factorizedNew_${queue} +nEventsPerToy=factorizedSherpa_${queue} +nSmearToy=90 + #nEventsPerToy=factorized if [ -z "${queue}" ];then local=y; fi @@ -104,7 +106,7 @@ EOF for nToys in `seq 2 200`; do - newDir=${baseDir}/${alphaConst}/${nToys} + newDir=${baseDir}/${alphaConst}/${nSmearToy}/${nToys}/ mkdir -p $newDir ls $newDir @@ -114,14 +116,16 @@ EOF --regionsFile=data/regions/${regionsFile}.dat \ --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ --constTermFix --alphaGoldFix --smearerType=profile --noPU \ - --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy > ${newDir}/log2.log" + --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy --nSmearToy=${nSmearToy} > ${newDir}/log2.log" else echo "#============================================================ Toy = $nToys" - ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ - --regionsFile=data/regions/${regionsFile}.dat \ - --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ - --constTermFix --smearerType=profile --noPU --alphaGoldFix \ - --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy |tee ${newDir}/log2.log + ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ + --regionsFile=data/regions/${regionsFile}.dat \ + --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ + --constTermFix --smearerType=profile --noPU --alphaGoldFix \ + --initFile=${baseDir}/${alphaConst}/mcToy.txt \ + --profileOnly --runToy --eventsPerToy=0 --nSmearToy=${nSmearToy} |tee ${newDir}/log.log + exit 0 fi done wait diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 791c82c921d..39bfcc417ba 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -30,7 +30,7 @@ RooSmearer::RooSmearer(const char *name, ///< name of the variable _paramSet("paramSet","Set of parameters",this), invMass_min_(80), invMass_max_(100), invMass_bin_(0.25), deltaNLLMaxSmearToy(330), - _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(NSMEARTOYLIM-1), + _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(NSMEARTOYLIM), nllBase(0), nllVar("nll","",0,1e20), _isDataSmeared(false), @@ -408,7 +408,7 @@ double RooSmearer::smearedEnergy(double *smear, unsigned int nGen, float ene,flo float sigma = sqrt(alpha*alpha/ene + constant * constant ); #ifdef FIXEDSMEARINGS for(unsigned int i=0; i < nGen; i++){ - smear[i] = (fixedSmearings[i]*sigma)+(scale); + smear[i] = (double) (fixedSmearings[i]*sigma)+(scale); } #else for(unsigned int i=0; i < nGen; i++){ @@ -443,7 +443,7 @@ double RooSmearer::getLogLikelihood(TH1F* data, TH1F* prob) const // return -9999999.; // } - double logL=0; + double logL=0.; //Not using underflows and overflows at the moment for (int ibin=1;ibinGetNbinsX()+1;++ibin) { @@ -481,7 +481,7 @@ double RooSmearer::getLogLikelihood(TH1F* data, TH1F* prob) const } #endif } - // std::cout << "Finale logL = " << logL <=2) continue; } if (hasSmearerCat==false && chain->GetTreeNumber() != treenumber) { @@ -267,7 +272,10 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_useMCweight) event.weight *= mcGenWeight; if(_excludeByWeight){ - if(event.weight > gen.Rndm()){ + float rnd = gen.Rndm(); + if(jentry < 10) std::cout << "mcGen = " << mcGenWeight << "\t" << rnd << std::endl; + if(mcGenWeight < rnd){ /// \todo fix the reject by weight in case of pu,r9,pt reweighting + excludedByWeight++; continue; } @@ -286,12 +294,12 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS // event.smearings_ele2 = NULL; // } #endif - + includedEvents++; cache.at(evIndex).push_back(event); //(cache[evIndex]).push_back(event); } - std::cout << "[INFO] Importing events: events excluded by weight: " << excludedByWeight << std::endl; + std::cout << "[INFO] Importing events: " << includedEvents << "; events excluded by weight: " << excludedByWeight << std::endl; chain->ResetBranchAddresses(); chain->GetEntry(0); return; @@ -333,8 +341,9 @@ SmearingImporter::regions_cache_t SmearingImporter::GetCache(TChain *_chain, boo if(_chain->GetBranch("r9Weight")!=NULL) _chain->SetBranchStatus("r9Weight", 1); if(_chain->GetBranch("puWeight")!=NULL) _chain->SetBranchStatus("puWeight", 1); if(_chain->GetBranch("ptWeight")!=NULL) _chain->SetBranchStatus("ptWeight", 1); + if(_chain->GetBranch("mcGenWeight")!=NULL) _chain->SetBranchStatus("mcGenWeight", 1); if(_chain->GetBranch("smearerCat")!=NULL){ - std::cout << "[STATUS] Activating branch smearerCat" << std::endl; + //std::cout << "[STATUS] Activating branch smearerCat" << std::endl; _chain->SetBranchStatus("smearerCat", 1); } diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 0d7825e031e..470fa81ba57 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -175,8 +175,9 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w if(Emean!=0 && rho!=0) nBin=(int) (M_PI_2 / bin_width); #ifdef DEBUG - std::cout << "nBin = " << nBin << std::endl; + #endif + std::cout << "nBin = " << nBin << "\t" << bin_width << "\t" << Emean << "\t" << rho << std::endl; // if(var->isConstant()==false){ // while(nBin <10 && nBin>1){ // //std::cout << "[INFO] Updating from range: " << nBin << "\t" << range_min << "\t" << range_max << std::endl; @@ -206,7 +207,7 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w if(rho!=0 && Emean!=0){ if(name.Contains("alpha")) value=rho*Emean*cos(bin_width*iVal); if(name.Contains("const")) value=rho*sin(bin_width*iVal); - // std::cout << "[DEBUG] " << "\t" << rho << "\t" << Emean << "\t" << bin_width << "\t" << bin_width*iVal << "\t" << value << std::endl; + //std::cout << "[DEBUG] " << "\t" << rho << "\t" << Emean << "\t" << bin_width << "\t" << bin_width*iVal << "\t" << value << std::endl; } #ifdef DEBUG std::cout << "testing function @ " << value << std::endl; @@ -526,7 +527,7 @@ void Smooth(TH2F *h, Int_t ntimes, Option_t *option) delete [] ebuf; } -bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t locmin){ +bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t locmin, float phiMin=1){ if(abs(i-iLocMin)>2 && chi2-min > 300){ std::cout << "stop 1" << std::endl; return true;} if(abs(i-iLocMin)>5 && chi2-min > 200){ std::cout << "stop 2" << std::endl; return true;} // if(abs(i-iLocMin)>6 && chi2-locmin > 120){ std::cout << "stop 3" << std::endl; return true;} @@ -537,12 +538,13 @@ bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t // if(abs(i-iLocMin)>11 && chi2-locmin > 5){ std::cout << "stop 11" << std::endl; return true;} // if(abs(i-iLocMin)>12 && chi2-locmin > 3){ std::cout << "stop 12" << std::endl; return true;} - if(abs(i-iLocMin)>3 && chi2-locmin > 20){ std::cout << "stop 3" << std::endl; return true;} - if(abs(i-iLocMin)>4 && chi2-locmin > 10){ std::cout << "stop 4" << std::endl; return true;} - if(abs(i-iLocMin)>5 && chi2-locmin > 5){ std::cout << "stop 8" << std::endl; return true;} - if(abs(i-iLocMin)>6 && chi2-locmin > 3){ std::cout << "stop 9" << std::endl; return true;} - if(abs(i-iLocMin)>7 && chi2-locmin > 2){ std::cout << "stop 10" << std::endl; return true;} - if(abs(i-iLocMin)>8 && chi2-locmin > 1){ std::cout << "stop 10" << std::endl; return true;} + if(abs(i-iLocMin)>3 && chi2-locmin > phiMin*20){ std::cout << "stop 3" << std::endl; return true;} + if(abs(i-iLocMin)>4 && chi2-locmin > phiMin*10){ std::cout << "stop 4" << std::endl; return true;} + if(abs(i-iLocMin)>5 && chi2-locmin > phiMin*5){ std::cout << "stop 8" << std::endl; return true;} + if(abs(i-iLocMin)>6 && chi2-locmin > phiMin*4){ std::cout << "stop 9" << std::endl; return true;} + if(abs(i-iLocMin)>7 && chi2-locmin > phiMin*3){ std::cout << "stop 10" << std::endl; return true;} + if(abs(i-iLocMin)>8 && chi2-locmin > phiMin*2){ std::cout << "stop 10" << std::endl; return true;} + if(abs(i-iLocMin)>9 && chi2-locmin > phiMin*1){ std::cout << "stop 10" << std::endl; return true;} return false; } @@ -550,38 +552,39 @@ bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL, RooRealVar *var2=NULL, Double_t *X2=NULL){ Double_t vInit=var->getVal(); var->setVal(X[iMinStart]); - if(var2!=NULL) var2->setVal(X2[iMinStart]); + float phiMin=1; + if(var2!=NULL){ + var2->setVal(X2[iMinStart]); + phiMin=3; + } if(Y==NULL) exit(1); - Double_t chi2, chi2init=smearer.evaluate(); + Double_t chi2, chi2init=smearer.evaluate(), chi2old=chi2init; Double_t locmin=1e20; Int_t iLocMin=iMinStart; - std::queue chi2old; - Double_t NY[PROFILE_NBINS]={0.}; - for(Int_t i =iMinStart; i setVal(X[i]); if(var2!=NULL) var2->setVal(X2[i]); chi2=smearer.evaluate(); Y[i] += chi2; NY[i]++; - if(var2!=NULL) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << + iStep = chi2-chi2old != 0 ? std::max(1,((int) (fabs(0.1/(chi2-chi2old))))) : 1; + + if(var2!=NULL) std::cout << "[DEBUG] " << std::setprecision(5) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; - else std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + else std::cout << std::setprecision(5) << "[DEBUG] " << "\t" << iStep << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\tchi2= " << chi2 << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; } - if(!chi2old.empty() && chi2GetName() << std::endl; std::cerr << " Variable changed to constant" << std::endl; @@ -589,40 +592,32 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t std::cout << " Variable changed to constant" << std::endl; return -1; } - chi2old.push(chi2); } - while(!chi2old.empty()){ - chi2old.pop(); - } - for(Int_t i =iMinStart; i >=0; i--){ //loop versus positive side + iStep=1; + for(Int_t i =iMinStart; i >=0; i-=iStep){ //loop versus positive side var->setVal(X[i]); if(var2!=NULL) var2->setVal(X2[i]); chi2=smearer.evaluate(); Y[i] += chi2; NY[i]++; + iStep = chi2-chi2old != 0 ? std::max(1,((int) (fabs(0.1/(chi2-chi2old))))) : 1; #ifdef DEBUG //if(update==true) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; #endif - if(var2!=NULL) std::cout << "[DEBUG] Neg" << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << + if(var2!=NULL) std::cout << "[DEBUG] Neg" << std::setprecision(5) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; - else std::cout << "[DEBUG] Neg" << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + else std::cout << std::setprecision(5) << "[DEBUG] Neg" << "\t" << iStep << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; } - if(!chi2old.empty() && chi2setVal(0); + var2->setVal(0.05); MinProfile(var2, smearer, -1, min_old, locmin); // best DeltaS with DeltaC=0 //sqrt() = DeltaS/DeltaC @@ -787,21 +783,28 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i while(XG1[iBin1] Date: Wed, 25 Sep 2013 09:29:46 +0200 Subject: [PATCH 175/475] starting to implement V8 regression --- .../src/EleNewEnergiesProducer.cc | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index b311c494677..56fc117b485 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -154,6 +154,10 @@ class EleNewEnergiesProducer : public edm::EDProducer { std::string regrPhoJoshV4_SemiParamFile; std::string regrPhoJoshV5_SemiParamFile; + EGEnergyCorrectorSemiParm corV6_ele; + EGEnergyCorrectorSemiParm corV6_pho; + std::string regrEleJoshV6_SemiParamFile; + std::string regrPhoJoshV6_SemiParamFile; bool ptSplit; }; @@ -186,6 +190,10 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) regrEleJoshV5_SemiParamFile(iConfig.getParameter("regrEleJoshV5_SemiParamFile")), regrPhoJoshV4_SemiParamFile(iConfig.getParameter("regrPhoJoshV4_SemiParamFile")), regrPhoJoshV5_SemiParamFile(iConfig.getParameter("regrPhoJoshV5_SemiParamFile")), + + regrEleJoshV6_SemiParamFile(iConfig.getParameter("regrEleJoshV6_SemiParamFile")), + regrPhoJoshV6_SemiParamFile(iConfig.getParameter("regrPhoJoshV6_SemiParamFile")), + ptSplit(iConfig.getParameter("ptSplit")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), // puWeightFile(iConfig.getParameter("puWeightFile")), @@ -248,6 +256,23 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5gamma2"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5pdfval"); + //------------------------------ + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVsigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamValpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVgamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamValpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVgamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVpdfval"); + //now do what ever other initialization is needed } From e4255593164b68823f4e279d7450b5b2d5f1e118 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 27 Sep 2013 15:17:55 +0200 Subject: [PATCH 176/475] 2011 53X rereco datasets --- ALCARAW_RECO/alcareco_datasets.dat | 6 ++++++ ALCARAW_RECO/python/alcaSkimming.py | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index aa5ad565b6a..202fd8fe399 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -13,6 +13,9 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +################### MC 7TeV 53X +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco ################### MC geometries and material allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat10S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat10S30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat20S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat20S30 caf group/alca_ecalcalib/alcareco @@ -71,3 +74,6 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- ##################### full private rereco 2011 in 5_3_X 160329-173692 /DoubleElectron/Run2011A-ZElectron-08Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011A-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011A-ZElectron-08Nov2011-v1_RAW-RECO_FNAL VALID RUN2011A,RUN2011AB 175832-180252 /DoubleElectron/Run2011B-ZElectron-19Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011B-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011B-ZElectron-19Nov2011-v1_RAW-RECO_FNAL VALID RUN2011B, RUN2011AB +##################### 2011 data 53X rereco +160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf group/alca_ecalcalib/alcareco/ VALID RUN2011A, RUN2011AB +175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf group/alca_ecalcalib/alcareco/ VALID RUN2011B, RUN2011AB diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 4ec492fad80..3db55294bf5 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -284,6 +284,12 @@ process.GlobalTag.globaltag = 'START53_V7N::All' else: process.GlobalTag.globaltag = 'FT_R_53_V21::All' #22Jan rereco + elif(re.match("CMSSW_5_3_11_patch3",CMSSW_VERSION)): + if(MC): + print "[INFO] Using GT START53_LV4::All" + process.GlobalTag.globaltag = 'START53_LV4::All' + else: + process.GlobalTag.globaltag = 'FT_R_53_LV3::All' #21Jun rereco 53X 2011 data elif(re.match("CMSSW_5_3_.*",CMSSW_VERSION)): if(MC): print "[INFO] Using GT START53_V7A::All" @@ -512,7 +518,7 @@ process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) -if(options.doTreeOnly==0): +if(not doTreeOnly): process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) if(options.type=="ALCARERECO"): process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) @@ -623,7 +629,7 @@ else: process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step, process.NtuplePath + process.ALCARECOoutput_step #, process.NtuplePath ) # fix the output modules From fb81c441cc506c19c2bdb4321f99e92685f1c2b9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 27 Sep 2013 15:18:23 +0200 Subject: [PATCH 177/475] V6 V7 and V8 regression implemented in energy producer --- .../src/EleNewEnergiesProducer.cc | 583 ++++++++++++++++-- 1 file changed, 546 insertions(+), 37 deletions(-) diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index 56fc117b485..d51726db306 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -140,24 +140,37 @@ class EleNewEnergiesProducer : public edm::EDProducer { EGEnergyCorrector josh_Ele; EGEnergyCorrector josh_Pho; EGEnergyCorrector_fra fra_Ele; - EGEnergyCorrectorSemiParm corV4_ele; - EGEnergyCorrectorSemiParm corV5_ele; - EGEnergyCorrectorSemiParm corV4_pho; - EGEnergyCorrectorSemiParm corV5_pho; std::string regrEleFile; //weights std::string regrPhoFile; std::string regrEleFile_fra; + + EGEnergyCorrectorSemiParm corV4_ele; + EGEnergyCorrectorSemiParm corV4_pho; std::string regrEleJoshV4_SemiParamFile; - std::string regrEleJoshV5_SemiParamFile; std::string regrPhoJoshV4_SemiParamFile; + + EGEnergyCorrectorSemiParm corV5_ele; + EGEnergyCorrectorSemiParm corV5_pho; + std::string regrEleJoshV5_SemiParamFile; std::string regrPhoJoshV5_SemiParamFile; EGEnergyCorrectorSemiParm corV6_ele; EGEnergyCorrectorSemiParm corV6_pho; std::string regrEleJoshV6_SemiParamFile; std::string regrPhoJoshV6_SemiParamFile; + + EGEnergyCorrectorSemiParm corV7_ele; + EGEnergyCorrectorSemiParm corV7_pho; + std::string regrEleJoshV7_SemiParamFile; + std::string regrPhoJoshV7_SemiParamFile; + + EGEnergyCorrectorSemiParm corV8_ele; + EGEnergyCorrectorSemiParm corV8_pho; + std::string regrEleJoshV8_SemiParamFile; + std::string regrPhoJoshV8_SemiParamFile; + bool ptSplit; }; @@ -187,13 +200,15 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) regrPhoFile(iConfig.getParameter("regrPhoFile")), regrEleFile_fra(iConfig.getParameter("regrEleFile_fra")), regrEleJoshV4_SemiParamFile(iConfig.getParameter("regrEleJoshV4_SemiParamFile")), - regrEleJoshV5_SemiParamFile(iConfig.getParameter("regrEleJoshV5_SemiParamFile")), regrPhoJoshV4_SemiParamFile(iConfig.getParameter("regrPhoJoshV4_SemiParamFile")), + regrEleJoshV5_SemiParamFile(iConfig.getParameter("regrEleJoshV5_SemiParamFile")), regrPhoJoshV5_SemiParamFile(iConfig.getParameter("regrPhoJoshV5_SemiParamFile")), - regrEleJoshV6_SemiParamFile(iConfig.getParameter("regrEleJoshV6_SemiParamFile")), regrPhoJoshV6_SemiParamFile(iConfig.getParameter("regrPhoJoshV6_SemiParamFile")), - + regrEleJoshV7_SemiParamFile(iConfig.getParameter("regrEleJoshV7_SemiParamFile")), + regrPhoJoshV7_SemiParamFile(iConfig.getParameter("regrPhoJoshV7_SemiParamFile")), + regrEleJoshV8_SemiParamFile(iConfig.getParameter("regrEleJoshV8_SemiParamFile")), + regrPhoJoshV8_SemiParamFile(iConfig.getParameter("regrPhoJoshV8_SemiParamFile")), ptSplit(iConfig.getParameter("ptSplit")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), // puWeightFile(iConfig.getParameter("puWeightFile")), @@ -232,14 +247,6 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4gamma2"); produces< NewEnergyMap >("energySCEleJoshEleSemiParamV4pdfval"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5ecorr"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5sigma"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5alpha1"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5gamma1"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5alpha2"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5gamma2"); - produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5pdfval"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4ecorr"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4sigma"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4alpha1"); @@ -247,6 +254,14 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4alpha2"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4gamma2"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV4pdfval"); + //------------------------------ + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV5pdfval"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5ecorr"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5sigma"); @@ -255,9 +270,12 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5alpha2"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5gamma2"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV5pdfval"); + //------------------------------ //------------------------------ produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6cbmean"); produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6sigma"); produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6alpha1"); produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6gamma1"); @@ -265,13 +283,55 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6gamma2"); produces< NewEnergyMap >("energySCEleJoshEleSemiParamV6pdfval"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVecorr"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVsigma"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamValpha1"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVgamma1"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamValpha2"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVgamma2"); - produces< NewEnergyMap >("energySCEleJoshPhoSemiParamVpdfval"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6cbmean"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV6pdfval"); + //------------------------------ + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7cbmean"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV7pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7cbmean"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV7pdfval"); + //------------------------------ + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8cbmean"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParamV8pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8cbmean"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8pdfval"); //now do what ever other initialization is needed @@ -333,6 +393,33 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu energySCEleJoshPhoSemiParamV5_alpha1, energySCEleJoshPhoSemiParamV5_gamma1, energySCEleJoshPhoSemiParamV5_alpha2, energySCEleJoshPhoSemiParamV5_gamma2, energySCEleJoshPhoSemiParamV5_pdfval; + std::vector energySCEleJoshEleSemiParamV6_ecorr, energySCEleJoshEleSemiParamV6_sigmaEoverE, + energySCEleJoshEleSemiParamV6_cbmean, energySCEleJoshEleSemiParamV6_sigma, + energySCEleJoshEleSemiParamV6_alpha1, energySCEleJoshEleSemiParamV6_gamma1, energySCEleJoshEleSemiParamV6_alpha2, + energySCEleJoshEleSemiParamV6_gamma2, energySCEleJoshEleSemiParamV6_pdfval; + std::vector energySCEleJoshPhoSemiParamV6_ecorr, energySCEleJoshPhoSemiParamV6_sigmaEoverE, + energySCEleJoshPhoSemiParamV6_cbmean, energySCEleJoshPhoSemiParamV6_sigma, + energySCEleJoshPhoSemiParamV6_alpha1, energySCEleJoshPhoSemiParamV6_gamma1, energySCEleJoshPhoSemiParamV6_alpha2, + energySCEleJoshPhoSemiParamV6_gamma2, energySCEleJoshPhoSemiParamV6_pdfval; + + std::vector energySCEleJoshEleSemiParamV7_ecorr, energySCEleJoshEleSemiParamV7_sigmaEoverE, + energySCEleJoshEleSemiParamV7_cbmean, energySCEleJoshEleSemiParamV7_sigma, + energySCEleJoshEleSemiParamV7_alpha1, energySCEleJoshEleSemiParamV7_gamma1, energySCEleJoshEleSemiParamV7_alpha2, + energySCEleJoshEleSemiParamV7_gamma2, energySCEleJoshEleSemiParamV7_pdfval; + std::vector energySCEleJoshPhoSemiParamV7_ecorr, energySCEleJoshPhoSemiParamV7_sigmaEoverE, + energySCEleJoshPhoSemiParamV7_cbmean, energySCEleJoshPhoSemiParamV7_sigma, + energySCEleJoshPhoSemiParamV7_alpha1, energySCEleJoshPhoSemiParamV7_gamma1, energySCEleJoshPhoSemiParamV7_alpha2, + energySCEleJoshPhoSemiParamV7_gamma2, energySCEleJoshPhoSemiParamV7_pdfval; + + std::vector energySCEleJoshEleSemiParamV8_ecorr, energySCEleJoshEleSemiParamV8_sigmaEoverE, + energySCEleJoshEleSemiParamV8_cbmean, energySCEleJoshEleSemiParamV8_sigma, + energySCEleJoshEleSemiParamV8_alpha1, energySCEleJoshEleSemiParamV8_gamma1, energySCEleJoshEleSemiParamV8_alpha2, + energySCEleJoshEleSemiParamV8_gamma2, energySCEleJoshEleSemiParamV8_pdfval; + std::vector energySCEleJoshPhoSemiParamV8_ecorr, energySCEleJoshPhoSemiParamV8_sigmaEoverE, + energySCEleJoshPhoSemiParamV8_cbmean, energySCEleJoshPhoSemiParamV8_sigma, + energySCEleJoshPhoSemiParamV8_alpha1, energySCEleJoshPhoSemiParamV8_gamma1, energySCEleJoshPhoSemiParamV8_alpha2, + energySCEleJoshPhoSemiParamV8_gamma2, energySCEleJoshPhoSemiParamV8_pdfval; + std::auto_ptr energySCEleJoshEleMap(new NewEnergyMap()); std::auto_ptr energySCEleJoshEleVarMap(new NewEnergyMap()); @@ -372,6 +459,67 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu std::auto_ptr energySCEleJoshPhoSemiParamV5_gamma2_Map(new NewEnergyMap()); std::auto_ptr energySCEleJoshPhoSemiParamV5_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshEleSemiParamV6_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV6_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParamV6_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV6_pdfval_Map(new NewEnergyMap()); + //------------------------------ + std::auto_ptr energySCEleJoshEleSemiParamV7_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV7_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParamV7_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV7_pdfval_Map(new NewEnergyMap()); + //------------------------------ + std::auto_ptr energySCEleJoshEleSemiParamV8_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParamV8_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParamV8_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParamV8_pdfval_Map(new NewEnergyMap()); + //------------------------------ ELECTRON iEvent.getByLabel(electronsTAG, electronsHandle); // altrimenti non tira eccezione @@ -435,18 +583,18 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu corEle_fra = fra_Ele.CorrectedEnergyWithErrorTracker(*ele_itr,*primaryVertexHandle, *rhoHandle, lazyTools,iSetup,ptSplit); - double ecor, sigma, alpha1, n1, alpha2, n2, pdfval; + double ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval; - corV4_ele.CorrectedEnergyWithErrorV4(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigma, alpha1, n1, alpha2, n2, pdfval); - energySCEleJoshEleSemiParamV4_ecorr.push_back(ecor); - energySCEleJoshEleSemiParamV4_sigma.push_back(sigma); - energySCEleJoshEleSemiParamV4_alpha1.push_back(alpha1); - energySCEleJoshEleSemiParamV4_gamma1.push_back(n1); - energySCEleJoshEleSemiParamV4_alpha2.push_back(alpha2); - energySCEleJoshEleSemiParamV4_gamma2.push_back(n2); - energySCEleJoshEleSemiParamV4_pdfval.push_back(pdfval); - + corV4_ele.CorrectedEnergyWithErrorV4(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParamV4_ecorr.push_back(ecor); + energySCEleJoshEleSemiParamV4_sigma.push_back(sigma); + energySCEleJoshEleSemiParamV4_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParamV4_gamma1.push_back(n1); + energySCEleJoshEleSemiParamV4_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParamV4_gamma2.push_back(n2); + energySCEleJoshEleSemiParamV4_pdfval.push_back(pdfval); + #if DEBUG == 2 printf("V4: sceta = %5f, default = %5f, corrected = %5f, sigma = %5f, alpha1 = %5f, n1 = %5f, alpha2 = %5f, n2 = %5f, pdfval = %5f\n", it->superCluster()->eta(), it->energy(),ecor,sigma,alpha1,n1,alpha2,n2,pdfval); #endif @@ -493,6 +641,75 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu #endif + + //------------------------------ + corV6_ele.CorrectedEnergyWithErrorV6(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParamV6_ecorr.push_back(ecor); + energySCEleJoshEleSemiParamV6_sigma.push_back(sigmaEoverE); + energySCEleJoshEleSemiParamV6_cbmean.push_back(cbmean); + energySCEleJoshEleSemiParamV6_sigma.push_back(sigma); + energySCEleJoshEleSemiParamV6_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParamV6_gamma1.push_back(n1); + energySCEleJoshEleSemiParamV6_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParamV6_gamma2.push_back(n2); + energySCEleJoshEleSemiParamV6_pdfval.push_back(pdfval); + + corV6_pho.CorrectedEnergyWithErrorV6(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParamV6_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParamV6_sigma.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParamV6_cbmean.push_back(cbmean); + energySCEleJoshPhoSemiParamV6_sigma.push_back(sigma); + energySCEleJoshPhoSemiParamV6_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParamV6_gamma1.push_back(n1); + energySCEleJoshPhoSemiParamV6_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParamV6_gamma2.push_back(n2); + energySCEleJoshPhoSemiParamV6_pdfval.push_back(pdfval); + //------------------------------ + corV7_ele.CorrectedEnergyWithErrorV7(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParamV7_ecorr.push_back(ecor); + energySCEleJoshEleSemiParamV7_sigma.push_back(sigmaEoverE); + energySCEleJoshEleSemiParamV7_cbmean.push_back(cbmean); + energySCEleJoshEleSemiParamV7_sigma.push_back(sigma); + energySCEleJoshEleSemiParamV7_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParamV7_gamma1.push_back(n1); + energySCEleJoshEleSemiParamV7_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParamV7_gamma2.push_back(n2); + energySCEleJoshEleSemiParamV7_pdfval.push_back(pdfval); + + corV7_pho.CorrectedEnergyWithErrorV7(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParamV7_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParamV7_sigma.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParamV7_cbmean.push_back(cbmean); + energySCEleJoshPhoSemiParamV7_sigma.push_back(sigma); + energySCEleJoshPhoSemiParamV7_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParamV7_gamma1.push_back(n1); + energySCEleJoshPhoSemiParamV7_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParamV7_gamma2.push_back(n2); + energySCEleJoshPhoSemiParamV7_pdfval.push_back(pdfval); + //------------------------------ + corV8_ele.CorrectedEnergyWithErrorV8(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParamV8_ecorr.push_back(ecor); + energySCEleJoshEleSemiParamV8_sigma.push_back(sigmaEoverE); + energySCEleJoshEleSemiParamV8_cbmean.push_back(cbmean); + energySCEleJoshEleSemiParamV8_sigma.push_back(sigma); + energySCEleJoshEleSemiParamV8_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParamV8_gamma1.push_back(n1); + energySCEleJoshEleSemiParamV8_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParamV8_gamma2.push_back(n2); + energySCEleJoshEleSemiParamV8_pdfval.push_back(pdfval); + + corV8_pho.CorrectedEnergyWithErrorV8(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParamV8_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParamV8_sigma.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParamV8_cbmean.push_back(cbmean); + energySCEleJoshPhoSemiParamV8_sigma.push_back(sigma); + energySCEleJoshPhoSemiParamV8_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParamV8_gamma1.push_back(n1); + energySCEleJoshPhoSemiParamV8_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParamV8_gamma2.push_back(n2); + energySCEleJoshPhoSemiParamV8_pdfval.push_back(pdfval); + + // std::cout< Date: Fri, 27 Sep 2013 15:24:38 +0200 Subject: [PATCH 178/475] V6, V7 and V8 regression variables in ntuples --- ZNtupleDumper/src/ZNtupleDumper.cc | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 159e1ad1267..68a65b8675a 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -247,6 +247,13 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t energySCEle_regrCorrSemiParV4_ele[2], energySigmaSCEle_regrCorrSemiParV4_ele[2]; Float_t energySCEle_regrCorrSemiParV5_pho[2], energySigmaSCEle_regrCorrSemiParV5_pho[2]; Float_t energySCEle_regrCorrSemiParV5_ele[2], energySigmaSCEle_regrCorrSemiParV5_ele[2]; + Float_t energySCEle_regrCorrSemiParV6_pho[2], energySigmaSCEle_regrCorrSemiParV6_pho[2]; + Float_t energySCEle_regrCorrSemiParV6_ele[2], energySigmaSCEle_regrCorrSemiParV6_ele[2]; + Float_t energySCEle_regrCorrSemiParV7_pho[2], energySigmaSCEle_regrCorrSemiParV7_pho[2]; + Float_t energySCEle_regrCorrSemiParV7_ele[2], energySigmaSCEle_regrCorrSemiParV7_ele[2]; + Float_t energySCEle_regrCorrSemiParV8_pho[2], energySigmaSCEle_regrCorrSemiParV8_pho[2]; + Float_t energySCEle_regrCorrSemiParV8_ele[2], energySigmaSCEle_regrCorrSemiParV8_ele[2]; + Float_t energySCEle_corr[2]; ///< ecal energy with corrections base on type of electron (see #classificationEle) @@ -275,6 +282,9 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t invMass_regrCorr_egamma; Float_t invMass_SC_regrCorrSemiParV4_ele,invMass_SC_regrCorrSemiParV4_pho; Float_t invMass_SC_regrCorrSemiParV5_ele,invMass_SC_regrCorrSemiParV5_pho; + Float_t invMass_SC_regrCorrSemiParV6_ele,invMass_SC_regrCorrSemiParV6_pho; + Float_t invMass_SC_regrCorrSemiParV7_ele,invMass_SC_regrCorrSemiParV7_pho; + Float_t invMass_SC_regrCorrSemiParV8_ele,invMass_SC_regrCorrSemiParV8_pho; Float_t invMass_MC; Float_t etaMCEle[2], phiMCEle[2]; @@ -737,6 +747,20 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("energySigmaSCEle_regrCorrSemiParV5_ele", energySigmaSCEle_regrCorrSemiParV5_ele, "energySigmaSCEle_regrCorrSemiParV5_ele[2]/F"); tree->Branch("energySigmaSCEle_regrCorrSemiParV5_pho", energySigmaSCEle_regrCorrSemiParV5_pho, "energySigmaSCEle_regrCorrSemiParV5_pho[2]/F"); + tree->Branch("energySCEle_regrCorrSemiParV6_ele", energySCEle_regrCorrSemiParV6_ele, "energySCEle_regrCorrSemiParV6_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiParV6_pho", energySCEle_regrCorrSemiParV6_pho, "energySCEle_regrCorrSemiParV6_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV6_ele", energySigmaSCEle_regrCorrSemiParV6_ele, "energySigmaSCEle_regrCorrSemiParV6_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV6_pho", energySigmaSCEle_regrCorrSemiParV6_pho, "energySigmaSCEle_regrCorrSemiParV6_pho[2]/F"); + + tree->Branch("energySCEle_regrCorrSemiParV7_ele", energySCEle_regrCorrSemiParV7_ele, "energySCEle_regrCorrSemiParV7_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiParV7_pho", energySCEle_regrCorrSemiParV7_pho, "energySCEle_regrCorrSemiParV7_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV7_ele", energySigmaSCEle_regrCorrSemiParV7_ele, "energySigmaSCEle_regrCorrSemiParV7_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV7_pho", energySigmaSCEle_regrCorrSemiParV7_pho, "energySigmaSCEle_regrCorrSemiParV7_pho[2]/F"); + + tree->Branch("energySCEle_regrCorrSemiParV8_ele", energySCEle_regrCorrSemiParV8_ele, "energySCEle_regrCorrSemiParV8_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiParV8_pho", energySCEle_regrCorrSemiParV8_pho, "energySCEle_regrCorrSemiParV8_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV8_ele", energySigmaSCEle_regrCorrSemiParV8_ele, "energySigmaSCEle_regrCorrSemiParV8_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiParV8_pho", energySigmaSCEle_regrCorrSemiParV8_pho, "energySigmaSCEle_regrCorrSemiParV8_pho[2]/F"); tree->Branch("R9Ele", R9Ele, "R9Ele[2]/F"); @@ -761,6 +785,13 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("invMass_SC_regrCorrSemiParV4_ele", &invMass_SC_regrCorrSemiParV4_ele, "invMass_SC_regrCorrSemiParV4_ele/F"); tree->Branch("invMass_SC_regrCorrSemiParV5_pho", &invMass_SC_regrCorrSemiParV5_pho, "invMass_SC_regrCorrSemiParV5_pho/F"); tree->Branch("invMass_SC_regrCorrSemiParV5_ele", &invMass_SC_regrCorrSemiParV5_ele, "invMass_SC_regrCorrSemiParV5_ele/F"); + tree->Branch("invMass_SC_regrCorrSemiParV6_pho", &invMass_SC_regrCorrSemiParV6_pho, "invMass_SC_regrCorrSemiParV6_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiParV6_ele", &invMass_SC_regrCorrSemiParV6_ele, "invMass_SC_regrCorrSemiParV6_ele/F"); + tree->Branch("invMass_SC_regrCorrSemiParV7_pho", &invMass_SC_regrCorrSemiParV7_pho, "invMass_SC_regrCorrSemiParV7_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiParV7_ele", &invMass_SC_regrCorrSemiParV7_ele, "invMass_SC_regrCorrSemiParV7_ele/F"); + tree->Branch("invMass_SC_regrCorrSemiParV8_pho", &invMass_SC_regrCorrSemiParV8_pho, "invMass_SC_regrCorrSemiParV8_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiParV8_ele", &invMass_SC_regrCorrSemiParV8_ele, "invMass_SC_regrCorrSemiParV8_ele/F"); + tree->Branch("invMass_MC", &invMass_MC, "invMass_MC/F"); tree->Branch("etaMCEle", etaMCEle, "etaMCEle[2]/F"); //[nEle] @@ -977,6 +1008,21 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int energySigmaSCEle_regrCorrSemiParV5_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV5sigma"); energySigmaSCEle_regrCorrSemiParV5_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV5sigma"); + energySCEle_regrCorrSemiParV6_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV6ecorr"); + energySCEle_regrCorrSemiParV6_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV6ecorr"); + energySigmaSCEle_regrCorrSemiParV6_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV6sigmaEoverE"); + energySigmaSCEle_regrCorrSemiParV6_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV6sigmaEoverE"); + + energySCEle_regrCorrSemiParV7_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV7ecorr"); + energySCEle_regrCorrSemiParV7_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV7ecorr"); + energySigmaSCEle_regrCorrSemiParV7_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV7sigmaEoverE"); + energySigmaSCEle_regrCorrSemiParV7_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV7sigmaEoverE"); + + energySCEle_regrCorrSemiParV8_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV8ecorr"); + energySCEle_regrCorrSemiParV8_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV8ecorr"); + energySigmaSCEle_regrCorrSemiParV8_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV8sigmaEoverE"); + energySigmaSCEle_regrCorrSemiParV8_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV8sigmaEoverE"); + // change in an electron properties please, EleNewEnergyProducer e3x3SCEle[index] = clustertools->e3x3(*electron1.superCluster()->seed()); e5x5SCEle[index] = clustertools->e5x5(*electron1.superCluster()->seed()); @@ -1058,6 +1104,18 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const angle); invMass_SC_regrCorrSemiParV5_pho = sqrt(2* energySCEle_regrCorrSemiParV5_pho[0] * energySCEle_regrCorrSemiParV5_pho[1] * angle); + invMass_SC_regrCorrSemiParV6_ele = sqrt(2* energySCEle_regrCorrSemiParV6_ele[0] * energySCEle_regrCorrSemiParV6_ele[1] * + angle); + invMass_SC_regrCorrSemiParV6_pho = sqrt(2* energySCEle_regrCorrSemiParV6_pho[0] * energySCEle_regrCorrSemiParV6_pho[1] * + angle); + invMass_SC_regrCorrSemiParV7_ele = sqrt(2* energySCEle_regrCorrSemiParV7_ele[0] * energySCEle_regrCorrSemiParV7_ele[1] * + angle); + invMass_SC_regrCorrSemiParV7_pho = sqrt(2* energySCEle_regrCorrSemiParV7_pho[0] * energySCEle_regrCorrSemiParV7_pho[1] * + angle); + invMass_SC_regrCorrSemiParV8_ele = sqrt(2* energySCEle_regrCorrSemiParV8_ele[0] * energySCEle_regrCorrSemiParV8_ele[1] * + angle); + invMass_SC_regrCorrSemiParV8_pho = sqrt(2* energySCEle_regrCorrSemiParV8_pho[0] * energySCEle_regrCorrSemiParV8_pho[1] * + angle); invMass_regrCorr_fra = sqrt(2* energyEle_regrCorr_fra[0] * energyEle_regrCorr_fra[1] *angle); invMass_regrCorr_egamma = sqrt(2* energyEle_regrCorr_egamma[0] * energyEle_regrCorr_egamma[1] *angle); From 974569626902047f4d8dd91af68a227ce2d706f3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 4 Oct 2013 17:35:41 +0200 Subject: [PATCH 179/475] fixes --- ALCARAW_RECO/alcareco_datasets.dat | 4 +- ALCARAW_RECO/ntuple_datasets.dat | 17 +++++ ALCARAW_RECO/scripts/prodAlcareco.sh | 4 +- ALCARAW_RECO/scripts/prodFunctions.sh | 3 + .../python/elenewenergiesproducer_cfi.py | 17 ++++- .../src/EleNewEnergiesProducer.cc | 24 ++----- ZNtupleDumper/python/patSequence_cff.py | 62 ++++++++++++++++++- 7 files changed, 106 insertions(+), 25 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 202fd8fe399..ae48ce886ea 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -75,5 +75,5 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- 160329-173692 /DoubleElectron/Run2011A-ZElectron-08Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011A-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011A-ZElectron-08Nov2011-v1_RAW-RECO_FNAL VALID RUN2011A,RUN2011AB 175832-180252 /DoubleElectron/Run2011B-ZElectron-19Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011B-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011B-ZElectron-19Nov2011-v1_RAW-RECO_FNAL VALID RUN2011B, RUN2011AB ##################### 2011 data 53X rereco -160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf group/alca_ecalcalib/alcareco/ VALID RUN2011A, RUN2011AB -175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf group/alca_ecalcalib/alcareco/ VALID RUN2011B, RUN2011AB +160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011A, RUN2011AB +175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011B, RUN2011AB diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index d4d62abe921..ba255ca0f76 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -179,3 +179,20 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM 206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 +175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 +160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 42d40d58b77..0b40d2dc856 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -8,8 +8,8 @@ USEPARENT=0 SCHEDULER=caf USESERVER=0 TYPE=ALCARECO -LUMIS_PER_JOBS=3000 # for ZSkim events is good, WSkim events /=4, SingleElectron /=10 -EVENTS_PER_JOB=400000 +LUMIS_PER_JOBS=200 # 4000 for ZSkim events is good, WSkim events /=4, SingleElectron /=10 +EVENTS_PER_JOB=50000 BLACKLIST=T2_EE_Estonia CREATE=yes SUBMIT=yes diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index 40e28a07d6f..b73db9cdbe6 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -69,6 +69,9 @@ setEnergy(){ *7TeV*) ENERGY=7TeV ;; + *Summer11*) + ENERGY=7TeV + ;; *) echo "[ERROR] Center of mass energy not determined for $1" >> /dev/stderr echo " Check implementation in prodFunctions.sh" >> /dev/stderr diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index 7ca1a589905..4dab7dc910b 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -17,8 +17,21 @@ correctionType = cms.string(''), ptSplit = cms.bool(True), regrEleJoshV4_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v4_forest_ele.root'), - regrEleJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ele.root'), regrPhoJoshV4_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v4_forest_ph.root'), + regrEleJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ele.root'), regrPhoJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ph.root'), - +# regrEleJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ele.root'), +# regrPhoJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ph.root'), +# regrEleJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ele.root'), +# regrPhoJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ph.root'), +# regrEleJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ele.root'), +# regrPhoJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ph.root'), + + regrEleJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_8TeV_forest_ele.root'), + regrPhoJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_8TeV_forest_ph.root'), + regrEleJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_8TeV_forest_ele.root'), + regrPhoJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_8TeV_forest_ph.root'), + regrEleJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_8TeV_forest_ele.root'), + regrPhoJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_8TeV_forest_ph.root'), + ) diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index d51726db306..d2fad9030f5 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -645,7 +645,7 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu //------------------------------ corV6_ele.CorrectedEnergyWithErrorV6(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); energySCEleJoshEleSemiParamV6_ecorr.push_back(ecor); - energySCEleJoshEleSemiParamV6_sigma.push_back(sigmaEoverE); + energySCEleJoshEleSemiParamV6_sigmaEoverE.push_back(sigmaEoverE); energySCEleJoshEleSemiParamV6_cbmean.push_back(cbmean); energySCEleJoshEleSemiParamV6_sigma.push_back(sigma); energySCEleJoshEleSemiParamV6_alpha1.push_back(alpha1); @@ -656,7 +656,7 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu corV6_pho.CorrectedEnergyWithErrorV6(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); energySCEleJoshPhoSemiParamV6_ecorr.push_back(ecor); - energySCEleJoshPhoSemiParamV6_sigma.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParamV6_sigmaEoverE.push_back(sigmaEoverE); energySCEleJoshPhoSemiParamV6_cbmean.push_back(cbmean); energySCEleJoshPhoSemiParamV6_sigma.push_back(sigma); energySCEleJoshPhoSemiParamV6_alpha1.push_back(alpha1); @@ -667,7 +667,7 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu //------------------------------ corV7_ele.CorrectedEnergyWithErrorV7(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); energySCEleJoshEleSemiParamV7_ecorr.push_back(ecor); - energySCEleJoshEleSemiParamV7_sigma.push_back(sigmaEoverE); + energySCEleJoshEleSemiParamV7_sigmaEoverE.push_back(sigmaEoverE); energySCEleJoshEleSemiParamV7_cbmean.push_back(cbmean); energySCEleJoshEleSemiParamV7_sigma.push_back(sigma); energySCEleJoshEleSemiParamV7_alpha1.push_back(alpha1); @@ -678,7 +678,7 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu corV7_pho.CorrectedEnergyWithErrorV7(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); energySCEleJoshPhoSemiParamV7_ecorr.push_back(ecor); - energySCEleJoshPhoSemiParamV7_sigma.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParamV7_sigmaEoverE.push_back(sigmaEoverE); energySCEleJoshPhoSemiParamV7_cbmean.push_back(cbmean); energySCEleJoshPhoSemiParamV7_sigma.push_back(sigma); energySCEleJoshPhoSemiParamV7_alpha1.push_back(alpha1); @@ -689,7 +689,7 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu //------------------------------ corV8_ele.CorrectedEnergyWithErrorV8(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); energySCEleJoshEleSemiParamV8_ecorr.push_back(ecor); - energySCEleJoshEleSemiParamV8_sigma.push_back(sigmaEoverE); + energySCEleJoshEleSemiParamV8_sigmaEoverE.push_back(sigmaEoverE); energySCEleJoshEleSemiParamV8_cbmean.push_back(cbmean); energySCEleJoshEleSemiParamV8_sigma.push_back(sigma); energySCEleJoshEleSemiParamV8_alpha1.push_back(alpha1); @@ -700,7 +700,7 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu corV8_pho.CorrectedEnergyWithErrorV8(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); energySCEleJoshPhoSemiParamV8_ecorr.push_back(ecor); - energySCEleJoshPhoSemiParamV8_sigma.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParamV8_sigmaEoverE.push_back(sigmaEoverE); energySCEleJoshPhoSemiParamV8_cbmean.push_back(cbmean); energySCEleJoshPhoSemiParamV8_sigma.push_back(sigma); energySCEleJoshPhoSemiParamV8_alpha1.push_back(alpha1); @@ -1078,8 +1078,6 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.put(energySCEleJoshEleSemiParamV6_sigmaEoverE_Map, "energySCEleJoshEleSemiParamV6sigmaEoverE"); iEvent.put(energySCEleJoshEleSemiParamV6_cbmean_Map, "energySCEleJoshEleSemiParamV6cbmean"); iEvent.put(energySCEleJoshEleSemiParamV6_sigma_Map, "energySCEleJoshEleSemiParamV6sigma"); - iEvent.put(energySCEleJoshEleSemiParamV6_sigma_Map, "energySCEleJoshEleSemiParamV6sigma"); - iEvent.put(energySCEleJoshEleSemiParamV6_sigma_Map, "energySCEleJoshEleSemiParamV6sigma"); iEvent.put(energySCEleJoshEleSemiParamV6_alpha1_Map, "energySCEleJoshEleSemiParamV6alpha1"); iEvent.put(energySCEleJoshEleSemiParamV6_gamma1_Map, "energySCEleJoshEleSemiParamV6gamma1"); iEvent.put(energySCEleJoshEleSemiParamV6_alpha2_Map, "energySCEleJoshEleSemiParamV6alpha2"); @@ -1090,8 +1088,6 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.put(energySCEleJoshPhoSemiParamV6_sigmaEoverE_Map, "energySCEleJoshPhoSemiParamV6sigmaEoverE"); iEvent.put(energySCEleJoshPhoSemiParamV6_cbmean_Map, "energySCEleJoshPhoSemiParamV6cbmean"); iEvent.put(energySCEleJoshPhoSemiParamV6_sigma_Map, "energySCEleJoshPhoSemiParamV6sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV6_sigma_Map, "energySCEleJoshPhoSemiParamV6sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV6_sigma_Map, "energySCEleJoshPhoSemiParamV6sigma"); iEvent.put(energySCEleJoshPhoSemiParamV6_alpha1_Map, "energySCEleJoshPhoSemiParamV6alpha1"); iEvent.put(energySCEleJoshPhoSemiParamV6_gamma1_Map, "energySCEleJoshPhoSemiParamV6gamma1"); iEvent.put(energySCEleJoshPhoSemiParamV6_alpha2_Map, "energySCEleJoshPhoSemiParamV6alpha2"); @@ -1103,8 +1099,6 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.put(energySCEleJoshEleSemiParamV7_sigmaEoverE_Map, "energySCEleJoshEleSemiParamV7sigmaEoverE"); iEvent.put(energySCEleJoshEleSemiParamV7_cbmean_Map, "energySCEleJoshEleSemiParamV7cbmean"); iEvent.put(energySCEleJoshEleSemiParamV7_sigma_Map, "energySCEleJoshEleSemiParamV7sigma"); - iEvent.put(energySCEleJoshEleSemiParamV7_sigma_Map, "energySCEleJoshEleSemiParamV7sigma"); - iEvent.put(energySCEleJoshEleSemiParamV7_sigma_Map, "energySCEleJoshEleSemiParamV7sigma"); iEvent.put(energySCEleJoshEleSemiParamV7_alpha1_Map, "energySCEleJoshEleSemiParamV7alpha1"); iEvent.put(energySCEleJoshEleSemiParamV7_gamma1_Map, "energySCEleJoshEleSemiParamV7gamma1"); iEvent.put(energySCEleJoshEleSemiParamV7_alpha2_Map, "energySCEleJoshEleSemiParamV7alpha2"); @@ -1115,8 +1109,6 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.put(energySCEleJoshPhoSemiParamV7_sigmaEoverE_Map, "energySCEleJoshPhoSemiParamV7sigmaEoverE"); iEvent.put(energySCEleJoshPhoSemiParamV7_cbmean_Map, "energySCEleJoshPhoSemiParamV7cbmean"); iEvent.put(energySCEleJoshPhoSemiParamV7_sigma_Map, "energySCEleJoshPhoSemiParamV7sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV7_sigma_Map, "energySCEleJoshPhoSemiParamV7sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV7_sigma_Map, "energySCEleJoshPhoSemiParamV7sigma"); iEvent.put(energySCEleJoshPhoSemiParamV7_alpha1_Map, "energySCEleJoshPhoSemiParamV7alpha1"); iEvent.put(energySCEleJoshPhoSemiParamV7_gamma1_Map, "energySCEleJoshPhoSemiParamV7gamma1"); iEvent.put(energySCEleJoshPhoSemiParamV7_alpha2_Map, "energySCEleJoshPhoSemiParamV7alpha2"); @@ -1128,8 +1120,6 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.put(energySCEleJoshEleSemiParamV8_sigmaEoverE_Map, "energySCEleJoshEleSemiParamV8sigmaEoverE"); iEvent.put(energySCEleJoshEleSemiParamV8_cbmean_Map, "energySCEleJoshEleSemiParamV8cbmean"); iEvent.put(energySCEleJoshEleSemiParamV8_sigma_Map, "energySCEleJoshEleSemiParamV8sigma"); - iEvent.put(energySCEleJoshEleSemiParamV8_sigma_Map, "energySCEleJoshEleSemiParamV8sigma"); - iEvent.put(energySCEleJoshEleSemiParamV8_sigma_Map, "energySCEleJoshEleSemiParamV8sigma"); iEvent.put(energySCEleJoshEleSemiParamV8_alpha1_Map, "energySCEleJoshEleSemiParamV8alpha1"); iEvent.put(energySCEleJoshEleSemiParamV8_gamma1_Map, "energySCEleJoshEleSemiParamV8gamma1"); iEvent.put(energySCEleJoshEleSemiParamV8_alpha2_Map, "energySCEleJoshEleSemiParamV8alpha2"); @@ -1140,8 +1130,6 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.put(energySCEleJoshPhoSemiParamV8_sigmaEoverE_Map, "energySCEleJoshPhoSemiParamV8sigmaEoverE"); iEvent.put(energySCEleJoshPhoSemiParamV8_cbmean_Map, "energySCEleJoshPhoSemiParamV8cbmean"); iEvent.put(energySCEleJoshPhoSemiParamV8_sigma_Map, "energySCEleJoshPhoSemiParamV8sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV8_sigma_Map, "energySCEleJoshPhoSemiParamV8sigma"); - iEvent.put(energySCEleJoshPhoSemiParamV8_sigma_Map, "energySCEleJoshPhoSemiParamV8sigma"); iEvent.put(energySCEleJoshPhoSemiParamV8_alpha1_Map, "energySCEleJoshPhoSemiParamV8alpha1"); iEvent.put(energySCEleJoshPhoSemiParamV8_gamma1_Map, "energySCEleJoshPhoSemiParamV8gamma1"); iEvent.put(energySCEleJoshPhoSemiParamV8_alpha2_Map, "energySCEleJoshPhoSemiParamV8alpha2"); diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 07f81e77a79..cd94aa81e54 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -75,7 +75,67 @@ cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5alpha2"), cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5gamma2"), cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV5pdfval"), - + ############### + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6sigmaEoverE"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6cbmean"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV6pdfval"), + + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6sigmaEoverE"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6cbmean"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV6pdfval"), + ############### + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7sigmaEoverE"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7cbmean"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV7pdfval"), + + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7sigmaEoverE"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7cbmean"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV7pdfval"), + ############### + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8sigmaEoverE"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8cbmean"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshEleSemiParamV8pdfval"), + + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8ecorr"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8sigmaEoverE"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8cbmean"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8sigma"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8alpha1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8gamma1"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8alpha2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8gamma2"), + cms.InputTag("eleNewEnergiesProducer", "energySCEleJoshPhoSemiParamV8pdfval"), + cms.InputTag("eleRegressionEnergy:eneRegForGsfEle"), cms.InputTag("eleRegressionEnergy", "eneErrorRegForGsfEle") ] From 3af6e8d531e47c09aaecb8eaa2fb2096f63c0e40 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 7 Nov 2013 20:38:24 +0100 Subject: [PATCH 180/475] updating smearing --- ALCARAW_RECO/alcareco_datasets.dat | 3 + ZFitter/awk/newResolution.awk | 4 +- ZFitter/bin/ZFitter.cpp | 133 +++++- ZFitter/data/regions/absEta.dat | 2 +- ZFitter/data/regions/scaleStep0.dat | 11 +- ZFitter/data/regions/validation.dat | 16 +- .../data/validation/22Jan2012-runDepMC.dat | 82 +++- ZFitter/data/validation/22Jan2012-stdMC.dat | 26 +- ZFitter/interface/RooSmearer.hh | 5 +- ZFitter/interface/SmearingImporter.hh | 2 +- ZFitter/interface/ZFit_class.hh | 2 +- ZFitter/m.C | 14 +- ZFitter/macro/PlotDataMC.C | 4 +- ZFitter/macro/mcmcDraw.C | 33 +- ZFitter/p.C | 13 +- ZFitter/script/FitResultTostep2.sh | 2 +- ZFitter/script/GenRootChain.sh | 6 +- ZFitter/script/PUDumperToHist.sh | 4 +- ZFitter/script/dataPU.sh | 9 +- ZFitter/script/energyScale.sh | 451 ++++++++++++++++-- ZFitter/script/justOnce/smearing.sh | 172 +++---- ZFitter/script/monitoring_validation.sh | 202 ++++++-- ZFitter/src/RooSmearer.cc | 324 +++++++------ ZFitter/src/SmearingImporter.cc | 53 +- ZFitter/src/ZFit_class.cc | 4 +- ZFitter/src/nllProfile.cc | 213 ++++++--- 26 files changed, 1261 insertions(+), 529 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index aa5ad565b6a..f50da87d33d 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -13,6 +13,9 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S 194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +################### MC 7TeV 53X +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco ################### MC geometries and material allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat10S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat10S30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat20S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat20S30 caf group/alca_ecalcalib/alcareco diff --git a/ZFitter/awk/newResolution.awk b/ZFitter/awk/newResolution.awk index 880729032bf..2c2a0b4dfd7 100644 --- a/ZFitter/awk/newResolution.awk +++ b/ZFitter/awk/newResolution.awk @@ -26,8 +26,8 @@ BEGIN{ # $13 = old_addSmearing -> not used # $14 = err_old_addSmearing -> not used - b=(91.187+$3); b2=b*b; - c=(91.187+$5); c2=c*c; + b=(91.188+$3); b2=b*b; + c=(91.188+$5); c2=c*c; # printf("%s\t& %s", $1, $2); diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index ce1c326fb80..0eed7730ed8 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -303,7 +303,7 @@ int main(int argc, char **argv) { ("constTermFix", "constTerm not depending on Et") ("alphaGoldFix", "alphaTerm for gold electrons fixed to the low eta region") ("smearingEt", "alpha term depend on sqrt(Et) and not on sqrt(E)") - ("nSmearToy", po::value(&nSmearToy)->default_value(1), "") + ("nSmearToy", po::value(&nSmearToy)->default_value(0), "") ; inputOption.add_options() ("chainFileList,f", po::value< string >(&chainFileListName), "Configuration file with input file list") @@ -338,7 +338,10 @@ int main(int argc, char **argv) { po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); - + if(!vm.count("invMass_binWidth") && !vm.count("smearerFit")){ + std::cout << "[INFO] Bin Width=0.5" << std::endl; + invMass_binWidth=0.5; + } if (vm.count("help")) { cout << desc << "\n"; @@ -356,6 +359,19 @@ int main(int argc, char **argv) { else if(invMass_var=="invMass_SC_regrCorrSemiParV4_pho") energyBranchName = "energySCEle_regrCorrSemiParV4_pho"; else if(invMass_var=="invMass_SC_regrCorrSemiParV5_ele") energyBranchName = "energySCEle_regrCorrSemiParV5_ele"; else if(invMass_var=="invMass_SC_regrCorrSemiParV5_pho") energyBranchName = "energySCEle_regrCorrSemiParV5_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV6_ele") energyBranchName = "energySCEle_regrCorrSemiParV6_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV6_pho") energyBranchName = "energySCEle_regrCorrSemiParV6_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV7_ele") energyBranchName = "energySCEle_regrCorrSemiParV7_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV7_pho") energyBranchName = "energySCEle_regrCorrSemiParV7_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV8_ele") energyBranchName = "energySCEle_regrCorrSemiParV8_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV8_pho") energyBranchName = "energySCEle_regrCorrSemiParV8_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_pho"; + else { std::cerr << "Energy branch name not define for invariant mass branch: " << invMass_var << std::endl; exit(1); @@ -633,6 +649,7 @@ int main(int argc, char **argv) { tag_chain_itr++){ if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; TChain *ch = (tag_chain_itr->second.find("selected"))->second; + if((tag_chain_itr->second.count("pileup"))) continue; TString treeName="pileup"; TString filename="tmp/mcPUtree"+tag_chain_itr->first+".root"; TFile f(filename,"recreate"); @@ -898,7 +915,8 @@ int main(int argc, char **argv) { } TRandom3 g(0); - TString filename="tmp/tmpFile-"; filename+=g.Integer(1000000);filename+=".root"; + Long64_t randomInt=g.Integer(1000000); + TString filename="tmp/tmpFile-"; filename+=randomInt;filename+=".root"; TFile *tmpFile = new TFile(filename,"recreate"); tmpFile->cd(); RooSmearer smearer("smearer",(tagChainMap["d"])["selected"], (tagChainMap["s"])["selected"], NULL, @@ -913,7 +931,7 @@ int main(int argc, char **argv) { //smearer.nEventsMinDiag = nEventsMinDiag; smearer._deactive_minEventsOffDiag = nEventsMinOffDiag; smearer.SetSmearingEt(vm.count("smearingEt")); - smearer._nSmearToy = nSmearToy; + if(nSmearToy>0) smearer._nSmearToy = nSmearToy; //------------------------------ Take the list of branches needed for the defined categories ElectronCategory_class cutter; std::set activeBranchList; @@ -933,7 +951,7 @@ int main(int argc, char **argv) { mc = (tagChainMap["s"])["selected"]; } ZFit_class fitter( data, mc, NULL, - invMass_var.c_str(), invMass_min, invMass_max); + invMass_var.c_str(), invMass_min, invMass_max, invMass_binWidth); fitter._oddMC=vm.count("isOddMC"); fitter._oddData=vm.count("isOddData"); @@ -997,6 +1015,11 @@ int main(int argc, char **argv) { args.writeToStream(std::cout, kFALSE); smearer.Init(commonCut.c_str(), eleID); } + myClock.Start(); + smearer.evaluate(); + myClock.Stop(); + myClock.Print(); + smearer.DumpNLL(); //if(vm.count("plotOnly")) //smearer.SetNSmear(10); RooMinuit m(smearer); @@ -1151,6 +1174,7 @@ int main(int argc, char **argv) { outFile+=r+"-"+TString(commonCut.c_str())+".root"; TFile *fOutProfile = new TFile(outFile,"recreate"); //test/dato/fitres/Hgg_Et_v7/0.03//outProfile-data/regions/test.dat-Et_25-EB.root + for (int ivar=0;ivarGetName()); + if(name.Contains("scale")) continue; //if(name.Contains("absEta_1_1.4442-gold") && vm.count("alphaGoldFix")) continue; // special part for alpha fitting double min=0.; TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList.find(alphaName): NULL; - TGraph *profilePhi=NULL; if(var2!=NULL && name.Contains("constTerm") && var2->isConstant()==false){ + TString name2 = name; + + double rho=0, Emean=0; smearer.SetDataSet(name,TString(var->GetName())+TString(var2->GetName())); + if(vm.count("constTermFix")) MinProfile2D(var, var2, smearer, -1, 0., min, rho, Emean, false); + smearer.dataset->Write(); - if(vm.count("constTermFix")) MinProfile2D(var, var2, smearer, -1, 0., min, false, &profilePhi); - //MinMCMC2D(var, var2, smearer, 1, 0., min, 1200, false); - //MinMCMC2D(var, var2, smearer, 2, 0., min, 800, false); - //MinMCMC2D(var, var2, smearer, 3, 0., min, 100, false); + // rho profile + name2.ReplaceAll("constTerm", "rho"); +// smearer.SetDataSet(name2,"rho"); +// Double_t v1=var->getVal(); +// Double_t v2=var2->getVal(); +// var2->setVal(0); +// var->setVal(rho); + TGraph *profil = NULL; +//profil = GetProfile(var, smearer,0); +// var2->setVal(v2); +// var->setVal(v1); + TString n="profileChi2_"+name2+"_"; n+=randomInt; +// profil->SetName(n); +// TCanvas c("c_"+name); +// profil->Draw("AP*"); +// fOutProfile->cd(); +// profil->Write(); +// delete profil; +// smearer.dataset->Write(); + + + // phi profile + name2.ReplaceAll("rho", "phi"); +// smearer.SetDataSet(name2,"phi"); +// profil = GetProfile(var, var2, smearer, true, rho, Emean); +// n="profileChi2_"+name2+"_"; n+=randomInt; +// profil->SetName(n); +// profil->Draw("AP*"); +// fOutProfile->cd(); +// profil->Write(); +// delete profil; +// smearer.dataset->Write(); + + // rho profile with fixed phi!=pi/2 + name2.ReplaceAll("phi", "rho_phi4"); + smearer.SetDataSet(name2,"rho_phi4"); + profil = GetProfile(var, var2, smearer, true, 0, Emean, 0.785); + n="profileChi2_"+name2+"_"; n+=randomInt; + profil->SetName(n); + profil->Draw("AP*"); + fOutProfile->cd(); + profil->Write(); + delete profil; smearer.dataset->Write(); - TString of=outFile; of.ReplaceAll(".root",name+".root"); - smearer.dataset->SaveAs(of); + +// // rho profile with fixed phi!=pi/2 +// name2.ReplaceAll("rho_phi4", "rho_phi6"); +// smearer.SetDataSet(name2,"rho_phi6"); +// profil = GetProfile(var, var2, smearer, true, 0, Emean, 0.524); +// n="profileChi2_"+name2+"_"; n+=randomInt; +// profil->SetName(n); +// profil->Draw("AP*"); +// fOutProfile->cd(); +// profil->Write(); +// delete profil; +// smearer.dataset->Write(); + +// // rho profile with fixed phi!=pi/2 +// name2.ReplaceAll("rho_phi6", "rho_phi3"); +// smearer.SetDataSet(name2,"rho_phi3"); +// profil = GetProfile(var, var2, smearer, true, 0, Emean, 1.05); +// n="profileChi2_"+name2+"_"; n+=randomInt; +// profil->SetName(n); +// profil->Draw("AP*"); +// fOutProfile->cd(); +// profil->Write(); +// delete profil; +// smearer.dataset->Write(); + } + //if(!name.Contains("scale")) continue; std::cout << "Doing " << name << "\t" << var->getVal() << std::endl; - + smearer.SetDataSet(name,name); + // if(vm.count("runToy")){ + // MinProfile(var, smearer, -1, 0., min, false); + //} TGraph *profil = GetProfile(var, smearer,0); - TString n="profileChi2_"+name; + TString n="profileChi2_"+name+"_"; n+=randomInt; profil->SetName(n); TCanvas c("c_"+name); profil->Draw("AP*"); fOutProfile->cd(); profil->Write(); std::cout << "Saved profile for " << name << std::endl; - if(var2!=NULL && name.Contains("constTerm") && var2->isConstant()==false){ - n.ReplaceAll("constTerm","phi"); - profilePhi->SetName(n); - profilePhi->Draw("AP*"); - profilePhi->Write(); - } - std::cout << "Saved profile for " << n << std::endl; - + smearer.dataset->Write(); delete profil; - delete profilePhi; } std::cout << "Cloning args" << std::endl; // RooArgSet *mu = (RooArgSet *)args.snapshot(); diff --git a/ZFitter/data/regions/absEta.dat b/ZFitter/data/regions/absEta.dat index a32381d4aca..3dc74350ec2 100644 --- a/ZFitter/data/regions/absEta.dat +++ b/ZFitter/data/regions/absEta.dat @@ -18,7 +18,7 @@ absEta_1.8_1.9 absEta_1.9_2.0 absEta_2.0_2.2 absEta_2.2_2.3 -absEta_2.2_2.5 +absEta_2.3_2.5 absEta_0_0.1-gold absEta_0.1_0.2-gold absEta_0.2_0.4-gold diff --git a/ZFitter/data/regions/scaleStep0.dat b/ZFitter/data/regions/scaleStep0.dat index c5756d5b5da..1f0352bfb23 100644 --- a/ZFitter/data/regions/scaleStep0.dat +++ b/ZFitter/data/regions/scaleStep0.dat @@ -1,7 +1,10 @@ # regions defined for condition validation -EB-absEta_0_1 -EB-absEta_1_1.4442 -EE-absEta_1.566_2 -EE-absEta_2_2.5 +#EB-absEta_0_1 +#EB-absEta_1_1.4442 +#EE-absEta_1.566_2 +#EE-absEta_2_2.5 #EB #EE +absEta_0_3-gold +absEta_0_3-bad +absEta_0_3 diff --git a/ZFitter/data/regions/validation.dat b/ZFitter/data/regions/validation.dat index e8c9afd28ab..68c4e83681f 100644 --- a/ZFitter/data/regions/validation.dat +++ b/ZFitter/data/regions/validation.dat @@ -1,7 +1,7 @@ # regions defined for condition validation EB -EBp -EBm +#EBp +#EBm EB-gold EB-bad EB-absEta_0_1 @@ -12,13 +12,13 @@ EB-absEta_1_1.4442-gold EB-absEta_1_1.4442-bad EB_EE EE -EEp -EEm +#EEp +#EEm EE-gold EE-bad EE-absEta_1.566_2 EE-absEta_2_2.5 -#EE-absEta_1.566_2-gold -#EE-absEta_1.566_2-bad -#EE-absEta_2_2.5-gold -#EE-absEta_2_2.5-bad +EE-absEta_1.566_2-gold +EE-absEta_1.566_2-bad +EE-absEta_2_2.5-gold +EE-absEta_2_2.5-bad diff --git a/ZFitter/data/validation/22Jan2012-runDepMC.dat b/ZFitter/data/validation/22Jan2012-runDepMC.dat index bebe6b4c12f..aa18a4b4a66 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMC.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMC.dat @@ -1,22 +1,22 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9ShiftMCweight/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9ShiftMCweight/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9ShiftMCweight/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrain/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrain/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrain/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Powheg -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9ShiftMCweight/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9ShiftMCweight/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9ShiftMCweight/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrain_bis/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrain_bis/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrain_bis/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Sherpa -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9ShiftMCweight/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9ShiftMCweight/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9ShiftMCweight/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrain/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrain/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrain/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root ########### Data -d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root -d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root -d3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root -d4 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d4 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root ########### Friend trees ##### PU histograms d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root @@ -31,16 +31,56 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859- #s3 pileup mcPUtree_s3-22Jan2012-runDepMC.dat s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMC.root s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMC.root -s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMC.root +#s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMC.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root ##### Smearer category trees #d smearerCat_d smearerCat_data-scaleStep2smearing_8.root #s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root -d1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d1-22Jan2012-runDepMC.root -d2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d2-22Jan2012-runDepMC.root -d3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d3-22Jan2012-runDepMC.root -d4 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d4-22Jan2012-runDepMC.root -s1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s1-22Jan2012-runDepMC.root -s2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s2-22Jan2012-runDepMC.root -s3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s3-22Jan2012-runDepMC.root +#d1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s2-22Jan2012-runDepMC.root +##s3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s3-22Jan2012-runDepMC.root +# +#d1 smearerCat_scaleStep2smearing_9 smearerCat_scaleStep2smearing_9_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep2smearing_9 smearerCat_scaleStep2smearing_9_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep2smearing_9 smearerCat_scaleStep2smearing_9_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep2smearing_9 smearerCat_scaleStep2smearing_9_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep2smearing_9 smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep2smearing_9 smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMC.root +##s3 smearerCat_scaleStep2smearing_9 smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMC.root +# +#d1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s2-22Jan2012-runDepMC.root +##s3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s3-22Jan2012-runDepMC.root +## +#d1 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMC.root +##s3 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMC.root +# +d1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d1-22Jan2012-runDepMC.root +d2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d2-22Jan2012-runDepMC.root +d3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d3-22Jan2012-runDepMC.root +d4 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d4-22Jan2012-runDepMC.root +s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMC.root +s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMC.root +#s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMC.root +# +d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root +d2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d2-22Jan2012-runDepMC.root +d3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d3-22Jan2012-runDepMC.root +d4 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d4-22Jan2012-runDepMC.root +s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMC.root +s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMC.root +#s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMC.root diff --git a/ZFitter/data/validation/22Jan2012-stdMC.dat b/ZFitter/data/validation/22Jan2012-stdMC.dat index 65686587d84..6cdd520161e 100644 --- a/ZFitter/data/validation/22Jan2012-stdMC.dat +++ b/ZFitter/data/validation/22Jan2012-stdMC.dat @@ -23,9 +23,23 @@ s2 pileup mcPUtree_s2-22Jan2012-stdMC.dat #d smearerCat_d smearerCat-22Jan-stdMC_data-scaleStep2smearing_7.root #s smearerCat_s smearerCat-22Jan-stdMC_mc-scaleStep2smearing_7.root # -d1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d1-22Jan2012-stdMC.root -d2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d2-22Jan2012-stdMC.root -d3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d3-22Jan2012-stdMC.root -d4 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d4-22Jan2012-stdMC.root -s1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s1-22Jan2012-stdMC.root -s2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s2-22Jan2012-stdMC.root +d1 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_d1-22Jan2012-stdMC.root +d2 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_d2-22Jan2012-stdMC.root +d3 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_d3-22Jan2012-stdMC.root +d4 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_d4-22Jan2012-stdMC.root +s1 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s1-22Jan2012-stdMC.root +s2 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s2-22Jan2012-stdMC.root +# +d1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d1-22Jan2012-stdMC.root +d2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d2-22Jan2012-stdMC.root +d3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d3-22Jan2012-stdMC.root +d4 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d4-22Jan2012-stdMC.root +s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-stdMC.root +s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-stdMC.root +# +d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-stdMC.root +d2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d2-22Jan2012-stdMC.root +d3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d3-22Jan2012-stdMC.root +d4 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d4-22Jan2012-stdMC.root +s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-stdMC.root +s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-stdMC.root diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index c5b47e75c70..05af9a8bdaa 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -234,7 +234,7 @@ private: double getLogLikelihood(TH1F* data, TH1F* prob) const; void UpdateCategoryNLL(ZeeCategory& cat, unsigned int nLLtoy, bool multiSmearToy=true); - + int Trag_eq(int row, int col, int N) const; @@ -246,7 +246,8 @@ public: bool smearEnergy, bool forceNew=false, bool multiSmearToy=true); - float getCompatibility(void) const; + double getCompatibility(void) const; + void DumpNLL(void) const; // float getCompatibility(const RooSmearer *ptr); inline RooArgSet GetParams(void){return _paramSet;}; diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index baad1d6c47d..328269891ab 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -8,7 +8,7 @@ #include #include -#define NSMEARTOYLIM 100 +#define NSMEARTOYLIM 31 #include "ZeeEvent.hh" #include "ElectronCategory_class.hh" diff --git a/ZFitter/interface/ZFit_class.hh b/ZFitter/interface/ZFit_class.hh index ae4c7b02c11..73d79fa5582 100644 --- a/ZFitter/interface/ZFit_class.hh +++ b/ZFitter/interface/ZFit_class.hh @@ -50,7 +50,7 @@ class ZFit_class{ TChain *signal_chain_, TChain *bkg_chain_, // config_map_t config_map_, - TString invMass_VarName="invMass_SC", double invMass_min=65, double invMass_max=115 + TString invMass_VarName="invMass_SC", double invMass_min=65, double invMass_max=115, double bin_width=0.5 //int eleID_=7, TString commonCut="Et_25", bool odd=false ); diff --git a/ZFitter/m.C b/ZFitter/m.C index 6ff8d9e5327..4047c41904a 100644 --- a/ZFitter/m.C +++ b/ZFitter/m.C @@ -1,6 +1,6 @@ { TString optSmooth="k3a"; - TString toyDir="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorizedNew_2nd/"; + TString toyDir="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_9/factorizedSherpaFixed_DataSeedFixed_cmscaf1nd/"; //0.005-0.00 0.005-0.01 0.005-0.15 0.01-0.00 0.01-0.01 0.01-0.15 0.02-0.00 0.02-0.01 0.02-0.15 gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); @@ -11,14 +11,14 @@ intSmoothVec.push_back(10); std::vector toySubDirVec; - toySubDirVec.push_back("0.01-0.00/"); - toySubDirVec.push_back("0.000-0.07/"); - toySubDirVec.push_back("0.007-0.05/"); + toySubDirVec.push_back("0.01-0.00/1/"); + // toySubDirVec.push_back("0.000-0.07/50/"); + // toySubDirVec.push_back("0.007-0.05/50/"); for(std::vector::const_iterator toySubDir_itr = toySubDirVec.begin(); toySubDir_itr!= toySubDirVec.end(); toySubDir_itr++){ for(int nSmooth=0; nSmooth<=10; nSmooth++){ - if(nSmooth!=0 && nSmooth!=3 && nSmooth!=10) continue; + if(nSmooth!=0 && nSmooth!=10) continue; // for(std::vector::const_iterator nSmooth_itr = intSmoothVec.begin(); // nSmooth_itr != intSmoothVec.end(); nSmooth_itr++){ //int nSmooth=*nSmooth_itr; @@ -27,8 +27,8 @@ TString outDir=toyDir+toySubDir+"img/"+optSmooth+"/nSmooth_"; outDir+=nSmooth; outDir+="/"; system(("mkdir -p "+outDir).Data()); // TTree *toys = ToyTree("test/dato/fitres/Hgg_Et-toys/old/scaleStep2smearing_5/0.01-0.00/C/","outProfile-scaleStep2smearing_5-Et_25-trigger-noPF-EB.root","scan"); - TTree *toys = ToyTree(toyDir+toySubDir,"outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root", optSmooth,nSmooth); - //toys->Scan("catName:catIndex:constTermTrue:alphaTrue:constTerm:alpha","","col=20"); + TTree *toys = ToyTree(toyDir+toySubDir,"outProfile-scaleStep2smearing_9-Et_20-trigger-noPF-EB.root", optSmooth,nSmooth); + //toys->Scan("catName:catIndex:constTermTrue:alphaTrue:constTerm:alpha","","col=50"); DrawToyTree(toys, outDir); delete toys; } diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 9b4bcc1fbe5..0e05c8cc894 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -587,7 +587,7 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn yLabel.Form("Events /(%.2f %s)", d->GetBinWidth(2), yLabelUnit.Data()); float max = 0; //1.1 * std::max( - max=1.1*d->GetMaximum(); + max=1.2*d->GetMaximum(); std::cout << "max = " << max << std::endl; std::cout << "nEvents data: " << d->Integral() << "\t" << d->GetEntries() << std::endl; @@ -616,7 +616,7 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn s->GetXaxis()->SetTitle(xLabel); s->SetMarkerStyle(20); - s->SetMarkerSize(2); + s->SetMarkerSize(1); s->SetMarkerColor(colors[i]); s->SetFillStyle(fillstyle[i]); s->SetFillColor(colors[i]); diff --git a/ZFitter/macro/mcmcDraw.C b/ZFitter/macro/mcmcDraw.C index 06154e12f9d..6f5ea71180a 100644 --- a/ZFitter/macro/mcmcDraw.C +++ b/ZFitter/macro/mcmcDraw.C @@ -786,10 +786,13 @@ void MakePlots(TString filename, float zmax=30, int nSmooth=10, TString opt="", TString constTermName = dataset->GetName(); TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); + if(constTermName.Contains("absEta_1_1.4442-gold")) continue; + if(constTermName.Contains("rho") || constTermName.Contains("phi")) continue; + if(constTermName.Contains("scale")) continue; TTree *tree = dataset2tree(dataset); TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); // TString binning="(241,-0.0005,0.2405,60,0.00025,0.03025)"; - TString binning="(241,-0.0005,0.2405,300,0.00025,0.03025)"; + TString binning="(241,-0.0005,0.2405,301,-0.00005,0.03005)"; TH2F *hist = prof2d(tree, constTermName, alphaName, "nll", binning, true,nSmooth, opt); // std::cout << "Bin width = " << hist->GetXaxis()->GetBinWidth(10) << "\t" << hist->GetYaxis()->GetBinWidth(10) << std::endl; @@ -826,6 +829,7 @@ void MakePlots(TString filename, float zmax=30, int nSmooth=10, TString opt="", c->SaveAs(fileName+".png"); c->SaveAs(fileName+".eps"); + if(fileName.Contains("constTerm")) c->SaveAs(fileName+".C"); fileName+="-zoom"; hist->GetZaxis()->SetRangeUser(0,1); @@ -915,6 +919,13 @@ void MakePlots(TString filename, float zmax=30, int nSmooth=10, TString opt="", return; } +TGraph *GetRho(TTree *t, TString alphaName, TString constTermName){ + t->Draw("nll:"+constTermName.ReplaceAll("-","_"), alphaName.ReplaceAll("-","_")+" == 0"); + TGraph *gr0 = (TGraph*) gROOT->FindObject("Graph")->Clone(); + gr0->SetMarkerStyle(34); gr0->SetMarkerSize(1.0); + //if (gr0->GetN() > 1) gr0->Set(1); + return gr0; +} TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString fname="outProfile-scaleStep2smearing_7-Et_25-trigger-noPF-EB.root", TString opt="", int nSmooth=10){ @@ -946,9 +957,9 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString std::map catIndexMap; ///1/ - for(int itoy =2; itoy <= 200; itoy++){ + for(int itoy =2; itoy <= 50; itoy++){ TString filename=dirname+"/"; filename+=itoy; filename+="/"+fname; - + TString fout=dirname+"/"; fout+=itoy; fout+="/"; TFile f_in(filename, "read"); if(f_in.IsZombie()){ std::cerr << "File opening error: " << filename << std::endl; @@ -965,12 +976,20 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString TString constTermName = dataset->GetName(); TString alphaName=constTermName; alphaName.ReplaceAll("constTerm","alpha"); - + if(constTermName.Contains("scale")) continue; + if(constTermName.Contains("alpha")) continue; + if(constTermName.Contains("1.4442-gold")) continue; TTree *tree = dataset2tree(dataset); + TGraph *rhoGraph = GetRho(tree, alphaName, constTermName); + + rhoGraph->SaveAs(fout+"rhoGraph-"+constTermName+".root"); + + TGraphErrors bestFit_ = bestFit(tree, alphaName, constTermName); - TString binning="(241,-0.0005,0.2405,61,-0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; - + //TString binning="(241,-0.0005,0.2405,61,-0.00025,0.03025)"; //"(40,0.00025,0.02025,61,-0.0022975,0.1401475)"; + TString binning="(241,-0.0005,0.2405,301,-0.00005,0.03005)"; + TH2F *hist = prof2d(tree, constTermName, alphaName, "nll", binning, true, nSmooth, opt); //hist->SaveAs("myhist.root"); @@ -1002,6 +1021,8 @@ TTree *ToyTree(TString dirname="test/dato/fitres/Hgg_Et-toys/0.01-0.00", TString // hist->SaveAs("myhist.root"); // exit(0); } + + delete tree; delete hist; diff --git a/ZFitter/p.C b/ZFitter/p.C index 2634687ec1b..4a4f8c7f886 100644 --- a/ZFitter/p.C +++ b/ZFitter/p.C @@ -3,13 +3,14 @@ TString optSmooth="k3a"; gROOT->ProcessLine(".include /afs/cern.ch/cms/slc5_amd64_gcc462/lcg/roofit/5.32.03-cms16/include"); gROOT->ProcessLine(".L macro/mcmcDraw.C+"); - TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_8/factorizedSherpa_2nd/0.01-0.00/90/2/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF-EB.root"; - // TString filename="test/dato/22Jan2012-runDepPowheg-noR9shift/loose/invMass_SC_regrCorrSemiParV5_pho/step4_fixed/fitres/outProfile-scaleStep2smearing_8-Et_25-trigger-noPF.root"; + //TString filename="test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_9/factorizedSherpaFixed_DataSeedFixed_smooth_autobin_cmscaf1nd/0.007-0.05-1.00/10/3/outProfile-scaleStep2smearing_9-Et_20-trigger-noPF-EB.root"; + // TString filename="test/dato/22Jan2012-runDepMC/loose/invMass_SC_regrCorrSemiParV5_pho/step2/fitres/outProfile-scaleStep2smearing_9-Et_20-trigger-noPF.root"; + TString filename="test/dato/22Jan2012-runDepMCAll/loose/invMass_SC_regrCorrSemiParV5_pho/step8/50/fitres/outProfile-scaleStep2smearing_9-Et_20-trigger-noPF.root"; - MakePlots(filename, 10, 10, optSmooth); - MakePlots(filename, 10, 3, optSmooth); - MakePlots(filename, 10, 1, optSmooth); - MakePlots(filename, 10, 0, optSmooth); +// MakePlots(filename, 10, 10, optSmooth); +// MakePlots(filename, 10, 3, optSmooth); +// MakePlots(filename, 10, 1, optSmooth); + MakePlots(filename, 300, 0, optSmooth); } TCanvas *c = new TCanvas("c",""); // gROOT->ProcessLine(".L ~/smooth.C+"); diff --git a/ZFitter/script/FitResultTostep2.sh b/ZFitter/script/FitResultTostep2.sh index 51be76afbaa..bb27ecf9c4b 100755 --- a/ZFitter/script/FitResultTostep2.sh +++ b/ZFitter/script/FitResultTostep2.sh @@ -1,6 +1,6 @@ #!/bin/bash commonCut=Et_25-trigger-noPF -selection=WP90_PU +selection=loose invMass_var=invMass_SC_regrCorr_pho baseDir=test updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index c2f05c8feb4..d1b4397736f 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -24,6 +24,8 @@ usage(){ echo " --outDirImg arg (=${outDirImg})" echo " --addBranch arg" echo " --regionsFile arg (=${regionsFile})" + echo " --corrEleType arg" + echo " --corrEleFile arg" # echo " --puName arg " # echo " --runRangesFile arg (=${runRangesFile}) run ranges for stability plots" # echo " --selection arg (=${selection}) " @@ -51,7 +53,7 @@ desc(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics,slides,onlyTable,test,commonCut:,period:,noPU,outDirImg:,addBranch:,regionsFile: -- "$@") +if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics,slides,onlyTable,test,commonCut:,period:,noPU,outDirImg:,addBranch:,regionsFile:,corrEleType:,corrEleFile: -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -68,6 +70,8 @@ do --noPU) noPU="--noPU";; --addBranch) addBranchList="${addBranchList} --addBranch=$2"; shift;; --regionsFile) regionsFile=$2; shift;; + --corrEleType) corrEleType="--corrEleType=$2"; shift;; + --corrEleFile) corrEleFile="--corrEleFile=$2"; shift;; --invMass_var) invMass_var=$2; echo "[OPTION] invMass_var = ${invMass_var}"; shift;; --outDirImg) outDirImg=$2; shift;; --puName) puName=$2; shift;; diff --git a/ZFitter/script/PUDumperToHist.sh b/ZFitter/script/PUDumperToHist.sh index 8bca16d1a37..183eb03ba98 100755 --- a/ZFitter/script/PUDumperToHist.sh +++ b/ZFitter/script/PUDumperToHist.sh @@ -2,7 +2,7 @@ OUTFILE=nPUtrue.root usage(){ - echo "`basename $0` -f file.root -d outDir -o outfile.root" + echo "`basename $0` -f file.root -o outfile.root" } # options may be followed by one colon to indicate they have a required argument @@ -18,7 +18,7 @@ while [ $# -gt 0 ] do case $1 in -h|--help) usage; exit 0;; - -f) FILES="$FILE $2"; shift;; + -f) FILES="$FILES $2"; shift;; # -d) FILEDIR=$2; shift;; -o) OUTFILE=$2; shift;; (--) shift; break;; diff --git a/ZFitter/script/dataPU.sh b/ZFitter/script/dataPU.sh index dcb6f5a7189..3b3bf0ec96a 100755 --- a/ZFitter/script/dataPU.sh +++ b/ZFitter/script/dataPU.sh @@ -1,11 +1,14 @@ #!/bin/bash +CERT_BASE_DIR=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification +MINBIAS=69400 + usage(){ echo echo "============================== Usage: " echo "`basename $0` <-a | < -p pileupFile -j jsonFile> > [--pixel] [--printOnly]" #| -u crab_working_dir >" echo " -a: automatic retreive of the last jsonFile and last pileupFile" echo "Optional parameters:" - echo " -m minbias" + echo " -m minbias (=$MINBIAS)" echo " -r 190000-200000 : run range" echo " --printOnly" echo " --pixel : use PU JSON with pixel correction" @@ -30,8 +33,6 @@ desc(){ } -CERT_BASE_DIR=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification -MINBIAS=69400 runRangeJSON(){ _RUNRANGE=$1 @@ -145,7 +146,7 @@ if [ -n "$PRINTONLY" ];then exit 0;fi if [ ! -e "data/puFiles/$JSONNAME.root" ];then if [ ! -d "data/puFiles" ];then mkdir data/puFiles -p; fi - pileupCalc.py -i ${JSON} --inputLumiJSON $PUJSON --calcMode observed --minBiasXsec $MINBIAS --maxPileupBin 60 --numPileupBins 60 data/puFiles/$JSONNAME.root + pileupCalc.py -i ${JSON} --inputLumiJSON $PUJSON --calcMode true --minBiasXsec $MINBIAS --maxPileupBin 100 --numPileupBins 100 data/puFiles/$JSONNAME.root fi diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index ce0c9cf2740..d132bcb72d6 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -6,7 +6,8 @@ source script/functions.sh # - material dependence (step2) # - closure test (step3) -commonCut=Et_25-trigger-noPF +index= +commonCut=Et_20-trigger-noPF selection=loose invMass_var=invMass_SC_regrCorrSemiParV5_pho baseDir=test @@ -22,12 +23,13 @@ usage(){ echo " --invMass_var arg" echo " --commonCut arg (=$commonCut)" echo " --step arg: 1, 2, 2fit, 3, 3weight, slide, 3stability, syst, 1-2,1-3,1-3stability and all ordered combination" + echo " --index arg" } #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hf:s: -l help,regionFile:,runRangesFile:,selection:,invMass_var:,step:,baseDir:,commonCut: -- "$@") +if ! options=$(getopt -u -o hf:s: -l help,regionFile:,runRangesFile:,selection:,invMass_var:,step:,baseDir:,commonCut:,index: -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -42,6 +44,7 @@ do -f) configFile=$2; shift;; -s|--step) STEP=$2; shift;; --invMass_var) invMass_var=$2; echo "[OPTION] invMass_var = ${invMass_var}"; shift;; + --index) index=$2; shift;; --runRangesFile) runRangesFile=$2; echo "[OPTION] runRangesFile = ${runRangesFile}"; shift;; --selection) selection=$2; echo "[OPTION] selection = ${selection}"; shift;; --baseDir) baseDir=$2; echo "[OPTION] baseDir = $baseDir"; shift;; @@ -88,6 +91,11 @@ case ${STEP} in 2) STEP2=y;; 3) STEP3=y;; #SLIDE=y;; 4) STEP4=y;; + 5) STEP5=y;; + 6) STEP6=y;; + 8) STEP8=y;; + 9) STEP9=y;; + 7) STEP7=y;; 1-2) STEP1=y; STEP2=y;; 1-3) STEP1=y; STEP2=y; STEP3=y; SLIDE=y;; 2-3) STEP2=y; STEP3=y; SLIDE=y;; @@ -183,42 +191,39 @@ fi if [ -n "${STEP2}" ];then # extension="_0.8bad" - extension="_factorized" +# extension="_factorized" if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi if [ ! -e "${outDirData}/step2${extension}/fitres" ];then mkdir ${outDirData}/step2${extension}/fitres -p; fi if [ ! -e "${outDirData}/step2${extension}/img" ];then mkdir ${outDirData}/step2${extension}/img -p; fi - #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ - regionFile=data/regions/scaleStep2smearing_8.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2${extension}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2${extension}/img \ - --smearerFit --constTermFix --alphaGoldFix \ - --corrEleType HggRunEta \ - --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ - --initFile=${outDirData}/step2/fitres/params-scaleStep2${extension}smearing_8-${commonCut}.txt \ - --addBranch=smearerCat > ${outDirData}/log/step2${extension}smearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - - exit 0 - regionFile=data/regions/scaleStep2smearing_8.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - --smearerFit --autoNsmear \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ - --addBranch=smearerCat --constTermFix \ - --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat > ${outDirData}/log/step2smearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log - +# regionFile=data/regions/scaleStep2smearing_9.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2${extension}/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2${extension}/img \ +# --smearerFit --constTermFix --alphaGoldFix \ +# --corrEleType HggRunEta \ +# --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ +# --nSmearToy=10 --autoBin --profileOnly \ +# --initFile=${outDirTable}/step2-initFile.dat \ +# --addBranch=smearerCat #> ${outDirData}/log/step2${extension}smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 +# # --initFile=${outDirData}/step2/fitres/params-scaleStep2${extension}smearing_8-${commonCut}.txt \ - exit 0 +# exit 0 regionFile=data/regions/scaleStep2smearing_1.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoNsmear \ + if [ -e "${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt"; + else + initFile="" + fi + echo $initFile +time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ - --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat > ${outDirData}/log/step2smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log + --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ + $initFile > ${outDirData}/log/step2smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log # cp ${outDirData}/step2/fitres/params-${regionFile}-${commonCut}.txt ${outDirData}/step2/fitres/step2smearing_1.txt # cp ${outDirData}/step2/fitres/histos-${regionFile}-${commonCut}.root ${outDirData}/step2/fitres/histos_step2smearing_1.root @@ -228,16 +233,19 @@ if [ -n "${STEP2}" ];then grep scale ${outDirData}/step2/fitres/params-`basename ${regionFile} .dat`-${commonCut}.txt | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat regionFile=data/regions/scaleStep2smearing_2.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoNsmear \ + if [ -e "${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt"; + else + initFile="" + fi + +time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ - --initFile=${outDirData}/step2/fitres/params-scaleStep2smearing_1-${commonCut}.txt \ - --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat > tmp/step2smearing_2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log - -# cp ${outDirData}/step2/fitres/params.txt ${outDirData}/step2/fitres/step2smearing_2.txt -# cp ${outDirData}/step2/fitres/histos.root ${outDirData}/step2/fitres/histos_step2smearing_2.root -# cp ${outDirData}/step2/fitres/outProfile.root ${outDirData}/step2/fitres/outProfile_step2smearing_2.root + --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ + $initFile > tmp/step2smearing_2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log +# --initFile=${outDirData}/step2/fitres/params-scaleStep2smearing_1-${commonCut}.txt \ grep scale ${outDirData}/step2/fitres/params-`basename ${regionFile} .dat`-${commonCut}.txt | grep EE | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat @@ -273,14 +281,14 @@ if [ -n "${STEP4}" ];then if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step4/fitres" ];then mkdir ${outDirData}/step4/fitres -p; fi - if [ ! -e "${outDirData}/step4/img" ];then mkdir ${outDirData}/step4/img -p; fi + if [ ! -e "${outDirData}/step4/fitres/$index" ];then mkdir ${outDirData}/step4/fitres/$index -p; fi + if [ ! -e "${outDirData}/step4/img/$index" ];then mkdir ${outDirData}/step4/img/$index -p; fi - if [ ! -e "${outDirData}/step4_fixed/fitres" ];then mkdir ${outDirData}/step4_fixed/fitres -p; fi - if [ ! -e "${outDirData}/step4_fixed/img" ];then mkdir ${outDirData}/step4_fixed/img -p; fi +# if [ ! -e "${outDirData}/step4_fixed/fitres" ];then mkdir ${outDirData}/step4_fixed/fitres -p; fi +# if [ ! -e "${outDirData}/step4_fixed/img" ];then mkdir ${outDirData}/step4_fixed/img -p; fi - if [ ! -e "${outDirData}/step4_constOnly/fitres" ];then mkdir ${outDirData}/step4_constOnly/fitres -p; fi - if [ ! -e "${outDirData}/step4_constOnly/img" ];then mkdir ${outDirData}/step4_constOnly/img -p; fi +# if [ ! -e "${outDirData}/step4_constOnly/fitres" ];then mkdir ${outDirData}/step4_constOnly/fitres -p; fi +# if [ ! -e "${outDirData}/step4_constOnly/img" ];then mkdir ${outDirData}/step4_constOnly/img -p; fi # #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ # regionFile=data/regions/scaleStep2smearing_8.dat @@ -323,14 +331,12 @@ if [ -n "${STEP4}" ];then --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --plotOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ + --plotOnly --profileOnly \ + --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ --addBranch=smearerCat \ > ${outDirData}/log/step4smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 - -# # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_1.txt -# # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_1.root -# # cp ${outDirData}/step4/fitres/outProfile.root ${outDirData}/step4/fitres/outProfile_step4smearing_1.root + + exit 0 regionFile=data/regions/scaleStep4smearing_2.dat # --initFile=${outDirData}/step4/fitres/params.txt \ @@ -340,7 +346,8 @@ if [ -n "${STEP4}" ];then --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --plotOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ + --plotOnly --profileOnly \ + --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ --addBranch=smearerCat \ > ${outDirData}/log/step4smearing_2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 @@ -371,6 +378,354 @@ if [ -n "${STEP3WEIGHT}" ];then fi +if [ -n "${STEP5}" ];then + # traditional resolution categories, only scales in Et bins + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step5/fitres/$index" ];then mkdir ${outDirData}/step5/fitres/$index -p; fi + if [ ! -e "${outDirData}/step5/img/$index" ];then mkdir ${outDirData}/step5/img/$index -p; fi + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_9.dat + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step5/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step5/img \ + --constTermFix \ + --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ + --initFile=${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt \ + --addBranch=smearerCat > ${outDirData}/log/step5-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + +# ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 + exit 0 + + regionFile=data/regions/scaleStep2smearing_10.dat + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step5/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step5/img \ + --constTermFix \ + --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ + --initFile=${outDirData}/table/step5-scaleStep2smearing_10-${commonCut}.txt \ + --addBranch=smearerCat > ${outDirData}/log/step5-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + +fi + + +# if [ -n "${STEP6}" ];then +# # traditional resolution categories, only scales in Et bins + +# if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi +# if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi +# if [ ! -e "${outDirData}/step6/fitres/$index" ];then mkdir ${outDirData}/step6/fitres/$index -p; fi +# if [ ! -e "${outDirData}/step6/img/$index" ];then mkdir ${outDirData}/step6/img/$index -p; fi + +# #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ +# regionFile=data/regions/scaleStep2smearing_9.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut}-R9p_0.8 \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step6/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step6/img \ +# --constTermFix \ +# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ +# --initFile=${outDirData}/table/step6-scaleStep2smearing_9-${commonCut}-R9p_0.8.txt \ +# --addBranch=smearerCat > ${outDirData}/log/step6-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + +# # ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 +# exit 0 + +# regionFile=data/regions/scaleStep2smearing_10.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step6/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step6/img \ +# --constTermFix \ +# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ +# --initFile=${outDirData}/table/step6-scaleStep2smearing_10-${commonCut}.txt \ +# --addBranch=smearerCat > ${outDirData}/log/step6-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + +# fi + + +if [ -n "${STEP6}" ];then + # closure test: traditional resolution categories, only scales in Et bins + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step6/fitres/$index" ];then mkdir ${outDirData}/step6/fitres/$index -p; fi + if [ ! -e "${outDirData}/step6/img/$index" ];then mkdir ${outDirData}/step6/img/$index -p; fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step6/`basename $configFile` + + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_9.dat + initFile=${outDirData}/table/step6-scaleStep2smearing_9-${commonCut}-R9p_0.8.txt + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq | grep -v '#' > $outDirData/step6/`basename $configFile` + tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` + + for tag in $tags + do + if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then + ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi + done + + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for index in `seq 1 30` + do + mkdir ${outDirData}/step6/${index}/fitres/ -p + mkdir ${outDirData}/step6/${index}/img -p + bsub -q 2nd -oo ${outDirData}/step6/${index}/fitres/step6-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-${index}-stdout.log -eo ${outDirData}/step6/${index}/fitres/step6-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-${index}-stderr.log -J "`basename $regionFile .dat` step6" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step6/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut}-R9p_0.8 \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step6/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step6/${index}/img/ \ + --constTermFix \ + --smearerFit --autoNsmear \ + --initFile=${initFile} \ + --addBranch=smearerCat || exit 1" + done + + ######################### + regionFile=data/regions/scaleStep2smearing_10.dat + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for index in `seq 1 30` + do + mkdir ${outDirData}/step6/${index}/fitres/ -p + mkdir ${outDirData}/step6/${index}/img -p + bsub -q 2nd -oo ${outDirData}/step6/${index}/fitres/step6-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step6/${index}/fitres/step6-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step6" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step6/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut}-R9p_0.8 \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step6/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step6/${index}/img/ \ + --constTermFix \ + --smearerFit --autoNsmear \ + --initFile=${initFile} \ + --addBranch=smearerCat || exit 1" + done +fi + +if [ -n "${STEP7}" ];then + # closure test: traditional resolution categories, only scales in Et bins + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step7/fitres/$index" ];then mkdir ${outDirData}/step7/fitres/$index -p; fi + if [ ! -e "${outDirData}/step7/img/$index" ];then mkdir ${outDirData}/step7/img/$index -p; fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step7/`basename $configFile` + + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_9.dat + tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` + + for tag in $tags + do + if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then + ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi + done + + if [ ! -e "${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt" ];then + echo "[ERROR] File ${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt not found" >> /dev/stderr + exit 1 + fi + for index in `seq 1 30` + do + mkdir ${outDirData}/step7/${index}/fitres/ -p + mkdir ${outDirData}/step7/${index}/img -p + bsub -q 2nd -oo ${outDirData}/step7/${index}/fitres/step7-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step7/${index}/fitres/step7-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step7" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step7/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step7/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step7/${index}/img/ \ + --constTermFix \ + --smearerFit --autoNsmear \ + --initFile=${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt \ + --addBranch=smearerCat || exit 1" + done + + ######################### + regionFile=data/regions/scaleStep2smearing_10.dat + initFile=${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for index in `seq 1 30` + do + mkdir ${outDirData}/step7/${index}/fitres/ -p + mkdir ${outDirData}/step7/${index}/img -p + bsub -q 2nd -oo ${outDirData}/step7/${index}/fitres/step7-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step7/${index}/fitres/step7-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step7" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step7/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step7/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step7/${index}/img/ \ + --constTermFix --smearerFit --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1" + done +fi + + +if [ -n "${STEP9}" ];then + # stochastic term resolution categories, scales in Et bins + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step9/fitres/$index" ];then mkdir ${outDirData}/step9/fitres/$index -p; fi + if [ ! -e "${outDirData}/step9/img/$index" ];then mkdir ${outDirData}/step9/img/$index -p; fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step9/`basename $configFile` + + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_9.dat + tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` + initFile=${outDirData}/table/step9-scaleStep2smearing_9-${commonCut}.txt + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for tag in $tags + do + if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then + ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi + done + + for index in `seq 141 141` + do + mkdir ${outDirData}/step9/${index}/fitres/ -p + mkdir ${outDirData}/step9/${index}/img -p +# bsub -q 2nd -oo ${outDirData}/step9/${index}/fitres/step9-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step9/${index}/fitres/step9-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step9" \ +# "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step9/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step9/${index}/img/ \ + --profileOnly --plotOnly \ + --constTermFix --smearerFit --smearingEt --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1 #" + done + exit 0 + ######################### + regionFile=data/regions/scaleStep2smearing_10.dat + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for index in `seq 1 30` + do + mkdir ${outDirData}/step9/${index}/fitres/ -p + mkdir ${outDirData}/step9/${index}/img -p + bsub -q 2nd -oo ${outDirData}/step9/${index}/fitres/step9-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step9/${index}/fitres/step9-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step9" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step9/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step9/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step9/${index}/img/ \ + --constTermFix --smearingEt --smearerFit --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1" + done +fi + +if [ -n "${STEP8}" ];then + # stochastic term resolution categories, scales in Et bins + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step8/fitres/$index" ];then mkdir ${outDirData}/step8/fitres/$index -p; fi + if [ ! -e "${outDirData}/step8/img/$index" ];then mkdir ${outDirData}/step8/img/$index -p; fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step8/`basename $configFile` + + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_9.dat + tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` + initFile=${outDirData}/table/step8-scaleStep2smearing_9-${commonCut}.txt + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for tag in $tags + do + if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then + ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi + done + + for index in `seq 1 30` + do + mkdir ${outDirData}/step8/${index}/fitres/ -p + mkdir ${outDirData}/step8/${index}/img -p + bsub -q 2nw -oo ${outDirData}/step8/${index}/fitres/step8-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step8/${index}/fitres/step8-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step8" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step8/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step8/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step8/${index}/img/ \ + --profileOnly --plotOnly \ + --constTermFix --smearerFit --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1" + done + + ######################### + regionFile=data/regions/scaleStep2smearing_10.dat + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for index in `seq 1 30` + do + mkdir ${outDirData}/step8/${index}/fitres/ -p + mkdir ${outDirData}/step8/${index}/img -p + bsub -q 2nd -oo ${outDirData}/step8/${index}/fitres/step8-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step8/${index}/fitres/step8-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step8" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step8/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step8/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step8/${index}/img/ \ + --constTermFix --smearerFit --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1" + done +fi if [ -n "${SYSTEMATICS}" ];then diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index 7bdb59efc4a..b1b9b3bb53e 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -4,26 +4,28 @@ #regionsFile=scaleStep2smearing_7 queue=$1 -nEventsPerToy=factorizedSherpa_${queue} -nSmearToy=90 +nEventsPerToy=factorizedSherpaFixed_DataSeedFixed_smooth_autobin_smearingEt_${queue} +nSmearToy=10 +commonCut=Et_20-trigger-noPF-EB #nEventsPerToy=factorized if [ -z "${queue}" ];then local=y; fi -for regionsFile in scaleStep2smearing_8 #scaleStep2smearing_5 scaleStep2smearing_6 +for regionsFile in scaleStep2smearing_1 scaleStep2smearing_2 #scaleStep2smearing_9 do dir=test/dato/fitres/Hgg_Et-toys/${regionsFile} #alphaConst=C - -for constAlpha in 0.01-0.00 0.000-0.07 0.007-0.05 #0.0005 0.02 0.005 +for scale in 1.00 1.01 0.99 1.02 0.98 #1.05 0.95 1 +do +for constAlpha in 0.01-0.00 0.03-0.00 0.005-0.00 #0.035-0.25 #0.007-0.05 0.01-0.00 0.000-0.07 # # #0.0005 0.02 0.005 do const=`echo $constAlpha | cut -d '-' -f 1` alpha=`echo $constAlpha | cut -d '-' -f 2` #for alpha in 0.00 # 0.05 #0.10 #0.15 0.00 #0.03 0.07 # do echo "[[[[[[[[[[[ const:alpha ]]]]]]]]]]] ${const}:${alpha}" - baseDir=${dir}/${nEventsPerToy}/${const}-${alpha}/ + baseDir=${dir}/${nEventsPerToy}/${const}-${alpha}-${scale}/ mkdir -p $baseDir cat > ${baseDir}/smearEleFile.dat < $baseDir/${alphaConst}/mcToy.txt <> $baseDir/toyMC.dat # echo "s2 smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_s2-invertedToyMC-${const}-${alpha}.root" >> $baseDir/toyMC.dat - for nToys in `seq 2 200`; + for nToys in `seq 2 50`; do newDir=${baseDir}/${alphaConst}/${nSmearToy}/${nToys}/ mkdir -p $newDir @@ -114,17 +124,18 @@ EOF bsub -q ${queue} -oo ${newDir}/stdout.log -eo ${newDir}/stderr.log -J "$regionsFile-$const-$alpha" \ "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ --regionsFile=data/regions/${regionsFile}.dat \ - --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ - --constTermFix --alphaGoldFix --smearerType=profile --noPU \ - --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --runToy --nSmearToy=${nSmearToy} > ${newDir}/log2.log" + --commonCut=${commonCut} --smearerFit --outDirFitResData=$newDir \ + --constTermFix --alphaGoldFix --smearerType=profile --noPU --smearingEt \ + --initFile=${baseDir}/${alphaConst}/mcToy.txt --profileOnly --plotOnly --runToy --nSmearToy=${nSmearToy} \ + --autoBin > ${newDir}/log2.log" else echo "#============================================================ Toy = $nToys" ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ --regionsFile=data/regions/${regionsFile}.dat \ - --commonCut=Et_25-trigger-noPF-EB --smearerFit --outDirFitResData=$newDir \ - --constTermFix --smearerType=profile --noPU --alphaGoldFix \ + --commonCut=${commonCut} --smearerFit --outDirFitResData=$newDir \ + --constTermFix --smearerType=profile --noPU --smearingEt \ --initFile=${baseDir}/${alphaConst}/mcToy.txt \ - --profileOnly --runToy --eventsPerToy=0 --nSmearToy=${nSmearToy} |tee ${newDir}/log.log + --plotOnly --profileOnly --runToy --eventsPerToy=0 --nSmearToy=${nSmearToy} --autoBin |tee ${newDir}/nSmearToy_${nSmearToy}.log exit 0 fi done @@ -133,77 +144,16 @@ EOF wait done -#done +done exit 0 - -#!/bin/bash -#1000 100000 -dir=test/dato/fitres/Hgg_Et-toys -for nToys in `seq 4 5`; - do - echo "[[[[[[[[[[[ nToys ]]]]]]]]]]] $nToys" - for nEventsPerToy in 0 10000 1000000 - do - echo "[[[[[[[[[[[ nEventsPerToy ]]]]]]]]]]] ${nEventsPerToy}" - for alpha in 0.00 0.01 0.03 0.05 0.07 - do - for const in 0.005 0.01 0.02 0.001 - do - echo "[[[[[[[[[[[ const:alpha ]]]]]]]]]]] ${const}:${alpha}" - newDir=${dir}/${nEventsPerToy}/${const}-${alpha}/${nToys} - mkdir -p $newDir - cat > $newDir/mcToy.txt < ${newDir}/log.log ) & - done - wait - done - wait - done - wait -done -#!/bin/bash -#1000 100000 -dir=test/dato/fitres/Hgg_Et-toys -for nToys in `seq 4 5`; - do - echo "[[[[[[[[[[[ nToys ]]]]]]]]]]] $nToys" - for nEventsPerToy in 0 10000 1000000 - do - echo "[[[[[[[[[[[ nEventsPerToy ]]]]]]]]]]] ${nEventsPerToy}" - for alpha in 0.00 0.01 0.03 0.05 0.07 - do - for const in 0.005 0.01 0.02 0.001 - do - echo "[[[[[[[[[[[ const:alpha ]]]]]]]]]]] ${const}:${alpha}" - newDir=${dir}/${nEventsPerToy}/${const}-${alpha}/${nToys} - mkdir -p $newDir - cat > $newDir/mcToy.txt < ${newDir}/log.log ) & - done - wait - done - wait - done - wait -done + +for file in test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_9/factorizedSherpaFixed_DataSeedFixed_smooth_cmscaf1nd/0.01-0.00/15/*/log2.log; do grep DUMP $file > `dirname $file`/dumpNLL.dat; done + +for index in `seq 2 50`; do sed -i "s|\[DUMP NLL\]|$index\t |" test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_9/factorizedSherpaFixed_DataSeedFixed_smooth_cmscaf1nd/0.01-0.00/15/$index/dumpNLL.dat; done + +cat test/dato/fitres/Hgg_Et-toys/scaleStep2smearing_9/factorizedSherpaFixed_DataSeedFixed_smooth_cmscaf1nd/0.01-0.00/15/*/dumpNLL.dat > dumpNLL.dat + +cat dumpNLL.dat | awk -F '\t' '{cat[$2]+=$3;cat2[$2]+=$3*$3; n[$2]++;};END{for(i in cat){print i, n[i], cat[i]/n[i], cat2[i]/n[i]-cat[i]/n[i]*cat[i]/n[i]}}' | awk '($5 > 5){print $0}' diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index d54af73488b..3faca307818 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -13,12 +13,13 @@ configFile=data/validation/monitoring_2012_53X.dat runRangesFile=data/runRanges/monitoring.dat baseDir=test updateOnly="--updateOnly" -#extraOptions="--updateOnly" +#extraOptions="--forceNewFit" #extraOptions="--addBranch iSM --forceNewFit" # VALIDATION=y # STABILITY=y # SLIDES=y +#STEP4=y usage(){ echo "`basename $0` [options]" @@ -31,6 +32,7 @@ usage(){ echo " --validation " echo " --stability " echo " --etaScale " + echo " --R9Ele " echo " --systematics all/pu " echo " --refreg" echo " --slides " @@ -53,7 +55,7 @@ desc(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics:,slides,onlyTable,test,commonCut:,period:,cruijff,refreg -- "$@") +if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics:,slides,onlyTable,test,commonCut:,period:,cruijff,refreg,R9Ele -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -75,6 +77,7 @@ do --validation) VALIDATION=y;; --stability) STABILITY=y;; --etaScale) ETA=y;; + --R9Ele) R9ELE=y;; --refreg) REFREG=y;; --systematics) SYSTEMATICS=$2; shift;; --slides) SLIDES=y;; @@ -109,7 +112,7 @@ do shift done -if [ -z "${VALIDATION}" -a -z "${STABILITY}" -a -z "${SLIDES}" -a -z "${SYSTEMATICS}" -a -z "${ETA}" -a -z "${REFREG}" ];then +if [ -z "${VALIDATION}" -a -z "${STABILITY}" -a -z "${SLIDES}" -a -z "${SYSTEMATICS}" -a -z "${ETA}" -a -z "${REFREG}" -a -z "${R9ELE}" ];then # if no option selected, run all the sequence VALIDATION=y STABILITY=y @@ -117,6 +120,13 @@ if [ -z "${VALIDATION}" -a -z "${STABILITY}" -a -z "${SLIDES}" -a -z "${SYSTEMAT SLIDES=y fi +if [ -n "${TEST}" ];then + unset VALIDATION + unset STABILITY + unset ETA + unset SLIDES +fi + if [ ! -d "tmp" ];then mkdir tmp; fi # file with ntuples @@ -136,6 +146,8 @@ case ${selection} in ;; medium) ;; + tight) + ;; *) echo "[ERROR] Selection ${selection} not configured" >> /dev/stderr exit 1 @@ -277,7 +289,7 @@ fi ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ - > ${outDirTable}/$PERIOD/monitoring_summary-${invMass_var}-${selection}.tex || exit 1 + > ${outDirTable}/$PERIOD/monitoring_summary-${invMass_var}-${selection}-${commonCut}.tex || exit 1 fi ################################################## @@ -296,7 +308,7 @@ if [ -n "$STABILITY" ];then --outDirFitResMC=${outDirMC}/fitres \ --outDirImgMC=${outDirMC}/img \ --outDirFitResData=${outDirData}/fitres --outDirImgData=${outDirData}/img \ - > ${outDirData}/log/stability_floating.log || exit 1 + > ${outDirData}/log/monitoring_stability.log || exit 1 # --fit_type_value=0 --outDirFitResData=${outDirData}/fitres/floating --outDirImgData=${outDirData}/img/floating \ @@ -306,7 +318,7 @@ if [ -n "$STABILITY" ];then # > ${outDirTable}/monitoring_stability_floating-${invMass_var}-${selection}.tex || exit 1 ./script/makeTable.sh --regionsFile ${regionFile} --runRangesFile ${runRangesFile} --commonCut=${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ - > ${outDirTable}/monitoring_stability-${invMass_var}-${selection}.tex || exit 1 + > ${outDirTable}/monitoring_stability-${invMass_var}-${selection}-${commonCut}.tex || exit 1 fi ###################### Make stability plots @@ -314,9 +326,9 @@ if [ -n "$STABILITY" ];then mkdir -p ${outDirData}/img/stability/$xVar/$PERIOD fi - ./script/stability.sh -t ${outDirTable}/monitoring_stability-${invMass_var}-${selection}.tex \ + ./script/stability.sh -t ${outDirTable}/monitoring_stability-${invMass_var}-${selection}-${commonCut}.tex \ --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y peak $xMin $xMax || exit 1 - ./script/stability.sh -t ${outDirTable}/monitoring_stability-${invMass_var}-${selection}.tex \ + ./script/stability.sh -t ${outDirTable}/monitoring_stability-${invMass_var}-${selection}-${commonCut}.tex \ --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y scaledWidth $xMin $xMax || exit 1 # create summary table for stabilities @@ -325,16 +337,58 @@ if [ -n "$STABILITY" ];then fi + if [ -n "$ETA" ];then regionFile=data/regions/absEta.dat xVar=absEta - tableFile=${outDirTable}/absEta-${invMass_var}-${selection}.tex + if [ -n "$STEP4" ];then + tableFile=${outDirTable}/step2absEta-${invMass_var}-${selection}-${commonCut}.tex + else + tableFile=${outDirTable}/absEta-${invMass_var}-${selection}-${commonCut}.tex + fi + if [ -z "${ONLYTABLE}" ];then + if [ -n "$STEP4" ];then + ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ + ${extraOptions} \ + --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-Et_20-trigger-noPF-HggRunEtaR9.dat \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ + > ${outDirData}/log/step4_absEta.log || exit 1 + else + ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ + ${extraOptions} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/absEta.log || exit 1 + fi + fi + ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ + ${tableCruijffOption} > ${tableFile} || exit 1 + + if [ ! -d ${outDirData}/step4/img/stability/$xVar/$PERIOD ];then + mkdir -p ${outDirData}/step4/img/stability/$xVar/$PERIOD + fi + + ./script/stability.sh -t ${tableFile} \ + --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y peak $xMin $xMax || exit 1 + ./script/stability.sh -t ${tableFile} \ + --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y scaledWidth $xMin $xMax || exit 1 + +fi + +if [ -n "$R9ELE" ];then + regionFile=data/regions/R9Ele.dat + xVar=R9Ele + tableFile=${outDirTable}/R9Ele-${invMass_var}-${selection}-${commonCut}.tex if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/absEta.log || exit 1 + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/R9Ele.log || exit 1 fi ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ @@ -353,7 +407,7 @@ fi if [ -n "${REFREG}" ];then regionFile=data/regions/refReg.dat - tableFile=${outDirTable}/RefReg-${invMass_var}-${selection}.tex + tableFile=${outDirTable}/RefReg-${invMass_var}-${selection}-${commonCut}.tex if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ @@ -368,6 +422,22 @@ if [ -n "${REFREG}" ];then fi +if [ -n "${TEST}" ];then + regionFile=data/regions/test.dat +if [ -z "${ONLYTABLE}" ];then + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --invMass_var ${invMass_var} \ + ${extraOptions} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ + --commonCut=${commonCut} --selection=${selection} --invMass_min=${invMass_min} --invMass_max=${invMass_max} \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/test.log|| exit 1 +fi + + + ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ + > ${outDirTable}/$PERIOD/test-${invMass_var}-${selection}-${commonCut}.tex || exit 1 +fi + if [ -n "$SYSTEMATICS" ];then #list of systematics for ECAL scale: # etaScale @@ -389,34 +459,35 @@ if [ -n "$SYSTEMATICS" ];then # > ${tableFile} || exit 1 # exit 0 - regionFile=data/regions/systematics.dat - tableFile=${outDirTable}/systematics-${invMass_var}-${selection}.tex - if [ -z "${ONLYTABLE}" ];then - ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ - ${extraOptions} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/systematics.log || exit 1 - fi - ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ - > ${tableFile} || exit 1 +# regionFile=data/regions/systematics.dat +# tableFile=${outDirTable}/systematics-${invMass_var}-${selection}-${commonCut}.tex +# if [ -z "${ONLYTABLE}" ];then +# ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ +# ${extraOptions} \ +# $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/systematics.log || exit 1 +# fi +# ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ +# > ${tableFile} || exit 1 - for xVar in nPV - do - if [ ! -e "${outDirData}/img/stability/$xVar/$PERIOD" ];then - mkdir ${outDirData}/img/stability/$xVar/$PERIOD/ -p - fi - ./script/stability.sh -t ${tableFile} \ - --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y peak --column 51 $xMin $xMax || exit 1 -# ./script/stability.sh -t ${tableFile} \ -# --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y scaledWidth --column 51 $xMin $xMax || exit 1 - done +# for xVar in nPV +# do +# if [ ! -e "${outDirData}/img/stability/$xVar/$PERIOD" ];then +# mkdir ${outDirData}/img/stability/$xVar/$PERIOD/ -p +# fi +# ./script/stability.sh -t ${tableFile} \ +# --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y peak --column 51 $xMin $xMax || exit 1 +# # ./script/stability.sh -t ${tableFile} \ +# # --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y scaledWidth --column 51 $xMin $xMax || exit 1 +# done - if [ "${SYSTEMATICS}" = "all" -o "${SYSTEMATICS}" = "fitMethod" ];then + if [ "${SYSTEMATICS}" == "all" -o "${SYSTEMATICS}" == "fitMethod" ];then regionFile=data/regions/validation.dat - mkdir ${outDirData}/{fitres,img}/{floating,invMass_range,invMass_range2} -p + mkdir ${outDirData}/{fitres,img}/{floating,invMass_range,invMass_range2, floating_invMass_range, floating_invMass_range2} -p + mkdir ${outDirMC}/{fitres,img}/{invMass_range,invMass_range2,binning1} -p ####### fit type =0: floating tails if [ -z "${ONLYTABLE}" ];then @@ -429,34 +500,79 @@ if [ -n "$SYSTEMATICS" ];then fi ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/floating ${tableCruijffOption} \ - > ${outDirTable}/fit_systematics_floating-${invMass_var}-${selection}.tex || exit 1 + > ${outDirTable}/fit_systematics_floating-${invMass_var}-${selection}-${commonCut}.tex || exit 1 ####### fit mass range: [70-110] if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/invMass_range \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img/invMass_range \ + --outDirFitResMC=${outDirMC}/fitres/invMass_range --outDirFitResData=${outDirData}/fitres/invMass_range \ + --outDirImgMC=${outDirMC}/img/invMass_range --outDirImgData=${outDirData}/img/invMass_range \ --invMass_min=70 --invMass_max=110 > ${outDirData}/log/fit_systematics_invMass_range.log fi ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} ${tableCruijffOption} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/invMass_range \ - > ${outDirTable}/fit_systematics_invMass_range-${invMass_var}-${selection}.tex || exit 1 + > ${outDirTable}/fit_systematics_invMass_range-${invMass_var}-${selection}-${commonCut}.tex || exit 1 ####### fit mass range: [75-105] if [ -z "${ONLYTABLE}" ];then ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ ${extraOptions} \ $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/invMass_range2 \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img/invMass_range2 \ + --outDirFitResMC=${outDirMC}/fitres/invMass_range_2 --outDirFitResData=${outDirData}/fitres/invMass_range2 \ + --outDirImgMC=${outDirMC}/img/invMass_range2 --outDirImgData=${outDirData}/img/invMass_range2 \ --invMass_min=75 --invMass_max=105 > ${outDirData}/log/fit_systematics_invMass_range2.log fi +# ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} ${tableCruijffOption} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/invMass_range2 \ +# > ${outDirTable}/fit_systematics_invMass_range2-${invMass_var}-${selection}.tex || exit 1 + + ####### fit mass range: [70-110] + if [ -z "${ONLYTABLE}" ];then + ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ + ${extraOptions} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ + --outDirFitResMC=${outDirMC}/fitres/invMass_range \ + --outDirFitResData=${outDirData}/fitres/floating_invMass_range \ + --outDirImgMC=${outDirMC}/img/invMass_range \ + --outDirImgData=${outDirData}/img/floating_invMass_range \ + --fit_type_value=0 --invMass_min=70 --invMass_max=110 > ${outDirData}/log/fit_systematics_floating_invMass_range.log + fi ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} ${tableCruijffOption} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres/invMass_range2 \ - > ${outDirTable}/fit_systematics_invMass_range2-${invMass_var}-${selection}.tex || exit 1 + --outDirFitResMC=${outDirMC}/fitres/invMass_range --outDirFitResData=${outDirData}/fitres/invMass_range \ + > ${outDirTable}/fit_systematics_floating_invMass_range-${invMass_var}-${selection}-${commonCut}.tex || exit 1 + + ####### fit mass range: [75-105] + if [ -z "${ONLYTABLE}" ];then + ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ + ${extraOptions} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ + --outDirFitResMC=${outDirMC}/fitres/invMass_range2 \ + --outDirFitResData=${outDirData}/fitres/floating_invMass_range2 \ + --outDirImgMC=${outDirMC}/img/invMass_range2 \ + --outDirImgData=${outDirData}/img/floating_invMass_range2 \ + --fit_type_value=0 --invMass_min=75 --invMass_max=105 > ${outDirData}/log/fit_systematics_floating_invMass_range2.log + fi +# ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} ${tableCruijffOption} \ +# --outDirFitResMC=${outDirMC}/fitres/invMass_range2 --outDirFitResData=${outDirData}/fitres/invMass_range2 \ +# > ${outDirTable}/fit_systematics_floating_invMass_range2-${invMass_var}-${selection}.tex || exit 1 + ####### binning1: 0.75 + #if [ -z "${ONLYTABLE}" ];then + ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ + ${extraOptions} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ + --outDirFitResMC=${outDirMC}/fitres/binning1 \ + --outDirFitResData=${outDirData}/fitres/binning1 \ + --outDirImgMC=${outDirMC}/img/binning1 \ + --outDirImgData=${outDirData}/img/binning1 \ + --fit_type_value=0 --invMass_binWidth=0.75 > ${outDirData}/log/fit_systematics_binning1.log + #fi + ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} ${tableCruijffOption} \ + --outDirFitResMC=${outDirMC}/fitres/binning1 --outDirFitResData=${outDirData}/fitres/binning1 \ + > ${outDirTable}/fit_systematics_binning1-${invMass_var}-${selection}.tex || exit 1 + ######## the same with the cruijff function if [ -z "${signalType}" ]; then ./script/monitoring_validation.sh $@ --cruijff --validation diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 39bfcc417ba..52927c85a7c 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -1,8 +1,11 @@ #include "../interface/RooSmearer.hh" -#include +//#include #define FIXEDSMEARINGS //#define DEBUG //#define CPU_DEBUG +//#define FUNC_DEBUG +//#define MEM_DEBUG +#include #include RooSmearer::~RooSmearer(void){ @@ -30,7 +33,7 @@ RooSmearer::RooSmearer(const char *name, ///< name of the variable _paramSet("paramSet","Set of parameters",this), invMass_min_(80), invMass_max_(100), invMass_bin_(0.25), deltaNLLMaxSmearToy(330), - _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(NSMEARTOYLIM), + _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(50), nllBase(0), nllVar("nll","",0,1e20), _isDataSmeared(false), @@ -149,12 +152,12 @@ void RooSmearer::InitCategories(bool mcToy){ cat.pars1.add(_params_vec[cat.categoryIndex1]); cat.pars2.add(_params_vec[cat.categoryIndex2]); - cat.scale1=-1; - cat.alpha1=-1; - cat.constant1=-1; - cat.scale2=-1; - cat.alpha2=-1; - cat.constant2=-1; + cat.scale1=1; + cat.alpha1=0; + cat.constant1=0; + cat.scale2=1; + cat.alpha2=0; + cat.constant2=0; // RooArgList argList1(cat.pars1); // TIterator *it = argList1.createIterator(); @@ -198,7 +201,7 @@ void RooSmearer::InitCategories(bool mcToy){ unsigned int deactiveMinEvents = _deactive_minEventsDiag; if(cat.categoryIndex1 != cat.categoryIndex2) // not diagonal category deactiveMinEvents=_deactive_minEventsOffDiag; - if(cat.data_events->size() < deactiveMinEvents || cat.mc_events->size() < deactiveMinEvents || cat.hist_mc->Integral() < deactiveMinEvents){ + if(cat.hist_mc->Integral() < deactiveMinEvents){ std::cout << "[INFO] Category: " << ZeeCategories.size() << ": " << cat.categoryName1 << "\t" << cat.categoryName2 << " has been deactivated (nEvents < "; @@ -219,9 +222,11 @@ void RooSmearer::InitCategories(bool mcToy){ << std::endl; } //------------------------------ - if (cat.active && _autoBin){ + if (_autoBin){ //SetAutoBin(cat,cat.invMass_min-20,cat.invMass_max+20); AutoNBins(cat); + SetHisto(*(cat.mc_events), cat.hist_mc); + SetHisto(*(cat.data_events), cat.hist_data); } cat.nSmearToy=_nSmearToy; if(smearscan || (cat.active && _autoNsmear)) AutoNSmear(cat); @@ -258,6 +263,12 @@ void RooSmearer::InitCategories(bool mcToy){ TH1F *RooSmearer::GetSmearedHisto(ZeeCategory& category, bool isMC, bool smearEnergy, bool forceNew, bool multiSmearToy){ +// #ifdef MEM_DEBUG +// ProcInfo_t info; +// gSystem->GetProcInfo(&info); +// std::cout << "GET MEM INFO AT GetSmearedHisto START " << info.fMemResident << std::endl; +// #endif + TH1F **h = NULL; if(isMC) h = (smearEnergy) ? &category.smearHist_mc : &category.hist_mc; else h = (smearEnergy) ? &category.smearHist_data : &category.hist_data; @@ -282,7 +293,8 @@ TH1F *RooSmearer::GetSmearedHisto(ZeeCategory& category, bool isMC, //if(changed || forceNew){ //else use the old smeared histo! (*h)->Reset(); - if(multiSmearToy){ + if(isMC && multiSmearToy){ + //std::cout << "[DEBUG] Smearing MC: " << category.categoryName1 << " " << category.categoryName2 << std::endl; SetSmearedHisto(*cache, category.pars1, category.pars2, category.categoryName1, category.categoryName2, category.nSmearToy, @@ -296,7 +308,7 @@ TH1F *RooSmearer::GetSmearedHisto(ZeeCategory& category, bool isMC, if(isMC) (*h)->Scale(1./(*h)->Integral()); //} //else std::cout << "Not changed: " << category.categoryName1 << "\t" << category.categoryName2 << std::endl; - + (*h)->Smooth(); } else{ (*h)->Reset(); // unuseful: histogram should be empty SetHisto(*cache, *h); @@ -305,6 +317,11 @@ TH1F *RooSmearer::GetSmearedHisto(ZeeCategory& category, bool isMC, // if(isMC==false){ // delete cache; // } +// #ifdef MEM_DEBUG +// gSystem->GetProcInfo(&info); +// std::cout << "GET MEM INFO AT GetSmearedHisto END " << info.fMemResident << std::endl; +// #endif + return *h; } @@ -350,12 +367,13 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, //std::cout << "---" << std::endl; //_paramSet.writeToStream(std::cout, kFALSE); #endif - if(nSmearToy>NSMEARTOYLIM){ - std::cerr << "[ERROR] nSmearToy = " << nSmearToy << std::endl; - exit(1); - } +// if(nSmearToy>NSMEARTOYLIM){ +// std::cerr << "[ERROR] nSmearToy = " << nSmearToy << std::endl; +// exit(1); +// } - double smearEne1[NSMEARTOYLIM], smearEne2[NSMEARTOYLIM]; // _nSmearToy<100 + //double smearEne1[NSMEARTOYLIM], smearEne2[NSMEARTOYLIM]; // _nSmearToy<100 + double smearEne1[1000], smearEne2[1000]; // _nSmearToy<100 if(cache.begin()->smearings_ele1==NULL){ std::cerr<< "[ERROR] No smearings" << std::endl; exit(1); @@ -364,14 +382,14 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, event_itr!= cache.end(); event_itr++){ -#ifdef FIXEDSMEARINGS + //#ifdef FIXEDSMEARINGS smearedEnergy(smearEne1, nSmearToy, event_itr->energy_ele1, scale1, alpha1, constant1, event_itr->smearings_ele1); smearedEnergy(smearEne2, nSmearToy, event_itr->energy_ele2, scale2, alpha2, constant2, event_itr->smearings_ele2); -#else - // random gen time is consuming!!! test different _nSmearToy to verify - smearedEnergy(smearEne1, nSmearToy, event_itr->energy_ele1, scale1, alpha1, constant1,NULL); - smearedEnergy(smearEne2, nSmearToy, event_itr->energy_ele2, scale2, alpha2, constant2,NULL); -#endif + //#else + // // random gen time is consuming!!! test different _nSmearToy to verify + // smearedEnergy(smearEne1, nSmearToy, event_itr->energy_ele1, scale1, alpha1, constant1,NULL); + // smearedEnergy(smearEne2, nSmearToy, event_itr->energy_ele2, scale2, alpha2, constant2,NULL); + //#endif // if(event_itr==cache.begin()){ // std::cout << "fixedSmearings: " << event_itr->smearings_ele1[0] << "\t" << scale1 << "\t" << alpha1 << "\t" << event_itr->energy_ele1 << "\t" << constant1 << "\t" << smearEne1[0] << std::endl; // } @@ -407,9 +425,12 @@ double RooSmearer::smearedEnergy(double *smear, unsigned int nGen, float ene,flo float sigma = sqrt(alpha*alpha/ene + constant * constant ); #ifdef FIXEDSMEARINGS - for(unsigned int i=0; i < nGen; i++){ + for(unsigned int i=0; i < NSMEARTOYLIM && iGaus(scale,sigma); + } #else for(unsigned int i=0; i < nGen; i++){ smear[i] = rgen_->Gaus(scale,sigma); @@ -423,20 +444,20 @@ double RooSmearer::smearedEnergy(double *smear, unsigned int nGen, float ene,flo double RooSmearer::getLogLikelihood(TH1F* data, TH1F* prob) const { if (!data || !prob) - { - std::cout << "ERROR: empty histograms given" << std::endl; - return -9999999.; - } + { + std::cout << "ERROR: empty histograms given" << std::endl; + return -9999999.; + } if (data->GetNbinsX() != prob->GetNbinsX()) - { - std::cout << "ERROR: data and probabilities are binned differently" << std::endl; - return -9999999.; - } - + { + std::cout << "ERROR: data and probabilities are binned differently" << std::endl; + return -9999999.; + } + #ifdef FUNC_DEBUG // std::cout << "Probability integral " << prob->Integral() << std::endl; #endif - + // if (fabs(prob->Integral() -1 ) > 1e-4 ) // { // std::cout << "ERROR: probabilities are not properly normalized" << std::endl; @@ -446,28 +467,28 @@ double RooSmearer::getLogLikelihood(TH1F* data, TH1F* prob) const double logL=0.; //Not using underflows and overflows at the moment for (int ibin=1;ibinGetNbinsX()+1;++ibin) - { + { #ifdef FUNC_DEBUG - std::cout << "ibin " << ibin << "\tdata " << data->GetBinContent(ibin) << "\texpected " << prob->GetBinContent(ibin) << "\t MC " << prob->GetBinContent(ibin) * 514 << "\tlogL " << logL; //<< std::endl; - std::cout << "\tdeltaLogL = " << - data->GetBinContent(ibin)* ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) + (data->Integral()-data->GetBinContent(ibin))*ROOT::Math::Util::EvalLog(1-prob->GetBinContent(ibin)) << "\t EvalLog = " << ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) << std::endl; - + std::cout << "ibin " << ibin << "\tdata " << data->GetBinContent(ibin) << "\texpected " << prob->GetBinContent(ibin) << "\t MC " << prob->GetBinContent(ibin) * 514 << "\tlogL " << logL; //<< std::endl; + std::cout << std::fixed; + std::cout << setprecision(10) << "\tdeltaLogL = " << + data->GetBinContent(ibin)* ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) + (data->Integral()-data->GetBinContent(ibin))*ROOT::Math::Util::EvalLog(1-prob->GetBinContent(ibin)) << "\t EvalLog = " << ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) << std::endl; + #endif - - if(prob->GetBinContent(ibin)!=0){ - - double weight= (data->GetBinContent(ibin)>0) ? data->GetBinError(ibin) * data->GetBinError(ibin) / data->GetBinContent(ibin) : 1; - - // std::cout << "weight = " << weight << std::endl; + + if(prob->GetBinContent(ibin)!=0){ + + double weight= (data->GetBinContent(ibin)>0) ? data->GetBinError(ibin) * data->GetBinError(ibin) / data->GetBinContent(ibin) : 1; + + // std::cout << "weight = " << weight << std::endl; #ifdef POISSON_LIKELIHOOD - //Poisson likelihood - - logL+= weight * (data->GetBinContent(ibin)* ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) - prob->GetBinContent(ibin)); + //Poisson likelihood + + logL+= weight * (data->GetBinContent(ibin)* ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) - prob->GetBinContent(ibin)); #else - // Binomial likelihood - logL+= weight * (data->GetBinContent(ibin)* ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) + (data->Integral()-data->GetBinContent(ibin))*ROOT::Math::Util::EvalLog(1-prob->GetBinContent(ibin))); + // Binomial likelihood + logL+= weight * (data->GetBinContent(ibin)* ROOT::Math::Util::EvalLog(prob->GetBinContent(ibin)) + (data->Integral()-data->GetBinContent(ibin))*ROOT::Math::Util::EvalLog(1-prob->GetBinContent(ibin))); #endif - } #ifdef DEBUG else { @@ -487,14 +508,14 @@ double RooSmearer::getLogLikelihood(TH1F* data, TH1F* prob) const -float RooSmearer::getCompatibility() const +double RooSmearer::getCompatibility() const { RooSmearer* myClass=(RooSmearer *) this; // myClock->Start(); std::vector mcHistos, dataHistos; - float compatibility = 0.; + double compatibility = 0.; //------------------------------ fill the histograms // for(std::vector::iterator cat_itr = myClass->ZeeCategories.begin(); // cat_itr != myClass->ZeeCategories.end(); @@ -525,8 +546,9 @@ float RooSmearer::getCompatibility() const compatibility+=cat_itr->nll; myClass->lastNLLrms+= (cat_itr->nllRMS*cat_itr->nllRMS); #ifdef DEBUG - std::cout << "[DEBUG] Compatibility: " << compatibility << "\t" << compatibility-lastNLL << std::endl; + #endif + // std::cout << std::fixed << std::setprecision(20) << "[DEBUG] Compatibility: " << compatibility << "\t" << compatibility-lastNLL << std::endl; } //if(withSmearToy) std::cout << "[DEBUG] Compatibility2: " << compatibility << "\t" << compatibility - nllMin << std::endl; if(dataset!=NULL && updated){ @@ -547,7 +569,7 @@ float RooSmearer::getCompatibility() const // myClock->Stop(); // myClock->Print(); -return compatibility; + return compatibility; } @@ -660,61 +682,47 @@ void RooSmearer::ResetBinning(ZeeCategory& category){ void RooSmearer::AutoNBins(ZeeCategory& category){ if(!category.active) return; - + if(category.hist_mc->Integral()>30000){ + std::cout << "[INFO] Category: " << category.categoryName1 << " " << category.categoryName2 << "\t binning increased to: " << category.nBins*2 << std::endl; + category.nBins*=2; + ResetBinning(category); + }else if(category.hist_mc->Integral()<5000){ + std::cout << "[INFO] Category: " << category.categoryName1 << " " << category.categoryName2 << "\t binning reduced to: " << category.nBins/2 << std::endl; + category.nBins/=2; + ResetBinning(category); + } + + return; //------------------------------ rescale mc histograms - double stdDev=0; - double min=10; int nBin_min=0; - int n=0; - category.nSmearToy=1; - _nLLtoy=1; - for(category.nBins=(int) ((category.invMass_max-category.invMass_min)/2.); - category.nBins<161; category.nBins*=2){ + + // (isCategoryChanged(category,true)); // && withSmearToy){ + category.scale1=1; + TH1F *data = GetSmearedHisto(category, false, _isDataSmeared, true, false); ///-----> not need to repeate! + TH1F *mc = GetSmearedHisto(category, true, true,true); // regenerate the histogram: forceNew + double chi2old=getLogLikelihood(data, mc); + double min=chi2old; int nBin_min=0; + + std::cout << "[AUTOBIN] Starting scale1 sensitivity check: " << category.scale1 << "\t" < not need to repeate! - double sum=0, sum2=0; - for(n=0; n<500; n++){ - double comp=0, comp2=0.; - for(unsigned int itoy=0; itoy < _nLLtoy; itoy++){ - TH1F *mc = GetSmearedHisto(category, true, true,true); // regenerate the histogram: forceNew - - double c = getLogLikelihood(data, mc); - comp+=c; - comp2+=c*c; - } - comp/=_nLLtoy; - comp2/=_nLLtoy; - - sum+=comp; - sum2+=comp * comp; - } - sum/=n; - sum2/=n; - stdDev= sqrt(sum2 - sum*sum); - if(stdDev/sum < min) { - min=stdDev/sum; - nBin_min=category.nBins; + data = GetSmearedHisto(category, false, _isDataSmeared, true, false); ///-----> not need to repeate! + mc = GetSmearedHisto(category, true, true,true); // regenerate the histogram: forceNew + double chi2=getLogLikelihood(data, mc); + if(chi2 < min){ + min=chi2; + valueMin=value; } - std::cout << "[DEBUG] " - << "\t" << category.categoryIndex1 - << "\t" << category.categoryIndex2 - << "\t" << stdDev - << "\t" << sum - << "\t" << stdDev/sum - << "\t" << category.nSmearToy - << "\t" << category.nLLtoy - << "\t" << category.nBins - << "\tmcEvents=" << category.mc_events->size() - << "\tdataEvents=" << category.data_events->size() - << std::endl; - } - std::cout << "[INFO] Category: " - << "\t" << category.categoryIndex1 << " " << category.categoryIndex2 - //<< "\t" << category.categoryName1 << " " << category.categoryName2 - << "\tstdDev=" << stdDev << "\tnSmearToy="<< category.nSmearToy - << "\tmcEvents=" << category.mc_events->size() - << "\tdataEvents=" << category.data_events->size() - << std::endl; - + std::cout << "[BINNING] scale1: " << value << "\t" << chi2-chi2old << "\t" << chi2-min << std::endl; + } + if(category.scale1!=valueMin){ + std::cout << "[WARNING] scale1 not closing: " << category.scale1 << "\t" << valueMin << std::endl; + } + return; category.nBins=nBin_min; ResetBinning(category); @@ -724,31 +732,38 @@ void RooSmearer::AutoNBins(ZeeCategory& category){ void RooSmearer::AutoNSmear(ZeeCategory& category){ - if(!category.active) return; + AutoNBins(category); + return; + // category.nSmearToy=std::max(NSMEARTOYLIM*2,200); Long64_t catSize=category.mc_events->size(); +// if(catSize<3000){ +// category.nBins=40; +// ResetBinning(category); +// } else if(catSize>40000){ +// category.nBins=160; +// ResetBinning(category); +// } - category.nSmearToy=(int)(300000./catSize); - if(category.nSmearToy <7) category.nSmearToy = 7; // fix the min to 3 - else if( category.nSmearToy > 40) category.nSmearToy = 40; // fix the max to 20 - category.nSmearToy=NSMEARTOYLIM; +// category.nSmearToy=(int)(300000./catSize); +// if(category.nSmearToy <7) category.nSmearToy = 7; // fix the min to 3 +// else if( category.nSmearToy > 40) category.nSmearToy = 40; // fix the max to 20 + // category.nSmearToy=NSMEARTOYLIM; if(!smearscan) return; - //------------------------------ rescale mc histograms - double stdDev=10; + double stdDev=10, stdDevLim=0.3; double min=10; int nBin_min=0; int n=0; - unsigned int nSmearToyLim=NSMEARTOYLIM-1; + unsigned int nSmearToyLim=1000; category.nLLtoy=1; - for(int iBin=0; iBin<1; iBin++){ - //category.nBins=(int) ((category.invMass_max-category.invMass_min)/2.); - //category.nBins<161; category.nBins*=2){ + for(int iBin=160; iBin>120; iBin/=2){ + //category.nBins= iBin; //ResetBinning(category); - TH1F *data = GetSmearedHisto(category, false, _isDataSmeared); ///-----> not need to repeate! + TH1F *data = GetSmearedHisto(category, false, _isDataSmeared, false, false); ///-----> not need to repeate! for(category.nLLtoy=1; category.nLLtoy < 2; category.nLLtoy+=2){ - for(category.nSmearToy; category.nSmearToy <= nSmearToyLim && stdDev>1; category.nSmearToy*=2){ + for(category.nSmearToy; category.nSmearToy <= nSmearToyLim && stdDev> stdDevLim; category.nSmearToy*=2){ double sum=0, sum2=0; TStopwatch cl; cl.Start(); @@ -768,7 +783,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ } - std::cout << "[DEBUG] " + std::cout << "[SMEARSCAN] " << "\t" << category.categoryIndex1 << " " << category.categoryIndex2 << "\t" << stdDev @@ -779,8 +794,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ << " " << category.nBins << "\tmcEvents=" << category.mc_events->size() << "\tdataEvents=" << category.data_events->size() - << "\t"; - cl.Print(); + << "\t" << cl.CpuTime()/50. << std::endl; //<< std::endl; } //if(category.nSmearToy > nSmearToyLim) category.nSmearToy/=2; @@ -806,7 +820,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ // AutoNBins(category); #endif if(!category.active) return; - TH1F *data = GetSmearedHisto(category, false, _isDataSmeared); ///-----> not need to repeate! + TH1F *data = GetSmearedHisto(category, false, _isDataSmeared, false, false); ///-----> not need to repeate! //------------------------------ rescale mc histograms @@ -919,45 +933,53 @@ bool RooSmearer::isCategoryChanged(ZeeCategory& category, bool updateVar) const{ // checking if one of the variables has changed TIterator *it = argList1.createIterator(); - for(RooRealVar *v = (RooRealVar *) it->Next(); v!=NULL && changed==false; v = (RooRealVar*) it->Next()){ - if(TString(v->GetName()).Contains("scale") && v->getVal()!= category.scale1){ + for(RooRealVar *v = (RooRealVar *) it->Next(); v!=NULL; v = (RooRealVar*) it->Next()){ + TString varName=v->GetName(); + double varValue=v->getVal(); + if(varName.Contains("scale") && varValue!= category.scale1){ changed=true; #ifdef DEBUG - std::cout << "scale changed for: " << category.categoryName1 << "\t" << category.scale1 << "\t" << v->getVal() << "\t" << changed << "\t" << updateVar << std::endl; + std::cout << "scale changed for: " << category.categoryName1 << "\t" << category.scale1 << "\t" << varValue << "\t" << changed << "\t" << updateVar << std::endl; #endif - if(updateVar) category.scale1=v->getVal(); + if(updateVar) category.scale1=varValue; } - if(TString(v->GetName()).Contains("alpha") && v->getVal()!= category.alpha1){ + if(varName.Contains("alpha") && varValue!= category.alpha1){ changed=true; #ifdef DEBUG - std::cout << "alpha changed for: " << category.categoryName1 << "\t" << category.alpha1 << "\t" << v->getVal() << "\t" << changed << std::endl; + std::cout << "alpha changed for: " << category.categoryName1 << "\t" << category.alpha1 << "\t" << varValue << "\t" << changed << std::endl; #endif - if(updateVar) category.alpha1=v->getVal(); + if(updateVar) category.alpha1=varValue; } - if(TString(v->GetName()).Contains("constTerm") && v->getVal()!= category.constant1){ + if(varName.Contains("constTerm") && varValue!= category.constant1){ changed=true; #ifdef DEBUG - std::cout << "alpha changed for: " << category.categoryName1 << "\t" << category.constant1 << "\t" << v->getVal() << "\t" << changed << std::endl; + std::cout << "alpha changed for: " << category.categoryName1 << "\t" << category.constant1 << "\t" << varValue << "\t" << changed << std::endl; #endif - if(updateVar) category.constant1 = v->getVal(); + if(updateVar) category.constant1 = varValue; } } + + delete it; it = argList2.createIterator(); - for(RooRealVar *v = (RooRealVar *) it->Next(); v!=NULL && changed==false; v = (RooRealVar*) it->Next()){ - if(TString(v->GetName()).Contains("scale") && v->getVal()!= category.scale2){ + for(RooRealVar *v = (RooRealVar *) it->Next(); v!=NULL; v = (RooRealVar*) it->Next()){ + TString varName=v->GetName(); + double varValue=v->getVal(); + + if(varName.Contains("scale") && varValue!= category.scale2){ changed=true; - if(updateVar) category.scale2=v->getVal(); + if(updateVar) category.scale2=varValue; } - if(TString(v->GetName()).Contains("alpha") && v->getVal()!= category.alpha2){ + if(varName.Contains("alpha") && varValue!= category.alpha2){ changed=true; - if(updateVar) category.alpha2=v->getVal(); + if(updateVar) category.alpha2=varValue; } - if(TString(v->GetName()).Contains("constTerm") && v->getVal()!= category.constant2){ + if(varName.Contains("constTerm") && varValue!= category.constant2){ changed=true; - if(updateVar) category.constant2 = v->getVal(); + if(updateVar) category.constant2 = varValue; } } + delete it; return changed; } @@ -986,7 +1008,12 @@ void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool m } SetCommonCut(commonCut); SetEleID(eleID); SetCache(nEvents, mcToy, externToy); InitCategories(mcToy); + TStopwatch cl; + cl.Start(); evaluate(); + cl.Stop(); + std::cout << "[INFO] Time for first eval: "; + cl.Print(); if(mcToy && false){ RooArgList argList(_paramSet); TIterator *it = argList.createIterator(); @@ -1012,8 +1039,21 @@ void RooSmearer::UpdateCategoryNLL(ZeeCategory& cat, unsigned int nLLtoy, bool m } comp/=nLLtoy; comp2/=nLLtoy; - // std::cout << "nll - comp = " << cat.nll +comp << std::endl; +// std::cout << std::fixed << setprecision(10) << cat.categoryName1 << " " << cat.categoryName2 +// << "\t nll - comp = " << cat.nll +comp << std::endl; cat.nll= -comp; cat.nllRMS= sqrt(comp2-comp*comp); return; } + +void RooSmearer::DumpNLL(void) const{ + for(std::vector::const_iterator cat_itr = ZeeCategories.begin(); + cat_itr != ZeeCategories.end(); + cat_itr++){ + if(!cat_itr->active) + std::cout << "[DUMP NLL] " << std::setprecision(10) << cat_itr->categoryIndex1 << " " << cat_itr->categoryIndex2 << "\t" << cat_itr->nll << "\t" << cat_itr->mc_events->size() << "\t" << cat_itr->data_events->size() << "\t1" << std::endl; + else + std::cout << "[DUMP NLL] " << std::setprecision(10) << cat_itr->categoryIndex1 << " " << cat_itr->categoryIndex2 << "\t" << cat_itr->nll << "\t" << cat_itr->mc_events->size() << "\t" << cat_itr->data_events->size() << "\t0" << std::endl; + } + return; +} diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 26e205e9f5a..7f19ecf0d58 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -72,6 +72,8 @@ void SmearingImporter::ImportToy(Long64_t nEvents, event_cache_t& eventCache, bo void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents, bool isToy, bool externToy){ TRandom3 gen(0); + if(!isMC) gen.SetSeed(12345); + TRandom3 excludeGen(12345); Long64_t excludedByWeight=0, includedEvents=0; // for the energy calculation @@ -98,8 +100,10 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS chain->SetBranchAddress(_energyBranchName, energyEle); if(chain->GetBranch("scaleEle")!=NULL){ + if(isToy==false || (externToy==true && isToy==true && isMC==false)){ std::cout << "[STATUS] Adding electron energy correction branch from friend" << std::endl; chain->SetBranchAddress("scaleEle", corrEle_); + } } if(chain->GetBranch("smearEle")!=NULL){ @@ -201,6 +205,9 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(!isMC && modulo>=2) continue; } + // reject events: + if(weight>3) continue; + if (hasSmearerCat==false && chain->GetTreeNumber() != treenumber) { treenumber = chain->GetTreeNumber(); for(std::vector< std::pair >::const_iterator catSelector_itr = catSelectors.begin(); @@ -264,35 +271,39 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS (1-((1-t1q)*(1-t2q)+4*t1*t2*cos(phiEle[0]-phiEle[1]))/((1+t1q)*(1+t2q))) ); // to calculate the invMass: invMass = sqrt(2 * energy_ele1 * energy_ele2 * angle_eta_ele1_ele2) + if(event.invMass < 70 || event.invMass > 110) continue; event.weight = 1.; if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; - if(_useMCweight) event.weight *= mcGenWeight; - - if(_excludeByWeight){ - float rnd = gen.Rndm(); - if(jentry < 10) std::cout << "mcGen = " << mcGenWeight << "\t" << rnd << std::endl; - if(mcGenWeight < rnd){ /// \todo fix the reject by weight in case of pu,r9,pt reweighting - - excludedByWeight++; - continue; + if(mcGenWeight != -1){ + if(_useMCweight && !_excludeByWeight) event.weight *= mcGenWeight; + + if(_excludeByWeight && mcGenWeight!=1){ + float rnd = excludeGen.Rndm(); + if(jentry < 10) std::cout << "mcGen = " << mcGenWeight << "\t" << rnd << std::endl; + if(mcGenWeight < rnd){ /// \todo fix the reject by weight in case of pu,r9,pt reweighting + + excludedByWeight++; + continue; + } // else event.weight=1; } - else event.weight=1; } #ifdef FIXEDSMEARINGS - // if(isMC || isToy){ - event.smearings_ele1 = new float[NSMEARTOYLIM]; - event.smearings_ele2 = new float[NSMEARTOYLIM]; - for(int i=0; i < NSMEARTOYLIM; i++){ - event.smearings_ele1[i] = (float) gen.Gaus(0,1); - event.smearings_ele2[i] = (float) gen.Gaus(0,1); - } -// } else { -// event.smearings_ele1 = NULL; -// event.smearings_ele2 = NULL; -// } + if(isMC){ + event.smearings_ele1 = new float[NSMEARTOYLIM]; + event.smearings_ele2 = new float[NSMEARTOYLIM]; + for(int i=0; i < NSMEARTOYLIM; i++){ + event.smearings_ele1[i] = (float) gen.Gaus(0,1); + event.smearings_ele2[i] = (float) gen.Gaus(0,1); + } + }else{ + event.smearings_ele1 = new float[1]; + event.smearings_ele2 = new float[1]; + event.smearings_ele1[0] = (float) gen.Gaus(0,1); + event.smearings_ele2[0] = (float) gen.Gaus(0,1); + } #endif includedEvents++; cache.at(evIndex).push_back(event); diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index 0de4c4b3c78..5b152e6476d 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -43,7 +43,7 @@ ZFit_class::~ZFit_class(void){ ZFit_class::ZFit_class(TChain *data_chain_, TChain *signal_chain_, TChain *bkg_chain_, - TString invMass_VarName, double invMass_min, double invMass_max + TString invMass_VarName, double invMass_min, double invMass_max, double bin_width ): _isDataUnbinned(false), _isDataSumW2(false), _isMCUnbinned(true), _isMCSumW2(true), @@ -78,7 +78,7 @@ ZFit_class::ZFit_class(TChain *data_chain_, energyVar_name = GetEnergyVarName(invMass_VarName); /*--------------- imposto il binning */ - double bin_width=.5; + //double bin_width=.5; int nBins = (int)((invMass.getMax()-invMass.getMin())/bin_width); invMass.setBins(10000); invMass.setBins(nBins,"plotRange"); diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 470fa81ba57..3f2b98168e8 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -53,19 +54,64 @@ #define FIT_LIMIT 0.01 #define ITER_MAX 20 //#define DEBUG +#define MEM_DEBUG #define PROFILE_NBINS 2000 using namespace RooStats; //Get Profile after smearing -TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=-1, bool warningEnable=true, bool trueEval=true, float rho=0, float Emean=0); -TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval, float rho, float Emean){ - TString name(var->GetName()); - if(trueEval) std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << "\t" << rho << std::endl; - double minValue=var->getVal(); +TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level=-1, bool warningEnable=false, bool trueEval=true, float rho=0, float Emean=0, float phi=0); + +TGraph *GetProfile(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, bool trueEval=true, double rho=0, double Emean=0, float phi=0){ + if(var2==NULL) return GetProfile(var1, smearer, -1, false, trueEval, rho, Emean); + + Double_t v1 = var1->getVal(); + Double_t v2 = var2->getVal(); + + TGraph *g1 = GetProfile(var1, smearer, -1, false, false, rho, Emean, phi); // take only the binning + TGraph *g2 = GetProfile(var2, smearer, -1, false, false, rho, Emean, phi); // take only the binning + TGraph *g3 = (rho!=0) ? GetProfile(NULL, smearer, -1, false, false, rho, Emean, phi) : GetProfile(var1, smearer, -1, false, false, rho, Emean, phi); // take only the binning + + Double_t *X1 = g1->GetX(); + Double_t *X2 = g2->GetX(); + Int_t N = g1->GetN(); + Double_t *Y = g3->GetY(); + + if(N!=g2->GetN()){ + std::cerr << "[ERROR] N1!=N2 for phi minimization: " << N << "\t"<GetN() << std::endl; + exit(1); + } + + for(Int_t i=0; i < N; i++){ // reset Y values + var1->setVal(X1[i]); + var2->setVal(X2[i]); + Y[i]=smearer.evaluate(); + } + + var1->setVal(v1); + var2->setVal(v2); + + delete g1; + delete g2; + return g3; +} + +TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool warningEnable, bool trueEval, float rho, float Emean, float phi){ + if(var==NULL) trueEval=false; + TString name(var == NULL ? "phi" : var->GetName()); + //if(trueEval) + std::cout << "[STATUS] Getting profile for " << name << "\t" << level << "\t" << trueEval << "\t" << rho << "\t" << Emean << std::endl; + double minValue= var==NULL? 0 : var->getVal(); //double minYvalue=compatibility.evaluate(); - double bin_width=0., range_min=0., range_max=0., sigma=0.; + double bin_width=0., sigma=0.; + double range_min = var ==NULL ? 0 : var->getMin(); + double range_max = var ==NULL ? M_PI_2 : var->getMax(); + if(Emean!=0){ + range_min = 0 ; + range_max = M_PI_2; + } + int nBin=0; switch(level){ case -1: @@ -74,6 +120,7 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w case 0: TGraph *g1; g1 =GetProfile(var, compatibility, 1,false); TGraph *g2; g2 =GetProfile(var, compatibility, 2,false); + TGraph *g3; g3 =GetProfile(var, compatibility, 4,false); Double_t X[PROFILE_NBINS], Y[PROFILE_NBINS]; Int_t N_; N_=g1->GetN(); @@ -87,6 +134,14 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w N_=g2->GetN(); X_=g2->GetX(); Y_=g2->GetY(); + for(Int_t i=0; i < N_; i++){ + X[i+nBin]=X_[i]; + Y[i+nBin] =Y_[i]; + } + nBin+=N_; + + N_=g3->GetN(); + X_=g3->GetX(); Y_=g3->GetY(); for(Int_t i=0; i < N_; i++){ X[i+nBin]=X_[i]; Y[i+nBin] =Y_[i]; @@ -99,21 +154,18 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w case 1: if(name.Contains("scale")){ bin_width=0.005; - } else if(name.Contains("const")){ + } else if(name.Contains("const")|| (rho==0 && Emean!=0)){ bin_width=0.005; } else if(name.Contains("alpha")){ bin_width=0.01; } - - range_min = var->getMin(); - range_max = var->getMax(); - + if((var==NULL || name.Contains("alpha") || name.Contains("const")) && (Emean!=0 && rho!=0)) bin_width=0.025; break; case 2: if(name.Contains("scale")){ bin_width=0.0005; // level1/10 sigma=10*bin_width; // - }else if(name.Contains("const")){ + }else if(name.Contains("const")|| (rho==0 && Emean!=0)){ bin_width=0.0005; //level1/10 sigma=10*bin_width; // +/- 0.5% } else if(name.Contains("alpha")){ @@ -121,58 +173,57 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w sigma=5*bin_width; // +/- 0.5% } - + if((var==NULL || name.Contains("alpha") || name.Contains("const")) && (Emean!=0 && rho!=0)) bin_width=0.025; //sigma=var->getError(); - range_min = std::max(var->getMin(), minValue - sigma); - range_max = std::min(var->getMax(), minValue + sigma); + range_min = std::max(range_min, minValue - sigma); + range_max = std::min(range_max, minValue + sigma); break; case 3: if(name.Contains("scale")){ bin_width=0.0001; // level2/5 sigma=8*bin_width; // - }else if(name.Contains("const")){ + }else if(name.Contains("const") || (rho==0 && Emean!=0)){ bin_width=0.0002; // level2 /3 sigma=6*bin_width; } else if(name.Contains("alpha")){ bin_width=0.003; sigma=5*bin_width; // +/- 0.5% } - //sigma=var->getError(); - range_min = std::max(var->getMin(), minValue - sigma); //4sigma - range_max = std::min(var->getMax(), minValue + sigma); + range_min = std::max(range_min, minValue - sigma); //4sigma + range_max = std::min(range_max, minValue + sigma); break; case 4: if(name.Contains("scale")){ - bin_width=0.0005; // level1/10 - }else if(name.Contains("const")){ - bin_width=0.001; //level1/10 + bin_width=0.0001; // level1/10 + sigma=5*bin_width; // +/- 0.5% + }else if(name.Contains("const")|| (rho==0 && Emean!=0)){ + bin_width=0.0001; //level1/10 + sigma=10*bin_width; // +/- 0.5% } else if(name.Contains("alpha")){ - bin_width=0.005; + bin_width=0.001; + sigma=5*bin_width; // +/- 0.5% } + range_min = std::max(range_min, minValue - sigma); //4sigma + range_max = std::min(range_max, minValue + sigma); - range_min = var->getMin(); - range_max = var->getMax(); break; case 5: if(name.Contains("scale")){ bin_width=0.0001; // level1/10 - }else if(name.Contains("const")){ + }else if(name.Contains("const") || (rho==0 && Emean!=0)){ bin_width=0.0001; //level1/10 } else if(name.Contains("alpha")){ bin_width=0.001; } - if((name.Contains("alpha") || name.Contains("const")) && (Emean!=0 && rho!=0)) bin_width=0.025; - - range_min = var->getMin(); - range_max = var->getMax(); + if((var==NULL || name.Contains("alpha") || name.Contains("const")) && (Emean!=0 && rho!=0)) bin_width=0.025; break; } - + if((var==NULL || name.Contains("alpha") || name.Contains("const")) && (Emean!=0)) bin_width=0.025; nBin=(int)((range_max-range_min)/bin_width); - if(Emean!=0 && rho!=0) nBin=(int) (M_PI_2 / bin_width); + // if(Emean!=0 && rho!=0) nBin=(int) (M_PI_2 / bin_width); #ifdef DEBUG @@ -209,6 +260,12 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w if(name.Contains("const")) value=rho*sin(bin_width*iVal); //std::cout << "[DEBUG] " << "\t" << rho << "\t" << Emean << "\t" << bin_width << "\t" << bin_width*iVal << "\t" << value << std::endl; } + if(rho==0 && Emean!=0){ + if(name.Contains("alpha")) value=value*Emean*cos(phi); + if(name.Contains("const")) value=value*sin(phi); + //std::cout << "[DEBUG] " << "\t" << rho << "\t" << Emean << "\t" << bin_width << "\t" << bin_width*iVal << "\t" << value << std::endl; + } + #ifdef DEBUG std::cout << "testing function @ " << value << std::endl; #endif @@ -227,7 +284,7 @@ TGraph *GetProfile(RooRealVar *var, RooSmearer& compatibility, int level, bool w std::cout << "------------------------------" << std::endl; } - var->setVal(minValue); + if(var!=NULL) var->setVal(minValue); TGraph *profil = new TGraph(nBin,xValues,chi2); return profil; } @@ -527,7 +584,7 @@ void Smooth(TH2F *h, Int_t ntimes, Option_t *option) delete [] ebuf; } -bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t locmin, float phiMin=1){ +bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t locmin, float phiMin=2){ if(abs(i-iLocMin)>2 && chi2-min > 300){ std::cout << "stop 1" << std::endl; return true;} if(abs(i-iLocMin)>5 && chi2-min > 200){ std::cout << "stop 2" << std::endl; return true;} // if(abs(i-iLocMin)>6 && chi2-locmin > 120){ std::cout << "stop 3" << std::endl; return true;} @@ -555,7 +612,11 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t float phiMin=1; if(var2!=NULL){ var2->setVal(X2[iMinStart]); - phiMin=3; + phiMin=5; + } + TString varName = var->GetName(); + if(varName.Contains("constTerm") || varName.Contains("alpha")){ + phiMin=2; } if(Y==NULL) exit(1); @@ -573,11 +634,11 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t Y[i] += chi2; NY[i]++; - iStep = chi2-chi2old != 0 ? std::max(1,((int) (fabs(0.1/(chi2-chi2old))))) : 1; - - if(var2!=NULL) std::cout << "[DEBUG] " << std::setprecision(5) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << + //iStep = chi2-chi2old != 0 ? std::max(1,((int) (fabs(0.1/(chi2-chi2old))))) : 1; + iStep=1; + if(var2!=NULL) std::cout << "[DEBUG] " << std::setprecision(3) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; - else std::cout << std::setprecision(5) << "[DEBUG] " << "\t" << iStep << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\tchi2= " << chi2 << std::endl; + else std::cout << std::setprecision(4) << "[DEBUG] " << "\t" << iStep << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\tchi2= " << chi2 << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; locmin=chi2; @@ -602,14 +663,15 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t Y[i] += chi2; NY[i]++; - iStep = chi2-chi2old != 0 ? std::max(1,((int) (fabs(0.1/(chi2-chi2old))))) : 1; + //iStep = chi2-chi2old != 0 ? std::max(1,((int) (fabs(0.1/(chi2-chi2old))))) : 1; + iStep=1; #ifdef DEBUG //if(update==true) std::cout << "[DEBUG] " << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << std::endl; #endif - if(var2!=NULL) std::cout << "[DEBUG] Neg" << std::setprecision(5) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << + if(var2!=NULL) std::cout << "[DEBUG] Neg" << std::setprecision(3) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; - else std::cout << std::setprecision(5) << "[DEBUG] Neg" << "\t" << iStep << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; + else std::cout << std::setprecision(4) << "[DEBUG] Neg" << "\t" << iStep << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; if(chi2<=locmin){ //local minimum iLocMin=i; @@ -630,7 +692,7 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t } bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, - Double_t min_old, Double_t& min, double rho=0, double Emean=0){ + Double_t min_old, Double_t& min, double rho=0, double Emean=0, bool update=true, bool dscan=false){ bool changed=false; Double_t v1=var->getVal(); @@ -671,7 +733,7 @@ bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, //else a fluctuation changed the min value } - if(minGetName() << " from " << v1 << " to " << X[iMin_] << std::endl << " min = " << min << "; Y[iMin_]-min = " << Y[iMin_]-min << std::endl; var->setVal(X[iMin_]); @@ -682,6 +744,8 @@ bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, } // std::cout << "[INFO] Level " << iProfile << " variable:" << var->GetName() << "\t" << var->getVal() << "\t" << min << std::endl; delete profil; + // delete X; + //delete Y; return changed; } @@ -689,7 +753,13 @@ bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, min is updated */ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, - Double_t min_old, Double_t& min, bool update=true, TGraph **g=NULL){ + Double_t min_old, Double_t& min, double& rho, double& Emean, bool update=true, bool dscan=false){ +#ifdef MEM_DEBUG + ProcInfo_t info; + gSystem->GetProcInfo(&info); + std::cout << "GET MEM INFO AT MinProfile2D START " << info.fMemResident << std::endl; +#endif + bool changed=false; std::cout << "------------------------------ MinProfile2D: iProfile==" << iProfile << std::endl; @@ -705,17 +775,18 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i myClock.Start(); var2->setVal(0); + var1->setVal(sqrt(v1*v1+v2*v2/50)); changed+=MinProfile(var1, smearer, -1, min_old, locmin); // best DeltaC with DeltaS=0 // rho = best DeltaC with DeltaS=0 - double rho = var1->getVal(); + rho = var1->getVal(); locmin=1e20; var1->setVal(0); - var2->setVal(0.05); + var2->setVal(rho*7); MinProfile(var2, smearer, -1, min_old, locmin); // best DeltaS with DeltaC=0 //sqrt() = DeltaS/DeltaC - double Emean = var2->getVal()/rho; + Emean = var2->getVal()/rho; std::cout << "--------------------------------- GetProfile for " << var1->GetName() << std::endl; TGraph *g1 = GetProfile(var1, smearer, iProfile, false, false, rho, Emean); // take only the binning @@ -731,12 +802,12 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i exit(1); } - // Double_t *Y = new Double_t[N2]; + Double_t *Y = g1->GetY(); //Int_t iLocMin1=0, iLocMin2, Int_t iLocMin2Prev=10; - //Double_t *Y2 = new Double_t[PROFILE_NBINS]; + //Double_t Y2[PROFILE_NBINS]; for(Int_t i2=0; i2 < N; i2++){ // reset Y values Y[i2]=0; // if(X1[iLocMin2Prev]setVal(X1[iMin_]); var2->setVal(X2[iMin_]); @@ -783,17 +854,24 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i while(XG1[iBin1]GetN()); + Int_t iBin2max= std::min(iBin2+6,G1->GetN()); + + Int_t iBin1_ = iBin1, iBin2_=iBin2, iBinM=(int)(sqrt(iBin1*iBin1+iBin2*iBin2)); + + iBin1min=0; + iBin1max=G1->GetN(); + iBin2min=0; + iBin2max=G1->GetN(); std::cout << "[INFO] " << "iBin1min = " << iBin1min << std::endl << " " << "iBin1max = " << iBin1max << std::endl << " " << "iBin2min = " << iBin2min << std::endl @@ -802,18 +880,20 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i for(iBin1=iBin1min; iBin1setVal(XG1[iBin1]); for(iBin2=iBin2min; iBin2setVal(XG2[iBin2]); + if(sqrt(iBin1*iBin1+Emean * iBin2*iBin2) < iBinM-10) continue; + if(sqrt(iBin1*iBin1+Emean * iBin2*iBin2) > iBinM+10) continue; + var2->setVal(XG2[iBin2]); smearer.evaluate(); std::cout << "[DEBUG] " << XG1[iBin1] << "\t" << XG2[iBin2] << "\t" << smearer.evaluate()-chi2 << std::endl; } } - (*g) = GetProfile(var1, smearer, -1, false, false, rho, Emean); - Double_t *YY = (*g) -> GetY(); - for(int i=0; i < N; i++) YY[i]=Y[i]; + myClock.Stop(); myClock.Print(); delete G1; delete G2; +// delete XG1; +// delete XG2; var1->setVal(v1); var2->setVal(v2); } @@ -836,6 +916,11 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i delete g1; delete g2; +#ifdef MEM_DEBUG + gSystem->GetProcInfo(&info); + std::cout << "GET MEM INFO JUST BEFORE END MinProfile2D " << info.fMemResident << std::endl; +#endif + return changed; } @@ -897,18 +982,18 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int for(RooRealVar *var = (RooRealVar*)it_->Next(); var!=NULL; var = (RooRealVar*)it_->Next()){ if (var->isConstant()) continue; TString name(var->GetName()); - // special part for alpha fitting TString alphaName=name; alphaName.ReplaceAll("constTerm","alpha"); RooRealVar *var2= name.Contains("constTerm") ? (RooRealVar *)argList_.find(alphaName): NULL; if(name.Contains("alpha")) continue; //if alpha parameter exists, need a 2D scan //if(var2!=NULL && var2->isConstant()) var2=NULL; // to use MinProfile 1D instead of 2D //taking large profile - if(var2==NULL) MinProfile(var, smearer, -1, min_old, min); //updateError += MinProfile(var, smearer, iProfile, min_old, min); + if(var2==NULL || var2->isConstant()) MinProfile(var, smearer, -1, min_old, min); //updateError += MinProfile(var, smearer, iProfile, min_old, min); else { //if(mcmc && iProfile>2) updateError += MinMCMC2D(var, var2, smearer, iProfile, min_old, min, nIterMCMC); // else - updateError+=MinProfile2D(var, var2, smearer, -1, min_old, min); + double rho=0, Emean=0; + updateError+=MinProfile2D(var, var2, smearer, -1, min_old, min, rho, Emean); } } delete it_; From 41d4914905166a0d75e7bbd637bf3395a8389b0b Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 23 Nov 2013 07:51:20 +0100 Subject: [PATCH 181/475] changes before last iteration, to be checked --- ZFitter/bin/ZFitter.cpp | 2 +- ZFitter/data/regions/scaleStep2smearing_1.dat | 8 +- ZFitter/data/regions/scaleStep2smearing_2.dat | 10 +-- ZFitter/interface/runDivide_class.hh | 2 +- ZFitter/macro/PlotDataMC.C | 37 ++++++++++ ZFitter/script/energyScale.sh | 73 ++++++++++++++++++- ZFitter/script/justOnce/smearing.sh | 42 +++++++---- 7 files changed, 148 insertions(+), 26 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 0eed7730ed8..53e16a6f441 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1183,7 +1183,7 @@ int main(int argc, char **argv) { continue; TString name(var->GetName()); - if(name.Contains("scale")) continue; + //if(name.Contains("scale")) continue; //if(name.Contains("absEta_1_1.4442-gold") && vm.count("alphaGoldFix")) continue; // special part for alpha fitting double min=0.; diff --git a/ZFitter/data/regions/scaleStep2smearing_1.dat b/ZFitter/data/regions/scaleStep2smearing_1.dat index aa97d75b3dc..a72ed53df51 100644 --- a/ZFitter/data/regions/scaleStep2smearing_1.dat +++ b/ZFitter/data/regions/scaleStep2smearing_1.dat @@ -1,8 +1,8 @@ # regions defined for condition validation -EB-absEta_0_1-bad -EB-absEta_0_1-gold -EB-absEta_1_1.4442-bad -EB-absEta_1_1.4442-gold +absEta_0_1-bad +absEta_0_1-gold +absEta_1_1.4442-bad +absEta_1_1.4442-gold # #EE-absEta_1.566_2-bad #EE-absEta_1.566_2-gold diff --git a/ZFitter/data/regions/scaleStep2smearing_2.dat b/ZFitter/data/regions/scaleStep2smearing_2.dat index feb499cf201..f8e29a527c1 100644 --- a/ZFitter/data/regions/scaleStep2smearing_2.dat +++ b/ZFitter/data/regions/scaleStep2smearing_2.dat @@ -1,6 +1,6 @@ # regions defined for condition validation -EB-absEta_0_1-gold -EE-absEta_1.566_2-bad -EE-absEta_1.566_2-gold -EE-absEta_2_2.5-bad -EE-absEta_2_2.5-gold +absEta_0_1-gold +absEta_1.566_2-bad +absEta_1.566_2-gold +absEta_2_2.5-bad +absEta_2_2.5-gold diff --git a/ZFitter/interface/runDivide_class.hh b/ZFitter/interface/runDivide_class.hh index ae99346dd84..055ee93f819 100644 --- a/ZFitter/interface/runDivide_class.hh +++ b/ZFitter/interface/runDivide_class.hh @@ -28,7 +28,7 @@ public: void ReadRunRangeLimits(TString fileName); // void LoadRunEventNumbers(TTree *tree, TString runNumber_branchName); - void LoadRunEventNumbers(TTree *tree, TString runNumber_branchName, TString runTime_branchName="runTime"); + void LoadRunEventNumbers(TTree *tree, TString runNumber_branchName="runNumber", TString runTime_branchName="runTime"); void FillRunLimits(unsigned int nEvents_min=50000); std::vector GetRunRanges(void); diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 0e05c8cc894..b5e0980a8b0 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -12,6 +12,43 @@ #include #include "src/ElectronCategory_class.cc" #include +#include +#include "src/runDivide_class.cc" + +TString GetRunRangeTime(TChain *chain, TString runRange){ + runDivide_class runDivide; + runDivide.LoadRunEventNumbers(chain); + return runDivide.GetRunRangeTime(runRange); +} + +std::vector ReadRegionsFromFile(TString fileName){ + ifstream file(fileName); + std::vector regions; + TString region; + + while(file.peek()!=EOF && file.good()){ + if(file.peek()==10){ // 10 = \n + file.get(); + continue; + } + + if(file.peek() == 35){ // 35 = # + file.ignore(1000,10); // ignore the rest of the line until \n + continue; + } + + file >> region; + file.ignore(1000,10); // ignore the rest of the line until \n +#ifdef DEBUG + std::cout << "[DEBUG] Reading region: " << region<< std::endl; +#endif + regions.push_back(region); + + } + return regions; +} + + TCut GetCut(TString category, int indexEle=0){ ElectronCategory_class cutter; diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index d132bcb72d6..80b2c81fdcd 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -95,6 +95,7 @@ case ${STEP} in 6) STEP6=y;; 8) STEP8=y;; 9) STEP9=y;; + 10) STEP10=y;; 7) STEP7=y;; 1-2) STEP1=y; STEP2=y;; 1-3) STEP1=y; STEP2=y; STEP3=y; SLIDE=y;; @@ -379,7 +380,7 @@ if [ -n "${STEP3WEIGHT}" ];then fi if [ -n "${STEP5}" ];then - # traditional resolution categories, only scales in Et bins + # traditional resolution categories, Et bin categorization, only profile and histograms if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi @@ -392,7 +393,7 @@ if [ -n "${STEP5}" ];then $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step5/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step5/img \ - --constTermFix \ + --constTermFix --plotOnly \ --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ --initFile=${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt \ @@ -661,6 +662,74 @@ if [ -n "${STEP9}" ];then done fi + +if [ -n "${STEP10}" ];then + # stochastic term resolution categories, scales in Et bins, only histos + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step10/fitres/$index" ];then mkdir ${outDirData}/step10/fitres/$index -p; fi + if [ ! -e "${outDirData}/step10/img/$index" ];then mkdir ${outDirData}/step10/img/$index -p; fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step10/`basename $configFile` + + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_9.dat + tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` + initFile=${outDirData}/table/step10-scaleStep2smearing_9-${commonCut}.txt + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for tag in $tags + do + if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then + ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi + done + + for index in `seq 141 141` + do + mkdir ${outDirData}/step10/${index}/fitres/ -p + mkdir ${outDirData}/step10/${index}/img -p +# bsub -q 2nd -oo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step10" \ +# "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step10/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step10/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step10/${index}/img/ \ + --plotOnly \ + --constTermFix --smearerFit --smearingEt --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1 #" + done + exit 0 + ######################### + regionFile=data/regions/scaleStep2smearing_10.dat + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for index in `seq 1 30` + do + mkdir ${outDirData}/step10/${index}/fitres/ -p + mkdir ${outDirData}/step10/${index}/img -p + bsub -q 2nd -oo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step10" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step10/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step10/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step10/${index}/img/ \ + --constTermFix --smearingEt --smearerFit --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1" + done +fi + if [ -n "${STEP8}" ];then # stochastic term resolution categories, scales in Et bins diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index b1b9b3bb53e..49ad2151be0 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -6,19 +6,19 @@ queue=$1 nEventsPerToy=factorizedSherpaFixed_DataSeedFixed_smooth_autobin_smearingEt_${queue} nSmearToy=10 -commonCut=Et_20-trigger-noPF-EB +commonCut=Et_20-trigger-noPF #nEventsPerToy=factorized if [ -z "${queue}" ];then local=y; fi -for regionsFile in scaleStep2smearing_1 scaleStep2smearing_2 #scaleStep2smearing_9 +for regionsFile in scaleStep2smearing_9 #scaleStep2smearing_1 scaleStep2smearing_2 # do dir=test/dato/fitres/Hgg_Et-toys/${regionsFile} #alphaConst=C -for scale in 1.00 1.01 0.99 1.02 0.98 #1.05 0.95 1 +for scale in 1.00 1.01 0.99 1.02 0.98 1.05 0.95 do -for constAlpha in 0.01-0.00 0.03-0.00 0.005-0.00 #0.035-0.25 #0.007-0.05 0.01-0.00 0.000-0.07 # # #0.0005 0.02 0.005 +for constAlpha in 0.02-0.00 0.04-0.00 0.01-0.00 0.03-0.00 0.005-0.00 0.035-0.25 0.007-0.05 0.01-0.00 0.000-0.07 # # #0.0005 0.02 0.005 do const=`echo $constAlpha | cut -d '-' -f 1` alpha=`echo $constAlpha | cut -d '-' -f 2` @@ -71,6 +71,14 @@ EOF # fi cat > $baseDir/${alphaConst}/mcToy.txt <> $baseDir/toyMC.dat # echo "s2 smearEle_HggRunEtaR9 smearEle_HggRunEtaR9_s2-invertedToyMC-${const}-${alpha}.root" >> $baseDir/toyMC.dat - for nToys in `seq 2 50`; + for nToys in `seq 1 100`; do newDir=${baseDir}/${alphaConst}/${nSmearToy}/${nToys}/ mkdir -p $newDir From c1ca52487b2ff3d5282012462c735e653cd72e8f Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 23 Nov 2013 07:51:32 +0100 Subject: [PATCH 182/475] changes before last iteration, to be checked --- ZFitter/script/justOnce/scales.sh | 132 ++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100755 ZFitter/script/justOnce/scales.sh diff --git a/ZFitter/script/justOnce/scales.sh b/ZFitter/script/justOnce/scales.sh new file mode 100755 index 00000000000..afcd4a16178 --- /dev/null +++ b/ZFitter/script/justOnce/scales.sh @@ -0,0 +1,132 @@ +#!/bin/bash +#1000 100000 +#regionsFile=scaleStep2smearing_7 +#nEventsPerToy= +toyMCFile=data/validation/toyMC-fitMethod.dat +queue=$1 +#nEventsPerToy=factorizedSherpaFixed_DataSeedFixed_smooth_autobin_${queue} +nSmearToy=10 +commonCut=Et_25-trigger-noPF +local=y + +const=0 +alpha=0 +alphaConst=C + +for regionsFile in scaleStep4smearing_0a #scaleStep2smearing_5 scaleStep2smearing_6 + do + dir=test/dato/fitres/fitMethod-toys/scales/${regionsFile} + + + for scale in 1.00 0.99 1.01 0.98 1.02 0.95 1.05 0.90 1.10 + do + deltaM=`echo ${scale}-1| bc -l | sed 's|^.|0.|'` + echo "[[[[[[[[[[[ scale ]]]]]]]]]]] ${scale}" + baseDir=${dir}/${nEventsPerToy}/${scale} + mkdir -p $baseDir + cat > ${baseDir}/scaleEleFile.dat < ${baseDir}/invertedToyMC.dat + if [ ! -e "data/scaleEle/scaleEle_HggRunEtaR9_s2-invertedToyMC-${scale}.root" ];then + ./bin/ZFitter.exe -f ${baseDir}/invertedToyMC.dat --regionsFile=data/regions/${regionsFile}.dat \ + --commonCut=${commonCut} \ + --saveRootMacro --noPU \ + --corrEleType=HggRunEtaR9 --corrEleFile=${baseDir}/scaleEleFile.dat || exit 1 #> ${baseDir}/treeGen.log || exit 1 + mv tmp/scaleEle_HggRunEtaR9_d1-invertedToyMC.root data/scaleEle/scaleEle_HggRunEtaR9_s1-invertedToyMC-${scale}.root || exit 1 + mv tmp/scaleEle_HggRunEtaR9_d2-invertedToyMC.root data/scaleEle/scaleEle_HggRunEtaR9_s2-invertedToyMC-${scale}.root || exit 1 + mv tmp/scaleEle_HggRunEtaR9_d3-invertedToyMC.root data/scaleEle/scaleEle_HggRunEtaR9_s3-invertedToyMC-${scale}.root || exit 1 + fi + cat > $baseDir/mcToy.txt <> $baseDir/mcToy.txt +cat data/regions/$regionsFile.dat | sed "/#/ d;s|^|constTerm_|;s|$|-${commonCut} = 0.0 +/- 0.005 C L(0.00 - 0.03)|" >> $baseDir/mcToy.txt +cat data/regions/$regionsFile.dat | sed "/#/ d;s|^|alpha_|;s|$|-${commonCut} = 0.0 +/- 0.005 C L(0.00 - 0.2)|" >> $baseDir/mcToy.txt + + sed '/scaleEle/ d' ${toyMCFile} | sed "/^$/d; /^d[2-9]/ d;/^s1/ d;/^s3/ d" > $baseDir/toyMC.dat + echo "s2 scaleEle_HggRunEtaR9 data/scaleEle/scaleEle_HggRunEtaR9_s2-invertedToyMC-${scale}.root" >> $baseDir/toyMC.dat + + for nToys in 250; + do + newDir=${baseDir}/${alphaConst}/${nToys} + mkdir -p $newDir/{mc,dato}/{img,fitres} + if [ -z "${local}" ];then + bsub -q ${queue} -oo ${newDir}/stdout.log -eo ${newDir}/stderr.log -J "$regionsFile-${scale}-$const-$alpha" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ + --regionsFile=data/regions/${regionsFile}.dat \ + --commonCut=${commonCut} \ + --outDirFitResMC=$newDir/mc/fitres --outDirFitResData=$newDir/dato/fitres \ + --outDirImgData=$newDir/dato/img --outDirImgMC=$newDir/mc/img --noPU > ${newDir}/log2.log" + else + echo "#============================================================ Toy = $nToys" +# ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ +# --regionsFile=data/regions/${regionsFile}.dat \ +# --commonCut=${commonCut} \ +# --outDirFitResMC=$newDir/mc/fitres --outDirFitResData=$newDir/dato/fitres \ +# --outDirImgData=$newDir/dato/img --outDirImgMC=$newDir/mc/img --noPU |tee ${newDir}/log2.log + ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ + --regionsFile=data/regions/${regionsFile}.dat \ + --commonCut=${commonCut} \ + --smearerFit --plotOnly --profileOnly --runToy \ + --outDirFitResMC=$newDir/mc/fitres --outDirFitResData=$newDir/dato/fitres \ + --initFile=$baseDir/mcToy.txt \ + --outDirImgData=$newDir/dato/img --outDirImgMC=$newDir/mc/img --noPU |tee ${newDir}/log2.log + + fi + +# ./bin/ZFitter.exe -f ${baseDir}/toyMC.dat \ +# --regionsFile=data/regions/${regionsFile}.dat \ +# --commonCut=Et_25-trigger-noPF \ +# --outDirFitResMC=$newDir/mc/fitres --outDirFitResData=$newDir/dato/fitres \ +# --outDirImgData=$newDir/dato/img --outDirImgMC=$newDir/mc/img --noPU +# #--initFile=${baseDir}/${alphaConst}/mcToy.txt + done + wait + done + wait +done + + + +exit 0 + + +for scale in 0.90 0.95 0.98 0.99 1.00 1.01 1.02 1.05 1.10; do ./script/makeTable.sh --regionsFile=data/regions/scaleStep4smearing_0a.dat --outDirFitResData=test/dato/fitres/fitMethod-toys/scales/scaleStep4smearing_0a/${scale}/1/dato/fitres/ --outDirFitResMC=test/dato/fitres/fitMethod-toys/scales/scaleStep4smearing_0a/${scale}/1/mc/fitres/ --commonCut=Et_25-trigger-noPF | sed "s|^\([!#]\)|ADC_${scale}-\1|" > test/dato/fitres/fitMethod-toys/scales/scaleStep4smearing_0a/${scale}/1/table.tex; done + +cat test/dato/fitres/fitMethod-toys/scales/scaleStep4smearing_0a/*/1/table.tex > test/dato/fitres/fitMethod-toys/scales/scaleStep4smearing_0a/table.tex + ./script/stability.sh -t test/dato/fitres/fitMethod-toys/scales/scaleStep4smearing_0a/table.tex --column=6 -x ADC -y peak --outDirImgData=tmp/ --allRegions From e504c856aec1298a74ec51ecc8b32f402953c3ef Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 23 Nov 2013 14:51:07 +0100 Subject: [PATCH 183/475] fixed saving of r9Weight trees for different samples --- ZFitter/bin/ZFitter.cpp | 80 ++++++++++++++++------------------ ZFitter/src/r9Weights_class.cc | 24 +++++----- 2 files changed, 49 insertions(+), 55 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 53e16a6f441..c315294c290 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -559,60 +559,54 @@ int main(int argc, char **argv) { ///------------------------------ to obtain r9weights - r9Weights_class r9Weights; if(vm.count("saveR9TreeWeight") && !vm.count("r9WeightFile")){ std::cerr << "[ERROR] No r9WeightFile specified" << std::endl; return 1; } if(vm.count("r9WeightFile")){ + std::cout << "------------------------------------------------------------" << std::endl; + std::cout << "[STATUS] Getting r9Weights from file: " << r9WeightFile << std::endl; + r9Weights_class r9Weights; r9Weights.ReadFromFile(r9WeightFile); - + + TString treeName="r9Weight"; + // mc // save it in a file and reload it as a chain to be safe against the reference directory for the tree + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + if(tag_chain_itr->first.CompareTo("d")==0 || !tag_chain_itr->first.Contains("d")) continue; //only data + if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //only MC + if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + + TString filename="tmp/r9Weight_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; + std::cout << "[STATUS] Saving r9Weights tree to root file:" << filename << std::endl; + + TFile f(filename,"recreate"); + if(!f.IsOpen() || f.IsZombie()){ + std::cerr << "[ERROR] File for r9Weights: " << filename << " not opened" << std::endl; + exit(1); + } + TTree *corrTree = r9Weights.GetTreeWeight(ch); + f.cd(); + corrTree->Write(); + std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; + std::cout << " r9Weights entries: " << corrTree->GetEntries() << std::endl; + delete corrTree; + + f.Write(); + f.Close(); + std::pair pair_tmp(treeName, new TChain(treeName)); + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(filename); - TFile r9File_mc("tmp/r9mcTree.root","recreate"); - if(r9File_mc.IsOpen()){ - r9File_mc.cd(); - TTree *r9Tree = r9Weights.GetTreeWeight((tagChainMap["s"])["selected"]); - r9Tree->Write(); - delete r9Tree; - r9File_mc.Write(); - r9File_mc.Close(); - std::pair pair_tmp("r9Weight", new TChain("r9Weight")); - (tagChainMap["s"]).insert(pair_tmp); - (tagChainMap["s"])["r9Weight"]->SetTitle("s"); - (tagChainMap["s"])["r9Weight"]->Add("tmp/r9mcTree.root"); - } else { - std::cerr << "[ERROR] " << std::endl; - return 1; - } + } // end of data samples loop + } // end of r9Weight - // data - TFile r9File_data("tmp/r9dataTree.root","recreate"); - if(r9File_data.IsOpen()){ - r9File_data.cd(); - TTree *r9Tree = r9Weights.GetTreeWeight((tagChainMap["d"])["selected"]); - r9Tree->Write(); - delete r9Tree; - r9File_data.Write(); - r9File_data.Close(); - std::pair pair_tmp("r9Weight", new TChain("r9Weight")); - (tagChainMap["d"]).insert(pair_tmp); - (tagChainMap["d"])["r9Weight"]->SetTitle("d"); - (tagChainMap["d"])["r9Weight"]->Add("tmp/r9dataTree.root"); - } - } if(vm.count("saveR9TreeWeight")) return 0; -// if((tagChainMap["s"]).count("r9Weight")){ -// std::cout << "[STATUS] Adding r9Weight chain to signal chain as friend chain" << std::endl; -// } -// if((tagChainMap["d"]).count("r9Weight")){ -// std::cout << "[STATUS] Adding r9Weight chain to data chain as friend chain" << std::endl; -// // if((tagChainMap["d"])["selected"]->AddFriend((tagChainMap["d"])["r9Weight"])==NULL) return 2; -// #ifdef DEBUG -// std::cout << "[DEBUG] r9Weight branch address " << (tagChainMap["d"])["selected"]->GetBranch("r9Weight") << std::endl; -// #endif -// } //============================== diff --git a/ZFitter/src/r9Weights_class.cc b/ZFitter/src/r9Weights_class.cc index f2cf07b1a0f..27f33780f00 100644 --- a/ZFitter/src/r9Weights_class.cc +++ b/ZFitter/src/r9Weights_class.cc @@ -25,17 +25,17 @@ double r9Weights_class::GetWeight(double etaEle_, double R9Ele_){ #endif double r9Weight=1.; - TString stringa; + TString categoryName; - if(fabs(etaEle_) < 1.) stringa="EBlowEta"; - if(fabs(etaEle_) >= 1 && fabs(etaEle_) <= 1.479) stringa="EBhighEta"; - if(fabs(etaEle_) > 1.479 && fabs(etaEle_) < 2) stringa="EElowEta"; - if(fabs(etaEle_) >= 2) stringa="EEhighEta"; + if(fabs(etaEle_) < 1.) categoryName="EBlowEta"; + if(fabs(etaEle_) >= 1 && fabs(etaEle_) <= 1.479) categoryName="EBhighEta"; + if(fabs(etaEle_) > 1.479 && fabs(etaEle_) < 2) categoryName="EElowEta"; + if(fabs(etaEle_) >= 2) categoryName="EEhighEta"; - if (R9Ele_>=0.94) stringa+="Gold"; - if (R9Ele_<0.94 ) stringa+="Bad"; + if (R9Ele_>=0.94) categoryName+="Gold"; + if (R9Ele_<0.94 ) categoryName+="Bad"; - if(stringa.Sizeof()>1){ // altrimenti non e' delle categorie definite sopra + if(categoryName.Sizeof()>1){ // altrimenti non e' delle categorie definite sopra std::vector WeightCat_vec; WeightCat_vec.push_back("R9EtaWeight"); // weights of the eta distribution WeightCat_vec.push_back("R9Weight"); // weights of the r9 distribution @@ -45,17 +45,17 @@ double r9Weights_class::GetWeight(double etaEle_, double R9Ele_){ itrV!=WeightCat_vec.end(); itrV++){ TString hist_prefix = *itrV; - if(r9weights.count(hist_prefix+stringa)==0){ - std::cerr << "[ERROR]: " << hist_prefix+stringa << " not found in file " << std::endl; + if(r9weights.count(hist_prefix+categoryName)==0){ + std::cerr << "[ERROR]: " << hist_prefix+categoryName << " not found in file " << std::endl; std::cerr << etaEle_ << "\t" << R9Ele_ << std::endl; exit(1); continue; } - r9weights_itr = r9weights.find(hist_prefix+stringa); + r9weights_itr = r9weights.find(hist_prefix+categoryName); #ifdef DEBUG - std::cout << hist_prefix << "\t" << stringa << "\t"; + std::cout << hist_prefix << "\t" << categoryName << "\t"; #endif r9weight_map_t::const_iterator itr; // first element less than x From bb98abd089eb22aa5b7b0758da51b17741a5f7ba Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 24 Nov 2013 11:06:02 +0100 Subject: [PATCH 184/475] fixes for R9 reweight --- ZFitter/bin/ZFitter.cpp | 3 +-- ZFitter/macro/PlotDataMC.C | 10 +++++++--- ZFitter/script/GenRootChain.sh | 5 +++-- ZFitter/script/energyScale.sh | 28 +++++++++++++++++++++++----- 4 files changed, 34 insertions(+), 12 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index c315294c290..3ba7d2c4325 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -575,8 +575,7 @@ int main(int argc, char **argv) { for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ - if(tag_chain_itr->first.CompareTo("d")==0 || !tag_chain_itr->first.Contains("d")) continue; //only data - if(tag_chain_itr->first.CompareTo("s")==0 || !tag_chain_itr->first.Contains("s")) continue; //only MC + if(tag_chain_itr->first.CompareTo("d")==0 || tag_chain_itr->first.CompareTo("s")==0) continue; if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present TChain *ch = (tag_chain_itr->second.find("selected"))->second; diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index b5e0980a8b0..d46db978bb9 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -500,7 +500,7 @@ TCanvas *PlotDataMCMC(TChain *data, TChain *mc, TChain *mc2, TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchname, TString binning, TString category, TString selection, TString dataLabel, std::vector mcLabel_vec, TString xLabel, TString yLabelUnit, - bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false){ + bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false, bool useR9Weight=false){ TStopwatch watch; watch.Start(); @@ -593,8 +593,12 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn // mc->SetBranchStatus("puWeight",1); TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; - if(usePU) mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *"puWeight*mcGenWeight"); - else mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC*"mcGenWeight"); + TString weights="mcGenWeight"; + + if(usePU) weights+="*puWeight"; + if(useR9Weight) weights+="*r9Weight"; + mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *weights.Data()); + } } diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index d1b4397736f..b81d6394e29 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -53,7 +53,7 @@ desc(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics,slides,onlyTable,test,commonCut:,period:,noPU,outDirImg:,addBranch:,regionsFile:,corrEleType:,corrEleFile: -- "$@") +if ! options=$(getopt -u -o hf: -l help,runRangesFile:,selection:,invMass_var:,puName:,baseDir:,rereco:,validation,stability,etaScale,systematics,slides,onlyTable,test,commonCut:,period:,noPU,outDirImg:,addBranch:,regionsFile:,corrEleType:,corrEleFile:,fitterOptions: -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -72,6 +72,7 @@ do --regionsFile) regionsFile=$2; shift;; --corrEleType) corrEleType="--corrEleType=$2"; shift;; --corrEleFile) corrEleFile="--corrEleFile=$2"; shift;; + --fitterOptions) fitterOptions="$fitterOptions $2"; shift;; --invMass_var) invMass_var=$2; echo "[OPTION] invMass_var = ${invMass_var}"; shift;; --outDirImg) outDirImg=$2; shift;; --puName) puName=$2; shift;; @@ -137,7 +138,7 @@ fi # saving the root files with the chains rm tmp/*_chain.root -./bin/ZFitter.exe --saveRootMacro -f ${configFile} --regionsFile=${regionsFile} ${noPU} ${addBranchList} || exit 1 +./bin/ZFitter.exe --saveRootMacro -f ${configFile} --regionsFile=${regionsFile} ${noPU} ${addBranchList} ${fitterOptions} || exit 1 # adding all the chains in one file for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root tmp/s_selected_chain.root diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 80b2c81fdcd..d892942f2c5 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -87,6 +87,17 @@ esac case ${STEP} in + help) + echo "List of steps:" + echo " - 1: stability vs time (runNumber x eta)" + echo " - 2: eta x R9 (smearing method)" +# echo " - 2fit: eta x R9 (fit method)" + echo " - 3: closure test of 2: eta x R9 (fit method)" + echo " - 4: closure test of 2: eta x R9 (smearing method), for final histograms and profiles" + echo " - 5: plot and profile only in Et categories with smearings from step4" + echo " - 6: smearings from step4, scales in Et x eta x R9 categories" + echo " - 7: eta x R9 with R9 reweight" + ;; 1) STEP1=y;; 2) STEP2=y;; 3) STEP3=y;; #SLIDE=y;; @@ -136,18 +147,25 @@ outDirTable=${outDirData}/table #if [ ! -e "${outDirTable}/${selection}/${invMass_var}" ];then mkdir -p ${outDirTable}/${selection}/${invMass_var}; fi -if [ -n "${STEP1}" ];then -regionFile=data/regions/scaleStep1.dat +if [ ! -e "${outDirData}/table" ];then mkdir ${outDirData}/table -p; fi +if [ ! -e "${outDirData}/log" ];then mkdir ${outDirData}/log -p; fi +# command="./bin/ZFitter.exe -f ${configFile} --runRangesFile ${runRangesFile} +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut $commonCut +# --outDirFitResMC=${outDirMC}/${STEP}/fitres --outDirFitResData=${outDirData}/${STEP}/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log//step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.log || exit 1 +# " +# --regionsFile ${regionFile} +if [ -n "${STEP1}" ];then + regionFile=data/regions/scaleStep1.dat + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/table" ];then mkdir ${outDirData}/table -p; fi if [ ! -e "${outDirData}/fitres" ];then mkdir ${outDirData}/fitres -p; fi if [ ! -e "${outDirData}/img" ];then mkdir ${outDirData}/img -p; fi - if [ ! -e "${outDirData}/log" ];then mkdir ${outDirData}/log -p; fi - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut $commonCut \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log//step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.log || exit 1 From 0de3ef6ed0f2c23f94a493b14f0f35255f71b601 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 24 Nov 2013 17:54:47 +0100 Subject: [PATCH 185/475] missing functions file in scripts --- ZFitter/script/functions.sh | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 ZFitter/script/functions.sh diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh new file mode 100644 index 00000000000..cc35076eddb --- /dev/null +++ b/ZFitter/script/functions.sh @@ -0,0 +1,49 @@ +puName(){ + ## pileup reweight name + # $1 = configFile + if [ -z "$puName" ];then + puCount=`grep -v '#' $1 | grep 'pileupHist' | grep '^d' | cut -f 3 |wc -l` + if [ "${puCount}" == "0" ];then + echo "[ERROR] No or too mani pileupHist files for data" + exit 1 + fi + puFiles=`grep -v '#' $1 | grep 'pileupHist' | grep '^d' | cut -f 3` + + for puFile in $puFiles + do + puNames="${puNames} `basename $puFile .root | sed 's|\..*||;s|\([0-9]*-[0-9]*\)-\(.*\)|\1 json_\2|'`" + done + puNames=`echo $puNames | sed 's| |\n|g' | sort | uniq | sed 's|json_||;'` + puName=`echo $puNames | sed 's| |_|g'` + #echo $puFile + #puName=`basename $puFile .root | sed 's|\..*||'` + #puName=`echo $puName | sed 's|^_||'` + #echo $puName + fi +} + +mcName(){ + ## MC name + # $1 = configFile + if [ -z "${mcName}" ];then + mcCount=`grep -v '#' $1 | grep 'selected' | grep '^s' | cut -f 3 |wc -l` + + mcTags=`grep -v '#' $1 | grep 'selected' | grep '^s' | cut -f 1 | sort | uniq` + for mcTag in ${mcTags} + do + mcFiles=`grep -v '#' $1 | grep 'selected' | grep "^${mcTags}" | cut -f 3` + for mcFile in $mcFiles + do + mcName=`basename $mcFile | sed 's|\(.*\)-\([0-9]*-[0-9]*\).root|\1 \2|;s|\(.*\)-\(allRange\).root|\1 \2|'` + extraName=`dirname $mcFile` + extraName=`basename $extraName` + mcNames="$mcNames $mcName $extraName" + #echo "---> " $mcFile $mcName $extraName + + done + done + mcNames=`echo $mcNames | sed 's| |\n|g;' | sort -r | uniq | sed '/^[0-9][^T]/d'` + mcName=`echo $mcNames | sort | uniq | sed 's| |_|g;s|^_||'` + # echo $mcName + fi +} From 9d1c084f4dfbd2680a36d18195885ca077016883 Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 24 Nov 2013 17:55:54 +0100 Subject: [PATCH 186/475] work in progress --- ZFitter/Makefile | 8 +- ZFitter/bin/ZFitter.cpp | 66 +-- ZFitter/data/validation/test.dat | 35 +- ZFitter/interface/RooMinimizer.hh | 125 ----- ZFitter/script/energyScale.sh | 206 ++++--- ZFitter/src/RooMinimizer.cxx | 888 ------------------------------ ZFitter/src/nllProfile.cc | 5 +- 7 files changed, 152 insertions(+), 1181 deletions(-) delete mode 100644 ZFitter/interface/RooMinimizer.hh delete mode 100644 ZFitter/src/RooMinimizer.cxx diff --git a/ZFitter/Makefile b/ZFitter/Makefile index d5683aba4f3..a3d3e4e3ffc 100644 --- a/ZFitter/Makefile +++ b/ZFitter/Makefile @@ -115,10 +115,6 @@ $(OBJ_DIR)/TestProposal.o: $(SRC)/TestProposal.cc $(INCLUDEDIR)/TestProposal.h @echo "--> Making class: TestProposal" @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/TestProposal.o $(SRC)/TestProposal.cc -RooMinimizer: $(OBJ_DIR)/RooMinimizer.o -$(OBJ_DIR)/RooMinimizer.o: $(SRC)/RooMinimizer.cxx $(INCLUDEDIR)/RooMinimizer.hh - @echo "--> Making class: RooMinimizer" - @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/RooMinimizer.o $(SRC)/RooMinimizer.cxx #------------------------------ PRINCIPLE CLASS @@ -136,7 +132,7 @@ ciao: @echo "$(ROOFIT_LIB)" @echo "$(ROOFIT_INCLUDE)" -$(BUILDDIR)/test.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o $(OBJ_DIR)/RooMinimizer.o +$(BUILDDIR)/test.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o @echo "---> Making Test ZFitter" @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) $(ROOT_FLAGS) \ -o $(BUILDDIR)/test.exe $(BUILDDIR)/ZFitter.cpp -lboost_program_options -lTreePlayer \ @@ -150,7 +146,7 @@ $(BUILDDIR)/test.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR) ZFitter.exe: $(BUILDDIR)/ZFitter.exe -$(BUILDDIR)/ZFitter.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o $(OBJ_DIR)/RooMinimizer.o +$(BUILDDIR)/ZFitter.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o @echo "---> Making ZFitter" @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) $(ROOT_FLAGS) \ -o $(BUILDDIR)/ZFitter.exe $(BUILDDIR)/ZFitter.cpp -lboost_program_options -lTreePlayer \ diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 3ba7d2c4325..c1bcb0c8bfb 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -33,7 +33,6 @@ #include #include "Math/Minimizer.h" -#include "../interface/RooMinimizer.hh" #include #include @@ -101,11 +100,9 @@ void UpdateFriends(tag_chain_map_t& tagChainMap, TString regionsFileNameTag){ if(chain_itr->first!="selected"){ if(chain->GetFriend(chain_itr->first)==NULL){ - if(!chain_itr->first.Contains("smearerCat") || (chain_itr->first.Contains("smearerCat") && chain_itr->first.Contains(regionsFileNameTag))){ std::cout << "[STATUS] Adding friend branch: " << chain_itr->first << " to tag " << tag_chain_itr->first << std::endl; chain->AddFriend(chain_itr->second); - } } // already added } chain_itr->second->GetEntries(); @@ -474,7 +471,14 @@ int main(int argc, char **argv) { //if (tag.Contains("d") && corrEleFile.empty()) corrEleFile=fileName; //continue; //} - + + if(chainName.Contains("scaleEle")){ + if(chainName!="scaleEle_"+corrEleType) continue; + } + if(chainName.Contains("smearerCat")){ + if(chainName!="smearerCat_"+regionsFileNameTag) continue; + } + if(!tagChainMap.count(tag)){ #ifdef DEBUG std::cout << "[DEBUG] Create new tag map for tag: " << tag << std::endl; @@ -482,7 +486,7 @@ int main(int argc, char **argv) { std::pair pair_tmp(tag,chain_map_t()); // make_pair not work with scram b tagChainMap.insert(pair_tmp); } - + if(!tagChainMap[tag].count(chainName)){ std::pair pair_tmp(chainName, new TChain(chainName)); (tagChainMap[tag]).insert(pair_tmp); @@ -513,7 +517,7 @@ int main(int argc, char **argv) { } } - + return 0; ///------------------------------ to obtain run ranges if(vm.count("runDivide")){ @@ -1036,52 +1040,6 @@ int main(int argc, char **argv) { m.fit(""); //m.migrad(); //m.hesse(); - } else if(minimType=="shervinDNA"){ - RooArgList argList_(args); - TIterator *it_ = argList_.createIterator(); - for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ - if (var->isConstant() || !var->isLValue()) continue; - TString name(var->GetName()); - if(!name.Contains("scale")) var->setConstant(); - } - MinimizationProfile(smearer, args, nIter); - delete it_; - it_ = argList_.createIterator(); - for(RooRealVar *var = (RooRealVar*)it_->Next(); var != NULL; var = (RooRealVar*)it_->Next()){ - if (!var->isLValue()) continue; - TString name(var->GetName()); - if(!name.Contains("scale")) var->setConstant(kFALSE); - else var->setConstant(); - } - - - args.writeToStream(std::cout, kFALSE); - RooMinimizer m(smearer); - m._theFitter->Config().SetMinimizer("Genetic","Genetic"); - m.setEps(100); // default tolerance - m._theFitter->Config().MinimizerOptions().SetTolerance(2e-5); - // default max number of calls - m._theFitter->Config().MinimizerOptions().SetMaxIterations(50); - m._theFitter->Config().MinimizerOptions().SetMaxFunctionCalls(10); - //m.setVerbose(); - m.setPrintLevel(4); - m.minimize("Genetic","Genetic"); - - } else if(minimType=="genetic"){ - RooMinimizer m(smearer); - //m.setMinimizerType("genetic"); - m._theFitter->Config().SetMinimizer("Genetic","Genetic"); - m.setEps(100); // default tolerance - m._theFitter->Config().MinimizerOptions().SetTolerance(2e-5); - // default max number of calls - m._theFitter->Config().MinimizerOptions().SetMaxIterations(10); - m._theFitter->Config().MinimizerOptions().SetMaxFunctionCalls(10); - // m.setErrorLevel(0.1); - //m.setVerbose(); - m.setPrintLevel(4); - m.minimize("Genetic","Genetic"); - - //fitres = m.save(); } else if(minimType=="profile"){ MinimizationProfile(smearer, args, nIter); args.writeToStream(std::cout, kFALSE); @@ -1156,7 +1114,6 @@ int main(int argc, char **argv) { } if(vm.count("profileOnly") || !vm.count("plotOnly")){ - Int_t oldMarkovSize=smearer._markov.Size(); //if(vm.count("profileOnly") && !vm.count("runToy")) smearer.SetNSmear(10); std::cout <<"==================PROFILE=================="<Close(); } diff --git a/ZFitter/data/validation/test.dat b/ZFitter/data/validation/test.dat index 1a6a7af7097..1c684261eaa 100644 --- a/ZFitter/data/validation/test.dat +++ b/ZFitter/data/validation/test.dat @@ -1,36 +1,5 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9Shift/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9Shift/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9Shift/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root -##### Powheg -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegressionNoR9Shift/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegressionNoR9Shift/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegressionNoR9Shift/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root -##### Sherpa -#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -#s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root -########### Data -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root -d selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22Jan-v1/semiParamRegression/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root -########### Friend trees -##### PU histograms -d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root -d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/198022-203742-22Jan_v1.69300.true.root -d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777-208686-22Jan_v1.69300.true.root -s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root -s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root -s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root -#s pileup mcPUtree_powheg.root -##### PU trees -#s pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree-runDepMC-RUN2012ABCD.root -##### Scale correction trees -#d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root -##### Smearer category trees -#d smearerCat_d smearerCat_data-scaleStep2smearing_8.root -#s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root - +d1 scaleEle_HggRunEta ciao.root +d1 smearerCat_validation data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root diff --git a/ZFitter/interface/RooMinimizer.hh b/ZFitter/interface/RooMinimizer.hh deleted file mode 100644 index a90f96bead4..00000000000 --- a/ZFitter/interface/RooMinimizer.hh +++ /dev/null @@ -1,125 +0,0 @@ -/***************************************************************************** - * Project: RooFit * - * Package: RooFitCore * - * File: $Id$ - * Authors: * - * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * - * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * - * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it * - * * - * * - * Redistribution and use in source and binary forms, * - * with or without modification, are permitted according to the terms * - * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * - *****************************************************************************/ - -#ifndef __ROOFIT_NOROOMINIMIZER - -#ifndef ROO_MINIMIZER -#define ROO_MINIMIZER - -#include "TObject.h" -#include "TStopwatch.h" -#include -#include "TMatrixDSymfwd.h" - - -#include "Fit/Fitter.h" -#include "RooMinimizerFcn.h" - -class RooAbsReal ; -class RooFitResult ; -class RooArgList ; -class RooRealVar ; -class RooArgSet ; -class TH2F ; -class RooPlot ; - -class RooMinimizer : public TObject { -public: - - RooMinimizer(RooAbsReal& function) ; - virtual ~RooMinimizer() ; - - enum Strategy { Speed=0, Balance=1, Robustness=2 } ; - enum PrintLevel { None=-1, Reduced=0, Normal=1, ExtraForProblem=2, Maximum=3 } ; - void setStrategy(Int_t strat) ; - void setErrorLevel(Double_t level) ; - void setEps(Double_t eps) ; - void optimizeConst(Int_t flag) ; - void setEvalErrorWall(Bool_t flag) { _fcn->SetEvalErrorWall(flag); } - void setOffsetting(Bool_t flag) ; - - RooFitResult* fit(const char* options) ; - - Int_t migrad() ; - Int_t hesse() ; - Int_t minos() ; - Int_t minos(const RooArgSet& minosParamList) ; - Int_t seek() ; - Int_t simplex() ; - Int_t improve() ; - - Int_t minimize(const char* type, const char* alg=0) ; - - RooFitResult* save(const char* name=0, const char* title=0) ; - RooPlot* contour(RooRealVar& var1, RooRealVar& var2, - Double_t n1=1, Double_t n2=2, Double_t n3=0, - Double_t n4=0, Double_t n5=0, Double_t n6=0) ; - - Int_t setPrintLevel(Int_t newLevel) ; - void setPrintEvalErrors(Int_t numEvalErrors) { _fcn->SetPrintEvalErrors(numEvalErrors); } - void setVerbose(Bool_t flag=kTRUE) { _verbose = flag ; _fcn->SetVerbose(flag); } - void setProfile(Bool_t flag=kTRUE) { _profile = flag ; } - Bool_t setLogFile(const char* logf=0) { return _fcn->SetLogFile(logf); } - - void setMinimizerType(const char* type) ; - - static void cleanup() ; - static RooFitResult* lastMinuitFit(const RooArgList& varList=RooArgList()) ; - - void saveStatus(const char* label, Int_t status) { _statusHistory.push_back(std::pair(label,status)) ; } - - static ROOT::Fit::Fitter *_theFitter ; - -protected: - - friend class RooAbsPdf ; - void applyCovarianceMatrix(TMatrixDSym& V) ; - - void profileStart() ; - void profileStop() ; - - inline Int_t getNPar() const { return _fcn->NDim() ; } - inline std::ofstream* logfile() const { return _fcn->GetLogFile(); } - inline Double_t& maxFCN() { return _fcn->GetMaxFCN() ; } - -private: - - Int_t _printLevel ; - Int_t _status ; - Bool_t _optConst ; - Bool_t _profile ; - RooAbsReal* _func ; - - Bool_t _verbose ; - TStopwatch _timer ; - TStopwatch _cumulTimer ; - Bool_t _profileStart ; - - TMatrixDSym* _extV ; - - RooMinimizerFcn *_fcn; - std::string _minimizerType; - - - std::vector > _statusHistory ; - - RooMinimizer(const RooMinimizer&) ; - - ClassDef(RooMinimizer,0) // RooFit interface to ROOT::Fit::Fitter -} ; - - -#endif -#endif diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index d892942f2c5..76550db8f22 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -150,99 +150,163 @@ outDirTable=${outDirData}/table if [ ! -e "${outDirData}/table" ];then mkdir ${outDirData}/table -p; fi if [ ! -e "${outDirData}/log" ];then mkdir ${outDirData}/log -p; fi -# command="./bin/ZFitter.exe -f ${configFile} --runRangesFile ${runRangesFile} -# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut $commonCut -# --outDirFitResMC=${outDirMC}/${STEP}/fitres --outDirFitResData=${outDirData}/${STEP}/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log//step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.log || exit 1 -# " -# --regionsFile ${regionFile} if [ -n "${STEP1}" ];then + # runNumber x eta with fitMethod regionFile=data/regions/scaleStep1.dat - - if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi - if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/fitres" ];then mkdir ${outDirData}/fitres -p; fi - if [ ! -e "${outDirData}/img" ];then mkdir ${outDirData}/img -p; fi + outFile=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat + if [ ! -e "${outDirTable}/${outFile}" ];then + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/fitres" ];then mkdir ${outDirData}/fitres -p; fi + if [ ! -e "${outDirData}/img" ];then mkdir ${outDirData}/img -p; fi + + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut $commonCut \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img \ + > ${outDirData}/log/`basename ${outFile} .dat`.log || exit 1 + + ./script/makeTable.sh --regionsFile ${regionFile} --runRangesFile ${runRangesFile} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ + > ${outDirTable}/`basename ${outFile} .dat`.tex + + ./script/tex2txt.sh ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.tex | awk -F "\t" -f awk/recalibOutput.awk |grep -v '^%' > ${outFile} - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut $commonCut \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log//step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.log || exit 1 - - ./script/makeTable.sh --regionsFile ${regionFile} --runRangesFile ${runRangesFile} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ - > ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.tex - - ./script/tex2txt.sh ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.tex | awk -F "\t" -f awk/recalibOutput.awk |grep -v '^%' > ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat -fi -echo "DONE WITH STEP 1 =========================" -if [ -n "${STEP2FIT}" ];then + #save root files with step1 corrections + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --corrEleType HggRunEta \ + --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat + + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step1/ + echo "[STATUS] Step 1 done" + else + echo "[STATUS] Step 1 already done" + fi +fi - regionFile=data/regions/scaleStep2.dat - if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi - if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step2/fitres" ];then mkdir ${outDirData}/step2/fitres -p; fi - if [ ! -e "${outDirData}/step2/img" ];then mkdir ${outDirData}/step2/img -p; fi +if [ -n "${STEP2FIT}" ];then + #eta x R9 with fit method + regionFile=data/regions/scaleStep2.dat + outFile=step2fit-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ - --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat > ${outDirData}/log/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + if [ ! -e "${outDirTable}/${outFile}" ];then - ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres > ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 - cut -d '&' -f 1-5 ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex | sed "s|-$commonCut||" > tmp/s.tex - ./script/CalcResCorrection.sh tmp/s.tex > tmp/res_corr.dat + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step2/fitres" ];then mkdir ${outDirData}/step2/fitres -p; fi + if [ ! -e "${outDirData}/step2/img" ];then mkdir ${outDirData}/step2/img -p; fi + + # this way I do not reproduce the ntuples with the corrections any time + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` + + ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ + > ${outDirData}/log/`basename $outFile .dat`.log || exit 1 + + ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ + > ${outDirTable}/`basename $outFile .dat`.tex || exit 1 + + cut -d '&' -f 1-5 ${outDirTable}/${outFile} | sed "s|-$commonCut||" > tmp/s.tex + ./script/CalcResCorrection.sh tmp/s.tex > tmp/res_corr.dat - ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |grep -v '#' > ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat \ + --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ + | grep -v '#' > ${outDirTable}/${outFile} # ./script/makeCorrVsRunNumber.py -l -c --file2=res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - cat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - + cat ${outDirTable}/${outFile} | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + + fi fi if [ -n "${STEP2}" ];then -# extension="_0.8bad" -# extension="_factorized" - if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi - if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step2${extension}/fitres" ];then mkdir ${outDirData}/step2${extension}/fitres -p; fi - if [ ! -e "${outDirData}/step2${extension}/img" ];then mkdir ${outDirData}/step2${extension}/img -p; fi - -# regionFile=data/regions/scaleStep2smearing_9.dat -# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ -# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2${extension}/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2${extension}/img \ -# --smearerFit --constTermFix --alphaGoldFix \ -# --corrEleType HggRunEta \ -# --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ -# --nSmearToy=10 --autoBin --profileOnly \ -# --initFile=${outDirTable}/step2-initFile.dat \ -# --addBranch=smearerCat #> ${outDirData}/log/step2${extension}smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 -# # --initFile=${outDirData}/step2/fitres/params-scaleStep2${extension}smearing_8-${commonCut}.txt \ - -# exit 0 + #eta x R9 with fit method regionFile=data/regions/scaleStep2smearing_1.dat - if [ -e "${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt" ];then - initFile="--initFile=${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt"; - else - initFile="" + outFile=step2fit-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + + outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat + if [ ! -e "${outDirTable}/${outFileStep1}" ];then + echo "[ERROR] Impossible to run step2 without step1" >> /dev/stderr + exit 1 fi - echo $initFile -time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ + + if [ ! -e "${outDirTable}/${outFile}" ];then + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step2${extension}/fitres" ];then mkdir ${outDirData}/step2${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step2${extension}/img" ];then mkdir ${outDirData}/step2${extension}/img -p; fi + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` + + if [ -e "${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt"; + else + initFile="" + fi + + tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep [s,d][1-9]` + for tag in $tags + do + + if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --addBranch=smearerCat + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/ || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionsFile .dat`\tdata/smearerCat/smearerCat_${tag}-`basename $configFile .dat`.root" >> $configFile + fi + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $configFile .dat`\tdat${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` + + d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root + + done + + + for index in `seq 1 50` + do + mkdir ${outDirData}/step2/${index}/fitres/ -p + mkdir ${outDirData}/step2/${index}/img -p + bsub -q 2nd \ + -oo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stdout.log \ + -eo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stderr.log \ + -J "`basename $regionFile .dat` step2" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFile} \ +$isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +--outDirFitResMC=${outDirMC}/fitres +--outDirImgMC=${outDirMC}/img +--outDirImgData=${outDirData}/step2/${index}/img/ +--outDirFitResData=${outDirData}/step2/${index}/fitres +--constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} || exit 1" + done + exit 0 + + + + time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ - --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ - $initFile > ${outDirData}/log/step2smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ + --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ + $initFile > # cp ${outDirData}/step2/fitres/params-${regionFile}-${commonCut}.txt ${outDirData}/step2/fitres/step2smearing_1.txt # cp ${outDirData}/step2/fitres/histos-${regionFile}-${commonCut}.root ${outDirData}/step2/fitres/histos_step2smearing_1.root diff --git a/ZFitter/src/RooMinimizer.cxx b/ZFitter/src/RooMinimizer.cxx deleted file mode 100644 index 75ecb2f750e..00000000000 --- a/ZFitter/src/RooMinimizer.cxx +++ /dev/null @@ -1,888 +0,0 @@ -/***************************************************************************** - * Project: RooFit * - * Package: RooFitCore * - * @(#)root/roofitcore:$Id$ - * Authors: * - * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * - * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * - * AL, Alfio Lazzaro, INFN Milan, alfio.lazzaro@mi.infn.it * - * * - * Redistribution and use in source and binary forms, * - * with or without modification, are permitted according to the terms * - * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * - *****************************************************************************/ - -////////////////////////////////////////////////////////////////////////////// -// -// BEGIN_HTML -// RooMinimizer is a wrapper class around ROOT::Fit:Fitter that -// provides a seamless interface between the minimizer functionality -// and the native RooFit interface. -//

-// By default the Minimizer is MINUIT. -//

-// RooMinimizer can minimize any RooAbsReal function with respect to -// its parameters. Usual choices for minimization are RooNLLVar -// and RooChi2Var -//

-// RooMinimizer has methods corresponding to MINUIT functions like -// hesse(), migrad(), minos() etc. In each of these function calls -// the state of the MINUIT engine is synchronized with the state -// of the RooFit variables: any change in variables, change -// in the constant status etc is forwarded to MINUIT prior to -// execution of the MINUIT call. Afterwards the RooFit objects -// are resynchronized with the output state of MINUIT: changes -// parameter values, errors are propagated. -//

-// Various methods are available to control verbosity, profiling, -// automatic PDF optimization. -// END_HTML -// - -#ifndef __ROOFIT_NOROOMINIMIZER - -#include "RooFit.h" -#include "Riostream.h" - -#include "TClass.h" - -#include -#include - -#include "TH1.h" -#include "TH2.h" -#include "TMarker.h" -#include "TGraph.h" -#include "TStopwatch.h" -#include "TDirectory.h" -#include "TMatrixDSym.h" - -#include "RooArgSet.h" -#include "RooArgList.h" -#include "RooAbsReal.h" -#include "RooAbsRealLValue.h" -#include "RooRealVar.h" -#include "RooAbsPdf.h" -#include "RooSentinel.h" -#include "RooMsgService.h" -#include "RooPlot.h" - - -#include "../interface/RooMinimizer.hh" -#include "RooFitResult.h" - -#include "Math/Minimizer.h" - -#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3) -char* operator+( streampos&, char* ); -#endif - -using namespace std; - -ClassImp(RooMinimizer) -; - -ROOT::Fit::Fitter *RooMinimizer::_theFitter = 0 ; - - - -//_____________________________________________________________________________ -void RooMinimizer::cleanup() -{ - // Cleanup method called by atexit handler installed by RooSentinel - // to delete all global heap objects when the program is terminated - if (_theFitter) { - delete _theFitter ; - _theFitter =0 ; - } -} - - - -//_____________________________________________________________________________ -RooMinimizer::RooMinimizer(RooAbsReal& function) -{ - // Construct MINUIT interface to given function. Function can be anything, - // but is typically a -log(likelihood) implemented by RooNLLVar or a chi^2 - // (implemented by RooChi2Var). Other frequent use cases are a RooAddition - // of a RooNLLVar plus a penalty or constraint term. This class propagates - // all RooFit information (floating parameters, their values and errors) - // to MINUIT before each MINUIT call and propagates all MINUIT information - // back to the RooFit object at the end of each call (updated parameter - // values, their (asymmetric errors) etc. The default MINUIT error level - // for HESSE and MINOS error analysis is taken from the defaultErrorLevel() - // value of the input function. - - RooSentinel::activate() ; - - // Store function reference - _extV = 0 ; - _func = &function ; - _optConst = kFALSE ; - _verbose = kFALSE ; - _profile = kFALSE ; - _profileStart = kFALSE ; - _printLevel = 1 ; - _minimizerType = "Minuit"; // default minimizer - - if (_theFitter) delete _theFitter ; - _theFitter = new ROOT::Fit::Fitter; - _fcn = new RooMinimizerFcn(_func,this,_verbose); - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - setEps(1.0); // default tolerance - // default max number of calls - _theFitter->Config().MinimizerOptions().SetMaxIterations(500*_fcn->NDim()); - _theFitter->Config().MinimizerOptions().SetMaxFunctionCalls(500*_fcn->NDim()); - - // Shut up for now - setPrintLevel(-1) ; - - // Use +0.5 for 1-sigma errors - setErrorLevel(_func->defaultErrorLevel()) ; - - // Declare our parameters to MINUIT - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - - // Now set default verbosity - if (RooMsgService::instance().silentMode()) { - setPrintLevel(-1) ; - } else { - setPrintLevel(1) ; - } -} - - - -//_____________________________________________________________________________ -RooMinimizer::~RooMinimizer() -{ - // Destructor - - if (_extV) { - delete _extV ; - } - - if (_fcn) { - delete _fcn; - } - -} - - - -//_____________________________________________________________________________ -void RooMinimizer::setStrategy(Int_t istrat) -{ - // Change MINUIT strategy to istrat. Accepted codes - // are 0,1,2 and represent MINUIT strategies for dealing - // most efficiently with fast FCNs (0), expensive FCNs (2) - // and 'intermediate' FCNs (1) - - _theFitter->Config().MinimizerOptions().SetStrategy(istrat); - -} - - - -//_____________________________________________________________________________ -void RooMinimizer::setErrorLevel(Double_t level) -{ - // Set the level for MINUIT error analysis to the given - // value. This function overrides the default value - // that is taken in the RooMinimizer constructor from - // the defaultErrorLevel() method of the input function - - _theFitter->Config().MinimizerOptions().SetErrorDef(level); - -} - - - -//_____________________________________________________________________________ -void RooMinimizer::setEps(Double_t eps) -{ - // Change MINUIT epsilon - - _theFitter->Config().MinimizerOptions().SetTolerance(eps); - -} - - -//_____________________________________________________________________________ -void RooMinimizer::setOffsetting(Bool_t flag) -{ - // Enable internal likelihood offsetting for enhanced numeric precision - //_func->enableOffsetting(flag) ; -} - - - - -//_____________________________________________________________________________ -void RooMinimizer::setMinimizerType(const char* type) -{ - // Choose the minimzer algorithm. - _minimizerType = type; -} - - - - -//_____________________________________________________________________________ -RooFitResult* RooMinimizer::fit(const char* options) -{ - // Parse traditional RooAbsPdf::fitTo driver options - // - // m - Run Migrad only - // h - Run Hesse to estimate errors - // v - Verbose mode - // l - Log parameters after each Minuit steps to file - // t - Activate profile timer - // r - Save fit result - // 0 - Run Migrad with strategy 0 - - TString opts(options) ; - opts.ToLower() ; - - // Initial configuration - if (opts.Contains("v")) setVerbose(1) ; - if (opts.Contains("t")) setProfile(1) ; - if (opts.Contains("l")) setLogFile(Form("%s.log",_func->GetName())) ; - if (opts.Contains("c")) optimizeConst(1) ; - - // Fitting steps - if (opts.Contains("0")) setStrategy(0) ; - migrad() ; - if (opts.Contains("0")) setStrategy(1) ; - if (opts.Contains("h")||!opts.Contains("m")) hesse() ; - if (!opts.Contains("m")) minos() ; - - return (opts.Contains("r")) ? save() : 0 ; -} - - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::minimize(const char* type, const char* alg) -{ - std::cout << "Hacker Shervin in action" << std::endl; - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - - // _theFitter->Config().SetMinimizer(type,alg); - - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MINIMIZE",_status) ; - - return _status ; -} - - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::migrad() -{ - // Execute MIGRAD. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"migrad"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MIGRAD",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::hesse() -{ - // Execute HESSE. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::hesse: Error, run Migrad before Hesse!" - << endl ; - _status = -1; - } - else { - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - bool ret = _theFitter->CalculateHessErrors(); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("HESSE",_status) ; - - } - - return _status ; - -} - -//_____________________________________________________________________________ -Int_t RooMinimizer::minos() -{ - // Execute MINOS. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::minos: Error, run Migrad before Minos!" - << endl ; - _status = -1; - } - else { - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - bool ret = _theFitter->CalculateMinosErrors(); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MINOS",_status) ; - - } - - return _status ; - -} - - -//_____________________________________________________________________________ -Int_t RooMinimizer::minos(const RooArgSet& minosParamList) -{ - // Execute MINOS for given list of parameters. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::minos: Error, run Migrad before Minos!" - << endl ; - _status = -1; - } - else if (minosParamList.getSize()>0) { - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - // get list of parameters for Minos - TIterator* aIter = minosParamList.createIterator() ; - RooAbsArg* arg ; - std::vector paramInd; - while((arg=(RooAbsArg*)aIter->Next())) { - RooAbsArg* par = _fcn->GetFloatParamList()->find(arg->GetName()); - if (par && !par->isConstant()) { - Int_t index = _fcn->GetFloatParamList()->index(par); - paramInd.push_back(index); - } - } - delete aIter ; - - if (paramInd.size()) { - // set the parameter indeces - _theFitter->Config().SetMinosErrors(paramInd); - - _theFitter->Config().SetMinimizer(_minimizerType.c_str()); - bool ret = _theFitter->CalculateMinosErrors(); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - } - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("MINOS",_status) ; - - } - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::seek() -{ - // Execute SEEK. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"seek"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("SEEK",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::simplex() -{ - // Execute SIMPLEX. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"simplex"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("SEEK",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::improve() -{ - // Execute IMPROVE. Changes in parameter values - // and calculated errors are automatically - // propagated back the RooRealVars representing - // the floating parameters in the MINUIT operation - - _fcn->Synchronize(_theFitter->Config().ParamsSettings(), - _optConst,_verbose) ; - profileStart() ; - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - RooAbsReal::clearEvalErrorLog() ; - - _theFitter->Config().SetMinimizer(_minimizerType.c_str(),"migradimproved"); - bool ret = _theFitter->FitFCN(*_fcn); - _status = ((ret) ? _theFitter->Result().Status() : -1); - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - profileStop() ; - _fcn->BackProp(_theFitter->Result()); - - saveStatus("IMPROVE",_status) ; - - return _status ; -} - - - -//_____________________________________________________________________________ -Int_t RooMinimizer::setPrintLevel(Int_t newLevel) -{ - // Change the MINUIT internal printing level - - Int_t ret = _printLevel ; - _theFitter->Config().MinimizerOptions().SetPrintLevel(newLevel+1); - _printLevel = newLevel+1 ; - return ret ; -} - -//_____________________________________________________________________________ -void RooMinimizer::optimizeConst(Int_t flag) -{ - // If flag is true, perform constant term optimization on - // function being minimized. - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::CollectErrors) ; - - if (_optConst && !flag){ - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: deactivating const optimization" << endl ; - _func->constOptimizeTestStatistic(RooAbsArg::DeActivate) ; - _optConst = flag ; - } else if (!_optConst && flag) { - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: activating const optimization" << endl ; - _func->constOptimizeTestStatistic(RooAbsArg::Activate,flag>1) ; - _optConst = flag ; - } else if (_optConst && flag) { - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: const optimization already active" << endl ; - } else { - if (_printLevel>-1) coutI(Minimization) << "RooMinimizer::optimizeConst: const optimization wasn't active" << endl ; - } - - RooAbsReal::setEvalErrorLoggingMode(RooAbsReal::PrintErrors) ; - -} - - - -//_____________________________________________________________________________ -RooFitResult* RooMinimizer::save(const char* userName, const char* userTitle) -{ - // Save and return a RooFitResult snaphot of current minimizer status. - // This snapshot contains the values of all constant parameters, - // the value of all floating parameters at RooMinimizer construction and - // after the last MINUIT operation, the MINUIT status, variance quality, - // EDM setting, number of calls with evaluation problems, the minimized - // function value and the full correlation matrix - - if (_theFitter->GetMinimizer()==0) { - coutW(Minimization) << "RooMinimizer::save: Error, run minimization before!" - << endl ; - return 0; - } - - TString name,title ; - name = userName ? userName : Form("%s", _func->GetName()) ; - title = userTitle ? userTitle : Form("%s", _func->GetTitle()) ; - RooFitResult* fitRes = new RooFitResult(name,title) ; - - // Move eventual fixed parameters in floatList to constList - Int_t i ; - RooArgList saveConstList(*(_fcn->GetConstParamList())) ; - RooArgList saveFloatInitList(*(_fcn->GetInitFloatParamList())) ; - RooArgList saveFloatFinalList(*(_fcn->GetFloatParamList())) ; - for (i=0 ; i<_fcn->GetFloatParamList()->getSize() ; i++) { - RooAbsArg* par = _fcn->GetFloatParamList()->at(i) ; - if (par->isConstant()) { - saveFloatInitList.remove(*saveFloatInitList.find(par->GetName()),kTRUE) ; - saveFloatFinalList.remove(*par) ; - saveConstList.add(*par) ; - } - } - saveConstList.sort() ; - - fitRes->setConstParList(saveConstList) ; - fitRes->setInitParList(saveFloatInitList) ; - - fitRes->setStatus(_status) ; - fitRes->setCovQual(_theFitter->GetMinimizer()->CovMatrixStatus()) ; - fitRes->setMinNLL(_theFitter->Result().MinFcnValue()) ; - fitRes->setNumInvalidNLL(_fcn->GetNumInvalidNLL()) ; - fitRes->setEDM(_theFitter->Result().Edm()) ; - fitRes->setFinalParList(saveFloatFinalList) ; - if (!_extV) { - std::vector globalCC; - TMatrixDSym corrs(_theFitter->Result().Parameters().size()) ; - TMatrixDSym covs(_theFitter->Result().Parameters().size()) ; - for (UInt_t ic=0; ic<_theFitter->Result().Parameters().size(); ic++) { - globalCC.push_back(_theFitter->Result().GlobalCC(ic)); - for (UInt_t ii=0; ii<_theFitter->Result().Parameters().size(); ii++) { - corrs(ic,ii) = _theFitter->Result().Correlation(ic,ii); - covs(ic,ii) = _theFitter->Result().CovMatrix(ic,ii); - } - } - fitRes->fillCorrMatrix(globalCC,corrs,covs) ; - } else { - fitRes->setCovarianceMatrix(*_extV) ; - } - - fitRes->setStatusHistory(_statusHistory) ; - - return fitRes ; - -} - -//_____________________________________________________________________________ -RooPlot* RooMinimizer::contour(RooRealVar& var1, RooRealVar& var2, - Double_t n1, Double_t n2, Double_t n3, - Double_t n4, Double_t n5, Double_t n6) -{ - // Create and draw a TH2 with the error contours in parameters var1 and v2 at up to 6 'sigma' settings - // where 'sigma' is calculated as n*n*errorLevel - - RooArgList* params = _fcn->GetFloatParamList() ; - RooArgList* paramSave = (RooArgList*) params->snapshot() ; - - // Verify that both variables are floating parameters of PDF - Int_t index1= _fcn->GetFloatParamList()->index(&var1); - if(index1 < 0) { - coutE(Minimization) << "RooMinimizer::contour(" << GetName() - << ") ERROR: " << var1.GetName() - << " is not a floating parameter of " - << _func->GetName() << endl ; - return 0; - } - - Int_t index2= _fcn->GetFloatParamList()->index(&var2); - if(index2 < 0) { - coutE(Minimization) << "RooMinimizer::contour(" << GetName() - << ") ERROR: " << var2.GetName() - << " is not a floating parameter of PDF " - << _func->GetName() << endl ; - return 0; - } - - // create and draw a frame - RooPlot* frame = new RooPlot(var1,var2) ; - - // draw a point at the current parameter values - TMarker *point= new TMarker(var1.getVal(), var2.getVal(), 8); - frame->addObject(point) ; - - // remember our original value of ERRDEF - Double_t errdef= _theFitter->Config().MinimizerOptions().ErrorDef(); - - Double_t n[6] ; - n[0] = n1 ; n[1] = n2 ; n[2] = n3 ; n[3] = n4 ; n[4] = n5 ; n[5] = n6 ; - unsigned int npoints(50); - - for (Int_t ic = 0 ; ic<6 ; ic++) { - if(n[ic] > 0) { - // set the value corresponding to an n1-sigma contour - _theFitter->Config().MinimizerOptions().SetErrorDef(n[ic]*n[ic]*errdef); - - // calculate and draw the contour - Double_t *xcoor = new Double_t[npoints+1]; - Double_t *ycoor = new Double_t[npoints+1]; - bool ret = _theFitter->GetMinimizer()->Contour(index1,index2,npoints,xcoor,ycoor); - - if (!ret) { - coutE(Minimization) << "RooMinimizer::contour(" - << GetName() - << ") ERROR: MINUIT did not return a contour graph for n=" - << n[ic] << endl ; - } else { - xcoor[npoints] = xcoor[0]; - ycoor[npoints] = ycoor[0]; - TGraph* graph = new TGraph(npoints+1,xcoor,ycoor); - - graph->SetName(Form("contour_%s_n%f",_func->GetName(),n[ic])) ; - graph->SetLineStyle(ic+1) ; - graph->SetLineWidth(2) ; - graph->SetLineColor(kBlue) ; - frame->addObject(graph,"L") ; - } - - delete [] xcoor; - delete [] ycoor; - } - } - - - // restore the original ERRDEF - _theFitter->Config().MinimizerOptions().SetErrorDef(errdef); - - // restore parameter values - *params = *paramSave ; - delete paramSave ; - - return frame ; - -} - - -//_____________________________________________________________________________ -void RooMinimizer::profileStart() -{ - // Start profiling timer - if (_profile) { - _timer.Start() ; - _cumulTimer.Start(_profileStart?kFALSE:kTRUE) ; - _profileStart = kTRUE ; - } -} - - -//_____________________________________________________________________________ -void RooMinimizer::profileStop() -{ - // Stop profiling timer and report results of last session - if (_profile) { - _timer.Stop() ; - _cumulTimer.Stop() ; - coutI(Minimization) << "Command timer: " ; _timer.Print() ; - coutI(Minimization) << "Session timer: " ; _cumulTimer.Print() ; - } -} - - - - - -//_____________________________________________________________________________ -void RooMinimizer::applyCovarianceMatrix(TMatrixDSym& V) -{ - // Apply results of given external covariance matrix. i.e. propagate its errors - // to all RRV parameter representations and give this matrix instead of the - // HESSE matrix at the next save() call - - _extV = (TMatrixDSym*) V.Clone() ; - _fcn->ApplyCovarianceMatrix(*_extV); - -} - - - -RooFitResult* RooMinimizer::lastMinuitFit(const RooArgList& varList) -{ - // Import the results of the last fit performed, interpreting - // the fit parameters as the given varList of parameters. - - if (_theFitter==0 || _theFitter->GetMinimizer()==0) { - oocoutE((TObject*)0,InputArguments) << "RooMinimizer::save: Error, run minimization before!" - << endl ; - return 0; - } - - // Verify length of supplied varList - if (varList.getSize()>0 && varList.getSize()!=Int_t(_theFitter->Result().NTotalParameters())) { - oocoutE((TObject*)0,InputArguments) - << "RooMinimizer::lastMinuitFit: ERROR: supplied variable list must be either empty " << endl - << " or match the number of variables of the last fit (" - << _theFitter->Result().NTotalParameters() << ")" << endl ; - return 0 ; - } - - - // Verify that all members of varList are of type RooRealVar - TIterator* iter = varList.createIterator() ; - RooAbsArg* arg ; - while((arg=(RooAbsArg*)iter->Next())) { - if (!dynamic_cast(arg)) { - oocoutE((TObject*)0,InputArguments) << "RooMinimizer::lastMinuitFit: ERROR: variable '" - << arg->GetName() << "' is not of type RooRealVar" << endl ; - return 0 ; - } - } - delete iter ; - - RooFitResult* res = new RooFitResult("lastMinuitFit","Last MINUIT fit") ; - - // Extract names of fit parameters - // and construct corresponding RooRealVars - RooArgList constPars("constPars") ; - RooArgList floatPars("floatPars") ; - - UInt_t i ; - for (i = 0; i < _theFitter->Result().NTotalParameters(); ++i) { - - TString varName(_theFitter->Result().GetParameterName(i)); - Bool_t isConst(_theFitter->Result().IsParameterFixed(i)) ; - - Double_t xlo = _theFitter->Config().ParSettings(i).LowerLimit(); - Double_t xhi = _theFitter->Config().ParSettings(i).UpperLimit(); - Double_t xerr = _theFitter->Result().Error(i); - Double_t xval = _theFitter->Result().Value(i); - - RooRealVar* var ; - if (varList.getSize()==0) { - - if ((xlosetConstant(isConst) ; - } else { - - var = (RooRealVar*) varList.at(i)->Clone() ; - var->setConstant(isConst) ; - var->setVal(xval) ; - if (xlosetRange(xlo,xhi) ; - } - - if (varName.CompareTo(var->GetName())) { - oocoutI((TObject*)0,Eval) << "RooMinimizer::lastMinuitFit: fit parameter '" << varName - << "' stored in variable '" << var->GetName() << "'" << endl ; - } - - } - - if (isConst) { - constPars.addOwned(*var) ; - } else { - var->setError(xerr) ; - floatPars.addOwned(*var) ; - } - } - - res->setConstParList(constPars) ; - res->setInitParList(floatPars) ; - res->setFinalParList(floatPars) ; - res->setMinNLL(_theFitter->Result().MinFcnValue()) ; - res->setEDM(_theFitter->Result().Edm()) ; - res->setCovQual(_theFitter->GetMinimizer()->CovMatrixStatus()) ; - res->setStatus(_theFitter->Result().Status()) ; - std::vector globalCC; - TMatrixDSym corrs(_theFitter->Result().Parameters().size()) ; - TMatrixDSym covs(_theFitter->Result().Parameters().size()) ; - for (UInt_t ic=0; ic<_theFitter->Result().Parameters().size(); ic++) { - globalCC.push_back(_theFitter->Result().GlobalCC(ic)); - for (UInt_t ii=0; ii<_theFitter->Result().Parameters().size(); ii++) { - corrs(ic,ii) = _theFitter->Result().Correlation(ic,ii); - covs(ic,ii) = _theFitter->Result().CovMatrix(ic,ii); - } - } - res->fillCorrMatrix(globalCC,corrs,covs) ; - - return res; - -} - -#endif - diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 3f2b98168e8..d51b5b3eae8 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -356,6 +356,7 @@ TMatrixDSym* GetCovariance( RooStats::MarkovChain *chain, TString var1, TString return chain->GetAsDataSet()->covarianceMatrix(); } +#ifdef MCMC bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iProfile, Double_t min_old, Double_t& min, long unsigned int nIter, bool update=true){ Double_t chi2, chi2init=smearer.evaluate(); @@ -395,7 +396,7 @@ bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iPro } //running the mcmc - RooStats::MetropolisHastings MCMC(smearer, smearer.GetParams(), *(ph.GetProposalFunction()), nIter); + RooStats::MetropolisHastings MCMC(smearer, smearer.GetParams(), *(ph.GetProposalFunction()), (Int_t)nIter); MCMC.SetNumBurnInSteps(10); MCMC.SetSign(RooStats::MetropolisHastings::kNegative); MCMC.SetType(RooStats::MetropolisHastings::kLog); @@ -481,7 +482,7 @@ bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iPro return changed; } - +#endif void Smooth(TH2F *h, Int_t ntimes, Option_t *option) { From 82ea463f251fafb637ce2b13f4bb482167f91ff2 Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 24 Nov 2013 18:28:06 +0100 Subject: [PATCH 187/475] fixing step2 in script --- ZFitter/script/energyScale.sh | 52 ++++++++++++++++--------------- ZFitter/script/haddTGraph.sh | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 25 deletions(-) create mode 100755 ZFitter/script/haddTGraph.sh diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 76550db8f22..bd85a3da2dc 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -240,46 +240,39 @@ if [ -n "${STEP2}" ];then outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat if [ ! -e "${outDirTable}/${outFileStep1}" ];then echo "[ERROR] Impossible to run step2 without step1" >> /dev/stderr - exit 1 + #exit 1 fi - - if [ ! -e "${outDirTable}/${outFile}" ];then + if [ ! -e "${outDirTable}/${outFile}" ];then + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi if [ ! -e "${outDirData}/step2${extension}/fitres" ];then mkdir ${outDirData}/step2${extension}/fitres -p; fi if [ ! -e "${outDirData}/step2${extension}/img" ];then mkdir ${outDirData}/step2${extension}/img -p; fi - - # save the corrections in root files - # this way I do not reproduce the ntuples with the corrections any time - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` if [ -e "${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt" ];then initFile="--initFile=${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt"; else initFile="" fi - - tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep [s,d][1-9]` + + tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` for tag in $tags do - if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ --saveRootMacro \ - --addBranch=smearerCat - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/ || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionsFile .dat`\tdata/smearerCat/smearerCat_${tag}-`basename $configFile .dat`.root" >> $configFile + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFile .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFile .dat`\tdata/smearerCat/smearerCat_`basename $regionFile .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile fi - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $configFile .dat`\tdat${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` - - d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root - done - + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` + for index in `seq 1 50` do mkdir ${outDirData}/step2/${index}/fitres/ -p @@ -297,16 +290,24 @@ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResData=${outDirData}/step2/${index}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} || exit 1" done - exit 0 + + ./script/haddTGraph.sh -o ${outDirData}/step2/outProfile.root ${outDirData}/step2/*/fitres/10/outProfile*.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step2/outProfile.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C - - time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ + time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ - $initFile > +# $initFile > # cp ${outDirData}/step2/fitres/params-${regionFile}-${commonCut}.txt ${outDirData}/step2/fitres/step2smearing_1.txt # cp ${outDirData}/step2/fitres/histos-${regionFile}-${commonCut}.root ${outDirData}/step2/fitres/histos_step2smearing_1.root @@ -337,6 +338,7 @@ time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearer # cat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + fi fi diff --git a/ZFitter/script/haddTGraph.sh b/ZFitter/script/haddTGraph.sh new file mode 100755 index 00000000000..e0ddc922215 --- /dev/null +++ b/ZFitter/script/haddTGraph.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +usage(){ + echo "`basename $0` [options]" + echo " -o arg: output file" +} + + +# options may be followed by one colon to indicate they have a required argument +if ! options=$(getopt -u -o ho: -l help -- "$@") +then + # something went wrong, getopt will put out an error message for us + exit 1 +fi + +set -- $options + +while [ $# -gt 0 ] +do + case $1 in + -h|--help) usage; exit 0;; + -o) outputFile=$2;shift;; + (--) shift; break;; + (-*) usage; echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; + (*) break;; + esac + shift +done + + +echo "{" > tmp/haddFiles.C +echo "std::vector filenames;" >> tmp/haddFiles.C + +for file in $@ + do + if [ ! -r "${file}" ];then continue; fi + echo "filenames.push_back(\"$file\");" >> tmp/haddFiles.C +done + +echo "gROOT->ProcessLine(\".L macro/haddTGraph.C+\");" >> tmp/haddFiles.C +echo "haddTGraph(filenames, \"${outputFile}\");" >> tmp/haddFiles.C +echo "}" >> tmp/haddFiles.C + +root -l -b -q tmp/haddFiles.C + +exit 0 +######################################################33 +echo "{" > tmp/fitProfiles.C +echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C +#echo "FitProfile2(\"tmp/myFile.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C +echo "FitProfile2(\"tmp/myFile.root\",\"\",\"\",false,false,true);" >> tmp/fitProfiles.C +#echo "FitProfile2(\"tmp/myFile.root\",\"\",\"\",false,true,false);" >> tmp/fitProfiles.C +#echo "FitProfile2(\"tmp/myFile.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +#echo "propagate(\"tmp/out.out\",0);" >> tmp/fitProfiles.C +echo "}" >> tmp/fitProfiles.C + +root -l -b -q tmp/fitProfiles.C + From 7b266495e679bc890b54536704c9b8115dd43397 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 25 Nov 2013 08:12:54 +0100 Subject: [PATCH 188/475] forgot the macro to haddTGraph --- ZFitter/macro/haddTGraph.C | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ZFitter/macro/haddTGraph.C diff --git a/ZFitter/macro/haddTGraph.C b/ZFitter/macro/haddTGraph.C new file mode 100644 index 00000000000..b77d81eb025 --- /dev/null +++ b/ZFitter/macro/haddTGraph.C @@ -0,0 +1,38 @@ +#include +#include +#include +#include + +#include +#include + +void haddTGraph(std::vector filenames, TString outFileName){ + + TFile f_out(outFileName, "recreate"); + + for(std::vector::const_iterator f_itr = filenames.begin(); + f_itr != filenames.end(); + f_itr++){ + TFile f_in(*f_itr); + //f_in.Open(); + f_in.cd(); + + TList *KeyList = f_in.GetListOfKeys(); + for(int i =0; i < KeyList->GetEntries(); i++){ + TKey *currentKey=(TKey *)KeyList->At(i); + TString className=currentKey->GetClassName(); + // se non e' un TGraph passa oltre + //std::cout << i << " " << className << std::endl; + if (! className.CompareTo("TGraph")==0) continue; + TGraph *g = (TGraph *)currentKey->ReadObj(); + //TString objName = TGraph->GetName(); + + f_out.cd(); + g->Write(); + f_in.cd(); + } + f_in.Close(); + } + + f_out.Close(); +} From 777ea6eed43b2caa63bec2ad18c9592639de2f01 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 27 Nov 2013 18:40:43 +0100 Subject: [PATCH 189/475] fixes for plots --- .../validation/22Jan2012-runDepMCAll_v2.dat | 102 ++++++++++++++++++ ZFitter/macro/standardDataMC.C | 20 ++++ ZFitter/script/GenRootChain.sh | 14 ++- 3 files changed, 132 insertions(+), 4 deletions(-) create mode 100644 ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat new file mode 100644 index 00000000000..561ba4dfd50 --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat @@ -0,0 +1,102 @@ +############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection +########### standard MC +##### Madgraph +s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +##### Powheg +s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +##### Sherpa +s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +########### Data +d1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +d2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d4 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/198022-203742-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root +##### PU trees +#s1 pileup mcPUtree_s1-22Jan2012-runDepMC.dat +#s2 pileup mcPUtree_s2-22Jan2012-runDepMC.dat +#s3 pileup mcPUtree_s3-22Jan2012-runDepMC.dat +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root +s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll.root +s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root +##### Scale correction trees +#d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root +##### Smearer category trees +#d smearerCat_d smearerCat_data-scaleStep2smearing_8.root +#s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root +#d1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s2-22Jan2012-runDepMC.root +##s3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s3-22Jan2012-runDepMC.root +# +d1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d1-22Jan2012-runDepMCAll.root +d2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d2-22Jan2012-runDepMCAll.root +d3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d3-22Jan2012-runDepMCAll.root +d4 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d4-22Jan2012-runDepMCAll.root +s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll.root +s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll.root +s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll.root +# +d1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d1-22Jan2012-runDepMCAll.root +d2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d2-22Jan2012-runDepMCAll.root +d3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d3-22Jan2012-runDepMCAll.root +d4 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d4-22Jan2012-runDepMCAll.root +s1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s1-22Jan2012-runDepMCAll.root +s2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s2-22Jan2012-runDepMCAll.root +s3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s3-22Jan2012-runDepMCAll.root +# +#d1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s2-22Jan2012-runDepMC.root +##s3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s3-22Jan2012-runDepMC.root +## +#d1 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMC.root +##s3 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMC.root +# +d1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d1-22Jan2012-runDepMC.root +d2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d2-22Jan2012-runDepMC.root +d3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d3-22Jan2012-runDepMC.root +d4 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMC.root +#s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll.root +# +d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root +d2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d2-22Jan2012-runDepMC.root +d3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d3-22Jan2012-runDepMC.root +d4 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d4-22Jan2012-runDepMC.root +#s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMC.root +#s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMC.root +#s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll.root +#################################################### +d1 r9Weight data/r9weights/r9Weight_d1-22Jan2012-runDepMCAll_v2.root +d2 r9Weight data/r9weights/r9Weight_d2-22Jan2012-runDepMCAll_v2.root +d3 r9Weight data/r9weights/r9Weight_d3-22Jan2012-runDepMCAll_v2.root +d4 r9Weight data/r9weights/r9Weight_d4-22Jan2012-runDepMCAll_v2.root +s1 r9Weight data/r9weights/r9Weight_s1-22Jan2012-runDepMCAll_v2.root +s2 r9Weight data/r9weights/r9Weight_s2-22Jan2012-runDepMCAll_v2.root +s3 r9Weight data/r9weights/r9Weight_s3-22Jan2012-runDepMCAll_v2.root diff --git a/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C index c7ad083765d..d42d5bc4113 100644 --- a/ZFitter/macro/standardDataMC.C +++ b/ZFitter/macro/standardDataMC.C @@ -1,4 +1,24 @@ { + std::vector mcLabel_vec; + mcLabel_vec.push_back("Madgraph"); + mcLabel_vec.push_back("Powheg"); + mcLabel_vec.push_back("Sherpa"); + + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,true); // use r9weight + c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.eps"); + c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.C"); + delete c; + + +} + + + + + + + TString dataLabel="22Jan ", mcLabel="Simulation"; std::vector runPeriods, labels; diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index b81d6394e29..5fbceef1bd3 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -159,11 +159,16 @@ cat > tmp/load.C <Get("selected"); - TChain *data = (TChain *) _file1->Get("selected"); - ReassociateFriends(_file0, signal); - ReassociateFriends(_file1, data); + TChain *data = (TChain *) _file0->Get("selected"); + TChain *signalA = (TChain *) _file1->Get("selected"); + TChain *signalA = (TChain *) _file2->Get("selected"); + TChain *signalA = (TChain *) _file3->Get("selected"); + + ReassociateFriends(_file0, data); + ReassociateFriends(_file1, signalA); + ReassociateFriends(_file2, signalB); + ReassociateFriends(_file3, signalC); TDirectory *curDir = new TDirectory("curDir",""); curDir->cd(); @@ -177,5 +182,6 @@ EOF echo "Now you can run:" echo "root -l $filelist tmp/load.C tmp/standardDataMC.C" +#echo "root -l tmp/$filelist tmp/load.C tmp/standardDataMC.C" echo "change the outputPath string in load.C to have the plots in the correct directory" From 5685113ef84bd2d5d48200c818570b2913f9a8c6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 27 Nov 2013 18:41:25 +0100 Subject: [PATCH 190/475] modified scripts --- ZFitter/bin/ZFitter.cpp | 3 +- ZFitter/data/regions/scaleStep4smearing_1.dat | 8 +- ZFitter/data/regions/scaleStep4smearing_2.dat | 10 +- ZFitter/macro/macro_fit.C | 995 ++++++++++++++---- ZFitter/macro/plot_data_mc.C | 66 +- ZFitter/script/energyScale.sh | 749 ++++++++++--- ZFitter/script/makeCorrVsRunNumber.py | 2 +- ZFitter/src/EnergyScaleCorrection_class.cc | 12 +- ZFitter/src/RooSmearer.cc | 2 +- ZFitter/src/r9Weights_class.cc | 18 +- 10 files changed, 1455 insertions(+), 410 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index c1bcb0c8bfb..306cdef8744 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -252,6 +252,7 @@ int main(int argc, char **argv) { ("smearEleType", po::value(&smearEleType),"Correction type/step") // ("r9WeightFile", po::value(&r9WeightFile),"File with r9 photon-electron weights") + ("useR9weight", "use r9 photon-electron weights") ("saveR9TreeWeight", "") ("saveRootMacro","") // @@ -517,7 +518,6 @@ int main(int argc, char **argv) { } } - return 0; ///------------------------------ to obtain run ranges if(vm.count("runDivide")){ @@ -928,6 +928,7 @@ int main(int argc, char **argv) { //smearer.nEventsMinDiag = nEventsMinDiag; smearer._deactive_minEventsOffDiag = nEventsMinOffDiag; smearer.SetSmearingEt(vm.count("smearingEt")); + smearer.SetR9Weight(vm.count("useR9weight")); if(nSmearToy>0) smearer._nSmearToy = nSmearToy; //------------------------------ Take the list of branches needed for the defined categories ElectronCategory_class cutter; diff --git a/ZFitter/data/regions/scaleStep4smearing_1.dat b/ZFitter/data/regions/scaleStep4smearing_1.dat index 5fd1d6539f5..04c6a5cfbc3 100644 --- a/ZFitter/data/regions/scaleStep4smearing_1.dat +++ b/ZFitter/data/regions/scaleStep4smearing_1.dat @@ -1,4 +1,4 @@ -EB-absEta_0_1-bad -EB-absEta_0_1-gold -EB-absEta_1_1.4442-bad -EB-absEta_1_1.4442-gold +absEta_0_1-bad +absEta_0_1-gold +absEta_1_1.4442-bad +absEta_1_1.4442-gold diff --git a/ZFitter/data/regions/scaleStep4smearing_2.dat b/ZFitter/data/regions/scaleStep4smearing_2.dat index a0ce3643dd0..5a9891f2472 100644 --- a/ZFitter/data/regions/scaleStep4smearing_2.dat +++ b/ZFitter/data/regions/scaleStep4smearing_2.dat @@ -1,9 +1,9 @@ # regions defined for condition validation -EB-absEta_0_1-gold -EE-absEta_1.566_2-bad -EE-absEta_1.566_2-gold -EE-absEta_2_2.5-bad -EE-absEta_2_2.5-gold +absEta_0_1-gold +absEta_1.566_2-bad +absEta_1.566_2-gold +absEta_2_2.5-bad +absEta_2_2.5-gold # regions defined for condition validation #EB-absEta_0_1-gold #EE-absEta_1.566_2-bad diff --git a/ZFitter/macro/macro_fit.C b/ZFitter/macro/macro_fit.C index fe1654999fc..17eeb903399 100644 --- a/ZFitter/macro/macro_fit.C +++ b/ZFitter/macro/macro_fit.C @@ -1,4 +1,10 @@ //#include "./src/SetRegionVec.cc" +#include "RooRealVar.h" +#include +#include +#include +#include + #include #include #include @@ -54,6 +60,22 @@ TRandom3 gen(0); #define NOT_CONVERGED_LIMIT 0.6 +TGraph *SmoothGraph(TGraph *graph){ + Double_t *X = graph->GetX(); + Double_t *Y = graph->GetY(); + + int N = graph->GetN(); + Double_t x[3000], y[3000]; //, ex[1000]={0}, ey[1000]={0}; + + // last point is ignored + for(int i=0,ii=0; i < N-1; i+=2, ii++){ + y[ii]=(Y[i]+Y[i+1])*0.5; + x[ii]=(X[i]+X[i+1])*0.5; + } + // return new TGraphErrors(N-1, x, y,ex,ey); + return new TGraph(N/2, x, y); +} + void ShiftYGraph(TGraphErrors *graph, double y){ Double_t *Y = graph->GetY(); int N = graph->GetN(); @@ -91,6 +113,76 @@ Double_t asymmetricParabola(Double_t* x,Double_t* par) return value+par[0]; } +Double_t likelihoodAsymmetricParabola(Double_t *x, Double_t *par){ + return exp(-(asymmetricParabola(x, par))); +} + +RooDataSet *getL(Double_t *par, RooRealVar *var1, Long64_t nEvents=10000){ + Double_t range_min=par[1]-4/(sqrt(2*par[2])), range_max=par[1]+4/(sqrt(2*par[3])); + range_min=std::max(0.,range_min); + + TF1* f2 = new TF1("f2", likelihoodAsymmetricParabola,range_min,range_max,4); + f2->SetParameter(0, par[0]); + f2->SetParameter(1, par[1]); + f2->SetParameter(2, par[2]); + f2->SetParameter(3, par[3]); + f2->SetNpx(1e3); + + TH1F *hist = (TH1F*)f2->GetHistogram(); + + RooDataHist *dataHist = new RooDataHist(TString(hist->GetName())+"_dataHist",hist->GetTitle(), RooArgSet(*var1), hist); + RooHistPdf *histPdf = new RooHistPdf(TString(hist->GetName())+"_histPdf",hist->GetTitle(), RooArgSet(*var1), *dataHist); + + RooDataSet *data = histPdf->generate(RooArgSet(*var1), nEvents, kTRUE); + //delete f2; + delete hist; + //delete var1; + delete dataHist; + delete histPdf; + + + return data; +} + + +void Get_DeltaC_DeltaS(TH1F *DeltaC_hist, TH1F *DeltaS_hist, //to be filled + Double_t *rho_par, Double_t *phi_par, Double_t Emean){ + + Long64_t nEvents=10000; + RooRealVar *rho = new RooRealVar("rho","",0.1); + RooDataSet *rho_data = getL(rho_par, rho, nEvents); + + RooRealVar *phi = new RooRealVar("phi","",0.1); + RooDataSet *phi_data = getL(phi_par, phi, nEvents); + + for(Long64_t jentry=0; jentryget(jentry); + const RooArgSet *phiArg = phi_data->get(jentry); + Double_t rhoVal=rhoArg->getRealValue(rho->GetName()); + Double_t phiVal=phiArg->getRealValue(phi->GetName()); + + Double_t DeltaC = rhoVal * sin(phiVal); + Double_t DeltaS = rhoVal * Emean * cos(phiVal); + if(jentry<10) std::cout << rhoVal + << "\t" + << phiVal + << "\t" + << DeltaC + << std::endl; + + DeltaC_hist->Fill(DeltaC); + DeltaS_hist->Fill(DeltaS); + } + + delete rho_data; + delete phi_data; + delete rho; + delete phi; + return; + +} + + int pointsInInterval(Double_t *array, int N, double min, double max){ int count=0; for(int i=0; i < N; i++) @@ -103,8 +195,8 @@ double rangeWithPoints(TGraphErrors *g, int nPoints, Double_t *xMin, Double_t* x int iMin=0; Double_t *Y = g->GetY(); Double_t *X = g->GetX(); - Double_t min=Y[0]; - for(int i=0; i < g->GetN(); i++) if(Y[i] <= min){ + Double_t min=1e20; + for(int i=1; i < g->GetN(); i++) if(Y[i] <= min){ iMin=i; min=Y[i]; } @@ -119,7 +211,7 @@ double rangeWithPoints(TGraphErrors *g, int nPoints, Double_t *xMin, Double_t* x } -TF1* IterMinimumFit(TGraphErrors *g, bool isScale) +TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) { #ifdef DEBUG g->SaveAs("ciao.root"); @@ -127,12 +219,16 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale) double rangeLimMax=1.04; double rangeLimMin=0.96; if(!isScale){ - rangeLimMax=0.05; - rangeLimMin=0.; + rangeLimMax=0.15; + rangeLimMin=0.00; + } + if(isPhi){ + rangeLimMin=1e-10; + rangeLimMax=1.58; } Double_t *X = g->GetX(); - Double_t X_bin=fabs(X[1]-X[0]); + //Double_t X_bin=fabs(X[1]-X[0]); int N = g->GetN(); double range_min=TMath::Max(TMath::MinElement(g->GetN(),g->GetX()),rangeLimMin); @@ -162,18 +258,30 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale) // double minX=-fun->GetParameter(1) / (2* fun->GetParameter(2)); // double sigma=(range_max-range_min)/2; double sigma=1./sqrt(2* fun->GetParameter(2)); + if(sigma<1e-5 || sigma>1e10 || sigma!=sigma) sigma=1e-4; double sigma_plus=sigma; double sigma_minus=sigma; double minX=g->GetX()[TMath::LocMin(g->GetN(),g->GetY())]; + if(minX==0 || minX rangeLimMax) minX= -fun->GetParameter(1) / (2* fun->GetParameter(2)); double old_chi2=0., chi2=0.; + if(sigma<0.0001) sigma=0.0001; + if(minXSetParameter(0,0); //TMath::MinElement(g->GetN(),g->GetY())); f2->SetParameter(1,minX); f2->SetParameter(2,1/(2*sigma*sigma)); f2->SetParameter(3,1/(2*sigma*sigma)); + f2->SetParLimits(0,-100,100); + f2->SetParLimits(1,rangeLimMin,rangeLimMax); + //f2->SetParLimits(2,1e5,1e9); + f2->SetParLimits(2,0,1e9); + f2->SetParLimits(3,0,1e10); int iter=0; do{ old_chi2=chi2; @@ -181,13 +289,26 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale) minX_old=minX; sigma_plus_old=sigma_plus; sigma_minus_old=sigma_minus; + + //f2->FixParameter(1,0); + if(minX<=rangeLimMin+1e-9){ + std::cout << "[INFO] Fixing min" << std::endl; + f2->SetParLimits(2,0,100); + //f2->FixParameter(1,rangeLimMin); + } + if(minX>=rangeLimMax-1e-9){ + std::cout << "[INFO] Fixing max" << std::endl; + f2->SetParLimits(3,0,100); + //f2->FixParameter(1,rangeLimMin); + } - std::cout << "Fit range: [ " << range_min << " : " << range_max << "]" << std::endl; - f2->SetName("f2_iter"+iter); - + TString fname="f2_iter_"; fname+=iter; + f2->SetName(fname); + std::cout << "Fit range: [ " << range_min << " : " << range_max << "]" << std::endl; + f2->SetRange(range_min,range_max); // g->Fit(fun,"F+","",range_min, range_max); g->Fit(f2,"0R+","",range_min, range_max); - // g->Fit(fun,"R+","",min-2*sigma, min+2*sigma); + // g->Fit(fun,"R+","",min-2*sigma, min+2*sigma); // sigma = 1./sqrt(2* fun->GetParameter(2)); sigma_minus = 1./sqrt(2* f2->GetParameter(2)); sigma_plus = 1./sqrt(2* f2->GetParameter(3)); @@ -198,24 +319,46 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale) if(isScale){ range_min = TMath::Max(minX-30*sigma_minus, rangeLimMin); range_max = TMath::Min(minX+30*sigma_plus, rangeLimMax); + } else if(isPhi){ + range_min = TMath::Max(minX-2*sigma_minus, rangeLimMin); + range_max = TMath::Min(minX+3*sigma_plus, rangeLimMax); + if(minX<0.5){ + if(!TString(g->GetTitle()).Contains("1_1.4442-gold")) range_max=0.5; + if(TString(g->GetTitle()).Contains("0_1-bad")){ range_min=0; range_max=0.3;} + //if(TString(g->GetTitle()).Contains("0_1-bad")){ range_min=0.5; range_max=0.9;}; + //if(TString(g->GetTitle()).Contains("0_1-gold")) range_max=0.8; + if(TString(g->GetTitle()).Contains("0_1-gold")) range_max=0.4; + } + if(minX>1.2){ + if(TString(g->GetTitle()).Contains("0_1-bad")){ range_min=0.5; range_max=1.6;}; + } } else { - range_min = TMath::Max(minX-2.5*sigma_minus, rangeLimMin); - range_max = TMath::Min(minX+4*sigma_plus, rangeLimMax); + range_min = TMath::Max(minX-8*sigma_minus, rangeLimMin); + range_max = TMath::Min(minX+8*sigma_plus, rangeLimMax); } - bool rep=true; - while (rep){ //((range_max - range_min)/X_bin < 10)){ - rep= (pointsInInterval(X, N, range_min, range_max) < 8); + std::cout << "[INFO] Points in interval: " << pointsInInterval(X, N, range_min, range_max) << std::endl; + if(!(TString(g->GetTitle()).Contains("0_1-bad"))){ + while (pointsInInterval(X, N, range_min, range_max) < 15 && range_min>rangeLimMin && range_maxSetRange(range_min,range_max); + std::cout << "Fitted range: [ " << range_min << " : " << range_max << "]" << std::endl; + f2->SetRange(range_min,range_max); // std::cout << minX_old << " " << minX << " " << minX-minX_old << std::endl; if(sigma_plus*100 < 0.01) std::cout << "sigma_plus = " << " " << sigma_plus << std::endl; if(sigma_minus*100 < 0.01) std::cout << "sigma_minus = " << " " << sigma_minus << std::endl; @@ -228,19 +371,25 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale) //for (int iPoint=0;iPointGetN();++iPoint) // *(g->GetY()+iPoint)=*(g->GetY()+iPoint)-f2->GetParameter(0); //} While( (((fabs(minX-minX_old)/minX > FIT_LIMIT || fabs(sigma_plus-sigma_plus_old)/sigma_plus>FIT_LIMIT || fabs(sigma_minus-sigma_minus_old)/sigma_minus>FIT_LIMIT )) && iter<20) || iter<10 ); - } while (fabs(chi2 - old_chi2)/old_chi2 > FIT_LIMIT && iter < ITER_MAX); //|| iter < 4 || gMinuit->GetStatus() != 0); + } while (fabs(chi2 - old_chi2)/old_chi2 > FIT_LIMIT && iter < ITER_MAX || iter < 4); //|| iter < 4 || gMinuit->GetStatus() != 0); std::cout << "ITER to converge = " << iter << std::endl; if(iter >=ITER_MAX) std::cout << "WARNING: iter not converged" << std::endl; // float chi2_rnd = TMath::ChisquareQuantile(gen.Rndm(),1); - + if(gMinuit->GetStatus()==0){ float errorScale=sqrt(f2->GetChisquare()/(f2->GetNumberFitPoints()-f2->GetNumberFreeParameters())); - std::cout << "SCALING ERROR by " << errorScale; - for (int i=0;iGetN();++i) - *(g->GetEY()+i)= (*(g->GetEY()+i)) * errorScale; //*chi2_rnd/TMath::ChisquareQuantile(0.5,1); - - + std::cout << "SCALING ERROR by " << errorScale << std::endl + << "Shifting by " << f2->GetParameter(0) << std::endl; + if(g->GetEY()!=NULL){ + for (int i=0;iGetN();++i){ + *(g->GetEY()+i)= (*(g->GetEY()+i)) * errorScale; //*chi2_rnd/TMath::ChisquareQuantile(0.5,1); + // shift to have at DeltaNLL=0 the minimum of the fit + *(g->GetY()+i) -= f2->GetParameter(0); //*chi2_rnd/TMath::ChisquareQuantile(0.5,1); + } + f2->SetParameter(0,0); + } + } return f2; } @@ -256,14 +405,15 @@ typedef std::map graphic_t; TGraphErrors *MeanGraph(std::vector g_vec, float *y_minimum=NULL, TGraphErrors *g_in=NULL){ int N = (*g_vec.begin())->GetN(); // number of points - if(1000 <= N) { + TString name=(*g_vec.begin())->GetName(); + if(8000 <= N) { std::cerr << "ERROR: N_bins too big in MeanGraph:" << N << std::endl; return NULL; } - Double_t x[1000]={0.}, y[1000]={0.}, y2[1000]={0.}, dev_st[1000], err_x[1000]; - + Double_t x[20000]={0.}, y[20000]={0.}, y2[20000]={0.}, dev_st[20000], err_x[20000]; + int n=0; for(std::vector::const_iterator g_itr = g_vec.begin(); g_itr!= g_vec.end(); g_itr++){ // loop over TGraphs @@ -274,66 +424,154 @@ TGraphErrors *MeanGraph(std::vector g_vec, float *y_minimum=NULL, TGra Double_t *X = graph->GetX(); double minimum=Y[0]; - for(int i=1; i< N; i++){ // calcolo il minimo e il punto di minimo + for(int i=0; i< N; i++){ // calcolo il minimo e il punto di minimo if(minimum > Y[i]) minimum=Y[i]; } + // for (int ip=0;ip19999){ + std::cerr << "############################################################" << std::endl; + std::cerr << "############################################################" << std::endl; + std::cerr << "############################################################" << std::endl; + break; + } + } if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; } + + for (int ip=0;ip1){ + //std::cout << y2[ip] << "\t" << y[ip]*y[ip] << "\t" << y[ip] << "\t" << dev_st[ip] << std::endl; + dev_st[ip]=sqrt(y2[ip]-y[ip]*y[ip])/sqrt(dev_st[ip]); + } + else dev_st[ip]=0; + } + } + + // calcolo il minimo e il punto di minimo + double minimum=1e20; + for(int i=2; i< N; i++) if(minimum > y[i] && y[i]>10) minimum=y[i]; + for(int i=0; i< N; i++) y[i]-=minimum; + + TGraphErrors *g = new TGraphErrors(N, x, y, err_x, dev_st); - g->SaveAs("c.root"); // g->Draw("AP*"); return g; } +TGraphErrors *SumGraph(std::vector g_vec){ + int N = (*g_vec.begin())->GetN(); // number of points + TString name=(*g_vec.begin())->GetName(); + if(8000 <= N) { + std::cerr << "ERROR: N_bins too big in MeanGraph:" << N << std::endl; + return NULL; + } + + + Double_t x[20000]={0.}, y[20000]={0.}, y2[20000]={0.}, dev_st[20000], err_x[20000]; + int n=0; + for(std::vector::const_iterator g_itr = g_vec.begin(); + g_itr!= g_vec.end(); + g_itr++){ // loop over TGraphs + + TGraph *graph = *g_itr; + if(graph==NULL) continue; // per sicurezza + Double_t *Y = graph->GetY(); + Double_t *X = graph->GetX(); + + double minimum=Y[0]; + for(int i=0; i< N; i++){ // calcolo il minimo e il punto di minimo + if(minimum > Y[i]) minimum=Y[i]; + } + + // for (int ip=0;ip19999){ + std::cerr << "############################################################" << std::endl; + std::cerr << "############################################################" << std::endl; + std::cerr << "############################################################" << std::endl; + break; + } + + } + n+=N; + + if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; + } + + for (int ip=0;ip g_vec, float *y_minimum=NULL, TGraphErrors *g_in=NULL){ int N = (*g_vec.begin())->GetN(); // number of points - if(1000 <= N) { + if(3000 <= N) { std::cerr << "ERROR: N_bins too big in MeanGraph:" << N << std::endl; return NULL; } std::map > g_in_map; - if(g_in!=NULL){ - Double_t X_in=0, Y_in=0, YE_in=0; - for(int i =0; i < g_in->GetN(); i++){ - g_in->GetPoint(i, X_in, Y_in); - // std::cout << Y_in << std::endl; - YE_in = g_in->GetErrorY(i); - std::pair point = std::make_pair(Y_in, YE_in); - //std::cout << i << "\t" << X_in << "\t" << Y_in << std::endl; - g_in_map.insert(std::make_pair >(X_in, point)); - } - } - Double_t x[1000]={0.}, y[1000]={0.}, y2[1000]={0.}, dev_st[1000], err_x[1000]; + Double_t x[3000]={0.}, y[3000]={0.}, y2[3000]={0.}, dev_st[3000], err_x[3000]; graphic_t graphic; + int n_max=0; - double y_min=1e8; - // if(y_minimum!=NULL) y_min=y_minimum; + double y_min=1e20; + for(std::vector::const_iterator g_itr = g_vec.begin(); g_itr!= g_vec.end(); g_itr++){ // loop over TGraphs - + + graphic_t graphs; TGraph *graph = *g_itr; if(graph==NULL) continue; // per sicurezza + if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; + Double_t *Y = graph->GetY(); Double_t *X = graph->GetX(); - Double_t X_bin=fabs(X[1]-X[0]); + Double_t X_bin=0.00001; //fabs(X[1]-X[0]); // double minimum=TMath::MinElement(graph->GetN(),graph->GetY()); - double minimum=Y[0]; + double minimum=1e20; double x_minimum=X[0]; for(int i=1; iGetN(); i++){ // calcolo il minimo e il punto di minimo if(minimum > Y[i]){ @@ -341,88 +579,87 @@ TGraphErrors *MeanGraphOld(std::vector g_vec, float *y_minimum=NULL, T minimum=Y[i]; x_minimum=X[i]; } + //if(fabs(X[i]-X[i-1])GetN()-1] + X[0])/2.) > NOT_CONVERGED_LIMIT * (X[graph->GetN()-1] - X[0])){ // shift 10% rispetto all'intervallo dal minimo di migrad - std::cout << "[WARNING] Graph not converged" << std::endl; - std::cout << X[1] << "\t" << X[graph->GetN()-1] << "\t" << x_minimum << "\t" << X_bin << std::endl; - continue; // passo al graph successivo - } +// // cerco di capire se il fit di migrad non e' andato a convergenza +// if(fabs(x_minimum - (X[graph->GetN()-1] + X[0])/2.) > NOT_CONVERGED_LIMIT * (X[graph->GetN()-1] - X[0])){ // shift 10% rispetto all'intervallo dal minimo di migrad +// std::cout << "[WARNING] Graph not converged" << std::endl; +// std::cout << X[1] << "\t" << X[graph->GetN()-1] << "\t" << x_minimum << "\t" << X_bin << std::endl; +// continue; // passo al graph successivo +// } // std::cout << "++++++++++++++++++++++++++++++" << std::endl; for (int ip=0;ipGetN();++ip) //sottraggo il minimo per avere un DeltaL in ordinata { - Y[ip] -= minimum; // std::cout << ip << ";" << X[ip] << ";" << Y[ip] << std::endl; } // std::cout << "XBIN = " << X_bin << std::endl; // std::cout << "Y[7] = " << Y[7] << std::endl; - if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; + for(int i =0 ; i < graph->GetN(); i++){ -#ifdef DEBUG - std::cout << "[DEBUG] i = " << i << std::endl; -#endif - graphic_t::iterator itr = graphic.find(X[i]); - if(!graphic.empty()){ - // graphic_t::iterator itr = graphic.find(X[i]); - - if(itr == graphic.end()) { - // controllo se e' vicino al primo bordo, poi al secondo e altrimenti lo butto - itr = graphic.lower_bound(X[i]); - // if(itr== graphic.end()) std::cout << "Error: graphic empty" << std::endl; - itr--; - if( !(fabs(itr->first - X[i]) < X_bin/5.)){ // check del bin prima + if(graphs.count(X[i])==0){ + point_value_t p; + p.y=Y[i]; + p.y2=Y[i]*Y[i]; + p.n=1; + graphs.insert(std::make_pair(X[i],p)); + }else{ + //std::cout << X[i] << "\t" << Y[i] << std::endl; + } + } + + for(graphic_t::iterator gitr=graphs.begin(); gitr!=graphs.end(); gitr++){ + + graphic_t::iterator itr = graphic.find(gitr->first); + + if(!graphic.empty()){ + + if(itr == graphic.end()) { + // controllo se e' vicino al primo bordo, poi al secondo e altrimenti lo butto + itr = graphic.lower_bound(gitr->first); + // if(itr== graphic.end()) std::cout << "Error: graphic empty" << std::endl; + itr--; + if( !(fabs(itr->first - gitr->first) < X_bin/5.)){ // check del bin prima + itr++; + if( !(fabs(itr->first - gitr->first) < X_bin/5.)){ // check del bin itr++; - if( !(fabs(itr->first - X[i]) < X_bin/5.)){ // check del bin - itr++; - if( !(fabs(itr->first - X[i]) < X_bin/5.)){ // check del bin dopo + if( !(fabs(itr->first - gitr->first) < X_bin/5.)){ // check del bin dopo #ifdef DEBUG - if(X[i] < graphic.begin()->first){ - std::cout << "Value not found: " << X[i] << "; " - << graphic.lower_bound(X[i])->first << "; " - << graphic.upper_bound(X[i])->first << "; " - << X_bin/5. - << std::endl; - } -#endif - itr=graphic.end(); + if(gitr->first < graphic.begin()->first){ + std::cout << "Value not found: " << gitr->first << "; " + << graphic.lower_bound(gitr->first)->first << "; " + << graphic.upper_bound(gitr->first)->first << "; " + << X_bin/5. + << std::endl; } +#endif + itr=graphic.end(); } } } + } } else itr=graphic.end(); - + + if(itr!=graphic.end()){ - // itr->first=x[i]; - //std::cout << Y[i] - g_in[itr->first].y << std::endl; - if(g_in!=NULL){ - if(g_in_map.find(X[i])!=g_in_map.end()){ - if( fabs(Y[i] - *y_minimum - g_in_map[X[i]].first) > 3*g_in_map[X[i]].second * sqrt(200)){ - std::cout << "Not adding: " << X[i] << "\t" << Y[i] - *y_minimum - << "\t" << g_in_map[X[i]].first << "\t" << Y[i] - *y_minimum - g_in_map[X[i]].first - << "\t" << 3*g_in_map[X[i]].second * sqrt(150) - << std::endl; - continue; - } - } - } - itr->second.y+=Y[i]; - itr->second.y2+=Y[i]*Y[i]; + itr->second.y+=gitr->second.y; + itr->second.y2+=gitr->second.y*gitr->second.y; itr->second.n++; n_max = std::max(n_max,itr->second.n); + // if(itr->second.n>100) std::cout << "added point with n>100\t" << i << "\t" << X[i] << "\t" << gitr->second.y << "\t" << itr->second.n << "\t" << n_max << std::endl; } else { - if(g_itr!=g_vec.begin()) std::cout << "added point" << std::endl; + //if(g_itr!=g_vec.begin()) std::cout << "added point" << << "\t" << gitr->second.y << "\t" << std::endl; // se non c'e' lo aggiungo point_value_t p; - p.y=Y[i]; - p.y2=Y[i]*Y[i]; + p.y=gitr->second.y; + p.y2=gitr->second.y*gitr->second.y; p.n=1; n_max = std::max(n_max,1); - graphic.insert(std::make_pair(X[i],p)); + graphic.insert(std::make_pair(gitr->first,p)); // continue; // se non c'e' lo salto } // } @@ -431,15 +668,16 @@ TGraphErrors *MeanGraphOld(std::vector g_vec, float *y_minimum=NULL, T } + /*-----------------------------*/ std::cout << "N_MAX = " << n_max << std::endl; int n=0; y_min=1e10; for(graphic_t::iterator itr=graphic.begin(); itr!=graphic.end(); itr++){ - + // if(itr->second.n < n_max-15) continue; - if(itr->second.n < n_max-n_max*0.2){std::cout << "Removing point " << itr->first << std::endl; continue;} - if(itr->second.n != n_max) std::cout << "n = " << itr->second.n << " " << n_max << std::endl; + if(itr->second.n < n_max*0.2){std::cout << "Removing point " << itr->first << "\t" << itr->second.n << std::endl; continue;} + //if(itr->second.n != n_max) std::cout << itr->first << "\tn = " << itr->second.n << " " << n_max << std::endl; // std::cout << itr->first << " " << itr->second.n << " " << itr->second.y << " " << itr->second.y2 << std::endl; x[n] = itr->first; double ym = itr->second.y/itr->second.n; @@ -539,11 +777,89 @@ std::vector GetGraphVector(int nToys, TString region, TFile *f){ } +void Plot(TCanvas *c, TGraphErrors *g, TF1 *fun, TPaveText *pt, bool isScale, bool isPhi, TString variable){ + float sigma=1./(sqrt(2* std::max(fun->GetParameter(2),fun->GetParameter(3)))); + + TH2F a("a","a", + 10, max(fun->GetParameter(1)-20.*1./(sqrt(2* fun->GetParameter(2))),0.96), + min(fun->GetParameter(1) +20. * 1./(sqrt(2* fun->GetParameter(2))),1.04), + 10,-1.,100.); + + a.GetYaxis()->SetTitle("#Delta L (a. u.)"); + c->Clear(); + if(isScale) { + + a.GetXaxis()->SetTitle("1+#DeltaP "); + // a.Draw(); + //g->GetXaxis()->SetRangeUser(std::max(fun->GetXmin()-sigma,0.), std::min(fun->GetXmax()+sigma,0.15)); + // g->Draw("PSAME"); + + Double_t xMin, xMax; + Double_t yMax = rangeWithPoints(g, 8, &xMin, &xMax); + std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << sigma << "\t" << fun->GetXmin() << std::endl; + std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << yMax << std::endl; + xMin=std::min((xMin+xMax)/2.-sigma,xMin); + xMax=std::max((xMin+xMax)/2.+sigma,xMax); + + xMin=std::max(xMin,0.96); + xMax=std::min(xMax,1.04); + std::cout << "EEEEEEEEEEEEEEEEE" << xMin << "\t" << xMax << std::endl; + g->GetXaxis()->SetRangeUser(xMin, xMax); + g->GetYaxis()->SetRangeUser(-5, yMax); //std::max(fun->Eval(xMin), fun->Eval(xMax))); + + g->Draw("AP"); + g->GetYaxis()->SetTitle("#Delta L (a. u.)"); + g->GetXaxis()->SetTitle("1+#DeltaP "); + + }else { + g->GetXaxis()->SetRangeUser(std::max(fun->GetXmin()-2*sigma,0.), std::min(fun->GetXmax()+sigma,0.15)); + //g->GetXaxis()->SetRangeUser(0., 0.05); + g->GetYaxis()->SetRangeUser(-5, std::max(fun->Eval(fun->GetXmin()-1.5*sigma), fun->Eval(fun->GetXmax()+1.5*sigma))); + g->Draw("AP"); + g->GetYaxis()->SetTitle("#Delta L (a. u.)"); + if(variable.Contains("constTerm")) g->GetXaxis()->SetTitle("#Delta C"); + if(variable.Contains("alpha")) g->GetXaxis()->SetTitle("#Delta S"); + if(variable.Contains("rho")) g->GetXaxis()->SetTitle("#rho"); + if(variable.Contains("phi")){ + g->GetXaxis()->SetTitle("#phi"); + g->GetXaxis()->SetRangeUser(0,1.6); + //g->GetYaxis()->SetRangeUser(-5, 30); + } + + } + + fun->SetLineWidth(3); + fun->SetLineColor(4); + fun->Draw("same"); + + char out_char[100]; + if(isScale){ + sprintf(out_char,"%s #DeltaP = %.3f ^{+ %.3f}_{- %.3f} %s" , "", //region.Data(), + (fun->GetParameter(1) -1 )*100 , + 100./(sqrt(2* fun->GetParameter(3))), 100./(sqrt(2* fun->GetParameter(2))) , "%"); + } else if(isPhi){ + sprintf(out_char,"%s #Delta#phi = %.2f ^{+ %.2f}_{- %.2f} %s" , "", //region.Data(), + fun->GetParameter(1), + 1./(sqrt(2* fun->GetParameter(3))), 1./(sqrt(2* fun->GetParameter(2))), ""); + //std::cout << out_char << std::endl; + } else { + sprintf(out_char,"%s #Delta#sigma = %.2f ^{+ %.2f}_{- %.2f} %s" , "", //region.Data(), + fun->GetParameter(1)*100, + 1./(sqrt(2* fun->GetParameter(3))) *100, 1./(sqrt(2* fun->GetParameter(2))) *100, "%"); + //std::cout << out_char << std::endl; + } + + pt->Clear(); + pt->AddText(out_char); + pt->Draw(); + return; +} -void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ - gStyle->SetOptFit(0); +void FitProfile2(TString filename, TString energy="8 TeV", TString lumi="", bool doScale=true, bool doResolution=true, bool doPhi=false){ + gStyle->SetOptFit(0); + std::ofstream ffout("tmp/out.out"); // TString region_set=filename; //region_set.Remove(0,region_set.First('/')+1); @@ -554,7 +870,7 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ typedef std::map map_region_t; std::map graph_map; - std::cout << "Opening file: " << filename << std::endl; + //std::cout << "Opening file: " << filename << std::endl; TFile f_in(filename,"open"); if(!f_in.IsOpen()){ std::cerr << "Error. File not open" << std::endl; @@ -566,23 +882,24 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ TKey *currentKey=(TKey *)KeyList->At(i); TString className=currentKey->GetClassName(); // se non e' un TGraph passa oltre - std::cout << i << " " << className << std::endl; + //std::cout << i << " " << className << std::endl; if (! className.CompareTo("TGraph")==0) continue; TGraph *g = (TGraph *)currentKey->ReadObj(); TString name=g->GetName(); - std::cout << "name = " << name << std::endl; + //std::cout << "name = " << name << std::endl; name.Remove(0,name.First('_')+1); TString variable=name(0,name.First('_')); name.Remove(0,name.First('_')+1); - TString region=name(0,name.Length()); - TString index="0"; + TString region=name(0,name.Last('_')); + name.Remove(0,name.Last('_')+1); + TString index=name(0,name.Length()); name=g->GetName(); - std::cout << name << " " << variable << " " << region << " " << index << std::endl; + //std::cout << name << " " << variable << " " << region << " " << index << std::endl; + - (graph_map[variable])[region].push_back(g); } @@ -602,13 +919,16 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ pave.AddText("CMS Preliminary"); if(lumi.Sizeof()>1) pave.AddText("#sqrt{s}="+energy+" L="+lumi+" fb^{-1}"); - else pave.AddText("#sqrt{s}=7 TeV"); + else pave.AddText("#sqrt{s}=8 TeV"); // gPad->SetTopMargin(0.08391608); RooArgSet *vars= new RooArgSet(); + TCanvas *c = new TCanvas("c","c"); + c->cd(); std::cout << "Looping" << std::endl; + for(std::map::const_iterator map_itr=graph_map.begin(); map_itr!=graph_map.end(); map_itr++){ @@ -620,94 +940,134 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ TString region= map_region_itr->first; TString variable = map_itr->first; bool isScale=map_itr->first.CompareTo("scale")==0; - if(!isScale) continue; + bool isPhi=map_itr->first.CompareTo("phi")==0; + if(!( + (isScale && doScale==true) || + (!isScale && !isPhi && doResolution==true) || + (isPhi && doPhi==true) + ) + ) continue; - std::cout << region << " " << variable << std::endl; + std::cout << region << " " << variable << "\t" << map_region_itr->second.size() << std::endl; float y_min=1e10; std::cout << "Getting g1 mean graph" << std::endl; - TGraphErrors *g1 = MeanGraph(map_region_itr->second,&y_min); + TGraphErrors *g1 = MeanGraphOld(map_region_itr->second,&y_min); //std::cout << "Getting g mean graph" << std::endl; TGraphErrors *g = g1; //MeanGraph(map_region_itr->second, &y_min,g1); + TGraphErrors *g_sum = SumGraph(map_region_itr->second); +// if(!variable.Contains("rho")){ +// continue; +// } if(g==NULL) continue; g->SetMarkerStyle(20); g->SetMarkerSize(0.9); + //g_sum->SaveAs("tmp/g_sum-"+variable+"_"+region+".root"); + g->SaveAs("tmp/g_sum-"+variable+"_"+region+".root"); + g_sum->SaveAs("tmp/g_sumGraph-"+variable+"_"+region+".root"); + if(variable.Contains("alpha")){ //||variable.Contains("constTerm")){ + continue; + } + std::cout << "Fitting iteratively for minumum and error estimation" << std::endl; - g->SaveAs(variable+"_"+region+".root"); - - TF1* fun = IterMinimumFit(g, isScale); + g->SetTitle(region); + TF1* fun = IterMinimumFit(g, isScale, isPhi); if (!fun) { std::cout << "HEY FIT HAD BIG PROBLEMS!" << std::endl; return; } - float sigma=1./(sqrt(2* fun->GetParameter(2))); - - - TH2F a("a","a", - 10, max(fun->GetParameter(1)-20.*1./(sqrt(2* fun->GetParameter(2))),0.96), - min(fun->GetParameter(1) +20. * 1./(sqrt(2* fun->GetParameter(2))),1.04), - 10,-1.,100.); - - a.GetYaxis()->SetTitle("#Delta L (a. u.)"); - if(isScale) { - a.GetXaxis()->SetTitle("1+#DeltaP "); - // a.Draw(); - //g->GetXaxis()->SetRangeUser(std::max(fun->GetXmin()-sigma,0.), std::min(fun->GetXmax()+sigma,0.15)); - // g->Draw("PSAME"); + if(fun->GetParameter(2)<=0 && fun->GetParameter(3)<=0) continue; + Plot(c, g, fun, pt, isScale, isPhi,variable); - Double_t xMin, xMax; - Double_t yMax = rangeWithPoints(g, 8, &xMin, &xMax); - std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << sigma << "\t" << fun->GetXmin() << std::endl; - std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << yMax << std::endl; - xMin=std::min((xMin+xMax)/2.-sigma,xMin); - xMax=std::max((xMin+xMax)/2.+sigma,xMax); - - xMin=std::max(xMin,0.96); - xMax=std::min(xMax,1.04); - std::cout << "EEEEEEEEEEEEEEEEE" << xMin << "\t" << xMax << std::endl; - g->GetXaxis()->SetRangeUser(xMin, xMax); - g->GetYaxis()->SetRangeUser(-5, yMax); //std::max(fun->Eval(xMin), fun->Eval(xMax))); - - g->Draw("AP"); - g->GetYaxis()->SetTitle("#Delta L (a. u.)"); - g->GetXaxis()->SetTitle("1+#DeltaP "); - }else{ - Double_t xMin=0., xMax=0.03; - //xMin=std::max(fun->GetXmin()-sigma,0.); - //xMax=std::min(fun->GetXmax()+sigma,0.15); - g->GetXaxis()->SetRangeUser(xMin, xMax); - g->GetYaxis()->SetRangeUser(-5, 100); - //g->GetYaxis()->SetRangeUser(-5, std::max(fun->Eval(fun->GetXmin()-1.5*sigma), fun->Eval(fun->GetXmax()+1.5*sigma))); - g->Draw("AP"); - g->GetYaxis()->SetTitle("#Delta L (a. u.)"); - g->GetXaxis()->SetTitle("#Delta#sigma"); - //g->GetYaxis()->SetRangeUser(0,2); - } - fun->SetLineWidth(3); - fun->SetLineColor(4); - fun->Draw("same"); + ffout << variable << "\t" << region << "\t" + << fun->GetParameter(0) << "\t" + << fun->GetParameter(1) << "\t" + << fun->GetParameter(2) << "\t" + << fun->GetParameter(3) << std::endl; - char out_char[100]; - if(isScale){ - sprintf(out_char,"%s #DeltaP = %.3f ^{+ %.3f}_{- %.3f} %s" , "", //region.Data(), - (fun->GetParameter(1) -1 )*100 , - 100./(sqrt(2* fun->GetParameter(3))), 100./(sqrt(2* fun->GetParameter(2))) , "%"); - } else { - sprintf(out_char,"%s #Delta#sigma = %.2f ^{+ %.2f}_{- %.2f} %s" , "", //region.Data(), - fun->GetParameter(1)*100, - 1./(sqrt(2* fun->GetParameter(3))) *100, 1./(sqrt(2* fun->GetParameter(2))) *100, "%"); - } - - pt->Clear(); - pt->AddText(out_char); - pt->Draw(); + //ffout << "# " << region << "\t" << variable << std::endl; +// float sigma=1./(sqrt(2* std::max(fun->GetParameter(2),fun->GetParameter(3)))); + + +// TH2F a("a","a", +// 10, max(fun->GetParameter(1)-20.*1./(sqrt(2* fun->GetParameter(2))),0.96), +// min(fun->GetParameter(1) +20. * 1./(sqrt(2* fun->GetParameter(2))),1.04), +// 10,-1.,100.); + +// a.GetYaxis()->SetTitle("#Delta L (a. u.)"); +// c->Clear(); +// if(isScale) { + +// a.GetXaxis()->SetTitle("1+#DeltaP "); +// // a.Draw(); +// //g->GetXaxis()->SetRangeUser(std::max(fun->GetXmin()-sigma,0.), std::min(fun->GetXmax()+sigma,0.15)); +// // g->Draw("PSAME"); + +// Double_t xMin, xMax; +// Double_t yMax = rangeWithPoints(g, 8, &xMin, &xMax); +// std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << sigma << "\t" << fun->GetXmin() << std::endl; +// std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << yMax << std::endl; +// xMin=std::min((xMin+xMax)/2.-sigma,xMin); +// xMax=std::max((xMin+xMax)/2.+sigma,xMax); + +// xMin=std::max(xMin,0.96); +// xMax=std::min(xMax,1.04); +// std::cout << "EEEEEEEEEEEEEEEEE" << xMin << "\t" << xMax << std::endl; +// g->GetXaxis()->SetRangeUser(xMin, xMax); +// g->GetYaxis()->SetRangeUser(-5, yMax); //std::max(fun->Eval(xMin), fun->Eval(xMax))); + +// g->Draw("AP"); +// g->GetYaxis()->SetTitle("#Delta L (a. u.)"); +// g->GetXaxis()->SetTitle("1+#DeltaP "); + +// }else { +// g->GetXaxis()->SetRangeUser(std::max(fun->GetXmin()-2*sigma,0.), std::min(fun->GetXmax()+sigma,0.15)); +// //g->GetXaxis()->SetRangeUser(0., 0.05); +// g->GetYaxis()->SetRangeUser(-5, std::max(fun->Eval(fun->GetXmin()-1.5*sigma), fun->Eval(fun->GetXmax()+1.5*sigma))); +// g->Draw("AP"); +// g->GetYaxis()->SetTitle("#Delta L (a. u.)"); +// if(variable.Contains("constTerm")) g->GetXaxis()->SetTitle("#Delta C"); +// if(variable.Contains("alpha")) g->GetXaxis()->SetTitle("#Delta S"); +// if(variable.Contains("rho")) g->GetXaxis()->SetTitle("#rho"); +// if(variable.Contains("phi")){ +// g->GetXaxis()->SetTitle("#phi"); +// g->GetXaxis()->SetRangeUser(0,1.6); +// g->GetYaxis()->SetRangeUser(-5, 30); +// } + +// } + +// fun->SetLineWidth(3); +// fun->SetLineColor(4); +// fun->Draw("same"); + +// char out_char[100]; +// if(isScale){ +// sprintf(out_char,"%s #DeltaP = %.3f ^{+ %.3f}_{- %.3f} %s" , "", //region.Data(), +// (fun->GetParameter(1) -1 )*100 , +// 100./(sqrt(2* fun->GetParameter(3))), 100./(sqrt(2* fun->GetParameter(2))) , "%"); +// } else if(isPhi){ +// sprintf(out_char,"%s #Delta#phi = %.2f ^{+ %.2f}_{- %.2f} %s" , "", //region.Data(), +// fun->GetParameter(1), +// 1./(sqrt(2* fun->GetParameter(3))), 1./(sqrt(2* fun->GetParameter(2))), ""); +// //std::cout << out_char << std::endl; +// } else { +// sprintf(out_char,"%s #Delta#sigma = %.2f ^{+ %.2f}_{- %.2f} %s" , "", //region.Data(), +// fun->GetParameter(1)*100, +// 1./(sqrt(2* fun->GetParameter(3))) *100, 1./(sqrt(2* fun->GetParameter(2))) *100, "%"); +// //std::cout << out_char << std::endl; +// } + +// pt->Clear(); +// pt->AddText(out_char); +// pt->Draw(); pave.Draw(); // pt->Print(); @@ -722,16 +1082,283 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi=""){ gPad->Update(); gPad->SaveAs(img_filename(filename, variable, region)); gPad->SaveAs(img_filename(filename, variable, region,".C")); + gPad->SaveAs(img_filename(filename, variable, region,".png")); vars->add(*var_); } } + vars->Print(); vars->writeToFile(img_filename(filename,"FitResult-","",".config")); - system("cat "+img_filename(filename,"FitResult-","",".config")+" |awk '{printf(\"%s = %.4f +/- %.4f \", $1, $3, $5);print $6,$7,$8}' > "+img_filename(filename,"FitResult","",".config")); + system("cat "+img_filename(filename,"FitResult-","",".config")+" |awk '{printf(\"%s = %.4f +/- %.6f \", $1, $3, $5);print $6,$7,$8}' > "+img_filename(filename,"FitResult","",".config")); delete vars; delete pt; return; } + + + + +TH1F *MinimumProfile(TString filename, TString varname, TString regionname){ + gStyle->SetOptFit(0); + + TH1F *minHist = NULL; + if(varname.Contains("rho") || varname.Contains("constTerm")) minHist = new TH1F(varname+"_hist", "", 1000,0.005,0.015); + if(varname.Contains("alpha")) minHist = new TH1F(varname+"_hist", "", 600,0.00,0.06); + // TString region_set=filename; + //region_set.Remove(0,region_set.First('/')+1); + // std::cout << "REGION SET = " << region_set << std::endl; + // region_set.Remove(region_set.First("/")); + + typedef std::vector g_vec_t; + typedef std::map map_region_t; + std::map graph_map; + + std::cout << "Opening file: " << filename << std::endl; + TFile f_in(filename,"open"); + if(!f_in.IsOpen()){ + std::cerr << "Error. File not open" << std::endl; + return NULL; + } + + TList *KeyList = f_in.GetListOfKeys(); + for(int i =0; i < KeyList->GetEntries(); i++){ + TKey *currentKey=(TKey *)KeyList->At(i); + TString className=currentKey->GetClassName(); + // se non e' un TGraph passa oltre + //std::cout << i << " " << className << std::endl; + if (! className.CompareTo("TGraph")==0) continue; + TGraph *g = (TGraph *)currentKey->ReadObj(); + + + TString name=g->GetName(); + // std::cout << "name = " << name << std::endl; + name.Remove(0,name.First('_')+1); + TString variable=name(0,name.First('_')); + name.Remove(0,name.First('_')+1); + TString region=name(0,name.Last('_')); + name.Remove(0,name.Last('_')+1); + TString index=name(0,name.Length()); + + if(!variable.Contains(varname)) continue; + if(!region.Contains(regionname)) continue; + name=g->GetName(); + // std::cout << name << " " << variable << " " << region << " " << index << std::endl; + + + (graph_map[variable])[region].push_back(g); + } + + RooArgSet *vars= new RooArgSet(); + + TCanvas *c = new TCanvas("c","c"); + c->cd(); + + std::cout << "Looping" << std::endl; + for(std::map::const_iterator map_itr=graph_map.begin(); + map_itr!=graph_map.end(); + map_itr++){ + + for(map_region_t::const_iterator map_region_itr=map_itr->second.begin(); + map_region_itr!=map_itr->second.end(); + map_region_itr++){ + + TString region= map_region_itr->first; + TString variable = map_itr->first; + + for(std::vector::const_iterator g_itr = map_region_itr->second.begin(); + g_itr!= map_region_itr->second.end(); + g_itr++){ // loop over TGraphs + + + TGraph *graph = *g_itr; + if(graph==NULL) continue; // per sicurezza + Double_t *Y = graph->GetY(); + Double_t *X = graph->GetX(); + Int_t N = graph->GetN(); + + double minimum=Y[0]; + int iMin=0; + for(int i=0; i< N; i++){ // calcolo il minimo e il punto di minimo + if(minimum > Y[i]){ + minimum=Y[i]; + iMin=i; + } + } + + minHist->Fill(X[iMin]); + } + } + } + return minHist; +} + + +void propagate(TString filename="tmp/out.out", TString myRegion="absEta_0_1-bad-Et_20-trigger-noPF", Double_t Emean=7.179){ + + gROOT->ProcessLine(".L macro/macro_fit.C+"); + + std::ifstream ffin(filename); + TString variable, region; + Double_t rho_par[4], phi_par[4]; + + while(ffin.peek()!=EOF && ffin.good()){ + ffin >> variable >> region; + if(region!=myRegion) continue; + if(variable=="rho") ffin >> rho_par[0] >> rho_par[1] >> rho_par[2] >> rho_par[3]; + if(variable=="phi") ffin >> phi_par[0] >> phi_par[1] >> phi_par[2] >> phi_par[3]; + } + + TH1F *DeltaC = new TH1F("DeltaC", "", 200,0,0.05); + TH1F *DeltaS = new TH1F("DeltaS", "", 200,0,0.4); + + + Get_DeltaC_DeltaS(DeltaC, DeltaS, rho_par, phi_par, Emean); + + std::cout << "Delta C" << " " << myRegion << "\t" << DeltaC->GetMean() << "\t" + << DeltaC->GetRMS() << std::endl; + std::cout << "Delta S" << " " << myRegion << "\t" << DeltaS->GetMean() << "\t" + << DeltaS->GetRMS() << std::endl; + +} + + +void propagate(TString filename, int region){ + TString myRegion=""; + Double_t Emean=0; + if(region==0){myRegion="absEta_0_1-bad-Et_20-trigger-noPF-EB"; Emean=7.179;} + if(region==1){myRegion="absEta_0_1-gold-Et_20-trigger-noPF-EB"; Emean=7.051;} + if(region==2){myRegion="absEta_1_1.4442-bad-Et_20-trigger-noPF-EB"; Emean=8.712;} + if(region==3){myRegion="absEta_1_1.4442-gold-Et_20-trigger-noPF-EB"; Emean=8.08; } + + propagate(filename, myRegion, Emean); +} + + + +TGraphErrors *MeanGraphNew(TGraphErrors *graph){ + + int N = graph->GetN(); // number of points + if(17000 <= N) { + std::cerr << "ERROR: N_bins too big in MeanGraph:" << N << std::endl; + return NULL; + } + + std::map > g_in_map; + + Double_t x[17000]={0.}, y[17000]={0.}, y2[17000]={0.}, dev_st[17000], err_x[17000]; + + graphic_t graphic, graphic2; + + int n_max=0; + + double y_min=1e20; + + if(graph==NULL) return NULL; + if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; + + Double_t *Y = graph->GetY(); + Double_t *X = graph->GetX(); + Double_t X_bin=0.00001; //fabs(X[1]-X[0]); + // double minimum=TMath::MinElement(graph->GetN(),graph->GetY()); + double minimum=1e20; + double x_minimum=X[0]; + for(int i=1; iGetN(); i++){ // calcolo il minimo e il punto di minimo + if(minimum > Y[i]){ + minimum=Y[i]; + x_minimum=X[i]; + } + } + + for(int i =0 ; i < graph->GetN(); i++){ + graphic_t::iterator itr = graphic.find(X[i]); + if(itr!=graphic.end()){ + itr->second.y+=Y[i]; + itr->second.y2+=Y[i]*Y[i]; + itr->second.n++; + n_max = std::max(n_max,itr->second.n); + } else { + point_value_t p; + p.y=Y[i]; + p.y2=Y[i]*Y[i]; + p.n=1; + graphic.insert(std::make_pair(X[i],p)); + n_max = std::max(n_max,1); + } + } + + /*-----------------------------*/ + // std::cout << "N_MAX = " << n_max << std::endl; + int n=0; + y_min=1e10; + for(graphic_t::iterator itr=graphic.begin(); itr!=graphic.end(); itr++){ + + //if(itr->second.n < n_max*0.2){std::cout << "Removing point " << itr->first << "\t" << itr->second.n << std::endl; continue;} + x[n] = itr->first; + double ym = itr->second.y/itr->second.n; + y[n] = ym; + if(itr->second.n>1 && itr->second.y2/itr->second.n > ym*ym) + dev_st[n] = sqrt( (itr->second.y2/itr->second.n - ym*ym)/(double)(itr->second.n)); //errore sulla media + else + dev_st[n] = 1e-6; + err_x[n]=0; + + y_min = std::min(y_min,y[n]); +// std::cout << graph->GetName() << "\t" << graph->GetTitle() << x[n] << " " +// << y[n] << " " +// << dev_st[n] << " " +// << itr->second.y2/itr->second.n << " " << ym*ym << " " +// << itr->second.n +// << std::endl; + n++; + + } + + +// for(int i =0 ; i < graph->GetN(); i++){ +// graphic_t::iterator itr1 = graphic.find(X[i]); +// graphic_t::iterator itr = graphic2.find(X[i]); + +// double ym = itr1->second.y/itr1->second.n; +// double devst = sqrt( (itr1->second.y2/itr1->second.n - ym*ym)/(double)(itr1->second.n)); //errore sulla media +// //std::cout << ym << "\t" << devst << std::endl; +// //if(devst < 0.1 && fabs(Y[i]-ym) < 4 * devst) continue; + +// if(itr!=graphic2.end()){ +// itr->second.y+=Y[i]; +// itr->second.y2+=Y[i]*Y[i]; +// itr->second.n++; +// n_max = std::max(n_max,itr->second.n); +// } else { +// point_value_t p; +// p.y=Y[i]; +// p.y2=Y[i]*Y[i]; +// p.n=1; +// graphic2.insert(std::make_pair(X[i],p)); +// n_max = std::max(n_max,1); +// } +// } + +// /*-----------------------------*/ +// // std::cout << "N_MAX = " << n_max << std::endl; +// n=0; +// y_min=1e10; +// for(graphic_t::iterator itr=graphic2.begin(); itr!=graphic2.end(); itr++){ +// x[n] = itr->first; +// double ym = itr->second.y/itr->second.n; +// y[n] = ym; +// dev_st[n] = sqrt( (itr->second.y2/itr->second.n - ym*ym)/(double)(itr->second.n)); //errore sulla media +// err_x=0; + +// y_min = std::min(y_min,y[n]); +// n++; +// } + + TGraphErrors *g = new TGraphErrors(n, x, y, err_x, dev_st); + g->SetTitle(graph->GetTitle()); + g->SetName(graph->GetTitle()); + // g->Draw("AP*"); + return g; +} diff --git a/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C index 42d53312872..13de2ef080b 100644 --- a/ZFitter/macro/plot_data_mc.C +++ b/ZFitter/macro/plot_data_mc.C @@ -122,7 +122,7 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen mc->SetLineColor(kRed); mc->SetLineWidth(2); - mc->SetFillStyle(3002); + mc->SetFillStyle(1001); //3002 mc->SetFillColor(kRed); mc->Draw(); @@ -145,9 +145,9 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen // PlotCanvas(c, mc, data, mcSmeared); legend->Clear(); - legend->AddEntry(mc,"MC"); - legend->AddEntry(mcSmeared,"MC smeared"); - legend->AddEntry(data,"data"); + legend->AddEntry(mc,"MC","f"); + legend->AddEntry(mcSmeared,"MC smeared","l"); + legend->AddEntry(data,"data","p"); double KS=data->KolmogorovTest(mcSmeared); TString ks="Kolmogorov test: "; char line[50]; @@ -186,7 +186,7 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen legend->SetFillStyle(1001); legend->Draw(); - + c->SaveAs(img_filename(filename, region, ".eps")); c->SaveAs(img_filename(filename, region, ".png")); c->SaveAs(img_filename(filename, region, ".C")); @@ -200,7 +200,7 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen -void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ +void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi="", int rebin=0, TString myRegion=""){ TH2F eventFraction("eventFraction", "", 10, 0, 9, 10, 0, 9); @@ -285,7 +285,7 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ itr!= dataHist.end(); itr++){ c->cd(); TString region=itr->first; - + if(myRegion!="" && !region.Contains(myRegion)) continue; // for(int i_region=0; i_region < n_region -1; i_region++){ // for(int j_region=i_region; j_region < n_region; j_region++){ // region="region_"; @@ -301,32 +301,36 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi=""){ TH1F *data=GetMeanHist(dataHist[region], h_ref, "data_"+region, true); TH1F *mcSmeared=GetMeanHist(mcSmearedHist[region], h_ref, "mcSmeared_"+region); - if(region.Contains("EE")){ - if(mc_all[1] == NULL) mc_all[1]=(TH1F *) mc->Clone("EE_mc_hist"); - else mc_all[1]->Add(mc); - if(data_all[1] == NULL) data_all[1]=(TH1F *) data->Clone("EE_data_hist"); - else data_all[1]->Add(data); - if(mcSmeared_all[1] == NULL) mcSmeared_all[1]=(TH1F *) mcSmeared->Clone("EE_mcSmeared_hist"); - else mcSmeared_all[1]->Add(mcSmeared); - } - - if(region.Contains("EB")){ - if(mc_all[0] == NULL) mc_all[0]=(TH1F *) mc->Clone("EB_mc_hist"); - else mc_all[0]->Add(mc); - if(data_all[0] == NULL) data_all[0]=(TH1F *) data->Clone("EB_data_hist"); - else data_all[0]->Add(data); - if(mcSmeared_all[0] == NULL) mcSmeared_all[0]=(TH1F *) mcSmeared->Clone("EB_mcSmeared_hist"); - else mcSmeared_all[0]->Add(mcSmeared); - } +// if(region.Contains("EE")){ +// if(mc_all[1] == NULL) mc_all[1]=(TH1F *) mc->Clone("EE_mc_hist"); +// else mc_all[1]->Add(mc); +// if(data_all[1] == NULL) data_all[1]=(TH1F *) data->Clone("EE_data_hist"); +// else data_all[1]->Add(data); +// if(mcSmeared_all[1] == NULL) mcSmeared_all[1]=(TH1F *) mcSmeared->Clone("EE_mcSmeared_hist"); +// else mcSmeared_all[1]->Add(mcSmeared); +// } + +// if(region.Contains("EB")){ +// if(mc_all[0] == NULL) mc_all[0]=(TH1F *) mc->Clone("EB_mc_hist"); +// else mc_all[0]->Add(mc); +// if(data_all[0] == NULL) data_all[0]=(TH1F *) data->Clone("EB_data_hist"); +// else data_all[0]->Add(data); +// if(mcSmeared_all[0] == NULL) mcSmeared_all[0]=(TH1F *) mcSmeared->Clone("EB_mcSmeared_hist"); +// else mcSmeared_all[0]->Add(mcSmeared); +// } - if(mc_all[2] == NULL) mc_all[2]=(TH1F *) mc->Clone("all_mc_hist"); - else mc_all[2]->Add(mc); - if(data_all[2] == NULL) data_all[2]=(TH1F *) data->Clone("all_data_hist"); - else data_all[2]->Add(data); - if(mcSmeared_all[2] == NULL) mcSmeared_all[2]=(TH1F *) mcSmeared->Clone("all_mcSmeared_hist"); - else mcSmeared_all[2]->Add(mcSmeared); +// if(mc_all[2] == NULL) mc_all[2]=(TH1F *) mc->Clone("all_mc_hist"); +// else mc_all[2]->Add(mc); +// if(data_all[2] == NULL) data_all[2]=(TH1F *) data->Clone("all_data_hist"); +// else data_all[2]->Add(data); +// if(mcSmeared_all[2] == NULL) mcSmeared_all[2]=(TH1F *) mcSmeared->Clone("all_mcSmeared_hist"); +// else mcSmeared_all[2]->Add(mcSmeared); - + if(rebin>0){ + data->Rebin(rebin); + mc->Rebin(rebin); + mcSmeared->Rebin(rebin); + } Plot(c, data,mc,mcSmeared,legend, region, filename, energy, lumi); } diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index bd85a3da2dc..0e1d0074a1b 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -13,7 +13,20 @@ invMass_var=invMass_SC_regrCorrSemiParV5_pho baseDir=test updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" #updateOnly="" +########################################################### +regionFileStep1=data/regions/scaleStep1.dat +regionFileStep2EB=data/regions/scaleStep2smearing_1.dat +regionFileStep2EE=data/regions/scaleStep2smearing_2.dat + +regionFileStep4EB=data/regions/scaleStep4smearing_1.dat +regionFileStep4EE=data/regions/scaleStep4smearing_2.dat + +regionFileStep5EB=data/regions/scaleStep2smearing_9.dat +regionFileStep5EE=data/regions/scaleStep2smearing_10.dat +outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +outFileStep2=step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +############################################################# usage(){ echo "`basename $0` [options]" echo " -f arg config file" @@ -78,6 +91,8 @@ case ${selection} in ;; medium) ;; + tight) + ;; *) echo "[ERROR] Selection ${selection} not configured" >> /dev/stderr exit 1 @@ -96,12 +111,15 @@ case ${STEP} in echo " - 4: closure test of 2: eta x R9 (smearing method), for final histograms and profiles" echo " - 5: plot and profile only in Et categories with smearings from step4" echo " - 6: smearings from step4, scales in Et x eta x R9 categories" - echo " - 7: eta x R9 with R9 reweight" + echo " - 7: eta x R9 x Et, scale and smearings" ;; 1) STEP1=y;; 2) STEP2=y;; 3) STEP3=y;; #SLIDE=y;; 4) STEP4=y;; + 4weight) STEP4=y; extension=weight;; + 4medium) STEP4=y; extension=medium;; + 4tight) STEP4=y; extension=tight;; 5) STEP5=y;; 6) STEP6=y;; 8) STEP8=y;; @@ -117,7 +135,7 @@ case ${STEP} in 3stability) STEP3Stability=y;; 1stability) STEP1Stability=y;; syst) SYSTEMATICS=y;; - 3weight) STEP3WEIGHT=y;; + 3weight) STEP3WEIGHT=y; STEP3=y; extension=weight;; 2fit) STEP2FIT=y;; 1-2fit) STEP1=y; STEP2FIT=y;; all) STEP1stability=y; STEP1=y; STEP2FIT=y; STEP3=y; STEP3Stability=y; STEP4=y; SLIDE=y;; @@ -150,6 +168,20 @@ outDirTable=${outDirData}/table if [ ! -e "${outDirData}/table" ];then mkdir ${outDirData}/table -p; fi if [ ! -e "${outDirData}/log" ];then mkdir ${outDirData}/log -p; fi +if [ "${extension}" == "weight" ];then + tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` + for tag in $tags + do + if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c r9Weight`" == "0" ];then + echo "[STATUS] Adding r9weight trees to $tag" + ./bin/ZFitter.exe -f ${configFile} --regionsFile data/regions/scaleStep2smearing_1.dat \ + --saveRootMacro --r9WeightFile=data/r9weights/R9weights_CMSSW53X_RD1.root \ + --smearerFit + mv tmp/r9Weight_${tag}-`basename $configFile .dat`.root data/r9weights/ || exit 1 + echo -e "$tag\tr9Weight\tdata/r9weights/r9Weight_${tag}-`basename $configFile .dat`.root" >> $configFile + fi + done +fi if [ -n "${STEP1}" ];then # runNumber x eta with fitMethod @@ -161,9 +193,10 @@ if [ -n "${STEP1}" ];then if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi if [ ! -e "${outDirData}/fitres" ];then mkdir ${outDirData}/fitres -p; fi if [ ! -e "${outDirData}/img" ];then mkdir ${outDirData}/img -p; fi + if [ ! -e "${outDirData}/step1" ];then mkdir ${outDirData}/step1 -p; fi ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut $commonCut \ + $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut $commonCut \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img \ > ${outDirData}/log/`basename ${outFile} .dat`.log || exit 1 @@ -174,15 +207,12 @@ if [ -n "${STEP1}" ];then ./script/tex2txt.sh ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.tex | awk -F "\t" -f awk/recalibOutput.awk |grep -v '^%' > ${outFile} - - #save root files with step1 corrections ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - --saveRootMacro \ - --corrEleType HggRunEta \ - --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat + --saveRootMacro --corrEleType HggRunEta \ + --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat || exit 1 - mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step1/ + mv tmp/scaleEle_HggRunEta_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step1/ echo "[STATUS] Step 1 done" else echo "[STATUS] Step 1 already done" @@ -208,7 +238,7 @@ if [ -n "${STEP2FIT}" ];then | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ > ${outDirData}/log/`basename $outFile .dat`.log || exit 1 @@ -233,11 +263,14 @@ fi if [ -n "${STEP2}" ];then - #eta x R9 with fit method - regionFile=data/regions/scaleStep2smearing_1.dat - outFile=step2fit-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + #eta x R9 with smearing method + regionFileEB=${regionFileStep2EB} + regionFileEE=${regionFileStep2EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + regionFile=$regionFileEB + outFile=step2${extension}-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat - outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat if [ ! -e "${outDirTable}/${outFileStep1}" ];then echo "[ERROR] Impossible to run step2 without step1" >> /dev/stderr #exit 1 @@ -250,8 +283,8 @@ if [ -n "${STEP2}" ];then if [ ! -e "${outDirData}/step2${extension}/fitres" ];then mkdir ${outDirData}/step2${extension}/fitres -p; fi if [ ! -e "${outDirData}/step2${extension}/img" ];then mkdir ${outDirData}/step2${extension}/img -p; fi - if [ -e "${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt" ];then - initFile="--initFile=${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt"; + if [ -e "${outDirTable}/params-step2-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step2-${commonCut}.txt"; else initFile="" fi @@ -260,11 +293,18 @@ if [ -n "${STEP2}" ];then for tag in $tags do if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ --saveRootMacro \ --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFile .dat`_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionFile .dat`\tdata/smearerCat/smearerCat_`basename $regionFile .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_${basenameEB}_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_${basenameEB}\tdata/smearerCat/smearerCat_${basenameEB}_${tag}-`basename $configFile .dat`.root" >> $configFile + + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_${basenameEE}_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_${basenameEE}\tdata/smearerCat/smearerCat_${basenameEE}_${tag}-`basename $configFile .dat`.root" >> $configFile + fi done @@ -272,78 +312,75 @@ if [ -n "${STEP2}" ];then # this way I do not reproduce the ntuples with the corrections any time cat $configFile \ | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` - - for index in `seq 1 50` - do - mkdir ${outDirData}/step2/${index}/fitres/ -p - mkdir ${outDirData}/step2/${index}/img -p - bsub -q 2nd \ - -oo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stdout.log \ - -eo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stderr.log \ - -J "`basename $regionFile .dat` step2" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFile} \ -$isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ ---outDirFitResMC=${outDirMC}/fitres ---outDirImgMC=${outDirMC}/img ---outDirImgData=${outDirData}/step2/${index}/img/ ---outDirFitResData=${outDirData}/step2/${index}/fitres ---constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} || exit 1" - done - ./script/haddTGraph.sh -o ${outDirData}/step2/outProfile.root ${outDirData}/step2/*/fitres/10/outProfile*.root +# for index in `seq 1 50` +# do +# mkdir ${outDirData}/step2/${index}/fitres/ -p +# mkdir ${outDirData}/step2/${index}/img -p +# bsub -q 2nd \ +# -oo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stdout.log \ +# -eo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stderr.log \ +# -J "${basenameEB} step2" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/${index}/img/ --outDirFitResData=${outDirData}/step2/${index}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/${index}/${basenameEB}-done" +# done + + # for index in `seq 1 50` + # do +bsub -q 2nd \ + -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEE} step2[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEE}-done" + + +while [ "`bjobs -J \"${basenameEB} step2\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 1m; done +while [ "`bjobs -J \"${basenameEE} step2\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 1m; done + ./script/haddTGraph.sh -o ${outDirData}/step2/fitres/outProfile-scaleStep2smearing_1-${commonCut}.root ${outDirData}/step2/*/fitres/outProfile-scaleStep2smearing_1-${commonCut}.root + ./script/haddTGraph.sh -o ${outDirData}/step2/fitres/outProfile-scaleStep2smearing_2-${commonCut}.root ${outDirData}/step2/*/fitres/outProfile-scaleStep2smearing_2-${commonCut}.root + + ######################################################33 echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C.C+\");" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step2/outProfile.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step2/fitres/outProfile-scaleStep2smearing_1-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step2/fitres/outProfile-scaleStep2smearing_2-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C - - time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ - --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ -# $initFile > - -# cp ${outDirData}/step2/fitres/params-${regionFile}-${commonCut}.txt ${outDirData}/step2/fitres/step2smearing_1.txt -# cp ${outDirData}/step2/fitres/histos-${regionFile}-${commonCut}.root ${outDirData}/step2/fitres/histos_step2smearing_1.root -# cp ${outDirData}/step2/fitres/outProfile-${regionFile}-${commonCut}.root ${outDirData}/step2/fitres/outProfile_step2smearing_1.root -# sed -i 's|L|C L|;s|C C L|C L|' ${outDirData}/step2/fitres/params.txt - - grep scale ${outDirData}/step2/fitres/params-`basename ${regionFile} .dat`-${commonCut}.txt | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat - - regionFile=data/regions/scaleStep2smearing_2.dat - if [ -e "${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt" ];then - initFile="--initFile=${outDirTable}/params-`basename ${regionFile} .dat`-${commonCut}.txt"; - else - initFile="" - fi - -time ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --smearerFit --autoBin \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ - --corrEleType HggRunEta --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ - $initFile > tmp/step2smearing_2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log -# --initFile=${outDirData}/step2/fitres/params-scaleStep2smearing_1-${commonCut}.txt \ - - grep scale ${outDirData}/step2/fitres/params-`basename ${regionFile} .dat`-${commonCut}.txt | grep EE | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat - - ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |grep -v '#' > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat - ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - + grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat + + grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +# + sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat + ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |grep -v '#' > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + # cat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - + + #save root files with step1 corrections + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat || exit 1 + + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ fi + #save root files with step1 corrections + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat || exit 1 + + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi - if [ -n "${STEP3}" ];then regionFile=data/regions/scaleStep3.dat if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi @@ -362,83 +399,114 @@ if [ -n "${STEP3}" ];then fi + if [ -n "${STEP4}" ];then + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi - if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi - if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step4/fitres/$index" ];then mkdir ${outDirData}/step4/fitres/$index -p; fi - if [ ! -e "${outDirData}/step4/img/$index" ];then mkdir ${outDirData}/step4/img/$index -p; fi + #eta x R9 with smearing method + regionFileEB=${regionFileStep4EB} + regionFileEE=data/regions/scaleStep4smearing_2.dat + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + regionFile=$regionFileEB + outFile=$outDirTable/step4${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat -# if [ ! -e "${outDirData}/step4_fixed/fitres" ];then mkdir ${outDirData}/step4_fixed/fitres -p; fi -# if [ ! -e "${outDirData}/step4_fixed/img" ];then mkdir ${outDirData}/step4_fixed/img -p; fi + if [ ! -e "${outDirTable}/${outFileStep2}" ];then + echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr + #exit 1 + fi -# if [ ! -e "${outDirData}/step4_constOnly/fitres" ];then mkdir ${outDirData}/step4_constOnly/fitres -p; fi -# if [ ! -e "${outDirData}/step4_constOnly/img" ];then mkdir ${outDirData}/step4_constOnly/img -p; fi + if [ -e "${outDirTable}/params-step4-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step4-${commonCut}.txt"; + else + initFile="" + fi + + if [ ! -e "${outFile}" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step4${extension}/fitres" ];then mkdir ${outDirData}/step4${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step4${extension}/img" ];then mkdir ${outDirData}/step4${extension}/img -p; fi + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` + for tag in $tags + do + if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEB .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEE .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + fi + done + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step4${extension}/`basename $configFile` + + for index in `seq 1 50` + do + mkdir ${outDirData}/step4${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step4${extension}/${index}/img -p + done + + bsub -q 2nd \ + -oo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step4${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEE} step4${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + +# fi + while [ "`bjobs -J \"${basenameEB} step4${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + while [ "`bjobs -J \"${basenameEE} step4${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root -# #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ -# regionFile=data/regions/scaleStep2smearing_8.dat -# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ -# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4_fixed/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4_fixed/img \ -# --smearerFit --autoNsmear --constTermFix --alphaGoldFix \ -# --corrEleType HggRunEta \ -# --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ -# --plotOnly --initFile=${outDirData}/step2/fitres/params-scaleStep2smearing_8-${commonCut}.txt \ -# --addBranch=smearerCat > ${outDirData}/log/step4fixedplotOnlysmearing_8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - - #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 -# exit 0 -# regionFile=data/regions/scaleStep4smearing_0.dat -# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ -# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ -# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ -# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ -# --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ -# > ${outDirData}/log/step4_0-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 -# regionFile=data/regions/scaleStep4smearing_0a.dat -# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ -# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ -# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ -# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ -# --profileOnly --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ -# > ${outDirData}/log/step4smearing_0a-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + fi - regionFile=data/regions/scaleStep4smearing_1.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ - --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --plotOnly --profileOnly \ - --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ - --addBranch=smearerCat \ - > ${outDirData}/log/step4smearing_1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + cat ${outDirData}/step4${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} + grep -v absEta_0_1 ${outDirData}/step4${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} - exit 0 - regionFile=data/regions/scaleStep4smearing_2.dat - # --initFile=${outDirData}/step4/fitres/params.txt \ + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step4/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step4/img \ - --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --plotOnly --profileOnly \ - --initFile=${outDirData}/step2/img/outProfile-scaleStep2smearing-${commonCut}-FitResult.config \ - --addBranch=smearerCat \ - > ${outDirData}/log/step4smearing_2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - #./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 - # cp ${outDirData}/step4/fitres/params.txt ${outDirData}/step4/fitres/step4smearing_2.txt - # cp ${outDirData}/step4/fitres/histos.root ${outDirData}/step4/fitres/histos_step4smearing_2.root - # cp ${outDirData}/step4/fitres/outProfile.root ${outDirData}/step4/fitres/outProfile_step4smearing_2.root + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 fi @@ -463,42 +531,379 @@ if [ -n "${STEP3WEIGHT}" ];then fi + if [ -n "${STEP5}" ];then - # traditional resolution categories, Et bin categorization, only profile and histograms + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi - if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi - if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step5/fitres/$index" ];then mkdir ${outDirData}/step5/fitres/$index -p; fi - if [ ! -e "${outDirData}/step5/img/$index" ];then mkdir ${outDirData}/step5/img/$index -p; fi + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=step5${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat - #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ - regionFile=data/regions/scaleStep2smearing_9.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step5/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step5/img \ - --constTermFix --plotOnly \ - --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --initFile=${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt \ - --addBranch=smearerCat > ${outDirData}/log/step5-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + if [ ! -e "${outDirTable}/${outFileStep2}" ];then + echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr + #exit 1 + fi -# ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 - exit 0 + if [ ! -e "${outDirTable}/${outFile}" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step5${extension}/fitres" ];then mkdir ${outDirData}/step5${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step5${extension}/img" ];then mkdir ${outDirData}/step5${extension}/img -p; fi + + if [ -e "${outDirTable}/params-step5-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step5-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step5-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step4" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step5-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step4" >> /dev/stdout + + grep constTerm ${outDirData}/step4/img/outProfile-`basename ${regionFileStep4EB} .dat`-${commonCut}-FitResult.config |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' > ${outDirTable}/params-step5-${commonCut}.txt + grep constTerm ${outDirData}/step4/img/outProfile-`basename ${regionFileStep4EB} .dat`-${commonCut}-FitResult.config |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step5-${commonCut}.txt + + grep constTerm ${outDirData}/step4/img/outProfile-`basename ${regionFileStep4EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step5-${commonCut}.txt + grep constTerm ${outDirData}/step4/img/outProfile-`basename ${regionFileStep4EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step5-${commonCut}.txt + initFile="--initFile=${outDirTable}/params-step5-${commonCut}.txt"; + cat ${outDirTable}/params-step5-${commonCut}.txt + exit 0 + fi + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` + for tag in $tags + do + if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEB .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEE .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + fi + done + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step5${extension}/`basename $configFile` + + for index in `seq 1 50` + do + mkdir ${outDirData}/step5${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step5${extension}/${index}/img -p + done + + bsub -q 2nd \ + -oo ${outDirData}/step5${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step5${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step5${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step5${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step5${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step5${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 --profileOnly --plotOnly || exit 1; touch ${outDirData}/step5${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step5${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step5${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEE} step5${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step5${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step5${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step5${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 --profileOnly --plotOnly || exit 1; touch ${outDirData}/step5${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + + fi + while [ "`bjobs -J \"${basenameEB} step5${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + while [ "`bjobs -J \"${basenameEE} step5${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + ./script/haddTGraph.sh -o ${outDirData}/step5${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step5${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + ./script/haddTGraph.sh -o ${outDirData}/step5${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step5${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step5${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step5${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + + +fi + +if [ -n "${STEP6}" ];then + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=step6${extension}-${invMass_var}-${newSelection}-${commonCut}-FitConfig.dat + + if [ ! -e "${outDirTable}/${outFileStep2}" ];then + echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr + #exit 1 + fi + + if [ ! -e "${outDirTable}/${outFile}" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step6${extension}/fitres" ];then mkdir ${outDirData}/step6${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step6${extension}/img" ];then mkdir ${outDirData}/step6${extension}/img -p; fi + + if [ -e "${outDirTable}/params-step5-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step5-${commonCut}.txt"; + else + echo "[ERROR] ${outDirTable}/params-step5-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` + for tag in $tags + do + if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEB .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEE .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + fi + done + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step6${extension}/`basename $configFile` + + for index in `seq 1 50` + do + mkdir ${outDirData}/step6${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step6${extension}/${index}/img -p + done + +# bsub -q 2nd \ +# -oo ${outDirData}/step6${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ +# -eo ${outDirData}/step6${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ +# -J "${basenameEB} step6${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step6${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step6${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ +# -eo ${outDirData}/step6${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ +# -J "${basenameEE} step6${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step6${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + + fi + while [ "`bjobs -J \"${basenameEB} step6${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + while [ "`bjobs -J \"${basenameEE} step6${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + ./script/haddTGraph.sh -o ${outDirData}/step6${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step6${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + ./script/haddTGraph.sh -o ${outDirData}/step6${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step6${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step6${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step6${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C +# root -l -b -q tmp/fitProfiles.C + + cat ${outDirData}/step6${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config ${outDirData}/step6${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config > ${outFile} + + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + + ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} corrEleType=HggRunEtaR9 --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 - regionFile=data/regions/scaleStep2smearing_10.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step5/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step5/img \ - --constTermFix \ - --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ - --initFile=${outDirData}/table/step5-scaleStep2smearing_10-${commonCut}.txt \ - --addBranch=smearerCat > ${outDirData}/log/step5-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 fi +if [ -n "${STEP7}" ];then + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=step6${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + + if [ ! -e "${outDirTable}/${outFileStep2}" ];then + echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr + #exit 1 + fi + + if [ ! -e "${outDirTable}/${outFile}" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step7${extension}/fitres" ];then mkdir ${outDirData}/step7${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step7${extension}/img" ];then mkdir ${outDirData}/step7${extension}/img -p; fi + + if [ -e "${outDirTable}/params-step7-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step7-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step7-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step6" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step7-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step6" >> /dev/stdout + + grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' > ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step7-${commonCut}.txt + + grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' >> ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step7-${commonCut}.txt + initFile="--initFile=${outDirTable}/params-step7-${commonCut}.txt"; + cat ${outDirTable}/params-step7-${commonCut}.txt + exit 0 + + echo "[ERROR] ${outDirTable}/params-step7-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` + for tag in $tags + do + if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEB .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ + --saveRootMacro \ + --addBranch=smearerCat --smearerFit + mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root || exit 1 + echo -e "$tag\tsmearerCat_`basename $regionFileEE .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile + + fi + done + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step7${extension}/`basename $configFile` + + for index in `seq 1 50` + do + mkdir ${outDirData}/step7${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step7${extension}/${index}/img -p + done + +# bsub -q 2nd \ +# -oo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ +# -eo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ +# -J "${basenameEB} step7${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step7${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ +# -eo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ +# -J "${basenameEE} step7${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step7${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + + fi + while [ "`bjobs -J \"${basenameEB} step7${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + while [ "`bjobs -J \"${basenameEE} step7${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + ./script/haddTGraph.sh -o ${outDirData}/step7${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step7${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + ./script/haddTGraph.sh -o ${outDirData}/step7${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step7${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step7${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step7${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + + +fi + +exit 0 +# if [ -n "${STEP5}" ];then +# # traditional resolution categories, Et bin categorization, only profile and histograms + +# if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi +# if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi +# if [ ! -e "${outDirData}/step5/fitres/$index" ];then mkdir ${outDirData}/step5/fitres/$index -p; fi +# if [ ! -e "${outDirData}/step5/img/$index" ];then mkdir ${outDirData}/step5/img/$index -p; fi + +# #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ +# regionFile=data/regions/scaleStep2smearing_9.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step5/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step5/img \ +# --constTermFix --plotOnly \ +# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ +# --initFile=${outDirData}/table/step5-scaleStep2smearing_9-${commonCut}.txt \ +# --addBranch=smearerCat > ${outDirData}/log/step5-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + +# # ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 +# exit 0 + +# regionFile=data/regions/scaleStep2smearing_10.dat +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step5/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step5/img \ +# --constTermFix \ +# --smearerFit --autoNsmear --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat \ +# --initFile=${outDirData}/table/step5-scaleStep2smearing_10-${commonCut}.txt \ +# --addBranch=smearerCat > ${outDirData}/log/step5-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + +# fi + # if [ -n "${STEP6}" ];then # # traditional resolution categories, only scales in Et bins diff --git a/ZFitter/script/makeCorrVsRunNumber.py b/ZFitter/script/makeCorrVsRunNumber.py index 8ca735e7a36..c4c80413af3 100755 --- a/ZFitter/script/makeCorrVsRunNumber.py +++ b/ZFitter/script/makeCorrVsRunNumber.py @@ -23,7 +23,7 @@ def readResCorr(input): if len(l) < 3: continue key,dmM,dmMErr = str(l[0]), float(l[1]), float(l[2]) -# print '%s %f %f' % (key,dmM,dmMErr) + print '%s %f %f' % (key,dmM,dmMErr) lst[ key ] = ( dmM,dmMErr ) return lst diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index ba2191c0d4b..d5cd1bbad75 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -62,8 +62,8 @@ TString EnergyScaleCorrection_class::GetElectronCategory(bool isEBEle, double R9 TString category; - if(isEBEle) category="EB"; - else category="EE"; +// if(isEBEle) category="EB"; +// else category="EE"; if(isHggCat){ if(correctionType.Contains("Hgg",TString::kIgnoreCase)){ @@ -71,11 +71,11 @@ TString EnergyScaleCorrection_class::GetElectronCategory(bool isEBEle, double R9 // if(correctionType.CompareTo("Hgg_eta_runNumber")==0){ if(isEBEle){ - if (fabs(etaSCEle)>1.) category+="-absEta_1_1.4442"; - else category+="-absEta_0_1"; + if (fabs(etaSCEle)>1.) category+="absEta_1_1.4442"; + else category+="absEta_0_1"; } else { - if (fabs(etaSCEle) > 2) category+="-absEta_2_2.5"; - else category+="-absEta_1.566_2"; + if (fabs(etaSCEle) > 2) category+="absEta_2_2.5"; + else category+="absEta_1.566_2"; } } if(correctionType.Contains("residual",TString::kIgnoreCase)||correctionType.Contains("R9",TString::kIgnoreCase)){ diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 52927c85a7c..543eb95171c 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -33,7 +33,7 @@ RooSmearer::RooSmearer(const char *name, ///< name of the variable _paramSet("paramSet","Set of parameters",this), invMass_min_(80), invMass_max_(100), invMass_bin_(0.25), deltaNLLMaxSmearToy(330), - _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(50), + _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(20), nllBase(0), nllVar("nll","",0,1e20), _isDataSmeared(false), diff --git a/ZFitter/src/r9Weights_class.cc b/ZFitter/src/r9Weights_class.cc index 27f33780f00..3bfb504f6f8 100644 --- a/ZFitter/src/r9Weights_class.cc +++ b/ZFitter/src/r9Weights_class.cc @@ -28,12 +28,18 @@ double r9Weights_class::GetWeight(double etaEle_, double R9Ele_){ TString categoryName; if(fabs(etaEle_) < 1.) categoryName="EBlowEta"; - if(fabs(etaEle_) >= 1 && fabs(etaEle_) <= 1.479) categoryName="EBhighEta"; - if(fabs(etaEle_) > 1.479 && fabs(etaEle_) < 2) categoryName="EElowEta"; - if(fabs(etaEle_) >= 2) categoryName="EEhighEta"; - + else if(fabs(etaEle_) >= 1. && fabs(etaEle_) <= 1.479) categoryName="EBhighEta"; + else if(fabs(etaEle_) > 1.479 && fabs(etaEle_) < 2) categoryName="EElowEta"; + else if(fabs(etaEle_) >= 2) categoryName="EEhighEta"; + else{ + std::cerr << "Category not found: " + << "etaEle = " << etaEle_ << "\t" + << "R9Ele = " << R9Ele_ << std::endl; + return 0; + } if (R9Ele_>=0.94) categoryName+="Gold"; - if (R9Ele_<0.94 ) categoryName+="Bad"; + else //if (R9Ele_<0.94 ) + categoryName+="Bad"; if(categoryName.Sizeof()>1){ // altrimenti non e' delle categorie definite sopra std::vector WeightCat_vec; @@ -102,6 +108,7 @@ void r9Weights_class::ReadFromFile(std::string filename){ // TString keyName = (KeyList->At(i))->GetName(); if(h==NULL) std::cerr << "[ERROR] histogram null from file: " << filename << std::endl; TString keyName = h->GetName(); + //h->Scale(1./h->Integral()); // if the electron category is not yet defined, add it if (r9weights.count(keyName)==0){ @@ -143,6 +150,7 @@ void r9Weights_class::ReadFromFile(std::string filename){ // tree is the input MC tree // fastLoop = false if for any reason you don't want to change the branch status of the MC tree TTree *r9Weights_class::GetTreeWeight(TChain *tree, bool fastLoop, TString etaElebranchName, TString R9ElebranchName, TString ptElebranchName){ + tree->ResetBranchAddresses(); Float_t weight[2]={0.}; Float_t ptWeight[2]={0.}; From 784f838e97cd433a33f26f1f1c366e0c3ae8c3d4 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 28 Nov 2013 14:50:33 +0100 Subject: [PATCH 191/475] modified EnergyScaleCorrection to use also Et dependent corrections --- .../interface/EnergyScaleCorrection_class.h | 174 +++++++++++++++++- ZFitter/src/EnergyScaleCorrection_class.cc | 69 +++++-- ZFitter/test/test.cpp | 22 +++ 3 files changed, 246 insertions(+), 19 deletions(-) diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index c3ae2aee669..56e77c43dd1 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -9,13 +9,174 @@ //#include "correction_class.h" #include #include +#include -typedef std::map < TString, std::pair > correction_map_t; -typedef struct { - int runMax; - correction_map_t correction_map; +class correctionCategory_class{ + public: + unsigned int runmin; + unsigned int runmax; + float r9min; + float r9max; + float etmin; + float etmax; + float etamin; + float etamax; + std::string category; + + float scale; + float scale_err; + // float smearing; + //float smearing_err; + + public: + correctionCategory_class(const unsigned int runNumber, const float etaEle, const float R9Ele, const float EtEle){ + runmin=runNumber; runmax=runNumber; + etamin=etaEle; etamax=etaEle; + r9min=R9Ele; r9max=R9Ele; + etmin=EtEle; etmax=EtEle; + } + + correctionCategory_class(std::string category){ + runmin=0; runmax=999999; + etamin=-1;etamax=10; + r9min=-1;r9max=10; + etmin=-1;etmax=1e6; + + unsigned int p1 = category.find("absEta_"); + unsigned int p2 = p1+1; + + if(category.find("absEta_0_1")!=std::string::npos){ etamin=0; etamax=1;} + else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.4442;} + else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.566; etamax=2;} + else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=2.5;} + else{ + if(p1!=std::string::npos){ + p1 = category.find("_",p1); + p2 = category.find("_",p1+1); + etamin = TString(category.substr(p1+1, p2-p1-1)).Atof(); + p1 = p2; + p2 = category.find("-",p1); + etamax = TString(category.substr(p1+1, p2-p1-1)).Atof(); + } + } + + p1 = category.find("EtEle_"); + p2 = p1+1; + if(p1!=std::string::npos){ + p1 = category.find("_",p1); + p2 = category.find("_",p1+1); + etmin = TString(category.substr(p1+1, p2-p1-1)).Atof(); + p1 = p2; + p2 = category.find("-",p1); + etmax = TString(category.substr(p1+1, p2-p1-1)).Atof(); + } + // std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << std::endl; + + + if(category.find("gold")!=std::string::npos){ r9min=0.94; r9max=10;} + else if(category.find("bad")!=std::string::npos){ r9min=-1; r9max=0.94;}; + + }; + + + correctionCategory_class(TString category_){ + std::string category(category_.Data()); + runmin=0; runmax=999999; + etamin=-1;etamax=10; + r9min=-1;r9max=10; + etmin=-1;etmax=1e6; + + unsigned int p1 = category.find("absEta_"); + unsigned int p2 = p1+1; + + if(category.find("absEta_0_1")!=std::string::npos){ etamin=0; etamax=1;} + else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.4442;} + else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.566; etamax=2;} + else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=2.5;} + else{ + if(p1!=std::string::npos){ + p1 = category.find("_",p1); + p2 = category.find("_",p1+1); + etamin = TString(category.substr(p1+1, p2-p1-1)).Atof(); + p1 = p2; + p2 = category.find("-",p1); + etamax = TString(category.substr(p1+1, p2-p1-1)).Atof(); + } + } + + p1 = category.find("EtEle_"); + p2 = p1+1; + if(p1!=std::string::npos){ + p1 = category.find("_",p1); + p2 = category.find("_",p1+1); + etmin = TString(category.substr(p1+1, p2-p1-1)).Atof(); + p1 = p2; + p2 = category.find("-",p1); + etmax = TString(category.substr(p1+1, p2-p1-1)).Atof(); + } + // std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << std::endl; + + + if(category.find("gold")!=std::string::npos){ r9min=0.94; r9max=10;} + else if(category.find("bad")!=std::string::npos){ r9min=-1; r9max=0.94;}; + + }; + +/* friend bool operator < (const correctionCategory_class& a, const correctionCategory_class& b){ */ +/* if(a.runmin < b.runmin) return true; */ +/* if(a.runmax > b.runmax) return false; */ + +/* if(a.etamin < b.etamin) return true; */ +/* if(a.etamax > b.etamax) return false; */ + +/* if(a.r9min < b.r9min) return true; */ +/* if(a.r9max > b.r9max) return false; */ + +/* if(a.etmin < b.etmin) return true; */ +/* if(a.etmax > b.etmax) return false; */ +/* return false; */ + +/* }; */ + + + // inline correction_class(void){}; + bool operator<(const correctionCategory_class& b) const; +/* friend bool less(const correctionCategory_class& a, const correctionCategory_class& b) const{ */ +/* return (a < b); */ +/* }; */ + + friend ostream& operator << (ostream& os, const correctionCategory_class a){ + os << a.runmin << " " << a.runmax + << "\t" << a.etamin << " "< runmin && runNumber < runmax */ +/* && fabs(etaEle) > etamin && fabs(etaEle) < etamax */ +/* && R9Ele > r9min && R9Ele < r9max */ +/* && EtEle > etmin && EtEle < etmax); */ +/* }; */ + +/* bool operator < (const unsigned int runNumber, const float etaEle, const float R9Ele, const float EtEle){ */ +/* return (runNumber < runmin && runNumber < runmax */ +/* && fabs(etaEle) > etamin && fabs(etaEle) < etamax */ +/* && R9Ele > r9min && R9Ele < r9max */ +/* && EtEle > etmin && EtEle < etmax); */ +/* }; */ +}; + + +//typedef std::map < TString, std::pair > correction_map_t; +typedef std::map < correctionCategory_class, std::pair > correction_map_t; + + +typedef struct{ + int runMax; + correction_map_t correction_map; } correction_t; class EnergyScaleCorrection_class{ @@ -30,14 +191,16 @@ class EnergyScaleCorrection_class{ TString smearingFileName="", TString smearingType_=""); ~EnergyScaleCorrection_class(void); void ReadFromFile(TString filename); - float getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle); // deprecated + float getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle); // deprecated float ScaleCorrection(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, + double EtEle, int nPV, float nPVmean); TTree *GetCorrTree(TChain *tree, bool fastLoop=true, TString runNumberBranchName="runNumber", TString R9EleBranchName="R9Ele", TString etaEleBranchName="etaEle", TString etaSCEleBranchName="etaSCEle", + TString energySCEleBranchName="energySCEle", TString nPVBranchName="nPV"); private: @@ -72,4 +235,5 @@ class EnergyScaleCorrection_class{ }; + #endif diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index ba2191c0d4b..7504902f96c 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -84,6 +84,12 @@ TString EnergyScaleCorrection_class::GetElectronCategory(bool isEBEle, double R9 // if(R9Ele>0.94) category+="Gold"; // else category+="Bad"; } + if(correctionType.Contains("Et",TString::kIgnoreCase)){ + if(R9Ele>0.94) category+="-gold"; + else category+="-bad"; + // if(R9Ele>0.94) category+="Gold"; + // else category+="Bad"; + } } } @@ -117,7 +123,7 @@ std::map< int, correction_t>::const_iterator EnergyScaleCorrection_class::FindRu } -float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle){ +float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle){ if(noCorrections) return 1; if(runMin_map.empty()){ std::cerr << "[ERROR] runMin_map empty and calibration required" << std::endl; @@ -161,15 +167,27 @@ float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, d } #endif - TString category=GetElectronCategory(isEBEle, R9Ele, etaSCEle); + //TString category=GetElectronCategory(isEBEle, R9Ele, etaSCEle); + correctionCategory_class category(runNumber, etaSCEle, R9Ele,EtEle); + //correctionCategory_class category(0, etaSCEle, R9Ele,EtEle); +// if(correction_map_p->upper_bound(category) == correction_map_p->end()){ +// exit (1); +// } +// std::cout << correction_map_p->upper_bound(category)->first << std::endl; + +// exit (0); + if(! (category < (--(correction_map_p->upper_bound(category)))->first)) + std::cout << category << std::endl << + (--(correction_map_p->upper_bound(category)))->first <find(category)->second.first << std::endl; #endif - if(correction_map_p->count(category)==1) + if(correction_map_p->count(category)==1){ return correction_map_p->find(category)->second.first; - else{ + } else{ + return (--(correction_map_p->upper_bound(category)))->second.first; //->second.first(); //upper_bound(category)->second.first; std::cerr << "[ERROR] Electron category " << category << " not found!!!! Scale offset not applied" << std::endl; std::cerr << " " << runNumber << "\t" << runCorrection_itr->first << "\t" << runCorrection_itr->second.runMax << std::endl; exit(1); @@ -193,7 +211,7 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax #endif // return; // } - + correctionCategory_class cat(category_); std::map ::iterator itr=runMin_map.find(runMin_); if (itr!=runMin_map.end()){ // if exists if(itr->second.runMax != runMax_){ @@ -206,13 +224,13 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax // probabilmente la categoria non e' ancora stata definita e la aggiungo //1-deltaP_; // deltaP_ e' lo shift, devo correggerlo (quindi -deltaP_) - itr->second.correction_map[category_].first=deltaP_; // allo stato attuale passo come input il file con le correzioni (1-deltaP/100) - itr->second.correction_map[category_].second=err_deltaP_; // inefficiente + itr->second.correction_map[cat].first=deltaP_; // allo stato attuale passo come input il file con le correzioni (1-deltaP/100) + itr->second.correction_map[cat].second=err_deltaP_; // inefficiente //#ifdef DEBUG std::cout << "[DEBUG] " << category_ << "\t" << itr->first << "-" << itr->second.runMax << "\t" << itr->second.correction_map.size() - << "\t" << itr->second.correction_map[category_].first << std::endl; + << "\t" << itr->second.correction_map[cat].first << std::endl; //"\t" << deltaP_ << "\t" << itr->second.correction_map[category_].first << std::endl; //std::cout << "[DEBUG] " << err_deltaP_ << "\t" << itr->second.correction_map[category_].second << std::endl; //#endif @@ -224,7 +242,7 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax std::pair pair_tmp; pair_tmp.first=deltaP_; pair_tmp.second=err_deltaP_; - corr.correction_map[category_]=pair_tmp; //std::make_pair(deltaP_, err_deltaP_); //(1-deltaP_, err_deltaP_); + corr.correction_map[cat]=pair_tmp; //std::make_pair(deltaP_, err_deltaP_); //(1-deltaP_, err_deltaP_); // corr.correction_map[category_].second=err_deltaP_; runMin_map[runMin_]=corr; // aggiungo il nuovo itr=runMin_map.find(runMin_); @@ -232,7 +250,7 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax std::cout << "[DEBUG] " << category_ << "\t" << itr->first << "-" << itr->second.runMax << "\t" << itr->second.correction_map.size() - << "\t" << itr->second.correction_map[category_].first << std::endl; + << "\t" << itr->second.correction_map[cat].first << std::endl; } return; @@ -298,6 +316,7 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, TString R9EleBranchName, TString etaEleBranchName, TString etaSCEleBranchName, + TString energySCEleBranchName, TString nPVBranchName ){ float nPVmean = 0; @@ -309,6 +328,7 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, Float_t etaEle_[2]; Float_t etaSCEle_[2]; Float_t R9Ele_[2]; + Float_t energySCEle_[2]; Float_t scaleEle_[2]; @@ -320,6 +340,7 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, tree->SetBranchStatus(runNumberBranchName,1); tree->SetBranchStatus(etaEleBranchName,1); tree->SetBranchStatus(etaSCEleBranchName,1); + tree->SetBranchStatus(energySCEleBranchName,1); tree->SetBranchStatus(R9EleBranchName,1); tree->SetBranchStatus(nPVBranchName,1); } @@ -328,6 +349,7 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, tree->SetBranchAddress(runNumberBranchName, &runNumber_); tree->SetBranchAddress(etaEleBranchName,etaEle_); tree->SetBranchAddress(etaSCEleBranchName,etaSCEle_); + tree->SetBranchAddress(energySCEleBranchName,energySCEle_); tree->SetBranchAddress(R9EleBranchName, R9Ele_); Long64_t nentries = tree->GetEntries(); @@ -341,9 +363,9 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, for(Long64_t ientry = 0; ientryGetEntry(ientry); scaleEle_[0] = ScaleCorrection(runNumber_, fabs(etaSCEle_[0]) < 1.4442, - R9Ele_[0],etaEle_[0], nPV_, nPVmean); + R9Ele_[0],etaEle_[0], energySCEle_[0]/cosh(etaSCEle_[0]), nPV_, nPVmean); scaleEle_[1] = ScaleCorrection(runNumber_, fabs(etaSCEle_[1]) < 1.4442, - R9Ele_[1],etaEle_[1], nPV_, nPVmean); + R9Ele_[1],etaEle_[1], energySCEle_[1]/cosh(etaSCEle_[1]), nPV_, nPVmean); newTree->Fill(); if(ientry%(nentries/100)==0) std::cerr << "\b\b\b\b" << std::setw(2) << ientry/(nentries/100) << "%]"; } @@ -494,10 +516,11 @@ TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, -float EnergyScaleCorrection_class::ScaleCorrection(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, +float EnergyScaleCorrection_class::ScaleCorrection(int runNumber, bool isEBEle, + double R9Ele, double etaSCEle, double EtEle, int nPV, float nPVmean){ float correction = 1; - if(correctionType.Contains("Run", TString::kIgnoreCase)) correction*=getScaleOffset(runNumber, isEBEle, R9Ele, etaSCEle); + if(correctionType.Contains("Run", TString::kIgnoreCase)) correction*=getScaleOffset(runNumber, isEBEle, R9Ele, etaSCEle, EtEle); if(correctionType.Contains("nPV",TString::kIgnoreCase)) correction *= 1- (-0.02 * (nPV -nPVmean))/100; @@ -532,3 +555,21 @@ float EnergyScaleCorrection_class::GetMean_nPV(TChain *tree, bool fastLoop, // std::cout << "[WARNING] nPU > nPU max for " << warningCounter << " times" << std::endl; return nPVmean; } + + +bool correctionCategory_class::operator<(const correctionCategory_class& b) const{ + if(runmin < b.runmin) return true; + if(runmax > b.runmax) return false; + + if(etamin < b.etamin) return true; + if(etamax > b.etamax) return false; + + if(r9min < b.r9min) return true; + if(r9max > b.r9max) return false; + + if(etmin < b.etmin) return true; + if(etmax > b.etmax) return false; + return false; + + }; + diff --git a/ZFitter/test/test.cpp b/ZFitter/test/test.cpp index c5ecee3d94b..a00a8f7e490 100644 --- a/ZFitter/test/test.cpp +++ b/ZFitter/test/test.cpp @@ -15,6 +15,7 @@ #include #include +#include "EnergyScaleCorrection_class.h" int main(int argc, char **argv) { @@ -42,6 +43,27 @@ int main(int argc, char **argv) { return 0; } + correctionCategory_class c3(std::string("EB-absEta_1_1.4442")); + correctionCategory_class c1(std::string("EB-absEta_0_1-bad" )); + correctionCategory_class c2(std::string("EB-absEta_0_1-gold")); + std::cout << (c1 < c2) << "\t" << (c1 < c3) << "\t" << (c2 < c3) << std::endl; + std::cout << c1 << std::endl; + std::cout << c2 << std::endl; + std::cout << c3 << std::endl; + + correctionCategory_class p1(0, 0.8, 0.8, 50); + correctionCategory_class p2(0, 0.81, 0.8, 50); + + std::cout << p1 << std::endl; + std::cout << (p1 < c1) << std::endl; + if(p1 Date: Sat, 30 Nov 2013 16:12:42 +0100 Subject: [PATCH 192/475] before radical change --- .../interface/EnergyScaleCorrection_class.h | 91 +----------- ZFitter/src/EnergyScaleCorrection_class.cc | 135 ++++++++++++------ 2 files changed, 99 insertions(+), 127 deletions(-) diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index 56e77c43dd1..da4048c019a 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -31,98 +31,14 @@ class correctionCategory_class{ //float smearing_err; public: - correctionCategory_class(const unsigned int runNumber, const float etaEle, const float R9Ele, const float EtEle){ + inline correctionCategory_class(const unsigned int runNumber, const float etaEle, const float R9Ele, const float EtEle){ runmin=runNumber; runmax=runNumber; - etamin=etaEle; etamax=etaEle; + etamin=fabs(etaEle); etamax=fabs(etaEle); r9min=R9Ele; r9max=R9Ele; etmin=EtEle; etmax=EtEle; } - correctionCategory_class(std::string category){ - runmin=0; runmax=999999; - etamin=-1;etamax=10; - r9min=-1;r9max=10; - etmin=-1;etmax=1e6; - - unsigned int p1 = category.find("absEta_"); - unsigned int p2 = p1+1; - - if(category.find("absEta_0_1")!=std::string::npos){ etamin=0; etamax=1;} - else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.4442;} - else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.566; etamax=2;} - else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=2.5;} - else{ - if(p1!=std::string::npos){ - p1 = category.find("_",p1); - p2 = category.find("_",p1+1); - etamin = TString(category.substr(p1+1, p2-p1-1)).Atof(); - p1 = p2; - p2 = category.find("-",p1); - etamax = TString(category.substr(p1+1, p2-p1-1)).Atof(); - } - } - - p1 = category.find("EtEle_"); - p2 = p1+1; - if(p1!=std::string::npos){ - p1 = category.find("_",p1); - p2 = category.find("_",p1+1); - etmin = TString(category.substr(p1+1, p2-p1-1)).Atof(); - p1 = p2; - p2 = category.find("-",p1); - etmax = TString(category.substr(p1+1, p2-p1-1)).Atof(); - } - // std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << std::endl; - - - if(category.find("gold")!=std::string::npos){ r9min=0.94; r9max=10;} - else if(category.find("bad")!=std::string::npos){ r9min=-1; r9max=0.94;}; - - }; - - - correctionCategory_class(TString category_){ - std::string category(category_.Data()); - runmin=0; runmax=999999; - etamin=-1;etamax=10; - r9min=-1;r9max=10; - etmin=-1;etmax=1e6; - - unsigned int p1 = category.find("absEta_"); - unsigned int p2 = p1+1; - - if(category.find("absEta_0_1")!=std::string::npos){ etamin=0; etamax=1;} - else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.4442;} - else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.566; etamax=2;} - else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=2.5;} - else{ - if(p1!=std::string::npos){ - p1 = category.find("_",p1); - p2 = category.find("_",p1+1); - etamin = TString(category.substr(p1+1, p2-p1-1)).Atof(); - p1 = p2; - p2 = category.find("-",p1); - etamax = TString(category.substr(p1+1, p2-p1-1)).Atof(); - } - } - - p1 = category.find("EtEle_"); - p2 = p1+1; - if(p1!=std::string::npos){ - p1 = category.find("_",p1); - p2 = category.find("_",p1+1); - etmin = TString(category.substr(p1+1, p2-p1-1)).Atof(); - p1 = p2; - p2 = category.find("-",p1); - etmax = TString(category.substr(p1+1, p2-p1-1)).Atof(); - } - // std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << std::endl; - - - if(category.find("gold")!=std::string::npos){ r9min=0.94; r9max=10;} - else if(category.find("bad")!=std::string::npos){ r9min=-1; r9max=0.94;}; - - }; + correctionCategory_class(TString category_); /* friend bool operator < (const correctionCategory_class& a, const correctionCategory_class& b){ */ /* if(a.runmin < b.runmin) return true; */ @@ -208,6 +124,7 @@ class EnergyScaleCorrection_class{ float GetMean_nPV(TChain *tree, bool fastLoop, TString nPVBranchName); void Add(TString category_, int runMin_, int runMax_, double deltaP_, double err_deltaP_); + public: std::map< int, correction_t >::const_iterator runCorrection_itr; std::map< int, correction_t >::const_iterator FindRunCorrection_itr(int runNumber); std::map< int, correction_t > runMin_map; diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 8e0f75494ad..1fca2bfc6c8 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -1,5 +1,5 @@ #include "../interface/EnergyScaleCorrection_class.h" -//#define DEBUG +#define DEBUG // for exit(0) #include @@ -141,6 +141,7 @@ float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, d runCorrection_itr=FindRunCorrection_itr(runNumber); if (runCorrection_itr==runMin_map.end()){ runCorrection_itr=runMin_map.begin(); // lo reinizializzo per i prossimi run + exit(0); return 0; // se per esempio il runNumber non e' definito nel recalib file } } @@ -152,34 +153,18 @@ float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, d const correction_map_t *correction_map_p = &(runCorrection_itr->second.correction_map); -#ifdef HggCatTry - // questo se voglio provare a cercare prima le HggCat nel file - // e poi se non c'e' usare quelle EB/EE standard - if(correction_map.count(GetElectronCategory(isEBEle, R9Ele, true))==1) - return correction_map[GetElectronCategory(isEBEle, R9Ele, true)].first; - else if(correction_map.count(GetElectronCategory(isEBEle, R9Ele, false))==1) - return correction_map[GetElectronCategory(isEBEle, R9Ele, false)].first; - else { - std::cerr << "[ERROR] Electron category not found!!!! Scale offset not applied" << std::endl; - std::cout << " " << runNumber << "\t" << runCorrection_itr->first << "\t" << runCorrection_itr->second.runMax << std::endl; - exit(1); - return 1; - } -#endif //TString category=GetElectronCategory(isEBEle, R9Ele, etaSCEle); correctionCategory_class category(runNumber, etaSCEle, R9Ele,EtEle); - //correctionCategory_class category(0, etaSCEle, R9Ele,EtEle); -// if(correction_map_p->upper_bound(category) == correction_map_p->end()){ -// exit (1); -// } -// std::cout << correction_map_p->upper_bound(category)->first << std::endl; +#ifdef DEBUG + std::cout << "[DEBUG] Checking correction for category: " << category << std::endl; + std::cout << "[DEBUG] Correction is: " << (--(correction_map_p->upper_bound(category)))->second.first + << std::endl + << " given for category " << ((--(correction_map_p->upper_bound(category)))->first) << std::endl; +#endif -// exit (0); - if(! (category < (--(correction_map_p->upper_bound(category)))->first)) - std::cout << category << std::endl << - (--(correction_map_p->upper_bound(category)))->first <upper_bound(category)))->first)) std::cout << "[DEBUG] category(isEBEle, R9Ele) = " << category << "(" << isEBEle << ", " << R9Ele << ")" << correction_map_p->find(category)->second.first << std::endl; #endif @@ -187,13 +172,30 @@ float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, d if(correction_map_p->count(category)==1){ return correction_map_p->find(category)->second.first; } else{ - return (--(correction_map_p->upper_bound(category)))->second.first; //->second.first(); //upper_bound(category)->second.first; - std::cerr << "[ERROR] Electron category " << category << " not found!!!! Scale offset not applied" << std::endl; - std::cerr << " " << runNumber << "\t" << runCorrection_itr->first << "\t" << runCorrection_itr->second.runMax << std::endl; - exit(1); - return 1; + if(fabs(etaSCEle)>2.5) return 1; + if(EtEle>20 && EtEle<100){ + exit(1); + std::cout << "[ERROR] Category not found: "<< std::endl; + std::cout << category << std::endl; + std::cout << (--(correction_map_p->upper_bound(category)))->first << std::endl; + } else { + return 1; + } } +// if ((--(correction_map_p->upper_bound(category)))->second.first==0){ + +// std::cout << category << "\t" << runCorrection_itr->first << "\t" << (--(correction_map_p->upper_bound(category)))->second.first << std::endl; +// exit(1); +// } else return 1; +// } +// return (--(correction_map_p->upper_bound(category)))->second.first; //->second.first(); //upper_bound(category)->second.first; +// std::cerr << "[ERROR] Electron category " << category << " not found!!!! Scale offset not applied" << std::endl; +// std::cerr << " " << runNumber << "\t" << runCorrection_itr->first << "\t" << runCorrection_itr->second.runMax << std::endl; +// exit(1); +// return 1; +// } + } void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax_, double deltaP_, double err_deltaP_){ @@ -212,6 +214,8 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax // return; // } correctionCategory_class cat(category_); + cat.runmin=runMin_; + cat.runmax=runMax_; std::map ::iterator itr=runMin_map.find(runMin_); if (itr!=runMin_map.end()){ // if exists if(itr->second.runMax != runMax_){ @@ -227,6 +231,7 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax itr->second.correction_map[cat].first=deltaP_; // allo stato attuale passo come input il file con le correzioni (1-deltaP/100) itr->second.correction_map[cat].second=err_deltaP_; // inefficiente //#ifdef DEBUG + std::cout << "[DEBUG]" << cat << std::endl; std::cout << "[DEBUG] " << category_ << "\t" << itr->first << "-" << itr->second.runMax << "\t" << itr->second.correction_map.size() @@ -246,7 +251,7 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax // corr.correction_map[category_].second=err_deltaP_; runMin_map[runMin_]=corr; // aggiungo il nuovo itr=runMin_map.find(runMin_); - + // std::cout << "[DEBUG]" << cat << std::endl; std::cout << "[DEBUG] " << category_ << "\t" << itr->first << "-" << itr->second.runMax << "\t" << itr->second.correction_map.size() @@ -287,11 +292,12 @@ void EnergyScaleCorrection_class::ReadFromFile(TString filename){ #endif #ifdef DEBUG - std::cout << "[DEBUG]" << "\t" << "category" << "\t" << "runMin" << "\t" <<"deltaM_data" << "\t" << "deltaM_MC" << "\t" << "deltaP" << std::endl; #ifdef SHERVIN + std::cout << "[DEBUG]" << "\t" << "category" << "\t" << "runMin" << "\t" <<"deltaM_data" << "\t" << "deltaM_MC" << "\t" << "deltaP" << std::endl; std::cout << "[DEBUG]" << "\t" << category << "\t" << runMin << "\t" << runMax << "\t" << deltaM_data << "\t" << deltaM_MC << "\t" << deltaP << std::endl; #else - std::cout << "[DEBUG]" << "\t" << category << "\t" << runMin << "\t" << runMax << "\t" << "\t" << deltaP << "\t" << err_deltaP<< std::endl; + std::cout << "[DEBUG]" << "\t" << "category" << "\t" << "runMin" << "\t" << "runMax\t" << "deltaP\terr_DeltaP" << std::endl; + std::cout << "[DEBUG]" << "\t" << category << "\t" << runMin << "\t" << runMax << "\t" << deltaP << "\t" << err_deltaP<< std::endl; #endif #endif Add(category, runMin, runMax, deltaP, err_deltaP); @@ -558,18 +564,67 @@ float EnergyScaleCorrection_class::GetMean_nPV(TChain *tree, bool fastLoop, bool correctionCategory_class::operator<(const correctionCategory_class& b) const{ - if(runmin < b.runmin) return true; - if(runmax > b.runmax) return false; + if(runmin < b.runmin && runmax < b.runmax) return true; + if(runmax > b.runmax && runmin > b.runmin) return false; - if(etamin < b.etamin) return true; - if(etamax > b.etamax) return false; + if(etamin < b.etamin && etamax b.etamax && etamin>b.etamin) return false; - if(r9min < b.r9min) return true; - if(r9max > b.r9max) return false; + if(r9min < b.r9min && r9max < b.r9max) return true; + if(r9max > b.r9max && r9min > b.r9min) return false; - if(etmin < b.etmin) return true; - if(etmax > b.etmax) return false; + if(etmin < b.etmin && etmax < b.etmax) return true; + if(etmax > b.etmax && etmin > b.etmin) return false; return false; }; +correctionCategory_class::correctionCategory_class(TString category_){ + std::string category(category_.Data()); +#ifdef DEBUG + std::cout << "[DEBUG] correctionClass defined for category: " << category << std::endl; +#endif + // default values + runmin=0; runmax=999999; + etamin=-1;etamax=10; + r9min=-1;r9max=10; + etmin=-1;etmax=300.; + + unsigned int p1,p2; // boundary + + // eta region + p1 = category.find("absEta_"); + p2 = p1+1; + if(category.find("absEta_0_1")!=std::string::npos){ etamin=0; etamax=1;} + else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.479;}//etamax=1.4442; } + else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.479; etamax=2;} // etamin=1.566} + else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=3;} + else{ + if(p1!=std::string::npos){ + p1 = category.find("_",p1); + p2 = category.find("_",p1+1); + etamin = TString(category.substr(p1+1, p2-p1-1)).Atof(); + p1 = p2; + p2 = category.find("-",p1); + etamax = TString(category.substr(p1+1, p2-p1-1)).Atof(); + } + } + + // Et region + p1 = category.find("-Et_"); + p2 = p1+1; + std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << "\t" << p1 << "\t" << p2 << std::endl; + if(p1 !=std::string::npos){ + p1 = category.find("_",p1); + p2 = category.find("_",p1+1); + etmin = TString(category.substr(p1+1, p2-p1-1)).Atof(); + p1 = p2; + p2 = category.find("-",p1); + etmax = TString(category.substr(p1+1, p2-p1-1)).Atof(); + std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << std::endl; + } + + if(category.find("gold")!=std::string::npos){ r9min=0.94; r9max=10;} + else if(category.find("bad")!=std::string::npos){ r9min=-1; r9max=0.94;}; + +}; From 2b0c4cdd0ba992e412ba8a8fcee5099eabdd3405 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 4 Dec 2013 10:51:17 +0100 Subject: [PATCH 193/475] not working --- ZFitter/Makefile | 20 +- ZFitter/bin/ZFitter.cpp | 82 ++- .../validation/22Jan2012-runDepMCAll_v2.dat | 78 +-- ZFitter/interface/ElectronCategory_class.hh | 2 + .../interface/EnergyScaleCorrection_class.h | 94 +-- ZFitter/script/GenRootChain.sh | 2 +- ZFitter/script/energyScale.sh | 652 ++++++++++++++---- ZFitter/script/functions.sh | 59 ++ ZFitter/script/monitoring_validation.sh | 2 +- ZFitter/src/ElectronCategory_class.cc | 25 +- ZFitter/src/EnergyScaleCorrection_class.cc | 309 ++------- ZFitter/src/RooSmearer.cc | 11 +- ZFitter/src/SmearingImporter.cc | 6 + ZFitter/src/addBranch_class.cc | 31 +- ZFitter/test/test.cpp | 10 +- 15 files changed, 804 insertions(+), 579 deletions(-) diff --git a/ZFitter/Makefile b/ZFitter/Makefile index a3d3e4e3ffc..858af22b250 100644 --- a/ZFitter/Makefile +++ b/ZFitter/Makefile @@ -132,16 +132,16 @@ ciao: @echo "$(ROOFIT_LIB)" @echo "$(ROOFIT_INCLUDE)" -$(BUILDDIR)/test.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o - @echo "---> Making Test ZFitter" - @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) $(ROOT_FLAGS) \ - -o $(BUILDDIR)/test.exe $(BUILDDIR)/ZFitter.cpp -lboost_program_options -lTreePlayer \ - $(OBJ_DIR)/*.o - -#test/test.cpp #$(SRC)/ElectronCategory_class.cc # quest'ultimo perche' compilo statico -# @echo "---> Making test" -# @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) \ -# -o $(BUILDDIR)/test.exe test/test.cpp -lboost_program_options +# $(BUILDDIR)/test.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o +# @echo "---> Making Test ZFitter" +# @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) $(ROOT_FLAGS) \ +# -o $(BUILDDIR)/test.exe $(BUILDDIR)/ZFitter.cpp -lboost_program_options -lTreePlayer \ +# $(OBJ_DIR)/*.o + +$(BUILDDIR)/test.exe: test/test.cpp $(OBJ_DIR)/EnergyScaleCorrection_class.o # quest'ultimo perche' compilo statico + @echo "---> Making test" + @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) \ + -o $(BUILDDIR)/test.exe test/test.cpp -lboost_program_options -lTreePlayer $(OBJ_DIR)/*.o ZFitter.exe: $(BUILDDIR)/ZFitter.exe diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 306cdef8744..d23c42a4727 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -673,7 +673,7 @@ int main(int argc, char **argv) { std::cout << "------------------------------------------------------------" << std::endl; std::cout << "[STATUS] Getting energy scale corrections from file: " << corrEleFile << std::endl; TString treeName="scaleEle_"+corrEleType; - EnergyScaleCorrection_class eScaler(corrEleFile,corrEleType); + EnergyScaleCorrection_class eScaler(corrEleFile); for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); @@ -691,8 +691,8 @@ int main(int argc, char **argv) { exit(1); } TTree *corrTree = eScaler.GetCorrTree(ch); - //corrTree->SetName("scaleEle"); - //corrTree->SetTitle(corrEleType.c_str()); + corrTree->SetName(TString("scaleEle_")+corrEleType.c_str()); + corrTree->SetTitle(corrEleType.c_str()); f.cd(); corrTree->Write(); std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; @@ -715,7 +715,7 @@ int main(int argc, char **argv) { std::cout << "------------------------------------------------------------" << std::endl; std::cout << "[STATUS] Getting energy smearings from file: " << smearEleFile << std::endl; TString treeName="smearEle_"+smearEleType; - EnergyScaleCorrection_class eScaler("","", smearEleFile,smearEleType); + EnergyScaleCorrection_class eScaler("", smearEleFile); for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ @@ -758,19 +758,31 @@ int main(int argc, char **argv) { branch_itr != branchList.end(); branch_itr++){ UpdateFriends(tagChainMap, regionsFileNameTag); + TString treeName=*branch_itr; - if(*branch_itr=="smearerCat") treeName+="_"+regionsFileNameTag; + TString t; + if(treeName=="smearerCat_s"){ + treeName.ReplaceAll("_s",""); + t="s"; + } + if(treeName=="smearerCat_d"){ + treeName.ReplaceAll("_d",""); + t="d"; + } + TString branchName=treeName; + std::cout << "#### --> " << treeName << "\t" << t << "\t" << *branch_itr <first.CompareTo("s")==0 || tag_chain_itr->first.CompareTo("d")==0) continue; //only data + if((tag_chain_itr->first.CompareTo("s")==0 || tag_chain_itr->first.CompareTo("d")==0)) continue; //only data if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present + if(t!="" && !tag_chain_itr->first.Contains(t)) continue; TChain *ch = (tag_chain_itr->second.find("selected"))->second; //data @@ -782,7 +794,7 @@ int main(int argc, char **argv) { std::cerr << "[ERROR] File for branch " << branchName << " not created" << std::endl; return 1; } - TTree *newTree = newBrancher.AddBranch(ch,treeName, branchName); + TTree *newTree = newBrancher.AddBranch(ch,treeName, branchName,true,tag_chain_itr->first.Contains("s")); if(newTree==NULL){ std::cerr << "[ERROR] New tree for branch " << treeName << " is NULL" << std::endl; return 1; @@ -1150,36 +1162,36 @@ int main(int argc, char **argv) { // rho profile name2.ReplaceAll("constTerm", "rho"); -// smearer.SetDataSet(name2,"rho"); -// Double_t v1=var->getVal(); -// Double_t v2=var2->getVal(); -// var2->setVal(0); -// var->setVal(rho); + smearer.SetDataSet(name2,"rho"); + Double_t v1=var->getVal(); + Double_t v2=var2->getVal(); + var2->setVal(0); + var->setVal(rho); TGraph *profil = NULL; -//profil = GetProfile(var, smearer,0); -// var2->setVal(v2); -// var->setVal(v1); + profil = GetProfile(var, smearer,0); + var2->setVal(v2); + var->setVal(v1); TString n="profileChi2_"+name2+"_"; n+=randomInt; -// profil->SetName(n); -// TCanvas c("c_"+name); -// profil->Draw("AP*"); -// fOutProfile->cd(); -// profil->Write(); -// delete profil; -// smearer.dataset->Write(); - - + profil->SetName(n); + TCanvas c("c_"+name); + profil->Draw("AP*"); + fOutProfile->cd(); + profil->Write(); + delete profil; + smearer.dataset->Write(); + + // phi profile name2.ReplaceAll("rho", "phi"); -// smearer.SetDataSet(name2,"phi"); -// profil = GetProfile(var, var2, smearer, true, rho, Emean); -// n="profileChi2_"+name2+"_"; n+=randomInt; -// profil->SetName(n); -// profil->Draw("AP*"); -// fOutProfile->cd(); -// profil->Write(); -// delete profil; -// smearer.dataset->Write(); + smearer.SetDataSet(name2,"phi"); + profil = GetProfile(var, var2, smearer, true, rho, Emean); + n="profileChi2_"+name2+"_"; n+=randomInt; + profil->SetName(n); + profil->Draw("AP*"); + fOutProfile->cd(); + profil->Write(); + delete profil; + smearer.dataset->Write(); // rho profile with fixed phi!=pi/2 name2.ReplaceAll("phi", "rho_phi4"); diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat index 561ba4dfd50..39662a58155 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat @@ -34,64 +34,6 @@ s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root -##### Smearer category trees -#d smearerCat_d smearerCat_data-scaleStep2smearing_8.root -#s smearerCat_s smearerCat_mc-scaleStep2smearing_8.root -#d1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d1-22Jan2012-runDepMC.root -#d2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d2-22Jan2012-runDepMC.root -#d3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d3-22Jan2012-runDepMC.root -#d4 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_d4-22Jan2012-runDepMC.root -#s1 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s1-22Jan2012-runDepMC.root -#s2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s2-22Jan2012-runDepMC.root -##s3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s3-22Jan2012-runDepMC.root -# -d1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d1-22Jan2012-runDepMCAll.root -d2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d2-22Jan2012-runDepMCAll.root -d3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d3-22Jan2012-runDepMCAll.root -d4 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d4-22Jan2012-runDepMCAll.root -s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll.root -s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll.root -s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll.root -# -d1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d1-22Jan2012-runDepMCAll.root -d2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d2-22Jan2012-runDepMCAll.root -d3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d3-22Jan2012-runDepMCAll.root -d4 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d4-22Jan2012-runDepMCAll.root -s1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s1-22Jan2012-runDepMCAll.root -s2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s2-22Jan2012-runDepMCAll.root -s3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s3-22Jan2012-runDepMCAll.root -# -#d1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d1-22Jan2012-runDepMC.root -#d2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d2-22Jan2012-runDepMC.root -#d3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d3-22Jan2012-runDepMC.root -#d4 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d4-22Jan2012-runDepMC.root -#s1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s1-22Jan2012-runDepMC.root -#s2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s2-22Jan2012-runDepMC.root -##s3 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_s3-22Jan2012-runDepMC.root -## -#d1 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d1-22Jan2012-runDepMC.root -#d2 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d2-22Jan2012-runDepMC.root -#d3 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d3-22Jan2012-runDepMC.root -#d4 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_d4-22Jan2012-runDepMC.root -#s1 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s1-22Jan2012-runDepMC.root -#s2 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMC.root -##s3 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMC.root -# -d1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d1-22Jan2012-runDepMC.root -d2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d2-22Jan2012-runDepMC.root -d3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d3-22Jan2012-runDepMC.root -d4 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d4-22Jan2012-runDepMC.root -#s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMC.root -#s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMC.root -#s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll.root -# -d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root -d2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d2-22Jan2012-runDepMC.root -d3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d3-22Jan2012-runDepMC.root -d4 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d4-22Jan2012-runDepMC.root -#s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMC.root -#s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMC.root -#s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll.root #################################################### d1 r9Weight data/r9weights/r9Weight_d1-22Jan2012-runDepMCAll_v2.root d2 r9Weight data/r9weights/r9Weight_d2-22Jan2012-runDepMCAll_v2.root @@ -100,3 +42,23 @@ d4 r9Weight data/r9weights/r9Weight_d4-22Jan2012-runDepMCAll_v2.root s1 r9Weight data/r9weights/r9Weight_s1-22Jan2012-runDepMCAll_v2.root s2 r9Weight data/r9weights/r9Weight_s2-22Jan2012-runDepMCAll_v2.root s3 r9Weight data/r9weights/r9Weight_s3-22Jan2012-runDepMCAll_v2.root +##### +s1 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s1-22Jan2012-runDepMCAll_v2.root +s2 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s2-22Jan2012-runDepMCAll_v2.root +s3 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s3-22Jan2012-runDepMCAll_v2.root +# +s1 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s1-22Jan2012-runDepMCAll_v2.root +s2 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMCAll_v2.root +s3 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMCAll_v2.root +##### +s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v2.root +s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMCAll_v2.root +s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll_v2.root +# +s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMCAll_v2.root +s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMCAll_v2.root +s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll_v2.root +##### +s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v2.root +s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll_v2.root +s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll_v2.root diff --git a/ZFitter/interface/ElectronCategory_class.hh b/ZFitter/interface/ElectronCategory_class.hh index 109d2007ebc..172e093adf7 100644 --- a/ZFitter/interface/ElectronCategory_class.hh +++ b/ZFitter/interface/ElectronCategory_class.hh @@ -54,6 +54,8 @@ public: //--------------- flags bool _isRooFit; // defines if the cuts are defined for RooFit or not bool _roofitNameAsNtuple; + TString energyBranchName; + bool _corrEle; //------------------------------ // this method is though to give smaller formulas in the selection reducing a bit redundant cuts std::set GetCutSet(TString region); // -> make sure that all the cuts that goes in && are inserted separately diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index da4048c019a..aa5f13200c6 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -2,33 +2,54 @@ #define EnergyScaleCorrection_class_hh #include #include -//#include "../include/root_header.h" #include #include #include -//#include "correction_class.h" #include #include #include - +class correctionValue_class{ + public: + // values + float scale, scale_err; + float constTerm, constTerm_err; + float alpha, alpha_err; + + correctionValue_class(void){ + scale=1; scale_err=0; + constTerm=0; constTerm_err=0; + alpha=0; alpha_err=0; + }; + + friend ostream& operator << (ostream& os, const correctionValue_class a){ + os << " " + << a.scale << " +/- " << a.scale_err //<< std::endl + << " " + << a.constTerm << " +/- "<< a.constTerm_err //<< std::endl + << " " + << a.alpha << " +/- " << a.alpha_err; + return os; + }; +}; class correctionCategory_class{ + // for class definition and ordering public: unsigned int runmin; unsigned int runmax; + + private: float r9min; float r9max; float etmin; float etmax; float etamin; float etamax; - std::string category; - float scale; - float scale_err; - // float smearing; - //float smearing_err; + // name of the category + //std::string category; + public: inline correctionCategory_class(const unsigned int runNumber, const float etaEle, const float R9Ele, const float EtEle){ @@ -40,28 +61,7 @@ class correctionCategory_class{ correctionCategory_class(TString category_); -/* friend bool operator < (const correctionCategory_class& a, const correctionCategory_class& b){ */ -/* if(a.runmin < b.runmin) return true; */ -/* if(a.runmax > b.runmax) return false; */ - -/* if(a.etamin < b.etamin) return true; */ -/* if(a.etamax > b.etamax) return false; */ - -/* if(a.r9min < b.r9min) return true; */ -/* if(a.r9max > b.r9max) return false; */ - -/* if(a.etmin < b.etmin) return true; */ -/* if(a.etmax > b.etmax) return false; */ -/* return false; */ - -/* }; */ - - - // inline correction_class(void){}; bool operator<(const correctionCategory_class& b) const; -/* friend bool less(const correctionCategory_class& a, const correctionCategory_class& b) const{ */ -/* return (a < b); */ -/* }; */ friend ostream& operator << (ostream& os, const correctionCategory_class a){ os << a.runmin << " " << a.runmax @@ -70,41 +70,20 @@ class correctionCategory_class{ << "\t" << a.etmin << " " << a.etmax; return os; }; -/* bool operator == (const unsigned int runNumber, const float etaEle, const float R9Ele, const float EtEle){ */ -/* return (runNumber > runmin && runNumber < runmax */ -/* && fabs(etaEle) > etamin && fabs(etaEle) < etamax */ -/* && R9Ele > r9min && R9Ele < r9max */ -/* && EtEle > etmin && EtEle < etmax); */ -/* }; */ - -/* bool operator < (const unsigned int runNumber, const float etaEle, const float R9Ele, const float EtEle){ */ -/* return (runNumber < runmin && runNumber < runmax */ -/* && fabs(etaEle) > etamin && fabs(etaEle) < etamax */ -/* && R9Ele > r9min && R9Ele < r9max */ -/* && EtEle > etmin && EtEle < etmax); */ -/* }; */ }; //typedef std::map < TString, std::pair > correction_map_t; -typedef std::map < correctionCategory_class, std::pair > correction_map_t; - - -typedef struct{ - int runMax; - correction_map_t correction_map; -} correction_t; +typedef std::map < correctionCategory_class, correctionValue_class > correction_map_t; class EnergyScaleCorrection_class{ public: - bool isHggCat; bool noCorrections, noSmearings; - TString correctionType, smearingType; + public: - // EnergyScaleCorrection_class(TString correctionFileName, bool isHggCat_=false); - EnergyScaleCorrection_class(TString correctionFileName, TString correctionType_, - TString smearingFileName="", TString smearingType_=""); + EnergyScaleCorrection_class(TString correctionFileName, + TString smearingFileName=""); ~EnergyScaleCorrection_class(void); void ReadFromFile(TString filename); float getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle); // deprecated @@ -120,20 +99,17 @@ class EnergyScaleCorrection_class{ TString nPVBranchName="nPV"); private: - TString GetElectronCategory(bool isEBEle, double R9Ele, double etaSCEle); float GetMean_nPV(TChain *tree, bool fastLoop, TString nPVBranchName); void Add(TString category_, int runMin_, int runMax_, double deltaP_, double err_deltaP_); public: - std::map< int, correction_t >::const_iterator runCorrection_itr; - std::map< int, correction_t >::const_iterator FindRunCorrection_itr(int runNumber); - std::map< int, correction_t > runMin_map; //============================== smearings private: TRandom3 *rgen_; + correction_map_t scales, scales_not_defined; + correction_map_t smearings, smearings_not_defined; - correction_map_t smearings; void AddSmearing(TString category_, int runMin_, int runMax_, //double smearing_, double err_smearing_); double constTerm, double err_constTerm, double alpha, double err_alpha); diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index 5fbceef1bd3..2d417f3ea47 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -138,7 +138,7 @@ fi # saving the root files with the chains rm tmp/*_chain.root -./bin/ZFitter.exe --saveRootMacro -f ${configFile} --regionsFile=${regionsFile} ${noPU} ${addBranchList} ${fitterOptions} || exit 1 +./bin/ZFitter.exe --saveRootMacro -f ${configFile} --regionsFile=${regionsFile} ${noPU} ${addBranchList} ${corrEleFile} ${corrEleType} ${fitterOptions} || exit 1 # adding all the chains in one file for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root tmp/s_selected_chain.root diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 0e1d0074a1b..7101e877b7e 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -19,6 +19,7 @@ regionFileStep1=data/regions/scaleStep1.dat regionFileStep2EB=data/regions/scaleStep2smearing_1.dat regionFileStep2EE=data/regions/scaleStep2smearing_2.dat +regionFileStep4EBEE=data/regions/scaleStep4smearing_0.dat regionFileStep4EB=data/regions/scaleStep4smearing_1.dat regionFileStep4EE=data/regions/scaleStep4smearing_2.dat @@ -26,6 +27,7 @@ regionFileStep5EB=data/regions/scaleStep2smearing_9.dat regionFileStep5EE=data/regions/scaleStep2smearing_10.dat outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat outFileStep2=step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +outFileStep7=step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat ############################################################# usage(){ echo "`basename $0` [options]" @@ -42,7 +44,7 @@ usage(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hf:s: -l help,regionFile:,runRangesFile:,selection:,invMass_var:,step:,baseDir:,commonCut:,index: -- "$@") +if ! options=$(getopt -u -o hf:s: -l help,regionFile:,runRangesFile:,selection:,invMass_var:,step:,baseDir:,commonCut:,index:,force -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -56,6 +58,7 @@ do -h|--help) usage; exit 0;; -f) configFile=$2; shift;; -s|--step) STEP=$2; shift;; + --force) FORCE=y;; --invMass_var) invMass_var=$2; echo "[OPTION] invMass_var = ${invMass_var}"; shift;; --index) index=$2; shift;; --runRangesFile) runRangesFile=$2; echo "[OPTION] runRangesFile = ${runRangesFile}"; shift;; @@ -112,6 +115,7 @@ case ${STEP} in echo " - 5: plot and profile only in Et categories with smearings from step4" echo " - 6: smearings from step4, scales in Et x eta x R9 categories" echo " - 7: eta x R9 x Et, scale and smearings" + echo " - 8: eta x R9 x Et, scale and smearings applied: closure test" ;; 1) STEP1=y;; 2) STEP2=y;; @@ -138,7 +142,7 @@ case ${STEP} in 3weight) STEP3WEIGHT=y; STEP3=y; extension=weight;; 2fit) STEP2FIT=y;; 1-2fit) STEP1=y; STEP2FIT=y;; - all) STEP1stability=y; STEP1=y; STEP2FIT=y; STEP3=y; STEP3Stability=y; STEP4=y; SLIDE=y;; + all) STEP1stability=y; STEP1=y; STEP2FIT=y; STEP3=y; STEP3Stability=y; STEP4=y;; # SLIDE=y;; *) exit 1 ;; @@ -217,6 +221,12 @@ if [ -n "${STEP1}" ];then else echo "[STATUS] Step 1 already done" fi + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro --corrEleType HggRunEta \ + --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat || exit 1 + + mv tmp/scaleEle_HggRunEta_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step1/ + fi @@ -240,7 +250,7 @@ if [ -n "${STEP2FIT}" ];then ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFile} \ $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step2/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/img --corrEleType=HggRunEta \ > ${outDirData}/log/`basename $outFile .dat`.log || exit 1 ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} \ @@ -255,7 +265,7 @@ if [ -n "${STEP2FIT}" ];then | grep -v '#' > ${outDirTable}/${outFile} # ./script/makeCorrVsRunNumber.py -l -c --file2=res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - cat ${outDirTable}/${outFile} | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex +# cat ${outDirTable}/${outFile} | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex fi fi @@ -276,7 +286,18 @@ if [ -n "${STEP2}" ];then #exit 1 fi - if [ ! -e "${outDirTable}/${outFile}" ];then + mkSmearerCatSignal $regionFileEB + mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEB ${outDirData}/step2 + mkSmearerCatData $regionFileEE ${outDirData}/step2 + + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + if [ ! -e "${outDirTable}/${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi @@ -289,34 +310,22 @@ if [ -n "${STEP2}" ];then initFile="" fi - tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` - for tag in $tags - do - if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_${basenameEB}_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_${basenameEB}\tdata/smearerCat/smearerCat_${basenameEB}_${tag}-`basename $configFile .dat`.root" >> $configFile - - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_${basenameEE}_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_${basenameEE}\tdata/smearerCat/smearerCat_${basenameEE}_${tag}-`basename $configFile .dat`.root" >> $configFile - - fi - done # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time cat $configFile \ | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEB}\t${outDirData}/step2/smearerCat_${basenameEB}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step2/`basename $configFile` + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEE}\t${outDirData}/step2/smearerCat_${basenameEE}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step2/`basename $configFile` -# for index in `seq 1 50` -# do -# mkdir ${outDirData}/step2/${index}/fitres/ -p -# mkdir ${outDirData}/step2/${index}/img -p + + for index in `seq 1 50` + do + mkdir ${outDirData}/step2/${index}/fitres/ -p + mkdir ${outDirData}/step2/${index}/img -p + done # bsub -q 2nd \ # -oo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stdout.log \ # -eo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stderr.log \ @@ -327,6 +336,12 @@ if [ -n "${STEP2}" ];then # for index in `seq 1 50` # do +bsub -q 2nd \ + -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step2[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEB}-done" + bsub -q 2nd \ -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ @@ -351,31 +366,34 @@ while [ "`bjobs -J \"${basenameEE} step2\" | grep -v JOBID | grep -v found | wc echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C - grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat + fi + + sed -i 's|^EB-||;s|^EE-||' ${outFileStep1} + grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' > tmp/res_corr.dat + grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1| sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' >> tmp/res_corr.dat + awk -f awk/prodScaleCorrSteps.awk tmp/res_corr.dat ${outFileStep1} > ${outDirTable}/${outFile} + + +# grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat - grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat -# - sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat - ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |grep -v '#' > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat - ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +# # +# sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +# ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |grep -v '#' > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + +# cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex +# cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat # cat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - - #save root files with step1 corrections - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - --saveRootMacro --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat || exit 1 - - mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ - fi + #save root files with step1 corrections ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ --saveRootMacro --corrEleType HggRunEtaR9 \ --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat || exit 1 mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi @@ -388,12 +406,14 @@ if [ -n "${STEP3}" ];then if [ ! -e "${outDirData}/step3/fitres" ];then mkdir ${outDirData}/step3/fitres -p; fi if [ ! -e "${outDirData}/step3/img" ];then mkdir ${outDirData}/step3/img -p; fi - - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step3/`basename $configFile` + + ./bin/ZFitter.exe -f $outDirData/step3/`basename $configFile` --regionsFile ${regionFile} \ $isOdd --invMass_var ${invMass_var} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres \ --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step3/img \ - --corrEleType HggRunEtaR9 --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat > ${outDirData}/log/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 + --corrEleType HggRunEtaR9 > ${outDirData}/log/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/step3-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 @@ -409,7 +429,7 @@ if [ -n "${STEP4}" ];then #eta x R9 with smearing method regionFileEB=${regionFileStep4EB} - regionFileEE=data/regions/scaleStep4smearing_2.dat + regionFileEE=${regionFileStep4EE} basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` regionFile=$regionFileEB @@ -426,7 +446,12 @@ if [ -n "${STEP4}" ];then initFile="" fi - if [ ! -e "${outFile}" ];then + mkSmearerCatSignal $regionFileEB + mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEB ${outDirData}/step4 + mkSmearerCatData $regionFileEE ${outDirData}/step4 + + if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi if [ ! -e "${outDirData}/step4${extension}/fitres" ];then mkdir ${outDirData}/step4${extension}/fitres -p; fi @@ -436,35 +461,22 @@ if [ -n "${STEP4}" ];then if [ "${extension}" == "weight" ];then updateOnly="$updateOnly --useR9weight" fi - tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` - for tag in $tags - do - if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionFileEB .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile - - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionFileEE .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile - - fi - done # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time cat $configFile \ | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step4${extension}/`basename $configFile` - + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEB}\t${outDirData}/step4/smearerCat_${basenameEB}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step4${extension}/`basename $configFile` + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEE}\t${outDirData}/step4/smearerCat_${basenameEE}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step4${extension}/`basename $configFile` + for index in `seq 1 50` do mkdir ${outDirData}/step4${extension}/${index}/fitres/ -p mkdir ${outDirData}/step4${extension}/${index}/img -p done + cat $outDirData/step4${extension}/`basename $configFile` bsub -q 2nd \ -oo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ @@ -497,16 +509,21 @@ if [ -n "${STEP4}" ];then echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C - fi cat ${outDirData}/step4${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} grep -v absEta_0_1 ${outDirData}/step4${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + fi + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 -# ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile $regionFileStep4EBEE $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + fi @@ -544,19 +561,13 @@ if [ -n "${STEP5}" ];then regionFileEE=${regionFileStep5EE} basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` - outFile=step5${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + outFile=${outDirTable}/step5${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat if [ ! -e "${outDirTable}/${outFileStep2}" ];then echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr #exit 1 fi - if [ ! -e "${outDirTable}/${outFile}" ];then - if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi - if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi - if [ ! -e "${outDirData}/step5${extension}/fitres" ];then mkdir ${outDirData}/step5${extension}/fitres -p; fi - if [ ! -e "${outDirData}/step5${extension}/img" ];then mkdir ${outDirData}/step5${extension}/img -p; fi - if [ -e "${outDirTable}/params-step5-${commonCut}.txt" ];then initFile="--initFile=${outDirTable}/params-step5-${commonCut}.txt"; else @@ -574,6 +585,14 @@ if [ -n "${STEP5}" ];then cat ${outDirTable}/params-step5-${commonCut}.txt exit 0 fi + + if [ ! -e "${outFile}" ];then + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step5${extension}/fitres" ];then mkdir ${outDirData}/step5${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step5${extension}/img" ];then mkdir ${outDirData}/step5${extension}/img -p; fi + if [ "${extension}" == "weight" ];then updateOnly="$updateOnly --useR9weight" @@ -622,7 +641,7 @@ if [ -n "${STEP5}" ];then "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step5${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step5${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step5${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 --profileOnly --plotOnly || exit 1; touch ${outDirData}/step5${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" - fi + while [ "`bjobs -J \"${basenameEB} step5${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done while [ "`bjobs -J \"${basenameEE} step5${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done @@ -640,6 +659,14 @@ if [ -n "${STEP5}" ];then echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C + fi + cat ${outDirData}/step5${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step5${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} + + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + + ./bin/ZFitter.exe -f $outDirData/step5${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step5${extension}/img/ --outDirFitResData=${outDirData}/step5${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + fi @@ -655,14 +682,22 @@ if [ -n "${STEP6}" ];then regionFileEE=${regionFileStep5EE} basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` - outFile=step6${extension}-${invMass_var}-${newSelection}-${commonCut}-FitConfig.dat + #outFile=${outDirTable}/step6${extension}-${invMass_var}-${newSelection}-${commonCut}-FitConfig.dat + outFile=${outDirTable}/step6${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat if [ ! -e "${outDirTable}/${outFileStep2}" ];then echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr #exit 1 fi - if [ ! -e "${outDirTable}/${outFile}" ];then + if [ -e "${outDirTable}/params-step5-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step5-${commonCut}.txt"; + else + echo "[ERROR] ${outDirTable}/params-step5-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + if [ ! -e "${outFile}" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi if [ ! -e "${outDirData}/step6${extension}/fitres" ];then mkdir ${outDirData}/step6${extension}/fitres -p; fi @@ -678,24 +713,6 @@ if [ -n "${STEP6}" ];then if [ "${extension}" == "weight" ];then updateOnly="$updateOnly --useR9weight" fi - tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` - for tag in $tags - do - if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionFileEB .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile - - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionFileEE .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile - - fi - done # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time @@ -722,8 +739,9 @@ if [ -n "${STEP6}" ];then # "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; # ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step6${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + fi - while [ "`bjobs -J \"${basenameEB} step6${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +while [ "`bjobs -J \"${basenameEB} step6${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done while [ "`bjobs -J \"${basenameEE} step6${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done ./script/haddTGraph.sh -o ${outDirData}/step6${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step6${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root @@ -738,16 +756,14 @@ if [ -n "${STEP6}" ];then echo "FitProfile2(\"${outDirData}/step6${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "FitProfile2(\"${outDirData}/step6${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C -# root -l -b -q tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C - cat ${outDirData}/step6${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config ${outDirData}/step6${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config > ${outFile} + cat ${outDirData}/step6${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step6${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} - ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} corrEleType=HggRunEtaR9 --plotOnly || exit 1 - -# ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step6${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 - + ./bin/ZFitter.exe -f $outDirData/step6${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step6${extension}/img/ --outDirFitResData=${outDirData}/step6${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 fi @@ -763,42 +779,180 @@ if [ -n "${STEP7}" ];then regionFileEE=${regionFileStep5EE} basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` - outFile=step6${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + outFile=${outDirTable}/step7${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat if [ ! -e "${outDirTable}/${outFileStep2}" ];then echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr #exit 1 fi - if [ ! -e "${outDirTable}/${outFile}" ];then + if [ -e "${outDirTable}/params-step7-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step7-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step7-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step6" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step7-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step6" >> /dev/stdout + + grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' > ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step7-${commonCut}.txt + + grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' >> ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step7-${commonCut}.txt + initFile="--initFile=${outDirTable}/params-step7-${commonCut}.txt"; + cat ${outDirTable}/params-step7-${commonCut}.txt + exit 0 + + echo "[ERROR] ${outDirTable}/params-step7-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step7${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEB + #mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEB ${outDirData}/step7 $outDirData/step7${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 + #mkSmearerCatData $regionFileEE ${outDirData}/step7 $outDirData/step7${extension}/`basename $configFile` --corrEleType=HggRunEtaR9OA + + if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi if [ ! -e "${outDirData}/step7${extension}/fitres" ];then mkdir ${outDirData}/step7${extension}/fitres -p; fi if [ ! -e "${outDirData}/step7${extension}/img" ];then mkdir ${outDirData}/step7${extension}/img -p; fi - if [ -e "${outDirTable}/params-step7-${commonCut}.txt" ];then - initFile="--initFile=${outDirTable}/params-step7-${commonCut}.txt"; - else - echo "[WARNING] init file ${outDirTable}/params-step7-${commonCut}.txt not found" >> /dev/stderr - echo " creating file from results of step6" >> /dev/stderr - echo "[WARNING] init file ${outDirTable}/params-step7-${commonCut}.txt not found" >> /dev/stdout - echo " creating file from results of step6" >> /dev/stdout - - grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' > ${outDirTable}/params-step7-${commonCut}.txt - grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step7-${commonCut}.txt - grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step7-${commonCut}.txt - - grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' >> ${outDirTable}/params-step7-${commonCut}.txt - grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step7-${commonCut}.txt - grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step7-${commonCut}.txt - initFile="--initFile=${outDirTable}/params-step7-${commonCut}.txt"; - cat ${outDirTable}/params-step7-${commonCut}.txt - exit 0 - - echo "[ERROR] ${outDirTable}/params-step7-${commonCut}.txt init file not found" >> /dev/stderr - exit 1 + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" fi + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + + for index in `seq 1 50` + do + mkdir ${outDirData}/step7${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step7${extension}/${index}/img -p + done + + + bsub -q 2nd \ + -oo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step7${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step7${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ +# -eo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ +# -J "${basenameEE} step7${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step7${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + + while [ "`bjobs -J \"${basenameEB} step7${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# while [ "`bjobs -J \"${basenameEE} step7${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + ./script/haddTGraph.sh -o ${outDirData}/step7${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step7${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + # ./script/haddTGraph.sh -o ${outDirData}/step7${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step7${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step7${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + # echo "FitProfile2(\"${outDirData}/step7${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C +# fi + +# cat ${outDirData}/step7${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step7${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + if [ ! -e "${outFile}" ];then + touch ${outFile} + fi + fi + + + ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + exit 0 + +# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + + grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2 \1 |' > tmp/res_corr_step7.dat #| awk '{print $1, ($2-1)*100,$3*100}' + awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step7.dat ${outDirTable}/${outFileStep2} > ${outDirTable}/${outFileStep7} + + #save root files with step1 corrections + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro --corrEleType HggRunEtaR9Et \ + --corrEleFile ${outDirTable}/${outFileStep7} || exit 1 + + mv tmp/scaleEle_HggRunEtaR9Et_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step7/ + + +# grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +# +# sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +# ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat |grep -v '#' #> ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + +fi + + + + + +if [ -n "${STEP8}" ];then + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/step8${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + + if [ ! -e "${outDirTable}/${outFileStep7}" ];then + echo "[ERROR] Impossible to run step8 without step7" >> /dev/stderr + exit 1 + fi + + if [ -e "${outDirTable}/params-step8-${commonCut}.txt" ];then + #initFile="--initFile=${outDirTable}/params-step8-${commonCut}.txt"; + initFile="--initFile=${outFile}" + else + echo "[WARNING] init file ${outDirTable}/params-step8-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step7" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step8-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step7" >> /dev/stdout + +# grep scale ${outDirData}/step7/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' > ${outDirTable}/params-step7-${commonCut}.txt + grep constTerm ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' > ${outDirTable}/params-step8-${commonCut}.txt + grep alpha ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step8-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step7-${commonCut}.txt + + initFile="--initFile=${outDirTable}/params-step8-${commonCut}.txt"; + cat ${outDirTable}/params-step8-${commonCut}.txt + exit 0 + fi + + if [ ! -e "${outFile}" -o "1" == "0" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step8${extension}/fitres" ];then mkdir ${outDirData}/step8${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step8${extension}/img" ];then mkdir ${outDirData}/step8${extension}/img -p; fi + + if [ "${extension}" == "weight" ];then updateOnly="$updateOnly --useR9weight" fi @@ -824,46 +978,246 @@ if [ -n "${STEP7}" ];then # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step7${extension}/`basename $configFile` + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step7/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step8${extension}/`basename $configFile` for index in `seq 1 50` do - mkdir ${outDirData}/step7${extension}/${index}/fitres/ -p - mkdir ${outDirData}/step7${extension}/${index}/img -p + mkdir ${outDirData}/step8${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step8${extension}/${index}/img -p done -# bsub -q 2nd \ -# -oo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ -# -eo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ -# -J "${basenameEB} step7${extension}[1-50]" \ -# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step7${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step8${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ + -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ + -J "`basename $regionFileStep4EB .dat` step8${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EB .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ + -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ + -J "`basename $regionFileStep4EE .dat` step8${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EE .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ + -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ + -J "`basename $regionFileStep4EBEE .dat` step8${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EBEE .dat`-done" + fi + +# while [ "`bjobs -J \"${basenameEB} step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EB .dat` step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EE .dat` step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EBEE .dat` step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + +# cat ${outDirData}/step8${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step8${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} +if [ ! -e "${outFile}" ];then + cat "`echo $initFile | sed 's|.*=||'`" > ${outFile} +fi +# fi + + +# ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + + ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly --profileOnly || exit 1 + + ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly --profileOnly || exit 1 + + ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly --profileOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + +# grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2 \1 |' > tmp/res_corr_step7.dat #| awk '{print $1, ($2-1)*100,$3*100}' +# awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step7.dat ${outDirTable}/${outFileStep2} > ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat + +# #save root files with step1 corrections +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# --saveCorrEleTree --corrEleType HggRunEtaR9Et \ +# --corrEleFile ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat || exit 1 + +# mv tmp/scaleEle_HggRunEtaR9Et_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step7/ + + +# grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +# +# sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +# ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat |grep -v '#' #> ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + +fi + + + + + + + + + + + + +if [ -n "${STEP9}" ];then +#stochastic smearing but with non Et dependent scale corrections + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + + if [ ! -e "${outDirTable}/${outFileStep2}" ];then + echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr + #exit 1 + fi + + if [ -e "${outDirTable}/params-step9-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step7" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step7" >> /dev/stdout + +# grep scale ${outDirData}/step7/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' > ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step9-${commonCut}.txt + +# grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' >> ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step9-${commonCut}.txt + initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt"; + cat ${outDirTable}/params-step9-${commonCut}.txt + exit 0 + + echo "[ERROR] ${outDirTable}/params-step9-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEB + #mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 + #mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9OA + + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + + + + for index in `seq 1 50` + do + mkdir ${outDirData}/step9${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${index}/img -p + done + + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" # bsub -q 2nd \ -# -oo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ -# -eo ${outDirData}/step7${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ -# -J "${basenameEE} step7${extension}[1-50]" \ +# -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ +# -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ +# -J "${basenameEE} step9${extension}[1-50]" \ # "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step7${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step7${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" - fi - while [ "`bjobs -J \"${basenameEB} step7${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - while [ "`bjobs -J \"${basenameEE} step7${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + while [ "`bjobs -J \"${basenameEB} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# while [ "`bjobs -J \"${basenameEE} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step7${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step7${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root - ./script/haddTGraph.sh -o ${outDirData}/step7${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step7${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + # ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root - ######################################################33 echo "{" > tmp/fitProfiles.C echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step7${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step7${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + # echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C +# fi + + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + if [ ! -e "${outFile}" ];then + touch ${outFile} + fi + fi + cat ${outDirData}/step9${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step9${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} + + + ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + + +# grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +# +# sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +# ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat |grep -v '#' #> ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex fi @@ -1220,7 +1574,7 @@ if [ -n "${STEP10}" ];then fi if [ -n "${STEP8}" ];then - # stochastic term resolution categories, scales in Et bins + # stochastic term resolution categories, scales in Et bins, corrections from step7 applied: closure test if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh index cc35076eddb..a6ffa30f92a 100644 --- a/ZFitter/script/functions.sh +++ b/ZFitter/script/functions.sh @@ -47,3 +47,62 @@ mcName(){ # echo $mcName fi } + + + + +mkSmearerCatSignal(){ + + if [ ! -e "data/smearerCat/smearerCat_`basename $1 .dat`_s1-`basename $configFile .dat`.root" -o ! -e "data/smearerCat/smearerCat_`basename $1 .dat`_s2-`basename $configFile .dat`.root" ];then + echo "[STATUS] Creating smearerCat for signal: `basename $configFile .dat` `basename $1 .dat`" + ./bin/ZFitter.exe -f ${configFile} --regionsFile=$1 \ + --saveRootMacro --addBranch=smearerCat_s || exit 1 + mv tmp/smearerCat_`basename $1 .dat`_s*-`basename $configFile .dat`.root data/smearerCat/ || exit 1 + fi + +# tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` +# for tag in $tags +# do +# case ${tag} in +# s*) +# if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then +# ./bin/ZFitter.exe -f ${configFile} --regionsFile=$1 \ +# --saveRootMacro \ +# --addBranch=smearerCat_s --smearerFit +# break; +# fi +# ;; +# esac +# done + +# for tag in $tags +# do +# case ${tag} in +# s*) +# if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then +# mv tmp/smearerCat_`basename $1 .dat`_${tag}-`basename $configFile .dat`.root data/smearerCat/smearerCat_`basename $1 .dat`_${tag}-`basename $configFile .dat`.root #|| exit 1 +# echo -e "$tag\tsmearerCat_${basenameEB}\tdata/smearerCat/smearerCat_`basename $1 .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile +# fi +# ;; +# esac +# done +} + + +mkSmearerCatData(){ + #$1: regionFile + #$2: outDirData/step... + #$3: configFile + #$4: corrEleType + if [ ! -e "$2/smearerCat_`basename $1 .dat`_d1-`basename $configFile .dat`.root" ];then + echo "[STATUS] Creating smearerCat for data: `basename $configFile .dat` `basename $1 .dat`" + ./bin/ZFitter.exe -f $3 --regionsFile=$1 \ + --saveRootMacro --addBranch=smearerCat_d $4 || exit 1 + mv tmp/smearerCat_`basename $1 .dat`_d*-`basename $configFile .dat`.root $2/ || exit 1 + fi + cat $3 \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $1 .dat`\t$2/smearerCat_`basename $1 .dat`_\1-`basename $3 .dat`.root|}" | sort | uniq |grep smearerCat >> $2/`basename $configFile` + + +} + diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index 3faca307818..46ab2ce4b3c 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -12,7 +12,7 @@ configFile=data/validation/monitoring_2012_53X.dat runRangesFile=data/runRanges/monitoring.dat baseDir=test -updateOnly="--updateOnly" +updateOnly="--updateOnly --noPU" #extraOptions="--forceNewFit" #extraOptions="--addBranch iSM --forceNewFit" diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index f8a7fb7b84d..006cbe1435f 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -13,7 +13,9 @@ ElectronCategory_class::~ElectronCategory_class(){ ElectronCategory_class::ElectronCategory_class(bool isRooFit_, bool roofitNameAsNtuple_): _isRooFit(isRooFit_), - _roofitNameAsNtuple(roofitNameAsNtuple_){ + _roofitNameAsNtuple(roofitNameAsNtuple_), + energyBranchName("energySCEle_regrCorrSemiParV5_pho"), + _corrEle(false){ return; } @@ -43,9 +45,10 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co if(isMC && cut_string.Contains("lumiBlock")) continue; // std::cout << "[DEBUG] Skipping runNumber cut for MC " << isMC << "\t" << string << std::endl; - if(corrEle){ - cut_string.ReplaceAll("energySCEle_ele1","energySCEle_ele1 * corrEle_ele1"); - cut_string.ReplaceAll("energySCEle_ele2","energySCEle_ele2 * corrEle_ele2"); + if(isMC==false && (corrEle || _corrEle)){ + //std::cerr << "[INFO] scaleEle for GetCut" << std::endl; + cut_string.ReplaceAll(energyBranchName+"_ele1",energyBranchName+"_ele1 * scaleEle_ele1"); + cut_string.ReplaceAll(energyBranchName+"_ele2",energyBranchName+"_ele2 * scaleEle_ele2"); } // se contiene solo ele2 rimuovi, altrimenti sostituisci if(nEle!=0){ @@ -598,8 +601,8 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TString string1 = Objstring1->GetString(); - TCut cutEle1("(energySCEle_ele1/cosh(etaSCEle_ele1)) >= "+string1); - TCut cutEle2("(energySCEle_ele2/cosh(etaSCEle_ele2)) >= "+string1); + TCut cutEle1("("+energyBranchName+"_ele1/cosh(etaSCEle_ele1)) >= "+string1); + TCut cutEle2("("+energyBranchName+"_ele2/cosh(etaSCEle_ele2)) >= "+string1); cut_string+=cutEle1 && cutEle2; cutSet.insert(TString(cutEle1 && cutEle2)); @@ -612,10 +615,10 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TString string1 = Objstring1->GetString(); TString string2 = Objstring2->GetString(); - TCut cutEle1_1("energySCEle_ele1/cosh(etaSCEle_ele1) >= "+string1); - TCut cutEle1_2("energySCEle_ele1/cosh(etaSCEle_ele1) < "+string2); - TCut cutEle2_1("energySCEle_ele2/cosh(etaSCEle_ele2) >= "+string1); - TCut cutEle2_2("energySCEle_ele2/cosh(etaSCEle_ele2) < "+string2); + TCut cutEle1_1(""+energyBranchName+"_ele1/cosh(etaSCEle_ele1) >= "+string1); + TCut cutEle1_2(""+energyBranchName+"_ele1/cosh(etaSCEle_ele1) < "+string2); + TCut cutEle2_1(""+energyBranchName+"_ele2/cosh(etaSCEle_ele2) >= "+string1); + TCut cutEle2_2(""+energyBranchName+"_ele2/cosh(etaSCEle_ele2) < "+string2); TCut ele1_cut = cutEle1_1 && cutEle1_2; TCut ele2_cut = cutEle2_1 && cutEle2_2; @@ -1238,7 +1241,7 @@ std::set ElectronCategory_class::GetBranchNameNtuple(TString region){ reg.Substitute(cut," ","g"); reg=TPRegexp("SingleEle"); reg.Substitute(cut," ","g"); - + cut.ReplaceAll("scaleEle",""); TObjArray *splitted = cut.Tokenize(" "); for(int i =0; i < splitted->GetEntries(); i++){ diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 1fca2bfc6c8..030a8e8f230 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -1,5 +1,5 @@ #include "../interface/EnergyScaleCorrection_class.h" -#define DEBUG +//#define DEBUG // for exit(0) #include @@ -7,13 +7,11 @@ #include //#define DEBUG -//#define OldCategoryDefinition -//EnergyScaleCorrection_class::EnergyScaleCorrection_class(TString correctionFileName, bool isHggCat_): -EnergyScaleCorrection_class::EnergyScaleCorrection_class(TString correctionFileName, TString correctionType_, - TString smearingFileName, TString smearingType_): + +EnergyScaleCorrection_class::EnergyScaleCorrection_class(TString correctionFileName, + TString smearingFileName): noCorrections(true), noSmearings(true), - correctionType(correctionType_), smearingType(smearingType_), - runMin_map(), rgen_(NULL) + rgen_(NULL) { if(smearingFileName.Sizeof()>1) noSmearings=false; else noSmearings=true; @@ -21,34 +19,23 @@ EnergyScaleCorrection_class::EnergyScaleCorrection_class(TString correctionFileN if(correctionFileName.Sizeof()>1) noCorrections=false; else noCorrections=true; - if(correctionType.Sizeof()<=1 && smearingType.Sizeof()>1) correctionType=smearingType; -#ifdef DEBUG - std::cout << "[DEBUG] Using correctionType: " << correctionType << std::endl; -#endif - - if(correctionType.CompareTo("noCalib")==0){ - noCorrections=true; - } else{ - if(correctionType.Contains("Run",TString::kIgnoreCase) - && ! correctionFileName.Sizeof()>1){ - std::cerr << "[ERROR] Correction type: " << correctionType << " but not correction file give" << std::endl; - std::cerr << " Correction file: " << correctionFileName << std::endl; + if(!noCorrections){ + ReadFromFile(correctionFileName); + if(scales.empty()){ + std::cerr << "[ERROR] scale correction map empty" << std::endl; + noCorrections=true; exit(1); } - noCorrections=false; } - - if(correctionType.Contains("Hgg",TString::kIgnoreCase) || - smearingType.Contains("Hgg",TString::kIgnoreCase)){ - isHggCat=true; - //noCorrections=false; + if(!noSmearings){ + ReadSmearingFromFile(smearingFileName); + if(smearings.empty()){ + std::cerr << "[ERROR] scale correction map empty" << std::endl; + noCorrections=true; + exit(1); + } } - - if(!noCorrections) ReadFromFile(correctionFileName); - runCorrection_itr=runMin_map.begin(); - - if(!noSmearings) ReadSmearingFromFile(smearingFileName); rgen_=new TRandom3(0); // inizializzo il generatore con seed impostato sull'ora return; @@ -58,206 +45,55 @@ EnergyScaleCorrection_class::~EnergyScaleCorrection_class(void){ return; } -TString EnergyScaleCorrection_class::GetElectronCategory(bool isEBEle, double R9Ele, double etaSCEle){ - TString category; - -// if(isEBEle) category="EB"; -// else category="EE"; - - if(isHggCat){ - if(correctionType.Contains("Hgg",TString::kIgnoreCase)){ - if(correctionType.Contains("eta",TString::kIgnoreCase)){ - - // if(correctionType.CompareTo("Hgg_eta_runNumber")==0){ - if(isEBEle){ - if (fabs(etaSCEle)>1.) category+="absEta_1_1.4442"; - else category+="absEta_0_1"; - } else { - if (fabs(etaSCEle) > 2) category+="absEta_2_2.5"; - else category+="absEta_1.566_2"; - } - } - if(correctionType.Contains("residual",TString::kIgnoreCase)||correctionType.Contains("R9",TString::kIgnoreCase)){ - if(R9Ele>0.94) category+="-gold"; - else category+="-bad"; - // if(R9Ele>0.94) category+="Gold"; - // else category+="Bad"; - } - if(correctionType.Contains("Et",TString::kIgnoreCase)){ - if(R9Ele>0.94) category+="-gold"; - else category+="-bad"; - // if(R9Ele>0.94) category+="Gold"; - // else category+="Bad"; - } - - } - } -#ifdef DEBUG - std::cout << "[DEBUG] category: " << category << std::endl; -#endif - return category; - -} - -std::map< int, correction_t>::const_iterator EnergyScaleCorrection_class::FindRunCorrection_itr(int runNumber){ - std::map< int, correction_t>::const_iterator itr=runMin_map.begin(); - - while (runNumber >= itr->first && itr!=runMin_map.end()){ -#ifdef DEBUG - std::cout << "runNumber - itr->first: " << runNumber << " - " << itr->first << std::endl; -#endif - itr++; - } - itr--; -#ifdef DEBUG - std::cout << "[DEBUG] runNumber - [itr->first: itr->second.runMax] " << runNumber << " - [" << itr->first << ":" << itr->second.runMax << "]" << std::endl; -#endif - - if(itr->second.runMax < runNumber){ - // std::cerr << "[WARNING] runNumber > runs in recalib file: " << runNumber << std::endl; - return runMin_map.end(); - } - // if(runNumber <= itr->second.runMax) // c'e' un altro errore ma non e' possibile - return itr; -} float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle){ if(noCorrections) return 1; - if(runMin_map.empty()){ - std::cerr << "[ERROR] runMin_map empty and calibration required" << std::endl; - //std::cerr << "[ERROR] turning into noCorrection mode" << std::endl; - noCorrections=true; - exit(1); - //return 1; - } - - - if(!(runNumber >= runCorrection_itr->first && runNumber <= runCorrection_itr->second.runMax)){ -#ifdef DEBUG - std::cout << "[DEBUG] starting FindRunCorrection: " << runNumber << "\t" << runCorrection_itr->first << "\t" << runCorrection_itr->second.runMax << std::endl; -#endif - runCorrection_itr=FindRunCorrection_itr(runNumber); - if (runCorrection_itr==runMin_map.end()){ - runCorrection_itr=runMin_map.begin(); // lo reinizializzo per i prossimi run - exit(0); - return 0; // se per esempio il runNumber non e' definito nel recalib file + + correctionCategory_class category(runNumber, etaSCEle, R9Ele, EtEle); + correction_map_t::const_iterator corr_itr = scales.find(category); + if(corr_itr==scales.end()){ // if not in the standard classes, add it in the list of not defined classes + if(scales_not_defined.count(category)==0){ + correctionValue_class corr; + scales_not_defined[category]=corr; } + corr_itr = scales_not_defined.find(category); + // std::cout << "[ERROR] Category not found: " << std::endl; + // std::cout << category << std::endl; + // exit(1); } - // if (runMin_map.count(runNumber)==1){ -#ifdef DDEBUG - std::cout << "[DEBUG] " << runNumber << "\t" << runCorrection_itr->first << "\t" << runCorrection_itr->second.runMax << std::endl; -#endif - - const correction_map_t *correction_map_p = &(runCorrection_itr->second.correction_map); - - - //TString category=GetElectronCategory(isEBEle, R9Ele, etaSCEle); - correctionCategory_class category(runNumber, etaSCEle, R9Ele,EtEle); #ifdef DEBUG std::cout << "[DEBUG] Checking correction for category: " << category << std::endl; - std::cout << "[DEBUG] Correction is: " << (--(correction_map_p->upper_bound(category)))->second.first + std::cout << "[DEBUG] Correction is: " << corr_itr->second << std::endl - << " given for category " << ((--(correction_map_p->upper_bound(category)))->first) << std::endl; + << " given for category " << corr_itr->first; #endif -#ifdef DDEBUG - if(! (category < (--(correction_map_p->upper_bound(category)))->first)) - std::cout << "[DEBUG] category(isEBEle, R9Ele) = " << category << "(" << isEBEle << ", " << R9Ele << ")" << correction_map_p->find(category)->second.first << std::endl; - -#endif - - if(correction_map_p->count(category)==1){ - return correction_map_p->find(category)->second.first; - } else{ - if(fabs(etaSCEle)>2.5) return 1; - if(EtEle>20 && EtEle<100){ - exit(1); - std::cout << "[ERROR] Category not found: "<< std::endl; - std::cout << category << std::endl; - std::cout << (--(correction_map_p->upper_bound(category)))->first << std::endl; - } else { - return 1; - } - } - -// if ((--(correction_map_p->upper_bound(category)))->second.first==0){ - -// std::cout << category << "\t" << runCorrection_itr->first << "\t" << (--(correction_map_p->upper_bound(category)))->second.first << std::endl; -// exit(1); -// } else return 1; -// } -// return (--(correction_map_p->upper_bound(category)))->second.first; //->second.first(); //upper_bound(category)->second.first; -// std::cerr << "[ERROR] Electron category " << category << " not found!!!! Scale offset not applied" << std::endl; -// std::cerr << " " << runNumber << "\t" << runCorrection_itr->first << "\t" << runCorrection_itr->second.runMax << std::endl; -// exit(1); -// return 1; -// } + return corr_itr->second.scale; } void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax_, double deltaP_, double err_deltaP_){ - // se le corrections non sono definite per Hgg (gold e bad) allora ignoro le righe che si riferiscono a queste categorie - if( (!isHggCat) && (category_.Contains("gold") || category_.Contains("bad"))) { -#ifdef DEBUG - std::cout << "[DEBUG] line of HggCat recalib: " << category_ << " ignore" << std::endl; -#endif - return; - } - // if( isHggCat && (!(category_.Contains("gold") || category_.Contains("bad")))){ -#ifdef DEBUG - // std::cout << "[DEBUG] line of not HggCat recalib: " << category_ << " ignore" << std::endl; -#endif - // return; - // } correctionCategory_class cat(category_); cat.runmin=runMin_; cat.runmax=runMax_; - std::map ::iterator itr=runMin_map.find(runMin_); - if (itr!=runMin_map.end()){ // if exists - if(itr->second.runMax != runMax_){ - std::cerr << "[ERROR] two run ranges with same runMin and different runMax" << std::endl; - std::cerr << " value not added" << std::endl; - std::cerr << " " << category_ << "\t" << runMin_ << "\t" << runMax_ << "\t" << deltaP_ << std::endl; - std::cerr << " " << itr->first << "\t" << itr->second.runMax << std::endl; - return; - } - - // probabilmente la categoria non e' ancora stata definita e la aggiungo - //1-deltaP_; // deltaP_ e' lo shift, devo correggerlo (quindi -deltaP_) - itr->second.correction_map[cat].first=deltaP_; // allo stato attuale passo come input il file con le correzioni (1-deltaP/100) - itr->second.correction_map[cat].second=err_deltaP_; // inefficiente - //#ifdef DEBUG - std::cout << "[DEBUG]" << cat << std::endl; - std::cout << "[DEBUG] " << category_ << "\t" - << itr->first << "-" << itr->second.runMax - << "\t" << itr->second.correction_map.size() - << "\t" << itr->second.correction_map[cat].first << std::endl; - //"\t" << deltaP_ << "\t" << itr->second.correction_map[category_].first << std::endl; - //std::cout << "[DEBUG] " << err_deltaP_ << "\t" << itr->second.correction_map[category_].second << std::endl; - //#endif - - - } else { - correction_t corr; - corr.runMax=runMax_; - std::pair pair_tmp; - pair_tmp.first=deltaP_; - pair_tmp.second=err_deltaP_; - corr.correction_map[cat]=pair_tmp; //std::make_pair(deltaP_, err_deltaP_); //(1-deltaP_, err_deltaP_); - // corr.correction_map[category_].second=err_deltaP_; - runMin_map[runMin_]=corr; // aggiungo il nuovo - itr=runMin_map.find(runMin_); - // std::cout << "[DEBUG]" << cat << std::endl; - std::cout << "[DEBUG] " << category_ << "\t" - << itr->first << "-" << itr->second.runMax - << "\t" << itr->second.correction_map.size() - << "\t" << itr->second.correction_map[cat].first << std::endl; + if(scales.count(cat)!=0){ + std::cerr << "[ERROR] Category already defined!" << std::endl; + std::cerr << " Adding category: " << cat << std::endl; + std::cerr << " Defined category: " << scales[cat] << std::endl; + exit(1); } + + correctionValue_class corr; + corr.scale=deltaP_; + corr.scale_err=err_deltaP_; + scales[cat]=corr; + + std::cout << "[INFO:scale correction] " << cat << corr << std::endl; return; } @@ -266,14 +102,11 @@ void EnergyScaleCorrection_class::ReadFromFile(TString filename){ ifstream f_in(filename); if(!f_in.good()){ std::cerr << "[ERROR] file " << filename << " not readable" << std::endl; + exit(1); return; } int runMin, runMax; -#ifdef SHERVIN - double deltaM_data, err_deltaM_data; - double deltaM_MC, err_deltaM_MC; -#endif TString category, region2; double deltaP, err_deltaP; @@ -281,33 +114,12 @@ void EnergyScaleCorrection_class::ReadFromFile(TString filename){ for(f_in >> category; f_in.good(); f_in >> category){ f_in >> region2 >> runMin >> runMax -#ifdef SHERVIN - >> deltaM_data >> err_deltaM_data - >> deltaM_MC >> err_deltaM_MC; - deltaP=(deltaM_data - deltaM_MC)/91.188; - err_deltaP=sqrt(err_deltaM_data*err_deltaM_data + err_deltaM_MC * err_deltaM_MC)/91.188; + >> deltaP >> err_deltaP; -#else - >> deltaP >> err_deltaP; -#endif - -#ifdef DEBUG -#ifdef SHERVIN - std::cout << "[DEBUG]" << "\t" << "category" << "\t" << "runMin" << "\t" <<"deltaM_data" << "\t" << "deltaM_MC" << "\t" << "deltaP" << std::endl; - std::cout << "[DEBUG]" << "\t" << category << "\t" << runMin << "\t" << runMax << "\t" << deltaM_data << "\t" << deltaM_MC << "\t" << deltaP << std::endl; -#else - std::cout << "[DEBUG]" << "\t" << "category" << "\t" << "runMin" << "\t" << "runMax\t" << "deltaP\terr_DeltaP" << std::endl; - std::cout << "[DEBUG]" << "\t" << category << "\t" << runMin << "\t" << runMax << "\t" << deltaP << "\t" << err_deltaP<< std::endl; -#endif -#endif Add(category, runMin, runMax, deltaP, err_deltaP); } f_in.close(); - runCorrection_itr=runMin_map.begin(); -#ifdef DEBUG - std::cout << "[STATUS DEBUG] runCorrection_itr->first: " << runCorrection_itr->first << "\t runMin_map.begin(): " << runMin_map.begin()->first << std::endl; -#endif return; } @@ -326,8 +138,8 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, TString nPVBranchName ){ float nPVmean = 0; - if(correctionType.Contains("nPV")) - nPVmean = GetMean_nPV(tree, fastLoop,nPVBranchName); +// if(correctionType.Contains("nPV")) +// nPVmean = GetMean_nPV(tree, fastLoop,nPVBranchName); Int_t nPV_; Int_t runNumber_; @@ -338,7 +150,7 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, Float_t scaleEle_[2]; - TTree *newTree = new TTree("scaleEle_"+correctionType,correctionType); + TTree *newTree = new TTree("scaleEle",""); //+correctionType,correctionType); newTree->Branch("scaleEle", scaleEle_, "scaleEle[2]/F"); if(fastLoop){ @@ -389,6 +201,7 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, //============================== SMEARING void EnergyScaleCorrection_class::AddSmearing(TString category_, int runMin_, int runMax_, double constTerm, double err_constTerm, double alpha, double err_alpha){ +#ifdef SHERVIN //double smearing_, double err_smearing_){ // se le corrections non sono definite per Hgg (gold e bad) allora ignoro le righe che si riferiscono a queste categorie if( (!isHggCat) && (category_.Contains("gold",TString::kIgnoreCase) || category_.Contains("bad",TString::kIgnoreCase))) { @@ -405,11 +218,13 @@ void EnergyScaleCorrection_class::AddSmearing(TString category_, int runMin_, in pair_tmp.first=constTerm; pair_tmp.second=alpha; smearings[category_]=pair_tmp; +#endif return; } void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ +#ifdef SHERVIN std::cout << "[STATUS] Reading smearing values from file: " << filename << std::endl; ifstream f_in(filename); if(!f_in.good()){ @@ -435,12 +250,14 @@ void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ // runCorrection_itr=runMin_map.begin(); noSmearings=false; +#endif return; } float EnergyScaleCorrection_class::getSmearingSigma(float energy, bool isEBEle, float R9Ele, float etaSCEle){ +#ifdef SHERVIN //const correction_map_t *correction_map_p = &(runCorrection_itr->second.correction_map); TString category=GetElectronCategory(isEBEle, R9Ele, etaSCEle); @@ -452,6 +269,8 @@ float EnergyScaleCorrection_class::getSmearingSigma(float energy, bool isEBEle, double constTerm=smearings.find(category)->second.first; double alpha=smearings.find(category)->second.second; return sqrt(constTerm*constTerm + alpha*alpha/energy); +#endif + return 0; } float EnergyScaleCorrection_class::getSmearing(float energy, bool isEBEle, float R9Ele, float etaSCEle){ @@ -475,7 +294,7 @@ TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, Float_t smearEle_[2]; - TTree *newTree = new TTree("smearEle_"+correctionType,correctionType); + TTree *newTree = new TTree("smearEle_",""); //+correctionType,correctionType); newTree->Branch("smearEle", smearEle_, "smearEle[2]/F"); if(tree==NULL){ @@ -526,9 +345,10 @@ float EnergyScaleCorrection_class::ScaleCorrection(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle, int nPV, float nPVmean){ float correction = 1; - if(correctionType.Contains("Run", TString::kIgnoreCase)) correction*=getScaleOffset(runNumber, isEBEle, R9Ele, etaSCEle, EtEle); + // if(correctionType.Contains("Run", TString::kIgnoreCase)) + correction*=getScaleOffset(runNumber, isEBEle, R9Ele, etaSCEle, EtEle); - if(correctionType.Contains("nPV",TString::kIgnoreCase)) correction *= 1- (-0.02 * (nPV -nPVmean))/100; + // if(correctionType.Contains("nPV",TString::kIgnoreCase)) correction *= 1- (-0.02 * (nPV -nPVmean))/100; return correction; @@ -590,15 +410,15 @@ correctionCategory_class::correctionCategory_class(TString category_){ r9min=-1;r9max=10; etmin=-1;etmax=300.; - unsigned int p1,p2; // boundary + size_t p1,p2; // boundary // eta region p1 = category.find("absEta_"); p2 = p1+1; if(category.find("absEta_0_1")!=std::string::npos){ etamin=0; etamax=1;} - else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.479;}//etamax=1.4442; } - else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.479; etamax=2;} // etamin=1.566} - else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=3;} + else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.4442; } + else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.566; etamax=2;} + else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=2.5;} else{ if(p1!=std::string::npos){ p1 = category.find("_",p1); @@ -613,7 +433,8 @@ correctionCategory_class::correctionCategory_class(TString category_){ // Et region p1 = category.find("-Et_"); p2 = p1+1; - std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << "\t" << p1 << "\t" << p2 << std::endl; + // std::cout << "p1 = " << p1 << "\t" << std::string::npos << "\t" << category.size() << std::endl; + //std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << "\t" << p1 << "\t" << p2 << std::endl; if(p1 !=std::string::npos){ p1 = category.find("_",p1); p2 = category.find("_",p1+1); diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 543eb95171c..9a11254760a 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -1,3 +1,4 @@ + #include "../interface/RooSmearer.hh" //#include #define FIXEDSMEARINGS @@ -102,6 +103,10 @@ void RooSmearer::SetCache(Long64_t nEvents, bool cacheToy, bool externToy){ data_events_cache = importer.GetCache(_data_chain, false, false, nEvents); } } + if(!mc_events_cache.empty()){ + std::cerr << "[ERROR] mc_events_cache not empty: " << mc_events_cache.size() << std::endl; + exit(1); + } if(mc_events_cache.empty()){ if(cacheToy){ std::cout << "[STATUS] --- Setting toy cache for mc" << std::endl; @@ -198,9 +203,9 @@ void RooSmearer::InitCategories(bool mcToy){ //------------------------------ deactivating category cat.active=true; - unsigned int deactiveMinEvents = _deactive_minEventsDiag; + unsigned int deactiveMinEvents = 1000; //_deactive_minEventsDiag; if(cat.categoryIndex1 != cat.categoryIndex2) // not diagonal category - deactiveMinEvents=_deactive_minEventsOffDiag; + deactiveMinEvents=2000; //_deactive_minEventsOffDiag; if(cat.hist_mc->Integral() < deactiveMinEvents){ std::cout << "[INFO] Category: " << ZeeCategories.size() << ": " << cat.categoryName1 << "\t" << cat.categoryName2 @@ -234,7 +239,7 @@ void RooSmearer::InitCategories(bool mcToy){ cat.nLLtoy=1; - + cat.nll=0; std::cout << "[INFO] Category: " << ZeeCategories.size() << "\t" << cat.categoryName1 << "\t" << cat.categoryName2 << "\t" << cat.categoryIndex1 << "\t" << cat.categoryIndex2 diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 7f19ecf0d58..da3520ae9bf 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -103,6 +103,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(isToy==false || (externToy==true && isToy==true && isMC==false)){ std::cout << "[STATUS] Adding electron energy correction branch from friend" << std::endl; chain->SetBranchAddress("scaleEle", corrEle_); + cutter._corrEle=true; } } @@ -143,6 +144,10 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS hasSmearerCat=true; } + if(hasSmearerCat==false){ + std::cerr << "[ERROR] Must have smearerCat branch" << std::endl; + exit(1); + } Long64_t entries = chain->GetEntryList()->GetN(); if(nEvents>0 && nEventsGetBranch("scaleEle")!=NULL){ std::cout << "[STATUS] Activating branch scaleEle" << std::endl; _chain->SetBranchStatus("scaleEle", 1); + cutter._corrEle=true; } if(_chain->GetBranch("smearEle")!=NULL){ diff --git a/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc index b970445dbb9..5468c951e9a 100644 --- a/ZFitter/src/addBranch_class.cc +++ b/ZFitter/src/addBranch_class.cc @@ -256,24 +256,39 @@ TTree* addBranch_class::AddBranch_iSM(TChain* originalChain, TString treename, T TTree* addBranch_class::AddBranch_smearerCat(TChain* originalChain, TString treename, bool isMC){ ElectronCategory_class cutter; + if(originalChain->GetBranch("scaleEle")!=NULL){ + cutter._corrEle=true; + std::cout << "[INFO] Activating scaleEle for smearerCat" << std::endl; + + } TString oddString=""; //setting the new tree TTree *newtree = new TTree(treename, treename); Int_t smearerCat[2]; - Char_t cat1[100], cat2[100]; + Char_t cat1[200], cat2[100]; newtree->Branch("smearerCat", smearerCat, "smearerCat[2]/I"); newtree->Branch("catName", cat1, "catName/C"); // newtree->Branch("catName2", cat2, "catName2/C"); /// \todo disable branches using cutter - originalChain->SetBranchStatus("*",1); + originalChain->SetBranchStatus("*",0); std::vector< std::pair > catSelectors; for(std::vector::const_iterator region_ele1_itr = _regionList.begin(); region_ele1_itr != _regionList.end(); region_ele1_itr++){ + + // \todo activating branches // not efficient in this loop + std::set branchNames = cutter.GetBranchNameNtuple(*region_ele1_itr); + for(std::set::const_iterator itr = branchNames.begin(); + itr != branchNames.end(); itr++){ + originalChain->SetBranchStatus(*itr, 1); + } + if( cutter._corrEle==true) originalChain->SetBranchStatus("scaleEle", 1); + + for(std::vector::const_iterator region_ele2_itr = region_ele1_itr; region_ele2_itr != _regionList.end(); region_ele2_itr++){ @@ -281,26 +296,28 @@ TTree* addBranch_class::AddBranch_smearerCat(TChain* originalChain, TString tree if(region_ele2_itr==region_ele1_itr){ TString region=*region_ele1_itr; region.ReplaceAll(_commonCut,""); //remove the common Cut! - TTreeFormula *selector = new TTreeFormula("selector"+(region), cutter.GetCut(region+oddString, isMC), originalChain); + TTreeFormula *selector = new TTreeFormula("selector-"+(region), cutter.GetCut(region+oddString, isMC), originalChain); catSelectors.push_back(std::pair(selector,NULL)); //selector->Print(); + //std::cout << cutter.GetCut(region+oddString, isMC) << std::endl; + //exit(0); } else { TString region1=*region_ele1_itr; TString region2=*region_ele2_itr; region1.ReplaceAll(_commonCut,""); region2.ReplaceAll(_commonCut,""); - TTreeFormula *selector1 = new TTreeFormula("selector1"+region1+region2, + TTreeFormula *selector1 = new TTreeFormula("selector1-"+region1+region2, cutter.GetCut(region1+oddString, isMC, 1) && cutter.GetCut(region2+oddString, isMC, 2), originalChain); - TTreeFormula *selector2 = new TTreeFormula("selector2"+region1+region2, + TTreeFormula *selector2 = new TTreeFormula("selector2-"+region1+region2, cutter.GetCut(region1+oddString, isMC, 2) && cutter.GetCut(region2+oddString, isMC, 1), originalChain); catSelectors.push_back(std::pair(selector1,selector2)); //selector1->Print(); - //selector2->Print(); - + // selector2->Print(); + //exit(0); } } diff --git a/ZFitter/test/test.cpp b/ZFitter/test/test.cpp index a00a8f7e490..447a42fa95d 100644 --- a/ZFitter/test/test.cpp +++ b/ZFitter/test/test.cpp @@ -61,9 +61,17 @@ int main(int argc, char **argv) { // if(p1==p2) std::cout << "uguali 1" << std::endl; if(!(p1upper_bound(category)))->first)) +// std::cout << "[DEBUG] category(isEBEle, R9Ele) = " << category << "(" << isEBEle << ", " << R9Ele << ")" << correction_map_p->find(category)->second.first << std::endl; + return 0; } From 4a6b26ae85c3f60e3f465c93d5db644ae9ca5abc Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Dec 2013 09:46:20 +0100 Subject: [PATCH 194/475] adding missing doc directory --- doc/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/.gitignore diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 00000000000..72e8ffc0db8 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +* From 14b24a30c2568ae2ef84ae66965ff1182ebbefe5 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Dec 2013 09:47:24 +0100 Subject: [PATCH 195/475] adding missing doc directory --- doc/{ => doxygen}/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{ => doxygen}/.gitignore (100%) diff --git a/doc/.gitignore b/doc/doxygen/.gitignore similarity index 100% rename from doc/.gitignore rename to doc/doxygen/.gitignore From 3401f93f1f15c2bc4d8db9f45a5fc09d5e61355d Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Dec 2013 12:23:41 +0100 Subject: [PATCH 196/475] updated instructions --- README.md | 44 +++++++++++++++++++++++++++++- ZNtupleDumper/src/ZNtupleDumper.cc | 22 +++++++-------- 2 files changed, 54 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3c5e62a0dd5..beb8ad66d9e 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,46 @@ ECALELF ======= Code for electron calibration in CMS -Testing \ No newline at end of file +Testing + + +====== +Download instructions. + +cp ~shervin/public/setup-newMaster.sh . +./setup.sh CMSSW_5_3_7_patch6 +cd CMSSW_5_3_7_patch6/src/ +cmsenv + +NB: I'm not able to say to scram not to compile a particular directory, then the Calibration/ZFitter directory is not skipped by scram and the compilation fails. you should compile by hand all the packages except Calibration/ZFitter +In order to compile Calibration/ZFitter do + +cd Calibration/ZFitter +make + + +====== +Instructions for developments: +fork the repository in GIT to your own area +git@github.com:ECALELFS/ECALELF.git + +Add your git repository to the list of remotes to be used like: +git remote add -f myfork git@github.com:hengne/ECALELF.git +git checkout newMaster + +Create a new branch for your development (use a meaningful name) +git branch myNewBranch +Push it to your git repository +git branch push myNewBranch myfork + +Then start to develop, remember to do commits as much as possible + + +====== +Code documentation: +Once downloaded the code, in Calibration/ you can run the command + +doxygen fulldoc + +to have the code documentation produced by doxygen opening the doc/doxygen/fulldoc/html/index.html with your browser + diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 68a65b8675a..b8e761dc722 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -209,7 +209,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t nPU[5]; //[nBX] ///< number of PU (filled only for MC) // selection - Int_t eleID[2]; ///< bit mask for eleID: 1=fiducial, 2=WP90, 3=WP90+fiducial, 6=WP80, 7=WP80+fiducial, 14=WP70, 15=WP70+fiducial + Int_t eleID[2]; ///< bit mask for eleID: 1=fiducial, 2=loose, 6=medium, 14=tight, 16=WP90PU, 48=WP80PU. Selection from https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaCutBasedIdentification#Electron_ID_Working_Points Int_t chargeEle[2]; Float_t etaSCEle[2], phiSCEle[2]; ///< phi of the SC @@ -243,16 +243,16 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t energySigmaSCEle_regrCorr_ele[2]; Float_t energySigmaSCEle_regrCorr_pho[2]; - Float_t energySCEle_regrCorrSemiParV4_pho[2], energySigmaSCEle_regrCorrSemiParV4_pho[2]; - Float_t energySCEle_regrCorrSemiParV4_ele[2], energySigmaSCEle_regrCorrSemiParV4_ele[2]; - Float_t energySCEle_regrCorrSemiParV5_pho[2], energySigmaSCEle_regrCorrSemiParV5_pho[2]; - Float_t energySCEle_regrCorrSemiParV5_ele[2], energySigmaSCEle_regrCorrSemiParV5_ele[2]; - Float_t energySCEle_regrCorrSemiParV6_pho[2], energySigmaSCEle_regrCorrSemiParV6_pho[2]; - Float_t energySCEle_regrCorrSemiParV6_ele[2], energySigmaSCEle_regrCorrSemiParV6_ele[2]; - Float_t energySCEle_regrCorrSemiParV7_pho[2], energySigmaSCEle_regrCorrSemiParV7_pho[2]; - Float_t energySCEle_regrCorrSemiParV7_ele[2], energySigmaSCEle_regrCorrSemiParV7_ele[2]; - Float_t energySCEle_regrCorrSemiParV8_pho[2], energySigmaSCEle_regrCorrSemiParV8_pho[2]; - Float_t energySCEle_regrCorrSemiParV8_ele[2], energySigmaSCEle_regrCorrSemiParV8_ele[2]; + Float_t energySCEle_regrCorrSemiParV4_pho[2], energySigmaSCEle_regrCorrSemiParV4_pho[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV4_ele[2], energySigmaSCEle_regrCorrSemiParV4_ele[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV5_pho[2], energySigmaSCEle_regrCorrSemiParV5_pho[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV5_ele[2], energySigmaSCEle_regrCorrSemiParV5_ele[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV6_pho[2], energySigmaSCEle_regrCorrSemiParV6_pho[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV6_ele[2], energySigmaSCEle_regrCorrSemiParV6_ele[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV7_pho[2], energySigmaSCEle_regrCorrSemiParV7_pho[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV7_ele[2], energySigmaSCEle_regrCorrSemiParV7_ele[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV8_pho[2], energySigmaSCEle_regrCorrSemiParV8_pho[2]; ///< see documentation on regressions + Float_t energySCEle_regrCorrSemiParV8_ele[2], energySigmaSCEle_regrCorrSemiParV8_ele[2]; ///< see documentation on regressions Float_t energySCEle_corr[2]; ///< ecal energy with corrections base on type of electron (see #classificationEle) From 223469657bae48621e563ffdb22e0e60fcefb575 Mon Sep 17 00:00:00 2001 From: shervin86 Date: Fri, 6 Dec 2013 16:51:43 +0100 Subject: [PATCH 197/475] Update README.md --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index beb8ad66d9e..1d6d2c8a710 100644 --- a/README.md +++ b/README.md @@ -8,31 +8,35 @@ Testing ====== Download instructions. -cp ~shervin/public/setup-newMaster.sh . -./setup.sh CMSSW_5_3_7_patch6 -cd CMSSW_5_3_7_patch6/src/ -cmsenv +`cp ~shervin/public/setup-devel-42X_44X_53X.sh .` + +`./setup.sh CMSSW_5_3_7_patch6` + +`cd CMSSW_5_3_7_patch6/src/` + +`cmsenv` NB: I'm not able to say to scram not to compile a particular directory, then the Calibration/ZFitter directory is not skipped by scram and the compilation fails. you should compile by hand all the packages except Calibration/ZFitter In order to compile Calibration/ZFitter do -cd Calibration/ZFitter -make +`cd Calibration/ZFitter` + +`make` ====== Instructions for developments: fork the repository in GIT to your own area -git@github.com:ECALELFS/ECALELF.git +`git@github.com:ECALELFS/ECALELF.git` Add your git repository to the list of remotes to be used like: -git remote add -f myfork git@github.com:hengne/ECALELF.git -git checkout newMaster +`git remote add -f myfork git@github.com:hengne/ECALELF.git` +`git checkout devel-42X_44X_53X` Create a new branch for your development (use a meaningful name) -git branch myNewBranch +`git branch myNewBranch` Push it to your git repository -git branch push myNewBranch myfork +`git branch push myNewBranch myfork` Then start to develop, remember to do commits as much as possible @@ -41,7 +45,7 @@ Then start to develop, remember to do commits as much as possible Code documentation: Once downloaded the code, in Calibration/ you can run the command -doxygen fulldoc +`doxygen fulldoc` to have the code documentation produced by doxygen opening the doc/doxygen/fulldoc/html/index.html with your browser From 301191a4ce25696acd15a87545c00c5d5913bc11 Mon Sep 17 00:00:00 2001 From: shervin86 Date: Fri, 6 Dec 2013 17:33:44 +0100 Subject: [PATCH 198/475] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d6d2c8a710..977944232ab 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Download instructions. `cp ~shervin/public/setup-devel-42X_44X_53X.sh .` -`./setup.sh CMSSW_5_3_7_patch6` +`chmod +x setup-devel-42X_44X_53X.sh` + +`./setup-devel-42X_44X_53X.sh CMSSW_5_3_7_patch6` `cd CMSSW_5_3_7_patch6/src/` From 7fb059f905eafa694f1a81ccbd41c1a9995cb239 Mon Sep 17 00:00:00 2001 From: shervin86 Date: Fri, 6 Dec 2013 17:48:42 +0100 Subject: [PATCH 199/475] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 977944232ab..50042328dab 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Add your git repository to the list of remotes to be used like: Create a new branch for your development (use a meaningful name) `git branch myNewBranch` Push it to your git repository -`git branch push myNewBranch myfork` +`git push myNewBranch myfork` Then start to develop, remember to do commits as much as possible From d57a2cca843e0acac24fd9da8d66e3b44944e33a Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Dec 2013 18:27:34 +0100 Subject: [PATCH 200/475] missing file --- ZFitter/macro/addChainWithFriends.C | 110 ++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 ZFitter/macro/addChainWithFriends.C diff --git a/ZFitter/macro/addChainWithFriends.C b/ZFitter/macro/addChainWithFriends.C new file mode 100644 index 00000000000..245487674f4 --- /dev/null +++ b/ZFitter/macro/addChainWithFriends.C @@ -0,0 +1,110 @@ +#include +#include +#include +#include +//#include + + +#include + +#define DEBUG + +void ReassociateFriends(TFile *f, TChain *chain){ + f->cd(); + chain->GetEntries(); + chain->LoadTree(0); + TList *friends = chain->GetListOfFriends(); + if(friends==NULL) return; + TIter newfriend_itr(friends); + std::vector newFriendVec; + for(TFriendElement *friendElement = (TFriendElement*) newfriend_itr.Next(); + friendElement != NULL; friendElement = (TFriendElement*) newfriend_itr.Next()){ + TString treeName=friendElement->GetTreeName(); + TTree *tree=friendElement->GetTree(); + std::cout << "[STATUS] Removing old friend " << treeName << std::endl; + chain->RemoveFriend(tree); + TChain *friendChain = (TChain *) f->Get(treeName); + if(friendChain==NULL) continue; + newFriendVec.push_back(friendChain); + } + + for(std::vector::const_iterator chain_itr = newFriendVec.begin(); + chain_itr!=newFriendVec.end(); + chain_itr++){ + TChain *friendChain=*chain_itr; + chain->AddFriend(friendChain); + } + + //TFriendElement *element = (TFriendElement*) friends->First(); + //element->GetTree()->Print(); + return; +} + +TChain *GenChain(int index=1){ + TChain *c = NULL; + if(index==1){ + c = new TChain("selected","1"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root"); + TChain *p = new TChain("pileup",""); + p->Add("tmp/mcPUtrees1.root"); + c->AddFriend(p); + } else{ + c = new TChain("selected","1"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root"); + TChain *p = new TChain("pileup",""); + p->Add("tmp/mcPUtrees2.root"); + c->AddFriend(p); + + } + return c; +} + + +TChain * addChainAndFriends(std::vector chain_vec){ + TChain *sumChain = new TChain((*chain_vec.begin())->GetName(),""); + + std::map friends_map; + for(std::vector::const_iterator chain_itr = chain_vec.begin(); + chain_itr!=chain_vec.end(); + chain_itr++){ + + TList *friendList= (*chain_itr)->GetListOfFriends(); + TIter newfriend_itr(friendList); + + for(TFriendElement *friendElement = (TFriendElement*) newfriend_itr.Next(); + friendElement != NULL; friendElement = (TFriendElement*) newfriend_itr.Next()){ + TString treeName=friendElement->GetTreeName(); + std::cout << "[STATUS] Adding new friend " << treeName << std::endl; + std::map::iterator map_itr = friends_map.find(treeName); + if(map_itr==friends_map.end()){ + friends_map[treeName] = new TChain(treeName,""); + } + friends_map[treeName]->Add((TChain *)friendElement->GetTree()); + } + } + + for(std::vector::const_iterator chain_itr = chain_vec.begin(); + chain_itr!=chain_vec.end(); + chain_itr++){ + sumChain->Add(*chain_itr); + } + + for(std::map::const_iterator map_itr = friends_map.begin(); + map_itr != friends_map.end(); + map_itr++){ + sumChain->AddFriend(map_itr->second); + } + sumChain->GetListOfFriends()->Print(); + return sumChain; +} + +TChain * addChainAndFriends(TChain *c1, TChain *c2){ + std::vector chain_vec; + chain_vec.push_back(c1); + chain_vec.push_back(c2); + return addChainAndFriends(chain_vec); +} From 189a1a6d43f6c3f4a834ba8f43c7796d058c6595 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 8 Dec 2013 19:42:26 +0100 Subject: [PATCH 201/475] updated classes, fixes for Et smearings and energy scale Et dependent corrections --- ZFitter/bin/ZFitter.cpp | 44 +- .../validation/22Jan2012-runDepMCAll_v2.dat | 4 + .../interface/EnergyScaleCorrection_class.h | 5 +- ZFitter/script/GenRootChain.sh | 8 +- ZFitter/script/energyScale.sh | 490 +++++++++++------- ZFitter/script/functions.sh | 4 +- ZFitter/src/ElectronCategory_class.cc | 14 +- ZFitter/src/EnergyScaleCorrection_class.cc | 50 +- ZFitter/src/SmearingImporter.cc | 11 +- ZFitter/src/ZFit_class.cc | 32 +- ZFitter/src/addBranch_class.cc | 24 +- 11 files changed, 451 insertions(+), 235 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index d23c42a4727..dfd53925600 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -105,12 +105,20 @@ void UpdateFriends(tag_chain_map_t& tagChainMap, TString regionsFileNameTag){ chain->AddFriend(chain_itr->second); } // already added } - chain_itr->second->GetEntries(); + + if(chain->GetEntries()!= chain_itr->second->GetEntries()){ + std::cerr << "[ERROR] Not the same number of events: " << chain->GetEntries() << "\t" << chain_itr->second->GetEntries() << std::endl; + exit(1); + } } } return; } +void Dump(tag_chain_map_t& tagChainMap, TString tag="s", Long64_t firstentry=0){ + (tagChainMap[tag])["selected"]->Scan("etaEle:R9Ele:energySCEle_regrCorrSemiParV5_pho/cosh(etaSCEle):smearerCat:catName","","col=5:4:5:3:50",5,firstentry); +}; + void MergeSamples(tag_chain_map_t& tagChainMap, TString regionsFileNameTag, TString tag="s"){ std::pair pair_tmp_tag(tag,chain_map_t()); // make_pair not work with scram b @@ -133,6 +141,8 @@ void MergeSamples(tag_chain_map_t& tagChainMap, TString regionsFileNameTag, TStr (tagChainMap[tag])[chainName]->SetTitle(tag); } (tagChainMap[tag])[chainName]->Add(chain_itr->second); + std::cout << tag << "\t" << tag_chain_itr->first << "\t" << chainName << "\t" << chain_itr->second << "\t" << chain_itr->second->GetTitle() << std::endl; + } } UpdateFriends(tagChainMap, regionsFileNameTag); @@ -496,10 +506,10 @@ int main(int argc, char **argv) { std::cout <<"Adding file: " << tag << "\t" << chainName << "\t" << fileName<< std::endl; if((tagChainMap[tag])[chainName]->Add(fileName,-1)==0) exit(1); #ifdef DEBUG - std::cout << "[DEBUG] " << tag << "\t" << chainName << "\t" << fileName << std::endl; + std::cout << "[DEBUG] " << tag << "\t" << chainName << "\t" << fileName << "\t" << (tagChainMap[tag])[chainName]->GetEntries() << std::endl; #endif - } + } //init chains for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); @@ -511,9 +521,9 @@ int main(int argc, char **argv) { for(chain_map_t::const_iterator chain_itr=tag_chain_itr->second.begin(); chain_itr!=tag_chain_itr->second.end(); chain_itr++){ -#ifdef DEBUG - std::cout << " - " << chain_itr->first << "\t" << chain_itr->second->GetName() << "\t" << chain_itr->second->GetTitle() << std::endl; -#endif + //#ifdef DEBUG + std::cout << " - " << chain_itr->first << "\t" << chain_itr->second->GetName() << "\t" << chain_itr->second->GetTitle() << "\t" << chain_itr->second->GetEntries() << std::endl; + //#endif chain_itr->second->GetEntries(); } } @@ -669,7 +679,7 @@ int main(int argc, char **argv) { } //read corrections directly from file - if (vm.count("corrEleType")){ + if (vm.count("corrEleType") && corrEleFile!=""){ std::cout << "------------------------------------------------------------" << std::endl; std::cout << "[STATUS] Getting energy scale corrections from file: " << corrEleFile << std::endl; TString treeName="scaleEle_"+corrEleType; @@ -789,22 +799,22 @@ int main(int argc, char **argv) { std::cout <<"[STATUS] Adding branch " << branchName << " to " << tag_chain_itr->first <first+"-"+chainFileListTag+".root"; - TFile f(filename,"recreate"); - if (!f.IsOpen()){ - std::cerr << "[ERROR] File for branch " << branchName << " not created" << std::endl; - return 1; - } TTree *newTree = newBrancher.AddBranch(ch,treeName, branchName,true,tag_chain_itr->first.Contains("s")); if(newTree==NULL){ std::cerr << "[ERROR] New tree for branch " << treeName << " is NULL" << std::endl; return 1; } + TFile f(filename,"recreate"); + if (!f.IsOpen()){ + std::cerr << "[ERROR] File for branch " << branchName << " not created" << std::endl; + return 1; + } f.cd(); newTree->SetTitle(tag_chain_itr->first); newTree->Write(); delete newTree; - f.Write(); + //f.Write(); f.Close(); std::pair pair_tmp(treeName, new TChain(treeName)); chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; @@ -825,7 +835,10 @@ int main(int argc, char **argv) { MergeSamples(tagChainMap, regionsFileNameTag, "d"); } - +// Dump(tagChainMap, "s",0); +// Dump(tagChainMap, "s",(tagChainMap["s1"])["selected"]->GetEntries()); +// Dump(tagChainMap, "s",(tagChainMap["s2"])["selected"]->GetEntries()); +// exit(0); if(vm.count("saveRootMacro")){ for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); @@ -942,8 +955,11 @@ int main(int argc, char **argv) { smearer.SetSmearingEt(vm.count("smearingEt")); smearer.SetR9Weight(vm.count("useR9weight")); if(nSmearToy>0) smearer._nSmearToy = nSmearToy; + + //------------------------------ Take the list of branches needed for the defined categories ElectronCategory_class cutter; + cutter.energyBranchName=energyBranchName; std::set activeBranchList; for(std::vector::const_iterator region_itr = categories.begin(); region_itr != categories.end(); diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat index 39662a58155..ac742bed564 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat @@ -58,6 +58,10 @@ s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMCAll_v2.root s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMCAll_v2.root s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll_v2.root +# +s1 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s1-22Jan2012-runDepMCAll_v2.root +s2 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s2-22Jan2012-runDepMCAll_v2.root +s3 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s3-22Jan2012-runDepMCAll_v2.root ##### s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v2.root s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll_v2.root diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index aa5f13200c6..8445791c7dd 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -113,14 +113,15 @@ class EnergyScaleCorrection_class{ void AddSmearing(TString category_, int runMin_, int runMax_, //double smearing_, double err_smearing_); double constTerm, double err_constTerm, double alpha, double err_alpha); - float getSmearing(float energy, bool isEBEle, float R9Ele, float etaSCEle); + float getSmearing(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); public: - float getSmearingSigma(float energy, bool isEBEle, float R9Ele, float etaSCEle); + float getSmearingSigma(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); void ReadSmearingFromFile(TString filename); TTree *GetSmearTree(TChain *tree, bool fastLoop, TString energyEleBranchName, + TString runNumberBranchName="runNumber", TString R9EleBranchName="R9Ele", TString etaEleBranchName="etaEle", TString etaSCEleBranchName="etaSCEle" diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index 2d417f3ea47..6d37544e151 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -2,11 +2,11 @@ #tag_name="" -commonCut=Et_25 -selection=WP80_PU +commonCut=Et_25-trigger-noPF +selection=loose invMass_var=invMass_SC_regrCorr_ele configFile=data/validation/monitoring_2012_53X.dat -regionsFile=data/regions/scaleStep4smearing_2.dat +regionsFile=data/regions/scaleStep2smearing_9.dat runRangesFile=data/runRanges/monitoring.dat baseDir=test @@ -139,7 +139,7 @@ fi # saving the root files with the chains rm tmp/*_chain.root ./bin/ZFitter.exe --saveRootMacro -f ${configFile} --regionsFile=${regionsFile} ${noPU} ${addBranchList} ${corrEleFile} ${corrEleType} ${fitterOptions} || exit 1 - +exit 0 # adding all the chains in one file for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root tmp/s_selected_chain.root do diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 7101e877b7e..00bc9f3dc2c 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -28,6 +28,7 @@ regionFileStep5EE=data/regions/scaleStep2smearing_10.dat outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat outFileStep2=step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat outFileStep7=step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat +outFileStep8=step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat ############################################################# usage(){ echo "`basename $0` [options]" @@ -229,6 +230,43 @@ if [ -n "${STEP1}" ];then fi +if [ -n "${STEP1Stability}" ];then +################################################## + regionFile=data/regions/stability.dat + #runRangesFile=data/runRanges/monitoring.dat + + if [ ! -e "${outDirData}/step1/fitres" ];then mkdir ${outDirData}/step1/fitres -p; fi + if [ ! -e "${outDirData}/step1/img" ];then mkdir ${outDirData}/step1/img -p; fi + + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step1/fitres \ + --corrEleType HggRunEta \ + --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step1/img #> ${outDirData}/log/step1-stability.log || exit 1 + + ./script/makeTable.sh --regionsFile ${regionFile} --runRangesFile ${runRangesFile} --commonCut=${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step1/fitres \ + > ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex || exit 1 + + +###################### Make stability plots +### TODO: make a stability plot with old stabilities and new stabilities superimposed + + xVar=runNumber + if [ ! -d ${outDirData}/step1/img/stability/$xVar ];then + mkdir -p ${outDirData}/step1/img/stability/$xVar + fi + + ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ + --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y peak || exit 1 + ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ + --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y scaledWidth || exit 1 + ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ + --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y peak --allRegions || exit 1 + + +fi if [ -n "${STEP2FIT}" ];then @@ -286,10 +324,14 @@ if [ -n "${STEP2}" ];then #exit 1 fi + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEB mkSmearerCatSignal $regionFileEE - mkSmearerCatData $regionFileEB ${outDirData}/step2 - mkSmearerCatData $regionFileEE ${outDirData}/step2 + mkSmearerCatData $regionFileEB ${outDirData}/step2 $outDirData/step2${extension}/`basename $configFile` --corrEleType=HggRunEta + mkSmearerCatData $regionFileEE ${outDirData}/step2 $outDirData/step2${extension}/`basename $configFile` --corrEleType=HggRunEta if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then newSelection=${extension} @@ -313,12 +355,6 @@ if [ -n "${STEP2}" ];then # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2/`basename $configFile` - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEB}\t${outDirData}/step2/smearerCat_${basenameEB}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step2/`basename $configFile` - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEE}\t${outDirData}/step2/smearerCat_${basenameEE}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step2/`basename $configFile` for index in `seq 1 50` @@ -326,36 +362,26 @@ if [ -n "${STEP2}" ];then mkdir ${outDirData}/step2/${index}/fitres/ -p mkdir ${outDirData}/step2/${index}/img -p done -# bsub -q 2nd \ -# -oo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stdout.log \ -# -eo ${outDirData}/step2/${index}/fitres/`basename ${outFile} .dat`-stderr.log \ -# -J "${basenameEB} step2" \ -# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -# ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/${index}/img/ --outDirFitResData=${outDirData}/step2/${index}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/${index}/${basenameEB}-done" -# done - - # for index in `seq 1 50` - # do -bsub -q 2nd \ - -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ - -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ - -J "${basenameEB} step2[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEB}-done" - -bsub -q 2nd \ - -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ - -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ - -J "${basenameEE} step2[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEE}-done" - - -while [ "`bjobs -J \"${basenameEB} step2\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 1m; done -while [ "`bjobs -J \"${basenameEE} step2\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 1m; done - + bsub -q 2nd \ + -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step2[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEB}-done" + + bsub -q 2nd \ + -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEE} step2[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEE}-done" + + + while [ "`bjobs -J \"${basenameEB} step2\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 1m; done + while [ "`bjobs -J \"${basenameEE} step2\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 1m; done + ./script/haddTGraph.sh -o ${outDirData}/step2/fitres/outProfile-scaleStep2smearing_1-${commonCut}.root ${outDirData}/step2/*/fitres/outProfile-scaleStep2smearing_1-${commonCut}.root ./script/haddTGraph.sh -o ${outDirData}/step2/fitres/outProfile-scaleStep2smearing_2-${commonCut}.root ${outDirData}/step2/*/fitres/outProfile-scaleStep2smearing_2-${commonCut}.root - - + + ######################################################33 echo "{" > tmp/fitProfiles.C echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C @@ -365,9 +391,9 @@ while [ "`bjobs -J \"${basenameEE} step2\" | grep -v JOBID | grep -v found | wc echo "FitProfile2(\"${outDirData}/step2/fitres/outProfile-scaleStep2smearing_2-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C - + fi - + sed -i 's|^EB-||;s|^EE-||' ${outFileStep1} grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' > tmp/res_corr.dat grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1| sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' >> tmp/res_corr.dat @@ -407,7 +433,7 @@ if [ -n "${STEP3}" ];then if [ ! -e "${outDirData}/step3/img" ];then mkdir ${outDirData}/step3/img -p; fi cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step3/`basename $configFile` + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step3/`basename $configFile` ./bin/ZFitter.exe -f $outDirData/step3/`basename $configFile` --regionsFile ${regionFile} \ $isOdd --invMass_var ${invMass_var} --commonCut ${commonCut} \ @@ -446,10 +472,16 @@ if [ -n "${STEP4}" ];then initFile="" fi + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step4${extension}/`basename $configFile` + mkSmearerCatSignal $regionFileEB mkSmearerCatSignal $regionFileEE - mkSmearerCatData $regionFileEB ${outDirData}/step4 - mkSmearerCatData $regionFileEE ${outDirData}/step4 + mkSmearerCatSignal $regionFileStep4EBEE + mkSmearerCatData $regionFileEB ${outDirData}/step4 $outDirData/step4${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 + mkSmearerCatData $regionFileEE ${outDirData}/step4 $outDirData/step4${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 + mkSmearerCatData $regionFileStep4EBEE ${outDirData}/step4 $outDirData/step4${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 + if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi @@ -464,13 +496,8 @@ if [ -n "${STEP4}" ];then # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step4${extension}/`basename $configFile` - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEB}\t${outDirData}/step4/smearerCat_${basenameEB}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step4${extension}/`basename $configFile` - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_${basenameEE}\t${outDirData}/step4/smearerCat_${basenameEE}_\1-`basename $configFile .dat`.root|}" | sort | uniq |grep smearerCat | grep '^d' >> $outDirData/step4${extension}/`basename $configFile` - + + for index in `seq 1 50` do mkdir ${outDirData}/step4${extension}/${index}/fitres/ -p @@ -517,10 +544,10 @@ if [ -n "${STEP4}" ];then fi - ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 +# ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 - ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 +# ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile $regionFileStep4EBEE $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 @@ -817,6 +844,7 @@ if [ -n "${STEP7}" ];then mkSmearerCatData $regionFileEB ${outDirData}/step7 $outDirData/step7${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 #mkSmearerCatData $regionFileEE ${outDirData}/step7 $outDirData/step7${extension}/`basename $configFile` --corrEleType=HggRunEtaR9OA + if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi @@ -877,13 +905,19 @@ if [ -n "${STEP7}" ];then touch ${outFile} fi fi - - - ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 - exit 0 - -# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 - + cat ${outDirData}/step7${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | grep scale > ${outFile} + cat >> ${outFile} < tmp/res_corr_step7.dat #| awk '{print $1, ($2-1)*100,$3*100}' awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step7.dat ${outDirTable}/${outFileStep2} > ${outDirTable}/${outFileStep7} @@ -908,7 +942,199 @@ fi +if [ -n "${STEP9}" ];then + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/outFile-step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + + if [ ! -e "${outDirTable}/${outFileStep8}" ];then + echo "[ERROR] Impossible to run step9 without step8" >> /dev/stderr + exit 1 + fi + + if [ -e "${outDirTable}/params-step9-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt" + else + echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step8" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step8" >> /dev/stdout + + exit 1 + fi + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step8/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEB + #mkSmearerCatSignal $regionFileEE + mkSmearerCatSignal ${regionFileStep4EB} + mkSmearerCatSignal ${regionFileStep4EE} + mkSmearerCatSignal $regionFileStep4EBEE + mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et +# mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step8${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + mkSmearerCatData $regionFileStep4EBEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + mkSmearerCatData $regionFileStep4EB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + mkSmearerCatData $regionFileStep4EE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + for index in `seq 1 50` + do + mkdir ${outDirData}/step9${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${index}/img -p + done + + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ + -J "`basename $regionFileStep4EB .dat` step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EB .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ + -J "`basename $regionFileStep4EE .dat` step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EE .dat`-done" + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ + -J "`basename $regionFileStep4EBEE .dat` step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EBEE .dat`-done" + + while [ "`bjobs -J \"${basenameEB} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EB .dat` step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EE .dat` step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EBEE .dat` step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + +# cat ${outDirData}/step9${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step9${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} +if [ ! -e "${outFile}" ];then + cat "`echo $initFile | sed 's|.*=||'`" > ${outFile} +fi + fi + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ + -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ + -J "`basename $regionFileStep4EE .dat` step9${extension}" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ + -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ + -J "`basename $regionFileStep4EBEE .dat` step9${extension}" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileEB .dat`-stdout.log \ + -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileEB .dat`-stderr.log \ + -J "`basename $regionFileEB .dat` step9${extension}" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ + -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ + -J "`basename $regionFileStep4EB .dat` step9${extension}" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + + + exit 0 + ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +exit 0 +# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + +# grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2 \1 |' > tmp/res_corr_step7.dat #| awk '{print $1, ($2-1)*100,$3*100}' +# awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step7.dat ${outDirTable}/${outFileStep2} > ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat + +# #save root files with step1 corrections +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# --saveCorrEleTree --corrEleType HggRunEtaR9Et \ +# --corrEleFile ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat || exit 1 + +# mv tmp/scaleEle_HggRunEtaR9Et_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step7/ + + +# grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +# +# sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +# ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat |grep -v '#' #> ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + +fi + + if [ -n "${STEP8}" ];then + # Apply Et dependent corrections and derive the residuals due to the categorization + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then newSelection=${extension} else @@ -920,7 +1146,7 @@ if [ -n "${STEP8}" ];then regionFileEE=${regionFileStep5EE} basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` - outFile=${outDirTable}/step8${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + outFile=${outDirTable}/outFile-step8${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9Et.dat if [ ! -e "${outDirTable}/${outFileStep7}" ];then echo "[ERROR] Impossible to run step8 without step7" >> /dev/stderr @@ -928,8 +1154,8 @@ if [ -n "${STEP8}" ];then fi if [ -e "${outDirTable}/params-step8-${commonCut}.txt" ];then - #initFile="--initFile=${outDirTable}/params-step8-${commonCut}.txt"; - initFile="--initFile=${outFile}" + initFile="--initFile=${outDirTable}/params-step8-${commonCut}.txt"; + #initFile="--initFile=${outFile}" else echo "[WARNING] init file ${outDirTable}/params-step8-${commonCut}.txt not found" >> /dev/stderr echo " creating file from results of step7" >> /dev/stderr @@ -946,7 +1172,16 @@ if [ -n "${STEP8}" ];then exit 0 fi - if [ ! -e "${outFile}" -o "1" == "0" ];then + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step7/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step8${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEB + #mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEB ${outDirData}/step8 $outDirData/step8${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et +# mkSmearerCatData $regionFileEE ${outDirData}/step8 $outDirData/step8${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + + if [ ! -e "${outFile}" -a "1" == "0" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi if [ ! -e "${outDirData}/step8${extension}/fitres" ];then mkdir ${outDirData}/step8${extension}/fitres -p; fi @@ -956,30 +1191,9 @@ if [ -n "${STEP8}" ];then if [ "${extension}" == "weight" ];then updateOnly="$updateOnly --useR9weight" fi - tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` - for tag in $tags - do - if [ "`grep -v '#' $configFile | grep \"^$tag\" | cut -f 2 | grep -c smearerCat`" == "0" ];then - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEB} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionFileEB .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEB .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile - - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ - --saveRootMacro \ - --addBranch=smearerCat --smearerFit - mv tmp/smearerCat_${tag}-`basename $configFile .dat`.root data/smearerCat/data/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root || exit 1 - echo -e "$tag\tsmearerCat_`basename $regionFileEE .dat`\tdata/smearerCat/smearerCat_`basename $regionFileEE .dat`_${tag}-`basename $configFile .dat`.root" >> $configFile - - fi - done # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step7/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step8${extension}/`basename $configFile` - for index in `seq 1 50` do mkdir ${outDirData}/step8${extension}/${index}/fitres/ -p @@ -992,41 +1206,13 @@ if [ -n "${STEP8}" ];then -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ -J "${basenameEB} step8${extension}[1-50]" \ "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" - - bsub -q 2nd \ - -oo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ - -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ - -J "`basename $regionFileStep4EB .dat` step8${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EB .dat`-done" +./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" - bsub -q 2nd \ - -oo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ - -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ - -J "`basename $regionFileStep4EE .dat` step8${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EE .dat`-done" - bsub -q 2nd \ - -oo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ - -eo ${outDirData}/step8${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ - -J "`basename $regionFileStep4EBEE .dat` step8${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step8${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step8${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EBEE .dat`-done" - fi + while [ "`bjobs -J \"${basenameEB} step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done -# while [ "`bjobs -J \"${basenameEB} step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root -# while [ "`bjobs -J \"`basename $regionFileStep4EB .dat` step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root - -# while [ "`bjobs -J \"`basename $regionFileStep4EE .dat` step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root - -# while [ "`bjobs -J \"`basename $regionFileStep4EBEE .dat` step8${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ${outDirData}/step8${extension}/*/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ######################################################33 echo "{" > tmp/fitProfiles.C @@ -1034,42 +1220,31 @@ if [ -n "${STEP8}" ];then echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step8${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C -# cat ${outDirData}/step8${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} + cat ${outDirData}/step8${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} # grep -v absEta_0_1 ${outDirData}/step8${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} -# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} -if [ ! -e "${outFile}" ];then - cat "`echo $initFile | sed 's|.*=||'`" > ${outFile} -fi -# fi + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + fi + cat ${outDirData}/step8${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step8${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} -# ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 - - ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly --profileOnly || exit 1 - - ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly --profileOnly || exit 1 + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} - ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly --profileOnly || exit 1 +# ./bin/ZFitter.exe -f $outDirData/step8${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step8${extension}/img/ --outDirFitResData=${outDirData}/step8${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 -# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 - + grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2-\1 |' > tmp/res_corr_step8.dat + awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step8.dat ${outDirTable}/${outFileStep7} > ${outDirTable}/${outFileStep8} -# grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2 \1 |' > tmp/res_corr_step7.dat #| awk '{print $1, ($2-1)*100,$3*100}' -# awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step7.dat ${outDirTable}/${outFileStep2} > ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat - -# #save root files with step1 corrections -# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ -# --saveCorrEleTree --corrEleType HggRunEtaR9Et \ -# --corrEleFile ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat || exit 1 + #save root files with step1 corrections + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro --corrEleType HggRunEtaR9Et \ + --corrEleFile ${outDirTable}/${outFileStep8} || exit 1 -# mv tmp/scaleEle_HggRunEtaR9Et_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step7/ + mv tmp/scaleEle_HggRunEtaR9Et_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step8/ # grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat @@ -1091,7 +1266,7 @@ fi -if [ -n "${STEP9}" ];then +if [ -n "${STEP11}" ];then #stochastic smearing but with non Et dependent scale corrections if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then newSelection=${extension} @@ -1438,7 +1613,7 @@ if [ -n "${STEP7}" ];then fi -if [ -n "${STEP9}" ];then +if [ -n "${STEP11}" ];then # stochastic term resolution categories, scales in Et bins if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi @@ -1669,43 +1844,6 @@ if [ -n "${SYSTEMATICS}" ];then fi -if [ -n "${STEP1Stability}" ];then -################################################## - regionFile=data/regions/stability.dat - #runRangesFile=data/runRanges/monitoring.dat - - if [ ! -e "${outDirData}/step1/fitres" ];then mkdir ${outDirData}/step1/fitres -p; fi - if [ ! -e "${outDirData}/step1/img" ];then mkdir ${outDirData}/step1/img -p; fi - - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ - $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step1/fitres \ - --corrEleType HggRunEta \ - --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step1/img > ${outDirData}/log/step1-stability.log || exit 1 - - ./script/makeTable.sh --regionsFile ${regionFile} --runRangesFile ${runRangesFile} --commonCut=${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step1/fitres \ - > ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex || exit 1 - - -###################### Make stability plots -### TODO: make a stability plot with old stabilities and new stabilities superimposed - - xVar=runNumber - if [ ! -d ${outDirData}/step1/img/stability/$xVar ];then - mkdir -p ${outDirData}/step1/img/stability/$xVar - fi - - ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ - --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y peak || exit 1 - ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ - --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y scaledWidth || exit 1 - ./script/stability.sh -t ${outDirTable}/step1_stability-${invMass_var}-${selection}.tex \ - --outDirImgData ${outDirData}/step1/img/stability/$xVar/ -x $xVar -y peak --allRegions || exit 1 - - -fi if [ -n "${STEP3Stability}" ];then ################################################## diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh index a6ffa30f92a..1fc0293e9b7 100644 --- a/ZFitter/script/functions.sh +++ b/ZFitter/script/functions.sh @@ -53,7 +53,7 @@ mcName(){ mkSmearerCatSignal(){ - if [ ! -e "data/smearerCat/smearerCat_`basename $1 .dat`_s1-`basename $configFile .dat`.root" -o ! -e "data/smearerCat/smearerCat_`basename $1 .dat`_s2-`basename $configFile .dat`.root" ];then + if [ ! -e "data/smearerCat/smearerCat_`basename $1 .dat`_s1-`basename $configFile .dat`.root" -o ! -e "data/smearerCat/smearerCat_`basename $1 .dat`_s2-`basename $configFile .dat`.root" -o ! -e "data/smearerCat/smearerCat_`basename $1 .dat`_s3-`basename $configFile .dat`.root" ];then echo "[STATUS] Creating smearerCat for signal: `basename $configFile .dat` `basename $1 .dat`" ./bin/ZFitter.exe -f ${configFile} --regionsFile=$1 \ --saveRootMacro --addBranch=smearerCat_s || exit 1 @@ -101,7 +101,7 @@ mkSmearerCatData(){ mv tmp/smearerCat_`basename $1 .dat`_d*-`basename $configFile .dat`.root $2/ || exit 1 fi cat $3 \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $1 .dat`\t$2/smearerCat_`basename $1 .dat`_\1-`basename $3 .dat`.root|}" | sort | uniq |grep smearerCat >> $2/`basename $configFile` + | sed "/selected/ ! d; /selected/{ s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $1 .dat`\t$2/smearerCat_`basename $1 .dat`_\1-`basename $3 .dat`.root|}" | sort | uniq |grep smearerCat |grep '^d' >> $2/`basename $configFile` } diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 006cbe1435f..5026d9e8562 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -37,7 +37,9 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co itr != cutSet.end(); itr++){ TString cut_string = *itr; - +#ifdef DEBUG + std::cout << cut_string << std::endl; +#endif if(isMC && cut_string.Contains("runNumber")){ cut_string.Insert(0,"("); cut_string+="|| runNumber==1)"; @@ -49,6 +51,8 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co //std::cerr << "[INFO] scaleEle for GetCut" << std::endl; cut_string.ReplaceAll(energyBranchName+"_ele1",energyBranchName+"_ele1 * scaleEle_ele1"); cut_string.ReplaceAll(energyBranchName+"_ele2",energyBranchName+"_ele2 * scaleEle_ele2"); + TString invMassName=energyBranchName; invMassName.ReplaceAll("energySCEle","invMass_SC"); + cut_string.ReplaceAll(invMassName,invMassName+"*sqrt(scaleEle_ele1 * scaleEle_ele2)"); } // se contiene solo ele2 rimuovi, altrimenti sostituisci if(nEle!=0){ @@ -74,7 +78,9 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co cut+=cut_string; } - +#ifdef DEBUG + std::cout << cut << std::endl; +#endif return cut; //full AND of cuts } @@ -601,8 +607,8 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TString string1 = Objstring1->GetString(); - TCut cutEle1("("+energyBranchName+"_ele1/cosh(etaSCEle_ele1)) >= "+string1); - TCut cutEle2("("+energyBranchName+"_ele2/cosh(etaSCEle_ele2)) >= "+string1); + TCut cutEle1(""+energyBranchName+"_ele1/cosh(etaSCEle_ele1) >= "+string1); + TCut cutEle2(""+energyBranchName+"_ele2/cosh(etaSCEle_ele2) >= "+string1); cut_string+=cutEle1 && cutEle2; cutSet.insert(TString(cutEle1 && cutEle2)); diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 030a8e8f230..4c1535e412b 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -256,37 +256,50 @@ void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ -float EnergyScaleCorrection_class::getSmearingSigma(float energy, bool isEBEle, float R9Ele, float etaSCEle){ -#ifdef SHERVIN - //const correction_map_t *correction_map_p = &(runCorrection_itr->second.correction_map); - TString category=GetElectronCategory(isEBEle, R9Ele, etaSCEle); +float EnergyScaleCorrection_class::getSmearingSigma(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle){ - if(smearings.count(category)==0){ - std::cerr << "[ERROR] Electron category " << category << " not found!!!! Smearing not applied" << std::endl; - exit(1); + correctionCategory_class category(runNumber, etaSCEle, R9Ele, energy/cosh(etaSCEle)); + correction_map_t::const_iterator corr_itr = smearings.find(category); + if(corr_itr==smearings.end()){ // if not in the standard classes, add it in the list of not defined classes + if(smearings_not_defined.count(category)==0){ + correctionValue_class corr; + smearings_not_defined[category]=corr; + } + corr_itr = smearings_not_defined.find(category); + // std::cout << "[ERROR] Category not found: " << std::endl; + // std::cout << category << std::endl; + // exit(1); } - - double constTerm=smearings.find(category)->second.first; - double alpha=smearings.find(category)->second.second; - return sqrt(constTerm*constTerm + alpha*alpha/energy); + +#ifdef DEBUG + std::cout << "[DEBUG] Checking correction for category: " << category << std::endl; + std::cout << "[DEBUG] Correction is: " << corr_itr->second + << std::endl + << " given for category " << corr_itr->first; #endif - return 0; + + double constTerm=corr_itr->second.constTerm; + double alpha=corr_itr->second.alpha; + return sqrt(constTerm*constTerm + alpha*alpha/energy); + } -float EnergyScaleCorrection_class::getSmearing(float energy, bool isEBEle, float R9Ele, float etaSCEle){ +float EnergyScaleCorrection_class::getSmearing(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle){ if(noSmearings) return 1; - return rgen_->Gaus(1,getSmearingSigma(energy, isEBEle, R9Ele, etaSCEle)); + return rgen_->Gaus(1,getSmearingSigma(runNumber, energy, isEBEle, R9Ele, etaSCEle)); } TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, TString energyEleBranchName, + TString runNumberBranchName, TString R9EleBranchName, TString etaEleBranchName, TString etaSCEleBranchName - + ){ + Int_t runNumber_; Float_t energyEle_[2]; Float_t etaEle_[2]; Float_t etaSCEle_[2]; @@ -303,13 +316,14 @@ TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, } if(fastLoop){ tree->SetBranchStatus("*",0); + tree->SetBranchStatus(runNumberBranchName,1); tree->SetBranchStatus(energyEleBranchName,1); tree->SetBranchStatus(etaEleBranchName,1); tree->SetBranchStatus(etaSCEleBranchName,1); tree->SetBranchStatus(R9EleBranchName,1); } - + tree->SetBranchAddress(runNumberBranchName, &runNumber_); tree->SetBranchAddress(energyEleBranchName, energyEle_); tree->SetBranchAddress(etaEleBranchName,etaEle_); tree->SetBranchAddress(etaSCEleBranchName,etaSCEle_); @@ -322,9 +336,9 @@ TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, Long64_t nentries = tree->GetEntries(); for(Long64_t ientry = 0; ientryGetEntriesFast(); ientry++){ tree->GetEntry(ientry); - smearEle_[0] = getSmearing(energyEle_[0], fabs(etaSCEle_[0]) < 1.4442, + smearEle_[0] = getSmearing(runNumber_, energyEle_[0], fabs(etaSCEle_[0]) < 1.4442, R9Ele_[0],etaEle_[0]); - smearEle_[1] = getSmearing(energyEle_[1], fabs(etaSCEle_[1]) < 1.4442, + smearEle_[1] = getSmearing(runNumber_, energyEle_[1], fabs(etaSCEle_[1]) < 1.4442, R9Ele_[1],etaEle_[1]); newTree->Fill(); if(ientry%(nentries/100)==0) std::cerr << "\b\b\b\b" << std::setw(2) << ientry/(nentries/100) << "%]"; diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index da3520ae9bf..5484ae12132 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -25,7 +25,7 @@ SmearingImporter::SmearingImporter(std::vector regionList, TString ener _isSmearingEt(false), cutter(false) { - + cutter.energyBranchName=energyBranchName; } @@ -275,6 +275,15 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS event.invMass= sqrt(2 * event.energy_ele1 * event.energy_ele2 * (1-((1-t1q)*(1-t2q)+4*t1*t2*cos(phiEle[0]-phiEle[1]))/((1+t1q)*(1+t2q))) ); + if(_isSmearingEt){ + if(_swap){ + event.energy_ele2/=cosh(etaEle[0]); + event.energy_ele1/=cosh(etaEle[1]); + } else{ + event.energy_ele1/=cosh(etaEle[0]); + event.energy_ele2/=cosh(etaEle[1]); + } + } // to calculate the invMass: invMass = sqrt(2 * energy_ele1 * energy_ele2 * angle_eta_ele1_ele2) if(event.invMass < 70 || event.invMass > 110) continue; diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index 5b152e6476d..e24b2d8ae7f 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -1128,13 +1128,31 @@ float ZFit_class::GetRescaledWidthError(float width, float width_error, float pe //implement method for getting the corresponding energy name from invMass_name TString ZFit_class::GetEnergyVarName(TString invMass_name){ - - TString energyname="none"; - if (invMass_name.Contains("regrCorr_fra")) energyname = "energyEle_regrCorr_fra"; - else if (invMass_name.Contains("regrCorr_ele")) energyname = "energySCEle_regrCorr_ele"; - else if (invMass_name.Contains("regrCorr_pho")) energyname = "energySCEle_regrCorr_pho"; - else if(invMass_name.CompareTo("invMass_SC")==0) energyname = "energySCEle"; - return energyname; + TString energyBranchName=""; + TString invMass_var=invMass_name; + if(invMass_var=="invMass_SC_regrCorr_ele") energyBranchName = "energySCEle_regrCorr_ele"; + else if(invMass_var=="invMass_SC_regrCorr_pho") energyBranchName = "energySCEle_regrCorr_pho"; + else if(invMass_var=="invMass_regrCorr_fra") energyBranchName = "energyEle_regrCorr_fra"; + else if(invMass_var=="invMass_regrCorr_egamma") energyBranchName = "energyEle_regrCorr_egamma"; + else if(invMass_var=="invMass_SC") energyBranchName = "energySCEle"; + else if(invMass_var=="invMass_SC_corr") energyBranchName = "energySCEle_corr"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV4_ele") energyBranchName = "energySCEle_regrCorrSemiParV4_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV4_pho") energyBranchName = "energySCEle_regrCorrSemiParV4_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV5_ele") energyBranchName = "energySCEle_regrCorrSemiParV5_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV5_pho") energyBranchName = "energySCEle_regrCorrSemiParV5_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV6_ele") energyBranchName = "energySCEle_regrCorrSemiParV6_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV6_pho") energyBranchName = "energySCEle_regrCorrSemiParV6_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV7_ele") energyBranchName = "energySCEle_regrCorrSemiParV7_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV7_pho") energyBranchName = "energySCEle_regrCorrSemiParV7_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV8_ele") energyBranchName = "energySCEle_regrCorrSemiParV8_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV8_pho") energyBranchName = "energySCEle_regrCorrSemiParV8_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_pho"; + return energyBranchName; } diff --git a/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc index 5468c951e9a..2d647f37c83 100644 --- a/ZFitter/src/addBranch_class.cc +++ b/ZFitter/src/addBranch_class.cc @@ -100,6 +100,7 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr //TBranch *b = originalChain-> GetBranch("name of branch"); //originalChain->GetListOfBranches()->Remove(b); + Int_t runNumber; //add pt branches Float_t phiEle[2]; Float_t etaEle[2]; @@ -134,6 +135,7 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr if(fastLoop){ originalChain->SetBranchStatus("*",0); + originalChain->SetBranchStatus("runNumber",1); originalChain->SetBranchStatus(etaEleBranchName,1); originalChain->SetBranchStatus(etaSCEleBranchName,1); originalChain->SetBranchStatus(phiEleBranchName,1); @@ -146,7 +148,7 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr originalChain->SetBranchStatus(invMassBranchName,1); } - + originalChain->SetBranchAddress("runNumber", &runNumber); if(originalChain->SetBranchAddress(etaEleBranchName, etaEle) < 0){ std::cerr << "[ERROR] Branch etaEle not defined" << std::endl; exit(1); @@ -170,9 +172,9 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr originalChain->GetEntry(ientry); float smearEle_[2]; - smearEle_[0] = scaler->getSmearingSigma(energyEle[0], fabs(etaSCEle_[0]) < 1.4442, + smearEle_[0] = scaler->getSmearingSigma(runNumber,energyEle[0], fabs(etaSCEle_[0]) < 1.4442, R9Ele_[0],etaEle[0]); - smearEle_[1] = scaler->getSmearingSigma(energyEle[1], fabs(etaSCEle_[1]) < 1.4442, + smearEle_[1] = scaler->getSmearingSigma(runNumber,energyEle[1], fabs(etaSCEle_[1]) < 1.4442, R9Ele_[1],etaEle[1]); invMassSigma = 0.5 * invMass * sqrt( @@ -266,8 +268,8 @@ TTree* addBranch_class::AddBranch_smearerCat(TChain* originalChain, TString tree //setting the new tree TTree *newtree = new TTree(treename, treename); Int_t smearerCat[2]; - Char_t cat1[200], cat2[100]; - + Char_t cat1[10]; + sprintf(cat1,"XX"); newtree->Branch("smearerCat", smearerCat, "smearerCat[2]/I"); newtree->Branch("catName", cat1, "catName/C"); // newtree->Branch("catName2", cat2, "catName2/C"); @@ -328,6 +330,10 @@ TTree* addBranch_class::AddBranch_smearerCat(TChain* originalChain, TString tree originalChain->LoadTree(originalChain->GetEntryNumber(0)); Long64_t treenumber=-1; + std::cout << "[STATUS] Get smearerCat for tree: " << originalChain->GetTitle() + << "\t" << "with " << entries << " entries" << std::endl; + std::cerr << "[00%]"; + for(Long64_t jentry=0; jentry < entries; jentry++){ originalChain->GetEntry(jentry); if (originalChain->GetTreeNumber() != treenumber) { @@ -354,9 +360,9 @@ TTree* addBranch_class::AddBranch_smearerCat(TChain* originalChain, TString tree if(sel2==NULL || sel2->EvalInstance()==false) continue; else{ _swap=true; - sprintf(cat1,"%s", sel2->GetName()); + //sprintf(cat1,"%s", sel2->GetName()); } - } else sprintf(cat1,"%s", sel1->GetName()); + } //else sprintf(cat1,"%s", sel1->GetName()); evIndex=catSelector_itr-catSelectors.begin(); } @@ -364,8 +370,12 @@ TTree* addBranch_class::AddBranch_smearerCat(TChain* originalChain, TString tree smearerCat[0]=evIndex; smearerCat[1]=_swap ? 1 : 0; newtree->Fill(); + if(jentry%(entries/100)==0) std::cerr << "\b\b\b\b" << std::setw(2) << jentry/(entries/100) << "%]"; } + std::cout << std::endl; + //if(fastLoop) + originalChain->SetBranchStatus("*",1); originalChain->ResetBranchAddresses(); return newtree; } From b105c3a52135489cf30870e87ac4228ae17f5d9a Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 8 Dec 2013 19:44:11 +0100 Subject: [PATCH 202/475] missing file --- ZFitter/macro/addChainWithFriends.C | 110 ++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 ZFitter/macro/addChainWithFriends.C diff --git a/ZFitter/macro/addChainWithFriends.C b/ZFitter/macro/addChainWithFriends.C new file mode 100644 index 00000000000..245487674f4 --- /dev/null +++ b/ZFitter/macro/addChainWithFriends.C @@ -0,0 +1,110 @@ +#include +#include +#include +#include +//#include + + +#include + +#define DEBUG + +void ReassociateFriends(TFile *f, TChain *chain){ + f->cd(); + chain->GetEntries(); + chain->LoadTree(0); + TList *friends = chain->GetListOfFriends(); + if(friends==NULL) return; + TIter newfriend_itr(friends); + std::vector newFriendVec; + for(TFriendElement *friendElement = (TFriendElement*) newfriend_itr.Next(); + friendElement != NULL; friendElement = (TFriendElement*) newfriend_itr.Next()){ + TString treeName=friendElement->GetTreeName(); + TTree *tree=friendElement->GetTree(); + std::cout << "[STATUS] Removing old friend " << treeName << std::endl; + chain->RemoveFriend(tree); + TChain *friendChain = (TChain *) f->Get(treeName); + if(friendChain==NULL) continue; + newFriendVec.push_back(friendChain); + } + + for(std::vector::const_iterator chain_itr = newFriendVec.begin(); + chain_itr!=newFriendVec.end(); + chain_itr++){ + TChain *friendChain=*chain_itr; + chain->AddFriend(friendChain); + } + + //TFriendElement *element = (TFriendElement*) friends->First(); + //element->GetTree()->Print(); + return; +} + +TChain *GenChain(int index=1){ + TChain *c = NULL; + if(index==1){ + c = new TChain("selected","1"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root"); + TChain *p = new TChain("pileup",""); + p->Add("tmp/mcPUtrees1.root"); + c->AddFriend(p); + } else{ + c = new TChain("selected","1"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root"); + c->Add("root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/semiParamRegression/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root"); + TChain *p = new TChain("pileup",""); + p->Add("tmp/mcPUtrees2.root"); + c->AddFriend(p); + + } + return c; +} + + +TChain * addChainAndFriends(std::vector chain_vec){ + TChain *sumChain = new TChain((*chain_vec.begin())->GetName(),""); + + std::map friends_map; + for(std::vector::const_iterator chain_itr = chain_vec.begin(); + chain_itr!=chain_vec.end(); + chain_itr++){ + + TList *friendList= (*chain_itr)->GetListOfFriends(); + TIter newfriend_itr(friendList); + + for(TFriendElement *friendElement = (TFriendElement*) newfriend_itr.Next(); + friendElement != NULL; friendElement = (TFriendElement*) newfriend_itr.Next()){ + TString treeName=friendElement->GetTreeName(); + std::cout << "[STATUS] Adding new friend " << treeName << std::endl; + std::map::iterator map_itr = friends_map.find(treeName); + if(map_itr==friends_map.end()){ + friends_map[treeName] = new TChain(treeName,""); + } + friends_map[treeName]->Add((TChain *)friendElement->GetTree()); + } + } + + for(std::vector::const_iterator chain_itr = chain_vec.begin(); + chain_itr!=chain_vec.end(); + chain_itr++){ + sumChain->Add(*chain_itr); + } + + for(std::map::const_iterator map_itr = friends_map.begin(); + map_itr != friends_map.end(); + map_itr++){ + sumChain->AddFriend(map_itr->second); + } + sumChain->GetListOfFriends()->Print(); + return sumChain; +} + +TChain * addChainAndFriends(TChain *c1, TChain *c2){ + std::vector chain_vec; + chain_vec.push_back(c1); + chain_vec.push_back(c2); + return addChainAndFriends(chain_vec); +} From 4a5e02fbbf744ec06ec2892fc446084e3e46920b Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 10 Dec 2013 12:13:32 +0100 Subject: [PATCH 203/475] updated documentation for ntuples --- README | 3 +- ZFitter/doc/README | 208 ++++++++++++++++++++++++++++----------- ZNtupleDumper/doc/README | 6 +- 3 files changed, 157 insertions(+), 60 deletions(-) diff --git a/README b/README index 3aff2f0c16a..fd8e040e74a 100644 --- a/README +++ b/README @@ -1,7 +1,8 @@ /** * \mainpage * Introduction: \ref page1 -* +* +* Working with ntuples: \ref page4 */ /** * \page page1 Code instructions and explanations diff --git a/ZFitter/doc/README b/ZFitter/doc/README index f054a49948c..76651ba2f24 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -1,57 +1,9 @@ +/** +* \page page4 How to work with ECALELF ntuples +* \verbatim ############## Introduction to ECALELF Z Fitter # ECALELF Z Fitter is designed to be a flexible tool to fit the Z -# lineshape using the ECALELF ZNtuples, -# nontheless, the base ZFit_class provides general methods to fit also -# starting from different sources -# every other method to extract Z peak shift and Z width can be -# implemented in the same class, providing a still more powerfull tool -# (Fabrice fitter?) - -Package content: - - BW_CB_pdf_class - Class providing a RooPdf correspoding to the convolution of a - Breit-Wigner and Crystal Ball - - Cruijff_pdf_class - Class providing a RooPdf corresponding to a Cruijff function - (Gaussian with exponential tails) - - ElectronCategory_class - Parser class for electron categorization providing TCuts for - RooDataset - - ZFit_class - Class for fitting the Z lineshape from any RooAbsData - - ZFitter - General program for Z fit (monitoring, calibration validation) - -Input: -While the classes are almost generic and flexible, the ZFitter program -is thought to be used starting from ECALELF ntuples (ZNtuples). - - - data ntuples must contain: - - a tree "selected" - - mc ntuples must contain: - - a tree "selected" - - config file: see next section - - run range config file: - file containing a list of run ranges: every region will be - checked in every run range in this file - - category config file: - file containing a list of regions (categories) for electrons - it will be combined with the run range config file (if provided) - - option: - - global pt cut - - selection - - energy used for the invariant mass calculation (invMass_var) - - (not implemented) bin/unbin/mixed: performe binned/unbinned fit or a mix - version (unbinned for < mixedSwitchValue events, binned otherwise) - - (not implemented) mixed switch value: 200 by default - - - -If no external PU reweight is provided and no tree containing the PU -reweight for the MC, the program reads the files, add all the data PU -histograms, add all the MC PU histograms, calculates the PU -reweight, produce a tree with the per event weight for the MC. -Then add the tree with the PU weights to the MC chain as a friend -tree. +# lineshape using the ECALELF ZNtuples. There are three important directories where the proper .dat files should be put: @@ -65,22 +17,112 @@ There are three important directories where the proper .dat files should be put: This config file contains the list of files to run on, the files containing the PU histograms for the PU reweighting and all the other files needed. +The main idea in the ECALELF framework is to have a minimum set of variables in very small trees (the tree name is "selected"), while additional branches can be produced and added if needed as tree friends. The advantage is the possibility to produce ntuples for a larger set of studies with small specific trees for each of them. -The structure of the file is: + +The file is structured in 3 columns: tag, treeName and filePath as in the follows: # commented lines # tag treeName file -s selected root://eoscms//eos/..../file.root +s1 selected root://eoscms//eos/..../file.root +s2 selected root://eoscms//eos/..../file.root +d1 selected root://eoscms//eos/..../file.root d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-204567-13Julv2_lastPrompt.69400.observed.root s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Summer12_DD3.observed.root - the first column (tag) indicates if this file is signal MC (s), - background MC (b), or data (d) - the second column (treeName) is the name of the tree in the file - the third column (file) is the full path of the file + The first column (tag) indicates if this file is signal MC (s), background MC (b), or data (d). + The single samples are indicated by a number (s1, s2, etc., d1, d2, etc.) + The second column (treeName) is the name of the tree in the file + The third column (filePath) is the full path of the file files with the same tag and the same treeName are put in the same chain files with the same tag but different treeName are added as friends + + +#======================================== Working with ntuples +The .dat config file keeping the list of ntuples can be modified according to the needs adding or commenting unuseful ntuples or friend trees. +It's then important to have a simple way to merge the trees in order to be able to manipulate, scan and plot variables from the ntuples. +The ZFitter/script/GenRootChain.sh has been designed for this. + +running the command: +./script/GenRootChain.sh -f data/validation/myConfigFile.dat +in the tmp/ the s_chain.root, d_chain.root load.C are created for MC and data respectively. +The .root files have the TChains already defined, merging the files with the same treeName in the config file and adding the friends properly. +Due to a bug in ROOT in order to properly load the files the load.C script is created. + +To work with ntuples you can do: +root -l tmp/d_chain.root tmp/s_chain.root tmp/load.C +data -> Draw("*"); +signalA -> Draw("*"); + +NB: Please check in the load.C file the correct assignment of the tree pointer to the correct file. + +#============================== Data/MC plots +A standard function for data/MC plots have been prepared and is available in macro/PlotDataMC.C + +In the following you can find an example of production of data/MC plots with a config file with +22Jan rereco data, run dependent MC (three samples with different generators: s1, s2, s3) +./script/GenRootChain.sh -f data/validation/22Jan2012-runDepMCAll_v2.dat +root -l -b -q tmp/d_chain.root tmp/s1_chain.root tmp/s2_chain.root tmp/s3_chain.root tmp/load.C macro/standardDataMC.C + +***************** +The load.C script is commented below: +{ + gROOT->ProcessLine(".L macro/PlotDataMC.C+"); // -> functions for data/MC plots + gROOT->ProcessLine(".L src/setTDRStyle.C"); + gROOT->ProcessLine(".L macro/addChainWithFriends.C+"); // -> functions to work around ROOT bugs in friend treatment + + setTDRStyle1(); + + TChain *data = (TChain *) _file0->Get("selected"); // -> pointers to samples + TChain *signalA = (TChain *) _file1->Get("selected"); // -> pointers to samples + TChain *signalB = (TChain *) _file2->Get("selected"); // -> pointers to samples + TChain *signalC = (TChain *) _file3->Get("selected"); // -> pointers to samples + + ReassociateFriends(_file0, data); // -> functions to correct associate the friends to their main trees + ReassociateFriends(_file1, signalA); // -> functions to correct associate the friends to their main trees + ReassociateFriends(_file2, signalB); // -> functions to correct associate the friends to their main trees + ReassociateFriends(_file3, signalC); // -> functions to correct associate the friends to their main trees + + TDirectory *curDir = new TDirectory("curDir",""); + curDir->cd(); + + TString outputPath="tmp/"; + +// look at standardDataMC.C for some examples +} +***************** +The standardDataMC.C example: +{ + std::vector mcLabel_vec; // create a vector of labels for the MC samples + mcLabel_vec.push_back("Madgraph"); + mcLabel_vec.push_back("Powheg"); + mcLabel_vec.push_back("Sherpa"); + + //MakeChainVector(signalA,signalB,signalC) + + c = PlotDataMCs(data, // pointer to data chain + MakeChainVector(signalA,signalB,signalC), // creates a vector of chains for MCs + "etaEle", // variable to be plotted + "(100,-2.5,2.5)", // binning of x axis + "eleID_loose-trigger-noPF-Et_25", // stream based selection with ECALELF convention -> a specific class takes care in parsing the string and provide the selections cuts + "", // additional selection string in standard ROOT syntax, + "Data", // label for data in Legend + mcLabel_vec, // vector of strings for MC labels in legend + "#eta", // x axis title + "", + false, // do plot in log scale + true // reweight MC for PU + ); // use r9weight + c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.eps"); + c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.C"); + delete c; +} + + + + +#============================================================ The files containing the histograms for the PU reweight are indicated with pileupHist as treeName and they are treated in a different way. There must be only one pileupHist for d and one for s, @@ -284,3 +326,53 @@ then in .dat file: energy_SC_A_B_gold(bad) --outDirFitResData=test/dato/fitres/Hgg_Et_v1/ \ --autoNsmear --constTermFix --smearerType=profile --saveRootMacro --addBranch=smearerCat \ >&test/dato/fitres/Hgg_Et_v1/log.log + + +Package content: + - BW_CB_pdf_class + Class providing a RooPdf correspoding to the convolution of a + Breit-Wigner and Crystal Ball + - Cruijff_pdf_class + Class providing a RooPdf corresponding to a Cruijff function + (Gaussian with exponential tails) + - ElectronCategory_class + Parser class for electron categorization providing TCuts for + RooDataset + - ZFit_class + Class for fitting the Z lineshape from any RooAbsData + - ZFitter + General program for Z fit (monitoring, calibration validation) + +Input: +While the classes are almost generic and flexible, the ZFitter program +is thought to be used starting from ECALELF ntuples (ZNtuples). + + - data ntuples must contain: + - a tree "selected" + - mc ntuples must contain: + - a tree "selected" + - config file: see next section + - run range config file: + file containing a list of run ranges: every region will be + checked in every run range in this file + - category config file: + file containing a list of regions (categories) for electrons + it will be combined with the run range config file (if provided) + - option: + - global pt cut + - selection + - energy used for the invariant mass calculation (invMass_var) + - (not implemented) bin/unbin/mixed: performe binned/unbinned fit or a mix + version (unbinned for < mixedSwitchValue events, binned otherwise) + - (not implemented) mixed switch value: 200 by default + - + +If no external PU reweight is provided and no tree containing the PU +reweight for the MC, the program reads the files, add all the data PU +histograms, add all the MC PU histograms, calculates the PU +reweight, produce a tree with the per event weight for the MC. +Then add the tree with the PU weights to the MC chain as a friend +tree. + +\endverbatim +*/ \ No newline at end of file diff --git a/ZNtupleDumper/doc/README b/ZNtupleDumper/doc/README index f85c3b98e52..de332d8dbf7 100644 --- a/ZNtupleDumper/doc/README +++ b/ZNtupleDumper/doc/README @@ -1,3 +1,6 @@ +/** +* \page page3 +* \verbatim ############################################################ ## ECALELF (Ecal CALibration with ELectrons Framework) ## study and calibration with Zee @@ -99,4 +102,5 @@ for dir in prod_alcareco/DoubleElectron-RUN2012A-May10ReReco-v1/*/; do echo $dir - +\endverbatim +**/ From 0c289f03ba4944f9993cf98d3ca29d244da6921a Mon Sep 17 00:00:00 2001 From: gfasanel Date: Wed, 11 Dec 2013 13:39:18 +0100 Subject: [PATCH 204/475] prova --- ZFitter/macro/PlotDataMC.C | 52 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index d46db978bb9..ccc2a0b3d73 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,54 @@ TCut GetCut(TString category, int indexEle=0){ return cutter.GetCut(category, false,indexEle); } +/*TCanvas *Plot2D_my(TChain *data, TChain *mc, TString branchname, TString binning, + TCut selection, + TString dataLabel, TString mcLabel, + TString xLabel, TString yLabel, + int type=2, TString opt="colz", bool usePU=true, bool smear=false, bool scale=false){*/ +/*TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchname, TString binning, + TString category, TString selection, + TString dataLabel, std::vector mcLabel_vec, TString xLabel, TString yLabelUnit, + bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false, bool useR9Weight=false){*/ +TCanvas *Plot2D_profileX_my(TChain *data, TString branchname, TString binning,TString selection,TString opt,TString xLabel, TString yLabel){ + //type == 0: data only + //type == 1: MC only + //type == 2: data/MC + + TCanvas *c = new TCanvas("c",""); + data->Draw(branchname+">>data_hist"+binning,selection,opt); + TH2F *d = (TH2F *) gROOT->FindObject("data_hist"); + + TCanvas *c1 = new TCanvas("c1",""); + TProfile *prof = d->ProfileX("prof",1,-1,"s"); + prof->SetMarkerStyle(20); + prof->SetMarkerSize(1); + prof->Draw(); + prof->GetYaxis()->SetTitle(yLabel); + prof->GetXaxis()->SetTitle(xLabel); + + return c1; +} + +TCanvas *Plot2D_my(TChain *data, TString branchname, TString binning,TString selection,TString opt,TString xLabel, TString yLabel){ + //type == 0: data only + //type == 1: MC only + //type == 2: data/MC + + TCanvas *c = new TCanvas(); + c->SetRightMargin(0.2); + // data->Draw(branchname+">>data_hist"+binning, selection,opt); + data->Draw(branchname+">>data_hist"+binning,selection,opt); + TH2F *d = (TH2F *) gROOT->FindObject("data_hist"); + d->GetYaxis()->SetTitle(yLabel); + d->GetXaxis()->SetTitle(xLabel); + d->GetZaxis()->SetTitle("Events"); + d->GetZaxis()->SetNdivisions(510); + d->Draw("colz"); + + return c; +} TCanvas *PlotDataMC2D(TChain *data, TChain *mc, TString branchname, TString binning, TCut selection, @@ -113,7 +161,7 @@ TCanvas *PlotDataMC2D(TChain *data, TChain *mc, if(category.Sizeof()>1) sel= GetCut(category, 0); sel+=selection; return PlotDataMC2D(data, mc, branchname, binning, sel, dataLabel, mcLabel, xLabel, yLabel, type, opt,usePU, smear, scale); -} +} TCanvas *PlotDataMC(TChain *data, TChain *mc, TString branchname, TString binning, @@ -503,7 +551,7 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false, bool useR9Weight=false){ TStopwatch watch; watch.Start(); - + //gStyle->SetOptStat(11);//Giuseppe int nHist= mc_vec.size(); int colors[4]={kRed,kGreen,kBlue,kCyan}; From d115ecdffa9cd0ef35fd08828a43bd19752fec05 Mon Sep 17 00:00:00 2001 From: gfasanel Date: Wed, 11 Dec 2013 14:35:34 +0100 Subject: [PATCH 205/475] isGain inserted --- ZNtupleDumper/src/ZNtupleDumper.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index b8e761dc722..d610d017b04 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -228,6 +228,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t seedLCSCEle[2]; Float_t avgLCSCEle[2]; + Bool_t isGainSwitch6[2];///< Gain switch 12->6 + Bool_t isGainSwitch1[2];///< Gain switch 6->1 Float_t energyMCEle[2]; ///< Electron MC true energy Float_t energySCEle[2]; ///< corrected SuperCluster energy @@ -717,6 +719,8 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("seedLCSCEle", seedLCSCEle, "seedLCSCEle[2]/F"); tree->Branch("avgLCSCEle", avgLCSCEle, "avgLCSCEle[2]/F"); + tree->Branch("isGainSwitch6", isGainSwitch6, "isGainSwitch6[2]/B"); + tree->Branch("isGainSwitch1", isGainSwitch1, "isGainSwitch1[2]/B"); tree->Branch("energyMCEle", energyMCEle, "energyMCEle[2]/F"); tree->Branch("energySCEle", energySCEle, "energySCEle[2]/F"); @@ -936,6 +940,17 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int seedXSCEle[index]=seedDetId.ieta(); seedYSCEle[index]=seedDetId.iphi(); seedEnergySCEle[index]=seedRecHit->energy(); + //giuseppe + isGainSwitch6[index]=false; + isGainSwitch1[index]=false; + + if((seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)==true)){ + isGainSwitch6[index]=true; + } + if((seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1))==true){ + isGainSwitch1[index]=true; + } + if(true || isMC) seedLCSCEle[index]=-10; else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); } else { @@ -960,6 +975,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int sumE += oneHit->energy(); } avgLCSCEle[index] = sumLC_E / sumE; + } else avgLCSCEle[index] = -10; nHitsSCEle[index] = electron1.superCluster()->size(); From a7cd8056c05c97613f2276f4058424908fb89173 Mon Sep 17 00:00:00 2001 From: gfasanel Date: Wed, 11 Dec 2013 14:39:26 +0100 Subject: [PATCH 206/475] adding comments --- .../validation/22Jan2012-runDepMCAll_v2.dat | 58 +++++++++---------- ZFitter/script/GenRootChain.sh | 5 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat index 561ba4dfd50..83ceb7a2e91 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat @@ -45,21 +45,21 @@ s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s #s2 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s2-22Jan2012-runDepMC.root ##s3 smearerCat_scaleStep2smearing_8 smearerCat_scaleStep2smearing_8_s3-22Jan2012-runDepMC.root # -d1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d1-22Jan2012-runDepMCAll.root -d2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d2-22Jan2012-runDepMCAll.root -d3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d3-22Jan2012-runDepMCAll.root -d4 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d4-22Jan2012-runDepMCAll.root -s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll.root -s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll.root -s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll.root +#d1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d1-22Jan2012-runDepMCAll.root +#d2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d2-22Jan2012-runDepMCAll.root +#d3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d3-22Jan2012-runDepMCAll.root +#d4 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_d4-22Jan2012-runDepMCAll.root +#s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll.root +#s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll.root +#s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll.root # -d1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d1-22Jan2012-runDepMCAll.root -d2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d2-22Jan2012-runDepMCAll.root -d3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d3-22Jan2012-runDepMCAll.root -d4 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d4-22Jan2012-runDepMCAll.root -s1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s1-22Jan2012-runDepMCAll.root -s2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s2-22Jan2012-runDepMCAll.root -s3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s3-22Jan2012-runDepMCAll.root +#d1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d1-22Jan2012-runDepMCAll.root +#d2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d2-22Jan2012-runDepMCAll.root +#d3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d3-22Jan2012-runDepMCAll.root +#d4 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_d4-22Jan2012-runDepMCAll.root +#s1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s1-22Jan2012-runDepMCAll.root +#s2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s2-22Jan2012-runDepMCAll.root +#s3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s3-22Jan2012-runDepMCAll.root # #d1 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d1-22Jan2012-runDepMC.root #d2 smearerCat_scaleStep2smearing_1 smearerCat_scaleStep2smearing_1_d2-22Jan2012-runDepMC.root @@ -77,26 +77,26 @@ s3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearin #s2 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMC.root ##s3 smearerCat_scaleStep2smearing_2 smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMC.root # -d1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d1-22Jan2012-runDepMC.root -d2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d2-22Jan2012-runDepMC.root -d3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d3-22Jan2012-runDepMC.root -d4 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d4-22Jan2012-runDepMC.root +#d1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_d4-22Jan2012-runDepMC.root #s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMC.root #s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMC.root #s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll.root # -d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root -d2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d2-22Jan2012-runDepMC.root -d3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d3-22Jan2012-runDepMC.root -d4 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d4-22Jan2012-runDepMC.root +#d1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d1-22Jan2012-runDepMC.root +#d2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d2-22Jan2012-runDepMC.root +#d3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d3-22Jan2012-runDepMC.root +#d4 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_d4-22Jan2012-runDepMC.root #s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMC.root #s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMC.root #s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll.root #################################################### -d1 r9Weight data/r9weights/r9Weight_d1-22Jan2012-runDepMCAll_v2.root -d2 r9Weight data/r9weights/r9Weight_d2-22Jan2012-runDepMCAll_v2.root -d3 r9Weight data/r9weights/r9Weight_d3-22Jan2012-runDepMCAll_v2.root -d4 r9Weight data/r9weights/r9Weight_d4-22Jan2012-runDepMCAll_v2.root -s1 r9Weight data/r9weights/r9Weight_s1-22Jan2012-runDepMCAll_v2.root -s2 r9Weight data/r9weights/r9Weight_s2-22Jan2012-runDepMCAll_v2.root -s3 r9Weight data/r9weights/r9Weight_s3-22Jan2012-runDepMCAll_v2.root +###d1 r9Weight data/r9weights/r9Weight_d1-22Jan2012-runDepMCAll_v2.root +###d2 r9Weight data/r9weights/r9Weight_d2-22Jan2012-runDepMCAll_v2.root +###d3 r9Weight data/r9weights/r9Weight_d3-22Jan2012-runDepMCAll_v2.root +###d4 r9Weight data/r9weights/r9Weight_d4-22Jan2012-runDepMCAll_v2.root +###s1 r9Weight data/r9weights/r9Weight_s1-22Jan2012-runDepMCAll_v2.root +###s2 r9Weight data/r9weights/r9Weight_s2-22Jan2012-runDepMCAll_v2.root +###s3 r9Weight data/r9weights/r9Weight_s3-22Jan2012-runDepMCAll_v2.root diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index 5fbceef1bd3..f41c001d897 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -151,6 +151,7 @@ done #hadd tmp/s_chain.root tmp/s_*_chain.root #hadd tmp/d_chain.root tmp/d_*_chain.root +#NOTA => previously, 3 times signalA cat > tmp/load.C <ProcessLine(".L macro/PlotDataMC.C+"); @@ -162,8 +163,8 @@ cat > tmp/load.C <Get("selected"); TChain *signalA = (TChain *) _file1->Get("selected"); - TChain *signalA = (TChain *) _file2->Get("selected"); - TChain *signalA = (TChain *) _file3->Get("selected"); + TChain *signalB = (TChain *) _file2->Get("selected"); + TChain *signalC = (TChain *) _file3->Get("selected"); ReassociateFriends(_file0, data); ReassociateFriends(_file1, signalA); From 687c47f7dd4e14fd32a4f41fa3d8d2a1cd5a45ee Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 11 Dec 2013 18:40:29 +0100 Subject: [PATCH 207/475] fixed errors --- README.md | 7 ++++--- ZFitter/doc/README | 17 ++++++++++------- ZFitter/script/GenRootChain.sh | 2 +- ZFitter/src/addBranch_class.cc | 26 +++++++++++++++----------- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 50042328dab..56a80ed0e32 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ In order to compile Calibration/ZFitter do ====== Instructions for developments: -fork the repository in GIT to your own area +fork the repository in GIT to your own area (if you didn't it already) `git@github.com:ECALELFS/ECALELF.git` Add your git repository to the list of remotes to be used like: @@ -37,8 +37,9 @@ Add your git repository to the list of remotes to be used like: Create a new branch for your development (use a meaningful name) `git branch myNewBranch` -Push it to your git repository -`git push myNewBranch myfork` +Switch to the new branch: `git checkout myNewBranch` +Push it to your git repository (create a new branch with the same name also in your remote GIT repository) +`git push myfork` Then start to develop, remember to do commits as much as possible diff --git a/ZFitter/doc/README b/ZFitter/doc/README index 76651ba2f24..bf389bb4d2a 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -8,16 +8,18 @@ There are three important directories where the proper .dat files should be put: - data/validation/ - - data/regions/ - - data/runRanges/ -#============================== validation config .dat file creation +#============================== validation config .dat file creation to be put in data/validation/ This config file contains the list of files to run on, the files containing the PU histograms for the PU reweighting and all the other files needed. -The main idea in the ECALELF framework is to have a minimum set of variables in very small trees (the tree name is "selected"), while additional branches can be produced and added if needed as tree friends. The advantage is the possibility to produce ntuples for a larger set of studies with small specific trees for each of them. +The main idea in the ECALELF framework is to have a minimum set of +variables in very small trees (the tree name is "selected"), while +additional branches can be produced and added if needed as tree +friends. The advantage is the possibility to produce ntuples for a +larger set of studies with small specific trees for each of them. The file is structured in 3 columns: tag, treeName and filePath as in the follows: @@ -122,6 +124,10 @@ The standardDataMC.C example: +\endverbatim +*/ + + #============================================================ The files containing the histograms for the PU reweight are indicated with pileupHist as treeName and they are treated in a @@ -373,6 +379,3 @@ histograms, add all the MC PU histograms, calculates the PU reweight, produce a tree with the per event weight for the MC. Then add the tree with the PU weights to the MC chain as a friend tree. - -\endverbatim -*/ \ No newline at end of file diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index 6d37544e151..f2e110bfd5d 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -139,7 +139,7 @@ fi # saving the root files with the chains rm tmp/*_chain.root ./bin/ZFitter.exe --saveRootMacro -f ${configFile} --regionsFile=${regionsFile} ${noPU} ${addBranchList} ${corrEleFile} ${corrEleType} ${fitterOptions} || exit 1 -exit 0 + # adding all the chains in one file for file in tmp/s[0-9]*_selected_chain.root tmp/d_selected_chain.root tmp/s_selected_chain.root do diff --git a/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc index 2d647f37c83..64fabb8a29c 100644 --- a/ZFitter/src/addBranch_class.cc +++ b/ZFitter/src/addBranch_class.cc @@ -226,20 +226,24 @@ TTree* addBranch_class::AddBranch_iSM(TChain* originalChain, TString treename, T iSM_[0]=-1; iSM_[1]=-1; originalChain->GetEntry(ientry); - if(seedXSCEle_[0] > 0) { - // EB+ - iSM_[0] = (int)((seedYSCEle_[0]-1))/20 + 1; - } else { - // EB- - iSM_[0] = (int)((seedYSCEle_[0]-1))/20 + 19; + if(seedXSCEle_[0]!=0){ + if(seedXSCEle_[0] > 0) { + // EB+ + iSM_[0] = (int)((seedYSCEle_[0]-1))/20 + 1; + } else { + // EB- + iSM_[0] = (int)((seedYSCEle_[0]-1))/20 + 19; + } } - if(seedXSCEle_[1] > 0) { - // EB+ - iSM_[1] = (int)((seedYSCEle_[1]-1))/20 + 1; - } else { + if(seedYSCEle_[1] !=0){ + if(seedXSCEle_[1] > 0) { + // EB+ + iSM_[1] = (int)((seedYSCEle_[1]-1))/20 + 1; + } else { // EB- - iSM_[1] = (int)((seedYSCEle_[1]-1))/20 + 19; + iSM_[1] = (int)((seedYSCEle_[1]-1))/20 + 19; + } } if(ientry < 10) std::cout << seedXSCEle_[0] << "\t" << seedYSCEle_[0] << "\t" << iSM_[0] << std::endl; if(ientry < 10) std::cout << seedXSCEle_[1] << "\t" << seedYSCEle_[1] << "\t" << iSM_[1] << std::endl; From c1fe062d465336339bf9dee2a0b4b0329bc5c750 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 11 Dec 2013 18:43:22 +0100 Subject: [PATCH 208/475] fixing documentation --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 56a80ed0e32..fa59b82d64e 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ Add your git repository to the list of remotes to be used like: `git remote add -f myfork git@github.com:hengne/ECALELF.git` `git checkout devel-42X_44X_53X` + +====== +If you want to develop the code: Create a new branch for your development (use a meaningful name) `git branch myNewBranch` Switch to the new branch: `git checkout myNewBranch` @@ -43,6 +46,9 @@ Push it to your git repository (create a new branch with the same name also in y Then start to develop, remember to do commits as much as possible +====== +Remember to update regularly the code doing when you are in the branch devel-42X_44X_53X: +`git pull` ====== Code documentation: From 5337a41cf89dda4109db7b5f0fc77024f6f9e97d Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 11 Dec 2013 18:53:30 +0100 Subject: [PATCH 209/475] fixing example standardDataMC --- ZFitter/doc/README | 2 +- ZFitter/macro/standardDataMC.C | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ZFitter/doc/README b/ZFitter/doc/README index bf389bb4d2a..47d6547ae57 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -52,7 +52,7 @@ in the tmp/ the s_chain.root, d_chain.root load.C are created for MC and data re The .root files have the TChains already defined, merging the files with the same treeName in the config file and adding the friends properly. Due to a bug in ROOT in order to properly load the files the load.C script is created. -To work with ntuples you can do: +To work with ntuples you can do (see pratical example below): root -l tmp/d_chain.root tmp/s_chain.root tmp/load.C data -> Draw("*"); signalA -> Draw("*"); diff --git a/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C index d42d5bc4113..e80676a0c8d 100644 --- a/ZFitter/macro/standardDataMC.C +++ b/ZFitter/macro/standardDataMC.C @@ -5,9 +5,10 @@ mcLabel_vec.push_back("Sherpa"); - c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,true); // use r9weight - c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.eps"); - c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.C"); + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,false); + c->SaveAs(outputPath+"etaEle-Et_25.eps"); + c->SaveAs(outputPath+"etaEle-Et_25.png"); + c->SaveAs(outputPath+"etaEle-Et_25.C"); delete c; From bab61869a82abeceabdfe458fcb0bce02556f2e7 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 11 Dec 2013 18:58:51 +0100 Subject: [PATCH 210/475] fixing error --- ZFitter/script/GenRootChain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index f2e110bfd5d..ff736c187fa 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -162,8 +162,8 @@ cat > tmp/load.C <Get("selected"); TChain *signalA = (TChain *) _file1->Get("selected"); - TChain *signalA = (TChain *) _file2->Get("selected"); - TChain *signalA = (TChain *) _file3->Get("selected"); + TChain *signalB = (TChain *) _file2->Get("selected"); + TChain *signalC = (TChain *) _file3->Get("selected"); ReassociateFriends(_file0, data); ReassociateFriends(_file1, signalA); From 47fed6792abf4ab263e48eb9453d5387e9e56e75 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 11 Dec 2013 19:04:27 +0100 Subject: [PATCH 211/475] fixing error --- ZFitter/doc/README | 2 +- ZFitter/macro/standardDataMC.C | 5 +++-- ZFitter/script/GenRootChain.sh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ZFitter/doc/README b/ZFitter/doc/README index 47d6547ae57..0791c1b78bf 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -65,7 +65,7 @@ A standard function for data/MC plots have been prepared and is available in mac In the following you can find an example of production of data/MC plots with a config file with 22Jan rereco data, run dependent MC (three samples with different generators: s1, s2, s3) ./script/GenRootChain.sh -f data/validation/22Jan2012-runDepMCAll_v2.dat -root -l -b -q tmp/d_chain.root tmp/s1_chain.root tmp/s2_chain.root tmp/s3_chain.root tmp/load.C macro/standardDataMC.C +root -l -b -q tmp/d_chain.root tmp/s1_chain.root tmp/s2_chain.root tmp/load.C macro/standardDataMC.C ***************** The load.C script is commented below: diff --git a/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C index e80676a0c8d..ac44471fa1e 100644 --- a/ZFitter/macro/standardDataMC.C +++ b/ZFitter/macro/standardDataMC.C @@ -2,10 +2,11 @@ std::vector mcLabel_vec; mcLabel_vec.push_back("Madgraph"); mcLabel_vec.push_back("Powheg"); - mcLabel_vec.push_back("Sherpa"); + //mcLabel_vec.push_back("Sherpa"); - c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,false); + // c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,false); + c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,false); c->SaveAs(outputPath+"etaEle-Et_25.eps"); c->SaveAs(outputPath+"etaEle-Et_25.png"); c->SaveAs(outputPath+"etaEle-Et_25.C"); diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index ff736c187fa..5aa46c2e1a4 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -163,12 +163,12 @@ cat > tmp/load.C <Get("selected"); TChain *signalA = (TChain *) _file1->Get("selected"); TChain *signalB = (TChain *) _file2->Get("selected"); - TChain *signalC = (TChain *) _file3->Get("selected"); +// TChain *signalC = (TChain *) _file3->Get("selected"); ReassociateFriends(_file0, data); ReassociateFriends(_file1, signalA); ReassociateFriends(_file2, signalB); - ReassociateFriends(_file3, signalC); +// ReassociateFriends(_file3, signalC); TDirectory *curDir = new TDirectory("curDir",""); curDir->cd(); From 4c318d1ba4ecd17bfecd934d4726cdff2bfb16bc Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 12 Dec 2013 09:46:35 +0100 Subject: [PATCH 212/475] adding 7TeVtrain regression to ntuples and small fixes for eleIDtree --- ALCARAW_RECO/alcareco_datasets.dat | 4 + ALCARAW_RECO/python/alcaSkimming.py | 6 +- ALCARAW_RECO/scripts/mergeOutput.sh | 12 +- ALCARAW_RECO/scripts/prodNtuples.sh | 12 +- .../python/elenewenergiesproducer_cfi.py | 13 +- .../src/EleNewEnergiesProducer.cc | 519 ++++++++++++++++++ ZNtupleDumper/python/patSequence_cff.py | 61 ++ ZNtupleDumper/src/ZNtupleDumper.cc | 81 ++- 8 files changed, 691 insertions(+), 17 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index ae48ce886ea..656989eae32 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -1,6 +1,7 @@ ################### MC 53 allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco +allRange /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_S10_START53_V7C-v2/AODSIM DYJets_sherpa-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco ################### MC 53 RUN dependent 194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco @@ -17,6 +18,9 @@ allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco ################### MC geometries and material +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-ExtFlat10_PU_RD1_START53_V7N-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-ExtFlat10 caf group/alca_ecalcalib/alcareco +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-ExtFlat20_PU_RD1_START53_V7N-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-ExtFlat20 caf group/alca_ecalcalib/alcareco +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-ExtFlat30_PU_RD1_START53_V7N-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-ExtFlat30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat10S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat10S30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat20S30_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat20S30 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M_20_TuneZ2star_8TeV_pythia6/Summer12_DR53X-ExtFlat10_PU_S10_START53_V15-v1/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-ExtFlat10 caf group/alca_ecalcalib/alcareco diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 3db55294bf5..ca6f4761ffb 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -287,9 +287,11 @@ elif(re.match("CMSSW_5_3_11_patch3",CMSSW_VERSION)): if(MC): print "[INFO] Using GT START53_LV4::All" - process.GlobalTag.globaltag = 'START53_LV4::All' + process.GlobalTag.globaltag = 'START53_V7C::All' +# process.GlobalTag.globaltag = 'START53_LV4::All' else: - process.GlobalTag.globaltag = 'FT_R_53_LV3::All' #21Jun rereco 53X 2011 data + process.GlobalTag.globaltag = 'FT_R_53_V21::All' #22Jan rereco + #process.GlobalTag.globaltag = 'FT_R_53_LV3::All' #21Jun rereco 53X 2011 data elif(re.match("CMSSW_5_3_.*",CMSSW_VERSION)): if(MC): print "[INFO] Using GT START53_V7A::All" diff --git a/ALCARAW_RECO/scripts/mergeOutput.sh b/ALCARAW_RECO/scripts/mergeOutput.sh index 1881e17ee35..6eee462fb9d 100755 --- a/ALCARAW_RECO/scripts/mergeOutput.sh +++ b/ALCARAW_RECO/scripts/mergeOutput.sh @@ -98,8 +98,11 @@ fi #if [ -z "$JSON" ];then # JSON=`echo ${USER_REMOTE_DIR} | sed "s|.*${RUNRANGE}/||;s|/unmerged.*||"` + if [ "${FILENAME_BASE}" == "PUDumper" ];then MERGEDFILE=PUDumper-${DATASETNAME}-${RUNRANGE}.root +elif [ "`echo ${FILENAME_BASE} | awk '(/extraID/){printf(\"1\")}'`" == "1" ]; then + MERGEDFILE=extraID-${DATASETNAME}-${RUNRANGE}.root else MERGEDFILE=${DATASETNAME}-${RUNRANGE}.root fi @@ -107,11 +110,18 @@ fi # MERGEDFILE=${DATASETNAME}-${RUNRANGE}-JSON_${JSON}.root #fi +eosFile=${STORAGE_PATH}/${MERGED_REMOTE_DIR}/${MERGEDFILE} +# eos.select ls $eosFile && { +# echo "$eosFile" +# echo "[WARNING] Files not merged because merged file already exist" >> /dev/stderr +# echo "[WARNING] Files not merged because merged file already exist" >> /dev/stdout +# exit 1 +# } hadd -f /tmp/$USER/${MERGEDFILE} `cat filelist/unmerged.list` || exit 1 # copy the merged file to the repository # dirname is needed to remove "unmerged" subdir from the path -xrdcp -v /tmp/$USER/${MERGEDFILE} ${STORAGE_PATH}/${MERGED_REMOTE_DIR}/${MERGEDFILE} || exit 1 +xrdcp -v /tmp/$USER/${MERGEDFILE} ${eosFile} || exit 1 # let's remove the files if [ -z "${NOREMOVE}" ];then diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 0a90da3bcb8..36c88f1b995 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -282,8 +282,12 @@ USER_REMOTE_DIR=$USER_REMOTE_DIR/unmerged #${ENERGY}/ #${DATASETNAME}/tmp-${DATASETNAME}-${RUNRANGE} +if [ "`echo \"\" | awk \"{print $DOTREE%2}\"`" == "1" ];then + OUTFILES=ntuple.root +else + OUTFILES="extraID.root" +fi -OUTFILES=ntuple.root if [ ! -d "tmp" ];then mkdir tmp/; fi cat > tmp/crab.cfg <> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" else - mergeOutput.sh -u ${UI_WORKING_DIR} -g ntuple + mergeOutput.sh -u ${UI_WORKING_DIR} -g `basename $OUTFILES .root` if [ "${isMC}" == "1" ];then mergeOutput.sh -u ${UI_WORKING_DIR} -g PUDumper fi diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index 4dab7dc910b..43c99d7cfbf 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -20,18 +20,17 @@ regrPhoJoshV4_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v4_forest_ph.root'), regrEleJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ele.root'), regrPhoJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ph.root'), -# regrEleJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ele.root'), -# regrPhoJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ph.root'), -# regrEleJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ele.root'), -# regrPhoJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ph.root'), -# regrEleJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ele.root'), -# regrPhoJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ph.root'), - regrEleJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_8TeV_forest_ele.root'), regrPhoJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_8TeV_forest_ph.root'), regrEleJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_8TeV_forest_ele.root'), regrPhoJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_8TeV_forest_ph.root'), regrEleJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_8TeV_forest_ele.root'), regrPhoJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_8TeV_forest_ph.root'), + regrEleJoshV6_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ele.root'), + regrPhoJoshV6_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ph.root'), + regrEleJoshV7_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ele.root'), + regrPhoJoshV7_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ph.root'), + regrEleJoshV8_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ele.root'), + regrPhoJoshV8_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ph.root'), ) diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index d2fad9030f5..8ac0e28f170 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -171,6 +171,21 @@ class EleNewEnergiesProducer : public edm::EDProducer { std::string regrEleJoshV8_SemiParamFile; std::string regrPhoJoshV8_SemiParamFile; + EGEnergyCorrectorSemiParm cor7TeVtrainV6_ele; + EGEnergyCorrectorSemiParm cor7TeVtrainV6_pho; + std::string regrEleJoshV6_SemiParam7TeVtrainFile; + std::string regrPhoJoshV6_SemiParam7TeVtrainFile; + + EGEnergyCorrectorSemiParm cor7TeVtrainV7_ele; + EGEnergyCorrectorSemiParm cor7TeVtrainV7_pho; + std::string regrEleJoshV7_SemiParam7TeVtrainFile; + std::string regrPhoJoshV7_SemiParam7TeVtrainFile; + + EGEnergyCorrectorSemiParm cor7TeVtrainV8_ele; + EGEnergyCorrectorSemiParm cor7TeVtrainV8_pho; + std::string regrEleJoshV8_SemiParam7TeVtrainFile; + std::string regrPhoJoshV8_SemiParam7TeVtrainFile; + bool ptSplit; }; @@ -209,6 +224,13 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) regrPhoJoshV7_SemiParamFile(iConfig.getParameter("regrPhoJoshV7_SemiParamFile")), regrEleJoshV8_SemiParamFile(iConfig.getParameter("regrEleJoshV8_SemiParamFile")), regrPhoJoshV8_SemiParamFile(iConfig.getParameter("regrPhoJoshV8_SemiParamFile")), + regrEleJoshV6_SemiParam7TeVtrainFile(iConfig.getParameter("regrEleJoshV6_SemiParam7TeVtrainFile")), + regrPhoJoshV6_SemiParam7TeVtrainFile(iConfig.getParameter("regrPhoJoshV6_SemiParam7TeVtrainFile")), + regrEleJoshV7_SemiParam7TeVtrainFile(iConfig.getParameter("regrEleJoshV7_SemiParam7TeVtrainFile")), + regrPhoJoshV7_SemiParam7TeVtrainFile(iConfig.getParameter("regrPhoJoshV7_SemiParam7TeVtrainFile")), + regrEleJoshV8_SemiParam7TeVtrainFile(iConfig.getParameter("regrEleJoshV8_SemiParam7TeVtrainFile")), + regrPhoJoshV8_SemiParam7TeVtrainFile(iConfig.getParameter("regrPhoJoshV8_SemiParam7TeVtrainFile")), + ptSplit(iConfig.getParameter("ptSplit")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), // puWeightFile(iConfig.getParameter("puWeightFile")), @@ -333,6 +355,68 @@ EleNewEnergiesProducer::EleNewEnergiesProducer(const edm::ParameterSet& iConfig) produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8gamma2"); produces< NewEnergyMap >("energySCEleJoshPhoSemiParamV8pdfval"); + + //------------------------------ + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6cbmean"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV6pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6cbmean"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV6pdfval"); + //------------------------------ 7TeVtrain + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7cbmean"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV7pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7cbmean"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV7pdfval"); + //------------------------------ + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8ecorr"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8cbmean"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8sigma"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8alpha1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8gamma1"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8alpha2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8gamma2"); + produces< NewEnergyMap >("energySCEleJoshEleSemiParam7TeVtrainV8pdfval"); + + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8ecorr"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8sigmaEoverE"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8cbmean"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8sigma"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8alpha1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8gamma1"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8alpha2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8gamma2"); + produces< NewEnergyMap >("energySCEleJoshPhoSemiParam7TeVtrainV8pdfval"); + //now do what ever other initialization is needed } @@ -421,6 +505,33 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu energySCEleJoshPhoSemiParamV8_gamma2, energySCEleJoshPhoSemiParamV8_pdfval; + std::vector energySCEleJoshEleSemiParam7TeVtrainV6_ecorr, energySCEleJoshEleSemiParam7TeVtrainV6_sigmaEoverE, + energySCEleJoshEleSemiParam7TeVtrainV6_cbmean, energySCEleJoshEleSemiParam7TeVtrainV6_sigma, + energySCEleJoshEleSemiParam7TeVtrainV6_alpha1, energySCEleJoshEleSemiParam7TeVtrainV6_gamma1, energySCEleJoshEleSemiParam7TeVtrainV6_alpha2, + energySCEleJoshEleSemiParam7TeVtrainV6_gamma2, energySCEleJoshEleSemiParam7TeVtrainV6_pdfval; + std::vector energySCEleJoshPhoSemiParam7TeVtrainV6_ecorr, energySCEleJoshPhoSemiParam7TeVtrainV6_sigmaEoverE, + energySCEleJoshPhoSemiParam7TeVtrainV6_cbmean, energySCEleJoshPhoSemiParam7TeVtrainV6_sigma, + energySCEleJoshPhoSemiParam7TeVtrainV6_alpha1, energySCEleJoshPhoSemiParam7TeVtrainV6_gamma1, energySCEleJoshPhoSemiParam7TeVtrainV6_alpha2, + energySCEleJoshPhoSemiParam7TeVtrainV6_gamma2, energySCEleJoshPhoSemiParam7TeVtrainV6_pdfval; + + std::vector energySCEleJoshEleSemiParam7TeVtrainV7_ecorr, energySCEleJoshEleSemiParam7TeVtrainV7_sigmaEoverE, + energySCEleJoshEleSemiParam7TeVtrainV7_cbmean, energySCEleJoshEleSemiParam7TeVtrainV7_sigma, + energySCEleJoshEleSemiParam7TeVtrainV7_alpha1, energySCEleJoshEleSemiParam7TeVtrainV7_gamma1, energySCEleJoshEleSemiParam7TeVtrainV7_alpha2, + energySCEleJoshEleSemiParam7TeVtrainV7_gamma2, energySCEleJoshEleSemiParam7TeVtrainV7_pdfval; + std::vector energySCEleJoshPhoSemiParam7TeVtrainV7_ecorr, energySCEleJoshPhoSemiParam7TeVtrainV7_sigmaEoverE, + energySCEleJoshPhoSemiParam7TeVtrainV7_cbmean, energySCEleJoshPhoSemiParam7TeVtrainV7_sigma, + energySCEleJoshPhoSemiParam7TeVtrainV7_alpha1, energySCEleJoshPhoSemiParam7TeVtrainV7_gamma1, energySCEleJoshPhoSemiParam7TeVtrainV7_alpha2, + energySCEleJoshPhoSemiParam7TeVtrainV7_gamma2, energySCEleJoshPhoSemiParam7TeVtrainV7_pdfval; + + std::vector energySCEleJoshEleSemiParam7TeVtrainV8_ecorr, energySCEleJoshEleSemiParam7TeVtrainV8_sigmaEoverE, + energySCEleJoshEleSemiParam7TeVtrainV8_cbmean, energySCEleJoshEleSemiParam7TeVtrainV8_sigma, + energySCEleJoshEleSemiParam7TeVtrainV8_alpha1, energySCEleJoshEleSemiParam7TeVtrainV8_gamma1, energySCEleJoshEleSemiParam7TeVtrainV8_alpha2, + energySCEleJoshEleSemiParam7TeVtrainV8_gamma2, energySCEleJoshEleSemiParam7TeVtrainV8_pdfval; + std::vector energySCEleJoshPhoSemiParam7TeVtrainV8_ecorr, energySCEleJoshPhoSemiParam7TeVtrainV8_sigmaEoverE, + energySCEleJoshPhoSemiParam7TeVtrainV8_cbmean, energySCEleJoshPhoSemiParam7TeVtrainV8_sigma, + energySCEleJoshPhoSemiParam7TeVtrainV8_alpha1, energySCEleJoshPhoSemiParam7TeVtrainV8_gamma1, energySCEleJoshPhoSemiParam7TeVtrainV8_alpha2, + energySCEleJoshPhoSemiParam7TeVtrainV8_gamma2, energySCEleJoshPhoSemiParam7TeVtrainV8_pdfval; + std::auto_ptr energySCEleJoshEleMap(new NewEnergyMap()); std::auto_ptr energySCEleJoshEleVarMap(new NewEnergyMap()); std::auto_ptr energySCEleJoshPhoMap(new NewEnergyMap()); @@ -520,6 +631,66 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu std::auto_ptr energySCEleJoshPhoSemiParamV8_gamma2_Map(new NewEnergyMap()); std::auto_ptr energySCEleJoshPhoSemiParamV8_pdfval_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV6_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV6_pdfval_Map(new NewEnergyMap()); + //------------------------------ + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV7_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV7_pdfval_Map(new NewEnergyMap()); + //------------------------------ + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshEleSemiParam7TeVtrainV8_pdfval_Map(new NewEnergyMap()); + + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_ecorr_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_sigmaEoverE_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_cbmean_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_sigma_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_alpha1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_gamma1_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_alpha2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_gamma2_Map(new NewEnergyMap()); + std::auto_ptr energySCEleJoshPhoSemiParam7TeVtrainV8_pdfval_Map(new NewEnergyMap()); + //------------------------------ ELECTRON iEvent.getByLabel(electronsTAG, electronsHandle); // altrimenti non tira eccezione @@ -710,6 +881,75 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu energySCEleJoshPhoSemiParamV8_pdfval.push_back(pdfval); + + //------------------------------ + cor7TeVtrainV6_ele.CorrectedEnergyWithErrorV6(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParam7TeVtrainV6_ecorr.push_back(ecor); + energySCEleJoshEleSemiParam7TeVtrainV6_sigmaEoverE.push_back(sigmaEoverE); + energySCEleJoshEleSemiParam7TeVtrainV6_cbmean.push_back(cbmean); + energySCEleJoshEleSemiParam7TeVtrainV6_sigma.push_back(sigma); + energySCEleJoshEleSemiParam7TeVtrainV6_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParam7TeVtrainV6_gamma1.push_back(n1); + energySCEleJoshEleSemiParam7TeVtrainV6_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParam7TeVtrainV6_gamma2.push_back(n2); + energySCEleJoshEleSemiParam7TeVtrainV6_pdfval.push_back(pdfval); + + cor7TeVtrainV6_pho.CorrectedEnergyWithErrorV6(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParam7TeVtrainV6_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParam7TeVtrainV6_sigmaEoverE.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParam7TeVtrainV6_cbmean.push_back(cbmean); + energySCEleJoshPhoSemiParam7TeVtrainV6_sigma.push_back(sigma); + energySCEleJoshPhoSemiParam7TeVtrainV6_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParam7TeVtrainV6_gamma1.push_back(n1); + energySCEleJoshPhoSemiParam7TeVtrainV6_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParam7TeVtrainV6_gamma2.push_back(n2); + energySCEleJoshPhoSemiParam7TeVtrainV6_pdfval.push_back(pdfval); + //------------------------------ + cor7TeVtrainV7_ele.CorrectedEnergyWithErrorV7(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParam7TeVtrainV7_ecorr.push_back(ecor); + energySCEleJoshEleSemiParam7TeVtrainV7_sigmaEoverE.push_back(sigmaEoverE); + energySCEleJoshEleSemiParam7TeVtrainV7_cbmean.push_back(cbmean); + energySCEleJoshEleSemiParam7TeVtrainV7_sigma.push_back(sigma); + energySCEleJoshEleSemiParam7TeVtrainV7_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParam7TeVtrainV7_gamma1.push_back(n1); + energySCEleJoshEleSemiParam7TeVtrainV7_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParam7TeVtrainV7_gamma2.push_back(n2); + energySCEleJoshEleSemiParam7TeVtrainV7_pdfval.push_back(pdfval); + + cor7TeVtrainV7_pho.CorrectedEnergyWithErrorV7(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParam7TeVtrainV7_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParam7TeVtrainV7_sigmaEoverE.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParam7TeVtrainV7_cbmean.push_back(cbmean); + energySCEleJoshPhoSemiParam7TeVtrainV7_sigma.push_back(sigma); + energySCEleJoshPhoSemiParam7TeVtrainV7_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParam7TeVtrainV7_gamma1.push_back(n1); + energySCEleJoshPhoSemiParam7TeVtrainV7_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParam7TeVtrainV7_gamma2.push_back(n2); + energySCEleJoshPhoSemiParam7TeVtrainV7_pdfval.push_back(pdfval); + //------------------------------ + cor7TeVtrainV8_ele.CorrectedEnergyWithErrorV8(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshEleSemiParam7TeVtrainV8_ecorr.push_back(ecor); + energySCEleJoshEleSemiParam7TeVtrainV8_sigmaEoverE.push_back(sigmaEoverE); + energySCEleJoshEleSemiParam7TeVtrainV8_cbmean.push_back(cbmean); + energySCEleJoshEleSemiParam7TeVtrainV8_sigma.push_back(sigma); + energySCEleJoshEleSemiParam7TeVtrainV8_alpha1.push_back(alpha1); + energySCEleJoshEleSemiParam7TeVtrainV8_gamma1.push_back(n1); + energySCEleJoshEleSemiParam7TeVtrainV8_alpha2.push_back(alpha2); + energySCEleJoshEleSemiParam7TeVtrainV8_gamma2.push_back(n2); + energySCEleJoshEleSemiParam7TeVtrainV8_pdfval.push_back(pdfval); + + cor7TeVtrainV8_pho.CorrectedEnergyWithErrorV8(*ele_itr, *primaryVertexHandle, *rhoHandle, lazyTools, iSetup,ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval); + energySCEleJoshPhoSemiParam7TeVtrainV8_ecorr.push_back(ecor); + energySCEleJoshPhoSemiParam7TeVtrainV8_sigmaEoverE.push_back(sigmaEoverE); + energySCEleJoshPhoSemiParam7TeVtrainV8_cbmean.push_back(cbmean); + energySCEleJoshPhoSemiParam7TeVtrainV8_sigma.push_back(sigma); + energySCEleJoshPhoSemiParam7TeVtrainV8_alpha1.push_back(alpha1); + energySCEleJoshPhoSemiParam7TeVtrainV8_gamma1.push_back(n1); + energySCEleJoshPhoSemiParam7TeVtrainV8_alpha2.push_back(alpha2); + energySCEleJoshPhoSemiParam7TeVtrainV8_gamma2.push_back(n2); + energySCEleJoshPhoSemiParam7TeVtrainV8_pdfval.push_back(pdfval); + + // std::cout<Branch("energySigmaSCEle_regrCorrSemiParV8_ele", energySigmaSCEle_regrCorrSemiParV8_ele, "energySigmaSCEle_regrCorrSemiParV8_ele[2]/F"); tree->Branch("energySigmaSCEle_regrCorrSemiParV8_pho", energySigmaSCEle_regrCorrSemiParV8_pho, "energySigmaSCEle_regrCorrSemiParV8_pho[2]/F"); + tree->Branch("energySCEle_regrCorrSemiPar7TeVtrainV6_ele", energySCEle_regrCorrSemiPar7TeVtrainV6_ele, "energySCEle_regrCorrSemiPar7TeVtrainV6_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiPar7TeVtrainV6_pho", energySCEle_regrCorrSemiPar7TeVtrainV6_pho, "energySCEle_regrCorrSemiPar7TeVtrainV6_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele", energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele, "energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho", energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho, "energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho[2]/F"); + + tree->Branch("energySCEle_regrCorrSemiPar7TeVtrainV7_ele", energySCEle_regrCorrSemiPar7TeVtrainV7_ele, "energySCEle_regrCorrSemiPar7TeVtrainV7_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiPar7TeVtrainV7_pho", energySCEle_regrCorrSemiPar7TeVtrainV7_pho, "energySCEle_regrCorrSemiPar7TeVtrainV7_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele", energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele, "energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho", energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho, "energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho[2]/F"); + + tree->Branch("energySCEle_regrCorrSemiPar7TeVtrainV8_ele", energySCEle_regrCorrSemiPar7TeVtrainV8_ele, "energySCEle_regrCorrSemiPar7TeVtrainV8_ele[2]/F"); + tree->Branch("energySCEle_regrCorrSemiPar7TeVtrainV8_pho", energySCEle_regrCorrSemiPar7TeVtrainV8_pho, "energySCEle_regrCorrSemiPar7TeVtrainV8_pho[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele", energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele, "energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele[2]/F"); + tree->Branch("energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho", energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho, "energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho[2]/F"); + tree->Branch("R9Ele", R9Ele, "R9Ele[2]/F"); tree->Branch("e5x5SCEle", e5x5SCEle, "e5x5SCEle[2]/F"); @@ -791,6 +816,12 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("invMass_SC_regrCorrSemiParV7_ele", &invMass_SC_regrCorrSemiParV7_ele, "invMass_SC_regrCorrSemiParV7_ele/F"); tree->Branch("invMass_SC_regrCorrSemiParV8_pho", &invMass_SC_regrCorrSemiParV8_pho, "invMass_SC_regrCorrSemiParV8_pho/F"); tree->Branch("invMass_SC_regrCorrSemiParV8_ele", &invMass_SC_regrCorrSemiParV8_ele, "invMass_SC_regrCorrSemiParV8_ele/F"); + tree->Branch("invMass_SC_regrCorrSemiPar7TeVtrainV6_pho", &invMass_SC_regrCorrSemiPar7TeVtrainV6_pho, "invMass_SC_regrCorrSemiPar7TeVtrainV6_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiPar7TeVtrainV6_ele", &invMass_SC_regrCorrSemiPar7TeVtrainV6_ele, "invMass_SC_regrCorrSemiPar7TeVtrainV6_ele/F"); + tree->Branch("invMass_SC_regrCorrSemiPar7TeVtrainV7_pho", &invMass_SC_regrCorrSemiPar7TeVtrainV7_pho, "invMass_SC_regrCorrSemiPar7TeVtrainV7_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiPar7TeVtrainV7_ele", &invMass_SC_regrCorrSemiPar7TeVtrainV7_ele, "invMass_SC_regrCorrSemiPar7TeVtrainV7_ele/F"); + tree->Branch("invMass_SC_regrCorrSemiPar7TeVtrainV8_pho", &invMass_SC_regrCorrSemiPar7TeVtrainV8_pho, "invMass_SC_regrCorrSemiPar7TeVtrainV8_pho/F"); + tree->Branch("invMass_SC_regrCorrSemiPar7TeVtrainV8_ele", &invMass_SC_regrCorrSemiPar7TeVtrainV8_ele, "invMass_SC_regrCorrSemiPar7TeVtrainV8_ele/F"); tree->Branch("invMass_MC", &invMass_MC, "invMass_MC/F"); @@ -911,6 +942,9 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int return; } + //checks + + PtEle[index] = electron1.et(); chargeEle[index] = electron1.charge(); etaEle[index] = electron1.eta(); // degli elettroni @@ -936,7 +970,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int seedXSCEle[index]=seedDetId.ieta(); seedYSCEle[index]=seedDetId.iphi(); seedEnergySCEle[index]=seedRecHit->energy(); - if(true || isMC) seedLCSCEle[index]=-10; + if(isMC) seedLCSCEle[index]=-10; else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); } else { EEDetId seedDetId = electron1.superCluster()->seed()->seed(); @@ -944,13 +978,13 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int seedXSCEle[index]=(EEDetId)(seedDetId).ix(); seedYSCEle[index]=(EEDetId)(seedDetId).iy(); seedEnergySCEle[index]=seedRecHit->energy(); - if(true ||isMC) seedLCSCEle[index]=-10; + if(isMC) seedLCSCEle[index]=-10; else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); } float sumLC_E = 0.; float sumE = 0.; - if(true || !isMC){ + if( !isMC){ std::vector< std::pair > hitsAndFractions_ele1 = electron1.superCluster()->hitsAndFractions(); for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); detitr != hitsAndFractions_ele1.end(); detitr++ ) @@ -1023,6 +1057,22 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int energySigmaSCEle_regrCorrSemiParV8_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParamV8sigmaEoverE"); energySigmaSCEle_regrCorrSemiParV8_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParamV8sigmaEoverE"); + + energySCEle_regrCorrSemiPar7TeVtrainV6_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParam7TeVtrainV6ecorr"); + energySCEle_regrCorrSemiPar7TeVtrainV6_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParam7TeVtrainV6ecorr"); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParam7TeVtrainV6sigmaEoverE"); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParam7TeVtrainV6sigmaEoverE"); + + energySCEle_regrCorrSemiPar7TeVtrainV7_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParam7TeVtrainV7ecorr"); + energySCEle_regrCorrSemiPar7TeVtrainV7_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParam7TeVtrainV7ecorr"); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParam7TeVtrainV7sigmaEoverE"); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParam7TeVtrainV7sigmaEoverE"); + + energySCEle_regrCorrSemiPar7TeVtrainV8_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParam7TeVtrainV8ecorr"); + energySCEle_regrCorrSemiPar7TeVtrainV8_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParam7TeVtrainV8ecorr"); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshPhoSemiParam7TeVtrainV8sigmaEoverE"); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele[index] = electron1.userFloat("eleNewEnergiesProducer:energySCEleJoshEleSemiParam7TeVtrainV8sigmaEoverE"); + // change in an electron properties please, EleNewEnergyProducer e3x3SCEle[index] = clustertools->e3x3(*electron1.superCluster()->seed()); e5x5SCEle[index] = clustertools->e5x5(*electron1.superCluster()->seed()); @@ -1117,6 +1167,19 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const invMass_SC_regrCorrSemiParV8_pho = sqrt(2* energySCEle_regrCorrSemiParV8_pho[0] * energySCEle_regrCorrSemiParV8_pho[1] * angle); + invMass_SC_regrCorrSemiPar7TeVtrainV6_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV6_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_pho[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV7_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV7_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_pho[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV8_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV8_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_pho[1] * + angle); + invMass_regrCorr_fra = sqrt(2* energyEle_regrCorr_fra[0] * energyEle_regrCorr_fra[1] *angle); invMass_regrCorr_egamma = sqrt(2* energyEle_regrCorr_egamma[0] * energyEle_regrCorr_egamma[1] *angle); @@ -1304,7 +1367,19 @@ void ZNtupleDumper::TreeSetEleIDVar(const pat::Electron& electron1, int index){ pfMVA[index] = electron1.mva(); hasMatchedConversion[index] = ConversionTools::hasMatchedConversion(electron1, conversionsHandle, bsHandle->position()); maxNumberOfExpectedMissingHits[index] = electron1.gsfTrack()->trackerExpectedHitsInner().numberOfLostHits(); + +// if (primaryVertexHandle->size() > 0) { +// reco::VertexRef vtx(primaryVertexHandle, 0); +// d0vtx[index] = electron1.gsfTrack()->dxy(vtx->position()); +// dzvtx[index] = electron1.gsfTrack()->dz(vtx->position()); +// } else { +// d0vtx[index] = electron1.gsfTrack()->dxy(); +// dzvtx[index] = electron1.gsfTrack()->dz(); +// } + eleIDloose[index] = electron1.electronID("loose"); + eleIDmedium[index] = electron1.electronID("medium"); + eleIDtight[index] = electron1.electronID("tight"); return; } From 5a7980aa8922b41950c3474360b223a2b895ad51 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 13 Dec 2013 11:17:23 +0100 Subject: [PATCH 213/475] added options for condor and removed full reco for ALCARAW --- ALCARAW_RECO/alcaraw_datasets.dat | 5 +++++ ALCARAW_RECO/python/alcaSkimming.py | 24 ++++++++++++++++-------- ALCARAW_RECO/scripts/prodAlcaraw.sh | 2 +- ALCARAW_RECO/scripts/prodFunctions.sh | 2 +- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ALCARAW_RECO/alcaraw_datasets.dat b/ALCARAW_RECO/alcaraw_datasets.dat index d73000a14f7..538101162d1 100644 --- a/ALCARAW_RECO/alcaraw_datasets.dat +++ b/ALCARAW_RECO/alcaraw_datasets.dat @@ -63,3 +63,8 @@ 193834-196531 /SingleElectron/Run2012B-v1/RAW SingleElectron-WSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD 198022-203742 /SingleElectron/Run2012C-v1/RAW SingleElectron-WSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012C,RUN2012ABC,RUN2012ABCD 203777-208686 /SingleElectron/Run2012D-v1/RAW SingleElectron-WSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABCD,RUN2012D +####### Single Electron 22JanReReco from Skim +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/RECO SingleElectron-Run2012A-22Jan2013-v1 caf /group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/RECO SingleElectron-Run2012B-22Jan2013-v1 caf /group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/RECO SingleElectron-Run2012C-22Jan2013-v1 caf /group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012C,RUN2012AB,RUN2012ABC,RUN2012ABCD +203756-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-Run2012D-22Jan2013-v1 caf /group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012D,RUN2012AB,RUN2012ABC,RUN2012ABCD diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index ca6f4761ffb..5a856c3d00e 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -608,14 +608,15 @@ ) if(options.type=='ALCARAW'): - process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step, - process.reconstruction_step,process.endjob_step, - process.pathALCARECOEcalUncalZElectron, process.pathALCARECOEcalUncalWElectron, - process.pathALCARECOEcalUncalZSCElectron, - process.ALCARAWoutput_step, - process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, - process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules + process.schedule = cms.Schedule( + #process.raw2digi_step,process.L1Reco_step, + #process.reconstruction_step,process.endjob_step, + process.pathALCARECOEcalUncalZElectron, process.pathALCARECOEcalUncalWElectron, + process.pathALCARECOEcalUncalZSCElectron, + process.ALCARAWoutput_step, + process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.pathALCARECOEcalCalZSCElectron, + process.ALCARECOoutput_step, process.NtuplePath) # fix the output modules elif(options.type=='ALCARERECO'): @@ -670,3 +671,10 @@ process.sandboxRerecoSeq*=process.elPFIsoValueGamma03PFIdRecalib process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib + + +############################ +## Dump the output Python ## +############################ +processDumpFile = open('processDump.py', 'w') +print >> processDumpFile, process.dumpPython() diff --git a/ALCARAW_RECO/scripts/prodAlcaraw.sh b/ALCARAW_RECO/scripts/prodAlcaraw.sh index a42fbf82b17..3e8f8e44db3 100755 --- a/ALCARAW_RECO/scripts/prodAlcaraw.sh +++ b/ALCARAW_RECO/scripts/prodAlcaraw.sh @@ -25,7 +25,7 @@ usage(){ echo " --remote_dir dir" echo "---------- optional" echo " -s skim: ZSkim, WSkim, EleSkim: ZSkim for DoubleElectron and WSkim for SingleElectron are automatically activated" - echo " --scheduler caf,lsf,remoteGlidein (=${SCHEDULER})" + echo " --scheduler caf,lsf,remoteGlidein,condor (=${SCHEDULER})" echo " --createOnly" echo " --submitOnly" echo " --check" diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index b73db9cdbe6..2df637365a5 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -10,7 +10,7 @@ setStoragePath(){ STORAGE_PATH=root://eoscms//eos/cms/store ;; #glite | glidein) - remoteGlidein) + remoteGlidein|condor) STORAGE_ELEMENT=srm-eoscms.cern.ch STORAGE_PATH=/srm/v2/server?SFN=/eos/cms/store #STORAGE_ELEMENT=caf.cern.ch From 558787df4c8563996a6530fbad4fa64bdf8df76f Mon Sep 17 00:00:00 2001 From: Raffaele Date: Wed, 11 Dec 2013 11:11:39 -0600 Subject: [PATCH 214/475] setup reading git repo --- setup_git.sh | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100755 setup_git.sh diff --git a/setup_git.sh b/setup_git.sh new file mode 100755 index 00000000000..532453e2f34 --- /dev/null +++ b/setup_git.sh @@ -0,0 +1,179 @@ +#!/bin/bash + +checkVERSION(){ + case $CMSSW_VERSION in + CMSSW_5_3_7_patch6) + echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" + ;; + *) + echo "[ERROR] Sorry, $CMSSW_VERSION not configured for ECALELF" + echo " Be sure that you don't want 4_2_8_patch7 or CMSSW_4_4_5_patch2 or 5_3_7_patch5 or CMSSW_6_1_*" + + exit 1 + ;; + esac +} + +case $# in + 1) + echo "[STATUS] Creating $1 CMSSW release working area" + CMSSW_VERSION=$1 + checkVERSION + scram project CMSSW ${CMSSW_VERSION} + cd ${CMSSW_VERSION}/src + eval `scramv1 runtime -sh` + ;; + *) + checkVERSION + ;; +esac + +export CMSSW_VERSION + + +# put in the right directory +cd $CMSSW_BASE/src + +######################################################################################### +echo "[STATUS] Download of the skims" +# last WSkim version +git-cms-addpkg DataFormats/EgammaCandidates +git clone https://github.com/cms-cvs-history/DPGAnalysis-Skims DPGAnalysis/Skims +cd DPGAnalysis/Skims/ +git checkout DPGAnalysis-Skims-V01-00-07 +cd - + +######################################################################################### +echo "[STATUS] Patch GsfElectrons for ECALELF rereco" +sed -i 's|[/]*assert|////assert|' DataFormats/EgammaCandidates/src/GsfElectron.cc + +######################################################################################### +echo "[STATUS] Download ECALELF directory" +myDir=Calibration +if [ ! -d "$myDir" ];then + git clone https://github.com/rgerosa/ECALELF $myDir # + #git clone git://github.com/ECALELFS/ECALELF.git Calibration # read-only mode +fi +cd $myDir + +cd ALCARAW_RECO/ + +### if you are not Shervin download this to have some useful scripts +if [ "$USER" != "shervin" ];then +svn co svn+ssh://svn.cern.ch/reps/analysis/trunk/bin bin +# Please be sure to add this directory to you default PATH variable +# for bash +#PATH=$PATH:$CMSSW_BASE/src/calibration/ALCARAW_RECO/bin +# for tcsh +#setenv PATH $PATH":$CMSSW_BASE/src//calibration/SANDBOX/bin" # (I think) +### +echo "[WARNING] Remember to do this after all cmsenv:" +echo "# for bash +PATH=$PATH:$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin +# for tcsh +setenv PATH $PATH\":$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin\" +" + + cd EgammaAnalysis/ElectronTools/data/ + cat download.url | xargs wget + cd - +fi + +cd $CMSSW_BASE/src + +#Other package to download: +# - Last stable pattuple code: +case $CMSSW_VERSION in + CMSSW_5_*) + #addpkg PhysicsTools/PatAlgos V08-10-05 >> setup.log +###### - Electron regression 5_3_X + git clone https://github.com/cms-cvs-history/DataFormats-PatCandidates DataFormats/PatCandidates >> setup.log || exit 1 + cd DataFormats/PatCandidates >> setup.log || exit 1 + git checkout DataFormats-PatCandidates-V06-05-06-10 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/PhysicsTools-PatAlgos PhysicsTools/PatAlgos >> setup.log || exit 1 + cd PhysicsTools/PatAlgos >> setup.log || exit 1 + git checkout PhysicsTools-PatAlgos-V08-09-56 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/PhysicsTools-PatUtils PhysicsTools/PatUtils >> setup.log || exit 1 + cd PhysicsTools/PatUtils >> setup.log || exit 1 + git checkout PhysicsTools-PatUtils-V03-09-28 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/DataFormats-CaloRecHit DataFormats/CaloRecHit >> setup.log || exit 1 + cd DataFormats/CaloRecHit >> setup.log || exit 1 + git checkout DataFormats-CaloRecHit-V02-05-11 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/DataFormats-StdDictionaries DataFormats/StdDictionaries >> setup.log || exit 1 + cd DataFormats/StdDictionaries >> setup.log || exit 1 + git checkout DataFormats-StdDictionaries-V00-02-14 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/FWCore-GuiBrowsers FWCore/GuiBrowsers >> setup.log || exit 1 + cd FWCore/GuiBrowsers >> setup.log || exit 1 + git checkout FWCore-GuiBrowsers-V00-00-70 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/RecoMET-METProducers RecoMET/METProducers >> setup.log || exit 1 + cd RecoMET/METProducers >> setup.log || exit 1 + git checkout RecoMET-METProducers-V03-03-12-02 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/RecoEgamma-EgammaTools RecoEgamma/EgammaTools >> setup.log || exit 1 + cd RecoEgamma/EgammaTools >> setup.log || exit 1 + git checkout RecoEgamma-EgammaTools-V09-00-01 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-analysis/EgammaAnalysis-ElectronTools EgammaAnalysis/ElectronTools >> setup.log || exit 1 + cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 + git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 + + cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 + cat download.url | xargs wget >> setup.log || exit 1 + cd - >> setup.log || exit 1 +###### - Regression from Josh 5_3_X + #checkdeps -a + + echo "[STATUS] applying patch for CMSSW_5_X" + sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + + + if [ ! -e "$CMSSW_BASE/src/RecoEcal/EgammaCoreTools" ];then + git-cms-addpkg RecoEcal/EgammaCoreTools >> setup.log || exit 1 + fi + if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then + patch -p0 < $myDir/ALCARAW_RECO/test/clusterLazyTools.patch >> setup.log || exit 1 + fi + patch -p0 < $myDir/ALCARAW_RECO/test/class_def.xml.patch >> setup.log || exit 1 + + cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 + + + ;; +esac + + + +# compile +scram b -j8 + +for file in `find -name '*.url'`; + do + if [ "`basename $file`" == "copy.url" ];then + #echo $file; + for cpFile in `cat $file`; + do + cp -u $cpFile `dirname $file`; + done; + fi; + if [ "`basename $file`" == "download.url" ];then + echo $file; + for cpFile in `cat $file`; + do + cvs co -l -d `dirname $file` $cpFile + done; + fi; + +done + +####--------> Each time you set your environment! +#PATH=$PATH:$CMSSW_BASE/$myDir/ALCARAW_RECO/bin +#Previous command MUST be executed every time you log in + From 6a63074244fa05ee34306cbb11ef1092959abc51 Mon Sep 17 00:00:00 2001 From: chiara la licata Date: Mon, 16 Dec 2013 22:25:38 +0100 Subject: [PATCH 215/475] config files for rereco production --- .../config/reRecoTags/Cal_Aug_IC5x5Zee.py | 16 ++++++++++ .../config/reRecoTags/Cal_Aug_ref2012.py | 16 ++++++++++ .../reRecoTags/Cal_Dic2013_ICpiZero_v1.py | 28 +++++++++++++++++ .../config/reRecoTags/Cal_Dic2013_ZeeIC_v1.py | 16 ++++++++++ .../reRecoTags/Cal_Dic2013_ZeeIC_v1_test.py | 16 ++++++++++ .../config/reRecoTags/Cal_Dic2013_ZeeIC_v2.py | 16 ++++++++++ .../config/reRecoTags/Cal_Dic2013_ZeeIC_v3.py | 16 ++++++++++ .../config/reRecoTags/Cal_Jul_BLaser.py | 29 +++++++++++++++++ .../config/reRecoTags/Cal_Jul_GLaser.py | 29 +++++++++++++++++ .../reRecoTags/Cal_Nov2013_ICpiZero_v1.py | 28 +++++++++++++++++ .../reRecoTags/Cal_Nov2013_ICpiZero_v2.py | 28 +++++++++++++++++ .../reRecoTags/Cal_Nov2013_ICpiZero_v3.py | 28 +++++++++++++++++ .../reRecoTags/Cal_Nov2013_ICpiZero_v4.py | 28 +++++++++++++++++ .../config/reRecoTags/Cal_Nov_Alpha_v1.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Nov_GLaser_v1.py | 28 +++++++++++++++++ .../config/reRecoTags/Cal_Nov_GLaser_v2.py | 20 ++++++++++++ .../config/reRecoTags/Cal_Nov_GLaser_v3.py | 28 +++++++++++++++++ .../config/reRecoTags/Cal_Nov_GLaser_v4.py | 20 ++++++++++++ .../reRecoTags/Cal_Nov_LaserAlpha_v1.py | 28 +++++++++++++++++ .../reRecoTags/Cal_Nov_LaserAlpha_v2.py | 28 +++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_Ref.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v1.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v2.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v3.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v4.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v5.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v6.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v7.py | 31 +++++++++++++++++++ .../config/reRecoTags/Cal_Oct_Alpha_v8.py | 31 +++++++++++++++++++ 29 files changed, 756 insertions(+) create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Aug_IC5x5Zee.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Aug_ref2012.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ICpiZero_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_test.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v2.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v3.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Jul_BLaser.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Jul_GLaser.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v2.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v3.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v4.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov_Alpha_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v2.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v3.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v4.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v2.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_Ref.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v2.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v3.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v4.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v5.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v6.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v7.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v8.py diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Aug_IC5x5Zee.py b/ALCARAW_RECO/config/reRecoTags/Cal_Aug_IC5x5Zee.py new file mode 100644 index 00000000000..ce3f281632c --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Aug_IC5x5Zee.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20130808_2012ABCD_offline_5x5Zee'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Aug_ref2012.py b/ALCARAW_RECO/config/reRecoTags/Cal_Aug_ref2012.py new file mode 100644 index 00000000000..fe915680ed4 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Aug_ref2012.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( ), + #cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + # tag = cms.string('EcalIntercalibConstants_V20130808_2012ABCD_offline_5x5Zee'), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ) + #), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ICpiZero_v1.py new file mode 100644 index 00000000000..95a0270e3a4 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ICpiZero_v1.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +#### Please fill with comments +# Basic tag combination for 2012 end year seminar conditions +# Laser, alpha tags are fixed: no time to improve them +# A set of IC are derived on top of them and will be tested: +# Cal_Nov2012_ICpiZero_v1: +# description +# + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string('EcalLaserAPDPNRatios_20130130_447_p1_v2'), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + ,cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20131118_2012C_Pi0_Eta_Comb_EProFixed_ScaleHR9ABC'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1.py new file mode 100644 index 00000000000..b947aee5367 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20130808_2012ABCD_offline_1XTALZee'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_test.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_test.py new file mode 100644 index 00000000000..b947aee5367 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_test.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20130808_2012ABCD_offline_1XTALZee'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v2.py new file mode 100644 index 00000000000..24ee7424ecd --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v2.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20130808_2012ABCD_offline_EtaScRDMC'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v3.py new file mode 100644 index 00000000000..3fc7fff4b1b --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v3.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20130808_2012ABCD_offline_1XTALZee_EtaScRDMC'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Jul_BLaser.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jul_BLaser.py new file mode 100644 index 00000000000..d62babe91e8 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Jul_BLaser.py @@ -0,0 +1,29 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string("EcalLaserAPDPNRatios_20130130_447_p1_v2"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + # , cms.PSet( + # record = cms.string('EcalLaserAlphasRcd'), + # tag = cms.string('EcalLaserAlphas_test_prompt'), + # connect = cms.untracked.string('frontier://FrontierProd/CMS_COND_31X_ECAL') + # ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Jul_GLaser.py b/ALCARAW_RECO/config/reRecoTags/Cal_Jul_GLaser.py new file mode 100644 index 00000000000..5d3566ea12d --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Jul_GLaser.py @@ -0,0 +1,29 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string("EcalLaserAPDPNRatios_20130606_527_p1_v0"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + # , cms.PSet( + # record = cms.string('EcalLaserAlphasRcd'), + # tag = cms.string('EcalLaserAlphas_test_prompt'), + # connect = cms.untracked.string('frontier://FrontierProd/CMS_COND_31X_ECAL') + # ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v1.py new file mode 100644 index 00000000000..c48d6254d76 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v1.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +#### Please fill with comments +# Basic tag combination for 2012 end year seminar conditions +# Laser, alpha tags are fixed: no time to improve them +# A set of IC are derived on top of them and will be tested: +# Cal_Nov2012_ICpiZero_v1: +# description +# + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string('EcalLaserAPDPNRatios_20130130_447_p1_v2'), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + ,cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20131118_2012C_PI0_EcalPro_CaltCC_ScaleHR9ABC'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v2.py new file mode 100644 index 00000000000..6daf596aad0 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v2.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +#### Please fill with comments +# Basic tag combination for 2012 end year seminar conditions +# Laser, alpha tags are fixed: no time to improve them +# A set of IC are derived on top of them and will be tested: +# Cal_Nov2012_ICpiZero_v1: +# description +# + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string('EcalLaserAPDPNRatios_20130130_447_p1_v2'), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + ,cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20131118_2012C_PI0_EcalPro_ScaleHR9ABC'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v3.py new file mode 100644 index 00000000000..f3e132e164e --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v3.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +#### Please fill with comments +# Basic tag combination for 2012 end year seminar conditions +# Laser, alpha tags are fixed: no time to improve them +# A set of IC are derived on top of them and will be tested: +# Cal_Nov2012_ICpiZero_v1: +# description +# + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string('EcalLaserAPDPNRatios_20130130_447_p1_v2'), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + ,cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20131118_2012C_Pi0_Eta_Comb_EcalPro_ScaleHR9ABC'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v4.py new file mode 100644 index 00000000000..2c7887802fc --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov2013_ICpiZero_v4.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +#### Please fill with comments +# Basic tag combination for 2012 end year seminar conditions +# Laser, alpha tags are fixed: no time to improve them +# A set of IC are derived on top of them and will be tested: +# Cal_Nov2012_ICpiZero_v1: +# description +# + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string('EcalLaserAPDPNRatios_20130130_447_p1_v2'), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + ,cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20131118_2012C_Pi0_Eta_Comb_Calt_ScaleHR9ABC'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov_Alpha_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_Alpha_v1.py new file mode 100644 index 00000000000..31896d7768d --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_Alpha_v1.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J1_52_25_NOTC_v3'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v1.py new file mode 100644 index 00000000000..ccb23b800f7 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v1.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string("EcalLaserAPDPNRatios_20130606_527_p1_v0"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ), + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20131117_2012BCD_GL_TEST"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalLaserAlphasRcd"), + tag = cms.string("EcalLaserAlphas_EB_185_EE_sic1_btcp116"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v2.py new file mode 100644 index 00000000000..9cba4a27d94 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v2.py @@ -0,0 +1,20 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20131117_2012BCD_BL_TESTREF"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v3.py new file mode 100644 index 00000000000..e29ecc85faa --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v3.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string("EcalLaserAPDPNRatios_20130606_527_p1_v0"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ), + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20131117_2012BCD_ESCorr_GL_TEST"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalLaserAlphasRcd"), + tag = cms.string("EcalLaserAlphas_EB_185_EE_sic1_btcp116"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v4.py new file mode 100644 index 00000000000..b4cfb1f836d --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_GLaser_v4.py @@ -0,0 +1,20 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20131117_2012BCD_ESCorr_BL_TESTREF"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v1.py new file mode 100644 index 00000000000..2c1f118d0ce --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v1.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string("EcalLaserAPDPNRatios_20130606_527_p1_v0"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + ,cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_185_EE_sic1_btcp116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v2.py new file mode 100644 index 00000000000..9bdf635bf26 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Nov_LaserAlpha_v2.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + ,cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + tag = cms.string("EcalLaserAPDPNRatios_20130606_527_p1_v0"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") + ) + ,cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_EoPGreen_EE_116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_Ref.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_Ref.py new file mode 100644 index 00000000000..8e75957f156 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_Ref.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ) + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + #cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + # tag = cms.string('EcalLaserAlphas_EB_J100_EE_116'), + # connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + # ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v1.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v1.py new file mode 100644 index 00000000000..b011f9b6f33 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v1.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J100_EE_116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v2.py new file mode 100644 index 00000000000..62e6d378493 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v2.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J50_EE_116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v3.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v3.py new file mode 100644 index 00000000000..03640aae54a --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v3.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J1_52_200_EE_J'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v4.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v4.py new file mode 100644 index 00000000000..f6c6f704a7e --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v4.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J1_52_COMBINED_EE_116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v5.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v5.py new file mode 100644 index 00000000000..ded59cbb795 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v5.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J1_52_MEAN'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v6.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v6.py new file mode 100644 index 00000000000..8e192a3fc08 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v6.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J1_52_100_EE_116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v7.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v7.py new file mode 100644 index 00000000000..e4c3baae709 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v7.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J1_52_25_EE_116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v8.py b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v8.py new file mode 100644 index 00000000000..d3365bc9eea --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Oct_Alpha_v8.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + # globaltag = cms.string('UNSPECIFIED::All'), + globaltag = cms.string('FT_R_53_V21::All'), + #toGet = cms.VPSet( ), # hook to override or add single payloads + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + cms.PSet(record = cms.string("EcalADCToGeVConstantRcd"), + tag = cms.string("EcalADCToGeVConstant_Bon_2012firstIOV"), + connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_31X_ECAL") + ), + #cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), + # tag = cms.string("EcalLaserAPDPNRatios_data_20120131_158851_183320"), + # connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + # ), + # + cms.PSet(record = cms.string('EcalLaserAlphasRcd'), + tag = cms.string('EcalLaserAlphas_EB_J1_52_50_EE_116'), + connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) From d3f096129702b031f1a86b33734b8e571d17572d Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 17 Dec 2013 16:17:11 +0100 Subject: [PATCH 216/475] fixed checkout in new setup --- README.md | 7 +++---- setup_git.sh | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fa59b82d64e..934c82bbb5e 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,10 @@ Testing ====== Download instructions. -`cp ~shervin/public/setup-devel-42X_44X_53X.sh .` +`wget https://raw.github.com/ECALELFS/ECALELF/merge-gerosa-condor/setup_git.sh` +`chmod +x setup_git.sh` -`chmod +x setup-devel-42X_44X_53X.sh` - -`./setup-devel-42X_44X_53X.sh CMSSW_5_3_7_patch6` +`./setup_git.sh CMSSW_5_3_7_patch6` `cd CMSSW_5_3_7_patch6/src/` diff --git a/setup_git.sh b/setup_git.sh index 532453e2f34..152323fefea 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -51,8 +51,9 @@ sed -i 's|[/]*assert|////assert|' DataFormats/EgammaCandidates/src/GsfElectron.c echo "[STATUS] Download ECALELF directory" myDir=Calibration if [ ! -d "$myDir" ];then - git clone https://github.com/rgerosa/ECALELF $myDir # - #git clone git://github.com/ECALELFS/ECALELF.git Calibration # read-only mode + #git clone https://github.com/ECALELFS/ECALELF $myDir # + git clone git://github.com/ECALELFS/ECALELF.git $myDir # read-only mode + git checkout merge-gerosa-condor fi cd $myDir @@ -60,7 +61,7 @@ cd ALCARAW_RECO/ ### if you are not Shervin download this to have some useful scripts if [ "$USER" != "shervin" ];then -svn co svn+ssh://svn.cern.ch/reps/analysis/trunk/bin bin +git clone git@github.com:ECALELFS/Utilities.git bin # Please be sure to add this directory to you default PATH variable # for bash #PATH=$PATH:$CMSSW_BASE/src/calibration/ALCARAW_RECO/bin From 2e96318d1ef3ee9951eabe44cfb4bde1a4f61d25 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 18 Dec 2013 15:09:37 +0100 Subject: [PATCH 217/475] energy deposits for isolation fixed(?) --- .../python/eleselectionproducers_cfi.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py index ddd02a3b369..5503711bed8 100644 --- a/EleSelectionProducers/python/eleselectionproducers_cfi.py +++ b/EleSelectionProducers/python/eleselectionproducers_cfi.py @@ -8,12 +8,11 @@ vertexCollection = cms.InputTag('offlinePrimaryVertices'), conversionCollection = cms.InputTag('allConversions'), BeamSpotCollection = cms.InputTag('offlineBeamSpot'), -# chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), -# emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), -# nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso') - chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), - emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), - nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdGsf') - + chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), + emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), + nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso') + # chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), + # emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), + # nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdGsf') ) From 0a46e96bb6ca8c23026265653be6fa5f5163ddcb Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 18 Dec 2013 16:05:25 +0100 Subject: [PATCH 218/475] updating documentation for rereco --- ALCARAW_RECO/doc/README | 5 +++ ALCARAW_RECO/doc/rereco.txt | 68 +++++++++++++++++++++++++++++++------ README | 2 ++ fulldoc | 4 +-- 4 files changed, 66 insertions(+), 13 deletions(-) diff --git a/ALCARAW_RECO/doc/README b/ALCARAW_RECO/doc/README index 8b4268a1a7a..0e450488fdf 100644 --- a/ALCARAW_RECO/doc/README +++ b/ALCARAW_RECO/doc/README @@ -1,3 +1,6 @@ +/** +* \page page2 Ciao +* \verbatim Testing the alcaraw + alcareco production cmsRun ALCARAW_RECO/python/alcaSkimming.py files=file://../../../B292A7F8-3A7F-E111-A1A5-001D09F29114.root maxEvents=6 &> log2.log @@ -103,3 +106,5 @@ svn ci -m "rereco tag_name done" +\endverbatim +*/ diff --git a/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt index 0f21dbbc8f9..d6e86b2b8e1 100644 --- a/ALCARAW_RECO/doc/rereco.txt +++ b/ALCARAW_RECO/doc/rereco.txt @@ -1,20 +1,64 @@ +/** +* \page page5 Instructions for ECAL validator (rereco + ntuple production) +* \verbatim #============================== RERECO +The ReReco and the ntuple production can be run with the script +ALCARAW_RECO/scripts/RerecoQuick.sh +from the directory ALCARAW_RECO + + +####### Input files +1. ALCARAW_RECO/config/reRecoTags/tag_name.py: + is the file where the GT and the list of tags + to be used for the rereco and the ntuple production + have to be specified. + "tag_name" is the name that will be automatically + assigned to all the directories created for the rereco + and the ntuples (the crab directory in + ALCARAW_RECO/prod_alcarereco + and the directories in eos with the reco files and the ntuples) +2. alcaraw_datasets.dat is the file with the list of the available alcaraw files + + +####### Output files +1. alcarereco_datasets.dat is the file with the list of all the + rerecos already done +2. ntuple_datasets.dat is the file with the list of all the ntuples + already produced + These two files are updated automatically with a line that summarizes + all the relevant information about the rereco/ntuples (run range, + dataset name, alcaraw name, storage_element, user_remote_dir_base, + tag_name and, for ntuples, if they are produced from alcareco or + alcarecosim and ...) when the script RerecoQuick.sh is launched +3. The rereco files produced are stored in + /eos/cms/store/group/alca_ecalcalib/ecalelf/alcarereco/8TeV/tag_name +4. The final merged ntuple is stored in: + /eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARERECO/tag_name/ + + Instructions: 1. create the tag_name.py in ALCARAW_RECO/config/reRecoTags directory Se more detailes below, in section "TAG FILE" -2. commit the file in svn: -svn add config/reRecoTags/tag_name.py -svn ci -m "...." config/reRecoTags/tag_name.py +2. commit the file in GITHUB: +git add config/reRecoTags/tag_name.py +git commit -m "...." config/reRecoTags/tag_name.py -3. Define the period in alcaraw_datasets.dat if not already defined (e.g. RUN2012AB) +3. Add the period on which the ReReco has to be run in + alcaraw_datasets.dat, if not already defined (e.g. RUN2012AB) -4. run the script RerecoQuick.sh giving two parameters: period and tag_name -./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion} +4. Run the script RerecoQuick.sh + ./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion} + where: + - config/reRecoTags/tag_name.py is the configuration file defined in step1 + - jsonFile.txt is the version of the json file to be used + - json_name is the name that ECALELF gives to the json file used for the ntuple production. For example: - ./scripts/RerecoQuick.sh -p RUN2012A -t config/reRecoTags/Cal_Dic2012_AlphaComb_v2.py --json=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt --json_name=190456-208686_22Jan_v1 --tutorial +./scripts/RerecoQuick.sh -p RUN2012ABCD -t config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo_b.py --json=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt --json_name=190456-208686_22JanReReco_v1 --tutorial + +The files alcarereco_datasets.dat and ntuple_datasets.dat ae updated when this script is launched 5. check the exit status of the jobs: ./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion} --check @@ -24,12 +68,12 @@ For example: If jobs are finished, it merge all the produced ntuples and copy them to the right directory on EOS 6. if all fine, commit the alcarereco_datasets.dat and ntuple_datasets.dat files -svn status -u -svn update -svn ci -m "rereco tag_name done" - +git pull +git commit -m "rereco tag_name done" alcarereco_datasets.dat ntuple_datasets.dat +##### Script options: +--singleEle : to rereco also single electron datasets #============================== TAG FILES To run the Rereco with a new set of conditions it is necessary to have a configuration file with the tags. @@ -78,3 +122,5 @@ The convention is to name these configuration files in this way: tag_name.py So, for the rereco production follow the steps below: +\endverbatim +*/ diff --git a/README b/README index fd8e040e74a..b3422709c16 100644 --- a/README +++ b/README @@ -3,6 +3,8 @@ * Introduction: \ref page1 * * Working with ntuples: \ref page4 +* +* Instructions for ECAL validator (rereco + ntuple production): \ref page5 */ /** * \page page1 Code instructions and explanations diff --git a/fulldoc b/fulldoc index 4a798ed0c34..ad9ef47435f 100644 --- a/fulldoc +++ b/fulldoc @@ -459,7 +459,7 @@ WARN_LOGFILE = fulldoc-warn.log # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ZNtupleDumper ZFitter ./ +INPUT = ZNtupleDumper ZFitter ./ ALCARAW_RECO/doc/rereco.txt # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -468,7 +468,7 @@ INPUT = ZNtupleDumper ZFitter ./ # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py -FILE_PATTERNS = *.hh *.cc *.cpp README *_cfi.py *_cff.py +FILE_PATTERNS = *.hh *.cc *.cpp README *_cfi.py *_cff.py *.txt # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. From 52a437e6aa1e8f3b22ffb6c9cb44553b086ead90 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 15 Jan 2014 10:18:40 +0100 Subject: [PATCH 219/475] fixed branch to be used as default: master --- README.md | 3 +- setup_git.sh | 96 ++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 83 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 934c82bbb5e..a2080b2842f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ Testing ====== Download instructions. -`wget https://raw.github.com/ECALELFS/ECALELF/merge-gerosa-condor/setup_git.sh` +`wget https://raw.github.com/ECALELFS/ECALELF/master/setup_git.sh` + `chmod +x setup_git.sh` `./setup_git.sh CMSSW_5_3_7_patch6` diff --git a/setup_git.sh b/setup_git.sh index 152323fefea..f9be1ee4199 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -5,6 +5,9 @@ checkVERSION(){ CMSSW_5_3_7_patch6) echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" ;; + CMSSSW_7_0_0_*) + echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" + ;; *) echo "[ERROR] Sorry, $CMSSW_VERSION not configured for ECALELF" echo " Be sure that you don't want 4_2_8_patch7 or CMSSW_4_4_5_patch2 or 5_3_7_patch5 or CMSSW_6_1_*" @@ -37,10 +40,10 @@ cd $CMSSW_BASE/src ######################################################################################### echo "[STATUS] Download of the skims" # last WSkim version -git-cms-addpkg DataFormats/EgammaCandidates -git clone https://github.com/cms-cvs-history/DPGAnalysis-Skims DPGAnalysis/Skims +git-cms-addpkg DataFormats/EgammaCandidates >> setup.log || exit 1 +git clone https://github.com/cms-cvs-history/DPGAnalysis-Skims DPGAnalysis/Skims >> setup.log || exit 1 cd DPGAnalysis/Skims/ -git checkout DPGAnalysis-Skims-V01-00-07 +git checkout DPGAnalysis-Skims-V01-00-07 >> setup.log || exit 1 cd - ######################################################################################### @@ -52,8 +55,8 @@ echo "[STATUS] Download ECALELF directory" myDir=Calibration if [ ! -d "$myDir" ];then #git clone https://github.com/ECALELFS/ECALELF $myDir # - git clone git://github.com/ECALELFS/ECALELF.git $myDir # read-only mode - git checkout merge-gerosa-condor + git clone git://github.com/ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + #git checkout merge-gerosa-condor fi cd $myDir @@ -68,18 +71,18 @@ git clone git@github.com:ECALELFS/Utilities.git bin # for tcsh #setenv PATH $PATH":$CMSSW_BASE/src//calibration/SANDBOX/bin" # (I think) ### -echo "[WARNING] Remember to do this after all cmsenv:" -echo "# for bash -PATH=$PATH:$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin -# for tcsh -setenv PATH $PATH\":$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin\" -" - - cd EgammaAnalysis/ElectronTools/data/ - cat download.url | xargs wget - cd - +#echo "[WARNING] Remember to do this after all cmsenv:" +#echo "# for bash +#PATH=$PATH:$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin +## for tcsh +#setenv PATH $PATH\":$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin\" +#" fi +#cd EgammaAnalysis/ElectronTools/data/ +#cat download.url | xargs wget +#cd - + cd $CMSSW_BASE/src #Other package to download: @@ -148,6 +151,69 @@ case $CMSSW_VERSION in ;; + CMSSW_7_*) + #addpkg PhysicsTools/PatAlgos V08-10-05 >> setup.log +###### - Electron regression 5_3_X + git clone https://github.com/cms-cvs-history/DataFormats-PatCandidates DataFormats/PatCandidates >> setup.log || exit 1 + cd DataFormats/PatCandidates >> setup.log || exit 1 + git checkout DataFormats-PatCandidates-V06-05-06-10 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/PhysicsTools-PatAlgos PhysicsTools/PatAlgos >> setup.log || exit 1 + cd PhysicsTools/PatAlgos >> setup.log || exit 1 + git checkout PhysicsTools-PatAlgos-V08-09-56 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/PhysicsTools-PatUtils PhysicsTools/PatUtils >> setup.log || exit 1 + cd PhysicsTools/PatUtils >> setup.log || exit 1 + git checkout PhysicsTools-PatUtils-V03-09-28 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/DataFormats-CaloRecHit DataFormats/CaloRecHit >> setup.log || exit 1 + cd DataFormats/CaloRecHit >> setup.log || exit 1 + git checkout DataFormats-CaloRecHit-V02-05-11 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/DataFormats-StdDictionaries DataFormats/StdDictionaries >> setup.log || exit 1 + cd DataFormats/StdDictionaries >> setup.log || exit 1 + git checkout DataFormats-StdDictionaries-V00-02-14 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/FWCore-GuiBrowsers FWCore/GuiBrowsers >> setup.log || exit 1 + cd FWCore/GuiBrowsers >> setup.log || exit 1 + git checkout FWCore-GuiBrowsers-V00-00-70 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/RecoMET-METProducers RecoMET/METProducers >> setup.log || exit 1 + cd RecoMET/METProducers >> setup.log || exit 1 + git checkout RecoMET-METProducers-V03-03-12-02 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-cvs-history/RecoEgamma-EgammaTools RecoEgamma/EgammaTools >> setup.log || exit 1 + cd RecoEgamma/EgammaTools >> setup.log || exit 1 + git checkout RecoEgamma-EgammaTools-V09-00-01 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + git clone https://github.com/cms-analysis/EgammaAnalysis-ElectronTools EgammaAnalysis/ElectronTools >> setup.log || exit 1 + cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 + git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 + cd - >> setup.log || exit 1 + patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 + + cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 + cat download.url | xargs wget >> setup.log || exit 1 + cd - >> setup.log || exit 1 +###### - Regression from Josh 5_3_X + #checkdeps -a + + echo "[STATUS] applying patch for CMSSW_5_X" + sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + + + if [ ! -e "$CMSSW_BASE/src/RecoEcal/EgammaCoreTools" ];then + git-cms-addpkg RecoEcal/EgammaCoreTools >> setup.log || exit 1 + fi + if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then + patch -p0 < $myDir/ALCARAW_RECO/test/clusterLazyTools.patch >> setup.log || exit 1 + fi + patch -p0 < $myDir/ALCARAW_RECO/test/class_def.xml.patch >> setup.log || exit 1 + + cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 + + + esac From 5aa795dc1b60b71b2951d09016fdbe8b0f96e18c Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 15 Jan 2014 10:26:22 +0100 Subject: [PATCH 220/475] fixed git address --- setup_git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_git.sh b/setup_git.sh index f9be1ee4199..c2a34f97491 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -55,7 +55,7 @@ echo "[STATUS] Download ECALELF directory" myDir=Calibration if [ ! -d "$myDir" ];then #git clone https://github.com/ECALELFS/ECALELF $myDir # - git clone git://github.com/ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + git clone git@github.com:ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode #git checkout merge-gerosa-condor fi cd $myDir From a284d5bfa90deae6a77db7c6c970055e0d425ec2 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 15 Jan 2014 11:12:31 +0100 Subject: [PATCH 221/475] fixes to compile with scram also the ZFitter directory --- ZFitter/src/RooSmearer.cc | 2 +- ZFitter/src/nllProfile.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 9a11254760a..008d273e917 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -768,7 +768,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ TH1F *data = GetSmearedHisto(category, false, _isDataSmeared, false, false); ///-----> not need to repeate! for(category.nLLtoy=1; category.nLLtoy < 2; category.nLLtoy+=2){ - for(category.nSmearToy; category.nSmearToy <= nSmearToyLim && stdDev> stdDevLim; category.nSmearToy*=2){ + for(; category.nSmearToy <= nSmearToyLim && stdDev> stdDevLim; category.nSmearToy*=2){ double sum=0, sum2=0; TStopwatch cl; cl.Start(); diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index d51b5b3eae8..2754f0652c9 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -51,6 +51,9 @@ #include +#include "../interface/RooSmearer.hh" + + #define FIT_LIMIT 0.01 #define ITER_MAX 20 //#define DEBUG From 8627aa07b889f266a3dae033c2e32bc0736e07bc Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 15 Jan 2014 11:13:07 +0100 Subject: [PATCH 222/475] setup script with anonym access to git --- setup_git.sh | 55 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index c2a34f97491..d272ec9cd98 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -40,7 +40,7 @@ cd $CMSSW_BASE/src ######################################################################################### echo "[STATUS] Download of the skims" # last WSkim version -git-cms-addpkg DataFormats/EgammaCandidates >> setup.log || exit 1 +git-cms-addpkg DataFormats/EgammaCandidates #>> setup.log || exit 1 git clone https://github.com/cms-cvs-history/DPGAnalysis-Skims DPGAnalysis/Skims >> setup.log || exit 1 cd DPGAnalysis/Skims/ git checkout DPGAnalysis-Skims-V01-00-07 >> setup.log || exit 1 @@ -54,8 +54,11 @@ sed -i 's|[/]*assert|////assert|' DataFormats/EgammaCandidates/src/GsfElectron.c echo "[STATUS] Download ECALELF directory" myDir=Calibration if [ ! -d "$myDir" ];then - #git clone https://github.com/ECALELFS/ECALELF $myDir # - git clone git@github.com:ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + if [ "$USER" != "shervin" ];then + git clone https://github.com/ECALELFS/ECALELF $myDir >> setup.log || exit 1 # read-only mode + else + git clone git@github.com:ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + fi #git checkout merge-gerosa-condor fi cd $myDir @@ -64,7 +67,7 @@ cd ALCARAW_RECO/ ### if you are not Shervin download this to have some useful scripts if [ "$USER" != "shervin" ];then -git clone git@github.com:ECALELFS/Utilities.git bin +git clone https://github.com/ECALELFS/Utilities.git bin # Please be sure to add this directory to you default PATH variable # for bash #PATH=$PATH:$CMSSW_BASE/src/calibration/ALCARAW_RECO/bin @@ -132,8 +135,14 @@ case $CMSSW_VERSION in cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 cat download.url | xargs wget >> setup.log || exit 1 cd - >> setup.log || exit 1 -###### - Regression from Josh 5_3_X - #checkdeps -a +###### New Josh regression + mkdir HiggsAnalysis/ + cd HiggsAnalysis/ + git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihood.git +# git clone -b CMSSW53X git@github.com:bendavid/GBRLikelihood.git + git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihoodEGTools.git + cd - + mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ echo "[STATUS] applying patch for CMSSW_5_X" sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc @@ -221,24 +230,24 @@ esac # compile scram b -j8 -for file in `find -name '*.url'`; - do - if [ "`basename $file`" == "copy.url" ];then - #echo $file; - for cpFile in `cat $file`; - do - cp -u $cpFile `dirname $file`; - done; - fi; - if [ "`basename $file`" == "download.url" ];then - echo $file; - for cpFile in `cat $file`; - do - cvs co -l -d `dirname $file` $cpFile - done; - fi; +# for file in `find -name '*.url'`; +# do +# if [ "`basename $file`" == "copy.url" ];then +# #echo $file; +# for cpFile in `cat $file`; +# do +# cp -u $cpFile `dirname $file`; +# done; +# fi; +# if [ "`basename $file`" == "download.url" ];then +# echo $file; +# for cpFile in `cat $file`; +# do +# cvs co -l -d `dirname $file` $cpFile +# done; +# fi; -done +# done ####--------> Each time you set your environment! #PATH=$PATH:$CMSSW_BASE/$myDir/ALCARAW_RECO/bin From b1225f187039e0a0cf42748a118eb78485f7ce14 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 15 Jan 2014 12:28:31 +0100 Subject: [PATCH 223/475] re-ordered initialization in constructor --- ValueMapTraslator/src/ValueMapTraslator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index 5da6785336e..652b6fa5353 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -80,9 +80,9 @@ class ValueMapTraslator : public edm::EDProducer { // ValueMapTraslator::ValueMapTraslator(const edm::ParameterSet& iConfig): referenceCollectionTAG(iConfig.getParameter("referenceCollection")), + oldreferenceCollectionTAG(iConfig.getParameter("oldreferenceCollection")), inputCollectionTAG(iConfig.getParameter("inputCollection")), - outputCollectionName(iConfig.getParameter("outputCollection")), - oldreferenceCollectionTAG(iConfig.getParameter("oldreferenceCollection")) + outputCollectionName(iConfig.getParameter("outputCollection")) { //now do what ever other initialization is needed /// \todo outputCollectionName = inputCollection+postfix From 1283711e5158bf144bdf586b6f837d1254c91c6e Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 15 Jan 2014 12:31:01 +0100 Subject: [PATCH 224/475] Josh regression installation in 7_0_X --- setup_git.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index d272ec9cd98..2052d537983 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -5,7 +5,7 @@ checkVERSION(){ CMSSW_5_3_7_patch6) echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" ;; - CMSSSW_7_0_0_*) + CMSSW_7_0_0_*) echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" ;; *) @@ -204,8 +204,16 @@ case $CMSSW_VERSION in cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 cat download.url | xargs wget >> setup.log || exit 1 cd - >> setup.log || exit 1 -###### - Regression from Josh 5_3_X - #checkdeps -a + +###### New Josh regression + mkdir HiggsAnalysis/ + cd HiggsAnalysis/ + git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihood.git +# git clone -b CMSSW53X git@github.com:bendavid/GBRLikelihood.git + git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihoodEGTools.git + cd - + mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ + echo "[STATUS] applying patch for CMSSW_5_X" sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc From 0526d63b64a9b50992b1362ed08371503c7070fb Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 16 Jan 2014 11:10:29 +0100 Subject: [PATCH 225/475] updated setup --- setup_git.sh | 91 ++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index 2052d537983..1e4424aafa2 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -41,10 +41,6 @@ cd $CMSSW_BASE/src echo "[STATUS] Download of the skims" # last WSkim version git-cms-addpkg DataFormats/EgammaCandidates #>> setup.log || exit 1 -git clone https://github.com/cms-cvs-history/DPGAnalysis-Skims DPGAnalysis/Skims >> setup.log || exit 1 -cd DPGAnalysis/Skims/ -git checkout DPGAnalysis-Skims-V01-00-07 >> setup.log || exit 1 -cd - ######################################################################################### echo "[STATUS] Patch GsfElectrons for ECALELF rereco" @@ -92,6 +88,11 @@ cd $CMSSW_BASE/src # - Last stable pattuple code: case $CMSSW_VERSION in CMSSW_5_*) + git clone https://github.com/cms-cvs-history/DPGAnalysis-Skims DPGAnalysis/Skims >> setup.log || exit 1 + cd DPGAnalysis/Skims/ + git checkout DPGAnalysis-Skims-V01-00-07 >> setup.log || exit 1 + cd - + #addpkg PhysicsTools/PatAlgos V08-10-05 >> setup.log ###### - Electron regression 5_3_X git clone https://github.com/cms-cvs-history/DataFormats-PatCandidates DataFormats/PatCandidates >> setup.log || exit 1 @@ -163,47 +164,47 @@ case $CMSSW_VERSION in CMSSW_7_*) #addpkg PhysicsTools/PatAlgos V08-10-05 >> setup.log ###### - Electron regression 5_3_X - git clone https://github.com/cms-cvs-history/DataFormats-PatCandidates DataFormats/PatCandidates >> setup.log || exit 1 - cd DataFormats/PatCandidates >> setup.log || exit 1 - git checkout DataFormats-PatCandidates-V06-05-06-10 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-cvs-history/PhysicsTools-PatAlgos PhysicsTools/PatAlgos >> setup.log || exit 1 - cd PhysicsTools/PatAlgos >> setup.log || exit 1 - git checkout PhysicsTools-PatAlgos-V08-09-56 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-cvs-history/PhysicsTools-PatUtils PhysicsTools/PatUtils >> setup.log || exit 1 - cd PhysicsTools/PatUtils >> setup.log || exit 1 - git checkout PhysicsTools-PatUtils-V03-09-28 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-cvs-history/DataFormats-CaloRecHit DataFormats/CaloRecHit >> setup.log || exit 1 - cd DataFormats/CaloRecHit >> setup.log || exit 1 - git checkout DataFormats-CaloRecHit-V02-05-11 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-cvs-history/DataFormats-StdDictionaries DataFormats/StdDictionaries >> setup.log || exit 1 - cd DataFormats/StdDictionaries >> setup.log || exit 1 - git checkout DataFormats-StdDictionaries-V00-02-14 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-cvs-history/FWCore-GuiBrowsers FWCore/GuiBrowsers >> setup.log || exit 1 - cd FWCore/GuiBrowsers >> setup.log || exit 1 - git checkout FWCore-GuiBrowsers-V00-00-70 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-cvs-history/RecoMET-METProducers RecoMET/METProducers >> setup.log || exit 1 - cd RecoMET/METProducers >> setup.log || exit 1 - git checkout RecoMET-METProducers-V03-03-12-02 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-cvs-history/RecoEgamma-EgammaTools RecoEgamma/EgammaTools >> setup.log || exit 1 - cd RecoEgamma/EgammaTools >> setup.log || exit 1 - git checkout RecoEgamma-EgammaTools-V09-00-01 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - git clone https://github.com/cms-analysis/EgammaAnalysis-ElectronTools EgammaAnalysis/ElectronTools >> setup.log || exit 1 - cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 - git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 - cd - >> setup.log || exit 1 - patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 - - cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 - cat download.url | xargs wget >> setup.log || exit 1 - cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/DataFormats-PatCandidates DataFormats/PatCandidates >> setup.log || exit 1 +# cd DataFormats/PatCandidates >> setup.log || exit 1 +# git checkout DataFormats-PatCandidates-V06-05-06-10 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/PhysicsTools-PatAlgos PhysicsTools/PatAlgos >> setup.log || exit 1 +# cd PhysicsTools/PatAlgos >> setup.log || exit 1 +# git checkout PhysicsTools-PatAlgos-V08-09-56 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/PhysicsTools-PatUtils PhysicsTools/PatUtils >> setup.log || exit 1 +# cd PhysicsTools/PatUtils >> setup.log || exit 1 +# git checkout PhysicsTools-PatUtils-V03-09-28 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/DataFormats-CaloRecHit DataFormats/CaloRecHit >> setup.log || exit 1 +# cd DataFormats/CaloRecHit >> setup.log || exit 1 +# git checkout DataFormats-CaloRecHit-V02-05-11 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/DataFormats-StdDictionaries DataFormats/StdDictionaries >> setup.log || exit 1 +# cd DataFormats/StdDictionaries >> setup.log || exit 1 +# git checkout DataFormats-StdDictionaries-V00-02-14 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/FWCore-GuiBrowsers FWCore/GuiBrowsers >> setup.log || exit 1 +# cd FWCore/GuiBrowsers >> setup.log || exit 1 +# git checkout FWCore-GuiBrowsers-V00-00-70 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/RecoMET-METProducers RecoMET/METProducers >> setup.log || exit 1 +# cd RecoMET/METProducers >> setup.log || exit 1 +# git checkout RecoMET-METProducers-V03-03-12-02 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-cvs-history/RecoEgamma-EgammaTools RecoEgamma/EgammaTools >> setup.log || exit 1 +# cd RecoEgamma/EgammaTools >> setup.log || exit 1 +# git checkout RecoEgamma-EgammaTools-V09-00-01 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# git clone https://github.com/cms-analysis/EgammaAnalysis-ElectronTools EgammaAnalysis/ElectronTools >> setup.log || exit 1 +# cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 +# git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 +# cd - >> setup.log || exit 1 +# patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 + +# cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 +# cat download.url | xargs wget >> setup.log || exit 1 +# cd - >> setup.log || exit 1 ###### New Josh regression mkdir HiggsAnalysis/ From 7cad05042f0744c960a129adb09fa8c4a48de741 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 16 Jan 2014 11:14:33 +0100 Subject: [PATCH 226/475] updated setup --- setup_git.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index 1e4424aafa2..2eedbacc9ef 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -209,9 +209,8 @@ case $CMSSW_VERSION in ###### New Josh regression mkdir HiggsAnalysis/ cd HiggsAnalysis/ - git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihood.git -# git clone -b CMSSW53X git@github.com:bendavid/GBRLikelihood.git - git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihoodEGTools.git + git clone https://github.com/bendavid/GBRLikelihood.git + git clone https://github.com/bendavid/GBRLikelihoodEGTools.git cd - mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ From 61f8aa92e868fb23d8917d9145eb635889849d63 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 16 Jan 2014 12:21:28 +0100 Subject: [PATCH 227/475] reordered variable inits and removed unused vars according to pedantic compilation messages --- ZFitter/interface/RooSmearer.hh | 4 +++- ZFitter/src/RooSmearer.cc | 9 +++++---- ZFitter/src/nllProfile.cc | 11 ++++++----- ZNtupleDumper/src/ZNtupleDumper.cc | 4 ++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index 05af9a8bdaa..13b8ee0bb0c 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -1,6 +1,8 @@ #ifndef roosmearer_hh #define roosmearer_hh +#include + #include #include #include @@ -173,7 +175,6 @@ public: inline RooDataSet *GetDataSet(void){ return dataset; } - RooDataSet *dataset; private: TChain *_data_chain, *_signal_chain; SmearingImporter importer; @@ -212,6 +213,7 @@ public: bool _autoBin; bool _autoNsmear; bool smearscan; + RooDataSet *dataset; RooStats::MarkovChain _markov; private: diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 008d273e917..7c15b0c6c28 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -741,7 +741,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ AutoNBins(category); return; // category.nSmearToy=std::max(NSMEARTOYLIM*2,200); - Long64_t catSize=category.mc_events->size(); + //Long64_t catSize=category.mc_events->size(); // if(catSize<3000){ // category.nBins=40; // ResetBinning(category); @@ -758,14 +758,15 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ //------------------------------ rescale mc histograms double stdDev=10, stdDevLim=0.3; - double min=10; int nBin_min=0; + double min=10; //int nBin_min=0; int n=0; unsigned int nSmearToyLim=1000; category.nLLtoy=1; for(int iBin=160; iBin>120; iBin/=2){ //category.nBins= iBin; //ResetBinning(category); - TH1F *data = GetSmearedHisto(category, false, _isDataSmeared, false, false); ///-----> not need to repeate! + //TH1F *data = GetSmearedHisto(category, false, _isDataSmeared, false, false); ///-----> not need to repeate! + GetSmearedHisto(category, false, _isDataSmeared, false, false); ///-----> not need to repeate! for(category.nLLtoy=1; category.nLLtoy < 2; category.nLLtoy+=2){ for(; category.nSmearToy <= nSmearToyLim && stdDev> stdDevLim; category.nSmearToy*=2){ @@ -784,7 +785,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ stdDev= sqrt(sum2 - sum*sum); if(stdDev/sum < min) { min=stdDev/sum; - nBin_min=category.nBins; + //nBin_min=category.nBins; } diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 2754f0652c9..3069a34ed2e 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -611,7 +611,7 @@ bool stopFindMin1D(Int_t i, Int_t iLocMin, Double_t chi2, Double_t min, Double_t } Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t min, RooSmearer& smearer, bool update=true, Double_t *Y=NULL, RooRealVar *var2=NULL, Double_t *X2=NULL){ - Double_t vInit=var->getVal(); + //Double_t vInit=var->getVal(); var->setVal(X[iMinStart]); float phiMin=1; if(var2!=NULL){ @@ -624,7 +624,7 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t } if(Y==NULL) exit(1); - Double_t chi2, chi2init=smearer.evaluate(), chi2old=chi2init; + Double_t chi2, chi2init=smearer.evaluate(); //, chi2old=chi2init; Double_t locmin=1e20; Int_t iLocMin=iMinStart; @@ -649,7 +649,7 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t } if(stopFindMin1D(i,iLocMin, chi2, min, locmin, phiMin)) break; - chi2old=chi2; + //chi2old=chi2; if(i==iLocMin && i-iMinStart==3 && Y[iMinStart]==Y[iMinStart+1] && Y[iMinStart]==Y[iMinStart+2] && Y[iMinStart]==Y[iMinStart+3]){ std::cerr << "[WARNING] No sensitivity to variable: " << var->GetName() << std::endl; std::cerr << " Variable changed to constant" << std::endl; @@ -683,7 +683,7 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t } if(stopFindMin1D(i,iLocMin, chi2, min, locmin, phiMin)) break; - chi2old=chi2; + //chi2old=chi2; } if(Y!=NULL){ //take the mean! @@ -870,7 +870,8 @@ bool MinProfile2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int i Int_t iBin1max= std::min(iBin1+6,G1->GetN()); Int_t iBin2max= std::min(iBin2+6,G1->GetN()); - Int_t iBin1_ = iBin1, iBin2_=iBin2, iBinM=(int)(sqrt(iBin1*iBin1+iBin2*iBin2)); + //Int_t iBin1_ = iBin1, iBin2_=iBin2, + Int_t iBinM=(int)(sqrt(iBin1*iBin1+iBin2*iBin2)); iBin1min=0; iBin1max=G1->GetN(); diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 8179482c9f2..f2efbf6d11a 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -403,10 +403,10 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): conversionsProducerTAG(iConfig.getParameter("conversionCollection")), metTAG(iConfig.getParameter("metCollection")), triggerResultsTAG(iConfig.getParameter("triggerResultsCollection")), + hltPaths(iConfig.getParameter< std::vector >("hltPaths")), foutName(iConfig.getParameter("foutName")), doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), - doEleIDTree(iConfig.getParameter("doEleIDTree")), - hltPaths(iConfig.getParameter< std::vector >("hltPaths")) + doEleIDTree(iConfig.getParameter("doEleIDTree")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), //puWeightFile(iConfig.getParameter("puWeightFile")), //puWeights() From 4bfb70a58e2d451db7922b6bf942af0e7ea97b7a Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 16 Jan 2014 12:25:35 +0100 Subject: [PATCH 228/475] added 22Jan rereco GT for alcarereco --- ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013.py diff --git a/ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013.py b/ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013.py new file mode 100644 index 00000000000..c020b873632 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +# 22Jan rereco GT: +#http://cms-conddb.cern.ch/gtlist/?GlobalTag=FT_R_53_V21 + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) From 3a7a8991a3f911733adf1c9f5f0bc8f6fe83d24c Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 16 Jan 2014 12:28:31 +0100 Subject: [PATCH 229/475] updated tutorial mode for rereco with all RUN2012 --- ALCARAW_RECO/scripts/RerecoQuick.sh | 4 ++-- ALCARAW_RECO/scripts/prodAlcarereco.sh | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/scripts/RerecoQuick.sh b/ALCARAW_RECO/scripts/RerecoQuick.sh index 61d3c8bd5d2..9a525e4e9e8 100755 --- a/ALCARAW_RECO/scripts/RerecoQuick.sh +++ b/ALCARAW_RECO/scripts/RerecoQuick.sh @@ -117,11 +117,11 @@ fi if [ -n "${TUTORIAL}" ];then case ${PERIOD} in - RUN2012A) + RUN2012) ;; *) echo "[ERROR] With the tutorial mode, the only permitted period is:" - echo " RUN2012A" + echo " RUN2012" #echo " Be sure to have it in alcaraw_datasets.dat and to have selected it using the parseDatasetFile.sh" exit 1 ;; diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index 3799d844607..ad318bd269f 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -144,9 +144,18 @@ if [ -n "${TUTORIAL}" ];then case $DATASETPATH in /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO) ;; + /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO) + ;; + /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO) + ;; + /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO) + ;; *) - echo "[ERROR] With the tutorial mode, the only permitted datasetpath is:" + echo "[ERROR] With the tutorial mode, the only permitted datasetpaths are:" echo " /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO" + echo " /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO" + echo " /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO" + echo " /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO" echo " Be sure to have it in alcaraw_datasets.dat and to have selected it using the parseDatasetFile.sh" exit 1 ;; From 3ef137b5a3f469c3ae1cffc50f426d868aef865c Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 17 Jan 2014 11:08:54 +0100 Subject: [PATCH 230/475] starting implementation of pdfSyst weights --- ALCARAW_RECO/python/alcaSkimming.py | 16 +++++++++++++--- ALCARAW_RECO/python/pdfSystematics_cff.py | 15 +++++++++++++++ setup_git.sh | 5 +++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 ALCARAW_RECO/python/pdfSystematics_cff.py diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 5a856c3d00e..2d3cb6919b5 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -47,6 +47,11 @@ VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float "bool: doTreeOnly=1 true, doTreeOnly=0 false") +options.register('pdfSyst', + 0, #default value False + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.int, # string, int, or float + "bool: pdfSyst=1 true, pdfSyst=0 false") ### setup any defaults you want options.output="alcaSkimALCARAW.root" @@ -172,7 +177,8 @@ # added by Shervin for ES recHits (saved as in AOD): large window 15x3 (strip x row) process.load('RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi') - +# pdfSystematics +process.load('Calibration.ALCARAW_RECO.pdfSystematics_cff') #process.MessageLogger.cerr.FwkReport.reportEvery = 500 process.MessageLogger.cerr = cms.untracked.PSet( @@ -419,7 +425,11 @@ if(options.doTree==4 or options.doTree==5 or options.doTree==6 or options.doTree==7 or options.doTree==12 or options.doTree==13 or options.doTree==14 or options.doTree==15): # it's a bit mask process.zNtupleDumper.doEleIDTree=cms.bool(True) - +if(MC and pdfSyst==1): + process.pdfWeightsSeq = cms.Sequence(process.pdfWeights) +else: + process.pdfWeightsSeq = cms.Sequence() + ############################################################ # OUTPUT MODULES ############################## @@ -518,7 +528,7 @@ process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) -process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.ntupleSeq) +process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.pdfWeightsSeq * process.ntupleSeq) if(not doTreeOnly): process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) diff --git a/ALCARAW_RECO/python/pdfSystematics_cff.py b/ALCARAW_RECO/python/pdfSystematics_cff.py new file mode 100644 index 00000000000..25c61242fc5 --- /dev/null +++ b/ALCARAW_RECO/python/pdfSystematics_cff.py @@ -0,0 +1,15 @@ +import FWCore.ParameterSet.Config as cms + +# Produce PDF weights (maximum is 3) +pdfWeights = cms.EDProducer("PdfWeightProducer", + # Fix POWHEG if buggy (this PDF set will also appear on output, + # so only two more PDF sets can be added in PdfSetNames if not "") + #FixPOWHEG = cms.untracked.string("cteq66.LHgrid"), + #GenTag = cms.untracked.InputTag("genParticles"), + PdfInfoTag = cms.untracked.InputTag("generator"), + PdfSetNames = cms.untracked.vstring( + "cteq66.LHgrid" + , "MRST2006nnlo.LHgrid" + , "NNPDF10_100.LHgrid" + ) + ) diff --git a/setup_git.sh b/setup_git.sh index 2eedbacc9ef..4e8880d9b07 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -159,6 +159,11 @@ case $CMSSW_VERSION in cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 + # for pdfSystematics + scram setup lhapdffull + eval `scramv1 runtime -sh` + git-cms-addpkg ElectroWeakAnalysis/Utilities + scram b -j16 ;; CMSSW_7_*) From 5a34cbd06b954c8b3ea02c98996e699beec389b6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 19 Jan 2014 10:46:31 +0100 Subject: [PATCH 231/475] added regression weights in alcaSkimming for pathFix in case of non-crab run --- ALCARAW_RECO/python/alcaSkimming.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 2d3cb6919b5..e0fadbf8edc 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -425,11 +425,11 @@ if(options.doTree==4 or options.doTree==5 or options.doTree==6 or options.doTree==7 or options.doTree==12 or options.doTree==13 or options.doTree==14 or options.doTree==15): # it's a bit mask process.zNtupleDumper.doEleIDTree=cms.bool(True) -if(MC and pdfSyst==1): +if(MC and options.pdfSyst==1): process.pdfWeightsSeq = cms.Sequence(process.pdfWeights) else: process.pdfWeightsSeq = cms.Sequence() - + ############################################################ # OUTPUT MODULES ############################## @@ -662,6 +662,19 @@ process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile.value() process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile.value() process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile.value() + # process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2012Weights_V1.root") #eleEnergyRegWeights_WithSubClusters_VApr15.root") process.eleRegressionEnergy.energyRegressionType=cms.uint32(2) From 2ca4ee406d788fa45670b53fa6c883cc114b245a Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 19 Jan 2014 10:46:59 +0100 Subject: [PATCH 232/475] starting to implement additional tree in dumper for pdfsystematics --- ZNtupleDumper/src/ZNtupleDumper.cc | 58 +++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index f2efbf6d11a..be6b80a7926 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -181,6 +181,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { bool doExtraCalibTree; bool doEleIDTree; + + //TString r9weightsFilename; //std::string puWeightFile; // puWeights_class puWeights; @@ -341,6 +343,19 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t eleIDloose[2], eleIDmedium[2], eleIDtight[2]; //============================== + //============================== + TTree *pdfSystTree; + Float_t pdfSystWeight1[50]; + Float_t pdfSystWeight2[50]; + Float_t pdfSystWeight3[50]; + Float_t pdfSystWeight4[50]; + + // pdfWeightTree + bool doPdfSystTree; + std::vector< edm::InputTag > pdfWeightTAGS; + edm::Handle< std::vector > pdfWeightHandle; + + //============================== private: TFile *tree_file; void InitNewTree(void); @@ -406,7 +421,9 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): hltPaths(iConfig.getParameter< std::vector >("hltPaths")), foutName(iConfig.getParameter("foutName")), doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), - doEleIDTree(iConfig.getParameter("doEleIDTree")) + doEleIDTree(iConfig.getParameter("doEleIDTree")), + doPdfSystTree(iConfig.getParameter("doPdfSystTree")), + pdfWeightTAGS(iConfig.getParameter< std::vector >("pdfWeightCollections")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), //puWeightFile(iConfig.getParameter("puWeightFile")), //puWeights() @@ -478,6 +495,19 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe //if(metHandle.isValid()==false) iEvent.getByType(metHandle); reco::PFMET met = ((*metHandle))[0]; /// \todo use corrected phi distribution + + TreeSetPdfSystVar(iEvent, pdfWeightTag, pdfWeightHandle); + + iEvent.getByLabel(pdfWeightTag, pdfWeightHandle); + + std::vector weights = (*pdfWeightHandle); + std::cout << "Event weight for central PDF:" << weights[0] << std::endl; + unsigned int nmembers = weights.size(); + for (unsigned int j=1; jGetTitle()); + std::cout << "[STATUS] InitPdfSystTree" << std::endl; + if(pdfSystTree==NULL) return; + + pdfSystTree->Branch("runNumber", &runNumber, "runNumber/I"); + pdfSystTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); + pdfSystTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); + pdfSystTree->Branch("runTime", &runTime, "runTime/l"); + + for(std::vector< edm::InputTag >::const_iterator pdfWeightTAGS_itr = pdfWeightTAGS.begin(); + pdfWeightTAGS_itr != pdfWeightTAGS.end(); + pdfWeightTAGS_itr++){ + std::string tagName = pdfWeightTAGS_itr; + tagName.replace(pdfWeightTAGS_itr->label.size() + pdfSystTree->Branch("pdfSystWeight1", pdfSystWeight1, "pdfSystWeight[2]/F"); + pdfSystTree->Branch("pdfSystWeight1", pdfSystWeight1, "pdfSystWeight[2]/F"); + return; +} + + void ZNtupleDumper::TreeSetPdfSystVar(const edm::Event& iEvent){ + + return ; + } //define this as a plug-in DEFINE_FWK_MODULE(ZNtupleDumper); From 4f84599774ad42125bb316d1595cb64c40f808fb Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 19 Jan 2014 16:21:30 +0100 Subject: [PATCH 233/475] pdfSyst in extra ntuple --- ALCARAW_RECO/python/alcaSkimming.py | 7 ++- ZNtupleDumper/python/zntupledumper_cfi.py | 2 + ZNtupleDumper/src/ZNtupleDumper.cc | 77 +++++++++++++++-------- 3 files changed, 59 insertions(+), 27 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index e0fadbf8edc..8827288b2fc 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -487,7 +487,12 @@ #print "OUTPUTCOMMANDS" #print process.outputALCARECO.outputCommands - +if(pdfSyst==1): + process.TFileService = cms.Service("TFileService", + fileName = cms.string("ntupleExtra.root"), + closeFileFast = cms.untracked.bool(True) + ) + ############################################################## diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index af3c9542f8e..4b02752ef0e 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -18,6 +18,8 @@ doStandardTree = cms.bool(True), doExtraCalibTree = cms.bool(False), doEleIDTree = cms.bool(False), + doPdfSystTree = cms.bool(True), + pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')), isWenu = cms.bool(False), # hltPaths = cms.vstring() hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v15', diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index be6b80a7926..4e1897b7726 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -345,16 +345,17 @@ class ZNtupleDumper : public edm::EDAnalyzer { //============================== TTree *pdfSystTree; - Float_t pdfSystWeight1[50]; - Float_t pdfSystWeight2[50]; - Float_t pdfSystWeight3[50]; - Float_t pdfSystWeight4[50]; + //std::vector pdfSystWeightNum; + std::vector pdfSystWeight[5]; // pdfWeightTree bool doPdfSystTree; std::vector< edm::InputTag > pdfWeightTAGS; edm::Handle< std::vector > pdfWeightHandle; - + + void InitPdfSystTree(void); + void TreeSetPdfSystVar(const edm::Event& iEvent); + //============================== private: TFile *tree_file; @@ -496,18 +497,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe reco::PFMET met = ((*metHandle))[0]; /// \todo use corrected phi distribution - TreeSetPdfSystVar(iEvent, pdfWeightTag, pdfWeightHandle); - - iEvent.getByLabel(pdfWeightTag, pdfWeightHandle); - - std::vector weights = (*pdfWeightHandle); - std::cout << "Event weight for central PDF:" << weights[0] << std::endl; - unsigned int nmembers = weights.size(); - for (unsigned int j=1; jFill(); } + if(doPdfSystTree){ + TreeSetPdfSystVar(iEvent); + pdfSystTree->Fill(); + } } else { for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; eleIter2 != electronsHandle->end(); @@ -601,6 +594,10 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetEleIDVar(*eleIter1, *eleIter2); eleIDTree->Fill(); } + if(doPdfSystTree){ + TreeSetPdfSystVar(iEvent); + pdfSystTree->Fill(); + } } } } @@ -641,7 +638,7 @@ void ZNtupleDumper::beginJob() tree->SetDirectory(tree_file); // controllo su tree==NULL - + InitNewTree(); // inizializzo il tree dell'ntupla ridotta selezionata if(doExtraCalibTree){ @@ -653,6 +650,13 @@ void ZNtupleDumper::beginJob() InitEleIDTree(); } + if(doPdfSystTree){ + std::cout << "[INFO] Doing pdfSystTree" << std::endl; + pdfSystTree = fs->make("pdfSystTree","pdfSystTree"); + InitPdfSystTree(); + } + + #ifdef DEBUG std::cout << "[DEBUG] End creation of ntuples" << std::endl; #endif @@ -1436,21 +1440,42 @@ void ZNtupleDumper::InitPdfSystTree(void){ pdfSystTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); pdfSystTree->Branch("runTime", &runTime, "runTime/l"); + for(std::vector< edm::InputTag >::const_iterator pdfWeightTAGS_itr = pdfWeightTAGS.begin(); pdfWeightTAGS_itr != pdfWeightTAGS.end(); pdfWeightTAGS_itr++){ - std::string tagName = pdfWeightTAGS_itr; - tagName.replace(pdfWeightTAGS_itr->label.size() - pdfSystTree->Branch("pdfSystWeight1", pdfSystWeight1, "pdfSystWeight[2]/F"); - pdfSystTree->Branch("pdfSystWeight1", pdfSystWeight1, "pdfSystWeight[2]/F"); + int i = pdfWeightTAGS_itr - pdfWeightTAGS.begin(); + //std::string tagName = pdfWeightTAGS_itr->instance(); + //tagName.replace(0,pdfWeightTAGS_itr->label().size()); + //std::cout << i << "\t" << tagName << "\t" << pdfWeightTAGS_itr->label() << "\t" << pdfWeightTAGS_itr->encode() << std::endl; + //pdfSystTree->Branch(pdfWeightTAGS_itr->encode().c_str(), &(pdfSystWeightNum[i]), "pdfSystWeightNum/I"); + pdfSystTree->Branch((pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()).c_str(), &(pdfSystWeight[i]), (pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()+"/D").c_str()); + } return; } - void ZNtupleDumper::TreeSetPdfSystVar(const edm::Event& iEvent){ - +void ZNtupleDumper::TreeSetPdfSystVar(const edm::Event& iEvent){ - return ; - } + for(std::vector< edm::InputTag >::const_iterator pdfWeightTAGS_itr = pdfWeightTAGS.begin(); + pdfWeightTAGS_itr != pdfWeightTAGS.end(); + pdfWeightTAGS_itr++){ + int i = pdfWeightTAGS_itr-pdfWeightTAGS.begin(); + iEvent.getByLabel(*pdfWeightTAGS_itr, pdfWeightHandle); + + //pdfSystWeight[i] = + std::vector weights = std::vector(*pdfWeightHandle); + pdfSystWeight[i]=weights; + std::cout << "Event weight for central PDF " << pdfWeightTAGS_itr->encode() << ": " << pdfSystWeight[i][0] << std::endl; + //unsigned int nmembers = weights.size(); + //pdfSystWeightNum[i]=pdfSystWeight.size(); +// for (unsigned int j=1; j Date: Mon, 20 Jan 2014 14:57:32 +0100 Subject: [PATCH 234/475] updating --- ALCARAW_RECO/python/alcaSkimming.py | 2 +- ZFitter/src/SmearingImporter.cc | 7 +++++++ ZNtupleDumper/src/ZNtupleDumper.cc | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 8827288b2fc..f3617599446 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -487,7 +487,7 @@ #print "OUTPUTCOMMANDS" #print process.outputALCARECO.outputCommands -if(pdfSyst==1): +if(options.pdfSyst==1): process.TFileService = cms.Service("TFileService", fileName = cms.string("ntupleExtra.root"), closeFileFast = cms.untracked.bool(True) diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 5484ae12132..65897ea8ee7 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -89,6 +89,8 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Float_t r9weight[2]={1,1}; Float_t ptweight[2]={1,1}; Float_t mcGenWeight=1; + std::vector *pdfWeights = NULL; + Int_t smearerCat[2]; bool hasSmearerCat=false; @@ -114,6 +116,11 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } } + if(chain->GetBranch("pdfWeights_cteq66")){ + std::cout << "[STATUS] Adding pdfWeight_ctec66 branch from friend" << std::endl; + chain->SetBranchAddress("pdfWeights_cteq66", &pdfWeights); + } + chain->SetBranchAddress("etaEle", etaEle); chain->SetBranchAddress("phiEle", phiEle); diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 4e1897b7726..c00fa00bfc2 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -1449,7 +1449,7 @@ void ZNtupleDumper::InitPdfSystTree(void){ //tagName.replace(0,pdfWeightTAGS_itr->label().size()); //std::cout << i << "\t" << tagName << "\t" << pdfWeightTAGS_itr->label() << "\t" << pdfWeightTAGS_itr->encode() << std::endl; //pdfSystTree->Branch(pdfWeightTAGS_itr->encode().c_str(), &(pdfSystWeightNum[i]), "pdfSystWeightNum/I"); - pdfSystTree->Branch((pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()).c_str(), &(pdfSystWeight[i]), (pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()+"/D").c_str()); + pdfSystTree->Branch((pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()).c_str(), &(pdfSystWeight[i])); } return; } @@ -1465,7 +1465,7 @@ void ZNtupleDumper::TreeSetPdfSystVar(const edm::Event& iEvent){ //pdfSystWeight[i] = std::vector weights = std::vector(*pdfWeightHandle); pdfSystWeight[i]=weights; - std::cout << "Event weight for central PDF " << pdfWeightTAGS_itr->encode() << ": " << pdfSystWeight[i][0] << std::endl; + //std::cout << "Event weight for central PDF " << pdfWeightTAGS_itr->encode() << ": " << pdfSystWeight[i][0] << std::endl; //unsigned int nmembers = weights.size(); //pdfSystWeightNum[i]=pdfSystWeight.size(); // for (unsigned int j=1; j Date: Mon, 20 Jan 2014 16:45:01 +0100 Subject: [PATCH 235/475] pdfSystWeight in importer --- ZFitter/interface/RooSmearer.hh | 1 + ZFitter/interface/SmearingImporter.hh | 3 +++ ZFitter/src/SmearingImporter.cc | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index 13b8ee0bb0c..3dae6997726 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -128,6 +128,7 @@ public: inline void SetPtWeight(bool usePtReweight){importer.SetPtWeight(usePtReweight);}; inline void SetOnlyDiagonal(bool value){importer.SetOnlyDiagonal(value);}; inline void SetSmearingEt(bool value){importer.SetSmearingEt(value);}; + inline void SetPdfSystWeight(int value){importer.SetPdfSystWeight(value);}; void SetNSmear(unsigned int n_smear=0, unsigned int nlltoy=0); diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index 328269891ab..94803242e7a 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -47,6 +47,7 @@ public: inline void SetEleID(TString value){_eleID=value;}; inline void SetCommonCut(TString cut){_commonCut=cut;}; inline void SetSmearingEt(bool value){_isSmearingEt=value;}; + inline void SetPdfSystWeight(int value){_pdfWeightIndex=value;}; std::vector _regionList; float _scaleToy, _constTermToy; @@ -67,6 +68,8 @@ private: bool _excludeByWeight; bool _onlyDiagonal; bool _isSmearingEt; + int _pdfWeightIndex; + ElectronCategory_class cutter; void Import(TTree *chain, regions_cache_t& cache, TString oddString, bool isMC, Long64_t nEvents=0, bool isToy=false, bool externToy=true); diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 65897ea8ee7..d4bd13eafca 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -23,6 +23,7 @@ SmearingImporter::SmearingImporter(std::vector regionList, TString ener _excludeByWeight(true), _onlyDiagonal(false), _isSmearingEt(false), + _pdfWeightIndex(0), cutter(false) { cutter.energyBranchName=energyBranchName; @@ -119,6 +120,10 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(chain->GetBranch("pdfWeights_cteq66")){ std::cout << "[STATUS] Adding pdfWeight_ctec66 branch from friend" << std::endl; chain->SetBranchAddress("pdfWeights_cteq66", &pdfWeights); + if((unsigned int) _pdfWeightIndex > pdfWeights->size()){ + std::cerr << "[ERROR] Requested pdfWeightIndex > pdfWeight size" << std::endl; + exit(1); + } } chain->SetBranchAddress("etaEle", etaEle); @@ -298,6 +303,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; + if(_pdfWeightIndex>0) event.weight *= (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0]; if(mcGenWeight != -1){ if(_useMCweight && !_excludeByWeight) event.weight *= mcGenWeight; From 8291b522f4c3fb488528c72b839d465422fe507e Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 11:18:22 +0100 Subject: [PATCH 236/475] pdfSystTree option in ntuple production --- ALCARAW_RECO/ntuple_datasets.dat | 7 +++++++ ALCARAW_RECO/scripts/prodNtuples.sh | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index ba255ca0f76..7466f96a572 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -196,3 +196,10 @@ allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START5 175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 36c88f1b995..3c8ffa2833d 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -37,6 +37,7 @@ usage(){ echo "---------- optional common" echo " --doExtraCalibTree" echo " --doEleIDTree" + echo " --doPdfSystTree" echo " --noStandardTree" echo " --createOnly" echo " --submitOnly" @@ -65,7 +66,7 @@ expertUsage(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,ntuple_remote_dir:,json:,tag:,type:,json_name:,sandbox_remote_dir:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,noStandardTree,createOnly,submitOnly,check,file_per_job: -- "$@") +if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,ntuple_remote_dir:,json:,tag:,type:,json_name:,sandbox_remote_dir:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,createOnly,submitOnly,check,file_per_job: -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -136,6 +137,7 @@ do --extraName) EXTRANAME=$2;shift;; --doExtraCalibTree) let DOTREE=${DOTREE}+2;; --doEleIDTree) let DOTREE=${DOTREE}+4;; + --doPdfSystTree) let DOTREE=${DOTREE}+8;; --noStandardTree) let DOTREE=${DOTREE}-1;; --createOnly) echo "[OPTION] createOnly"; unset SUBMIT;; --submitOnly) echo "[OPTION] submitOnly"; unset CREATE;; @@ -319,7 +321,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=1 jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} get_edm_output=1 output_file=${OUTFILES} From a3eaec0c2b0a179cbfeb573c7057c583b71a2822 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 13:03:44 +0100 Subject: [PATCH 237/475] added missing directory --- ALCARAW_RECO/tmp/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ALCARAW_RECO/tmp/.gitignore diff --git a/ALCARAW_RECO/tmp/.gitignore b/ALCARAW_RECO/tmp/.gitignore new file mode 100644 index 00000000000..e69de29bb2d From 78699dc3348d159bfd53ece4bd860ea03c49e8f4 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 13:04:20 +0100 Subject: [PATCH 238/475] updating documentation --- ALCARAW_RECO/doc/.#tutorial.tex | 1 + .../doc/alcaraw_alcareco_production.txt | 37 +++++++++++++++++-- ALCARAW_RECO/doc/dataformats.txt | 6 ++- ALCARAW_RECO/doc/tutorial.tex | 21 +++++++++++ 4 files changed, 59 insertions(+), 6 deletions(-) create mode 120000 ALCARAW_RECO/doc/.#tutorial.tex create mode 100644 ALCARAW_RECO/doc/tutorial.tex diff --git a/ALCARAW_RECO/doc/.#tutorial.tex b/ALCARAW_RECO/doc/.#tutorial.tex new file mode 120000 index 00000000000..c7d93f34135 --- /dev/null +++ b/ALCARAW_RECO/doc/.#tutorial.tex @@ -0,0 +1 @@ +shervin@lxplus403.cern.ch.17748:1386908970 \ No newline at end of file diff --git a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt index 216d9809ff7..5df751e2e68 100644 --- a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt +++ b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt @@ -2,11 +2,10 @@ Steps for the production using the CERN batch system (launch from lxplus): 0) Check that there are no updates in the repository: - svn status -u - svn update - For indications on how to use svn, see the dedicated section below + git pull # this will merge automatically the updates in the master branch -#### ALCARAW private production + +#### ALCARAW private production -> TO BE UPDATED The following instructions correspond to point: 1a), 1.1a), 2a) indicated in Calibration/README: https://svnweb.cern.ch/cern/wsvn/analysis/trunk/Calibration/README @@ -30,7 +29,37 @@ For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.d 4) Commit the changes to alcaraw_datasets.dat! svn ci -m "message" + + #### ALCARECO private production +1) Fill the alcareco_datasets.dat with the information of the desired run range + It is convenient to add the new line at the bottom of the file. + Please refere to the ALCARAW_RECO/doc/dataformats.txt file for information + about how the alcareco_datasets.dat file is structured. + + For this step, in case of update of a growing dataset, please have + a look to the "Production update" section below + + +2) ./scripts/prodAlcareco.sh `parseDatasetFile.sh alcareco_datasets.dat |grep 22Jan | grep Run2012A` --tutorial + ./scripts/prodAlcareco.sh `parseDatasetFile.sh alcareco_datasets.dat |grep RelVal22Jan | grep Run2012A` --tutorial + use the --tutorial if you are testing the machinery: it will save the files in a separate directory on EOS (not the central one) + use grep commands to select the proper line from alcareco_datasets.dat + the script will create the crab task and submit it + use --createOnly or --submitOnly if needed + use --check to launch the check of the job results + use the --isMC is the dataset is MC + use the -s skim: ZSkim, WSkim, EleSkim for the preselection (ZSkim usually) + use --scheduler=remoteGlidein if the dataset is not at T2_CH_CERN and you want to use the grid + + see ./scripts/prodAlcareco.sh --help for more informations + +3) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial --check + check the job status and output + +4) Commit the changes to alcaraw_datasets.dat! + svn ci -m "message" + diff --git a/ALCARAW_RECO/doc/dataformats.txt b/ALCARAW_RECO/doc/dataformats.txt index de7d91ee7b3..2e8d7e20b3f 100644 --- a/ALCARAW_RECO/doc/dataformats.txt +++ b/ALCARAW_RECO/doc/dataformats.txt @@ -12,7 +12,7 @@ ALCARECO and ALCARAW private production logic. #### Data formats - EcalUncalElectron (ALCARAW): Special data format for rereco purpose - - in CMSSW from the 6_2_X release + - in CMSSW from the 7_X_X release - no official ALCARAW have been produced so far - Actually produced privately starting from RAW-RECO Z and W skims @@ -22,6 +22,8 @@ ALCARECO and ALCARAW private production logic. ECALELF (starting from ALCARAW) - Now in CMSSW and produced centrally with a ZW skim applied (WP90 selection) + -> the ALCARECO format has been updated, the CMSSW version + is deprecated - can be produced also privately starting from RAW-RECO Z and W skims @@ -75,7 +77,7 @@ VALIDITY (only meaningful for ALCARAW): In this way it's not necessary to remove the files from EOS and in the alcaraw_datasets.dat there is always the list of folders and files present on EOS. -PERIOD: in case of rereco, you want run on more than one line (more +PERIOD: in case of rereco, you want to run on more than one line (more run ranges). To make life easier, a comma separated list of "periods" can be associated to the line. In this way, when diff --git a/ALCARAW_RECO/doc/tutorial.tex b/ALCARAW_RECO/doc/tutorial.tex new file mode 100644 index 00000000000..d34224ebad2 --- /dev/null +++ b/ALCARAW_RECO/doc/tutorial.tex @@ -0,0 +1,21 @@ + +\begin{itemize} + \item Download and compile the code + \item Read the alcaraw_alcareco_production.txt file + \item Read the dataformats.txt file + \item See options for prodAlcareco.sh + \item The jobs are launched using the CRAB tool both for jobs on LSF and on the GRID +\end{itemize} + +\begin{itemize} + \item Find the RelVal in DBS: RelValZee + \pause + \subitem /RelValZEE_13/CMSSW_7_0_0_pre11-PU50ns_POSTLS162_V5-v1/GEN-SIM-RECO + \item Add the line to the alcareco_datsets.dat file + \pause + \subitem allRange /RelValZEE_13/CMSSW_7_0_0_pre11-PU50ns_POSTLS162_V5-v1/GEN-SIM-RECO RelValZEE_CMSSW700pre11_POSTLS162_V5-v1 caf group/alca_ecalcalib/ecalelf/alcareco + \item launch the production + \subitem cat ~/public/launch-alcareco-tutorial.sh + + + \item \ No newline at end of file From 735788d39db63df97a86d78df5cb21e86446cad9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 13:06:17 +0100 Subject: [PATCH 239/475] tutorial mode and RelVal 13TeV energy set --- ALCARAW_RECO/scripts/prodAlcareco.sh | 25 +++++++++++++++++++++++-- ALCARAW_RECO/scripts/prodFunctions.sh | 3 +++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 0b40d2dc856..b67294c5903 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -32,7 +32,7 @@ usage(){ echo " --submitOnly" echo " --check" echo " --json_name jsonName: additional name in the folder structure to keep track of the used json" - echo " --json jsonFile.root" + echo " --json jsonFile.root: better to not use a json file for the alcareco production" echo "----------" echo " --tutorial: tutorial mode, produces only one sample in you user area" } @@ -42,7 +42,7 @@ usage(){ #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name: -- "$@") +if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,tutorial -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -69,6 +69,8 @@ do --check) echo "[OPTION] checking jobs"; unset CREATE; unset SUBMIT; CHECK=y; EXTRAOPTION="--check";; --json) JSONFILE=$2; shift;; --json_name) JSONNAME=$2; shift;; + --tutorial) echo "[OPTION] Activating the tutorial mode"; TUTORIAL=y;; + (--) shift; break;; (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; (*) break;; @@ -114,6 +116,25 @@ else fi +if [ -n "${TUTORIAL}" ];then + case $DATASETPATH in + /RelVal*) + ;; + *) + echo "[ERROR] With the tutorial mode, the only permitted datasetpath is:" + echo " /RelVal*" + echo " Be sure to have it in alcareco_datasets.dat and to have selected it using the parseDatasetFile.sh" + exit 1 + ;; + esac + USER_REMOTE_DIR_BASE=${USER_REMOTE_DIR_BASE}/tutorial/$USER + echo "============================================================" + echo "= [INFO] With the tutorial mode, the output goes into the directory:" + echo "= ${USER_REMOTE_DIR_BASE}" + echo "= --> Please, remember to remove it after the tests (ask to shervin@cern.ch)" + /bin/sleep 5s +fi + ############################### #------------------------------ diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index 2df637365a5..682ae04260a 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -72,6 +72,9 @@ setEnergy(){ *Summer11*) ENERGY=7TeV ;; + *RelValZEE_13*) + ENERGY=13TeV + ;; *) echo "[ERROR] Center of mass energy not determined for $1" >> /dev/stderr echo " Check implementation in prodFunctions.sh" >> /dev/stderr From ae45e2c369939087ff9e538bc8e9880203f600d8 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 13:09:02 +0100 Subject: [PATCH 240/475] deprecated CMSSW_5_3_7_patch6 version replaced --- setup_git.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index 2eedbacc9ef..e45ae37eae0 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -3,6 +3,10 @@ checkVERSION(){ case $CMSSW_VERSION in CMSSW_5_3_7_patch6) + echo "[ERROR] $CMSSW_VERSION now deprecated, please use the CMSSW_5_3_14_patch2" + exit 1 + ;; + CMSSW_5_3_14_patch2) echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" ;; CMSSW_7_0_0_*) @@ -22,7 +26,7 @@ case $# in echo "[STATUS] Creating $1 CMSSW release working area" CMSSW_VERSION=$1 checkVERSION - scram project CMSSW ${CMSSW_VERSION} + scram project CMSSW ${CMSSW_VERSION} || exit 1 cd ${CMSSW_VERSION}/src eval `scramv1 runtime -sh` ;; @@ -139,9 +143,8 @@ case $CMSSW_VERSION in ###### New Josh regression mkdir HiggsAnalysis/ cd HiggsAnalysis/ - git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihood.git -# git clone -b CMSSW53X git@github.com:bendavid/GBRLikelihood.git - git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihoodEGTools.git + git clone https://github.com/bendavid/GBRLikelihood.git + git clone https://github.com/bendavid/GBRLikelihoodEGTools.git cd - mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ From 85606a3560965c0ad7f77f424732d40bf9f8ea6a Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 15:29:07 +0100 Subject: [PATCH 241/475] deprecated CMSSW version changed --- README.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a2080b2842f..553a497a8f9 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,21 @@ Download instructions. `chmod +x setup_git.sh` -`./setup_git.sh CMSSW_5_3_7_patch6` +`./setup_git.sh CMSSW_5_3_14_patch2` -`cd CMSSW_5_3_7_patch6/src/` +`cd CMSSW_5_3_14_patch2/src/` `cmsenv` -NB: I'm not able to say to scram not to compile a particular directory, then the Calibration/ZFitter directory is not skipped by scram and the compilation fails. you should compile by hand all the packages except Calibration/ZFitter -In order to compile Calibration/ZFitter do +`cd Calibration/ZFitter && make && cd -` -`cd Calibration/ZFitter` +====== +Code documentation: +Once downloaded the code, in Calibration/ you can run the command -`make` +`doxygen fulldoc` + +to have the code documentation produced by doxygen opening the doc/doxygen/fulldoc/html/index.html with your browser ====== @@ -50,11 +53,3 @@ Then start to develop, remember to do commits as much as possible Remember to update regularly the code doing when you are in the branch devel-42X_44X_53X: `git pull` -====== -Code documentation: -Once downloaded the code, in Calibration/ you can run the command - -`doxygen fulldoc` - -to have the code documentation produced by doxygen opening the doc/doxygen/fulldoc/html/index.html with your browser - From d7a84ec92318cfe79aed30b77bf23832fda4e405 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 15:54:10 +0100 Subject: [PATCH 242/475] updated instructions --- .../doc/alcaraw_alcareco_production.txt | 3 + ALCARAW_RECO/scripts/SandboxQuick.sh | 257 ------------------ README | 11 +- 3 files changed, 4 insertions(+), 267 deletions(-) delete mode 100755 ALCARAW_RECO/scripts/SandboxQuick.sh diff --git a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt index 5df751e2e68..dd1bfbf2654 100644 --- a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt +++ b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt @@ -1,3 +1,6 @@ +/** +* \page page4 Instruction for ALCARAW and ALCARECO production +* \verbatim #============================== ALCARECO and ALCARAW production instructions Steps for the production using the CERN batch system (launch from lxplus): diff --git a/ALCARAW_RECO/scripts/SandboxQuick.sh b/ALCARAW_RECO/scripts/SandboxQuick.sh deleted file mode 100755 index 1a9dd4dac24..00000000000 --- a/ALCARAW_RECO/scripts/SandboxQuick.sh +++ /dev/null @@ -1,257 +0,0 @@ -#!/bin/bash -################ -# Semplified script for rereco and ntuple of 2011 and 2012 data -############## -NTUPLE_REMOTE_DIR=caf/user/shervin/Calibration/8TeV/ZNtuples -SCHEDULER=caf -CREATE=y -SUBMIT=y -usage(){ - echo "`basename $0` -p period -t tagFile" - echo " -t | --tag_file tagFile" - echo " --scheduler caf,lsf (=$SCHEDULER)" - echo "--------------- FOR RERECO only" - echo " -p | --period " - echo " --rereco" - echo " --singleEle: if you want to rereco also single electron datasets" - echo "--------------- FOR NTUPLE only" - echo " --ntuple" - echo " --json_name jsonName" - echo " --json jsonFile.root" - echo " --doExtraCalibTree" - echo "--------------- Expert" - echo " --submitOnly" - echo " --createOnly" - echo "--------------- ECALELF Tutorial" - echo " --tutorial" -} - - -#------------------------------ parsing -# options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o ht:p: -l help,tag_file:,period:,scheduler:,singleEle,createOnly,submitOnly,ntuple,rereco,json_name:,json:,tutorial,doExtraCalibTree -- "$@") -then - # something went wrong, getopt will put out an error message for us - exit 1 -fi - -set -- $options - -while [ $# -gt 0 ] -do - case $1 in - -h|--help) usage; exit 0;; - -t | --tag) TAGFILE=$2; echo "[OPTION] TAGFILE:$TAGFILE"; TAG=`basename ${TAGFILE} .py`; shift;; - -p | --period) PERIOD=$2; shift;; - --tutorial) - echo "[OPTION] Entering in tutorial mode" - TUTORIAL=y; SCHEDULER=caf; - NTUPLE_REMOTE_DIR=group/alca_ecalcalib/sandbox/tutorial/${USER}/Calibration/8TeV/ZNtuples; - echo "Ntuple output directory: /eos/cms/store/${NTUPLE_REMOTE_DIR}" - echo -n "Check if exists: " - eos.select ls -s /eos/cms/store/${NTUPLE_REMOTE_DIR} &> /dev/null || { - echo "Creating it" - eos.select mkdir -p /eos/cms/store/${NTUPLE_REMOTE_DIR} - echo -n "Re-checking it " - eos.select ls -s /eos/cms/store/${NTUPLE_REMOTE_DIR} || exit 1 - } - echo "[OK]" - ;; - --scheduler) SCHEDULER=$2; - case $SCHEDULER in - lsf) - ;; - caf) - ;; - *) - echo "[ERROR] Scheduler ${SCHEDULER} not defined: use only lsf or caf" >> /dev/stderr - exit 1 - ;; - esac - shift;; - --singleEle) SINGLEELE=y;; - --createOnly) unset SUBMIT;; - --submitOnly) echo "[OPTION] submitOnly"; unset CREATE;; - --rereco) RERECO=y;; - --ntuple) NTUPLE=y;; - --json) JSONFILE=$2; shift;; - --json_name) JSONNAME=$2; shift;; - --doExtraCalibTree) DOEXTRACALIBTREE="--doExtraCalibTree";; - (--) shift; break;; - (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; - (*) break;; - esac - shift -done - -#------------------------------ checking - -if [ ! -r "$TAGFILE" ];then - echo "[ERROR] TAGFILE not found or not readable" >> /dev/stderr - exit 1 -fi - -if [ -n "${NTUPLE}" ];then - - unset ${SINGLEELE} - NTIME=8m - TYPE=alcarereco - if [ -z "$JSONFILE" -a "$TYPE" != "ALCARECOSIM" ];then - echo "[ERROR] JSONFILE not defined" >> /dev/stderr - usage >> /dev/stderr - exit 1 - fi - - if [ -z "$JSONNAME" -a "$TYPE" != "ALCARECOSIM" ];then - echo "[ERROR] JSONNAME not defined" >> /dev/stderr - usage >> /dev/stderr - exit 1 - fi - - fileList=../SANDBOX/sandboxRereco.log - datasets=`parseProdSandboxOptions.sh ${fileList} | grep -e "$TAG$"` - if [ -z "${datasets}" ];then - echo "[ERROR] No rereco found in sandboxRereco.log" >> /dev/stderr - exit 1 - fi - localFolder=prod_zntuples/${TYPE} -else - NTIME=50m - fileList=sandbox_datasets.dat - localFolder=rereco_sandbox - if [ -z "${RERECO}" ];then - echo "[ERROR] Nor --ntuple neither --rereco options have been provided" >> /dev/stderr - usage >> /dev/stderr - exit 1 - fi - case $PERIOD in - "test") - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | grep -e "$PERIOD,"` - ;; - RUN2011AB) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - RUN2011B53X) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - RUN2012AB) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - RUN2012C) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - RUN2012D) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - RUN2012ABC) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - RUN2012ABCD) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - Cal_Nov2012) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - Cal_Dic2012) - datasets=`parseProdSandboxOptions.sh ${fileList} | grep VALID | sed 's|$|,|' | grep -e "$PERIOD,"` - ;; - *) - echo "[ERROR] PERIOD $PERIOD not defined" - exit 1 - ;; - esac -fi - -# set IFS to newline in order to divide using new line the datasets -IFS=$'\n' - -if [ -n "${CREATE}" ];then - nCreated=0 # this has to be within the CREATE part, because says if a creation has been requested, but then there are no submission to do - - # this is to protect multiple istances overwriting the same files - while [ -e "tmp/sandboxQuick.lock" ] - do - /bin/sleep 30s - done - touch tmp/sandboxQuick.lock - for dataset in $datasets - do - if [ -z "${SINGLEELE}" -a "`echo $dataset | grep -c SingleElectron`" != "0" ];then continue; fi - - RUNRANGE=`echo $dataset | cut -d ' ' -f 2` - DATASETNAME=`echo $dataset | cut -d ' ' -f 6` - - if [ -n "${NTUPLE}" ];then - if [ ! -e "prod_zntuples/alcarereco/$TAG/$DATASETNAME/$RUNRANGE/$JSONNAME" ];then - echo "[STATUS] Creating task for ntuple production for dataset: ${DATASETNAME}" - let nCreated=${nCreated}+1 - ./script/prodNtuples.sh --ntuple_remote_dir ${NTUPLE_REMOTE_DIR} --ui_working_dir prod_zntuples --scheduler $SCHEDULER --type ${TYPE} --json ${JSONFILE} --json_name ${JSONNAME} ${DOEXTRACALIBTREE} $dataset || exit 1 - else - echo -n "$RUNRANGE ${DATASETNAME} $TAG ntuples already produced" - fi - fi - - if [ -n "${RERECO}" ];then - if [ "`cat sandboxRereco.log | grep \"$TAG[ ]*\$\" | grep ${DATASETNAME} | grep -c $RUNRANGE`" == "0" ];then - echo "[STATUS] Creating task for rerecoing dataset: ${DATASETNAME}" - let nCreated=${nCreated}+1 - ./scripts/rerecoSandbox.sh --scheduler $SCHEDULER -t $TAGFILE $dataset || exit 1 - else - echo -n "$RUNRANGE ${DATASETNAME} $TAG already rerecoed: " - cat sandboxRereco.log | grep ${TAG} | grep ${DATASETNAME} | grep -c $RUNRANGE - continue - fi - fi - done - rm tmp/sandboxQuick.lock -fi - -if [ "${nCreated}" == "0" ];then - # no new jobs created, but creation has been requested - # so no submission required - unset SUBMIT -fi - -if [ -n "${SUBMIT}" ];then -# TAG=`basename ${TAGFILE} .py` - if [ -n "${NTUPLE}" ];then - dirList=`ls -d -1 ${localFolder}/$TAG/*/*/*` - else - dirList=`ls -d -1 ${localFolder}/$TAG/*/*/` - fi - for dir in $dirList - do - echo $dir - if [ ! -e "$dir/res/finished" ];then - crab -c $dir -submit || exit 1 - fi -# /bin/sleep 1m - done - - - echo - echo "[STATUS] JOBS SUBMITTED, waiting ${NTIME} for check" - /bin/sleep ${NTIME} - - if [ -n "${NTUPLE}" ];then - checkAndResubmitRereco.sh -t $TAGFILE --ntuple - else - checkAndResubmitRereco.sh -t $TAGFILE - fi - while [ "`cat tmp/$TAG.log | wc -l `" != "0" ]; do - /bin/sleep 5m - if [ -n "${NTUPLE}" ];then - checkAndResubmitRereco.sh -t $TAGFILE --ntuple - else - checkAndResubmitRereco.sh -t $TAGFILE - fi - done - - if [ -n "${NTUPLE}" ];then - for dir in $dirList - do - ./script/mergeOutput.sh -u $dir - done - fi -fi - diff --git a/README b/README index b3422709c16..ea42968bc01 100644 --- a/README +++ b/README @@ -98,16 +98,7 @@ recalibration step, the 1-3a) steps can be replaced by #performed just once. -============================== Code download and setup area (for bash shell) -The recommended release for 2012 data is the 5_3_7_patch5 -The recommended release for 2011 data is 4_2_8_patch7 - -if you have not the release area: -svn export svn+ssh://svn.cern.ch/reps/analysis/trunk/calibration/setup.sh -./setup.sh CMSSW_5_3_7_patch5 -cd CMSSW_5_3_7_patch5/src/ -cmsenv - +============================== Instructions for ALCARAW and/or ALCARECO production are in calibration/ALCARAW_RECO/doc/README From 159591221ca4775621eaf7d3185352e8b1e6051e Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 16:27:48 +0100 Subject: [PATCH 243/475] added shell variable init scripts --- initCmsEnv.csh | 12 ++++++++++++ initCmsEnv.sh | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 initCmsEnv.csh create mode 100644 initCmsEnv.sh diff --git a/initCmsEnv.csh b/initCmsEnv.csh new file mode 100644 index 00000000000..ec3b788e60b --- /dev/null +++ b/initCmsEnv.csh @@ -0,0 +1,12 @@ +#!/bin/tcsh + +source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.csh +cmsenv +source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.csh +voms-proxy-init -voms cms -out $HOME/gpi.out + +#cd calibration/SANDBOX +#setenv PATH $PWD/bin:$PATH +setenv PATH $PATH":/afs/cern.ch/project/eos/installation/pro/bin/" +setenv PATH $PATH":$CMSSW_BASE/Calibration/ALCARAW_RECO/bin" + diff --git a/initCmsEnv.sh b/initCmsEnv.sh new file mode 100644 index 00000000000..069d89bd076 --- /dev/null +++ b/initCmsEnv.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh +cmsenv +source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh +voms-proxy-init -voms cms -out $HOME/gpi.out + +#cd calibration/SANDBOX +#setenv PATH $PWD/bin:$PATH +#PATH=`echo $PATH | sed 's|/afs/cern.ch/project/eos/installation/pro/bin/||'` + +PATH=$PATH:/afs/cern.ch/project/eos/installation/pro/bin/ +PATH=$PATH:$CMSSW_BASE/Calibration/ALCARAW_RECO/bin + From 718d4f3fb7754f3ecb09aeafdddc360a51f6020f Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 17:02:21 +0100 Subject: [PATCH 244/475] removed obsolete server for crab cfg --- ALCARAW_RECO/scripts/prodAlcaraw.sh | 2 +- ALCARAW_RECO/scripts/prodAlcareco.sh | 14 ++++++++++---- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodAlcaraw.sh b/ALCARAW_RECO/scripts/prodAlcaraw.sh index 3e8f8e44db3..c18e8d175a7 100755 --- a/ALCARAW_RECO/scripts/prodAlcaraw.sh +++ b/ALCARAW_RECO/scripts/prodAlcaraw.sh @@ -224,7 +224,7 @@ index=001 cat > ${crabFile} <&2; usage >> /dev/stderr; exit 1;; (*) break;; @@ -188,7 +189,7 @@ fi #============================== cat > ${crabFile} <> tmp/alcareco.cfg <> tmp/alcareco.cfg < tmp/crab.cfg < Date: Wed, 22 Jan 2014 17:02:52 +0100 Subject: [PATCH 245/475] from CMSSW_7_0_X PFiso included in standard sequences --- ALCARAW_RECO/python/alcaSkimming.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 5a856c3d00e..209292c2455 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -143,15 +143,6 @@ process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_Output_cff') process.load('Calibration.ALCARAW_RECO.ALCARECOEcalUncalIsolElectron_Output_cff') from Calibration.ALCARAW_RECO.sandboxRerecoOutput_cff import * -#Define the sequences -# -# particle flow isolation -# -process.pfIsoEgamma = cms.Sequence() -if(options.type=='ALCARECO' or options.type=='ALCARECOSIM'): - from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso - process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') - process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) #process.load('Configuration.StandardSequences.AlCaRecoStreams_cff') # this is for official ALCARAW ALCARECO production process.load('Calibration.ALCARAW_RECO.ALCARECOEcalCalIsolElectron_cff') # reduction of recHits @@ -304,11 +295,26 @@ process.GlobalTag.globaltag = 'START61_V11::All' else: process.GlobalTag.globaltag = 'GR_P_V42B::All' # 5_3_3 Prompt - + elif(re.match("CMSSW_7_0_.*",CMSSW_VERSION)): + if(MC): + print "[INFO] Using GT POSTLS162_V5::All" + process.GlobalTag.globaltag = 'POSTLS162_V5::All' + else: + print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION else: print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION +#Define the sequences +# +# particle flow isolation +# +process.pfIsoEgamma = cms.Sequence() +if((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): + from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso + process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') + process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) + ############################### # Event filter sequence: process.filterSeq # sanbox sequence: process.seqALCARECOEcalUncalElectron + process.alcarecoElectronTracksReducerSeq From 6d5bd6209e8cd45b59812ac060c8079dfc532ede Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 22 Jan 2014 17:21:04 +0100 Subject: [PATCH 246/475] all --- ALCARAW_RECO/doc/alcaraw_alcareco_production.txt | 8 ++++++-- README | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt index 5df751e2e68..b3c558a22ed 100644 --- a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt +++ b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt @@ -1,7 +1,10 @@ +/** +* \page page2 Instructions for ALCARAW and ALCARECO production +* \verbatim #============================== ALCARECO and ALCARAW production instructions Steps for the production using the CERN batch system (launch from lxplus): -0) Check that there are no updates in the repository: +0) Check that there are no updates in the repository: git pull # this will merge automatically the updates in the master branch @@ -30,7 +33,6 @@ For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.d 4) Commit the changes to alcaraw_datasets.dat! svn ci -m "message" - #### ALCARECO private production 1) Fill the alcareco_datasets.dat with the information of the desired run range It is convenient to add the new line at the bottom of the file. @@ -139,3 +141,5 @@ N.B: max(run.run_number) has to be always greater than the last run in JSON Then, copy and past the last updated line from the alcaraw_datasets.dat and change the run range accordingly +\endverbatim +*/ diff --git a/README b/README index b3422709c16..12a2148c68d 100644 --- a/README +++ b/README @@ -2,6 +2,8 @@ * \mainpage * Introduction: \ref page1 * +* \ref page2 +* * Working with ntuples: \ref page4 * * Instructions for ECAL validator (rereco + ntuple production): \ref page5 From fe3d6bb28b0edf9343b9fced4c807b81c020543e Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 22 Jan 2014 17:22:51 +0100 Subject: [PATCH 247/475] added instructions to load the init script --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 553a497a8f9..6ae378fc317 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,19 @@ Download instructions. `cd Calibration/ZFitter && make && cd -` +If you are using a tcsh shell: +`cd Calibration && source initCmsEnv.csh` + +If you are using a bash shell: +`cd Calibration && source initCmsEnv.sh` + ====== Code documentation: Once downloaded the code, in Calibration/ you can run the command `doxygen fulldoc` -to have the code documentation produced by doxygen opening the doc/doxygen/fulldoc/html/index.html with your browser +to have the code documentation produced by doxygen opening the `doc/doxygen/fulldoc/html/index.html` with your browser ====== From 9b2cdb4b0b1307f19004af28003482491ac739a5 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 22 Jan 2014 18:03:47 +0100 Subject: [PATCH 248/475] fixed tutorial for rereco --- ALCARAW_RECO/scripts/RerecoQuick.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/scripts/RerecoQuick.sh b/ALCARAW_RECO/scripts/RerecoQuick.sh index 9a525e4e9e8..61d3c8bd5d2 100755 --- a/ALCARAW_RECO/scripts/RerecoQuick.sh +++ b/ALCARAW_RECO/scripts/RerecoQuick.sh @@ -117,11 +117,11 @@ fi if [ -n "${TUTORIAL}" ];then case ${PERIOD} in - RUN2012) + RUN2012A) ;; *) echo "[ERROR] With the tutorial mode, the only permitted period is:" - echo " RUN2012" + echo " RUN2012A" #echo " Be sure to have it in alcaraw_datasets.dat and to have selected it using the parseDatasetFile.sh" exit 1 ;; From 697c42200f82de66963fde3bcbd01469822f9738 Mon Sep 17 00:00:00 2001 From: shervin86 Date: Wed, 22 Jan 2014 18:52:16 +0100 Subject: [PATCH 249/475] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 6ae378fc317..f09222d0c50 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ ECALELF Code for electron calibration in CMS Testing +====== +Preliminary instructions: GitHub account +Be sure to have a GitHub account and have followed the instructions here: +`http://cms-sw.github.io/cmssw/faq.html#how_do_i_subscribe_to_github` + ====== Download instructions. From 553622a036de5fb814af107e3f5b57edaaa90bca Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 22 Jan 2014 18:54:53 +0100 Subject: [PATCH 250/475] removed patch in CMSSW_7_0_X --- setup_git.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index e45ae37eae0..9992229d28c 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -14,7 +14,7 @@ checkVERSION(){ ;; *) echo "[ERROR] Sorry, $CMSSW_VERSION not configured for ECALELF" - echo " Be sure that you don't want 4_2_8_patch7 or CMSSW_4_4_5_patch2 or 5_3_7_patch5 or CMSSW_6_1_*" + echo " Be sure that you don't want 4_2_8_patch7 or CMSSW_4_4_5_patch2 or 5_3_14_patch2 or CMSSW_7_0_*" exit 1 ;; @@ -228,7 +228,7 @@ case $CMSSW_VERSION in if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then patch -p0 < $myDir/ALCARAW_RECO/test/clusterLazyTools.patch >> setup.log || exit 1 fi - patch -p0 < $myDir/ALCARAW_RECO/test/class_def.xml.patch >> setup.log || exit 1 +# patch -p0 < $myDir/ALCARAW_RECO/test/class_def.xml.patch >> setup.log || exit 1 cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 From fab2beb67a35b247e9a8fd51e7ba50c4af8a582f Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 09:14:02 +0100 Subject: [PATCH 251/475] fixed path error in init script --- initCmsEnv.csh | 2 +- initCmsEnv.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/initCmsEnv.csh b/initCmsEnv.csh index ec3b788e60b..5f5806d8c5f 100644 --- a/initCmsEnv.csh +++ b/initCmsEnv.csh @@ -8,5 +8,5 @@ voms-proxy-init -voms cms -out $HOME/gpi.out #cd calibration/SANDBOX #setenv PATH $PWD/bin:$PATH setenv PATH $PATH":/afs/cern.ch/project/eos/installation/pro/bin/" -setenv PATH $PATH":$CMSSW_BASE/Calibration/ALCARAW_RECO/bin" +setenv PATH $PATH":$CMSSW_BASE/src/Calibration/ALCARAW_RECO/bin" diff --git a/initCmsEnv.sh b/initCmsEnv.sh index 069d89bd076..750d4806ead 100644 --- a/initCmsEnv.sh +++ b/initCmsEnv.sh @@ -10,5 +10,5 @@ voms-proxy-init -voms cms -out $HOME/gpi.out #PATH=`echo $PATH | sed 's|/afs/cern.ch/project/eos/installation/pro/bin/||'` PATH=$PATH:/afs/cern.ch/project/eos/installation/pro/bin/ -PATH=$PATH:$CMSSW_BASE/Calibration/ALCARAW_RECO/bin +PATH=$PATH:$CMSSW_BASE/src/Calibration/ALCARAW_RECO/bin From bdfd0166f29d76071f52391ac61464b5501c19e1 Mon Sep 17 00:00:00 2001 From: shervin86 Date: Thu, 23 Jan 2014 09:23:28 +0100 Subject: [PATCH 252/475] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f09222d0c50..1b2419f5cc2 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Be sure to have a GitHub account and have followed the instructions here: ====== Download instructions. -`wget https://raw.github.com/ECALELFS/ECALELF/master/setup_git.sh` +`wget --no-check-certificate https://raw.github.com/ECALELFS/ECALELF/master/setup_git.sh` `chmod +x setup_git.sh` From 1545cefb112d6a9ec9c8991141f7bbbafbc87213 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 10:37:47 +0100 Subject: [PATCH 253/475] new rereco for test --- .../config/reRecoTags/rereco_22Jan2013_shervin.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013_shervin.py diff --git a/ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013_shervin.py b/ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013_shervin.py new file mode 100644 index 00000000000..c020b873632 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/rereco_22Jan2013_shervin.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +# 22Jan rereco GT: +#http://cms-conddb.cern.ch/gtlist/?GlobalTag=FT_R_53_V21 + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) From 4e8635428545023368f73e4556e71abff5733e43 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 10:58:47 +0100 Subject: [PATCH 254/475] fixed obsolete server for crab --- ALCARAW_RECO/scripts/prodAlcarereco.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index ad318bd269f..ca986867c75 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -272,7 +272,7 @@ fi crabFile=tmp/alcarereco.cfg cat > $crabFile < Date: Thu, 23 Jan 2014 12:26:55 +0100 Subject: [PATCH 255/475] fixing value map traslator --- ALCARAW_RECO/python/alcaSkimming.py | 12 ++++++++++++ ValueMapTraslator/python/valuemaptraslator_cfi.py | 6 +++--- ValueMapTraslator/src/ValueMapTraslator.cc | 7 +++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 209292c2455..f5c6a1421fd 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -658,6 +658,18 @@ process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile.value() process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile.value() process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile.value() +process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile.value() +process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile.value() # process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2012Weights_V1.root") #eleEnergyRegWeights_WithSubClusters_VApr15.root") process.eleRegressionEnergy.energyRegressionType=cms.uint32(2) diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index ac50271d781..25ef0a1781e 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -1,21 +1,21 @@ import FWCore.ParameterSet.Config as cms elPFIsoValueCharged03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdGsf'), + inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdGsf'), + inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), oldreferenceCollection = cms.InputTag('gsfElectrons') ) elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', - inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdGsf'), + inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), oldreferenceCollection = cms.InputTag('gsfElectrons') diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index 652b6fa5353..e5300b11989 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -114,9 +114,7 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) //------------------------------ iEvent.getByLabel(referenceCollectionTAG, referenceHandle); -#ifdef DEBUG iEvent.getByLabel(oldreferenceCollectionTAG, oldreferenceHandle); -#endif iEvent.getByLabel(inputCollectionTAG, inputHandle); for(Map_t::const_iterator valueMap_itr = inputHandle->begin(); @@ -133,7 +131,7 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) #ifdef DEBUG std::cout << "Size: " << referenceHandle->size() << "\t" << oldreferenceHandle->size() << "\t" << inputHandle->size() << "\t" << valueVector.size() << std::endl; - +#endif for(reco::GsfElectronCollection::const_iterator electronNew = referenceHandle->begin(); electronNew!= referenceHandle->end(); electronNew++){ @@ -141,6 +139,7 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) for(reco::GsfElectronCollection::const_iterator electron = oldreferenceHandle->begin(); electron!= oldreferenceHandle->end(); electron++){ + //if(electronNew->GsfTrackF if(fabs(electronNew->eta() - electron->eta())>0.0001) continue; if(fabs(electronNew->phi() - electron->phi())>0.0001) continue; @@ -156,7 +155,7 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) valueVector.push_back((*inputHandle)[eleRef]); //valueMap_itr-inputHandle->begin()])); } } -#endif + //#endif Map_t::Filler filler(*valueVectorPtr); filler.insert(referenceHandle, valueVector.begin(), valueVector.end()); filler.fill(); From 49cce3e11567aaf5bbd5c8b77428e32f5d131796 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 12:42:13 +0100 Subject: [PATCH 256/475] fixed isCrab for local running --- ALCARAW_RECO/python/alcaSkimming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index f5c6a1421fd..4ff998a12c7 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -13,7 +13,7 @@ ### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register('isCrab', - '0', # default Value = true + '1', # default Value = true VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float "change files path in case of local test") @@ -646,7 +646,7 @@ # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -if(options.isCrab): +if(options.isCrab==1): pathPrefix="" else: pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' From 4803d294757531b426f7c4d47379a50c6f5970ee Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 12:52:13 +0100 Subject: [PATCH 257/475] fixing --- ALCARAW_RECO/scripts/prodAlcarereco.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index ca986867c75..7f3ea2efcce 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -203,7 +203,7 @@ esac ALCARAW_REMOTE_DIR=$ALCARAW_REMOTE_DIR_BASE/${ENERGY}/${DATASETNAME}/${RUNRANGE} -setUserRemoteDirAlcarereco +setUserRemoteDirAlcarereco $USER_REMOTE_DIR #USER_REMOTE_DIR=$USER_REMOTE_DIR_BASE/${ENERGY}/${TAG}/${DATASETNAME}/${RUNRANGE} NTUPLE_REMOTE_DIR=$NTUPLE_REMOTE_DIR_BASE/${ENERGY}/${TYPE} From 4efd813ec5ed7c3ded8dacc315d9eac3d4debb41 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 12:57:13 +0100 Subject: [PATCH 258/475] fixed --- ALCARAW_RECO/scripts/prodAlcarereco.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index 7f3ea2efcce..9caaf959e71 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -203,7 +203,7 @@ esac ALCARAW_REMOTE_DIR=$ALCARAW_REMOTE_DIR_BASE/${ENERGY}/${DATASETNAME}/${RUNRANGE} -setUserRemoteDirAlcarereco $USER_REMOTE_DIR +setUserRemoteDirAlcarereco $USER_REMOTE_DIR_BASE #USER_REMOTE_DIR=$USER_REMOTE_DIR_BASE/${ENERGY}/${TAG}/${DATASETNAME}/${RUNRANGE} NTUPLE_REMOTE_DIR=$NTUPLE_REMOTE_DIR_BASE/${ENERGY}/${TYPE} From dbb1c433d44c25502964d385f507b3985e5853ff Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 13:25:09 +0100 Subject: [PATCH 259/475] updated rerecoes --- ALCARAW_RECO/alcarereco_datasets.dat | 1 + ALCARAW_RECO/ntuple_datasets.dat | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat index 09c9bce8519..7c42edda1e1 100644 --- a/ALCARAW_RECO/alcarereco_datasets.dat +++ b/ALCARAW_RECO/alcarereco_datasets.dat @@ -33,3 +33,4 @@ 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco rereco_22Jan2013_shervin diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index ba255ca0f76..063bc5fa321 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -196,3 +196,6 @@ allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START5 175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 160404-180252-08Nov_v2 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 From d653bad161094bd7a1d2de69417d3ca56e8b89db Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 14:47:12 +0100 Subject: [PATCH 260/475] cmsenv replaced with eval command --- initCmsEnv.csh | 2 +- initCmsEnv.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/initCmsEnv.csh b/initCmsEnv.csh index 5f5806d8c5f..9bea739b9d9 100644 --- a/initCmsEnv.csh +++ b/initCmsEnv.csh @@ -1,7 +1,7 @@ #!/bin/tcsh source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.csh -cmsenv +eval `scramv1 runtime -csh` source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.csh voms-proxy-init -voms cms -out $HOME/gpi.out diff --git a/initCmsEnv.sh b/initCmsEnv.sh index 750d4806ead..e8c33cdb22c 100644 --- a/initCmsEnv.sh +++ b/initCmsEnv.sh @@ -1,7 +1,7 @@ #!/bin/bash source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh -cmsenv +eval `scramv1 runtime -csh` source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh voms-proxy-init -voms cms -out $HOME/gpi.out From 66cb11029124b8a9f4816c0fec5aeb061bafab92 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 23 Jan 2014 14:52:06 +0100 Subject: [PATCH 261/475] NB --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 1b2419f5cc2..002b4d2c327 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,12 @@ If you are using a tcsh shell: If you are using a bash shell: `cd Calibration && source initCmsEnv.sh` +Every time you enter in a new shell you have to do: +`source initCmsEnv.csh` +or +`source initCmsEnv.sh` + + ====== Code documentation: Once downloaded the code, in Calibration/ you can run the command From af72d6a5a80e175384d602318dbd683fcda0c5ec Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 11:56:26 +0100 Subject: [PATCH 262/475] testing RelVal 700 --- ALCARAW_RECO/alcareco_datasets.dat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 8e65bafc4ac..689bc0500a3 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -81,3 +81,5 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- ##################### 2011 data 53X rereco 160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011A, RUN2011AB 175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011B, RUN2011AB +########### +allRange /RelValZEE_13/CMSSW_7_0_0_pre11-PU50ns_POSTLS162_V5_OldEG-v1/GEN-SIM-RECO RelValZEE_13-CMSSW_700_pre11-POSTLS162_V5_OldEG-v1 caf group/alca_ecalcalib/ecalelf/alcareco From 4578f5dd201f9e6ca1b54920c2578bdee31bb127 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 11:57:59 +0100 Subject: [PATCH 263/475] adding electron regression weights from package --- setup_git.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index 9992229d28c..b49b7cee172 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -199,15 +199,16 @@ case $CMSSW_VERSION in # cd RecoEgamma/EgammaTools >> setup.log || exit 1 # git checkout RecoEgamma-EgammaTools-V09-00-01 >> setup.log || exit 1 # cd - >> setup.log || exit 1 -# git clone https://github.com/cms-analysis/EgammaAnalysis-ElectronTools EgammaAnalysis/ElectronTools >> setup.log || exit 1 + git-cms-addpkg EgammaAnalysis/ElectronTools >> setup.log || exit 1 +# git clone https://github.com/cms-analysis/EgammaAnalysis-ElectronTools EgammaAnalysis/ElectronTools # cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 # git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 # cd - >> setup.log || exit 1 # patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 -# cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 -# cat download.url | xargs wget >> setup.log || exit 1 -# cd - >> setup.log || exit 1 + cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 + cat download.url | grep '.root' | xargs wget >> setup.log || exit 1 + cd - >> setup.log || exit 1 ###### New Josh regression mkdir HiggsAnalysis/ From f7006e8218c7736b580d84c8c016ff26ea1375db Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 11:58:34 +0100 Subject: [PATCH 264/475] fixing paths for Josh's regression weights and isoDepositsName --- ALCARAW_RECO/python/alcaSkimming.py | 28 +++++++++++++--- .../python/elenewenergiesproducer_cfi.py | 32 +++++++++---------- .../src/EleSelectionProducers.cc | 8 +++++ 3 files changed, 48 insertions(+), 20 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 4ff998a12c7..7fb42b477ad 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -165,7 +165,6 @@ -#process.MessageLogger.cerr.FwkReport.reportEvery = 500 process.MessageLogger.cerr = cms.untracked.PSet( optionalPSet = cms.untracked.bool(True), INFO = cms.untracked.PSet( @@ -195,7 +194,9 @@ ), threshold = cms.untracked.string('INFO') ) - +if(options.isCrab==0): + process.MessageLogger.cerr.FwkReport.reportEvery = 1 + process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) ) @@ -314,6 +315,25 @@ from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) +elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): + # getting the ptrs + from RecoParticleFlow.PFProducer.pfLinker_cff import particleFlowPtrs + process.pfIsoEgamma*=particleFlowPtrs + process.load('CommonTools.ParticleFlow.pfNoPileUpIso_cff') + process.pfPileUp.PFCandidates = 'particleFlowPtrs' + process.pfNoPileUp.bottomCollection = 'particleFlowPtrs' + process.pfPileUpIso.PFCandidates = 'particleFlowPtrs' + process.pfNoPileUpIso.bottomCollection='particleFlowPtrs' + process.pfPileUpJME.PFCandidates = 'particleFlowPtrs' + process.pfNoPileUpJME.bottomCollection='particleFlowPtrs' + + # process.load('RecoParticleFlow/Configuration/python/RecoParticleFlow_cff') #CommonTools.ParticleFlow.PFBRECO_cff') + process.pfIsoEgamma*= process.pfNoPileUpSequence * process.pfNoPileUpIsoSequence + process.load('CommonTools.ParticleFlow.ParticleSelectors.pfSortByType_cff') + process.pfIsoEgamma*=process.pfSortByTypeSequence + process.load('RecoEgamma.EgammaElectronProducers.electronPFIsolationDeposits_cff') + #pfisoALCARECO = cms.Sequence(eleIsoSequence) + process.pfIsoEgamma*= process.electronPFIsolationDepositsSequence #* process.gedElectronPFIsolationDepositsSequence ############################### # Event filter sequence: process.filterSeq @@ -638,7 +658,7 @@ else: process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step #, process.NtuplePath + process.ALCARECOoutput_step, process.NtuplePath ) # fix the output modules @@ -649,7 +669,7 @@ if(options.isCrab==1): pathPrefix="" else: - pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' + pathPrefix=CMSSW_BASE+'/src/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() process.eleNewEnergiesProducer.regrEleFile=pathPrefix+process.eleNewEnergiesProducer.regrEleFile.value() diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index 43c99d7cfbf..bdcdd91d809 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -16,21 +16,21 @@ correctionFileName = cms.string(''), correctionType = cms.string(''), ptSplit = cms.bool(True), - regrEleJoshV4_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v4_forest_ele.root'), - regrPhoJoshV4_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v4_forest_ph.root'), - regrEleJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ele.root'), - regrPhoJoshV5_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v5_forest_ph.root'), - regrEleJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_8TeV_forest_ele.root'), - regrPhoJoshV6_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_8TeV_forest_ph.root'), - regrEleJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_8TeV_forest_ele.root'), - regrPhoJoshV7_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_8TeV_forest_ph.root'), - regrEleJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_8TeV_forest_ele.root'), - regrPhoJoshV8_SemiParamFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_8TeV_forest_ph.root'), - regrEleJoshV6_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ele.root'), - regrPhoJoshV6_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v6_7TeV_forest_ph.root'), - regrEleJoshV7_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ele.root'), - regrPhoJoshV7_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v7_7TeV_forest_ph.root'), - regrEleJoshV8_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ele.root'), - regrPhoJoshV8_SemiParam7TeVtrainFile = cms.string('src/Calibration/EleNewEnergiesProducer/data/regweights_v8_7TeV_forest_ph.root'), + regrEleJoshV4_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ele.root'), + regrPhoJoshV4_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ph.root'), + regrEleJoshV5_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ele.root'), + regrPhoJoshV5_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ph.root'), + regrEleJoshV6_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ele.root'), + regrPhoJoshV6_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ph.root'), + regrEleJoshV7_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ele.root'), + regrPhoJoshV7_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ph.root'), + regrEleJoshV8_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ele.root'), + regrPhoJoshV8_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ph.root'), + regrEleJoshV6_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ele.root'), + regrPhoJoshV6_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ph.root'), + regrEleJoshV7_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ele.root'), + regrPhoJoshV7_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ph.root'), + regrEleJoshV8_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ele.root'), + regrPhoJoshV8_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ph.root'), ) diff --git a/EleSelectionProducers/src/EleSelectionProducers.cc b/EleSelectionProducers/src/EleSelectionProducers.cc index 9f180af21df..111cdbb1a89 100644 --- a/EleSelectionProducers/src/EleSelectionProducers.cc +++ b/EleSelectionProducers/src/EleSelectionProducers.cc @@ -192,6 +192,14 @@ void EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& i //------------------------------ ISO DEPOSITS iEvent.getByLabel(chIsoValsTAG, chIsoValsHandle); + if(!chIsoValsHandle.isValid()){ + chIsoValsTAG=edm::InputTag(chIsoValsTAG.label().substr(0,chIsoValsTAG.label().find("PFIso",chIsoValsTAG.label().size()-6))+"Gsf", chIsoValsTAG.instance(), chIsoValsTAG.process()); + emIsoValsTAG=edm::InputTag(emIsoValsTAG.label().substr(0,emIsoValsTAG.label().find("PFIso",emIsoValsTAG.label().size()-6))+"Gsf", emIsoValsTAG.instance(), emIsoValsTAG.process()); + nhIsoValsTAG=edm::InputTag(nhIsoValsTAG.label().substr(0,nhIsoValsTAG.label().find("PFIso",nhIsoValsTAG.label().size()-6))+"Gsf", nhIsoValsTAG.instance(), nhIsoValsTAG.process()); + + iEvent.getByLabel(chIsoValsTAG, chIsoValsHandle); + + } iEvent.getByLabel(emIsoValsTAG, emIsoValsHandle); iEvent.getByLabel(nhIsoValsTAG, nhIsoValsHandle); From 79cb3ebcf03acbd2e54a41434745807349072ff6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 12:16:14 +0100 Subject: [PATCH 265/475] added ECALELFINIT variable to shell to check the initialization --- ALCARAW_RECO/scripts/prodFunctions.sh | 23 +++++++++++++++++++++++ initCmsEnv.csh | 2 ++ initCmsEnv.sh | 4 +++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index 682ae04260a..0a29f9909c0 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -1,3 +1,26 @@ +checkInitECALELF(){ + if [ -z "$ECALELFINIT" ];then + echo "[ERROR] ECALELF not initialized: execute the following command" >> /dev/stderr + case $SHELL in + *bash) + echo "source $CMSSW_BASE/src/Calibration/initCmsEnv.sh">> /dev/stderr + ;; + *csh) + echo "source $CMSSW_BASE/src/Calibration/initCmsEnv.csh">> /dev/stderr + ;; + *) + echo "if you use a bash-like shell:">> /dev/stderr + echo "source $CMSSW_BASE/src/Calibration/initCmsEnv.sh">> /dev/stderr + echo "if you use a csh-like shell:">> /dev/stderr + echo "source $CMSSW_BASE/src/Calibration/initCmsEnv.csh" >> /dev/stderr + ;; + esac + exit 1 + fi +} + +checkInitECALELF + setStoragePath(){ #$1 = storage_element #$2 = scheduler diff --git a/initCmsEnv.csh b/initCmsEnv.csh index 9bea739b9d9..048d7c618d9 100644 --- a/initCmsEnv.csh +++ b/initCmsEnv.csh @@ -10,3 +10,5 @@ voms-proxy-init -voms cms -out $HOME/gpi.out setenv PATH $PATH":/afs/cern.ch/project/eos/installation/pro/bin/" setenv PATH $PATH":$CMSSW_BASE/src/Calibration/ALCARAW_RECO/bin" +setenv ECALELFINIT y + diff --git a/initCmsEnv.sh b/initCmsEnv.sh index e8c33cdb22c..58755a162b4 100644 --- a/initCmsEnv.sh +++ b/initCmsEnv.sh @@ -1,7 +1,7 @@ #!/bin/bash source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh -eval `scramv1 runtime -csh` +eval `scramv1 runtime -sh` source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh voms-proxy-init -voms cms -out $HOME/gpi.out @@ -12,3 +12,5 @@ voms-proxy-init -voms cms -out $HOME/gpi.out PATH=$PATH:/afs/cern.ch/project/eos/installation/pro/bin/ PATH=$PATH:$CMSSW_BASE/src/Calibration/ALCARAW_RECO/bin +export ECALELFINIT=y + From 38d1aa70a79dc7abbbf2d168eb483d5ecb7d6b6a Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 14:09:38 +0100 Subject: [PATCH 266/475] resubmitting if crab report missing and job exited with code 2 --- ALCARAW_RECO/scripts/resubmitCrab.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index fa08c5a7ff7..5d8daeb0701 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -63,7 +63,13 @@ for jobID in `seq 1 $nJobs` if [ ! -e "$jobReport" ];then echo "-> Missing $jobReport" - continue; + if [ "`grep -c "Exited with exit code 2" $logReport`" != "0" ];then + echo "[INFO] Problem with lxbatch node, resubmitting" + intervals="$intervals $jobID" + continue; + else + continue; + fi fi @@ -145,7 +151,9 @@ for jobID in `seq 1 $nJobs` 50115*50115) intervals="$intervals $jobID" ;; - + 50700*50700) + intervals="$intervals $jobID" + ;; *) echo $jobID $ExitCode From db6d0e3a4480c0ad8dbe18c56bacf1018f8fc081 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 14:10:33 +0100 Subject: [PATCH 267/475] fixed isCrab in python --- ALCARAW_RECO/ntuple_datasets.dat | 1 + ALCARAW_RECO/python/alcaSkimming.py | 3 ++- ALCARAW_RECO/scripts/prodAlcarereco.sh | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 063bc5fa321..44d5bf39dea 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -199,3 +199,4 @@ allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START5 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 7fb42b477ad..dbec1d61de6 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -666,10 +666,11 @@ # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -if(options.isCrab==1): +if(options.isCrab=='1'): pathPrefix="" else: pathPrefix=CMSSW_BASE+'/src/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' + print "[INFO] Running locally: pathPrefix="+pathPrefix process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() process.eleNewEnergiesProducer.regrEleFile=pathPrefix+process.eleNewEnergiesProducer.regrEleFile.value() diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index 9caaf959e71..9316fbcc8f9 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -283,10 +283,11 @@ queue = cmscaf1nd [CMSSW] +allow_NonProductionCMSSW = 1 datasetpath=None pset=python/alcaSkimming.py -pycfg_params=output=alcarereco.root type=ALCARERECO tagFile=${TAGFILE} doTree=${DOTREE} doTreeOnly=0 jsonFile=${JSONFILE} secondaryOutput=ntuple.root +pycfg_params=output=alcarereco.root type=ALCARERECO tagFile=${TAGFILE} doTree=${DOTREE} doTreeOnly=0 jsonFile=${JSONFILE} secondaryOutput=ntuple.root isCrab=1 runselection=${RUNRANGE} split_by_run=0 From 4820e2c9eff1d2fe4cc1169d18f76665ab5a616a Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 14:19:34 +0100 Subject: [PATCH 268/475] fix --- ALCARAW_RECO/python/alcaSkimming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index dbec1d61de6..0bfe06c614d 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -666,7 +666,7 @@ # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -if(options.isCrab=='1'): +if(options.isCrab==1): pathPrefix="" else: pathPrefix=CMSSW_BASE+'/src/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' From 599533963ccfbd6e4911a7c839d0f389f21fde94 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 14:53:23 +0100 Subject: [PATCH 269/475] fixes --- ALCARAW_RECO/ntuple_datasets.dat | 1 + ALCARAW_RECO/python/alcaSkimming.py | 2 +- .../python/elenewenergiesproducer_cfi.py | 32 +++++++++---------- ZNtupleDumper/python/patSequence_cff.py | 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 44d5bf39dea..33580540d44 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -200,3 +200,4 @@ allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START5 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 0bfe06c614d..ca3cb3e0b85 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -669,7 +669,7 @@ if(options.isCrab==1): pathPrefix="" else: - pathPrefix=CMSSW_BASE+'/src/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' + pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' print "[INFO] Running locally: pathPrefix="+pathPrefix process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index bdcdd91d809..c625d924058 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -16,21 +16,21 @@ correctionFileName = cms.string(''), correctionType = cms.string(''), ptSplit = cms.bool(True), - regrEleJoshV4_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ele.root'), - regrPhoJoshV4_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ph.root'), - regrEleJoshV5_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ele.root'), - regrPhoJoshV5_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ph.root'), - regrEleJoshV6_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ele.root'), - regrPhoJoshV6_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ph.root'), - regrEleJoshV7_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ele.root'), - regrPhoJoshV7_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ph.root'), - regrEleJoshV8_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ele.root'), - regrPhoJoshV8_SemiParamFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ph.root'), - regrEleJoshV6_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ele.root'), - regrPhoJoshV6_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ph.root'), - regrEleJoshV7_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ele.root'), - regrPhoJoshV7_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ph.root'), - regrEleJoshV8_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ele.root'), - regrPhoJoshV8_SemiParam7TeVtrainFile = cms.string('HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ph.root'), + regrEleJoshV4_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ele.root'), + regrPhoJoshV4_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ph.root'), + regrEleJoshV5_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ele.root'), + regrPhoJoshV5_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ph.root'), + regrEleJoshV6_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ele.root'), + regrPhoJoshV6_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ph.root'), + regrEleJoshV7_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ele.root'), + regrPhoJoshV7_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ph.root'), + regrEleJoshV8_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ele.root'), + regrPhoJoshV8_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ph.root'), + regrEleJoshV6_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ele.root'), + regrPhoJoshV6_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ph.root'), + regrEleJoshV7_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ele.root'), + regrPhoJoshV7_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ph.root'), + regrEleJoshV8_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ele.root'), + regrPhoJoshV8_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ph.root'), ) diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 2a40af0f29e..7080d4ad440 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -14,7 +14,7 @@ from Calibration.EleNewEnergiesProducer.elenewenergiesproducer_cfi import * eleNewEnergiesProducer.regrPhoFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ph_52x.root' eleNewEnergiesProducer.regrEleFile='src/Calibration/EleNewEnergiesProducer/data/gbrv3ele_52x.root' -eleNewEnergiesProducer.regrEleFile_fra='src/Calibration/EleNewEnergiesProducer/data/eleEnergyRegWeights_V1.root' +#eleNewEnergiesProducer.regrEleFile_fra='src/Calibration/EleNewEnergiesProducer/data/eleEnergyRegWeights_V1.root' eleNewEnergiesProducer.ptSplit=cms.bool(False) from EgammaAnalysis.ElectronTools.electronRegressionEnergyProducer_cfi import * From 7d2b737fb809368eced6f01739903b18fd084b5e Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 15:54:29 +0100 Subject: [PATCH 270/475] 22Jan private rereco ntuples --- ZFitter/data/validation/22Jan2012-runDepMC-rereco.dat | 1 + 1 file changed, 1 insertion(+) create mode 100644 ZFitter/data/validation/22Jan2012-runDepMC-rereco.dat diff --git a/ZFitter/data/validation/22Jan2012-runDepMC-rereco.dat b/ZFitter/data/validation/22Jan2012-runDepMC-rereco.dat new file mode 100644 index 00000000000..01069af1b7f --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-runDepMC-rereco.dat @@ -0,0 +1 @@ +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARERECO/rereco_22Jan2013_shervin/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22JanReReco_v1/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root From a3b974da0f70c2a49e9fba56dfaf95b5f097ca9a Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 16:19:31 +0100 Subject: [PATCH 271/475] updating instructions for ZFitter validation --- ZFitter/doc/README | 19 +++-- ZFitter/script/monitoring_validation.sh | 8 +- ZNtupleDumper/doc/README | 106 ------------------------ 3 files changed, 18 insertions(+), 115 deletions(-) delete mode 100644 ZNtupleDumper/doc/README diff --git a/ZFitter/doc/README b/ZFitter/doc/README index 0791c1b78bf..beb03b28c7d 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -8,7 +8,11 @@ There are three important directories where the proper .dat files should be put: - data/validation/ - +For the validation, the .dat files has to be put in a subdirectory of data/validation: + ./data/validation/rereco/rerecoGroupName/ + where rerecoGroupName is a name that you assign to a group of rerecoes that you want to test + for example: you can use ./data/validation/rereco/Cal_Dic2013/ + or ./data/validation/rereco/ungrouped/ #============================== validation config .dat file creation to be put in data/validation/ @@ -142,19 +146,24 @@ s pileupTree file.root #============================== RERECO VALIDATION instructions -1) If it does not exist yet, create the PU distribution in data with the proper script in ZNtupleDumper - See PU data section in Calibration/ZNtupleDumper/doc/README for details +1) If it does not exist yet, create the PU distribution in data -> FIXME 2) Create the .dat config file and put it into (see previous section for details) ./data/validation/rereco/rerecoGroupName/ + - rerecoGroupName is a name the subdirectory where you want to group 3) Be sure that the runRanges .dat file has the proper run ranges for the stability plots ./data/runRanges/monitoring.dat -4) Launch the fit: -./script/monitoring_validation.sh -f data/validation/file.dat --selection WP80_PU --invMass_var=invMass_SC --rereco rerecoGroupName +4) The fit is done in several di-electron categories defined in .dat files in the following directory: + ./data/regions/ + - the default one used for the validation is ./data/regions/validation.dat + - The regions can be defined following the syntax indicated in ZFitter/interface/ElectronCategory_class.hh +4) Launch the fit: +./script/monitoring_validation.sh -f data/validation/file.dat --selection loose --invMass_var=invMass_SC --rereco rerecoGroupName + #============================== produce run ranges file diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index 46ab2ce4b3c..855c01d436f 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -29,10 +29,10 @@ usage(){ echo " --runRangesFile arg (=${runRangesFile}) run ranges for stability plots" echo " --selection arg (=${selection}) " echo " --invMass_var arg (=${invMass_var})" - echo " --validation " - echo " --stability " - echo " --etaScale " - echo " --R9Ele " + echo " --validation: run the validation only, not the history and etaScale fits" + echo " --stability: run the stability fits only" + echo " --etaScale: run the fits in |eta| only" + echo " --R9Ele: run the fits in bin of R9 only" echo " --systematics all/pu " echo " --refreg" echo " --slides " diff --git a/ZNtupleDumper/doc/README b/ZNtupleDumper/doc/README deleted file mode 100644 index de332d8dbf7..00000000000 --- a/ZNtupleDumper/doc/README +++ /dev/null @@ -1,106 +0,0 @@ -/** -* \page page3 -* \verbatim -############################################################ -## ECALELF (Ecal CALibration with ELectrons Framework) -## study and calibration with Zee -## Code instructions and explanations -############################################################ - -################################### -# ZNtupleDumper step (and module) -################################### - - - -============================== Introduction -This module is dedicated to the production of the ntuples, -it contains all the c++ code for the Z ntuple dumping starting from -patElectrons with embedded regression energies and electronID - -In this module you can find also the python cfg file to produce the -ntuples from ALCARECO running the sequence that select the event, -produce the new regression energies, produces the patElectron and -finally dump in the ZNtuples. - -There are also all the scripts to launch the production on - - official alcareco - - privately produced alcareco - - alcarereco (alcareco after rereco with ECALELF) - - -============================== Ntuple production a la ECALELF -In order to produce the ntuples, you need - - the alcareco or alcarereco - - a json file - -Here the important scripts: - - ./script/dataPU.sh: this script gives you - - the last json file available - merged with the 13Julv2 JSON file - - the json file reduced to a given run range - - the PU distribution in data for a give run range and - according to the mentioned merged json file - - ./script/prodNtuples.sh: this script creates the crab task for the - ntuple production - The script options are -prodNtuples.sh [options] ------ Common - --type alcareco|alcarecosim|alcarereco|officialAlcareco: - alcareco: produced privately on data - alcarecosim: alcareco produced centrally or privately on MC - alcarereco: alcareco format after rereco on SANDBOX - officialAlcareco: produced centrally - --extraName arg: additional name for folder structure (to make different versions) ------ MC - --isMC - --puWeight file.root ------ DATA - --json_name jsonName - --json jsonFile.root - - --ui_working_dir dir: do not use the default crab ui_working_dir (optional) - --store: storage element for crab: (def=caf) - --remote_dir: user remote dir on the storage element: --remote_dir group/alca_ecalcalib/alcareco - --ntuple_remote_dir DIR: base directory storing the ntuples: --ntuple_remote_dir caf/user/shervin/Calibration/8TeV/ZNtuples - -Ex. ./script/prodNtuples.sh --type alcareco \ ---json tmp/201230-201678.json --json_name 201230-201678-Prompt \ -`parseProdSandboxOptions.sh ../SANDBOX/sandbox_datasets.dat |tail -1` - - - - - - - -#============================== RERECO Ntuple production - -1) Check and update the working copy of the code -svn status -u -svn update - -2) ../SANDBOX/scripts/SandboxQuick.sh -t tagFile -p period --ntuple --json jsonFile --json_name jsonName - -3) check the status of the job -../SANDBOX/scripts/checkAndResubmitRereco.sh -t tagFile --ntuple - -4) merge the output files -for dir in prod_zntuples/alcarereco/tagName/*/*/*; do echo $dir; ./scripts/mergeOutput.sh -u $dir; done - - -######################## OBSOLETE -To check the staus of the jobs submitted do: -for dir in prod_alcareco/DoubleElectron-RUN2012A-May10ReReco-v1/*/; do echo $dir; ./scripts/resubmitCrab.sh -u $dir; done - - - - - - - - - - - -\endverbatim -**/ From 21a35223a66f5fbe95d47341280ca16fdbe15b09 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 16:33:23 +0100 Subject: [PATCH 272/475] fixed the init of energyBranchName in ElectronCategory_class --- ZFitter/src/ZFit_class.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index e24b2d8ae7f..06500c8bbc3 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -76,6 +76,7 @@ ZFit_class::ZFit_class(TChain *data_chain_, commonMC(NULL), commonData(NULL), reducedMC(NULL), reducedData(NULL) { energyVar_name = GetEnergyVarName(invMass_VarName); + cutter.energyBranchName=energyBranchName; /*--------------- imposto il binning */ //double bin_width=.5; From 08c9484651f7efa54af383c11f8bb9a9f756d39c Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 24 Jan 2014 16:35:37 +0100 Subject: [PATCH 273/475] fixed the init of energyBranchName in ElectronCategory_class --- ZFitter/src/ZFit_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/src/ZFit_class.cc b/ZFitter/src/ZFit_class.cc index 06500c8bbc3..0d4cc0e219e 100644 --- a/ZFitter/src/ZFit_class.cc +++ b/ZFitter/src/ZFit_class.cc @@ -76,7 +76,7 @@ ZFit_class::ZFit_class(TChain *data_chain_, commonMC(NULL), commonData(NULL), reducedMC(NULL), reducedData(NULL) { energyVar_name = GetEnergyVarName(invMass_VarName); - cutter.energyBranchName=energyBranchName; + cutter.energyBranchName=energyVar_name; /*--------------- imposto il binning */ //double bin_width=.5; From 4486609eb6f2515a397897a0b12813dffb3b4750 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 26 Jan 2014 16:36:22 +0100 Subject: [PATCH 274/475] use server removed from ntuple_production --- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 3c8ffa2833d..4bb30bf820e 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -295,7 +295,7 @@ cat > tmp/crab.cfg < Date: Sun, 26 Jan 2014 16:36:56 +0100 Subject: [PATCH 275/475] add load of pdf systematics varibles in crab jobs --- ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh index c9ed23b6ea2..c5905e51bc2 100755 --- a/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh +++ b/ALCARAW_RECO/scripts/splittedOutputFilesCrabPatch.sh @@ -66,3 +66,6 @@ sed -i -f tmp/sed.sed ${UI_WORKING_DIR}/job/CMSSW.sh sed -i -f tmp/sed.sed ${UI_WORKING_DIR}/job/CMSSW.sh #grep -v -A6 'if \[ -e .*root' ${UI_WORKING_DIR}/job/CMSSW.sh > tmp/CMSSW.sh + +sed -i '/^eval/{ a scramv1 setup lhapdffull\ntouch \$CMSSW_BASE/src/ElectroWeakAnalysis/Utilities/BuildFile.xml\nscramv1 b\neval \`scram runtime -sh | grep -v SCRAMRT_LSB_JOBNAME\`\n +}' ${UI_WORKING_DIR}/job/CMSSW.sh From 1b9261155e9655109161b3a1824f2020b912f0e3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 26 Jan 2014 16:38:43 +0100 Subject: [PATCH 276/475] pdfSystWeight in ZFitter and scripts --- ZFitter/bin/ZFitter.cpp | 4 + ZFitter/script/energyScale.sh | 230 ++++++++++++++++++++++++++++++++ ZFitter/script/functions.sh | 24 ++++ ZFitter/src/SmearingImporter.cc | 2 +- 4 files changed, 259 insertions(+), 1 deletion(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index dfd53925600..2a210c8e02b 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -227,6 +227,8 @@ int main(int argc, char **argv) { unsigned int nEventsMinDiag=0; unsigned int nEventsMinOffDiag=0; unsigned int nSmearToy=1; + + int pdfSystWeightIndex=-1; std::string minimType; std::vector branchList; @@ -312,6 +314,7 @@ int main(int argc, char **argv) { ("alphaGoldFix", "alphaTerm for gold electrons fixed to the low eta region") ("smearingEt", "alpha term depend on sqrt(Et) and not on sqrt(E)") ("nSmearToy", po::value(&nSmearToy)->default_value(0), "") + ("pdfSystWeightIndex", po::value(&pdfSystWeightIndex)->default_value(-1), "Index of the weight to be used") ; inputOption.add_options() ("chainFileList,f", po::value< string >(&chainFileListName), "Configuration file with input file list") @@ -954,6 +957,7 @@ int main(int argc, char **argv) { smearer._deactive_minEventsOffDiag = nEventsMinOffDiag; smearer.SetSmearingEt(vm.count("smearingEt")); smearer.SetR9Weight(vm.count("useR9weight")); + smearer.SetPdfSystWeight(pdfSystWeightIndex); if(nSmearToy>0) smearer._nSmearToy = nSmearToy; diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 00bc9f3dc2c..d5e1baa7b9c 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -29,6 +29,21 @@ outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat outFileStep2=step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat outFileStep7=step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat outFileStep8=step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat + +##################### +# Make sure that the files indicated in outFileList are in the same order of stepNameList +outFileList=( +"step1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" +"step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" +"step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" + +) +stepNameList=( +"step1" +"step2" +"step8" +) + ############################################################# usage(){ echo "`basename $0` [options]" @@ -130,6 +145,7 @@ case ${STEP} in 8) STEP8=y;; 9) STEP9=y;; 10) STEP10=y;; + pdfWeight) PDFWEIGHT=y;; 7) STEP7=y;; 1-2) STEP1=y; STEP2=y;; 1-3) STEP1=y; STEP2=y; STEP3=y; SLIDE=y;; @@ -145,6 +161,7 @@ case ${STEP} in 1-2fit) STEP1=y; STEP2FIT=y;; all) STEP1stability=y; STEP1=y; STEP2FIT=y; STEP3=y; STEP3Stability=y; STEP4=y;; # SLIDE=y;; *) + echo "[ERROR] Step ${STEP} not implemented" >> /dev/stderr exit 1 ;; esac @@ -1388,6 +1405,146 @@ if [ -n "${STEP11}" ];then +# grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat +# +# sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +# ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat |grep -v '#' #> ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + +fi + + + +if [ -n "${PDFWEIGHT}" ];then + extension=pdfWeight +#stochastic smearing but with non Et dependent scale corrections + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep4EB} + regionFileEE=${regionFileStep4EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + + #check if the output file of step8 is present + checkStepDep step8 + + if [ -e "${outDirTable}/params-step9-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step7" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step7" >> /dev/stdout + +# grep scale ${outDirData}/step7/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' > ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step9-${commonCut}.txt + +# grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' >> ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step9-${commonCut}.txt +# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step9-${commonCut}.txt + initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt"; + cat ${outDirTable}/params-step9-${commonCut}.txt + exit 0 + + echo "[ERROR] ${outDirTable}/params-step9-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + if [ ! -e "${outDirData}/step9/fitres" ];then mkdir ${outDirData}/step9/fitres -p; fi + if [ ! -e "${outDirData}/step9/img" ];then mkdir ${outDirData}/step9/img -p; fi + + cat $configFile |grep -v '#' \ + | grep -v "r9weights" | grep -v "scaleEle" | grep -v "r9weights" \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step8/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEB + #mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 + #mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9OA + exit 0 + + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + + + + for index in `seq 1 50` + do + mkdir ${outDirData}/step9${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${index}/img -p + done + + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ +# -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ +# -J "${basenameEE} step9${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + + while [ "`bjobs -J \"${basenameEB} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# while [ "`bjobs -J \"${basenameEE} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + # ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + # echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C +# fi + + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + if [ ! -e "${outFile}" ];then + touch ${outFile} + fi + fi + cat ${outDirData}/step9${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step9${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} + + + ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + + # grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat # # sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat @@ -1748,6 +1905,76 @@ if [ -n "${STEP10}" ];then done fi + + +if [ -n "${PDFWEIGHT}" ];then + # stochastic term resolution categories, scales in Et bins, pdfWeight, only profiles + + + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/pdfWeight/fitres/$index" ];then mkdir ${outDirData}/pdfWeight/fitres/$index -p; fi + if [ ! -e "${outDirData}/pdfWeight/img/$index" ];then mkdir ${outDirData}/pdfWeight/img/$index -p; fi + + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/pdfWeight/`basename $configFile` + + exit 0 + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + regionFile=data/regions/scaleStep2smearing_1.dat + tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` + initFile=${outDirData}/table/pdfWeight-scaleStep2smearing_9-${commonCut}.txt + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for tag in $tags + do + if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then + ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro \ + --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + fi + done + + for index in `seq 141 141` + do + mkdir ${outDirData}/pdfWeight/${index}/fitres/ -p + mkdir ${outDirData}/pdfWeight/${index}/img -p +# bsub -q 2nd -oo ${outDirData}/pdfWeight/${index}/fitres/pdfWeight-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/pdfWeight/${index}/fitres/pdfWeight-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` pdfWeight" \ +# "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/pdfWeight/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/pdfWeight/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/pdfWeight/${index}/img/ \ + --plotOnly \ + --constTermFix --smearerFit --smearingEt --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1 #" + done + exit 0 + ######################### + regionFile=data/regions/scaleStep2smearing_10.dat + if [ ! -e "${initFile}" ];then + echo "[ERROR] File ${initFile}" >> /dev/stderr + exit 1 + fi + + for index in `seq 1 30` + do + mkdir ${outDirData}/pdfWeight/${index}/fitres/ -p + mkdir ${outDirData}/pdfWeight/${index}/img -p + bsub -q 2nd -oo ${outDirData}/pdfWeight/${index}/fitres/pdfWeight-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/pdfWeight/${index}/fitres/pdfWeight-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` pdfWeight" \ + "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/pdfWeight/`basename $configFile` --regionsFile ${regionFile} \ + $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/pdfWeight/${index}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/pdfWeight/${index}/img/ \ + --constTermFix --smearingEt --smearerFit --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1" + done +fi + if [ -n "${STEP8}" ];then # stochastic term resolution categories, scales in Et bins, corrections from step7 applied: closure test @@ -1815,6 +2042,9 @@ if [ -n "${STEP8}" ];then fi + + + if [ -n "${SYSTEMATICS}" ];then regionFile=data/regions/systematics.dat if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh index 1fc0293e9b7..232ada79b2d 100644 --- a/ZFitter/script/functions.sh +++ b/ZFitter/script/functions.sh @@ -106,3 +106,27 @@ mkSmearerCatData(){ } + + +checkStepDep(){ + for step in $@ + do + index=0 + for stepName in ${stepNameList[@]} + do + if [ "${step}" != "$stepName" ];then + let index=$index+1 + else + break + fi + done + if [ ! -r "${outDirTable}/${outFileList[$index]}" ];then + echo -e "[ERROR] output file for step $step not found:\n ${outDirTable}/${outFileList[$index]}" >> /dev/stderr + exit 1 + fi + if [ "$index" -ge "${#stepNameList[@]}" ];then + echo "[ERROR] step $step not set in output file list" >> /dev/stderr + exit 1 + fi + done +} \ No newline at end of file diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index d4bd13eafca..b1b947a804d 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -117,7 +117,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } } - if(chain->GetBranch("pdfWeights_cteq66")){ + if(chain->GetBranch("pdfWeights_cteq66") && _pdfWeightIndex>0){ std::cout << "[STATUS] Adding pdfWeight_ctec66 branch from friend" << std::endl; chain->SetBranchAddress("pdfWeights_cteq66", &pdfWeights); if((unsigned int) _pdfWeightIndex > pdfWeights->size()){ From cff330c918e4a1f1c7ffe3f174d28b9402bd19a5 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 26 Jan 2014 16:39:08 +0100 Subject: [PATCH 277/475] temporary solution for ntuple production --- ZNtupleDumper/src/ZNtupleDumper.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index c00fa00bfc2..2c50d48b521 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -566,7 +566,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } if(doPdfSystTree){ TreeSetPdfSystVar(iEvent); - pdfSystTree->Fill(); + //pdfSystTree->Fill(); } } else { for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; @@ -596,7 +596,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } if(doPdfSystTree){ TreeSetPdfSystVar(iEvent); - pdfSystTree->Fill(); + //pdfSystTree->Fill(); } } } @@ -652,7 +652,8 @@ void ZNtupleDumper::beginJob() if(doPdfSystTree){ std::cout << "[INFO] Doing pdfSystTree" << std::endl; - pdfSystTree = fs->make("pdfSystTree","pdfSystTree"); + //pdfSystTree = fs->make("pdfSystTree","pdfSystTree"); + pdfSystTree=tree; InitPdfSystTree(); } @@ -1435,10 +1436,10 @@ void ZNtupleDumper::InitPdfSystTree(void){ std::cout << "[STATUS] InitPdfSystTree" << std::endl; if(pdfSystTree==NULL) return; - pdfSystTree->Branch("runNumber", &runNumber, "runNumber/I"); - pdfSystTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); - pdfSystTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); - pdfSystTree->Branch("runTime", &runTime, "runTime/l"); +// pdfSystTree->Branch("runNumber", &runNumber, "runNumber/I"); +// pdfSystTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); +// pdfSystTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); +// pdfSystTree->Branch("runTime", &runTime, "runTime/l"); for(std::vector< edm::InputTag >::const_iterator pdfWeightTAGS_itr = pdfWeightTAGS.begin(); From b767204028b467c61126a2dd3e1a18184cfca98f Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 26 Jan 2014 16:39:23 +0100 Subject: [PATCH 278/475] temporary comment of additional files --- .../validation/22Jan2012-runDepMCAll_v2.dat | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat index 3aef34541b5..29e31c90b9f 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat @@ -35,35 +35,35 @@ s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root #################################################### -d1 r9Weight data/r9weights/r9Weight_d1-22Jan2012-runDepMCAll_v2.root -d2 r9Weight data/r9weights/r9Weight_d2-22Jan2012-runDepMCAll_v2.root -d3 r9Weight data/r9weights/r9Weight_d3-22Jan2012-runDepMCAll_v2.root -d4 r9Weight data/r9weights/r9Weight_d4-22Jan2012-runDepMCAll_v2.root -s1 r9Weight data/r9weights/r9Weight_s1-22Jan2012-runDepMCAll_v2.root -s2 r9Weight data/r9weights/r9Weight_s2-22Jan2012-runDepMCAll_v2.root -s3 r9Weight data/r9weights/r9Weight_s3-22Jan2012-runDepMCAll_v2.root -##### -s1 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s1-22Jan2012-runDepMCAll_v2.root -s2 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s2-22Jan2012-runDepMCAll_v2.root -s3 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s3-22Jan2012-runDepMCAll_v2.root -# -s1 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s1-22Jan2012-runDepMCAll_v2.root -s2 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMCAll_v2.root -s3 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMCAll_v2.root -##### -s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v2.root -s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMCAll_v2.root -s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll_v2.root -# -s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMCAll_v2.root -s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMCAll_v2.root -s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll_v2.root -# -s1 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s1-22Jan2012-runDepMCAll_v2.root -s2 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s2-22Jan2012-runDepMCAll_v2.root -s3 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s3-22Jan2012-runDepMCAll_v2.root -##### -s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v2.root -s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll_v2.root -s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll_v2.root +#d1 r9Weight data/r9weights/r9Weight_d1-22Jan2012-runDepMCAll_v2.root +#d2 r9Weight data/r9weights/r9Weight_d2-22Jan2012-runDepMCAll_v2.root +#d3 r9Weight data/r9weights/r9Weight_d3-22Jan2012-runDepMCAll_v2.root +#d4 r9Weight data/r9weights/r9Weight_d4-22Jan2012-runDepMCAll_v2.root +#s1 r9Weight data/r9weights/r9Weight_s1-22Jan2012-runDepMCAll_v2.root +#s2 r9Weight data/r9weights/r9Weight_s2-22Jan2012-runDepMCAll_v2.root +#s3 r9Weight data/r9weights/r9Weight_s3-22Jan2012-runDepMCAll_v2.root +###### +#s1 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s1-22Jan2012-runDepMCAll_v2.root +#s2 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s2-22Jan2012-runDepMCAll_v2.root +#s3 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s3-22Jan2012-runDepMCAll_v2.root +## +#s1 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s1-22Jan2012-runDepMCAll_v2.root +#s2 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMCAll_v2.root +#s3 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMCAll_v2.root +###### +#s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v2.root +#s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMCAll_v2.root +#s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll_v2.root +## +#s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMCAll_v2.root +#s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMCAll_v2.root +#s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll_v2.root +## +#s1 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s1-22Jan2012-runDepMCAll_v2.root +#s2 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s2-22Jan2012-runDepMCAll_v2.root +#s3 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s3-22Jan2012-runDepMCAll_v2.root +###### +#s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v2.root +#s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll_v2.root +#s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll_v2.root From 4dbd8ae8e683f06ae291fa405e2c51ebbb91a1c5 Mon Sep 17 00:00:00 2001 From: shervin86 Date: Mon, 27 Jan 2014 12:23:03 +0100 Subject: [PATCH 279/475] Update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 002b4d2c327..2f39d02452f 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,28 @@ Every time you enter in a new shell you have to do: or `source initCmsEnv.sh` +Problem: +if you have an error in compilation like + +consider to edit the following file: `DataFormats/CaloRecHit/src/classes_def.xml` +changing the following lines: + +` ` + +` ` + +` ` + +to + +` ` + +` ` + +`` + + + ====== Code documentation: From a35b365178098444bf25bfc2b2c4c4a525966ed9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 27 Jan 2014 13:46:52 +0100 Subject: [PATCH 280/475] resubmit on 50800 error and remove unuseful stdout --- ALCARAW_RECO/scripts/prodNtuples.sh | 6 +++--- ALCARAW_RECO/scripts/resubmitCrab.sh | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 4bb30bf820e..92f60958ce9 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -366,13 +366,13 @@ if [ -n "${CREATE}" ];then splittedOutputFilesCrabPatch.sh -u $UI_WORKING_DIR fi -if [ -n "$SUBMIT" ];then +if [ -n "$SUBMIT" -a -z "${CHECK}" ];then crab -c ${UI_WORKING_DIR} -submit STRING="${RUNRANGE}\t${DATASETPATH}\t${DATASETNAME}\t${STORAGE_ELEMENT}\t${USER_REMOTE_DIR_BASE}\t${TYPE}\t${TAG}\t${JSONNAME}" echo -e $STRING >> ntuple_datasets.dat -else - echo "crab -c ${UI_WORKING_DIR} -submit" +#else + #echo "crab -c ${UI_WORKING_DIR} -submit" fi if [ -n "${CHECK}" ];then diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index 5d8daeb0701..43bce6bab29 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -154,6 +154,9 @@ for jobID in `seq 1 $nJobs` 50700*50700) intervals="$intervals $jobID" ;; + 50800*6) + intervals="$intervals $jobID" + ;; *) echo $jobID $ExitCode From 5452468ffc5e18b4cff5a9c3fdaebecda2e3c639 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 27 Jan 2014 13:47:13 +0100 Subject: [PATCH 281/475] no additional ntupleExtra file --- ALCARAW_RECO/python/alcaSkimming.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 38a85e04123..d3d91c3f8fb 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -513,11 +513,11 @@ #print "OUTPUTCOMMANDS" #print process.outputALCARECO.outputCommands -if(options.pdfSyst==1): - process.TFileService = cms.Service("TFileService", - fileName = cms.string("ntupleExtra.root"), - closeFileFast = cms.untracked.bool(True) - ) +# if(options.pdfSyst==1): +# process.TFileService = cms.Service("TFileService", +# fileName = cms.string("ntupleExtra.root"), +# closeFileFast = cms.untracked.bool(True) +# ) From 67a67564aaed8e313353b1d17a3105a94b545bd5 Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 28 Jan 2014 11:27:59 +0100 Subject: [PATCH 282/475] update of documentation --- ZFitter/doc/README | 66 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/ZFitter/doc/README b/ZFitter/doc/README index beb03b28c7d..ded0bbdee0d 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -5,16 +5,54 @@ # ECALELF Z Fitter is designed to be a flexible tool to fit the Z # lineshape using the ECALELF ZNtuples. +Go to the Calibration/ZFitter directory and compile it: +make + +Calibration/ZFitter will be your working directory now on. + There are three important directories where the proper .dat files should be put: - data/validation/ -For the validation, the .dat files has to be put in a subdirectory of data/validation: + For the validation of rerecoes, the .dat files has to be put in a subdirectory of data/validation: ./data/validation/rereco/rerecoGroupName/ where rerecoGroupName is a name that you assign to a group of rerecoes that you want to test for example: you can use ./data/validation/rereco/Cal_Dic2013/ or ./data/validation/rereco/ungrouped/ - - + this way the fit results will be put under the subdirectory + rerecoGroupName and you will be able to move or remove it when the + set of validations has finished. + + The logic of the validation .dat files is reported below in a + dedicated section. + + +- data/regions/ + the fits are done in categories, the conditions that the electrons + have to fulfil are defined in .dat files in this directory. + In each .dat file, a set of categories are defined, one category for + each line: for example + EB + EE + EB-gold + EB-absEta_0_1-bad + the sintax used to define the categories is reported at the + beginning of + interface/ElectronCategory_class.hh + + For standard validations you can use the data/regions/validation.dat + that is set in the scripts as the default one. + +- data/runRanges/ + contains files that define a set of run ranges in order to perform + the fits for the stability plots. The default one to be used is + data/runRanges/monitoring.dat + + The syntax is the following: + #runMin-runMax nEvents timeStampMin-timeStampMax + 190645-190781 28734 1333819264-1333983242 + 190782-191042 24007 1334023525-1334188134 + The second and third column are optional. + #============================== validation config .dat file creation to be put in data/validation/ This config file contains the list of files to run on, the files containing the PU histograms for the PU reweighting and all the other @@ -45,7 +83,12 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Sum friends -#======================================== Working with ntuples +#======================================== Working with ntuples: how to +# play by hand with ntuples + +If you are interested only in using the fit for validations you can +skip this paragraphs and go directly to "RERECO VALIDATION instructions" + The .dat config file keeping the list of ntuples can be modified according to the needs adding or commenting unuseful ntuples or friend trees. It's then important to have a simple way to merge the trees in order to be able to manipulate, scan and plot variables from the ntuples. The ZFitter/script/GenRootChain.sh has been designed for this. @@ -160,12 +203,23 @@ s pileupTree file.root - the default one used for the validation is ./data/regions/validation.dat - The regions can be defined following the syntax indicated in ZFitter/interface/ElectronCategory_class.hh -4) Launch the fit: +5) Launch the fit: ./script/monitoring_validation.sh -f data/validation/file.dat --selection loose --invMass_var=invMass_SC --rereco rerecoGroupName + to see the possible options: ./script/monitoring_validation.sh --help + the possible energies are: + - invMass_SC: standard SC energy + - invMass_SC_regrCorrSemiParV5_ele: Josh's regression ele-tuned V5 + - invMass_SC_regrCorrSemiParV5_pho: Josh's regression pho-tuned V5 + the possible selections are: loose, medium, tight + + you can specify --validation to do only the main fits + --stability to run only the fits for the stability plots + --etaScale to run the fits in |eta| bins + if you do not specify any of this options the three are executed - + #============================== produce run ranges file The idea is to produce a file with the run ranges with 100k Zee events (to have enough statistics in the EE), but taking into account also From 23eb65cfe169efa70c3b8284342b3b87279b217d Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 28 Jan 2014 11:40:35 +0100 Subject: [PATCH 283/475] few information about fit outputs --- ZFitter/doc/README | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/ZFitter/doc/README b/ZFitter/doc/README index ded0bbdee0d..a161e2e8ea5 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -235,8 +235,38 @@ The run ranges +#============================== Fit results: +Folder schema: + - one folder for data with + - one subfolder per selection + - for each selection one subfolder with the energy used for the invariant mass + - for each energy + - table: store the tables in .dat and .tex formats + - img: store the plots (fit and other) + - fit + - history + - fitres: store the fit results + - one folder for MC with the same structure + +At the end of the validation, the makeTable.sh script produces one big latex table in the table/ subdir. +The meaning of the columns is reported in the first row: + 1. category name + 2. number of events in that category in data + 3. deltaM parameter in data (shift of the CB peak w.r.t. 0) + 4. deltaM in MC + 5. deltaP = (deltaM_data - delta_M_mc)/deltaM_mc + 6. sigmaCB data + 7. sigmaCB mc + 8. sigmaCB_data/(M_Z+deltaM_data): also defined as sigmaCB/peakCB + it is the sigmaCB rescaled for the peak shift + 9. sigmaCB_mc/peakCB_mc + 10. additional smearing calculated as the quadratic difference between data and simulation of sigmaCB/peakCB +The table for the standard validation categories is monitoring_summary-*.tex +The table for the stability fits is monitoring_stability-*.tex +the script stability.sh produces the stability plots starting from the monitoring_stability-*.tex +and are automatically put in the test/dato/...../img/stability/runNumber subdirectory of the validation @@ -279,17 +309,6 @@ Once the fit is finished: -Folder schema: - - one folder for data with - - one subfolder per selection - - for each selection one subfolder with the energy used for the invariant mass - - for each energy - - table: store the tables in .dat and .tex formats - - img: store the plots (fit and other) - - fit - - history - - fitres: store the fit results - - one folder for MC with the same structure From eb34c1cc62b47f35c6a1306c12107131b2fdddc3 Mon Sep 17 00:00:00 2001 From: shervin86 Date: Wed, 29 Jan 2014 11:08:09 +0100 Subject: [PATCH 284/475] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 2f39d02452f..e9c76fd8606 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,11 @@ to ====== Code documentation: +Code documentation is updated using doxygen system. +You can find the documentation related to the master branch here: +`http://ecalelfs.github.io/ECALELF/index.html` + +It can be generated locally following the instructions below: Once downloaded the code, in Calibration/ you can run the command `doxygen fulldoc` From fc1b7747ee81e956a24a7263728e2fe9677b142c Mon Sep 17 00:00:00 2001 From: shervin86 Date: Wed, 29 Jan 2014 11:08:39 +0100 Subject: [PATCH 285/475] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e9c76fd8606..3d6f80bde56 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ to Code documentation: Code documentation is updated using doxygen system. You can find the documentation related to the master branch here: -`http://ecalelfs.github.io/ECALELF/index.html` +http://ecalelfs.github.io/ECALELF/index.html It can be generated locally following the instructions below: Once downloaded the code, in Calibration/ you can run the command From 7e5e8c86c56aff0252cd44e27be85fca7d74c393 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 29 Jan 2014 12:21:31 +0100 Subject: [PATCH 286/475] script to update documentation --- mkDoc.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 mkDoc.sh diff --git a/mkDoc.sh b/mkDoc.sh new file mode 100755 index 00000000000..3f5d383878f --- /dev/null +++ b/mkDoc.sh @@ -0,0 +1,10 @@ +#!/bin/bash +if [ ! -d "doc/doxygen/fulldoc/html" ];then + cd doc/doxygen/fulldoc/ + git clone -b gh-pages git@github.com:ECALELFS/ECALELF.git html + cd - +fi + +doxygen fulldoc + + From 368e71eeaf1d4f8c27745fa2eea6b2416ca9e466 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 30 Jan 2014 09:00:20 +0100 Subject: [PATCH 287/475] fixed wrong path for absEta stability plots --- ZFitter/script/monitoring_validation.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index 855c01d436f..f701497db34 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -33,6 +33,7 @@ usage(){ echo " --stability: run the stability fits only" echo " --etaScale: run the fits in |eta| only" echo " --R9Ele: run the fits in bin of R9 only" + echo " --onlyTable: do not run the fits, recreate only the tables and the stability plots" echo " --systematics all/pu " echo " --refreg" echo " --slides " @@ -368,8 +369,8 @@ if [ -n "$ETA" ];then --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ ${tableCruijffOption} > ${tableFile} || exit 1 - if [ ! -d ${outDirData}/step4/img/stability/$xVar/$PERIOD ];then - mkdir -p ${outDirData}/step4/img/stability/$xVar/$PERIOD + if [ ! -d ${outDirData}/img/stability/$xVar/$PERIOD ];then + mkdir -p ${outDirData}/img/stability/$xVar/$PERIOD fi ./script/stability.sh -t ${tableFile} \ From b5d227dfe2bf457b4992c67f7a6e555f7bb9e87f Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 30 Jan 2014 09:14:36 +0100 Subject: [PATCH 288/475] pdfWeights produced if pdfSys flag activated --- ALCARAW_RECO/python/alcaSkimming.py | 1 + ZNtupleDumper/python/zntupledumper_cfi.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index d3d91c3f8fb..719c75cceda 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -453,6 +453,7 @@ if(MC and options.pdfSyst==1): process.pdfWeightsSeq = cms.Sequence(process.pdfWeights) + process.zNtupleDumper.pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')) else: process.pdfWeightsSeq = cms.Sequence() diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index 4b02752ef0e..1f5b6cce988 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -19,7 +19,8 @@ doExtraCalibTree = cms.bool(False), doEleIDTree = cms.bool(False), doPdfSystTree = cms.bool(True), - pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')), +# pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')), + pdfWeightCollections = cms.VInputTag(), isWenu = cms.bool(False), # hltPaths = cms.vstring() hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v15', From 48dec5b7dc0a0fb8af931c11ae5a7cd7eedccf38 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 30 Jan 2014 09:15:03 +0100 Subject: [PATCH 289/475] pdfWeights taken in smearing --- ZFitter/script/energyScale.sh | 45 +++++++++++++++++---------------- ZFitter/script/functions.sh | 6 +++-- ZFitter/src/SmearingImporter.cc | 27 +++++++++++++++----- 3 files changed, 48 insertions(+), 30 deletions(-) diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index d5e1baa7b9c..d47a6a388a1 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -1470,16 +1470,15 @@ if [ -n "${PDFWEIGHT}" ];then mkSmearerCatSignal $regionFileEB #mkSmearerCatSignal $regionFileEE - mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 + mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et #mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9OA - exit 0 - +# exit 0 if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi - + if [ "${extension}" == "weight" ];then updateOnly="$updateOnly --useR9weight" @@ -1487,33 +1486,35 @@ if [ -n "${PDFWEIGHT}" ];then # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time - - - - for index in `seq 1 50` + + + for pdfWeightIndex in `seq 0 44` do - mkdir ${outDirData}/step9${extension}/${index}/fitres/ -p - mkdir ${outDirData}/step9${extension}/${index}/img -p - done - - - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ - -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ - -J "${basenameEB} step9${extension}[1-50]" \ + for index in `seq 1 50` + do + mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/img -p + done + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=1 || exit 1; +# exit 0 + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step9${extension} $pdfWeightIndex [1-50]" \ "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" - +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=1 || exit 1" + # bsub -q 2nd \ # -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ # -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ # -J "${basenameEE} step9${extension}[1-50]" \ # "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; # ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" - - while [ "`bjobs -J \"${basenameEB} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + done + while [ "`bjobs -J \"${basenameEB} step9${extension}*\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done # while [ "`bjobs -J \"${basenameEE} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - + exit 0 ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root # ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh index 232ada79b2d..9985e96fecb 100644 --- a/ZFitter/script/functions.sh +++ b/ZFitter/script/functions.sh @@ -101,8 +101,10 @@ mkSmearerCatData(){ mv tmp/smearerCat_`basename $1 .dat`_d*-`basename $configFile .dat`.root $2/ || exit 1 fi cat $3 \ - | sed "/selected/ ! d; /selected/{ s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $1 .dat`\t$2/smearerCat_`basename $1 .dat`_\1-`basename $3 .dat`.root|}" | sort | uniq |grep smearerCat |grep '^d' >> $2/`basename $configFile` - + | sed "/selected/ ! d; /selected/{ s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $1 .dat`\t$2/smearerCat_`basename $1 .dat`_\1-`basename $3 .dat`.root|}" | sort | uniq |grep smearerCat |grep '^d' >> $3.tmp + cat $3.tmp >> $3 + rm $3.tmp + cat $3 } diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index b1b947a804d..3b24f056909 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -117,13 +117,9 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } } - if(chain->GetBranch("pdfWeights_cteq66") && _pdfWeightIndex>0){ + if(isMC && chain->GetBranch("pdfWeights_cteq66")!=NULL && _pdfWeightIndex>0){ std::cout << "[STATUS] Adding pdfWeight_ctec66 branch from friend" << std::endl; chain->SetBranchAddress("pdfWeights_cteq66", &pdfWeights); - if((unsigned int) _pdfWeightIndex > pdfWeights->size()){ - std::cerr << "[ERROR] Requested pdfWeightIndex > pdfWeight size" << std::endl; - exit(1); - } } chain->SetBranchAddress("etaEle", etaEle); @@ -168,6 +164,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS chain->LoadTree(chain->GetEntryNumber(0)); Long64_t treenumber=-1; + std::vector< std::pair > catSelectors; if(hasSmearerCat==false){ for(std::vector::const_iterator region_ele1_itr = _regionList.begin(); @@ -303,7 +300,22 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; - if(_pdfWeightIndex>0) event.weight *= (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0]; + if(isMC && _pdfWeightIndex>0 && pdfWeights!=NULL){ + if(_pdfWeightIndex > pdfWeights->size()) continue; + event.weight *= ((*pdfWeights)[0]<=0 || (*pdfWeights)[0]!=(*pdfWeights)[0] || (*pdfWeights)[_pdfWeightIndex]!=(*pdfWeights)[_pdfWeightIndex])? 0 : (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0]; + +#ifdef DEBUG + if(jentry<10 || event.weight!=event.weight){ + std::cout << "jentry = " << jentry + << "\tevent.weight = " << event.weight << "\t" << (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0] + << "\t" << (*pdfWeights)[_pdfWeightIndex] << "\t" << (*pdfWeights)[0] + << "\t" << r9weight[0] << " " << r9weight[1] + << "\t" << ptweight[0] << " " << ptweight[1] + << std::endl; + } +#endif + + } if(mcGenWeight != -1){ if(_useMCweight && !_excludeByWeight) event.weight *= mcGenWeight; @@ -317,6 +329,9 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } // else event.weight=1; } } + + if(event.weight<=0 || event.weight!=event.weight) continue; + #ifdef FIXEDSMEARINGS if(isMC){ event.smearings_ele1 = new float[NSMEARTOYLIM]; From 06a899817b3caa50bd94ad0640ef2d4a582fc515 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 30 Jan 2014 09:46:16 +0100 Subject: [PATCH 290/475] new files with pdfSystematics --- .../validation/22Jan2012-runDepMCAll_v2.dat | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat index 29e31c90b9f..12e456cb636 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2.dat @@ -1,17 +1,17 @@ ############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection ########### standard MC ##### Madgraph -s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Powheg -s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root ##### Sherpa -s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_v2/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_v2/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_v2/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root ########### Data d1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root d2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root @@ -29,9 +29,12 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859- #s1 pileup mcPUtree_s1-22Jan2012-runDepMC.dat #s2 pileup mcPUtree_s2-22Jan2012-runDepMC.dat #s3 pileup mcPUtree_s3-22Jan2012-runDepMC.dat -s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root -s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll.root -s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root +#s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root +#s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll.root +#s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll_pdfWeight.root +s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll_pdfWeight.root +s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll_pdfWeight.root ##### Scale correction trees #d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root #################################################### @@ -51,9 +54,9 @@ s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s #s2 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s2-22Jan2012-runDepMCAll_v2.root #s3 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s3-22Jan2012-runDepMCAll_v2.root ###### -#s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v2.root -#s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMCAll_v2.root -#s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll_v2.root +s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v2.root +s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMCAll_v2.root +s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll_v2.root ## #s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMCAll_v2.root #s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMCAll_v2.root @@ -66,4 +69,3 @@ s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s #s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v2.root #s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll_v2.root #s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll_v2.root - From 2b811872621bfbbce6b4e441054a76a213b30838 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 30 Jan 2014 12:04:30 +0100 Subject: [PATCH 291/475] better documentation --- ZFitter/bin/ZFitter.cpp | 1 + ZFitter/doc/README | 186 ++---------------------------------- ZFitter/doc/configFiles.txt | 81 ++++++++++++++++ ZFitter/doc/plot.txt | 91 ++++++++++++++++++ ZFitter/doc/runDivide.txt | 23 +++++ 5 files changed, 203 insertions(+), 179 deletions(-) create mode 100644 ZFitter/doc/configFiles.txt create mode 100644 ZFitter/doc/plot.txt create mode 100644 ZFitter/doc/runDivide.txt diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index dfd53925600..6fefc5f802e 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -247,6 +247,7 @@ int main(int argc, char **argv) { ("help,h","Help message") ("runDivide", "execute the run division") + ("nEvents_runDivide", po::value(&nEvents_runDivide)->default_value(100000), "Minimum number of events in a run range") // ("dataPU", po::value< string >(&dataPUFileName), "") diff --git a/ZFitter/doc/README b/ZFitter/doc/README index a161e2e8ea5..e30a9560661 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -1,179 +1,16 @@ /** * \page page4 How to work with ECALELF ntuples -* \verbatim -############## Introduction to ECALELF Z Fitter -# ECALELF Z Fitter is designed to be a flexible tool to fit the Z -# lineshape using the ECALELF ZNtuples. -Go to the Calibration/ZFitter directory and compile it: -make +Go to the Calibration/ZFitter directory and compile it: +\code make\endcode Calibration/ZFitter will be your working directory now on. +\ref ZFitterConfigFiles -There are three important directories where the proper .dat files should be put: - - data/validation/ - For the validation of rerecoes, the .dat files has to be put in a subdirectory of data/validation: - ./data/validation/rereco/rerecoGroupName/ - where rerecoGroupName is a name that you assign to a group of rerecoes that you want to test - for example: you can use ./data/validation/rereco/Cal_Dic2013/ - or ./data/validation/rereco/ungrouped/ - this way the fit results will be put under the subdirectory - rerecoGroupName and you will be able to move or remove it when the - set of validations has finished. - - The logic of the validation .dat files is reported below in a - dedicated section. - - -- data/regions/ - the fits are done in categories, the conditions that the electrons - have to fulfil are defined in .dat files in this directory. - In each .dat file, a set of categories are defined, one category for - each line: for example - EB - EE - EB-gold - EB-absEta_0_1-bad - the sintax used to define the categories is reported at the - beginning of - interface/ElectronCategory_class.hh - - For standard validations you can use the data/regions/validation.dat - that is set in the scripts as the default one. - -- data/runRanges/ - contains files that define a set of run ranges in order to perform - the fits for the stability plots. The default one to be used is - data/runRanges/monitoring.dat - - The syntax is the following: - #runMin-runMax nEvents timeStampMin-timeStampMax - 190645-190781 28734 1333819264-1333983242 - 190782-191042 24007 1334023525-1334188134 - The second and third column are optional. - -#============================== validation config .dat file creation to be put in data/validation/ -This config file contains the list of files to run on, the files -containing the PU histograms for the PU reweighting and all the other -files needed. -The main idea in the ECALELF framework is to have a minimum set of -variables in very small trees (the tree name is "selected"), while -additional branches can be produced and added if needed as tree -friends. The advantage is the possibility to produce ntuples for a -larger set of studies with small specific trees for each of them. - - -The file is structured in 3 columns: tag, treeName and filePath as in the follows: -# commented lines -# tag treeName file -s1 selected root://eoscms//eos/..../file.root -s2 selected root://eoscms//eos/..../file.root -d1 selected root://eoscms//eos/..../file.root -d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-204567-13Julv2_lastPrompt.69400.observed.root -s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Summer12_DD3.observed.root - - The first column (tag) indicates if this file is signal MC (s), background MC (b), or data (d). - The single samples are indicated by a number (s1, s2, etc., d1, d2, etc.) - The second column (treeName) is the name of the tree in the file - The third column (filePath) is the full path of the file - files with the same tag and the same treeName are put in the - same chain - files with the same tag but different treeName are added as - friends - - -#======================================== Working with ntuples: how to -# play by hand with ntuples - -If you are interested only in using the fit for validations you can -skip this paragraphs and go directly to "RERECO VALIDATION instructions" - -The .dat config file keeping the list of ntuples can be modified according to the needs adding or commenting unuseful ntuples or friend trees. -It's then important to have a simple way to merge the trees in order to be able to manipulate, scan and plot variables from the ntuples. -The ZFitter/script/GenRootChain.sh has been designed for this. - -running the command: -./script/GenRootChain.sh -f data/validation/myConfigFile.dat -in the tmp/ the s_chain.root, d_chain.root load.C are created for MC and data respectively. -The .root files have the TChains already defined, merging the files with the same treeName in the config file and adding the friends properly. -Due to a bug in ROOT in order to properly load the files the load.C script is created. - -To work with ntuples you can do (see pratical example below): -root -l tmp/d_chain.root tmp/s_chain.root tmp/load.C -data -> Draw("*"); -signalA -> Draw("*"); - -NB: Please check in the load.C file the correct assignment of the tree pointer to the correct file. - -#============================== Data/MC plots -A standard function for data/MC plots have been prepared and is available in macro/PlotDataMC.C - -In the following you can find an example of production of data/MC plots with a config file with -22Jan rereco data, run dependent MC (three samples with different generators: s1, s2, s3) -./script/GenRootChain.sh -f data/validation/22Jan2012-runDepMCAll_v2.dat -root -l -b -q tmp/d_chain.root tmp/s1_chain.root tmp/s2_chain.root tmp/load.C macro/standardDataMC.C - -***************** -The load.C script is commented below: -{ - gROOT->ProcessLine(".L macro/PlotDataMC.C+"); // -> functions for data/MC plots - gROOT->ProcessLine(".L src/setTDRStyle.C"); - gROOT->ProcessLine(".L macro/addChainWithFriends.C+"); // -> functions to work around ROOT bugs in friend treatment - - setTDRStyle1(); - - TChain *data = (TChain *) _file0->Get("selected"); // -> pointers to samples - TChain *signalA = (TChain *) _file1->Get("selected"); // -> pointers to samples - TChain *signalB = (TChain *) _file2->Get("selected"); // -> pointers to samples - TChain *signalC = (TChain *) _file3->Get("selected"); // -> pointers to samples - - ReassociateFriends(_file0, data); // -> functions to correct associate the friends to their main trees - ReassociateFriends(_file1, signalA); // -> functions to correct associate the friends to their main trees - ReassociateFriends(_file2, signalB); // -> functions to correct associate the friends to their main trees - ReassociateFriends(_file3, signalC); // -> functions to correct associate the friends to their main trees - - TDirectory *curDir = new TDirectory("curDir",""); - curDir->cd(); - - TString outputPath="tmp/"; - -// look at standardDataMC.C for some examples -} -***************** -The standardDataMC.C example: -{ - std::vector mcLabel_vec; // create a vector of labels for the MC samples - mcLabel_vec.push_back("Madgraph"); - mcLabel_vec.push_back("Powheg"); - mcLabel_vec.push_back("Sherpa"); - - //MakeChainVector(signalA,signalB,signalC) - - c = PlotDataMCs(data, // pointer to data chain - MakeChainVector(signalA,signalB,signalC), // creates a vector of chains for MCs - "etaEle", // variable to be plotted - "(100,-2.5,2.5)", // binning of x axis - "eleID_loose-trigger-noPF-Et_25", // stream based selection with ECALELF convention -> a specific class takes care in parsing the string and provide the selections cuts - "", // additional selection string in standard ROOT syntax, - "Data", // label for data in Legend - mcLabel_vec, // vector of strings for MC labels in legend - "#eta", // x axis title - "", - false, // do plot in log scale - true // reweight MC for PU - ); // use r9weight - c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.eps"); - c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.C"); - delete c; -} - - - - -\endverbatim -*/ +\ref plotNtuple +\verbatim #============================================================ The files containing the histograms for the PU reweight are @@ -220,17 +57,6 @@ s pileupTree file.root if you do not specify any of this options the three are executed -#============================== produce run ranges file -The idea is to produce a file with the run ranges with 100k Zee events -(to have enough statistics in the EE), but taking into account also -that some run ranges should not be between to TSs or two era (RUN A -and B). - -The run ranges - - -./bin/ZFitter.exe -f file.dat --runDivide - @@ -461,3 +287,5 @@ histograms, add all the MC PU histograms, calculates the PU reweight, produce a tree with the per event weight for the MC. Then add the tree with the PU weights to the MC chain as a friend tree. +\endverbatim +*/ diff --git a/ZFitter/doc/configFiles.txt b/ZFitter/doc/configFiles.txt new file mode 100644 index 00000000000..3375f085a2c --- /dev/null +++ b/ZFitter/doc/configFiles.txt @@ -0,0 +1,81 @@ +/** +* \page ZFitterConfigFiles Config files syntax and generation + +There are three important directories where the proper .dat files should be put: +- data/validation/
+ For the validation of rerecoes, the .dat files has to be put in a subdirectory of data/validation: + ./data/validation/rereco/rerecoGroupName/ + where rerecoGroupName is a name that you assign to a group of rerecoes that you want to test + for example: you can use ./data/validation/rereco/Cal_Dic2013/ + or ./data/validation/rereco/ungrouped/ + this way the fit results will be put under the subdirectory + rerecoGroupName and you will be able to move or remove it when the + set of validations has finished.
+ The logic of the validation .dat files is reported below in a + dedicated section. + + +- data/regions/ + the fits are done in categories, the conditions that the electrons + have to fulfil are defined in .dat files in this directory. + In each .dat file, a set of categories are defined, one category for + each line: see ElectronCategory_class for more information about the syntax + + + For standard validations you can use the data/regions/validation.dat + that is set in the scripts as the default one. + + +- data/runRanges/ + contains files that define a set of run ranges in order to perform + the fits for the stability plots. The default one to be used is + data/runRanges/monitoring.dat + + The syntax is the following: +\verbatim + #runMin-runMax nEvents timeStampMin-timeStampMax + 190645-190781 28734 1333819264-1333983242 + 190782-191042 24007 1334023525-1334188134 +\endverbatim + The second and third column are optional. + + For more information on how to produce automatically the runRanges .dat files see: \ref runDivide + + +#============================== validation config .dat file creation to be put in data/validation/ +This config file contains the list of files to run on, the files +containing the PU histograms for the PU reweighting and all the other +files needed. +The main idea in the ECALELF framework is to have a minimum set of +variables in very small trees (the tree name is "selected"), while +additional branches can be produced and added if needed as tree +friends. The advantage is the possibility to produce ntuples for a +larger set of studies with small specific trees for each of them. + + +The file is structured in 3 columns: tag, treeName and filePath as in the follows: +\verbatim +# commented lines +# tag treeName file +s1 selected root://eoscms//eos/..../file.root +s2 selected root://eoscms//eos/..../file.root +d1 selected root://eoscms//eos/..../file.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-204567-13Julv2_lastPrompt.69400.observed.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Summer12_DD3.observed.root + +\endverbatim + + The first column (tag) indicates if this file is signal MC (s), background MC (b), or data (d). + + The single samples are indicated by a number (s1, s2, etc., d1, d2, etc.) + + The second column (treeName) is the name of the tree in the file + + The third column (filePath) is the full path of the file + files with the same tag and the same treeName are put in the + same chain + files with the same tag but different treeName are added as + friends + + +*/ diff --git a/ZFitter/doc/plot.txt b/ZFitter/doc/plot.txt new file mode 100644 index 00000000000..631126fb965 --- /dev/null +++ b/ZFitter/doc/plot.txt @@ -0,0 +1,91 @@ +/** +* \page plotNtuple How to make plots using ECALELF ntuples +#======================================== Working with ntuples: how to +# play by hand with ntuples + +If you are interested only in using the fit for validations you can +skip this paragraphs and go directly to "RERECO VALIDATION instructions" + +The .dat config file keeping the list of ntuples can be modified according to the needs adding or commenting unuseful ntuples or friend trees. +It's then important to have a simple way to merge the trees in order to be able to manipulate, scan and plot variables from the ntuples. +The ZFitter/script/GenRootChain.sh has been designed for this. + +running the command: +./script/GenRootChain.sh -f data/validation/myConfigFile.dat +in the tmp/ the s_chain.root, d_chain.root load.C are created for MC and data respectively. +The .root files have the TChains already defined, merging the files with the same treeName in the config file and adding the friends properly. +Due to a bug in ROOT in order to properly load the files the load.C script is created. + +To work with ntuples you can do (see pratical example below): +root -l tmp/d_chain.root tmp/s_chain.root tmp/load.C +data -> Draw("*"); +signalA -> Draw("*"); + +NB: Please check in the load.C file the correct assignment of the tree pointer to the correct file. + +#============================== Data/MC plots +A standard function for data/MC plots have been prepared and is available in macro/PlotDataMC.C + +In the following you can find an example of production of data/MC plots with a config file with +22Jan rereco data, run dependent MC (three samples with different generators: s1, s2, s3) +./script/GenRootChain.sh -f data/validation/22Jan2012-runDepMCAll_v2.dat +root -l -b -q tmp/d_chain.root tmp/s1_chain.root tmp/s2_chain.root tmp/load.C macro/standardDataMC.C + +***************** +The load.C script is commented below: +{ + gROOT->ProcessLine(".L macro/PlotDataMC.C+"); // -> functions for data/MC plots + gROOT->ProcessLine(".L src/setTDRStyle.C"); + gROOT->ProcessLine(".L macro/addChainWithFriends.C+"); // -> functions to work around ROOT bugs in friend treatment + + setTDRStyle1(); + + TChain *data = (TChain *) _file0->Get("selected"); // -> pointers to samples + TChain *signalA = (TChain *) _file1->Get("selected"); // -> pointers to samples + TChain *signalB = (TChain *) _file2->Get("selected"); // -> pointers to samples + TChain *signalC = (TChain *) _file3->Get("selected"); // -> pointers to samples + + ReassociateFriends(_file0, data); // -> functions to correct associate the friends to their main trees + ReassociateFriends(_file1, signalA); // -> functions to correct associate the friends to their main trees + ReassociateFriends(_file2, signalB); // -> functions to correct associate the friends to their main trees + ReassociateFriends(_file3, signalC); // -> functions to correct associate the friends to their main trees + + TDirectory *curDir = new TDirectory("curDir",""); + curDir->cd(); + + TString outputPath="tmp/"; + +// look at standardDataMC.C for some examples +} +***************** +The standardDataMC.C example: +{ + std::vector mcLabel_vec; // create a vector of labels for the MC samples + mcLabel_vec.push_back("Madgraph"); + mcLabel_vec.push_back("Powheg"); + mcLabel_vec.push_back("Sherpa"); + + //MakeChainVector(signalA,signalB,signalC) + + c = PlotDataMCs(data, // pointer to data chain + MakeChainVector(signalA,signalB,signalC), // creates a vector of chains for MCs + "etaEle", // variable to be plotted + "(100,-2.5,2.5)", // binning of x axis + "eleID_loose-trigger-noPF-Et_25", // stream based selection with ECALELF convention -> a specific class takes care in parsing the string and provide the selections cuts + "", // additional selection string in standard ROOT syntax, + "Data", // label for data in Legend + mcLabel_vec, // vector of strings for MC labels in legend + "#eta", // x axis title + "", + false, // do plot in log scale + true // reweight MC for PU + ); // use r9weight + c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.eps"); + c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.C"); + delete c; +} + + + + +*/ diff --git a/ZFitter/doc/runDivide.txt b/ZFitter/doc/runDivide.txt new file mode 100644 index 00000000000..871df8eaecf --- /dev/null +++ b/ZFitter/doc/runDivide.txt @@ -0,0 +1,23 @@ +/** + * \page runDivide How to produce runRanges .dat files + +The idea is to produce a file with the run ranges with 100k Zee events +(to have enough statistics in the EE), but taking into account also +that some run ranges should not be between to TSs or two era (RUN A +and B). + + +The run ranges: + - put in the data/runRanges/runRangeLimits.dat the runNumber that should start a new run range (TSs for example) + - run the command +\code ./bin/ZFitter.exe -f file.dat --runDivide \endcode + +The ZFitter.exe options are: +\code + --runDivide execute the run division + --nEvents_runDivide arg (=100000) Minimum number of events in a + run range +\endcode + + +*/ \ No newline at end of file From d259d30bc55494e9f49dd22e97bec600c90b9b9d Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 30 Jan 2014 12:06:15 +0100 Subject: [PATCH 292/475] reordering functions and documented class --- ZFitter/interface/ElectronCategory_class.hh | 62 +++++++++++---------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/ZFitter/interface/ElectronCategory_class.hh b/ZFitter/interface/ElectronCategory_class.hh index 172e093adf7..a51c8157d6a 100644 --- a/ZFitter/interface/ElectronCategory_class.hh +++ b/ZFitter/interface/ElectronCategory_class.hh @@ -1,16 +1,25 @@ -/************************************************************* +#ifndef ElectronCategory_class_hh +#define ElectronCategory_class_hh +/// Di-electron events are selected using a short special syntax defined in this class +/**\class ElectronCategory_class ElectronCategory_class.cc Calibration/ZFitter/src/ElectronCategory_class.cc + * Description: + * + */ + +/***********************************************************//** * Parser of category class provides a TCut - * + * one di-electron category is difined by a series of cuts to be + * applied to both electrons + * + * * Syntax: - * one di-electron category is difined by a series of cuts to be - * applied to both electrons - * '-' is the cut separator - * es. -- - * es. EB-absEta_0_1-gold: + * - '-' is the cut separator
+ * es. --
+ * es. EB-absEta_0_1-gold:
* three cuts are applied: - * EB -> no parameters + * EB -> no parameters, * absEta_0_1 -> two parameters 0 and 1 (parameters are - * separated by _ + * separated by _, * gold -> no parameters * * List of possible cuts without parameter: @@ -20,19 +29,17 @@ * Et_X: Et_ * eleID_X: eleID == X * - * List of possible cuts with 2 parameters: - * #### ATTENTION! Same syntax but different meaning! - * runNumber_X_Y: X <= runNumber <= Y - * IEta_X_Y: X <= ieta (or iX) <= Y - * absIEta_X_Y: X <= abs(ieta) <= Y - * distIEta_X_Y: X-Y <= ieta <= X+Y - * absEta_X_Y: X <= |eta| < Y - * energySC_X_Y: X <= energySCEle < Y - * nPV_X_Y: X <= nPV < Y + * List of possible cuts with 2 parameters:
+ * ATTENTION! Same syntax but different meaning!
+ * - runNumber_X_Y: X <= runNumber <= Y + * - IEta_X_Y: X <= ieta (or iX) <= Y + * - absIEta_X_Y: X <= abs(ieta) <= Y + * - distIEta_X_Y: X-Y <= ieta <= X+Y + * - absEta_X_Y: X <= |eta| < Y + * - energySC_X_Y: X <= energySCEle < Y + * - nPV_X_Y: X <= nPV < Y * *************************************************************/ -#ifndef ElectronCategory_class_hh -#define ElectronCategory_class_hh #include #include @@ -57,19 +64,18 @@ public: TString energyBranchName; bool _corrEle; //------------------------------ - // this method is though to give smaller formulas in the selection reducing a bit redundant cuts - std::set GetCutSet(TString region); // -> make sure that all the cuts that goes in && are inserted separately - TCut GetCut(TString region, bool isMC, int nEle=0, bool corrEle=false); - //inline TCut GetCut(TString region, bool isMC){ return GetCut(region, isMC, 0,false);}; - TString GetBranchName(TString region, bool isRooFit); + TCut GetCut(TString region, bool isMC, int nEle=0, bool corrEle=false); ///< Returns the TCut correspoding to the categories //inline void SetExternalFile(TString fileName){_extFileName=fileName;}; //private: - //TCut GetSpecial(void); - TString GetBranchNameRooFit(TString region); - std::set GetBranchNameNtuple(TString region); + std::set GetBranchNameNtuple(TString region); ///< returns the list of the branch names used by the cuts private: + TString GetBranchNameRooFit(TString region); + + // this method is though to give smaller formulas in the selection reducing a bit redundant cuts + std::set GetCutSet(TString region); // -> make sure that all the cuts that goes in && are inserted separately + //TString _extFileName; }; From ff0f91b36a1ccf01088e305f6c2112c75388e020 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 30 Jan 2014 12:25:53 +0100 Subject: [PATCH 293/475] updated documentation --- mkDoc.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mkDoc.sh b/mkDoc.sh index 3f5d383878f..da37dec99ee 100755 --- a/mkDoc.sh +++ b/mkDoc.sh @@ -7,4 +7,10 @@ fi doxygen fulldoc +cd doc/doxygen/fulldoc/ +git pull +git add * +git commit -m "updated documentation" -a +git push +cd - From 048b14adbd0cfe2b435f8eb9a6fffd7ba3eb2a4e Mon Sep 17 00:00:00 2001 From: shervin Date: Sat, 1 Feb 2014 09:15:21 +0100 Subject: [PATCH 294/475] updated documentation --- ZFitter/doc/Hgg_systematics.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ZFitter/doc/Hgg_systematics.txt b/ZFitter/doc/Hgg_systematics.txt index 70f91e3944a..1c57565969b 100644 --- a/ZFitter/doc/Hgg_systematics.txt +++ b/ZFitter/doc/Hgg_systematics.txt @@ -1,3 +1,10 @@ +/** +* Make the sigmaCB vs sigmaM/M plot to check the smearings: +\code ./script/GenRootChain.sh -f data/validation/22Jan2012-runDepMCAll_v2.dat --regionsFile=data/regions/validation.dat --addBranch=invMassSigma_SC_regrCorrSemiParV5_pho +\endcode + +*/ + List of effects to be studied: - PU stability: - deltaM, deltaP plot vs nVtx From 53469fc13edc2ffaeac1662470d510b6e19a30c0 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 3 Feb 2014 10:19:47 +0100 Subject: [PATCH 295/475] updated documentation --- EleNewEnergiesProducer/doc/README | 17 ++-------- .../python/elenewenergiesproducer_cfi.py | 19 +++++++++++ ZFitter/doc/README | 28 +++++++++++++++- ZNtupleDumper/src/ZNtupleDumper.cc | 32 +++++++++---------- fulldoc | 8 ++--- 5 files changed, 69 insertions(+), 35 deletions(-) diff --git a/EleNewEnergiesProducer/doc/README b/EleNewEnergiesProducer/doc/README index b50997500c3..eb9da6ceba0 100644 --- a/EleNewEnergiesProducer/doc/README +++ b/EleNewEnergiesProducer/doc/README @@ -1,17 +1,6 @@ -This module is a producer of ValueMaps that associate to each electron -in the GsfElectron collection, one float that is a new type of energy -associated to the electron. -The core of the module is the plugin EleNewEnergiesProducer.cc whose -cfi.py file is elenewenergiesproducer_cfi.py +/** +* \page regressions Electron energies -The plugin just create the new collection, loop over the gsfElectron -collection and calculate the new energy according to a separate class -that should called by the plugin. The implementation of the -calculation of the new energy should not be done in the plugin but in -a separate class in order to keep it more general and flexible. -The separate class can be added in the src directory or already -present in some other CMSSW package (add the required lines in the -BuildFile.xml). +*/ -You should copy the files indicated in data/copy.url in the data/ directory diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index c625d924058..125d05f0b29 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -1,3 +1,22 @@ +## +#This module is a producer of ValueMaps that associate to each electron +#in the GsfElectron collection, one float that is a new type of energy +#associated to the electron. +#The core of the module is the plugin EleNewEnergiesProducer.cc whose +#cfi.py file is elenewenergiesproducer_cfi.py +# +#The plugin just create the new collection, loop over the gsfElectron +#collection and calculate the new energy according to a separate class +#that should called by the plugin. The implementation of the +#calculation of the new energy should not be done in the plugin but in +#a separate class in order to keep it more general and flexible. +#The separate class can be added in the src directory or already +#present in some other CMSSW package (add the required lines in the +#BuildFile.xml). +# +# +#You should copy the files indicated in data/copy.url in the data/ directory +## import FWCore.ParameterSet.Config as cms # ALCARECO collections diff --git a/ZFitter/doc/README b/ZFitter/doc/README index e30a9560661..5692630c53d 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -6,7 +6,33 @@ Go to the Calibration/ZFitter directory and compile it: Calibration/ZFitter will be your working directory now on. -\ref ZFitterConfigFiles +Two methods are used in order to evaluate the energy scale and +resolution: + - fitMethod: consists in fitting the Z lineshape with a parametric +model + This method gives an estimate of the Z peak and width separately +for data and MC. On the other hand the energy scale and energy +resolution are estimated for electrons belonging to the same +di-electron categories. With this method the energy scale and +resolution are measured for di-electron categories. + + - smearingMethod: consists in using the Z lineshape from MC after the +scaling and smearing of the single electron energy. + The energy scale and smearing is applied to the single electron +energy before calculating the invariant mass, so they are directly +the single electron energy scale and smearings. + +The methods are implemented in separate classes, there is only one +executable (./bin/ZFitter.exe) that with command line options can run the fitMethod or the +smearingMethod. + +The inputs to the ZFitter program are given in the form of: + - configuration files (.dat) + - command line options + +The configuration files are described in: \ref ZFitterConfigFiles + +The ntuple structure and logic is explained in \ref NtupleStructure \ref plotNtuple diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index f2efbf6d11a..91da3432a44 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -245,22 +245,22 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t energySigmaSCEle_regrCorr_ele[2]; Float_t energySigmaSCEle_regrCorr_pho[2]; - Float_t energySCEle_regrCorrSemiParV4_pho[2], energySigmaSCEle_regrCorrSemiParV4_pho[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV4_ele[2], energySigmaSCEle_regrCorrSemiParV4_ele[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV5_pho[2], energySigmaSCEle_regrCorrSemiParV5_pho[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV5_ele[2], energySigmaSCEle_regrCorrSemiParV5_ele[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV6_pho[2], energySigmaSCEle_regrCorrSemiParV6_pho[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV6_ele[2], energySigmaSCEle_regrCorrSemiParV6_ele[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV7_pho[2], energySigmaSCEle_regrCorrSemiParV7_pho[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV7_ele[2], energySigmaSCEle_regrCorrSemiParV7_ele[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV8_pho[2], energySigmaSCEle_regrCorrSemiParV8_pho[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiParV8_ele[2], energySigmaSCEle_regrCorrSemiParV8_ele[2]; ///< see documentation on regressions - Float_t energySCEle_regrCorrSemiPar7TeVtrainV6_pho[2], energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV6_ele[2], energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV7_pho[2], energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV7_ele[2], energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV8_pho[2], energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV8_ele[2], energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiParV4_pho[2], energySCEle_regrCorrSemiParV4_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV4_ele[2], energySCEle_regrCorrSemiParV4_ele[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV5_pho[2], energySCEle_regrCorrSemiParV5_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV5_ele[2], energySCEle_regrCorrSemiParV5_ele[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV6_pho[2], energySCEle_regrCorrSemiParV6_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV6_ele[2], energySCEle_regrCorrSemiParV6_ele[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV7_pho[2], energySCEle_regrCorrSemiParV7_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV7_ele[2], energySCEle_regrCorrSemiParV7_ele[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV8_pho[2], energySCEle_regrCorrSemiParV8_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiParV8_ele[2], energySCEle_regrCorrSemiParV8_ele[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho[2], energySCEle_regrCorrSemiPar7TeVtrainV6_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele[2], energySCEle_regrCorrSemiPar7TeVtrainV6_ele[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho[2], energySCEle_regrCorrSemiPar7TeVtrainV7_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele[2], energySCEle_regrCorrSemiPar7TeVtrainV7_ele[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho[2], energySCEle_regrCorrSemiPar7TeVtrainV8_pho[2]; ///< see \ref regressions + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele[2], energySCEle_regrCorrSemiPar7TeVtrainV8_ele[2]; ///< see \ref regressions Float_t energySCEle_corr[2]; ///< ecal energy with corrections base on type of electron (see #classificationEle) diff --git a/fulldoc b/fulldoc index ad9ef47435f..474f48dbb0d 100644 --- a/fulldoc +++ b/fulldoc @@ -100,7 +100,7 @@ ALWAYS_DETAILED_SEC = NO # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. -INLINE_INHERITED_MEMB = NO +INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set @@ -459,7 +459,7 @@ WARN_LOGFILE = fulldoc-warn.log # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ZNtupleDumper ZFitter ./ ALCARAW_RECO/doc/rereco.txt +INPUT = ZNtupleDumper ZFitter ./ # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -567,7 +567,7 @@ INLINE_SOURCES = YES # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. -STRIP_CODE_COMMENTS = NO +STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented @@ -1126,7 +1126,7 @@ GROUP_GRAPHS = YES # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. -UML_LOOK = NO +UML_LOOK = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. From 1a3f3b67959beeebb992e194b7e7f364d5cc9053 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 3 Feb 2014 10:22:35 +0100 Subject: [PATCH 296/475] added further doc --- ZFitter/doc/ntupleStructure.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ZFitter/doc/ntupleStructure.txt diff --git a/ZFitter/doc/ntupleStructure.txt b/ZFitter/doc/ntupleStructure.txt new file mode 100644 index 00000000000..1c3316a8319 --- /dev/null +++ b/ZFitter/doc/ntupleStructure.txt @@ -0,0 +1,29 @@ +/** +* \page NtupleStructure Ntuple content and logic of use +* +* +ECALELF ntuples are produced by the ZNtupleDumper class. Follow the +link to see the branches that are implemented. + +The idea is to keep very small ntuples (almost essential for the needs +of standard calibration, energy scale and smearings evaluation). +One branch with the Z invariant mass for each energy +version is provided also, in order to speed at maximum the fitting +procedure avoiding the recalculation of the invariant mass. + +Nonetheless, other additional ntuples can be produced in order to save +additional informations for particular studies. This ntuples are +complementary to the default ones (the name of the basic tree is +"selected"). +The additional ntuples should be used adding them to the "selected" +ntuples as friend trees. + +The designed structure should garantie flexibility (additional studies +can be done with additional ntuples) and fastness (one can use the +ntuples that really needs). + +Ntuples are produced both for centrally produced datasets and private +ECALELF rerecoes. Additional ntuples are not produced by default but +only for the cases when they are required. + +*/ From 319a0ab8a0d5723da0e8fc688eaf368f59a7fbe0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 6 Feb 2014 14:48:58 +0100 Subject: [PATCH 297/475] gain switch info as unsigned char --- ZFitter/src/ElectronCategory_class.cc | 57 +++++++++++++++++++++++---- ZNtupleDumper/src/ZNtupleDumper.cc | 20 ++++++---- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 5026d9e8562..1f4debfefcc 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -78,6 +78,7 @@ TCut ElectronCategory_class::GetCut(TString region, bool isMC, int nEle, bool co cut+=cut_string; } + #ifdef DEBUG std::cout << cut << std::endl; #endif @@ -205,6 +206,8 @@ std::set ElectronCategory_class::GetCutSet(TString region){ // (17:58:27) Riccardo Paramatti: EB- : 7, 9, 10, 16, 17 TCut noPFEle_cut = "recoFlagsEle_ele1 > 1 && recoFlagsEle_ele2 > 1"; TCut fiducial_cut = "eleID[0]%2==1 && eleID[1]%2==1"; + + /* se region contiene runNumber: prendi il primo range dal primo _ _ dopo runNumber @@ -296,7 +299,36 @@ std::set ElectronCategory_class::GetCutSet(TString region){ cutSet.insert(TString(bad_cut)); continue; } - + + //--------------- + //--------------- gain + if(string.Contains("gainEle")){ + TObjArray *splitted = string.Tokenize("_"); + if(splitted->GetEntries() < 2){ + std::cerr << "ERROR: incomplete eleID region definition" << std::endl; + continue; + } + TObjString *Objstring1 = (TObjString *) splitted->At(1); + + TString string1 = Objstring1->GetString(); + if(string1=="12") string1="0"; + if(string1=="6") string1="1"; + if(string1=="1") string1="2"; + + TCut cutEle1("gainEle_ele1 =="+string1); + TCut cutEle2("gainEle_ele2 =="+string1); + + if(string.Contains("SingleEle")) + cutSet.insert(TString(cutEle1 || cutEle2)); + else{ + cutSet.insert(TString(cutEle1)); + cutSet.insert(TString(cutEle2)); + } + delete splitted; + continue; + } + + //--------------- ETA if(string.Contains("absEta")){ TObjArray *splitted = string.Tokenize("_"); @@ -983,15 +1015,25 @@ std::set ElectronCategory_class::GetCutSet(TString region){ if(splitted->GetEntries() < 3){ std::cerr << "ERROR: incomplete invMassSigma region definition" << std::endl; continue; - } - TObjString *Objstring1 = (TObjString *) splitted->At(1); - TObjString *Objstring2 = (TObjString *) splitted->At(2); + } + + TObjString *Objstring0 = (TObjString *) splitted->At(0); + TString string0 = Objstring0->GetString(); + for(int i=1; i < splitted->GetEntries()-2; i++){ + Objstring0 = (TObjString *) splitted->At(i); + string0+="_"; string0+=Objstring0->GetString(); + } + TObjString *Objstring1 = (TObjString *) splitted->At(splitted->GetEntries()-2); + TObjString *Objstring2 = (TObjString *) splitted->At(splitted->GetEntries()-1); + TString string1 = Objstring1->GetString(); TString string2 = Objstring2->GetString(); - - TCut cutEle_1("invMassSigma >= "+string1); - TCut cutEle_2("invMassSigma < "+string2); + + string0.ReplaceAll("invMassSigma",""); + + TCut cutEle_1("invMassSigma"+string0+ ">= "+string1); + TCut cutEle_2("invMassSigma"+string0+ "< "+string2); cut_string += cutEle_1 && cutEle_2; cutSet.insert(TString(cutEle_1)); @@ -1022,6 +1064,7 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TString string2 = Objstring2->GetString(); string0.ReplaceAll("invMassRelSigma",""); + TCut cutEle_1("invMassSigma"+string0+"/invMass"+string0+ ">= "+string1); TCut cutEle_2("invMassSigma"+string0+"/invMass"+string0+ "< "+string2); diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index f2efbf6d11a..41577c20db8 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -217,6 +217,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t recoFlagsEle[2]; ///< 1=trackerDriven, 2=ecalDriven only, 3=tracker and ecal driven + UChar_t gainEle[2]; ///< Gain switch 0==gain12, 1==gain6, 2==gain1 + Float_t PtEle[2]; Int_t classificationEle[2]; ///< electron classification in GOLD, SHOWERING, etc. @@ -228,8 +230,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t seedLCSCEle[2]; Float_t avgLCSCEle[2]; - Bool_t isGainSwitch6[2];///< Gain switch 12->6 - Bool_t isGainSwitch1[2];///< Gain switch 6->1 + + Float_t energyMCEle[2]; ///< Electron MC true energy Float_t energySCEle[2]; ///< corrected SuperCluster energy @@ -728,8 +730,8 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("seedLCSCEle", seedLCSCEle, "seedLCSCEle[2]/F"); tree->Branch("avgLCSCEle", avgLCSCEle, "avgLCSCEle[2]/F"); - tree->Branch("isGainSwitch6", isGainSwitch6, "isGainSwitch6[2]/B"); - tree->Branch("isGainSwitch1", isGainSwitch1, "isGainSwitch1[2]/B"); + + tree->Branch("gainEle", gainEle, "gainEle[2]/b"); tree->Branch("energyMCEle", energyMCEle, "energyMCEle[2]/F"); tree->Branch("energySCEle", energySCEle, "energySCEle[2]/F"); @@ -976,8 +978,9 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int if(isMC) seedLCSCEle[index]=-10; else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); - isGainSwitch6[index]=seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6); - isGainSwitch1[index]=seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1); + if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; + else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; + else gainEle[index]=0; } else { EEDetId seedDetId = electron1.superCluster()->seed()->seed(); @@ -988,8 +991,9 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int if(isMC) seedLCSCEle[index]=-10; else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); - isGainSwitch6[index]=seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6); - isGainSwitch1[index]=seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1); + if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; + else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; + else gainEle[index]=0; } float sumLC_E = 0.; From 90a18ec644aa761508febe595e50743e9292a710 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 6 Feb 2014 14:53:34 +0100 Subject: [PATCH 298/475] smearing branch and invMassSigma branch production fixed --- ZFitter/bin/ZFitter.cpp | 2 + .../interface/EnergyScaleCorrection_class.h | 24 ++-- ZFitter/interface/addBranch_class.hh | 2 +- ZFitter/src/EnergyScaleCorrection_class.cc | 132 ++++++++++++++---- ZFitter/src/addBranch_class.cc | 87 +++++++++--- 5 files changed, 187 insertions(+), 60 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index dfd53925600..9ad8fa80097 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -744,6 +744,8 @@ int main(int argc, char **argv) { TTree *corrTree = eScaler.GetSmearTree(ch, true, energyBranchName ); f.cd(); + corrTree->SetName(TString("smearEle_")+smearEleType.c_str()); + corrTree->SetTitle(smearEleType.c_str()); corrTree->Write(); std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; std::cout << " smearEle entries: " << corrTree->GetEntries() << std::endl; diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index 8445791c7dd..45fd6070d53 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -15,20 +15,24 @@ class correctionValue_class{ float scale, scale_err; float constTerm, constTerm_err; float alpha, alpha_err; + float Emean, Emean_err; correctionValue_class(void){ scale=1; scale_err=0; constTerm=0; constTerm_err=0; alpha=0; alpha_err=0; + Emean=0; Emean_err=0; }; friend ostream& operator << (ostream& os, const correctionValue_class a){ os << " " << a.scale << " +/- " << a.scale_err //<< std::endl << " " - << a.constTerm << " +/- "<< a.constTerm_err //<< std::endl + << a.constTerm << " +/- " << a.constTerm_err //<< std::endl << " " - << a.alpha << " +/- " << a.alpha_err; + << a.alpha << " +/- " << a.alpha_err + << " " + << a.Emean << " +/- " << a.Emean_err; return os; }; }; @@ -59,7 +63,7 @@ class correctionCategory_class{ etmin=EtEle; etmax=EtEle; } - correctionCategory_class(TString category_); + correctionCategory_class(TString category_); ///< constructor with name of the category according to ElectronCategory_class bool operator<(const correctionCategory_class& b) const; @@ -83,7 +87,7 @@ class EnergyScaleCorrection_class{ public: EnergyScaleCorrection_class(TString correctionFileName, - TString smearingFileName=""); + TString smearingFileName=""); ///< constructor with correction file names ~EnergyScaleCorrection_class(void); void ReadFromFile(TString filename); float getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle); // deprecated @@ -100,8 +104,8 @@ class EnergyScaleCorrection_class{ private: float GetMean_nPV(TChain *tree, bool fastLoop, TString nPVBranchName); - void Add(TString category_, int runMin_, int runMax_, double deltaP_, double err_deltaP_); + public: //============================== smearings @@ -111,14 +115,14 @@ class EnergyScaleCorrection_class{ correction_map_t smearings, smearings_not_defined; void AddSmearing(TString category_, int runMin_, int runMax_, //double smearing_, double err_smearing_); - double constTerm, double err_constTerm, double alpha, double err_alpha); - + double constTerm, double err_constTerm, double alpha, double err_alpha, double Emean, double err_Emean); + float getSmearingSigma(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); + public: float getSmearing(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); + float getSmearingRho(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); ///< public for sigmaE estimate - public: - float getSmearingSigma(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); - void ReadSmearingFromFile(TString filename); + void ReadSmearingFromFile(TString filename); ///< File structure: category constTerm alpha; TTree *GetSmearTree(TChain *tree, bool fastLoop, TString energyEleBranchName, TString runNumberBranchName="runNumber", diff --git a/ZFitter/interface/addBranch_class.hh b/ZFitter/interface/addBranch_class.hh index 8f02f67e67b..0a06e0aa6d2 100644 --- a/ZFitter/interface/addBranch_class.hh +++ b/ZFitter/interface/addBranch_class.hh @@ -45,7 +45,7 @@ public: private: - TTree* AddBranch_invMassSigma(TChain* originalChain, TString treename, TString invMassBranchName, bool fastLoop=true); + TTree* AddBranch_invMassSigma(TChain* originalChain, TString treename, TString invMassBranchName, bool fastLoop=true, bool isMC=true); TTree* AddBranch_iSM(TChain* originalChain, TString treename, TString iSMEleName, bool fastLoop); TTree* AddBranch_smearerCat(TChain* originalChain, TString treename, bool isMC); diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 4c1535e412b..0e69fdb4d25 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -97,6 +97,11 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax return; } + /** + * File structure: + * category "runNumber" runMin runMax deltaP err_deltaP + * + */ void EnergyScaleCorrection_class::ReadFromFile(TString filename){ std::cout << "[STATUS] Reading recalibration values from file: " << filename << std::endl; ifstream f_in(filename); @@ -121,6 +126,7 @@ void EnergyScaleCorrection_class::ReadFromFile(TString filename){ f_in.close(); + noCorrections=false; return; } @@ -200,31 +206,55 @@ TTree *EnergyScaleCorrection_class::GetCorrTree(TChain *tree, bool fastLoop, //============================== SMEARING void EnergyScaleCorrection_class::AddSmearing(TString category_, int runMin_, int runMax_, - double constTerm, double err_constTerm, double alpha, double err_alpha){ -#ifdef SHERVIN - //double smearing_, double err_smearing_){ - // se le corrections non sono definite per Hgg (gold e bad) allora ignoro le righe che si riferiscono a queste categorie - if( (!isHggCat) && (category_.Contains("gold",TString::kIgnoreCase) || category_.Contains("bad",TString::kIgnoreCase))) { - return; - } + double constTerm, double err_constTerm, double alpha, double err_alpha, + double Emean, double err_Emean){ - if(smearings.count(category_)!=0){ - std::cerr << "[WARNING] duplicated smearing number in input file" << std::endl; - return; + correctionCategory_class cat(category_); + cat.runmin= (runMin_ < 0) ? 0 : runMin_; + cat.runmax=runMax_; + + if(scales.count(cat)!=0){ + std::cerr << "[ERROR] Category already defined!" << std::endl; + std::cerr << " Adding category: " << cat << std::endl; + std::cerr << " Defined category: " << scales[cat] << std::endl; + exit(1); } - correction_t corr; - corr.runMax=runMax_; - std::pair pair_tmp; - pair_tmp.first=constTerm; - pair_tmp.second=alpha; - smearings[category_]=pair_tmp; -#endif + correctionValue_class corr; + corr.constTerm = constTerm; + corr.constTerm_err= err_constTerm; + corr.alpha = alpha; + corr.alpha_err = err_alpha; + corr.Emean = Emean; + corr.Emean_err = err_Emean; + smearings[cat]=corr; + + std::cout << "[INFO:smearings ] " << cat << corr << std::endl; +#ifdef DEBUG + std::cout << corr << std::endl; +#endif return; } +/** + * File structure: + * category "runNumber" runMin runMax deltaP err_deltaP + * + * +EBlowEtaBad8TeV 0 0.0 1.0 -999. 0.94 -999999 999999 6.73 0. 7.7e-3 6.32e-4 0.00 0.16 +EBlowEtaGold8TeV 0 0.0 1.0 0.94 999. -999999 999999 6.60 0. 7.4e-3 6.50e-4 0.00 0.16 +EBhighEtaBad8TeV 0 1.0 1.5 -999. 0.94 -999999 999999 6.73 0. 1.26e-2 1.03e-3 0.00 0.07 +EBhighEtaGold8TeV 0 1.0 1.5 0.94 999. -999999 999999 6.52 0. 1.12e-2 1.32e-3 0.00 0.22 +################################################################################################## +EElowEtaBad8TeV 0 1.5 2.0 -999. 0.94 -999999 999999 0. 0. 1.98e-2 3.03e-3 0. 0. +EElowEtaGold8TeV 0 1.5 2.0 0.94 999. -999999 999999 0. 0. 1.63e-2 1.22e-3 0. 0. +EEhighEtaBad8TeV 0 2.0 3.0 -999. 0.94 -999999 999999 0. 0. 1.92e-2 9.22e-4 0. 0. +EEhighEtaGold8TeV 0 2.0 3.0 0.94 999. -999999 999999 0. 0. 1.86e-2 7.81e-4 0. 0. +################################################################################################## +* + */ + void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ -#ifdef SHERVIN std::cout << "[STATUS] Reading smearing values from file: " << filename << std::endl; ifstream f_in(filename); if(!f_in.good()){ @@ -233,24 +263,40 @@ void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ } int runMin=0, runMax=900000; + int unused=0; TString category, region2; //double smearing, err_smearing; - double constTerm, err_constTerm, alpha, err_alpha; + double rho, phi, Emean, constTerm, alpha, err_rho, err_phi, err_Emean, err_alpha=0., err_constTerm=0.; + double etaMin, etaMax, r9Min, r9Max; for(f_in >> category; f_in.good(); f_in >> category){ - f_in //>> region2 - //>> runMin >> runMax - >> constTerm >> alpha; - //>> smearing >> err_smearing; - - AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha); + if(category.BeginsWith("#")){ // ignore comments + f_in.ignore(1000,10); // ignore the rest of the line until \n + continue; + } + + f_in >> unused >> etaMin >> etaMax >> r9Min >> r9Max >> runMin >> runMax >> + Emean >> err_Emean >> + rho >> err_rho >> phi >> err_phi; +#ifdef DEBUG + std::cout << category << "\t" << etaMin << "\t" << etaMax << "\t" << r9Min << "\t" << r9Max << "\t" << runMin << "\t" << runMax << "\tEmean=" << Emean << "\t" << rho << "\t" << phi << std::endl; +#endif + if(Emean!=0){ + constTerm=rho*sin(phi); + alpha=rho*Emean*cos(phi); + }else{ + alpha=0; + constTerm=rho; + } + + AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha, Emean, err_Emean); } f_in.close(); // runCorrection_itr=runMin_map.begin(); noSmearings=false; -#endif + return; } @@ -280,7 +326,27 @@ float EnergyScaleCorrection_class::getSmearingSigma(int runNumber, float energy, double constTerm=corr_itr->second.constTerm; double alpha=corr_itr->second.alpha; - return sqrt(constTerm*constTerm + alpha*alpha/energy); + return sqrt(constTerm*constTerm + alpha*alpha/(energy/cosh(etaSCEle))); + +} + +float EnergyScaleCorrection_class::getSmearingRho(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle){ + + correctionCategory_class category(runNumber, etaSCEle, R9Ele, energy/cosh(etaSCEle)); + correction_map_t::const_iterator corr_itr = smearings.find(category); + if(corr_itr==smearings.end()){ // if not in the standard classes, add it in the list of not defined classes + if(smearings_not_defined.count(category)==0){ + correctionValue_class corr; + smearings_not_defined[category]=corr; + } + corr_itr = smearings_not_defined.find(category); + } + + double constTerm=corr_itr->second.constTerm; + double alpha = (corr_itr->second.Emean==0) ? 0 : corr_itr->second.alpha/corr_itr->second.Emean; + + //std::cout << (*corr_itr).second << std::endl; + return sqrt(constTerm*constTerm + alpha*alpha); ///< return rho } @@ -422,10 +488,9 @@ correctionCategory_class::correctionCategory_class(TString category_){ runmin=0; runmax=999999; etamin=-1;etamax=10; r9min=-1;r9max=10; - etmin=-1;etmax=300.; + etmin=-1;etmax=99999.; size_t p1,p2; // boundary - // eta region p1 = category.find("absEta_"); p2 = p1+1; @@ -444,6 +509,11 @@ correctionCategory_class::correctionCategory_class(TString category_){ } } + if(category.find("EBlowEta")!=std::string::npos){ etamin=0; etamax=1;}; + if(category.find("EBhighEta")!=std::string::npos){ etamin=1; etamax=1.479;}; + if(category.find("EElowEta")!=std::string::npos){ etamin=1.479; etamax=2;}; + if(category.find("EEhighEta")!=std::string::npos){ etamin=2; etamax=7;}; + // Et region p1 = category.find("-Et_"); p2 = p1+1; @@ -459,7 +529,7 @@ correctionCategory_class::correctionCategory_class(TString category_){ std::cout << etmin << "\t" << etmax << "\t" << category.substr(p1+1, p2-p1-1) << std::endl; } - if(category.find("gold")!=std::string::npos){ r9min=0.94; r9max=10;} - else if(category.find("bad")!=std::string::npos){ r9min=-1; r9max=0.94;}; + if(category.find("gold")!=std::string::npos || category.find("Gold")!=std::string::npos){ r9min=0.94; r9max=10;} + else if(category.find("bad")!=std::string::npos || category.find("Bad")!=std::string::npos){ r9min=-1; r9max=0.94;}; }; diff --git a/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc index 64fabb8a29c..0d3321752d6 100644 --- a/ZFitter/src/addBranch_class.cc +++ b/ZFitter/src/addBranch_class.cc @@ -1,7 +1,9 @@ #include "../interface/addBranch_class.hh" #include "../interface/ElectronCategory_class.hh" #include +#include +//#define DEBUG //#define NOFRIEND addBranch_class::addBranch_class(void): @@ -17,7 +19,7 @@ addBranch_class::~addBranch_class(void){ * \param BranchName invMassSigma or iSMEle (important, define which new branch you want) */ TTree *addBranch_class::AddBranch(TChain* originalChain, TString treename, TString BranchName, bool fastLoop, bool isMC){ - if(BranchName.Contains("invMassSigma")) return AddBranch_invMassSigma(originalChain, treename, BranchName, fastLoop); + if(BranchName.Contains("invMassSigma")) return AddBranch_invMassSigma(originalChain, treename, BranchName, fastLoop, isMC); if(BranchName.CompareTo("iSM")==0) return AddBranch_iSM(originalChain, treename, BranchName, fastLoop); if(BranchName.CompareTo("smearerCat")==0) return AddBranch_smearerCat(originalChain, treename, isMC); @@ -80,18 +82,19 @@ TTree* addBranch_class::AddBranch_Pt(TChain* originalChain, TString treename){ } -TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString treename, TString invMassSigmaName, bool fastLoop){ - if(scaler==NULL) exit(1); +TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString treename, TString invMassSigmaName, bool fastLoop, bool isMC){ + if(scaler==NULL){ + std::cerr << "[ERROR] EnergyScaleCorrection class not initialized" << std::endl; + exit(1); + } //sanity checks TString etaEleBranchName="etaEle", phiEleBranchName="phiEle", etaSCEleBranchName="etaSCEle"; TString R9EleBranchName="R9Ele"; TString energyBranchName, invMassBranchName, sigmaEnergyBranchName; -#ifndef NOFRIEND + TTree *newtree = new TTree(treename, treename); -#else - TTree *newtree = originalChain->CloneTree(); -#endif + if(newtree==NULL){ std::cerr << "[ERROR] New tree for branch " << invMassSigmaName << " is NULL" << std::endl; exit(1); @@ -107,6 +110,7 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr Float_t energyEle[2]; Float_t sigmaEnergyEle[2]; Float_t invMass; + Float_t corrEle[2]={1.,1.}; //Float_t smearEle[2]={1,1}; Float_t etaSCEle_[2]; @@ -131,6 +135,19 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr invMassBranchName="invMass_regrCorr_fra"; energyBranchName="energyEle_regrCorr_fra"; sigmaEnergyBranchName="energysigmaEle_regrCorr_fra"; + }else if(invMassSigmaName.Contains("SemiPar")){ + // invMassSigmaRelBranchName=invMassSigmaName; + // invMassSigmaRelBranchName.ReplaceAll("Sigma","SigmaRel"); + + invMassBranchName=invMassSigmaName; + invMassBranchName.ReplaceAll("Sigma",""); + energyBranchName=invMassBranchName; + energyBranchName.ReplaceAll("invMass_SC","energySCEle"); + sigmaEnergyBranchName=energyBranchName; + sigmaEnergyBranchName.ReplaceAll("energySCEle","energySigmaSCEle"); + }else{ + std::cerr << "[ERROR] Energy branch and invMass branch for invMassSigma = " << invMassSigmaName << " not defined" << std::endl; + exit(1); } if(fastLoop){ @@ -141,6 +158,10 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr originalChain->SetBranchStatus(phiEleBranchName,1); originalChain->SetBranchStatus(etaSCEleBranchName,1); originalChain->SetBranchStatus(R9EleBranchName,1); + if(originalChain->GetBranch("scaleEle")!=NULL){ + std::cout << "[STATUS] Adding electron energy correction branch from friend " << originalChain->GetTitle() << std::endl; + originalChain->SetBranchAddress("scaleEle", corrEle); + } //originalChain->SetBranchStatus(smearEleBranchName, true); originalChain->SetBranchStatus(energyBranchName,1); @@ -165,23 +186,53 @@ TTree* addBranch_class::AddBranch_invMassSigma(TChain* originalChain, TString tr originalChain->SetBranchAddress(sigmaEnergyBranchName, sigmaEnergyEle); originalChain->SetBranchAddress(invMassBranchName, &invMass); - Float_t invMassSigma; + Float_t invMassSigma; //, invMassSigmaRel; newtree->Branch(invMassSigmaName, &invMassSigma, invMassSigmaName+"/F"); + // newtree->Branch(invMassSigmaRelBranchName, &invMassSigmaRel, invMassSigmaRelBranchName+"/F"); for(Long64_t ientry = 0; ientryGetEntriesFast(); ientry++){ originalChain->GetEntry(ientry); float smearEle_[2]; - smearEle_[0] = scaler->getSmearingSigma(runNumber,energyEle[0], fabs(etaSCEle_[0]) < 1.4442, - R9Ele_[0],etaEle[0]); - smearEle_[1] = scaler->getSmearingSigma(runNumber,energyEle[1], fabs(etaSCEle_[1]) < 1.4442, - R9Ele_[1],etaEle[1]); - - invMassSigma = 0.5 * invMass * sqrt( - sigmaEnergyEle[0]/energyEle[0] * sigmaEnergyEle[0]/energyEle[0] + - sigmaEnergyEle[1]/energyEle[1] * sigmaEnergyEle[1]/energyEle[1] + - smearEle_[0] * smearEle_[0] + smearEle_[1] * smearEle_[1] - ); + smearEle_[0] = scaler->getSmearingRho(runNumber,energyEle[0], fabs(etaSCEle_[0]) < 1.4442, + R9Ele_[0],etaSCEle_[0]); + smearEle_[1] = scaler->getSmearingRho(runNumber,energyEle[1], fabs(etaSCEle_[1]) < 1.4442, + R9Ele_[1],etaSCEle_[1]); + if(smearEle_[0]==0 || smearEle_[1] ==0){ + std::cerr << "[ERROR] Smearing = 0 " << "\t" << smearEle_[0] << "\t" << smearEle_[1] << std::endl; + std::cout << "E_0: " << runNumber << "\t" << energyEle[0] << "\t" + << etaSCEle_[0] << "\t" << R9Ele_[0] << "\t" << etaEle[0] << "\t" << smearEle_[0] << "\t" << invMass << "\t" << corrEle[0] << "\t" << invMassSigma << "\t" << sigmaEnergyEle[0] << std::endl; + std::cout << "E_1: " << runNumber << "\t" << energyEle[1] << "\t" + << etaSCEle_[1] << "\t" << R9Ele_[1] << "\t" << etaEle[1] << "\t" << smearEle_[1] << "\t" << sigmaEnergyEle[1] << "\t" << corrEle[1] << std::endl; + exit(1); + } + if(isMC) invMass*=sqrt( + scaler->getSmearing(runNumber,energyEle[0], fabs(etaSCEle_[0]) < 1.4442, + R9Ele_[0],etaSCEle_[0]) + * + scaler->getSmearing(runNumber,energyEle[1], fabs(etaSCEle_[1]) < 1.4442, + R9Ele_[1],etaSCEle_[1]) + ); + + invMass*=sqrt(corrEle[0]*corrEle[1]); + + invMassSigma = 0.5 * invMass * + sqrt( + sigmaEnergyEle[0]/(energyEle[0]*corrEle[0]) * sigmaEnergyEle[0]/(energyEle[0]*corrEle[0]) + + sigmaEnergyEle[1]/(energyEle[1]*corrEle[1]) * sigmaEnergyEle[1]/(energyEle[1]*corrEle[1]) + + smearEle_[0] * smearEle_[0] + smearEle_[1] * smearEle_[1] + ); + // invMassSigmaRel = invMassSigma/invMass; +#ifdef DEBUG + E_0: 203777 55.7019 0.35335 0.958164 0.39268 inf 86.3919 1 inf 0.00636875 + E_1: 203777 33.6127 -0.309422 0.831792 -0.270196 inf 0.00910235 1 + if(ientry<10){ + std::cout << "E_0: " << runNumber << "\t" << energyEle[0] << "\t" + << etaSCEle_[0] << "\t" << R9Ele_[0] << "\t" << etaEle[0] << "\t" << smearEle_[0] << "\t" << invMass << "\t" << corrEle[0] << "\t" << invMassSigma << "\t" << sigmaEnergyEle[0] << std::endl; + std::cout << "E_1: " << runNumber << "\t" << energyEle[1] << "\t" + << etaSCEle_[1] << "\t" << R9Ele_[1] << "\t" << etaEle[1] << "\t" << smearEle_[1] << "\t" << sigmaEnergyEle[1] << "\t" << corrEle[1] << std::endl; + } +#endif newtree->Fill(); } From fbd86db76e06e529a366ea88bf33db2bbb6c23fd Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 6 Feb 2014 14:56:54 +0100 Subject: [PATCH 299/475] updated gitignore --- .gitignore | 7 ++++++- ALCARAW_RECO/.gitignore | 1 + ALCARAW_RECO/tmp/.gitignore | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 ALCARAW_RECO/.gitignore diff --git a/.gitignore b/.gitignore index 41acdfc2f13..86f5bb2b412 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,9 @@ prod_alcarereco # patch *.rej -.__afs* \ No newline at end of file +.__afs* + +# Images +*.png +*.eps +*.pdf diff --git a/ALCARAW_RECO/.gitignore b/ALCARAW_RECO/.gitignore new file mode 100644 index 00000000000..0e6f6bf6a7a --- /dev/null +++ b/ALCARAW_RECO/.gitignore @@ -0,0 +1 @@ +ElectronRecalibSuperClusterAssociatorSH.cc diff --git a/ALCARAW_RECO/tmp/.gitignore b/ALCARAW_RECO/tmp/.gitignore index e69de29bb2d..1323f32f1bb 100644 --- a/ALCARAW_RECO/tmp/.gitignore +++ b/ALCARAW_RECO/tmp/.gitignore @@ -0,0 +1,2 @@ +*.sed +*.cfg From 399bf15307968d7a4feca08ff51f4f6aa929c905 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 6 Feb 2014 14:59:05 +0100 Subject: [PATCH 300/475] updated gitignore --- ZFitter/test/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ZFitter/test/.gitignore diff --git a/ZFitter/test/.gitignore b/ZFitter/test/.gitignore new file mode 100644 index 00000000000..eb00ced25c0 --- /dev/null +++ b/ZFitter/test/.gitignore @@ -0,0 +1,2 @@ +MC +dato From d651698965da817c413452b3c49fd4faa19c1376 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 08:57:40 +0100 Subject: [PATCH 301/475] up --- ALCARAW_RECO/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ALCARAW_RECO/.gitignore b/ALCARAW_RECO/.gitignore index 0e6f6bf6a7a..694a9b57653 100644 --- a/ALCARAW_RECO/.gitignore +++ b/ALCARAW_RECO/.gitignore @@ -1 +1,4 @@ ElectronRecalibSuperClusterAssociatorSH.cc +filelist +processDump.py +crab.history From 3c5c098d75b8fe86111188538d13434402b6fec3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 13:47:23 +0100 Subject: [PATCH 302/475] fixed Global Tags for CMSSW53 with run dep MC --- ALCARAW_RECO/python/alcaSkimming.py | 31 +++++++---------------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 719c75cceda..bc43910340f 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -262,26 +262,6 @@ else: process.GlobalTag.globaltag = 'GR_P_V32::All' # 5_2_0 Prompt # process.GlobalTag.globaltag = 'GR_R_52_V7::All' # 5_2_0 - elif(re.match("CMSSW_5_3_3.*",CMSSW_VERSION)): - if(MC): - print "[INFO] Using GT START53_V7A::All" - process.GlobalTag.globaltag = 'START53_V7A::All' - else: - #process.GlobalTag.globaltag = 'GR_P_V41::All' # 5_3_3_patch1 Prompt - process.GlobalTag.globaltag = 'GR_R_53_V9F::All' # GT for 53 rereco (2011) - elif(re.match("CMSSW_5_3_7.*",CMSSW_VERSION)): - if(MC): - print "[INFO] Using GT START53_V24::All" - process.GlobalTag.globaltag = 'START53_V24::All' - else: - print "[INFO] Using GT FT_R_53_V21::All" - process.GlobalTag.globaltag = 'FT_R_53_V21::All' #22Jan rereco - elif(re.match("CMSSW_5_3_9_patch3",CMSSW_VERSION)): - if(MC): - print "[INFO] Using GT START53_V7N::All" - process.GlobalTag.globaltag = 'START53_V7N::All' - else: - process.GlobalTag.globaltag = 'FT_R_53_V21::All' #22Jan rereco elif(re.match("CMSSW_5_3_11_patch3",CMSSW_VERSION)): if(MC): print "[INFO] Using GT START53_LV4::All" @@ -289,13 +269,16 @@ # process.GlobalTag.globaltag = 'START53_LV4::All' else: process.GlobalTag.globaltag = 'FT_R_53_V21::All' #22Jan rereco - #process.GlobalTag.globaltag = 'FT_R_53_LV3::All' #21Jun rereco 53X 2011 data elif(re.match("CMSSW_5_3_.*",CMSSW_VERSION)): if(MC): - print "[INFO] Using GT START53_V7A::All" - process.GlobalTag.globaltag = 'START53_V7A::All' + print "[INFO] Using GT START53_V7N::All" + process.GlobalTag.globaltag = 'START53_V7N::All' # run dep MC + # print "[INFO] Using GT START53_V7G::All" + # process.GlobalTag.globaltag = 'START53_V7G::All' # suggested for analysis std. MC else: - process.GlobalTag.globaltag = 'GR_P_V42B::All' # 5_3_3 Prompt + process.GlobalTag.globaltag = 'FT_R_53_V21::All' #GR_P_V42B::All' # 5_3_3 Prompt + #process.GlobalTag.globaltag = 'FT_R_53_LV3::All' #21Jun rereco 53X 2011 data + #process.GlobalTag.globaltag = 'GR_R_53_V9F::All' # GT for 53 rereco (2011) elif(re.match("CMSSW_6_1_.*",CMSSW_VERSION)): if(MC): print "[INFO] Using GT START61_V11::All" From 1250e84fc91f434e6066e655f7d3b543f39c6aea Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 13:48:17 +0100 Subject: [PATCH 303/475] fixed warning --- ZFitter/src/SmearingImporter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 3b24f056909..3b6ea44c35b 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -301,7 +301,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; if(isMC && _pdfWeightIndex>0 && pdfWeights!=NULL){ - if(_pdfWeightIndex > pdfWeights->size()) continue; + if(((unsigned int)_pdfWeightIndex) > pdfWeights->size()) continue; event.weight *= ((*pdfWeights)[0]<=0 || (*pdfWeights)[0]!=(*pdfWeights)[0] || (*pdfWeights)[_pdfWeightIndex]!=(*pdfWeights)[_pdfWeightIndex])? 0 : (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0]; #ifdef DEBUG From a5173f3688b6f50c9e3debeeb5cde84e140d0f35 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 13:48:53 +0100 Subject: [PATCH 304/475] seed SC for trackerDriven electrons fix --- ZNtupleDumper/src/ZNtupleDumper.cc | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index d4cad695c97..7105f923d92 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -366,6 +366,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { void TreeSetDiElectronVar(pat::CompositeCandidate ZEE); void TreeSetSingleElectronVar(const pat::Electron& electron1, int index); void TreeSetDiElectronVar(const pat::Electron& electron1, const pat::Electron& electron2); + DetId findSCseed(const reco::SuperClusterRef& cluster); void InitExtraCalibTree(void); void TreeSetExtraCalibVar(const pat::Electron& electron1, int index); @@ -971,6 +972,22 @@ void ZNtupleDumper::TreeSetDiElectronVar(pat::CompositeCandidate ZEE){ } +DetId ZNtupleDumper::findSCseed(const reco::SuperClusterRef& cluster){ + DetId seedDetId; + float seedEnergy=0; + std::vector< std::pair > hitsFractions = cluster->hitsAndFractions(); + for(std::vector< std::pair >::const_iterator hitsAndFractions_itr = hitsFractions.begin(); + hitsAndFractions_itr != hitsFractions.end(); + hitsAndFractions_itr++){ + if(hitsAndFractions_itr->second > seedEnergy) + seedDetId=hitsAndFractions_itr->first; + } +#ifdef DEBUG + // std::cout << "[DEBUG findSCseed] seedDetIt: " << seedDetId << std::endl; +#endif + return seedDetId; +} + // a negative index means that the corresponding electron does not exist, fill with 0 void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int index){ @@ -1006,6 +1023,13 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int if(electron1.isEB()){ EBDetId seedDetId = electron1.superCluster()->seed()->seed(); + if(seedDetId.null()){ + if(electron1.trackerDrivenSeed()) seedDetId = findSCseed(electron1.superCluster()); + else{ + // std::cout << "[ERROR] No SC seed found for ecalDrivenElectron" << electron1.superCluster() << std::endl; + exit(1); + } + } EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; seedXSCEle[index]=seedDetId.ieta(); seedYSCEle[index]=seedDetId.iphi(); @@ -1019,6 +1043,14 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int } else { EEDetId seedDetId = electron1.superCluster()->seed()->seed(); + + if(seedDetId.null()){ + if(electron1.trackerDrivenSeed()) seedDetId = findSCseed(electron1.superCluster()); + else{ + // std::cout << "[ERROR] No SC seed found for ecalDrivenElectron" << electron1.superCluster() << std::endl; + exit(1); + } + } EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; seedXSCEle[index]=(EEDetId)(seedDetId).ix(); seedYSCEle[index]=(EEDetId)(seedDetId).iy(); From 3a277b23ae527f271d19c747be26fc7c1aa18d27 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 13:49:12 +0100 Subject: [PATCH 305/475] update branch name --- ZFitter/macro/PlotDataMC.C | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index ccc2a0b3d73..9d93f6b8286 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -607,19 +607,22 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn if(smear){ branchNameMC.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(smearEle[0]*smearEle[1]))"); + branchNameMC.ReplaceAll("invMass_SC_regrCorrSemiParV5_pho","(invMass_SC_regrCorrSemiParV5_pho*sqrt(smearEle[0]*smearEle[1]))"); branchNameMC.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*smearEle) "); branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*smearEle[0])"); branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*smearEle[1])"); } if(scale){ - branchNameData.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(corrEle[0]*corrEle[1]))"); - branchNameData.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*corrEle)"); - branchNameData.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*corrEle[0])"); - branchNameData.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*corrEle[1])"); + std::cout << "Apply scale" << std::endl; + branchNameData.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(scaleEle[0]*scaleEle[1]))"); + branchNameData.ReplaceAll("invMass_SC_regrCorrSemiParV5_pho","(invMass_SC_regrCorrSemiParV5_pho*sqrt(scaleEle[0]*scaleEle[1]))"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*scaleEle)"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*scaleEle[0])"); + branchNameData.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*scaleEle[1])"); } - //std::cout << branchNameData << "\t" << branchNameMC << std::endl; - + std::cout << branchNameData << "\t" << branchNameMC << std::endl; + // return NULL; // Draw histograms @@ -696,6 +699,10 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn TH1F *s = (TH1F *) gROOT->FindObject(mcHistName); if(s==NULL) continue; std::cout << "nEvents signal: " << s->Integral() << "\t" << s->GetEntries() << std::endl; + if(d->Integral()==0 && s->Integral()==0){ + delete c; + return NULL; + } if(logy){ s->GetYaxis()->SetRangeUser(0.1,max); } else { From feb92a015303c039141d2eb9a09805e109448da6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 13:49:33 +0100 Subject: [PATCH 306/475] update --- ZFitter/script/monitoring_validation.sh | 47 +++++++++++++------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/ZFitter/script/monitoring_validation.sh b/ZFitter/script/monitoring_validation.sh index 855c01d436f..b96d947cbc8 100755 --- a/ZFitter/script/monitoring_validation.sh +++ b/ZFitter/script/monitoring_validation.sh @@ -12,7 +12,7 @@ configFile=data/validation/monitoring_2012_53X.dat runRangesFile=data/runRanges/monitoring.dat baseDir=test -updateOnly="--updateOnly --noPU" +updateOnly="--updateOnly" #extraOptions="--forceNewFit" #extraOptions="--addBranch iSM --forceNewFit" @@ -459,29 +459,30 @@ if [ -n "$SYSTEMATICS" ];then # > ${tableFile} || exit 1 # exit 0 -# regionFile=data/regions/systematics.dat -# tableFile=${outDirTable}/systematics-${invMass_var}-${selection}-${commonCut}.tex -# if [ -z "${ONLYTABLE}" ];then -# ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ -# ${extraOptions} \ -# $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/systematics.log || exit 1 -# fi -# ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ -# > ${tableFile} || exit 1 + regionFile=data/regions/systematics.dat + tableFile=${outDirTable}/systematics-${invMass_var}-${selection}-${commonCut}.tex + if [ -z "${ONLYTABLE}" ];then + ./bin/ZFitter.exe ${otherOptions} -f ${configFile} --regionsFile ${regionFile} \ + ${extraOptions} \ + $updateOnly --invMass_var ${invMass_var} --commonCut=${commonCut} --selection=${selection} \ + --corrEleType=HggRunEtaR9Et \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img > ${outDirData}/log/systematics.log || exit 1 + fi + ./script/makeTable.sh --regionsFile ${regionFile} --commonCut=${commonCut} \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres ${tableCruijffOption} \ + > ${tableFile} || exit 1 -# for xVar in nPV -# do -# if [ ! -e "${outDirData}/img/stability/$xVar/$PERIOD" ];then -# mkdir ${outDirData}/img/stability/$xVar/$PERIOD/ -p -# fi -# ./script/stability.sh -t ${tableFile} \ -# --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y peak --column 51 $xMin $xMax || exit 1 -# # ./script/stability.sh -t ${tableFile} \ -# # --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y scaledWidth --column 51 $xMin $xMax || exit 1 -# done + for xVar in nPV + do + if [ ! -e "${outDirData}/img/stability/$xVar/$PERIOD" ];then + mkdir ${outDirData}/img/stability/$xVar/$PERIOD/ -p + fi + ./script/stability.sh -t ${tableFile} \ + --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y peak --column 51 $xMin $xMax || exit 1 + ./script/stability.sh -t ${tableFile} \ + --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y scaledWidth --column 51 $xMin $xMax || exit 1 + done if [ "${SYSTEMATICS}" == "all" -o "${SYSTEMATICS}" == "fitMethod" ];then regionFile=data/regions/validation.dat From a8c6733aa66f2969def4a563c2e80ce9df9a5dde Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 15:42:37 +0100 Subject: [PATCH 307/475] #9: fixed case of SC in EB and most energetic crystal in EE or viceversa --- ZNtupleDumper/src/ZNtupleDumper.cc | 75 ++++++++++++++---------------- 1 file changed, 35 insertions(+), 40 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 8c24a1ee343..9e9eb389cae 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -983,8 +983,13 @@ DetId ZNtupleDumper::findSCseed(const reco::SuperClusterRef& cluster){ seedDetId=hitsAndFractions_itr->first; } #ifdef DEBUG - // std::cout << "[DEBUG findSCseed] seedDetIt: " << seedDetId << std::endl; + std::cout << "[DEBUG findSCseed] seedDetIt: " << seedDetId.rawId() << std::endl + << *cluster << std::endl + << *(cluster->seed()) << std::endl; #endif + if(seedDetId.null()){ + std::cerr << "[ERROR] Invalid detID: " << *cluster << std::endl; + } return seedDetId; } @@ -1021,47 +1026,37 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); - if(electron1.isEB()){ - EBDetId seedDetId = electron1.superCluster()->seed()->seed(); - if(seedDetId.null()){ - if(electron1.trackerDrivenSeed()) seedDetId = findSCseed(electron1.superCluster()); - else{ - // std::cout << "[ERROR] No SC seed found for ecalDrivenElectron" << electron1.superCluster() << std::endl; - exit(1); - } - } - EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; - seedXSCEle[index]=seedDetId.ieta(); - seedYSCEle[index]=seedDetId.iphi(); - seedEnergySCEle[index]=seedRecHit->energy(); - if(isMC) seedLCSCEle[index]=-10; - else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); - - if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; - else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; - else gainEle[index]=0; - - } else { - EEDetId seedDetId = electron1.superCluster()->seed()->seed(); - - if(seedDetId.null()){ - if(electron1.trackerDrivenSeed()) seedDetId = findSCseed(electron1.superCluster()); - else{ - // std::cout << "[ERROR] No SC seed found for ecalDrivenElectron" << electron1.superCluster() << std::endl; - exit(1); - } + DetId seedDetId = electron1.superCluster()->seed()->seed(); + if(seedDetId.null()){ + if(electron1.trackerDrivenSeed()) seedDetId = findSCseed(electron1.superCluster()); + else{ + // std::cout << "[ERROR] No SC seed found for ecalDrivenElectron" << electron1.superCluster() << std::endl; + exit(1); } - EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; - seedXSCEle[index]=(EEDetId)(seedDetId).ix(); - seedYSCEle[index]=(EEDetId)(seedDetId).iy(); - seedEnergySCEle[index]=seedRecHit->energy(); - if(isMC) seedLCSCEle[index]=-10; - else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); - - if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; - else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; - else gainEle[index]=0; } + + EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; + + if(electron1.isEB() && seedDetId.subdetId() == EcalBarrel){ + EBDetId seedDetIdEcal = seedDetId; + seedXSCEle[index]=seedDetIdEcal.ieta(); + seedYSCEle[index]=seedDetIdEcal.iphi(); + }else if(electron1.isEB() && seedDetId.subdetId() == EcalEndcap){ + EEDetId seedDetIdEcal = seedDetId; + seedXSCEle[index]=seedDetIdEcal.ix(); + seedYSCEle[index]=seedDetIdEcal.iy(); + }else{ ///< this case is strange but happens for trackerDriven electrons + seedXSCEle[index]=0; + seedYSCEle[index]=0; + } + + seedEnergySCEle[index]=seedRecHit->energy(); + if(isMC) seedLCSCEle[index]=-10; + else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); + + if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; + else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; + else gainEle[index]=0; float sumLC_E = 0.; float sumE = 0.; From 61874746140ccd37da52688bfe3a2ae4ca30f884 Mon Sep 17 00:00:00 2001 From: Margherita Date: Fri, 7 Feb 2014 17:41:38 +0100 Subject: [PATCH 308/475] testing --- ALCARAW_RECO/alcarereco_datasets.dat | 4 ++++ ALCARAW_RECO/python/alcaSkimming.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat index 7c42edda1e1..afb846dc8da 100644 --- a/ALCARAW_RECO/alcarereco_datasets.dat +++ b/ALCARAW_RECO/alcarereco_datasets.dat @@ -34,3 +34,7 @@ 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco rereco_22Jan2013_shervin +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index ca3cb3e0b85..492587c07f4 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -422,7 +422,7 @@ if(re.match("CMSSW_6_.*", CMSSW_VERSION)): process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxPFRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) else: - process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) + process.alcarerecoSeq=cms.Sequence( process.jsonFilter * process.trivialCond * process.sandboxRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) process.rhoFastJetSeq = cms.Sequence() From 989633b6a7c36e6ee30e860fb0bb02b6ec6ee0c3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Feb 2014 18:13:31 +0100 Subject: [PATCH 309/475] fixed DeltaPhi in electron matching --- ValueMapTraslator/src/ValueMapTraslator.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index e5300b11989..f5c6e27a815 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -33,6 +33,8 @@ #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" +#include "DataFormats/Math/interface/deltaR.h" + //#define DEBUG // // class declaration @@ -141,8 +143,9 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) electron++){ //if(electronNew->GsfTrackF if(fabs(electronNew->eta() - electron->eta())>0.0001) continue; - if(fabs(electronNew->phi() - electron->phi())>0.0001) continue; - + //if(fabs(electronNew->phi() - electron->phi())>0.0001) continue; + if(deltaR(electronNew->eta(), electronNew->phi(), electron->eta(), electron->phi() > 0.0001)) continue; + reco::GsfElectronRef eleRef(oldreferenceHandle, electron-oldreferenceHandle->begin()); reco::GsfElectronRef eleRef2(referenceHandle, electronNew-referenceHandle->begin()); From a062465f811d92e371780d6a9253268689c32172 Mon Sep 17 00:00:00 2001 From: Margherita Date: Fri, 7 Feb 2014 19:22:11 +0100 Subject: [PATCH 310/475] fixed #10 for ValueMapTranslator --- ValueMapTraslator/src/ValueMapTraslator.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ValueMapTraslator/src/ValueMapTraslator.cc b/ValueMapTraslator/src/ValueMapTraslator.cc index f5c6e27a815..875799f91e8 100644 --- a/ValueMapTraslator/src/ValueMapTraslator.cc +++ b/ValueMapTraslator/src/ValueMapTraslator.cc @@ -33,8 +33,6 @@ #include "DataFormats/Common/interface/ValueMap.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" -#include "DataFormats/Math/interface/deltaR.h" - //#define DEBUG // // class declaration @@ -142,16 +140,18 @@ ValueMapTraslator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) electron!= oldreferenceHandle->end(); electron++){ //if(electronNew->GsfTrackF - if(fabs(electronNew->eta() - electron->eta())>0.0001) continue; + if(electron->gsfTrack() != electronNew->gsfTrack()) continue; ///< requires that the track is the same, so I'm sure the electron object is the same. This to avoid the case when two electrons have the same eta and phi at the vtx + //if(fabs(electronNew->eta() - electron->eta())>0.0001) continue; //if(fabs(electronNew->phi() - electron->phi())>0.0001) continue; - if(deltaR(electronNew->eta(), electronNew->phi(), electron->eta(), electron->phi() > 0.0001)) continue; - + reco::GsfElectronRef eleRef(oldreferenceHandle, electron-oldreferenceHandle->begin()); reco::GsfElectronRef eleRef2(referenceHandle, electronNew-referenceHandle->begin()); #ifdef DEBUG std::cout << eleRef->eta() << "\t" << eleRef2->eta() << "\t" - << eleRef->energy() << "\t" << eleRef2->energy() << "\t" + << eleRef->phi() << "\t" << eleRef2->phi() << "\t" + << eleRef->energy() << "\t" << eleRef2->energy() << "\t" + << (eleRef->gsfTrack() == eleRef2->gsfTrack()) << "\t" << (eleRef == eleRef2) << "\t" << (*inputHandle)[eleRef] << std::endl; #endif From 2b06f38c37848e58119795330fd13034750e43fd Mon Sep 17 00:00:00 2001 From: Margherita Date: Fri, 7 Feb 2014 19:28:22 +0100 Subject: [PATCH 311/475] rereco Margherita IC1x1 Fabrice --- .../reRecoTags/Cal_Dic2013_ZeeIC_v1_mo2.py | 16 +++++++++ .../22Jan2012-runDepMCAll_v2_mo2.dat | 36 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo2.py create mode 100644 ZFitter/data/validation/22Jan2012-runDepMCAll_v2_mo2.dat diff --git a/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo2.py b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo2.py new file mode 100644 index 00000000000..b947aee5367 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo2.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string('EcalIntercalibConstants_V20130808_2012ABCD_offline_1XTALZee'), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) + diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v2_mo2.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2_mo2.dat new file mode 100644 index 00000000000..20b7f15b4ac --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v2_mo2.dat @@ -0,0 +1,36 @@ +############### This file is equivalent to Winter13-powheg.dat but with new trees with trigger and new selection +########### standard MC +##### Madgraph +s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +#s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +#s1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +#############commentati per ridurre tempo +##### Powheg +#s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +#s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +#s2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +##### Sherpa +#s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +#s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +#s3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/78TeVtrainMC3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +########### Data +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARERECO/Cal_Dic2013_ZeeIC_v1_mo2/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686_22JanReReco_v1/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +#d1 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +#d2 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +#d3 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +#d4 selected root://eoscms//eos/cms/store/caf/user/shervin/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/78TeVtrain/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root +#d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/198022-203742-22Jan_v1.69300.true.root +#d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root +#s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root +#s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root +##### PU trees +#s1 pileup mcPUtree_s1-22Jan2012-runDepMC.dat +#s2 pileup mcPUtree_s2-22Jan2012-runDepMC.dat +#s3 pileup mcPUtree_s3-22Jan2012-runDepMC.dat +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root +#s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll.root +#s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root From dcf402ee400d9a589fa76334b9cbfeb4e90bba35 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 12:29:42 +0100 Subject: [PATCH 312/475] Revert "testing" This reverts commit 61874746140ccd37da52688bfe3a2ae4ca30f884. --- ALCARAW_RECO/alcarereco_datasets.dat | 4 ---- ALCARAW_RECO/python/alcaSkimming.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat index afb846dc8da..7c42edda1e1 100644 --- a/ALCARAW_RECO/alcarereco_datasets.dat +++ b/ALCARAW_RECO/alcarereco_datasets.dat @@ -34,7 +34,3 @@ 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco rereco_22Jan2013_shervin -190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 -193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 -198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 -203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 1099030845d..bc43910340f 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -411,7 +411,7 @@ if(re.match("CMSSW_6_.*", CMSSW_VERSION)): process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxPFRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) else: - process.alcarerecoSeq=cms.Sequence( process.jsonFilter * process.trivialCond * process.sandboxRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) + process.alcarerecoSeq=cms.Sequence( process.trivialCond * process.sandboxRerecoSeq * (process.seqALCARECOEcalCalElectronRECO + process.reducedEcalRecHitsES)) process.rhoFastJetSeq = cms.Sequence() From a7476b23aa12048b2a6d91465c9b7e5a89f90d2a Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 12:38:24 +0100 Subject: [PATCH 313/475] added rereco from Margherita --- ALCARAW_RECO/alcarereco_datasets.dat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat index 7c42edda1e1..afb846dc8da 100644 --- a/ALCARAW_RECO/alcarereco_datasets.dat +++ b/ALCARAW_RECO/alcarereco_datasets.dat @@ -34,3 +34,7 @@ 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Jun2013_AlphaComb_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco rereco_22Jan2013_shervin +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 From 62c32cd544f41fc9b03121201f995b9d2f02601a Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 12:49:51 +0100 Subject: [PATCH 314/475] updated documentation --- mkDoc.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkDoc.sh b/mkDoc.sh index da37dec99ee..e6e5104023f 100755 --- a/mkDoc.sh +++ b/mkDoc.sh @@ -1,4 +1,7 @@ #!/bin/bash +if [ ! -d "doc/doxygen/fulldoc/" ];then + mkdir -p doc/doxygen/fulldoc/ +fi if [ ! -d "doc/doxygen/fulldoc/html" ];then cd doc/doxygen/fulldoc/ git clone -b gh-pages git@github.com:ECALELFS/ECALELF.git html From 23f26340501a0ceee9ae84c983b08f9ba5d24371 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 13:06:52 +0100 Subject: [PATCH 315/475] updated documentation --- README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README b/README index 459e9356561..bd26215fd42 100644 --- a/README +++ b/README @@ -1,6 +1,8 @@ /** * \mainpage -* Introduction: \ref page1 +* \ref page1 +* +* Download instructions * * \ref page2 * From 6c729e70a489e9f5af50effb6bcdb303b4a416f9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 13:07:22 +0100 Subject: [PATCH 316/475] updated documentation --- mkDoc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/mkDoc.sh b/mkDoc.sh index e6e5104023f..5c3a7e1fbb9 100755 --- a/mkDoc.sh +++ b/mkDoc.sh @@ -14,6 +14,7 @@ cd doc/doxygen/fulldoc/ git pull git add * git commit -m "updated documentation" -a +git commit -m "updated documentation" -a git push cd - From db15dd5f76dcedd6a1ae44703ba035da476ee0bb Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 9 Feb 2014 21:42:28 +0100 Subject: [PATCH 317/475] updated 22Jan + MC run dependent ntuples with gainSwitch and pdfWeights --- .../validation/22Jan2012-runDepMCAll_v3.dat | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat new file mode 100644 index 00000000000..5b306630655 --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat @@ -0,0 +1,37 @@ +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v3/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v3/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v3/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +# +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +# +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +# +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d4 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/198022-203742-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root +##### PU trees +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root +s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll_v3.root +s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root +##### Other friend trees (example) +#d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root +#d1 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d1-22Jan2012-runDepMCAll_v3.root +# +#s1 smearEle_stochastic data/other/smearEle_stochastic_s1-22Jan2012-runDepMCAll_v3.root +# +#s1 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s1-22Jan2012-runDepMCAll_v3.root +# +#d1 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d1-22Jan2012-runDepMCAll_v2.root From 07194079c58020bc042542a582449c80657a93f8 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:51:13 +0100 Subject: [PATCH 318/475] Additional check on number of files to be merged --- ALCARAW_RECO/scripts/mergeOutput.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ALCARAW_RECO/scripts/mergeOutput.sh b/ALCARAW_RECO/scripts/mergeOutput.sh index 6eee462fb9d..d6ef40d4ed5 100755 --- a/ALCARAW_RECO/scripts/mergeOutput.sh +++ b/ALCARAW_RECO/scripts/mergeOutput.sh @@ -57,6 +57,8 @@ fi USER_REMOTE_DIR=`grep '^user_remote_dir=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` STORAGE_PATH=`grep 'storage_path=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` +NJOBS=`grep 'number_of_jobs=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` + echo "RUNRANGE=${RUNRANGE:=`grep 'runselection=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2`}" if [ -z "$RUNRANGE" ];then echo "RUNRANGE=${RUNRANGE:=allRange}" @@ -117,6 +119,12 @@ eosFile=${STORAGE_PATH}/${MERGED_REMOTE_DIR}/${MERGEDFILE} # echo "[WARNING] Files not merged because merged file already exist" >> /dev/stdout # exit 1 # } +if [ "`cat filelist/unmerged.list | wc -l`" != "${NJOBS}" ];then + echo "[ERROR `basename $0`] Number of files to merge differs with respect to number of jobs: " >> /dev/stderr + echo " `cat filelist/unmerged.list | wc -l` != ${NJOBS}" >> /dev/stderr + exit 1 +fi + hadd -f /tmp/$USER/${MERGEDFILE} `cat filelist/unmerged.list` || exit 1 # copy the merged file to the repository From 2b14a65c1a33e7c0b5ed0a91dbd6a63137de9163 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:51:40 +0100 Subject: [PATCH 319/475] SingleElectron alcareco with 22Jan rereco --- ALCARAW_RECO/alcareco_datasets.dat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 689bc0500a3..9843c85c1d8 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -75,6 +75,11 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABC,RUN2012ABCD 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD +### +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABC,RUN2012ABCD +203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD ##################### full private rereco 2011 in 5_3_X 160329-173692 /DoubleElectron/Run2011A-ZElectron-08Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011A-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011A-ZElectron-08Nov2011-v1_RAW-RECO_FNAL VALID RUN2011A,RUN2011AB 175832-180252 /DoubleElectron/Run2011B-ZElectron-19Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011B-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011B-ZElectron-19Nov2011-v1_RAW-RECO_FNAL VALID RUN2011B, RUN2011AB From aec98a2267d40d7eee2568d4dc3b73f756c86ea9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:54:11 +0100 Subject: [PATCH 320/475] speed up resubmit script --- ALCARAW_RECO/scripts/resubmitCrab.sh | 231 +++++++++++++++------------ 1 file changed, 126 insertions(+), 105 deletions(-) diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index 43bce6bab29..98be72df487 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -45,124 +45,145 @@ fi # script in perl should be better nJobs=`grep JobID $ui_working_dir/share/arguments.xml | wc -l` -#echo $nJobs -if [ "`crab -c $ui_working_dir/ -status | grep -c PEND`" != "0" ] ;then exit 0; fi -crab -c $ui_working_dir/ -status -getoutput | tee ${ui_working_dir}/res/status.log +crab -c $ui_working_dir/ -status > ${ui_working_dir}/res/status.log +if [ "`cat ${ui_working_dir}/res/status.log | grep -c PEND`" != "0" ] ;then exit 0; fi +if [ "`cat ${ui_working_dir}/res/status.log | grep -c Terminated`" != "0" ] ;then + echo ciao + crab -c $ui_working_dir/ -getoutput + crab -c $ui_working_dir/ -status > ${ui_working_dir}/res/status.log +fi + +cat ${ui_working_dir}/res/status.log + +end=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $2}'`) +status=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $3}'`) +ExitStatusCMSSW=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $5}'`) +ExitStatusJOB=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $6}'`) for jobID in `seq 1 $nJobs` do - #awk "(\$1==$jobID){print \$2}" ${ui_working_dir}/res/status.log - status=`awk "(\\$1==$jobID){print \\$2}" ${ui_working_dir}/res/status.log` - if [ "${status}" == "N" ];then + let jID=$jobID-1 + if [ "${end[${jID}]}" == "N" ];then continue; fi - # se non c'e' deve essere running, accertarsene - jobReport=`find $ui_working_dir/res/ -name crab_fjr_$jobID.xml |sort -r | head -1` - logReport=`find $ui_working_dir/res/ -name CMSSW_$jobID.stdout |sort -r | head -1` - - if [ ! -e "$jobReport" ];then - echo "-> Missing $jobReport" - if [ "`grep -c "Exited with exit code 2" $logReport`" != "0" ];then - echo "[INFO] Problem with lxbatch node, resubmitting" - intervals="$intervals $jobID" - continue; - else - continue; - fi + + if [ "${status[${jID}]}" == "Running" -o "${status[${jID}]}" == "RUN" -o "${status[${jID}]}" == "Submitting" ]; then + continue; fi + if [ "${ExitStatusCMSSW[${jID}]}" == "0" -a "${ExitStatusJOB[${jID}]}" == "0" ];then + continue; + fi - if [ "`cat $jobReport |wc -l`" == "1" ];then - continue -# echo "Job finished but not retrieved" + case ${ExitStatusJOB[${jID}]} in + 8028) intervals="$intervals $jobID";; + esac -# crab -c $ui_working_dir/ -getoutput $jobID - fi - -# wc -l $jobReport -# echo $jobReport -# cat $jobReport - ExitCode=`grep ExitStatus $jobReport | sed 's|.*ExitStatus="||;s|".*||'` - #LaserDBError=`grep EcalLaserDbService $ui_working_dir/res/CMSSW_1.stdout | grep -v MSG | grep '\-e'` -# if [ "$ExitCode" != "0 0" ];then - case $ExitCode in - 0*0) - if [ -z "${LaserDBError}" ];then - okJobList="${okJobList} $jobID" - else - okJobList="${okJobList} $jobID" -# echo "LaserDBError for job $jobID" - fi -# ./script/removeEmptyFiles.sh -u $ui_working_dir -i $jobID - ;; - 60307*0) - intervals="$intervals $jobID" -# crab -c $ui_working_dir -resubmit $jobID - ;; - 60317*0) - intervals="$intervals $jobID" - ;; - 0*60307) - intervals="$intervals $jobID" -# crab -c $ui_working_dir -resubmit $jobID - ;; - 60318*0) - intervals="$intervals $jobID" - ;; - 0*60318) - intervals="$intervals $jobID" -# crab -c $ui_working_dir -resubmit $jobID - ;; - 0*70500) - echo "[WARNING] Output file exceeded fixed size and splitted, but only one file copied to SE" +# echo ${intervals} +# # se non c'e' deve essere running, accertarsene +# jobReport=`find $ui_working_dir/res/ -name crab_fjr_$jobID.xml |sort -r | head -1` +# logReport=`find $ui_working_dir/res/ -name CMSSW_$jobID.stdout |sort -r | head -1` + +# if [ ! -e "$jobReport" ];then +# echo "-> Missing jobReport for job $jobID" +# if [ "`grep -c \"Exited with exit code 2\" $logReport`" != "0" ];then +# echo "[INFO] Problem with lxbatch node, resubmitting" +# intervals="$intervals $jobID" +# continue; +# else +# continue; +# fi +# fi + + +# if [ "`cat $jobReport |wc -l`" == "1" ];then +# continue +# # echo "Job finished but not retrieved" + +# # crab -c $ui_working_dir/ -getoutput $jobID +# fi + + + +# ExitCode=`grep ExitStatus $jobReport | sed 's|.*ExitStatus="||;s|".*||'` +# case $ExitCode in +# 0*0) +# if [ -z "${LaserDBError}" ];then +# okJobList="${okJobList} $jobID" +# else +# okJobList="${okJobList} $jobID" +# # echo "LaserDBError for job $jobID" +# fi +# # ./script/removeEmptyFiles.sh -u $ui_working_dir -i $jobID +# ;; +# 60307*0) +# intervals="$intervals $jobID" +# # crab -c $ui_working_dir -resubmit $jobID +# ;; +# 60317*0) +# intervals="$intervals $jobID" +# ;; +# 0*60307) +# intervals="$intervals $jobID" +# # crab -c $ui_working_dir -resubmit $jobID +# ;; +# 60318*0) +# intervals="$intervals $jobID" +# ;; +# 0*60318) +# intervals="$intervals $jobID" +# # crab -c $ui_working_dir -resubmit $jobID +# ;; +# 0*70500) +# echo "[WARNING] Output file exceeded fixed size and splitted, but only one file copied to SE" - ;; - 8020*8020) - echo "[ERROR] error 8020" - intervals="$intervals $jobID" -# echo $jobID $ExitCode - ;; - 8021*8021) - echo "[ERROR] error 8020" -# echo $jobID $ExitCode - intervals="$intervals $jobID" - ;; -# 6*6) -# intervals="$intervals $jobID" -# ;; - 8001*8001) - echo $jobID $ExitCode -# intervals="$intervals $jobID" - ;; - 9*9) - intervals="$intervals $jobID" - ;; - 50660*143) - intervals="$intervals $jobID" - ;; - 60302*0) -# intervals="$intervals $jobID" - ;; - 0*60302) -# intervals="$intervals $jobID" -# crab -c $ui_working_dir -resubmit $jobID - ;; - 50115*50115) - intervals="$intervals $jobID" - ;; - 50700*50700) - intervals="$intervals $jobID" - ;; - 50800*6) - intervals="$intervals $jobID" - ;; - *) - echo $jobID $ExitCode +# ;; +# 8020*8020) +# echo "[ERROR] error 8020" +# intervals="$intervals $jobID" +# # echo $jobID $ExitCode +# ;; +# 8021*8021) +# echo "[ERROR] error 8020" +# # echo $jobID $ExitCode +# intervals="$intervals $jobID" +# ;; +# # 6*6) +# # intervals="$intervals $jobID" +# # ;; +# 8001*8001) +# echo $jobID $ExitCode +# # intervals="$intervals $jobID" +# ;; +# 9*9) +# intervals="$intervals $jobID" +# ;; +# 50660*143) +# intervals="$intervals $jobID" +# ;; +# 60302*0) +# # intervals="$intervals $jobID" +# ;; +# 0*60302) +# # intervals="$intervals $jobID" +# # crab -c $ui_working_dir -resubmit $jobID +# ;; +# 50115*50115) +# intervals="$intervals $jobID" +# ;; +# 50700*50700) +# intervals="$intervals $jobID" +# ;; +# 50800*6) +# intervals="$intervals $jobID" +# ;; +# *) +# echo $jobID $ExitCode - ;; - esac +# ;; +# esac done From 65f4505dfb4f54d0b01c9ed211bfb2df1d128928 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:55:50 +0100 Subject: [PATCH 321/475] flag for ntuple production with alcareco --- ALCARAW_RECO/python/alcaSkimming.py | 16 +++++++++++----- ALCARAW_RECO/scripts/prodAlcareco.sh | 7 +++++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index bc43910340f..db5db27f3b3 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -655,17 +655,23 @@ if(doTreeOnly): process.schedule = cms.Schedule(process.NtuplePath) else: - process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, - process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step, process.NtuplePath - ) # fix the output modules + if(options.doTree=='0'): + process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.pathALCARECOEcalCalZSCElectron, + process.ALCARECOoutput_step, process.NtuplePath + ) # fix the output modules + else: + process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, + process.pathALCARECOEcalCalZSCElectron, + process.ALCARECOoutput_step + ) # fix the output modules process.zNtupleDumper.foutName=options.secondaryOutput # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -if(options.isCrab==1): +if(options.isCrab=='1'): pathPrefix="" else: pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 152a54a1adc..9083324e9c6 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -15,6 +15,7 @@ CREATE=yes SUBMIT=yes OUTPUTFILE=alcareco crabFile=tmp/alcareco.cfg +DOTREE=1 usage(){ echo "`basename $0` options" @@ -33,6 +34,7 @@ usage(){ echo " --check" echo " --json_name jsonName: additional name in the folder structure to keep track of the used json" echo " --json jsonFile.root: better to not use a json file for the alcareco production" + echo " --doTree arg (=${DOTREE}): 0=no tree, 1=standard tree" echo "----------" echo " --tutorial: tutorial mode, produces only one sample in you user area" echo " --develRelease: CRAB do not check if the CMSSW version is in production (only if you are sure what you are doing)" @@ -43,7 +45,7 @@ usage(){ #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,tutorial,develRelease -- "$@") +if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,tutorial,develRelease -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -72,6 +74,7 @@ do --json_name) JSONNAME=$2; shift;; --tutorial) echo "[OPTION] Activating the tutorial mode"; TUTORIAL=y;; --develRelease) echo "[OPTION] Request also CMSSW release not in production!"; DEVEL_RELEASE=y;; + --doTree) DOTREE=$2; shift; echo "[OPTION] Request doTree = ${DOTREE}";; (--) shift; break;; (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; (*) break;; @@ -203,7 +206,7 @@ queue = cmscaf1nd datasetpath=${DATASETPATH} pset=python/alcaSkimming.py -pycfg_params=output=${OUTPUTFILE}.root skim=${SKIM} type=$TYPE jsonFile=${JSONFILE} +pycfg_params=output=${OUTPUTFILE}.root skim=${SKIM} type=$TYPE jsonFile=${JSONFILE} doTree=${DOTREE} runselection=${RUNRANGE} split_by_run=0 From e95a6b1ff642bb6c0e154b83712ea033eb2c485f Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:57:32 +0100 Subject: [PATCH 322/475] fixed nll init for first evaluation --- ZFitter/interface/RooSmearer.hh | 2 +- ZFitter/src/RooSmearer.cc | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index 3dae6997726..1f549283bad 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -249,7 +249,7 @@ public: bool smearEnergy, bool forceNew=false, bool multiSmearToy=true); - double getCompatibility(void) const; + double getCompatibility(bool forceUpdate=false) const; void DumpNLL(void) const; // float getCompatibility(const RooSmearer *ptr); inline RooArgSet GetParams(void){return _paramSet;}; diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 7c15b0c6c28..16cdb11bfda 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -1,4 +1,3 @@ - #include "../interface/RooSmearer.hh" //#include #define FIXEDSMEARINGS @@ -513,7 +512,7 @@ double RooSmearer::getLogLikelihood(TH1F* data, TH1F* prob) const -double RooSmearer::getCompatibility() const +double RooSmearer::getCompatibility(bool forceUpdate) const { RooSmearer* myClass=(RooSmearer *) this; // myClock->Start(); @@ -541,7 +540,7 @@ double RooSmearer::getCompatibility() const cat_itr != myClass->ZeeCategories.end(); cat_itr++){ if(!cat_itr->active) continue; - if(isCategoryChanged(*cat_itr,true)){ // && withSmearToy){ + if(forceUpdate||isCategoryChanged(*cat_itr,true)){ // && withSmearToy){ updated=true; #ifdef DEBUG std::cout << "[DEBUG] " << cat_itr->categoryName1 << " - " << cat_itr->categoryName2 << "\t isupdated" << std::endl; @@ -1029,6 +1028,9 @@ void RooSmearer::Init(TString commonCut, TString eleID, Long64_t nEvents, bool m std::cout << "------------------------------ Randomize initial value:" << std::endl; _paramSet.writeToStream(std::cout, kFALSE); } + + // set initial nll values + getCompatibility(true); return; } From 8585efe50b7cfaf02413ea532ee2145c31a78193 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:57:47 +0100 Subject: [PATCH 323/475] improved output --- ZFitter/src/nllProfile.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 3069a34ed2e..02fd40e20d3 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -441,7 +441,7 @@ bool MinMCMC2D(RooRealVar *var1, RooRealVar *var2, RooSmearer& smearer, int iPro if(chi2GetName() << "\t" << var1->getVal() << std::endl << " " << var2->GetName() << "\t" << var2->getVal() << std::endl << " " << min-chi2init << "\t" << chi2-chi2init << "\t" << chi2init << std::endl; @@ -640,7 +640,7 @@ Int_t FindMin1D(RooRealVar *var, Double_t *X, Int_t N, Int_t iMinStart, Double_t //iStep = chi2-chi2old != 0 ? std::max(1,((int) (fabs(0.1/(chi2-chi2old))))) : 1; iStep=1; - if(var2!=NULL) std::cout << "[DEBUG] " << std::setprecision(3) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << + if(var2!=NULL) std::cout << "[FindMin1D] " << std::setprecision(4) << "\t" << var->getVal() << "\t" << var2->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << std::endl; else std::cout << std::setprecision(4) << "[DEBUG] " << "\t" << iStep << "\t" << var->getVal() << "\t" << chi2-chi2init << "\t" << locmin-chi2init << "\t" << min-chi2init << "\tchi2= " << chi2 << std::endl; if(chi2<=locmin){ //local minimum @@ -723,6 +723,7 @@ bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, } iMin_= FindMin1D(var, X, N, iMin_, min, smearer, true, Y); if(iMin_<0){ // in case of no sensitivity to the variable it is put has constant and the minimization is interrupted + std::cerr << "[WARNING] No sensitivity to var: " << var->GetName() << std::endl; var->setVal(v1); var->setConstant(); return false; @@ -733,7 +734,7 @@ bool MinProfile(RooRealVar *var, RooSmearer& smearer, int iProfile, if(chi2getVal() != X[iMin_]) changed=true; //the value has been updated, need a new iteration + if(v1 != X[iMin_]) changed=true; //the value has been updated, need a new iteration //else a fluctuation changed the min value } @@ -965,7 +966,7 @@ void MinimizationProfile(RooSmearer& smearer, RooArgSet args, long unsigned int } delete it_; iterClock.Stop(); - std::cout << "[INFO] nIter scale: " << nIter; + std::cout << "[INFO] nIter scale: " << nIter << "\t"; iterClock.Print(); nIter++; } From 9ecbd3eb4ab0ab8173d2e774e8f24870d4417328 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:58:50 +0100 Subject: [PATCH 324/475] fixed bug in gainEle cut --- ZFitter/src/ElectronCategory_class.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 1f4debfefcc..f14fc86ec2e 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -312,8 +312,8 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TString string1 = Objstring1->GetString(); if(string1=="12") string1="0"; - if(string1=="6") string1="1"; - if(string1=="1") string1="2"; + else if(string1=="6") string1="1"; + else if(string1=="1") string1="2"; TCut cutEle1("gainEle_ele1 =="+string1); TCut cutEle2("gainEle_ele2 =="+string1); @@ -689,10 +689,10 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TString string1 = Objstring1->GetString(); if(string1=="loose") string1="2"; - if(string1=="medium") string1="6"; - if(string1=="tight") string1="14"; - if(string1=="WP90PU") string1="16"; - if(string1=="WP80PU") string1="48"; + else if(string1=="medium") string1="6"; + else if(string1=="tight") string1="14"; + else if(string1=="WP90PU") string1="16"; + else if(string1=="WP80PU") string1="48"; TCut cutEle1("(eleID_ele1 & "+string1+")=="+string1); TCut cutEle2("(eleID_ele2 & "+string1+")=="+string1); From 7386de94e71a02e3d3246cdd426512ea9c7524e5 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 09:59:33 +0100 Subject: [PATCH 325/475] removed debug option --- ZNtupleDumper/src/ZNtupleDumper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 9e9eb389cae..46f68a8323c 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -115,7 +115,7 @@ #include #include -#define DEBUG +//#define DEBUG //////////////////////////////////////////////// // class declaration From 841e1c7171cc03c5d6796c5c1c4c45f81020edf0 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Feb 2014 10:00:09 +0100 Subject: [PATCH 326/475] fixed column for rereco list --- ALCARAW_RECO/scripts/removeRereco.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/removeRereco.sh b/ALCARAW_RECO/scripts/removeRereco.sh index ec71e3ba99f..b1e65cde6b3 100755 --- a/ALCARAW_RECO/scripts/removeRereco.sh +++ b/ALCARAW_RECO/scripts/removeRereco.sh @@ -57,7 +57,7 @@ done #------------------------------ checking if [ -n "${LIST}" ];then echo "[STATUS] Listing available rerecoes on EOS" - cut -f 7 $fileList | sort | uniq + cut -f 6 $fileList | sort | uniq exit 0 fi From 6c05a3f86dd13adf632a582054486781560fd1bd Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 23 Feb 2014 17:29:45 +0100 Subject: [PATCH 327/475] more ntuple branches commented, few informations about pileup tree production --- ZFitter/doc/configFiles.txt | 47 +++++++++++++++++++++++++++--- ZFitter/doc/runDivide.txt | 4 +-- ZNtupleDumper/src/ZNtupleDumper.cc | 19 ++++++------ 3 files changed, 55 insertions(+), 15 deletions(-) diff --git a/ZFitter/doc/configFiles.txt b/ZFitter/doc/configFiles.txt index 3375f085a2c..9d292dc0604 100644 --- a/ZFitter/doc/configFiles.txt +++ b/ZFitter/doc/configFiles.txt @@ -15,6 +15,9 @@ There are three important directories where the proper .dat files should be put: dedicated section. + For standard validations you can use the data/regions/validation.dat + that is set in the scripts as the default one. + - data/regions/ the fits are done in categories, the conditions that the electrons have to fulfil are defined in .dat files in this directory. @@ -22,9 +25,6 @@ There are three important directories where the proper .dat files should be put: each line: see ElectronCategory_class for more information about the syntax - For standard validations you can use the data/regions/validation.dat - that is set in the scripts as the default one. - - data/runRanges/ contains files that define a set of run ranges in order to perform @@ -42,7 +42,7 @@ There are three important directories where the proper .dat files should be put: For more information on how to produce automatically the runRanges .dat files see: \ref runDivide -#============================== validation config .dat file creation to be put in data/validation/ +\section validationConfig Validation config files This config file contains the list of files to run on, the files containing the PU histograms for the PU reweighting and all the other files needed. @@ -78,4 +78,43 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Sum friends +\subsection pileupHist How to get the pileup histogram +When running the alcareco production for the MC, an additional file called PUDumper.root is produced for each job. +It contains the + + +\subsection pileup Hot to produce ntuples with pileup weights +In the config file the pileupHist must be indicated. When running the ZFitter.exe it will automatically calculate the weights and create the additional ntuples in the \code tmp/ \endcode directory. +To just produce the ntuples: +\code ./bin/ZFitter.exe -f data/validation/22Jan2012-stdMCAll.dat --savePUTreeWeight \endcode + +It's sufficient to copy them from the tmp/ directory to another directory and to add them to the config file. +Usually the pileupHist and pileup tree are put in the following directory: +\code /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/ \endcode + + + + +\section runDivide How to produce runRanges .dat files + +The idea is to produce a file with the run ranges with 100k Zee events +(to have enough statistics in the EE), but taking into account also +that some run ranges should not be between to TSs or two era (RUN A +and B). + + +The run ranges: + - put in the data/runRanges/runRangeLimits.dat the runNumber that should start a new run range (TSs for example) + - run the command +\code ./bin/ZFitter.exe -f file.dat --runDivide \endcode + +The ZFitter.exe options are: +\code + --runDivide execute the run division + --nEvents_runDivide arg (=100000) Minimum number of events in a + run range +\endcode + + + */ diff --git a/ZFitter/doc/runDivide.txt b/ZFitter/doc/runDivide.txt index 871df8eaecf..db0b383a7a0 100644 --- a/ZFitter/doc/runDivide.txt +++ b/ZFitter/doc/runDivide.txt @@ -1,5 +1,5 @@ /** - * \page runDivide How to produce runRanges .dat files + * \page runDivideB How to produce runRanges .dat files The idea is to produce a file with the run ranges with 100k Zee events (to have enough statistics in the EE), but taking into account also @@ -20,4 +20,4 @@ The ZFitter.exe options are: \endcode -*/ \ No newline at end of file +*/ diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 46f68a8323c..3c22ca31f4b 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -219,22 +219,23 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t recoFlagsEle[2]; ///< 1=trackerDriven, 2=ecalDriven only, 3=tracker and ecal driven - UChar_t gainEle[2]; ///< Gain switch 0==gain12, 1==gain6, 2==gain1 - Float_t PtEle[2]; Int_t classificationEle[2]; ///< electron classification in GOLD, SHOWERING, etc. Float_t fbremEle[2]; - Float_t seedXSCEle[2]; - Float_t seedYSCEle[2]; - Float_t seedEnergySCEle[2]; - Float_t seedLCSCEle[2]; + Float_t seedXSCEle[2]; ///< ieta(ix) of the SC seed in EB(EE) + Float_t seedYSCEle[2]; ///< iphi(iy) of the SC seed in EB(EE) + Float_t seedEnergySCEle[2]; ///< energy of the SC seed + UChar_t gainEle[2]; ///< Gain switch 0==gain12, 1==gain6, 2==gain1; gain status of the seed of the SC + Float_t seedLCSCEle[2]; ///< laser correction of the SC seed crystal Float_t avgLCSCEle[2]; + + Float_t energyMCEle[2]; ///< Electron MC true energy Float_t energySCEle[2]; ///< corrected SuperCluster energy Float_t rawEnergySCEle[2]; ///< SC energy without cluster corrections @@ -276,8 +277,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t e3x3SCEle[2]; //< sum of the recHit energy in 3x3 matrix centered at the seed of the SC Float_t e5x5SCEle[2]; ///< sum of the recHit energy in 5x5 matrix centered at the seed of the SC Float_t eSeedSCEle[2]; - Float_t pModeGsfEle[2]; - Float_t pAtVtxGsfEle[2]; + Float_t pModeGsfEle[2]; ///< track momentum from Gsf Track (mode) + Float_t pAtVtxGsfEle[2]; ///< momentum estimated at the vertex Float_t R9Ele[2]; ///< e3x3/rawEnergySCEle Float_t invMass; @@ -831,7 +832,7 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("R9Ele", R9Ele, "R9Ele[2]/F"); tree->Branch("e5x5SCEle", e5x5SCEle, "e5x5SCEle[2]/F"); - tree->Branch("eSeedSCEle", eSeedSCEle, "eSeedSCEle[2]/F"); + //tree->Branch("eSeedSCEle", eSeedSCEle, "eSeedSCEle[2]/F"); tree->Branch("pModeGsfEle", pModeGsfEle, "pModeGsfEle[2]/F"); tree->Branch("pAtVtxGsfEle", pAtVtxGsfEle, "pAtVtxGsfEle[2]/F"); From b8dce5f2a4145c377d24f8c4e08e9d4bf5dc363e Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 23 Feb 2014 17:30:10 +0100 Subject: [PATCH 328/475] updated documentation --- ZFitter/macro/macro_fit.C | 414 ++++++++++++++++++++--------------- ZFitter/macro/plot_data_mc.C | 169 +++++++++----- 2 files changed, 353 insertions(+), 230 deletions(-) diff --git a/ZFitter/macro/macro_fit.C b/ZFitter/macro/macro_fit.C index 17eeb903399..3c4e14991a4 100644 --- a/ZFitter/macro/macro_fit.C +++ b/ZFitter/macro/macro_fit.C @@ -50,7 +50,7 @@ //#define selectedBase_class_cxx //#include "RooSmearedHistoCompatibility.h" -//#define DEBUG +#define DEBUG //TString filename=outPrefix+"-"+region_set+"-outProfile.root"; #define FIT_LIMIT 0.01 @@ -310,6 +310,7 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) g->Fit(f2,"0R+","",range_min, range_max); // g->Fit(fun,"R+","",min-2*sigma, min+2*sigma); // sigma = 1./sqrt(2* fun->GetParameter(2)); + sigma_minus = 1./sqrt(2* f2->GetParameter(2)); sigma_plus = 1./sqrt(2* f2->GetParameter(3)); // min=- fun->GetParameter(1) / (2* fun->GetParameter(2)); @@ -317,8 +318,8 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) chi2 = fun->GetChisquare()/fun->GetNDF(); //g->Chisquare(fun); if(isScale){ - range_min = TMath::Max(minX-30*sigma_minus, rangeLimMin); - range_max = TMath::Min(minX+30*sigma_plus, rangeLimMax); + range_min = TMath::Max(minX-10*sigma_minus, rangeLimMin); + range_max = TMath::Min(minX+10*sigma_plus, rangeLimMax); } else if(isPhi){ range_min = TMath::Max(minX-2*sigma_minus, rangeLimMin); range_max = TMath::Min(minX+3*sigma_plus, rangeLimMax); @@ -339,7 +340,7 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) std::cout << "[INFO] Points in interval: " << pointsInInterval(X, N, range_min, range_max) << std::endl; if(!(TString(g->GetTitle()).Contains("0_1-bad"))){ - while (pointsInInterval(X, N, range_min, range_max) < 15 && range_min>rangeLimMin && range_maxrangeLimMin && range_maxGetStatus()==0){ +#ifdef DEBUG + std::cout << f2->GetChisquare() << "\t" << f2->GetNumberFitPoints() << "\t" << f2->GetNumberFreeParameters() << std::endl; +#endif + float errorScale=sqrt(f2->GetChisquare()/(f2->GetNumberFitPoints()-f2->GetNumberFreeParameters())); std::cout << "SCALING ERROR by " << errorScale << std::endl << "Shifting by " << f2->GetParameter(0) << std::endl; @@ -402,8 +407,7 @@ typedef struct{ typedef std::map graphic_t; - -TGraphErrors *MeanGraph(std::vector g_vec, float *y_minimum=NULL, TGraphErrors *g_in=NULL){ +TGraphErrors *SumGraph(std::vector g_vec, bool shift=false){ int N = (*g_vec.begin())->GetN(); // number of points TString name=(*g_vec.begin())->GetName(); if(8000 <= N) { @@ -422,6 +426,7 @@ TGraphErrors *MeanGraph(std::vector g_vec, float *y_minimum=NULL, TGra if(graph==NULL) continue; // per sicurezza Double_t *Y = graph->GetY(); Double_t *X = graph->GetX(); + N = graph->GetN(); double minimum=Y[0]; for(int i=0; i< N; i++){ // calcolo il minimo e il punto di minimo @@ -431,21 +436,15 @@ TGraphErrors *MeanGraph(std::vector g_vec, float *y_minimum=NULL, TGra // for (int ip=0;ip19999){ std::cerr << "############################################################" << std::endl; std::cerr << "############################################################" << std::endl; @@ -454,34 +453,197 @@ TGraphErrors *MeanGraph(std::vector g_vec, float *y_minimum=NULL, TGra } } + n+=N; + if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; } - for (int ip=0;ip1){ - //std::cout << y2[ip] << "\t" << y[ip]*y[ip] << "\t" << y[ip] << "\t" << dev_st[ip] << std::endl; - dev_st[ip]=sqrt(y2[ip]-y[ip]*y[ip])/sqrt(dev_st[ip]); - } - else dev_st[ip]=0; - } + for (int ip=0;ip > g_in_map; + + Double_t x[17000]={0.}, y[17000]={0.}, y2[17000]={0.}, dev_st[17000], err_x[17000]; + + graphic_t graphic, graphic2; + + int n_max=0; + + double y_min=1e20; + + if(graph==NULL) return NULL; + if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; + + Double_t *Y = graph->GetY(); + Double_t *X = graph->GetX(); + Double_t X_bin=0.00001; //fabs(X[1]-X[0]); + // double minimum=TMath::MinElement(graph->GetN(),graph->GetY()); + double minimum=1e20; + double x_minimum=X[0]; + for(int i=1; iGetN(); i++){ // calcolo il minimo e il punto di minimo + if(minimum > Y[i]){ + minimum=Y[i]; + x_minimum=X[i]; + } + } + + //subtract the minimum? + for(int i=1; iGetN(); i++){ // calcolo il minimo e il punto di minimo + Y[i]-=minimum; + } + + for(int i =0 ; i < graph->GetN(); i++){ + graphic_t::iterator itr = graphic.find(X[i]); + if(itr!=graphic.end()){ + itr->second.y+=Y[i]; + itr->second.y2+=Y[i]*Y[i]; + itr->second.n++; + n_max = std::max(n_max,itr->second.n); + } else { + point_value_t p; + p.y=Y[i]; + p.y2=Y[i]*Y[i]; + p.n=1; + graphic.insert(std::make_pair(X[i],p)); + n_max = std::max(n_max,1); + } + } + + /*-----------------------------*/ + // std::cout << "N_MAX = " << n_max << std::endl; + int n=0; + y_min=1e10; + for(graphic_t::iterator itr=graphic.begin(); itr!=graphic.end(); itr++){ + + if(itr->second.n < n_max*0.2){std::cout << "Removing point " << itr->first << "\t" << itr->second.n << std::endl; continue;} + double ym = itr->second.y/itr->second.n; + if(itr->second.n>1 && itr->second.y2/itr->second.n >= ym*ym) + dev_st[n] = sqrt( (itr->second.y2/itr->second.n - ym*ym)/(double)(itr->second.n)); //errore sulla media + else{ + std::cout << itr->first << "\t" << itr->second.y << "\t" << itr->second.n + << "\t" << itr->second.y2/itr->second.n << "\t" << ym*ym + << std::endl; + dev_st[n] = 1; + //continue; + } + x[n] = itr->first; + y[n] = ym; + err_x[n]=0; + + y_min = std::min(y_min,y[n]); +// std::cout << graph->GetName() << "\t" << graph->GetTitle() << x[n] << " " +// << y[n] << " " +// << dev_st[n] << " " +// << itr->second.y2/itr->second.n << " " << ym*ym << " " +// << itr->second.n +// << std::endl; + n++; + + } + + for(int i=0; i< n; i++){ // calcolo il minimo e il punto di minimo + y[i]-=y_min; + } + +// for(int i =0 ; i < graph->GetN(); i++){ +// graphic_t::iterator itr1 = graphic.find(X[i]); +// graphic_t::iterator itr = graphic2.find(X[i]); + +// double ym = itr1->second.y/itr1->second.n; +// double devst = sqrt( (itr1->second.y2/itr1->second.n - ym*ym)/(double)(itr1->second.n)); //errore sulla media +// //std::cout << ym << "\t" << devst << std::endl; +// //if(devst < 0.1 && fabs(Y[i]-ym) < 4 * devst) continue; + +// if(itr!=graphic2.end()){ +// itr->second.y+=Y[i]; +// itr->second.y2+=Y[i]*Y[i]; +// itr->second.n++; +// n_max = std::max(n_max,itr->second.n); +// } else { +// point_value_t p; +// p.y=Y[i]; +// p.y2=Y[i]*Y[i]; +// p.n=1; +// graphic2.insert(std::make_pair(X[i],p)); +// n_max = std::max(n_max,1); +// } +// } + +// /*-----------------------------*/ +// // std::cout << "N_MAX = " << n_max << std::endl; +// n=0; +// y_min=1e10; +// for(graphic_t::iterator itr=graphic2.begin(); itr!=graphic2.end(); itr++){ +// x[n] = itr->first; +// double ym = itr->second.y/itr->second.n; +// y[n] = ym; +// dev_st[n] = sqrt( (itr->second.y2/itr->second.n - ym*ym)/(double)(itr->second.n)); //errore sulla media +// err_x=0; + +// y_min = std::min(y_min,y[n]); +// n++; +// } + + TGraphErrors *g = new TGraphErrors(n, x, y, err_x, dev_st); + g->SetTitle(graph->GetTitle()); + g->SetName(graph->GetTitle()); // g->Draw("AP*"); return g; } -TGraphErrors *SumGraph(std::vector g_vec){ +TGraphErrors *MeanGraph2(std::vector g_vec, float *y_minimum=NULL, TGraphErrors *g_in=NULL){ + + TGraphErrors *newGraph = new TGraphErrors; + + Double_t x[20000]={0.}, y[20000]={0.}, y2[20000]={0.}, dev_st[20000], err_x[20000]; + int n=0; + for(std::vector::const_iterator g_itr = g_vec.begin(); + g_itr!= g_vec.end(); + g_itr++){ // loop over TGraphs + + TGraph *graph = *g_itr; + if(graph==NULL) continue; // per sicurezza + Double_t *Y = graph->GetY(); + Double_t *X = graph->GetX(); + Int_t N = graph->GetN(); + + double minimum=Y[0]; + for(int i=0; i< N; i++){ // calcolo il minimo e il punto di minimo + if(minimum > Y[i]) minimum=Y[i]; + } + + // for (int ip=0;ipSetPoint(ip+n, X[ip], Y[ip]); + } + n+=N; + } + newGraph->Set(n); + TGraphErrors *returnGraph = MeanGraphNew(newGraph); + delete newGraph; + return returnGraph; +} + +TGraphErrors *MeanGraph(std::vector g_vec, float *y_minimum=NULL, TGraphErrors *g_in=NULL){ int N = (*g_vec.begin())->GetN(); // number of points TString name=(*g_vec.begin())->GetName(); if(8000 <= N) { @@ -509,12 +671,21 @@ TGraphErrors *SumGraph(std::vector g_vec){ // for (int ip=0;ip19999){ std::cerr << "############################################################" << std::endl; std::cerr << "############################################################" << std::endl; @@ -523,23 +694,34 @@ TGraphErrors *SumGraph(std::vector g_vec){ } } - n+=N; - if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; } - for (int ip=0;ip1){ + //std::cout << y2[ip] << "\t" << y[ip]*y[ip] << "\t" << y[ip] << "\t" << dev_st[ip] << std::endl; + dev_st[ip]=sqrt(y2[ip]-y[ip]*y[ip])/sqrt(dev_st[ip]); + } + else dev_st[ip]=0; + } } - TGraphErrors *g = new TGraphErrors(n, x, y, err_x, dev_st); + // calcolo il minimo e il punto di minimo + double minimum=1e20; + for(int i=2; i< N; i++) if(minimum > y[i] && y[i]>10) minimum=y[i]; + for(int i=0; i< N; i++) y[i]-=minimum; + + + + TGraphErrors *g = new TGraphErrors(N, x, y, err_x, dev_st); + // g->Draw("AP*"); return g; } + TGraphErrors *MeanGraphOld(std::vector g_vec, float *y_minimum=NULL, TGraphErrors *g_in=NULL){ int N = (*g_vec.begin())->GetN(); // number of points @@ -600,7 +782,7 @@ TGraphErrors *MeanGraphOld(std::vector g_vec, float *y_minimum=NULL, T // std::cout << "Y[7] = " << Y[7] << std::endl; - for(int i =0 ; i < graph->GetN(); i++){ + for(int i =0 ; i < graph->GetN(); i+=3){ if(graphs.count(X[i])==0){ point_value_t p; p.y=Y[i]; @@ -952,11 +1134,11 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi="", bool float y_min=1e10; std::cout << "Getting g1 mean graph" << std::endl; - TGraphErrors *g1 = MeanGraphOld(map_region_itr->second,&y_min); + // TGraphErrors *g1 = MeanGraph2(map_region_itr->second,&y_min); //std::cout << "Getting g mean graph" << std::endl; - TGraphErrors *g = g1; //MeanGraph(map_region_itr->second, &y_min,g1); - TGraphErrors *g_sum = SumGraph(map_region_itr->second); + TGraphErrors *g_sum = SumGraph(map_region_itr->second,true); + TGraphErrors *g = MeanGraphNew(g_sum); // if(!variable.Contains("rho")){ // continue; // } @@ -1238,127 +1420,3 @@ void propagate(TString filename, int region){ -TGraphErrors *MeanGraphNew(TGraphErrors *graph){ - - int N = graph->GetN(); // number of points - if(17000 <= N) { - std::cerr << "ERROR: N_bins too big in MeanGraph:" << N << std::endl; - return NULL; - } - - std::map > g_in_map; - - Double_t x[17000]={0.}, y[17000]={0.}, y2[17000]={0.}, dev_st[17000], err_x[17000]; - - graphic_t graphic, graphic2; - - int n_max=0; - - double y_min=1e20; - - if(graph==NULL) return NULL; - if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; - - Double_t *Y = graph->GetY(); - Double_t *X = graph->GetX(); - Double_t X_bin=0.00001; //fabs(X[1]-X[0]); - // double minimum=TMath::MinElement(graph->GetN(),graph->GetY()); - double minimum=1e20; - double x_minimum=X[0]; - for(int i=1; iGetN(); i++){ // calcolo il minimo e il punto di minimo - if(minimum > Y[i]){ - minimum=Y[i]; - x_minimum=X[i]; - } - } - - for(int i =0 ; i < graph->GetN(); i++){ - graphic_t::iterator itr = graphic.find(X[i]); - if(itr!=graphic.end()){ - itr->second.y+=Y[i]; - itr->second.y2+=Y[i]*Y[i]; - itr->second.n++; - n_max = std::max(n_max,itr->second.n); - } else { - point_value_t p; - p.y=Y[i]; - p.y2=Y[i]*Y[i]; - p.n=1; - graphic.insert(std::make_pair(X[i],p)); - n_max = std::max(n_max,1); - } - } - - /*-----------------------------*/ - // std::cout << "N_MAX = " << n_max << std::endl; - int n=0; - y_min=1e10; - for(graphic_t::iterator itr=graphic.begin(); itr!=graphic.end(); itr++){ - - //if(itr->second.n < n_max*0.2){std::cout << "Removing point " << itr->first << "\t" << itr->second.n << std::endl; continue;} - x[n] = itr->first; - double ym = itr->second.y/itr->second.n; - y[n] = ym; - if(itr->second.n>1 && itr->second.y2/itr->second.n > ym*ym) - dev_st[n] = sqrt( (itr->second.y2/itr->second.n - ym*ym)/(double)(itr->second.n)); //errore sulla media - else - dev_st[n] = 1e-6; - err_x[n]=0; - - y_min = std::min(y_min,y[n]); -// std::cout << graph->GetName() << "\t" << graph->GetTitle() << x[n] << " " -// << y[n] << " " -// << dev_st[n] << " " -// << itr->second.y2/itr->second.n << " " << ym*ym << " " -// << itr->second.n -// << std::endl; - n++; - - } - - -// for(int i =0 ; i < graph->GetN(); i++){ -// graphic_t::iterator itr1 = graphic.find(X[i]); -// graphic_t::iterator itr = graphic2.find(X[i]); - -// double ym = itr1->second.y/itr1->second.n; -// double devst = sqrt( (itr1->second.y2/itr1->second.n - ym*ym)/(double)(itr1->second.n)); //errore sulla media -// //std::cout << ym << "\t" << devst << std::endl; -// //if(devst < 0.1 && fabs(Y[i]-ym) < 4 * devst) continue; - -// if(itr!=graphic2.end()){ -// itr->second.y+=Y[i]; -// itr->second.y2+=Y[i]*Y[i]; -// itr->second.n++; -// n_max = std::max(n_max,itr->second.n); -// } else { -// point_value_t p; -// p.y=Y[i]; -// p.y2=Y[i]*Y[i]; -// p.n=1; -// graphic2.insert(std::make_pair(X[i],p)); -// n_max = std::max(n_max,1); -// } -// } - -// /*-----------------------------*/ -// // std::cout << "N_MAX = " << n_max << std::endl; -// n=0; -// y_min=1e10; -// for(graphic_t::iterator itr=graphic2.begin(); itr!=graphic2.end(); itr++){ -// x[n] = itr->first; -// double ym = itr->second.y/itr->second.n; -// y[n] = ym; -// dev_st[n] = sqrt( (itr->second.y2/itr->second.n - ym*ym)/(double)(itr->second.n)); //errore sulla media -// err_x=0; - -// y_min = std::min(y_min,y[n]); -// n++; -// } - - TGraphErrors *g = new TGraphErrors(n, x, y, err_x, dev_st); - g->SetTitle(graph->GetTitle()); - g->SetName(graph->GetTitle()); - // g->Draw("AP*"); - return g; -} diff --git a/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C index 13de2ef080b..97a7cc79665 100644 --- a/ZFitter/macro/plot_data_mc.C +++ b/ZFitter/macro/plot_data_mc.C @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -112,7 +113,42 @@ void PlotCanvas(TCanvas *c, TH1F *mc, TH1F *data, TH1F *mcSmeared){ -void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legend=NULL, TString region="", TString filename="", TString energy="8 TeV", TString lumi=""){ +void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legend=NULL, TString region="", TString filename="", TString energy="8 TeV", TString lumi="", bool ratio=true){ + + c->Clear(); + TPad * pad1 = new TPad("pad1", "pad1",0.00,0.20, 1,1.); + TPad * pad2 = new TPad("pad2", "pad2",0.00,0.00, 1,0.2); + TPad * pad3 = new TPad("pad3", "pad3",0.75,0.00, 1.,0.2); + + float yscale=0.75/(pad1->GetYlowNDC() -pad2->GetYlowNDC()); + float xscale=1; + + if(ratio){ + + + pad1->SetRightMargin(0.1); + pad1->SetBottomMargin(0.01); + // pad1->SetLogy(); + pad1->Draw(); + pad1->cd(); + c->cd(); + pad2->SetGrid(); + pad2->SetBottomMargin(0.5); + pad2->SetTopMargin(0.01); + pad2->SetRightMargin(0.1); + pad2->Draw(); + pad2->cd(); + c->cd(); + pad3->SetGrid(); + //pad2->SetTopMargin(0.01); + pad3->SetBottomMargin(0.4); + pad3->SetRightMargin(0.1); + // pad3->Draw(); + // pad3->cd(); + + pad1->cd(); + + } TGaxis::SetMaxDigits(3); @@ -120,57 +156,58 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen data->SetMarkerStyle(20); - mc->SetLineColor(kRed); - mc->SetLineWidth(2); - mc->SetFillStyle(1001); //3002 - mc->SetFillColor(kRed); - - mc->Draw(); - - mc->GetXaxis()->SetTitle("M_{ee} (GeV/c^{2})"); - // mc->GetXaxis()->SetRangeUser(75,105); - char ylabel[100]; - sprintf(ylabel,"Events/%.1f GeV",mc->GetBinWidth(1)); - mc->GetYaxis()->SetTitle(ylabel); - mc->GetYaxis()->SetTitleOffset(1.4); - - mc->DrawNormalized("hist",data->Integral()); - - mcSmeared->SetLineWidth(3); - mcSmeared->DrawNormalized("same hist",data->Integral()); - - data->Draw("E same"); - // std::cout << data->Integral() << std::endl; - - // PlotCanvas(c, mc, data, mcSmeared); - - legend->Clear(); - legend->AddEntry(mc,"MC","f"); - legend->AddEntry(mcSmeared,"MC smeared","l"); - legend->AddEntry(data,"data","p"); - double KS=data->KolmogorovTest(mcSmeared); - TString ks="Kolmogorov test: "; - char line[50]; - sprintf(line, "%.2f", KS); - ks+=line; - std::cout << "" << ks << std::endl; - - TPaveText pave(0.182,0.8,0.38,0.92, "ndc"); - // pv->DeleteText(); - pave.SetFillColor(0); - pave.SetTextAlign(12); - pave.SetBorderSize(0); - pave.SetTextSize(0.036); - pave.AddText("CMS Preliminary"); - pave.AddText("#sqrt{s}="+energy); - if(lumi.Sizeof()>1) pave.AddText("L="+lumi+" fb^{-1}"); - // pave.AddText(""); - - //pave.AddText(ks); - - - c->cd(0); - pave.Draw(); + mc->SetLineColor(kRed); + mc->SetLineWidth(2); + mc->SetFillStyle(1001); //3002 + mc->SetFillColor(kRed); + + mc->Draw(); + + mc->GetXaxis()->SetTitle("M_{ee} (GeV/c^{2})"); + // mc->GetXaxis()->SetRangeUser(75,105); + char ylabel[100]; + sprintf(ylabel,"Events/%.1f GeV",mc->GetBinWidth(1)); + mc->GetYaxis()->SetTitle(ylabel); + mc->GetYaxis()->SetTitleOffset(1.3); + + mc->DrawNormalized("hist",data->Integral()); + + mcSmeared->SetLineWidth(3); + TH1* mcSmeared_norm = mcSmeared->DrawNormalized("same hist",data->Integral()); + + data->Draw("E same"); + + // std::cout << data->Integral() << std::endl; + + // PlotCanvas(c, mc, data, mcSmeared); + + legend->Clear(); + legend->AddEntry(mc,"MC","f"); + legend->AddEntry(mcSmeared,"MC smeared","l"); + legend->AddEntry(data,"data","p"); + double KS=data->KolmogorovTest(mcSmeared); + TString ks="Kolmogorov test: "; + char line[50]; + sprintf(line, "%.2f", KS); + ks+=line; + std::cout << "" << ks << std::endl; + + TPaveText pave(0.182,0.8,0.38,0.92, "ndc"); + // pv->DeleteText(); + pave.SetFillColor(0); + pave.SetTextAlign(12); + pave.SetBorderSize(0); + pave.SetTextSize(0.036); + pave.AddText("CMS Preliminary"); + pave.AddText("#sqrt{s}="+energy); + if(lumi.Sizeof()>1) pave.AddText("L="+lumi+" fb^{-1}"); + // pave.AddText(""); + + //pave.AddText(ks); + + + //c->cd(0); + pave.Draw(); // pave.Paint(); @@ -187,6 +224,34 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen legend->Draw(); + if(ratio){ + TH1F *sRatio = (TH1F*) data->Clone("sRatio"); + sRatio->Divide(mcSmeared_norm); + + pad2->cd(); + sRatio->Draw(); + + TGraphErrors *ratioGraph = new TGraphErrors(sRatio); + ratioGraph->SetMarkerColor(kBlue); + ratioGraph->Draw("AP"); + ratioGraph->GetXaxis()->SetTitle(mc->GetXaxis()->GetTitle()); + ratioGraph->GetYaxis()->SetTitle("Data/MC"); + + ratioGraph->GetYaxis()->SetTitleSize(sRatio->GetYaxis()->GetTitleSize()*yscale); + ratioGraph->GetYaxis()->SetTitleOffset(sRatio->GetYaxis()->GetTitleOffset()/yscale); + ratioGraph->GetYaxis()->SetLabelSize(sRatio->GetYaxis()->GetLabelSize()*yscale); + ratioGraph->GetYaxis()->SetLabelOffset(sRatio->GetYaxis()->GetLabelOffset()*yscale); + ratioGraph->GetXaxis()->SetTitleSize(sRatio->GetYaxis()->GetTitleSize() ); + ratioGraph->GetXaxis()->SetTitleOffset(0.92); + ratioGraph->GetXaxis()->SetLabelSize(sRatio->GetYaxis()->GetLabelSize() ); + ratioGraph->GetXaxis()->SetLabelOffset(sRatio->GetYaxis()->GetLabelOffset()); + + ratioGraph->GetYaxis()->SetRangeUser(1- 2*ratioGraph->GetRMS(2),1+2*ratioGraph->GetRMS(2)); + ratioGraph->GetYaxis()->SetNdivisions(5); + + c->cd(); + } + c->SaveAs(img_filename(filename, region, ".eps")); c->SaveAs(img_filename(filename, region, ".png")); c->SaveAs(img_filename(filename, region, ".C")); From bb38c903d06238403a11ee9e006e6c198c52da4f Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 10:04:56 +0100 Subject: [PATCH 329/475] added awk script for merging energy scale corrections from different steps --- ZFitter/awk/prodScaleCorrSteps.awk | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ZFitter/awk/prodScaleCorrSteps.awk diff --git a/ZFitter/awk/prodScaleCorrSteps.awk b/ZFitter/awk/prodScaleCorrSteps.awk new file mode 100644 index 00000000000..8d90d7fd24b --- /dev/null +++ b/ZFitter/awk/prodScaleCorrSteps.awk @@ -0,0 +1,41 @@ +BEGIN{ + + +} + +(match(FILENAME,"res_corr")){ + cat=$1; + if(NF==4){ + newSubcatList[cat]=$2; + scale[cat,$2]=$3; + err[cat,$2]=$4; + } else{ + newSubcatList[cat]=$1; + scale[cat,cat]=$2; + err[cat,cat]=$3; + } + #print cat, newSubcatList[cat] +} + +(!match(FILENAME,"res_corr")){ + cat=$1; + if(cat in newSubcatList){ + for(i in scale){ + split(i,a,SUBSEP); + # print cat #, a[1], a[2] + if(cat == a[1]){ + e=err[cat,a[2]]; + if(cat==a[2]) + printf("%s\t%s\t%s\t%s\t%.4f\t%.4f\n", cat, $2, $3,$4,(2-scale[cat,a[2]])*$5, sqrt($6*$6+e*e)); + else + printf("%s-%s\t%s\t%s\t%s\t%.4f\t%.4f\n", cat, a[2], $2, $3,$4,(2-scale[cat,a[2]])*$5, sqrt($6*$6+e*e)); + } + } + } else{ + print $0 + } +} +END{ + + +} \ No newline at end of file From 0345ea764b9451f85b64b41d316e369213a3a06f Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 14:29:35 +0100 Subject: [PATCH 330/475] fixed keep command for ALCARECO for isoVals --- .../python/ALCARECOEcalCalIsolElectron_Output_cff.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index 5f42a4bb1ba..fa73ade5a15 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -54,9 +54,9 @@ 'keep *_TriggerResults_*_*', 'keep *_hltTriggerSummaryAOD_*_HLT', # pfisolation - 'keep *_elPFIsoValueCharged03PFIdGsf*_*_*', - 'keep *_elPFIsoValueGamma03PFIdGsf*_*_*', - 'keep *_elPFIsoValueNeutral03PFIdGsf*_*_*' + 'keep *_elPFIsoValueCharged03PFId*_*_*', + 'keep *_elPFIsoValueGamma03PFId*_*_*', + 'keep *_elPFIsoValueNeutral03PFId*_*_*' ) ) From 26fc1a2972ca43cf519239fc6eb680dcfda3837e Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 14:32:14 +0100 Subject: [PATCH 331/475] small fixes --- ALCARAW_RECO/scripts/mergeOutput.sh | 25 +++++++++++++++++-------- ALCARAW_RECO/scripts/prodAlcareco.sh | 8 ++++---- ALCARAW_RECO/scripts/prodNtuples.sh | 3 ++- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/ALCARAW_RECO/scripts/mergeOutput.sh b/ALCARAW_RECO/scripts/mergeOutput.sh index d6ef40d4ed5..dff5aafd6a7 100755 --- a/ALCARAW_RECO/scripts/mergeOutput.sh +++ b/ALCARAW_RECO/scripts/mergeOutput.sh @@ -56,9 +56,9 @@ fi ### taking the output directory (also possible directly from the crab.cfg file USER_REMOTE_DIR=`grep '^user_remote_dir=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` -STORAGE_PATH=`grep 'storage_path=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` +STORAGE_PATH=`grep 'storage_path=' ${UI_WORKING_DIR}/share/crab.cfg | sed 's|/srm/v2/server?SFN=|root://eoscms/|' | cut -d '=' -f 2 ` NJOBS=`grep 'number_of_jobs=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2` - +echo $STORAGE_PATH $USER_REMOTE_DIR echo "RUNRANGE=${RUNRANGE:=`grep 'runselection=' ${UI_WORKING_DIR}/share/crab.cfg |cut -d '=' -f 2`}" if [ -z "$RUNRANGE" ];then echo "RUNRANGE=${RUNRANGE:=allRange}" @@ -112,18 +112,27 @@ fi # MERGEDFILE=${DATASETNAME}-${RUNRANGE}-JSON_${JSON}.root #fi -eosFile=${STORAGE_PATH}/${MERGED_REMOTE_DIR}/${MERGEDFILE} +case ${MERGED_REMOTE_DIR} in + /afs/*) + eosFile=${MERGED_REMOTE_DIR}/${MERGEDFILE} + ;; + *) + eosFile=${STORAGE_PATH}/${MERGED_REMOTE_DIR}/${MERGEDFILE} + ;; +esac + # eos.select ls $eosFile && { # echo "$eosFile" # echo "[WARNING] Files not merged because merged file already exist" >> /dev/stderr # echo "[WARNING] Files not merged because merged file already exist" >> /dev/stdout # exit 1 # } -if [ "`cat filelist/unmerged.list | wc -l`" != "${NJOBS}" ];then - echo "[ERROR `basename $0`] Number of files to merge differs with respect to number of jobs: " >> /dev/stderr - echo " `cat filelist/unmerged.list | wc -l` != ${NJOBS}" >> /dev/stderr - exit 1 -fi + +# if [ "`cat filelist/unmerged.list | wc -l`" != "${NJOBS}" ];then +# echo "[ERROR `basename $0`] Number of files to merge differs with respect to number of jobs: " >> /dev/stderr +# echo " `cat filelist/unmerged.list | wc -l` != ${NJOBS}" >> /dev/stderr +# exit 1 +# fi hadd -f /tmp/$USER/${MERGEDFILE} `cat filelist/unmerged.list` || exit 1 diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 9083324e9c6..d5f42ab06f8 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -9,7 +9,7 @@ SCHEDULER=caf USESERVER=1 TYPE=ALCARECO LUMIS_PER_JOBS=200 # 4000 for ZSkim events is good, WSkim events /=4, SingleElectron /=10 -EVENTS_PER_JOB=50000 +EVENTS_PER_JOB=40000 BLACKLIST=T2_EE_Estonia CREATE=yes SUBMIT=yes @@ -206,7 +206,7 @@ queue = cmscaf1nd datasetpath=${DATASETPATH} pset=python/alcaSkimming.py -pycfg_params=output=${OUTPUTFILE}.root skim=${SKIM} type=$TYPE jsonFile=${JSONFILE} doTree=${DOTREE} +pycfg_params=output=${OUTPUTFILE}.root skim=${SKIM} type=$TYPE doTree=${DOTREE} jsonFile=${JSONFILE} runselection=${RUNRANGE} split_by_run=0 @@ -282,8 +282,8 @@ if [ -n "${CHECK}" ];then if [ ! -e "${UI_WORKING_DIR}/res/finished" ];then #echo $dir >> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" -# else -# mergeOutput.sh -u ${UI_WORKING_DIR} +# elif [ "$TYPE" == "ALCARECOSIM" ];then +# mergeOutput.sh -u ${UI_WORKING_DIR} -g PUDumper --noRemove --merged_remote_dir=/afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/ fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" fi diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 92f60958ce9..997f9271e8b 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -14,6 +14,7 @@ DOEXTRACALIBTREE=0 CREATE=y SUBMIT=y DOTREE=1 +SKIM="" usage(){ echo "`basename $0` {parseDatasetFile options} --type={type} [options]" @@ -321,7 +322,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=1 jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=1 jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} get_edm_output=1 output_file=${OUTFILES} From d4d5d3de8d8e1448a1a9ca600807e09187a5ccf9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:48:01 +0100 Subject: [PATCH 332/475] fixes and revisited energyScale --- ZFitter/script/GenRootChain.sh | 1 + ZFitter/script/energyScale.sh | 696 ++++++++++++++++++++++++--------- ZFitter/script/functions.sh | 15 +- 3 files changed, 535 insertions(+), 177 deletions(-) diff --git a/ZFitter/script/GenRootChain.sh b/ZFitter/script/GenRootChain.sh index f9ccd9dd1c4..e544a812862 100755 --- a/ZFitter/script/GenRootChain.sh +++ b/ZFitter/script/GenRootChain.sh @@ -26,6 +26,7 @@ usage(){ echo " --regionsFile arg (=${regionsFile})" echo " --corrEleType arg" echo " --corrEleFile arg" + echo " --fitterOptions arg" # echo " --puName arg " # echo " --runRangesFile arg (=${runRangesFile}) run ranges for stability plots" # echo " --selection arg (=${selection}) " diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index d47a6a388a1..88a15f9ab3c 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -25,24 +25,7 @@ regionFileStep4EE=data/regions/scaleStep4smearing_2.dat regionFileStep5EB=data/regions/scaleStep2smearing_9.dat regionFileStep5EE=data/regions/scaleStep2smearing_10.dat -outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat -outFileStep2=step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat -outFileStep7=step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat -outFileStep8=step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat - -##################### -# Make sure that the files indicated in outFileList are in the same order of stepNameList -outFileList=( -"step1-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" -"step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" -"step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" -) -stepNameList=( -"step1" -"step2" -"step8" -) ############################################################# usage(){ @@ -145,7 +128,15 @@ case ${STEP} in 8) STEP8=y;; 9) STEP9=y;; 10) STEP10=y;; + madgraph) MCSAMPLE=y; extension=madgraph;; + powheg) MCSAMPLE=y; extension=powheg;; + sherpa) MCSAMPLE=y; extension=sherpa;; pdfWeight) PDFWEIGHT=y;; + gainSwitch) GAINSWITCH=y; extension=gainSwitch;echo "[OPTION] $extension";; + gainSwitch2) GAINSWITCH=y; extension=gainSwitch2;echo "[OPTION] $extension";; + gainSwitch3) GAINSWITCH=y; extension=gainSwitch3;echo "[OPTION] $extension";; + gainSwitch4) GAINSWITCH=y; extension=gainSwitch4;echo "[OPTION] $extension";; + gainSwitch5) GAINSWITCH=y; extension=gainSwitch5;echo "[OPTION] $extension";; 7) STEP7=y;; 1-2) STEP1=y; STEP2=y;; 1-3) STEP1=y; STEP2=y; STEP3=y; SLIDE=y;; @@ -167,6 +158,32 @@ case ${STEP} in esac + + +##################### +outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat +outFileStep2=step2${extension}-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +outFileStep4=step4${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat +outFileStep7=step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat +outFileStep8=step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat + +# Make sure that the files indicated in outFileList are in the same order of stepNameList +outFileList=( +"${outFileStep1}" +"${outFileStep2}" +"${outFileStep4}" +"step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" +"step9gainSwitch-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" +) +stepNameList=( +"step1" +"step2" +"step4" +"step8" +"step9gainSwitch" +) + + ## pileup reweight name puName ${configFile} echo "PUName: $puName" @@ -205,34 +222,36 @@ if [ "${extension}" == "weight" ];then done fi + + if [ -n "${STEP1}" ];then # runNumber x eta with fitMethod regionFile=data/regions/scaleStep1.dat - outFile=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat - if [ ! -e "${outDirTable}/${outFile}" ];then - + outFile=${outFileStep1} + + if [ ! -e "${outDirTable}/${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi if [ ! -e "${outDirData}/fitres" ];then mkdir ${outDirData}/fitres -p; fi if [ ! -e "${outDirData}/img" ];then mkdir ${outDirData}/img -p; fi if [ ! -e "${outDirData}/step1" ];then mkdir ${outDirData}/step1 -p; fi - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ - $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut $commonCut \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img \ - > ${outDirData}/log/`basename ${outFile} .dat`.log || exit 1 + # ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ +# $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut $commonCut \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img \ +# > ${outDirData}/log/`basename ${outFile} .dat`.log || exit 1 ./script/makeTable.sh --regionsFile ${regionFile} --runRangesFile ${runRangesFile} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ > ${outDirTable}/`basename ${outFile} .dat`.tex - ./script/tex2txt.sh ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.tex | awk -F "\t" -f awk/recalibOutput.awk |grep -v '^%' > ${outFile} + ./script/tex2txt.sh ${outDirTable}/`basename ${outFile} .dat`.tex | awk -F "\t" -f awk/recalibOutput.awk |grep -v '^%' > ${outDirTable}/${outFile} #save root files with step1 corrections ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ --saveRootMacro --corrEleType HggRunEta \ - --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat || exit 1 + --corrEleFile ${outDirTable}/${outFile} || exit 1 mv tmp/scaleEle_HggRunEta_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step1/ echo "[STATUS] Step 1 done" @@ -244,7 +263,7 @@ if [ -n "${STEP1}" ];then --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat || exit 1 mv tmp/scaleEle_HggRunEta_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step1/ - +exit 0 fi if [ -n "${STEP1Stability}" ];then @@ -329,33 +348,37 @@ fi if [ -n "${STEP2}" ];then #eta x R9 with smearing method + + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step2${extension}/fitres" ];then mkdir ${outDirData}/step2${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step2${extension}/img" ];then mkdir ${outDirData}/step2${extension}/img -p; fi + regionFileEB=${regionFileStep2EB} regionFileEE=${regionFileStep2EE} basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` regionFile=$regionFileEB - outFile=step2${extension}-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat + outFile=${outFileStep2} + + checkStepDep step1 + + - if [ ! -e "${outDirTable}/${outFileStep1}" ];then - echo "[ERROR] Impossible to run step2 without step1" >> /dev/stderr - #exit 1 - fi - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step2${extension}/`basename $configFile` - + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEta\t${outDirData}/step1/scaleEle_HggRunEta_\1-`basename $configFile .dat`.root|}" | sort | uniq > ${outDirData}/step2${extension}/`basename ${configFile}` mkSmearerCatSignal $regionFileEB mkSmearerCatSignal $regionFileEE mkSmearerCatData $regionFileEB ${outDirData}/step2 $outDirData/step2${extension}/`basename $configFile` --corrEleType=HggRunEta mkSmearerCatData $regionFileEE ${outDirData}/step2 $outDirData/step2${extension}/`basename $configFile` --corrEleType=HggRunEta - - if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then - newSelection=${extension} - else - newSelection=${selection} - fi - + #cat $outDirData/step2${extension}/`basename $configFile` + #exit 0 if [ ! -e "${outDirTable}/${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi @@ -369,7 +392,6 @@ if [ -n "${STEP2}" ];then initFile="" fi - # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time @@ -379,11 +401,11 @@ if [ -n "${STEP2}" ];then mkdir ${outDirData}/step2/${index}/fitres/ -p mkdir ${outDirData}/step2/${index}/img -p done - bsub -q 2nd \ - -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ - -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ - -J "${basenameEB} step2[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEB}-done" +# bsub -q 2nd \ +# -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ +# -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ +# -J "${basenameEB} step2[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEB}-done" bsub -q 2nd \ -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ @@ -411,33 +433,22 @@ if [ -n "${STEP2}" ];then fi + ./bin/ZFitter.exe -f $outDirData/step2${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step2${extension}/img/ --outDirFitResData=${outDirData}/step2${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEta --plotOnly || exit 1 + exit 0 + sed -i 's|^EB-||;s|^EE-||' ${outFileStep1} grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' > tmp/res_corr.dat grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1| sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' >> tmp/res_corr.dat awk -f awk/prodScaleCorrSteps.awk tmp/res_corr.dat ${outFileStep1} > ${outDirTable}/${outFile} - -# grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' > tmp/res_corr.dat - -# grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1 | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | awk '{print $1, ($2-1)*100,$3*100}' >> tmp/res_corr.dat -# # -# sed -i 's|^EB-||;s|^EE-||' ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat -# ./script/makeCorrVsRunNumber.py -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |grep -v '#' > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat -# ./script/makeCorrVsRunNumber.py -l -c --file2=tmp/res_corr.dat --file1=${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat |sed -f sed/tex.sed > ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - -# cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex -# cp ${outDirTable}/step2smearing-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat - -# cat ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat | cut -f 1,3-6 | awk '{printf("%s\t%s - %s\t%s\t%s \n", $1,$2,$3, $4, $5)}' | sed -r 's|\t|\t\&\t|g;' | sed -f sed/tex.sed | sed 's|R9|\\RNINE|' > ${outDirTable}/correctionNote-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex - #save root files with step1 corrections ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ --saveRootMacro --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat || exit 1 + --corrEleFile ${outDirTable}/${outFile} || exit 1 mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ - - + + fi @@ -476,12 +487,9 @@ if [ -n "${STEP4}" ];then basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` regionFile=$regionFileEB - outFile=$outDirTable/step4${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + outFile=$outDirTable/${outFileStep4} - if [ ! -e "${outDirTable}/${outFileStep2}" ];then - echo "[ERROR] Impossible to run step4 without step2" >> /dev/stderr - #exit 1 - fi + checkStepDep step2 if [ -e "${outDirTable}/params-step4-${commonCut}.txt" ];then initFile="--initFile=${outDirTable}/params-step4-${commonCut}.txt"; @@ -995,15 +1003,16 @@ if [ -n "${STEP9}" ];then if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi cat $configFile \ + | grep -v 'scaleEle' \ | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step8/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step9${extension}/`basename $configFile` mkSmearerCatSignal $regionFileEB - #mkSmearerCatSignal $regionFileEE + mkSmearerCatSignal $regionFileEE mkSmearerCatSignal ${regionFileStep4EB} mkSmearerCatSignal ${regionFileStep4EE} mkSmearerCatSignal $regionFileStep4EBEE mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et -# mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step8${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et mkSmearerCatData $regionFileStep4EBEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et mkSmearerCatData $regionFileStep4EB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et mkSmearerCatData $regionFileStep4EE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et @@ -1023,7 +1032,17 @@ if [ -n "${STEP9}" ];then mkdir ${outDirData}/step9${extension}/${index}/img -p done +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale + +# exit 0 + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEB} step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + exit 0 bsub -q 2nd \ -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ @@ -1415,40 +1434,174 @@ fi -if [ -n "${PDFWEIGHT}" ];then - extension=pdfWeight -#stochastic smearing but with non Et dependent scale corrections +if [ -n "${STEP10}" ];then + # stochastic term resolution categories, scales in Et bins, only histos + #stochastic smearing but with non Et dependent scale corrections if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then newSelection=${extension} else newSelection=${selection} fi - #eta x R9 with smearing method - regionFileEB=${regionFileStep4EB} - regionFileEE=${regionFileStep4EE} + if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi + if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi + if [ ! -e "${outDirData}/step10/fitres/$index" ];then mkdir ${outDirData}/step10/fitres/$index -p; fi + if [ ! -e "${outDirData}/step10/img/$index" ];then mkdir ${outDirData}/step10/img/$index -p; fi + + cat $configFile |grep -v '#' \ + | grep -v "r9weights" | grep -v "scaleEle" | grep -v "r9weights" \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step8/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step10${extension}/`basename $configFile` + + #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ + + regionFileEB=$regionFileStep4EB + regionFileEE=$regionFileStep4EE + regionFileEBEE=$regionFileStep4EBEE + + outFile=${outDirTable}/step10${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9Et.dat + + #check if the output file of step8 is present + checkStepDep step8 + + if [ -e "${outDirTable}/params-step10-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step10-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step10-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step9" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step10-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step9" >> /dev/stdout + + initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt"; + cat ${outDirTable}/params-step9-${commonCut}.txt + exit 0 + + echo "[ERROR] ${outDirTable}/params-step9-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + +# tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` +# for tag in $tags +# do +# if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then +# ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# --saveRootMacro \ +# --corrEleType HggRunEtaR9 \ +# --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat +# mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ +# fi +# done + + + mkSmearerCatSignal $regionFileEB + mkSmearerCatData $regionFileEB ${outDirData}/step10 $outDirData/step10${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEE ${outDirData}/step10 $outDirData/step10${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + mkSmearerCatSignal $regionFileEBEE + mkSmearerCatData $regionFileEBEE ${outDirData}/step10 $outDirData/step10${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + + + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step10${extension}/fitres" ];then mkdir ${outDirData}/step10${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step10${extension}/img" ];then mkdir ${outDirData}/step10${extension}/img -p; fi + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + for index in `seq 1 50` + do + mkdir ${outDirData}/step10${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step10${extension}/${index}/img -p + done +# ./bin/ZFitter.exe -f $outDirData/step10${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step10${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step10${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; +# exit 0 + +# bsub -q 2nd \ +# -oo ${outDirData}/step10${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ +# -eo ${outDirData}/step10${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ +# -J "${basenameEB} step10${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step10${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step10${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step10${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1;" + + +# while [ "`bjobs -J \"${basenameEB} step10${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + +# ./script/haddTGraph.sh -o ${outDirData}/step10${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step10${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + fi +# ######################################################33 +# echo "{" > tmp/fitProfiles.C +# echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C +# echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C +# echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step10${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C +# # echo "FitProfile2(\"${outDirData}/step10${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C +# echo "}" >> tmp/fitProfiles.C +# root -l -b -q tmp/fitProfiles.C + +# # cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} +# if [ ! -e "${outFile}" ];then +# touch ${outFile} +# fi + + #fi +# cat ${outDirData}/step10${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} + + + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + + echo +# echo "[STATUS] Making data/MC plots" +# ./bin/ZFitter.exe -f $outDirData/step10${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step10${extension}/img/ --outDirFitResData=${outDirData}/step10${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# echo "[STATUS] Making data/MC plots" +# ./bin/ZFitter.exe -f $outDirData/step10${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step10${extension}/img/ --outDirFitResData=${outDirData}/step10${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + + echo "[STATUS] Making data/MC plots" + ./bin/ZFitter.exe -f $outDirData/step10${extension}/`basename $configFile` --regionsFile ${regionFileEBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step10${extension}/img/ --outDirFitResData=${outDirData}/step10${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + + +fi + +############################################################ +if [ -n "${GAINSWITCH}" ];then + + #stochastic smearing but with non Et dependent scale corrections + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #EB, EE + case ${extension} in + gainSwitch) regionFileEB=./data/regions/gainSwitch.dat;; + gainSwitch2) regionFileEB=./data/regions/gainSwitch_2.dat;; + gainSwitch3) regionFileEB=./data/regions/gainSwitch_3.dat;; + gainSwitch4) regionFileEB=./data/regions/gainSwitch_4.dat;; + gainSwitch5) regionFileEB=./data/regions/gainSwitch_5.dat;; + esac + basenameEB=`basename $regionFileEB .dat` - basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat #check if the output file of step8 is present checkStepDep step8 - if [ -e "${outDirTable}/params-step9-${commonCut}.txt" ];then - initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt"; + if [ -e "${outDirTable}/params-step9gainSwitch-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step9gainSwitch-${commonCut}.txt"; else echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stderr echo " creating file from results of step7" >> /dev/stderr echo "[WARNING] init file ${outDirTable}/params-step9-${commonCut}.txt not found" >> /dev/stdout echo " creating file from results of step7" >> /dev/stdout -# grep scale ${outDirData}/step7/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' > ${outDirTable}/params-step9-${commonCut}.txt -# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step9-${commonCut}.txt -# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EB} .dat`-${commonCut}-FitResult.config |sed -r 's|C L|L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step9-${commonCut}.txt - -# grep scale ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|C L|L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0.98 - 1.02)|' >> ${outDirTable}/params-step9-${commonCut}.txt -# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.03)|' >> ${outDirTable}/params-step9-${commonCut}.txt -# grep constTerm ${outDirData}/step6/img/outProfile-`basename ${regionFileStep5EE} .dat`-${commonCut}-FitResult.config |grep -v absEta_0_1 |sed -r 's|L|C L|;s|constTerm|alpha|;s|= [0-9]+.+/- [.0-9]+ |= 1.0000 +/- 0.0100 |;s|\([.0-9]*[ ]+-[ ]+[.0-9]+\)|(0 - 0.20)|' >> ${outDirTable}/params-step9-${commonCut}.txt initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt"; cat ${outDirTable}/params-step9-${commonCut}.txt exit 0 @@ -1469,10 +1622,264 @@ if [ -n "${PDFWEIGHT}" ];then | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step8/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step9${extension}/`basename $configFile` mkSmearerCatSignal $regionFileEB - #mkSmearerCatSignal $regionFileEE mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + exit 0 + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + for index in `seq 1 50` + do + mkdir ${outDirData}/step9${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${index}/img -p + done +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --onlyScale --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; +# exit 0 + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1;" + + + while [ "`bjobs -J \"${basenameEB} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + fi + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root +#fi + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + # echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + if [ ! -e "${outFile}" ];then + touch ${outFile} + fi + + #fi + cat ${outDirData}/step9${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} + + + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + + echo + echo "[STATUS] Making data/MC plots" + ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + + + + +fi + + + +############################################################ +if [ -n "${MCSAMPLE}" ];then + + #stochastic smearing but with non Et dependent scale corrections + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + case $extension in + madgraph) sample=s1 ;; + powheg) sample=s2 ;; + sherpa) sample=s3 ;; + *) + echo "[ERROR] Test of systematic due to particular mc sample not valid" >> /dev/stderr + exit 1 + ;; + esac + + #EB, EE + regionFileEB=$regionFileStep4EB + regionFileEE=$regionFileStep4EE + + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + + outFile=${outDirTable}/step9${extension}-${invMass_var}-${newSelection}-${commonCut}.dat + + #check if the output file of step8 is present + checkStepDep step8 + + if [ -e "${outDirTable}/params-step9mcShape-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step9mcShape-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step9mcShape-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step9" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step9mcShape-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step9" >> /dev/stdout + + initFile="--initFile=${outDirTable}/params-step9mcShape-${commonCut}.txt"; + cat ${outDirTable}/params-step9-${commonCut}.txt | sed '/alpha/{ s|L|C L|}; /constTerm/ {s|L|C L|};s|C C L|C L|' > ${outDirTable}/params-step9mcShape-${commonCut}.txt + cat ${outDirTable}/params-step9mcShape-${commonCut}.txt + exit 0 + + echo "[ERROR] ${outDirTable}/params-step9-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + if [ ! -e "${outDirData}/step9/fitres" ];then mkdir ${outDirData}/step9/fitres -p; fi + if [ ! -e "${outDirData}/step9/img" ];then mkdir ${outDirData}/step9/img -p; fi + + cat $configFile |grep -v '#' \ + | grep -v "r9weights" | grep -v "scaleEle" | grep -v "r9weights" \ + | sed '/^d/ d' \ + | sed "/^${sample}/{p; s|^s|d|}" | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + + cat $outDirData/step9${extension}/`basename $configFile` + touch $outFile + mkSmearerCatSignal $regionFileEB + mkSmearerCatSignal $regionFileEE +# mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + for index in `seq 1 50` + do + mkdir ${outDirData}/step9${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${index}/img -p + done +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} || exit 1; + exit 0 + + bsub -q 2nd \ + -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step9${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} || exit 1;" + + + while [ "`bjobs -J \"${basenameEB} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + + exit 0 + + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + # echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + if [ ! -e "${outFile}" ];then + touch ${outFile} + fi + + fi + cat ${outDirData}/step9${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} + + + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} + + echo + echo "[STATUS] Making data/MC plots" + ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + + + + +fi + +############################################################ +if [ -n "${PDFWEIGHT}" ];then + extension=pdfWeight +#stochastic smearing but with non Et dependent scale corrections + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + sample=s1 + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + + #check if the output file of step8 is present + checkStepDep step8 + + if [ -e "${outDirTable}/params-step9mcShape-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step9mcShape-${commonCut}.txt"; + else + echo "[WARNING] init file ${outDirTable}/params-step9mcShape-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step9" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step9mcShape-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step9" >> /dev/stdout + + initFile="--initFile=${outDirTable}/params-step9mcShape-${commonCut}.txt"; + cat ${outDirTable}/params-step9-${commonCut}.txt | sed '/alpha/{ s|L|C L|}; /constTerm/ {s|L|C L|};s|C C L|C L|' > ${outDirTable}/params-step9mcShape-${commonCut}.txt + cat ${outDirTable}/params-step9mcShape-${commonCut}.txt + exit 0 + + echo "[ERROR] ${outDirTable}/params-step9-${commonCut}.txt init file not found" >> /dev/stderr + exit 1 + fi + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step9${extension}/fitres" ];then mkdir ${outDirData}/step9${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi + if [ ! -e "${outDirData}/step9/fitres" ];then mkdir ${outDirData}/step9/fitres -p; fi + if [ ! -e "${outDirData}/step9/img" ];then mkdir ${outDirData}/step9/img -p; fi + + cat $configFile |grep -v '#' \ + | grep -v "r9weights" | grep -v "scaleEle" | grep -v "r9weights" \ + | sort | uniq > $outDirData/step9${extension}/`basename $configFile` +# | sed '/^d/ d' \ +# | sed "/^${sample}/{p; s|^s|d|}" \ + +# cat $outDirData/step9${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEB + #mkSmearerCatSignal $regionFileEE +# mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et #mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9OA # exit 0 + touch ${outFile} + if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi @@ -1488,23 +1895,23 @@ if [ -n "${PDFWEIGHT}" ];then # this way I do not reproduce the ntuples with the corrections any time - for pdfWeightIndex in `seq 0 44` + for pdfWeightIndex in 0 1 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 do for index in `seq 1 50` do mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/fitres/ -p mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/img -p done - -# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=1 || exit 1; -# exit 0 - bsub -q 2nd \ + + ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=1 || exit 1; + exit 0 + bsub -q 2nd \ -oo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ -eo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ -J "${basenameEB} step9${extension} $pdfWeightIndex [1-50]" \ "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=1 || exit 1" - + # bsub -q 2nd \ # -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ # -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ @@ -1515,26 +1922,33 @@ if [ -n "${PDFWEIGHT}" ];then while [ "`bjobs -J \"${basenameEB} step9${extension}*\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done # while [ "`bjobs -J \"${basenameEE} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done exit 0 - ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + fi + for pdfWeightIndex in 0 1 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 + do + mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/img -p + + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/${pdfWeightIndex}/*/fitres/outProfile-$basenameEB-${commonCut}.root # ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root - + ######################################################33 - echo "{" > tmp/fitProfiles.C - echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C - echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C - echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C - # echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C - echo "}" >> tmp/fitProfiles.C - root -l -b -q tmp/fitProfiles.C + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + # echo "FitProfile2(\"${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C # fi - + done + exit 0 # cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} if [ ! -e "${outFile}" ];then touch ${outFile} fi - fi + #fi cat ${outDirData}/step9${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} # grep -v absEta_0_1 ${outDirData}/step9${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} @@ -1839,72 +2253,6 @@ if [ -n "${STEP11}" ];then fi -if [ -n "${STEP10}" ];then - # stochastic term resolution categories, scales in Et bins, only histos - - if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi - if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step10/fitres/$index" ];then mkdir ${outDirData}/step10/fitres/$index -p; fi - if [ ! -e "${outDirData}/step10/img/$index" ];then mkdir ${outDirData}/step10/img/$index -p; fi - - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step10/`basename $configFile` - - - #${outDirData}/step2/fitres/initFile-scaleStep2smearing_8-${commonCut}.txt \ - regionFile=data/regions/scaleStep2smearing_9.dat - tags=`grep -v '#' $configFile | cut -f 1 | sort | uniq | grep d[1-9]` - initFile=${outDirData}/table/step10-scaleStep2smearing_9-${commonCut}.txt - if [ ! -e "${initFile}" ];then - echo "[ERROR] File ${initFile}" >> /dev/stderr - exit 1 - fi - - for tag in $tags - do - if [ ! -e "${outDirData}/step2/scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root" ];then - ls ${outDirData}/step2/ #scaleEle_HggRunEtaR9_${tag}-`basename $configFile .dat`.root - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - --saveRootMacro \ - --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat - mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ - fi - done - - for index in `seq 141 141` - do - mkdir ${outDirData}/step10/${index}/fitres/ -p - mkdir ${outDirData}/step10/${index}/img -p -# bsub -q 2nd -oo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step10" \ -# "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step10/`basename $configFile` --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step10/${index}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step10/${index}/img/ \ - --plotOnly \ - --constTermFix --smearerFit --smearingEt --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1 #" - done - exit 0 - ######################### - regionFile=data/regions/scaleStep2smearing_10.dat - if [ ! -e "${initFile}" ];then - echo "[ERROR] File ${initFile}" >> /dev/stderr - exit 1 - fi - - for index in `seq 1 30` - do - mkdir ${outDirData}/step10/${index}/fitres/ -p - mkdir ${outDirData}/step10/${index}/img -p - bsub -q 2nd -oo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stdout.log -eo ${outDirData}/step10/${index}/fitres/step10-scaleStep2smearing_10-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9-stderr.log -J "`basename $regionFile .dat` step10" \ - "cd /afs/cern.ch/user/s/shervin/scratch1/calib/CMSSW_5_3_7_patch6/src/Calibration/ZFitter; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step10/`basename $configFile` --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step10/${index}/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step10/${index}/img/ \ - --constTermFix --smearingEt --smearerFit --autoNsmear --initFile=${initFile} --addBranch=smearerCat || exit 1" - done -fi diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh index 9985e96fecb..2b6e1033e05 100644 --- a/ZFitter/script/functions.sh +++ b/ZFitter/script/functions.sh @@ -58,6 +58,8 @@ mkSmearerCatSignal(){ ./bin/ZFitter.exe -f ${configFile} --regionsFile=$1 \ --saveRootMacro --addBranch=smearerCat_s || exit 1 mv tmp/smearerCat_`basename $1 .dat`_s*-`basename $configFile .dat`.root data/smearerCat/ || exit 1 + echo "put the smearerCat ntuples to the config file" + exit 0 fi # tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` @@ -102,10 +104,17 @@ mkSmearerCatData(){ fi cat $3 \ | sed "/selected/ ! d; /selected/{ s|^\(d[1-9]\)\tselected.*|\1\tsmearerCat_`basename $1 .dat`\t$2/smearerCat_`basename $1 .dat`_\1-`basename $3 .dat`.root|}" | sort | uniq |grep smearerCat |grep '^d' >> $3.tmp + cat $3.tmp $3 | sort | uniq -d > $3.tmp2 + for line in `cat $3.tmp2 | sed 's|[ ]+|\t|g' | cut -f 3`; + do + sed -i "\#$line# d" $3.tmp + done + cat $3.tmp + echo + echo + echo cat $3.tmp >> $3 - rm $3.tmp - cat $3 - + rm $3.tmp $3.tmp2 } From f9fbb640a7963e6f75c6ea7003c436945bca2032 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:48:19 +0100 Subject: [PATCH 333/475] updated stability scripts --- ZFitter/macro/stability.C | 132 +++++++++++++++++++++++++++--------- ZFitter/script/stability.sh | 124 ++++++++++++++++++++------------- 2 files changed, 176 insertions(+), 80 deletions(-) diff --git a/ZFitter/macro/stability.C b/ZFitter/macro/stability.C index 795de1e7d2f..ac93c8c0538 100644 --- a/ZFitter/macro/stability.C +++ b/ZFitter/macro/stability.C @@ -17,7 +17,7 @@ #include #include //#define DEBUG -//#define lightLabels +#define lightLabels enum plotType { onlyData=0, onlyDataBis, dataMC, dataMCs, dataOverMC, dataOverMCfit, onlyMCs}; TH1F *stabilityHist(TGraphErrors *g_data, double& y_err_mean){ @@ -81,17 +81,20 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub >> deltaM_data >> err_deltaM_data >> deltaM_MC >> err_deltaM_MC; - // std::cout << region << "\t" << xVar << "\t" << rangeMin << "\t" << rangeMax << "\t" << deltaM_data << "\t" << deltaM_MC << "\t" << err_deltaM_MC << "\t" << f_in.peek() << std::endl; + //std::cout << region << "\t" << xVar << "\t" << rangeMin << "\t" << rangeMax << "\t" << deltaM_data << "\t" << deltaM_MC << "\t" << err_deltaM_MC << "\t" << f_in.peek() << std::endl; if(f_in.peek()!=10){ // 10 = \n isDeltaG=true; f_in >> deltaG >> err_deltaG; - } - if(deltaM_data< rMin_) rMin_=deltaM_data; - if(deltaM_MC< rMin_) rMin_=deltaM_MC; - if(deltaM_data > rMax_) rMax_=deltaM_data; - if(deltaM_MC > rMax_) rMax_=deltaM_MC; + //std::cout << region << "\t" << xVar << "\t" << rangeMin << "\t" << rangeMax << "\t" << deltaM_data << "\t" << deltaM_MC << "\t" << err_deltaM_MC << "\t" << deltaG << "\t" << err_deltaG << "\t" << f_in.peek() << std::endl; + } + if(column!=2){ + if(deltaM_data< rMin_) rMin_=deltaM_data; + if(deltaM_MC< rMin_) rMin_=deltaM_MC; + if(deltaM_data > rMax_) rMax_=deltaM_data; + if(deltaM_MC > rMax_) rMax_=deltaM_MC; + } if(region_=="" || region.CompareTo(region_)==0){ deltaM_data_hist.Fill(deltaM_data); if(xVar.CompareTo("runNumber")==0){ @@ -167,8 +170,8 @@ TGraphErrors *columns_vs_var(TString filename, TString region_, int column, doub } g_out->SetHistogram(hist_g); if(updateRange){ - std:: cout << rMin_ << "\t" << rMax_ << std::endl; - if(rMin_rMax) rMax=rMax_+0.1; } g_out->Draw("AP"); @@ -709,23 +712,35 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l yTitle2 = "#Add.Smearing [%]"; } - + TString lumi=""; TCanvas *c; - TLegend *legend; - TPaveText *pt; + TLegend *legend=NULL; + TPaveText *pt=NULL; + TPaveText *pave = new TPaveText(0.182,0.96,0.48,0.99, "ndc"); + // pv->DeleteText(); + pave->SetFillColor(0); + pave->SetTextAlign(12); + pave->SetBorderSize(0); + pave->SetTextSize(0.04); + pave->AddText("CMS Preliminary #sqrt{s}=8 TeV"); + //if(lumi.Sizeof()>1) pave->AddText("#sqrt{s}="+energy+" L="+lumi+" fb^{-1}"); + //else + //pave->AddText("#sqrt{s}=8 TeV"); if(column<0) c = new TCanvas("c", region); - else c = new TCanvas("c", region, 900,500); + else c = new TCanvas("c", region, 1000,500); c->cd(); - bool doStatistics= (column%10==1); + bool doStatistics= (column>10 && abs(column)%10==1); + bool doFit = (column > 10 && abs(column)%10==2); if(column>10){ column-=(column%10); column/=10; } - if(column<0) legend = new TLegend(0.15,0.6,0.4,0.95); + if(column<0) legend = new TLegend(0.16,0.7,0.42,0.93); else if(column>=0){ if(doStatistics){ + //legend = new TLegend(0,0.6,1,1); legend = new TLegend(0,0.6,1,1); pt = new TPaveText(0.,0.,1,0.6,"NDC"); pt -> SetFillStyle(0); @@ -733,37 +748,52 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l pt->SetFillColor(kWhite); pt->SetBorderSize(0); } else{ - legend = new TLegend(0,0.,1,1); + //legend = new TLegend(0,0.5,1,1); + legend = new TLegend(0,0.2,1,0.8); pt=NULL; } } SetLegendStyle(legend); if(column<0){ - legend->SetTextSize(0.06); + legend->SetTextSize(0.04); } else { - legend->SetTextSize(0.06); + //legend->SetTextSize(0.06); + legend->SetTextSize(0.07); } TMultiGraph *g_multi = new TMultiGraph(); - bool updateRange=rMin>=rMax; + bool updateRange=(rMin>=rMax); for(std::vector::const_iterator filename_itr= filenameList.begin(); filename_itr != filenameList.end(); filename_itr++){ int index=filename_itr-filenameList.begin(); - TGraphErrors *g_data = columns_vs_var(*filename_itr, region, 0,rMin, rMax, updateRange); - TGraphErrors *g_MC = columns_vs_var(*filename_itr, region, 1,rMin, rMax, updateRange); - TGraphErrors *g_dataMC=columns_vs_var(*filename_itr, region, 2,rMin, rMax, false); + TGraphErrors *g_data = columns_vs_var(*filename_itr, region, 0,rMin, rMax, updateRange&&abs(column)!=dataOverMC); + TGraphErrors *g_MC = columns_vs_var(*filename_itr, region, 1,rMin, rMax, updateRange&&abs(column)!=dataOverMC); + TGraphErrors *g_dataMC=columns_vs_var(*filename_itr, region, 2,rMin, rMax, updateRange&&abs(column)==dataOverMC); + g_dataMC->SaveAs("tmp/g_dataMC.root"); + + if(updateRange){ + rMin-=(rMax-rMin)*0.1; + } + if(g_data==NULL || g_MC==NULL || g_dataMC==NULL) return c; g_data->SetName(region); //------------------------------ style g_data -> SetMarkerStyle(20+index); - g_data->SetMarkerSize(1.2); + g_data->SetMarkerSize(1.5); //g_data->SetMarkerSize(3); g_data -> SetMarkerColor(kBlack+index); - g_data -> SetFillColor(0); g_data -> SetDrawOption("P"); + + g_dataMC -> SetMarkerStyle(20+index); + g_dataMC->SetMarkerSize(1.2); + //g_dataMC->SetMarkerSize(3); + g_dataMC -> SetMarkerColor(kBlack+index); + g_dataMC -> SetFillColor(0); + g_dataMC -> SetDrawOption("P"); + g_MC -> SetMarkerStyle(0); //g_MC -> SetMarkerSize(0); g_MC -> SetFillColor(kGray); @@ -775,33 +805,61 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l g_MC -> SetMarkerColor(g_data->GetMarkerColor()); //kBlack+index); g_MC -> SetMarkerStyle(20+index); }else if(abs(column)==onlyMCs){ - g_MC -> SetFillStyle(3003+index); + g_MC -> SetFillStyle(0); //3003+index); g_MC -> SetFillColor(kBlack+index); g_MC -> SetMarkerColor(kBlack+index); g_MC -> SetMarkerStyle(20+index); } g_MC -> SetLineWidth(0); g_MC -> SetLineColor(1); - - if(column!=onlyData && abs(column)!=dataOverMC && abs(column)!=onlyDataBis && abs(column)!=dataMC || (abs(column)==dataMC && index==0)){ + + if(doFit && abs(column)==onlyMCs){ + TFitResultPtr ptr = g_MC->Fit("pol1","s"); + TFitResult *fitres = ptr.Get(); + char out_char[100]; +// pt1->AddText(""); +// pt1->AddLine(); + std::cout << "----" << std::endl; + sprintf(out_char,"Chi2/ndf = %.2f", fitres->Chi2()/fitres->Ndf()); + std::cout << out_char << std::endl; +// pt1->AddText(out_char); + sprintf(out_char,"slope = %.2f #pm %.2f", fitres->GetParams()[1], fitres->GetErrors()[1]); +// pt1->AddText(out_char); + std::cout << out_char << std::endl; + sprintf(out_char,"inter. = %.2f #pm %.2f", fitres->GetParams()[0], fitres->GetErrors()[0]); +// pt1->AddText(out_char); + std::cout << out_char << std::endl; + } + + if(abs(column)!=onlyData && abs(column)!=dataOverMC && abs(column)!=onlyDataBis && abs(column)!=dataMC || (abs(column)==dataMC && index==0)){ + std::cout << doStatistics << "\t" << doFit << std::endl; + + TString plotOption="L3"; if(abs(column)==onlyMCs) plotOption="P"; g_multi->Add(g_MC,plotOption); - if (column==dataMC) legend->AddEntry(g_MC,"Simulation", plotOption); - else legend->AddEntry(g_MC,TString("MC: ")+legendList[index], plotOption+"f"); + if (abs(column)==dataMC) legend->AddEntry(g_MC,"Simulation", plotOption); + else{ + if(legendList[index]!="") legend->AddEntry(g_MC,TString("MC: ")+legendList[index], plotOption+"f"); + else legend->AddEntry(g_MC,TString("Simulation"), plotOption+"f"); + } } if(abs(column)!=dataOverMC){ if(pt!=NULL){ double y_mean_error=0; - TH1F *hist = (column!=onlyMCs) ? stabilityHist(g_data, y_mean_error) : stabilityHist(g_MC, y_mean_error); + TH1F *hist = (abs(column)!=onlyMCs) ? stabilityHist(g_data, y_mean_error) : stabilityHist(g_MC, y_mean_error); pt->AddText(""); pt->AddLine(); + std::cout << "pre" << std::endl; pt->AddText(legendList[index]); + std::cout << "post" << std::endl; + //sprintf(out_char,"Mean = %.2f", hist_corr->GetMean()); pt->AddText(TString::Format("Mean = %.2f", hist->GetMean())); pt->AddText(TString::Format("Std. dev. = %.2f", hist->GetRMS())); pt->AddText(TString::Format("Mean Error = %.2f", y_mean_error)); } + if(abs(column)!=onlyMCs){ legend->AddEntry(g_data,"Data: "+legendList[index], "P"); g_multi->Add(g_data,"P"); @@ -820,12 +878,21 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l axis->SetBinLabel(i_bin+5, axis_data->GetBinLabel(i_bin)); // } } + std::cout << doStatistics << "\t" << doFit << std::endl; + + } + std::cout << doStatistics << "\t" << doFit << std::endl; + + c->Clear(); g_multi->Draw("A"); //########## graph settings g_multi->GetYaxis()->SetTitle(yTitle); + if(abs(column)==dataOverMC && yTitle.Contains("#Delta m")){ + g_multi->GetYaxis()->SetTitle("#Delta P [\%]"); + } g_multi->GetXaxis()->SetTitle(xTitle); g_multi->GetXaxis()->SetLabelSize(0.05 * labelScale); #ifdef lightLabels @@ -843,7 +910,7 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l g_multi->GetXaxis()->SetTitleOffset(g_multi->GetXaxis()->GetTitleOffset()/labelScale); g_multi->GetYaxis()->SetTitleSize(g_multi->GetYaxis()->GetTitleSize()*labelScale); - g_multi->GetYaxis()->SetTitleOffset(g_multi->GetYaxis()->GetTitleOffset()/labelScale); + g_multi->GetYaxis()->SetTitleOffset(g_multi->GetYaxis()->GetTitleOffset()/labelScale*1.1); g_multi->GetYaxis()->SetLabelSize(g_multi->GetYaxis()->GetLabelSize()*labelScale); if( rMax == rMin || rMax < rMin){ @@ -907,6 +974,9 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l } legend->Draw(); if(pt!=NULL) pt->Draw(); + + pad1->cd(); + pave->Draw(); // g_multi->Draw("Psame"); // g_data->GetXaxis()->Draw(); // } diff --git a/ZFitter/script/stability.sh b/ZFitter/script/stability.sh index 753af10d81a..c913d2b8d01 100755 --- a/ZFitter/script/stability.sh +++ b/ZFitter/script/stability.sh @@ -14,12 +14,13 @@ usage(){ echo " -l legend" echo " --color: make coloured plot (def=$color)" echo " --column arg (def=$column)" - echo " --allRegions" + echo " --allRegions" + echo " -g arg: select regions matching arg, to be used with --allRegions" echo " --norm: normalized the y axis to the first point" } # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o ht:x:y:l: -l help,tableFile:,xVar:,yVar:,outDirImgData:,noPlot,xMin:,xMax:,tableFile2:,titleFile1:,titleFile2:,color,column:,allRegions,norm -- "$@") +if ! options=$(getopt -u -o ht:x:y:l:g: -l help,tableFile:,xVar:,yVar:,outDirImgData:,noPlot,xMin:,xMax:,tableFile2:,titleFile1:,titleFile2:,color,column:,allRegions,norm -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -46,6 +47,7 @@ do --xMean) XMEAN=true;; --column) column=$2; shift;; --allRegions) MULTIREGION=y;; + -g) REGIONGREP=$2; shift;; --norm) NORM=y;; #--titleFile1) titleOne=$2; shift;; #--titleFile2) titleTwo=$2; shift;; @@ -83,35 +85,6 @@ if [ ! -e "tmp/" ];then mkdir tmp/; fi tmpFile=tmp/tmpFile.dat columns=$COLUMNDATA,$COLUMNMC,$COLUMNDATAMC #./script/tex2txt.sh $TABLEFILE > $tmpFile -case $xVar in - unixTime) - xVarName="date (day/month)" - ;; - runNumber) - xVarName=runNumber - ;; - absEta) - xVarName="|#eta|" - ;; - absEtaSingleEle) - xVarName="|#eta of one electron|" - ;; - nPV) - xVarName="nVtx" - ;; - invMassRelSigma*) - xVarName="#sigma_{M}/M" - ;; - ADC) - xVarName="scale shift [%]" - ;; - nHitsSCEle) - xVarName="num Hits SC" - ;; - Et) - xVarName="Et (GeV)" - ;; -esac case $yVar in peak|deltaM) @@ -119,6 +92,10 @@ case $yVar in yVarName="#Delta m [GeV/c^{2}]" yMin=-1 yMax=1 + if [ -n "${MULTIREGION}" ];then + yMin=10; + yMax=-10; + fi ;; sigmaCB) columns=6-7 @@ -158,6 +135,41 @@ case $yVar in ;; esac +case $xVar in + unixTime) + xVarName="date (day/month)" + ;; + runNumber) + xVarName=runNumber + ;; + absEta) + xVarName="|#eta|" + ;; + absEtaSingleEle) + xVarName="|#eta of one electron|" + ;; + nPV) + xVarName="nVtx" + ;; + invMassRelSigma*) + xVarName="#sigma_{M}/M" + ;; + ADC) + xVarName="scale shift [%]" + ;; + nHitsSCEle) + xVarName="num Hits SC" + ;; + Et) + xVarName="Et (GeV)" +# yMin=0.994 +# yMax=1.008 + yMin=0.999 + yMax=1.002 + + ;; +esac + if [ ! -e "tmp/stability/dat/" ]; then mkdir -p tmp/stability/dat else @@ -191,9 +203,20 @@ for TABLEFILE in $TABLEFILES echo $TABLEFILE tmpFile=tmp/stability/tmpFile-${index}.tex tmpFileDat=tmp/stability/dat/tmpFile-${index}.dat + runListFile=tmp/stability/runList-${index}.dat + runListSed=tmp/stability/run2time-${index}.sed echo $tmpFile echo $tmpFileDat case $xVar in + Et) + grep -v '#' $TABLEFILE | grep -v '^%' | grep ${xVar} | grep scale | sed 's|scale_||;s|=|\& 0 \& -- \& -- \&|;s|+/-|\\pm|;s|L(.*)| \\\\|;s|//.*||' | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;s|^\t${xVar}|noname\t${xVar}|;s|^-||" | cut -d '&' -f 1,2,$columns > $tmpFile + ;; + unixTime) + grep -v '#' $TABLEFILE | grep -v '^%' | grep runNumber | sed "s|[-]*runNumber_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\trunNumber\t\1\t\2|;s|^\trunNumber|noname\trunNumber|;s|^-||" |cut -d '&' -f 1,2,$columns > $tmpFile + cut -d '&' -f 1 $tmpFile | sed 's|.*runNumber\t\([0-9]*\)\t\([0-9]*\)|\1-\2|' |sort | uniq > ${runListFile} + for line in `cat ${runListFile}`; do grep $line data/runRanges/*.dat | sed -r 's|[ ]+|\t|g;s|[\t]+|\t|g' | cut -f 1,3 | cut -d ':' -f 2| awk '(NF>1){print $0}' |sort | uniq | sed 's/\([0-9]*\)-\([0-9]*\)\t\([0-9]*\)-\([0-9]*\)/s|runNumber\t\1\t\2|unixTime\t\3\t\4|/'; done > ${runListSed} + sed -i -f ${runListSed} $tmpFile + ;; *) grep -v '#' $TABLEFILE | grep -v '^%' | grep ${xVar} | sed "s|[-]*${xVar}_\([^_]*\)_\([^- ]*\)\([^& ]*\)|\3\t${xVar}\t\1\t\2|;s|^\t${xVar}|noname\t${xVar}|;s|^-||" |cut -d '&' -f 1,2,$columns > $tmpFile ;; @@ -233,9 +256,12 @@ EOF done - -regions=`cat tmp/stability/dat/*.dat | cut -f 1 | sort | uniq` - +if [ -n "${REGIONGREP}" ];then + regions=`cat tmp/stability/dat/*.dat | cut -f 1 | sort | uniq |grep ${REGIONGREP}` + REGIONGREP="-${REGIONGREP}" +else + regions=`cat tmp/stability/dat/*.dat | cut -f 1 | sort | uniq` +fi if [ -n "${MULTIREGION}" ];then cat >> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<> tmp/stability_macro.C<SaveAs("${outDirImgData}/${yVar}_vs_${xVar}.eps"); + c->SaveAs("${outDirImgData}/${yVar}_vs_${xVar}${REGIONGREP}.eps"); delete c; EOF From 2ab0053de208c42d4e434d8b25596addfdb694fd Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:49:00 +0100 Subject: [PATCH 334/475] improved dealing with smear and scale additional branches --- ZFitter/macro/PlotDataMC.C | 47 +++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index 9d93f6b8286..e81e65b6f37 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -105,6 +105,8 @@ TCanvas *Plot2D_my(TChain *data, TString branchname, TString binning,TString sel return c; } + + TCanvas *PlotDataMC2D(TChain *data, TChain *mc, TString branchname, TString binning, TCut selection, TString dataLabel, TString mcLabel, @@ -115,14 +117,16 @@ TCanvas *PlotDataMC2D(TChain *data, TChain *mc, TString branchname, TString binn //type == 2: data/MC TCanvas *c = new TCanvas("c",""); - - if(branchname=="map"){ + TString weightVar; + if(branchname.Contains("map")){ + weightVar=branchname.ReplaceAll("_map","").ReplaceAll("map",""); branchname="seedXSCEle:seedYSCEle"; - binning="(360,1,361,171,-85,86)"; + binning="(361,-0.5,360.5,171,-85.5,85.5)"; yLabel="iEta"; xLabel="iPhi"; c->SetGridx(); } + if(weightVar!="") selection+="*"+weightVar; data->Draw(branchname+">>data_hist"+binning, selection,opt); if(usePU) mc->Draw(branchname+">>mc_hist"+binning, selection *"puWeight",opt); else mc->Draw(branchname+">>mc_hist"+binning, selection,opt); @@ -176,8 +180,11 @@ TCanvas *PlotDataMC(TChain *data, TChain *mc, TString branchname, TString binnin TString branchNameMC=branchname; ElectronCategory_class cutter; + TCut selection_data=""; - if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0); + if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0,true); + selection_data.Print(); + return NULL; selection_data+=selection; TCut selection_MC=""; if(category.Sizeof()>1) selection_MC = cutter.GetCut(category, false,0); @@ -195,6 +202,10 @@ TCanvas *PlotDataMC(TChain *data, TChain *mc, TString branchname, TString binnin branchNameData.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*corrEle)"); branchNameData.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*corrEle[0])"); branchNameData.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*corrEle[1])"); + branchNameData.ReplaceAll("energySCEle_regrCorr_ele ","(energySCEle_regrCorr_ele*corrEle)"); + branchNameData.ReplaceAll("energySCEle_regrCorr_ele[0]","(energySCEle_regrCorr_ele[0]*corrEle[0])"); + branchNameData.ReplaceAll("energySCEle_regrCorr_ele[1]","(energySCEle_regrCorr_ele[1]*corrEle[1])"); + } //std::cout << branchNameData << "\t" << branchNameMC << std::endl; @@ -546,9 +557,9 @@ TCanvas *PlotDataMCMC(TChain *data, TChain *mc, TChain *mc2, TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchname, TString binning, - TString category, TString selection, + TString category, TString selection, TString dataLabel, std::vector mcLabel_vec, TString xLabel, TString yLabelUnit, - bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false, bool useR9Weight=false){ + bool logy=false, bool usePU=true, bool ratio=true,bool smear=false, bool scale=false, bool useR9Weight=false, TString pdfIndex=""){ TStopwatch watch; watch.Start(); //gStyle->SetOptStat(11);//Giuseppe @@ -598,8 +609,11 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn // } // data->SetBranchStatus("invMass_SC_regrCorrSemiParV4_ele", 1); // data->SetBranchStatus("invMass_SC_regrCorrSemiParV5_ele", 1); + if(branchNameData.Contains("energySCEle_regrCorrSemiParV5_pho")) cutter.energyBranchName="energySCEle_regrCorrSemiParV5_pho"; + else if(branchNameData.Contains("energySCEle_regrCorrSemiParV5_ele")) cutter.energyBranchName="energySCEle_regrCorrSemiParV5_ele"; + TCut selection_data=""; - if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0); + if(category.Sizeof()>1) selection_data = cutter.GetCut(category, false,0,scale); selection_data+=selection; TCut selection_MC=""; if(category.Sizeof()>1) selection_MC = cutter.GetCut(category, false,0); @@ -607,20 +621,27 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn if(smear){ branchNameMC.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(smearEle[0]*smearEle[1]))"); - branchNameMC.ReplaceAll("invMass_SC_regrCorrSemiParV5_pho","(invMass_SC_regrCorrSemiParV5_pho*sqrt(smearEle[0]*smearEle[1]))"); + branchNameMC.ReplaceAll("invMass_SC_regrCorrSemiParV5_pho","(invMass_SC_regrCorrSemiParV5_pho*sqrt(smearEle[0]*smearEle[1]))"); branchNameMC.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*smearEle) "); branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*smearEle[0])"); branchNameMC.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*smearEle[1])"); + branchNameMC.ReplaceAll("energySCEle_regrCorrSemiParV5_ele[0]","(energySCEle_regrCorrSemiParV5_ele[0]*smearEle[0])"); + branchNameMC.ReplaceAll("energySCEle_regrCorrSemiParV5_ele[1]","(energySCEle_regrCorrSemiParV5_ele[1]*smearEle[1])"); + if(!branchNameMC.Contains("smear")) branchNameMC.ReplaceAll("energySCEle_regrCorrSemiParV5_ele","(energySCEle_regrCorrSemiParV5_ele*smearEle)"); } if(scale){ std::cout << "Apply scale" << std::endl; branchNameData.ReplaceAll("invMass_SC_regrCorr_pho ","(invMass_SC_regrCorr_pho*sqrt(scaleEle[0]*scaleEle[1]))"); branchNameData.ReplaceAll("invMass_SC_regrCorrSemiParV5_pho","(invMass_SC_regrCorrSemiParV5_pho*sqrt(scaleEle[0]*scaleEle[1]))"); - branchNameData.ReplaceAll("energySCEle_regrCorr_pho ","(energySCEle_regrCorr_pho*scaleEle)"); - branchNameData.ReplaceAll("energySCEle_regrCorr_pho[0]","(energySCEle_regrCorr_pho[0]*scaleEle[0])"); - branchNameData.ReplaceAll("energySCEle_regrCorr_pho[1]","(energySCEle_regrCorr_pho[1]*scaleEle[1])"); - } + branchNameData.ReplaceAll("energySCEle_regrCorrSemiParV5_pho ","(energySCEle_regrCorrSemiParV5_pho*scaleEle)"); + branchNameData.ReplaceAll("energySCEle_regrCorrSemiParV5_pho[0]","(energySCEle_regrCorrSemiParV5_pho[0]*scaleEle[0])"); + branchNameData.ReplaceAll("energySCEle_regrCorrSemiParV5_pho[1]","(energySCEle_regrCorrSemiParV5_pho[1]*scaleEle[1])"); + branchNameData.ReplaceAll("energySCEle_regrCorrSemiParV5_ele[0]","(energySCEle_regrCorrSemiParV5_ele[0]*scaleEle[0])"); + branchNameData.ReplaceAll("energySCEle_regrCorrSemiParV5_ele[1]","(energySCEle_regrCorrSemiParV5_ele[1]*scaleEle[1])"); + if(!branchNameData.Contains("scale")) branchNameData.ReplaceAll("energySCEle_regrCorrSemiParV5_ele","(energySCEle_regrCorrSemiParV5_ele*scaleEle)"); + } + std::cout << branchNameData << "\t" << branchNameMC << std::endl; // return NULL; @@ -645,7 +666,7 @@ TCanvas *PlotDataMCs(TChain *data, std::vector mc_vec, TString branchn TString mcHistName; mcHistName+=mc_itr-mc_vec.begin(); mcHistName+="_hist"; TString weights="mcGenWeight"; - + if(pdfIndex!="") weights+="*(pdfWeights_cteq66["+pdfIndex+"]/pdfWeights_cteq66[0])"; if(usePU) weights+="*puWeight"; if(useR9Weight) weights+="*r9Weight"; mc->Draw(branchNameMC+">>"+mcHistName+binning, selection_MC *weights.Data()); From 187df0993aab3c1f3cedb11a61def6bdd794db9c Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:49:51 +0100 Subject: [PATCH 335/475] added ratio plot to data/mc and improved likelihood profile fit --- ZFitter/macro/macro_fit.C | 12 +-- ZFitter/macro/plot_data_mc.C | 171 ++++++++++++++++++++++++----------- 2 files changed, 125 insertions(+), 58 deletions(-) diff --git a/ZFitter/macro/macro_fit.C b/ZFitter/macro/macro_fit.C index 17eeb903399..8ac599061c6 100644 --- a/ZFitter/macro/macro_fit.C +++ b/ZFitter/macro/macro_fit.C @@ -280,7 +280,7 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) f2->SetParLimits(0,-100,100); f2->SetParLimits(1,rangeLimMin,rangeLimMax); //f2->SetParLimits(2,1e5,1e9); - f2->SetParLimits(2,0,1e9); + f2->SetParLimits(2,0,1e10); f2->SetParLimits(3,0,1e10); int iter=0; do{ @@ -317,8 +317,8 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) chi2 = fun->GetChisquare()/fun->GetNDF(); //g->Chisquare(fun); if(isScale){ - range_min = TMath::Max(minX-30*sigma_minus, rangeLimMin); - range_max = TMath::Min(minX+30*sigma_plus, rangeLimMax); + range_min = TMath::Max(minX-10*sigma_minus, rangeLimMin); + range_max = TMath::Min(minX+10*sigma_plus, rangeLimMax); } else if(isPhi){ range_min = TMath::Max(minX-2*sigma_minus, rangeLimMin); range_max = TMath::Min(minX+3*sigma_plus, rangeLimMax); @@ -798,11 +798,12 @@ void Plot(TCanvas *c, TGraphErrors *g, TF1 *fun, TPaveText *pt, bool isScale, bo Double_t yMax = rangeWithPoints(g, 8, &xMin, &xMax); std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << sigma << "\t" << fun->GetXmin() << std::endl; std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << yMax << std::endl; - xMin=std::min((xMin+xMax)/2.-sigma,xMin); - xMax=std::max((xMin+xMax)/2.+sigma,xMax); + xMin=std::min(fun->GetMinimumX()-7*sigma,xMin); + xMax=std::max(fun->GetMinimumX()+7*sigma,xMax); xMin=std::max(xMin,0.96); xMax=std::min(xMax,1.04); + yMax=std::max(yMax, std::max(fun->Eval(xMin),fun->Eval(xMax))); std::cout << "EEEEEEEEEEEEEEEEE" << xMin << "\t" << xMax << std::endl; g->GetXaxis()->SetRangeUser(xMin, xMax); g->GetYaxis()->SetRangeUser(-5, yMax); //std::max(fun->Eval(xMin), fun->Eval(xMax))); @@ -1084,7 +1085,6 @@ void FitProfile2(TString filename, TString energy="8 TeV", TString lumi="", bool gPad->SaveAs(img_filename(filename, variable, region,".C")); gPad->SaveAs(img_filename(filename, variable, region,".png")); vars->add(*var_); - } } diff --git a/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C index 13de2ef080b..49bb34c322b 100644 --- a/ZFitter/macro/plot_data_mc.C +++ b/ZFitter/macro/plot_data_mc.C @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -112,7 +113,42 @@ void PlotCanvas(TCanvas *c, TH1F *mc, TH1F *data, TH1F *mcSmeared){ -void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legend=NULL, TString region="", TString filename="", TString energy="8 TeV", TString lumi=""){ +void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legend=NULL, TString region="", TString filename="", TString energy="8 TeV", TString lumi="", bool ratio=true){ + + c->Clear(); + TPad * pad1 = new TPad("pad1", "pad1",0.00,0.20, 1,1.); + TPad * pad2 = new TPad("pad2", "pad2",0.00,0.00, 1,0.2); + TPad * pad3 = new TPad("pad3", "pad3",0.75,0.00, 1.,0.2); + + float yscale=0.75/(pad1->GetYlowNDC() -pad2->GetYlowNDC()); + float xscale=1; + + if(ratio){ + + + pad1->SetRightMargin(0.1); + pad1->SetBottomMargin(0.01); + // pad1->SetLogy(); + pad1->Draw(); + pad1->cd(); + c->cd(); + pad2->SetGrid(); + pad2->SetBottomMargin(0.5); + pad2->SetTopMargin(0.01); + pad2->SetRightMargin(0.1); + pad2->Draw(); + pad2->cd(); + c->cd(); + pad3->SetGrid(); + //pad2->SetTopMargin(0.01); + pad3->SetBottomMargin(0.4); + pad3->SetRightMargin(0.1); + // pad3->Draw(); + // pad3->cd(); + + pad1->cd(); + + } TGaxis::SetMaxDigits(3); @@ -120,57 +156,60 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen data->SetMarkerStyle(20); - mc->SetLineColor(kRed); - mc->SetLineWidth(2); - mc->SetFillStyle(1001); //3002 - mc->SetFillColor(kRed); - - mc->Draw(); - - mc->GetXaxis()->SetTitle("M_{ee} (GeV/c^{2})"); - // mc->GetXaxis()->SetRangeUser(75,105); - char ylabel[100]; - sprintf(ylabel,"Events/%.1f GeV",mc->GetBinWidth(1)); - mc->GetYaxis()->SetTitle(ylabel); - mc->GetYaxis()->SetTitleOffset(1.4); - - mc->DrawNormalized("hist",data->Integral()); - - mcSmeared->SetLineWidth(3); - mcSmeared->DrawNormalized("same hist",data->Integral()); - - data->Draw("E same"); - // std::cout << data->Integral() << std::endl; - - // PlotCanvas(c, mc, data, mcSmeared); - - legend->Clear(); - legend->AddEntry(mc,"MC","f"); - legend->AddEntry(mcSmeared,"MC smeared","l"); - legend->AddEntry(data,"data","p"); - double KS=data->KolmogorovTest(mcSmeared); - TString ks="Kolmogorov test: "; - char line[50]; - sprintf(line, "%.2f", KS); - ks+=line; - std::cout << "" << ks << std::endl; - - TPaveText pave(0.182,0.8,0.38,0.92, "ndc"); - // pv->DeleteText(); - pave.SetFillColor(0); - pave.SetTextAlign(12); - pave.SetBorderSize(0); - pave.SetTextSize(0.036); - pave.AddText("CMS Preliminary"); - pave.AddText("#sqrt{s}="+energy); - if(lumi.Sizeof()>1) pave.AddText("L="+lumi+" fb^{-1}"); - // pave.AddText(""); - - //pave.AddText(ks); - - - c->cd(0); - pave.Draw(); + mc->SetLineColor(kRed); + mc->SetLineWidth(2); + mc->SetFillStyle(1001); //3002 + mc->SetFillColor(kRed); + + mc->Draw(); + + mc->GetXaxis()->SetTitle("M_{ee} (GeV/c^{2})"); + // mc->GetXaxis()->SetRangeUser(75,105); + char ylabel[100]; + sprintf(ylabel,"Events/%.1f GeV",mc->GetBinWidth(1)); + mc->GetYaxis()->SetTitle(ylabel); + mc->GetYaxis()->SetTitleOffset(1.3); + + TH1* mcNorm = mc->DrawNormalized("hist",data->Integral()); + float ymax=std::max(mcNorm->GetMaximum(),data->GetMaximum())*1.2; + mcNorm->GetYaxis()->SetRangeUser(0,ymax); + + mcSmeared->SetLineWidth(3); + TH1* mcSmeared_norm = mcSmeared->DrawNormalized("same hist",data->Integral()); + + data->Draw("E same"); + + // std::cout << data->Integral() << std::endl; + + // PlotCanvas(c, mc, data, mcSmeared); + + legend->Clear(); + legend->AddEntry(mc,"MC","f"); + legend->AddEntry(mcSmeared,"MC smeared","l"); + legend->AddEntry(data,"data","p"); + double KS=data->KolmogorovTest(mcSmeared); + TString ks="Kolmogorov test: "; + char line[50]; + sprintf(line, "%.2f", KS); + ks+=line; + std::cout << "" << ks << std::endl; + + TPaveText pave(0.182,0.8,0.38,0.92, "ndc"); + // pv->DeleteText(); + pave.SetFillColor(0); + pave.SetTextAlign(12); + pave.SetBorderSize(0); + pave.SetTextSize(0.036); + pave.AddText("CMS Preliminary"); + pave.AddText("#sqrt{s}="+energy); + if(lumi.Sizeof()>1) pave.AddText("L="+lumi+" fb^{-1}"); + // pave.AddText(""); + + //pave.AddText(ks); + + + //c->cd(0); + pave.Draw(); // pave.Paint(); @@ -187,6 +226,34 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen legend->Draw(); + if(ratio){ + TH1F *sRatio = (TH1F*) data->Clone("sRatio"); + sRatio->Divide(mcSmeared_norm); + + pad2->cd(); + sRatio->Draw(); + + TGraphErrors *ratioGraph = new TGraphErrors(sRatio); + ratioGraph->SetMarkerColor(kBlue); + ratioGraph->Draw("AP"); + ratioGraph->GetXaxis()->SetTitle(mc->GetXaxis()->GetTitle()); + ratioGraph->GetYaxis()->SetTitle("Data/MC"); + + ratioGraph->GetYaxis()->SetTitleSize(sRatio->GetYaxis()->GetTitleSize()*yscale); + ratioGraph->GetYaxis()->SetTitleOffset(sRatio->GetYaxis()->GetTitleOffset()/yscale); + ratioGraph->GetYaxis()->SetLabelSize(sRatio->GetYaxis()->GetLabelSize()*yscale); + ratioGraph->GetYaxis()->SetLabelOffset(sRatio->GetYaxis()->GetLabelOffset()*yscale); + ratioGraph->GetXaxis()->SetTitleSize(sRatio->GetYaxis()->GetTitleSize() *yscale ); + ratioGraph->GetXaxis()->SetTitleOffset(0.92); + ratioGraph->GetXaxis()->SetLabelSize(sRatio->GetYaxis()->GetLabelSize() *yscale ); + ratioGraph->GetXaxis()->SetLabelOffset(sRatio->GetYaxis()->GetLabelOffset()); + + ratioGraph->GetYaxis()->SetRangeUser(1- 2*ratioGraph->GetRMS(2),1+2*ratioGraph->GetRMS(2)); + ratioGraph->GetYaxis()->SetNdivisions(5); + + c->cd(); + } + c->SaveAs(img_filename(filename, region, ".eps")); c->SaveAs(img_filename(filename, region, ".png")); c->SaveAs(img_filename(filename, region, ".C")); From 2dbed3361bc64414a5e0bd29d95a82585c7a337d Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:51:42 +0100 Subject: [PATCH 336/475] added not Et category --- ZFitter/src/ElectronCategory_class.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index f14fc86ec2e..38d0fe83cb6 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -362,6 +362,7 @@ std::set ElectronCategory_class::GetCutSet(TString region){ continue; } + //--------------- IETA if(string.Contains("absIEta")){ TObjArray *splitted = string.Tokenize("_"); @@ -665,9 +666,15 @@ std::set ElectronCategory_class::GetCutSet(TString region){ cut_string += ele1_cut || ele2_cut; cutSet.insert(TString(ele1_cut || ele2_cut)); } else { - cut_string+=ele1_cut && ele2_cut; - cutSet.insert(TString(ele1_cut)); - cutSet.insert(TString(ele2_cut)); + if(string.Contains("!")){ + cut_string+=(!ele1_cut) && (!ele2_cut); + cutSet.insert(TString(!ele1_cut)); + cutSet.insert(TString(!ele2_cut)); + }else{ + cut_string+=ele1_cut && ele2_cut; + cutSet.insert(TString(ele1_cut)); + cutSet.insert(TString(ele2_cut)); + } } delete splitted; @@ -1019,8 +1026,8 @@ std::set ElectronCategory_class::GetCutSet(TString region){ TObjString *Objstring0 = (TObjString *) splitted->At(0); TString string0 = Objstring0->GetString(); - for(int i=1; i < splitted->GetEntries()-2; i++){ - Objstring0 = (TObjString *) splitted->At(i); + for(int iString=1; iString < splitted->GetEntries()-2; iString++){ + Objstring0 = (TObjString *) splitted->At(iString); string0+="_"; string0+=Objstring0->GetString(); } TObjString *Objstring1 = (TObjString *) splitted->At(splitted->GetEntries()-2); From 9aa06d8904bb4014afc9ad4ff7d96aae8d28cd31 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:53:45 +0100 Subject: [PATCH 337/475] additional smearing from friend tree with also smearingSigma branch --- ZFitter/src/EnergyScaleCorrection_class.cc | 22 +++++++---- ZFitter/src/RooSmearer.cc | 43 ++++++++++++++++++---- ZFitter/src/SmearingImporter.cc | 29 ++++++++++++--- 3 files changed, 75 insertions(+), 19 deletions(-) diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 0e69fdb4d25..4c4811a1f01 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -59,8 +59,8 @@ float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, d scales_not_defined[category]=corr; } corr_itr = scales_not_defined.find(category); - // std::cout << "[ERROR] Category not found: " << std::endl; - // std::cout << category << std::endl; + std::cout << "[ERROR] Category not found: " << std::endl; + std::cout << category << std::endl; // exit(1); } @@ -357,13 +357,14 @@ float EnergyScaleCorrection_class::getSmearing(int runNumber, float energy, bool } -TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, +TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, + bool fastLoop, TString energyEleBranchName, TString runNumberBranchName, TString R9EleBranchName, TString etaEleBranchName, TString etaSCEleBranchName - + ){ Int_t runNumber_; Float_t energyEle_[2]; @@ -372,9 +373,11 @@ TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, Float_t R9Ele_[2]; Float_t smearEle_[2]; + Float_t smearSigmaEle_[2]; TTree *newTree = new TTree("smearEle_",""); //+correctionType,correctionType); newTree->Branch("smearEle", smearEle_, "smearEle[2]/F"); + newTree->Branch("smearSigmaEle", smearSigmaEle_, "smearSigmaEle[2]/F"); if(tree==NULL){ std::cerr << "[ERROR] original chain in GetSmearTree is NULL" << std::endl; @@ -402,10 +405,15 @@ TTree *EnergyScaleCorrection_class::GetSmearTree(TChain *tree, bool fastLoop, Long64_t nentries = tree->GetEntries(); for(Long64_t ientry = 0; ientryGetEntriesFast(); ientry++){ tree->GetEntry(ientry); + smearSigmaEle_[0] = getSmearingSigma(runNumber_, energyEle_[0], fabs(etaSCEle_[0]) < 1.4442, + R9Ele_[0],etaEle_[0]); + smearSigmaEle_[1] = getSmearingSigma(runNumber_, energyEle_[1], fabs(etaSCEle_[1]) < 1.4442, + R9Ele_[1],etaEle_[1]); smearEle_[0] = getSmearing(runNumber_, energyEle_[0], fabs(etaSCEle_[0]) < 1.4442, R9Ele_[0],etaEle_[0]); smearEle_[1] = getSmearing(runNumber_, energyEle_[1], fabs(etaSCEle_[1]) < 1.4442, R9Ele_[1],etaEle_[1]); + newTree->Fill(); if(ientry%(nentries/100)==0) std::cerr << "\b\b\b\b" << std::setw(2) << ientry/(nentries/100) << "%]"; @@ -495,9 +503,9 @@ correctionCategory_class::correctionCategory_class(TString category_){ p1 = category.find("absEta_"); p2 = p1+1; if(category.find("absEta_0_1")!=std::string::npos){ etamin=0; etamax=1;} - else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.4442; } - else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.566; etamax=2;} - else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=2.5;} + else if(category.find("absEta_1_1.4442")!=std::string::npos){ etamin=1; etamax=1.479;} //etamax=1.4442; } + else if(category.find("absEta_1.566_2")!=std::string::npos){ etamin=1.479; etamax=2;} //etamin=1.566; etamax=2;} + else if(category.find("absEta_2_2.5")!=std::string::npos){ etamin=2; etamax=3;} else{ if(p1!=std::string::npos){ p1 = category.find("_",p1); diff --git a/ZFitter/src/RooSmearer.cc b/ZFitter/src/RooSmearer.cc index 16cdb11bfda..1be6fb65ec7 100644 --- a/ZFitter/src/RooSmearer.cc +++ b/ZFitter/src/RooSmearer.cc @@ -33,7 +33,7 @@ RooSmearer::RooSmearer(const char *name, ///< name of the variable _paramSet("paramSet","Set of parameters",this), invMass_min_(80), invMass_max_(100), invMass_bin_(0.25), deltaNLLMaxSmearToy(330), - _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(2000), _nSmearToy(20), + _deactive_minEventsDiag(1000), _deactive_minEventsOffDiag(1500), _nSmearToy(20), nllBase(0), nllVar("nll","",0,1e20), _isDataSmeared(false), @@ -199,12 +199,13 @@ void RooSmearer::InitCategories(bool mcToy){ cat.smearHist_data=new TH1F(histoName+"smeardata", histoName+"smeardata", cat.nBins, cat.invMass_min, cat.invMass_max); cat.smearHist_data->Sumw2(); SetHisto(*(cat.mc_events), cat.hist_mc); + SetHisto(*(cat.data_events), cat.hist_data); //------------------------------ deactivating category cat.active=true; unsigned int deactiveMinEvents = 1000; //_deactive_minEventsDiag; if(cat.categoryIndex1 != cat.categoryIndex2) // not diagonal category - deactiveMinEvents=2000; //_deactive_minEventsOffDiag; + deactiveMinEvents=1500; //_deactive_minEventsOffDiag; if(cat.hist_mc->Integral() < deactiveMinEvents){ std::cout << "[INFO] Category: " << ZeeCategories.size() << ": " << cat.categoryName1 << "\t" << cat.categoryName2 @@ -229,8 +230,6 @@ void RooSmearer::InitCategories(bool mcToy){ if (_autoBin){ //SetAutoBin(cat,cat.invMass_min-20,cat.invMass_max+20); AutoNBins(cat); - SetHisto(*(cat.mc_events), cat.hist_mc); - SetHisto(*(cat.data_events), cat.hist_data); } cat.nSmearToy=_nSmearToy; if(smearscan || (cat.active && _autoNsmear)) AutoNSmear(cat); @@ -290,6 +289,7 @@ TH1F *RooSmearer::GetSmearedHisto(ZeeCategory& category, bool isMC, if(smearEnergy==true && isMC==false && (*h)->GetEntries() != 0) return *h; zee_events_t *cache = (isMC) ? category.mc_events : category.data_events; + if(cache->size()==0) return *h; if(smearEnergy){ @@ -333,6 +333,7 @@ void RooSmearer::SetHisto(const zee_events_t& cache, TH1F *hist) const{ #ifdef DEBUG hist->Print(); #endif + hist->Reset(); for(zee_events_t::const_iterator event_itr = cache.begin(); event_itr!= cache.end(); event_itr++){ @@ -403,6 +404,11 @@ void RooSmearer::SetSmearedHisto(const zee_events_t& cache, } } hist->Scale(1./nSmearToy); +// if(hist->GetEntries()Integral()){ +// hist->Print(); +// std::cout << hist->GetName() << "\t" << hist->GetEntries() << "\t" << hist->Integral() << "\t" << cache.size() << std::endl; +// } + // hist->Scale(1./hist->Integral()); // now saved as pdf #ifdef CPU_DEBUG @@ -428,6 +434,11 @@ double RooSmearer::smearedEnergy(double *smear, unsigned int nGen, float ene,flo // float sigma = sqrt(alpha/sqrt(ene)*alpha/sqrt(ene) + constant * constant + sigmaMB*sigmaMB); float sigma = sqrt(alpha*alpha/ene + constant * constant ); + if(sigma==0){ + for(unsigned int i=0; iGaus(scale,sigma); } #endif + } return smear[0]; } @@ -696,6 +708,9 @@ void RooSmearer::AutoNBins(ZeeCategory& category){ ResetBinning(category); } + SetHisto(*(category.mc_events), category.hist_mc); + SetHisto(*(category.data_events), category.hist_data); + return; //------------------------------ rescale mc histograms @@ -737,7 +752,7 @@ void RooSmearer::AutoNSmear(ZeeCategory& category){ if(!category.active) return; - AutoNBins(category); + //AutoNBins(category); return; // category.nSmearToy=std::max(NSMEARTOYLIM*2,200); //Long64_t catSize=category.mc_events->size(); @@ -1055,13 +1070,27 @@ void RooSmearer::UpdateCategoryNLL(ZeeCategory& cat, unsigned int nLLtoy, bool m } void RooSmearer::DumpNLL(void) const{ + std::cout << "[DUMP NLL] " << "Cat1\tCat2\tNLL\tNevt mc\tNevt data\tisActive\tNevt mc\tNevt data" << std::endl; + for(std::vector::const_iterator cat_itr = ZeeCategories.begin(); cat_itr != ZeeCategories.end(); cat_itr++){ if(!cat_itr->active) - std::cout << "[DUMP NLL] " << std::setprecision(10) << cat_itr->categoryIndex1 << " " << cat_itr->categoryIndex2 << "\t" << cat_itr->nll << "\t" << cat_itr->mc_events->size() << "\t" << cat_itr->data_events->size() << "\t1" << std::endl; + std::cout << "[DUMP NLL] " << std::setprecision(10) + << cat_itr->categoryIndex1 << " " << cat_itr->categoryIndex2 + << "\t" << cat_itr->nll + << "\t" << cat_itr->mc_events->size() << "\t" << cat_itr->data_events->size() + << "\t1" + << "\t" << cat_itr->hist_mc->Integral() << "\t" << cat_itr->hist_data->Integral() + << std::endl; else - std::cout << "[DUMP NLL] " << std::setprecision(10) << cat_itr->categoryIndex1 << " " << cat_itr->categoryIndex2 << "\t" << cat_itr->nll << "\t" << cat_itr->mc_events->size() << "\t" << cat_itr->data_events->size() << "\t0" << std::endl; + std::cout << "[DUMP NLL] " << std::setprecision(10) + << cat_itr->categoryIndex1 << " " << cat_itr->categoryIndex2 + << "\t" << cat_itr->nll + << "\t" << cat_itr->mc_events->size() << "\t" << cat_itr->data_events->size() << "\t0" + << "\t" << cat_itr->hist_mc->Integral() << "\t" << cat_itr->hist_data->Integral() + << std::endl; } return; } + diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 3b6ea44c35b..26fcdab5017 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -81,6 +81,8 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Float_t energyEle[2]; Float_t corrEle_[2]={1,1}; Float_t smearEle_[2]={1,1}; + bool hasSmearEle=false; + // for the angle calculation Float_t etaEle[2]; Float_t phiEle[2]; @@ -113,11 +115,13 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(chain->GetBranch("smearEle")!=NULL){ if(isToy==false || (externToy==true && isToy==true && isMC==false)){ std::cout << "[STATUS] Adding electron energy smearing branch from friend" << std::endl; - chain->SetBranchAddress("smearEle", smearEle_); + if(isMC) chain->SetBranchAddress("smearSigmaEle", smearEle_); + else chain->SetBranchAddress("smearEle", smearEle_); + hasSmearEle=true; } } - if(isMC && chain->GetBranch("pdfWeights_cteq66")!=NULL && _pdfWeightIndex>0){ + if(!isMC && chain->GetBranch("pdfWeights_cteq66")!=NULL && _pdfWeightIndex>0){ std::cout << "[STATUS] Adding pdfWeight_ctec66 branch from friend" << std::endl; chain->SetBranchAddress("pdfWeights_cteq66", &pdfWeights); } @@ -272,6 +276,11 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS float t1q = t1*t1; float t2q = t2*t2; + if(isMC && hasSmearEle){ + smearEle_[0]=gen.Gaus(1,smearEle_[0]); + smearEle_[1]=gen.Gaus(1,smearEle_[1]); + } + //------------------------------ if(_swap){ event.energy_ele2 = energyEle[0] * corrEle_[0] * smearEle_[0]; @@ -294,18 +303,18 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } } // to calculate the invMass: invMass = sqrt(2 * energy_ele1 * energy_ele2 * angle_eta_ele1_ele2) - if(event.invMass < 70 || event.invMass > 110) continue; + //if(event.invMass < 70 || event.invMass > 110) continue; event.weight = 1.; if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; - if(isMC && _pdfWeightIndex>0 && pdfWeights!=NULL){ + if(!isMC && _pdfWeightIndex>0 && pdfWeights!=NULL){ if(((unsigned int)_pdfWeightIndex) > pdfWeights->size()) continue; event.weight *= ((*pdfWeights)[0]<=0 || (*pdfWeights)[0]!=(*pdfWeights)[0] || (*pdfWeights)[_pdfWeightIndex]!=(*pdfWeights)[_pdfWeightIndex])? 0 : (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0]; #ifdef DEBUG - if(jentry<10 || event.weight!=event.weight){ + if(jentry<10 || event.weight!=event.weight || event.weight>1.3){ std::cout << "jentry = " << jentry << "\tevent.weight = " << event.weight << "\t" << (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0] << "\t" << (*pdfWeights)[_pdfWeightIndex] << "\t" << (*pdfWeights)[0] @@ -329,6 +338,16 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } // else event.weight=1; } } +#ifdef DEBUG + if(jentry<10 || event.weight!=event.weight || event.weight>2){ + std::cout << "jentry = " << jentry + << "\tevent.weight = " << event.weight + << "\t" << weight << "\t" << mcGenWeight + << "\t" << r9weight[0] << " " << r9weight[1] + << "\t" << ptweight[0] << " " << ptweight[1] + << std::endl; + } +#endif if(event.weight<=0 || event.weight!=event.weight) continue; From dbea56ea6b27cdc049714f0bb9273d0cf1f6025a Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:54:09 +0100 Subject: [PATCH 338/475] onlyScale option added --- ZFitter/bin/ZFitter.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index e8eb5d52b58..f08cb6879ed 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -311,6 +311,7 @@ int main(int argc, char **argv) { ("numIter", po::value(&nIter)->default_value(300), "number of MCMC steps") ("nEventsMinDiag", po::value(&nEventsMinDiag)->default_value(1000), "min num events in diagonal categories") ("nEventsMinOffDiag", po::value(&nEventsMinOffDiag)->default_value(2000), "min num events in off-diagonal categories") + ("onlyScale", "fix the smearing to constant") ("constTermFix", "constTerm not depending on Et") ("alphaGoldFix", "alphaTerm for gold electrons fixed to the low eta region") ("smearingEt", "alpha term depend on sqrt(Et) and not on sqrt(E)") @@ -896,8 +897,8 @@ int main(int argc, char **argv) { RooAbsReal *const_term_=NULL; RooRealVar *const_term_v = args.getSize() ==0 ? NULL : (RooRealVar *) args.find("constTerm_"+varName); if(const_term_v==NULL){ - if(vm.count("constTermFix")==0) const_term_v = new RooRealVar("constTerm_"+*region_itr, "constTerm_"+varName,0.01, 0.000,0.05); - else const_term_v = new RooRealVar("constTerm_"+varName, "constTerm_"+varName,0.01, 0.000,0.02); + if(vm.count("constTermFix")==0) const_term_v = new RooRealVar("constTerm_"+*region_itr, "constTerm_"+varName,0.00, 0.000,0.05); + else const_term_v = new RooRealVar("constTerm_"+varName, "constTerm_"+varName,0.00, 0.000,0.02); const_term_v->setError(0.03); // 1% //const_term_v->setConstant(true); args.add(*const_term_v); @@ -936,6 +937,17 @@ int main(int argc, char **argv) { args_vec.push_back(RooArgSet(*scale_, *alpha_, *const_term_)); } + if(vm.count("onlyScale")){ + TIterator *it1=NULL; + it1 = args.createIterator(); + for(RooRealVar *var = (RooRealVar *) it1->Next(); var!=NULL; + var = (RooRealVar *) it1->Next()){ + TString name(var->GetName()); + if(name.Contains("scale")) continue; + var->setConstant(true); + } + } + args.sort(kFALSE); if(vm.count("smearerFit")){ std::cout << "------------------------------ smearer parameters" << std::endl; @@ -1044,7 +1056,10 @@ int main(int argc, char **argv) { else smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy")); std::cout << "[DEBUG] " << constTermToy << std::endl; } else{ - if(vm.count("initFile")) args.readFromFile(initFileName.c_str()); + if(vm.count("initFile")){ + std::cout << "[INFO] Reading init file: " << initFileName << std::endl; + args.readFromFile(initFileName.c_str()); + } args.writeToStream(std::cout, kFALSE); smearer.Init(commonCut.c_str(), eleID); } From 9adfe76861c1335b96a0756ffe3432f0abad75b6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 25 Feb 2014 15:55:52 +0100 Subject: [PATCH 339/475] more checks on pdfWeights --- ZNtupleDumper/src/ZNtupleDumper.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 46f68a8323c..7020cf59854 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -1465,8 +1465,11 @@ void ZNtupleDumper::InitPdfSystTree(void){ // tree = new TTree("selected",fChain->GetTitle()); std::cout << "[STATUS] InitPdfSystTree" << std::endl; - if(pdfSystTree==NULL) return; - + if(pdfSystTree==NULL){ + std::cerr << "[ERROR] pdfSystTree==NULL" << std::endl; + exit(1); + return; + } // pdfSystTree->Branch("runNumber", &runNumber, "runNumber/I"); // pdfSystTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); // pdfSystTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); @@ -1477,9 +1480,9 @@ void ZNtupleDumper::InitPdfSystTree(void){ pdfWeightTAGS_itr != pdfWeightTAGS.end(); pdfWeightTAGS_itr++){ int i = pdfWeightTAGS_itr - pdfWeightTAGS.begin(); - //std::string tagName = pdfWeightTAGS_itr->instance(); + std::string tagName = pdfWeightTAGS_itr->instance(); //tagName.replace(0,pdfWeightTAGS_itr->label().size()); - //std::cout << i << "\t" << tagName << "\t" << pdfWeightTAGS_itr->label() << "\t" << pdfWeightTAGS_itr->encode() << std::endl; + std::cout << i << "\t" << tagName << "\t" << pdfWeightTAGS_itr->label() << "\t" << pdfWeightTAGS_itr->encode() << std::endl; //pdfSystTree->Branch(pdfWeightTAGS_itr->encode().c_str(), &(pdfSystWeightNum[i]), "pdfSystWeightNum/I"); pdfSystTree->Branch((pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()).c_str(), &(pdfSystWeight[i])); } From ed7f45f850a1d73afe9037e038f5c1ece98ee578 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 26 Feb 2014 10:13:40 +0100 Subject: [PATCH 340/475] updated documentation --- ZFitter/bin/ZFitter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index f08cb6879ed..4eda87e24c0 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -54,6 +54,7 @@ using namespace RooStats; \todo - remove commonCut from category name and add it in the ZFit_class in order to not repeate the cut - make alpha fitting more generic (look for alphaName) + - Implement the iterative Et dependent scale corrections */ typedef std::map< TString, TChain* > chain_map_t; From f61d387edd9a2a1b5e9e103fa2154f79810451da Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 4 Mar 2014 10:50:39 +0100 Subject: [PATCH 341/475] new page with requirements --- ALCARAW_RECO/doc/requirements.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ALCARAW_RECO/doc/requirements.txt diff --git a/ALCARAW_RECO/doc/requirements.txt b/ALCARAW_RECO/doc/requirements.txt new file mode 100644 index 00000000000..ebfba7bb4d0 --- /dev/null +++ b/ALCARAW_RECO/doc/requirements.txt @@ -0,0 +1,13 @@ +/** + * \page preReq Requirements before start + - get a grid certificate: + GRID & CRAB setup +- have access to the eos ecal group space (asked to DPG convener to ask to ALCA convener) +- have a git account +- May be some instructions to test first every thing locally before using caf or +lsf-mistakes are easy for bigginners...and then when you run a second time you get +crash messages telling you there are existing files everywhere and no clue on how +to get rid of : +I found some in filelist directory and some lines in the *_datasets.dat files + +*/ From b485654351b7465feee20990ac907c9625a7eda1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 27 Feb 2014 16:06:42 +0100 Subject: [PATCH 342/475] updated documentation --- ALCARAW_RECO/doc/rereco.txt | 6 +++--- ALCARAW_RECO/python/alcaSkimming.py | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt index d6e86b2b8e1..5a192f9ec0f 100644 --- a/ALCARAW_RECO/doc/rereco.txt +++ b/ALCARAW_RECO/doc/rereco.txt @@ -1,12 +1,12 @@ /** * \page page5 Instructions for ECAL validator (rereco + ntuple production) -* \verbatim -#============================== RERECO +* +\section RERECO RERECO The ReReco and the ntuple production can be run with the script ALCARAW_RECO/scripts/RerecoQuick.sh from the directory ALCARAW_RECO - +\verbatim ####### Input files 1. ALCARAW_RECO/config/reRecoTags/tag_name.py: is the file where the GT and the list of tags diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index db5db27f3b3..e1b7f518da5 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -9,6 +9,7 @@ #sys.path(".") +electronCollection=cms.InputTag("gsfElectrons") ############################################################ ### SETUP OPTIONS options = VarParsing.VarParsing('standard') @@ -302,7 +303,7 @@ process.pfIsoEgamma = cms.Sequence() if((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso - process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') + process.eleIsoSequence = setupPFElectronIso(process, electronCollection.label, 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): # getting the ptrs @@ -348,7 +349,7 @@ #process.filterSeq *= process.ZeeFilterSeq #process.filterSeq *= process.WenuFilterSeq process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", - src = cms.InputTag("gsfElectrons"), + src = electronCollection, minNumber = cms.uint32(1) ) if(options.skim=="" or options.skim=="none" or options.skim=="no"): @@ -717,8 +718,19 @@ +####################################### +# Redefine the electron collection +process.alcaElectronTracksReducer.electronLabel = electronCollection +process.PassingHLT.InputProducer = electronCollection +process.selectedElectrons.src = electronCollection +process.alCaIsolatedElectrons.electronLabel = electronCollection + + ############################ ## Dump the output Python ## ############################ processDumpFile = open('processDump.py', 'w') print >> processDumpFile, process.dumpPython() + + + From 294aa21048dfa579a2d2abf18e2f097a9c7b41e4 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 4 Mar 2014 11:29:03 +0100 Subject: [PATCH 343/475] reverted --- ALCARAW_RECO/python/alcaSkimming.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index e1b7f518da5..db5db27f3b3 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -9,7 +9,6 @@ #sys.path(".") -electronCollection=cms.InputTag("gsfElectrons") ############################################################ ### SETUP OPTIONS options = VarParsing.VarParsing('standard') @@ -303,7 +302,7 @@ process.pfIsoEgamma = cms.Sequence() if((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso - process.eleIsoSequence = setupPFElectronIso(process, electronCollection.label, 'PFIso') + process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): # getting the ptrs @@ -349,7 +348,7 @@ #process.filterSeq *= process.ZeeFilterSeq #process.filterSeq *= process.WenuFilterSeq process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", - src = electronCollection, + src = cms.InputTag("gsfElectrons"), minNumber = cms.uint32(1) ) if(options.skim=="" or options.skim=="none" or options.skim=="no"): @@ -718,19 +717,8 @@ -####################################### -# Redefine the electron collection -process.alcaElectronTracksReducer.electronLabel = electronCollection -process.PassingHLT.InputProducer = electronCollection -process.selectedElectrons.src = electronCollection -process.alCaIsolatedElectrons.electronLabel = electronCollection - - ############################ ## Dump the output Python ## ############################ processDumpFile = open('processDump.py', 'w') print >> processDumpFile, process.dumpPython() - - - From fe64d3657f6bdb464de3e48a7d15cd7980f04209 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 4 Mar 2014 10:49:33 +0100 Subject: [PATCH 344/475] updating documentation --- ALCARAW_RECO/doc/rereco.txt | 84 ++++++++++++++++++++++++------------- README | 2 + ZFitter/doc/README | 2 +- ZFitter/doc/configFiles.txt | 3 ++ 4 files changed, 60 insertions(+), 31 deletions(-) diff --git a/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt index 5a192f9ec0f..7b1d8d774e4 100644 --- a/ALCARAW_RECO/doc/rereco.txt +++ b/ALCARAW_RECO/doc/rereco.txt @@ -6,81 +6,107 @@ The ReReco and the ntuple production can be run with the script ALCARAW_RECO/scripts/RerecoQuick.sh from the directory ALCARAW_RECO -\verbatim -####### Input files -1. ALCARAW_RECO/config/reRecoTags/tag_name.py: - is the file where the GT and the list of tags - to be used for the rereco and the ntuple production - have to be specified. - "tag_name" is the name that will be automatically - assigned to all the directories created for the rereco - and the ntuples (the crab directory in - ALCARAW_RECO/prod_alcarereco - and the directories in eos with the reco files and the ntuples) -2. alcaraw_datasets.dat is the file with the list of the available alcaraw files - - -####### Output files -1. alcarereco_datasets.dat is the file with the list of all the +\subsection RERECO_inputFiles Input files + 1. ALCARAW_RECO/config/reRecoTags/tag_name.py: + is the file where the GT and the list of tags + to be used for the rereco and the ntuple production + have to be specified. + "tag_name" is the name that will be automatically + assigned to all the directories created for the rereco + and the ntuples (the crab directory in + ALCARAW_RECO/prod_alcarereco + and the directories in eos with the reco files and the ntuples) + + 2. alcaraw_datasets.dat is the file with the list of the available alcaraw files + +\subsection RERECO_outputFiles Output files + 1. alcarereco_datasets.dat is the file with the list of all the rerecos already done -2. ntuple_datasets.dat is the file with the list of all the ntuples + + 2. ntuple_datasets.dat is the file with the list of all the ntuples already produced These two files are updated automatically with a line that summarizes all the relevant information about the rereco/ntuples (run range, dataset name, alcaraw name, storage_element, user_remote_dir_base, tag_name and, for ntuples, if they are produced from alcareco or alcarecosim and ...) when the script RerecoQuick.sh is launched -3. The rereco files produced are stored in + + 3. The rereco files produced are stored in /eos/cms/store/group/alca_ecalcalib/ecalelf/alcarereco/8TeV/tag_name -4. The final merged ntuple is stored in: - /eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARERECO/tag_name/ + 4. The final merged ntuple is stored in: + /eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARERECO/tag_name/ -Instructions: +\subsection RERECO_instructions Instructions 1. create the tag_name.py in ALCARAW_RECO/config/reRecoTags directory Se more detailes below, in section "TAG FILE" 2. commit the file in GITHUB: +\code git add config/reRecoTags/tag_name.py git commit -m "...." config/reRecoTags/tag_name.py +\endcode 3. Add the period on which the ReReco has to be run in alcaraw_datasets.dat, if not already defined (e.g. RUN2012AB) 4. Run the script RerecoQuick.sh +\code ./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion} +\endcode where: - config/reRecoTags/tag_name.py is the configuration file defined in step1 - jsonFile.txt is the version of the json file to be used - json_name is the name that ECALELF gives to the json file used for the ntuple production. -For example: -./scripts/RerecoQuick.sh -p RUN2012ABCD -t config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo_b.py --json=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt --json_name=190456-208686_22JanReReco_v1 --tutorial +- if you run this the system with ask you your PEM passphrase, which corresponds to +the grid passphrase +- if you don't have caf privilege add the option --scheduler=lsf at the end of +the command + +Not yet tested!!! + +For example: +\code +./scripts/RerecoQuick.sh -p RUN2012ABCD -t config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo_b.py --json=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt --json_name=190456-208686_22JanReReco_v1 --tutorial +\endcode The files alcarereco_datasets.dat and ntuple_datasets.dat ae updated when this script is launched 5. check the exit status of the jobs: +\code ./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion} --check +\endcode This command will loop over all folders corresponding to the different datasets and check if jobs are exited with status 0 If jobs are finished, it merge all the produced ntuples and copy them to the right directory on EOS -6. if all fine, commit the alcarereco_datasets.dat and ntuple_datasets.dat files -git pull +6. if all went fine, commit the alcarereco_datasets.dat and ntuple_datasets.dat files +\code +git pull --no-commit +\endcode +this will try to merge your local repository with the central one. If there are no conflicts you just need to commit the changes, otherwise you should go throu the files in conflict, resolve them by hand and do +\code git add file.cc \endcode +to say that the confict on the file.cpp has been solved and now is staged for commit + +And then you must: +\code git commit -m "rereco tag_name done" alcarereco_datasets.dat ntuple_datasets.dat +\endcode -##### Script options: +\subsection RERECO_scriptOptions Script options --singleEle : to rereco also single electron datasets -#============================== TAG FILES +\section TAGFILES TAG FILES To run the Rereco with a new set of conditions it is necessary to have a configuration file with the tags. An example of a configuration file can be found in Calibration/ALCARAW_RECO/config/reRecoTags/test.py Here an example: +\code ############################################################## import FWCore.ParameterSet.Config as cms from CondCore.DBCommon.CondDBSetup_cfi import * @@ -115,12 +141,10 @@ RerecoGlobalTag = cms.ESSource("PoolDBESSource", ) ############################################################# - +\endcode The convention is to name these configuration files in this way: tag_name.py So, for the rereco production follow the steps below: - -\endverbatim */ diff --git a/README b/README index bd26215fd42..bd39bbd582f 100644 --- a/README +++ b/README @@ -1,5 +1,7 @@ /** * \mainpage +* \ref preReq +* * \ref page1 * * Download instructions diff --git a/ZFitter/doc/README b/ZFitter/doc/README index 5692630c53d..edef34ad88a 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -205,7 +205,7 @@ the makeValidationSlides.sh script, create in the tmp directory the following fi [STATUS] Creating validation stability slides: tmp/validation-invMass_SC-WP80_PU-stability_slide.tex that can be imported in your beamer slide base presentation The command is: -./script/makeValidationSlides.sh --dirData test/data/monitoring_2012_53X --dirMC test/MC/DYJets-Summer12-START53-ZSkim-allRange/190456-203002-13Jul_PromptTS --selection WP80_PU --invMass_var invMass_SC --type validation +./script/makeValidationSlides.sh --dirData test/dato/monitoring_2012_53X --dirMC test/MC/DYJets-Summer12-START53-ZSkim-allRange/190456-203002-13Jul_PromptTS --selection WP80_PU --invMass_var invMass_SC --type validation ###SMEAR diff --git a/ZFitter/doc/configFiles.txt b/ZFitter/doc/configFiles.txt index 9d292dc0604..0a7a27a3d68 100644 --- a/ZFitter/doc/configFiles.txt +++ b/ZFitter/doc/configFiles.txt @@ -1,6 +1,9 @@ /** * \page ZFitterConfigFiles Config files syntax and generation +In order to work with ECALELF ntuples you should move to the Calibration/ZFitter directory. +Now on the paths are relative to the Calibration/ZFitter directory. + There are three important directories where the proper .dat files should be put: - data/validation/
For the validation of rerecoes, the .dat files has to be put in a subdirectory of data/validation: From 325925cec46b4ecca675c138a4989486e2e60b94 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 7 Mar 2014 11:45:20 +0100 Subject: [PATCH 345/475] updated energy class for CB smearing --- .../interface/EnergyScaleCorrection_class.h | 26 ++++ ZFitter/src/EnergyScaleCorrection_class.cc | 118 ++++++++++++++---- 2 files changed, 119 insertions(+), 25 deletions(-) diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index 45fd6070d53..5db7783af54 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -8,6 +8,8 @@ #include #include #include +#include +#include class correctionValue_class{ public: @@ -110,6 +112,8 @@ class EnergyScaleCorrection_class{ //============================== smearings private: + int smearingType_; + TRandom3 *rgen_; correction_map_t scales, scales_not_defined; correction_map_t smearings, smearings_not_defined; @@ -118,6 +122,10 @@ class EnergyScaleCorrection_class{ double constTerm, double err_constTerm, double alpha, double err_alpha, double Emean, double err_Emean); float getSmearingSigma(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); public: + inline void SetSmearingType(int value){if(value>=0 && value<=1){smearingType_=value;}else{smearingType_=0;}}; + inline void SetSmearingCBAlpha(double value){cut.setVal(value);}; + inline void SetSmearingCBPower(double value){power.setVal(value);}; + float getSmearing(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); float getSmearingRho(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); ///< public for sigmaE estimate @@ -131,6 +139,24 @@ class EnergyScaleCorrection_class{ TString etaSCEleBranchName="etaSCEle" ); + //---------- CB parameters + RooRealVar deltaM; + RooRealVar sigma; + RooRealVar cut; + RooRealVar power; + RooRealVar x; + //--------------- BW parameters + //RooRealVar mRes; + //RooRealVar Gamma; + + // RooRealVar& invMass_ref; + //RooBreitWigner bw_pdf; + RooCBShape resCB; + RooDataSet *data; + int index_data; + // convolution + //RooFFTConvPdf conv_pdf; + }; diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 4c4811a1f01..9cb262a795d 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -1,17 +1,29 @@ #include "../interface/EnergyScaleCorrection_class.h" -//#define DEBUG +#include +#include + +#define NGENMAX 10000 // for exit(0) #include // for setw #include +//for istreamstring +#include //#define DEBUG EnergyScaleCorrection_class::EnergyScaleCorrection_class(TString correctionFileName, TString smearingFileName): noCorrections(true), noSmearings(true), - rgen_(NULL) + smearingType_(0), + rgen_(NULL), + deltaM("\\Delta m", "Bias", 0, -35, 10, "GeV/c^{2}"), + sigma( "\\sigma_{CB}","Width", 2.14, 0., 10.0, "GeV/c^{2}"), + cut( "\\alpha", "Cut", 1.424, 0.01, 5.0), + power( "\\gamma", "Power", 1.86, 0.5, 100.0), + x("x","",0,-50,100,"GeV/c^{2}"), + resCB("resCB", "A Crystal Ball Lineshape", x, deltaM, sigma, cut, power) { if(smearingFileName.Sizeof()>1) noSmearings=false; else noSmearings=true; @@ -68,7 +80,7 @@ float EnergyScaleCorrection_class::getScaleOffset(int runNumber, bool isEBEle, d std::cout << "[DEBUG] Checking correction for category: " << category << std::endl; std::cout << "[DEBUG] Correction is: " << corr_itr->second << std::endl - << " given for category " << corr_itr->first; + << " given for category " << corr_itr->first << std::endl;; #endif return corr_itr->second.scale; @@ -229,7 +241,7 @@ void EnergyScaleCorrection_class::AddSmearing(TString category_, int runMin_, in corr.Emean_err = err_Emean; smearings[cat]=corr; - std::cout << "[INFO:smearings ] " << cat << corr << std::endl; + std::cout << "[INFO:smearings] " << cat << corr << std::endl; #ifdef DEBUG std::cout << corr << std::endl; #endif @@ -238,9 +250,6 @@ void EnergyScaleCorrection_class::AddSmearing(TString category_, int runMin_, in /** * File structure: - * category "runNumber" runMin runMax deltaP err_deltaP - * - * EBlowEtaBad8TeV 0 0.0 1.0 -999. 0.94 -999999 999999 6.73 0. 7.7e-3 6.32e-4 0.00 0.16 EBlowEtaGold8TeV 0 0.0 1.0 0.94 999. -999999 999999 6.60 0. 7.4e-3 6.50e-4 0.00 0.16 EBhighEtaBad8TeV 0 1.0 1.5 -999. 0.94 -999999 999999 6.73 0. 1.26e-2 1.03e-3 0.00 0.07 @@ -269,34 +278,73 @@ void EnergyScaleCorrection_class::ReadSmearingFromFile(TString filename){ double rho, phi, Emean, constTerm, alpha, err_rho, err_phi, err_Emean, err_alpha=0., err_constTerm=0.; double etaMin, etaMax, r9Min, r9Max; - for(f_in >> category; f_in.good(); f_in >> category){ - if(category.BeginsWith("#")){ // ignore comments + int format=0; ///< 0=unknown; 1=globe; 2=ECALELF toy + while(f_in.peek()!=EOF && f_in.good()){ + if(f_in.peek()==10){ // 10 = \n + f_in.get(); + continue; + } + + if(f_in.peek() == 35){ // 35 = # f_in.ignore(1000,10); // ignore the rest of the line until \n continue; - } + } - f_in >> unused >> etaMin >> etaMax >> r9Min >> r9Max >> runMin >> runMax >> - Emean >> err_Emean >> - rho >> err_rho >> phi >> err_phi; + if(format==0){ + std::string line; + std::getline(f_in, line); + std::istringstream s_in(line); + s_in >> category >> unused >> etaMin >> etaMax + >> r9Min >> r9Max >> runMin >> runMax + >> Emean >> err_Emean + >> rho >> err_rho >> phi >> err_phi; + if(s_in.eof()){ // this is not the globe format but the ECALELF format + std::cout << "[INFO] format=2" << std::endl; + format=2; + s_in >> category >> constTerm >> alpha; + AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha, Emean, err_Emean); + }else{ + format=1; + std::cout << "[INFO] format=1" << std::endl; + if(Emean!=0){ + constTerm=rho*sin(phi); + alpha=rho*Emean*cos(phi); + }else{ + alpha=0; + constTerm=rho; + } + + AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha, Emean, err_Emean); + + } + }else if(format==1){ + f_in >> category >> unused >> etaMin >> etaMax >> r9Min >> r9Max >> runMin >> runMax >> + Emean >> err_Emean >> + rho >> err_rho >> phi >> err_phi; + if(Emean!=0){ + constTerm=rho*sin(phi); + alpha=rho*Emean*cos(phi); + }else{ + alpha=0; + constTerm=rho; + } + + AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha, Emean, err_Emean); + + }else{ + f_in >> category >> constTerm >> alpha; + AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha, Emean, err_Emean); + } #ifdef DEBUG std::cout << category << "\t" << etaMin << "\t" << etaMax << "\t" << r9Min << "\t" << r9Max << "\t" << runMin << "\t" << runMax << "\tEmean=" << Emean << "\t" << rho << "\t" << phi << std::endl; #endif - if(Emean!=0){ - constTerm=rho*sin(phi); - alpha=rho*Emean*cos(phi); - }else{ - alpha=0; - constTerm=rho; - } - - AddSmearing(category, runMin, runMax, constTerm, err_constTerm, alpha, err_alpha, Emean, err_Emean); } f_in.close(); // runCorrection_itr=runMin_map.begin(); noSmearings=false; - + return; } @@ -351,9 +399,29 @@ float EnergyScaleCorrection_class::getSmearingRho(int runNumber, float energy, b } float EnergyScaleCorrection_class::getSmearing(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle){ - + if(noSmearings) return 1; - return rgen_->Gaus(1,getSmearingSigma(runNumber, energy, isEBEle, R9Ele, etaSCEle)); + float smear =getSmearingSigma(runNumber, energy, isEBEle, R9Ele, etaSCEle); + + if(smear==0) return 0; + if( smear!=smear) exit(1); + if(smearingType_==1){ + if(sigma.getVal()!=smear){ + sigma.setVal(smear); + index_data=NGENMAX; //force to produce new random values + } + + if(index_data>=NGENMAX-1){ + if(data!=NULL) delete data; + data=resCB.generate(x,NGENMAX); + index_data=-1; + } + index_data++; + return 1+data->get(index_data)->getRealValue("x"); + + + }else return rgen_->Gaus(1,getSmearingSigma(runNumber, energy, isEBEle, R9Ele, etaSCEle)); + } From 1495fcd5f70e2892b7dedc5c896aba28301faf81 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:13:36 +0100 Subject: [PATCH 346/475] new bkg and particle gun samples --- ALCARAW_RECO/alcareco_datasets.dat | 12 +++++++++- ALCARAW_RECO/ntuple_datasets.dat | 35 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 9843c85c1d8..640e21368ce 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -2,7 +2,14 @@ allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco allRange /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_S10_START53_V7C-v2/AODSIM DYJets_sherpa-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco -################### MC 53 RUN dependent +# +allRange /WToENu_TuneZ2star_8TeV_pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM Wenu-Summer12-START53-ZSkim-v1 caf group/alca_ecalcalib/ecalelf/alcareco +allRange /WToENu_TuneZ2star_8TeV_pythia6/Summer12_DR53X-PU_S10_START53_V7A-v2/AODSIM Wenu-Summer12-START53-ZSkim-v2 caf group/alca_ecalcalib/ecalelf/alcareco +allRange /QCD_Pt-30to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM QCD_Pt-30to40_doubleEM-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco +allRange /QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM QCD_Pt-40_doubleEM-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco +##### Particle gun +allRange /SingleElectronFlatPt10To300_pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM SingleElectronGun_Pt10to300-Summer12-START53 caf group/alca_ecalcalib/ecalelf/alcareco +################## MC 53 RUN dependent 194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco @@ -14,6 +21,9 @@ allRange /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_S10_S 194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco 206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +# +allRange /QCD_Pt-30to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM QCD_Pt-30to40_doubleEM-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +allRange /QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM QCD_Pt-40_doubleEM-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco ################### MC 7TeV 53X allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index b7a60330d92..12c8dd81863 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -209,3 +209,38 @@ allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START5 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO rereco_22Jan2013_shervin 190456-208686_22JanReReco_v1 +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22JanReReco_v1 +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22JanReReco_v1 +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22JanReReco_v1 +203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686_22JanReReco_v1 +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +allRange /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_S10_START53_V7C-v2/AODSIM DYJets_sherpa-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +####### +# range datasetpath datasetname storage_element storage_path type jsonName extraName +allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM - pdfWeights_GainSwitch_v4 +allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM - pdfWeights_GainSwitch_v4 +## +allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYJets-Summer12-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco - pdfWeights_GainSwitch_v4 +allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM - pdfWeights_GainSwitch_v4 +allRange /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_S10_START53_V7C-v2/AODSIM DYJets_sherpa-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +allRange /SingleElectronFlatPt10To300_pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM SingleElectronGun_Pt10to300-Summer12-START53 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM From c0441e4c56b0b11c12044a2bf9e517abae988793 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:14:49 +0100 Subject: [PATCH 347/475] fixes and Wenu skim ntuple production --- ALCARAW_RECO/python/alcaSkimming.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index db5db27f3b3..003d76e66fb 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -13,7 +13,7 @@ ### SETUP OPTIONS options = VarParsing.VarParsing('standard') options.register('isCrab', - '1', # default Value = true + 1, # default Value = true VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float "change files path in case of local test") @@ -90,8 +90,10 @@ doTreeOnly=False if(options.doTree>0 and options.doTreeOnly==1): + print "doTreeOnly" doTreeOnly=True + MC = False # please specify it if starting from AOD if(options.type == "ALCARAW"): processName = 'ALCASKIM' @@ -369,11 +371,14 @@ process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron', 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron' ] -process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCASKIM") +process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCARECO") if(ZSkim): process.NtupleFilterSeq= cms.Sequence(process.ZeeFilter) elif(WSkim): - process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter) + #cms.Sequence(~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter) + process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) + process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalWElectron', 'pathALCARECOEcalUncalWElectron' ] + process.zNtupleDumper.isWenu=cms.bool(True) elif(ZSCSkim): process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * process.ZSCFilterSeq) @@ -655,15 +660,15 @@ if(doTreeOnly): process.schedule = cms.Schedule(process.NtuplePath) else: - if(options.doTree=='0'): + if(options.doTree==0): process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step, process.NtuplePath + process.ALCARECOoutput_step ) # fix the output modules else: process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step + process.ALCARECOoutput_step, process.NtuplePath ) # fix the output modules @@ -671,7 +676,7 @@ # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -if(options.isCrab=='1'): +if(options.isCrab==1): pathPrefix="" else: pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' From 34c3dd247ec58c8ab97b8d73bafbafcdd32a8bcb Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:21:54 +0100 Subject: [PATCH 348/475] include prodFunctions in fileListDatasets and improve job check and resubmission script --- ALCARAW_RECO/scripts/filelistDatasets.sh | 26 +++--------------------- ALCARAW_RECO/scripts/prodAlcareco.sh | 1 + ALCARAW_RECO/scripts/prodFunctions.sh | 3 +++ ALCARAW_RECO/scripts/prodNtuples.sh | 3 ++- ALCARAW_RECO/scripts/resubmitCrab.sh | 18 ++++++++++++---- 5 files changed, 23 insertions(+), 28 deletions(-) diff --git a/ALCARAW_RECO/scripts/filelistDatasets.sh b/ALCARAW_RECO/scripts/filelistDatasets.sh index 1909cdb0261..fddf0175e9f 100755 --- a/ALCARAW_RECO/scripts/filelistDatasets.sh +++ b/ALCARAW_RECO/scripts/filelistDatasets.sh @@ -1,4 +1,6 @@ #!/bin/bash +source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh + usage(){ echo "`basename $0` parsed_option_line" echo " parsed_option_line: parseProdSandboxOptions.sh sandbox_datasets.dat" @@ -79,29 +81,7 @@ if [ -z "$USER_REMOTE_DIR_BASE" ];then exit 1 fi - -case $DATASETPATH in - *Run2012*) - echo "[INFO] Run on 2012 data: ENERGY=8TeV" - ENERGY=8TeV - ;; - *Run2011*) - ENERGY=7TeV - ;; - *Run2010*) - ENERGY=7TeV - ;; - *8TeV*) - ENERGY=8TeV - ;; - *7TeV*) - ENERGY=7TeV - ;; - *) - echo "[ERROR] Energy not defined for ${DATASETPATH}" >> /dev/stderr - exit 1 - ;; -esac +setEnergy $DATASETPATH if [ -n "$TAGFILE" ]; then diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index d5f42ab06f8..aedeea9776b 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -169,6 +169,7 @@ esac case $SKIM in ZSkim) ;; + none) EVENTS_PER_JOB=20000;; *) EVENTS_PER_JOB=20000 ;; diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index 0a29f9909c0..183bc764503 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -98,6 +98,9 @@ setEnergy(){ *RelValZEE_13*) ENERGY=13TeV ;; + *SingleElectronFlat*) + ENERGY=gun + ;; *) echo "[ERROR] Center of mass energy not determined for $1" >> /dev/stderr echo " Check implementation in prodFunctions.sh" >> /dev/stderr diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 997f9271e8b..1e0c22e748d 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -14,6 +14,7 @@ DOEXTRACALIBTREE=0 CREATE=y SUBMIT=y DOTREE=1 +PDFSYST=1 SKIM="" usage(){ @@ -322,7 +323,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=1 jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=${PDFSYST} jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} get_edm_output=1 output_file=${OUTFILES} diff --git a/ALCARAW_RECO/scripts/resubmitCrab.sh b/ALCARAW_RECO/scripts/resubmitCrab.sh index 98be72df487..b473f9ca034 100755 --- a/ALCARAW_RECO/scripts/resubmitCrab.sh +++ b/ALCARAW_RECO/scripts/resubmitCrab.sh @@ -33,6 +33,7 @@ fi if [ -e "$ui_working_dir/res/finished" ];then echo "[REPORT] Jobs successfully finished: $ui_working_dir" + echo exit 0 fi @@ -58,8 +59,8 @@ cat ${ui_working_dir}/res/status.log end=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $2}'`) status=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $3}'`) -ExitStatusCMSSW=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $5}'`) -ExitStatusJOB=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{print $6}'`) +ExitStatusCMSSW=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{if(NF>=6){print $5} else print "-"}'`) +ExitStatusJOB=(`sed -r '/^[^0-9]+/ d;/^$/ d' ${ui_working_dir}/res/status.log | awk '{if(NF>=6){print $6} else print "-"}'`) for jobID in `seq 1 $nJobs` do @@ -68,16 +69,23 @@ for jobID in `seq 1 $nJobs` continue; fi - if [ "${status[${jID}]}" == "Running" -o "${status[${jID}]}" == "RUN" -o "${status[${jID}]}" == "Submitting" ]; then + if [ "${status[${jID}]}" == "Running" -o "${status[${jID}]}" == "RUN" -o "${status[${jID}]}" == "Submitting" -o "${status[${jID}]}" == "Submitted" ]; then continue; fi if [ "${ExitStatusCMSSW[${jID}]}" == "0" -a "${ExitStatusJOB[${jID}]}" == "0" ];then + okJobList="${okJobList} $jobID" continue; fi case ${ExitStatusJOB[${jID}]} in 8028) intervals="$intervals $jobID";; + 8021) intervals="$intervals $jobID";; + 50664) intervals="$intervals $jobID";; + 50800) intervals="$intervals $jobID";; + 60307) intervals="$intervals $jobID";; + 60317) intervals="$intervals $jobID";; + 60318) intervals="$intervals $jobID";; esac # echo ${intervals} @@ -188,9 +196,11 @@ for jobID in `seq 1 $nJobs` done -echo $intervals | sed 's| |,|' +echo $intervals +echo $okJobList | sed 's| |\n|g' | awk -f $CMSSW_BASE/src/Calibration/ALCARAW_RECO/awk/compact.awk | sed 's|,$||' if [ -n "$intervals" ];then crab -c $ui_working_dir/ -resubmit `echo $intervals | sed 's| |\n|g' | awk -f $CMSSW_BASE/src/Calibration/ALCARAW_RECO/awk/compact.awk | sed 's|,$||'` +#echo $intervals | sed 's| |\n|g' | awk -f $CMSSW_BASE/src/Calibration/ALCARAW_RECO/awk/compact.awk | sed 's|,$||' else if [ "`echo $okJobList |wc -w`" == "$nJobs" ];then echo "[STATUS] All jobs are finished SUCCESSFULLY!" From 61bd11d0ff7ab781a2fa512afdf5cd882545327b Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:26:38 +0100 Subject: [PATCH 349/475] added ZPtWeight class and include CB smearing in ZFitter --- ZFitter/Makefile | 7 +- ZFitter/bin/ZFitter.cpp | 77 ++++++++++++++- ZFitter/interface/ZPtWeights_class.hh | 51 ++++++++++ ZFitter/src/ZPtWeights_class.cc | 137 ++++++++++++++++++++++++++ 4 files changed, 268 insertions(+), 4 deletions(-) create mode 100644 ZFitter/interface/ZPtWeights_class.hh create mode 100644 ZFitter/src/ZPtWeights_class.cc diff --git a/ZFitter/Makefile b/ZFitter/Makefile index 858af22b250..8249febcd66 100644 --- a/ZFitter/Makefile +++ b/ZFitter/Makefile @@ -82,6 +82,11 @@ $(OBJ_DIR)/r9Weights_class.o: $(SRC)/r9Weights_class.cc $(INCLUDEDIR)/r9Weights_ @echo "--> Making class: r9Weights_class" @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/r9Weights_class.o $(SRC)/r9Weights_class.cc +ZPtWeights_class.o: $(OBJ_DIR)/ZPtWeights_class.o +$(OBJ_DIR)/ZPtWeights_class.o: $(SRC)/ZPtWeights_class.cc $(INCLUDEDIR)/ZPtWeights_class.hh + @echo "--> Making class: ZPtWeights_class" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/ZPtWeights_class.o $(SRC)/ZPtWeights_class.cc + runDivide_class.o: $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/runDivide_class.o: $(SRC)/runDivide_class.cc $(INCLUDEDIR)/runDivide_class.hh @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/runDivide_class.o $(SRC)/runDivide_class.cc @@ -146,7 +151,7 @@ $(BUILDDIR)/test.exe: test/test.cpp $(OBJ_DIR)/EnergyScaleCorrection_class.o # q ZFitter.exe: $(BUILDDIR)/ZFitter.exe -$(BUILDDIR)/ZFitter.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o +$(BUILDDIR)/ZFitter.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o $(OBJ_DIR)/ZPtWeights_class.o @echo "---> Making ZFitter" @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) $(ROOT_FLAGS) \ -o $(BUILDDIR)/ZFitter.exe $(BUILDDIR)/ZFitter.cpp -lboost_program_options -lTreePlayer \ diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index f08cb6879ed..eeedde50cb0 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -15,6 +15,7 @@ #include "../interface/ZFit_class.hh" #include "../interface/puWeights_class.hh" #include "../interface/r9Weights_class.hh" +#include "../interface/ZPtWeights_class.hh" #include "../interface/runDivide_class.hh" #include "../interface/EnergyScaleCorrection_class.h" @@ -47,6 +48,8 @@ //#define DEBUG #define smooth #include "../src/nllProfile.cc" +//#include "../macro/loop.C" // a way to use compiled macros with ZFitter + //using namespace std; using namespace RooStats; @@ -208,6 +211,7 @@ int main(int argc, char **argv) { std::string dataPUFileName, mcPUFileName; std::vector dataPUFileNameVec, mcPUFileNameVec; std::string r9WeightFile; + std::string ZPtWeightFile; std::string initFileName; // bool savePUweightTree; std::string imgFormat="eps", outDirFitResMC="test/MC/fitres", outDirFitResData="test/dato/fitres", outDirImgMC="test/MC/img", outDirImgData="test/dato/img", outDirTable="test/dato/table", selection; @@ -216,6 +220,7 @@ int main(int argc, char **argv) { std::string commonCut; std::string corrEleFile, corrEleType; std::string smearEleFile, smearEleType; + double smearingCBAlpha=1, smearingCBPower=5; std::string invMass_var; float invMass_min=0, invMass_max=0, invMass_binWidth=0.250; int fit_type_value=1; @@ -247,7 +252,8 @@ int main(int argc, char **argv) { desc.add_options() ("help,h","Help message") - + ("loop","") + ("runDivide", "execute the run division") ("nEvents_runDivide", po::value(&nEvents_runDivide)->default_value(100000), "Minimum number of events in a run range") @@ -263,10 +269,14 @@ int main(int argc, char **argv) { ("smearEleFile", po::value(&smearEleFile),"File with energy smearings") ("smearEleType", po::value(&smearEleType),"Correction type/step") + ("smearingCBAlpha", po::value(&smearingCBAlpha),"Correction type/step") + ("smearingCBPower", po::value(&smearingCBPower),"Correction type/step") // ("r9WeightFile", po::value(&r9WeightFile),"File with r9 photon-electron weights") ("useR9weight", "use r9 photon-electron weights") ("saveR9TreeWeight", "") + ("ZPtWeightFile", po::value(&ZPtWeightFile),"File with ZPt weights") + ("useZPtweight", "use ZPt weights") ("saveRootMacro","") // ("selection", po::value(&selection)->default_value("loose"),"") @@ -279,7 +289,7 @@ int main(int argc, char **argv) { ("isOddData", "Activate if use only odd events in data") // ("readDirect","") //read correction directly from config file instead of passing as a command line arg - ("addPtBranches", "") //add new pt branches ( 3 by default, fra, ele, pho) + //("addPtBranches", "") //add new pt branches ( 3 by default, fra, ele, pho) ("addBranch", po::value< std::vector >(&branchList), "") ("saveAddBranchTree","") // ("signal,s", po::value< std::vector >(&signalFiles), "Signal file (can be called multiple times putting the files in a chain") @@ -361,6 +371,11 @@ int main(int argc, char **argv) { return 1; } + if(vm.count("useZPtweight") && !vm.count("pdfSystWeightIndex")){ + std::cerr << "[ERROR] Asked for ZPt weights but no pdfSystWeightIndex indicated" << std::endl; + exit(1); + } + TString energyBranchName=""; if(invMass_var=="invMass_SC_regrCorr_ele") energyBranchName = "energySCEle_regrCorr_ele"; else if(invMass_var=="invMass_SC_regrCorr_pho") energyBranchName = "energySCEle_regrCorr_pho"; @@ -626,6 +641,50 @@ int main(int argc, char **argv) { if(vm.count("saveR9TreeWeight")) return 0; + ///------------------------------ to obtain ZPt weights + if(vm.count("ZPtWeightFile")){ + std::cout << "------------------------------------------------------------" << std::endl; + std::cout << "[STATUS] Getting ZPtWeights from file: " << ZPtWeightFile << std::endl; + UpdateFriends(tagChainMap, regionsFileNameTag); + ZPtWeights_class ZPtWeights; + ZPtWeights.ReadFromFile(ZPtWeightFile); + + TString treeName="ZPtWeight"; + + // mc // save it in a file and reload it as a chain to be safe against the reference directory for the tree + for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); + tag_chain_itr!=tagChainMap.end(); + tag_chain_itr++){ + if(tag_chain_itr->first.Contains("d")) continue; /// \todo ZPtWeight only on MC! because from PdfWeights, to make it more general + if(tag_chain_itr->first.CompareTo("d")==0 || tag_chain_itr->first.CompareTo("s")==0) continue; + if(tag_chain_itr->second.count(treeName)!=0) continue; //skip if already present + TChain *ch = (tag_chain_itr->second.find("selected"))->second; + + TString filename="tmp/ZPtWeight_"+tag_chain_itr->first+"-"+chainFileListTag+".root"; + std::cout << "[STATUS] Saving r9Weights tree to root file:" << filename << std::endl; + + TFile f(filename,"recreate"); + if(!f.IsOpen() || f.IsZombie()){ + std::cerr << "[ERROR] File for ZPtWeights: " << filename << " not opened" << std::endl; + exit(1); + } + TTree *corrTree = ZPtWeights.GetTreeWeight(ch, "ZPt_"+energyBranchName); + f.cd(); + corrTree->Write(); + std::cout << "[INFO] Data entries: " << ch->GetEntries() << std::endl; + std::cout << " ZPtWeights entries: " << corrTree->GetEntries() << std::endl; + delete corrTree; + + f.Write(); + f.Close(); + std::pair pair_tmp(treeName, new TChain(treeName)); + chain_map_t::iterator chain_itr= ((tagChainMap[tag_chain_itr->first]).insert(pair_tmp)).first; + chain_itr->second->SetTitle(tag_chain_itr->first); + chain_itr->second->Add(filename); + + } // end of data samples loop + } // end of r9Weight + //============================== @@ -746,7 +805,11 @@ int main(int argc, char **argv) { std::cerr << "[ERROR] File for scale corrections: " << filename << " not opened" << std::endl; exit(1); } - + if(TString(smearEleType).Contains("CB")){ + eScaler.SetSmearingType(1); + eScaler.SetSmearingCBAlpha(smearingCBAlpha); + } + TTree *corrTree = eScaler.GetSmearTree(ch, true, energyBranchName ); f.cd(); corrTree->SetName(TString("smearEle_")+smearEleType.c_str()); @@ -973,6 +1036,8 @@ int main(int argc, char **argv) { smearer.SetSmearingEt(vm.count("smearingEt")); smearer.SetR9Weight(vm.count("useR9weight")); smearer.SetPdfSystWeight(pdfSystWeightIndex); + smearer.SetZPtWeight(vm.count("useZPtweight")); + if(nSmearToy>0) smearer._nSmearToy = nSmearToy; @@ -988,6 +1053,12 @@ int main(int argc, char **argv) { // add also the friend branches! } + if(vm.count("loop")){ +// TFile *file = new TFile("evList.root","read"); + +// Loop((tagChainMap["s1"])["selected"],file); + return 0; + } //------------------------------ ZFit_class declare and set the options TChain *data = NULL; TChain *mc = NULL; diff --git a/ZFitter/interface/ZPtWeights_class.hh b/ZFitter/interface/ZPtWeights_class.hh new file mode 100644 index 00000000000..4a750d52378 --- /dev/null +++ b/ZFitter/interface/ZPtWeights_class.hh @@ -0,0 +1,51 @@ +#ifndef ZPTWEIGHTS_HH +#define ZPTWEIGHTS_HH + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +using namespace std; + + +class ZPtWeights_class{ +//------------------------------ +// All the weights are saved in this kind of map, where the key is the low edge of the bin, +// and the content (the float) is the bin content of the histogram: the weight +// There is one map of each histogram (for each electron category) + typedef std::map ZPtweight_map_t; // this map corresponds to one histogram + typedef std::map ZPtweights_map_t; // map of the histograms + +public: + ZPtWeights_class(void); + ~ZPtWeights_class(void); + + void ReadFromFile(std::string filename); + + TTree *GetTreeWeight(TChain *tree, TString ZPtBranchName, bool fastLoop=true); + + double GetPtWeight(double ZPt_, int pdfWeightIndex); //all array of two elements (the two electrons) +private: + TFile *f_ZPt; + + std::map ZPtweights; + //map ZPtweights; + std::map ZPtHistMap; + + unsigned int warningCounter; +}; + + + +#endif + diff --git a/ZFitter/src/ZPtWeights_class.cc b/ZFitter/src/ZPtWeights_class.cc new file mode 100644 index 00000000000..24cdef5ecbd --- /dev/null +++ b/ZFitter/src/ZPtWeights_class.cc @@ -0,0 +1,137 @@ +#include "../interface/ZPtWeights_class.hh" +#define PDFWEIGHTINDEXMAX 45 + +//#define DEBUG + +ZPtWeights_class::~ZPtWeights_class(){ + +} + +ZPtWeights_class::ZPtWeights_class(void): + warningCounter(0){ + +} + + +double ZPtWeights_class::GetPtWeight(double ZPt_, int pdfWeightIndex){ + + + TString indexName; indexName+=pdfWeightIndex; + ZPtweights_map_t::const_iterator ZPtweights_itr = ZPtweights.find("ZPtWeight_"+indexName); + if(ZPtweights_itr==ZPtweights.end()){ + std::cerr << "[ERROR] Pt weight histogram " << "ZPtWeight_"+indexName << " not found!" << std::endl; + exit(1); + } else return (--(ZPtweights_itr->second.upper_bound(ZPt_)))->second; + +} + + + + +void ZPtWeights_class::ReadFromFile(std::string filename){ + std::cout << "ZPT REWEIGHTING:: Using file " << filename << std::endl; + + f_ZPt = new TFile(filename.c_str(),"READ"); + + f_ZPt->cd(); + + std::cout << "[INFO] File: " << filename << " opened" << std::endl; + TList *KeyList = f_ZPt->GetListOfKeys(); + std::cout << "[INFO] Number of entries in file: " << KeyList->GetEntries() << std::endl; + for(int i =0; i < KeyList->GetEntries(); i++){ + + TH1F *h = (TH1F *)((TKey *)KeyList->At(i))->ReadObj(); + // TString keyName = (KeyList->At(i))->GetName(); + if(h==NULL) std::cerr << "[ERROR] histogram null from file: " << filename << std::endl; + TString keyName = h->GetName(); + //h->Scale(1./h->Integral()); + + // if the electron category is not yet defined, add it + if (ZPtweights.count(keyName)==0){ + ZPtweight_map_t t; +#ifdef DEBUG + std::cout << "[DEBUG] Adding ZPt weight: " << keyName << std::endl; +#endif + std::pair p(keyName,t); + ZPtweights.insert(p); + } else{ + std::cerr << "[ERROR] histogram name found twice:" << keyName << std::endl; + exit(1); + } + // find the map corresponding to the electron category + ZPtweights_map_t::iterator map_itr=ZPtweights.find(keyName); + for(int i_bin=1; i_bin <= h->GetXaxis()->GetNbins(); i_bin++){ + // fill the weight in the map + std::pair p(h->GetXaxis()->GetBinLowEdge(i_bin), h->GetBinContent(i_bin)); + map_itr->second.insert(p); +#ifdef DEBUG + std::cout << "[DEBUG] hist= " << keyName << "\t" << i_bin << "\t" + << h->GetXaxis()->GetBinLowEdge(i_bin) << "\t" <GetBinContent(i_bin) << "\t" + << map_itr->second.lower_bound(h->GetXaxis()->GetBinLowEdge(i_bin))->second + << "\t" << map_itr->second.lower_bound(h->GetXaxis()->GetBinCenter(i_bin))->second + << std::endl; +#endif + + } + // std::cout << keyName << "\t" << h->Integral() << std::endl; + // current_dir.cd(); + // current_dir.ls(); + // ZPtHistMap[keyName]=(TH1F *) h->Clone(); // dal momento che chiudo il file e' bene farne una copia + // if(ZPtHistMap[keyName]!=h) std::cerr << "[ERROR] " << std::endl; + // ZPtHistMap[keyName]->Print(); + } + + f_ZPt->Close(); + + return; +} + + +// tree is the input MC tree +// fastLoop = false if for any reason you don't want to change the branch status of the MC tree +TTree *ZPtWeights_class::GetTreeWeight(TChain *tree, TString ZPtBranchName, bool fastLoop){ + tree->ResetBranchAddresses(); + + Float_t ptWeight[50]={1.}; + TTree *newTree = new TTree("ZPtWeight",""); + newTree->Branch("ZPtWeight", ptWeight, "ZPtWeight[45]/F"); + if(fastLoop){ + tree->SetBranchStatus("*",0); + tree->SetBranchStatus(ZPtBranchName,1); + } + + Float_t ZPt; + if(tree->GetBranch(ZPtBranchName)==NULL){ + std::cerr << "[ERROR] Branch " << ZPtBranchName << " not found, impossible to produce ZPt weights " << std::endl; + exit(1); + } + tree->SetBranchAddress(ZPtBranchName, &ZPt); + // loop over tree + Long64_t nentries=tree->GetEntriesFast(); +#ifdef DEBUG + nentries=10; +#endif + + std::cout << "[STATUS] Get ZPTWeightTree for tree: " << tree->GetTitle() + << "\t" << "with " << nentries << " entries" << std::endl; + std::cerr << "[00%]"; + for(Long64_t ientry = 0; ientry< nentries; ientry++){ + tree->GetEntry(ientry); + for(int pdfWeightIndex=1; pdfWeightIndexFill(); + if(ientry%(nentries/100)==0) std::cerr << "\b\b\b\b" << std::setw(2) << ientry/(nentries/100) << "%]"; + } + std::cout << std::endl; + + if(fastLoop) tree->SetBranchStatus("*",1); + tree->ResetBranchAddresses(); + // std::cout << "[WARNING] nPU > nPU max for " << warningCounter << " times" << std::endl; + return newTree; +} + + + + + From 6383e7cadfc3f7cc18ca102af33acca24cd49b5a Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:27:41 +0100 Subject: [PATCH 350/475] removed unused regions --- ZFitter/data/regions/scaleStep0.dat | 10 +- ZFitter/data/regions/systematics.dat | 138 +++++++++++++-------------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/ZFitter/data/regions/scaleStep0.dat b/ZFitter/data/regions/scaleStep0.dat index 1f0352bfb23..70e5adac18b 100644 --- a/ZFitter/data/regions/scaleStep0.dat +++ b/ZFitter/data/regions/scaleStep0.dat @@ -3,8 +3,8 @@ #EB-absEta_1_1.4442 #EE-absEta_1.566_2 #EE-absEta_2_2.5 -#EB -#EE -absEta_0_3-gold -absEta_0_3-bad -absEta_0_3 +EB +EE +#absEta_0_3-gold +#absEta_0_3-bad +#absEta_0_3 diff --git a/ZFitter/data/regions/systematics.dat b/ZFitter/data/regions/systematics.dat index 69678a23736..1c8013ffab8 100644 --- a/ZFitter/data/regions/systematics.dat +++ b/ZFitter/data/regions/systematics.dat @@ -1,4 +1,4 @@ -nPV_0_4 +#nPV_0_4 nPV_4_8 nPV_8_12 nPV_12_14 @@ -6,7 +6,7 @@ nPV_14_18 nPV_18_22 nPV_22_26 nPV_26_30 -EB-nPV_0_4 +#EB-nPV_0_4 EB-nPV_4_7 EB-nPV_7_10 EB-nPV_10_12 @@ -24,73 +24,73 @@ EE-nPV_14_18 EE-nPV_18_22 EE-nPV_22_26 EE-nPV_26_30 -EB-R9_0.80_0.85-nPV_0_4 -EB-R9_0.80_0.85-nPV_4_8 -EB-R9_0.80_0.85-nPV_8_12 -EB-R9_0.80_0.85-nPV_12_14 -EB-R9_0.80_0.85-nPV_14_18 -EB-R9_0.80_0.85-nPV_18_22 -EB-R9_0.80_0.85-nPV_22_26 -EB-R9_0.80_0.85-nPV_26_30 -#EE-R9_0.80_0.85-nPV_0_4 -EE-R9_0.80_0.85-nPV_4_8 -EE-R9_0.80_0.85-nPV_8_12 -EE-R9_0.80_0.85-nPV_12_14 -EE-R9_0.80_0.85-nPV_14_18 -EE-R9_0.80_0.85-nPV_18_22 -EE-R9_0.80_0.85-nPV_22_26 -EE-R9_0.80_0.85-nPV_26_30 -# -EB-R9_0.85_0.90-nPV_0_4 -EB-R9_0.85_0.90-nPV_4_8 -EB-R9_0.85_0.90-nPV_8_12 -EB-R9_0.85_0.90-nPV_12_14 -EB-R9_0.85_0.90-nPV_14_18 -EB-R9_0.85_0.90-nPV_18_22 -EB-R9_0.85_0.90-nPV_22_26 -EB-R9_0.85_0.90-nPV_26_30 -#EE-R9_0.85_0.90-nPV_0_4 -EE-R9_0.85_0.90-nPV_4_8 -EE-R9_0.85_0.90-nPV_8_12 -EE-R9_0.85_0.90-nPV_12_14 -EE-R9_0.85_0.90-nPV_14_18 -EE-R9_0.85_0.90-nPV_18_22 -EE-R9_0.85_0.90-nPV_22_26 -EE-R9_0.85_0.90-nPV_26_30 -# -EB-R9_0.90_0.94-nPV_0_4 -EB-R9_0.90_0.94-nPV_4_8 -EB-R9_0.90_0.94-nPV_8_12 -EB-R9_0.90_0.94-nPV_12_14 -EB-R9_0.90_0.94-nPV_14_18 -EB-R9_0.90_0.94-nPV_18_22 -EB-R9_0.90_0.94-nPV_22_26 -EB-R9_0.90_0.94-nPV_26_30 -#EE-R9_0.90_0.04-nPV_0_4 -EE-R9_0.90_0.94-nPV_4_8 -EE-R9_0.90_0.94-nPV_8_12 -EE-R9_0.90_0.94-nPV_12_14 -EE-R9_0.90_0.94-nPV_14_18 -EE-R9_0.90_0.94-nPV_18_22 -EE-R9_0.90_0.94-nPV_22_26 -EE-R9_0.90_0.94-nPV_26_30 -# -EB-gold-nPV_0_4 -EB-gold-nPV_4_8 -EB-gold-nPV_8_12 -EB-gold-nPV_12_14 -EB-gold-nPV_14_18 -EB-gold-nPV_18_22 -EB-gold-nPV_22_26 -EB-gold-nPV_26_30 -#EE-R9_0.90_0.04-nPV_0_4 -EE-gold-nPV_4_8 -EE-gold-nPV_8_12 -EE-gold-nPV_12_14 -EE-gold-nPV_14_18 -EE-gold-nPV_18_22 -EE-gold-nPV_22_26 -EE-gold-nPV_26_30 +#EB-R9_0.80_0.85-nPV_0_4 +#EB-R9_0.80_0.85-nPV_4_8 +#EB-R9_0.80_0.85-nPV_8_12 +#EB-R9_0.80_0.85-nPV_12_14 +#EB-R9_0.80_0.85-nPV_14_18 +#EB-R9_0.80_0.85-nPV_18_22 +#EB-R9_0.80_0.85-nPV_22_26 +#EB-R9_0.80_0.85-nPV_26_30 +##EE-R9_0.80_0.85-nPV_0_4 +#EE-R9_0.80_0.85-nPV_4_8 +#EE-R9_0.80_0.85-nPV_8_12 +#EE-R9_0.80_0.85-nPV_12_14 +#EE-R9_0.80_0.85-nPV_14_18 +#EE-R9_0.80_0.85-nPV_18_22 +#EE-R9_0.80_0.85-nPV_22_26 +#EE-R9_0.80_0.85-nPV_26_30 +## +#EB-R9_0.85_0.90-nPV_0_4 +#EB-R9_0.85_0.90-nPV_4_8 +#EB-R9_0.85_0.90-nPV_8_12 +#EB-R9_0.85_0.90-nPV_12_14 +#EB-R9_0.85_0.90-nPV_14_18 +#EB-R9_0.85_0.90-nPV_18_22 +#EB-R9_0.85_0.90-nPV_22_26 +#EB-R9_0.85_0.90-nPV_26_30 +##EE-R9_0.85_0.90-nPV_0_4 +#EE-R9_0.85_0.90-nPV_4_8 +#EE-R9_0.85_0.90-nPV_8_12 +#EE-R9_0.85_0.90-nPV_12_14 +#EE-R9_0.85_0.90-nPV_14_18 +#EE-R9_0.85_0.90-nPV_18_22 +#EE-R9_0.85_0.90-nPV_22_26 +#EE-R9_0.85_0.90-nPV_26_30 +## +#EB-R9_0.90_0.94-nPV_0_4 +#EB-R9_0.90_0.94-nPV_4_8 +#EB-R9_0.90_0.94-nPV_8_12 +#EB-R9_0.90_0.94-nPV_12_14 +#EB-R9_0.90_0.94-nPV_14_18 +#EB-R9_0.90_0.94-nPV_18_22 +#EB-R9_0.90_0.94-nPV_22_26 +#EB-R9_0.90_0.94-nPV_26_30 +##EE-R9_0.90_0.04-nPV_0_4 +#EE-R9_0.90_0.94-nPV_4_8 +#EE-R9_0.90_0.94-nPV_8_12 +#EE-R9_0.90_0.94-nPV_12_14 +#EE-R9_0.90_0.94-nPV_14_18 +#EE-R9_0.90_0.94-nPV_18_22 +#EE-R9_0.90_0.94-nPV_22_26 +#EE-R9_0.90_0.94-nPV_26_30 +## +#EB-gold-nPV_0_4 +#EB-gold-nPV_4_8 +#EB-gold-nPV_8_12 +#EB-gold-nPV_12_14 +#EB-gold-nPV_14_18 +#EB-gold-nPV_18_22 +#EB-gold-nPV_22_26 +#EB-gold-nPV_26_30 +##EE-R9_0.90_0.04-nPV_0_4 +#EE-gold-nPV_4_8 +#EE-gold-nPV_8_12 +#EE-gold-nPV_12_14 +#EE-gold-nPV_14_18 +#EE-gold-nPV_18_22 +#EE-gold-nPV_22_26 +#EE-gold-nPV_26_30 # # EB-R9Ele_0.00_0.60 From d1c0783b8597a4b96077540a68ed0b456bb899a2 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:31:19 +0100 Subject: [PATCH 351/475] updated ntuples with gainSwitch information --- .../validation/22Jan2012-runDepMCAll_v3.dat | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat index 5b306630655..d5f157818d2 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat @@ -1,14 +1,14 @@ -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v3/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v3/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v3/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root # -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v3/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root # -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v3/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root # d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root @@ -26,12 +26,20 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859- s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll_v3.root s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root -##### Other friend trees (example) -#d scaleEle_HggRunEtaR9 HggRunEtaR9-Winter13-RUNABC.root +##### Scale correction trees (examples) +# #d1 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d1-22Jan2012-runDepMCAll_v3.root # #s1 smearEle_stochastic data/other/smearEle_stochastic_s1-22Jan2012-runDepMCAll_v3.root # -#s1 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s1-22Jan2012-runDepMCAll_v3.root +#s1 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s1-22Jan2012-runDepMCAll_v3.root +# +#s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v3.root # #d1 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d1-22Jan2012-runDepMCAll_v2.root +#s1 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s1-22Jan2012-runDepMCAll_v3.root +## +#s1 ZPtWeight data/other/ZPtWeight_s1-22Jan2012-runDepMCAll_v3.root +# +#s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v3.root + From 97fec0f2061d7e7999bebf688cd85ba40a0ad745 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:39:34 +0100 Subject: [PATCH 352/475] ZPt used in smearing method --- ZFitter/interface/RooSmearer.hh | 1 + ZFitter/interface/SmearingImporter.hh | 2 + ZFitter/interface/addBranch_class.hh | 2 +- ZFitter/src/SmearingImporter.cc | 16 +++++ ZFitter/src/addBranch_class.cc | 85 ++++++++++++++------------- 5 files changed, 64 insertions(+), 42 deletions(-) diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index 1f549283bad..ba32c1b2fbe 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -126,6 +126,7 @@ public: inline void SetPuWeight(bool usePuReweight){importer.SetPuWeight(usePuReweight);}; inline void SetR9Weight(bool useR9Reweight){importer.SetR9Weight(useR9Reweight);}; inline void SetPtWeight(bool usePtReweight){importer.SetPtWeight(usePtReweight);}; + inline void SetZPtWeight(bool useZPtReweight){importer.SetZPtWeight(useZPtReweight);}; inline void SetOnlyDiagonal(bool value){importer.SetOnlyDiagonal(value);}; inline void SetSmearingEt(bool value){importer.SetSmearingEt(value);}; inline void SetPdfSystWeight(int value){importer.SetPdfSystWeight(value);}; diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index 94803242e7a..17468f45e6f 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -42,6 +42,7 @@ public: inline void SetMCWeight(bool value){_useMCweight=value;}; inline void SetR9Weight(bool value){_useR9weight=value;}; inline void SetPtWeight(bool value){_usePtweight=value;}; + inline void SetZPtWeight(bool value){_useZPtweight=value;}; inline void SetExcludeByWeight(bool value){_excludeByWeight=value;}; inline void SetOnlyDiagonal(bool value){_onlyDiagonal=value;}; inline void SetEleID(TString value){_eleID=value;}; @@ -65,6 +66,7 @@ private: bool _useMCweight; bool _useR9weight; bool _usePtweight; + bool _useZPtweight; bool _excludeByWeight; bool _onlyDiagonal; bool _isSmearingEt; diff --git a/ZFitter/interface/addBranch_class.hh b/ZFitter/interface/addBranch_class.hh index 0a06e0aa6d2..231b20ed427 100644 --- a/ZFitter/interface/addBranch_class.hh +++ b/ZFitter/interface/addBranch_class.hh @@ -38,7 +38,7 @@ public: /// specify the new branch you want in BranchName TTree *AddBranch(TChain* originalChain, TString treename, TString BranchName, bool fastLoop=true, bool isMC=false); - TTree* AddBranch_Pt(TChain* originalTree, TString treename); + TTree* AddBranch_ZPt(TChain* originalTree, TString treename, TString energyBranchName, bool fastLoop=true); EnergyScaleCorrection_class *scaler; TString _commonCut; std::vector _regionList; diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 26fcdab5017..7401a498983 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -20,6 +20,7 @@ SmearingImporter::SmearingImporter(std::vector regionList, TString ener _useMCweight(true), _useR9weight(false), _usePtweight(false), + _useZPtweight(false), _excludeByWeight(true), _onlyDiagonal(false), _isSmearingEt(false), @@ -91,6 +92,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Float_t weight=1; Float_t r9weight[2]={1,1}; Float_t ptweight[2]={1,1}; + Float_t zptweight[45]={1}; Float_t mcGenWeight=1; std::vector *pdfWeights = NULL; @@ -145,6 +147,11 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS chain->SetBranchAddress("ptWeight", ptweight); } + if(_useZPtweight && chain->GetBranch("ZPtWeight")!=NULL){ + std::cout << "[STATUS] Getting ZptWeight branch for tree: " << chain->GetTitle() << std::endl; + chain->SetBranchAddress("ZPtWeight", zptweight); + } + if(chain->GetBranch("mcGenWeight")!=NULL){ std::cout << "[STATUS] Getting mcGenWeight branch for tree: " << chain->GetTitle() << std::endl; chain->SetBranchAddress("mcGenWeight", &mcGenWeight); @@ -309,6 +316,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; + if(_useZPtweight && isMC && _pdfWeightIndex>0) event.weight *= zptweight[_pdfWeightIndex]; if(!isMC && _pdfWeightIndex>0 && pdfWeights!=NULL){ if(((unsigned int)_pdfWeightIndex) > pdfWeights->size()) continue; event.weight *= ((*pdfWeights)[0]<=0 || (*pdfWeights)[0]!=(*pdfWeights)[0] || (*pdfWeights)[_pdfWeightIndex]!=(*pdfWeights)[_pdfWeightIndex])? 0 : (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0]; @@ -324,6 +332,13 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } #endif + }else{ + if(!isMC && _pdfWeightIndex>0){ + std::cerr << "[ERROR] requested pdfWeights but not set by getentry" << std::endl; + std::cerr << "[ERROR] jentry=" << jentry << "; chain: " << chain->GetName() << "\t" << chain->GetTitle() << std::endl; + if(jentry<10) continue; + else exit(1); + } } if(mcGenWeight != -1){ if(_useMCweight && !_excludeByWeight) event.weight *= mcGenWeight; @@ -345,6 +360,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS << "\t" << weight << "\t" << mcGenWeight << "\t" << r9weight[0] << " " << r9weight[1] << "\t" << ptweight[0] << " " << ptweight[1] + << "\t" << zptweight[0] << std::endl; } #endif diff --git a/ZFitter/src/addBranch_class.cc b/ZFitter/src/addBranch_class.cc index 0d3321752d6..b9048dfa159 100644 --- a/ZFitter/src/addBranch_class.cc +++ b/ZFitter/src/addBranch_class.cc @@ -1,6 +1,7 @@ #include "../interface/addBranch_class.hh" #include "../interface/ElectronCategory_class.hh" #include +#include #include //#define DEBUG @@ -22,61 +23,63 @@ TTree *addBranch_class::AddBranch(TChain* originalChain, TString treename, TStri if(BranchName.Contains("invMassSigma")) return AddBranch_invMassSigma(originalChain, treename, BranchName, fastLoop, isMC); if(BranchName.CompareTo("iSM")==0) return AddBranch_iSM(originalChain, treename, BranchName, fastLoop); if(BranchName.CompareTo("smearerCat")==0) return AddBranch_smearerCat(originalChain, treename, isMC); - + if(BranchName.Contains("ZPt")) return AddBranch_ZPt(originalChain, treename, BranchName.ReplaceAll("ZPt_",""), fastLoop); std::cerr << "[ERROR] Request to add branch " << BranchName << " but not defined" << std::endl; return NULL; } -TTree* addBranch_class::AddBranch_Pt(TChain* originalChain, TString treename){ +TTree* addBranch_class::AddBranch_ZPt(TChain* originalChain, TString treename, TString energyBranchName, bool fastLoop){ //sanity checks TTree* newtree = new TTree(treename, treename); - //delete branches - //TBranch *b = originalChain-> GetBranch("name of branch"); - //originalChain->GetListOfBranches()->Remove(b); //add pt branches Float_t phiEle[2]; Float_t etaEle[2]; - Float_t energyEle_regrCorr_fra[2]; - Float_t energySCEle_regrCorr_ele[2]; - Float_t energySCEle_regrCorr_pho[2]; - TBranch *b_etaEle; - TBranch *b_phiEle; - TBranch *b_energySCEle_regrCorr_ele; - TBranch *b_energySCEle_regrCorr_pho; - TBranch *b_energyEle_regrCorr_fra; - originalChain->SetBranchAddress("etaEle", etaEle, &b_etaEle); - originalChain->SetBranchAddress("phiEle", phiEle, &b_phiEle); - originalChain->SetBranchAddress("energySCEle_regrCorr_ele", energySCEle_regrCorr_ele, &b_energySCEle_regrCorr_ele); - originalChain->SetBranchAddress("energySCEle_regrCorr_pho", energySCEle_regrCorr_pho, &b_energySCEle_regrCorr_pho); - originalChain->SetBranchAddress("energyEle_regrCorr_fra", energyEle_regrCorr_fra, &b_energyEle_regrCorr_fra); - - float ZPt_regrCorr_pho, ZPt_regrCorr_ele, ZPt_regrCorr_fra; - newtree->Branch("ZPt_regrCorr_fra", &ZPt_regrCorr_fra, "ZPt_regrCorr_fra/F"); - newtree->Branch("ZPt_regrCorr_ele", &ZPt_regrCorr_ele, "ZPt_regrCorr_ele/F"); - newtree->Branch("ZPt_regrCorr_pho", &ZPt_regrCorr_pho, "ZPt_regrCorr_pho/F"); + Float_t energyEle[2]; + Float_t corrEle[2]={1.,1.}; + Float_t ZPt, ZPta; + TLorentzVector ele1,ele2; + + originalChain->SetBranchAddress("etaEle", etaEle); + originalChain->SetBranchAddress("phiEle", phiEle); + originalChain->SetBranchAddress(energyBranchName, energyEle); + + if(fastLoop){ + originalChain->SetBranchStatus("*",0); + originalChain->SetBranchStatus("etaEle",1); + originalChain->SetBranchStatus("phiEle",1); + originalChain->SetBranchStatus(energyBranchName,1); + if(originalChain->GetBranch("scaleEle")!=NULL){ + std::cout << "[STATUS] Adding electron energy correction branch from friend " << originalChain->GetTitle() << std::endl; + originalChain->SetBranchAddress("scaleEle", corrEle); + } + } + + newtree->Branch("ZPt_"+energyBranchName, &ZPt, "ZPt/F"); //px = pt*cosphi; py = pt*sinphi; pz = pt*sinh(eta) //p^2 = E^2 - m^2 = pt^2*(1+sinh^2(eta)) = pt^2*(cosh^2(eta)) - float mass = 0.000511; - for(Long64_t ientry = 0; ientryGetEntriesFast(); ientry++){ - originalChain->GetEntry(ientry); - float regrCorr_fra_pt0 = sqrt((pow(energyEle_regrCorr_fra[0],2)-mass*mass)/(1+sinh(etaEle[0])*sinh(etaEle[0]))); - float regrCorr_fra_pt1 = sqrt((pow(energyEle_regrCorr_fra[1],2)-mass*mass)/(1+sinh(etaEle[1])*sinh(etaEle[1]))); - ZPt_regrCorr_fra = - TMath::Sqrt(pow(regrCorr_fra_pt0*TMath::Sin(phiEle[0])+regrCorr_fra_pt1*TMath::Sin(phiEle[1]),2)+pow(regrCorr_fra_pt0*TMath::Cos(phiEle[0])+regrCorr_fra_pt1*TMath::Cos(phiEle[1]),2)); - - float regrCorr_ele_pt0 = sqrt((pow(energySCEle_regrCorr_ele[0],2)-mass*mass)/(1+sinh(etaEle[0])*sinh(etaEle[0]))); - float regrCorr_ele_pt1 = sqrt((pow(energySCEle_regrCorr_ele[1],2)-mass*mass)/(1+sinh(etaEle[1])*sinh(etaEle[1]))); - ZPt_regrCorr_ele = - TMath::Sqrt(pow(regrCorr_ele_pt0*TMath::Sin(phiEle[0])+regrCorr_ele_pt1*TMath::Sin(phiEle[1]),2)+pow(regrCorr_ele_pt0*TMath::Cos(phiEle[0])+regrCorr_ele_pt1*TMath::Cos(phiEle[1]),2)); - - float regrCorr_pho_pt0 = sqrt((pow(energySCEle_regrCorr_pho[0],2)-mass*mass)/(1+sinh(etaEle[0])*sinh(etaEle[0]))); - float regrCorr_pho_pt1 = sqrt((pow(energySCEle_regrCorr_pho[1],2)-mass*mass)/(1+sinh(etaEle[1])*sinh(etaEle[1]))); - ZPt_regrCorr_pho = - TMath::Sqrt(pow(regrCorr_pho_pt0*TMath::Sin(phiEle[0])+regrCorr_pho_pt1*TMath::Sin(phiEle[1]),2)+pow(regrCorr_pho_pt0*TMath::Cos(phiEle[0])+regrCorr_pho_pt1*TMath::Cos(phiEle[1]),2)); - newtree->Fill(); + float mass = 0.; //0.000511; + Long64_t nentries= originalChain->GetEntries(); + for(Long64_t ientry = 0; ientry< nentries; ientry++){ + originalChain->GetEntry(ientry); + float regrCorr_fra_pt0 = sqrt(((energyEle[0]*energyEle[0])-mass*mass)/(1+sinh(etaEle[0])*sinh(etaEle[0]))); + float regrCorr_fra_pt1 = sqrt(((energyEle[1]*energyEle[1])-mass*mass)/(1+sinh(etaEle[1])*sinh(etaEle[1]))); + ZPt = + TMath::Sqrt(pow(regrCorr_fra_pt0*TMath::Sin(phiEle[0])+regrCorr_fra_pt1*TMath::Sin(phiEle[1]),2)+pow(regrCorr_fra_pt0*TMath::Cos(phiEle[0])+regrCorr_fra_pt1*TMath::Cos(phiEle[1]),2)); + + ele1.SetPtEtaPhiE(energyEle[0]/cosh(etaEle[0]), etaEle[0], phiEle[0], energyEle[0]); + ele2.SetPtEtaPhiE(energyEle[1]/cosh(etaEle[1]), etaEle[1], phiEle[1], energyEle[1]); + ZPta = (ele1+ele2).Pt(); + if(fabs(ZPt - ZPta)>0.001){ + std::cerr << "[ERROR] ZPt not well calculated" << ZPt << "\t" << ZPta << std::endl; + exit(1); + } + + newtree->Fill(); } + + originalChain->SetBranchStatus("*",1); originalChain->ResetBranchAddresses(); return newtree; } From 78b655167fdf0dca89d7df12212a7997b30c04e2 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:46:15 +0100 Subject: [PATCH 353/475] added to the list of documented classes --- .../interface/EnergyScaleCorrection_class.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index 5db7783af54..7c4dfac998a 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -1,5 +1,14 @@ #ifndef EnergyScaleCorrection_class_hh #define EnergyScaleCorrection_class_hh +/// Read and get energy scale and smearings from .dat files +/**\class EnergyScaleCorrection_class EnergyScaleCorrection_class.cc Calibration/ZFitter/src/EnergyScaleCorrection_class.cc + * + * + */ + +/** Description Shervin + */ + #include #include #include @@ -91,11 +100,11 @@ class EnergyScaleCorrection_class{ EnergyScaleCorrection_class(TString correctionFileName, TString smearingFileName=""); ///< constructor with correction file names ~EnergyScaleCorrection_class(void); - void ReadFromFile(TString filename); + float getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle); // deprecated float ScaleCorrection(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle, - int nPV, float nPVmean); + int nPV, float nPVmean=0); ///< method to get energy scale corrections TTree *GetCorrTree(TChain *tree, bool fastLoop=true, TString runNumberBranchName="runNumber", TString R9EleBranchName="R9Ele", @@ -105,6 +114,8 @@ class EnergyScaleCorrection_class{ TString nPVBranchName="nPV"); private: + void ReadFromFile(TString filename); ///< category "runNumber" runMin runMax deltaP err_deltaP + float GetMean_nPV(TChain *tree, bool fastLoop, TString nPVBranchName); void Add(TString category_, int runMin_, int runMax_, double deltaP_, double err_deltaP_); @@ -121,6 +132,7 @@ class EnergyScaleCorrection_class{ void AddSmearing(TString category_, int runMin_, int runMax_, //double smearing_, double err_smearing_); double constTerm, double err_constTerm, double alpha, double err_alpha, double Emean, double err_Emean); float getSmearingSigma(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); + void ReadSmearingFromFile(TString filename); ///< File structure: category constTerm alpha; public: inline void SetSmearingType(int value){if(value>=0 && value<=1){smearingType_=value;}else{smearingType_=0;}}; inline void SetSmearingCBAlpha(double value){cut.setVal(value);}; @@ -130,7 +142,7 @@ class EnergyScaleCorrection_class{ float getSmearingRho(int runNumber, float energy, bool isEBEle, float R9Ele, float etaSCEle); ///< public for sigmaE estimate - void ReadSmearingFromFile(TString filename); ///< File structure: category constTerm alpha; + TTree *GetSmearTree(TChain *tree, bool fastLoop, TString energyEleBranchName, TString runNumberBranchName="runNumber", From fcec0ebe74cc4a6b0d6051769ed5ed575b65f2a3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:47:19 +0100 Subject: [PATCH 354/475] improved macros for plot and likelihood profile scan --- ZFitter/macro/PlotDataMC.C | 12 ++++++ ZFitter/macro/macro_fit.C | 68 +++++++++++++++++++++++----------- ZFitter/macro/plot_data_mc.C | 30 ++++++++++----- ZFitter/macro/stability.C | 3 +- ZFitter/macro/standardDataMC.C | 16 +++++--- 5 files changed, 92 insertions(+), 37 deletions(-) diff --git a/ZFitter/macro/PlotDataMC.C b/ZFitter/macro/PlotDataMC.C index e81e65b6f37..36734829de8 100644 --- a/ZFitter/macro/PlotDataMC.C +++ b/ZFitter/macro/PlotDataMC.C @@ -50,6 +50,18 @@ std::vector ReadRegionsFromFile(TString fileName){ } +void DisableBranchNameNtuple(TChain *chain, TString region){ + ElectronCategory_class cutter; + std::set tmpList = cutter.GetBranchNameNtuple(region); + chain->SetBranchStatus("*",1); + + for(std::set::const_iterator branch_itr= tmpList.begin(); + branch_itr!=tmpList.end(); + branch_itr++){ + chain->SetBranchStatus(*branch_itr,1); + } + +} TCut GetCut(TString category, int indexEle=0){ ElectronCategory_class cutter; diff --git a/ZFitter/macro/macro_fit.C b/ZFitter/macro/macro_fit.C index 27672ae4fe2..670554f1e73 100644 --- a/ZFitter/macro/macro_fit.C +++ b/ZFitter/macro/macro_fit.C @@ -196,17 +196,19 @@ double rangeWithPoints(TGraphErrors *g, int nPoints, Double_t *xMin, Double_t* x Double_t *Y = g->GetY(); Double_t *X = g->GetX(); Double_t min=1e20; - for(int i=1; i < g->GetN(); i++) if(Y[i] <= min){ - iMin=i; - min=Y[i]; + for(int i=1; i < g->GetN(); i++){ + if(Y[i] <= min){ + iMin=i; + min=Y[i]; + } } int _iMax=std::min(g->GetN(),iMin+ nPoints); int _iMin=std::max(0,iMin- nPoints); double dist = std::max(X[_iMax]-X[iMin],X[iMin]-X[_iMin]); - (*xMin)= X[iMin]-dist; - (*xMax)= X[iMin]+dist; + (*xMin)= X[iMin]-dist/2; + (*xMax)= X[iMin]+dist/2; return std::max(Y[_iMin],Y[_iMax]); } @@ -318,7 +320,7 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) chi2 = fun->GetChisquare()/fun->GetNDF(); //g->Chisquare(fun); if(isScale){ - range_min = TMath::Max(minX-10*sigma_minus, rangeLimMin); + range_min = TMath::Max(minX-15*sigma_minus, rangeLimMin); range_max = TMath::Min(minX+10*sigma_plus, rangeLimMax); } else if(isPhi){ range_min = TMath::Max(minX-2*sigma_minus, rangeLimMin); @@ -334,8 +336,8 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) if(TString(g->GetTitle()).Contains("0_1-bad")){ range_min=0.5; range_max=1.6;}; } } else { - range_min = TMath::Max(minX-8*sigma_minus, rangeLimMin); - range_max = TMath::Min(minX+8*sigma_plus, rangeLimMax); + range_min = TMath::Max(minX-5*sigma_minus, rangeLimMin); + range_max = TMath::Min(minX+5*sigma_plus, rangeLimMax); } std::cout << "[INFO] Points in interval: " << pointsInInterval(X, N, range_min, range_max) << std::endl; @@ -348,7 +350,7 @@ TF1* IterMinimumFit(TGraphErrors *g, bool isScale, bool isPhi=false) range_min = TMath::Max(range_min-(rangeLimMax-rangeLimMin)*0.05, rangeLimMin); range_max = TMath::Min(range_max+(rangeLimMax-rangeLimMin)*0.05, rangeLimMax); } - while (pointsInInterval(X, N, minX, range_max) < 5 && range_max g_vec, bool shift=false){ if(minimum > Y[i]) minimum=Y[i]; } - // for (int ip=0;ip uniqX; for (int ip=0;ip19999){ std::cerr << "############################################################" << std::endl; std::cerr << "############################################################" << std::endl; std::cerr << "############################################################" << std::endl; break; } - + n++; } - n+=N; + //n+=N; if(graph->GetN() < 3) std::cerr << "WARNING: low number of points" << std::endl; } @@ -512,6 +521,23 @@ TGraphErrors *MeanGraphNew(TGraphErrors *graph){ for(int i =0 ; i < graph->GetN(); i++){ graphic_t::iterator itr = graphic.find(X[i]); + if(!graphic.empty() && itr == graphic.end()) { + // controllo se e' vicino al primo bordo, poi al secondo e altrimenti lo butto + itr = graphic.lower_bound(X[i]); + // if(itr== graphic.end()) std::cout << "Error: graphic empty" << std::endl; + if(itr!=graphic.begin()) itr--; + if( (fabs(itr->first - X[i]) > 0.00000001)){ // check del bin prima + itr++; + if( itr!=graphic.end() && (fabs(itr->first - X[i]) > 0.00000001)){ // check del bin + itr++; + if( itr!=graphic.end() && (fabs(itr->first - X[i]) > 0.00000001)){ // check del bin dopo + itr=graphic.end(); + } //else std::cout << "[DEBUG] New point: " << itr->first << "\t" << X[i] << std::endl; + } //else std::cout << "[DEBUG] moving to upper bound: " << itr->first << "\t" << X[i] << std::endl; + } //else std::cout << "[DEBUG] moving to lower bound: " << itr->first << "\t" << X[i] << std::endl; + } + + if(itr!=graphic.end()){ itr->second.y+=Y[i]; itr->second.y2+=Y[i]*Y[i]; @@ -533,7 +559,7 @@ TGraphErrors *MeanGraphNew(TGraphErrors *graph){ y_min=1e10; for(graphic_t::iterator itr=graphic.begin(); itr!=graphic.end(); itr++){ - if(itr->second.n < n_max*0.2){std::cout << "Removing point " << itr->first << "\t" << itr->second.n << std::endl; continue;} + if(itr->second.n < n_max*0.30){std::cout << "Removing point " << itr->first << "\t" << itr->second.n << "\t" << n_max << std::endl; continue;} double ym = itr->second.y/itr->second.n; if(itr->second.n>1 && itr->second.y2/itr->second.n >= ym*ym) dev_st[n] = sqrt( (itr->second.y2/itr->second.n - ym*ym)/(double)(itr->second.n)); //errore sulla media @@ -977,7 +1003,7 @@ void Plot(TCanvas *c, TGraphErrors *g, TF1 *fun, TPaveText *pt, bool isScale, bo // g->Draw("PSAME"); Double_t xMin, xMax; - Double_t yMax = rangeWithPoints(g, 8, &xMin, &xMax); + Double_t yMax = rangeWithPoints(g, 3, &xMin, &xMax); std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << sigma << "\t" << fun->GetXmin() << std::endl; std::cout << "AAAAAAAAAAAAAAAa" << xMin << "\t" << xMax << "\t" << yMax << std::endl; xMin=std::min(fun->GetMinimumX()-7*sigma,xMin); diff --git a/ZFitter/macro/plot_data_mc.C b/ZFitter/macro/plot_data_mc.C index 49bb34c322b..1a205b9f0d4 100644 --- a/ZFitter/macro/plot_data_mc.C +++ b/ZFitter/macro/plot_data_mc.C @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -116,8 +117,8 @@ void PlotCanvas(TCanvas *c, TH1F *mc, TH1F *data, TH1F *mcSmeared){ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legend=NULL, TString region="", TString filename="", TString energy="8 TeV", TString lumi="", bool ratio=true){ c->Clear(); - TPad * pad1 = new TPad("pad1", "pad1",0.00,0.20, 1,1.); - TPad * pad2 = new TPad("pad2", "pad2",0.00,0.00, 1,0.2); + TPad * pad1 = new TPad("pad1", "pad1",0.00,0.25, 1,1.); + TPad * pad2 = new TPad("pad2", "pad2",0.00,0.00, 1,0.25); TPad * pad3 = new TPad("pad3", "pad3",0.75,0.00, 1.,0.2); float yscale=0.75/(pad1->GetYlowNDC() -pad2->GetYlowNDC()); @@ -126,7 +127,7 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen if(ratio){ - pad1->SetRightMargin(0.1); + pad1->SetRightMargin(0.15); pad1->SetBottomMargin(0.01); // pad1->SetLogy(); pad1->Draw(); @@ -135,7 +136,7 @@ void Plot(TCanvas *c, TH1F *data, TH1F *mc, TH1F *mcSmeared=NULL, TLegend *legen pad2->SetGrid(); pad2->SetBottomMargin(0.5); pad2->SetTopMargin(0.01); - pad2->SetRightMargin(0.1); + pad2->SetRightMargin(0.15); pad2->Draw(); pad2->cd(); c->cd(); @@ -273,7 +274,12 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi="", int TH2F eventFraction("eventFraction", "", 10, 0, 9, 10, 0, 9); int index_max=0; double region_array[20][20]; - + + TString pdfWeightIndex=filename; + pdfWeightIndex.ReplaceAll("test/dato/22Jan2012-runDepMCAll_v3/loose/invMass_SC_regrCorrSemiParV5_pho/step9pdfWeight/",""); + pdfWeightIndex.ReplaceAll("/fitres/histos-scaleStep2smearing_9-Et_20-trigger-noPF.root",""); + std::ofstream f_out("tmp/stat-"+pdfWeightIndex+".dat"); + TFile f_in(filename, "read"); if(f_in.IsZombie()){ std::cerr << "File opening error: " << filename << std::endl; @@ -367,7 +373,12 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi="", int // return;; TH1F *data=GetMeanHist(dataHist[region], h_ref, "data_"+region, true); TH1F *mcSmeared=GetMeanHist(mcSmearedHist[region], h_ref, "mcSmeared_"+region); - + f_out << pdfWeightIndex + << "\t" << data->GetName() << "\t" << data->GetTitle() + << "\t" << data->GetEntries() << "\t" << data->Integral() + << "\t" << data->GetMean() << "\t" << data->GetMeanError() + << "\t" << data->GetRMS() << "\t" << data->GetRMSError() + << std::endl; // if(region.Contains("EE")){ // if(mc_all[1] == NULL) mc_all[1]=(TH1F *) mc->Clone("EE_mc_hist"); // else mc_all[1]->Add(mc); @@ -398,9 +409,10 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi="", int mc->Rebin(rebin); mcSmeared->Rebin(rebin); } - Plot(c, data,mc,mcSmeared,legend, region, filename, energy, lumi); + if(data->Integral()!=0 && mc->Integral()!=0 && mcSmeared->Integral()!=0) + Plot(c, data,mc,mcSmeared,legend, region, filename, energy, lumi); } - + // Plot(c, data_all[0],mc_all[0],mcSmeared_all[0],legend, "EBinclusive", filename, energy, lumi); // Plot(c, data_all[1],mc_all[1],mcSmeared_all[1],legend, "EEinclusive", filename, energy, lumi); // Plot(c, data_all[2],mc_all[2],mcSmeared_all[2],legend, "Allinclusive", filename, energy, lumi); @@ -458,7 +470,7 @@ void PlotMeanHist(TString filename, TString energy="8TeV", TString lumi="", int // std::cout << "\t\\\\" << std::endl; // } // std::cout << "\\end{pmatrix}" << std::endl; - + f_out.close(); return; } diff --git a/ZFitter/macro/stability.C b/ZFitter/macro/stability.C index ac93c8c0538..0c5b2b38bed 100644 --- a/ZFitter/macro/stability.C +++ b/ZFitter/macro/stability.C @@ -972,7 +972,8 @@ TCanvas *var_Stability(std::vector filenameList, std::vector l if(column>0){ pad2->cd(); } - legend->Draw(); + + if(legendList[0]!="") legend->Draw(); if(pt!=NULL) pt->Draw(); pad1->cd(); diff --git a/ZFitter/macro/standardDataMC.C b/ZFitter/macro/standardDataMC.C index ac44471fa1e..7f3b63cbddb 100644 --- a/ZFitter/macro/standardDataMC.C +++ b/ZFitter/macro/standardDataMC.C @@ -2,16 +2,20 @@ std::vector mcLabel_vec; mcLabel_vec.push_back("Madgraph"); mcLabel_vec.push_back("Powheg"); - //mcLabel_vec.push_back("Sherpa"); + mcLabel_vec.push_back("Sherpa"); - // c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,false); - c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,false); - c->SaveAs(outputPath+"etaEle-Et_25.eps"); - c->SaveAs(outputPath+"etaEle-Et_25.png"); - c->SaveAs(outputPath+"etaEle-Et_25.C"); + // pileup + c = PlotDataMC(data, signal, "nPV", "(30,0,30)", ""+commonCut, "", dataLabel+*l_itr, mcLabel, "nVtx", ""); + c->SaveAs(outputPath+"nPV.eps"); delete c; +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,false); +// c->SaveAs(outputPath+"etaEle-Et_25.eps"); +// //c->SaveAs(outputPath+"etaEle-Et_25.png"); +// c->SaveAs(outputPath+"etaEle-Et_25.C"); +// delete c; + } From 991509d8d4d6e4218f61a7f44088d908c22dc02d Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:48:17 +0100 Subject: [PATCH 355/475] fixing energy scale derivation procedure and additional checks --- ZFitter/script/energyScale.sh | 658 +++++++++++++++++++++++++++------- 1 file changed, 528 insertions(+), 130 deletions(-) diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 88a15f9ab3c..92616489c7d 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -11,7 +11,7 @@ commonCut=Et_20-trigger-noPF selection=loose invMass_var=invMass_SC_regrCorrSemiParV5_pho baseDir=test -updateOnly="--updateOnly" # --profileOnly --initFile=init.txt" +updateOnly="--updateOnly --fit_type_value=0" # --profileOnly --initFile=init.txt" #updateOnly="" ########################################################### regionFileStep1=data/regions/scaleStep1.dat @@ -71,7 +71,7 @@ do shift done - if [ ! -d "tmp" ];then mkdir tmp; fi +if [ ! -d "tmp" ];then mkdir tmp; fi # file with ntuples if [ -z "${configFile}" ];then @@ -117,9 +117,11 @@ case ${STEP} in echo " - 8: eta x R9 x Et, scale and smearings applied: closure test" ;; 1) STEP1=y;; + 1stability) STEP1Stability=y;; 2) STEP2=y;; - 3) STEP3=y;; #SLIDE=y;; + 3) STEP3=y;; 4) STEP4=y;; + # for systematics 4weight) STEP4=y; extension=weight;; 4medium) STEP4=y; extension=medium;; 4tight) STEP4=y; extension=tight;; @@ -127,11 +129,14 @@ case ${STEP} in 6) STEP6=y;; 8) STEP8=y;; 9) STEP9=y;; + 9nPV) STEP9=y; extension=nPV;; 10) STEP10=y;; + 12) STEP12=y;; madgraph) MCSAMPLE=y; extension=madgraph;; powheg) MCSAMPLE=y; extension=powheg;; sherpa) MCSAMPLE=y; extension=sherpa;; - pdfWeight) PDFWEIGHT=y;; + pdfWeight) PDFWEIGHT=y; extension=pdfWeight;; + pdfWeightZPt) PDFWEIGHT=y; extension=pdfWeightZPt;; gainSwitch) GAINSWITCH=y; extension=gainSwitch;echo "[OPTION] $extension";; gainSwitch2) GAINSWITCH=y; extension=gainSwitch2;echo "[OPTION] $extension";; gainSwitch3) GAINSWITCH=y; extension=gainSwitch3;echo "[OPTION] $extension";; @@ -145,7 +150,6 @@ case ${STEP} in 2-3stability) STEP2=y; STEP3=y; STEP3Stability=y; SLIDE=y;; slide) SLIDE=y;; 3stability) STEP3Stability=y;; - 1stability) STEP1Stability=y;; syst) SYSTEMATICS=y;; 3weight) STEP3WEIGHT=y; STEP3=y; extension=weight;; 2fit) STEP2FIT=y;; @@ -163,9 +167,11 @@ esac ##################### outFileStep1=step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat outFileStep2=step2${extension}-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat -outFileStep4=step4${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat +outFileStep4=step4-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat outFileStep7=step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat outFileStep8=step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat +outFileStep9=step9-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat +outFileStep12=step12-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat # Make sure that the files indicated in outFileList are in the same order of stepNameList outFileList=( @@ -174,6 +180,8 @@ outFileList=( "${outFileStep4}" "step8-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" "step9gainSwitch-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat" +"${outFileStep9}" +"${outFileStep12}" ) stepNameList=( "step1" @@ -181,6 +189,8 @@ stepNameList=( "step4" "step8" "step9gainSwitch" +"step9" +"step12" ) @@ -401,11 +411,11 @@ if [ -n "${STEP2}" ];then mkdir ${outDirData}/step2/${index}/fitres/ -p mkdir ${outDirData}/step2/${index}/img -p done -# bsub -q 2nd \ -# -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ -# -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ -# -J "${basenameEB} step2[1-50]" \ -# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEB}-done" + bsub -q 2nd \ + -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step2[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/fitres/ -p; mkdir ${outDirData}/step2/\$LSB_JOBINDEX/img -p; ./bin/ZFitter.exe -f $outDirData/step2/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} --selection=${selection} --outDirFitResMC=${outDirMC}/fitres --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step2/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step2/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEta || exit 1; touch ${outDirData}/step2/\$LSB_JOBINDEX/${basenameEB}-done" bsub -q 2nd \ -oo ${outDirData}/step2/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ @@ -431,22 +441,30 @@ if [ -n "${STEP2}" ];then echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C + + cat ${outDirData}/step2${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outDirTable}/${outFile} + grep -v absEta_0_1 ${outDirData}/step2${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outDirTable}/${outFile} + + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outDirTable}/${outFile} + fi - - ./bin/ZFitter.exe -f $outDirData/step2${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step2${extension}/img/ --outDirFitResData=${outDirData}/step2${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEta --plotOnly || exit 1 - exit 0 + sed -i 's|^EB-||;s|^EE-||' ${outFileStep1} grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' > tmp/res_corr.dat grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1| sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' >> tmp/res_corr.dat awk -f awk/prodScaleCorrSteps.awk tmp/res_corr.dat ${outFileStep1} > ${outDirTable}/${outFile} + echo "[STATUS] Plotting Data/MC" + ./bin/ZFitter.exe -f $outDirData/step2${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step2${extension}/img/ --outDirFitResData=${outDirData}/step2${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outDirTable}/${outFile} --corrEleType=HggRunEta --plotOnly || exit 1 + + #save root files with step1 corrections - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - --saveRootMacro --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/${outFile} || exit 1 - - mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ + --saveRootMacro --corrEleType HggRunEtaR9 \ + --corrEleFile ${outDirTable}/${outFile} || exit 1 + + mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ fi @@ -487,19 +505,24 @@ if [ -n "${STEP4}" ];then basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` regionFile=$regionFileEB - outFile=$outDirTable/${outFileStep4} + outFile=$outDirTable/outFile-step4${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat checkStepDep step2 + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step4${extension}/fitres" ];then mkdir ${outDirData}/step4${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step4${extension}/img" ];then mkdir ${outDirData}/step4${extension}/img -p; fi + if [ -e "${outDirTable}/params-step4-${commonCut}.txt" ];then initFile="--initFile=${outDirTable}/params-step4-${commonCut}.txt"; else initFile="" fi - cat $configFile \ - | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step4${extension}/`basename $configFile` - + cat $configFile \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9\t${outDirData}/step2/scaleEle_HggRunEtaR9_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step4${extension}/`basename $configFile` + mkSmearerCatSignal $regionFileEB mkSmearerCatSignal $regionFileEE mkSmearerCatSignal $regionFileStep4EBEE @@ -507,12 +530,7 @@ if [ -n "${STEP4}" ];then mkSmearerCatData $regionFileEE ${outDirData}/step4 $outDirData/step4${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 mkSmearerCatData $regionFileStep4EBEE ${outDirData}/step4 $outDirData/step4${extension}/`basename $configFile` --corrEleType=HggRunEtaR9 - if [ ! -e "${outFile}" -o -n "$FORCE" ];then - if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi - if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi - if [ ! -e "${outDirData}/step4${extension}/fitres" ];then mkdir ${outDirData}/step4${extension}/fitres -p; fi - if [ ! -e "${outDirData}/step4${extension}/img" ];then mkdir ${outDirData}/step4${extension}/img -p; fi if [ "${extension}" == "weight" ];then @@ -537,18 +555,18 @@ if [ -n "${STEP4}" ];then "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" - bsub -q 2nd \ - -oo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ - -eo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ - -J "${basenameEE} step4${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" +# bsub -q cmscaf1nd \ +# -oo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ +# -eo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ +# -J "${basenameEE} step4${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" # fi while [ "`bjobs -J \"${basenameEB} step4${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done while [ "`bjobs -J \"${basenameEE} step4${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + # ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root @@ -557,7 +575,7 @@ if [ -n "${STEP4}" ];then echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C @@ -568,11 +586,11 @@ if [ -n "${STEP4}" ];then cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} fi - -# ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 +exit 0 + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 -# ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile $regionFileStep4EBEE $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 @@ -979,12 +997,9 @@ if [ -n "${STEP9}" ];then regionFileEE=${regionFileStep5EE} basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` - outFile=${outDirTable}/outFile-step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat + outFile=${outDirTable}/outFile-step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9Et.dat - if [ ! -e "${outDirTable}/${outFileStep8}" ];then - echo "[ERROR] Impossible to run step9 without step8" >> /dev/stderr - exit 1 - fi + checkStepDep step8 if [ -e "${outDirTable}/params-step9-${commonCut}.txt" ];then initFile="--initFile=${outDirTable}/params-step9-${commonCut}.txt" @@ -1035,67 +1050,71 @@ if [ -n "${STEP9}" ];then # ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale # exit 0 - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ - -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ - -J "${basenameEB} step9${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ +# -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ +# -J "${basenameEB} step9${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" - exit 0 - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ - -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ - -J "${basenameEB} step9${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" +# exit 0 +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ +# -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ +# -J "${basenameEB} step9${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ - -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ - -J "`basename $regionFileStep4EB .dat` step9${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EB .dat`-done" +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ +# -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ +# -J "`basename $regionFileStep4EB .dat` step9${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EB .dat`-done" - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ - -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ - -J "`basename $regionFileStep4EE .dat` step9${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EE .dat`-done" +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ +# -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EE .dat` step9${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EE .dat`-done" - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ - -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ - -J "`basename $regionFileStep4EBEE .dat` step9${extension}[1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EBEE .dat`-done" +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ +# -eo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EBEE .dat` step9${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EBEE .dat`-done" while [ "`bjobs -J \"${basenameEB} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root +# ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + + ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root # while [ "`bjobs -J \"`basename $regionFileStep4EB .dat` step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root +# ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root # while [ "`bjobs -J \"`basename $regionFileStep4EE .dat` step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root +# ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root # while [ "`bjobs -J \"`basename $regionFileStep4EBEE .dat` step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root +# ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ######################################################33 echo "{" > tmp/fitProfiles.C echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step9${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C +exit 0 # cat ${outDirData}/step9${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} # grep -v absEta_0_1 ${outDirData}/step9${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} @@ -1104,20 +1123,33 @@ if [ ! -e "${outFile}" ];then cat "`echo $initFile | sed 's|.*=||'`" > ${outFile} fi fi + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ - -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ - -J "`basename $regionFileStep4EE .dat` step9${extension}" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | grep -v EB | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2 \1 |' > tmp/res_corr_step9.dat #| awk '{print $1, ($2-1)*100,$3*100}' + awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step9.dat ${outDirTable}/${outFileStep8} | sed 's|Et_20_|Et_0_|' > ${outDirTable}/${outFileStep9} - bsub -q 2nd \ - -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ - -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ - -J "`basename $regionFileStep4EBEE .dat` step9${extension}" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + #save root files with step1 corrections + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFileEE} \ + --saveCorrEleTree --corrEleType HggRunEtaR9Et \ + --corrEleFile ${outDirTable}/${outFileStep9} || exit 1 + + mv tmp/scaleEle_HggRunEtaR9Et_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step9/ + + exit 0 +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ +# -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EE .dat` step9${extension}" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + +# bsub -q 2nd \ +# -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ +# -eo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EBEE .dat` step9${extension}" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" bsub -q 2nd \ -oo ${outDirData}/step9${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileEB .dat`-stdout.log \ @@ -1136,7 +1168,7 @@ fi exit 0 - ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 # ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 @@ -1148,6 +1180,347 @@ exit 0 # ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 +fi + + +if [ -n "${STEP12}" ];then + # this is the second iteration of Et dependent scale corrections in EE with constant smearing fixed from step4 + # this step follows step9 + + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/outFile-step12${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9Et.dat + + checkStepDep step9 + + if [ -e "${outDirTable}/params-step12-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step12-${commonCut}.txt" + else + echo "[WARNING] init file ${outDirTable}/params-step12-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step8" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step12-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step8" >> /dev/stdout + + exit 1 + fi + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step12${extension}/fitres" ];then mkdir ${outDirData}/step12${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step12${extension}/img" ];then mkdir ${outDirData}/step12${extension}/img -p; fi + + cat $configFile \ + | grep -v 'scaleEle' \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step9/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step12${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEE ${outDirData}/step12 $outDirData/step12${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + + touch ${outFile} + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + for index in `seq 1 50` + do + mkdir ${outDirData}/step12${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step12${extension}/${index}/img -p + done + +# ./bin/ZFitter.exe -f $outDirData/step12${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step12${extension}/$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step12${extension}/$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale + +# exit 0 + bsub -q 2nd \ + -oo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEB} step12${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step12${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1; touch ${outDirData}/step12${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + +# exit 0 +# bsub -q 2nd \ +# -oo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ +# -eo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ +# -J "${basenameEB} step12${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step12${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; touch ${outDirData}/step12${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ +# -eo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ +# -J "`basename $regionFileStep4EB .dat` step12${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step12${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step12${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ +# -eo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EE .dat` step12${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step12${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step12${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EE .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ +# -eo ${outDirData}/step12${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EBEE .dat` step12${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step12${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step12${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step12${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EBEE .dat`-done" + + while [ "`bjobs -J \"${basenameEB} step12${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + +# ./script/haddTGraph.sh -o ${outDirData}/step12${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step12${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + + ./script/haddTGraph.sh -o ${outDirData}/step12${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step12${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EB .dat` step12${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# ./script/haddTGraph.sh -o ${outDirData}/step12${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root ${outDirData}/step12${extension}/*/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EE .dat` step12${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# ./script/haddTGraph.sh -o ${outDirData}/step12${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root ${outDirData}/step12${extension}/*/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EBEE .dat` step12${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# ./script/haddTGraph.sh -o ${outDirData}/step12${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ${outDirData}/step12${extension}/*/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step12${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step12${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step12${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step12${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step12${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + +# cat ${outDirData}/step12${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} + + grep -v absEta_0_1 ${outDirData}/step12${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config |grep -v EB > ${outFile} + sed -i 's|Et_20_|Et_0_|' $outFile + cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} +if [ ! -e "${outFile}" ];then + cat "`echo $initFile | sed 's|.*=||'`" > ${outFile} +fi + + fi + +# ./bin/ZFitter.exe -f $outDirData/step12${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step12${extension}/img/ --outDirFitResData=${outDirData}/step12${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# cat ${outDirTable}/${outFileStep9} +# exit 0 + grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | grep -v EB | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2 \1 |' > tmp/res_corr_step12.dat + awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step12.dat ${outDirTable}/${outFileStep9} | sed 's|Et_20_|Et_0_|;s|absEta_2_2.5-bad-Et_55_100|absEta_2_2.5-bad-Et_55_20000|' > ${outDirTable}/${outFileStep12} + + #save root files with step1 corrections +# cat ${configFile} |grep -v scaleEle > tmp/tmpConfigFile-step12.dat +# cat ${outDirTable}/${outFileStep9} +# exit 0 + ./bin/ZFitter.exe -f tmp/tmpConfigFile-step12.dat --regionsFile ${regionFileEE} \ + --saveCorrEleTree --corrEleType HggRunEtaR9Et \ + --corrEleFile ${outDirTable}/${outFileStep12} || exit 1 + + mv tmp/scaleEle_HggRunEtaR9Et_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step12/ + + exit 0 + +fi + +if [ -n "${STEP13}" ];then + # this is the second iteration of Et dependent scale corrections in EE with constant smearing fixed from step4 + # this step follows step9 + + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then + newSelection=${extension} + else + newSelection=${selection} + fi + + #eta x R9 with smearing method + regionFileEB=${regionFileStep5EB} + regionFileEE=${regionFileStep5EE} + basenameEB=`basename $regionFileEB .dat` + basenameEE=`basename $regionFileEE .dat` + outFile=${outDirTable}/outFile-step13${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9Et.dat + + checkStepDep step12 + + if [ -e "${outDirTable}/params-step12-${commonCut}.txt" ];then + initFile="--initFile=${outDirTable}/params-step12-${commonCut}.txt" + else + echo "[WARNING] init file ${outDirTable}/params-step12-${commonCut}.txt not found" >> /dev/stderr + echo " creating file from results of step12" >> /dev/stderr + echo "[WARNING] init file ${outDirTable}/params-step12-${commonCut}.txt not found" >> /dev/stdout + echo " creating file from results of step12" >> /dev/stdout + + exit 1 + fi + + if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi + if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi + if [ ! -e "${outDirData}/step13${extension}/fitres" ];then mkdir ${outDirData}/step13${extension}/fitres -p; fi + if [ ! -e "${outDirData}/step13${extension}/img" ];then mkdir ${outDirData}/step13${extension}/img -p; fi + + cat $configFile \ + | grep -v 'scaleEle' \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step12/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step13${extension}/`basename $configFile` + + mkSmearerCatSignal $regionFileEE + mkSmearerCatData $regionFileEE ${outDirData}/step13 $outDirData/step13${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et + + touch ${outFile} + if [ ! -e "${outFile}" -o -n "$FORCE" ];then + + + if [ "${extension}" == "weight" ];then + updateOnly="$updateOnly --useR9weight" + fi + + # save the corrections in root files + # this way I do not reproduce the ntuples with the corrections any time + for index in `seq 1 50` + do + mkdir ${outDirData}/step13${extension}/${index}/fitres/ -p + mkdir ${outDirData}/step13${extension}/${index}/img -p + done + +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step13${extension}/$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale + +# exit 0 + bsub -q 2nd \ + -oo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEB} step13${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1; touch ${outDirData}/step13${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + +# exit 0 +# bsub -q 2nd \ +# -oo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ +# -eo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ +# -J "${basenameEB} step13${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; touch ${outDirData}/step13${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ +# -eo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ +# -J "`basename $regionFileStep4EB .dat` step13${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step13${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EB .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ +# -eo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EE .dat` step13${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step13${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EE .dat`-done" + +# bsub -q 2nd \ +# -oo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ +# -eo ${outDirData}/step13${extension}/%I/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EBEE .dat` step13${extension}[1-50]" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step13${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --profileOnly || exit 1; touch ${outDirData}/step13${extension}/\$LSB_JOBINDEX/`basename $regionFileStep4EBEE .dat`-done" + + while [ "`bjobs -J \"${basenameEB} step13${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done + fi +# ./script/haddTGraph.sh -o ${outDirData}/step13${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step13${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + + ./script/haddTGraph.sh -o ${outDirData}/step13${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step13${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EB .dat` step13${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# ./script/haddTGraph.sh -o ${outDirData}/step13${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root ${outDirData}/step13${extension}/*/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EE .dat` step13${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# ./script/haddTGraph.sh -o ${outDirData}/step13${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root ${outDirData}/step13${extension}/*/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root + +# while [ "`bjobs -J \"`basename $regionFileStep4EBEE .dat` step13${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done +# ./script/haddTGraph.sh -o ${outDirData}/step13${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root ${outDirData}/step13${extension}/*/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root + + ######################################################33 + echo "{" > tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C + echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step13${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step13${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step13${extension}/fitres/outProfile-`basename $regionFileStep4EB .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step13${extension}/fitres/outProfile-`basename $regionFileStep4EE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step13${extension}/fitres/outProfile-`basename $regionFileStep4EBEE .dat`-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C + echo "}" >> tmp/fitProfiles.C + root -l -b -q tmp/fitProfiles.C + +exit 0 +# cat ${outDirData}/step13${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} +# grep -v absEta_0_1 ${outDirData}/step13${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} + +# cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} +if [ ! -e "${outFile}" ];then + cat "`echo $initFile | sed 's|.*=||'`" > ${outFile} +fi + + + ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + + exit 0 +# bsub -q 2nd \ +# -oo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stdout.log \ +# -eo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EE .dat` step13${extension}" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + +# bsub -q 2nd \ +# -oo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stdout.log \ +# -eo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EBEE .dat`-stderr.log \ +# -J "`basename $regionFileStep4EBEE .dat` step13${extension}" \ +# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + + bsub -q 2nd \ + -oo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileEB .dat`-stdout.log \ + -eo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileEB .dat`-stderr.log \ + -J "`basename $regionFileEB .dat` step13${extension}" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + + + bsub -q 2nd \ + -oo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stdout.log \ + -eo ${outDirData}/step13${extension}/fitres/`basename ${outFile} .dat`-`basename $regionFileStep4EB .dat`-stderr.log \ + -J "`basename $regionFileStep4EB .dat` step13${extension}" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1" + + + exit 0 + ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +# ./bin/ZFitter.exe -f $outDirData/step13${extension}/`basename $configFile` --regionsFile ${regionFileStep4EBEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step13${extension}/img/ --outDirFitResData=${outDirData}/step13${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9Et --plotOnly || exit 1 + +exit 0 +# ./bin/ZFitter.exe -f $outDirData/step7${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step7${extension}/img/ --outDirFitResData=${outDirData}/step7${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + # grep scale ${outFile} | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\(Et_[0-9]*_[0-9]*\)-\([^ \t]*\)|\2 \1 |' > tmp/res_corr_step7.dat #| awk '{print $1, ($2-1)*100,$3*100}' # awk -f awk/prodScaleCorrSteps.awk tmp/res_corr_step7.dat ${outDirTable}/${outFileStep2} > ${outDirTable}/step7-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.dat @@ -1168,6 +1541,8 @@ exit 0 fi + + if [ -n "${STEP8}" ];then # Apply Et dependent corrections and derive the residuals due to the categorization @@ -1623,7 +1998,7 @@ if [ -n "${GAINSWITCH}" ];then mkSmearerCatSignal $regionFileEB mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et - exit 0 + if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi @@ -1642,8 +2017,8 @@ if [ -n "${GAINSWITCH}" ];then mkdir ${outDirData}/step9${extension}/${index}/img -p done # ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale || exit 1; -# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --onlyScale --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et || exit 1; -# exit 0 + ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --constTermFix --onlyScale --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --smearerFit || exit 1; + exit 0 bsub -q 2nd \ -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ @@ -1821,7 +2196,7 @@ fi ############################################################ if [ -n "${PDFWEIGHT}" ];then - extension=pdfWeight + #stochastic smearing but with non Et dependent scale corrections if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then newSelection=${extension} @@ -1865,21 +2240,30 @@ if [ -n "${PDFWEIGHT}" ];then if [ ! -e "${outDirData}/step9/fitres" ];then mkdir ${outDirData}/step9/fitres -p; fi if [ ! -e "${outDirData}/step9/img" ];then mkdir ${outDirData}/step9/img -p; fi - cat $configFile |grep -v '#' \ - | grep -v "r9weights" | grep -v "scaleEle" | grep -v "r9weights" \ - | sort | uniq > $outDirData/step9${extension}/`basename $configFile` -# | sed '/^d/ d' \ -# | sed "/^${sample}/{p; s|^s|d|}" \ - -# cat $outDirData/step9${extension}/`basename $configFile` - + + case $extension in + pdfWeightZPt) + cat $configFile |grep -v '#' \ + | grep -v "r9weights" \ + | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + ;; + pdfWeight) + cat $configFile |grep -v '#' \ + | grep -v "r9weights" \ + | sed '/^d/ d' \ + | sed "/^${sample}/{p; s|^s|d|}" \ + | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + ;; + esac + mkSmearerCatSignal $regionFileEB #mkSmearerCatSignal $regionFileEE # mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et #mkSmearerCatData $regionFileEE ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9OA -# exit 0 - touch ${outFile} + cat $outDirData/step9${extension}/`basename $configFile` + + touch ${outFile} if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi @@ -1895,22 +2279,30 @@ if [ -n "${PDFWEIGHT}" ];then # this way I do not reproduce the ntuples with the corrections any time - for pdfWeightIndex in 0 1 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 + for pdfWeightIndex in 0 #1 0 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 ##3 4 5 6 13 14 15 16 23 24 25 27 28 29 30 33 34 do for index in `seq 1 50` do mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/fitres/ -p mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/img -p done + mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/ -p + mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/img -p - ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=1 || exit 1; - exit 0 - bsub -q 2nd \ + bsub -q cmscaf1nh \ + -oo ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ + -eo ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ + -J "${basenameEB} step9${extension} $pdfWeightIndex" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter2.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=${pdfWeightIndex} --plotOnly || exit 1" + #--useZPtweight --ZPtWeightFile=data/ZPtWeights.root || exit 1"; + continue; + exit 0 + bsub -q cmscaf1nd \ -oo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ -eo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ -J "${basenameEB} step9${extension} $pdfWeightIndex [1-50]" \ "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=1 || exit 1" +./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=${pdfWeightIndex} --useZPtweight --ZPtWeightFile=data/ZPtWeights.root || exit 1" # bsub -q 2nd \ # -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ @@ -1919,11 +2311,12 @@ if [ -n "${PDFWEIGHT}" ];then # "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; # ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step9${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" done + exit 0 while [ "`bjobs -J \"${basenameEB} step9${extension}*\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done # while [ "`bjobs -J \"${basenameEE} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done exit 0 fi - for pdfWeightIndex in 0 1 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 + for pdfWeightIndex in 1 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 do mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/ -p mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/img -p @@ -1968,7 +2361,7 @@ if [ -n "${PDFWEIGHT}" ];then fi -exit 0 +#exit 0 # if [ -n "${STEP5}" ];then # # traditional resolution categories, Et bin categorization, only profile and histograms @@ -2398,25 +2791,30 @@ if [ -n "${SYSTEMATICS}" ];then regionFile=data/regions/systematics.dat if [ ! -e "${outDirMC}/fitres" ];then mkdir ${outDirMC}/fitres -p; fi if [ ! -e "${outDirMC}/img" ];then mkdir ${outDirMC}/img -p; fi - if [ ! -e "${outDirData}/step3/fitres" ];then mkdir ${outDirData}/step3/fitres -p; fi - if [ ! -e "${outDirData}/step3/img" ];then mkdir ${outDirData}/step3/img -p; fi + if [ ! -e "${outDirData}/step9/fitres" ];then mkdir ${outDirData}/step9/fitres -p; fi + if [ ! -e "${outDirData}/step9/img" ];then mkdir ${outDirData}/step9/img -p; fi + cat $configFile \ + | grep -v 'scaleEle' \ + | sed "/selected/{p; s|^\(d[1-9]\)\tselected.*|\1\tscaleEle_HggRunEtaR9Et\t${outDirData}/step8/scaleEle_HggRunEtaR9Et_\1-`basename $configFile .dat`.root|}" | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFile} $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/fitres --corrEleType=HggRunEtaR9Et > ${outDirData}/log/systematics-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9Et.log || exit 1 + +# ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ +# $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ +# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step9/fitres \ +# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step9/img \ +# --corrEleType HggRunEtaR9Et --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - $isOdd $updateOnly --invMass_var ${invMass_var} --commonCut ${commonCut} \ - --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres \ - --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/step3/img \ - --corrEleType HggRunEtaR9 --corrEleFile ${outDirTable}/step2-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.dat > ${outDirData}/log/systematics-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.log || exit 1 - - ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step3/fitres > ${outDirTable}/systematics-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 +tableFile=${outDirTable}/systematics-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex + ./script/makeTable.sh --regionsFile ${regionFile} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/step9/fitres > ${outDirTable}/systematics-${invMass_var}-${selection}-${commonCut}-HggRunEtaR9.tex || exit 1 for xVar in nPV do - if [ ! -e "${outDirData}/step3/img/stability/$xVar/$PERIOD" ];then - mkdir ${outDirData}/step3/img/stability/$xVar/$PERIOD/ -p + if [ ! -e "${outDirData}/step9/img/stability/$xVar/$PERIOD" ];then + mkdir ${outDirData}/step9/img/stability/$xVar/$PERIOD/ -p fi - ./script/stability.sh -t ${tableFile} \ - --outDirImgData ${outDirData}/step3/img/stability/$xVar/$PERIOD/ -x $xVar -y peak --column 51 $xMin $xMax || exit 1 + ./script/stability.sh -t ${tableFile} --outDirImgData=${outDirData}/step9/img/stability/$xVar/$PERIOD/ -x $xVar -y peak --column 4 $xMin $xMax || exit 1 # ./script/stability.sh -t ${tableFile} \ # --outDirImgData ${outDirData}/img/stability/$xVar/$PERIOD/ -x $xVar -y scaledWidth --column 51 $xMin $xMax || exit 1 done From 35627d5f519efdc943be96001f9f4074b484af22 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:48:33 +0100 Subject: [PATCH 356/475] fixing energy scale derivation procedure and additional checks --- ZFitter/script/functions.sh | 50 ++++++++++++++++++++++++++--- ZFitter/script/justOnce/smearing.sh | 6 ++-- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh index 2b6e1033e05..3bd1fb74506 100644 --- a/ZFitter/script/functions.sh +++ b/ZFitter/script/functions.sh @@ -57,9 +57,15 @@ mkSmearerCatSignal(){ echo "[STATUS] Creating smearerCat for signal: `basename $configFile .dat` `basename $1 .dat`" ./bin/ZFitter.exe -f ${configFile} --regionsFile=$1 \ --saveRootMacro --addBranch=smearerCat_s || exit 1 - mv tmp/smearerCat_`basename $1 .dat`_s*-`basename $configFile .dat`.root data/smearerCat/ || exit 1 - echo "put the smearerCat ntuples to the config file" - exit 0 + basenameConfig=`basename $1 .dat` + for file in tmp/smearerCat_${basenameConfig}_s*-`basename $configFile .dat`.root + do + + tag=`echo $file | sed "s|tmp/smearerCat_${basenameConfig}_s\([0-9]\)-.*|s\1|"` + + mv $file data/smearerCat/ || exit 1 + echo -e "$tag\tsmearerCat_${basenameConfig}\tdata/smearerCat/`echo $file | sed 's|tmp/||'`" >> $configFile + done fi # tags=`grep -v '#' $configFile | sed -r 's|[ ]+|\t|g; s|[\t]+|\t|g' | cut -f 1 | sort | uniq | grep [s,d][1-9]` @@ -140,4 +146,40 @@ checkStepDep(){ exit 1 fi done -} \ No newline at end of file +} + + + + +mkSmearEleSignal(){ + #$1: regionFile + #$2: configFile + #$3: smearEleFile + #$4: smearEleType + #$5: smearCBAlpha + basenameConfig=`basename $2 .dat` + + if [ ! -e "data/other/smearEle/smearEle_$4_s1-${basenameConfig}.root" -o ! -e "data/other/smearEle/smearEle_$4_s2-${basenameConfig}.root" -o ! -e "data/other/smearEle/smearEle_$4_s3-${basenameConfig}.root" ];then + echo "[STATUS] Creating smearEle for signal: ${basenameConfig} `basename $1 .dat`" + ./bin/ZFitter.exe -f $2 --regionsFile=$1 \ + --saveRootMacro --noPU \ + --smearEleType=$4 --smearEleFile=$3 --smearingCBAlpha=$5 --smearingCBPower=$6 || exit 1 #> ${baseDir}/treeGen.log || exit 1 + + for file in tmp/smearEle_$4_s*-${basenameConfig}.root + do + + tag=`echo $file | sed "s|tmp/smearEle_$4_s\([0-9]\)-.*|s\1|"` + + mv $file data/other/smearEle/ || exit 1 + echo -e "$tag\tsmearEle_$4\tdata/other/smearEle/`echo $file | sed 's|tmp/||'`" >> $2 + done + fi + +# for file in data/other/smearEle/smearEle_$4_s*-${basenameConfig}.root +# do + +# tag=`echo $file | sed "s|data/other/smearEle/smearEle_.*_s\([0-9]\)-.*|s\1|"` + +# echo -e "$tag\tsmearEle_$4\tdata/other/`echo $file | sed 's|tmp/||'`" >> $2 +# done +} diff --git a/ZFitter/script/justOnce/smearing.sh b/ZFitter/script/justOnce/smearing.sh index 49ad2151be0..894e14797ee 100755 --- a/ZFitter/script/justOnce/smearing.sh +++ b/ZFitter/script/justOnce/smearing.sh @@ -5,15 +5,15 @@ #regionsFile=scaleStep2smearing_7 queue=$1 nEventsPerToy=factorizedSherpaFixed_DataSeedFixed_smooth_autobin_smearingEt_${queue} -nSmearToy=10 +nSmearToy=30 commonCut=Et_20-trigger-noPF #nEventsPerToy=factorized if [ -z "${queue}" ];then local=y; fi -for regionsFile in scaleStep2smearing_9 #scaleStep2smearing_1 scaleStep2smearing_2 # +for regionsFile in scaleStep2smearing_1 #scaleStep2smearing_9 #scaleStep2smearing_1 scaleStep2smearing_2 # do -dir=test/dato/fitres/Hgg_Et-toys/${regionsFile} + dir=test/dato/fitres/toys/${regionsFile} #alphaConst=C for scale in 1.00 1.01 0.99 1.02 0.98 1.05 0.95 From 919e3eb95821c1aef47f73203d1280e6a798037f Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:49:34 +0100 Subject: [PATCH 357/475] fixing CB smearing --- ZFitter/src/EnergyScaleCorrection_class.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ZFitter/src/EnergyScaleCorrection_class.cc b/ZFitter/src/EnergyScaleCorrection_class.cc index 9cb262a795d..d59acf9dcb1 100644 --- a/ZFitter/src/EnergyScaleCorrection_class.cc +++ b/ZFitter/src/EnergyScaleCorrection_class.cc @@ -109,7 +109,7 @@ void EnergyScaleCorrection_class::Add(TString category_, int runMin_, int runMax return; } - /** + /* * File structure: * category "runNumber" runMin runMax deltaP err_deltaP * @@ -360,8 +360,8 @@ float EnergyScaleCorrection_class::getSmearingSigma(int runNumber, float energy, smearings_not_defined[category]=corr; } corr_itr = smearings_not_defined.find(category); - // std::cout << "[ERROR] Category not found: " << std::endl; - // std::cout << category << std::endl; + std::cerr << "[WARNING] Category not found: " << std::endl; + std::cerr << category << std::endl; // exit(1); } @@ -404,7 +404,13 @@ float EnergyScaleCorrection_class::getSmearing(int runNumber, float energy, bool float smear =getSmearingSigma(runNumber, energy, isEBEle, R9Ele, etaSCEle); if(smear==0) return 0; - if( smear!=smear) exit(1); + if( smear!=smear) return 0; +// correctionCategory_class category(runNumber, etaSCEle, R9Ele, energy/cosh(etaSCEle)); +// correction_map_t::const_iterator corr_itr = smearings.find(category); + +// std::cerr << category << std::endl << corr_itr->second << std::endl; +// exit(1); +// } if(smearingType_==1){ if(sigma.getVal()!=smear){ sigma.setVal(smear); From 0c3f5abaad5e2b7bf62097e04e6d04b10b323451 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:49:51 +0100 Subject: [PATCH 358/475] SingleEle option for Et categorization --- ZFitter/src/ElectronCategory_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/src/ElectronCategory_class.cc b/ZFitter/src/ElectronCategory_class.cc index 38d0fe83cb6..df5fc3016e9 100644 --- a/ZFitter/src/ElectronCategory_class.cc +++ b/ZFitter/src/ElectronCategory_class.cc @@ -627,7 +627,7 @@ std::set ElectronCategory_class::GetCutSet(TString region){ //--------------- Et - if(string.Contains("Et_")){ + if(string.Contains("Et_")||string.Contains("EtSingleEle_")){ TObjArray *splitted = string.Tokenize("_"); if(splitted->GetEntries() != 3 && splitted->GetEntries() != 2){ std::cerr << "ERROR: incomplete Et region definition" << std::endl; From 6258c8a6b25d2ebc881a5192e18c47a98ed988ed Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 12:50:24 +0100 Subject: [PATCH 359/475] removed directories from documentation --- fulldoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fulldoc b/fulldoc index 474f48dbb0d..90282996485 100644 --- a/fulldoc +++ b/fulldoc @@ -468,7 +468,7 @@ INPUT = ZNtupleDumper ZFitter ./ # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py -FILE_PATTERNS = *.hh *.cc *.cpp README *_cfi.py *_cff.py *.txt +FILE_PATTERNS = *.h *.hh *.cc *.cpp README *_cfi.py *_cff.py *.txt # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -480,7 +480,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = ZFitter/test/ # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded From 04ac3f5280df420da22f7e621b06e25adc4a92f2 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 13:11:26 +0100 Subject: [PATCH 360/475] new config files --- .../data/validation/22Jan2012-stdMCAll.dat | 35 ++++ .../data/validation/toyMC-smearingMethod.dat | 183 ++++++++++++++++++ 2 files changed, 218 insertions(+) create mode 100644 ZFitter/data/validation/22Jan2012-stdMCAll.dat create mode 100644 ZFitter/data/validation/toyMC-smearingMethod.dat diff --git a/ZFitter/data/validation/22Jan2012-stdMCAll.dat b/ZFitter/data/validation/22Jan2012-stdMCAll.dat new file mode 100644 index 00000000000..2c82560d912 --- /dev/null +++ b/ZFitter/data/validation/22Jan2012-stdMCAll.dat @@ -0,0 +1,35 @@ +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim/allRange/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-allRange.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim/allRange/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-allRange.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim/allRange/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-allRange.root +# +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d4 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/1-1-Summer12_DD3.true.root +##### PU trees +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-stdMCAll.root +s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-stdMCAll.root +s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-stdMCAll.root +##### Scale correction trees +s1 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s1-22Jan2012-stdMCAll.root +s2 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s2-22Jan2012-stdMCAll.root +s3 smearerCat_scaleStep2smearing_1 data/smearerCat/smearerCat_scaleStep2smearing_1_s3-22Jan2012-stdMCAll.root +s1 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s1-22Jan2012-stdMCAll.root +s2 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s2-22Jan2012-stdMCAll.root +s3 smearerCat_scaleStep2smearing_2 data/smearerCat/smearerCat_scaleStep2smearing_2_s3-22Jan2012-stdMCAll.root +# +s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-stdMCAll.root +s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-stdMCAll.root +s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-stdMCAll.root +s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-stdMCAll.root +s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-stdMCAll.root +s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-stdMCAll.root +# +s1 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s1-22Jan2012-stdMCAll.root +s2 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s2-22Jan2012-stdMCAll.root +s3 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s3-22Jan2012-stdMCAll.root +# diff --git a/ZFitter/data/validation/toyMC-smearingMethod.dat b/ZFitter/data/validation/toyMC-smearingMethod.dat new file mode 100644 index 00000000000..dc9ab4be6ed --- /dev/null +++ b/ZFitter/data/validation/toyMC-smearingMethod.dat @@ -0,0 +1,183 @@ +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +# +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +# +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +# +d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root +d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root +d3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012C-22Jan-v1/198022-203742/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012C-22Jan-v1-198022-203742.root +d4 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012D-22Jan-v1/203777-208686/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012D-22Jan-v1-203777-208686.root +########### Friend trees +##### PU histograms +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-196531-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/198022-203742-22Jan_v1.69300.true.root +d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/203777-208686-22Jan_v1.69300.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/194533-194533-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/200519-200519-Summer12_DD3_runDep.true.root +s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859-206859-Summer12_DD3_runDep.true.root +##### PU trees +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root +s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll_v3.root +s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root +##### Scale correction trees +d1 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d1-22Jan2012-runDepMCAll_v3.root +d2 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d2-22Jan2012-runDepMCAll_v3.root +d3 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d3-22Jan2012-runDepMCAll_v3.root +d4 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d4-22Jan2012-runDepMCAll_v3.root +# +s1 smearEle_stochastic data/other/smearEle_stochastic_s1-22Jan2012-runDepMCAll_v3.root +s2 smearEle_stochastic data/other/smearEle_stochastic_s2-22Jan2012-runDepMCAll_v3.root +s3 smearEle_stochastic data/other/smearEle_stochastic_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_gainSwitch_2 data/smearerCat/smearerCat_gainSwitch_2_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_2 data/smearerCat/smearerCat_gainSwitch_2_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_2 data/smearerCat/smearerCat_gainSwitch_2_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_gainSwitch_3 data/smearerCat/smearerCat_gainSwitch_3_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_3 data/smearerCat/smearerCat_gainSwitch_3_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_3 data/smearerCat/smearerCat_gainSwitch_3_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_gainSwitch_4 data/smearerCat/smearerCat_gainSwitch_4_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_4 data/smearerCat/smearerCat_gainSwitch_4_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_4 data/smearerCat/smearerCat_gainSwitch_4_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s3-22Jan2012-runDepMCAll_v3.root +# +#d1 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d1-22Jan2012-runDepMCAll_v2.root +#d2 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d2-22Jan2012-runDepMCAll_v2.root +#d3 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d3-22Jan2012-runDepMCAll_v2.root +#d4 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d4-22Jan2012-runDepMCAll_v2.root +#s1 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_s1-22Jan2012-runDepMCAll_v2.root +#s2 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_s2-22Jan2012-runDepMCAll_v2.root +#s3 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_s3-22Jan2012-runDepMCAll_v2.root +s1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s3-22Jan2012-runDepMCAll_v3.root +### +d1 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d1-22Jan2012-runDepMCAll_v3.root +d2 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d2-22Jan2012-runDepMCAll_v3.root +d3 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d3-22Jan2012-runDepMCAll_v3.root +d4 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d4-22Jan2012-runDepMCAll_v3.root +s1 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s1-22Jan2012-runDepMCAll_v3.root +s2 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s2-22Jan2012-runDepMCAll_v3.root +s3 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s3-22Jan2012-runDepMCAll_v3.root +## +s1 ZPtWeight data/other/ZPtWeight_s1-22Jan2012-runDepMCAll_v3.root +s2 ZPtWeight data/other/ZPtWeight_s2-22Jan2012-runDepMCAll_v3.root +s3 ZPtWeight data/other/ZPtWeight_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll_v3.root +s1 smearEle_CB-1-0.5 data/other/smearEle/smearEle_CB-1-0.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-1-0.5 data/other/smearEle/smearEle_CB-1-0.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-1-0.5 data/other/smearEle/smearEle_CB-1-0.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-5-0.5 data/other/smearEle/smearEle_CB-5-0.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-5-0.5 data/other/smearEle/smearEle_CB-5-0.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-5-0.5 data/other/smearEle/smearEle_CB-5-0.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-10-0.5 data/other/smearEle/smearEle_CB-10-0.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-10-0.5 data/other/smearEle/smearEle_CB-10-0.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-10-0.5 data/other/smearEle/smearEle_CB-10-0.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-20-0.5 data/other/smearEle/smearEle_CB-20-0.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-20-0.5 data/other/smearEle/smearEle_CB-20-0.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-20-0.5 data/other/smearEle/smearEle_CB-20-0.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-40-0.5 data/other/smearEle/smearEle_CB-40-0.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-40-0.5 data/other/smearEle/smearEle_CB-40-0.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-40-0.5 data/other/smearEle/smearEle_CB-40-0.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-1-1 data/other/smearEle/smearEle_CB-1-1_s1-toyMC-smearingMethod.root +s2 smearEle_CB-1-1 data/other/smearEle/smearEle_CB-1-1_s2-toyMC-smearingMethod.root +s3 smearEle_CB-1-1 data/other/smearEle/smearEle_CB-1-1_s3-toyMC-smearingMethod.root +s1 smearEle_CB-5-1 data/other/smearEle/smearEle_CB-5-1_s1-toyMC-smearingMethod.root +s2 smearEle_CB-5-1 data/other/smearEle/smearEle_CB-5-1_s2-toyMC-smearingMethod.root +s3 smearEle_CB-5-1 data/other/smearEle/smearEle_CB-5-1_s3-toyMC-smearingMethod.root +s1 smearEle_CB-10-1 data/other/smearEle/smearEle_CB-10-1_s1-toyMC-smearingMethod.root +s2 smearEle_CB-10-1 data/other/smearEle/smearEle_CB-10-1_s2-toyMC-smearingMethod.root +s3 smearEle_CB-10-1 data/other/smearEle/smearEle_CB-10-1_s3-toyMC-smearingMethod.root +s1 smearEle_CB-20-1 data/other/smearEle/smearEle_CB-20-1_s1-toyMC-smearingMethod.root +s2 smearEle_CB-20-1 data/other/smearEle/smearEle_CB-20-1_s2-toyMC-smearingMethod.root +s3 smearEle_CB-20-1 data/other/smearEle/smearEle_CB-20-1_s3-toyMC-smearingMethod.root +s1 smearEle_CB-40-1 data/other/smearEle/smearEle_CB-40-1_s1-toyMC-smearingMethod.root +s2 smearEle_CB-40-1 data/other/smearEle/smearEle_CB-40-1_s2-toyMC-smearingMethod.root +s3 smearEle_CB-40-1 data/other/smearEle/smearEle_CB-40-1_s3-toyMC-smearingMethod.root +s1 smearEle_CB-1-1.5 data/other/smearEle/smearEle_CB-1-1.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-1-1.5 data/other/smearEle/smearEle_CB-1-1.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-1-1.5 data/other/smearEle/smearEle_CB-1-1.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-5-1.5 data/other/smearEle/smearEle_CB-5-1.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-5-1.5 data/other/smearEle/smearEle_CB-5-1.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-5-1.5 data/other/smearEle/smearEle_CB-5-1.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-10-1.5 data/other/smearEle/smearEle_CB-10-1.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-10-1.5 data/other/smearEle/smearEle_CB-10-1.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-10-1.5 data/other/smearEle/smearEle_CB-10-1.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-20-1.5 data/other/smearEle/smearEle_CB-20-1.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-20-1.5 data/other/smearEle/smearEle_CB-20-1.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-20-1.5 data/other/smearEle/smearEle_CB-20-1.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-40-1.5 data/other/smearEle/smearEle_CB-40-1.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-40-1.5 data/other/smearEle/smearEle_CB-40-1.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-40-1.5 data/other/smearEle/smearEle_CB-40-1.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-1-2 data/other/smearEle/smearEle_CB-1-2_s1-toyMC-smearingMethod.root +s2 smearEle_CB-1-2 data/other/smearEle/smearEle_CB-1-2_s2-toyMC-smearingMethod.root +s3 smearEle_CB-1-2 data/other/smearEle/smearEle_CB-1-2_s3-toyMC-smearingMethod.root +s1 smearEle_CB-5-2 data/other/smearEle/smearEle_CB-5-2_s1-toyMC-smearingMethod.root +s2 smearEle_CB-5-2 data/other/smearEle/smearEle_CB-5-2_s2-toyMC-smearingMethod.root +s3 smearEle_CB-5-2 data/other/smearEle/smearEle_CB-5-2_s3-toyMC-smearingMethod.root +s1 smearEle_CB-10-2 data/other/smearEle/smearEle_CB-10-2_s1-toyMC-smearingMethod.root +s2 smearEle_CB-10-2 data/other/smearEle/smearEle_CB-10-2_s2-toyMC-smearingMethod.root +s3 smearEle_CB-10-2 data/other/smearEle/smearEle_CB-10-2_s3-toyMC-smearingMethod.root +s1 smearEle_CB-20-2 data/other/smearEle/smearEle_CB-20-2_s1-toyMC-smearingMethod.root +s2 smearEle_CB-20-2 data/other/smearEle/smearEle_CB-20-2_s2-toyMC-smearingMethod.root +s3 smearEle_CB-20-2 data/other/smearEle/smearEle_CB-20-2_s3-toyMC-smearingMethod.root +s1 smearEle_CB-40-2 data/other/smearEle/smearEle_CB-40-2_s1-toyMC-smearingMethod.root +s2 smearEle_CB-40-2 data/other/smearEle/smearEle_CB-40-2_s2-toyMC-smearingMethod.root +s3 smearEle_CB-40-2 data/other/smearEle/smearEle_CB-40-2_s3-toyMC-smearingMethod.root +s1 smearEle_CB-1-2.5 data/other/smearEle/smearEle_CB-1-2.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-1-2.5 data/other/smearEle/smearEle_CB-1-2.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-1-2.5 data/other/smearEle/smearEle_CB-1-2.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-5-2.5 data/other/smearEle/smearEle_CB-5-2.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-5-2.5 data/other/smearEle/smearEle_CB-5-2.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-5-2.5 data/other/smearEle/smearEle_CB-5-2.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-10-2.5 data/other/smearEle/smearEle_CB-10-2.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-10-2.5 data/other/smearEle/smearEle_CB-10-2.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-10-2.5 data/other/smearEle/smearEle_CB-10-2.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-20-2.5 data/other/smearEle/smearEle_CB-20-2.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-20-2.5 data/other/smearEle/smearEle_CB-20-2.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-20-2.5 data/other/smearEle/smearEle_CB-20-2.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-40-2.5 data/other/smearEle/smearEle_CB-40-2.5_s1-toyMC-smearingMethod.root +s2 smearEle_CB-40-2.5 data/other/smearEle/smearEle_CB-40-2.5_s2-toyMC-smearingMethod.root +s3 smearEle_CB-40-2.5 data/other/smearEle/smearEle_CB-40-2.5_s3-toyMC-smearingMethod.root +s1 smearEle_CB-1-3 data/other/smearEle/smearEle_CB-1-3_s1-toyMC-smearingMethod.root +s2 smearEle_CB-1-3 data/other/smearEle/smearEle_CB-1-3_s2-toyMC-smearingMethod.root +s3 smearEle_CB-1-3 data/other/smearEle/smearEle_CB-1-3_s3-toyMC-smearingMethod.root +s1 smearEle_CB-5-3 data/other/smearEle/smearEle_CB-5-3_s1-toyMC-smearingMethod.root +s2 smearEle_CB-5-3 data/other/smearEle/smearEle_CB-5-3_s2-toyMC-smearingMethod.root +s3 smearEle_CB-5-3 data/other/smearEle/smearEle_CB-5-3_s3-toyMC-smearingMethod.root +s1 smearEle_CB-10-3 data/other/smearEle/smearEle_CB-10-3_s1-toyMC-smearingMethod.root +s2 smearEle_CB-10-3 data/other/smearEle/smearEle_CB-10-3_s2-toyMC-smearingMethod.root +s3 smearEle_CB-10-3 data/other/smearEle/smearEle_CB-10-3_s3-toyMC-smearingMethod.root +s1 smearEle_CB-20-3 data/other/smearEle/smearEle_CB-20-3_s1-toyMC-smearingMethod.root +s2 smearEle_CB-20-3 data/other/smearEle/smearEle_CB-20-3_s2-toyMC-smearingMethod.root +s3 smearEle_CB-20-3 data/other/smearEle/smearEle_CB-20-3_s3-toyMC-smearingMethod.root +s1 smearEle_CB-40-3 data/other/smearEle/smearEle_CB-40-3_s1-toyMC-smearingMethod.root +s2 smearEle_CB-40-3 data/other/smearEle/smearEle_CB-40-3_s2-toyMC-smearingMethod.root +s3 smearEle_CB-40-3 data/other/smearEle/smearEle_CB-40-3_s3-toyMC-smearingMethod.root From 9d2f485f2a9bfb1c56835e0ba11edd30f92ea11d Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Mar 2014 13:12:03 +0100 Subject: [PATCH 361/475] documenting energy scale derivation --- ZFitter/doc/energyScale.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ZFitter/doc/energyScale.txt diff --git a/ZFitter/doc/energyScale.txt b/ZFitter/doc/energyScale.txt new file mode 100644 index 00000000000..9442a0f4e6b --- /dev/null +++ b/ZFitter/doc/energyScale.txt @@ -0,0 +1,20 @@ +/** +\page scaleSmearings Energy scale and smearings application + +\section Use of energy scale and smearings in external frameworks +The energy scale and smearings derived with ECALELF framework are provided as .dat files. + +The module to read and get the energy scale and smearings for the different electron categories is EnergyScaleCorrection_class + +Constructor of the class: + EnergyScaleCorrection_class(TString correctionFileName, + TString smearingFileName=""); + +the method to get the correction is + float ScaleCorrection(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, + double EtEle, + int nPV, float nPVmean=0); + + + +*/ From 69351231d1c8c7928b9663e64a12481cf288b917 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 9 Mar 2014 06:02:08 +0100 Subject: [PATCH 362/475] additional regions for systematic studies --- ZFitter/data/regions/gainSwitch.dat | 5 + ZFitter/data/regions/gainSwitch_2.dat | 4 + ZFitter/data/regions/gainSwitch_3.dat | 6 + ZFitter/data/regions/gainSwitch_4.dat | 4 + ZFitter/data/regions/gainSwitch_5.dat | 13 + ZFitter/macro/thesisMC.C | 480 ++++++++++++++++++++++++++ 6 files changed, 512 insertions(+) create mode 100644 ZFitter/data/regions/gainSwitch.dat create mode 100644 ZFitter/data/regions/gainSwitch_2.dat create mode 100644 ZFitter/data/regions/gainSwitch_3.dat create mode 100644 ZFitter/data/regions/gainSwitch_4.dat create mode 100644 ZFitter/data/regions/gainSwitch_5.dat create mode 100644 ZFitter/macro/thesisMC.C diff --git a/ZFitter/data/regions/gainSwitch.dat b/ZFitter/data/regions/gainSwitch.dat new file mode 100644 index 00000000000..55472535dc7 --- /dev/null +++ b/ZFitter/data/regions/gainSwitch.dat @@ -0,0 +1,5 @@ +EB-gainEle_12 +EB-gainEle_6 +EE-gainEle_12 +EE-gainEle_6 +#EB-gainEleSingleEle_6 \ No newline at end of file diff --git a/ZFitter/data/regions/gainSwitch_2.dat b/ZFitter/data/regions/gainSwitch_2.dat new file mode 100644 index 00000000000..3f4311adb57 --- /dev/null +++ b/ZFitter/data/regions/gainSwitch_2.dat @@ -0,0 +1,4 @@ +EE-Et_100_200-gainEle_6 +EE-Et_100_200-gainEle_12 +EE-!Et_100_200-gainEle_12 +EB diff --git a/ZFitter/data/regions/gainSwitch_3.dat b/ZFitter/data/regions/gainSwitch_3.dat new file mode 100644 index 00000000000..c85d587227b --- /dev/null +++ b/ZFitter/data/regions/gainSwitch_3.dat @@ -0,0 +1,6 @@ +# regions defined for condition validation +absEta_0_1-gold +absEta_1.566_2-EEm +absEta_1.566_2-EEp +absEta_2_2.5-EEm +absEta_2_2.5-EEp diff --git a/ZFitter/data/regions/gainSwitch_4.dat b/ZFitter/data/regions/gainSwitch_4.dat new file mode 100644 index 00000000000..1af00f8b6cc --- /dev/null +++ b/ZFitter/data/regions/gainSwitch_4.dat @@ -0,0 +1,4 @@ +EE-Et_100_200-gainEle_12 +EE-!Et_100_200-gainEle_12 +EE-gainEle_6 +EB diff --git a/ZFitter/data/regions/gainSwitch_5.dat b/ZFitter/data/regions/gainSwitch_5.dat new file mode 100644 index 00000000000..749e4c3ab58 --- /dev/null +++ b/ZFitter/data/regions/gainSwitch_5.dat @@ -0,0 +1,13 @@ +# regions defined for condition validation +gainEle_12-absEta_0_1-bad +gainEle_12-absEta_0_1-gold +gainEle_12-absEta_1_1.4442-bad +gainEle_12-absEta_1_1.4442-gold +gainEle_6-absEta_0_1-bad +gainEle_6-absEta_0_1-gold +gainEle_6-absEta_1_1.4442-bad +gainEle_6-absEta_1_1.4442-gold +gainEle_1-absEta_0_1-bad +gainEle_1-absEta_0_1-gold +gainEle_1-absEta_1_1.4442-bad +gainEle_1-absEta_1_1.4442-gold diff --git a/ZFitter/macro/thesisMC.C b/ZFitter/macro/thesisMC.C new file mode 100644 index 00000000000..3c9af1620a5 --- /dev/null +++ b/ZFitter/macro/thesisMC.C @@ -0,0 +1,480 @@ +{ + std::vector mcLabel_vec; + mcLabel_vec.push_back("Madgraph"); + mcLabel_vec.push_back("Powheg"); + mcLabel_vec.push_back("Sherpa"); + TString dataLabel="Data"; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "nPV", "(40,0,40)", "eleID_loose-trigger-noPF-Et_25", "", + dataLabel, mcLabel_vec, "nVtx", "", false, true); + c->SaveAs(outputPath+"nPV.eps"); + delete c; +} + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "#eta", "", false, true, true,false,false,true); // use r9weight +// c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.eps"); +// c->SaveAs(outputPath+"etaEle-r9reweighted-Et_25.C"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(100,0.7,1.2)", "EB-eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "R_{9}", "", false, true, true,false,false,true); +// c->SaveAs(outputPath+"R9Ele_EB-r9reweighted.eps"); +// c->SaveAs(outputPath+"R9Ele_EB-r9reweighted.C"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(110,0.3,1.4)", "EB-eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "R_{9}", "",true, false, true,false,false,true); +// c->SaveAs(outputPath+"R9Ele_EB-r9reweighted-log.eps"); +// c->SaveAs(outputPath+"R9Ele_EB-r9reweighted-log.C"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(100,0.7,1.2)", "EE-eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "R_{9}", "", false, true, true,false,false,true); +// c->SaveAs(outputPath+"R9Ele_EE-r9reweighted.eps"); +// c->SaveAs(outputPath+"R9Ele_EE-r9reweighted.C"); +// delete c; +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(110,0.3,1.4)", "EE-eleID_loose-trigger-noPF-Et_25", "", "", mcLabel_vec, "R_{9}", "",true, false, true,false,false,true); +// c->SaveAs(outputPath+"R9Ele_EE-r9reweighted-log.eps"); +// c->SaveAs(outputPath+"R9Ele_EE-r9reweighted-log.C"); +// delete c; + +// } +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle/cosh(etaEle)", "(100,0,200)", "eleID_loose-trigger-noPF-EB", "", "", mcLabel_vec, "E_{T} SC [GeV]", "", false, true); +// c->SaveAs(outputPath+"EtSCEle-EB.eps"); +// c->SaveAs(outputPath+"EtSCEle-EB.C"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle/cosh(etaEle)", "(100,0,160)", "eleID_loose-trigger-noPF-EE", "", "", mcLabel_vec, "E_{T} SC [GeV]", "", false, true); +// c->SaveAs(outputPath+"EtSCEle-EE.eps"); +// c->SaveAs(outputPath+"EtSCEle-EE.C"); +// delete c; +// } + +// TFile *fout = new TFile(outputPath+"ErecEtrue_stdSC.root","recreate"); +// fout->cd(); + +// TCanvas *c = new TCanvas("c",""); +// c->cd(); +// std::vector selections; +// selections.push_back(TString("energyMCEle[0]>20 && energyMCEle[0]<25")); +// selections.push_back(TString("energyMCEle[0]>25 && energyMCEle[0]<30")); +// selections.push_back(TString("energyMCEle[0]>30 && energyMCEle[0]<35")); +// selections.push_back(TString("energyMCEle[0]>35 && energyMCEle[0]<40")); +// selections.push_back(TString("energyMCEle[0]>40 && energyMCEle[0]<45")); +// selections.push_back(TString("energyMCEle[0]>45 && energyMCEle[0]<50")); +// selections.push_back(TString("energyMCEle[0]>50 && energyMCEle[0]<55")); +// selections.push_back(TString("energyMCEle[0]>55 && energyMCEle[0]<60")); +// selections.push_back(TString("energyMCEle[0]>60 && energyMCEle[0]<65")); +// selections.push_back(TString("energyMCEle[0]>65 && energyMCEle[0]<70")); +// selections.push_back(TString("energyMCEle[0]>70 && energyMCEle[0]<75")); +// selections.push_back(TString("energyMCEle[0]>75 && energyMCEle[0]<80")); +// selections.push_back(TString("energyMCEle[0]>80 && energyMCEle[0]<85")); +// selections.push_back(TString("energyMCEle[0]>85 && energyMCEle[0]<90")); +// selections.push_back(TString("energyMCEle[0]>90 && energyMCEle[0]<95")); +// selections.push_back(TString("energyMCEle[0]>95 && energyMCEle[0]<100")); + +// int index=0; +// for(std::vector::const_iterator sel_itr = selections.begin(); +// sel_itr != selections.end(); +// sel_itr++){ +// TString indexString; indexString+=index; +// signalA->Draw("energySCEle[0]/energyMCEle[0]>>ErecEtrue_"+indexString+"_lead(200,0,2)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB",1)+TCut(*sel_itr)); +// TH1F *h = gROOT->FindObject("ErecEtrue_"+indexString+"_lead"); +// h->Write(); +// signalA->Draw("energySCEle[1]/energyMCEle[1]>>ErecEtrue_"+indexString+"_sublead(200,0,2)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB",2)+TCut(sel_itr->ReplaceAll("[0]","[1]"))); +// TH1F *h2 = gROOT->FindObject("ErecEtrue_"+indexString+"_sublead"); +// h2->Write(); +// std::cout << index +// << "\t" << h->GetMean() << "\t" << h->GetRMS() +// << "\t" << h2->GetMean() << "\t" << h2->GetRMS() +// << std::endl; + +// index++; + +// } +// fout->Close(); + +// } +// TCanvas *c = new TCanvas("c",""); +// c->cd(); + +// signalA->Draw("invMass_SC_regrCorrSemiParV8_ele>>invMassRegrV8Ele(120,60,120)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB")); +// signalA->Draw("invMass_SC>>invMassSC(120,60,120)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB")); +// invMassRegrV8Ele->Draw(); +// invMassSC ->Draw("same"); +// c->SaveAs("invMass_regrComparison.C"); + +// } +// TFile *fout = new TFile(outputPath+"fout.root","recreate"); +// fout->cd(); + +// TCanvas *c = new TCanvas("c",""); +// c->cd(); + +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele[0]:energyMCEle[0]>>ErecvsEtrue_EBhighEtaBad_lead(200,0,200,200,0,200)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB-absEta_1_1.4442-bad",1),"colz"); +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele[0]:energyMCEle[0]>>ErecvsEtrue_EBhighEtaGold_lead(200,0,200,200, 0, 200)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB-absEta_1_1.4442-gold",1),"colz"); +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele[0]:energyMCEle[0]>>ErecvsEtrue_EBlowEtaBad_lead(200,0,200,200, 0, 200)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB-absEta_0_1-bad",1),"colz"); +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele[0]:energyMCEle[0]>>ErecvsEtrue_EBlowEtaGold_lead(200,0,200,200, 0, 200)", +// GetCut("eleID_loose-trigger-noPF-Et_20-EB-absEta_0_1-gold",1),"colz"); + + +// ErecvsEtrue_EBhighEtaBad_lead->Write(); +// ErecvsEtrue_EBhighEtaGold_lead->Write(); +// ErecvsEtrue_EBlowEtaBad_lead->Write(); +// ErecvsEtrue_EBlowEtaGold_lead->Write(); +// fout->Close(); + +// } +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele/energyMCEle:energyMCEle>>ErecEtruevsE_EBhighEtaGold(200,0,200,60,0.8,1.1)", +// GetCut("eleID_loose-trigger-noPF-Et_25-EB-absEta_1_1.4442-gold"),"profx"); + +// ErecEtruevsE_EBhighEtaGold->Draw(); +// c->SaveAs(outputPath+"ErecEtrue_vs_E-EBhighEtaGold.C"); +// } +// } +// std::vector runRanges=ReadRegionsFromFile("data/runRanges/monitoring.dat"); +// for(std::vector::const_iterator runRanges_itr=runRanges.begin(); +// runRanges_itr != runRanges.end(); +// runRanges_itr++){ +// //std::cout << *runRanges_itr << std::endl;; +// TString runRange=*runRanges_itr; +// runRange.ReplaceAll("-","_"); +// runRange.Insert(0,"-runNumber_"); + +// data->Draw("nPV>>nPVvsUnixTime(60,0,60)", GetCut("eleID_loose-trigger-noPF-Et_25"+runRange)); +// double mean = nPVvsUnixTime->GetMean(); +// double rms = nPVvsUnixTime->GetRMS(); +// std::cout << runRange << *runRanges_itr << "\t" << mean << "\t" << rms << std::endl; + +// } + +// } +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele/energyMCEle>>ErecEtrueEBhighEtaGold(60,0.8,1.1)", GetCut("eleID_loose-trigger-noPF-Et_25-EB-absEta_1_1.4442-gold")); +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele/energyMCEle>>ErecEtrueEBhighEtaBad(60,0.8,1.1)", GetCut("eleID_loose-trigger-noPF-Et_25-EB-absEta_1_1.4442-bad")); + +// ErecEtrueEBhighEtaBad->Draw(); +// ErecEtrueEBhighEtaGold->Draw("same"); +// ErecEtrueEBhighEtaBad->SetLineColor(6); +// ErecEtrueEBhighEtaGold->SetLineColor(1); +// ErecEtrueEBhighEtaBad->SetLineStyle(7); +// c->SaveAs(outputPath+"ErecEtrue-EBhighEta.C"); +// } +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele/energyMCEle:abs(etaEle)>>ErecEtruevsEtaGold( 100,0,2.5,100,0,2)", GetCut("eleID_loose-trigger-noPF-Et_25-gold"),"profx"); +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele/energyMCEle:abs(etaEle)>>ErecEtruevsEtaBad( 100,0,2.5,100,0,2)", GetCut("eleID_loose-trigger-noPF-Et_25-bad"),"profx"); +// ErecEtruevsEtaGold->Draw("E"); +// ErecEtruevsEtaGold->GetXaxis()->SetTitle("|#eta|"); +// ErecEtruevsEtaGold->GetYaxis()->SetTitle("E_{rec}/E_{MC}"); +// ErecEtruevsEtaBad->Draw("Esame"); +// c->SaveAs(outputPath+"ErecEtrue_vs_eta.C"); +// } +// signalA->Draw("R9Ele[0]:abs(etaEle[0])>>R9vsEta( 100,0,2.5,120,0,1.2)", GetCut("eleID_loose-trigger-noPF-Et_25"),"profx"); + +// R9vsEta->Draw("E"); +// R9vsEta->GetXaxis()->SetTitle("|#eta|"); +// R9vsEta->GetYaxis()->SetTitle("R_{9}"); +// c->SaveAs(outputPath+"R9_vs_eta.C"); +// } +// signalA->Draw("nHitsSCEle[0]:R9Ele[0]>>R9vsnHits(120,0,1.2, 100,0,100)", GetCut("eleID_loose-trigger-noPF-Et_25-EB-fiducial"),"colz"); +// // signalA->Draw("R9Ele[0]:abs(etaEle[0])>>eCorr_stdSC_gold(100,0,2.5, 550,0.9,2)", GetCut("eleID_loose-trigger-noPF-Et_25-gold"),"profx"); +// R9vsnHits->Draw("colz"); +// R9vsnHits->GetXaxis()->SetTitle("R_{9}"); +// R9vsnHits->GetYaxis()->SetTitle("Number of crystals in SC"); +// R9vsnHits->GetXaxis()->SetRangeUser(0.4,1); +// c->SaveAs(outputPath+"R9_vs_nHits-EB-colz"); +// c->SaveAs(outputPath+"R9_vs_nHits-EB-colz.C"); + +// } +// TFile *fout = new TFile(outputPath+"fout.root","recreate"); +// fout->cd(); + +// signalA->Draw("energySCEle[0]/(esEnergySCEle[0]+rawEnergySCEle[0]):abs(etaEle[0])>>eCorr_stdSC_gold(100,0,2.5, 550,0.9,2)", GetCut("eleID_loose-trigger-noPF-Et_25-gold"),"profx"); +// signalA->Draw("energySCEle[0]/(esEnergySCEle[0]+rawEnergySCEle[0]):abs(etaEle[0])>>eCorr_stdSC_bad(100,0,2.5, 550,0.9,2)", GetCut("eleID_loose-trigger-noPF-Et_25-bad"),"profx"); +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele[0]/(esEnergySCEle[0]+rawEnergySCEle[0]):abs(etaEle[0])>>eCorr_regrEleV5_gold(100,0,2.5, 550,0.9,2)", GetCut("eleID_loose-trigger-noPF-Et_25-gold"),"profx"); +// signalA->Draw("energySCEle_regrCorrSemiParV5_ele[0]/(esEnergySCEle[0]+rawEnergySCEle[0]):abs(etaEle[0])>>eCorr_regrEleV5_bad(100,0,2.5, 550,0.9,2)", GetCut("eleID_loose-trigger-noPF-Et_25-bad"),"profx"); + +// eCorr_stdSC_bad->SetMarkerStyle(20); +// eCorr_stdSC_bad->SetMarkerSize(1.2); +// eCorr_stdSC_bad->SetMarkerColor(kBlack); + +// eCorr_stdSC_gold->SetMarkerStyle(21); +// eCorr_stdSC_gold->SetMarkerSize(1.2); +// eCorr_stdSC_gold->SetMarkerColor(kRed); + +// eCorr_regrEleV5_gold->SetMarkerStyle(22); +// eCorr_regrEleV5_gold->SetMarkerSize(1.2); +// eCorr_regrEleV5_gold->SetMarkerColor(kBlue); + +// eCorr_regrEleV5_bad->SetMarkerStyle(22); +// eCorr_regrEleV5_bad->SetMarkerSize(1.2); +// eCorr_regrEleV5_bad->SetMarkerColor(kGreen); + +// eCorr_stdSC_gold->Write(); +// eCorr_stdSC_bad->Write(); +// eCorr_regrEleV5_gold->Write(); +// eCorr_regrEleV5_bad->Write(); + +// TCanvas *c = new TCanvas("c",""); +// c->cd(); +// eCorr_stdSC_bad ->Draw("E"); +// eCorr_stdSC_gold ->Draw("Esame"); +// eCorr_regrEleV5_gold ->Draw("Esame"); +// eCorr_regrEleV5_bad ->Draw("Esame"); +// c->SaveAs(outputPath+"energyCorrection_stdSC_vs_eta.eps"); +// c->SaveAs(outputPath+"energyCorrection_stdSC_vs_eta.C"); + +// fout->Close(); + +// } + +// } +// // kinematic variables +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle", "(100,0,200)", "eleID_loose-trigger-noPF-EB", "", "", mcLabel_vec, "energy SC [GeV]", "", false, true); +// c->SaveAs(outputPath+"energySCEle-EB.eps"); +// c->SaveAs(outputPath+"energySCEle-EB.C"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle", "(100,0,300)", "eleID_loose-trigger-noPF-EE", "", "", mcLabel_vec, "energy SC [GeV]", "", false, true); +// c->SaveAs(outputPath+"energySCEle-EE.eps"); +// c->SaveAs(outputPath+"energySCEle-EE.C"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle/cosh(etaEle)", "(100,0,200)", "eleID_loose-trigger-noPF-EB", "", "", mcLabel_vec, "E_{T} SC [GeV]", "", false, true); +// c->SaveAs(outputPath+"EtSCEle-EB.eps"); +// c->SaveAs(outputPath+"EtSCEle-EB.C"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle/cosh(etaEle)", "(100,0,160)", "eleID_loose-trigger-noPF-EE", "", "", mcLabel_vec, "E_{T} SC [GeV]", "", false, true); +// c->SaveAs(outputPath+"EtSCEle-EE.eps"); +// c->SaveAs(outputPath+"EtSCEle-EE.C"); +// delete c; + +// // c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle", "(100,0,200)", "eleID_loose-trigger-noPF-EB", "", "", mcLabel_vec, "energy SC [GeV]", "", true, true); +// // c->SaveAs(outputPath+"energySCEle-EB-log.eps"); +// // delete c; +// // c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle", "(100,0,200)", "eleID_loose-trigger-noPF-EE", "", "", mcLabel_vec, "energy SC [GeV]", "", true, true); +// // c->SaveAs(outputPath+"energySCEle-EE-log.eps"); +// // delete c; + +// // c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "energySCEle/etaEle", "(100,0,200)", "eleID_loose-trigger-noPF-EB", "", "", mcLabel_vec, "E_{T} SC [GeV]", "", true, true); +// // c->SaveAs(outputPath+"EtSCEle-EB-log.eps"); +// // delete c; +// // c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "energySCEle/etaEle", "(100,0,200)", "eleID_loose-trigger-noPF-EE", "", "", mcLabel_vec, "E_{T} SC [GeV]", "", true, true); +// // c->SaveAs(outputPath+"EtSCEle-EE-log.eps"); +// // delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "#eta", "", false, true); + c->SaveAs(outputPath+"etaEle-Et_25.eps"); + c->SaveAs(outputPath+"etaEle-Et_25.C"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "phiEle", "(100,-5,5)", "eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "#phi", "", false, true); + c->SaveAs(outputPath+"phiEle-Et_25.C"); + c->SaveAs(outputPath+"phiEle-Et_25.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "etaSCEle", "(100,-2.5,2.5)", "eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "#eta_{SC}", "", false, true); + c->SaveAs(outputPath+"etaSCEle-Et_25.eps"); + c->SaveAs(outputPath+"etaSCEle-Et_25.C"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "phiSCEle", "(100,-5,5)", "eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "#phi_{SC}", "", false, true); + c->SaveAs(outputPath+"phiSCEle-Et_25.C"); + c->SaveAs(outputPath+"phiSCEle-Et_25.eps"); + delete c; +} + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(100,0.7,1.2)", "EB-eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "R_{9}", "", false, true); + c->SaveAs(outputPath+"R9Ele_EB.eps"); + c->SaveAs(outputPath+"R9Ele_EB.C"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(110,0.3,1.4)", "EB-eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "R_{9}", "",true, false); + c->SaveAs(outputPath+"R9Ele_EB-log.eps"); + c->SaveAs(outputPath+"R9Ele_EB-log.C"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(100,0.7,1.2)", "EE-eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "R_{9}", "", false, true); + c->SaveAs(outputPath+"R9Ele_EE.eps"); + c->SaveAs(outputPath+"R9Ele_EE.C"); + delete c; + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "R9Ele", "(110,0.3,1.4)", "EE-eleID_loose-trigger-noPF-Et_25", "", dataLabel, mcLabel_vec, "R_{9}", "",true, false); + c->SaveAs(outputPath+"R9Ele_EE-log.eps"); + c->SaveAs(outputPath+"R9Ele_EE-log.C"); + delete c; + + + // pileup + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "nPU", "(60,0,60)", "eleID_loose-trigger-noPF-Et_25", "", + dataLabel, mcLabel_vec, "nPU", "", false, false); + c->SaveAs(outputPath+"nPU.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "nPV", "(40,0,40)", "eleID_loose-trigger-noPF-Et_25", "", + dataLabel, mcLabel_vec, "nVtx", "", false, false); + c->SaveAs(outputPath+"nPV-noweight.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "nPV", "(40,0,40)", "eleID_loose-trigger-noPF-Et_25", "", + dataLabel, mcLabel_vec, "nVtx", "", false, true); + c->SaveAs(outputPath+"nPV.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "rho", "(60,-1,29)", "eleID_loose-trigger-noPF-Et_25", "", + dataLabel, mcLabel_vec, "#rho", "", false, true); + c->SaveAs(outputPath+"rho.eps"); + delete c; + +} + +} + mcLabel_vec.clear(); + mcLabel_vec.push_back("Simulation"); + c = PlotDataMCs(data, MakeChainVector(signalB), "invMass_SC_regrCorrSemiParV5_ele", "(200,80,100)", "eleID_loose-trigger-noPF-EB", "", "Data", mcLabel_vec, "M_{ee} [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC_regrCorrSemiParV5_ele-EB.eps"); + c->SaveAs(outputPath+"invMass_SC_regrCorrSemiParV5_ele-EB.C"); + delete c; + + + c = PlotDataMCs(data, MakeChainVector(signalB), "invMass_SC_regrCorrSemiParV5_ele", "(200,80,100)", "eleID_loose-trigger-noPF-EE", "", "Data", mcLabel_vec, "M_{ee} [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC_regrCorrSemiParV5_ele-EE.eps"); + c->SaveAs(outputPath+"invMass_SC_regrCorrSemiParV5_ele-EE.C"); + delete c; + + +} + selected->Draw("R9Ele[0]*rawEnergySCEle[0]/energyMCEle[0]","energyMCEle[0]!=0"); + selected->Draw("e5x5SCEle[0]/energyMCEle[0]","energyMCEle[0]!=0"); + + +} + + //TString outputPath="tmp/"; //test/dato/rereco/rereco29Jun-RUN2011/rereco29Jun-RUN2011/WP80_PU/img/"; + //TString outputPath="test/dato/moriond2013/WP80_PU/img/"; + std::vector mcLabel_vec; + mcLabel_vec.push_back("Madgraph RD"); + mcLabel_vec.push_back("Powheg RD"); + mcLabel_vec.push_back("Sherpa RD"); + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC", "(400,80,100)", "eleID_loose-trigger-noPF-EB", "", dataLabel, mcLabel_vec, "M_{ee} std SC [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC-EB.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorr_ele", "(400,80,100)", "eleID_loose-trigger-noPF-EB", "", dataLabel, mcLabel_vec, "M_{ee} ele-tuned V3 [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC_regrCorr_ele-EB.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC", "(400,80,100)", "eleID_loose-trigger-noPF-EE", "", dataLabel, mcLabel_vec, "M_{ee} std SC [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC-EE.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorr_ele", "(400,80,100)", "eleID_loose-trigger-noPF-EE", "", dataLabel, mcLabel_vec, "M_{ee} ele-tuned V3 [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC_regrCorr_ele-EE.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorrSemiParV5_ele", "(400,80,100)", "eleID_loose-trigger-noPF-EB", "", dataLabel, mcLabel_vec, "M_{ee} ele-tuned V5 [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC_regrCorr_ele-EB.eps"); + delete c; + + c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorrSemiParV5_ele", "(400,80,100)", "eleID_loose-trigger-noPF-EE", "", dataLabel, mcLabel_vec, "M_{ee} ele-tuned V5 [GeV]", "", false, true); + c->SaveAs(outputPath+"invMass_SC_regrCorr_ele-EE.eps"); + delete c; + + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_ele / invMass_SC_regrCorrSemiParV5_ele -1", "(250,-0.025,0.025)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "(ele-tuned) regrV4/regrV5 -1 ", "", false, true); +// } +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCEleSemiParV5-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_pho/invMass_SC_regrCorrSemiParV5_pho -1", "(250,-0.025,0.025)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "(pho-tuned) regrV4/regrV5 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCEleSemiParV5_pho-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_ele/invMass_SC_regrCorrSemiParV5_ele -1", "(250,-0.025,0.025)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "(ele-tuned) regrV4/regrV5 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCEleSemiParV5-EE.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_pho/invMass_SC_regrCorrSemiParV5_pho -1", "(250,-0.025,0.025)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "(pho-tuned) regrV4/regrV5 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCEleSemiParV5_pho-EE.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_ele/invMass_SC_regrCorr_ele -1", "(250,-0.025,0.025)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV4/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCEle-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV5_ele/invMass_SC_regrCorr_ele -1", "(250,-0.025,0.025)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV5/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV5_regrSCEle-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_pho/invMass_SC_regrCorr_pho -1", "(250,-0.025,0.025)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV4/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCPho-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV5_pho/invMass_SC_regrCorr_pho -1", "(250,-0.025,0.025)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV5/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV5_regrSCPho-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_ele/invMass_SC_regrCorr_ele -1", "(250,-0.025,0.025)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV4/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCEle-EE.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV5_ele/invMass_SC_regrCorr_ele -1", "(250,-0.025,0.025)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV5/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV5_regrSCEle-EE.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV4_pho/invMass_SC_regrCorr_pho -1", "(250,-0.025,0.025)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV4/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV4_regrSCPho-EE.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB), "invMass_SC_regrCorrSemiParV5_pho/invMass_SC_regrCorr_pho -1", "(250,-0.025,0.025)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron regrV5/regrV3 -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEleSemiParV5_regrSCPho-EE.eps"); +// delete c; + + + + + +// // regression comparison +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron (Hgg) regression/std. SC -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEle_stdSC-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Photon (Hgg) regression/std. SC -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCPho_stdSC-EB.eps"); +// delete c; + + +// // +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.2,0.2)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron (Egamma) regression/std. SC -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorr_ele/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron (Hgg) regression/std. SC -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCEle_stdSC-EE.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_SC_regrCorr_pho/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Photon (Hgg) regression/std. SC -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrSCPho_stdSC-EE.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "invMass_regrCorr_egamma/invMass_SC -1", "(500,-0.1,0.1)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Electron (Egamma) regression/std. SC -1 ", "", false, true); +// c->SaveAs(outputPath+"/regrEleEgamma_stdSC-EE.eps"); +// delete c; + + +// // cluster corrections and ES energy fraction +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "esEnergySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0,0.2)", "absEta_1.7_2.5-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "ES energy fraction: ES/(rawSC+ES) ", "", false, true); +// c->SaveAs(outputPath+"/esEnergyFraction.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EB-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", "", false, true); +// c->SaveAs(outputPath+"/energyCorrections_EB.eps"); +// delete c; + +// c = PlotDataMCs(data, MakeChainVector(signalA,signalB,signalC), "energySCEle/(rawEnergySCEle+esEnergySCEle)", "(100,0.99,1.15)", "EE-eleID_loose-trigger-noPF-Et_25","", dataLabel, mcLabel_vec, "Energy corrections F: E_{SC}/(E_{rawSC}+E_{ES}) ", "", false, true); +// c->SaveAs(outputPath+"/energyCorrections_EE.eps"); +// delete c; + + From 78b28514887456650b3e8fb23b6f9d6da962a095 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 9 Mar 2014 06:04:45 +0100 Subject: [PATCH 363/475] added fsr and weak interferance for Z lineshape systematic studies --- ALCARAW_RECO/python/alcaSkimming.py | 3 +- ALCARAW_RECO/python/pdfSystematics_cff.py | 16 ++++++++++ ZNtupleDumper/python/zntupledumper_cfi.py | 2 ++ ZNtupleDumper/src/ZNtupleDumper.cc | 37 +++++++++++++++++------ 4 files changed, 48 insertions(+), 10 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 003d76e66fb..3340c7000e6 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -440,7 +440,8 @@ process.zNtupleDumper.doEleIDTree=cms.bool(True) if(MC and options.pdfSyst==1): - process.pdfWeightsSeq = cms.Sequence(process.pdfWeights) + process.pdfWeightsSeq = cms.Sequence(process.pdfWeights + process.weakWeight + process.fsrWeight) + process.zNtupleDumper.pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')) else: process.pdfWeightsSeq = cms.Sequence() diff --git a/ALCARAW_RECO/python/pdfSystematics_cff.py b/ALCARAW_RECO/python/pdfSystematics_cff.py index 25c61242fc5..bcc853de799 100644 --- a/ALCARAW_RECO/python/pdfSystematics_cff.py +++ b/ALCARAW_RECO/python/pdfSystematics_cff.py @@ -13,3 +13,19 @@ , "NNPDF10_100.LHgrid" ) ) + +# Produce event weights to estimate missing O(alpha) terms + NLO QED terms +fsrWeight = cms.EDProducer("FSRWeightProducer", + GenTag = cms.untracked.InputTag("genParticles"), + ) + + +# Produce event weights to estimate missing weak terms (=> include missing rho factor for Z diagrams) +weakWeight = cms.EDProducer("WeakEffectsWeightProducer", + GenParticlesTag = cms.untracked.InputTag("genParticles"), + RhoParameter = cms.untracked.double(1.004) + ) + + + + diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index 1f5b6cce988..b69139365cd 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -21,6 +21,8 @@ doPdfSystTree = cms.bool(True), # pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')), pdfWeightCollections = cms.VInputTag(), + fsrWeightCollection = cms.InputTag("fsrWeight"), + weakWeightCollection = cms.InputTag("weakWeight"), isWenu = cms.bool(False), # hltPaths = cms.vstring() hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v15', diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 1f550501e77..573c1cc35c2 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -350,12 +350,16 @@ class ZNtupleDumper : public edm::EDAnalyzer { TTree *pdfSystTree; //std::vector pdfSystWeightNum; std::vector pdfSystWeight[5]; - // pdfWeightTree bool doPdfSystTree; std::vector< edm::InputTag > pdfWeightTAGS; edm::Handle< std::vector > pdfWeightHandle; + Float_t fsrWeight; + Float_t weakWeight; + edm::InputTag fsrWeightTAG, weakWeightTAG; + edm::Handle fsrWeightHandle, weakWeightHandle; + void InitPdfSystTree(void); void TreeSetPdfSystVar(const edm::Event& iEvent); @@ -428,7 +432,9 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), doEleIDTree(iConfig.getParameter("doEleIDTree")), doPdfSystTree(iConfig.getParameter("doPdfSystTree")), - pdfWeightTAGS(iConfig.getParameter< std::vector >("pdfWeightCollections")) + pdfWeightTAGS(iConfig.getParameter< std::vector >("pdfWeightCollections")), + fsrWeightTAG(iConfig.getParameter< edm::InputTag>("fsrWeightCollection")), + weakWeightTAG(iConfig.getParameter< edm::InputTag>("weakWeightCollection")) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), //puWeightFile(iConfig.getParameter("puWeightFile")), //puWeights() @@ -928,6 +934,9 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ void ZNtupleDumper::TreeSetPileupVar(void){ rho=*rhoHandle; nPV=0; + nPU[0]=-1; + mcGenWeight=-1; + if(primaryVertexHandle->size() > 0) { for(reco::VertexCollection::const_iterator v = primaryVertexHandle->begin(); v != primaryVertexHandle->end(); ++v){ @@ -947,14 +956,15 @@ void ZNtupleDumper::TreeSetPileupVar(void){ nPU[0]=PVI->getTrueNumInteractions(); } } - - mcGenWeight=(GenEventInfoHandle->weights())[0]; + + if(!GenEventInfoHandle->weights().empty()) + mcGenWeight=(GenEventInfoHandle->weights())[0]; - } else { - //weight= 1.; - nPU[0]=-1; - mcGenWeight=-1; - } + } // else { +// //weight= 1.; +// nPU[0]=-1; +// mcGenWeight=-1; +// } return; } @@ -1487,6 +1497,9 @@ void ZNtupleDumper::InitPdfSystTree(void){ //pdfSystTree->Branch(pdfWeightTAGS_itr->encode().c_str(), &(pdfSystWeightNum[i]), "pdfSystWeightNum/I"); pdfSystTree->Branch((pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()).c_str(), &(pdfSystWeight[i])); } + + pdfSystTree->Branch("fsrWeight", &fsrWeight, "fsrWeight/F"); + pdfSystTree->Branch("weakWeight", &weakWeight, "weakWeight/F"); return; } @@ -1510,6 +1523,12 @@ void ZNtupleDumper::TreeSetPdfSystVar(const edm::Event& iEvent){ // } } + iEvent.getByLabel(fsrWeightTAG, fsrWeightHandle); + iEvent.getByLabel(weakWeightTAG, weakWeightHandle); + + fsrWeight = (Float_t) *fsrWeightHandle; + weakWeight = (Float_t) *weakWeightHandle; + return ; } From 50f0e28d9cf883aedb4c6e3acb0fd14cc54e99b1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sun, 9 Mar 2014 09:15:46 +0100 Subject: [PATCH 364/475] fixed smearEle in toyMC study with smearing method --- ZFitter/bin/ZFitter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 3e0de509a04..09ce058a8e9 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -507,6 +507,10 @@ int main(int argc, char **argv) { if(chainName.Contains("scaleEle")){ if(chainName!="scaleEle_"+corrEleType) continue; } + if(chainName.Contains("smearEle")){ + if(chainName!="smearEle_"+smearEleType) continue; + } + if(chainName.Contains("smearerCat")){ if(chainName!="smearerCat_"+regionsFileNameTag) continue; } @@ -1123,8 +1127,8 @@ int main(int argc, char **argv) { smearer.SetPuWeight(false); smearer.SetToyScale(1, constTermToy); - //if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), true,initFileName.c_str()); - if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), false,initFileName.c_str()); + if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), true,initFileName.c_str()); + // if(vm.count("initFile")) smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy"), false,initFileName.c_str()); else smearer.Init(commonCut.c_str(), eleID, nEventsPerToy, vm.count("runToy")); std::cout << "[DEBUG] " << constTermToy << std::endl; } else{ From 890fba13137665c996473f06f4a84aefa95c16b1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Mar 2014 09:08:06 +0100 Subject: [PATCH 365/475] fix seed ix iy for EE electrons --- ZNtupleDumper/src/ZNtupleDumper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 573c1cc35c2..5dfd92ddf48 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -1052,7 +1052,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int EBDetId seedDetIdEcal = seedDetId; seedXSCEle[index]=seedDetIdEcal.ieta(); seedYSCEle[index]=seedDetIdEcal.iphi(); - }else if(electron1.isEB() && seedDetId.subdetId() == EcalEndcap){ + }else if(electron1.isEE() && seedDetId.subdetId() == EcalEndcap){ EEDetId seedDetIdEcal = seedDetId; seedXSCEle[index]=seedDetIdEcal.ix(); seedYSCEle[index]=seedDetIdEcal.iy(); From 270f5cbcb888460b1efe54aeef4341cf79abb510 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Mar 2014 09:20:31 +0100 Subject: [PATCH 366/475] using weak and fsr weights in smearing method --- ZFitter/bin/ZFitter.cpp | 4 + ZFitter/interface/RooSmearer.hh | 3 + ZFitter/interface/SmearingImporter.hh | 4 + ZFitter/script/energyScale.sh | 190 +++++++++++++++----------- ZFitter/script/functions.sh | 9 ++ ZFitter/src/SmearingImporter.cc | 37 +++-- 6 files changed, 157 insertions(+), 90 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 09ce058a8e9..b36838caa67 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -278,6 +278,8 @@ int main(int argc, char **argv) { ("saveR9TreeWeight", "") ("ZPtWeightFile", po::value(&ZPtWeightFile),"File with ZPt weights") ("useZPtweight", "use ZPt weights") + ("useFSRweight", "activate the FSR weight in MC") + ("useWEAKweight", "activate the WEAK interference weight in MC") ("saveRootMacro","") // ("selection", po::value(&selection)->default_value("loose"),"") @@ -1042,6 +1044,8 @@ int main(int argc, char **argv) { smearer.SetR9Weight(vm.count("useR9weight")); smearer.SetPdfSystWeight(pdfSystWeightIndex); smearer.SetZPtWeight(vm.count("useZPtweight")); + smearer.SetFsrWeight(vm.count("useFSRweight")); + smearer.SetWeakWeight(vm.count("useWEAKweight")); if(nSmearToy>0) smearer._nSmearToy = nSmearToy; diff --git a/ZFitter/interface/RooSmearer.hh b/ZFitter/interface/RooSmearer.hh index ba32c1b2fbe..ad3ba068170 100644 --- a/ZFitter/interface/RooSmearer.hh +++ b/ZFitter/interface/RooSmearer.hh @@ -123,9 +123,12 @@ public: void AutoNSmear(ZeeCategory& category); void AutoNBins(ZeeCategory& category); + // interface functions to SmearingImporter inline void SetPuWeight(bool usePuReweight){importer.SetPuWeight(usePuReweight);}; inline void SetR9Weight(bool useR9Reweight){importer.SetR9Weight(useR9Reweight);}; inline void SetPtWeight(bool usePtReweight){importer.SetPtWeight(usePtReweight);}; + inline void SetFsrWeight(bool value){ importer.SetFsrWeight(value); }; + inline void SetWeakWeight(bool value){importer.SetWeakWeight(value);}; inline void SetZPtWeight(bool useZPtReweight){importer.SetZPtWeight(useZPtReweight);}; inline void SetOnlyDiagonal(bool value){importer.SetOnlyDiagonal(value);}; inline void SetSmearingEt(bool value){importer.SetSmearingEt(value);}; diff --git a/ZFitter/interface/SmearingImporter.hh b/ZFitter/interface/SmearingImporter.hh index 17468f45e6f..a5d8505c502 100644 --- a/ZFitter/interface/SmearingImporter.hh +++ b/ZFitter/interface/SmearingImporter.hh @@ -43,6 +43,8 @@ public: inline void SetR9Weight(bool value){_useR9weight=value;}; inline void SetPtWeight(bool value){_usePtweight=value;}; inline void SetZPtWeight(bool value){_useZPtweight=value;}; + inline void SetFsrWeight(bool value){_useFSRweight=value;}; + inline void SetWeakWeight(bool value){_useWEAKweight=value;}; inline void SetExcludeByWeight(bool value){_excludeByWeight=value;}; inline void SetOnlyDiagonal(bool value){_onlyDiagonal=value;}; inline void SetEleID(TString value){_eleID=value;}; @@ -67,6 +69,8 @@ private: bool _useR9weight; bool _usePtweight; bool _useZPtweight; + bool _useFSRweight; + bool _useWEAKweight; bool _excludeByWeight; bool _onlyDiagonal; bool _isSmearingEt; diff --git a/ZFitter/script/energyScale.sh b/ZFitter/script/energyScale.sh index 92616489c7d..1f8559e4cbe 100755 --- a/ZFitter/script/energyScale.sh +++ b/ZFitter/script/energyScale.sh @@ -11,7 +11,7 @@ commonCut=Et_20-trigger-noPF selection=loose invMass_var=invMass_SC_regrCorrSemiParV5_pho baseDir=test -updateOnly="--updateOnly --fit_type_value=0" # --profileOnly --initFile=init.txt" +updateOnly="--updateOnly --fit_type_value=1" # --profileOnly --initFile=init.txt" #updateOnly="" ########################################################### regionFileStep1=data/regions/scaleStep1.dat @@ -26,7 +26,8 @@ regionFileStep4EE=data/regions/scaleStep4smearing_2.dat regionFileStep5EB=data/regions/scaleStep2smearing_9.dat regionFileStep5EE=data/regions/scaleStep2smearing_10.dat - +regionFileStep6EB=data/regions/scaleStep6smearing_1.dat +regionFileStep6EE=data/regions/scaleStep6smearing_2.dat ############################################################# usage(){ echo "`basename $0` [options]" @@ -132,10 +133,15 @@ case ${STEP} in 9nPV) STEP9=y; extension=nPV;; 10) STEP10=y;; 12) STEP12=y;; - madgraph) MCSAMPLE=y; extension=madgraph;; - powheg) MCSAMPLE=y; extension=powheg;; - sherpa) MCSAMPLE=y; extension=sherpa;; +# madgraph) MCSAMPLE=y; extension=madgraph;; +# powheg) MCSAMPLE=y; extension=powheg;; +# sherpa) MCSAMPLE=y; extension=sherpa;; + madgraph) PDFWEIGHT=y; extension=madgraph;; + powheg) PDFWEIGHT=y; extension=powheg;; + sherpa) PDFWEIGHT=y; extension=sherpa;; pdfWeight) PDFWEIGHT=y; extension=pdfWeight;; + fsrWeight) PDFWEIGHT=y; extension=fsrWeight;; + weakWeight) PDFWEIGHT=y; extension=weakWeight;; pdfWeightZPt) PDFWEIGHT=y; extension=pdfWeightZPt;; gainSwitch) GAINSWITCH=y; extension=gainSwitch;echo "[OPTION] $extension";; gainSwitch2) GAINSWITCH=y; extension=gainSwitch2;echo "[OPTION] $extension";; @@ -246,18 +252,18 @@ if [ -n "${STEP1}" ];then if [ ! -e "${outDirData}/img" ];then mkdir ${outDirData}/img -p; fi if [ ! -e "${outDirData}/step1" ];then mkdir ${outDirData}/step1 -p; fi - # ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ -# $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut $commonCut \ -# --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ -# --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img \ -# > ${outDirData}/log/`basename ${outFile} .dat`.log || exit 1 + ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} --runRangesFile ${runRangesFile} \ + $isOdd $updateOnly --selection=${selection} --invMass_var ${invMass_var} --commonCut $commonCut \ + --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ + --outDirImgMC=${outDirMC}/img --outDirImgData=${outDirData}/img \ + > ${outDirData}/log/`basename ${outFile} .dat`.log || exit 1 ./script/makeTable.sh --regionsFile ${regionFile} --runRangesFile ${runRangesFile} --commonCut ${commonCut} \ --outDirFitResMC=${outDirMC}/fitres --outDirFitResData=${outDirData}/fitres \ > ${outDirTable}/`basename ${outFile} .dat`.tex ./script/tex2txt.sh ${outDirTable}/`basename ${outFile} .dat`.tex | awk -F "\t" -f awk/recalibOutput.awk |grep -v '^%' > ${outDirTable}/${outFile} - + #save root files with step1 corrections ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ --saveRootMacro --corrEleType HggRunEta \ @@ -268,12 +274,7 @@ if [ -n "${STEP1}" ];then else echo "[STATUS] Step 1 already done" fi - ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ - --saveRootMacro --corrEleType HggRunEta \ - --corrEleFile ${outDirTable}/step1-${invMass_var}-${selection}-${commonCut}-HggRunEta.dat || exit 1 - - mv tmp/scaleEle_HggRunEta_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step1/ -exit 0 + fi if [ -n "${STEP1Stability}" ];then @@ -374,7 +375,7 @@ if [ -n "${STEP2}" ];then basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` regionFile=$regionFileEB - outFile=${outFileStep2} + outFile=outFile-${outFileStep2} checkStepDep step1 @@ -450,19 +451,20 @@ if [ -n "${STEP2}" ];then fi - sed -i 's|^EB-||;s|^EE-||' ${outFileStep1} - grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' > tmp/res_corr.dat - grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1| sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' >> tmp/res_corr.dat - awk -f awk/prodScaleCorrSteps.awk tmp/res_corr.dat ${outFileStep1} > ${outDirTable}/${outFile} - echo "[STATUS] Plotting Data/MC" ./bin/ZFitter.exe -f $outDirData/step2${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step2${extension}/img/ --outDirFitResData=${outDirData}/step2${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outDirTable}/${outFile} --corrEleType=HggRunEta --plotOnly || exit 1 + #### Setting file with scale corrections of step1 x step2 + sed -i 's|^EB-||;s|^EE-||' ${outFileStep1} + grep scale ${outDirData}/step2/img/outProfile-${basenameEB}-${commonCut}-FitResult.config | sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' > tmp/res_corr.dat + grep scale ${outDirData}/step2/img/outProfile-${basenameEE}-${commonCut}-FitResult.config | grep -v absEta_0_1| sed -r 's|[ ]+|\t|g;' | cut -f 1,3,5 | sed "s|scale_||;s|-${commonCut}||" | sed 's|\([^ \t]*\)-gold|\1 gold|; s|\([^ \t]*\)-bad|\1 bad|' >> tmp/res_corr.dat + awk -f awk/prodScaleCorrSteps.awk tmp/res_corr.dat ${outDirTable}/${outFileStep1} > ${outDirTable}/${outFileStep2} + #save root files with step1 corrections ./bin/ZFitter.exe -f ${configFile} --regionsFile ${regionFile} \ --saveRootMacro --corrEleType HggRunEtaR9 \ - --corrEleFile ${outDirTable}/${outFile} || exit 1 + --corrEleFile ${outDirTable}/${outFileStep2} || exit 1 mv tmp/scaleEle_HggRunEtaR9_[s,d][1-9]-`basename $configFile .dat`.root ${outDirData}/step2/ @@ -555,18 +557,18 @@ if [ -n "${STEP4}" ];then "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEB .dat`-done" -# bsub -q cmscaf1nd \ -# -oo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ -# -eo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ -# -J "${basenameEE} step4${extension}[1-50]" \ -# "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -# ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" + bsub -q cmscaf1nd \ + -oo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ + -eo ${outDirData}/step4${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stderr.log \ + -J "${basenameEE} step4${extension}[1-50]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; +./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step4${extension}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9 || exit 1; touch ${outDirData}/step4${extension}/\$LSB_JOBINDEX/`basename $regionFileEE .dat`-done" # fi while [ "`bjobs -J \"${basenameEB} step4${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done while [ "`bjobs -J \"${basenameEE} step4${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done - # ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root + ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEB-${commonCut}.root ./script/haddTGraph.sh -o ${outDirData}/step4${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step4${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root @@ -575,24 +577,29 @@ if [ -n "${STEP4}" ];then echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C -# echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C + echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "FitProfile2(\"${outDirData}/step4${extension}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,false);" >> tmp/fitProfiles.C echo "}" >> tmp/fitProfiles.C root -l -b -q tmp/fitProfiles.C - + +fi cat ${outDirData}/step4${extension}/img/outProfile-${basenameEB}-${commonCut}-FitResult.config > ${outFile} grep -v absEta_0_1 ${outDirData}/step4${extension}/img/outProfile-${basenameEE}-${commonCut}-FitResult.config >> ${outFile} cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} - - fi -exit 0 - ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + getSmearEleCfg ${outFile} > `dirname ${outFile}`/`basename $outFile .dat`-smearEle.dat +#exit 0 +#cat ${outFile} +#cat `dirname ${outFile}`/`basename $outFile .dat`-smearEle.dat + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile ${regionFileEE} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + - ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile $regionFileStep4EBEE $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly || exit 1 + ./bin/ZFitter.exe -f $outDirData/step4${extension}/`basename $configFile` --regionsFile $regionFileStep4EBEE $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step4${extension}/img/ --outDirFitResData=${outDirData}/step4${extension}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin --initFile=${outFile} --corrEleType=HggRunEtaR9 --plotOnly --smearEleFile=`dirname ${outFile}`/`basename $outFile .dat`-smearEle.dat --smearEleType=EtaR9_const || exit 1 fi @@ -2197,18 +2204,27 @@ fi ############################################################ if [ -n "${PDFWEIGHT}" ];then -#stochastic smearing but with non Et dependent scale corrections + if [ "${extension}" == "medium" -o "${extension}" == "tight" ];then newSelection=${extension} else newSelection=${selection} fi - sample=s1 + case $extension in + madgraph) sample=s1 ;; + powheg) sample=s2 ;; + sherpa) sample=s3 ;; + *) sample=s1 ;; + esac #eta x R9 with smearing method regionFileEB=${regionFileStep5EB} regionFileEE=${regionFileStep5EE} + #eta x R9 x Et with smearing method + regionFileEB=${regionFileStep6EB} + regionFileEE=${regionFileStep6EE} + basenameEB=`basename $regionFileEB .dat` basenameEE=`basename $regionFileEE .dat` outFile=${outDirTable}/step9${extension}-${invMass_var}-${newSelection}-${commonCut}-HggRunEtaR9.dat @@ -2240,22 +2256,32 @@ if [ -n "${PDFWEIGHT}" ];then if [ ! -e "${outDirData}/step9/fitres" ];then mkdir ${outDirData}/step9/fitres -p; fi if [ ! -e "${outDirData}/step9/img" ];then mkdir ${outDirData}/step9/img -p; fi - + case $extension in pdfWeightZPt) cat $configFile |grep -v '#' \ | grep -v "r9weights" \ | sort | uniq > $outDirData/step9${extension}/`basename $configFile` ;; - pdfWeight) + pdfWeight | fsrWeight|weakWeight) + cat $configFile |grep -v '#' \ + | grep -v "r9weights" \ + | grep -v "pileup" \ + | sed '/^d/ d' \ + | sed "/^${sample}/{p; s|^s|d|}" \ + | sort | uniq > $outDirData/step9${extension}/`basename $configFile` + ;; + madgraph|powheg|sherpa) cat $configFile |grep -v '#' \ | grep -v "r9weights" \ + | grep -v "pileup" \ | sed '/^d/ d' \ | sed "/^${sample}/{p; s|^s|d|}" \ | sort | uniq > $outDirData/step9${extension}/`basename $configFile` ;; esac - + echo $extension + mkSmearerCatSignal $regionFileEB #mkSmearerCatSignal $regionFileEE # mkSmearerCatData $regionFileEB ${outDirData}/step9 $outDirData/step9${extension}/`basename $configFile` --corrEleType=HggRunEtaR9Et @@ -2264,6 +2290,16 @@ if [ -n "${PDFWEIGHT}" ];then cat $outDirData/step9${extension}/`basename $configFile` touch ${outFile} + case ${extension} in + fsrWeight) option="--useFSRweight"; pdfWeightIndexList=".";; + weakWeight) option="--useWEAKweight"; pdfWeightIndexList=".";; + pdfWeight) pdfWeightIndexList="`seq 0 44`";; + madgraph|powheg|sherpa) pdfWeightIndexList=".";; + *) + exit 0 + ;; + esac + if [ ! -e "${outFile}" -o -n "$FORCE" ];then if [ ! -e "${outDirMC}/${extension}/fitres" ];then mkdir ${outDirMC}/${extension}/fitres -p; fi if [ ! -e "${outDirMC}/${extension}/img" ];then mkdir ${outDirMC}/${extension}/img -p; fi @@ -2271,38 +2307,30 @@ if [ -n "${PDFWEIGHT}" ];then if [ ! -e "${outDirData}/step9${extension}/img" ];then mkdir ${outDirData}/step9${extension}/img -p; fi - if [ "${extension}" == "weight" ];then - updateOnly="$updateOnly --useR9weight" - fi - # save the corrections in root files # this way I do not reproduce the ntuples with the corrections any time - - - for pdfWeightIndex in 0 #1 0 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 ##3 4 5 6 13 14 15 16 23 24 25 27 28 29 30 33 34 + + for pdfWeightIndex in ${pdfWeightIndexList} do - for index in `seq 1 50` + if [ "${pdfWeightIndex}" != "." ];then + option="--pdfSystWeightIndex=${pdfWeightIndex}" + fi + for index in `seq 1 1` do mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/fitres/ -p mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/${index}/img -p done mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/ -p mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/img -p - - bsub -q cmscaf1nh \ - -oo ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ - -eo ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ - -J "${basenameEB} step9${extension} $pdfWeightIndex" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; ./bin/ZFitter2.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=${pdfWeightIndex} --plotOnly || exit 1" - #--useZPtweight --ZPtWeightFile=data/ZPtWeights.root || exit 1"; - continue; - exit 0 - bsub -q cmscaf1nd \ + +# ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale ${option} --noPU +# exit 0 + bsub -q 1nd \ -oo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stdout.log \ -eo ${outDirData}/step9${extension}/${pdfWeightIndex}/%I/fitres/`basename ${outFile} .dat`-${basenameEB}-stderr.log \ - -J "${basenameEB} step9${extension} $pdfWeightIndex [1-50]" \ - "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; -./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --pdfSystWeightIndex=${pdfWeightIndex} --useZPtweight --ZPtWeightFile=data/ZPtWeights.root || exit 1" + -J "${basenameEB} step9${extension} $pdfWeightIndex[51-51]" \ + "cd $PWD; eval \`scramv1 runtime -sh\`; uname -a; echo \$CMSSW_VERSION; mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/{img,fitres}/ -p ; ./bin/ZFitter.exe -f $outDirData/step9${extension}/`basename $configFile` --regionsFile ${regionFileEB} $isOdd $updateOnly --selection=${newSelection} --invMass_var ${invMass_var} --commonCut ${commonCut} --outDirFitResMC=${outDirMC}/${extension}/fitres --outDirImgMC=${outDirMC}/${extension}/img --outDirImgData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/img/ --outDirFitResData=${outDirData}/step9${extension}/${pdfWeightIndex}/\$LSB_JOBINDEX/fitres --constTermFix --smearerFit --smearingEt --autoNsmear --autoBin ${initFile} --corrEleType=HggRunEtaR9Et --onlyScale ${option} --noPU || exit 1" + #--useZPtweight --ZPtWeightFile=data/ZPtWeights.root || exit 1"; # bsub -q 2nd \ # -oo ${outDirData}/step9${extension}/%I/fitres/`basename ${outFile} .dat`-${basenameEE}-stdout.log \ @@ -2316,25 +2344,25 @@ if [ -n "${PDFWEIGHT}" ];then # while [ "`bjobs -J \"${basenameEE} step9${extension}\" | grep -v JOBID | grep -v found | wc -l`" != "0" ]; do /bin/sleep 2m; done exit 0 fi - for pdfWeightIndex in 1 2 7 8 9 10 11 12 17 18 19 20 21 22 26 31 32 43 44 - do - mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/ -p - mkdir ${outDirData}/step9${extension}/${pdfWeightIndex}/img -p + +# for pdfWeightIndex in ${pdfWeightIndexList} +# do - ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/${pdfWeightIndex}/*/fitres/outProfile-$basenameEB-${commonCut}.root - # ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root +# ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEB-${commonCut}.root ${outDirData}/step9${extension}/${pdfWeightIndex}/*/fitres/outProfile-$basenameEB-${commonCut}.root - ######################################################33 - echo "{" > tmp/fitProfiles.C - echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C - echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C - echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C - echo "FitProfile2(\"${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C - # echo "FitProfile2(\"${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C - echo "}" >> tmp/fitProfiles.C - root -l -b -q tmp/fitProfiles.C -# fi - done +# # ./script/haddTGraph.sh -o ${outDirData}/step9${extension}/fitres/outProfile-$basenameEE-${commonCut}.root ${outDirData}/step9${extension}/*/fitres/outProfile-$basenameEE-${commonCut}.root + +# ######################################################33 +# echo "{" > tmp/fitProfiles.C +# echo "gROOT->ProcessLine(\".include $ROOFITSYS/include\");" >> tmp/fitProfiles.C +# echo "gROOT->ProcessLine(\".L macro/macro_fit.C+\");" >> tmp/fitProfiles.C +# echo "gROOT->ProcessLine(\".L macro/plot_data_mc.C+\");" >> tmp/fitProfiles.C +# echo "FitProfile2(\"${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEB-${commonCut}.root\",\"\",\"\",true,false,false);" >> tmp/fitProfiles.C +# # echo "FitProfile2(\"${outDirData}/step9${extension}/${pdfWeightIndex}/fitres/outProfile-$basenameEE-${commonCut}.root\",\"\",\"\",true,true,true);" >> tmp/fitProfiles.C +# echo "}" >> tmp/fitProfiles.C +# root -l -b -q tmp/fitProfiles.C +# # fi +# done exit 0 # cat "`echo $initFile | sed 's|.*=||'`" |grep "C L" >> ${outFile} diff --git a/ZFitter/script/functions.sh b/ZFitter/script/functions.sh index 3bd1fb74506..d706e7f0c0a 100644 --- a/ZFitter/script/functions.sh +++ b/ZFitter/script/functions.sh @@ -183,3 +183,12 @@ mkSmearEleSignal(){ # echo -e "$tag\tsmearEle_$4\tdata/other/`echo $file | sed 's|tmp/||'`" >> $2 # done } + + + +###### +# Convert RooRealVar .config files into smearEle config files +getSmearEleCfg(){ + #$1= config file + sed 's|_| |;' $1 | awk -f awk/smearEleCfg.awk +} diff --git a/ZFitter/src/SmearingImporter.cc b/ZFitter/src/SmearingImporter.cc index 7401a498983..120603480f6 100644 --- a/ZFitter/src/SmearingImporter.cc +++ b/ZFitter/src/SmearingImporter.cc @@ -21,6 +21,8 @@ SmearingImporter::SmearingImporter(std::vector regionList, TString ener _useR9weight(false), _usePtweight(false), _useZPtweight(false), + _useFSRweight(false), + _useWEAKweight(false), _excludeByWeight(true), _onlyDiagonal(false), _isSmearingEt(false), @@ -89,9 +91,11 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS Float_t phiEle[2]; // for the weight calculation - Float_t weight=1; + Float_t weight=1.; Float_t r9weight[2]={1,1}; Float_t ptweight[2]={1,1}; + Float_t FSRweight=1.; + Float_t WEAKweight=1.; Float_t zptweight[45]={1}; Float_t mcGenWeight=1; std::vector *pdfWeights = NULL; @@ -104,6 +108,8 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS //------------------------------ chain->SetBranchAddress("eventNumber", &eventNumber); + chain->SetBranchAddress("etaEle", etaEle); + chain->SetBranchAddress("phiEle", phiEle); chain->SetBranchAddress(_energyBranchName, energyEle); if(chain->GetBranch("scaleEle")!=NULL){ @@ -128,9 +134,17 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS chain->SetBranchAddress("pdfWeights_cteq66", &pdfWeights); } - chain->SetBranchAddress("etaEle", etaEle); - chain->SetBranchAddress("phiEle", phiEle); - + // the second term is to ensure that in case of toy study it is applied only to pseudo-data otherwise to MC + // the third is only temporary because old ntuples does not have the branch + // probably it will be needed in the future if the pdfSystematic branches are put in a separate tree + if(_useFSRweight && isMC==false && (isToy==false || (externToy==true && isToy==true && isMC==false)) && chain->GetBranch("fsrWeight")!=NULL){ + std::cout << "[STATUS] Getting fsrWeight branch for tree: " << chain->GetTitle() << std::endl; + chain->SetBranchAddress("fsrWeight", &FSRweight); + } + if(_useWEAKweight && isMC==false && (isToy==false || (externToy==true && isToy==true && isMC==false)) && chain->GetBranch("weakWeight")!=NULL){ + std::cout << "[STATUS] Getting weakWeight branch for tree: " << chain->GetTitle() << std::endl; + chain->SetBranchAddress("weakWeight", &WEAKweight); + } if(chain->GetBranch("puWeight")!=NULL){ std::cout << "[STATUS] Getting puWeight branch for tree: " << chain->GetTitle() << std::endl; @@ -316,18 +330,22 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS if(_usePUweight) event.weight *= weight; if(_useR9weight) event.weight *= r9weight[0]*r9weight[1]; if(_usePtweight) event.weight *= ptweight[0]*ptweight[1]; + if(_useFSRweight) event.weight *= FSRweight; + if(_useWEAKweight) event.weight *= WEAKweight; if(_useZPtweight && isMC && _pdfWeightIndex>0) event.weight *= zptweight[_pdfWeightIndex]; if(!isMC && _pdfWeightIndex>0 && pdfWeights!=NULL){ if(((unsigned int)_pdfWeightIndex) > pdfWeights->size()) continue; event.weight *= ((*pdfWeights)[0]<=0 || (*pdfWeights)[0]!=(*pdfWeights)[0] || (*pdfWeights)[_pdfWeightIndex]!=(*pdfWeights)[_pdfWeightIndex])? 0 : (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0]; + #ifdef DEBUG if(jentry<10 || event.weight!=event.weight || event.weight>1.3){ std::cout << "jentry = " << jentry - << "\tevent.weight = " << event.weight << "\t" << (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0] - << "\t" << (*pdfWeights)[_pdfWeightIndex] << "\t" << (*pdfWeights)[0] + << "\tevent.weight = " << event.weight + //<< "\t" << (*pdfWeights)[_pdfWeightIndex]/(*pdfWeights)[0] << "\t" << (*pdfWeights)[_pdfWeightIndex] << "\t" << (*pdfWeights)[0] << "\t" << r9weight[0] << " " << r9weight[1] << "\t" << ptweight[0] << " " << ptweight[1] + << "\t" << WEAKweight << "\t" << FSRweight << std::endl; } #endif @@ -353,7 +371,7 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS } // else event.weight=1; } } -#ifdef DEBUG + //#ifdef DEBUG if(jentry<10 || event.weight!=event.weight || event.weight>2){ std::cout << "jentry = " << jentry << "\tevent.weight = " << event.weight @@ -361,11 +379,12 @@ void SmearingImporter::Import(TTree *chain, regions_cache_t& cache, TString oddS << "\t" << r9weight[0] << " " << r9weight[1] << "\t" << ptweight[0] << " " << ptweight[1] << "\t" << zptweight[0] + << "\t" << WEAKweight << "\t" << FSRweight << std::endl; } -#endif + //#endif - if(event.weight<=0 || event.weight!=event.weight) continue; + if(event.weight<=0 || event.weight!=event.weight || event.weight>10) continue; #ifdef FIXEDSMEARINGS if(isMC){ From d22865256d093ace34ee43b14791c13a584f9c04 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Mar 2014 12:31:37 +0100 Subject: [PATCH 367/475] fixed bug in fsr and weak weight for data sample --- ZNtupleDumper/src/ZNtupleDumper.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 5dfd92ddf48..e15f69ee62f 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -355,10 +355,10 @@ class ZNtupleDumper : public edm::EDAnalyzer { std::vector< edm::InputTag > pdfWeightTAGS; edm::Handle< std::vector > pdfWeightHandle; - Float_t fsrWeight; - Float_t weakWeight; edm::InputTag fsrWeightTAG, weakWeightTAG; edm::Handle fsrWeightHandle, weakWeightHandle; + Float_t fsrWeight; + Float_t weakWeight; void InitPdfSystTree(void); void TreeSetPdfSystVar(const edm::Event& iEvent); @@ -434,7 +434,8 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): doPdfSystTree(iConfig.getParameter("doPdfSystTree")), pdfWeightTAGS(iConfig.getParameter< std::vector >("pdfWeightCollections")), fsrWeightTAG(iConfig.getParameter< edm::InputTag>("fsrWeightCollection")), - weakWeightTAG(iConfig.getParameter< edm::InputTag>("weakWeightCollection")) + weakWeightTAG(iConfig.getParameter< edm::InputTag>("weakWeightCollection")), + fsrWeight(1.), weakWeight(1.) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), //puWeightFile(iConfig.getParameter("puWeightFile")), //puWeights() @@ -574,7 +575,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetEleIDVar(*eleIter1, *eleIter1); eleIDTree->Fill(); } - if(doPdfSystTree){ + if(doPdfSystTree && isMC){ TreeSetPdfSystVar(iEvent); //pdfSystTree->Fill(); } @@ -604,7 +605,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetEleIDVar(*eleIter1, *eleIter2); eleIDTree->Fill(); } - if(doPdfSystTree){ + if(doPdfSystTree && isMC){ TreeSetPdfSystVar(iEvent); //pdfSystTree->Fill(); } From 18522c8b23bb39edd8133920217a04870f2c074e Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Mar 2014 12:37:31 +0100 Subject: [PATCH 368/475] fix to be sure no pdfSystematics is produced for data --- ALCARAW_RECO/scripts/prodNtuples.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 1e0c22e748d..bc6ada54c91 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -189,6 +189,11 @@ fi setEnergy $DATASETPATH +case ${isMC} in + 1) PDFSYST=1;; + 0) PDFSYST=0;; +esac + if [ "${TYPE}" != "ALCARERECO" -a "${TYPE}" != "ALCARAW" ];then ORIGIN_REMOTE_DIR_BASE=`echo ${ORIGIN_REMOTE_DIR_BASE} | sed 's|alcaraw|alcareco|g'` elif [ "${TYPE}" != "alcarereco" ];then @@ -323,7 +328,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=${PDFSYST} jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=${PDFSYST} Jsonfile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} get_edm_output=1 output_file=${OUTFILES} From d6ca6fd0551bf3a0faa07822194260f6c25e7f4c Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Mar 2014 12:38:55 +0100 Subject: [PATCH 369/475] fix to be sure no pdfSystematics is produced for data --- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index bc6ada54c91..fdec310ff9d 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -328,7 +328,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=${PDFSYST} Jsonfile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=${PDFSYST} jsonfile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} get_edm_output=1 output_file=${OUTFILES} From 1b8a80387ede82b7375b375948514195b9d8fd1a Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 11 Mar 2014 12:39:34 +0100 Subject: [PATCH 370/475] fix to be sure no pdfSystematics is produced for data --- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index fdec310ff9d..90c029b917a 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -328,7 +328,7 @@ runselection=${RUNRANGE} split_by_run=0 check_user_remote_dir=1 pset=python/alcaSkimming.py -pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=${PDFSYST} jsonfile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} +pycfg_params=type=${TYPE} doTree=${DOTREE} doTreeOnly=1 pdfSyst=${PDFSYST} jsonFile=${JSONFILE} isCrab=1 secondaryOutput=${OUTFILES} skim=${SKIM} get_edm_output=1 output_file=${OUTFILES} From 54fa88a147e78d6112ee1f805777357e2cb7e0a3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 12 Mar 2014 15:05:12 +0100 Subject: [PATCH 371/475] added particleGun option in ntuplizer and alcaSkimming --- ALCARAW_RECO/python/alcaSkimming.py | 11 +- ZNtupleDumper/python/zntupledumper_cfi.py | 1 + ZNtupleDumper/src/ZNtupleDumper.cc | 128 ++++++++++++++-------- 3 files changed, 93 insertions(+), 47 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 3340c7000e6..f73f8775629 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -31,7 +31,7 @@ "", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, - "type of skim: ZSkim, WSkim, fromWSkim (from USER format), EleSkim (at least one electron), ''") + "type of skim: ZSkim, WSkim, partGun, fromWSkim (from USER format), EleSkim (at least one electron), ''") options.register('jsonFile', "", VarParsing.VarParsing.multiplicity.singleton, @@ -78,7 +78,6 @@ WSkim=True elif(options.skim=="ZSCSkim"): ZSCSkim=True - elif(options.skim=="fromWSkim"): print "[INFO] producing from WSkim files (USER format)" WSkim=False @@ -353,7 +352,7 @@ src = cms.InputTag("gsfElectrons"), minNumber = cms.uint32(1) ) -if(options.skim=="" or options.skim=="none" or options.skim=="no"): +if(options.skim=="" or options.skim=="none" or options.skim=="no" or options.skim=="partGun"): process.ZeeFilterSeq = cms.Sequence(process.MinEleNumberFilter) process.WenuFilterSeq = cms.Sequence(process.MinEleNumberFilter) process.ZSCFilterSeq = cms.Sequence(process.MinEleNumberFilter) @@ -384,6 +383,10 @@ else: process.NtupleFilterSeq = cms.Sequence() + +if(options.skim=="partGun"): + process.zNtupleDumper.isPartGun = cms.bool(True) + #process.NtupleFilter) #process.filterSeq *= process.NtupleFilter @@ -445,6 +448,8 @@ process.zNtupleDumper.pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')) else: process.pdfWeightsSeq = cms.Sequence() + process.zNtupleDumper.doPdfSystTree = cms.bool(False) + ############################################################ # OUTPUT MODULES diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index b69139365cd..3a45a88a14d 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -24,6 +24,7 @@ fsrWeightCollection = cms.InputTag("fsrWeight"), weakWeightCollection = cms.InputTag("weakWeight"), isWenu = cms.bool(False), + isPartGun = cms.bool(False), # hltPaths = cms.vstring() hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v15', 'HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v16', diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index e15f69ee62f..cfcd23c642d 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -146,6 +146,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { bool isMC; bool isWenu; + bool isPartGun; //Handles and inputTags private: @@ -417,6 +418,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): // isMC(iConfig.getParameter("isMC")), isWenu(iConfig.getParameter("isWenu")), + isPartGun(iConfig.getParameter("isPartGun")), vtxCollectionTAG(iConfig.getParameter("vertexCollection")), BeamSpotTAG(iConfig.getParameter("BeamSpotCollection")), electronsTAG(iConfig.getParameter("electronCollection")), @@ -553,62 +555,100 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } } - for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); - eleIter1 != electronsHandle->end(); - eleIter1++){ - if(isWenu){ - if(! eleIter1->electronID("tight") ) continue; - if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event - - // MET/MT selection - if( met.et() < 25. ) continue; - if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 50. ) continue; - if( eleIter1->et()<30) continue; - - TreeSetDiElectronVar(*eleIter1, *eleIter1); - tree->Fill(); - if(doExtraCalibTree){ - TreeSetExtraCalibVar(*eleIter1, *eleIter1); - extraCalibTree->Fill(); - } - if(doEleIDTree){ - TreeSetEleIDVar(*eleIter1, *eleIter1); - eleIDTree->Fill(); - } - if(doPdfSystTree && isMC){ - TreeSetPdfSystVar(iEvent); - //pdfSystTree->Fill(); - } - } else { - for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; - eleIter2 != electronsHandle->end(); - eleIter2++){ - // should exit when eleIter1 == end-1 - //if(! eleIter2->electronID("loose") ) continue; - - //pat::CompositeCandidate zeeCandidate; - //if(! (eleIter1->electronID("WP90PU") && eleIter1->electronID("fiducial"))) continue; - //if(! (eleIter2->electronID("WP90PU") && eleIter2->electronID("fiducial"))) continue; - //zeeCandidate.addDaughter(*eleIter1, "electron1"); - //zeeCandidate.addDaughter(*eleIter2, "electron2"); - float mass=(eleIter1->p4()+eleIter2->p4()).mass(); - if(mass < 55 || mass > 125) continue; + if(isPartGun){ + pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); + pat::ElectronCollection::const_iterator eleIter2 = eleIter1; + for(eleIter1 = electronsHandle->begin(); + eleIter1 != electronsHandle->end() && eleIter1->genLepton()==0; + eleIter1++){ + } + + //if no electron matching the gen particles then the event is skipped + //if(eleIter1 == electronsHandle->end()) return; + if(eleIter1 == electronsHandle->end()) eleIter1=electronsHandle->begin(); + + //in order to not put duplicate electrons, remove the ones not matching the genparticle + for(eleIter2=eleIter1, eleIter2++; + eleIter2 != electronsHandle->end() && eleIter2->genLepton()==0; + eleIter2++){ + } + if(eleIter2 == electronsHandle->end()){ + if(eleIter1->genLepton()!=0 || electronsHandle->size() < 2) eleIter2=eleIter1; + else eleIter2=eleIter1+1; + } + + //if one electron matching the gen particles then eleIter2 = eleIter1 + //else we have two electrons + TreeSetDiElectronVar(*eleIter1, *eleIter2); + tree->Fill(); + if(doExtraCalibTree){ + TreeSetExtraCalibVar(*eleIter1, *eleIter2); + extraCalibTree->Fill(); + } + if(doEleIDTree){ + TreeSetEleIDVar(*eleIter1, *eleIter2); + eleIDTree->Fill(); - // ZCandidatesCollection.push_back(zeeCandidate); - TreeSetDiElectronVar(*eleIter1, *eleIter2); + } + } else{ + + for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); + eleIter1 != electronsHandle->end(); + eleIter1++){ + if(isWenu){ + if(! eleIter1->electronID("tight") ) continue; + if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event + + // MET/MT selection + if( met.et() < 25. ) continue; + if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 50. ) continue; + if( eleIter1->et()<30) continue; + + TreeSetDiElectronVar(*eleIter1, *eleIter1); tree->Fill(); if(doExtraCalibTree){ - TreeSetExtraCalibVar(*eleIter1, *eleIter2); + TreeSetExtraCalibVar(*eleIter1, *eleIter1); extraCalibTree->Fill(); } if(doEleIDTree){ - TreeSetEleIDVar(*eleIter1, *eleIter2); + TreeSetEleIDVar(*eleIter1, *eleIter1); eleIDTree->Fill(); } if(doPdfSystTree && isMC){ TreeSetPdfSystVar(iEvent); //pdfSystTree->Fill(); } + }else { + for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; + eleIter2 != electronsHandle->end(); + eleIter2++){ + // should exit when eleIter1 == end-1 + //if(! eleIter2->electronID("loose") ) continue; + + //pat::CompositeCandidate zeeCandidate; + //if(! (eleIter1->electronID("WP90PU") && eleIter1->electronID("fiducial"))) continue; + //if(! (eleIter2->electronID("WP90PU") && eleIter2->electronID("fiducial"))) continue; + //zeeCandidate.addDaughter(*eleIter1, "electron1"); + //zeeCandidate.addDaughter(*eleIter2, "electron2"); + float mass=(eleIter1->p4()+eleIter2->p4()).mass(); + if((mass < 55 || mass > 125)) continue; + + // ZCandidatesCollection.push_back(zeeCandidate); + TreeSetDiElectronVar(*eleIter1, *eleIter2); + tree->Fill(); + if(doExtraCalibTree){ + TreeSetExtraCalibVar(*eleIter1, *eleIter2); + extraCalibTree->Fill(); + } + if(doEleIDTree){ + TreeSetEleIDVar(*eleIter1, *eleIter2); + eleIDTree->Fill(); + } + if(doPdfSystTree && isMC){ + TreeSetPdfSystVar(iEvent); + //pdfSystTree->Fill(); + } + } } } } From adec8debc4cc086802a9a7cda1e3a30568bdb855 Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 12 Mar 2014 15:10:05 +0100 Subject: [PATCH 372/475] added option (redundant) in prodNtuples --- ALCARAW_RECO/scripts/prodNtuples.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 90c029b917a..b94aa9b27ee 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -32,6 +32,7 @@ usage(){ echo " ALCARERECO: alcareco format after rereco on ALCARAW" echo " *** for MC ***" echo " --isMC" + echo " --isParticleGun: redundant, --skim=partGun is the same" echo " *** for DATA ***" echo " --json_name jsonName: additional name in the folder structure to keep track of the used json" echo " --json jsonFile.root" @@ -68,7 +69,7 @@ expertUsage(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,ntuple_remote_dir:,json:,tag:,type:,json_name:,sandbox_remote_dir:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,createOnly,submitOnly,check,file_per_job: -- "$@") +if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,isParticleGun,ntuple_remote_dir:,json:,tag:,type:,json_name:,sandbox_remote_dir:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,createOnly,submitOnly,check,file_per_job: -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -125,6 +126,7 @@ do esac ;; --isMC) isMC=1; TYPE=ALCARECOSIM;; + --isParticleGun) isPARTICLEGUN="y"; SKIM=partGun;; --json) JSONFILE=$2; shift;; --json_name) JSONNAME=$2; shift;; From 5296729f6bc8cfe587339c432adb47dd6c738b9d Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 26 Mar 2014 16:19:50 +0100 Subject: [PATCH 373/475] updated documentation --- .../doc/alcaraw_alcareco_production.txt | 79 +++++++++++-------- ALCARAW_RECO/doc/dataformats.txt | 56 +++++++------ README | 2 + 3 files changed, 82 insertions(+), 55 deletions(-) diff --git a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt index b3c558a22ed..81ba6e88c94 100644 --- a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt +++ b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt @@ -1,50 +1,30 @@ /** * \page page2 Instructions for ALCARAW and ALCARECO production -* \verbatim -#============================== ALCARECO and ALCARAW production instructions -Steps for the production using the CERN batch system (launch from lxplus): - -0) Check that there are no updates in the repository: - git pull # this will merge automatically the updates in the master branch +\section ALCARECO_production ALCARECO production -#### ALCARAW private production -> TO BE UPDATED -The following instructions correspond to point: 1a), 1.1a), 2a) indicated in -Calibration/README: -https://svnweb.cern.ch/cern/wsvn/analysis/trunk/Calibration/README - -For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.dump file - -1) Fill the alcaraw_datasets.dat with the information of the desired run range - It is convenient to add the new line at the bottom of the file. - For this step, in case of update of a growing dataset, please have - a look to the "Production update" section below +Steps for the production using the CERN batch system (launch from lxplus): -2) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial - use the --tutorial if you are testing the machinery - use grep commands to select the proper line from alcaraw_datasets.dat - the script will create the crab task and submit it - use --createOnly or --submitOnly if needed - see ./scripts/prodAlcaraw.sh --help for more informations - -3) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial --check - check the job status and output +0) Check that there are no updates in the repository, + this will merge automatically the updates in the master branch + \code git pull \endcode -4) Commit the changes to alcaraw_datasets.dat! - svn ci -m "message" -#### ALCARECO private production 1) Fill the alcareco_datasets.dat with the information of the desired run range It is convenient to add the new line at the bottom of the file. - Please refere to the ALCARAW_RECO/doc/dataformats.txt file for information + Please refere to the \ref DATAFORMATS file for information about how the alcareco_datasets.dat file is structured. For this step, in case of update of a growing dataset, please have a look to the "Production update" section below -2) ./scripts/prodAlcareco.sh `parseDatasetFile.sh alcareco_datasets.dat |grep 22Jan | grep Run2012A` --tutorial +2) \code + ./scripts/prodAlcareco.sh `parseDatasetFile.sh alcareco_datasets.dat |grep 22Jan | grep Run2012A` --tutorial + \endcode + \code ./scripts/prodAlcareco.sh `parseDatasetFile.sh alcareco_datasets.dat |grep RelVal22Jan | grep Run2012A` --tutorial + \endcode use the --tutorial if you are testing the machinery: it will save the files in a separate directory on EOS (not the central one) use grep commands to select the proper line from alcareco_datasets.dat the script will create the crab task and submit it @@ -59,6 +39,42 @@ For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.d 3) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial --check check the job status and output +4) Commit the changes to alcaraw_datasets.dat! + \code + git add alcareco_datasets.dat + git commit -m "message" + \endcode + + + +* \verbatim + +OUTDATED instructions +#============================== ALCARECO and ALCARAW production instructions + + +#### ALCARAW private production -> TO BE UPDATED +The following instructions correspond to point: 1a), 1.1a), 2a) indicated in +Calibration/README: +https://svnweb.cern.ch/cern/wsvn/analysis/trunk/Calibration/README + +For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.dump file + +1) Fill the alcaraw_datasets.dat with the information of the desired run range + It is convenient to add the new line at the bottom of the file. + For this step, in case of update of a growing dataset, please have + a look to the "Production update" section below + +2) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial + use the --tutorial if you are testing the machinery + use grep commands to select the proper line from alcaraw_datasets.dat + the script will create the crab task and submit it + use --createOnly or --submitOnly if needed + see ./scripts/prodAlcaraw.sh --help for more informations + +3) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial --check + check the job status and output + 4) Commit the changes to alcaraw_datasets.dat! svn ci -m "message" @@ -74,6 +90,7 @@ For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.d + ######### OBSOLETE INSTRUCTIONS 4a) Produce the ALCARECO: (if you have put the new line as last line) ./scripts/prodAlcareco.sh `parseProdSandboxOptions.sh alcaraw_datasets.dat | tail -1` --submit --scheduler lsf diff --git a/ALCARAW_RECO/doc/dataformats.txt b/ALCARAW_RECO/doc/dataformats.txt index 2e8d7e20b3f..2742e2f7412 100644 --- a/ALCARAW_RECO/doc/dataformats.txt +++ b/ALCARAW_RECO/doc/dataformats.txt @@ -1,5 +1,7 @@ -#============================== Introduction -The calibration in 2012 with electrons (single and double electron +/** + * \page DATAFORMATS Dataformats + + The calibration in 2012 with electrons (single and double electron samples) will be performed using the alcareco data format that contains only relevant collections for the ECAL calibration with electrons. @@ -10,7 +12,7 @@ file please do it. ALCARECO and ALCARAW private production logic. -#### Data formats +\subsection dataformats Data formats - EcalUncalElectron (ALCARAW): Special data format for rereco purpose - in CMSSW from the 7_X_X release - no official ALCARAW have been produced so far @@ -27,7 +29,7 @@ ALCARECO and ALCARAW private production logic. - can be produced also privately starting from RAW-RECO Z and W skims -#### Files for book keeping: used to create, submit and book-keep the +\subsection bookKeeping Files for book keeping: used to create, submit and book-keep the production - alcaraw_datasets.dat - alcareco_datasets.dat @@ -35,35 +37,36 @@ ALCARECO and ALCARAW private production logic. - ntuple_datasets.dat -#### Book-keeping files content and syntax -For each line one crab task is created. -Their contents are not exactly the same. -Lines can be commented with a # at the beginning of the line -Columns are separated by TAB - -## alcaraw_datasets.dat -# RUNRANGE DATASETPATH DATASETNAME STORE_PATH_BASE USER_REMOTE_DIR_BASE VALIDITY PERIOD -190456-193621 /DoubleElectron/Run2012A-ZElectron-13Jul2012-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-13Jul-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABC,Cal_Nov2012 +\subsection bookKeepingFormat Book-keeping files content and syntax + - For each line one crab task is created. + - Their contents are not exactly the same. + - Lines can be commented with a # at the beginning of the line. + - Columns are separated by TAB. +\section alcarawDatasetsFormat alcaraw_datasets.dat +\verbatim +# RUNRANGE DATASETPATH DATASETNAME STORE_PATH_BASE USER_REMOTE_DIR_BASE VALIDITY PERIOD +190456-193621 /DoubleElectron/Run2012A-ZElectron-13Jul2012-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-13Jul-v1 caf group/alca_ecalcalib/ecalelf/alcaraw VALID RUN2012ABC,Cal_Nov2012 +\endverbatim For each line a crab task is created -RUNRANGE: only events in the indicated run range are processed -DATASETPATH: This is the real DBS dataset path (full name) -DATASETNAME: This is a short name which will be used now on to refer + - RUNRANGE: only events in the indicated run range are processed + - DATASETPATH: This is the real DBS dataset path (full name) + - DATASETNAME: This is a short name which will be used now on to refer to the specified DATASET. The DATASETNAME is used in the construction of the output folders! -STORE_PATH_BASE: indicates the storage element where to store the + - STORE_PATH_BASE: indicates the storage element where to store the output it can be: caf or T2_IT_Rome (if other are needed, please contact cms-ecalelf-devel) -USER_REMOTE_DIR: this is the directory on the Storage Element under + - USER_REMOTE_DIR: this is the directory on the Storage Element under the store/ folder Usually files are stored on the T2_CH_CERN EOS system in the ALCA group folders: group/alca_ecalcalib/ecalelf/alcaraw (private production) It can be "database" that indicates that the dataset is published and available in DBS (e.g. official ALCARECO) -VALIDITY (only meaningful for ALCARAW): + - VALIDITY (only meaningful for ALCARAW): for each line in this file the corresponding ALCARAW files are present on EOS. There can be the necessity to exclude from the RERECO process some ALCARAW datasets @@ -77,7 +80,7 @@ VALIDITY (only meaningful for ALCARAW): In this way it's not necessary to remove the files from EOS and in the alcaraw_datasets.dat there is always the list of folders and files present on EOS. -PERIOD: in case of rereco, you want to run on more than one line (more + - PERIOD: in case of rereco, you want to run on more than one line (more run ranges). To make life easier, a comma separated list of "periods" can be associated to the line. In this way, when @@ -85,8 +88,8 @@ PERIOD: in case of rereco, you want to run on more than one line (more lines associated to it will be rerecoed (if valid!) +\section alcarecoDatasetsFormat alcareco_datasets.dat -## alcareco_datasets.dat In this file are reported all the datasets for which the ALCARECO is produced with the same sintax as alcaraw_datasets.dat . They can be produced centrally in ALCARECO format (prompt or @@ -98,26 +101,31 @@ produce the same privately for example). e.g. DoubleElectron-ZAlcaSkim-RUN2012D-22Jan-v1 (centrally produced) instead of DoubleElectron-ZSkim-RUN2012D-22Jan-v1 (private production) -## alcarereco_datasets.dat +\section alcarerecoDatasetsFormat alcarereco_datasets.dat This file is filled automatically by the rereco scripts. One example line is: +\verbatim # RUNRANGE DATASETPATH DATASETNAME STORE_PATH_BASE USER_REMOTE_DIR ALCARAW_REMOTE_DIR TAG 190456-193621 /DoubleElectron/Run2012A-ZElectron-13Jul2012-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-13Jul-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco group/alca_ecalcalib/ecalelf/alcaraw Cal_Nov2012_ICEle_v1 +\endverbatim In this file there are two additional fields: - ALCARAW_REMOTE_DIR: this is the output directory where of the ALCARAW + - ALCARAW_REMOTE_DIR: this is the output directory where of the ALCARAW production step, if for any reason the standard ALCARAW is produced elsewhere, this should be reported here by the rereco script (you should provide this information with the script option) - TAG: this is the "rereco name". This will be explained better in the + - TAG: this is the "rereco name". This will be explained better in the rereco section #### OUTPUT DIRECTORIES: The remote directory in the storage element is set as follows: +\verbatim USER_REMOTE_DIR=$USER_REMOTE_DIR_BASE/${ENERGY}/${DATASETNAME}/${DATASETNAME}-${RUNRANGE:-allRange} +\endverbatim where ENERGY is 7TeV for 2011 datasets and 8TeV for 2012 datasets +*/ diff --git a/README b/README index bd39bbd582f..6d29c0c4b11 100644 --- a/README +++ b/README @@ -12,6 +12,8 @@ * * Instructions for ECAL validator (rereco + ntuple production): \ref page5 */ + + /** * \page page1 Code instructions and explanations * \verbatim From 2f796a591de1612c4db3710f791e955cf68085a9 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 31 Mar 2014 17:24:09 +0200 Subject: [PATCH 374/475] updated ntuples --- .../validation/22Jan2012-runDepMCAll_v3.dat | 92 +++++++++++++++---- 1 file changed, 73 insertions(+), 19 deletions(-) diff --git a/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat b/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat index d5f157818d2..e08cecca77b 100644 --- a/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat +++ b/ZFitter/data/validation/22Jan2012-runDepMCAll_v3.dat @@ -1,14 +1,14 @@ -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root -s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/194533-194533/pdf_fsr_weak_Weights_gainSwitch/DYJets-Summer12-START53-ZSkim-runDependent-194533-194533.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/200519-200519/pdf_fsr_weak_Weights_gainSwitch/DYJets-Summer12-START53-ZSkim-runDependent-200519-200519.root +s1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets-Summer12-START53-ZSkim-runDependent/206859-206859/pdf_fsr_weak_Weights_gainSwitch/DYJets-Summer12-START53-ZSkim-runDependent-206859-206859.root # -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root -s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/194533-194533/pdf_fsr_weak_Weights_gainSwitch/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-194533-194533.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/200519-200519/pdf_fsr_weak_Weights_gainSwitch/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-200519-200519.root +s3 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYJets_sherpa-Summer12-START53-ZSkim-runDependent/206859-206859/pdf_fsr_weak_Weights_gainSwitch/DYJets_sherpa-Summer12-START53-ZSkim-runDependent-206859-206859.root # -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root -s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/pdfWeights_GainSwitch_v4/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/194533-194533/pdf_fsr_weak_Weights_gainSwitch/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-194533-194533.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/200519-200519/pdf_fsr_weak_Weights_gainSwitch/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-200519-200519.root +s2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECOSIM/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent/206859-206859/pdf_fsr_weak_Weights_gainSwitch/DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-206859-206859.root # d1 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012A-22Jan-v1/190645-193621/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012A-22Jan-v1-190645-193621.root d2 selected root://eoscms//eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/8TeV/ALCARECO/DoubleElectron-ZSkim-RUN2012B-22Jan-v1/193834-196531/190456-208686-22Jan_v1/GainSwitch_v3/DoubleElectron-ZSkim-RUN2012B-22Jan-v1-193834-196531.root @@ -26,20 +26,74 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/206859- s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s1-runDepMCAll.root s2 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s2-runDepMCAll_v3.root s3 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/mcPUtree_s3-runDepMCAll.root -##### Scale correction trees (examples) +##### Scale correction trees +d1 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d1-22Jan2012-runDepMCAll_v3.root +d2 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d2-22Jan2012-runDepMCAll_v3.root +d3 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d3-22Jan2012-runDepMCAll_v3.root +d4 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d4-22Jan2012-runDepMCAll_v3.root # -#d1 scaleEle_HggRunEtaR9Et data/other/scaleEle_HggRunEtaR9Et_d1-22Jan2012-runDepMCAll_v3.root +s1 smearEle_stochastic data/other/smearEle_stochastic_s1-22Jan2012-runDepMCAll_v3.root +s2 smearEle_stochastic data/other/smearEle_stochastic_s2-22Jan2012-runDepMCAll_v3.root +s3 smearEle_stochastic data/other/smearEle_stochastic_s3-22Jan2012-runDepMCAll_v3.root # -#s1 smearEle_stochastic data/other/smearEle_stochastic_s1-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch data/smearerCat/smearerCat_gainSwitch_s3-22Jan2012-runDepMCAll_v3.root # -#s1 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s1-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_gainSwitch_2 data/smearerCat/smearerCat_gainSwitch_2_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_2 data/smearerCat/smearerCat_gainSwitch_2_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_2 data/smearerCat/smearerCat_gainSwitch_2_s3-22Jan2012-runDepMCAll_v3.root # -#s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_gainSwitch_3 data/smearerCat/smearerCat_gainSwitch_3_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_3 data/smearerCat/smearerCat_gainSwitch_3_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_3 data/smearerCat/smearerCat_gainSwitch_3_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_gainSwitch_4 data/smearerCat/smearerCat_gainSwitch_4_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_4 data/smearerCat/smearerCat_gainSwitch_4_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_4 data/smearerCat/smearerCat_gainSwitch_4_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_gainSwitch_5 data/smearerCat/smearerCat_gainSwitch_5_s3-22Jan2012-runDepMCAll_v3.root +# +s1 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep4smearing_1 data/smearerCat/smearerCat_scaleStep4smearing_1_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep4smearing_2 data/smearerCat/smearerCat_scaleStep4smearing_2_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep4smearing_0 data/smearerCat/smearerCat_scaleStep4smearing_0_s3-22Jan2012-runDepMCAll_v3.root # #d1 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d1-22Jan2012-runDepMCAll_v2.root -#s1 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s1-22Jan2012-runDepMCAll_v3.root +#d2 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d2-22Jan2012-runDepMCAll_v2.root +#d3 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d3-22Jan2012-runDepMCAll_v2.root +#d4 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_d4-22Jan2012-runDepMCAll_v2.root +#s1 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_s1-22Jan2012-runDepMCAll_v2.root +#s2 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_s2-22Jan2012-runDepMCAll_v2.root +#s3 invMassSigma_SC_regrCorrSemiParV5_pho data/other/invMassSigma_SC_regrCorrSemiParV5_pho_s3-22Jan2012-runDepMCAll_v2.root +s1 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep2smearing_10 data/smearerCat/smearerCat_scaleStep2smearing_10_s3-22Jan2012-runDepMCAll_v3.root +### +d1 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d1-22Jan2012-runDepMCAll_v3.root +d2 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d2-22Jan2012-runDepMCAll_v3.root +d3 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d3-22Jan2012-runDepMCAll_v3.root +d4 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_d4-22Jan2012-runDepMCAll_v3.root +s1 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s1-22Jan2012-runDepMCAll_v3.root +s2 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s2-22Jan2012-runDepMCAll_v3.root +s3 ZPt_energySCEle_regrCorrSemiParV5_pho data/other/ZPt_energySCEle_regrCorrSemiParV5_pho_s3-22Jan2012-runDepMCAll_v3.root ## -#s1 ZPtWeight data/other/ZPtWeight_s1-22Jan2012-runDepMCAll_v3.root -# -#s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v3.root - +s1 ZPtWeight data/other/ZPtWeight_s1-22Jan2012-runDepMCAll_v3.root +s2 ZPtWeight data/other/ZPtWeight_s2-22Jan2012-runDepMCAll_v3.root +s3 ZPtWeight data/other/ZPtWeight_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep2smearing_9 data/smearerCat/smearerCat_scaleStep2smearing_9_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_scaleStep6smearing_1 data/smearerCat/smearerCat_scaleStep6smearing_1_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_scaleStep6smearing_1 data/smearerCat/smearerCat_scaleStep6smearing_1_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_scaleStep6smearing_1 data/smearerCat/smearerCat_scaleStep6smearing_1_s3-22Jan2012-runDepMCAll_v3.root +s1 smearerCat_nPV data/smearerCat/smearerCat_nPV_s1-22Jan2012-runDepMCAll_v3.root +s2 smearerCat_nPV data/smearerCat/smearerCat_nPV_s2-22Jan2012-runDepMCAll_v3.root +s3 smearerCat_nPV data/smearerCat/smearerCat_nPV_s3-22Jan2012-runDepMCAll_v3.root From d2991dfe1bd38d2380be6ed8031c4a5ab678b838 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 3 Apr 2014 08:53:10 +0200 Subject: [PATCH 375/475] small guide for developers --- ALCARAW_RECO/doc/development.txt | 39 ++++++++++++++++++++++++++++++++ README | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 ALCARAW_RECO/doc/development.txt diff --git a/ALCARAW_RECO/doc/development.txt b/ALCARAW_RECO/doc/development.txt new file mode 100644 index 00000000000..667ba0ab4ae --- /dev/null +++ b/ALCARAW_RECO/doc/development.txt @@ -0,0 +1,39 @@ +/** + * \page Devel Guide for ECALELF development + + \section Devel_git Setting up the working directory +If you downloaded the code following the instructions (* Download instructions ) you now have a local copy of the ECALELF package. + +In order to be able to make new development you need to setup an ECALELF git repository in your personal gitHub area. +The easiest way to do this is to fork the ECALELF repository. + - fork the repository as indicated in "step1" in this page . + - set your fork as a new remote repository (only the first time, just to point to the right remote, not ECALELF) +\code +git remote add myfork git@github.com:myGitHubUser/ECALELF.git +git fetch myfork +\endcode + - move to the ECALELF branch you want to start working on (usually the master but can be some different ECALELF branch like devel-700pre12) +\code +git checkout master +\endcode + - create a new branch and make it poiting to the ECALELF branch you started from. This way you can keep your development updated with the ECALELF branch. In the example below I'm assuming you are developing from the master +\code +git branch myNewBranch +git checkout myNewBranch +git branch --set-upstream-to=origin/master +\endcode + - make your changes (example) +\code +emacs test.txt +git add test.txt +git commit -m "test" +\endcode + - now you have committed some changes in your local repository and you need to propage them to your gitHub fork +git push myfork myNewBranch + - to keep the code updated (this must point to ECALELF) + - Before pull, be sure that everithing is committed and in case commit it +\code git status -uno \endcode + - update the code from ECALELF (the --no-commit option make sure that the files modified on the ECALELF side are changed locally but not yet committed. You have the possibility to change them) +\code git pull --no-commit \endcode + + */ diff --git a/README b/README index 6d29c0c4b11..ff1c08fe6bb 100644 --- a/README +++ b/README @@ -11,6 +11,8 @@ * Working with ntuples: \ref page4 * * Instructions for ECAL validator (rereco + ntuple production): \ref page5 +* +* Small eveloper guide: \ref Devel */ From 7054b582604c1635923e94884d400360f3fb8420 Mon Sep 17 00:00:00 2001 From: shervin Date: Wed, 16 Apr 2014 12:14:23 +0200 Subject: [PATCH 376/475] updating instructions --- ALCARAW_RECO/doc/rereco.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt index 7b1d8d774e4..a1d26f27fbe 100644 --- a/ALCARAW_RECO/doc/rereco.txt +++ b/ALCARAW_RECO/doc/rereco.txt @@ -68,7 +68,27 @@ the command Not yet tested!!! -For example: +\subsection lxplus6job Job submission on lxplus6 +Batch nodes at CERN are moving to slc6 and can be accessible only from lxplus6 machines. +Consider to create the jobs on a lxplus5 machin with the previous command and adding the --createOnly option. +Then move to an lxplus6 machine and re-execute the command but with the --submitOnly option instead. + + - create the jobs on sl5 with option ./scripts/RerecoQuick.sh .... --createOnly + - login on sls6 + - cd to the ...CMSSW_5_3_14_patch2/src/Calibration/ + - source initCmsEnv.csh + - ignore the error messages + - submit the jobs on sl6 with option ./scripts/RerecoQuick.sh .... --submitOnly + +Additional tricks with CERN batch system: +if for any reason you want to migrate pending jobs from one queue to another you can run the command (bash syntax) +\code +for jobid in `bjobs -q cmscaf1nd | cut -d ' ' -f 1`; do bmod -q 1nd $jobid; done +\endcode + + + +\subsection rerecoExample Rereco example: \code ./scripts/RerecoQuick.sh -p RUN2012ABCD -t config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo_b.py --json=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt --json_name=190456-208686_22JanReReco_v1 --tutorial \endcode From e8cda9dacaf1e6decaf29b86a1a99da2bee0e8de Mon Sep 17 00:00:00 2001 From: Hengne Date: Wed, 16 Apr 2014 12:09:58 +0200 Subject: [PATCH 377/475] test version for including highEta --- ALCARAW_RECO/copyTree.cc | 72 ++ ALCARAW_RECO/copyTree.h | 282 ++++++++ ALCARAW_RECO/copyTree.sh | 41 ++ ALCARAW_RECO/initdata.sh | 28 + ALCARAW_RECO/python/WZElectronSkims_cff.py | 22 +- ALCARAW_RECO/python/alcaSkimming.py | 29 +- .../scripts/makeArgumentsWithDataPath.sh | 128 ++++ ALCARAW_RECO/scripts/prodAlcareco.sh | 91 ++- ALCARAW_RECO/scripts/prodFunctions.sh | 3 + ALCARAW_RECO/scripts/prodNtuples.sh | 7 +- ALCARAW_RECO/test/testHighEtaProduction.sh | 14 + ZNtupleDumper/BuildFile.xml | 2 + ZNtupleDumper/python/zntupledumper_cfi.py | 5 + ZNtupleDumper/src/ZNtupleDumper.cc | 650 +++++++++++++++++- initCmsEnv.sh | 8 +- 15 files changed, 1347 insertions(+), 35 deletions(-) create mode 100644 ALCARAW_RECO/copyTree.cc create mode 100644 ALCARAW_RECO/copyTree.h create mode 100755 ALCARAW_RECO/copyTree.sh create mode 100755 ALCARAW_RECO/initdata.sh create mode 100755 ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh create mode 100644 ALCARAW_RECO/test/testHighEtaProduction.sh diff --git a/ALCARAW_RECO/copyTree.cc b/ALCARAW_RECO/copyTree.cc new file mode 100644 index 00000000000..34ed965b157 --- /dev/null +++ b/ALCARAW_RECO/copyTree.cc @@ -0,0 +1,72 @@ +#include "copyTree.h" +#include "TFile.h" + +int main(int argc, char* argv[]) +{ + if (argc<3) + { + std::cout << "> drawMee " + << std::endl; + return 0; + } + + std::string inrootfilename(argv[1]); + std::string outrootfilename(argv[2]); + + int maxevt = -1; + char* selection; + if (argc>3) + { + maxevt = atoi(argv[3]); + + if (argc>4) + { + selection = argv[4]; + } + } + + + // reading data + TFile* infile = new TFile(inrootfilename.c_str()); + TTree* tree = (TTree*)infile->Get("selected"); + TTree* extree = (TTree*)infile->Get("extraCalibTree"); + extree->BuildIndex("runNumber","eventNumber"); + + // output root file + TFile* fout = new TFile(outrootfilename.c_str(), "recreate"); + + // Set the branches for the TChain/TTree + SetTreeBranch(tree); + gROOT->ProcessLine("#include "); + SetExtraTreeBranch(extree); + + // clone tree + TTree* newtree; + if (maxevt>0) newtree = (TTree*)tree->CopyTree(selection, "", maxevt); + else newtree = (TTree*)tree->CopyTree(selection); + SetTreeBranch(newtree); + + TTree* newextree = (TTree*)extree->CloneTree(0); + SetExtraTreeBranch(newextree); + + int newEntries = newtree->GetEntries(); + for (int i=0; iGetEntry(i); + extree->GetEntryWithIndex(runNumber, eventNumber); + newextree->Fill(); + } + + // write the hist to out root file + fout->cd(); + + newtree->Write(); + newextree->Write(); + + + // close + fout->Close(); + + // + return 1; +} diff --git a/ALCARAW_RECO/copyTree.h b/ALCARAW_RECO/copyTree.h new file mode 100644 index 00000000000..c7f2bdfdc8f --- /dev/null +++ b/ALCARAW_RECO/copyTree.h @@ -0,0 +1,282 @@ +#include +#include +#include +#include +#include +#include +#include "TROOT.h" +#include "TChain.h" +#include "TTree.h" +#include "TH1D.h" +#include "TMath.h" + + +// variables for ROOT Tree +//Declaration of leaves types + Int_t runNumber; + ULong64_t eventNumber; + Int_t lumiBlock; + ULong64_t runTime; + Float_t mcGenWeight; + Char_t HLTfire; + Int_t nPU[1]; + Float_t rho; + Int_t nPV; + Int_t eleID[2]; + Int_t ZStat; + Int_t chargeEle[2]; + Float_t etaSCEle[2]; + Float_t phiSCEle[2]; + Float_t etaEle[2]; + Float_t phiEle[2]; + Int_t classificationEle[2]; + Int_t recoFlagsEle[2]; + Float_t PtEle[2]; + Float_t fbremEle[2]; + Float_t seedXSCEle[2]; + Float_t seedYSCEle[2]; + Float_t seedEnergySCEle[2]; + Float_t seedLCSCEle[2]; + Float_t avgLCSCEle[2]; + UChar_t gainEle[2]; + Float_t energyMCEle[2]; + Float_t energySCEle[2]; + Float_t rawEnergySCEle[2]; + Float_t esEnergySCEle[2]; + Float_t energySCEle_corr[2]; + Float_t energySCEle_regrCorr_ele[2]; + Float_t energySCEle_regrCorr_pho[2]; + Float_t energyEle_regrCorr_fra[2]; + Float_t energySigmaEle_regrCorr_fra[2]; + Float_t energyEle_regrCorr_egamma[2]; + Float_t energySigmaEle_regrCorr_egamma[2]; + Float_t energySigmaSCEle_regrCorr_ele[2]; + Float_t energySigmaSCEle_regrCorr_pho[2]; + Float_t energySCEle_regrCorrSemiParV4_ele[2]; + Float_t energySCEle_regrCorrSemiParV4_pho[2]; + Float_t energySCEle_regrCorrSemiParV5_ele[2]; + Float_t energySCEle_regrCorrSemiParV5_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiParV4_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiParV4_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiParV5_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiParV5_pho[2]; + Float_t energySCEle_regrCorrSemiParV6_ele[2]; + Float_t energySCEle_regrCorrSemiParV6_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiParV6_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiParV6_pho[2]; + Float_t energySCEle_regrCorrSemiParV7_ele[2]; + Float_t energySCEle_regrCorrSemiParV7_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiParV7_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiParV7_pho[2]; + Float_t energySCEle_regrCorrSemiParV8_ele[2]; + Float_t energySCEle_regrCorrSemiParV8_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiParV8_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiParV8_pho[2]; + Float_t energySCEle_regrCorrSemiPar7TeVtrainV6_ele[2]; + Float_t energySCEle_regrCorrSemiPar7TeVtrainV6_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho[2]; + Float_t energySCEle_regrCorrSemiPar7TeVtrainV7_ele[2]; + Float_t energySCEle_regrCorrSemiPar7TeVtrainV7_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho[2]; + Float_t energySCEle_regrCorrSemiPar7TeVtrainV8_ele[2]; + Float_t energySCEle_regrCorrSemiPar7TeVtrainV8_pho[2]; + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele[2]; + Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho[2]; + Float_t R9Ele[2]; + Float_t e5x5SCEle[2]; + Float_t pModeGsfEle[2]; + Float_t pAtVtxGsfEle[2]; + Float_t invMass; + Float_t invMass_SC; + Float_t invMass_e5x5; + Float_t invMass_rawSC; + Float_t invMass_rawSC_esSC; + Float_t invMass_SC_corr; + Float_t invMass_SC_regrCorr_ele; + Float_t invMass_SC_regrCorr_pho; + Float_t invMass_regrCorr_fra; + Float_t invMass_regrCorr_egamma; + Float_t invMass_SC_regrCorrSemiParV4_pho; + Float_t invMass_SC_regrCorrSemiParV4_ele; + Float_t invMass_SC_regrCorrSemiParV5_pho; + Float_t invMass_SC_regrCorrSemiParV5_ele; + Float_t invMass_SC_regrCorrSemiParV6_pho; + Float_t invMass_SC_regrCorrSemiParV6_ele; + Float_t invMass_SC_regrCorrSemiParV7_pho; + Float_t invMass_SC_regrCorrSemiParV7_ele; + Float_t invMass_SC_regrCorrSemiParV8_pho; + Float_t invMass_SC_regrCorrSemiParV8_ele; + Float_t invMass_SC_regrCorrSemiPar7TeVtrainV6_pho; + Float_t invMass_SC_regrCorrSemiPar7TeVtrainV6_ele; + Float_t invMass_SC_regrCorrSemiPar7TeVtrainV7_pho; + Float_t invMass_SC_regrCorrSemiPar7TeVtrainV7_ele; + Float_t invMass_SC_regrCorrSemiPar7TeVtrainV8_pho; + Float_t invMass_SC_regrCorrSemiPar7TeVtrainV8_ele; + Float_t invMass_MC; + Float_t etaMCEle[2]; + Float_t phiMCEle[2]; + Int_t nHitsSCEle[2]; + +// extra tree + +//Declaration of leaves types + std::vector* rawIdRecHitSCEle1; + std::vector* rawIdRecHitSCEle2; + std::vector* XRecHitSCEle1; + std::vector* XRecHitSCEle2; + std::vector* YRecHitSCEle1; + std::vector* YRecHitSCEle2; + std::vector* energyRecHitSCEle1; + std::vector* energyRecHitSCEle2; + std::vector* LCRecHitSCEle1; + std::vector* LCRecHitSCEle2; + std::vector* ICRecHitSCEle1; + std::vector* ICRecHitSCEle2; + std::vector* AlphaRecHitSCEle1; + std::vector* AlphaRecHitSCEle2; + + + +// set tree branches +void SetTreeBranch(TTree* tree) +{ + // Set branch addresses. + tree->SetBranchAddress("runNumber",&runNumber); + tree->SetBranchAddress("eventNumber",&eventNumber); + tree->SetBranchAddress("lumiBlock",&lumiBlock); + tree->SetBranchAddress("runTime",&runTime); + tree->SetBranchAddress("mcGenWeight",&mcGenWeight); + tree->SetBranchAddress("HLTfire",&HLTfire); + tree->SetBranchAddress("nPU",nPU); + tree->SetBranchAddress("rho",&rho); + tree->SetBranchAddress("nPV",&nPV); + tree->SetBranchAddress("eleID",eleID); + tree->SetBranchAddress("ZStat",&ZStat); + tree->SetBranchAddress("chargeEle",chargeEle); + tree->SetBranchAddress("etaSCEle",etaSCEle); + tree->SetBranchAddress("phiSCEle",phiSCEle); + tree->SetBranchAddress("etaEle",etaEle); + tree->SetBranchAddress("phiEle",phiEle); + tree->SetBranchAddress("classificationEle",classificationEle); + tree->SetBranchAddress("recoFlagsEle",recoFlagsEle); + tree->SetBranchAddress("PtEle",PtEle); + tree->SetBranchAddress("fbremEle",fbremEle); + tree->SetBranchAddress("seedXSCEle",seedXSCEle); + tree->SetBranchAddress("seedYSCEle",seedYSCEle); + tree->SetBranchAddress("seedEnergySCEle",seedEnergySCEle); + tree->SetBranchAddress("seedLCSCEle",seedLCSCEle); + tree->SetBranchAddress("avgLCSCEle",avgLCSCEle); + tree->SetBranchAddress("gainEle",gainEle); + tree->SetBranchAddress("energyMCEle",energyMCEle); + tree->SetBranchAddress("energySCEle",energySCEle); + tree->SetBranchAddress("rawEnergySCEle",rawEnergySCEle); + tree->SetBranchAddress("esEnergySCEle",esEnergySCEle); + tree->SetBranchAddress("energySCEle_corr",energySCEle_corr); + tree->SetBranchAddress("energySCEle_regrCorr_ele",energySCEle_regrCorr_ele); + tree->SetBranchAddress("energySCEle_regrCorr_pho",energySCEle_regrCorr_pho); + tree->SetBranchAddress("energyEle_regrCorr_fra",energyEle_regrCorr_fra); + tree->SetBranchAddress("energySigmaEle_regrCorr_fra",energySigmaEle_regrCorr_fra); + tree->SetBranchAddress("energyEle_regrCorr_egamma",energyEle_regrCorr_egamma); + tree->SetBranchAddress("energySigmaEle_regrCorr_egamma",energySigmaEle_regrCorr_egamma); + tree->SetBranchAddress("energySigmaSCEle_regrCorr_ele",energySigmaSCEle_regrCorr_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorr_pho",energySigmaSCEle_regrCorr_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV4_ele",energySCEle_regrCorrSemiParV4_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV4_pho",energySCEle_regrCorrSemiParV4_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV5_ele",energySCEle_regrCorrSemiParV5_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV5_pho",energySCEle_regrCorrSemiParV5_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV4_ele",energySigmaSCEle_regrCorrSemiParV4_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV4_pho",energySigmaSCEle_regrCorrSemiParV4_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV5_ele",energySigmaSCEle_regrCorrSemiParV5_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV5_pho",energySigmaSCEle_regrCorrSemiParV5_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV6_ele",energySCEle_regrCorrSemiParV6_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV6_pho",energySCEle_regrCorrSemiParV6_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV6_ele",energySigmaSCEle_regrCorrSemiParV6_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV6_pho",energySigmaSCEle_regrCorrSemiParV6_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV7_ele",energySCEle_regrCorrSemiParV7_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV7_pho",energySCEle_regrCorrSemiParV7_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV7_ele",energySigmaSCEle_regrCorrSemiParV7_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV7_pho",energySigmaSCEle_regrCorrSemiParV7_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV8_ele",energySCEle_regrCorrSemiParV8_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiParV8_pho",energySCEle_regrCorrSemiParV8_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV8_ele",energySigmaSCEle_regrCorrSemiParV8_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV8_pho",energySigmaSCEle_regrCorrSemiParV8_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV6_ele",energySCEle_regrCorrSemiPar7TeVtrainV6_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV6_pho",energySCEle_regrCorrSemiPar7TeVtrainV6_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele",energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho",energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV7_ele",energySCEle_regrCorrSemiPar7TeVtrainV7_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV7_pho",energySCEle_regrCorrSemiPar7TeVtrainV7_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele",energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho",energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho); + tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV8_ele",energySCEle_regrCorrSemiPar7TeVtrainV8_ele); + tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV8_pho",energySCEle_regrCorrSemiPar7TeVtrainV8_pho); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele",energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele); + tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho",energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho); + tree->SetBranchAddress("R9Ele",R9Ele); + tree->SetBranchAddress("e5x5SCEle",e5x5SCEle); + tree->SetBranchAddress("pModeGsfEle",pModeGsfEle); + tree->SetBranchAddress("pAtVtxGsfEle",pAtVtxGsfEle); + tree->SetBranchAddress("invMass",&invMass); + tree->SetBranchAddress("invMass_SC",&invMass_SC); + tree->SetBranchAddress("invMass_e5x5",&invMass_e5x5); + tree->SetBranchAddress("invMass_rawSC",&invMass_rawSC); + tree->SetBranchAddress("invMass_rawSC_esSC",&invMass_rawSC_esSC); + tree->SetBranchAddress("invMass_SC_corr",&invMass_SC_corr); + tree->SetBranchAddress("invMass_SC_regrCorr_ele",&invMass_SC_regrCorr_ele); + tree->SetBranchAddress("invMass_SC_regrCorr_pho",&invMass_SC_regrCorr_pho); + tree->SetBranchAddress("invMass_regrCorr_fra",&invMass_regrCorr_fra); + tree->SetBranchAddress("invMass_regrCorr_egamma",&invMass_regrCorr_egamma); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV4_pho",&invMass_SC_regrCorrSemiParV4_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV4_ele",&invMass_SC_regrCorrSemiParV4_ele); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV5_pho",&invMass_SC_regrCorrSemiParV5_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV5_ele",&invMass_SC_regrCorrSemiParV5_ele); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV6_pho",&invMass_SC_regrCorrSemiParV6_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV6_ele",&invMass_SC_regrCorrSemiParV6_ele); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV7_pho",&invMass_SC_regrCorrSemiParV7_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV7_ele",&invMass_SC_regrCorrSemiParV7_ele); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV8_pho",&invMass_SC_regrCorrSemiParV8_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiParV8_ele",&invMass_SC_regrCorrSemiParV8_ele); + tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV6_pho",&invMass_SC_regrCorrSemiPar7TeVtrainV6_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV6_ele",&invMass_SC_regrCorrSemiPar7TeVtrainV6_ele); + tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV7_pho",&invMass_SC_regrCorrSemiPar7TeVtrainV7_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV7_ele",&invMass_SC_regrCorrSemiPar7TeVtrainV7_ele); + tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV8_pho",&invMass_SC_regrCorrSemiPar7TeVtrainV8_pho); + tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV8_ele",&invMass_SC_regrCorrSemiPar7TeVtrainV8_ele); + tree->SetBranchAddress("invMass_MC",&invMass_MC); + tree->SetBranchAddress("etaMCEle",etaMCEle); + tree->SetBranchAddress("phiMCEle",phiMCEle); + tree->SetBranchAddress("nHitsSCEle",nHitsSCEle); +} + +// set tree branches +void SetExtraTreeBranch(TTree* extraCalibTree){ + + // Set branch addresses. + extraCalibTree->SetBranchAddress("runNumber",&runNumber); + extraCalibTree->SetBranchAddress("eventNumber",&eventNumber); + extraCalibTree->SetBranchAddress("lumiBlock",&lumiBlock); + extraCalibTree->SetBranchAddress("runTime",&runTime); + extraCalibTree->SetBranchAddress("nHitsSCEle",nHitsSCEle); + extraCalibTree->SetBranchAddress("rawIdRecHitSCEle1",&rawIdRecHitSCEle1); + extraCalibTree->SetBranchAddress("rawIdRecHitSCEle2",&rawIdRecHitSCEle2); + extraCalibTree->SetBranchAddress("XRecHitSCEle1",&XRecHitSCEle1); + extraCalibTree->SetBranchAddress("XRecHitSCEle2",&XRecHitSCEle2); + extraCalibTree->SetBranchAddress("YRecHitSCEle1",&YRecHitSCEle1); + extraCalibTree->SetBranchAddress("YRecHitSCEle2",&YRecHitSCEle2); + extraCalibTree->SetBranchAddress("energyRecHitSCEle1",&energyRecHitSCEle1); + extraCalibTree->SetBranchAddress("energyRecHitSCEle2",&energyRecHitSCEle2); + extraCalibTree->SetBranchAddress("LCRecHitSCEle1",&LCRecHitSCEle1); + extraCalibTree->SetBranchAddress("LCRecHitSCEle2",&LCRecHitSCEle2); + extraCalibTree->SetBranchAddress("ICRecHitSCEle1",&ICRecHitSCEle1); + extraCalibTree->SetBranchAddress("ICRecHitSCEle2",&ICRecHitSCEle2); + extraCalibTree->SetBranchAddress("AlphaRecHitSCEle1",&AlphaRecHitSCEle1); + extraCalibTree->SetBranchAddress("AlphaRecHitSCEle2",&AlphaRecHitSCEle2); + +} + + + + + diff --git a/ALCARAW_RECO/copyTree.sh b/ALCARAW_RECO/copyTree.sh new file mode 100755 index 00000000000..5323a66af95 --- /dev/null +++ b/ALCARAW_RECO/copyTree.sh @@ -0,0 +1,41 @@ + +g++ -o copyTree.exe copyTree.cc \ + -pthread -m64 \ + -I${ROOTSYS}/include \ + -I./ -L${ROOTSYS}/lib \ + -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d \ + -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics \ + -lMathCore -lThread -lMinuit -lMinuit2 -lTreePlayer -lpthread \ + -Wl,-rpath,${ROOTSYS}/lib -lm -ldl + +tag="_EEn" +sele="etaSCEle[1]<-2.2&&ZStat==2" + +#./copyTree.exe ntuple.root ntuple_out.root -1 "etaSCEle[1]>2.3" +date + +#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012A-22Jan-v1-Extra.root copyTreeExtra_out_A${tag}.root -1 "$sele" +date + +#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012B-22Jan-v1-Extra.root copyTreeExtra_out_B${tag}.root -1 "$sele" +date +#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012C-22Jan-v1-Extra.root copyTreeExtra_out_C${tag}.root -1 "$sele" +date +#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012D-22Jan-v1-Extra.root copyTreeExtra_out_D${tag}.root -1 "$sele" +date + +#hadd copyTreeExtra_out_ABCD${tag}.root \ +# copyTreeExtra_out_A${tag}.root \ +# copyTreeExtra_out_B${tag}.root \ +# copyTreeExtra_out_C${tag}.root \ +# copyTreeExtra_out_D${tag}.root + +#hadd copyTreeExtra_out_ABC${tag}.root \ +# copyTreeExtra_out_A${tag}.root \ +# copyTreeExtra_out_B${tag}.root \ +# copyTreeExtra_out_C${tag}.root \ + + +date + + diff --git a/ALCARAW_RECO/initdata.sh b/ALCARAW_RECO/initdata.sh new file mode 100755 index 00000000000..38df9aeaf3c --- /dev/null +++ b/ALCARAW_RECO/initdata.sh @@ -0,0 +1,28 @@ +#!/bin/sh + + +echo "INITDATA:: PWD=$PWD" +echo "INITDATA:: ls -l " +ls -l +echo "INITDATA:: ls -l $CMSSW_BASE/src/data/ " +ls -l $CMSSW_BASE/src/data/ +echo "INITDATA:: who am i " +who am i +whoami +id -nu +user=`whoami` +cert=`ls -l x509* | grep $user | awk {'print $9'}` +cert=`basename $cert` +cp $cert /tmp/$cert + +echo "INITDATA:: user=$user ; cert=$cert ; CMSSW_BASE=$CMSSW_BASE " +echo "INITDATA:: ls -l /tmp/$cert" +ls -l /tmp/$cert + +echo "INITDATA:: RUNTIME_AREA=$RUNTIME_AREA" +echo "INITDATA:: NJob=$NJob" + +echo "INITDATA:: start run cmsRun " +cmsRun -j $RUNTIME_AREA/crab_fjr_$NJob.xml -p pset.py +echo "INITDATA:: end run cmsRun" + diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index b121e4f557c..f53b426753b 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -139,13 +139,27 @@ ) ) +HighEtaPhotons = cms.EDFilter("PhotonSelector", + src = cms.InputTag("photons"), + cut = cms.string("hadronicOverEm<0.05" + " && (superCluster.rawEnergy*sin(superCluster.position.theta)>20.0)" + " && (abs(superCluster.eta)>2.4) " # && abs(superCluster.eta)<2.8 + " && (sigmaIetaIeta<0.029)" + " && (ecalRecHitSumEtConeDR03/(p4.Pt) < 0.035)" + " && (hcalTowerSumEtConeDR03/(p4.Pt) < 0.11)" + " && (r9>0.89 && r9<1.02)" + ) + ) + + #------------------------------ electronID producer from Calibration.EleSelectionProducers.eleselectionproducers_cfi import * # process.EleSelectionProducers SCselector = cms.EDFilter("SuperClusterSelector", src = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower'), - cut = cms.string('(eta>2.4 || eta<-2.4) && (energy*sin(position.theta)> 15)') + #cut = cms.string('(eta>2.4 || eta<-2.4) && (energy*sin(position.theta)> 15)') + cut = cms.string('(energy*sin(position.theta)> 15)') ) ### Build candidates from all the merged superclusters @@ -224,6 +238,8 @@ ZeeFilterSeq = cms.Sequence(eleSelSeq * ZeeSelector * ZeeFilter) WenuFilterSeq = cms.Sequence(eleSelSeq * WenuSelector * WenuFilter) WZFilterSeq = cms.Sequence(eleSelSeq * WZFilter) -ZSCFilterSeq = cms.Sequence(ZSCHltFilter * eleSelSeq * EleSCSelector * ZSCFilter) - +#ZSCFilterSeq = cms.Sequence(ZSCHltFilter * eleSelSeq * EleSCSelector * ZSCFilter) +#ZSCFilterSeq = cms.Sequence(eleSelSeq * EleSCSelector * ZSCFilter) +ZSCFilterSeq = cms.Sequence(eleSelSeq * EleSCSelector) +HighEtaFilterSeq = cms.Sequence(eleSelSeq * HighEtaPhotons) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index f73f8775629..b2d9d5ab15f 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -31,7 +31,7 @@ "", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, - "type of skim: ZSkim, WSkim, partGun, fromWSkim (from USER format), EleSkim (at least one electron), ''") + "type of skim: ZSkim, WSkim, partGun, fromWSkim (from USER format), EleSkim (at least one electron), HighEtaSkim (for higheta calibration) ''") options.register('jsonFile', "", VarParsing.VarParsing.multiplicity.singleton, @@ -43,10 +43,15 @@ VarParsing.VarParsing.varType.int, # string, int, or float "doTree=0: no tree; 1: standard tree; 2: onlyExtraTree; 3: standard+extra; 4:only eleID; 5:eleID+standard; 6: eleID+extra; 7: standard+extra+eleID") options.register('doTreeOnly', - 1, #default value False + 0, #default value False VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float "bool: doTreeOnly=1 true, doTreeOnly=0 false") +options.register('doHighEta', + 0, #default value False + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.int, # string, int, or float + "bool: doHighEta=1 true, doHighEta=0 false") options.register('pdfSyst', 0, #default value False VarParsing.VarParsing.multiplicity.singleton, # singleton or list @@ -71,6 +76,7 @@ ZSkim = False WSkim = False ZSCSkim = False +HighEtaSkim = False if(options.skim=="ZSkim"): ZSkim=True @@ -81,6 +87,8 @@ elif(options.skim=="fromWSkim"): print "[INFO] producing from WSkim files (USER format)" WSkim=False +elif(options.skim=="HighEtaSkim"): + HighEtaSkim=True else: if(options.type=="ALCARAW"): print "[ERROR] no skim selected" @@ -379,14 +387,20 @@ process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalWElectron', 'pathALCARECOEcalUncalWElectron' ] process.zNtupleDumper.isWenu=cms.bool(True) elif(ZSCSkim): - process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * process.ZSCFilterSeq) - + #process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * process.ZSCFilterSeq) + process.NtupleFilterSeq= cms.Sequence(process.ZSCFilterSeq) +elif(HighEtaSkim): + process.NtupleFilterSeq= cms.Sequence(process.HighEtaFilterSeq) else: process.NtupleFilterSeq = cms.Sequence() if(options.skim=="partGun"): process.zNtupleDumper.isPartGun = cms.bool(True) +if(options.doTree>0 and options.doHighEta>0): + process.zNtupleDumper.doHighEta=cms.bool(True) + + #process.NtupleFilter) #process.filterSeq *= process.NtupleFilter @@ -550,7 +564,8 @@ process.seqALCARECOEcalCalElectron) process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * - ~process.ZeeFilter * process.ZSCFilterSeq * + #~process.ZeeFilter * process.ZSCFilterSeq * + process.ZSCFilterSeq * process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) @@ -605,6 +620,10 @@ process.eleRegressionEnergy.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB.value() process.eleRegressionEnergy.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE.value() +if(options.doTree>0 and options.doHighEta>0): + process.zNtupleDumper.recHitCollectionEE = cms.InputTag("reducedEcalRecHitsEE") + process.zNtupleDumper.EESuperClusterCollection = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower") + process.zNtupleDumper.PhotonCollection = cms.InputTag("HighEtaPhotons") ############### JSON Filter if((options.doTree>0 and options.doTreeOnly==0)): diff --git a/ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh b/ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh new file mode 100755 index 00000000000..4c2c556b376 --- /dev/null +++ b/ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh @@ -0,0 +1,128 @@ +#!/bin/sh + +usage(){ + echo "`basename $0` -d datapath -n njobs -o outputfile " +} + + + +#------------------------------ parsing +while getopts "hd:d:n:o:" OPTION; +do + case $OPTION in + h) + usage + exit 1 + ;; + d) + DATAPATH=$OPTARG + ;; + n) + NJOBS=$OPTARG + ;; + o) + OUTPUTFILE=$OPTARG + ;; + ?) + usage + exit + ;; + + esac +done + +echo ${NJOBS} + +if [ -z "$DATAPATH" ];then + echo "[ERROR] DATAPATH not defined" >> /dev/stderr + usage >> /dev/stderr + exit 1 +fi + +if [ -z "$NJOBS" ];then + echo "[ERROR] NJOBS not defined" >> /dev/stderr + usage >> /dev/stderr + exit 1 +fi + +if [ -z "$OUTPUTFILE" ];then + echo "[ERROR] OUTPUTFILE not defined" >> /dev/stderr + usage >> /dev/stderr + exit 1 +fi + +# get the list of files +if [ -e _filelist.txt ]; then + rm _filelist.txt; +fi +touch _filelist.txt +xroot_prefix="root://cms-xrd-global.cern.ch/" + +NFILES_TOTAL=0 + +for file in `das_client.py --query="dataset=${DATAPATH} file" --limit=0`; +do + echo "${xroot_prefix}${file}" >> _filelist.txt + NFILES_TOTAL=$(( NFILES_TOTAL + 1 )) +done + +echo $NFILES_TOTAL + +NFILES_PERJOB1=$(( NFILES_TOTAL / NJOBS + 1 )) # N files for each job except the last job +NJOBS=$(( NFILES_TOTAL / NFILES_PERJOB1 + 1 )) # reset NJOBS +NFILES_PERJOB2=$(( NFILES_TOTAL % NFILES_PERJOB1 )) # N files for the last job + +echo "NJOBS=$NJOBS; NFILES_PERJOB1=$NFILES_PERJOB1; NFILES_PERJOB2=$NFILES_PERJOB2" + +#============================== Writing the argumets file +if [ -e $OUTPUTFILE ]; then + rm $OUTPUTFILE +fi + +ARGUMENT=$OUTPUTFILE + +#begin the argument file +echo "" > $ARGUMENT + +NFILES=1 #counter, number of jobs added per job +IJOB=1 # job number, counter +FILES_IN_JOB="" #string to hold the files +for file in `cat _filelist.txt`; +do + # decide with NFILES_PERJOB to use + NFILES_PERJOB="" + if [ "$IJOB" -lt "$NJOBS" ]; then + NFILES_PERJOB=${NFILES_PERJOB1} + else + NFILES_PERJOB=${NFILES_PERJOB2} + fi + + # if less than number fo files per job, count it + if [ "$NFILES" -le "$NFILES_PERJOB" ]; then + # + if [ "$NFILES" -eq "1" ]; then + FILES_IN_JOB="${file}" + else + FILES_IN_JOB="${FILES_IN_JOB},${file}" + fi + # if eq number of files per job, fill in file + if [ "$NFILES" -eq "$NFILES_PERJOB" ]; then + echo "" >> $ARGUMENT + echo "" >> $ARGUMENT + IJOB=$(( IJOB + 1 )) # reset + FILES_IN_JOB="" #reset + NFILES=1 #reset + else + NFILES=$(( NFILES + 1 )) + fi + fi +done + +# end the argument file +echo "" >> $ARGUMENT + + +rm _filelist.txt + + + diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index aedeea9776b..0f38ec37f9c 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -5,6 +5,7 @@ source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh #------------------------------ default SKIM=none USEPARENT=0 +STORAGE_ELEMENT=T2_CH_CERN SCHEDULER=caf USESERVER=1 TYPE=ALCARECO @@ -16,6 +17,10 @@ SUBMIT=yes OUTPUTFILE=alcareco crabFile=tmp/alcareco.cfg DOTREE=1 +DOHIGHETA=0 +WHITELIST="T2_CH,T2_US,T2_IT,T2_DE" +NJOBS=100 +NEVENTS_TOTAL=0 usage(){ echo "`basename $0` options" @@ -34,7 +39,9 @@ usage(){ echo " --check" echo " --json_name jsonName: additional name in the folder structure to keep track of the used json" echo " --json jsonFile.root: better to not use a json file for the alcareco production" - echo " --doTree arg (=${DOTREE}): 0=no tree, 1=standard tree" + echo " --doTree arg (=${DOTREE}): 0=no tree, 1=standard tree only, 2=extratree-only, 3=standard+extra trees" + echo " --doHighEta arg (=${DOHIGHETA}): 0=not use HighEta SC; 1= use them" + echo " --njobs nJobs : number of jobs, an integer" echo "----------" echo " --tutorial: tutorial mode, produces only one sample in you user area" echo " --develRelease: CRAB do not check if the CMSSW version is in production (only if you are sure what you are doing)" @@ -45,7 +52,7 @@ usage(){ #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,tutorial,develRelease -- "$@") +if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,doHighEta:,njobs:,tutorial,develRelease -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -75,6 +82,8 @@ do --tutorial) echo "[OPTION] Activating the tutorial mode"; TUTORIAL=y;; --develRelease) echo "[OPTION] Request also CMSSW release not in production!"; DEVEL_RELEASE=y;; --doTree) DOTREE=$2; shift; echo "[OPTION] Request doTree = ${DOTREE}";; + --doHighEta) DOHIGHETA=$2; shift; echo "[OPTION] Request doHighEta = ${DOHIGHETA}";; + --njobs) NJOBS=$2; shift; echo "[OPTION] Request njobs = ${NJOBS}";; (--) shift; break;; (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; (*) break;; @@ -175,6 +184,10 @@ case $SKIM in ;; esac + +#get total n events in dataset +#NEVENTS_TOTAL=`das_client.py --query="dataset=$DATASETPATH | grep dataset.nevents" --limit=0` + #Setting the ENERGY variable setEnergy $DATASETPATH @@ -189,6 +202,16 @@ if [ "$RUNRANGE" == "allRange" -o "`echo $RUNRANGE |grep -c -P '[0-9]+-[0-9]+'`" unset RUNRANGE fi +# make argument.xml file if do MC +if [ "$TYPE" == "ALCARECOSIM" ] && [ -n "${CREATE}" ];then + makeArgumentsWithDataPath.sh -d ${DATASETPATH} -n ${NJOBS} -o _tmp_argument.xml + #redefine the NJOBS + NJOBS=`grep "" _tmp_argument.xml | wc -l` +fi + + +user=`whoami` +cert=`ls -l /tmp/x509* | grep ${user} | awk {'print $9'}` #============================== cat > ${crabFile} <> ${crabFile} <> ${crabFile} <> ${crabFile} <> tmp/alcareco.cfg <> ${crabFile} <> ${crabFile} <> tmp/alcareco.cfg <> ${crabFile} <> tmp/alcareco.cfg <> ${crabFile} <> tmp/alcareco.cfg <> ${crabFile} <> ${crabFile} <> ${crabFile} <0 {next} 1 ' ${UI_WORKING_DIR}/job/CMSSW.sh > _tmp_CMSSW.sh + chmod +x _tmp_CMSSW.sh + mv _tmp_CMSSW.sh ${UI_WORKING_DIR}/job/CMSSW.sh fi if [ -n "$SUBMIT" ]; then @@ -287,6 +349,9 @@ if [ -n "${CHECK}" ];then # mergeOutput.sh -u ${UI_WORKING_DIR} -g PUDumper --noRemove --merged_remote_dir=/afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/ fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" + #else + # mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE} + #fi fi ################ diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index 183bc764503..b975d30aac8 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -86,6 +86,9 @@ setEnergy(){ *Summer12*) ENERGY=8TeV ;; + *13TeV*) + ENERGY=13TeV + ;; *8TeV*) ENERGY=8TeV ;; diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index b94aa9b27ee..348b6043976 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -329,7 +329,7 @@ cat >> tmp/crab.cfg < # + + diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index 3a45a88a14d..45195a06a17 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -4,10 +4,13 @@ jsonFileName = cms.string(""), #ZCandidateCollection = cms.InputTag('zCandidateProducer'), electronCollection = cms.InputTag('patElectrons'), + PhotonCollection = cms.InputTag("photons"), #recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB"), #recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE"), recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits"), recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits"), + EBSuperClusterCollection = cms.InputTag("correctedHybridSuperClusters"), + EESuperClusterCollection = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower"), rhoFastJet = cms.InputTag('kt6PFJetsForRhoCorrection',"rho"), vertexCollection = cms.InputTag('offlinePrimaryVertices'), BeamSpotCollection = cms.InputTag('offlineBeamSpot'), @@ -24,6 +27,8 @@ fsrWeightCollection = cms.InputTag("fsrWeight"), weakWeightCollection = cms.InputTag("weakWeight"), isWenu = cms.bool(False), + doHighEta = cms.bool(False), + doHighEta_LowerEtaCut = cms.double(2.4), isPartGun = cms.bool(False), # hltPaths = cms.vstring() hltPaths = cms.vstring('HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v15', diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index cfcd23c642d..2854b581df8 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -66,6 +66,7 @@ #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "DataFormats/EcalDetId/interface/EEDetId.h" +#include "DataFormats/CaloRecHit/interface/CaloID.h" #include "Geometry/CaloTopology/interface/CaloTopology.h" #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h" @@ -147,11 +148,16 @@ class ZNtupleDumper : public edm::EDAnalyzer { bool isMC; bool isWenu; bool isPartGun; + bool doHighEta; // so far doHighEta only works for Zee + double doHighEta_LowerEtaCut; //Handles and inputTags private: //------------------------------ Handles edm::Handle > electronsHandle; + edm::Handle PhotonsHandle; + edm::Handle> EBSuperClustersHandle; + edm::Handle> EESuperClustersHandle; edm::Handle bsHandle; edm::Handle primaryVertexHandle; edm::ESHandle topologyHandle; @@ -168,9 +174,12 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::InputTag BeamSpotTAG; // input tag for electrons edm::InputTag electronsTAG; + edm::InputTag PhotonsTAG; edm::InputTag ZCandidateTAG; edm::InputTag recHitCollectionEBTAG; edm::InputTag recHitCollectionEETAG; + edm::InputTag EBSuperClustersTAG; + edm::InputTag EESuperClustersTAG; // input rho edm::InputTag rhoTAG; edm::InputTag conversionsProducerTAG; @@ -211,6 +220,9 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t nPV; ///< nVtx Int_t nPU[5]; //[nBX] ///< number of PU (filled only for MC) + // ZStat, 1: both electrons are pat Electrons, 2: one pat electron one SuperCluster + Int_t ZStat; + // selection Int_t eleID[2]; ///< bit mask for eleID: 1=fiducial, 2=loose, 6=medium, 14=tight, 16=WP90PU, 48=WP80PU. Selection from https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaCutBasedIdentification#Electron_ID_Working_Points @@ -371,12 +383,17 @@ class ZNtupleDumper : public edm::EDAnalyzer { void TreeSetDiElectronVar(pat::CompositeCandidate ZEE); void TreeSetSingleElectronVar(const pat::Electron& electron1, int index); + void TreeSetSingleElectronVar(const reco::SuperCluster& electron1, int index); void TreeSetDiElectronVar(const pat::Electron& electron1, const pat::Electron& electron2); + void TreeSetDiElectronVar(const pat::Electron& electron1, const reco::SuperCluster& electron2); DetId findSCseed(const reco::SuperClusterRef& cluster); + DetId findSCseed(const reco::SuperCluster& cluster); void InitExtraCalibTree(void); void TreeSetExtraCalibVar(const pat::Electron& electron1, int index); + void TreeSetExtraCalibVar(const reco::SuperCluster& electron1, int index); void TreeSetExtraCalibVar(const pat::Electron& electron1, const pat::Electron& electron2); + void TreeSetExtraCalibVar(const pat::Electron& electron1, const reco::SuperCluster& electron2); void InitEleIDTree(void); @@ -419,12 +436,17 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): // isMC(iConfig.getParameter("isMC")), isWenu(iConfig.getParameter("isWenu")), isPartGun(iConfig.getParameter("isPartGun")), + doHighEta(iConfig.getParameter("doHighEta")), + doHighEta_LowerEtaCut(iConfig.getParameter("doHighEta_LowerEtaCut")), vtxCollectionTAG(iConfig.getParameter("vertexCollection")), BeamSpotTAG(iConfig.getParameter("BeamSpotCollection")), electronsTAG(iConfig.getParameter("electronCollection")), + PhotonsTAG(iConfig.getParameter("PhotonCollection")), // ZCandidateTAG(iConfig.getParameter("ZCandidateCollection")), recHitCollectionEBTAG(iConfig.getParameter("recHitCollectionEB")), recHitCollectionEETAG(iConfig.getParameter("recHitCollectionEE")), + EBSuperClustersTAG(iConfig.getParameter("EBSuperClusterCollection")), + EESuperClustersTAG(iConfig.getParameter("EESuperClusterCollection")), rhoTAG(iConfig.getParameter("rhoFastJet")), conversionsProducerTAG(iConfig.getParameter("conversionCollection")), metTAG(iConfig.getParameter("metCollection")), @@ -492,13 +514,16 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe //------------------------------ HLT iEvent.getByLabel(triggerResultsTAG, triggerResultsHandle); - //------------------------------ - clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, - recHitCollectionEETAG); - //------------------------------ electrons iEvent.getByLabel(electronsTAG, electronsHandle); + //------------------------------ photons + iEvent.getByLabel(PhotonsTAG, PhotonsHandle); + + //------------------------------ SuperClusters + iEvent.getByLabel(EBSuperClustersTAG, EBSuperClustersHandle); + iEvent.getByLabel(EESuperClustersTAG, EESuperClustersHandle); + // for conversions with full vertex fit //------------------------------ VERTEX iEvent.getByLabel(vtxCollectionTAG, primaryVertexHandle); @@ -537,6 +562,48 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } } + // number of pat Electrons and SuperClusters + int NPatEles = (int)electronsHandle->size(); + + // number of High Eta SuperClusters + int NHighEtaSCs = 0; + if (doHighEta) { + for( reco::SuperClusterCollection::const_iterator eleIter1 = EESuperClustersHandle->begin(); + eleIter1 != EESuperClustersHandle->end(); + eleIter1++){ + if (fabs(eleIter1->eta())>doHighEta_LowerEtaCut) { + NHighEtaSCs++; + } + } + } + + // number of HighEta Photons + int NHighEtaPhotons = 0; + if (doHighEta) { + for( reco::PhotonCollection::const_iterator eleIter1 = PhotonsHandle->begin(); + eleIter1 != PhotonsHandle->end(); + eleIter1++){ + if (fabs(eleIter1->superCluster()->eta()) > doHighEta_LowerEtaCut ) { + NHighEtaPhotons++; + } + } + } + + // at least one Pat::Electron + if (NPatEles<1) return; + + // at least two EM particles if doHighEta + //if (doHighEta && (NPatEles+NHighEtaSCs)<2) return; + if (doHighEta && (NPatEles+NHighEtaPhotons)<2) return; + + // at least two pat Electrons if not do HighEta and not isWenu + if (!doHighEta && !isWenu && NPatEles<2 ) return; + + // move the clustertools initialization here after protections + //------------------------------ + clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, + recHitCollectionEETAG); + // count electrons int nWP70 = 0; //only WP70 int nWP90 = 0; //only WP90 @@ -590,7 +657,164 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe eleIDTree->Fill(); } - } else{ + } else if (doHighEta&&!isWenu) { + + // let's always only take 2 + //_tnPar = 2; + + + // iterators storing pat Electons and HighEta SCs + pat::ElectronCollection::const_iterator PatEle1(NULL); + pat::ElectronCollection::const_iterator PatEle2(NULL); + + // iterators storing HighEta SCs + reco::SuperClusterCollection::const_iterator HighEtaSC1(NULL); + reco::SuperClusterCollection::const_iterator HighEtaSC2(NULL); + + // iterators storing HighEta Photons + reco::PhotonCollection::const_iterator Photon1(NULL); + reco::PhotonCollection::const_iterator Photon2(NULL); + + + // + // number of high pT (>20GeV) Electrons + int NHighPtPatEles=0; + int NHighPtHighEtaSCs=0; + int NHighPtHighEtaPhotons=0; + + // look for 2 leading pT pat electrons + // leading + double maxpT(-10000.0); + for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); + eleIter1 != electronsHandle->end(); + eleIter1++){ + if (eleIter1->pt() > maxpT && eleIter1->pt()>20.0) { + maxpT = eleIter1->pt(); + PatEle1 = eleIter1; + NHighPtPatEles++; + } + } + + // next leading + if (NPatEles>1) { + maxpT = -100000.0; + for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); + eleIter1 != electronsHandle->end(); + eleIter1++){ + if (eleIter1 == PatEle1) continue; + if (eleIter1->pt() > maxpT&& eleIter1->pt()>20.0) { + maxpT = eleIter1->pt(); + PatEle2 = eleIter1; + NHighPtPatEles++; + } + } + } + + // look for 2 leading HighEta photons + // leading + if (NHighEtaSCs>0) { + maxpT = -10000.0; + for( reco::SuperClusterCollection::const_iterator eleIter1 = EESuperClustersHandle->begin(); + eleIter1 != EESuperClustersHandle->end(); + eleIter1++){ + if (fabs(eleIter1->eta()) < doHighEta_LowerEtaCut) continue; + double pt=eleIter1->energy()*sin(eleIter1->position().theta()); + if (pt > maxpT&&pt>20.0) { + maxpT = pt; + HighEtaSC1 = eleIter1; + NHighPtHighEtaSCs++; + } + } + } + + // next to leading + if (NHighEtaSCs>1) { + maxpT = -10000.0; + for( reco::SuperClusterCollection::const_iterator eleIter1 = EESuperClustersHandle->begin(); + eleIter1 != EESuperClustersHandle->end(); + eleIter1++){ + if (fabs(eleIter1->eta()) < doHighEta_LowerEtaCut) continue; + if (eleIter1 == HighEtaSC1) continue; + double pt=eleIter1->energy()*sin(eleIter1->position().theta()); + if (pt > maxpT&&pt>20.0) { + maxpT = pt; + HighEtaSC2 = eleIter1; + NHighPtHighEtaSCs++; + } + } + } + + // look for 2 leading pT photons + // leading + if (NHighEtaPhotons>0) { + maxpT = -10000.0; + for( reco::PhotonCollection::const_iterator eleIter1 = PhotonsHandle->begin(); + eleIter1 != PhotonsHandle->end(); + eleIter1++){ + if (fabs(eleIter1->superCluster()->eta()) < doHighEta_LowerEtaCut) continue; + if (eleIter1->pt() > maxpT && eleIter1->pt()>20.0) { + maxpT = eleIter1->pt(); + Photon1 = eleIter1; + NHighPtHighEtaPhotons++; + } + } + } + + // next to leading + if (NHighEtaPhotons>1) { + maxpT = -10000.0; + for( reco::PhotonCollection::const_iterator eleIter1 = PhotonsHandle->begin(); + eleIter1 != PhotonsHandle->end(); + eleIter1++){ + if (fabs(eleIter1->superCluster()->eta()) < doHighEta_LowerEtaCut) continue; + if (eleIter1 == Photon1) continue; + if (eleIter1->pt() > maxpT && eleIter1->pt()>20.0) { + maxpT = eleIter1->pt(); + Photon2 = eleIter1; + NHighPtHighEtaPhotons++; + } + } + } + + //debug + //std::cout << "NHighPtPatEles=" << NHighPtPatEles << "; NHighPtHighEtaSCs=" << NHighPtHighEtaSCs << std::endl; + // make combination and decide if to fill tree + bool filltree=false; + if (NHighPtPatEles>1) { + // if two pat electrons with high pT always use them + float mass=(PatEle1->p4()+PatEle2->p4()).mass(); + if(mass > 55 && mass < 125) { + TreeSetDiElectronVar(*PatEle1, *PatEle2); + if(doExtraCalibTree){ + TreeSetExtraCalibVar(*PatEle1, *PatEle2); + } + filltree=true; + } + } + else if (NHighPtHighEtaPhotons>0&&NHighPtPatEles==1){ + // if only one pat electron and the Photon is high pT enough, use this too, otherwise do not use. + float mass=(PatEle1->p4()+Photon1->p4()).mass(); + if(mass > 55 && mass < 125) { + TreeSetDiElectronVar(*PatEle1, *(Photon1->superCluster())); + if(doExtraCalibTree){ + TreeSetExtraCalibVar(*PatEle1, *(Photon1->superCluster())); + } + filltree=true; + } + } + + + // fill the tree + if (filltree) { + // fill the normal tree + tree->Fill(); + // + if(doExtraCalibTree){ + extraCalibTree->Fill(); + } + } + + } else { for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); @@ -693,7 +917,10 @@ void ZNtupleDumper::beginJob() InitNewTree(); // inizializzo il tree dell'ntupla ridotta selezionata if(doExtraCalibTree){ - extraCalibTree = fs->make("extraCalibTree",""); + //extraCalibTree = fs->make("extraCalibTree",""); + // put the extraCalibTree into the default outfile + extraCalibTree = new TTree("extraCalibTree", "extraCalibTree"); + extraCalibTree->SetDirectory(tree_file); InitExtraCalibTree(); } if(doEleIDTree){ @@ -726,6 +953,7 @@ void ZNtupleDumper::endJob() // save the tree into the file tree_file->cd(); tree->Write(); + if(doExtraCalibTree) extraCalibTree->Write(); tree_file->Close(); @@ -796,6 +1024,9 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("eleID",eleID, "eleID[2]/I"); // tree->Branch("nBCSCEle", nBCSCEle, "nBCSCEle[2]/I"); + // ZStat, 1: both are pat electrons, 2: one pat electron one supercluster + tree->Branch("ZStat", &ZStat, "ZStat/I"); + tree->Branch("chargeEle", chargeEle, "chargeEle[2]/I"); //[nEle] tree->Branch("etaSCEle", etaSCEle, "etaSCEle[2]/F"); //[nSCEle] tree->Branch("phiSCEle", phiSCEle, "phiSCEle[2]/F"); //[nSCEle] @@ -1012,7 +1243,7 @@ void ZNtupleDumper::TreeSetPileupVar(void){ void ZNtupleDumper::TreeSetDiElectronVar(pat::CompositeCandidate ZEE){ - + const pat::Electron *electron1_p=dynamic_cast(&(*(ZEE.begin()))); const pat::Electron *electron2_p=dynamic_cast(&(*(ZEE.begin()+1))); @@ -1020,9 +1251,32 @@ void ZNtupleDumper::TreeSetDiElectronVar(pat::CompositeCandidate ZEE){ const pat::Electron& electron2=*electron2_p; TreeSetDiElectronVar(electron1, electron2); + + ZStat=1; + return; } +DetId ZNtupleDumper::findSCseed(const reco::SuperCluster& cluster){ + DetId seedDetId; + float seedEnergy=0; + std::vector< std::pair > hitsFractions = cluster.hitsAndFractions(); + for(std::vector< std::pair >::const_iterator hitsAndFractions_itr = hitsFractions.begin(); + hitsAndFractions_itr != hitsFractions.end(); + hitsAndFractions_itr++){ + if(hitsAndFractions_itr->second > seedEnergy) + seedDetId=hitsAndFractions_itr->first; + } +#ifdef DEBUG + std::cout << "[DEBUG findSCseed] seedDetIt: " << seedDetId.rawId() << std::endl + << cluster << std::endl + << *(cluster.seed()) << std::endl; +#endif + if(seedDetId.null()){ + std::cerr << "[ERROR] Invalid detID: " << cluster << std::endl; + } + return seedDetId; +} DetId ZNtupleDumper::findSCseed(const reco::SuperClusterRef& cluster){ DetId seedDetId; @@ -1076,6 +1330,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int phiSCEle[index] = electron1.superCluster()->phi(); const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); + const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); DetId seedDetId = electron1.superCluster()->seed()->seed(); @@ -1090,6 +1345,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; if(electron1.isEB() && seedDetId.subdetId() == EcalBarrel){ + EBDetId seedDetIdEcal = seedDetId; seedXSCEle[index]=seedDetIdEcal.ieta(); seedYSCEle[index]=seedDetIdEcal.iphi(); @@ -1233,6 +1489,175 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int } +// a negative index means that the corresponding electron does not exist, fill with 0 +void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1, int index){ + + if(index<0){ + PtEle[-index] = 0; + chargeEle[-index] = 0; + etaEle[-index] = 0; + phiEle[-index] = 0; + return; + } + + //checks + + PtEle[index] = electron1.energy()/cosh(electron1.eta()); + chargeEle[index] = -100; // dont know the charge for SC + etaEle[index] = electron1.eta(); + phiEle[index] = electron1.phi(); + + recoFlagsEle[index] = -1; // define -1 as a SC + + fbremEle[index] = -1; // no bremstrahlung for SC + + etaSCEle[index] = electron1.eta(); // itself is a SC + phiSCEle[index] = electron1.phi(); + + const EcalRecHitCollection *recHitsEB = clustertools->getEcalEBRecHitCollection(); + const EcalRecHitCollection *recHitsEE = clustertools->getEcalEERecHitCollection(); + + const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); + + DetId seedDetId = electron1.seed()->seed(); + if(seedDetId.null()){ + seedDetId = findSCseed(electron1); + } + + if(seedDetId.subdetId() == EcalBarrel){ + EcalRecHitCollection::const_iterator seedRecHit = recHitsEB->find(seedDetId) ; + seedEnergySCEle[index]=seedRecHit->energy(); + if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; + else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; + else gainEle[index]=0; + EBDetId seedDetIdEcal = seedDetId; + seedXSCEle[index]=seedDetIdEcal.ieta(); + seedYSCEle[index]=seedDetIdEcal.iphi(); + }else if(seedDetId.subdetId() == EcalEndcap){ + EcalRecHitCollection::const_iterator seedRecHit = recHitsEE->find(seedDetId) ; + EEDetId seedDetIdEcal = seedDetId; + seedEnergySCEle[index]=seedRecHit->energy(); + if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; + else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; + else gainEle[index]=0; + seedXSCEle[index]=seedDetIdEcal.ix(); + seedYSCEle[index]=seedDetIdEcal.iy(); + }else{ ///< this case is strange but happens for trackerDriven electrons + seedXSCEle[index]=0; + seedYSCEle[index]=0; + } + + if(isMC) seedLCSCEle[index]=-10; + else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); + + float sumLC_E = 0.; + float sumE = 0.; + if( !isMC){ + std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); + for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); + detitr != hitsAndFractions_ele1.end(); detitr++ ) + { + double hitenergy = 0; + if ((detitr->first).subdetId() == EcalBarrel) + { + EcalRecHitCollection::const_iterator oneHit = recHitsEB->find( (detitr -> first) ) ; + hitenergy = oneHit->energy(); + } + else if ( (detitr->first).subdetId() == EcalEndcap) + { + EcalRecHitCollection::const_iterator oneHit = recHitsEE->find( (detitr -> first) ) ; + hitenergy = oneHit->energy(); + } + else hitenergy = 0; + sumLC_E += laserHandle_->getLaserCorrection(detitr->first, runTime_) * hitenergy; + sumE += hitenergy; + } + avgLCSCEle[index] = sumLC_E / sumE; + + } else avgLCSCEle[index] = -10; + + nHitsSCEle[index] = electron1.size(); + + // no MC matching has been considered yet for SCV + energyMCEle[index]=-100; + etaMCEle[index]=-100; + phiMCEle[index]=-100; + + energySCEle[index] = electron1.energy(); + rawEnergySCEle[index] = electron1.rawEnergy(); + esEnergySCEle[index] = electron1.preshowerEnergy(); + energySCEle_corr[index] = electron1.energy(); + + // for the regression energies above, temporarily only use SC energy because the training hasn't been done yet + energySCEle_regrCorr_pho[index] = electron1.energy(); + energySCEle_regrCorr_ele[index] = electron1.energy(); + energyEle_regrCorr_fra[index] = 1; + energyEle_regrCorr_egamma[index] = electron1.energy(); + energySigmaSCEle_regrCorr_pho[index] = electron1.energy(); + energySigmaSCEle_regrCorr_ele[index] = electron1.energy(); + energySigmaEle_regrCorr_fra[index] = 1; + energySigmaEle_regrCorr_egamma[index] = electron1.energy(); + energySCEle_regrCorrSemiParV4_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiParV4_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiParV4_pho[index] = -1; + energySigmaSCEle_regrCorrSemiParV4_ele[index] = -1; + energySCEle_regrCorrSemiParV5_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiParV5_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiParV5_pho[index] = -1; + energySigmaSCEle_regrCorrSemiParV5_ele[index] = -1; + energySCEle_regrCorrSemiParV6_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiParV6_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiParV6_pho[index] = -1; + energySigmaSCEle_regrCorrSemiParV6_ele[index] = -1; + energySCEle_regrCorrSemiParV7_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiParV7_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiParV7_pho[index] = -1; + energySigmaSCEle_regrCorrSemiParV7_ele[index] = -1; + energySCEle_regrCorrSemiParV8_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiParV8_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiParV8_pho[index] = -1; + energySigmaSCEle_regrCorrSemiParV8_ele[index] = -1; + energySCEle_regrCorrSemiPar7TeVtrainV6_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiPar7TeVtrainV6_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho[index] = -1; + energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele[index] = -1; + energySCEle_regrCorrSemiPar7TeVtrainV7_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiPar7TeVtrainV7_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho[index] = -1; + energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele[index] = -1; + energySCEle_regrCorrSemiPar7TeVtrainV8_pho[index] = electron1.energy(); + energySCEle_regrCorrSemiPar7TeVtrainV8_ele[index] = electron1.energy(); + energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho[index] = -1; + energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele[index] = -1; + + // change in an electron properties please, EleNewEnergyProducer + e3x3SCEle[index] = clustertools->e3x3(*electron1.seed()); + e5x5SCEle[index] = clustertools->e5x5(*electron1.seed()); + eSeedSCEle[index]= electron1.seed()->energy(); + + pModeGsfEle[index] = -100; // no track, though .. + pAtVtxGsfEle[index] = -100; + + R9Ele[index] = e3x3SCEle[index]/electron1.rawEnergy(); + + + // make it a function + //eleID[index] = ((bool) electron1.electronID("fiducial")) << 0; + //eleID[index] += ((bool) electron1.electronID("loose")) << 1; + //eleID[index] += ((bool) electron1.electronID("medium")) << 2; + //eleID[index] += ((bool) electron1.electronID("tight")) << 3; + //eleID[index] += ((bool) electron1.electronID("WP90PU")) << 4; + //eleID[index] += ((bool) electron1.electronID("WP80PU")) << 5; + //eleID[index] += ((bool) electron1.electronID("WP70PU")) << 6; + //classificationEle[index] = electron1.classification(); + + // temporary ignor the id and classification + eleID[index] = -100; + classificationEle[index] = -100; + + return; +} + void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const pat::Electron& electron2){ TreeSetSingleElectronVar(electron1, 0); @@ -1327,11 +1752,104 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const // r9weight[1]=r9Weight(etaEle[1], R9Ele[1]); //#endif } - + + ZStat=1; + + return; +} + +void ZNtupleDumper::TreeSetDiElectronVar(const pat::Electron& electron1, const reco::SuperCluster& electron2){ + + TreeSetSingleElectronVar(electron1, 0); + + if(isWenu) { + std::cout << "[ERROR] TreeSetDiElectronVar(const pat::Electron&, const reco::SuperCluster&) \n" + << " is only supposed to called with doHighEta option and without isWenu option\n" + << " turned on, please protect it in your codes." << std::endl; + exit(1); + } + + + TreeSetSingleElectronVar(electron2, 1); + + double t1=TMath::Exp(-etaEle[0]); + double t2=TMath::Exp(-etaEle[1]); + double t1q = t1*t1; + double t2q = t2*t2; + + double angle=1- ( (1-t1q)*(1-t2q)+4*t1*t2*cos(phiEle[0]-phiEle[1]))/( (1+t1q)*(1+t2q) ); + + + invMass = sqrt(2*electron1.energy()*electron2.energy() *angle); + invMass_e5x5 = sqrt(2*electron1.e5x5()*(clustertools->e5x5(*electron2.seed())) * angle); + + invMass_SC = sqrt(2*energySCEle[0]*energySCEle[1] * angle); + + + invMass_rawSC = sqrt(2 * rawEnergySCEle[0] * rawEnergySCEle[1] * angle); + + + invMass_rawSC_esSC = sqrt(2 * (rawEnergySCEle[0] + esEnergySCEle[0]) * + (rawEnergySCEle[1] + esEnergySCEle[1]) * + angle); + + invMass_SC_corr = sqrt(2*energySCEle_corr[0]*energySCEle_corr[1] * + angle); + + invMass_SC_regrCorr_ele = sqrt(2* energySCEle_regrCorr_ele[0] * energySCEle_regrCorr_ele[1] * + angle); + invMass_SC_regrCorr_pho = sqrt(2* energySCEle_regrCorr_pho[0] * energySCEle_regrCorr_pho[1] * + angle); + + invMass_SC_regrCorrSemiParV4_ele = sqrt(2* energySCEle_regrCorrSemiParV4_ele[0] * energySCEle_regrCorrSemiParV4_ele[1] * + angle); + invMass_SC_regrCorrSemiParV4_pho = sqrt(2* energySCEle_regrCorrSemiParV4_pho[0] * energySCEle_regrCorrSemiParV4_pho[1] * + angle); + invMass_SC_regrCorrSemiParV4_pho = sqrt(2* energySCEle_regrCorrSemiParV4_pho[0] * energySCEle_regrCorrSemiParV4_pho[1] * + angle); + invMass_SC_regrCorrSemiParV5_ele = sqrt(2* energySCEle_regrCorrSemiParV5_ele[0] * energySCEle_regrCorrSemiParV5_ele[1] * + angle); + invMass_SC_regrCorrSemiParV5_pho = sqrt(2* energySCEle_regrCorrSemiParV5_pho[0] * energySCEle_regrCorrSemiParV5_pho[1] * + angle); + invMass_SC_regrCorrSemiParV6_ele = sqrt(2* energySCEle_regrCorrSemiParV6_ele[0] * energySCEle_regrCorrSemiParV6_ele[1] * + angle); + invMass_SC_regrCorrSemiParV6_pho = sqrt(2* energySCEle_regrCorrSemiParV6_pho[0] * energySCEle_regrCorrSemiParV6_pho[1] * + angle); + invMass_SC_regrCorrSemiParV7_ele = sqrt(2* energySCEle_regrCorrSemiParV7_ele[0] * energySCEle_regrCorrSemiParV7_ele[1] * + angle); + invMass_SC_regrCorrSemiParV7_pho = sqrt(2* energySCEle_regrCorrSemiParV7_pho[0] * energySCEle_regrCorrSemiParV7_pho[1] * + angle); + invMass_SC_regrCorrSemiParV8_ele = sqrt(2* energySCEle_regrCorrSemiParV8_ele[0] * energySCEle_regrCorrSemiParV8_ele[1] * + angle); + invMass_SC_regrCorrSemiParV8_pho = sqrt(2* energySCEle_regrCorrSemiParV8_pho[0] * energySCEle_regrCorrSemiParV8_pho[1] * + angle); + + invMass_SC_regrCorrSemiPar7TeVtrainV6_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV6_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_pho[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV7_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV7_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_pho[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV8_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV8_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_pho[1] * + angle); + + invMass_regrCorr_fra = sqrt(2* energyEle_regrCorr_fra[0] * energyEle_regrCorr_fra[1] *angle); + invMass_regrCorr_egamma = sqrt(2* energyEle_regrCorr_egamma[0] * energyEle_regrCorr_egamma[1] *angle); + + invMass_MC = -100; // temporary set it to be -100 for SC + + ZStat=2; + return; } +////////////// + //#============================== extra calib tree void ZNtupleDumper::InitExtraCalibTree(){ @@ -1390,6 +1908,31 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, const p return; } +void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, const reco::SuperCluster& electron2){ + + recoFlagRecHitSCEle[0].clear(); + rawIdRecHitSCEle[0].clear(); + XRecHitSCEle[0].clear(); + YRecHitSCEle[0].clear(); + energyRecHitSCEle[0].clear(); + LCRecHitSCEle[0].clear(); + ICRecHitSCEle[0].clear(); + AlphaRecHitSCEle[0].clear(); + + recoFlagRecHitSCEle[1].clear(); + rawIdRecHitSCEle[1].clear(); + XRecHitSCEle[1].clear(); + YRecHitSCEle[1].clear(); + energyRecHitSCEle[1].clear(); + LCRecHitSCEle[1].clear(); + ICRecHitSCEle[1].clear(); + AlphaRecHitSCEle[1].clear(); + + TreeSetExtraCalibVar(electron1, 0); + if(!isWenu) TreeSetExtraCalibVar(electron2, 1); + return; +} + void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int index){ // EcalIntercalibConstantMap icMap = icHandle->get() @@ -1405,8 +1948,10 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int ind // EcalRecHitCollection::const_iterator theSeedHit = recHits->find (id); // trash this EcalRecHitCollection::const_iterator oneHit = recHits->find( (detitr -> first) ) ; if(oneHit==recHits->end()){ - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() << "bailing out"; - assert(0); + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() + << " in subdetector " << (detitr->first).subdetId() << " bailing out"; + //assert(0); + continue; } recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); rawIdRecHitSCEle[index].push_back(detitr->first.rawId()); @@ -1433,7 +1978,8 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int ind // std::cout << "icalconst set to: " << icalconst << std::endl; } else { edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() << "bailing out"; - assert(0); + //assert(0); + continue; } // 3) get adc2GeV //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? @@ -1444,6 +1990,88 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int ind return; } +void ZNtupleDumper::TreeSetExtraCalibVar(const reco::SuperCluster& electron1, int index){ + + std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); + nHitsSCEle[index] = hitsAndFractions_ele1.size(); + + const EcalRecHitCollection *recHitsEB = clustertools->getEcalEBRecHitCollection(); + const EcalRecHitCollection *recHitsEE = clustertools->getEcalEERecHitCollection(); + + const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); + const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); + + for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); + detitr != hitsAndFractions_ele1.end(); detitr++ ) + { + // get out the DetId of the hit + DetId hitId = (detitr -> first); + // define a iterator of the EcalRecoHit + EcalRecHitCollection::const_iterator oneHit(NULL); + + // treat it seperately for EB and EE + if ( hitId.subdetId() == EcalBarrel) + { + oneHit = recHitsEB->find( hitId ); + // protection of the missing hit + if(oneHit==recHitsEB->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; + assert(0); + } + // redifine EBDetId and get EB hit position + EBDetId recHitId(hitId); + XRecHitSCEle[index].push_back(recHitId.ieta()); + YRecHitSCEle[index].push_back(recHitId.iphi()); + } + else if ( hitId.subdetId() == EcalEndcap ) + { + oneHit = recHitsEE->find( hitId ); + // protection of the missing hit + if(oneHit==recHitsEE->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; + assert(0); + } + // redifine EEDetId and get EE hit position + EEDetId recHitId(hitId); + XRecHitSCEle[index].push_back(recHitId.ix()); + YRecHitSCEle[index].push_back(recHitId.iy()); + } + else + { + // error if not able to find the hit in EE and EB + edm::LogError("ZNtupleDumper") << "SC hit cannot be found in EB and EE. " ; + assert(0); + } + + // other information + recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); + rawIdRecHitSCEle[index].push_back(hitId.rawId()); + + energyRecHitSCEle[index].push_back(oneHit->energy()); + + // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: + // 1) get laser correction coefficient + LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(hitId, runTime_)); + // 2) get intercalibration + EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(hitId); + EcalIntercalibConstant icalconst = 1.; + if( icalit!=icalMap.end() ) { + icalconst = (*icalit); + // std::cout << "icalconst set to: " << icalconst << std::endl; + } else { + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (hitId).rawId() << "bailing out"; + assert(0); + } + // 3) get adc2GeV + //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? + // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); + ICRecHitSCEle[index].push_back(icalconst); + + } + + return; +} + //#============================== Ele ID tree void ZNtupleDumper::InitEleIDTree(){ diff --git a/initCmsEnv.sh b/initCmsEnv.sh index 58755a162b4..0cab28640bd 100644 --- a/initCmsEnv.sh +++ b/initCmsEnv.sh @@ -3,7 +3,13 @@ source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh eval `scramv1 runtime -sh` source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh -voms-proxy-init -voms cms -out $HOME/gpi.out +#voms-proxy-init -voms cms -out $HOME/gpi.out +voms-proxy-init -voms cms + +user=`whoami` +cert=`ls -l /tmp/x509* | grep heli | awk {'print $9'}` +cert=`basename $cert` +cp /tmp/$cert $CMSSW_BASE/src/data/ #cd calibration/SANDBOX #setenv PATH $PWD/bin:$PATH From bd98e3570ff8e2e7377de377b6ecc0977f67ccd7 Mon Sep 17 00:00:00 2001 From: shervin Date: Sun, 25 May 2014 15:05:13 +0200 Subject: [PATCH 378/475] cleaned ZNtupleDumper for highEta reverted changes by Hengne --- ALCARAW_RECO/copyTree.cc | 72 ---- ALCARAW_RECO/copyTree.h | 282 ---------------- ALCARAW_RECO/copyTree.sh | 41 --- ALCARAW_RECO/initdata.sh | 28 -- ALCARAW_RECO/python/WZElectronSkims_cff.py | 22 +- ALCARAW_RECO/python/alcaSkimming.py | 14 - .../scripts/makeArgumentsWithDataPath.sh | 128 ------- ALCARAW_RECO/scripts/prodAlcareco.sh | 82 ++--- ALCARAW_RECO/scripts/prodFunctions.sh | 3 - ALCARAW_RECO/scripts/prodNtuples.sh | 7 +- ZNtupleDumper/BuildFile.xml | 4 +- ZNtupleDumper/python/zntupledumper_cfi.py | 3 - ZNtupleDumper/src/ZNtupleDumper.cc | 318 +++--------------- initCmsEnv.sh | 8 +- 14 files changed, 95 insertions(+), 917 deletions(-) delete mode 100644 ALCARAW_RECO/copyTree.cc delete mode 100644 ALCARAW_RECO/copyTree.h delete mode 100755 ALCARAW_RECO/copyTree.sh delete mode 100755 ALCARAW_RECO/initdata.sh delete mode 100755 ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh diff --git a/ALCARAW_RECO/copyTree.cc b/ALCARAW_RECO/copyTree.cc deleted file mode 100644 index 34ed965b157..00000000000 --- a/ALCARAW_RECO/copyTree.cc +++ /dev/null @@ -1,72 +0,0 @@ -#include "copyTree.h" -#include "TFile.h" - -int main(int argc, char* argv[]) -{ - if (argc<3) - { - std::cout << "> drawMee " - << std::endl; - return 0; - } - - std::string inrootfilename(argv[1]); - std::string outrootfilename(argv[2]); - - int maxevt = -1; - char* selection; - if (argc>3) - { - maxevt = atoi(argv[3]); - - if (argc>4) - { - selection = argv[4]; - } - } - - - // reading data - TFile* infile = new TFile(inrootfilename.c_str()); - TTree* tree = (TTree*)infile->Get("selected"); - TTree* extree = (TTree*)infile->Get("extraCalibTree"); - extree->BuildIndex("runNumber","eventNumber"); - - // output root file - TFile* fout = new TFile(outrootfilename.c_str(), "recreate"); - - // Set the branches for the TChain/TTree - SetTreeBranch(tree); - gROOT->ProcessLine("#include "); - SetExtraTreeBranch(extree); - - // clone tree - TTree* newtree; - if (maxevt>0) newtree = (TTree*)tree->CopyTree(selection, "", maxevt); - else newtree = (TTree*)tree->CopyTree(selection); - SetTreeBranch(newtree); - - TTree* newextree = (TTree*)extree->CloneTree(0); - SetExtraTreeBranch(newextree); - - int newEntries = newtree->GetEntries(); - for (int i=0; iGetEntry(i); - extree->GetEntryWithIndex(runNumber, eventNumber); - newextree->Fill(); - } - - // write the hist to out root file - fout->cd(); - - newtree->Write(); - newextree->Write(); - - - // close - fout->Close(); - - // - return 1; -} diff --git a/ALCARAW_RECO/copyTree.h b/ALCARAW_RECO/copyTree.h deleted file mode 100644 index c7f2bdfdc8f..00000000000 --- a/ALCARAW_RECO/copyTree.h +++ /dev/null @@ -1,282 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "TROOT.h" -#include "TChain.h" -#include "TTree.h" -#include "TH1D.h" -#include "TMath.h" - - -// variables for ROOT Tree -//Declaration of leaves types - Int_t runNumber; - ULong64_t eventNumber; - Int_t lumiBlock; - ULong64_t runTime; - Float_t mcGenWeight; - Char_t HLTfire; - Int_t nPU[1]; - Float_t rho; - Int_t nPV; - Int_t eleID[2]; - Int_t ZStat; - Int_t chargeEle[2]; - Float_t etaSCEle[2]; - Float_t phiSCEle[2]; - Float_t etaEle[2]; - Float_t phiEle[2]; - Int_t classificationEle[2]; - Int_t recoFlagsEle[2]; - Float_t PtEle[2]; - Float_t fbremEle[2]; - Float_t seedXSCEle[2]; - Float_t seedYSCEle[2]; - Float_t seedEnergySCEle[2]; - Float_t seedLCSCEle[2]; - Float_t avgLCSCEle[2]; - UChar_t gainEle[2]; - Float_t energyMCEle[2]; - Float_t energySCEle[2]; - Float_t rawEnergySCEle[2]; - Float_t esEnergySCEle[2]; - Float_t energySCEle_corr[2]; - Float_t energySCEle_regrCorr_ele[2]; - Float_t energySCEle_regrCorr_pho[2]; - Float_t energyEle_regrCorr_fra[2]; - Float_t energySigmaEle_regrCorr_fra[2]; - Float_t energyEle_regrCorr_egamma[2]; - Float_t energySigmaEle_regrCorr_egamma[2]; - Float_t energySigmaSCEle_regrCorr_ele[2]; - Float_t energySigmaSCEle_regrCorr_pho[2]; - Float_t energySCEle_regrCorrSemiParV4_ele[2]; - Float_t energySCEle_regrCorrSemiParV4_pho[2]; - Float_t energySCEle_regrCorrSemiParV5_ele[2]; - Float_t energySCEle_regrCorrSemiParV5_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiParV4_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiParV4_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiParV5_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiParV5_pho[2]; - Float_t energySCEle_regrCorrSemiParV6_ele[2]; - Float_t energySCEle_regrCorrSemiParV6_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiParV6_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiParV6_pho[2]; - Float_t energySCEle_regrCorrSemiParV7_ele[2]; - Float_t energySCEle_regrCorrSemiParV7_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiParV7_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiParV7_pho[2]; - Float_t energySCEle_regrCorrSemiParV8_ele[2]; - Float_t energySCEle_regrCorrSemiParV8_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiParV8_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiParV8_pho[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV6_ele[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV6_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV7_ele[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV7_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV8_ele[2]; - Float_t energySCEle_regrCorrSemiPar7TeVtrainV8_pho[2]; - Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele[2]; - Float_t energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho[2]; - Float_t R9Ele[2]; - Float_t e5x5SCEle[2]; - Float_t pModeGsfEle[2]; - Float_t pAtVtxGsfEle[2]; - Float_t invMass; - Float_t invMass_SC; - Float_t invMass_e5x5; - Float_t invMass_rawSC; - Float_t invMass_rawSC_esSC; - Float_t invMass_SC_corr; - Float_t invMass_SC_regrCorr_ele; - Float_t invMass_SC_regrCorr_pho; - Float_t invMass_regrCorr_fra; - Float_t invMass_regrCorr_egamma; - Float_t invMass_SC_regrCorrSemiParV4_pho; - Float_t invMass_SC_regrCorrSemiParV4_ele; - Float_t invMass_SC_regrCorrSemiParV5_pho; - Float_t invMass_SC_regrCorrSemiParV5_ele; - Float_t invMass_SC_regrCorrSemiParV6_pho; - Float_t invMass_SC_regrCorrSemiParV6_ele; - Float_t invMass_SC_regrCorrSemiParV7_pho; - Float_t invMass_SC_regrCorrSemiParV7_ele; - Float_t invMass_SC_regrCorrSemiParV8_pho; - Float_t invMass_SC_regrCorrSemiParV8_ele; - Float_t invMass_SC_regrCorrSemiPar7TeVtrainV6_pho; - Float_t invMass_SC_regrCorrSemiPar7TeVtrainV6_ele; - Float_t invMass_SC_regrCorrSemiPar7TeVtrainV7_pho; - Float_t invMass_SC_regrCorrSemiPar7TeVtrainV7_ele; - Float_t invMass_SC_regrCorrSemiPar7TeVtrainV8_pho; - Float_t invMass_SC_regrCorrSemiPar7TeVtrainV8_ele; - Float_t invMass_MC; - Float_t etaMCEle[2]; - Float_t phiMCEle[2]; - Int_t nHitsSCEle[2]; - -// extra tree - -//Declaration of leaves types - std::vector* rawIdRecHitSCEle1; - std::vector* rawIdRecHitSCEle2; - std::vector* XRecHitSCEle1; - std::vector* XRecHitSCEle2; - std::vector* YRecHitSCEle1; - std::vector* YRecHitSCEle2; - std::vector* energyRecHitSCEle1; - std::vector* energyRecHitSCEle2; - std::vector* LCRecHitSCEle1; - std::vector* LCRecHitSCEle2; - std::vector* ICRecHitSCEle1; - std::vector* ICRecHitSCEle2; - std::vector* AlphaRecHitSCEle1; - std::vector* AlphaRecHitSCEle2; - - - -// set tree branches -void SetTreeBranch(TTree* tree) -{ - // Set branch addresses. - tree->SetBranchAddress("runNumber",&runNumber); - tree->SetBranchAddress("eventNumber",&eventNumber); - tree->SetBranchAddress("lumiBlock",&lumiBlock); - tree->SetBranchAddress("runTime",&runTime); - tree->SetBranchAddress("mcGenWeight",&mcGenWeight); - tree->SetBranchAddress("HLTfire",&HLTfire); - tree->SetBranchAddress("nPU",nPU); - tree->SetBranchAddress("rho",&rho); - tree->SetBranchAddress("nPV",&nPV); - tree->SetBranchAddress("eleID",eleID); - tree->SetBranchAddress("ZStat",&ZStat); - tree->SetBranchAddress("chargeEle",chargeEle); - tree->SetBranchAddress("etaSCEle",etaSCEle); - tree->SetBranchAddress("phiSCEle",phiSCEle); - tree->SetBranchAddress("etaEle",etaEle); - tree->SetBranchAddress("phiEle",phiEle); - tree->SetBranchAddress("classificationEle",classificationEle); - tree->SetBranchAddress("recoFlagsEle",recoFlagsEle); - tree->SetBranchAddress("PtEle",PtEle); - tree->SetBranchAddress("fbremEle",fbremEle); - tree->SetBranchAddress("seedXSCEle",seedXSCEle); - tree->SetBranchAddress("seedYSCEle",seedYSCEle); - tree->SetBranchAddress("seedEnergySCEle",seedEnergySCEle); - tree->SetBranchAddress("seedLCSCEle",seedLCSCEle); - tree->SetBranchAddress("avgLCSCEle",avgLCSCEle); - tree->SetBranchAddress("gainEle",gainEle); - tree->SetBranchAddress("energyMCEle",energyMCEle); - tree->SetBranchAddress("energySCEle",energySCEle); - tree->SetBranchAddress("rawEnergySCEle",rawEnergySCEle); - tree->SetBranchAddress("esEnergySCEle",esEnergySCEle); - tree->SetBranchAddress("energySCEle_corr",energySCEle_corr); - tree->SetBranchAddress("energySCEle_regrCorr_ele",energySCEle_regrCorr_ele); - tree->SetBranchAddress("energySCEle_regrCorr_pho",energySCEle_regrCorr_pho); - tree->SetBranchAddress("energyEle_regrCorr_fra",energyEle_regrCorr_fra); - tree->SetBranchAddress("energySigmaEle_regrCorr_fra",energySigmaEle_regrCorr_fra); - tree->SetBranchAddress("energyEle_regrCorr_egamma",energyEle_regrCorr_egamma); - tree->SetBranchAddress("energySigmaEle_regrCorr_egamma",energySigmaEle_regrCorr_egamma); - tree->SetBranchAddress("energySigmaSCEle_regrCorr_ele",energySigmaSCEle_regrCorr_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorr_pho",energySigmaSCEle_regrCorr_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV4_ele",energySCEle_regrCorrSemiParV4_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV4_pho",energySCEle_regrCorrSemiParV4_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV5_ele",energySCEle_regrCorrSemiParV5_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV5_pho",energySCEle_regrCorrSemiParV5_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV4_ele",energySigmaSCEle_regrCorrSemiParV4_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV4_pho",energySigmaSCEle_regrCorrSemiParV4_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV5_ele",energySigmaSCEle_regrCorrSemiParV5_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV5_pho",energySigmaSCEle_regrCorrSemiParV5_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV6_ele",energySCEle_regrCorrSemiParV6_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV6_pho",energySCEle_regrCorrSemiParV6_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV6_ele",energySigmaSCEle_regrCorrSemiParV6_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV6_pho",energySigmaSCEle_regrCorrSemiParV6_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV7_ele",energySCEle_regrCorrSemiParV7_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV7_pho",energySCEle_regrCorrSemiParV7_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV7_ele",energySigmaSCEle_regrCorrSemiParV7_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV7_pho",energySigmaSCEle_regrCorrSemiParV7_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV8_ele",energySCEle_regrCorrSemiParV8_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiParV8_pho",energySCEle_regrCorrSemiParV8_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV8_ele",energySigmaSCEle_regrCorrSemiParV8_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiParV8_pho",energySigmaSCEle_regrCorrSemiParV8_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV6_ele",energySCEle_regrCorrSemiPar7TeVtrainV6_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV6_pho",energySCEle_regrCorrSemiPar7TeVtrainV6_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele",energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho",energySigmaSCEle_regrCorrSemiPar7TeVtrainV6_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV7_ele",energySCEle_regrCorrSemiPar7TeVtrainV7_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV7_pho",energySCEle_regrCorrSemiPar7TeVtrainV7_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele",energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho",energySigmaSCEle_regrCorrSemiPar7TeVtrainV7_pho); - tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV8_ele",energySCEle_regrCorrSemiPar7TeVtrainV8_ele); - tree->SetBranchAddress("energySCEle_regrCorrSemiPar7TeVtrainV8_pho",energySCEle_regrCorrSemiPar7TeVtrainV8_pho); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele",energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_ele); - tree->SetBranchAddress("energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho",energySigmaSCEle_regrCorrSemiPar7TeVtrainV8_pho); - tree->SetBranchAddress("R9Ele",R9Ele); - tree->SetBranchAddress("e5x5SCEle",e5x5SCEle); - tree->SetBranchAddress("pModeGsfEle",pModeGsfEle); - tree->SetBranchAddress("pAtVtxGsfEle",pAtVtxGsfEle); - tree->SetBranchAddress("invMass",&invMass); - tree->SetBranchAddress("invMass_SC",&invMass_SC); - tree->SetBranchAddress("invMass_e5x5",&invMass_e5x5); - tree->SetBranchAddress("invMass_rawSC",&invMass_rawSC); - tree->SetBranchAddress("invMass_rawSC_esSC",&invMass_rawSC_esSC); - tree->SetBranchAddress("invMass_SC_corr",&invMass_SC_corr); - tree->SetBranchAddress("invMass_SC_regrCorr_ele",&invMass_SC_regrCorr_ele); - tree->SetBranchAddress("invMass_SC_regrCorr_pho",&invMass_SC_regrCorr_pho); - tree->SetBranchAddress("invMass_regrCorr_fra",&invMass_regrCorr_fra); - tree->SetBranchAddress("invMass_regrCorr_egamma",&invMass_regrCorr_egamma); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV4_pho",&invMass_SC_regrCorrSemiParV4_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV4_ele",&invMass_SC_regrCorrSemiParV4_ele); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV5_pho",&invMass_SC_regrCorrSemiParV5_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV5_ele",&invMass_SC_regrCorrSemiParV5_ele); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV6_pho",&invMass_SC_regrCorrSemiParV6_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV6_ele",&invMass_SC_regrCorrSemiParV6_ele); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV7_pho",&invMass_SC_regrCorrSemiParV7_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV7_ele",&invMass_SC_regrCorrSemiParV7_ele); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV8_pho",&invMass_SC_regrCorrSemiParV8_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiParV8_ele",&invMass_SC_regrCorrSemiParV8_ele); - tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV6_pho",&invMass_SC_regrCorrSemiPar7TeVtrainV6_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV6_ele",&invMass_SC_regrCorrSemiPar7TeVtrainV6_ele); - tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV7_pho",&invMass_SC_regrCorrSemiPar7TeVtrainV7_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV7_ele",&invMass_SC_regrCorrSemiPar7TeVtrainV7_ele); - tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV8_pho",&invMass_SC_regrCorrSemiPar7TeVtrainV8_pho); - tree->SetBranchAddress("invMass_SC_regrCorrSemiPar7TeVtrainV8_ele",&invMass_SC_regrCorrSemiPar7TeVtrainV8_ele); - tree->SetBranchAddress("invMass_MC",&invMass_MC); - tree->SetBranchAddress("etaMCEle",etaMCEle); - tree->SetBranchAddress("phiMCEle",phiMCEle); - tree->SetBranchAddress("nHitsSCEle",nHitsSCEle); -} - -// set tree branches -void SetExtraTreeBranch(TTree* extraCalibTree){ - - // Set branch addresses. - extraCalibTree->SetBranchAddress("runNumber",&runNumber); - extraCalibTree->SetBranchAddress("eventNumber",&eventNumber); - extraCalibTree->SetBranchAddress("lumiBlock",&lumiBlock); - extraCalibTree->SetBranchAddress("runTime",&runTime); - extraCalibTree->SetBranchAddress("nHitsSCEle",nHitsSCEle); - extraCalibTree->SetBranchAddress("rawIdRecHitSCEle1",&rawIdRecHitSCEle1); - extraCalibTree->SetBranchAddress("rawIdRecHitSCEle2",&rawIdRecHitSCEle2); - extraCalibTree->SetBranchAddress("XRecHitSCEle1",&XRecHitSCEle1); - extraCalibTree->SetBranchAddress("XRecHitSCEle2",&XRecHitSCEle2); - extraCalibTree->SetBranchAddress("YRecHitSCEle1",&YRecHitSCEle1); - extraCalibTree->SetBranchAddress("YRecHitSCEle2",&YRecHitSCEle2); - extraCalibTree->SetBranchAddress("energyRecHitSCEle1",&energyRecHitSCEle1); - extraCalibTree->SetBranchAddress("energyRecHitSCEle2",&energyRecHitSCEle2); - extraCalibTree->SetBranchAddress("LCRecHitSCEle1",&LCRecHitSCEle1); - extraCalibTree->SetBranchAddress("LCRecHitSCEle2",&LCRecHitSCEle2); - extraCalibTree->SetBranchAddress("ICRecHitSCEle1",&ICRecHitSCEle1); - extraCalibTree->SetBranchAddress("ICRecHitSCEle2",&ICRecHitSCEle2); - extraCalibTree->SetBranchAddress("AlphaRecHitSCEle1",&AlphaRecHitSCEle1); - extraCalibTree->SetBranchAddress("AlphaRecHitSCEle2",&AlphaRecHitSCEle2); - -} - - - - - diff --git a/ALCARAW_RECO/copyTree.sh b/ALCARAW_RECO/copyTree.sh deleted file mode 100755 index 5323a66af95..00000000000 --- a/ALCARAW_RECO/copyTree.sh +++ /dev/null @@ -1,41 +0,0 @@ - -g++ -o copyTree.exe copyTree.cc \ - -pthread -m64 \ - -I${ROOTSYS}/include \ - -I./ -L${ROOTSYS}/lib \ - -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d \ - -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics \ - -lMathCore -lThread -lMinuit -lMinuit2 -lTreePlayer -lpthread \ - -Wl,-rpath,${ROOTSYS}/lib -lm -ldl - -tag="_EEn" -sele="etaSCEle[1]<-2.2&&ZStat==2" - -#./copyTree.exe ntuple.root ntuple_out.root -1 "etaSCEle[1]>2.3" -date - -#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012A-22Jan-v1-Extra.root copyTreeExtra_out_A${tag}.root -1 "$sele" -date - -#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012B-22Jan-v1-Extra.root copyTreeExtra_out_B${tag}.root -1 "$sele" -date -#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012C-22Jan-v1-Extra.root copyTreeExtra_out_C${tag}.root -1 "$sele" -date -#./copytree.exe ntuple_DoubleElectron-HighEtaSkim-RUN2012D-22Jan-v1-Extra.root copyTreeExtra_out_D${tag}.root -1 "$sele" -date - -#hadd copyTreeExtra_out_ABCD${tag}.root \ -# copyTreeExtra_out_A${tag}.root \ -# copyTreeExtra_out_B${tag}.root \ -# copyTreeExtra_out_C${tag}.root \ -# copyTreeExtra_out_D${tag}.root - -#hadd copyTreeExtra_out_ABC${tag}.root \ -# copyTreeExtra_out_A${tag}.root \ -# copyTreeExtra_out_B${tag}.root \ -# copyTreeExtra_out_C${tag}.root \ - - -date - - diff --git a/ALCARAW_RECO/initdata.sh b/ALCARAW_RECO/initdata.sh deleted file mode 100755 index 38df9aeaf3c..00000000000 --- a/ALCARAW_RECO/initdata.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - - -echo "INITDATA:: PWD=$PWD" -echo "INITDATA:: ls -l " -ls -l -echo "INITDATA:: ls -l $CMSSW_BASE/src/data/ " -ls -l $CMSSW_BASE/src/data/ -echo "INITDATA:: who am i " -who am i -whoami -id -nu -user=`whoami` -cert=`ls -l x509* | grep $user | awk {'print $9'}` -cert=`basename $cert` -cp $cert /tmp/$cert - -echo "INITDATA:: user=$user ; cert=$cert ; CMSSW_BASE=$CMSSW_BASE " -echo "INITDATA:: ls -l /tmp/$cert" -ls -l /tmp/$cert - -echo "INITDATA:: RUNTIME_AREA=$RUNTIME_AREA" -echo "INITDATA:: NJob=$NJob" - -echo "INITDATA:: start run cmsRun " -cmsRun -j $RUNTIME_AREA/crab_fjr_$NJob.xml -p pset.py -echo "INITDATA:: end run cmsRun" - diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index f53b426753b..b121e4f557c 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -139,27 +139,13 @@ ) ) -HighEtaPhotons = cms.EDFilter("PhotonSelector", - src = cms.InputTag("photons"), - cut = cms.string("hadronicOverEm<0.05" - " && (superCluster.rawEnergy*sin(superCluster.position.theta)>20.0)" - " && (abs(superCluster.eta)>2.4) " # && abs(superCluster.eta)<2.8 - " && (sigmaIetaIeta<0.029)" - " && (ecalRecHitSumEtConeDR03/(p4.Pt) < 0.035)" - " && (hcalTowerSumEtConeDR03/(p4.Pt) < 0.11)" - " && (r9>0.89 && r9<1.02)" - ) - ) - - #------------------------------ electronID producer from Calibration.EleSelectionProducers.eleselectionproducers_cfi import * # process.EleSelectionProducers SCselector = cms.EDFilter("SuperClusterSelector", src = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower'), - #cut = cms.string('(eta>2.4 || eta<-2.4) && (energy*sin(position.theta)> 15)') - cut = cms.string('(energy*sin(position.theta)> 15)') + cut = cms.string('(eta>2.4 || eta<-2.4) && (energy*sin(position.theta)> 15)') ) ### Build candidates from all the merged superclusters @@ -238,8 +224,6 @@ ZeeFilterSeq = cms.Sequence(eleSelSeq * ZeeSelector * ZeeFilter) WenuFilterSeq = cms.Sequence(eleSelSeq * WenuSelector * WenuFilter) WZFilterSeq = cms.Sequence(eleSelSeq * WZFilter) -#ZSCFilterSeq = cms.Sequence(ZSCHltFilter * eleSelSeq * EleSCSelector * ZSCFilter) -#ZSCFilterSeq = cms.Sequence(eleSelSeq * EleSCSelector * ZSCFilter) -ZSCFilterSeq = cms.Sequence(eleSelSeq * EleSCSelector) -HighEtaFilterSeq = cms.Sequence(eleSelSeq * HighEtaPhotons) +ZSCFilterSeq = cms.Sequence(ZSCHltFilter * eleSelSeq * EleSCSelector * ZSCFilter) + diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index b2d9d5ab15f..4333478170c 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -47,11 +47,6 @@ VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float "bool: doTreeOnly=1 true, doTreeOnly=0 false") -options.register('doHighEta', - 0, #default value False - VarParsing.VarParsing.multiplicity.singleton, # singleton or list - VarParsing.VarParsing.varType.int, # string, int, or float - "bool: doHighEta=1 true, doHighEta=0 false") options.register('pdfSyst', 0, #default value False VarParsing.VarParsing.multiplicity.singleton, # singleton or list @@ -76,7 +71,6 @@ ZSkim = False WSkim = False ZSCSkim = False -HighEtaSkim = False if(options.skim=="ZSkim"): ZSkim=True @@ -87,8 +81,6 @@ elif(options.skim=="fromWSkim"): print "[INFO] producing from WSkim files (USER format)" WSkim=False -elif(options.skim=="HighEtaSkim"): - HighEtaSkim=True else: if(options.type=="ALCARAW"): print "[ERROR] no skim selected" @@ -389,8 +381,6 @@ elif(ZSCSkim): #process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * process.ZSCFilterSeq) process.NtupleFilterSeq= cms.Sequence(process.ZSCFilterSeq) -elif(HighEtaSkim): - process.NtupleFilterSeq= cms.Sequence(process.HighEtaFilterSeq) else: process.NtupleFilterSeq = cms.Sequence() @@ -620,10 +610,6 @@ process.eleRegressionEnergy.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB.value() process.eleRegressionEnergy.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE.value() -if(options.doTree>0 and options.doHighEta>0): - process.zNtupleDumper.recHitCollectionEE = cms.InputTag("reducedEcalRecHitsEE") - process.zNtupleDumper.EESuperClusterCollection = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower") - process.zNtupleDumper.PhotonCollection = cms.InputTag("HighEtaPhotons") ############### JSON Filter if((options.doTree>0 and options.doTreeOnly==0)): diff --git a/ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh b/ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh deleted file mode 100755 index 4c2c556b376..00000000000 --- a/ALCARAW_RECO/scripts/makeArgumentsWithDataPath.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh - -usage(){ - echo "`basename $0` -d datapath -n njobs -o outputfile " -} - - - -#------------------------------ parsing -while getopts "hd:d:n:o:" OPTION; -do - case $OPTION in - h) - usage - exit 1 - ;; - d) - DATAPATH=$OPTARG - ;; - n) - NJOBS=$OPTARG - ;; - o) - OUTPUTFILE=$OPTARG - ;; - ?) - usage - exit - ;; - - esac -done - -echo ${NJOBS} - -if [ -z "$DATAPATH" ];then - echo "[ERROR] DATAPATH not defined" >> /dev/stderr - usage >> /dev/stderr - exit 1 -fi - -if [ -z "$NJOBS" ];then - echo "[ERROR] NJOBS not defined" >> /dev/stderr - usage >> /dev/stderr - exit 1 -fi - -if [ -z "$OUTPUTFILE" ];then - echo "[ERROR] OUTPUTFILE not defined" >> /dev/stderr - usage >> /dev/stderr - exit 1 -fi - -# get the list of files -if [ -e _filelist.txt ]; then - rm _filelist.txt; -fi -touch _filelist.txt -xroot_prefix="root://cms-xrd-global.cern.ch/" - -NFILES_TOTAL=0 - -for file in `das_client.py --query="dataset=${DATAPATH} file" --limit=0`; -do - echo "${xroot_prefix}${file}" >> _filelist.txt - NFILES_TOTAL=$(( NFILES_TOTAL + 1 )) -done - -echo $NFILES_TOTAL - -NFILES_PERJOB1=$(( NFILES_TOTAL / NJOBS + 1 )) # N files for each job except the last job -NJOBS=$(( NFILES_TOTAL / NFILES_PERJOB1 + 1 )) # reset NJOBS -NFILES_PERJOB2=$(( NFILES_TOTAL % NFILES_PERJOB1 )) # N files for the last job - -echo "NJOBS=$NJOBS; NFILES_PERJOB1=$NFILES_PERJOB1; NFILES_PERJOB2=$NFILES_PERJOB2" - -#============================== Writing the argumets file -if [ -e $OUTPUTFILE ]; then - rm $OUTPUTFILE -fi - -ARGUMENT=$OUTPUTFILE - -#begin the argument file -echo "" > $ARGUMENT - -NFILES=1 #counter, number of jobs added per job -IJOB=1 # job number, counter -FILES_IN_JOB="" #string to hold the files -for file in `cat _filelist.txt`; -do - # decide with NFILES_PERJOB to use - NFILES_PERJOB="" - if [ "$IJOB" -lt "$NJOBS" ]; then - NFILES_PERJOB=${NFILES_PERJOB1} - else - NFILES_PERJOB=${NFILES_PERJOB2} - fi - - # if less than number fo files per job, count it - if [ "$NFILES" -le "$NFILES_PERJOB" ]; then - # - if [ "$NFILES" -eq "1" ]; then - FILES_IN_JOB="${file}" - else - FILES_IN_JOB="${FILES_IN_JOB},${file}" - fi - # if eq number of files per job, fill in file - if [ "$NFILES" -eq "$NFILES_PERJOB" ]; then - echo "" >> $ARGUMENT - echo "" >> $ARGUMENT - IJOB=$(( IJOB + 1 )) # reset - FILES_IN_JOB="" #reset - NFILES=1 #reset - else - NFILES=$(( NFILES + 1 )) - fi - fi -done - -# end the argument file -echo "" >> $ARGUMENT - - -rm _filelist.txt - - - diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 0f38ec37f9c..63a00fc1a1d 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -5,7 +5,6 @@ source $CMSSW_BASE/src/Calibration/ALCARAW_RECO/scripts/prodFunctions.sh #------------------------------ default SKIM=none USEPARENT=0 -STORAGE_ELEMENT=T2_CH_CERN SCHEDULER=caf USESERVER=1 TYPE=ALCARECO @@ -18,9 +17,7 @@ OUTPUTFILE=alcareco crabFile=tmp/alcareco.cfg DOTREE=1 DOHIGHETA=0 -WHITELIST="T2_CH,T2_US,T2_IT,T2_DE" NJOBS=100 -NEVENTS_TOTAL=0 usage(){ echo "`basename $0` options" @@ -185,9 +182,6 @@ case $SKIM in esac -#get total n events in dataset -#NEVENTS_TOTAL=`das_client.py --query="dataset=$DATASETPATH | grep dataset.nevents" --limit=0` - #Setting the ENERGY variable setEnergy $DATASETPATH @@ -203,16 +197,13 @@ if [ "$RUNRANGE" == "allRange" -o "`echo $RUNRANGE |grep -c -P '[0-9]+-[0-9]+'`" fi # make argument.xml file if do MC -if [ "$TYPE" == "ALCARECOSIM" ] && [ -n "${CREATE}" ];then - makeArgumentsWithDataPath.sh -d ${DATASETPATH} -n ${NJOBS} -o _tmp_argument.xml - #redefine the NJOBS - NJOBS=`grep "" _tmp_argument.xml | wc -l` -fi +#if [ "$TYPE" == "ALCARECOSIM" ] && [ -n "${CREATE}" ];then +# makeArgumentsWithDataPath.sh -d ${DATASETPATH} -n ${NJOBS} -o _tmp_argument.xml +# #redefine the NJOBS +# NJOBS=`grep "" _tmp_argument.xml | wc -l` +#fi -user=`whoami` -cert=`ls -l /tmp/x509* | grep ${user} | awk {'print $9'}` - #============================== cat > ${crabFile} <> ${crabFile} <> ${crabFile} <> ${crabFile} <> ${crabFile} <> tmp/alcareco.cfg <> ${crabFile} <> ${crabFile} <> ${crabFile} <> ${crabFile} <> ${crabFile} <0 {next} 1 ' ${UI_WORKING_DIR}/job/CMSSW.sh > _tmp_CMSSW.sh - chmod +x _tmp_CMSSW.sh - mv _tmp_CMSSW.sh ${UI_WORKING_DIR}/job/CMSSW.sh + #awk ' /file_list=\"\"/ &&c++>0 {next} 1 ' ${UI_WORKING_DIR}/job/CMSSW.sh > _tmp_CMSSW.sh + #chmod +x _tmp_CMSSW.sh + #mv _tmp_CMSSW.sh ${UI_WORKING_DIR}/job/CMSSW.sh fi if [ -n "$SUBMIT" ]; then @@ -347,11 +333,11 @@ if [ -n "${CHECK}" ];then echo "[STATUS] Unfinished ${UI_WORKING_DIR}" # elif [ "$TYPE" == "ALCARECOSIM" ];then # mergeOutput.sh -u ${UI_WORKING_DIR} -g PUDumper --noRemove --merged_remote_dir=/afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/ - fi + #fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" - #else - # mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE} - #fi + else + mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE} + fi fi ################ diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index b975d30aac8..183bc764503 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -86,9 +86,6 @@ setEnergy(){ *Summer12*) ENERGY=8TeV ;; - *13TeV*) - ENERGY=13TeV - ;; *8TeV*) ENERGY=8TeV ;; diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 348b6043976..b94aa9b27ee 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -329,7 +329,7 @@ cat >> tmp/crab.cfg < - -# + - diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index 45195a06a17..201cc5ab206 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -2,14 +2,11 @@ zNtupleDumper = cms.EDAnalyzer('ZNtupleDumper', jsonFileName = cms.string(""), - #ZCandidateCollection = cms.InputTag('zCandidateProducer'), electronCollection = cms.InputTag('patElectrons'), - PhotonCollection = cms.InputTag("photons"), #recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB"), #recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE"), recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits"), recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits"), - EBSuperClusterCollection = cms.InputTag("correctedHybridSuperClusters"), EESuperClusterCollection = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower"), rhoFastJet = cms.InputTag('kt6PFJetsForRhoCorrection',"rho"), vertexCollection = cms.InputTag('offlinePrimaryVertices'), diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 2854b581df8..8991f68e9be 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -155,9 +155,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { private: //------------------------------ Handles edm::Handle > electronsHandle; - edm::Handle PhotonsHandle; - edm::Handle> EBSuperClustersHandle; - edm::Handle> EESuperClustersHandle; + edm::Handle> EESuperClustersHandle; //used only for high-eta edm::Handle bsHandle; edm::Handle primaryVertexHandle; edm::ESHandle topologyHandle; @@ -174,11 +172,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::InputTag BeamSpotTAG; // input tag for electrons edm::InputTag electronsTAG; - edm::InputTag PhotonsTAG; - edm::InputTag ZCandidateTAG; edm::InputTag recHitCollectionEBTAG; edm::InputTag recHitCollectionEETAG; - edm::InputTag EBSuperClustersTAG; edm::InputTag EESuperClustersTAG; // input rho edm::InputTag rhoTAG; @@ -220,9 +215,6 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t nPV; ///< nVtx Int_t nPU[5]; //[nBX] ///< number of PU (filled only for MC) - // ZStat, 1: both electrons are pat Electrons, 2: one pat electron one SuperCluster - Int_t ZStat; - // selection Int_t eleID[2]; ///< bit mask for eleID: 1=fiducial, 2=loose, 6=medium, 14=tight, 16=WP90PU, 48=WP80PU. Selection from https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaCutBasedIdentification#Electron_ID_Working_Points @@ -386,7 +378,6 @@ class ZNtupleDumper : public edm::EDAnalyzer { void TreeSetSingleElectronVar(const reco::SuperCluster& electron1, int index); void TreeSetDiElectronVar(const pat::Electron& electron1, const pat::Electron& electron2); void TreeSetDiElectronVar(const pat::Electron& electron1, const reco::SuperCluster& electron2); - DetId findSCseed(const reco::SuperClusterRef& cluster); DetId findSCseed(const reco::SuperCluster& cluster); void InitExtraCalibTree(void); @@ -441,11 +432,8 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): vtxCollectionTAG(iConfig.getParameter("vertexCollection")), BeamSpotTAG(iConfig.getParameter("BeamSpotCollection")), electronsTAG(iConfig.getParameter("electronCollection")), - PhotonsTAG(iConfig.getParameter("PhotonCollection")), - // ZCandidateTAG(iConfig.getParameter("ZCandidateCollection")), recHitCollectionEBTAG(iConfig.getParameter("recHitCollectionEB")), recHitCollectionEETAG(iConfig.getParameter("recHitCollectionEE")), - EBSuperClustersTAG(iConfig.getParameter("EBSuperClusterCollection")), EESuperClustersTAG(iConfig.getParameter("EESuperClusterCollection")), rhoTAG(iConfig.getParameter("rhoFastJet")), conversionsProducerTAG(iConfig.getParameter("conversionCollection")), @@ -514,14 +502,14 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe //------------------------------ HLT iEvent.getByLabel(triggerResultsTAG, triggerResultsHandle); + //------------------------------ + clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, + recHitCollectionEETAG); + //------------------------------ electrons iEvent.getByLabel(electronsTAG, electronsHandle); - //------------------------------ photons - iEvent.getByLabel(PhotonsTAG, PhotonsHandle); - - //------------------------------ SuperClusters - iEvent.getByLabel(EBSuperClustersTAG, EBSuperClustersHandle); + //------------------------------ SuperClusters (for high Eta studies) iEvent.getByLabel(EESuperClustersTAG, EESuperClustersHandle); // for conversions with full vertex fit @@ -537,6 +525,11 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetEventSummaryVar(iEvent); TreeSetPileupVar(); // this can be filled once per event + + if(doPdfSystTree && isMC){ + TreeSetPdfSystVar(iEvent); + } + // at least one of the triggers HLTfire=false; @@ -562,49 +555,11 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } } - // number of pat Electrons and SuperClusters - int NPatEles = (int)electronsHandle->size(); + // count electrons: needed to avoid double counting events in Wenu and Zee samples + // in Wenu is required ONLY ONE tight electron + // in Zee at least two loose electrons + // in particle gun case, the matching with the gen particle is required - // number of High Eta SuperClusters - int NHighEtaSCs = 0; - if (doHighEta) { - for( reco::SuperClusterCollection::const_iterator eleIter1 = EESuperClustersHandle->begin(); - eleIter1 != EESuperClustersHandle->end(); - eleIter1++){ - if (fabs(eleIter1->eta())>doHighEta_LowerEtaCut) { - NHighEtaSCs++; - } - } - } - - // number of HighEta Photons - int NHighEtaPhotons = 0; - if (doHighEta) { - for( reco::PhotonCollection::const_iterator eleIter1 = PhotonsHandle->begin(); - eleIter1 != PhotonsHandle->end(); - eleIter1++){ - if (fabs(eleIter1->superCluster()->eta()) > doHighEta_LowerEtaCut ) { - NHighEtaPhotons++; - } - } - } - - // at least one Pat::Electron - if (NPatEles<1) return; - - // at least two EM particles if doHighEta - //if (doHighEta && (NPatEles+NHighEtaSCs)<2) return; - if (doHighEta && (NPatEles+NHighEtaPhotons)<2) return; - - // at least two pat Electrons if not do HighEta and not isWenu - if (!doHighEta && !isWenu && NPatEles<2 ) return; - - // move the clustertools initialization here after protections - //------------------------------ - clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, - recHitCollectionEETAG); - - // count electrons int nWP70 = 0; //only WP70 int nWP90 = 0; //only WP90 for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); @@ -659,161 +614,44 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } } else if (doHighEta&&!isWenu) { - // let's always only take 2 - //_tnPar = 2; - - + //leading pt electron in EB (patElectrons should be pt-ordered) // iterators storing pat Electons and HighEta SCs pat::ElectronCollection::const_iterator PatEle1(NULL); - pat::ElectronCollection::const_iterator PatEle2(NULL); - - // iterators storing HighEta SCs - reco::SuperClusterCollection::const_iterator HighEtaSC1(NULL); - reco::SuperClusterCollection::const_iterator HighEtaSC2(NULL); - - // iterators storing HighEta Photons - reco::PhotonCollection::const_iterator Photon1(NULL); - reco::PhotonCollection::const_iterator Photon2(NULL); - - - // - // number of high pT (>20GeV) Electrons - int NHighPtPatEles=0; - int NHighPtHighEtaSCs=0; - int NHighPtHighEtaPhotons=0; - - // look for 2 leading pT pat electrons - // leading - double maxpT(-10000.0); - for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); - eleIter1 != electronsHandle->end(); + for( PatEle1 = electronsHandle->begin(); + eleIter1 != electronsHandle->end() && !eleIter1->isEB(); eleIter1++){ - if (eleIter1->pt() > maxpT && eleIter1->pt()>20.0) { - maxpT = eleIter1->pt(); - PatEle1 = eleIter1; - NHighPtPatEles++; - } - } - - // next leading - if (NPatEles>1) { - maxpT = -100000.0; - for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); - eleIter1 != electronsHandle->end(); - eleIter1++){ - if (eleIter1 == PatEle1) continue; - if (eleIter1->pt() > maxpT&& eleIter1->pt()>20.0) { - maxpT = eleIter1->pt(); - PatEle2 = eleIter1; - NHighPtPatEles++; - } - } - } - - // look for 2 leading HighEta photons - // leading - if (NHighEtaSCs>0) { - maxpT = -10000.0; - for( reco::SuperClusterCollection::const_iterator eleIter1 = EESuperClustersHandle->begin(); - eleIter1 != EESuperClustersHandle->end(); - eleIter1++){ - if (fabs(eleIter1->eta()) < doHighEta_LowerEtaCut) continue; - double pt=eleIter1->energy()*sin(eleIter1->position().theta()); - if (pt > maxpT&&pt>20.0) { - maxpT = pt; - HighEtaSC1 = eleIter1; - NHighPtHighEtaSCs++; - } - } - } - - // next to leading - if (NHighEtaSCs>1) { - maxpT = -10000.0; - for( reco::SuperClusterCollection::const_iterator eleIter1 = EESuperClustersHandle->begin(); - eleIter1 != EESuperClustersHandle->end(); - eleIter1++){ - if (fabs(eleIter1->eta()) < doHighEta_LowerEtaCut) continue; - if (eleIter1 == HighEtaSC1) continue; - double pt=eleIter1->energy()*sin(eleIter1->position().theta()); - if (pt > maxpT&&pt>20.0) { - maxpT = pt; - HighEtaSC2 = eleIter1; - NHighPtHighEtaSCs++; - } - } - } - - // look for 2 leading pT photons - // leading - if (NHighEtaPhotons>0) { - maxpT = -10000.0; - for( reco::PhotonCollection::const_iterator eleIter1 = PhotonsHandle->begin(); - eleIter1 != PhotonsHandle->end(); - eleIter1++){ - if (fabs(eleIter1->superCluster()->eta()) < doHighEta_LowerEtaCut) continue; - if (eleIter1->pt() > maxpT && eleIter1->pt()>20.0) { - maxpT = eleIter1->pt(); - Photon1 = eleIter1; - NHighPtHighEtaPhotons++; - } - } - } - - // next to leading - if (NHighEtaPhotons>1) { - maxpT = -10000.0; - for( reco::PhotonCollection::const_iterator eleIter1 = PhotonsHandle->begin(); - eleIter1 != PhotonsHandle->end(); - eleIter1++){ - if (fabs(eleIter1->superCluster()->eta()) < doHighEta_LowerEtaCut) continue; - if (eleIter1 == Photon1) continue; - if (eleIter1->pt() > maxpT && eleIter1->pt()>20.0) { - maxpT = eleIter1->pt(); - Photon2 = eleIter1; - NHighPtHighEtaPhotons++; - } - } } - //debug - //std::cout << "NHighPtPatEles=" << NHighPtPatEles << "; NHighPtHighEtaSCs=" << NHighPtHighEtaSCs << std::endl; - // make combination and decide if to fill tree - bool filltree=false; - if (NHighPtPatEles>1) { - // if two pat electrons with high pT always use them - float mass=(PatEle1->p4()+PatEle2->p4()).mass(); - if(mass > 55 && mass < 125) { - TreeSetDiElectronVar(*PatEle1, *PatEle2); - if(doExtraCalibTree){ - TreeSetExtraCalibVar(*PatEle1, *PatEle2); - } - filltree=true; - } + // iterators storing HighEta SCs + // select the highest pt SC in the highEta region + reco::SuperClusterCollection::const_iterator HighEtaSC1(NULL); + double HighEtaSCPt=0; + for( reco::SuperClusterCollection::const_iterator iter = EESuperClustersHandle->begin(); + iter!= EESuperClustersHandle->end(); + iter++){ + if (fabs(iter->eta()) < doHighEta_LowerEtaCut) continue; + float mass=(PatEle1->p4()+iter->p4()).mass(); + if((mass < 55 || mass > 125)) continue; + + double pt=iter->energy()/cosh(iter->eta()); + if(HighEtaSCPt0&&NHighPtPatEles==1){ - // if only one pat electron and the Photon is high pT enough, use this too, otherwise do not use. - float mass=(PatEle1->p4()+Photon1->p4()).mass(); - if(mass > 55 && mass < 125) { - TreeSetDiElectronVar(*PatEle1, *(Photon1->superCluster())); - if(doExtraCalibTree){ - TreeSetExtraCalibVar(*PatEle1, *(Photon1->superCluster())); + + if(HighEtaSCPt!=NULL){ + TreeSetDiElectronVar(*PatEle1, *HighEtaSC1); + if(doExtraCalibTree){ + TreeSetExtraCalibVar(*PatEle1, *HighEtaSC1); } - filltree=true; - } } - - - // fill the tree - if (filltree) { - // fill the normal tree - tree->Fill(); - // - if(doExtraCalibTree){ - extraCalibTree->Fill(); - } + // fill the normal tree + tree->Fill(); + // + if(doExtraCalibTree){ + extraCalibTree->Fill(); } - } else { for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); @@ -838,10 +676,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetEleIDVar(*eleIter1, *eleIter1); eleIDTree->Fill(); } - if(doPdfSystTree && isMC){ - TreeSetPdfSystVar(iEvent); - //pdfSystTree->Fill(); - } }else { for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; eleIter2 != electronsHandle->end(); @@ -876,17 +710,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } } } - // // // riempi il tree degli eventi selezionati - // std::cout << "N Zcandidates: " << ZCandidatesCollection->size() << std::endl; - // for( pat::CompositeCandidateCollection::const_iterator ZIter = ZCandidatesCollection.begin(); - // ZIter != ZCandidatesCollection.end(); - // ZIter++){ - // std::cout << "Zcandidate: " << ZIter-ZCandidatesCollection.begin() << std::endl; - // TreeSetDiElectronVar(*ZIter); - // tree->Fill(); - - // } - delete clustertools; return; @@ -1024,9 +847,6 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("eleID",eleID, "eleID[2]/I"); // tree->Branch("nBCSCEle", nBCSCEle, "nBCSCEle[2]/I"); - // ZStat, 1: both are pat electrons, 2: one pat electron one supercluster - tree->Branch("ZStat", &ZStat, "ZStat/I"); - tree->Branch("chargeEle", chargeEle, "chargeEle[2]/I"); //[nEle] tree->Branch("etaSCEle", etaSCEle, "etaSCEle[2]/F"); //[nSCEle] tree->Branch("phiSCEle", phiSCEle, "phiSCEle[2]/F"); //[nSCEle] @@ -1252,8 +1072,6 @@ void ZNtupleDumper::TreeSetDiElectronVar(pat::CompositeCandidate ZEE){ TreeSetDiElectronVar(electron1, electron2); - ZStat=1; - return; } @@ -1278,26 +1096,6 @@ DetId ZNtupleDumper::findSCseed(const reco::SuperCluster& cluster){ return seedDetId; } -DetId ZNtupleDumper::findSCseed(const reco::SuperClusterRef& cluster){ - DetId seedDetId; - float seedEnergy=0; - std::vector< std::pair > hitsFractions = cluster->hitsAndFractions(); - for(std::vector< std::pair >::const_iterator hitsAndFractions_itr = hitsFractions.begin(); - hitsAndFractions_itr != hitsFractions.end(); - hitsAndFractions_itr++){ - if(hitsAndFractions_itr->second > seedEnergy) - seedDetId=hitsAndFractions_itr->first; - } -#ifdef DEBUG - std::cout << "[DEBUG findSCseed] seedDetIt: " << seedDetId.rawId() << std::endl - << *cluster << std::endl - << *(cluster->seed()) << std::endl; -#endif - if(seedDetId.null()){ - std::cerr << "[ERROR] Invalid detID: " << *cluster << std::endl; - } - return seedDetId; -} // a negative index means that the corresponding electron does not exist, fill with 0 void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int index){ @@ -1345,7 +1143,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; if(electron1.isEB() && seedDetId.subdetId() == EcalBarrel){ - EBDetId seedDetIdEcal = seedDetId; seedXSCEle[index]=seedDetIdEcal.ieta(); seedYSCEle[index]=seedDetIdEcal.iphi(); @@ -1504,7 +1301,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 PtEle[index] = electron1.energy()/cosh(electron1.eta()); chargeEle[index] = -100; // dont know the charge for SC - etaEle[index] = electron1.eta(); + etaEle[index] = electron1.eta(); // eta = etaSC phiEle[index] = electron1.phi(); recoFlagsEle[index] = -1; // define -1 as a SC @@ -1524,28 +1321,23 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 seedDetId = findSCseed(electron1); } + EcalRecHitCollection::const_iterator seedRecHit = NULL; if(seedDetId.subdetId() == EcalBarrel){ - EcalRecHitCollection::const_iterator seedRecHit = recHitsEB->find(seedDetId) ; - seedEnergySCEle[index]=seedRecHit->energy(); - if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; - else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; - else gainEle[index]=0; + seedRecHit = recHitsEB->find(seedDetId) ; EBDetId seedDetIdEcal = seedDetId; seedXSCEle[index]=seedDetIdEcal.ieta(); seedYSCEle[index]=seedDetIdEcal.iphi(); }else if(seedDetId.subdetId() == EcalEndcap){ - EcalRecHitCollection::const_iterator seedRecHit = recHitsEE->find(seedDetId) ; + seedRecHit = recHitsEE->find(seedDetId) ; EEDetId seedDetIdEcal = seedDetId; - seedEnergySCEle[index]=seedRecHit->energy(); - if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; - else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; - else gainEle[index]=0; seedXSCEle[index]=seedDetIdEcal.ix(); seedYSCEle[index]=seedDetIdEcal.iy(); - }else{ ///< this case is strange but happens for trackerDriven electrons - seedXSCEle[index]=0; - seedYSCEle[index]=0; - } + }else assert(false); + + seedEnergySCEle[index]=seedRecHit->energy(); + if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; + else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; + else gainEle[index]=0; if(isMC) seedLCSCEle[index]=-10; else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); @@ -1753,8 +1545,6 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const //#endif } - ZStat=1; - return; } diff --git a/initCmsEnv.sh b/initCmsEnv.sh index 0cab28640bd..58755a162b4 100644 --- a/initCmsEnv.sh +++ b/initCmsEnv.sh @@ -3,13 +3,7 @@ source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh eval `scramv1 runtime -sh` source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh -#voms-proxy-init -voms cms -out $HOME/gpi.out -voms-proxy-init -voms cms - -user=`whoami` -cert=`ls -l /tmp/x509* | grep heli | awk {'print $9'}` -cert=`basename $cert` -cp /tmp/$cert $CMSSW_BASE/src/data/ +voms-proxy-init -voms cms -out $HOME/gpi.out #cd calibration/SANDBOX #setenv PATH $PWD/bin:$PATH From 2839b45491e5e844686d75127c514b2f40a13594 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 26 May 2014 12:27:29 +0200 Subject: [PATCH 379/475] changes in alcaSkimming.py --- ALCARAW_RECO/python/alcaSkimming.py | 40 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 4333478170c..d6d24883a17 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -16,7 +16,7 @@ 1, # default Value = true VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.int, # string, int, or float - "change files path in case of local test") + "change files path in case of local test: isCrab=0 if you are running it locally with cmsRun") options.register ('type', "ALCARAW", VarParsing.VarParsing.multiplicity.singleton, @@ -31,7 +31,7 @@ "", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, - "type of skim: ZSkim, WSkim, partGun, fromWSkim (from USER format), EleSkim (at least one electron), HighEtaSkim (for higheta calibration) ''") + "type of skim: ZSkim, WSkim, partGun, fromWSkim (from USER format), EleSkim (at least one electron), ''") options.register('jsonFile', "", VarParsing.VarParsing.multiplicity.singleton, @@ -70,14 +70,11 @@ HLTFilter = False ZSkim = False WSkim = False -ZSCSkim = False if(options.skim=="ZSkim"): ZSkim=True elif(options.skim=="WSkim"): WSkim=True -elif(options.skim=="ZSCSkim"): - ZSCSkim=True elif(options.skim=="fromWSkim"): print "[INFO] producing from WSkim files (USER format)" WSkim=False @@ -367,34 +364,28 @@ from HLTrigger.HLTfilters.hltHighLevel_cfi import * process.NtupleFilter = copy.deepcopy(hltHighLevel) process.NtupleFilter.throw = cms.bool(False) -process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron', +process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZWElectron', 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron' ] process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCARECO") + if(ZSkim): - process.NtupleFilterSeq= cms.Sequence(process.ZeeFilter) + process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) + process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalUncalZElectron', + 'pathALCARECOEcalCalZSCElectron', 'pathALCARECOEcalUncalZSCElectron', + ] + process.zNtupleDumper.isWenu=cms.bool(False) elif(WSkim): #cms.Sequence(~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter) process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalWElectron', 'pathALCARECOEcalUncalWElectron' ] process.zNtupleDumper.isWenu=cms.bool(True) -elif(ZSCSkim): - #process.NtupleFilterSeq= cms.Sequence(~process.ZeeFilter * process.ZSCFilterSeq) - process.NtupleFilterSeq= cms.Sequence(process.ZSCFilterSeq) else: process.NtupleFilterSeq = cms.Sequence() if(options.skim=="partGun"): process.zNtupleDumper.isPartGun = cms.bool(True) -if(options.doTree>0 and options.doHighEta>0): - process.zNtupleDumper.doHighEta=cms.bool(True) - - -#process.NtupleFilter) -#process.filterSeq *= process.NtupleFilter - - ############################### # ECAL Recalibration ############################### @@ -559,10 +550,11 @@ process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) + process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.pdfWeightsSeq * process.ntupleSeq) if(not doTreeOnly): - process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO) + process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO ) if(options.type=="ALCARERECO"): process.ALCARERECOoutput_step = cms.EndPath(process.outputALCARERECO) if(options.type=="ALCARAW"): @@ -647,7 +639,14 @@ process.outputALCARECO.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalZSCElectron') ) - +else: + process.outputALCARAW.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalUncalZSCElectron') + ) + process.outputALCARECO.SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOEcalCalZSCElectron') + ) + if(options.type=='ALCARAW'): process.schedule = cms.Schedule( #process.raw2digi_step,process.L1Reco_step, @@ -738,3 +737,4 @@ ############################ processDumpFile = open('processDump.py', 'w') print >> processDumpFile, process.dumpPython() + From d4814fbc59243059129c0067e9345882d7c19291 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 26 May 2014 12:28:44 +0200 Subject: [PATCH 380/475] isWenu and HighEta taken from HLTResults --- ZNtupleDumper/python/zntupledumper_cfi.py | 1 + ZNtupleDumper/src/ZNtupleDumper.cc | 24 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index 201cc5ab206..df22ab4b0dd 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -14,6 +14,7 @@ conversionCollection = cms.InputTag('allConversions'), metCollection = cms.InputTag('pfMet'), triggerResultsCollection = cms.InputTag('TriggerResults::HLT'), + WZSkimResultsCollection = cms.InputTag('TriggerResults::ALCARECO'), foutName = cms.string("ZShervinNtuple.root"), doStandardTree = cms.bool(True), doExtraCalibTree = cms.bool(False), diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 8991f68e9be..1a2d9adc5d1 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -165,6 +165,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::Handle conversionsHandle; edm::Handle< reco::PFMETCollection > metHandle; edm::Handle triggerResultsHandle; + edm::Handle WZSkimResultsHandle; //------------------------------ Input Tags // input tag for primary vertex @@ -180,6 +181,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::InputTag conversionsProducerTAG; edm::InputTag metTAG; edm::InputTag triggerResultsTAG; + edm::InputTag WZSkimResultsTAG; std::vector< std::string> hltPaths; private: std::string foutName; @@ -439,6 +441,7 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): conversionsProducerTAG(iConfig.getParameter("conversionCollection")), metTAG(iConfig.getParameter("metCollection")), triggerResultsTAG(iConfig.getParameter("triggerResultsCollection")), + WZSkimResultsTAG(iConfig.getParameter("WZSkimResultsCollection")), hltPaths(iConfig.getParameter< std::vector >("hltPaths")), foutName(iConfig.getParameter("foutName")), doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), @@ -501,7 +504,23 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe //------------------------------ HLT iEvent.getByLabel(triggerResultsTAG, triggerResultsHandle); - + iEvent.getByLabel(WZSkimResultsTAG, WZSkimResultsHandle); + + //Check if it is Wenu, Z or ZSC event according to triggerResults + edm::TriggerNames HLTNames_ = iEvent.triggerNames(*WZSkimResultsHandle); + //unsigned int hltCount = triggerResultsHandle->size(); ///\todo bug, wrong size = 444 + unsigned int hltCount=HLTNames_.size(); // should have the same size of WZSkimResultsHandle + for(unsigned int i=0; i < hltCount; i++){ + if(WZSkimResultsHandle->accept(i)){ + std::string hltName_str(HLTNames_.triggerName(i)); + if(hltName_str.find("WElectron")!=std::string::npos) + isWenu=true; + else if(hltName_str.find("ZSCElectron")!=std::string::npos) + isHighEta=true; + // this paths are exclusive, then we can skip the check of the others + break; + } + } //------------------------------ clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, recHitCollectionEETAG); @@ -523,6 +542,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe reco::PFMET met = ((*metHandle))[0]; /// \todo use corrected phi distribution + //Here the HLTBits are filled. TriggerResults TreeSetEventSummaryVar(iEvent); TreeSetPileupVar(); // this can be filled once per event @@ -1011,7 +1031,7 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ int hltCount = triggerResultsHandle->size(); HLTNames[0].clear(); HLTBits.clear(); - for (int i = 0 ; i != hltCount; ++i) { + for (int i = 0 ; i < hltCount; ++i) { std::string hltName_str(HLTNames_.triggerName(i)); (HLTNames[0]).push_back(hltName_str); (HLTResults[0]).push_back(triggerResultsHandle->accept(i)); From 8ed4d1b84171a25d520618b53139cda15932b010 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 26 May 2014 15:40:39 +0200 Subject: [PATCH 381/475] revisioned class, cleaned code, added saving of EE recHits at highEta for SCs --- .../interface/AlCaECALRecHitReducer.h | 24 +- .../python/alCaIsolatedElectrons_cfi.py | 14 +- ALCARAW_RECO/src/AlCaECALRecHitReducer.cc | 235 +++++------------- 3 files changed, 86 insertions(+), 187 deletions(-) diff --git a/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h b/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h index 6db8d0d9650..728019c271b 100644 --- a/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h +++ b/ALCARAW_RECO/interface/AlCaECALRecHitReducer.h @@ -34,6 +34,10 @@ #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" +#include "DataFormats/DetId/interface/DetId.h" +#include "Geometry/CaloTopology/interface/CaloTopology.h" + //PG #include "TH2.h" //PG #include "TFile.h" //PG #include "TCanvas.h" @@ -80,20 +84,26 @@ class AlCaECALRecHitReducer : public edm::EDProducer { edm::InputTag eeRecHitsLabel_; edm::InputTag esRecHitsLabel_; edm::InputTag electronLabel_; + edm::InputTag EESuperClusterCollection_; std::string alcaBarrelHitsCollection_; std::string alcaEndcapHitsCollection_; std::string alcaPreshowerHitsCollection_; int etaSize_; int phiSize_; - float weight_; - int esNstrips_; - int esNcolumns_; + //float weight_; + // int esNstrips_; + //int esNcolumns_; + + // bool selectByEleNum_; + // int minEleNumber_; + // double minElePt_; + double minEta_highEtaSC_; - bool selectByEleNum_; - int minEleNumber_; - double minElePt_; + void AddMiniRecHitCollection(const reco::SuperCluster& sc, + std::set& reducedRecHitMap, + const CaloTopology *caloTopology + ); -//PG TH2F * m_failMap ; }; diff --git a/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py b/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py index a3675bec788..3d243569e4d 100644 --- a/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py +++ b/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py @@ -2,23 +2,25 @@ alCaIsolatedElectrons = cms.EDProducer("AlCaECALRecHitReducer", electronLabel = cms.InputTag("gsfElectrons"), + EESuperClusterCollection = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower"), + minEta_highEtaSC = cms.double(2.4), ebRecHitsLabel = cms.InputTag("reducedEcalRecHitsEB"), eeRecHitsLabel = cms.InputTag("reducedEcalRecHitsEE"), - isUncalib = cms.bool(False), + +# isUncalib = cms.bool(False), phiSize = cms.int32(61), etaSize = cms.int32(15), alcaBarrelHitCollection = cms.string('alcaBarrelHits'), alcaEndcapHitCollection = cms.string('alcaEndcapHits'), # alcaEndcapHitCollection = cms.string('alCaRecHitsEE'), - eventWeight = cms.double(1.0), # in sandboxRereco # ebRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB") # eeRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE") - esRecHitsLabel = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"), - alcaPreshowerHitCollection = cms.string('alcaPreshowerHits'), - esNstrips = cms.int32(20), - esNcolumns = cms.int32(1) +# esRecHitsLabel = cms.InputTag("ecalPreshowerRecHit","EcalRecHitsES"), +# alcaPreshowerHitCollection = cms.string('alcaPreshowerHits'), +# esNstrips = cms.int32(20), +# esNcolumns = cms.int32(1) ) diff --git a/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc b/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc index dcc59f741fd..fcee78e3770 100644 --- a/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc +++ b/ALCARAW_RECO/src/AlCaECALRecHitReducer.cc @@ -6,10 +6,6 @@ #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -#include "DataFormats/EgammaReco/interface/SuperCluster.h" -#include "DataFormats/EcalDetId/interface/EBDetId.h" -#include "DataFormats/EcalDetId/interface/EEDetId.h" -#include "DataFormats/EcalDetId/interface/ESDetId.h" #include "DataFormats/EgammaReco/interface/BasicCluster.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" @@ -19,8 +15,7 @@ #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h" #include "FWCore/Framework/interface/ESHandle.h" -#include "Geometry/CaloTopology/interface/CaloTopology.h" -#include "Geometry/CaloTopology/interface/EcalBarrelTopology.h" +//#include "Geometry/CaloTopology/interface/EcalBarrelTopology.h" //#define ALLrecHits //#define DEBUG @@ -35,9 +30,12 @@ AlCaECALRecHitReducer::AlCaECALRecHitReducer(const edm::ParameterSet& iConfig) eeRecHitsLabel_ = iConfig.getParameter< edm::InputTag > ("eeRecHitsLabel"); // esRecHitsLabel_ = iConfig.getParameter< edm::InputTag > ("esRecHitsLabel"); electronLabel_ = iConfig.getParameter< edm::InputTag > ("electronLabel"); + EESuperClusterCollection_ = iConfig.getParameter< edm::InputTag>("EESuperClusterCollection"); + minEta_highEtaSC_ = iConfig.getParameter< double >("minEta_highEtaSC"); alcaBarrelHitsCollection_ = iConfig.getParameter("alcaBarrelHitCollection"); alcaEndcapHitsCollection_ = iConfig.getParameter("alcaEndcapHitCollection"); + // alcaPreshowerHitsCollection_ = iConfig.getParameter("alcaPreshowerHitCollection"); etaSize_ = iConfig.getParameter ("etaSize"); @@ -46,8 +44,6 @@ AlCaECALRecHitReducer::AlCaECALRecHitReducer(const edm::ParameterSet& iConfig) if ( phiSize_ % 2 == 0 || etaSize_ % 2 == 0) edm::LogError("AlCaECALRecHitReducerError") << "Size of eta/phi should be odd numbers"; - weight_= iConfig.getParameter ("eventWeight"); - // esNstrips_ = iConfig.getParameter ("esNstrips"); // esNcolumns_ = iConfig.getParameter ("esNcolumns"); @@ -55,7 +51,6 @@ AlCaECALRecHitReducer::AlCaECALRecHitReducer(const edm::ParameterSet& iConfig) produces< EBRecHitCollection > (alcaBarrelHitsCollection_) ; produces< EERecHitCollection > (alcaEndcapHitsCollection_) ; // produces< ESRecHitCollection > (alcaPreshowerHitsCollection_) ; - produces< double > ("weight") ; } @@ -84,42 +79,30 @@ AlCaECALRecHitReducer::produce (edm::Event& iEvent, // Get GSFElectrons Handle pElectrons; iEvent.getByLabel(electronLabel_, pElectrons); - if (!pElectrons.isValid()) { - edm::LogError ("reading") << electronLabel_ << " not found" ; - // std::cerr << "[AlCaECALRecHitReducer]" << electronLabel_ << " not found" ; - return ; - } + //if (!pElectrons.isValid()) return ; - const reco::GsfElectronCollection * electronCollection = - pElectrons.product(); + const reco::GsfElectronCollection * electronCollection = pElectrons.product(); // get RecHits Handle barrelRecHitsHandle; - bool barrelIsFull = true ; - iEvent.getByLabel(ebRecHitsLabel_,barrelRecHitsHandle); - if (!barrelRecHitsHandle.isValid()) { - edm::LogError ("reading") << ebRecHitsLabel_ << " not found" ; - barrelIsFull = false ; - } +// if (!barrelRecHitsHandle.isValid()) { +// edm::LogError ("reading") << ebRecHitsLabel_ << " not found" ; +// barrelIsFull = false ; +// } - const EBRecHitCollection * barrelHitsCollection = 0 ; - if (barrelIsFull) - barrelHitsCollection = barrelRecHitsHandle.product () ; + const EBRecHitCollection *barrelHitsCollection = barrelRecHitsHandle.product () ; // get RecHits - Handle endcapRecHitsHandle; - bool endcapIsFull = true ; - + Handle endcapRecHitsHandle; iEvent.getByLabel(eeRecHitsLabel_,endcapRecHitsHandle); - if (!endcapRecHitsHandle.isValid()) { - edm::LogError ("reading") << eeRecHitsLabel_ << " not found" ; - endcapIsFull = false ; - } +// if (!endcapRecHitsHandle.isValid()) { +// edm::LogError ("reading") << eeRecHitsLabel_ << " not found" ; +// endcapIsFull = false ; +// } - const EERecHitCollection * endcapHitsCollection = 0 ; - if (endcapIsFull) - endcapHitsCollection = endcapRecHitsHandle.product () ; + const EERecHitCollection *endcapHitsCollection = endcapRecHitsHandle.product () ; + // const EERecHitCollection * endcapHitsCollection = endcapRecHitsHandle.product(); // // get ES RecHits @@ -139,179 +122,83 @@ AlCaECALRecHitReducer::produce (edm::Event& iEvent, // // make a vector to store the used ES rechits: // set used_strips; // used_strips.clear(); + + Handle EESCHandle; + iEvent.getByLabel(EESuperClusterCollection_, EESCHandle); //Create empty output collections std::auto_ptr< EBRecHitCollection > miniEBRecHitCollection (new EBRecHitCollection) ; std::auto_ptr< EERecHitCollection > miniEERecHitCollection (new EERecHitCollection) ; // std::auto_ptr< ESRecHitCollection > miniESRecHitCollection (new ESRecHitCollection) ; - std::auto_ptr< double > weight (new double(1)); - (*weight) = weight_; - - // loop on SiStrip Electrons - - reco::GsfElectronCollection::const_iterator eleIt; - int nEle_EB=0; - int nEle_EE=0; std::set reducedRecHit_EBmap; std::set reducedRecHit_EEmap; - for (eleIt=electronCollection->begin(); eleIt!=electronCollection->end(); eleIt++) { + + for (reco::GsfElectronCollection::const_iterator eleIt=electronCollection->begin(); eleIt!=electronCollection->end(); eleIt++) { // barrel const reco::SuperCluster& sc = *(eleIt->superCluster()) ; if (eleIt->isEB()) { - nEle_EB++; - - // find the seed - EBDetId seed=(sc.seed()->seed()); - - std::vector recHit_window = caloTopology->getWindow(seed, phiSize_, etaSize_); - for(unsigned int i =0; i < recHit_window.size(); i++){ -#ifdef DEBUG2 - std::cout << i << "/" << recHit_window.size() << "\t" << recHit_window[i]() << std::endl; -#endif - reducedRecHit_EBmap.insert(recHit_window[i]); -#ifdef DEBUG2 - EBDetId ebrechit(recHit_window[i]); - std::cout << ebrechit.ieta() << "\t" << ebrechit.iphi() << std::endl; -#endif - } - -#ifdef DEBUG - // find the most energetic crystal - float energy_recHit_max=-999; - - if(reducedRecHit_EBmap.size() < sc.size()) - std::cerr << "[WARNING] number of recHit in selected window < RECO SC recHits!" << std::endl; -#endif - -#ifndef QUICK - const std::vector< std::pair > & scHits = sc.hitsAndFractions(); - -#ifdef DEBUG - std::vector< std::pair >::const_iterator scHit_max_itr = scHits.end(); -#endif - for(std::vector< std::pair >::const_iterator scHit_itr = scHits.begin(); - scHit_itr != scHits.end(); scHit_itr++){ - // the map fills just one time (avoiding double insert of recHits) - reducedRecHit_EBmap.insert(scHit_itr->first); - -#ifdef DEBUG2 - const EcalRecHit ecalRecHit = *(barrelHitsCollection->find( (*scHit_itr).first )); - if(energy_recHit_max < ecalRecHit.energy()){ - scHit_max_itr = scHit_itr; - energy_recHit_max=ecalRecHit.energy(); - } -#endif - } -#endif - -#ifdef DEBUG2 - // cross check, the seed should be the highest energetic crystal in the SC - if(EBDetId(scHit_max_itr->first) != seed) - std::cerr << "[ERROR] highest energetic crystal is not the seed of the SC" << std::endl; - - else{ - - std::cout << "[DEBUG] highest energetic crystal = " << EBDetId(scHit_max_itr->first) << std::endl; - std::cout << "[DEBUG] seed of the SC = " << seed << std::endl; - } -#endif - // (id, phi, eta) - - if(reducedRecHit_EBmap.size() < sc.size()){ - if(eleIt->ecalDrivenSeed()) - edm::LogError("AlCaSavedRecHitsEB") << "[ERROR] ecalDrivenSeed: number of saved recHits < RECO SC recHits!: " << reducedRecHit_EBmap.size() << " < " << sc.size() << std::endl; - else - edm::LogWarning("AlCaSavedRecHitsEB") << "[WARNING] trackerDrivenSeed: number of saved recHits < RECO SC recHits!: " << reducedRecHit_EBmap.size() << " < " << sc.size() << std::endl; - - } - + AddMiniRecHitCollection(sc, reducedRecHit_EBmap, caloTopology); } else { // endcap - nEle_EE++; - - // find the seed - EEDetId seed=(sc.seed()->seed()); - - // get detId for a window around the seed of the SC - int sideSize = std::max(phiSize_,etaSize_); - std::vector recHit_window = caloTopology->getWindow(seed, sideSize, sideSize); - - // fill the recHit map with the DetId of the window - for(std::vector::const_iterator window_itr = recHit_window.begin(); - window_itr != recHit_window.end(); window_itr++){ - reducedRecHit_EEmap.insert(*window_itr); - } -#ifdef DEBUG - if(reducedRecHit_EEmap.size() < sc.size()) - std::cerr << "[WARNING] number of recHit in selected window < RECO SC recHits!" << std::endl; -#endif - - const std::vector< std::pair > & scHits = sc.hitsAndFractions(); - -#ifndef QUICK - // fill the recHit map with the DetId of the SC recHits - - for(std::vector< std::pair >::const_iterator scHit_itr = scHits.begin(); - scHit_itr != scHits.end(); scHit_itr++){ - // the map fills just one time (avoiding double insert of recHits) - reducedRecHit_EEmap.insert(scHit_itr->first); - - } -#endif - - if(reducedRecHit_EEmap.size() < sc.size()){ - if(eleIt->ecalDrivenSeed()) - edm::LogError("AlCaSavedRecHitsEE") << "[ERROR] ecalDrivenSeed: number of saved recHits < RECO SC recHits!: " << reducedRecHit_EEmap.size() << " < " << sc.size() << std::endl; - else - edm::LogWarning("AlCaSavedRecHitsEE") << "[WARNING] trackerDrivenSeed: number of saved recHits < RECO SC recHits!: " << reducedRecHit_EEmap.size() << " < " << sc.size() << std::endl; + AddMiniRecHitCollection(sc, reducedRecHit_EEmap, caloTopology); + } // end of endcap + } - } - } // end of endcap + //saving recHits for highEta SCs for highEta studies + for(reco::SuperClusterCollection::const_iterator SC_iter = EESCHandle->begin(); + SC_iter!=EESCHandle->end(); + SC_iter++){ + if(fabs(SC_iter->eta()) < minEta_highEtaSC_) continue; + AddMiniRecHitCollection(*SC_iter, reducedRecHit_EEmap, caloTopology); } -#ifndef ALLrecHits + //------------------------------ fill the alcareco reduced recHit collection for(std::set::const_iterator itr = reducedRecHit_EBmap.begin(); itr != reducedRecHit_EBmap.end(); itr++){ if (barrelHitsCollection->find(*itr) != barrelHitsCollection->end()) miniEBRecHitCollection->push_back(*(barrelHitsCollection->find(*itr))); } -#else - for(EcalRecHitCollection::const_iterator recHits_itr = barrelHitsCollection->begin(); - recHits_itr != barrelHitsCollection->end(); - recHits_itr++){ - miniEBRecHitCollection->push_back(*recHits_itr); - } -#endif - // fill the alcareco reduced recHit collection for(std::set::const_iterator itr = reducedRecHit_EEmap.begin(); itr != reducedRecHit_EEmap.end(); itr++){ if (endcapHitsCollection->find(*itr) != endcapHitsCollection->end()) miniEERecHitCollection->push_back(*(endcapHitsCollection->find(*itr))); } + //--------------------------------------- Put selected information in the event + iEvent.put( miniEBRecHitCollection,alcaBarrelHitsCollection_ ); + iEvent.put( miniEERecHitCollection,alcaEndcapHitsCollection_ ); + // iEvent.put( miniESRecHitCollection,alcaPreshowerHitsCollection_ ); +} +void AlCaECALRecHitReducer::AddMiniRecHitCollection(const reco::SuperCluster& sc, + std::set& reducedRecHitMap, + const CaloTopology *caloTopology + ){ + DetId seed=(sc.seed()->seed()); + int phiSize=phiSize_, etaSize=etaSize_; + if(seed.subdetId()!=EcalBarrel){ // if not EB, take a square window + etaSize= std::max(phiSize_,etaSize_); + phiSize=etaSize; + } -#ifdef DEBUG - std::cout << "nEle_EB= " << nEle_EB << "\tnEle_EE = " << nEle_EE << std::endl; - if(nEle_EB > 0 && miniEBRecHitCollection->size() < (unsigned int) phiSize_*etaSize_) - edm::LogError("AlCaECALRecHitReducerError") << "Size EBRecHitCollection < " << phiSize_*etaSize_ << ": " << miniEBRecHitCollection->size() ; + std::vector recHit_window = caloTopology->getWindow(seed, phiSize, etaSize); + for(unsigned int i =0; i < recHit_window.size(); i++){ + reducedRecHitMap.insert(recHit_window[i]); + } - int side = phiSize_ ; - if (phiSize_ < etaSize_) side = etaSize_ ; + const std::vector< std::pair > & scHits = sc.hitsAndFractions(); + for(std::vector< std::pair >::const_iterator scHit_itr = scHits.begin(); + scHit_itr != scHits.end(); scHit_itr++){ + // the map fills just one time (avoiding double insert of recHits) + reducedRecHitMap.insert(scHit_itr->first); + } - if(nEle_EE > 0 && miniEERecHitCollection->size() < (unsigned int )side*side) - edm::LogError("AlCaECALRecHitReducerError") << "Size EERecHitCollection < " << side*side << ": " << miniEERecHitCollection->size() ; -#endif - - //Put selected information in the event - iEvent.put( miniEBRecHitCollection,alcaBarrelHitsCollection_ ); - iEvent.put( miniEERecHitCollection,alcaEndcapHitsCollection_ ); - // iEvent.put( miniESRecHitCollection,alcaPreshowerHitsCollection_ ); - iEvent.put( weight, "weight"); + + return; } From 841ca438cd834ecb04d9d9db4f8ae865458ea4c1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 26 May 2014 15:43:53 +0200 Subject: [PATCH 382/475] ZNtupleDumper code cleaning --- ZNtupleDumper/src/ZNtupleDumper.cc | 216 +++++++++++++---------------- 1 file changed, 98 insertions(+), 118 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 1a2d9adc5d1..344309a0a61 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -375,7 +375,6 @@ class ZNtupleDumper : public edm::EDAnalyzer { TFile *tree_file; void InitNewTree(void); - void TreeSetDiElectronVar(pat::CompositeCandidate ZEE); void TreeSetSingleElectronVar(const pat::Electron& electron1, int index); void TreeSetSingleElectronVar(const reco::SuperCluster& electron1, int index); void TreeSetDiElectronVar(const pat::Electron& electron1, const pat::Electron& electron2); @@ -429,7 +428,7 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): // isMC(iConfig.getParameter("isMC")), isWenu(iConfig.getParameter("isWenu")), isPartGun(iConfig.getParameter("isPartGun")), - doHighEta(iConfig.getParameter("doHighEta")), + doHighEta(false), doHighEta_LowerEtaCut(iConfig.getParameter("doHighEta_LowerEtaCut")), vtxCollectionTAG(iConfig.getParameter("vertexCollection")), BeamSpotTAG(iConfig.getParameter("BeamSpotCollection")), @@ -516,7 +515,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(hltName_str.find("WElectron")!=std::string::npos) isWenu=true; else if(hltName_str.find("ZSCElectron")!=std::string::npos) - isHighEta=true; + doHighEta=true; // this paths are exclusive, then we can skip the check of the others break; } @@ -580,23 +579,18 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // in Zee at least two loose electrons // in particle gun case, the matching with the gen particle is required - int nWP70 = 0; //only WP70 - int nWP90 = 0; //only WP90 + int nWP70 = 0; //only WP70 + int nMedium = 0; //passing medium eleID + int nWP90 = 0; //only WP90 for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); eleIter1++){ - if( eleIter1->electronID("tight") ) - { - ++nWP70; - continue; - } - if( eleIter1->electronID("loose") ) - { - ++nWP90; - continue; - } + if( eleIter1->electronID("tight") ) ++nWP70; + else if( eleIter1->electronID("medium") ) ++nMedium; + else if( eleIter1->electronID("loose") ) ++nWP90; } - + + bool doFill=false; if(isPartGun){ pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); pat::ElectronCollection::const_iterator eleIter2 = eleIter1; @@ -622,58 +616,82 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe //if one electron matching the gen particles then eleIter2 = eleIter1 //else we have two electrons TreeSetDiElectronVar(*eleIter1, *eleIter2); - tree->Fill(); + doFill=true; if(doExtraCalibTree){ TreeSetExtraCalibVar(*eleIter1, *eleIter2); - extraCalibTree->Fill(); } if(doEleIDTree){ TreeSetEleIDVar(*eleIter1, *eleIter2); - eleIDTree->Fill(); - } - } else if (doHighEta&&!isWenu) { - + } else if (doHighEta) { + //leading pt electron in EB (patElectrons should be pt-ordered) // iterators storing pat Electons and HighEta SCs - pat::ElectronCollection::const_iterator PatEle1(NULL); - for( PatEle1 = electronsHandle->begin(); - eleIter1 != electronsHandle->end() && !eleIter1->isEB(); - eleIter1++){ - } - + pat::ElectronCollection::const_iterator PatEle1 = electronsHandle->begin(); // iterators storing HighEta SCs // select the highest pt SC in the highEta region - reco::SuperClusterCollection::const_iterator HighEtaSC1(NULL); - double HighEtaSCPt=0; - for( reco::SuperClusterCollection::const_iterator iter = EESuperClustersHandle->begin(); + reco::SuperClusterCollection::const_iterator HighEtaSC1 = EESuperClustersHandle->end(); + + for( PatEle1 = electronsHandle->begin(); + //stop when HighEtaSC1 is a valid SC (this means that there is a pair matching the Z mass + PatEle1 != electronsHandle->end(); + PatEle1++){ + + // consider electrons passing at least the loose identification + if(!PatEle1->electronID("loose") ) continue; + + // take the highest pt tight electrons if it exists (the collection is ordered in pt) + // consider only the electrons passing the tightest electron identification + if(nWP70>0){ // if there are tight electrons, consider only those + if(!PatEle1->electronID("tight") ) continue; + }else if(nMedium>0){ // if there are only medium electrons, consider only those + if(!PatEle1->electronID("medium") ) continue; + } + + // you have the first electrons candidate satifying the electrons criteria + // now look for a SC matching the Z invariant mass. If not SC is found, let's look to another electrons candidate + + double HighEtaSCPt=0; + double t1=TMath::Exp(-PatEle1->eta()); + double t1q = t1*t1; + for( reco::SuperClusterCollection::const_iterator iter = EESuperClustersHandle->begin(); iter!= EESuperClustersHandle->end(); iter++){ + // only SCs in the high eta region if (fabs(iter->eta()) < doHighEta_LowerEtaCut) continue; - float mass=(PatEle1->p4()+iter->p4()).mass(); + + //calculate the invariant mass + double t2=TMath::Exp(-iter->eta()); + double t2q = t2*t2; + double angle=1- + ( (1-t1q)*(1-t2q)+4*t1*t2*cos(PatEle1->phi()-iter->phi()))/( + (1+t1q)*(1+t2q) + ); + float mass = sqrt(2*PatEle1->energy()*iter->energy() *angle); if((mass < 55 || mass > 125)) continue; + //take the highest pt SC matching the Z mass double pt=iter->energy()/cosh(iter->eta()); if(HighEtaSCPtend()) break; } - - if(HighEtaSCPt!=NULL){ + + // if you have found an ele-SC pair matching the high eta criteria, + // save the event in the tree + if(HighEtaSC1!= EESuperClustersHandle->end()){ + doFill=true; TreeSetDiElectronVar(*PatEle1, *HighEtaSC1); if(doExtraCalibTree){ - TreeSetExtraCalibVar(*PatEle1, *HighEtaSC1); - } - } - // fill the normal tree - tree->Fill(); - // - if(doExtraCalibTree){ - extraCalibTree->Fill(); + TreeSetExtraCalibVar(*PatEle1, *HighEtaSC1); + } } + } else { - for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); eleIter1++){ @@ -685,16 +703,14 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if( met.et() < 25. ) continue; if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 50. ) continue; if( eleIter1->et()<30) continue; - + + doFill=true; TreeSetDiElectronVar(*eleIter1, *eleIter1); - tree->Fill(); if(doExtraCalibTree){ TreeSetExtraCalibVar(*eleIter1, *eleIter1); - extraCalibTree->Fill(); } if(doEleIDTree){ TreeSetEleIDVar(*eleIter1, *eleIter1); - eleIDTree->Fill(); } }else { for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; @@ -703,24 +719,17 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // should exit when eleIter1 == end-1 //if(! eleIter2->electronID("loose") ) continue; - //pat::CompositeCandidate zeeCandidate; - //if(! (eleIter1->electronID("WP90PU") && eleIter1->electronID("fiducial"))) continue; - //if(! (eleIter2->electronID("WP90PU") && eleIter2->electronID("fiducial"))) continue; - //zeeCandidate.addDaughter(*eleIter1, "electron1"); - //zeeCandidate.addDaughter(*eleIter2, "electron2"); float mass=(eleIter1->p4()+eleIter2->p4()).mass(); if((mass < 55 || mass > 125)) continue; - // ZCandidatesCollection.push_back(zeeCandidate); + doFill=true; TreeSetDiElectronVar(*eleIter1, *eleIter2); - tree->Fill(); + if(doExtraCalibTree){ TreeSetExtraCalibVar(*eleIter1, *eleIter2); - extraCalibTree->Fill(); } if(doEleIDTree){ TreeSetEleIDVar(*eleIter1, *eleIter2); - eleIDTree->Fill(); } if(doPdfSystTree && isMC){ TreeSetPdfSystVar(iEvent); @@ -730,9 +739,15 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } } } + + if(doFill){ + tree->Fill(); + if(doExtraCalibTree) extraCalibTree->Fill(); + if(doEleIDTree) eleIDTree->Fill(); + } delete clustertools; return; - + } @@ -1081,19 +1096,6 @@ void ZNtupleDumper::TreeSetPileupVar(void){ } -void ZNtupleDumper::TreeSetDiElectronVar(pat::CompositeCandidate ZEE){ - - - const pat::Electron *electron1_p=dynamic_cast(&(*(ZEE.begin()))); - const pat::Electron *electron2_p=dynamic_cast(&(*(ZEE.begin()+1))); - - const pat::Electron& electron1=*electron1_p; - const pat::Electron& electron2=*electron2_p; - - TreeSetDiElectronVar(electron1, electron2); - - return; -} DetId ZNtupleDumper::findSCseed(const reco::SuperCluster& cluster){ DetId seedDetId; @@ -1128,9 +1130,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int return; } - //checks - - PtEle[index] = electron1.et(); chargeEle[index] = electron1.charge(); etaEle[index] = electron1.eta(); // degli elettroni @@ -1148,20 +1147,15 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int phiSCEle[index] = electron1.superCluster()->phi(); const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); - + //assert(recHits!=NULL); const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); DetId seedDetId = electron1.superCluster()->seed()->seed(); if(seedDetId.null()){ - if(electron1.trackerDrivenSeed()) seedDetId = findSCseed(electron1.superCluster()); - else{ - // std::cout << "[ERROR] No SC seed found for ecalDrivenElectron" << electron1.superCluster() << std::endl; - exit(1); - } + //assert(electron1.trackerDrivenSeed()); // DEBUG + seedDetId = findSCseed(*(electron1.superCluster())); } - EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; - if(electron1.isEB() && seedDetId.subdetId() == EcalBarrel){ EBDetId seedDetIdEcal = seedDetId; seedXSCEle[index]=seedDetIdEcal.ieta(); @@ -1175,6 +1169,8 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int seedYSCEle[index]=0; } + EcalRecHitCollection::const_iterator seedRecHit = recHits->find(seedDetId) ; + //assert(seedRecHit!=recHits->end()); // DEBUG seedEnergySCEle[index]=seedRecHit->energy(); if(isMC) seedLCSCEle[index]=-10; else seedLCSCEle[index]=laserHandle_->getLaserCorrection(seedDetId,runTime_); @@ -1191,6 +1187,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int detitr != hitsAndFractions_ele1.end(); detitr++ ) { EcalRecHitCollection::const_iterator oneHit = recHits->find( (detitr -> first) ) ; + //assert(oneHit!=recHits->end()); // DEBUG sumLC_E += laserHandle_->getLaserCorrection(detitr->first, runTime_) * oneHit->energy(); sumE += oneHit->energy(); } @@ -1331,7 +1328,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 etaSCEle[index] = electron1.eta(); // itself is a SC phiSCEle[index] = electron1.phi(); - const EcalRecHitCollection *recHitsEB = clustertools->getEcalEBRecHitCollection(); const EcalRecHitCollection *recHitsEE = clustertools->getEcalEERecHitCollection(); const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); @@ -1340,20 +1336,14 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 if(seedDetId.null()){ seedDetId = findSCseed(electron1); } - - EcalRecHitCollection::const_iterator seedRecHit = NULL; - if(seedDetId.subdetId() == EcalBarrel){ - seedRecHit = recHitsEB->find(seedDetId) ; - EBDetId seedDetIdEcal = seedDetId; - seedXSCEle[index]=seedDetIdEcal.ieta(); - seedYSCEle[index]=seedDetIdEcal.iphi(); - }else if(seedDetId.subdetId() == EcalEndcap){ - seedRecHit = recHitsEE->find(seedDetId) ; - EEDetId seedDetIdEcal = seedDetId; - seedXSCEle[index]=seedDetIdEcal.ix(); - seedYSCEle[index]=seedDetIdEcal.iy(); - }else assert(false); - + assert(seedDetId.subdetId() == EcalEndcap); + assert(!seedDetId.null()); + EEDetId seedDetIdEcal = seedDetId; + seedXSCEle[index]=seedDetIdEcal.ix(); + seedYSCEle[index]=seedDetIdEcal.iy(); + + EcalRecHitCollection::const_iterator seedRecHit = recHitsEE->find(seedDetId) ; + assert(seedRecHit!=recHitsEE->end()); seedEnergySCEle[index]=seedRecHit->energy(); if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain6)) gainEle[index]=1; else if(seedRecHit->checkFlag(EcalRecHit::kHasSwitchToGain1)) gainEle[index]=2; @@ -1367,25 +1357,17 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 if( !isMC){ std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); - detitr != hitsAndFractions_ele1.end(); detitr++ ) - { - double hitenergy = 0; - if ((detitr->first).subdetId() == EcalBarrel) - { - EcalRecHitCollection::const_iterator oneHit = recHitsEB->find( (detitr -> first) ) ; - hitenergy = oneHit->energy(); - } - else if ( (detitr->first).subdetId() == EcalEndcap) - { - EcalRecHitCollection::const_iterator oneHit = recHitsEE->find( (detitr -> first) ) ; - hitenergy = oneHit->energy(); - } - else hitenergy = 0; - sumLC_E += laserHandle_->getLaserCorrection(detitr->first, runTime_) * hitenergy; - sumE += hitenergy; - } - avgLCSCEle[index] = sumLC_E / sumE; + detitr != hitsAndFractions_ele1.end(); detitr++ ){ + + double hitenergy = 0; + EcalRecHitCollection::const_iterator oneHit = recHitsEE->find( (detitr -> first) ) ; + hitenergy = oneHit->energy(); + sumLC_E += laserHandle_->getLaserCorrection(detitr->first, runTime_) * hitenergy; + sumE += hitenergy; + } + avgLCSCEle[index] = sumLC_E / sumE; + } else avgLCSCEle[index] = -10; nHitsSCEle[index] = electron1.size(); @@ -1569,9 +1551,9 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const } void ZNtupleDumper::TreeSetDiElectronVar(const pat::Electron& electron1, const reco::SuperCluster& electron2){ - + TreeSetSingleElectronVar(electron1, 0); - + if(isWenu) { std::cout << "[ERROR] TreeSetDiElectronVar(const pat::Electron&, const reco::SuperCluster&) \n" << " is only supposed to called with doHighEta option and without isWenu option\n" @@ -1652,8 +1634,6 @@ void ZNtupleDumper::TreeSetDiElectronVar(const pat::Electron& electron1, const r invMass_MC = -100; // temporary set it to be -100 for SC - ZStat=2; - return; } From fd2e250c3ea41f1d9faa93103408353148a1b1d6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 30 May 2014 14:41:05 +0200 Subject: [PATCH 383/475] cleaned skims --- ALCARAW_RECO/python/WZElectronSkims_cff.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index b121e4f557c..8da63242756 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -159,9 +159,9 @@ max = cms.double("0.5") ) -eleSelSeq = cms.Sequence( - PassingVeryLooseId + PassingMediumId + PassingTightId + #(eleSelectionProducers * selectedCands) + - (SCselector*eleSC)) +eleSelSeq = cms.Sequence( PassingVeryLooseId + PassingTightId + + (SCselector*eleSC) + ) ############################################################ @@ -190,7 +190,8 @@ EleSCSelector = cms.EDProducer("CandViewShallowCloneCombiner", decay = cms.string("PassingVeryLooseId eleSC"), checkCharge = cms.bool(False), - cut = cms.string("mass > 40 && mass < 140") +# cut = cms.string("40 27") + cut = cms.string("40 Date: Fri, 30 May 2014 14:42:45 +0200 Subject: [PATCH 384/475] removed highEta options --- ALCARAW_RECO/scripts/prodAlcareco.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 63a00fc1a1d..a7cf43ca553 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -15,8 +15,7 @@ CREATE=yes SUBMIT=yes OUTPUTFILE=alcareco crabFile=tmp/alcareco.cfg -DOTREE=1 -DOHIGHETA=0 +DOTREE=0 NJOBS=100 usage(){ @@ -37,7 +36,6 @@ usage(){ echo " --json_name jsonName: additional name in the folder structure to keep track of the used json" echo " --json jsonFile.root: better to not use a json file for the alcareco production" echo " --doTree arg (=${DOTREE}): 0=no tree, 1=standard tree only, 2=extratree-only, 3=standard+extra trees" - echo " --doHighEta arg (=${DOHIGHETA}): 0=not use HighEta SC; 1= use them" echo " --njobs nJobs : number of jobs, an integer" echo "----------" echo " --tutorial: tutorial mode, produces only one sample in you user area" @@ -49,7 +47,7 @@ usage(){ #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,doHighEta:,njobs:,tutorial,develRelease -- "$@") +if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,njobs:,tutorial,develRelease -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -79,7 +77,6 @@ do --tutorial) echo "[OPTION] Activating the tutorial mode"; TUTORIAL=y;; --develRelease) echo "[OPTION] Request also CMSSW release not in production!"; DEVEL_RELEASE=y;; --doTree) DOTREE=$2; shift; echo "[OPTION] Request doTree = ${DOTREE}";; - --doHighEta) DOHIGHETA=$2; shift; echo "[OPTION] Request doHighEta = ${DOHIGHETA}";; --njobs) NJOBS=$2; shift; echo "[OPTION] Request njobs = ${NJOBS}";; (--) shift; break;; (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; @@ -220,14 +217,13 @@ queue = cmscaf1nd [CMSSW] -cat >> ${crabFile} <> ${crabFile} < Date: Fri, 30 May 2014 14:50:45 +0200 Subject: [PATCH 385/475] mmm --- ALCARAW_RECO/python/alcaSkimming.py | 62 +++++++++++++++++++---------- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index d6d24883a17..f0e77bd1516 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -332,7 +332,6 @@ ################################# FILTERING EVENTS process.PUDumperSeq = cms.Sequence() -process.filterSeq = cms.Sequence() #process.load('Calibration.ALCARAW_RECO.trackerDrivenFinder_cff') if(MC): # PUDumper @@ -343,16 +342,13 @@ process.PUDumperSeq *= process.PUDumper process.load('Calibration.ALCARAW_RECO.WZElectronSkims_cff') -#process.filterSeq *= process.ZeeFilterSeq -#process.filterSeq *= process.WenuFilterSeq + process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", src = cms.InputTag("gsfElectrons"), minNumber = cms.uint32(1) ) -if(options.skim=="" or options.skim=="none" or options.skim=="no" or options.skim=="partGun"): - process.ZeeFilterSeq = cms.Sequence(process.MinEleNumberFilter) - process.WenuFilterSeq = cms.Sequence(process.MinEleNumberFilter) - process.ZSCFilterSeq = cms.Sequence(process.MinEleNumberFilter) +process.filterSeq = cms.Sequence(process.MinEleNumberFilter) + if (HLTFilter): from HLTrigger.HLTfilters.hltHighLevel_cfi import * @@ -520,22 +516,29 @@ process.endjob_step = cms.EndPath(process.endOfProcess) #process.endjob_step*=process.outputRECO # ALCARAW -process.pathALCARECOEcalUncalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * +process.pathALCARECOEcalUncalSingleElectron = cms.Path(process.PUDumperSeq * process.filterSeq * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) -process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * - ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilterSeq * +process.pathALCARECOEcalUncalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) -process.pathALCARECOEcalUncalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * - ~process.ZeeFilter * process.ZSCFilterSeq * +process.pathALCARECOEcalUncalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * + ~process.ZeeFilter * process.ZSCFilter * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) +process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * + ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter * + (process.ALCARECOEcalCalElectronPreSeq + + process.seqALCARECOEcalUncalElectron )) # ALCARERECO process.pathALCARERECOEcalCalElectron = cms.Path(process.alcarerecoSeq) # ALCARECO -process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.ZeeFilterSeq * +process.pathALCARECOEcalCalSingleElectron = cms.Path(process.PUDumperSeq * process.filterSeq * + process.pfIsoEgamma * + process.seqALCARECOEcalCalElectron) +process.pathALCARECOEcalCalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * + process.ZeeFilter * process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) process.pathALCARECOEcalCalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * @@ -543,12 +546,30 @@ ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter * process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) -process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * - process.FilterSeq * - #~process.ZeeFilter * process.ZSCFilterSeq * - process.ZSCFilterSeq * + +process.load('Calibration.HLTReporter.hltreporter_cfi') +process.load('CommonTools.CandAlgos.genParticleCustomSelector_cfi') +process.genParticleCustomSelector.pdgId=[ 11, -11] +process.genParticleCustomSelector.minRapidity = cms.double(2.5) +process.genParticleCustomSelector.maxRapidity = cms.double(3) +process.genParticleCustomSelector.ptMin = cms.double(15) +process.genParticleCustomSelector2 = process.genParticleCustomSelector.copy() +process.genParticleCustomSelector2.minRapidity = cms.double(-3) +process.genParticleCustomSelector2.maxRapidity = cms.double(-2.5) + +process.MinHighEtaGenEleNumberFilter = cms.EDFilter("CandViewCountFilter", + src = cms.InputTag("genParticleCustomSelector"), + minNumber = cms.uint32(1) + ) + +process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * +# process.genParticleCustomSelector * +# process.MinHighEtaGenEleNumberFilter * + process.filterSeq * process.FilterSeq * + ~process.ZeeFilter * process.ZSCFilter * +# process.ZSCHltFilter * process.pfIsoEgamma * - process.seqALCARECOEcalCalElectron) + process.seqALCARECOEcalCalElectron ) #* process.hltReporter) process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.pdfWeightsSeq * process.ntupleSeq) @@ -640,11 +661,12 @@ SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalZSCElectron') ) else: + #if(options.skim=="" or options.skim=="none" or options.skim=="no" or options.skim=="partGun"): process.outputALCARAW.SelectEvents = cms.untracked.PSet( - SelectEvents = cms.vstring('pathALCARECOEcalUncalZSCElectron') + SelectEvents = cms.vstring('pathALCARECOEcalUncalSingleElectron') ) process.outputALCARECO.SelectEvents = cms.untracked.PSet( - SelectEvents = cms.vstring('pathALCARECOEcalCalZSCElectron') + SelectEvents = cms.vstring('pathALCARECOEcalCalSingleElectron') ) if(options.type=='ALCARAW'): From de3fc367754ee84ca24986ea751bbca77732215b Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 3 Jun 2014 23:26:34 +0200 Subject: [PATCH 386/475] added new alcareco with fixed paths --- ALCARAW_RECO/alcareco_datasets.dat | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 640e21368ce..bff64a5a91c 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -81,15 +81,26 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- 198022-203742 /DoubleElectron/Run2012C-EcalCalElectron-22Jan2013-v1/ALCARECO DoubleElectron-ZAlcaSkim-RUN2012C-22Jan-v1 caf database VALID RUN2012C,RUN2012ABC,RUN2012ABCD 203777-208686 /DoubleElectron/Run2012D-EcalCalElectron-22Jan2013-v1/ALCARECO DoubleElectron-ZAlcaSkim-RUN2012D-22Jan-v1 caf database VALID RUN2012D,RUN2012ABCD ##################### private ALCARECO Winter13 -190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD -193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD -198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABC,RUN2012ABCD -203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012C,RUN2012ABC,RUN2012ABCD +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012D,RUN2012ABCD ### -190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD -193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD -198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABC,RUN2012ABCD -203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012C,RUN2012ABC,RUN2012ABCD +203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012D,RUN2012ABCD +### +190645-193621 /DoubleElectron/Run2012A-22Jan2013-v1/AOD DoubleElectron-ZSkimPath-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD +193834-196531 /DoubleElectron/Run2012B-22Jan2013-v1/AOD DoubleElectron-ZSkimPath-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD +198022-203742 /DoubleElectron/Run2012C-22Jan2013-v1/AOD DoubleElectron-ZSkimPath-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABC,RUN2012ABCD +203777-208686 /DoubleElectron/Run2012D-22Jan2013-v1/AOD DoubleElectron-ZSkimPath-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD +# +190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkimPath-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD +193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkimPath-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD +198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkimPath-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABC,RUN2012ABCD +203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkimPath-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD + ##################### full private rereco 2011 in 5_3_X 160329-173692 /DoubleElectron/Run2011A-ZElectron-08Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011A-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011A-ZElectron-08Nov2011-v1_RAW-RECO_FNAL VALID RUN2011A,RUN2011AB 175832-180252 /DoubleElectron/Run2011B-ZElectron-19Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011B-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011B-ZElectron-19Nov2011-v1_RAW-RECO_FNAL VALID RUN2011B, RUN2011AB From 06339f4f6b50326bbd60f9e7872916b20c118a99 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 3 Jun 2014 23:28:04 +0200 Subject: [PATCH 387/475] regression root files on EOS for remoteGlidein --- ALCARAW_RECO/python/alcaSkimming.py | 33 ++++++++++--------- .../python/elenewenergiesproducer_cfi.py | 32 +++++++++--------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index f0e77bd1516..f5b7cc00011 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -717,22 +717,23 @@ process.eleNewEnergiesProducer.regrPhoFile=pathPrefix+process.eleNewEnergiesProducer.regrPhoFile.value() process.eleNewEnergiesProducer.regrEleFile=pathPrefix+process.eleNewEnergiesProducer.regrEleFile.value() process.eleNewEnergiesProducer.regrEleFile_fra=pathPrefix+process.eleNewEnergiesProducer.regrEleFile_fra.value() -process.eleNewEnergiesProducer.regrEleJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV4_SemiParamFile.value() -process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile.value() -process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile.value() -process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile.value() -process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile.value() -process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile.value() -process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile.value() -process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile.value() -process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile.value() +# Now files are on CERN EOS, files accessed via xrootd +#process.eleNewEnergiesProducer.regrEleJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV4_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV5_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV4_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV5_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParamFile.value() +#process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV6_SemiParam7TeVtrainFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV6_SemiParam7TeVtrainFile.value() +#process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV7_SemiParam7TeVtrainFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV7_SemiParam7TeVtrainFile.value() +#process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrEleJoshV8_SemiParam7TeVtrainFile.value() +#process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile = pathPrefix+process.eleNewEnergiesProducer.regrPhoJoshV8_SemiParam7TeVtrainFile.value() # process.eleRegressionEnergy.regressionInputFile = cms.string("EgammaAnalysis/ElectronTools/data/eleEnergyReg2012Weights_V1.root") #eleEnergyRegWeights_WithSubClusters_VApr15.root") process.eleRegressionEnergy.energyRegressionType=cms.uint32(2) diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index 125d05f0b29..e062f525949 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -35,21 +35,21 @@ correctionFileName = cms.string(''), correctionType = cms.string(''), ptSplit = cms.bool(True), - regrEleJoshV4_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ele.root'), - regrPhoJoshV4_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v4_forest_ph.root'), - regrEleJoshV5_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ele.root'), - regrPhoJoshV5_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v5_forest_ph.root'), - regrEleJoshV6_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ele.root'), - regrPhoJoshV6_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_8TeV_forest_ph.root'), - regrEleJoshV7_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ele.root'), - regrPhoJoshV7_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_8TeV_forest_ph.root'), - regrEleJoshV8_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ele.root'), - regrPhoJoshV8_SemiParamFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_8TeV_forest_ph.root'), - regrEleJoshV6_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ele.root'), - regrPhoJoshV6_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v6_7TeV_forest_ph.root'), - regrEleJoshV7_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ele.root'), - regrPhoJoshV7_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v7_7TeV_forest_ph.root'), - regrEleJoshV8_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ele.root'), - regrPhoJoshV8_SemiParam7TeVtrainFile = cms.string('src/HiggsAnalysis/GBRLikelihoodEGTools/data/regweights_v8_7TeV_forest_ph.root'), + regrEleJoshV4_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v4_forest_ele.root'), + regrPhoJoshV4_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v4_forest_ph.root'), + regrEleJoshV5_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v5_forest_ele.root'), + regrPhoJoshV5_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v5_forest_ph.root'), + regrEleJoshV6_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v6_8TeV_forest_ele.root'), + regrPhoJoshV6_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v6_8TeV_forest_ph.root'), + regrEleJoshV7_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v7_8TeV_forest_ele.root'), + regrPhoJoshV7_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v7_8TeV_forest_ph.root'), + regrEleJoshV8_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v8_8TeV_forest_ele.root'), + regrPhoJoshV8_SemiParamFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v8_8TeV_forest_ph.root'), + regrEleJoshV6_SemiParam7TeVtrainFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v6_7TeV_forest_ele.root'), + regrPhoJoshV6_SemiParam7TeVtrainFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v6_7TeV_forest_ph.root'), + regrEleJoshV7_SemiParam7TeVtrainFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v7_7TeV_forest_ele.root'), + regrPhoJoshV7_SemiParam7TeVtrainFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v7_7TeV_forest_ph.root'), + regrEleJoshV8_SemiParam7TeVtrainFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v8_7TeV_forest_ele.root'), + regrPhoJoshV8_SemiParam7TeVtrainFile = cms.string('root://eoscms.cern.ch//eos/cms/store/caf/user/shervin/GBRLikelihoodEGToolsData/regweights_v8_7TeV_forest_ph.root'), ) From eafe527403354b8e88542ed94eed2ef5783a8acc Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 3 Jun 2014 23:29:54 +0200 Subject: [PATCH 388/475] fixed extraCalib ntuples production --- ALCARAW_RECO/scripts/prodNtuples.sh | 22 ++++++++++--------- ZNtupleDumper/src/ZNtupleDumper.cc | 33 +++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index b94aa9b27ee..ebe46a18777 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -16,6 +16,7 @@ SUBMIT=y DOTREE=1 PDFSYST=1 SKIM="" +OUTFILES="ntuple.root" usage(){ echo "`basename $0` {parseDatasetFile options} --type={type} [options]" @@ -139,10 +140,11 @@ do --scheduler) SCHEDULER=$2; shift;; #--puWeight) PUWEIGHTFILE=$2; shift;; --extraName) EXTRANAME=$2;shift;; - --doExtraCalibTree) let DOTREE=${DOTREE}+2;; + #name of the output files is hardcoded in ZNtupleDumper + --doExtraCalibTree) let DOTREE=${DOTREE}+2; OUTFILES="${OUTFILES},extraCalibTree.root";; --doEleIDTree) let DOTREE=${DOTREE}+4;; --doPdfSystTree) let DOTREE=${DOTREE}+8;; - --noStandardTree) let DOTREE=${DOTREE}-1;; + --noStandardTree) let DOTREE=${DOTREE}-1; OUTFILES=`echo ${OUTFILES} | sed 's|ntuple.root,||'`;; --createOnly) echo "[OPTION] createOnly"; unset SUBMIT;; --submitOnly) echo "[OPTION] submitOnly"; unset CREATE;; --check) echo "[OPTION] checking jobs"; CHECK=y; EXTRAOPTION="--check"; unset CREATE; unset SUBMIT;; @@ -293,11 +295,7 @@ USER_REMOTE_DIR=$USER_REMOTE_DIR/unmerged #${ENERGY}/ #${DATASETNAME}/tmp-${DATASETNAME}-${RUNRANGE} -if [ "`echo \"\" | awk \"{print $DOTREE%2}\"`" == "1" ];then - OUTFILES=ntuple.root -else - OUTFILES="extraID.root" -fi +OUTFILES=`echo $OUTFILES | sed 's|^,||'` if [ ! -d "tmp" ];then mkdir tmp/; fi cat > tmp/crab.cfg <> tmp/$TAG.log echo "[STATUS] Unfinished ${UI_WORKING_DIR}" else - mergeOutput.sh -u ${UI_WORKING_DIR} -g `basename $OUTFILES .root` if [ "${isMC}" == "1" ];then - mergeOutput.sh -u ${UI_WORKING_DIR} -g PUDumper + OUTFILES="$OUTFILES PUDumper" fi + for file in $OUTFILES + do + file=`basename $file .root` + mergeOutput.sh -u ${UI_WORKING_DIR} -g $file + done fi # echo "mergeOutput.sh -u ${UI_WORKING_DIR} -n ${DATASETNAME} -r ${RUNRANGE}" fi diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 344309a0a61..423badf72d0 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -286,6 +286,9 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t eSeedSCEle[2]; Float_t pModeGsfEle[2]; ///< track momentum from Gsf Track (mode) Float_t pAtVtxGsfEle[2]; ///< momentum estimated at the vertex + Float_t trackMomentumErrorEle[2]; ///< track momentum error from standard electron method + Float_t pNormalizedChi2Ele[2]; ///< track normalized chi2 of the fit (GSF) + Float_t R9Ele[2]; ///< e3x3/rawEnergySCEle Float_t invMass; @@ -323,6 +326,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { #endif //============================== ExtraCalibTree + TFile *extraCalibTreeFile; TTree *extraCalibTree; edm::Timestamp runTime_; Int_t nRecHitsEle[2]; @@ -777,8 +781,15 @@ void ZNtupleDumper::beginJob() if(doExtraCalibTree){ //extraCalibTree = fs->make("extraCalibTree",""); // put the extraCalibTree into the default outfile + extraCalibTreeFile = new TFile("extraCalibTree.root", "recreate"); + if(extraCalibTreeFile->IsZombie()){ + throw cms::Exception("OutputError") << "Output tree for extra calib not created (Zombie): " << foutName; + return; + } + extraCalibTreeFile->cd(); + extraCalibTree = new TTree("extraCalibTree", "extraCalibTree"); - extraCalibTree->SetDirectory(tree_file); + extraCalibTree->SetDirectory(extraCalibTreeFile); InitExtraCalibTree(); } if(doEleIDTree){ @@ -805,16 +816,19 @@ void ZNtupleDumper::endJob() if(tree->GetEntries()>0){ tree->BuildIndex("runNumber","eventNumber"); - if(doExtraCalibTree) extraCalibTree->BuildIndex("runNumber","eventNumber"); if(doEleIDTree) eleIDTree->BuildIndex("runNumber","eventNumber"); } // save the tree into the file tree_file->cd(); tree->Write(); - if(doExtraCalibTree) extraCalibTree->Write(); tree_file->Close(); - + if(doExtraCalibTree){ + extraCalibTree->BuildIndex("runNumber","eventNumber"); + extraCalibTreeFile->cd(); + extraCalibTree->Write(); + extraCalibTreeFile->Close(); + } } // ------------ method called when starting to processes a run ------------ @@ -968,6 +982,8 @@ void ZNtupleDumper::InitNewTree(){ //tree->Branch("eSeedSCEle", eSeedSCEle, "eSeedSCEle[2]/F"); tree->Branch("pModeGsfEle", pModeGsfEle, "pModeGsfEle[2]/F"); tree->Branch("pAtVtxGsfEle", pAtVtxGsfEle, "pAtVtxGsfEle[2]/F"); + tree->Branch("pNormalizedChi2Ele", pNormalizedChi2Ele, "pNormalizedChi2Ele[2]/F"); + tree->Branch("trackMomentumErrorEle", trackMomentumErrorEle, "trackMomentumErrorEle[2]/F"); tree->Branch("invMass", &invMass, "invMass/F"); tree->Branch("invMass_SC", &invMass_SC, "invMass_SC/F"); @@ -1276,7 +1292,10 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int e3x3SCEle[index] = clustertools->e3x3(*electron1.superCluster()->seed()); e5x5SCEle[index] = clustertools->e5x5(*electron1.superCluster()->seed()); eSeedSCEle[index]= electron1.superCluster()->seed()->energy(); + pModeGsfEle[index] = electron1.gsfTrack()->pMode(); + trackMomentumErrorEle[index] = electron1.trackMomentumError(); + pNormalizedChi2Ele[index] = electron1.gsfTrack()->normalizedChi2(); pAtVtxGsfEle[index] = electron1.trackMomentumAtVtx().R(); R9Ele[index] = e3x3SCEle[index]/electron1.superCluster()->rawEnergy(); @@ -1429,8 +1448,10 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 e5x5SCEle[index] = clustertools->e5x5(*electron1.seed()); eSeedSCEle[index]= electron1.seed()->energy(); - pModeGsfEle[index] = -100; // no track, though .. - pAtVtxGsfEle[index] = -100; + pModeGsfEle[index] = -1; // no track, though .. + trackMomentumErrorEle[index] = -1; + pNormalizedChi2Ele[index] = -1; + pAtVtxGsfEle[index] = -1; R9Ele[index] = e3x3SCEle[index]/electron1.rawEnergy(); From a2566063d41455e1d1dabb3b285601e177ba84a8 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 5 Jun 2014 12:00:48 +0200 Subject: [PATCH 389/475] WZFilter added to skims --- ALCARAW_RECO/python/WZElectronSkims_cff.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index 8da63242756..cd1bfd4864d 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -216,6 +216,12 @@ src = cms.InputTag("EleSCSelector"), minNumber = cms.uint32(1) ) -FilterSeq = cms.Sequence(eleSelSeq * (ZeeSelector + WenuSelector + EleSCSelector)) +WZFilter = cms.EDFilter("CandViewCountFilter", + src = cms.InputTag("WZSelector"), + minNumber = cms.uint32(1) + ) + +FilterSeq = cms.Sequence(eleSelSeq * (ZeeSelector + WenuSelector + EleSCSelector) * WZSelector) +ZSCSingleEleFilterSeq = cms.Sequence(~ZSCHltFilter * eleSelSeq * EleSCSelector * ZSCFilter) From e14f14205c01e4979ae0d7ff9e0681141e684162 Mon Sep 17 00:00:00 2001 From: shervin Date: Thu, 5 Jun 2014 12:37:43 +0200 Subject: [PATCH 390/475] cleaned alcaSkimming python and fixed ntuplePath for alcareco+ntuple production --- ALCARAW_RECO/python/alcaSkimming.py | 124 ++++++++++------------------ 1 file changed, 45 insertions(+), 79 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index f5b7cc00011..092c63a57e3 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -31,7 +31,7 @@ "", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, - "type of skim: ZSkim, WSkim, partGun, fromWSkim (from USER format), EleSkim (at least one electron), ''") + "type of skim: ZSkim, WSkim, partGun, EleSkim (at least one electron), ''") options.register('jsonFile', "", VarParsing.VarParsing.multiplicity.singleton, @@ -67,7 +67,6 @@ # Use the options # Do you want to filter events? -HLTFilter = False ZSkim = False WSkim = False @@ -75,26 +74,15 @@ ZSkim=True elif(options.skim=="WSkim"): WSkim=True -elif(options.skim=="fromWSkim"): - print "[INFO] producing from WSkim files (USER format)" - WSkim=False else: if(options.type=="ALCARAW"): print "[ERROR] no skim selected" -# sys.exit(-1) + sys.exit(-1) -doTreeOnly=False -if(options.doTree>0 and options.doTreeOnly==1): - print "doTreeOnly" - doTreeOnly=True - - MC = False # please specify it if starting from AOD if(options.type == "ALCARAW"): processName = 'ALCASKIM' -# ZSkim = True -# WSkim = True elif(options.type == "ALCARERECO"): processName = 'ALCARERECO' elif(options.type == "ALCARECOSIM"): @@ -107,9 +95,10 @@ print "[ERROR] wrong type defined" sys.exit(-1) - - -if(doTreeOnly): +doTreeOnly=False +if(options.doTree>0 and options.doTreeOnly==1): + print "doTreeOnly" + doTreeOnly=True processName = processName+'DUMP' @@ -125,10 +114,7 @@ process = cms.Process(processName) -#process.prescaler = cms.EDFilter("Prescaler", -# prescaleFactor = cms.int32(prescale), -# prescaleOffset = cms.int32(0) -# ) + # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') process.load('Configuration.StandardSequences.RawToDigi_Data_cff') @@ -198,6 +184,7 @@ ), threshold = cms.untracked.string('INFO') ) + if(options.isCrab==0): process.MessageLogger.cerr.FwkReport.reportEvery = 1 @@ -289,9 +276,10 @@ process.GlobalTag.globaltag = 'POSTLS162_V5::All' else: print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION + sys.exit(1) else: print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION - + sys.exit(1) #Define the sequences # @@ -350,34 +338,28 @@ process.filterSeq = cms.Sequence(process.MinEleNumberFilter) -if (HLTFilter): - from HLTrigger.HLTfilters.hltHighLevel_cfi import * - process.ZEEHltFilter = copy.deepcopy(hltHighLevel) - process.ZEEHltFilter.throw = cms.bool(False) - process.ZEEHltFilter.HLTPaths = ["HLT_Ele*"] - process.filterSeq *= process.ZEEHltFilter - -from HLTrigger.HLTfilters.hltHighLevel_cfi import * -process.NtupleFilter = copy.deepcopy(hltHighLevel) -process.NtupleFilter.throw = cms.bool(False) -process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZWElectron', - 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron' - ] -process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCARECO") - -if(ZSkim): - process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) - process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalUncalZElectron', - 'pathALCARECOEcalCalZSCElectron', 'pathALCARECOEcalUncalZSCElectron', - ] - process.zNtupleDumper.isWenu=cms.bool(False) -elif(WSkim): - #cms.Sequence(~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter) - process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) - process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalWElectron', 'pathALCARECOEcalUncalWElectron' ] - process.zNtupleDumper.isWenu=cms.bool(True) -else: - process.NtupleFilterSeq = cms.Sequence() +#from HLTrigger.HLTfilters.hltHighLevel_cfi import * +#process.NtupleFilter = copy.deepcopy(hltHighLevel) +#process.NtupleFilter.throw = cms.bool(False) +#process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron', +# 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron', +# 'pathALCARECOEcalUncalZSCElectron', 'pathALCARECOEcalCalZSCElectron', +# ] +#process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCARECO") +# +#if(ZSkim): +# process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) +# process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalUncalZElectron', +# 'pathALCARECOEcalCalZSCElectron', 'pathALCARECOEcalUncalZSCElectron', +# ] +#elif(WSkim): +# #cms.Sequence(~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter) +# process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) +# process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalWElectron', 'pathALCARECOEcalUncalWElectron' ] +# process.zNtupleDumper.isWenu=cms.bool(True) +#else: +# process.NtupleFilterSeq = cms.Sequence() +process.NtupleFilterSeq = cms.Sequence() if(options.skim=="partGun"): process.zNtupleDumper.isPartGun = cms.bool(True) @@ -400,10 +382,10 @@ try: EcalTrivialConditionRetriever except NameError: - print "well, it WASN'T defined after all!" + #print "well, it WASN'T defined after all!" process.trivialCond = cms.Sequence() else: - print "sure, it was defined." + print "** TrivialConditionRetriver defined" process.trivialCond = cms.Sequence( EcalTrivialConditionRetriever ) @@ -415,16 +397,13 @@ process.rhoFastJetSeq = cms.Sequence() if((not options.type=="ALCARERECO") ): - if(options.skim!="fromWSkim"): - process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection) - else: - process.rhoFastJetSeq = cms.Sequence() + process.rhoFastJetSeq = cms.Sequence(process.kt6PFJetsForRhoCorrection) if(MC): - process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequenceMC * process.zNtupleDumper) + process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequenceMC) else: - process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequence * process.zNtupleDumper) + process.ntupleSeq = cms.Sequence(process.jsonFilter * process.patSequence) if(options.doTree==2 or options.doTree==4 or options.doTree==6 or options.doTree==8): process.zNtupleDumper.doStandardTree = cms.bool(False) @@ -547,24 +526,8 @@ process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) -process.load('Calibration.HLTReporter.hltreporter_cfi') -process.load('CommonTools.CandAlgos.genParticleCustomSelector_cfi') -process.genParticleCustomSelector.pdgId=[ 11, -11] -process.genParticleCustomSelector.minRapidity = cms.double(2.5) -process.genParticleCustomSelector.maxRapidity = cms.double(3) -process.genParticleCustomSelector.ptMin = cms.double(15) -process.genParticleCustomSelector2 = process.genParticleCustomSelector.copy() -process.genParticleCustomSelector2.minRapidity = cms.double(-3) -process.genParticleCustomSelector2.maxRapidity = cms.double(-2.5) - -process.MinHighEtaGenEleNumberFilter = cms.EDFilter("CandViewCountFilter", - src = cms.InputTag("genParticleCustomSelector"), - minNumber = cms.uint32(1) - ) process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * -# process.genParticleCustomSelector * -# process.MinHighEtaGenEleNumberFilter * process.filterSeq * process.FilterSeq * ~process.ZeeFilter * process.ZSCFilter * # process.ZSCHltFilter * @@ -572,7 +535,10 @@ process.seqALCARECOEcalCalElectron ) #* process.hltReporter) -process.NtuplePath = cms.Path(process.filterSeq * process.NtupleFilterSeq * process.pdfWeightsSeq * process.ntupleSeq) +process.NtuplePath = cms.Path(process.filterSeq * process.FilterSeq * process.WZFilter * process.NtupleFilterSeq + * process.pdfWeightsSeq * process.ntupleSeq) +process.NtupleEndPath = cms.EndPath( process.zNtupleDumper) + if(not doTreeOnly): process.ALCARECOoutput_step = cms.EndPath(process.outputALCARECO ) @@ -683,14 +649,14 @@ elif(options.type=='ALCARERECO'): if(doTreeOnly): - process.schedule = cms.Schedule(process.NtuplePath) + process.schedule = cms.Schedule(process.NtuplePath, process.NtupleEndPath) else: process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, - process.NtuplePath) + process.NtuplePath, process.NtupleEndPath) elif(options.type=='ALCARECO' or options.type=='ALCARECOSIM'): if(doTreeOnly): - process.schedule = cms.Schedule(process.NtuplePath) + process.schedule = cms.Schedule(process.NtuplePath, process.NtupleEndPath) else: if(options.doTree==0): process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, @@ -700,7 +666,7 @@ else: process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, - process.ALCARECOoutput_step, process.NtuplePath + process.ALCARECOoutput_step, process.NtuplePath, process.NtupleEndPath ) # fix the output modules From e2f15fd8d6e81c6c784f82a5797436395e6a3cc1 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 17:53:43 +0100 Subject: [PATCH 391/475] gedGsfElectrons kept in alcareco --- ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py index fa73ade5a15..9b3bbf4afef 100644 --- a/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py +++ b/ALCARAW_RECO/python/ALCARECOEcalCalIsolElectron_Output_cff.py @@ -36,6 +36,7 @@ 'keep *_addPileupInfo_*_*', 'keep *_genParticles_*_*', 'keep recoGsfElectron*_gsfElectron*_*_*', + 'keep recoGsfElectron*_gedGsfElectron*_*_*', 'keep recoCaloClusters_*_*_*', 'keep recoSuperClusters_*_*_*', 'keep recoPreshowerCluster*_*_*_*', From ac3c87b0e28c922a3277988852b7a87ce82be8c6 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 17:59:47 +0100 Subject: [PATCH 392/475] explicit gsfElectron collection for MC matching --- ZNtupleDumper/python/patSequence_cff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 7080d4ad440..1de674b7d55 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -216,6 +216,7 @@ tight = cms.InputTag("eleSelectionProducers", "tight") ) +electronMatch.src=cms.InputTag('gsfElectrons') #process.trackerDrivenRemoverSeq: sequence to remove events with trackerDriven electrons #process.eleSelectionProducers: produces value maps of floats that says if the electron passes the given selection From 9dd094f00560c10ff4ee2da3516f9e0db69e3257 Mon Sep 17 00:00:00 2001 From: Shervin Date: Sat, 8 Feb 2014 18:07:11 +0100 Subject: [PATCH 393/475] old crashing regression removed and fixed setup accordingly --- .../src/EleNewEnergiesProducer.cc | 13 +++++++++---- setup_git.sh | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc index 8ac0e28f170..16e93e95047 100644 --- a/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc +++ b/EleNewEnergiesProducer/src/EleNewEnergiesProducer.cc @@ -740,10 +740,11 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu //float smearedEnergy = scaler.smear(*ele_itr); std::pair corEle,corPho,corEle_fra; - -#if REGRESSION == 3 - corEle = josh_Ele.CorrectedEnergyWithErrorV3(*ele_itr,*primaryVertexHandle, *rhoHandle, lazyTools,iSetup); - corPho = josh_Pho.CorrectedEnergyWithErrorV3(*ele_itr,*primaryVertexHandle, *rhoHandle, lazyTools,iSetup); + +#if REGRESSION == 4 +#elif REGRESSION == 3 + corEle = josh_Ele.CorrectedEnergyWithErrorV3(*ele_itr,*primaryVertexHandle, *rhoHandle, lazyTools,iSetup); + corPho = josh_Pho.CorrectedEnergyWithErrorV3(*ele_itr,*primaryVertexHandle, *rhoHandle, lazyTools,iSetup); #elif REGRESSION == 2 corEle = josh_Ele.CorrectedEnergyWithErrorV2(*ele_itr,*primaryVertexHandle, lazyTools,iSetup); corPho = josh_Pho.CorrectedEnergyWithErrorV2(*ele_itr,*primaryVertexHandle, lazyTools,iSetup); @@ -751,7 +752,11 @@ EleNewEnergiesProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu corEle = josh_Ele.CorrectedEnergyWithError(*ele_itr,*primaryVertexHandle, lazyTools,iSetup); corPho = josh_Pho.CorrectedEnergyWithError(*ele_itr,*primaryVertexHandle, lazyTools,iSetup); #endif + +#if REGRESSION == 4 +#else corEle_fra = fra_Ele.CorrectedEnergyWithErrorTracker(*ele_itr,*primaryVertexHandle, *rhoHandle, lazyTools,iSetup,ptSplit); +#endif double ecor, sigmaEoverE, cbmean, sigma, alpha1, n1, alpha2, n2, pdfval; diff --git a/setup_git.sh b/setup_git.sh index 9b02355ad78..04b147c7504 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -209,7 +209,7 @@ case $CMSSW_VERSION in # cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 # git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 # cd - >> setup.log || exit 1 -# patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 + patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 cat download.url | grep '.root' | xargs wget >> setup.log || exit 1 @@ -223,6 +223,7 @@ case $CMSSW_VERSION in cd - mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ + sed -i 's|REGRESSION=3|REGRESSION=4|' Calibration/*/BuildFile.xml echo "[STATUS] applying patch for CMSSW_5_X" sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc From d737b4b4ce17ef35e89db252ddc182993f7d9118 Mon Sep 17 00:00:00 2001 From: Louie Date: Wed, 5 Mar 2014 10:14:41 +0100 Subject: [PATCH 394/475] changed gsfElectrons to gedgsfElectrons throughout --- .../python/AlCaElectronTracksReducer_cfi.py | 2 +- ALCARAW_RECO/python/WZElectronSkims_cff.py | 4 ++-- .../python/alCaIsolatedElectrons_cfi.py | 2 +- ALCARAW_RECO/python/alcaSkimming.py | 20 +++++++++---------- ALCARAW_RECO/python/eleIsoSequence_cff.py | 20 +++++++++---------- .../electronRecalibSCAssociatorSH_cfi.py | 2 +- ALCARAW_RECO/python/reRecoValidation.py | 10 +++++----- ALCARAW_RECO/python/sandboxRerecoSeq_cff.py | 2 +- .../python/trackerDrivenFinder_cff.py | 2 +- ALCARAW_RECO/test/recHitsValidation.py | 6 +++--- EleNewEnergiesProducer/BuildFile.xml | 2 +- .../python/elenewenergiesproducer_cfi.py | 2 +- .../python/eleselectionproducers_cfi.py | 2 +- .../python/valuemaptraslator_cfi.py | 6 +++--- ZNtupleDumper/python/elePat_cfi.py | 2 +- ZNtupleDumper/python/patSequence_cff.py | 6 +++--- 16 files changed, 45 insertions(+), 45 deletions(-) diff --git a/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py b/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py index f40067cf2e8..420fb1310ef 100644 --- a/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py +++ b/ALCARAW_RECO/python/AlCaElectronTracksReducer_cfi.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms alcaElectronTracksReducer = cms.EDProducer("AlCaElectronTracksReducer", - electronLabel = cms.InputTag("gsfElectrons"), + electronLabel = cms.InputTag("gedGsfElectrons"), alcaTrackCollection = cms.string('alCaElectronTracks'), generalTracksLabel = cms.InputTag("generalTracks"), alcaTrackExtraCollection = cms.string('alCaElectronTracksExtra'), diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index cd1bfd4864d..404c427bd02 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -36,7 +36,7 @@ ## # Trigger ################## PassingHLT = cms.EDProducer("trgMatchGsfElectronProducer", - InputProducer = cms.InputTag( 'gsfElectrons' ), + InputProducer = cms.InputTag( 'gedGsfElectrons' ), hltTags = cms.untracked.string( HLTPath ), triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLTProcessName), triggerResultsTag = cms.untracked.InputTag("TriggerResults","",HLTProcessName) @@ -63,7 +63,7 @@ selectedElectrons = cms.EDFilter("GsfElectronRefSelector", - src = cms.InputTag( 'gsfElectrons' ), + src = cms.InputTag( 'gedGsfElectrons' ), cut = cms.string( "(abs(superCluster.eta)<2.5) && (energy*sin(superClusterPosition.theta)> 15)") ) diff --git a/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py b/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py index 3d243569e4d..5f8624efb64 100644 --- a/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py +++ b/ALCARAW_RECO/python/alCaIsolatedElectrons_cfi.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms alCaIsolatedElectrons = cms.EDProducer("AlCaECALRecHitReducer", - electronLabel = cms.InputTag("gsfElectrons"), + electronLabel = cms.InputTag("gedGsfElectrons"), EESuperClusterCollection = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower"), minEta_highEtaSC = cms.double(2.4), ebRecHitsLabel = cms.InputTag("reducedEcalRecHitsEB"), diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 092c63a57e3..18f6ac38a5d 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -275,8 +275,7 @@ print "[INFO] Using GT POSTLS162_V5::All" process.GlobalTag.globaltag = 'POSTLS162_V5::All' else: - print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION - sys.exit(1) + process.GlobalTag.globaltag = 'GR_R_62_V3' else: print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION sys.exit(1) @@ -288,7 +287,7 @@ process.pfIsoEgamma = cms.Sequence() if((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso - process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') + process.eleIsoSequence = setupPFElectronIso(process, 'gedGsfElectrons', 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): # getting the ptrs @@ -306,11 +305,12 @@ process.pfIsoEgamma*= process.pfNoPileUpSequence * process.pfNoPileUpIsoSequence process.load('CommonTools.ParticleFlow.ParticleSelectors.pfSortByType_cff') process.pfIsoEgamma*=process.pfSortByTypeSequence - process.load('RecoEgamma.EgammaElectronProducers.electronPFIsolationDeposits_cff') + #process.load('RecoEgamma.EgammaElectronProducers.electronPFIsolationDeposits_cff') + #process.load('RecoParticleFlow.PFProducer.electronPFIsolationDeposits_cff') #pfisoALCARECO = cms.Sequence(eleIsoSequence) - process.pfIsoEgamma*= process.electronPFIsolationDepositsSequence #* process.gedElectronPFIsolationDepositsSequence + process.pfIsoEgamma*= process.electronPFIsolationDepositsSequence # * process.gedElectronPFIsolationDepositsSequence -############################### +###############################/ # Event filter sequence: process.filterSeq # sanbox sequence: process.seqALCARECOEcalUncalElectron + process.alcarecoElectronTracksReducerSeq # sandbox rereco sequence: process.sandboxRerecoSeq @@ -332,7 +332,7 @@ process.load('Calibration.ALCARAW_RECO.WZElectronSkims_cff') process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", - src = cms.InputTag("gsfElectrons"), + src = cms.InputTag("gedGsfElectrons"), minNumber = cms.uint32(1) ) process.filterSeq = cms.Sequence(process.MinEleNumberFilter) @@ -653,12 +653,12 @@ else: process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, process.NtuplePath, process.NtupleEndPath) - elif(options.type=='ALCARECO' or options.type=='ALCARECOSIM'): if(doTreeOnly): process.schedule = cms.Schedule(process.NtuplePath, process.NtupleEndPath) + process.NtuplePath) else: - if(options.doTree==0): + if(options.doTree=='0'): process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step @@ -674,7 +674,7 @@ # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -if(options.isCrab==1): +if(options.isCrab=='1'): pathPrefix="" else: pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' diff --git a/ALCARAW_RECO/python/eleIsoSequence_cff.py b/ALCARAW_RECO/python/eleIsoSequence_cff.py index 4c1c43a5560..51c28d10f57 100644 --- a/ALCARAW_RECO/python/eleIsoSequence_cff.py +++ b/ALCARAW_RECO/python/eleIsoSequence_cff.py @@ -3,13 +3,13 @@ from CommonTools.ParticleFlow.Isolation.tools_cfi import * import FWCore.ParameterSet.Config as cms #Now prepare the iso deposits -elPFIsoDepositChargedGsf=isoDepositReplace('gsfElectrons','pfAllChargedHadrons') -elPFIsoDepositChargedAllGsf=isoDepositReplace('gsfElectrons','pfAllChargedParticles') -elPFIsoDepositNeutralGsf=isoDepositReplace('gsfElectrons','pfAllNeutralHadrons') -elPFIsoDepositPUGsf=isoDepositReplace('gsfElectrons','pfPileUpAllChargedParticles') +elPFIsoDepositChargedGsf=isoDepositReplace('gedGsfElectrons','pfAllChargedHadrons') +elPFIsoDepositChargedAllGsf=isoDepositReplace('gedGsfElectrons','pfAllChargedParticles') +elPFIsoDepositNeutralGsf=isoDepositReplace('gedGsfElectrons','pfAllNeutralHadrons') +elPFIsoDepositPUGsf=isoDepositReplace('gedGsfElectrons','pfPileUpAllChargedParticles') #elPFIsoDepositGamma=isoDepositReplace('pfSelectedElectrons','pfAllPhotons') elPFIsoDepositGammaGsf= cms.EDProducer("CandIsoDepositProducer", - src = cms.InputTag("gsfElectrons"), + src = cms.InputTag("gedGsfElectrons"), MultipleDepositsFlag = cms.bool(False), trackType = cms.string('candidate'), ExtractorPSet = cms.PSet( @@ -26,15 +26,15 @@ ) # elPFIsoDepositChargedGsf= elPFIsoDepositCharged.clone() -# elPFIsoDepositChargedGsf.src = 'gsfElectrons' +# elPFIsoDepositChargedGsf.src = 'gedGsfElectrons' # elPFIsoDepositChargedAllGsf = elPFIsoDepositChargedAll.clone() -# elPFIsoDepositChargedAllGsf.src = 'gsfElectrons' +# elPFIsoDepositChargedAllGsf.src = 'gedGsfElectrons' # elPFIsoDepositNeutralGsf = elPFIsoDepositNeutral.clone() -# elPFIsoDepositNeutralGsf.src = 'gsfElectrons' +# elPFIsoDepositNeutralGsf.src = 'gedGsfElectrons' # elPFIsoDepositGammaGsf = elPFIsoDepositGamma.clone() -# elPFIsoDepositGammaGsf.src = 'gsfElectrons' +# elPFIsoDepositGammaGsf.src = 'gedGsfElectrons' # elPFIsoDepositPUGsf = elPFIsoDepositPU.clone() -# elPFIsoDepositPUGsf.src = 'gsfElectrons' +# elPFIsoDepositPUGsf.src = 'gedGsfElectrons' elPFIsoValueCharged03PFIdGsf = cms.EDProducer("PFCandIsolatorFromDeposits", deposits = cms.VPSet( diff --git a/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py b/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py index 95ea5eb7c38..709aec0e376 100644 --- a/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py +++ b/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py @@ -5,7 +5,7 @@ scIslandCollection = cms.string('endcapRecalibSC'), scIslandProducer = cms.string('correctedMulti5x5SuperClustersWithPreshower'), scProducer = cms.string('correctedHybridSuperClusters'), - electronProducer = cms.string('gsfElectrons'), + electronProducer = cms.string('gedGsfElectrons'), scCollection = cms.string('recalibSC') ) diff --git a/ALCARAW_RECO/python/reRecoValidation.py b/ALCARAW_RECO/python/reRecoValidation.py index b53f228e926..0d57cb97637 100644 --- a/ALCARAW_RECO/python/reRecoValidation.py +++ b/ALCARAW_RECO/python/reRecoValidation.py @@ -143,7 +143,7 @@ if (file_format == 'ALCARECO'): processName="ALCARECO" - electronTAG = 'gsfElectrons' + electronTAG = 'gedGsfElectrons' elif(file_format == 'sandboxRecalib'): processName = "ALCARERECO" electronTAG = 'electronRecalibSCAssociator' @@ -151,18 +151,18 @@ elif(file_format == 'sandbox'): processName = "ALCASKIM" # electronTAG = 'electronRecalibSCAssociator' - electronTAG = 'gsfElectrons' + electronTAG = 'gedGsfElectrons' elif(file_format == "AOD"): processName = "RECO" - electronTAG = 'gsfElectrons' + electronTAG = 'gedGsfElectrons' elif(file_format == "AlcaFromAOD"): processName = "ALCASKIM" - electronTAG = 'gsfElectrons' + electronTAG = 'gedGsfElectrons' elif(file_format == "AlcaFromAOD_Recalib"): electronTAG = 'electronRecalibSCAssociator' processName = 'ALCASKIM' elif(file_format == "RECO"): - electronTAG = "gsfElectrons" + electronTAG = "gedGsfElectrons" processName = "RECO" diff --git a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py index 0e83eb99ade..2653943c85c 100644 --- a/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py +++ b/ALCARAW_RECO/python/sandboxRerecoSeq_cff.py @@ -22,7 +22,7 @@ #electronRecalibSCAssociator.scIslandProducer = cms.string('correctedMulti5x5SuperClustersWithPreshower') #electronRecalibSCAssociator.scProducer = cms.string('correctedHybridSuperClusters') #electronRecalibSCAssociator.scCollection = cms.string('recalibSC') -#electronRecalibSCAssociator.electronProducer = 'gsfElectrons' +#electronRecalibSCAssociator.electronProducer = 'gedGsfElectrons' electronClusteringSeq = cms.Sequence(ecalClusters * electronRecalibSCAssociator) diff --git a/ALCARAW_RECO/python/trackerDrivenFinder_cff.py b/ALCARAW_RECO/python/trackerDrivenFinder_cff.py index adcbca1f9f9..8194c4e75d2 100644 --- a/ALCARAW_RECO/python/trackerDrivenFinder_cff.py +++ b/ALCARAW_RECO/python/trackerDrivenFinder_cff.py @@ -8,7 +8,7 @@ # you should not need to uncomment those, because I've already # produced them in the ALCARECO step trackerDrivenOnlyElectrons = cms.EDFilter("GsfElectronRefSelector", - src = cms.InputTag( 'gsfElectrons' ), + src = cms.InputTag( 'gedGsfElectrons' ), cut = cms.string( "(ecalDrivenSeed==0)" ) ) diff --git a/ALCARAW_RECO/test/recHitsValidation.py b/ALCARAW_RECO/test/recHitsValidation.py index e0d067aed9f..a7981c8b2d7 100644 --- a/ALCARAW_RECO/test/recHitsValidation.py +++ b/ALCARAW_RECO/test/recHitsValidation.py @@ -168,15 +168,15 @@ electronTAG = 'electronRecalibSCAssociator' elif(file_format == "AOD"): processName = "RECO" - electronTAG = 'gsfElectrons' + electronTAG = 'gedGsfElectrons' elif(file_format == "AlcaFromAOD"): processName = "ALCASKIM" - electronTAG = 'gsfElectrons' + electronTAG = 'gedGsfElectrons' elif(file_format == "AlcaFromAOD_Recalib"): electronTAG = 'electronRecalibSCAssociator' processName = 'ALCASKIM' elif(file_format == "RECO"): - electronTAG = "gsfElectrons" + electronTAG = "gedGsfElectrons" processName = "RECO" diff --git a/EleNewEnergiesProducer/BuildFile.xml b/EleNewEnergiesProducer/BuildFile.xml index 1f4af0a8981..6ec9ed47997 100644 --- a/EleNewEnergiesProducer/BuildFile.xml +++ b/EleNewEnergiesProducer/BuildFile.xml @@ -22,5 +22,5 @@ - + # diff --git a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py index e062f525949..6ce192c7da8 100644 --- a/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py +++ b/EleNewEnergiesProducer/python/elenewenergiesproducer_cfi.py @@ -21,7 +21,7 @@ # ALCARECO collections eleNewEnergiesProducer = cms.EDProducer('EleNewEnergiesProducer', - electronCollection = cms.InputTag('gsfElectrons'), + electronCollection = cms.InputTag('gedGsfElectrons'), recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits"), recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits"), rhoFastJet = cms.InputTag('kt6PFJetsForRhoCorrection',"rho"), diff --git a/EleSelectionProducers/python/eleselectionproducers_cfi.py b/EleSelectionProducers/python/eleselectionproducers_cfi.py index 5503711bed8..e864f46ceb0 100644 --- a/EleSelectionProducers/python/eleselectionproducers_cfi.py +++ b/EleSelectionProducers/python/eleselectionproducers_cfi.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms eleSelectionProducers = cms.EDProducer('EleSelectionProducers', - electronCollection = cms.InputTag('gsfElectrons'), + electronCollection = cms.InputTag('gedGsfElectrons'), #recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB", "ALCARECO"), #recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE", "ALCARECO"), rhoFastJet = cms.InputTag('kt6PFJetsForRhoCorrection',"rho"), diff --git a/ValueMapTraslator/python/valuemaptraslator_cfi.py b/ValueMapTraslator/python/valuemaptraslator_cfi.py index 25ef0a1781e..1b804337279 100644 --- a/ValueMapTraslator/python/valuemaptraslator_cfi.py +++ b/ValueMapTraslator/python/valuemaptraslator_cfi.py @@ -4,19 +4,19 @@ inputCollection = cms.InputTag('elPFIsoValueCharged03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), - oldreferenceCollection = cms.InputTag('gsfElectrons') + oldreferenceCollection = cms.InputTag('gedGsfElectrons') ) elPFIsoValueGamma03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueGamma03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), - oldreferenceCollection = cms.InputTag('gsfElectrons') + oldreferenceCollection = cms.InputTag('gedGsfElectrons') ) elPFIsoValueNeutral03PFIdRecalib = cms.EDProducer('ValueMapTraslator', inputCollection = cms.InputTag('elPFIsoValueNeutral03PFIdPFIso'), outputCollection = cms.string(''), referenceCollection = cms.InputTag('electronRecalibSCAssociator'), - oldreferenceCollection = cms.InputTag('gsfElectrons') + oldreferenceCollection = cms.InputTag('gedGsfElectrons') ) diff --git a/ZNtupleDumper/python/elePat_cfi.py b/ZNtupleDumper/python/elePat_cfi.py index 6862d79f72c..4ef7d881509 100644 --- a/ZNtupleDumper/python/elePat_cfi.py +++ b/ZNtupleDumper/python/elePat_cfi.py @@ -3,7 +3,7 @@ from PhysicsTools.PatAlgos.mcMatchLayer0.electronMatch_cfi import * from PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi import * -patElectrons.electronSource = cms.InputTag("gsfElectrons") +patElectrons.electronSource = cms.InputTag("gedGsfElectrons") patElectrons.useParticleFlow = cms.bool( False ) patElectrons.addElectronID = cms.bool(False) patElectrons.addGenMatch = cms.bool(True) diff --git a/ZNtupleDumper/python/patSequence_cff.py b/ZNtupleDumper/python/patSequence_cff.py index 1de674b7d55..55a02644bcf 100644 --- a/ZNtupleDumper/python/patSequence_cff.py +++ b/ZNtupleDumper/python/patSequence_cff.py @@ -4,7 +4,7 @@ #------------------------------ pattuple from Calibration.ZNtupleDumper.elePat_cfi import * -#process.patElectrons.electronSource = cms.InputTag("gsfElectrons") +#process.patElectrons.electronSource = cms.InputTag("gedGsfElectrons") #process.patElectrons.addElectronID = cms.bool(False) #process.patElectrons.addGenMatch = cms.bool(True) #process.patElectrons.pvSrc = cms.InputTag("offlinePrimaryVerticesWithBS") @@ -18,7 +18,7 @@ eleNewEnergiesProducer.ptSplit=cms.bool(False) from EgammaAnalysis.ElectronTools.electronRegressionEnergyProducer_cfi import * -eleRegressionEnergy.inputElectronsTag = cms.InputTag('gsfElectrons') +eleRegressionEnergy.inputElectronsTag = cms.InputTag('gedGsfElectrons') eleRegressionEnergy.inputCollectionType = cms.uint32(0) eleRegressionEnergy.useRecHitCollections = cms.bool(True) eleRegressionEnergy.produceValueMaps = cms.bool(True) @@ -216,7 +216,7 @@ tight = cms.InputTag("eleSelectionProducers", "tight") ) -electronMatch.src=cms.InputTag('gsfElectrons') +electronMatch.src=cms.InputTag('gedGsfElectrons') #process.trackerDrivenRemoverSeq: sequence to remove events with trackerDriven electrons #process.eleSelectionProducers: produces value maps of floats that says if the electron passes the given selection From 9d2d2a71704ed230d22c5c0760d0b41f428695f2 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Jun 2014 11:24:52 +0200 Subject: [PATCH 395/475] electron collection name defined by variable at beginning of alcaSkimming --- ALCARAW_RECO/python/alcaSkimming.py | 45 +++++++++++++-------------- ALCARAW_RECO/scripts/prodFunctions.sh | 4 ++- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 18f6ac38a5d..ff830cc14ec 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -6,7 +6,7 @@ from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet - +myEleCollection = cms.InputTag("gedGsfElectrons") #sys.path(".") ############################################################ @@ -275,7 +275,7 @@ print "[INFO] Using GT POSTLS162_V5::All" process.GlobalTag.globaltag = 'POSTLS162_V5::All' else: - process.GlobalTag.globaltag = 'GR_R_62_V3' + process.GlobalTag.globaltag = 'GR_R_62_V3::All' else: print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION sys.exit(1) @@ -287,28 +287,10 @@ process.pfIsoEgamma = cms.Sequence() if((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso - process.eleIsoSequence = setupPFElectronIso(process, 'gedGsfElectrons', 'PFIso') + process.eleIsoSequence = setupPFElectronIso(process, 'gsfGsfElectrons', 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): - # getting the ptrs - from RecoParticleFlow.PFProducer.pfLinker_cff import particleFlowPtrs - process.pfIsoEgamma*=particleFlowPtrs - process.load('CommonTools.ParticleFlow.pfNoPileUpIso_cff') - process.pfPileUp.PFCandidates = 'particleFlowPtrs' - process.pfNoPileUp.bottomCollection = 'particleFlowPtrs' - process.pfPileUpIso.PFCandidates = 'particleFlowPtrs' - process.pfNoPileUpIso.bottomCollection='particleFlowPtrs' - process.pfPileUpJME.PFCandidates = 'particleFlowPtrs' - process.pfNoPileUpJME.bottomCollection='particleFlowPtrs' - - # process.load('RecoParticleFlow/Configuration/python/RecoParticleFlow_cff') #CommonTools.ParticleFlow.PFBRECO_cff') - process.pfIsoEgamma*= process.pfNoPileUpSequence * process.pfNoPileUpIsoSequence - process.load('CommonTools.ParticleFlow.ParticleSelectors.pfSortByType_cff') - process.pfIsoEgamma*=process.pfSortByTypeSequence - #process.load('RecoEgamma.EgammaElectronProducers.electronPFIsolationDeposits_cff') - #process.load('RecoParticleFlow.PFProducer.electronPFIsolationDeposits_cff') - #pfisoALCARECO = cms.Sequence(eleIsoSequence) - process.pfIsoEgamma*= process.electronPFIsolationDepositsSequence # * process.gedElectronPFIsolationDepositsSequence + process.pfisoALCARECO = cms.Sequence() # remove any modules ###############################/ # Event filter sequence: process.filterSeq @@ -332,7 +314,7 @@ process.load('Calibration.ALCARAW_RECO.WZElectronSkims_cff') process.MinEleNumberFilter = cms.EDFilter("CandViewCountFilter", - src = cms.InputTag("gedGsfElectrons"), + src = myEleCollection, minNumber = cms.uint32(1) ) process.filterSeq = cms.Sequence(process.MinEleNumberFilter) @@ -658,7 +640,7 @@ process.schedule = cms.Schedule(process.NtuplePath, process.NtupleEndPath) process.NtuplePath) else: - if(options.doTree=='0'): + if(options.doTree==1): process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step @@ -727,3 +709,18 @@ processDumpFile = open('processDump.py', 'w') print >> processDumpFile, process.dumpPython() +########################################################## +## Set correct electron definition for required methods ## +########################################################## +process.eleRegressionEnergy.inputElectronsTag = myEleCollection +process.patElectrons.electronSource = myEleCollection +process.eleSelectionProducers.electronCollection = myEleCollection +process.PassingHLT.InputProducer = myEleCollection +process.selectedElectrons.src = myEleCollection +process.eleNewEnergiesProducer.electronCollection = myEleCollection +process.alCaIsolatedElectrons.electronLabel = myEleCollection +process.alcaElectronTracksReducer.electronLabel = myEleCollection +process.elPFIsoDepositGammaGsf.src = myEleCollection +process.elPFIsoValueCharged03PFIdRecalib.oldreferenceCollection = myEleCollection +process.elPFIsoValueGamma03PFIdRecalib.oldreferenceCollection = myEleCollection +process.elPFIsoValueNeutral03PFIdRecalib.oldreferenceCollection = myEleCollection diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index 183bc764503..7b583f8cf12 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -86,6 +86,9 @@ setEnergy(){ *Summer12*) ENERGY=8TeV ;; + *13TeV*) + ENERGY=13TeV + ;; *8TeV*) ENERGY=8TeV ;; @@ -109,7 +112,6 @@ setEnergy(){ } - setUserRemoteDirAlcarereco(){ #$1=USER_REMOTE_DIR_BASE if [ -z "${ENERGY}" -o -z "${TAG}" -o -z "${DATASETNAME}" -o -z "${RUNRANGE}" ];then From 7fa2d314d2a25d8012046a5e4a5b2614983b68e1 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Jun 2014 11:13:14 +0200 Subject: [PATCH 396/475] added ifdef for CMSSW70X --- ...SimpleCutBasedElectronIDSelectionFunctor.h | 131 +++++++++--------- .../src/EleSelectionProducers.cc | 38 ++--- 2 files changed, 88 insertions(+), 81 deletions(-) diff --git a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h index 80eba283a1b..ac53e039bda 100644 --- a/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/EleSelectionProducers/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -72,53 +72,53 @@ #include "EgammaAnalysis/ElectronTools/interface/EGammaCutBasedEleId.h" //#include "DataFormats/BeamSpot/interface/BeamSpot.h" /* -___________________________________________________________________________________ + ___________________________________________________________________________________ -Description: -^^^^^^^^^^^^ - This is a class that implements the Simple Cut Based Electron - Identification cuts. A more detailed description of the cuts - and the tuning method can be found on this twiki: + Description: + ^^^^^^^^^^^^ + This is a class that implements the Simple Cut Based Electron + Identification cuts. A more detailed description of the cuts + and the tuning method can be found on this twiki: - https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID + https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID - For more information on how to calculate the magnetic field - look here: + For more information on how to calculate the magnetic field + look here: - https://twiki.cern.ch/twiki/bin/viewauth/CMS/ConversionBackgroundRejection -___________________________________________________________________________________ + https://twiki.cern.ch/twiki/bin/viewauth/CMS/ConversionBackgroundRejection + ___________________________________________________________________________________ -How to use: -^^^^^^^^^^^ - From CMSSW39 onwards you can simply define an instance of this class: + How to use: + ^^^^^^^^^^^ + From CMSSW39 onwards you can simply define an instance of this class: - SimpleCutBasedElectronIDSelectionFunctor patSele95 - (SimpleCutBasedElectronIDSelectionFunctor::relIso95); + SimpleCutBasedElectronIDSelectionFunctor patSele95 + (SimpleCutBasedElectronIDSelectionFunctor::relIso95); - and get the decision with the following method: - pat::Electron *myElec = .....; - bool pass = patSele90(*myElec); + and get the decision with the following method: + pat::Electron *myElec = .....; + bool pass = patSele90(*myElec); - The various options are listed in the enumeration Version_t. There - is also the option to enter as a constructor argument a PSet - with your favorite cuts. -___________________________________________________________________________________ + The various options are listed in the enumeration Version_t. There + is also the option to enter as a constructor argument a PSet + with your favorite cuts. + ___________________________________________________________________________________ - Contacts: Nikolaos Rompotis and Chris Seez - Nikolaos dot Rompotis at Cern dot ch - Chris dot Seez at Cern dot ch + Contacts: Nikolaos Rompotis and Chris Seez + Nikolaos dot Rompotis at Cern dot ch + Chris dot Seez at Cern dot ch - Author: Nikolaos Rompotis - many thanks to Sal Rappoccio - Imperial College London - 7 June 2010, first commit for CMSSW_3_6_1_patchX - 11July 2010, implementing the ICHEP Egamma recommendation for - removing the Delta Eta cut in the endcaps - 30Sept 2010, simplification of conversion rejection in CMSSW39X -___________________________________________________________________________________ + Author: Nikolaos Rompotis + many thanks to Sal Rappoccio + Imperial College London + 7 June 2010, first commit for CMSSW_3_6_1_patchX + 11July 2010, implementing the ICHEP Egamma recommendation for + removing the Delta Eta cut in the endcaps + 30Sept 2010, simplification of conversion rejection in CMSSW39X + ___________________________________________________________________________________ -Strongly modified by Shervin + Strongly modified by Shervin */ @@ -157,14 +157,14 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector& ConversionsHandle, - const edm::Handle& BeamSpotHandle, - const edm::Handle& rhoHandle, - //edm::Handle< edm::ValueMap >, - edm::Handle< edm::ValueMap > &isoVals - ): - ConversionsHandle_(ConversionsHandle), + SimpleCutBasedElectronIDSelectionFunctor(Version_t version, + const edm::Handle& ConversionsHandle, + const edm::Handle& BeamSpotHandle, + const edm::Handle& rhoHandle, + //edm::Handle< edm::ValueMap >, + edm::Handle< edm::ValueMap > &isoVals + ): + ConversionsHandle_(ConversionsHandle), BeamSpotHandle_(BeamSpotHandle), rhoHandle_(rhoHandle),EgammaCutBasedEleId::IsoDepositMaps { @@ -180,16 +180,16 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector& electronsHandle, - const edm::Handle& ConversionsHandle, - const edm::Handle& BeamSpotHandle, - const edm::Handle& VertexHandle, - const edm::Handle< edm::ValueMap >& chIsoValsHandle, - const edm::Handle< edm::ValueMap >& emIsoValsHandle, - const edm::Handle< edm::ValueMap >& nhIsoValsHandle, - const edm::Handle& rhoHandle): - electronsHandle_(electronsHandle), + SimpleCutBasedElectronIDSelectionFunctor(TString versionStr, + const edm::Handle& electronsHandle, + const edm::Handle& ConversionsHandle, + const edm::Handle& BeamSpotHandle, + const edm::Handle& VertexHandle, + const edm::Handle< edm::ValueMap >& chIsoValsHandle, + const edm::Handle< edm::ValueMap >& emIsoValsHandle, + const edm::Handle< edm::ValueMap >& nhIsoValsHandle, + const edm::Handle& rhoHandle): + electronsHandle_(electronsHandle), ConversionsHandle_(ConversionsHandle), BeamSpotHandle_(BeamSpotHandle), VertexHandle_(VertexHandle), @@ -461,7 +461,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selectoreta(); - // effective area for isolation + // effective area for isolation float AEff = ElectronEffectiveArea::GetElectronEffectiveArea(ElectronEffectiveArea::kEleGammaAndNeutralHadronIso03, etaSC, ElectronEffectiveArea::kEleEAData2011); @@ -491,15 +491,20 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selectordz(); } +#ifdef CMSSW_7_0_X + double iso_ch = electron.pfIsolationVariables().sumChargedHadronPt; + double iso_em = electron.pfIsolationVariables().sumPhotonEt; + double iso_nh = electron.pfIsolationVariables().sumNeutralHadronEt; +#else // get particle flow isolation double iso_ch = (*chIsoValsHandle_)[electronRef]; double iso_em = (*emIsoValsHandle_)[electronRef]; double iso_nh = (*nhIsoValsHandle_)[electronRef]; +#endif // apply to neutrals double rhoPrime = std::max(*rhoHandle_, 0.0); double iso_n = std::max(iso_nh + iso_em - rhoPrime * AEff, 0.0); - // compute final isolation double iso = (iso_n + iso_ch) / pt; @@ -526,7 +531,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selectoreta()); Double_t rhoRel = *rhoHandle_ / eleET; - // conversion rejection variables + // conversion rejection variables @@ -538,7 +543,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector cut("pfmva_EB", double()) || ignoreCut("pfmva_EB") ) passCut(retInternal_, "pfmva_EB"); - + if ( trackIso - AeffTk_EB *rhoRel < cut("relTrackIso_EB", double()) || ignoreCut("relTrackIso_EB")) passCut(retInternal_, "relTrackIso_EB"); if ( ecalIso - AeffECAL_EB *rhoRel < cut("relEcalIso_EB", double()) || ignoreCut("relEcalIso_EB") ) @@ -568,7 +573,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector cut("pfmva_EE", double()) || ignoreCut("pfmva_EE") ) passCut(retInternal_, "pfmva_EE"); - + if ( trackIso - AeffTk_EE *rhoRel < cut("relTrackIso_EE", double()) || ignoreCut("relTrackIso_EE")) passCut(retInternal_, "relTrackIso_EE"); if ( ecalIso - AeffECAL_EE *rhoRel < cut("relEcalIso_EE", double()) || ignoreCut("relEcalIso_EE") ) @@ -610,7 +615,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector // user include files @@ -106,17 +107,17 @@ EleSelectionProducers::EleSelectionProducers(const edm::ParameterSet& iConfig): fiducial_selector("fiducial", electronsHandle, conversionsHandle, bsHandle, vertexHandle, chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), WP70_PU_selector("WP70PU", electronsHandle, conversionsHandle, bsHandle, vertexHandle, - chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), WP80_PU_selector("WP80PU", electronsHandle, conversionsHandle, bsHandle, vertexHandle, - chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), WP90_PU_selector("WP90PU", electronsHandle, conversionsHandle, bsHandle, vertexHandle, - chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), loose_selector("loose", electronsHandle, conversionsHandle, bsHandle, vertexHandle, - chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), medium_selector("medium", electronsHandle, conversionsHandle, bsHandle, vertexHandle, - chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle), tight_selector("tight", electronsHandle, conversionsHandle, bsHandle, vertexHandle, - chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle) + chIsoValsHandle, emIsoValsHandle, nhIsoValsHandle, rhoHandle) { //register your products /* Examples @@ -191,18 +192,19 @@ void EleSelectionProducers::produce(edm::Event& iEvent, const edm::EventSetup& i iEvent.getByLabel(rhoTAG,rhoHandle); //------------------------------ ISO DEPOSITS +#ifdef CMSSW_7_0_X +#else iEvent.getByLabel(chIsoValsTAG, chIsoValsHandle); if(!chIsoValsHandle.isValid()){ chIsoValsTAG=edm::InputTag(chIsoValsTAG.label().substr(0,chIsoValsTAG.label().find("PFIso",chIsoValsTAG.label().size()-6))+"Gsf", chIsoValsTAG.instance(), chIsoValsTAG.process()); emIsoValsTAG=edm::InputTag(emIsoValsTAG.label().substr(0,emIsoValsTAG.label().find("PFIso",emIsoValsTAG.label().size()-6))+"Gsf", emIsoValsTAG.instance(), emIsoValsTAG.process()); nhIsoValsTAG=edm::InputTag(nhIsoValsTAG.label().substr(0,nhIsoValsTAG.label().find("PFIso",nhIsoValsTAG.label().size()-6))+"Gsf", nhIsoValsTAG.instance(), nhIsoValsTAG.process()); - iEvent.getByLabel(chIsoValsTAG, chIsoValsHandle); - + iEvent.getByLabel(chIsoValsTAG, chIsoValsHandle); } iEvent.getByLabel(emIsoValsTAG, emIsoValsHandle); iEvent.getByLabel(nhIsoValsTAG, nhIsoValsHandle); - +#endif #ifdef DEBUG std::cout << "[DEBUG] Starting loop over electrons" << std::endl; @@ -350,14 +352,14 @@ EleSelectionProducers::fillDescriptions(edm::ConfigurationDescriptions& descript //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; -// desc.add("electronCollection","gsfElectrons"); -// desc.add("rhoFastJet","kt6PFJetsForRhoCorrection:rho"); -// desc.add("vertexCollection","offlinePrimaryVertices"); -// desc.add("conversionCollection","allConversions"); -// desc.add("BeamSpotCollection","offlineBeamSpot"); -// desc.add("chIsoVals","elPFIsoValueCharged03PFIdPFIso"); -// desc.add("emIsoVals","elPFIsoValueGamma03PFIdPFIso"); -// desc.add("nhIsoVals","elPFIsoValueNeutral03PFIdPFIso"); + // desc.add("electronCollection","gsfElectrons"); + // desc.add("rhoFastJet","kt6PFJetsForRhoCorrection:rho"); + // desc.add("vertexCollection","offlinePrimaryVertices"); + // desc.add("conversionCollection","allConversions"); + // desc.add("BeamSpotCollection","offlineBeamSpot"); + // desc.add("chIsoVals","elPFIsoValueCharged03PFIdPFIso"); + // desc.add("emIsoVals","elPFIsoValueGamma03PFIdPFIso"); + // desc.add("nhIsoVals","elPFIsoValueNeutral03PFIdPFIso"); desc.setUnknown(); descriptions.addDefault(desc); } From af52dbfa3b3fb2929b21edb84f6669b77d2eb499 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Jun 2014 10:59:18 +0200 Subject: [PATCH 397/475] ele regression patch --- ALCARAW_RECO/test/electronRegression700.patch | 38 +++++++++++++++++++ setup_git.sh | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ALCARAW_RECO/test/electronRegression700.patch diff --git a/ALCARAW_RECO/test/electronRegression700.patch b/ALCARAW_RECO/test/electronRegression700.patch new file mode 100644 index 00000000000..b087853060d --- /dev/null +++ b/ALCARAW_RECO/test/electronRegression700.patch @@ -0,0 +1,38 @@ +diff --git a/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc b/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc +index 0ddae78..86819f3 100644 +--- a/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc ++++ b/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc +@@ -67,8 +67,8 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer( const + regressionEvaluator_->initialize(regressionInputFile_.c_str(),type); + + if(produceValueMaps_) { +- produces >(nameEnergyReg_); +- produces >(nameEnergyErrorReg_); ++ produces >(nameEnergyReg_); ++ produces >(nameEnergyErrorReg_); + } + + +@@ -159,16 +159,16 @@ void RegressionEnergyPatElectronProducer::produce( edm::Event & event, const edm + std::auto_ptr patElectrons( new ElectronCollection ) ; + + // Fillers for ValueMaps: +- std::auto_ptr > regrEnergyMap(new edm::ValueMap() ); +- edm::ValueMap::Filler energyFiller(*regrEnergyMap); ++ std::auto_ptr > regrEnergyMap(new edm::ValueMap() ); ++ edm::ValueMap::Filler energyFiller(*regrEnergyMap); + +- std::auto_ptr > regrEnergyErrorMap(new edm::ValueMap() ); +- edm::ValueMap::Filler energyErrorFiller(*regrEnergyErrorMap); ++ std::auto_ptr > regrEnergyErrorMap(new edm::ValueMap() ); ++ edm::ValueMap::Filler energyErrorFiller(*regrEnergyErrorMap); + + + // Reserve the vectors with outputs +- std::vector energyValues; +- std::vector energyErrorValues; ++ std::vector energyValues; ++ std::vector energyErrorValues; + energyValues.reserve(nElectrons_); + energyErrorValues.reserve(nElectrons_); + diff --git a/setup_git.sh b/setup_git.sh index 04b147c7504..8c9655f324f 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -209,7 +209,7 @@ case $CMSSW_VERSION in # cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 # git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 # cd - >> setup.log || exit 1 - patch -p0 < $myDir/ALCARAW_RECO/test/electronRegression.patch >> setup.log || exit 1 + patch -p1 < $myDir/ALCARAW_RECO/test/electronRegression700.patch >> setup.log || exit 1 cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 cat download.url | grep '.root' | xargs wget >> setup.log || exit 1 From df77a25f4427356a591a45ecdfe1c3b6e51b3818 Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 20 Mar 2014 15:45:49 +0100 Subject: [PATCH 398/475] flag for CMSSW_7_0_X --- setup_git.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index 8c9655f324f..12669635a19 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -9,7 +9,7 @@ checkVERSION(){ CMSSW_5_3_14_patch2) echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" ;; - CMSSW_7_0_0_*) + CMSSW_7_0_*) echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" ;; *) @@ -62,7 +62,8 @@ if [ ! -d "$myDir" ];then #git checkout merge-gerosa-condor fi cd $myDir - +git branch --track devel-700pre13 origin/devel-700pre12 +git checkout devel-700pre13 cd ALCARAW_RECO/ ### if you are not Shervin download this to have some useful scripts @@ -224,8 +225,9 @@ case $CMSSW_VERSION in mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ sed -i 's|REGRESSION=3|REGRESSION=4|' Calibration/*/BuildFile.xml + echo "" >> $myDir/EleSelectionProducers/BuildFile.xml - echo "[STATUS] applying patch for CMSSW_5_X" + echo "[STATUS] applying patch for CMSSW_5_X and following" sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc @@ -246,7 +248,7 @@ esac # compile -scram b -j8 +scram b -j16 # for file in `find -name '*.url'`; # do From 3ed1326188c8cc088a607fc428b94426608b677d Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Jun 2014 11:10:19 +0200 Subject: [PATCH 399/475] safe check on hlt trigger results --- ZNtupleDumper/src/ZNtupleDumper.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 423badf72d0..e7ffd628294 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -506,7 +506,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe iEvent.getByLabel(conversionsProducerTAG, conversionsHandle); //------------------------------ HLT - iEvent.getByLabel(triggerResultsTAG, triggerResultsHandle); + /// \todo check why + if(triggerResultsTAG.label()!="") iEvent.getByLabel(triggerResultsTAG, triggerResultsHandle); iEvent.getByLabel(WZSkimResultsTAG, WZSkimResultsHandle); //Check if it is Wenu, Z or ZSC event according to triggerResults @@ -524,6 +525,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe break; } } + //------------------------------ clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, recHitCollectionEETAG); @@ -1058,6 +1060,8 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ lumiBlock = -1; } + if(!hltPaths.empty()){ + edm::TriggerNames HLTNames_ = iEvent.triggerNames(*triggerResultsHandle); int hltCount = triggerResultsHandle->size(); HLTNames[0].clear(); @@ -1068,7 +1072,7 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ (HLTResults[0]).push_back(triggerResultsHandle->accept(i)); HLTBits.insert(std::pair( hltName_str, triggerResultsHandle->accept(i))); } // for i - + } return; } From 2b0f4d1f5c47472b9c4b2c5388ed36f0ca7b6ae3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 31 Mar 2014 11:48:32 +0200 Subject: [PATCH 400/475] testing sample for clustering CMSSW700pre13 --- ALCARAW_RECO/alcareco_datasets.dat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index bff64a5a91c..ed0ff683d85 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -109,3 +109,5 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- 175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011B, RUN2011AB ########### allRange /RelValZEE_13/CMSSW_7_0_0_pre11-PU50ns_POSTLS162_V5_OldEG-v1/GEN-SIM-RECO RelValZEE_13-CMSSW_700_pre11-POSTLS162_V5_OldEG-v1 caf group/alca_ecalcalib/ecalelf/alcareco +################ personal alcareco for sam harper's test sample of CMSSW70x Drell-Yan process +allRange /DYJetsToLL_M-50_13TeV-pythia6/sharper-EGM700_PU40bx25_POSTLS170_V4-v1-df875c51917b2b4016d74c118f018fcb/USER DYJetsToLL_M-50_13TeV-pythia6 caf group/alca_ecalcalib/ecalelf/alcareco From 5faac6673895a843e41a91054c5265ca340ac462 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 31 Mar 2014 12:55:47 +0200 Subject: [PATCH 401/475] not global dbs instance --- ALCARAW_RECO/alcareco_datasets.dat | 6 +++--- ALCARAW_RECO/scripts/parseDatasetFile.sh | 2 +- ALCARAW_RECO/scripts/prodAlcareco.sh | 10 +++++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index ed0ff683d85..0603e8346d9 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -105,9 +105,9 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- 160329-173692 /DoubleElectron/Run2011A-ZElectron-08Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011A-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011A-ZElectron-08Nov2011-v1_RAW-RECO_FNAL VALID RUN2011A,RUN2011AB 175832-180252 /DoubleElectron/Run2011B-ZElectron-19Nov2011-v1_RAW-RECO DoubleElectron-ZSkim-RUN2011B-29JunRUN2011-v1 caf group/alca_ecalcalib/alcareco/7TeV/GR_R_53_V9F/DoubleElectron_Run2011B-ZElectron-19Nov2011-v1_RAW-RECO_FNAL VALID RUN2011B, RUN2011AB ##################### 2011 data 53X rereco -160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011A, RUN2011AB -175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011B, RUN2011AB +160329-173692 /DoubleElectron/Run2011A-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011A-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011A,RUN2011AB +175832-180252 /DoubleElectron/Run2011B-21Jun2013-v1/AOD DoubleElectron-ZSkim-RUN2011B-21Jun2013-v1 caf group/alca_ecalcalib/ecalelf/alcareco/ VALID RUN2011B,RUN2011AB ########### allRange /RelValZEE_13/CMSSW_7_0_0_pre11-PU50ns_POSTLS162_V5_OldEG-v1/GEN-SIM-RECO RelValZEE_13-CMSSW_700_pre11-POSTLS162_V5_OldEG-v1 caf group/alca_ecalcalib/ecalelf/alcareco ################ personal alcareco for sam harper's test sample of CMSSW70x Drell-Yan process -allRange /DYJetsToLL_M-50_13TeV-pythia6/sharper-EGM700_PU40bx25_POSTLS170_V4-v1-df875c51917b2b4016d74c118f018fcb/USER DYJetsToLL_M-50_13TeV-pythia6 caf group/alca_ecalcalib/ecalelf/alcareco +allRange /DYJetsToLL_M-50_13TeV-pythia6/sharper-EGM700_PU40bx25_POSTLS170_V4-v1-df875c51917b2b4016d74c118f018fcb/USER DYJetsToLL_M-50_13TeV-pythia6 caf group/alca_ecalcalib/ecalelf/alcareco VALID None phys03 diff --git a/ALCARAW_RECO/scripts/parseDatasetFile.sh b/ALCARAW_RECO/scripts/parseDatasetFile.sh index 0c528dacb0a..4406542ea96 100755 --- a/ALCARAW_RECO/scripts/parseDatasetFile.sh +++ b/ALCARAW_RECO/scripts/parseDatasetFile.sh @@ -25,7 +25,7 @@ case `basename $FILE` in awk '($NF!=0 && (! /^#/)) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "-t", $6}' $FILE ;; alcareco_datasets.dat) - awk '($NF!=0 && (! /^#/)) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7}' $FILE + awk '($NF!=0 && (! /^#/)) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7, "--dbs_url", $8}' $FILE ;; ntuple_datasets.dat) awk -F '\t' '($NF!=0 && (! /^#/)){if($7!=""){print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "--type", $6, "-t", $7, "--json_name", $8} else {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "--type", $6, "--json_name", $8}}' $FILE diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index a7cf43ca553..44dac53c54c 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -26,6 +26,7 @@ usage(){ echo " -n, --datasetname name" echo " --store dir" echo " --remote_dir dir" + echo " --dbs_url url: for not global dbs (user production)" echo "---------- optional" echo " --isMC: specify is the dataset is MC" echo " -s skim: ZSkim, WSkim, EleSkim" @@ -47,7 +48,7 @@ usage(){ #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,njobs:,tutorial,develRelease -- "$@") +if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,dbs_url:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,njobs:,tutorial,develRelease -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -65,6 +66,7 @@ do -r|--runrange) RUNRANGE=$2; shift;; --store) STORAGE_ELEMENT=$2; shift;; --remote_dir) USER_REMOTE_DIR_BASE=$2; shift;; + --dbs_url) DBS_URL=$2; shift;; --scheduler) SCHEDULER=$2; shift;; --isMC) TYPE=ALCARECOSIM;; --white_list) WHITELIST=$2; shift;; @@ -207,7 +209,6 @@ cat > ${crabFile} <> tmp/alcareco.cfg +fi cat >> ${crabFile} < Date: Mon, 31 Mar 2014 12:56:05 +0200 Subject: [PATCH 402/475] specific fix for one dataset --- ALCARAW_RECO/scripts/prodFunctions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ALCARAW_RECO/scripts/prodFunctions.sh b/ALCARAW_RECO/scripts/prodFunctions.sh index 7b583f8cf12..a1e3a8f9094 100644 --- a/ALCARAW_RECO/scripts/prodFunctions.sh +++ b/ALCARAW_RECO/scripts/prodFunctions.sh @@ -104,6 +104,9 @@ setEnergy(){ *SingleElectronFlat*) ENERGY=gun ;; + *sharper*) + ENERGY=13TeV + ;; *) echo "[ERROR] Center of mass energy not determined for $1" >> /dev/stderr echo " Check implementation in prodFunctions.sh" >> /dev/stderr From 80ae7af4573b5626e091221104418a6fdab0d007 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Jun 2014 11:28:46 +0200 Subject: [PATCH 403/475] electron collection name dependent on the CMSSW version --- ALCARAW_RECO/python/alcaSkimming.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index ff830cc14ec..d352f800468 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -6,7 +6,6 @@ from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet -myEleCollection = cms.InputTag("gedGsfElectrons") #sys.path(".") ############################################################ @@ -280,6 +279,11 @@ print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION sys.exit(1) +if(re.match("CMSSW_7_.*",CMSSW_VERSION)): + myEleCollection = cms.InputTag("gedGsfElectrons") +else: + myEleCollection = cms.InputTag("gsfElectrons") + #Define the sequences # # particle flow isolation From 61322b8a472376614835e90f0af4ebfca61c05dd Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 6 Jun 2014 11:31:27 +0200 Subject: [PATCH 404/475] cleaned and fixed setup git --- setup_git.sh | 62 ++++------------------------------------------------ 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index 12669635a19..b2d82380898 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -59,28 +59,13 @@ if [ ! -d "$myDir" ];then else git clone git@github.com:ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode fi - #git checkout merge-gerosa-condor fi -cd $myDir -git branch --track devel-700pre13 origin/devel-700pre12 -git checkout devel-700pre13 -cd ALCARAW_RECO/ + +cd $myDir/ALCARAW_RECO/ ### if you are not Shervin download this to have some useful scripts if [ "$USER" != "shervin" ];then -git clone https://github.com/ECALELFS/Utilities.git bin -# Please be sure to add this directory to you default PATH variable -# for bash -#PATH=$PATH:$CMSSW_BASE/src/calibration/ALCARAW_RECO/bin -# for tcsh -#setenv PATH $PATH":$CMSSW_BASE/src//calibration/SANDBOX/bin" # (I think) -### -#echo "[WARNING] Remember to do this after all cmsenv:" -#echo "# for bash -#PATH=$PATH:$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin -## for tcsh -#setenv PATH $PATH\":$CMSSW_BASE/src/$myDir/ALCARAW_RECO/bin\" -#" + git clone https://github.com/ECALELFS/Utilities.git bin fi #cd EgammaAnalysis/ElectronTools/data/ @@ -171,45 +156,7 @@ case $CMSSW_VERSION in ;; CMSSW_7_*) - #addpkg PhysicsTools/PatAlgos V08-10-05 >> setup.log -###### - Electron regression 5_3_X -# git clone https://github.com/cms-cvs-history/DataFormats-PatCandidates DataFormats/PatCandidates >> setup.log || exit 1 -# cd DataFormats/PatCandidates >> setup.log || exit 1 -# git checkout DataFormats-PatCandidates-V06-05-06-10 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 -# git clone https://github.com/cms-cvs-history/PhysicsTools-PatAlgos PhysicsTools/PatAlgos >> setup.log || exit 1 -# cd PhysicsTools/PatAlgos >> setup.log || exit 1 -# git checkout PhysicsTools-PatAlgos-V08-09-56 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 -# git clone https://github.com/cms-cvs-history/PhysicsTools-PatUtils PhysicsTools/PatUtils >> setup.log || exit 1 -# cd PhysicsTools/PatUtils >> setup.log || exit 1 -# git checkout PhysicsTools-PatUtils-V03-09-28 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 -# git clone https://github.com/cms-cvs-history/DataFormats-CaloRecHit DataFormats/CaloRecHit >> setup.log || exit 1 -# cd DataFormats/CaloRecHit >> setup.log || exit 1 -# git checkout DataFormats-CaloRecHit-V02-05-11 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 -# git clone https://github.com/cms-cvs-history/DataFormats-StdDictionaries DataFormats/StdDictionaries >> setup.log || exit 1 -# cd DataFormats/StdDictionaries >> setup.log || exit 1 -# git checkout DataFormats-StdDictionaries-V00-02-14 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 -# git clone https://github.com/cms-cvs-history/FWCore-GuiBrowsers FWCore/GuiBrowsers >> setup.log || exit 1 -# cd FWCore/GuiBrowsers >> setup.log || exit 1 -# git checkout FWCore-GuiBrowsers-V00-00-70 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 -# git clone https://github.com/cms-cvs-history/RecoMET-METProducers RecoMET/METProducers >> setup.log || exit 1 -# cd RecoMET/METProducers >> setup.log || exit 1 -# git checkout RecoMET-METProducers-V03-03-12-02 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 -# git clone https://github.com/cms-cvs-history/RecoEgamma-EgammaTools RecoEgamma/EgammaTools >> setup.log || exit 1 -# cd RecoEgamma/EgammaTools >> setup.log || exit 1 -# git checkout RecoEgamma-EgammaTools-V09-00-01 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 git-cms-addpkg EgammaAnalysis/ElectronTools >> setup.log || exit 1 -# git clone https://github.com/cms-analysis/EgammaAnalysis-ElectronTools EgammaAnalysis/ElectronTools -# cd EgammaAnalysis/ElectronTools >> setup.log || exit 1 -# git checkout EgammaAnalysis-ElectronTools-MD-21Apr2013-test-2 >> setup.log || exit 1 -# cd - >> setup.log || exit 1 patch -p1 < $myDir/ALCARAW_RECO/test/electronRegression700.patch >> setup.log || exit 1 cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 @@ -237,9 +184,8 @@ case $CMSSW_VERSION in if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then patch -p0 < $myDir/ALCARAW_RECO/test/clusterLazyTools.patch >> setup.log || exit 1 fi -# patch -p0 < $myDir/ALCARAW_RECO/test/class_def.xml.patch >> setup.log || exit 1 - cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 + cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 From 9b82b06dd2f10dd0bcb6a73f902c211060b8e16e Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 6 Jun 2014 11:51:10 +0200 Subject: [PATCH 405/475] fixed indentation in alcaSkimming --- ALCARAW_RECO/python/alcaSkimming.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index d352f800468..62a1eb11359 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -642,7 +642,6 @@ elif(options.type=='ALCARECO' or options.type=='ALCARECOSIM'): if(doTreeOnly): process.schedule = cms.Schedule(process.NtuplePath, process.NtupleEndPath) - process.NtuplePath) else: if(options.doTree==1): process.schedule = cms.Schedule(process.pathALCARECOEcalCalZElectron, process.pathALCARECOEcalCalWElectron, From a8b90ca2588e0f7e0e3cf65209ddd2faec5cd373 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 6 Jun 2014 17:30:49 +0200 Subject: [PATCH 406/475] adding documentation for local tests --- ALCARAW_RECO/doc/testingLocally.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ALCARAW_RECO/doc/testingLocally.txt diff --git a/ALCARAW_RECO/doc/testingLocally.txt b/ALCARAW_RECO/doc/testingLocally.txt new file mode 100644 index 00000000000..248af2aabfd --- /dev/null +++ b/ALCARAW_RECO/doc/testingLocally.txt @@ -0,0 +1,21 @@ +/** + * + +\page testingLocally Run locally to test + +\section localAlcareco Alcareco production + - Only alcareco: +\code +cmsRun python/alcaSkimming.py isCrab=0 type=ALCARECO doTree=0 maxEvents=300 +\endcode + - Alcareco + ntuples +\code +cmsRun python/alcaSkimming.py isCrab=0 type=ALCARECO doTree=0 maxEvents=300 +\endcode + +the \code skim=ZSkim \endcode option can be added to select events passing the ZSkim or the ZSCSkim + +Filelist: + - CMSSW_7_0_X: root://cms-xrd-global.cern.ch//store/data/Run2012D/DoubleElectron/AOD/15Apr2014-v1/00000/0EA11D35-0CD5-E311-862E-0025905A6070.root + +*/ From b129d525944e0b19c11436b9aa515239dc411dc8 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 6 Jun 2014 17:32:15 +0200 Subject: [PATCH 407/475] ZSkim WSkim ZSCSkim for ntuple production --- ALCARAW_RECO/python/WZElectronSkims_cff.py | 2 +- ALCARAW_RECO/python/alcaSkimming.py | 42 +-- ZNtupleDumper/python/zntupledumper_cfi.py | 5 +- ZNtupleDumper/src/ZNtupleDumper.cc | 351 +++++++++++---------- 4 files changed, 208 insertions(+), 192 deletions(-) diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index 404c427bd02..5864d88ff33 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -193,7 +193,7 @@ # cut = cms.string("40 27") cut = cms.string("40 #include #include +#include // root include files #include @@ -116,6 +117,9 @@ #include #include +// alcaSkimPaths +#include "DataFormats/Provenance/interface/ParameterSetID.h" + //#define DEBUG //////////////////////////////////////////////// @@ -146,9 +150,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { const edm::EventSetup *pSetup; bool isMC; - bool isWenu; bool isPartGun; - bool doHighEta; // so far doHighEta only works for Zee double doHighEta_LowerEtaCut; //Handles and inputTags @@ -182,7 +184,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { edm::InputTag metTAG; edm::InputTag triggerResultsTAG; edm::InputTag WZSkimResultsTAG; - std::vector< std::string> hltPaths; + std::vector< std::string> hltPaths, SelectEvents; private: std::string foutName; @@ -418,10 +420,20 @@ class ZNtupleDumper : public edm::EDAnalyzer { // EcalClusterLocal _ecalLocal; - + std::set alcaSkimPathIndexes; + edm::ParameterSetID alcaSkimPathID; // // static data member definitions // + + typedef enum { + ZEE=0, + WENU, + ZSC, + PARTGUN + }eventType_t; + + eventType_t eventType; }; @@ -430,9 +442,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { // ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): // isMC(iConfig.getParameter("isMC")), - isWenu(iConfig.getParameter("isWenu")), isPartGun(iConfig.getParameter("isPartGun")), - doHighEta(false), doHighEta_LowerEtaCut(iConfig.getParameter("doHighEta_LowerEtaCut")), vtxCollectionTAG(iConfig.getParameter("vertexCollection")), BeamSpotTAG(iConfig.getParameter("BeamSpotCollection")), @@ -446,6 +456,7 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): triggerResultsTAG(iConfig.getParameter("triggerResultsCollection")), WZSkimResultsTAG(iConfig.getParameter("WZSkimResultsCollection")), hltPaths(iConfig.getParameter< std::vector >("hltPaths")), + SelectEvents(iConfig.getParameter >("SelectEvents")), foutName(iConfig.getParameter("foutName")), doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), doEleIDTree(iConfig.getParameter("doEleIDTree")), @@ -453,7 +464,8 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): pdfWeightTAGS(iConfig.getParameter< std::vector >("pdfWeightCollections")), fsrWeightTAG(iConfig.getParameter< edm::InputTag>("fsrWeightCollection")), weakWeightTAG(iConfig.getParameter< edm::InputTag>("weakWeightCollection")), - fsrWeight(1.), weakWeight(1.) + fsrWeight(1.), weakWeight(1.), + eventType(ZEE) // r9weightsFilename(iConfig.getParameter("r9weightsFile")), //puWeightFile(iConfig.getParameter("puWeightFile")), //puWeights() @@ -491,7 +503,8 @@ ZNtupleDumper::~ZNtupleDumper() void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { // using namespace edm; - + eventType=ZEE; + pEvent = &iEvent; pSetup = &iSetup; @@ -502,29 +515,56 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe isMC=true; } else isMC=false; - //------------------------------ CONVERSIONS - iEvent.getByLabel(conversionsProducerTAG, conversionsHandle); - //------------------------------ HLT /// \todo check why if(triggerResultsTAG.label()!="") iEvent.getByLabel(triggerResultsTAG, triggerResultsHandle); iEvent.getByLabel(WZSkimResultsTAG, WZSkimResultsHandle); //Check if it is Wenu, Z or ZSC event according to triggerResults - edm::TriggerNames HLTNames_ = iEvent.triggerNames(*WZSkimResultsHandle); - //unsigned int hltCount = triggerResultsHandle->size(); ///\todo bug, wrong size = 444 - unsigned int hltCount=HLTNames_.size(); // should have the same size of WZSkimResultsHandle - for(unsigned int i=0; i < hltCount; i++){ - if(WZSkimResultsHandle->accept(i)){ - std::string hltName_str(HLTNames_.triggerName(i)); - if(hltName_str.find("WElectron")!=std::string::npos) - isWenu=true; - else if(hltName_str.find("ZSCElectron")!=std::string::npos) - doHighEta=true; - // this paths are exclusive, then we can skip the check of the others - break; + edm::TriggerNames alcaSkimPathNames = iEvent.triggerNames(*WZSkimResultsHandle); + + if(!SelectEvents.empty()){ + // If the alca skim paths are not changing, this is done only once + if(alcaSkimPathID != alcaSkimPathNames.parameterSetID()){ //order of trigger results is changed + alcaSkimPathID = alcaSkimPathNames.parameterSetID(); //update the map of trigger index + alcaSkimPathIndexes.clear(); + unsigned int alcaSkimPathNameSize=alcaSkimPathNames.size(); // should have the same size of WZSkimResultsHandle + + for(unsigned int i=0; i < alcaSkimPathNameSize; i++){ // look over alcaSkimPaths + std::string trgName = alcaSkimPathNames.triggerName(i); + for(std::vector::const_iterator selectEvents_itr = SelectEvents.begin(); + selectEvents_itr!=SelectEvents.end(); + selectEvents_itr++){ + if(std::regex_match(trgName, std::regex(*selectEvents_itr))){ + alcaSkimPathIndexes.insert(i); + + } + } + } } + + bool skipEvent=true; + for(std::set::const_iterator alcaSkimPath_itr = alcaSkimPathIndexes.begin(); + alcaSkimPath_itr != alcaSkimPathIndexes.end() && skipEvent==true; + alcaSkimPath_itr++){ + + if(WZSkimResultsHandle->accept(*alcaSkimPath_itr)){ + skipEvent=false; + std::string hltName_str(alcaSkimPathNames.triggerName(*alcaSkimPath_itr)); + if(hltName_str.find("WElectron")!=std::string::npos) + eventType=WENU; + else if(hltName_str.find("ZSCElectron")!=std::string::npos) + eventType=ZSC; + // this paths are exclusive, then we can skip the check of the others + break; + } + + } + + if(skipEvent) return; // event not coming from any skim or paths } + //------------------------------ CONVERSIONS + iEvent.getByLabel(conversionsProducerTAG, conversionsHandle); //------------------------------ clustertools = new EcalClusterLazyTools (iEvent, iSetup, recHitCollectionEBTAG, @@ -629,7 +669,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(doEleIDTree){ TreeSetEleIDVar(*eleIter1, *eleIter2); } - } else if (doHighEta) { + } else if (eventType==ZSC){ //leading pt electron in EB (patElectrons should be pt-ordered) // iterators storing pat Electons and HighEta SCs @@ -701,7 +741,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); eleIter1 != electronsHandle->end(); eleIter1++){ - if(isWenu){ + if(eventType==WENU){ if(! eleIter1->electronID("tight") ) continue; if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event @@ -711,12 +751,16 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if( eleIter1->et()<30) continue; doFill=true; - TreeSetDiElectronVar(*eleIter1, *eleIter1); + TreeSetSingleElectronVar(*eleIter1, 0); //fill first electron + TreeSetSingleElectronVar(*eleIter1, -1); // fill fake second electron + if(doExtraCalibTree){ - TreeSetExtraCalibVar(*eleIter1, *eleIter1); + TreeSetExtraCalibVar(*eleIter1, 0); + TreeSetExtraCalibVar(*eleIter1, -1); } if(doEleIDTree){ - TreeSetEleIDVar(*eleIter1, *eleIter1); + TreeSetEleIDVar(*eleIter1, 0); + TreeSetEleIDVar(*eleIter1, -1); } }else { for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; @@ -1061,17 +1105,16 @@ void ZNtupleDumper::TreeSetEventSummaryVar(const edm::Event& iEvent){ } if(!hltPaths.empty()){ - - edm::TriggerNames HLTNames_ = iEvent.triggerNames(*triggerResultsHandle); - int hltCount = triggerResultsHandle->size(); - HLTNames[0].clear(); - HLTBits.clear(); - for (int i = 0 ; i < hltCount; ++i) { - std::string hltName_str(HLTNames_.triggerName(i)); - (HLTNames[0]).push_back(hltName_str); - (HLTResults[0]).push_back(triggerResultsHandle->accept(i)); - HLTBits.insert(std::pair( hltName_str, triggerResultsHandle->accept(i))); - } // for i + edm::TriggerNames HLTNames_ = iEvent.triggerNames(*triggerResultsHandle); + int hltCount = triggerResultsHandle->size(); + HLTNames[0].clear(); + HLTBits.clear(); + for (int i = 0 ; i < hltCount; ++i) { + std::string hltName_str(HLTNames_.triggerName(i)); + (HLTNames[0]).push_back(hltName_str); + (HLTResults[0]).push_back(triggerResultsHandle->accept(i)); + HLTBits.insert(std::pair( hltName_str, triggerResultsHandle->accept(i))); + } // for i } return; @@ -1480,97 +1523,94 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const pat::Electron& electron2){ TreeSetSingleElectronVar(electron1, 0); - if(isWenu) TreeSetSingleElectronVar(electron2, -1); // negative index: do not fill, fill with 0 - else{ - TreeSetSingleElectronVar(electron2, 1); - - double t1=TMath::Exp(-etaEle[0]); - double t2=TMath::Exp(-etaEle[1]); - double t1q = t1*t1; - double t2q = t2*t2; + TreeSetSingleElectronVar(electron2, 1); + + double t1=TMath::Exp(-etaEle[0]); + double t2=TMath::Exp(-etaEle[1]); + double t1q = t1*t1; + double t2q = t2*t2; - double angle=1- - ( (1-t1q)*(1-t2q)+4*t1*t2*cos(phiEle[0]-phiEle[1]))/( - (1+t1q)*(1+t2q) - ); + double angle=1- + ( (1-t1q)*(1-t2q)+4*t1*t2*cos(phiEle[0]-phiEle[1]))/( + (1+t1q)*(1+t2q) + ); - invMass = sqrt(2*electron1.energy()*electron2.energy() *angle); - invMass_e5x5 = sqrt(2*electron1.e5x5()*electron2.e5x5() * - angle); + invMass = sqrt(2*electron1.energy()*electron2.energy() *angle); + invMass_e5x5 = sqrt(2*electron1.e5x5()*electron2.e5x5() * + angle); - invMass_SC = sqrt(2*energySCEle[0]*energySCEle[1] * - angle); + invMass_SC = sqrt(2*energySCEle[0]*energySCEle[1] * + angle); - invMass_rawSC = sqrt(2 * rawEnergySCEle[0] * rawEnergySCEle[1] * - angle); - - - invMass_rawSC_esSC = sqrt(2 * (rawEnergySCEle[0] + esEnergySCEle[0]) * - (rawEnergySCEle[1] + esEnergySCEle[1]) * - angle); - - invMass_SC_corr = sqrt(2*energySCEle_corr[0]*energySCEle_corr[1] * - angle); - - invMass_SC_regrCorr_ele = sqrt(2* energySCEle_regrCorr_ele[0] * energySCEle_regrCorr_ele[1] * - angle); - invMass_SC_regrCorr_pho = sqrt(2* energySCEle_regrCorr_pho[0] * energySCEle_regrCorr_pho[1] * - angle); - - invMass_SC_regrCorrSemiParV4_ele = sqrt(2* energySCEle_regrCorrSemiParV4_ele[0] * energySCEle_regrCorrSemiParV4_ele[1] * - angle); - invMass_SC_regrCorrSemiParV4_pho = sqrt(2* energySCEle_regrCorrSemiParV4_pho[0] * energySCEle_regrCorrSemiParV4_pho[1] * - angle); - invMass_SC_regrCorrSemiParV5_ele = sqrt(2* energySCEle_regrCorrSemiParV5_ele[0] * energySCEle_regrCorrSemiParV5_ele[1] * - angle); - invMass_SC_regrCorrSemiParV5_pho = sqrt(2* energySCEle_regrCorrSemiParV5_pho[0] * energySCEle_regrCorrSemiParV5_pho[1] * - angle); - invMass_SC_regrCorrSemiParV6_ele = sqrt(2* energySCEle_regrCorrSemiParV6_ele[0] * energySCEle_regrCorrSemiParV6_ele[1] * - angle); - invMass_SC_regrCorrSemiParV6_pho = sqrt(2* energySCEle_regrCorrSemiParV6_pho[0] * energySCEle_regrCorrSemiParV6_pho[1] * - angle); - invMass_SC_regrCorrSemiParV7_ele = sqrt(2* energySCEle_regrCorrSemiParV7_ele[0] * energySCEle_regrCorrSemiParV7_ele[1] * - angle); - invMass_SC_regrCorrSemiParV7_pho = sqrt(2* energySCEle_regrCorrSemiParV7_pho[0] * energySCEle_regrCorrSemiParV7_pho[1] * - angle); - invMass_SC_regrCorrSemiParV8_ele = sqrt(2* energySCEle_regrCorrSemiParV8_ele[0] * energySCEle_regrCorrSemiParV8_ele[1] * - angle); - invMass_SC_regrCorrSemiParV8_pho = sqrt(2* energySCEle_regrCorrSemiParV8_pho[0] * energySCEle_regrCorrSemiParV8_pho[1] * - angle); - - invMass_SC_regrCorrSemiPar7TeVtrainV6_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_ele[1] * - angle); - invMass_SC_regrCorrSemiPar7TeVtrainV6_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_pho[1] * - angle); - invMass_SC_regrCorrSemiPar7TeVtrainV7_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_ele[1] * - angle); - invMass_SC_regrCorrSemiPar7TeVtrainV7_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_pho[1] * - angle); - invMass_SC_regrCorrSemiPar7TeVtrainV8_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_ele[1] * - angle); - invMass_SC_regrCorrSemiPar7TeVtrainV8_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_pho[1] * - angle); - - invMass_regrCorr_fra = sqrt(2* energyEle_regrCorr_fra[0] * energyEle_regrCorr_fra[1] *angle); - invMass_regrCorr_egamma = sqrt(2* energyEle_regrCorr_egamma[0] * energyEle_regrCorr_egamma[1] *angle); - - if(electron1.genLepton()!=0 && electron2.genLepton()!=0){ - invMass_MC = sqrt(2*electron1.genLepton()->energy() *electron2.genLepton()->energy() * - angle); - } else invMass_MC = 0; - // invMass_genMC = (electron1.genLepton()->p4 + electron2.genLepton()->p4()).M(); + invMass_rawSC = sqrt(2 * rawEnergySCEle[0] * rawEnergySCEle[1] * + angle); + + + invMass_rawSC_esSC = sqrt(2 * (rawEnergySCEle[0] + esEnergySCEle[0]) * + (rawEnergySCEle[1] + esEnergySCEle[1]) * + angle); + + invMass_SC_corr = sqrt(2*energySCEle_corr[0]*energySCEle_corr[1] * + angle); + + invMass_SC_regrCorr_ele = sqrt(2* energySCEle_regrCorr_ele[0] * energySCEle_regrCorr_ele[1] * + angle); + invMass_SC_regrCorr_pho = sqrt(2* energySCEle_regrCorr_pho[0] * energySCEle_regrCorr_pho[1] * + angle); + + invMass_SC_regrCorrSemiParV4_ele = sqrt(2* energySCEle_regrCorrSemiParV4_ele[0] * energySCEle_regrCorrSemiParV4_ele[1] * + angle); + invMass_SC_regrCorrSemiParV4_pho = sqrt(2* energySCEle_regrCorrSemiParV4_pho[0] * energySCEle_regrCorrSemiParV4_pho[1] * + angle); + invMass_SC_regrCorrSemiParV5_ele = sqrt(2* energySCEle_regrCorrSemiParV5_ele[0] * energySCEle_regrCorrSemiParV5_ele[1] * + angle); + invMass_SC_regrCorrSemiParV5_pho = sqrt(2* energySCEle_regrCorrSemiParV5_pho[0] * energySCEle_regrCorrSemiParV5_pho[1] * + angle); + invMass_SC_regrCorrSemiParV6_ele = sqrt(2* energySCEle_regrCorrSemiParV6_ele[0] * energySCEle_regrCorrSemiParV6_ele[1] * + angle); + invMass_SC_regrCorrSemiParV6_pho = sqrt(2* energySCEle_regrCorrSemiParV6_pho[0] * energySCEle_regrCorrSemiParV6_pho[1] * + angle); + invMass_SC_regrCorrSemiParV7_ele = sqrt(2* energySCEle_regrCorrSemiParV7_ele[0] * energySCEle_regrCorrSemiParV7_ele[1] * + angle); + invMass_SC_regrCorrSemiParV7_pho = sqrt(2* energySCEle_regrCorrSemiParV7_pho[0] * energySCEle_regrCorrSemiParV7_pho[1] * + angle); + invMass_SC_regrCorrSemiParV8_ele = sqrt(2* energySCEle_regrCorrSemiParV8_ele[0] * energySCEle_regrCorrSemiParV8_ele[1] * + angle); + invMass_SC_regrCorrSemiParV8_pho = sqrt(2* energySCEle_regrCorrSemiParV8_pho[0] * energySCEle_regrCorrSemiParV8_pho[1] * + angle); + + invMass_SC_regrCorrSemiPar7TeVtrainV6_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV6_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV6_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV6_pho[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV7_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV7_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV7_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV7_pho[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV8_ele = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_ele[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_ele[1] * + angle); + invMass_SC_regrCorrSemiPar7TeVtrainV8_pho = sqrt(2* energySCEle_regrCorrSemiPar7TeVtrainV8_pho[0] * energySCEle_regrCorrSemiPar7TeVtrainV8_pho[1] * + angle); + + invMass_regrCorr_fra = sqrt(2* energyEle_regrCorr_fra[0] * energyEle_regrCorr_fra[1] *angle); + invMass_regrCorr_egamma = sqrt(2* energyEle_regrCorr_egamma[0] * energyEle_regrCorr_egamma[1] *angle); + + if(electron1.genLepton()!=0 && electron2.genLepton()!=0){ + invMass_MC = sqrt(2*electron1.genLepton()->energy() *electron2.genLepton()->energy() * + angle); + } else invMass_MC = 0; + // invMass_genMC = (electron1.genLepton()->p4 + electron2.genLepton()->p4()).M(); - // se non hanno fatto match con il MC? - // qual e' la frazione di Z selezionate che non matchano il MC? + // se non hanno fatto match con il MC? + // qual e' la frazione di Z selezionate che non matchano il MC? - //#ifdef shervin - // r9weight[0]=r9Weight(etaEle[0], R9Ele[0]); - // r9weight[1]=r9Weight(etaEle[1], R9Ele[1]); - //#endif - } + //#ifdef shervin + // r9weight[0]=r9Weight(etaEle[0], R9Ele[0]); + // r9weight[1]=r9Weight(etaEle[1], R9Ele[1]); + //#endif return; } @@ -1578,15 +1618,6 @@ void ZNtupleDumper:: TreeSetDiElectronVar(const pat::Electron& electron1, const void ZNtupleDumper::TreeSetDiElectronVar(const pat::Electron& electron1, const reco::SuperCluster& electron2){ TreeSetSingleElectronVar(electron1, 0); - - if(isWenu) { - std::cout << "[ERROR] TreeSetDiElectronVar(const pat::Electron&, const reco::SuperCluster&) \n" - << " is only supposed to called with doHighEta option and without isWenu option\n" - << " turned on, please protect it in your codes." << std::endl; - exit(1); - } - - TreeSetSingleElectronVar(electron2, 1); double t1=TMath::Exp(-etaEle[0]); @@ -1700,56 +1731,29 @@ void ZNtupleDumper::InitExtraCalibTree(){ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, const pat::Electron& electron2){ - recoFlagRecHitSCEle[0].clear(); - rawIdRecHitSCEle[0].clear(); - XRecHitSCEle[0].clear(); - YRecHitSCEle[0].clear(); - energyRecHitSCEle[0].clear(); - LCRecHitSCEle[0].clear(); - ICRecHitSCEle[0].clear(); - AlphaRecHitSCEle[0].clear(); - - recoFlagRecHitSCEle[1].clear(); - rawIdRecHitSCEle[1].clear(); - XRecHitSCEle[1].clear(); - YRecHitSCEle[1].clear(); - energyRecHitSCEle[1].clear(); - LCRecHitSCEle[1].clear(); - ICRecHitSCEle[1].clear(); - AlphaRecHitSCEle[1].clear(); - TreeSetExtraCalibVar(electron1, 0); - if(!isWenu) TreeSetExtraCalibVar(electron2, 1); + TreeSetExtraCalibVar(electron1, 1); return; } void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, const reco::SuperCluster& electron2){ - recoFlagRecHitSCEle[0].clear(); - rawIdRecHitSCEle[0].clear(); - XRecHitSCEle[0].clear(); - YRecHitSCEle[0].clear(); - energyRecHitSCEle[0].clear(); - LCRecHitSCEle[0].clear(); - ICRecHitSCEle[0].clear(); - AlphaRecHitSCEle[0].clear(); - - recoFlagRecHitSCEle[1].clear(); - rawIdRecHitSCEle[1].clear(); - XRecHitSCEle[1].clear(); - YRecHitSCEle[1].clear(); - energyRecHitSCEle[1].clear(); - LCRecHitSCEle[1].clear(); - ICRecHitSCEle[1].clear(); - AlphaRecHitSCEle[1].clear(); - TreeSetExtraCalibVar(electron1, 0); - if(!isWenu) TreeSetExtraCalibVar(electron2, 1); + TreeSetExtraCalibVar(electron2, 1); return; } void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int index){ + recoFlagRecHitSCEle[index].clear(); + rawIdRecHitSCEle[index].clear(); + XRecHitSCEle[index].clear(); + YRecHitSCEle[index].clear(); + energyRecHitSCEle[index].clear(); + LCRecHitSCEle[index].clear(); + ICRecHitSCEle[index].clear(); + AlphaRecHitSCEle[index].clear(); + // EcalIntercalibConstantMap icMap = icHandle->get() std::vector< std::pair > hitsAndFractions_ele1 = electron1.superCluster()->hitsAndFractions(); nHitsSCEle[index] = hitsAndFractions_ele1.size(); @@ -1807,6 +1811,15 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int ind void ZNtupleDumper::TreeSetExtraCalibVar(const reco::SuperCluster& electron1, int index){ + recoFlagRecHitSCEle[index].clear(); + rawIdRecHitSCEle[index].clear(); + XRecHitSCEle[index].clear(); + YRecHitSCEle[index].clear(); + energyRecHitSCEle[index].clear(); + LCRecHitSCEle[index].clear(); + ICRecHitSCEle[index].clear(); + AlphaRecHitSCEle[index].clear(); + std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); nHitsSCEle[index] = hitsAndFractions_ele1.size(); @@ -1918,7 +1931,7 @@ void ZNtupleDumper::InitEleIDTree(){ void ZNtupleDumper::TreeSetEleIDVar(const pat::Electron& electron1, const pat::Electron& electron2){ TreeSetEleIDVar(electron1, 0); - if(isWenu) TreeSetEleIDVar(electron1, -1); + TreeSetEleIDVar(electron2, 1); return; } From 71e65186d4c7c512f8b51050f65b3dbc48a655ff Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 9 Jun 2014 14:50:51 +0200 Subject: [PATCH 408/475] slc5 resources for caf --- ALCARAW_RECO/scripts/prodAlcareco.sh | 2 +- ALCARAW_RECO/scripts/prodNtuples.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index 44dac53c54c..d270441f963 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -214,7 +214,7 @@ queue = 1nd #resource = type==SLC5_64 [CAF] queue = cmscaf1nd -#resource = type==SLC5_64 +resource = type==SLC5_64 [CMSSW] diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index ebe46a18777..de155dd0708 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -341,7 +341,7 @@ use_parent=0 queue = 1nh [CAF] queue = cmscaf1nd - +resource = type==SLC5_64 [USER] From e62afd3f03410b793bb7f93832b0692a64b5cfed Mon Sep 17 00:00:00 2001 From: Shervin Date: Thu, 12 Jun 2014 12:53:45 +0200 Subject: [PATCH 409/475] updated paths and scripts --- ALCARAW_RECO/python/alcaSkimming.py | 45 +++++++++++++++++------- ALCARAW_RECO/scripts/parseDatasetFile.sh | 2 +- ALCARAW_RECO/scripts/prodNtuples.sh | 22 ++++++++---- 3 files changed, 50 insertions(+), 19 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 72ddca86561..fe904ca3d1b 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -30,7 +30,7 @@ "", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, - "type of skim: ZSkim, WSkim, partGun, EleSkim (at least one electron), ''") + "type of skim: ZSkim, WSkim, ZHLTSkim, partGun, EleSkim (at least one electron), ''") options.register('jsonFile', "", VarParsing.VarParsing.multiplicity.singleton, @@ -55,7 +55,7 @@ ### setup any defaults you want options.output="alcaSkimALCARAW.root" options.secondaryOutput="ntuple.root" -options.files= "root://eoscms//eos/cms/store/group/alca_ecalcalib/ALCARAW/RAW-RECO_533.root" +options.files= "" options.maxEvents = -1 # -1 means all events ### get and parse the command line arguments options.parseArguments() @@ -65,7 +65,8 @@ ############################################################ # Use the options -# Do you want to filter events? +# Do you want to filter events? +HLTFilter = False ZSkim = False WSkim = False @@ -73,6 +74,8 @@ ZSkim=True elif(options.skim=="WSkim"): WSkim=True +elif(options.skim=="ZHLTSkim"): + HLTFilter=True else: if(options.type=="ALCARAW"): print "[ERROR] no skim selected" @@ -275,7 +278,8 @@ process.GlobalTag.globaltag = 'POSTLS162_V5::All' else: process.GlobalTag.globaltag = 'GR_R_62_V3::All' - process.source.fileNames=[ 'root://cms-xrd-global.cern.ch//store/data/Run2012D/DoubleElectron/AOD/15Apr2014-v1/00000/0EA11D35-0CD5-E311-862E-0025905A6070.root' ] + if(options.files==""): + process.source.fileNames=[ 'root://cms-xrd-global.cern.ch//store/data/Run2012D/DoubleElectron/AOD/15Apr2014-v1/00000/0EA11D35-0CD5-E311-862E-0025905A6070.root' ] else: print "[ERROR]::Global Tag not set for CMSSW_VERSION: ", CMSSW_VERSION sys.exit(1) @@ -324,16 +328,24 @@ ) process.filterSeq = cms.Sequence(process.MinEleNumberFilter) +if (HLTFilter): + from HLTrigger.HLTfilters.hltHighLevel_cfi import * + process.ZEEHltFilter = copy.deepcopy(hltHighLevel) + process.ZEEHltFilter.throw = cms.bool(False) + process.ZEEHltFilter.HLTPaths = [ "HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_*"] + process.filterSeq *= process.ZEEHltFilter from HLTrigger.HLTfilters.hltHighLevel_cfi import * process.NtupleFilter = copy.deepcopy(hltHighLevel) process.NtupleFilter.throw = cms.bool(False) process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalWElectron', - 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron', - 'pathALCARECOEcalUncalZSCElectron', 'pathALCARECOEcalCalZSCElectron', + 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalWElectron', + 'pathALCARECOEcalUncalZSCElectron', 'pathALCARECOEcalCalZSCElectron', + 'pathALCARECOEcalUncalSingleElectron', 'pathALCARECOEcalCalSingleElectron', ] process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCARECO") # +process.NtupleFilterSeq = cms.Sequence() if(ZSkim): # process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalUncalZElectron', @@ -342,9 +354,10 @@ elif(WSkim): # process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalWElectron', 'pathALCARECOEcalUncalWElectron' ] -#else: -# process.NtupleFilterSeq = cms.Sequence() -process.NtupleFilterSeq = cms.Sequence() +else: + + process.NtupleFilterSeq = cms.Sequence() + if(options.skim=="partGun"): process.zNtupleDumper.isPartGun = cms.bool(True) @@ -523,7 +536,7 @@ process.seqALCARECOEcalCalElectron ) #* process.hltReporter) -process.NtuplePath = cms.Path(process.filterSeq * process.FilterSeq * process.WZFilter * process.NtupleFilterSeq +process.NtuplePath = cms.Path(process.filterSeq * process.FilterSeq * process.NtupleFilterSeq * process.pdfWeightsSeq * process.ntupleSeq) process.NtupleEndPath = cms.EndPath( process.zNtupleDumper) @@ -607,6 +620,7 @@ process.outputALCARECO.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalCalWElectron') ) + process.NtupleFilterSeq = cms.Sequence(process.WZFilter) elif(options.skim=='ZSkim'): process.outputALCARAW.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron') @@ -614,6 +628,7 @@ process.outputALCARECO.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalZSCElectron') ) + process.NtupleFilterSeq = cms.Sequence(process.WZFilter) else: #if(options.skim=="" or options.skim=="none" or options.skim=="no" or options.skim=="partGun"): process.outputALCARAW.SelectEvents = cms.untracked.PSet( @@ -622,7 +637,7 @@ process.outputALCARECO.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalCalSingleElectron') ) - + if(options.type=='ALCARAW'): process.schedule = cms.Schedule( #process.raw2digi_step,process.L1Reco_step, @@ -655,7 +670,7 @@ process.pathALCARECOEcalCalZSCElectron, process.ALCARECOoutput_step, process.NtuplePath, process.NtupleEndPath ) # fix the output modules - if(options.skim==""): + if(options.skim=="" or options.skim=="ZHLTSkim"): process.schedule += cms.Schedule(process.pathALCARECOEcalCalSingleElectron) @@ -719,6 +734,12 @@ ########################################################## ## Set correct electron definition for required methods ## ########################################################## +process.selectedElectrons.src = myEleCollection +process.PassingVeryLooseId.src = myEleCollection +process.PassingMediumId.src = myEleCollection +process.PassingTightId.src = myEleCollection +process.PassingHLT.InputProducer = myEleCollection + process.eleRegressionEnergy.inputElectronsTag = myEleCollection process.patElectrons.electronSource = myEleCollection process.eleSelectionProducers.electronCollection = myEleCollection diff --git a/ALCARAW_RECO/scripts/parseDatasetFile.sh b/ALCARAW_RECO/scripts/parseDatasetFile.sh index 4406542ea96..f31e868b7ca 100755 --- a/ALCARAW_RECO/scripts/parseDatasetFile.sh +++ b/ALCARAW_RECO/scripts/parseDatasetFile.sh @@ -25,7 +25,7 @@ case `basename $FILE` in awk '($NF!=0 && (! /^#/)) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "-t", $6}' $FILE ;; alcareco_datasets.dat) - awk '($NF!=0 && (! /^#/)) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7, "--dbs_url", $8}' $FILE + awk '($NF!=0 && (! /^#/) && (NF>7 && $8!="-")) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7, "--dbs_url", $8}; ($NF!=0 && (! /^#/) && (NF==7|| $8=="-")){print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7};' $FILE ;; ntuple_datasets.dat) awk -F '\t' '($NF!=0 && (! /^#/)){if($7!=""){print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "--type", $6, "-t", $7, "--json_name", $8} else {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "--type", $6, "--json_name", $8}}' $FILE diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index de155dd0708..1851daa5f49 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -17,6 +17,7 @@ DOTREE=1 PDFSYST=1 SKIM="" OUTFILES="ntuple.root" +crabFile=tmp/ntuple.cfg usage(){ echo "`basename $0` {parseDatasetFile options} --type={type} [options]" @@ -63,6 +64,7 @@ expertUsage(){ echo " --ui_working_dir arg: crab task folder (=${UI_WORKING_DIR})" echo " --extraName arg: additional name for folder structure (to make different versions) (='')" echo " --file_per_job arg: number of files to process in 1 job (=1)" + echo " --develRelease: CRAB do not check if the CMSSW version is in production (only if you are sure what you are doing)" } @@ -70,7 +72,7 @@ expertUsage(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,isParticleGun,ntuple_remote_dir:,json:,tag:,type:,json_name:,sandbox_remote_dir:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,createOnly,submitOnly,check,file_per_job: -- "$@") +if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,isParticleGun,ntuple_remote_dir:,json:,tag:,type:,json_name:,sandbox_remote_dir:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,createOnly,submitOnly,check,file_per_job:,develRelease -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -150,6 +152,8 @@ do --check) echo "[OPTION] checking jobs"; CHECK=y; EXTRAOPTION="--check"; unset CREATE; unset SUBMIT;; --file_per_job) FILE_PER_JOB=$2; shift ;; + --develRelease) echo "[OPTION] Request also CMSSW release not in production!"; DEVEL_RELEASE=y;; + (--) shift; break;; (-*) usage; echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; (*) break;; @@ -298,7 +302,7 @@ USER_REMOTE_DIR=$USER_REMOTE_DIR/unmerged OUTFILES=`echo $OUTFILES | sed 's|^,||'` if [ ! -d "tmp" ];then mkdir tmp/; fi -cat > tmp/crab.cfg < ${crabFile} <> tmp/crab.cfg <> ${crabFile} <> tmp/crab.cfg <> ${crabFile} <> tmp/crab.cfg <> ${crabFile} <> ${crabFile} < Date: Thu, 12 Jun 2014 12:54:13 +0200 Subject: [PATCH 410/475] added CMSSW_7_0_X rereco of 2012 data --- ALCARAW_RECO/alcareco_datasets.dat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 0603e8346d9..afb2d2632c1 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -111,3 +111,8 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- allRange /RelValZEE_13/CMSSW_7_0_0_pre11-PU50ns_POSTLS162_V5_OldEG-v1/GEN-SIM-RECO RelValZEE_13-CMSSW_700_pre11-POSTLS162_V5_OldEG-v1 caf group/alca_ecalcalib/ecalelf/alcareco ################ personal alcareco for sam harper's test sample of CMSSW70x Drell-Yan process allRange /DYJetsToLL_M-50_13TeV-pythia6/sharper-EGM700_PU40bx25_POSTLS170_V4-v1-df875c51917b2b4016d74c118f018fcb/USER DYJetsToLL_M-50_13TeV-pythia6 caf group/alca_ecalcalib/ecalelf/alcareco VALID None phys03 +################ CMSSW_7_0_1 2012 data rereco +190645-193621 /DoubleElectron/Run2012A-15Apr2014-v2/AOD DoubleElectron-ZHLTSkimPath-RUN2012A-15Apr-v2 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD - +193834-196531 /DoubleElectron/Run2012B-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012B-15Apr-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD - +198022-203742 /DoubleElectron/Run2012C-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012C-15Apr-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABC,RUN2012ABCD - +203777-208686 /DoubleElectron/Run2012D-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012D-15Apr-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD - From bf8f2de4ca824eac1b835da843479e697d3b0303 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 13 Jun 2014 10:37:21 +0200 Subject: [PATCH 411/475] fix #20 in devel branch (will be merged with master) --- setup_git.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup_git.sh b/setup_git.sh index b2d82380898..6368e8e2908 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -129,8 +129,8 @@ case $CMSSW_VERSION in ###### New Josh regression mkdir HiggsAnalysis/ cd HiggsAnalysis/ - git clone https://github.com/bendavid/GBRLikelihood.git - git clone https://github.com/bendavid/GBRLikelihoodEGTools.git + git clone -b legacyCompatibility https://github.com/bendavid/GBRLikelihood.git + git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihoodEGTools.git cd - mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ @@ -166,8 +166,8 @@ case $CMSSW_VERSION in ###### New Josh regression mkdir HiggsAnalysis/ cd HiggsAnalysis/ - git clone https://github.com/bendavid/GBRLikelihood.git - git clone https://github.com/bendavid/GBRLikelihoodEGTools.git + git clone -b legacyCompatibility https://github.com/bendavid/GBRLikelihood.git + git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihoodEGTools.git cd - mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ From 71267ee291e9727daf8f81968112d313c7a55fb5 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 13 Jun 2014 12:11:29 +0200 Subject: [PATCH 412/475] added 15Apr rereco of 2012 data in CMSSW_70X --- ALCARAW_RECO/ntuple_datasets.dat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 12c8dd81863..817ba2fff9b 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -244,3 +244,7 @@ allRange /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10 allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM - pdfWeights_GainSwitch_v4 allRange /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_S10_START53_V7C-v2/AODSIM DYJets_sherpa-Summer12-START53-ZSkim caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM allRange /SingleElectronFlatPt10To300_pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM SingleElectronGun_Pt10to300-Summer12-START53 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +190645-193621 /DoubleElectron/Run2012A-15Apr2014-v2/AOD DoubleElectron-ZHLTSkimPath-RUN2012A-15Apr-v2 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +193834-196531 /DoubleElectron/Run2012B-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012B-15Apr-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +198022-203742 /DoubleElectron/Run2012C-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012C-15Apr-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +203777-208686 /DoubleElectron/Run2012D-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012D-15Apr-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 From 6984f793a3e13202c9cefd8c305382cf3aa92af7 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 13 Jun 2014 12:12:34 +0200 Subject: [PATCH 413/475] ZHLT skim added --- ALCARAW_RECO/python/alcaSkimming.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index fe904ca3d1b..7a3452baeb1 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -743,8 +743,7 @@ process.eleRegressionEnergy.inputElectronsTag = myEleCollection process.patElectrons.electronSource = myEleCollection process.eleSelectionProducers.electronCollection = myEleCollection -process.PassingHLT.InputProducer = myEleCollection -process.selectedElectrons.src = myEleCollection +process.electronMatch.src = myEleCollection process.eleNewEnergiesProducer.electronCollection = myEleCollection process.alCaIsolatedElectrons.electronLabel = myEleCollection process.alcaElectronTracksReducer.electronLabel = myEleCollection From 40b3ac2daa447475b5e48cbedcfa62f3e66849bc Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 13 Jun 2014 12:13:37 +0200 Subject: [PATCH 414/475] fixed ZNtupleDumper --- ZNtupleDumper/src/ZNtupleDumper.cc | 118 +++++++++++++++-------------- 1 file changed, 62 insertions(+), 56 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 43029de5d73..d73e1e68fa1 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -430,7 +430,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { ZEE=0, WENU, ZSC, - PARTGUN + PARTGUN, + UNKNOWN }eventType_t; eventType_t eventType; @@ -503,7 +504,7 @@ ZNtupleDumper::~ZNtupleDumper() void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { // using namespace edm; - eventType=ZEE; + eventType= isPartGun ? PARTGUN : UNKNOWN; pEvent = &iEvent; pSetup = &iSetup; @@ -555,12 +556,16 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe eventType=WENU; else if(hltName_str.find("ZSCElectron")!=std::string::npos) eventType=ZSC; + else if(hltName_str.find("ZElectron")!=std::string::npos) + eventType=ZEE; + else if(hltName_str.find("SingleElectron")!=std::string::npos) + eventType=UNKNOWN; // this paths are exclusive, then we can skip the check of the others break; } } - + assert(!skipEvent); if(skipEvent) return; // event not coming from any skim or paths } //------------------------------ CONVERSIONS @@ -637,7 +642,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } bool doFill=false; - if(isPartGun){ + if(eventType==PARTGUN){ pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); pat::ElectronCollection::const_iterator eleIter2 = eleIter1; for(eleIter1 = electronsHandle->begin(); @@ -669,6 +674,58 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(doEleIDTree){ TreeSetEleIDVar(*eleIter1, *eleIter2); } + } else if(eventType==ZEE || eventType==WENU || eventType==UNKNOWN){ + for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); + eleIter1 != electronsHandle->end(); + eleIter1++){ + if(eventType==WENU){ + if(! eleIter1->electronID("tight") ) continue; + if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event + + // MET/MT selection + if( met.et() < 25. ) continue; + if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 50. ) continue; + if( eleIter1->et()<30) continue; + + doFill=true; + TreeSetSingleElectronVar(*eleIter1, 0); //fill first electron + TreeSetSingleElectronVar(*eleIter1, -1); // fill fake second electron + + if(doExtraCalibTree){ + TreeSetExtraCalibVar(*eleIter1, 0); + TreeSetExtraCalibVar(*eleIter1, -1); + } + if(doEleIDTree){ + TreeSetEleIDVar(*eleIter1, 0); + TreeSetEleIDVar(*eleIter1, -1); + } + }else { //ZEE or UNKNOWN + // take only the fist di-electron pair (highest pt) + for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; + eleIter2 != electronsHandle->end() && doFill==false; + eleIter2++){ + // should exit when eleIter1 == end-1 + //if(! eleIter2->electronID("loose") ) continue; + + float mass=(eleIter1->p4()+eleIter2->p4()).mass(); + if((mass < 55 || mass > 125)) continue; + + doFill=true; + TreeSetDiElectronVar(*eleIter1, *eleIter2); + + if(doExtraCalibTree){ + TreeSetExtraCalibVar(*eleIter1, *eleIter2); + } + if(doEleIDTree){ + TreeSetEleIDVar(*eleIter1, *eleIter2); + } + if(doPdfSystTree && isMC){ + TreeSetPdfSystVar(iEvent); + //pdfSystTree->Fill(); + } + } + } + } } else if (eventType==ZSC){ //leading pt electron in EB (patElectrons should be pt-ordered) @@ -736,59 +793,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetExtraCalibVar(*PatEle1, *HighEtaSC1); } } - - } else { - for( pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); - eleIter1 != electronsHandle->end(); - eleIter1++){ - if(eventType==WENU){ - if(! eleIter1->electronID("tight") ) continue; - if( nWP70 != 1 || nWP90 > 0 ) continue; //to be a Wenu event request only 1 ele WP70 in the event - - // MET/MT selection - if( met.et() < 25. ) continue; - if( sqrt( 2.*eleIter1->et()*met.et()*(1 -cos(eleIter1->phi()-met.phi()))) < 50. ) continue; - if( eleIter1->et()<30) continue; - - doFill=true; - TreeSetSingleElectronVar(*eleIter1, 0); //fill first electron - TreeSetSingleElectronVar(*eleIter1, -1); // fill fake second electron - - if(doExtraCalibTree){ - TreeSetExtraCalibVar(*eleIter1, 0); - TreeSetExtraCalibVar(*eleIter1, -1); - } - if(doEleIDTree){ - TreeSetEleIDVar(*eleIter1, 0); - TreeSetEleIDVar(*eleIter1, -1); - } - }else { - for(pat::ElectronCollection::const_iterator eleIter2 = eleIter1+1; - eleIter2 != electronsHandle->end(); - eleIter2++){ - // should exit when eleIter1 == end-1 - //if(! eleIter2->electronID("loose") ) continue; - - float mass=(eleIter1->p4()+eleIter2->p4()).mass(); - if((mass < 55 || mass > 125)) continue; - - doFill=true; - TreeSetDiElectronVar(*eleIter1, *eleIter2); - - if(doExtraCalibTree){ - TreeSetExtraCalibVar(*eleIter1, *eleIter2); - } - if(doEleIDTree){ - TreeSetEleIDVar(*eleIter1, *eleIter2); - } - if(doPdfSystTree && isMC){ - TreeSetPdfSystVar(iEvent); - //pdfSystTree->Fill(); - } - } - } - } } + if(doFill){ tree->Fill(); From 4cdddf5c2479cd39ddd713f306341968ebd514a9 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 20 Jun 2014 13:48:36 +0200 Subject: [PATCH 415/475] fixing documentation --- README | 4 ++++ ZFitter/bin/ZFitter.cpp | 42 ++++++++++++++++++++++++++++++++--------- fulldoc | 6 +++--- 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/README b/README index ff1c08fe6bb..ed4c798aed9 100644 --- a/README +++ b/README @@ -1,5 +1,9 @@ /** * \mainpage +* \author Shervin Nourbakhsh +* +* +* * \ref preReq * * \ref page1 diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index b36838caa67..02f2b8059c4 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1,5 +1,19 @@ -#include -#include +/// Zee Fit program + +/**\file +The aim of the program is to provide a common interface to all the Z +fitting algorithms reading and combining in the proper way the +configuration files. + + \todo + - remove commonCut from category name and add it in the ZFit_class in order to not repeate the cut + - make alpha fitting more generic (look for alphaName) + - Implement the iterative Et dependent scale corrections + +*/ + +#include +#include #include #include #include @@ -12,6 +26,8 @@ #include #include +/// @cond SHOW +/// \code #include "../interface/ZFit_class.hh" #include "../interface/puWeights_class.hh" #include "../interface/r9Weights_class.hh" @@ -22,6 +38,11 @@ #include "../interface/addBranch_class.hh" #include "../interface/RooSmearer.hh" + +#include "../src/nllProfile.cc" +/// \endcode +/// @endcond + #include //#include //#include @@ -43,26 +64,29 @@ #include #include + #define profile //#define DEBUG #define smooth -#include "../src/nllProfile.cc" + //#include "../macro/loop.C" // a way to use compiled macros with ZFitter //using namespace std; using namespace RooStats; -/** - \todo - - remove commonCut from category name and add it in the ZFit_class in order to not repeate the cut - - make alpha fitting more generic (look for alphaName) - - Implement the iterative Et dependent scale corrections -*/ +///\endcond + +/// map that associates the name of the tree and the pointer to the chain typedef std::map< TString, TChain* > chain_map_t; +/// map that associates the name of the tag to the chain_map_t typedef std::map< TString, chain_map_t > tag_chain_map_t; + +/** Function parsing the region files + * \retval vector of strings, each string is one region + */ std::vector ReadRegionsFromFile(TString fileName){ ifstream file(fileName); std::vector regions; diff --git a/fulldoc b/fulldoc index 90282996485..c88970bf797 100644 --- a/fulldoc +++ b/fulldoc @@ -365,7 +365,7 @@ GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = SHOW # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in @@ -459,7 +459,7 @@ WARN_LOGFILE = fulldoc-warn.log # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ZNtupleDumper ZFitter ./ +INPUT = ZNtupleDumper ZFitter ./ ZFitter/bin # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -976,7 +976,7 @@ PERLMOD_MAKEVAR_PREFIX = # evaluate all C-preprocessor directives found in the sources and include # files. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = NO # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional From dd81bb74d793ae41089ad5d863a26505afa57276 Mon Sep 17 00:00:00 2001 From: Shervin Nourbakhsh Date: Fri, 20 Jun 2014 15:09:53 +0200 Subject: [PATCH 416/475] fixup! fixing documentation --- ZFitter/bin/ZFitter.cpp | 143 ++++++++++++++++++------------------ ZFitter/doc/configFiles.txt | 20 +++-- ZFitter/src/nllProfile.cc | 5 ++ fulldoc | 2 +- 4 files changed, 90 insertions(+), 80 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 02f2b8059c4..3a44b067a92 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -80,12 +80,16 @@ using namespace RooStats; /// map that associates the name of the tree and the pointer to the chain typedef std::map< TString, TChain* > chain_map_t; -/// map that associates the name of the tag to the chain_map_t + +/** \brief map that associates the name of the tag to the chain_map_t + * + * the logic is better described in \ref validationConfig + */ typedef std::map< TString, chain_map_t > tag_chain_map_t; /** Function parsing the region files - * \retval vector of strings, each string is one region + * \retval vector of strings, each string is the name of one region */ std::vector ReadRegionsFromFile(TString fileName){ ifstream file(fileName); @@ -115,18 +119,27 @@ std::vector ReadRegionsFromFile(TString fileName){ } +/** + * This function reassociates the chains as friends of the "selected" tree. + * + * This function should be run when new chains or files are added to the tagChainMap. + * + */ void UpdateFriends(tag_chain_map_t& tagChainMap, TString regionsFileNameTag){ - +//void UpdateFriends(tag_chain_map_t& tagChainMap){ + // loop over all the tags for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ + // take the selected tree of that tag TChain *chain = (tag_chain_itr->second.find("selected"))->second; - // std::cout << chain->GetName() << std::endl; + + // loop over all the trees for(chain_map_t::const_iterator chain_itr=tag_chain_itr->second.begin(); chain_itr!=tag_chain_itr->second.end(); chain_itr++){ - if(chain_itr->first!="selected"){ + if(chain_itr->first!="selected"){ //except the selected if(chain->GetFriend(chain_itr->first)==NULL){ std::cout << "[STATUS] Adding friend branch: " << chain_itr->first << " to tag " << tag_chain_itr->first << std::endl; @@ -147,18 +160,28 @@ void Dump(tag_chain_map_t& tagChainMap, TString tag="s", Long64_t firstentry=0){ (tagChainMap[tag])["selected"]->Scan("etaEle:R9Ele:energySCEle_regrCorrSemiParV5_pho/cosh(etaSCEle):smearerCat:catName","","col=5:4:5:3:50",5,firstentry); }; +/** + * \param tagChainMap map of all the tags declared in the validation config file + * \param tag name of the new \b tag created by the function, all the existent tags with name starting with +b tag are merged in the new \b tag + * + * A new tagChain with name=tag is added to the tagChainMap. All the tagChains with tag starting with \b tag are merged + * After the merging the friend list is updated by \ref UpdateFriends + */ void MergeSamples(tag_chain_map_t& tagChainMap, TString regionsFileNameTag, TString tag="s"){ std::pair pair_tmp_tag(tag,chain_map_t()); // make_pair not work with scram b tagChainMap.insert(pair_tmp_tag); + //loop over all the tags for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ + // consider tags matching the tag input parameter if(tag_chain_itr->first.CompareTo(tag)==0 || !tag_chain_itr->first.Contains(tag)) continue; //do it for each sample - //TChain *chain = (tag_chain_itr->second.find("selected"))->second; - // std::cout << chain->GetName() << std::endl; + + // loop over all the trees for(chain_map_t::const_iterator chain_itr=tag_chain_itr->second.begin(); chain_itr!=tag_chain_itr->second.end(); chain_itr++){ @@ -178,46 +201,48 @@ void MergeSamples(tag_chain_map_t& tagChainMap, TString regionsFileNameTag, TStr } -TChain * addChainAndFriends(TString chainName, std::vector chain_vec){ - TChain *sumChain = new TChain(chainName,""); - - std::map friends_map; - for(std::vector::const_iterator chain_itr = chain_vec.begin(); - chain_itr!=chain_vec.end(); - chain_itr++){ - - TList *friendList= (*chain_itr)->GetListOfFriends(); - TIter newfriend_itr(friendList); - - for(TFriendElement *friendElement = (TFriendElement*) newfriend_itr.Next(); - friendElement != NULL; friendElement = (TFriendElement*) newfriend_itr.Next()){ - TString treeName=friendElement->GetTreeName(); - std::cout << "[STATUS] Adding new friend " << treeName << std::endl; - std::map::iterator map_itr = friends_map.find(treeName); - if(map_itr==friends_map.end()){ - friends_map[treeName] = new TChain(treeName,""); - } - friends_map[treeName]->Add((TChain *)friendElement->GetTree()); - } - } +/** + * \brief Function returning the name of the energy branch given the name of the invariant mass + */ +std::string energyBranchNameFromInvMassName(std::string invMass_var){ - for(std::vector::const_iterator chain_itr = chain_vec.begin(); - chain_itr!=chain_vec.end(); - chain_itr++){ - sumChain->Add(*chain_itr); - } + std::string energyBranchName=""; + if(invMass_var=="invMass_SC_regrCorr_ele") energyBranchName = "energySCEle_regrCorr_ele"; + else if(invMass_var=="invMass_SC_regrCorr_pho") energyBranchName = "energySCEle_regrCorr_pho"; + else if(invMass_var=="invMass_regrCorr_fra") energyBranchName = "energyEle_regrCorr_fra"; + else if(invMass_var=="invMass_regrCorr_egamma") energyBranchName = "energyEle_regrCorr_egamma"; + else if(invMass_var=="invMass_SC") energyBranchName = "energySCEle"; + else if(invMass_var=="invMass_SC_corr") energyBranchName = "energySCEle_corr"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV4_ele") energyBranchName = "energySCEle_regrCorrSemiParV4_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV4_pho") energyBranchName = "energySCEle_regrCorrSemiParV4_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV5_ele") energyBranchName = "energySCEle_regrCorrSemiParV5_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV5_pho") energyBranchName = "energySCEle_regrCorrSemiParV5_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV6_ele") energyBranchName = "energySCEle_regrCorrSemiParV6_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV6_pho") energyBranchName = "energySCEle_regrCorrSemiParV6_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV7_ele") energyBranchName = "energySCEle_regrCorrSemiParV7_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV7_pho") energyBranchName = "energySCEle_regrCorrSemiParV7_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV8_ele") energyBranchName = "energySCEle_regrCorrSemiParV8_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiParV8_pho") energyBranchName = "energySCEle_regrCorrSemiParV8_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_pho"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_ele"; + else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_pho"; - for(std::map::const_iterator map_itr = friends_map.begin(); - map_itr != friends_map.end(); - map_itr++){ - sumChain->AddFriend(map_itr->second); + else { + std::cerr << "Energy branch name not define for invariant mass branch: " << invMass_var << std::endl; + exit(1); } - sumChain->GetListOfFriends()->Print(); - return sumChain; + return energyBranchName; } +TString energyBranchNameFromInvMassName(TString invMass_var){ + return TString( (energyBranchNameFromInvMassName(std::string(invMass_var))).c_str()); +} + int main(int argc, char **argv) { TStopwatch myClock; @@ -227,6 +252,8 @@ int main(int argc, char **argv) { puWeights_class puWeights; std::cout << "============================== Z General Fitter" << std::endl; + //------------------------------------------------------------ + // parsing input options to the program using namespace boost; namespace po = boost::program_options; unsigned int nEvents_runDivide=100000; @@ -262,9 +289,7 @@ int main(int argc, char **argv) { std::string minimType; std::vector branchList; - // std::vector signalFriends, - // bool _ZFit_class, _RooSmearer; - + //------------------------------ setting option categories po::options_description desc("Main options"); po::options_description outputOption("Output options"); po::options_description inputOption("Input options"); @@ -275,6 +300,7 @@ int main(int argc, char **argv) { //po::options_description cmd_line_options; //cmd_line_options.add(desc).add(fitOption).add(smearOption); + //------------------------------ adding options' description desc.add_options() ("help,h","Help message") ("loop","") @@ -388,6 +414,8 @@ int main(int argc, char **argv) { po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); + + //------------------------------ checking options if(!vm.count("invMass_binWidth") && !vm.count("smearerFit")){ std::cout << "[INFO] Bin Width=0.5" << std::endl; invMass_binWidth=0.5; @@ -403,34 +431,7 @@ int main(int argc, char **argv) { exit(1); } - TString energyBranchName=""; - if(invMass_var=="invMass_SC_regrCorr_ele") energyBranchName = "energySCEle_regrCorr_ele"; - else if(invMass_var=="invMass_SC_regrCorr_pho") energyBranchName = "energySCEle_regrCorr_pho"; - else if(invMass_var=="invMass_regrCorr_fra") energyBranchName = "energyEle_regrCorr_fra"; - else if(invMass_var=="invMass_regrCorr_egamma") energyBranchName = "energyEle_regrCorr_egamma"; - else if(invMass_var=="invMass_SC") energyBranchName = "energySCEle"; - else if(invMass_var=="invMass_SC_corr") energyBranchName = "energySCEle_corr"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV4_ele") energyBranchName = "energySCEle_regrCorrSemiParV4_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV4_pho") energyBranchName = "energySCEle_regrCorrSemiParV4_pho"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV5_ele") energyBranchName = "energySCEle_regrCorrSemiParV5_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV5_pho") energyBranchName = "energySCEle_regrCorrSemiParV5_pho"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV6_ele") energyBranchName = "energySCEle_regrCorrSemiParV6_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV6_pho") energyBranchName = "energySCEle_regrCorrSemiParV6_pho"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV7_ele") energyBranchName = "energySCEle_regrCorrSemiParV7_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV7_pho") energyBranchName = "energySCEle_regrCorrSemiParV7_pho"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV8_ele") energyBranchName = "energySCEle_regrCorrSemiParV8_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiParV8_pho") energyBranchName = "energySCEle_regrCorrSemiParV8_pho"; - else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV6_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV6_pho"; - else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV7_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV7_pho"; - else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_ele") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_ele"; - else if(invMass_var=="invMass_SC_regrCorrSemiPar7TeVtrainV8_pho") energyBranchName = "energySCEle_regrCorrSemiPar7TeVtrainV8_pho"; - - else { - std::cerr << "Energy branch name not define for invariant mass branch: " << invMass_var << std::endl; - exit(1); - } + TString energyBranchName=energyBranchNameFromInvMassName(invMass_var).c_str(); if(!vm.count("chainFileList") && !vm.count("runToy")){ std::cerr << "[ERROR] Missing mandatory option \"chainFile\"" << std::endl; diff --git a/ZFitter/doc/configFiles.txt b/ZFitter/doc/configFiles.txt index 0a7a27a3d68..f1423a401ac 100644 --- a/ZFitter/doc/configFiles.txt +++ b/ZFitter/doc/configFiles.txt @@ -68,17 +68,21 @@ s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Sum \endverbatim - The first column (tag) indicates if this file is signal MC (s), background MC (b), or data (d). +The first column (\b tag) indicates if this file is signal MC (s), background MC (b), or data (d). - The single samples are indicated by a number (s1, s2, etc., d1, d2, etc.) +The single samples are indicated by a number (s1, s2, etc., d1, d2, etc.) - The second column (treeName) is the name of the tree in the file +The second column (\b treeName) is the name of the tree in the file - The third column (filePath) is the full path of the file - files with the same tag and the same treeName are put in the - same chain - files with the same tag but different treeName are added as - friends +The third column (\b filePath) is the full path of the file +files with the same tag and the same treeName are put in the +same chain files with the same tag but different treeName are added as friends + + +For each \b tag (e.g. s1) one can have multiple chains +with different \b treeName (e.g. selected, pileup, r9Weight, etc.), +a chain with treeName=="selected" is mandatory since it is the main tree, +all the other chains are considered as friends of the "selected". \subsection pileupHist How to get the pileup histogram diff --git a/ZFitter/src/nllProfile.cc b/ZFitter/src/nllProfile.cc index 02fd40e20d3..c54a9a50e54 100644 --- a/ZFitter/src/nllProfile.cc +++ b/ZFitter/src/nllProfile.cc @@ -1,3 +1,8 @@ +/// ZFitter function library +/** \file + * function library for ZFitter.cpp + */ + #include #include #include diff --git a/fulldoc b/fulldoc index c88970bf797..14f58659392 100644 --- a/fulldoc +++ b/fulldoc @@ -561,7 +561,7 @@ SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. -INLINE_SOURCES = YES +INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code From 7cdd0cd0ddef26ad1fea868711338ab0cd81e6e6 Mon Sep 17 00:00:00 2001 From: Shervin Nourbakhsh Date: Fri, 20 Jun 2014 16:14:39 +0200 Subject: [PATCH 417/475] fixup! fixing documentation --- ALCARAW_RECO/doc/ntuple_production.txt | 6 + ALCARAW_RECO/doc/rereco.txt | 6 +- README | 6 +- ZFitter/bin/ZFitter.cpp | 12 +- ZFitter/doc/README | 219 +------------------------ ZFitter/doc/configFiles.txt | 29 +++- 6 files changed, 51 insertions(+), 227 deletions(-) diff --git a/ALCARAW_RECO/doc/ntuple_production.txt b/ALCARAW_RECO/doc/ntuple_production.txt index f47a08a37dc..2beab6d5aae 100644 --- a/ALCARAW_RECO/doc/ntuple_production.txt +++ b/ALCARAW_RECO/doc/ntuple_production.txt @@ -1,3 +1,8 @@ +/** + * \page page6 Ntuple production + +\section NTUPLE Ntuple production + Ntuples are produced starting from ALCARECO, ALCARECOSIM or ALCARERECO files. alcareco_datasets.dat, alcarereco_datasets.dat provide the useful informations to build the list of files on EOS and process them. @@ -16,3 +21,4 @@ Better to use the quick script, but if you want to process only one specific dat +*/ diff --git a/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt index a1d26f27fbe..1647587399d 100644 --- a/ALCARAW_RECO/doc/rereco.txt +++ b/ALCARAW_RECO/doc/rereco.txt @@ -1,5 +1,5 @@ /** -* \page page5 Instructions for ECAL validator (rereco + ntuple production) +* \page page5 Rereco production * \section RERECO RERECO The ReReco and the ntuple production can be run with the script @@ -167,4 +167,8 @@ RerecoGlobalTag = cms.ESSource("PoolDBESSource", The convention is to name these configuration files in this way: tag_name.py So, for the rereco production follow the steps below: + + + */ + diff --git a/README b/README index ed4c798aed9..c5a9db2ad56 100644 --- a/README +++ b/README @@ -14,8 +14,12 @@ * * Working with ntuples: \ref page4 * -* Instructions for ECAL validator (rereco + ntuple production): \ref page5 +* Instructions for ECAL validator: + - \ref page5 + - \ref page6 + - \ref page7 * + * Small eveloper guide: \ref Devel */ diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 3a44b067a92..0913194243a 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -526,18 +526,18 @@ int main(int argc, char **argv) { else std::cerr << "[ERROR] in configuration file Hist not recognized" << std::endl; continue; } - //else if (chainName.Contains("corr")){ - //if (tag.Contains("d") && corrEleFile.empty()) corrEleFile=fileName; - //continue; - //} - + + // discard file with energy corrections different from the specified type if(chainName.Contains("scaleEle")){ if(chainName!="scaleEle_"+corrEleType) continue; } + + // discard file with energy smearings different from the specified type if(chainName.Contains("smearEle")){ if(chainName!="smearEle_"+smearEleType) continue; } + // discard file with categories for "smearingMethod" different from the region file name if(chainName.Contains("smearerCat")){ if(chainName!="smearerCat_"+regionsFileNameTag) continue; } @@ -563,7 +563,7 @@ int main(int argc, char **argv) { } - //init chains + //init chains and print for(tag_chain_map_t::const_iterator tag_chain_itr=tagChainMap.begin(); tag_chain_itr!=tagChainMap.end(); tag_chain_itr++){ diff --git a/ZFitter/doc/README b/ZFitter/doc/README index edef34ad88a..1bdc83c1f3b 100644 --- a/ZFitter/doc/README +++ b/ZFitter/doc/README @@ -36,6 +36,7 @@ The ntuple structure and logic is explained in \ref NtupleStructure \ref plotNtuple +\ref page7 \verbatim #============================================================ @@ -49,224 +50,6 @@ directly the "temporary" root file indicating s pileupTree file.root -#============================== RERECO VALIDATION instructions - - -1) If it does not exist yet, create the PU distribution in data -> FIXME - -2) Create the .dat config file and put it into (see previous section for details) - ./data/validation/rereco/rerecoGroupName/ - - rerecoGroupName is a name the subdirectory where you want to group - -3) Be sure that the runRanges .dat file has the proper run ranges for the stability plots - ./data/runRanges/monitoring.dat - -4) The fit is done in several di-electron categories defined in .dat files in the following directory: - ./data/regions/ - - the default one used for the validation is ./data/regions/validation.dat - - The regions can be defined following the syntax indicated in ZFitter/interface/ElectronCategory_class.hh - -5) Launch the fit: -./script/monitoring_validation.sh -f data/validation/file.dat --selection loose --invMass_var=invMass_SC --rereco rerecoGroupName - to see the possible options: ./script/monitoring_validation.sh --help - - the possible energies are: - - invMass_SC: standard SC energy - - invMass_SC_regrCorrSemiParV5_ele: Josh's regression ele-tuned V5 - - invMass_SC_regrCorrSemiParV5_pho: Josh's regression pho-tuned V5 - - the possible selections are: loose, medium, tight - - you can specify --validation to do only the main fits - --stability to run only the fits for the stability plots - --etaScale to run the fits in |eta| bins - if you do not specify any of this options the three are executed - - - - - - -#============================== Fit results: -Folder schema: - - one folder for data with - - one subfolder per selection - - for each selection one subfolder with the energy used for the invariant mass - - for each energy - - table: store the tables in .dat and .tex formats - - img: store the plots (fit and other) - - fit - - history - - fitres: store the fit results - - one folder for MC with the same structure - -At the end of the validation, the makeTable.sh script produces one big latex table in the table/ subdir. -The meaning of the columns is reported in the first row: - 1. category name - 2. number of events in that category in data - 3. deltaM parameter in data (shift of the CB peak w.r.t. 0) - 4. deltaM in MC - 5. deltaP = (deltaM_data - delta_M_mc)/deltaM_mc - 6. sigmaCB data - 7. sigmaCB mc - 8. sigmaCB_data/(M_Z+deltaM_data): also defined as sigmaCB/peakCB - it is the sigmaCB rescaled for the peak shift - 9. sigmaCB_mc/peakCB_mc - 10. additional smearing calculated as the quadratic difference between data and simulation of sigmaCB/peakCB - -The table for the standard validation categories is monitoring_summary-*.tex -The table for the stability fits is monitoring_stability-*.tex - -the script stability.sh produces the stability plots starting from the monitoring_stability-*.tex -and are automatically put in the test/dato/...../img/stability/runNumber subdirectory of the validation - - - -The program - -Class description: -I'm glad to present the release of the ZFit_class module - -This permit to fit the Z distribution using different PDF as signal -and bkg (not yet implemented) and to retrieve the shift respect to the -nominal position of the Z and the Z width estimation. - -BE CAREFULL to the meaning of the Z peak shift and the Z width with -respect to the signal pdf used... - -The public methods in ./include/ZFit_class.hh are all you need to -implement the ZFit_class in your programs. - -ZFit_class can fit both binned and unbinned datasets (TH1F, -RooDataHist not yet implemented, RooDataSet). - -Extentions are simple. - -You can also pass a list of TChain using the constructor with -signal_chain, data_chain and bkg_chain and the use of a config file - -Example: -./bin/ZFitter.exe -f test/config.conf --regionsFile data/regions/validation.dat --runRangesFile data/runRanges/monitoring.dat - - - make && ./bin/ZFitter.exe -f data/validation/monitoring_2012_53X.dat --regionsFile data/regions/validation.dat --runRangesFile data/runRanges/monitoring.dat --saveTreeWeight --dataPU data/190456-202305-13Jul_Prompt_Cal_Nov2012.69400.observed.root --mcPU data/nPU-Summer12_DD3.observed.root - - - -You can make the single sub pdf classes to be derived by a RooAbsPdf, in this way the pointer to the RooAbsPdf, will - - -Once the fit is finished: -./script/makeTable.sh - - - - - - -######################### Standard scripts -For monitoring, stability and global performance plot and tables, please refer to the -./script/monitoring_validation.sh script -Use: -./script/monitoring_validation.sh -f configFile --puName PUreweightName --runRangesFile runRangesFile --invMass_var invMass -Default option values are: -commonCut=Et_25 -selection=WP80_PU -invMass_var=invMass_SC_regrCorr_ele -configFile=data/validation/monitoring_2012_53X.dat -regionFile=data/regions/validation.dat -runRangesFile=data/runRanges/monitoring.dat - - - -######################### SMEARING -The class takes the data and mc chains, the electron regions -Loop over the trees and produce a vector of elements of a class that -contains the energies of the electrons, the angle between them, the -name and index of the category of the electrons -Once imported, it's possible to obtain a vector of invariant mass, -with one invariant mass per di-electron category. -Once obtained an invariant mass for data and one for MC, -it's possible to evaluate the NLL to return to MIGRAD for the -minimization. - - - - - -Each validation + stability uses ~20MB - - -How to create validation slides: -the makeValidationSlides.sh script, create in the tmp directory the following files: -[STATUS] Creating validation intro slide: tmp/validation-invMass_SC-WP80_PU-intro_slide.tex -[STATUS] Creating validation table slides: tmp/validation-invMass_SC-WP80_PU-table_slide.tex -[STATUS] Creating validation fit slides: tmp/validation-invMass_SC-WP80_PU-fit_slide.tex -[STATUS] Creating validation stability slides: tmp/validation-invMass_SC-WP80_PU-stability_slide.tex -that can be imported in your beamer slide base presentation -The command is: -./script/makeValidationSlides.sh --dirData test/dato/monitoring_2012_53X --dirMC test/MC/DYJets-Summer12-START53-ZSkim-allRange/190456-203002-13Jul_PromptTS --selection WP80_PU --invMass_var invMass_SC --type validation - - -###SMEAR -./bin/ZFitter.exe -f data/validation/moriond2013.dat --regionsFile data/regions/validation_smearing.dat --smearerFit --invMass_var=invMass_SC_regrCorr_ele - ./script/GenRootChain.sh -f data/validation/test.dat -root -l tmp/s_chain.root tmp/d_chain.root tmp/exampleMacro.C - -5000 events per category, ~5bins -energySC_A_B-Et_25 ---onlyDiagonal -(test) ---commonCut=absEta_0_1-Et_25 -then in .dat file: energy_SC_A_B_gold(bad) - - - - //------------------------------ - TGraphErrors *g_EB = columns_vs_var("tmp/tmpFile.dat", "EB", 3); - g_EB->SaveAs("tmp/g_EB-ADC-raw.root"); - g_EB->Fit("pol1"); - g_EB->GetXaxis()->SetTitle("#DeltaG [%]"); - g_EB->GetYaxis()->SetTitle("#DeltaP [%]"); - c->SaveAs("tmp/EB-ADC_stability-rawSC.eps"); - - c->Clear(); - TGraphErrors *g_EE = columns_vs_var("tmp/tmpFile.dat", "EE", 3); - g_EE->SaveAs("tmp/g_EE-ADC-raw.root"); - g_EE->Fit("pol1"); - g_EE->Draw("AP"); - g_EE->GetXaxis()->SetTitle("#DeltaG [%]"); - g_EE->GetYaxis()->SetTitle("#DeltaP [%]"); - - c->SaveAs("tmp/EE-ADC_stability-rawSC.eps"); - - c->Clear(); - g_EB->Draw("AP"); - c->SaveAs("tmp/EB-ADC_stability-rawSC.eps"); - - c->Clear(); - g_EE->Draw("AP"); - c->SaveAs("tmp/EE-ADC_stability-rawSC.eps"); - -##### ECAL scale systematics - #list of systematics for ECAL scale: - # etaScale - # time stability -> stability - # pileup EB, pileup EE - # - -# list of plots: - - - -################# SmearerFit instructions - - create the tree with the smearerCat category to speed up further running with same categories -./bin/ZFitter.exe -f data/validation/22Jan2012-stdMC.dat --regionsFile=data/regions/scaleStep2smearing_9.dat \ - --commonCut=Et_25-trigger-noPF-EB --smearerFit \ - --outDirFitResData=test/dato/fitres/Hgg_Et_v1/ \ - --autoNsmear --constTermFix --smearerType=profile --saveRootMacro --addBranch=smearerCat \ - >&test/dato/fitres/Hgg_Et_v1/log.log - Package content: - BW_CB_pdf_class diff --git a/ZFitter/doc/configFiles.txt b/ZFitter/doc/configFiles.txt index f1423a401ac..c684b70b350 100644 --- a/ZFitter/doc/configFiles.txt +++ b/ZFitter/doc/configFiles.txt @@ -90,7 +90,7 @@ When running the alcareco production for the MC, an additional file called PUDum It contains the -\subsection pileup Hot to produce ntuples with pileup weights +\subsection pileup How to produce ntuples with pileup weights In the config file the pileupHist must be indicated. When running the ZFitter.exe it will automatically calculate the weights and create the additional ntuples in the \code tmp/ \endcode directory. To just produce the ntuples: \code ./bin/ZFitter.exe -f data/validation/22Jan2012-stdMCAll.dat --savePUTreeWeight \endcode @@ -99,6 +99,33 @@ It's sufficient to copy them from the tmp/ directory to another directory and to Usually the pileupHist and pileup tree are put in the following directory: \code /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/ \endcode +The tree name of the pileup weight files is \b pileup: +\code +s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/s1_pileupTrue....root +\endcode + +\subsection scaleSmearing Energy scale and smearing corrections +Energy scale and smearings can be applied to the already existing ntuples. +One can have different sets of energy scales and smearings, depending +on + - the particular energy used for the invariant mass, + - the particular algorithm + - the number of steps in iterative procedure + +For more details see the section dedicated to the energy scale and +smearing derivation. + +Each set of energy scale and smearing corrections is defined by a +"type" name. You can add all the wanted set of scale and smearing +correction files to the same validation config file, but only the one +specified by the --corrEleType and --smearEleType options are used. +The name of the trees of the corrections are defined as follows: + _, where is scaleEle for energy scale + corrections and smearEle for energy smearings. +This way you don't need to modify your validation config file each +time you want to run with a different set of corrections, you just +need to pass the appropriate type name at the command line. + From f2804500acfd11e4925bcddd167a8b861ea03142 Mon Sep 17 00:00:00 2001 From: Shervin Nourbakhsh Date: Fri, 20 Jun 2014 16:41:06 +0200 Subject: [PATCH 418/475] fixup! fixing documentation --- README | 45 +++++++++++++++++++++++---------------------- fulldoc | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/README b/README index c5a9db2ad56..7dd7dffe8e8 100644 --- a/README +++ b/README @@ -25,45 +25,46 @@ /** -* \page page1 Code instructions and explanations +* \page page1 Introduction * \verbatim ############################################################ ## ECALELF (Ecal CALibration with ELectrons Framework) ## study and calibration with Zee and E/p -## Code instructions and explanations ############################################################ +\endverbatim All the code needed to the ECAL studies and calibration with Zee is available in this package. -This and other README file in the package are the only documentation -provided. +The documentation of this packaged is provided in these pages extracted with doxygen from the source code and several txt files contained in the package itself. The code in this package takes the name of ECALELF (Ecal CALibration with ELectrons Framework) -In each subfolder you will find a README in the doc/ directory -containing all the relevant informations about the module and it's -use. Informations for the implementation or re-implementation can be obtained looking the the various header files that will be completed with exaustive documentation (in the future) If you have doxygen, you can run the command -doxygen fulldoc -from the calibration/ directory and you can navigate instructions and code with -firefox doc/doxygen/fulldoc/html/index.html +\code doxygen fulldoc \endcode +from the Calibration/ directory and you can navigate instructions and code locally with +\code firefox doc/doxygen/fulldoc/html/index.html \endcode -============================== Introduction The general calibration workflow is: - 1a) start from RAW-RECO - 1.1a) apply a ZSkim or WSkim selection to reduce the size of the dataset - 2a) produce the ALCARAW: +\image html doc/ecalelf_schema.png +\image latex doc/ecalelf_schema.eps + + 1) start from AOD/RECO or AOD/RECO+RAW + + 1.1a) apply a ZSkim or a ZSCSkim or a WSkim selection to reduce the size of the dataset + + 2a) produce the ALCARAW from AOD/RECO+RAW: in this format most of the collections are dropped and only the electrons, the uncalibrated rec hits and few other collections like the beamspot, the conversions, the rhoFastJet are kept + 3a) Apply whatever ECAL tags (ADCtoGeV, IC, LC, Alpha) needed for test or calibration and produce a new file in ALCARECO format. The new file has a reduced collection of calibrated rechit of the @@ -74,16 +75,20 @@ The general calibration workflow is: fixed, since it's a wanted feature that ensures that the selected events are not changed and permit to check effectively the impact of the calibration on the same events. + 4) calculate new electron energies with the EleNewEnergiesProducer that creates ValueMaps that associate a float (the new energy) to the electrons + 5) define if the electron pass some selections running the EleSelectionProducer that creates valueMaps of floats with the following meaning: for cut-based selections 1=pass, 0=fail for MVA selections the float is the output of the MVA + 6.0) for MC, produce an association map between reco electron and gen electron (data-MC match) + 6.1) produce a patElectron collection where the electronID floats and the new energies are imported by the patElectron and accessible by electron.electronID("selectionName") @@ -92,11 +97,14 @@ The general calibration workflow is: embended in the patElectron and accessible by: electron.genLepton().eta() electron.genLepton().energy() + 7) Filter the events requiring that the electron has passed at least one selection + 8) dump the event content to a flat tree with one entry for Zee candidate (the variables are array of two elements with one electron per element) + 9) Run the analysis tools (Z fitter, smearing, etc.) @@ -116,16 +124,9 @@ recalibration step, the 1-3a) steps can be replaced by #performed just once. -============================== - -Instructions for ALCARAW and/or ALCARECO production are in -calibration/ALCARAW_RECO/doc/README - -Instructions for ntuple production is in -calibration/ZNtupledDumper/doc/README Good luck! -\endverbatim + */ diff --git a/fulldoc b/fulldoc index 14f58659392..8c1ad07f88d 100644 --- a/fulldoc +++ b/fulldoc @@ -520,7 +520,7 @@ EXAMPLE_RECURSIVE = NO # directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = doc # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program From fb393bdba91444fdc60495a8fc1a671fc9eb6bda Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 23 Jun 2014 11:20:36 +0200 Subject: [PATCH 419/475] update documentation --- fulldoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fulldoc b/fulldoc index c88970bf797..1c26d1164c4 100644 --- a/fulldoc +++ b/fulldoc @@ -23,7 +23,7 @@ PROJECT_NAME = ECALELF # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 1724 +PROJECT_NUMBER = NAN # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. From d0258bcfb489e889e942c02939e0df0b3c982e75 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 23 Jun 2014 11:37:30 +0200 Subject: [PATCH 420/475] adding graph schema of ecalelf --- doc/ecalelf_schema.eps | 2 ++ doc/ecalelf_schema.png | Bin 0 -> 3507 bytes 2 files changed, 2 insertions(+) create mode 100644 doc/ecalelf_schema.eps create mode 100644 doc/ecalelf_schema.png diff --git a/doc/ecalelf_schema.eps b/doc/ecalelf_schema.eps new file mode 100644 index 00000000000..a92027a422a --- /dev/null +++ b/doc/ecalelf_schema.eps @@ -0,0 +1,2 @@ +Unknown switch -eps - ignoring +Unknown switch -eps - ignoring diff --git a/doc/ecalelf_schema.png b/doc/ecalelf_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..a4296dfb59665e042d094bc80f051faa8b9f66e9 GIT binary patch literal 3507 zcmZ`+S5y;gLLAd z7^EsKLXZGaddDCNhT_Gy*88|0_hV+ynwdTOV}525t>7kH99KA)n3%ZCOd-}xOw54O z*n{WPG1Xtel%K-6KvRd{Q#AcQGam5O`;){58hZbKH&Zztl+MJ&Icx?ov<;o!!gr=F zXbHYQ=7?gq%SSO^bz%qJ^%G)KO%GCZ8>%RhGIGSMu^jNvC|MIt#SFT1V$!dTDsE=e zLV_Lw)4Z{M$C9OAnX!G7;(3d@QYyeX(nrd(XJh{);$xm&l_Ue*As%4QX9>bKbCYhRvwvv?PQhxfT7 zFwUEU5;O*EJI!S1VwjE?P`r)1?mVpHr8PWWc&(9&;E&#zR%ld`{1g>HyH3NroT&d8 z-T5lOpQ?$8ygoG{BFLU*0+SY-#x`i<-yKbRFV*`a7z7Gt7E8og!xQsYd%lyTd+JV?0{CqUQuSE@rIzYfy_6hV8N}QASvPI*fPwLM;)4N~aIJ}O z9dD!V;O5Wv4bgh!lhCE_79dKLDI z=}UoYqZR(#XWmK{kX9T4j?x&6Nbz~q0H~eSi>QEu#lC11-EY`?_3N*#6*>ch``muA z2h#?jUS+mrTrV8?1xK^4ucNDx%}!00SR?YN*P6y!=>j6hwQ*L#6+GSS>>XyCTIgZ| z#27J7#p=pz$lpY)wGVX*Yg0Ba4@DeT`gr)U)vUM6i;4SxD9#X@Wu-~vrRB}1hH0`~ zvZ#bESPw#wIFpVL=igvx6j-f{it3Co>%`eekK8!jr#a!-#f&wanv_>jX4{(~V`{-j z=Wo54LnO7m`5X@8rUkBvvGPCc6Q@O9gG0@)sa|jqtnu2|4E5$G{&TDQ*>tvwJN#B{ z${h^`{DcLQdoSrJupb!5@O?c|T^s74+%i<`nK$8Rlc)n|1@ivY)Nb^c`s8js=!dZcgLB~ ztVa(uSFxzQbu<-$P|N6kYJk@qN$-WW#H(cT5D^E1r`veXD=YApir@Tby;CZFA%P52%GvjH9sjy-UTJO}xQB51tAt(VW6X zQ~Qv&D|4l_2He^!U4z2zY-Y8k? zt()LcPeNgRib{qwAu@^&*ZAzIUFj`*oBnjeT+adm)XR+h)n9 zB4%Fd-B&A09TKlxca~p>^U^4CZo*JU-1ZDU=Oj#i|87F3n2%`(aro|Tx>8Ub-Sx2V zaGHy;soOihhGWTcxNnU0ak!kcbpw1j7T&t=k=xpNH{+suE|R%+#w+@`Yux$rplakF;lc7xmA$&20~?Sg9^Sj( z-f}Mn4dvcYdRS&7Q(fQV#~O6#oC|O3v3p39Du}I-H@yUNzWwbD|4y4?%b#?{8Xwn& zB0aLerp!i}j+h}Hh1~>y){~pIuCLAIzJK4m%6p2rw)RI#RgV66q-TXZ2W!1tb>-Nk zb5`mOPD)n5QeSf$7PovY@#7aRiQuiX6p`&VNy(`dsoRBV1gw!MJgs2?MzP(GVza*-ELP3&ZTwEsb%dc4mSo>ZuRU9 zWKpRB@)N2*NeM637IRt~++Af6`j0v=cz@uOrkMFc+&Hz>Hy>Ruo#`K4hF0G1+S_xr z1k_0LeI4=M2EpbBl|%uVE6*`^7>k_^THx6YZ3{TSCBa@`|FB3EdU?QrW_6kVoX5{# z)#z`#V15OZ3H_ zwLvLJ*Sg~o;iM>{1L*=X_w`4&w^Zfh;6-N&15uvgV=T7}$^$9RLeRYp;p2$r)Y`(~ zr~nJ~3z4BSO);HD0Pt8K43RMyY(~7?8`O`a%;n|6E!8CP7tX}~xTsnY`Lt=#Q2NGQ zloU|&4Jo->yeMTpK@sF;6$>6q3I)rhb_;Fq?Ik~UwVgJikLXV`XKMaBIVk^k@~{mP zf4J74%C4N2HoCsk$$e({VcM45m8?+FR$4GLbZ$WEZExSf<9i!L&Y#E=_bnpxj3A}J7Tg1lN8d>CzrStcBRM>kW#ZNFpJLtm zzrVZ^m&gw?PCvub_D+QFH#MKQ(rpV^FcfG6o>ZafQ(qX zskl#|Z&GjhkF^3joQ*zYt9=ND=D=-QWE(@2{0Dr{l5vwE&(SyUW5g^?=IqOGZmX}P zw84g@VTg{f3|*H`URFf;+)U)(pl7%w;)kZ(=Wose05 zT4r!`T+~HHmBv~2853;6{cnO73xv-TY})gq3@ci+X0>O6lc0n$;1JFti!n)YcYmhc z@c=#V?3lD=eYOm2GqMnRdBF(F2L^so?^U632yhW*9;YV8jst(dw|N7K$-<=IBm;sh zRsyz~6Mz3@OR)wSSz*Z-cl<S0Aj# z)k}ZrRYKmiGc15}bJL>rv6V`QEVi@VWmc0}%F-B6j6~{pLGAR4L9J9wQKv`PhSdYG z+J~+uw5IpPz8ayg9u4-RlQ;>NoKq|MOsit-bVUG*Fa{!WEp0D-jgQ~jb``AoZB*Z2 zDHXAK_OWUfiX`pt;H^+?*};)vc-zDu7I^%i z==6ft&|iY4fnmh=k`Wb{Ada!2_Ceuu``YHc1wohV4bkEMPI+kaT`RGN8g<6sUZ&^E z+=!d9r>SO-Cmv+5LFMfp%u47;)WTkiA>7mjdZK*{nnmwkKz7K;J-Sl`oNjlM0uPs_dXvod>9CL%%p1q_hq z#qlOit|Ng|6SP0#JSdy`Tpq!vZv!}Ld&>0{f^CuYS)DBX(2SRo-& z`k&)d9j|T-DYNNKI1rEAB}dxMzT68Qco1bTRZ?|23UBLh%ORuE&5 Yn(|c%_Pgh`PwPx(MsP^&&3ljk1I-x3UjP6A literal 0 HcmV?d00001 From d72f6031a866d88553f7510ce2969004acef3017 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 23 Jun 2014 11:38:49 +0200 Subject: [PATCH 421/475] updated doxygen config --- fulldoc | 1368 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 820 insertions(+), 548 deletions(-) diff --git a/fulldoc b/fulldoc index b55215b1988..898c28f66b1 100644 --- a/fulldoc +++ b/fulldoc @@ -1,4 +1,4 @@ -# Doxyfile 1.4.7 +# Doxyfile 1.6.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project @@ -14,438 +14,547 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = ECALELF -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = NAN -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc/doxygen/fulldoc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = YES -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) -MULTILINE_CPP_IS_BRIEF = NO +QT_AUTOBRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. -DETAILS_AT_TOP = YES +MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = YES -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = YES -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = YES -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = YES -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = SHOW -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = YES -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = NO -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = fulldoc-warn.log @@ -454,95 +563,124 @@ WARN_LOGFILE = fulldoc-warn.log # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ZNtupleDumper ZFitter ./ ZFitter/bin - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py - -FILE_PATTERNS = *.h *.hh *.cc *.cpp README *_cfi.py *_cff.py *.txt - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +INPUT = ZNtupleDumper \ + ZFitter \ + ./ \ + ZFitter/bin + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.h \ + *.hh \ + *.cc \ + *.cpp \ + README \ + *_cfi.py \ + *_cff.py \ + *.txt + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = ZFitter/test/ -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = YES -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = doc -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -551,32 +689,32 @@ FILTER_SOURCE_FILES = NO # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -584,20 +722,21 @@ REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. +# link to the source code. +# Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = NO @@ -606,284 +745,398 @@ VERBATIM_HEADERS = NO # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = # If the HTML_TIMESTAMP tag is set to YES then the generated HTML # documentation will contain the timesstamp. HTML_TIMESTAMP = NO -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -892,33 +1145,33 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -927,10 +1180,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -939,319 +1192,338 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = NO -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = YES -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. -MAX_DOT_GRAPH_WIDTH = 1024 +DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO From 4f55559df83222ffc27cfb4f76ffa7409f91f9d7 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 23 Jun 2014 11:44:52 +0200 Subject: [PATCH 422/475] updating documentation --- ALCARAW_RECO/doc/ntuple_production.txt | 2 ++ ZFitter/doc/validation.txt | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ZFitter/doc/validation.txt diff --git a/ALCARAW_RECO/doc/ntuple_production.txt b/ALCARAW_RECO/doc/ntuple_production.txt index 2beab6d5aae..e08882ab555 100644 --- a/ALCARAW_RECO/doc/ntuple_production.txt +++ b/ALCARAW_RECO/doc/ntuple_production.txt @@ -4,6 +4,8 @@ \section NTUPLE Ntuple production Ntuples are produced starting from ALCARECO, ALCARECOSIM or ALCARERECO files. +All commands should be executed from the Calibration/ALCARAW_RECO directory. + alcareco_datasets.dat, alcarereco_datasets.dat provide the useful informations to build the list of files on EOS and process them. as for the alcareco and alcaraw productions, you have to provide such informations using the parseDatasetFile.sh script with the right book-keeping file. diff --git a/ZFitter/doc/validation.txt b/ZFitter/doc/validation.txt new file mode 100644 index 00000000000..6bb92c9738f --- /dev/null +++ b/ZFitter/doc/validation.txt @@ -0,0 +1,17 @@ +/** + \page ZFitter Fit to Z lineshape + +In this section the ZFitter.exe program is explained and the different fitting methods are detailed. + +\section ZFitter_options Config file parsing: ZFitter options +The ZFitter program is the interface program to all operations to be done on the ECALELF ntuples. +The aim is to provide a high level layer that permit to choose the appropriate fitting method. + +The only mandatory option is the name of the config file with the ntuples to be processed. + +The files are correctly added as chains and friends according to the syntax indicated in ... + + +\section CBFit Fit to Z lineshape with BW + CB + +\section smearing From 26a7aac650662eb59eb66193572793e756384e10 Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 1 Jul 2014 16:31:46 +0200 Subject: [PATCH 423/475] removed pdfTreeSyst bool from the input parameters --- ZNtupleDumper/python/zntupledumper_cfi.py | 1 - ZNtupleDumper/src/ZNtupleDumper.cc | 33 ++++++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/ZNtupleDumper/python/zntupledumper_cfi.py b/ZNtupleDumper/python/zntupledumper_cfi.py index 6589b14f1ac..715bd5f429f 100644 --- a/ZNtupleDumper/python/zntupledumper_cfi.py +++ b/ZNtupleDumper/python/zntupledumper_cfi.py @@ -19,7 +19,6 @@ doStandardTree = cms.bool(True), doExtraCalibTree = cms.bool(False), doEleIDTree = cms.bool(False), - doPdfSystTree = cms.bool(True), # pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')), pdfWeightCollections = cms.VInputTag(), fsrWeightCollection = cms.InputTag("fsrWeight"), diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index d73e1e68fa1..a3cdee91e29 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -431,10 +431,12 @@ class ZNtupleDumper : public edm::EDAnalyzer { WENU, ZSC, PARTGUN, - UNKNOWN + UNKNOWN, + DEBUG }eventType_t; eventType_t eventType; + unsigned int eventTypeCounter[6]; }; @@ -461,7 +463,7 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): foutName(iConfig.getParameter("foutName")), doExtraCalibTree(iConfig.getParameter("doExtraCalibTree")), doEleIDTree(iConfig.getParameter("doEleIDTree")), - doPdfSystTree(iConfig.getParameter("doPdfSystTree")), + doPdfSystTree(false), pdfWeightTAGS(iConfig.getParameter< std::vector >("pdfWeightCollections")), fsrWeightTAG(iConfig.getParameter< edm::InputTag>("fsrWeightCollection")), weakWeightTAG(iConfig.getParameter< edm::InputTag>("weakWeightCollection")), @@ -472,7 +474,7 @@ ZNtupleDumper::ZNtupleDumper(const edm::ParameterSet& iConfig): //puWeights() { - //if(isMC && puWeightFile.size()>1) puWeights.ReadFromFile(puWeightFile); + if(pdfWeightTAGS.size()>0) doPdfSystTree=true; @@ -533,22 +535,27 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe for(unsigned int i=0; i < alcaSkimPathNameSize; i++){ // look over alcaSkimPaths std::string trgName = alcaSkimPathNames.triggerName(i); + for(std::vector::const_iterator selectEvents_itr = SelectEvents.begin(); selectEvents_itr!=SelectEvents.end(); selectEvents_itr++){ if(std::regex_match(trgName, std::regex(*selectEvents_itr))){ alcaSkimPathIndexes.insert(i); - + //std::cout << " - Trigger path saved in ntuples: " << trgName << "\t" << i << std::endl; + break; } } + //if(alcaSkimPathIndexes.count(i)==0){ + //std::cout << " -! Trigger path not saved in ntuples: " << trgName << "\t" << i << std::endl; + //} } } - + eventType=DEBUG; bool skipEvent=true; for(std::set::const_iterator alcaSkimPath_itr = alcaSkimPathIndexes.begin(); alcaSkimPath_itr != alcaSkimPathIndexes.end() && skipEvent==true; alcaSkimPath_itr++){ - + //std::cout << *alcaSkimPath_itr << std::endl; if(WZSkimResultsHandle->accept(*alcaSkimPath_itr)){ skipEvent=false; std::string hltName_str(alcaSkimPathNames.triggerName(*alcaSkimPath_itr)); @@ -561,11 +568,16 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe else if(hltName_str.find("SingleElectron")!=std::string::npos) eventType=UNKNOWN; // this paths are exclusive, then we can skip the check of the others + // + // std::cout << alcaSkimPathNames.triggerName(*alcaSkimPath_itr) << "\t" << eventType << std::endl; break; } + } - assert(!skipEvent); + //std::cout << "skip event: " << skipEvent << "\t" << eventType << std::endl; + //assert(!skipEvent); + eventTypeCounter[eventType]++; if(skipEvent) return; // event not coming from any skim or paths } //------------------------------ CONVERSIONS @@ -596,7 +608,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe TreeSetEventSummaryVar(iEvent); TreeSetPileupVar(); // this can be filled once per event - if(doPdfSystTree && isMC){ + if(doPdfSystTree && isMC){ TreeSetPdfSystVar(iEvent); } @@ -881,6 +893,9 @@ void ZNtupleDumper::endJob() extraCalibTree->Write(); extraCalibTreeFile->Close(); } + for(int i=ZEE; i <= DEBUG; i++){ + std::cout << "[NTUPLEDUMPER] EventTypeCounter[" << i << "]\t"<< eventTypeCounter[i] << std::endl; + } } // ------------ method called when starting to processes a run ------------ @@ -1996,7 +2011,7 @@ void ZNtupleDumper::InitPdfSystTree(void){ int i = pdfWeightTAGS_itr - pdfWeightTAGS.begin(); std::string tagName = pdfWeightTAGS_itr->instance(); //tagName.replace(0,pdfWeightTAGS_itr->label().size()); - std::cout << i << "\t" << tagName << "\t" << pdfWeightTAGS_itr->label() << "\t" << pdfWeightTAGS_itr->encode() << std::endl; + //std::cout << i << "\t" << tagName << "\t" << pdfWeightTAGS_itr->label() << "\t" << pdfWeightTAGS_itr->encode() << std::endl; //pdfSystTree->Branch(pdfWeightTAGS_itr->encode().c_str(), &(pdfSystWeightNum[i]), "pdfSystWeightNum/I"); pdfSystTree->Branch((pdfWeightTAGS_itr->label()+"_"+pdfWeightTAGS_itr->instance()).c_str(), &(pdfSystWeight[i])); } From c04dfa1434ec686e5c680cfd9f568b03d7e1ed0d Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 4 Jul 2014 15:40:18 +0200 Subject: [PATCH 424/475] set INVALID and VALID also for alcareco_datasets.dat --- ALCARAW_RECO/alcareco_datasets.dat | 30 +++++++++++++++++------- ALCARAW_RECO/scripts/parseDatasetFile.sh | 2 +- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index afb2d2632c1..0cb98951530 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -10,17 +10,29 @@ allRange /QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_S ##### Particle gun allRange /SingleElectronFlatPt10To300_pythia6/Summer12_DR53X-PU_S10_START53_V7A-v1/AODSIM SingleElectronGun_Pt10to300-Summer12-START53 caf group/alca_ecalcalib/ecalelf/alcareco ################## MC 53 RUN dependent -194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco -200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco -206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012AB,RUN2012ABCD - +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012C,RUN2012ABCD - +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012D,RUN2012ABCD - # -194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco -200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco -206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012AB,RUN2012ABCD - +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012C,RUN2012ABCD - +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012D,RUN2012ABCD - # -194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco -200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco -206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012AB,RUN2012ABCD - +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012C,RUN2012ABCD - +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012D,RUN2012ABCD - +### +194533-194533 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012AB,RUN2012ABCD - +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABCD - +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD - +# +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012AB,RUN2012ABCD - +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABCD - +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD - +# +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012AB,RUN2012ABCD - +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012C,RUN2012ABCD - +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkimPath-runDependent caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012D,RUN2012ABCD - # allRange /QCD_Pt-30to40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM QCD_Pt-30to40_doubleEM-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco allRange /QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM QCD_Pt-40_doubleEM-Summer12-START53-ZSkim-runDependent caf group/alca_ecalcalib/ecalelf/alcareco diff --git a/ALCARAW_RECO/scripts/parseDatasetFile.sh b/ALCARAW_RECO/scripts/parseDatasetFile.sh index f31e868b7ca..522fa0cc485 100755 --- a/ALCARAW_RECO/scripts/parseDatasetFile.sh +++ b/ALCARAW_RECO/scripts/parseDatasetFile.sh @@ -25,7 +25,7 @@ case `basename $FILE` in awk '($NF!=0 && (! /^#/)) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "-t", $6}' $FILE ;; alcareco_datasets.dat) - awk '($NF!=0 && (! /^#/) && (NF>7 && $8!="-")) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7, "--dbs_url", $8}; ($NF!=0 && (! /^#/) && (NF==7|| $8=="-")){print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7};' $FILE + awk '($NF!=0 && (! /^#/) && (NF>7 && $8!="-")) {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7, "--dbs_url", $8}; ($NF!=0 && (! /^#/) && (NF==7|| $8=="-")){print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, $6, $7};' $FILE | grep -v INVALID ;; ntuple_datasets.dat) awk -F '\t' '($NF!=0 && (! /^#/)){if($7!=""){print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "--type", $6, "-t", $7, "--json_name", $8} else {print "-r",$1, "-d", $2, "-n", $3, "--store", $4, "--remote_dir", $5, "--type", $6, "--json_name", $8}}' $FILE From 5d6d5ce1b4258ed3bdc1dc15cfc31183bfa3fdf7 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 4 Jul 2014 15:42:08 +0200 Subject: [PATCH 425/475] ntuple and alcareco production in the same job --- ALCARAW_RECO/python/alcaSkimming.py | 18 ++++++++++++------ ALCARAW_RECO/scripts/prodAlcareco.sh | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 7a3452baeb1..d3237c7f3c9 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -263,9 +263,12 @@ # print "[INFO] Using GT START53_V7G::All" # process.GlobalTag.globaltag = 'START53_V7G::All' # suggested for analysis std. MC else: + print "[INFO] Using GT FT_R_53_V21N::All" process.GlobalTag.globaltag = 'FT_R_53_V21::All' #GR_P_V42B::All' # 5_3_3 Prompt #process.GlobalTag.globaltag = 'FT_R_53_LV3::All' #21Jun rereco 53X 2011 data #process.GlobalTag.globaltag = 'GR_R_53_V9F::All' # GT for 53 rereco (2011) + if(options.files==""): + process.source.fileNames=[ 'root://cms-xrd-global.cern.ch//store/data/Run2012A/DoubleElectron/AOD/22Jan2013-v1/20000/003EC246-5E67-E211-B103-00259059642E.root' ] elif(re.match("CMSSW_6_1_.*",CMSSW_VERSION)): if(MC): print "[INFO] Using GT START61_V11::All" @@ -296,7 +299,7 @@ process.pfIsoEgamma = cms.Sequence() if((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso - process.eleIsoSequence = setupPFElectronIso(process, 'gsfGsfElectrons', 'PFIso') + process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): process.pfisoALCARECO = cms.Sequence() # remove any modules @@ -345,17 +348,20 @@ ] process.NtupleFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","ALCARECO") # + process.NtupleFilterSeq = cms.Sequence() +#process.NtupleFilterSeq = cms.Sequence(process.WZFilter) if(ZSkim): + process.NtupleFilterSeq = cms.Sequence(process.WZFilter) # process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalZElectron', 'pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalCalZSCElectron', 'pathALCARECOEcalUncalZSCElectron', ] elif(WSkim): + process.NtupleFilterSeq = cms.Sequence(process.WZFilter) # process.NtupleFilterSeq= cms.Sequence(process.NtupleFilter) process.NtupleFilter.HLTPaths = [ 'pathALCARECOEcalCalWElectron', 'pathALCARECOEcalUncalWElectron' ] -else: - +elif(options.skim=="no" or options.skim=="NO" or options.skim=="none" or options.skim=="NONE"): process.NtupleFilterSeq = cms.Sequence() @@ -416,7 +422,7 @@ process.zNtupleDumper.pdfWeightCollections = cms.VInputTag(cms.InputTag('pdfWeights:cteq66'), cms.InputTag("pdfWeights:MRST2006nnlo"), cms.InputTag('pdfWeights:NNPDF10')) else: process.pdfWeightsSeq = cms.Sequence() - process.zNtupleDumper.doPdfSystTree = cms.bool(False) + ############################################################ @@ -537,6 +543,8 @@ process.NtuplePath = cms.Path(process.filterSeq * process.FilterSeq * process.NtupleFilterSeq +# * process.pfIsoEgamma +# * process.seqALCARECOEcalCalElectron * process.pdfWeightsSeq * process.ntupleSeq) process.NtupleEndPath = cms.EndPath( process.zNtupleDumper) @@ -620,7 +628,6 @@ process.outputALCARECO.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalCalWElectron') ) - process.NtupleFilterSeq = cms.Sequence(process.WZFilter) elif(options.skim=='ZSkim'): process.outputALCARAW.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalUncalZElectron', 'pathALCARECOEcalUncalZSCElectron') @@ -628,7 +635,6 @@ process.outputALCARECO.SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('pathALCARECOEcalCalZElectron', 'pathALCARECOEcalCalZSCElectron') ) - process.NtupleFilterSeq = cms.Sequence(process.WZFilter) else: #if(options.skim=="" or options.skim=="none" or options.skim=="no" or options.skim=="partGun"): process.outputALCARAW.SelectEvents = cms.untracked.PSet( diff --git a/ALCARAW_RECO/scripts/prodAlcareco.sh b/ALCARAW_RECO/scripts/prodAlcareco.sh index d270441f963..557099bea2b 100755 --- a/ALCARAW_RECO/scripts/prodAlcareco.sh +++ b/ALCARAW_RECO/scripts/prodAlcareco.sh @@ -9,7 +9,7 @@ SCHEDULER=caf USESERVER=1 TYPE=ALCARECO LUMIS_PER_JOBS=200 # 4000 for ZSkim events is good, WSkim events /=4, SingleElectron /=10 -EVENTS_PER_JOB=40000 +EVENTS_PER_JOB=150000 #150k for ZSkim DYtoEE powheg BLACKLIST=T2_EE_Estonia CREATE=yes SUBMIT=yes @@ -17,6 +17,7 @@ OUTPUTFILE=alcareco crabFile=tmp/alcareco.cfg DOTREE=0 NJOBS=100 +OUTFILES="ntuple.root" usage(){ echo "`basename $0` options" @@ -36,7 +37,7 @@ usage(){ echo " --check" echo " --json_name jsonName: additional name in the folder structure to keep track of the used json" echo " --json jsonFile.root: better to not use a json file for the alcareco production" - echo " --doTree arg (=${DOTREE}): 0=no tree, 1=standard tree only, 2=extratree-only, 3=standard+extra trees" + echo " --doTree" # arg (=${DOTREE}): 0=no tree, 1=standard tree only, 2=extratree-only, 3=standard+extra trees" echo " --njobs nJobs : number of jobs, an integer" echo "----------" echo " --tutorial: tutorial mode, produces only one sample in you user area" @@ -48,7 +49,7 @@ usage(){ #------------------------------ parsing # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,dbs_url:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree:,njobs:,tutorial,develRelease -- "$@") +if ! options=$(getopt -u -o hd:n:s:r: -l help,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,dbs_url:,scheduler:,isMC,submit,white_list:,black_list:,createOnly,submitOnly,check,json:,json_name:,doTree,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,njobs:,tutorial,develRelease -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -78,7 +79,12 @@ do --json_name) JSONNAME=$2; shift;; --tutorial) echo "[OPTION] Activating the tutorial mode"; TUTORIAL=y;; --develRelease) echo "[OPTION] Request also CMSSW release not in production!"; DEVEL_RELEASE=y;; - --doTree) DOTREE=$2; shift; echo "[OPTION] Request doTree = ${DOTREE}";; + --doTree) let DOTREE=${DOTREE}+1; OUTFILES="${OUTFILES},ntuple.root";; + --doExtraCalibTree) let DOTREE=${DOTREE}+2; OUTFILES="${OUTFILES},extraCalibTree.root";; + --doEleIDTree) let DOTREE=${DOTREE}+4;; + --doPdfSystTree) let DOTREE=${DOTREE}+8;; + --noStandardTree) let DOTREE=${DOTREE}-1; OUTFILES=`echo ${OUTFILES} | sed 's|ntuple.root,||'`;; + --njobs) NJOBS=$2; shift; echo "[OPTION] Request njobs = ${NJOBS}";; (--) shift; break;; (-*) echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; @@ -202,6 +208,7 @@ fi # NJOBS=`grep "" _tmp_argument.xml | wc -l` #fi +OUTFILES=`echo $OUTFILES | sed 's|^,||'` #============================== cat > ${crabFile} <> ${crabFile} <> ${crabFile} < Date: Fri, 4 Jul 2014 16:20:48 +0200 Subject: [PATCH 426/475] Fixing unixTime in ntuples as unsigned int --- ZNtupleDumper/src/ZNtupleDumper.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index a3cdee91e29..26e0ab6cafd 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -1728,7 +1728,7 @@ void ZNtupleDumper::InitExtraCalibTree(){ extraCalibTree->Branch("runNumber", &runNumber, "runNumber/I"); extraCalibTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); extraCalibTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); - extraCalibTree->Branch("runTime", &runTime, " runTime/l"); + extraCalibTree->Branch("runTime", &runTime, " runTime/i"); extraCalibTree->Branch("nHitsSCEle", nHitsSCEle, "nHitsSCEle[2]/I"); @@ -1932,7 +1932,7 @@ void ZNtupleDumper::InitEleIDTree(){ eleIDTree->Branch("runNumber", &runNumber, "runNumber/I"); eleIDTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); eleIDTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); - eleIDTree->Branch("runTime", &runTime, "runTime/l"); + eleIDTree->Branch("runTime", &runTime, "runTime/i"); eleIDTree->Branch("dr03TkSumPt", dr03TkSumPt, "dr03TkSumPt[2]/F"); eleIDTree->Branch("dr03EcalRecHitSumEt", dr03EcalRecHitSumEt, "dr03EcalRecHitSumEt[2]/F"); @@ -2002,7 +2002,7 @@ void ZNtupleDumper::InitPdfSystTree(void){ // pdfSystTree->Branch("runNumber", &runNumber, "runNumber/I"); // pdfSystTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); // pdfSystTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); -// pdfSystTree->Branch("runTime", &runTime, "runTime/l"); +// pdfSystTree->Branch("runTime", &runTime, "runTime/i"); for(std::vector< edm::InputTag >::const_iterator pdfWeightTAGS_itr = pdfWeightTAGS.begin(); From 93d115231c9cf17d76fd3b3d8257f3e518119c30 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 4 Jul 2014 17:45:39 +0200 Subject: [PATCH 427/475] setup_git fixed for hengne --- initCmsEnv.csh | 9 ++++++++- initCmsEnv.sh | 9 ++++++++- setup_git.sh | 34 +++++++++++++++++----------------- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/initCmsEnv.csh b/initCmsEnv.csh index 048d7c618d9..b4a5f88d53e 100644 --- a/initCmsEnv.csh +++ b/initCmsEnv.csh @@ -3,7 +3,14 @@ source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.csh eval `scramv1 runtime -csh` source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.csh -voms-proxy-init -voms cms -out $HOME/gpi.out +case $USER in + hengne|heli) + voms-proxy-init -voms cms -hours 192 -valid 192:00 + ;; + *) + voms-proxy-init -voms cms -out $HOME/gpi.out + ;; +esac #cd calibration/SANDBOX #setenv PATH $PWD/bin:$PATH diff --git a/initCmsEnv.sh b/initCmsEnv.sh index 58755a162b4..addb71dffad 100644 --- a/initCmsEnv.sh +++ b/initCmsEnv.sh @@ -3,7 +3,14 @@ source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh eval `scramv1 runtime -sh` source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh -voms-proxy-init -voms cms -out $HOME/gpi.out +case $USER in + hengne|heli) + voms-proxy-init -voms cms -hours 192 -valid 192:00 + ;; + *) + voms-proxy-init -voms cms -out $HOME/gpi.out + ;; +esac #cd calibration/SANDBOX #setenv PATH $PWD/bin:$PATH diff --git a/setup_git.sh b/setup_git.sh index 6368e8e2908..21b820693c6 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -54,24 +54,24 @@ sed -i 's|[/]*assert|////assert|' DataFormats/EgammaCandidates/src/GsfElectron.c echo "[STATUS] Download ECALELF directory" myDir=Calibration if [ ! -d "$myDir" ];then - if [ "$USER" != "shervin" ];then - git clone https://github.com/ECALELFS/ECALELF $myDir >> setup.log || exit 1 # read-only mode - else - git clone git@github.com:ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode - fi -fi - -cd $myDir/ALCARAW_RECO/ - -### if you are not Shervin download this to have some useful scripts -if [ "$USER" != "shervin" ];then - git clone https://github.com/ECALELFS/Utilities.git bin + case "$USER" in + shervin) + git clone git@github.com:ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + ;; + hengne) + git clone git@github.com:hengne/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + cd $myDir/ALCARAW_RECO/ + git clone https://github.com/hengne/Utilities.git bin + ;; + *) + ### if you are not Shervin download this to have some useful scripts + git clone https://github.com/ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + cd $myDir/ALCARAW_RECO/ + git clone https://github.com/ECALELFS/Utilities.git bin + ;; + esac fi -#cd EgammaAnalysis/ElectronTools/data/ -#cat download.url | xargs wget -#cd - - cd $CMSSW_BASE/src #Other package to download: @@ -144,7 +144,7 @@ case $CMSSW_VERSION in if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then patch -p0 < $myDir/ALCARAW_RECO/test/clusterLazyTools.patch >> setup.log || exit 1 fi - patch -p0 < $myDir/ALCARAW_RECO/test/class_def.xml.patch >> setup.log || exit 1 + #patch -p0 < $myDir/ALCARAW_RECO/test/class_def.xml.patch >> setup.log || exit 1 cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 From f9a02e8a5a5788714ba114086f2b0bff32fd4e57 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 14 Jul 2014 19:44:55 +0200 Subject: [PATCH 428/475] rereco to test IC and eta scale --- ALCARAW_RECO/alcarereco_datasets.dat | 3 +++ .../config/reRecoTags/Test_July2014_ICRunD_v1.py | 16 ++++++++++++++++ .../config/reRecoTags/Test_July2014_ICRunD_v2.py | 16 ++++++++++++++++ .../config/reRecoTags/Test_July2014_ICRunD_v3.py | 16 ++++++++++++++++ ALCARAW_RECO/ntuple_datasets.dat | 3 +++ 5 files changed, 54 insertions(+) create mode 100644 ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v1.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v2.py create mode 100644 ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v3.py diff --git a/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat index afb846dc8da..8b19ca21063 100644 --- a/ALCARAW_RECO/alcarereco_datasets.dat +++ b/ALCARAW_RECO/alcarereco_datasets.dat @@ -38,3 +38,6 @@ 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Cal_Dic2013_ZeeIC_v1_mo2 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICRunD_v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICRunD_v2 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICRunD_v3 diff --git a/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v1.py b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v1.py new file mode 100644 index 00000000000..59ce7973a78 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v1.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20140708_EtaScaleStudies"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v2.py b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v2.py new file mode 100644 index 00000000000..ec157f5b0c5 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v2.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20140708_EtaScaleStudies_sm1pc"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v3.py b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v3.py new file mode 100644 index 00000000000..50b435cacc1 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICRunD_v3.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20140708_EtaScaleStudies_sm2pc"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 817ba2fff9b..019314052ee 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -248,3 +248,6 @@ allRange /SingleElectronFlatPt10To300_pythia6/Summer12_DR53X-PU_S10_START53_V7A- 193834-196531 /DoubleElectron/Run2012B-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012B-15Apr-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 198022-203742 /DoubleElectron/Run2012C-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012C-15Apr-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 203777-208686 /DoubleElectron/Run2012D-15Apr2014-v1/AOD DoubleElectron-ZHLTSkimPath-RUN2012D-15Apr-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECO 190456-208686-22Jan_v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICRunD_v1 190456-208686_22Jan_v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICRunD_v2 190456-208686_22Jan_v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICRunD_v3 190456-208686_22Jan_v1 From 672ccc32876612b520f069c88181b542a3f2930c Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 30 Jul 2014 14:57:05 +0200 Subject: [PATCH 429/475] updating documentation --- ALCARAW_RECO/doc/rereco.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt index 1647587399d..25608d30919 100644 --- a/ALCARAW_RECO/doc/rereco.txt +++ b/ALCARAW_RECO/doc/rereco.txt @@ -39,19 +39,19 @@ from the directory ALCARAW_RECO \subsection RERECO_instructions Instructions -1. create the tag_name.py in ALCARAW_RECO/config/reRecoTags directory +-# create the tag_name.py in ALCARAW_RECO/config/reRecoTags directory Se more detailes below, in section "TAG FILE" - -2. commit the file in GITHUB: +-# check the syntax of the tag_name.py file +\code +\endcode +-# commit the file in GITHUB: \code git add config/reRecoTags/tag_name.py git commit -m "...." config/reRecoTags/tag_name.py \endcode - -3. Add the period on which the ReReco has to be run in +-# Add the period on which the ReReco has to be run in alcaraw_datasets.dat, if not already defined (e.g. RUN2012AB) - -4. Run the script RerecoQuick.sh +-# Run the script RerecoQuick.sh \code ./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion} \endcode @@ -103,7 +103,7 @@ The files alcarereco_datasets.dat and ntuple_datasets.dat ae updated when this datasets and check if jobs are exited with status 0 If jobs are finished, it merge all the produced ntuples and copy them to the right directory on EOS -6. if all went fine, commit the alcarereco_datasets.dat and ntuple_datasets.dat files +-# if all went fine, commit the alcarereco_datasets.dat and ntuple_datasets.dat files \code git pull --no-commit \endcode From 493865eccc1abd6896c0f4b1744cd2462168701a Mon Sep 17 00:00:00 2001 From: Shervin Date: Wed, 30 Jul 2014 14:59:25 +0200 Subject: [PATCH 430/475] fixes and Test_ICEtaHengne rereco done --- ALCARAW_RECO/alcarereco_datasets.dat | 4 + .../Test_July2014_ICEtaHengne_v1.py | 16 +++ .../ElectronRecalibSuperClusterAssociatorSH.h | 4 +- ALCARAW_RECO/ntuple_datasets.dat | 4 + ALCARAW_RECO/python/alcaSkimming.py | 116 ++++++++++-------- .../electronRecalibSCAssociatorSH_cfi.py | 3 +- ALCARAW_RECO/scripts/prodAlcarereco.sh | 30 ++--- ALCARAW_RECO/scripts/prodNtuples.sh | 13 +- ZNtupleDumper/src/ZNtupleDumper.cc | 8 +- 9 files changed, 120 insertions(+), 78 deletions(-) create mode 100644 ALCARAW_RECO/config/reRecoTags/Test_July2014_ICEtaHengne_v1.py diff --git a/ALCARAW_RECO/alcarereco_datasets.dat b/ALCARAW_RECO/alcarereco_datasets.dat index 8b19ca21063..bbfa45fbbd9 100644 --- a/ALCARAW_RECO/alcarereco_datasets.dat +++ b/ALCARAW_RECO/alcarereco_datasets.dat @@ -41,3 +41,7 @@ 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICRunD_v1 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICRunD_v2 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICRunD_v3 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICEtaHengne_v1 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICEtaHengne_v1 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICEtaHengne_v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/alcarereco Test_July2014_ICEtaHengne_v1 diff --git a/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICEtaHengne_v1.py b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICEtaHengne_v1.py new file mode 100644 index 00000000000..136b8c60dd6 --- /dev/null +++ b/ALCARAW_RECO/config/reRecoTags/Test_July2014_ICEtaHengne_v1.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +from CondCore.DBCommon.CondDBSetup_cfi import * + +RerecoGlobalTag = cms.ESSource("PoolDBESSource", + CondDBSetup, + connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), + globaltag = cms.string('FT_R_53_V21::All'), + toGet = cms.VPSet( + cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), + tag = cms.string("EcalIntercalibConstants_V20142806_2012BCD_HighEtaWithEtaScaleV1"), + connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") + ) + ), + BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') + ) diff --git a/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h b/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h index e16fc06a66d..f77e35f08e5 100644 --- a/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h +++ b/ALCARAW_RECO/interface/ElectronRecalibSuperClusterAssociatorSH.h @@ -12,6 +12,7 @@ #include "FWCore/Framework/interface/Event.h" #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Utilities/interface/InputTag.h" #include "DataFormats/Common/interface/EDProduct.h" @@ -39,8 +40,7 @@ class ElectronRecalibSuperClusterAssociatorSH : public edm::EDProducer std::string scIslandProducer_; std::string scIslandCollection_; - std::string electronProducer_; - std::string electronCollection_; + edm::InputTag electronSrc_; }; #endif diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index 019314052ee..e023dc6c42b 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -251,3 +251,7 @@ allRange /SingleElectronFlatPt10To300_pythia6/Summer12_DR53X-PU_S10_START53_V7A- 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICRunD_v1 190456-208686_22Jan_v1 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICRunD_v2 190456-208686_22Jan_v1 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICRunD_v3 190456-208686_22Jan_v1 +190645-193621 /DoubleElectron/Run2012A-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012A-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICEtaHengne_v1 190456-208686_22Jan_v1 +193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICEtaHengne_v1 190456-208686_22Jan_v1 +198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICEtaHengne_v1 190456-208686_22Jan_v1 +203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICEtaHengne_v1 190456-208686_22Jan_v1 diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index d3237c7f3c9..21e6e554d42 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -519,6 +519,9 @@ # ALCARERECO process.pathALCARERECOEcalCalElectron = cms.Path(process.alcarerecoSeq) +if(options.doTree>0): + process.pathALCARERECOEcalCalElectron+=cms.Sequence( process.pdfWeightsSeq * process.ntupleSeq) + # ALCARECO process.pathALCARECOEcalCalSingleElectron = cms.Path(process.PUDumperSeq * process.filterSeq * process.pfIsoEgamma * @@ -532,8 +535,6 @@ ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter * process.pfIsoEgamma * process.seqALCARECOEcalCalElectron) - - process.pathALCARECOEcalCalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * ~process.ZeeFilter * process.ZSCFilter * @@ -557,47 +558,6 @@ process.ALCARAWoutput_step = cms.EndPath(process.outputALCARAW) -############################################################ -# Setting collection names -############################## -#process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB") -#process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE") -process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits") -process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits") -if(options.type=="ALCARERECO"): - process.ecalRecHit.EBuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEB") - process.ecalRecHit.EEuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEE") - - process.correctedHybridSuperClusters.corectedSuperClusterCollection = 'recalibSC' - process.correctedMulti5x5SuperClustersWithPreshower.corectedSuperClusterCollection = 'endcapRecalibSC' - if(re.match("CMSSW_5_.*",CMSSW_VERSION) or re.match("CMSSW_6_.*", CMSSW_VERSION)): - process.multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" - - # in sandboxRereco - process.reducedEcalRecHitsES.EndcapSuperClusterCollection= cms.InputTag('correctedMulti5x5SuperClustersWithPreshower','endcapRecalibSC',processName) - - process.alCaIsolatedElectrons.electronLabel = cms.InputTag("electronRecalibSCAssociator") - process.alCaIsolatedElectrons.ebRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB") - process.alCaIsolatedElectrons.eeRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE") - - process.eleRegressionEnergy.inputElectronsTag = cms.InputTag('electronRecalibSCAssociator') - process.eleSelectionProducers.electronCollection = 'electronRecalibSCAssociator' - process.eleNewEnergiesProducer.electronCollection = 'electronRecalibSCAssociator' - process.patElectrons.electronSource = 'electronRecalibSCAssociator' - process.eleSelectionProducers.chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdRecalib') - process.eleSelectionProducers.emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdRecalib') - process.eleSelectionProducers.nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdRecalib') - - process.outputALCARECO.outputCommands += sandboxRerecoOutputCommands - process.outputALCARECO.fileName=cms.untracked.string('alcarereco.root') - -process.patElectrons.reducedBarrelRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEB -process.patElectrons.reducedEndcapRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEE -process.zNtupleDumper.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB -process.zNtupleDumper.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE -process.eleRegressionEnergy.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB.value() -process.eleRegressionEnergy.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE.value() - ############### JSON Filter if((options.doTree>0 and options.doTreeOnly==0)): @@ -658,10 +618,12 @@ elif(options.type=='ALCARERECO'): if(doTreeOnly): + process.NtuplePath = cms.Path(process.pdfWeightsSeq * process.ntupleSeq) process.schedule = cms.Schedule(process.NtuplePath, process.NtupleEndPath) else: + process.pathALCARERECOEcalCalElectron += process.zNtupleDumper process.schedule = cms.Schedule(process.pathALCARERECOEcalCalElectron, process.ALCARERECOoutput_step, - process.NtuplePath, process.NtupleEndPath) + ) elif(options.type=='ALCARECO' or options.type=='ALCARECOSIM'): if(doTreeOnly): process.schedule = cms.Schedule(process.NtuplePath, process.NtupleEndPath) @@ -730,16 +692,9 @@ process.sandboxRerecoSeq*=process.elPFIsoValueNeutral03PFIdRecalib - -############################ -## Dump the output Python ## -############################ -processDumpFile = open('processDump.py', 'w') -print >> processDumpFile, process.dumpPython() - -########################################################## -## Set correct electron definition for required methods ## -########################################################## +############################################################ +# Setting collection names +############################## process.selectedElectrons.src = myEleCollection process.PassingVeryLooseId.src = myEleCollection process.PassingMediumId.src = myEleCollection @@ -757,3 +712,56 @@ process.elPFIsoValueCharged03PFIdRecalib.oldreferenceCollection = myEleCollection process.elPFIsoValueGamma03PFIdRecalib.oldreferenceCollection = myEleCollection process.elPFIsoValueNeutral03PFIdRecalib.oldreferenceCollection = myEleCollection +process.electronRecalibSCAssociator.electronSrc = myEleCollection + +#process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEB") +#process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alCaRecHitsEE") +process.eleNewEnergiesProducer.recHitCollectionEB = cms.InputTag("alCaIsolatedElectrons", "alcaBarrelHits") +process.eleNewEnergiesProducer.recHitCollectionEE = cms.InputTag("alCaIsolatedElectrons", "alcaEndcapHits") + +if(options.type=="ALCARERECO"): + process.ecalRecHit.EBuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEB") + process.ecalRecHit.EEuncalibRecHitCollection = cms.InputTag("ecalGlobalUncalibRecHit","EcalUncalibRecHitsEE") + + process.correctedHybridSuperClusters.corectedSuperClusterCollection = 'recalibSC' + process.correctedMulti5x5SuperClustersWithPreshower.corectedSuperClusterCollection = 'endcapRecalibSC' + if(re.match("CMSSW_5_.*",CMSSW_VERSION) or re.match("CMSSW_6_.*", CMSSW_VERSION)): + process.multi5x5PreshowerClusterShape.endcapSClusterProducer = "correctedMulti5x5SuperClustersWithPreshower:endcapRecalibSC" + + # in sandboxRereco + process.reducedEcalRecHitsES.EndcapSuperClusterCollection= cms.InputTag('correctedMulti5x5SuperClustersWithPreshower','endcapRecalibSC',processName) + recalibElectronSrc = cms.InputTag("electronRecalibSCAssociator") + process.alCaIsolatedElectrons.electronLabel = recalibElectronSrc + process.alCaIsolatedElectrons.ebRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB") + process.alCaIsolatedElectrons.eeRecHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE") + process.alCaIsolatedElectrons.EESuperClusterCollection = process.reducedEcalRecHitsES.EndcapSuperClusterCollection + + process.eleRegressionEnergy.inputElectronsTag = recalibElectronSrc + process.eleSelectionProducers.electronCollection = recalibElectronSrc + process.eleNewEnergiesProducer.electronCollection = recalibElectronSrc + process.patElectrons.electronSource = recalibElectronSrc + process.eleSelectionProducers.chIsoVals = cms.InputTag('elPFIsoValueCharged03PFIdRecalib') + process.eleSelectionProducers.emIsoVals = cms.InputTag('elPFIsoValueGamma03PFIdRecalib') + process.eleSelectionProducers.nhIsoVals = cms.InputTag('elPFIsoValueNeutral03PFIdRecalib') + + process.outputALCARECO.outputCommands += sandboxRerecoOutputCommands + process.outputALCARECO.fileName=cms.untracked.string('alcarereco.root') + process.MinEleNumberFilter.src = recalibElectronSrc + process.zNtupleDumper.WZSkimResultsCollection = cms.InputTag('TriggerResults::ALCASKIM') + process.zNtupleDumper.SelectEvents = [] + + +process.patElectrons.reducedBarrelRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEB +process.patElectrons.reducedEndcapRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEE +process.zNtupleDumper.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB +process.zNtupleDumper.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE +process.eleRegressionEnergy.recHitCollectionEB = process.eleNewEnergiesProducer.recHitCollectionEB.value() +process.eleRegressionEnergy.recHitCollectionEE = process.eleNewEnergiesProducer.recHitCollectionEE.value() + + + +############################ +## Dump the output Python ## +############################ +processDumpFile = open('processDump.py', 'w') +print >> processDumpFile, process.dumpPython() diff --git a/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py b/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py index 709aec0e376..a8ac493f756 100644 --- a/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py +++ b/ALCARAW_RECO/python/electronRecalibSCAssociatorSH_cfi.py @@ -1,11 +1,10 @@ import FWCore.ParameterSet.Config as cms electronRecalibSCAssociator = cms.EDProducer("ElectronRecalibSuperClusterAssociatorSH", - electronCollection = cms.string(''), scIslandCollection = cms.string('endcapRecalibSC'), scIslandProducer = cms.string('correctedMulti5x5SuperClustersWithPreshower'), scProducer = cms.string('correctedHybridSuperClusters'), - electronProducer = cms.string('gedGsfElectrons'), + electronSrc = cms.InputTag('gedGsfElectrons'), scCollection = cms.string('recalibSC') ) diff --git a/ALCARAW_RECO/scripts/prodAlcarereco.sh b/ALCARAW_RECO/scripts/prodAlcarereco.sh index 9316fbcc8f9..327717b3676 100755 --- a/ALCARAW_RECO/scripts/prodAlcarereco.sh +++ b/ALCARAW_RECO/scripts/prodAlcarereco.sh @@ -223,25 +223,25 @@ if [ -n "${CREATE}" ];then checkRelease ${DATASETPATH} if [ -z "${TUTORIAL}" ];then -if [ "`cat alcarereco_datasets.dat | grep \"$TAG[ ]*\$\" | grep ${DATASETNAME} | grep -c $RUNRANGE`" != "0" ];then - echo "[WARNING] Rereco $TAG already done for ${RUNRAGE} ${DATASETNAME}" - if [ "${DOTREE}" == "1" ]; then - echo " Doing only ntuples" - if [ "`cat ntuple_datasets.dat | grep \"$TAG[ ]*\$\" | grep ${DATASETNAME} | grep -c $RUNRANGE`" != "0" ];then - echo "[WARNING] Ntuple for rereco $TAG already done for ${RUNRAGE} ${DATASETNAME}" + if [ "`cat alcarereco_datasets.dat | grep \"$TAG[ ]*\$\" | grep ${DATASETNAME} | grep -c $RUNRANGE`" != "0" ];then + echo "[WARNING] Rereco $TAG already done for ${RUNRAGE} ${DATASETNAME}" + if [ "${DOTREE}" == "1" ]; then + echo " Doing only ntuples" + if [ "`cat ntuple_datasets.dat | grep \"$TAG[ ]*\$\" | grep ${DATASETNAME} | grep -c $RUNRANGE`" != "0" ];then + echo "[WARNING] Ntuple for rereco $TAG already done for ${RUNRAGE} ${DATASETNAME}" + exit 0 + fi + ./scripts/prodNtuples.sh -r ${RUNRANGE} -d ${DATASETPATH} -n ${DATASETNAME} --store ${STORAGE_ELEMENT} --remote_dir ${USER_REMOTE_DIR_BASE} --type=ALCARERECO --json=${JSONFILE} --json_name=${JSONNAME} -t ${TAGFILE} ${DOEXTRACALIBTREE} ${EXTRAOPTION} exit 0 fi - ./scripts/prodNtuples.sh -r ${RUNRANGE} -d ${DATASETPATH} -n ${DATASETNAME} --store ${STORAGE_ELEMENT} --remote_dir ${USER_REMOTE_DIR_BASE} --type=ALCARERECO --json=${JSONFILE} --json_name=${JSONNAME} -t ${TAGFILE} ${DOEXTRACALIBTREE} ${EXTRAOPTION} exit 0 fi - exit 0 -fi - -if [ "`cat ntuple_datasets.dat | grep \"$TAG[ ]*\$\" | grep ${DATASETNAME} | grep -c $RUNRANGE`" != "0" ];then - echo "[WARNING] Ntuple for rereco $TAG already done for ${RUNRAGE} ${DATASETNAME}" - echo " Doing only alcarereco" - DOTREE=0 -fi + + if [ "`cat ntuple_datasets.dat | grep \"$TAG[ ]*\$\" | grep ${DATASETNAME} | grep -c $RUNRANGE`" != "0" ];then + echo "[WARNING] Ntuple for rereco $TAG already done for ${RUNRAGE} ${DATASETNAME}" + echo " Doing only alcarereco" + DOTREE=0 + fi fi if [ -z "$FILELIST" ];then diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 1851daa5f49..7a10bef022e 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -72,7 +72,7 @@ expertUsage(){ # options may be followed by one colon to indicate they have a required argument -if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,isParticleGun,ntuple_remote_dir:,json:,tag:,type:,json_name:,sandbox_remote_dir:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,createOnly,submitOnly,check,file_per_job:,develRelease -- "$@") +if ! options=$(getopt -u -o hHd:n:s:r:t:f: -l help,expertHelp,datasetpath:,datasetname:,skim:,runrange:,store:,remote_dir:,scheduler:,isMC,isParticleGun,ntuple_remote_dir:,json:,tag:,type:,json_name:,ui_working_dir:,extraName:,doExtraCalibTree,doEleIDTree,doPdfSystTree,noStandardTree,createOnly,submitOnly,check,file_per_job:,develRelease -- "$@") then # something went wrong, getopt will put out an error message for us exit 1 @@ -138,7 +138,6 @@ do -t | --tag) TAGFILE=$2; echo "[OPTION] TAGFILE:$TAGFILE"; TAG=`basename $TAGFILE .py`; shift;; --ntuple_store) STORAGE_ELEMENT=$2; shift;; --ui_working_dir) UI_WORKING_DIR=$2; shift;; - --sandbox_remote_dir) shift;; # ignore the option --scheduler) SCHEDULER=$2; shift;; #--puWeight) PUWEIGHTFILE=$2; shift;; --extraName) EXTRANAME=$2;shift;; @@ -223,6 +222,11 @@ if [ "${TYPE}" == "ALCARERECO" ];then fi fi +setStoragePath $STORAGE_ELEMENT $SCHEDULER +### +setUserRemoteDirAlcarereco $ORIGIN_REMOTE_DIR_BASE +ORIGIN_REMOTE_DIR=${USER_REMOTE_DIR} +### # make the filelist before parsing the options and arguments options="-d ${DATASETPATH} -n ${DATASETNAME} -r ${RUNRANGE} --remote_dir ${ORIGIN_REMOTE_DIR_BASE}" if [ -n "${TAGFILE}" ];then options="$options -t ${TAGFILE}"; fi @@ -238,7 +242,9 @@ case ${ORIGIN_REMOTE_DIR_BASE} in fi if [ ! -e "${FILELIST}" ];then - filelistDatasets.sh $options || exit 1 + #sample=tempFileList-${DATASETNAME}-${RUNRANGE}-${TAG} + makefilelist.sh -f "filelist/${TAG}" `basename ${FILELIST} .list` $STORAGE_PATH/${ORIGIN_REMOTE_DIR} || exit 1 + #filelistDatasets.sh $options || exit 1 fi ;; esac @@ -281,7 +287,6 @@ fi -setStoragePath $STORAGE_ELEMENT $SCHEDULER in #------------------------------ diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 26e0ab6cafd..29b5ca013b0 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -700,6 +700,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if( eleIter1->et()<30) continue; doFill=true; + if(eventType==UNKNOWN) eventType=WENU; TreeSetSingleElectronVar(*eleIter1, 0); //fill first electron TreeSetSingleElectronVar(*eleIter1, -1); // fill fake second electron @@ -723,6 +724,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if((mass < 55 || mass > 125)) continue; doFill=true; + if(eventType==UNKNOWN) eventType=ZEE; TreeSetDiElectronVar(*eleIter1, *eleIter2); if(doExtraCalibTree){ @@ -738,7 +740,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } } } - } else if (eventType==ZSC){ + } + if (eventType==ZSC || eventType==UNKNOWN){ //leading pt electron in EB (patElectrons should be pt-ordered) // iterators storing pat Electons and HighEta SCs @@ -868,6 +871,9 @@ void ZNtupleDumper::beginJob() InitPdfSystTree(); } + for(int i=ZEE; i <= DEBUG; i++){ + eventTypeCounter[i]=0; + } #ifdef DEBUG std::cout << "[DEBUG] End creation of ntuples" << std::endl; From 6d91a23beada0c4ca4ffb00d212160867eb79511 Mon Sep 17 00:00:00 2001 From: Shervin Date: Fri, 1 Aug 2014 21:10:36 +0200 Subject: [PATCH 431/475] ZSkimPath ntuples for MC --- ALCARAW_RECO/ntuple_datasets.dat | 8 ++++++++ ALCARAW_RECO/python/alcaSkimming.py | 3 ++- ALCARAW_RECO/scripts/prodNtuples.sh | 17 ++++++++++++++--- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ALCARAW_RECO/ntuple_datasets.dat b/ALCARAW_RECO/ntuple_datasets.dat index e023dc6c42b..8305f09bb65 100644 --- a/ALCARAW_RECO/ntuple_datasets.dat +++ b/ALCARAW_RECO/ntuple_datasets.dat @@ -255,3 +255,11 @@ allRange /SingleElectronFlatPt10To300_pythia6/Summer12_DR53X-PU_S10_START53_V7A- 193834-196531 /DoubleElectron/Run2012B-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012B-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICEtaHengne_v1 190456-208686_22Jan_v1 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICEtaHengne_v1 190456-208686_22Jan_v1 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARERECO Test_July2014_ICEtaHengne_v1 190456-208686_22Jan_v1 +200519-200519 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v3/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +194533-194533 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +200519-200519 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM +206859-206859 /DYJets_0p0_1p2_2p10_3p15_4p15_CT10_8TeV-sherpa/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM DYJets_sherpa-Summer12-START53-ZSkimPath-runDependent caf.cern.ch group/alca_ecalcalib/ecalelf/ntuples ALCARECOSIM diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 21e6e554d42..46dc6c3260a 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -749,7 +749,8 @@ process.MinEleNumberFilter.src = recalibElectronSrc process.zNtupleDumper.WZSkimResultsCollection = cms.InputTag('TriggerResults::ALCASKIM') process.zNtupleDumper.SelectEvents = [] - + process.zNtupleDumper.EESuperClusterCollection = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower','endcapRecalibSC', 'ALCARERECO') + process.patElectrons.reducedBarrelRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEB process.patElectrons.reducedEndcapRecHitCollection = process.eleNewEnergiesProducer.recHitCollectionEE diff --git a/ALCARAW_RECO/scripts/prodNtuples.sh b/ALCARAW_RECO/scripts/prodNtuples.sh index 7a10bef022e..cc63ad716f4 100755 --- a/ALCARAW_RECO/scripts/prodNtuples.sh +++ b/ALCARAW_RECO/scripts/prodNtuples.sh @@ -224,12 +224,17 @@ fi setStoragePath $STORAGE_ELEMENT $SCHEDULER ### -setUserRemoteDirAlcarereco $ORIGIN_REMOTE_DIR_BASE -ORIGIN_REMOTE_DIR=${USER_REMOTE_DIR} ### # make the filelist before parsing the options and arguments options="-d ${DATASETPATH} -n ${DATASETNAME} -r ${RUNRANGE} --remote_dir ${ORIGIN_REMOTE_DIR_BASE}" -if [ -n "${TAGFILE}" ];then options="$options -t ${TAGFILE}"; fi +if [ -n "${TAGFILE}" ];then + options="$options -t ${TAGFILE}"; + setUserRemoteDirAlcarereco $ORIGIN_REMOTE_DIR_BASE + ORIGIN_REMOTE_DIR=${USER_REMOTE_DIR} +else + setUserRemoteDirAlcareco $ORIGIN_REMOTE_DIR_BASE + ORIGIN_REMOTE_DIR=${USER_REMOTE_DIR} +fi case ${ORIGIN_REMOTE_DIR_BASE} in database) @@ -245,6 +250,12 @@ case ${ORIGIN_REMOTE_DIR_BASE} in #sample=tempFileList-${DATASETNAME}-${RUNRANGE}-${TAG} makefilelist.sh -f "filelist/${TAG}" `basename ${FILELIST} .list` $STORAGE_PATH/${ORIGIN_REMOTE_DIR} || exit 1 #filelistDatasets.sh $options || exit 1 + # remove PUDumper files! + if [ -n "$TAG" ];then + sed -i '/PUDumper/ d' filelist/*/*.list + else + sed -i '/PUDumper/ d' filelist/*.list + fi fi ;; esac From 6215320bdd6146029612d6cf75065cc90d7a3bfe Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 25 Aug 2014 10:53:22 +0200 Subject: [PATCH 432/475] removed invalid single electron alcareco --- ALCARAW_RECO/alcareco_datasets.dat | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index 0cb98951530..ae9081d0f27 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -98,10 +98,6 @@ allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B- 198022-203742 /DoubleElectron/Run2012C-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012C,RUN2012ABC,RUN2012ABCD 203777-208686 /DoubleElectron/Run2012D-ZElectron-22Jan2013-v1/RAW-RECO DoubleElectron-ZSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012D,RUN2012ABCD ### -190645-193621 /SingleElectron/Run2012A-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD -193834-196531 /SingleElectron/Run2012B-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD -198022-203742 /SingleElectron/Run2012C-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012C-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012C,RUN2012ABC,RUN2012ABCD -203777-208686 /SingleElectron/Run2012D-22Jan2013-v1/AOD SingleElectron-WSkim-RUN2012D-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco INVALID RUN2012D,RUN2012ABCD ### 190645-193621 /DoubleElectron/Run2012A-22Jan2013-v1/AOD DoubleElectron-ZSkimPath-RUN2012A-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012A,RUN2012AB,RUN2012ABC,RUN2012ABCD 193834-196531 /DoubleElectron/Run2012B-22Jan2013-v1/AOD DoubleElectron-ZSkimPath-RUN2012B-22Jan-v1 caf group/alca_ecalcalib/ecalelf/alcareco VALID RUN2012B,RUN2012AB,RUN2012ABC,RUN2012ABCD From eb817d4f52a2b1b8a21bc0d050bf8019de8832d3 Mon Sep 17 00:00:00 2001 From: Shervin Date: Mon, 25 Aug 2014 11:11:47 +0200 Subject: [PATCH 433/475] added paths for studying skim efficiency --- ALCARAW_RECO/BuildFile.xml | 2 + ALCARAW_RECO/python/WZElectronSkims_cff.py | 14 ++++-- ALCARAW_RECO/python/alcaSkimming.py | 58 +++++++++++++++++++++- 3 files changed, 69 insertions(+), 5 deletions(-) diff --git a/ALCARAW_RECO/BuildFile.xml b/ALCARAW_RECO/BuildFile.xml index c0a6cd17b8d..cee478060ee 100644 --- a/ALCARAW_RECO/BuildFile.xml +++ b/ALCARAW_RECO/BuildFile.xml @@ -23,6 +23,8 @@ + + diff --git a/ALCARAW_RECO/python/WZElectronSkims_cff.py b/ALCARAW_RECO/python/WZElectronSkims_cff.py index 5864d88ff33..9b417ad9f54 100644 --- a/ALCARAW_RECO/python/WZElectronSkims_cff.py +++ b/ALCARAW_RECO/python/WZElectronSkims_cff.py @@ -65,7 +65,8 @@ selectedElectrons = cms.EDFilter("GsfElectronRefSelector", src = cms.InputTag( 'gedGsfElectrons' ), cut = cms.string( - "(abs(superCluster.eta)<2.5) && (energy*sin(superClusterPosition.theta)> 15)") +# "(abs(superCluster.eta)<2.5) && (energy*sin(superClusterPosition.theta)> 15)") + "(abs(superCluster.eta)<3) && (energy*sin(superClusterPosition.theta)> 15)") ) # This are the cuts at trigger level except ecalIso PassingVeryLooseId = selectedElectrons.clone( @@ -159,7 +160,7 @@ max = cms.double("0.5") ) -eleSelSeq = cms.Sequence( PassingVeryLooseId + PassingTightId + +eleSelSeq = cms.Sequence( selectedElectrons + PassingVeryLooseId + PassingTightId + (SCselector*eleSC) ) @@ -189,9 +190,11 @@ EleSCSelector = cms.EDProducer("CandViewShallowCloneCombiner", decay = cms.string("PassingVeryLooseId eleSC"), +# decay = cms.string("selectedElectrons eleSC"), +# decay = cms.string("PassingVeryLooseId photons"), checkCharge = cms.bool(False), # cut = cms.string("40 27") - cut = cms.string("40 Date: Mon, 25 Aug 2014 11:12:22 +0200 Subject: [PATCH 434/475] ALCARECOSIM for geometry study --- ALCARAW_RECO/alcareco_datasets.dat | 1 + 1 file changed, 1 insertion(+) diff --git a/ALCARAW_RECO/alcareco_datasets.dat b/ALCARAW_RECO/alcareco_datasets.dat index ae9081d0f27..efcbf21e478 100644 --- a/ALCARAW_RECO/alcareco_datasets.dat +++ b/ALCARAW_RECO/alcareco_datasets.dat @@ -40,6 +40,7 @@ allRange /QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/Summer12_DR53X-PU_R allRange /DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYJets-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco allRange /DYToEE_M-20_CT10_TuneZ2_7TeV-powheg-pythia/Summer11dr53X-PU_S13_START53_LV3-v1/AODSIM DYToEE_M20_powheg-Summer11-START53-ZSkim caf group/alca_ecalcalib/ecalelf/alcareco ################### MC geometries and material +allRange /DYEE_8TeV_53X_MatBudget/Summer12ExtendedGeo14DR-PU2012ABCD_START53_V29A-v3/GEN-SIM-RECODEBUG DYToEE-Summer12-START53-ZSkim-runDependent-Ext14DR caf group/alca_ecalcalib/alcareco allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-ExtFlat10_PU_RD1_START53_V7N-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-ExtFlat10 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-ExtFlat20_PU_RD1_START53_V7N-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-ExtFlat20 caf group/alca_ecalcalib/alcareco allRange /DYToEE_M-20_CT10_TuneZ2star_v2_8TeV-powheg-pythia6/Summer12_DR53X-ExtFlat30_PU_RD1_START53_V7N-v1/AODSIM DYToEE_M20_powheg-Summer12-START53-ZSkim-runDependent-ExtFlat30 caf group/alca_ecalcalib/alcareco From 49be195d682aaf58b41ec4bfd93fc21152babbaf Mon Sep 17 00:00:00 2001 From: Shervin Date: Tue, 26 Aug 2014 13:45:32 +0200 Subject: [PATCH 435/475] missing gsf electron name change --- ALCARAW_RECO/python/alcaSkimming.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 3bb98b0bcfa..f55eeb54ff2 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -763,6 +763,7 @@ process.alCaIsolatedElectrons.electronLabel = myEleCollection process.alcaElectronTracksReducer.electronLabel = myEleCollection process.elPFIsoDepositGammaGsf.src = myEleCollection +process.elPFIsoDepositChargedGsf.src = myEleCollection process.elPFIsoValueCharged03PFIdRecalib.oldreferenceCollection = myEleCollection process.elPFIsoValueGamma03PFIdRecalib.oldreferenceCollection = myEleCollection process.elPFIsoValueNeutral03PFIdRecalib.oldreferenceCollection = myEleCollection From 0ea7fb21c30e4f36802d11a1f15dfeb8ea5da2e9 Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 26 Aug 2014 12:26:31 +0200 Subject: [PATCH 436/475] missing modification for .cc file --- .../src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch b/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch index 881010c9cc5..a905ae4002f 100644 --- a/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch +++ b/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch @@ -38,8 +38,8 @@ ElectronRecalibSuperClusterAssociatorSH::ElectronRecalibSuperClusterAssociatorSH scIslandProducer_ = iConfig.getParameter("scIslandProducer"); scIslandCollection_ = iConfig.getParameter("scIslandCollection"); - electronProducer_ = iConfig.getParameter ("electronProducer"); - electronCollection_ = iConfig.getParameter ("electronCollection"); + electronSrc_ = iConfig.getParameter ("electronSrc"); + #ifdef DEBUG std::cout<< "ElectronRecalibSuperClusterAssociatorSH::ElectronRecalibSuperClusterAssociatorSH::end" << std::endl; #endif @@ -89,7 +89,7 @@ void ElectronRecalibSuperClusterAssociatorSH::produce(edm::Event& e, const edm:: // Get Electrons Handle > pElectrons; - e.getByLabel(electronProducer_, electronCollection_, pElectrons); + e.getByLabel(electronSrc_, pElectrons); if (!pElectrons.isValid()) { std::cerr << "Error! can't get the product ElectronCollection "<< std::endl; } From 9465026f220a79bcf5765d583e157cd972ee3f18 Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 1 Aug 2014 21:11:43 +0200 Subject: [PATCH 437/475] Updated documentation for rereco and ntuple production --- ALCARAW_RECO/doc/ntuple_production.txt | 14 +++++++++---- ALCARAW_RECO/doc/rereco.txt | 27 ++++---------------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/ALCARAW_RECO/doc/ntuple_production.txt b/ALCARAW_RECO/doc/ntuple_production.txt index e08882ab555..56b2ac712dd 100644 --- a/ALCARAW_RECO/doc/ntuple_production.txt +++ b/ALCARAW_RECO/doc/ntuple_production.txt @@ -10,15 +10,21 @@ All commands should be executed from the Calibration/ALCARAW_RECO directory. alcareco_datasets.dat, alcarereco_datasets.dat provide the useful informations to build the list of files on EOS and process them. as for the alcareco and alcaraw productions, you have to provide such informations using the parseDatasetFile.sh script with the right book-keeping file. -### from alcareco -## for data: +\subsection fromALCARECO From alcareco +for data: +\code ./scripts/prodNtuples.sh `parseDatasetFile.sh alcareco_datasets.dat | grep {string to select your dataset}` --type=ALCARECO --json jsonFile.txt --json_name -## for MC: +\endcode +for MC: +\code ./scripts/prodNtuples.sh `parseDatasetFile.sh alcareco_datasets.dat | grep {string to select your dataset}` --type=ALCARECOSIM +\endcode -### from alcarereco +\subsection fromALCARERECO From alcarereco Better to use the quick script, but if you want to process only one specific dataset: +\code ./scripts/prodNtuples.sh `parseDatasetFile.sh alcarereco_datasets.dat | grep {string to select your dataset}` --type=ALCARERECO +\endcode diff --git a/ALCARAW_RECO/doc/rereco.txt b/ALCARAW_RECO/doc/rereco.txt index 25608d30919..387d6184a01 100644 --- a/ALCARAW_RECO/doc/rereco.txt +++ b/ALCARAW_RECO/doc/rereco.txt @@ -7,7 +7,7 @@ ALCARAW_RECO/scripts/RerecoQuick.sh from the directory ALCARAW_RECO \subsection RERECO_inputFiles Input files - 1. ALCARAW_RECO/config/reRecoTags/tag_name.py: +-# ALCARAW_RECO/config/reRecoTags/tag_name.py: is the file where the GT and the list of tags to be used for the rereco and the ntuple production have to be specified. @@ -15,9 +15,9 @@ from the directory ALCARAW_RECO assigned to all the directories created for the rereco and the ntuples (the crab directory in ALCARAW_RECO/prod_alcarereco - and the directories in eos with the reco files and the ntuples) - - 2. alcaraw_datasets.dat is the file with the list of the available alcaraw files + and the directories in eos with the reco files and the ntuples). + \b More info in \ref TAGFILES +-# alcaraw_datasets.dat is the file with the list of the available alcaraw files \subsection RERECO_outputFiles Output files 1. alcarereco_datasets.dat is the file with the list of all the @@ -68,25 +68,6 @@ the command Not yet tested!!! -\subsection lxplus6job Job submission on lxplus6 -Batch nodes at CERN are moving to slc6 and can be accessible only from lxplus6 machines. -Consider to create the jobs on a lxplus5 machin with the previous command and adding the --createOnly option. -Then move to an lxplus6 machine and re-execute the command but with the --submitOnly option instead. - - - create the jobs on sl5 with option ./scripts/RerecoQuick.sh .... --createOnly - - login on sls6 - - cd to the ...CMSSW_5_3_14_patch2/src/Calibration/ - - source initCmsEnv.csh - - ignore the error messages - - submit the jobs on sl6 with option ./scripts/RerecoQuick.sh .... --submitOnly - -Additional tricks with CERN batch system: -if for any reason you want to migrate pending jobs from one queue to another you can run the command (bash syntax) -\code -for jobid in `bjobs -q cmscaf1nd | cut -d ' ' -f 1`; do bmod -q 1nd $jobid; done -\endcode - - \subsection rerecoExample Rereco example: \code From 8e2b3d597ad73bd06459e7edd9c9b5d7b4de0aee Mon Sep 17 00:00:00 2001 From: shervin Date: Fri, 1 Aug 2014 21:12:09 +0200 Subject: [PATCH 438/475] removed spaces and comments --- ZFitter/interface/ZeeEvent.hh | 20 +------------------- ZNtupleDumper/src/ZNtupleDumper.cc | 4 ++-- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/ZFitter/interface/ZeeEvent.hh b/ZFitter/interface/ZeeEvent.hh index f726cf5bfe3..e4bbfacf4d2 100644 --- a/ZFitter/interface/ZeeEvent.hh +++ b/ZFitter/interface/ZeeEvent.hh @@ -1,33 +1,15 @@ #ifndef zeeevent_hh #define zeeevent_hh - - +/// class ZeeEvent ZeeEvent.h "interface/ZeeEvent.h" class ZeeEvent{ public: - // Long64_t eventNumber; - // TString region_name_ele1; - // TString region_name_ele2; - // int region_ele1; - // int region_ele2; float energy_ele1; float energy_ele2; - //float angle_eta_ele1_ele2; float invMass; - // float eta_ele1; - // float eta_ele2; -/* float phi_ele1; */ -/* float phi_ele2; */ float weight; -// float pu_weight; -// float r9weight1; -// float r9weight2; float *smearings_ele1, *smearings_ele2; - // float smearings_ele1[NSMEARTOY], *smearings_ele2; - - }; typedef std::vector zee_events_t; #endif - diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 29b5ca013b0..bc3c3bf1a65 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -321,8 +321,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t invMass_inGsf; Float_t invMass_outGsf; Float_t invMass_SC_etaphiSC; - Int_t nBX; - Int_t bxPU[5]; //[nBX] + Int_t nBX; + Int_t bxPU[5]; //[nBX] Int_t tagProbe_check; Int_t nBCSCEle[2]; #endif From f345b1f3f44669fa2d4982c2c1e7f5acf0c32784 Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 26 Aug 2014 12:25:40 +0200 Subject: [PATCH 439/475] removed old readme --- ALCARAW_RECO/doc/README | 110 ---------------------------------------- 1 file changed, 110 deletions(-) delete mode 100644 ALCARAW_RECO/doc/README diff --git a/ALCARAW_RECO/doc/README b/ALCARAW_RECO/doc/README deleted file mode 100644 index 0e450488fdf..00000000000 --- a/ALCARAW_RECO/doc/README +++ /dev/null @@ -1,110 +0,0 @@ -/** -* \page page2 Ciao -* \verbatim -Testing the alcaraw + alcareco production -cmsRun ALCARAW_RECO/python/alcaSkimming.py files=file://../../../B292A7F8-3A7F-E111-A1A5-001D09F29114.root maxEvents=6 &> log2.log - -Testing the alcarereco production -cmsRun ALCARAW_RECO/python/alcaSkimming.py files=file://alcaraw.root maxEvents=4 type=ALCARERECO tagFile=ALCARAW_RECO/config/reRecoTags/Cal_Jun2013_AlphaComb_v1.py &> log.log - -#============================== RERECO -Instructions: - -To run the Rereco with a new set of IC tags it is necessary to have a configuration file corresponding to those tags. - -An example of a configuration file: - -############################################################## -import FWCore.ParameterSet.Config as cms -from CondCore.DBCommon.CondDBSetup_cfi import * - -#### Please fill with comments -# Basic tag combination for 2012 end year seminar conditions -# Laser, alpha tags are fixed: no time to improve them -# A set of IC are derived on top of them and will be tested: -# Cal_Nov2012_ICEle_v2: -# description -# - -RerecoGlobalTag = cms.ESSource("PoolDBESSource", - CondDBSetup, - connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'), - globaltag = cms.string('GR_R_53_V13::All'), - toGet = cms.VPSet( - cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"), - tag = cms.string('EcalLaserAPDPNRatios_data_20120814_2011-2012_v3_upd20120919'), - connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS") - ) - ,cms.PSet(record = cms.string('EcalLaserAlphasRcd'), - tag = cms.string('EcalLaserAlphas_EB_sic1_btcp152_EE_sic1_btcp116'), - connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL') - ) - ,cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), - tag = cms.string('EcalIntercalibConstants_V20120922_Ele19092012_2012IncEtaScale8TeV'), - connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") - ) - ), - BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') - ) - -############################################################# - - -Where, in this case, the IC tag is EcalIntercalibConstants_V20120922_Ele19092012_2012IncEtaScale8TeV. -When the rereco has to be run with a new IC tag, a new file has to be created and it will be similar to the one above except for the section: - -cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"), - tag = cms.string('EcalIntercalibConstants_V20120922_Ele19092012_2012IncEtaScale8TeV'), - connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL") - ) - -It has to be modified with the replacement of the IC tag inside tag = cms.string('...') -These files are in the directory: -ALCARAW_RECOconfig/reRecoTags -The convention is to name these configuration files in this way: tag_name.py - -So, for the rereco production follow the steps below: - -1. create the tag_name.py in ALCARAW_RECOconfig/reRecoTags directory - -2. commit the file in svn: -svn add config/reRecoTags/tag_name.py -svn ci -m "...." config/reRecoTags/tag_name.py - -3. Define the period in alcaraw_datasets.dat if not already defined - -4. run the script RerecoQuick.sh giving two parameters: period and tag_name -./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --scheduler=lsf --rereco -For example: ./scripts/RerecoQuick.sh -p Cal_Nov2012 -t config/reRecoTags/Cal_Nov2012_ICcombAllR9_v2.py --rereco --scheduler=lsf - -More info: -For each dataset defined by the period, -the script - - makes the list of ALCARAW files present on EOS - - creates a crab cfg file: tmp/sandboxRereco.cfg - - execute the command crab -cfg tmp/sandboxRereco.cfg -create - - cracks the list of input files for crab putting the ALCARAW files list - - execute the command crab -c sandboxRereco/_taskDir_/ -submit - - waits for 50 minutes - - check if the jobs are exited with status 0, if not resubmit the failed jobs - - re-check every 10 minutes - - stops only if finishes all jobs with status 0 - -5. check the exit status of the jobs: -./script/checkAndResubmitRereco.sh -t config/reRecoTags/tag_name.py - This command will loop over all folders corresponding to the different - datasets and check if jobs are exited with status 0 - - -6. if all fine, commit the alcarereco_datasets.dat file -svn status -u -svn update -svn ci -m "rereco tag_name done" - - - - - - -\endverbatim -*/ From 35dfcaca7b30bfaf4df57452015bb02a51ae33dc Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 26 Aug 2014 13:47:33 +0200 Subject: [PATCH 440/475] missing gsf electron name change --- ALCARAW_RECO/python/alcaSkimming.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index f55eeb54ff2..123e0427fed 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -762,6 +762,7 @@ process.eleNewEnergiesProducer.electronCollection = myEleCollection process.alCaIsolatedElectrons.electronLabel = myEleCollection process.alcaElectronTracksReducer.electronLabel = myEleCollection +process.elPFIsoDepositChargedGsf.src = myEleCollection process.elPFIsoDepositGammaGsf.src = myEleCollection process.elPFIsoDepositChargedGsf.src = myEleCollection process.elPFIsoValueCharged03PFIdRecalib.oldreferenceCollection = myEleCollection From 877685d65fb66721e99f4b387481053f5ce8c5ad Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 26 Aug 2014 14:04:46 +0200 Subject: [PATCH 441/475] fixed missing modules for ele isolation variables in alcaraw --- ALCARAW_RECO/python/alcaSkimming.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 123e0427fed..611e494963f 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -300,7 +300,7 @@ # particle flow isolation # process.pfIsoEgamma = cms.Sequence() -if((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): +if((options.type=='ALCARECO' or options.type=='ALCARECOSIM' or options.type=='ALCARAW') and not re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) @@ -553,16 +553,20 @@ # ALCARAW process.pathALCARECOEcalUncalSingleElectron = cms.Path(process.PUDumperSeq * process.filterSeq * - (process.ALCARECOEcalCalElectronPreSeq + - process.seqALCARECOEcalUncalElectron )) + process.pfIsoEgamma * + (process.ALCARECOEcalCalElectronPreSeq + + process.seqALCARECOEcalUncalElectron )) process.pathALCARECOEcalUncalZElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * + process.pfIsoEgamma * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) process.pathALCARECOEcalUncalZSCElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * + process.pfIsoEgamma * ~process.ZeeFilter * process.ZSCFilter * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) process.pathALCARECOEcalUncalWElectron = cms.Path( process.PUDumperSeq * process.filterSeq * process.FilterSeq * + process.pfIsoEgamma * ~process.ZeeFilter * ~process.ZSCFilter * process.WenuFilter * (process.ALCARECOEcalCalElectronPreSeq + process.seqALCARECOEcalUncalElectron )) From 5d47a9a49ac4a30f08c318cb7afa65481b0eed92 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 8 Sep 2014 12:18:24 +0200 Subject: [PATCH 442/475] Updated documentation --- .../doc/alcaraw_alcareco_production.txt | 117 +++--------------- ALCARAW_RECO/doc/ntuple_production.txt | 14 ++- 2 files changed, 27 insertions(+), 104 deletions(-) diff --git a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt index 81ba6e88c94..2dc243e4508 100644 --- a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt +++ b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt @@ -5,21 +5,16 @@ Steps for the production using the CERN batch system (launch from lxplus): -0) Check that there are no updates in the repository, +-# Check that there are no updates in the repository, this will merge automatically the updates in the master branch \code git pull \endcode - - -1) Fill the alcareco_datasets.dat with the information of the desired run range +-# Fill the alcareco_datasets.dat with the information of the desired run range It is convenient to add the new line at the bottom of the file. Please refere to the \ref DATAFORMATS file for information - about how the alcareco_datasets.dat file is structured. - + about how the alcareco_datasets.dat file is structured. For this step, in case of update of a growing dataset, please have a look to the "Production update" section below - - -2) \code +-# \code ./scripts/prodAlcareco.sh `parseDatasetFile.sh alcareco_datasets.dat |grep 22Jan | grep Run2012A` --tutorial \endcode \code @@ -33,93 +28,15 @@ Steps for the production using the CERN batch system (launch from lxplus): use the --isMC is the dataset is MC use the -s skim: ZSkim, WSkim, EleSkim for the preselection (ZSkim usually) use --scheduler=remoteGlidein if the dataset is not at T2_CH_CERN and you want to use the grid - see ./scripts/prodAlcareco.sh --help for more informations - -3) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial --check +-# ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial --check check the job status and output - -4) Commit the changes to alcaraw_datasets.dat! +-# Commit the changes to alcaraw_datasets.dat! \code git add alcareco_datasets.dat git commit -m "message" \endcode - - - -* \verbatim - -OUTDATED instructions -#============================== ALCARECO and ALCARAW production instructions - - -#### ALCARAW private production -> TO BE UPDATED -The following instructions correspond to point: 1a), 1.1a), 2a) indicated in -Calibration/README: -https://svnweb.cern.ch/cern/wsvn/analysis/trunk/Calibration/README - -For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.dump file - -1) Fill the alcaraw_datasets.dat with the information of the desired run range - It is convenient to add the new line at the bottom of the file. - For this step, in case of update of a growing dataset, please have - a look to the "Production update" section below - -2) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial - use the --tutorial if you are testing the machinery - use grep commands to select the proper line from alcaraw_datasets.dat - the script will create the crab task and submit it - use --createOnly or --submitOnly if needed - see ./scripts/prodAlcaraw.sh --help for more informations - -3) ./scripts/prodAlcaraw.sh `parseDatasetFile.sh alcaraw_datasets.dat |grep 22Jan | grep Run2012A` --tutorial --check - check the job status and output - -4) Commit the changes to alcaraw_datasets.dat! - svn ci -m "message" - - - - - - - - - - - - - - -######### OBSOLETE INSTRUCTIONS -4a) Produce the ALCARECO: (if you have put the new line as last line) - ./scripts/prodAlcareco.sh `parseProdSandboxOptions.sh alcaraw_datasets.dat | tail -1` --submit --scheduler lsf - (otherwise) - parseProdSandboxOptions.sh alcaraw_datasets.dat - copy the output for the line you are interested in - ./scripts/prodAlcareco.sh [PAST THE LINE] --submit --scheduler lsf - - If you are producing ALCARECO for a line added to - alcareco_datasets.dat, just replace alcaraw_datasets.dat with - alcareco_datasets.dat - FOR MC: you need to add the --isMC option to the command -4b) Produce the ALCARAW: (if you have put the new line as last line) - ./scripts/prodSandbox.sh `parseProdSandboxOptions.sh alcaraw_datasets.dat | tail -1` --submit --scheduler lsf - (otherwise) - parseProdSandboxOptions.sh alcaraw_datasets.dat - copy the output for the line you are interested in - ./scripts/prodSandbox.sh [PAST THE LINE] --submit --scheduler lsf - - To produce launching jobs on the GRID, change --scheduler lsf in --scheduler glite or --scheduler glidein - -4c) To check the staus of the jobs submitted do: - for dir in prod_alcareco/DoubleElectron-RUN2012A-May10ReReco-v1/*/; do echo $dir; ./scripts/resubmitCrab.sh -u $dir; done - - The script resubmitCrab.sh checks the exit code of each single job and it resubmits the jobs if the exit code is different from 0 except for in some cases (for particular exit code) - - - -5) The final output will be put: +-# The final output will be put: in the storage element indicated in the alcaraw_datasets.dat or alcareco_datasets.dat file in the subdir of the store/ directory indicated in the alcaraw_datasets.dat or alcareco_datasets.dat and following the structure indicated below: @@ -133,30 +50,24 @@ For the detailed content of alcaraw format consult the Calibration/doc/alcaraw.d *** EXPERT: where REMOTE_DIR is specified by the --remote_dir option, ENERGY is 8TeV or 7TeV depending on the datasetpath, NAME is specified by the -n option and RUN_RANGE by the -r option -7) If the jobs have finished and everything is ok, commit the file - alcaraw_datasets.dat where the line added is not commented to inform - that the production has finished +\subsection ALCARECO_growing UPDATE ALCARECO and ALCARAW for growing dataset -#============================== UPDATE ALCARECO and ALCARAW for growing dataset In order to keep updated the ALCARECO and ALCARAW for Double and Single electron samples follow this instructions. The production will be in-sync with the availability of the new golden JSON file. -1) check that the new JSON is available executing the script +-# check that the new JSON is available executing the script ./scripts/updateLastDataset.sh The output gives the following informations: - --lastRun is the last run processed --max(run.run_number) is the last run in database --lastWeekRun is the last run not modified since four days at least --the last JSON - + - lastRun is the last run processed + - max(run.run_number) is the last run in database + - lastWeekRun is the last run not modified since four days at least + - the last JSON It has to be verified that the lastWeekRun is greater than the last run in JSON. If it is not verified it is better to wait before proceeding. N.B: max(run.run_number) has to be always greater than the last run in JSON - Then, copy and past the last updated line from the alcaraw_datasets.dat and change the run range accordingly -\endverbatim + */ diff --git a/ALCARAW_RECO/doc/ntuple_production.txt b/ALCARAW_RECO/doc/ntuple_production.txt index 56b2ac712dd..a25d7888a4b 100644 --- a/ALCARAW_RECO/doc/ntuple_production.txt +++ b/ALCARAW_RECO/doc/ntuple_production.txt @@ -13,8 +13,20 @@ as for the alcareco and alcaraw productions, you have to provide such informatio \subsection fromALCARECO From alcareco for data: \code -./scripts/prodNtuples.sh `parseDatasetFile.sh alcareco_datasets.dat | grep {string to select your dataset}` --type=ALCARECO --json jsonFile.txt --json_name +./scripts/prodNtuples.sh `parseDatasetFile.sh alcareco_datasets.dat | grep {string to select your dataset}` --type=ALCARECO --json jsonFile.txt --json_name \endcode + is a name used to build the subdirectory where storing the files and keep memory of the json file used for the ntuple production. Usual syntax is: + +{runMin}-{runMax}_{rerecoName/prompt}_{version}: + - runMin is the minimum run in the json file + - runMax is the maximum run in the json file + - indicate prompt if is a json for prompt dataset, indicate the name of the rereco (e.g. 22Jan) if it is for a reprocessed data + - indicate the version of the json +For example, for the json file: +\verbatim + /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt +\endverbatim +the jsonName should be: 190456-208686_22Jan-v1 for MC: \code ./scripts/prodNtuples.sh `parseDatasetFile.sh alcareco_datasets.dat | grep {string to select your dataset}` --type=ALCARECOSIM From 76bc31717efe22d74b991b11855b7777d9a2adfd Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 8 Sep 2014 17:56:44 +0200 Subject: [PATCH 443/475] fixed inputTag --- .../src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch b/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch index a905ae4002f..cbc5004c0a4 100644 --- a/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch +++ b/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch @@ -38,7 +38,7 @@ ElectronRecalibSuperClusterAssociatorSH::ElectronRecalibSuperClusterAssociatorSH scIslandProducer_ = iConfig.getParameter("scIslandProducer"); scIslandCollection_ = iConfig.getParameter("scIslandCollection"); - electronSrc_ = iConfig.getParameter ("electronSrc"); + electronSrc_ = iConfig.getParameter ("electronSrc"); #ifdef DEBUG std::cout<< "ElectronRecalibSuperClusterAssociatorSH::ElectronRecalibSuperClusterAssociatorSH::end" << std::endl; From ed6ed3a6f58f46f4bf233ba77817ef63fd0660d9 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 8 Sep 2014 17:57:33 +0200 Subject: [PATCH 444/475] updated documentation --- .../doc/alcaraw_alcareco_production.txt | 2 ++ ALCARAW_RECO/doc/testingLocally.txt | 20 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt index 2dc243e4508..8daa3475f49 100644 --- a/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt +++ b/ALCARAW_RECO/doc/alcaraw_alcareco_production.txt @@ -70,4 +70,6 @@ Then, copy and past the last updated line from the alcaraw_datasets.dat and change the run range accordingly + +\ref testingLocally */ diff --git a/ALCARAW_RECO/doc/testingLocally.txt b/ALCARAW_RECO/doc/testingLocally.txt index 248af2aabfd..3ae30926c1f 100644 --- a/ALCARAW_RECO/doc/testingLocally.txt +++ b/ALCARAW_RECO/doc/testingLocally.txt @@ -4,13 +4,29 @@ \page testingLocally Run locally to test \section localAlcareco Alcareco production + - Find a AOD or AODSIM file with DAS: https://cmsweb.cern.ch/das/ + \code +dataset=/QCD_Pt_*_EMEnriched_TuneZ2star_8TeV_pythia6/Summer12_DR53X-PU_RD1_START53_V7N-v1/AODSIM +\endcode + - click on one dataset of interest + - click on "file" to get the list of files for a particular dataset + - click on "download" + - download one file locally: + \code +xrdcp root://xrootd.unl.edu//store/mc/Summer12_DR53X/QCD_Pt-40_doubleEMEnriched_TuneZ2star_8TeV-pythia6/AODSIM/PU_RD1_START53_V7N-v1/20000/000107B2-2FD2-E211-9956-00261894397B.root myFile.root +\endcode + - Only alcareco: \code -cmsRun python/alcaSkimming.py isCrab=0 type=ALCARECO doTree=0 maxEvents=300 +cmsRun python/alcaSkimming.py isCrab=0 type=ALCARECO doTree=0 maxEvents=300 file=file://myFile.root \endcode - Alcareco + ntuples \code -cmsRun python/alcaSkimming.py isCrab=0 type=ALCARECO doTree=0 maxEvents=300 +cmsRun python/alcaSkimming.py isCrab=0 type=ALCARECO doTree=1 doTreeOnly=0 maxEvents=300 file=file://myFile.root +\endcode + - ntuples +\code +cmsRun python/alcaSkimming.py isCrab=0 type=ALCARECO doTree=1 doTreeOnly=1 maxEvents=300 file=file://myFile.root \endcode the \code skim=ZSkim \endcode option can be added to select events passing the ZSkim or the ZSCSkim From 53fb2b60f1c8f574067e2ede2ac6ac20d35f1026 Mon Sep 17 00:00:00 2001 From: shervin Date: Mon, 8 Sep 2014 17:58:40 +0200 Subject: [PATCH 445/475] updated documentation --- ZFitter/interface/EnergyScaleCorrection_class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/interface/EnergyScaleCorrection_class.h b/ZFitter/interface/EnergyScaleCorrection_class.h index 7c4dfac998a..b4926449756 100644 --- a/ZFitter/interface/EnergyScaleCorrection_class.h +++ b/ZFitter/interface/EnergyScaleCorrection_class.h @@ -104,7 +104,7 @@ class EnergyScaleCorrection_class{ float getScaleOffset(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle); // deprecated float ScaleCorrection(int runNumber, bool isEBEle, double R9Ele, double etaSCEle, double EtEle, - int nPV, float nPVmean=0); ///< method to get energy scale corrections + int nPV=0, float nPVmean=0); ///< method to get energy scale corrections TTree *GetCorrTree(TChain *tree, bool fastLoop=true, TString runNumberBranchName="runNumber", TString R9EleBranchName="R9Ele", From 8140e9e9f6397769e8fdcfc93d8f3cd84f062f2c Mon Sep 17 00:00:00 2001 From: shervin Date: Tue, 9 Sep 2014 14:07:29 +0200 Subject: [PATCH 446/475] fixed alcaraw --- ALCARAW_RECO/python/alcaSkimming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index 611e494963f..bfc2695a76e 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -304,7 +304,7 @@ from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons', 'PFIso') process.pfIsoEgamma *= (process.pfParticleSelectionSequence + process.eleIsoSequence) -elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): +elif((options.type=='ALCARECO' or options.type=='ALCARECOSIM' or options.type=='ALCARAW') and re.match("CMSSW_7_.*_.*",CMSSW_VERSION)): process.pfisoALCARECO = cms.Sequence() # remove any modules ###############################/ From 6d5efece83d5a69d73439e24fadab3eb7da7d3a6 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 21 Sep 2014 17:13:59 +0200 Subject: [PATCH 447/475] fixed isCrab option --- ALCARAW_RECO/python/alcaSkimming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALCARAW_RECO/python/alcaSkimming.py b/ALCARAW_RECO/python/alcaSkimming.py index bfc2695a76e..00f6c46587a 100644 --- a/ALCARAW_RECO/python/alcaSkimming.py +++ b/ALCARAW_RECO/python/alcaSkimming.py @@ -704,7 +704,7 @@ # this includes the sequence: patSequence # patSequence=cms.Sequence( (eleSelectionProducers + eleNewEnergiesProducer ) * patElectrons) -if(options.isCrab=='1'): +if(options.isCrab==1): pathPrefix="" else: pathPrefix=CMSSW_BASE+'/' #./src/Calibration/EleNewEnergiesProducer' #CMSSW_BASE+'/src/Calibration/EleNewEnergiesProducer/' From f0738cbac527149f53c941b4423255b3ede6c893 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 21 Sep 2014 17:15:55 +0200 Subject: [PATCH 448/475] Some changes to adapt to the EOverP code --- ZNtupleDumper/src/ZNtupleDumper.cc | 383 ++++++++++++++++------------- 1 file changed, 209 insertions(+), 174 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index bc3c3bf1a65..7f09cd0585b 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -221,6 +221,8 @@ class ZNtupleDumper : public edm::EDAnalyzer { // selection Int_t eleID[2]; ///< bit mask for eleID: 1=fiducial, 2=loose, 6=medium, 14=tight, 16=WP90PU, 48=WP80PU. Selection from https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaCutBasedIdentification#Electron_ID_Working_Points + Int_t isW; + Int_t isZ; Int_t chargeEle[2]; Float_t etaSCEle[2], phiSCEle[2]; ///< phi of the SC @@ -241,9 +243,7 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t avgLCSCEle[2]; - - - + Int_t isEBEle[2]; Float_t energyMCEle[2]; ///< Electron MC true energy Float_t energySCEle[2]; ///< corrected SuperCluster energy @@ -335,8 +335,9 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t nHitsSCEle[2]; std::vector recoFlagRecHitSCEle[2]; std::vector rawIdRecHitSCEle[2]; - std::vector XRecHitSCEle[2]; - std::vector YRecHitSCEle[2]; + std::vector XRecHitSCEle[2]; + std::vector YRecHitSCEle[2]; + std::vector ZRecHitSCEle[2]; std::vector energyRecHitSCEle[2]; std::vector LCRecHitSCEle[2]; std::vector ICRecHitSCEle[2]; @@ -559,7 +560,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(WZSkimResultsHandle->accept(*alcaSkimPath_itr)){ skipEvent=false; std::string hltName_str(alcaSkimPathNames.triggerName(*alcaSkimPath_itr)); - if(hltName_str.find("WElectron")!=std::string::npos) + if(hltName_str.find("WElectron")!=std::string::npos) eventType=WENU; else if(hltName_str.find("ZSCElectron")!=std::string::npos) eventType=ZSC; @@ -700,7 +701,9 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if( eleIter1->et()<30) continue; doFill=true; + isW=1; if(eventType==UNKNOWN) eventType=WENU; + TreeSetSingleElectronVar(*eleIter1, 0); //fill first electron TreeSetSingleElectronVar(*eleIter1, -1); // fill fake second electron @@ -724,6 +727,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if((mass < 55 || mass > 125)) continue; doFill=true; + isZ=1; if(eventType==UNKNOWN) eventType=ZEE; TreeSetDiElectronVar(*eleIter1, *eleIter2); @@ -803,6 +807,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // save the event in the tree if(HighEtaSC1!= EESuperClustersHandle->end()){ doFill=true; + isZ=1; TreeSetDiElectronVar(*PatEle1, *HighEtaSC1); if(doExtraCalibTree){ TreeSetExtraCalibVar(*PatEle1, *HighEtaSC1); @@ -812,6 +817,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(doFill){ + tree->Fill(); if(doExtraCalibTree) extraCalibTree->Fill(); if(doEleIDTree) eleIDTree->Fill(); @@ -968,6 +974,10 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("eleID",eleID, "eleID[2]/I"); // tree->Branch("nBCSCEle", nBCSCEle, "nBCSCEle[2]/I"); + tree->Branch("isW",&isW, "isW/I"); + tree->Branch("isZ",&isZ, "isZ/I"); + + tree->Branch("isEBEle",&isEBEle, "isEBEle[2]/I"); tree->Branch("chargeEle", chargeEle, "chargeEle[2]/I"); //[nEle] tree->Branch("etaSCEle", etaSCEle, "etaSCEle[2]/F"); //[nSCEle] @@ -986,6 +996,7 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("seedEnergySCEle", seedEnergySCEle, "seedEnergySCEle[2]/F"); tree->Branch("seedLCSCEle", seedLCSCEle, "seedLCSCEle[2]/F"); + tree->Branch("avgLCSCEle", avgLCSCEle, "avgLCSCEle[2]/F"); tree->Branch("gainEle", gainEle, "gainEle[2]/b"); @@ -1051,6 +1062,7 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("R9Ele", R9Ele, "R9Ele[2]/F"); + tree->Branch("e3x3SCEle", e3x3SCEle, "e3x3SCEle[2]/F"); tree->Branch("e5x5SCEle", e5x5SCEle, "e5x5SCEle[2]/F"); //tree->Branch("eSeedSCEle", eSeedSCEle, "eSeedSCEle[2]/F"); tree->Branch("pModeGsfEle", pModeGsfEle, "pModeGsfEle[2]/F"); @@ -1100,6 +1112,27 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("nHitsSCEle", nHitsSCEle, "nHitsSCEle[2]/I"); + tree->Branch("rawIdRecHitSCEle1", &(rawIdRecHitSCEle[0])); + tree->Branch("rawIdRecHitSCEle2", &(rawIdRecHitSCEle[1])); + tree->Branch("XRecHitSCEle1", &(XRecHitSCEle[0])); + tree->Branch("XRecHitSCEle2", &(XRecHitSCEle[1])); + tree->Branch("YRecHitSCEle1", &(YRecHitSCEle[0])); + tree->Branch("YRecHitSCEle2", &(YRecHitSCEle[1])); + tree->Branch("ZRecHitSCEle1", &(ZRecHitSCEle[0])); + tree->Branch("ZRecHitSCEle2", &(ZRecHitSCEle[1])); + tree->Branch("energyRecHitSCEle1", &(energyRecHitSCEle[0])); + tree->Branch("energyRecHitSCEle2", &(energyRecHitSCEle[1])); + tree->Branch("LCRecHitSCEle1", &(LCRecHitSCEle[0])); + tree->Branch("LCRecHitSCEle2", &(LCRecHitSCEle[1])); + tree->Branch("ICRecHitSCEle1", &(ICRecHitSCEle[0])); + tree->Branch("ICRecHitSCEle2", &(ICRecHitSCEle[1])); + tree->Branch("AlphaRecHitSCEle1", &(AlphaRecHitSCEle[0])); + tree->Branch("AlphaRecHitSCEle2", &(AlphaRecHitSCEle[1])); + + tree->Branch("recoFlagRecHitSCEle1", &(recoFlagRecHitSCEle[0])); + tree->Branch("recoFlagRecHitSCEle2", &(recoFlagRecHitSCEle[1])); + + #ifdef shervin tree->Branch("sigmaIEtaIEtaSCEle", sigmaIEtaIEtaSCEle, "sigmaIEtaIEtaSCEle[2]/F"); tree->Branch("sigmaIEtaIEtaSCEle", sigmaIEtaIEtaSCEle, "sigmaIEtaIEtaSCEle[2]/F"); @@ -1234,7 +1267,8 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int fbremEle[index] = electron1.fbrem(); // fatta con pIn-pOut etaSCEle[index] = electron1.superCluster()->eta(); - phiSCEle[index] = electron1.superCluster()->phi(); + phiSCEle[index] = electron1.superCluster()->phi(); + isEBEle[index] = electron1.isEB(); const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); //assert(recHits!=NULL); @@ -1392,6 +1426,74 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int classificationEle[index] = electron1.classification(); + + //THIS PART WAS IN THE EXTRACALIB TREE, ACTUALLY: + + recoFlagRecHitSCEle[index].clear(); + rawIdRecHitSCEle[index].clear(); + XRecHitSCEle[index].clear(); + YRecHitSCEle[index].clear(); + ZRecHitSCEle[index].clear(); + energyRecHitSCEle[index].clear(); + LCRecHitSCEle[index].clear(); + ICRecHitSCEle[index].clear(); + AlphaRecHitSCEle[index].clear(); + + // EcalIntercalibConstantMap icMap = icHandle->get() + std::vector< std::pair > hitsAndFractions_ele1 = electron1.superCluster()->hitsAndFractions(); + nHitsSCEle[index] = hitsAndFractions_ele1.size(); + + // const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); + const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); + // const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); + for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); + detitr != hitsAndFractions_ele1.end(); detitr++ ) + { + // EcalRecHitCollection::const_iterator theSeedHit = recHits->find (id); // trash this + EcalRecHitCollection::const_iterator oneHit = recHits->find( (detitr -> first) ) ; + if(oneHit==recHits->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() + << " in subdetector " << (detitr->first).subdetId() << " bailing out"; + //assert(0); + continue; + } + recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); + rawIdRecHitSCEle[index].push_back(detitr->first.rawId()); + if(electron1.isEB()){ + EBDetId recHitId(detitr->first); + XRecHitSCEle[index].push_back(recHitId.ieta()); + YRecHitSCEle[index].push_back(recHitId.iphi()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + else{ + EEDetId recHitId(detitr->first); + XRecHitSCEle[index].push_back(recHitId.ix()); + YRecHitSCEle[index].push_back(recHitId.iy()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + energyRecHitSCEle[index].push_back(oneHit->energy()); + // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: + // 1) get laser correction coefficient + LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(detitr->first, runTime_)); + //laserHandle-> + // 2) get intercalibration + EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(detitr->first); + EcalIntercalibConstant icalconst = 1.; + if( icalit!=icalMap.end() ) { + icalconst = (*icalit); + // std::cout << "icalconst set to: " << icalconst << std::endl; + } else { + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() << "bailing out"; + //assert(0); + continue; + } + // 3) get adc2GeV + //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? + // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); + ICRecHitSCEle[index].push_back(icalconst); + } + + return; } @@ -1544,6 +1646,100 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 eleID[index] = -100; classificationEle[index] = -100; + + //THESE INFOS WERE IN THE EXTRACALIB TREE, ACTUALLY: + + recoFlagRecHitSCEle[index].clear(); + rawIdRecHitSCEle[index].clear(); + XRecHitSCEle[index].clear(); + YRecHitSCEle[index].clear(); + ZRecHitSCEle[index].clear(); + energyRecHitSCEle[index].clear(); + LCRecHitSCEle[index].clear(); + ICRecHitSCEle[index].clear(); + AlphaRecHitSCEle[index].clear(); + + + std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); + nHitsSCEle[index] = hitsAndFractions_ele1.size(); + + const EcalRecHitCollection *recHitsEB = clustertools->getEcalEBRecHitCollection(); + // const EcalRecHitCollection *recHitsEE = clustertools->getEcalEERecHitCollection(); + + const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); + // const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); + + for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); + detitr != hitsAndFractions_ele1.end(); detitr++ ) + { + // get out the DetId of the hit + DetId hitId = (detitr -> first); + // define a iterator of the EcalRecoHit + EcalRecHitCollection::const_iterator oneHit(NULL); + + // treat it seperately for EB and EE + if ( hitId.subdetId() == EcalBarrel) + { + oneHit = recHitsEB->find( hitId ); + // protection of the missing hit + if(oneHit==recHitsEB->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; + assert(0); + } + // redifine EBDetId and get EB hit position + EBDetId recHitId(hitId); + XRecHitSCEle[index].push_back(recHitId.ieta()); + YRecHitSCEle[index].push_back(recHitId.iphi()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + else if ( hitId.subdetId() == EcalEndcap ) + { + oneHit = recHitsEE->find( hitId ); + // protection of the missing hit + if(oneHit==recHitsEE->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; + assert(0); + } + // redifine EEDetId and get EE hit position + EEDetId recHitId(hitId); + XRecHitSCEle[index].push_back(recHitId.ix()); + YRecHitSCEle[index].push_back(recHitId.iy()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + else + { + // error if not able to find the hit in EE and EB + edm::LogError("ZNtupleDumper") << "SC hit cannot be found in EB and EE. " ; + assert(0); + } + + // other information + recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); + rawIdRecHitSCEle[index].push_back(hitId.rawId()); + + energyRecHitSCEle[index].push_back(oneHit->energy()); + + // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: + // 1) get laser correction coefficient + LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(hitId, runTime_)); + // 2) get intercalibration + EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(hitId); + EcalIntercalibConstant icalconst = 1.; + if( icalit!=icalMap.end() ) { + icalconst = (*icalit); + // std::cout << "icalconst set to: " << icalconst << std::endl; + } else { + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (hitId).rawId() << "bailing out"; + assert(0); + } + // 3) get adc2GeV + //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? + // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); + ICRecHitSCEle[index].push_back(icalconst); + + } + + return; } @@ -1731,27 +1927,11 @@ void ZNtupleDumper::InitExtraCalibTree(){ std::cout << "[STATUS] InitExtraCalibTree" << std::endl; if(extraCalibTree==NULL) return; - extraCalibTree->Branch("runNumber", &runNumber, "runNumber/I"); - extraCalibTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); - extraCalibTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); - extraCalibTree->Branch("runTime", &runTime, " runTime/i"); + // extraCalibTree->Branch("runNumber", &runNumber, "runNumber/I"); + // extraCalibTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); + // extraCalibTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); + // extraCalibTree->Branch("runTime", &runTime, " runTime/i"); - extraCalibTree->Branch("nHitsSCEle", nHitsSCEle, "nHitsSCEle[2]/I"); - - extraCalibTree->Branch("rawIdRecHitSCEle1", &(rawIdRecHitSCEle[0])); - extraCalibTree->Branch("rawIdRecHitSCEle2", &(rawIdRecHitSCEle[1])); - extraCalibTree->Branch("XRecHitSCEle1", &(XRecHitSCEle[0])); - extraCalibTree->Branch("XRecHitSCEle2", &(XRecHitSCEle[1])); - extraCalibTree->Branch("YRecHitSCEle1", &(YRecHitSCEle[0])); - extraCalibTree->Branch("YRecHitSCEle2", &(YRecHitSCEle[1])); - extraCalibTree->Branch("energyRecHitSCEle1", &(energyRecHitSCEle[0])); - extraCalibTree->Branch("energyRecHitSCEle2", &(energyRecHitSCEle[1])); - extraCalibTree->Branch("LCRecHitSCEle1", &(LCRecHitSCEle[0])); - extraCalibTree->Branch("LCRecHitSCEle2", &(LCRecHitSCEle[1])); - extraCalibTree->Branch("ICRecHitSCEle1", &(ICRecHitSCEle[0])); - extraCalibTree->Branch("ICRecHitSCEle2", &(ICRecHitSCEle[1])); - extraCalibTree->Branch("AlphaRecHitSCEle1", &(AlphaRecHitSCEle[0])); - extraCalibTree->Branch("AlphaRecHitSCEle2", &(AlphaRecHitSCEle[1])); return; } @@ -1772,158 +1952,13 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, const r void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int index){ - recoFlagRecHitSCEle[index].clear(); - rawIdRecHitSCEle[index].clear(); - XRecHitSCEle[index].clear(); - YRecHitSCEle[index].clear(); - energyRecHitSCEle[index].clear(); - LCRecHitSCEle[index].clear(); - ICRecHitSCEle[index].clear(); - AlphaRecHitSCEle[index].clear(); - - // EcalIntercalibConstantMap icMap = icHandle->get() - std::vector< std::pair > hitsAndFractions_ele1 = electron1.superCluster()->hitsAndFractions(); - nHitsSCEle[index] = hitsAndFractions_ele1.size(); - - const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); - const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); - const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); - for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); - detitr != hitsAndFractions_ele1.end(); detitr++ ) - { - // EcalRecHitCollection::const_iterator theSeedHit = recHits->find (id); // trash this - EcalRecHitCollection::const_iterator oneHit = recHits->find( (detitr -> first) ) ; - if(oneHit==recHits->end()){ - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() - << " in subdetector " << (detitr->first).subdetId() << " bailing out"; - //assert(0); - continue; - } - recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); - rawIdRecHitSCEle[index].push_back(detitr->first.rawId()); - if(electron1.isEB()){ - EBDetId recHitId(detitr->first); - XRecHitSCEle[index].push_back(recHitId.ieta()); - YRecHitSCEle[index].push_back(recHitId.iphi()); - } - else{ - EEDetId recHitId(detitr->first); - XRecHitSCEle[index].push_back(recHitId.ix()); - YRecHitSCEle[index].push_back(recHitId.iy()); - } - energyRecHitSCEle[index].push_back(oneHit->energy()); - // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: - // 1) get laser correction coefficient - LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(detitr->first, runTime_)); - //laserHandle-> - // 2) get intercalibration - EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(detitr->first); - EcalIntercalibConstant icalconst = 1.; - if( icalit!=icalMap.end() ) { - icalconst = (*icalit); - // std::cout << "icalconst set to: " << icalconst << std::endl; - } else { - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() << "bailing out"; - //assert(0); - continue; - } - // 3) get adc2GeV - //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? - // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); - ICRecHitSCEle[index].push_back(icalconst); - } - + //THIS IS USELESS NOW!!! return; } void ZNtupleDumper::TreeSetExtraCalibVar(const reco::SuperCluster& electron1, int index){ - recoFlagRecHitSCEle[index].clear(); - rawIdRecHitSCEle[index].clear(); - XRecHitSCEle[index].clear(); - YRecHitSCEle[index].clear(); - energyRecHitSCEle[index].clear(); - LCRecHitSCEle[index].clear(); - ICRecHitSCEle[index].clear(); - AlphaRecHitSCEle[index].clear(); - - std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); - nHitsSCEle[index] = hitsAndFractions_ele1.size(); - - const EcalRecHitCollection *recHitsEB = clustertools->getEcalEBRecHitCollection(); - const EcalRecHitCollection *recHitsEE = clustertools->getEcalEERecHitCollection(); - - const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); - const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); - - for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); - detitr != hitsAndFractions_ele1.end(); detitr++ ) - { - // get out the DetId of the hit - DetId hitId = (detitr -> first); - // define a iterator of the EcalRecoHit - EcalRecHitCollection::const_iterator oneHit(NULL); - - // treat it seperately for EB and EE - if ( hitId.subdetId() == EcalBarrel) - { - oneHit = recHitsEB->find( hitId ); - // protection of the missing hit - if(oneHit==recHitsEB->end()){ - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; - assert(0); - } - // redifine EBDetId and get EB hit position - EBDetId recHitId(hitId); - XRecHitSCEle[index].push_back(recHitId.ieta()); - YRecHitSCEle[index].push_back(recHitId.iphi()); - } - else if ( hitId.subdetId() == EcalEndcap ) - { - oneHit = recHitsEE->find( hitId ); - // protection of the missing hit - if(oneHit==recHitsEE->end()){ - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; - assert(0); - } - // redifine EEDetId and get EE hit position - EEDetId recHitId(hitId); - XRecHitSCEle[index].push_back(recHitId.ix()); - YRecHitSCEle[index].push_back(recHitId.iy()); - } - else - { - // error if not able to find the hit in EE and EB - edm::LogError("ZNtupleDumper") << "SC hit cannot be found in EB and EE. " ; - assert(0); - } - - // other information - recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); - rawIdRecHitSCEle[index].push_back(hitId.rawId()); - - energyRecHitSCEle[index].push_back(oneHit->energy()); - - // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: - // 1) get laser correction coefficient - LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(hitId, runTime_)); - // 2) get intercalibration - EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(hitId); - EcalIntercalibConstant icalconst = 1.; - if( icalit!=icalMap.end() ) { - icalconst = (*icalit); - // std::cout << "icalconst set to: " << icalconst << std::endl; - } else { - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (hitId).rawId() << "bailing out"; - assert(0); - } - // 3) get adc2GeV - //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? - // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); - ICRecHitSCEle[index].push_back(icalconst); - - } - + //THIS IS USELESS NOW!!! return; } From f580995b8275c1ad188127ea15639c146c6555e1 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 21 Sep 2014 17:19:43 +0200 Subject: [PATCH 449/475] E/P calibration area --- .../FastCalibrator/BuildFile.xml | 8 + .../BasicClusterLocalContainementCorrection.C | 26 + ...asicClusterLocalContainmentCorrectionEta.C | 29 + ...asicClusterLocalContainmentCorrectionPhi.C | 24 + .../CommonTools/TMomentumCalibration.h | 46 + .../CommonTools/TPileupReweighting.h | 35 + .../FastCalibrator/CommonTools/eerings.dat | 14648 ++++++++++++++++ .../FastCalibrator/CommonTools/histoFunc.h | 92 + EOverPCalibration/FastCalibrator/README | 160 + EOverPCalibration/FastCalibrator/RMSFile.txt | 85 + .../bin/AddRegressionWeight.cpp | 637 + .../FastCalibrator/bin/BuildFile.xml | 25 + .../bin/CalibrationMomentum.cpp | 1143 ++ .../FastCalibrator/bin/CalibrationPlots.cpp | 854 + .../FastCalibrator/bin/CompareICSet.cpp | 1087 ++ .../bin/CompareSCalibMCTruth_EB.cpp | 256 + .../bin/CompareSCalibMCTruth_EE.cpp | 612 + .../FastCalibrator/bin/DeadXtalAnalysisEB.cpp | 2313 +++ .../bin/DrawPrecisionPlotsEB.cpp | 207 + .../bin/DrawPrecisionPlotsEE.cpp | 319 + .../FastCalibrator/bin/FastCalibratorEB.cpp | 361 + .../bin/FastCalibratorEB_MVA.cpp | 203 + .../FastCalibrator/bin/FastCalibratorEE.cpp | 365 + .../bin/FastCalibratorEE_MVA.cpp | 230 + .../FastCalibrator/bin/MVARegression.cpp | 389 + .../FastCalibrator/bin/MakeJobs.cpp | 584 + .../bin/MomentumCorrection_MC.cpp | 327 + .../FastCalibrator/bin/NormalizeIC_EE.cpp | 572 + .../FastCalibrator/bin/OccupancyPlot.cpp | 647 + .../FastCalibrator/bin/PlotICMapsRatio.cpp | 269 + .../FastCalibrator/bin/PlotICMapsRatioEE.cpp | 235 + .../FastCalibrator/bin/RateHLTvsEta.cpp | 231 + .../FastCalibrator/bin/XtalAlphaEB.cpp | 219 + .../FastCalibrator/bin/XtalAlphaEE.cpp | 250 + .../FastCalibrator/bin/Zlineshape.cpp | 945 + .../cfg/AddRegressionWeight_cfg.py | 17 + .../FastCalibrator/cfg/Barrel.cfg | 50 + .../FastCalibrator/cfg/DeadXtalAnalysisEB.cfg | 32 + .../FastCalibrator/cfg/Endcap.cfg | 25 + .../cfg/FastCalibrator_EB_nosplit_cfg.py | 34 + .../cfg/FastCalibrator_EB_split_cfg.py | 34 + .../cfg/FastCalibrator_EE_nosplit_cfg.py | 35 + .../cfg/FastCalibrator_EE_split_cfg.py | 35 + .../cfg/FastCalibrator_Template.cfg | 37 + .../FastCalibrator/cfg/MVARegression_cfg.cfg | 33 + .../FastCalibrator/cfg/MakeJobs_cfg.cfg | 61 + .../FastCalibrator/cfg/NormalizeEE_cfg.py | 16 + .../cfg/XtalAlphaEB_noSplit.cfg | 33 + .../FastCalibrator/cfg/XtalAlphaEB_split.cfg | 33 + .../cfg/XtalAlphaEE_noSplit.cfg | 31 + .../FastCalibrator/cfg/XtalAlphaEE_split.cfg | 34 + .../FastCalibrator/cfg/Zlineshape_cfg.cfg | 49 + .../cfg/calibrationMomentum_cfg.py | 23 + .../cfg/calibrationPlots_EB_cfg.py | 22 + .../cfg/calibrationPlots_EE_cfg.py | 22 + .../FastCalibrator/cfg/comparisonEB_cfg.py | 12 + .../FastCalibrator/cfg/comparisonEE_cfg.py | 13 + EOverPCalibration/FastCalibrator/cfg/list.txt | 5 + .../cfg/listDATA_momentumCalibration.txt | 5 + .../cfg/listMC2012_momentumCalibration.txt | 6 + EOverPCalibration/FastCalibrator/cfg/test.cfg | 34 + .../interface/CalibrationUtils.h | 102 + .../FastCalibrator/interface/DrawingUtils.h | 46 + .../interface/FastCalibratorEB.h | 219 + .../interface/FastCalibratorEB_MVA.h | 243 + .../interface/FastCalibratorEE.h | 258 + .../interface/FastCalibratorEE_MVA.h | 277 + .../interface/GetHashedIndexEB.h | 22 + .../interface/GetHashedIndexEE.h | 29 + .../FastCalibrator/interface/LinkDef.h | 8 + .../FastCalibrator/interface/SIC_ixiyiz.list | 1546 ++ .../FastCalibrator/interface/TEndcapRings.h | 49 + .../FastCalibrator/interface/TSicCrystals.h | 41 + .../FastCalibrator/interface/XtalAlphaEB.h | 251 + .../FastCalibrator/interface/XtalAlphaEE.h | 298 + .../FastCalibrator/interface/Zutils.h | 60 + .../FastCalibrator/interface/geometryUtils.h | 56 + .../FastCalibrator/interface/setTDRStyle.h | 14 + ...V_13Jul2012ReReco_Collisions12_JSON_v2.txt | 1 + ...2_8TeV_PromptReco_Collisions12_JSON_v2.txt | 374 + ...2_8TeV_PromptReco_Collisions12_JSON_v2.txt | 1 + ...8686_8TeV_PromptReco_Collisions12_JSON.txt | 1 + .../macros/CombineMomentumCalibration.cxx | 339 + .../FastCalibrator/macros/CompareCoeff.cxx | 144 + .../FastCalibrator/macros/CompareL3Template.C | 136 + .../Correction_TrackerEffect_EE_DATA.cxx | 295 + .../macros/Correction_TrackerEffect_EE_MC.cxx | 384 + .../macros/DrawCalibrationPlotsEB.C | 442 + .../macros/DrawCalibrationPlotsEB_phiGroups.C | 406 + .../macros/DrawCalibrationPlotsEE.C | 763 + .../macros/DrawEPDistributions.cxx | 89 + .../macros/DrawMomentumCalibration.cxx | 227 + .../macros/DrawResidualPlotsEB.C | 330 + .../FastCalibrator/macros/Normalize_IC_EE.cxx | 277 + .../FastCalibrator/macros/ProduceScalibMap.C | 45 + .../macros/ProduceScalibMapEE.C | 46 + .../FastCalibrator/macros/README | 94 + .../FastCalibrator/macros/eerings.dat | 14648 ++++++++++++++++ .../FastCalibrator/src/CalibrationUtils.cc | 1069 ++ .../FastCalibrator/src/DrawingUtils.cc | 318 + .../FastCalibrator/src/FastCalibratorEB.cc | 974 + .../src/FastCalibratorEB_MVA.cc | 1048 ++ .../FastCalibrator/src/FastCalibratorEE.cc | 1085 ++ .../src/FastCalibratorEE_MVA.cc | 1149 ++ .../FastCalibrator/src/GetHashedIndexEB.cc | 32 + .../FastCalibrator/src/GetHashedIndexEE.cc | 75 + EOverPCalibration/FastCalibrator/src/README | 29 + .../FastCalibrator/src/TEndcapRings.cc | 71 + .../FastCalibrator/src/TSicCrystals.cc | 28 + .../FastCalibrator/src/XtalAlphaEB.cc | 998 ++ .../FastCalibrator/src/XtalAlphaEE.cc | 1474 ++ .../FastCalibrator/src/Zutils.cc | 640 + .../FastCalibrator/src/geometryUtils.cc | 256 + .../FastCalibrator/src/setTDRStyle.cc | 168 + EOverPCalibration/NtuplePackage/BuildFile.xml | 7 + .../NtuplePackage/interface/ConfigFileLine.h | 77 + .../NtuplePackage/interface/ConfigParser.h | 95 + .../NtuplePackage/interface/LHEReader.h | 74 + .../NtuplePackage/interface/LinkDef.h | 19 + .../NtuplePackage/interface/h2Chain.h | 37 + .../NtuplePackage/interface/hChain.h | 46 + .../NtuplePackage/interface/ntpleUtils.h | 51 + .../NtuplePackage/interface/readJSONFile.h | 23 + .../NtuplePackage/interface/setTDRStyle.h | 15 + .../NtuplePackage/interface/treeReader.h | 70 + EOverPCalibration/NtuplePackage/obj/mydict.cc | 858 + EOverPCalibration/NtuplePackage/obj/mydict.h | 114 + .../NtuplePackage/src/ConfigFileLine.cc | 106 + .../NtuplePackage/src/LHEReader.cc | 135 + EOverPCalibration/NtuplePackage/src/Makefile | 127 + .../NtuplePackage/src/h2Chain.cc | 153 + EOverPCalibration/NtuplePackage/src/hChain.cc | 282 + .../NtuplePackage/src/ntpleUtils.cc | 214 + .../NtuplePackage/src/readJSONFile.cc | 111 + .../NtuplePackage/src/setTDRStyle.cc | 203 + .../NtuplePackage/src/treeReader.cc | 691 + EOverPCalibration/README.md | 4 + 137 files changed, 64651 insertions(+) create mode 100644 EOverPCalibration/FastCalibrator/BuildFile.xml create mode 100644 EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C create mode 100644 EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C create mode 100644 EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C create mode 100644 EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h create mode 100644 EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h create mode 100644 EOverPCalibration/FastCalibrator/CommonTools/eerings.dat create mode 100755 EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h create mode 100644 EOverPCalibration/FastCalibrator/README create mode 100644 EOverPCalibration/FastCalibrator/RMSFile.txt create mode 100755 EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/BuildFile.xml create mode 100644 EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEB_MVA.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEE_MVA.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/MVARegression.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/MomentumCorrection_MC.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/OccupancyPlot.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp create mode 100644 EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp create mode 100644 EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/Barrel.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/Endcap.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg create mode 100644 EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py create mode 100644 EOverPCalibration/FastCalibrator/cfg/list.txt create mode 100644 EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt create mode 100644 EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt create mode 100644 EOverPCalibration/FastCalibrator/cfg/test.cfg create mode 100644 EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h create mode 100644 EOverPCalibration/FastCalibrator/interface/DrawingUtils.h create mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h create mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h create mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h create mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h create mode 100644 EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h create mode 100644 EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h create mode 100644 EOverPCalibration/FastCalibrator/interface/LinkDef.h create mode 100644 EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list create mode 100644 EOverPCalibration/FastCalibrator/interface/TEndcapRings.h create mode 100644 EOverPCalibration/FastCalibrator/interface/TSicCrystals.h create mode 100644 EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h create mode 100644 EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h create mode 100644 EOverPCalibration/FastCalibrator/interface/Zutils.h create mode 100644 EOverPCalibration/FastCalibrator/interface/geometryUtils.h create mode 100644 EOverPCalibration/FastCalibrator/interface/setTDRStyle.h create mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt create mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt create mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt create mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt create mode 100644 EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx create mode 100644 EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx create mode 100644 EOverPCalibration/FastCalibrator/macros/CompareL3Template.C create mode 100644 EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx create mode 100644 EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx create mode 100644 EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C create mode 100644 EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C create mode 100644 EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C create mode 100644 EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx create mode 100644 EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx create mode 100644 EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C create mode 100644 EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx create mode 100644 EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C create mode 100644 EOverPCalibration/FastCalibrator/macros/ProduceScalibMapEE.C create mode 100644 EOverPCalibration/FastCalibrator/macros/README create mode 100644 EOverPCalibration/FastCalibrator/macros/eerings.dat create mode 100644 EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc create mode 100644 EOverPCalibration/FastCalibrator/src/DrawingUtils.cc create mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc create mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc create mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc create mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc create mode 100644 EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc create mode 100644 EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc create mode 100644 EOverPCalibration/FastCalibrator/src/README create mode 100644 EOverPCalibration/FastCalibrator/src/TEndcapRings.cc create mode 100644 EOverPCalibration/FastCalibrator/src/TSicCrystals.cc create mode 100644 EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc create mode 100644 EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc create mode 100644 EOverPCalibration/FastCalibrator/src/Zutils.cc create mode 100644 EOverPCalibration/FastCalibrator/src/geometryUtils.cc create mode 100755 EOverPCalibration/FastCalibrator/src/setTDRStyle.cc create mode 100644 EOverPCalibration/NtuplePackage/BuildFile.xml create mode 100644 EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h create mode 100644 EOverPCalibration/NtuplePackage/interface/ConfigParser.h create mode 100644 EOverPCalibration/NtuplePackage/interface/LHEReader.h create mode 100644 EOverPCalibration/NtuplePackage/interface/LinkDef.h create mode 100644 EOverPCalibration/NtuplePackage/interface/h2Chain.h create mode 100644 EOverPCalibration/NtuplePackage/interface/hChain.h create mode 100644 EOverPCalibration/NtuplePackage/interface/ntpleUtils.h create mode 100644 EOverPCalibration/NtuplePackage/interface/readJSONFile.h create mode 100755 EOverPCalibration/NtuplePackage/interface/setTDRStyle.h create mode 100644 EOverPCalibration/NtuplePackage/interface/treeReader.h create mode 100644 EOverPCalibration/NtuplePackage/obj/mydict.cc create mode 100644 EOverPCalibration/NtuplePackage/obj/mydict.h create mode 100644 EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc create mode 100644 EOverPCalibration/NtuplePackage/src/LHEReader.cc create mode 100644 EOverPCalibration/NtuplePackage/src/Makefile create mode 100644 EOverPCalibration/NtuplePackage/src/h2Chain.cc create mode 100644 EOverPCalibration/NtuplePackage/src/hChain.cc create mode 100644 EOverPCalibration/NtuplePackage/src/ntpleUtils.cc create mode 100644 EOverPCalibration/NtuplePackage/src/readJSONFile.cc create mode 100755 EOverPCalibration/NtuplePackage/src/setTDRStyle.cc create mode 100644 EOverPCalibration/NtuplePackage/src/treeReader.cc create mode 100644 EOverPCalibration/README.md diff --git a/EOverPCalibration/FastCalibrator/BuildFile.xml b/EOverPCalibration/FastCalibrator/BuildFile.xml new file mode 100644 index 00000000000..85e5f1fcd13 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/BuildFile.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C new file mode 100644 index 00000000000..0e3838269e3 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C @@ -0,0 +1,26 @@ +#include "TF1.h" + +//TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2)-[3]*pow(x,3)-[4]*pow(x,4))",-1,1.); +TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); + +double BasicClusterLocalContainementCorrection (float localEta, int imod){ + + // --- correction function derived from E/p data + // pol4 + // if (imod==0) f->SetParameters(1.00613,0.0049502 , 0.0677101 , 0.0148299 , 0.00523093); + // if (imod==1) f->SetParameters(1.00633,0.00403076 , 0.0689901 , 0.00242213 , 0.0239275); + // if (imod==2) f->SetParameters(1.00648,0.0111289 , 0.0878569 , 0.0299266 , -0.0597349); + // if (imod==3) f->SetParameters(1.01058,0.0135225 , 0.16731 , 0.0208505 , -0.21014); + + // pol2 + if (imod==0) f->SetParameters(1.00603,0.00300789 , 0.0667232); + if (imod==1) f->SetParameters(1.00655,0.00386189 , 0.073931); + if (imod==2) f->SetParameters(1.00634,0.00631341 , 0.0764134); + if (imod==3) f->SetParameters(1.00957,0.0113306 , 0.123808); + + + double corr = f-> Eval(localEta); + return(1./corr); + +} + diff --git a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C new file mode 100644 index 00000000000..5a188322f65 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C @@ -0,0 +1,29 @@ +// Local containment correction vs local eta of basic clusters +// --- correction function derived from E/p data +// --- tested both pol2 and plo4 --> very similar results + +#include "TF1.h" + +//TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2)-[3]*pow(x,3)-[4]*pow(x,4))",-1,1.); +TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); + +double BasicClusterLocalContainmentCorrectionEta (float localEta, int imod){ + + // pol4 + // if (imod==0) f->SetParameters(1.00613,0.0049502 , 0.0677101 , 0.0148299 , 0.00523093); + // if (imod==1) f->SetParameters(1.00633,0.00403076 , 0.0689901 , 0.00242213 , 0.0239275); + // if (imod==2) f->SetParameters(1.00648,0.0111289 , 0.0878569 , 0.0299266 , -0.0597349); + // if (imod==3) f->SetParameters(1.01058,0.0135225 , 0.16731 , 0.0208505 , -0.21014); + + // pol2 + if (imod==0) f->SetParameters(1.00603,0.00300789 , 0.0667232); + if (imod==1) f->SetParameters(1.00655,0.00386189 , 0.073931); + if (imod==2) f->SetParameters(1.00634,0.00631341 , 0.0764134); + if (imod==3) f->SetParameters(1.00957,0.0113306 , 0.123808); + + + double corr = f-> Eval(localEta); + return(1./corr); + +} + diff --git a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C new file mode 100644 index 00000000000..b487726c3e2 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C @@ -0,0 +1,24 @@ +// Local containment correction vs local eta of basic clusters +// --- correction function derived from E/p data +// --- caveat : E/p realtive scale vs local phi depends on (eta*charge). +// this is an average correction for all R9 and all (eta*charge) electrons + +#include "TF1.h" + +TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); + +double BasicClusterLocalContainmentCorrectionPhi (float localPhi, int imod){ + + // --- correction function derived from E/p data + + // pol2 + if (imod==0) f->SetParameters(1.00403,-0.0012733 , 0.042925); + if (imod==1) f->SetParameters(1.00394,-0.00137567 , 0.0416698); + if (imod==2) f->SetParameters(1.00298,-0.00111589 , 0.0320377); + if (imod==3)f->SetParameters(1.00269,-0.00153347 , 0.0296769); + + double corr = f-> Eval(localPhi); + return(1./corr); + +} + diff --git a/EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h b/EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h new file mode 100644 index 00000000000..347691f68be --- /dev/null +++ b/EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h @@ -0,0 +1,46 @@ +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TCanvas.h" +#include "TGraphErrors.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class TMomentumCalibration { + private: + TGraphErrors *gdata; + TGraphErrors *gmc; + public: + TMomentumCalibration(std::string); + ~TMomentumCalibration(); + double GetMomentumCalibration(int, int); + // ClassDef(TMomentumCalibration,1); +}; + +// default constructor, reading the corrections from file +TMomentumCalibration::TMomentumCalibration(std::string fname) { + TFile *fP = TFile::Open(fname.c_str(), "READ"); + std::cout << "Reading momentum calibration from :"<< fname.c_str() << std::endl; + gdata = (TGraphErrors*)fP->Get("g_EoC"); + gmc = (TGraphErrors*)fP->Get("g_EoP"); + return; +} + +TMomentumCalibration::~TMomentumCalibration() { return;} + +double TMomentumCalibration::GetMomentumCalibration(int ieta, int isData){ + double scale; + // NB: i graps contengono la scala di 1/p. + if ( isData) scale = gdata -> Eval(ieta); + if (!isData) scale = gmc -> Eval(ieta); + if (scale == 0) scale = 1.; + return (scale); +} diff --git a/EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h b/EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h new file mode 100644 index 00000000000..082b2a51e91 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h @@ -0,0 +1,35 @@ +#include "TFile.h" +#include "TH1.h" + +#include +#include +#include +#include + + +class TPileupReweighting { + private: + float w[100]; + public: + TPileupReweighting(std::string,std::string); + ~TPileupReweighting(); + double GetWeight(int); + // ClassDef(TPileupReweighting,1); +}; + +// default constructor, reading the corrections from file +TPileupReweighting::TPileupReweighting(std::string fname, std::string hname) { + TFile weightsFile(fname.c_str(),"READ"); + TH1F* hweights = (TH1F*)weightsFile.Get(hname.c_str()); + for (int ibin = 1; ibin < hweights->GetNbinsX()+1; ibin++){ + w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 + } + weightsFile.Close(); + return; +} + +TPileupReweighting::~TPileupReweighting() { return;} + +double TPileupReweighting::GetWeight(int npu){ + return (w[npu]); +} diff --git a/EOverPCalibration/FastCalibrator/CommonTools/eerings.dat b/EOverPCalibration/FastCalibrator/CommonTools/eerings.dat new file mode 100644 index 00000000000..b1a1f13daae --- /dev/null +++ b/EOverPCalibration/FastCalibrator/CommonTools/eerings.dat @@ -0,0 +1,14648 @@ +(1, 41, -1) 0 +(1, 42, -1) 0 +(1, 43, -1) 0 +(1, 44, -1) 0 +(1, 45, -1) 0 +(1, 46, -1) 0 +(1, 47, -1) 0 +(1, 48, -1) 0 +(1, 49, -1) 0 +(1, 50, -1) 0 +(1, 51, -1) 0 +(1, 52, -1) 0 +(1, 53, -1) 0 +(1, 54, -1) 0 +(1, 55, -1) 0 +(1, 56, -1) 0 +(1, 57, -1) 0 +(1, 58, -1) 0 +(1, 59, -1) 0 +(1, 60, -1) 0 +(2, 41, -1) 0 +(2, 42, -1) 0 +(2, 43, -1) 0 +(2, 44, -1) 1 +(2, 45, -1) 1 +(2, 46, -1) 1 +(2, 47, -1) 1 +(2, 48, -1) 1 +(2, 49, -1) 1 +(2, 50, -1) 1 +(2, 51, -1) 1 +(2, 52, -1) 1 +(2, 53, -1) 1 +(2, 54, -1) 1 +(2, 55, -1) 1 +(2, 56, -1) 1 +(2, 57, -1) 1 +(2, 58, -1) 0 +(2, 59, -1) 0 +(2, 60, -1) 0 +(3, 41, -1) 1 +(3, 42, -1) 1 +(3, 43, -1) 1 +(3, 44, -1) 2 +(3, 45, -1) 2 +(3, 46, -1) 2 +(3, 47, -1) 2 +(3, 48, -1) 2 +(3, 49, -1) 2 +(3, 50, -1) 2 +(3, 51, -1) 2 +(3, 52, -1) 2 +(3, 53, -1) 2 +(3, 54, -1) 2 +(3, 55, -1) 2 +(3, 56, -1) 2 +(3, 57, -1) 2 +(3, 58, -1) 1 +(3, 59, -1) 1 +(3, 60, -1) 1 +(4, 36, -1) 1 +(4, 37, -1) 1 +(4, 38, -1) 2 +(4, 39, -1) 2 +(4, 40, -1) 2 +(4, 41, -1) 2 +(4, 42, -1) 2 +(4, 43, -1) 2 +(4, 44, -1) 3 +(4, 45, -1) 3 +(4, 46, -1) 3 +(4, 47, -1) 3 +(4, 48, -1) 3 +(4, 49, -1) 3 +(4, 50, -1) 3 +(4, 51, -1) 3 +(4, 52, -1) 3 +(4, 53, -1) 3 +(4, 54, -1) 3 +(4, 55, -1) 3 +(4, 56, -1) 3 +(4, 57, -1) 3 +(4, 58, -1) 2 +(4, 59, -1) 2 +(4, 60, -1) 2 +(4, 61, -1) 2 +(4, 62, -1) 2 +(4, 63, -1) 2 +(4, 64, -1) 1 +(4, 65, -1) 1 +(5, 36, -1) 2 +(5, 37, -1) 2 +(5, 38, -1) 2 +(5, 39, -1) 3 +(5, 40, -1) 3 +(5, 41, -1) 3 +(5, 42, -1) 3 +(5, 43, -1) 3 +(5, 44, -1) 4 +(5, 45, -1) 4 +(5, 46, -1) 4 +(5, 47, -1) 4 +(5, 48, -1) 4 +(5, 49, -1) 4 +(5, 50, -1) 4 +(5, 51, -1) 4 +(5, 52, -1) 4 +(5, 53, -1) 4 +(5, 54, -1) 4 +(5, 55, -1) 4 +(5, 56, -1) 4 +(5, 57, -1) 4 +(5, 58, -1) 3 +(5, 59, -1) 3 +(5, 60, -1) 3 +(5, 61, -1) 3 +(5, 62, -1) 3 +(5, 63, -1) 2 +(5, 64, -1) 2 +(5, 65, -1) 2 +(6, 26, -1) 0 +(6, 27, -1) 0 +(6, 28, -1) 0 +(6, 29, -1) 0 +(6, 30, -1) 1 +(6, 31, -1) 1 +(6, 32, -1) 1 +(6, 33, -1) 2 +(6, 34, -1) 2 +(6, 35, -1) 3 +(6, 36, -1) 3 +(6, 37, -1) 3 +(6, 38, -1) 3 +(6, 39, -1) 4 +(6, 40, -1) 4 +(6, 41, -1) 4 +(6, 42, -1) 4 +(6, 43, -1) 4 +(6, 44, -1) 5 +(6, 45, -1) 5 +(6, 46, -1) 5 +(6, 47, -1) 5 +(6, 48, -1) 5 +(6, 49, -1) 5 +(6, 50, -1) 5 +(6, 51, -1) 5 +(6, 52, -1) 5 +(6, 53, -1) 5 +(6, 54, -1) 5 +(6, 55, -1) 5 +(6, 56, -1) 5 +(6, 57, -1) 5 +(6, 58, -1) 4 +(6, 59, -1) 4 +(6, 60, -1) 4 +(6, 61, -1) 4 +(6, 62, -1) 4 +(6, 63, -1) 3 +(6, 64, -1) 3 +(6, 65, -1) 3 +(6, 66, -1) 3 +(6, 67, -1) 2 +(6, 68, -1) 2 +(6, 69, -1) 1 +(6, 70, -1) 1 +(6, 71, -1) 1 +(6, 72, -1) 0 +(6, 73, -1) 0 +(6, 74, -1) 0 +(6, 75, -1) 0 +(7, 26, -1) 0 +(7, 27, -1) 0 +(7, 28, -1) 1 +(7, 29, -1) 1 +(7, 30, -1) 2 +(7, 31, -1) 2 +(7, 32, -1) 2 +(7, 33, -1) 3 +(7, 34, -1) 3 +(7, 35, -1) 3 +(7, 36, -1) 4 +(7, 37, -1) 4 +(7, 38, -1) 4 +(7, 39, -1) 5 +(7, 40, -1) 5 +(7, 41, -1) 5 +(7, 42, -1) 5 +(7, 43, -1) 5 +(7, 44, -1) 6 +(7, 45, -1) 6 +(7, 46, -1) 6 +(7, 47, -1) 6 +(7, 48, -1) 6 +(7, 49, -1) 6 +(7, 50, -1) 6 +(7, 51, -1) 6 +(7, 52, -1) 6 +(7, 53, -1) 6 +(7, 54, -1) 6 +(7, 55, -1) 6 +(7, 56, -1) 6 +(7, 57, -1) 6 +(7, 58, -1) 5 +(7, 59, -1) 5 +(7, 60, -1) 5 +(7, 61, -1) 5 +(7, 62, -1) 5 +(7, 63, -1) 4 +(7, 64, -1) 4 +(7, 65, -1) 4 +(7, 66, -1) 3 +(7, 67, -1) 3 +(7, 68, -1) 3 +(7, 69, -1) 2 +(7, 70, -1) 2 +(7, 71, -1) 2 +(7, 72, -1) 1 +(7, 73, -1) 1 +(7, 74, -1) 0 +(7, 75, -1) 0 +(8, 26, -1) 1 +(8, 27, -1) 1 +(8, 28, -1) 2 +(8, 29, -1) 2 +(8, 30, -1) 3 +(8, 31, -1) 3 +(8, 32, -1) 3 +(8, 33, -1) 4 +(8, 34, -1) 4 +(8, 35, -1) 4 +(8, 36, -1) 5 +(8, 37, -1) 5 +(8, 38, -1) 5 +(8, 39, -1) 6 +(8, 40, -1) 6 +(8, 41, -1) 6 +(8, 42, -1) 6 +(8, 43, -1) 6 +(8, 44, -1) 7 +(8, 45, -1) 7 +(8, 46, -1) 7 +(8, 47, -1) 7 +(8, 48, -1) 7 +(8, 49, -1) 7 +(8, 50, -1) 7 +(8, 51, -1) 7 +(8, 52, -1) 7 +(8, 53, -1) 7 +(8, 54, -1) 7 +(8, 55, -1) 7 +(8, 56, -1) 7 +(8, 57, -1) 7 +(8, 58, -1) 6 +(8, 59, -1) 6 +(8, 60, -1) 6 +(8, 61, -1) 6 +(8, 62, -1) 6 +(8, 63, -1) 5 +(8, 64, -1) 5 +(8, 65, -1) 5 +(8, 66, -1) 4 +(8, 67, -1) 4 +(8, 68, -1) 4 +(8, 69, -1) 3 +(8, 70, -1) 3 +(8, 71, -1) 3 +(8, 72, -1) 2 +(8, 73, -1) 2 +(8, 74, -1) 1 +(8, 75, -1) 1 +(9, 21, -1) 0 +(9, 22, -1) 0 +(9, 23, -1) 0 +(9, 24, -1) 1 +(9, 25, -1) 1 +(9, 26, -1) 2 +(9, 27, -1) 2 +(9, 28, -1) 3 +(9, 29, -1) 3 +(9, 30, -1) 4 +(9, 31, -1) 4 +(9, 32, -1) 4 +(9, 33, -1) 5 +(9, 34, -1) 5 +(9, 35, -1) 5 +(9, 36, -1) 6 +(9, 37, -1) 6 +(9, 38, -1) 6 +(9, 39, -1) 7 +(9, 40, -1) 7 +(9, 41, -1) 7 +(9, 42, -1) 7 +(9, 43, -1) 7 +(9, 44, -1) 8 +(9, 45, -1) 8 +(9, 46, -1) 8 +(9, 47, -1) 8 +(9, 48, -1) 8 +(9, 49, -1) 8 +(9, 50, -1) 8 +(9, 51, -1) 8 +(9, 52, -1) 8 +(9, 53, -1) 8 +(9, 54, -1) 8 +(9, 55, -1) 8 +(9, 56, -1) 8 +(9, 57, -1) 8 +(9, 58, -1) 7 +(9, 59, -1) 7 +(9, 60, -1) 7 +(9, 61, -1) 7 +(9, 62, -1) 7 +(9, 63, -1) 6 +(9, 64, -1) 6 +(9, 65, -1) 6 +(9, 66, -1) 5 +(9, 67, -1) 5 +(9, 68, -1) 5 +(9, 69, -1) 4 +(9, 70, -1) 4 +(9, 71, -1) 4 +(9, 72, -1) 3 +(9, 73, -1) 3 +(9, 74, -1) 2 +(9, 75, -1) 2 +(9, 76, -1) 1 +(9, 77, -1) 1 +(9, 78, -1) 0 +(9, 79, -1) 0 +(9, 80, -1) 0 +(10, 21, -1) 0 +(10, 22, -1) 1 +(10, 23, -1) 1 +(10, 24, -1) 2 +(10, 25, -1) 2 +(10, 26, -1) 3 +(10, 27, -1) 3 +(10, 28, -1) 4 +(10, 29, -1) 4 +(10, 30, -1) 4 +(10, 31, -1) 5 +(10, 32, -1) 5 +(10, 33, -1) 6 +(10, 34, -1) 6 +(10, 35, -1) 6 +(10, 36, -1) 7 +(10, 37, -1) 7 +(10, 38, -1) 7 +(10, 39, -1) 8 +(10, 40, -1) 8 +(10, 41, -1) 8 +(10, 42, -1) 8 +(10, 43, -1) 8 +(10, 44, -1) 9 +(10, 45, -1) 9 +(10, 46, -1) 9 +(10, 47, -1) 9 +(10, 48, -1) 9 +(10, 49, -1) 9 +(10, 50, -1) 9 +(10, 51, -1) 9 +(10, 52, -1) 9 +(10, 53, -1) 9 +(10, 54, -1) 9 +(10, 55, -1) 9 +(10, 56, -1) 9 +(10, 57, -1) 9 +(10, 58, -1) 8 +(10, 59, -1) 8 +(10, 60, -1) 8 +(10, 61, -1) 8 +(10, 62, -1) 8 +(10, 63, -1) 7 +(10, 64, -1) 7 +(10, 65, -1) 7 +(10, 66, -1) 6 +(10, 67, -1) 6 +(10, 68, -1) 6 +(10, 69, -1) 5 +(10, 70, -1) 5 +(10, 71, -1) 4 +(10, 72, -1) 4 +(10, 73, -1) 4 +(10, 74, -1) 3 +(10, 75, -1) 3 +(10, 76, -1) 2 +(10, 77, -1) 2 +(10, 78, -1) 1 +(10, 79, -1) 1 +(10, 80, -1) 0 +(11, 21, -1) 1 +(11, 22, -1) 1 +(11, 23, -1) 2 +(11, 24, -1) 2 +(11, 25, -1) 3 +(11, 26, -1) 3 +(11, 27, -1) 4 +(11, 28, -1) 4 +(11, 29, -1) 5 +(11, 30, -1) 5 +(11, 31, -1) 6 +(11, 32, -1) 6 +(11, 33, -1) 6 +(11, 34, -1) 7 +(11, 35, -1) 7 +(11, 36, -1) 8 +(11, 37, -1) 8 +(11, 38, -1) 8 +(11, 39, -1) 8 +(11, 40, -1) 9 +(11, 41, -1) 9 +(11, 42, -1) 9 +(11, 43, -1) 9 +(11, 44, -1) 9 +(11, 45, -1) 10 +(11, 46, -1) 10 +(11, 47, -1) 10 +(11, 48, -1) 10 +(11, 49, -1) 10 +(11, 50, -1) 10 +(11, 51, -1) 10 +(11, 52, -1) 10 +(11, 53, -1) 10 +(11, 54, -1) 10 +(11, 55, -1) 10 +(11, 56, -1) 10 +(11, 57, -1) 9 +(11, 58, -1) 9 +(11, 59, -1) 9 +(11, 60, -1) 9 +(11, 61, -1) 9 +(11, 62, -1) 8 +(11, 63, -1) 8 +(11, 64, -1) 8 +(11, 65, -1) 8 +(11, 66, -1) 7 +(11, 67, -1) 7 +(11, 68, -1) 6 +(11, 69, -1) 6 +(11, 70, -1) 6 +(11, 71, -1) 5 +(11, 72, -1) 5 +(11, 73, -1) 4 +(11, 74, -1) 4 +(11, 75, -1) 3 +(11, 76, -1) 3 +(11, 77, -1) 2 +(11, 78, -1) 2 +(11, 79, -1) 1 +(11, 80, -1) 1 +(12, 21, -1) 1 +(12, 22, -1) 2 +(12, 23, -1) 3 +(12, 24, -1) 3 +(12, 25, -1) 4 +(12, 26, -1) 4 +(12, 27, -1) 5 +(12, 28, -1) 5 +(12, 29, -1) 6 +(12, 30, -1) 6 +(12, 31, -1) 7 +(12, 32, -1) 7 +(12, 33, -1) 7 +(12, 34, -1) 8 +(12, 35, -1) 8 +(12, 36, -1) 8 +(12, 37, -1) 9 +(12, 38, -1) 9 +(12, 39, -1) 9 +(12, 40, -1) 10 +(12, 41, -1) 10 +(12, 42, -1) 10 +(12, 43, -1) 10 +(12, 44, -1) 10 +(12, 45, -1) 11 +(12, 46, -1) 11 +(12, 47, -1) 11 +(12, 48, -1) 11 +(12, 49, -1) 11 +(12, 50, -1) 11 +(12, 51, -1) 11 +(12, 52, -1) 11 +(12, 53, -1) 11 +(12, 54, -1) 11 +(12, 55, -1) 11 +(12, 56, -1) 11 +(12, 57, -1) 10 +(12, 58, -1) 10 +(12, 59, -1) 10 +(12, 60, -1) 10 +(12, 61, -1) 10 +(12, 62, -1) 9 +(12, 63, -1) 9 +(12, 64, -1) 9 +(12, 65, -1) 8 +(12, 66, -1) 8 +(12, 67, -1) 8 +(12, 68, -1) 7 +(12, 69, -1) 7 +(12, 70, -1) 7 +(12, 71, -1) 6 +(12, 72, -1) 6 +(12, 73, -1) 5 +(12, 74, -1) 5 +(12, 75, -1) 4 +(12, 76, -1) 4 +(12, 77, -1) 3 +(12, 78, -1) 3 +(12, 79, -1) 2 +(12, 80, -1) 1 +(13, 21, -1) 2 +(13, 22, -1) 3 +(13, 23, -1) 3 +(13, 24, -1) 4 +(13, 25, -1) 5 +(13, 26, -1) 5 +(13, 27, -1) 6 +(13, 28, -1) 6 +(13, 29, -1) 7 +(13, 30, -1) 7 +(13, 31, -1) 7 +(13, 32, -1) 8 +(13, 33, -1) 8 +(13, 34, -1) 9 +(13, 35, -1) 9 +(13, 36, -1) 9 +(13, 37, -1) 10 +(13, 38, -1) 10 +(13, 39, -1) 10 +(13, 40, -1) 11 +(13, 41, -1) 11 +(13, 42, -1) 11 +(13, 43, -1) 11 +(13, 44, -1) 11 +(13, 45, -1) 12 +(13, 46, -1) 12 +(13, 47, -1) 12 +(13, 48, -1) 12 +(13, 49, -1) 12 +(13, 50, -1) 12 +(13, 51, -1) 12 +(13, 52, -1) 12 +(13, 53, -1) 12 +(13, 54, -1) 12 +(13, 55, -1) 12 +(13, 56, -1) 12 +(13, 57, -1) 11 +(13, 58, -1) 11 +(13, 59, -1) 11 +(13, 60, -1) 11 +(13, 61, -1) 11 +(13, 62, -1) 10 +(13, 63, -1) 10 +(13, 64, -1) 10 +(13, 65, -1) 9 +(13, 66, -1) 9 +(13, 67, -1) 9 +(13, 68, -1) 8 +(13, 69, -1) 8 +(13, 70, -1) 7 +(13, 71, -1) 7 +(13, 72, -1) 7 +(13, 73, -1) 6 +(13, 74, -1) 6 +(13, 75, -1) 5 +(13, 76, -1) 5 +(13, 77, -1) 4 +(13, 78, -1) 3 +(13, 79, -1) 3 +(13, 80, -1) 2 +(14, 16, -1) 0 +(14, 17, -1) 1 +(14, 18, -1) 1 +(14, 19, -1) 2 +(14, 20, -1) 2 +(14, 21, -1) 3 +(14, 22, -1) 4 +(14, 23, -1) 4 +(14, 24, -1) 5 +(14, 25, -1) 5 +(14, 26, -1) 6 +(14, 27, -1) 6 +(14, 28, -1) 7 +(14, 29, -1) 7 +(14, 30, -1) 8 +(14, 31, -1) 8 +(14, 32, -1) 9 +(14, 33, -1) 9 +(14, 34, -1) 10 +(14, 35, -1) 10 +(14, 36, -1) 10 +(14, 37, -1) 11 +(14, 38, -1) 11 +(14, 39, -1) 11 +(14, 40, -1) 12 +(14, 41, -1) 12 +(14, 42, -1) 12 +(14, 43, -1) 12 +(14, 44, -1) 12 +(14, 45, -1) 13 +(14, 46, -1) 13 +(14, 47, -1) 13 +(14, 48, -1) 13 +(14, 49, -1) 13 +(14, 50, -1) 13 +(14, 51, -1) 13 +(14, 52, -1) 13 +(14, 53, -1) 13 +(14, 54, -1) 13 +(14, 55, -1) 13 +(14, 56, -1) 13 +(14, 57, -1) 12 +(14, 58, -1) 12 +(14, 59, -1) 12 +(14, 60, -1) 12 +(14, 61, -1) 12 +(14, 62, -1) 11 +(14, 63, -1) 11 +(14, 64, -1) 11 +(14, 65, -1) 10 +(14, 66, -1) 10 +(14, 67, -1) 10 +(14, 68, -1) 9 +(14, 69, -1) 9 +(14, 70, -1) 8 +(14, 71, -1) 8 +(14, 72, -1) 7 +(14, 73, -1) 7 +(14, 74, -1) 6 +(14, 75, -1) 6 +(14, 76, -1) 5 +(14, 77, -1) 5 +(14, 78, -1) 4 +(14, 79, -1) 4 +(14, 80, -1) 3 +(14, 81, -1) 2 +(14, 82, -1) 2 +(14, 83, -1) 1 +(14, 84, -1) 1 +(14, 85, -1) 0 +(15, 16, -1) 1 +(15, 17, -1) 1 +(15, 18, -1) 2 +(15, 19, -1) 3 +(15, 20, -1) 3 +(15, 21, -1) 4 +(15, 22, -1) 4 +(15, 23, -1) 5 +(15, 24, -1) 6 +(15, 25, -1) 6 +(15, 26, -1) 7 +(15, 27, -1) 7 +(15, 28, -1) 8 +(15, 29, -1) 8 +(15, 30, -1) 9 +(15, 31, -1) 9 +(15, 32, -1) 10 +(15, 33, -1) 10 +(15, 34, -1) 11 +(15, 35, -1) 11 +(15, 36, -1) 11 +(15, 37, -1) 12 +(15, 38, -1) 12 +(15, 39, -1) 12 +(15, 40, -1) 13 +(15, 41, -1) 13 +(15, 42, -1) 13 +(15, 43, -1) 13 +(15, 44, -1) 13 +(15, 45, -1) 14 +(15, 46, -1) 14 +(15, 47, -1) 14 +(15, 48, -1) 14 +(15, 49, -1) 14 +(15, 50, -1) 14 +(15, 51, -1) 14 +(15, 52, -1) 14 +(15, 53, -1) 14 +(15, 54, -1) 14 +(15, 55, -1) 14 +(15, 56, -1) 14 +(15, 57, -1) 13 +(15, 58, -1) 13 +(15, 59, -1) 13 +(15, 60, -1) 13 +(15, 61, -1) 13 +(15, 62, -1) 12 +(15, 63, -1) 12 +(15, 64, -1) 12 +(15, 65, -1) 11 +(15, 66, -1) 11 +(15, 67, -1) 11 +(15, 68, -1) 10 +(15, 69, -1) 10 +(15, 70, -1) 9 +(15, 71, -1) 9 +(15, 72, -1) 8 +(15, 73, -1) 8 +(15, 74, -1) 7 +(15, 75, -1) 7 +(15, 76, -1) 6 +(15, 77, -1) 6 +(15, 78, -1) 5 +(15, 79, -1) 4 +(15, 80, -1) 4 +(15, 81, -1) 3 +(15, 82, -1) 3 +(15, 83, -1) 2 +(15, 84, -1) 1 +(15, 85, -1) 1 +(16, 14, -1) 0 +(16, 15, -1) 1 +(16, 16, -1) 1 +(16, 17, -1) 2 +(16, 18, -1) 2 +(16, 19, -1) 3 +(16, 20, -1) 4 +(16, 21, -1) 4 +(16, 22, -1) 5 +(16, 23, -1) 6 +(16, 24, -1) 6 +(16, 25, -1) 7 +(16, 26, -1) 7 +(16, 27, -1) 8 +(16, 28, -1) 9 +(16, 29, -1) 9 +(16, 30, -1) 10 +(16, 31, -1) 10 +(16, 32, -1) 11 +(16, 33, -1) 11 +(16, 34, -1) 11 +(16, 35, -1) 12 +(16, 36, -1) 12 +(16, 37, -1) 13 +(16, 38, -1) 13 +(16, 39, -1) 13 +(16, 40, -1) 13 +(16, 41, -1) 14 +(16, 42, -1) 14 +(16, 43, -1) 14 +(16, 44, -1) 14 +(16, 45, -1) 15 +(16, 46, -1) 15 +(16, 47, -1) 15 +(16, 48, -1) 15 +(16, 49, -1) 15 +(16, 50, -1) 15 +(16, 51, -1) 15 +(16, 52, -1) 15 +(16, 53, -1) 15 +(16, 54, -1) 15 +(16, 55, -1) 15 +(16, 56, -1) 15 +(16, 57, -1) 14 +(16, 58, -1) 14 +(16, 59, -1) 14 +(16, 60, -1) 14 +(16, 61, -1) 13 +(16, 62, -1) 13 +(16, 63, -1) 13 +(16, 64, -1) 13 +(16, 65, -1) 12 +(16, 66, -1) 12 +(16, 67, -1) 11 +(16, 68, -1) 11 +(16, 69, -1) 11 +(16, 70, -1) 10 +(16, 71, -1) 10 +(16, 72, -1) 9 +(16, 73, -1) 9 +(16, 74, -1) 8 +(16, 75, -1) 7 +(16, 76, -1) 7 +(16, 77, -1) 6 +(16, 78, -1) 6 +(16, 79, -1) 5 +(16, 80, -1) 4 +(16, 81, -1) 4 +(16, 82, -1) 3 +(16, 83, -1) 2 +(16, 84, -1) 2 +(16, 85, -1) 1 +(16, 86, -1) 1 +(16, 87, -1) 0 +(17, 14, -1) 1 +(17, 15, -1) 1 +(17, 16, -1) 2 +(17, 17, -1) 3 +(17, 18, -1) 3 +(17, 19, -1) 4 +(17, 20, -1) 5 +(17, 21, -1) 5 +(17, 22, -1) 6 +(17, 23, -1) 6 +(17, 24, -1) 7 +(17, 25, -1) 8 +(17, 26, -1) 8 +(17, 27, -1) 9 +(17, 28, -1) 9 +(17, 29, -1) 10 +(17, 30, -1) 10 +(17, 31, -1) 11 +(17, 32, -1) 11 +(17, 33, -1) 12 +(17, 34, -1) 12 +(17, 35, -1) 13 +(17, 36, -1) 13 +(17, 37, -1) 13 +(17, 38, -1) 14 +(17, 39, -1) 14 +(17, 40, -1) 14 +(17, 41, -1) 15 +(17, 42, -1) 15 +(17, 43, -1) 15 +(17, 44, -1) 15 +(17, 45, -1) 16 +(17, 46, -1) 16 +(17, 47, -1) 16 +(17, 48, -1) 16 +(17, 49, -1) 16 +(17, 50, -1) 16 +(17, 51, -1) 16 +(17, 52, -1) 16 +(17, 53, -1) 16 +(17, 54, -1) 16 +(17, 55, -1) 16 +(17, 56, -1) 16 +(17, 57, -1) 15 +(17, 58, -1) 15 +(17, 59, -1) 15 +(17, 60, -1) 15 +(17, 61, -1) 14 +(17, 62, -1) 14 +(17, 63, -1) 14 +(17, 64, -1) 13 +(17, 65, -1) 13 +(17, 66, -1) 13 +(17, 67, -1) 12 +(17, 68, -1) 12 +(17, 69, -1) 11 +(17, 70, -1) 11 +(17, 71, -1) 10 +(17, 72, -1) 10 +(17, 73, -1) 9 +(17, 74, -1) 9 +(17, 75, -1) 8 +(17, 76, -1) 8 +(17, 77, -1) 7 +(17, 78, -1) 6 +(17, 79, -1) 6 +(17, 80, -1) 5 +(17, 81, -1) 5 +(17, 82, -1) 4 +(17, 83, -1) 3 +(17, 84, -1) 3 +(17, 85, -1) 2 +(17, 86, -1) 1 +(17, 87, -1) 1 +(18, 14, -1) 1 +(18, 15, -1) 2 +(18, 16, -1) 3 +(18, 17, -1) 3 +(18, 18, -1) 4 +(18, 19, -1) 5 +(18, 20, -1) 5 +(18, 21, -1) 6 +(18, 22, -1) 7 +(18, 23, -1) 7 +(18, 24, -1) 8 +(18, 25, -1) 8 +(18, 26, -1) 9 +(18, 27, -1) 10 +(18, 28, -1) 10 +(18, 29, -1) 11 +(18, 30, -1) 11 +(18, 31, -1) 12 +(18, 32, -1) 12 +(18, 33, -1) 13 +(18, 34, -1) 13 +(18, 35, -1) 14 +(18, 36, -1) 14 +(18, 37, -1) 14 +(18, 38, -1) 15 +(18, 39, -1) 15 +(18, 40, -1) 15 +(18, 41, -1) 16 +(18, 42, -1) 16 +(18, 43, -1) 16 +(18, 44, -1) 16 +(18, 45, -1) 17 +(18, 46, -1) 17 +(18, 47, -1) 17 +(18, 48, -1) 17 +(18, 49, -1) 17 +(18, 50, -1) 17 +(18, 51, -1) 17 +(18, 52, -1) 17 +(18, 53, -1) 17 +(18, 54, -1) 17 +(18, 55, -1) 17 +(18, 56, -1) 17 +(18, 57, -1) 16 +(18, 58, -1) 16 +(18, 59, -1) 16 +(18, 60, -1) 16 +(18, 61, -1) 15 +(18, 62, -1) 15 +(18, 63, -1) 15 +(18, 64, -1) 14 +(18, 65, -1) 14 +(18, 66, -1) 14 +(18, 67, -1) 13 +(18, 68, -1) 13 +(18, 69, -1) 12 +(18, 70, -1) 12 +(18, 71, -1) 11 +(18, 72, -1) 11 +(18, 73, -1) 10 +(18, 74, -1) 10 +(18, 75, -1) 9 +(18, 76, -1) 8 +(18, 77, -1) 8 +(18, 78, -1) 7 +(18, 79, -1) 7 +(18, 80, -1) 6 +(18, 81, -1) 5 +(18, 82, -1) 5 +(18, 83, -1) 4 +(18, 84, -1) 3 +(18, 85, -1) 3 +(18, 86, -1) 2 +(18, 87, -1) 1 +(19, 14, -1) 2 +(19, 15, -1) 3 +(19, 16, -1) 3 +(19, 17, -1) 4 +(19, 18, -1) 5 +(19, 19, -1) 5 +(19, 20, -1) 6 +(19, 21, -1) 7 +(19, 22, -1) 7 +(19, 23, -1) 8 +(19, 24, -1) 9 +(19, 25, -1) 9 +(19, 26, -1) 10 +(19, 27, -1) 10 +(19, 28, -1) 11 +(19, 29, -1) 12 +(19, 30, -1) 12 +(19, 31, -1) 13 +(19, 32, -1) 13 +(19, 33, -1) 14 +(19, 34, -1) 14 +(19, 35, -1) 15 +(19, 36, -1) 15 +(19, 37, -1) 15 +(19, 38, -1) 16 +(19, 39, -1) 16 +(19, 40, -1) 16 +(19, 41, -1) 17 +(19, 42, -1) 17 +(19, 43, -1) 17 +(19, 44, -1) 17 +(19, 45, -1) 18 +(19, 46, -1) 18 +(19, 47, -1) 18 +(19, 48, -1) 18 +(19, 49, -1) 18 +(19, 50, -1) 18 +(19, 51, -1) 18 +(19, 52, -1) 18 +(19, 53, -1) 18 +(19, 54, -1) 18 +(19, 55, -1) 18 +(19, 56, -1) 18 +(19, 57, -1) 17 +(19, 58, -1) 17 +(19, 59, -1) 17 +(19, 60, -1) 17 +(19, 61, -1) 16 +(19, 62, -1) 16 +(19, 63, -1) 16 +(19, 64, -1) 15 +(19, 65, -1) 15 +(19, 66, -1) 15 +(19, 67, -1) 14 +(19, 68, -1) 14 +(19, 69, -1) 13 +(19, 70, -1) 13 +(19, 71, -1) 12 +(19, 72, -1) 12 +(19, 73, -1) 11 +(19, 74, -1) 10 +(19, 75, -1) 10 +(19, 76, -1) 9 +(19, 77, -1) 9 +(19, 78, -1) 8 +(19, 79, -1) 7 +(19, 80, -1) 7 +(19, 81, -1) 6 +(19, 82, -1) 5 +(19, 83, -1) 5 +(19, 84, -1) 4 +(19, 85, -1) 3 +(19, 86, -1) 3 +(19, 87, -1) 2 +(20, 14, -1) 3 +(20, 15, -1) 3 +(20, 16, -1) 4 +(20, 17, -1) 5 +(20, 18, -1) 5 +(20, 19, -1) 6 +(20, 20, -1) 7 +(20, 21, -1) 7 +(20, 22, -1) 8 +(20, 23, -1) 9 +(20, 24, -1) 9 +(20, 25, -1) 10 +(20, 26, -1) 11 +(20, 27, -1) 11 +(20, 28, -1) 12 +(20, 29, -1) 12 +(20, 30, -1) 13 +(20, 31, -1) 14 +(20, 32, -1) 14 +(20, 33, -1) 15 +(20, 34, -1) 15 +(20, 35, -1) 15 +(20, 36, -1) 16 +(20, 37, -1) 16 +(20, 38, -1) 17 +(20, 39, -1) 17 +(20, 40, -1) 17 +(20, 41, -1) 18 +(20, 42, -1) 18 +(20, 43, -1) 18 +(20, 44, -1) 18 +(20, 45, -1) 19 +(20, 46, -1) 19 +(20, 47, -1) 19 +(20, 48, -1) 19 +(20, 49, -1) 19 +(20, 50, -1) 19 +(20, 51, -1) 19 +(20, 52, -1) 19 +(20, 53, -1) 19 +(20, 54, -1) 19 +(20, 55, -1) 19 +(20, 56, -1) 19 +(20, 57, -1) 18 +(20, 58, -1) 18 +(20, 59, -1) 18 +(20, 60, -1) 18 +(20, 61, -1) 17 +(20, 62, -1) 17 +(20, 63, -1) 17 +(20, 64, -1) 16 +(20, 65, -1) 16 +(20, 66, -1) 15 +(20, 67, -1) 15 +(20, 68, -1) 15 +(20, 69, -1) 14 +(20, 70, -1) 14 +(20, 71, -1) 13 +(20, 72, -1) 12 +(20, 73, -1) 12 +(20, 74, -1) 11 +(20, 75, -1) 11 +(20, 76, -1) 10 +(20, 77, -1) 9 +(20, 78, -1) 9 +(20, 79, -1) 8 +(20, 80, -1) 7 +(20, 81, -1) 7 +(20, 82, -1) 6 +(20, 83, -1) 5 +(20, 84, -1) 5 +(20, 85, -1) 4 +(20, 86, -1) 3 +(20, 87, -1) 3 +(21, 9, -1) 0 +(21, 10, -1) 0 +(21, 11, -1) 1 +(21, 12, -1) 1 +(21, 13, -1) 2 +(21, 14, -1) 3 +(21, 15, -1) 4 +(21, 16, -1) 4 +(21, 17, -1) 5 +(21, 18, -1) 6 +(21, 19, -1) 7 +(21, 20, -1) 7 +(21, 21, -1) 8 +(21, 22, -1) 9 +(21, 23, -1) 9 +(21, 24, -1) 10 +(21, 25, -1) 11 +(21, 26, -1) 11 +(21, 27, -1) 12 +(21, 28, -1) 13 +(21, 29, -1) 13 +(21, 30, -1) 14 +(21, 31, -1) 14 +(21, 32, -1) 15 +(21, 33, -1) 15 +(21, 34, -1) 16 +(21, 35, -1) 16 +(21, 36, -1) 17 +(21, 37, -1) 17 +(21, 38, -1) 18 +(21, 39, -1) 18 +(21, 40, -1) 18 +(21, 41, -1) 19 +(21, 42, -1) 19 +(21, 43, -1) 19 +(21, 44, -1) 19 +(21, 45, -1) 20 +(21, 46, -1) 20 +(21, 47, -1) 20 +(21, 48, -1) 20 +(21, 49, -1) 20 +(21, 50, -1) 20 +(21, 51, -1) 20 +(21, 52, -1) 20 +(21, 53, -1) 20 +(21, 54, -1) 20 +(21, 55, -1) 20 +(21, 56, -1) 20 +(21, 57, -1) 19 +(21, 58, -1) 19 +(21, 59, -1) 19 +(21, 60, -1) 19 +(21, 61, -1) 18 +(21, 62, -1) 18 +(21, 63, -1) 18 +(21, 64, -1) 17 +(21, 65, -1) 17 +(21, 66, -1) 16 +(21, 67, -1) 16 +(21, 68, -1) 15 +(21, 69, -1) 15 +(21, 70, -1) 14 +(21, 71, -1) 14 +(21, 72, -1) 13 +(21, 73, -1) 13 +(21, 74, -1) 12 +(21, 75, -1) 11 +(21, 76, -1) 11 +(21, 77, -1) 10 +(21, 78, -1) 9 +(21, 79, -1) 9 +(21, 80, -1) 8 +(21, 81, -1) 7 +(21, 82, -1) 7 +(21, 83, -1) 6 +(21, 84, -1) 5 +(21, 85, -1) 4 +(21, 86, -1) 4 +(21, 87, -1) 3 +(21, 88, -1) 2 +(21, 89, -1) 1 +(21, 90, -1) 1 +(21, 91, -1) 0 +(21, 92, -1) 0 +(22, 9, -1) 0 +(22, 10, -1) 1 +(22, 11, -1) 1 +(22, 12, -1) 2 +(22, 13, -1) 3 +(22, 14, -1) 4 +(22, 15, -1) 4 +(22, 16, -1) 5 +(22, 17, -1) 6 +(22, 18, -1) 7 +(22, 19, -1) 7 +(22, 20, -1) 8 +(22, 21, -1) 9 +(22, 22, -1) 9 +(22, 23, -1) 10 +(22, 24, -1) 11 +(22, 25, -1) 12 +(22, 26, -1) 12 +(22, 27, -1) 13 +(22, 28, -1) 13 +(22, 29, -1) 14 +(22, 30, -1) 15 +(22, 31, -1) 15 +(22, 32, -1) 16 +(22, 33, -1) 16 +(22, 34, -1) 17 +(22, 35, -1) 17 +(22, 36, -1) 18 +(22, 37, -1) 18 +(22, 38, -1) 18 +(22, 39, -1) 19 +(22, 40, -1) 19 +(22, 41, -1) 20 +(22, 42, -1) 20 +(22, 43, -1) 20 +(22, 44, -1) 20 +(22, 45, -1) 20 +(22, 46, -1) 21 +(22, 47, -1) 21 +(22, 48, -1) 21 +(22, 49, -1) 21 +(22, 50, -1) 21 +(22, 51, -1) 21 +(22, 52, -1) 21 +(22, 53, -1) 21 +(22, 54, -1) 21 +(22, 55, -1) 21 +(22, 56, -1) 20 +(22, 57, -1) 20 +(22, 58, -1) 20 +(22, 59, -1) 20 +(22, 60, -1) 20 +(22, 61, -1) 19 +(22, 62, -1) 19 +(22, 63, -1) 18 +(22, 64, -1) 18 +(22, 65, -1) 18 +(22, 66, -1) 17 +(22, 67, -1) 17 +(22, 68, -1) 16 +(22, 69, -1) 16 +(22, 70, -1) 15 +(22, 71, -1) 15 +(22, 72, -1) 14 +(22, 73, -1) 13 +(22, 74, -1) 13 +(22, 75, -1) 12 +(22, 76, -1) 12 +(22, 77, -1) 11 +(22, 78, -1) 10 +(22, 79, -1) 9 +(22, 80, -1) 9 +(22, 81, -1) 8 +(22, 82, -1) 7 +(22, 83, -1) 7 +(22, 84, -1) 6 +(22, 85, -1) 5 +(22, 86, -1) 4 +(22, 87, -1) 4 +(22, 88, -1) 3 +(22, 89, -1) 2 +(22, 90, -1) 1 +(22, 91, -1) 1 +(22, 92, -1) 0 +(23, 9, -1) 0 +(23, 10, -1) 1 +(23, 11, -1) 2 +(23, 12, -1) 3 +(23, 13, -1) 3 +(23, 14, -1) 4 +(23, 15, -1) 5 +(23, 16, -1) 6 +(23, 17, -1) 7 +(23, 18, -1) 7 +(23, 19, -1) 8 +(23, 20, -1) 9 +(23, 21, -1) 9 +(23, 22, -1) 10 +(23, 23, -1) 11 +(23, 24, -1) 12 +(23, 25, -1) 12 +(23, 26, -1) 13 +(23, 27, -1) 14 +(23, 28, -1) 14 +(23, 29, -1) 15 +(23, 30, -1) 15 +(23, 31, -1) 16 +(23, 32, -1) 17 +(23, 33, -1) 17 +(23, 34, -1) 18 +(23, 35, -1) 18 +(23, 36, -1) 19 +(23, 37, -1) 19 +(23, 38, -1) 19 +(23, 39, -1) 20 +(23, 40, -1) 20 +(23, 41, -1) 20 +(23, 42, -1) 21 +(23, 43, -1) 21 +(23, 44, -1) 21 +(23, 45, -1) 21 +(23, 46, -1) 22 +(23, 47, -1) 22 +(23, 48, -1) 22 +(23, 49, -1) 22 +(23, 50, -1) 22 +(23, 51, -1) 22 +(23, 52, -1) 22 +(23, 53, -1) 22 +(23, 54, -1) 22 +(23, 55, -1) 22 +(23, 56, -1) 21 +(23, 57, -1) 21 +(23, 58, -1) 21 +(23, 59, -1) 21 +(23, 60, -1) 20 +(23, 61, -1) 20 +(23, 62, -1) 20 +(23, 63, -1) 19 +(23, 64, -1) 19 +(23, 65, -1) 19 +(23, 66, -1) 18 +(23, 67, -1) 18 +(23, 68, -1) 17 +(23, 69, -1) 17 +(23, 70, -1) 16 +(23, 71, -1) 15 +(23, 72, -1) 15 +(23, 73, -1) 14 +(23, 74, -1) 14 +(23, 75, -1) 13 +(23, 76, -1) 12 +(23, 77, -1) 12 +(23, 78, -1) 11 +(23, 79, -1) 10 +(23, 80, -1) 9 +(23, 81, -1) 9 +(23, 82, -1) 8 +(23, 83, -1) 7 +(23, 84, -1) 7 +(23, 85, -1) 6 +(23, 86, -1) 5 +(23, 87, -1) 4 +(23, 88, -1) 3 +(23, 89, -1) 3 +(23, 90, -1) 2 +(23, 91, -1) 1 +(23, 92, -1) 0 +(24, 9, -1) 1 +(24, 10, -1) 2 +(24, 11, -1) 2 +(24, 12, -1) 3 +(24, 13, -1) 4 +(24, 14, -1) 5 +(24, 15, -1) 6 +(24, 16, -1) 6 +(24, 17, -1) 7 +(24, 18, -1) 8 +(24, 19, -1) 9 +(24, 20, -1) 9 +(24, 21, -1) 10 +(24, 22, -1) 11 +(24, 23, -1) 12 +(24, 24, -1) 12 +(24, 25, -1) 13 +(24, 26, -1) 14 +(24, 27, -1) 14 +(24, 28, -1) 15 +(24, 29, -1) 16 +(24, 30, -1) 16 +(24, 31, -1) 17 +(24, 32, -1) 17 +(24, 33, -1) 18 +(24, 34, -1) 18 +(24, 35, -1) 19 +(24, 36, -1) 19 +(24, 37, -1) 20 +(24, 38, -1) 20 +(24, 39, -1) 21 +(24, 40, -1) 21 +(24, 41, -1) 21 +(24, 42, -1) 22 +(24, 43, -1) 22 +(24, 44, -1) 22 +(24, 45, -1) 22 +(24, 46, -1) 23 +(24, 47, -1) 23 +(24, 48, -1) 23 +(24, 49, -1) 23 +(24, 50, -1) 23 +(24, 51, -1) 23 +(24, 52, -1) 23 +(24, 53, -1) 23 +(24, 54, -1) 23 +(24, 55, -1) 23 +(24, 56, -1) 22 +(24, 57, -1) 22 +(24, 58, -1) 22 +(24, 59, -1) 22 +(24, 60, -1) 21 +(24, 61, -1) 21 +(24, 62, -1) 21 +(24, 63, -1) 20 +(24, 64, -1) 20 +(24, 65, -1) 19 +(24, 66, -1) 19 +(24, 67, -1) 18 +(24, 68, -1) 18 +(24, 69, -1) 17 +(24, 70, -1) 17 +(24, 71, -1) 16 +(24, 72, -1) 16 +(24, 73, -1) 15 +(24, 74, -1) 14 +(24, 75, -1) 14 +(24, 76, -1) 13 +(24, 77, -1) 12 +(24, 78, -1) 12 +(24, 79, -1) 11 +(24, 80, -1) 10 +(24, 81, -1) 9 +(24, 82, -1) 9 +(24, 83, -1) 8 +(24, 84, -1) 7 +(24, 85, -1) 6 +(24, 86, -1) 6 +(24, 87, -1) 5 +(24, 88, -1) 4 +(24, 89, -1) 3 +(24, 90, -1) 2 +(24, 91, -1) 2 +(24, 92, -1) 1 +(25, 9, -1) 1 +(25, 10, -1) 2 +(25, 11, -1) 3 +(25, 12, -1) 4 +(25, 13, -1) 5 +(25, 14, -1) 5 +(25, 15, -1) 6 +(25, 16, -1) 7 +(25, 17, -1) 8 +(25, 18, -1) 9 +(25, 19, -1) 9 +(25, 20, -1) 10 +(25, 21, -1) 11 +(25, 22, -1) 12 +(25, 23, -1) 12 +(25, 24, -1) 13 +(25, 25, -1) 14 +(25, 26, -1) 14 +(25, 27, -1) 15 +(25, 28, -1) 16 +(25, 29, -1) 16 +(25, 30, -1) 17 +(25, 31, -1) 18 +(25, 32, -1) 18 +(25, 33, -1) 19 +(25, 34, -1) 19 +(25, 35, -1) 20 +(25, 36, -1) 20 +(25, 37, -1) 21 +(25, 38, -1) 21 +(25, 39, -1) 22 +(25, 40, -1) 22 +(25, 41, -1) 22 +(25, 42, -1) 23 +(25, 43, -1) 23 +(25, 44, -1) 23 +(25, 45, -1) 23 +(25, 46, -1) 24 +(25, 47, -1) 24 +(25, 48, -1) 24 +(25, 49, -1) 24 +(25, 50, -1) 24 +(25, 51, -1) 24 +(25, 52, -1) 24 +(25, 53, -1) 24 +(25, 54, -1) 24 +(25, 55, -1) 24 +(25, 56, -1) 23 +(25, 57, -1) 23 +(25, 58, -1) 23 +(25, 59, -1) 23 +(25, 60, -1) 22 +(25, 61, -1) 22 +(25, 62, -1) 22 +(25, 63, -1) 21 +(25, 64, -1) 21 +(25, 65, -1) 20 +(25, 66, -1) 20 +(25, 67, -1) 19 +(25, 68, -1) 19 +(25, 69, -1) 18 +(25, 70, -1) 18 +(25, 71, -1) 17 +(25, 72, -1) 16 +(25, 73, -1) 16 +(25, 74, -1) 15 +(25, 75, -1) 14 +(25, 76, -1) 14 +(25, 77, -1) 13 +(25, 78, -1) 12 +(25, 79, -1) 12 +(25, 80, -1) 11 +(25, 81, -1) 10 +(25, 82, -1) 9 +(25, 83, -1) 9 +(25, 84, -1) 8 +(25, 85, -1) 7 +(25, 86, -1) 6 +(25, 87, -1) 5 +(25, 88, -1) 5 +(25, 89, -1) 4 +(25, 90, -1) 3 +(25, 91, -1) 2 +(25, 92, -1) 1 +(26, 6, -1) 0 +(26, 7, -1) 0 +(26, 8, -1) 1 +(26, 9, -1) 2 +(26, 10, -1) 3 +(26, 11, -1) 3 +(26, 12, -1) 4 +(26, 13, -1) 5 +(26, 14, -1) 6 +(26, 15, -1) 7 +(26, 16, -1) 7 +(26, 17, -1) 8 +(26, 18, -1) 9 +(26, 19, -1) 10 +(26, 20, -1) 11 +(26, 21, -1) 11 +(26, 22, -1) 12 +(26, 23, -1) 13 +(26, 24, -1) 14 +(26, 25, -1) 14 +(26, 26, -1) 15 +(26, 27, -1) 16 +(26, 28, -1) 16 +(26, 29, -1) 17 +(26, 30, -1) 18 +(26, 31, -1) 18 +(26, 32, -1) 19 +(26, 33, -1) 19 +(26, 34, -1) 20 +(26, 35, -1) 21 +(26, 36, -1) 21 +(26, 37, -1) 22 +(26, 38, -1) 22 +(26, 39, -1) 22 +(26, 40, -1) 23 +(26, 41, -1) 23 +(26, 42, -1) 24 +(26, 43, -1) 24 +(26, 44, -1) 24 +(26, 45, -1) 24 +(26, 46, -1) 25 +(26, 47, -1) 25 +(26, 48, -1) 25 +(26, 49, -1) 25 +(26, 50, -1) 25 +(26, 51, -1) 25 +(26, 52, -1) 25 +(26, 53, -1) 25 +(26, 54, -1) 25 +(26, 55, -1) 25 +(26, 56, -1) 24 +(26, 57, -1) 24 +(26, 58, -1) 24 +(26, 59, -1) 24 +(26, 60, -1) 23 +(26, 61, -1) 23 +(26, 62, -1) 22 +(26, 63, -1) 22 +(26, 64, -1) 22 +(26, 65, -1) 21 +(26, 66, -1) 21 +(26, 67, -1) 20 +(26, 68, -1) 19 +(26, 69, -1) 19 +(26, 70, -1) 18 +(26, 71, -1) 18 +(26, 72, -1) 17 +(26, 73, -1) 16 +(26, 74, -1) 16 +(26, 75, -1) 15 +(26, 76, -1) 14 +(26, 77, -1) 14 +(26, 78, -1) 13 +(26, 79, -1) 12 +(26, 80, -1) 11 +(26, 81, -1) 11 +(26, 82, -1) 10 +(26, 83, -1) 9 +(26, 84, -1) 8 +(26, 85, -1) 7 +(26, 86, -1) 7 +(26, 87, -1) 6 +(26, 88, -1) 5 +(26, 89, -1) 4 +(26, 90, -1) 3 +(26, 91, -1) 3 +(26, 92, -1) 2 +(26, 93, -1) 1 +(26, 94, -1) 0 +(26, 95, -1) 0 +(27, 6, -1) 0 +(27, 7, -1) 0 +(27, 8, -1) 1 +(27, 9, -1) 2 +(27, 10, -1) 3 +(27, 11, -1) 4 +(27, 12, -1) 5 +(27, 13, -1) 6 +(27, 14, -1) 6 +(27, 15, -1) 7 +(27, 16, -1) 8 +(27, 17, -1) 9 +(27, 18, -1) 10 +(27, 19, -1) 10 +(27, 20, -1) 11 +(27, 21, -1) 12 +(27, 22, -1) 13 +(27, 23, -1) 14 +(27, 24, -1) 14 +(27, 25, -1) 15 +(27, 26, -1) 16 +(27, 27, -1) 16 +(27, 28, -1) 17 +(27, 29, -1) 18 +(27, 30, -1) 18 +(27, 31, -1) 19 +(27, 32, -1) 20 +(27, 33, -1) 20 +(27, 34, -1) 21 +(27, 35, -1) 21 +(27, 36, -1) 22 +(27, 37, -1) 22 +(27, 38, -1) 23 +(27, 39, -1) 23 +(27, 40, -1) 24 +(27, 41, -1) 24 +(27, 42, -1) 25 +(27, 43, -1) 25 +(27, 44, -1) 25 +(27, 45, -1) 25 +(27, 46, -1) 26 +(27, 47, -1) 26 +(27, 48, -1) 26 +(27, 49, -1) 26 +(27, 50, -1) 26 +(27, 51, -1) 26 +(27, 52, -1) 26 +(27, 53, -1) 26 +(27, 54, -1) 26 +(27, 55, -1) 26 +(27, 56, -1) 25 +(27, 57, -1) 25 +(27, 58, -1) 25 +(27, 59, -1) 25 +(27, 60, -1) 24 +(27, 61, -1) 24 +(27, 62, -1) 23 +(27, 63, -1) 23 +(27, 64, -1) 22 +(27, 65, -1) 22 +(27, 66, -1) 21 +(27, 67, -1) 21 +(27, 68, -1) 20 +(27, 69, -1) 20 +(27, 70, -1) 19 +(27, 71, -1) 18 +(27, 72, -1) 18 +(27, 73, -1) 17 +(27, 74, -1) 16 +(27, 75, -1) 16 +(27, 76, -1) 15 +(27, 77, -1) 14 +(27, 78, -1) 14 +(27, 79, -1) 13 +(27, 80, -1) 12 +(27, 81, -1) 11 +(27, 82, -1) 10 +(27, 83, -1) 10 +(27, 84, -1) 9 +(27, 85, -1) 8 +(27, 86, -1) 7 +(27, 87, -1) 6 +(27, 88, -1) 6 +(27, 89, -1) 5 +(27, 90, -1) 4 +(27, 91, -1) 3 +(27, 92, -1) 2 +(27, 93, -1) 1 +(27, 94, -1) 0 +(27, 95, -1) 0 +(28, 6, -1) 0 +(28, 7, -1) 1 +(28, 8, -1) 2 +(28, 9, -1) 3 +(28, 10, -1) 4 +(28, 11, -1) 4 +(28, 12, -1) 5 +(28, 13, -1) 6 +(28, 14, -1) 7 +(28, 15, -1) 8 +(28, 16, -1) 9 +(28, 17, -1) 9 +(28, 18, -1) 10 +(28, 19, -1) 11 +(28, 20, -1) 12 +(28, 21, -1) 13 +(28, 22, -1) 13 +(28, 23, -1) 14 +(28, 24, -1) 15 +(28, 25, -1) 16 +(28, 26, -1) 16 +(28, 27, -1) 17 +(28, 28, -1) 18 +(28, 29, -1) 19 +(28, 30, -1) 19 +(28, 31, -1) 20 +(28, 32, -1) 20 +(28, 33, -1) 21 +(28, 34, -1) 22 +(28, 35, -1) 22 +(28, 36, -1) 23 +(28, 37, -1) 23 +(28, 38, -1) 24 +(28, 39, -1) 24 +(28, 40, -1) 25 +(28, 41, -1) 25 +(28, 42, -1) 25 +(28, 43, -1) 26 +(28, 44, -1) 26 +(28, 45, -1) 26 +(28, 46, -1) 27 +(28, 47, -1) 27 +(28, 48, -1) 27 +(28, 49, -1) 27 +(28, 50, -1) 27 +(28, 51, -1) 27 +(28, 52, -1) 27 +(28, 53, -1) 27 +(28, 54, -1) 27 +(28, 55, -1) 27 +(28, 56, -1) 26 +(28, 57, -1) 26 +(28, 58, -1) 26 +(28, 59, -1) 25 +(28, 60, -1) 25 +(28, 61, -1) 25 +(28, 62, -1) 24 +(28, 63, -1) 24 +(28, 64, -1) 23 +(28, 65, -1) 23 +(28, 66, -1) 22 +(28, 67, -1) 22 +(28, 68, -1) 21 +(28, 69, -1) 20 +(28, 70, -1) 20 +(28, 71, -1) 19 +(28, 72, -1) 19 +(28, 73, -1) 18 +(28, 74, -1) 17 +(28, 75, -1) 16 +(28, 76, -1) 16 +(28, 77, -1) 15 +(28, 78, -1) 14 +(28, 79, -1) 13 +(28, 80, -1) 13 +(28, 81, -1) 12 +(28, 82, -1) 11 +(28, 83, -1) 10 +(28, 84, -1) 9 +(28, 85, -1) 9 +(28, 86, -1) 8 +(28, 87, -1) 7 +(28, 88, -1) 6 +(28, 89, -1) 5 +(28, 90, -1) 4 +(28, 91, -1) 4 +(28, 92, -1) 3 +(28, 93, -1) 2 +(28, 94, -1) 1 +(28, 95, -1) 0 +(29, 6, -1) 1 +(29, 7, -1) 1 +(29, 8, -1) 2 +(29, 9, -1) 3 +(29, 10, -1) 4 +(29, 11, -1) 5 +(29, 12, -1) 6 +(29, 13, -1) 7 +(29, 14, -1) 7 +(29, 15, -1) 8 +(29, 16, -1) 9 +(29, 17, -1) 10 +(29, 18, -1) 11 +(29, 19, -1) 12 +(29, 20, -1) 12 +(29, 21, -1) 13 +(29, 22, -1) 14 +(29, 23, -1) 15 +(29, 24, -1) 16 +(29, 25, -1) 16 +(29, 26, -1) 17 +(29, 27, -1) 18 +(29, 28, -1) 19 +(29, 29, -1) 19 +(29, 30, -1) 20 +(29, 31, -1) 21 +(29, 32, -1) 21 +(29, 33, -1) 22 +(29, 34, -1) 23 +(29, 35, -1) 23 +(29, 36, -1) 24 +(29, 37, -1) 24 +(29, 38, -1) 25 +(29, 39, -1) 25 +(29, 40, -1) 26 +(29, 41, -1) 26 +(29, 42, -1) 26 +(29, 43, -1) 27 +(29, 44, -1) 27 +(29, 45, -1) 27 +(29, 46, -1) 28 +(29, 47, -1) 28 +(29, 48, -1) 28 +(29, 49, -1) 28 +(29, 50, -1) 28 +(29, 51, -1) 28 +(29, 52, -1) 28 +(29, 53, -1) 28 +(29, 54, -1) 28 +(29, 55, -1) 28 +(29, 56, -1) 27 +(29, 57, -1) 27 +(29, 58, -1) 27 +(29, 59, -1) 26 +(29, 60, -1) 26 +(29, 61, -1) 26 +(29, 62, -1) 25 +(29, 63, -1) 25 +(29, 64, -1) 24 +(29, 65, -1) 24 +(29, 66, -1) 23 +(29, 67, -1) 23 +(29, 68, -1) 22 +(29, 69, -1) 21 +(29, 70, -1) 21 +(29, 71, -1) 20 +(29, 72, -1) 19 +(29, 73, -1) 19 +(29, 74, -1) 18 +(29, 75, -1) 17 +(29, 76, -1) 16 +(29, 77, -1) 16 +(29, 78, -1) 15 +(29, 79, -1) 14 +(29, 80, -1) 13 +(29, 81, -1) 12 +(29, 82, -1) 12 +(29, 83, -1) 11 +(29, 84, -1) 10 +(29, 85, -1) 9 +(29, 86, -1) 8 +(29, 87, -1) 7 +(29, 88, -1) 7 +(29, 89, -1) 6 +(29, 90, -1) 5 +(29, 91, -1) 4 +(29, 92, -1) 3 +(29, 93, -1) 2 +(29, 94, -1) 1 +(29, 95, -1) 1 +(30, 6, -1) 1 +(30, 7, -1) 2 +(30, 8, -1) 3 +(30, 9, -1) 4 +(30, 10, -1) 5 +(30, 11, -1) 5 +(30, 12, -1) 6 +(30, 13, -1) 7 +(30, 14, -1) 8 +(30, 15, -1) 9 +(30, 16, -1) 10 +(30, 17, -1) 11 +(30, 18, -1) 11 +(30, 19, -1) 12 +(30, 20, -1) 13 +(30, 21, -1) 14 +(30, 22, -1) 15 +(30, 23, -1) 15 +(30, 24, -1) 16 +(30, 25, -1) 17 +(30, 26, -1) 18 +(30, 27, -1) 19 +(30, 28, -1) 19 +(30, 29, -1) 20 +(30, 30, -1) 21 +(30, 31, -1) 21 +(30, 32, -1) 22 +(30, 33, -1) 23 +(30, 34, -1) 23 +(30, 35, -1) 24 +(30, 36, -1) 24 +(30, 37, -1) 25 +(30, 38, -1) 26 +(30, 39, -1) 26 +(30, 40, -1) 27 +(30, 41, -1) 27 +(30, 42, -1) 27 +(30, 43, -1) 28 +(30, 44, -1) 28 +(30, 45, -1) 28 +(30, 46, -1) 29 +(30, 47, -1) 29 +(30, 48, -1) 29 +(30, 49, -1) 29 +(30, 50, -1) 29 +(30, 51, -1) 29 +(30, 52, -1) 29 +(30, 53, -1) 29 +(30, 54, -1) 29 +(30, 55, -1) 29 +(30, 56, -1) 28 +(30, 57, -1) 28 +(30, 58, -1) 28 +(30, 59, -1) 27 +(30, 60, -1) 27 +(30, 61, -1) 27 +(30, 62, -1) 26 +(30, 63, -1) 26 +(30, 64, -1) 25 +(30, 65, -1) 24 +(30, 66, -1) 24 +(30, 67, -1) 23 +(30, 68, -1) 23 +(30, 69, -1) 22 +(30, 70, -1) 21 +(30, 71, -1) 21 +(30, 72, -1) 20 +(30, 73, -1) 19 +(30, 74, -1) 19 +(30, 75, -1) 18 +(30, 76, -1) 17 +(30, 77, -1) 16 +(30, 78, -1) 15 +(30, 79, -1) 15 +(30, 80, -1) 14 +(30, 81, -1) 13 +(30, 82, -1) 12 +(30, 83, -1) 11 +(30, 84, -1) 11 +(30, 85, -1) 10 +(30, 86, -1) 9 +(30, 87, -1) 8 +(30, 88, -1) 7 +(30, 89, -1) 6 +(30, 90, -1) 5 +(30, 91, -1) 5 +(30, 92, -1) 4 +(30, 93, -1) 3 +(30, 94, -1) 2 +(30, 95, -1) 1 +(31, 6, -1) 1 +(31, 7, -1) 2 +(31, 8, -1) 3 +(31, 9, -1) 4 +(31, 10, -1) 5 +(31, 11, -1) 6 +(31, 12, -1) 7 +(31, 13, -1) 7 +(31, 14, -1) 8 +(31, 15, -1) 9 +(31, 16, -1) 10 +(31, 17, -1) 11 +(31, 18, -1) 12 +(31, 19, -1) 13 +(31, 20, -1) 13 +(31, 21, -1) 14 +(31, 22, -1) 15 +(31, 23, -1) 16 +(31, 24, -1) 17 +(31, 25, -1) 18 +(31, 26, -1) 18 +(31, 27, -1) 19 +(31, 28, -1) 20 +(31, 29, -1) 21 +(31, 30, -1) 21 +(31, 31, -1) 22 +(31, 32, -1) 23 +(31, 33, -1) 23 +(31, 34, -1) 24 +(31, 35, -1) 25 +(31, 36, -1) 25 +(31, 37, -1) 26 +(31, 38, -1) 26 +(31, 39, -1) 27 +(31, 40, -1) 27 +(31, 41, -1) 28 +(31, 42, -1) 28 +(31, 43, -1) 29 +(31, 44, -1) 29 +(31, 45, -1) 29 +(31, 46, -1) 30 +(31, 47, -1) 30 +(31, 48, -1) 30 +(31, 49, -1) 30 +(31, 50, -1) 30 +(31, 51, -1) 30 +(31, 52, -1) 30 +(31, 53, -1) 30 +(31, 54, -1) 30 +(31, 55, -1) 30 +(31, 56, -1) 29 +(31, 57, -1) 29 +(31, 58, -1) 29 +(31, 59, -1) 28 +(31, 60, -1) 28 +(31, 61, -1) 27 +(31, 62, -1) 27 +(31, 63, -1) 26 +(31, 64, -1) 26 +(31, 65, -1) 25 +(31, 66, -1) 25 +(31, 67, -1) 24 +(31, 68, -1) 23 +(31, 69, -1) 23 +(31, 70, -1) 22 +(31, 71, -1) 21 +(31, 72, -1) 21 +(31, 73, -1) 20 +(31, 74, -1) 19 +(31, 75, -1) 18 +(31, 76, -1) 18 +(31, 77, -1) 17 +(31, 78, -1) 16 +(31, 79, -1) 15 +(31, 80, -1) 14 +(31, 81, -1) 13 +(31, 82, -1) 13 +(31, 83, -1) 12 +(31, 84, -1) 11 +(31, 85, -1) 10 +(31, 86, -1) 9 +(31, 87, -1) 8 +(31, 88, -1) 7 +(31, 89, -1) 7 +(31, 90, -1) 6 +(31, 91, -1) 5 +(31, 92, -1) 4 +(31, 93, -1) 3 +(31, 94, -1) 2 +(31, 95, -1) 1 +(32, 6, -1) 2 +(32, 7, -1) 2 +(32, 8, -1) 3 +(32, 9, -1) 4 +(32, 10, -1) 5 +(32, 11, -1) 6 +(32, 12, -1) 7 +(32, 13, -1) 8 +(32, 14, -1) 9 +(32, 15, -1) 10 +(32, 16, -1) 11 +(32, 17, -1) 11 +(32, 18, -1) 12 +(32, 19, -1) 13 +(32, 20, -1) 14 +(32, 21, -1) 15 +(32, 22, -1) 16 +(32, 23, -1) 17 +(32, 24, -1) 17 +(32, 25, -1) 18 +(32, 26, -1) 19 +(32, 27, -1) 20 +(32, 28, -1) 20 +(32, 29, -1) 21 +(32, 30, -1) 22 +(32, 31, -1) 23 +(32, 32, -1) 23 +(32, 33, -1) 24 +(32, 34, -1) 25 +(32, 35, -1) 25 +(32, 36, -1) 26 +(32, 37, -1) 27 +(32, 38, -1) 27 +(32, 39, -1) 28 +(32, 40, -1) 28 +(32, 41, -1) 29 +(32, 42, -1) 29 +(32, 43, -1) 30 +(32, 44, -1) 30 +(32, 45, -1) 30 +(32, 46, -1) 30 +(32, 47, -1) 31 +(32, 48, -1) 31 +(32, 49, -1) 31 +(32, 50, -1) 31 +(32, 51, -1) 31 +(32, 52, -1) 31 +(32, 53, -1) 31 +(32, 54, -1) 31 +(32, 55, -1) 30 +(32, 56, -1) 30 +(32, 57, -1) 30 +(32, 58, -1) 30 +(32, 59, -1) 29 +(32, 60, -1) 29 +(32, 61, -1) 28 +(32, 62, -1) 28 +(32, 63, -1) 27 +(32, 64, -1) 27 +(32, 65, -1) 26 +(32, 66, -1) 25 +(32, 67, -1) 25 +(32, 68, -1) 24 +(32, 69, -1) 23 +(32, 70, -1) 23 +(32, 71, -1) 22 +(32, 72, -1) 21 +(32, 73, -1) 20 +(32, 74, -1) 20 +(32, 75, -1) 19 +(32, 76, -1) 18 +(32, 77, -1) 17 +(32, 78, -1) 17 +(32, 79, -1) 16 +(32, 80, -1) 15 +(32, 81, -1) 14 +(32, 82, -1) 13 +(32, 83, -1) 12 +(32, 84, -1) 11 +(32, 85, -1) 11 +(32, 86, -1) 10 +(32, 87, -1) 9 +(32, 88, -1) 8 +(32, 89, -1) 7 +(32, 90, -1) 6 +(32, 91, -1) 5 +(32, 92, -1) 4 +(32, 93, -1) 3 +(32, 94, -1) 2 +(32, 95, -1) 2 +(33, 6, -1) 2 +(33, 7, -1) 3 +(33, 8, -1) 4 +(33, 9, -1) 5 +(33, 10, -1) 6 +(33, 11, -1) 7 +(33, 12, -1) 7 +(33, 13, -1) 8 +(33, 14, -1) 9 +(33, 15, -1) 10 +(33, 16, -1) 11 +(33, 17, -1) 12 +(33, 18, -1) 13 +(33, 19, -1) 14 +(33, 20, -1) 15 +(33, 21, -1) 15 +(33, 22, -1) 16 +(33, 23, -1) 17 +(33, 24, -1) 18 +(33, 25, -1) 19 +(33, 26, -1) 20 +(33, 27, -1) 20 +(33, 28, -1) 21 +(33, 29, -1) 22 +(33, 30, -1) 23 +(33, 31, -1) 23 +(33, 32, -1) 24 +(33, 33, -1) 25 +(33, 34, -1) 26 +(33, 35, -1) 26 +(33, 36, -1) 27 +(33, 37, -1) 27 +(33, 38, -1) 28 +(33, 39, -1) 29 +(33, 40, -1) 29 +(33, 41, -1) 30 +(33, 42, -1) 30 +(33, 43, -1) 30 +(33, 44, -1) 31 +(33, 45, -1) 31 +(33, 46, -1) 31 +(33, 47, -1) 32 +(33, 48, -1) 32 +(33, 49, -1) 32 +(33, 50, -1) 32 +(33, 51, -1) 32 +(33, 52, -1) 32 +(33, 53, -1) 32 +(33, 54, -1) 32 +(33, 55, -1) 31 +(33, 56, -1) 31 +(33, 57, -1) 31 +(33, 58, -1) 30 +(33, 59, -1) 30 +(33, 60, -1) 30 +(33, 61, -1) 29 +(33, 62, -1) 29 +(33, 63, -1) 28 +(33, 64, -1) 27 +(33, 65, -1) 27 +(33, 66, -1) 26 +(33, 67, -1) 26 +(33, 68, -1) 25 +(33, 69, -1) 24 +(33, 70, -1) 23 +(33, 71, -1) 23 +(33, 72, -1) 22 +(33, 73, -1) 21 +(33, 74, -1) 20 +(33, 75, -1) 20 +(33, 76, -1) 19 +(33, 77, -1) 18 +(33, 78, -1) 17 +(33, 79, -1) 16 +(33, 80, -1) 15 +(33, 81, -1) 15 +(33, 82, -1) 14 +(33, 83, -1) 13 +(33, 84, -1) 12 +(33, 85, -1) 11 +(33, 86, -1) 10 +(33, 87, -1) 9 +(33, 88, -1) 8 +(33, 89, -1) 7 +(33, 90, -1) 7 +(33, 91, -1) 6 +(33, 92, -1) 5 +(33, 93, -1) 4 +(33, 94, -1) 3 +(33, 95, -1) 2 +(34, 6, -1) 2 +(34, 7, -1) 3 +(34, 8, -1) 4 +(34, 9, -1) 5 +(34, 10, -1) 6 +(34, 11, -1) 7 +(34, 12, -1) 8 +(34, 13, -1) 9 +(34, 14, -1) 10 +(34, 15, -1) 11 +(34, 16, -1) 11 +(34, 17, -1) 12 +(34, 18, -1) 13 +(34, 19, -1) 14 +(34, 20, -1) 15 +(34, 21, -1) 16 +(34, 22, -1) 17 +(34, 23, -1) 18 +(34, 24, -1) 18 +(34, 25, -1) 19 +(34, 26, -1) 20 +(34, 27, -1) 21 +(34, 28, -1) 22 +(34, 29, -1) 23 +(34, 30, -1) 23 +(34, 31, -1) 24 +(34, 32, -1) 25 +(34, 33, -1) 26 +(34, 34, -1) 26 +(34, 35, -1) 27 +(34, 36, -1) 28 +(34, 37, -1) 28 +(34, 38, -1) 29 +(34, 39, -1) 29 +(34, 40, -1) 30 +(34, 41, -1) 30 +(34, 42, -1) 31 +(34, 43, -1) 31 +(34, 44, -1) 32 +(34, 45, -1) 32 +(34, 46, -1) 32 +(34, 47, -1) 33 +(34, 48, -1) 33 +(34, 49, -1) 33 +(34, 50, -1) 33 +(34, 51, -1) 33 +(34, 52, -1) 33 +(34, 53, -1) 33 +(34, 54, -1) 33 +(34, 55, -1) 32 +(34, 56, -1) 32 +(34, 57, -1) 32 +(34, 58, -1) 31 +(34, 59, -1) 31 +(34, 60, -1) 30 +(34, 61, -1) 30 +(34, 62, -1) 29 +(34, 63, -1) 29 +(34, 64, -1) 28 +(34, 65, -1) 28 +(34, 66, -1) 27 +(34, 67, -1) 26 +(34, 68, -1) 26 +(34, 69, -1) 25 +(34, 70, -1) 24 +(34, 71, -1) 23 +(34, 72, -1) 23 +(34, 73, -1) 22 +(34, 74, -1) 21 +(34, 75, -1) 20 +(34, 76, -1) 19 +(34, 77, -1) 18 +(34, 78, -1) 18 +(34, 79, -1) 17 +(34, 80, -1) 16 +(34, 81, -1) 15 +(34, 82, -1) 14 +(34, 83, -1) 13 +(34, 84, -1) 12 +(34, 85, -1) 11 +(34, 86, -1) 11 +(34, 87, -1) 10 +(34, 88, -1) 9 +(34, 89, -1) 8 +(34, 90, -1) 7 +(34, 91, -1) 6 +(34, 92, -1) 5 +(34, 93, -1) 4 +(34, 94, -1) 3 +(34, 95, -1) 2 +(35, 6, -1) 3 +(35, 7, -1) 4 +(35, 8, -1) 5 +(35, 9, -1) 6 +(35, 10, -1) 6 +(35, 11, -1) 7 +(35, 12, -1) 8 +(35, 13, -1) 9 +(35, 14, -1) 10 +(35, 15, -1) 11 +(35, 16, -1) 12 +(35, 17, -1) 13 +(35, 18, -1) 14 +(35, 19, -1) 15 +(35, 20, -1) 16 +(35, 21, -1) 16 +(35, 22, -1) 17 +(35, 23, -1) 18 +(35, 24, -1) 19 +(35, 25, -1) 20 +(35, 26, -1) 21 +(35, 27, -1) 21 +(35, 28, -1) 22 +(35, 29, -1) 23 +(35, 30, -1) 24 +(35, 31, -1) 25 +(35, 32, -1) 25 +(35, 33, -1) 26 +(35, 34, -1) 27 +(35, 35, -1) 28 +(35, 36, -1) 28 +(35, 37, -1) 29 +(35, 38, -1) 30 +(35, 39, -1) 30 +(35, 40, -1) 31 +(35, 41, -1) 31 +(35, 42, -1) 32 +(35, 43, -1) 32 +(35, 44, -1) 33 +(35, 45, -1) 33 +(35, 46, -1) 33 +(35, 47, -1) 34 +(35, 48, -1) 34 +(35, 49, -1) 34 +(35, 50, -1) 34 +(35, 51, -1) 34 +(35, 52, -1) 34 +(35, 53, -1) 34 +(35, 54, -1) 34 +(35, 55, -1) 33 +(35, 56, -1) 33 +(35, 57, -1) 33 +(35, 58, -1) 32 +(35, 59, -1) 32 +(35, 60, -1) 31 +(35, 61, -1) 31 +(35, 62, -1) 30 +(35, 63, -1) 30 +(35, 64, -1) 29 +(35, 65, -1) 28 +(35, 66, -1) 28 +(35, 67, -1) 27 +(35, 68, -1) 26 +(35, 69, -1) 25 +(35, 70, -1) 25 +(35, 71, -1) 24 +(35, 72, -1) 23 +(35, 73, -1) 22 +(35, 74, -1) 21 +(35, 75, -1) 21 +(35, 76, -1) 20 +(35, 77, -1) 19 +(35, 78, -1) 18 +(35, 79, -1) 17 +(35, 80, -1) 16 +(35, 81, -1) 16 +(35, 82, -1) 15 +(35, 83, -1) 14 +(35, 84, -1) 13 +(35, 85, -1) 12 +(35, 86, -1) 11 +(35, 87, -1) 10 +(35, 88, -1) 9 +(35, 89, -1) 8 +(35, 90, -1) 7 +(35, 91, -1) 6 +(35, 92, -1) 6 +(35, 93, -1) 5 +(35, 94, -1) 4 +(35, 95, -1) 3 +(36, 4, -1) 1 +(36, 5, -1) 2 +(36, 6, -1) 3 +(36, 7, -1) 4 +(36, 8, -1) 5 +(36, 9, -1) 6 +(36, 10, -1) 7 +(36, 11, -1) 8 +(36, 12, -1) 8 +(36, 13, -1) 9 +(36, 14, -1) 10 +(36, 15, -1) 11 +(36, 16, -1) 12 +(36, 17, -1) 13 +(36, 18, -1) 14 +(36, 19, -1) 15 +(36, 20, -1) 16 +(36, 21, -1) 17 +(36, 22, -1) 18 +(36, 23, -1) 19 +(36, 24, -1) 19 +(36, 25, -1) 20 +(36, 26, -1) 21 +(36, 27, -1) 22 +(36, 28, -1) 23 +(36, 29, -1) 24 +(36, 30, -1) 24 +(36, 31, -1) 25 +(36, 32, -1) 26 +(36, 33, -1) 27 +(36, 34, -1) 28 +(36, 35, -1) 28 +(36, 36, -1) 29 +(36, 37, -1) 30 +(36, 38, -1) 30 +(36, 39, -1) 31 +(36, 40, -1) 32 +(36, 41, -1) 32 +(36, 42, -1) 33 +(36, 43, -1) 33 +(36, 44, -1) 34 +(36, 45, -1) 34 +(36, 46, -1) 34 +(36, 47, -1) 35 +(36, 48, -1) 35 +(36, 49, -1) 35 +(36, 50, -1) 35 +(36, 51, -1) 35 +(36, 52, -1) 35 +(36, 53, -1) 35 +(36, 54, -1) 35 +(36, 55, -1) 34 +(36, 56, -1) 34 +(36, 57, -1) 34 +(36, 58, -1) 33 +(36, 59, -1) 33 +(36, 60, -1) 32 +(36, 61, -1) 32 +(36, 62, -1) 31 +(36, 63, -1) 30 +(36, 64, -1) 30 +(36, 65, -1) 29 +(36, 66, -1) 28 +(36, 67, -1) 28 +(36, 68, -1) 27 +(36, 69, -1) 26 +(36, 70, -1) 25 +(36, 71, -1) 24 +(36, 72, -1) 24 +(36, 73, -1) 23 +(36, 74, -1) 22 +(36, 75, -1) 21 +(36, 76, -1) 20 +(36, 77, -1) 19 +(36, 78, -1) 19 +(36, 79, -1) 18 +(36, 80, -1) 17 +(36, 81, -1) 16 +(36, 82, -1) 15 +(36, 83, -1) 14 +(36, 84, -1) 13 +(36, 85, -1) 12 +(36, 86, -1) 11 +(36, 87, -1) 10 +(36, 88, -1) 9 +(36, 89, -1) 8 +(36, 90, -1) 8 +(36, 91, -1) 7 +(36, 92, -1) 6 +(36, 93, -1) 5 +(36, 94, -1) 4 +(36, 95, -1) 3 +(36, 96, -1) 2 +(36, 97, -1) 1 +(37, 4, -1) 1 +(37, 5, -1) 2 +(37, 6, -1) 3 +(37, 7, -1) 4 +(37, 8, -1) 5 +(37, 9, -1) 6 +(37, 10, -1) 7 +(37, 11, -1) 8 +(37, 12, -1) 9 +(37, 13, -1) 10 +(37, 14, -1) 11 +(37, 15, -1) 12 +(37, 16, -1) 13 +(37, 17, -1) 14 +(37, 18, -1) 14 +(37, 19, -1) 15 +(37, 20, -1) 16 +(37, 21, -1) 17 +(37, 22, -1) 18 +(37, 23, -1) 19 +(37, 24, -1) 20 +(37, 25, -1) 21 +(37, 26, -1) 22 +(37, 27, -1) 22 +(37, 28, -1) 23 +(37, 29, -1) 24 +(37, 30, -1) 25 +(37, 31, -1) 26 +(37, 32, -1) 27 +(37, 33, -1) 27 +(37, 34, -1) 28 +(37, 35, -1) 29 +(37, 36, -1) 30 +(37, 37, -1) 30 +(37, 38, -1) 31 +(37, 39, -1) 32 +(37, 40, -1) 32 +(37, 41, -1) 33 +(37, 42, -1) 34 +(37, 43, -1) 34 +(37, 44, -1) 35 +(37, 45, -1) 35 +(37, 46, -1) 35 +(37, 47, -1) 36 +(37, 48, -1) 36 +(37, 49, -1) 36 +(37, 50, -1) 36 +(37, 51, -1) 36 +(37, 52, -1) 36 +(37, 53, -1) 36 +(37, 54, -1) 36 +(37, 55, -1) 35 +(37, 56, -1) 35 +(37, 57, -1) 35 +(37, 58, -1) 34 +(37, 59, -1) 34 +(37, 60, -1) 33 +(37, 61, -1) 32 +(37, 62, -1) 32 +(37, 63, -1) 31 +(37, 64, -1) 30 +(37, 65, -1) 30 +(37, 66, -1) 29 +(37, 67, -1) 28 +(37, 68, -1) 27 +(37, 69, -1) 27 +(37, 70, -1) 26 +(37, 71, -1) 25 +(37, 72, -1) 24 +(37, 73, -1) 23 +(37, 74, -1) 22 +(37, 75, -1) 22 +(37, 76, -1) 21 +(37, 77, -1) 20 +(37, 78, -1) 19 +(37, 79, -1) 18 +(37, 80, -1) 17 +(37, 81, -1) 16 +(37, 82, -1) 15 +(37, 83, -1) 14 +(37, 84, -1) 14 +(37, 85, -1) 13 +(37, 86, -1) 12 +(37, 87, -1) 11 +(37, 88, -1) 10 +(37, 89, -1) 9 +(37, 90, -1) 8 +(37, 91, -1) 7 +(37, 92, -1) 6 +(37, 93, -1) 5 +(37, 94, -1) 4 +(37, 95, -1) 3 +(37, 96, -1) 2 +(37, 97, -1) 1 +(38, 4, -1) 2 +(38, 5, -1) 3 +(38, 6, -1) 3 +(38, 7, -1) 4 +(38, 8, -1) 5 +(38, 9, -1) 6 +(38, 10, -1) 7 +(38, 11, -1) 8 +(38, 12, -1) 9 +(38, 13, -1) 10 +(38, 14, -1) 11 +(38, 15, -1) 12 +(38, 16, -1) 13 +(38, 17, -1) 14 +(38, 18, -1) 15 +(38, 19, -1) 16 +(38, 20, -1) 17 +(38, 21, -1) 18 +(38, 22, -1) 18 +(38, 23, -1) 19 +(38, 24, -1) 20 +(38, 25, -1) 21 +(38, 26, -1) 22 +(38, 27, -1) 23 +(38, 28, -1) 24 +(38, 29, -1) 25 +(38, 30, -1) 26 +(38, 31, -1) 26 +(38, 32, -1) 27 +(38, 33, -1) 28 +(38, 34, -1) 29 +(38, 35, -1) 30 +(38, 36, -1) 30 +(38, 37, -1) 31 +(38, 38, -1) 32 +(38, 39, -1) 33 +(38, 40, -1) 33 +(38, 41, -1) 34 +(38, 42, -1) 34 +(38, 43, -1) 35 +(38, 44, -1) 35 +(38, 45, -1) 36 +(38, 46, -1) 36 +(38, 47, -1) 37 +(38, 48, -1) 37 +(38, 49, -1) 37 +(38, 50, -1) 37 +(38, 51, -1) 37 +(38, 52, -1) 37 +(38, 53, -1) 37 +(38, 54, -1) 37 +(38, 55, -1) 36 +(38, 56, -1) 36 +(38, 57, -1) 35 +(38, 58, -1) 35 +(38, 59, -1) 34 +(38, 60, -1) 34 +(38, 61, -1) 33 +(38, 62, -1) 33 +(38, 63, -1) 32 +(38, 64, -1) 31 +(38, 65, -1) 30 +(38, 66, -1) 30 +(38, 67, -1) 29 +(38, 68, -1) 28 +(38, 69, -1) 27 +(38, 70, -1) 26 +(38, 71, -1) 26 +(38, 72, -1) 25 +(38, 73, -1) 24 +(38, 74, -1) 23 +(38, 75, -1) 22 +(38, 76, -1) 21 +(38, 77, -1) 20 +(38, 78, -1) 19 +(38, 79, -1) 18 +(38, 80, -1) 18 +(38, 81, -1) 17 +(38, 82, -1) 16 +(38, 83, -1) 15 +(38, 84, -1) 14 +(38, 85, -1) 13 +(38, 86, -1) 12 +(38, 87, -1) 11 +(38, 88, -1) 10 +(38, 89, -1) 9 +(38, 90, -1) 8 +(38, 91, -1) 7 +(38, 92, -1) 6 +(38, 93, -1) 5 +(38, 94, -1) 4 +(38, 95, -1) 3 +(38, 96, -1) 3 +(38, 97, -1) 2 +(39, 4, -1) 2 +(39, 5, -1) 3 +(39, 6, -1) 4 +(39, 7, -1) 5 +(39, 8, -1) 6 +(39, 9, -1) 7 +(39, 10, -1) 8 +(39, 11, -1) 9 +(39, 12, -1) 9 +(39, 13, -1) 10 +(39, 14, -1) 11 +(39, 15, -1) 12 +(39, 16, -1) 13 +(39, 17, -1) 14 +(39, 18, -1) 15 +(39, 19, -1) 16 +(39, 20, -1) 17 +(39, 21, -1) 18 +(39, 22, -1) 19 +(39, 23, -1) 20 +(39, 24, -1) 21 +(39, 25, -1) 22 +(39, 26, -1) 23 +(39, 27, -1) 23 +(39, 28, -1) 24 +(39, 29, -1) 25 +(39, 30, -1) 26 +(39, 31, -1) 27 +(39, 32, -1) 28 +(39, 33, -1) 29 +(39, 34, -1) 29 +(39, 35, -1) 30 +(39, 36, -1) 31 +(39, 37, -1) 32 +(39, 38, -1) 33 +(39, 39, -1) 33 +(39, 40, -1) 34 +(39, 41, -1) 35 +(39, 42, -1) 35 +(39, 43, -1) 36 +(39, 44, -1) 36 +(39, 45, -1) 37 +(39, 46, -1) 37 +(39, 47, -1) 37 +(39, 48, -1) 38 +(39, 49, -1) 38 +(39, 50, -1) 38 +(39, 51, -1) 38 +(39, 52, -1) 38 +(39, 53, -1) 38 +(39, 54, -1) 37 +(39, 55, -1) 37 +(39, 56, -1) 37 +(39, 57, -1) 36 +(39, 58, -1) 36 +(39, 59, -1) 35 +(39, 60, -1) 35 +(39, 61, -1) 34 +(39, 62, -1) 33 +(39, 63, -1) 33 +(39, 64, -1) 32 +(39, 65, -1) 31 +(39, 66, -1) 30 +(39, 67, -1) 29 +(39, 68, -1) 29 +(39, 69, -1) 28 +(39, 70, -1) 27 +(39, 71, -1) 26 +(39, 72, -1) 25 +(39, 73, -1) 24 +(39, 74, -1) 23 +(39, 75, -1) 23 +(39, 76, -1) 22 +(39, 77, -1) 21 +(39, 78, -1) 20 +(39, 79, -1) 19 +(39, 80, -1) 18 +(39, 81, -1) 17 +(39, 82, -1) 16 +(39, 83, -1) 15 +(39, 84, -1) 14 +(39, 85, -1) 13 +(39, 86, -1) 12 +(39, 87, -1) 11 +(39, 88, -1) 10 +(39, 89, -1) 9 +(39, 90, -1) 9 +(39, 91, -1) 8 +(39, 92, -1) 7 +(39, 93, -1) 6 +(39, 94, -1) 5 +(39, 95, -1) 4 +(39, 96, -1) 3 +(39, 97, -1) 2 +(40, 4, -1) 2 +(40, 5, -1) 3 +(40, 6, -1) 4 +(40, 7, -1) 5 +(40, 8, -1) 6 +(40, 9, -1) 7 +(40, 10, -1) 8 +(40, 11, -1) 9 +(40, 12, -1) 10 +(40, 13, -1) 11 +(40, 14, -1) 12 +(40, 15, -1) 13 +(40, 16, -1) 14 +(40, 17, -1) 15 +(40, 18, -1) 16 +(40, 19, -1) 16 +(40, 20, -1) 17 +(40, 21, -1) 18 +(40, 22, -1) 19 +(40, 23, -1) 20 +(40, 24, -1) 21 +(40, 25, -1) 22 +(40, 26, -1) 23 +(40, 27, -1) 24 +(40, 28, -1) 25 +(40, 29, -1) 26 +(40, 30, -1) 27 +(40, 31, -1) 27 +(40, 32, -1) 28 +(40, 33, -1) 29 +(40, 34, -1) 30 +(40, 35, -1) 31 +(40, 36, -1) 32 +(40, 37, -1) 32 +(40, 38, -1) 33 +(40, 39, -1) 34 +(40, 40, -1) 35 +(40, 41, -1) 35 +(40, 42, -1) 36 +(40, 43, -1) 37 +(40, 44, -1) 37 +(40, 45, -1) 38 +(40, 56, -1) 38 +(40, 57, -1) 37 +(40, 58, -1) 37 +(40, 59, -1) 36 +(40, 60, -1) 35 +(40, 61, -1) 35 +(40, 62, -1) 34 +(40, 63, -1) 33 +(40, 64, -1) 32 +(40, 65, -1) 32 +(40, 66, -1) 31 +(40, 67, -1) 30 +(40, 68, -1) 29 +(40, 69, -1) 28 +(40, 70, -1) 27 +(40, 71, -1) 27 +(40, 72, -1) 26 +(40, 73, -1) 25 +(40, 74, -1) 24 +(40, 75, -1) 23 +(40, 76, -1) 22 +(40, 77, -1) 21 +(40, 78, -1) 20 +(40, 79, -1) 19 +(40, 80, -1) 18 +(40, 81, -1) 17 +(40, 82, -1) 16 +(40, 83, -1) 16 +(40, 84, -1) 15 +(40, 85, -1) 14 +(40, 86, -1) 13 +(40, 87, -1) 12 +(40, 88, -1) 11 +(40, 89, -1) 10 +(40, 90, -1) 9 +(40, 91, -1) 8 +(40, 92, -1) 7 +(40, 93, -1) 6 +(40, 94, -1) 5 +(40, 95, -1) 4 +(40, 96, -1) 3 +(40, 97, -1) 2 +(41, 1, -1) 0 +(41, 2, -1) 0 +(41, 3, -1) 1 +(41, 4, -1) 2 +(41, 5, -1) 3 +(41, 6, -1) 4 +(41, 7, -1) 5 +(41, 8, -1) 6 +(41, 9, -1) 7 +(41, 10, -1) 8 +(41, 11, -1) 9 +(41, 12, -1) 10 +(41, 13, -1) 11 +(41, 14, -1) 12 +(41, 15, -1) 13 +(41, 16, -1) 14 +(41, 17, -1) 15 +(41, 18, -1) 16 +(41, 19, -1) 17 +(41, 20, -1) 18 +(41, 21, -1) 19 +(41, 22, -1) 20 +(41, 23, -1) 20 +(41, 24, -1) 21 +(41, 25, -1) 22 +(41, 26, -1) 23 +(41, 27, -1) 24 +(41, 28, -1) 25 +(41, 29, -1) 26 +(41, 30, -1) 27 +(41, 31, -1) 28 +(41, 32, -1) 29 +(41, 33, -1) 30 +(41, 34, -1) 30 +(41, 35, -1) 31 +(41, 36, -1) 32 +(41, 37, -1) 33 +(41, 38, -1) 34 +(41, 39, -1) 35 +(41, 40, -1) 35 +(41, 41, -1) 36 +(41, 42, -1) 37 +(41, 43, -1) 37 +(41, 58, -1) 37 +(41, 59, -1) 37 +(41, 60, -1) 36 +(41, 61, -1) 35 +(41, 62, -1) 35 +(41, 63, -1) 34 +(41, 64, -1) 33 +(41, 65, -1) 32 +(41, 66, -1) 31 +(41, 67, -1) 30 +(41, 68, -1) 30 +(41, 69, -1) 29 +(41, 70, -1) 28 +(41, 71, -1) 27 +(41, 72, -1) 26 +(41, 73, -1) 25 +(41, 74, -1) 24 +(41, 75, -1) 23 +(41, 76, -1) 22 +(41, 77, -1) 21 +(41, 78, -1) 20 +(41, 79, -1) 20 +(41, 80, -1) 19 +(41, 81, -1) 18 +(41, 82, -1) 17 +(41, 83, -1) 16 +(41, 84, -1) 15 +(41, 85, -1) 14 +(41, 86, -1) 13 +(41, 87, -1) 12 +(41, 88, -1) 11 +(41, 89, -1) 10 +(41, 90, -1) 9 +(41, 91, -1) 8 +(41, 92, -1) 7 +(41, 93, -1) 6 +(41, 94, -1) 5 +(41, 95, -1) 4 +(41, 96, -1) 3 +(41, 97, -1) 2 +(41, 98, -1) 1 +(41, 99, -1) 0 +(41, 100, -1) 0 +(42, 1, -1) 0 +(42, 2, -1) 0 +(42, 3, -1) 1 +(42, 4, -1) 2 +(42, 5, -1) 3 +(42, 6, -1) 4 +(42, 7, -1) 5 +(42, 8, -1) 6 +(42, 9, -1) 7 +(42, 10, -1) 8 +(42, 11, -1) 9 +(42, 12, -1) 10 +(42, 13, -1) 11 +(42, 14, -1) 12 +(42, 15, -1) 13 +(42, 16, -1) 14 +(42, 17, -1) 15 +(42, 18, -1) 16 +(42, 19, -1) 17 +(42, 20, -1) 18 +(42, 21, -1) 19 +(42, 22, -1) 20 +(42, 23, -1) 21 +(42, 24, -1) 22 +(42, 25, -1) 23 +(42, 26, -1) 24 +(42, 27, -1) 25 +(42, 28, -1) 25 +(42, 29, -1) 26 +(42, 30, -1) 27 +(42, 31, -1) 28 +(42, 32, -1) 29 +(42, 33, -1) 30 +(42, 34, -1) 31 +(42, 35, -1) 32 +(42, 36, -1) 33 +(42, 37, -1) 34 +(42, 38, -1) 34 +(42, 39, -1) 35 +(42, 40, -1) 36 +(42, 41, -1) 37 +(42, 42, -1) 38 +(42, 59, -1) 38 +(42, 60, -1) 37 +(42, 61, -1) 36 +(42, 62, -1) 35 +(42, 63, -1) 34 +(42, 64, -1) 34 +(42, 65, -1) 33 +(42, 66, -1) 32 +(42, 67, -1) 31 +(42, 68, -1) 30 +(42, 69, -1) 29 +(42, 70, -1) 28 +(42, 71, -1) 27 +(42, 72, -1) 26 +(42, 73, -1) 25 +(42, 74, -1) 25 +(42, 75, -1) 24 +(42, 76, -1) 23 +(42, 77, -1) 22 +(42, 78, -1) 21 +(42, 79, -1) 20 +(42, 80, -1) 19 +(42, 81, -1) 18 +(42, 82, -1) 17 +(42, 83, -1) 16 +(42, 84, -1) 15 +(42, 85, -1) 14 +(42, 86, -1) 13 +(42, 87, -1) 12 +(42, 88, -1) 11 +(42, 89, -1) 10 +(42, 90, -1) 9 +(42, 91, -1) 8 +(42, 92, -1) 7 +(42, 93, -1) 6 +(42, 94, -1) 5 +(42, 95, -1) 4 +(42, 96, -1) 3 +(42, 97, -1) 2 +(42, 98, -1) 1 +(42, 99, -1) 0 +(42, 100, -1) 0 +(43, 1, -1) 0 +(43, 2, -1) 1 +(43, 3, -1) 2 +(43, 4, -1) 3 +(43, 5, -1) 4 +(43, 6, -1) 4 +(43, 7, -1) 5 +(43, 8, -1) 6 +(43, 9, -1) 7 +(43, 10, -1) 8 +(43, 11, -1) 9 +(43, 12, -1) 10 +(43, 13, -1) 11 +(43, 14, -1) 12 +(43, 15, -1) 13 +(43, 16, -1) 14 +(43, 17, -1) 15 +(43, 18, -1) 16 +(43, 19, -1) 17 +(43, 20, -1) 18 +(43, 21, -1) 19 +(43, 22, -1) 20 +(43, 23, -1) 21 +(43, 24, -1) 22 +(43, 25, -1) 23 +(43, 26, -1) 24 +(43, 27, -1) 25 +(43, 28, -1) 26 +(43, 29, -1) 27 +(43, 30, -1) 28 +(43, 31, -1) 29 +(43, 32, -1) 30 +(43, 33, -1) 30 +(43, 34, -1) 31 +(43, 35, -1) 32 +(43, 36, -1) 33 +(43, 37, -1) 34 +(43, 38, -1) 35 +(43, 39, -1) 36 +(43, 40, -1) 37 +(43, 41, -1) 37 +(43, 60, -1) 37 +(43, 61, -1) 37 +(43, 62, -1) 36 +(43, 63, -1) 35 +(43, 64, -1) 34 +(43, 65, -1) 33 +(43, 66, -1) 32 +(43, 67, -1) 31 +(43, 68, -1) 30 +(43, 69, -1) 30 +(43, 70, -1) 29 +(43, 71, -1) 28 +(43, 72, -1) 27 +(43, 73, -1) 26 +(43, 74, -1) 25 +(43, 75, -1) 24 +(43, 76, -1) 23 +(43, 77, -1) 22 +(43, 78, -1) 21 +(43, 79, -1) 20 +(43, 80, -1) 19 +(43, 81, -1) 18 +(43, 82, -1) 17 +(43, 83, -1) 16 +(43, 84, -1) 15 +(43, 85, -1) 14 +(43, 86, -1) 13 +(43, 87, -1) 12 +(43, 88, -1) 11 +(43, 89, -1) 10 +(43, 90, -1) 9 +(43, 91, -1) 8 +(43, 92, -1) 7 +(43, 93, -1) 6 +(43, 94, -1) 5 +(43, 95, -1) 4 +(43, 96, -1) 4 +(43, 97, -1) 3 +(43, 98, -1) 2 +(43, 99, -1) 1 +(43, 100, -1) 0 +(44, 1, -1) 0 +(44, 2, -1) 1 +(44, 3, -1) 2 +(44, 4, -1) 3 +(44, 5, -1) 4 +(44, 6, -1) 5 +(44, 7, -1) 6 +(44, 8, -1) 7 +(44, 9, -1) 8 +(44, 10, -1) 9 +(44, 11, -1) 10 +(44, 12, -1) 11 +(44, 13, -1) 12 +(44, 14, -1) 13 +(44, 15, -1) 14 +(44, 16, -1) 14 +(44, 17, -1) 15 +(44, 18, -1) 16 +(44, 19, -1) 17 +(44, 20, -1) 18 +(44, 21, -1) 19 +(44, 22, -1) 20 +(44, 23, -1) 21 +(44, 24, -1) 22 +(44, 25, -1) 23 +(44, 26, -1) 24 +(44, 27, -1) 25 +(44, 28, -1) 26 +(44, 29, -1) 27 +(44, 30, -1) 28 +(44, 31, -1) 29 +(44, 32, -1) 30 +(44, 33, -1) 31 +(44, 34, -1) 32 +(44, 35, -1) 33 +(44, 36, -1) 34 +(44, 37, -1) 35 +(44, 38, -1) 35 +(44, 39, -1) 36 +(44, 40, -1) 37 +(44, 61, -1) 37 +(44, 62, -1) 36 +(44, 63, -1) 35 +(44, 64, -1) 35 +(44, 65, -1) 34 +(44, 66, -1) 33 +(44, 67, -1) 32 +(44, 68, -1) 31 +(44, 69, -1) 30 +(44, 70, -1) 29 +(44, 71, -1) 28 +(44, 72, -1) 27 +(44, 73, -1) 26 +(44, 74, -1) 25 +(44, 75, -1) 24 +(44, 76, -1) 23 +(44, 77, -1) 22 +(44, 78, -1) 21 +(44, 79, -1) 20 +(44, 80, -1) 19 +(44, 81, -1) 18 +(44, 82, -1) 17 +(44, 83, -1) 16 +(44, 84, -1) 15 +(44, 85, -1) 14 +(44, 86, -1) 14 +(44, 87, -1) 13 +(44, 88, -1) 12 +(44, 89, -1) 11 +(44, 90, -1) 10 +(44, 91, -1) 9 +(44, 92, -1) 8 +(44, 93, -1) 7 +(44, 94, -1) 6 +(44, 95, -1) 5 +(44, 96, -1) 4 +(44, 97, -1) 3 +(44, 98, -1) 2 +(44, 99, -1) 1 +(44, 100, -1) 0 +(45, 1, -1) 0 +(45, 2, -1) 1 +(45, 3, -1) 2 +(45, 4, -1) 3 +(45, 5, -1) 4 +(45, 6, -1) 5 +(45, 7, -1) 6 +(45, 8, -1) 7 +(45, 9, -1) 8 +(45, 10, -1) 9 +(45, 11, -1) 10 +(45, 12, -1) 11 +(45, 13, -1) 12 +(45, 14, -1) 13 +(45, 15, -1) 14 +(45, 16, -1) 15 +(45, 17, -1) 16 +(45, 18, -1) 17 +(45, 19, -1) 18 +(45, 20, -1) 19 +(45, 21, -1) 20 +(45, 22, -1) 21 +(45, 23, -1) 22 +(45, 24, -1) 23 +(45, 25, -1) 23 +(45, 26, -1) 24 +(45, 27, -1) 25 +(45, 28, -1) 26 +(45, 29, -1) 27 +(45, 30, -1) 28 +(45, 31, -1) 29 +(45, 32, -1) 30 +(45, 33, -1) 31 +(45, 34, -1) 32 +(45, 35, -1) 33 +(45, 36, -1) 34 +(45, 37, -1) 35 +(45, 38, -1) 36 +(45, 39, -1) 37 +(45, 40, -1) 38 +(45, 61, -1) 38 +(45, 62, -1) 37 +(45, 63, -1) 36 +(45, 64, -1) 35 +(45, 65, -1) 34 +(45, 66, -1) 33 +(45, 67, -1) 32 +(45, 68, -1) 31 +(45, 69, -1) 30 +(45, 70, -1) 29 +(45, 71, -1) 28 +(45, 72, -1) 27 +(45, 73, -1) 26 +(45, 74, -1) 25 +(45, 75, -1) 24 +(45, 76, -1) 23 +(45, 77, -1) 23 +(45, 78, -1) 22 +(45, 79, -1) 21 +(45, 80, -1) 20 +(45, 81, -1) 19 +(45, 82, -1) 18 +(45, 83, -1) 17 +(45, 84, -1) 16 +(45, 85, -1) 15 +(45, 86, -1) 14 +(45, 87, -1) 13 +(45, 88, -1) 12 +(45, 89, -1) 11 +(45, 90, -1) 10 +(45, 91, -1) 9 +(45, 92, -1) 8 +(45, 93, -1) 7 +(45, 94, -1) 6 +(45, 95, -1) 5 +(45, 96, -1) 4 +(45, 97, -1) 3 +(45, 98, -1) 2 +(45, 99, -1) 1 +(45, 100, -1) 0 +(46, 1, -1) 0 +(46, 2, -1) 1 +(46, 3, -1) 2 +(46, 4, -1) 3 +(46, 5, -1) 4 +(46, 6, -1) 5 +(46, 7, -1) 6 +(46, 8, -1) 7 +(46, 9, -1) 8 +(46, 10, -1) 9 +(46, 11, -1) 10 +(46, 12, -1) 11 +(46, 13, -1) 12 +(46, 14, -1) 13 +(46, 15, -1) 14 +(46, 16, -1) 15 +(46, 17, -1) 16 +(46, 18, -1) 17 +(46, 19, -1) 18 +(46, 20, -1) 19 +(46, 21, -1) 20 +(46, 22, -1) 21 +(46, 23, -1) 22 +(46, 24, -1) 23 +(46, 25, -1) 24 +(46, 26, -1) 25 +(46, 27, -1) 26 +(46, 28, -1) 27 +(46, 29, -1) 28 +(46, 30, -1) 29 +(46, 31, -1) 30 +(46, 32, -1) 30 +(46, 33, -1) 31 +(46, 34, -1) 32 +(46, 35, -1) 33 +(46, 36, -1) 34 +(46, 37, -1) 35 +(46, 38, -1) 36 +(46, 39, -1) 37 +(46, 62, -1) 37 +(46, 63, -1) 36 +(46, 64, -1) 35 +(46, 65, -1) 34 +(46, 66, -1) 33 +(46, 67, -1) 32 +(46, 68, -1) 31 +(46, 69, -1) 30 +(46, 70, -1) 30 +(46, 71, -1) 29 +(46, 72, -1) 28 +(46, 73, -1) 27 +(46, 74, -1) 26 +(46, 75, -1) 25 +(46, 76, -1) 24 +(46, 77, -1) 23 +(46, 78, -1) 22 +(46, 79, -1) 21 +(46, 80, -1) 20 +(46, 81, -1) 19 +(46, 82, -1) 18 +(46, 83, -1) 17 +(46, 84, -1) 16 +(46, 85, -1) 15 +(46, 86, -1) 14 +(46, 87, -1) 13 +(46, 88, -1) 12 +(46, 89, -1) 11 +(46, 90, -1) 10 +(46, 91, -1) 9 +(46, 92, -1) 8 +(46, 93, -1) 7 +(46, 94, -1) 6 +(46, 95, -1) 5 +(46, 96, -1) 4 +(46, 97, -1) 3 +(46, 98, -1) 2 +(46, 99, -1) 1 +(46, 100, -1) 0 +(47, 1, -1) 0 +(47, 2, -1) 1 +(47, 3, -1) 2 +(47, 4, -1) 3 +(47, 5, -1) 4 +(47, 6, -1) 5 +(47, 7, -1) 6 +(47, 8, -1) 7 +(47, 9, -1) 8 +(47, 10, -1) 9 +(47, 11, -1) 10 +(47, 12, -1) 11 +(47, 13, -1) 12 +(47, 14, -1) 13 +(47, 15, -1) 14 +(47, 16, -1) 15 +(47, 17, -1) 16 +(47, 18, -1) 17 +(47, 19, -1) 18 +(47, 20, -1) 19 +(47, 21, -1) 20 +(47, 22, -1) 21 +(47, 23, -1) 22 +(47, 24, -1) 23 +(47, 25, -1) 24 +(47, 26, -1) 25 +(47, 27, -1) 26 +(47, 28, -1) 27 +(47, 29, -1) 28 +(47, 30, -1) 29 +(47, 31, -1) 30 +(47, 32, -1) 31 +(47, 33, -1) 32 +(47, 34, -1) 33 +(47, 35, -1) 34 +(47, 36, -1) 35 +(47, 37, -1) 36 +(47, 38, -1) 37 +(47, 39, -1) 38 +(47, 62, -1) 38 +(47, 63, -1) 37 +(47, 64, -1) 36 +(47, 65, -1) 35 +(47, 66, -1) 34 +(47, 67, -1) 33 +(47, 68, -1) 32 +(47, 69, -1) 31 +(47, 70, -1) 30 +(47, 71, -1) 29 +(47, 72, -1) 28 +(47, 73, -1) 27 +(47, 74, -1) 26 +(47, 75, -1) 25 +(47, 76, -1) 24 +(47, 77, -1) 23 +(47, 78, -1) 22 +(47, 79, -1) 21 +(47, 80, -1) 20 +(47, 81, -1) 19 +(47, 82, -1) 18 +(47, 83, -1) 17 +(47, 84, -1) 16 +(47, 85, -1) 15 +(47, 86, -1) 14 +(47, 87, -1) 13 +(47, 88, -1) 12 +(47, 89, -1) 11 +(47, 90, -1) 10 +(47, 91, -1) 9 +(47, 92, -1) 8 +(47, 93, -1) 7 +(47, 94, -1) 6 +(47, 95, -1) 5 +(47, 96, -1) 4 +(47, 97, -1) 3 +(47, 98, -1) 2 +(47, 99, -1) 1 +(47, 100, -1) 0 +(48, 1, -1) 0 +(48, 2, -1) 1 +(48, 3, -1) 2 +(48, 4, -1) 3 +(48, 5, -1) 4 +(48, 6, -1) 5 +(48, 7, -1) 6 +(48, 8, -1) 7 +(48, 9, -1) 8 +(48, 10, -1) 9 +(48, 11, -1) 10 +(48, 12, -1) 11 +(48, 13, -1) 12 +(48, 14, -1) 13 +(48, 15, -1) 14 +(48, 16, -1) 15 +(48, 17, -1) 16 +(48, 18, -1) 17 +(48, 19, -1) 18 +(48, 20, -1) 19 +(48, 21, -1) 20 +(48, 22, -1) 21 +(48, 23, -1) 22 +(48, 24, -1) 23 +(48, 25, -1) 24 +(48, 26, -1) 25 +(48, 27, -1) 26 +(48, 28, -1) 27 +(48, 29, -1) 28 +(48, 30, -1) 29 +(48, 31, -1) 30 +(48, 32, -1) 31 +(48, 33, -1) 32 +(48, 34, -1) 33 +(48, 35, -1) 34 +(48, 36, -1) 35 +(48, 37, -1) 36 +(48, 38, -1) 37 +(48, 39, -1) 38 +(48, 62, -1) 38 +(48, 63, -1) 37 +(48, 64, -1) 36 +(48, 65, -1) 35 +(48, 66, -1) 34 +(48, 67, -1) 33 +(48, 68, -1) 32 +(48, 69, -1) 31 +(48, 70, -1) 30 +(48, 71, -1) 29 +(48, 72, -1) 28 +(48, 73, -1) 27 +(48, 74, -1) 26 +(48, 75, -1) 25 +(48, 76, -1) 24 +(48, 77, -1) 23 +(48, 78, -1) 22 +(48, 79, -1) 21 +(48, 80, -1) 20 +(48, 81, -1) 19 +(48, 82, -1) 18 +(48, 83, -1) 17 +(48, 84, -1) 16 +(48, 85, -1) 15 +(48, 86, -1) 14 +(48, 87, -1) 13 +(48, 88, -1) 12 +(48, 89, -1) 11 +(48, 90, -1) 10 +(48, 91, -1) 9 +(48, 92, -1) 8 +(48, 93, -1) 7 +(48, 94, -1) 6 +(48, 95, -1) 5 +(48, 96, -1) 4 +(48, 97, -1) 3 +(48, 98, -1) 2 +(48, 99, -1) 1 +(48, 100, -1) 0 +(49, 1, -1) 0 +(49, 2, -1) 1 +(49, 3, -1) 2 +(49, 4, -1) 3 +(49, 5, -1) 4 +(49, 6, -1) 5 +(49, 7, -1) 6 +(49, 8, -1) 7 +(49, 9, -1) 8 +(49, 10, -1) 9 +(49, 11, -1) 10 +(49, 12, -1) 11 +(49, 13, -1) 12 +(49, 14, -1) 13 +(49, 15, -1) 14 +(49, 16, -1) 15 +(49, 17, -1) 16 +(49, 18, -1) 17 +(49, 19, -1) 18 +(49, 20, -1) 19 +(49, 21, -1) 20 +(49, 22, -1) 21 +(49, 23, -1) 22 +(49, 24, -1) 23 +(49, 25, -1) 24 +(49, 26, -1) 25 +(49, 27, -1) 26 +(49, 28, -1) 27 +(49, 29, -1) 28 +(49, 30, -1) 29 +(49, 31, -1) 30 +(49, 32, -1) 31 +(49, 33, -1) 32 +(49, 34, -1) 33 +(49, 35, -1) 34 +(49, 36, -1) 35 +(49, 37, -1) 36 +(49, 38, -1) 37 +(49, 39, -1) 38 +(49, 62, -1) 38 +(49, 63, -1) 37 +(49, 64, -1) 36 +(49, 65, -1) 35 +(49, 66, -1) 34 +(49, 67, -1) 33 +(49, 68, -1) 32 +(49, 69, -1) 31 +(49, 70, -1) 30 +(49, 71, -1) 29 +(49, 72, -1) 28 +(49, 73, -1) 27 +(49, 74, -1) 26 +(49, 75, -1) 25 +(49, 76, -1) 24 +(49, 77, -1) 23 +(49, 78, -1) 22 +(49, 79, -1) 21 +(49, 80, -1) 20 +(49, 81, -1) 19 +(49, 82, -1) 18 +(49, 83, -1) 17 +(49, 84, -1) 16 +(49, 85, -1) 15 +(49, 86, -1) 14 +(49, 87, -1) 13 +(49, 88, -1) 12 +(49, 89, -1) 11 +(49, 90, -1) 10 +(49, 91, -1) 9 +(49, 92, -1) 8 +(49, 93, -1) 7 +(49, 94, -1) 6 +(49, 95, -1) 5 +(49, 96, -1) 4 +(49, 97, -1) 3 +(49, 98, -1) 2 +(49, 99, -1) 1 +(49, 100, -1) 0 +(50, 1, -1) 0 +(50, 2, -1) 1 +(50, 3, -1) 2 +(50, 4, -1) 3 +(50, 5, -1) 4 +(50, 6, -1) 5 +(50, 7, -1) 6 +(50, 8, -1) 7 +(50, 9, -1) 8 +(50, 10, -1) 9 +(50, 11, -1) 10 +(50, 12, -1) 11 +(50, 13, -1) 12 +(50, 14, -1) 13 +(50, 15, -1) 14 +(50, 16, -1) 15 +(50, 17, -1) 16 +(50, 18, -1) 17 +(50, 19, -1) 18 +(50, 20, -1) 19 +(50, 21, -1) 20 +(50, 22, -1) 21 +(50, 23, -1) 22 +(50, 24, -1) 23 +(50, 25, -1) 24 +(50, 26, -1) 25 +(50, 27, -1) 26 +(50, 28, -1) 27 +(50, 29, -1) 28 +(50, 30, -1) 29 +(50, 31, -1) 30 +(50, 32, -1) 31 +(50, 33, -1) 32 +(50, 34, -1) 33 +(50, 35, -1) 34 +(50, 36, -1) 35 +(50, 37, -1) 36 +(50, 38, -1) 37 +(50, 39, -1) 38 +(50, 62, -1) 38 +(50, 63, -1) 37 +(50, 64, -1) 36 +(50, 65, -1) 35 +(50, 66, -1) 34 +(50, 67, -1) 33 +(50, 68, -1) 32 +(50, 69, -1) 31 +(50, 70, -1) 30 +(50, 71, -1) 29 +(50, 72, -1) 28 +(50, 73, -1) 27 +(50, 74, -1) 26 +(50, 75, -1) 25 +(50, 76, -1) 24 +(50, 77, -1) 23 +(50, 78, -1) 22 +(50, 79, -1) 21 +(50, 80, -1) 20 +(50, 81, -1) 19 +(50, 82, -1) 18 +(50, 83, -1) 17 +(50, 84, -1) 16 +(50, 85, -1) 15 +(50, 86, -1) 14 +(50, 87, -1) 13 +(50, 88, -1) 12 +(50, 89, -1) 11 +(50, 90, -1) 10 +(50, 91, -1) 9 +(50, 92, -1) 8 +(50, 93, -1) 7 +(50, 94, -1) 6 +(50, 95, -1) 5 +(50, 96, -1) 4 +(50, 97, -1) 3 +(50, 98, -1) 2 +(50, 99, -1) 1 +(50, 100, -1) 0 +(51, 1, -1) 0 +(51, 2, -1) 1 +(51, 3, -1) 2 +(51, 4, -1) 3 +(51, 5, -1) 4 +(51, 6, -1) 5 +(51, 7, -1) 6 +(51, 8, -1) 7 +(51, 9, -1) 8 +(51, 10, -1) 9 +(51, 11, -1) 10 +(51, 12, -1) 11 +(51, 13, -1) 12 +(51, 14, -1) 13 +(51, 15, -1) 14 +(51, 16, -1) 15 +(51, 17, -1) 16 +(51, 18, -1) 17 +(51, 19, -1) 18 +(51, 20, -1) 19 +(51, 21, -1) 20 +(51, 22, -1) 21 +(51, 23, -1) 22 +(51, 24, -1) 23 +(51, 25, -1) 24 +(51, 26, -1) 25 +(51, 27, -1) 26 +(51, 28, -1) 27 +(51, 29, -1) 28 +(51, 30, -1) 29 +(51, 31, -1) 30 +(51, 32, -1) 31 +(51, 33, -1) 32 +(51, 34, -1) 33 +(51, 35, -1) 34 +(51, 36, -1) 35 +(51, 37, -1) 36 +(51, 38, -1) 37 +(51, 39, -1) 38 +(51, 62, -1) 38 +(51, 63, -1) 37 +(51, 64, -1) 36 +(51, 65, -1) 35 +(51, 66, -1) 34 +(51, 67, -1) 33 +(51, 68, -1) 32 +(51, 69, -1) 31 +(51, 70, -1) 30 +(51, 71, -1) 29 +(51, 72, -1) 28 +(51, 73, -1) 27 +(51, 74, -1) 26 +(51, 75, -1) 25 +(51, 76, -1) 24 +(51, 77, -1) 23 +(51, 78, -1) 22 +(51, 79, -1) 21 +(51, 80, -1) 20 +(51, 81, -1) 19 +(51, 82, -1) 18 +(51, 83, -1) 17 +(51, 84, -1) 16 +(51, 85, -1) 15 +(51, 86, -1) 14 +(51, 87, -1) 13 +(51, 88, -1) 12 +(51, 89, -1) 11 +(51, 90, -1) 10 +(51, 91, -1) 9 +(51, 92, -1) 8 +(51, 93, -1) 7 +(51, 94, -1) 6 +(51, 95, -1) 5 +(51, 96, -1) 4 +(51, 97, -1) 3 +(51, 98, -1) 2 +(51, 99, -1) 1 +(51, 100, -1) 0 +(52, 1, -1) 0 +(52, 2, -1) 1 +(52, 3, -1) 2 +(52, 4, -1) 3 +(52, 5, -1) 4 +(52, 6, -1) 5 +(52, 7, -1) 6 +(52, 8, -1) 7 +(52, 9, -1) 8 +(52, 10, -1) 9 +(52, 11, -1) 10 +(52, 12, -1) 11 +(52, 13, -1) 12 +(52, 14, -1) 13 +(52, 15, -1) 14 +(52, 16, -1) 15 +(52, 17, -1) 16 +(52, 18, -1) 17 +(52, 19, -1) 18 +(52, 20, -1) 19 +(52, 21, -1) 20 +(52, 22, -1) 21 +(52, 23, -1) 22 +(52, 24, -1) 23 +(52, 25, -1) 24 +(52, 26, -1) 25 +(52, 27, -1) 26 +(52, 28, -1) 27 +(52, 29, -1) 28 +(52, 30, -1) 29 +(52, 31, -1) 30 +(52, 32, -1) 31 +(52, 33, -1) 32 +(52, 34, -1) 33 +(52, 35, -1) 34 +(52, 36, -1) 35 +(52, 37, -1) 36 +(52, 38, -1) 37 +(52, 39, -1) 38 +(52, 62, -1) 38 +(52, 63, -1) 37 +(52, 64, -1) 36 +(52, 65, -1) 35 +(52, 66, -1) 34 +(52, 67, -1) 33 +(52, 68, -1) 32 +(52, 69, -1) 31 +(52, 70, -1) 30 +(52, 71, -1) 29 +(52, 72, -1) 28 +(52, 73, -1) 27 +(52, 74, -1) 26 +(52, 75, -1) 25 +(52, 76, -1) 24 +(52, 77, -1) 23 +(52, 78, -1) 22 +(52, 79, -1) 21 +(52, 80, -1) 20 +(52, 81, -1) 19 +(52, 82, -1) 18 +(52, 83, -1) 17 +(52, 84, -1) 16 +(52, 85, -1) 15 +(52, 86, -1) 14 +(52, 87, -1) 13 +(52, 88, -1) 12 +(52, 89, -1) 11 +(52, 90, -1) 10 +(52, 91, -1) 9 +(52, 92, -1) 8 +(52, 93, -1) 7 +(52, 94, -1) 6 +(52, 95, -1) 5 +(52, 96, -1) 4 +(52, 97, -1) 3 +(52, 98, -1) 2 +(52, 99, -1) 1 +(52, 100, -1) 0 +(53, 1, -1) 0 +(53, 2, -1) 1 +(53, 3, -1) 2 +(53, 4, -1) 3 +(53, 5, -1) 4 +(53, 6, -1) 5 +(53, 7, -1) 6 +(53, 8, -1) 7 +(53, 9, -1) 8 +(53, 10, -1) 9 +(53, 11, -1) 10 +(53, 12, -1) 11 +(53, 13, -1) 12 +(53, 14, -1) 13 +(53, 15, -1) 14 +(53, 16, -1) 15 +(53, 17, -1) 16 +(53, 18, -1) 17 +(53, 19, -1) 18 +(53, 20, -1) 19 +(53, 21, -1) 20 +(53, 22, -1) 21 +(53, 23, -1) 22 +(53, 24, -1) 23 +(53, 25, -1) 24 +(53, 26, -1) 25 +(53, 27, -1) 26 +(53, 28, -1) 27 +(53, 29, -1) 28 +(53, 30, -1) 29 +(53, 31, -1) 30 +(53, 32, -1) 31 +(53, 33, -1) 32 +(53, 34, -1) 33 +(53, 35, -1) 34 +(53, 36, -1) 35 +(53, 37, -1) 36 +(53, 38, -1) 37 +(53, 39, -1) 38 +(53, 62, -1) 38 +(53, 63, -1) 37 +(53, 64, -1) 36 +(53, 65, -1) 35 +(53, 66, -1) 34 +(53, 67, -1) 33 +(53, 68, -1) 32 +(53, 69, -1) 31 +(53, 70, -1) 30 +(53, 71, -1) 29 +(53, 72, -1) 28 +(53, 73, -1) 27 +(53, 74, -1) 26 +(53, 75, -1) 25 +(53, 76, -1) 24 +(53, 77, -1) 23 +(53, 78, -1) 22 +(53, 79, -1) 21 +(53, 80, -1) 20 +(53, 81, -1) 19 +(53, 82, -1) 18 +(53, 83, -1) 17 +(53, 84, -1) 16 +(53, 85, -1) 15 +(53, 86, -1) 14 +(53, 87, -1) 13 +(53, 88, -1) 12 +(53, 89, -1) 11 +(53, 90, -1) 10 +(53, 91, -1) 9 +(53, 92, -1) 8 +(53, 93, -1) 7 +(53, 94, -1) 6 +(53, 95, -1) 5 +(53, 96, -1) 4 +(53, 97, -1) 3 +(53, 98, -1) 2 +(53, 99, -1) 1 +(53, 100, -1) 0 +(54, 1, -1) 0 +(54, 2, -1) 1 +(54, 3, -1) 2 +(54, 4, -1) 3 +(54, 5, -1) 4 +(54, 6, -1) 5 +(54, 7, -1) 6 +(54, 8, -1) 7 +(54, 9, -1) 8 +(54, 10, -1) 9 +(54, 11, -1) 10 +(54, 12, -1) 11 +(54, 13, -1) 12 +(54, 14, -1) 13 +(54, 15, -1) 14 +(54, 16, -1) 15 +(54, 17, -1) 16 +(54, 18, -1) 17 +(54, 19, -1) 18 +(54, 20, -1) 19 +(54, 21, -1) 20 +(54, 22, -1) 21 +(54, 23, -1) 22 +(54, 24, -1) 23 +(54, 25, -1) 24 +(54, 26, -1) 25 +(54, 27, -1) 26 +(54, 28, -1) 27 +(54, 29, -1) 28 +(54, 30, -1) 29 +(54, 31, -1) 30 +(54, 32, -1) 31 +(54, 33, -1) 32 +(54, 34, -1) 33 +(54, 35, -1) 34 +(54, 36, -1) 35 +(54, 37, -1) 36 +(54, 38, -1) 37 +(54, 39, -1) 38 +(54, 62, -1) 38 +(54, 63, -1) 37 +(54, 64, -1) 36 +(54, 65, -1) 35 +(54, 66, -1) 34 +(54, 67, -1) 33 +(54, 68, -1) 32 +(54, 69, -1) 31 +(54, 70, -1) 30 +(54, 71, -1) 29 +(54, 72, -1) 28 +(54, 73, -1) 27 +(54, 74, -1) 26 +(54, 75, -1) 25 +(54, 76, -1) 24 +(54, 77, -1) 23 +(54, 78, -1) 22 +(54, 79, -1) 21 +(54, 80, -1) 20 +(54, 81, -1) 19 +(54, 82, -1) 18 +(54, 83, -1) 17 +(54, 84, -1) 16 +(54, 85, -1) 15 +(54, 86, -1) 14 +(54, 87, -1) 13 +(54, 88, -1) 12 +(54, 89, -1) 11 +(54, 90, -1) 10 +(54, 91, -1) 9 +(54, 92, -1) 8 +(54, 93, -1) 7 +(54, 94, -1) 6 +(54, 95, -1) 5 +(54, 96, -1) 4 +(54, 97, -1) 3 +(54, 98, -1) 2 +(54, 99, -1) 1 +(54, 100, -1) 0 +(55, 1, -1) 0 +(55, 2, -1) 1 +(55, 3, -1) 2 +(55, 4, -1) 3 +(55, 5, -1) 4 +(55, 6, -1) 5 +(55, 7, -1) 6 +(55, 8, -1) 7 +(55, 9, -1) 8 +(55, 10, -1) 9 +(55, 11, -1) 10 +(55, 12, -1) 11 +(55, 13, -1) 12 +(55, 14, -1) 13 +(55, 15, -1) 14 +(55, 16, -1) 15 +(55, 17, -1) 16 +(55, 18, -1) 17 +(55, 19, -1) 18 +(55, 20, -1) 19 +(55, 21, -1) 20 +(55, 22, -1) 21 +(55, 23, -1) 22 +(55, 24, -1) 23 +(55, 25, -1) 24 +(55, 26, -1) 25 +(55, 27, -1) 26 +(55, 28, -1) 27 +(55, 29, -1) 28 +(55, 30, -1) 29 +(55, 31, -1) 30 +(55, 32, -1) 30 +(55, 33, -1) 31 +(55, 34, -1) 32 +(55, 35, -1) 33 +(55, 36, -1) 34 +(55, 37, -1) 35 +(55, 38, -1) 36 +(55, 39, -1) 37 +(55, 62, -1) 37 +(55, 63, -1) 36 +(55, 64, -1) 35 +(55, 65, -1) 34 +(55, 66, -1) 33 +(55, 67, -1) 32 +(55, 68, -1) 31 +(55, 69, -1) 30 +(55, 70, -1) 30 +(55, 71, -1) 29 +(55, 72, -1) 28 +(55, 73, -1) 27 +(55, 74, -1) 26 +(55, 75, -1) 25 +(55, 76, -1) 24 +(55, 77, -1) 23 +(55, 78, -1) 22 +(55, 79, -1) 21 +(55, 80, -1) 20 +(55, 81, -1) 19 +(55, 82, -1) 18 +(55, 83, -1) 17 +(55, 84, -1) 16 +(55, 85, -1) 15 +(55, 86, -1) 14 +(55, 87, -1) 13 +(55, 88, -1) 12 +(55, 89, -1) 11 +(55, 90, -1) 10 +(55, 91, -1) 9 +(55, 92, -1) 8 +(55, 93, -1) 7 +(55, 94, -1) 6 +(55, 95, -1) 5 +(55, 96, -1) 4 +(55, 97, -1) 3 +(55, 98, -1) 2 +(55, 99, -1) 1 +(55, 100, -1) 0 +(56, 1, -1) 0 +(56, 2, -1) 1 +(56, 3, -1) 2 +(56, 4, -1) 3 +(56, 5, -1) 4 +(56, 6, -1) 5 +(56, 7, -1) 6 +(56, 8, -1) 7 +(56, 9, -1) 8 +(56, 10, -1) 9 +(56, 11, -1) 10 +(56, 12, -1) 11 +(56, 13, -1) 12 +(56, 14, -1) 13 +(56, 15, -1) 14 +(56, 16, -1) 15 +(56, 17, -1) 16 +(56, 18, -1) 17 +(56, 19, -1) 18 +(56, 20, -1) 19 +(56, 21, -1) 20 +(56, 22, -1) 21 +(56, 23, -1) 22 +(56, 24, -1) 23 +(56, 25, -1) 23 +(56, 26, -1) 24 +(56, 27, -1) 25 +(56, 28, -1) 26 +(56, 29, -1) 27 +(56, 30, -1) 28 +(56, 31, -1) 29 +(56, 32, -1) 30 +(56, 33, -1) 31 +(56, 34, -1) 32 +(56, 35, -1) 33 +(56, 36, -1) 34 +(56, 37, -1) 35 +(56, 38, -1) 36 +(56, 39, -1) 37 +(56, 40, -1) 38 +(56, 61, -1) 38 +(56, 62, -1) 37 +(56, 63, -1) 36 +(56, 64, -1) 35 +(56, 65, -1) 34 +(56, 66, -1) 33 +(56, 67, -1) 32 +(56, 68, -1) 31 +(56, 69, -1) 30 +(56, 70, -1) 29 +(56, 71, -1) 28 +(56, 72, -1) 27 +(56, 73, -1) 26 +(56, 74, -1) 25 +(56, 75, -1) 24 +(56, 76, -1) 23 +(56, 77, -1) 23 +(56, 78, -1) 22 +(56, 79, -1) 21 +(56, 80, -1) 20 +(56, 81, -1) 19 +(56, 82, -1) 18 +(56, 83, -1) 17 +(56, 84, -1) 16 +(56, 85, -1) 15 +(56, 86, -1) 14 +(56, 87, -1) 13 +(56, 88, -1) 12 +(56, 89, -1) 11 +(56, 90, -1) 10 +(56, 91, -1) 9 +(56, 92, -1) 8 +(56, 93, -1) 7 +(56, 94, -1) 6 +(56, 95, -1) 5 +(56, 96, -1) 4 +(56, 97, -1) 3 +(56, 98, -1) 2 +(56, 99, -1) 1 +(56, 100, -1) 0 +(57, 1, -1) 0 +(57, 2, -1) 1 +(57, 3, -1) 2 +(57, 4, -1) 3 +(57, 5, -1) 4 +(57, 6, -1) 5 +(57, 7, -1) 6 +(57, 8, -1) 7 +(57, 9, -1) 8 +(57, 10, -1) 9 +(57, 11, -1) 10 +(57, 12, -1) 11 +(57, 13, -1) 12 +(57, 14, -1) 13 +(57, 15, -1) 14 +(57, 16, -1) 14 +(57, 17, -1) 15 +(57, 18, -1) 16 +(57, 19, -1) 17 +(57, 20, -1) 18 +(57, 21, -1) 19 +(57, 22, -1) 20 +(57, 23, -1) 21 +(57, 24, -1) 22 +(57, 25, -1) 23 +(57, 26, -1) 24 +(57, 27, -1) 25 +(57, 28, -1) 26 +(57, 29, -1) 27 +(57, 30, -1) 28 +(57, 31, -1) 29 +(57, 32, -1) 30 +(57, 33, -1) 31 +(57, 34, -1) 32 +(57, 35, -1) 33 +(57, 36, -1) 34 +(57, 37, -1) 35 +(57, 38, -1) 35 +(57, 39, -1) 36 +(57, 40, -1) 37 +(57, 61, -1) 37 +(57, 62, -1) 36 +(57, 63, -1) 35 +(57, 64, -1) 35 +(57, 65, -1) 34 +(57, 66, -1) 33 +(57, 67, -1) 32 +(57, 68, -1) 31 +(57, 69, -1) 30 +(57, 70, -1) 29 +(57, 71, -1) 28 +(57, 72, -1) 27 +(57, 73, -1) 26 +(57, 74, -1) 25 +(57, 75, -1) 24 +(57, 76, -1) 23 +(57, 77, -1) 22 +(57, 78, -1) 21 +(57, 79, -1) 20 +(57, 80, -1) 19 +(57, 81, -1) 18 +(57, 82, -1) 17 +(57, 83, -1) 16 +(57, 84, -1) 15 +(57, 85, -1) 14 +(57, 86, -1) 14 +(57, 87, -1) 13 +(57, 88, -1) 12 +(57, 89, -1) 11 +(57, 90, -1) 10 +(57, 91, -1) 9 +(57, 92, -1) 8 +(57, 93, -1) 7 +(57, 94, -1) 6 +(57, 95, -1) 5 +(57, 96, -1) 4 +(57, 97, -1) 3 +(57, 98, -1) 2 +(57, 99, -1) 1 +(57, 100, -1) 0 +(58, 1, -1) 0 +(58, 2, -1) 1 +(58, 3, -1) 2 +(58, 4, -1) 3 +(58, 5, -1) 4 +(58, 6, -1) 4 +(58, 7, -1) 5 +(58, 8, -1) 6 +(58, 9, -1) 7 +(58, 10, -1) 8 +(58, 11, -1) 9 +(58, 12, -1) 10 +(58, 13, -1) 11 +(58, 14, -1) 12 +(58, 15, -1) 13 +(58, 16, -1) 14 +(58, 17, -1) 15 +(58, 18, -1) 16 +(58, 19, -1) 17 +(58, 20, -1) 18 +(58, 21, -1) 19 +(58, 22, -1) 20 +(58, 23, -1) 21 +(58, 24, -1) 22 +(58, 25, -1) 23 +(58, 26, -1) 24 +(58, 27, -1) 25 +(58, 28, -1) 26 +(58, 29, -1) 27 +(58, 30, -1) 28 +(58, 31, -1) 29 +(58, 32, -1) 30 +(58, 33, -1) 30 +(58, 34, -1) 31 +(58, 35, -1) 32 +(58, 36, -1) 33 +(58, 37, -1) 34 +(58, 38, -1) 35 +(58, 39, -1) 36 +(58, 40, -1) 37 +(58, 41, -1) 37 +(58, 60, -1) 37 +(58, 61, -1) 37 +(58, 62, -1) 36 +(58, 63, -1) 35 +(58, 64, -1) 34 +(58, 65, -1) 33 +(58, 66, -1) 32 +(58, 67, -1) 31 +(58, 68, -1) 30 +(58, 69, -1) 30 +(58, 70, -1) 29 +(58, 71, -1) 28 +(58, 72, -1) 27 +(58, 73, -1) 26 +(58, 74, -1) 25 +(58, 75, -1) 24 +(58, 76, -1) 23 +(58, 77, -1) 22 +(58, 78, -1) 21 +(58, 79, -1) 20 +(58, 80, -1) 19 +(58, 81, -1) 18 +(58, 82, -1) 17 +(58, 83, -1) 16 +(58, 84, -1) 15 +(58, 85, -1) 14 +(58, 86, -1) 13 +(58, 87, -1) 12 +(58, 88, -1) 11 +(58, 89, -1) 10 +(58, 90, -1) 9 +(58, 91, -1) 8 +(58, 92, -1) 7 +(58, 93, -1) 6 +(58, 94, -1) 5 +(58, 95, -1) 4 +(58, 96, -1) 4 +(58, 97, -1) 3 +(58, 98, -1) 2 +(58, 99, -1) 1 +(58, 100, -1) 0 +(59, 1, -1) 0 +(59, 2, -1) 0 +(59, 3, -1) 1 +(59, 4, -1) 2 +(59, 5, -1) 3 +(59, 6, -1) 4 +(59, 7, -1) 5 +(59, 8, -1) 6 +(59, 9, -1) 7 +(59, 10, -1) 8 +(59, 11, -1) 9 +(59, 12, -1) 10 +(59, 13, -1) 11 +(59, 14, -1) 12 +(59, 15, -1) 13 +(59, 16, -1) 14 +(59, 17, -1) 15 +(59, 18, -1) 16 +(59, 19, -1) 17 +(59, 20, -1) 18 +(59, 21, -1) 19 +(59, 22, -1) 20 +(59, 23, -1) 21 +(59, 24, -1) 22 +(59, 25, -1) 23 +(59, 26, -1) 24 +(59, 27, -1) 25 +(59, 28, -1) 25 +(59, 29, -1) 26 +(59, 30, -1) 27 +(59, 31, -1) 28 +(59, 32, -1) 29 +(59, 33, -1) 30 +(59, 34, -1) 31 +(59, 35, -1) 32 +(59, 36, -1) 33 +(59, 37, -1) 34 +(59, 38, -1) 34 +(59, 39, -1) 35 +(59, 40, -1) 36 +(59, 41, -1) 37 +(59, 42, -1) 38 +(59, 59, -1) 38 +(59, 60, -1) 37 +(59, 61, -1) 36 +(59, 62, -1) 35 +(59, 63, -1) 34 +(59, 64, -1) 34 +(59, 65, -1) 33 +(59, 66, -1) 32 +(59, 67, -1) 31 +(59, 68, -1) 30 +(59, 69, -1) 29 +(59, 70, -1) 28 +(59, 71, -1) 27 +(59, 72, -1) 26 +(59, 73, -1) 25 +(59, 74, -1) 25 +(59, 75, -1) 24 +(59, 76, -1) 23 +(59, 77, -1) 22 +(59, 78, -1) 21 +(59, 79, -1) 20 +(59, 80, -1) 19 +(59, 81, -1) 18 +(59, 82, -1) 17 +(59, 83, -1) 16 +(59, 84, -1) 15 +(59, 85, -1) 14 +(59, 86, -1) 13 +(59, 87, -1) 12 +(59, 88, -1) 11 +(59, 89, -1) 10 +(59, 90, -1) 9 +(59, 91, -1) 8 +(59, 92, -1) 7 +(59, 93, -1) 6 +(59, 94, -1) 5 +(59, 95, -1) 4 +(59, 96, -1) 3 +(59, 97, -1) 2 +(59, 98, -1) 1 +(59, 99, -1) 0 +(59, 100, -1) 0 +(60, 1, -1) 0 +(60, 2, -1) 0 +(60, 3, -1) 1 +(60, 4, -1) 2 +(60, 5, -1) 3 +(60, 6, -1) 4 +(60, 7, -1) 5 +(60, 8, -1) 6 +(60, 9, -1) 7 +(60, 10, -1) 8 +(60, 11, -1) 9 +(60, 12, -1) 10 +(60, 13, -1) 11 +(60, 14, -1) 12 +(60, 15, -1) 13 +(60, 16, -1) 14 +(60, 17, -1) 15 +(60, 18, -1) 16 +(60, 19, -1) 17 +(60, 20, -1) 18 +(60, 21, -1) 19 +(60, 22, -1) 20 +(60, 23, -1) 20 +(60, 24, -1) 21 +(60, 25, -1) 22 +(60, 26, -1) 23 +(60, 27, -1) 24 +(60, 28, -1) 25 +(60, 29, -1) 26 +(60, 30, -1) 27 +(60, 31, -1) 28 +(60, 32, -1) 29 +(60, 33, -1) 30 +(60, 34, -1) 30 +(60, 35, -1) 31 +(60, 36, -1) 32 +(60, 37, -1) 33 +(60, 38, -1) 34 +(60, 39, -1) 35 +(60, 40, -1) 35 +(60, 41, -1) 36 +(60, 42, -1) 37 +(60, 43, -1) 37 +(60, 58, -1) 37 +(60, 59, -1) 37 +(60, 60, -1) 36 +(60, 61, -1) 35 +(60, 62, -1) 35 +(60, 63, -1) 34 +(60, 64, -1) 33 +(60, 65, -1) 32 +(60, 66, -1) 31 +(60, 67, -1) 30 +(60, 68, -1) 30 +(60, 69, -1) 29 +(60, 70, -1) 28 +(60, 71, -1) 27 +(60, 72, -1) 26 +(60, 73, -1) 25 +(60, 74, -1) 24 +(60, 75, -1) 23 +(60, 76, -1) 22 +(60, 77, -1) 21 +(60, 78, -1) 20 +(60, 79, -1) 20 +(60, 80, -1) 19 +(60, 81, -1) 18 +(60, 82, -1) 17 +(60, 83, -1) 16 +(60, 84, -1) 15 +(60, 85, -1) 14 +(60, 86, -1) 13 +(60, 87, -1) 12 +(60, 88, -1) 11 +(60, 89, -1) 10 +(60, 90, -1) 9 +(60, 91, -1) 8 +(60, 92, -1) 7 +(60, 93, -1) 6 +(60, 94, -1) 5 +(60, 95, -1) 4 +(60, 96, -1) 3 +(60, 97, -1) 2 +(60, 98, -1) 1 +(60, 99, -1) 0 +(60, 100, -1) 0 +(61, 4, -1) 2 +(61, 5, -1) 3 +(61, 6, -1) 4 +(61, 7, -1) 5 +(61, 8, -1) 6 +(61, 9, -1) 7 +(61, 10, -1) 8 +(61, 11, -1) 9 +(61, 12, -1) 10 +(61, 13, -1) 11 +(61, 14, -1) 12 +(61, 15, -1) 13 +(61, 16, -1) 14 +(61, 17, -1) 15 +(61, 18, -1) 16 +(61, 19, -1) 16 +(61, 20, -1) 17 +(61, 21, -1) 18 +(61, 22, -1) 19 +(61, 23, -1) 20 +(61, 24, -1) 21 +(61, 25, -1) 22 +(61, 26, -1) 23 +(61, 27, -1) 24 +(61, 28, -1) 25 +(61, 29, -1) 26 +(61, 30, -1) 27 +(61, 31, -1) 27 +(61, 32, -1) 28 +(61, 33, -1) 29 +(61, 34, -1) 30 +(61, 35, -1) 31 +(61, 36, -1) 32 +(61, 37, -1) 32 +(61, 38, -1) 33 +(61, 39, -1) 34 +(61, 40, -1) 35 +(61, 41, -1) 35 +(61, 42, -1) 36 +(61, 43, -1) 37 +(61, 44, -1) 37 +(61, 45, -1) 38 +(61, 56, -1) 38 +(61, 57, -1) 37 +(61, 58, -1) 37 +(61, 59, -1) 36 +(61, 60, -1) 35 +(61, 61, -1) 35 +(61, 62, -1) 34 +(61, 63, -1) 33 +(61, 64, -1) 32 +(61, 65, -1) 32 +(61, 66, -1) 31 +(61, 67, -1) 30 +(61, 68, -1) 29 +(61, 69, -1) 28 +(61, 70, -1) 27 +(61, 71, -1) 27 +(61, 72, -1) 26 +(61, 73, -1) 25 +(61, 74, -1) 24 +(61, 75, -1) 23 +(61, 76, -1) 22 +(61, 77, -1) 21 +(61, 78, -1) 20 +(61, 79, -1) 19 +(61, 80, -1) 18 +(61, 81, -1) 17 +(61, 82, -1) 16 +(61, 83, -1) 16 +(61, 84, -1) 15 +(61, 85, -1) 14 +(61, 86, -1) 13 +(61, 87, -1) 12 +(61, 88, -1) 11 +(61, 89, -1) 10 +(61, 90, -1) 9 +(61, 91, -1) 8 +(61, 92, -1) 7 +(61, 93, -1) 6 +(61, 94, -1) 5 +(61, 95, -1) 4 +(61, 96, -1) 3 +(61, 97, -1) 2 +(62, 4, -1) 2 +(62, 5, -1) 3 +(62, 6, -1) 4 +(62, 7, -1) 5 +(62, 8, -1) 6 +(62, 9, -1) 7 +(62, 10, -1) 8 +(62, 11, -1) 9 +(62, 12, -1) 9 +(62, 13, -1) 10 +(62, 14, -1) 11 +(62, 15, -1) 12 +(62, 16, -1) 13 +(62, 17, -1) 14 +(62, 18, -1) 15 +(62, 19, -1) 16 +(62, 20, -1) 17 +(62, 21, -1) 18 +(62, 22, -1) 19 +(62, 23, -1) 20 +(62, 24, -1) 21 +(62, 25, -1) 22 +(62, 26, -1) 23 +(62, 27, -1) 23 +(62, 28, -1) 24 +(62, 29, -1) 25 +(62, 30, -1) 26 +(62, 31, -1) 27 +(62, 32, -1) 28 +(62, 33, -1) 29 +(62, 34, -1) 29 +(62, 35, -1) 30 +(62, 36, -1) 31 +(62, 37, -1) 32 +(62, 38, -1) 33 +(62, 39, -1) 33 +(62, 40, -1) 34 +(62, 41, -1) 35 +(62, 42, -1) 35 +(62, 43, -1) 36 +(62, 44, -1) 36 +(62, 45, -1) 37 +(62, 46, -1) 37 +(62, 47, -1) 37 +(62, 48, -1) 38 +(62, 49, -1) 38 +(62, 50, -1) 38 +(62, 51, -1) 38 +(62, 52, -1) 38 +(62, 53, -1) 38 +(62, 54, -1) 37 +(62, 55, -1) 37 +(62, 56, -1) 37 +(62, 57, -1) 36 +(62, 58, -1) 36 +(62, 59, -1) 35 +(62, 60, -1) 35 +(62, 61, -1) 34 +(62, 62, -1) 33 +(62, 63, -1) 33 +(62, 64, -1) 32 +(62, 65, -1) 31 +(62, 66, -1) 30 +(62, 67, -1) 29 +(62, 68, -1) 29 +(62, 69, -1) 28 +(62, 70, -1) 27 +(62, 71, -1) 26 +(62, 72, -1) 25 +(62, 73, -1) 24 +(62, 74, -1) 23 +(62, 75, -1) 23 +(62, 76, -1) 22 +(62, 77, -1) 21 +(62, 78, -1) 20 +(62, 79, -1) 19 +(62, 80, -1) 18 +(62, 81, -1) 17 +(62, 82, -1) 16 +(62, 83, -1) 15 +(62, 84, -1) 14 +(62, 85, -1) 13 +(62, 86, -1) 12 +(62, 87, -1) 11 +(62, 88, -1) 10 +(62, 89, -1) 9 +(62, 90, -1) 9 +(62, 91, -1) 8 +(62, 92, -1) 7 +(62, 93, -1) 6 +(62, 94, -1) 5 +(62, 95, -1) 4 +(62, 96, -1) 3 +(62, 97, -1) 2 +(63, 4, -1) 2 +(63, 5, -1) 3 +(63, 6, -1) 3 +(63, 7, -1) 4 +(63, 8, -1) 5 +(63, 9, -1) 6 +(63, 10, -1) 7 +(63, 11, -1) 8 +(63, 12, -1) 9 +(63, 13, -1) 10 +(63, 14, -1) 11 +(63, 15, -1) 12 +(63, 16, -1) 13 +(63, 17, -1) 14 +(63, 18, -1) 15 +(63, 19, -1) 16 +(63, 20, -1) 17 +(63, 21, -1) 18 +(63, 22, -1) 18 +(63, 23, -1) 19 +(63, 24, -1) 20 +(63, 25, -1) 21 +(63, 26, -1) 22 +(63, 27, -1) 23 +(63, 28, -1) 24 +(63, 29, -1) 25 +(63, 30, -1) 26 +(63, 31, -1) 26 +(63, 32, -1) 27 +(63, 33, -1) 28 +(63, 34, -1) 29 +(63, 35, -1) 30 +(63, 36, -1) 30 +(63, 37, -1) 31 +(63, 38, -1) 32 +(63, 39, -1) 33 +(63, 40, -1) 33 +(63, 41, -1) 34 +(63, 42, -1) 34 +(63, 43, -1) 35 +(63, 44, -1) 35 +(63, 45, -1) 36 +(63, 46, -1) 36 +(63, 47, -1) 37 +(63, 48, -1) 37 +(63, 49, -1) 37 +(63, 50, -1) 37 +(63, 51, -1) 37 +(63, 52, -1) 37 +(63, 53, -1) 37 +(63, 54, -1) 37 +(63, 55, -1) 36 +(63, 56, -1) 36 +(63, 57, -1) 35 +(63, 58, -1) 35 +(63, 59, -1) 34 +(63, 60, -1) 34 +(63, 61, -1) 33 +(63, 62, -1) 33 +(63, 63, -1) 32 +(63, 64, -1) 31 +(63, 65, -1) 30 +(63, 66, -1) 30 +(63, 67, -1) 29 +(63, 68, -1) 28 +(63, 69, -1) 27 +(63, 70, -1) 26 +(63, 71, -1) 26 +(63, 72, -1) 25 +(63, 73, -1) 24 +(63, 74, -1) 23 +(63, 75, -1) 22 +(63, 76, -1) 21 +(63, 77, -1) 20 +(63, 78, -1) 19 +(63, 79, -1) 18 +(63, 80, -1) 18 +(63, 81, -1) 17 +(63, 82, -1) 16 +(63, 83, -1) 15 +(63, 84, -1) 14 +(63, 85, -1) 13 +(63, 86, -1) 12 +(63, 87, -1) 11 +(63, 88, -1) 10 +(63, 89, -1) 9 +(63, 90, -1) 8 +(63, 91, -1) 7 +(63, 92, -1) 6 +(63, 93, -1) 5 +(63, 94, -1) 4 +(63, 95, -1) 3 +(63, 96, -1) 3 +(63, 97, -1) 2 +(64, 4, -1) 1 +(64, 5, -1) 2 +(64, 6, -1) 3 +(64, 7, -1) 4 +(64, 8, -1) 5 +(64, 9, -1) 6 +(64, 10, -1) 7 +(64, 11, -1) 8 +(64, 12, -1) 9 +(64, 13, -1) 10 +(64, 14, -1) 11 +(64, 15, -1) 12 +(64, 16, -1) 13 +(64, 17, -1) 14 +(64, 18, -1) 14 +(64, 19, -1) 15 +(64, 20, -1) 16 +(64, 21, -1) 17 +(64, 22, -1) 18 +(64, 23, -1) 19 +(64, 24, -1) 20 +(64, 25, -1) 21 +(64, 26, -1) 22 +(64, 27, -1) 22 +(64, 28, -1) 23 +(64, 29, -1) 24 +(64, 30, -1) 25 +(64, 31, -1) 26 +(64, 32, -1) 27 +(64, 33, -1) 27 +(64, 34, -1) 28 +(64, 35, -1) 29 +(64, 36, -1) 30 +(64, 37, -1) 30 +(64, 38, -1) 31 +(64, 39, -1) 32 +(64, 40, -1) 32 +(64, 41, -1) 33 +(64, 42, -1) 34 +(64, 43, -1) 34 +(64, 44, -1) 35 +(64, 45, -1) 35 +(64, 46, -1) 35 +(64, 47, -1) 36 +(64, 48, -1) 36 +(64, 49, -1) 36 +(64, 50, -1) 36 +(64, 51, -1) 36 +(64, 52, -1) 36 +(64, 53, -1) 36 +(64, 54, -1) 36 +(64, 55, -1) 35 +(64, 56, -1) 35 +(64, 57, -1) 35 +(64, 58, -1) 34 +(64, 59, -1) 34 +(64, 60, -1) 33 +(64, 61, -1) 32 +(64, 62, -1) 32 +(64, 63, -1) 31 +(64, 64, -1) 30 +(64, 65, -1) 30 +(64, 66, -1) 29 +(64, 67, -1) 28 +(64, 68, -1) 27 +(64, 69, -1) 27 +(64, 70, -1) 26 +(64, 71, -1) 25 +(64, 72, -1) 24 +(64, 73, -1) 23 +(64, 74, -1) 22 +(64, 75, -1) 22 +(64, 76, -1) 21 +(64, 77, -1) 20 +(64, 78, -1) 19 +(64, 79, -1) 18 +(64, 80, -1) 17 +(64, 81, -1) 16 +(64, 82, -1) 15 +(64, 83, -1) 14 +(64, 84, -1) 14 +(64, 85, -1) 13 +(64, 86, -1) 12 +(64, 87, -1) 11 +(64, 88, -1) 10 +(64, 89, -1) 9 +(64, 90, -1) 8 +(64, 91, -1) 7 +(64, 92, -1) 6 +(64, 93, -1) 5 +(64, 94, -1) 4 +(64, 95, -1) 3 +(64, 96, -1) 2 +(64, 97, -1) 1 +(65, 4, -1) 1 +(65, 5, -1) 2 +(65, 6, -1) 3 +(65, 7, -1) 4 +(65, 8, -1) 5 +(65, 9, -1) 6 +(65, 10, -1) 7 +(65, 11, -1) 8 +(65, 12, -1) 8 +(65, 13, -1) 9 +(65, 14, -1) 10 +(65, 15, -1) 11 +(65, 16, -1) 12 +(65, 17, -1) 13 +(65, 18, -1) 14 +(65, 19, -1) 15 +(65, 20, -1) 16 +(65, 21, -1) 17 +(65, 22, -1) 18 +(65, 23, -1) 19 +(65, 24, -1) 19 +(65, 25, -1) 20 +(65, 26, -1) 21 +(65, 27, -1) 22 +(65, 28, -1) 23 +(65, 29, -1) 24 +(65, 30, -1) 24 +(65, 31, -1) 25 +(65, 32, -1) 26 +(65, 33, -1) 27 +(65, 34, -1) 28 +(65, 35, -1) 28 +(65, 36, -1) 29 +(65, 37, -1) 30 +(65, 38, -1) 30 +(65, 39, -1) 31 +(65, 40, -1) 32 +(65, 41, -1) 32 +(65, 42, -1) 33 +(65, 43, -1) 33 +(65, 44, -1) 34 +(65, 45, -1) 34 +(65, 46, -1) 34 +(65, 47, -1) 35 +(65, 48, -1) 35 +(65, 49, -1) 35 +(65, 50, -1) 35 +(65, 51, -1) 35 +(65, 52, -1) 35 +(65, 53, -1) 35 +(65, 54, -1) 35 +(65, 55, -1) 34 +(65, 56, -1) 34 +(65, 57, -1) 34 +(65, 58, -1) 33 +(65, 59, -1) 33 +(65, 60, -1) 32 +(65, 61, -1) 32 +(65, 62, -1) 31 +(65, 63, -1) 30 +(65, 64, -1) 30 +(65, 65, -1) 29 +(65, 66, -1) 28 +(65, 67, -1) 28 +(65, 68, -1) 27 +(65, 69, -1) 26 +(65, 70, -1) 25 +(65, 71, -1) 24 +(65, 72, -1) 24 +(65, 73, -1) 23 +(65, 74, -1) 22 +(65, 75, -1) 21 +(65, 76, -1) 20 +(65, 77, -1) 19 +(65, 78, -1) 19 +(65, 79, -1) 18 +(65, 80, -1) 17 +(65, 81, -1) 16 +(65, 82, -1) 15 +(65, 83, -1) 14 +(65, 84, -1) 13 +(65, 85, -1) 12 +(65, 86, -1) 11 +(65, 87, -1) 10 +(65, 88, -1) 9 +(65, 89, -1) 8 +(65, 90, -1) 8 +(65, 91, -1) 7 +(65, 92, -1) 6 +(65, 93, -1) 5 +(65, 94, -1) 4 +(65, 95, -1) 3 +(65, 96, -1) 2 +(65, 97, -1) 1 +(66, 6, -1) 3 +(66, 7, -1) 4 +(66, 8, -1) 5 +(66, 9, -1) 6 +(66, 10, -1) 6 +(66, 11, -1) 7 +(66, 12, -1) 8 +(66, 13, -1) 9 +(66, 14, -1) 10 +(66, 15, -1) 11 +(66, 16, -1) 12 +(66, 17, -1) 13 +(66, 18, -1) 14 +(66, 19, -1) 15 +(66, 20, -1) 16 +(66, 21, -1) 16 +(66, 22, -1) 17 +(66, 23, -1) 18 +(66, 24, -1) 19 +(66, 25, -1) 20 +(66, 26, -1) 21 +(66, 27, -1) 21 +(66, 28, -1) 22 +(66, 29, -1) 23 +(66, 30, -1) 24 +(66, 31, -1) 25 +(66, 32, -1) 25 +(66, 33, -1) 26 +(66, 34, -1) 27 +(66, 35, -1) 28 +(66, 36, -1) 28 +(66, 37, -1) 29 +(66, 38, -1) 30 +(66, 39, -1) 30 +(66, 40, -1) 31 +(66, 41, -1) 31 +(66, 42, -1) 32 +(66, 43, -1) 32 +(66, 44, -1) 33 +(66, 45, -1) 33 +(66, 46, -1) 33 +(66, 47, -1) 34 +(66, 48, -1) 34 +(66, 49, -1) 34 +(66, 50, -1) 34 +(66, 51, -1) 34 +(66, 52, -1) 34 +(66, 53, -1) 34 +(66, 54, -1) 34 +(66, 55, -1) 33 +(66, 56, -1) 33 +(66, 57, -1) 33 +(66, 58, -1) 32 +(66, 59, -1) 32 +(66, 60, -1) 31 +(66, 61, -1) 31 +(66, 62, -1) 30 +(66, 63, -1) 30 +(66, 64, -1) 29 +(66, 65, -1) 28 +(66, 66, -1) 28 +(66, 67, -1) 27 +(66, 68, -1) 26 +(66, 69, -1) 25 +(66, 70, -1) 25 +(66, 71, -1) 24 +(66, 72, -1) 23 +(66, 73, -1) 22 +(66, 74, -1) 21 +(66, 75, -1) 21 +(66, 76, -1) 20 +(66, 77, -1) 19 +(66, 78, -1) 18 +(66, 79, -1) 17 +(66, 80, -1) 16 +(66, 81, -1) 16 +(66, 82, -1) 15 +(66, 83, -1) 14 +(66, 84, -1) 13 +(66, 85, -1) 12 +(66, 86, -1) 11 +(66, 87, -1) 10 +(66, 88, -1) 9 +(66, 89, -1) 8 +(66, 90, -1) 7 +(66, 91, -1) 6 +(66, 92, -1) 6 +(66, 93, -1) 5 +(66, 94, -1) 4 +(66, 95, -1) 3 +(67, 6, -1) 2 +(67, 7, -1) 3 +(67, 8, -1) 4 +(67, 9, -1) 5 +(67, 10, -1) 6 +(67, 11, -1) 7 +(67, 12, -1) 8 +(67, 13, -1) 9 +(67, 14, -1) 10 +(67, 15, -1) 11 +(67, 16, -1) 11 +(67, 17, -1) 12 +(67, 18, -1) 13 +(67, 19, -1) 14 +(67, 20, -1) 15 +(67, 21, -1) 16 +(67, 22, -1) 17 +(67, 23, -1) 18 +(67, 24, -1) 18 +(67, 25, -1) 19 +(67, 26, -1) 20 +(67, 27, -1) 21 +(67, 28, -1) 22 +(67, 29, -1) 23 +(67, 30, -1) 23 +(67, 31, -1) 24 +(67, 32, -1) 25 +(67, 33, -1) 26 +(67, 34, -1) 26 +(67, 35, -1) 27 +(67, 36, -1) 28 +(67, 37, -1) 28 +(67, 38, -1) 29 +(67, 39, -1) 29 +(67, 40, -1) 30 +(67, 41, -1) 30 +(67, 42, -1) 31 +(67, 43, -1) 31 +(67, 44, -1) 32 +(67, 45, -1) 32 +(67, 46, -1) 32 +(67, 47, -1) 33 +(67, 48, -1) 33 +(67, 49, -1) 33 +(67, 50, -1) 33 +(67, 51, -1) 33 +(67, 52, -1) 33 +(67, 53, -1) 33 +(67, 54, -1) 33 +(67, 55, -1) 32 +(67, 56, -1) 32 +(67, 57, -1) 32 +(67, 58, -1) 31 +(67, 59, -1) 31 +(67, 60, -1) 30 +(67, 61, -1) 30 +(67, 62, -1) 29 +(67, 63, -1) 29 +(67, 64, -1) 28 +(67, 65, -1) 28 +(67, 66, -1) 27 +(67, 67, -1) 26 +(67, 68, -1) 26 +(67, 69, -1) 25 +(67, 70, -1) 24 +(67, 71, -1) 23 +(67, 72, -1) 23 +(67, 73, -1) 22 +(67, 74, -1) 21 +(67, 75, -1) 20 +(67, 76, -1) 19 +(67, 77, -1) 18 +(67, 78, -1) 18 +(67, 79, -1) 17 +(67, 80, -1) 16 +(67, 81, -1) 15 +(67, 82, -1) 14 +(67, 83, -1) 13 +(67, 84, -1) 12 +(67, 85, -1) 11 +(67, 86, -1) 11 +(67, 87, -1) 10 +(67, 88, -1) 9 +(67, 89, -1) 8 +(67, 90, -1) 7 +(67, 91, -1) 6 +(67, 92, -1) 5 +(67, 93, -1) 4 +(67, 94, -1) 3 +(67, 95, -1) 2 +(68, 6, -1) 2 +(68, 7, -1) 3 +(68, 8, -1) 4 +(68, 9, -1) 5 +(68, 10, -1) 6 +(68, 11, -1) 7 +(68, 12, -1) 7 +(68, 13, -1) 8 +(68, 14, -1) 9 +(68, 15, -1) 10 +(68, 16, -1) 11 +(68, 17, -1) 12 +(68, 18, -1) 13 +(68, 19, -1) 14 +(68, 20, -1) 15 +(68, 21, -1) 15 +(68, 22, -1) 16 +(68, 23, -1) 17 +(68, 24, -1) 18 +(68, 25, -1) 19 +(68, 26, -1) 20 +(68, 27, -1) 20 +(68, 28, -1) 21 +(68, 29, -1) 22 +(68, 30, -1) 23 +(68, 31, -1) 23 +(68, 32, -1) 24 +(68, 33, -1) 25 +(68, 34, -1) 26 +(68, 35, -1) 26 +(68, 36, -1) 27 +(68, 37, -1) 27 +(68, 38, -1) 28 +(68, 39, -1) 29 +(68, 40, -1) 29 +(68, 41, -1) 30 +(68, 42, -1) 30 +(68, 43, -1) 30 +(68, 44, -1) 31 +(68, 45, -1) 31 +(68, 46, -1) 31 +(68, 47, -1) 32 +(68, 48, -1) 32 +(68, 49, -1) 32 +(68, 50, -1) 32 +(68, 51, -1) 32 +(68, 52, -1) 32 +(68, 53, -1) 32 +(68, 54, -1) 32 +(68, 55, -1) 31 +(68, 56, -1) 31 +(68, 57, -1) 31 +(68, 58, -1) 30 +(68, 59, -1) 30 +(68, 60, -1) 30 +(68, 61, -1) 29 +(68, 62, -1) 29 +(68, 63, -1) 28 +(68, 64, -1) 27 +(68, 65, -1) 27 +(68, 66, -1) 26 +(68, 67, -1) 26 +(68, 68, -1) 25 +(68, 69, -1) 24 +(68, 70, -1) 23 +(68, 71, -1) 23 +(68, 72, -1) 22 +(68, 73, -1) 21 +(68, 74, -1) 20 +(68, 75, -1) 20 +(68, 76, -1) 19 +(68, 77, -1) 18 +(68, 78, -1) 17 +(68, 79, -1) 16 +(68, 80, -1) 15 +(68, 81, -1) 15 +(68, 82, -1) 14 +(68, 83, -1) 13 +(68, 84, -1) 12 +(68, 85, -1) 11 +(68, 86, -1) 10 +(68, 87, -1) 9 +(68, 88, -1) 8 +(68, 89, -1) 7 +(68, 90, -1) 7 +(68, 91, -1) 6 +(68, 92, -1) 5 +(68, 93, -1) 4 +(68, 94, -1) 3 +(68, 95, -1) 2 +(69, 6, -1) 2 +(69, 7, -1) 2 +(69, 8, -1) 3 +(69, 9, -1) 4 +(69, 10, -1) 5 +(69, 11, -1) 6 +(69, 12, -1) 7 +(69, 13, -1) 8 +(69, 14, -1) 9 +(69, 15, -1) 10 +(69, 16, -1) 11 +(69, 17, -1) 11 +(69, 18, -1) 12 +(69, 19, -1) 13 +(69, 20, -1) 14 +(69, 21, -1) 15 +(69, 22, -1) 16 +(69, 23, -1) 17 +(69, 24, -1) 17 +(69, 25, -1) 18 +(69, 26, -1) 19 +(69, 27, -1) 20 +(69, 28, -1) 20 +(69, 29, -1) 21 +(69, 30, -1) 22 +(69, 31, -1) 23 +(69, 32, -1) 23 +(69, 33, -1) 24 +(69, 34, -1) 25 +(69, 35, -1) 25 +(69, 36, -1) 26 +(69, 37, -1) 27 +(69, 38, -1) 27 +(69, 39, -1) 28 +(69, 40, -1) 28 +(69, 41, -1) 29 +(69, 42, -1) 29 +(69, 43, -1) 30 +(69, 44, -1) 30 +(69, 45, -1) 30 +(69, 46, -1) 30 +(69, 47, -1) 31 +(69, 48, -1) 31 +(69, 49, -1) 31 +(69, 50, -1) 31 +(69, 51, -1) 31 +(69, 52, -1) 31 +(69, 53, -1) 31 +(69, 54, -1) 31 +(69, 55, -1) 30 +(69, 56, -1) 30 +(69, 57, -1) 30 +(69, 58, -1) 30 +(69, 59, -1) 29 +(69, 60, -1) 29 +(69, 61, -1) 28 +(69, 62, -1) 28 +(69, 63, -1) 27 +(69, 64, -1) 27 +(69, 65, -1) 26 +(69, 66, -1) 25 +(69, 67, -1) 25 +(69, 68, -1) 24 +(69, 69, -1) 23 +(69, 70, -1) 23 +(69, 71, -1) 22 +(69, 72, -1) 21 +(69, 73, -1) 20 +(69, 74, -1) 20 +(69, 75, -1) 19 +(69, 76, -1) 18 +(69, 77, -1) 17 +(69, 78, -1) 17 +(69, 79, -1) 16 +(69, 80, -1) 15 +(69, 81, -1) 14 +(69, 82, -1) 13 +(69, 83, -1) 12 +(69, 84, -1) 11 +(69, 85, -1) 11 +(69, 86, -1) 10 +(69, 87, -1) 9 +(69, 88, -1) 8 +(69, 89, -1) 7 +(69, 90, -1) 6 +(69, 91, -1) 5 +(69, 92, -1) 4 +(69, 93, -1) 3 +(69, 94, -1) 2 +(69, 95, -1) 2 +(70, 6, -1) 1 +(70, 7, -1) 2 +(70, 8, -1) 3 +(70, 9, -1) 4 +(70, 10, -1) 5 +(70, 11, -1) 6 +(70, 12, -1) 7 +(70, 13, -1) 7 +(70, 14, -1) 8 +(70, 15, -1) 9 +(70, 16, -1) 10 +(70, 17, -1) 11 +(70, 18, -1) 12 +(70, 19, -1) 13 +(70, 20, -1) 13 +(70, 21, -1) 14 +(70, 22, -1) 15 +(70, 23, -1) 16 +(70, 24, -1) 17 +(70, 25, -1) 18 +(70, 26, -1) 18 +(70, 27, -1) 19 +(70, 28, -1) 20 +(70, 29, -1) 21 +(70, 30, -1) 21 +(70, 31, -1) 22 +(70, 32, -1) 23 +(70, 33, -1) 23 +(70, 34, -1) 24 +(70, 35, -1) 25 +(70, 36, -1) 25 +(70, 37, -1) 26 +(70, 38, -1) 26 +(70, 39, -1) 27 +(70, 40, -1) 27 +(70, 41, -1) 28 +(70, 42, -1) 28 +(70, 43, -1) 29 +(70, 44, -1) 29 +(70, 45, -1) 29 +(70, 46, -1) 30 +(70, 47, -1) 30 +(70, 48, -1) 30 +(70, 49, -1) 30 +(70, 50, -1) 30 +(70, 51, -1) 30 +(70, 52, -1) 30 +(70, 53, -1) 30 +(70, 54, -1) 30 +(70, 55, -1) 30 +(70, 56, -1) 29 +(70, 57, -1) 29 +(70, 58, -1) 29 +(70, 59, -1) 28 +(70, 60, -1) 28 +(70, 61, -1) 27 +(70, 62, -1) 27 +(70, 63, -1) 26 +(70, 64, -1) 26 +(70, 65, -1) 25 +(70, 66, -1) 25 +(70, 67, -1) 24 +(70, 68, -1) 23 +(70, 69, -1) 23 +(70, 70, -1) 22 +(70, 71, -1) 21 +(70, 72, -1) 21 +(70, 73, -1) 20 +(70, 74, -1) 19 +(70, 75, -1) 18 +(70, 76, -1) 18 +(70, 77, -1) 17 +(70, 78, -1) 16 +(70, 79, -1) 15 +(70, 80, -1) 14 +(70, 81, -1) 13 +(70, 82, -1) 13 +(70, 83, -1) 12 +(70, 84, -1) 11 +(70, 85, -1) 10 +(70, 86, -1) 9 +(70, 87, -1) 8 +(70, 88, -1) 7 +(70, 89, -1) 7 +(70, 90, -1) 6 +(70, 91, -1) 5 +(70, 92, -1) 4 +(70, 93, -1) 3 +(70, 94, -1) 2 +(70, 95, -1) 1 +(71, 6, -1) 1 +(71, 7, -1) 2 +(71, 8, -1) 3 +(71, 9, -1) 4 +(71, 10, -1) 5 +(71, 11, -1) 5 +(71, 12, -1) 6 +(71, 13, -1) 7 +(71, 14, -1) 8 +(71, 15, -1) 9 +(71, 16, -1) 10 +(71, 17, -1) 11 +(71, 18, -1) 11 +(71, 19, -1) 12 +(71, 20, -1) 13 +(71, 21, -1) 14 +(71, 22, -1) 15 +(71, 23, -1) 15 +(71, 24, -1) 16 +(71, 25, -1) 17 +(71, 26, -1) 18 +(71, 27, -1) 19 +(71, 28, -1) 19 +(71, 29, -1) 20 +(71, 30, -1) 21 +(71, 31, -1) 21 +(71, 32, -1) 22 +(71, 33, -1) 23 +(71, 34, -1) 23 +(71, 35, -1) 24 +(71, 36, -1) 24 +(71, 37, -1) 25 +(71, 38, -1) 26 +(71, 39, -1) 26 +(71, 40, -1) 27 +(71, 41, -1) 27 +(71, 42, -1) 27 +(71, 43, -1) 28 +(71, 44, -1) 28 +(71, 45, -1) 28 +(71, 46, -1) 29 +(71, 47, -1) 29 +(71, 48, -1) 29 +(71, 49, -1) 29 +(71, 50, -1) 29 +(71, 51, -1) 29 +(71, 52, -1) 29 +(71, 53, -1) 29 +(71, 54, -1) 29 +(71, 55, -1) 29 +(71, 56, -1) 28 +(71, 57, -1) 28 +(71, 58, -1) 28 +(71, 59, -1) 27 +(71, 60, -1) 27 +(71, 61, -1) 27 +(71, 62, -1) 26 +(71, 63, -1) 26 +(71, 64, -1) 25 +(71, 65, -1) 24 +(71, 66, -1) 24 +(71, 67, -1) 23 +(71, 68, -1) 23 +(71, 69, -1) 22 +(71, 70, -1) 21 +(71, 71, -1) 21 +(71, 72, -1) 20 +(71, 73, -1) 19 +(71, 74, -1) 19 +(71, 75, -1) 18 +(71, 76, -1) 17 +(71, 77, -1) 16 +(71, 78, -1) 15 +(71, 79, -1) 15 +(71, 80, -1) 14 +(71, 81, -1) 13 +(71, 82, -1) 12 +(71, 83, -1) 11 +(71, 84, -1) 11 +(71, 85, -1) 10 +(71, 86, -1) 9 +(71, 87, -1) 8 +(71, 88, -1) 7 +(71, 89, -1) 6 +(71, 90, -1) 5 +(71, 91, -1) 5 +(71, 92, -1) 4 +(71, 93, -1) 3 +(71, 94, -1) 2 +(71, 95, -1) 1 +(72, 6, -1) 1 +(72, 7, -1) 1 +(72, 8, -1) 2 +(72, 9, -1) 3 +(72, 10, -1) 4 +(72, 11, -1) 5 +(72, 12, -1) 6 +(72, 13, -1) 7 +(72, 14, -1) 7 +(72, 15, -1) 8 +(72, 16, -1) 9 +(72, 17, -1) 10 +(72, 18, -1) 11 +(72, 19, -1) 12 +(72, 20, -1) 12 +(72, 21, -1) 13 +(72, 22, -1) 14 +(72, 23, -1) 15 +(72, 24, -1) 16 +(72, 25, -1) 16 +(72, 26, -1) 17 +(72, 27, -1) 18 +(72, 28, -1) 19 +(72, 29, -1) 19 +(72, 30, -1) 20 +(72, 31, -1) 21 +(72, 32, -1) 21 +(72, 33, -1) 22 +(72, 34, -1) 23 +(72, 35, -1) 23 +(72, 36, -1) 24 +(72, 37, -1) 24 +(72, 38, -1) 25 +(72, 39, -1) 25 +(72, 40, -1) 26 +(72, 41, -1) 26 +(72, 42, -1) 26 +(72, 43, -1) 27 +(72, 44, -1) 27 +(72, 45, -1) 27 +(72, 46, -1) 28 +(72, 47, -1) 28 +(72, 48, -1) 28 +(72, 49, -1) 28 +(72, 50, -1) 28 +(72, 51, -1) 28 +(72, 52, -1) 28 +(72, 53, -1) 28 +(72, 54, -1) 28 +(72, 55, -1) 28 +(72, 56, -1) 27 +(72, 57, -1) 27 +(72, 58, -1) 27 +(72, 59, -1) 26 +(72, 60, -1) 26 +(72, 61, -1) 26 +(72, 62, -1) 25 +(72, 63, -1) 25 +(72, 64, -1) 24 +(72, 65, -1) 24 +(72, 66, -1) 23 +(72, 67, -1) 23 +(72, 68, -1) 22 +(72, 69, -1) 21 +(72, 70, -1) 21 +(72, 71, -1) 20 +(72, 72, -1) 19 +(72, 73, -1) 19 +(72, 74, -1) 18 +(72, 75, -1) 17 +(72, 76, -1) 16 +(72, 77, -1) 16 +(72, 78, -1) 15 +(72, 79, -1) 14 +(72, 80, -1) 13 +(72, 81, -1) 12 +(72, 82, -1) 12 +(72, 83, -1) 11 +(72, 84, -1) 10 +(72, 85, -1) 9 +(72, 86, -1) 8 +(72, 87, -1) 7 +(72, 88, -1) 7 +(72, 89, -1) 6 +(72, 90, -1) 5 +(72, 91, -1) 4 +(72, 92, -1) 3 +(72, 93, -1) 2 +(72, 94, -1) 1 +(72, 95, -1) 1 +(73, 6, -1) 0 +(73, 7, -1) 1 +(73, 8, -1) 2 +(73, 9, -1) 3 +(73, 10, -1) 4 +(73, 11, -1) 4 +(73, 12, -1) 5 +(73, 13, -1) 6 +(73, 14, -1) 7 +(73, 15, -1) 8 +(73, 16, -1) 9 +(73, 17, -1) 9 +(73, 18, -1) 10 +(73, 19, -1) 11 +(73, 20, -1) 12 +(73, 21, -1) 13 +(73, 22, -1) 13 +(73, 23, -1) 14 +(73, 24, -1) 15 +(73, 25, -1) 16 +(73, 26, -1) 16 +(73, 27, -1) 17 +(73, 28, -1) 18 +(73, 29, -1) 19 +(73, 30, -1) 19 +(73, 31, -1) 20 +(73, 32, -1) 20 +(73, 33, -1) 21 +(73, 34, -1) 22 +(73, 35, -1) 22 +(73, 36, -1) 23 +(73, 37, -1) 23 +(73, 38, -1) 24 +(73, 39, -1) 24 +(73, 40, -1) 25 +(73, 41, -1) 25 +(73, 42, -1) 25 +(73, 43, -1) 26 +(73, 44, -1) 26 +(73, 45, -1) 26 +(73, 46, -1) 27 +(73, 47, -1) 27 +(73, 48, -1) 27 +(73, 49, -1) 27 +(73, 50, -1) 27 +(73, 51, -1) 27 +(73, 52, -1) 27 +(73, 53, -1) 27 +(73, 54, -1) 27 +(73, 55, -1) 27 +(73, 56, -1) 26 +(73, 57, -1) 26 +(73, 58, -1) 26 +(73, 59, -1) 25 +(73, 60, -1) 25 +(73, 61, -1) 25 +(73, 62, -1) 24 +(73, 63, -1) 24 +(73, 64, -1) 23 +(73, 65, -1) 23 +(73, 66, -1) 22 +(73, 67, -1) 22 +(73, 68, -1) 21 +(73, 69, -1) 20 +(73, 70, -1) 20 +(73, 71, -1) 19 +(73, 72, -1) 19 +(73, 73, -1) 18 +(73, 74, -1) 17 +(73, 75, -1) 16 +(73, 76, -1) 16 +(73, 77, -1) 15 +(73, 78, -1) 14 +(73, 79, -1) 13 +(73, 80, -1) 13 +(73, 81, -1) 12 +(73, 82, -1) 11 +(73, 83, -1) 10 +(73, 84, -1) 9 +(73, 85, -1) 9 +(73, 86, -1) 8 +(73, 87, -1) 7 +(73, 88, -1) 6 +(73, 89, -1) 5 +(73, 90, -1) 4 +(73, 91, -1) 4 +(73, 92, -1) 3 +(73, 93, -1) 2 +(73, 94, -1) 1 +(73, 95, -1) 0 +(74, 6, -1) 0 +(74, 7, -1) 0 +(74, 8, -1) 1 +(74, 9, -1) 2 +(74, 10, -1) 3 +(74, 11, -1) 4 +(74, 12, -1) 5 +(74, 13, -1) 6 +(74, 14, -1) 6 +(74, 15, -1) 7 +(74, 16, -1) 8 +(74, 17, -1) 9 +(74, 18, -1) 10 +(74, 19, -1) 10 +(74, 20, -1) 11 +(74, 21, -1) 12 +(74, 22, -1) 13 +(74, 23, -1) 14 +(74, 24, -1) 14 +(74, 25, -1) 15 +(74, 26, -1) 16 +(74, 27, -1) 16 +(74, 28, -1) 17 +(74, 29, -1) 18 +(74, 30, -1) 18 +(74, 31, -1) 19 +(74, 32, -1) 20 +(74, 33, -1) 20 +(74, 34, -1) 21 +(74, 35, -1) 21 +(74, 36, -1) 22 +(74, 37, -1) 22 +(74, 38, -1) 23 +(74, 39, -1) 23 +(74, 40, -1) 24 +(74, 41, -1) 24 +(74, 42, -1) 25 +(74, 43, -1) 25 +(74, 44, -1) 25 +(74, 45, -1) 25 +(74, 46, -1) 26 +(74, 47, -1) 26 +(74, 48, -1) 26 +(74, 49, -1) 26 +(74, 50, -1) 26 +(74, 51, -1) 26 +(74, 52, -1) 26 +(74, 53, -1) 26 +(74, 54, -1) 26 +(74, 55, -1) 26 +(74, 56, -1) 25 +(74, 57, -1) 25 +(74, 58, -1) 25 +(74, 59, -1) 25 +(74, 60, -1) 24 +(74, 61, -1) 24 +(74, 62, -1) 23 +(74, 63, -1) 23 +(74, 64, -1) 22 +(74, 65, -1) 22 +(74, 66, -1) 21 +(74, 67, -1) 21 +(74, 68, -1) 20 +(74, 69, -1) 20 +(74, 70, -1) 19 +(74, 71, -1) 18 +(74, 72, -1) 18 +(74, 73, -1) 17 +(74, 74, -1) 16 +(74, 75, -1) 16 +(74, 76, -1) 15 +(74, 77, -1) 14 +(74, 78, -1) 14 +(74, 79, -1) 13 +(74, 80, -1) 12 +(74, 81, -1) 11 +(74, 82, -1) 10 +(74, 83, -1) 10 +(74, 84, -1) 9 +(74, 85, -1) 8 +(74, 86, -1) 7 +(74, 87, -1) 6 +(74, 88, -1) 6 +(74, 89, -1) 5 +(74, 90, -1) 4 +(74, 91, -1) 3 +(74, 92, -1) 2 +(74, 93, -1) 1 +(74, 94, -1) 0 +(74, 95, -1) 0 +(75, 6, -1) 0 +(75, 7, -1) 0 +(75, 8, -1) 1 +(75, 9, -1) 2 +(75, 10, -1) 3 +(75, 11, -1) 3 +(75, 12, -1) 4 +(75, 13, -1) 5 +(75, 14, -1) 6 +(75, 15, -1) 7 +(75, 16, -1) 7 +(75, 17, -1) 8 +(75, 18, -1) 9 +(75, 19, -1) 10 +(75, 20, -1) 11 +(75, 21, -1) 11 +(75, 22, -1) 12 +(75, 23, -1) 13 +(75, 24, -1) 14 +(75, 25, -1) 14 +(75, 26, -1) 15 +(75, 27, -1) 16 +(75, 28, -1) 16 +(75, 29, -1) 17 +(75, 30, -1) 18 +(75, 31, -1) 18 +(75, 32, -1) 19 +(75, 33, -1) 19 +(75, 34, -1) 20 +(75, 35, -1) 21 +(75, 36, -1) 21 +(75, 37, -1) 22 +(75, 38, -1) 22 +(75, 39, -1) 22 +(75, 40, -1) 23 +(75, 41, -1) 23 +(75, 42, -1) 24 +(75, 43, -1) 24 +(75, 44, -1) 24 +(75, 45, -1) 24 +(75, 46, -1) 25 +(75, 47, -1) 25 +(75, 48, -1) 25 +(75, 49, -1) 25 +(75, 50, -1) 25 +(75, 51, -1) 25 +(75, 52, -1) 25 +(75, 53, -1) 25 +(75, 54, -1) 25 +(75, 55, -1) 25 +(75, 56, -1) 24 +(75, 57, -1) 24 +(75, 58, -1) 24 +(75, 59, -1) 24 +(75, 60, -1) 23 +(75, 61, -1) 23 +(75, 62, -1) 22 +(75, 63, -1) 22 +(75, 64, -1) 22 +(75, 65, -1) 21 +(75, 66, -1) 21 +(75, 67, -1) 20 +(75, 68, -1) 19 +(75, 69, -1) 19 +(75, 70, -1) 18 +(75, 71, -1) 18 +(75, 72, -1) 17 +(75, 73, -1) 16 +(75, 74, -1) 16 +(75, 75, -1) 15 +(75, 76, -1) 14 +(75, 77, -1) 14 +(75, 78, -1) 13 +(75, 79, -1) 12 +(75, 80, -1) 11 +(75, 81, -1) 11 +(75, 82, -1) 10 +(75, 83, -1) 9 +(75, 84, -1) 8 +(75, 85, -1) 7 +(75, 86, -1) 7 +(75, 87, -1) 6 +(75, 88, -1) 5 +(75, 89, -1) 4 +(75, 90, -1) 3 +(75, 91, -1) 3 +(75, 92, -1) 2 +(75, 93, -1) 1 +(75, 94, -1) 0 +(75, 95, -1) 0 +(76, 9, -1) 1 +(76, 10, -1) 2 +(76, 11, -1) 3 +(76, 12, -1) 4 +(76, 13, -1) 5 +(76, 14, -1) 5 +(76, 15, -1) 6 +(76, 16, -1) 7 +(76, 17, -1) 8 +(76, 18, -1) 9 +(76, 19, -1) 9 +(76, 20, -1) 10 +(76, 21, -1) 11 +(76, 22, -1) 12 +(76, 23, -1) 12 +(76, 24, -1) 13 +(76, 25, -1) 14 +(76, 26, -1) 14 +(76, 27, -1) 15 +(76, 28, -1) 16 +(76, 29, -1) 16 +(76, 30, -1) 17 +(76, 31, -1) 18 +(76, 32, -1) 18 +(76, 33, -1) 19 +(76, 34, -1) 19 +(76, 35, -1) 20 +(76, 36, -1) 20 +(76, 37, -1) 21 +(76, 38, -1) 21 +(76, 39, -1) 22 +(76, 40, -1) 22 +(76, 41, -1) 22 +(76, 42, -1) 23 +(76, 43, -1) 23 +(76, 44, -1) 23 +(76, 45, -1) 23 +(76, 46, -1) 24 +(76, 47, -1) 24 +(76, 48, -1) 24 +(76, 49, -1) 24 +(76, 50, -1) 24 +(76, 51, -1) 24 +(76, 52, -1) 24 +(76, 53, -1) 24 +(76, 54, -1) 24 +(76, 55, -1) 24 +(76, 56, -1) 23 +(76, 57, -1) 23 +(76, 58, -1) 23 +(76, 59, -1) 23 +(76, 60, -1) 22 +(76, 61, -1) 22 +(76, 62, -1) 22 +(76, 63, -1) 21 +(76, 64, -1) 21 +(76, 65, -1) 20 +(76, 66, -1) 20 +(76, 67, -1) 19 +(76, 68, -1) 19 +(76, 69, -1) 18 +(76, 70, -1) 18 +(76, 71, -1) 17 +(76, 72, -1) 16 +(76, 73, -1) 16 +(76, 74, -1) 15 +(76, 75, -1) 14 +(76, 76, -1) 14 +(76, 77, -1) 13 +(76, 78, -1) 12 +(76, 79, -1) 12 +(76, 80, -1) 11 +(76, 81, -1) 10 +(76, 82, -1) 9 +(76, 83, -1) 9 +(76, 84, -1) 8 +(76, 85, -1) 7 +(76, 86, -1) 6 +(76, 87, -1) 5 +(76, 88, -1) 5 +(76, 89, -1) 4 +(76, 90, -1) 3 +(76, 91, -1) 2 +(76, 92, -1) 1 +(77, 9, -1) 1 +(77, 10, -1) 2 +(77, 11, -1) 2 +(77, 12, -1) 3 +(77, 13, -1) 4 +(77, 14, -1) 5 +(77, 15, -1) 6 +(77, 16, -1) 6 +(77, 17, -1) 7 +(77, 18, -1) 8 +(77, 19, -1) 9 +(77, 20, -1) 9 +(77, 21, -1) 10 +(77, 22, -1) 11 +(77, 23, -1) 12 +(77, 24, -1) 12 +(77, 25, -1) 13 +(77, 26, -1) 14 +(77, 27, -1) 14 +(77, 28, -1) 15 +(77, 29, -1) 16 +(77, 30, -1) 16 +(77, 31, -1) 17 +(77, 32, -1) 17 +(77, 33, -1) 18 +(77, 34, -1) 18 +(77, 35, -1) 19 +(77, 36, -1) 19 +(77, 37, -1) 20 +(77, 38, -1) 20 +(77, 39, -1) 21 +(77, 40, -1) 21 +(77, 41, -1) 21 +(77, 42, -1) 22 +(77, 43, -1) 22 +(77, 44, -1) 22 +(77, 45, -1) 22 +(77, 46, -1) 23 +(77, 47, -1) 23 +(77, 48, -1) 23 +(77, 49, -1) 23 +(77, 50, -1) 23 +(77, 51, -1) 23 +(77, 52, -1) 23 +(77, 53, -1) 23 +(77, 54, -1) 23 +(77, 55, -1) 23 +(77, 56, -1) 22 +(77, 57, -1) 22 +(77, 58, -1) 22 +(77, 59, -1) 22 +(77, 60, -1) 21 +(77, 61, -1) 21 +(77, 62, -1) 21 +(77, 63, -1) 20 +(77, 64, -1) 20 +(77, 65, -1) 19 +(77, 66, -1) 19 +(77, 67, -1) 18 +(77, 68, -1) 18 +(77, 69, -1) 17 +(77, 70, -1) 17 +(77, 71, -1) 16 +(77, 72, -1) 16 +(77, 73, -1) 15 +(77, 74, -1) 14 +(77, 75, -1) 14 +(77, 76, -1) 13 +(77, 77, -1) 12 +(77, 78, -1) 12 +(77, 79, -1) 11 +(77, 80, -1) 10 +(77, 81, -1) 9 +(77, 82, -1) 9 +(77, 83, -1) 8 +(77, 84, -1) 7 +(77, 85, -1) 6 +(77, 86, -1) 6 +(77, 87, -1) 5 +(77, 88, -1) 4 +(77, 89, -1) 3 +(77, 90, -1) 2 +(77, 91, -1) 2 +(77, 92, -1) 1 +(78, 9, -1) 0 +(78, 10, -1) 1 +(78, 11, -1) 2 +(78, 12, -1) 3 +(78, 13, -1) 3 +(78, 14, -1) 4 +(78, 15, -1) 5 +(78, 16, -1) 6 +(78, 17, -1) 7 +(78, 18, -1) 7 +(78, 19, -1) 8 +(78, 20, -1) 9 +(78, 21, -1) 9 +(78, 22, -1) 10 +(78, 23, -1) 11 +(78, 24, -1) 12 +(78, 25, -1) 12 +(78, 26, -1) 13 +(78, 27, -1) 14 +(78, 28, -1) 14 +(78, 29, -1) 15 +(78, 30, -1) 15 +(78, 31, -1) 16 +(78, 32, -1) 17 +(78, 33, -1) 17 +(78, 34, -1) 18 +(78, 35, -1) 18 +(78, 36, -1) 19 +(78, 37, -1) 19 +(78, 38, -1) 19 +(78, 39, -1) 20 +(78, 40, -1) 20 +(78, 41, -1) 20 +(78, 42, -1) 21 +(78, 43, -1) 21 +(78, 44, -1) 21 +(78, 45, -1) 21 +(78, 46, -1) 22 +(78, 47, -1) 22 +(78, 48, -1) 22 +(78, 49, -1) 22 +(78, 50, -1) 22 +(78, 51, -1) 22 +(78, 52, -1) 22 +(78, 53, -1) 22 +(78, 54, -1) 22 +(78, 55, -1) 22 +(78, 56, -1) 21 +(78, 57, -1) 21 +(78, 58, -1) 21 +(78, 59, -1) 21 +(78, 60, -1) 20 +(78, 61, -1) 20 +(78, 62, -1) 20 +(78, 63, -1) 19 +(78, 64, -1) 19 +(78, 65, -1) 19 +(78, 66, -1) 18 +(78, 67, -1) 18 +(78, 68, -1) 17 +(78, 69, -1) 17 +(78, 70, -1) 16 +(78, 71, -1) 15 +(78, 72, -1) 15 +(78, 73, -1) 14 +(78, 74, -1) 14 +(78, 75, -1) 13 +(78, 76, -1) 12 +(78, 77, -1) 12 +(78, 78, -1) 11 +(78, 79, -1) 10 +(78, 80, -1) 9 +(78, 81, -1) 9 +(78, 82, -1) 8 +(78, 83, -1) 7 +(78, 84, -1) 7 +(78, 85, -1) 6 +(78, 86, -1) 5 +(78, 87, -1) 4 +(78, 88, -1) 3 +(78, 89, -1) 3 +(78, 90, -1) 2 +(78, 91, -1) 1 +(78, 92, -1) 0 +(79, 9, -1) 0 +(79, 10, -1) 1 +(79, 11, -1) 1 +(79, 12, -1) 2 +(79, 13, -1) 3 +(79, 14, -1) 4 +(79, 15, -1) 4 +(79, 16, -1) 5 +(79, 17, -1) 6 +(79, 18, -1) 7 +(79, 19, -1) 7 +(79, 20, -1) 8 +(79, 21, -1) 9 +(79, 22, -1) 9 +(79, 23, -1) 10 +(79, 24, -1) 11 +(79, 25, -1) 12 +(79, 26, -1) 12 +(79, 27, -1) 13 +(79, 28, -1) 13 +(79, 29, -1) 14 +(79, 30, -1) 15 +(79, 31, -1) 15 +(79, 32, -1) 16 +(79, 33, -1) 16 +(79, 34, -1) 17 +(79, 35, -1) 17 +(79, 36, -1) 18 +(79, 37, -1) 18 +(79, 38, -1) 18 +(79, 39, -1) 19 +(79, 40, -1) 19 +(79, 41, -1) 20 +(79, 42, -1) 20 +(79, 43, -1) 20 +(79, 44, -1) 20 +(79, 45, -1) 20 +(79, 46, -1) 21 +(79, 47, -1) 21 +(79, 48, -1) 21 +(79, 49, -1) 21 +(79, 50, -1) 21 +(79, 51, -1) 21 +(79, 52, -1) 21 +(79, 53, -1) 21 +(79, 54, -1) 21 +(79, 55, -1) 21 +(79, 56, -1) 20 +(79, 57, -1) 20 +(79, 58, -1) 20 +(79, 59, -1) 20 +(79, 60, -1) 20 +(79, 61, -1) 19 +(79, 62, -1) 19 +(79, 63, -1) 18 +(79, 64, -1) 18 +(79, 65, -1) 18 +(79, 66, -1) 17 +(79, 67, -1) 17 +(79, 68, -1) 16 +(79, 69, -1) 16 +(79, 70, -1) 15 +(79, 71, -1) 15 +(79, 72, -1) 14 +(79, 73, -1) 13 +(79, 74, -1) 13 +(79, 75, -1) 12 +(79, 76, -1) 12 +(79, 77, -1) 11 +(79, 78, -1) 10 +(79, 79, -1) 9 +(79, 80, -1) 9 +(79, 81, -1) 8 +(79, 82, -1) 7 +(79, 83, -1) 7 +(79, 84, -1) 6 +(79, 85, -1) 5 +(79, 86, -1) 4 +(79, 87, -1) 4 +(79, 88, -1) 3 +(79, 89, -1) 2 +(79, 90, -1) 1 +(79, 91, -1) 1 +(79, 92, -1) 0 +(80, 9, -1) 0 +(80, 10, -1) 0 +(80, 11, -1) 1 +(80, 12, -1) 1 +(80, 13, -1) 2 +(80, 14, -1) 3 +(80, 15, -1) 4 +(80, 16, -1) 4 +(80, 17, -1) 5 +(80, 18, -1) 6 +(80, 19, -1) 7 +(80, 20, -1) 7 +(80, 21, -1) 8 +(80, 22, -1) 9 +(80, 23, -1) 9 +(80, 24, -1) 10 +(80, 25, -1) 11 +(80, 26, -1) 11 +(80, 27, -1) 12 +(80, 28, -1) 13 +(80, 29, -1) 13 +(80, 30, -1) 14 +(80, 31, -1) 14 +(80, 32, -1) 15 +(80, 33, -1) 15 +(80, 34, -1) 16 +(80, 35, -1) 16 +(80, 36, -1) 17 +(80, 37, -1) 17 +(80, 38, -1) 18 +(80, 39, -1) 18 +(80, 40, -1) 18 +(80, 41, -1) 19 +(80, 42, -1) 19 +(80, 43, -1) 19 +(80, 44, -1) 19 +(80, 45, -1) 20 +(80, 46, -1) 20 +(80, 47, -1) 20 +(80, 48, -1) 20 +(80, 49, -1) 20 +(80, 50, -1) 20 +(80, 51, -1) 20 +(80, 52, -1) 20 +(80, 53, -1) 20 +(80, 54, -1) 20 +(80, 55, -1) 20 +(80, 56, -1) 20 +(80, 57, -1) 19 +(80, 58, -1) 19 +(80, 59, -1) 19 +(80, 60, -1) 19 +(80, 61, -1) 18 +(80, 62, -1) 18 +(80, 63, -1) 18 +(80, 64, -1) 17 +(80, 65, -1) 17 +(80, 66, -1) 16 +(80, 67, -1) 16 +(80, 68, -1) 15 +(80, 69, -1) 15 +(80, 70, -1) 14 +(80, 71, -1) 14 +(80, 72, -1) 13 +(80, 73, -1) 13 +(80, 74, -1) 12 +(80, 75, -1) 11 +(80, 76, -1) 11 +(80, 77, -1) 10 +(80, 78, -1) 9 +(80, 79, -1) 9 +(80, 80, -1) 8 +(80, 81, -1) 7 +(80, 82, -1) 7 +(80, 83, -1) 6 +(80, 84, -1) 5 +(80, 85, -1) 4 +(80, 86, -1) 4 +(80, 87, -1) 3 +(80, 88, -1) 2 +(80, 89, -1) 1 +(80, 90, -1) 1 +(80, 91, -1) 0 +(80, 92, -1) 0 +(81, 14, -1) 3 +(81, 15, -1) 3 +(81, 16, -1) 4 +(81, 17, -1) 5 +(81, 18, -1) 5 +(81, 19, -1) 6 +(81, 20, -1) 7 +(81, 21, -1) 7 +(81, 22, -1) 8 +(81, 23, -1) 9 +(81, 24, -1) 9 +(81, 25, -1) 10 +(81, 26, -1) 11 +(81, 27, -1) 11 +(81, 28, -1) 12 +(81, 29, -1) 12 +(81, 30, -1) 13 +(81, 31, -1) 14 +(81, 32, -1) 14 +(81, 33, -1) 15 +(81, 34, -1) 15 +(81, 35, -1) 15 +(81, 36, -1) 16 +(81, 37, -1) 16 +(81, 38, -1) 17 +(81, 39, -1) 17 +(81, 40, -1) 17 +(81, 41, -1) 18 +(81, 42, -1) 18 +(81, 43, -1) 18 +(81, 44, -1) 18 +(81, 45, -1) 19 +(81, 46, -1) 19 +(81, 47, -1) 19 +(81, 48, -1) 19 +(81, 49, -1) 19 +(81, 50, -1) 19 +(81, 51, -1) 19 +(81, 52, -1) 19 +(81, 53, -1) 19 +(81, 54, -1) 19 +(81, 55, -1) 19 +(81, 56, -1) 19 +(81, 57, -1) 18 +(81, 58, -1) 18 +(81, 59, -1) 18 +(81, 60, -1) 18 +(81, 61, -1) 17 +(81, 62, -1) 17 +(81, 63, -1) 17 +(81, 64, -1) 16 +(81, 65, -1) 16 +(81, 66, -1) 15 +(81, 67, -1) 15 +(81, 68, -1) 15 +(81, 69, -1) 14 +(81, 70, -1) 14 +(81, 71, -1) 13 +(81, 72, -1) 12 +(81, 73, -1) 12 +(81, 74, -1) 11 +(81, 75, -1) 11 +(81, 76, -1) 10 +(81, 77, -1) 9 +(81, 78, -1) 9 +(81, 79, -1) 8 +(81, 80, -1) 7 +(81, 81, -1) 7 +(81, 82, -1) 6 +(81, 83, -1) 5 +(81, 84, -1) 5 +(81, 85, -1) 4 +(81, 86, -1) 3 +(81, 87, -1) 3 +(82, 14, -1) 2 +(82, 15, -1) 3 +(82, 16, -1) 3 +(82, 17, -1) 4 +(82, 18, -1) 5 +(82, 19, -1) 5 +(82, 20, -1) 6 +(82, 21, -1) 7 +(82, 22, -1) 7 +(82, 23, -1) 8 +(82, 24, -1) 9 +(82, 25, -1) 9 +(82, 26, -1) 10 +(82, 27, -1) 10 +(82, 28, -1) 11 +(82, 29, -1) 12 +(82, 30, -1) 12 +(82, 31, -1) 13 +(82, 32, -1) 13 +(82, 33, -1) 14 +(82, 34, -1) 14 +(82, 35, -1) 15 +(82, 36, -1) 15 +(82, 37, -1) 15 +(82, 38, -1) 16 +(82, 39, -1) 16 +(82, 40, -1) 16 +(82, 41, -1) 17 +(82, 42, -1) 17 +(82, 43, -1) 17 +(82, 44, -1) 17 +(82, 45, -1) 18 +(82, 46, -1) 18 +(82, 47, -1) 18 +(82, 48, -1) 18 +(82, 49, -1) 18 +(82, 50, -1) 18 +(82, 51, -1) 18 +(82, 52, -1) 18 +(82, 53, -1) 18 +(82, 54, -1) 18 +(82, 55, -1) 18 +(82, 56, -1) 18 +(82, 57, -1) 17 +(82, 58, -1) 17 +(82, 59, -1) 17 +(82, 60, -1) 17 +(82, 61, -1) 16 +(82, 62, -1) 16 +(82, 63, -1) 16 +(82, 64, -1) 15 +(82, 65, -1) 15 +(82, 66, -1) 15 +(82, 67, -1) 14 +(82, 68, -1) 14 +(82, 69, -1) 13 +(82, 70, -1) 13 +(82, 71, -1) 12 +(82, 72, -1) 12 +(82, 73, -1) 11 +(82, 74, -1) 10 +(82, 75, -1) 10 +(82, 76, -1) 9 +(82, 77, -1) 9 +(82, 78, -1) 8 +(82, 79, -1) 7 +(82, 80, -1) 7 +(82, 81, -1) 6 +(82, 82, -1) 5 +(82, 83, -1) 5 +(82, 84, -1) 4 +(82, 85, -1) 3 +(82, 86, -1) 3 +(82, 87, -1) 2 +(83, 14, -1) 1 +(83, 15, -1) 2 +(83, 16, -1) 3 +(83, 17, -1) 3 +(83, 18, -1) 4 +(83, 19, -1) 5 +(83, 20, -1) 5 +(83, 21, -1) 6 +(83, 22, -1) 7 +(83, 23, -1) 7 +(83, 24, -1) 8 +(83, 25, -1) 8 +(83, 26, -1) 9 +(83, 27, -1) 10 +(83, 28, -1) 10 +(83, 29, -1) 11 +(83, 30, -1) 11 +(83, 31, -1) 12 +(83, 32, -1) 12 +(83, 33, -1) 13 +(83, 34, -1) 13 +(83, 35, -1) 14 +(83, 36, -1) 14 +(83, 37, -1) 14 +(83, 38, -1) 15 +(83, 39, -1) 15 +(83, 40, -1) 15 +(83, 41, -1) 16 +(83, 42, -1) 16 +(83, 43, -1) 16 +(83, 44, -1) 16 +(83, 45, -1) 17 +(83, 46, -1) 17 +(83, 47, -1) 17 +(83, 48, -1) 17 +(83, 49, -1) 17 +(83, 50, -1) 17 +(83, 51, -1) 17 +(83, 52, -1) 17 +(83, 53, -1) 17 +(83, 54, -1) 17 +(83, 55, -1) 17 +(83, 56, -1) 17 +(83, 57, -1) 16 +(83, 58, -1) 16 +(83, 59, -1) 16 +(83, 60, -1) 16 +(83, 61, -1) 15 +(83, 62, -1) 15 +(83, 63, -1) 15 +(83, 64, -1) 14 +(83, 65, -1) 14 +(83, 66, -1) 14 +(83, 67, -1) 13 +(83, 68, -1) 13 +(83, 69, -1) 12 +(83, 70, -1) 12 +(83, 71, -1) 11 +(83, 72, -1) 11 +(83, 73, -1) 10 +(83, 74, -1) 10 +(83, 75, -1) 9 +(83, 76, -1) 8 +(83, 77, -1) 8 +(83, 78, -1) 7 +(83, 79, -1) 7 +(83, 80, -1) 6 +(83, 81, -1) 5 +(83, 82, -1) 5 +(83, 83, -1) 4 +(83, 84, -1) 3 +(83, 85, -1) 3 +(83, 86, -1) 2 +(83, 87, -1) 1 +(84, 14, -1) 1 +(84, 15, -1) 1 +(84, 16, -1) 2 +(84, 17, -1) 3 +(84, 18, -1) 3 +(84, 19, -1) 4 +(84, 20, -1) 5 +(84, 21, -1) 5 +(84, 22, -1) 6 +(84, 23, -1) 6 +(84, 24, -1) 7 +(84, 25, -1) 8 +(84, 26, -1) 8 +(84, 27, -1) 9 +(84, 28, -1) 9 +(84, 29, -1) 10 +(84, 30, -1) 10 +(84, 31, -1) 11 +(84, 32, -1) 11 +(84, 33, -1) 12 +(84, 34, -1) 12 +(84, 35, -1) 13 +(84, 36, -1) 13 +(84, 37, -1) 13 +(84, 38, -1) 14 +(84, 39, -1) 14 +(84, 40, -1) 14 +(84, 41, -1) 15 +(84, 42, -1) 15 +(84, 43, -1) 15 +(84, 44, -1) 15 +(84, 45, -1) 16 +(84, 46, -1) 16 +(84, 47, -1) 16 +(84, 48, -1) 16 +(84, 49, -1) 16 +(84, 50, -1) 16 +(84, 51, -1) 16 +(84, 52, -1) 16 +(84, 53, -1) 16 +(84, 54, -1) 16 +(84, 55, -1) 16 +(84, 56, -1) 16 +(84, 57, -1) 15 +(84, 58, -1) 15 +(84, 59, -1) 15 +(84, 60, -1) 15 +(84, 61, -1) 14 +(84, 62, -1) 14 +(84, 63, -1) 14 +(84, 64, -1) 13 +(84, 65, -1) 13 +(84, 66, -1) 13 +(84, 67, -1) 12 +(84, 68, -1) 12 +(84, 69, -1) 11 +(84, 70, -1) 11 +(84, 71, -1) 10 +(84, 72, -1) 10 +(84, 73, -1) 9 +(84, 74, -1) 9 +(84, 75, -1) 8 +(84, 76, -1) 8 +(84, 77, -1) 7 +(84, 78, -1) 6 +(84, 79, -1) 6 +(84, 80, -1) 5 +(84, 81, -1) 5 +(84, 82, -1) 4 +(84, 83, -1) 3 +(84, 84, -1) 3 +(84, 85, -1) 2 +(84, 86, -1) 1 +(84, 87, -1) 1 +(85, 14, -1) 0 +(85, 15, -1) 1 +(85, 16, -1) 1 +(85, 17, -1) 2 +(85, 18, -1) 2 +(85, 19, -1) 3 +(85, 20, -1) 4 +(85, 21, -1) 4 +(85, 22, -1) 5 +(85, 23, -1) 6 +(85, 24, -1) 6 +(85, 25, -1) 7 +(85, 26, -1) 7 +(85, 27, -1) 8 +(85, 28, -1) 9 +(85, 29, -1) 9 +(85, 30, -1) 10 +(85, 31, -1) 10 +(85, 32, -1) 11 +(85, 33, -1) 11 +(85, 34, -1) 11 +(85, 35, -1) 12 +(85, 36, -1) 12 +(85, 37, -1) 13 +(85, 38, -1) 13 +(85, 39, -1) 13 +(85, 40, -1) 13 +(85, 41, -1) 14 +(85, 42, -1) 14 +(85, 43, -1) 14 +(85, 44, -1) 14 +(85, 45, -1) 15 +(85, 46, -1) 15 +(85, 47, -1) 15 +(85, 48, -1) 15 +(85, 49, -1) 15 +(85, 50, -1) 15 +(85, 51, -1) 15 +(85, 52, -1) 15 +(85, 53, -1) 15 +(85, 54, -1) 15 +(85, 55, -1) 15 +(85, 56, -1) 15 +(85, 57, -1) 14 +(85, 58, -1) 14 +(85, 59, -1) 14 +(85, 60, -1) 14 +(85, 61, -1) 13 +(85, 62, -1) 13 +(85, 63, -1) 13 +(85, 64, -1) 13 +(85, 65, -1) 12 +(85, 66, -1) 12 +(85, 67, -1) 11 +(85, 68, -1) 11 +(85, 69, -1) 11 +(85, 70, -1) 10 +(85, 71, -1) 10 +(85, 72, -1) 9 +(85, 73, -1) 9 +(85, 74, -1) 8 +(85, 75, -1) 7 +(85, 76, -1) 7 +(85, 77, -1) 6 +(85, 78, -1) 6 +(85, 79, -1) 5 +(85, 80, -1) 4 +(85, 81, -1) 4 +(85, 82, -1) 3 +(85, 83, -1) 2 +(85, 84, -1) 2 +(85, 85, -1) 1 +(85, 86, -1) 1 +(85, 87, -1) 0 +(86, 16, -1) 1 +(86, 17, -1) 1 +(86, 18, -1) 2 +(86, 19, -1) 3 +(86, 20, -1) 3 +(86, 21, -1) 4 +(86, 22, -1) 4 +(86, 23, -1) 5 +(86, 24, -1) 6 +(86, 25, -1) 6 +(86, 26, -1) 7 +(86, 27, -1) 7 +(86, 28, -1) 8 +(86, 29, -1) 8 +(86, 30, -1) 9 +(86, 31, -1) 9 +(86, 32, -1) 10 +(86, 33, -1) 10 +(86, 34, -1) 11 +(86, 35, -1) 11 +(86, 36, -1) 11 +(86, 37, -1) 12 +(86, 38, -1) 12 +(86, 39, -1) 12 +(86, 40, -1) 13 +(86, 41, -1) 13 +(86, 42, -1) 13 +(86, 43, -1) 13 +(86, 44, -1) 13 +(86, 45, -1) 14 +(86, 46, -1) 14 +(86, 47, -1) 14 +(86, 48, -1) 14 +(86, 49, -1) 14 +(86, 50, -1) 14 +(86, 51, -1) 14 +(86, 52, -1) 14 +(86, 53, -1) 14 +(86, 54, -1) 14 +(86, 55, -1) 14 +(86, 56, -1) 14 +(86, 57, -1) 13 +(86, 58, -1) 13 +(86, 59, -1) 13 +(86, 60, -1) 13 +(86, 61, -1) 13 +(86, 62, -1) 12 +(86, 63, -1) 12 +(86, 64, -1) 12 +(86, 65, -1) 11 +(86, 66, -1) 11 +(86, 67, -1) 11 +(86, 68, -1) 10 +(86, 69, -1) 10 +(86, 70, -1) 9 +(86, 71, -1) 9 +(86, 72, -1) 8 +(86, 73, -1) 8 +(86, 74, -1) 7 +(86, 75, -1) 7 +(86, 76, -1) 6 +(86, 77, -1) 6 +(86, 78, -1) 5 +(86, 79, -1) 4 +(86, 80, -1) 4 +(86, 81, -1) 3 +(86, 82, -1) 3 +(86, 83, -1) 2 +(86, 84, -1) 1 +(86, 85, -1) 1 +(87, 16, -1) 0 +(87, 17, -1) 1 +(87, 18, -1) 1 +(87, 19, -1) 2 +(87, 20, -1) 2 +(87, 21, -1) 3 +(87, 22, -1) 4 +(87, 23, -1) 4 +(87, 24, -1) 5 +(87, 25, -1) 5 +(87, 26, -1) 6 +(87, 27, -1) 6 +(87, 28, -1) 7 +(87, 29, -1) 7 +(87, 30, -1) 8 +(87, 31, -1) 8 +(87, 32, -1) 9 +(87, 33, -1) 9 +(87, 34, -1) 10 +(87, 35, -1) 10 +(87, 36, -1) 10 +(87, 37, -1) 11 +(87, 38, -1) 11 +(87, 39, -1) 11 +(87, 40, -1) 12 +(87, 41, -1) 12 +(87, 42, -1) 12 +(87, 43, -1) 12 +(87, 44, -1) 12 +(87, 45, -1) 13 +(87, 46, -1) 13 +(87, 47, -1) 13 +(87, 48, -1) 13 +(87, 49, -1) 13 +(87, 50, -1) 13 +(87, 51, -1) 13 +(87, 52, -1) 13 +(87, 53, -1) 13 +(87, 54, -1) 13 +(87, 55, -1) 13 +(87, 56, -1) 13 +(87, 57, -1) 12 +(87, 58, -1) 12 +(87, 59, -1) 12 +(87, 60, -1) 12 +(87, 61, -1) 12 +(87, 62, -1) 11 +(87, 63, -1) 11 +(87, 64, -1) 11 +(87, 65, -1) 10 +(87, 66, -1) 10 +(87, 67, -1) 10 +(87, 68, -1) 9 +(87, 69, -1) 9 +(87, 70, -1) 8 +(87, 71, -1) 8 +(87, 72, -1) 7 +(87, 73, -1) 7 +(87, 74, -1) 6 +(87, 75, -1) 6 +(87, 76, -1) 5 +(87, 77, -1) 5 +(87, 78, -1) 4 +(87, 79, -1) 4 +(87, 80, -1) 3 +(87, 81, -1) 2 +(87, 82, -1) 2 +(87, 83, -1) 1 +(87, 84, -1) 1 +(87, 85, -1) 0 +(88, 21, -1) 2 +(88, 22, -1) 3 +(88, 23, -1) 3 +(88, 24, -1) 4 +(88, 25, -1) 5 +(88, 26, -1) 5 +(88, 27, -1) 6 +(88, 28, -1) 6 +(88, 29, -1) 7 +(88, 30, -1) 7 +(88, 31, -1) 7 +(88, 32, -1) 8 +(88, 33, -1) 8 +(88, 34, -1) 9 +(88, 35, -1) 9 +(88, 36, -1) 9 +(88, 37, -1) 10 +(88, 38, -1) 10 +(88, 39, -1) 10 +(88, 40, -1) 11 +(88, 41, -1) 11 +(88, 42, -1) 11 +(88, 43, -1) 11 +(88, 44, -1) 11 +(88, 45, -1) 12 +(88, 46, -1) 12 +(88, 47, -1) 12 +(88, 48, -1) 12 +(88, 49, -1) 12 +(88, 50, -1) 12 +(88, 51, -1) 12 +(88, 52, -1) 12 +(88, 53, -1) 12 +(88, 54, -1) 12 +(88, 55, -1) 12 +(88, 56, -1) 12 +(88, 57, -1) 11 +(88, 58, -1) 11 +(88, 59, -1) 11 +(88, 60, -1) 11 +(88, 61, -1) 11 +(88, 62, -1) 10 +(88, 63, -1) 10 +(88, 64, -1) 10 +(88, 65, -1) 9 +(88, 66, -1) 9 +(88, 67, -1) 9 +(88, 68, -1) 8 +(88, 69, -1) 8 +(88, 70, -1) 7 +(88, 71, -1) 7 +(88, 72, -1) 7 +(88, 73, -1) 6 +(88, 74, -1) 6 +(88, 75, -1) 5 +(88, 76, -1) 5 +(88, 77, -1) 4 +(88, 78, -1) 3 +(88, 79, -1) 3 +(88, 80, -1) 2 +(89, 21, -1) 1 +(89, 22, -1) 2 +(89, 23, -1) 3 +(89, 24, -1) 3 +(89, 25, -1) 4 +(89, 26, -1) 4 +(89, 27, -1) 5 +(89, 28, -1) 5 +(89, 29, -1) 6 +(89, 30, -1) 6 +(89, 31, -1) 7 +(89, 32, -1) 7 +(89, 33, -1) 7 +(89, 34, -1) 8 +(89, 35, -1) 8 +(89, 36, -1) 8 +(89, 37, -1) 9 +(89, 38, -1) 9 +(89, 39, -1) 9 +(89, 40, -1) 10 +(89, 41, -1) 10 +(89, 42, -1) 10 +(89, 43, -1) 10 +(89, 44, -1) 10 +(89, 45, -1) 11 +(89, 46, -1) 11 +(89, 47, -1) 11 +(89, 48, -1) 11 +(89, 49, -1) 11 +(89, 50, -1) 11 +(89, 51, -1) 11 +(89, 52, -1) 11 +(89, 53, -1) 11 +(89, 54, -1) 11 +(89, 55, -1) 11 +(89, 56, -1) 11 +(89, 57, -1) 10 +(89, 58, -1) 10 +(89, 59, -1) 10 +(89, 60, -1) 10 +(89, 61, -1) 10 +(89, 62, -1) 9 +(89, 63, -1) 9 +(89, 64, -1) 9 +(89, 65, -1) 8 +(89, 66, -1) 8 +(89, 67, -1) 8 +(89, 68, -1) 7 +(89, 69, -1) 7 +(89, 70, -1) 7 +(89, 71, -1) 6 +(89, 72, -1) 6 +(89, 73, -1) 5 +(89, 74, -1) 5 +(89, 75, -1) 4 +(89, 76, -1) 4 +(89, 77, -1) 3 +(89, 78, -1) 3 +(89, 79, -1) 2 +(89, 80, -1) 1 +(90, 21, -1) 1 +(90, 22, -1) 1 +(90, 23, -1) 2 +(90, 24, -1) 2 +(90, 25, -1) 3 +(90, 26, -1) 3 +(90, 27, -1) 4 +(90, 28, -1) 4 +(90, 29, -1) 5 +(90, 30, -1) 5 +(90, 31, -1) 6 +(90, 32, -1) 6 +(90, 33, -1) 6 +(90, 34, -1) 7 +(90, 35, -1) 7 +(90, 36, -1) 8 +(90, 37, -1) 8 +(90, 38, -1) 8 +(90, 39, -1) 8 +(90, 40, -1) 9 +(90, 41, -1) 9 +(90, 42, -1) 9 +(90, 43, -1) 9 +(90, 44, -1) 9 +(90, 45, -1) 10 +(90, 46, -1) 10 +(90, 47, -1) 10 +(90, 48, -1) 10 +(90, 49, -1) 10 +(90, 50, -1) 10 +(90, 51, -1) 10 +(90, 52, -1) 10 +(90, 53, -1) 10 +(90, 54, -1) 10 +(90, 55, -1) 10 +(90, 56, -1) 10 +(90, 57, -1) 9 +(90, 58, -1) 9 +(90, 59, -1) 9 +(90, 60, -1) 9 +(90, 61, -1) 9 +(90, 62, -1) 8 +(90, 63, -1) 8 +(90, 64, -1) 8 +(90, 65, -1) 8 +(90, 66, -1) 7 +(90, 67, -1) 7 +(90, 68, -1) 6 +(90, 69, -1) 6 +(90, 70, -1) 6 +(90, 71, -1) 5 +(90, 72, -1) 5 +(90, 73, -1) 4 +(90, 74, -1) 4 +(90, 75, -1) 3 +(90, 76, -1) 3 +(90, 77, -1) 2 +(90, 78, -1) 2 +(90, 79, -1) 1 +(90, 80, -1) 1 +(91, 21, -1) 0 +(91, 22, -1) 1 +(91, 23, -1) 1 +(91, 24, -1) 2 +(91, 25, -1) 2 +(91, 26, -1) 3 +(91, 27, -1) 3 +(91, 28, -1) 4 +(91, 29, -1) 4 +(91, 30, -1) 4 +(91, 31, -1) 5 +(91, 32, -1) 5 +(91, 33, -1) 6 +(91, 34, -1) 6 +(91, 35, -1) 6 +(91, 36, -1) 7 +(91, 37, -1) 7 +(91, 38, -1) 7 +(91, 39, -1) 8 +(91, 40, -1) 8 +(91, 41, -1) 8 +(91, 42, -1) 8 +(91, 43, -1) 8 +(91, 44, -1) 9 +(91, 45, -1) 9 +(91, 46, -1) 9 +(91, 47, -1) 9 +(91, 48, -1) 9 +(91, 49, -1) 9 +(91, 50, -1) 9 +(91, 51, -1) 9 +(91, 52, -1) 9 +(91, 53, -1) 9 +(91, 54, -1) 9 +(91, 55, -1) 9 +(91, 56, -1) 9 +(91, 57, -1) 9 +(91, 58, -1) 8 +(91, 59, -1) 8 +(91, 60, -1) 8 +(91, 61, -1) 8 +(91, 62, -1) 8 +(91, 63, -1) 7 +(91, 64, -1) 7 +(91, 65, -1) 7 +(91, 66, -1) 6 +(91, 67, -1) 6 +(91, 68, -1) 6 +(91, 69, -1) 5 +(91, 70, -1) 5 +(91, 71, -1) 4 +(91, 72, -1) 4 +(91, 73, -1) 4 +(91, 74, -1) 3 +(91, 75, -1) 3 +(91, 76, -1) 2 +(91, 77, -1) 2 +(91, 78, -1) 1 +(91, 79, -1) 1 +(91, 80, -1) 0 +(92, 21, -1) 0 +(92, 22, -1) 0 +(92, 23, -1) 0 +(92, 24, -1) 1 +(92, 25, -1) 1 +(92, 26, -1) 2 +(92, 27, -1) 2 +(92, 28, -1) 3 +(92, 29, -1) 3 +(92, 30, -1) 4 +(92, 31, -1) 4 +(92, 32, -1) 4 +(92, 33, -1) 5 +(92, 34, -1) 5 +(92, 35, -1) 5 +(92, 36, -1) 6 +(92, 37, -1) 6 +(92, 38, -1) 6 +(92, 39, -1) 7 +(92, 40, -1) 7 +(92, 41, -1) 7 +(92, 42, -1) 7 +(92, 43, -1) 7 +(92, 44, -1) 8 +(92, 45, -1) 8 +(92, 46, -1) 8 +(92, 47, -1) 8 +(92, 48, -1) 8 +(92, 49, -1) 8 +(92, 50, -1) 8 +(92, 51, -1) 8 +(92, 52, -1) 8 +(92, 53, -1) 8 +(92, 54, -1) 8 +(92, 55, -1) 8 +(92, 56, -1) 8 +(92, 57, -1) 8 +(92, 58, -1) 7 +(92, 59, -1) 7 +(92, 60, -1) 7 +(92, 61, -1) 7 +(92, 62, -1) 7 +(92, 63, -1) 6 +(92, 64, -1) 6 +(92, 65, -1) 6 +(92, 66, -1) 5 +(92, 67, -1) 5 +(92, 68, -1) 5 +(92, 69, -1) 4 +(92, 70, -1) 4 +(92, 71, -1) 4 +(92, 72, -1) 3 +(92, 73, -1) 3 +(92, 74, -1) 2 +(92, 75, -1) 2 +(92, 76, -1) 1 +(92, 77, -1) 1 +(92, 78, -1) 0 +(92, 79, -1) 0 +(92, 80, -1) 0 +(93, 26, -1) 1 +(93, 27, -1) 1 +(93, 28, -1) 2 +(93, 29, -1) 2 +(93, 30, -1) 3 +(93, 31, -1) 3 +(93, 32, -1) 3 +(93, 33, -1) 4 +(93, 34, -1) 4 +(93, 35, -1) 4 +(93, 36, -1) 5 +(93, 37, -1) 5 +(93, 38, -1) 5 +(93, 39, -1) 6 +(93, 40, -1) 6 +(93, 41, -1) 6 +(93, 42, -1) 6 +(93, 43, -1) 6 +(93, 44, -1) 7 +(93, 45, -1) 7 +(93, 46, -1) 7 +(93, 47, -1) 7 +(93, 48, -1) 7 +(93, 49, -1) 7 +(93, 50, -1) 7 +(93, 51, -1) 7 +(93, 52, -1) 7 +(93, 53, -1) 7 +(93, 54, -1) 7 +(93, 55, -1) 7 +(93, 56, -1) 7 +(93, 57, -1) 7 +(93, 58, -1) 6 +(93, 59, -1) 6 +(93, 60, -1) 6 +(93, 61, -1) 6 +(93, 62, -1) 6 +(93, 63, -1) 5 +(93, 64, -1) 5 +(93, 65, -1) 5 +(93, 66, -1) 4 +(93, 67, -1) 4 +(93, 68, -1) 4 +(93, 69, -1) 3 +(93, 70, -1) 3 +(93, 71, -1) 3 +(93, 72, -1) 2 +(93, 73, -1) 2 +(93, 74, -1) 1 +(93, 75, -1) 1 +(94, 26, -1) 0 +(94, 27, -1) 0 +(94, 28, -1) 1 +(94, 29, -1) 1 +(94, 30, -1) 2 +(94, 31, -1) 2 +(94, 32, -1) 2 +(94, 33, -1) 3 +(94, 34, -1) 3 +(94, 35, -1) 3 +(94, 36, -1) 4 +(94, 37, -1) 4 +(94, 38, -1) 4 +(94, 39, -1) 5 +(94, 40, -1) 5 +(94, 41, -1) 5 +(94, 42, -1) 5 +(94, 43, -1) 5 +(94, 44, -1) 6 +(94, 45, -1) 6 +(94, 46, -1) 6 +(94, 47, -1) 6 +(94, 48, -1) 6 +(94, 49, -1) 6 +(94, 50, -1) 6 +(94, 51, -1) 6 +(94, 52, -1) 6 +(94, 53, -1) 6 +(94, 54, -1) 6 +(94, 55, -1) 6 +(94, 56, -1) 6 +(94, 57, -1) 6 +(94, 58, -1) 5 +(94, 59, -1) 5 +(94, 60, -1) 5 +(94, 61, -1) 5 +(94, 62, -1) 5 +(94, 63, -1) 4 +(94, 64, -1) 4 +(94, 65, -1) 4 +(94, 66, -1) 3 +(94, 67, -1) 3 +(94, 68, -1) 3 +(94, 69, -1) 2 +(94, 70, -1) 2 +(94, 71, -1) 2 +(94, 72, -1) 1 +(94, 73, -1) 1 +(94, 74, -1) 0 +(94, 75, -1) 0 +(95, 26, -1) 0 +(95, 27, -1) 0 +(95, 28, -1) 0 +(95, 29, -1) 0 +(95, 30, -1) 1 +(95, 31, -1) 1 +(95, 32, -1) 1 +(95, 33, -1) 2 +(95, 34, -1) 2 +(95, 35, -1) 3 +(95, 36, -1) 3 +(95, 37, -1) 3 +(95, 38, -1) 3 +(95, 39, -1) 4 +(95, 40, -1) 4 +(95, 41, -1) 4 +(95, 42, -1) 4 +(95, 43, -1) 4 +(95, 44, -1) 5 +(95, 45, -1) 5 +(95, 46, -1) 5 +(95, 47, -1) 5 +(95, 48, -1) 5 +(95, 49, -1) 5 +(95, 50, -1) 5 +(95, 51, -1) 5 +(95, 52, -1) 5 +(95, 53, -1) 5 +(95, 54, -1) 5 +(95, 55, -1) 5 +(95, 56, -1) 5 +(95, 57, -1) 5 +(95, 58, -1) 4 +(95, 59, -1) 4 +(95, 60, -1) 4 +(95, 61, -1) 4 +(95, 62, -1) 4 +(95, 63, -1) 3 +(95, 64, -1) 3 +(95, 65, -1) 3 +(95, 66, -1) 3 +(95, 67, -1) 2 +(95, 68, -1) 2 +(95, 69, -1) 1 +(95, 70, -1) 1 +(95, 71, -1) 1 +(95, 72, -1) 0 +(95, 73, -1) 0 +(95, 74, -1) 0 +(95, 75, -1) 0 +(96, 36, -1) 2 +(96, 37, -1) 2 +(96, 38, -1) 2 +(96, 39, -1) 3 +(96, 40, -1) 3 +(96, 41, -1) 3 +(96, 42, -1) 3 +(96, 43, -1) 3 +(96, 44, -1) 4 +(96, 45, -1) 4 +(96, 46, -1) 4 +(96, 47, -1) 4 +(96, 48, -1) 4 +(96, 49, -1) 4 +(96, 50, -1) 4 +(96, 51, -1) 4 +(96, 52, -1) 4 +(96, 53, -1) 4 +(96, 54, -1) 4 +(96, 55, -1) 4 +(96, 56, -1) 4 +(96, 57, -1) 4 +(96, 58, -1) 3 +(96, 59, -1) 3 +(96, 60, -1) 3 +(96, 61, -1) 3 +(96, 62, -1) 3 +(96, 63, -1) 2 +(96, 64, -1) 2 +(96, 65, -1) 2 +(97, 36, -1) 1 +(97, 37, -1) 1 +(97, 38, -1) 2 +(97, 39, -1) 2 +(97, 40, -1) 2 +(97, 41, -1) 2 +(97, 42, -1) 2 +(97, 43, -1) 2 +(97, 44, -1) 3 +(97, 45, -1) 3 +(97, 46, -1) 3 +(97, 47, -1) 3 +(97, 48, -1) 3 +(97, 49, -1) 3 +(97, 50, -1) 3 +(97, 51, -1) 3 +(97, 52, -1) 3 +(97, 53, -1) 3 +(97, 54, -1) 3 +(97, 55, -1) 3 +(97, 56, -1) 3 +(97, 57, -1) 3 +(97, 58, -1) 2 +(97, 59, -1) 2 +(97, 60, -1) 2 +(97, 61, -1) 2 +(97, 62, -1) 2 +(97, 63, -1) 2 +(97, 64, -1) 1 +(97, 65, -1) 1 +(98, 41, -1) 1 +(98, 42, -1) 1 +(98, 43, -1) 1 +(98, 44, -1) 2 +(98, 45, -1) 2 +(98, 46, -1) 2 +(98, 47, -1) 2 +(98, 48, -1) 2 +(98, 49, -1) 2 +(98, 50, -1) 2 +(98, 51, -1) 2 +(98, 52, -1) 2 +(98, 53, -1) 2 +(98, 54, -1) 2 +(98, 55, -1) 2 +(98, 56, -1) 2 +(98, 57, -1) 2 +(98, 58, -1) 1 +(98, 59, -1) 1 +(98, 60, -1) 1 +(99, 41, -1) 0 +(99, 42, -1) 0 +(99, 43, -1) 0 +(99, 44, -1) 1 +(99, 45, -1) 1 +(99, 46, -1) 1 +(99, 47, -1) 1 +(99, 48, -1) 1 +(99, 49, -1) 1 +(99, 50, -1) 1 +(99, 51, -1) 1 +(99, 52, -1) 1 +(99, 53, -1) 1 +(99, 54, -1) 1 +(99, 55, -1) 1 +(99, 56, -1) 1 +(99, 57, -1) 1 +(99, 58, -1) 0 +(99, 59, -1) 0 +(99, 60, -1) 0 +(100, 41, -1) 0 +(100, 42, -1) 0 +(100, 43, -1) 0 +(100, 44, -1) 0 +(100, 45, -1) 0 +(100, 46, -1) 0 +(100, 47, -1) 0 +(100, 48, -1) 0 +(100, 49, -1) 0 +(100, 50, -1) 0 +(100, 51, -1) 0 +(100, 52, -1) 0 +(100, 53, -1) 0 +(100, 54, -1) 0 +(100, 55, -1) 0 +(100, 56, -1) 0 +(100, 57, -1) 0 +(100, 58, -1) 0 +(100, 59, -1) 0 +(100, 60, -1) 0 +(1, 41, 1) 0 +(1, 42, 1) 0 +(1, 43, 1) 0 +(1, 44, 1) 0 +(1, 45, 1) 0 +(1, 46, 1) 0 +(1, 47, 1) 0 +(1, 48, 1) 0 +(1, 49, 1) 0 +(1, 50, 1) 0 +(1, 51, 1) 0 +(1, 52, 1) 0 +(1, 53, 1) 0 +(1, 54, 1) 0 +(1, 55, 1) 0 +(1, 56, 1) 0 +(1, 57, 1) 0 +(1, 58, 1) 0 +(1, 59, 1) 0 +(1, 60, 1) 0 +(2, 41, 1) 0 +(2, 42, 1) 0 +(2, 43, 1) 0 +(2, 44, 1) 1 +(2, 45, 1) 1 +(2, 46, 1) 1 +(2, 47, 1) 1 +(2, 48, 1) 1 +(2, 49, 1) 1 +(2, 50, 1) 1 +(2, 51, 1) 1 +(2, 52, 1) 1 +(2, 53, 1) 1 +(2, 54, 1) 1 +(2, 55, 1) 1 +(2, 56, 1) 1 +(2, 57, 1) 1 +(2, 58, 1) 0 +(2, 59, 1) 0 +(2, 60, 1) 0 +(3, 41, 1) 1 +(3, 42, 1) 1 +(3, 43, 1) 1 +(3, 44, 1) 2 +(3, 45, 1) 2 +(3, 46, 1) 2 +(3, 47, 1) 2 +(3, 48, 1) 2 +(3, 49, 1) 2 +(3, 50, 1) 2 +(3, 51, 1) 2 +(3, 52, 1) 2 +(3, 53, 1) 2 +(3, 54, 1) 2 +(3, 55, 1) 2 +(3, 56, 1) 2 +(3, 57, 1) 2 +(3, 58, 1) 1 +(3, 59, 1) 1 +(3, 60, 1) 1 +(4, 36, 1) 1 +(4, 37, 1) 1 +(4, 38, 1) 2 +(4, 39, 1) 2 +(4, 40, 1) 2 +(4, 41, 1) 2 +(4, 42, 1) 2 +(4, 43, 1) 2 +(4, 44, 1) 3 +(4, 45, 1) 3 +(4, 46, 1) 3 +(4, 47, 1) 3 +(4, 48, 1) 3 +(4, 49, 1) 3 +(4, 50, 1) 3 +(4, 51, 1) 3 +(4, 52, 1) 3 +(4, 53, 1) 3 +(4, 54, 1) 3 +(4, 55, 1) 3 +(4, 56, 1) 3 +(4, 57, 1) 3 +(4, 58, 1) 2 +(4, 59, 1) 2 +(4, 60, 1) 2 +(4, 61, 1) 2 +(4, 62, 1) 2 +(4, 63, 1) 2 +(4, 64, 1) 1 +(4, 65, 1) 1 +(5, 36, 1) 2 +(5, 37, 1) 2 +(5, 38, 1) 2 +(5, 39, 1) 3 +(5, 40, 1) 3 +(5, 41, 1) 3 +(5, 42, 1) 3 +(5, 43, 1) 3 +(5, 44, 1) 4 +(5, 45, 1) 4 +(5, 46, 1) 4 +(5, 47, 1) 4 +(5, 48, 1) 4 +(5, 49, 1) 4 +(5, 50, 1) 4 +(5, 51, 1) 4 +(5, 52, 1) 4 +(5, 53, 1) 4 +(5, 54, 1) 4 +(5, 55, 1) 4 +(5, 56, 1) 4 +(5, 57, 1) 4 +(5, 58, 1) 3 +(5, 59, 1) 3 +(5, 60, 1) 3 +(5, 61, 1) 3 +(5, 62, 1) 3 +(5, 63, 1) 2 +(5, 64, 1) 2 +(5, 65, 1) 2 +(6, 26, 1) 0 +(6, 27, 1) 0 +(6, 28, 1) 0 +(6, 29, 1) 0 +(6, 30, 1) 1 +(6, 31, 1) 1 +(6, 32, 1) 1 +(6, 33, 1) 2 +(6, 34, 1) 2 +(6, 35, 1) 3 +(6, 36, 1) 3 +(6, 37, 1) 3 +(6, 38, 1) 3 +(6, 39, 1) 4 +(6, 40, 1) 4 +(6, 41, 1) 4 +(6, 42, 1) 4 +(6, 43, 1) 4 +(6, 44, 1) 5 +(6, 45, 1) 5 +(6, 46, 1) 5 +(6, 47, 1) 5 +(6, 48, 1) 5 +(6, 49, 1) 5 +(6, 50, 1) 5 +(6, 51, 1) 5 +(6, 52, 1) 5 +(6, 53, 1) 5 +(6, 54, 1) 5 +(6, 55, 1) 5 +(6, 56, 1) 5 +(6, 57, 1) 5 +(6, 58, 1) 4 +(6, 59, 1) 4 +(6, 60, 1) 4 +(6, 61, 1) 4 +(6, 62, 1) 4 +(6, 63, 1) 3 +(6, 64, 1) 3 +(6, 65, 1) 3 +(6, 66, 1) 3 +(6, 67, 1) 2 +(6, 68, 1) 2 +(6, 69, 1) 1 +(6, 70, 1) 1 +(6, 71, 1) 1 +(6, 72, 1) 0 +(6, 73, 1) 0 +(6, 74, 1) 0 +(6, 75, 1) 0 +(7, 26, 1) 0 +(7, 27, 1) 0 +(7, 28, 1) 1 +(7, 29, 1) 1 +(7, 30, 1) 2 +(7, 31, 1) 2 +(7, 32, 1) 2 +(7, 33, 1) 3 +(7, 34, 1) 3 +(7, 35, 1) 3 +(7, 36, 1) 4 +(7, 37, 1) 4 +(7, 38, 1) 4 +(7, 39, 1) 5 +(7, 40, 1) 5 +(7, 41, 1) 5 +(7, 42, 1) 5 +(7, 43, 1) 5 +(7, 44, 1) 6 +(7, 45, 1) 6 +(7, 46, 1) 6 +(7, 47, 1) 6 +(7, 48, 1) 6 +(7, 49, 1) 6 +(7, 50, 1) 6 +(7, 51, 1) 6 +(7, 52, 1) 6 +(7, 53, 1) 6 +(7, 54, 1) 6 +(7, 55, 1) 6 +(7, 56, 1) 6 +(7, 57, 1) 6 +(7, 58, 1) 5 +(7, 59, 1) 5 +(7, 60, 1) 5 +(7, 61, 1) 5 +(7, 62, 1) 5 +(7, 63, 1) 4 +(7, 64, 1) 4 +(7, 65, 1) 4 +(7, 66, 1) 3 +(7, 67, 1) 3 +(7, 68, 1) 3 +(7, 69, 1) 2 +(7, 70, 1) 2 +(7, 71, 1) 2 +(7, 72, 1) 1 +(7, 73, 1) 1 +(7, 74, 1) 0 +(7, 75, 1) 0 +(8, 26, 1) 1 +(8, 27, 1) 1 +(8, 28, 1) 2 +(8, 29, 1) 2 +(8, 30, 1) 3 +(8, 31, 1) 3 +(8, 32, 1) 3 +(8, 33, 1) 4 +(8, 34, 1) 4 +(8, 35, 1) 4 +(8, 36, 1) 5 +(8, 37, 1) 5 +(8, 38, 1) 5 +(8, 39, 1) 6 +(8, 40, 1) 6 +(8, 41, 1) 6 +(8, 42, 1) 6 +(8, 43, 1) 6 +(8, 44, 1) 7 +(8, 45, 1) 7 +(8, 46, 1) 7 +(8, 47, 1) 7 +(8, 48, 1) 7 +(8, 49, 1) 7 +(8, 50, 1) 7 +(8, 51, 1) 7 +(8, 52, 1) 7 +(8, 53, 1) 7 +(8, 54, 1) 7 +(8, 55, 1) 7 +(8, 56, 1) 7 +(8, 57, 1) 7 +(8, 58, 1) 6 +(8, 59, 1) 6 +(8, 60, 1) 6 +(8, 61, 1) 6 +(8, 62, 1) 6 +(8, 63, 1) 5 +(8, 64, 1) 5 +(8, 65, 1) 5 +(8, 66, 1) 4 +(8, 67, 1) 4 +(8, 68, 1) 4 +(8, 69, 1) 3 +(8, 70, 1) 3 +(8, 71, 1) 3 +(8, 72, 1) 2 +(8, 73, 1) 2 +(8, 74, 1) 1 +(8, 75, 1) 1 +(9, 21, 1) 0 +(9, 22, 1) 0 +(9, 23, 1) 0 +(9, 24, 1) 1 +(9, 25, 1) 1 +(9, 26, 1) 2 +(9, 27, 1) 2 +(9, 28, 1) 3 +(9, 29, 1) 3 +(9, 30, 1) 4 +(9, 31, 1) 4 +(9, 32, 1) 4 +(9, 33, 1) 5 +(9, 34, 1) 5 +(9, 35, 1) 5 +(9, 36, 1) 6 +(9, 37, 1) 6 +(9, 38, 1) 6 +(9, 39, 1) 7 +(9, 40, 1) 7 +(9, 41, 1) 7 +(9, 42, 1) 7 +(9, 43, 1) 7 +(9, 44, 1) 8 +(9, 45, 1) 8 +(9, 46, 1) 8 +(9, 47, 1) 8 +(9, 48, 1) 8 +(9, 49, 1) 8 +(9, 50, 1) 8 +(9, 51, 1) 8 +(9, 52, 1) 8 +(9, 53, 1) 8 +(9, 54, 1) 8 +(9, 55, 1) 8 +(9, 56, 1) 8 +(9, 57, 1) 8 +(9, 58, 1) 7 +(9, 59, 1) 7 +(9, 60, 1) 7 +(9, 61, 1) 7 +(9, 62, 1) 7 +(9, 63, 1) 6 +(9, 64, 1) 6 +(9, 65, 1) 6 +(9, 66, 1) 5 +(9, 67, 1) 5 +(9, 68, 1) 5 +(9, 69, 1) 4 +(9, 70, 1) 4 +(9, 71, 1) 4 +(9, 72, 1) 3 +(9, 73, 1) 3 +(9, 74, 1) 2 +(9, 75, 1) 2 +(9, 76, 1) 1 +(9, 77, 1) 1 +(9, 78, 1) 0 +(9, 79, 1) 0 +(9, 80, 1) 0 +(10, 21, 1) 0 +(10, 22, 1) 1 +(10, 23, 1) 1 +(10, 24, 1) 2 +(10, 25, 1) 2 +(10, 26, 1) 3 +(10, 27, 1) 3 +(10, 28, 1) 4 +(10, 29, 1) 4 +(10, 30, 1) 4 +(10, 31, 1) 5 +(10, 32, 1) 5 +(10, 33, 1) 6 +(10, 34, 1) 6 +(10, 35, 1) 6 +(10, 36, 1) 7 +(10, 37, 1) 7 +(10, 38, 1) 7 +(10, 39, 1) 8 +(10, 40, 1) 8 +(10, 41, 1) 8 +(10, 42, 1) 8 +(10, 43, 1) 8 +(10, 44, 1) 9 +(10, 45, 1) 9 +(10, 46, 1) 9 +(10, 47, 1) 9 +(10, 48, 1) 9 +(10, 49, 1) 9 +(10, 50, 1) 9 +(10, 51, 1) 9 +(10, 52, 1) 9 +(10, 53, 1) 9 +(10, 54, 1) 9 +(10, 55, 1) 9 +(10, 56, 1) 9 +(10, 57, 1) 9 +(10, 58, 1) 8 +(10, 59, 1) 8 +(10, 60, 1) 8 +(10, 61, 1) 8 +(10, 62, 1) 8 +(10, 63, 1) 7 +(10, 64, 1) 7 +(10, 65, 1) 7 +(10, 66, 1) 6 +(10, 67, 1) 6 +(10, 68, 1) 6 +(10, 69, 1) 5 +(10, 70, 1) 5 +(10, 71, 1) 4 +(10, 72, 1) 4 +(10, 73, 1) 4 +(10, 74, 1) 3 +(10, 75, 1) 3 +(10, 76, 1) 2 +(10, 77, 1) 2 +(10, 78, 1) 1 +(10, 79, 1) 1 +(10, 80, 1) 0 +(11, 21, 1) 1 +(11, 22, 1) 1 +(11, 23, 1) 2 +(11, 24, 1) 2 +(11, 25, 1) 3 +(11, 26, 1) 3 +(11, 27, 1) 4 +(11, 28, 1) 4 +(11, 29, 1) 5 +(11, 30, 1) 5 +(11, 31, 1) 6 +(11, 32, 1) 6 +(11, 33, 1) 6 +(11, 34, 1) 7 +(11, 35, 1) 7 +(11, 36, 1) 8 +(11, 37, 1) 8 +(11, 38, 1) 8 +(11, 39, 1) 8 +(11, 40, 1) 9 +(11, 41, 1) 9 +(11, 42, 1) 9 +(11, 43, 1) 9 +(11, 44, 1) 9 +(11, 45, 1) 10 +(11, 46, 1) 10 +(11, 47, 1) 10 +(11, 48, 1) 10 +(11, 49, 1) 10 +(11, 50, 1) 10 +(11, 51, 1) 10 +(11, 52, 1) 10 +(11, 53, 1) 10 +(11, 54, 1) 10 +(11, 55, 1) 10 +(11, 56, 1) 10 +(11, 57, 1) 9 +(11, 58, 1) 9 +(11, 59, 1) 9 +(11, 60, 1) 9 +(11, 61, 1) 9 +(11, 62, 1) 8 +(11, 63, 1) 8 +(11, 64, 1) 8 +(11, 65, 1) 8 +(11, 66, 1) 7 +(11, 67, 1) 7 +(11, 68, 1) 6 +(11, 69, 1) 6 +(11, 70, 1) 6 +(11, 71, 1) 5 +(11, 72, 1) 5 +(11, 73, 1) 4 +(11, 74, 1) 4 +(11, 75, 1) 3 +(11, 76, 1) 3 +(11, 77, 1) 2 +(11, 78, 1) 2 +(11, 79, 1) 1 +(11, 80, 1) 1 +(12, 21, 1) 1 +(12, 22, 1) 2 +(12, 23, 1) 3 +(12, 24, 1) 3 +(12, 25, 1) 4 +(12, 26, 1) 4 +(12, 27, 1) 5 +(12, 28, 1) 5 +(12, 29, 1) 6 +(12, 30, 1) 6 +(12, 31, 1) 7 +(12, 32, 1) 7 +(12, 33, 1) 7 +(12, 34, 1) 8 +(12, 35, 1) 8 +(12, 36, 1) 8 +(12, 37, 1) 9 +(12, 38, 1) 9 +(12, 39, 1) 9 +(12, 40, 1) 10 +(12, 41, 1) 10 +(12, 42, 1) 10 +(12, 43, 1) 10 +(12, 44, 1) 10 +(12, 45, 1) 11 +(12, 46, 1) 11 +(12, 47, 1) 11 +(12, 48, 1) 11 +(12, 49, 1) 11 +(12, 50, 1) 11 +(12, 51, 1) 11 +(12, 52, 1) 11 +(12, 53, 1) 11 +(12, 54, 1) 11 +(12, 55, 1) 11 +(12, 56, 1) 11 +(12, 57, 1) 10 +(12, 58, 1) 10 +(12, 59, 1) 10 +(12, 60, 1) 10 +(12, 61, 1) 10 +(12, 62, 1) 9 +(12, 63, 1) 9 +(12, 64, 1) 9 +(12, 65, 1) 8 +(12, 66, 1) 8 +(12, 67, 1) 8 +(12, 68, 1) 7 +(12, 69, 1) 7 +(12, 70, 1) 7 +(12, 71, 1) 6 +(12, 72, 1) 6 +(12, 73, 1) 5 +(12, 74, 1) 5 +(12, 75, 1) 4 +(12, 76, 1) 4 +(12, 77, 1) 3 +(12, 78, 1) 3 +(12, 79, 1) 2 +(12, 80, 1) 1 +(13, 21, 1) 2 +(13, 22, 1) 3 +(13, 23, 1) 3 +(13, 24, 1) 4 +(13, 25, 1) 5 +(13, 26, 1) 5 +(13, 27, 1) 6 +(13, 28, 1) 6 +(13, 29, 1) 7 +(13, 30, 1) 7 +(13, 31, 1) 7 +(13, 32, 1) 8 +(13, 33, 1) 8 +(13, 34, 1) 9 +(13, 35, 1) 9 +(13, 36, 1) 9 +(13, 37, 1) 10 +(13, 38, 1) 10 +(13, 39, 1) 10 +(13, 40, 1) 11 +(13, 41, 1) 11 +(13, 42, 1) 11 +(13, 43, 1) 11 +(13, 44, 1) 11 +(13, 45, 1) 12 +(13, 46, 1) 12 +(13, 47, 1) 12 +(13, 48, 1) 12 +(13, 49, 1) 12 +(13, 50, 1) 12 +(13, 51, 1) 12 +(13, 52, 1) 12 +(13, 53, 1) 12 +(13, 54, 1) 12 +(13, 55, 1) 12 +(13, 56, 1) 12 +(13, 57, 1) 11 +(13, 58, 1) 11 +(13, 59, 1) 11 +(13, 60, 1) 11 +(13, 61, 1) 11 +(13, 62, 1) 10 +(13, 63, 1) 10 +(13, 64, 1) 10 +(13, 65, 1) 9 +(13, 66, 1) 9 +(13, 67, 1) 9 +(13, 68, 1) 8 +(13, 69, 1) 8 +(13, 70, 1) 7 +(13, 71, 1) 7 +(13, 72, 1) 7 +(13, 73, 1) 6 +(13, 74, 1) 6 +(13, 75, 1) 5 +(13, 76, 1) 5 +(13, 77, 1) 4 +(13, 78, 1) 3 +(13, 79, 1) 3 +(13, 80, 1) 2 +(14, 16, 1) 0 +(14, 17, 1) 1 +(14, 18, 1) 1 +(14, 19, 1) 2 +(14, 20, 1) 2 +(14, 21, 1) 3 +(14, 22, 1) 4 +(14, 23, 1) 4 +(14, 24, 1) 5 +(14, 25, 1) 5 +(14, 26, 1) 6 +(14, 27, 1) 6 +(14, 28, 1) 7 +(14, 29, 1) 7 +(14, 30, 1) 8 +(14, 31, 1) 8 +(14, 32, 1) 9 +(14, 33, 1) 9 +(14, 34, 1) 10 +(14, 35, 1) 10 +(14, 36, 1) 10 +(14, 37, 1) 11 +(14, 38, 1) 11 +(14, 39, 1) 11 +(14, 40, 1) 12 +(14, 41, 1) 12 +(14, 42, 1) 12 +(14, 43, 1) 12 +(14, 44, 1) 12 +(14, 45, 1) 13 +(14, 46, 1) 13 +(14, 47, 1) 13 +(14, 48, 1) 13 +(14, 49, 1) 13 +(14, 50, 1) 13 +(14, 51, 1) 13 +(14, 52, 1) 13 +(14, 53, 1) 13 +(14, 54, 1) 13 +(14, 55, 1) 13 +(14, 56, 1) 13 +(14, 57, 1) 12 +(14, 58, 1) 12 +(14, 59, 1) 12 +(14, 60, 1) 12 +(14, 61, 1) 12 +(14, 62, 1) 11 +(14, 63, 1) 11 +(14, 64, 1) 11 +(14, 65, 1) 10 +(14, 66, 1) 10 +(14, 67, 1) 10 +(14, 68, 1) 9 +(14, 69, 1) 9 +(14, 70, 1) 8 +(14, 71, 1) 8 +(14, 72, 1) 7 +(14, 73, 1) 7 +(14, 74, 1) 6 +(14, 75, 1) 6 +(14, 76, 1) 5 +(14, 77, 1) 5 +(14, 78, 1) 4 +(14, 79, 1) 4 +(14, 80, 1) 3 +(14, 81, 1) 2 +(14, 82, 1) 2 +(14, 83, 1) 1 +(14, 84, 1) 1 +(14, 85, 1) 0 +(15, 16, 1) 1 +(15, 17, 1) 1 +(15, 18, 1) 2 +(15, 19, 1) 3 +(15, 20, 1) 3 +(15, 21, 1) 4 +(15, 22, 1) 4 +(15, 23, 1) 5 +(15, 24, 1) 6 +(15, 25, 1) 6 +(15, 26, 1) 7 +(15, 27, 1) 7 +(15, 28, 1) 8 +(15, 29, 1) 8 +(15, 30, 1) 9 +(15, 31, 1) 9 +(15, 32, 1) 10 +(15, 33, 1) 10 +(15, 34, 1) 11 +(15, 35, 1) 11 +(15, 36, 1) 11 +(15, 37, 1) 12 +(15, 38, 1) 12 +(15, 39, 1) 12 +(15, 40, 1) 13 +(15, 41, 1) 13 +(15, 42, 1) 13 +(15, 43, 1) 13 +(15, 44, 1) 13 +(15, 45, 1) 14 +(15, 46, 1) 14 +(15, 47, 1) 14 +(15, 48, 1) 14 +(15, 49, 1) 14 +(15, 50, 1) 14 +(15, 51, 1) 14 +(15, 52, 1) 14 +(15, 53, 1) 14 +(15, 54, 1) 14 +(15, 55, 1) 14 +(15, 56, 1) 14 +(15, 57, 1) 13 +(15, 58, 1) 13 +(15, 59, 1) 13 +(15, 60, 1) 13 +(15, 61, 1) 13 +(15, 62, 1) 12 +(15, 63, 1) 12 +(15, 64, 1) 12 +(15, 65, 1) 11 +(15, 66, 1) 11 +(15, 67, 1) 11 +(15, 68, 1) 10 +(15, 69, 1) 10 +(15, 70, 1) 9 +(15, 71, 1) 9 +(15, 72, 1) 8 +(15, 73, 1) 8 +(15, 74, 1) 7 +(15, 75, 1) 7 +(15, 76, 1) 6 +(15, 77, 1) 6 +(15, 78, 1) 5 +(15, 79, 1) 4 +(15, 80, 1) 4 +(15, 81, 1) 3 +(15, 82, 1) 3 +(15, 83, 1) 2 +(15, 84, 1) 1 +(15, 85, 1) 1 +(16, 14, 1) 0 +(16, 15, 1) 1 +(16, 16, 1) 1 +(16, 17, 1) 2 +(16, 18, 1) 2 +(16, 19, 1) 3 +(16, 20, 1) 4 +(16, 21, 1) 4 +(16, 22, 1) 5 +(16, 23, 1) 6 +(16, 24, 1) 6 +(16, 25, 1) 7 +(16, 26, 1) 7 +(16, 27, 1) 8 +(16, 28, 1) 9 +(16, 29, 1) 9 +(16, 30, 1) 10 +(16, 31, 1) 10 +(16, 32, 1) 11 +(16, 33, 1) 11 +(16, 34, 1) 11 +(16, 35, 1) 12 +(16, 36, 1) 12 +(16, 37, 1) 13 +(16, 38, 1) 13 +(16, 39, 1) 13 +(16, 40, 1) 13 +(16, 41, 1) 14 +(16, 42, 1) 14 +(16, 43, 1) 14 +(16, 44, 1) 14 +(16, 45, 1) 15 +(16, 46, 1) 15 +(16, 47, 1) 15 +(16, 48, 1) 15 +(16, 49, 1) 15 +(16, 50, 1) 15 +(16, 51, 1) 15 +(16, 52, 1) 15 +(16, 53, 1) 15 +(16, 54, 1) 15 +(16, 55, 1) 15 +(16, 56, 1) 15 +(16, 57, 1) 14 +(16, 58, 1) 14 +(16, 59, 1) 14 +(16, 60, 1) 14 +(16, 61, 1) 13 +(16, 62, 1) 13 +(16, 63, 1) 13 +(16, 64, 1) 13 +(16, 65, 1) 12 +(16, 66, 1) 12 +(16, 67, 1) 11 +(16, 68, 1) 11 +(16, 69, 1) 11 +(16, 70, 1) 10 +(16, 71, 1) 10 +(16, 72, 1) 9 +(16, 73, 1) 9 +(16, 74, 1) 8 +(16, 75, 1) 7 +(16, 76, 1) 7 +(16, 77, 1) 6 +(16, 78, 1) 6 +(16, 79, 1) 5 +(16, 80, 1) 4 +(16, 81, 1) 4 +(16, 82, 1) 3 +(16, 83, 1) 2 +(16, 84, 1) 2 +(16, 85, 1) 1 +(16, 86, 1) 1 +(16, 87, 1) 0 +(17, 14, 1) 1 +(17, 15, 1) 1 +(17, 16, 1) 2 +(17, 17, 1) 3 +(17, 18, 1) 3 +(17, 19, 1) 4 +(17, 20, 1) 5 +(17, 21, 1) 5 +(17, 22, 1) 6 +(17, 23, 1) 6 +(17, 24, 1) 7 +(17, 25, 1) 8 +(17, 26, 1) 8 +(17, 27, 1) 9 +(17, 28, 1) 9 +(17, 29, 1) 10 +(17, 30, 1) 10 +(17, 31, 1) 11 +(17, 32, 1) 11 +(17, 33, 1) 12 +(17, 34, 1) 12 +(17, 35, 1) 13 +(17, 36, 1) 13 +(17, 37, 1) 13 +(17, 38, 1) 14 +(17, 39, 1) 14 +(17, 40, 1) 14 +(17, 41, 1) 15 +(17, 42, 1) 15 +(17, 43, 1) 15 +(17, 44, 1) 15 +(17, 45, 1) 16 +(17, 46, 1) 16 +(17, 47, 1) 16 +(17, 48, 1) 16 +(17, 49, 1) 16 +(17, 50, 1) 16 +(17, 51, 1) 16 +(17, 52, 1) 16 +(17, 53, 1) 16 +(17, 54, 1) 16 +(17, 55, 1) 16 +(17, 56, 1) 16 +(17, 57, 1) 15 +(17, 58, 1) 15 +(17, 59, 1) 15 +(17, 60, 1) 15 +(17, 61, 1) 14 +(17, 62, 1) 14 +(17, 63, 1) 14 +(17, 64, 1) 13 +(17, 65, 1) 13 +(17, 66, 1) 13 +(17, 67, 1) 12 +(17, 68, 1) 12 +(17, 69, 1) 11 +(17, 70, 1) 11 +(17, 71, 1) 10 +(17, 72, 1) 10 +(17, 73, 1) 9 +(17, 74, 1) 9 +(17, 75, 1) 8 +(17, 76, 1) 8 +(17, 77, 1) 7 +(17, 78, 1) 6 +(17, 79, 1) 6 +(17, 80, 1) 5 +(17, 81, 1) 5 +(17, 82, 1) 4 +(17, 83, 1) 3 +(17, 84, 1) 3 +(17, 85, 1) 2 +(17, 86, 1) 1 +(17, 87, 1) 1 +(18, 14, 1) 1 +(18, 15, 1) 2 +(18, 16, 1) 3 +(18, 17, 1) 3 +(18, 18, 1) 4 +(18, 19, 1) 5 +(18, 20, 1) 5 +(18, 21, 1) 6 +(18, 22, 1) 7 +(18, 23, 1) 7 +(18, 24, 1) 8 +(18, 25, 1) 8 +(18, 26, 1) 9 +(18, 27, 1) 10 +(18, 28, 1) 10 +(18, 29, 1) 11 +(18, 30, 1) 11 +(18, 31, 1) 12 +(18, 32, 1) 12 +(18, 33, 1) 13 +(18, 34, 1) 13 +(18, 35, 1) 14 +(18, 36, 1) 14 +(18, 37, 1) 14 +(18, 38, 1) 15 +(18, 39, 1) 15 +(18, 40, 1) 15 +(18, 41, 1) 16 +(18, 42, 1) 16 +(18, 43, 1) 16 +(18, 44, 1) 16 +(18, 45, 1) 17 +(18, 46, 1) 17 +(18, 47, 1) 17 +(18, 48, 1) 17 +(18, 49, 1) 17 +(18, 50, 1) 17 +(18, 51, 1) 17 +(18, 52, 1) 17 +(18, 53, 1) 17 +(18, 54, 1) 17 +(18, 55, 1) 17 +(18, 56, 1) 17 +(18, 57, 1) 16 +(18, 58, 1) 16 +(18, 59, 1) 16 +(18, 60, 1) 16 +(18, 61, 1) 15 +(18, 62, 1) 15 +(18, 63, 1) 15 +(18, 64, 1) 14 +(18, 65, 1) 14 +(18, 66, 1) 14 +(18, 67, 1) 13 +(18, 68, 1) 13 +(18, 69, 1) 12 +(18, 70, 1) 12 +(18, 71, 1) 11 +(18, 72, 1) 11 +(18, 73, 1) 10 +(18, 74, 1) 10 +(18, 75, 1) 9 +(18, 76, 1) 8 +(18, 77, 1) 8 +(18, 78, 1) 7 +(18, 79, 1) 7 +(18, 80, 1) 6 +(18, 81, 1) 5 +(18, 82, 1) 5 +(18, 83, 1) 4 +(18, 84, 1) 3 +(18, 85, 1) 3 +(18, 86, 1) 2 +(18, 87, 1) 1 +(19, 14, 1) 2 +(19, 15, 1) 3 +(19, 16, 1) 3 +(19, 17, 1) 4 +(19, 18, 1) 5 +(19, 19, 1) 5 +(19, 20, 1) 6 +(19, 21, 1) 7 +(19, 22, 1) 7 +(19, 23, 1) 8 +(19, 24, 1) 9 +(19, 25, 1) 9 +(19, 26, 1) 10 +(19, 27, 1) 10 +(19, 28, 1) 11 +(19, 29, 1) 12 +(19, 30, 1) 12 +(19, 31, 1) 13 +(19, 32, 1) 13 +(19, 33, 1) 14 +(19, 34, 1) 14 +(19, 35, 1) 15 +(19, 36, 1) 15 +(19, 37, 1) 15 +(19, 38, 1) 16 +(19, 39, 1) 16 +(19, 40, 1) 16 +(19, 41, 1) 17 +(19, 42, 1) 17 +(19, 43, 1) 17 +(19, 44, 1) 17 +(19, 45, 1) 18 +(19, 46, 1) 18 +(19, 47, 1) 18 +(19, 48, 1) 18 +(19, 49, 1) 18 +(19, 50, 1) 18 +(19, 51, 1) 18 +(19, 52, 1) 18 +(19, 53, 1) 18 +(19, 54, 1) 18 +(19, 55, 1) 18 +(19, 56, 1) 18 +(19, 57, 1) 17 +(19, 58, 1) 17 +(19, 59, 1) 17 +(19, 60, 1) 17 +(19, 61, 1) 16 +(19, 62, 1) 16 +(19, 63, 1) 16 +(19, 64, 1) 15 +(19, 65, 1) 15 +(19, 66, 1) 15 +(19, 67, 1) 14 +(19, 68, 1) 14 +(19, 69, 1) 13 +(19, 70, 1) 13 +(19, 71, 1) 12 +(19, 72, 1) 12 +(19, 73, 1) 11 +(19, 74, 1) 10 +(19, 75, 1) 10 +(19, 76, 1) 9 +(19, 77, 1) 9 +(19, 78, 1) 8 +(19, 79, 1) 7 +(19, 80, 1) 7 +(19, 81, 1) 6 +(19, 82, 1) 5 +(19, 83, 1) 5 +(19, 84, 1) 4 +(19, 85, 1) 3 +(19, 86, 1) 3 +(19, 87, 1) 2 +(20, 14, 1) 3 +(20, 15, 1) 3 +(20, 16, 1) 4 +(20, 17, 1) 5 +(20, 18, 1) 5 +(20, 19, 1) 6 +(20, 20, 1) 7 +(20, 21, 1) 7 +(20, 22, 1) 8 +(20, 23, 1) 9 +(20, 24, 1) 9 +(20, 25, 1) 10 +(20, 26, 1) 11 +(20, 27, 1) 11 +(20, 28, 1) 12 +(20, 29, 1) 12 +(20, 30, 1) 13 +(20, 31, 1) 14 +(20, 32, 1) 14 +(20, 33, 1) 15 +(20, 34, 1) 15 +(20, 35, 1) 15 +(20, 36, 1) 16 +(20, 37, 1) 16 +(20, 38, 1) 17 +(20, 39, 1) 17 +(20, 40, 1) 17 +(20, 41, 1) 18 +(20, 42, 1) 18 +(20, 43, 1) 18 +(20, 44, 1) 18 +(20, 45, 1) 19 +(20, 46, 1) 19 +(20, 47, 1) 19 +(20, 48, 1) 19 +(20, 49, 1) 19 +(20, 50, 1) 19 +(20, 51, 1) 19 +(20, 52, 1) 19 +(20, 53, 1) 19 +(20, 54, 1) 19 +(20, 55, 1) 19 +(20, 56, 1) 19 +(20, 57, 1) 18 +(20, 58, 1) 18 +(20, 59, 1) 18 +(20, 60, 1) 18 +(20, 61, 1) 17 +(20, 62, 1) 17 +(20, 63, 1) 17 +(20, 64, 1) 16 +(20, 65, 1) 16 +(20, 66, 1) 15 +(20, 67, 1) 15 +(20, 68, 1) 15 +(20, 69, 1) 14 +(20, 70, 1) 14 +(20, 71, 1) 13 +(20, 72, 1) 12 +(20, 73, 1) 12 +(20, 74, 1) 11 +(20, 75, 1) 11 +(20, 76, 1) 10 +(20, 77, 1) 9 +(20, 78, 1) 9 +(20, 79, 1) 8 +(20, 80, 1) 7 +(20, 81, 1) 7 +(20, 82, 1) 6 +(20, 83, 1) 5 +(20, 84, 1) 5 +(20, 85, 1) 4 +(20, 86, 1) 3 +(20, 87, 1) 3 +(21, 9, 1) 0 +(21, 10, 1) 0 +(21, 11, 1) 1 +(21, 12, 1) 1 +(21, 13, 1) 2 +(21, 14, 1) 3 +(21, 15, 1) 4 +(21, 16, 1) 4 +(21, 17, 1) 5 +(21, 18, 1) 6 +(21, 19, 1) 7 +(21, 20, 1) 7 +(21, 21, 1) 8 +(21, 22, 1) 9 +(21, 23, 1) 9 +(21, 24, 1) 10 +(21, 25, 1) 11 +(21, 26, 1) 11 +(21, 27, 1) 12 +(21, 28, 1) 13 +(21, 29, 1) 13 +(21, 30, 1) 14 +(21, 31, 1) 14 +(21, 32, 1) 15 +(21, 33, 1) 15 +(21, 34, 1) 16 +(21, 35, 1) 16 +(21, 36, 1) 17 +(21, 37, 1) 17 +(21, 38, 1) 18 +(21, 39, 1) 18 +(21, 40, 1) 18 +(21, 41, 1) 19 +(21, 42, 1) 19 +(21, 43, 1) 19 +(21, 44, 1) 19 +(21, 45, 1) 20 +(21, 46, 1) 20 +(21, 47, 1) 20 +(21, 48, 1) 20 +(21, 49, 1) 20 +(21, 50, 1) 20 +(21, 51, 1) 20 +(21, 52, 1) 20 +(21, 53, 1) 20 +(21, 54, 1) 20 +(21, 55, 1) 20 +(21, 56, 1) 20 +(21, 57, 1) 19 +(21, 58, 1) 19 +(21, 59, 1) 19 +(21, 60, 1) 19 +(21, 61, 1) 18 +(21, 62, 1) 18 +(21, 63, 1) 18 +(21, 64, 1) 17 +(21, 65, 1) 17 +(21, 66, 1) 16 +(21, 67, 1) 16 +(21, 68, 1) 15 +(21, 69, 1) 15 +(21, 70, 1) 14 +(21, 71, 1) 14 +(21, 72, 1) 13 +(21, 73, 1) 13 +(21, 74, 1) 12 +(21, 75, 1) 11 +(21, 76, 1) 11 +(21, 77, 1) 10 +(21, 78, 1) 9 +(21, 79, 1) 9 +(21, 80, 1) 8 +(21, 81, 1) 7 +(21, 82, 1) 7 +(21, 83, 1) 6 +(21, 84, 1) 5 +(21, 85, 1) 4 +(21, 86, 1) 4 +(21, 87, 1) 3 +(21, 88, 1) 2 +(21, 89, 1) 1 +(21, 90, 1) 1 +(21, 91, 1) 0 +(21, 92, 1) 0 +(22, 9, 1) 0 +(22, 10, 1) 1 +(22, 11, 1) 1 +(22, 12, 1) 2 +(22, 13, 1) 3 +(22, 14, 1) 4 +(22, 15, 1) 4 +(22, 16, 1) 5 +(22, 17, 1) 6 +(22, 18, 1) 7 +(22, 19, 1) 7 +(22, 20, 1) 8 +(22, 21, 1) 9 +(22, 22, 1) 9 +(22, 23, 1) 10 +(22, 24, 1) 11 +(22, 25, 1) 12 +(22, 26, 1) 12 +(22, 27, 1) 13 +(22, 28, 1) 13 +(22, 29, 1) 14 +(22, 30, 1) 15 +(22, 31, 1) 15 +(22, 32, 1) 16 +(22, 33, 1) 16 +(22, 34, 1) 17 +(22, 35, 1) 17 +(22, 36, 1) 18 +(22, 37, 1) 18 +(22, 38, 1) 18 +(22, 39, 1) 19 +(22, 40, 1) 19 +(22, 41, 1) 20 +(22, 42, 1) 20 +(22, 43, 1) 20 +(22, 44, 1) 20 +(22, 45, 1) 20 +(22, 46, 1) 21 +(22, 47, 1) 21 +(22, 48, 1) 21 +(22, 49, 1) 21 +(22, 50, 1) 21 +(22, 51, 1) 21 +(22, 52, 1) 21 +(22, 53, 1) 21 +(22, 54, 1) 21 +(22, 55, 1) 21 +(22, 56, 1) 20 +(22, 57, 1) 20 +(22, 58, 1) 20 +(22, 59, 1) 20 +(22, 60, 1) 20 +(22, 61, 1) 19 +(22, 62, 1) 19 +(22, 63, 1) 18 +(22, 64, 1) 18 +(22, 65, 1) 18 +(22, 66, 1) 17 +(22, 67, 1) 17 +(22, 68, 1) 16 +(22, 69, 1) 16 +(22, 70, 1) 15 +(22, 71, 1) 15 +(22, 72, 1) 14 +(22, 73, 1) 13 +(22, 74, 1) 13 +(22, 75, 1) 12 +(22, 76, 1) 12 +(22, 77, 1) 11 +(22, 78, 1) 10 +(22, 79, 1) 9 +(22, 80, 1) 9 +(22, 81, 1) 8 +(22, 82, 1) 7 +(22, 83, 1) 7 +(22, 84, 1) 6 +(22, 85, 1) 5 +(22, 86, 1) 4 +(22, 87, 1) 4 +(22, 88, 1) 3 +(22, 89, 1) 2 +(22, 90, 1) 1 +(22, 91, 1) 1 +(22, 92, 1) 0 +(23, 9, 1) 0 +(23, 10, 1) 1 +(23, 11, 1) 2 +(23, 12, 1) 3 +(23, 13, 1) 3 +(23, 14, 1) 4 +(23, 15, 1) 5 +(23, 16, 1) 6 +(23, 17, 1) 7 +(23, 18, 1) 7 +(23, 19, 1) 8 +(23, 20, 1) 9 +(23, 21, 1) 9 +(23, 22, 1) 10 +(23, 23, 1) 11 +(23, 24, 1) 12 +(23, 25, 1) 12 +(23, 26, 1) 13 +(23, 27, 1) 14 +(23, 28, 1) 14 +(23, 29, 1) 15 +(23, 30, 1) 15 +(23, 31, 1) 16 +(23, 32, 1) 17 +(23, 33, 1) 17 +(23, 34, 1) 18 +(23, 35, 1) 18 +(23, 36, 1) 19 +(23, 37, 1) 19 +(23, 38, 1) 19 +(23, 39, 1) 20 +(23, 40, 1) 20 +(23, 41, 1) 20 +(23, 42, 1) 21 +(23, 43, 1) 21 +(23, 44, 1) 21 +(23, 45, 1) 21 +(23, 46, 1) 22 +(23, 47, 1) 22 +(23, 48, 1) 22 +(23, 49, 1) 22 +(23, 50, 1) 22 +(23, 51, 1) 22 +(23, 52, 1) 22 +(23, 53, 1) 22 +(23, 54, 1) 22 +(23, 55, 1) 22 +(23, 56, 1) 21 +(23, 57, 1) 21 +(23, 58, 1) 21 +(23, 59, 1) 21 +(23, 60, 1) 20 +(23, 61, 1) 20 +(23, 62, 1) 20 +(23, 63, 1) 19 +(23, 64, 1) 19 +(23, 65, 1) 19 +(23, 66, 1) 18 +(23, 67, 1) 18 +(23, 68, 1) 17 +(23, 69, 1) 17 +(23, 70, 1) 16 +(23, 71, 1) 15 +(23, 72, 1) 15 +(23, 73, 1) 14 +(23, 74, 1) 14 +(23, 75, 1) 13 +(23, 76, 1) 12 +(23, 77, 1) 12 +(23, 78, 1) 11 +(23, 79, 1) 10 +(23, 80, 1) 9 +(23, 81, 1) 9 +(23, 82, 1) 8 +(23, 83, 1) 7 +(23, 84, 1) 7 +(23, 85, 1) 6 +(23, 86, 1) 5 +(23, 87, 1) 4 +(23, 88, 1) 3 +(23, 89, 1) 3 +(23, 90, 1) 2 +(23, 91, 1) 1 +(23, 92, 1) 0 +(24, 9, 1) 1 +(24, 10, 1) 2 +(24, 11, 1) 2 +(24, 12, 1) 3 +(24, 13, 1) 4 +(24, 14, 1) 5 +(24, 15, 1) 6 +(24, 16, 1) 6 +(24, 17, 1) 7 +(24, 18, 1) 8 +(24, 19, 1) 9 +(24, 20, 1) 9 +(24, 21, 1) 10 +(24, 22, 1) 11 +(24, 23, 1) 12 +(24, 24, 1) 12 +(24, 25, 1) 13 +(24, 26, 1) 14 +(24, 27, 1) 14 +(24, 28, 1) 15 +(24, 29, 1) 16 +(24, 30, 1) 16 +(24, 31, 1) 17 +(24, 32, 1) 17 +(24, 33, 1) 18 +(24, 34, 1) 18 +(24, 35, 1) 19 +(24, 36, 1) 19 +(24, 37, 1) 20 +(24, 38, 1) 20 +(24, 39, 1) 21 +(24, 40, 1) 21 +(24, 41, 1) 21 +(24, 42, 1) 22 +(24, 43, 1) 22 +(24, 44, 1) 22 +(24, 45, 1) 22 +(24, 46, 1) 23 +(24, 47, 1) 23 +(24, 48, 1) 23 +(24, 49, 1) 23 +(24, 50, 1) 23 +(24, 51, 1) 23 +(24, 52, 1) 23 +(24, 53, 1) 23 +(24, 54, 1) 23 +(24, 55, 1) 23 +(24, 56, 1) 22 +(24, 57, 1) 22 +(24, 58, 1) 22 +(24, 59, 1) 22 +(24, 60, 1) 21 +(24, 61, 1) 21 +(24, 62, 1) 21 +(24, 63, 1) 20 +(24, 64, 1) 20 +(24, 65, 1) 19 +(24, 66, 1) 19 +(24, 67, 1) 18 +(24, 68, 1) 18 +(24, 69, 1) 17 +(24, 70, 1) 17 +(24, 71, 1) 16 +(24, 72, 1) 16 +(24, 73, 1) 15 +(24, 74, 1) 14 +(24, 75, 1) 14 +(24, 76, 1) 13 +(24, 77, 1) 12 +(24, 78, 1) 12 +(24, 79, 1) 11 +(24, 80, 1) 10 +(24, 81, 1) 9 +(24, 82, 1) 9 +(24, 83, 1) 8 +(24, 84, 1) 7 +(24, 85, 1) 6 +(24, 86, 1) 6 +(24, 87, 1) 5 +(24, 88, 1) 4 +(24, 89, 1) 3 +(24, 90, 1) 2 +(24, 91, 1) 2 +(24, 92, 1) 1 +(25, 9, 1) 1 +(25, 10, 1) 2 +(25, 11, 1) 3 +(25, 12, 1) 4 +(25, 13, 1) 5 +(25, 14, 1) 5 +(25, 15, 1) 6 +(25, 16, 1) 7 +(25, 17, 1) 8 +(25, 18, 1) 9 +(25, 19, 1) 9 +(25, 20, 1) 10 +(25, 21, 1) 11 +(25, 22, 1) 12 +(25, 23, 1) 12 +(25, 24, 1) 13 +(25, 25, 1) 14 +(25, 26, 1) 14 +(25, 27, 1) 15 +(25, 28, 1) 16 +(25, 29, 1) 16 +(25, 30, 1) 17 +(25, 31, 1) 18 +(25, 32, 1) 18 +(25, 33, 1) 19 +(25, 34, 1) 19 +(25, 35, 1) 20 +(25, 36, 1) 20 +(25, 37, 1) 21 +(25, 38, 1) 21 +(25, 39, 1) 22 +(25, 40, 1) 22 +(25, 41, 1) 22 +(25, 42, 1) 23 +(25, 43, 1) 23 +(25, 44, 1) 23 +(25, 45, 1) 23 +(25, 46, 1) 24 +(25, 47, 1) 24 +(25, 48, 1) 24 +(25, 49, 1) 24 +(25, 50, 1) 24 +(25, 51, 1) 24 +(25, 52, 1) 24 +(25, 53, 1) 24 +(25, 54, 1) 24 +(25, 55, 1) 24 +(25, 56, 1) 23 +(25, 57, 1) 23 +(25, 58, 1) 23 +(25, 59, 1) 23 +(25, 60, 1) 22 +(25, 61, 1) 22 +(25, 62, 1) 22 +(25, 63, 1) 21 +(25, 64, 1) 21 +(25, 65, 1) 20 +(25, 66, 1) 20 +(25, 67, 1) 19 +(25, 68, 1) 19 +(25, 69, 1) 18 +(25, 70, 1) 18 +(25, 71, 1) 17 +(25, 72, 1) 16 +(25, 73, 1) 16 +(25, 74, 1) 15 +(25, 75, 1) 14 +(25, 76, 1) 14 +(25, 77, 1) 13 +(25, 78, 1) 12 +(25, 79, 1) 12 +(25, 80, 1) 11 +(25, 81, 1) 10 +(25, 82, 1) 9 +(25, 83, 1) 9 +(25, 84, 1) 8 +(25, 85, 1) 7 +(25, 86, 1) 6 +(25, 87, 1) 5 +(25, 88, 1) 5 +(25, 89, 1) 4 +(25, 90, 1) 3 +(25, 91, 1) 2 +(25, 92, 1) 1 +(26, 6, 1) 0 +(26, 7, 1) 0 +(26, 8, 1) 1 +(26, 9, 1) 2 +(26, 10, 1) 3 +(26, 11, 1) 3 +(26, 12, 1) 4 +(26, 13, 1) 5 +(26, 14, 1) 6 +(26, 15, 1) 7 +(26, 16, 1) 7 +(26, 17, 1) 8 +(26, 18, 1) 9 +(26, 19, 1) 10 +(26, 20, 1) 11 +(26, 21, 1) 11 +(26, 22, 1) 12 +(26, 23, 1) 13 +(26, 24, 1) 14 +(26, 25, 1) 14 +(26, 26, 1) 15 +(26, 27, 1) 16 +(26, 28, 1) 16 +(26, 29, 1) 17 +(26, 30, 1) 18 +(26, 31, 1) 18 +(26, 32, 1) 19 +(26, 33, 1) 19 +(26, 34, 1) 20 +(26, 35, 1) 21 +(26, 36, 1) 21 +(26, 37, 1) 22 +(26, 38, 1) 22 +(26, 39, 1) 22 +(26, 40, 1) 23 +(26, 41, 1) 23 +(26, 42, 1) 24 +(26, 43, 1) 24 +(26, 44, 1) 24 +(26, 45, 1) 24 +(26, 46, 1) 25 +(26, 47, 1) 25 +(26, 48, 1) 25 +(26, 49, 1) 25 +(26, 50, 1) 25 +(26, 51, 1) 25 +(26, 52, 1) 25 +(26, 53, 1) 25 +(26, 54, 1) 25 +(26, 55, 1) 25 +(26, 56, 1) 24 +(26, 57, 1) 24 +(26, 58, 1) 24 +(26, 59, 1) 24 +(26, 60, 1) 23 +(26, 61, 1) 23 +(26, 62, 1) 22 +(26, 63, 1) 22 +(26, 64, 1) 22 +(26, 65, 1) 21 +(26, 66, 1) 21 +(26, 67, 1) 20 +(26, 68, 1) 19 +(26, 69, 1) 19 +(26, 70, 1) 18 +(26, 71, 1) 18 +(26, 72, 1) 17 +(26, 73, 1) 16 +(26, 74, 1) 16 +(26, 75, 1) 15 +(26, 76, 1) 14 +(26, 77, 1) 14 +(26, 78, 1) 13 +(26, 79, 1) 12 +(26, 80, 1) 11 +(26, 81, 1) 11 +(26, 82, 1) 10 +(26, 83, 1) 9 +(26, 84, 1) 8 +(26, 85, 1) 7 +(26, 86, 1) 7 +(26, 87, 1) 6 +(26, 88, 1) 5 +(26, 89, 1) 4 +(26, 90, 1) 3 +(26, 91, 1) 3 +(26, 92, 1) 2 +(26, 93, 1) 1 +(26, 94, 1) 0 +(26, 95, 1) 0 +(27, 6, 1) 0 +(27, 7, 1) 0 +(27, 8, 1) 1 +(27, 9, 1) 2 +(27, 10, 1) 3 +(27, 11, 1) 4 +(27, 12, 1) 5 +(27, 13, 1) 6 +(27, 14, 1) 6 +(27, 15, 1) 7 +(27, 16, 1) 8 +(27, 17, 1) 9 +(27, 18, 1) 10 +(27, 19, 1) 10 +(27, 20, 1) 11 +(27, 21, 1) 12 +(27, 22, 1) 13 +(27, 23, 1) 14 +(27, 24, 1) 14 +(27, 25, 1) 15 +(27, 26, 1) 16 +(27, 27, 1) 16 +(27, 28, 1) 17 +(27, 29, 1) 18 +(27, 30, 1) 18 +(27, 31, 1) 19 +(27, 32, 1) 20 +(27, 33, 1) 20 +(27, 34, 1) 21 +(27, 35, 1) 21 +(27, 36, 1) 22 +(27, 37, 1) 22 +(27, 38, 1) 23 +(27, 39, 1) 23 +(27, 40, 1) 24 +(27, 41, 1) 24 +(27, 42, 1) 25 +(27, 43, 1) 25 +(27, 44, 1) 25 +(27, 45, 1) 25 +(27, 46, 1) 26 +(27, 47, 1) 26 +(27, 48, 1) 26 +(27, 49, 1) 26 +(27, 50, 1) 26 +(27, 51, 1) 26 +(27, 52, 1) 26 +(27, 53, 1) 26 +(27, 54, 1) 26 +(27, 55, 1) 26 +(27, 56, 1) 25 +(27, 57, 1) 25 +(27, 58, 1) 25 +(27, 59, 1) 25 +(27, 60, 1) 24 +(27, 61, 1) 24 +(27, 62, 1) 23 +(27, 63, 1) 23 +(27, 64, 1) 22 +(27, 65, 1) 22 +(27, 66, 1) 21 +(27, 67, 1) 21 +(27, 68, 1) 20 +(27, 69, 1) 20 +(27, 70, 1) 19 +(27, 71, 1) 18 +(27, 72, 1) 18 +(27, 73, 1) 17 +(27, 74, 1) 16 +(27, 75, 1) 16 +(27, 76, 1) 15 +(27, 77, 1) 14 +(27, 78, 1) 14 +(27, 79, 1) 13 +(27, 80, 1) 12 +(27, 81, 1) 11 +(27, 82, 1) 10 +(27, 83, 1) 10 +(27, 84, 1) 9 +(27, 85, 1) 8 +(27, 86, 1) 7 +(27, 87, 1) 6 +(27, 88, 1) 6 +(27, 89, 1) 5 +(27, 90, 1) 4 +(27, 91, 1) 3 +(27, 92, 1) 2 +(27, 93, 1) 1 +(27, 94, 1) 0 +(27, 95, 1) 0 +(28, 6, 1) 0 +(28, 7, 1) 1 +(28, 8, 1) 2 +(28, 9, 1) 3 +(28, 10, 1) 4 +(28, 11, 1) 4 +(28, 12, 1) 5 +(28, 13, 1) 6 +(28, 14, 1) 7 +(28, 15, 1) 8 +(28, 16, 1) 9 +(28, 17, 1) 9 +(28, 18, 1) 10 +(28, 19, 1) 11 +(28, 20, 1) 12 +(28, 21, 1) 13 +(28, 22, 1) 13 +(28, 23, 1) 14 +(28, 24, 1) 15 +(28, 25, 1) 16 +(28, 26, 1) 16 +(28, 27, 1) 17 +(28, 28, 1) 18 +(28, 29, 1) 19 +(28, 30, 1) 19 +(28, 31, 1) 20 +(28, 32, 1) 20 +(28, 33, 1) 21 +(28, 34, 1) 22 +(28, 35, 1) 22 +(28, 36, 1) 23 +(28, 37, 1) 23 +(28, 38, 1) 24 +(28, 39, 1) 24 +(28, 40, 1) 25 +(28, 41, 1) 25 +(28, 42, 1) 25 +(28, 43, 1) 26 +(28, 44, 1) 26 +(28, 45, 1) 26 +(28, 46, 1) 27 +(28, 47, 1) 27 +(28, 48, 1) 27 +(28, 49, 1) 27 +(28, 50, 1) 27 +(28, 51, 1) 27 +(28, 52, 1) 27 +(28, 53, 1) 27 +(28, 54, 1) 27 +(28, 55, 1) 27 +(28, 56, 1) 26 +(28, 57, 1) 26 +(28, 58, 1) 26 +(28, 59, 1) 25 +(28, 60, 1) 25 +(28, 61, 1) 25 +(28, 62, 1) 24 +(28, 63, 1) 24 +(28, 64, 1) 23 +(28, 65, 1) 23 +(28, 66, 1) 22 +(28, 67, 1) 22 +(28, 68, 1) 21 +(28, 69, 1) 20 +(28, 70, 1) 20 +(28, 71, 1) 19 +(28, 72, 1) 19 +(28, 73, 1) 18 +(28, 74, 1) 17 +(28, 75, 1) 16 +(28, 76, 1) 16 +(28, 77, 1) 15 +(28, 78, 1) 14 +(28, 79, 1) 13 +(28, 80, 1) 13 +(28, 81, 1) 12 +(28, 82, 1) 11 +(28, 83, 1) 10 +(28, 84, 1) 9 +(28, 85, 1) 9 +(28, 86, 1) 8 +(28, 87, 1) 7 +(28, 88, 1) 6 +(28, 89, 1) 5 +(28, 90, 1) 4 +(28, 91, 1) 4 +(28, 92, 1) 3 +(28, 93, 1) 2 +(28, 94, 1) 1 +(28, 95, 1) 0 +(29, 6, 1) 1 +(29, 7, 1) 1 +(29, 8, 1) 2 +(29, 9, 1) 3 +(29, 10, 1) 4 +(29, 11, 1) 5 +(29, 12, 1) 6 +(29, 13, 1) 7 +(29, 14, 1) 7 +(29, 15, 1) 8 +(29, 16, 1) 9 +(29, 17, 1) 10 +(29, 18, 1) 11 +(29, 19, 1) 12 +(29, 20, 1) 12 +(29, 21, 1) 13 +(29, 22, 1) 14 +(29, 23, 1) 15 +(29, 24, 1) 16 +(29, 25, 1) 16 +(29, 26, 1) 17 +(29, 27, 1) 18 +(29, 28, 1) 19 +(29, 29, 1) 19 +(29, 30, 1) 20 +(29, 31, 1) 21 +(29, 32, 1) 21 +(29, 33, 1) 22 +(29, 34, 1) 23 +(29, 35, 1) 23 +(29, 36, 1) 24 +(29, 37, 1) 24 +(29, 38, 1) 25 +(29, 39, 1) 25 +(29, 40, 1) 26 +(29, 41, 1) 26 +(29, 42, 1) 26 +(29, 43, 1) 27 +(29, 44, 1) 27 +(29, 45, 1) 27 +(29, 46, 1) 28 +(29, 47, 1) 28 +(29, 48, 1) 28 +(29, 49, 1) 28 +(29, 50, 1) 28 +(29, 51, 1) 28 +(29, 52, 1) 28 +(29, 53, 1) 28 +(29, 54, 1) 28 +(29, 55, 1) 28 +(29, 56, 1) 27 +(29, 57, 1) 27 +(29, 58, 1) 27 +(29, 59, 1) 26 +(29, 60, 1) 26 +(29, 61, 1) 26 +(29, 62, 1) 25 +(29, 63, 1) 25 +(29, 64, 1) 24 +(29, 65, 1) 24 +(29, 66, 1) 23 +(29, 67, 1) 23 +(29, 68, 1) 22 +(29, 69, 1) 21 +(29, 70, 1) 21 +(29, 71, 1) 20 +(29, 72, 1) 19 +(29, 73, 1) 19 +(29, 74, 1) 18 +(29, 75, 1) 17 +(29, 76, 1) 16 +(29, 77, 1) 16 +(29, 78, 1) 15 +(29, 79, 1) 14 +(29, 80, 1) 13 +(29, 81, 1) 12 +(29, 82, 1) 12 +(29, 83, 1) 11 +(29, 84, 1) 10 +(29, 85, 1) 9 +(29, 86, 1) 8 +(29, 87, 1) 7 +(29, 88, 1) 7 +(29, 89, 1) 6 +(29, 90, 1) 5 +(29, 91, 1) 4 +(29, 92, 1) 3 +(29, 93, 1) 2 +(29, 94, 1) 1 +(29, 95, 1) 1 +(30, 6, 1) 1 +(30, 7, 1) 2 +(30, 8, 1) 3 +(30, 9, 1) 4 +(30, 10, 1) 5 +(30, 11, 1) 5 +(30, 12, 1) 6 +(30, 13, 1) 7 +(30, 14, 1) 8 +(30, 15, 1) 9 +(30, 16, 1) 10 +(30, 17, 1) 11 +(30, 18, 1) 11 +(30, 19, 1) 12 +(30, 20, 1) 13 +(30, 21, 1) 14 +(30, 22, 1) 15 +(30, 23, 1) 15 +(30, 24, 1) 16 +(30, 25, 1) 17 +(30, 26, 1) 18 +(30, 27, 1) 19 +(30, 28, 1) 19 +(30, 29, 1) 20 +(30, 30, 1) 21 +(30, 31, 1) 21 +(30, 32, 1) 22 +(30, 33, 1) 23 +(30, 34, 1) 23 +(30, 35, 1) 24 +(30, 36, 1) 24 +(30, 37, 1) 25 +(30, 38, 1) 26 +(30, 39, 1) 26 +(30, 40, 1) 27 +(30, 41, 1) 27 +(30, 42, 1) 27 +(30, 43, 1) 28 +(30, 44, 1) 28 +(30, 45, 1) 28 +(30, 46, 1) 29 +(30, 47, 1) 29 +(30, 48, 1) 29 +(30, 49, 1) 29 +(30, 50, 1) 29 +(30, 51, 1) 29 +(30, 52, 1) 29 +(30, 53, 1) 29 +(30, 54, 1) 29 +(30, 55, 1) 29 +(30, 56, 1) 28 +(30, 57, 1) 28 +(30, 58, 1) 28 +(30, 59, 1) 27 +(30, 60, 1) 27 +(30, 61, 1) 27 +(30, 62, 1) 26 +(30, 63, 1) 26 +(30, 64, 1) 25 +(30, 65, 1) 24 +(30, 66, 1) 24 +(30, 67, 1) 23 +(30, 68, 1) 23 +(30, 69, 1) 22 +(30, 70, 1) 21 +(30, 71, 1) 21 +(30, 72, 1) 20 +(30, 73, 1) 19 +(30, 74, 1) 19 +(30, 75, 1) 18 +(30, 76, 1) 17 +(30, 77, 1) 16 +(30, 78, 1) 15 +(30, 79, 1) 15 +(30, 80, 1) 14 +(30, 81, 1) 13 +(30, 82, 1) 12 +(30, 83, 1) 11 +(30, 84, 1) 11 +(30, 85, 1) 10 +(30, 86, 1) 9 +(30, 87, 1) 8 +(30, 88, 1) 7 +(30, 89, 1) 6 +(30, 90, 1) 5 +(30, 91, 1) 5 +(30, 92, 1) 4 +(30, 93, 1) 3 +(30, 94, 1) 2 +(30, 95, 1) 1 +(31, 6, 1) 1 +(31, 7, 1) 2 +(31, 8, 1) 3 +(31, 9, 1) 4 +(31, 10, 1) 5 +(31, 11, 1) 6 +(31, 12, 1) 7 +(31, 13, 1) 7 +(31, 14, 1) 8 +(31, 15, 1) 9 +(31, 16, 1) 10 +(31, 17, 1) 11 +(31, 18, 1) 12 +(31, 19, 1) 13 +(31, 20, 1) 13 +(31, 21, 1) 14 +(31, 22, 1) 15 +(31, 23, 1) 16 +(31, 24, 1) 17 +(31, 25, 1) 18 +(31, 26, 1) 18 +(31, 27, 1) 19 +(31, 28, 1) 20 +(31, 29, 1) 21 +(31, 30, 1) 21 +(31, 31, 1) 22 +(31, 32, 1) 23 +(31, 33, 1) 23 +(31, 34, 1) 24 +(31, 35, 1) 25 +(31, 36, 1) 25 +(31, 37, 1) 26 +(31, 38, 1) 26 +(31, 39, 1) 27 +(31, 40, 1) 27 +(31, 41, 1) 28 +(31, 42, 1) 28 +(31, 43, 1) 29 +(31, 44, 1) 29 +(31, 45, 1) 29 +(31, 46, 1) 30 +(31, 47, 1) 30 +(31, 48, 1) 30 +(31, 49, 1) 30 +(31, 50, 1) 30 +(31, 51, 1) 30 +(31, 52, 1) 30 +(31, 53, 1) 30 +(31, 54, 1) 30 +(31, 55, 1) 30 +(31, 56, 1) 29 +(31, 57, 1) 29 +(31, 58, 1) 29 +(31, 59, 1) 28 +(31, 60, 1) 28 +(31, 61, 1) 27 +(31, 62, 1) 27 +(31, 63, 1) 26 +(31, 64, 1) 26 +(31, 65, 1) 25 +(31, 66, 1) 25 +(31, 67, 1) 24 +(31, 68, 1) 23 +(31, 69, 1) 23 +(31, 70, 1) 22 +(31, 71, 1) 21 +(31, 72, 1) 21 +(31, 73, 1) 20 +(31, 74, 1) 19 +(31, 75, 1) 18 +(31, 76, 1) 18 +(31, 77, 1) 17 +(31, 78, 1) 16 +(31, 79, 1) 15 +(31, 80, 1) 14 +(31, 81, 1) 13 +(31, 82, 1) 13 +(31, 83, 1) 12 +(31, 84, 1) 11 +(31, 85, 1) 10 +(31, 86, 1) 9 +(31, 87, 1) 8 +(31, 88, 1) 7 +(31, 89, 1) 7 +(31, 90, 1) 6 +(31, 91, 1) 5 +(31, 92, 1) 4 +(31, 93, 1) 3 +(31, 94, 1) 2 +(31, 95, 1) 1 +(32, 6, 1) 2 +(32, 7, 1) 2 +(32, 8, 1) 3 +(32, 9, 1) 4 +(32, 10, 1) 5 +(32, 11, 1) 6 +(32, 12, 1) 7 +(32, 13, 1) 8 +(32, 14, 1) 9 +(32, 15, 1) 10 +(32, 16, 1) 11 +(32, 17, 1) 11 +(32, 18, 1) 12 +(32, 19, 1) 13 +(32, 20, 1) 14 +(32, 21, 1) 15 +(32, 22, 1) 16 +(32, 23, 1) 17 +(32, 24, 1) 17 +(32, 25, 1) 18 +(32, 26, 1) 19 +(32, 27, 1) 20 +(32, 28, 1) 20 +(32, 29, 1) 21 +(32, 30, 1) 22 +(32, 31, 1) 23 +(32, 32, 1) 23 +(32, 33, 1) 24 +(32, 34, 1) 25 +(32, 35, 1) 25 +(32, 36, 1) 26 +(32, 37, 1) 27 +(32, 38, 1) 27 +(32, 39, 1) 28 +(32, 40, 1) 28 +(32, 41, 1) 29 +(32, 42, 1) 29 +(32, 43, 1) 30 +(32, 44, 1) 30 +(32, 45, 1) 30 +(32, 46, 1) 30 +(32, 47, 1) 31 +(32, 48, 1) 31 +(32, 49, 1) 31 +(32, 50, 1) 31 +(32, 51, 1) 31 +(32, 52, 1) 31 +(32, 53, 1) 31 +(32, 54, 1) 31 +(32, 55, 1) 30 +(32, 56, 1) 30 +(32, 57, 1) 30 +(32, 58, 1) 30 +(32, 59, 1) 29 +(32, 60, 1) 29 +(32, 61, 1) 28 +(32, 62, 1) 28 +(32, 63, 1) 27 +(32, 64, 1) 27 +(32, 65, 1) 26 +(32, 66, 1) 25 +(32, 67, 1) 25 +(32, 68, 1) 24 +(32, 69, 1) 23 +(32, 70, 1) 23 +(32, 71, 1) 22 +(32, 72, 1) 21 +(32, 73, 1) 20 +(32, 74, 1) 20 +(32, 75, 1) 19 +(32, 76, 1) 18 +(32, 77, 1) 17 +(32, 78, 1) 17 +(32, 79, 1) 16 +(32, 80, 1) 15 +(32, 81, 1) 14 +(32, 82, 1) 13 +(32, 83, 1) 12 +(32, 84, 1) 11 +(32, 85, 1) 11 +(32, 86, 1) 10 +(32, 87, 1) 9 +(32, 88, 1) 8 +(32, 89, 1) 7 +(32, 90, 1) 6 +(32, 91, 1) 5 +(32, 92, 1) 4 +(32, 93, 1) 3 +(32, 94, 1) 2 +(32, 95, 1) 2 +(33, 6, 1) 2 +(33, 7, 1) 3 +(33, 8, 1) 4 +(33, 9, 1) 5 +(33, 10, 1) 6 +(33, 11, 1) 7 +(33, 12, 1) 7 +(33, 13, 1) 8 +(33, 14, 1) 9 +(33, 15, 1) 10 +(33, 16, 1) 11 +(33, 17, 1) 12 +(33, 18, 1) 13 +(33, 19, 1) 14 +(33, 20, 1) 15 +(33, 21, 1) 15 +(33, 22, 1) 16 +(33, 23, 1) 17 +(33, 24, 1) 18 +(33, 25, 1) 19 +(33, 26, 1) 20 +(33, 27, 1) 20 +(33, 28, 1) 21 +(33, 29, 1) 22 +(33, 30, 1) 23 +(33, 31, 1) 23 +(33, 32, 1) 24 +(33, 33, 1) 25 +(33, 34, 1) 26 +(33, 35, 1) 26 +(33, 36, 1) 27 +(33, 37, 1) 27 +(33, 38, 1) 28 +(33, 39, 1) 29 +(33, 40, 1) 29 +(33, 41, 1) 30 +(33, 42, 1) 30 +(33, 43, 1) 30 +(33, 44, 1) 31 +(33, 45, 1) 31 +(33, 46, 1) 31 +(33, 47, 1) 32 +(33, 48, 1) 32 +(33, 49, 1) 32 +(33, 50, 1) 32 +(33, 51, 1) 32 +(33, 52, 1) 32 +(33, 53, 1) 32 +(33, 54, 1) 32 +(33, 55, 1) 31 +(33, 56, 1) 31 +(33, 57, 1) 31 +(33, 58, 1) 30 +(33, 59, 1) 30 +(33, 60, 1) 30 +(33, 61, 1) 29 +(33, 62, 1) 29 +(33, 63, 1) 28 +(33, 64, 1) 27 +(33, 65, 1) 27 +(33, 66, 1) 26 +(33, 67, 1) 26 +(33, 68, 1) 25 +(33, 69, 1) 24 +(33, 70, 1) 23 +(33, 71, 1) 23 +(33, 72, 1) 22 +(33, 73, 1) 21 +(33, 74, 1) 20 +(33, 75, 1) 20 +(33, 76, 1) 19 +(33, 77, 1) 18 +(33, 78, 1) 17 +(33, 79, 1) 16 +(33, 80, 1) 15 +(33, 81, 1) 15 +(33, 82, 1) 14 +(33, 83, 1) 13 +(33, 84, 1) 12 +(33, 85, 1) 11 +(33, 86, 1) 10 +(33, 87, 1) 9 +(33, 88, 1) 8 +(33, 89, 1) 7 +(33, 90, 1) 7 +(33, 91, 1) 6 +(33, 92, 1) 5 +(33, 93, 1) 4 +(33, 94, 1) 3 +(33, 95, 1) 2 +(34, 6, 1) 2 +(34, 7, 1) 3 +(34, 8, 1) 4 +(34, 9, 1) 5 +(34, 10, 1) 6 +(34, 11, 1) 7 +(34, 12, 1) 8 +(34, 13, 1) 9 +(34, 14, 1) 10 +(34, 15, 1) 11 +(34, 16, 1) 11 +(34, 17, 1) 12 +(34, 18, 1) 13 +(34, 19, 1) 14 +(34, 20, 1) 15 +(34, 21, 1) 16 +(34, 22, 1) 17 +(34, 23, 1) 18 +(34, 24, 1) 18 +(34, 25, 1) 19 +(34, 26, 1) 20 +(34, 27, 1) 21 +(34, 28, 1) 22 +(34, 29, 1) 23 +(34, 30, 1) 23 +(34, 31, 1) 24 +(34, 32, 1) 25 +(34, 33, 1) 26 +(34, 34, 1) 26 +(34, 35, 1) 27 +(34, 36, 1) 28 +(34, 37, 1) 28 +(34, 38, 1) 29 +(34, 39, 1) 29 +(34, 40, 1) 30 +(34, 41, 1) 30 +(34, 42, 1) 31 +(34, 43, 1) 31 +(34, 44, 1) 32 +(34, 45, 1) 32 +(34, 46, 1) 32 +(34, 47, 1) 33 +(34, 48, 1) 33 +(34, 49, 1) 33 +(34, 50, 1) 33 +(34, 51, 1) 33 +(34, 52, 1) 33 +(34, 53, 1) 33 +(34, 54, 1) 33 +(34, 55, 1) 32 +(34, 56, 1) 32 +(34, 57, 1) 32 +(34, 58, 1) 31 +(34, 59, 1) 31 +(34, 60, 1) 30 +(34, 61, 1) 30 +(34, 62, 1) 29 +(34, 63, 1) 29 +(34, 64, 1) 28 +(34, 65, 1) 28 +(34, 66, 1) 27 +(34, 67, 1) 26 +(34, 68, 1) 26 +(34, 69, 1) 25 +(34, 70, 1) 24 +(34, 71, 1) 23 +(34, 72, 1) 23 +(34, 73, 1) 22 +(34, 74, 1) 21 +(34, 75, 1) 20 +(34, 76, 1) 19 +(34, 77, 1) 18 +(34, 78, 1) 18 +(34, 79, 1) 17 +(34, 80, 1) 16 +(34, 81, 1) 15 +(34, 82, 1) 14 +(34, 83, 1) 13 +(34, 84, 1) 12 +(34, 85, 1) 11 +(34, 86, 1) 11 +(34, 87, 1) 10 +(34, 88, 1) 9 +(34, 89, 1) 8 +(34, 90, 1) 7 +(34, 91, 1) 6 +(34, 92, 1) 5 +(34, 93, 1) 4 +(34, 94, 1) 3 +(34, 95, 1) 2 +(35, 6, 1) 3 +(35, 7, 1) 4 +(35, 8, 1) 5 +(35, 9, 1) 6 +(35, 10, 1) 6 +(35, 11, 1) 7 +(35, 12, 1) 8 +(35, 13, 1) 9 +(35, 14, 1) 10 +(35, 15, 1) 11 +(35, 16, 1) 12 +(35, 17, 1) 13 +(35, 18, 1) 14 +(35, 19, 1) 15 +(35, 20, 1) 16 +(35, 21, 1) 16 +(35, 22, 1) 17 +(35, 23, 1) 18 +(35, 24, 1) 19 +(35, 25, 1) 20 +(35, 26, 1) 21 +(35, 27, 1) 21 +(35, 28, 1) 22 +(35, 29, 1) 23 +(35, 30, 1) 24 +(35, 31, 1) 25 +(35, 32, 1) 25 +(35, 33, 1) 26 +(35, 34, 1) 27 +(35, 35, 1) 28 +(35, 36, 1) 28 +(35, 37, 1) 29 +(35, 38, 1) 30 +(35, 39, 1) 30 +(35, 40, 1) 31 +(35, 41, 1) 31 +(35, 42, 1) 32 +(35, 43, 1) 32 +(35, 44, 1) 33 +(35, 45, 1) 33 +(35, 46, 1) 33 +(35, 47, 1) 34 +(35, 48, 1) 34 +(35, 49, 1) 34 +(35, 50, 1) 34 +(35, 51, 1) 34 +(35, 52, 1) 34 +(35, 53, 1) 34 +(35, 54, 1) 34 +(35, 55, 1) 33 +(35, 56, 1) 33 +(35, 57, 1) 33 +(35, 58, 1) 32 +(35, 59, 1) 32 +(35, 60, 1) 31 +(35, 61, 1) 31 +(35, 62, 1) 30 +(35, 63, 1) 30 +(35, 64, 1) 29 +(35, 65, 1) 28 +(35, 66, 1) 28 +(35, 67, 1) 27 +(35, 68, 1) 26 +(35, 69, 1) 25 +(35, 70, 1) 25 +(35, 71, 1) 24 +(35, 72, 1) 23 +(35, 73, 1) 22 +(35, 74, 1) 21 +(35, 75, 1) 21 +(35, 76, 1) 20 +(35, 77, 1) 19 +(35, 78, 1) 18 +(35, 79, 1) 17 +(35, 80, 1) 16 +(35, 81, 1) 16 +(35, 82, 1) 15 +(35, 83, 1) 14 +(35, 84, 1) 13 +(35, 85, 1) 12 +(35, 86, 1) 11 +(35, 87, 1) 10 +(35, 88, 1) 9 +(35, 89, 1) 8 +(35, 90, 1) 7 +(35, 91, 1) 6 +(35, 92, 1) 6 +(35, 93, 1) 5 +(35, 94, 1) 4 +(35, 95, 1) 3 +(36, 4, 1) 1 +(36, 5, 1) 2 +(36, 6, 1) 3 +(36, 7, 1) 4 +(36, 8, 1) 5 +(36, 9, 1) 6 +(36, 10, 1) 7 +(36, 11, 1) 8 +(36, 12, 1) 8 +(36, 13, 1) 9 +(36, 14, 1) 10 +(36, 15, 1) 11 +(36, 16, 1) 12 +(36, 17, 1) 13 +(36, 18, 1) 14 +(36, 19, 1) 15 +(36, 20, 1) 16 +(36, 21, 1) 17 +(36, 22, 1) 18 +(36, 23, 1) 19 +(36, 24, 1) 19 +(36, 25, 1) 20 +(36, 26, 1) 21 +(36, 27, 1) 22 +(36, 28, 1) 23 +(36, 29, 1) 24 +(36, 30, 1) 24 +(36, 31, 1) 25 +(36, 32, 1) 26 +(36, 33, 1) 27 +(36, 34, 1) 28 +(36, 35, 1) 28 +(36, 36, 1) 29 +(36, 37, 1) 30 +(36, 38, 1) 30 +(36, 39, 1) 31 +(36, 40, 1) 32 +(36, 41, 1) 32 +(36, 42, 1) 33 +(36, 43, 1) 33 +(36, 44, 1) 34 +(36, 45, 1) 34 +(36, 46, 1) 34 +(36, 47, 1) 35 +(36, 48, 1) 35 +(36, 49, 1) 35 +(36, 50, 1) 35 +(36, 51, 1) 35 +(36, 52, 1) 35 +(36, 53, 1) 35 +(36, 54, 1) 35 +(36, 55, 1) 34 +(36, 56, 1) 34 +(36, 57, 1) 34 +(36, 58, 1) 33 +(36, 59, 1) 33 +(36, 60, 1) 32 +(36, 61, 1) 32 +(36, 62, 1) 31 +(36, 63, 1) 30 +(36, 64, 1) 30 +(36, 65, 1) 29 +(36, 66, 1) 28 +(36, 67, 1) 28 +(36, 68, 1) 27 +(36, 69, 1) 26 +(36, 70, 1) 25 +(36, 71, 1) 24 +(36, 72, 1) 24 +(36, 73, 1) 23 +(36, 74, 1) 22 +(36, 75, 1) 21 +(36, 76, 1) 20 +(36, 77, 1) 19 +(36, 78, 1) 19 +(36, 79, 1) 18 +(36, 80, 1) 17 +(36, 81, 1) 16 +(36, 82, 1) 15 +(36, 83, 1) 14 +(36, 84, 1) 13 +(36, 85, 1) 12 +(36, 86, 1) 11 +(36, 87, 1) 10 +(36, 88, 1) 9 +(36, 89, 1) 8 +(36, 90, 1) 8 +(36, 91, 1) 7 +(36, 92, 1) 6 +(36, 93, 1) 5 +(36, 94, 1) 4 +(36, 95, 1) 3 +(36, 96, 1) 2 +(36, 97, 1) 1 +(37, 4, 1) 1 +(37, 5, 1) 2 +(37, 6, 1) 3 +(37, 7, 1) 4 +(37, 8, 1) 5 +(37, 9, 1) 6 +(37, 10, 1) 7 +(37, 11, 1) 8 +(37, 12, 1) 9 +(37, 13, 1) 10 +(37, 14, 1) 11 +(37, 15, 1) 12 +(37, 16, 1) 13 +(37, 17, 1) 14 +(37, 18, 1) 14 +(37, 19, 1) 15 +(37, 20, 1) 16 +(37, 21, 1) 17 +(37, 22, 1) 18 +(37, 23, 1) 19 +(37, 24, 1) 20 +(37, 25, 1) 21 +(37, 26, 1) 22 +(37, 27, 1) 22 +(37, 28, 1) 23 +(37, 29, 1) 24 +(37, 30, 1) 25 +(37, 31, 1) 26 +(37, 32, 1) 27 +(37, 33, 1) 27 +(37, 34, 1) 28 +(37, 35, 1) 29 +(37, 36, 1) 30 +(37, 37, 1) 30 +(37, 38, 1) 31 +(37, 39, 1) 32 +(37, 40, 1) 32 +(37, 41, 1) 33 +(37, 42, 1) 34 +(37, 43, 1) 34 +(37, 44, 1) 35 +(37, 45, 1) 35 +(37, 46, 1) 35 +(37, 47, 1) 36 +(37, 48, 1) 36 +(37, 49, 1) 36 +(37, 50, 1) 36 +(37, 51, 1) 36 +(37, 52, 1) 36 +(37, 53, 1) 36 +(37, 54, 1) 36 +(37, 55, 1) 35 +(37, 56, 1) 35 +(37, 57, 1) 35 +(37, 58, 1) 34 +(37, 59, 1) 34 +(37, 60, 1) 33 +(37, 61, 1) 32 +(37, 62, 1) 32 +(37, 63, 1) 31 +(37, 64, 1) 30 +(37, 65, 1) 30 +(37, 66, 1) 29 +(37, 67, 1) 28 +(37, 68, 1) 27 +(37, 69, 1) 27 +(37, 70, 1) 26 +(37, 71, 1) 25 +(37, 72, 1) 24 +(37, 73, 1) 23 +(37, 74, 1) 22 +(37, 75, 1) 22 +(37, 76, 1) 21 +(37, 77, 1) 20 +(37, 78, 1) 19 +(37, 79, 1) 18 +(37, 80, 1) 17 +(37, 81, 1) 16 +(37, 82, 1) 15 +(37, 83, 1) 14 +(37, 84, 1) 14 +(37, 85, 1) 13 +(37, 86, 1) 12 +(37, 87, 1) 11 +(37, 88, 1) 10 +(37, 89, 1) 9 +(37, 90, 1) 8 +(37, 91, 1) 7 +(37, 92, 1) 6 +(37, 93, 1) 5 +(37, 94, 1) 4 +(37, 95, 1) 3 +(37, 96, 1) 2 +(37, 97, 1) 1 +(38, 4, 1) 2 +(38, 5, 1) 3 +(38, 6, 1) 3 +(38, 7, 1) 4 +(38, 8, 1) 5 +(38, 9, 1) 6 +(38, 10, 1) 7 +(38, 11, 1) 8 +(38, 12, 1) 9 +(38, 13, 1) 10 +(38, 14, 1) 11 +(38, 15, 1) 12 +(38, 16, 1) 13 +(38, 17, 1) 14 +(38, 18, 1) 15 +(38, 19, 1) 16 +(38, 20, 1) 17 +(38, 21, 1) 18 +(38, 22, 1) 18 +(38, 23, 1) 19 +(38, 24, 1) 20 +(38, 25, 1) 21 +(38, 26, 1) 22 +(38, 27, 1) 23 +(38, 28, 1) 24 +(38, 29, 1) 25 +(38, 30, 1) 26 +(38, 31, 1) 26 +(38, 32, 1) 27 +(38, 33, 1) 28 +(38, 34, 1) 29 +(38, 35, 1) 30 +(38, 36, 1) 30 +(38, 37, 1) 31 +(38, 38, 1) 32 +(38, 39, 1) 33 +(38, 40, 1) 33 +(38, 41, 1) 34 +(38, 42, 1) 34 +(38, 43, 1) 35 +(38, 44, 1) 35 +(38, 45, 1) 36 +(38, 46, 1) 36 +(38, 47, 1) 37 +(38, 48, 1) 37 +(38, 49, 1) 37 +(38, 50, 1) 37 +(38, 51, 1) 37 +(38, 52, 1) 37 +(38, 53, 1) 37 +(38, 54, 1) 37 +(38, 55, 1) 36 +(38, 56, 1) 36 +(38, 57, 1) 35 +(38, 58, 1) 35 +(38, 59, 1) 34 +(38, 60, 1) 34 +(38, 61, 1) 33 +(38, 62, 1) 33 +(38, 63, 1) 32 +(38, 64, 1) 31 +(38, 65, 1) 30 +(38, 66, 1) 30 +(38, 67, 1) 29 +(38, 68, 1) 28 +(38, 69, 1) 27 +(38, 70, 1) 26 +(38, 71, 1) 26 +(38, 72, 1) 25 +(38, 73, 1) 24 +(38, 74, 1) 23 +(38, 75, 1) 22 +(38, 76, 1) 21 +(38, 77, 1) 20 +(38, 78, 1) 19 +(38, 79, 1) 18 +(38, 80, 1) 18 +(38, 81, 1) 17 +(38, 82, 1) 16 +(38, 83, 1) 15 +(38, 84, 1) 14 +(38, 85, 1) 13 +(38, 86, 1) 12 +(38, 87, 1) 11 +(38, 88, 1) 10 +(38, 89, 1) 9 +(38, 90, 1) 8 +(38, 91, 1) 7 +(38, 92, 1) 6 +(38, 93, 1) 5 +(38, 94, 1) 4 +(38, 95, 1) 3 +(38, 96, 1) 3 +(38, 97, 1) 2 +(39, 4, 1) 2 +(39, 5, 1) 3 +(39, 6, 1) 4 +(39, 7, 1) 5 +(39, 8, 1) 6 +(39, 9, 1) 7 +(39, 10, 1) 8 +(39, 11, 1) 9 +(39, 12, 1) 9 +(39, 13, 1) 10 +(39, 14, 1) 11 +(39, 15, 1) 12 +(39, 16, 1) 13 +(39, 17, 1) 14 +(39, 18, 1) 15 +(39, 19, 1) 16 +(39, 20, 1) 17 +(39, 21, 1) 18 +(39, 22, 1) 19 +(39, 23, 1) 20 +(39, 24, 1) 21 +(39, 25, 1) 22 +(39, 26, 1) 23 +(39, 27, 1) 23 +(39, 28, 1) 24 +(39, 29, 1) 25 +(39, 30, 1) 26 +(39, 31, 1) 27 +(39, 32, 1) 28 +(39, 33, 1) 29 +(39, 34, 1) 29 +(39, 35, 1) 30 +(39, 36, 1) 31 +(39, 37, 1) 32 +(39, 38, 1) 33 +(39, 39, 1) 33 +(39, 40, 1) 34 +(39, 41, 1) 35 +(39, 42, 1) 35 +(39, 43, 1) 36 +(39, 44, 1) 36 +(39, 45, 1) 37 +(39, 46, 1) 37 +(39, 47, 1) 37 +(39, 48, 1) 38 +(39, 49, 1) 38 +(39, 50, 1) 38 +(39, 51, 1) 38 +(39, 52, 1) 38 +(39, 53, 1) 38 +(39, 54, 1) 37 +(39, 55, 1) 37 +(39, 56, 1) 37 +(39, 57, 1) 36 +(39, 58, 1) 36 +(39, 59, 1) 35 +(39, 60, 1) 35 +(39, 61, 1) 34 +(39, 62, 1) 33 +(39, 63, 1) 33 +(39, 64, 1) 32 +(39, 65, 1) 31 +(39, 66, 1) 30 +(39, 67, 1) 29 +(39, 68, 1) 29 +(39, 69, 1) 28 +(39, 70, 1) 27 +(39, 71, 1) 26 +(39, 72, 1) 25 +(39, 73, 1) 24 +(39, 74, 1) 23 +(39, 75, 1) 23 +(39, 76, 1) 22 +(39, 77, 1) 21 +(39, 78, 1) 20 +(39, 79, 1) 19 +(39, 80, 1) 18 +(39, 81, 1) 17 +(39, 82, 1) 16 +(39, 83, 1) 15 +(39, 84, 1) 14 +(39, 85, 1) 13 +(39, 86, 1) 12 +(39, 87, 1) 11 +(39, 88, 1) 10 +(39, 89, 1) 9 +(39, 90, 1) 9 +(39, 91, 1) 8 +(39, 92, 1) 7 +(39, 93, 1) 6 +(39, 94, 1) 5 +(39, 95, 1) 4 +(39, 96, 1) 3 +(39, 97, 1) 2 +(40, 4, 1) 2 +(40, 5, 1) 3 +(40, 6, 1) 4 +(40, 7, 1) 5 +(40, 8, 1) 6 +(40, 9, 1) 7 +(40, 10, 1) 8 +(40, 11, 1) 9 +(40, 12, 1) 10 +(40, 13, 1) 11 +(40, 14, 1) 12 +(40, 15, 1) 13 +(40, 16, 1) 14 +(40, 17, 1) 15 +(40, 18, 1) 16 +(40, 19, 1) 16 +(40, 20, 1) 17 +(40, 21, 1) 18 +(40, 22, 1) 19 +(40, 23, 1) 20 +(40, 24, 1) 21 +(40, 25, 1) 22 +(40, 26, 1) 23 +(40, 27, 1) 24 +(40, 28, 1) 25 +(40, 29, 1) 26 +(40, 30, 1) 27 +(40, 31, 1) 27 +(40, 32, 1) 28 +(40, 33, 1) 29 +(40, 34, 1) 30 +(40, 35, 1) 31 +(40, 36, 1) 32 +(40, 37, 1) 32 +(40, 38, 1) 33 +(40, 39, 1) 34 +(40, 40, 1) 35 +(40, 41, 1) 35 +(40, 42, 1) 36 +(40, 43, 1) 37 +(40, 44, 1) 37 +(40, 45, 1) 38 +(40, 56, 1) 38 +(40, 57, 1) 37 +(40, 58, 1) 37 +(40, 59, 1) 36 +(40, 60, 1) 35 +(40, 61, 1) 35 +(40, 62, 1) 34 +(40, 63, 1) 33 +(40, 64, 1) 32 +(40, 65, 1) 32 +(40, 66, 1) 31 +(40, 67, 1) 30 +(40, 68, 1) 29 +(40, 69, 1) 28 +(40, 70, 1) 27 +(40, 71, 1) 27 +(40, 72, 1) 26 +(40, 73, 1) 25 +(40, 74, 1) 24 +(40, 75, 1) 23 +(40, 76, 1) 22 +(40, 77, 1) 21 +(40, 78, 1) 20 +(40, 79, 1) 19 +(40, 80, 1) 18 +(40, 81, 1) 17 +(40, 82, 1) 16 +(40, 83, 1) 16 +(40, 84, 1) 15 +(40, 85, 1) 14 +(40, 86, 1) 13 +(40, 87, 1) 12 +(40, 88, 1) 11 +(40, 89, 1) 10 +(40, 90, 1) 9 +(40, 91, 1) 8 +(40, 92, 1) 7 +(40, 93, 1) 6 +(40, 94, 1) 5 +(40, 95, 1) 4 +(40, 96, 1) 3 +(40, 97, 1) 2 +(41, 1, 1) 0 +(41, 2, 1) 0 +(41, 3, 1) 1 +(41, 4, 1) 2 +(41, 5, 1) 3 +(41, 6, 1) 4 +(41, 7, 1) 5 +(41, 8, 1) 6 +(41, 9, 1) 7 +(41, 10, 1) 8 +(41, 11, 1) 9 +(41, 12, 1) 10 +(41, 13, 1) 11 +(41, 14, 1) 12 +(41, 15, 1) 13 +(41, 16, 1) 14 +(41, 17, 1) 15 +(41, 18, 1) 16 +(41, 19, 1) 17 +(41, 20, 1) 18 +(41, 21, 1) 19 +(41, 22, 1) 20 +(41, 23, 1) 20 +(41, 24, 1) 21 +(41, 25, 1) 22 +(41, 26, 1) 23 +(41, 27, 1) 24 +(41, 28, 1) 25 +(41, 29, 1) 26 +(41, 30, 1) 27 +(41, 31, 1) 28 +(41, 32, 1) 29 +(41, 33, 1) 30 +(41, 34, 1) 30 +(41, 35, 1) 31 +(41, 36, 1) 32 +(41, 37, 1) 33 +(41, 38, 1) 34 +(41, 39, 1) 35 +(41, 40, 1) 35 +(41, 41, 1) 36 +(41, 42, 1) 37 +(41, 43, 1) 37 +(41, 58, 1) 37 +(41, 59, 1) 37 +(41, 60, 1) 36 +(41, 61, 1) 35 +(41, 62, 1) 35 +(41, 63, 1) 34 +(41, 64, 1) 33 +(41, 65, 1) 32 +(41, 66, 1) 31 +(41, 67, 1) 30 +(41, 68, 1) 30 +(41, 69, 1) 29 +(41, 70, 1) 28 +(41, 71, 1) 27 +(41, 72, 1) 26 +(41, 73, 1) 25 +(41, 74, 1) 24 +(41, 75, 1) 23 +(41, 76, 1) 22 +(41, 77, 1) 21 +(41, 78, 1) 20 +(41, 79, 1) 20 +(41, 80, 1) 19 +(41, 81, 1) 18 +(41, 82, 1) 17 +(41, 83, 1) 16 +(41, 84, 1) 15 +(41, 85, 1) 14 +(41, 86, 1) 13 +(41, 87, 1) 12 +(41, 88, 1) 11 +(41, 89, 1) 10 +(41, 90, 1) 9 +(41, 91, 1) 8 +(41, 92, 1) 7 +(41, 93, 1) 6 +(41, 94, 1) 5 +(41, 95, 1) 4 +(41, 96, 1) 3 +(41, 97, 1) 2 +(41, 98, 1) 1 +(41, 99, 1) 0 +(41, 100, 1) 0 +(42, 1, 1) 0 +(42, 2, 1) 0 +(42, 3, 1) 1 +(42, 4, 1) 2 +(42, 5, 1) 3 +(42, 6, 1) 4 +(42, 7, 1) 5 +(42, 8, 1) 6 +(42, 9, 1) 7 +(42, 10, 1) 8 +(42, 11, 1) 9 +(42, 12, 1) 10 +(42, 13, 1) 11 +(42, 14, 1) 12 +(42, 15, 1) 13 +(42, 16, 1) 14 +(42, 17, 1) 15 +(42, 18, 1) 16 +(42, 19, 1) 17 +(42, 20, 1) 18 +(42, 21, 1) 19 +(42, 22, 1) 20 +(42, 23, 1) 21 +(42, 24, 1) 22 +(42, 25, 1) 23 +(42, 26, 1) 24 +(42, 27, 1) 25 +(42, 28, 1) 25 +(42, 29, 1) 26 +(42, 30, 1) 27 +(42, 31, 1) 28 +(42, 32, 1) 29 +(42, 33, 1) 30 +(42, 34, 1) 31 +(42, 35, 1) 32 +(42, 36, 1) 33 +(42, 37, 1) 34 +(42, 38, 1) 34 +(42, 39, 1) 35 +(42, 40, 1) 36 +(42, 41, 1) 37 +(42, 42, 1) 38 +(42, 59, 1) 38 +(42, 60, 1) 37 +(42, 61, 1) 36 +(42, 62, 1) 35 +(42, 63, 1) 34 +(42, 64, 1) 34 +(42, 65, 1) 33 +(42, 66, 1) 32 +(42, 67, 1) 31 +(42, 68, 1) 30 +(42, 69, 1) 29 +(42, 70, 1) 28 +(42, 71, 1) 27 +(42, 72, 1) 26 +(42, 73, 1) 25 +(42, 74, 1) 25 +(42, 75, 1) 24 +(42, 76, 1) 23 +(42, 77, 1) 22 +(42, 78, 1) 21 +(42, 79, 1) 20 +(42, 80, 1) 19 +(42, 81, 1) 18 +(42, 82, 1) 17 +(42, 83, 1) 16 +(42, 84, 1) 15 +(42, 85, 1) 14 +(42, 86, 1) 13 +(42, 87, 1) 12 +(42, 88, 1) 11 +(42, 89, 1) 10 +(42, 90, 1) 9 +(42, 91, 1) 8 +(42, 92, 1) 7 +(42, 93, 1) 6 +(42, 94, 1) 5 +(42, 95, 1) 4 +(42, 96, 1) 3 +(42, 97, 1) 2 +(42, 98, 1) 1 +(42, 99, 1) 0 +(42, 100, 1) 0 +(43, 1, 1) 0 +(43, 2, 1) 1 +(43, 3, 1) 2 +(43, 4, 1) 3 +(43, 5, 1) 4 +(43, 6, 1) 4 +(43, 7, 1) 5 +(43, 8, 1) 6 +(43, 9, 1) 7 +(43, 10, 1) 8 +(43, 11, 1) 9 +(43, 12, 1) 10 +(43, 13, 1) 11 +(43, 14, 1) 12 +(43, 15, 1) 13 +(43, 16, 1) 14 +(43, 17, 1) 15 +(43, 18, 1) 16 +(43, 19, 1) 17 +(43, 20, 1) 18 +(43, 21, 1) 19 +(43, 22, 1) 20 +(43, 23, 1) 21 +(43, 24, 1) 22 +(43, 25, 1) 23 +(43, 26, 1) 24 +(43, 27, 1) 25 +(43, 28, 1) 26 +(43, 29, 1) 27 +(43, 30, 1) 28 +(43, 31, 1) 29 +(43, 32, 1) 30 +(43, 33, 1) 30 +(43, 34, 1) 31 +(43, 35, 1) 32 +(43, 36, 1) 33 +(43, 37, 1) 34 +(43, 38, 1) 35 +(43, 39, 1) 36 +(43, 40, 1) 37 +(43, 41, 1) 37 +(43, 60, 1) 37 +(43, 61, 1) 37 +(43, 62, 1) 36 +(43, 63, 1) 35 +(43, 64, 1) 34 +(43, 65, 1) 33 +(43, 66, 1) 32 +(43, 67, 1) 31 +(43, 68, 1) 30 +(43, 69, 1) 30 +(43, 70, 1) 29 +(43, 71, 1) 28 +(43, 72, 1) 27 +(43, 73, 1) 26 +(43, 74, 1) 25 +(43, 75, 1) 24 +(43, 76, 1) 23 +(43, 77, 1) 22 +(43, 78, 1) 21 +(43, 79, 1) 20 +(43, 80, 1) 19 +(43, 81, 1) 18 +(43, 82, 1) 17 +(43, 83, 1) 16 +(43, 84, 1) 15 +(43, 85, 1) 14 +(43, 86, 1) 13 +(43, 87, 1) 12 +(43, 88, 1) 11 +(43, 89, 1) 10 +(43, 90, 1) 9 +(43, 91, 1) 8 +(43, 92, 1) 7 +(43, 93, 1) 6 +(43, 94, 1) 5 +(43, 95, 1) 4 +(43, 96, 1) 4 +(43, 97, 1) 3 +(43, 98, 1) 2 +(43, 99, 1) 1 +(43, 100, 1) 0 +(44, 1, 1) 0 +(44, 2, 1) 1 +(44, 3, 1) 2 +(44, 4, 1) 3 +(44, 5, 1) 4 +(44, 6, 1) 5 +(44, 7, 1) 6 +(44, 8, 1) 7 +(44, 9, 1) 8 +(44, 10, 1) 9 +(44, 11, 1) 10 +(44, 12, 1) 11 +(44, 13, 1) 12 +(44, 14, 1) 13 +(44, 15, 1) 14 +(44, 16, 1) 14 +(44, 17, 1) 15 +(44, 18, 1) 16 +(44, 19, 1) 17 +(44, 20, 1) 18 +(44, 21, 1) 19 +(44, 22, 1) 20 +(44, 23, 1) 21 +(44, 24, 1) 22 +(44, 25, 1) 23 +(44, 26, 1) 24 +(44, 27, 1) 25 +(44, 28, 1) 26 +(44, 29, 1) 27 +(44, 30, 1) 28 +(44, 31, 1) 29 +(44, 32, 1) 30 +(44, 33, 1) 31 +(44, 34, 1) 32 +(44, 35, 1) 33 +(44, 36, 1) 34 +(44, 37, 1) 35 +(44, 38, 1) 35 +(44, 39, 1) 36 +(44, 40, 1) 37 +(44, 61, 1) 37 +(44, 62, 1) 36 +(44, 63, 1) 35 +(44, 64, 1) 35 +(44, 65, 1) 34 +(44, 66, 1) 33 +(44, 67, 1) 32 +(44, 68, 1) 31 +(44, 69, 1) 30 +(44, 70, 1) 29 +(44, 71, 1) 28 +(44, 72, 1) 27 +(44, 73, 1) 26 +(44, 74, 1) 25 +(44, 75, 1) 24 +(44, 76, 1) 23 +(44, 77, 1) 22 +(44, 78, 1) 21 +(44, 79, 1) 20 +(44, 80, 1) 19 +(44, 81, 1) 18 +(44, 82, 1) 17 +(44, 83, 1) 16 +(44, 84, 1) 15 +(44, 85, 1) 14 +(44, 86, 1) 14 +(44, 87, 1) 13 +(44, 88, 1) 12 +(44, 89, 1) 11 +(44, 90, 1) 10 +(44, 91, 1) 9 +(44, 92, 1) 8 +(44, 93, 1) 7 +(44, 94, 1) 6 +(44, 95, 1) 5 +(44, 96, 1) 4 +(44, 97, 1) 3 +(44, 98, 1) 2 +(44, 99, 1) 1 +(44, 100, 1) 0 +(45, 1, 1) 0 +(45, 2, 1) 1 +(45, 3, 1) 2 +(45, 4, 1) 3 +(45, 5, 1) 4 +(45, 6, 1) 5 +(45, 7, 1) 6 +(45, 8, 1) 7 +(45, 9, 1) 8 +(45, 10, 1) 9 +(45, 11, 1) 10 +(45, 12, 1) 11 +(45, 13, 1) 12 +(45, 14, 1) 13 +(45, 15, 1) 14 +(45, 16, 1) 15 +(45, 17, 1) 16 +(45, 18, 1) 17 +(45, 19, 1) 18 +(45, 20, 1) 19 +(45, 21, 1) 20 +(45, 22, 1) 21 +(45, 23, 1) 22 +(45, 24, 1) 23 +(45, 25, 1) 23 +(45, 26, 1) 24 +(45, 27, 1) 25 +(45, 28, 1) 26 +(45, 29, 1) 27 +(45, 30, 1) 28 +(45, 31, 1) 29 +(45, 32, 1) 30 +(45, 33, 1) 31 +(45, 34, 1) 32 +(45, 35, 1) 33 +(45, 36, 1) 34 +(45, 37, 1) 35 +(45, 38, 1) 36 +(45, 39, 1) 37 +(45, 40, 1) 38 +(45, 61, 1) 38 +(45, 62, 1) 37 +(45, 63, 1) 36 +(45, 64, 1) 35 +(45, 65, 1) 34 +(45, 66, 1) 33 +(45, 67, 1) 32 +(45, 68, 1) 31 +(45, 69, 1) 30 +(45, 70, 1) 29 +(45, 71, 1) 28 +(45, 72, 1) 27 +(45, 73, 1) 26 +(45, 74, 1) 25 +(45, 75, 1) 24 +(45, 76, 1) 23 +(45, 77, 1) 23 +(45, 78, 1) 22 +(45, 79, 1) 21 +(45, 80, 1) 20 +(45, 81, 1) 19 +(45, 82, 1) 18 +(45, 83, 1) 17 +(45, 84, 1) 16 +(45, 85, 1) 15 +(45, 86, 1) 14 +(45, 87, 1) 13 +(45, 88, 1) 12 +(45, 89, 1) 11 +(45, 90, 1) 10 +(45, 91, 1) 9 +(45, 92, 1) 8 +(45, 93, 1) 7 +(45, 94, 1) 6 +(45, 95, 1) 5 +(45, 96, 1) 4 +(45, 97, 1) 3 +(45, 98, 1) 2 +(45, 99, 1) 1 +(45, 100, 1) 0 +(46, 1, 1) 0 +(46, 2, 1) 1 +(46, 3, 1) 2 +(46, 4, 1) 3 +(46, 5, 1) 4 +(46, 6, 1) 5 +(46, 7, 1) 6 +(46, 8, 1) 7 +(46, 9, 1) 8 +(46, 10, 1) 9 +(46, 11, 1) 10 +(46, 12, 1) 11 +(46, 13, 1) 12 +(46, 14, 1) 13 +(46, 15, 1) 14 +(46, 16, 1) 15 +(46, 17, 1) 16 +(46, 18, 1) 17 +(46, 19, 1) 18 +(46, 20, 1) 19 +(46, 21, 1) 20 +(46, 22, 1) 21 +(46, 23, 1) 22 +(46, 24, 1) 23 +(46, 25, 1) 24 +(46, 26, 1) 25 +(46, 27, 1) 26 +(46, 28, 1) 27 +(46, 29, 1) 28 +(46, 30, 1) 29 +(46, 31, 1) 30 +(46, 32, 1) 30 +(46, 33, 1) 31 +(46, 34, 1) 32 +(46, 35, 1) 33 +(46, 36, 1) 34 +(46, 37, 1) 35 +(46, 38, 1) 36 +(46, 39, 1) 37 +(46, 62, 1) 37 +(46, 63, 1) 36 +(46, 64, 1) 35 +(46, 65, 1) 34 +(46, 66, 1) 33 +(46, 67, 1) 32 +(46, 68, 1) 31 +(46, 69, 1) 30 +(46, 70, 1) 30 +(46, 71, 1) 29 +(46, 72, 1) 28 +(46, 73, 1) 27 +(46, 74, 1) 26 +(46, 75, 1) 25 +(46, 76, 1) 24 +(46, 77, 1) 23 +(46, 78, 1) 22 +(46, 79, 1) 21 +(46, 80, 1) 20 +(46, 81, 1) 19 +(46, 82, 1) 18 +(46, 83, 1) 17 +(46, 84, 1) 16 +(46, 85, 1) 15 +(46, 86, 1) 14 +(46, 87, 1) 13 +(46, 88, 1) 12 +(46, 89, 1) 11 +(46, 90, 1) 10 +(46, 91, 1) 9 +(46, 92, 1) 8 +(46, 93, 1) 7 +(46, 94, 1) 6 +(46, 95, 1) 5 +(46, 96, 1) 4 +(46, 97, 1) 3 +(46, 98, 1) 2 +(46, 99, 1) 1 +(46, 100, 1) 0 +(47, 1, 1) 0 +(47, 2, 1) 1 +(47, 3, 1) 2 +(47, 4, 1) 3 +(47, 5, 1) 4 +(47, 6, 1) 5 +(47, 7, 1) 6 +(47, 8, 1) 7 +(47, 9, 1) 8 +(47, 10, 1) 9 +(47, 11, 1) 10 +(47, 12, 1) 11 +(47, 13, 1) 12 +(47, 14, 1) 13 +(47, 15, 1) 14 +(47, 16, 1) 15 +(47, 17, 1) 16 +(47, 18, 1) 17 +(47, 19, 1) 18 +(47, 20, 1) 19 +(47, 21, 1) 20 +(47, 22, 1) 21 +(47, 23, 1) 22 +(47, 24, 1) 23 +(47, 25, 1) 24 +(47, 26, 1) 25 +(47, 27, 1) 26 +(47, 28, 1) 27 +(47, 29, 1) 28 +(47, 30, 1) 29 +(47, 31, 1) 30 +(47, 32, 1) 31 +(47, 33, 1) 32 +(47, 34, 1) 33 +(47, 35, 1) 34 +(47, 36, 1) 35 +(47, 37, 1) 36 +(47, 38, 1) 37 +(47, 39, 1) 38 +(47, 62, 1) 38 +(47, 63, 1) 37 +(47, 64, 1) 36 +(47, 65, 1) 35 +(47, 66, 1) 34 +(47, 67, 1) 33 +(47, 68, 1) 32 +(47, 69, 1) 31 +(47, 70, 1) 30 +(47, 71, 1) 29 +(47, 72, 1) 28 +(47, 73, 1) 27 +(47, 74, 1) 26 +(47, 75, 1) 25 +(47, 76, 1) 24 +(47, 77, 1) 23 +(47, 78, 1) 22 +(47, 79, 1) 21 +(47, 80, 1) 20 +(47, 81, 1) 19 +(47, 82, 1) 18 +(47, 83, 1) 17 +(47, 84, 1) 16 +(47, 85, 1) 15 +(47, 86, 1) 14 +(47, 87, 1) 13 +(47, 88, 1) 12 +(47, 89, 1) 11 +(47, 90, 1) 10 +(47, 91, 1) 9 +(47, 92, 1) 8 +(47, 93, 1) 7 +(47, 94, 1) 6 +(47, 95, 1) 5 +(47, 96, 1) 4 +(47, 97, 1) 3 +(47, 98, 1) 2 +(47, 99, 1) 1 +(47, 100, 1) 0 +(48, 1, 1) 0 +(48, 2, 1) 1 +(48, 3, 1) 2 +(48, 4, 1) 3 +(48, 5, 1) 4 +(48, 6, 1) 5 +(48, 7, 1) 6 +(48, 8, 1) 7 +(48, 9, 1) 8 +(48, 10, 1) 9 +(48, 11, 1) 10 +(48, 12, 1) 11 +(48, 13, 1) 12 +(48, 14, 1) 13 +(48, 15, 1) 14 +(48, 16, 1) 15 +(48, 17, 1) 16 +(48, 18, 1) 17 +(48, 19, 1) 18 +(48, 20, 1) 19 +(48, 21, 1) 20 +(48, 22, 1) 21 +(48, 23, 1) 22 +(48, 24, 1) 23 +(48, 25, 1) 24 +(48, 26, 1) 25 +(48, 27, 1) 26 +(48, 28, 1) 27 +(48, 29, 1) 28 +(48, 30, 1) 29 +(48, 31, 1) 30 +(48, 32, 1) 31 +(48, 33, 1) 32 +(48, 34, 1) 33 +(48, 35, 1) 34 +(48, 36, 1) 35 +(48, 37, 1) 36 +(48, 38, 1) 37 +(48, 39, 1) 38 +(48, 62, 1) 38 +(48, 63, 1) 37 +(48, 64, 1) 36 +(48, 65, 1) 35 +(48, 66, 1) 34 +(48, 67, 1) 33 +(48, 68, 1) 32 +(48, 69, 1) 31 +(48, 70, 1) 30 +(48, 71, 1) 29 +(48, 72, 1) 28 +(48, 73, 1) 27 +(48, 74, 1) 26 +(48, 75, 1) 25 +(48, 76, 1) 24 +(48, 77, 1) 23 +(48, 78, 1) 22 +(48, 79, 1) 21 +(48, 80, 1) 20 +(48, 81, 1) 19 +(48, 82, 1) 18 +(48, 83, 1) 17 +(48, 84, 1) 16 +(48, 85, 1) 15 +(48, 86, 1) 14 +(48, 87, 1) 13 +(48, 88, 1) 12 +(48, 89, 1) 11 +(48, 90, 1) 10 +(48, 91, 1) 9 +(48, 92, 1) 8 +(48, 93, 1) 7 +(48, 94, 1) 6 +(48, 95, 1) 5 +(48, 96, 1) 4 +(48, 97, 1) 3 +(48, 98, 1) 2 +(48, 99, 1) 1 +(48, 100, 1) 0 +(49, 1, 1) 0 +(49, 2, 1) 1 +(49, 3, 1) 2 +(49, 4, 1) 3 +(49, 5, 1) 4 +(49, 6, 1) 5 +(49, 7, 1) 6 +(49, 8, 1) 7 +(49, 9, 1) 8 +(49, 10, 1) 9 +(49, 11, 1) 10 +(49, 12, 1) 11 +(49, 13, 1) 12 +(49, 14, 1) 13 +(49, 15, 1) 14 +(49, 16, 1) 15 +(49, 17, 1) 16 +(49, 18, 1) 17 +(49, 19, 1) 18 +(49, 20, 1) 19 +(49, 21, 1) 20 +(49, 22, 1) 21 +(49, 23, 1) 22 +(49, 24, 1) 23 +(49, 25, 1) 24 +(49, 26, 1) 25 +(49, 27, 1) 26 +(49, 28, 1) 27 +(49, 29, 1) 28 +(49, 30, 1) 29 +(49, 31, 1) 30 +(49, 32, 1) 31 +(49, 33, 1) 32 +(49, 34, 1) 33 +(49, 35, 1) 34 +(49, 36, 1) 35 +(49, 37, 1) 36 +(49, 38, 1) 37 +(49, 39, 1) 38 +(49, 62, 1) 38 +(49, 63, 1) 37 +(49, 64, 1) 36 +(49, 65, 1) 35 +(49, 66, 1) 34 +(49, 67, 1) 33 +(49, 68, 1) 32 +(49, 69, 1) 31 +(49, 70, 1) 30 +(49, 71, 1) 29 +(49, 72, 1) 28 +(49, 73, 1) 27 +(49, 74, 1) 26 +(49, 75, 1) 25 +(49, 76, 1) 24 +(49, 77, 1) 23 +(49, 78, 1) 22 +(49, 79, 1) 21 +(49, 80, 1) 20 +(49, 81, 1) 19 +(49, 82, 1) 18 +(49, 83, 1) 17 +(49, 84, 1) 16 +(49, 85, 1) 15 +(49, 86, 1) 14 +(49, 87, 1) 13 +(49, 88, 1) 12 +(49, 89, 1) 11 +(49, 90, 1) 10 +(49, 91, 1) 9 +(49, 92, 1) 8 +(49, 93, 1) 7 +(49, 94, 1) 6 +(49, 95, 1) 5 +(49, 96, 1) 4 +(49, 97, 1) 3 +(49, 98, 1) 2 +(49, 99, 1) 1 +(49, 100, 1) 0 +(50, 1, 1) 0 +(50, 2, 1) 1 +(50, 3, 1) 2 +(50, 4, 1) 3 +(50, 5, 1) 4 +(50, 6, 1) 5 +(50, 7, 1) 6 +(50, 8, 1) 7 +(50, 9, 1) 8 +(50, 10, 1) 9 +(50, 11, 1) 10 +(50, 12, 1) 11 +(50, 13, 1) 12 +(50, 14, 1) 13 +(50, 15, 1) 14 +(50, 16, 1) 15 +(50, 17, 1) 16 +(50, 18, 1) 17 +(50, 19, 1) 18 +(50, 20, 1) 19 +(50, 21, 1) 20 +(50, 22, 1) 21 +(50, 23, 1) 22 +(50, 24, 1) 23 +(50, 25, 1) 24 +(50, 26, 1) 25 +(50, 27, 1) 26 +(50, 28, 1) 27 +(50, 29, 1) 28 +(50, 30, 1) 29 +(50, 31, 1) 30 +(50, 32, 1) 31 +(50, 33, 1) 32 +(50, 34, 1) 33 +(50, 35, 1) 34 +(50, 36, 1) 35 +(50, 37, 1) 36 +(50, 38, 1) 37 +(50, 39, 1) 38 +(50, 62, 1) 38 +(50, 63, 1) 37 +(50, 64, 1) 36 +(50, 65, 1) 35 +(50, 66, 1) 34 +(50, 67, 1) 33 +(50, 68, 1) 32 +(50, 69, 1) 31 +(50, 70, 1) 30 +(50, 71, 1) 29 +(50, 72, 1) 28 +(50, 73, 1) 27 +(50, 74, 1) 26 +(50, 75, 1) 25 +(50, 76, 1) 24 +(50, 77, 1) 23 +(50, 78, 1) 22 +(50, 79, 1) 21 +(50, 80, 1) 20 +(50, 81, 1) 19 +(50, 82, 1) 18 +(50, 83, 1) 17 +(50, 84, 1) 16 +(50, 85, 1) 15 +(50, 86, 1) 14 +(50, 87, 1) 13 +(50, 88, 1) 12 +(50, 89, 1) 11 +(50, 90, 1) 10 +(50, 91, 1) 9 +(50, 92, 1) 8 +(50, 93, 1) 7 +(50, 94, 1) 6 +(50, 95, 1) 5 +(50, 96, 1) 4 +(50, 97, 1) 3 +(50, 98, 1) 2 +(50, 99, 1) 1 +(50, 100, 1) 0 +(51, 1, 1) 0 +(51, 2, 1) 1 +(51, 3, 1) 2 +(51, 4, 1) 3 +(51, 5, 1) 4 +(51, 6, 1) 5 +(51, 7, 1) 6 +(51, 8, 1) 7 +(51, 9, 1) 8 +(51, 10, 1) 9 +(51, 11, 1) 10 +(51, 12, 1) 11 +(51, 13, 1) 12 +(51, 14, 1) 13 +(51, 15, 1) 14 +(51, 16, 1) 15 +(51, 17, 1) 16 +(51, 18, 1) 17 +(51, 19, 1) 18 +(51, 20, 1) 19 +(51, 21, 1) 20 +(51, 22, 1) 21 +(51, 23, 1) 22 +(51, 24, 1) 23 +(51, 25, 1) 24 +(51, 26, 1) 25 +(51, 27, 1) 26 +(51, 28, 1) 27 +(51, 29, 1) 28 +(51, 30, 1) 29 +(51, 31, 1) 30 +(51, 32, 1) 31 +(51, 33, 1) 32 +(51, 34, 1) 33 +(51, 35, 1) 34 +(51, 36, 1) 35 +(51, 37, 1) 36 +(51, 38, 1) 37 +(51, 39, 1) 38 +(51, 62, 1) 38 +(51, 63, 1) 37 +(51, 64, 1) 36 +(51, 65, 1) 35 +(51, 66, 1) 34 +(51, 67, 1) 33 +(51, 68, 1) 32 +(51, 69, 1) 31 +(51, 70, 1) 30 +(51, 71, 1) 29 +(51, 72, 1) 28 +(51, 73, 1) 27 +(51, 74, 1) 26 +(51, 75, 1) 25 +(51, 76, 1) 24 +(51, 77, 1) 23 +(51, 78, 1) 22 +(51, 79, 1) 21 +(51, 80, 1) 20 +(51, 81, 1) 19 +(51, 82, 1) 18 +(51, 83, 1) 17 +(51, 84, 1) 16 +(51, 85, 1) 15 +(51, 86, 1) 14 +(51, 87, 1) 13 +(51, 88, 1) 12 +(51, 89, 1) 11 +(51, 90, 1) 10 +(51, 91, 1) 9 +(51, 92, 1) 8 +(51, 93, 1) 7 +(51, 94, 1) 6 +(51, 95, 1) 5 +(51, 96, 1) 4 +(51, 97, 1) 3 +(51, 98, 1) 2 +(51, 99, 1) 1 +(51, 100, 1) 0 +(52, 1, 1) 0 +(52, 2, 1) 1 +(52, 3, 1) 2 +(52, 4, 1) 3 +(52, 5, 1) 4 +(52, 6, 1) 5 +(52, 7, 1) 6 +(52, 8, 1) 7 +(52, 9, 1) 8 +(52, 10, 1) 9 +(52, 11, 1) 10 +(52, 12, 1) 11 +(52, 13, 1) 12 +(52, 14, 1) 13 +(52, 15, 1) 14 +(52, 16, 1) 15 +(52, 17, 1) 16 +(52, 18, 1) 17 +(52, 19, 1) 18 +(52, 20, 1) 19 +(52, 21, 1) 20 +(52, 22, 1) 21 +(52, 23, 1) 22 +(52, 24, 1) 23 +(52, 25, 1) 24 +(52, 26, 1) 25 +(52, 27, 1) 26 +(52, 28, 1) 27 +(52, 29, 1) 28 +(52, 30, 1) 29 +(52, 31, 1) 30 +(52, 32, 1) 31 +(52, 33, 1) 32 +(52, 34, 1) 33 +(52, 35, 1) 34 +(52, 36, 1) 35 +(52, 37, 1) 36 +(52, 38, 1) 37 +(52, 39, 1) 38 +(52, 62, 1) 38 +(52, 63, 1) 37 +(52, 64, 1) 36 +(52, 65, 1) 35 +(52, 66, 1) 34 +(52, 67, 1) 33 +(52, 68, 1) 32 +(52, 69, 1) 31 +(52, 70, 1) 30 +(52, 71, 1) 29 +(52, 72, 1) 28 +(52, 73, 1) 27 +(52, 74, 1) 26 +(52, 75, 1) 25 +(52, 76, 1) 24 +(52, 77, 1) 23 +(52, 78, 1) 22 +(52, 79, 1) 21 +(52, 80, 1) 20 +(52, 81, 1) 19 +(52, 82, 1) 18 +(52, 83, 1) 17 +(52, 84, 1) 16 +(52, 85, 1) 15 +(52, 86, 1) 14 +(52, 87, 1) 13 +(52, 88, 1) 12 +(52, 89, 1) 11 +(52, 90, 1) 10 +(52, 91, 1) 9 +(52, 92, 1) 8 +(52, 93, 1) 7 +(52, 94, 1) 6 +(52, 95, 1) 5 +(52, 96, 1) 4 +(52, 97, 1) 3 +(52, 98, 1) 2 +(52, 99, 1) 1 +(52, 100, 1) 0 +(53, 1, 1) 0 +(53, 2, 1) 1 +(53, 3, 1) 2 +(53, 4, 1) 3 +(53, 5, 1) 4 +(53, 6, 1) 5 +(53, 7, 1) 6 +(53, 8, 1) 7 +(53, 9, 1) 8 +(53, 10, 1) 9 +(53, 11, 1) 10 +(53, 12, 1) 11 +(53, 13, 1) 12 +(53, 14, 1) 13 +(53, 15, 1) 14 +(53, 16, 1) 15 +(53, 17, 1) 16 +(53, 18, 1) 17 +(53, 19, 1) 18 +(53, 20, 1) 19 +(53, 21, 1) 20 +(53, 22, 1) 21 +(53, 23, 1) 22 +(53, 24, 1) 23 +(53, 25, 1) 24 +(53, 26, 1) 25 +(53, 27, 1) 26 +(53, 28, 1) 27 +(53, 29, 1) 28 +(53, 30, 1) 29 +(53, 31, 1) 30 +(53, 32, 1) 31 +(53, 33, 1) 32 +(53, 34, 1) 33 +(53, 35, 1) 34 +(53, 36, 1) 35 +(53, 37, 1) 36 +(53, 38, 1) 37 +(53, 39, 1) 38 +(53, 62, 1) 38 +(53, 63, 1) 37 +(53, 64, 1) 36 +(53, 65, 1) 35 +(53, 66, 1) 34 +(53, 67, 1) 33 +(53, 68, 1) 32 +(53, 69, 1) 31 +(53, 70, 1) 30 +(53, 71, 1) 29 +(53, 72, 1) 28 +(53, 73, 1) 27 +(53, 74, 1) 26 +(53, 75, 1) 25 +(53, 76, 1) 24 +(53, 77, 1) 23 +(53, 78, 1) 22 +(53, 79, 1) 21 +(53, 80, 1) 20 +(53, 81, 1) 19 +(53, 82, 1) 18 +(53, 83, 1) 17 +(53, 84, 1) 16 +(53, 85, 1) 15 +(53, 86, 1) 14 +(53, 87, 1) 13 +(53, 88, 1) 12 +(53, 89, 1) 11 +(53, 90, 1) 10 +(53, 91, 1) 9 +(53, 92, 1) 8 +(53, 93, 1) 7 +(53, 94, 1) 6 +(53, 95, 1) 5 +(53, 96, 1) 4 +(53, 97, 1) 3 +(53, 98, 1) 2 +(53, 99, 1) 1 +(53, 100, 1) 0 +(54, 1, 1) 0 +(54, 2, 1) 1 +(54, 3, 1) 2 +(54, 4, 1) 3 +(54, 5, 1) 4 +(54, 6, 1) 5 +(54, 7, 1) 6 +(54, 8, 1) 7 +(54, 9, 1) 8 +(54, 10, 1) 9 +(54, 11, 1) 10 +(54, 12, 1) 11 +(54, 13, 1) 12 +(54, 14, 1) 13 +(54, 15, 1) 14 +(54, 16, 1) 15 +(54, 17, 1) 16 +(54, 18, 1) 17 +(54, 19, 1) 18 +(54, 20, 1) 19 +(54, 21, 1) 20 +(54, 22, 1) 21 +(54, 23, 1) 22 +(54, 24, 1) 23 +(54, 25, 1) 24 +(54, 26, 1) 25 +(54, 27, 1) 26 +(54, 28, 1) 27 +(54, 29, 1) 28 +(54, 30, 1) 29 +(54, 31, 1) 30 +(54, 32, 1) 31 +(54, 33, 1) 32 +(54, 34, 1) 33 +(54, 35, 1) 34 +(54, 36, 1) 35 +(54, 37, 1) 36 +(54, 38, 1) 37 +(54, 39, 1) 38 +(54, 62, 1) 38 +(54, 63, 1) 37 +(54, 64, 1) 36 +(54, 65, 1) 35 +(54, 66, 1) 34 +(54, 67, 1) 33 +(54, 68, 1) 32 +(54, 69, 1) 31 +(54, 70, 1) 30 +(54, 71, 1) 29 +(54, 72, 1) 28 +(54, 73, 1) 27 +(54, 74, 1) 26 +(54, 75, 1) 25 +(54, 76, 1) 24 +(54, 77, 1) 23 +(54, 78, 1) 22 +(54, 79, 1) 21 +(54, 80, 1) 20 +(54, 81, 1) 19 +(54, 82, 1) 18 +(54, 83, 1) 17 +(54, 84, 1) 16 +(54, 85, 1) 15 +(54, 86, 1) 14 +(54, 87, 1) 13 +(54, 88, 1) 12 +(54, 89, 1) 11 +(54, 90, 1) 10 +(54, 91, 1) 9 +(54, 92, 1) 8 +(54, 93, 1) 7 +(54, 94, 1) 6 +(54, 95, 1) 5 +(54, 96, 1) 4 +(54, 97, 1) 3 +(54, 98, 1) 2 +(54, 99, 1) 1 +(54, 100, 1) 0 +(55, 1, 1) 0 +(55, 2, 1) 1 +(55, 3, 1) 2 +(55, 4, 1) 3 +(55, 5, 1) 4 +(55, 6, 1) 5 +(55, 7, 1) 6 +(55, 8, 1) 7 +(55, 9, 1) 8 +(55, 10, 1) 9 +(55, 11, 1) 10 +(55, 12, 1) 11 +(55, 13, 1) 12 +(55, 14, 1) 13 +(55, 15, 1) 14 +(55, 16, 1) 15 +(55, 17, 1) 16 +(55, 18, 1) 17 +(55, 19, 1) 18 +(55, 20, 1) 19 +(55, 21, 1) 20 +(55, 22, 1) 21 +(55, 23, 1) 22 +(55, 24, 1) 23 +(55, 25, 1) 24 +(55, 26, 1) 25 +(55, 27, 1) 26 +(55, 28, 1) 27 +(55, 29, 1) 28 +(55, 30, 1) 29 +(55, 31, 1) 30 +(55, 32, 1) 30 +(55, 33, 1) 31 +(55, 34, 1) 32 +(55, 35, 1) 33 +(55, 36, 1) 34 +(55, 37, 1) 35 +(55, 38, 1) 36 +(55, 39, 1) 37 +(55, 62, 1) 37 +(55, 63, 1) 36 +(55, 64, 1) 35 +(55, 65, 1) 34 +(55, 66, 1) 33 +(55, 67, 1) 32 +(55, 68, 1) 31 +(55, 69, 1) 30 +(55, 70, 1) 30 +(55, 71, 1) 29 +(55, 72, 1) 28 +(55, 73, 1) 27 +(55, 74, 1) 26 +(55, 75, 1) 25 +(55, 76, 1) 24 +(55, 77, 1) 23 +(55, 78, 1) 22 +(55, 79, 1) 21 +(55, 80, 1) 20 +(55, 81, 1) 19 +(55, 82, 1) 18 +(55, 83, 1) 17 +(55, 84, 1) 16 +(55, 85, 1) 15 +(55, 86, 1) 14 +(55, 87, 1) 13 +(55, 88, 1) 12 +(55, 89, 1) 11 +(55, 90, 1) 10 +(55, 91, 1) 9 +(55, 92, 1) 8 +(55, 93, 1) 7 +(55, 94, 1) 6 +(55, 95, 1) 5 +(55, 96, 1) 4 +(55, 97, 1) 3 +(55, 98, 1) 2 +(55, 99, 1) 1 +(55, 100, 1) 0 +(56, 1, 1) 0 +(56, 2, 1) 1 +(56, 3, 1) 2 +(56, 4, 1) 3 +(56, 5, 1) 4 +(56, 6, 1) 5 +(56, 7, 1) 6 +(56, 8, 1) 7 +(56, 9, 1) 8 +(56, 10, 1) 9 +(56, 11, 1) 10 +(56, 12, 1) 11 +(56, 13, 1) 12 +(56, 14, 1) 13 +(56, 15, 1) 14 +(56, 16, 1) 15 +(56, 17, 1) 16 +(56, 18, 1) 17 +(56, 19, 1) 18 +(56, 20, 1) 19 +(56, 21, 1) 20 +(56, 22, 1) 21 +(56, 23, 1) 22 +(56, 24, 1) 23 +(56, 25, 1) 23 +(56, 26, 1) 24 +(56, 27, 1) 25 +(56, 28, 1) 26 +(56, 29, 1) 27 +(56, 30, 1) 28 +(56, 31, 1) 29 +(56, 32, 1) 30 +(56, 33, 1) 31 +(56, 34, 1) 32 +(56, 35, 1) 33 +(56, 36, 1) 34 +(56, 37, 1) 35 +(56, 38, 1) 36 +(56, 39, 1) 37 +(56, 40, 1) 38 +(56, 61, 1) 38 +(56, 62, 1) 37 +(56, 63, 1) 36 +(56, 64, 1) 35 +(56, 65, 1) 34 +(56, 66, 1) 33 +(56, 67, 1) 32 +(56, 68, 1) 31 +(56, 69, 1) 30 +(56, 70, 1) 29 +(56, 71, 1) 28 +(56, 72, 1) 27 +(56, 73, 1) 26 +(56, 74, 1) 25 +(56, 75, 1) 24 +(56, 76, 1) 23 +(56, 77, 1) 23 +(56, 78, 1) 22 +(56, 79, 1) 21 +(56, 80, 1) 20 +(56, 81, 1) 19 +(56, 82, 1) 18 +(56, 83, 1) 17 +(56, 84, 1) 16 +(56, 85, 1) 15 +(56, 86, 1) 14 +(56, 87, 1) 13 +(56, 88, 1) 12 +(56, 89, 1) 11 +(56, 90, 1) 10 +(56, 91, 1) 9 +(56, 92, 1) 8 +(56, 93, 1) 7 +(56, 94, 1) 6 +(56, 95, 1) 5 +(56, 96, 1) 4 +(56, 97, 1) 3 +(56, 98, 1) 2 +(56, 99, 1) 1 +(56, 100, 1) 0 +(57, 1, 1) 0 +(57, 2, 1) 1 +(57, 3, 1) 2 +(57, 4, 1) 3 +(57, 5, 1) 4 +(57, 6, 1) 5 +(57, 7, 1) 6 +(57, 8, 1) 7 +(57, 9, 1) 8 +(57, 10, 1) 9 +(57, 11, 1) 10 +(57, 12, 1) 11 +(57, 13, 1) 12 +(57, 14, 1) 13 +(57, 15, 1) 14 +(57, 16, 1) 14 +(57, 17, 1) 15 +(57, 18, 1) 16 +(57, 19, 1) 17 +(57, 20, 1) 18 +(57, 21, 1) 19 +(57, 22, 1) 20 +(57, 23, 1) 21 +(57, 24, 1) 22 +(57, 25, 1) 23 +(57, 26, 1) 24 +(57, 27, 1) 25 +(57, 28, 1) 26 +(57, 29, 1) 27 +(57, 30, 1) 28 +(57, 31, 1) 29 +(57, 32, 1) 30 +(57, 33, 1) 31 +(57, 34, 1) 32 +(57, 35, 1) 33 +(57, 36, 1) 34 +(57, 37, 1) 35 +(57, 38, 1) 35 +(57, 39, 1) 36 +(57, 40, 1) 37 +(57, 61, 1) 37 +(57, 62, 1) 36 +(57, 63, 1) 35 +(57, 64, 1) 35 +(57, 65, 1) 34 +(57, 66, 1) 33 +(57, 67, 1) 32 +(57, 68, 1) 31 +(57, 69, 1) 30 +(57, 70, 1) 29 +(57, 71, 1) 28 +(57, 72, 1) 27 +(57, 73, 1) 26 +(57, 74, 1) 25 +(57, 75, 1) 24 +(57, 76, 1) 23 +(57, 77, 1) 22 +(57, 78, 1) 21 +(57, 79, 1) 20 +(57, 80, 1) 19 +(57, 81, 1) 18 +(57, 82, 1) 17 +(57, 83, 1) 16 +(57, 84, 1) 15 +(57, 85, 1) 14 +(57, 86, 1) 14 +(57, 87, 1) 13 +(57, 88, 1) 12 +(57, 89, 1) 11 +(57, 90, 1) 10 +(57, 91, 1) 9 +(57, 92, 1) 8 +(57, 93, 1) 7 +(57, 94, 1) 6 +(57, 95, 1) 5 +(57, 96, 1) 4 +(57, 97, 1) 3 +(57, 98, 1) 2 +(57, 99, 1) 1 +(57, 100, 1) 0 +(58, 1, 1) 0 +(58, 2, 1) 1 +(58, 3, 1) 2 +(58, 4, 1) 3 +(58, 5, 1) 4 +(58, 6, 1) 4 +(58, 7, 1) 5 +(58, 8, 1) 6 +(58, 9, 1) 7 +(58, 10, 1) 8 +(58, 11, 1) 9 +(58, 12, 1) 10 +(58, 13, 1) 11 +(58, 14, 1) 12 +(58, 15, 1) 13 +(58, 16, 1) 14 +(58, 17, 1) 15 +(58, 18, 1) 16 +(58, 19, 1) 17 +(58, 20, 1) 18 +(58, 21, 1) 19 +(58, 22, 1) 20 +(58, 23, 1) 21 +(58, 24, 1) 22 +(58, 25, 1) 23 +(58, 26, 1) 24 +(58, 27, 1) 25 +(58, 28, 1) 26 +(58, 29, 1) 27 +(58, 30, 1) 28 +(58, 31, 1) 29 +(58, 32, 1) 30 +(58, 33, 1) 30 +(58, 34, 1) 31 +(58, 35, 1) 32 +(58, 36, 1) 33 +(58, 37, 1) 34 +(58, 38, 1) 35 +(58, 39, 1) 36 +(58, 40, 1) 37 +(58, 41, 1) 37 +(58, 60, 1) 37 +(58, 61, 1) 37 +(58, 62, 1) 36 +(58, 63, 1) 35 +(58, 64, 1) 34 +(58, 65, 1) 33 +(58, 66, 1) 32 +(58, 67, 1) 31 +(58, 68, 1) 30 +(58, 69, 1) 30 +(58, 70, 1) 29 +(58, 71, 1) 28 +(58, 72, 1) 27 +(58, 73, 1) 26 +(58, 74, 1) 25 +(58, 75, 1) 24 +(58, 76, 1) 23 +(58, 77, 1) 22 +(58, 78, 1) 21 +(58, 79, 1) 20 +(58, 80, 1) 19 +(58, 81, 1) 18 +(58, 82, 1) 17 +(58, 83, 1) 16 +(58, 84, 1) 15 +(58, 85, 1) 14 +(58, 86, 1) 13 +(58, 87, 1) 12 +(58, 88, 1) 11 +(58, 89, 1) 10 +(58, 90, 1) 9 +(58, 91, 1) 8 +(58, 92, 1) 7 +(58, 93, 1) 6 +(58, 94, 1) 5 +(58, 95, 1) 4 +(58, 96, 1) 4 +(58, 97, 1) 3 +(58, 98, 1) 2 +(58, 99, 1) 1 +(58, 100, 1) 0 +(59, 1, 1) 0 +(59, 2, 1) 0 +(59, 3, 1) 1 +(59, 4, 1) 2 +(59, 5, 1) 3 +(59, 6, 1) 4 +(59, 7, 1) 5 +(59, 8, 1) 6 +(59, 9, 1) 7 +(59, 10, 1) 8 +(59, 11, 1) 9 +(59, 12, 1) 10 +(59, 13, 1) 11 +(59, 14, 1) 12 +(59, 15, 1) 13 +(59, 16, 1) 14 +(59, 17, 1) 15 +(59, 18, 1) 16 +(59, 19, 1) 17 +(59, 20, 1) 18 +(59, 21, 1) 19 +(59, 22, 1) 20 +(59, 23, 1) 21 +(59, 24, 1) 22 +(59, 25, 1) 23 +(59, 26, 1) 24 +(59, 27, 1) 25 +(59, 28, 1) 25 +(59, 29, 1) 26 +(59, 30, 1) 27 +(59, 31, 1) 28 +(59, 32, 1) 29 +(59, 33, 1) 30 +(59, 34, 1) 31 +(59, 35, 1) 32 +(59, 36, 1) 33 +(59, 37, 1) 34 +(59, 38, 1) 34 +(59, 39, 1) 35 +(59, 40, 1) 36 +(59, 41, 1) 37 +(59, 42, 1) 38 +(59, 59, 1) 38 +(59, 60, 1) 37 +(59, 61, 1) 36 +(59, 62, 1) 35 +(59, 63, 1) 34 +(59, 64, 1) 34 +(59, 65, 1) 33 +(59, 66, 1) 32 +(59, 67, 1) 31 +(59, 68, 1) 30 +(59, 69, 1) 29 +(59, 70, 1) 28 +(59, 71, 1) 27 +(59, 72, 1) 26 +(59, 73, 1) 25 +(59, 74, 1) 25 +(59, 75, 1) 24 +(59, 76, 1) 23 +(59, 77, 1) 22 +(59, 78, 1) 21 +(59, 79, 1) 20 +(59, 80, 1) 19 +(59, 81, 1) 18 +(59, 82, 1) 17 +(59, 83, 1) 16 +(59, 84, 1) 15 +(59, 85, 1) 14 +(59, 86, 1) 13 +(59, 87, 1) 12 +(59, 88, 1) 11 +(59, 89, 1) 10 +(59, 90, 1) 9 +(59, 91, 1) 8 +(59, 92, 1) 7 +(59, 93, 1) 6 +(59, 94, 1) 5 +(59, 95, 1) 4 +(59, 96, 1) 3 +(59, 97, 1) 2 +(59, 98, 1) 1 +(59, 99, 1) 0 +(59, 100, 1) 0 +(60, 1, 1) 0 +(60, 2, 1) 0 +(60, 3, 1) 1 +(60, 4, 1) 2 +(60, 5, 1) 3 +(60, 6, 1) 4 +(60, 7, 1) 5 +(60, 8, 1) 6 +(60, 9, 1) 7 +(60, 10, 1) 8 +(60, 11, 1) 9 +(60, 12, 1) 10 +(60, 13, 1) 11 +(60, 14, 1) 12 +(60, 15, 1) 13 +(60, 16, 1) 14 +(60, 17, 1) 15 +(60, 18, 1) 16 +(60, 19, 1) 17 +(60, 20, 1) 18 +(60, 21, 1) 19 +(60, 22, 1) 20 +(60, 23, 1) 20 +(60, 24, 1) 21 +(60, 25, 1) 22 +(60, 26, 1) 23 +(60, 27, 1) 24 +(60, 28, 1) 25 +(60, 29, 1) 26 +(60, 30, 1) 27 +(60, 31, 1) 28 +(60, 32, 1) 29 +(60, 33, 1) 30 +(60, 34, 1) 30 +(60, 35, 1) 31 +(60, 36, 1) 32 +(60, 37, 1) 33 +(60, 38, 1) 34 +(60, 39, 1) 35 +(60, 40, 1) 35 +(60, 41, 1) 36 +(60, 42, 1) 37 +(60, 43, 1) 37 +(60, 58, 1) 37 +(60, 59, 1) 37 +(60, 60, 1) 36 +(60, 61, 1) 35 +(60, 62, 1) 35 +(60, 63, 1) 34 +(60, 64, 1) 33 +(60, 65, 1) 32 +(60, 66, 1) 31 +(60, 67, 1) 30 +(60, 68, 1) 30 +(60, 69, 1) 29 +(60, 70, 1) 28 +(60, 71, 1) 27 +(60, 72, 1) 26 +(60, 73, 1) 25 +(60, 74, 1) 24 +(60, 75, 1) 23 +(60, 76, 1) 22 +(60, 77, 1) 21 +(60, 78, 1) 20 +(60, 79, 1) 20 +(60, 80, 1) 19 +(60, 81, 1) 18 +(60, 82, 1) 17 +(60, 83, 1) 16 +(60, 84, 1) 15 +(60, 85, 1) 14 +(60, 86, 1) 13 +(60, 87, 1) 12 +(60, 88, 1) 11 +(60, 89, 1) 10 +(60, 90, 1) 9 +(60, 91, 1) 8 +(60, 92, 1) 7 +(60, 93, 1) 6 +(60, 94, 1) 5 +(60, 95, 1) 4 +(60, 96, 1) 3 +(60, 97, 1) 2 +(60, 98, 1) 1 +(60, 99, 1) 0 +(60, 100, 1) 0 +(61, 4, 1) 2 +(61, 5, 1) 3 +(61, 6, 1) 4 +(61, 7, 1) 5 +(61, 8, 1) 6 +(61, 9, 1) 7 +(61, 10, 1) 8 +(61, 11, 1) 9 +(61, 12, 1) 10 +(61, 13, 1) 11 +(61, 14, 1) 12 +(61, 15, 1) 13 +(61, 16, 1) 14 +(61, 17, 1) 15 +(61, 18, 1) 16 +(61, 19, 1) 16 +(61, 20, 1) 17 +(61, 21, 1) 18 +(61, 22, 1) 19 +(61, 23, 1) 20 +(61, 24, 1) 21 +(61, 25, 1) 22 +(61, 26, 1) 23 +(61, 27, 1) 24 +(61, 28, 1) 25 +(61, 29, 1) 26 +(61, 30, 1) 27 +(61, 31, 1) 27 +(61, 32, 1) 28 +(61, 33, 1) 29 +(61, 34, 1) 30 +(61, 35, 1) 31 +(61, 36, 1) 32 +(61, 37, 1) 32 +(61, 38, 1) 33 +(61, 39, 1) 34 +(61, 40, 1) 35 +(61, 41, 1) 35 +(61, 42, 1) 36 +(61, 43, 1) 37 +(61, 44, 1) 37 +(61, 45, 1) 38 +(61, 56, 1) 38 +(61, 57, 1) 37 +(61, 58, 1) 37 +(61, 59, 1) 36 +(61, 60, 1) 35 +(61, 61, 1) 35 +(61, 62, 1) 34 +(61, 63, 1) 33 +(61, 64, 1) 32 +(61, 65, 1) 32 +(61, 66, 1) 31 +(61, 67, 1) 30 +(61, 68, 1) 29 +(61, 69, 1) 28 +(61, 70, 1) 27 +(61, 71, 1) 27 +(61, 72, 1) 26 +(61, 73, 1) 25 +(61, 74, 1) 24 +(61, 75, 1) 23 +(61, 76, 1) 22 +(61, 77, 1) 21 +(61, 78, 1) 20 +(61, 79, 1) 19 +(61, 80, 1) 18 +(61, 81, 1) 17 +(61, 82, 1) 16 +(61, 83, 1) 16 +(61, 84, 1) 15 +(61, 85, 1) 14 +(61, 86, 1) 13 +(61, 87, 1) 12 +(61, 88, 1) 11 +(61, 89, 1) 10 +(61, 90, 1) 9 +(61, 91, 1) 8 +(61, 92, 1) 7 +(61, 93, 1) 6 +(61, 94, 1) 5 +(61, 95, 1) 4 +(61, 96, 1) 3 +(61, 97, 1) 2 +(62, 4, 1) 2 +(62, 5, 1) 3 +(62, 6, 1) 4 +(62, 7, 1) 5 +(62, 8, 1) 6 +(62, 9, 1) 7 +(62, 10, 1) 8 +(62, 11, 1) 9 +(62, 12, 1) 9 +(62, 13, 1) 10 +(62, 14, 1) 11 +(62, 15, 1) 12 +(62, 16, 1) 13 +(62, 17, 1) 14 +(62, 18, 1) 15 +(62, 19, 1) 16 +(62, 20, 1) 17 +(62, 21, 1) 18 +(62, 22, 1) 19 +(62, 23, 1) 20 +(62, 24, 1) 21 +(62, 25, 1) 22 +(62, 26, 1) 23 +(62, 27, 1) 23 +(62, 28, 1) 24 +(62, 29, 1) 25 +(62, 30, 1) 26 +(62, 31, 1) 27 +(62, 32, 1) 28 +(62, 33, 1) 29 +(62, 34, 1) 29 +(62, 35, 1) 30 +(62, 36, 1) 31 +(62, 37, 1) 32 +(62, 38, 1) 33 +(62, 39, 1) 33 +(62, 40, 1) 34 +(62, 41, 1) 35 +(62, 42, 1) 35 +(62, 43, 1) 36 +(62, 44, 1) 36 +(62, 45, 1) 37 +(62, 46, 1) 37 +(62, 47, 1) 37 +(62, 48, 1) 38 +(62, 49, 1) 38 +(62, 50, 1) 38 +(62, 51, 1) 38 +(62, 52, 1) 38 +(62, 53, 1) 38 +(62, 54, 1) 37 +(62, 55, 1) 37 +(62, 56, 1) 37 +(62, 57, 1) 36 +(62, 58, 1) 36 +(62, 59, 1) 35 +(62, 60, 1) 35 +(62, 61, 1) 34 +(62, 62, 1) 33 +(62, 63, 1) 33 +(62, 64, 1) 32 +(62, 65, 1) 31 +(62, 66, 1) 30 +(62, 67, 1) 29 +(62, 68, 1) 29 +(62, 69, 1) 28 +(62, 70, 1) 27 +(62, 71, 1) 26 +(62, 72, 1) 25 +(62, 73, 1) 24 +(62, 74, 1) 23 +(62, 75, 1) 23 +(62, 76, 1) 22 +(62, 77, 1) 21 +(62, 78, 1) 20 +(62, 79, 1) 19 +(62, 80, 1) 18 +(62, 81, 1) 17 +(62, 82, 1) 16 +(62, 83, 1) 15 +(62, 84, 1) 14 +(62, 85, 1) 13 +(62, 86, 1) 12 +(62, 87, 1) 11 +(62, 88, 1) 10 +(62, 89, 1) 9 +(62, 90, 1) 9 +(62, 91, 1) 8 +(62, 92, 1) 7 +(62, 93, 1) 6 +(62, 94, 1) 5 +(62, 95, 1) 4 +(62, 96, 1) 3 +(62, 97, 1) 2 +(63, 4, 1) 2 +(63, 5, 1) 3 +(63, 6, 1) 3 +(63, 7, 1) 4 +(63, 8, 1) 5 +(63, 9, 1) 6 +(63, 10, 1) 7 +(63, 11, 1) 8 +(63, 12, 1) 9 +(63, 13, 1) 10 +(63, 14, 1) 11 +(63, 15, 1) 12 +(63, 16, 1) 13 +(63, 17, 1) 14 +(63, 18, 1) 15 +(63, 19, 1) 16 +(63, 20, 1) 17 +(63, 21, 1) 18 +(63, 22, 1) 18 +(63, 23, 1) 19 +(63, 24, 1) 20 +(63, 25, 1) 21 +(63, 26, 1) 22 +(63, 27, 1) 23 +(63, 28, 1) 24 +(63, 29, 1) 25 +(63, 30, 1) 26 +(63, 31, 1) 26 +(63, 32, 1) 27 +(63, 33, 1) 28 +(63, 34, 1) 29 +(63, 35, 1) 30 +(63, 36, 1) 30 +(63, 37, 1) 31 +(63, 38, 1) 32 +(63, 39, 1) 33 +(63, 40, 1) 33 +(63, 41, 1) 34 +(63, 42, 1) 34 +(63, 43, 1) 35 +(63, 44, 1) 35 +(63, 45, 1) 36 +(63, 46, 1) 36 +(63, 47, 1) 37 +(63, 48, 1) 37 +(63, 49, 1) 37 +(63, 50, 1) 37 +(63, 51, 1) 37 +(63, 52, 1) 37 +(63, 53, 1) 37 +(63, 54, 1) 37 +(63, 55, 1) 36 +(63, 56, 1) 36 +(63, 57, 1) 35 +(63, 58, 1) 35 +(63, 59, 1) 34 +(63, 60, 1) 34 +(63, 61, 1) 33 +(63, 62, 1) 33 +(63, 63, 1) 32 +(63, 64, 1) 31 +(63, 65, 1) 30 +(63, 66, 1) 30 +(63, 67, 1) 29 +(63, 68, 1) 28 +(63, 69, 1) 27 +(63, 70, 1) 26 +(63, 71, 1) 26 +(63, 72, 1) 25 +(63, 73, 1) 24 +(63, 74, 1) 23 +(63, 75, 1) 22 +(63, 76, 1) 21 +(63, 77, 1) 20 +(63, 78, 1) 19 +(63, 79, 1) 18 +(63, 80, 1) 18 +(63, 81, 1) 17 +(63, 82, 1) 16 +(63, 83, 1) 15 +(63, 84, 1) 14 +(63, 85, 1) 13 +(63, 86, 1) 12 +(63, 87, 1) 11 +(63, 88, 1) 10 +(63, 89, 1) 9 +(63, 90, 1) 8 +(63, 91, 1) 7 +(63, 92, 1) 6 +(63, 93, 1) 5 +(63, 94, 1) 4 +(63, 95, 1) 3 +(63, 96, 1) 3 +(63, 97, 1) 2 +(64, 4, 1) 1 +(64, 5, 1) 2 +(64, 6, 1) 3 +(64, 7, 1) 4 +(64, 8, 1) 5 +(64, 9, 1) 6 +(64, 10, 1) 7 +(64, 11, 1) 8 +(64, 12, 1) 9 +(64, 13, 1) 10 +(64, 14, 1) 11 +(64, 15, 1) 12 +(64, 16, 1) 13 +(64, 17, 1) 14 +(64, 18, 1) 14 +(64, 19, 1) 15 +(64, 20, 1) 16 +(64, 21, 1) 17 +(64, 22, 1) 18 +(64, 23, 1) 19 +(64, 24, 1) 20 +(64, 25, 1) 21 +(64, 26, 1) 22 +(64, 27, 1) 22 +(64, 28, 1) 23 +(64, 29, 1) 24 +(64, 30, 1) 25 +(64, 31, 1) 26 +(64, 32, 1) 27 +(64, 33, 1) 27 +(64, 34, 1) 28 +(64, 35, 1) 29 +(64, 36, 1) 30 +(64, 37, 1) 30 +(64, 38, 1) 31 +(64, 39, 1) 32 +(64, 40, 1) 32 +(64, 41, 1) 33 +(64, 42, 1) 34 +(64, 43, 1) 34 +(64, 44, 1) 35 +(64, 45, 1) 35 +(64, 46, 1) 35 +(64, 47, 1) 36 +(64, 48, 1) 36 +(64, 49, 1) 36 +(64, 50, 1) 36 +(64, 51, 1) 36 +(64, 52, 1) 36 +(64, 53, 1) 36 +(64, 54, 1) 36 +(64, 55, 1) 35 +(64, 56, 1) 35 +(64, 57, 1) 35 +(64, 58, 1) 34 +(64, 59, 1) 34 +(64, 60, 1) 33 +(64, 61, 1) 32 +(64, 62, 1) 32 +(64, 63, 1) 31 +(64, 64, 1) 30 +(64, 65, 1) 30 +(64, 66, 1) 29 +(64, 67, 1) 28 +(64, 68, 1) 27 +(64, 69, 1) 27 +(64, 70, 1) 26 +(64, 71, 1) 25 +(64, 72, 1) 24 +(64, 73, 1) 23 +(64, 74, 1) 22 +(64, 75, 1) 22 +(64, 76, 1) 21 +(64, 77, 1) 20 +(64, 78, 1) 19 +(64, 79, 1) 18 +(64, 80, 1) 17 +(64, 81, 1) 16 +(64, 82, 1) 15 +(64, 83, 1) 14 +(64, 84, 1) 14 +(64, 85, 1) 13 +(64, 86, 1) 12 +(64, 87, 1) 11 +(64, 88, 1) 10 +(64, 89, 1) 9 +(64, 90, 1) 8 +(64, 91, 1) 7 +(64, 92, 1) 6 +(64, 93, 1) 5 +(64, 94, 1) 4 +(64, 95, 1) 3 +(64, 96, 1) 2 +(64, 97, 1) 1 +(65, 4, 1) 1 +(65, 5, 1) 2 +(65, 6, 1) 3 +(65, 7, 1) 4 +(65, 8, 1) 5 +(65, 9, 1) 6 +(65, 10, 1) 7 +(65, 11, 1) 8 +(65, 12, 1) 8 +(65, 13, 1) 9 +(65, 14, 1) 10 +(65, 15, 1) 11 +(65, 16, 1) 12 +(65, 17, 1) 13 +(65, 18, 1) 14 +(65, 19, 1) 15 +(65, 20, 1) 16 +(65, 21, 1) 17 +(65, 22, 1) 18 +(65, 23, 1) 19 +(65, 24, 1) 19 +(65, 25, 1) 20 +(65, 26, 1) 21 +(65, 27, 1) 22 +(65, 28, 1) 23 +(65, 29, 1) 24 +(65, 30, 1) 24 +(65, 31, 1) 25 +(65, 32, 1) 26 +(65, 33, 1) 27 +(65, 34, 1) 28 +(65, 35, 1) 28 +(65, 36, 1) 29 +(65, 37, 1) 30 +(65, 38, 1) 30 +(65, 39, 1) 31 +(65, 40, 1) 32 +(65, 41, 1) 32 +(65, 42, 1) 33 +(65, 43, 1) 33 +(65, 44, 1) 34 +(65, 45, 1) 34 +(65, 46, 1) 34 +(65, 47, 1) 35 +(65, 48, 1) 35 +(65, 49, 1) 35 +(65, 50, 1) 35 +(65, 51, 1) 35 +(65, 52, 1) 35 +(65, 53, 1) 35 +(65, 54, 1) 35 +(65, 55, 1) 34 +(65, 56, 1) 34 +(65, 57, 1) 34 +(65, 58, 1) 33 +(65, 59, 1) 33 +(65, 60, 1) 32 +(65, 61, 1) 32 +(65, 62, 1) 31 +(65, 63, 1) 30 +(65, 64, 1) 30 +(65, 65, 1) 29 +(65, 66, 1) 28 +(65, 67, 1) 28 +(65, 68, 1) 27 +(65, 69, 1) 26 +(65, 70, 1) 25 +(65, 71, 1) 24 +(65, 72, 1) 24 +(65, 73, 1) 23 +(65, 74, 1) 22 +(65, 75, 1) 21 +(65, 76, 1) 20 +(65, 77, 1) 19 +(65, 78, 1) 19 +(65, 79, 1) 18 +(65, 80, 1) 17 +(65, 81, 1) 16 +(65, 82, 1) 15 +(65, 83, 1) 14 +(65, 84, 1) 13 +(65, 85, 1) 12 +(65, 86, 1) 11 +(65, 87, 1) 10 +(65, 88, 1) 9 +(65, 89, 1) 8 +(65, 90, 1) 8 +(65, 91, 1) 7 +(65, 92, 1) 6 +(65, 93, 1) 5 +(65, 94, 1) 4 +(65, 95, 1) 3 +(65, 96, 1) 2 +(65, 97, 1) 1 +(66, 6, 1) 3 +(66, 7, 1) 4 +(66, 8, 1) 5 +(66, 9, 1) 6 +(66, 10, 1) 6 +(66, 11, 1) 7 +(66, 12, 1) 8 +(66, 13, 1) 9 +(66, 14, 1) 10 +(66, 15, 1) 11 +(66, 16, 1) 12 +(66, 17, 1) 13 +(66, 18, 1) 14 +(66, 19, 1) 15 +(66, 20, 1) 16 +(66, 21, 1) 16 +(66, 22, 1) 17 +(66, 23, 1) 18 +(66, 24, 1) 19 +(66, 25, 1) 20 +(66, 26, 1) 21 +(66, 27, 1) 21 +(66, 28, 1) 22 +(66, 29, 1) 23 +(66, 30, 1) 24 +(66, 31, 1) 25 +(66, 32, 1) 25 +(66, 33, 1) 26 +(66, 34, 1) 27 +(66, 35, 1) 28 +(66, 36, 1) 28 +(66, 37, 1) 29 +(66, 38, 1) 30 +(66, 39, 1) 30 +(66, 40, 1) 31 +(66, 41, 1) 31 +(66, 42, 1) 32 +(66, 43, 1) 32 +(66, 44, 1) 33 +(66, 45, 1) 33 +(66, 46, 1) 33 +(66, 47, 1) 34 +(66, 48, 1) 34 +(66, 49, 1) 34 +(66, 50, 1) 34 +(66, 51, 1) 34 +(66, 52, 1) 34 +(66, 53, 1) 34 +(66, 54, 1) 34 +(66, 55, 1) 33 +(66, 56, 1) 33 +(66, 57, 1) 33 +(66, 58, 1) 32 +(66, 59, 1) 32 +(66, 60, 1) 31 +(66, 61, 1) 31 +(66, 62, 1) 30 +(66, 63, 1) 30 +(66, 64, 1) 29 +(66, 65, 1) 28 +(66, 66, 1) 28 +(66, 67, 1) 27 +(66, 68, 1) 26 +(66, 69, 1) 25 +(66, 70, 1) 25 +(66, 71, 1) 24 +(66, 72, 1) 23 +(66, 73, 1) 22 +(66, 74, 1) 21 +(66, 75, 1) 21 +(66, 76, 1) 20 +(66, 77, 1) 19 +(66, 78, 1) 18 +(66, 79, 1) 17 +(66, 80, 1) 16 +(66, 81, 1) 16 +(66, 82, 1) 15 +(66, 83, 1) 14 +(66, 84, 1) 13 +(66, 85, 1) 12 +(66, 86, 1) 11 +(66, 87, 1) 10 +(66, 88, 1) 9 +(66, 89, 1) 8 +(66, 90, 1) 7 +(66, 91, 1) 6 +(66, 92, 1) 6 +(66, 93, 1) 5 +(66, 94, 1) 4 +(66, 95, 1) 3 +(67, 6, 1) 2 +(67, 7, 1) 3 +(67, 8, 1) 4 +(67, 9, 1) 5 +(67, 10, 1) 6 +(67, 11, 1) 7 +(67, 12, 1) 8 +(67, 13, 1) 9 +(67, 14, 1) 10 +(67, 15, 1) 11 +(67, 16, 1) 11 +(67, 17, 1) 12 +(67, 18, 1) 13 +(67, 19, 1) 14 +(67, 20, 1) 15 +(67, 21, 1) 16 +(67, 22, 1) 17 +(67, 23, 1) 18 +(67, 24, 1) 18 +(67, 25, 1) 19 +(67, 26, 1) 20 +(67, 27, 1) 21 +(67, 28, 1) 22 +(67, 29, 1) 23 +(67, 30, 1) 23 +(67, 31, 1) 24 +(67, 32, 1) 25 +(67, 33, 1) 26 +(67, 34, 1) 26 +(67, 35, 1) 27 +(67, 36, 1) 28 +(67, 37, 1) 28 +(67, 38, 1) 29 +(67, 39, 1) 29 +(67, 40, 1) 30 +(67, 41, 1) 30 +(67, 42, 1) 31 +(67, 43, 1) 31 +(67, 44, 1) 32 +(67, 45, 1) 32 +(67, 46, 1) 32 +(67, 47, 1) 33 +(67, 48, 1) 33 +(67, 49, 1) 33 +(67, 50, 1) 33 +(67, 51, 1) 33 +(67, 52, 1) 33 +(67, 53, 1) 33 +(67, 54, 1) 33 +(67, 55, 1) 32 +(67, 56, 1) 32 +(67, 57, 1) 32 +(67, 58, 1) 31 +(67, 59, 1) 31 +(67, 60, 1) 30 +(67, 61, 1) 30 +(67, 62, 1) 29 +(67, 63, 1) 29 +(67, 64, 1) 28 +(67, 65, 1) 28 +(67, 66, 1) 27 +(67, 67, 1) 26 +(67, 68, 1) 26 +(67, 69, 1) 25 +(67, 70, 1) 24 +(67, 71, 1) 23 +(67, 72, 1) 23 +(67, 73, 1) 22 +(67, 74, 1) 21 +(67, 75, 1) 20 +(67, 76, 1) 19 +(67, 77, 1) 18 +(67, 78, 1) 18 +(67, 79, 1) 17 +(67, 80, 1) 16 +(67, 81, 1) 15 +(67, 82, 1) 14 +(67, 83, 1) 13 +(67, 84, 1) 12 +(67, 85, 1) 11 +(67, 86, 1) 11 +(67, 87, 1) 10 +(67, 88, 1) 9 +(67, 89, 1) 8 +(67, 90, 1) 7 +(67, 91, 1) 6 +(67, 92, 1) 5 +(67, 93, 1) 4 +(67, 94, 1) 3 +(67, 95, 1) 2 +(68, 6, 1) 2 +(68, 7, 1) 3 +(68, 8, 1) 4 +(68, 9, 1) 5 +(68, 10, 1) 6 +(68, 11, 1) 7 +(68, 12, 1) 7 +(68, 13, 1) 8 +(68, 14, 1) 9 +(68, 15, 1) 10 +(68, 16, 1) 11 +(68, 17, 1) 12 +(68, 18, 1) 13 +(68, 19, 1) 14 +(68, 20, 1) 15 +(68, 21, 1) 15 +(68, 22, 1) 16 +(68, 23, 1) 17 +(68, 24, 1) 18 +(68, 25, 1) 19 +(68, 26, 1) 20 +(68, 27, 1) 20 +(68, 28, 1) 21 +(68, 29, 1) 22 +(68, 30, 1) 23 +(68, 31, 1) 23 +(68, 32, 1) 24 +(68, 33, 1) 25 +(68, 34, 1) 26 +(68, 35, 1) 26 +(68, 36, 1) 27 +(68, 37, 1) 27 +(68, 38, 1) 28 +(68, 39, 1) 29 +(68, 40, 1) 29 +(68, 41, 1) 30 +(68, 42, 1) 30 +(68, 43, 1) 30 +(68, 44, 1) 31 +(68, 45, 1) 31 +(68, 46, 1) 31 +(68, 47, 1) 32 +(68, 48, 1) 32 +(68, 49, 1) 32 +(68, 50, 1) 32 +(68, 51, 1) 32 +(68, 52, 1) 32 +(68, 53, 1) 32 +(68, 54, 1) 32 +(68, 55, 1) 31 +(68, 56, 1) 31 +(68, 57, 1) 31 +(68, 58, 1) 30 +(68, 59, 1) 30 +(68, 60, 1) 30 +(68, 61, 1) 29 +(68, 62, 1) 29 +(68, 63, 1) 28 +(68, 64, 1) 27 +(68, 65, 1) 27 +(68, 66, 1) 26 +(68, 67, 1) 26 +(68, 68, 1) 25 +(68, 69, 1) 24 +(68, 70, 1) 23 +(68, 71, 1) 23 +(68, 72, 1) 22 +(68, 73, 1) 21 +(68, 74, 1) 20 +(68, 75, 1) 20 +(68, 76, 1) 19 +(68, 77, 1) 18 +(68, 78, 1) 17 +(68, 79, 1) 16 +(68, 80, 1) 15 +(68, 81, 1) 15 +(68, 82, 1) 14 +(68, 83, 1) 13 +(68, 84, 1) 12 +(68, 85, 1) 11 +(68, 86, 1) 10 +(68, 87, 1) 9 +(68, 88, 1) 8 +(68, 89, 1) 7 +(68, 90, 1) 7 +(68, 91, 1) 6 +(68, 92, 1) 5 +(68, 93, 1) 4 +(68, 94, 1) 3 +(68, 95, 1) 2 +(69, 6, 1) 2 +(69, 7, 1) 2 +(69, 8, 1) 3 +(69, 9, 1) 4 +(69, 10, 1) 5 +(69, 11, 1) 6 +(69, 12, 1) 7 +(69, 13, 1) 8 +(69, 14, 1) 9 +(69, 15, 1) 10 +(69, 16, 1) 11 +(69, 17, 1) 11 +(69, 18, 1) 12 +(69, 19, 1) 13 +(69, 20, 1) 14 +(69, 21, 1) 15 +(69, 22, 1) 16 +(69, 23, 1) 17 +(69, 24, 1) 17 +(69, 25, 1) 18 +(69, 26, 1) 19 +(69, 27, 1) 20 +(69, 28, 1) 20 +(69, 29, 1) 21 +(69, 30, 1) 22 +(69, 31, 1) 23 +(69, 32, 1) 23 +(69, 33, 1) 24 +(69, 34, 1) 25 +(69, 35, 1) 25 +(69, 36, 1) 26 +(69, 37, 1) 27 +(69, 38, 1) 27 +(69, 39, 1) 28 +(69, 40, 1) 28 +(69, 41, 1) 29 +(69, 42, 1) 29 +(69, 43, 1) 30 +(69, 44, 1) 30 +(69, 45, 1) 30 +(69, 46, 1) 30 +(69, 47, 1) 31 +(69, 48, 1) 31 +(69, 49, 1) 31 +(69, 50, 1) 31 +(69, 51, 1) 31 +(69, 52, 1) 31 +(69, 53, 1) 31 +(69, 54, 1) 31 +(69, 55, 1) 30 +(69, 56, 1) 30 +(69, 57, 1) 30 +(69, 58, 1) 30 +(69, 59, 1) 29 +(69, 60, 1) 29 +(69, 61, 1) 28 +(69, 62, 1) 28 +(69, 63, 1) 27 +(69, 64, 1) 27 +(69, 65, 1) 26 +(69, 66, 1) 25 +(69, 67, 1) 25 +(69, 68, 1) 24 +(69, 69, 1) 23 +(69, 70, 1) 23 +(69, 71, 1) 22 +(69, 72, 1) 21 +(69, 73, 1) 20 +(69, 74, 1) 20 +(69, 75, 1) 19 +(69, 76, 1) 18 +(69, 77, 1) 17 +(69, 78, 1) 17 +(69, 79, 1) 16 +(69, 80, 1) 15 +(69, 81, 1) 14 +(69, 82, 1) 13 +(69, 83, 1) 12 +(69, 84, 1) 11 +(69, 85, 1) 11 +(69, 86, 1) 10 +(69, 87, 1) 9 +(69, 88, 1) 8 +(69, 89, 1) 7 +(69, 90, 1) 6 +(69, 91, 1) 5 +(69, 92, 1) 4 +(69, 93, 1) 3 +(69, 94, 1) 2 +(69, 95, 1) 2 +(70, 6, 1) 1 +(70, 7, 1) 2 +(70, 8, 1) 3 +(70, 9, 1) 4 +(70, 10, 1) 5 +(70, 11, 1) 6 +(70, 12, 1) 7 +(70, 13, 1) 7 +(70, 14, 1) 8 +(70, 15, 1) 9 +(70, 16, 1) 10 +(70, 17, 1) 11 +(70, 18, 1) 12 +(70, 19, 1) 13 +(70, 20, 1) 13 +(70, 21, 1) 14 +(70, 22, 1) 15 +(70, 23, 1) 16 +(70, 24, 1) 17 +(70, 25, 1) 18 +(70, 26, 1) 18 +(70, 27, 1) 19 +(70, 28, 1) 20 +(70, 29, 1) 21 +(70, 30, 1) 21 +(70, 31, 1) 22 +(70, 32, 1) 23 +(70, 33, 1) 23 +(70, 34, 1) 24 +(70, 35, 1) 25 +(70, 36, 1) 25 +(70, 37, 1) 26 +(70, 38, 1) 26 +(70, 39, 1) 27 +(70, 40, 1) 27 +(70, 41, 1) 28 +(70, 42, 1) 28 +(70, 43, 1) 29 +(70, 44, 1) 29 +(70, 45, 1) 29 +(70, 46, 1) 30 +(70, 47, 1) 30 +(70, 48, 1) 30 +(70, 49, 1) 30 +(70, 50, 1) 30 +(70, 51, 1) 30 +(70, 52, 1) 30 +(70, 53, 1) 30 +(70, 54, 1) 30 +(70, 55, 1) 30 +(70, 56, 1) 29 +(70, 57, 1) 29 +(70, 58, 1) 29 +(70, 59, 1) 28 +(70, 60, 1) 28 +(70, 61, 1) 27 +(70, 62, 1) 27 +(70, 63, 1) 26 +(70, 64, 1) 26 +(70, 65, 1) 25 +(70, 66, 1) 25 +(70, 67, 1) 24 +(70, 68, 1) 23 +(70, 69, 1) 23 +(70, 70, 1) 22 +(70, 71, 1) 21 +(70, 72, 1) 21 +(70, 73, 1) 20 +(70, 74, 1) 19 +(70, 75, 1) 18 +(70, 76, 1) 18 +(70, 77, 1) 17 +(70, 78, 1) 16 +(70, 79, 1) 15 +(70, 80, 1) 14 +(70, 81, 1) 13 +(70, 82, 1) 13 +(70, 83, 1) 12 +(70, 84, 1) 11 +(70, 85, 1) 10 +(70, 86, 1) 9 +(70, 87, 1) 8 +(70, 88, 1) 7 +(70, 89, 1) 7 +(70, 90, 1) 6 +(70, 91, 1) 5 +(70, 92, 1) 4 +(70, 93, 1) 3 +(70, 94, 1) 2 +(70, 95, 1) 1 +(71, 6, 1) 1 +(71, 7, 1) 2 +(71, 8, 1) 3 +(71, 9, 1) 4 +(71, 10, 1) 5 +(71, 11, 1) 5 +(71, 12, 1) 6 +(71, 13, 1) 7 +(71, 14, 1) 8 +(71, 15, 1) 9 +(71, 16, 1) 10 +(71, 17, 1) 11 +(71, 18, 1) 11 +(71, 19, 1) 12 +(71, 20, 1) 13 +(71, 21, 1) 14 +(71, 22, 1) 15 +(71, 23, 1) 15 +(71, 24, 1) 16 +(71, 25, 1) 17 +(71, 26, 1) 18 +(71, 27, 1) 19 +(71, 28, 1) 19 +(71, 29, 1) 20 +(71, 30, 1) 21 +(71, 31, 1) 21 +(71, 32, 1) 22 +(71, 33, 1) 23 +(71, 34, 1) 23 +(71, 35, 1) 24 +(71, 36, 1) 24 +(71, 37, 1) 25 +(71, 38, 1) 26 +(71, 39, 1) 26 +(71, 40, 1) 27 +(71, 41, 1) 27 +(71, 42, 1) 27 +(71, 43, 1) 28 +(71, 44, 1) 28 +(71, 45, 1) 28 +(71, 46, 1) 29 +(71, 47, 1) 29 +(71, 48, 1) 29 +(71, 49, 1) 29 +(71, 50, 1) 29 +(71, 51, 1) 29 +(71, 52, 1) 29 +(71, 53, 1) 29 +(71, 54, 1) 29 +(71, 55, 1) 29 +(71, 56, 1) 28 +(71, 57, 1) 28 +(71, 58, 1) 28 +(71, 59, 1) 27 +(71, 60, 1) 27 +(71, 61, 1) 27 +(71, 62, 1) 26 +(71, 63, 1) 26 +(71, 64, 1) 25 +(71, 65, 1) 24 +(71, 66, 1) 24 +(71, 67, 1) 23 +(71, 68, 1) 23 +(71, 69, 1) 22 +(71, 70, 1) 21 +(71, 71, 1) 21 +(71, 72, 1) 20 +(71, 73, 1) 19 +(71, 74, 1) 19 +(71, 75, 1) 18 +(71, 76, 1) 17 +(71, 77, 1) 16 +(71, 78, 1) 15 +(71, 79, 1) 15 +(71, 80, 1) 14 +(71, 81, 1) 13 +(71, 82, 1) 12 +(71, 83, 1) 11 +(71, 84, 1) 11 +(71, 85, 1) 10 +(71, 86, 1) 9 +(71, 87, 1) 8 +(71, 88, 1) 7 +(71, 89, 1) 6 +(71, 90, 1) 5 +(71, 91, 1) 5 +(71, 92, 1) 4 +(71, 93, 1) 3 +(71, 94, 1) 2 +(71, 95, 1) 1 +(72, 6, 1) 1 +(72, 7, 1) 1 +(72, 8, 1) 2 +(72, 9, 1) 3 +(72, 10, 1) 4 +(72, 11, 1) 5 +(72, 12, 1) 6 +(72, 13, 1) 7 +(72, 14, 1) 7 +(72, 15, 1) 8 +(72, 16, 1) 9 +(72, 17, 1) 10 +(72, 18, 1) 11 +(72, 19, 1) 12 +(72, 20, 1) 12 +(72, 21, 1) 13 +(72, 22, 1) 14 +(72, 23, 1) 15 +(72, 24, 1) 16 +(72, 25, 1) 16 +(72, 26, 1) 17 +(72, 27, 1) 18 +(72, 28, 1) 19 +(72, 29, 1) 19 +(72, 30, 1) 20 +(72, 31, 1) 21 +(72, 32, 1) 21 +(72, 33, 1) 22 +(72, 34, 1) 23 +(72, 35, 1) 23 +(72, 36, 1) 24 +(72, 37, 1) 24 +(72, 38, 1) 25 +(72, 39, 1) 25 +(72, 40, 1) 26 +(72, 41, 1) 26 +(72, 42, 1) 26 +(72, 43, 1) 27 +(72, 44, 1) 27 +(72, 45, 1) 27 +(72, 46, 1) 28 +(72, 47, 1) 28 +(72, 48, 1) 28 +(72, 49, 1) 28 +(72, 50, 1) 28 +(72, 51, 1) 28 +(72, 52, 1) 28 +(72, 53, 1) 28 +(72, 54, 1) 28 +(72, 55, 1) 28 +(72, 56, 1) 27 +(72, 57, 1) 27 +(72, 58, 1) 27 +(72, 59, 1) 26 +(72, 60, 1) 26 +(72, 61, 1) 26 +(72, 62, 1) 25 +(72, 63, 1) 25 +(72, 64, 1) 24 +(72, 65, 1) 24 +(72, 66, 1) 23 +(72, 67, 1) 23 +(72, 68, 1) 22 +(72, 69, 1) 21 +(72, 70, 1) 21 +(72, 71, 1) 20 +(72, 72, 1) 19 +(72, 73, 1) 19 +(72, 74, 1) 18 +(72, 75, 1) 17 +(72, 76, 1) 16 +(72, 77, 1) 16 +(72, 78, 1) 15 +(72, 79, 1) 14 +(72, 80, 1) 13 +(72, 81, 1) 12 +(72, 82, 1) 12 +(72, 83, 1) 11 +(72, 84, 1) 10 +(72, 85, 1) 9 +(72, 86, 1) 8 +(72, 87, 1) 7 +(72, 88, 1) 7 +(72, 89, 1) 6 +(72, 90, 1) 5 +(72, 91, 1) 4 +(72, 92, 1) 3 +(72, 93, 1) 2 +(72, 94, 1) 1 +(72, 95, 1) 1 +(73, 6, 1) 0 +(73, 7, 1) 1 +(73, 8, 1) 2 +(73, 9, 1) 3 +(73, 10, 1) 4 +(73, 11, 1) 4 +(73, 12, 1) 5 +(73, 13, 1) 6 +(73, 14, 1) 7 +(73, 15, 1) 8 +(73, 16, 1) 9 +(73, 17, 1) 9 +(73, 18, 1) 10 +(73, 19, 1) 11 +(73, 20, 1) 12 +(73, 21, 1) 13 +(73, 22, 1) 13 +(73, 23, 1) 14 +(73, 24, 1) 15 +(73, 25, 1) 16 +(73, 26, 1) 16 +(73, 27, 1) 17 +(73, 28, 1) 18 +(73, 29, 1) 19 +(73, 30, 1) 19 +(73, 31, 1) 20 +(73, 32, 1) 20 +(73, 33, 1) 21 +(73, 34, 1) 22 +(73, 35, 1) 22 +(73, 36, 1) 23 +(73, 37, 1) 23 +(73, 38, 1) 24 +(73, 39, 1) 24 +(73, 40, 1) 25 +(73, 41, 1) 25 +(73, 42, 1) 25 +(73, 43, 1) 26 +(73, 44, 1) 26 +(73, 45, 1) 26 +(73, 46, 1) 27 +(73, 47, 1) 27 +(73, 48, 1) 27 +(73, 49, 1) 27 +(73, 50, 1) 27 +(73, 51, 1) 27 +(73, 52, 1) 27 +(73, 53, 1) 27 +(73, 54, 1) 27 +(73, 55, 1) 27 +(73, 56, 1) 26 +(73, 57, 1) 26 +(73, 58, 1) 26 +(73, 59, 1) 25 +(73, 60, 1) 25 +(73, 61, 1) 25 +(73, 62, 1) 24 +(73, 63, 1) 24 +(73, 64, 1) 23 +(73, 65, 1) 23 +(73, 66, 1) 22 +(73, 67, 1) 22 +(73, 68, 1) 21 +(73, 69, 1) 20 +(73, 70, 1) 20 +(73, 71, 1) 19 +(73, 72, 1) 19 +(73, 73, 1) 18 +(73, 74, 1) 17 +(73, 75, 1) 16 +(73, 76, 1) 16 +(73, 77, 1) 15 +(73, 78, 1) 14 +(73, 79, 1) 13 +(73, 80, 1) 13 +(73, 81, 1) 12 +(73, 82, 1) 11 +(73, 83, 1) 10 +(73, 84, 1) 9 +(73, 85, 1) 9 +(73, 86, 1) 8 +(73, 87, 1) 7 +(73, 88, 1) 6 +(73, 89, 1) 5 +(73, 90, 1) 4 +(73, 91, 1) 4 +(73, 92, 1) 3 +(73, 93, 1) 2 +(73, 94, 1) 1 +(73, 95, 1) 0 +(74, 6, 1) 0 +(74, 7, 1) 0 +(74, 8, 1) 1 +(74, 9, 1) 2 +(74, 10, 1) 3 +(74, 11, 1) 4 +(74, 12, 1) 5 +(74, 13, 1) 6 +(74, 14, 1) 6 +(74, 15, 1) 7 +(74, 16, 1) 8 +(74, 17, 1) 9 +(74, 18, 1) 10 +(74, 19, 1) 10 +(74, 20, 1) 11 +(74, 21, 1) 12 +(74, 22, 1) 13 +(74, 23, 1) 14 +(74, 24, 1) 14 +(74, 25, 1) 15 +(74, 26, 1) 16 +(74, 27, 1) 16 +(74, 28, 1) 17 +(74, 29, 1) 18 +(74, 30, 1) 18 +(74, 31, 1) 19 +(74, 32, 1) 20 +(74, 33, 1) 20 +(74, 34, 1) 21 +(74, 35, 1) 21 +(74, 36, 1) 22 +(74, 37, 1) 22 +(74, 38, 1) 23 +(74, 39, 1) 23 +(74, 40, 1) 24 +(74, 41, 1) 24 +(74, 42, 1) 25 +(74, 43, 1) 25 +(74, 44, 1) 25 +(74, 45, 1) 25 +(74, 46, 1) 26 +(74, 47, 1) 26 +(74, 48, 1) 26 +(74, 49, 1) 26 +(74, 50, 1) 26 +(74, 51, 1) 26 +(74, 52, 1) 26 +(74, 53, 1) 26 +(74, 54, 1) 26 +(74, 55, 1) 26 +(74, 56, 1) 25 +(74, 57, 1) 25 +(74, 58, 1) 25 +(74, 59, 1) 25 +(74, 60, 1) 24 +(74, 61, 1) 24 +(74, 62, 1) 23 +(74, 63, 1) 23 +(74, 64, 1) 22 +(74, 65, 1) 22 +(74, 66, 1) 21 +(74, 67, 1) 21 +(74, 68, 1) 20 +(74, 69, 1) 20 +(74, 70, 1) 19 +(74, 71, 1) 18 +(74, 72, 1) 18 +(74, 73, 1) 17 +(74, 74, 1) 16 +(74, 75, 1) 16 +(74, 76, 1) 15 +(74, 77, 1) 14 +(74, 78, 1) 14 +(74, 79, 1) 13 +(74, 80, 1) 12 +(74, 81, 1) 11 +(74, 82, 1) 10 +(74, 83, 1) 10 +(74, 84, 1) 9 +(74, 85, 1) 8 +(74, 86, 1) 7 +(74, 87, 1) 6 +(74, 88, 1) 6 +(74, 89, 1) 5 +(74, 90, 1) 4 +(74, 91, 1) 3 +(74, 92, 1) 2 +(74, 93, 1) 1 +(74, 94, 1) 0 +(74, 95, 1) 0 +(75, 6, 1) 0 +(75, 7, 1) 0 +(75, 8, 1) 1 +(75, 9, 1) 2 +(75, 10, 1) 3 +(75, 11, 1) 3 +(75, 12, 1) 4 +(75, 13, 1) 5 +(75, 14, 1) 6 +(75, 15, 1) 7 +(75, 16, 1) 7 +(75, 17, 1) 8 +(75, 18, 1) 9 +(75, 19, 1) 10 +(75, 20, 1) 11 +(75, 21, 1) 11 +(75, 22, 1) 12 +(75, 23, 1) 13 +(75, 24, 1) 14 +(75, 25, 1) 14 +(75, 26, 1) 15 +(75, 27, 1) 16 +(75, 28, 1) 16 +(75, 29, 1) 17 +(75, 30, 1) 18 +(75, 31, 1) 18 +(75, 32, 1) 19 +(75, 33, 1) 19 +(75, 34, 1) 20 +(75, 35, 1) 21 +(75, 36, 1) 21 +(75, 37, 1) 22 +(75, 38, 1) 22 +(75, 39, 1) 22 +(75, 40, 1) 23 +(75, 41, 1) 23 +(75, 42, 1) 24 +(75, 43, 1) 24 +(75, 44, 1) 24 +(75, 45, 1) 24 +(75, 46, 1) 25 +(75, 47, 1) 25 +(75, 48, 1) 25 +(75, 49, 1) 25 +(75, 50, 1) 25 +(75, 51, 1) 25 +(75, 52, 1) 25 +(75, 53, 1) 25 +(75, 54, 1) 25 +(75, 55, 1) 25 +(75, 56, 1) 24 +(75, 57, 1) 24 +(75, 58, 1) 24 +(75, 59, 1) 24 +(75, 60, 1) 23 +(75, 61, 1) 23 +(75, 62, 1) 22 +(75, 63, 1) 22 +(75, 64, 1) 22 +(75, 65, 1) 21 +(75, 66, 1) 21 +(75, 67, 1) 20 +(75, 68, 1) 19 +(75, 69, 1) 19 +(75, 70, 1) 18 +(75, 71, 1) 18 +(75, 72, 1) 17 +(75, 73, 1) 16 +(75, 74, 1) 16 +(75, 75, 1) 15 +(75, 76, 1) 14 +(75, 77, 1) 14 +(75, 78, 1) 13 +(75, 79, 1) 12 +(75, 80, 1) 11 +(75, 81, 1) 11 +(75, 82, 1) 10 +(75, 83, 1) 9 +(75, 84, 1) 8 +(75, 85, 1) 7 +(75, 86, 1) 7 +(75, 87, 1) 6 +(75, 88, 1) 5 +(75, 89, 1) 4 +(75, 90, 1) 3 +(75, 91, 1) 3 +(75, 92, 1) 2 +(75, 93, 1) 1 +(75, 94, 1) 0 +(75, 95, 1) 0 +(76, 9, 1) 1 +(76, 10, 1) 2 +(76, 11, 1) 3 +(76, 12, 1) 4 +(76, 13, 1) 5 +(76, 14, 1) 5 +(76, 15, 1) 6 +(76, 16, 1) 7 +(76, 17, 1) 8 +(76, 18, 1) 9 +(76, 19, 1) 9 +(76, 20, 1) 10 +(76, 21, 1) 11 +(76, 22, 1) 12 +(76, 23, 1) 12 +(76, 24, 1) 13 +(76, 25, 1) 14 +(76, 26, 1) 14 +(76, 27, 1) 15 +(76, 28, 1) 16 +(76, 29, 1) 16 +(76, 30, 1) 17 +(76, 31, 1) 18 +(76, 32, 1) 18 +(76, 33, 1) 19 +(76, 34, 1) 19 +(76, 35, 1) 20 +(76, 36, 1) 20 +(76, 37, 1) 21 +(76, 38, 1) 21 +(76, 39, 1) 22 +(76, 40, 1) 22 +(76, 41, 1) 22 +(76, 42, 1) 23 +(76, 43, 1) 23 +(76, 44, 1) 23 +(76, 45, 1) 23 +(76, 46, 1) 24 +(76, 47, 1) 24 +(76, 48, 1) 24 +(76, 49, 1) 24 +(76, 50, 1) 24 +(76, 51, 1) 24 +(76, 52, 1) 24 +(76, 53, 1) 24 +(76, 54, 1) 24 +(76, 55, 1) 24 +(76, 56, 1) 23 +(76, 57, 1) 23 +(76, 58, 1) 23 +(76, 59, 1) 23 +(76, 60, 1) 22 +(76, 61, 1) 22 +(76, 62, 1) 22 +(76, 63, 1) 21 +(76, 64, 1) 21 +(76, 65, 1) 20 +(76, 66, 1) 20 +(76, 67, 1) 19 +(76, 68, 1) 19 +(76, 69, 1) 18 +(76, 70, 1) 18 +(76, 71, 1) 17 +(76, 72, 1) 16 +(76, 73, 1) 16 +(76, 74, 1) 15 +(76, 75, 1) 14 +(76, 76, 1) 14 +(76, 77, 1) 13 +(76, 78, 1) 12 +(76, 79, 1) 12 +(76, 80, 1) 11 +(76, 81, 1) 10 +(76, 82, 1) 9 +(76, 83, 1) 9 +(76, 84, 1) 8 +(76, 85, 1) 7 +(76, 86, 1) 6 +(76, 87, 1) 5 +(76, 88, 1) 5 +(76, 89, 1) 4 +(76, 90, 1) 3 +(76, 91, 1) 2 +(76, 92, 1) 1 +(77, 9, 1) 1 +(77, 10, 1) 2 +(77, 11, 1) 2 +(77, 12, 1) 3 +(77, 13, 1) 4 +(77, 14, 1) 5 +(77, 15, 1) 6 +(77, 16, 1) 6 +(77, 17, 1) 7 +(77, 18, 1) 8 +(77, 19, 1) 9 +(77, 20, 1) 9 +(77, 21, 1) 10 +(77, 22, 1) 11 +(77, 23, 1) 12 +(77, 24, 1) 12 +(77, 25, 1) 13 +(77, 26, 1) 14 +(77, 27, 1) 14 +(77, 28, 1) 15 +(77, 29, 1) 16 +(77, 30, 1) 16 +(77, 31, 1) 17 +(77, 32, 1) 17 +(77, 33, 1) 18 +(77, 34, 1) 18 +(77, 35, 1) 19 +(77, 36, 1) 19 +(77, 37, 1) 20 +(77, 38, 1) 20 +(77, 39, 1) 21 +(77, 40, 1) 21 +(77, 41, 1) 21 +(77, 42, 1) 22 +(77, 43, 1) 22 +(77, 44, 1) 22 +(77, 45, 1) 22 +(77, 46, 1) 23 +(77, 47, 1) 23 +(77, 48, 1) 23 +(77, 49, 1) 23 +(77, 50, 1) 23 +(77, 51, 1) 23 +(77, 52, 1) 23 +(77, 53, 1) 23 +(77, 54, 1) 23 +(77, 55, 1) 23 +(77, 56, 1) 22 +(77, 57, 1) 22 +(77, 58, 1) 22 +(77, 59, 1) 22 +(77, 60, 1) 21 +(77, 61, 1) 21 +(77, 62, 1) 21 +(77, 63, 1) 20 +(77, 64, 1) 20 +(77, 65, 1) 19 +(77, 66, 1) 19 +(77, 67, 1) 18 +(77, 68, 1) 18 +(77, 69, 1) 17 +(77, 70, 1) 17 +(77, 71, 1) 16 +(77, 72, 1) 16 +(77, 73, 1) 15 +(77, 74, 1) 14 +(77, 75, 1) 14 +(77, 76, 1) 13 +(77, 77, 1) 12 +(77, 78, 1) 12 +(77, 79, 1) 11 +(77, 80, 1) 10 +(77, 81, 1) 9 +(77, 82, 1) 9 +(77, 83, 1) 8 +(77, 84, 1) 7 +(77, 85, 1) 6 +(77, 86, 1) 6 +(77, 87, 1) 5 +(77, 88, 1) 4 +(77, 89, 1) 3 +(77, 90, 1) 2 +(77, 91, 1) 2 +(77, 92, 1) 1 +(78, 9, 1) 0 +(78, 10, 1) 1 +(78, 11, 1) 2 +(78, 12, 1) 3 +(78, 13, 1) 3 +(78, 14, 1) 4 +(78, 15, 1) 5 +(78, 16, 1) 6 +(78, 17, 1) 7 +(78, 18, 1) 7 +(78, 19, 1) 8 +(78, 20, 1) 9 +(78, 21, 1) 9 +(78, 22, 1) 10 +(78, 23, 1) 11 +(78, 24, 1) 12 +(78, 25, 1) 12 +(78, 26, 1) 13 +(78, 27, 1) 14 +(78, 28, 1) 14 +(78, 29, 1) 15 +(78, 30, 1) 15 +(78, 31, 1) 16 +(78, 32, 1) 17 +(78, 33, 1) 17 +(78, 34, 1) 18 +(78, 35, 1) 18 +(78, 36, 1) 19 +(78, 37, 1) 19 +(78, 38, 1) 19 +(78, 39, 1) 20 +(78, 40, 1) 20 +(78, 41, 1) 20 +(78, 42, 1) 21 +(78, 43, 1) 21 +(78, 44, 1) 21 +(78, 45, 1) 21 +(78, 46, 1) 22 +(78, 47, 1) 22 +(78, 48, 1) 22 +(78, 49, 1) 22 +(78, 50, 1) 22 +(78, 51, 1) 22 +(78, 52, 1) 22 +(78, 53, 1) 22 +(78, 54, 1) 22 +(78, 55, 1) 22 +(78, 56, 1) 21 +(78, 57, 1) 21 +(78, 58, 1) 21 +(78, 59, 1) 21 +(78, 60, 1) 20 +(78, 61, 1) 20 +(78, 62, 1) 20 +(78, 63, 1) 19 +(78, 64, 1) 19 +(78, 65, 1) 19 +(78, 66, 1) 18 +(78, 67, 1) 18 +(78, 68, 1) 17 +(78, 69, 1) 17 +(78, 70, 1) 16 +(78, 71, 1) 15 +(78, 72, 1) 15 +(78, 73, 1) 14 +(78, 74, 1) 14 +(78, 75, 1) 13 +(78, 76, 1) 12 +(78, 77, 1) 12 +(78, 78, 1) 11 +(78, 79, 1) 10 +(78, 80, 1) 9 +(78, 81, 1) 9 +(78, 82, 1) 8 +(78, 83, 1) 7 +(78, 84, 1) 7 +(78, 85, 1) 6 +(78, 86, 1) 5 +(78, 87, 1) 4 +(78, 88, 1) 3 +(78, 89, 1) 3 +(78, 90, 1) 2 +(78, 91, 1) 1 +(78, 92, 1) 0 +(79, 9, 1) 0 +(79, 10, 1) 1 +(79, 11, 1) 1 +(79, 12, 1) 2 +(79, 13, 1) 3 +(79, 14, 1) 4 +(79, 15, 1) 4 +(79, 16, 1) 5 +(79, 17, 1) 6 +(79, 18, 1) 7 +(79, 19, 1) 7 +(79, 20, 1) 8 +(79, 21, 1) 9 +(79, 22, 1) 9 +(79, 23, 1) 10 +(79, 24, 1) 11 +(79, 25, 1) 12 +(79, 26, 1) 12 +(79, 27, 1) 13 +(79, 28, 1) 13 +(79, 29, 1) 14 +(79, 30, 1) 15 +(79, 31, 1) 15 +(79, 32, 1) 16 +(79, 33, 1) 16 +(79, 34, 1) 17 +(79, 35, 1) 17 +(79, 36, 1) 18 +(79, 37, 1) 18 +(79, 38, 1) 18 +(79, 39, 1) 19 +(79, 40, 1) 19 +(79, 41, 1) 20 +(79, 42, 1) 20 +(79, 43, 1) 20 +(79, 44, 1) 20 +(79, 45, 1) 20 +(79, 46, 1) 21 +(79, 47, 1) 21 +(79, 48, 1) 21 +(79, 49, 1) 21 +(79, 50, 1) 21 +(79, 51, 1) 21 +(79, 52, 1) 21 +(79, 53, 1) 21 +(79, 54, 1) 21 +(79, 55, 1) 21 +(79, 56, 1) 20 +(79, 57, 1) 20 +(79, 58, 1) 20 +(79, 59, 1) 20 +(79, 60, 1) 20 +(79, 61, 1) 19 +(79, 62, 1) 19 +(79, 63, 1) 18 +(79, 64, 1) 18 +(79, 65, 1) 18 +(79, 66, 1) 17 +(79, 67, 1) 17 +(79, 68, 1) 16 +(79, 69, 1) 16 +(79, 70, 1) 15 +(79, 71, 1) 15 +(79, 72, 1) 14 +(79, 73, 1) 13 +(79, 74, 1) 13 +(79, 75, 1) 12 +(79, 76, 1) 12 +(79, 77, 1) 11 +(79, 78, 1) 10 +(79, 79, 1) 9 +(79, 80, 1) 9 +(79, 81, 1) 8 +(79, 82, 1) 7 +(79, 83, 1) 7 +(79, 84, 1) 6 +(79, 85, 1) 5 +(79, 86, 1) 4 +(79, 87, 1) 4 +(79, 88, 1) 3 +(79, 89, 1) 2 +(79, 90, 1) 1 +(79, 91, 1) 1 +(79, 92, 1) 0 +(80, 9, 1) 0 +(80, 10, 1) 0 +(80, 11, 1) 1 +(80, 12, 1) 1 +(80, 13, 1) 2 +(80, 14, 1) 3 +(80, 15, 1) 4 +(80, 16, 1) 4 +(80, 17, 1) 5 +(80, 18, 1) 6 +(80, 19, 1) 7 +(80, 20, 1) 7 +(80, 21, 1) 8 +(80, 22, 1) 9 +(80, 23, 1) 9 +(80, 24, 1) 10 +(80, 25, 1) 11 +(80, 26, 1) 11 +(80, 27, 1) 12 +(80, 28, 1) 13 +(80, 29, 1) 13 +(80, 30, 1) 14 +(80, 31, 1) 14 +(80, 32, 1) 15 +(80, 33, 1) 15 +(80, 34, 1) 16 +(80, 35, 1) 16 +(80, 36, 1) 17 +(80, 37, 1) 17 +(80, 38, 1) 18 +(80, 39, 1) 18 +(80, 40, 1) 18 +(80, 41, 1) 19 +(80, 42, 1) 19 +(80, 43, 1) 19 +(80, 44, 1) 19 +(80, 45, 1) 20 +(80, 46, 1) 20 +(80, 47, 1) 20 +(80, 48, 1) 20 +(80, 49, 1) 20 +(80, 50, 1) 20 +(80, 51, 1) 20 +(80, 52, 1) 20 +(80, 53, 1) 20 +(80, 54, 1) 20 +(80, 55, 1) 20 +(80, 56, 1) 20 +(80, 57, 1) 19 +(80, 58, 1) 19 +(80, 59, 1) 19 +(80, 60, 1) 19 +(80, 61, 1) 18 +(80, 62, 1) 18 +(80, 63, 1) 18 +(80, 64, 1) 17 +(80, 65, 1) 17 +(80, 66, 1) 16 +(80, 67, 1) 16 +(80, 68, 1) 15 +(80, 69, 1) 15 +(80, 70, 1) 14 +(80, 71, 1) 14 +(80, 72, 1) 13 +(80, 73, 1) 13 +(80, 74, 1) 12 +(80, 75, 1) 11 +(80, 76, 1) 11 +(80, 77, 1) 10 +(80, 78, 1) 9 +(80, 79, 1) 9 +(80, 80, 1) 8 +(80, 81, 1) 7 +(80, 82, 1) 7 +(80, 83, 1) 6 +(80, 84, 1) 5 +(80, 85, 1) 4 +(80, 86, 1) 4 +(80, 87, 1) 3 +(80, 88, 1) 2 +(80, 89, 1) 1 +(80, 90, 1) 1 +(80, 91, 1) 0 +(80, 92, 1) 0 +(81, 14, 1) 3 +(81, 15, 1) 3 +(81, 16, 1) 4 +(81, 17, 1) 5 +(81, 18, 1) 5 +(81, 19, 1) 6 +(81, 20, 1) 7 +(81, 21, 1) 7 +(81, 22, 1) 8 +(81, 23, 1) 9 +(81, 24, 1) 9 +(81, 25, 1) 10 +(81, 26, 1) 11 +(81, 27, 1) 11 +(81, 28, 1) 12 +(81, 29, 1) 12 +(81, 30, 1) 13 +(81, 31, 1) 14 +(81, 32, 1) 14 +(81, 33, 1) 15 +(81, 34, 1) 15 +(81, 35, 1) 15 +(81, 36, 1) 16 +(81, 37, 1) 16 +(81, 38, 1) 17 +(81, 39, 1) 17 +(81, 40, 1) 17 +(81, 41, 1) 18 +(81, 42, 1) 18 +(81, 43, 1) 18 +(81, 44, 1) 18 +(81, 45, 1) 19 +(81, 46, 1) 19 +(81, 47, 1) 19 +(81, 48, 1) 19 +(81, 49, 1) 19 +(81, 50, 1) 19 +(81, 51, 1) 19 +(81, 52, 1) 19 +(81, 53, 1) 19 +(81, 54, 1) 19 +(81, 55, 1) 19 +(81, 56, 1) 19 +(81, 57, 1) 18 +(81, 58, 1) 18 +(81, 59, 1) 18 +(81, 60, 1) 18 +(81, 61, 1) 17 +(81, 62, 1) 17 +(81, 63, 1) 17 +(81, 64, 1) 16 +(81, 65, 1) 16 +(81, 66, 1) 15 +(81, 67, 1) 15 +(81, 68, 1) 15 +(81, 69, 1) 14 +(81, 70, 1) 14 +(81, 71, 1) 13 +(81, 72, 1) 12 +(81, 73, 1) 12 +(81, 74, 1) 11 +(81, 75, 1) 11 +(81, 76, 1) 10 +(81, 77, 1) 9 +(81, 78, 1) 9 +(81, 79, 1) 8 +(81, 80, 1) 7 +(81, 81, 1) 7 +(81, 82, 1) 6 +(81, 83, 1) 5 +(81, 84, 1) 5 +(81, 85, 1) 4 +(81, 86, 1) 3 +(81, 87, 1) 3 +(82, 14, 1) 2 +(82, 15, 1) 3 +(82, 16, 1) 3 +(82, 17, 1) 4 +(82, 18, 1) 5 +(82, 19, 1) 5 +(82, 20, 1) 6 +(82, 21, 1) 7 +(82, 22, 1) 7 +(82, 23, 1) 8 +(82, 24, 1) 9 +(82, 25, 1) 9 +(82, 26, 1) 10 +(82, 27, 1) 10 +(82, 28, 1) 11 +(82, 29, 1) 12 +(82, 30, 1) 12 +(82, 31, 1) 13 +(82, 32, 1) 13 +(82, 33, 1) 14 +(82, 34, 1) 14 +(82, 35, 1) 15 +(82, 36, 1) 15 +(82, 37, 1) 15 +(82, 38, 1) 16 +(82, 39, 1) 16 +(82, 40, 1) 16 +(82, 41, 1) 17 +(82, 42, 1) 17 +(82, 43, 1) 17 +(82, 44, 1) 17 +(82, 45, 1) 18 +(82, 46, 1) 18 +(82, 47, 1) 18 +(82, 48, 1) 18 +(82, 49, 1) 18 +(82, 50, 1) 18 +(82, 51, 1) 18 +(82, 52, 1) 18 +(82, 53, 1) 18 +(82, 54, 1) 18 +(82, 55, 1) 18 +(82, 56, 1) 18 +(82, 57, 1) 17 +(82, 58, 1) 17 +(82, 59, 1) 17 +(82, 60, 1) 17 +(82, 61, 1) 16 +(82, 62, 1) 16 +(82, 63, 1) 16 +(82, 64, 1) 15 +(82, 65, 1) 15 +(82, 66, 1) 15 +(82, 67, 1) 14 +(82, 68, 1) 14 +(82, 69, 1) 13 +(82, 70, 1) 13 +(82, 71, 1) 12 +(82, 72, 1) 12 +(82, 73, 1) 11 +(82, 74, 1) 10 +(82, 75, 1) 10 +(82, 76, 1) 9 +(82, 77, 1) 9 +(82, 78, 1) 8 +(82, 79, 1) 7 +(82, 80, 1) 7 +(82, 81, 1) 6 +(82, 82, 1) 5 +(82, 83, 1) 5 +(82, 84, 1) 4 +(82, 85, 1) 3 +(82, 86, 1) 3 +(82, 87, 1) 2 +(83, 14, 1) 1 +(83, 15, 1) 2 +(83, 16, 1) 3 +(83, 17, 1) 3 +(83, 18, 1) 4 +(83, 19, 1) 5 +(83, 20, 1) 5 +(83, 21, 1) 6 +(83, 22, 1) 7 +(83, 23, 1) 7 +(83, 24, 1) 8 +(83, 25, 1) 8 +(83, 26, 1) 9 +(83, 27, 1) 10 +(83, 28, 1) 10 +(83, 29, 1) 11 +(83, 30, 1) 11 +(83, 31, 1) 12 +(83, 32, 1) 12 +(83, 33, 1) 13 +(83, 34, 1) 13 +(83, 35, 1) 14 +(83, 36, 1) 14 +(83, 37, 1) 14 +(83, 38, 1) 15 +(83, 39, 1) 15 +(83, 40, 1) 15 +(83, 41, 1) 16 +(83, 42, 1) 16 +(83, 43, 1) 16 +(83, 44, 1) 16 +(83, 45, 1) 17 +(83, 46, 1) 17 +(83, 47, 1) 17 +(83, 48, 1) 17 +(83, 49, 1) 17 +(83, 50, 1) 17 +(83, 51, 1) 17 +(83, 52, 1) 17 +(83, 53, 1) 17 +(83, 54, 1) 17 +(83, 55, 1) 17 +(83, 56, 1) 17 +(83, 57, 1) 16 +(83, 58, 1) 16 +(83, 59, 1) 16 +(83, 60, 1) 16 +(83, 61, 1) 15 +(83, 62, 1) 15 +(83, 63, 1) 15 +(83, 64, 1) 14 +(83, 65, 1) 14 +(83, 66, 1) 14 +(83, 67, 1) 13 +(83, 68, 1) 13 +(83, 69, 1) 12 +(83, 70, 1) 12 +(83, 71, 1) 11 +(83, 72, 1) 11 +(83, 73, 1) 10 +(83, 74, 1) 10 +(83, 75, 1) 9 +(83, 76, 1) 8 +(83, 77, 1) 8 +(83, 78, 1) 7 +(83, 79, 1) 7 +(83, 80, 1) 6 +(83, 81, 1) 5 +(83, 82, 1) 5 +(83, 83, 1) 4 +(83, 84, 1) 3 +(83, 85, 1) 3 +(83, 86, 1) 2 +(83, 87, 1) 1 +(84, 14, 1) 1 +(84, 15, 1) 1 +(84, 16, 1) 2 +(84, 17, 1) 3 +(84, 18, 1) 3 +(84, 19, 1) 4 +(84, 20, 1) 5 +(84, 21, 1) 5 +(84, 22, 1) 6 +(84, 23, 1) 6 +(84, 24, 1) 7 +(84, 25, 1) 8 +(84, 26, 1) 8 +(84, 27, 1) 9 +(84, 28, 1) 9 +(84, 29, 1) 10 +(84, 30, 1) 10 +(84, 31, 1) 11 +(84, 32, 1) 11 +(84, 33, 1) 12 +(84, 34, 1) 12 +(84, 35, 1) 13 +(84, 36, 1) 13 +(84, 37, 1) 13 +(84, 38, 1) 14 +(84, 39, 1) 14 +(84, 40, 1) 14 +(84, 41, 1) 15 +(84, 42, 1) 15 +(84, 43, 1) 15 +(84, 44, 1) 15 +(84, 45, 1) 16 +(84, 46, 1) 16 +(84, 47, 1) 16 +(84, 48, 1) 16 +(84, 49, 1) 16 +(84, 50, 1) 16 +(84, 51, 1) 16 +(84, 52, 1) 16 +(84, 53, 1) 16 +(84, 54, 1) 16 +(84, 55, 1) 16 +(84, 56, 1) 16 +(84, 57, 1) 15 +(84, 58, 1) 15 +(84, 59, 1) 15 +(84, 60, 1) 15 +(84, 61, 1) 14 +(84, 62, 1) 14 +(84, 63, 1) 14 +(84, 64, 1) 13 +(84, 65, 1) 13 +(84, 66, 1) 13 +(84, 67, 1) 12 +(84, 68, 1) 12 +(84, 69, 1) 11 +(84, 70, 1) 11 +(84, 71, 1) 10 +(84, 72, 1) 10 +(84, 73, 1) 9 +(84, 74, 1) 9 +(84, 75, 1) 8 +(84, 76, 1) 8 +(84, 77, 1) 7 +(84, 78, 1) 6 +(84, 79, 1) 6 +(84, 80, 1) 5 +(84, 81, 1) 5 +(84, 82, 1) 4 +(84, 83, 1) 3 +(84, 84, 1) 3 +(84, 85, 1) 2 +(84, 86, 1) 1 +(84, 87, 1) 1 +(85, 14, 1) 0 +(85, 15, 1) 1 +(85, 16, 1) 1 +(85, 17, 1) 2 +(85, 18, 1) 2 +(85, 19, 1) 3 +(85, 20, 1) 4 +(85, 21, 1) 4 +(85, 22, 1) 5 +(85, 23, 1) 6 +(85, 24, 1) 6 +(85, 25, 1) 7 +(85, 26, 1) 7 +(85, 27, 1) 8 +(85, 28, 1) 9 +(85, 29, 1) 9 +(85, 30, 1) 10 +(85, 31, 1) 10 +(85, 32, 1) 11 +(85, 33, 1) 11 +(85, 34, 1) 11 +(85, 35, 1) 12 +(85, 36, 1) 12 +(85, 37, 1) 13 +(85, 38, 1) 13 +(85, 39, 1) 13 +(85, 40, 1) 13 +(85, 41, 1) 14 +(85, 42, 1) 14 +(85, 43, 1) 14 +(85, 44, 1) 14 +(85, 45, 1) 15 +(85, 46, 1) 15 +(85, 47, 1) 15 +(85, 48, 1) 15 +(85, 49, 1) 15 +(85, 50, 1) 15 +(85, 51, 1) 15 +(85, 52, 1) 15 +(85, 53, 1) 15 +(85, 54, 1) 15 +(85, 55, 1) 15 +(85, 56, 1) 15 +(85, 57, 1) 14 +(85, 58, 1) 14 +(85, 59, 1) 14 +(85, 60, 1) 14 +(85, 61, 1) 13 +(85, 62, 1) 13 +(85, 63, 1) 13 +(85, 64, 1) 13 +(85, 65, 1) 12 +(85, 66, 1) 12 +(85, 67, 1) 11 +(85, 68, 1) 11 +(85, 69, 1) 11 +(85, 70, 1) 10 +(85, 71, 1) 10 +(85, 72, 1) 9 +(85, 73, 1) 9 +(85, 74, 1) 8 +(85, 75, 1) 7 +(85, 76, 1) 7 +(85, 77, 1) 6 +(85, 78, 1) 6 +(85, 79, 1) 5 +(85, 80, 1) 4 +(85, 81, 1) 4 +(85, 82, 1) 3 +(85, 83, 1) 2 +(85, 84, 1) 2 +(85, 85, 1) 1 +(85, 86, 1) 1 +(85, 87, 1) 0 +(86, 16, 1) 1 +(86, 17, 1) 1 +(86, 18, 1) 2 +(86, 19, 1) 3 +(86, 20, 1) 3 +(86, 21, 1) 4 +(86, 22, 1) 4 +(86, 23, 1) 5 +(86, 24, 1) 6 +(86, 25, 1) 6 +(86, 26, 1) 7 +(86, 27, 1) 7 +(86, 28, 1) 8 +(86, 29, 1) 8 +(86, 30, 1) 9 +(86, 31, 1) 9 +(86, 32, 1) 10 +(86, 33, 1) 10 +(86, 34, 1) 11 +(86, 35, 1) 11 +(86, 36, 1) 11 +(86, 37, 1) 12 +(86, 38, 1) 12 +(86, 39, 1) 12 +(86, 40, 1) 13 +(86, 41, 1) 13 +(86, 42, 1) 13 +(86, 43, 1) 13 +(86, 44, 1) 13 +(86, 45, 1) 14 +(86, 46, 1) 14 +(86, 47, 1) 14 +(86, 48, 1) 14 +(86, 49, 1) 14 +(86, 50, 1) 14 +(86, 51, 1) 14 +(86, 52, 1) 14 +(86, 53, 1) 14 +(86, 54, 1) 14 +(86, 55, 1) 14 +(86, 56, 1) 14 +(86, 57, 1) 13 +(86, 58, 1) 13 +(86, 59, 1) 13 +(86, 60, 1) 13 +(86, 61, 1) 13 +(86, 62, 1) 12 +(86, 63, 1) 12 +(86, 64, 1) 12 +(86, 65, 1) 11 +(86, 66, 1) 11 +(86, 67, 1) 11 +(86, 68, 1) 10 +(86, 69, 1) 10 +(86, 70, 1) 9 +(86, 71, 1) 9 +(86, 72, 1) 8 +(86, 73, 1) 8 +(86, 74, 1) 7 +(86, 75, 1) 7 +(86, 76, 1) 6 +(86, 77, 1) 6 +(86, 78, 1) 5 +(86, 79, 1) 4 +(86, 80, 1) 4 +(86, 81, 1) 3 +(86, 82, 1) 3 +(86, 83, 1) 2 +(86, 84, 1) 1 +(86, 85, 1) 1 +(87, 16, 1) 0 +(87, 17, 1) 1 +(87, 18, 1) 1 +(87, 19, 1) 2 +(87, 20, 1) 2 +(87, 21, 1) 3 +(87, 22, 1) 4 +(87, 23, 1) 4 +(87, 24, 1) 5 +(87, 25, 1) 5 +(87, 26, 1) 6 +(87, 27, 1) 6 +(87, 28, 1) 7 +(87, 29, 1) 7 +(87, 30, 1) 8 +(87, 31, 1) 8 +(87, 32, 1) 9 +(87, 33, 1) 9 +(87, 34, 1) 10 +(87, 35, 1) 10 +(87, 36, 1) 10 +(87, 37, 1) 11 +(87, 38, 1) 11 +(87, 39, 1) 11 +(87, 40, 1) 12 +(87, 41, 1) 12 +(87, 42, 1) 12 +(87, 43, 1) 12 +(87, 44, 1) 12 +(87, 45, 1) 13 +(87, 46, 1) 13 +(87, 47, 1) 13 +(87, 48, 1) 13 +(87, 49, 1) 13 +(87, 50, 1) 13 +(87, 51, 1) 13 +(87, 52, 1) 13 +(87, 53, 1) 13 +(87, 54, 1) 13 +(87, 55, 1) 13 +(87, 56, 1) 13 +(87, 57, 1) 12 +(87, 58, 1) 12 +(87, 59, 1) 12 +(87, 60, 1) 12 +(87, 61, 1) 12 +(87, 62, 1) 11 +(87, 63, 1) 11 +(87, 64, 1) 11 +(87, 65, 1) 10 +(87, 66, 1) 10 +(87, 67, 1) 10 +(87, 68, 1) 9 +(87, 69, 1) 9 +(87, 70, 1) 8 +(87, 71, 1) 8 +(87, 72, 1) 7 +(87, 73, 1) 7 +(87, 74, 1) 6 +(87, 75, 1) 6 +(87, 76, 1) 5 +(87, 77, 1) 5 +(87, 78, 1) 4 +(87, 79, 1) 4 +(87, 80, 1) 3 +(87, 81, 1) 2 +(87, 82, 1) 2 +(87, 83, 1) 1 +(87, 84, 1) 1 +(87, 85, 1) 0 +(88, 21, 1) 2 +(88, 22, 1) 3 +(88, 23, 1) 3 +(88, 24, 1) 4 +(88, 25, 1) 5 +(88, 26, 1) 5 +(88, 27, 1) 6 +(88, 28, 1) 6 +(88, 29, 1) 7 +(88, 30, 1) 7 +(88, 31, 1) 7 +(88, 32, 1) 8 +(88, 33, 1) 8 +(88, 34, 1) 9 +(88, 35, 1) 9 +(88, 36, 1) 9 +(88, 37, 1) 10 +(88, 38, 1) 10 +(88, 39, 1) 10 +(88, 40, 1) 11 +(88, 41, 1) 11 +(88, 42, 1) 11 +(88, 43, 1) 11 +(88, 44, 1) 11 +(88, 45, 1) 12 +(88, 46, 1) 12 +(88, 47, 1) 12 +(88, 48, 1) 12 +(88, 49, 1) 12 +(88, 50, 1) 12 +(88, 51, 1) 12 +(88, 52, 1) 12 +(88, 53, 1) 12 +(88, 54, 1) 12 +(88, 55, 1) 12 +(88, 56, 1) 12 +(88, 57, 1) 11 +(88, 58, 1) 11 +(88, 59, 1) 11 +(88, 60, 1) 11 +(88, 61, 1) 11 +(88, 62, 1) 10 +(88, 63, 1) 10 +(88, 64, 1) 10 +(88, 65, 1) 9 +(88, 66, 1) 9 +(88, 67, 1) 9 +(88, 68, 1) 8 +(88, 69, 1) 8 +(88, 70, 1) 7 +(88, 71, 1) 7 +(88, 72, 1) 7 +(88, 73, 1) 6 +(88, 74, 1) 6 +(88, 75, 1) 5 +(88, 76, 1) 5 +(88, 77, 1) 4 +(88, 78, 1) 3 +(88, 79, 1) 3 +(88, 80, 1) 2 +(89, 21, 1) 1 +(89, 22, 1) 2 +(89, 23, 1) 3 +(89, 24, 1) 3 +(89, 25, 1) 4 +(89, 26, 1) 4 +(89, 27, 1) 5 +(89, 28, 1) 5 +(89, 29, 1) 6 +(89, 30, 1) 6 +(89, 31, 1) 7 +(89, 32, 1) 7 +(89, 33, 1) 7 +(89, 34, 1) 8 +(89, 35, 1) 8 +(89, 36, 1) 8 +(89, 37, 1) 9 +(89, 38, 1) 9 +(89, 39, 1) 9 +(89, 40, 1) 10 +(89, 41, 1) 10 +(89, 42, 1) 10 +(89, 43, 1) 10 +(89, 44, 1) 10 +(89, 45, 1) 11 +(89, 46, 1) 11 +(89, 47, 1) 11 +(89, 48, 1) 11 +(89, 49, 1) 11 +(89, 50, 1) 11 +(89, 51, 1) 11 +(89, 52, 1) 11 +(89, 53, 1) 11 +(89, 54, 1) 11 +(89, 55, 1) 11 +(89, 56, 1) 11 +(89, 57, 1) 10 +(89, 58, 1) 10 +(89, 59, 1) 10 +(89, 60, 1) 10 +(89, 61, 1) 10 +(89, 62, 1) 9 +(89, 63, 1) 9 +(89, 64, 1) 9 +(89, 65, 1) 8 +(89, 66, 1) 8 +(89, 67, 1) 8 +(89, 68, 1) 7 +(89, 69, 1) 7 +(89, 70, 1) 7 +(89, 71, 1) 6 +(89, 72, 1) 6 +(89, 73, 1) 5 +(89, 74, 1) 5 +(89, 75, 1) 4 +(89, 76, 1) 4 +(89, 77, 1) 3 +(89, 78, 1) 3 +(89, 79, 1) 2 +(89, 80, 1) 1 +(90, 21, 1) 1 +(90, 22, 1) 1 +(90, 23, 1) 2 +(90, 24, 1) 2 +(90, 25, 1) 3 +(90, 26, 1) 3 +(90, 27, 1) 4 +(90, 28, 1) 4 +(90, 29, 1) 5 +(90, 30, 1) 5 +(90, 31, 1) 6 +(90, 32, 1) 6 +(90, 33, 1) 6 +(90, 34, 1) 7 +(90, 35, 1) 7 +(90, 36, 1) 8 +(90, 37, 1) 8 +(90, 38, 1) 8 +(90, 39, 1) 8 +(90, 40, 1) 9 +(90, 41, 1) 9 +(90, 42, 1) 9 +(90, 43, 1) 9 +(90, 44, 1) 9 +(90, 45, 1) 10 +(90, 46, 1) 10 +(90, 47, 1) 10 +(90, 48, 1) 10 +(90, 49, 1) 10 +(90, 50, 1) 10 +(90, 51, 1) 10 +(90, 52, 1) 10 +(90, 53, 1) 10 +(90, 54, 1) 10 +(90, 55, 1) 10 +(90, 56, 1) 10 +(90, 57, 1) 9 +(90, 58, 1) 9 +(90, 59, 1) 9 +(90, 60, 1) 9 +(90, 61, 1) 9 +(90, 62, 1) 8 +(90, 63, 1) 8 +(90, 64, 1) 8 +(90, 65, 1) 8 +(90, 66, 1) 7 +(90, 67, 1) 7 +(90, 68, 1) 6 +(90, 69, 1) 6 +(90, 70, 1) 6 +(90, 71, 1) 5 +(90, 72, 1) 5 +(90, 73, 1) 4 +(90, 74, 1) 4 +(90, 75, 1) 3 +(90, 76, 1) 3 +(90, 77, 1) 2 +(90, 78, 1) 2 +(90, 79, 1) 1 +(90, 80, 1) 1 +(91, 21, 1) 0 +(91, 22, 1) 1 +(91, 23, 1) 1 +(91, 24, 1) 2 +(91, 25, 1) 2 +(91, 26, 1) 3 +(91, 27, 1) 3 +(91, 28, 1) 4 +(91, 29, 1) 4 +(91, 30, 1) 4 +(91, 31, 1) 5 +(91, 32, 1) 5 +(91, 33, 1) 6 +(91, 34, 1) 6 +(91, 35, 1) 6 +(91, 36, 1) 7 +(91, 37, 1) 7 +(91, 38, 1) 7 +(91, 39, 1) 8 +(91, 40, 1) 8 +(91, 41, 1) 8 +(91, 42, 1) 8 +(91, 43, 1) 8 +(91, 44, 1) 9 +(91, 45, 1) 9 +(91, 46, 1) 9 +(91, 47, 1) 9 +(91, 48, 1) 9 +(91, 49, 1) 9 +(91, 50, 1) 9 +(91, 51, 1) 9 +(91, 52, 1) 9 +(91, 53, 1) 9 +(91, 54, 1) 9 +(91, 55, 1) 9 +(91, 56, 1) 9 +(91, 57, 1) 9 +(91, 58, 1) 8 +(91, 59, 1) 8 +(91, 60, 1) 8 +(91, 61, 1) 8 +(91, 62, 1) 8 +(91, 63, 1) 7 +(91, 64, 1) 7 +(91, 65, 1) 7 +(91, 66, 1) 6 +(91, 67, 1) 6 +(91, 68, 1) 6 +(91, 69, 1) 5 +(91, 70, 1) 5 +(91, 71, 1) 4 +(91, 72, 1) 4 +(91, 73, 1) 4 +(91, 74, 1) 3 +(91, 75, 1) 3 +(91, 76, 1) 2 +(91, 77, 1) 2 +(91, 78, 1) 1 +(91, 79, 1) 1 +(91, 80, 1) 0 +(92, 21, 1) 0 +(92, 22, 1) 0 +(92, 23, 1) 0 +(92, 24, 1) 1 +(92, 25, 1) 1 +(92, 26, 1) 2 +(92, 27, 1) 2 +(92, 28, 1) 3 +(92, 29, 1) 3 +(92, 30, 1) 4 +(92, 31, 1) 4 +(92, 32, 1) 4 +(92, 33, 1) 5 +(92, 34, 1) 5 +(92, 35, 1) 5 +(92, 36, 1) 6 +(92, 37, 1) 6 +(92, 38, 1) 6 +(92, 39, 1) 7 +(92, 40, 1) 7 +(92, 41, 1) 7 +(92, 42, 1) 7 +(92, 43, 1) 7 +(92, 44, 1) 8 +(92, 45, 1) 8 +(92, 46, 1) 8 +(92, 47, 1) 8 +(92, 48, 1) 8 +(92, 49, 1) 8 +(92, 50, 1) 8 +(92, 51, 1) 8 +(92, 52, 1) 8 +(92, 53, 1) 8 +(92, 54, 1) 8 +(92, 55, 1) 8 +(92, 56, 1) 8 +(92, 57, 1) 8 +(92, 58, 1) 7 +(92, 59, 1) 7 +(92, 60, 1) 7 +(92, 61, 1) 7 +(92, 62, 1) 7 +(92, 63, 1) 6 +(92, 64, 1) 6 +(92, 65, 1) 6 +(92, 66, 1) 5 +(92, 67, 1) 5 +(92, 68, 1) 5 +(92, 69, 1) 4 +(92, 70, 1) 4 +(92, 71, 1) 4 +(92, 72, 1) 3 +(92, 73, 1) 3 +(92, 74, 1) 2 +(92, 75, 1) 2 +(92, 76, 1) 1 +(92, 77, 1) 1 +(92, 78, 1) 0 +(92, 79, 1) 0 +(92, 80, 1) 0 +(93, 26, 1) 1 +(93, 27, 1) 1 +(93, 28, 1) 2 +(93, 29, 1) 2 +(93, 30, 1) 3 +(93, 31, 1) 3 +(93, 32, 1) 3 +(93, 33, 1) 4 +(93, 34, 1) 4 +(93, 35, 1) 4 +(93, 36, 1) 5 +(93, 37, 1) 5 +(93, 38, 1) 5 +(93, 39, 1) 6 +(93, 40, 1) 6 +(93, 41, 1) 6 +(93, 42, 1) 6 +(93, 43, 1) 6 +(93, 44, 1) 7 +(93, 45, 1) 7 +(93, 46, 1) 7 +(93, 47, 1) 7 +(93, 48, 1) 7 +(93, 49, 1) 7 +(93, 50, 1) 7 +(93, 51, 1) 7 +(93, 52, 1) 7 +(93, 53, 1) 7 +(93, 54, 1) 7 +(93, 55, 1) 7 +(93, 56, 1) 7 +(93, 57, 1) 7 +(93, 58, 1) 6 +(93, 59, 1) 6 +(93, 60, 1) 6 +(93, 61, 1) 6 +(93, 62, 1) 6 +(93, 63, 1) 5 +(93, 64, 1) 5 +(93, 65, 1) 5 +(93, 66, 1) 4 +(93, 67, 1) 4 +(93, 68, 1) 4 +(93, 69, 1) 3 +(93, 70, 1) 3 +(93, 71, 1) 3 +(93, 72, 1) 2 +(93, 73, 1) 2 +(93, 74, 1) 1 +(93, 75, 1) 1 +(94, 26, 1) 0 +(94, 27, 1) 0 +(94, 28, 1) 1 +(94, 29, 1) 1 +(94, 30, 1) 2 +(94, 31, 1) 2 +(94, 32, 1) 2 +(94, 33, 1) 3 +(94, 34, 1) 3 +(94, 35, 1) 3 +(94, 36, 1) 4 +(94, 37, 1) 4 +(94, 38, 1) 4 +(94, 39, 1) 5 +(94, 40, 1) 5 +(94, 41, 1) 5 +(94, 42, 1) 5 +(94, 43, 1) 5 +(94, 44, 1) 6 +(94, 45, 1) 6 +(94, 46, 1) 6 +(94, 47, 1) 6 +(94, 48, 1) 6 +(94, 49, 1) 6 +(94, 50, 1) 6 +(94, 51, 1) 6 +(94, 52, 1) 6 +(94, 53, 1) 6 +(94, 54, 1) 6 +(94, 55, 1) 6 +(94, 56, 1) 6 +(94, 57, 1) 6 +(94, 58, 1) 5 +(94, 59, 1) 5 +(94, 60, 1) 5 +(94, 61, 1) 5 +(94, 62, 1) 5 +(94, 63, 1) 4 +(94, 64, 1) 4 +(94, 65, 1) 4 +(94, 66, 1) 3 +(94, 67, 1) 3 +(94, 68, 1) 3 +(94, 69, 1) 2 +(94, 70, 1) 2 +(94, 71, 1) 2 +(94, 72, 1) 1 +(94, 73, 1) 1 +(94, 74, 1) 0 +(94, 75, 1) 0 +(95, 26, 1) 0 +(95, 27, 1) 0 +(95, 28, 1) 0 +(95, 29, 1) 0 +(95, 30, 1) 1 +(95, 31, 1) 1 +(95, 32, 1) 1 +(95, 33, 1) 2 +(95, 34, 1) 2 +(95, 35, 1) 3 +(95, 36, 1) 3 +(95, 37, 1) 3 +(95, 38, 1) 3 +(95, 39, 1) 4 +(95, 40, 1) 4 +(95, 41, 1) 4 +(95, 42, 1) 4 +(95, 43, 1) 4 +(95, 44, 1) 5 +(95, 45, 1) 5 +(95, 46, 1) 5 +(95, 47, 1) 5 +(95, 48, 1) 5 +(95, 49, 1) 5 +(95, 50, 1) 5 +(95, 51, 1) 5 +(95, 52, 1) 5 +(95, 53, 1) 5 +(95, 54, 1) 5 +(95, 55, 1) 5 +(95, 56, 1) 5 +(95, 57, 1) 5 +(95, 58, 1) 4 +(95, 59, 1) 4 +(95, 60, 1) 4 +(95, 61, 1) 4 +(95, 62, 1) 4 +(95, 63, 1) 3 +(95, 64, 1) 3 +(95, 65, 1) 3 +(95, 66, 1) 3 +(95, 67, 1) 2 +(95, 68, 1) 2 +(95, 69, 1) 1 +(95, 70, 1) 1 +(95, 71, 1) 1 +(95, 72, 1) 0 +(95, 73, 1) 0 +(95, 74, 1) 0 +(95, 75, 1) 0 +(96, 36, 1) 2 +(96, 37, 1) 2 +(96, 38, 1) 2 +(96, 39, 1) 3 +(96, 40, 1) 3 +(96, 41, 1) 3 +(96, 42, 1) 3 +(96, 43, 1) 3 +(96, 44, 1) 4 +(96, 45, 1) 4 +(96, 46, 1) 4 +(96, 47, 1) 4 +(96, 48, 1) 4 +(96, 49, 1) 4 +(96, 50, 1) 4 +(96, 51, 1) 4 +(96, 52, 1) 4 +(96, 53, 1) 4 +(96, 54, 1) 4 +(96, 55, 1) 4 +(96, 56, 1) 4 +(96, 57, 1) 4 +(96, 58, 1) 3 +(96, 59, 1) 3 +(96, 60, 1) 3 +(96, 61, 1) 3 +(96, 62, 1) 3 +(96, 63, 1) 2 +(96, 64, 1) 2 +(96, 65, 1) 2 +(97, 36, 1) 1 +(97, 37, 1) 1 +(97, 38, 1) 2 +(97, 39, 1) 2 +(97, 40, 1) 2 +(97, 41, 1) 2 +(97, 42, 1) 2 +(97, 43, 1) 2 +(97, 44, 1) 3 +(97, 45, 1) 3 +(97, 46, 1) 3 +(97, 47, 1) 3 +(97, 48, 1) 3 +(97, 49, 1) 3 +(97, 50, 1) 3 +(97, 51, 1) 3 +(97, 52, 1) 3 +(97, 53, 1) 3 +(97, 54, 1) 3 +(97, 55, 1) 3 +(97, 56, 1) 3 +(97, 57, 1) 3 +(97, 58, 1) 2 +(97, 59, 1) 2 +(97, 60, 1) 2 +(97, 61, 1) 2 +(97, 62, 1) 2 +(97, 63, 1) 2 +(97, 64, 1) 1 +(97, 65, 1) 1 +(98, 41, 1) 1 +(98, 42, 1) 1 +(98, 43, 1) 1 +(98, 44, 1) 2 +(98, 45, 1) 2 +(98, 46, 1) 2 +(98, 47, 1) 2 +(98, 48, 1) 2 +(98, 49, 1) 2 +(98, 50, 1) 2 +(98, 51, 1) 2 +(98, 52, 1) 2 +(98, 53, 1) 2 +(98, 54, 1) 2 +(98, 55, 1) 2 +(98, 56, 1) 2 +(98, 57, 1) 2 +(98, 58, 1) 1 +(98, 59, 1) 1 +(98, 60, 1) 1 +(99, 41, 1) 0 +(99, 42, 1) 0 +(99, 43, 1) 0 +(99, 44, 1) 1 +(99, 45, 1) 1 +(99, 46, 1) 1 +(99, 47, 1) 1 +(99, 48, 1) 1 +(99, 49, 1) 1 +(99, 50, 1) 1 +(99, 51, 1) 1 +(99, 52, 1) 1 +(99, 53, 1) 1 +(99, 54, 1) 1 +(99, 55, 1) 1 +(99, 56, 1) 1 +(99, 57, 1) 1 +(99, 58, 1) 0 +(99, 59, 1) 0 +(99, 60, 1) 0 +(100, 41, 1) 0 +(100, 42, 1) 0 +(100, 43, 1) 0 +(100, 44, 1) 0 +(100, 45, 1) 0 +(100, 46, 1) 0 +(100, 47, 1) 0 +(100, 48, 1) 0 +(100, 49, 1) 0 +(100, 50, 1) 0 +(100, 51, 1) 0 +(100, 52, 1) 0 +(100, 53, 1) 0 +(100, 54, 1) 0 +(100, 55, 1) 0 +(100, 56, 1) 0 +(100, 57, 1) 0 +(100, 58, 1) 0 +(100, 59, 1) 0 +(100, 60, 1) 0 diff --git a/EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h b/EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h new file mode 100755 index 00000000000..7862ce130d4 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h @@ -0,0 +1,92 @@ +#ifndef histoFunc_h +#define histoFunc_h + +#include "TH1.h" + + + + + + +class histoFunc +{ + public: + + + //! ctor + histoFunc(TH1F* histo) + { + histo_p = histo; + }; + + + //! dtor + ~histoFunc() + {}; + + //norm histo + double GetIntegral(){ + double nn = histo_p -> Integral(); + return(nn); + } + + //! operator() + double operator()(double* x, double* par) + { + double xx = par[1] * (x[0] - par[2]); + + double xMin = histo_p -> GetBinCenter(1); + double xMax = histo_p -> GetBinCenter(histo_p -> GetNbinsX()); + + + + if( (xx < xMin) || (xx >= xMax) ) + return 1.e-10; + + else + { + int bin = histo_p -> FindBin(xx); + int bin1 = 0; + int bin2 = 0; + + if(xx >= histo_p -> GetBinCenter(bin)) + { + bin1 = bin; + bin2 = bin+1; + } + + else + { + bin1 = bin-1; + bin2 = bin; + } + + + double x1 = histo_p -> GetBinCenter(bin1); + double y1 = histo_p -> GetBinContent(bin1); + + double x2 = histo_p -> GetBinCenter(bin2); + double y2 = histo_p -> GetBinContent(bin2); + + double m = 1. * (y2 - y1) / (x2 - x1); + + + + if( (y1 + m * (xx - x1)) < 1.e-10) + return 1.e-10; + + + return par[0] * par[1] * (y1 + m * (xx - x1)); + } + + return 1.e-10; + } + + + + private: + + TH1F* histo_p; +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/README b/EOverPCalibration/FastCalibrator/README new file mode 100644 index 00000000000..5d2d7261371 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/README @@ -0,0 +1,160 @@ +------------------------------------- +------- Intercalibration Tool ------- +------------------------------------- + +Compile the package : scramv1 b -j16 + +List of codes for intercalibration: + +1) Intercalibration on EB (Ecal Barrel) : + +Run the code: FastCalibratorEB cfg/FastCalibrator_EB_split_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu + -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC + -> inputTree = tree name + -> isMiscalib = Miscalibration 5% option + -> isSaveEPDistribution = save E/p pdf + -> isEPselection = apply E/p selection setted in the .cc + -> isR9selection = apply R9 selection > 0.9 + -> isMCTruth = use calibration E/E_{Truth} + -> outputFile = output file + -> numberOfEvents = -1 (all statistic) + -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) + -> useW = 1 (use W event) 0 (no W event in IC procedure) + -> splitStat = 1 (split odd and even event) 0 (no split) + -> nLoops = number of L3 iteration + +2) Intercalibration on EE (Ecal EndCaps) : + +Run the code: FastCalibratorEE cfg/FastCalibrator_EE_split_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu + -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC + -> inputTree = tree name + -> isMiscalib = Miscalibration 5% option + -> isSaveEPDistribution = save E/p pdf + -> isEPselection = apply E/p selection setted in the .cc + -> isR9selection = apply R9 selection > 0.9 + -> isfbrem = apply fbrem selection < 0.4 + -> isMCTruth = use calibration E/E_{Truth} + -> outputFile = output file + -> numberOfEvents = -1 (all statistic) + -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) + -> useW = 1 (use W event) 0 (no W event in IC procedure) + -> splitStat = 1 (split odd and even event) 0 (no split) + -> nLoops = number of L3 iteration + + +1b-2b) CalibrationPlots.cpp --> draw results of calibration (run it after FastCalibratorEB (EE)) + +Run the code: CalibrationPlots cfg/calibrationPlots_EB_cfg.py + + + +3) CompareSCalibMCTruth_EB.cpp --> Comaparison beetween scalib MC with the truth in EB + +Run the code: CompareSCalibMCTruth_EB.exe cfg/comparisonEB_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input MC scalib to analyse + -> fileMCTruth = MC truth IC map for EB + -> fileMCRecoIC = MC Reco IC map for EB + -> fileStatPrecision = stat precision on non scalib MC in EB + + + +4) CompareSCalibMCTruth_EE.cpp --> Comaparison beetween scalib MC with the truth in EE + +Run the code: CompareSCalibMCTruth_EE cfg/comparisonEE_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input MC scalib to analyse + -> fileMCTruth = MC truth IC map for EE + -> fileMCRecoIC = MC Reco IC map for EE + -> fileStatPrecision = stat precision on non scalib MC in EE + -> outputFile = output file for residual systematic + + + +5) CompareICSet.cpp --> compare two set of ICs taken by repository + +Run the code: CompareICSet.exe file1_IC_Set.txt file2_IC_Set.txt + + + +6) CalibrationMomentum.cpp --> study momentum scale vs phi in EB and EE + +Run the code: CalibrationMomentum cfg/calibrationMomentum_cfg.py + +Paramters to set in the cfg file: -> TreeName = name of the tree contained in each root file input + -> infileDATA = txt file with the list of .root data files + -> infileMC = txt file with the list of .root MC files + -> WeightforMC = .root file for weight MC events + -> nPhiBinsEB = number of phi bin in EB -> for data and MC dist + -> nPhiBinsEE = number of phi bin in EE -> for data and MC dist + -> nEtaBinsEB = number of eta bin in EB -> for template, data and MC dist + -> nEtaBinsEB = number of eta bin in EE -> for template, data and MC dist + -> nPhiBinsTempEB = number of phi bin in EB -> for template + -> nPhiBinsTempEE = number of phi bin in EB -> for template + -> rebinEB = rebin Template, MC and Data in EB + -> rebinEE = rebin Template, MC and Data in EE + -> outputFile = path of .root output file + + + +7) test/NormalizeIC_EE.cpp --> make normalization eta ring EE+ and EE- + +Run the code: ./bin/NormalizeIC_EE.exe cfg/NormalizeEE_cfg.cfg + +Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat + -> Inputfile2 = L3 calib output on half stat (even or odd) + -> Inputfile3 = L3 calib output on half stat (even or odd) + -> evalStat = 0 -> normalize only file1 1 -> normalize all files 1,2 and 3 + -> isMC = true -> calib mC false -> calib data + -> fileType = for plot image production + -> dirName = dir for output plots + -> printPlots = true -> print false -> no print + +Normalized map are insert in the input root file with the name h_scale_map_EEP h_scale_map_EEM + + + +##################### OBSOLETE ########## + +8) test/CalibrationBarrel.cpp --> make precision plot + normalization + momentum and crack correction in EB + make .txt IC output file + +Run the code: ./bin/CalibrationBarrel.exe cfg/calibrationEB_cfg.cfg + +Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat + -> Inputfile2 = L3 calib output on half stat (even or odd) + -> Inputfile3 = L3 calib output on half stat (even or odd) + -> inputMomentumScale = momentum scale correction + -> evalStat = 0 -> no statistical precision 1 -> stat prec + -> isMC = true -> calib mC false -> calib data + -> fileType = for plot image production + -> dirName = dir for output plots + -> printPlots = true -> print false -> no print + -> outputTxt = output IC txt file + + + + +8) test/CalibrationEndcap.cpp --> make precision plot + momentum correction + sys add in EE + make .txt IC output file + +Run the code: ./bin/CalibrationEndcap.exe cfg/calibrationEE_cfg.cfg + +Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat + -> Inputfile2 = L3 calib output on half stat (even or odd) + -> Inputfile3 = L3 calib output on half stat (even or odd) + -> inputMomentumScale = momentum scale correction + -> SystematicToAdd = file from scalib MC of the residual sys to Add + -> evalStat = 0 -> no statistical precision 1 -> stat prec + -> isMC = true -> calib mC false -> calib data + -> fileType = for plot image production + -> dirName = dir for output plots + -> printPlots = true -> print false -> no print + -> outputTxt = output IC txt file + + + \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/RMSFile.txt b/EOverPCalibration/FastCalibrator/RMSFile.txt new file mode 100644 index 00000000000..796de9b3a31 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/RMSFile.txt @@ -0,0 +1,85 @@ +1 0.00480365 +2 0.0040155 +3 0.00393103 +4 0.00397678 +5 0.00408274 +6 0.00445059 +7 0.00480351 +8 0.00478856 +9 0.00451166 +10 0.00488884 +11 0.00473805 +12 0.00433899 +13 0.0044261 +14 0.00463762 +15 0.00457602 +16 0.00489055 +17 0.00492733 +18 0.00460034 +19 0.00504573 +20 0.00496545 +21 0.00487833 +22 0.00503167 +23 0.00481444 +24 0.00478102 +25 0.00496812 +26 0.0049009 +27 0.00486267 +28 0.00470549 +29 0.00485762 +30 0.00467856 +31 0.00480772 +32 0.00507802 +33 0.00490454 +34 0.00513913 +35 0.00497808 +36 0.00517048 +37 0.00516998 +38 0.0051385 +39 0.00557952 +40 0.00587326 +41 0.00564539 +42 0.00536694 +43 0.00533608 +44 0.00588372 +45 0.00548201 +46 0.00552564 +47 0.00540657 +48 0.00507765 +49 0.00525103 +50 0.00539545 +51 0.00540359 +52 0.00590778 +53 0.00559148 +54 0.00589544 +55 0.00576401 +56 0.00568239 +57 0.00611321 +58 0.00603015 +59 0.00604824 +60 0.00587608 +61 0.0061889 +62 0.00635032 +63 0.00694852 +64 0.00695395 +65 0.00726495 +66 0.00801555 +67 0.00748724 +68 0.00731111 +69 0.00857006 +70 0.00757396 +71 0.00837833 +72 0.00816152 +73 0.00897918 +74 0.00934053 +75 0.0084456 +76 0.00907767 +77 0.00970266 +78 0.00998469 +79 0.0106416 +80 0.0116338 +81 0.0112471 +82 0.0112015 +83 0.011917 +84 0.0124452 +85 0.0189653 diff --git a/EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp b/EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp new file mode 100755 index 00000000000..64383ab9a79 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp @@ -0,0 +1,637 @@ +#include +#include +#include +#include + +#include "TChain.h" +#include "TFile.h" +#include "TTree.h" +#include "TString.h" +#include "TObjString.h" +#include "TSystem.h" +#include "TROOT.h" +#include "TApplication.h" + +#include "../../NtuplePackage/interface/ntpleUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +//#if not defined(__CINT__) || defined(__MAKECINT__) +#include "TMVA/Tools.h" +#include "TMVA/Factory.h" +#include "TMVA/Reader.h" +//#endif + +#include "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.00/x86_64-slc5-gcc46-opt/root/tmva/test/TMVARegGui.C" + + +int main(int argc, char**argv){ + + if(argc != 2){ + std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("AddRegressionWeight"); + parameterSet.reset(); + + std::string treeNameDATA = Options.getParameter("treeNameDATA"); + std::string UseMethodFlag = Options.getParameter("UseMethodFlag"); + + std::string FilemethodXML_EB_E = Options.getParameter("FilemethodXML_EB_E"); + std::string FilemethodXML_EB_P = Options.getParameter("FilemethodXML_EB_P"); + + std::string FilemethodXML_EE_E = Options.getParameter("FilemethodXML_EE_E"); + std::string FilemethodXML_EE_P = Options.getParameter("FilemethodXML_EE_P"); + + std::string RegionOfTraining = Options.getParameter("RegionOfTraining"); + std::string inputFile = Options.getParameter("inputFile"); + + bool useW = Options.getParameter("useW"); + bool isMC = Options.getParameter("isMC"); + + + TFile *File = new TFile(inputFile.c_str(),"UPDATE"); + + TTree* treeDATA = (TTree*) File->Get(treeNameDATA.c_str()); + + + float input_variables_1[1000]; + float input_variables_2[1000]; + + + double MVA_ValueZ_1,MVA_ValueZ_2, MVA_ValueW_1,MVA_ValueW_2; + + float targetW_1,targetZ_1,targetW_2,targetZ_2; + + TBranch *weightBranchW_1 = new TBranch(); + TBranch *weightBranchW_2 = new TBranch(); + TBranch *weightBranchZ_1 = new TBranch(); + TBranch *weightBranchZ_2 = new TBranch(); + TBranch *btargetW_1 = new TBranch(); + TBranch *btargetZ_1 = new TBranch(); + TBranch *btargetW_2 = new TBranch(); + TBranch *btargetZ_2 = new TBranch(); + + + + if(RegionOfTraining=="EB"){ + + + TMVA::Reader *TMVAreader_1 = new TMVA::Reader( "!Color:!Silent" ); + TMVA::Reader *TMVAreader_2 = new TMVA::Reader( "!Color:!Silent" ); + + int ele1_isEB,isW; + float ele1_eRegrInput_nPV,ele1_eRegrInput_r9,ele1_fbrem,ele1_eta,ele1_DphiIn,ele1_DetaIn,ele1_sigmaIetaIeta, ele1_E_true, ele1_scE, ele1_tkP,ele1_eRegrInput_etaW,ele1_eRegrInput_phiW,ele1_scERaw; + + + TMVAreader_1->AddVariable("ele1_scE/ele1_scERaw",&input_variables_1[0]); + TMVAreader_1->AddVariable("ele1_eRegrInput_nPV",&input_variables_1[1]); + TMVAreader_1->AddVariable("ele1_eRegrInput_r9",&input_variables_1[2]); + TMVAreader_1->AddVariable("ele1_fbrem",&input_variables_1[3]); + TMVAreader_1->AddVariable("ele1_eta",&input_variables_1[4]); + TMVAreader_1->AddVariable("ele1_DphiIn",&input_variables_1[5]); + TMVAreader_1->AddVariable("ele1_DetaIn",&input_variables_1[6]); + TMVAreader_1->AddVariable("ele1_sigmaIetaIeta", &input_variables_1[7]); + TMVAreader_1->AddVariable("ele1_eRegrInput_etaW",&input_variables_1[8]); + TMVAreader_1->AddVariable("ele1_eRegrInput_phiW", &input_variables_1[9]); + + TMVAreader_2->AddVariable("ele1_scE/ele1_scERaw",&input_variables_2[0]); + TMVAreader_2->AddVariable("ele1_eRegrInput_nPV",&input_variables_2[1]); + TMVAreader_2->AddVariable("ele1_eRegrInput_r9",&input_variables_2[2]); + TMVAreader_2->AddVariable("ele1_fbrem",&input_variables_2[3]); + TMVAreader_2->AddVariable("ele1_eta",&input_variables_2[4]); + TMVAreader_2->AddVariable("ele1_DphiIn",&input_variables_2[5]); + TMVAreader_2->AddVariable("ele1_DetaIn",&input_variables_2[6]); + TMVAreader_2->AddVariable("ele1_sigmaIetaIeta", &input_variables_2[7]); + TMVAreader_2->AddVariable("ele1_eRegrInput_etaW",&input_variables_2[8]); + TMVAreader_2->AddVariable("ele1_eRegrInput_phiW", &input_variables_2[9]); + + + treeDATA -> SetBranchAddress("ele1_isEB", &ele1_isEB); + treeDATA -> SetBranchAddress("isW", &isW); + treeDATA -> SetBranchAddress("ele1_scE", &ele1_scE); + treeDATA -> SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeDATA -> SetBranchAddress("ele1_tkP", &ele1_tkP); + treeDATA -> SetBranchAddress("ele1_eRegrInput_nPV", &ele1_eRegrInput_nPV); + treeDATA -> SetBranchAddress("ele1_eRegrInput_r9", &ele1_eRegrInput_r9); + treeDATA -> SetBranchAddress("ele1_fbrem", &ele1_fbrem); + treeDATA -> SetBranchAddress("ele1_eta", &ele1_eta); + treeDATA -> SetBranchAddress("ele1_DphiIn", &ele1_DphiIn); + treeDATA -> SetBranchAddress("ele1_DetaIn", &ele1_DetaIn); + treeDATA -> SetBranchAddress("ele1_sigmaIetaIeta", &ele1_sigmaIetaIeta); + treeDATA -> SetBranchAddress("ele1_eRegrInput_etaW", &ele1_eRegrInput_etaW); + treeDATA -> SetBranchAddress("ele1_eRegrInput_phiW", &ele1_eRegrInput_phiW); + + if(isMC == true) treeDATA -> SetBranchAddress("ele1_E_true", &ele1_E_true); + + + float ele1_eRegrInput_bCE_Over_sCE,ele1_eRegrInput_sigietaieta_bC1,ele1_eRegrInput_sigiphiiphi_bC1,ele1_eRegrInput_sigietaiphi_bC1,ele1_eRegrInput_e3x3_Over_bCE,ele1_eRegrInput_Deta_bC_sC,ele1_eRegrInput_Dphi_bC_sC,ele1_eRegrInput_bEMax_Over_bCE; + + + TMVAreader_1->AddVariable("ele1_eRegrInput_bCE_Over_sCE",&input_variables_1[10]); + TMVAreader_1->AddVariable("ele1_eRegrInput_sigietaieta_bC1",&input_variables_1[11]); + TMVAreader_1->AddVariable("ele1_eRegrInput_sigiphiiphi_bC1",&input_variables_1[12]); + TMVAreader_1->AddVariable("ele1_eRegrInput_sigietaiphi_bC1",&input_variables_1[13]); + TMVAreader_1->AddVariable("ele1_eRegrInput_e3x3_Over_bCE", &input_variables_1[14]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Deta_bC_sC", &input_variables_1[15]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Dphi_bC_sC", &input_variables_1[16]); + TMVAreader_1->AddVariable("ele1_eRegrInput_bEMax_Over_bCE", &input_variables_1[17]); + + TMVAreader_2->AddVariable("ele1_eRegrInput_bCE_Over_sCE",&input_variables_2[10]); + TMVAreader_2->AddVariable("ele1_eRegrInput_sigietaieta_bC1",&input_variables_2[11]); + TMVAreader_2->AddVariable("ele1_eRegrInput_sigiphiiphi_bC1",&input_variables_2[12]); + TMVAreader_2->AddVariable("ele1_eRegrInput_sigietaiphi_bC1",&input_variables_2[13]); + TMVAreader_2->AddVariable("ele1_eRegrInput_e3x3_Over_bCE", &input_variables_2[14]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Deta_bC_sC", &input_variables_2[15]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Dphi_bC_sC", &input_variables_2[16]); + TMVAreader_2->AddVariable("ele1_eRegrInput_bEMax_Over_bCE", &input_variables_2[17]); + + + treeDATA -> SetBranchAddress("ele1_eRegrInput_bCE_Over_sCE", &ele1_eRegrInput_bCE_Over_sCE); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaieta_bC1", &ele1_eRegrInput_sigietaieta_bC1); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigiphiiphi_bC1", &ele1_eRegrInput_sigiphiiphi_bC1); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaiphi_bC1", &ele1_eRegrInput_sigietaiphi_bC1); + treeDATA -> SetBranchAddress("ele1_eRegrInput_e3x3_Over_bCE", &ele1_eRegrInput_e3x3_Over_bCE); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Deta_bC_sC", &ele1_eRegrInput_Deta_bC_sC); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Dphi_bC_sC", &ele1_eRegrInput_Dphi_bC_sC); + treeDATA -> SetBranchAddress("ele1_eRegrInput_bEMax_Over_bCE", &ele1_eRegrInput_bEMax_Over_bCE); + + + float ele1_dxy_PV,ele1_dz_PV,ele1_sigmaP; + + TMVAreader_1->AddVariable( "ele1_dxy_PV" , &input_variables_1[18]); + TMVAreader_1->AddVariable( "ele1_dz_PV" , &input_variables_1[19]); + TMVAreader_1->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_1[20]); + + TMVAreader_2->AddVariable( "ele1_dxy_PV" , &input_variables_2[18]); + TMVAreader_2->AddVariable( "ele1_dz_PV" , &input_variables_2[19]); + TMVAreader_2->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_2[20]); + + + treeDATA -> SetBranchAddress("ele1_dxy_PV", &ele1_dxy_PV); + treeDATA -> SetBranchAddress("ele1_dz_PV", &ele1_dz_PV); + treeDATA -> SetBranchAddress("ele1_sigmaP", &ele1_sigmaP); + + float ele1_eRegrInput_bCELow_Over_sCE,ele1_eRegrInput_sigietaieta_bCLow,ele1_eRegrInput_sigiphiiphi_bCLow,ele1_eRegrInput_sigietaiphi_bCLow,ele1_eRegrInput_e3x3_Over_bCELow,ele1_eRegrInput_Deta_bCLow_sC,ele1_eRegrInput_Dphi_bCLow_sC; + + TMVAreader_1->AddVariable("ele1_eRegrInput_bCELow_Over_sCE",&input_variables_1[21]); + TMVAreader_1->AddVariable("ele1_eRegrInput_e3x3_Over_bCELow", &input_variables_1[22]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Deta_bCLow_sC", &input_variables_1[23]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Dphi_bCLow_sC", &input_variables_1[24]); + + + TMVAreader_2->AddVariable("ele1_eRegrInput_bCELow_Over_sCE",&input_variables_2[21]); + TMVAreader_2->AddVariable("ele1_eRegrInput_e3x3_Over_bCELow", &input_variables_2[22]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Deta_bCLow_sC", &input_variables_2[23]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Dphi_bCLow_sC", &input_variables_2[24]); + + treeDATA -> SetBranchAddress("ele1_eRegrInput_bCELow_Over_sCE", &ele1_eRegrInput_bCELow_Over_sCE); + treeDATA -> SetBranchAddress("ele1_eRegrInput_e3x3_Over_bCELow", &ele1_eRegrInput_e3x3_Over_bCELow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaieta_bCLow", &ele1_eRegrInput_sigietaieta_bCLow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigiphiiphi_bCLow", &ele1_eRegrInput_sigiphiiphi_bCLow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaiphi_bCLow", &ele1_eRegrInput_sigietaiphi_bCLow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Deta_bCLow_sC", &ele1_eRegrInput_Deta_bCLow_sC); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Dphi_bCLow_sC", &ele1_eRegrInput_Dphi_bCLow_sC); + + float ele1_eRegrInput_seedbC_etacry,ele1_eRegrInput_seedbC_phicry; + + TMVAreader_1->AddVariable("ele1_eRegrInput_seedbC_etacry", &input_variables_1[25]); + TMVAreader_1->AddVariable("ele1_eRegrInput_seedbC_phicry", &input_variables_1[26]); + TMVAreader_2->AddVariable("ele1_eRegrInput_seedbC_etacry", &input_variables_2[25]); + TMVAreader_2->AddVariable("ele1_eRegrInput_seedbC_phicry", &input_variables_2[26]); + + + treeDATA -> SetBranchAddress("ele1_eRegrInput_seedbC_etacry", &ele1_eRegrInput_seedbC_etacry); + treeDATA -> SetBranchAddress("ele1_eRegrInput_seedbC_phicry", &ele1_eRegrInput_seedbC_phicry); + + + ///==== add new branches ==== + TString weightfile_1 = FilemethodXML_EB_E; + TString weightfile_2 = FilemethodXML_EB_P; + + std::cout<<" UseMethodFlag "<BookMVA( UseMethodFlag, weightfile_1 ); + TMVAreader_2->BookMVA( UseMethodFlag, weightfile_2 ); + + TString methodName4TreeW_1 = Form ("%s_weightEB_W_1",UseMethodFlag.c_str()); + TString methodName4TreeZ_1 = Form ("%s_weightEB_Z_1",UseMethodFlag.c_str()); + TString methodName4TreeW_1_ = Form ("%s_weightEB_W_1/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_1_ = Form ("%s_weightEB_Z_1/D",UseMethodFlag.c_str()); + + TString methodName4TreeW_2 = Form ("%s_weightEB_W_2",UseMethodFlag.c_str()); + TString methodName4TreeZ_2 = Form ("%s_weightEB_Z_2",UseMethodFlag.c_str()); + TString methodName4TreeW_2_ = Form ("%s_weightEB_W_2/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_2_ = Form ("%s_weightEB_Z_2/D",UseMethodFlag.c_str()); + + TString methodtargetW_1; + TString methodtargetZ_1; + TString methodtargetW_1_; + TString methodtargetZ_1_; + TString methodtargetW_2; + TString methodtargetZ_2; + TString methodtargetW_2_; + TString methodtargetZ_2_; + + if(isMC == true){ + + methodtargetW_1 = Form ("%s_targetEB_W_1",UseMethodFlag.c_str()); + methodtargetZ_1 = Form ("%s_targetEB_Z_1",UseMethodFlag.c_str()); + methodtargetW_1_= Form ("%s_targetEB_W_1/F",UseMethodFlag.c_str()); + methodtargetZ_1_= Form ("%s_targetEB_Z_1/F",UseMethodFlag.c_str()); + + methodtargetW_2 = Form ("%s_targetEB_W_2",UseMethodFlag.c_str()); + methodtargetZ_2 = Form ("%s_targetEB_Z_2",UseMethodFlag.c_str()); + methodtargetW_2_= Form ("%s_targetEB_W_2/F",UseMethodFlag.c_str()); + methodtargetZ_2_= Form ("%s_targetEB_Z_2/F",UseMethodFlag.c_str()); + + } + + if(useW) { + weightBranchW_1 = treeDATA->Branch(methodName4TreeW_1,&MVA_ValueW_1,methodName4TreeW_1_); + weightBranchW_2 = treeDATA->Branch(methodName4TreeW_2,&MVA_ValueW_2,methodName4TreeW_2_); + if(isMC == true){ + btargetW_1 = treeDATA->Branch(methodtargetW_1,&targetW_1,methodtargetW_1); + btargetW_2 = treeDATA->Branch(methodtargetW_2,&targetW_2,methodtargetW_2); } + } + + if(!useW){ + weightBranchZ_1 = treeDATA->Branch(methodName4TreeZ_1,&MVA_ValueZ_1,methodName4TreeZ_1); + weightBranchZ_2 = treeDATA->Branch(methodName4TreeZ_2,&MVA_ValueZ_2,methodName4TreeZ_2); + + if(isMC == true){ btargetZ_1 = treeDATA->Branch(methodtargetZ_1,&targetZ_1,methodtargetZ_1); + btargetZ_2 = treeDATA->Branch(methodtargetZ_2,&targetZ_2,methodtargetZ_2); } + } + + ///==== loop ==== + Long64_t nentries = treeDATA->GetEntries(); + + for (Long64_t iEntry = 0; iEntry < nentries; iEntry++){ + if((iEntry%100000) == 0) std::cout << ">>>>> analysis::GetEntry " << iEntry << " : " << nentries << std::endl; + + treeDATA->GetEntry(iEntry); + + if(ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0. && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && + ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && + abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2){ + + input_variables_1[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_1[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_1[2] = static_cast(ele1_eRegrInput_r9); + input_variables_1[3] = static_cast(ele1_fbrem); + input_variables_1[4] = static_cast(ele1_eta); + input_variables_1[5] = static_cast(ele1_DphiIn); + input_variables_1[6] = static_cast(ele1_DetaIn); + input_variables_1[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_1[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_1[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_1[10] = static_cast(ele1_eRegrInput_bCE_Over_sCE); + input_variables_1[11] = static_cast(ele1_eRegrInput_sigietaieta_bC1); + input_variables_1[12] = static_cast(ele1_eRegrInput_sigiphiiphi_bC1); + input_variables_1[13] = static_cast(ele1_eRegrInput_sigietaiphi_bC1); + input_variables_1[14] = static_cast(ele1_eRegrInput_e3x3_Over_bCE); + input_variables_1[15] = static_cast(ele1_eRegrInput_Deta_bC_sC); + input_variables_1[16] = static_cast(ele1_eRegrInput_Dphi_bC_sC); + input_variables_1[17] = static_cast(ele1_eRegrInput_bEMax_Over_bCE); + input_variables_1[18] = static_cast(ele1_dxy_PV); + input_variables_1[19] = static_cast(ele1_dz_PV); + input_variables_1[29] = static_cast(ele1_sigmaP/ele1_tkP); + input_variables_1[21] = static_cast(ele1_eRegrInput_bCELow_Over_sCE); + input_variables_1[22] = static_cast(ele1_eRegrInput_e3x3_Over_bCELow); + input_variables_1[23] = static_cast(ele1_eRegrInput_Deta_bCLow_sC); + input_variables_1[24] = static_cast(ele1_eRegrInput_Dphi_bCLow_sC); + input_variables_1[25] = static_cast(ele1_eRegrInput_seedbC_etacry); + input_variables_1[26] = static_cast(ele1_eRegrInput_seedbC_phicry); + + + input_variables_2[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_2[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_2[2] = static_cast(ele1_eRegrInput_r9); + input_variables_2[3] = static_cast(ele1_fbrem); + input_variables_2[4] = static_cast(ele1_eta); + input_variables_2[5] = static_cast(ele1_DphiIn); + input_variables_2[6] = static_cast(ele1_DetaIn); + input_variables_2[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_2[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_2[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_2[10] = static_cast(ele1_eRegrInput_bCE_Over_sCE); + input_variables_2[11] = static_cast(ele1_eRegrInput_sigietaieta_bC1); + input_variables_2[12] = static_cast(ele1_eRegrInput_sigiphiiphi_bC1); + input_variables_2[13] = static_cast(ele1_eRegrInput_sigietaiphi_bC1); + input_variables_2[14] = static_cast(ele1_eRegrInput_e3x3_Over_bCE); + input_variables_2[15] = static_cast(ele1_eRegrInput_Deta_bC_sC); + input_variables_2[16] = static_cast(ele1_eRegrInput_Dphi_bC_sC); + input_variables_2[17] = static_cast(ele1_eRegrInput_bEMax_Over_bCE); + input_variables_2[18] = static_cast(ele1_dxy_PV); + input_variables_2[19] = static_cast(ele1_dz_PV); + input_variables_2[29] = static_cast(ele1_sigmaP/ele1_tkP); + input_variables_2[21] = static_cast(ele1_eRegrInput_bCELow_Over_sCE); + input_variables_2[22] = static_cast(ele1_eRegrInput_e3x3_Over_bCELow); + input_variables_2[23] = static_cast(ele1_eRegrInput_Deta_bCLow_sC); + input_variables_2[24] = static_cast(ele1_eRegrInput_Dphi_bCLow_sC); + input_variables_2[25] = static_cast(ele1_eRegrInput_seedbC_etacry); + input_variables_2[26] = static_cast(ele1_eRegrInput_seedbC_phicry); + + + if(useW){ + + MVA_ValueW_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag); + MVA_ValueW_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag); + + + if(isMC == true) { + targetW_1 = ele1_scE/ele1_E_true; + targetW_2 = ele1_tkP/ele1_E_true; + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); + + } + + if(!useW){ + + MVA_ValueZ_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag); + MVA_ValueZ_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag); + + if(isMC == true) { + targetZ_1 = ele1_scE/ele1_E_true; + targetZ_2 = ele1_tkP/ele1_E_true; + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + else{ + if( useW == true){ + MVA_ValueW_1 = -99. ; MVA_ValueW_2 = -99.; + if(isMC == true) { + targetW_1 = -99. ; targetW_2=-99. ; + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); + } + + if( useW == false){ + MVA_ValueZ_1 = -99.; MVA_ValueZ_2 = -99.; + if(isMC == true) { + targetZ_1 = -99. ; targetZ_2=-99. ; + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + } + } + +if(RegionOfTraining=="EE"){ + + TMVA::Reader *TMVAreader_1 = new TMVA::Reader( "!Color:!Silent" ); + TMVA::Reader *TMVAreader_2 = new TMVA::Reader( "!Color:!Silent" ); + + + int ele1_isEB,isW; + float ele1_eRegrInput_nPV,ele1_eRegrInput_r9,ele1_fbrem,ele1_eta,ele1_DphiIn,ele1_DetaIn,ele1_sigmaIetaIeta, ele1_E_true, ele1_scE, ele1_tkP,ele1_eRegrInput_etaW,ele1_eRegrInput_phiW,ele1_scERaw; + + + TMVAreader_1->AddVariable("ele1_scE/ele1_scERaw",&input_variables_1[0]); + TMVAreader_1->AddVariable("ele1_eRegrInput_nPV",&input_variables_1[1]); + TMVAreader_1->AddVariable("ele1_eRegrInput_r9",&input_variables_1[2]); + TMVAreader_1->AddVariable("ele1_fbrem",&input_variables_1[3]); + TMVAreader_1->AddVariable("ele1_eta",&input_variables_1[4]); + TMVAreader_1->AddVariable("ele1_DphiIn",&input_variables_1[5]); + TMVAreader_1->AddVariable("ele1_DetaIn",&input_variables_1[6]); + TMVAreader_1->AddVariable("ele1_sigmaIetaIeta", &input_variables_1[7]); + TMVAreader_1->AddVariable("ele1_eRegrInput_etaW",&input_variables_1[8]); + TMVAreader_1->AddVariable("ele1_eRegrInput_phiW", &input_variables_1[9]); + + + TMVAreader_2->AddVariable("ele1_scE/ele1_scERaw",&input_variables_2[0]); + TMVAreader_2->AddVariable("ele1_eRegrInput_nPV",&input_variables_2[1]); + TMVAreader_2->AddVariable("ele1_eRegrInput_r9",&input_variables_2[2]); + TMVAreader_2->AddVariable("ele1_fbrem",&input_variables_2[3]); + TMVAreader_2->AddVariable("ele1_eta",&input_variables_2[4]); + TMVAreader_2->AddVariable("ele1_DphiIn",&input_variables_2[5]); + TMVAreader_2->AddVariable("ele1_DetaIn",&input_variables_2[6]); + TMVAreader_2->AddVariable("ele1_sigmaIetaIeta", &input_variables_2[7]); + TMVAreader_2->AddVariable("ele1_eRegrInput_etaW",&input_variables_2[8]); + TMVAreader_2->AddVariable("ele1_eRegrInput_phiW", &input_variables_2[9]); + + + treeDATA -> SetBranchAddress("ele1_isEB", &ele1_isEB); + treeDATA -> SetBranchAddress("isW", &isW); + + if(isMC == true) treeDATA -> SetBranchAddress("ele1_E_true", &ele1_E_true); + treeDATA -> SetBranchAddress("ele1_scE", &ele1_scE); + treeDATA -> SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeDATA -> SetBranchAddress("ele1_tkP", &ele1_tkP); + treeDATA -> SetBranchAddress("ele1_eRegrInput_nPV", &ele1_eRegrInput_nPV); + treeDATA -> SetBranchAddress("ele1_eRegrInput_r9", &ele1_eRegrInput_r9); + treeDATA -> SetBranchAddress("ele1_fbrem", &ele1_fbrem); + treeDATA -> SetBranchAddress("ele1_eta", &ele1_eta); + treeDATA -> SetBranchAddress("ele1_DphiIn", &ele1_DphiIn); + treeDATA -> SetBranchAddress("ele1_DetaIn", &ele1_DetaIn); + treeDATA -> SetBranchAddress("ele1_sigmaIetaIeta", &ele1_sigmaIetaIeta); + treeDATA -> SetBranchAddress("ele1_eRegrInput_etaW", &ele1_eRegrInput_etaW); + treeDATA -> SetBranchAddress("ele1_eRegrInput_phiW", &ele1_eRegrInput_phiW); + + + float ele1_dxy_PV,ele1_dz_PV,ele1_sigmaP; + + TMVAreader_1->AddVariable( "ele1_dxy_PV" , &input_variables_1[18]); + TMVAreader_1->AddVariable( "ele1_dz_PV" , &input_variables_1[19]); + TMVAreader_1->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_1[20]); + + TMVAreader_2->AddVariable( "ele1_dxy_PV" , &input_variables_2[18]); + TMVAreader_2->AddVariable( "ele1_dz_PV" , &input_variables_2[19]); + TMVAreader_2->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_2[20]); + + treeDATA -> SetBranchAddress("ele1_dxy_PV", &ele1_dxy_PV); + treeDATA -> SetBranchAddress("ele1_dz_PV", &ele1_dz_PV); + treeDATA -> SetBranchAddress("ele1_sigmaP", &ele1_sigmaP); + + + ///==== add new branches ==== + TString weightfile_1 = FilemethodXML_EE_E; + TString weightfile_2 = FilemethodXML_EE_P; + + std::cout<<" UseMethodFlag "<BookMVA( UseMethodFlag, weightfile_1 ); + TMVAreader_2->BookMVA( UseMethodFlag, weightfile_2 ); + + TString methodName4TreeW_1 = Form ("%s_weightEE_W_1",UseMethodFlag.c_str()); + TString methodName4TreeZ_1 = Form ("%s_weightEE_Z_1",UseMethodFlag.c_str()); + TString methodName4TreeW_1_ = Form ("%s_weightEE_W_1/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_1_ = Form ("%s_weightEE_Z_1/D",UseMethodFlag.c_str()); + + TString methodName4TreeW_2 = Form ("%s_weightEE_W_2",UseMethodFlag.c_str()); + TString methodName4TreeZ_2 = Form ("%s_weightEE_Z_2",UseMethodFlag.c_str()); + TString methodName4TreeW_2_ = Form ("%s_weightEE_W_2/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_2_ = Form ("%s_weightEE_Z_2/D",UseMethodFlag.c_str()); + + TString methodtargetW_1; + TString methodtargetZ_1; + TString methodtargetW_1_; + TString methodtargetZ_1_; + TString methodtargetW_2; + TString methodtargetZ_2; + TString methodtargetW_2_; + TString methodtargetZ_2_; + + if(isMC == true){ + methodtargetW_1 = Form ("%s_targetEE_W_1",UseMethodFlag.c_str()); + methodtargetZ_1 = Form ("%s_targetEE_Z_1",UseMethodFlag.c_str()); + methodtargetW_1_= Form ("%s_targetEE_W_1/F",UseMethodFlag.c_str()); + methodtargetZ_1_= Form ("%s_targetEE_Z_1/F",UseMethodFlag.c_str()); + + methodtargetW_2 = Form ("%s_targetEE_W_2",UseMethodFlag.c_str()); + methodtargetZ_2 = Form ("%s_targetEE_Z_2",UseMethodFlag.c_str()); + methodtargetW_2_= Form ("%s_targetEE_W_2/F",UseMethodFlag.c_str()); + methodtargetZ_2_= Form ("%s_targetEE_Z_2/F",UseMethodFlag.c_str()); + } + + if(useW) { + weightBranchW_1 = treeDATA->Branch(methodName4TreeW_1,&MVA_ValueW_1,methodName4TreeW_1_); + weightBranchW_2 = treeDATA->Branch(methodName4TreeW_2,&MVA_ValueW_2,methodName4TreeW_2_); + if(isMC==true){ + btargetW_1 = treeDATA->Branch(methodtargetW_1,&targetW_1,methodtargetW_1); + btargetW_2 = treeDATA->Branch(methodtargetW_2,&targetW_2,methodtargetW_2);} + } + + if(!useW){ + weightBranchZ_1 = treeDATA->Branch(methodName4TreeZ_1,&MVA_ValueZ_1,methodName4TreeZ_1); + weightBranchZ_2 = treeDATA->Branch(methodName4TreeZ_2,&MVA_ValueZ_2,methodName4TreeZ_2); + if(isMC==true){ + btargetZ_1 = treeDATA->Branch(methodtargetZ_1,&targetZ_1,methodtargetZ_1); + btargetZ_2 = treeDATA->Branch(methodtargetZ_2,&targetZ_2,methodtargetZ_2);} + } + + ///==== loop ==== + Long64_t nentries = treeDATA->GetEntries(); + + for (Long64_t iEntry = 0; iEntry < nentries; iEntry++){ + if((iEntry%100000) == 0) std::cout << ">>>>> analysis::GetEntry " << iEntry << " : " << nentries << std::endl; + + treeDATA->GetEntry(iEntry); + + if(ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05){ + + input_variables_1[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_1[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_1[2] = static_cast(ele1_eRegrInput_r9); + input_variables_1[3] = static_cast(ele1_fbrem); + input_variables_1[4] = static_cast(ele1_eta); + input_variables_1[5] = static_cast(ele1_DphiIn); + input_variables_1[6] = static_cast(ele1_DetaIn); + input_variables_1[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_1[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_1[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_1[10] = static_cast(ele1_dxy_PV); + input_variables_1[11] = static_cast(ele1_dz_PV); + input_variables_1[12] = static_cast(ele1_sigmaP/ele1_tkP); + + input_variables_2[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_2[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_2[2] = static_cast(ele1_eRegrInput_r9); + input_variables_2[3] = static_cast(ele1_fbrem); + input_variables_2[4] = static_cast(ele1_eta); + input_variables_2[5] = static_cast(ele1_DphiIn); + input_variables_2[6] = static_cast(ele1_DetaIn); + input_variables_2[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_2[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_2[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_2[10] = static_cast(ele1_dxy_PV); + input_variables_2[11] = static_cast(ele1_dz_PV); + input_variables_2[12] = static_cast(ele1_sigmaP/ele1_tkP); + + + if(useW){ + + MVA_ValueW_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag) ; + MVA_ValueW_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag) ; + + if(isMC== true){ + targetW_1 = ele1_scE/ele1_E_true; + targetW_2 = ele1_tkP/ele1_E_true; + + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); + + } + + if(!useW){ + + MVA_ValueZ_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag) ; + MVA_ValueZ_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag) ; + + if(isMC== true){ + targetZ_1 = ele1_scE/ele1_E_true; + targetZ_2 = ele1_tkP/ele1_E_true; + + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + else{ + if( useW == true){ + MVA_ValueW_1 = -99. ; MVA_ValueW_2 = -99.; + if(isMC== true){ + targetW_1 = -99. ; targetW_2=-99. ; + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); } + + if( useW == false){ + MVA_ValueZ_1 = -99.; MVA_ValueZ_2 = -99.; + if(isMC == true){ + targetZ_1 = -99. ; targetZ_2=-99. ; + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + } + +} + + // save only the new version of the tree + treeDATA->Write("", TObject::kOverwrite); + + return 0; + +} + + + + diff --git a/EOverPCalibration/FastCalibrator/bin/BuildFile.xml b/EOverPCalibration/FastCalibrator/bin/BuildFile.xml new file mode 100644 index 00000000000..304114ca245 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/BuildFile.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp b/EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp new file mode 100644 index 00000000000..7a51e37e326 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp @@ -0,0 +1,1143 @@ +#include "../interface/TEndcapRings.h" +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../../NtuplePackage/interface/treeReader.h" +#include "../interface/CalibrationUtils.h" +#include "../CommonTools/histoFunc.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TH2.h" +#include "TCanvas.h" +#include "TProfile.h" +#include "TGraphErrors.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TChain.h" +#include "TVirtualFitter.h" +#include "TMath.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + + +bool IsEtaGap(float eta) +{ + float feta = fabs(eta); + if( fabs(feta - 0 ) < 3 ) return true; + if( fabs(feta - 25) < 3 ) return true; + if( fabs(feta - 45) < 3 ) return true; + if( fabs(feta - 65) < 3 ) return true; + if( fabs(feta - 85) < 3 ) return true; + return false; +} + + + + + + +//************** MAIN PROGRAM ************************************************************** +int main(int argc, char** argv) +{ + // Acquisition from cfg file + if(argc != 2) + { + std::cerr << ">>>>> CalibrationMomentum.cpp::usage: " << argv[0] << " configFileName" << std::endl; + return 1; + } + + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + // parameterSet.reset(); + + std::string TreeName = "NULL"; + if(Options.existsAs("TreeName")) + TreeName = Options.getParameter("TreeName"); + + std::string infileDATA = "NULL"; + if(Options.existsAs("infileDATA")) + infileDATA = Options.getParameter("infileDATA"); + + std::string infileMC = "NULL"; + if(Options.existsAs("infileMC")) + infileMC = Options.getParameter("infileMC"); + + std::string WeightforMC = "NULL"; + if(Options.existsAs("WeightforMC")) + WeightforMC = Options.getParameter("WeightforMC"); + + std::string typeEB = "NULL"; + if(Options.existsAs("typeEB")) + typeEB = Options.getParameter("typeEB"); + + std::string typeEE = "NULL"; + if(Options.existsAs("typeEE")) + typeEE = Options.getParameter("typeEE"); + + int nPhiBinsEB = 1; + if(Options.existsAs("nPhiBinsEB")) + nPhiBinsEB = Options.getParameter("nPhiBinsEB"); + + int nPhiBinsEE = 1; + if(Options.existsAs("nPhiBinsEE")) + nPhiBinsEE = Options.getParameter("nPhiBinsEE"); + + int nPhiBinsTempEB = 1; + if(Options.existsAs("nPhiBinsTempEB")) + nPhiBinsTempEB = Options.getParameter("nPhiBinsTempEB"); + + int nPhiBinsTempEE = 1; + if(Options.existsAs("nPhiBinsTempEE")) + nPhiBinsTempEE = Options.getParameter("nPhiBinsTempEE"); + + int rebinEB = 1; + if(Options.existsAs("rebinEB")) + rebinEB = Options.getParameter("rebinEB"); + + int rebinEE = 1; + if(Options.existsAs("rebinEE")) + rebinEE = Options.getParameter("rebinEE"); + + int nRegionsEB = 1; + if(Options.existsAs("nRegionsEB")) + nRegionsEB = Options.getParameter("nRegionsEB"); + + int nRegionsEE = 1; + if(Options.existsAs("nRegionsEE")) + nRegionsEE = Options.getParameter("nRegionsEE"); + + std::string outputFile = "NULL"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + bool usePUweights = false; + if(Options.existsAs("usePUweights")) + usePUweights = Options.getParameter("usePUweights"); + + cout <<" Basic Configuration " <GetNbinsX()+1; ibin++){ + w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 + } + weightsFile.Close(); + + //histos to get the bin in phi given the electron phi + TH1F* hPhiBinEB = new TH1F("hphiEB","hphiEB",nPhiBinsEB, -1.*TMath::Pi(),1.*TMath::Pi()); + TH1F* hPhiBinEE = new TH1F("hphiEE","hphiEE",nPhiBinsEE, -1.*TMath::Pi(),1.*TMath::Pi()); + + //----- NTUPLES-------------------- + TChain *ntu_DA = new TChain(TreeName.c_str()); + TChain *ntu_MC = new TChain(TreeName.c_str()); + + if(!FillChain(*ntu_DA, infileDATA.c_str())) return 1; + if(!FillChain(*ntu_MC, infileMC.c_str())) return 1; + + std::cout << " DATA: " << ntu_DA->GetEntries() << " entries in Data sample" << std::endl; + std::cout << " MC : " << ntu_MC->GetEntries() << " entries in MC sample" << std::endl; + + // observables + int isW; + float mZ; + float scEta, scPhi; + float scEta2, scPhi2; + float eleEta, elePhi; + float eleEta2, elePhi2; + float scEne, scEneReg, scEt, scERaw, e3x3, R9; + float scEne2, scEneReg2, scEt2, scERaw2, e3x32, R92; + float charge, charge2; + float pTK,pTK2; + int iphiSeed, ele1_ix, ele1_iy, ele1_iz; + int iphiSeed2, ele2_ix, ele2_iy, ele2_iz; + int npu; + + // Set branch addresses for Data + ntu_DA->SetBranchStatus("*",0); + ntu_DA->SetBranchStatus("isW", 1); ntu_DA->SetBranchAddress("isW", &isW); + ntu_DA->SetBranchStatus("ele1_eta", 1); ntu_DA->SetBranchAddress("ele1_eta", &eleEta); + ntu_DA->SetBranchStatus("ele2_eta", 1); ntu_DA->SetBranchAddress("ele2_eta", &eleEta2); + ntu_DA->SetBranchStatus("ele1_phi", 1); ntu_DA->SetBranchAddress("ele1_phi", &elePhi); + ntu_DA->SetBranchStatus("ele2_phi", 1); ntu_DA->SetBranchAddress("ele2_phi", &elePhi2); + ntu_DA->SetBranchStatus("ele1_scEta", 1); ntu_DA->SetBranchAddress("ele1_scEta", &scEta); + ntu_DA->SetBranchStatus("ele2_scEta", 1); ntu_DA->SetBranchAddress("ele2_scEta", &scEta2); + ntu_DA->SetBranchStatus("ele1_scPhi", 1); ntu_DA->SetBranchAddress("ele1_scPhi", &scPhi); + ntu_DA->SetBranchStatus("ele2_scPhi", 1); ntu_DA->SetBranchAddress("ele2_scPhi", &scPhi2); + ntu_DA->SetBranchStatus("ele1_scE", 1); ntu_DA->SetBranchAddress("ele1_scE", &scEne); + ntu_DA->SetBranchStatus("ele2_scE", 1); ntu_DA->SetBranchAddress("ele2_scE", &scEne2); + ntu_DA->SetBranchStatus("ele1_scE_regression", 1); ntu_DA->SetBranchAddress("ele1_scE_regression", &scEneReg); + ntu_DA->SetBranchStatus("ele2_scE_regression", 1); ntu_DA->SetBranchAddress("ele2_scE_regression", &scEneReg2); + ntu_DA->SetBranchStatus("ele1_scEt", 1); ntu_DA->SetBranchAddress("ele1_scEt",&scEt); + ntu_DA->SetBranchStatus("ele2_scEt", 1); ntu_DA->SetBranchAddress("ele2_scEt",&scEt2); + ntu_DA->SetBranchStatus("ele1_scERaw", 1); ntu_DA->SetBranchAddress("ele1_scERaw", &scERaw); + ntu_DA->SetBranchStatus("ele2_scERaw", 1); ntu_DA->SetBranchAddress("ele2_scERaw", &scERaw2); + ntu_DA->SetBranchStatus("ele1_e3x3", 1); ntu_DA->SetBranchAddress("ele1_e3x3", &e3x3); + ntu_DA->SetBranchStatus("ele2_e3x3", 1); ntu_DA->SetBranchAddress("ele2_e3x3", &e3x32); + ntu_DA->SetBranchStatus("ele1ele2_scM", 1); ntu_DA->SetBranchAddress("ele1ele2_scM", &mZ); + ntu_DA->SetBranchStatus("ele1_charge", 1); ntu_DA->SetBranchAddress("ele1_charge", &charge); + ntu_DA->SetBranchStatus("ele2_charge", 1); ntu_DA->SetBranchAddress("ele2_charge", &charge2); + ntu_DA->SetBranchStatus("ele1_tkP", 1); ntu_DA->SetBranchAddress("ele1_tkP", &pTK); + ntu_DA->SetBranchStatus("ele2_tkP", 1); ntu_DA->SetBranchAddress("ele2_tkP", &pTK2); + ntu_DA->SetBranchStatus("ele1_seedIphi", 1); ntu_DA->SetBranchAddress("ele1_seedIphi", &iphiSeed); + ntu_DA->SetBranchStatus("ele2_seedIphi", 1); ntu_DA->SetBranchAddress("ele2_seedIphi", &iphiSeed2); + ntu_DA->SetBranchStatus("ele1_seedIx", 1); ntu_DA->SetBranchAddress("ele1_seedIx", &ele1_ix); + ntu_DA->SetBranchStatus("ele2_seedIx", 1); ntu_DA->SetBranchAddress("ele2_seedIx", &ele2_ix); + ntu_DA->SetBranchStatus("ele1_seedIy", 1); ntu_DA->SetBranchAddress("ele1_seedIy", &ele1_iy); + ntu_DA->SetBranchStatus("ele2_seedIy", 1); ntu_DA->SetBranchAddress("ele2_seedIy", &ele2_iy); + ntu_DA->SetBranchStatus("ele1_seedZside", 1); ntu_DA->SetBranchAddress("ele1_seedZside", &ele1_iz); + ntu_DA->SetBranchStatus("ele2_seedZside", 1); ntu_DA->SetBranchAddress("ele2_seedZside", &ele2_iz); + + + // Set branch addresses for MC + ntu_MC->SetBranchStatus("*",0); + ntu_MC->SetBranchStatus("isW", 1); ntu_MC->SetBranchAddress("isW", &isW); + ntu_MC->SetBranchStatus("ele1_eta", 1); ntu_MC->SetBranchAddress("ele1_eta", &eleEta); + ntu_MC->SetBranchStatus("ele2_eta", 1); ntu_MC->SetBranchAddress("ele2_eta", &eleEta2); + ntu_MC->SetBranchStatus("ele1_phi", 1); ntu_MC->SetBranchAddress("ele1_phi", &elePhi); + ntu_MC->SetBranchStatus("ele2_phi", 1); ntu_MC->SetBranchAddress("ele2_phi", &elePhi2); + ntu_MC->SetBranchStatus("ele1_scEta", 1); ntu_MC->SetBranchAddress("ele1_scEta", &scEta); + ntu_MC->SetBranchStatus("ele2_scEta", 1); ntu_MC->SetBranchAddress("ele2_scEta", &scEta2); + ntu_MC->SetBranchStatus("ele1_scPhi", 1); ntu_MC->SetBranchAddress("ele1_scPhi", &scPhi); + ntu_MC->SetBranchStatus("ele2_scPhi", 1); ntu_MC->SetBranchAddress("ele2_scPhi", &scPhi2); + ntu_MC->SetBranchStatus("ele1_scE", 1); ntu_MC->SetBranchAddress("ele1_scE", &scEne); + ntu_MC->SetBranchStatus("ele2_scE", 1); ntu_MC->SetBranchAddress("ele2_scE", &scEne2); + ntu_MC->SetBranchStatus("ele1_scE_regression", 1); ntu_MC->SetBranchAddress("ele1_scE_regression", &scEneReg); + ntu_MC->SetBranchStatus("ele2_scE_regression", 1); ntu_MC->SetBranchAddress("ele2_scE_regression", &scEneReg2); + ntu_MC->SetBranchStatus("ele1_scEt", 1); ntu_MC->SetBranchAddress("ele1_scEt",&scEt); + ntu_MC->SetBranchStatus("ele2_scEt", 1); ntu_MC->SetBranchAddress("ele2_scEt",&scEt2); + ntu_MC->SetBranchStatus("ele1_scERaw", 1); ntu_MC->SetBranchAddress("ele1_scERaw", &scERaw); + ntu_MC->SetBranchStatus("ele2_scERaw", 1); ntu_MC->SetBranchAddress("ele2_scERaw", &scERaw2); + ntu_MC->SetBranchStatus("ele1_e3x3", 1); ntu_MC->SetBranchAddress("ele1_e3x3", &e3x3); + ntu_MC->SetBranchStatus("ele2_e3x3", 1); ntu_MC->SetBranchAddress("ele2_e3x3", &e3x32); + ntu_MC->SetBranchStatus("ele1ele2_scM", 1); ntu_MC->SetBranchAddress("ele1ele2_scM", &mZ); + ntu_MC->SetBranchStatus("ele1_charge", 1); ntu_MC->SetBranchAddress("ele1_charge", &charge); + ntu_MC->SetBranchStatus("ele2_charge", 1); ntu_MC->SetBranchAddress("ele2_charge", &charge2); + ntu_MC->SetBranchStatus("ele1_tkP", 1); ntu_MC->SetBranchAddress("ele1_tkP", &pTK); + ntu_MC->SetBranchStatus("ele2_tkP", 1); ntu_MC->SetBranchAddress("ele2_tkP", &pTK2); + ntu_MC->SetBranchStatus("ele1_seedIphi", 1); ntu_MC->SetBranchAddress("ele1_seedIphi", &iphiSeed); + ntu_MC->SetBranchStatus("ele2_seedIphi", 1); ntu_MC->SetBranchAddress("ele2_seedIphi", &iphiSeed2); + ntu_MC->SetBranchStatus("ele1_seedIx", 1); ntu_MC->SetBranchAddress("ele1_seedIx", &ele1_ix); + ntu_MC->SetBranchStatus("ele2_seedIx", 1); ntu_MC->SetBranchAddress("ele2_seedIx", &ele2_ix); + ntu_MC->SetBranchStatus("ele1_seedIy", 1); ntu_MC->SetBranchAddress("ele1_seedIy", &ele1_iy); + ntu_MC->SetBranchStatus("ele2_seedIy", 1); ntu_MC->SetBranchAddress("ele2_seedIy", &ele2_iy); + ntu_MC->SetBranchStatus("ele1_seedZside", 1); ntu_MC->SetBranchAddress("ele1_seedZside", &ele1_iz); + ntu_MC->SetBranchStatus("ele2_seedZside", 1); ntu_MC->SetBranchAddress("ele2_seedZside", &ele2_iz); + if(usePUweights) + { + ntu_MC->SetBranchStatus("PUit_NumInteractions", 1); ntu_MC->SetBranchAddress("PUit_NumInteractions", &npu); + } + + + + // histogram definition in EB and fit functions + std::vector > h_Phi_EB(nPhiBinsEB); // used to map iEta (as defined for Barrel and Endcap geom) into eta + std::vector > h_EoP_EB(nPhiBinsEB); + std::vector > h_EoC_EB(nPhiBinsEB); + std::vector > f_EoP_EB(nPhiBinsEB); + std::vector > f_EoC_EB(nPhiBinsEB); + + // histogram definition in EE and fit functions + std::vector > h_Phi_EE(nPhiBinsEE); // used to map iEta (as defined for Barrel and Endcap geom) into eta + std::vector > h_EoP_EE(nPhiBinsEE); + std::vector > h_EoC_EE(nPhiBinsEE); + std::vector > f_EoP_EE(nPhiBinsEE); + std::vector > f_EoC_EE(nPhiBinsEE); + + + + // Initializate histos in EB + std::cout << ">>> Initialize EB histos" << std::endl; + for(int i = 0; i < nPhiBinsEB; ++i) + { + for(int j = 0; j < nRegionsEB; ++j) + { + TString histoName; + histoName= Form("EB_EoP_%d_%d", i,j); + TH1F* temp = new TH1F (histoName, histoName, 2200, 0.2, 1.6); + temp->Sumw2(); + temp->SetFillColor(kRed+2); + temp->SetLineColor(kRed+2); + temp->SetFillStyle(3004); + (h_EoP_EB.at(i)).push_back(temp); + + histoName=Form("EB_EoC_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 2200, 0.2, 1.6); + temp->Sumw2(); + temp->SetFillColor(kGreen+2); + temp->SetLineColor(kGreen+2); + temp->SetFillStyle(3004); + (h_EoC_EB.at(i)).push_back(temp); + + histoName=Form("EB_Phi_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 360, 0., 360.); + (h_Phi_EB.at(i)).push_back(temp); + } + } + + // Initializate histos in EE + std::cout << ">>> Initialize EE histos" << std::endl; + for(int i = 0; i < nPhiBinsEE; ++i) + { + for(int j = 0; j < nRegionsEE; ++j) + { + TString histoName; + histoName= Form("EE_EoP_%d_%d", i,j); + TH1F* temp = new TH1F (histoName, histoName, 2200, 0., 2.); + temp->Sumw2(); + temp->SetFillColor(kRed+2); + temp->SetLineColor(kRed+2); + temp->SetFillStyle(3004); + (h_EoP_EE.at(i)).push_back(temp); + + histoName=Form("EE_EoC_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 2200, 0., 2.); + temp->Sumw2(); + temp->SetFillColor(kGreen+2); + temp->SetLineColor(kGreen+2); + temp->SetFillStyle(3004); + (h_EoC_EE.at(i)).push_back(temp); + + histoName=Form("EE_Phi_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 360, 0., 360.); + (h_Phi_EE.at(i)).push_back(temp); + } + } + + + + // Template in EE and EB + std::vector > h_template_EB(nPhiBinsTempEB); + std::vector > h_template_EE(nPhiBinsTempEE); + + std::cout << ">>> Initialize EB template" << std::endl; + for(int mod = 0; mod < nPhiBinsTempEB; ++mod) + { + for(int j = 0; j < nRegionsEB; ++j) + { + TString histoName; + histoName=Form("EB_template_%d_%d",mod,j); + TH1F* temp = new TH1F(histoName,"",2200,0.2,1.6); + (h_template_EB.at(mod)).push_back(temp); + } + } + + std::cout << ">>> Initialize EE template" << std::endl; + for(int mod = 0; mod < nPhiBinsTempEE; ++mod) + { + for(int j = 0; j < nRegionsEE; ++j) + { + TString histoName; + histoName=Form("EE_template_%d_%d",mod,j); + TH1F* temp = new TH1F(histoName,"",2200,0.,2.); + (h_template_EE.at(mod)).push_back(temp); + } + } + + + TH1F** h_phi_data_EB = new TH1F*[nRegionsEB]; + TH1F** h_phi_mc_EB = new TH1F*[nRegionsEB]; + TH1F** h_phi_data_EE = new TH1F*[nRegionsEE]; + TH1F** h_phi_mc_EE = new TH1F*[nRegionsEE]; + + for(int index = 0; index < nRegionsEB; ++index) + { + TString name; + name=Form("EB_h_phi_data_%d",index); + h_phi_data_EB[index]= new TH1F(name,"h_phi_data",100,-TMath::Pi(),TMath::Pi()); + name=Form("EB_h_phi_mc_%d",index); + h_phi_mc_EB[index]= new TH1F(name,"h_phi_mc",100,-TMath::Pi(),TMath::Pi()); + } + + for(int index = 0; index < nRegionsEE; ++index) + { + TString name; + name=Form("EE_h_phi_data_%d",index); + h_phi_data_EE[index] = new TH1F(name,"h_phi_data",100,-TMath::Pi(),TMath::Pi()); + name=Form("EE_h_phi_mc_%d",index); + h_phi_mc_EE[index] = new TH1F(name,"h_phi_mc",100,-TMath::Pi(),TMath::Pi()); + } + + TH1F* h_et_data = new TH1F("h_et_data","h_et_data",100,0.,100.); + TH1F* h_et_mc = new TH1F("h_et_mc", "h_et_mc", 100,0.,100.); + + + + // Initialize endcap geometry + TEndcapRings *eRings = new TEndcapRings(); + + // Map for conversion (ix,iy) into Eta for EE + TH2F * mapConversionEEp = new TH2F ("mapConversionEEp","mapConversionEEp",101,1,101,101,1,101); + TH2F * mapConversionEEm = new TH2F ("mapConversionEEm","mapConversionEEm",101,1,101,101,1,101); + + for(int ix =0; ixGetNbinsX(); ix++) + for(int iy =0; iyGetNbinsY(); iy++) + { + mapConversionEEp->SetBinContent(ix+1,iy+1,0); + mapConversionEEm->SetBinContent(ix+1,iy+1,0); + } + + + + // fill MC templates + std::vector refIdEB; + refIdEB.assign(nPhiBinsEB,0); + + std::vector refIdEE; + refIdEE.assign(nPhiBinsEE,0); + + for(int iphi = 0; iphi < nPhiBinsEB; ++iphi) + { + float phi = hPhiBinEB->GetBinCenter(iphi+1); + + phi = 2.*TMath::Pi() + phi + TMath::Pi()*10./180.; + phi -= int(phi/2./TMath::Pi()) * 2.*TMath::Pi(); + + int modPhi = int(phi/(2.*TMath::Pi()/nPhiBinsTempEB)); + if( modPhi == nPhiBinsTempEB ) modPhi = 0; + refIdEB.at(iphi) = modPhi; + } + + for(int iphi = 0; iphi < nPhiBinsEE; ++iphi) + { + float phi = hPhiBinEE->GetBinCenter(iphi+1); + + phi = 2.*TMath::Pi() + phi + TMath::Pi()*10./180.; + phi -= int(phi/2./TMath::Pi()) * 2.*TMath::Pi(); + + int modPhi = int(phi/(2.*TMath::Pi()/nPhiBinsTempEE)); + if( modPhi == nPhiBinsTempEE ) modPhi = 0; + refIdEE.at(iphi) = modPhi; + } + + + + + + + //**************************** loop on MC, make refernce and fit dist + + float var = 0.; + std::cout << "Loop in MC events " << endl; + for(int entry = 0; entry < ntu_MC->GetEntries(); ++entry) + { + if( entry%10000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + //if( entry > 1000 ) break; + + ntu_MC->GetEntry(entry); + + if( isW == 1 ) continue; + if( fabs(scEta) > etaMax ) continue; + if( fabs(scEta2) > eta2Max ) continue; + if( scEt < 20. ) continue; + if( scEt2 < 20. ) continue; + + R9 = e3x3 / scERaw; + R92 = e3x32 / scERaw2; + + + //--- PU weights + float ww = 1.; + if( usePUweights ) ww *= w[npu]; + + + + //--- set the mass for ele1 + var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // MC - BARREL - ele1 + if( ele1_iz == 0 ) + { + // fill MC templates + int modPhi = int(iphiSeed/(360./nPhiBinsTempEB)); + if( modPhi == nPhiBinsTempEB ) modPhi = 0; + + int regionId = templIndexEB(typeEB,eleEta,charge,R9); + if( regionId == -1 ) continue; + + (h_template_EB.at(modPhi)).at(regionId) -> Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1; + if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; + + (h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EB[regionId] -> Fill(scPhi,ww); + } + + // MC - ENDCAP - ele1 + else + { + int iphi = eRings->GetEndcapIphi(ele1_ix,ele1_iy,ele1_iz); + + if( ele1_iz == 1 )mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta); + if( ele1_iz == -1 )mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta); + + + // fill MC templates + int modPhi = int (iphi/(360./nPhiBinsTempEE)); + if( modPhi == nPhiBinsTempEE ) modPhi = 0; + + int regionId = templIndexEE(typeEE,eleEta,charge,R9); + if( regionId == -1 ) continue; + + (h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1; + if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; + + (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EE[regionId] -> Fill(scPhi,ww); + } + + + + //--- set the mass for ele2 + var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // MC - BARREL - ele2 + if( ele2_iz == 0) + { + // fill MC templates + int modPhi = int (iphiSeed2/(360./nPhiBinsTempEB)); + if( modPhi == nPhiBinsTempEB ) modPhi = 0; + + int regionId = templIndexEB(typeEB,eleEta2,charge2,R92); + if(regionId == -1) continue; + + (h_template_EB.at(modPhi)).at(regionId)->Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1; + if( PhibinEB==nPhiBinsEB ) PhibinEB = 0; + + (h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EB[regionId]->Fill(scPhi2,ww); + } + + // MC - ENDCAP - ele2 + else + { + if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2); + if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2); + + int iphi = eRings->GetEndcapIphi(ele2_ix,ele2_iy,ele2_iz); + + + // fill MC templates + int modPhi = int (iphi/(360./nPhiBinsTempEE)); + if( modPhi == nPhiBinsTempEE ) modPhi = 0; + + int regionId = templIndexEE(typeEE,eleEta2,charge2,R92); + if(regionId == -1) continue; + + (h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1; + if(PhibinEE==nPhiBinsEE) PhibinEE = 0; + + (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EE[regionId]->Fill(scPhi2,ww); + } + + h_et_mc ->Fill(scEt, ww); + h_et_mc ->Fill(scEt2,ww); + } + + + + + + + //**************************** loop on DATA + + std::cout << "Loop in Data events " << endl; + + for(int entry = 0; entry < ntu_DA->GetEntries(); ++entry) + { + if( entry%10000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + + ntu_DA->GetEntry(entry); + + if( isW == 1 ) continue; + if( fabs(scEta) > etaMax ) continue; + if( fabs(scEta2) > eta2Max ) continue; + if( scEt < 20. ) continue; + if( scEt2 < 20. ) continue; + + R9 = e3x3 / scERaw; + R92 = e3x32 / scERaw2; + + float ww = 1.; + + + + //--- set the mass for ele1 + if( ele1_iz == 0 ) var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; + else var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // DATA - BARREL - ele1 + if( ele1_iz == 0 ) + { + int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1; + if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; + + int regionId = templIndexEB(typeEB,eleEta,charge,R9); + if(regionId == -1) continue; + + (h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi); + h_phi_data_EB[regionId]->Fill(elePhi); + } + + // DATA - ENDCAP - ele1 + else + { + if( ele1_iz == 1 ) mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta); + if( ele1_iz == -1 ) mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta); + + int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1; + if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; + + int regionId = templIndexEE(typeEE,eleEta,charge,R9); + if( regionId == -1 ) continue; + + (h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi); + h_phi_data_EE[regionId] -> Fill(elePhi); + } + + + + //--- set the mass for ele2 + if( ele2_iz == 0 ) var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; + else var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge2 > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // DATA - BARREL - ele2 + if( ele2_iz == 0 ) + { + int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1; + if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; + + int regionId = templIndexEB(typeEB,eleEta2,charge2,R92); + if( regionId == -1 ) continue; + + (h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi2); + h_phi_data_EB[regionId] -> Fill(elePhi2); + } + else + { + if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2); + if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2); + + int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1; + if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; + + int regionId = templIndexEE(typeEE,eleEta2,charge2,R92); + if( regionId == -1 ) continue; + + (h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi2); + h_phi_data_EE[regionId] ->Fill(elePhi2); + } + + h_et_data ->Fill(scEt); + h_et_data ->Fill(scEt2); + } + + std::cout << "End loop: Analyze events " << endl; + + + + + + + //---------------- + // Initializations + + // initialize TGraphs + TFile* o = new TFile((outputFile+"_"+typeEB+"_"+typeEE+".root").c_str(),"RECREATE"); + + TGraphErrors** g_EoP_EB = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_EoC_EB = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_Rat_EB = new TGraphErrors*[nRegionsEB]; + + for(int j = 0; j < nRegionsEB; ++j) + { + g_EoP_EB[j] = new TGraphErrors(); + g_EoC_EB[j] = new TGraphErrors(); + g_Rat_EB[j] = new TGraphErrors(); + } + + TGraphErrors** g_EoP_EE = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_EoC_EE = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_Rat_EE = new TGraphErrors*[nRegionsEB]; + + for(int j = 0; j < nRegionsEE; ++j) + { + g_EoP_EE[j]= new TGraphErrors(); + g_EoC_EE[j]= new TGraphErrors(); + g_Rat_EE[j]= new TGraphErrors(); + } + + // initialize template functions + std::vector > templateHistoFuncEB(nPhiBinsTempEB); + std::vector > templateHistoFuncEE(nPhiBinsTempEE); + + for(int mod = 0; mod < nPhiBinsTempEB; ++mod) + { + for(int j = 0; j < nRegionsEB; ++j) + { + (h_template_EB.at(mod)).at(j) -> Rebin(rebinEB); + (templateHistoFuncEB.at(mod)).push_back( new histoFunc((h_template_EB.at(mod)).at(j)) ); + } + } + + for(int mod = 0; mod < nPhiBinsTempEE; ++mod) + { + for(int j = 0; j < nRegionsEE; ++j) + { + (h_template_EE.at(mod)).at(j) -> Rebin(rebinEE); + (templateHistoFuncEE.at(mod)).push_back( new histoFunc((h_template_EE.at(mod)).at(j)) ); + } + } + + + + + + + //------------------- + // Template Fit in EB + + if( typeEB != "none" ) + { + for(int i = 0; i < nPhiBinsEB; ++i) + { + for(int j = 0; j < nRegionsEB; ++j) + { + float flPhi = hPhiBinEB->GetXaxis()->GetBinCenter(i+1); + + (h_EoP_EB.at(i)).at(j) -> Rebin(rebinEB); + (h_EoC_EB.at(i)).at(j) -> Rebin(rebinEB); + + + // define the fitting function + // N.B. [0] * ( [1] * f( [1]*(x-[2]) ) ) + char funcName[50]; + sprintf(funcName,"f_EoP_%d_%d_Ref_%d_%d_EB",i,j,refIdEB.at(i),j); + (f_EoP_EB.at(i)).push_back( new TF1(funcName, (templateHistoFuncEB.at(refIdEB.at(i))).at(j), 0.85, 1.1, 3, "histoFunc") ); + + (f_EoP_EB.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoP_EB.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoP_EB.at(i)).at(j) -> SetLineWidth(1); + (f_EoP_EB.at(i)).at(j) -> SetLineColor(kRed+2); + (f_EoP_EB.at(i)).at(j) -> SetNpx(10000); + + (h_EoP_EB.at(i)).at(j) -> Scale(1*(h_EoC_EB.at(i)).at(j)->GetEntries()/(h_EoP_EB.at(i)).at(j)->GetEntries()); + + // uncorrected + double xNorm = (h_EoP_EB.at(i)).at(j)->Integral()/(h_template_EB.at(refIdEB.at(i))).at(j)->Integral() * + (h_EoP_EB.at(i)).at(j)->GetBinWidth(1)/(h_template_EB.at(refIdEB.at(i))).at(j)->GetBinWidth(1); + + + (f_EoP_EB.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoP_EB.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting MC EB " << flPhi << " (" << i << "," << j << "): "; + TFitResultPtr rp; + int fStatus; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoP_EB.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoP_EB.at(i)).at(j) -> Fit(funcName, "QRWL+"); + fStatus = rp; + if(fStatus !=4 && (f_EoP_EB.at(i)).at(j)->GetParError(1) != 0. ) + { + std::cout << "fit OK "; + + double k = (f_EoP_EB.at(i)).at(j)->GetParameter(1); + double eee = (f_EoP_EB.at(i)).at(j)->GetParError(1); + g_EoP_EB[j] -> SetPoint(i, flPhi, 1./k); + g_EoP_EB[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + std::cout << "fit BAD "; + + g_EoP_EB[j] -> SetPoint(i, flPhi, 1.); + g_EoP_EB[j] -> SetPointError(i, 0., 0.01); + } + } + + + //ratio preparation + float rat = (f_EoP_EB.at(i)).at(j)->GetParameter(1); + float era = (f_EoP_EB.at(i)).at(j)->GetParError(1); + + xNorm = (h_EoC_EB.at(i)).at(j)->Integral()/(h_template_EB.at(refIdEB.at(i))).at(j)->Integral() * + (h_EoC_EB.at(i)).at(j)->GetBinWidth(1)/(h_template_EB.at(refIdEB.at(i))).at(j)->GetBinWidth(1); + + sprintf(funcName,"f_EoC_%d_%d_Ref_%d_%d_EB",i,j,refIdEB.at(i),i); + + (f_EoC_EB.at(i)).push_back( new TF1(funcName, (templateHistoFuncEB.at(refIdEB.at(i))).at(j), 0.85, 1.1, 3, "histoFunc") ); + + (f_EoC_EB.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoC_EB.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoC_EB.at(i)).at(j) -> SetLineWidth(1); + (f_EoC_EB.at(i)).at(j) -> SetLineColor(kGreen+2); + (f_EoC_EB.at(i)).at(j) -> SetNpx(10000); + + (f_EoC_EB.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoC_EB.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting DATA EB (" << i << "," << j << "): "; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoC_EB.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoC_EB.at(i)).at(j) -> Fit(funcName, "QR+"); + fStatus = rp; + if( fStatus !=4 && (f_EoC_EB.at(i)).at(j)->GetParError(1) != 0 ) + { + std::cout << "fit OK "; + + double k = (f_EoC_EB.at(i)).at(j)->GetParameter(1); + double eee = (f_EoC_EB.at(i)).at(j)->GetParError(1); + g_EoC_EB[j] -> SetPoint(i, flPhi, 1./k); + g_EoC_EB[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + std::cout << "fit BAD "; + + g_EoC_EB[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EB[j] -> SetPointError(i, 0., 0.01); + } + } + + + //ratio finalization + rat /= (f_EoC_EB.at(i)).at(j)->GetParameter(1); + era = rat*sqrt(era*era+(f_EoC_EB.at(i)).at(j)->GetParError(1)*(f_EoC_EB.at(i)).at(j)->GetParError(1)); + + if(i==0) g_Rat_EB[j] -> SetPoint(i, 0., rat); + else g_Rat_EB[j] -> SetPoint(i, flPhi, rat); + + g_Rat_EB[j] -> SetPointError(i, 0. , era); + g_Rat_EB[j]->SetLineColor(kBlue+2); + + std::cout << std::endl; + } + } + } + else + { + for(int i = 0; i < nPhiBinsEB; ++i) + { + for(int j = 0; j < nRegionsEB; ++j) + { + float flPhi = hPhiBinEB->GetXaxis()->GetBinCenter(i+1); + g_EoP_EB[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EB[j] -> SetPoint(i, flPhi, 1.); + g_Rat_EB[j] -> SetPoint(i, flPhi, 1.); + } + } + } + + + + + + + //------------------- + // Template Fit in EE + + if( typeEE != "none" ) + { + for(int i = 0; i < nPhiBinsEE; ++i) + { + for(int j = 0; j < nRegionsEE; ++j) + { + float flPhi = hPhiBinEE->GetXaxis()->GetBinCenter(i); + + (h_EoP_EE.at(i)).at(j) -> Rebin(rebinEE); + (h_EoC_EE.at(i)).at(j) -> Rebin(rebinEE); + + + // define the fitting function + // N.B. [0] * ( [1] * f( [1]*(x-[2]) ) ) + + char funcName[50]; + sprintf(funcName,"f_EoP_%d_%d_Ref_%d_%d_EE",i,j,refIdEE.at(i),j); + (f_EoP_EE.at(i)).push_back( new TF1(funcName, (templateHistoFuncEE.at(refIdEE.at(i))).at(j), 0.7, 1.1, 3, "histoFunc") ); + + (f_EoP_EE.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoP_EE.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoP_EE.at(i)).at(j) -> SetLineWidth(1); + (f_EoP_EE.at(i)).at(j) -> SetLineColor(kRed+2); + (f_EoP_EE.at(i)).at(j) -> SetNpx(10000); + (f_EoP_EE.at(i)).at(j) -> SetNpx(10000); + + (h_EoP_EE.at(i)).at(j) -> Scale(1*(h_EoC_EE.at(i)).at(j)->GetEntries()/(h_EoP_EE.at(i)).at(j)->GetEntries()); + + // uncorrected + double xNorm = (h_EoP_EE.at(i)).at(j)->Integral()/(h_template_EE.at(refIdEE.at(i))).at(j)->Integral() * + (h_EoP_EE.at(i)).at(j)->GetBinWidth(1)/(h_template_EE.at(refIdEE.at(i))).at(j)->GetBinWidth(1); + + (f_EoP_EE.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoP_EE.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting MC EE " << flPhi << " (" << i << "," << j << "): "; + TFitResultPtr rp; + int fStatus; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoP_EE.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoP_EE.at(i)).at(j) -> Fit(funcName, "QRWL+"); + fStatus = rp; + + if( fStatus !=4 && (f_EoP_EE.at(i)).at(j)->GetParError(1) != 0. ) + { + std::cout << "fit OK "; + + double k = (f_EoP_EE.at(i)).at(j)->GetParameter(1); + double eee = (f_EoP_EE.at(i)).at(j)->GetParError(1); + g_EoP_EE[j] -> SetPoint(i, flPhi, 1./k); + g_EoP_EE[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + std::cout << "fit BAD "; + + g_EoP_EE[j] -> SetPoint(i, flPhi, 1.); + g_EoP_EE[j] -> SetPointError(i, 0., 0.03); + } + } + + //ratio preparation + float rat = (f_EoP_EE.at(i)).at(j)->GetParameter(1); + float era = (f_EoP_EE.at(i)).at(j)->GetParError(1); + + // corrected + xNorm = (h_EoC_EE.at(i)).at(j)->Integral()/(h_template_EE.at(refIdEE.at(i))).at(j)->Integral() * + (h_EoC_EE.at(i)).at(j)->GetBinWidth(1)/(h_template_EE.at(refIdEE.at(i))).at(j)->GetBinWidth(1); + + sprintf(funcName,"f_EoC_%d_%d_Ref_%d_%d_EE",i,j,refIdEE.at(i),j); + (f_EoC_EE.at(i)).push_back( new TF1(funcName, (templateHistoFuncEE.at(refIdEE.at(i))).at(j), 0.7, 1.1, 3, "histoFunc") ); + + (f_EoC_EE.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoC_EE.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoC_EE.at(i)).at(j) -> SetLineWidth(1); + (f_EoC_EE.at(i)).at(j) -> SetLineColor(kGreen+2); + (f_EoC_EE.at(i)).at(j) -> SetNpx(10000); + + (f_EoC_EE.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoC_EE.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting DATA EE " << flPhi << " (" << i << "," << j << "): "; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoC_EE.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoC_EE.at(i)).at(j) -> Fit(funcName, "QR+"); + if( fStatus !=4 && (f_EoC_EE.at(i)).at(j)->GetParError(1) != 0. ) + { + std::cout << "fit OK "; + + double k = (f_EoC_EE.at(i)).at(j)->GetParameter(1); + double eee = (f_EoC_EE.at(i)).at(j)->GetParError(1); + g_EoC_EE[j] -> SetPoint(i, flPhi, 1./k); + g_EoC_EE[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + g_EoC_EE[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EE[j] -> SetPointError(i, 0., 0.03); + } + } + + + //ratio finalization + rat /= (f_EoC_EE.at(i)).at(j)->GetParameter(1); + era = rat*sqrt(era*era+(f_EoC_EE.at(i)).at(j)->GetParError(1)*(f_EoC_EE.at(i)).at(j)->GetParError(1)); + + g_Rat_EE[j] -> SetPoint(i, flPhi, rat); + g_Rat_EE[j] -> SetPointError(i, 0. , era); + + g_Rat_EE[j]->SetLineColor(kBlue+2); + } + + std::cout << std::endl; + } + } + else + { + for(int i = 0; i < nPhiBinsEE; ++i) + { + for(int j = 0; j < nRegionsEE; ++j) + { + float flPhi = hPhiBinEE->GetXaxis()->GetBinCenter(i+1); + g_EoP_EE[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EE[j] -> SetPoint(i, flPhi, 1.); + g_Rat_EE[j] -> SetPoint(i, flPhi, 1.); + } + } + } + + + + + + + //------- + // Output + + o -> cd(); + + for(int j = 0; j < nRegionsEB; ++j) + { + TString Name; + //Name = Form("g_EoP_EB_%d",j); + //if(g_EoP_EB[j]->GetN()!=0) g_EoP_EB[j] -> Write(Name); + Name = Form("g_EoC_EB_%d",j); + if(g_EoC_EB[j]->GetN()!=0) g_EoC_EB[j] -> Write(Name); + //Name = Form("g_Rat_EB_%d",j); + //if(g_Rat_EB[j]->GetN()!=0) g_Rat_EB[j] -> Write(Name); + } + + for(int j = 0; j < nRegionsEE; ++j) + { + TString Name; + //Name = Form("g_EoP_EE_%d",j); + //if(g_EoP_EE[j]->GetN()!=0) g_EoP_EE[j] -> Write(Name); + Name = Form("g_EoC_EE_%d",j); + if(g_EoC_EE[j]->GetN()!=0) g_EoC_EE[j] -> Write(Name); + //Name = Form("g_Rat_EE_%d",j); + //if(g_Rat_EE[j]->GetN()!=0) g_Rat_EE[j] -> Write(Name); + } + + for(int mod = 0; mod GetEntries() != 0 ) h_template_EB[mod][j] -> Write(); + } + + for(int mod = 0; mod GetEntries() != 0 ) h_template_EE[mod][j] -> Write(); + } + + for(int i = 0; i GetEntries() != 0 ) (h_EoP_EB.at(i)).at(j) -> Write(); + //if( (h_EoC_EB.at(i)).at(j) -> GetEntries() != 0 ) (h_EoC_EB.at(i)).at(j) -> Write(); + } + + for(int i = 0; i GetEntries() != 0 ) (h_EoP_EE.at(i)).at(j) -> Write(); + //if( (h_EoC_EE.at(i)).at(j) -> GetEntries() != 0 ) (h_EoC_EE.at(i)).at(j) -> Write(); + } + + for(int j =0; j< nRegionsEB; ++j) + { + if( h_phi_mc_EB[j] -> GetEntries() !=0 ) h_phi_mc_EB[j] -> Write(); + if( h_phi_data_EB[j] -> GetEntries() !=0 ) h_phi_data_EB[j] -> Write(); + } + + for(int j =0; j< nRegionsEE; ++j) + { + if( h_phi_mc_EE[j] -> GetEntries() !=0 ) h_phi_mc_EE[j] -> Write(); + if( h_phi_data_EE[j] -> GetEntries() !=0 ) h_phi_data_EE[j] -> Write(); + } + + h_et_mc->Write(); + h_et_data->Write(); + + mapConversionEEp -> Write(); + mapConversionEEm -> Write(); + + o -> Close(); + + + + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp b/EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp new file mode 100644 index 00000000000..683202442d8 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp @@ -0,0 +1,854 @@ +/// Standalone program to mormalize IC EB by the mean on a eta ring + skipping xtal near dead channels and TT +/// in the normalization procedure +/// Folded Plots for Spread IC, Statistical Precision and spread +/// Correct IC near cracks and for momentum scale and produce txt IC values + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" + +#include "../interface/TEndcapRings.h" +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/CalibrationUtils.h" +#include "../interface/DrawingUtils.h" +#include "../interface/setTDRStyle.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + + +int main(int argc, char **argv) +{ + //------------------ + // Set style options + + setTDRStyle(); + gStyle->SetPadTopMargin(0.05); + gStyle->SetPadBottomMargin(0.13); + gStyle->SetPadLeftMargin(0.13); + gStyle->SetPadRightMargin(0.17); + gStyle->SetLabelSize(0.04,"XYZ"); + gStyle->SetTitleSize(0.05,"XYZ"); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + + + + //---------------- + // parse cfg file + + if( argc != 2 ) + { + std::cerr << ">>>>> Calibration.cpp::usage: " << argv[0] << " configFileName" << std::endl; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + + + std::string inFileName = "NULL"; + if(Options.existsAs("inFileName")) + inFileName = Options.getParameter("inFileName"); + else{ std::cout<<" Exit from code, no input file"<("is2012Calib")) + is2012Calib = Options.getParameter("is2012Calib"); + + bool isEB = true; + if(Options.existsAs("isEB")) + isEB = Options.getParameter("isEB"); + + std::string outputFolder = "output/"; + if(Options.existsAs("outputFolder")) + outputFolder = Options.getParameter("outputFolder"); + + std::string outputTxt = "IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"; + if(Options.existsAs("outputTxt")) + outputTxt = Options.getParameter("outputTxt"); + + std::string outFileName = "calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"; + if(Options.existsAs("outFileName")) + outFileName = Options.getParameter("outFileName"); + + std::string fileType = "cxx"; + if(Options.existsAs("fileType")) + fileType = Options.getParameter("fileType"); + + int evalStat = true; + if(Options.existsAs("evalStat")) + evalStat = Options.getParameter("evalStat"); + + std::string inFileNameEven="NULL", inFileNameOdd="NULL"; + if( evalStat ) + { + if(Options.existsAs("inFileNameEven")) + inFileNameEven = Options.getParameter("inFileNameEven"); + else{ std::cout<<" Exit from code, no even input file"<("inFileNameOdd")) + inFileNameOdd = Options.getParameter("inFileNameOdd"); + else{ std::cout<<" Exit from code, no odd input file"<>> No input file specified!" << std::endl; + return 1; + } + std::cout << ">>> Making calibration plots for: " << inFileName << std::endl; + + if( evalStat ) + { + if( inFileNameEven.empty() || inFileNameOdd.empty() ) + { + std::cout << ">>> No input files to evaluate statistical precision specified!" << std::endl; + return 1; + } + std::cout << ">>> Evaluating statistical precision from: " << inFileNameEven << std::endl; + std::cout << ">>> Evaluating statistical precision from: " << inFileNameOdd << std::endl; + } + + + + //--------------------- + // endcap ring geometry + + TEndcapRings* eRings = new TEndcapRings(); + TFile* exisistingEEFile = new TFile("CommonTools/existingEE.root","READ"); + TH2F* existingEE = (TH2F*)( exisistingEEFile->Get("endcap") ); + + TFile* MCSystematicFile = new TFile("CommonTools/ResidualForSystematic_EE_MC.root","READ"); + //TGraphErrors* MCSystematic_EEM = (TGraphErrors*)( MCSystematicFile->Get("residual_EEM") ); + TGraphErrors* MCSystematic_EE = (TGraphErrors*)( MCSystematicFile->Get("residual_All") ); + //TGraphErrors* MCSystematic_EEP = (TGraphErrors*)( MCSystematicFile->Get("residual_EEP") ); + + + + //----------------------- + // map for dead TT centre + + std::map > > TT_centre; + if( isEB == true ) + { + std::vector< std::pair > TT_centre_EB; + + if( !is2012Calib ) InitializeDeadTT_EB(TT_centre_EB); + if( is2012Calib ) InitializeDeadTT_EB2012(TT_centre_EB); + + TT_centre[0] = TT_centre_EB; + } + else + { + std::vector< std::pair > TT_centre_EEM; + std::vector< std::pair > TT_centre_EEP; + + if( !is2012Calib ) InitializeDeadTTEEM(TT_centre_EEM); + if( is2012Calib ) InitializeDeadTTEEM2012(TT_centre_EEM); + + if( !is2012Calib ) InitializeDeadTTEEP(TT_centre_EEP); + if( is2012Calib ) InitializeDeadTTEEP2012(TT_centre_EEP); + + TT_centre[-1] = TT_centre_EEM; + TT_centre[1] = TT_centre_EEP; + } + + + + //--------------- + // define outfile + + TCanvas* c1 = new TCanvas(); + c1 -> cd(); + + TFile* outFile = new TFile((outputFolder+"/"+outFileName).c_str(),"RECREATE"); + + + + + + + //-------------------------------------------------------------- + // Build the precision vs ieta plot starting from the TH2F of IC + //-------------------------------------------------------------- + + + + // open files + TFile* inFile = new TFile(inFileName.c_str(),"READ"); + TFile* inFileEven = new TFile(); + TFile* inFileOdd = new TFile(); + if( evalStat ) + { + inFileEven = new TFile(inFileNameEven.c_str(),"READ"); + inFileOdd = new TFile(inFileNameOdd.c_str(),"READ"); + } + + + + // get the IC maps as they come from the algorithm + std::map h2_IC_raw; + std::map h2_IC_raw_phiNorm; + std::map h2_IC_crackCorr; + std::map h2_IC_crackCorr_phiNorm; + + std::map h2_ICEven_raw; + std::map h2_IC_raw_phiNorm_even; + std::map h2_IC_crackCorr_phiNorm_even; + + std::map h2_ICOdd_raw; + std::map h2_IC_raw_phiNorm_odd; + std::map h2_IC_crackCorr_phiNorm_odd; + + if( isEB == true ) + { + h2_IC_raw[0] = (TH2F*)( inFile->Get("h_scale_EB") ); + + h2_IC_raw_phiNorm[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_raw_phiNorm_EB") ); + h2_IC_raw_phiNorm[0] -> Reset("ICEMS"); + h2_IC_raw_phiNorm[0] -> ResetStats(); + + h2_IC_crackCorr[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_crackCorr_EB") ); + h2_IC_crackCorr[0] -> Reset("ICEMS"); + h2_IC_crackCorr[0] -> ResetStats(); + + h2_IC_crackCorr_phiNorm[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_crackCorr_phiNorm_EB") ); + h2_IC_crackCorr_phiNorm[0] -> Reset("ICEMS"); + h2_IC_crackCorr_phiNorm[0] -> ResetStats(); + + if( evalStat ) + { + h2_ICEven_raw[0] = (TH2F*)( inFileEven->Get("h_scale_EB") ); + h2_ICOdd_raw[0] = (TH2F*)( inFileOdd ->Get("h_scale_EB") ); + + h2_IC_raw_phiNorm_even[0] = (TH2F*)( h2_ICEven_raw[0]->Clone("h2_IC_raw_phiNorm_even_EB") ); + h2_IC_raw_phiNorm_even[0] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_even[0] -> ResetStats(); + + h2_IC_raw_phiNorm_odd[0] = (TH2F*)( h2_ICOdd_raw[0]->Clone("h2_IC_raw_phiNorm_odd_EB") ); + h2_IC_raw_phiNorm_odd[0] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_odd[0] -> ResetStats(); + + h2_IC_crackCorr_phiNorm_even[0] = (TH2F*)( h2_ICEven_raw[0]->Clone("h2_IC_crackCorr_phiNorm_even_EB") ); + h2_IC_crackCorr_phiNorm_even[0] -> Reset("ICEMS"); + h2_IC_crackCorr_phiNorm_even[0] -> ResetStats(); + + h2_IC_crackCorr_phiNorm_odd[0] = (TH2F*)( h2_ICOdd_raw[0]->Clone("h2_IC_crackCorr_phiNorm_odd_EB") ); + h2_IC_crackCorr_phiNorm_odd[0] -> Reset("ICEMS"); + h2_IC_crackCorr_phiNorm_odd[0] -> ResetStats(); + } + } + else + { + h2_IC_raw[-1] = (TH2F*)( inFile->Get("h_scale_EEM") ); + h2_IC_raw[1] = (TH2F*)( inFile->Get("h_scale_EEP") ); + + h2_IC_raw_phiNorm[-1] = (TH2F*)( h2_IC_raw[-1]->Clone("h2_IC_raw_phiNorm_EEM") ); + h2_IC_raw_phiNorm[1] = (TH2F*)( h2_IC_raw[1] ->Clone("h2_IC_raw_phiNorm_EEP") ); + h2_IC_raw_phiNorm[-1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm[1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm[-1] -> ResetStats(); + h2_IC_raw_phiNorm[1] -> ResetStats(); + + if( evalStat ) + { + h2_ICEven_raw[-1] = (TH2F*)( inFileEven->Get("h_scale_EEM") ); + h2_ICEven_raw[1] = (TH2F*)( inFileEven->Get("h_scale_EEP") ); + h2_ICOdd_raw[-1 ] = (TH2F*)( inFileOdd ->Get("h_scale_EEM") ); + h2_ICOdd_raw[1] = (TH2F*)( inFileOdd ->Get("h_scale_EEP") ); + + h2_IC_raw_phiNorm_even[-1] = (TH2F*)( h2_ICEven_raw[-1]->Clone("h2_IC_raw_phiNorm_even_EEM") ); + h2_IC_raw_phiNorm_even[1] = (TH2F*)( h2_ICEven_raw[1] ->Clone("h2_IC_raw_phiNorm_even_EEP") ); + h2_IC_raw_phiNorm_even[-1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_even[1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_even[-1] -> ResetStats(); + h2_IC_raw_phiNorm_even[1] -> ResetStats(); + + h2_IC_raw_phiNorm_odd[-1] = (TH2F*)( h2_ICOdd_raw[-1]->Clone("h2_IC_raw_phiNorm_odd_EEM") ); + h2_IC_raw_phiNorm_odd[1] = (TH2F*)( h2_ICOdd_raw[1] ->Clone("h2_IC_raw_phiNorm_odd_EEP") ); + h2_IC_raw_phiNorm_odd[-1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_odd[1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_odd[-1] -> ResetStats(); + h2_IC_raw_phiNorm_odd[1] -> ResetStats(); + } + } + + + + // normalize each ring to the average IC of that eta ring + if( isEB == true ) + { + NormalizeIC_EB(h2_IC_raw[0],h2_IC_raw_phiNorm[0],TT_centre[0]); + if( evalStat ) + { + NormalizeIC_EB(h2_ICEven_raw[0],h2_IC_raw_phiNorm_even[0],TT_centre[0]); + NormalizeIC_EB(h2_ICOdd_raw[0], h2_IC_raw_phiNorm_odd[0], TT_centre[0]); + } + } + else + { + NormalizeIC_EE(h2_IC_raw[-1],h2_IC_raw[1],h2_IC_raw_phiNorm[-1],h2_IC_raw_phiNorm[1],TT_centre[-1],TT_centre[1],eRings); + if( evalStat ) + { + NormalizeIC_EE(h2_ICEven_raw[-1],h2_ICEven_raw[1],h2_IC_raw_phiNorm_even[-1],h2_IC_raw_phiNorm_even[1],TT_centre[-1],TT_centre[1],eRings); + NormalizeIC_EE(h2_ICOdd_raw[-1], h2_ICOdd_raw[1], h2_IC_raw_phiNorm_odd[-1], h2_IC_raw_phiNorm_odd[1], TT_centre[-1],TT_centre[1],eRings); + } + } + + + + + + + ///////////////////////////////////////////////////////////// + // plots for raw IC (only ring normalization) + ///////////////////////////////////////////////////////////// + std::cout << ">>> Draw plots for raw IC" << std::endl; + + int etaRingWidth = 1; + int phiRegionWidth = 1; + + int nBins_spread = 2000; + float spreadMin = 0.; + float spreadMax = 2.; + + int nBins_stat = 1000; + float statMin = -1.; + float statMax = 1.; + + outFile -> mkdir("raw"); + outFile -> cd("raw"); + + + + //-------------- + // spread histos + std::cout << ">>>>>> spread histos" << std::endl; + + std::map h_spread; + std::map > h_spread_vsEta; + std::map g_spread_vsEta; + + if( isEB == true ) + { + h_spread[0] = new TH1F("h_spread_EB","",nBins_spread,spreadMin,spreadMax); + g_spread_vsEta[0] = new TGraphErrors(); + + BookSpreadHistos_EB(h_spread[0], h_spread_vsEta[0], g_spread_vsEta[0], etaRingWidth, + "EB_spread_vsEta",nBins_spread,spreadMin,spreadMax, + h2_IC_raw_phiNorm[0]); + + h_spread[0] -> Write(); + //for(unsigned int i = 0; i < h_spread_vsEta[0].size(); ++i) + // h_spread_vsEta[0].at(i) -> Write(); + g_spread_vsEta[0] -> Write("g_spread_vsEta_EB"); + } + else + { + h_spread[-1] = new TH1F("h_spread_EEM","",nBins_spread,spreadMin,spreadMax); + h_spread[0] = new TH1F("h_spread_EE", "",nBins_spread,spreadMin,spreadMax); + h_spread[+1] = new TH1F("h_spread_EEP","",nBins_spread,spreadMin,spreadMax); + g_spread_vsEta[-1] = new TGraphErrors(); + g_spread_vsEta[0] = new TGraphErrors(); + g_spread_vsEta[+1] = new TGraphErrors(); + + std::map dummy; + BookSpreadHistos_EE(h_spread, h_spread_vsEta, g_spread_vsEta, + eRings,etaRingWidth, + "EE_spread_vsEta",nBins_spread,spreadMin,spreadMax, + h2_IC_raw_phiNorm,dummy); + + h_spread[-1] -> Write(); + h_spread[0] -> Write(); + h_spread[+1] -> Write(); + //for(unsigned int i = 0; i < h_spread_vsEta[0].size(); ++i) + //{ + // h_spread_vsEta[-1].at(i) -> Write(); + // h_spread_vsEta[0].at(i) -> Write(); + // h_spread_vsEta[+1].at(i) -> Write(); + //} + g_spread_vsEta[-1] -> Write("g_spread_vsEta_EEM"); + g_spread_vsEta[0] -> Write("g_spread_vsEta_EE"); + g_spread_vsEta[+1] -> Write("g_spread_vsEta_EEP"); + } + + + + //------------------- + // phi profile histos + std::cout << ">>>>>> phi profile histos" << std::endl; + + std::map h_phiAvgICSpread; + std::map g_avgIC_vsPhi; + + if( isEB == true ) + { + h_phiAvgICSpread[0] = new TH1F("h_phiAvgICSpread_EB","",nBins_spread,spreadMin,spreadMax); + g_avgIC_vsPhi[0] = new TGraphErrors(); + + PhiProfile(h_phiAvgICSpread[0], g_avgIC_vsPhi[0], phiRegionWidth, h2_IC_raw_phiNorm[0]); + + h_phiAvgICSpread[0] -> Write(); + g_avgIC_vsPhi[0] -> Write("g_avgIC_vsPhi_EB"); + } + else + { + h_phiAvgICSpread[-1] = new TH1F("h_phiAvgICSpread_EEM","",nBins_spread,spreadMin,spreadMax); + h_phiAvgICSpread[+1] = new TH1F("h_phiAvgICSpread_EEP","",nBins_spread,spreadMin,spreadMax); + g_avgIC_vsPhi[-1] = new TGraphErrors(); + g_avgIC_vsPhi[+1] = new TGraphErrors(); + + PhiProfile(h_phiAvgICSpread[-1],g_avgIC_vsPhi[-1],phiRegionWidth,h2_IC_raw_phiNorm[-1],eRings); + PhiProfile(h_phiAvgICSpread[+1],g_avgIC_vsPhi[+1],phiRegionWidth,h2_IC_raw_phiNorm[+1],eRings); + + h_phiAvgICSpread[-1] -> Write(); + h_phiAvgICSpread[+1] -> Write(); + g_avgIC_vsPhi[-1] -> Write("g_avgIC_vsPhi_EEM"); + g_avgIC_vsPhi[+1] -> Write("g_avgIC_vsPhi_EEP"); + } + + + + //---------------------------------- + // phi-fold profile histos (EB only) + std::cout << ">>>>>> phi-fold profile histos" << std::endl; + + TGraphErrors* g_avgIC_vsPhiFold_EBM = new TGraphErrors(); + TGraphErrors* g_avgIC_vsPhiFold_EBP = new TGraphErrors(); + + if( isEB == true ) + { + PhiFoldProfile_EB(g_avgIC_vsPhiFold_EBM, g_avgIC_vsPhiFold_EBP, phiRegionWidth, h2_IC_raw_phiNorm[0]); + + g_avgIC_vsPhiFold_EBM -> Write("g_avgIC_vsPhiFold_EBM"); + g_avgIC_vsPhiFold_EBP -> Write("g_avgIC_vsPhiFold_EBP"); + } + + + + //----------------------------- + // statistical precision histos + std::cout << ">>>>>> stat histos" << std::endl; + + std::map h_stat; + std::map > h_stat_vsEta; + std::map g_stat_vsEta; + std::map g_residual_vsEta; + + if( isEB == true ) + { + h_stat[0] = new TH1F("h_stat_EB","",nBins_stat,statMin,statMax); + g_stat_vsEta[0] = new TGraphErrors(); + g_residual_vsEta[0] = new TGraphErrors(); + + if( evalStat ) + { + BookSpreadHistos_EB(h_stat[0], h_stat_vsEta[0], g_stat_vsEta[0], etaRingWidth, + "EB_stat_vsEta",nBins_stat,statMin,statMax, + h2_IC_raw_phiNorm_even[0],h2_IC_raw_phiNorm_odd[0]); + + h_stat[0] -> Write(); + //for(unsigned int i = 0; i < h_stat_vsEta[0].size(); ++i) + // h_stat_vsEta[0].at(i) -> Write(); + g_stat_vsEta[0] -> Write("g_stat_vsEta_EB"); + + ResidualSpread(g_stat_vsEta[0],g_spread_vsEta[0],g_residual_vsEta[0]); + } + } + else + { + h_stat[-1] = new TH1F("h_stat_EEM","",nBins_stat,statMin,statMax); + h_stat[0] = new TH1F("h_stat_EE", "",nBins_stat,statMin,statMax); + h_stat[+1] = new TH1F("h_stat_EEP","",nBins_stat,statMin,statMax); + g_stat_vsEta[-1] = new TGraphErrors(); + g_stat_vsEta[0] = new TGraphErrors(); + g_stat_vsEta[+1] = new TGraphErrors(); + g_residual_vsEta[-1] = new TGraphErrors(); + g_residual_vsEta[0] = new TGraphErrors(); + g_residual_vsEta[+1] = new TGraphErrors(); + + if( evalStat ) + { + BookSpreadHistos_EE(h_stat, h_stat_vsEta, g_stat_vsEta, + eRings,etaRingWidth, + "EE_stat_vsEta",nBins_stat,statMin,statMax, + h2_IC_raw_phiNorm_even,h2_IC_raw_phiNorm_odd); + + h_stat[-1] -> Write(); + h_stat[0] -> Write(); + h_stat[+1] -> Write(); + //for(unsigned int i = 0; i < h_stat_vsEta[0].size(); ++i) + //{ + // h_stat_vsEta[-1].at(i) -> Write(); + // h_stat_vsEta[0].at(i) -> Write(); + // h_stat_vsEta[+1].at(i) -> Write(); + //} + g_stat_vsEta[-1] -> Write("g_stat_vsEta_EEM"); + g_stat_vsEta[0] -> Write("g_stat_vsEta_EE"); + g_stat_vsEta[+1] -> Write("g_stat_vsEta_EEP"); + + ResidualSpread(g_stat_vsEta[-1],g_spread_vsEta[-1],g_residual_vsEta[-1]); + ResidualSpread(g_stat_vsEta[0], g_spread_vsEta[0], g_residual_vsEta[0]); + ResidualSpread(g_stat_vsEta[+1],g_spread_vsEta[+1],g_residual_vsEta[+1]); + } + } + + outFile -> cd(); + + + + + + + //////////////////////////////////////// + // apply corrections for crack structure + //////////////////////////////////////// + std::cout << ">>> Draw plots for crack-corrected IC" << std::endl; + + TF1* pol0_EBM = new TF1("pol0_EBM","pol0",4.,16.); + TF1* pol0_EBP = new TF1("pol0_EBP","pol0",4.,16.); + + if( isEB == true ) + { + pol0_EBP -> SetLineColor(kRed+2); + pol0_EBM -> SetLineColor(kRed+2); + pol0_EBP -> SetLineStyle(7); + pol0_EBM -> SetLineStyle(7); + + g_avgIC_vsPhiFold_EBM -> Fit("pol0_EBM","QRS+"); + g_avgIC_vsPhiFold_EBP -> Fit("pol0_EBP","QRS+"); + + outFile -> cd("raw"); + + pol0_EBM -> Write(); + pol0_EBP -> Write(); + } + + outFile -> cd(); + + + + if( isEB == true ) + { + for(int ibin = 1; ibin <= h2_IC_crackCorr[0]->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= h2_IC_crackCorr[0]->GetNbinsY(); ++jbin) + { + float IC = h2_IC_raw_phiNorm[0] -> GetBinContent(ibin,jbin); + + float phiRegionMin = h2_IC_crackCorr[0]->GetXaxis()->GetBinLowEdge(ibin); + int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ) % 20; + + float etaBinCenter = h2_IC_crackCorr[0]->GetYaxis()->GetBinCenter(jbin); + + double phiFold,ICPhiFoldAvg; + if( etaBinCenter < 0. ) + { + g_avgIC_vsPhiFold_EBM -> GetPoint(phiRegion,phiFold,ICPhiFoldAvg); + h2_IC_crackCorr[0] -> SetBinContent(ibin,jbin,IC*pol0_EBM->GetParameter(0)/ICPhiFoldAvg); + } + if( etaBinCenter > 0. ) + { + g_avgIC_vsPhiFold_EBP -> GetPoint(phiRegion,phiFold,ICPhiFoldAvg); + h2_IC_crackCorr[0] -> SetBinContent(ibin,jbin,IC*pol0_EBM->GetParameter(0)/ICPhiFoldAvg); + } + } + + NormalizeIC_EB(h2_IC_crackCorr[0],h2_IC_crackCorr_phiNorm[0],TT_centre[0]); + + outFile -> mkdir("crackCorr"); + outFile -> cd("crackCorr"); + } + + + + //-------------- + // spread histos + std::cout << ">>>>>> spread histos" << std::endl; + + TH1F* h_spread_crackCorr = new TH1F("h_spread_crackCorr","",nBins_spread,spreadMin,spreadMax); + std::vector h_spread_vsEta_crackCorr; + TGraphErrors* g_spread_vsEta_crackCorr = new TGraphErrors(); + + if( isEB == true ) + { + BookSpreadHistos_EB(h_spread_crackCorr, h_spread_vsEta_crackCorr, g_spread_vsEta_crackCorr, etaRingWidth, + "EB_spread_vsEta_crackCorr",nBins_spread,spreadMin,spreadMax, + h2_IC_crackCorr_phiNorm[0]); + + h_spread_crackCorr -> Write(); + //for(unsigned int i = 0; i < h_spread_vsEta_crackCorr.size(); ++i) + // h_spread_vsEta_crackCorr.at(i) -> Write(); + g_spread_vsEta_crackCorr -> Write("g_spread_vsEta_crackCorr"); + } + + + + //------------------- + // phi profile histos + std::cout << ">>>>>> phi profile histos" << std::endl; + + TH1F* h_phiAvgICSpread_crackCorr = new TH1F("h_phiAvgICSpread_crackCorr","",nBins_spread,spreadMin,spreadMax); + TGraphErrors* g_avgIC_vsPhi_crackCorr = new TGraphErrors(); + + if( isEB == true ) + { + PhiProfile(h_phiAvgICSpread_crackCorr, g_avgIC_vsPhi_crackCorr, phiRegionWidth, h2_IC_crackCorr_phiNorm[0]); + + h_phiAvgICSpread_crackCorr -> Write(); + g_avgIC_vsPhi_crackCorr -> Write("g_avgIC_vsPhi_crackCorr"); + } + + + + //------------------------ + // phi-fold profile histos + std::cout << ">>>>>> phi-fold profile histos" << std::endl; + + TGraphErrors* g_avgIC_vsPhiFold_crackCorr_EBM = new TGraphErrors(); + TGraphErrors* g_avgIC_vsPhiFold_crackCorr_EBP = new TGraphErrors(); + + if( isEB == true ) + { + PhiFoldProfile_EB(g_avgIC_vsPhiFold_crackCorr_EBM, g_avgIC_vsPhiFold_crackCorr_EBP, phiRegionWidth, h2_IC_crackCorr_phiNorm[0]); + + g_avgIC_vsPhiFold_crackCorr_EBM -> Write("g_avgIC_vsPhiFold_crackCorr_EBM"); + g_avgIC_vsPhiFold_crackCorr_EBP -> Write("g_avgIC_vsPhiFold_crackCorr_EBP"); + } + + + + //----------------------------- + // statistical precision histos + std::cout << ">>>>>> stat histos" << std::endl; + + std::vector h_stat_vsEta_crackCorr; + + TH1F* h_stat_crackCorr = new TH1F("h_stat_crackCorr","",nBins_stat,statMin,statMax); + TGraphErrors* g_stat_vsEta_crackCorr = new TGraphErrors(); + TGraphErrors* g_residual_vsEta_crackCorr = new TGraphErrors(); + + if( isEB == true) + { + + if( evalStat ) + { + BookSpreadHistos_EB(h_stat_crackCorr, h_stat_vsEta_crackCorr, g_stat_vsEta_crackCorr, etaRingWidth, + "EB_stat_vsEta_crackCorr",nBins_stat,statMin,statMax, + h2_IC_raw_phiNorm_even[0],h2_IC_raw_phiNorm_odd[0]); + + h_stat_crackCorr -> Write(); + //for(unsigned int i = 0; i < h_stat_vsEta_crackCorr.size(); ++i) + // h_stat_vsEta_crackCorr.at(i) -> Write(); + g_stat_vsEta_crackCorr -> Write("g_stat_vsEta_crackCorr"); + + + ResidualSpread(g_stat_vsEta_crackCorr, g_spread_vsEta_crackCorr,g_residual_vsEta_crackCorr); + g_residual_vsEta_crackCorr -> Write("g_residual_vsEta_crackCorr"); + } + } + outFile -> cd(); + + + + + + + ///////////////////////////////////////////////////////////// + // draw plots + ///////////////////////////////////////////////////////////// + + if( isEB == true ) + { + DrawICMap(h2_IC_raw_phiNorm[0], outputFolder+"/EB_h2_IC_raw_phiNorm", "png",isEB); + DrawICMap(h2_IC_crackCorr_phiNorm[0],outputFolder+"/EB_h2_IC_crackCorr_phiNorm","png",isEB); + + DrawSpreadHisto(h_spread[0], outputFolder+"/EB_h_spread", "f_EB_spread_vsEta", "png",isEB); + DrawSpreadHisto(h_spread_crackCorr,outputFolder+"/EB_h_spread_crackCorr","f_EB_spread_vsEta_crackCorr","png",isEB); + + DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EB_g_spread_vsEta", "png",isEB,g_stat_vsEta[0]); + DrawSpreadGraph(g_spread_vsEta_crackCorr,outputFolder+"/EB_g_spread_vsEta_crackCorr","png",isEB,g_stat_vsEta_crackCorr); + + DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EB_g_residual_vsEta", "png",isEB); + DrawResidualGraph(g_residual_vsEta_crackCorr,outputFolder+"/EB_g_residual_vsEta_crackCorr","png",isEB); + + DrawPhiAvgICSpread(h_phiAvgICSpread[0], outputFolder+"/EB_h_phiAvgICSpread", "png",isEB); + DrawPhiAvgICSpread(h_phiAvgICSpread_crackCorr,outputFolder+"/EB_h_phiAvgICSpread_crackCorr","png",isEB); + + DrawAvgICVsPhiGraph(g_avgIC_vsPhi[0], outputFolder+"/EB_g_avgIC_vsPhi", "png",kRed+2, isEB); + DrawAvgICVsPhiGraph(g_avgIC_vsPhi_crackCorr,outputFolder+"/EB_g_avgIC_vsPhi_crackCorr","png",kGreen+2,isEB); + + DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBM,g_avgIC_vsPhiFold_crackCorr_EBM,outputFolder+"/EBM_g_avgIC_vsPhiFold","png",isEB); + DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBP,g_avgIC_vsPhiFold_crackCorr_EBP,outputFolder+"/EBP_g_avgIC_vsPhiFold","png",isEB); + } + else + { + DrawICMap(h2_IC_raw_phiNorm[-1],outputFolder+"/EEM_h2_IC_raw_phiNorm","png",isEB); + DrawICMap(h2_IC_raw_phiNorm[+1],outputFolder+"/EEP_h2_IC_raw_phiNorm","png",isEB); + + DrawSpreadHisto(h_spread[-1],outputFolder+"/EEM_h_spread","f_EE_spread_vsEta_EEM","png",isEB); + DrawSpreadHisto(h_spread[0], outputFolder+"/EE_h_spread","f_EE_spread_vsEta_EE", "png",isEB); + DrawSpreadHisto(h_spread[+1],outputFolder+"/EEP_h_spread","f_EE_spread_vsEta_EEP","png",isEB); + + DrawSpreadGraph(g_spread_vsEta[-1],outputFolder+"/EEM_g_spread_vsEta","png",isEB,g_stat_vsEta[-1]); + DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EE_g_spread_vsEta","png",isEB,g_stat_vsEta[0]); + DrawSpreadGraph(g_spread_vsEta[+1],outputFolder+"/EEP_g_spread_vsEta","png",isEB,g_stat_vsEta[+1]); + + DrawResidualGraph(g_residual_vsEta[-1],outputFolder+"/EEM_g_residual_vsEta","png",isEB); + DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EE_g_residual_vsEta","png",isEB); + DrawResidualGraph(g_residual_vsEta[+1],outputFolder+"/EEP_g_residual_vsEta","png",isEB); + + DrawPhiAvgICSpread(h_phiAvgICSpread[-1],outputFolder+"/EEM_h_phiAvgICSpread","png",isEB); + DrawPhiAvgICSpread(h_phiAvgICSpread[+1],outputFolder+"/EEP_h_phiAvgICSpread","png",isEB); + + DrawAvgICVsPhiGraph(g_avgIC_vsPhi[-1],outputFolder+"/EEM_g_avgIC_vsPhi","png",kRed+2,isEB); + DrawAvgICVsPhiGraph(g_avgIC_vsPhi[+1],outputFolder+"/EEP_g_avgIC_vsPhi","png",kRed+2,isEB); + } + + outFile -> Close(); + + + + + + + //------------------------------------------------------ + // Dump IC in a txt file ---> IC from isolated electrons + + std::ofstream outTxt((outputFolder+"/"+outputTxt+"_relative.txt").c_str(),std::ios::out); + + //outTxt << "---------------------------------------------------------------" << std::endl; + //if( isEB == true ) + // outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iEta" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iPhi" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" + // << std::fixed << std::setprecision(6) << std::setw(15) << "IC" + // << std::fixed << std::setprecision(6) << std::setw(15) << "error" + // << std::endl; + //else + // outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iX" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iY" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" + // << std::fixed << std::setprecision(6) << std::setw(15) << "IC" + // << std::fixed << std::setprecision(6) << std::setw(15) << "error" + // << std::endl; + //outTxt << "---------------------------------------------------------------" << std::endl; + + + std::map h2_final; + + if( isEB == true) + { + h2_final[0] = h2_IC_crackCorr_phiNorm[0]; + } + else + { + h2_final[-1] = h2_IC_raw_phiNorm[-1]; + h2_final[+1] = h2_IC_raw_phiNorm[+1]; + } + + + if( isEB == true ) + { + for(int jbin = 1; jbin < h2_final[0]->GetNbinsY()+1; ++jbin) + { + float iEta = h2_final[0] -> GetYaxis() -> GetBinLowEdge(jbin); + + if( iEta == 0. ) continue; // skip ieta=0 + + double x, statPrec; + if( iEta < 0 ) + g_stat_vsEta[0] -> GetPoint(int(fabs(iEta+1)),x,statPrec); //mirroring of the folded precision + else + g_stat_vsEta[0] -> GetPoint(int(fabs(iEta-1)),x,statPrec); //mirroring of the folded precision + + for(int ibin = 1; ibin < h2_final[0]->GetNbinsX()+1; ++ibin) + { + float IC = h2_final[0] -> GetBinContent(ibin,jbin); + + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[0]->GetYaxis()->GetBinLowEdge(jbin) + << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[0]->GetXaxis()->GetBinLowEdge(ibin) + << std::fixed << std::setprecision(0) << std::setw(10) << "0"; //iz for the barrel + + if( IC == 0. ) + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << IC + << std::fixed << std::setprecision(6) << std::setw(15) << statPrec + << std::endl; + } + } + } + } + else + { + for(int iz = -1; iz <= 1; ++iz) + { + if( iz == 0 ) continue; + + for(int ix = 1; ix < h2_final[iz]->GetNbinsX()+1; ++ix) + { + for (int iy = 1; iy < h2_final[iz] -> GetNbinsY()+1; ++iy) + { + if( existingEE->GetBinContent(ix,iy) != 1 ) continue; + + float IC = h2_final[iz]->GetBinContent(ix,iy); + + double x,statPrec,y,sysPrec; + g_stat_vsEta[iz] -> GetPoint(int(eRings->GetEndcapRing(ix,iy,iz)),x,statPrec); + MCSystematic_EE -> GetPoint(int(eRings->GetEndcapRing(ix,iy,iz)),y,sysPrec); + + if( IC > 0. && IC < 2. ) + { + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << iz + << std::fixed << std::setprecision(6) << std::setw(15) << IC + << std::fixed << std::setprecision(6) << std::setw(15) << sqrt( statPrec*statPrec + sysPrec*sysPrec ) + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << iz + << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + } + } + } + } + + + + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp b/EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp new file mode 100644 index 00000000000..d993f4f5490 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp @@ -0,0 +1,1087 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "TStyle.h" +#include "TROOT.h" +#include "TH1F.h" +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TString.h" +#include "TGraphErrors.h" +#include "../interface/TEndcapRings.h" +#include "TLegend.h" +#include "TApplication.h" + +using namespace std; + +int main (int argc, char**argv){ + +if(argc!=3){ + std::cerr<<" Wrongs input "<Reset(); +gROOT->SetStyle("Plain"); + +gStyle->SetPadTickX(1); +gStyle->SetPadTickY(1); +gStyle->SetOptTitle(1); +gStyle->SetOptStat(0); +gStyle->SetFitFormat("6.3g"); +gStyle->SetPalette(1); +gStyle->SetOptTitle(0); + +gStyle->SetTextFont(42); +gStyle->SetTextSize(0.05); +gStyle->SetTitleFont(42,"xyz"); +gStyle->SetTitleSize(0.05); +gStyle->SetLabelFont(42,"xyz"); +gStyle->SetLabelSize(0.05); +gStyle->SetTitleXOffset(0.8); +gStyle->SetTitleYOffset(1.1); +gROOT->ForceStyle(); + + + +int iPhi, iEta, iz; +double ic, eic; + +/// Histo for first ic set +TString Name = Form("mapEB_%s",inputFile1.c_str()); +TH2F * map1_EB = new TH2F(Name,Name,360,1, 361, 171, -85, 86); +Name = Form("mapEEp_%s",inputFile1.c_str()); +TH2F * map1_EEp = new TH2F(Name,Name,100,1, 101, 100, 1, 101); +Name = Form("mapEEm_%s",inputFile1.c_str()); +TH2F * map1_EEm = new TH2F(Name,Name,100,1, 101, 100, 1, 101); + +std::cout<<" Opening first file ..... reading "<> iEta >> iPhi >> iz >> ic >> eic ; +if(iz==0) map1_EB->Fill(iPhi,iEta,ic); +if(iz==1) map1_EEp->Fill(iEta,iPhi,ic); +if(iz==-1)map1_EEm->Fill(iEta,iPhi,ic); +} +std::cout<<" End first file "<> iEta >> iPhi >> iz >> ic >> eic ; +if(iz==0) map2_EB->Fill(iPhi,iEta,ic); +if(iz==1) map2_EEp->Fill(iEta,iPhi,ic); +if(iz==-1) map2_EEm->Fill(iEta,iPhi,ic); +} +std::cout<<" End second file "<Clone("diffmapEB"); +diffmap_EB->Reset(); + +Name = Form("diffmapEEp"); +TH2F * diffmap_EEp = (TH2F*) map1_EEp->Clone("diffmapEEp"); +diffmap_EEp->Reset(); + +Name = Form("diffmapEEm"); +TH2F * diffmap_EEm = (TH2F*) map1_EEm->Clone("diffmapEEm"); +diffmap_EEm->Reset(); + +Name = Form("ratiomapEB"); +TH2F * ratiomap_EB = (TH2F*) map1_EB->Clone("ratiomapEB"); +ratiomap_EB->Reset(); + +Name = Form("ratiomapEEp"); +TH2F * ratiomap_EEp = (TH2F*) map1_EEp->Clone("ratiomapEEp"); +ratiomap_EEp->Reset(); + +Name = Form("ratiomapEEm"); +TH2F * ratiomap_EEm = (TH2F*) map1_EEm->Clone("ratiomapEEm"); +ratiomap_EEm->Reset(); + +Name = Form("diffHistEB"); +TH1F * diffHistEB = new TH1F(Name,Name,100,-0.6,0.6); +diffHistEB->SetLineWidth(2); + +Name = Form("diffHistEEp"); +TH1F * diffHistEEp = new TH1F(Name,Name,100,-0.6,0.6); +diffHistEEp->SetLineWidth(2); + +Name = Form("diffHistEEm"); +TH1F * diffHistEEm = new TH1F(Name,Name,100,-0.6,0.6); +diffHistEEm->SetLineWidth(2); + +Name = Form("correlationEB"); +TH2F * correlationEB = new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); + +Name = Form("correlationEEp"); +TH2F * correlationEEp= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); + +Name = Form("correlationEEm"); +TH2F * correlationEEm= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); + + + + + +for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + for(int iEta=1; iEtaGetNbinsY()+1; iEta++){ + + if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map2_EB->GetBinContent(iPhi,iEta)==-1.){ + diffmap_EB->SetBinContent(iPhi,iEta,-1.); + ratiomap_EB->SetBinContent(iPhi,iEta,-1.); + continue;} + + diffmap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta)); + diffHistEB->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta)); + ratiomap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta)); + correlationEB->Fill(map1_EB->GetBinContent(iPhi,iEta),map2_EB->GetBinContent(iPhi,iEta)); + + } +} + +for(int ix =1; ixGetNbinsX()+1; ix++){ + for(int iy=1; iyGetNbinsY()+1; iy++){ + + if(map1_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==-1.){ + diffmap_EEp->SetBinContent(ix,iy,-1.); + ratiomap_EEp->SetBinContent(ix,iy,-1.); + continue;} + + diffmap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy)); + diffHistEEp->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy)); + ratiomap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy)); + correlationEEp->Fill(map1_EEp->GetBinContent(ix,iy),map2_EEp->GetBinContent(ix,iy)); + + } +} + +for(int ix =1; ixGetNbinsX()+1; ix++){ + for(int iy=1; iyGetNbinsY()+1; iy++){ + + if(map1_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==-1.){ + diffmap_EEm->SetBinContent(ix,iy,-1.); + ratiomap_EEm->SetBinContent(ix,iy,-1.); + continue;} + + diffmap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy)); + diffHistEEm->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy)); + ratiomap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy)); + correlationEEm->Fill(map1_EEm->GetBinContent(ix,iy),map2_EEm->GetBinContent(ix,iy)); + + } +} + + + +/// Profile along phi for EB: + +TGraphErrors *phiProjectionEB1 = new TGraphErrors(); +phiProjectionEB1->SetMarkerStyle(20); +phiProjectionEB1->SetMarkerSize(1); +phiProjectionEB1->SetMarkerColor(kBlue); + +TGraphErrors *phiProjectionEB2 = new TGraphErrors(); +phiProjectionEB2->SetMarkerStyle(20); +phiProjectionEB2->SetMarkerSize(1); +phiProjectionEB2->SetMarkerColor(kRed); + + +for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + double sumEta=0, nEta=0; + + for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map1_EB->GetBinContent(iPhi,iEta)==0.) continue; + sumEta=sumEta+map1_EB->GetBinContent(iPhi,iEta); + nEta++; + } + phiProjectionEB1->SetPoint(iPhi-1,iPhi-1,sumEta/nEta); + phiProjectionEB1->SetPointError(iPhi-1,0.,0.002); + } + +for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + double sumEta=0, nEta=0; + + for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + if(map2_EB->GetBinContent(iPhi,iEta)==-1.||map2_EB->GetBinContent(iPhi,iEta)==0. ) continue; + sumEta=sumEta+map2_EB->GetBinContent(iPhi,iEta); + nEta++; + } + phiProjectionEB2->SetPoint(iPhi-1,iPhi-1,sumEta/nEta); + phiProjectionEB2->SetPointError(iPhi-1,0.,0.002); + } + +/// Profile along phi for EE+: + +TEndcapRings *eRings = new TEndcapRings(); +std::vector vectSum; +std::vector vectCounter; + +vectCounter.assign(360,0.); +vectSum.assign(360,0.); + + +TGraphErrors *phiProjectionEEp1 = new TGraphErrors(); +phiProjectionEEp1->SetMarkerStyle(20); +phiProjectionEEp1->SetMarkerSize(1); +phiProjectionEEp1->SetMarkerColor(kBlue); + +TGraphErrors *phiProjectionEEp2 = new TGraphErrors(); +phiProjectionEEp2->SetMarkerStyle(20); +phiProjectionEEp2->SetMarkerSize(1); +phiProjectionEEp2->SetMarkerColor(kRed); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEp->GetBinContent(ix,iy)==-1. || map1_EEp->GetBinContent(ix,iy)==0. ) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map1_EEp->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + int j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEp->GetBinContent(ix,iy)==-1. ||map2_EEp->GetBinContent(ix,iy)==0.) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map2_EEp->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iSetMarkerStyle(20); +phiProjectionEEm1->SetMarkerSize(1); +phiProjectionEEm1->SetMarkerColor(kBlue); + +TGraphErrors *phiProjectionEEm2 = new TGraphErrors(); +phiProjectionEEm2->SetMarkerStyle(20); +phiProjectionEEm2->SetMarkerSize(1); +phiProjectionEEm2->SetMarkerColor(kRed); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEm->GetBinContent(ix,iy)==-1. || map1_EEm->GetBinContent(ix,iy)==0. ) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map1_EEm->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==0.) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map2_EEm->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; +} + + for(unsigned int i=0; iSetMarkerStyle(20); +etaProjectionEB1->SetMarkerSize(1); +etaProjectionEB1->SetMarkerColor(kBlue); + +TGraphErrors *etaProjectionEB2 = new TGraphErrors(); +etaProjectionEB2->SetMarkerStyle(20); +etaProjectionEB2->SetMarkerSize(1); +etaProjectionEB2->SetMarkerColor(kRed); + + +for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + double sumPhi=0, nPhi=0; + + for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + if(map1_EB->GetBinContent(iPhi,iEta)==-1.) continue; + sumPhi=sumPhi+map1_EB->GetBinContent(iPhi,iEta); + nPhi++; + } + etaProjectionEB1->SetPoint(iEta-1,iEta-1,sumPhi/nPhi); + etaProjectionEB1->SetPointError(iEta-1,0.,0.002); + } + +for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + double sumPhi=0, nPhi=0; + + for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + if(map2_EB->GetBinContent(iPhi,iEta)==-1.) continue; + sumPhi=sumPhi+map2_EB->GetBinContent(iPhi,iEta); + nPhi++; + } + etaProjectionEB2->SetPoint(iEta-1,iEta-1,sumPhi/nPhi); + etaProjectionEB2->SetPointError(iEta-1,0.,0.002); + } + + +/// projection along eta for EE+: + +TGraphErrors *etaProjectionEEp1 = new TGraphErrors(); +etaProjectionEEp1->SetMarkerStyle(20); +etaProjectionEEp1->SetMarkerSize(1); +etaProjectionEEp1->SetMarkerColor(kBlue); + +TGraphErrors *etaProjectionEEp2 = new TGraphErrors(); +etaProjectionEEp2->SetMarkerStyle(20); +etaProjectionEEp2->SetMarkerSize(1); +etaProjectionEEp2->SetMarkerColor(kRed); + +vectCounter.clear(); +vectSum.clear(); +vectCounter.assign(360,0.); +vectSum.assign(360,0.); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEp->GetBinContent(ix,iy)==-1. || map1_EEp->GetBinContent(ix,iy)==0.) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>360)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map1_EEp->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==0. ) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>360)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map2_EEp->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iSetMarkerStyle(20); +etaProjectionEEm1->SetMarkerSize(1); +etaProjectionEEm1->SetMarkerColor(kBlue); + +TGraphErrors *etaProjectionEEm2 = new TGraphErrors(); +etaProjectionEEm2->SetMarkerStyle(20); +etaProjectionEEm2->SetMarkerSize(1); +etaProjectionEEm2->SetMarkerColor(kRed); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEm->GetBinContent(ix,iy)==-1.||map1_EEm->GetBinContent(ix,iy)==0.) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>360)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map1_EEm->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==0.) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>171)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map2_EEm->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEB1->GetPoint(i,x,y); + phiProfileEB1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEB2->GetPoint(i,x,y); + phiProfileEB2->Fill(y); + } + +TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEB1->GetRMS()); +fgaus->SetRange(1-5*phiProfileEB1->GetRMS(),1+5*phiProfileEB1->GetRMS()); +fgaus->SetLineColor(kBlue); +phiProfileEB1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEB2->GetRMS()); +fgaus->SetRange(1-5*phiProfileEB2->GetRMS(),1+5*phiProfileEB2->GetRMS()); +fgaus->SetLineColor(kRed); +phiProfileEB2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + phiProjectionEEp1->GetPoint(i,x,y); + phiProfileEEp1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEEp2->GetPoint(i,x,y); + phiProfileEEp2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEp1->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEp1->GetRMS(),1+5*phiProfileEEp1->GetRMS()); +fgaus->SetLineColor(kBlue); +phiProfileEEp1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEp2->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEp2->GetRMS(),1+5*phiProfileEEp2->GetRMS()); +fgaus->SetLineColor(kRed); +phiProfileEEp2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + phiProjectionEEm1->GetPoint(i,x,y); + phiProfileEEm1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEEm2->GetPoint(i,x,y); + phiProfileEEm2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEm1->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEm1->GetRMS(),1+5*phiProfileEEm1->GetRMS()); +fgaus->SetLineColor(kBlue); +phiProfileEEm1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEm2->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEm2->GetRMS(),1+5*phiProfileEEm2->GetRMS()); +fgaus->SetLineColor(kRed); +phiProfileEEm2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + etaProjectionEB1->GetPoint(i,x,y); + etaProfileEB1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + etaProjectionEB2->GetPoint(i,x,y); + etaProfileEB2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEB1->GetRMS()); +fgaus->SetRange(1-5*etaProfileEB1->GetRMS(),1+5*etaProfileEB1->GetRMS()); +fgaus->SetLineColor(kBlue); +etaProfileEB1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEB2->GetRMS()); +fgaus->SetRange(1-5*etaProfileEB2->GetRMS(),1+5*etaProfileEB2->GetRMS()); +fgaus->SetLineColor(kRed); +etaProfileEB2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + etaProjectionEEp1->GetPoint(i,x,y); + etaProfileEEp1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + etaProjectionEEp2->GetPoint(i,x,y); + etaProfileEEp2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEp1->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEp1->GetRMS(),1+5*etaProfileEEp1->GetRMS()); +fgaus->SetLineColor(kBlue); +etaProfileEEp1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEp2->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEp2->GetRMS(),1+5*etaProfileEEp2->GetRMS()); +fgaus->SetLineColor(kRed); +etaProfileEEp2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + etaProjectionEEm1->GetPoint(i,x,y); + etaProfileEEm1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + etaProjectionEEm2->GetPoint(i,x,y); + etaProfileEEm2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEm1->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEm1->GetRMS(),1+5*etaProfileEEm1->GetRMS()); +fgaus->SetLineColor(kBlue); +etaProfileEEm1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEm2->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEm2->GetRMS(),1+5*etaProfileEEm2->GetRMS()); +fgaus->SetLineColor(kRed); +etaProfileEEm2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetLeftMargin(0.1); + c[0]->SetRightMargin(0.13); + c[0]->SetGridx(); + + diffmap_EB->GetXaxis()->SetNdivisions(1020); + diffmap_EB->GetXaxis() -> SetLabelSize(0.03); + diffmap_EB->GetXaxis() ->SetTitle("i#phi"); + diffmap_EB->GetYaxis() ->SetTitle("i#eta"); + diffmap_EB->GetZaxis() ->SetRangeUser(-0.1,0.1); + diffmap_EB->Draw("COLZ"); + + c[1] = new TCanvas("histdiffEB","histdiffEB"); + c[1]->SetLeftMargin(0.1); + c[1]->SetRightMargin(0.13); + c[1]->SetLogy(); + + diffHistEB->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); + diffHistEB->Draw(); + + + c[2] = new TCanvas("hratioEB","hratioEB"); + c[2]->SetLeftMargin(0.1); + c[2]->SetRightMargin(0.13); + c[2]->SetGridx(); + + ratiomap_EB->GetXaxis()->SetNdivisions(1020); + ratiomap_EB->GetXaxis() -> SetLabelSize(0.03); + ratiomap_EB->GetXaxis() ->SetTitle("i#phi"); + ratiomap_EB->GetYaxis() ->SetTitle("i#eta"); + ratiomap_EB->GetZaxis() ->SetRangeUser(0.95,1.05); + ratiomap_EB->Draw("COLZ"); + + c[3] = new TCanvas("correlationEB","correlationEB"); + c[3]->SetLeftMargin(0.1); + c[3]->SetRightMargin(0.13); + c[3]->SetGridx(); + c[3]->SetGridy(); + + correlationEB->GetXaxis()->SetNdivisions(1020); + correlationEB->GetXaxis() -> SetLabelSize(0.03); + correlationEB->GetXaxis() ->SetTitle("c_{#pi}"); + correlationEB->GetYaxis() ->SetTitle("c_{ele}"); + correlationEB->Draw("COLZ"); + + + c[4] = new TCanvas("hdiffEEp","hdiffEEp"); + c[4]->SetLeftMargin(0.1); + c[4]->SetRightMargin(0.13); + c[4]->SetGridx(); + + diffmap_EEp->GetXaxis()->SetNdivisions(1020); + diffmap_EEp->GetXaxis() -> SetLabelSize(0.03); + diffmap_EEp->GetXaxis() ->SetTitle("ix"); + diffmap_EEp->GetYaxis() ->SetTitle("iy"); + diffmap_EEp->GetZaxis() ->SetRangeUser(-0.15,0.15); + diffmap_EEp->Draw("COLZ"); + + c[5] = new TCanvas("histdiffEEp","histdiffEEp"); + c[5]->SetLeftMargin(0.1); + c[5]->SetRightMargin(0.13); + c[5]->SetLogy(); + + diffHistEEp->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); + diffHistEEp->Draw(); + + c[6] = new TCanvas("hratioEEp","hratioEEp"); + c[6]->SetLeftMargin(0.1); + c[6]->SetRightMargin(0.13); + c[6]->SetGridx(); + + ratiomap_EEp->GetXaxis()->SetNdivisions(1020); + ratiomap_EEp->GetXaxis() -> SetLabelSize(0.03); + ratiomap_EEp->GetXaxis() ->SetTitle("ix"); + ratiomap_EEp->GetYaxis() ->SetTitle("iy"); + ratiomap_EEp->GetZaxis() ->SetRangeUser(0.9,1.1); + ratiomap_EEp->Draw("COLZ"); + + c[7] = new TCanvas("correlationEEp","correlationEEp"); + c[7]->SetLeftMargin(0.1); + c[7]->SetRightMargin(0.13); + c[7]->SetGridx(); + c[7]->SetGridy(); + + correlationEEp->GetXaxis()->SetNdivisions(1020); + correlationEEp->GetXaxis() -> SetLabelSize(0.03); + correlationEEp->GetXaxis() ->SetTitle("c_{#pi}"); + correlationEEp->GetYaxis() ->SetTitle("c_{ele}"); + correlationEEp->Draw("COLZ"); + + c[8] = new TCanvas("hdiffEEm","hdiffEEm"); + c[8]->SetLeftMargin(0.1); + c[8]->SetRightMargin(0.13); + c[8]->SetGridx(); + + diffmap_EEm->GetXaxis()->SetNdivisions(1020); + diffmap_EEm->GetXaxis() -> SetLabelSize(0.03); + diffmap_EEm->GetXaxis() ->SetTitle("ix"); + diffmap_EEm->GetYaxis() ->SetTitle("iy"); + diffmap_EEm->GetZaxis() ->SetRangeUser(-0.15,0.15); + diffmap_EEm->Draw("COLZ"); + + c[9] = new TCanvas("histdiffEEm","histdiffEEm"); + c[9]->SetLeftMargin(0.1); + c[9]->SetRightMargin(0.13); + c[9]->SetLogy(); + + diffHistEEm->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); + diffHistEEm->Draw(); + + + + c[10] = new TCanvas("hratioEEm","hratioEEm"); + c[10]->SetLeftMargin(0.1); + c[10]->SetRightMargin(0.13); + c[10]->SetGridx(); + + ratiomap_EEm->GetXaxis()->SetNdivisions(1020); + ratiomap_EEm->GetXaxis() -> SetLabelSize(0.03); + ratiomap_EEm->GetXaxis() ->SetTitle("ix"); + ratiomap_EEm->GetYaxis() ->SetTitle("iy"); + ratiomap_EEm->GetZaxis() ->SetRangeUser(0.9,1.1); + ratiomap_EEm->Draw("COLZ"); + + c[11] = new TCanvas("correlationEEm","correlationEEm"); + c[11]->SetLeftMargin(0.1); + c[11]->SetRightMargin(0.13); + c[11]->SetGridx(); + c[11]->SetGridy(); + + correlationEEm->GetXaxis()->SetNdivisions(1020); + correlationEEm->GetXaxis() -> SetLabelSize(0.03); + correlationEEm->GetXaxis() ->SetTitle("c_{#pi}"); + correlationEEm->GetYaxis() ->SetTitle("c_{ele}"); + correlationEEm->Draw("COLZ"); + + + c[12] = new TCanvas("phiProjectionEB","phiProjectionEB"); + c[12]->SetGridx(); + c[12]->SetGridy(); + phiProjectionEB1->GetHistogram()->GetYaxis()-> SetRangeUser(0.85,1.1); + phiProjectionEB1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); + phiProjectionEB1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + phiProjectionEB1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); + phiProjectionEB1->Draw("apl"); + phiProjectionEB2->Draw("plsame"); + + TLegend * leg1 = new TLegend(0.75,0.75,0.89, 0.89); + leg1->AddEntry(phiProjectionEB1,"IC set 1","LP"); + leg1->AddEntry(phiProjectionEB2,"IC set 2","LP"); + leg1->SetFillColor(0); + leg1->Draw("same"); + + c[13] = new TCanvas("phiProjectionEEp","phiProjectionEEp"); + c[13]->SetGridx(); + c[13]->SetGridy(); + phiProjectionEEp1->GetHistogram()->GetYaxis()-> SetRangeUser(0.7,1.4); + phiProjectionEEp1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); + phiProjectionEEp1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + phiProjectionEEp1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); + phiProjectionEEp1->Draw("apl"); + phiProjectionEEp2->Draw("plsame"); + + TLegend * leg2 = new TLegend(0.75,0.75,0.89, 0.89); + leg2->AddEntry(phiProjectionEEp1,"IC set 1","LP"); + leg2->AddEntry(phiProjectionEEp2,"IC set 2","LP"); + leg2->SetFillColor(0); + leg2->Draw("same"); + + + c[14] = new TCanvas("phiProjectionEEm","phiProjectionEEm"); + c[14]->SetGridx(); + c[14]->SetGridy(); + phiProjectionEEm1->GetHistogram()->GetYaxis()-> SetRangeUser(0.7,1.4); + phiProjectionEEm1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); + phiProjectionEEm1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + phiProjectionEEm1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); + phiProjectionEEm1->Draw("apl"); + phiProjectionEEm2->Draw("plsame"); + + TLegend * leg3 = new TLegend(0.75,0.75,0.89, 0.89); + leg3->AddEntry(phiProjectionEEm1,"IC set 1","LP"); + leg3->AddEntry(phiProjectionEEm2,"IC set 2","LP"); + leg3->SetFillColor(0); + leg3->Draw("same"); + + c[15] = new TCanvas("etaProjectionEB","etaProjectionEB"); + c[15]->SetGridx(); + c[15]->SetGridy(); + etaProjectionEB1->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); + etaProjectionEB1->GetHistogram()->GetXaxis()-> SetRangeUser(0,171); + etaProjectionEB1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + etaProjectionEB1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + etaProjectionEB1->Draw("apl"); + etaProjectionEB2->Draw("plsame"); + + TLegend * leg4 = new TLegend(0.75,0.75,0.89, 0.89); + leg4->AddEntry(etaProjectionEB1,"IC set 1","LP"); + leg4->AddEntry(etaProjectionEB2,"IC set 2","LP"); + leg4->SetFillColor(0); + leg1->Draw("same"); + + c[16] = new TCanvas("etaProjectionEEp","etaProjectionEEp"); + c[16]->SetGridx(); + c[16]->SetGridy(); + etaProjectionEEp1->GetHistogram()->GetYaxis()-> SetRangeUser(0.55,1.5); + etaProjectionEEp1->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); + etaProjectionEEp1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + etaProjectionEEp1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + etaProjectionEEp1->Draw("apl"); + etaProjectionEEp2->Draw("plsame"); + + TLegend * leg5 = new TLegend(0.75,0.75,0.89, 0.89); + leg5->AddEntry(etaProjectionEEp1,"IC set 1","LP"); + leg5->AddEntry(etaProjectionEEp2,"IC set 2","LP"); + leg5->SetFillColor(0); + leg5->Draw("same"); + + + c[17] = new TCanvas("etaProjectionEEm","etaProjectionEEm"); + c[17]->SetGridx(); + c[17]->SetGridy(); + etaProjectionEEm1->GetHistogram()->GetYaxis()-> SetRangeUser(0.55,1.5); + etaProjectionEEm1->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); + etaProjectionEEm1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + etaProjectionEEm1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + etaProjectionEEm1->Draw("apl"); + etaProjectionEEm2->Draw("plsame"); + + TLegend * leg6 = new TLegend(0.75,0.75,0.89, 0.89); + leg6->AddEntry(etaProjectionEEm1,"IC set 1","LP"); + leg6->AddEntry(etaProjectionEEm2,"IC set 2","LP"); + leg6->SetFillColor(0); + leg6->Draw("same"); + + c[18] = new TCanvas("phiProfileEB","phiProfileEB"); + c[18]->SetGridx(); + c[18]->SetGridy(); + phiProfileEB1->GetXaxis()->SetTitle("#bar{IC}"); + phiProfileEB1->SetLineColor(kBlue); + phiProfileEB1->SetMarkerSize(0.8); + phiProfileEB1->SetLineWidth(2); + phiProfileEB2->SetLineColor(kRed); + phiProfileEB2->SetMarkerSize(0.8); + phiProfileEB2->SetLineWidth(2); + phiProfileEB1->Draw(); + phiProfileEB2->Draw("same"); + + TLegend * leg7 = new TLegend(0.6,0.7,0.89, 0.89); + leg7->SetFillColor(0); + leg7->AddEntry(phiProfileEB1,"EB Projection I set ", "LP"); + leg7->AddEntry(phiProfileEB2,"EB Projection II set ", "LP"); + leg7->Draw("same"); + + c[19] = new TCanvas("phiProfileEEp","phiProfileEEp"); + c[19]->SetGridx(); + c[19]->SetGridy(); + phiProfileEEp1->GetXaxis()->SetTitle("#bar{IC}"); + phiProfileEEp1->SetLineColor(kBlue); + phiProfileEEp1->SetMarkerSize(0.8); + phiProfileEEp1->SetLineWidth(2); + phiProfileEEp2->SetLineColor(kRed); + phiProfileEEp2->SetMarkerSize(0.8); + phiProfileEEp2->SetLineWidth(2); + phiProfileEEp1->Draw(); + phiProfileEEp2->Draw("same"); + + TLegend * leg8 = new TLegend(0.6,0.7,0.89, 0.89); + leg8->SetFillColor(0); + leg8->AddEntry(phiProfileEEp1,"EE+ Projection I set ", "LP"); + leg8->AddEntry(phiProfileEEp2,"EE+ Projection II set ", "LP"); + leg8->Draw("same"); + + c[20] = new TCanvas("phiProfileEEm","phiProfileEEm"); + c[20]->SetGridx(); + c[20]->SetGridy(); + phiProfileEEm1->GetXaxis()->SetTitle("#bar{IC}"); + phiProfileEEm1->SetLineColor(kBlue); + phiProfileEEm1->SetMarkerSize(0.8); + phiProfileEEm1->SetLineWidth(2); + phiProfileEEm2->SetLineColor(kRed); + phiProfileEEm2->SetMarkerSize(0.8); + phiProfileEEm2->SetLineWidth(2); + phiProfileEEm1->Draw(); + phiProfileEEm2->Draw("same"); + + TLegend * leg9 = new TLegend(0.6,0.7,0.89, 0.89); + leg9->SetFillColor(0); + leg9->AddEntry(phiProfileEEm1,"EE- Projection I set ", "LP"); + leg9->AddEntry(phiProfileEEm2,"EE- Projection II set ", "LP"); + leg9->Draw("same"); + + c[21] = new TCanvas("etaProfileEB","etaProfileEB"); + c[21]->SetGridx(); + c[21]->SetGridy(); + etaProfileEB1->GetXaxis()->SetTitle("#bar{IC}"); + etaProfileEB1->SetLineColor(kBlue); + etaProfileEB1->SetMarkerSize(0.8); + etaProfileEB1->SetLineWidth(2); + etaProfileEB2->SetLineColor(kRed); + etaProfileEB2->SetMarkerSize(0.8); + etaProfileEB2->SetLineWidth(2); + etaProfileEB1->Draw(); + etaProfileEB2->Draw("same"); + + TLegend * leg10 = new TLegend(0.6,0.7,0.89, 0.89); + leg10->SetFillColor(0); + leg10->AddEntry(etaProfileEB1,"EB Projection I set ", "LP"); + leg10->AddEntry(etaProfileEB2,"EB Projection II set ", "LP"); + leg10->Draw("same"); + + c[22] = new TCanvas("etaProfileEEp","etaProfileEEp"); + c[22]->SetGridx(); + c[22]->SetGridy(); + etaProfileEEp1->GetXaxis()->SetTitle("#bar{IC}"); + etaProfileEEp1->SetLineColor(kBlue); + etaProfileEEp1->SetMarkerSize(0.8); + etaProfileEEp1->SetLineWidth(2); + etaProfileEEp2->SetLineColor(kRed); + etaProfileEEp2->SetMarkerSize(0.8); + etaProfileEEp2->SetLineWidth(2); + etaProfileEEp1->Draw(); + etaProfileEEp2->Draw("same"); + + TLegend * leg11 = new TLegend(0.6,0.7,0.89, 0.89); + leg11->SetFillColor(0); + leg11->AddEntry(phiProfileEEp1,"EE+ Projection I set ", "LP"); + leg11->AddEntry(phiProfileEEp2,"EE+ Projection II set ", "LP"); + leg11->Draw("same"); + + c[23] = new TCanvas("etaProfileEEm","etaProfileEEm"); + c[23]->SetGridx(); + c[23]->SetGridy(); + etaProfileEEm1->GetXaxis()->SetTitle("#bar{IC}"); + etaProfileEEm1->SetLineColor(kBlue); + etaProfileEEm1->SetMarkerSize(0.8); + etaProfileEEm1->SetLineWidth(2); + etaProfileEEm2->SetLineColor(kRed); + etaProfileEEm2->SetMarkerSize(0.8); + etaProfileEEm2->SetLineWidth(2); + etaProfileEEm1->Draw(); + etaProfileEEm2->Draw("same"); + + TLegend * leg12 = new TLegend(0.6,0.7,0.89, 0.89); + leg12->SetFillColor(0); + leg12->AddEntry(phiProfileEEm1,"EE- Projection I set ", "LP"); + leg12->AddEntry(phiProfileEEm2,"EE- Projection II set ", "LP"); + leg12->Draw("same"); + +theApp->Run(); + +return 0; + +} + + diff --git a/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp b/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp new file mode 100644 index 00000000000..881e2e8d9d8 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp @@ -0,0 +1,256 @@ +/// Stand-alone program for compare calibration result obtained on MC with +/// the original configuration for EB Input: IC 2D map after L3 calib + +#include +#include "TH2F.h" +#include "TH1F.h" +#include "TCanvas.h" +#include "TFile.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TGraphErrors.h" +#include "TF1.h" +#include "TApplication.h" + +#include "../../NtuplePackage/interface/ntpleUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + + +int main(int argc, char**argv){ + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + + /// Input File MCTruth IC Map , RECO IC map, MC IC set after calibration (Usually set with miscalibration 5%) + /// and StatPrecision IC coefficient obtained from CalibrationBarrel.cpp + + if(argc != 2){ + std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + + std::string inputFile = "NULL"; + if(Options.existsAs("inputFile")) + inputFile = Options.getParameter("inputFile"); + + std::string fileMCTruth = "NULL"; + if(Options.existsAs("fileMCTruth")) + fileMCTruth = Options.getParameter("fileMCTruth"); + + std::string fileMCRecoIC = "NULL"; + if(Options.existsAs("fileMCRecoIC")) + fileMCRecoIC = Options.getParameter("fileMCRecoIC"); + + std::string fileStatPrecision = "NULL"; + if(Options.existsAs("fileStatPrecision")) + fileStatPrecision = Options.getParameter("fileStatPrecision"); + + TApplication* theApp = new TApplication("Application",&argc, argv); + + + TFile *f1 = TFile::Open(fileMCTruth.c_str()); + TFile *f2 = TFile::Open(fileMCRecoIC.c_str()); + TFile *f3 = TFile::Open(inputFile.c_str()); + TFile *f4 = TFile::Open(fileStatPrecision.c_str()); + + if( f1 ==0 || f2 == 0 || f3 == 0 || f4 == 0) return -1; + + TH2F *hcmapMcT = (TH2F*)f1->Get("h_scale_map"); + TH2F *hcmapMcR = (TH2F*)f2->Get("h_scale_map"); + + TH2F * hcmap1 = (TH2F*)hcmapMcT->Clone("hcmap1"); + hcmap1->Reset(); + TH1F * hringdiff = new TH1F("hringdiff","difference of ring average",100,-0.1,0.1); + + for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ + for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ + hcmap1->SetBinContent(ibin,jbin,hcmapMcT->GetBinContent(ibin,jbin)/hcmapMcR->GetBinContent(ibin,jbin)); + } + } + + + TH2F * miscalib_map = (TH2F*) f3 -> Get("h_scalib_EB"); + TH2F *hcL3 = (TH2F*)f3->Get("h_scale_map"); + + TH2F *hcmap2 = (TH2F*)hcL3 ->Clone("hcmap2"); + hcmap2->Reset(); + + for (int jbin = 1; jbin < hcmap2-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ + hcmap2->SetBinContent(ibin,jbin,miscalib_map->GetBinContent(ibin,jbin)*hcL3->GetBinContent(ibin,jbin)); + } + } + + /// IC Histogramm in Eta ring and 2D map difference + TH2F * h2 = new TH2F("h2","h2",400,0.5,1.5,400,0.5,1.5); + TH2F * h2diff = (TH2F*)hcmap1->Clone("h2diff"); + h2diff->Reset(); + TH1F *hdiff = new TH1F("hdiff", "hdiff", 400,-0.5,0.5); + + char hname[100]; + + TH1F *hspread[172]; + for (int jbin = 1; jbin < hcmap1-> GetNbinsY()+1; jbin++){ + int etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hspread_ring_ieta%02d",etaring); + hspread[jbin-1]= new TH1F(hname, hname, 400,-0.5,0.5); + } + + for (int jbin = 1; jbin < hcmap1-> GetNbinsY()+1; jbin++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ + float c1 = hcmap1->GetBinContent(ibin,jbin); + float c2 = hcmap2->GetBinContent(ibin,jbin); + if (c1!=0 && c2!=0 ){ + hspread[jbin-1]->Fill( c1-c2 ); + h2->Fill(c1,c2); + h2diff->SetBinContent(ibin,jbin,c1-c2); + if (fabs(etaring) < 40) hdiff->Fill(c1-c2); + + } + } + } + + /// Final Plot in eta ring (stat prescision and scale) + TGraphErrors *sigma_vs_ieta = new TGraphErrors(); + sigma_vs_ieta->SetMarkerStyle(20); + sigma_vs_ieta->SetMarkerSize(1); + sigma_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *rms_vs_ieta = new TGraphErrors(); + rms_vs_ieta->SetMarkerStyle(24); + rms_vs_ieta->SetMarkerSize(1); + rms_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_ieta = new TGraphErrors(); + scale_vs_ieta->SetMarkerStyle(20); + scale_vs_ieta->SetMarkerSize(1); + scale_vs_ieta->SetMarkerColor(kBlue+2); + + /// Gaussian Fit of spread coefficient dstribution + TF1 *fgaus = new TF1("fgaus","gaus",-1,1); + int np = 0; + for (int i = 1; i < hcmap1-> GetNbinsY()+1; i++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(i); + if (etaring==0.5) continue; + if ( hspread[i-1]->GetEntries() == 0) {sigma_vs_ieta-> SetPoint(np,etaring,-100);np++;continue;} + hspread[i-1]->Fit("fgaus","Q"); + sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + sigma_vs_ieta-> SetPointError(np,0,fgaus->GetParError(2)); + rms_vs_ieta -> SetPoint(np,etaring, hspread[i-1]->GetRMS()); + rms_vs_ieta -> SetPointError(np,0,hspread[i-1]->GetRMSError() ); + scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); + scale_vs_ieta-> SetPointError(np,0,fgaus->GetParError(1)); + if( fabs(etaring) < 20 ){hringdiff->Fill( fgaus->GetParameter(1) );} + np++; + } + + /// Final Plot + TGraphErrors* gr_stat_prec = (TGraphErrors*) f4->Get("gr_stat_prec"); + TCanvas *csigma = new TCanvas("csigma","csigma"); + csigma->SetGridx(); + csigma->SetGridy(); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + sigma_vs_ieta->Draw("ap"); + rms_vs_ieta->Draw("psame"); + gr_stat_prec->Draw("psame"); + + + /// Residual Plot (spread - statistical precision) + TGraphErrors* residual = new TGraphErrors(); + + for(int pp=0; pp< gr_stat_prec->GetN(); pp++){ + double eta1, eta2,tot, stat; + gr_stat_prec->GetPoint(pp, eta1, stat); + sigma_vs_ieta->GetPoint(pp, eta2, tot); + if(eta1 != eta2){cout<<"error different ring "< 0) res = sqrt(res); + else res = -sqrt(fabs(res)); + double errres = sqrt( pow(tot*sigma_vs_ieta->GetErrorY(pp),2) +pow(stat*gr_stat_prec->GetErrorY(pp),2))/fabs(res); + residual->SetPoint(pp,eta1,res); + residual->SetPointError(pp,0,errres); + } + + /// Residual spread plot + TCanvas *cres = new TCanvas("cres","cresidual"); + cres->SetGridx(); + cres->SetGridy(); + residual->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual->GetHistogram()->GetYaxis()-> SetTitle("residual"); + residual->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + residual ->SetMarkerStyle(20); + residual->SetMarkerSize(1); + residual->SetMarkerColor(kGreen+2); + residual->GetYaxis()->SetTitle("residual"); + residual->GetXaxis()->SetTitle("i#eta"); + residual->Draw("ap"); + + /// scale vs eta plot + TCanvas *cscale = new TCanvas("cscale","cscale"); + cscale->SetGridx(); + cscale->SetGridy(); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + scale_vs_ieta->Draw("ap"); + + /// IC Diff map + TCanvas *cmap2 = new TCanvas("cmap2","cmap2",500,500); + cmap2->SetGridx(); + cmap2->SetGridy(); + cmap2 -> cd(); + cmap2->SetLeftMargin(0.1); + cmap2->SetRightMargin(0.15); + h2->GetXaxis()->SetRangeUser(0.85,1.15); + h2->GetYaxis()->SetRangeUser(0.85,1.15); + h2->GetXaxis()->SetTitle("C_{1}"); + h2->GetYaxis()->SetTitle("C_{2}"); + h2->Draw("colz"); + + TCanvas *cdiff = new TCanvas("cdiff","cdiff",700,500); + cdiff->SetGridx(); + cdiff->SetGridy(); + cdiff -> cd(); + cdiff->SetLeftMargin(0.1); + cdiff->SetRightMargin(0.15); + h2diff->GetZaxis()->SetRangeUser(-0.05,0.05); + h2diff->GetXaxis()->SetTitle("i#phi"); + h2diff->GetYaxis()->SetTitle("i#eta"); + h2diff->Draw("colz"); + + theApp->Run(); + + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp b/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp new file mode 100644 index 00000000000..25c0d76a8bf --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp @@ -0,0 +1,612 @@ +/// Stand-alone program for compare calibration result obtained on MC with +/// the original configuration for EE Input: IC 2D map after L3 calib + +#include +#include +#include +#include "TH2F.h" +#include "TH1F.h" +#include "TCanvas.h" +#include "TFile.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TGraphErrors.h" +#include "TF1.h" +#include "TApplication.h" +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/TEndcapRings.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + +int main (int argc, char **argv) { + + /// Input File MCTruth IC Map , RECO IC map, MC IC set after calibration (Usually set with miscalibration 5%) + /// and StatPrecision IC coefficient obtained from DrawCalibrationPlotsEE.C + + if(argc != 2){ + std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + + std::string inputFile = "NULL"; + if(Options.existsAs("inputFile")) + inputFile = Options.getParameter("inputFile"); + + std::string inputMomentumScale = "NULL"; + if(Options.existsAs("inputMomentumScale")) + inputMomentumScale = Options.getParameter("inputMomentumScale"); + + std::string fileMCTruth = "NULL"; + if(Options.existsAs("fileMCTruth")) + fileMCTruth = Options.getParameter("fileMCTruth"); + + std::string fileMCRecoIC = "NULL"; + if(Options.existsAs("fileMCRecoIC")) + fileMCRecoIC = Options.getParameter("fileMCRecoIC"); + + std::string fileStatPrecision = "NULL"; + if(Options.existsAs("fileStatPrecision")) + fileStatPrecision = Options.getParameter("fileStatPrecision"); + + std::string outputFile = "NULL"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + TApplication* theApp = new TApplication("Application",&argc, argv); + + TFile *f1 = TFile::Open(fileMCTruth.c_str()); + TFile *f2 = TFile::Open(fileMCRecoIC.c_str()); + /// L3 result MC endcap + TFile *f3 = TFile::Open(inputFile.c_str()); + /// File form momentum scale correction + TFile* input = new TFile(inputMomentumScale.c_str()); + /// Statistical Precision map + TFile *f4 = TFile::Open(fileStatPrecision.c_str()); + + if(f1==0 || f2==0 || f3==0 || f4==0) return -1; + + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + + + /// input coeff map for EEP and EEM + + TH2F *hcmapMcT_EEP = (TH2F*)f1->Get("h_scale_EEP"); + TH2F *hcmapMcT_EEM = (TH2F*)f1->Get("h_scale_EEM"); + TH2F *hcmapMcR_EEP = (TH2F*)f2->Get("h_scale_EEP"); + TH2F *hcmapMcR_EEM = (TH2F*)f2->Get("h_scale_EEM"); + + TH2F * hcmap_EEP = (TH2F*)hcmapMcT_EEP->Clone("hcmap_EEP"); + TH2F * hcmap_EEM = (TH2F*)hcmapMcT_EEM->Clone("hcmap_EEM"); + + hcmap_EEP->Reset(); + hcmap_EEM->Reset(); + + for (int jbin = 1; jbin < hcmap_EEP-> GetNbinsY(); jbin++){ + for (int ibin = 1; ibin < hcmap_EEM-> GetNbinsX()+1; ibin++){ + + if(hcmapMcT_EEP->GetBinContent(ibin,jbin)!=0 && hcmapMcR_EEP->GetBinContent(ibin,jbin)!=0) + hcmap_EEP->SetBinContent(ibin,jbin,hcmapMcT_EEP->GetBinContent(ibin,jbin)/hcmapMcR_EEP->GetBinContent(ibin,jbin)); + if(hcmapMcT_EEM->GetBinContent(ibin,jbin)!=0 && hcmapMcR_EEM->GetBinContent(ibin,jbin)!=0) + hcmap_EEM->SetBinContent(ibin,jbin,hcmapMcT_EEM->GetBinContent(ibin,jbin)/hcmapMcR_EEM->GetBinContent(ibin,jbin)); + } + } + + /// Scalib and L3 map Normalized for EE+ and EE- + + TH2F * miscalib_map_EEP = (TH2F*) f3 -> Get("h_scalib_EEP"); + TH2F * miscalib_map_EEM = (TH2F*) f3 -> Get("h_scalib_EEM"); + + TH2F *hcL3_EEP = (TH2F*)f3->Get("h_scale_map_EEP"); + TH2F *hcL3_EEM = (TH2F*)f3->Get("h_scale_map_EEM"); + + TH2F *hcmap2_EEP = (TH2F*)hcL3_EEP ->Clone("hcmap2_EEP"); + TH2F *hcmap2_EEM = (TH2F*)hcL3_EEM ->Clone("hcmap2_EEM"); + + hcmap2_EEP->Reset(); + hcmap2_EEM->Reset(); + + + /// Momentum scale correction + + TGraphErrors* g_EoP_EE = (TGraphErrors*) input->Get("g_EoP_EE_0"); + TGraphErrors* PhiProjectionEEp = new TGraphErrors(); + TGraphErrors* PhiProjectionEEm = new TGraphErrors(); + + PhiProjectionEEp->SetMarkerStyle(20); + PhiProjectionEEp->SetMarkerSize(1); + PhiProjectionEEp->SetMarkerColor(kRed); + + PhiProjectionEEm->SetMarkerStyle(20); + PhiProjectionEEm->SetMarkerSize(1); + PhiProjectionEEm->SetMarkerColor(kBlue); + + + TEndcapRings *eRings = new TEndcapRings(); + std::vector vectSum; + std::vector vectCounter; + + vectCounter.assign(g_EoP_EE->GetN(),0.); + vectSum.assign(g_EoP_EE->GetN(),0.); + + /// EE+ and EE- projection + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEM->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)/(360./g_EoP_EE->GetN())); + vectSum.at(iPhi)=vectSum.at(iPhi)+hcL3_EEM->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + + for(unsigned int i=0; iSetPoint(i,int(i*(360./g_EoP_EE->GetN())),vectSum.at(i)/vectCounter.at(i)); + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEP->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)/(360./g_EoP_EE->GetN())); + vectSum.at(iPhi)=vectSum.at(iPhi)+hcL3_EEP->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + + for(unsigned int i=0; iSetPoint(i,int(i*(360./g_EoP_EE->GetN())),vectSum.at(i)/vectCounter.at(i)); + + for(unsigned int i=0; iClone("mapMomentumCorrected_EEM"); + mapMomentumCorrected[1] = (TH2F*) hcL3_EEP->Clone("mapMomentumCorrected_EEP"); + mapMomentumCorrected[0]->Reset(); + mapMomentumCorrected[1]->Reset(); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEM->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); + double xphi,yphi; + g_EoP_EE->GetPoint(int(iPhi/(360./PhiProjectionEEm->GetN())),xphi,yphi); + mapMomentumCorrected[0]->SetBinContent(ix,iy,hcL3_EEM->GetBinContent(ix,iy)*yphi); + } + } + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEP->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); + double xphi,yphi; + g_EoP_EE->GetPoint(int(iPhi/(360./PhiProjectionEEp->GetN())),xphi,yphi); + mapMomentumCorrected[1]->SetBinContent(ix,iy,hcL3_EEP->GetBinContent(ix,iy)*yphi); + } + } + +/// Use momentum map corrected + + for (int jbin = 1; jbin < mapMomentumCorrected[1]-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < mapMomentumCorrected[1]-> GetNbinsX()+1; ibin++){ + if(miscalib_map_EEP->GetBinContent(ibin,jbin)!=0 && mapMomentumCorrected[1]->GetBinContent(ibin,jbin)!=0) + hcmap2_EEP->SetBinContent(ibin,jbin,miscalib_map_EEP->GetBinContent(ibin,jbin)*mapMomentumCorrected[1]->GetBinContent(ibin,jbin)); + if(miscalib_map_EEM->GetBinContent(ibin,jbin)!=0 && mapMomentumCorrected[0]->GetBinContent(ibin,jbin)!=0) + hcmap2_EEM->SetBinContent(ibin,jbin,miscalib_map_EEM->GetBinContent(ibin,jbin)*mapMomentumCorrected[0]->GetBinContent(ibin,jbin)); + } + } + + + /// output histos + + TH2F * h2_EEP = new TH2F("h2_EEP","h2_EEP",400,0.5,1.5,400,0.5,1.5); + TH2F * h2_EEM = new TH2F("h2_EEM","h2_EEM",400,0.5,1.5,400,0.5,1.5); + + TH2F * h2diff_EEP = (TH2F*)hcmap_EEP->Clone("h2diff_EEP"); + TH2F * h2diff_EEM = (TH2F*)hcmap_EEM->Clone("h2diff_EEM"); + + h2diff_EEP->Reset(); + h2diff_EEM->Reset(); + + char hname[100]; + + TH1F *hspread_EEP[40]; + TH1F *hspread_EEM[40]; + TH1F *hspread_All[40]; + + /// ring geometry for the endcap + + TH2F *hrings_EEP; + TH2F *hrings_EEM; + + hrings_EEP = (TH2F*)hcmap2_EEP->Clone("hringsEEP"); + hrings_EEM = (TH2F*)hcmap2_EEM->Clone("hringsEEM"); + hrings_EEP ->Reset(); + hrings_EEM ->Reset(); + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings_EEP->Fill(x,y,ir); + if(z<0) hrings_EEM->Fill(x,y,ir); + } + + /// spread IC histos + for (int jbin = 0; jbin < 40; jbin++){ + sprintf(hname,"hspread_ring_EEP_%02d",jbin); + hspread_EEP[jbin]= new TH1F(hname, hname, 75,0.5,1.5); + sprintf(hname,"hspread_ring_EEM_%02d",jbin); + hspread_EEM[jbin]= new TH1F(hname, hname, 75,0.5,1.5); + sprintf(hname,"hspread_ring_All_%02d",jbin); + hspread_All[jbin]= new TH1F(hname, hname, 75,0.5,1.5); + + } + + for (int jbin = 1; jbin < hcmap_EEP-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < hcmap_EEP-> GetNbinsX()+1; ibin++){ + + int mybin_EEP = hcmap_EEP -> FindBin(ibin,jbin); + int ring_EEP = int(hrings_EEP-> GetBinContent(mybin_EEP)); + float c1_EEP = hcmap_EEP->GetBinContent(mybin_EEP); + float c2_EEP = hcmap2_EEP->GetBinContent(mybin_EEP); + + int mybin_EEM = hcmap_EEM -> FindBin(ibin,jbin); + int ring_EEM = int(hrings_EEM-> GetBinContent(mybin_EEM)); + float c1_EEM = hcmap_EEM->GetBinContent(mybin_EEM); + float c2_EEM = hcmap2_EEM->GetBinContent(mybin_EEM); + + if (c1_EEP!=0 && c2_EEP!=0 ){ + ///Ratio betweem IC and not the difference + hspread_EEP[ring_EEP]->Fill(c1_EEP/c2_EEP); + hspread_All[ring_EEP]->Fill(c1_EEP/c2_EEP); + + h2_EEP->Fill(c1_EEP,c2_EEP); + h2diff_EEP->SetBinContent(ibin,jbin,c1_EEP/c2_EEP); + } + else h2diff_EEP->SetBinContent(ibin,jbin,0); + + if (c1_EEM!=0 && c2_EEM!=0 ){ + hspread_EEM[ring_EEM]->Fill(c1_EEM/c2_EEM); + hspread_All[ring_EEM]->Fill(c1_EEM/c2_EEM); + + h2_EEM->Fill(c1_EEM,c2_EEM); + h2diff_EEM->SetBinContent(ibin,jbin,c1_EEM/c2_EEM); + } + else h2diff_EEM->SetBinContent(ibin,jbin,0); + } + } + + /// TGraphErrors for final plot + TGraphErrors *sigma_vs_iring_EEP = new TGraphErrors(); + sigma_vs_iring_EEP->SetMarkerStyle(20); + sigma_vs_iring_EEP->SetMarkerSize(1); + sigma_vs_iring_EEP->SetMarkerColor(kBlue+2); + + TGraphErrors *sigma_vs_iring_EEM = new TGraphErrors(); + sigma_vs_iring_EEM->SetMarkerStyle(20); + sigma_vs_iring_EEM->SetMarkerSize(1); + sigma_vs_iring_EEM->SetMarkerColor(kBlue+2); + + TGraphErrors *sigma_vs_iring_All = new TGraphErrors(); + sigma_vs_iring_All->SetMarkerStyle(20); + sigma_vs_iring_All->SetMarkerSize(1); + sigma_vs_iring_All->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_iring_EEP = new TGraphErrors(); + scale_vs_iring_EEP->SetMarkerStyle(20); + scale_vs_iring_EEP->SetMarkerSize(1); + scale_vs_iring_EEP->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_iring_EEM = new TGraphErrors(); + scale_vs_iring_EEM->SetMarkerStyle(20); + scale_vs_iring_EEM->SetMarkerSize(1); + scale_vs_iring_EEM->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_iring_All = new TGraphErrors(); + scale_vs_iring_All->SetMarkerStyle(20); + scale_vs_iring_All->SetMarkerSize(1); + scale_vs_iring_All->SetMarkerColor(kBlue+2); + + /// Gauss function for fit + TF1 *fgaus_EEP = new TF1("fgaus_EEP","gaus",0.,2.); + TF1 *fgaus_EEM = new TF1("fgaus_EEM","gaus",0.,2.); + TF1 *fgaus_All = new TF1("fgaus_All","gaus",0.,2.); + + int np_EEP = 0; + int np_EEM = 0; + int np_All = 0; + for (int i = 0; i < 40; i++){ + if ( hspread_EEP[i]->GetEntries() == 0) {sigma_vs_iring_EEP-> SetPoint(np_EEP,i,-100);np_EEP++;continue;} + if ( hspread_EEM[i]->GetEntries() == 0) {sigma_vs_iring_EEM-> SetPoint(np_EEM,i,-100);np_EEM++;continue;} + if ( hspread_All[i]->GetEntries() == 0) {sigma_vs_iring_All-> SetPoint(np_All,i,-100);np_All++;continue;} + + hspread_EEP[i]->Fit("fgaus_EEP","QRME"); + hspread_EEM[i]->Fit("fgaus_EEM","QRME"); + hspread_All[i]->Fit("fgaus_All","QRME"); + TString Name = Form("c_%d",i); + + sigma_vs_iring_EEP-> SetPoint(np_EEP,i,fgaus_EEP->GetParameter(2)); + sigma_vs_iring_EEP-> SetPointError(np_EEP,0,fgaus_EEP->GetParError(2)); + + scale_vs_iring_EEP-> SetPoint(np_EEP,i,fgaus_EEP->GetParameter(1)); + scale_vs_iring_EEP-> SetPointError(np_EEP,0,fgaus_EEP->GetParError(1)); + + np_EEP++; + + sigma_vs_iring_EEM-> SetPoint(np_EEM,i,fgaus_EEM->GetParameter(2)); + sigma_vs_iring_EEM-> SetPointError(np_EEM,0,fgaus_EEM->GetParError(2)); + + scale_vs_iring_EEM-> SetPoint(np_EEM,i,fgaus_EEM->GetParameter(1)); + scale_vs_iring_EEM-> SetPointError(np_EEM,0,fgaus_EEM->GetParError(1)); + + np_EEM++; + + sigma_vs_iring_All-> SetPoint(np_All,i,fgaus_All->GetParameter(2)); + sigma_vs_iring_All-> SetPointError(np_All,0,fgaus_All->GetParError(2)); + + scale_vs_iring_All-> SetPoint(np_All,i,fgaus_All->GetParameter(1)); + scale_vs_iring_All-> SetPointError(np_All,0,fgaus_All->GetParError(1)); + + np_All++; + } + + /// For from statistical precision analysis + + TGraphErrors* gr_stat_prec_EEP = (TGraphErrors*) f4->Get("gr_stat_prec_EEP"); + TGraphErrors* gr_stat_prec_EEM = (TGraphErrors*) f4->Get("gr_stat_prec_EEM"); + TGraphErrors* gr_stat_prec_All = (TGraphErrors*) f4->Get("gr_stat_prec"); + + /// Residual Plot + TGraphErrors* residual_EEP = new TGraphErrors(); + TGraphErrors* residual_EEM = new TGraphErrors(); + TGraphErrors* residual_All = new TGraphErrors(); + + for(int pp=0; pp< gr_stat_prec_EEP->GetN(); pp++){ + double ring1, ring2,tot, stat, espread, estat,ex,res,eres; + + sigma_vs_iring_EEP->GetPoint(pp, ring2, tot); + espread = sigma_vs_iring_EEP-> GetErrorY(pp); + + gr_stat_prec_EEP->GetPoint(pp,ring1, stat); + estat = gr_stat_prec_EEP-> GetErrorY(pp); + + ex = gr_stat_prec_EEP-> GetErrorX(pp); + + if (tot > stat ){res = sqrt( tot*tot - stat*stat ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; + } + else {res = -sqrt( fabs(tot*tot - stat*stat) ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); + } + + residual_EEP->SetPoint(pp,ring1,res); + if(eres<0.01) residual_EEP->SetPointError(pp,ex,eres); + else residual_EEP->SetPointError(pp,ex,0.01); + } + + for(int pp=0; pp< gr_stat_prec_EEM->GetN(); pp++){ + double ring1, ring2,tot, stat, espread, estat,ex,res,eres; + + sigma_vs_iring_EEM->GetPoint(pp, ring2, tot); + espread = sigma_vs_iring_EEM-> GetErrorY(pp); + + gr_stat_prec_EEM->GetPoint(pp,ring1, stat); + estat = gr_stat_prec_EEM-> GetErrorY(pp); + + ex = gr_stat_prec_EEM-> GetErrorX(pp); + if (tot > stat ){res = sqrt( tot*tot - stat*stat ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; + } + else {res = -sqrt( fabs(tot*tot - stat*stat) ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); + } + residual_EEM->SetPoint(pp,ring1,res); + if(eres<0.01) residual_EEM->SetPointError(pp,ex,eres); + else residual_EEM->SetPointError(pp,ex,0.01); + } + + for(int pp=0; pp< gr_stat_prec_All->GetN(); pp++){ + double ring1, ring2,tot, stat, espread, estat,ex,res,eres; + + sigma_vs_iring_All->GetPoint(pp, ring2, tot); + espread = sigma_vs_iring_All-> GetErrorY(pp); + + gr_stat_prec_All->GetPoint(pp,ring1, stat); + estat = gr_stat_prec_All-> GetErrorY(pp); + + ex = gr_stat_prec_All-> GetErrorX(pp); + if (tot > stat ){ res = sqrt( tot*tot - stat*stat ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; + } + else {res = -sqrt( fabs(tot*tot - stat*stat) ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); + } + + residual_All->SetPoint(pp,ring1,res); + if(eres<0.01) residual_All->SetPointError(pp,ex,eres); + else residual_All->SetPointError(pp,ex,0.01); + + } + + /// Final Plot + TCanvas *cscale_EEP = new TCanvas("cscale_EEP","cscale_EEP"); + cscale_EEP->SetGridx(); + cscale_EEP->SetGridy(); + scale_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); + scale_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + scale_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetTitle("iring"); + scale_vs_iring_EEP->Draw("ap"); + + TCanvas *cscale_EEM = new TCanvas("cscale_EEM","cscale_EEM"); + cscale_EEM->SetGridx(); + cscale_EEM->SetGridy(); + scale_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); + scale_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + scale_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); + scale_vs_iring_EEM->Draw("ap"); + + TCanvas *cmap2_EEP = new TCanvas("cmap2_EEP","cmap2_EEP",500,500); + cmap2_EEP->SetGridx(); + cmap2_EEP->SetGridy(); + cmap2_EEP -> cd(); + cmap2_EEP->SetLeftMargin(0.1); + cmap2_EEP->SetRightMargin(0.15); + h2_EEP->GetXaxis()->SetRangeUser(0.85,1.15); + h2_EEP->GetYaxis()->SetRangeUser(0.85,1.15); + h2_EEP->GetXaxis()->SetTitle("C_{1}"); + h2_EEP->GetYaxis()->SetTitle("C_{2}"); + h2_EEP->Draw("colz"); + + TCanvas *cmap2_EEM = new TCanvas("cmap2_EEM","cmap2_EEM",500,500); + cmap2_EEM->SetGridx(); + cmap2_EEM->SetGridy(); + cmap2_EEM -> cd(); + cmap2_EEM->SetLeftMargin(0.1); + cmap2_EEM->SetRightMargin(0.15); + h2_EEM->GetXaxis()->SetRangeUser(0.85,1.15); + h2_EEM->GetYaxis()->SetRangeUser(0.85,1.15); + h2_EEM->GetXaxis()->SetTitle("C_{1}"); + h2_EEM->GetYaxis()->SetTitle("C_{2}"); + h2_EEM->Draw("colz"); + + TCanvas *cdiff_EEP = new TCanvas("cdiff_EEP","cdiff_EEP",700,500); + cdiff_EEP->SetGridx(); + cdiff_EEP->SetGridy(); + cdiff_EEP -> cd(); + cdiff_EEP->SetLeftMargin(0.1); + cdiff_EEP->SetRightMargin(0.15); + h2diff_EEP->GetZaxis()->SetRangeUser(0.5,1.6); + h2diff_EEP->GetXaxis()->SetTitle("ix"); + h2diff_EEP->GetYaxis()->SetTitle("iy"); + h2diff_EEP->Draw("colz"); + + TCanvas *cdiff_EEM = new TCanvas("cdiff_EEM","cdiff_EEM",700,500); + cdiff_EEM->SetGridx(); + cdiff_EEM->SetGridy(); + cdiff_EEM -> cd(); + cdiff_EEM->SetLeftMargin(0.1); + cdiff_EEM->SetRightMargin(0.15); + h2diff_EEM->GetZaxis()->SetRangeUser(0.5,1.6); + h2diff_EEM->GetXaxis()->SetTitle("ix"); + h2diff_EEM->GetYaxis()->SetTitle("iy"); + h2diff_EEM->Draw("colz"); + + TCanvas *csigma_EEP = new TCanvas("csigma_EEP","csigma_EEP"); + csigma_EEP->SetGridx(); + csigma_EEP->SetGridy(); + sigma_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + sigma_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetTitle("iring"); + sigma_vs_iring_EEP->Draw("ap"); + gr_stat_prec_EEP->Draw("psame"); + + TCanvas *csigma_EEM = new TCanvas("csigma_EEM","csigma_EEM"); + csigma_EEM->SetGridx(); + csigma_EEM->SetGridy(); + sigma_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + sigma_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); + sigma_vs_iring_EEM->Draw("ap"); + gr_stat_prec_EEM->Draw("psame"); + + TCanvas *csigma_All= new TCanvas("csigma_All","csigma_Folded"); + csigma_All->SetGridx(); + csigma_All->SetGridy(); + sigma_vs_iring_All->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_iring_All->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + sigma_vs_iring_All->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_iring_All->GetHistogram()->GetXaxis()-> SetTitle("iring"); + sigma_vs_iring_All->Draw("ap"); + gr_stat_prec_All->Draw("psame"); + + TCanvas *cres_EEP = new TCanvas("cres_EEP","cresidual_EEP"); + cres_EEP->SetGridx(); + cres_EEP->SetGridy(); + residual_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + residual_EEP-> SetTitle("residual EE+"); + residual_EEP-> SetTitle("iring"); + residual_EEP->SetMarkerStyle(20); + residual_EEP->SetMarkerSize(1); + residual_EEP->SetMarkerColor(kGreen+2); + residual_EEP->Draw("ap"); + + TCanvas *cres_EEM = new TCanvas("cres_EEM","cresidual_EEM"); + cres_EEM->SetGridx(); + cres_EEM->SetGridy(); + residual_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + residual_EEM->GetHistogram()->GetYaxis()-> SetTitle("residual EE-"); + residual_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); + residual_EEM ->SetMarkerStyle(20); + residual_EEM->SetMarkerSize(1); + residual_EEM->SetMarkerColor(kGreen+2); + residual_EEM->Draw("ap"); + + TCanvas *cres_All = new TCanvas("cres_All","cresidual_Folded"); + cres_All->SetGridx(); + cres_All->SetGridy(); + residual_All->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual_All->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + residual_All->GetYaxis()->SetTitle("residual EE Folded"); + residual_All->GetXaxis()->SetTitle("iring"); + residual_All->SetMarkerStyle(20); + residual_All->SetMarkerSize(1); + residual_All->SetMarkerColor(kGreen+2); + residual_All->Draw("ap"); + + /// save output result: + + TFile* output = new TFile(outputFile.c_str(),"RECREATE"); + output->cd(); + residual_EEM->Write("residual_EEM"); + residual_EEP->Write("residual_EEP"); + residual_All->Write("residual_All"); + + output->Close(); + + theApp->Run(); + + return 0; + +} diff --git a/EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp b/EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp new file mode 100644 index 00000000000..5c26987ec53 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp @@ -0,0 +1,2313 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "TFile.h" +#include "TStyle.h" +#include "TMath.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TApplication.h" +#include "TEndcapRings.h" + +#include "ConfigParser.h" +#include "ntpleUtils.h" + + +int main (int argc, char** argv){ + + /* std::string ROOTStyle = getenv ("ROOTStyle"); + + gROOT->ProcessLine((".x "+ROOTStyle+"/rootLogon.C").c_str()); + gROOT->ProcessLine((".x "+ROOTStyle+"/rootPalette.C").c_str()); + gROOT->ProcessLine((".x "+ROOTStyle+"/rootColors.C").c_str()); + gROOT->ProcessLine((".x "+ROOTStyle+"/setTDRStyle.C").c_str()); + */ + + if(argc<2){ std::cout<<" Not correct number of input parameter --> Need Just one cfg file exit "< readStringOption("Input::inputList"); + std::string inputStandardMap = gConfigParser -> readStringOption("Input::inputStandardMap"); + + std::string DeadChannelMapName ; + try{ DeadChannelMapName = gConfigParser -> readStringOption("Input::DeadChannelMapName"); } + catch(char const* exceptionString ){ DeadChannelMapName = "h_map_Dead_Channels";} + + std::string ICMapName ; + try{ ICMapName = gConfigParser -> readStringOption("Input::ICMapName"); } + catch(char const* exceptionString ){ ICMapName = "h_scale_EB";} + + bool isDeadTriggerTower ; + try{ isDeadTriggerTower = gConfigParser -> readBoolOption("Input::isDeadTriggerTower"); } + catch(char const* exceptionString ){ isDeadTriggerTower = false;} + + std::vector EtaBinCenterDeadTT ; + try{ EtaBinCenterDeadTT = gConfigParser -> readDoubleListOption("Input::EtaBinCenterDeadTT"); } + catch(char const* exceptionString ){ EtaBinCenterDeadTT.push_back(-999);} + + int NPhiShift ; + try{ NPhiShift = gConfigParser -> readIntOption("Input::NPhiShift"); } + catch(char const* exceptionString ){ NPhiShift=14; } + + int PhiOffset ; + try{ PhiOffset = gConfigParser -> readIntOption("Input::PhiOffset"); } + catch(char const* exceptionString ){ PhiOffset=4; } + + bool icMapRatio ; + try{ icMapRatio = gConfigParser -> readBoolOption("Input::icMapRatio"); } + catch(char const* exceptionString ){ icMapRatio = true;} + + std::vector iEtaBinDivision ; + try{ iEtaBinDivision = gConfigParser -> readDoubleListOption("Input::iEtaBinDivision"); } + catch(char const* exceptionString ){ iEtaBinDivision.push_back(0); + iEtaBinDivision.push_back(20); + iEtaBinDivision.push_back(40); + iEtaBinDivision.push_back(60); + iEtaBinDivision.push_back(85); + } + + std::vector iPhiBinDivision ; + try{ iPhiBinDivision = gConfigParser -> readDoubleListOption("Input::iPhiBinDivision"); } + catch(char const* exceptionString ){ iPhiBinDivision.push_back(0); + iPhiBinDivision.push_back(90); + iPhiBinDivision.push_back(180); + iPhiBinDivision.push_back(270); + iPhiBinDivision.push_back(360); + } + + int NPhiSMBinDivision ; + try{ NPhiSMBinDivision = gConfigParser -> readIntOption("Input::NPhiSMBinDivision"); } + catch(char const* exceptionString ){ NPhiSMBinDivision = 5 ; } + + + int IPhiWindow ; + try{ IPhiWindow = gConfigParser -> readIntOption("Input::IPhiWindow"); } + catch(char const* exceptionString ){ IPhiWindow = 3;} + + int IEtaWindow ; + try{ IEtaWindow = gConfigParser -> readIntOption("Input::IEtaWindow"); } + catch(char const* exceptionString ){ IEtaWindow = 3;} + + std::string outputCanvasPlot ; + try{ outputCanvasPlot = gConfigParser -> readStringOption("Output::outputCanvasPlot"); } + catch(char const* exceptionString ){ outputCanvasPlot = "output/outDeadXtalPlots/";} + + std::cout<<"inputList : "<SetOptFit(111); + if(isDeadTriggerTower)gStyle->SetOptStat(111110); + else gStyle->SetOptStat(11110); + + + // ic map running a standard calibration without any dead channel + + TFile* inputFileStandardMap = new TFile(inputStandardMap.c_str(),"READ"); + inputFileStandardMap->cd(); + TH2F* ICMapEBStandard = (TH2F*) inputFileStandardMap->Get(ICMapName.c_str()) ; + + + std::ifstream inFile(inputList.c_str()); + std::string buffer; + + std::vector inputFileList ; + + if(!inFile.is_open()){ std::cout << "** ERROR: Can't open '" << inputList << "' for input" << std::endl; return -1;} + + std::cout<<"Input Files : "<> buffer; + if( buffer.at(0) == '#' ) continue; + std::cout< > ICCrystalEB (IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis + std::vector > ICCrystalEBP(IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis in EB+ + std::vector > ICCrystalEBM(IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis in EB- + + // for differential eta and phi analysis + std::vector > > ICCrystalEB_EtaBinned(iEtaBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > ICCrystalEB_PhiBinned(iPhiBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > ICCrystalEB_SMBinned(int(20/NPhiSMBinDivision), std::vector >(IPhiWindow, std::vector (IEtaWindow))); + + + std::vector DeadCrystalEB(inputFileList.size()); + std::vector ICMapEB(inputFileList.size()); + + for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ + + for( int iEta = 0 ; iEta < IEtaWindow ; iEta ++) { + + if(isDeadTriggerTower) (ICCrystalEB.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_%d_%d",iPhi,iEta)).c_str(),"",10000,0,100); + else (ICCrystalEB.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); + (ICCrystalEB.at(iPhi)).at(iEta)->Sumw2(); + if(isDeadTriggerTower) (ICCrystalEBP.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBP_%d_%d",iPhi,iEta)).c_str(),"",500,0,5); + else (ICCrystalEBP.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBP_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); + (ICCrystalEBP.at(iPhi)).at(iEta)->Sumw2(); + if(isDeadTriggerTower) (ICCrystalEBM.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBM_%d_%d",iPhi,iEta)).c_str(),"",10000,0,100); + else (ICCrystalEBM.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBM_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); + (ICCrystalEBM.at(iPhi)).at(iEta)->Sumw2(); + + for( int iEtaBin = 0; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + + if(isDeadTriggerTower) ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_EtaBin_%f_%f_iEta_%d_iPhi_%d",iEtaBinDivision.at(iEtaBin), + iEtaBinDivision.at(iEtaBin+1),iPhi,iEta)).c_str(),"",10000,0,100); + else ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_EtaBin_%f_%f_iEta_%d_iPhi_%d",iEtaBinDivision.at(iEtaBin), + iEtaBinDivision.at(iEtaBin+1),iPhi,iEta)).c_str(),"",100,0.95,1.4); + ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Sumw2(); + } + + for( int iPhiBin = 0; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + + if(isDeadTriggerTower) ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_PhiBin_%f_%f_iEta_%d_iPhi_%d",iPhiBinDivision.at(iPhiBin), + iPhiBinDivision.at(iPhiBin+1),iPhi,iEta)).c_str(),"",10000,0,100); + else ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_PhiBin_%f_%f_iEta_%d_iPhi_%d",iPhiBinDivision.at(iPhiBin), + iPhiBinDivision.at(iPhiBin+1),iPhi,iEta)).c_str(),"",100,0.95,1.4); + ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Sumw2(); + + } + + for( int iSMBin = 0; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + + if(isDeadTriggerTower) ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_SMBin_%d_%d_iEta_%d_iPhi_%d",iSMBin*NPhiSMBinDivision, + (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",10000,0,100); + else ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_SMBin_%d_%d_iEta_%d_iPhi_%d",iSMBin*NPhiSMBinDivision, + (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",100,0.95,1.4); + ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Sumw2(); + + } + } + } + + for( unsigned int iFile = 0 ; iFile < inputFileList.size() ; iFile ++){ + + DeadCrystalEB.push_back((TH2F*) inputFileList.at(iFile)->Get(DeadChannelMapName.c_str())); + ICMapEB.push_back((TH2F*) inputFileList.at(iFile)->Get(ICMapName.c_str())); + + if(isDeadTriggerTower){ + + int PhiShift = 0 ; + if(TString(inputFileList.at(iFile)->GetName()).Contains("p1")) PhiShift = 1 ; + else if(TString(inputFileList.at(iFile)->GetName()).Contains("m1")) PhiShift = -1 ; + else if(TString(inputFileList.at(iFile)->GetName()).Contains("p2")) PhiShift = 2 ; + else if(TString(inputFileList.at(iFile)->GetName()).Contains("m2")) PhiShift = -2 ; + + for(int iEta = 0 ; iEta < int(EtaBinCenterDeadTT.size()) ; iEta ++ ){ + for( int iPhi = PhiOffset + PhiShift ; iPhi < 360 ; iPhi = iPhi + NPhiShift) { + + if(DeadCrystalEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)!=0 && EtaBinCenterDeadTT.at(iEta)!=0){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)<=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + } + else{ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)<=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + } + + int iEtaBin = 0 ; + int iPhiBin = 0 ; + + for( ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++){ + if(fabs(EtaBinCenterDeadTT.at(iEta)) > iEtaBinDivision.at(iEtaBin) && fabs(EtaBinCenterDeadTT.at(iEta)) <= iEtaBinDivision.at(iEtaBin+1)) break ; + } + + for( ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++){ + if(iPhi == 0) { iPhiBin = 0 ; break ; } + else if (iPhi == 360){ iPhiBin = int(iPhiBinDivision.size()-1) -1 ; break;} + else if(iPhi > iPhiBinDivision.at(iPhiBin) && iPhi <= iPhiBinDivision.at(iPhiBin+1)) break ; + } + + if(icMapRatio){ + if(ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)!=0){ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86) / + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86) / + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); } + } + else{ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + } + + for( int IPHI = iPhi - int((IPhiWindow-1)/2) ; IPHI <= iPhi + int((IPhiWindow-1)/2) ; IPHI ++){ + for( int IETA = EtaBinCenterDeadTT.at(iEta)+85 - int((IEtaWindow-1)/2) ; IETA <= EtaBinCenterDeadTT.at(iEta)+85 + int((IEtaWindow-1)/2) ; IETA ++){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + } + else{ + + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + } + } + } + } + } + } + } + + else{ + for( int iPhi = 0 ; iPhi < 360 ; iPhi ++){ + for( int iEta = 0 ; iEta < 170 ; iEta ++){ + + if(DeadCrystalEB.back()->GetBinContent(iPhi+1,iEta+1)!=0 && iEta!=0){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + if(iEta <=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + } + else{ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + if(iEta <=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + } + + int iEtaBin = 0 ; + int iPhiBin = 0 ; + + for( ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++){ + if(fabs(iEta-85) > iEtaBinDivision.at(iEtaBin) && fabs(iEta-85) <= iEtaBinDivision.at(iEtaBin+1)) break ; + } + + for( ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++){ + if(iPhi == 0) { iPhiBin = 0 ; break ; } + else if (iPhi == 360){ iPhiBin = int(iPhiBinDivision.size()-1) -1 ; break;} + else if(iPhi > iPhiBinDivision.at(iPhiBin) && iPhi <= iPhiBinDivision.at(iPhiBin+1)) break ; + } + + if(icMapRatio){ + if(ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)!=0){ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1) / ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1) / ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ + ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); } + } + else{ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + } + + for( int IPHI = iPhi - int((IPhiWindow-1)/2) ; IPHI <= iPhi + int((IPhiWindow-1)/2) ; IPHI ++){ + for( int IETA = iEta - int((IEtaWindow-1)/2) ; IETA <= iEta + int((IEtaWindow-1)/2) ; IETA ++){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + if(iEta>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + } + else{ + + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + if(iEta>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + } + } + } + } + } + } + } + } + + std::vector > Can (IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_EBP (IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_EBM (IPhiWindow,std::vector (IEtaWindow)); + std::vector > > Can_EtaBinned (iEtaBinDivision.size()-1,std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > Can_PhiBinned (iPhiBinDivision.size()-1,std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > Can_SMBinned (int(20/NPhiSMBinDivision) ,std::vector >(IPhiWindow, std::vector (IEtaWindow))); + + for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ + + for(int iEta = 0 ; iEta < IPhiWindow ; iEta ++){ + (Can.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_%d_%d",iPhi,iEta)).c_str(),"",500,500); + (Can_EBP.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EBP_%d_%d",iPhi,iEta)).c_str(),"",500,500); + (Can_EBM.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EBM_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + for( int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++) + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EtaBin_%d_%d_iPhi_%d_iEta_%d",int(iEtaBinDivision.at(iEtaBin)), + int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"",500,500); + + for( int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++) + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_PhiBin_%d_%d_iPhi_%d_iEta_%d",int(iPhiBinDivision.at(iPhiBin)), + int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"",500,500); + for( int iSMBin = 0 ; iSMBin < int(NPhiSMBinDivision-1) ; iSMBin ++) + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_SMBin_%d_%d_iPhi_%d_iEta_%d",iSMBin*NPhiSMBinDivision, + (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",500,500); + } + } + + std::vector > GaussianFits (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits + std::vector > GaussianFits_EBP (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits + std::vector > GaussianFits_EBM (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits + std::vector > > GaussianFits_EtaBinned (iEtaBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > GaussianFits_PhiBinned (iPhiBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > GaussianFits_SMBinned (int(20/NPhiSMBinDivision), std::vector >(IPhiWindow, std::vector (IEtaWindow))); + + std::vector > MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + + std::vector > Can_MeanIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_MeanIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_RMSIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_RMSIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + + std::vector > Can_MeanIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_MeanIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_RMSIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_RMSIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + + std::vector > Can_MeanIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_MeanIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_RMSIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_RMSIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + + TH1F* htemp1; + TH1F* htemp2; + TPaveStats* pave1, *pave2, *pave3; + + for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ + for( int iEta = 0 ; iEta < IEtaWindow ; iEta ++){ + + if(iPhi == int(IPhiWindow/2) && iEta == int(IEtaWindow/2)) continue ; + if(isDeadTriggerTower && ( int(fabs(iPhi-IPhiWindow/2)) < int(IPhiWindow/2-1) && int(fabs(iEta-IEtaWindow/2)) < int(IPhiWindow/2-1))) continue ; + + if(isDeadTriggerTower) GaussianFits[iPhi][iEta] = new TF1(std::string(Form("Gaus_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); + else GaussianFits[iPhi][iEta] = new TF1(std::string(Form("Gaus_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); + if(isDeadTriggerTower) GaussianFits_EBP[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBP_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); + else GaussianFits_EBP[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBP_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); + if(isDeadTriggerTower) GaussianFits_EBM[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBM_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); + else GaussianFits_EBM[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBM_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); + + for(int iEtaBin =0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + if(isDeadTriggerTower) GaussianFits_EtaBinned[iEtaBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_EtaBin_%d_%d_iPhi_%d_iEta_%d", + int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"gaus",0.,100); + else GaussianFits_EtaBinned[iEtaBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_EtaBin_%d_%d_iPhi_%d_iEta_%d", + int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"gaus",0.9,1.4); + } + + for(int iPhiBin =0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + + if(isDeadTriggerTower) GaussianFits_PhiBinned[iPhiBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_PhiBin_%d_%d_iPhi_%d_iEta_%d", + int(iPhiBinDivision.at(iPhiBin)),int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"gaus",0.,100); + else GaussianFits_PhiBinned[iPhiBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_PhiBin_%d_%d_iPhi_%d_iEta_%d", + int(iPhiBinDivision.at(iPhiBin)),int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"gaus",0.9,1.5); + } + + for(int iSMBin =0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + + if(isDeadTriggerTower) GaussianFits_SMBinned[iSMBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_SMBin_%d_%d_iPhi_%d_iEta_%d", + iSMBin*NPhiSMBinDivision,NPhiSMBinDivision*(iSMBin+1),iPhi,iEta)).c_str(),"gaus",0.,100); + else GaussianFits_SMBinned[iSMBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_SMBin_%d_%d_iPhi_%d_iEta_%d", + iSMBin*NPhiSMBinDivision,NPhiSMBinDivision*(iSMBin+1),iPhi,iEta)).c_str(),"gaus",0.9,1.5); + } + + MeanIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_MeanIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + RMSIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_RMSIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + MeanIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_MeanIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + RMSIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_RMSIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + MeanIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_MeanIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + RMSIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_RMSIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_MeanIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_RMSIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Pol0_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + Pol0_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + /// Original IC distribution + (Can.at(iPhi)).at(iEta)->cd(); + (Can.at(iPhi)).at(iEta)->SetGridx(); + (Can.at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB[iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB[iPhi][iEta]->SetLineWidth(2); + ICCrystalEB[iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB[iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB[iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){ + GaussianFits[iPhi][iEta]->SetLineColor(kBlue); + GaussianFits[iPhi][iEta]->SetLineWidth(2); + ICCrystalEB[iPhi][iEta]->Fit(GaussianFits[iPhi][iEta],"RMEQ"); + } + ICCrystalEB[iPhi][iEta]->Draw("E"); + ICCrystalEB[iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + (Can.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + (Can_EBP.at(iPhi)).at(iEta)->cd(); + (Can_EBP.at(iPhi)).at(iEta)->SetGridx(); + (Can_EBP.at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEBP[iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEBP[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBP[iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEBP[iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEBP[iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){ + GaussianFits_EBP[iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_EBP[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBP[iPhi][iEta]->Fit(GaussianFits_EBP[iPhi][iEta],"RMEQ"); + } + ICCrystalEBP[iPhi][iEta]->Draw("E"); + ICCrystalEBP[iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEBP[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + (Can_EBP.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBP.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_EBP.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBP.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + (Can_EBM.at(iPhi)).at(iEta)->cd(); + (Can_EBM.at(iPhi)).at(iEta)->SetGridx(); + (Can_EBM.at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEBM[iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEBM[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBM[iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEBM[iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEBM[iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){ + GaussianFits_EBM[iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_EBM[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBM[iPhi][iEta]->Fit(GaussianFits_EBM[iPhi][iEta],"RMEQ"); + } + ICCrystalEBM[iPhi][iEta]->Draw("E"); + ICCrystalEBM[iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEBM[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + (Can_EBM.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBM.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_EBM.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBM.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + /// Original IC distribution vs the chosen eta binning + for(int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->cd(); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->SetGridx(); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->Fit(GaussianFits_EtaBinned[iEtaBin][iPhi][iEta],"RMEQ"); + } + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->Draw("E"); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + } + + /// Mean IC vs Eta + + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + MeanIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + MeanIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + MeanIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + MeanIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < MeanIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + MeanIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetMean()); + MeanIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetMeanError()); + } + + + Pol0_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + MeanIC_EtaBinned[iPhi][iEta]->Fit(Pol2_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + MeanIC_EtaBinned[iPhi][iEta]->Draw("E"); + MeanIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); + MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.95,MeanIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.15); + + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(MeanIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// RMS IC vs Eta + + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + RMSIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + RMSIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + RMSIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + RMSIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < RMSIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + RMSIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetRMS()); + RMSIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetRMSError()); + } + + + Pol0_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + RMSIC_EtaBinned[iPhi][iEta]->Fit(Pol2_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + RMSIC_EtaBinned[iPhi][iEta]->Draw("E"); + RMSIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); + RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(RMSIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// Gauss Mean vs Eta + if(!isDeadTriggerTower){ + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParameter(1)); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParError(1)); + } + + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_MeanIC_EtaBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + Gaus_MeanIC_EtaBinned[iPhi][iEta]->Draw("E"); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.95,Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.15); + + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + + /// Gauss Sigma vs Eta + + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParameter(2)); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParError(2)); + } + + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_RMSIC_EtaBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + Gaus_RMSIC_EtaBinned[iPhi][iEta]->Draw("E"); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + } + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + /// Original IC distribution vs the chosen eta binning + + for(int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->cd(); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->SetGridx(); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->Fit(GaussianFits_PhiBinned[iPhiBin][iPhi][iEta],"RMEQ"); + } + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->Draw("E"); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + } + + + /// Mean IC vs Phi + + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + MeanIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + MeanIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + MeanIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + MeanIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < MeanIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + MeanIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetMean()); + MeanIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetMeanError()); + } + + + Pol0_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + MeanIC_PhiBinned[iPhi][iEta]->Fit(Pol2_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + MeanIC_PhiBinned[iPhi][iEta]->Draw("E"); + MeanIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); + MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.98,MeanIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.05); + + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(MeanIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// RMS IC vs Phi + + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + RMSIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + RMSIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + RMSIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + RMSIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < RMSIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + RMSIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetRMS()); + RMSIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetRMSError()); + } + + + Pol0_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + RMSIC_PhiBinned[iPhi][iEta]->Fit(Pol2_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + RMSIC_PhiBinned[iPhi][iEta]->Draw("E"); + RMSIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); + RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(RMSIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// Gauss Mean vs Phi + if(!isDeadTriggerTower){ + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParameter(1)); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParError(1)); + } + + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_MeanIC_PhiBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + Gaus_MeanIC_PhiBinned[iPhi][iEta]->Draw("E"); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.98,Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.05); + + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + + /// Gauss Sigma vs Eta + + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParameter(2)); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParError(2)); + } + + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_RMSIC_PhiBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + Gaus_RMSIC_PhiBinned[iPhi][iEta]->Draw("E"); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + /// Original IC distribution vs SM folding + + for(int iSMBin = 0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->cd(); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->SetGridx(); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){GaussianFits_SMBinned[iSMBin][iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_SMBinned[iSMBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->Fit(GaussianFits_SMBinned[iSMBin][iPhi][iEta],"RMEQ"); + } + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->Draw("E"); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + } + + /// Mean IC vs Eta + + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + MeanIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + MeanIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + MeanIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + MeanIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < MeanIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + MeanIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetMean()); + MeanIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetMeanError()); + } + + + Pol0_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + MeanIC_SMBinned[iPhi][iEta]->Fit(Pol2_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) MeanIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) MeanIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + + MeanIC_SMBinned[iPhi][iEta]->Draw("E"); + MeanIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); + MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_SMBinned[iPhi][iEta]->GetMinimum()*0.95,MeanIC_SMBinned[iPhi][iEta]->GetMaximum()*1.15); + + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(MeanIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// RMS IC vs SM + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + RMSIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + RMSIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + RMSIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + RMSIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < RMSIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + RMSIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetRMS()); + RMSIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetRMSError()); + } + + + Pol0_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + RMSIC_SMBinned[iPhi][iEta]->Fit(Pol2_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) RMSIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) RMSIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + + RMSIC_SMBinned[iPhi][iEta]->Draw("E"); + RMSIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); + RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_SMBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_SMBinned[iPhi][iEta]->GetMaximum()*1.30); + + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(RMSIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// Gauss Mean vs SM + if(isDeadTriggerTower){ + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_MeanIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParameter(1)); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParError(1)); + } + + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_MeanIC_SMBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_MeanIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_MeanIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + + Gaus_MeanIC_SMBinned[iPhi][iEta]->Draw("E"); + Gaus_MeanIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); + Gaus_MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_SMBinned[iPhi][iEta]->GetMinimum()*0.95,Gaus_MeanIC_SMBinned[iPhi][iEta]->GetMaximum()*1.10); + + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_MeanIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + + /// Gauss Sigma vs SM + + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_RMSIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParameter(2)); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParError(2)); + } + + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_RMSIC_SMBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_RMSIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_RMSIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + + Gaus_RMSIC_SMBinned[iPhi][iEta]->Draw("E"); + Gaus_RMSIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); + Gaus_RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_SMBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_SMBinned[iPhi][iEta]->GetMaximum()*1.30); + + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_RMSIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + } + } + + } + + // Final way to represent the results + + TH2F* inclusiveMeanIC = new TH2F("inclusiveMeanIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveRMSIC = new TH2F("inclusiveRMSIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveGausMeanIC = new TH2F("inclusiveGausMeanIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveGausRMSIC = new TH2F("inclusiveGausRMSIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveMeanIC_EBP = new TH2F("inclusiveMeanIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveRMSIC_EBP = new TH2F("inclusiveRMSIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveGausMeanIC_EBP = new TH2F("inclusiveGausMeanIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveGausRMSIC_EBP = new TH2F("inclusiveGausRMSIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveMeanIC_EBM = new TH2F("inclusiveMeanIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveRMSIC_EBM = new TH2F("inclusiveRMSIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveGausMeanIC_EBM = new TH2F("inclusiveGausMeanIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveGausRMSIC_EBM = new TH2F("inclusiveGausRMSIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + std::vector EtaBinned_MeanIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_MeanIC (iPhiBinDivision.size()-1); + std::vector SMBinned_MeanIC (int(20/NPhiSMBinDivision)); + + std::vector EtaBinned_GausMeanIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_GausMeanIC (iPhiBinDivision.size()-1); + std::vector SMBinned_GausMeanIC (int(20/NPhiSMBinDivision)); + + std::vector EtaBinned_RMSIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_RMSIC (iPhiBinDivision.size()-1); + std::vector SMBinned_RMSIC (int(20/NPhiSMBinDivision)); + + std::vector EtaBinned_GausRMSIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_GausRMSIC (iPhiBinDivision.size()-1); + std::vector SMBinned_GausRMSIC (int(20/NPhiSMBinDivision)); + + for(int iEtaBin = 0; iEtaBinSetBinContent(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetMean()); + inclusiveMeanIC->SetBinError(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetMeanError()); + + if(!isDeadTriggerTower){ inclusiveGausMeanIC->SetBinContent(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParameter(1)); + inclusiveGausMeanIC->SetBinError(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParError(1)); + } + + inclusiveRMSIC->SetBinContent(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetRMS()); + inclusiveRMSIC->SetBinError(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ inclusiveGausRMSIC->SetBinContent(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParameter(2)); + inclusiveGausRMSIC->SetBinError(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParError(2)); + } + + inclusiveMeanIC_EBP->SetBinContent(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetMean()); + inclusiveMeanIC_EBP->SetBinError(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetMeanError()); + + if(!isDeadTriggerTower){ inclusiveGausMeanIC_EBP->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParameter(1)); + inclusiveGausMeanIC_EBP->SetBinError(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParError(1)); + } + + inclusiveRMSIC_EBP->SetBinContent(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetRMS()); + inclusiveRMSIC_EBP->SetBinError(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ inclusiveGausRMSIC_EBP->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParameter(2)); + inclusiveGausRMSIC_EBP->SetBinError(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParError(2)); + } + + inclusiveMeanIC_EBM->SetBinContent(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetMean()); + inclusiveMeanIC_EBM->SetBinError(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetMeanError()); + + if(!isDeadTriggerTower){ inclusiveGausMeanIC_EBM->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParameter(1)); + inclusiveGausMeanIC_EBM->SetBinError(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParError(1)); + } + + inclusiveRMSIC_EBM->SetBinContent(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetRMS()); + inclusiveRMSIC_EBM->SetBinError(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ inclusiveGausRMSIC_EBM->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParameter(2)); + inclusiveGausRMSIC_EBM->SetBinError(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParError(2)); + } + + for(int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + + EtaBinned_MeanIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetMean()); + EtaBinned_MeanIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetMeanError()); + + EtaBinned_RMSIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetRMS()); + EtaBinned_RMSIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ EtaBinned_GausMeanIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParameter(1)); + EtaBinned_GausMeanIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParError(1)); + + EtaBinned_GausRMSIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParameter(2)); + EtaBinned_GausRMSIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParError(2)); + } + } + + for(int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + + PhiBinned_MeanIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetMean()); + PhiBinned_MeanIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetMeanError()); + + PhiBinned_RMSIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetRMS()); + PhiBinned_RMSIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ PhiBinned_GausMeanIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParameter(1)); + PhiBinned_GausMeanIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParError(1)); + + PhiBinned_GausRMSIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParameter(2)); + PhiBinned_GausRMSIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParError(2)); + } + } + + for(int iSMBin = 0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + + SMBinned_MeanIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetMean()); + SMBinned_MeanIC[iSMBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetMeanError()); + + SMBinned_RMSIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetRMS()); + SMBinned_RMSIC[iSMBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ SMBinned_GausMeanIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParameter(1)); + SMBinned_GausMeanIC[iSMBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParError(1)); + + SMBinned_GausRMSIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParameter(2)); + SMBinned_GausRMSIC[iSMBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParError(2)); + } + } + } + } + + TCanvas* Can_inclusiveMeanIC = new TCanvas("Can_inclusiveMeanIC","",600,500); + TCanvas* Can_inclusiveRMSIC = new TCanvas("Can_inclusiveRMSIC","",600,500); + + TCanvas* Can_inclusiveGausMeanIC = new TCanvas("Can_inclusiveGausMeanIC","",600,500); + TCanvas* Can_inclusiveGausRMSIC = new TCanvas("Can_inclusiveGausRMSIC","",600,500); + + TCanvas* Can_inclusiveMeanIC_EBP = new TCanvas("Can_inclusiveMeanIC_EBP","",600,500); + TCanvas* Can_inclusiveRMSIC_EBP = new TCanvas("Can_inclusiveRMSIC_EBP","",600,500); + + TCanvas* Can_inclusiveGausMeanIC_EBP = new TCanvas("Can_inclusiveGausMeanIC_EBP","",600,500); + TCanvas* Can_inclusiveGausRMSIC_EBP = new TCanvas("Can_inclusiveGausRMSIC_EBP","",600,500); + + TCanvas* Can_inclusiveMeanIC_EBM = new TCanvas("Can_inclusiveMeanIC_EBM","",600,500); + TCanvas* Can_inclusiveRMSIC_EBM = new TCanvas("Can_inclusiveRMSIC_EBM","",600,500); + + TCanvas* Can_inclusiveGausMeanIC_EBM = new TCanvas("Can_inclusiveGausMeanIC_EBM","",600,500); + TCanvas* Can_inclusiveGausRMSIC_EBM = new TCanvas("Can_inclusiveGausRMSIC_EBM","",600,500); + + std::vector Can_EtaBinned_MeanIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_MeanIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_MeanIC (int(20/NPhiSMBinDivision)); + + std::vector Can_EtaBinned_GausMeanIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_GausMeanIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_GausMeanIC (int(20/NPhiSMBinDivision)); + + std::vector Can_EtaBinned_RMSIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_RMSIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_RMSIC (int(20/NPhiSMBinDivision)); + + std::vector Can_EtaBinned_GausRMSIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_GausRMSIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_GausRMSIC (int(20/NPhiSMBinDivision)); + + gStyle->SetOptStat(00000); + + + Can_inclusiveMeanIC->cd(); + Can_inclusiveMeanIC->SetGridx(); + Can_inclusiveMeanIC->SetGridy(); + inclusiveMeanIC->GetXaxis()->SetTitle("i#phi"); + inclusiveMeanIC->GetYaxis()->SetTitle("i#eta"); + inclusiveMeanIC->Draw("colz"); + if(!isDeadTriggerTower) inclusiveMeanIC->SetMinimum(inclusiveMeanIC->GetMinimum()+0.9); + else inclusiveMeanIC->SetMinimum(inclusiveMeanIC->GetMinimum()+0.75); + inclusiveMeanIC->Draw("textSAME"); + Can_inclusiveMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC->GetName())+".png").c_str(),"png"); + + Can_inclusiveRMSIC->cd(); + Can_inclusiveRMSIC->SetGridx(); + Can_inclusiveRMSIC->SetGridy(); + inclusiveRMSIC->GetXaxis()->SetTitle("i#phi"); + inclusiveRMSIC->GetYaxis()->SetTitle("i#eta"); + inclusiveRMSIC->Draw("colz"); + inclusiveRMSIC->Draw("textSAME"); + Can_inclusiveRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_inclusiveGausMeanIC->cd(); + Can_inclusiveGausMeanIC->SetGridx(); + Can_inclusiveGausMeanIC->SetGridy(); + inclusiveGausMeanIC->SetMinimum(inclusiveGausMeanIC->GetMinimum()+0.9); + inclusiveGausMeanIC->GetXaxis()->SetTitle("i#phi"); + inclusiveGausMeanIC->GetYaxis()->SetTitle("i#eta"); + inclusiveGausMeanIC->Draw("colz"); + inclusiveGausMeanIC->Draw("textSAME"); + Can_inclusiveGausMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC->GetName())+".png").c_str(),"png"); + + Can_inclusiveGausRMSIC->cd(); + Can_inclusiveGausRMSIC->SetGridx(); + Can_inclusiveGausRMSIC->SetGridy(); + inclusiveGausRMSIC->GetXaxis()->SetTitle("i#phi"); + inclusiveGausRMSIC->GetYaxis()->SetTitle("i#eta"); + inclusiveGausRMSIC->Draw("colz"); + inclusiveGausRMSIC->Draw("textSAME"); + Can_inclusiveGausRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC->GetName())+".png").c_str(),"png"); + } + + Can_inclusiveMeanIC_EBP->cd(); + Can_inclusiveMeanIC_EBP->SetGridx(); + Can_inclusiveMeanIC_EBP->SetGridy(); + inclusiveMeanIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveMeanIC_EBP->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) inclusiveMeanIC_EBP->SetMinimum(inclusiveMeanIC_EBP->GetMinimum()+0.9); + else inclusiveMeanIC_EBP->SetMinimum(inclusiveMeanIC_EBP->GetMinimum()+0.75); + inclusiveMeanIC_EBP->Draw("colz"); + inclusiveMeanIC_EBP->Draw("textSAME"); + Can_inclusiveMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBP->GetName())+".png").c_str(),"png"); + + Can_inclusiveRMSIC_EBP->cd(); + Can_inclusiveRMSIC_EBP->SetGridx(); + Can_inclusiveRMSIC_EBP->SetGridy(); + inclusiveRMSIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveRMSIC_EBP->GetYaxis()->SetTitle("i#eta"); + inclusiveRMSIC_EBP->Draw("colz"); + inclusiveRMSIC_EBP->Draw("textSAME"); + Can_inclusiveRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBP->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_inclusiveGausMeanIC_EBP->cd(); + Can_inclusiveGausMeanIC_EBP->SetGridx(); + Can_inclusiveGausMeanIC_EBP->SetGridy(); + inclusiveGausMeanIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveGausMeanIC_EBP->GetYaxis()->SetTitle("i#eta"); + inclusiveGausMeanIC_EBP->SetMinimum(inclusiveGausMeanIC_EBP->GetMinimum()+0.9); + inclusiveGausMeanIC_EBP->Draw("colz"); + inclusiveGausMeanIC_EBP->Draw("textSAME"); + Can_inclusiveGausMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBP->GetName())+".png").c_str(),"png"); + + Can_inclusiveGausRMSIC_EBP->cd(); + Can_inclusiveGausRMSIC_EBP->SetGridx(); + Can_inclusiveGausRMSIC_EBP->SetGridy(); + inclusiveGausRMSIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveGausRMSIC_EBP->GetYaxis()->SetTitle("i#eta"); + inclusiveGausRMSIC_EBP->Draw("colz"); + inclusiveGausRMSIC_EBP->Draw("textSAME"); + Can_inclusiveGausRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBP->GetName())+".png").c_str(),"png"); + } + + Can_inclusiveMeanIC_EBM->cd(); + Can_inclusiveMeanIC_EBM->SetGridx(); + Can_inclusiveMeanIC_EBM->SetGridy(); + inclusiveMeanIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveMeanIC_EBM->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) inclusiveMeanIC_EBM->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.9); + else inclusiveMeanIC_EBM->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.75); + inclusiveMeanIC_EBM->Draw("colz"); + inclusiveMeanIC_EBM->Draw("textSAME"); + Can_inclusiveMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBM->GetName())+".png").c_str(),"png"); + + Can_inclusiveRMSIC_EBM->cd(); + Can_inclusiveRMSIC_EBM->SetGridx(); + Can_inclusiveRMSIC_EBM->SetGridy(); + inclusiveRMSIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveRMSIC_EBM->GetYaxis()->SetTitle("i#eta"); + inclusiveRMSIC_EBM->Draw("colz"); + inclusiveRMSIC_EBM->Draw("textSAME"); + Can_inclusiveRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBM->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_inclusiveGausMeanIC_EBM->cd(); + Can_inclusiveGausMeanIC_EBM->SetGridx(); + Can_inclusiveGausMeanIC_EBM->SetGridy(); + inclusiveGausMeanIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveGausMeanIC_EBM->GetYaxis()->SetTitle("i#eta"); + inclusiveGausMeanIC_EBM->SetMinimum(inclusiveGausMeanIC_EBM->GetMinimum()+0.9); + inclusiveGausMeanIC_EBM->Draw("colz"); + inclusiveGausMeanIC_EBM->Draw("textSAME"); + Can_inclusiveGausMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBM->GetName())+".png").c_str(),"png"); + + Can_inclusiveGausRMSIC_EBM->cd(); + Can_inclusiveGausRMSIC_EBM->SetGridx(); + Can_inclusiveGausRMSIC_EBM->SetGridy(); + inclusiveGausRMSIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveGausRMSIC_EBM->GetYaxis()->SetTitle("i#eta"); + inclusiveGausRMSIC_EBM->Draw("colz"); + inclusiveGausRMSIC_EBM->Draw("textSAME"); + Can_inclusiveGausRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBM->GetName())+".png").c_str(),"png"); + } + + for(int iEtaBin = 0; iEtaBin< int(EtaBinned_MeanIC.size()) ; iEtaBin++){ + + Can_EtaBinned_MeanIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_MeanIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + Can_EtaBinned_RMSIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_RMSIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + Can_EtaBinned_GausMeanIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_GausMeanIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)), + int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + Can_EtaBinned_GausRMSIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_GausRMSIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)), + int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + + Can_EtaBinned_MeanIC[iEtaBin]->cd(); + Can_EtaBinned_MeanIC[iEtaBin]->SetGridx(); + Can_EtaBinned_MeanIC[iEtaBin]->SetGridy(); + EtaBinned_MeanIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_MeanIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) EtaBinned_MeanIC[iEtaBin]->SetMinimum(EtaBinned_MeanIC[iEtaBin]->GetMinimum()+0.9); + else EtaBinned_MeanIC[iEtaBin]->SetMinimum(EtaBinned_MeanIC[iEtaBin]->GetMinimum()+0.75); + EtaBinned_MeanIC[iEtaBin]->Draw("colz"); + EtaBinned_MeanIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_MeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_MeanIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_MeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_MeanIC[iEtaBin]->GetName())+".png").c_str(),"png"); + + Can_EtaBinned_RMSIC[iEtaBin]->cd(); + Can_EtaBinned_RMSIC[iEtaBin]->SetGridx(); + Can_EtaBinned_RMSIC[iEtaBin]->SetGridy(); + EtaBinned_RMSIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_RMSIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + EtaBinned_RMSIC[iEtaBin]->Draw("colz"); + EtaBinned_RMSIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_RMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_RMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_EtaBinned_GausMeanIC[iEtaBin]->cd(); + Can_EtaBinned_GausMeanIC[iEtaBin]->SetGridx(); + Can_EtaBinned_GausMeanIC[iEtaBin]->SetGridy(); + EtaBinned_GausMeanIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_GausMeanIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + EtaBinned_GausMeanIC[iEtaBin]->SetMinimum(EtaBinned_GausMeanIC[iEtaBin]->GetMinimum()+0.9); + EtaBinned_GausMeanIC[iEtaBin]->Draw("colz"); + EtaBinned_GausMeanIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_GausMeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_GausMeanIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_GausMeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_GausMeanIC[iEtaBin]->GetName())+".png").c_str(),"png"); + Can_EtaBinned_GausRMSIC[iEtaBin]->cd(); + Can_EtaBinned_GausRMSIC[iEtaBin]->SetGridx(); + Can_EtaBinned_GausRMSIC[iEtaBin]->SetGridy(); + EtaBinned_GausRMSIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_GausRMSIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + EtaBinned_GausRMSIC[iEtaBin]->Draw("colz"); + EtaBinned_GausRMSIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_GausRMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_GausRMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".png").c_str(),"png"); + } + } + + for(int iPhiBin = 0; iPhiBincd(); + Can_PhiBinned_MeanIC[iPhiBin]->SetGridx(); + Can_PhiBinned_MeanIC[iPhiBin]->SetGridy(); + PhiBinned_MeanIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_MeanIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) PhiBinned_MeanIC[iPhiBin]->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.9); + else PhiBinned_MeanIC[iPhiBin]->SetMinimum(PhiBinned_MeanIC[iPhiBin]->GetMinimum()+0.75); + PhiBinned_MeanIC[iPhiBin]->Draw("colz"); + PhiBinned_MeanIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_MeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_MeanIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_MeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_MeanIC[iPhiBin]->GetName())+".png").c_str(),"png"); + + Can_PhiBinned_RMSIC[iPhiBin]->cd(); + Can_PhiBinned_RMSIC[iPhiBin]->SetGridx(); + Can_PhiBinned_RMSIC[iPhiBin]->SetGridy(); + PhiBinned_RMSIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_RMSIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + PhiBinned_RMSIC[iPhiBin]->Draw("colz"); + PhiBinned_RMSIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_RMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_RMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".png").c_str(),"png"); + + + if(!isDeadTriggerTower){ + Can_PhiBinned_GausMeanIC[iPhiBin]->cd(); + Can_PhiBinned_GausMeanIC[iPhiBin]->SetGridx(); + Can_PhiBinned_GausMeanIC[iPhiBin]->SetGridy(); + PhiBinned_GausMeanIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_GausMeanIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + PhiBinned_GausMeanIC[iPhiBin]->SetMinimum(PhiBinned_GausMeanIC[iPhiBin]->GetMinimum()+0.9); + PhiBinned_GausMeanIC[iPhiBin]->Draw("colz"); + PhiBinned_GausMeanIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_GausMeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_GausMeanIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_GausMeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_GausMeanIC[iPhiBin]->GetName())+".png").c_str(),"png"); + + Can_PhiBinned_GausRMSIC[iPhiBin]->cd(); + Can_PhiBinned_GausRMSIC[iPhiBin]->SetGridx(); + Can_PhiBinned_GausRMSIC[iPhiBin]->SetGridy(); + PhiBinned_GausRMSIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_GausRMSIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + PhiBinned_GausRMSIC[iPhiBin]->Draw("colz"); + PhiBinned_GausRMSIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_GausRMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_GausRMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".png").c_str(),"png"); + } + } + + for(int iSMBin = 0; iSMBincd(); + Can_SMBinned_MeanIC[iSMBin]->SetGridx(); + Can_SMBinned_MeanIC[iSMBin]->SetGridy(); + SMBinned_MeanIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_MeanIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) SMBinned_MeanIC[iSMBin]->SetMinimum(SMBinned_MeanIC[iSMBin]->GetMinimum()+0.9); + else SMBinned_MeanIC[iSMBin]->SetMinimum(SMBinned_MeanIC[iSMBin]->GetMinimum()+0.75); + SMBinned_MeanIC[iSMBin]->Draw("colz"); + SMBinned_MeanIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_MeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_MeanIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_MeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_MeanIC[iSMBin]->GetName())+".png").c_str(),"png"); + + Can_SMBinned_RMSIC[iSMBin]->cd(); + Can_SMBinned_RMSIC[iSMBin]->SetGridx(); + Can_SMBinned_RMSIC[iSMBin]->SetGridy(); + SMBinned_RMSIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_RMSIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + SMBinned_RMSIC[iSMBin]->Draw("colz"); + SMBinned_RMSIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_RMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_RMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_SMBinned_GausMeanIC[iSMBin]->cd(); + Can_SMBinned_GausMeanIC[iSMBin]->SetGridx(); + Can_SMBinned_GausMeanIC[iSMBin]->SetGridy(); + SMBinned_GausMeanIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_GausMeanIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + SMBinned_GausMeanIC[iSMBin]->SetMinimum(SMBinned_GausMeanIC[iSMBin]->GetMinimum()+0.9); + SMBinned_GausMeanIC[iSMBin]->Draw("colz"); + SMBinned_GausMeanIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_GausMeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_GausMeanIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_GausMeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_GausMeanIC[iSMBin]->GetName())+".png").c_str(),"png"); + + Can_SMBinned_GausRMSIC[iSMBin]->cd(); + Can_SMBinned_GausRMSIC[iSMBin]->SetGridx(); + Can_SMBinned_GausRMSIC[iSMBin]->SetGridy(); + SMBinned_GausRMSIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_GausRMSIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + SMBinned_GausRMSIC[iSMBin]->Draw("colz"); + SMBinned_GausRMSIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_GausRMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_GausRMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".png").c_str(),"png"); + } + } + + return 0; + +} + + +// LocalWords: ieta diff --git a/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp b/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp new file mode 100644 index 00000000000..99a572a1973 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp @@ -0,0 +1,207 @@ +#include +#include +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TMath.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TApplication.h" +#include "../interface/TEndcapRings.h" + +using namespace std ; + +int main(int argc, char**argv){ + + + const char* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root"; + const char* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root"; + int evalStat = 1; + int inputLoops = 25; + + const int nLoops = inputLoops; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return -1; + } + + cout << "Making calibration plots for: " << infile2 << endl; + + TApplication* theApp = new TApplication("Application",&argc, argv); + + char hname[100]; + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + + TF1 *pol0_0 = new TF1("pol0_0","pol1",0,20); + TF1 *pol0_1 = new TF1("pol0_1","pol1",20,40); + TF1 *pol0_2 = new TF1("pol0_2","pol1",40,60); + TF1 *pol0_3 = new TF1("pol0_3","pol1",60,85); + + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap2[nLoops]; + TH2F *hcmap3[nLoops]; + + TGraphErrors *statprecision_vs_ieta[nLoops]; + TGraphErrors *statprecision_vs_loop[4]; + + int ipoint = 0; + + for ( int ietaregion=0; ietaregion<4; ietaregion++){ + + statprecision_vs_loop[ietaregion] = new TGraphErrors(); + statprecision_vs_loop[ietaregion]->SetMarkerStyle(20); + statprecision_vs_loop[ietaregion]->SetMarkerSize(1); + statprecision_vs_loop[ietaregion]->SetMarkerColor(kBlue+2); + if (ietaregion == 0) statprecision_vs_loop[ietaregion]->SetTitle("i#eta < 20"); + if (ietaregion == 1) statprecision_vs_loop[ietaregion]->SetTitle("20 < i#eta < 40"); + if (ietaregion == 2) statprecision_vs_loop[ietaregion]->SetTitle("40 < i#eta < 60"); + if (ietaregion == 3) statprecision_vs_loop[ietaregion]->SetTitle("60 < i#eta < 85"); + } + + + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"h2_%d_hC_scale_EB",iLoop); + hcmap2[iLoop] = (TH2F*)f2->Get(hname); + hcmap3[iLoop] = (TH2F*)f3->Get(hname); + + TH1F *hstatprecision[171]; + + for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ + + float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hstatprecision_ring_ieta%02f_%d",etaring,iLoop); + hstatprecision[jbin-1] = new TH1F(hname, hname, 150,-0.5,0.5); + for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ + + float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecision[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample + + } + } + } + + + statprecision_vs_ieta[iLoop] = new TGraphErrors(); + statprecision_vs_ieta[iLoop]->SetMarkerStyle(20); + statprecision_vs_ieta[iLoop]->SetMarkerSize(1); + statprecision_vs_ieta[iLoop]->SetMarkerColor(kRed+2); + + int n = 0; + + for (int i = 1; i < hcmap2[iLoop]-> GetNbinsY()+1; i++){ + float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(i); + if (int(etaring)==0) continue; + if ( hstatprecision[i-1]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[iLoop]-> GetYaxis()->GetBinWidth(i); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecision[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecision[i-1]->GetRMS(),5*hstatprecision[i-1]->GetRMS()); + hstatprecision[i-1]->Fit("fgaus","QR"); + statprecision_vs_ieta[iLoop]-> SetPoint(n,etaring,fgaus->GetParameter(2)); + statprecision_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + statprecision_vs_ieta[iLoop]->Fit("pol0_0","QR"); + statprecision_vs_ieta[iLoop]->Fit("pol0_1","QR"); + statprecision_vs_ieta[iLoop]->Fit("pol0_2","QR"); + statprecision_vs_ieta[iLoop]->Fit("pol0_3","QR"); + + statprecision_vs_loop[0]->SetPoint(ipoint,iLoop+1,pol0_0->GetParameter(0)+pol0_0->GetParameter(1)*10); + statprecision_vs_loop[0]->SetPointError(ipoint,0.5,sqrt(pol0_0->GetParError(0)*pol0_0->GetParError(0)+pol0_0->GetParError(1)*pol0_0->GetParError(1))); + statprecision_vs_loop[1]->SetPoint(ipoint,iLoop+1,pol0_1->GetParameter(0)+pol0_1->GetParameter(1)*30); + statprecision_vs_loop[1]->SetPointError(ipoint,0.5,sqrt(pol0_1->GetParError(0)*pol0_1->GetParError(0)+pol0_1->GetParError(1)*pol0_1->GetParError(1))); + statprecision_vs_loop[2]->SetPoint(ipoint,iLoop+1,pol0_2->GetParameter(0)+pol0_2->GetParameter(1)*50); + statprecision_vs_loop[2]->SetPointError(ipoint,0.5,sqrt(pol0_0->GetParError(0)*pol0_2->GetParError(0)+pol0_2->GetParError(1)*pol0_2->GetParError(1))); + statprecision_vs_loop[3]->SetPoint(ipoint,iLoop+1,pol0_3->GetParameter(0)+pol0_3->GetParameter(1)*72.5); + statprecision_vs_loop[3]->SetPointError(ipoint,0.5,sqrt(pol0_3->GetParError(0)*pol0_3->GetParError(0)+pol0_3->GetParError(1)*pol0_3->GetParError(1))); + ipoint++; + + } + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[nLoops]; + TCanvas *c2[4]; + + TFile * out = new TFile ("StatPrecEB.root","RECREATE"); + // --- plot 5 : statistical precision vs ieta + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"cstat_%d",iLoop); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.07); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ieta[iLoop]->Draw("ap"); + + if(iLoop == nLoops -1){ + out->cd(); + statprecision_vs_ieta[iLoop]->SetName("gr_stat_prec"); + statprecision_vs_ieta[iLoop]->Write(); + } + + } + + + for ( int ietaregion = 0; ietaregion < 4; ietaregion++ ) { + + sprintf(hname,"ietaregion_%d",ietaregion); + c2[ietaregion] = new TCanvas(hname,hname); + c2[ietaregion]->SetGridx(); + c2[ietaregion]->SetGridy(); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.04); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); + statprecision_vs_loop[ietaregion]->Draw("ap"); + } + + theApp->Run(); + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp b/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp new file mode 100644 index 00000000000..b3bd09dca17 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp @@ -0,0 +1,319 @@ +#include +#include +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TMath.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TApplication.h" +#include "../interface/TEndcapRings.h" + +using namespace std ; + +int main(int argc, char**argv){ + + // Foundamental parameters + const char* infile2 = "/data1/rgerosa/L3_Weight/16Jan_LC_20120131_FT_R_42_V24/Even_WZAnalysis_WElectron_ZElectron_42XReReco_16Jan_LC_20120131_FT_R_42_V24_Z_R9_EE.root "; + const char* infile3 = "/data1/rgerosa/L3_Weight/16Jan_LC_20120131_FT_R_42_V24/Odd_WZAnalysis_WElectron_ZElectron_42XReReco_16Jan_LC_20120131_FT_R_42_V24_Z_R9_EE.root"; + int evalStat = 1; + int inputLoops = 25; + + const int nLoops = inputLoops; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + TApplication* theApp = new TApplication("Application",&argc, argv); + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return -1; + } + + cout << "Making calibration plots for: " << infile2 << endl; + + char hname[100]; + + // Functions for fit + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + + TF1 *pol0_0EEP = new TF1("pol0_0EEP","pol1",85,95); + TF1 *pol0_1EEP= new TF1("pol0_1EEP","pol1",95,105); + TF1 *pol0_2EEP = new TF1("pol0_2EEP","pol1",105,125); + TF1 *pol0_0EEM = new TF1("pol0_0EEM","pol1",85,95); + TF1 *pol0_1EEM= new TF1("pol0_1EEM","pol1",95,105); + TF1 *pol0_2EEM = new TF1("pol0_2EEM","pol1",105,125); + + TGraphErrors *statprecision_vs_ietaEEP[nLoops]; + TGraphErrors *statprecision_vs_ietaEEM[nLoops]; + + TGraphErrors *statprecision_vs_loopEEP[3]; + TGraphErrors *statprecision_vs_loopEEM[3]; + + + int ipointEEP = 0; + int ipointEEM = 0; + + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap1EEP[nLoops]; + TH2F *hcmap1EEM[nLoops]; + TH2F *hcmap2EEP[nLoops]; + TH2F *hcmap2EEM[nLoops]; + + + for ( int ietaregion=0; ietaregion<3; ietaregion++){ + + statprecision_vs_loopEEP[ietaregion] = new TGraphErrors(); + statprecision_vs_loopEEP[ietaregion]->SetMarkerStyle(20); + statprecision_vs_loopEEP[ietaregion]->SetMarkerColor(kBlue+2); + + statprecision_vs_loopEEM[ietaregion] = new TGraphErrors(); + statprecision_vs_loopEEM[ietaregion]->SetMarkerStyle(20); + statprecision_vs_loopEEM[ietaregion]->SetMarkerColor(kBlue+2); + + if (ietaregion == 0) statprecision_vs_loopEEP[ietaregion]->SetTitle("85SetTitle("100 < i#eta < 110"); + if (ietaregion == 2) statprecision_vs_loopEEP[ietaregion]->SetTitle("110 < i#eta < 125"); + + if (ietaregion == 0) statprecision_vs_loopEEM[ietaregion]->SetTitle("85SetTitle("100 < i#eta < 110"); + if (ietaregion == 2) statprecision_vs_loopEEM[ietaregion]->SetTitle("110 < i#eta < 125"); + + } + + // analyze each iteration loop step + + TEndcapRings *eRings = new TEndcapRings(); + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"h2_%d_hC_scale_EEP",iLoop); + hcmap1EEP[iLoop] = (TH2F*)f2->Get(hname); + hcmap2EEP[iLoop] = (TH2F*)f3->Get(hname); + + sprintf(hname,"h2_%d_hC_scale_EEM",iLoop); + hcmap1EEM[iLoop] = (TH2F*)f2->Get(hname); + hcmap2EEM[iLoop] = (TH2F*)f3->Get(hname); + + // compute statistical precision + TH1F *hstatprecisionEEP[40]; + TH1F *hstatprecisionEEM[40]; + + for(int i =0;i<40; i++){ + + sprintf(hname,"hstatprecision_ring_ieta_EEP%02d_iLoop%02d",i,iLoop); + hstatprecisionEEP[i] = new TH1F(hname, hname, 100,-0.4,0.4); + sprintf(hname,"hstatprecision_ring_ieta_EEM%02d_iLoop%02d",i,iLoop); + hstatprecisionEEM[i] = new TH1F(hname, hname, 100,-0.4,0.4); + } + + for (int ix = 1; ix < hcmap1EEP[iLoop]-> GetNbinsX()+1; ix++){ + for (int iy = 1; iy < hcmap1EEP[iLoop]-> GetNbinsY()+1; iy++){ + + if( hcmap1EEP[iLoop]->GetBinContent(ix,iy) ==0 || hcmap2EEP[iLoop]->GetBinContent(ix,iy) ==0 ) continue; + int etaring = int(fabs(eRings->GetEndcapIeta(ix,iy,1))); + if(etaring<0) continue; + float ic1 = hcmap1EEP[iLoop]->GetBinContent(ix,iy); + float ic2 = hcmap2EEP[iLoop]->GetBinContent(ix,iy); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecisionEEP[etaring-86]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire + + } + } + } + + for (int ix = 1; ix < hcmap1EEM[iLoop]-> GetNbinsX()+1; ix++){ + for (int iy = 1; iy < hcmap1EEM[iLoop]-> GetNbinsY()+1; iy++){ + + if( hcmap1EEM[iLoop]->GetBinContent(ix,iy) ==0 || hcmap2EEM[iLoop]->GetBinContent(ix,iy) ==0 ) continue; + int etaring = int(fabs(eRings->GetEndcapIeta(ix,iy,-1))); + if(etaring<0) continue; + float ic1 = hcmap1EEM[iLoop]->GetBinContent(ix,iy); + float ic2 = hcmap2EEM[iLoop]->GetBinContent(ix,iy); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecisionEEM[etaring-86]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample + + } + } + } + + + statprecision_vs_ietaEEP[iLoop] = new TGraphErrors(); + statprecision_vs_ietaEEP[iLoop]->SetMarkerStyle(20); + statprecision_vs_ietaEEP[iLoop]->SetMarkerSize(1); + statprecision_vs_ietaEEP[iLoop]->SetMarkerColor(kRed+2); + + int nEEP = 0; + int nEEM = 0; + for (int i = 0 ; i<33 ; i++){ + if ( hstatprecisionEEP[i]->GetEntries() <= 25) continue; + fgaus->SetParameter(1,hstatprecisionEEP[i]->GetMean()); + fgaus->SetParameter(2,hstatprecisionEEP[i]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionEEP[i]->GetRMS(),5*hstatprecisionEEP[i]->GetRMS()); + hstatprecisionEEP[i]->Fit("fgaus","QRM"); + statprecision_vs_ietaEEP[iLoop]-> SetPoint(nEEP,86+i,fgaus->GetParameter(2)); + statprecision_vs_ietaEEP[iLoop]-> SetPointError(nEEP,0,fgaus->GetParError(2)); + nEEP++; + } + statprecision_vs_ietaEEP[iLoop]->Fit("pol0_0EEP","QMER"); + statprecision_vs_ietaEEP[iLoop]->Fit("pol0_1EEP","QMER"); + statprecision_vs_ietaEEP[iLoop]->Fit("pol0_2EEP","QMER"); + + statprecision_vs_loopEEP[0]->SetPoint(ipointEEP,iLoop+1,pol0_0EEP->GetParameter(0)+pol0_0EEP->GetParameter(1)*90); + statprecision_vs_loopEEP[0]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_0EEP->GetParError(0)*pol0_0EEP->GetParError(0)+pol0_0EEP->GetParError(1)*pol0_0EEP->GetParError(1))); + + + statprecision_vs_loopEEP[1]->SetPoint(ipointEEP,iLoop+1,pol0_1EEP->GetParameter(0)+pol0_1EEP->GetParameter(1)*100); + statprecision_vs_loopEEP[1]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_1EEP->GetParError(0)*pol0_1EEP->GetParError(0)+pol0_1EEP->GetParError(1)*pol0_1EEP->GetParError(1))); + + + statprecision_vs_loopEEP[2]->SetPoint(ipointEEP,iLoop+1,pol0_2EEP->GetParameter(0)+pol0_2EEP->GetParameter(1)*110); + statprecision_vs_loopEEP[2]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_2EEP->GetParError(0)*pol0_2EEP->GetParError(0)+pol0_2EEP->GetParError(1)*pol0_2EEP->GetParError(1))); + + + ipointEEP++; + + statprecision_vs_ietaEEM[iLoop] = new TGraphErrors(); + statprecision_vs_ietaEEM[iLoop]->SetMarkerStyle(20); + statprecision_vs_ietaEEM[iLoop]->SetMarkerSize(1); + statprecision_vs_ietaEEM[iLoop]->SetMarkerColor(kRed+2); + + for (int i = 0 ; i<33 ; i++){ + + if ( hstatprecisionEEM[i]->GetEntries() <= 25) continue; + fgaus->SetParameter(1,hstatprecisionEEM[i]->GetMean()); + fgaus->SetParameter(2,hstatprecisionEEM[i]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionEEM[i]->GetRMS(),5*hstatprecisionEEM[i]->GetRMS()); + hstatprecisionEEM[i]->Fit("fgaus","QRM"); + statprecision_vs_ietaEEM[iLoop]-> SetPoint(nEEM,86+i,fgaus->GetParameter(2)); + statprecision_vs_ietaEEM[iLoop]-> SetPointError(nEEM,0,fgaus->GetParError(2)); + nEEM++; + } + + statprecision_vs_ietaEEM[iLoop]->Fit("pol0_0EEM","QRME"); + statprecision_vs_ietaEEM[iLoop]->Fit("pol0_1EEM","QRME"); + statprecision_vs_ietaEEM[iLoop]->Fit("pol0_2EEM","QRME"); + + statprecision_vs_loopEEM[0]->SetPoint(ipointEEM,iLoop+1,pol0_0EEM->GetParameter(0)+pol0_0EEM->GetParameter(1)*90); + statprecision_vs_loopEEM[0]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_0EEM->GetParError(0)*pol0_0EEM->GetParError(0)+pol0_0EEM->GetParError(1)*pol0_0EEM->GetParError(1))); + statprecision_vs_loopEEM[1]->SetPoint(ipointEEM,iLoop+1,pol0_1EEM->GetParameter(0)+pol0_1EEM->GetParameter(1)*100); + statprecision_vs_loopEEM[1]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_1EEM->GetParError(0)*pol0_1EEM->GetParError(0)+pol0_1EEM->GetParError(1)*pol0_1EEM->GetParError(1))); + statprecision_vs_loopEEM[2]->SetPoint(ipointEEM,iLoop+1,pol0_2EEM->GetParameter(0)+pol0_2EEM->GetParameter(1)*110); + statprecision_vs_loopEEM[2]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_2EEM->GetParError(0)*pol0_2EEM->GetParError(0)+pol0_2EEM->GetParError(1)*pol0_2EEM->GetParError(1))); + + + ipointEEM++; + + } + + + // DrawPlots + + TCanvas *cEEP[4]; + TCanvas *cEEM[4]; + + + // TFile * out = new TFile ("StatPrecEE.root","RECREATE"); + // --- plot 5 : statistical precision vs ieta + + /* for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + sprintf(hname,"cstat_EEP%d",iLoop); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.001,0.15); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ietaEEP[iLoop]->Draw("ap"); + if(iLoop == nLoops -1) + { + out->cd(); + statprecision_vs_ietaEEP[iLoop]->SetName("gr_stat_precEEP"); + statprecision_vs_ietaEEP[iLoop]->Write(); + } + + }*/ + + + /* for ( int iLoop = nLoops; iLoop < nLoops*2; iLoop++ ) { + sprintf(hname,"cstat_EEM%d",iLoop-nLoops); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetYaxis()-> SetRangeUser(0.001,0.15); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetXaxis()-> SetRangeUser(-125,-85); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ietaEEM[iLoop-nLoops]->Draw("ap"); + if(iLoop == 2*nLoops -1) + { + out->cd(); + statprecision_vs_ietaEEM[iLoop-nLoops]->SetName("gr_stat_precEEM"); + statprecision_vs_ietaEEM[iLoop-nLoops]->Write(); + } + + }*/ + + // --- plot 6 : statistical precision vs loop + + for ( int ietaregion = 0; ietaregion < 3; ietaregion++ ) { + sprintf(hname,"ietaregion_EEP%d",ietaregion); + cEEP[ietaregion] = new TCanvas(hname,hname); + cEEP[ietaregion]->SetGridx(); + cEEP[ietaregion]->SetGridy(); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.1); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); + statprecision_vs_loopEEP[ietaregion]->Draw("ap"); + } + + for ( int ietaregion = 0; ietaregion < 3; ietaregion++ ) { + sprintf(hname,"ietaregion_EEM%d",ietaregion); + cEEM[ietaregion] = new TCanvas(hname,hname); + cEEM[ietaregion]->SetGridx(); + cEEM[ietaregion]->SetGridy(); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.1); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); + statprecision_vs_loopEEM[ietaregion]->Draw("ap"); + } + + theApp->Run(); + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp b/EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp new file mode 100644 index 00000000000..a5004905e52 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp @@ -0,0 +1,361 @@ +#include "../interface/FastCalibratorEB.h" +#include +#include +#include + +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/CalibrationUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +int main (int argc, char ** argv) { + + ///Check if all nedeed arguments to parse are there + if(argc != 2){ + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + // parameterSet.reset(); + + std::string inputList = "NULL"; + if(Options.existsAs("inputList")) + inputList = Options.getParameter("inputList"); + else{ std::cout<<" Exit from code, no input list found"<("inputFileDeadXtal")) + inputFileDeadXtal = Options.getParameter("inputFileDeadXtal"); + else{ std::cout<<" No input File Dead Xtal found! "<("inputTree")) + inputTree = Options.getParameter("inputTree"); + else{ std::cout<<" Exit from code, no input tree found"<("jsonFileName")) + jsonFileName = Options.getParameter("jsonFileName"); + else{ std::cout<<" Exit from code, no jsonFile found"< > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + std::string miscalibMap = "NULL"; + if(Options.existsAs("miscalibMap")) + miscalibMap = Options.getParameter("miscalibMap"); + else{ std::cout<<" no miscalib map found"<("isMiscalib")) + isMiscalib = Options.getParameter("isMiscalib"); + + bool isSaveEPDistribution = false; + if(Options.existsAs("isSaveEPDistribution")) + isSaveEPDistribution = Options.getParameter("isSaveEPDistribution"); + + bool isMCTruth = false; + if(Options.existsAs("isMCTruth")) + isMCTruth = Options.getParameter("isMCTruth"); + + bool isEPselection = false; + if(Options.existsAs("isEPselection")) + isEPselection = Options.getParameter("isEPselection"); + + bool isPtCut = false; + if(Options.existsAs("isPtCut")) + isPtCut = Options.getParameter("isPtCut"); + + double PtMin = 0.; + if(Options.existsAs("PtMin")) + PtMin = Options.getParameter("PtMin"); + + bool isfbrem = false; + if(Options.existsAs("isfbrem")) + isfbrem = Options.getParameter("isfbrem"); + + double fbremMax = 100.; + if(Options.existsAs("fbremMax")) + fbremMax = Options.getParameter("fbremMax"); + + bool isR9selection = false; + if(Options.existsAs("isR9selection")) + isR9selection = Options.getParameter("isR9selection"); + + double R9Min = -1.; + if(Options.existsAs("R9Min")) + R9Min = Options.getParameter("R9Min"); + + int miscalibMethod = 1; + if(Options.existsAs("miscalibMethod")) + miscalibMethod = Options.getParameter("miscalibMethod"); + + std::string inputMomentumScale = "NULL"; + if(Options.existsAs("inputMomentumScale")) + inputMomentumScale = Options.getParameter("inputMomentumScale"); + + std::string typeEB = "NULL"; + if(Options.existsAs("typeEB")) + typeEB = Options.getParameter("typeEB"); + int nRegionsEB = GetNRegionsEB(typeEB); + + std::string typeEE = "NULL"; + if(Options.existsAs("typeEE")) + typeEE = Options.getParameter("typeEE"); + + std::string outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; + if(Options.existsAs("outputPath")) + outputPath = Options.getParameter("outputPath"); + system(("mkdir -p "+outputPath).c_str()); + + std::string outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + int numberOfEvents = -1; + if(Options.existsAs("numberOfEvents")) + numberOfEvents = Options.getParameter("numberOfEvents"); + + int useZ = 1; + if(Options.existsAs("useZ")) + useZ = Options.getParameter("useZ"); + + int useW = 1; + if(Options.existsAs("useW")) + useW = Options.getParameter("useW"); + + int splitStat = 0; + if(Options.existsAs("splitStat")) + splitStat = Options.getParameter("splitStat"); + + int nLoops = 20; + if(Options.existsAs("nLoops")) + nLoops = Options.getParameter("nLoops"); + + bool isDeadTriggerTower = false; + if(Options.existsAs("isDeadTriggerTower")) + isDeadTriggerTower = Options.getParameter("isDeadTriggerTower"); + + + /// open ntupla of data or MC + TChain * tree = new TChain (inputTree.c_str()); + FillChain(*tree,inputList); + + /// open calibration momentum graph + TFile* momentumscale = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EB; + + for(int i = 0; i < nRegionsEB; ++i){ + TString Name = Form("g_EoC_EB_%d",i); + g_EoC_EB.push_back( (TGraphErrors*)(momentumscale->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = tree->GetEntries(); + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + + if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_miscalib_EB",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_EB",outputFile.c_str()); + + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_R9_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_miscalib_EB",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_EB",outputFile.c_str()); + else { std::cout<<" Option not considered --> exit "< exit "< +#include +#include +#include +#include "ConfigParser.h" +#include "ntpleUtils.h" + +/// Code used for Run IC procedure on EB/ + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + +// std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + + std::string inputFileDeadXtal ="NULL" ; + try { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch ( char const* exceptionString ){ + std::cerr << " exception = " << exceptionString << std::endl; + + } + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// open ntupla of data or MC + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_Z_noEP_miscalib",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_Z_noEP",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_noEP_miscalib",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_noEP",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + if(isSaveEPDistribution == true) + { + FastCalibratorEB_MVA analyzer(albero,outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer.saveHistos(f1); + } + else + { + FastCalibratorEB_MVA analyzer(albero); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + std::string evenFile = "Even_" + outputFile; + std::string oddFile = "Odd_" + outputFile; + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9_miscalib.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP_miscalib.root",oddFile.c_str()); + } + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_Z_noEP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP_miscalib.root",oddFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP.root",oddFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_Z_noEP.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP.root",oddFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_R9_miscalib.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_EP_miscalib.root",oddFile.c_str()); + } + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_noEP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_noEP_miscalib.root",oddFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9.root",evenFile.c_str()); + name2 = Form ("%s_R9.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP.root",evenFile.c_str()); + name2 = Form ("%s_EP.root",oddFile.c_str()); + } + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_noEP.root",evenFile.c_str()); + name2 = Form ("%s_noEP.root",oddFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + /// Run on odd + FastCalibratorEB_MVA analyzer_even(albero); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer_even.saveHistos(f1); + + /// Run on even + FastCalibratorEB_MVA analyzer_odd(albero); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer_odd.saveHistos(f2); + + } + + delete albero; + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp b/EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp new file mode 100644 index 00000000000..86733ae6139 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp @@ -0,0 +1,365 @@ +#include "../interface/FastCalibratorEE.h" +#include +#include +#include + +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/CalibrationUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + + +int main (int argc, char ** argv) { + + ///Check if all nedeed arguments to parse are there + if(argc != 2){ + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + parameterSet.reset(); + + std::string inputList = "NULL"; + if(Options.existsAs("inputList")) + inputList = Options.getParameter("inputList"); + else{ std::cout<<" Exit from code, no input list found"<("inputFileDeadXtal")) + inputFileDeadXtal = Options.getParameter("inputFileDeadXtal"); + else{ std::cout<<" No input File Dead Xtal found! "<("inputTree")) + inputTree = Options.getParameter("inputTree"); + else{ std::cout<<" Exit from code, no input tree found"<("jsonFileName")) + jsonFileName = Options.getParameter("jsonFileName"); + else{ std::cout<<" Exit from code, no jsonFile found"< > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + std::string miscalibMap = "NULL"; + if(Options.existsAs("miscalibMap")) + miscalibMap = Options.getParameter("miscalibMap"); + else{ std::cout<<" no miscalib map found"<("isMiscalib")) + isMiscalib = Options.getParameter("isMiscalib"); + + bool isSaveEPDistribution = false; + if(Options.existsAs("isSaveEPDistribution")) + isSaveEPDistribution = Options.getParameter("isSaveEPDistribution"); + + bool isMCTruth = false; + if(Options.existsAs("isMCTruth")) + isMCTruth = Options.getParameter("isMCTruth"); + + bool isEPselection = false; + if(Options.existsAs("isEPselection")) + isEPselection = Options.getParameter("isEPselection"); + + bool isPtCut = false; + if(Options.existsAs("isPtCut")) + isPtCut = Options.getParameter("isPtCut"); + + double PtMin = 0.; + if(Options.existsAs("PtMin")) + PtMin = Options.getParameter("PtMin"); + + bool isfbrem = false; + if(Options.existsAs("isfbrem")) + isfbrem = Options.getParameter("isfbrem"); + + double fbremMax = 100.; + if(Options.existsAs("fbremMax")) + fbremMax = Options.getParameter("fbremMax"); + + bool isR9selection = false; + if(Options.existsAs("isR9selection")) + isR9selection = Options.getParameter("isR9selection"); + + double R9Min = -1.; + if(Options.existsAs("R9Min")) + R9Min = Options.getParameter("R9Min"); + + int miscalibMethod = 1; + if(Options.existsAs("miscalibMethod")) + miscalibMethod = Options.getParameter("miscalibMethod"); + + std::string inputMomentumScale = "NULL"; + if(Options.existsAs("inputMomentumScale")) + inputMomentumScale = Options.getParameter("inputMomentumScale"); + + std::string typeEB = "NULL"; + if(Options.existsAs("typeEB")) + typeEB = Options.getParameter("typeEB"); + + std::string typeEE = "NULL"; + if(Options.existsAs("typeEE")) + typeEE = Options.getParameter("typeEE"); + int nRegionsEE = GetNRegionsEE(typeEE); + + std::string outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; + if(Options.existsAs("outputPath")) + outputPath = Options.getParameter("outputPath"); + system(("mkdir -p "+outputPath).c_str()); + + std::string outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + int numberOfEvents = -1; + if(Options.existsAs("numberOfEvents")) + numberOfEvents = Options.getParameter("numberOfEvents"); + + int useZ = 1; + if(Options.existsAs("useZ")) + useZ = Options.getParameter("useZ"); + + int useW = 1; + if(Options.existsAs("useW")) + useW = Options.getParameter("useW"); + + int splitStat = 0; + if(Options.existsAs("splitStat")) + splitStat = Options.getParameter("splitStat"); + + int nLoops = 20; + if(Options.existsAs("nLoops")) + nLoops = Options.getParameter("nLoops"); + + bool isDeadTriggerTower = false; + if(Options.existsAs("isDeadTriggerTower")) + isDeadTriggerTower = Options.getParameter("isDeadTriggerTower"); + + + /// Acquistion input ntuples + TChain * tree = new TChain (inputTree.c_str()); + FillChain(*tree,inputList); + + /// open calibration momentum graph + TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EE; + + for(int i = 0; i < nRegionsEE; ++i){ + TString Name = Form("g_EoC_EE_%d",i); + g_EoC_EE.push_back( (TGraphErrors*)(f4->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = tree->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + + if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_miscalib_EE",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_EE",outputFile.c_str()); + + + + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_R9_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_miscalib_EE",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_EE",outputFile.c_str()); + else { std::cout<<" Option not considered --> exit "< exit "< +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" + +/// Code for Run the IC procedure on EE + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + +// std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + std::string inputFileDeadXtal ="NULL" ; + try { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch ( char const* exceptionString ){ + std::cerr << " exception = " << exceptionString << std::endl; + + } + + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + bool isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// Acquistion input ntuplas + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString outputTxtFile ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_Z_noEP_miscalib_EE",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_Z_noEP_EE",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isfbrem == true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_noEP_miscalib_EE",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_noEP_EE",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + if(isSaveEPDistribution == true) + { + FastCalibratorEE_MVA analyzer(albero,outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer.saveHistos(f1); + } + else + { + FastCalibratorEE_MVA analyzer(albero); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + std::string evenFile = "Even_" + outputFile; + std::string oddFile = "Odd_" + outputFile; + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isfbrem==true) + { name = Form ("%s_Z_fbrem_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_fbrem_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_Z_noEP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP_miscalib_EE.root",oddFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isfbrem==true) + { name = Form ("%s_Z_fbrem_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_fbrem_EE.root",oddFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_Z_noEP_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP_EE.root",oddFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_R9_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_EP_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isfbrem==true) + { name = Form ("%s_fbrem_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_fbrem_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_noEP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_noEP_miscalib_EE.root",oddFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9_EE.root",evenFile.c_str()); + name2 = Form ("%s_R9_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_EE.root",evenFile.c_str()); + name2 = Form ("%s_EP_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isfbrem==true) + { name = Form ("%s_fbrem_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_fbrem_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_noEP_EE.root",evenFile.c_str()); + name2 = Form ("%s_noEP_EE.root",oddFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + /// Run on odd + FastCalibratorEE_MVA analyzer_even(albero); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer_even.saveHistos(f1); + + /// Run on even + FastCalibratorEE_MVA analyzer_odd(albero); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer_odd.saveHistos(f2); + + } + + delete albero; + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/MVARegression.cpp b/EOverPCalibration/FastCalibrator/bin/MVARegression.cpp new file mode 100644 index 00000000000..a93b1078e52 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/MVARegression.cpp @@ -0,0 +1,389 @@ +// @(#)root/tmva $Id: MVARegression.cpp,v 1.3 2012/07/17 08:31:45 rgerosa Exp $ +/********************************************************************************** + * Project : TMVA - a Root-integrated toolkit for multivariate data analysis * + * Package : TMVA * + * Root Macro: TMVARegression * + * * + * This macro provides examples for the training and testing of the * + * TMVA classifiers. * + * * + * As input data is used a toy-MC sample consisting of four Gaussian-distributed * + * and linearly correlated input variables. * + * * + * The methods to be used can be switched on and off by means of booleans, or * + * via the prompt command, for example: * + * * + * root -l TMVARegression.C\(\"LD,MLP\"\) * + * * + * (note that the backslashes are mandatory) * + * If no method given, a default set is used. * + * * + * The output file "TMVAReg.root" can be analysed with the use of dedicated * + * macros (simply say: root -l ), which can be conveniently * + * invoked through a GUI that will appear at the end of the run of this macro. * + **********************************************************************************/ + +#include +#include +#include +#include + +#include "TChain.h" +#include "TFile.h" +#include "TTree.h" +#include "TString.h" +#include "TObjString.h" +#include "TSystem.h" +#include "TROOT.h" +#include "TApplication.h" +#include "TMVA/MsgLogger.h" +#include "TMVA/Config.h" + +#include "ConfigParser.h" +#include "ntpleUtils.h" + +#if not defined(__CINT__) || defined(__MAKECINT__) +#include "TMVA/Tools.h" +#include "TMVA/Factory.h" +#endif + +#include "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.00/x86_64-slc5-gcc46-opt/root/tmva/test/TMVARegGui.C" + +using namespace TMVA; + +int main(int argc, char**argv){ + + if(argc != 2){ + std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + parseConfigFile (argv[1]) ; + + // The explicit loading of the shared libTMVA is done in TMVAlogon.C, defined in .rootrc + // if you use your private .rootrc, or run from a different directory, please copy the + // corresponding lines from .rootrc + // methods to be processed can be given as an argument; use format: + // + // mylinux~> root -l TMVARegression.C\(\"myMethod1,myMethod2,myMethod3\"\) + // + //--------------------------------------------------------------- + // This loads the library + TMVA::Tools::Instance(); + + std::vector UseMethodName; + UseMethodName = gConfigParser -> readStringListOption("Input::UseMethodName"); + + std::cout << " >>>>> Input::UseMethodName size = " << UseMethodName.size() << std::endl; + std::cout << " >>>>> >>>>> "; + for (unsigned int iCat = 0; iCat < UseMethodName.size(); iCat++){ + std::cout << " " << UseMethodName.at(iCat) << ", "; + } + std::cout << std::endl; + + + + // --------------------------------------------------------------- + + std::cout << std::endl; + std::cout << "==> Start TMVARegression" << std::endl; + + std::map Use; + + for(std::vector::iterator it=UseMethodName.begin(); it!=UseMethodName.end(); ++it) Use[*it]=0; + + std::string UseMethodFlag; + try{ UseMethodFlag = gConfigParser -> readStringOption("Input::UseMethodFlag"); + std::cout<< UseMethodFlag< mlist = gTools().SplitString( UseMethodFlag, '/' ); + for (UInt_t i=0; i::iterator it = Use.begin(); it != Use.end(); it++) std::cout << it->first << " "; + std::cout << std::endl; + return -1; + } + Use[regMethod] = 1; + std::cout << "regMethod= " << regMethod<< " 1 "<::iterator it=UseMethodName.begin() ;it!=UseMethodName.end(); it++) Use[*it]=1; + + } + + + // -------------------------------------------------------------------------------------------------- + // --- Here the preparation phase begins + // Create a new root output file + + std::string outputFileName = gConfigParser -> readStringOption("Output::outputFileName"); + std::cout<<" Output Data File = "< readStringOption("Input::inputFileList"); + std::string treeNameDATA = gConfigParser -> readStringOption("Input::treeNameDATA"); + + std::cout<<" Input Data List = "< readStringOption("Input::RegionOfTraining"); + std::cout<<" RegionOfTraining = "<AddVariable( "ele1_scE/ele1_scERaw" , 'F'); + factory->AddVariable( "ele1_eRegrInput_nPV" , 'F'); + factory->AddVariable( "ele1_eRegrInput_r9" , 'F'); + factory->AddVariable( "ele1_fbrem" , 'F'); + factory->AddVariable( "ele1_eta" , 'F'); + factory->AddVariable( "ele1_DphiIn" , 'F'); + factory->AddVariable( "ele1_DetaIn" , 'F'); + factory->AddVariable( "ele1_sigmaIetaIeta" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_etaW" , 'F'); + factory->AddVariable( "ele1_eRegrInput_phiW" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_bCE_Over_sCE", 'F'); + factory->AddVariable( "ele1_eRegrInput_sigietaieta_bC1" , 'F'); + factory->AddVariable( "ele1_eRegrInput_sigiphiiphi_bC1" , 'F'); + factory->AddVariable( "ele1_eRegrInput_sigietaiphi_bC1" , 'F'); + factory->AddVariable( "ele1_eRegrInput_e3x3_Over_bCE" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Deta_bC_sC" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Dphi_bC_sC" , 'F'); + factory->AddVariable( "ele1_eRegrInput_bEMax_Over_bCE" , 'F'); + + + factory->AddVariable( "ele1_dxy_PV" , 'F'); + factory->AddVariable( "ele1_dz_PV" , 'F'); + factory->AddVariable( "ele1_sigmaP/ele1_tkP" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_bCELow_Over_sCE", 'F'); + factory->AddVariable( "ele1_eRegrInput_e3x3_Over_bCELow" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Deta_bCLow_sC" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Dphi_bCLow_sC" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_seedbC_etacry" , 'F'); + factory->AddVariable( "ele1_eRegrInput_seedbC_phicry" , 'F'); + + // You can add so-called "Spectator variables", which are not used in the MVA training, + // but will appear in the final "TestTree" produced by TMVA. This TestTree will contain the + // input variables, the response values of all trained MVAs, and the spectator variables + // factory->AddSpectator( "spec1:=var1*2", "Spectator 1", "units", 'F' ); + // factory->AddSpectator( "spec2:=var1*3", "Spectator 2", "units", 'F' ); + // Add the variable carrying the regression target +// factory->AddTarget("ele1_scE/ele1_E_true" ); + factory->AddTarget("ele1_tkP/ele1_E_true" ); + + + // It is also possible to declare additional targets for multi-dimensional regression, ie: + // -- factory->AddTarget( "fvalue2" ); + // BUT: this is currently ONLY implemented for MLP + + // global event weights per tree (see below for setting event-wise weights) + Double_t regWeight = 1.0; + + // You can add an arbitrary number of regression trees + factory->AddRegressionTree( treeDATA, regWeight ); + + // This would set individual event weights (the variables defined in the + // expression need to exist in the original TTree) + // factory->SetWeightExpression( "var1", "Regression" ); + +// TCut mycut = "ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2 && (ele1_scE/ele1_E_true)<1.4 && (ele1_scE/ele1_E_true)>0.3"; // for example: TCut mycut = "abs(var1)<0.5 && abs(var2-0.5)<1"; + + TCut mycut = "ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2 && ele1_tkP/ele1_E_true<1.8 && ele1_tkP/ele1_E_true>0.2"; // for example: TCut mycut = "abs(var1)<0.5 && abs(var2-0.5)<1"; + + + // tell the factory to use all remaining events in the trees after training for testing: + factory->PrepareTrainingAndTestTree( mycut, + "nTrain_Regression=2500000:nTest_Regression=2500000:SplitMode=Random:NormMode=NumEvents:!V" ); + + TString Name = Form("weight_%s_%s_P_W",RegionOfTraining.c_str(),UseMethodFlag.c_str()); + (TMVA::gConfig().GetIONames()).fWeightFileDir = Name; + } + + if(RegionOfTraining=="EE"){ + + factory->AddVariable( "ele1_scE/ele1_scERaw" , 'F'); + factory->AddVariable( "ele1_eRegrInput_nPV",'F'); + factory->AddVariable( "ele1_eRegrInput_r9",'F'); + factory->AddVariable( "ele1_fbrem",'F'); + factory->AddVariable( "ele1_eta",'F'); + factory->AddVariable( "ele1_DphiIn",'F'); + factory->AddVariable( "ele1_DetaIn",'F'); + factory->AddVariable( "ele1_sigmaIetaIeta",'F'); + + factory->AddVariable( "ele1_eRegrInput_etaW",'F'); + factory->AddVariable( "ele1_eRegrInput_phiW",'F'); + + factory->AddVariable( "ele1_dxy_PV",'F'); + factory->AddVariable( "ele1_dz_PV",'F'); + factory->AddVariable( "ele1_sigmaP/ele1_tkP",'F'); + + + // You can add so-called "Spectator variables", which are not used in the MVA training, + // but will appear in the final "TestTree" produced by TMVA. This TestTree will contain the + // input variables, the response values of all trained MVAs, and the spectator variables + // factory->AddSpectator( "spec1:=var1*2", "Spectator 1", "units", 'F' ); + // factory->AddSpectator( "spec2:=var1*3", "Spectator 2", "units", 'F' ); + // Add the variable carrying the regression target + +// factory->AddTarget("ele1_scE/ele1_E_true" ); + factory->AddTarget("ele1_tkP/ele1_E_true" ); + + // It is also possible to declare additional targets for multi-dimensional regression, ie: + // -- factory->AddTarget( "fvalue2" ); + // BUT: this is currently ONLY implemented for MLP + + // global event weights per tree (see below for setting event-wise weights) + Double_t regWeight = 1.0; + + // You can add an arbitrary number of regression trees + factory->AddRegressionTree( treeDATA, regWeight ); + + // This would set individual event weights (the variables defined in the + // expression need to exist in the original TTree) + // factory->SetWeightExpression( "var1", "Regression" ); +// TCut mycut = "ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 &&(ele1_scE/ele1_E_true)<1.4 && (ele1_scE/ele1_E_true)>0.3"; + TCut mycut = "ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && (ele1_tkP/ele1_E_true)<1.6"; + + // for example: TCut mycut = "abs(var1)<0.5 && + // tell the factory to use all remaining events in the trees after training for testing: + factory->PrepareTrainingAndTestTree( mycut, + "nTrain_Regression=3000000:nTest_Regression=3000000:SplitMode=Random:NormMode=NumEvents:!V" ); + + TString Name = Form("weight_%s_%s_P_W",RegionOfTraining.c_str(),UseMethodFlag.c_str()); + (TMVA::gConfig().GetIONames()).fWeightFileDir = Name; + + } + // Apply additional cuts on the signal and background samples (can be different) + +// // If no numbers of events are given, half of the events in the tree are used + // for training, and the other half for testing: + // factory->PrepareTrainingAndTestTree( mycut, "SplitMode=random:!V" ); + + // ---- Book MVA methods + // + // please lookup the various method configuration options in the corresponding cxx files, eg: + // src/MethoCuts.cxx, etc, or here: http://tmva.sourceforge.net/optionRef.html + // it is possible to preset ranges in the option string in which the cut optimisation should be done: + // "...:CutRangeMin[2]=-1:CutRangeMax[2]=1"...", where [2] is the third input variable + + // PDE - RS method + if (Use["PDERS"]) + factory->BookMethod( TMVA::Types::kPDERS, "PDERS", "!H:!V:Normthree=T:VolumeRangeMode=Adaptive:KernelEstimator=Gauss:GaussSigma=0.3:NEventsMin=40:NEventsMax=60:VarTransform=None" ); + // And the options strings for the MinMax and RMS methods, respectively: + // "!H:!V:VolumeRangeMode=MinMax:DeltaFrac=0.2:KernelEstimator=Gauss:GaussSigma=0.3" ); + // "!H:!V:VolumeRangeMode=RMS:DeltaFrac=3:KernelEstimator=Gauss:GaussSigma=0.3" ); + + if (Use["PDEFoam"]) + factory->BookMethod( TMVA::Types::kPDEFoam, "PDEFoam", "!H:!V:MultiTargetRegression=F:TargetSelection=Mpv:TailCut=0.001:VolFrac=0.3:nActiveCells=500:nSampl=2000:nBin=5:Compress=T:Kernel=None:Nmin=10:VarTransform=None" ); + + // K-Nearest Neighbour classifier (KNN) + if (Use["KNN"]) + factory->BookMethod( TMVA::Types::kKNN, "KNN", "nkNN=20:ScaleFrac=0.8:SigmaFact=1.0:Kernel=Gaus:UseKernel=F:UseWeight=T:!Trim" ); + + // Linear discriminant + if (Use["LD"]) factory->BookMethod( TMVA::Types::kLD, "LD","!H:!V:VarTransform=G,U,D" ); + + // Function discrimination analysis (FDA) -- test of various fitters - the recommended one is Minuit (or GA or SA) + if (Use["FDA_MC"]) + factory->BookMethod( TMVA::Types::kFDA, "FDA_MC", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=MC:SampleSize=100000:Sigma=0.1:VarTransform=D" ); + + if (Use["FDA_GA"]) // can also use Simulated Annealing (SA) algorithm (see Cuts_SA options) .. the formula of this example is good for parabolas + factory->BookMethod( TMVA::Types::kFDA, "FDA_GA", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=GA:PopSize=100:Cycles=3:Steps=30:Trim=True:SaveBestGen=1:VarTransform=Norm" ); + + if (Use["FDA_MT"]) + factory->BookMethod( TMVA::Types::kFDA, "FDA_MT", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100);(-10,10):FitMethod=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=2:UseImprove:UseMinos:SetBatch" ); + + if (Use["FDA_GAMT"]) + factory->BookMethod( TMVA::Types::kFDA, "FDA_GAMT", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=GA:Converger=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=0:!UseImprove:!UseMinos:SetBatch:Cycles=1:PopSize=5:Steps=5:Trim" ); + + // Neural network (MLP) + if (Use["MLP"]) +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=20000:HiddenLayers=N+20:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=200:HiddenLayers=N+20:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=400:HiddenLayers=N+10:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=N:NeuronType=tanh:NCycles=200:HiddenLayers=N+10:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=G,N:NeuronType=tanh:NCycles=200:HiddenLayers=N+5:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); + factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:NeuronType=tanh:NCycles=250:HiddenLayers=N+5:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:TestRate=10"); + + // Support Vector Machine + if (Use["SVM"]) + factory->BookMethod( TMVA::Types::kSVM, "SVM", "Gamma=0.25:Tol=0.001:VarTransform=N" ); +// factory->BookMethod( TMVA::Types::kSVM, "SVM", "Gamma=0.25:Tol=0.001:VarTransform=N,G" ); + + // Boosted Decision Trees + if (Use["BDT"]) +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:nCuts=20:PruneMethod=CostComplexity:PruneStrength=30" ); +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=200:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=300:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); + factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=20:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30"); + + if (Use["BDTG"]) +// factory->BookMethod( TMVA::Types::kBDT, "BDTG","!H:!V:NTrees=2000::BoostType=Grad:Shrinkage=0.1:UseBaggedGrad:GradBaggingFraction=0.5:nCuts=20:MaxDepth=3:NNodesMax=15" ); + factory->BookMethod( TMVA::Types::kBDT, "BDTG","!H:!V:NTrees=1000::BoostType=Grad:Shrinkage=0.1:UseBaggedGrad:GradBaggingFraction=0.5:MaxDepth=5:NNodesMax=25:PruneMethod=CostComplexity:PruneStrength=30"); + // -------------------------------------------------------------------------------------------------- + // ---- Now you can tell the factory to train, test, and evaluate the MVAs + + // Train MVAs using the set of training events + factory->TrainAllMethods(); + + // ---- Evaluate all MVAs using the set of test events + factory->TestAllMethods(); + + // ----- Evaluate and compare performance of all configured MVAs + factory->EvaluateAllMethods(); + + // -------------------------------------------------------------- + + // Save the output + outputFile->Close(); + + std::cout << "==> Wrote root file: " << outputFile->GetName() << std::endl; + std::cout << "==> TMVARegression is done!" << std::endl; + + delete factory; + + // Launch the GUI for the root macros +// if (!gROOT->IsBatch()) TMVARegGui( outputFileName.c_str() ); + + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp b/EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp new file mode 100644 index 00000000000..074e1e87e6f --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp @@ -0,0 +1,584 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" + + +int main (int argc, char** argv){ + + if(argc<2){ std::cout<<" Not correct number of input parameter --> Need Just one cfg file exit "< readIntOption("Input::PhiStartDeadXtal"); } + catch(char const* exceptionString ){ PhiStartDeadXtal=-999.; } + + int PhiStepDeadXtal ; + try{ PhiStepDeadXtal = gConfigParser -> readIntOption("Input::PhiStepDeadXtal");} + catch(char const* exceptionString ){ PhiStepDeadXtal=-999.; } + + int PhiNShiftDeadXtal ; + try{ PhiNShiftDeadXtal = gConfigParser -> readIntOption("Input::PhiNShiftDeadXtal");} + catch(char const* exceptionString ){ PhiNShiftDeadXtal = -999.;} + + std::vector EtaBinCenterDeadXtal ; + try{ EtaBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::EtaBinCenterDeadXtal"); } + catch(char const* exceptionString ){ EtaBinCenterDeadXtal.push_back(-999.); } + + + bool isDeadTriggerTower ; + try{ isDeadTriggerTower = gConfigParser -> readBoolOption("Input::isDeadTriggerTower");} + catch(char const* exceptionString ){ isDeadTriggerTower = false ;} + + // Dead xtal in EE + + std::vector IxEEPBinCenterDeadXtal ; + try{ IxEEPBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IxEEPBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IxEEPBinCenterDeadXtal.push_back(-999.); } + + std::vector IxEEMBinCenterDeadXtal ; + try{ IxEEMBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IxEEMBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IxEEMBinCenterDeadXtal.push_back(-999.); } + + std::vector IyEEPBinCenterDeadXtal ; + try{ IyEEPBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IyEEPBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IyEEPBinCenterDeadXtal.push_back(-999.); } + + std::vector IyEEMBinCenterDeadXtal ; + try{ IyEEMBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IyEEMBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IyEEMBinCenterDeadXtal.push_back(-999.); } + + int iXNShiftDeadXtal ; + try{ iXNShiftDeadXtal = gConfigParser -> readIntOption("Input::iXNShiftDeadXtal");} + catch(char const* exceptionString ){ iXNShiftDeadXtal = -999.;} + + int iYNShiftDeadXtal ; + try{ iYNShiftDeadXtal = gConfigParser -> readIntOption("Input::iYNShiftDeadXtal");} + catch(char const* exceptionString ){ iYNShiftDeadXtal = -999.;} + + std::string OutputDeadXtalPath ; + try{ OutputDeadXtalPath = gConfigParser -> readStringOption("Input::OutputDeadXtalPath"); + system(("mkdir -p "+OutputDeadXtalPath).c_str());} + catch(char const* exceptionString ){ OutputDeadXtalPath = "cfg/InputDeadXtal/" ; + system(("mkdir -p "+OutputDeadXtalPath).c_str()); + } + + std::string OutputDeadXtalFile ; + try{ OutputDeadXtalFile = gConfigParser -> readStringOption("Input::OutputDeadXtalFile");} + catch(char const* exceptionString ){ OutputDeadXtalFile = "DeadXtalFile"; } + + + std::string inputCfgTemplate ; + try{ inputCfgTemplate = gConfigParser -> readStringOption("Input::inputCfgTemplate");} + catch(char const* exceptionString ){ inputCfgTemplate = "cfg/FastCalibrator_Template.cfg"; } + + + ///// Common cfg setup + + // txt file with the list of input root files + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + + // input tree name + std::string inputTree = "NULL"; + try{ inputTree = gConfigParser -> readStringOption("Input::inputTree");} + catch(char const* exceptionString ){ inputTree = "simpleNtupleEoverP/SimpleNtupleEoverP";} + + // jsonFileName + std::string jsonFileName ="NULL"; + try{ jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName");} + catch( char const* exceptionString ){ jsonFileName = "json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt";} + + // Miscalibration --> scalib 5% + bool isMiscalib ; + try{isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib");} + catch( char const* exceptionString ){ isMiscalib = false;} + + // Save EoverP distribution + bool isSaveEPDistribution ; + try{ isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution");} + catch( char const* exceptionString ){ isSaveEPDistribution = false; } + + // Do the E/P selection + bool isEPselection ; + try{ isEPselection = gConfigParser -> readBoolOption("Input::isEPselection");} + catch( char const* exceptionString ){ isEPselection = false;} + + + // Pt treshold bool and cut + bool isPtCut ; + try{ isPtCut = gConfigParser -> readBoolOption("Input::isPtCut"); } + catch( char const* exceptionString ){ isPtCut = false;} + + float PtMin ; + try{ PtMin = gConfigParser -> readFloatOption("Input::PtMin"); } + catch( char const* exceptionString ){ PtMin = 0.;} + + // fbrem treshold bool and cut + bool isfbrem ; + try { isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); } + catch( char const* exceptionString ){ isfbrem = false;} + + float fbremMax ; + try { fbremMax = gConfigParser -> readFloatOption("Input::fbremMax"); } + catch( char const* exceptionString ){ fbremMax = 100.;} + + // R9 treshold bool and cut + bool isR9selection ; + try{ isR9selection = gConfigParser -> readBoolOption("Input::isR9selection");} + catch( char const* exceptionString ){ isR9selection = false; } + + float R9Min ; + try{ R9Min = gConfigParser -> readFloatOption("Input::R9Min");} + catch( char const* exceptionString ){ R9Min = 0.; } + + // Run Calibration on E/Etrue instead of E/P --> MC only + bool isMCTruth ; + try { isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); } + catch( char const* exceptionString ){ isMCTruth = false; } + + // Momentum scale file + std::string inputMomentumScale ; + try{ inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); } + catch( char const* exceptionString ) { inputMomentumScale = "output/MomentumCalibrationCombined_2011AB-2012ABC.root";} + + std::string typeEB ; + try{ typeEB = gConfigParser -> readStringOption("Input::typeEB"); } + catch( char const* exceptionString ) { typeEB = "none" ; } + + + std::string typeEE ; + try{ typeEE = gConfigParser -> readStringOption("Input::typeEE"); } + catch( char const* exceptionString ) { typeEE = "none" ; } + + // Name of the output calib file + std::string outputPath; + try{ outputPath = gConfigParser -> readStringOption("Output::outputPath"); + system(("mkdir -p "+outputPath).c_str());} + catch( char const* exceptionString ) { outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; + system(("mkdir -p "+outputPath).c_str()); + } + + std::string outputFile ; + try{ outputFile = gConfigParser -> readStringOption("Output::outputFile"); } + catch( char const* exceptionString ) { outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012" ; + } + + std::string OutputCfgPath ; + try{ OutputCfgPath = gConfigParser -> readStringOption("Output::OutputCfgPath"); + system(("mkdir -p "+OutputCfgPath).c_str()); } + catch(char const* exceptionString ){ OutputCfgPath = "cfg/JOB/"; + system(("mkdir -p "+OutputCfgPath).c_str()); + } + + // Other options for the L3 algo + int numberOfEvents ; + try { numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); } + catch( char const* exceptionString ) { numberOfEvents = -1 ; } + + int useZ ; + try { useZ = gConfigParser -> readIntOption("Options::useZ"); } + catch( char const* exceptionString ) { useZ = 1 ; } + + int useW ; + try{ useW = gConfigParser -> readIntOption("Options::useW"); } + catch( char const* exceptionString ) { useW = 1 ; } + + int splitStat ; + try{ splitStat = gConfigParser -> readIntOption("Options::splitStat"); } + catch( char const* exceptionString ) { splitStat = 0 ; } + + int nLoops ; + try{ nLoops = gConfigParser -> readIntOption("Options::nLoops"); } + catch( char const* exceptionString ) { nLoops = 20 ; } + + // prepare the general cfg: + std::string inputTemp1 = inputCfgTemplate+"_tmp1" ; + std::string inputTemp2 = inputCfgTemplate+"_tmp2" ; + + system(("rm "+OutputCfgPath+"/*").c_str()); + + system (("cat "+inputCfgTemplate+" | sed -e s%INPUTLIST%"+inputList+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%INPUTTREE%"+inputTree+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%JSONFILENAME%"+jsonFileName+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%MISCALIB%"+std::string(Form("%o",isMiscalib))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%EOVERP%"+std::string(Form("%o",isSaveEPDistribution))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%EPSELECTION%"+std::string(Form("%o",isEPselection))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%MCTRUTH%"+std::string(Form("%o",isMCTruth))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%PTCUT%"+std::string(Form("%o",isPtCut))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%PTMIN%"+std::string(Form("%0.2f",PtMin))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%ISFBREM%"+std::string(Form("%o",isfbrem))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%FBREMMAX%"+std::string(Form("%0.2f",fbremMax))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%R9CUT%"+std::string(Form("%o",isR9selection))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%R9MIN%"+std::string(Form("%0.2f",R9Min))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%INPUTMOMENTUMSCALE%"+std::string(inputMomentumScale)+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%TYPEEB%"+std::string(typeEB)+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%TYPEEE%"+std::string(typeEE)+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%OUTPUTPATH%"+std::string(outputPath)+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%NUMEVENTS%"+std::string(Form("%d",numberOfEvents))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%USEZ%"+std::string(Form("%d",useZ))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%USEW%"+std::string(Form("%d",useW))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%SPLIT%"+std::string(Form("%d",splitStat))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%LOOPS%"+std::string(Form("%d",nLoops))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%DEADTRIGGERTOWER%"+std::string(Form("%o",isDeadTriggerTower))+"%g > "+inputTemp1).c_str()) ; + + + system(std::string(Form("touch %slancia_EB.sh",OutputCfgPath.c_str())).c_str()); + system(std::string(Form("touch %slancia_EE.sh",OutputCfgPath.c_str())).c_str()); + + std::ofstream JobStringEB(std::string(OutputCfgPath+"lancia_EB.sh").c_str(),std::ios::out); + std::ofstream JobStringEE(std::string(OutputCfgPath+"lancia_EE.sh").c_str(),std::ios::out); + + std::cout<<" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< "< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+"%g > "+std::string(NameCfg_EB)).c_str()) ; + + TString NameJobFile_EB = Form("%sbjob_FastCalibrator_EB.sh",OutputCfgPath.c_str()); + TString NameOut_EB = Form("%sout_EB.txt",OutputCfgPath.c_str()); + + system(("touch "+std::string(NameJobFile_EB)).c_str()); + + std::ofstream outJobEB(std::string(NameJobFile_EB).c_str(),std::ios::out); + outJobEB<< "#!/bin/sh"<> "+std::string(NameOut_EB)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EB_1)).c_str()) ; + + TString NameJobFile_EB_1 = Form("%sbjob_FastCalibrator_EB_p%d.sh",OutputCfgPath.c_str(),nShift); + TString NameOut_EB_1 = Form("%sout_EB_p%d.txt",OutputCfgPath.c_str(),nShift); + system(("touch "+std::string(NameJobFile_EB_1)).c_str()); + + std::ofstream outJobEB_1(std::string(NameJobFile_EB_1).c_str(),std::ios::out); + outJobEB_1<< "#!/bin/sh"<> "+std::string(NameOut_EB_1)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EB_2)).c_str()) ; + + TString NameJobFile_EB_2 = Form("%sbjob_FastCalibrator_EB_m%d.sh",OutputCfgPath.c_str(),nShift); + TString NameOut_EB_2 = Form("%sout_EB_m%d.txt",OutputCfgPath.c_str(),nShift); + system(("touch "+std::string(NameJobFile_EB_2)).c_str()); + + + std::ofstream outJobEB_2(std::string(NameJobFile_EB_2).c_str(),std::ios::out); + outJobEB_2<< "#!/bin/sh"<> "+std::string(NameOut_EB_2)< temp2.cfg").c_str()) ; + system (("cat temp2.cfg | sed -e s%"+std::string(Name1)+"%"+std::string(Name)+"%g > "+std::string(NameCfg_EB)).c_str()) ; + system(std::string("rm temp.cfg temp2.cfg").c_str()); + + + system (std::string(" cp "+NameJobFile_EB+" "+" temp.sh").c_str()); + system (("cat temp.sh | sed -e s%"+std::string(NameCfg_EB_1)+"%"+std::string(NameCfg_EB)+"%g > temp2.sh").c_str()) ; + system (("cat temp2.sh | sed -e s%"+std::string(NameOut_EB_1)+"%"+std::string(NameOut_EB)+"%g > "+std::string(NameJobFile_EB)).c_str()) ; + system(std::string("rm temp.sh temp2.sh").c_str()); + + JobStringEB.close(); + system(("sed '$d' < "+std::string(OutputCfgPath+"lancia_EB.sh")+" > tmp.txt ; sed '$d' < tmp.txt > "+std::string(OutputCfgPath+"lancia_EB.sh")).c_str()); + system(std::string(" rm tmp.txt ").c_str()); + JobStringEB.open(std::string(OutputCfgPath+"lancia_EB.sh").c_str(),std::ios::out); + JobStringEB<<"qsub -V -d "+std::string(getenv("PWD"))+"/"+OutputCfgPath+" -q longcms "+std::string(getenv("PWD"))+"/"+NameJobFile_EB< exit "< exit "< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+"%g > "+std::string(NameCfg_EE)).c_str()) ; + + TString NameJobFile_EE = Form("%sbjob_FastCalibrator_EE.sh",OutputCfgPath.c_str()); + TString NameOut_EE = Form("%sout_EE.txt",OutputCfgPath.c_str()); + system(("touch "+std::string(NameJobFile_EE)).c_str()); + + std::ofstream outJobEE(std::string(NameJobFile_EE).c_str(),std::ios::out); + outJobEE<< "#!/bin/sh"<> "+std::string(NameOut_EE)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EE_1)).c_str()) ; + + TString NameJobFile_EE_1 = Form("%sbjob_FastCalibrator_EE_pX%d.sh",OutputCfgPath.c_str(),xShift); + TString NameOut_EE_1 = Form("%sout_EE_pX%d.txt",OutputCfgPath.c_str(),xShift); + system(("touch "+std::string(NameJobFile_EE_1)).c_str()); + + std::ofstream outJobEE_1(std::string(NameJobFile_EE_1).c_str(),std::ios::out); + outJobEE_1<< "#!/bin/sh"<> "+std::string(NameOut_EE_1)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EE_2)).c_str()) ; + + TString NameJobFile_EE_2 = Form("%sbjob_FastCalibrator_EE_mX%d.sh",OutputCfgPath.c_str(),xShift); + TString NameOut_EE_2 = Form("%sout_EE_mX%d.txt",OutputCfgPath.c_str(),xShift); + system(("touch "+std::string(NameJobFile_EE_2)).c_str()); + + std::ofstream outJobEE_2(std::string(NameJobFile_EE_2).c_str(),std::ios::out); + outJobEE_2<< "#!/bin/sh"<> "+std::string(NameOut_EE_2)< temp2.cfg").c_str()) ; + system (("cat temp2.cfg | sed -e s%"+std::string(Name1)+"%"+std::string(Name)+"%g > "+std::string(NameCfg_EE)).c_str()) ; + system(std::string("rm temp.cfg temp2.cfg").c_str()); + + + system (std::string(" cp "+NameJobFile_EE+" "+" temp.sh").c_str()); + system (("cat temp.sh | sed -e s%"+std::string(NameCfg_EE_1)+"%"+std::string(NameCfg_EE)+"%g > temp2.sh").c_str()) ; + system (("cat temp2.sh | sed -e s%"+std::string(NameOut_EE_1)+"%"+std::string(NameOut_EE)+"%g > "+std::string(NameJobFile_EE)).c_str()) ; + system(std::string("rm temp.sh temp2.sh").c_str()); + + JobStringEE.close(); + system(("sed '$d' < "+std::string(OutputCfgPath+"lancia_EE.sh")+" > tmp.txt ; sed '$d' < tmp.txt > "+std::string(OutputCfgPath+"lancia_EE.sh")).c_str()); + system(std::string(" rm tmp.txt ").c_str()); + JobStringEE.open(std::string(OutputCfgPath+"lancia_EE.sh").c_str(),std::ios::out); + JobStringEE<<"qsub -V -d "+std::string(getenv("PWD"))+"/"+OutputCfgPath+" -q longcms "+std::string(getenv("PWD"))+"/"+NameJobFile_EE< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EE_1)).c_str()) ; + + TString NameJobFile_EE_1 = Form("%sbjob_FastCalibrator_EE_pY%d.sh",OutputCfgPath.c_str(),yShift); + TString NameOut_EE_1 = Form("%sout_EE_pY%d.txt",OutputCfgPath.c_str(),yShift); + system(("touch "+std::string(NameJobFile_EE_1)).c_str()); + + std::ofstream outJobEE_1(std::string(NameJobFile_EE_1).c_str(),std::ios::out); + outJobEE_1<< "#!/bin/sh"<> "+std::string(NameOut_EE_1)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EE_2)).c_str()) ; + + TString NameJobFile_EE_2 = Form("%sbjob_FastCalibrator_EE_mY%d.sh",OutputCfgPath.c_str(),yShift); + TString NameOut_EE_2 = Form("%sout_EE_mY%d.txt",OutputCfgPath.c_str(),yShift); + system(("touch "+std::string(NameJobFile_EE_2)).c_str()); + + std::ofstream outJobEE_2(std::string(NameJobFile_EE_2).c_str(),std::ios::out); + outJobEE_2<< "#!/bin/sh"<> "+std::string(NameOut_EE_2)< +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TProfile2D.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TTree.h" +#include "TApplication.h" +using namespace std; +/// Check if the crystal is near to a dead one + +bool CheckxtalIC (TH2F* h_scale_EB,int iPhi, int iEta ) +{ + if(h_scale_EB->GetBinContent(iPhi,iEta) ==0) return false; + + int bx= h_scale_EB->GetNbinsX(); + int by= h_scale_EB->GetNbinsY(); + + if((iPhiGetBinContent(iPhi+1,iEta) ==0) || (h_scale_EB->GetBinContent(iPhi-1,iEta)==0 && iPhi>1)) return false; + + if((iEtaGetBinContent(iPhi,iEta+1) ==0 && iEta!=85 ) || (h_scale_EB->GetBinContent(iPhi,iEta-1)==0 && iEta>1 && iEta!=87)) return false; + + if((iPhiGetBinContent(iPhi+1,iEta+1) ==0 && iEta!=85 && iEtaGetBinContent(iPhi-1,iEta-1)==0 && iEta>1 && iEta!=87 && iPhi>1)) return false; + + if((h_scale_EB->GetBinContent(iPhi+1,iEta-1) ==0 && iEta>1 && iEta!=87 && iPhiGetBinContent(iPhi-1,iEta+1)==0 && iPhi>1 && iEta!=85 && iEta >& TT_centre ) +{ + for(unsigned int k =0; kGet("ntu"); + + TFile *f2 = new TFile(input2,""); + TH2F *h_scale_EB = (TH2F*)f2->Get("h_scale_EB"); + TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); + + hcmap -> Reset("ICEMS"); + hcmap -> ResetStats(); + + /// Taking infos + + std::vector* ele1_recHit_E=0; + std::vector* ele2_recHit_E=0; + std::vector* ele1_recHit_hashedIndex=0; + std::vector* ele2_recHit_hashedIndex=0; + std::vector* ele1_recHit_flag=0; + std::vector* ele2_recHit_flag=0; + float ele1_E_true,ele2_E_true; + float ele1_tkP,ele2_tkP; + int ele1_isEB, ele2_isEB; + float ele1_fbrem,ele2_fbrem; + int isW, isZ; + + inputTree->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E); + inputTree->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E); + inputTree->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex); + inputTree->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex); + inputTree->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag); + inputTree->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag); + inputTree->SetBranchAddress("ele1_E_true", &ele1_E_true); + inputTree->SetBranchAddress("ele2_E_true", &ele2_E_true); + inputTree->SetBranchAddress("ele1_tkP", &ele1_tkP); + inputTree->SetBranchAddress("ele2_tkP", &ele2_tkP); + inputTree->SetBranchAddress("ele1_isEB", &ele1_isEB); + inputTree->SetBranchAddress("ele2_isEB", &ele2_isEB); + inputTree->SetBranchAddress("ele1_fbrem", &ele1_fbrem); + inputTree->SetBranchAddress("ele2_fbrem", &ele2_fbrem); + inputTree->SetBranchAddress("isW", &isW); + inputTree->SetBranchAddress("isZ", &isZ); + + TProfile2D* mapMomentum = new TProfile2D("mapMomentum","mapMomentum",360,0,360,170,-85,85); + TProfile2D* mapfbrem = new TProfile2D("mapfbrem","mapfbrem",360,0,360,170,-85,85); + + /// Make fbrem and p/ptrue map cycling on MC --> all the events + + for(Long64_t i=0; i< inputTree->GetEntries(); i++) + { + inputTree->GetEntry(i); + if (!(i%100000))std::cerr<size(); iRecHit++ ) { + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_flag->at(iRecHit) < 4 ) /// control if this recHit is good + { + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + // iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + + } + } + + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + int phi_seed = GetIphiFromHashedIndex(seed_hashedIndex); + if(ele1_tkP>0 && ele1_E_true>0 && abs(ele1_tkP/ele1_E_true)<2. && abs(ele1_tkP/ele1_E_true)>0.5) mapMomentum->Fill(phi_seed,eta_seed,abs(ele1_tkP/ele1_E_true)); + mapfbrem->Fill(phi_seed,eta_seed,abs(ele1_fbrem)); + } + + if (ele2_isEB == 1 && isZ==1) { + + double E_seed=0; + int seed_hashedIndex=-1;// iseed; + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_flag->at(iRecHit) < 4 ) /// control if this recHit is good + { + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + // iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); ///! Seed search + + } + } + + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + int phi_seed = GetIphiFromHashedIndex(seed_hashedIndex); + if(ele2_tkP>0 && ele2_E_true>0 && abs(ele2_tkP/ele2_E_true)<2. && abs(ele2_tkP/ele2_E_true)>0.5) mapMomentum->Fill(phi_seed,eta_seed,abs(ele2_tkP/ele2_E_true)); + mapfbrem->Fill(phi_seed,eta_seed,abs(ele2_fbrem)); + + } + } + + /// Map of IC normalized in eta rings + + std::vector< std::pair > TT_centre ; + + TT_centre.push_back(std::pair (58,49)); + TT_centre.push_back(std::pair (53,109)); + TT_centre.push_back(std::pair (8,114)); + TT_centre.push_back(std::pair (83,169)); + TT_centre.push_back(std::pair (53,174)); + TT_centre.push_back(std::pair (63,194)); + TT_centre.push_back(std::pair (83,224)); + TT_centre.push_back(std::pair (73,344)); + TT_centre.push_back(std::pair (83,358)); + TT_centre.push_back(std::pair (-13,18)); + TT_centre.push_back(std::pair (-18,23)); + TT_centre.push_back(std::pair (-8,53)); + TT_centre.push_back(std::pair (-3,63)); + TT_centre.push_back(std::pair (-53,128)); + TT_centre.push_back(std::pair (-53,183)); + TT_centre.push_back(std::pair (-83,193)); + TT_centre.push_back(std::pair (-74,218)); + TT_centre.push_back(std::pair (-8,223)); + TT_centre.push_back(std::pair (-68,303)); + TT_centre.push_back(std::pair (-43,328)); + + /// Mean over phi corrected skipping dead channel + + for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + bool isGood = CheckxtalIC(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT(iPhi,iEta,TT_centre); + + if(isGood && isGoodTT) + { + SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + //fede: skip bad channels and bad TTs + for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if(numIC==0 || SumIC==0) continue; + + bool isGood = CheckxtalIC(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT(iPhi,iEta,TT_centre); + if (!isGood || !isGoodTT) continue; + + hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + /// ratio map + + TH2F* ratioMap = (TH2F*) hcmap -> Clone("ratioMap"); + ratioMap->Reset(); + + for( int i =0 ; iGetNbinsX() ; i++){ + for( int j=0; jGetNbinsY() ; j++){ + if(hcmap->GetBinContent(i,j)!=0 && mapMomentum->GetBinContent(i,j)!=0) + ratioMap->SetBinContent(i+1,j+1,mapMomentum->GetBinContent(i,j)/hcmap->GetBinContent(i,j)); + } + } + + /// Profile along phi taking into account dead channels + TGraphErrors *coeffEBp = new TGraphErrors(); + TGraphErrors *coeffEBm = new TGraphErrors(); + + for (int iPhi =1; iPhi< hcmap->GetNbinsX()+1 ; iPhi++){ + double SumEBp =0, SumEBm=0; + double iEBp=0, iEBm=0; + for(int iEta = 1; iEtaGetNbinsY()+1 ; iEta++){ + if(hcmap->GetBinContent(iPhi,iEta)==0)continue; + if(iEta>85) {SumEBp=SumEBp+mapMomentum->GetBinContent(iPhi,iEta)/hcmap->GetBinContent(iPhi,iEta); + iEBp++;} + else{ SumEBm=SumEBm+mapMomentum->GetBinContent(iPhi,iEta)/hcmap->GetBinContent(iPhi,iEta); + iEBm++;} + } + coeffEBp->SetPoint(iPhi-1,iPhi-1,SumEBp/iEBp); + coeffEBm->SetPoint(iPhi-1,iPhi-1,SumEBm/iEBm); + + } + + TFile* outputGraph = new TFile("output/GraphFor_P_Correction.root","RECREATE"); + outputGraph->cd(); + + coeffEBp->Write("coeffEBp"); + coeffEBm->Write("coeffEBm"); + outputGraph->Close(); + + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + TCanvas* c1 = new TCanvas("mapMomentum","mapMomentum",1); + c1->cd(); + mapMomentum->GetXaxis()->SetTitle("#phi"); + mapMomentum->GetXaxis()->SetNdivisions(20); + c1->SetGridx(); + mapMomentum->GetYaxis()->SetTitle("#eta"); + mapMomentum->GetZaxis()->SetRangeUser(0.7,1.3); + mapMomentum->Draw("colz"); + + TCanvas* c2 = new TCanvas("mapfbrem","mapfbrem",1); + c2->cd(); + mapfbrem->GetXaxis()->SetTitle("#phi"); + mapfbrem->GetYaxis()->SetTitle("#eta"); + mapfbrem->GetXaxis()->SetNdivisions(20); + c2->SetGridx(); + mapfbrem->GetZaxis()->SetRangeUser(0.,0.7); + mapfbrem->Draw("colz"); + + TCanvas* c3 = new TCanvas("ratioMap","ratioMap",1); + c3->cd(); + ratioMap->GetXaxis()->SetTitle("#phi"); + ratioMap->GetYaxis()->SetTitle("#eta"); + ratioMap->GetXaxis()->SetNdivisions(20); + c3->SetGridx(); + ratioMap->GetZaxis()->SetRangeUser(0.7,1.3); + ratioMap->Draw("colz"); + + TCanvas* c4 = new TCanvas("coeffEB","coeffEB",1); + c4->cd(); + coeffEBp->GetXaxis()->SetTitle("#phi"); + coeffEBp->GetYaxis()->SetTitle("p/p_{true}"); + coeffEBp -> SetMarkerStyle(20); + coeffEBp -> SetMarkerSize(1); + coeffEBp -> SetMarkerColor(kRed+1); + coeffEBp -> SetLineColor(kRed+1); + c4->SetGridx(); + c4->SetGridy(); + ratioMap->Draw("ap"); + + coeffEBm->GetXaxis()->SetTitle("#phi"); + coeffEBm->GetYaxis()->SetTitle("p/p_{true}"); + coeffEBm -> SetMarkerStyle(20); + coeffEBm -> SetMarkerSize(1); + coeffEBm -> SetMarkerColor(kBlue+1); + coeffEBm -> SetLineColor(kBlue+1); + coeffEBm->Draw("ap same"); + + + theApp->Run(); + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp b/EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp new file mode 100644 index 00000000000..8a19e32250f --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp @@ -0,0 +1,572 @@ +/// +/// Stand-alone to Normalize DATA/MC IC Coefficient along one ring skipping dead channels and TT EE +/// Input File Scale Map of a data sample (can be used also on MC) an this is saved in the same +/// file updating the old scale_map normalized by rings without skip dead channels + +#include +#include +#include +#include +#include +#include +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "TApplication.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + +/// Check if the crystal is near to a dead one +bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir); +/// Check if the crystal is near to a dead TT +bool CheckxtalTT (int ix, int iy, int ir, std::vector >& TT_centre ); + +int main( int argc, char **argv){ + + /// map for dead TT centre + + std::vector< std::pair > TT_centre_EEP; + std::vector< std::pair > TT_centre_EEM; + + TT_centre_EEP.push_back(std::pair (78,78)); + TT_centre_EEP.push_back(std::pair (83,28)); + TT_centre_EEP.push_back(std::pair (83,23)); + TT_centre_EEM.push_back(std::pair (53,28)); + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + /// Acquisition from cfg file + + if(argc != 2){ + std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + // parameterSet.reset(); + + std::string infile1 = "NULL"; + if(Options.existsAs("infile1")) + infile1 = Options.getParameter("infile1"); + + std::string infile2 = "NULL"; + if(Options.existsAs("infile2")) + infile2 = Options.getParameter("infile2"); + + std::string infile3 = "NULL"; + if(Options.existsAs("infile3")) + infile3 = Options.getParameter("infile3"); + + int evalStat = 1; + if(Options.existsAs("evalStat")) + evalStat = Options.getParameter("evalStat"); + + if ( infile1.empty()) { + cout << " No input file specified !" << endl; + return 1; + } + + if ( evalStat && (infile2.empty() || infile3.empty() )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return 1; + } + + std::string fileType = "NULL"; + if(Options.existsAs("fileType")) + fileType = Options.getParameter("fileType"); + + std::string dirName = "NULL"; + if(Options.existsAs("dirName")) + dirName = Options.getParameter("dirName"); + + cout << "Making Eta ring Normalization for: " << infile1 << endl; + + + TApplication* theApp = new TApplication("Application",&argc, argv); + + /// Input file with full statistic + + TFile *f = new TFile(infile1.c_str(),"UPDATE"); + TH2F* h_scale_EE[2],*hcmap_EE[2]; + + h_scale_EE[1] = (TH2F*)f->Get("h_scale_EEP"); + h_scale_EE[0] = (TH2F*)f->Get("h_scale_EEM"); + + hcmap_EE[1] = (TH2F*) h_scale_EE[1]->Clone("hcmap_EEP"); + hcmap_EE[0] = (TH2F*) h_scale_EE[0]->Clone("hcmap_EEM"); + + hcmap_EE[0] -> Reset("ICEMS"); + hcmap_EE[1] -> Reset("ICEMS"); + hcmap_EE[0] -> ResetStats(); + hcmap_EE[1] -> ResetStats(); + + /// ring structure from eerings.dat + TH2F *hrings[2]; + hrings[0] = (TH2F*)h_scale_EE[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)h_scale_EE[1]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICMES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); + } + + std::vector SumIC_Ring_EEP,SumIC_Ring_EEM,Sumxtal_Ring_EEP,Sumxtal_Ring_EEM; + + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + /// Mean over phi corrected skipping dead channel + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); + bool isGoodTT; + + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ){ + SumIC_Ring_EEP.at(ir) = SumIC_Ring_EEP.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP.at(ir) = Sumxtal_Ring_EEP.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood){ + SumIC_Ring_EEM.at(ir) = SumIC_Ring_EEM.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM.at(ir) = Sumxtal_Ring_EEM.at(ir) + 1.; + } + } + } + } + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + if(k!=0){ + if(ir>33){ hcmap_EE[k]->Fill(ix,iy,0.); + continue;} + if(Sumxtal_Ring_EEP.at(ir) != 0 && SumIC_Ring_EEP.at(ir)!= 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP.at(ir)/Sumxtal_Ring_EEP.at(ir))); + } + else{ + if(ir>33){hcmap_EE[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM.at(ir) != 0 && SumIC_Ring_EEM.at(ir) != 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM.at(ir)/Sumxtal_Ring_EEM.at(ir))); + } + } + } + } + + TH2F* h_scale_EE_Even[2],*hcmap_EE_Even[2]; + TH2F* h_scale_EE_Odd[2],*hcmap_EE_Odd[2]; + + h_scale_EE_Even[1] = new TH2F(); + h_scale_EE_Even[0] = new TH2F(); + + h_scale_EE_Odd[1] = new TH2F(); + h_scale_EE_Odd[0] = new TH2F(); + + hcmap_EE_Even[1] = new TH2F(); + hcmap_EE_Even[0] = new TH2F(); + + hcmap_EE_Odd[1] = new TH2F(); + hcmap_EE_Odd[0] = new TH2F(); + + TFile *f2 = new TFile(); + TFile *f3 = new TFile(); + + /// if evalstat --> apply also to the other file Odd and Even + if(evalStat){ + + f2 = new TFile(infile2.c_str(),"UPDATE"); + f3 = new TFile(infile3.c_str(),"UPDATE"); + + h_scale_EE_Even[1] = (TH2F*)f2->Get("h_scale_EEP"); + h_scale_EE_Even[0] = (TH2F*)f2->Get("h_scale_EEM"); + + h_scale_EE_Odd[1] = (TH2F*)f3->Get("h_scale_EEP"); + h_scale_EE_Odd[0] = (TH2F*)f3->Get("h_scale_EEM"); + + hcmap_EE_Even[1] = (TH2F*) h_scale_EE_Even[1]->Clone("hcmap_EEP"); + hcmap_EE_Even[0] = (TH2F*) h_scale_EE_Even[0]->Clone("hcmap_EEM"); + + hcmap_EE_Odd[1] = (TH2F*) h_scale_EE_Odd[1]->Clone("hcmap_EEP"); + hcmap_EE_Odd[0] = (TH2F*) h_scale_EE_Odd[0]->Clone("hcmap_EEM"); + + hcmap_EE_Even[0] -> Reset("ICEMS"); + hcmap_EE_Even[1] -> Reset("ICEMS"); + hcmap_EE_Even[0] -> ResetStats(); + hcmap_EE_Even[1] -> ResetStats(); + + hcmap_EE_Odd[0] -> Reset("ICEMS"); + hcmap_EE_Odd[1] -> Reset("ICEMS"); + hcmap_EE_Odd[0] -> ResetStats(); + hcmap_EE_Odd[1] -> ResetStats(); + + std::vector SumIC_Ring_EEP_Even,SumIC_Ring_EEM_Even,Sumxtal_Ring_EEP_Even,Sumxtal_Ring_EEM_Even; + std::vector SumIC_Ring_EEP_Odd,SumIC_Ring_EEM_Odd,Sumxtal_Ring_EEP_Odd,Sumxtal_Ring_EEM_Odd; + + SumIC_Ring_EEP_Even.assign(40,0); + SumIC_Ring_EEM_Even.assign(40,0); + Sumxtal_Ring_EEP_Even.assign(40,0); + Sumxtal_Ring_EEM_Even.assign(40,0); + SumIC_Ring_EEP_Odd.assign(40,0); + SumIC_Ring_EEM_Odd.assign(40,0); + Sumxtal_Ring_EEP_Odd.assign(40,0); + Sumxtal_Ring_EEM_Odd.assign(40,0); + + /// Mean over phi corrected skipping dead channel: Even sample + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Even[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Even[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + bool isGood = CheckxtalIC(h_scale_EE_Even[k],ix,iy,ir); + bool isGoodTT; + + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ){ + SumIC_Ring_EEP_Even.at(ir) = SumIC_Ring_EEP_Even.at(ir) + h_scale_EE_Even[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP_Even.at(ir) = Sumxtal_Ring_EEP_Even.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood){ + SumIC_Ring_EEM_Even.at(ir) = SumIC_Ring_EEM_Even.at(ir) + h_scale_EE_Even[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM_Even.at(ir) = Sumxtal_Ring_EEM_Even.at(ir) + 1.; + } + } + } + } + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Even[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Even[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + if(k!=0){ + if(ir>33){ hcmap_EE_Even[k]->Fill(ix,iy,0.); + continue;} + if(Sumxtal_Ring_EEP_Even.at(ir) != 0 && SumIC_Ring_EEP_Even.at(ir)!= 0) + hcmap_EE_Even[k]->Fill(ix,iy,h_scale_EE_Even[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP_Even.at(ir)/Sumxtal_Ring_EEP_Even.at(ir))); + } + else{ + if(ir>33){hcmap_EE_Even[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM_Even.at(ir) != 0 && SumIC_Ring_EEM_Even.at(ir) != 0) + hcmap_EE_Even[k]->Fill(ix,iy,h_scale_EE_Even[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM_Even.at(ir)/Sumxtal_Ring_EEM_Even.at(ir))); + } + } + } + } + + + /// Mean over phi corrected skipping dead channel: Odd sample + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Odd[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Odd[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + bool isGood = CheckxtalIC(h_scale_EE_Odd[k],ix,iy,ir); + bool isGoodTT; + + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ){ + SumIC_Ring_EEP_Odd.at(ir) = SumIC_Ring_EEP_Odd.at(ir) + h_scale_EE_Odd[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP_Odd.at(ir) = Sumxtal_Ring_EEP_Odd.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood){ + SumIC_Ring_EEM_Odd.at(ir) = SumIC_Ring_EEM_Odd.at(ir) + h_scale_EE_Odd[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM_Odd.at(ir) = Sumxtal_Ring_EEM_Odd.at(ir) + 1.; + } + } + } + } + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Odd[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Odd[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + if(k!=0){ + if(ir>33){ hcmap_EE_Odd[k]->Fill(ix,iy,0.); + continue;} + if(Sumxtal_Ring_EEP_Odd.at(ir) != 0 && SumIC_Ring_EEP_Odd.at(ir)!= 0) + hcmap_EE_Odd[k]->Fill(ix,iy,h_scale_EE_Odd[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP_Odd.at(ir)/Sumxtal_Ring_EEP_Odd.at(ir))); + } + else{ + if(ir>33){hcmap_EE_Odd[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM_Odd.at(ir) != 0 && SumIC_Ring_EEM_Odd.at(ir) != 0) + hcmap_EE_Odd[k]->Fill(ix,iy,h_scale_EE_Odd[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM_Odd.at(ir)/Sumxtal_Ring_EEM_Odd.at(ir))); + } + } + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP not normalized"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + h_scale_EE[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[1]->Draw("COLZ"); + h_scale_EE[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[0] = new TCanvas("cEEM","cmapEEM not normalized"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + + h_scale_EE[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[0]->Draw("COLZ"); + h_scale_EE[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[1] = new TCanvas("cmapEEP Normalized","cmapEEP Normalized"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + + hcmap_EE[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[1]->Draw("COLZ"); + hcmap_EE[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[1] = new TCanvas("cmapEEM Normalized","cmapEEM Normalized"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + hcmap_EE[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[0]->Draw("COLZ"); + hcmap_EE[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + f->cd(); + hcmap_EE[0]->Write("h_scale_map_EEP"); + hcmap_EE[1]->Write("h_scale_map_EEP"); + + if(evalStat){ + /// --- plot 0 : map of coefficients + cEEP[2] = new TCanvas("cEEP_Even","cmapEEP not normalized Even"); + cEEP[2] -> cd(); + cEEP[2]->SetLeftMargin(0.1); + cEEP[2]->SetRightMargin(0.13); + cEEP[2]->SetGridx(); + cEEP[2]->SetGridy(); + h_scale_EE_Even[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Even[1]->Draw("COLZ"); + h_scale_EE_Even[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Even[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Even[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[2] = new TCanvas("cEEM_Even","cmapEEM not normalized Even"); + cEEM[2] -> cd(); + cEEM[2]->SetLeftMargin(0.1); + cEEM[2]->SetRightMargin(0.13); + cEEM[2]->SetGridx(); + cEEM[2]->SetGridy(); + + h_scale_EE_Even[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Even[0]->Draw("COLZ"); + h_scale_EE_Even[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Even[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Even[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[3] = new TCanvas("cmapEEP Normalized Even","cmapEEP Normalized Even"); + cEEP[3] -> cd(); + cEEP[3]->SetLeftMargin(0.1); + cEEP[3]->SetRightMargin(0.13); + cEEP[3]->SetGridx(); + cEEP[3]->SetGridy(); + + hcmap_EE_Even[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Even[1]->Draw("COLZ"); + hcmap_EE_Even[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Even[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Even[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[3] = new TCanvas("cmapEEM Normalized Even","cmapEEM Normalized Even"); + cEEM[3] -> cd(); + cEEM[3]->SetLeftMargin(0.1); + cEEM[3]->SetRightMargin(0.13); + cEEM[3]->SetGridx(); + cEEM[3]->SetGridy(); + hcmap_EE_Even[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Even[0]->Draw("COLZ"); + hcmap_EE_Even[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Even[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Even[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + f2->cd(); + hcmap_EE_Even[0]->Write("h_scale_map_EEP"); + hcmap_EE_Even[1]->Write("h_scale_map_EEP"); + + /// --- plot 0 : map of coefficients + cEEP[4] = new TCanvas("cEEP_Odd","cmapEEP not normalized Odd"); + cEEP[4] -> cd(); + cEEP[4]->SetLeftMargin(0.1); + cEEP[4]->SetRightMargin(0.13); + cEEP[4]->SetGridx(); + cEEP[4]->SetGridy(); + h_scale_EE_Odd[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Odd[1]->Draw("COLZ"); + h_scale_EE_Odd[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Odd[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Odd[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[4] = new TCanvas("cEEM_Odd","cmapEEM not normalized Odd"); + cEEM[4] -> cd(); + cEEM[4]->SetLeftMargin(0.1); + cEEM[4]->SetRightMargin(0.13); + cEEM[4]->SetGridx(); + cEEM[4]->SetGridy(); + + h_scale_EE_Odd[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Odd[0]->Draw("COLZ"); + h_scale_EE_Odd[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Odd[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Odd[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[5] = new TCanvas("cmapEEP Normalized Odd","cmapEEP Normalized Odd"); + cEEP[5] -> cd(); + cEEP[5]->SetLeftMargin(0.1); + cEEP[5]->SetRightMargin(0.13); + cEEP[5]->SetGridx(); + cEEP[5]->SetGridy(); + + hcmap_EE_Odd[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Odd[1]->Draw("COLZ"); + hcmap_EE_Odd[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Odd[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Odd[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[5] = new TCanvas("cmapEEM Normalized Odd","cmapEEM Normalized Odd"); + cEEM[5] -> cd(); + cEEM[5]->SetLeftMargin(0.1); + cEEM[5]->SetRightMargin(0.13); + cEEM[5]->SetGridx(); + cEEM[5]->SetGridy(); + hcmap_EE_Odd[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Odd[0]->Draw("COLZ"); + hcmap_EE_Odd[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Odd[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Odd[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + f3->cd(); + hcmap_EE_Odd[0]->Write("h_scale_map_EEP"); + hcmap_EE_Odd[1]->Write("h_scale_map_EEP"); + } + + theApp->Run(); + return 0; + + } + +////////////////////////////////////////////////////////////// + +bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir) +{ + if(h_scale_EE->GetBinContent(ix,iy) ==0) return false; + + int bx= h_scale_EE->GetNbinsX(); + int by= h_scale_EE->GetNbinsY(); + + if((ixGetBinContent(ix+1,iy) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix-1,iy)==0 && ix>1 && (ir!=0 || ir<33))) return false; + + if((iyGetBinContent(ix,iy+1) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix,iy-1)==0 && iy>1 && (ir!=0 || ir<33))) return false; + + if((ixGetBinContent(ix+1,iy+1) ==0 && iyGetBinContent(ix-1,iy-1)==0 && iy>1 && ix>1 && (ir!=0 || ir<33))) return false; + + if((h_scale_EE->GetBinContent(ix+1,iy-1) ==0 && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && ix>1 && iy >& TT_centre ) +{ + for( unsigned int k =0; k +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TCanvas.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TLatex.h" +#include "TTree.h" +#include "TChain.h" + +#include +#include +#include "../../NtuplePackage/interface/treeReader.h" + + +void SetWHLTPathNames(std::vector > > & WHLTPathNames) ; + + +int main (int argc, char ** argv){ + +std::string category = std::string(argv[1]); + +double xtalWidth=0.01745329; +double luminosity=11.35; +double etaringEE=0.0325; + +// Acquisition of input file +TChain* treeDATA = new TChain("simpleNtupleEoverP/SimpleNtupleEoverP"); + +treeDATA->Add("/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012D_22Jan2013-v1.root"); + + +treeReader *fReader = new treeReader((TTree*)(treeDATA), false); +treeDATA->SetBranchStatus("*",0); +treeDATA->SetBranchStatus("isW",1); +treeDATA->SetBranchStatus("isZ",1); +treeDATA->SetBranchStatus("ele1_seedZside",1); +treeDATA->SetBranchStatus("ele1_seedIx",1); +treeDATA->SetBranchStatus("ele1_seedIy",1); +treeDATA->SetBranchStatus("ele1_seedIphi",1); +treeDATA->SetBranchStatus("ele1_seedIeta",1); +treeDATA->SetBranchStatus("ele1_e3x3",1); +treeDATA->SetBranchStatus("ele1_scEta",1); +treeDATA->SetBranchStatus("ele1_scERaw",1); + +treeDATA->SetBranchStatus("ele2_seedZside",1); +treeDATA->SetBranchStatus("ele2_seedIx",1); +treeDATA->SetBranchStatus("ele2_seedIy",1); +treeDATA->SetBranchStatus("ele2_seedIphi",1); +treeDATA->SetBranchStatus("ele2_seedIeta",1); +treeDATA->SetBranchStatus("ele2_e3x3",1); +treeDATA->SetBranchStatus("ele2_scEta",1); +treeDATA->SetBranchStatus("ele2_scERaw",1); + +// Set Single Electron Trigger Names + +std::vector > > WHLTPathNames; +SetWHLTPathNames(WHLTPathNames); + +TH2F* h_OccupancyEB = new TH2F("h_OccupancyEB","h_OccupancyEB",360,1,361,171,-85,86); +TH2F* h_OccupancyEB2 = new TH2F("h_OccupancyEB2","h_OccupancyEB",360,1,361,171,-85,86); + +TH2F* h_OccupancyEE[2]; +h_OccupancyEE[0] = new TH2F("h_OccupancyEEM","h_OccupancyEEP",100,1,101,100,1,101); +h_OccupancyEE[1] = new TH2F("h_OccupancyEEP","h_OccupancyEEM",100,1,101,100,1,101); + +TH2F* h_OccupancyEE2[2]; +h_OccupancyEE2[1] = new TH2F("h_OccupancyEEP2","h_OccupancyEEP2",100,1,101,100,1,101); +h_OccupancyEE2[0] = new TH2F("h_OccupancyEEM2","h_OccupancyEEM2",100,1,101,100,1,101); + + +std::cout<<" DATA Entries = "<GetEntries()<GetEntries(); ++entry) { + + if( entry%100000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + treeDATA->GetEntry(entry); + + //if(fReader->getInt("isHLTEle27")[0] != 1 || fReader->getInt("isGood")[0] !=1 ) continue; + + bool skipEvent = true; + bool isWHLT = false; + + // W triggers + for(unsigned int HLTIt = 0; HLTIt < WHLTPathNames.size(); ++HLTIt){ + + if( fReader->getInt("runId")[0] < ((WHLTPathNames.at(HLTIt)).second).first ) continue; + if( fReader->getInt("runId")[0] > ((WHLTPathNames.at(HLTIt)).second).second ) continue; + + for(unsigned int iHLTIt = 0; iHLTIt < fReader->GetString("HLT_Names")->size(); ++iHLTIt){ + if( (fReader->GetString("HLT_Names")->at(iHLTIt) == WHLTPathNames.at(HLTIt).first) && (fReader->GetInt("HLT_Accept")->at(iHLTIt) == 1) ) isWHLT = true; + } + + if( isWHLT == true ) skipEvent = false; + } + + + if(skipEvent == true) continue ; + + + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(category == "Default"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// } + +// if(category == "R9"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } + +// if(category == "fbrem") { +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } + +// if(category == "Pt"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } + + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 ){ + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + } + + +// if(category=="Default"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0){ +// if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_r9")[0]>0.8) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_r9")[0]>0.88) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_r9")[0]>0.92) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } +// } + + + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1){ + + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + } + + +// if(category == "Default"){ + +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0){ + +// if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_r9")[0]>0.8) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_r9")[0]>0.88) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_r9")[0]>0.92) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } +// } + + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1){ + + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + } + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==1){ + + if(fabs(fReader->getFloat("ele2_scEta")[0])<1.75 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.8) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele2_scEta")[0])<2. && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.88) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2. && fabs(fReader->getFloat("ele2_scEta")[0])<2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.92) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.94) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + } + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1){ + + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + } + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==-1){ + + if(fabs(fReader->getFloat("ele2_scEta")[0])<1.75 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.8) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele2_scEta")[0])<2. && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.88) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2. && fabs(fReader->getFloat("ele2_scEta")[0])<2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.92) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.94) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + } + + +} + +// Graph ocuppancy for single xtal + +TGraphErrors *OccupancyEB_vs_Eta = new TGraphErrors(); +TGraphErrors *OccupancyEEP_vs_Eta = new TGraphErrors(); +TGraphErrors *OccupancyEEM_vs_Eta = new TGraphErrors(); + +TGraphErrors *OccupancyAll = new TGraphErrors(); +TGraphErrors *OccupancyAll2 = new TGraphErrors(); + + +// Graph for EB +int nPoint=0, nPointAll =0, nPointAll2 =0; + + +for(int iEta =0; iEtaGetNbinsY() ;iEta++){ + double sumHit =0, nHit=0; + for(int iPhi =0; iPhiGetNbinsX() ;iPhi++){ + if(h_OccupancyEB->GetBinContent(iPhi+1,iEta+1)==0) continue; + sumHit=sumHit+h_OccupancyEB->GetBinContent(iPhi+1,iEta+1); + nHit++; + } + if(iEta<85 && sumHit!=0 && nHit!=0 ){ OccupancyEB_vs_Eta->SetPoint(nPoint,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + + OccupancyAll->SetPoint(nPointAll,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + } + + if(iEta<85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,-(85-iEta)*xtalWidth,0.); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,-(85-iEta)*xtalWidth,0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); +} + + if(iEta==85 && sumHit!=0 && nHit!=0){ OccupancyEB_vs_Eta->SetPoint(nPoint,0.,sumHit/(nHit*luminosity)); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + OccupancyAll->SetPoint(nPointAll,0.,sumHit/(nHit*luminosity)); + OccupancyAll->SetPoint(nPointAll,0.,sumHit/(nHit*luminosity)); + } + + if(iEta==85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,0.,0.); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,0.,0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); +} + + if(iEta>85 && sumHit!=0 && nHit!=0){ OccupancyEB_vs_Eta->SetPoint(nPoint,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + OccupancyAll->SetPoint(nPointAll,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + } + + if(iEta<85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,(iEta-85)*xtalWidth,0.); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,(iEta-85)*xtalWidth,0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); +} + + nPoint++;nPointAll++;nPointAll2++; +} + +// Graph for EB +nPoint=0; nPointAll =0; nPointAll2 =0; + +for(int iEta =0; iEtaGetNbinsY() ;iEta++){ + double sumHit =0, nHit=0; + for(int iPhi =0; iPhiGetNbinsX() ;iPhi++){ + if(h_OccupancyEB2->GetBinContent(iPhi+1,iEta+1)==0) continue; + sumHit=sumHit+h_OccupancyEB2->GetBinContent(iPhi+1,iEta+1); + nHit++; + } + if(iEta<85 && sumHit!=0 && nHit!=0 ){ + OccupancyAll2->SetPoint(nPointAll2,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + } + + if(iEta<85 && sumHit==0 && nHit==0 ){ + OccupancyAll2->SetPoint(nPointAll2,-(85-iEta)*xtalWidth,0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); +} + + if(iEta==85 && sumHit!=0 && nHit!=0){ + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + + } + + if(iEta==85 && sumHit==0 && nHit==0 ){ + OccupancyAll2->SetPoint(nPointAll2,0.,0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); +} + + if(iEta>85 && sumHit!=0 && nHit!=0){ + OccupancyAll2->SetPoint(nPointAll2,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + + } + + if(iEta<85 && sumHit==0 && nHit==0 ){ + OccupancyAll2->SetPoint(nPointAll2,(iEta-85)*xtalWidth,0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); +} + + nPoint++;nPointAll++;nPointAll2++; +} + + + +// Plot for EE : EEP and EEM +/// ring geometry for the endcap +TH2F *hrings[2]; +hrings[0] = (TH2F*) h_OccupancyEE[0]->Clone("hringsEEM"); +hrings[1] = (TH2F*) h_OccupancyEE[1]->Clone("hringsEEP"); +hrings[0] ->Reset("ICMES"); +hrings[1] ->Reset("ICMES"); +hrings[0] ->ResetStats(); +hrings[1] ->ResetStats(); + +FILE *fRing; +fRing = fopen("macros/eerings.dat","r"); +int x,y,z,ir; +while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); +} + +std::vector sumHitEEM ; +std::vector nHitEEM ; +sumHitEEM.assign(40,0.); nHitEEM.assign(40,0); +std::vector sumHitEEP ; +std::vector nHitEEP ; +sumHitEEP.assign(40,0.); nHitEEP.assign(40,0); + +for(int k =0; k<2 ; k++){ + for(int ix =0; ixGetNbinsX() ;ix++){ + for(int iy =0; iyGetNbinsY() ;iy++){ + if(h_OccupancyEE[k]->GetBinContent(ix+1,iy+1)==0) continue; + int mybin = h_OccupancyEE[k] -> FindBin(ix,iy); + int ring = int(hrings[k]-> GetBinContent(mybin)); + float occ = h_OccupancyEE[k]->GetBinContent(mybin); + if(k==0){ sumHitEEM.at(ring)=sumHitEEM.at(ring)+occ; nHitEEM.at(ring)=nHitEEM.at(ring)+1;} + if(k==1){ sumHitEEP.at(ring)=sumHitEEP.at(ring)+occ; nHitEEP.at(ring)=nHitEEP.at(ring)+1;} + } + } +} + +for(int k=0; k<2 ; k++){ +nPoint=0; +if(k==0){ + + for(unsigned int iring = 0; iringSetPoint(nPoint,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); + OccupancyEEM_vs_Eta->SetPointError(nPoint,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); + OccupancyAll->SetPoint(nPointAll,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); + nPoint++;nPointAll++;} + if(sumHitEEM.at(iring)==0 || nHitEEM.at(iring)==0){ + OccupancyEEM_vs_Eta->SetPoint(nPoint,-1.*(85*xtalWidth+iring*etaringEE),0.); + OccupancyEEM_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,-1.*(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); + nPoint++;nPointAll++;} + + } + } + +if(k==1) { + for(unsigned int iring = 0; iringSetPoint(nPoint,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); + OccupancyEEP_vs_Eta->SetPointError(nPoint,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); + OccupancyAll->SetPoint(nPointAll,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); + nPoint++; nPointAll++;} + + if(sumHitEEP.at(iring)==0 || nHitEEP.at(iring)==0){ + OccupancyEEP_vs_Eta->SetPoint(nPoint,(85*xtalWidth+iring*etaringEE),0.); + OccupancyEEP_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); + nPoint++; nPointAll++;} + } + } +} + + +sumHitEEM.clear() ; +nHitEEM.clear() ; +sumHitEEM.assign(40,0.); nHitEEM.assign(40,0); +sumHitEEP.clear() ; +nHitEEP.clear() ; +sumHitEEP.assign(40,0.); nHitEEP.assign(40,0); + +for(int k =0; k<2 ; k++){ + for(int ix =0; ixGetNbinsX() ;ix++){ + for(int iy =0; iyGetNbinsY() ;iy++){ + if(h_OccupancyEE2[k]->GetBinContent(ix+1,iy+1)==0) continue; + int mybin = h_OccupancyEE2[k] -> FindBin(ix,iy); + int ring = int(hrings[k]-> GetBinContent(mybin)); + float occ = h_OccupancyEE2[k]->GetBinContent(mybin); + if(k==0){ sumHitEEM.at(ring)=sumHitEEM.at(ring)+occ; nHitEEM.at(ring)=nHitEEM.at(ring)+1;} + if(k==1){ sumHitEEP.at(ring)=sumHitEEP.at(ring)+occ; nHitEEP.at(ring)=nHitEEP.at(ring)+1;} + } + } +} + +for(int k=0; k<2 ; k++){ +nPoint=0; +if(k==0){ + for(unsigned int iring = 0; iringSetPoint(nPointAll2,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); + nPoint++;nPointAll2++;} + if(sumHitEEM.at(iring)==0 || nHitEEM.at(iring)==0){ + OccupancyAll2->SetPoint(nPointAll2,-1.*(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); + nPoint++;nPointAll2++;} + } + + } +if(k==1) { + for(unsigned int iring = 0; iringSetPoint(nPointAll2,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); + nPoint++; nPointAll2++;} + if(sumHitEEP.at(iring)==0 && nHitEEP.at(iring)==0){ + OccupancyAll2->SetPoint(nPointAll2,(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); + nPoint++; nPointAll2++;} + + } + } +} + +gROOT->Reset(); +gROOT->SetStyle("Plain"); + +gStyle->SetPadTickX(1); +gStyle->SetPadTickY(1); +gStyle->SetOptTitle(0); +gStyle->SetOptStat(0); +gStyle->SetFitFormat("6.3g"); +gStyle->SetPalette(1); + +gStyle->SetTextFont(42); +gStyle->SetTextSize(0.05); +gStyle->SetTitleFont(42,"xyz"); +gStyle->SetTitleSize(0.05); +gStyle->SetLabelFont(42,"xyz"); +gStyle->SetLabelSize(0.05); +gStyle->SetTitleXOffset(0.8); +gStyle->SetTitleYOffset(1.1); +gROOT->ForceStyle(); + +TFile *th = new TFile("output/Occupancy.root","RECREATE"); +th->cd(); + +// Final plots +TCanvas *cEB = new TCanvas ("EB occupancy","EB occupancy"); +cEB->cd(); +cEB->SetGridx(); +cEB->SetGridy(); +h_OccupancyEB->Write(); +th->Close(); + + +// Final plots +TCanvas *cEEp = new TCanvas ("EE+ occupancy","EE+ occupancy"); +cEEp->cd(); +cEEp->SetGridx(); +cEEp->SetGridy(); +OccupancyEEP_vs_Eta->SetMarkerStyle(20); +OccupancyEEP_vs_Eta->SetMarkerColor(kGreen+2); +OccupancyEEP_vs_Eta->GetHistogram()->GetXaxis()-> SetRangeUser(1.5,2.5); +OccupancyEEP_vs_Eta->GetHistogram()->GetYaxis()-> SetTitle("Single xtal Event / fb^{-1}"); +OccupancyEEP_vs_Eta->GetHistogram()->GetXaxis()-> SetTitle("#eta"); +OccupancyEEP_vs_Eta->Draw("ap"); + + +// Final plots +TCanvas *cEEm = new TCanvas ("EE- occupancy","EE- occupancy"); +cEEm->cd(); +cEEm->SetGridx(); +cEEm->SetGridy(); +OccupancyEEM_vs_Eta->SetMarkerStyle(20); +OccupancyEEM_vs_Eta->SetMarkerColor(kGreen+2); +OccupancyEEM_vs_Eta->GetHistogram()->GetXaxis()-> SetRangeUser(-2.5,-1.5); +OccupancyEEM_vs_Eta->GetHistogram()->GetYaxis()-> SetTitle("Single xtal Event / fb^{-1}"); +OccupancyEEM_vs_Eta->GetHistogram()->GetXaxis()-> SetTitle("#eta"); +OccupancyEEM_vs_Eta->Draw("ap"); + + +TCanvas* cAll = new TCanvas("cAll", "history plot vs date",1); +cAll ->cd(); +cAll ->SetGridx(); +cAll ->SetGridy(); +OccupancyAll->SetMarkerStyle(20); +OccupancyAll->SetMarkerColor(kRed+2); +OccupancyAll->GetHistogram()->GetXaxis()-> SetRangeUser(-2.55,2.55); +OccupancyAll->GetHistogram()->GetYaxis()-> SetTitle("Number of Electrons / Crystal / fb^{-1}"); +OccupancyAll->GetHistogram()->GetXaxis()-> SetTitle("#eta_{seed}"); +OccupancyAll->Draw("ap"); +OccupancyAll2->SetMarkerStyle(20); +OccupancyAll2->SetMarkerColor(kGreen+2); +OccupancyAll2->Draw("psame"); +TLegend * leg = new TLegend(0.5,0.7,0.6,0.87); +leg->SetFillColor(0); +leg->AddEntry(OccupancyAll,"Preselected Events", "LP"); +leg->AddEntry(OccupancyAll2,"Events Used For Calibration", "LP"); +leg->Draw("same"); + + +char latexBuffer[250]; + +sprintf(latexBuffer,"CMS 2012 Preliminary"); +TLatex* latex = new TLatex(0.18,0.92,latexBuffer); +latex -> SetNDC(); +latex -> SetTextFont(62); +latex -> SetTextSize(0.035); +latex -> Draw("same"); + +sprintf(latexBuffer,"#sqrt{s} = 8 TeV L = 11.35 fb^{-1}"); +TLatex* latex2 = new TLatex(0.6,0.92,latexBuffer); +latex2 -> SetNDC(); +latex2 -> SetTextFont(42); +latex2 -> SetTextSize(0.035); +latex2 -> Draw("same"); + +cAll -> Print(("EleOccupancy_W_"+category+".C").c_str(),"cxx"); + +return 0; +} + + + +void SetWHLTPathNames(std::vector > > & WHLTPathNames){ + + std::pair WRunRanges1(190456,190738); + std::pair > WHLTPathName1("HLT_Ele27_WP80_v8",WRunRanges1); + std::pair WRunRanges2(190782,191411); + std::pair > WHLTPathName2("HLT_Ele27_WP80_v9",WRunRanges2); + std::pair WRunRanges3(191691,196531); + std::pair > WHLTPathName3("HLT_Ele27_WP80_v10",WRunRanges3); + std::pair WRunRanges4(198022,209151); + std::pair > WHLTPathName4("HLT_Ele27_WP80_v11",WRunRanges4); + + WHLTPathNames.push_back(WHLTPathName1); + WHLTPathNames.push_back(WHLTPathName2); + WHLTPathNames.push_back(WHLTPathName3); + WHLTPathNames.push_back(WHLTPathName4); +} + diff --git a/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp b/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp new file mode 100644 index 00000000000..53ddbca748f --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp @@ -0,0 +1,269 @@ +//Plot map ratio between two IC sets (used in miscalib studies) + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TGraph.h" + +int main(int argc, char **argv) +{ + + std::ifstream io1, io2, rms1, rms2; + + // std::ifstream io3, io4, io6; + io1.open ("output_runD_10ITER_SISCALIB_ETABIN2/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + io2.open ("output_runD_10ITER_NOSCALIB/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + + // io3.open ("output_runD_10ITER_SISCALIB_ETABIN3/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + // io4.open ("output_runD_10ITER_SISCALIB_ETABIN4/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + // io6.open ("output_runD_10ITER_SISCALIB_ETABIN6/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + // rms1.open ("output_runD_10ITER_SISCALIB_ETALINEAR/RMSFile.txt"); + // rms2.open ("output_runD_10ITER_NOSCALIB/RMSFile.txt"); + + float status, IC, err; + float status2, IC2, err2; + + // float IC3,IC4,IC6; + float etaCount = 0., etaCount2 = 0.; + + int eta, phi, eta2, phi2; + + TH2F *mapRatio = new TH2F ("map", "map", 360, 0.5, 360.5, 171, -85, +85); + TH1F *histo = new TH1F ("histo", "histo", 100, 0.995, 1.005); + // TH1F *histoSpreadRatio = new TH1F ("histoSpreadRatio", "histoSpreadRatio", 100, 0.9, 1.1); + TH1F *histoMeanEta = new TH1F ("histoMeanEta", "histoMeanEta", 100, 0.995, 1.005); + TH1F *histoMeanPhi = new TH1F ("histoMeanPhi", "histoMeanPhi", 100, 0.995, 1.005); + + TH2F *ICmap1 = new TH2F ("map1", "map1", 360, 0.5, 360.5, 171, -85, +85); + TH2F *ICmap2 = new TH2F ("map2", "map2", 360, 0.5, 360.5, 171, -85, +85); + TH1F *hIC1 = new TH1F ("hIC1", "hIC1", 100, 0.7, 1.3); + TH1F *hIC2 = new TH1F ("hIC2", "hIC2", 100, 0.7, 1.3); + + // TH1F *hprova = new TH1F ("g_RMS", "g_RMS", 91,0,91); + TGraph *g_RMS = new TGraph(); + + // TGraph *g_RMS3 = new TGraph(); + // TGraph *g_RMS4 = new TGraph(); + // TGraph *g_RMS6 = new TGraph(); + + TH1F *histoEtaRing[86]; + char histoName[100]; + char funcName[100]; + + /* TH1F *histoEtaRing4[86]; + char histoName4[100]; + TH1F *histoEtaRing3[86]; + char histoName3[100]; + TH1F *histoEtaRing6[86]; + char histoName6[100]; + */ + float map[171][360]; + float map2[171][360]; + + for (int e=0; e<86; e++) { + sprintf(histoName,"h_ratio_%d",e); + histoEtaRing[e] = new TH1F(histoName,"",50,0.9,1.1); + + /* sprintf(histoName4,"h_ratio4_%d",e); + histoEtaRing4[e] = new TH1F(histoName4,"",50,0.99,1.01); + sprintf(histoName3,"h_ratio3_%d",e); + histoEtaRing3[e] = new TH1F(histoName3,"",50,0.99,1.01); + sprintf(histoName6,"h_ratio6_%d",e); + histoEtaRing6[e] = new TH1F(histoName6,"",50,0.99,1.01); + */ } + + for (int e=0; e<171; e++) { + for (int p=0; p<360; p++) { + map[e][p]=0.; + map2[e][p]=0.; + } + } + + + // mapRatio->SetDrawOption ("colz"); + + eta=0; + + + while (!io1.eof()) + { + io1>>eta>>phi>>status>>IC>>err; + io2>>eta2>>phi2>>status2>>IC2>>err2; + + // io3>>eta>>phi>>status>>IC3>>err; + // io4>>eta>>phi>>status>>IC4>>err; + // io6>>eta>>phi>>status>>IC6>>err; + map[eta+85][phi-1]=IC; + map2[eta2+85][phi2-1]=IC2; + + if ((status==0) && (IC!=-1) && (status2==0) && (IC2!=-1)) { + histoEtaRing[int(fabs(eta))]->Fill(IC/IC2); + + // histoEtaRing3[int(fabs(eta))]->Fill(IC3/IC2); + // histoEtaRing4[int(fabs(eta))]->Fill(IC4/IC2); + // histoEtaRing6[int(fabs(eta))]->Fill(IC6/IC2); + } + + // if (fabs(eta)==46) std::cout<Fill(etaCount/etaCount2); + + etaCount=0.; + etaCount2=0.; + + } + + + if ((status==0) && (IC!=-1) && (status2==0) && (IC2!=-1) && (IC<1.5)) { + if ((eta==eta2) && (phi==phi2)) { + mapRatio->SetBinContent (phi,eta+85,IC/IC2); + histo->Fill(IC/IC2); + // std::cout<SetBinContent (phi,eta+85,IC); + ICmap2->SetBinContent (phi,eta+85,IC2); + // std::cout<Fill(IC); + hIC2->Fill(IC2); + + etaCount+=IC; + etaCount2+=IC2; + // std::cout<> e1 >> r1; + rms2 >> e2 >> r2; + histoSpreadRatio->Fill(r1/r2); + } + */ + float phiCount=0., phiCount2=0.; + for (int p=0; p<360; p++) { + for (int e=0; e<171; e++) { + phiCount+=map[e][p]; + phiCount2+=map2[e][p]; + } + histoMeanPhi->Fill(phiCount/phiCount2); + phiCount=0.; + phiCount2=0.; + } + + TFile f1 ("confronti_etabin2.root", "RECREATE"); + f1.cd(); + + for (int e=1; e<86; e++) { + + sprintf(funcName,"f_%d",e); + TF1* fgaus = new TF1(funcName,"gaus",0.99,1.01); + fgaus -> SetParameter(1,histoEtaRing[e]->GetMean()); + fgaus -> SetParameter(2,histoEtaRing[e]->GetRMS()); + // histoEtaRing[e] -> Fit(funcName,"QS+","",1-histoEtaRing[e]->GetRMS(),1+histoEtaRing[e]->GetRMS()); + g_RMS->SetPoint (e-1, float(e), histoEtaRing[e]->GetRMS()); + + // g_RMS3->SetPoint (e-1, float(e), histoEtaRing3[e]->GetRMS()); + // g_RMS4->SetPoint (e-1, float(e), histoEtaRing4[e]->GetRMS()); + // g_RMS6->SetPoint (e-1, float(e), histoEtaRing6[e]->GetRMS()); + // g_RMS->SetPointError (e-1, 0, 0); + if (e==20 || e==40 || e==60 || e==75 || e==85 || e==45 || e==46 || e==47) { + histoEtaRing[e]->Draw(); + // fgaus->Draw("same"); + histoEtaRing[e]->Write(); + } + } + + TCanvas *c1 = new TCanvas("c1"); + c1->cd(); + g_RMS -> GetXaxis() -> SetTitle("|i#eta|"); + g_RMS -> GetYaxis() -> SetTitle("RMS"); + g_RMS -> SetMinimum(0.00000); + // g_RMS -> SetMaximum(0.0025); + g_RMS -> SetMarkerStyle(20); + g_RMS -> SetMarkerSize(1.0); + g_RMS -> SetMarkerColor(kBlue+1); + c1->SetGrid(); + g_RMS -> Draw("APL"); + + g_RMS -> GetXaxis() -> SetRangeUser (0,86); + + /* g_RMS3 -> SetMarkerStyle(20); + g_RMS3 -> SetMarkerSize(1.0); + g_RMS3 -> SetMarkerColor(51+1); + g_RMS4 -> SetMarkerStyle(20); + g_RMS4 -> SetMarkerSize(1.0); + g_RMS4 -> SetMarkerColor(kRed+1); + g_RMS6 -> SetMarkerStyle(20); + g_RMS6 -> SetMarkerSize(1.0); + g_RMS6 -> SetMarkerColor(kOrange+1); + + g_RMS3 -> Draw("PLsame"); + g_RMS4 -> Draw("PLsame"); + g_RMS6 -> Draw("PLsame"); + + TLegend* leg = new TLegend(0.15,0.72,0.43,0.89); + leg -> SetFillColor(0); + leg -> SetTextFont(42); + leg -> SetTextSize(0.05); + leg -> AddEntry(g_RMS,"Miscalib. 2%","P"); + leg -> AddEntry(g_RMS3,"Miscalib. 3%","P"); + leg -> AddEntry(g_RMS4,"Miscalib. 4%","P"); + leg -> AddEntry(g_RMS6,"Miscalib. 6%","P"); + leg -> Draw("same"); + */ + c1->Print("g_RMS.png","png"); + + mapRatio -> GetXaxis() -> SetTitle("i#phi"); + mapRatio -> GetYaxis() -> SetRangeUser(-85,85); + + mapRatio -> GetYaxis() -> SetTitle("i#eta"); + + histo -> GetXaxis() -> SetTitle("IC1/IC2"); + histo -> GetYaxis() -> SetTitle("N"); + + histo->SetStats(1); + + mapRatio->GetZaxis()->SetRangeUser(0.99, 1.01); + // mapRatio->Draw("COLZ"); + // mapRatio->SaveAs("map.root","root"); + mapRatio->Write(); + // histo->Draw(); + histo->Write(); + histoMeanEta->Write(); + histoMeanPhi->Write(); + hIC1->Write(); + hIC2->Write(); + ICmap1->Write(); + ICmap2->Write(); + // histoSpreadRatio->Write(); + g_RMS->Write("g_RMS"); + f1.Close(); + + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp b/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp new file mode 100644 index 00000000000..61e7f9b52c1 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp @@ -0,0 +1,235 @@ +//Plot map ratio between two IC sets (used in miscalib studies) + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TGraph.h" + +#include "../interface/TEndcapRings.h" + +int main(int argc, char **argv) +{ + + std::ifstream io1, io2, rms1, rms2; + + io1.open ("output_EE_runD_SISCALIB_GAUSS_NOETA_STRAWEAK/IC_Run2012ABC_22JanuaryRereco_WZ_R9_EE_relative.txt"); + io2.open ("output_EE_runD_NOSCALIB/IC_Run2012ABC_22JanuaryRereco_WZ_R9_EE_relative.txt"); + + TEndcapRings *eRings = new TEndcapRings(); + + + float status, IC, err; + float status2, IC2, err2; + + int x, y, x2, y2; + + TH2F *mapRatioEEp = new TH2F ("mapEEp", "mapEEp", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *mapRatioEEm = new TH2F ("mapEEm", "mapEEm", 100, 0.5, 100.5, 100, 0.5, 100.5); + + TH1F *histoEEp = new TH1F ("histoEEp", "histoEEp", 100, 0.97, 1.03); + TH1F *histoEEm = new TH1F ("histoEEm", "histoEEm", 100, 0.97, 1.03); + + TH2F *ICmap1EEp = new TH2F ("map1EEp", "map1EEp", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *ICmap2EEp = new TH2F ("map2EEp", "map2EEp", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *ICmap1EEm = new TH2F ("map1EEm", "map1EEm", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *ICmap2EEm = new TH2F ("map2EEm", "map2EEm", 100, 0.5, 100.5, 100, 0.5, 100.5); + + TH1F *hIC1EEp = new TH1F ("hIC1EEp", "hIC1EEp", 100, 0.7, 1.3); + TH1F *hIC2EEp = new TH1F ("hIC2EEp", "hIC2EEp", 100, 0.7, 1.3); + TH1F *hIC1EEm = new TH1F ("hIC1EEm", "hIC1EEm", 100, 0.7, 1.3); + TH1F *hIC2EEm = new TH1F ("hIC2EEm", "hIC2EEm", 100, 0.7, 1.3); + + TGraph *g_RMSEEp = new TGraph(); + TGraph *g_RMSEEm = new TGraph(); + + + TH1F *histoEtaRingEEp[40]; + char histoNameEEp[100]; + char funcNameEEp[100]; + TH1F *histoEtaRingEEm[40]; + char histoNameEEm[100]; + char funcNameEEm[100]; + + for (int e=0; e<40; e++) { + sprintf(histoNameEEp,"h_ratio_EEp_%d",e); + histoEtaRingEEp[e] = new TH1F(histoNameEEp,"",150,0.0,2.0); + sprintf(histoNameEEm,"h_ratio_EEm_%d",e); + histoEtaRingEEm[e] = new TH1F(histoNameEEm,"",150,0.0,2.0); + } + + + + + x=0; + + while (!io1.eof()) + { + io1>>x>>y>>status>>IC>>err; + io2>>x2>>y2>>status2>>IC2>>err2; + + if ( (status==-1) && (IC!=-1) && (status2==-1) && (IC2!=-1)) { + if ((x==x2) && (y==y2)) { + + histoEtaRingEEm[int(eRings->GetEndcapRing(x,y,0))]->Fill(IC/IC2); + // if (x==34 && y==47) std::cout<<"anello: "<GetEndcapRing(x,y,status)<GetEndcapRing(x,y,0)==16) + std::cout<SetBinContent (x-1,y-1,IC/IC2); + histoEEm->Fill(IC/IC2); + // std::cout<SetBinContent (x-1,y-1,IC); + ICmap2EEm->SetBinContent (x2-1,y2-1,IC2); + // std::cout<Fill(IC); + hIC2EEm->Fill(IC2); + + } + else + std::cout<<"Problem: incoherent x or y "<GetEndcapRing(x,y,status))]->Fill(IC/IC2); + + mapRatioEEp->SetBinContent (x-1,y-1,IC/IC2); + histoEEp->Fill(IC/IC2); + // std::cout<SetBinContent (x-1,y-1,IC); + ICmap2EEp->SetBinContent (x2-1,y2-1,IC2); + // std::cout<Fill(IC); + hIC2EEp->Fill(IC2); + + } + else + std::cout<<"Problem: incoherent x or y "< SetParameter(1,histoEtaRingEEp[e]->GetMean()); + fgausEEp -> SetParameter(2,histoEtaRingEEp[e]->GetRMS()); + // histoEtaRingEEp[e] -> Fit(funcNameEEp,"QS+","",1-histoEtaRingEEp[e]->GetRMS(),1+histoEtaRingEEp[e]->GetRMS()); + // g_RMSEEp->SetPoint (e, float(e), fgausEEp->GetParameter(2)); + + sprintf(funcNameEEm,"f_EEm_%d",e); + TF1* fgausEEm = new TF1(funcNameEEm,"gaus",0.1,1.9); + fgausEEm -> SetParameter(1,histoEtaRingEEm[e]->GetMean()); + fgausEEm -> SetParameter(2,histoEtaRingEEm[e]->GetRMS()); + // histoEtaRingEEm[e] -> Fit(funcNameEEm,"QS+","",1-histoEtaRingEEm[e]->GetRMS(),1+histoEtaRingEEm[e]->GetRMS()); + // g_RMSEEm->SetPoint (e, float(e), fgausEEm->GetParameter(2)); + + g_RMSEEp->SetPoint (e, float(e), histoEtaRingEEp[e]->GetRMS()); + g_RMSEEm->SetPoint (e, float(e), histoEtaRingEEm[e]->GetRMS()); + + if (e==1 || e==2 || e==4 || e==19 || e==26 || e==30 || e==31 || e==32 || e==33 ) { + histoEtaRingEEp[e]->Draw(); + // fgausEEp->Draw("same"); + + histoEtaRingEEm[e]->Draw(); + // fgausEEm->Draw("same"); + + histoEtaRingEEp[e]->Write(); + histoEtaRingEEm[e]->Write(); + } + } + + TCanvas *c1 = new TCanvas("c1"); + c1->cd(); + g_RMSEEp -> GetXaxis() -> SetTitle("i|#eta|"); + g_RMSEEp -> GetYaxis() -> SetTitle("RMS"); + g_RMSEEp -> SetMinimum(0.00000); + // g_RMSEEp -> SetMaximum(0.015); + // g_RMSEEm -> SetMaximum(0.015); + g_RMSEEp -> SetMarkerStyle(20); + g_RMSEEp -> SetMarkerSize(1.0); + g_RMSEEp -> SetMarkerColor(kBlue+1); + c1->SetGrid(); + g_RMSEEp -> Draw("AP"); + + g_RMSEEp -> GetXaxis() -> SetRangeUser (0,32.5); + + c1->Print("g_RMS_EE+.png","png"); + + + TCanvas *c2 = new TCanvas("c2"); + c2->cd(); + g_RMSEEm -> GetXaxis() -> SetTitle("i|#eta|"); + g_RMSEEm -> GetYaxis() -> SetTitle("RMS"); + g_RMSEEm -> SetMinimum(0.00000); + // g_RMS -> SetMaximum(0.0025); + g_RMSEEm -> SetMarkerStyle(20); + g_RMSEEm -> SetMarkerSize(1.0); + g_RMSEEm -> SetMarkerColor(kBlue+1); + c2->SetGrid(); + g_RMSEEm -> Draw("AP"); + g_RMSEEm -> GetXaxis() -> SetRangeUser (0,33.5); + c2->Print("g_RMS_EE-.png","png"); + + mapRatioEEp -> GetXaxis() -> SetTitle("ix"); + mapRatioEEp -> GetYaxis() -> SetRangeUser(-100.5,100.5); + mapRatioEEp -> GetYaxis() -> SetTitle("iy"); + histoEEp -> GetXaxis() -> SetTitle("IC1/IC2"); + histoEEp -> GetYaxis() -> SetTitle("N"); + histoEEp->SetStats(1); + mapRatioEEp->GetZaxis()->SetRangeUser(0.98, 1.02); + + mapRatioEEm -> GetXaxis() -> SetTitle("ix"); + mapRatioEEm -> GetYaxis() -> SetRangeUser(-100.5,100.5); + mapRatioEEm -> GetYaxis() -> SetTitle("iy"); + histoEEm -> GetXaxis() -> SetTitle("IC1/IC2"); + histoEEm -> GetYaxis() -> SetTitle("N"); + histoEEm->SetStats(1); + mapRatioEEm->GetZaxis()->SetRangeUser(0.98, 1.02); + + mapRatioEEp->Write(); + histoEEp->Write(); + hIC1EEp->Write(); + hIC2EEp->Write(); + ICmap1EEp->Write(); + ICmap2EEp->Write(); + g_RMSEEp->Write("g_RMSEEp"); + g_RMSEEm->Write("g_RMSEEm"); + mapRatioEEm->Write(); + histoEEm->Write(); + hIC1EEm->Write(); + hIC2EEm->Write(); + ICmap1EEm->Write(); + ICmap2EEm->Write(); + + f1.Close(); + + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp b/EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp new file mode 100644 index 00000000000..92e78e07ef9 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp @@ -0,0 +1,231 @@ +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TCanvas.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TLatex.h" +#include "TTree.h" +#include "TChain.h" +#include "TGraphAsymmErrors.h" + +#include +#include +#include "../../NtuplePackage/interface/treeReader.h" + + +int main (int argc, char ** argv){ + + // double xtalWidth=0.01745329; + // double luminosity=11.53; + // double etaringEE=0.0325; + + + // Acquisition of input file + TChain* treeDATA_HLT = new TChain("simpleNtupleEoverP/SimpleNtupleEoverP"); + treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012A-22Jan2013-v1_HLT.root"); + treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012B-22Jan2013-v1_HLT.root"); + // treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012C-22Jan2013-v1_HLT.root"); + treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012D-22Jan2013-v1_HLT.root"); + + treeReader *fReader_HLT = new treeReader((TTree*)(treeDATA_HLT), false); + + TH1F* Denominator = new TH1F ("Denominator","",100,-2.5,2.5); + TH1F* HLTEle27_RateVsEta = new TH1F ("HLTEle27_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_PFMET_RateVsEta = new TH1F ("HLTEle27_PFMET_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_RateVsEta = new TH1F ("HLTEle27_Offline_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_R9_RateVsEta = new TH1F ("HLTEle27_R9_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_fbrem_RateVsEta = new TH1F ("HLTEle27_fbrem_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_Pt_RateVsEta = new TH1F ("HLTEle27_Pt_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_PFMET_RateVsEta = new TH1F ("HLTEle27_Offline_PFMET_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_PFMET_VsEle27Offline = new TH1F ("HLTEle27_PFMET_VsEle27Offline","",100,-2.5,2.5); + + std::cout<<" DATA Entries = "<GetEntries()<GetEntries(); ++entry) { + + if( entry%100000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + treeDATA_HLT->GetEntry(entry); + + Denominator->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isHLTEle27")[0] == 1 ) HLTEle27_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 ) HLTEle27_PFMET_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0) + HLTEle27_Offline_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fReader_HLT->getFloat("ele1_r9")[0] >0.94) + HLTEle27_Offline_R9_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fabs(fReader_HLT->getFloat("ele1_fbrem")[0]) <0.5) + HLTEle27_Offline_fbrem_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fabs(fReader_HLT->getFloat("ele1_pt")[0]) >50) + HLTEle27_Offline_Pt_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 ) + HLTEle27_Offline_PFMET_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if( fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fReader_HLT->getInt("isGood")[0] == 1) + HLTEle27_PFMET_VsEle27Offline->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + + + } + + + TGraphAsymmErrors* HLTEle27_Efficiency = new TGraphAsymmErrors(HLTEle27_RateVsEta,Denominator); + TGraphAsymmErrors* HLTEle27_PFMET_Efficiency = new TGraphAsymmErrors(HLTEle27_PFMET_RateVsEta,Denominator); + TGraphAsymmErrors* HLTEle27_Offline_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_R9_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_R9_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_fbrem_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_fbrem_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_Pt_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_Pt_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_PFMET_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_PFMET_RateVsEta,HLTEle27_PFMET_RateVsEta); + TGraphAsymmErrors* HLTEle27_PFMET_VsEle27Offline_Efficiency = new TGraphAsymmErrors(HLTEle27_PFMET_VsEle27Offline,HLTEle27_Offline_RateVsEta); + + HLTEle27_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_PFMET_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_R9_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_fbrem_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_Pt_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_PFMET_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_PFMET_VsEle27Offline_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + + + HLTEle27_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_PFMET_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_R9_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_fbrem_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_Pt_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_PFMET_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_PFMET_VsEle27Offline_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + + HLTEle27_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Ele27}}{N^{all}}"); + HLTEle27_PFMET_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Ele27PFMET}}{N^{all}}"); + HLTEle27_Offline_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Offline}}{N^{Ele27}}"); + HLTEle27_Offline_R9_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{R9}}{N^{Ele27}}"); + HLTEle27_Offline_fbrem_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{fbrem}}{N^{Ele27}}"); + HLTEle27_Offline_Pt_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{pT}}{N^{Ele27}}"); + HLTEle27_Offline_PFMET_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Offline}}{N^{Ele27PFMET}}"); + HLTEle27_PFMET_VsEle27Offline_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Off+Ele27PFMET}}{N^{Off+Ele27}}"); + + HLTEle27_Efficiency->SetMarkerStyle(20); + HLTEle27_PFMET_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_R9_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_fbrem_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_Pt_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_PFMET_Efficiency->SetMarkerStyle(20); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerStyle(20); + + HLTEle27_Efficiency->SetMarkerSize(1.2); + HLTEle27_PFMET_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_R9_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_fbrem_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_Pt_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_PFMET_Efficiency->SetMarkerSize(1.2); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerSize(1.2); + + HLTEle27_Efficiency->SetMarkerColor(kBlue); + HLTEle27_PFMET_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_R9_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_fbrem_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_Pt_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_PFMET_Efficiency->SetMarkerColor(kBlue); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerColor(kBlue); + + HLTEle27_Efficiency->SetLineColor(kBlack); + HLTEle27_PFMET_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_R9_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_fbrem_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_Pt_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_PFMET_Efficiency->SetLineColor(kBlack); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetLineColor(kBlack); + + TCanvas* cHLTEle27_Efficiency = new TCanvas("cHLTEle27_Efficiency","",1); + cHLTEle27_Efficiency->cd(); + cHLTEle27_Efficiency->SetGridx(); + cHLTEle27_Efficiency->SetGridy(); + HLTEle27_Efficiency->Draw("ap"); + + TCanvas* cHLTEle27_PFMET_Efficiency = new TCanvas("cHLTEle27_PFMET_Efficiency","",1); + cHLTEle27_PFMET_Efficiency ->cd(); + cHLTEle27_PFMET_Efficiency ->SetGridx(); + cHLTEle27_PFMET_Efficiency ->SetGridy(); + HLTEle27_PFMET_Efficiency->Draw("ap"); + + TCanvas* cHLTEle27_Offline_Efficiency = new TCanvas("cHLTEle27_Offline_Efficiency","",1); + cHLTEle27_Offline_Efficiency ->cd(); + cHLTEle27_Offline_Efficiency ->SetGridx(); + cHLTEle27_Offline_Efficiency ->SetGridy(); + HLTEle27_Offline_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_R9_Efficiency = new TCanvas("cHLTEle27_Offline_R9_Efficiency","",1); + cHLTEle27_Offline_R9_Efficiency ->cd(); + cHLTEle27_Offline_R9_Efficiency ->SetGridx(); + cHLTEle27_Offline_R9_Efficiency ->SetGridy(); + HLTEle27_Offline_R9_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_fbrem_Efficiency = new TCanvas("cHLTEle27_Offline_fbrem_Efficiency","",1); + cHLTEle27_Offline_fbrem_Efficiency ->cd(); + cHLTEle27_Offline_fbrem_Efficiency ->SetGridx(); + cHLTEle27_Offline_fbrem_Efficiency ->SetGridy(); + HLTEle27_Offline_fbrem_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_Pt_Efficiency = new TCanvas("cHLTEle27_Offline_Pt_Efficiency","",1); + cHLTEle27_Offline_Pt_Efficiency ->cd(); + cHLTEle27_Offline_Pt_Efficiency ->SetGridx(); + cHLTEle27_Offline_Pt_Efficiency ->SetGridy(); + HLTEle27_Offline_Pt_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_PFMET_Efficiency = new TCanvas("cHLTEle27_Offline_PFMET_Efficiency","",1); + cHLTEle27_Offline_PFMET_Efficiency ->cd(); + cHLTEle27_Offline_PFMET_Efficiency ->SetGridx(); + cHLTEle27_Offline_PFMET_Efficiency ->SetGridy(); + HLTEle27_Offline_PFMET_Efficiency ->Draw("ap"); + + + TCanvas* cHLTEle27_PFMET_VsEle27Offline_Efficiency = new TCanvas("HLTEle27_PFMET_VsEle27Offline_Efficiency","",1); + cHLTEle27_PFMET_VsEle27Offline_Efficiency ->cd(); + cHLTEle27_PFMET_VsEle27Offline_Efficiency ->SetGridx(); + cHLTEle27_PFMET_VsEle27Offline_Efficiency ->SetGridy(); + HLTEle27_PFMET_VsEle27Offline_Efficiency ->Draw("ap"); + + + TFile *output = new TFile("output/outputTriggerRate.root","RECREATE"); + output->cd(); + cHLTEle27_Efficiency->Write(); + cHLTEle27_PFMET_Efficiency->Write(); + cHLTEle27_Offline_Efficiency->Write(); + cHLTEle27_Offline_R9_Efficiency->Write(); + cHLTEle27_Offline_fbrem_Efficiency->Write(); + cHLTEle27_Offline_Pt_Efficiency->Write(); + cHLTEle27_Offline_PFMET_Efficiency->Write(); + cHLTEle27_PFMET_VsEle27Offline_Efficiency->Write(); + + Denominator->Write(); + HLTEle27_RateVsEta->Write(); + HLTEle27_PFMET_RateVsEta->Write(); + HLTEle27_Offline_RateVsEta->Write(); + HLTEle27_Offline_R9_RateVsEta->Write(); + HLTEle27_Offline_fbrem_RateVsEta->Write(); + HLTEle27_Offline_Pt_RateVsEta->Write(); + HLTEle27_Offline_PFMET_RateVsEta->Write(); + HLTEle27_PFMET_VsEle27Offline->Write(); + output->Close(); + + return 0 ; + +} diff --git a/EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp b/EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp new file mode 100644 index 00000000000..a8a59919280 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp @@ -0,0 +1,219 @@ +#include "XtalAlphaEB.h" +#include +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" +#include "CalibrationUtils.h" + + + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + + //std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + + std::string inputFileDeadXtal = "NULL"; + try + { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch( char const* exceptionString ) + { + std::cerr << " exception = " << exceptionString << std::endl; + } + + std::string jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName"); + std::map > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + float R9Min = gConfigParser -> readFloatOption("Input::R9Min"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + std::string inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); + + std::string typeEB = gConfigParser -> readStringOption("Input::typeEB"); + std::string typeEE = gConfigParser -> readStringOption("Input::typeEE"); + int nRegionsEB = GetNRegionsEB(typeEB); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// open ntupla of data or MC + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + /// open calibration momentum graph + TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EB; + + for(int i = 0; i < nRegionsEB; ++i) + { + TString Name = Form("g_EoC_EB_%d",i); + g_EoC_EB.push_back( (TGraphErrors*)(f4->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_WZ_noEP_miscalib_EB",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_WZ_noEP_EB",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_W_noEP_miscalib_EB",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_W_noEP_EB",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + if(isSaveEPDistribution == true) + { + XtalAlphaEB analyzer(albero, g_EoC_EB, typeEB, outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer.saveHistos(f1); + } + else + { + XtalAlphaEB analyzer(albero, g_EoC_EB, typeEB); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_miscalib_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_miscalib_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_WZ_noEP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_miscalib_EB_odd.root", outputFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_WZ_noEP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_EB_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_miscalib_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_W_EP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_EP_miscalib_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_W_noEP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_miscalib_EB_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_EP_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_W_noEP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_EB_odd.root", outputFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + /// Run on odd + XtalAlphaEB analyzer_even(albero, g_EoC_EB, typeEB); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer_even.saveHistos(f1); + + /// Run on even + XtalAlphaEB analyzer_odd(albero, g_EoC_EB, typeEB); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer_odd.saveHistos(f2);} + + + delete albero; + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp b/EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp new file mode 100644 index 00000000000..3a829684ff5 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp @@ -0,0 +1,250 @@ +#include "XtalAlphaEE.h" +#include +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" +#include "CalibrationUtils.h" + + + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + + //std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + + std::string inputFileDeadXtal = "NULL"; + try + { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch( char const* exceptionString ) + { + std::cerr << " exception = " << exceptionString << std::endl; + } + + std::string jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName"); + std::map > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + float R9Min = gConfigParser -> readFloatOption("Input::R9Min"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + bool isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); + std::string inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); + + std::string typeEB = gConfigParser -> readStringOption("Input::typeEB"); + std::string typeEE = gConfigParser -> readStringOption("Input::typeEE"); + + int nRegionsEE = GetNRegionsEE(typeEE); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// Acquistion input ntuples + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + /// open calibration momentum graph + TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EE; + + for(int i = 0; i < nRegionsEE; ++i){ + + TString Name = Form("g_EoC_EE_%d",i); + g_EoC_EE.push_back( (TGraphErrors*)(f4->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString outputTxtFile ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_WZ_fbrem_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_WZ_noEP_miscalib_EE",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_WZ_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_WZ_noEP_EE",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isfbrem == true ) name_tmp = Form ("%s_W_fbrem_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_W_noEP_miscalib_EE",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isfbrem ==true ) name_tmp = Form ("%s_W_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_W_noEP_EE",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + if(isSaveEPDistribution == true){ + + XtalAlphaEE analyzer(albero, g_EoC_EE, typeEE, outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer.saveHistos(f1); + } + else + { + XtalAlphaEE analyzer(albero, g_EoC_EE, typeEE); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_miscalib_EE.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isfbrem==true) + { name = Form ("%s_WZ_fbrem_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_fbrem_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_WZ_noEP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_miscalib_EE_odd.root", outputFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isfbrem==true) + { name = Form ("%s_WZ_fbrem_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_fbrem_EE_odd.root", outputFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_WZ_noEP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_EE_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_W_EP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_EP_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isfbrem==true) + { name = Form ("%s_W_fbrem_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_fbrem_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_W_noEP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_miscalib_EE_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_W_EP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_EP_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isfbrem==true) + { name = Form ("%s_W_fbrem_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_fbrem_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_W_noEP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_EE_odd.root", outputFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + /// Run on odd + XtalAlphaEE analyzer_even(albero, g_EoC_EE, typeEE); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer_even.saveHistos(f1); + + /// Run on even + XtalAlphaEE analyzer_odd(albero, g_EoC_EE, typeEE); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer_odd.saveHistos(f2); + + } + + delete albero; + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp b/EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp new file mode 100644 index 00000000000..5e8d16b692d --- /dev/null +++ b/EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp @@ -0,0 +1,945 @@ +#include "Zutils.h" +#include "setTDRStyle.h" +#include "ConfigParser.h" +#include "ntpleUtils.h" + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TH2.h" +#include "TChain.h" +#include "TCanvas.h" +#include "TGraphAsymmErrors.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TTree.h" +#include "TVirtualFitter.h" +#include "TMath.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define a 0.5346 +#define b 0.2166 +#define FWHMZ 2.4952 + + +int main(int argc, char **argv){ + + //set the style + setTDRStyle(); + gROOT->Reset(); + gROOT->SetStyle("Plain"); + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + + + /// Acquisition from cfg file + + if(argc != 2){ + std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + parseConfigFile (argv[1]) ; + + std::string treeNameDATA = gConfigParser -> readStringOption("Input::treeNameDATA"); + std::cout<<" Input Tree Name DATA = "< readStringOption("Input::treeNameMC"); + std::cout<<" Input Tree Name MC = "< readStringOption("Input::inputDataFile"); + std::cout<<" Input Data File = "< readStringOption("Input::inputMCFile"); + std::cout<<" Input MC File = "< readStringOption("Input::WeightforMC"); + std::cout<<" Weights for MC = "< readBoolOption("Input::useMC"); + std::cout<<" Fit also MC = "< readStringOption("Output::outputFile"); + std::cout<<" Output Data File = "< readStringOption("Output::outputFileTable"); + std::cout<<" Output Table File = "<GetEntries() << " entries" << std::endl; + std::cout << " DATA: " << std::setw(8) << treeDATA->GetEntries() << " entries" << std::endl; + + if (treeDATA->GetEntries() == 0 || treeMC->GetEntries() == 0 ){ + std::cout << ">>>recalibZ::Error: at least one file is empty" << std::endl; + return -1; + } + + std::vector FitCategories; + FitCategories = gConfigParser -> readStringListOption("Input::FitCategories"); + + std::cout << " >>>>> Input::FitCategories size = " << FitCategories.size() << std::endl; + std::cout << " >>>>> >>>>> "; + for (unsigned int iCat = 0; iCat < FitCategories.size(); iCat++){ + std::cout << " " << FitCategories.at(iCat) << ", "; + } + std::cout << std::endl; + + //--- weights for MC + TFile weightsFile (WeightforMC.c_str(),"READ"); + TH1F* hweights = (TH1F*)weightsFile.Get("hweights"); + float w[100]; + for (int ibin = 1; ibin < hweights->GetNbinsX()+1; ibin++){ + w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 + } + weightsFile.Close(); + + /// Output infos + TFile* outputTFile = new TFile(outputFile.c_str(),"RECREATE"); + + /// option Infos + int nbinZ = gConfigParser -> readIntOption("Option::nbinZ"); + std::cout<<" nbinZ = "< readDoubleOption("Option::mZMax"); + std::cout<<" mZ_Max = "< readDoubleOption("Option::mZMin"); + std::cout<<" mZ_Min = "< readDoubleOption("Option::scaleEB"); + std::cout<<" scaleEB = "< readDoubleOption("Option::scaleEE"); + std::cout<<" scaleEE = "< readIntOption("Option::nPoints"); + std::cout<<" nPoints = "< ZmassDATA; + std::map ZmassDATA_regression; + std::map ZmassMC; + std::map ZmassMC_regression; + + + for(unsigned int i = 0; i < FitCategories.size(); ++i){ + std::string category = FitCategories.at(i); + std::string histoName1 = "h_ZmassDATA_"+category; + ZmassDATA[category] = new TH1F(histoName1.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassDATA[category] -> Sumw2(); + + std::string histoName2 = "h_ZmassDATA_regression_"+category; + ZmassDATA_regression[category] = new TH1F(histoName2.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassDATA_regression[category] -> Sumw2(); + + std::string histoName3 = "h_ZmassMC_"+category; + ZmassMC[category] = new TH1F(histoName3.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassMC[category] -> Sumw2(); + + std::string histoName4 = "h_ZmassMC_regression_"+category; + ZmassMC_regression[category] = new TH1F(histoName4.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassMC_regression[category] -> Sumw2(); + + } + + /// Set branch addresses + int isZ; + float ele1ele2_scM,ele1ele2_scM_regression; + int ele1_isEB,ele2_isEB; + float ele1_scEta,ele2_scEta,ele1_scE,ele2_scE,ele1_es,ele2_es,ele1_scERaw,ele2_scERaw, ele1_scE_regression, + ele2_scE_regression,ele1_e3x3,ele2_e3x3; + int ele1_seedIeta,ele1_seedIphi,ele2_seedIeta,ele2_seedIphi,ele1_seedIx,ele2_seedIx,ele1_seedIy,ele2_seedIy,ele1_seedZside,ele2_seedZside; + int PUit_NumInteractions; + + treeDATA->SetBranchAddress("isZ", &isZ); + treeDATA->SetBranchAddress("ele1ele2_scM", &ele1ele2_scM); + treeDATA->SetBranchAddress("ele1ele2_scM_regression", &ele1ele2_scM_regression); + treeDATA->SetBranchAddress("ele1_isEB", &ele1_isEB); + treeDATA->SetBranchAddress("ele2_isEB", &ele2_isEB); + + treeMC->SetBranchAddress("isZ", &isZ); + treeMC->SetBranchAddress("ele1ele2_scM", &ele1ele2_scM); + treeMC->SetBranchAddress("ele1_isEB", &ele1_isEB); + treeMC->SetBranchAddress("ele2_isEB", &ele2_isEB); + treeMC->SetBranchAddress("PUit_NumInteractions", &PUit_NumInteractions); + + treeDATA->SetBranchAddress("ele1_scEta", &ele1_scEta); + treeDATA->SetBranchAddress("ele2_scEta", &ele2_scEta); + + treeMC->SetBranchAddress("ele1_scEta", &ele1_scEta); + treeMC->SetBranchAddress("ele2_scEta", &ele2_scEta); + + treeDATA->SetBranchAddress("ele1_seedIeta", &ele1_seedIeta); + treeDATA->SetBranchAddress("ele1_seedIphi", &ele1_seedIphi); + treeDATA->SetBranchAddress("ele2_seedIeta", &ele2_seedIeta); + treeDATA->SetBranchAddress("ele2_seedIphi", &ele2_seedIphi); + treeDATA->SetBranchAddress("ele1_seedIx", &ele1_seedIx); + treeDATA->SetBranchAddress("ele2_seedIx", &ele2_seedIx); + treeDATA->SetBranchAddress("ele1_seedIy", &ele1_seedIy); + treeDATA->SetBranchAddress("ele2_seedIy", &ele2_seedIy); + treeDATA->SetBranchAddress("ele1_seedZside", &ele1_seedZside); + treeDATA->SetBranchAddress("ele2_seedZside", &ele2_seedZside); + + treeMC->SetBranchAddress("ele1_seedIeta", &ele1_seedIeta); + treeMC->SetBranchAddress("ele1_seedIphi", &ele1_seedIphi); + treeMC->SetBranchAddress("ele2_seedIeta", &ele2_seedIeta); + treeMC->SetBranchAddress("ele2_seedIphi", &ele2_seedIphi); + treeMC->SetBranchAddress("ele1_seedIx", &ele1_seedIx); + treeMC->SetBranchAddress("ele2_seedIx", &ele2_seedIx); + treeMC->SetBranchAddress("ele1_seedIy", &ele1_seedIy); + treeMC->SetBranchAddress("ele2_seedIy", &ele2_seedIy); + treeMC->SetBranchAddress("ele1_seedZside", &ele1_seedZside); + treeMC->SetBranchAddress("ele2_seedZside", &ele2_seedZside); + + + treeDATA->SetBranchAddress("ele1_scE", &ele1_scE); + treeDATA->SetBranchAddress("ele1_e3x3", &ele1_e3x3); + treeDATA->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression); + treeDATA->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression); + treeDATA->SetBranchAddress("ele2_scE", &ele2_scE); + treeDATA->SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeDATA->SetBranchAddress("ele2_e3x3", &ele2_e3x3); + treeDATA->SetBranchAddress("ele1_es", &ele1_es); + treeDATA->SetBranchAddress("ele2_scERaw", &ele2_scERaw); + treeDATA->SetBranchAddress("ele2_es", &ele2_es); + + treeMC->SetBranchAddress("ele1_scE", &ele1_scE); + treeMC->SetBranchAddress("ele1_e3x3", &ele1_e3x3); + treeMC->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression); + treeMC->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression); + treeMC->SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeMC->SetBranchAddress("ele1_es", &ele1_es); + treeMC->SetBranchAddress("ele2_scE", &ele2_scE); + treeMC->SetBranchAddress("ele2_e3x3", &ele2_e3x3); + treeMC->SetBranchAddress("ele2_scERaw", &ele2_scERaw); + treeMC->SetBranchAddress("ele2_es", &ele2_es); + + //*** Loop on MC **// + std::cout <<" Fill with MC Events "< GetEntries(); + std::cout <<" MC Events = "< GetEntry(iEntry); + double weight = w[PUit_NumInteractions]; + //only the Z + if (isZ != 1) continue; + if( (ele1_seedZside== 0) && (ele2_seedZside == 0) ){ + ZmassMC["EB-EB"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB-EB"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + else if( fabs(ele1_seedZside)== 1 && fabs(ele2_seedZside)== 1 ){ + ZmassMC["EE-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE-EE"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight ); + + } + else{ + ZmassMC["EB-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEE),weight ); + ZmassMC_regression["EB-EE"] -> Fill( ele1ele2_scM* sqrt(scaleEB*scaleEE)* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)),weight ); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta>0. && ele2_scEta>0. ){ + ZmassMC["EBp"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EBp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta<0. && ele2_scEta<0. ){ + ZmassMC["EBm"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EBm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + if((ele1_seedZside== 1) && (ele2_seedZside == 1)){ + ZmassMC["EEp"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EEp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + else if((ele1_seedZside== -1) && (ele2_seedZside == -1)){ + ZmassMC["EEm"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EEm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + if((ele1_seedZside!=0) && (ele2_seedZside !=0) && ele1_e3x3/ele1_scERaw>0.94 && ele2_e3x3/ele2_scERaw>0.94){ + ZmassMC["EE_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + else if((ele1_seedZside!=0) && (ele2_seedZside !=0) && ele1_e3x3/ele1_scERaw<0.94 && ele2_e3x3/ele2_scERaw<0.94){ + ZmassMC["EE_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + if((ele1_seedZside==0) && (ele2_seedZside ==0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ + ZmassMC["EB_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + else if((ele1_seedZside==0) && (ele2_seedZside==0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ + ZmassMC["EB_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)<1. && fabs(ele2_scEta)<1. ){ + ZmassMC["EB_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)>1. && fabs(ele2_scEta)>1. ){ + ZmassMC["EB_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EB_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)<2. && fabs(ele2_scEta)<2. ){ + ZmassMC["EE_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + else if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)>2. && fabs(ele2_scEta)>2. ){ + ZmassMC["EE_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EE_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + + } + + //*** Loop over Data **// + int nEntriesDATA = treeDATA -> GetEntries(); + std::cout <<" Fill with DATA Events "< GetEntry(iEntry); + //only the Z + if (isZ != 1) continue; + + if( (ele1_seedZside== 0) && (ele2_seedZside== 0) ){ + ZmassDATA["EB-EB"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB) ); + ZmassDATA_regression["EB-EB"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE))* sqrt(scaleEB*scaleEB)); + } + else if( fabs(ele1_seedZside)== 1 && fabs(ele2_seedZside)== 1 ){ + ZmassDATA["EE-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE) ); + ZmassDATA_regression["EE-EE"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE) ); + + } + else{ + ZmassDATA["EB-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEE) ); + ZmassDATA_regression["EB-EE"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEE) ); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta>0. && ele2_scEta>0. ){ + ZmassDATA["EBp"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EBp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta<0. && ele2_scEta<0. ){ + ZmassDATA["EBm"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EBm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + if((ele1_seedZside== 1) && (ele2_seedZside == 1)){ + ZmassDATA["EEp"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EEp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + +else if((ele1_seedZside== -1) && (ele2_seedZside == -1)){ + ZmassDATA["EEm"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EEm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); +} + + + if((ele1_seedZside!=0) && (ele2_seedZside !=0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ + ZmassDATA["EE_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + + else if((ele1_seedZside!=0) && (ele2_seedZside !=0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ + ZmassDATA["EE_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + + if((ele1_seedZside==0) && (ele2_seedZside ==0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ + ZmassDATA["EB_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EB_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + else if((ele1_seedZside==0) && (ele2_seedZside==0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ + ZmassDATA["EB_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EB_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)<1. && fabs(ele2_scEta)<1. ){ + ZmassDATA["EB_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB) ); + ZmassDATA_regression["EB_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)>1. && fabs(ele2_scEta)>1. ){ + ZmassDATA["EB_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EB_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)<2. && fabs(ele2_scEta)<2. ){ + ZmassDATA["EE_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + else if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)>2. && fabs(ele2_scEta)>2. ){ + ZmassDATA["EE_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + + + } + + /// Z Lineshape Tool +if(useMC){ + + std::string energyType = "NoReg"; + + std::ofstream outTableFile (outputTable.c_str(),std::ios::out); + + outTableFile<<"\\begin{table}[!htb]"< extremeDATA = breitWigner_crystalBallLowFWHM(ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg"), mZ_Min,mZ_Max); + + double sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + std::pair extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg"),mZ_Min,mZ_Max); + + double sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB-EB_Reg")->GetParError(3)<<" &"<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EBp_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EBp_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EBm_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EBm_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3)) <<" \\\\ "< DATA and MC Regression"<GetFunction("bw_cb_DATA_EB_R9_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EB_R9_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3)) <<" \\\\ "< 1 DATA and MC Regression "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE-EE_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE-EE_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EEp_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EEp_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EEm_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EEm_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3)) <<" \\\\ "< DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_R9_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE_R9_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3)) <<" \\\\ "< 2 DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3)) <<" \\\\ "< extremeDATA = breitWigner_crystalBallLowFWHM(ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg"),mZ_Min,mZ_Max); + + double sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EBp_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EBm_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" \\\\ "< DATA and MC Regression"<GetFunction("bw_cb_DATA_EB_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EB_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" \\\\ "< 1 DATA Regression "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE-EE_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EEp_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EEm_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" \\\\ "< DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" \\\\ "< 2 DATA Regression "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" \\\\ "<Write(); + ZmassDATA["EB-EE"]->Write(); + ZmassDATA["EE-EE"]->Write(); + ZmassDATA["EBp"]->Write(); + ZmassDATA["EB_R9_g"]->Write(); + ZmassDATA["EB_R9_l"]->Write(); + ZmassDATA["EEp"]->Write(); + ZmassDATA["EEm"]->Write(); + ZmassDATA["EE_R9_g"]->Write(); + ZmassDATA["EE_R9_l"]->Write(); + ZmassDATA["EB-EE"]->Write(); + + ZmassMC["EB-EB"]->Write(); + ZmassMC["EB-EE"]->Write(); + ZmassMC["EE-EE"]->Write(); + ZmassMC["EBp"]->Write(); + ZmassMC["EB_R9_g"]->Write(); + ZmassMC["EB_R9_l"]->Write(); + ZmassMC["EEp"]->Write(); + ZmassMC["EEm"]->Write(); + ZmassMC["EE_R9_g"]->Write(); + ZmassMC["EE_R9_l"]->Write(); + ZmassMC["EB-EE"]->Write(); + + ZmassDATA_regression["EB-EB"]->Write(); + ZmassDATA_regression["EB-EE"]->Write(); + ZmassDATA_regression["EE-EE"]->Write(); + + ZmassMC_regression["EB-EB"]->Write(); + ZmassMC_regression["EB-EE"]->Write(); + ZmassMC_regression["EE-EE"]->Write(); + + outputTFile -> Close(); + + return 0; +} diff --git a/EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py b/EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py new file mode 100644 index 00000000000..a992cae30db --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py @@ -0,0 +1,17 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("AddRegressionWeight") + +process.Options = cms.PSet( + + inputFile = cms.string("../WZAnalysis_DATA.root"), + treeNameDATA = cms.string("simpleNtupleEoverP/ntu"), + UseMethodFlag = cms.string("BDTG"), + FilemethodXMLEBE = cms.string("weight_EB_BDTG_E_W/TMVARegression_BDTG.weights.xml"), + FilemethodXMLEBP = cms.string("weight_EB_BDTG_P_W/TMVARegression_BDTG.weights.xml"), + FilemethodXMLEEE = cms.string("weight_EE_BDTG_E_W/TMVARegression_BDTG.weights.xml"), + FilemethodXMLEEP = cms.string("weight_EE_BDTG_P_W/TMVARegression_BDTG.weights.xml"), + RegionOfTraining = cms.string("EE"), + useW = cms.bool(True), + isMC = cms.bool(False) +) \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/Barrel.cfg b/EOverPCalibration/FastCalibrator/cfg/Barrel.cfg new file mode 100644 index 00000000000..3e88c2343ca --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/Barrel.cfg @@ -0,0 +1,50 @@ +#@@@@@@@@@@ ON LSF FOR ECAL EB @@@@@@@@@ +##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ +#ls -lrth cfg/cfg_lunch/ | grep -v ~ | grep -v EE | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorWeight.exe cfg/job_sh/"$9}' +##### Generate .sh on LSF +# cd CMSSW_4_2.... +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | grep -v EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh +##### Run Job on LSF +#ls -lrth cfg/job_sh/ | grep DATA | grep -v EE | awk '{print "bsub -cwd ./LSF -q 1nd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' +#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' + + +#@@@@@@@@@@ ON LSF FOR ECAL EE @@@@@@@@@ +##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ +#ls -lrth cfg/cfg_lunch/ | grep -v ~ | grep EE | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorEE.exe cfg/job_sh/"$9}' +##### Generate .sh on LSF +# cd CMSSW_4_2.... +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | grep EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorEE.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | grep EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorEE.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh +##### Run Job on LSF +#ls -lrth cfg/job_sh/ | grep DATA | grep EE | awk '{print "bsub -cwd ./LSF -q 1nd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' +#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' + + +[Input] +#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root +#inputFile= /data1/rgerosa/NTUPLES_FINAL_CALIB/MC/WJetsToLNu_DYJetsToLL_7TeV-madgraph-tauola_Fall11_All.root + +inputList = cfg/list.txt + +inputFileDeadXtal= + +inputTree = ntu +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = false +isMCTruth = true + +[Output] +outputFile = WJetsToLNu_DYJetsToLL_7TeV-madgraph-tauola_Fall11_Etrue + +[Options] +numberOfEvents = 100 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 2 \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg b/EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg new file mode 100644 index 00000000000..87a53d10c32 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg @@ -0,0 +1,32 @@ +[Input] + +inputList = cfg/DeadXtalEBFile_noSkip_split.txt +inputStandardMap = output/Aug28_22JanReReco_RunABCD_standard/FastCalibrator_Aug28_22JanReReco_RunABCD_0_WZ_noEP_EB.root + +DeadChannelMapName = h_map_Dead_Channels +ICMapName = h_scale_EB + +isDeadTriggerTower = false + +EtaBinCenterDeadTT = 78, 46, 18, -12, -34, -60, -72 +NPhiShift = 14 +PhiOffset = 4 + + +IPhiWindow = 3 +IEtaWindow = 3 + +icMapRatio = false + +iEtaBinDivision = 0, 12, 24, 36, 45, 55, 65, 75, 85 +#iEtaBinDivision = 0, 20, 40, 60, 85 +iPhiBinDivision = 0, 45, 90, 135, 180, 225, 270, 315, 360 +#iPhiBinDivision = 0, 180, 360 +NPhiSMBinDivision = 5 + + +[Output] + +outputCanvasPlot = output/outDeadXtalPlots/ + + diff --git a/EOverPCalibration/FastCalibrator/cfg/Endcap.cfg b/EOverPCalibration/FastCalibrator/cfg/Endcap.cfg new file mode 100644 index 00000000000..c58b9d32cc7 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/Endcap.cfg @@ -0,0 +1,25 @@ +[Input] +#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root +#inputFile=/data1/rgerosa/NTUPLES_FINAL_CALIB/MC/WJetsToLNu_TuneZ2_7TeV-madgraph-tauola_Fall11_All.root + +inputList = cfg/list.txt + +inputFileDeadXtal= + +inputTree = ntu +isMiscalib = true +isSaveEPDistribution = false +isEPselection = false +isR9selection = true +isfbrem = false +isMCTruth = false + +[Output] +outputFile = WJetsToLNu_7TeV-madgraph-tauola_Fall11 + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 1 +nLoops = 25 diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py new file mode 100644 index 00000000000..01bd9a57822 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py @@ -0,0 +1,34 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEBparameters") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), + # inputFileDeadXtal = cms.string() + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("/gwteray/users/brianza/scalibMap2.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(0), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py new file mode 100644 index 00000000000..c44930860ae --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py @@ -0,0 +1,34 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEBparameters") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), + # inputFileDeadXtal = cms.string() + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("/gwteray/users/brianza/scalibMap2.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(1), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py new file mode 100644 index 00000000000..f41cde327a9 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py @@ -0,0 +1,35 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEEoptimization") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), +# inputFileDeadXtal = cms.string(), + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("scalibMapEE_eta_straweak.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD_EE"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(0), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) + diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py new file mode 100644 index 00000000000..1ed47d11848 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py @@ -0,0 +1,35 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEEparameters") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), +# inputFileDeadXtal = cms.string(), + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("scalibMapEE_eta_straweak.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD_EE"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(1), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) + diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg new file mode 100644 index 00000000000..f3ab2846c3f --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg @@ -0,0 +1,37 @@ +[Input] + +inputList = INPUTLIST +inputTree = INPUTTREE +jsonFileName = JSONFILENAME +inputFileDeadXtal = INPUTFILEDEADXTAL + +isMiscalib = MISCALIB +isSaveEPDistribution = EOVERP +isMCTruth = MCTRUTH +isEPselection = EPSELECTION +isPtCut = PTCUT +PtMin = PTMIN +isfbrem = ISFBREM +fbremMax = FBREMMAX +isR9selection = R9CUT +R9Min = R9MIN + +inputMomentumScale = INPUTMOMENTUMSCALE + +typeEB = TYPEEB +typeEE = TYPEEE + + +[Output] + +outputPath = OUTPUTPATH +outputFile = OUTPUTFILE + + +[Options] + +numberOfEvents = NUMEVENTS +useZ = USEZ +useW = USEW +splitStat = SPLIT +nLoops = LOOPS diff --git a/EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg b/EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg new file mode 100644 index 00000000000..1b140ebca73 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg @@ -0,0 +1,33 @@ +[Input] + +inputFileList = cfg/MVATraining.txt + +treeNameDATA = ntu + +UseMethodName = PDERS ,\ + PDEFoam ,\ + KNN ,\ + LD ,\ + FDA_GA ,\ + FDA_MC ,\ + FDA_MT ,\ + FDA_GAMT ,\ + MLP ,\ + SVM ,\ + BDT ,\ + BDTG + + +#UseMethodFlag = LD +#UseMethodFlag = MLP +UseMethodFlag = BDT +#UseMethodFlag = BDTG + + +RegionOfTraining = EB + +[Output] + +#outputFileName = TMVA/TMVARegEB_LD_Z.root +#outputFileName = TMVA/TMVARegEB_MLP_multitarget.root +outputFileName = TMVA/TMVAReg_BDT_EB_P_W.root \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg b/EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg new file mode 100644 index 00000000000..cf5b10d8565 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg @@ -0,0 +1,61 @@ +[Input] + +EtaBinCenterDeadXtal = 78, 46, 18, -12, -34, -60, -72 +PhiStartDeadXtal = 4 +PhiStepDeadXtal = 15 +PhiNShiftDeadXtal = 3 + +isDeadTriggerTower = true + +IxEEPBinCenterDeadXtal = 10, 20, 30, 40 +IyEEPBinCenterDeadXtal = 10, 20, 30, 40 +IxEEMBinCenterDeadXtal = 10, 20, 30, 40 +IyEEMBinCenterDeadXtal = 10, 20, 30, 40 + +iXStepDeadXtal = 1 +iXNShiftDeadXtal = 3 +iYStepDeadXtal = 1 +iYNShiftDeadXtal = 3 + + +OutputDeadXtalPath = cfg/DeadXTalList/ +OutputDeadXtalFile = DeadXtalFile +inputCfgTemplate = cfg/FastCalibrator_Template.cfg + +inputList = cfg/list.txt +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +jsonFileName = json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt + + +isMiscalib = false +isSaveEPDistribution = false +isMCTruth = false +isEPselection = false +isPtCut = false +PtMin = 0. +isfbrem = false +fbremMax = 100. +isR9selection = false +R9Min = -1. + +inputMomentumScale = output/MomentumCalibration2012 + +typeEB = eta1 +typeEE = eta1 + + + + +[Output] + +outputPath = output/Aug28_22JanReReco_RunABCD_DeadTT/ +outputFile = FastCalibrator_Aug28_22JanReReco_RunABCD +OutputCfgPath = cfg/JOB/ + +[Options] + +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 18 diff --git a/EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py b/EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py new file mode 100644 index 00000000000..baca0629328 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEBparameters") + +process.Options = cms.PSet( + + Inputfile1 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), + Inputfile2 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), + Inputfile3 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), + evalStat = cms.int32(1), + isMC = cms.bool(false), + fileType = cms.string("png"), + dirName = cms.string("."), + printPlots = cms.bool(false) + +) diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg new file mode 100644 index 00000000000..d5e79b76fae --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg @@ -0,0 +1,33 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = false +R9Min = -1. +isMCTruth = false + + + +[Output] +outputFile = output/Test + + + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg new file mode 100644 index 00000000000..46d6d2e15da --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg @@ -0,0 +1,33 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = false +R9Min = -1. +isMCTruth = false + + + +[Output] +outputFile = output/AlphaEB_CalDic_2012 + + + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 1 +nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg new file mode 100644 index 00000000000..e568e7e08b7 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg @@ -0,0 +1,31 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = true +R9Min = -1. +isMCTruth = false +isfbrem = false + + +[Output] +outputFile = output/AlphaEE_CalDic_2012 + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg new file mode 100644 index 00000000000..0162f755076 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg @@ -0,0 +1,34 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = true +isfbrem = false +R9Min = -1. +isMCTruth = false + + + +[Output] +outputFile = output/AlphaEE_CalDic_2012 + + + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 1 +nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg b/EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg new file mode 100644 index 00000000000..4591570a722 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg @@ -0,0 +1,49 @@ +[Input] + +treeNameDATA = simpleNtupleEoverP/SimpleNtupleEoverP + +treeNameMC = simpleNtupleEoverP/SimpleNtupleEoverP + +inputDataFile = cfg/ZFitInputDATA/rerecoICHEP2012.txt + +inputMCFile = cfg/listMC2012.txt + +WeightforMC = CommonTools/weights/PUweights_DYJetsToLL_Summer12_S6_new.root + +useMC = true + +FitCategories = EB-EB, \ + EB-EE, \ + EE-EE, \ + EBp, \ + EBm, \ + EB_R9_g, \ + EB_R9_l, \ + EB_Eta_g, \ + EB_Eta_l, \ + EEp, \ + EEm, \ + EE_R9_g, \ + EE_R9_l, \ + EE_Eta_g, \ + EE_Eta_l + +[Option] + +nbinZ = 150 + +mZMax = 115 + +mZMin = 65 + +scaleEB = 1 + +scaleEE = 1 + +nPoints = 4000 + +[Output] + +outputFile = output/outputZLineshape.root + +outputFileTable = output/1.txt \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py b/EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py new file mode 100644 index 00000000000..710e5f6f530 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("calibrationMomentumparameters") + +process.Options = cms.PSet( + + TreeName = cms.string("selected"), + infileDATA = cms.string("cfg/listDATA_momentumCalibration.txt"), + infileMC = cms.string("cfg/listMC2012_momentumCalibration.txt"), + WeightforMC = cms.string("CommonTools/PUweights_DYJetsToLL_Summer12_Prompt_TrueNumInteractions.root"), + usePUweights = cms.bool(false), + nPhiBinsEB = cms.int32(360), + nPhiBinsEE = cms.int32(360), + nEtaBinsEB = cms.int32(1), + nEtaBinsEE = cms.int32(1), + nPhiBinsTempEB = cms.int32(1), + nPhiBinsTempEE = cms.int32(1), + rebinEB = cms.int32(10), + rebinEE = cms.int32(20), + outputFile = cms.string("output/MomentumCalibration2012.root") + +) + diff --git a/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py b/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py new file mode 100644 index 00000000000..2c0c02cecce --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py @@ -0,0 +1,22 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("calibrationPlotsEBparameters") + +process.Options = cms.PSet( + + inFileName = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameEven = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameOdd = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_odd.root"), + nEtaBinsEB = cms.int32(1), + nEtaBinsEE = cms.int32(1), + is2012Calib = cms.bool(True), + isEB = cms.bool(True), + evalStat = cms.int32(1), + outputFolder = cms.string("output/"), + outFileName = cms.string("calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"), + outputTxt = cms.string("IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"), + fileType = cms.string("cxx") + +) + + diff --git a/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py b/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py new file mode 100644 index 00000000000..f1bc13a2ad2 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py @@ -0,0 +1,22 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("calibrationPlotsEEparameters") + +process.Options = cms.PSet( + + inFileName = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameEven = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameOdd = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_odd.root"), + nEtaBinsEB = cms.int32(1), + nEtaBinsEE = cms.int32(1), + is2012Calib = cms.bool(True), + isEB = cms.bool(False), + evalStat = cms.int32(1), + outputFolder = cms.string("output/"), + outFileName = cms.string("calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"), + outputTxt = cms.string("IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"), + fileType = cms.string("cxx") + +) + + diff --git a/EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py b/EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py new file mode 100644 index 00000000000..354a973034b --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("comparisonEBparameters") + +process.Options = cms.PSet( + + inputFile = cms.string("/data1/rgerosa/L3_Weight/MC_WJets/noEP_Z/WZAnalysis_SingleEle_WJetsToLNu_Z_noEP_miscalib.root"), + fileMCTruth = cms.string("output/MCtruthIC.root"), + fileMCRecoIC = cms.string("output/MCRecoIC.root"), + fileStatPrecision = cms.string("output/StatPrec.root") +) + diff --git a/EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py b/EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py new file mode 100644 index 00000000000..089fa2c1300 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py @@ -0,0 +1,13 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("comparisonEEparameters") + +process.Options = cms.PSet( + + inputFile = cms.string("/data1/rgerosa/L3_Weight/MC_WJets/EE_recoFlag/WJetsToLNu_7TeV-madgraph-tauola_Fall11_Z_R9_miscalib_EE.root"), + fileMCTruth = cms.string("output/MCtruthIC_EE.root"), + fileMCRecoIC = cms.string("output/MCRecoIC_EE.root"), + fileStatPrecision = cms.string("output/StatPrec_MC_R9.root"), + outputFile = cms.string("output/ResidualForSystematic_EE_MC.root") + ) + diff --git a/EOverPCalibration/FastCalibrator/cfg/list.txt b/EOverPCalibration/FastCalibrator/cfg/list.txt new file mode 100644 index 00000000000..ae80f89101b --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/list.txt @@ -0,0 +1,5 @@ +/afs/cern.ch/user/l/lbrianza/work/public/RUND_DoubleElectron.root +#/gwteray/users/brianza/ntuple.root +#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012A_22Jan2013-v1.root +#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012B_22Jan2013-v1.root +#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012D_22Jan2013-v1.root diff --git a/EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt b/EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt new file mode 100644 index 00000000000..134a62475a9 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt @@ -0,0 +1,5 @@ +##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/DoubleElectron_Run2011AB-29Jun2012.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012A-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012B-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v2.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v3.root diff --git a/EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt b/EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt new file mode 100644 index 00000000000..485a82a821d --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt @@ -0,0 +1,6 @@ +##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/MC/DYJets-Summer12.root +##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/DoubleElectron_Run2011AB-29Jun2012.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012A-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012B-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v2.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v3.root diff --git a/EOverPCalibration/FastCalibrator/cfg/test.cfg b/EOverPCalibration/FastCalibrator/cfg/test.cfg new file mode 100644 index 00000000000..34d9ace23e7 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/cfg/test.cfg @@ -0,0 +1,34 @@ +#@@@@@@@@@@ ON LSF @@@@@@@@@ +##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ +#ls -lrth cfg/cfg_lunch/ | grep -v ~ | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorWeight.exe cfg/job_sh/"$9}' +##### Generate .sh on LSF +# cd CMSSW_4_2.... +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh +##### Run Job on LSF +#ls -lrth cfg/job_sh/ | grep DATA | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' +#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' + + +[Input] +#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root +#inputFile = /gwteraz/users/govoni/WJetsToLNu_TuneZ2_tTeV_madgraph-tauola_Fall11.root +inputFile = /data2/calibrator/NTUPLES/Run2011B/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011B-WElectron-PromptSkim_recHitFlag/WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim.root +inputFileDeadXtal= + +inputTree = ntu +isMiscalib = false +isSaveEPDistribution = true +isEPselection = false +isR9selection = false + +[Output] +outputFile = WZAnalysis_Occupancy_recoFlag + +[Options] +numberOfEvents = -1 +useZ = 0 +useW = 1 +splitStat = 0 +nLoops = 2 diff --git a/EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h b/EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h new file mode 100644 index 00000000000..cdf3860bb16 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h @@ -0,0 +1,102 @@ +#ifndef CalibrationUtils_h +#define CalibrationUtils_h + +#include +#include +#include +#include + +#include "TFile.h" +#include "TChain.h" +#include "TCanvas.h" +#include "TPaveStats.h" +#include "TH1F.h" +#include "TF1.h" +#include "TRandom3.h" +#include "TGraphErrors.h" +#include "TH2F.h" +#include "TEndcapRings.h" +#include "geometryUtils.h" + + +//############## ECAL BARREL #################### + +/// Check if the crystal is near to a dead one +bool CheckxtalIC_EB (TH2F* h_scale_EB,int iPhi, int iEta ); + +/// Check if the crystal is near to a dead TT +bool CheckxtalTT_EB (int iPhi, int iEta, const std::vector >& TT_centre ); + +/// Initialize TT dead map +void InitializeDeadTT_EB(std::vector >& TT_centre); + +void InitializeDeadTT_EB2012(std::vector >& TT_centre); + + +/// Normalize IC vs ring EB +void NormalizeIC_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); + +/// Normalize IC vs LMR EB +void NormalizeIC_LMR_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); + +/// Normalize IC vs SM EB +void NormalizeIC_SM_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); + +/// Book spread Histos +void BookSpreadHistos_EB(TH1F* h_spread, std::vector& h_spread_vsEtaFold, TGraphErrors* g_spread_vsEtaFold, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + TH2F* hcmap, TH2F* hcmap2 = NULL); + +/// Phi Projection EB +void PhiProfile(TH1F* h_phiAvgICSpread, TGraphErrors* g_avgIC_vsPhi, const int& phiRegionWidth, + TH2F* hcmap, TEndcapRings* eRings = NULL); + +void PhiFoldProfile_EB(TGraphErrors* g_avgIC_vsPhiFold_EBM, TGraphErrors* g_avgIC_vsPhiFold_EBP, const int& phiRegionWidth, + TH2F* hcmap); + +/// Residual Spread +void ResidualSpread (TGraphErrors *statprecision, TGraphErrors *Spread, TGraphErrors *Residual); + +//################# ECAL ENDCAPS ##################### + +/// check if the xtal is near to a dead one +bool CheckxtalIC_EE(TH2F* h_scale_EE,int ix, int iy, int ir); + +/// check if the xtal is neat to a dead TT +bool CheckxtalTT_EE(int ix, int iy, int ir,const std::vector >& TT_centre ); + +/// Map dead TT EE+ +void InitializeDeadTTEEP(std::vector >& TT_centre); + +void InitializeDeadTTEEP2012(std::vector >& TT_centre); + +/// Map dead TT EE- +void InitializeDeadTTEEM(std::vector >& TT_centre); + +void InitializeDeadTTEEM2012(std::vector >& TT_centre); + +/// Normalize in function of ring +void NormalizeIC_EE(TH2F* h_scale_EEM, TH2F* h_scale_EEP, TH2F* hcmap_EEM, TH2F* hcmap_EEP, const std::vector< std::pair > & TT_centre_EEM, const std::vector< std::pair > & TT_centre_EEP, TEndcapRings *eRings, bool skip = true); + +/// Book spread Histos +void BookSpreadHistos_EE(std::map& h_spread, std::map >& h_spread_vsEtaFold, std::map& g_spread_vsEtaFold, + TEndcapRings* eRings, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + std::map& hcmap, std::map& hcmap2); + +/// Book spread stat Histos +void BookSpreadStatHistos_EE(TH2F** hcmap2,TH2F** hcmap3, TH1F ***hstatprecision, TH1F **hstatprecisionAll, TEndcapRings *eRings); + +/// Phi Projection EB +void PhiProfileEE(TGraphErrors *phiProjection, TGraphErrors **MomentumScale, TH2F* hcmap,TEndcapRings *eRings, const int & iz); + + + + +int GetNRegionsEB(const std::string& type); +int templIndexEB(const std::string& type, const float& eta, const float& charge, const float& R9); + +int GetNRegionsEE(const std::string& type); +int templIndexEE(const std::string& type, const float& eta, const float& charge, const float& R9); + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/DrawingUtils.h b/EOverPCalibration/FastCalibrator/interface/DrawingUtils.h new file mode 100644 index 00000000000..5427509027c --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/DrawingUtils.h @@ -0,0 +1,46 @@ +#ifndef DrawingUtils_h +#define DrawingUtils_h + +#include +#include + +#include "TFile.h" +#include "TCanvas.h" +#include "TH1F.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TF1.h" +#include "TLegend.h" +#include "TLatex.h" +#include "TColor.h" + + + +void SetLabelAndTitle(TGraphErrors* h); +void SetLabelAndTitle(TH1F* h); +void SetLabelAndTitle(TH2F* h2); + + + +void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileType, const bool& isEB = true); + + + +void DrawSpreadHisto(TH1F* h, const std::string& fileName, const std::string& funcName, const std::string& fileType, const bool& isEB); + +void DrawSpreadGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB, + TGraphErrors* g_stat); + + + +void DrawPhiAvgICSpread(TH1F* h, const std::string& fileName, const std::string& fileType, const bool& isEB); + +void DrawAvgICVsPhiGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const Color_t& color, const bool& isEB); + +void DrawAvgICVsPhiFoldGraph(TGraphErrors* g, TGraphErrors* g2, const std::string& fileName, const std::string& fileType, const bool& isEB); + + + +void DrawResidualGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB); + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h new file mode 100644 index 00000000000..14f6f7d099e --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h @@ -0,0 +1,219 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEB_h +#define FastCalibratorEB_h + +#include +#include +#include +#include +#include +#include +#include +#include "EOverPCalibration/NtuplePackage/interface/hChain.h" +#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "../../NtuplePackage/interface/readJSONFile.h" + +class FastCalibratorEB { + + public : + + ///! List of class methods + + FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution="NULL"); + + virtual ~FastCalibratorEB(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void FillScalibMap (TString miscalibMap); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,float,bool,float,bool,std::map > >, float, TString); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool,float,bool,float,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal, const bool & isDeadTriggerTower = false); + + virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); + + + // Public Variables + + std::vector myMomentumScale; + std::string myTypeEB; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + + Int_t runNumber; + Int_t lumiBlock; + Int_t eventNumber; + Int_t isW; + Int_t isZ; + + Int_t chargeEle[2]; + Float_t etaEle[2]; + Float_t PtEle[2]; + Float_t phiEle[2]; + Float_t rawEnergySCEle[2]; + Float_t energySCEle[2]; + Float_t etaSCEle[2]; + Float_t esEnergySCEle[2]; + Float_t e3x3SCEle[2]; + Float_t pAtVtxGsfEle[2]; + Float_t fbremEle[2]; + Int_t isEBEle[2]; + Float_t energyMCEle[2]; + Float_t etaMCEle[2]; + Float_t phiMCEle[2]; + + + ///! Ele 1 variables + + std::vector *energyRecHitSCEle1; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle1; //ETA + std::vector *YRecHitSCEle1; //PHI + std::vector *ZRecHitSCEle1; + std::vector *recoFlagRecHitSCEle1; + + Int_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_pt; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Int_t ele1_isEB; + Float_t ele1_E_true; + Float_t ele1_DR; + + ///! Ele 2 variables + + std::vector *energyRecHitSCEle2; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle2; //ETA + std::vector *YRecHitSCEle2; //PHI + std::vector *ZRecHitSCEle2; + std::vector *recoFlagRecHitSCEle2; + + Int_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_pt; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Int_t ele2_isEB; + Float_t ele2_E_true; + Float_t ele2_DR; + + ///! List of input branches from ntu + + TBranch *b_runNumber; //! + TBranch *b_lumiBlock; //! + TBranch *b_eventNumber; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_chargeEle; + TBranch *b_etaEle; + TBranch *b_PtEle; + TBranch *b_phiEle; + TBranch *b_rawEnergySCEle; + TBranch *b_energySCEle; + TBranch *b_etaSCEle; + TBranch *b_esEnergySCEle; + TBranch *b_e3x3SCEle; + TBranch *b_pAtVtxGsfEle; + TBranch *b_fbremEle; + TBranch *b_isEBEle; + TBranch *b_energyMCEle; + TBranch *b_etaMCEle; + TBranch *b_phiMCEle; + + TBranch *b_energyRecHitSCEle1; //! + TBranch *b_XRecHitSCEle1; + TBranch *b_YRecHitSCEle1; + TBranch *b_ZRecHitSCEle1; + TBranch *b_recoFlagRecHitSCEle1; + + TBranch *b_energyRecHitSCEle2; //! + TBranch *b_XRecHitSCEle2; + TBranch *b_YRecHitSCEle2; + TBranch *b_ZRecHitSCEle2; + TBranch *b_recoFlagRecHitSCEle2; + + + + ///! Output information + + std::vector IetaValues; + std::vector IphiValues; + std::vector ICValues; + std::vector meanICforPhiRingValues; + std::vector DeadXtal_HashedIndex; + + + hChain *hC_EoP_eta_ele; + hChain *hC_IntercalibValues; + hChain *hC_EoP; + hChain *hC_PullFromScalib; + h2Chain *hC_scale_EB; + TH1F *h_Occupancy_hashedIndex; + TH2F *h_occupancy; + TProfile *p_IntercalibValues_iEta; + TH2F *h_scalib_EB; + TH2F *h_scale_EB; + TH2F *h_scale_EB_meanOnPhi; + TH1F *h_scale_EB_hashedIndex; + TH1F *h_IntercalibSpread_iEta; + TH1F *h_IntercalibValues_test; + TH1F *h_Init_IntercalibValues; + + + TH2F *h_map_Dead_Channels ; + + TGraphErrors *g_ICmeanVsLoop; + TGraphErrors *g_ICrmsVsLoop; + + std::map scalibMap; + + private: + + TString outEPDistribution_p; + +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h new file mode 100644 index 00000000000..c1a9c1ecba4 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h @@ -0,0 +1,243 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEB_MVA_h +#define FastCalibratorEB_MVA_h + +#include +#include +#include +#include +#include +#include +#include "EOverPCalibration/NtuplePackage/interface/hChain.h" +#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + + +class FastCalibratorEB_MVA { + public : + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + + Int_t runId; + Int_t lumiId; + Int_t isW; + Int_t isZ; + + //! Declaration of regression weights + + Double_t BDTG_weightEB_W_1 ; + Double_t BDTG_weightEB_W_2 ; + Double_t BDTG_weightEB_Z_1 ; + Double_t BDTG_weightEB_Z_2 ; + + TBranch *b_BDTG_weightEB_W_1; + TBranch *b_BDTG_weightEB_W_2; + TBranch *b_BDTG_weightEB_Z_1; + TBranch *b_BDTG_weightEB_Z_2; + + ///! Ele 1 variables + + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_flag; + + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + +// Float_t ele1_charge; + + ///! Ele 2 variables + + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_flag; + + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + +// Float_t ele2_charge; + + ///! List of input branches from ntu + + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_hashedIndex; + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_flag; + TBranch *b_ele1_scERaw_PUcleaned; + TBranch *b_ele1_scE_regression; + + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_scEta; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_charge; //! + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_flag; + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_scEta; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + TBranch *b_ele2_charge; //! + + TBranch *b_ele2_scERaw_PUcleaned; + TBranch *b_ele2_scE_regression; + + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + + ///! List of class methods + + FastCalibratorEB_MVA(TTree *tree=0, TString outEPDistribution="NULL"); + + virtual ~FastCalibratorEB_MVA(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t Cut(Long64_t entry); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,bool); + + virtual Bool_t Notify(); + + virtual void Show(Long64_t entry = -1); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,bool); + + virtual void BuildWeightDistribution_ele(int,int,int,int,std::vector,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); + + ///! Output information + + std::vector IetaValues; + std::vector IphiValues; + std::vector ICValues; + std::vector meanICforPhiRingValues; + std::vector DeadXtal_HashedIndex; + + + hChain *hC_EoP_eta_ele; + hChain *hC_IntercalibValues; + hChain *hC_EoP; + hChain *hC_PullFromScalib; + h2Chain *hC_scale_EB; + TH1F *h_Occupancy_hashedIndex; + TH2F *h_occupancy; + TProfile *p_IntercalibValues_iEta; + TH2F *h_scalib_EB; + TH2F *h_scale_EB; + TH2F *h_scale_EB_meanOnPhi; + TH1F *h_scale_EB_hashedIndex; + TH1F *h_IntercalibSpread_iEta; + TH1F *h_IntercalibValues_test; + TH1F *h_Init_IntercalibValues; + TH1F *h_WeigthEB_W_1; + TH1F *h_WeigthEB_W_2; + + + TH2F *h_map_Dead_Channels ; + + TGraphErrors *g_ICmeanVsLoop; + TGraphErrors *g_ICrmsVsLoop; + + private: + + TString outEPDistribution_p; + +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h new file mode 100644 index 00000000000..152c371fcd5 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h @@ -0,0 +1,258 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEE_h +#define FastCalibratorEE_h + +#include +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "../../NtuplePackage/interface/readJSONFile.h" +#include "../interface/TEndcapRings.h" + +class FastCalibratorEE{ + + public : + + ///! Class methods + FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution="NULL"); + + virtual ~FastCalibratorEE(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void FillScalibMap (TString miscalibMap); + + virtual void Loop(int, int, int, int, int, bool,bool,bool,bool,float,bool,float,bool,float,bool,std::map > >, float, TString); + virtual void BuildEoPeta_ele(int,int,int,int,std::vector ,bool,bool,float,bool,float,bool,float,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal, const bool & isDeadTriggerTower = false); + + virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); + + + std::vector myMomentumScale; + std::string myTypeEE; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + + ///! Declaration of leaf types + + Int_t runNumber; + Int_t lumiBlock; + Int_t eventNumber; + Int_t isW; + Int_t isZ; + + Int_t chargeEle[2]; + Float_t etaEle[2]; + Float_t PtEle[2]; + Float_t phiEle[2]; + Float_t rawEnergySCEle[2]; + Float_t energySCEle[2]; + Float_t etaSCEle[2]; + Float_t esEnergySCEle[2]; + Float_t e3x3SCEle[2]; + Float_t pAtVtxGsfEle[2]; + Float_t fbremEle[2]; + Int_t isEBEle[2]; + Float_t energyMCEle[2]; + Float_t etaMCEle[2]; + Float_t phiMCEle[2]; + + + ///! Ele 1 variables + + std::vector *energyRecHitSCEle1; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle1; + std::vector *YRecHitSCEle1; + std::vector *ZRecHitSCEle1; + std::vector *recoFlagRecHitSCEle1; + + Int_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_pt; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Int_t ele1_isEB; + Float_t ele1_E_true; + Float_t ele1_DR; + + ///! Ele 2 variables + + std::vector *energyRecHitSCEle2; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle2; + std::vector *YRecHitSCEle2; + std::vector *ZRecHitSCEle2; + std::vector *recoFlagRecHitSCEle2; + + Int_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_pt; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Int_t ele2_isEB; + Float_t ele2_E_true; + Float_t ele2_DR; + + + + + ///! List of input branches from ntu + + TBranch *b_runNumber; //! + TBranch *b_lumiBlock; //! + TBranch *b_eventNumber; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_chargeEle; + TBranch *b_etaEle; + TBranch *b_PtEle; + TBranch *b_phiEle; + TBranch *b_rawEnergySCEle; + TBranch *b_energySCEle; + TBranch *b_etaSCEle; + TBranch *b_esEnergySCEle; + TBranch *b_e3x3SCEle; + TBranch *b_pAtVtxGsfEle; + TBranch *b_fbremEle; + TBranch *b_isEBEle; + TBranch *b_energyMCEle; + TBranch *b_etaMCEle; + TBranch *b_phiMCEle; + + TBranch *b_energyRecHitSCEle1; //! + TBranch *b_XRecHitSCEle1; + TBranch *b_YRecHitSCEle1; + TBranch *b_ZRecHitSCEle1; + TBranch *b_recoFlagRecHitSCEle1; + + TBranch *b_energyRecHitSCEle2; //! + TBranch *b_XRecHitSCEle2; + TBranch *b_YRecHitSCEle2; + TBranch *b_ZRecHitSCEle2; + TBranch *b_recoFlagRecHitSCEle2; + + + /// Output informations + hChain *hC_EoP_ir_ele; + + TH1F *h_scale_hashedIndex_EE; + TH1F *h_occupancy_hashedIndex_EE; + hChain *hC_EoP; + + /// EE+ + hChain *hC_IntercalibValues_EEP; + hChain *hC_PullFromScalib_EEP; + h2Chain *hC_scale_EEP; + + + TH2F *h_occupancy_EEP; + TH2F *h_scale_EEP; + TH2F *h_scalib_EEP; + TH2F *h_scale_meanOnring_EEP; + + TGraphErrors *g_ICmeanVsLoop_EEP; + TGraphErrors *g_ICrmsVsLoop_EEP; + + std::vector IxValues_EEP; + std::vector IyValues_EEP; + std::vector ICValues_EEP; + + std::vector SumIC_Ring_EEP; + std::vector Sumxtal_Ring_EEP; + + + /// EE- + hChain *hC_IntercalibValues_EEM; + hChain *hC_PullFromScalib_EEM; + h2Chain *hC_scale_EEM; + + TH2F *h_occupancy_EEM; + TH2F *h_scale_EEM; + TH2F *h_scalib_EEM; + TH2F *h_scale_meanOnring_EEM; + + TGraphErrors *g_ICmeanVsLoop_EEM; + TGraphErrors *g_ICrmsVsLoop_EEM; + + std::vector IxValues_EEM; + std::vector IyValues_EEM; + std::vector ICValues_EEM; + + std::vector SumIC_Ring_EEM; + std::vector Sumxtal_Ring_EEM; + + /// Dead Channel infos + std::vector DeadXtal_HashedIndex; + + TH2F *h_map_Dead_Channels_EEP ; + TH2F *h_map_Dead_Channels_EEM ; + + std::map scalibMap; + + + private : + + TString outEPDistribution_p; + + /// Essential values to get EE geometry + TEndcapRings* eRings; + + static const int IX_MIN = 1; + static const int IY_MIN = 1; + static const int IX_MAX = 100; + static const int IY_MAX = 100; + static const int kEEhalf = 7324; + + static const int kxf[200]; + + static const int kdi[200]; +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h new file mode 100644 index 00000000000..0642d321349 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h @@ -0,0 +1,277 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEE_h +#define FastCalibratorEE_h + +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/TEndcapRings.h" + +class FastCalibratorEE_MVA { + public : + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + Int_t runId; + Int_t lumiId; + Int_t isW; + Int_t isZ; + + //! Declaration of regression weights + + Double_t BDTG_weightEE_W_1 ; + Double_t BDTG_weightEE_W_2 ; + Double_t BDTG_weightEE_Z_1 ; + Double_t BDTG_weightEE_Z_2 ; + + TBranch *b_BDTG_weightEE_W_1; + TBranch *b_BDTG_weightEE_W_2; + TBranch *b_BDTG_weightEE_Z_1; + TBranch *b_BDTG_weightEE_Z_2; + + ///! Ele1 Variables + + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_flag; + + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + + ///! Ele1 Variables + + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_flag; + + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + + + ///! List of input branches from ntu + + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_hashedIndex; //! + TBranch *b_ele1_recHit_flag; + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_scEta; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_scE_regression; + TBranch *b_ele1_scERaw_PUcleaned; + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; //! + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_flag; + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_scEta; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + TBranch *b_ele2_scE_regression; + TBranch *b_ele2_scERaw_PUcleaned; + + ///! Class methods + + FastCalibratorEE_MVA(TTree *tree=0, TString outEPDistribution="NULL"); + virtual ~FastCalibratorEE_MVA(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t Cut(Long64_t entry); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,bool,bool); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,bool,bool); + + virtual void BuildWeightDistribution_ele(int,int,int,int,std::vector,bool,bool); + + virtual Bool_t Notify(); + + virtual void Show(Long64_t entry = -1); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); + + /// Output informations + + hChain *hC_EoP_ir_ele; + + TH1F *h_scale_hashedIndex_EE; + TH1F *h_occupancy_hashedIndex_EE; + hChain *hC_EoP; + + TH1F *h_WeightEE_W_1; + TH1F *h_WeightEE_W_2; + + /// EE+ + + hChain *hC_IntercalibValues_EEP; + hChain *hC_PullFromScalib_EEP; + h2Chain *hC_scale_EEP; + + + TH2F *h_occupancy_EEP; + TH2F *h_scale_EEP; + TH2F *h_scalib_EEP; + TH2F *h_scale_meanOnring_EEP; + + TGraphErrors *g_ICmeanVsLoop_EEP; + TGraphErrors *g_ICrmsVsLoop_EEP; + + std::vector IxValues_EEP; + std::vector IyValues_EEP; + std::vector ICValues_EEP; + + std::vector SumIC_Ring_EEP; + std::vector Sumxtal_Ring_EEP; + + + /// EE- + + hChain *hC_IntercalibValues_EEM; + hChain *hC_PullFromScalib_EEM; + h2Chain *hC_scale_EEM; + + TH2F *h_occupancy_EEM; + TH2F *h_scale_EEM; + TH2F *h_scalib_EEM; + TH2F *h_scale_meanOnring_EEM; + + TGraphErrors *g_ICmeanVsLoop_EEM; + TGraphErrors *g_ICrmsVsLoop_EEM; + + std::vector IxValues_EEM; + std::vector IyValues_EEM; + std::vector ICValues_EEM; + + std::vector SumIC_Ring_EEM; + std::vector Sumxtal_Ring_EEM; + + /// Dead Channel infos + + std::vector DeadXtal_HashedIndex; + + TH2F *h_map_Dead_Channels_EEP ; + TH2F *h_map_Dead_Channels_EEM ; + + + + + + private : + + TString outEPDistribution_p; + + /// Essential values to get EE geometry + TEndcapRings* eRings; + static const int IX_MIN = 1; + static const int IY_MIN = 1; + static const int IX_MAX = 100; + static const int IY_MAX = 100; + static const int kEEhalf = 7324; + + static const int kxf[200]; + + static const int kdi[200]; +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h b/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h new file mode 100644 index 00000000000..a27733343f7 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h @@ -0,0 +1,22 @@ +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + + + +int GetHashedIndexEB(int iEta, int iPhi, int Zside); + +int GetIetaFromHashedIndex(int Index); + +int GetIphiFromHashedIndex(int Index); diff --git a/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h b/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h new file mode 100644 index 00000000000..94edb63c4d4 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +int GetHashedIndexEE(int, int, int); + +int GetIxFromHashedIndex(int); + +int GetIyFromHashedIndex(int); + +int GetZsideFromHashedIndex(int); + +// Essential values to get EE geometry +static const int IX_MIN = 1; +static const int IY_MIN = 1; +static const int IX_MAX = 100; +static const int IY_MAX = 100; +static const int kEEhalf = 7324; diff --git a/EOverPCalibration/FastCalibrator/interface/LinkDef.h b/EOverPCalibration/FastCalibrator/interface/LinkDef.h new file mode 100644 index 00000000000..93670cf4402 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/LinkDef.h @@ -0,0 +1,8 @@ +#ifndef ROOT_TREE_VECTOR_LINKDEFF_H +#define ROOT_TREE_VECTOR_LINKDEFF_H 1 + +#ifdef __CINT__ + +#endif + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list b/EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list new file mode 100644 index 00000000000..871eebe25a0 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list @@ -0,0 +1,1546 @@ +4 36 -1 +4 37 -1 +4 38 -1 +4 39 -1 +4 40 -1 +4 61 -1 +4 62 -1 +4 63 -1 +4 64 -1 +4 65 -1 +5 36 -1 +5 37 -1 +5 38 -1 +5 39 -1 +5 40 -1 +5 61 -1 +5 62 -1 +5 63 -1 +5 64 -1 +5 65 -1 +6 26 -1 +6 27 -1 +6 28 -1 +6 29 -1 +6 30 -1 +7 27 -1 +7 28 -1 +7 29 -1 +7 30 -1 +8 26 -1 +8 27 -1 +8 28 -1 +8 29 -1 +8 30 -1 +9 21 -1 +9 22 -1 +9 23 -1 +9 24 -1 +9 25 -1 +9 26 -1 +9 27 -1 +9 28 -1 +9 29 -1 +9 30 -1 +9 76 -1 +9 77 -1 +9 78 -1 +9 79 -1 +10 21 -1 +10 22 -1 +10 23 -1 +10 24 -1 +10 25 -1 +10 26 -1 +10 27 -1 +10 28 -1 +10 29 -1 +10 30 -1 +10 76 -1 +10 77 -1 +10 78 -1 +10 79 -1 +10 80 -1 +11 21 -1 +11 22 -1 +11 23 -1 +11 24 -1 +11 25 -1 +12 21 -1 +12 22 -1 +12 23 -1 +12 24 -1 +12 25 -1 +13 21 -1 +13 22 -1 +13 23 -1 +13 24 -1 +13 25 -1 +14 16 -1 +14 17 -1 +14 18 -1 +14 19 -1 +14 20 -1 +14 21 -1 +14 22 -1 +14 23 -1 +14 24 -1 +14 25 -1 +14 81 -1 +14 82 -1 +14 83 -1 +14 84 -1 +14 85 -1 +15 16 -1 +15 17 -1 +15 18 -1 +15 19 -1 +15 20 -1 +15 21 -1 +15 22 -1 +15 23 -1 +15 24 -1 +15 25 -1 +15 81 -1 +15 82 -1 +15 83 -1 +15 84 -1 +15 85 -1 +16 14 -1 +16 15 -1 +16 51 -1 +16 52 -1 +16 53 -1 +16 54 -1 +16 55 -1 +16 56 -1 +16 57 -1 +16 58 -1 +16 59 -1 +16 60 -1 +16 61 -1 +16 62 -1 +16 63 -1 +16 64 -1 +16 65 -1 +16 66 -1 +16 67 -1 +16 68 -1 +16 69 -1 +16 70 -1 +16 86 -1 +16 87 -1 +17 14 -1 +17 15 -1 +17 51 -1 +17 52 -1 +17 53 -1 +17 54 -1 +17 55 -1 +17 56 -1 +17 57 -1 +17 58 -1 +17 59 -1 +17 60 -1 +17 61 -1 +17 62 -1 +17 63 -1 +17 64 -1 +17 65 -1 +17 66 -1 +17 67 -1 +17 68 -1 +17 69 -1 +17 70 -1 +17 86 -1 +17 87 -1 +18 14 -1 +18 15 -1 +18 51 -1 +18 52 -1 +18 53 -1 +18 54 -1 +18 55 -1 +18 56 -1 +18 57 -1 +18 58 -1 +18 59 -1 +18 60 -1 +18 61 -1 +18 62 -1 +18 63 -1 +18 64 -1 +18 65 -1 +18 86 -1 +18 87 -1 +19 14 -1 +19 15 -1 +19 51 -1 +19 52 -1 +19 53 -1 +19 54 -1 +19 55 -1 +19 56 -1 +19 57 -1 +19 58 -1 +19 59 -1 +19 60 -1 +19 61 -1 +19 62 -1 +19 63 -1 +19 64 -1 +19 65 -1 +19 66 -1 +19 67 -1 +19 68 -1 +19 69 -1 +19 70 -1 +19 86 -1 +19 87 -1 +20 14 -1 +20 15 -1 +20 51 -1 +20 52 -1 +20 53 -1 +20 54 -1 +20 55 -1 +20 56 -1 +20 57 -1 +20 58 -1 +20 59 -1 +20 60 -1 +20 61 -1 +20 62 -1 +20 63 -1 +20 64 -1 +20 65 -1 +20 66 -1 +20 67 -1 +20 68 -1 +20 69 -1 +20 70 -1 +20 86 -1 +20 87 -1 +21 10 -1 +21 51 -1 +21 52 -1 +21 53 -1 +21 54 -1 +21 55 -1 +21 56 -1 +21 57 -1 +21 58 -1 +21 59 -1 +21 60 -1 +21 61 -1 +21 62 -1 +21 63 -1 +21 64 -1 +21 65 -1 +22 9 -1 +22 10 -1 +22 51 -1 +22 52 -1 +22 53 -1 +22 54 -1 +22 55 -1 +22 56 -1 +22 57 -1 +22 58 -1 +22 59 -1 +22 60 -1 +22 61 -1 +22 62 -1 +22 63 -1 +22 64 -1 +22 65 -1 +23 9 -1 +23 10 -1 +23 51 -1 +23 52 -1 +23 53 -1 +23 54 -1 +23 55 -1 +23 56 -1 +23 57 -1 +23 58 -1 +23 59 -1 +23 60 -1 +23 61 -1 +23 62 -1 +23 63 -1 +23 64 -1 +23 65 -1 +23 66 -1 +23 67 -1 +23 68 -1 +23 69 -1 +23 70 -1 +24 9 -1 +24 10 -1 +24 51 -1 +24 52 -1 +24 53 -1 +24 54 -1 +24 55 -1 +24 56 -1 +24 57 -1 +24 58 -1 +24 59 -1 +24 60 -1 +24 61 -1 +24 62 -1 +24 63 -1 +24 64 -1 +24 65 -1 +24 66 -1 +24 67 -1 +24 68 -1 +24 69 -1 +24 70 -1 +25 9 -1 +25 10 -1 +25 51 -1 +25 52 -1 +25 53 -1 +25 54 -1 +25 55 -1 +25 56 -1 +25 57 -1 +25 58 -1 +25 59 -1 +25 60 -1 +25 61 -1 +25 62 -1 +25 63 -1 +25 64 -1 +25 65 -1 +25 66 -1 +25 67 -1 +25 68 -1 +25 69 -1 +25 70 -1 +26 7 -1 +26 8 -1 +26 9 -1 +26 10 -1 +26 71 -1 +26 72 -1 +26 73 -1 +26 74 -1 +26 75 -1 +27 6 -1 +27 7 -1 +27 8 -1 +27 9 -1 +27 10 -1 +27 71 -1 +27 72 -1 +28 6 -1 +28 7 -1 +28 8 -1 +28 9 -1 +28 10 -1 +28 71 -1 +28 72 -1 +28 73 -1 +28 74 -1 +28 75 -1 +29 6 -1 +29 7 -1 +29 8 -1 +29 9 -1 +29 10 -1 +29 71 -1 +29 72 -1 +29 73 -1 +29 74 -1 +29 75 -1 +30 6 -1 +30 7 -1 +30 8 -1 +30 9 -1 +30 10 -1 +30 71 -1 +30 72 -1 +30 73 -1 +30 74 -1 +30 75 -1 +31 46 -1 +31 47 -1 +31 48 -1 +31 49 -1 +31 50 -1 +32 46 -1 +32 47 -1 +32 48 -1 +32 49 -1 +32 50 -1 +33 46 -1 +33 47 -1 +33 48 -1 +33 49 -1 +33 50 -1 +34 46 -1 +36 36 -1 +36 37 -1 +36 38 -1 +36 39 -1 +36 40 -1 +36 61 -1 +36 62 -1 +36 63 -1 +36 64 -1 +36 65 -1 +37 36 -1 +37 37 -1 +37 38 -1 +37 39 -1 +37 62 -1 +37 63 -1 +37 64 -1 +37 65 -1 +38 36 -1 +38 37 -1 +38 38 -1 +38 63 -1 +38 64 -1 +38 65 -1 +39 36 -1 +39 37 -1 +39 64 -1 +39 65 -1 +40 36 -1 +40 65 -1 +41 36 -1 +51 1 -1 +51 3 -1 +51 4 -1 +51 5 -1 +51 31 -1 +51 32 -1 +51 33 -1 +51 69 -1 +51 70 -1 +52 1 -1 +52 2 -1 +52 3 -1 +52 4 -1 +52 5 -1 +52 31 -1 +52 32 -1 +52 33 -1 +52 69 -1 +52 70 -1 +53 1 -1 +53 2 -1 +53 3 -1 +53 4 -1 +53 5 -1 +53 31 -1 +53 32 -1 +53 33 -1 +53 68 -1 +53 69 -1 +53 70 -1 +54 1 -1 +54 2 -1 +54 3 -1 +54 4 -1 +54 5 -1 +54 31 -1 +54 32 -1 +54 33 -1 +54 68 -1 +54 69 -1 +54 70 -1 +55 1 -1 +55 2 -1 +55 3 -1 +55 4 -1 +55 5 -1 +55 31 -1 +55 32 -1 +55 33 -1 +55 34 -1 +55 68 -1 +55 69 -1 +55 70 -1 +60 36 -1 +61 4 -1 +61 5 -1 +61 36 -1 +61 65 -1 +61 96 -1 +61 97 -1 +62 4 -1 +62 5 -1 +62 36 -1 +62 37 -1 +62 64 -1 +62 65 -1 +62 96 -1 +62 97 -1 +63 4 -1 +63 5 -1 +63 36 -1 +63 37 -1 +63 38 -1 +63 64 -1 +63 65 -1 +63 96 -1 +63 97 -1 +64 4 -1 +64 5 -1 +64 36 -1 +64 37 -1 +64 38 -1 +64 39 -1 +64 63 -1 +64 64 -1 +64 65 -1 +64 96 -1 +64 97 -1 +65 4 -1 +65 5 -1 +65 36 -1 +65 37 -1 +65 38 -1 +65 39 -1 +65 40 -1 +65 61 -1 +65 62 -1 +65 63 -1 +65 64 -1 +65 65 -1 +65 96 -1 +65 97 -1 +66 91 -1 +66 92 -1 +66 93 -1 +66 94 -1 +66 95 -1 +67 91 -1 +67 92 -1 +67 93 -1 +67 94 -1 +67 95 -1 +68 46 -1 +68 47 -1 +68 48 -1 +68 49 -1 +68 53 -1 +68 54 -1 +68 55 -1 +68 91 -1 +68 92 -1 +68 93 -1 +68 94 -1 +68 95 -1 +69 46 -1 +69 47 -1 +69 48 -1 +69 49 -1 +69 50 -1 +69 51 -1 +69 52 -1 +69 53 -1 +69 54 -1 +69 55 -1 +69 91 -1 +69 92 -1 +69 93 -1 +69 94 -1 +69 95 -1 +70 46 -1 +70 47 -1 +70 48 -1 +70 49 -1 +70 50 -1 +70 51 -1 +70 52 -1 +70 53 -1 +70 54 -1 +70 55 -1 +70 91 -1 +70 92 -1 +70 93 -1 +70 94 -1 +70 95 -1 +71 6 -1 +71 7 -1 +71 8 -1 +71 9 -1 +71 10 -1 +71 91 -1 +71 92 -1 +71 93 -1 +71 94 -1 +71 95 -1 +72 6 -1 +72 7 -1 +72 8 -1 +72 9 -1 +72 10 -1 +72 91 -1 +72 92 -1 +72 93 -1 +72 94 -1 +72 95 -1 +73 6 -1 +73 7 -1 +73 8 -1 +73 9 -1 +73 10 -1 +73 91 -1 +73 92 -1 +73 93 -1 +73 94 -1 +73 95 -1 +74 6 -1 +74 7 -1 +74 8 -1 +74 9 -1 +74 10 -1 +74 91 -1 +74 92 -1 +74 93 -1 +74 94 -1 +74 95 -1 +75 6 -1 +75 7 -1 +75 8 -1 +75 9 -1 +75 10 -1 +75 91 -1 +75 92 -1 +75 93 -1 +75 94 -1 +76 9 -1 +76 10 -1 +76 11 -1 +76 12 -1 +76 13 -1 +76 14 -1 +76 15 -1 +76 91 -1 +76 92 -1 +77 9 -1 +77 10 -1 +77 11 -1 +77 12 -1 +77 13 -1 +77 14 -1 +77 15 -1 +77 91 -1 +77 92 -1 +78 9 -1 +78 10 -1 +78 11 -1 +78 12 -1 +78 13 -1 +78 14 -1 +78 15 -1 +78 91 -1 +78 92 -1 +79 9 -1 +79 10 -1 +79 11 -1 +79 12 -1 +79 13 -1 +79 14 -1 +79 15 -1 +79 91 -1 +79 92 -1 +80 9 -1 +80 10 -1 +80 11 -1 +80 12 -1 +80 13 -1 +80 14 -1 +80 15 -1 +80 91 -1 +81 14 -1 +81 15 -1 +81 86 -1 +81 87 -1 +82 14 -1 +82 15 -1 +82 86 -1 +82 87 -1 +83 14 -1 +83 15 -1 +83 86 -1 +83 87 -1 +84 14 -1 +84 15 -1 +84 86 -1 +84 87 -1 +85 14 -1 +85 15 -1 +85 86 -1 +86 16 -1 +86 17 -1 +86 18 -1 +86 19 -1 +86 20 -1 +86 21 -1 +86 22 -1 +86 23 -1 +86 24 -1 +86 25 -1 +86 81 -1 +86 82 -1 +86 83 -1 +86 84 -1 +86 85 -1 +87 17 -1 +87 18 -1 +87 19 -1 +87 20 -1 +87 21 -1 +87 22 -1 +87 23 -1 +87 24 -1 +87 25 -1 +87 81 -1 +87 82 -1 +87 83 -1 +87 84 -1 +87 85 -1 +88 21 -1 +88 22 -1 +88 23 -1 +88 24 -1 +88 25 -1 +89 21 -1 +89 22 -1 +89 23 -1 +89 24 -1 +89 25 -1 +90 21 -1 +90 22 -1 +90 23 -1 +90 24 -1 +90 25 -1 +91 21 -1 +91 22 -1 +91 23 -1 +91 24 -1 +91 25 -1 +91 26 -1 +91 27 -1 +91 28 -1 +91 29 -1 +91 30 -1 +91 66 -1 +91 67 -1 +91 68 -1 +91 69 -1 +91 70 -1 +91 71 -1 +91 72 -1 +91 73 -1 +91 74 -1 +91 75 -1 +91 76 -1 +91 77 -1 +91 78 -1 +91 79 -1 +91 80 -1 +92 22 -1 +92 23 -1 +92 24 -1 +92 25 -1 +92 26 -1 +92 27 -1 +92 28 -1 +92 29 -1 +92 30 -1 +92 66 -1 +92 67 -1 +92 68 -1 +92 69 -1 +92 70 -1 +92 71 -1 +92 72 -1 +92 73 -1 +92 74 -1 +92 75 -1 +92 76 -1 +92 77 -1 +92 78 -1 +92 79 -1 +93 26 -1 +93 27 -1 +93 28 -1 +93 29 -1 +93 30 -1 +93 66 -1 +93 67 -1 +93 68 -1 +93 69 -1 +93 70 -1 +93 71 -1 +93 72 -1 +93 73 -1 +93 74 -1 +93 75 -1 +94 27 -1 +94 28 -1 +94 29 -1 +94 30 -1 +94 66 -1 +94 67 -1 +94 68 -1 +94 69 -1 +94 70 -1 +94 71 -1 +94 72 -1 +94 73 -1 +94 74 -1 +95 27 -1 +95 28 -1 +95 29 -1 +95 30 -1 +95 66 -1 +95 67 -1 +95 68 -1 +95 69 -1 +95 70 -1 +95 71 -1 +95 72 -1 +95 73 -1 +95 74 -1 +96 36 -1 +96 37 -1 +96 38 -1 +96 39 -1 +96 40 -1 +96 41 -1 +96 42 -1 +96 43 -1 +96 44 -1 +96 45 -1 +96 56 -1 +96 57 -1 +96 58 -1 +96 59 -1 +96 60 -1 +96 61 -1 +96 62 -1 +96 63 -1 +96 64 -1 +96 65 -1 +97 36 -1 +97 37 -1 +97 38 -1 +97 39 -1 +97 40 -1 +97 41 -1 +97 42 -1 +97 43 -1 +97 44 -1 +97 45 -1 +97 56 -1 +97 57 -1 +97 58 -1 +97 59 -1 +97 60 -1 +97 61 -1 +97 62 -1 +97 63 -1 +97 64 -1 +97 65 -1 +98 41 -1 +98 42 -1 +98 43 -1 +98 44 -1 +98 45 -1 +98 56 -1 +98 57 -1 +98 58 -1 +98 59 -1 +98 60 -1 +99 41 -1 +99 42 -1 +99 43 -1 +99 44 -1 +99 45 -1 +99 54 -1 +99 57 -1 +99 58 -1 +99 59 -1 +99 60 -1 +100 41 -1 +100 42 -1 +100 43 -1 +100 44 -1 +100 45 -1 +100 56 -1 +100 57 -1 +100 58 -1 +100 59 -1 +100 60 -1 +4 37 1 +4 38 1 +4 39 1 +4 40 1 +4 61 1 +4 62 1 +4 63 1 +4 64 1 +4 65 1 +5 36 1 +5 37 1 +5 38 1 +5 39 1 +5 40 1 +5 61 1 +5 62 1 +5 63 1 +5 64 1 +5 65 1 +6 28 1 +6 29 1 +6 30 1 +6 71 1 +6 72 1 +6 74 1 +7 26 1 +7 27 1 +7 28 1 +7 29 1 +7 30 1 +7 71 1 +7 72 1 +7 73 1 +7 74 1 +7 75 1 +8 26 1 +8 27 1 +8 28 1 +8 29 1 +8 30 1 +8 71 1 +8 72 1 +8 73 1 +8 74 1 +8 75 1 +9 22 1 +9 23 1 +9 24 1 +9 25 1 +9 26 1 +9 27 1 +9 28 1 +9 29 1 +9 30 1 +9 71 1 +9 72 1 +9 73 1 +9 74 1 +9 75 1 +10 26 1 +10 27 1 +10 28 1 +10 29 1 +10 30 1 +10 73 1 +10 74 1 +10 75 1 +14 17 1 +14 18 1 +14 19 1 +14 20 1 +14 81 1 +14 82 1 +14 83 1 +14 84 1 +15 81 1 +15 82 1 +15 83 1 +15 84 1 +15 85 1 +16 81 1 +16 82 1 +16 83 1 +16 84 1 +16 85 1 +16 86 1 +16 87 1 +17 81 1 +17 82 1 +17 83 1 +17 84 1 +17 85 1 +17 86 1 +17 87 1 +18 81 1 +18 82 1 +18 83 1 +18 84 1 +18 85 1 +18 86 1 +18 87 1 +19 81 1 +19 82 1 +19 83 1 +19 84 1 +19 85 1 +19 86 1 +19 87 1 +20 81 1 +20 82 1 +20 83 1 +20 84 1 +20 85 1 +20 86 1 +20 87 1 +21 91 1 +22 91 1 +22 92 1 +23 91 1 +23 92 1 +24 91 1 +24 92 1 +25 91 1 +25 92 1 +26 7 1 +26 8 1 +26 9 1 +26 10 1 +26 91 1 +26 92 1 +26 93 1 +26 94 1 +27 6 1 +27 7 1 +27 8 1 +27 9 1 +27 10 1 +27 91 1 +27 92 1 +27 93 1 +27 94 1 +27 95 1 +28 6 1 +28 7 1 +28 8 1 +28 9 1 +28 10 1 +28 91 1 +28 92 1 +28 93 1 +28 94 1 +28 95 1 +29 6 1 +29 7 1 +29 8 1 +29 9 1 +29 10 1 +29 91 1 +29 92 1 +29 93 1 +29 94 1 +29 95 1 +30 6 1 +30 7 1 +30 8 1 +30 9 1 +30 10 1 +30 91 1 +30 92 1 +30 94 1 +30 95 1 +31 46 1 +31 47 1 +31 48 1 +31 49 1 +31 50 1 +31 51 1 +31 52 1 +31 53 1 +31 54 1 +31 55 1 +32 46 1 +32 47 1 +32 48 1 +32 49 1 +32 50 1 +32 51 1 +32 52 1 +32 53 1 +32 54 1 +32 55 1 +33 46 1 +33 47 1 +33 53 1 +33 54 1 +33 55 1 +36 36 1 +36 37 1 +36 38 1 +36 39 1 +36 40 1 +36 61 1 +36 62 1 +36 63 1 +36 64 1 +36 65 1 +36 96 1 +37 36 1 +37 37 1 +37 38 1 +37 39 1 +37 62 1 +37 63 1 +37 64 1 +37 65 1 +37 96 1 +37 97 1 +38 36 1 +38 37 1 +38 38 1 +38 63 1 +38 64 1 +38 65 1 +38 96 1 +38 97 1 +39 36 1 +39 37 1 +39 64 1 +39 65 1 +39 96 1 +39 97 1 +40 36 1 +40 65 1 +40 96 1 +40 97 1 +46 31 1 +46 32 1 +46 33 1 +46 68 1 +46 69 1 +46 70 1 +47 31 1 +47 32 1 +47 33 1 +47 68 1 +47 69 1 +47 70 1 +48 31 1 +48 32 1 +48 33 1 +48 68 1 +48 69 1 +48 70 1 +49 31 1 +49 32 1 +49 33 1 +49 69 1 +49 70 1 +50 31 1 +50 32 1 +50 33 1 +50 69 1 +50 70 1 +51 31 1 +51 32 1 +51 33 1 +51 69 1 +51 70 1 +51 96 1 +51 97 1 +51 98 1 +51 99 1 +51 100 1 +52 31 1 +52 32 1 +52 33 1 +52 69 1 +52 70 1 +52 96 1 +52 97 1 +52 98 1 +52 99 1 +52 100 1 +53 31 1 +53 32 1 +53 33 1 +53 68 1 +53 69 1 +53 70 1 +53 96 1 +53 97 1 +53 98 1 +53 99 1 +53 100 1 +54 31 1 +54 32 1 +54 33 1 +54 68 1 +54 69 1 +54 70 1 +54 96 1 +54 97 1 +54 98 1 +54 99 1 +54 100 1 +55 31 1 +55 32 1 +55 33 1 +55 34 1 +55 68 1 +55 69 1 +55 70 1 +55 96 1 +55 97 1 +55 98 1 +55 99 1 +55 100 1 +60 36 1 +61 4 1 +61 5 1 +61 36 1 +61 65 1 +61 96 1 +61 97 1 +62 4 1 +62 5 1 +62 36 1 +62 37 1 +62 64 1 +62 65 1 +62 96 1 +62 97 1 +63 4 1 +63 5 1 +63 36 1 +63 37 1 +63 38 1 +63 63 1 +63 64 1 +63 65 1 +63 96 1 +63 97 1 +64 4 1 +64 5 1 +64 36 1 +64 37 1 +64 38 1 +64 39 1 +64 62 1 +64 63 1 +64 64 1 +64 65 1 +64 96 1 +65 4 1 +65 5 1 +65 36 1 +65 37 1 +65 38 1 +65 39 1 +65 40 1 +65 61 1 +65 62 1 +65 63 1 +65 64 1 +65 65 1 +65 96 1 +66 91 1 +66 92 1 +66 93 1 +66 94 1 +66 95 1 +67 46 1 +67 91 1 +67 92 1 +67 93 1 +67 94 1 +67 95 1 +68 46 1 +68 47 1 +68 48 1 +68 49 1 +68 50 1 +68 51 1 +68 52 1 +68 53 1 +68 54 1 +68 55 1 +68 91 1 +68 92 1 +68 93 1 +68 94 1 +68 95 1 +69 46 1 +69 47 1 +69 48 1 +69 49 1 +69 50 1 +69 51 1 +69 52 1 +69 53 1 +69 54 1 +69 55 1 +69 91 1 +69 92 1 +69 93 1 +69 94 1 +69 95 1 +70 46 1 +70 47 1 +70 48 1 +70 49 1 +70 50 1 +70 51 1 +70 52 1 +70 53 1 +70 54 1 +70 55 1 +70 91 1 +70 92 1 +70 93 1 +70 94 1 +70 95 1 +71 6 1 +71 7 1 +71 8 1 +71 9 1 +71 10 1 +71 91 1 +71 92 1 +71 93 1 +71 94 1 +71 95 1 +72 6 1 +72 7 1 +72 8 1 +72 9 1 +72 10 1 +72 91 1 +72 92 1 +72 93 1 +72 94 1 +72 95 1 +73 7 1 +73 8 1 +73 9 1 +73 10 1 +73 91 1 +73 92 1 +73 93 1 +73 94 1 +73 95 1 +74 6 1 +74 7 1 +74 8 1 +74 9 1 +74 10 1 +74 91 1 +74 92 1 +74 93 1 +74 94 1 +74 95 1 +75 7 1 +75 8 1 +75 9 1 +75 10 1 +75 91 1 +75 92 1 +75 93 1 +75 94 1 +75 95 1 +76 9 1 +76 10 1 +76 91 1 +76 92 1 +77 9 1 +77 10 1 +77 91 1 +77 92 1 +78 9 1 +78 10 1 +78 91 1 +78 92 1 +79 9 1 +79 10 1 +79 91 1 +79 92 1 +80 10 1 +80 91 1 +81 14 1 +81 15 1 +81 16 1 +81 17 1 +81 18 1 +81 19 1 +81 20 1 +81 81 1 +81 82 1 +81 83 1 +81 84 1 +81 85 1 +81 86 1 +81 87 1 +82 14 1 +82 15 1 +82 16 1 +82 17 1 +82 18 1 +82 19 1 +82 20 1 +82 81 1 +82 82 1 +82 83 1 +82 84 1 +82 85 1 +82 86 1 +82 87 1 +83 14 1 +83 15 1 +83 16 1 +83 17 1 +83 18 1 +83 19 1 +83 20 1 +83 81 1 +83 82 1 +83 83 1 +83 84 1 +83 85 1 +83 86 1 +83 87 1 +84 14 1 +84 15 1 +84 16 1 +84 17 1 +84 18 1 +84 19 1 +84 20 1 +84 81 1 +84 82 1 +84 83 1 +84 84 1 +84 85 1 +84 86 1 +84 87 1 +85 14 1 +85 15 1 +85 16 1 +85 17 1 +85 18 1 +85 19 1 +85 20 1 +85 81 1 +85 82 1 +85 83 1 +85 84 1 +85 85 1 +85 86 1 +85 87 1 +86 81 1 +86 82 1 +86 83 1 +86 84 1 +86 85 1 +87 81 1 +87 82 1 +87 83 1 +87 84 1 +91 26 1 +91 27 1 +91 28 1 +91 29 1 +91 30 1 +91 32 1 +91 33 1 +91 34 1 +91 35 1 +91 66 1 +91 67 1 +91 68 1 +91 69 1 +91 70 1 +91 71 1 +91 72 1 +91 73 1 +91 74 1 +91 75 1 +92 26 1 +92 27 1 +92 28 1 +92 29 1 +92 30 1 +92 31 1 +92 32 1 +92 33 1 +92 34 1 +92 35 1 +92 68 1 +92 69 1 +92 70 1 +92 71 1 +92 72 1 +92 73 1 +92 74 1 +92 75 1 +93 26 1 +93 27 1 +93 28 1 +93 29 1 +93 30 1 +93 31 1 +93 32 1 +93 33 1 +93 34 1 +93 35 1 +93 66 1 +93 67 1 +93 68 1 +93 69 1 +93 70 1 +93 71 1 +93 72 1 +93 73 1 +93 74 1 +93 75 1 +94 26 1 +94 27 1 +94 28 1 +94 29 1 +94 30 1 +94 31 1 +94 32 1 +94 33 1 +94 34 1 +94 35 1 +94 66 1 +94 67 1 +94 68 1 +94 69 1 +94 70 1 +94 71 1 +94 72 1 +94 73 1 +94 74 1 +94 75 1 +95 28 1 +95 29 1 +95 30 1 +95 31 1 +95 32 1 +95 33 1 +95 34 1 +95 35 1 +95 66 1 +95 67 1 +95 68 1 +95 69 1 +95 70 1 +95 71 1 +95 72 1 +95 73 1 +95 74 1 +96 38 1 diff --git a/EOverPCalibration/FastCalibrator/interface/TEndcapRings.h b/EOverPCalibration/FastCalibrator/interface/TEndcapRings.h new file mode 100644 index 00000000000..1c3915d8fb8 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/TEndcapRings.h @@ -0,0 +1,49 @@ +#ifndef TEndcapRings_h +#define TEndcapRings_h + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TCanvas.h" +#include "TGraphErrors.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TTree.h" +#include "TVirtualFitter.h" +#include "TFitResultPtr.h" +#include "TFitResult.h" +#include "TChain.h" +#include "TMath.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class TEndcapRings +{ + private: + int iEndcapRing[101][101][2]; + + public: + + // ctor + TEndcapRings(); + + // dtor + ~TEndcapRings(); + + int GetEndcapRing(int,int,int); + int GetEndcapIeta(int,int,int); + int GetEndcapIphi(int,int,int); + // ClassDef(TEndcapRings,1); //ring class +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/TSicCrystals.h b/EOverPCalibration/FastCalibrator/interface/TSicCrystals.h new file mode 100644 index 00000000000..a37e7a26fe2 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/TSicCrystals.h @@ -0,0 +1,41 @@ +#ifndef TSicCrystals_h +#define TSicCrystals_h + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TH2.h" +#include "TCanvas.h" +#include "TGraphAsymmErrors.h" +#include "TMultiGraph.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TTree.h" +#include "TVirtualFitter.h" +#include "TStyle.h" +#include "TApplication.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/// SIC Crystals MAP /// +class TSicCrystals { + private: + int sicMap[100][100][3]; + public: + TSicCrystals(); + virtual ~TSicCrystals(); + int isSic(Int_t,Int_t,Int_t); +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h b/EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h new file mode 100644 index 00000000000..a7c228ac5b7 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h @@ -0,0 +1,251 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef XtalAlphaEB_h +#define XtalAlphaEB_h + +#include +#include +#include +#include +#include +#include +#include "EOverPCalibration/NtuplePackage/interface/hChain.h" +#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "EOverPCalibration/NtuplePackage/interface/readJSONFile.h" + +class XtalAlphaEB { + + public : + + std::vector myMomentumScale; + std::string myTypeEB; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + + Int_t runId; + Int_t lumiId; + Int_t eventId; + Int_t isW; + Int_t isZ; + + ///! Ele 1 variables + + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_flag; + std::vector *ele1_recHit_LaserCorr; + std::vector *ele1_recHit_Alpha; + + Float_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + Float_t ele1_seedLaserAlpha; + Float_t ele1_seedLaserCorr; + + ///! Ele 2 variables + + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_flag; + std::vector *ele2_recHit_LaserCorr; + std::vector *ele2_recHit_Alpha; + + Float_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + Float_t ele2_seedLaserAlpha; + Float_t ele2_seedLaserCorr; + + ///! List of input branches from ntu + + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_eventId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_hashedIndex; + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_flag; + TBranch *b_ele1_recHit_LaserCorr; + TBranch *b_ele1_recHit_Alpha; + + TBranch *b_ele1_scERaw_PUcleaned; + TBranch *b_ele1_scE_regression; + + TBranch *b_ele1_eta; //! + TBranch *b_ele1_phi; //! + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_seedLaserAlpha; + TBranch *b_ele1_seedLaserCorr; + TBranch *b_ele1_charge; + + + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_flag; + TBranch *b_ele2_recHit_LaserCorr; + TBranch *b_ele2_recHit_Alpha; + + TBranch *b_ele2_eta; //! + TBranch *b_ele2_phi; //! + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + + TBranch *b_ele2_scERaw_PUcleaned; + TBranch *b_ele2_scE_regression; + + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + TBranch *b_ele2_seedLaserAlpha; + TBranch *b_ele2_seedLaserCorr; + TBranch *b_ele2_charge; + + ///! List of class methods + + XtalAlphaEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution="NULL"); + + virtual ~XtalAlphaEB(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,std::map > >); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); + + ///! Output information + + std::vector IetaValues; + std::vector IphiValues; + std::vector AlphaValues; + std::vector meanAlphaforPhiRingValues; + std::vector DeadXtal_HashedIndex; + + + hChain *hC_EoP_eta_ele; + hChain *hC_AlphaValues; + hChain *hC_EoP; + hChain *hC_AlphaSpreadVsLoop; + + h2Chain *hC_Alpha_EB; + + TH1F *h_Occupancy_hashedIndex; + TH2F *h_occupancy; + TProfile *p_AlphaValues_iEta; + TH2F *h_Alpha_scalib_EB; + TH2F *h_Alpha_EB; + TH2F *h_Alpha_EB_meanOnPhi; + TH1F *h_Alpha_EB_hashedIndex; + TH1F *h_AlphaSpread_iEta; + TH2F *h_Intial_AlphaValues; + + TH2F *h_map_Dead_Channels ; + + TGraphErrors *g_AlphameanVsLoop; + TGraphErrors *g_AlpharmsVsLoop; + TGraphErrors *g_AlphaSigmaVsLoop; + + private: + + TString outEPDistribution_p; + +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h b/EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h new file mode 100644 index 00000000000..a9b51998cb8 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h @@ -0,0 +1,298 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef XtalAlphaEE_h +#define XtalAlphaEE_h + +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "../../NtuplePackage/interface/readJSONFile.h" +#include "../interface/TEndcapRings.h" +#include "../interface/TSicCrystals.h" + +class XtalAlphaEE{ + + public : + + std::vector myMomentumScale; + std::string myTypeEE; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + + ///! Declaration of leaf types + Int_t runId; + Int_t lumiId; + Int_t eventId; + Int_t isW; + Int_t isZ; + + ///! Ele1 Variables + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_laserCorr; + std::vector *ele1_recHit_Alpha; + + Float_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + Float_t ele1_seedLaserAlpha; + Float_t ele1_seedLaserCorr; + + ///! Ele Variables + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_laserCorr; + std::vector *ele2_recHit_Alpha; + + Float_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + Float_t ele2_seedLaserAlpha; + Float_t ele2_seedLaserCorr; + + + ///! List of input branches from ntu + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_eventId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_hashedIndex; //! + TBranch *b_ele1_recHit_laserCorr; //! + TBranch *b_ele1_recHit_Alpha; + + TBranch *b_ele1_charge; //! + TBranch *b_ele1_eta; //! + TBranch *b_ele1_phi; //! + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_scEta; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_scE_regression; + TBranch *b_ele1_scERaw_PUcleaned; + + TBranch *b_ele1_seedLaserAlpha; + TBranch *b_ele1_seedLaserCorr; + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; //! + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_laserCorr; //! + TBranch *b_ele2_recHit_Alpha; + + TBranch *b_ele2_charge; //! + TBranch *b_ele2_eta; //! + TBranch *b_ele2_phi; //! + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_scEta; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + TBranch *b_ele2_scE_regression; + TBranch *b_ele2_scERaw_PUcleaned; + + TBranch *b_ele2_seedLaserAlpha; + TBranch *b_ele2_seedLaserCorr; + + ///! Class methods + XtalAlphaEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution="NULL"); + + virtual ~XtalAlphaEE(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual void Init(TTree *tree); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,bool,std::map > >); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); + + /// Output informations + TH1F *h_occupancy_hashedIndex_EE; + TH1F *h_Alpha_hashedIndex_EE; + + hChain *hC_EoP_ir_ele; + hChain *hC_EoP; + + /// EE+ + hChain *hC_AlphaValues_BTCP_EEP; + h2Chain *hC_Alpha_BTCP_EEP; + hChain *hC_AlphaSpreadVsLoop_BTCP_EEP; + + hChain *hC_AlphaValues_SIC_EEP; + h2Chain *hC_Alpha_SIC_EEP; + hChain *hC_AlphaSpreadVsLoop_SIC_EEP; + + TProfile *p_AlphaVsIeta_BTCP_EEP; + TH1F *AlphaSpreadVsIeta_BTCP_EEP; + TProfile *p_AlphaVsIeta_SIC_EEP; + TH1F *AlphaSpreadVsIeta_SIC_EEP; + + TH2F *h_occupancy_EEP; + + TH2F *h_Alpha_EEP; + TH2F *h_scalib_EEP; + TH2F *h_Alpha_Original_EEP; + + + TGraphErrors *g_AlphameanVsLoop_BTCP_EEP; + TGraphErrors *g_AlpharmsVsLoop_BTCP_EEP; + TGraphErrors *g_AlphaSigmaVsLoop_BTCP_EEP; + TGraphErrors *g_AlphameanVsLoop_SIC_EEP; + TGraphErrors *g_AlpharmsVsLoop_SIC_EEP; + TGraphErrors *g_AlphaSigmaVsLoop_SIC_EEP; + + /// EE- + hChain *hC_AlphaValues_BTCP_EEM; + h2Chain *hC_Alpha_BTCP_EEM; + hChain *hC_AlphaSpreadVsLoop_BTCP_EEM; + + hChain *hC_AlphaValues_SIC_EEM; + h2Chain *hC_Alpha_SIC_EEM; + hChain *hC_AlphaSpreadVsLoop_SIC_EEM; + + TProfile *p_AlphaVsIeta_BTCP_EEM; + TH1F *AlphaSpreadVsIeta_BTCP_EEM; + TProfile *p_AlphaVsIeta_SIC_EEM; + TH1F *AlphaSpreadVsIeta_SIC_EEM; + + TH2F *h_occupancy_EEM; + + TH2F *h_Alpha_EEM; + TH2F *h_scalib_EEM; + TH2F *h_Alpha_Original_EEM; + + + TGraphErrors *g_AlphameanVsLoop_BTCP_EEM; + TGraphErrors *g_AlpharmsVsLoop_BTCP_EEM; + TGraphErrors *g_AlphaSigmaVsLoop_BTCP_EEM; + TGraphErrors *g_AlphameanVsLoop_SIC_EEM; + TGraphErrors *g_AlpharmsVsLoop_SIC_EEM; + TGraphErrors *g_AlphaSigmaVsLoop_SIC_EEM; + + + /// Dead Channel infos + std::vector DeadXtal_HashedIndex; + + TH2F *h_map_Dead_Channels_EEP ; + TH2F *h_map_Dead_Channels_EEM ; + + + private : + + TString outEPDistribution_p; + + /// Essential values to get EE geometry + TEndcapRings* eRings; + TSicCrystals* SicCrystal; + + static const int IX_MIN = 1; + static const int IY_MIN = 1; + static const int IX_MAX = 100; + static const int IY_MAX = 100; + static const int kEEhalf = 7324; + + static const int kxf[200]; + + static const int kdi[200]; +}; + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/Zutils.h b/EOverPCalibration/FastCalibrator/interface/Zutils.h new file mode 100644 index 00000000000..9e613b31009 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/Zutils.h @@ -0,0 +1,60 @@ +#ifndef ntupleUtils_h +#define ntupleUtils_h + +#include +#include +#include +#include + + +#include "TFile.h" +#include "TChain.h" +#include "TCanvas.h" +#include "TPaveStats.h" +#include "TH1F.h" +#include "TF1.h" +#include "TRandom3.h" +#include "TMath.h" + + +#ifdef _MAKECINT_ +#pragma link C++ class map+; +#pragma link C++ class map+; +#pragma link C++ class map+; +#endif + + + +/*** breit-wigner ***/ +double breitWigner(double* x, double* par); + +/*** crystall ball with low tail ***/ +double crystalBallLow(double* x, double* par); + +/*** double crystall ball ***/ +double crystalBallLowHigh(double* x, double* par); + +/*** breit-wigner convoluted with crystalBall ***/ + +double breitWigner_crystalBallLow(double* x, double* par,const int nPoints); + + +std::pair breitWigner_crystalBallLowFWHM(TF1* bwcb, const double &min, const double &max, const double &Precision = 0.001, const int & maxCycle=100000); + +void MoveInterval(TF1* bwcb,const double & xCenter,std::pair & Interval, const double & MAX); + + +/*** Method for binned and ubinned lineshape fit ***/ + +void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, TH1F* h_mZ_MC, + int nPoints, const double &min,const double &max, std::string energyType = "Reg"); + +void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, + int nPoints, const double &min,const double &max, std::string energyType ="Reg"); + + +void SetParameterFunctionEE_EE(TF1* bw_cb, TRandom3 * rand); +void SetParameterFunctionEB_EE(TF1* bw_cb, TRandom3 * rand); +void SetParameterFunctionEB_EB(TF1* bw_cb, TRandom3 * rand); + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/geometryUtils.h b/EOverPCalibration/FastCalibrator/interface/geometryUtils.h new file mode 100644 index 00000000000..19e22de771b --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/geometryUtils.h @@ -0,0 +1,56 @@ +#ifndef geometryUtils_h +#define geometryUtils_h + +//ECAL GEOMETRY + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "TSicCrystals.h" + +/// EE Geometry /// +class TEndcapRegions { + private: + int iEndcapRing[100][100][3]; + int iLMR[100][100][2]; + public: + TEndcapRegions(); + virtual ~TEndcapRegions(); + int GetNRegions(const std::string& , const int ); + int GetRegionId(const int,const int,const int,const std::string&); + int GetEndcapRing(const int,const int,const int,const int); + int GetEndcapIeta(const int,const int,const int, const std::string&, const int); + +}; + +/// EB Geometry +class TBarrelRegions { + + private: + std::map LmrEtaMap; + int iBarrelRings[171][360]; + int iLMR[171][360]; + int iTT[171][360]; + int iSM[171][360]; + + public: + TBarrelRegions(); + virtual ~TBarrelRegions(); + int GetNRegions(const std::string& type); + int GetNRegionsIeta(const std::string& type); + int GetRegionId(const int,const int,const std::string&); + int GetRegionIdIeta(const int& regionId, const std::string& type); + + +}; + + + +#endif diff --git a/EOverPCalibration/FastCalibrator/interface/setTDRStyle.h b/EOverPCalibration/FastCalibrator/interface/setTDRStyle.h new file mode 100644 index 00000000000..706f02026e1 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/interface/setTDRStyle.h @@ -0,0 +1,14 @@ +#ifndef setTDRStyle_h +#define setTDRStyle_h + +#include "TStyle.h" +#include "TColor.h" +#include "TROOT.h" + + + +void setTDRStyle(); + +int getColor(const int& i); + +#endif diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt new file mode 100644 index 00000000000..12c3db78ac7 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt @@ -0,0 +1 @@ +{"190645": [[10, 110]], "190646": [[1, 111]], "190659": [[33, 167]], "190679": [[1, 55]], "190688": [[69, 249]], "190702": [[51, 53], [55, 122], [124, 169]], "190703": [[1, 252]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190706": [[1, 126]], "190707": [[1, 237], [239, 257]], "190708": [[1, 189]], "190733": [[71, 96], [99, 389], [392, 460]], "190736": [[1, 80], [83, 185]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 55], [58, 65]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 223], [225, 363]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193192": [[58, 86]], "193193": [[1, 6], [8, 8], [11, 83], [86, 120], [122, 160], [162, 274], [276, 495], [497, 506]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]]} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt new file mode 100644 index 00000000000..7f74ddd0a9c --- /dev/null +++ b/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt @@ -0,0 +1,374 @@ +{"190645": [[10, 110]], + "190646": [[1, 111]], + "190659": [[33, 167]], + "190679": [[1, 55]], + "190688": [[69, 249]], + "190702": [[51, 53], [55, 122], [124, 169]], + "190703": [[1, 252]], + "190704": [[1, 3]], + "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], + "190706": [[1, 126]], + "190707": [[1, 237], [239, 257]], + "190708": [[1, 189]], + "190733": [[71, 96], [99, 389], [392, 460]], + "190736": [[1, 80], [83, 185]], + "190738": [[1, 130], [133, 226], [229, 355]], + "191043": [[45, 47]], + "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], + "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], + "191057": [[1, 1], [4, 55], [58, 65]], + "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], + "191090": [[1, 55]], + "191201": [[38, 49], [52, 79]], + "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], + "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], + "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], + "191248": [[1, 103]], + "191264": [[59, 79], [82, 152], [155, 189]], + "191271": [[56, 223], [225, 363]], + "191276": [[1, 16]], + "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], + "191367": [[1, 2]], + "191411": [[1, 23]], + "191695": [[1, 1]], + "191718": [[43, 95], [98, 207]], + "191720": [[1, 1], [3, 15], [17, 181]], + "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], + "191726": [[1, 13]], + "191810": [[15, 15], [22, 49], [52, 92]], + "191830": [[54, 242], [245, 301], [304, 393]], + "191833": [[1, 1], [3, 103]], + "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], + "191837": [[1, 44], [47, 53], [56, 65]], + "191856": [[1, 133]], + "191859": [[1, 28], [31, 126]], + "193093": [[1, 33]], + "193123": [[1, 27]], + "193124": [[1, 52]], + "193192": [[58, 86]], + "193193": [[1, 6], [8, 8], [11, 83], [86, 120], [122, 160], [162, 274], [276, 495], [497, 506]], + "193207": [[54, 182]], + "193334": [[29, 172]], + "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], + "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], + "193556": [[41, 83]], + "193557": [[1, 84]], + "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], + "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], + "193834": [[1, 35]], + "193835": [[1, 20], [22, 26]], + "193836": [[1, 2]], + "193998": [[66, 113], [115, 278]], + "193999": [[1, 50]], + "194027": [[53, 115]], + "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], + "194051": [[1, 12]], + "194052": [[1, 99], [102, 166]], + "194075": [[48, 101], [103, 111]], + "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], + "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], + "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], + "194117": [[1, 38]], + "194119": [[1, 229], [232, 261]], + "194120": [[1, 162], [165, 406]], + "194150": [[42, 127], [129, 261], [264, 311]], + "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], + "194153": [[1, 119]], + "194199": [[92, 227], [229, 336], [339, 402]], + "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], + "194223": [[61, 112]], + "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], + "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], + "194270": [[56, 73]], + "194303": [[56, 66], [69, 102]], + "194304": [[1, 43], [46, 46]], + "194305": [[1, 86]], + "194314": [[52, 130], [133, 301]], + "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], + "194317": [[1, 33]], + "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], + "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], + "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], + "194439": [[46, 77], [79, 106]], + "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], + "194464": [[1, 127], [130, 142], [145, 210]], + "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], + "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], + "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], + "194619": [[31, 110]], + "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], + "194643": [[1, 287]], + "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], + "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], + "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], + "194702": [[1, 138], [141, 191]], + "194704": [[1, 41], [44, 545], [548, 592]], + "194711": [[1, 7], [9, 619]], + "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], + "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], + "194778": [[60, 118], [120, 219]], + "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], + "194790": [[1, 45]], + "194825": [[72, 117], [120, 221]], + "194896": [[34, 55], [58, 79], [82, 103]], + "194897": [[1, 6], [8, 78], [80, 107]], + "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], + "194914": [[1, 38]], + "194915": [[1, 74]], + "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], + "195014": [[1, 6], [9, 119], [121, 148]], + "195015": [[1, 13]], + "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], + "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], + "195109": [[98, 241]], + "195112": [[1, 12], [15, 26]], + "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], + "195114": [[1, 69], [72, 103]], + "195115": [[1, 7], [10, 36]], + "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], + "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], + "195164": [[1, 64]], + "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], + "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], + "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], + "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], + "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], + "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], + "195396": [[49, 55], [58, 63], [66, 131]], + "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], + "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], + "195399": [[1, 192], [194, 382], [384, 394]], + "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], + "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], + "195551": [[91, 106]], + "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], + "195633": [[40, 42]], + "195647": [[1, 41]], + "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], + "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], + "195656": [[1, 362]], + "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], + "195749": [[1, 8], [10, 33], [36, 131]], + "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], + "195758": [[1, 18]], + "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], + "195775": [[1, 57], [60, 100], [103, 170]], + "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], + "195841": [[74, 90]], + "195868": [[1, 88], [90, 107], [110, 205]], + "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], + "195916": [[1, 16], [19, 68], [71, 212]], + "195917": [[1, 4]], + "195918": [[1, 44], [46, 46], [49, 64]], + "195919": [[1, 15]], + "195923": [[1, 14]], + "195925": [[1, 12]], + "195926": [[1, 1], [3, 19], [21, 34]], + "195929": [[1, 29]], + "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], + "195937": [[1, 28], [31, 186], [188, 400]], + "195947": [[23, 62], [64, 88]], + "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], + "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], + "195963": [[54, 61]], + "195970": [[44, 49], [51, 85]], + "196019": [[54, 68]], + "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], + "196046": [[12, 40]], + "196047": [[1, 64], [70, 75]], + "196048": [[1, 44], [46, 48], [51, 52]], + "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], + "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], + "196200": [[1, 68]], + "196202": [[3, 61], [64, 108]], + "196203": [[1, 102], [107, 135]], + "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], + "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], + "196249": [[63, 77], [80, 99]], + "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], + "196252": [[1, 38]], + "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], + "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], + "196357": [[1, 4]], + "196359": [[1, 2]], + "196362": [[1, 88]], + "196363": [[1, 8], [11, 34]], + "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], + "196437": [[1, 1], [3, 74], [77, 169]], + "196438": [[1, 181], [184, 699], [701, 1269]], + "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], + "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], + "196495": [[114, 180], [182, 272]], + "196509": [[1, 68]], + "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], + "198049": [[1, 11], [14, 57]], + "198050": [[2, 155]], + "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], + "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], + "198207": [[1, 97]], + "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], + "198210": [[1, 221]], + "198212": [[1, 574]], + "198213": [[1, 107]], + "198215": [[1, 12]], + "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], + "198249": [[1, 7]], + "198269": [[3, 199], [201, 201], [203, 203]], + "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], + "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], + "198346": [[44, 57]], + "198372": [[57, 114]], + "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], + "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], + "198522": [[65, 144], [147, 208]], + "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], + "198954": [[108, 156], [159, 277]], + "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], + "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], + "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], + "199011": [[1, 11], [13, 27]], + "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], + "199318": [[65, 138]], + "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], + "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], + "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], + "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], + "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], + "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], + "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], + "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], + "199564": [[1, 3]], + "199569": [[1, 2], [5, 136], [139, 367]], + "199570": [[1, 17]], + "199571": [[1, 184], [186, 360], [363, 561]], + "199572": [[1, 317]], + "199573": [[1, 22]], + "199574": [[1, 53], [56, 153], [156, 246]], + "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], + "199698": [[72, 94], [96, 127]], + "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], + "199703": [[1, 94], [97, 482], [485, 539]], + "199739": [[66, 174]], + "199745": [[137, 143]], + "199751": [[103, 119], [121, 127]], + "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], + "199753": [[1, 59]], + "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], + "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], + "199812": [[70, 141], [144, 163], [187, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], + "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], + "199862": [[59, 142]], + "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], + "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], + "199868": [[1, 26]], + "199875": [[70, 150], [152, 334]], + "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], + "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], + "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], + "199961": [[1, 211], [213, 292]], + "199973": [[73, 96]], + "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], + "200042": [[1, 110], [112, 536]], + "200049": [[1, 177]], + "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], + "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], + "200152": [[74, 152]], + "200180": [[1, 18]], + "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], + "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], + "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 531], [534, 624], [627, 629]], + "200243": [[69, 103], [106, 139]], + "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], + "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], + "200368": [[72, 180]], + "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], + "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], + "200466": [[134, 274]], + "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], + "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], + "200515": [[97, 183]], + "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], + "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], + "200532": [[1, 59]], + "200599": [[75, 129], [132, 137]], + "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], + "200990": [[75, 143]], + "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], + "200992": [[1, 405], [408, 434], [436, 581]], + "201062": [[78, 270]], + "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], + "201114": [[1, 14]], + "201115": [[1, 75]], + "201159": [[70, 211]], + "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], + "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], + "201173": [[1, 194], [197, 586]], + "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], + "201193": [[1, 19]], + "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], + "201197": [[1, 23]], + "201202": [[1, 437]], + "201229": [[1, 5], [8, 26], [29, 77]], + "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], + "201554": [[70, 86], [88, 114], [116, 127]], + "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], + "201611": [[87, 145], [149, 182], [184, 186]], + "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], + "201624": [[83, 92], [95, 240], [270, 270]], + "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], + "201657": [[77, 93], [95, 108], [110, 118]], + "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], + "201668": [[78, 157]], + "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], + "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], + "201678": [[1, 120]], + "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], + "201692": [[78, 81], [83, 180]], + "201705": [[65, 73], [75, 109], [111, 187]], + "201706": [[1, 62]], + "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], + "201708": [[1, 87]], + "201718": [[58, 113]], + "201727": [[67, 185]], + "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], + "201794": [[58, 100]], + "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], + "201816": [[1, 72], [74, 105], [107, 157]], + "201817": [[1, 274]], + "201818": [[1, 1]], + "201819": [[1, 94], [96, 241]], + "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], + "202012": [[98, 121], [126, 131]], + "202013": [[1, 2], [5, 35], [38, 57]], + "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], + "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], + "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], + "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], + "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], + "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], + "202074": [[66, 174]], + "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], + "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], + "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], + "202088": [[1, 286]], + "202093": [[1, 104], [107, 320], [322, 360]], + "202116": [[59, 64]], + "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], + "202205": [[94, 114]], + "202209": [[1, 48], [51, 159]], + "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], + "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], + "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], + "202305": [[1, 89], [92, 130], [133, 323]], + "202314": [[67, 104], [107, 265], [268, 284]], + "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], + "202333": [[1, 251]], + "202389": [[81, 182], [185, 190], [192, 203]], + "202469": [[87, 158], [160, 174], [177, 352]], + "202472": [[1, 96], [99, 112]], + "202477": [[1, 129], [131, 150]], + "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], + "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], + "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], + "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 909], [913, 1408]], + "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]]} diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt new file mode 100644 index 00000000000..aece012650f --- /dev/null +++ b/EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt @@ -0,0 +1 @@ +{"190645": [[10, 110]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 55], [58, 65]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 158]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], "198049": [[1, 11], [14, 57]], "198050": [[2, 155]], "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], "198207": [[1, 97]], "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], "198210": [[1, 221]], "198212": [[1, 574]], "198213": [[1, 107]], "198215": [[1, 12]], "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], "198249": [[1, 7]], "198269": [[3, 199], [201, 201], [203, 203]], "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], "198346": [[44, 57]], "198372": [[57, 114]], "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], "198522": [[65, 144], [147, 208]], "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], "198954": [[108, 156], [159, 277]], "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], "199011": [[1, 11], [13, 27]], "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], "199318": [[65, 138]], "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], "199564": [[1, 3]], "199569": [[1, 2], [5, 136], [139, 367]], "199570": [[1, 17]], "199571": [[1, 184], [186, 360], [363, 561]], "199572": [[1, 317]], "199573": [[1, 22]], "199574": [[1, 53], [56, 153], [156, 246]], "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], "199698": [[72, 94], [96, 127]], "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], "199703": [[1, 94], [97, 482], [485, 539]], "199739": [[66, 174]], "199745": [[137, 143]], "199751": [[103, 119], [121, 127]], "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], "199753": [[1, 59]], "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], "199812": [[70, 141], [144, 163], [187, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], "199862": [[59, 142]], "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], "199868": [[1, 26]], "199875": [[70, 150], [152, 334]], "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], "199961": [[1, 211], [213, 292]], "199973": [[73, 96]], "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], "200042": [[1, 110], [112, 536]], "200049": [[1, 177]], "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], "200152": [[74, 152]], "200180": [[1, 18]], "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 531], [534, 624], [627, 629]], "200243": [[69, 103], [106, 139]], "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], "200368": [[72, 180]], "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], "200466": [[134, 274]], "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], "200515": [[97, 183]], "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], "200532": [[1, 59]], "200599": [[75, 129], [132, 137]], "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], "200990": [[75, 143]], "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], "200992": [[1, 405], [408, 434], [436, 581]], "201062": [[78, 270]], "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], "201114": [[1, 14]], "201115": [[1, 75]], "201159": [[70, 211]], "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], "201173": [[1, 194], [197, 586]], "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], "201193": [[1, 19]], "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], "201197": [[1, 23]], "201202": [[1, 437]], "201229": [[1, 5], [8, 26], [29, 77]], "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], "201554": [[70, 86], [88, 114], [116, 127]], "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], "201611": [[87, 145], [149, 182], [184, 186]], "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], "201624": [[83, 92], [95, 240], [270, 270]], "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], "201657": [[77, 93], [95, 108], [110, 118]], "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], "201668": [[78, 157]], "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], "201678": [[1, 120]], "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], "201692": [[78, 81], [83, 180]], "201705": [[65, 73], [75, 109], [111, 187]], "201706": [[1, 62]], "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], "201708": [[1, 87]], "201718": [[58, 113]], "201727": [[67, 185]], "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], "201794": [[58, 100]], "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], "201816": [[1, 72], [74, 105], [107, 157]], "201817": [[1, 274]], "201818": [[1, 1]], "201819": [[1, 94], [96, 241]], "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], "202012": [[98, 121], [126, 131]], "202013": [[1, 2], [5, 35], [38, 57]], "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], "202074": [[66, 174]], "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], "202088": [[1, 286]], "202093": [[1, 104], [107, 320], [322, 360]], "202116": [[59, 64]], "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], "202205": [[94, 114]], "202209": [[1, 48], [51, 159]], "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], "202305": [[1, 89], [92, 130], [133, 323]], "202314": [[67, 104], [107, 265], [268, 284]], "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], "202333": [[1, 251]], "202389": [[81, 182], [185, 190], [192, 203]], "202469": [[87, 158], [160, 174], [177, 352]], "202472": [[1, 96], [99, 112]], "202477": [[1, 129], [131, 150]], "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 909], [913, 1408]], "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]]} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt new file mode 100644 index 00000000000..a6bb7018583 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt @@ -0,0 +1 @@ +{"190645": [[10, 110]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 40]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 158]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], "198049": [[1, 11], [14, 57]], "198050": [[2, 155]], "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], "198207": [[1, 97]], "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], "198210": [[1, 221]], "198212": [[1, 574]], "198213": [[1, 107]], "198215": [[1, 12]], "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], "198249": [[1, 7]], "198269": [[3, 199], [201, 201], [203, 203]], "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], "198346": [[44, 57]], "198372": [[57, 114]], "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], "198522": [[65, 144], [147, 208]], "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], "198954": [[108, 156], [159, 277]], "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], "199011": [[1, 11], [13, 27]], "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], "199318": [[65, 138]], "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], "199564": [[1, 3]], "199569": [[1, 2], [5, 136], [139, 367]], "199570": [[1, 17]], "199571": [[1, 184], [186, 360], [363, 561]], "199572": [[1, 317]], "199573": [[1, 22]], "199574": [[1, 53], [56, 153], [156, 246]], "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], "199698": [[72, 94], [96, 127]], "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], "199703": [[1, 94], [97, 482], [485, 539]], "199739": [[66, 174]], "199745": [[137, 143]], "199751": [[103, 119], [121, 127]], "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], "199753": [[1, 59]], "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], "199812": [[70, 141], [144, 163], [182, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], "199862": [[59, 142]], "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], "199868": [[1, 26]], "199875": [[70, 150], [152, 334]], "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], "199961": [[1, 211], [213, 292]], "199973": [[73, 96]], "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], "200042": [[1, 110], [112, 536]], "200049": [[1, 177]], "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], "200152": [[74, 152]], "200180": [[1, 18]], "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 624], [627, 629]], "200243": [[69, 103], [106, 139]], "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], "200368": [[72, 180]], "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], "200466": [[134, 274]], "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], "200515": [[97, 183]], "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], "200532": [[1, 59]], "200599": [[75, 129], [132, 137]], "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], "200961": [[1, 115]], "200976": [[94, 164]], "200990": [[75, 143]], "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], "200992": [[1, 405], [408, 434], [436, 581]], "201062": [[78, 270]], "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], "201114": [[1, 14]], "201115": [[1, 75]], "201159": [[70, 211]], "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], "201173": [[1, 194], [197, 586]], "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], "201193": [[1, 19]], "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], "201197": [[1, 23]], "201202": [[1, 437]], "201229": [[1, 5], [8, 26], [29, 77]], "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], "201554": [[70, 86], [88, 114], [116, 127]], "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], "201611": [[87, 145], [149, 182], [184, 186]], "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], "201624": [[83, 92], [95, 240], [270, 270]], "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], "201657": [[77, 93], [95, 108], [110, 118]], "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], "201668": [[78, 157]], "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], "201678": [[1, 120]], "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], "201692": [[78, 81], [83, 180]], "201705": [[65, 73], [75, 109], [111, 187]], "201706": [[1, 62]], "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], "201708": [[1, 87]], "201718": [[58, 113]], "201727": [[67, 185]], "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], "201794": [[58, 100]], "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], "201816": [[1, 72], [74, 105], [107, 157]], "201817": [[1, 274]], "201818": [[1, 1]], "201819": [[1, 94], [96, 241]], "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], "202012": [[98, 121], [126, 131]], "202013": [[1, 2], [5, 35], [38, 57]], "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], "202074": [[66, 174]], "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], "202088": [[1, 286]], "202093": [[1, 104], [107, 320], [322, 360]], "202116": [[59, 64]], "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], "202205": [[94, 114]], "202209": [[1, 48], [51, 159]], "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], "202305": [[1, 89], [92, 130], [133, 323]], "202314": [[67, 104], [107, 265], [268, 284]], "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], "202333": [[1, 251]], "202389": [[81, 182], [185, 190], [192, 203]], "202469": [[87, 158], [160, 174], [177, 352]], "202472": [[1, 96], [99, 112]], "202477": [[1, 129], [131, 150]], "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 1408]], "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]], "203894": [[82, 272], [275, 477], [480, 902], [905, 1322]], "203909": [[79, 113], [116, 117], [120, 140], [143, 382]], "203912": [[1, 306], [308, 566], [569, 609], [611, 698], [701, 820], [823, 865], [867, 1033], [1035, 1321]], "203985": [[1, 10]], "203986": [[1, 45]], "203987": [[1, 9], [12, 241], [243, 339], [342, 781], [784, 1014]], "203991": [[1, 3]], "203992": [[1, 15]], "203994": [[1, 56], [59, 136], [139, 304], [306, 342], [344, 425]], "204100": [[117, 139]], "204101": [[1, 83]], "204113": [[82, 96], [98, 102], [105, 127], [129, 191], [194, 258], [261, 327], [329, 388], [390, 400], [402, 583], [585, 690], [693, 693], [696, 696]], "204114": [[1, 364]], "204238": [[23, 52], [55, 60]], "204250": [[92, 118], [121, 177], [179, 285], [287, 336], [339, 400], [403, 521], [524, 543], [546, 682], [684, 803]], "204511": [[1, 60]], "204541": [[5, 39], [42, 42], [44, 139], [142, 149], [151, 204]], "204544": [[1, 11], [13, 93], [96, 195], [197, 224], [226, 334], [337, 426]], "204552": [[1, 9]], "204553": [[1, 51], [53, 60], [63, 101], [103, 104]], "204554": [[1, 5], [7, 221], [224, 455], [458, 470], [472, 481], [483, 514]], "204555": [[1, 329], [331, 334]], "204563": [[91, 99], [102, 178], [180, 219], [222, 229], [231, 364], [366, 366], [369, 470], [473, 524], [527, 571]], "204564": [[1, 84], [87, 89], [92, 159], [161, 187], [190, 191], [193, 293], [296, 315], [317, 340], [343, 427], [429, 434], [437, 735], [737, 855], [858, 1206], [1209, 1248], [1251, 1284]], "204565": [[1, 48]], "204566": [[1, 12]], "204567": [[1, 38]], "204576": [[49, 192], [195, 301]], "204577": [[1, 46], [49, 64], [67, 105], [107, 170], [173, 181], [183, 193], [196, 653], [656, 669], [671, 740], [742, 913], [915, 1057], [1059, 1115], [1117, 1287]], "204599": [[73, 83], [85, 94], [97, 121], [124, 125], [128, 173], [175, 240], [243, 245], [248, 264], [266, 292], [294, 335]], "204601": [[1, 25], [28, 62], [65, 80], [83, 89], [92, 290], [292, 563], [565, 591], [593, 652], [655, 780], [783, 812], [814, 892], [894, 984], [986, 1003], [1006, 1038], [1040, 1088], [1091, 1102], [1105, 1161], [1164, 1255]], "205086": [[95, 149]], "205111": [[88, 390], [392, 441], [444, 449]], "205158": [[81, 289], [292, 313], [315, 473], [476, 591], [594, 595], [597, 612], [615, 663], [665, 667], [672, 685], [687, 733], [736, 741]], "205193": [[80, 109], [111, 349], [352, 486], [488, 650], [652, 712], [714, 902]], "205217": [[1, 12], [16, 111], [113, 171], [174, 250], [253, 322]], "205233": [[94, 153]], "205236": [[1, 190], [193, 207], [209, 260], [263, 331], [334, 352]], "205238": [[1, 6], [9, 199], [202, 254], [256, 304], [306, 355], [358, 381], [384, 596], [598, 621]], "205303": [[35, 54], [90, 132], [135, 153]], "205310": [[76, 306], [309, 313], [316, 316], [319, 321], [324, 457], [460, 559]], "205311": [[1, 85], [88, 92], [95, 183], [186, 395], [397, 592], [595, 910], [913, 1260]], "205339": [[71, 175], [178, 213], [216, 230], [233, 262], [265, 404]], "205344": [[1, 83], [86, 104], [106, 359], [362, 431], [433, 949], [951, 967], [969, 1127], [1129, 1346], [1348, 1586]], "205515": [[82, 201], [203, 216]], "205519": [[1, 47], [50, 172], [175, 367], [370, 386], [389, 472]], "205526": [[1, 269], [272, 277], [280, 332]], "205614": [[1, 4], [7, 40]], "205617": [[1, 29], [32, 102], [105, 123], [125, 140], [143, 264], [266, 448], [451, 532], [534, 547]], "205618": [[1, 12]], "205620": [[1, 175]], "205666": [[60, 119], [122, 165], [168, 259], [261, 322], [325, 578], [580, 594], [597, 721], [724, 739]], "205667": [[1, 165], [168, 282], [285, 318], [321, 412], [415, 689], [692, 751], [754, 774], [777, 1109]], "205683": [[76, 82], [85, 178], [181, 198], [201, 305]], "205690": [[1, 40]], "205694": [[1, 205], [208, 230], [233, 347], [350, 452], [455, 593], [595, 890]], "205718": [[49, 75], [78, 97], [100, 103], [105, 176], [178, 338], [341, 361], [363, 524], [527, 531], [534, 589], [591, 734]], "205774": [[1, 80]], "205777": [[1, 9]], "205781": [[1, 89], [91, 197], [200, 509]], "205826": [[80, 232], [235, 303], [306, 469]], "205833": [[84, 86], [89, 121], [123, 155], [157, 165], [167, 173], [176, 219], [221, 267], [270, 312], [315, 346], [350, 355], [360, 366]], "205834": [[1, 12], [14, 202]], "205908": [[68, 200], [202, 214]], "205921": [[22, 73], [76, 268], [271, 394], [397, 401], [410, 428], [431, 498], [500, 571], [574, 779], [782, 853]], "206066": [[89, 155]], "206088": [[86, 159], [161, 178], [181, 199], [202, 286]], "206102": [[83, 116], [120, 130], [133, 208], [211, 235], [238, 246], [249, 278], [281, 349]], "206187": [[107, 169], [172, 242], [245, 288], [290, 340], [343, 427], [429, 435], [437, 486], [489, 569], [571, 647], [649, 662], [664, 708]], "206188": [[1, 40], [42, 58]], "206199": [[1, 75], [77, 82], [85, 117]], "206207": [[82, 130], [132, 176], [179, 194], [196, 388], [390, 419], [422, 447], [450, 569], [572, 690]], "206208": [[1, 470], [472, 518]], "206210": [[11, 25], [28, 275], [277, 298], [300, 383], [386, 469]], "206243": [[62, 169], [172, 196], [199, 354], [357, 433], [435, 448], [451, 533], [536, 554], [557, 723], [726, 905]], "206245": [[1, 62]], "206246": [[1, 14], [16, 237], [240, 285], [288, 407], [412, 676], [678, 704], [706, 785], [787, 962], [965, 997], [1000, 1198], [1201, 1290]], "206257": [[1, 29]], "206258": [[1, 36], [39, 223], [226, 249]], "206302": [[1, 8], [11, 33], [36, 44], [47, 82], [84, 108], [110, 149], [151, 186], [189, 229], [231, 232], [234, 241], [243, 276]], "206303": [[1, 19], [23, 286]], "206304": [[1, 4], [6, 70]], "206331": [[91, 222], [225, 314]], "206389": [[88, 185], [187, 249], [252, 272], [275, 392]], "206391": [[1, 55], [57, 98]], "206401": [[69, 90], [92, 194], [197, 210], [212, 249], [251, 265], [267, 411]], "206446": [[92, 141], [143, 159], [162, 205], [208, 301], [304, 442], [445, 445], [448, 474], [476, 616], [619, 872], [874, 910], [912, 948], [950, 989], [992, 1030], [1033, 1075], [1109, 1149]], "206448": [[1, 143], [145, 559], [561, 1170], [1173, 1231], [1235, 1237]], "206466": [[24, 137], [140, 277], [280, 296], [299, 303], [306, 405], [407, 419], [422, 477], [480, 511], [514, 682]], "206476": [[73, 129], [133, 137], [140, 141], [143, 219]], "206477": [[1, 14], [16, 31], [33, 41], [44, 51], [53, 70], [73, 75], [77, 89], [91, 94], [97, 115], [118, 184]], "206478": [[1, 27], [29, 136], [139, 147]], "206484": [[73, 95], [98, 133], [136, 163], [166, 186], [189, 384], [387, 463], [465, 551], [554, 554], [556, 673]], "206512": [[91, 123], [125, 133], [136, 161], [163, 190], [193, 201], [203, 212], [214, 332], [334, 584], [587, 604], [607, 1005], [1008, 1123], [1126, 1163], [1165, 1211]], "206513": [[3, 39], [42, 188], [191, 234], [237, 238], [241, 329]], "206542": [[1, 115], [117, 165], [168, 511], [514, 547], [550, 603], [606, 668], [671, 727], [730, 739], [741, 836]], "206550": [[77, 132], [135, 155]], "206572": [[37, 47]], "206573": [[2, 14]], "206574": [[1, 87]], "206575": [[1, 7], [10, 10], [12, 75]], "206594": [[72, 107], [110, 246], [249, 281]], "206595": [[1, 34], [37, 42], [45, 193]], "206596": [[1, 13], [15, 220], [222, 228], [231, 236], [239, 292], [295, 695], [697, 728], [730, 810]], "206598": [[1, 81], [83, 103], [105, 588], [591, 657], [659, 719]], "206605": [[1, 36], [39, 82]], "206744": [[49, 157], [160, 192], [195, 395], [398, 452]], "206745": [[1, 81], [84, 199], [202, 224], [227, 237], [240, 304], [306, 318], [321, 720], [723, 796], [799, 894], [897, 944], [946, 1106], [1108, 1524], [1527, 1862], [1988, 1996]], "206859": [[79, 210], [212, 258], [260, 323], [325, 356], [359, 609], [612, 681], [684, 732], [734, 768], [771, 808], [811, 827], [830, 848]], "206866": [[1, 30], [33, 113], [115, 274]], "206868": [[1, 3], [10, 16]], "206869": [[1, 251], [253, 271], [274, 502], [507, 520], [522, 566], [568, 752]], "206897": [[1, 34], [38, 61], [63, 102], [109, 109], [111, 112], [114, 131], [133, 137]], "206901": [[1, 98]], "206906": [[1, 31], [38, 94], [96, 136], [138, 139], [142, 149], [151, 175], [177, 218]], "206940": [[1, 151], [153, 153], [155, 298], [301, 382], [384, 712], [715, 803], [805, 960], [963, 1027]], "207099": [[83, 134], [137, 172], [175, 213], [216, 314], [316, 320], [323, 330], [333, 367], [370, 481], [484, 602], [605, 755], [757, 1046], [1048, 1171]], "207100": [[1, 91], [94, 98]], "207214": [[57, 112], [114, 177], [179, 181], [184, 196], [199, 220], [223, 262], [265, 405], [408, 482], [485, 640], [643, 708], [718, 757], [759, 808], [811, 829]], "207217": [[1, 32]], "207219": [[1, 112]], "207220": [[1, 160]], "207221": [[1, 102]], "207222": [[1, 17], [20, 289]], "207231": [[70, 84], [86, 121], [123, 184], [187, 189], [192, 303], [306, 354], [357, 481], [484, 504], [508, 549], [552, 626], [628, 690], [693, 875], [878, 1000], [1003, 1170], [1173, 1187], [1189, 1227], [1229, 1415], [1418, 1445], [1447, 1505]], "207233": [[1, 119], [121, 155]], "207269": [[80, 394], [397, 436], [439, 463], [466, 551], [568, 577]], "207273": [[3, 877]], "207279": [[68, 138], [141, 149], [151, 237], [240, 266], [269, 307], [309, 416], [498, 551], [554, 640], [643, 961], [963, 1095], [1098, 1160]], "207320": [[1, 110], [112, 350]], "207371": [[72, 117], [120, 124]], "207372": [[1, 27], [30, 113], [116, 154], [156, 174], [176, 478], [480, 501]], "207397": [[32, 77], [80, 140], [143, 179]], "207398": [[1, 14], [16, 35]], "207454": [[79, 95], [98, 123], [126, 259], [261, 363], [365, 458], [461, 498], [501, 609], [612, 632], [635, 781], [784, 866], [869, 974], [977, 1064], [1067, 1079], [1081, 1321], [1323, 1464], [1467, 1569], [1571, 1604], [1607, 1712], [1714, 1988]], "207469": [[1, 31], [34, 51]], "207477": [[76, 104], [107, 111], [114, 147], [150, 295], [298, 483], [486, 494], [497, 527], [530, 563], [565, 570]], "207487": [[50, 98], [101, 311], [313, 359], [363, 468], [471, 472]], "207488": [[1, 63], [66, 92], [95, 113], [116, 198], [200, 250], [252, 288], [291, 365], [368, 377], [379, 440]], "207490": [[1, 48], [51, 111]], "207491": [[1, 176], [179, 458]], "207492": [[1, 20], [23, 298]], "207515": [[79, 109], [112, 132], [134, 208], [211, 225], [228, 320], [322, 381], [383, 498], [500, 730], [733, 849], [851, 954], [957, 994], [997, 1052], [1055, 1143], [1145, 1211]], "207517": [[1, 12], [15, 57]], "207518": [[1, 59], [61, 83]], "207882": [[22, 45]], "207883": [[1, 1], [3, 4], [7, 75]], "207884": [[1, 106], [108, 183]], "207885": [[1, 90]], "207886": [[1, 30], [32, 90], [92, 156], [158, 166], [168, 171]], "207889": [[1, 43], [47, 57], [60, 303], [306, 442], [445, 445], [447, 551], [553, 731], [733, 907], [910, 945]], "207898": [[1, 33], [36, 57], [60, 235], [239, 257], [260, 288]], "207905": [[75, 196], [198, 281], [284, 329], [331, 402], [404, 565], [568, 672], [675, 805], [807, 850], [852, 861], [864, 884], [886, 1180], [1183, 1283], [1285, 1331], [1333, 1515], [1518, 1734], [1737, 1796]], "207920": [[84, 146], [149, 241], [243, 261], [264, 291], [294, 486], [489, 518], [520, 598], [600, 708], [710, 826]], "207921": [[1, 37], [40, 58]], "207922": [[1, 69], [71, 100], [103, 126], [129, 242], [274, 291]], "207924": [[1, 52], [54, 171], [173, 178], [181, 339]], "208307": [[2, 42], [45, 45], [47, 70], [72, 147], [150, 252], [256, 259], [262, 275], [278, 342], [345, 450], [453, 527], [530, 583], [586, 605], [608, 616], [618, 667], [670, 761], [763, 798], [800, 889], [891, 893], [896, 1055], [1057, 1205], [1208, 1294], [1297, 1328]], "208339": [[77, 89], [91, 122], [125, 208], [211, 346], [349, 363]], "208341": [[1, 84], [86, 117], [120, 513], [515, 685], [688, 693], [695, 775], [777, 824]], "208351": [[83, 97], [100, 356], [359, 369]], "208353": [[1, 76], [78, 269], [271, 348]], "208357": [[1, 70], [73, 507]], "208390": [[72, 128], [130, 169]], "208391": [[52, 82], [84, 162], [164, 216], [219, 493], [495, 498], [500, 523], [526, 533], [535, 588], [591, 660], [663, 869]], "208427": [[49, 89], [92, 161], [164, 164], [166, 173], [175, 268], [271, 312], [315, 315], [317, 335], [337, 361], [364, 402], [404, 422], [425, 577], [580, 647]], "208428": [[1, 58], [61, 68], [70, 156], [159, 227]], "208429": [[1, 56], [59, 139], [141, 159], [162, 237], [240, 440], [442, 452], [455, 589], [592, 712], [715, 922]], "208487": [[2, 26], [29, 159], [161, 307], [309, 459], [462, 476], [479, 632]], "208509": [[71, 232]], "208538": [[2, 43]], "208540": [[1, 26], [29, 98]], "208541": [[1, 57], [59, 173], [175, 376], [378, 417]], "208551": [[119, 193], [195, 212], [215, 300], [303, 354], [356, 554], [557, 580]], "208686": [[73, 79], [82, 181], [183, 224], [227, 243], [246, 311], [313, 463]]} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx b/EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx new file mode 100644 index 00000000000..c68d6cc415f --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx @@ -0,0 +1,339 @@ +#include +#include "TFile.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TString.h" +#include "TCanvas.h" +#include "TPad.h" +#include "TLegend.h" +#include "TStyle.h" +#include "TH2F.h" +#include "TMath.h" + + + +int nEtaBinsEB = 1; +int nEtaBinsEE = 1; + +void CombineMomentumCalibration() +{ + gROOT->SetStyle("Plain"); + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetStatFont(42); + gStyle->SetStatFontSize(0.05); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(10111); + gStyle->SetOptFit(1); + gStyle->SetPalette(1); + gROOT->ForceStyle(); + + TFile *f1 = TFile::Open("output/MomentumCalibration2011_fede_eta1_eta1.root"); + TFile *f2 = TFile::Open("output/MomentumCalibration2012_fede_eta1_eta1.root"); + TFile *f3 = new TFile("output/MomentumCalibrationCombined_2011AB-2012ABC_fede_eta1_eta1.root","RECREATE"); + f3->cd(); + + double x,y; + + + + //------- + // Barrel + + for(int etaBin = 0; etaBin < nEtaBinsEB; ++etaBin) + { + TString Name = Form("g_EoC_EB_%d",etaBin); + TGraphErrors* g_EoC_EB_1 = (TGraphErrors*)f1->Get(Name); + double yAvg_EB_1 = 0.; + int nGoodPoints_EB_1 = 0; + for(int point = 0; point < g_EoC_EB_1->GetN(); ++point) + { + g_EoC_EB_1 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EB_1 += y; + ++nGoodPoints_EB_1; + } + } + yAvg_EB_1 /= nGoodPoints_EB_1; + std::cout << "*** EB_" << etaBin << "_1 yScale: " << yAvg_EB_1 << std::endl; + + + TString Name = Form("g_EoC_EB_%d",etaBin); + TGraphErrors* g_EoC_EB_2 = (TGraphErrors*)f2->Get(Name); + double yAvg_EB_2 = 0.; + int nGoodPoints_EB_2 = 0; + for(int point = 0; point < g_EoC_EB_2->GetN(); ++point) + { + g_EoC_EB_2 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EB_2 += y; + ++nGoodPoints_EB_2; + } + } + yAvg_EB_2 /= nGoodPoints_EB_2; + std::cout << "*** EB_" << etaBin << "_2 yScale: " << yAvg_EB_2 << std::endl; + + + + g_EoC_EB_1 -> SetMarkerStyle(20); + g_EoC_EB_1 -> SetMarkerSize(1); + g_EoC_EB_1 -> SetMarkerColor(kGreen+1); + g_EoC_EB_1 -> SetLineColor(kGreen+1); + + g_EoC_EB_2 -> SetMarkerStyle(20); + g_EoC_EB_2 -> SetMarkerSize(1); + g_EoC_EB_2 -> SetMarkerColor(kRed+1); + g_EoC_EB_2 -> SetLineColor(kRed+1); + + TGraphErrors* g_Diff_EB = (TGraphErrors*)g_EoC_EB_1->Clone(0); + TGraphErrors* g_Corr_EB = (TGraphErrors*)g_EoC_EB_1->Clone(0); + + g_Diff_EB -> SetMarkerStyle(20); + g_Diff_EB -> SetMarkerSize(1); + g_Diff_EB -> SetMarkerColor(kBlue+2); + g_Diff_EB -> SetLineColor(kBlue+2); + + g_Corr_EB -> SetMarkerStyle(20); + g_Corr_EB -> SetMarkerSize(1); + g_Corr_EB -> SetMarkerColor(kBlack); + g_Corr_EB -> SetLineColor(kBlack); + + + for(int jPoint = 0; jPoint < g_EoC_EB_1->GetN(); jPoint++) + { + double x1,y1,ex1,ey1; + double x2,y2,ex2,ey2; + g_EoC_EB_1->GetPoint(jPoint,x1,y1); + ex1= g_EoC_EB_1->GetErrorX(jPoint); + ey1= g_EoC_EB_1->GetErrorY(jPoint); + + g_EoC_EB_2->GetPoint(jPoint,x2,y2); + ex2= g_EoC_EB_2->GetErrorX(jPoint); + ey2= g_EoC_EB_2->GetErrorY(jPoint); + + g_Corr_EB ->SetPoint(jPoint,x1,(y2+y1)/2); + g_Corr_EB ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + + g_Diff_EB ->SetPoint(jPoint,x1,(y2-y1)/2); + g_Diff_EB ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + } + + + float phiLim = 360; + Name = Form("g_fit_EB_%d",etaBin); + TCanvas* c_g_fit_EB = new TCanvas(Name, Name,100,100,800,600); + Name = Form("pad_0_EB_%d",etaBin); + TPad *cLower_EB = new TPad(Name,Name,0.01,0.00,0.99,0.30); + Name = Form("pad_1_EB_%d",etaBin); + TPad *cUpper_EB = new TPad(Name,Name,0.01,0.30,0.99,0.99); + + cLower_EB->SetBottomMargin(0.25); cUpper_EB->SetTopMargin(0.01); + cUpper_EB->SetBottomMargin(0.01); + + cLower_EB->Draw(); + cUpper_EB->Draw(); + + float FontSCF = cUpper_EB->GetHNDC()/cLower_EB->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + cUpper_EB -> cd(); + gPad->SetGrid(); + + TH1F *hPad_EB = (TH1F*)gPad->DrawFrame(-3.15,0.95,3.15,1.05); + hPad_EB->GetXaxis()->SetLabelSize(labSize); + hPad_EB->GetXaxis()->SetTitleSize(labSize); + hPad_EB->GetYaxis()->SetLabelSize(labSize); + hPad_EB->GetYaxis()->SetTitleSize(labSize); + hPad_EB->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EB->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto p"); + + g_EoC_EB_1 -> Draw("PL"); + g_EoC_EB_2 -> Draw("PL"); + //g_Corr_EB -> Draw("PL"); + + + TLegend *tl_EB = new TLegend(0.80,0.80,0.90,0.95); + tl_EB -> SetTextFont(40); + tl_EB -> SetFillColor(0); + //tl -> SetBorderSize(0); + tl_EB -> AddEntry(g_EoC_EB_1,"Data 2011 EB","PL"); + tl_EB -> AddEntry(g_EoC_EB_2,"Data 2012 EB","PL"); + //tl_EB -> AddEntry(g_Corr_EB,"2011-2012 Combined","PL"); + + tl_EB -> Draw(); + + cLower_EB -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EB = (TH1F*)gPad->DrawFrame(-3.15,-0.01,3.15,0.01); + hRat_EB->GetYaxis()->SetNdivisions(505); + hRat_EB->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EB->GetXaxis()->SetTitleOffset(0.6); + hRat_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EB->GetYaxis()->SetTitle("Spread/2"); + g_Diff_EB->Draw("PL"); + + Name = Form("g_EoC_EB_%d",etaBin); + g_Corr_EB->Write(Name); + } + + + + //-------- + // Endcaps + + for(int etaBin = 0; etaBin < nEtaBinsEE; ++etaBin) + { + TString Name = Form("g_EoC_EE_%d",etaBin); + TGraphErrors* g_EoC_EE_1 = (TGraphErrors*)f1->Get(Name); + double yAvg_EE_1 = 0.; + int nGoodPoints_EE_1 = 0; + for(int point = 0; point < g_EoC_EE_1->GetN(); ++point) + { + g_EoC_EE_1 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EE_1 += y; + ++nGoodPoints_EE_1; + } + } + yAvg_EE_1 /= nGoodPoints_EE_1; + std::cout << "*** EE_" << etaBin << "_1 yScale: " << yAvg_EE_1 << std::endl; + + Name= Form("g_EoC_EE_%d",etaBin); + TGraphErrors* g_EoC_EE_2 = (TGraphErrors*)f2->Get(Name); + double yAvg_EE_2 = 0.; + int nGoodPoints_EE_2 = 0; + for(int point = 0; point < g_EoC_EE_2->GetN(); ++point) + { + g_EoC_EE_2 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EE_2 += y; + ++nGoodPoints_EE_2; + } + } + yAvg_EE_2 /= nGoodPoints_EE_2; + std::cout << "*** EE_" << etaBin << "_2 yScale: " << yAvg_EE_2 << std::endl; + + + g_EoC_EE_1 -> SetMarkerStyle(20); + g_EoC_EE_1 -> SetMarkerSize(1); + g_EoC_EE_1 -> SetMarkerColor(kGreen+1); + g_EoC_EE_1 -> SetLineColor(kGreen+1); + + g_EoC_EE_2 -> SetMarkerStyle(20); + g_EoC_EE_2 -> SetMarkerSize(1); + g_EoC_EE_2 -> SetMarkerColor(kRed+1); + g_EoC_EE_2 -> SetLineColor(kRed+1); + + TGraphErrors* g_Diff_EE = (TGraphErrors*)g_EoC_EE_1->Clone(0); + TGraphErrors* g_Corr_EE = (TGraphErrors*)g_EoC_EE_1->Clone(0); + + g_Diff_EE -> SetMarkerStyle(20); + g_Diff_EE -> SetMarkerSize(1); + g_Diff_EE -> SetMarkerColor(kBlue+2); + g_Diff_EE -> SetLineColor(kBlue+2); + + g_Corr_EE -> SetMarkerStyle(20); + g_Corr_EE -> SetMarkerSize(1); + g_Corr_EE -> SetMarkerColor(kBlack); + g_Corr_EE -> SetLineColor(kBlack); + + + for(int jPoint = 0; jPoint < g_EoC_EE_1->GetN() ; jPoint++) + { + double x1,y1,ex1,ey1; + double x2,y2,ex2,ey2; + g_EoC_EE_1->GetPoint(jPoint,x1,y1); + ex1= g_EoC_EE_1->GetErrorX(jPoint); + ey1= g_EoC_EE_1->GetErrorY(jPoint); + + g_EoC_EE_2->GetPoint(jPoint,x2,y2); + ex2= g_EoC_EE_2->GetErrorX(jPoint); + ey2= g_EoC_EE_2->GetErrorY(jPoint); + + g_Diff_EE ->SetPoint(jPoint,x1,(y2-y1)/2); + g_Diff_EE ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + + g_Corr_EE ->SetPoint(jPoint,x1,(y2+y1)/2); + g_Corr_EE ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + } + + + Name = Form("g_fit_EE_%d",etaBin); + + TCanvas* c_g_fit_EE = new TCanvas(Name, Name,100,100,800,600); + TPad *cLower_EE = new TPad("pad_0_EE","pad_0_EE",0.01,0.00,0.99,0.30); + TPad *cUpper_EE = new TPad("pad_1_EE","pad_1_EE",0.01,0.30,0.99,0.99); + + cLower_EE->SetBottomMargin(0.25); cUpper_EE->SetTopMargin(0.01); + cUpper_EE->SetBottomMargin(0.01); + + cLower_EE->Draw(); + cUpper_EE->Draw(); + + float FontSCF = cUpper_EE->GetHNDC()/cLower_EE->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + float phiLim = 360.; + cUpper_EE -> cd(); + gPad->SetGrid(); + TH1F *hPad_EE = (TH1F*)gPad->DrawFrame(-3.15,0.90,3.15,1.10); + hPad_EE->GetXaxis()->SetLabelSize(labSize); + hPad_EE->GetXaxis()->SetTitleSize(labSize); + hPad_EE->GetYaxis()->SetLabelSize(labSize); + hPad_EE->GetYaxis()->SetTitleSize(labSize); + hPad_EE->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EE->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto 1/p"); + + g_EoC_EE_1 -> Draw("PL"); + g_EoC_EE_2 -> Draw("PL"); + //g_Corr_EE -> Draw("PL"); + + TLegend *tl_EE = new TLegend(0.80,0.80,0.90,0.95); + tl_EE -> SetTextFont(40); + tl_EE -> SetFillColor(0); + //tl -> SetBorderSize(0); + tl_EE -> AddEntry(g_EoC_EE_1,"Data 2011 EE","PL"); + tl_EE -> AddEntry(g_EoC_EE_2,"Data 2012 EE","PL"); + //tl_EE -> AddEntry(g_Corr_EE,"2011-2012 Combination EE","PL"); + + tl_EE -> Draw(); + + cLower_EE -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EE = (TH1F*)gPad->DrawFrame(-3.15,-0.03,3.15,0.03); + hRat_EE->GetYaxis()->SetNdivisions(505); + hRat_EE->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EE->GetXaxis()->SetTitleOffset(0.6); + hRat_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EE->GetYaxis()->SetTitle("Spread/2"); + g_Diff_EE->Draw("PL"); + + Name = Form("g_EoC_EE_%d",etaBin); + g_Corr_EE->Write(Name); + } + + + f3->Close(); +} diff --git a/EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx b/EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx new file mode 100644 index 00000000000..a261f1522e9 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx @@ -0,0 +1,144 @@ +// To compare two sets of IC +// Input needed: two set of IC (2D maps) +{ + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + + TFile *f1 = TFile::Open("calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B.root"); + TFile *f2 = TFile::Open("calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B_new.root"); + + // input coeff + TH2F *hcmap1 = (TH2F*)f1->Get("h_scale_map"); + TH2F *hcmap2 = (TH2F*)f2->Get("h_scale_map"); + TH2F *hemap1 = (TH2F*)f1->Get("h_error_map"); + TH2F *hemap2 = (TH2F*)f2->Get("h_error_map"); + + // output histos + TH2F * h2 = new TH2F("h2","h2",400,0.5,1.5,400,0.5,1.5); + TH2F * h2diff = (TH2F*)hcmap1->Clone("h2diff"); + h2diff->Reset(); + + TH1F *hdiff = new TH1F("hdiff", "hdiff", 400,-0.5,0.5); + + char hname[100]; + + TH1F *hspread[172]; + for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hspread_ring_ieta%02d",etaring); + hspread[jbin-1]= new TH1F(hname, hname, 400,-0.5,0.5); + } + + for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ + float c1 = hcmap1->GetBinContent(ibin,jbin); + float c2 = hcmap2->GetBinContent(ibin,jbin); + float e1 = hemap1->GetBinContent(ibin,jbin); + float e2 = hemap2->GetBinContent(ibin,jbin); + if (c1!=0 && c2!=0 && e1!=-1 && e2!=-1){ + hspread[jbin-1]->Fill( c1-c2 ); + h2->Fill(c1,c2); + h2diff->SetBinContent(ibin,jbin,c1-c2); + if (fabs(etaring) < 40) hdiff->Fill(c1-c2); + + } + } + } + + + TGraphErrors *sigma_vs_ieta = new TGraphErrors(); + sigma_vs_ieta->SetMarkerStyle(20); + sigma_vs_ieta->SetMarkerSize(1); + sigma_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *rms_vs_ieta = new TGraphErrors(); + rms_vs_ieta->SetMarkerStyle(24); + rms_vs_ieta->SetMarkerSize(1); + rms_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_ieta = new TGraphErrors(); + scale_vs_ieta->SetMarkerStyle(20); + scale_vs_ieta->SetMarkerSize(1); + scale_vs_ieta->SetMarkerColor(kBlue+2); + + TF1 *fgaus = new TF1("fgaus","gaus",-1,1); + int np = 0; + for (int i = 1; i < hcmap1-> GetNbinsY(); i++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(i); + if (int(etaring)==0) continue; + if ( hspread[i-1]->GetEntries() == 0) continue; + hspread[i-1]->Fit("fgaus","Q"); + np++; + sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + sigma_vs_ieta-> SetPointError(np,0,fgaus->GetParError(2)); + rms_vs_ieta -> SetPoint(np,etaring, hspread[i-1]->GetRMS()); + rms_vs_ieta -> SetPointError(np,0,hspread[i-1]->GetRMSError() ); + scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); + scale_vs_ieta-> SetPointError(np,0,fgaus->GetParError(1)); + } + + // plot + + TCanvas *csigma = new TCanvas("csigma","csigma"); + csigma->SetGridx(); + csigma->SetGridy(); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + sigma_vs_ieta->Draw("ap"); + //rms_vs_ieta->Draw("psame"); + + TCanvas *cscale = new TCanvas("cscale","cscale"); + cscale->SetGridx(); + cscale->SetGridy(); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + scale_vs_ieta->Draw("ap"); + + TCanvas *cmap2 = new TCanvas("cmap2","cmap2",500,500); + cmap2->SetGridx(); + cmap2->SetGridy(); + cmap2 -> cd(); + cmap2->SetLeftMargin(0.1); + cmap2->SetRightMargin(0.15); + h2->GetXaxis()->SetRangeUser(0.85,1.15); + h2->GetYaxis()->SetRangeUser(0.85,1.15); + h2->GetXaxis()->SetTitle("C_{1}"); + h2->GetYaxis()->SetTitle("C_{2}"); + h2->Draw("colz"); + + + TCanvas *cdiff = new TCanvas("cdiff","cdiff",700,500); + cdiff->SetGridx(); + cdiff->SetGridy(); + cdiff -> cd(); + cdiff->SetLeftMargin(0.1); + cdiff->SetRightMargin(0.15); + h2diff->GetZaxis()->SetRangeUser(-0.05,0.05); + h2diff->GetXaxis()->SetTitle("i#phi"); + h2diff->GetYaxis()->SetTitle("i#eta"); + h2diff->Draw("colz"); + + +} diff --git a/EOverPCalibration/FastCalibrator/macros/CompareL3Template.C b/EOverPCalibration/FastCalibrator/macros/CompareL3Template.C new file mode 100644 index 00000000000..1df70b5312c --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/CompareL3Template.C @@ -0,0 +1,136 @@ +// +// Compare L3 and Template starting from .txt files (IC mediated on phi ring) +// + +{ + // Set style options + + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + + char TxtFile1[1000] = "/afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/WZAnalysis_SingleEle_Run2011AB.txt"; + char TxtFile2[1000] = "/data2/malberti/Calibration/calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B_new.txt"; + + char buffer[80]; + int Ieta,Iphi; + float IC; + + ifstream file1 (TxtFile1); + ifstream file2 (TxtFile2); + + for (int i=0;i<3;i++) file1.getline (&buffer[0],1000); //skip 3 lines + + TH1F *hL3 = new TH1F("L3","L3",300,0.5,1.5); + TH1F *hTemplate = new TH1F("Template","Template",300,0.5,1.5); + TH1F *hDiff = new TH1F("Diff","Diff",300,-0.5,0.5); + + TH2F *IC_L3 = new TH2F("IC_L3","L3",360,1, 361, 171, -85, 86); + TH2F *IC_Template = new TH2F("IC_Template","Template",360,1, 361, 171, -85, 86); + + TH2F* corr = new TH2F("IC_L3_vs_IC_Template","IC_L3_vs_IC_Template",100,0.8,1.2,100,0.8,1.2); + + while (!file1.eof()){ + + file1.getline (&buffer[0],1000); // read channels + istrstream line (buffer); + line >> Ieta; + line >> Iphi; + line >> IC; + + hL3 -> Fill(IC); + IC_L3 -> Fill(Iphi,Ieta,IC); + + } + + + while (!file2.eof()){ + file2.getline (&buffer[0],1000); // read channels + istrstream line (buffer); + line >> Ieta; + line >> Iphi; + line >> IC; + + if (IC > 1.5 || IC < 0.5) continue; + + hTemplate -> Fill(IC); + IC_Template-> Fill(Iphi,Ieta,IC); + + } + + + for (int iphi=1; iphi<=360; iphi++) + { + for (int ieta=1; ieta<=171; ieta++) + { + if (IC_L3->GetBinContent(iphi,ieta) != 0 && IC_Template->GetBinContent(iphi,ieta) != 0){ + hDiff->Fill( IC_L3->GetBinContent(iphi,ieta) - IC_Template->GetBinContent(iphi,ieta) ); + corr -> Fill(IC_L3->GetBinContent(iphi,ieta),IC_Template->GetBinContent(iphi,ieta)); + + } + } + } + + + TCanvas *c1 = new TCanvas(); + hL3->Draw(); + + TCanvas *c2 = new TCanvas(); + hTemplate->Draw(); + + TCanvas *c3 = new TCanvas(); + IC_L3 -> GetZaxis() -> SetRangeUser(0.93,1.07); + IC_L3->Draw("colz"); + + TCanvas *c4 = new TCanvas(); + IC_Template -> GetZaxis() -> SetRangeUser(0.85,1.15); + IC_Template->Draw("colz"); + + TCanvas *c5 = new TCanvas(); + hDiff->Draw(); + + TCanvas *c6 = new TCanvas(); + corr->GetXaxis()->SetRangeUser(0.8,1.2); + corr->GetYaxis()->SetRangeUser(0.8,1.2); + corr->Draw(); + + double correlation_coeffcient=corr->GetCorrelationFactor(); + double N=corr->GetEntries(); + double t=(fabs(correlation_coeffcient)*sqrt(N-2))/(sqrt(1-pow(fabs(correlation_coeffcient),2))); + double Probability=2*(1-TMath::StudentI(t,N-2)); + + + std::cout<<" Correlation Value = "<GetCorrelationFactor()<<" Probability = "<Print("hL3.png","png"); + c2->Print("hTemplate.png","png"); + c3->Print("IC_L3.png","png"); + c4->Print("IC_Template.png","png"); + c5->Print("hDiff.png","png"); + c6->Print("corr.png","png"); + } + +} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx b/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx new file mode 100644 index 00000000000..e74e6966764 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx @@ -0,0 +1,295 @@ +#include +#include +#include +#include +#include +#include +#include "TStyle.h" +#include "TROOT.h" +#include "TH1F.h" +#include "TH2F.h" +#include +#include "TFile.h" +#include "TCanvas.h" +// +/// Macro to Correct DATA dinamic alpha with MC/MCTruth for phi lines due to the tracker +// + + +void Correction_TrackerEffect_EE_DATA_dinamic_alpha (Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE/fbrem/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_fbrem_EE.root", + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + /// by xtal + int nbins = 250; + + /// Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + cout << "Making calibration plots for: " << infile1 << endl; + + + /// imput file with full statistic normlized to the mean in a ring + + TFile *f = new TFile(infile1,"UPDATE"); + TH2F *hcmap[2]; + hcmap[0] = (TH2F*)f->Get("h_scale_map_EEM"); + hcmap[1] = (TH2F*)f->Get("h_scale_map_EEP"); + + + /// ring geometry for the endcap + TH2F *hrings[2]; + hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)hcmap[1]->Clone("hringsEEP"); + hrings[0] ->Reset("IMCES"); + hrings[1] ->Reset("IMCES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + std::vector number_of_Rings_EEP(40,0); + std::vector number_of_Rings_EEM(40,0); + + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) { hrings[1]->Fill(x,y,ir); + number_of_Rings_EEP.at(ir)++; + } + if(z<0) {hrings[0]->Fill(x,y,ir); + number_of_Rings_EEM.at(ir)++; + } + } + + /// noEp Selections +/* std::vector< std::pair > phi_line_EEM; + phi_line_EEM.push_back(std::pair (16.,1.025)); + phi_line_EEM.push_back(std::pair (59.5,1.047)); + phi_line_EEM.push_back(std::pair (71.5,1.028)); + phi_line_EEM.push_back(std::pair (86.,1.042)); + phi_line_EEM.push_back(std::pair (103.,1.034)); + phi_line_EEM.push_back(std::pair (122.5,1.024)); + phi_line_EEM.push_back(std::pair (145.5,1.016)); + phi_line_EEM.push_back(std::pair (164.,1.034)); + phi_line_EEM.push_back(std::pair (183.5,1.043)); + phi_line_EEM.push_back(std::pair (203.5,1.026)); + phi_line_EEM.push_back(std::pair (240.,1.043)); + phi_line_EEM.push_back(std::pair (296.5,1.031)); + phi_line_EEM.push_back(std::pair (315.5,1.029)); + phi_line_EEM.push_back(std::pair (356.,1.038)); + + std::vector > phi_line_EEP; + phi_line_EEP.push_back(std::pair (16.5,1.042)); + phi_line_EEP.push_back(std::pair (60.,1.043)); + phi_line_EEP.push_back(std::pair (72.,1.016)); + phi_line_EEP.push_back(std::pair (85.5,1.042)); + phi_line_EEP.push_back(std::pair (103.,1.024)); + phi_line_EEP.push_back(std::pair (122.5,1.025)); + phi_line_EEP.push_back(std::pair (135.,1.035)); + phi_line_EEP.push_back(std::pair (145.,1.016)); + phi_line_EEP.push_back(std::pair (163.,1.034)); + phi_line_EEP.push_back(std::pair (184.,1.033)); + phi_line_EEP.push_back(std::pair (240.,1.054)); + phi_line_EEP.push_back(std::pair (276.,1.026)); + phi_line_EEP.push_back(std::pair (297.,1.043)); + phi_line_EEP.push_back(std::pair (314.,1.024)); + phi_line_EEP.push_back(std::pair (357.,1.055)); +*/ + +/// R9 Selections + + std::vector< std::pair > phi_line_EEM; + phi_line_EEM.push_back(std::pair (16.,1.02244)); + phi_line_EEM.push_back(std::pair (59.5, 1.03235)); + phi_line_EEM.push_back(std::pair (71.5,1.02545)); + phi_line_EEM.push_back(std::pair (86.,1.04242)); + phi_line_EEM.push_back(std::pair (103.,1.02082)); + phi_line_EEM.push_back(std::pair (122.5,1.01224)); + phi_line_EEM.push_back(std::pair (145.5, 1.01207)); + phi_line_EEM.push_back(std::pair (164.,1.02766)); + phi_line_EEM.push_back(std::pair (183.5,1.03397)); + phi_line_EEM.push_back(std::pair (203.5,1.01597)); + phi_line_EEM.push_back(std::pair (240.,1.03305)); + phi_line_EEM.push_back(std::pair (296.5,1.02419)); + phi_line_EEM.push_back(std::pair (315.5,1.02211)); + phi_line_EEM.push_back(std::pair (356.,1.03243)); + + std::vector > phi_line_EEP; + phi_line_EEP.push_back(std::pair (16.5,1.02514)); + phi_line_EEP.push_back(std::pair (60.,1.02929)); + phi_line_EEP.push_back(std::pair (72.,1.01563)); + phi_line_EEP.push_back(std::pair (85.5,1.02029)); + phi_line_EEP.push_back(std::pair (103.,1.02159)); + phi_line_EEP.push_back(std::pair (122.5,1.02598)); + phi_line_EEP.push_back(std::pair (135.,1.0163)); + phi_line_EEP.push_back(std::pair (145.,1.03654)); + phi_line_EEP.push_back(std::pair (163.,1.02249)); + phi_line_EEP.push_back(std::pair (184.,1.04225)); + phi_line_EEP.push_back(std::pair (240.,1.03254)); + phi_line_EEP.push_back(std::pair (276.,1.01565)); + phi_line_EEP.push_back(std::pair (297.,1.03486)); + phi_line_EEP.push_back(std::pair (314.,1.01318)); + phi_line_EEP.push_back(std::pair (357.,1.03728)); + + TH2F *hcmap_corrected[2]; + hcmap_corrected[0] = (TH2F*)hcmap[0]->Clone("h_scale_map_EEM"); + hcmap_corrected[1] = (TH2F*)hcmap[1]->Clone("h_scale_map_EEP"); + hcmap_corrected[0] ->Reset("ICMES"); + hcmap_corrected[1] ->Reset("ICMES"); + hcmap_corrected[0] ->ResetStats(); + hcmap_corrected[1] ->ResetStats(); + + /// Correction of IC map data + + for(int k=0 ; k<2 ; k++) + { + for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) + { + for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) + { + if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; + float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); + if(phi_xtal<0.) phi_xtal=360.+phi_xtal; + if(k==0) + { int flag=0; + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) + { int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEM.at(ivect).first)<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect).first); + else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect).first); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*phi_line_EEM.at(ivect).second); + } + else if(flag==0) {hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1;} + } + } + + else{ int flag=0; + for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) + { + int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEP.at(ivect).first)<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect).first); + else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect).first); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*phi_line_EEP.at(ivect).second); + } + else if(flag==0) + { + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1; + } + } + } + + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP Uncorrected"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap[1]->Draw("COLZ"); + hcmap[1]->GetXaxis() ->SetTitle("ix"); + hcmap[1]->GetYaxis() ->SetTitle("iy"); + hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[0] = new TCanvas("cEEM","cmapEEM Uncorrected"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap[0]->Draw("COLZ"); + hcmap[0]->GetXaxis() ->SetTitle("ix"); + hcmap[0]->GetYaxis() ->SetTitle("iy"); + hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + /// --- plot 0 : map of coefficients + cEEP[1] = new TCanvas("cmapEEP Corrected","cmapEEP Corrected"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[1]->Draw("COLZ"); + hcmap_corrected[1]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[1]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[1] = new TCanvas("cmapEEM Corrected","cmapEEM Corrected"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[0]->Draw("COLZ"); + hcmap_corrected[0]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[0]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + f->cd(); + hcmap_corrected[0]->Write("h_scale_map_corrected_EEM"); + hcmap_corrected[1]->Write("h_scale_map_corrected_EEP"); + + + +} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx b/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx new file mode 100644 index 00000000000..4b3ff1f1c63 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx @@ -0,0 +1,384 @@ +#include +#include +#include +#include +#include +#include +#include "TStyle.h" +#include "TROOT.h" +#include "TH1F.h" +#include "TH2F.h" +#include +#include "TFile.h" +#include "TCanvas.h" +// +/// Macro to produce correction taking MC and MCTruth to apply on data for phi structure due to the tracker +// + + +void Correction_TrackerEffect_EE_MC (Char_t* infile1 = "/afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/output/IC_MC_4Correction.root", + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + /// by xtal + int nbins = 250; + + /// Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + cout << "Making calibration plots for: " << infile1 << endl; + + + /// imput file with full statistic normlized to the mean in a ring + + TFile *f = new TFile(infile1); + TH2F *hcmap[2]; + hcmap[0] = (TH2F*)f->Get("ICComparison_EEM"); + hcmap[1] = (TH2F*)f->Get("ICComparison_EEP"); + + + /// ring geometry for the endcap + TH2F *hrings[2]; + hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)hcmap[0]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICEMS"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + std::vector number_of_Rings_EEP(40,0); + std::vector number_of_Rings_EEM(40,0); + + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) { hrings[1]->Fill(x,y,ir); + number_of_Rings_EEP.at(ir)++; + } + if(z<0) {hrings[0]->Fill(x,y,ir); + number_of_Rings_EEM.at(ir)++; + } + } + /// Declaration of phi structure coordinate + std::vector phi_line_EEM; + phi_line_EEM.push_back(16.); + phi_line_EEM.push_back(59.5); + phi_line_EEM.push_back(71.5); + phi_line_EEM.push_back(83.5); + phi_line_EEM.push_back(105.); + phi_line_EEM.push_back(123.5); + phi_line_EEM.push_back(145.); + phi_line_EEM.push_back(164.); + phi_line_EEM.push_back(183.5); + phi_line_EEM.push_back(203.5); + phi_line_EEM.push_back(240.); + phi_line_EEM.push_back(297.); + phi_line_EEM.push_back(314.5); + phi_line_EEM.push_back(356.5); + + std::vector phi_line_EEP; + phi_line_EEP.push_back(16.5); + phi_line_EEP.push_back(60.); + phi_line_EEP.push_back(72.); + phi_line_EEP.push_back(85.); + phi_line_EEP.push_back(105.); + phi_line_EEP.push_back(123.); + phi_line_EEP.push_back(135.); + phi_line_EEP.push_back(145.); + phi_line_EEP.push_back(163.); + phi_line_EEP.push_back(184.); + phi_line_EEP.push_back(240.); + phi_line_EEP.push_back(287.); + phi_line_EEP.push_back(296.); + phi_line_EEP.push_back(314.); + phi_line_EEP.push_back(356.); + + /// Calcolation of correction factors + std::vector Bad_IC_EEP(phi_line_EEP.size(),0); + std::vector Good_IC_EEP(phi_line_EEP.size(),0); + std::vector Bad_IC_EEM(phi_line_EEM.size(),0); + std::vector Good_IC_EEM(phi_line_EEM.size(),0); + std::vector sum_Bad_IC_EEP(phi_line_EEP.size(),0),sum_Good_IC_EEP(phi_line_EEP.size(),0),sum_Good_IC_EEM(phi_line_EEM.size(),0),sum_Bad_IC_EEM(phi_line_EEM.size(),0); + std::vector num_Bad_IC_EEP(phi_line_EEP.size(),0),num_Good_IC_EEP(phi_line_EEP.size(),0),num_Good_IC_EEM(phi_line_EEM.size(),0),num_Bad_IC_EEM(phi_line_EEM.size(),0); + + TH2F *Bad_EEP = (TH2F*) hcmap[0]->Clone("Bad_EEP"); + TH2F *Bad_EEM = (TH2F*) hcmap[1]->Clone("Bad_EEM"); + Bad_EEP->Reset(); + Bad_EEM->Reset(); + Bad_EEP->ResetStats(); + Bad_EEM->ResetStats(); + + + for(int k=0 ; k<2 ; k++) + { + for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) + { + for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) + { + if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; + float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); + if(phi_xtal<0.) phi_xtal=360.+phi_xtal; + if(k==0) + { + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) + { + float deltaphi=0; + int ir = hrings[0]->GetBinContent(ix,iy); + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; + if(ir>=32) continue; + float dphi=0; + if(fabs(phi_xtal-phi_line_EEM.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect)); + if(dphiGetBinContent(ix,iy)>1.05) continue; + sum_Bad_IC_EEM[ivect]=sum_Bad_IC_EEM[ivect]+hcmap[k]->GetBinContent(ix,iy); + num_Bad_IC_EEM[ivect]++; + Bad_EEM->Fill(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + } + else{ + sum_Good_IC_EEM[ivect] = sum_Good_IC_EEM[ivect] +hcmap[k]->GetBinContent(ix,iy); + num_Good_IC_EEM[ivect]++; + } + } + } + + else{ + for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) + { + int ir = hrings[1]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; + if(ir>=33) continue; + float dphi; + if(fabs(phi_xtal-phi_line_EEP.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect)); + + if(dphiGetBinContent(ix,iy)>1.05) continue; + sum_Bad_IC_EEP[ivect]=sum_Bad_IC_EEP[ivect]+hcmap[k]->GetBinContent(ix,iy); + num_Bad_IC_EEP[ivect]++; + Bad_EEP->Fill(ix,iy,hcmap[k]->GetBinContent(ix,iy));} + else{ + sum_Good_IC_EEP[ivect] = sum_Good_IC_EEP[ivect] +hcmap[k]->GetBinContent(ix,iy); + num_Good_IC_EEP[ivect]++;} + } + + } + } + } + } + /// Vectors of empiric correction factors + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++){ + if(num_Bad_IC_EEM[ivect]!=0) + Bad_IC_EEM.at(ivect)=sum_Bad_IC_EEM[ivect]/num_Bad_IC_EEM[ivect]; + if(num_Good_IC_EEM[ivect]!=0) + Good_IC_EEM.at(ivect)= sum_Good_IC_EEM[ivect]/num_Good_IC_EEM[ivect]; + cout<<" Good/Bad - "<< Good_IC_EEM.at(ivect)/Bad_IC_EEM.at(ivect)<Clone("h_scale_map_EEM"); + hcmap_corrected[1] = (TH2F*)hcmap[1]->Clone("h_scale_map_EEP"); + hcmap_corrected[0] ->Reset("ICMES"); + hcmap_corrected[1] ->Reset("ICMES"); + hcmap_corrected[0] ->ResetStats(); + hcmap_corrected[1] ->ResetStats(); + + for(int k=0 ; k<2 ; k++) + { + for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) + { + for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) + { + if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; + float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); + if(phi_xtal<0.) phi_xtal=360.+phi_xtal; + if(k==0) + { int flag=0; + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) + { + int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEM.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect)); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*Good_IC_EEM.at(ivect)/Bad_IC_EEM.at(ivect)); +// cout<<"original "<GetBinContent(ix,iy)<<" Corrected "<GetBinContent(ix,iy)<SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1;} + } + } + + else{ int flag=0; + for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) + { + int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEP.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect)); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*Good_IC_EEP.at(ivect)/Bad_IC_EEP.at(ivect)); + } + else if(flag==0) + { + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1; + } + } + } + + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP Uncorrected"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap[1]->Draw("COLZ"); + hcmap[1]->GetXaxis() ->SetTitle("ix"); + hcmap[1]->GetYaxis() ->SetTitle("iy"); + hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[0] = new TCanvas("cEEM","cmapEEM Uncorrected"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap[0]->Draw("COLZ"); + hcmap[0]->GetXaxis() ->SetTitle("ix"); + hcmap[0]->GetYaxis() ->SetTitle("iy"); + hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + // --- plot 0 : map of coefficients + cEEP[1] = new TCanvas("cmapEEP","cmapEEP"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + Bad_EEP->GetXaxis() -> SetLabelSize(0.03); + Bad_EEP->Draw("COLZ"); + Bad_EEP->GetXaxis() ->SetTitle("ix"); + Bad_EEP->GetYaxis() ->SetTitle("iy"); + Bad_EEP->GetZaxis() ->SetRangeUser(0.85,1.15); + + cEEM[1] = new TCanvas("cmapEEM","cmapEEM"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + Bad_EEM->GetXaxis() -> SetLabelSize(0.03); + Bad_EEM->Draw("COLZ"); + Bad_EEM->GetXaxis() ->SetTitle("ix"); + Bad_EEM->GetYaxis() ->SetTitle("iy"); + Bad_EEM->GetZaxis() ->SetRangeUser(0.85,1.15); + + // --- plot 0 : map of coefficients + cEEP[2] = new TCanvas("cmapEEP Corrected","cmapEEP Corrected"); + cEEP[2] -> cd(); + cEEP[2]->SetLeftMargin(0.1); + cEEP[2]->SetRightMargin(0.13); + cEEP[2]->SetGridx(); + cEEP[2]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[1]->Draw("COLZ"); + hcmap_corrected[1]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[1]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[2] = new TCanvas("cmapEEM Corrected","cmapEEM Corrected"); + cEEM[2] -> cd(); + cEEM[2]->SetLeftMargin(0.1); + cEEM[2]->SetRightMargin(0.13); + cEEM[2]->SetGridx(); + cEEM[2]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[0]->Draw("COLZ"); + hcmap_corrected[0]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[0]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + + + + +} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C new file mode 100644 index 00000000000..94fcdd1a8ca --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C @@ -0,0 +1,442 @@ + +// +// Macro to produce ECAL single electron calibration plots +// + +void DrawCalibrationPlotsEB( Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", + Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", + Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", + int evalStat = 0, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + // by TT + int nbins = 500; + + // by xtal + //int nbins = 500; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile1 << endl; + + TFile *f = new TFile(infile1); + TH2F *h_scale_EB = (TH2F*)f->Get("h_scale_EB"); + TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); + hcmap -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + + //----------------------------------------------------------------- + //--- Build the precision vs ieta plot starting from the TH2F of IC + //----------------------------------------------------------------- + TH1F *hoccall = new TH1F("hoccall", "hoccall", 1000,0.,1000.); + for (int jbin = 1; jbin < h_occupancy-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < h_occupancy-> GetNbinsX()+1; ibin++){ + float ic = h_occupancy->GetBinContent(ibin,jbin); + hoccall->Fill(ic); + } + } + + TH1F *hspreadall = new TH1F("hspreadall", "hspreadall", 800,0.,2.); + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ + float ic = hcmap->GetBinContent(ibin,jbin); + if (ic>0 && ic<2 && ic !=1) { + hspreadall->Fill(ic); + } + } + } + + + TH1F *hspread[172]; + char hname[100]; + char htitle[100]; + + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + //float etaring = hcmap-> GetYaxis()->GetBinLowEdge(jbin); + float etaring = hcmap-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hspread_ring_ieta%02d",etaring); + hspread[jbin-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ + float ic = hcmap->GetBinContent(ibin,jbin); + if (ic>0 && ic<2 && ic!=1) { + hspread[jbin-1]->Fill(ic); + } + } + } + + TGraphErrors *sigma_vs_ieta = new TGraphErrors(); + sigma_vs_ieta->SetMarkerStyle(20); + sigma_vs_ieta->SetMarkerSize(1); + sigma_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_ieta = new TGraphErrors(); + scale_vs_ieta->SetMarkerStyle(20); + scale_vs_ieta->SetMarkerSize(1); + scale_vs_ieta->SetMarkerColor(kBlue+2); + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + int np = 0; + for (int i = 1; i < hcmap-> GetNbinsY()+1; i++){ + float etaring = hcmap-> GetYaxis()->GetBinCenter(i); + //float etaring = hcmap-> GetYaxis()->GetBinLowEdge(i); + if (int(etaring)==0) continue; + if (hspread[i-1]-> GetEntries() == 0) continue; + if (fabs(etaring) > 60) hspread[i-1]->Rebin(2); + float e = 0.5*hcmap-> GetYaxis()->GetBinWidth(i); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspread[i-1]->GetRMS()); + fgaus->SetRange(1-5*hspread[i-1]->GetRMS(),1+5*hspread[i-1]->GetRMS()); + hspread[i-1]->Fit("fgaus","QR"); + sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)/fgaus->GetParameter(1)); + //cout << etaring << " " << fgaus->GetParameter(2)/fgaus->GetParameter(1) << endl; + sigma_vs_ieta-> SetPointError(np, e ,fgaus->GetParError(2)/fgaus->GetParameter(1)); + scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); + scale_vs_ieta-> SetPointError(np,e,fgaus->GetParError(1)); + np++; + + } + + + if (evalStat){ + TFile *f2 = new TFile(infile2); + TH2F *h_scale_EB_2 = (TH2F*)f2->Get("h_scale_EB"); + TH2F *hcmap2 = (TH2F*) h_scale_EB->Clone("hcmap2"); + hcmap2 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_2->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_2->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_2->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap2->SetBinContent(iPhi,iEta,h_scale_EB_2->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + TFile *f3 = new TFile(infile3); + TH2F *h_scale_EB_3 = (TH2F*)f3->Get("h_scale_EB"); + TH2F *hcmap3 = (TH2F*) h_scale_EB->Clone("hcmap3"); + hcmap3 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_3->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_3->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_3->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap3->SetBinContent(iPhi,iEta,h_scale_EB_3->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + TH1F *hstatprecision[171]; + + for (int jbin = 1; jbin < hcmap2-> GetNbinsY()+1; jbin++){ + //int etaring = -85+(jbin-1); + float etaring = hcmap2-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hstatprecision_ring_ieta%02d",etaring); + hstatprecision[jbin-1] = new TH1F(hname, hname, nbins,-0.5,0.5); + for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ + float ic1 = hcmap2->GetBinContent(ibin,jbin); + float ic2 = hcmap3->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecision[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample + } + } + + + } + + TGraphErrors *statprecision_vs_ieta = new TGraphErrors(); + statprecision_vs_ieta->SetMarkerStyle(20); + statprecision_vs_ieta->SetMarkerSize(1); + statprecision_vs_ieta->SetMarkerColor(kRed+2); + + int n = 0; + for (int i = 1; i < hcmap2-> GetNbinsY()+1; i++){ + etaring = hcmap2-> GetYaxis()->GetBinCenter(i); + //etaring = hcmap2-> GetYaxis()->GetBinLowEdge(i); + if (etaring==0) continue; + if ( hstatprecision[i-1]->GetEntries() == 0) continue; + if (fabs(etaring) > 60)hstatprecision[i-1]->Rebin(2); + float e = 0.5*hcmap2-> GetYaxis()->GetBinWidth(i); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecision[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecision[i-1]->GetRMS(),5*hstatprecision[i-1]->GetRMS()); + hstatprecision[i-1]->Fit("fgaus","QR"); + statprecision_vs_ieta-> SetPoint(n,etaring,fgaus->GetParameter(2)); + statprecision_vs_ieta-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + TGraphErrors *residual_vs_ieta = new TGraphErrors(); + residual_vs_ieta->SetMarkerStyle(20); + residual_vs_ieta->SetMarkerSize(1); + residual_vs_ieta->SetMarkerColor(kGreen+2); + + + + for (int i= 0; i < statprecision_vs_ieta-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_ieta-> GetPoint(i, xdummy, spread ); + espread = sigma_vs_ieta-> GetErrorY(i); + statprecision_vs_ieta-> GetPoint(i, xdummy, stat ); + estat = statprecision_vs_ieta-> GetErrorY(i); + ex = statprecision_vs_ieta-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + cout << residual << " " << eresidual << endl; + residual_vs_ieta->SetPoint(i,xdummy, residual); + residual_vs_ieta->SetPointError(i,ex,eresidual); + + + } + + } + + + + //------------------------------------------------------------------------ + + + + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[10]; + + // --- plot 0 : map of coefficients + c[0] = new TCanvas("cmap","cmap"); + c[0] -> cd(); + c[0]->SetLeftMargin(0.1); + c[0]->SetRightMargin(0.13); + c[0]->SetGridx(); + hcmap->GetXaxis()->SetNdivisions(1020); + hcmap->GetXaxis() -> SetLabelSize(0.03); + hcmap->Draw("COLZ"); + hcmap->GetXaxis() ->SetTitle("i#phi"); + hcmap->GetYaxis() ->SetTitle("i#eta"); + hcmap->GetZaxis() ->SetRangeUser(0.9,1.1); + + c[7] = new TCanvas("cmap2","cmap2"); + c[7] -> cd(); + c[7]->SetLeftMargin(0.1); + c[7]->SetRightMargin(0.13); + c[7]->SetGridx(); + h_scale_EB->GetXaxis()->SetNdivisions(1020); + h_scale_EB->GetXaxis() -> SetLabelSize(0.03); + h_scale_EB->Draw("COLZ"); + h_scale_EB->GetXaxis() ->SetTitle("i#phi"); + h_scale_EB->GetYaxis() ->SetTitle("i#eta"); + h_scale_EB->GetZaxis() ->SetRangeUser(0.9,1.1); + + + + + // --- plot 1 : ring precision vs ieta + c[1] = new TCanvas("csigma","csigma"); + c[1]->SetGridx(); + c[1]->SetGridy(); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + sigma_vs_ieta->Draw("ap"); + if (evalStat){ + statprecision_vs_ieta->Draw("psame"); + sigma_vs_ieta->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ieta,"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ieta,"spread", "LP"); + leg->Draw("same"); + } + + // --- plot 2 : scale vs ieta + c[2] = new TCanvas("c_scale_vs_ieta","c_scale_vs_ieta"); + c[2]->SetGridx(); + c[2]->SetGridy(); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.95,1.05); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("scale"); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + scale_vs_ieta->Draw("ap"); + + // --- plot 3 : spread all coefficients + c[3] = new TCanvas("cspread","cspread",500,500); + hspreadall->SetFillStyle(3004); + hspreadall->SetFillColor(kGreen+2); + hspreadall->GetXaxis()-> SetRangeUser(0.8,1.2); + hspreadall->GetXaxis()-> SetTitle("c"); + hspreadall->Draw("hs"); + gPad->Update(); + + TPaveStats *s_spread = (TPaveStats*)(hspreadall->GetListOfFunctions()->FindObject("stats")); + s_spread -> SetX1NDC(0.55); //new x start position + s_spread -> SetX2NDC(0.85); //new x end position + s_spread -> SetY1NDC(0.750); //new x start position + s_spread -> SetY2NDC(0.85); //new x end position + s_spread -> SetOptStat(1110); + s_spread -> SetTextColor(kGreen+2); + s_spread -> SetTextSize(0.03); + s_spread -> Draw("sames"); + + //--- plot 4 : occupancy map + c[4] = new TCanvas("cOcc","cOcc"); + c[4]->SetLeftMargin(0.1); + c[4]->SetRightMargin(0.13); + c[4]-> cd(); + c[4]->SetGridx(); + h_occupancy->GetXaxis()->SetNdivisions(1020); + h_occupancy->GetXaxis() -> SetLabelSize(0.03); + h_occupancy->Draw("COLZ"); + h_occupancy->GetXaxis() ->SetTitle("i#phi"); + h_occupancy->GetYaxis() ->SetTitle("i#eta"); + + + // --- plot 5 : statistical precision vs ieta + if (evalStat){ + c[5] = new TCanvas("cstat","cstat"); + c[5]->SetGridx(); + c[5]->SetGridy(); + statprecision_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + statprecision_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ieta->Draw("ap"); + +// TF1 *fp = new TF1("fp","pol0"); +// fp->SetRange(-40,40); +// statprecision_vs_ieta->Fit("fp","QRN"); +// float stat = fp->GetParameter(0); +// float estat = fp->GetParError(0); +// cout << "Statistical precision in |ieta| < 40 --> " << stat << " +/- " << estat << endl; +// sigma_vs_ieta->Fit("fp","QRN"); +// float spread = fp->GetParameter(0); +// float espread = fp->GetParError(0); +// cout << "Spread in |ieta| < 40 --> " << spread << " +/- " << espread << endl; +// float residual = sqrt( spread*spread - stat*stat ); +// float eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; +// cout << "Residual miscalibration : " << residual << " +/- " << eresidual << endl; + + c[6] = new TCanvas("cresidual","cresidual"); + c[6]->SetGridx(); + c[6]->SetGridy(); + residual_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); + residual_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ieta->Draw("ap"); + + + } + + //----------------------------------------------------------------- + //--- Print plots + //----------------------------------------------------------------- + + if (printPlots){ + + //gStyle->SetOptStat(1110); + c[0]->Print("IC_map.png",fileType); + c[1]->Print("IC_precision_vs_ieta.png",fileType); + c[2]->Print("IC_scale_vs_ieta.png",fileType); + c[3]->Print("IC_spread.png",fileType); + c[4]->Print("occupancy_map.png",fileType); + } +} diff --git a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C new file mode 100644 index 00000000000..10534cc792b --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C @@ -0,0 +1,406 @@ +// +// Macro to produce ECAL single electron calibration plots +// + +void DrawCalibrationPlotsEB_phiGroups(Char_t* infile1 = +"/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", + Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/Even_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", + Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/Odd_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", + int evalStat = 1, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + + // by xtal + int nbins = 500; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile1 << endl; + + TFile *f = new TFile(infile1); + TH2F *h_scale_EB = (TH2F*)f->Get("h_scale_EB"); + TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); + hcmap -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + + //----------------------------------------------------------------- + //--- Build the precision vs ieta plot starting from the TH2F of IC + //----------------------------------------------------------------- + + TH1F *hspreadGroupEta[34]; + TH1F *hspreadGroupEtaFold[17]; + + char hname[100]; + char htitle[100]; + + int ringGroupSize = 5; + int nStep = 0; + + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + if (jbin < 86 && (jbin-1)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); + hspreadGroupEta[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + sprintf(hname,"hspread_ringGroup_ietaFolded%02d",nStep); + hspreadGroupEtaFold[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + } + if (jbin > 86 && (jbin-2)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); + hspreadGroupEta[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + } + + for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ + float ic = hcmap->GetBinContent(ibin,jbin); + if (ic>0 && ic<2 && ic!=1) { + hspreadGroupEta[nStep-1]->Fill(ic); + if (nStep <= 17) hspreadGroupEtaFold[nStep-1]->Fill(ic); + else hspreadGroupEtaFold[34-nStep]->Fill(ic); + } + } + } + + + TGraphErrors *sigma_vs_GroupEta = new TGraphErrors(); + sigma_vs_GroupEta->SetMarkerStyle(20); + sigma_vs_GroupEta->SetMarkerSize(1); + sigma_vs_GroupEta->SetMarkerColor(kBlue+2); + + TGraphErrors *sigma_vs_GroupEtaFold = new TGraphErrors(); + sigma_vs_GroupEtaFold->SetMarkerStyle(20); + sigma_vs_GroupEtaFold->SetMarkerSize(1); + sigma_vs_GroupEtaFold->SetMarkerColor(kBlue+2); + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + int np = 0; + for (int i = 1; i < 35; i++){ + float etaring = hcmap->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspreadGroupEta[i-1]->GetRMS()); + fgaus->SetRange(1-5*hspreadGroupEta[i-1]->GetRMS(),1+5*hspreadGroupEta[i-1]->GetRMS()); + hspreadGroupEta[i-1]->Fit("fgaus","QR"); + + sigma_vs_GroupEta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + sigma_vs_GroupEta-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + np = 0; + for (int i = 1; i < 18; i++){ + float etaring = hcmap->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspreadGroupEtaFold[i-1]->GetRMS()); + fgaus->SetRange(1-5*hspreadGroupEtaFold[i-1]->GetRMS(),1+5*hspreadGroupEtaFold[i-1]->GetRMS()); + hspreadGroupEtaFold[i-1]->Fit("fgaus","QR"); + + sigma_vs_GroupEtaFold-> SetPoint(np,fabs(etaring),fgaus->GetParameter(2)); + sigma_vs_GroupEtaFold-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + + if (evalStat){ + TFile *f2 = new TFile(infile2); + TH2F *h_scale_EB_2 = (TH2F*)f2->Get("h_scale_EB"); + TH2F *hcmap2 = (TH2F*) h_scale_EB->Clone("hcmap2"); + hcmap2 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_2->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_2->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_2->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap2->SetBinContent(iPhi,iEta,h_scale_EB_2->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + TFile *f3 = new TFile(infile3); + TH2F *h_scale_EB_3 = (TH2F*)f3->Get("h_scale_EB"); + TH2F *hcmap3 = (TH2F*) h_scale_EB_3->Clone("hcmap3"); + hcmap3 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_3->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_3->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_3->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap3->SetBinContent(iPhi,iEta,h_scale_EB_3->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + TH1F *hstatprecisionGroupEta[34]; + TH1F *hstatprecisionGroupEtaFold[17]; + + nStep = 0; + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + if (jbin < 86 && (jbin-1)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hstatprecision_ringGroup_ieta%02d",nStep); + hstatprecisionGroupEta[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); + sprintf(hname,"hstatprecision_ringGroup_ietaFolded%02d",nStep); + hstatprecisionGroupEtaFold[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); + } + if (jbin > 86 && (jbin-2)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); + hstatprecisionGroupEta[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); + } + + for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ + float ic1 = hcmap2->GetBinContent(ibin,jbin); + float ic2 = hcmap3->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1) { + hstatprecisionGroupEta[nStep-1]->Fill((ic1-ic2)/(ic1+ic2)); + if (nStep <= 17) hstatprecisionGroupEtaFold[nStep-1]->Fill((ic1-ic2)/(ic1+ic2)); + else hstatprecisionGroupEtaFold[34-nStep]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + + + TGraphErrors *statprecision_vs_GroupEta = new TGraphErrors(); + statprecision_vs_GroupEta->SetMarkerStyle(20); + statprecision_vs_GroupEta->SetMarkerSize(1); + statprecision_vs_GroupEta->SetMarkerColor(kRed+2); + + TGraphErrors *statprecision_vs_GroupEtaFold = new TGraphErrors(); + statprecision_vs_GroupEtaFold->SetMarkerStyle(20); + statprecision_vs_GroupEtaFold->SetMarkerSize(1); + statprecision_vs_GroupEtaFold->SetMarkerColor(kRed+2); + + np = 0; + for (int i = 1; i < 35; i++){ + float etaring = hcmap2->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecisionGroupEta[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionGroupEta[i-1]->GetRMS(),5*hstatprecisionGroupEta[i-1]->GetRMS()); + hstatprecisionGroupEta[i-1]->Fit("fgaus","QR"); + + statprecision_vs_GroupEta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + statprecision_vs_GroupEta-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + np = 0; + for (int i = 1; i < 18; i++){ + float etaring = hcmap2->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecisionGroupEtaFold[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionGroupEtaFold[i-1]->GetRMS(),5*hstatprecisionGroupEtaFold[i-1]->GetRMS()); + hstatprecisionGroupEtaFold[i-1]->Fit("fgaus","QR"); + + statprecision_vs_GroupEtaFold-> SetPoint(np,fabs(etaring),fgaus->GetParameter(2)); + statprecision_vs_GroupEtaFold-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + + TGraphErrors *residual_vs_GroupEta = new TGraphErrors(); + residual_vs_GroupEta->SetMarkerStyle(20); + residual_vs_GroupEta->SetMarkerSize(1); + residual_vs_GroupEta->SetMarkerColor(kGreen+2); + + TGraphErrors *residual_vs_GroupEtaFold = new TGraphErrors(); + residual_vs_GroupEtaFold->SetMarkerStyle(20); + residual_vs_GroupEtaFold->SetMarkerSize(1); + residual_vs_GroupEtaFold->SetMarkerColor(kGreen+2); + + for (int i= 0; i < statprecision_vs_GroupEta-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_GroupEta-> GetPoint(i, xdummy, spread); + espread = sigma_vs_GroupEta-> GetErrorY(i); + statprecision_vs_GroupEta-> GetPoint(i, xdummy, stat); + estat = statprecision_vs_GroupEta-> GetErrorY(i); + ex = statprecision_vs_GroupEta-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + residual_vs_GroupEta->SetPoint(i,xdummy, residual); + residual_vs_GroupEta->SetPointError(i,ex,eresidual); + } + + for (int i= 0; i < statprecision_vs_GroupEtaFold-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_GroupEtaFold-> GetPoint(i, xdummy, spread); + espread = sigma_vs_GroupEtaFold-> GetErrorY(i); + statprecision_vs_GroupEtaFold-> GetPoint(i, xdummy, stat); + estat = statprecision_vs_GroupEtaFold-> GetErrorY(i); + ex = statprecision_vs_GroupEtaFold-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + residual_vs_GroupEtaFold->SetPoint(i,xdummy, residual); + residual_vs_GroupEtaFold->SetPointError(i,ex,eresidual); + } + +} + + //------------------------------------------------------------------------ + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[4]; + + c[0] = new TCanvas("csigma","csigma"); + c[0]->SetGridx(); + c[0]->SetGridy(); + sigma_vs_GroupEta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); + sigma_vs_GroupEta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_GroupEta->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_GroupEta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + sigma_vs_GroupEta->Draw("ap"); + if (evalStat){ + statprecision_vs_GroupEta->Draw("psame"); + sigma_vs_GroupEta->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_GroupEta,"statistical precision", "LP"); + leg->AddEntry(sigma_vs_GroupEta,"spread", "LP"); + leg->Draw("same"); + } + + c[1] = new TCanvas("csigmaFold","csigmaFold"); + c[1]->SetGridx(); + c[1]->SetGridy(); + sigma_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); + sigma_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetRangeUser(0,85); + sigma_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetTitle("|i#eta|"); + sigma_vs_GroupEtaFold->Draw("ap"); + if (evalStat){ + statprecision_vs_GroupEtaFold->Draw("psame"); + sigma_vs_GroupEtaFold->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_GroupEtaFold,"statistical precision", "LP"); + leg->AddEntry(sigma_vs_GroupEtaFold,"spread", "LP"); + leg->Draw("same"); + } + + + c[2] = new TCanvas("cresidual","cresidual"); + c[2]->SetGridx(); + c[2]->SetGridy(); + residual_vs_GroupEta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); + residual_vs_GroupEta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_GroupEta->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_GroupEta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_GroupEta->Draw("ap"); + + c[3] = new TCanvas("cresidualFold","cresidualFold"); + c[3]->SetGridx(); + c[3]->SetGridy(); + residual_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); + residual_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetRangeUser(0,85); + residual_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetTitle("|i#eta|"); + residual_vs_GroupEtaFold->Draw("ap"); + + +} diff --git a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C new file mode 100644 index 00000000000..aa096a86431 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C @@ -0,0 +1,763 @@ +#include +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +// +/// Macro to produce ECAL single electron calibration plots for EE +/// Input Files : MC or Data splistat and no splitstat, MCTruth and MCReco IC maps EE +/// Output Files : StatPrec_MC_EE.root --> stat precision MC usefull for CompareCalibMCTruth_EE.C only MC +/// IC_MC_4Correction.root --> Map IC for radial correction only MC +// +using namespace std; + +void DrawCalibrationPlotsEE ( + Char_t* infile1 = "data_LC_20120131_ALPHA_test_prompt/SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", + Char_t* infile2 = "data_LC_20120131_ALPHA_test_prompt/Even_SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", + Char_t* infile3 = "data_LC_20120131_ALPHA_test_prompt/Odd_SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", + //Char_t* infile1 = "FT_R_42_V21B/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", + //Char_t* infile2 = "FT_R_42_V21B/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", + //Char_t* infile3 = "FT_R_42_V21B/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", + int evalStat = 1, + bool isMC=false, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + /// by xtal + + int nbins = 250; + + /// Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(11110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile1 << endl; + + + /// imput file with full statistic normlized to the mean in a ring + + TFile *f = new TFile(infile1); + TH2F *hcmap[2]; + hcmap[0] = (TH2F*)f->Get("h_scale_map_EEM"); + hcmap[1] = (TH2F*)f->Get("h_scale_map_EEP"); + + + /// ring geometry for the endcap + TH2F *hrings[2]; + hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)hcmap[0]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICMES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); + } + + TFile *f4 = TFile::Open("MCtruthIC_EE.root"); + TFile *f5 = TFile::Open("MCRecoIC_EE.root"); + + TH2F *hcmapMcT_EEP = (TH2F*)f4->Get("h_scale_EEP"); + TH2F *hcmapMcT_EEM = (TH2F*)f4->Get("h_scale_EEM"); + TH2F *hcmapMcR_EEP = (TH2F*)f5->Get("h_scale_EEP"); + TH2F *hcmapMcR_EEM = (TH2F*)f5->Get("h_scale_EEM"); + + + ///-------------------------------------------------------------------------------- + ///--- Build the precision vs ring plot starting from the TH2F of IC folded and not + ///-------------------------------------------------------------------------------- + + char hname[100]; + char htitle[100]; + TH1F *hspread[2][50]; + TH1F* hspreadAll [40]; + + TH2F* ICComparison [2]; + ICComparison[0] = (TH2F*) hcmapMcT_EEP->Clone("ICComparison_EEM"); + ICComparison[1] = (TH2F*) hcmapMcT_EEM->Clone("ICComparison_EEP"); + ICComparison[0]->Reset("ICMES"); + ICComparison[1]->Reset("ICMES"); + ICComparison[0]->ResetStats(); + ICComparison[1]->ResetStats(); + + + for (int k = 0; k < 2; k++){ + + for (int iring = 0; iring < 40 ; iring++){ + if (k==0) + { + sprintf(hname,"hspreadAll_ring%02d",iring); + hspreadAll[iring] = new TH1F(hname, hname, nbins,0.,2.); + sprintf(hname,"hspreadEEM_MCTruth_ring%02d",iring); + hspread[k][iring] = new TH1F(hname, hname, nbins,0.,2.); + + } + else{ + + sprintf(hname,"hspreadEEP_ring%02d",iring); + hspread[k][iring] = new TH1F(hname, hname, nbins,0.,2.); + + } + } + } + + /// spread all distribution, spread for EE+ and EE- and comparison with the MC truth + for (int k = 0; k < 2 ; k++){ + for (int ix = 1; ix < 101; ix++){ + for (int iy = 1; iy < 101; iy++){ + int iz = k; + if (k==0) iz = -1; + int mybin = hcmap[k] -> FindBin(ix,iy); + int ring = hrings[1]-> GetBinContent(mybin); + float ic = hcmap[k]->GetBinContent(mybin); + float ic2=0; + if(k==0 && hcmapMcT_EEM->GetBinContent(mybin)!=0 && hcmapMcR_EEM->GetBinContent(mybin)!=0 ) ic2 = hcmapMcT_EEM->GetBinContent(mybin)/hcmapMcR_EEM->GetBinContent(mybin); + else if(hcmapMcT_EEP->GetBinContent(mybin)!=0 && hcmapMcR_EEP->GetBinContent(mybin)!=0 ) ic2 = hcmapMcT_EEP->GetBinContent(mybin)/hcmapMcR_EEP->GetBinContent(mybin); + + if ( ic>0 && ic2>0 ) { + hspread[k][ring]->Fill(ic); + hspreadAll[ring]->Fill(ic); + ICComparison[k]->Fill(ix,iy,ic/ic2); + } + } + } + } + + /// Graph Error for spread EE+ and EE- + + TGraphErrors *sigma_vs_ring[3]; + sigma_vs_ring[0] = new TGraphErrors(); + sigma_vs_ring[0]->SetMarkerStyle(20); + sigma_vs_ring[0]->SetMarkerSize(1); + sigma_vs_ring[0]->SetMarkerColor(kBlue+2); + + sigma_vs_ring[1] = new TGraphErrors(); + sigma_vs_ring[1]->SetMarkerStyle(20); + sigma_vs_ring[1]->SetMarkerSize(1); + sigma_vs_ring[1]->SetMarkerColor(kBlue+2); + + sigma_vs_ring[2] = new TGraphErrors(); + sigma_vs_ring[2]->SetMarkerStyle(20); + sigma_vs_ring[2]->SetMarkerSize(1); + sigma_vs_ring[2]->SetMarkerColor(kBlue+2); + + /// Graph for scale vs ring EE+, EE- and folded + + TGraphErrors *scale_vs_ring[3]; + scale_vs_ring[0] = new TGraphErrors(); + scale_vs_ring[0]->SetMarkerStyle(20); + scale_vs_ring[0]->SetMarkerSize(1); + scale_vs_ring[0]->SetMarkerColor(kBlue+2); + + scale_vs_ring[1] = new TGraphErrors(); + scale_vs_ring[1]->SetMarkerStyle(20); + scale_vs_ring[1]->SetMarkerSize(1); + scale_vs_ring[1]->SetMarkerColor(kBlue+2); + + scale_vs_ring[2] = new TGraphErrors(); + scale_vs_ring[2]->SetMarkerStyle(20); + scale_vs_ring[2]->SetMarkerSize(1); + scale_vs_ring[2]->SetMarkerColor(kBlue+2); + + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + int np[3] = {0}; + + /// Gaussian fit for EE+ and EE- + + for (int k = 0; k < 2 ; k++){ + for (int iring = 0; iring < 40; iring++){ + if (hspread[k][iring]-> GetEntries() == 0) continue; + float e = 0.5*hcmap[k]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspread[k][iring]->GetRMS()); + fgaus->SetRange(1-5*hspread[k][iring]->GetRMS(),1+5*hspread[k][iring]->GetRMS()); + hspread[k][iring]->Fit("fgaus","QR"); + sigma_vs_ring[k]-> SetPoint(np[k],iring,fgaus->GetParameter(2)); + sigma_vs_ring[k]-> SetPointError(np[k], e ,fgaus->GetParError(2)); + scale_vs_ring[k]-> SetPoint(np[k],iring,fgaus->GetParameter(1)); + scale_vs_ring[k]-> SetPointError(np[k],e,fgaus->GetParError(1)); + np[k]++; + } + } + + for (int iring = 0; iring < 40; iring++){ + if (hspreadAll[iring]-> GetEntries() == 0) continue; + float e = 0.5*hcmap[0]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspreadAll[iring]->GetRMS()); + fgaus->SetRange(1-5*hspreadAll[iring]->GetRMS(),1+5*hspreadAll[iring]->GetRMS()); + hspreadAll[iring]->Fit("fgaus","QR"); + sigma_vs_ring[2]-> SetPoint(np[2],iring,fgaus->GetParameter(2)); + sigma_vs_ring[2]-> SetPointError(np[2], e ,fgaus->GetParError(2)); + scale_vs_ring[2]-> SetPoint(np[2],iring,fgaus->GetParameter(1)); + scale_vs_ring[2]-> SetPointError(np[2],e,fgaus->GetParError(1)); + np[2]++; + } + + /// Intercalibration constant vs phi + + /* TGraphErrors *IC_vs_phi[2]; + IC_vs_phi[0] = new TGraphErrors(); + IC_vs_phi[0]->SetMarkerStyle(20); + IC_vs_phi[0]->SetMarkerSize(1); + IC_vs_phi[0]->SetMarkerColor(kBlue+2); + + IC_vs_phi[1] = new TGraphErrors(); + IC_vs_phi[1]->SetMarkerStyle(20); + IC_vs_phi[1]->SetMarkerSize(1); + IC_vs_phi[1]->SetMarkerColor(kBlue+2); + + TH1F* Spread_vs_phi[2][360]; + + for (int k = 0; k < 2; k++){ + for (int iphi = 0; iphi < 360 ; iphi++){ + if (k==0) + { + sprintf(hname,"hspread_vs_phi%02d_EEP",iphi); + Spread_vs_phi[k][iphi] = new TH1F(hname, hname, nbins,0.,2.); + + } + else{ + sprintf(hname,"hspread_vs_ring%02d_EEM",iphi); + Spread_vs_phi[k][iphi] = new TH1F(hname, hname, nbins,0.,2.);} + } + } + + + for (int k = 0; k < 2 ; k++){ + for (int ix = 1; ix < 101; ix++){ + for (int iy = 1; iy < 101; iy++){ + float iphibin; + if((atan2(iy-50.,ix-50.)-int(atan2(iy-50.,ix-50.)))*(360./(2.*3.14159)) <0.5) iphibin=floor(180.+atan2(iy-50.,ix-50.)*(360./(2.*3.14159))); + else iphibin=ceil(180.+atan2(iy-50.,ix-50.)*(360./(2.*3.14159))); + + if(iphibin>359) iphibin=359; + int mybin = hcmap[k] -> FindBin(ix,iy); + float ic = hcmap[k]->GetBinContent(mybin); + if ( ic>0 ) { + Spread_vs_phi[k][iphibin] ->Fill(ic); + } + } + } + } + + int N[2]={0}; + for (int k = 0; k < 2 ; k++){ + for (int iphi = 0; iphi < 360; iphi++){ + if (Spread_vs_phi[k][iphi]-> GetEntries() == 0) continue; + IC_vs_phi[k]-> SetPoint(N[k],iphi,Spread_vs_phi[k][iphi]->GetMean()); + IC_vs_phi[k]-> SetPointError(N[k],0,Spread_vs_phi[k][iphi]->GetRMS()/sqrt(Spread_vs_phi[k][iphi]->GetEntries())); + + N[k]++; + } + } + */ + + ///----------------- Statistical Precision and Residual -------------------- + + TGraphErrors *statprecision_vs_ring[3]; + statprecision_vs_ring[0] = new TGraphErrors(); + statprecision_vs_ring[0]->SetMarkerStyle(20); + statprecision_vs_ring[0]->SetMarkerSize(1); + statprecision_vs_ring[0]->SetMarkerColor(kRed+2); + + statprecision_vs_ring[1] = new TGraphErrors(); + statprecision_vs_ring[1]->SetMarkerStyle(20); + statprecision_vs_ring[1]->SetMarkerSize(1); + statprecision_vs_ring[1]->SetMarkerColor(kRed+2); + + statprecision_vs_ring[2] = new TGraphErrors(); + statprecision_vs_ring[2]->SetMarkerStyle(20); + statprecision_vs_ring[2]->SetMarkerSize(1); + statprecision_vs_ring[2]->SetMarkerColor(kRed+2); + + TGraphErrors *residual_vs_ring[3]; + residual_vs_ring[0] = new TGraphErrors(); + residual_vs_ring[0]->SetMarkerStyle(20); + residual_vs_ring[0]->SetMarkerSize(1); + residual_vs_ring[0]->SetMarkerColor(kGreen+2); + + residual_vs_ring[1] = new TGraphErrors(); + residual_vs_ring[1]->SetMarkerStyle(20); + residual_vs_ring[1]->SetMarkerSize(1); + residual_vs_ring[1]->SetMarkerColor(kGreen+2); + + residual_vs_ring[2] = new TGraphErrors(); + residual_vs_ring[2]->SetMarkerStyle(20); + residual_vs_ring[2]->SetMarkerSize(1); + residual_vs_ring[2]->SetMarkerColor(kGreen+2); + + + if (evalStat){ + + /// acquisition file for statistical precision + + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap2[2]; + hcmap2[0] = (TH2F*)f2->Get("h_scale_map_EEM"); + hcmap2[1] = (TH2F*)f2->Get("h_scale_map_EEP"); + + TH2F *hcmap3[2]; + hcmap3[0] = (TH2F*)f3->Get("h_scale_map_EEM"); + hcmap3[1] = (TH2F*)f3->Get("h_scale_map_EEP"); + + TH1F *hstatprecision[2][40]; + TH1F *hstatprecisionAll[40]; + + /// stat precision histos for each EE ring + for (int k = 0; k < 2; k++){ + for (int iring = 0; iring < 40 ; iring ++){ + + if (k==0) + { sprintf(hname,"hstatprecisionAll_ring%02d",iring); + hstatprecisionAll[iring] = new TH1F(hname, hname, nbins,-2.,2.); + sprintf(hname,"hstatprecisionEEM_ring%02d",iring); + hstatprecision[k][iring] = new TH1F(hname, hname, nbins,-2.,2.); + } + else { + sprintf(hname,"hstatprecisionEEP_ring%02d",iring); + hstatprecision[k][iring] = new TH1F(hname, hname, nbins,-2.,2.); + } + + } + } + + for (int k = 0; k < 2 ; k++){ + for (int ix = 1; ix < 102; ix++){ + for (int iy = 1; iy < 102; iy++){ + int iz = k; + if (k==0) iz = -1; + int mybin = hcmap2[k] -> FindBin(ix,iy); + int ring = hrings[1]-> GetBinContent(mybin); + float ic1 = hcmap2[k]->GetBinContent(mybin); + float ic2 = hcmap3[k]->GetBinContent(mybin); + if (ic1>0 && ic2 >0){ + hstatprecision[k][ring]->Fill((ic1-ic2)/(ic1+ic2)); /// sigma (diff/sum) gives the stat. precision on teh entire sample + hstatprecisionAll[ring]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + } + + + TCanvas* c44 [120]; + /// Gaussian fit of the even/odd distribution (rms of the distribution can be also used) + int n[3] = {0}; + for (int k = 0; k < 2; k++){ + for (int iring = 0; iring < 40 ; iring++){ + if ( hstatprecision[k][iring]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[k]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecision[k][iring]->GetRMS()); + fgaus->SetRange(-5*hstatprecision[k][iring]->GetRMS(),5*hstatprecision[k][iring]->GetRMS()); + TString name = Form("ff%d_%d",iring,k); + + hstatprecision[k][iring]->Fit("fgaus","QR"); + + statprecision_vs_ring[k]-> SetPoint(n[k],iring,fgaus->GetParameter(2)); + statprecision_vs_ring[k]-> SetPointError(n[k],e,fgaus->GetParError(2)); + n[k]++; + } + } + + for (int iring = 0; iring < 40 ; iring++){ + if ( hstatprecisionAll[iring]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[0]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecisionAll[iring]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionAll[iring]->GetRMS(),5*hstatprecisionAll[iring]->GetRMS()); + TString name = Form("ffAll%d",iring); + hstatprecisionAll[iring]->Fit("fgaus","QR"); + + statprecision_vs_ring[2]-> SetPoint(n[2],iring,fgaus->GetParameter(2)); + statprecision_vs_ring[2]-> SetPointError(n[2],e,fgaus->GetParError(2)); + n[2]++; + } + + + TH1F *hresidual[3]; + hresidual[0] = new TH1F("hresidualEEM","hresidualEEM",1000,0,1); + hresidual[1] = new TH1F("hresidualEEP","hresidualEEP",1000,0,1); + hresidual[2] = new TH1F("hresidualAll","hresidualAll",1000,0,1); + + TH1F *hstat[3]; + hstat[0] = new TH1F("hstatEEM","hstatEEM",1000,0,0.5); + hstat[1] = new TH1F("hstatEEP","hstatEEP",1000,0,0.5); + hstat[2] = new TH1F("hstatAll","hstatAll",1000,0,0.5); + + TH1F *hspre[3]; + hspre[0] = new TH1F("hspreEEM","hspreEEM",1000,0,0.5); + hspre[1] = new TH1F("hspreEEP","hspreEEP",1000,0,0.5); + hspre[2] = new TH1F("hspreAll","hspreAll",1000,0,0.5); + + /// Residual spread plot + + for (int k = 0; k < 3 ; k++){ + for (int i= 0; i < statprecision_vs_ring[k]-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_ring[k]-> GetPoint(i, xdummy, spread ); + espread = sigma_vs_ring[k]-> GetErrorY(i); + statprecision_vs_ring[k]-> GetPoint(i, xdummy, stat ); + estat = statprecision_vs_ring[k]-> GetErrorY(i); + ex = statprecision_vs_ring[k]-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + residual_vs_ring[k]->SetPoint(i,xdummy, residual); + residual_vs_ring[k]->SetPointError(i,ex,eresidual); + } + } + + } + + ///----------------------------------------------------------------- + ///--- Draw plots + ///----------------------------------------------------------------- + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cmapEEP","cmapEEP"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap[1]->Draw("COLZ"); + hcmap[1]->GetXaxis() ->SetTitle("ix"); + hcmap[1]->GetYaxis() ->SetTitle("iy"); + hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[0] = new TCanvas("cmapEEM","cmapEEM"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap[0]->Draw("COLZ"); + hcmap[0]->GetXaxis() ->SetTitle("ix"); + hcmap[0]->GetYaxis() ->SetTitle("iy"); + hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + /// --- plot 1 : ring precision vs ieta + cEEP[1] = new TCanvas("csigmaEEP","csigmaEEP"); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + sigma_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); + sigma_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("ring"); + sigma_vs_ring[1]->Draw("ap"); + if (evalStat){ + statprecision_vs_ring[1]->Draw("psame"); + sigma_vs_ring[1]->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ring[1],"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ring[1],"spread", "LP"); + leg->Draw("same"); + } + + cEEM[1] = new TCanvas("csigmaEEM","csigmaEEM"); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + sigma_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); + sigma_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("ring"); + sigma_vs_ring[0]->Draw("ap"); + if (evalStat){ + statprecision_vs_ring[0]->Draw("psame"); + sigma_vs_ring[0]->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ring[0],"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ring[0],"spread", "LP"); + leg->Draw("same"); + } + + + /// --- plot 5 : statistical precision vs ieta + if (evalStat){ + cEEP[5] = new TCanvas("cstat","cstat"); + cEEP[5]->SetGridx(); + cEEP[5]->SetGridy(); + statprecision_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + statprecision_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ring[1]->Draw("ap"); + + cEEP[6] = new TCanvas("cresidualP","cresidualP"); + cEEP[6]->SetGridx(); + cEEP[6]->SetGridy(); + residual_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + residual_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ring[1]->Draw("ap"); + + cEEM[5] = new TCanvas("cstatM","cstatM"); + cEEM[5]->SetGridx(); + cEEM[5]->SetGridy(); + statprecision_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + statprecision_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ring[0]->Draw("ap"); + + cEEM[6] = new TCanvas("cresidualM","cresidualM"); + cEEM[6]->SetGridx(); + cEEM[6]->SetGridy(); + residual_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + residual_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ring[0]->Draw("ap"); + + cEEP[8] = new TCanvas("csigmaFolded","csigmaFolded"); + cEEP[8]->SetGridx(); + cEEP[8]->SetGridy(); + sigma_vs_ring[2]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); + sigma_vs_ring[2]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ring[2]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ring[2]->GetHistogram()->GetXaxis()-> SetTitle("ring"); + sigma_vs_ring[2]->Draw("ap"); + if (evalStat){ + statprecision_vs_ring[2]->Draw("psame"); + sigma_vs_ring[2]->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ring[2],"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ring[2],"spread", "LP"); + leg->Draw("same"); + } + + cEEP[9] = new TCanvas("cresidualFolded","cresidualFolded"); + cEEP[9]->SetGridx(); + cEEP[9]->SetGridy(); + residual_vs_ring[2]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + residual_vs_ring[2]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ring[2]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ring[2]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ring[2]->Draw("ap"); + + /// save precision for MC comparison + + if(isMC==true) + { + TFile * output = new TFile ("StatPrec_MC_EE.root","RECREATE"); + output->cd(); + statprecision_vs_ring[0]->SetName("gr_stat_prec_EEP"); + statprecision_vs_ring[1]->SetName("gr_stat_prec_EEM"); + statprecision_vs_ring[2]->SetName("gr_stat_prec"); + + statprecision_vs_ring[0]->Write(); + statprecision_vs_ring[1]->Write(); + statprecision_vs_ring[2]->Write(); + } + } + + /// Comparison Plot MC - Data + TCanvas* canEEP[10], *canEEM[10]; + if(isMC == true) + { + + canEEM[0] = new TCanvas("ICComparison MC EEM","ICComparison MC EEM"); + canEEM[0]->SetGridx(); + canEEM[0]->SetGridy(); + ICComparison[0]->GetXaxis() -> SetLabelSize(0.03); + ICComparison[0]->Draw("COLZ"); + ICComparison[0]->GetXaxis() ->SetTitle("ix"); + ICComparison[0]->GetYaxis() ->SetTitle("iy"); + ICComparison[0]->GetZaxis() ->SetRangeUser(0.85,1.15); + + canEEP[0] = new TCanvas("ICComparison MC EEP","ICComparison MC EEP"); + canEEP[0]->SetGridx(); + canEEP[0]->SetGridy(); + ICComparison[1]->GetXaxis() -> SetLabelSize(0.03); + ICComparison[1]->Draw("COLZ"); + ICComparison[1]->GetXaxis() ->SetTitle("ix"); + ICComparison[1]->GetYaxis() ->SetTitle("iy"); + ICComparison[1]->GetZaxis() ->SetRangeUser(0.85,1.15); + + TFile* output = new TFile ("IC_MC_4Correction.root","RECREATE"); + output->cd(); + ICComparison[0]->Write(); + ICComparison[1]->Write(); + output->Close(); + } + + TFile *exisistingEE = new TFile ("existingEE.root","READ"); + TH2F* exmap = (TH2F*) exisistingEE->Get("endcap"); + + TH2F* warning_Map_EEP = (TH2F*) exmap->Clone("warning_Map_EEP"); + warning_Map_EEP->Reset("ICMES"); + warning_Map_EEP->Reset(); + + TH2F* warning_Map_EEM = (TH2F*) exmap->Clone("warning_Map_EEM"); + warning_Map_EEM->Reset("ICMES"); + warning_Map_EEM->Reset(); + + + if(isMC == false) + { + std::ofstream outTxt ("Calibration_Coefficient_EE_dinamic_alpha.txt",std::ios::out); + + outTxt << "---------------------------------------------------------------" << std::endl; + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iX" + << std::fixed << std::setprecision(0) << std::setw(10) << "iY" + << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" + << std::fixed << std::setprecision(6) << std::setw(15) << "IC" + << std::fixed << std::setprecision(6) << std::setw(15) << "error" + << std::endl; + outTxt << "---------------------------------------------------------------" << std::endl; + + for (int ix = 1; ix < hcmap[0]->GetNbinsX()+1 ; ix ++) + { + for (int iy = 1; iy < hcmap[0] -> GetNbinsY()+1; iy++) + { + if( exmap->GetBinContent(ix,iy) !=1) continue; + + double x,statPrec; + statprecision_vs_ring[0]->GetPoint(hrings[0]->GetBinContent(ix,iy),x,statPrec); + + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[0]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[0]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << "-1"; + + if( hcmap[0]->GetBinContent(ix,iy) == 0. ) + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << hcmap[0]->GetBinContent(ix,iy) + << std::fixed << std::setprecision(6) << std::setw(15) << statPrec + << std::endl; + + //warning_Map_EEM->Fill(ix,iy); + } + + } + } + + for (int ix = 1; ix < hcmap[1]->GetNbinsX()+1 ; ix ++) + { + for (int iy = 1; iy < hcmap[1] -> GetNbinsY()+1; iy++) + { + if( exmap->GetBinContent(ix,iy) !=1) continue; + + double x,statPrec; + statprecision_vs_ring[1]->GetPoint(hrings[1]->GetBinContent(ix,iy),x,statPrec); + + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[1]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[1]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << "1"; + + if( hcmap[1]->GetBinContent(ix,iy) == 0. ) + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << hcmap[1]->GetBinContent(ix,iy) + << std::fixed << std::setprecision(6) << std::setw(15) << statPrec + << std::endl; + + //warning_Map_EEM->Fill(ix,iy); + } + + } + } + } + + + canEEP[1] = new TCanvas("Warning_EEP","Warning_EEP"); + canEEP[1]->SetGridx(); + canEEP[1]->SetGridy(); + warning_Map_EEP->GetXaxis() -> SetLabelSize(0.03); + warning_Map_EEP->Draw("COLZ"); + warning_Map_EEP->GetXaxis() ->SetTitle("ix"); + warning_Map_EEP->GetYaxis() ->SetTitle("iy"); + warning_Map_EEP->GetZaxis() ->SetRangeUser(0.85,1.15); + + canEEM[1] = new TCanvas("Warning_EEM","Warning_EEM"); + canEEM[1]->SetGridx(); + canEEM[1]->SetGridy(); + warning_Map_EEM->GetXaxis() -> SetLabelSize(0.03); + warning_Map_EEM->Draw("COLZ"); + warning_Map_EEM->GetXaxis() ->SetTitle("ix"); + warning_Map_EEM->GetYaxis() ->SetTitle("iy"); + warning_Map_EEM->GetZaxis() ->SetRangeUser(0.85,1.15); + + + +} + diff --git a/EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx b/EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx new file mode 100644 index 00000000000..eddd7b97cbb --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx @@ -0,0 +1,89 @@ +// To Plot E/p distributions for endcap or barrel at different iteration +#include "TH2F.h" +#include "TCanvas.h" +#include +#include "TH1F.h" +#include "TFile.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TLegend.h" +// Input needed: E/p distributions file +void DrawEPDistributions (){ + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + gStyle->SetOptStat(0); + + + TFile *f1 = TFile::Open("/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EE/Weight_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_R9_EE.root"); + TH1F *EoP_eta_2_iter_0 = (TH1F*)f1->Get("h_24_hC_EoP_eta_0"); + TH1F *EoP_eta_2_iter_4 = (TH1F*)f1->Get("h_24_hC_EoP_eta_10"); + TH1F *EoP_eta_2_iter_14 = (TH1F*)f1->Get("h_24_hC_EoP_eta_24"); + + TH1F *EoP_eta_70_iter_0 = (TH1F*)f1->Get("h_31_hC_EoP_eta_0"); + TH1F *EoP_eta_70_iter_4 = (TH1F*)f1->Get("h_31_hC_EoP_eta_10"); + TH1F *EoP_eta_70_iter_14 = (TH1F*)f1->Get("h_31_hC_EoP_eta_24"); + + + + TCanvas *cEoP2 = new TCanvas("cEoP2","cEoP2"); + cEoP2->SetGridx(); + cEoP2->SetGridy(); + EoP_eta_2_iter_0->GetXaxis()-> SetTitle("E/p"); + EoP_eta_2_iter_0->SetTitle("E/p ring n#circ24"); + EoP_eta_2_iter_0->SetLineColor(kGreen); + EoP_eta_2_iter_0->SetLineWidth(2); + EoP_eta_2_iter_0->SetLineStyle(1); + EoP_eta_2_iter_0->Draw(); + EoP_eta_2_iter_4->SetLineColor(kBlue); + EoP_eta_2_iter_4->SetLineWidth(3); + EoP_eta_2_iter_4->SetLineStyle(7); + EoP_eta_2_iter_4->Draw("same"); + EoP_eta_2_iter_14->SetLineColor(kRed); + EoP_eta_2_iter_14->SetLineWidth(2); + EoP_eta_2_iter_14->SetLineStyle(2); + EoP_eta_2_iter_14->Draw("same"); + TLegend * leg = new TLegend(0.6,0.6,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(EoP_eta_2_iter_0,"EoP at iteration 1", "LP"); + leg->AddEntry(EoP_eta_2_iter_4,"EoP at iteration 10", "LP"); + leg->AddEntry(EoP_eta_2_iter_14,"EoP at iteration 25", "LP"); + + leg->Draw(); + + + TCanvas *cEoP70 = new TCanvas("cEoP70","cEoP70"); + cEoP70->SetGridx(); + cEoP70->SetGridy(); + EoP_eta_70_iter_0->GetXaxis()-> SetTitle("E/p"); + EoP_eta_70_iter_0->SetTitle("E/p ring n#circ31"); + EoP_eta_70_iter_0->SetLineColor(kGreen); + EoP_eta_70_iter_0->SetLineWidth(2); + EoP_eta_70_iter_0->SetLineStyle(1); + EoP_eta_70_iter_0->Draw(); + EoP_eta_70_iter_4->SetLineColor(kBlue); + EoP_eta_70_iter_4->SetLineWidth(3); + EoP_eta_70_iter_4->SetLineStyle(7); + EoP_eta_70_iter_4->Draw("same"); + EoP_eta_70_iter_14->SetLineColor(kRed); + EoP_eta_70_iter_14->SetLineWidth(2); + EoP_eta_70_iter_14->SetLineStyle(2); + EoP_eta_70_iter_14->Draw("same"); + leg->Draw(); + +} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx b/EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx new file mode 100644 index 00000000000..cd9ed85d38a --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx @@ -0,0 +1,227 @@ +#include +#include "TFile.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TString.h" +#include "TCanvas.h" +#include "TPad.h" +#include "TLegend.h" +#include "TStyle.h" +#include "TH2F.h" + +void DrawMomentumCalibration() +{ + gROOT->SetStyle("Plain"); + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetStatFont(42); + gStyle->SetStatFontSize(0.05); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(10111); + gStyle->SetOptFit(1); + gStyle->SetPalette(1); + gROOT->ForceStyle(); + + TFile *f = TFile::Open("output/MomentumCalibration.root"); + int i=0; + + while(f!=0) + { + + TString Name = Form("g_EoP_EB_%d",i); + TGraphErrors* g_EoP_EB = (TGraphErrors*)f->Get(Name); + Name= Form("g_EoC_EB_%d",i); + TGraphErrors* g_EoC_EB = (TGraphErrors*)f->Get(Name); + Name= Form("g_EoC_EB_%d",i+1); + TGraphErrors* g_EoC_EB2 = (TGraphErrors*)f->Get(Name); + + Name= Form("g_Rat_EB_%d",i); + TGraphErrors* g_Rat_EB = (TGraphErrors*)f->Get(Name); + + if(g_EoP_EB==0 && g_EoC_EB==0 && g_Rat_EB==0) break; + + g_EoP_EB -> SetMarkerStyle(20); + g_EoP_EB -> SetMarkerSize(1); + g_EoP_EB -> SetMarkerColor(kRed+1); + g_EoP_EB -> SetLineColor(kRed+1); + + + g_EoC_EB -> SetMarkerStyle(20); + g_EoC_EB -> SetMarkerSize(1); + g_EoC_EB -> SetMarkerColor(kGreen+1); + g_EoC_EB -> SetLineColor(kGreen+1); + + if(g_EoC_EB2!=0) + { + + g_EoC_EB2 -> SetMarkerStyle(20); + g_EoC_EB2 -> SetMarkerSize(1); + g_EoC_EB2 -> SetMarkerColor(kGreen+1); + g_EoC_EB2 -> SetLineColor(kGreen+1); + + TH2F* correlation = new TH2F("correlation","correlation",50,0.98,1.02,50,0.97,1.03); + for(int i=0; iGetN() && iGetN() ; i++) + { double x,y,z,k; + g_EoC_EB->GetPoint(i,x,y); + g_EoC_EB2->GetPoint(i,z,k); + + correlation->Fill(y,k); + } + correlation->GetXaxis()->SetTitle("mod1-2"); + correlation->GetYaxis()->SetTitle("mod3-4"); + cout<<" correlation "<GetCorrelationFactor()<Draw("colz"); + } +// correlation->Draw("colz"); + g_Rat_EB -> SetMarkerStyle(20); + g_Rat_EB -> SetMarkerSize(1); + g_Rat_EB -> SetMarkerColor(kBlue+2); + g_Rat_EB -> SetLineColor(kBlue+2); + + float phiLim = 360; + Name = Form("g_fit_EB_%d",i); + TCanvas* c_g_fit_EB = new TCanvas(Name, Name,100,100,800,600); + Name = Form("pad_0_EB_%d",i); + TPad *cLower_EB = new TPad(Name,Name,0.00,0.00,1.00,0.30); + Name = Form("pad_1_EB_%d",i); + TPad *cUpper_EB = new TPad(Name,Name,0.00,0.30,1.00,1.00); + + cLower_EB->SetBottomMargin(0.25); cUpper_EB->SetTopMargin(0.01); + cUpper_EB->SetBottomMargin(0.01); + + cLower_EB->Draw(); + cUpper_EB->Draw(); + + float FontSCF = cUpper_EB->GetHNDC()/cLower_EB->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + + cUpper_EB -> cd(); + gPad->SetGrid(); + + TH1F *hPad_EB = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hPad_EB->GetXaxis()->SetLabelSize(labSize); + hPad_EB->GetXaxis()->SetTitleSize(labSize); + hPad_EB->GetYaxis()->SetLabelSize(labSize); + hPad_EB->GetYaxis()->SetTitleSize(labSize); + hPad_EB->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EB->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto p"); + + g_EoP_EB -> Draw("PL"); + g_EoC_EB -> Draw("PL"); + + TLegend *tl_EB = new TLegend(0.80,0.80,0.90,0.95); + tl_EB -> SetTextFont(40); + tl_EB -> SetFillColor(0); + // tl -> SetBorderSize(0); + tl_EB -> AddEntry(g_EoP_EB,"MC EB","PL"); + tl_EB -> AddEntry(g_EoC_EB,"Data EB","PL"); + tl_EB -> Draw(); + + cLower_EB -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EB = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hRat_EB->GetYaxis()->SetNdivisions(505); + hRat_EB->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EB->GetXaxis()->SetTitleOffset(0.6); + hRat_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EB->GetYaxis()->SetTitle("Data / MC"); + g_Rat_EB->Draw("PL"); + i++; + } + + i=0; + + while (f!=0) { + + TString Name = Form("g_EoP_EE_%d",i); + TGraphErrors* g_EoP_EE = (TGraphErrors*)f->Get(Name); + Name= Form("g_EoC_EE_%d",i); + TGraphErrors* g_EoC_EE = (TGraphErrors*)f->Get(Name); + Name= Form("g_Rat_EE_%d",i); + TGraphErrors* g_Rat_EE = (TGraphErrors*)f->Get(Name); + if(g_EoP_EE==0 && g_EoC_EE==0 && g_Rat_EE==0) break; + + g_EoP_EE -> SetMarkerStyle(20); + g_EoP_EE -> SetMarkerSize(1); + g_EoP_EE -> SetMarkerColor(kRed+1); + g_EoP_EE -> SetLineColor(kRed+1); + + g_EoC_EE -> SetMarkerStyle(20); + g_EoC_EE -> SetMarkerSize(1); + g_EoC_EE -> SetMarkerColor(kGreen+1); + g_EoC_EE -> SetLineColor(kGreen+1); + + g_Rat_EE -> SetMarkerStyle(20); + g_Rat_EE -> SetMarkerSize(1); + g_Rat_EE -> SetMarkerColor(kBlue+2); + g_Rat_EE -> SetLineColor(kBlue+2); + + Name = Form("g_fit_EE_%d",i); + TCanvas* c_g_fit_EE = new TCanvas(Name, Name,100,100,800,600); + TPad *cLower_EE = new TPad("pad_0_EE","pad_0_EE",0.00,0.00,1.00,0.30); + TPad *cUpper_EE = new TPad("pad_1_EE","pad_1_EE",0.00,0.30,1.00,1.00); + + cLower_EE->SetBottomMargin(0.25); cUpper_EE->SetTopMargin(0.01); + cUpper_EE->SetBottomMargin(0.01); + + cLower_EE->Draw(); + cUpper_EE->Draw(); + + float FontSCF = cUpper_EE->GetHNDC()/cLower_EE->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + float phiLim = 360.; + cUpper_EE -> cd(); + gPad->SetGrid(); + TH1F *hPad_EE = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hPad_EE->GetXaxis()->SetLabelSize(labSize); + hPad_EE->GetXaxis()->SetTitleSize(labSize); + hPad_EE->GetYaxis()->SetLabelSize(labSize); + hPad_EE->GetYaxis()->SetTitleSize(labSize); + hPad_EE->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EE->GetYaxis()->SetTitle("M_{ee}^{2}/M_{Z}^{2} #propto 1/p"); + + g_EoP_EE -> Draw("PL"); + g_EoC_EE -> Draw("PL"); + + TLegend *tl_EE = new TLegend(0.80,0.80,0.90,0.95); + tl_EE -> SetTextFont(40); + tl_EE -> SetFillColor(0); + // tl -> SetBorderSize(0); + tl_EE -> AddEntry(g_EoP_EE,"MC EE","PL"); + tl_EE -> AddEntry(g_EoC_EE,"Data EE","PL"); + tl_EE -> Draw(); + + cLower_EE -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EE = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hRat_EE->GetYaxis()->SetNdivisions(505); + hRat_EE->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EE->GetXaxis()->SetTitleOffset(0.6); + hRat_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EE->GetYaxis()->SetTitle("Data / MC"); + g_Rat_EE->Draw("PL"); + i++; + + } + +} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C b/EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C new file mode 100644 index 00000000000..e92f2c23983 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C @@ -0,0 +1,330 @@ +// +// Macro to produce ECAL single electron calibration plots +// + +void DrawResidualPlotsEB( + Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim/WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", + Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim/Odd_WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", + Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim/Even_WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", + int evalStat = 1, + int inputLoops = 25, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + // Draw plots in different modality : xtal, TT, SM + TString modality = "xtal"; + bool printPlots = false; + const int nLoops = inputLoops; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile2 << endl; + + char hname[100]; + char htitle[100]; + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + + TFile *f1 = new TFile(infile1); + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap1[nLoops]; + TH2F *hcmap2[nLoops]; + TH2F *hcmap3[nLoops]; + TGraphErrors *residual_vs_ieta[nLoops]; + + TH2F *hcmap1_TT[nLoops]; + TH2F *hcmap2_TT[nLoops]; + TH2F *hcmap3_TT[nLoops]; + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"h2_%d_hC_scale_EB",iLoop); + hcmap1[iLoop] = (TH2F*)f1->Get(hname); + hcmap2[iLoop] = (TH2F*)f2->Get(hname); + hcmap3[iLoop] = (TH2F*)f3->Get(hname); + + if ( modality == "TT" ) { + sprintf(hname,"h1_%d_hC_scale_EB_TT",iLoop); + hcmap1_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); + sprintf(hname,"h2_%d_hC_scale_EB_TT",iLoop); + hcmap2_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); + sprintf(hname,"h3_%d_hC_scale_EB_TT",iLoop); + hcmap3_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); + + for ( int iTTphi = 1; iTTphi < 72; iTTphi++ ) { + + for ( int iTTeta = -17; iTTeta < 18; iTTeta++ ) { + if ( iTTeta == 0 ) continue; + float theICsum = hcmap1[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; + hcmap1_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); + theICsum = hcmap2[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; + hcmap2_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); + theICsum = hcmap3[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; + hcmap3_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); + + } + + } + + } + + TH1F *hscale[171]; + TH1F *hsigma[171]; + TH1F *hresidual[171]; + + if ( modality == "xtal" ) { + + for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ + //int etaring = -85+(jbin-1); + float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hscale_ring_ieta%02d",etaring); + hscale[jbin-1] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hsigma_ring_ieta%02d",etaring); + hsigma[jbin-1] = new TH1F(hname, hname, 250,-0.1,0.1); + for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ + float ic = hcmap1[iLoop]->GetBinContent(ibin,jbin); + hscale[jbin-1] -> Fill (ic); + float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hsigma[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + + } + + else if ( modality == "TT" ) { + + for (int jbin = 1; jbin < hcmap2_TT[iLoop]-> GetNbinsY()+1; jbin++){ + //int etaring = -85+(jbin-1); + float etaring = hcmap2_TT[iLoop]-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hscale_ring_ieta%02d",etaring); + hscale[jbin-1] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hsigma_ring_ieta%02d",etaring); + hsigma[jbin-1] = new TH1F(hname, hname, 250,-0.1,0.1); + for (int ibin = 1; ibin < hcmap2_TT[iLoop]-> GetNbinsX()+1; ibin++){ + float ic = hcmap1_TT[iLoop]->GetBinContent(ibin,jbin); + hscale[jbin-1] -> Fill (ic); + float ic1 = hcmap2_TT[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3_TT[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hsigma[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + + } + else if ( modality == "SM" ) { + + for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ + // Get the SM number + int iSM = (ibin-1)/20 + 1; + if ( (ibin-1)%20 == 0 ) { + sprintf(hname,"hscale_ring_ieta%02d",iSM); + hscale[iSM-1] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hscale_ring_ieta%02d",iSM+18); + hscale[iSM-1+18] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hsigma_ring_ieta%02d",iSM); + hsigma[iSM-1] = new TH1F(hname, hname, 250,-0.1,0.1); + sprintf(hname,"hsigma_ring_ieta%02d",iSM+18); + hsigma[iSM-1+18] = new TH1F(hname, hname, 250,-0.1,0.1); + } + for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ + float ic = hcmap1[iLoop]->GetBinContent(ibin,jbin); + float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + float sigma = (ic1-ic2)/(ic1+ic2); // sigma (diff/sum) gives the stat. precision on teh entire sample + if ( jbin < 86 ) { //EE- + hscale[iSM-1+18]->Fill(ic); + hsigma[iSM-1+18]->Fill(sigma); // sigma (diff/sum) gives the stat. precision on teh entire sample + } + else { //EE+ + hscale[iSM-1]->Fill(ic); + hsigma[iSM-1]->Fill(sigma); // sigma (diff/sum) gives the stat. precision on teh entire sample + } + } + } + } + + } + + + residual_vs_ieta[iLoop] = new TGraphErrors(); + residual_vs_ieta[iLoop]->SetMarkerStyle(20); + residual_vs_ieta[iLoop]->SetMarkerSize(1); + residual_vs_ieta[iLoop]->SetMarkerColor(kRed+2); + + int n = 0; + + if ( modality == "xtal" ) { + + for (int i = 1; i < hcmap2[iLoop]-> GetNbinsY()+1; i++){ + etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(i); + if (etaring==0) continue; + if ( hsigma[i-1]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[iLoop]-> GetYaxis()->GetBinWidth(i); + // Get the sigma + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); + fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); + hsigma[i-1] -> Fit("fgaus","QR"); + float sigma = fgaus -> GetParameter(2); + // Get the scale + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hscale[i-1]->GetRMS()); + fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); + hscale[i-1] -> Fit("fgaus","QR"); + float scale = fgaus -> GetParameter(2); + float residual = scale*scale - sigma*sigma; + if ( residual < 0 ) residual = -sqrt(-residual); + else residual = sqrt(residual); + residual_vs_ieta[iLoop]-> SetPoint(n,etaring,residual); + residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + } + + else if ( modality == "TT" ) { + + for (int i = 1; i < hcmap2_TT[iLoop]-> GetNbinsY()+1; i++){ + etaring = hcmap2_TT[iLoop]-> GetYaxis()->GetBinCenter(i); + if (etaring==0) continue; + if ( hsigma[i-1]->GetEntries() == 0) continue; + float e = 0.5*hcmap2_TT[iLoop]-> GetYaxis()->GetBinWidth(i); + // Get the sigma + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); + fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); + hsigma[i-1] -> Fit("fgaus","QR"); + float sigma = fgaus -> GetParameter(2); + // Get the scale + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hscale[i-1]->GetRMS()); + fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); + hscale[i-1] -> Fit("fgaus","QR"); + float scale = fgaus -> GetParameter(2); + float residual = scale*scale - sigma*sigma; + if ( residual < 0 ) residual = -sqrt(-residual); + else residual = sqrt(residual); + residual_vs_ieta[iLoop]-> SetPoint(n,etaring,residual); + residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + } + + else if ( modality == "SM" ) { + + for (int i = 1; i < 36+1; i++){ + + if ( hsigma[i-1]->GetEntries() == 0) continue; + float e = 0.5; + // Get the sigma + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); + fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); + hsigma[i-1] -> Fit("fgaus","QR"); + float sigma = fgaus -> GetParameter(2); + // Get the scale + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hscale[i-1]->GetRMS()); + fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); + hscale[i-1] -> Fit("fgaus","QR"); + float scale = fgaus -> GetParameter(2); + float residual = scale*scale - sigma*sigma; + if ( residual < 0 ) residual = -sqrt(-residual); + else residual = sqrt(residual); + residual_vs_ieta[iLoop]-> SetPoint(n,i,residual); + residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + + + } + + + } + +// delete hresidual; + + } + + + + //------------------------------------------------------------------------ + + + + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[nLoops]; + + // --- plot 5 : statistical precision vs ieta + if (evalStat){ + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + sprintf(hname,"cstat_%d",iLoop); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + residual_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.07); + residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("residual miscalibration"); + residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + if ( modality = "SM" ) residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("iSM"); + residual_vs_ieta[iLoop]->Draw("ap"); + } + } + + //----------------------------------------------------------------- + //--- Print plots + //----------------------------------------------------------------- + + if (printPlots){ + + //gStyle->SetOptStat(1110); + c[0]->Print("IC_map.png",fileType); + c[1]->Print("IC_precision_vs_ieta.png",fileType); + c[2]->Print("IC_scale_vs_ieta.png",fileType); + c[3]->Print("IC_spread.png",fileType); + c[4]->Print("occupancy_map.png",fileType); + } +} + + diff --git a/EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx b/EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx new file mode 100644 index 00000000000..bbed2c46e03 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx @@ -0,0 +1,277 @@ +// +// Macro to Normalize DATA IC Coefficient along one ring skipping dead channels and TT +// Input File Scale Map of a data sample (can be used also on MC) an this is saved in the same +// file updating the old scale_map normalized by rings without skip dead channels +#include +#include +#include +#include +#include +#include +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include + +using namespace std; + +// Check if the crystal is near to a dead one + +bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir) +{ + if(h_scale_EE->GetBinContent(ix,iy) ==0) return false; + + int bx= h_scale_EE->GetNbinsX(); + int by= h_scale_EE->GetNbinsY(); + + if((ixGetBinContent(ix+1,iy) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix-1,iy)==0 && ix>1 && (ir!=0 || ir<33))) return false; + + if((iyGetBinContent(ix,iy+1) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix,iy-1)==0 && iy>1 && (ir!=0 || ir<33))) return false; + + if((ixGetBinContent(ix+1,iy+1) ==0 && iyGetBinContent(ix-1,iy-1)==0 && iy>1 && ix>1 && (ir!=0 || ir<33))) return false; + + if((h_scale_EE->GetBinContent(ix+1,iy-1) ==0 && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && ix>1 && iy >& TT_centre ) +{ + for( int k =0; kReset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + // map for dead TT centre + + std::vector< std::pair > TT_centre_EEP ; + std::vector< std::pair > TT_centre_EEM ; + + TT_centre_EEP.push_back(std::pair (78,78)); + TT_centre_EEP.push_back(std::pair (83,28)); + TT_centre_EEP.push_back(std::pair (83,23)); + TT_centre_EEM.push_back(std::pair (53,28)); + + // Input file with full statistic + + TFile *f = new TFile(infile1,"UPDATE"); + TH2F* h_scale_EE[2],*hcmap_EE[2]; + + h_scale_EE[1] = (TH2F*)f->Get("h_scale_EEP"); + h_scale_EE[0] = (TH2F*)f->Get("h_scale_EEM"); + + hcmap_EE[1] = (TH2F*) h_scale_EE[1]->Clone("hcmap_EEP"); + hcmap_EE[0] = (TH2F*) h_scale_EE[0]->Clone("hcmap_EEM"); + + hcmap_EE[0] -> Reset("ICEMS"); + hcmap_EE[1] -> Reset("ICEMS"); + hcmap_EE[0] -> ResetStats(); + hcmap_EE[1] -> ResetStats(); + + + TH2F *hrings[2]; + hrings[0] = (TH2F*)h_scale_EE[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)h_scale_EE[1]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICMES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); + } + + std::vector SumIC_Ring_EEP,SumIC_Ring_EEM,Sumxtal_Ring_EEP,Sumxtal_Ring_EEM; + + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + // Mean over phi corrected skipping dead channel + for(int k=0; k<2 ; k++) + { + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ + + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ + + ir = hrings[k]->GetBinContent(ix,iy); + + bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); + bool isGoodTT; + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ) + { + SumIC_Ring_EEP.at(ir) = SumIC_Ring_EEP.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP.at(ir) = Sumxtal_Ring_EEP.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood) + { + SumIC_Ring_EEM.at(ir) = SumIC_Ring_EEM.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM.at(ir) = Sumxtal_Ring_EEM.at(ir) + 1.; + } + + } + } + } + + for(int k=0; k<2 ; k++) + { + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ) + { + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ) + { + ir = hrings[k]->GetBinContent(ix,iy); + + //fede: skip bad channels and bad TTs + bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); + bool isGoodTT; + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + if (!isGood || !isGoodTT) continue; + + if(k!=0) + { + if(ir>33){ + hcmap_EE[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEP.at(ir) != 0 && SumIC_Ring_EEP.at(ir)!= 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP.at(ir)/Sumxtal_Ring_EEP.at(ir))); + } + else + { + if(ir>33){ + hcmap_EE[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM.at(ir) != 0 && SumIC_Ring_EEM.at(ir) != 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM.at(ir)/Sumxtal_Ring_EEM.at(ir))); + } + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + // --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP not normalized"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + h_scale_EE[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[1]->Draw("COLZ"); + h_scale_EE[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[0] = new TCanvas("cEEM","cmapEEM not normalized"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + h_scale_EE[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[0]->Draw("COLZ"); + h_scale_EE[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[1] = new TCanvas("cmapEEP Normalized","cmapEEP Normalized"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap_EE[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[1]->Draw("COLZ"); + hcmap_EE[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[1] = new TCanvas("cmapEEM Normalized","cmapEEM Normalized"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap_EE[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[0]->Draw("COLZ"); + hcmap_EE[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + f->cd(); + hcmap_EE[0]->Write("h_scale_map_EEM"); + hcmap_EE[1]->Write("h_scale_map_EEP"); + + + } diff --git a/EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C b/EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C new file mode 100644 index 00000000000..8be08eaa6df --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C @@ -0,0 +1,45 @@ +/// Produce miscalibration map for EB + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TRandom.h" +#include "TRandom3.h" + +void main(int argc, char **argv) +{ + + TRandom3 genRand; + + std::ofstream io1; + io1.open ("scalibMap6.txt"); + + float eta, scalib; + + for (eta=-85; eta<86; eta++) { + + if (fabs(eta)<30) scalib = genRand.Gaus(1,0.06); + else if (fabs(eta)<60) scalib = genRand.Gaus(1,0.07); + else if (fabs(eta)<70) scalib = genRand.Gaus(1,0.08); + else scalib = genRand.Gaus(1,0.09); + + io1< +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TRandom.h" +#include "TRandom3.h" + +void main(int argc, char **argv) +{ + + TRandom3 genRand; + + std::ofstream io1; + io1.open ("scalibMapEE.txt"); + + float r, scalib; + + for (r=0; r<40; r++) { + + if (fabs(r)<5) scalib = genRand.Gaus(1,0.01); + else if (fabs(r)<15) scalib = genRand.Gaus(1,0.005); + else if (fabs(r)<30) scalib = genRand.Gaus(1,0.005); + else if (fabs(r)<40) scalib = genRand.Gaus(1,0.01); + else scalib = genRand.Gaus(1,0.015); + + io1< 2 File for Even and Odd L3 output for a defined data sample + -> evalStat = 1 for statistical precision analysis + -> inputLoops = number of L3 loops + + Run : root -l macros/DrawPrecisionPlot.C + + Output: -> Plots = stat precision in eta ring no Folded, convergence Plots in 4 eta region + evaluate through linear fit + -> StatPrec.root = has to be used in the comparision with miscalibrated MC in CompareCalibToMCTruth.C + + +########################################## +----- Macros for EE Calibration ---------- +########################################## + + +1) macros/Correction_TrackerEffect_EE_MC.cxx + + input : -> Calibration Maps of (Normalized MC IC * IC_RECO)/(IC_Truth) used to extract empiric correction for data + -> macros/eerings.dat is used to built EE ring geometry + -> List of phi structure coordinates (iphi calcolated from ix and iy) for EE+ and EE- + + Run : root -l macros/Correction_TrackerEffect_EE_MC.cxx+ + + Output : k(correction_factor) = (inside a given phi structure)/(outside, in the all endcap) + The analysis is independent between EE+ and EE-. + -> Map IC are plotted before and after correction + -> Empiric coefficient are printed and used in Correction_TrackerEffect_EE_DATA_dinamic_alpha.cxx + + Note : these coefficient are strictly dependent on the MC production used (WJetsToLnu and DYToLL Fall1 are considered) + +2) macros/Correction_TrackerEffect_EE_DATA.cxx + + input : -> Ntupla of data on which apply correction + -> macros/eerings.dat is used to built EE ring geometry + -> List of phi structure coordinates (iphi calcolated from ix and iy) for EE+ and EE- and + empiric coefficient for correction that are different + between noEP and R9 selection applied in the calibration procedure. + + Run : root -l macros/Correction_TrackerEffect_EE_DATA.cxx+ + + Output : -> maps of IC corrected are added in the original input file under the name + h_scale_map_corrected_EEM and h_scale_map_corrected_EEP + +3) macros/DrawCalibrationPlotsEE.C + + input : -> Files for full, even and odd calibration analysis on data or MC + -> evalstat=1 in order to evaluate statistic spread IC + -> isMC = true stands for MC EE analysis + -> MCtruthIC_EE.root and MCRecoIC_EE.root are used for MC Analysis + -> existingEE.root -> contains problematic channel in the Endcap + + Run : root -l macros/DrawCalibrationPlotsEE.C+ + + Output: -> Plot for spread, statistical precision and residual spred for EE+, EE- and folding EE+ over EE- + -> If isMC=true Plots of statistic precision for EE+, EE- and folded are saved in StatPrec_MC_EE.root + You have to run this code before run CompareCalibToMCTruth_EE.C + -> if isMC=true comparison plot MC(Truth/RECO)/MC IC that are saved in IC_MC_4Correction.root + This file is used as input in macros/Correction_TrackerEffect_EE_MC.cxx + -> ifMC=false Calibration_Coefficient_EE_dinamic_alpha.txt that is the txt file of EE IC + -> Map of warning channel after InterCalibration + + +############################### +-------- Other macros --------- +############################### + + +1) macros/DrawEPDistributions.cxx + + input : -> file from FastCalibratorWeight or FastCalibratorEE with the EoP distributions for each eta ring at + different iteration step + + Run : root -l macros/DrawEPDistributions.cxx+ + + Output : Plots in different eta ring + + +2) macros/DrawMomentumCalibration.cxx + + input : -> output from test/CalibrationMomentum.cpp + + Run : root -l macros/DrawMomentumCalibration.cxx+ + + Output : Plots of the scale, correlation and ratios in different eta region for EB and EE + + + \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/eerings.dat b/EOverPCalibration/FastCalibrator/macros/eerings.dat new file mode 100644 index 00000000000..4d581446724 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/macros/eerings.dat @@ -0,0 +1,14648 @@ +(1, 41, -1) 0 +(1, 42, -1) 0 +(1, 43, -1) 0 +(1, 44, -1) 0 +(1, 45, -1) 0 +(1, 46, -1) 0 +(1, 47, -1) 0 +(1, 48, -1) 0 +(1, 49, -1) 0 +(1, 50, -1) 0 +(1, 51, -1) 0 +(1, 52, -1) 0 +(1, 53, -1) 0 +(1, 54, -1) 0 +(1, 55, -1) 0 +(1, 56, -1) 0 +(1, 57, -1) 0 +(1, 58, -1) 0 +(1, 59, -1) 0 +(1, 60, -1) 0 +(2, 41, -1) 0 +(2, 42, -1) 0 +(2, 43, -1) 0 +(2, 44, -1) 1 +(2, 45, -1) 1 +(2, 46, -1) 1 +(2, 47, -1) 1 +(2, 48, -1) 1 +(2, 49, -1) 1 +(2, 50, -1) 1 +(2, 51, -1) 1 +(2, 52, -1) 1 +(2, 53, -1) 1 +(2, 54, -1) 1 +(2, 55, -1) 1 +(2, 56, -1) 1 +(2, 57, -1) 1 +(2, 58, -1) 0 +(2, 59, -1) 0 +(2, 60, -1) 0 +(3, 41, -1) 1 +(3, 42, -1) 1 +(3, 43, -1) 1 +(3, 44, -1) 2 +(3, 45, -1) 2 +(3, 46, -1) 2 +(3, 47, -1) 2 +(3, 48, -1) 2 +(3, 49, -1) 2 +(3, 50, -1) 2 +(3, 51, -1) 2 +(3, 52, -1) 2 +(3, 53, -1) 2 +(3, 54, -1) 2 +(3, 55, -1) 2 +(3, 56, -1) 2 +(3, 57, -1) 2 +(3, 58, -1) 1 +(3, 59, -1) 1 +(3, 60, -1) 1 +(4, 36, -1) 1 +(4, 37, -1) 1 +(4, 38, -1) 2 +(4, 39, -1) 2 +(4, 40, -1) 2 +(4, 41, -1) 2 +(4, 42, -1) 2 +(4, 43, -1) 2 +(4, 44, -1) 3 +(4, 45, -1) 3 +(4, 46, -1) 3 +(4, 47, -1) 3 +(4, 48, -1) 3 +(4, 49, -1) 3 +(4, 50, -1) 3 +(4, 51, -1) 3 +(4, 52, -1) 3 +(4, 53, -1) 3 +(4, 54, -1) 3 +(4, 55, -1) 3 +(4, 56, -1) 3 +(4, 57, -1) 3 +(4, 58, -1) 2 +(4, 59, -1) 2 +(4, 60, -1) 2 +(4, 61, -1) 2 +(4, 62, -1) 2 +(4, 63, -1) 2 +(4, 64, -1) 1 +(4, 65, -1) 1 +(5, 36, -1) 2 +(5, 37, -1) 2 +(5, 38, -1) 2 +(5, 39, -1) 3 +(5, 40, -1) 3 +(5, 41, -1) 3 +(5, 42, -1) 3 +(5, 43, -1) 3 +(5, 44, -1) 4 +(5, 45, -1) 4 +(5, 46, -1) 4 +(5, 47, -1) 4 +(5, 48, -1) 4 +(5, 49, -1) 4 +(5, 50, -1) 4 +(5, 51, -1) 4 +(5, 52, -1) 4 +(5, 53, -1) 4 +(5, 54, -1) 4 +(5, 55, -1) 4 +(5, 56, -1) 4 +(5, 57, -1) 4 +(5, 58, -1) 3 +(5, 59, -1) 3 +(5, 60, -1) 3 +(5, 61, -1) 3 +(5, 62, -1) 3 +(5, 63, -1) 2 +(5, 64, -1) 2 +(5, 65, -1) 2 +(6, 26, -1) 0 +(6, 27, -1) 0 +(6, 28, -1) 0 +(6, 29, -1) 0 +(6, 30, -1) 1 +(6, 31, -1) 1 +(6, 32, -1) 1 +(6, 33, -1) 2 +(6, 34, -1) 2 +(6, 35, -1) 3 +(6, 36, -1) 3 +(6, 37, -1) 3 +(6, 38, -1) 3 +(6, 39, -1) 4 +(6, 40, -1) 4 +(6, 41, -1) 4 +(6, 42, -1) 4 +(6, 43, -1) 4 +(6, 44, -1) 5 +(6, 45, -1) 5 +(6, 46, -1) 5 +(6, 47, -1) 5 +(6, 48, -1) 5 +(6, 49, -1) 5 +(6, 50, -1) 5 +(6, 51, -1) 5 +(6, 52, -1) 5 +(6, 53, -1) 5 +(6, 54, -1) 5 +(6, 55, -1) 5 +(6, 56, -1) 5 +(6, 57, -1) 5 +(6, 58, -1) 4 +(6, 59, -1) 4 +(6, 60, -1) 4 +(6, 61, -1) 4 +(6, 62, -1) 4 +(6, 63, -1) 3 +(6, 64, -1) 3 +(6, 65, -1) 3 +(6, 66, -1) 3 +(6, 67, -1) 2 +(6, 68, -1) 2 +(6, 69, -1) 1 +(6, 70, -1) 1 +(6, 71, -1) 1 +(6, 72, -1) 0 +(6, 73, -1) 0 +(6, 74, -1) 0 +(6, 75, -1) 0 +(7, 26, -1) 0 +(7, 27, -1) 0 +(7, 28, -1) 1 +(7, 29, -1) 1 +(7, 30, -1) 2 +(7, 31, -1) 2 +(7, 32, -1) 2 +(7, 33, -1) 3 +(7, 34, -1) 3 +(7, 35, -1) 3 +(7, 36, -1) 4 +(7, 37, -1) 4 +(7, 38, -1) 4 +(7, 39, -1) 5 +(7, 40, -1) 5 +(7, 41, -1) 5 +(7, 42, -1) 5 +(7, 43, -1) 5 +(7, 44, -1) 6 +(7, 45, -1) 6 +(7, 46, -1) 6 +(7, 47, -1) 6 +(7, 48, -1) 6 +(7, 49, -1) 6 +(7, 50, -1) 6 +(7, 51, -1) 6 +(7, 52, -1) 6 +(7, 53, -1) 6 +(7, 54, -1) 6 +(7, 55, -1) 6 +(7, 56, -1) 6 +(7, 57, -1) 6 +(7, 58, -1) 5 +(7, 59, -1) 5 +(7, 60, -1) 5 +(7, 61, -1) 5 +(7, 62, -1) 5 +(7, 63, -1) 4 +(7, 64, -1) 4 +(7, 65, -1) 4 +(7, 66, -1) 3 +(7, 67, -1) 3 +(7, 68, -1) 3 +(7, 69, -1) 2 +(7, 70, -1) 2 +(7, 71, -1) 2 +(7, 72, -1) 1 +(7, 73, -1) 1 +(7, 74, -1) 0 +(7, 75, -1) 0 +(8, 26, -1) 1 +(8, 27, -1) 1 +(8, 28, -1) 2 +(8, 29, -1) 2 +(8, 30, -1) 3 +(8, 31, -1) 3 +(8, 32, -1) 3 +(8, 33, -1) 4 +(8, 34, -1) 4 +(8, 35, -1) 4 +(8, 36, -1) 5 +(8, 37, -1) 5 +(8, 38, -1) 5 +(8, 39, -1) 6 +(8, 40, -1) 6 +(8, 41, -1) 6 +(8, 42, -1) 6 +(8, 43, -1) 6 +(8, 44, -1) 7 +(8, 45, -1) 7 +(8, 46, -1) 7 +(8, 47, -1) 7 +(8, 48, -1) 7 +(8, 49, -1) 7 +(8, 50, -1) 7 +(8, 51, -1) 7 +(8, 52, -1) 7 +(8, 53, -1) 7 +(8, 54, -1) 7 +(8, 55, -1) 7 +(8, 56, -1) 7 +(8, 57, -1) 7 +(8, 58, -1) 6 +(8, 59, -1) 6 +(8, 60, -1) 6 +(8, 61, -1) 6 +(8, 62, -1) 6 +(8, 63, -1) 5 +(8, 64, -1) 5 +(8, 65, -1) 5 +(8, 66, -1) 4 +(8, 67, -1) 4 +(8, 68, -1) 4 +(8, 69, -1) 3 +(8, 70, -1) 3 +(8, 71, -1) 3 +(8, 72, -1) 2 +(8, 73, -1) 2 +(8, 74, -1) 1 +(8, 75, -1) 1 +(9, 21, -1) 0 +(9, 22, -1) 0 +(9, 23, -1) 0 +(9, 24, -1) 1 +(9, 25, -1) 1 +(9, 26, -1) 2 +(9, 27, -1) 2 +(9, 28, -1) 3 +(9, 29, -1) 3 +(9, 30, -1) 4 +(9, 31, -1) 4 +(9, 32, -1) 4 +(9, 33, -1) 5 +(9, 34, -1) 5 +(9, 35, -1) 5 +(9, 36, -1) 6 +(9, 37, -1) 6 +(9, 38, -1) 6 +(9, 39, -1) 7 +(9, 40, -1) 7 +(9, 41, -1) 7 +(9, 42, -1) 7 +(9, 43, -1) 7 +(9, 44, -1) 8 +(9, 45, -1) 8 +(9, 46, -1) 8 +(9, 47, -1) 8 +(9, 48, -1) 8 +(9, 49, -1) 8 +(9, 50, -1) 8 +(9, 51, -1) 8 +(9, 52, -1) 8 +(9, 53, -1) 8 +(9, 54, -1) 8 +(9, 55, -1) 8 +(9, 56, -1) 8 +(9, 57, -1) 8 +(9, 58, -1) 7 +(9, 59, -1) 7 +(9, 60, -1) 7 +(9, 61, -1) 7 +(9, 62, -1) 7 +(9, 63, -1) 6 +(9, 64, -1) 6 +(9, 65, -1) 6 +(9, 66, -1) 5 +(9, 67, -1) 5 +(9, 68, -1) 5 +(9, 69, -1) 4 +(9, 70, -1) 4 +(9, 71, -1) 4 +(9, 72, -1) 3 +(9, 73, -1) 3 +(9, 74, -1) 2 +(9, 75, -1) 2 +(9, 76, -1) 1 +(9, 77, -1) 1 +(9, 78, -1) 0 +(9, 79, -1) 0 +(9, 80, -1) 0 +(10, 21, -1) 0 +(10, 22, -1) 1 +(10, 23, -1) 1 +(10, 24, -1) 2 +(10, 25, -1) 2 +(10, 26, -1) 3 +(10, 27, -1) 3 +(10, 28, -1) 4 +(10, 29, -1) 4 +(10, 30, -1) 4 +(10, 31, -1) 5 +(10, 32, -1) 5 +(10, 33, -1) 6 +(10, 34, -1) 6 +(10, 35, -1) 6 +(10, 36, -1) 7 +(10, 37, -1) 7 +(10, 38, -1) 7 +(10, 39, -1) 8 +(10, 40, -1) 8 +(10, 41, -1) 8 +(10, 42, -1) 8 +(10, 43, -1) 8 +(10, 44, -1) 9 +(10, 45, -1) 9 +(10, 46, -1) 9 +(10, 47, -1) 9 +(10, 48, -1) 9 +(10, 49, -1) 9 +(10, 50, -1) 9 +(10, 51, -1) 9 +(10, 52, -1) 9 +(10, 53, -1) 9 +(10, 54, -1) 9 +(10, 55, -1) 9 +(10, 56, -1) 9 +(10, 57, -1) 9 +(10, 58, -1) 8 +(10, 59, -1) 8 +(10, 60, -1) 8 +(10, 61, -1) 8 +(10, 62, -1) 8 +(10, 63, -1) 7 +(10, 64, -1) 7 +(10, 65, -1) 7 +(10, 66, -1) 6 +(10, 67, -1) 6 +(10, 68, -1) 6 +(10, 69, -1) 5 +(10, 70, -1) 5 +(10, 71, -1) 4 +(10, 72, -1) 4 +(10, 73, -1) 4 +(10, 74, -1) 3 +(10, 75, -1) 3 +(10, 76, -1) 2 +(10, 77, -1) 2 +(10, 78, -1) 1 +(10, 79, -1) 1 +(10, 80, -1) 0 +(11, 21, -1) 1 +(11, 22, -1) 1 +(11, 23, -1) 2 +(11, 24, -1) 2 +(11, 25, -1) 3 +(11, 26, -1) 3 +(11, 27, -1) 4 +(11, 28, -1) 4 +(11, 29, -1) 5 +(11, 30, -1) 5 +(11, 31, -1) 6 +(11, 32, -1) 6 +(11, 33, -1) 6 +(11, 34, -1) 7 +(11, 35, -1) 7 +(11, 36, -1) 8 +(11, 37, -1) 8 +(11, 38, -1) 8 +(11, 39, -1) 8 +(11, 40, -1) 9 +(11, 41, -1) 9 +(11, 42, -1) 9 +(11, 43, -1) 9 +(11, 44, -1) 9 +(11, 45, -1) 10 +(11, 46, -1) 10 +(11, 47, -1) 10 +(11, 48, -1) 10 +(11, 49, -1) 10 +(11, 50, -1) 10 +(11, 51, -1) 10 +(11, 52, -1) 10 +(11, 53, -1) 10 +(11, 54, -1) 10 +(11, 55, -1) 10 +(11, 56, -1) 10 +(11, 57, -1) 9 +(11, 58, -1) 9 +(11, 59, -1) 9 +(11, 60, -1) 9 +(11, 61, -1) 9 +(11, 62, -1) 8 +(11, 63, -1) 8 +(11, 64, -1) 8 +(11, 65, -1) 8 +(11, 66, -1) 7 +(11, 67, -1) 7 +(11, 68, -1) 6 +(11, 69, -1) 6 +(11, 70, -1) 6 +(11, 71, -1) 5 +(11, 72, -1) 5 +(11, 73, -1) 4 +(11, 74, -1) 4 +(11, 75, -1) 3 +(11, 76, -1) 3 +(11, 77, -1) 2 +(11, 78, -1) 2 +(11, 79, -1) 1 +(11, 80, -1) 1 +(12, 21, -1) 1 +(12, 22, -1) 2 +(12, 23, -1) 3 +(12, 24, -1) 3 +(12, 25, -1) 4 +(12, 26, -1) 4 +(12, 27, -1) 5 +(12, 28, -1) 5 +(12, 29, -1) 6 +(12, 30, -1) 6 +(12, 31, -1) 7 +(12, 32, -1) 7 +(12, 33, -1) 7 +(12, 34, -1) 8 +(12, 35, -1) 8 +(12, 36, -1) 8 +(12, 37, -1) 9 +(12, 38, -1) 9 +(12, 39, -1) 9 +(12, 40, -1) 10 +(12, 41, -1) 10 +(12, 42, -1) 10 +(12, 43, -1) 10 +(12, 44, -1) 10 +(12, 45, -1) 11 +(12, 46, -1) 11 +(12, 47, -1) 11 +(12, 48, -1) 11 +(12, 49, -1) 11 +(12, 50, -1) 11 +(12, 51, -1) 11 +(12, 52, -1) 11 +(12, 53, -1) 11 +(12, 54, -1) 11 +(12, 55, -1) 11 +(12, 56, -1) 11 +(12, 57, -1) 10 +(12, 58, -1) 10 +(12, 59, -1) 10 +(12, 60, -1) 10 +(12, 61, -1) 10 +(12, 62, -1) 9 +(12, 63, -1) 9 +(12, 64, -1) 9 +(12, 65, -1) 8 +(12, 66, -1) 8 +(12, 67, -1) 8 +(12, 68, -1) 7 +(12, 69, -1) 7 +(12, 70, -1) 7 +(12, 71, -1) 6 +(12, 72, -1) 6 +(12, 73, -1) 5 +(12, 74, -1) 5 +(12, 75, -1) 4 +(12, 76, -1) 4 +(12, 77, -1) 3 +(12, 78, -1) 3 +(12, 79, -1) 2 +(12, 80, -1) 1 +(13, 21, -1) 2 +(13, 22, -1) 3 +(13, 23, -1) 3 +(13, 24, -1) 4 +(13, 25, -1) 5 +(13, 26, -1) 5 +(13, 27, -1) 6 +(13, 28, -1) 6 +(13, 29, -1) 7 +(13, 30, -1) 7 +(13, 31, -1) 7 +(13, 32, -1) 8 +(13, 33, -1) 8 +(13, 34, -1) 9 +(13, 35, -1) 9 +(13, 36, -1) 9 +(13, 37, -1) 10 +(13, 38, -1) 10 +(13, 39, -1) 10 +(13, 40, -1) 11 +(13, 41, -1) 11 +(13, 42, -1) 11 +(13, 43, -1) 11 +(13, 44, -1) 11 +(13, 45, -1) 12 +(13, 46, -1) 12 +(13, 47, -1) 12 +(13, 48, -1) 12 +(13, 49, -1) 12 +(13, 50, -1) 12 +(13, 51, -1) 12 +(13, 52, -1) 12 +(13, 53, -1) 12 +(13, 54, -1) 12 +(13, 55, -1) 12 +(13, 56, -1) 12 +(13, 57, -1) 11 +(13, 58, -1) 11 +(13, 59, -1) 11 +(13, 60, -1) 11 +(13, 61, -1) 11 +(13, 62, -1) 10 +(13, 63, -1) 10 +(13, 64, -1) 10 +(13, 65, -1) 9 +(13, 66, -1) 9 +(13, 67, -1) 9 +(13, 68, -1) 8 +(13, 69, -1) 8 +(13, 70, -1) 7 +(13, 71, -1) 7 +(13, 72, -1) 7 +(13, 73, -1) 6 +(13, 74, -1) 6 +(13, 75, -1) 5 +(13, 76, -1) 5 +(13, 77, -1) 4 +(13, 78, -1) 3 +(13, 79, -1) 3 +(13, 80, -1) 2 +(14, 16, -1) 0 +(14, 17, -1) 1 +(14, 18, -1) 1 +(14, 19, -1) 2 +(14, 20, -1) 2 +(14, 21, -1) 3 +(14, 22, -1) 4 +(14, 23, -1) 4 +(14, 24, -1) 5 +(14, 25, -1) 5 +(14, 26, -1) 6 +(14, 27, -1) 6 +(14, 28, -1) 7 +(14, 29, -1) 7 +(14, 30, -1) 8 +(14, 31, -1) 8 +(14, 32, -1) 9 +(14, 33, -1) 9 +(14, 34, -1) 10 +(14, 35, -1) 10 +(14, 36, -1) 10 +(14, 37, -1) 11 +(14, 38, -1) 11 +(14, 39, -1) 11 +(14, 40, -1) 12 +(14, 41, -1) 12 +(14, 42, -1) 12 +(14, 43, -1) 12 +(14, 44, -1) 12 +(14, 45, -1) 13 +(14, 46, -1) 13 +(14, 47, -1) 13 +(14, 48, -1) 13 +(14, 49, -1) 13 +(14, 50, -1) 13 +(14, 51, -1) 13 +(14, 52, -1) 13 +(14, 53, -1) 13 +(14, 54, -1) 13 +(14, 55, -1) 13 +(14, 56, -1) 13 +(14, 57, -1) 12 +(14, 58, -1) 12 +(14, 59, -1) 12 +(14, 60, -1) 12 +(14, 61, -1) 12 +(14, 62, -1) 11 +(14, 63, -1) 11 +(14, 64, -1) 11 +(14, 65, -1) 10 +(14, 66, -1) 10 +(14, 67, -1) 10 +(14, 68, -1) 9 +(14, 69, -1) 9 +(14, 70, -1) 8 +(14, 71, -1) 8 +(14, 72, -1) 7 +(14, 73, -1) 7 +(14, 74, -1) 6 +(14, 75, -1) 6 +(14, 76, -1) 5 +(14, 77, -1) 5 +(14, 78, -1) 4 +(14, 79, -1) 4 +(14, 80, -1) 3 +(14, 81, -1) 2 +(14, 82, -1) 2 +(14, 83, -1) 1 +(14, 84, -1) 1 +(14, 85, -1) 0 +(15, 16, -1) 1 +(15, 17, -1) 1 +(15, 18, -1) 2 +(15, 19, -1) 3 +(15, 20, -1) 3 +(15, 21, -1) 4 +(15, 22, -1) 4 +(15, 23, -1) 5 +(15, 24, -1) 6 +(15, 25, -1) 6 +(15, 26, -1) 7 +(15, 27, -1) 7 +(15, 28, -1) 8 +(15, 29, -1) 8 +(15, 30, -1) 9 +(15, 31, -1) 9 +(15, 32, -1) 10 +(15, 33, -1) 10 +(15, 34, -1) 11 +(15, 35, -1) 11 +(15, 36, -1) 11 +(15, 37, -1) 12 +(15, 38, -1) 12 +(15, 39, -1) 12 +(15, 40, -1) 13 +(15, 41, -1) 13 +(15, 42, -1) 13 +(15, 43, -1) 13 +(15, 44, -1) 13 +(15, 45, -1) 14 +(15, 46, -1) 14 +(15, 47, -1) 14 +(15, 48, -1) 14 +(15, 49, -1) 14 +(15, 50, -1) 14 +(15, 51, -1) 14 +(15, 52, -1) 14 +(15, 53, -1) 14 +(15, 54, -1) 14 +(15, 55, -1) 14 +(15, 56, -1) 14 +(15, 57, -1) 13 +(15, 58, -1) 13 +(15, 59, -1) 13 +(15, 60, -1) 13 +(15, 61, -1) 13 +(15, 62, -1) 12 +(15, 63, -1) 12 +(15, 64, -1) 12 +(15, 65, -1) 11 +(15, 66, -1) 11 +(15, 67, -1) 11 +(15, 68, -1) 10 +(15, 69, -1) 10 +(15, 70, -1) 9 +(15, 71, -1) 9 +(15, 72, -1) 8 +(15, 73, -1) 8 +(15, 74, -1) 7 +(15, 75, -1) 7 +(15, 76, -1) 6 +(15, 77, -1) 6 +(15, 78, -1) 5 +(15, 79, -1) 4 +(15, 80, -1) 4 +(15, 81, -1) 3 +(15, 82, -1) 3 +(15, 83, -1) 2 +(15, 84, -1) 1 +(15, 85, -1) 1 +(16, 14, -1) 0 +(16, 15, -1) 1 +(16, 16, -1) 1 +(16, 17, -1) 2 +(16, 18, -1) 2 +(16, 19, -1) 3 +(16, 20, -1) 4 +(16, 21, -1) 4 +(16, 22, -1) 5 +(16, 23, -1) 6 +(16, 24, -1) 6 +(16, 25, -1) 7 +(16, 26, -1) 7 +(16, 27, -1) 8 +(16, 28, -1) 9 +(16, 29, -1) 9 +(16, 30, -1) 10 +(16, 31, -1) 10 +(16, 32, -1) 11 +(16, 33, -1) 11 +(16, 34, -1) 11 +(16, 35, -1) 12 +(16, 36, -1) 12 +(16, 37, -1) 13 +(16, 38, -1) 13 +(16, 39, -1) 13 +(16, 40, -1) 13 +(16, 41, -1) 14 +(16, 42, -1) 14 +(16, 43, -1) 14 +(16, 44, -1) 14 +(16, 45, -1) 15 +(16, 46, -1) 15 +(16, 47, -1) 15 +(16, 48, -1) 15 +(16, 49, -1) 15 +(16, 50, -1) 15 +(16, 51, -1) 15 +(16, 52, -1) 15 +(16, 53, -1) 15 +(16, 54, -1) 15 +(16, 55, -1) 15 +(16, 56, -1) 15 +(16, 57, -1) 14 +(16, 58, -1) 14 +(16, 59, -1) 14 +(16, 60, -1) 14 +(16, 61, -1) 13 +(16, 62, -1) 13 +(16, 63, -1) 13 +(16, 64, -1) 13 +(16, 65, -1) 12 +(16, 66, -1) 12 +(16, 67, -1) 11 +(16, 68, -1) 11 +(16, 69, -1) 11 +(16, 70, -1) 10 +(16, 71, -1) 10 +(16, 72, -1) 9 +(16, 73, -1) 9 +(16, 74, -1) 8 +(16, 75, -1) 7 +(16, 76, -1) 7 +(16, 77, -1) 6 +(16, 78, -1) 6 +(16, 79, -1) 5 +(16, 80, -1) 4 +(16, 81, -1) 4 +(16, 82, -1) 3 +(16, 83, -1) 2 +(16, 84, -1) 2 +(16, 85, -1) 1 +(16, 86, -1) 1 +(16, 87, -1) 0 +(17, 14, -1) 1 +(17, 15, -1) 1 +(17, 16, -1) 2 +(17, 17, -1) 3 +(17, 18, -1) 3 +(17, 19, -1) 4 +(17, 20, -1) 5 +(17, 21, -1) 5 +(17, 22, -1) 6 +(17, 23, -1) 6 +(17, 24, -1) 7 +(17, 25, -1) 8 +(17, 26, -1) 8 +(17, 27, -1) 9 +(17, 28, -1) 9 +(17, 29, -1) 10 +(17, 30, -1) 10 +(17, 31, -1) 11 +(17, 32, -1) 11 +(17, 33, -1) 12 +(17, 34, -1) 12 +(17, 35, -1) 13 +(17, 36, -1) 13 +(17, 37, -1) 13 +(17, 38, -1) 14 +(17, 39, -1) 14 +(17, 40, -1) 14 +(17, 41, -1) 15 +(17, 42, -1) 15 +(17, 43, -1) 15 +(17, 44, -1) 15 +(17, 45, -1) 16 +(17, 46, -1) 16 +(17, 47, -1) 16 +(17, 48, -1) 16 +(17, 49, -1) 16 +(17, 50, -1) 16 +(17, 51, -1) 16 +(17, 52, -1) 16 +(17, 53, -1) 16 +(17, 54, -1) 16 +(17, 55, -1) 16 +(17, 56, -1) 16 +(17, 57, -1) 15 +(17, 58, -1) 15 +(17, 59, -1) 15 +(17, 60, -1) 15 +(17, 61, -1) 14 +(17, 62, -1) 14 +(17, 63, -1) 14 +(17, 64, -1) 13 +(17, 65, -1) 13 +(17, 66, -1) 13 +(17, 67, -1) 12 +(17, 68, -1) 12 +(17, 69, -1) 11 +(17, 70, -1) 11 +(17, 71, -1) 10 +(17, 72, -1) 10 +(17, 73, -1) 9 +(17, 74, -1) 9 +(17, 75, -1) 8 +(17, 76, -1) 8 +(17, 77, -1) 7 +(17, 78, -1) 6 +(17, 79, -1) 6 +(17, 80, -1) 5 +(17, 81, -1) 5 +(17, 82, -1) 4 +(17, 83, -1) 3 +(17, 84, -1) 3 +(17, 85, -1) 2 +(17, 86, -1) 1 +(17, 87, -1) 1 +(18, 14, -1) 1 +(18, 15, -1) 2 +(18, 16, -1) 3 +(18, 17, -1) 3 +(18, 18, -1) 4 +(18, 19, -1) 5 +(18, 20, -1) 5 +(18, 21, -1) 6 +(18, 22, -1) 7 +(18, 23, -1) 7 +(18, 24, -1) 8 +(18, 25, -1) 8 +(18, 26, -1) 9 +(18, 27, -1) 10 +(18, 28, -1) 10 +(18, 29, -1) 11 +(18, 30, -1) 11 +(18, 31, -1) 12 +(18, 32, -1) 12 +(18, 33, -1) 13 +(18, 34, -1) 13 +(18, 35, -1) 14 +(18, 36, -1) 14 +(18, 37, -1) 14 +(18, 38, -1) 15 +(18, 39, -1) 15 +(18, 40, -1) 15 +(18, 41, -1) 16 +(18, 42, -1) 16 +(18, 43, -1) 16 +(18, 44, -1) 16 +(18, 45, -1) 17 +(18, 46, -1) 17 +(18, 47, -1) 17 +(18, 48, -1) 17 +(18, 49, -1) 17 +(18, 50, -1) 17 +(18, 51, -1) 17 +(18, 52, -1) 17 +(18, 53, -1) 17 +(18, 54, -1) 17 +(18, 55, -1) 17 +(18, 56, -1) 17 +(18, 57, -1) 16 +(18, 58, -1) 16 +(18, 59, -1) 16 +(18, 60, -1) 16 +(18, 61, -1) 15 +(18, 62, -1) 15 +(18, 63, -1) 15 +(18, 64, -1) 14 +(18, 65, -1) 14 +(18, 66, -1) 14 +(18, 67, -1) 13 +(18, 68, -1) 13 +(18, 69, -1) 12 +(18, 70, -1) 12 +(18, 71, -1) 11 +(18, 72, -1) 11 +(18, 73, -1) 10 +(18, 74, -1) 10 +(18, 75, -1) 9 +(18, 76, -1) 8 +(18, 77, -1) 8 +(18, 78, -1) 7 +(18, 79, -1) 7 +(18, 80, -1) 6 +(18, 81, -1) 5 +(18, 82, -1) 5 +(18, 83, -1) 4 +(18, 84, -1) 3 +(18, 85, -1) 3 +(18, 86, -1) 2 +(18, 87, -1) 1 +(19, 14, -1) 2 +(19, 15, -1) 3 +(19, 16, -1) 3 +(19, 17, -1) 4 +(19, 18, -1) 5 +(19, 19, -1) 5 +(19, 20, -1) 6 +(19, 21, -1) 7 +(19, 22, -1) 7 +(19, 23, -1) 8 +(19, 24, -1) 9 +(19, 25, -1) 9 +(19, 26, -1) 10 +(19, 27, -1) 10 +(19, 28, -1) 11 +(19, 29, -1) 12 +(19, 30, -1) 12 +(19, 31, -1) 13 +(19, 32, -1) 13 +(19, 33, -1) 14 +(19, 34, -1) 14 +(19, 35, -1) 15 +(19, 36, -1) 15 +(19, 37, -1) 15 +(19, 38, -1) 16 +(19, 39, -1) 16 +(19, 40, -1) 16 +(19, 41, -1) 17 +(19, 42, -1) 17 +(19, 43, -1) 17 +(19, 44, -1) 17 +(19, 45, -1) 18 +(19, 46, -1) 18 +(19, 47, -1) 18 +(19, 48, -1) 18 +(19, 49, -1) 18 +(19, 50, -1) 18 +(19, 51, -1) 18 +(19, 52, -1) 18 +(19, 53, -1) 18 +(19, 54, -1) 18 +(19, 55, -1) 18 +(19, 56, -1) 18 +(19, 57, -1) 17 +(19, 58, -1) 17 +(19, 59, -1) 17 +(19, 60, -1) 17 +(19, 61, -1) 16 +(19, 62, -1) 16 +(19, 63, -1) 16 +(19, 64, -1) 15 +(19, 65, -1) 15 +(19, 66, -1) 15 +(19, 67, -1) 14 +(19, 68, -1) 14 +(19, 69, -1) 13 +(19, 70, -1) 13 +(19, 71, -1) 12 +(19, 72, -1) 12 +(19, 73, -1) 11 +(19, 74, -1) 10 +(19, 75, -1) 10 +(19, 76, -1) 9 +(19, 77, -1) 9 +(19, 78, -1) 8 +(19, 79, -1) 7 +(19, 80, -1) 7 +(19, 81, -1) 6 +(19, 82, -1) 5 +(19, 83, -1) 5 +(19, 84, -1) 4 +(19, 85, -1) 3 +(19, 86, -1) 3 +(19, 87, -1) 2 +(20, 14, -1) 3 +(20, 15, -1) 3 +(20, 16, -1) 4 +(20, 17, -1) 5 +(20, 18, -1) 5 +(20, 19, -1) 6 +(20, 20, -1) 7 +(20, 21, -1) 7 +(20, 22, -1) 8 +(20, 23, -1) 9 +(20, 24, -1) 9 +(20, 25, -1) 10 +(20, 26, -1) 11 +(20, 27, -1) 11 +(20, 28, -1) 12 +(20, 29, -1) 12 +(20, 30, -1) 13 +(20, 31, -1) 14 +(20, 32, -1) 14 +(20, 33, -1) 15 +(20, 34, -1) 15 +(20, 35, -1) 15 +(20, 36, -1) 16 +(20, 37, -1) 16 +(20, 38, -1) 17 +(20, 39, -1) 17 +(20, 40, -1) 17 +(20, 41, -1) 18 +(20, 42, -1) 18 +(20, 43, -1) 18 +(20, 44, -1) 18 +(20, 45, -1) 19 +(20, 46, -1) 19 +(20, 47, -1) 19 +(20, 48, -1) 19 +(20, 49, -1) 19 +(20, 50, -1) 19 +(20, 51, -1) 19 +(20, 52, -1) 19 +(20, 53, -1) 19 +(20, 54, -1) 19 +(20, 55, -1) 19 +(20, 56, -1) 19 +(20, 57, -1) 18 +(20, 58, -1) 18 +(20, 59, -1) 18 +(20, 60, -1) 18 +(20, 61, -1) 17 +(20, 62, -1) 17 +(20, 63, -1) 17 +(20, 64, -1) 16 +(20, 65, -1) 16 +(20, 66, -1) 15 +(20, 67, -1) 15 +(20, 68, -1) 15 +(20, 69, -1) 14 +(20, 70, -1) 14 +(20, 71, -1) 13 +(20, 72, -1) 12 +(20, 73, -1) 12 +(20, 74, -1) 11 +(20, 75, -1) 11 +(20, 76, -1) 10 +(20, 77, -1) 9 +(20, 78, -1) 9 +(20, 79, -1) 8 +(20, 80, -1) 7 +(20, 81, -1) 7 +(20, 82, -1) 6 +(20, 83, -1) 5 +(20, 84, -1) 5 +(20, 85, -1) 4 +(20, 86, -1) 3 +(20, 87, -1) 3 +(21, 9, -1) 0 +(21, 10, -1) 0 +(21, 11, -1) 1 +(21, 12, -1) 1 +(21, 13, -1) 2 +(21, 14, -1) 3 +(21, 15, -1) 4 +(21, 16, -1) 4 +(21, 17, -1) 5 +(21, 18, -1) 6 +(21, 19, -1) 7 +(21, 20, -1) 7 +(21, 21, -1) 8 +(21, 22, -1) 9 +(21, 23, -1) 9 +(21, 24, -1) 10 +(21, 25, -1) 11 +(21, 26, -1) 11 +(21, 27, -1) 12 +(21, 28, -1) 13 +(21, 29, -1) 13 +(21, 30, -1) 14 +(21, 31, -1) 14 +(21, 32, -1) 15 +(21, 33, -1) 15 +(21, 34, -1) 16 +(21, 35, -1) 16 +(21, 36, -1) 17 +(21, 37, -1) 17 +(21, 38, -1) 18 +(21, 39, -1) 18 +(21, 40, -1) 18 +(21, 41, -1) 19 +(21, 42, -1) 19 +(21, 43, -1) 19 +(21, 44, -1) 19 +(21, 45, -1) 20 +(21, 46, -1) 20 +(21, 47, -1) 20 +(21, 48, -1) 20 +(21, 49, -1) 20 +(21, 50, -1) 20 +(21, 51, -1) 20 +(21, 52, -1) 20 +(21, 53, -1) 20 +(21, 54, -1) 20 +(21, 55, -1) 20 +(21, 56, -1) 20 +(21, 57, -1) 19 +(21, 58, -1) 19 +(21, 59, -1) 19 +(21, 60, -1) 19 +(21, 61, -1) 18 +(21, 62, -1) 18 +(21, 63, -1) 18 +(21, 64, -1) 17 +(21, 65, -1) 17 +(21, 66, -1) 16 +(21, 67, -1) 16 +(21, 68, -1) 15 +(21, 69, -1) 15 +(21, 70, -1) 14 +(21, 71, -1) 14 +(21, 72, -1) 13 +(21, 73, -1) 13 +(21, 74, -1) 12 +(21, 75, -1) 11 +(21, 76, -1) 11 +(21, 77, -1) 10 +(21, 78, -1) 9 +(21, 79, -1) 9 +(21, 80, -1) 8 +(21, 81, -1) 7 +(21, 82, -1) 7 +(21, 83, -1) 6 +(21, 84, -1) 5 +(21, 85, -1) 4 +(21, 86, -1) 4 +(21, 87, -1) 3 +(21, 88, -1) 2 +(21, 89, -1) 1 +(21, 90, -1) 1 +(21, 91, -1) 0 +(21, 92, -1) 0 +(22, 9, -1) 0 +(22, 10, -1) 1 +(22, 11, -1) 1 +(22, 12, -1) 2 +(22, 13, -1) 3 +(22, 14, -1) 4 +(22, 15, -1) 4 +(22, 16, -1) 5 +(22, 17, -1) 6 +(22, 18, -1) 7 +(22, 19, -1) 7 +(22, 20, -1) 8 +(22, 21, -1) 9 +(22, 22, -1) 9 +(22, 23, -1) 10 +(22, 24, -1) 11 +(22, 25, -1) 12 +(22, 26, -1) 12 +(22, 27, -1) 13 +(22, 28, -1) 13 +(22, 29, -1) 14 +(22, 30, -1) 15 +(22, 31, -1) 15 +(22, 32, -1) 16 +(22, 33, -1) 16 +(22, 34, -1) 17 +(22, 35, -1) 17 +(22, 36, -1) 18 +(22, 37, -1) 18 +(22, 38, -1) 18 +(22, 39, -1) 19 +(22, 40, -1) 19 +(22, 41, -1) 20 +(22, 42, -1) 20 +(22, 43, -1) 20 +(22, 44, -1) 20 +(22, 45, -1) 20 +(22, 46, -1) 21 +(22, 47, -1) 21 +(22, 48, -1) 21 +(22, 49, -1) 21 +(22, 50, -1) 21 +(22, 51, -1) 21 +(22, 52, -1) 21 +(22, 53, -1) 21 +(22, 54, -1) 21 +(22, 55, -1) 21 +(22, 56, -1) 20 +(22, 57, -1) 20 +(22, 58, -1) 20 +(22, 59, -1) 20 +(22, 60, -1) 20 +(22, 61, -1) 19 +(22, 62, -1) 19 +(22, 63, -1) 18 +(22, 64, -1) 18 +(22, 65, -1) 18 +(22, 66, -1) 17 +(22, 67, -1) 17 +(22, 68, -1) 16 +(22, 69, -1) 16 +(22, 70, -1) 15 +(22, 71, -1) 15 +(22, 72, -1) 14 +(22, 73, -1) 13 +(22, 74, -1) 13 +(22, 75, -1) 12 +(22, 76, -1) 12 +(22, 77, -1) 11 +(22, 78, -1) 10 +(22, 79, -1) 9 +(22, 80, -1) 9 +(22, 81, -1) 8 +(22, 82, -1) 7 +(22, 83, -1) 7 +(22, 84, -1) 6 +(22, 85, -1) 5 +(22, 86, -1) 4 +(22, 87, -1) 4 +(22, 88, -1) 3 +(22, 89, -1) 2 +(22, 90, -1) 1 +(22, 91, -1) 1 +(22, 92, -1) 0 +(23, 9, -1) 0 +(23, 10, -1) 1 +(23, 11, -1) 2 +(23, 12, -1) 3 +(23, 13, -1) 3 +(23, 14, -1) 4 +(23, 15, -1) 5 +(23, 16, -1) 6 +(23, 17, -1) 7 +(23, 18, -1) 7 +(23, 19, -1) 8 +(23, 20, -1) 9 +(23, 21, -1) 9 +(23, 22, -1) 10 +(23, 23, -1) 11 +(23, 24, -1) 12 +(23, 25, -1) 12 +(23, 26, -1) 13 +(23, 27, -1) 14 +(23, 28, -1) 14 +(23, 29, -1) 15 +(23, 30, -1) 15 +(23, 31, -1) 16 +(23, 32, -1) 17 +(23, 33, -1) 17 +(23, 34, -1) 18 +(23, 35, -1) 18 +(23, 36, -1) 19 +(23, 37, -1) 19 +(23, 38, -1) 19 +(23, 39, -1) 20 +(23, 40, -1) 20 +(23, 41, -1) 20 +(23, 42, -1) 21 +(23, 43, -1) 21 +(23, 44, -1) 21 +(23, 45, -1) 21 +(23, 46, -1) 22 +(23, 47, -1) 22 +(23, 48, -1) 22 +(23, 49, -1) 22 +(23, 50, -1) 22 +(23, 51, -1) 22 +(23, 52, -1) 22 +(23, 53, -1) 22 +(23, 54, -1) 22 +(23, 55, -1) 22 +(23, 56, -1) 21 +(23, 57, -1) 21 +(23, 58, -1) 21 +(23, 59, -1) 21 +(23, 60, -1) 20 +(23, 61, -1) 20 +(23, 62, -1) 20 +(23, 63, -1) 19 +(23, 64, -1) 19 +(23, 65, -1) 19 +(23, 66, -1) 18 +(23, 67, -1) 18 +(23, 68, -1) 17 +(23, 69, -1) 17 +(23, 70, -1) 16 +(23, 71, -1) 15 +(23, 72, -1) 15 +(23, 73, -1) 14 +(23, 74, -1) 14 +(23, 75, -1) 13 +(23, 76, -1) 12 +(23, 77, -1) 12 +(23, 78, -1) 11 +(23, 79, -1) 10 +(23, 80, -1) 9 +(23, 81, -1) 9 +(23, 82, -1) 8 +(23, 83, -1) 7 +(23, 84, -1) 7 +(23, 85, -1) 6 +(23, 86, -1) 5 +(23, 87, -1) 4 +(23, 88, -1) 3 +(23, 89, -1) 3 +(23, 90, -1) 2 +(23, 91, -1) 1 +(23, 92, -1) 0 +(24, 9, -1) 1 +(24, 10, -1) 2 +(24, 11, -1) 2 +(24, 12, -1) 3 +(24, 13, -1) 4 +(24, 14, -1) 5 +(24, 15, -1) 6 +(24, 16, -1) 6 +(24, 17, -1) 7 +(24, 18, -1) 8 +(24, 19, -1) 9 +(24, 20, -1) 9 +(24, 21, -1) 10 +(24, 22, -1) 11 +(24, 23, -1) 12 +(24, 24, -1) 12 +(24, 25, -1) 13 +(24, 26, -1) 14 +(24, 27, -1) 14 +(24, 28, -1) 15 +(24, 29, -1) 16 +(24, 30, -1) 16 +(24, 31, -1) 17 +(24, 32, -1) 17 +(24, 33, -1) 18 +(24, 34, -1) 18 +(24, 35, -1) 19 +(24, 36, -1) 19 +(24, 37, -1) 20 +(24, 38, -1) 20 +(24, 39, -1) 21 +(24, 40, -1) 21 +(24, 41, -1) 21 +(24, 42, -1) 22 +(24, 43, -1) 22 +(24, 44, -1) 22 +(24, 45, -1) 22 +(24, 46, -1) 23 +(24, 47, -1) 23 +(24, 48, -1) 23 +(24, 49, -1) 23 +(24, 50, -1) 23 +(24, 51, -1) 23 +(24, 52, -1) 23 +(24, 53, -1) 23 +(24, 54, -1) 23 +(24, 55, -1) 23 +(24, 56, -1) 22 +(24, 57, -1) 22 +(24, 58, -1) 22 +(24, 59, -1) 22 +(24, 60, -1) 21 +(24, 61, -1) 21 +(24, 62, -1) 21 +(24, 63, -1) 20 +(24, 64, -1) 20 +(24, 65, -1) 19 +(24, 66, -1) 19 +(24, 67, -1) 18 +(24, 68, -1) 18 +(24, 69, -1) 17 +(24, 70, -1) 17 +(24, 71, -1) 16 +(24, 72, -1) 16 +(24, 73, -1) 15 +(24, 74, -1) 14 +(24, 75, -1) 14 +(24, 76, -1) 13 +(24, 77, -1) 12 +(24, 78, -1) 12 +(24, 79, -1) 11 +(24, 80, -1) 10 +(24, 81, -1) 9 +(24, 82, -1) 9 +(24, 83, -1) 8 +(24, 84, -1) 7 +(24, 85, -1) 6 +(24, 86, -1) 6 +(24, 87, -1) 5 +(24, 88, -1) 4 +(24, 89, -1) 3 +(24, 90, -1) 2 +(24, 91, -1) 2 +(24, 92, -1) 1 +(25, 9, -1) 1 +(25, 10, -1) 2 +(25, 11, -1) 3 +(25, 12, -1) 4 +(25, 13, -1) 5 +(25, 14, -1) 5 +(25, 15, -1) 6 +(25, 16, -1) 7 +(25, 17, -1) 8 +(25, 18, -1) 9 +(25, 19, -1) 9 +(25, 20, -1) 10 +(25, 21, -1) 11 +(25, 22, -1) 12 +(25, 23, -1) 12 +(25, 24, -1) 13 +(25, 25, -1) 14 +(25, 26, -1) 14 +(25, 27, -1) 15 +(25, 28, -1) 16 +(25, 29, -1) 16 +(25, 30, -1) 17 +(25, 31, -1) 18 +(25, 32, -1) 18 +(25, 33, -1) 19 +(25, 34, -1) 19 +(25, 35, -1) 20 +(25, 36, -1) 20 +(25, 37, -1) 21 +(25, 38, -1) 21 +(25, 39, -1) 22 +(25, 40, -1) 22 +(25, 41, -1) 22 +(25, 42, -1) 23 +(25, 43, -1) 23 +(25, 44, -1) 23 +(25, 45, -1) 23 +(25, 46, -1) 24 +(25, 47, -1) 24 +(25, 48, -1) 24 +(25, 49, -1) 24 +(25, 50, -1) 24 +(25, 51, -1) 24 +(25, 52, -1) 24 +(25, 53, -1) 24 +(25, 54, -1) 24 +(25, 55, -1) 24 +(25, 56, -1) 23 +(25, 57, -1) 23 +(25, 58, -1) 23 +(25, 59, -1) 23 +(25, 60, -1) 22 +(25, 61, -1) 22 +(25, 62, -1) 22 +(25, 63, -1) 21 +(25, 64, -1) 21 +(25, 65, -1) 20 +(25, 66, -1) 20 +(25, 67, -1) 19 +(25, 68, -1) 19 +(25, 69, -1) 18 +(25, 70, -1) 18 +(25, 71, -1) 17 +(25, 72, -1) 16 +(25, 73, -1) 16 +(25, 74, -1) 15 +(25, 75, -1) 14 +(25, 76, -1) 14 +(25, 77, -1) 13 +(25, 78, -1) 12 +(25, 79, -1) 12 +(25, 80, -1) 11 +(25, 81, -1) 10 +(25, 82, -1) 9 +(25, 83, -1) 9 +(25, 84, -1) 8 +(25, 85, -1) 7 +(25, 86, -1) 6 +(25, 87, -1) 5 +(25, 88, -1) 5 +(25, 89, -1) 4 +(25, 90, -1) 3 +(25, 91, -1) 2 +(25, 92, -1) 1 +(26, 6, -1) 0 +(26, 7, -1) 0 +(26, 8, -1) 1 +(26, 9, -1) 2 +(26, 10, -1) 3 +(26, 11, -1) 3 +(26, 12, -1) 4 +(26, 13, -1) 5 +(26, 14, -1) 6 +(26, 15, -1) 7 +(26, 16, -1) 7 +(26, 17, -1) 8 +(26, 18, -1) 9 +(26, 19, -1) 10 +(26, 20, -1) 11 +(26, 21, -1) 11 +(26, 22, -1) 12 +(26, 23, -1) 13 +(26, 24, -1) 14 +(26, 25, -1) 14 +(26, 26, -1) 15 +(26, 27, -1) 16 +(26, 28, -1) 16 +(26, 29, -1) 17 +(26, 30, -1) 18 +(26, 31, -1) 18 +(26, 32, -1) 19 +(26, 33, -1) 19 +(26, 34, -1) 20 +(26, 35, -1) 21 +(26, 36, -1) 21 +(26, 37, -1) 22 +(26, 38, -1) 22 +(26, 39, -1) 22 +(26, 40, -1) 23 +(26, 41, -1) 23 +(26, 42, -1) 24 +(26, 43, -1) 24 +(26, 44, -1) 24 +(26, 45, -1) 24 +(26, 46, -1) 25 +(26, 47, -1) 25 +(26, 48, -1) 25 +(26, 49, -1) 25 +(26, 50, -1) 25 +(26, 51, -1) 25 +(26, 52, -1) 25 +(26, 53, -1) 25 +(26, 54, -1) 25 +(26, 55, -1) 25 +(26, 56, -1) 24 +(26, 57, -1) 24 +(26, 58, -1) 24 +(26, 59, -1) 24 +(26, 60, -1) 23 +(26, 61, -1) 23 +(26, 62, -1) 22 +(26, 63, -1) 22 +(26, 64, -1) 22 +(26, 65, -1) 21 +(26, 66, -1) 21 +(26, 67, -1) 20 +(26, 68, -1) 19 +(26, 69, -1) 19 +(26, 70, -1) 18 +(26, 71, -1) 18 +(26, 72, -1) 17 +(26, 73, -1) 16 +(26, 74, -1) 16 +(26, 75, -1) 15 +(26, 76, -1) 14 +(26, 77, -1) 14 +(26, 78, -1) 13 +(26, 79, -1) 12 +(26, 80, -1) 11 +(26, 81, -1) 11 +(26, 82, -1) 10 +(26, 83, -1) 9 +(26, 84, -1) 8 +(26, 85, -1) 7 +(26, 86, -1) 7 +(26, 87, -1) 6 +(26, 88, -1) 5 +(26, 89, -1) 4 +(26, 90, -1) 3 +(26, 91, -1) 3 +(26, 92, -1) 2 +(26, 93, -1) 1 +(26, 94, -1) 0 +(26, 95, -1) 0 +(27, 6, -1) 0 +(27, 7, -1) 0 +(27, 8, -1) 1 +(27, 9, -1) 2 +(27, 10, -1) 3 +(27, 11, -1) 4 +(27, 12, -1) 5 +(27, 13, -1) 6 +(27, 14, -1) 6 +(27, 15, -1) 7 +(27, 16, -1) 8 +(27, 17, -1) 9 +(27, 18, -1) 10 +(27, 19, -1) 10 +(27, 20, -1) 11 +(27, 21, -1) 12 +(27, 22, -1) 13 +(27, 23, -1) 14 +(27, 24, -1) 14 +(27, 25, -1) 15 +(27, 26, -1) 16 +(27, 27, -1) 16 +(27, 28, -1) 17 +(27, 29, -1) 18 +(27, 30, -1) 18 +(27, 31, -1) 19 +(27, 32, -1) 20 +(27, 33, -1) 20 +(27, 34, -1) 21 +(27, 35, -1) 21 +(27, 36, -1) 22 +(27, 37, -1) 22 +(27, 38, -1) 23 +(27, 39, -1) 23 +(27, 40, -1) 24 +(27, 41, -1) 24 +(27, 42, -1) 25 +(27, 43, -1) 25 +(27, 44, -1) 25 +(27, 45, -1) 25 +(27, 46, -1) 26 +(27, 47, -1) 26 +(27, 48, -1) 26 +(27, 49, -1) 26 +(27, 50, -1) 26 +(27, 51, -1) 26 +(27, 52, -1) 26 +(27, 53, -1) 26 +(27, 54, -1) 26 +(27, 55, -1) 26 +(27, 56, -1) 25 +(27, 57, -1) 25 +(27, 58, -1) 25 +(27, 59, -1) 25 +(27, 60, -1) 24 +(27, 61, -1) 24 +(27, 62, -1) 23 +(27, 63, -1) 23 +(27, 64, -1) 22 +(27, 65, -1) 22 +(27, 66, -1) 21 +(27, 67, -1) 21 +(27, 68, -1) 20 +(27, 69, -1) 20 +(27, 70, -1) 19 +(27, 71, -1) 18 +(27, 72, -1) 18 +(27, 73, -1) 17 +(27, 74, -1) 16 +(27, 75, -1) 16 +(27, 76, -1) 15 +(27, 77, -1) 14 +(27, 78, -1) 14 +(27, 79, -1) 13 +(27, 80, -1) 12 +(27, 81, -1) 11 +(27, 82, -1) 10 +(27, 83, -1) 10 +(27, 84, -1) 9 +(27, 85, -1) 8 +(27, 86, -1) 7 +(27, 87, -1) 6 +(27, 88, -1) 6 +(27, 89, -1) 5 +(27, 90, -1) 4 +(27, 91, -1) 3 +(27, 92, -1) 2 +(27, 93, -1) 1 +(27, 94, -1) 0 +(27, 95, -1) 0 +(28, 6, -1) 0 +(28, 7, -1) 1 +(28, 8, -1) 2 +(28, 9, -1) 3 +(28, 10, -1) 4 +(28, 11, -1) 4 +(28, 12, -1) 5 +(28, 13, -1) 6 +(28, 14, -1) 7 +(28, 15, -1) 8 +(28, 16, -1) 9 +(28, 17, -1) 9 +(28, 18, -1) 10 +(28, 19, -1) 11 +(28, 20, -1) 12 +(28, 21, -1) 13 +(28, 22, -1) 13 +(28, 23, -1) 14 +(28, 24, -1) 15 +(28, 25, -1) 16 +(28, 26, -1) 16 +(28, 27, -1) 17 +(28, 28, -1) 18 +(28, 29, -1) 19 +(28, 30, -1) 19 +(28, 31, -1) 20 +(28, 32, -1) 20 +(28, 33, -1) 21 +(28, 34, -1) 22 +(28, 35, -1) 22 +(28, 36, -1) 23 +(28, 37, -1) 23 +(28, 38, -1) 24 +(28, 39, -1) 24 +(28, 40, -1) 25 +(28, 41, -1) 25 +(28, 42, -1) 25 +(28, 43, -1) 26 +(28, 44, -1) 26 +(28, 45, -1) 26 +(28, 46, -1) 27 +(28, 47, -1) 27 +(28, 48, -1) 27 +(28, 49, -1) 27 +(28, 50, -1) 27 +(28, 51, -1) 27 +(28, 52, -1) 27 +(28, 53, -1) 27 +(28, 54, -1) 27 +(28, 55, -1) 27 +(28, 56, -1) 26 +(28, 57, -1) 26 +(28, 58, -1) 26 +(28, 59, -1) 25 +(28, 60, -1) 25 +(28, 61, -1) 25 +(28, 62, -1) 24 +(28, 63, -1) 24 +(28, 64, -1) 23 +(28, 65, -1) 23 +(28, 66, -1) 22 +(28, 67, -1) 22 +(28, 68, -1) 21 +(28, 69, -1) 20 +(28, 70, -1) 20 +(28, 71, -1) 19 +(28, 72, -1) 19 +(28, 73, -1) 18 +(28, 74, -1) 17 +(28, 75, -1) 16 +(28, 76, -1) 16 +(28, 77, -1) 15 +(28, 78, -1) 14 +(28, 79, -1) 13 +(28, 80, -1) 13 +(28, 81, -1) 12 +(28, 82, -1) 11 +(28, 83, -1) 10 +(28, 84, -1) 9 +(28, 85, -1) 9 +(28, 86, -1) 8 +(28, 87, -1) 7 +(28, 88, -1) 6 +(28, 89, -1) 5 +(28, 90, -1) 4 +(28, 91, -1) 4 +(28, 92, -1) 3 +(28, 93, -1) 2 +(28, 94, -1) 1 +(28, 95, -1) 0 +(29, 6, -1) 1 +(29, 7, -1) 1 +(29, 8, -1) 2 +(29, 9, -1) 3 +(29, 10, -1) 4 +(29, 11, -1) 5 +(29, 12, -1) 6 +(29, 13, -1) 7 +(29, 14, -1) 7 +(29, 15, -1) 8 +(29, 16, -1) 9 +(29, 17, -1) 10 +(29, 18, -1) 11 +(29, 19, -1) 12 +(29, 20, -1) 12 +(29, 21, -1) 13 +(29, 22, -1) 14 +(29, 23, -1) 15 +(29, 24, -1) 16 +(29, 25, -1) 16 +(29, 26, -1) 17 +(29, 27, -1) 18 +(29, 28, -1) 19 +(29, 29, -1) 19 +(29, 30, -1) 20 +(29, 31, -1) 21 +(29, 32, -1) 21 +(29, 33, -1) 22 +(29, 34, -1) 23 +(29, 35, -1) 23 +(29, 36, -1) 24 +(29, 37, -1) 24 +(29, 38, -1) 25 +(29, 39, -1) 25 +(29, 40, -1) 26 +(29, 41, -1) 26 +(29, 42, -1) 26 +(29, 43, -1) 27 +(29, 44, -1) 27 +(29, 45, -1) 27 +(29, 46, -1) 28 +(29, 47, -1) 28 +(29, 48, -1) 28 +(29, 49, -1) 28 +(29, 50, -1) 28 +(29, 51, -1) 28 +(29, 52, -1) 28 +(29, 53, -1) 28 +(29, 54, -1) 28 +(29, 55, -1) 28 +(29, 56, -1) 27 +(29, 57, -1) 27 +(29, 58, -1) 27 +(29, 59, -1) 26 +(29, 60, -1) 26 +(29, 61, -1) 26 +(29, 62, -1) 25 +(29, 63, -1) 25 +(29, 64, -1) 24 +(29, 65, -1) 24 +(29, 66, -1) 23 +(29, 67, -1) 23 +(29, 68, -1) 22 +(29, 69, -1) 21 +(29, 70, -1) 21 +(29, 71, -1) 20 +(29, 72, -1) 19 +(29, 73, -1) 19 +(29, 74, -1) 18 +(29, 75, -1) 17 +(29, 76, -1) 16 +(29, 77, -1) 16 +(29, 78, -1) 15 +(29, 79, -1) 14 +(29, 80, -1) 13 +(29, 81, -1) 12 +(29, 82, -1) 12 +(29, 83, -1) 11 +(29, 84, -1) 10 +(29, 85, -1) 9 +(29, 86, -1) 8 +(29, 87, -1) 7 +(29, 88, -1) 7 +(29, 89, -1) 6 +(29, 90, -1) 5 +(29, 91, -1) 4 +(29, 92, -1) 3 +(29, 93, -1) 2 +(29, 94, -1) 1 +(29, 95, -1) 1 +(30, 6, -1) 1 +(30, 7, -1) 2 +(30, 8, -1) 3 +(30, 9, -1) 4 +(30, 10, -1) 5 +(30, 11, -1) 5 +(30, 12, -1) 6 +(30, 13, -1) 7 +(30, 14, -1) 8 +(30, 15, -1) 9 +(30, 16, -1) 10 +(30, 17, -1) 11 +(30, 18, -1) 11 +(30, 19, -1) 12 +(30, 20, -1) 13 +(30, 21, -1) 14 +(30, 22, -1) 15 +(30, 23, -1) 15 +(30, 24, -1) 16 +(30, 25, -1) 17 +(30, 26, -1) 18 +(30, 27, -1) 19 +(30, 28, -1) 19 +(30, 29, -1) 20 +(30, 30, -1) 21 +(30, 31, -1) 21 +(30, 32, -1) 22 +(30, 33, -1) 23 +(30, 34, -1) 23 +(30, 35, -1) 24 +(30, 36, -1) 24 +(30, 37, -1) 25 +(30, 38, -1) 26 +(30, 39, -1) 26 +(30, 40, -1) 27 +(30, 41, -1) 27 +(30, 42, -1) 27 +(30, 43, -1) 28 +(30, 44, -1) 28 +(30, 45, -1) 28 +(30, 46, -1) 29 +(30, 47, -1) 29 +(30, 48, -1) 29 +(30, 49, -1) 29 +(30, 50, -1) 29 +(30, 51, -1) 29 +(30, 52, -1) 29 +(30, 53, -1) 29 +(30, 54, -1) 29 +(30, 55, -1) 29 +(30, 56, -1) 28 +(30, 57, -1) 28 +(30, 58, -1) 28 +(30, 59, -1) 27 +(30, 60, -1) 27 +(30, 61, -1) 27 +(30, 62, -1) 26 +(30, 63, -1) 26 +(30, 64, -1) 25 +(30, 65, -1) 24 +(30, 66, -1) 24 +(30, 67, -1) 23 +(30, 68, -1) 23 +(30, 69, -1) 22 +(30, 70, -1) 21 +(30, 71, -1) 21 +(30, 72, -1) 20 +(30, 73, -1) 19 +(30, 74, -1) 19 +(30, 75, -1) 18 +(30, 76, -1) 17 +(30, 77, -1) 16 +(30, 78, -1) 15 +(30, 79, -1) 15 +(30, 80, -1) 14 +(30, 81, -1) 13 +(30, 82, -1) 12 +(30, 83, -1) 11 +(30, 84, -1) 11 +(30, 85, -1) 10 +(30, 86, -1) 9 +(30, 87, -1) 8 +(30, 88, -1) 7 +(30, 89, -1) 6 +(30, 90, -1) 5 +(30, 91, -1) 5 +(30, 92, -1) 4 +(30, 93, -1) 3 +(30, 94, -1) 2 +(30, 95, -1) 1 +(31, 6, -1) 1 +(31, 7, -1) 2 +(31, 8, -1) 3 +(31, 9, -1) 4 +(31, 10, -1) 5 +(31, 11, -1) 6 +(31, 12, -1) 7 +(31, 13, -1) 7 +(31, 14, -1) 8 +(31, 15, -1) 9 +(31, 16, -1) 10 +(31, 17, -1) 11 +(31, 18, -1) 12 +(31, 19, -1) 13 +(31, 20, -1) 13 +(31, 21, -1) 14 +(31, 22, -1) 15 +(31, 23, -1) 16 +(31, 24, -1) 17 +(31, 25, -1) 18 +(31, 26, -1) 18 +(31, 27, -1) 19 +(31, 28, -1) 20 +(31, 29, -1) 21 +(31, 30, -1) 21 +(31, 31, -1) 22 +(31, 32, -1) 23 +(31, 33, -1) 23 +(31, 34, -1) 24 +(31, 35, -1) 25 +(31, 36, -1) 25 +(31, 37, -1) 26 +(31, 38, -1) 26 +(31, 39, -1) 27 +(31, 40, -1) 27 +(31, 41, -1) 28 +(31, 42, -1) 28 +(31, 43, -1) 29 +(31, 44, -1) 29 +(31, 45, -1) 29 +(31, 46, -1) 30 +(31, 47, -1) 30 +(31, 48, -1) 30 +(31, 49, -1) 30 +(31, 50, -1) 30 +(31, 51, -1) 30 +(31, 52, -1) 30 +(31, 53, -1) 30 +(31, 54, -1) 30 +(31, 55, -1) 30 +(31, 56, -1) 29 +(31, 57, -1) 29 +(31, 58, -1) 29 +(31, 59, -1) 28 +(31, 60, -1) 28 +(31, 61, -1) 27 +(31, 62, -1) 27 +(31, 63, -1) 26 +(31, 64, -1) 26 +(31, 65, -1) 25 +(31, 66, -1) 25 +(31, 67, -1) 24 +(31, 68, -1) 23 +(31, 69, -1) 23 +(31, 70, -1) 22 +(31, 71, -1) 21 +(31, 72, -1) 21 +(31, 73, -1) 20 +(31, 74, -1) 19 +(31, 75, -1) 18 +(31, 76, -1) 18 +(31, 77, -1) 17 +(31, 78, -1) 16 +(31, 79, -1) 15 +(31, 80, -1) 14 +(31, 81, -1) 13 +(31, 82, -1) 13 +(31, 83, -1) 12 +(31, 84, -1) 11 +(31, 85, -1) 10 +(31, 86, -1) 9 +(31, 87, -1) 8 +(31, 88, -1) 7 +(31, 89, -1) 7 +(31, 90, -1) 6 +(31, 91, -1) 5 +(31, 92, -1) 4 +(31, 93, -1) 3 +(31, 94, -1) 2 +(31, 95, -1) 1 +(32, 6, -1) 2 +(32, 7, -1) 2 +(32, 8, -1) 3 +(32, 9, -1) 4 +(32, 10, -1) 5 +(32, 11, -1) 6 +(32, 12, -1) 7 +(32, 13, -1) 8 +(32, 14, -1) 9 +(32, 15, -1) 10 +(32, 16, -1) 11 +(32, 17, -1) 11 +(32, 18, -1) 12 +(32, 19, -1) 13 +(32, 20, -1) 14 +(32, 21, -1) 15 +(32, 22, -1) 16 +(32, 23, -1) 17 +(32, 24, -1) 17 +(32, 25, -1) 18 +(32, 26, -1) 19 +(32, 27, -1) 20 +(32, 28, -1) 20 +(32, 29, -1) 21 +(32, 30, -1) 22 +(32, 31, -1) 23 +(32, 32, -1) 23 +(32, 33, -1) 24 +(32, 34, -1) 25 +(32, 35, -1) 25 +(32, 36, -1) 26 +(32, 37, -1) 27 +(32, 38, -1) 27 +(32, 39, -1) 28 +(32, 40, -1) 28 +(32, 41, -1) 29 +(32, 42, -1) 29 +(32, 43, -1) 30 +(32, 44, -1) 30 +(32, 45, -1) 30 +(32, 46, -1) 30 +(32, 47, -1) 31 +(32, 48, -1) 31 +(32, 49, -1) 31 +(32, 50, -1) 31 +(32, 51, -1) 31 +(32, 52, -1) 31 +(32, 53, -1) 31 +(32, 54, -1) 31 +(32, 55, -1) 30 +(32, 56, -1) 30 +(32, 57, -1) 30 +(32, 58, -1) 30 +(32, 59, -1) 29 +(32, 60, -1) 29 +(32, 61, -1) 28 +(32, 62, -1) 28 +(32, 63, -1) 27 +(32, 64, -1) 27 +(32, 65, -1) 26 +(32, 66, -1) 25 +(32, 67, -1) 25 +(32, 68, -1) 24 +(32, 69, -1) 23 +(32, 70, -1) 23 +(32, 71, -1) 22 +(32, 72, -1) 21 +(32, 73, -1) 20 +(32, 74, -1) 20 +(32, 75, -1) 19 +(32, 76, -1) 18 +(32, 77, -1) 17 +(32, 78, -1) 17 +(32, 79, -1) 16 +(32, 80, -1) 15 +(32, 81, -1) 14 +(32, 82, -1) 13 +(32, 83, -1) 12 +(32, 84, -1) 11 +(32, 85, -1) 11 +(32, 86, -1) 10 +(32, 87, -1) 9 +(32, 88, -1) 8 +(32, 89, -1) 7 +(32, 90, -1) 6 +(32, 91, -1) 5 +(32, 92, -1) 4 +(32, 93, -1) 3 +(32, 94, -1) 2 +(32, 95, -1) 2 +(33, 6, -1) 2 +(33, 7, -1) 3 +(33, 8, -1) 4 +(33, 9, -1) 5 +(33, 10, -1) 6 +(33, 11, -1) 7 +(33, 12, -1) 7 +(33, 13, -1) 8 +(33, 14, -1) 9 +(33, 15, -1) 10 +(33, 16, -1) 11 +(33, 17, -1) 12 +(33, 18, -1) 13 +(33, 19, -1) 14 +(33, 20, -1) 15 +(33, 21, -1) 15 +(33, 22, -1) 16 +(33, 23, -1) 17 +(33, 24, -1) 18 +(33, 25, -1) 19 +(33, 26, -1) 20 +(33, 27, -1) 20 +(33, 28, -1) 21 +(33, 29, -1) 22 +(33, 30, -1) 23 +(33, 31, -1) 23 +(33, 32, -1) 24 +(33, 33, -1) 25 +(33, 34, -1) 26 +(33, 35, -1) 26 +(33, 36, -1) 27 +(33, 37, -1) 27 +(33, 38, -1) 28 +(33, 39, -1) 29 +(33, 40, -1) 29 +(33, 41, -1) 30 +(33, 42, -1) 30 +(33, 43, -1) 30 +(33, 44, -1) 31 +(33, 45, -1) 31 +(33, 46, -1) 31 +(33, 47, -1) 32 +(33, 48, -1) 32 +(33, 49, -1) 32 +(33, 50, -1) 32 +(33, 51, -1) 32 +(33, 52, -1) 32 +(33, 53, -1) 32 +(33, 54, -1) 32 +(33, 55, -1) 31 +(33, 56, -1) 31 +(33, 57, -1) 31 +(33, 58, -1) 30 +(33, 59, -1) 30 +(33, 60, -1) 30 +(33, 61, -1) 29 +(33, 62, -1) 29 +(33, 63, -1) 28 +(33, 64, -1) 27 +(33, 65, -1) 27 +(33, 66, -1) 26 +(33, 67, -1) 26 +(33, 68, -1) 25 +(33, 69, -1) 24 +(33, 70, -1) 23 +(33, 71, -1) 23 +(33, 72, -1) 22 +(33, 73, -1) 21 +(33, 74, -1) 20 +(33, 75, -1) 20 +(33, 76, -1) 19 +(33, 77, -1) 18 +(33, 78, -1) 17 +(33, 79, -1) 16 +(33, 80, -1) 15 +(33, 81, -1) 15 +(33, 82, -1) 14 +(33, 83, -1) 13 +(33, 84, -1) 12 +(33, 85, -1) 11 +(33, 86, -1) 10 +(33, 87, -1) 9 +(33, 88, -1) 8 +(33, 89, -1) 7 +(33, 90, -1) 7 +(33, 91, -1) 6 +(33, 92, -1) 5 +(33, 93, -1) 4 +(33, 94, -1) 3 +(33, 95, -1) 2 +(34, 6, -1) 2 +(34, 7, -1) 3 +(34, 8, -1) 4 +(34, 9, -1) 5 +(34, 10, -1) 6 +(34, 11, -1) 7 +(34, 12, -1) 8 +(34, 13, -1) 9 +(34, 14, -1) 10 +(34, 15, -1) 11 +(34, 16, -1) 11 +(34, 17, -1) 12 +(34, 18, -1) 13 +(34, 19, -1) 14 +(34, 20, -1) 15 +(34, 21, -1) 16 +(34, 22, -1) 17 +(34, 23, -1) 18 +(34, 24, -1) 18 +(34, 25, -1) 19 +(34, 26, -1) 20 +(34, 27, -1) 21 +(34, 28, -1) 22 +(34, 29, -1) 23 +(34, 30, -1) 23 +(34, 31, -1) 24 +(34, 32, -1) 25 +(34, 33, -1) 26 +(34, 34, -1) 26 +(34, 35, -1) 27 +(34, 36, -1) 28 +(34, 37, -1) 28 +(34, 38, -1) 29 +(34, 39, -1) 29 +(34, 40, -1) 30 +(34, 41, -1) 30 +(34, 42, -1) 31 +(34, 43, -1) 31 +(34, 44, -1) 32 +(34, 45, -1) 32 +(34, 46, -1) 32 +(34, 47, -1) 33 +(34, 48, -1) 33 +(34, 49, -1) 33 +(34, 50, -1) 33 +(34, 51, -1) 33 +(34, 52, -1) 33 +(34, 53, -1) 33 +(34, 54, -1) 33 +(34, 55, -1) 32 +(34, 56, -1) 32 +(34, 57, -1) 32 +(34, 58, -1) 31 +(34, 59, -1) 31 +(34, 60, -1) 30 +(34, 61, -1) 30 +(34, 62, -1) 29 +(34, 63, -1) 29 +(34, 64, -1) 28 +(34, 65, -1) 28 +(34, 66, -1) 27 +(34, 67, -1) 26 +(34, 68, -1) 26 +(34, 69, -1) 25 +(34, 70, -1) 24 +(34, 71, -1) 23 +(34, 72, -1) 23 +(34, 73, -1) 22 +(34, 74, -1) 21 +(34, 75, -1) 20 +(34, 76, -1) 19 +(34, 77, -1) 18 +(34, 78, -1) 18 +(34, 79, -1) 17 +(34, 80, -1) 16 +(34, 81, -1) 15 +(34, 82, -1) 14 +(34, 83, -1) 13 +(34, 84, -1) 12 +(34, 85, -1) 11 +(34, 86, -1) 11 +(34, 87, -1) 10 +(34, 88, -1) 9 +(34, 89, -1) 8 +(34, 90, -1) 7 +(34, 91, -1) 6 +(34, 92, -1) 5 +(34, 93, -1) 4 +(34, 94, -1) 3 +(34, 95, -1) 2 +(35, 6, -1) 3 +(35, 7, -1) 4 +(35, 8, -1) 5 +(35, 9, -1) 6 +(35, 10, -1) 6 +(35, 11, -1) 7 +(35, 12, -1) 8 +(35, 13, -1) 9 +(35, 14, -1) 10 +(35, 15, -1) 11 +(35, 16, -1) 12 +(35, 17, -1) 13 +(35, 18, -1) 14 +(35, 19, -1) 15 +(35, 20, -1) 16 +(35, 21, -1) 16 +(35, 22, -1) 17 +(35, 23, -1) 18 +(35, 24, -1) 19 +(35, 25, -1) 20 +(35, 26, -1) 21 +(35, 27, -1) 21 +(35, 28, -1) 22 +(35, 29, -1) 23 +(35, 30, -1) 24 +(35, 31, -1) 25 +(35, 32, -1) 25 +(35, 33, -1) 26 +(35, 34, -1) 27 +(35, 35, -1) 28 +(35, 36, -1) 28 +(35, 37, -1) 29 +(35, 38, -1) 30 +(35, 39, -1) 30 +(35, 40, -1) 31 +(35, 41, -1) 31 +(35, 42, -1) 32 +(35, 43, -1) 32 +(35, 44, -1) 33 +(35, 45, -1) 33 +(35, 46, -1) 33 +(35, 47, -1) 34 +(35, 48, -1) 34 +(35, 49, -1) 34 +(35, 50, -1) 34 +(35, 51, -1) 34 +(35, 52, -1) 34 +(35, 53, -1) 34 +(35, 54, -1) 34 +(35, 55, -1) 33 +(35, 56, -1) 33 +(35, 57, -1) 33 +(35, 58, -1) 32 +(35, 59, -1) 32 +(35, 60, -1) 31 +(35, 61, -1) 31 +(35, 62, -1) 30 +(35, 63, -1) 30 +(35, 64, -1) 29 +(35, 65, -1) 28 +(35, 66, -1) 28 +(35, 67, -1) 27 +(35, 68, -1) 26 +(35, 69, -1) 25 +(35, 70, -1) 25 +(35, 71, -1) 24 +(35, 72, -1) 23 +(35, 73, -1) 22 +(35, 74, -1) 21 +(35, 75, -1) 21 +(35, 76, -1) 20 +(35, 77, -1) 19 +(35, 78, -1) 18 +(35, 79, -1) 17 +(35, 80, -1) 16 +(35, 81, -1) 16 +(35, 82, -1) 15 +(35, 83, -1) 14 +(35, 84, -1) 13 +(35, 85, -1) 12 +(35, 86, -1) 11 +(35, 87, -1) 10 +(35, 88, -1) 9 +(35, 89, -1) 8 +(35, 90, -1) 7 +(35, 91, -1) 6 +(35, 92, -1) 6 +(35, 93, -1) 5 +(35, 94, -1) 4 +(35, 95, -1) 3 +(36, 4, -1) 1 +(36, 5, -1) 2 +(36, 6, -1) 3 +(36, 7, -1) 4 +(36, 8, -1) 5 +(36, 9, -1) 6 +(36, 10, -1) 7 +(36, 11, -1) 8 +(36, 12, -1) 8 +(36, 13, -1) 9 +(36, 14, -1) 10 +(36, 15, -1) 11 +(36, 16, -1) 12 +(36, 17, -1) 13 +(36, 18, -1) 14 +(36, 19, -1) 15 +(36, 20, -1) 16 +(36, 21, -1) 17 +(36, 22, -1) 18 +(36, 23, -1) 19 +(36, 24, -1) 19 +(36, 25, -1) 20 +(36, 26, -1) 21 +(36, 27, -1) 22 +(36, 28, -1) 23 +(36, 29, -1) 24 +(36, 30, -1) 24 +(36, 31, -1) 25 +(36, 32, -1) 26 +(36, 33, -1) 27 +(36, 34, -1) 28 +(36, 35, -1) 28 +(36, 36, -1) 29 +(36, 37, -1) 30 +(36, 38, -1) 30 +(36, 39, -1) 31 +(36, 40, -1) 32 +(36, 41, -1) 32 +(36, 42, -1) 33 +(36, 43, -1) 33 +(36, 44, -1) 34 +(36, 45, -1) 34 +(36, 46, -1) 34 +(36, 47, -1) 35 +(36, 48, -1) 35 +(36, 49, -1) 35 +(36, 50, -1) 35 +(36, 51, -1) 35 +(36, 52, -1) 35 +(36, 53, -1) 35 +(36, 54, -1) 35 +(36, 55, -1) 34 +(36, 56, -1) 34 +(36, 57, -1) 34 +(36, 58, -1) 33 +(36, 59, -1) 33 +(36, 60, -1) 32 +(36, 61, -1) 32 +(36, 62, -1) 31 +(36, 63, -1) 30 +(36, 64, -1) 30 +(36, 65, -1) 29 +(36, 66, -1) 28 +(36, 67, -1) 28 +(36, 68, -1) 27 +(36, 69, -1) 26 +(36, 70, -1) 25 +(36, 71, -1) 24 +(36, 72, -1) 24 +(36, 73, -1) 23 +(36, 74, -1) 22 +(36, 75, -1) 21 +(36, 76, -1) 20 +(36, 77, -1) 19 +(36, 78, -1) 19 +(36, 79, -1) 18 +(36, 80, -1) 17 +(36, 81, -1) 16 +(36, 82, -1) 15 +(36, 83, -1) 14 +(36, 84, -1) 13 +(36, 85, -1) 12 +(36, 86, -1) 11 +(36, 87, -1) 10 +(36, 88, -1) 9 +(36, 89, -1) 8 +(36, 90, -1) 8 +(36, 91, -1) 7 +(36, 92, -1) 6 +(36, 93, -1) 5 +(36, 94, -1) 4 +(36, 95, -1) 3 +(36, 96, -1) 2 +(36, 97, -1) 1 +(37, 4, -1) 1 +(37, 5, -1) 2 +(37, 6, -1) 3 +(37, 7, -1) 4 +(37, 8, -1) 5 +(37, 9, -1) 6 +(37, 10, -1) 7 +(37, 11, -1) 8 +(37, 12, -1) 9 +(37, 13, -1) 10 +(37, 14, -1) 11 +(37, 15, -1) 12 +(37, 16, -1) 13 +(37, 17, -1) 14 +(37, 18, -1) 14 +(37, 19, -1) 15 +(37, 20, -1) 16 +(37, 21, -1) 17 +(37, 22, -1) 18 +(37, 23, -1) 19 +(37, 24, -1) 20 +(37, 25, -1) 21 +(37, 26, -1) 22 +(37, 27, -1) 22 +(37, 28, -1) 23 +(37, 29, -1) 24 +(37, 30, -1) 25 +(37, 31, -1) 26 +(37, 32, -1) 27 +(37, 33, -1) 27 +(37, 34, -1) 28 +(37, 35, -1) 29 +(37, 36, -1) 30 +(37, 37, -1) 30 +(37, 38, -1) 31 +(37, 39, -1) 32 +(37, 40, -1) 32 +(37, 41, -1) 33 +(37, 42, -1) 34 +(37, 43, -1) 34 +(37, 44, -1) 35 +(37, 45, -1) 35 +(37, 46, -1) 35 +(37, 47, -1) 36 +(37, 48, -1) 36 +(37, 49, -1) 36 +(37, 50, -1) 36 +(37, 51, -1) 36 +(37, 52, -1) 36 +(37, 53, -1) 36 +(37, 54, -1) 36 +(37, 55, -1) 35 +(37, 56, -1) 35 +(37, 57, -1) 35 +(37, 58, -1) 34 +(37, 59, -1) 34 +(37, 60, -1) 33 +(37, 61, -1) 32 +(37, 62, -1) 32 +(37, 63, -1) 31 +(37, 64, -1) 30 +(37, 65, -1) 30 +(37, 66, -1) 29 +(37, 67, -1) 28 +(37, 68, -1) 27 +(37, 69, -1) 27 +(37, 70, -1) 26 +(37, 71, -1) 25 +(37, 72, -1) 24 +(37, 73, -1) 23 +(37, 74, -1) 22 +(37, 75, -1) 22 +(37, 76, -1) 21 +(37, 77, -1) 20 +(37, 78, -1) 19 +(37, 79, -1) 18 +(37, 80, -1) 17 +(37, 81, -1) 16 +(37, 82, -1) 15 +(37, 83, -1) 14 +(37, 84, -1) 14 +(37, 85, -1) 13 +(37, 86, -1) 12 +(37, 87, -1) 11 +(37, 88, -1) 10 +(37, 89, -1) 9 +(37, 90, -1) 8 +(37, 91, -1) 7 +(37, 92, -1) 6 +(37, 93, -1) 5 +(37, 94, -1) 4 +(37, 95, -1) 3 +(37, 96, -1) 2 +(37, 97, -1) 1 +(38, 4, -1) 2 +(38, 5, -1) 3 +(38, 6, -1) 3 +(38, 7, -1) 4 +(38, 8, -1) 5 +(38, 9, -1) 6 +(38, 10, -1) 7 +(38, 11, -1) 8 +(38, 12, -1) 9 +(38, 13, -1) 10 +(38, 14, -1) 11 +(38, 15, -1) 12 +(38, 16, -1) 13 +(38, 17, -1) 14 +(38, 18, -1) 15 +(38, 19, -1) 16 +(38, 20, -1) 17 +(38, 21, -1) 18 +(38, 22, -1) 18 +(38, 23, -1) 19 +(38, 24, -1) 20 +(38, 25, -1) 21 +(38, 26, -1) 22 +(38, 27, -1) 23 +(38, 28, -1) 24 +(38, 29, -1) 25 +(38, 30, -1) 26 +(38, 31, -1) 26 +(38, 32, -1) 27 +(38, 33, -1) 28 +(38, 34, -1) 29 +(38, 35, -1) 30 +(38, 36, -1) 30 +(38, 37, -1) 31 +(38, 38, -1) 32 +(38, 39, -1) 33 +(38, 40, -1) 33 +(38, 41, -1) 34 +(38, 42, -1) 34 +(38, 43, -1) 35 +(38, 44, -1) 35 +(38, 45, -1) 36 +(38, 46, -1) 36 +(38, 47, -1) 37 +(38, 48, -1) 37 +(38, 49, -1) 37 +(38, 50, -1) 37 +(38, 51, -1) 37 +(38, 52, -1) 37 +(38, 53, -1) 37 +(38, 54, -1) 37 +(38, 55, -1) 36 +(38, 56, -1) 36 +(38, 57, -1) 35 +(38, 58, -1) 35 +(38, 59, -1) 34 +(38, 60, -1) 34 +(38, 61, -1) 33 +(38, 62, -1) 33 +(38, 63, -1) 32 +(38, 64, -1) 31 +(38, 65, -1) 30 +(38, 66, -1) 30 +(38, 67, -1) 29 +(38, 68, -1) 28 +(38, 69, -1) 27 +(38, 70, -1) 26 +(38, 71, -1) 26 +(38, 72, -1) 25 +(38, 73, -1) 24 +(38, 74, -1) 23 +(38, 75, -1) 22 +(38, 76, -1) 21 +(38, 77, -1) 20 +(38, 78, -1) 19 +(38, 79, -1) 18 +(38, 80, -1) 18 +(38, 81, -1) 17 +(38, 82, -1) 16 +(38, 83, -1) 15 +(38, 84, -1) 14 +(38, 85, -1) 13 +(38, 86, -1) 12 +(38, 87, -1) 11 +(38, 88, -1) 10 +(38, 89, -1) 9 +(38, 90, -1) 8 +(38, 91, -1) 7 +(38, 92, -1) 6 +(38, 93, -1) 5 +(38, 94, -1) 4 +(38, 95, -1) 3 +(38, 96, -1) 3 +(38, 97, -1) 2 +(39, 4, -1) 2 +(39, 5, -1) 3 +(39, 6, -1) 4 +(39, 7, -1) 5 +(39, 8, -1) 6 +(39, 9, -1) 7 +(39, 10, -1) 8 +(39, 11, -1) 9 +(39, 12, -1) 9 +(39, 13, -1) 10 +(39, 14, -1) 11 +(39, 15, -1) 12 +(39, 16, -1) 13 +(39, 17, -1) 14 +(39, 18, -1) 15 +(39, 19, -1) 16 +(39, 20, -1) 17 +(39, 21, -1) 18 +(39, 22, -1) 19 +(39, 23, -1) 20 +(39, 24, -1) 21 +(39, 25, -1) 22 +(39, 26, -1) 23 +(39, 27, -1) 23 +(39, 28, -1) 24 +(39, 29, -1) 25 +(39, 30, -1) 26 +(39, 31, -1) 27 +(39, 32, -1) 28 +(39, 33, -1) 29 +(39, 34, -1) 29 +(39, 35, -1) 30 +(39, 36, -1) 31 +(39, 37, -1) 32 +(39, 38, -1) 33 +(39, 39, -1) 33 +(39, 40, -1) 34 +(39, 41, -1) 35 +(39, 42, -1) 35 +(39, 43, -1) 36 +(39, 44, -1) 36 +(39, 45, -1) 37 +(39, 46, -1) 37 +(39, 47, -1) 37 +(39, 48, -1) 38 +(39, 49, -1) 38 +(39, 50, -1) 38 +(39, 51, -1) 38 +(39, 52, -1) 38 +(39, 53, -1) 38 +(39, 54, -1) 37 +(39, 55, -1) 37 +(39, 56, -1) 37 +(39, 57, -1) 36 +(39, 58, -1) 36 +(39, 59, -1) 35 +(39, 60, -1) 35 +(39, 61, -1) 34 +(39, 62, -1) 33 +(39, 63, -1) 33 +(39, 64, -1) 32 +(39, 65, -1) 31 +(39, 66, -1) 30 +(39, 67, -1) 29 +(39, 68, -1) 29 +(39, 69, -1) 28 +(39, 70, -1) 27 +(39, 71, -1) 26 +(39, 72, -1) 25 +(39, 73, -1) 24 +(39, 74, -1) 23 +(39, 75, -1) 23 +(39, 76, -1) 22 +(39, 77, -1) 21 +(39, 78, -1) 20 +(39, 79, -1) 19 +(39, 80, -1) 18 +(39, 81, -1) 17 +(39, 82, -1) 16 +(39, 83, -1) 15 +(39, 84, -1) 14 +(39, 85, -1) 13 +(39, 86, -1) 12 +(39, 87, -1) 11 +(39, 88, -1) 10 +(39, 89, -1) 9 +(39, 90, -1) 9 +(39, 91, -1) 8 +(39, 92, -1) 7 +(39, 93, -1) 6 +(39, 94, -1) 5 +(39, 95, -1) 4 +(39, 96, -1) 3 +(39, 97, -1) 2 +(40, 4, -1) 2 +(40, 5, -1) 3 +(40, 6, -1) 4 +(40, 7, -1) 5 +(40, 8, -1) 6 +(40, 9, -1) 7 +(40, 10, -1) 8 +(40, 11, -1) 9 +(40, 12, -1) 10 +(40, 13, -1) 11 +(40, 14, -1) 12 +(40, 15, -1) 13 +(40, 16, -1) 14 +(40, 17, -1) 15 +(40, 18, -1) 16 +(40, 19, -1) 16 +(40, 20, -1) 17 +(40, 21, -1) 18 +(40, 22, -1) 19 +(40, 23, -1) 20 +(40, 24, -1) 21 +(40, 25, -1) 22 +(40, 26, -1) 23 +(40, 27, -1) 24 +(40, 28, -1) 25 +(40, 29, -1) 26 +(40, 30, -1) 27 +(40, 31, -1) 27 +(40, 32, -1) 28 +(40, 33, -1) 29 +(40, 34, -1) 30 +(40, 35, -1) 31 +(40, 36, -1) 32 +(40, 37, -1) 32 +(40, 38, -1) 33 +(40, 39, -1) 34 +(40, 40, -1) 35 +(40, 41, -1) 35 +(40, 42, -1) 36 +(40, 43, -1) 37 +(40, 44, -1) 37 +(40, 45, -1) 38 +(40, 56, -1) 38 +(40, 57, -1) 37 +(40, 58, -1) 37 +(40, 59, -1) 36 +(40, 60, -1) 35 +(40, 61, -1) 35 +(40, 62, -1) 34 +(40, 63, -1) 33 +(40, 64, -1) 32 +(40, 65, -1) 32 +(40, 66, -1) 31 +(40, 67, -1) 30 +(40, 68, -1) 29 +(40, 69, -1) 28 +(40, 70, -1) 27 +(40, 71, -1) 27 +(40, 72, -1) 26 +(40, 73, -1) 25 +(40, 74, -1) 24 +(40, 75, -1) 23 +(40, 76, -1) 22 +(40, 77, -1) 21 +(40, 78, -1) 20 +(40, 79, -1) 19 +(40, 80, -1) 18 +(40, 81, -1) 17 +(40, 82, -1) 16 +(40, 83, -1) 16 +(40, 84, -1) 15 +(40, 85, -1) 14 +(40, 86, -1) 13 +(40, 87, -1) 12 +(40, 88, -1) 11 +(40, 89, -1) 10 +(40, 90, -1) 9 +(40, 91, -1) 8 +(40, 92, -1) 7 +(40, 93, -1) 6 +(40, 94, -1) 5 +(40, 95, -1) 4 +(40, 96, -1) 3 +(40, 97, -1) 2 +(41, 1, -1) 0 +(41, 2, -1) 0 +(41, 3, -1) 1 +(41, 4, -1) 2 +(41, 5, -1) 3 +(41, 6, -1) 4 +(41, 7, -1) 5 +(41, 8, -1) 6 +(41, 9, -1) 7 +(41, 10, -1) 8 +(41, 11, -1) 9 +(41, 12, -1) 10 +(41, 13, -1) 11 +(41, 14, -1) 12 +(41, 15, -1) 13 +(41, 16, -1) 14 +(41, 17, -1) 15 +(41, 18, -1) 16 +(41, 19, -1) 17 +(41, 20, -1) 18 +(41, 21, -1) 19 +(41, 22, -1) 20 +(41, 23, -1) 20 +(41, 24, -1) 21 +(41, 25, -1) 22 +(41, 26, -1) 23 +(41, 27, -1) 24 +(41, 28, -1) 25 +(41, 29, -1) 26 +(41, 30, -1) 27 +(41, 31, -1) 28 +(41, 32, -1) 29 +(41, 33, -1) 30 +(41, 34, -1) 30 +(41, 35, -1) 31 +(41, 36, -1) 32 +(41, 37, -1) 33 +(41, 38, -1) 34 +(41, 39, -1) 35 +(41, 40, -1) 35 +(41, 41, -1) 36 +(41, 42, -1) 37 +(41, 43, -1) 37 +(41, 58, -1) 37 +(41, 59, -1) 37 +(41, 60, -1) 36 +(41, 61, -1) 35 +(41, 62, -1) 35 +(41, 63, -1) 34 +(41, 64, -1) 33 +(41, 65, -1) 32 +(41, 66, -1) 31 +(41, 67, -1) 30 +(41, 68, -1) 30 +(41, 69, -1) 29 +(41, 70, -1) 28 +(41, 71, -1) 27 +(41, 72, -1) 26 +(41, 73, -1) 25 +(41, 74, -1) 24 +(41, 75, -1) 23 +(41, 76, -1) 22 +(41, 77, -1) 21 +(41, 78, -1) 20 +(41, 79, -1) 20 +(41, 80, -1) 19 +(41, 81, -1) 18 +(41, 82, -1) 17 +(41, 83, -1) 16 +(41, 84, -1) 15 +(41, 85, -1) 14 +(41, 86, -1) 13 +(41, 87, -1) 12 +(41, 88, -1) 11 +(41, 89, -1) 10 +(41, 90, -1) 9 +(41, 91, -1) 8 +(41, 92, -1) 7 +(41, 93, -1) 6 +(41, 94, -1) 5 +(41, 95, -1) 4 +(41, 96, -1) 3 +(41, 97, -1) 2 +(41, 98, -1) 1 +(41, 99, -1) 0 +(41, 100, -1) 0 +(42, 1, -1) 0 +(42, 2, -1) 0 +(42, 3, -1) 1 +(42, 4, -1) 2 +(42, 5, -1) 3 +(42, 6, -1) 4 +(42, 7, -1) 5 +(42, 8, -1) 6 +(42, 9, -1) 7 +(42, 10, -1) 8 +(42, 11, -1) 9 +(42, 12, -1) 10 +(42, 13, -1) 11 +(42, 14, -1) 12 +(42, 15, -1) 13 +(42, 16, -1) 14 +(42, 17, -1) 15 +(42, 18, -1) 16 +(42, 19, -1) 17 +(42, 20, -1) 18 +(42, 21, -1) 19 +(42, 22, -1) 20 +(42, 23, -1) 21 +(42, 24, -1) 22 +(42, 25, -1) 23 +(42, 26, -1) 24 +(42, 27, -1) 25 +(42, 28, -1) 25 +(42, 29, -1) 26 +(42, 30, -1) 27 +(42, 31, -1) 28 +(42, 32, -1) 29 +(42, 33, -1) 30 +(42, 34, -1) 31 +(42, 35, -1) 32 +(42, 36, -1) 33 +(42, 37, -1) 34 +(42, 38, -1) 34 +(42, 39, -1) 35 +(42, 40, -1) 36 +(42, 41, -1) 37 +(42, 42, -1) 38 +(42, 59, -1) 38 +(42, 60, -1) 37 +(42, 61, -1) 36 +(42, 62, -1) 35 +(42, 63, -1) 34 +(42, 64, -1) 34 +(42, 65, -1) 33 +(42, 66, -1) 32 +(42, 67, -1) 31 +(42, 68, -1) 30 +(42, 69, -1) 29 +(42, 70, -1) 28 +(42, 71, -1) 27 +(42, 72, -1) 26 +(42, 73, -1) 25 +(42, 74, -1) 25 +(42, 75, -1) 24 +(42, 76, -1) 23 +(42, 77, -1) 22 +(42, 78, -1) 21 +(42, 79, -1) 20 +(42, 80, -1) 19 +(42, 81, -1) 18 +(42, 82, -1) 17 +(42, 83, -1) 16 +(42, 84, -1) 15 +(42, 85, -1) 14 +(42, 86, -1) 13 +(42, 87, -1) 12 +(42, 88, -1) 11 +(42, 89, -1) 10 +(42, 90, -1) 9 +(42, 91, -1) 8 +(42, 92, -1) 7 +(42, 93, -1) 6 +(42, 94, -1) 5 +(42, 95, -1) 4 +(42, 96, -1) 3 +(42, 97, -1) 2 +(42, 98, -1) 1 +(42, 99, -1) 0 +(42, 100, -1) 0 +(43, 1, -1) 0 +(43, 2, -1) 1 +(43, 3, -1) 2 +(43, 4, -1) 3 +(43, 5, -1) 4 +(43, 6, -1) 4 +(43, 7, -1) 5 +(43, 8, -1) 6 +(43, 9, -1) 7 +(43, 10, -1) 8 +(43, 11, -1) 9 +(43, 12, -1) 10 +(43, 13, -1) 11 +(43, 14, -1) 12 +(43, 15, -1) 13 +(43, 16, -1) 14 +(43, 17, -1) 15 +(43, 18, -1) 16 +(43, 19, -1) 17 +(43, 20, -1) 18 +(43, 21, -1) 19 +(43, 22, -1) 20 +(43, 23, -1) 21 +(43, 24, -1) 22 +(43, 25, -1) 23 +(43, 26, -1) 24 +(43, 27, -1) 25 +(43, 28, -1) 26 +(43, 29, -1) 27 +(43, 30, -1) 28 +(43, 31, -1) 29 +(43, 32, -1) 30 +(43, 33, -1) 30 +(43, 34, -1) 31 +(43, 35, -1) 32 +(43, 36, -1) 33 +(43, 37, -1) 34 +(43, 38, -1) 35 +(43, 39, -1) 36 +(43, 40, -1) 37 +(43, 41, -1) 37 +(43, 60, -1) 37 +(43, 61, -1) 37 +(43, 62, -1) 36 +(43, 63, -1) 35 +(43, 64, -1) 34 +(43, 65, -1) 33 +(43, 66, -1) 32 +(43, 67, -1) 31 +(43, 68, -1) 30 +(43, 69, -1) 30 +(43, 70, -1) 29 +(43, 71, -1) 28 +(43, 72, -1) 27 +(43, 73, -1) 26 +(43, 74, -1) 25 +(43, 75, -1) 24 +(43, 76, -1) 23 +(43, 77, -1) 22 +(43, 78, -1) 21 +(43, 79, -1) 20 +(43, 80, -1) 19 +(43, 81, -1) 18 +(43, 82, -1) 17 +(43, 83, -1) 16 +(43, 84, -1) 15 +(43, 85, -1) 14 +(43, 86, -1) 13 +(43, 87, -1) 12 +(43, 88, -1) 11 +(43, 89, -1) 10 +(43, 90, -1) 9 +(43, 91, -1) 8 +(43, 92, -1) 7 +(43, 93, -1) 6 +(43, 94, -1) 5 +(43, 95, -1) 4 +(43, 96, -1) 4 +(43, 97, -1) 3 +(43, 98, -1) 2 +(43, 99, -1) 1 +(43, 100, -1) 0 +(44, 1, -1) 0 +(44, 2, -1) 1 +(44, 3, -1) 2 +(44, 4, -1) 3 +(44, 5, -1) 4 +(44, 6, -1) 5 +(44, 7, -1) 6 +(44, 8, -1) 7 +(44, 9, -1) 8 +(44, 10, -1) 9 +(44, 11, -1) 10 +(44, 12, -1) 11 +(44, 13, -1) 12 +(44, 14, -1) 13 +(44, 15, -1) 14 +(44, 16, -1) 14 +(44, 17, -1) 15 +(44, 18, -1) 16 +(44, 19, -1) 17 +(44, 20, -1) 18 +(44, 21, -1) 19 +(44, 22, -1) 20 +(44, 23, -1) 21 +(44, 24, -1) 22 +(44, 25, -1) 23 +(44, 26, -1) 24 +(44, 27, -1) 25 +(44, 28, -1) 26 +(44, 29, -1) 27 +(44, 30, -1) 28 +(44, 31, -1) 29 +(44, 32, -1) 30 +(44, 33, -1) 31 +(44, 34, -1) 32 +(44, 35, -1) 33 +(44, 36, -1) 34 +(44, 37, -1) 35 +(44, 38, -1) 35 +(44, 39, -1) 36 +(44, 40, -1) 37 +(44, 61, -1) 37 +(44, 62, -1) 36 +(44, 63, -1) 35 +(44, 64, -1) 35 +(44, 65, -1) 34 +(44, 66, -1) 33 +(44, 67, -1) 32 +(44, 68, -1) 31 +(44, 69, -1) 30 +(44, 70, -1) 29 +(44, 71, -1) 28 +(44, 72, -1) 27 +(44, 73, -1) 26 +(44, 74, -1) 25 +(44, 75, -1) 24 +(44, 76, -1) 23 +(44, 77, -1) 22 +(44, 78, -1) 21 +(44, 79, -1) 20 +(44, 80, -1) 19 +(44, 81, -1) 18 +(44, 82, -1) 17 +(44, 83, -1) 16 +(44, 84, -1) 15 +(44, 85, -1) 14 +(44, 86, -1) 14 +(44, 87, -1) 13 +(44, 88, -1) 12 +(44, 89, -1) 11 +(44, 90, -1) 10 +(44, 91, -1) 9 +(44, 92, -1) 8 +(44, 93, -1) 7 +(44, 94, -1) 6 +(44, 95, -1) 5 +(44, 96, -1) 4 +(44, 97, -1) 3 +(44, 98, -1) 2 +(44, 99, -1) 1 +(44, 100, -1) 0 +(45, 1, -1) 0 +(45, 2, -1) 1 +(45, 3, -1) 2 +(45, 4, -1) 3 +(45, 5, -1) 4 +(45, 6, -1) 5 +(45, 7, -1) 6 +(45, 8, -1) 7 +(45, 9, -1) 8 +(45, 10, -1) 9 +(45, 11, -1) 10 +(45, 12, -1) 11 +(45, 13, -1) 12 +(45, 14, -1) 13 +(45, 15, -1) 14 +(45, 16, -1) 15 +(45, 17, -1) 16 +(45, 18, -1) 17 +(45, 19, -1) 18 +(45, 20, -1) 19 +(45, 21, -1) 20 +(45, 22, -1) 21 +(45, 23, -1) 22 +(45, 24, -1) 23 +(45, 25, -1) 23 +(45, 26, -1) 24 +(45, 27, -1) 25 +(45, 28, -1) 26 +(45, 29, -1) 27 +(45, 30, -1) 28 +(45, 31, -1) 29 +(45, 32, -1) 30 +(45, 33, -1) 31 +(45, 34, -1) 32 +(45, 35, -1) 33 +(45, 36, -1) 34 +(45, 37, -1) 35 +(45, 38, -1) 36 +(45, 39, -1) 37 +(45, 40, -1) 38 +(45, 61, -1) 38 +(45, 62, -1) 37 +(45, 63, -1) 36 +(45, 64, -1) 35 +(45, 65, -1) 34 +(45, 66, -1) 33 +(45, 67, -1) 32 +(45, 68, -1) 31 +(45, 69, -1) 30 +(45, 70, -1) 29 +(45, 71, -1) 28 +(45, 72, -1) 27 +(45, 73, -1) 26 +(45, 74, -1) 25 +(45, 75, -1) 24 +(45, 76, -1) 23 +(45, 77, -1) 23 +(45, 78, -1) 22 +(45, 79, -1) 21 +(45, 80, -1) 20 +(45, 81, -1) 19 +(45, 82, -1) 18 +(45, 83, -1) 17 +(45, 84, -1) 16 +(45, 85, -1) 15 +(45, 86, -1) 14 +(45, 87, -1) 13 +(45, 88, -1) 12 +(45, 89, -1) 11 +(45, 90, -1) 10 +(45, 91, -1) 9 +(45, 92, -1) 8 +(45, 93, -1) 7 +(45, 94, -1) 6 +(45, 95, -1) 5 +(45, 96, -1) 4 +(45, 97, -1) 3 +(45, 98, -1) 2 +(45, 99, -1) 1 +(45, 100, -1) 0 +(46, 1, -1) 0 +(46, 2, -1) 1 +(46, 3, -1) 2 +(46, 4, -1) 3 +(46, 5, -1) 4 +(46, 6, -1) 5 +(46, 7, -1) 6 +(46, 8, -1) 7 +(46, 9, -1) 8 +(46, 10, -1) 9 +(46, 11, -1) 10 +(46, 12, -1) 11 +(46, 13, -1) 12 +(46, 14, -1) 13 +(46, 15, -1) 14 +(46, 16, -1) 15 +(46, 17, -1) 16 +(46, 18, -1) 17 +(46, 19, -1) 18 +(46, 20, -1) 19 +(46, 21, -1) 20 +(46, 22, -1) 21 +(46, 23, -1) 22 +(46, 24, -1) 23 +(46, 25, -1) 24 +(46, 26, -1) 25 +(46, 27, -1) 26 +(46, 28, -1) 27 +(46, 29, -1) 28 +(46, 30, -1) 29 +(46, 31, -1) 30 +(46, 32, -1) 30 +(46, 33, -1) 31 +(46, 34, -1) 32 +(46, 35, -1) 33 +(46, 36, -1) 34 +(46, 37, -1) 35 +(46, 38, -1) 36 +(46, 39, -1) 37 +(46, 62, -1) 37 +(46, 63, -1) 36 +(46, 64, -1) 35 +(46, 65, -1) 34 +(46, 66, -1) 33 +(46, 67, -1) 32 +(46, 68, -1) 31 +(46, 69, -1) 30 +(46, 70, -1) 30 +(46, 71, -1) 29 +(46, 72, -1) 28 +(46, 73, -1) 27 +(46, 74, -1) 26 +(46, 75, -1) 25 +(46, 76, -1) 24 +(46, 77, -1) 23 +(46, 78, -1) 22 +(46, 79, -1) 21 +(46, 80, -1) 20 +(46, 81, -1) 19 +(46, 82, -1) 18 +(46, 83, -1) 17 +(46, 84, -1) 16 +(46, 85, -1) 15 +(46, 86, -1) 14 +(46, 87, -1) 13 +(46, 88, -1) 12 +(46, 89, -1) 11 +(46, 90, -1) 10 +(46, 91, -1) 9 +(46, 92, -1) 8 +(46, 93, -1) 7 +(46, 94, -1) 6 +(46, 95, -1) 5 +(46, 96, -1) 4 +(46, 97, -1) 3 +(46, 98, -1) 2 +(46, 99, -1) 1 +(46, 100, -1) 0 +(47, 1, -1) 0 +(47, 2, -1) 1 +(47, 3, -1) 2 +(47, 4, -1) 3 +(47, 5, -1) 4 +(47, 6, -1) 5 +(47, 7, -1) 6 +(47, 8, -1) 7 +(47, 9, -1) 8 +(47, 10, -1) 9 +(47, 11, -1) 10 +(47, 12, -1) 11 +(47, 13, -1) 12 +(47, 14, -1) 13 +(47, 15, -1) 14 +(47, 16, -1) 15 +(47, 17, -1) 16 +(47, 18, -1) 17 +(47, 19, -1) 18 +(47, 20, -1) 19 +(47, 21, -1) 20 +(47, 22, -1) 21 +(47, 23, -1) 22 +(47, 24, -1) 23 +(47, 25, -1) 24 +(47, 26, -1) 25 +(47, 27, -1) 26 +(47, 28, -1) 27 +(47, 29, -1) 28 +(47, 30, -1) 29 +(47, 31, -1) 30 +(47, 32, -1) 31 +(47, 33, -1) 32 +(47, 34, -1) 33 +(47, 35, -1) 34 +(47, 36, -1) 35 +(47, 37, -1) 36 +(47, 38, -1) 37 +(47, 39, -1) 38 +(47, 62, -1) 38 +(47, 63, -1) 37 +(47, 64, -1) 36 +(47, 65, -1) 35 +(47, 66, -1) 34 +(47, 67, -1) 33 +(47, 68, -1) 32 +(47, 69, -1) 31 +(47, 70, -1) 30 +(47, 71, -1) 29 +(47, 72, -1) 28 +(47, 73, -1) 27 +(47, 74, -1) 26 +(47, 75, -1) 25 +(47, 76, -1) 24 +(47, 77, -1) 23 +(47, 78, -1) 22 +(47, 79, -1) 21 +(47, 80, -1) 20 +(47, 81, -1) 19 +(47, 82, -1) 18 +(47, 83, -1) 17 +(47, 84, -1) 16 +(47, 85, -1) 15 +(47, 86, -1) 14 +(47, 87, -1) 13 +(47, 88, -1) 12 +(47, 89, -1) 11 +(47, 90, -1) 10 +(47, 91, -1) 9 +(47, 92, -1) 8 +(47, 93, -1) 7 +(47, 94, -1) 6 +(47, 95, -1) 5 +(47, 96, -1) 4 +(47, 97, -1) 3 +(47, 98, -1) 2 +(47, 99, -1) 1 +(47, 100, -1) 0 +(48, 1, -1) 0 +(48, 2, -1) 1 +(48, 3, -1) 2 +(48, 4, -1) 3 +(48, 5, -1) 4 +(48, 6, -1) 5 +(48, 7, -1) 6 +(48, 8, -1) 7 +(48, 9, -1) 8 +(48, 10, -1) 9 +(48, 11, -1) 10 +(48, 12, -1) 11 +(48, 13, -1) 12 +(48, 14, -1) 13 +(48, 15, -1) 14 +(48, 16, -1) 15 +(48, 17, -1) 16 +(48, 18, -1) 17 +(48, 19, -1) 18 +(48, 20, -1) 19 +(48, 21, -1) 20 +(48, 22, -1) 21 +(48, 23, -1) 22 +(48, 24, -1) 23 +(48, 25, -1) 24 +(48, 26, -1) 25 +(48, 27, -1) 26 +(48, 28, -1) 27 +(48, 29, -1) 28 +(48, 30, -1) 29 +(48, 31, -1) 30 +(48, 32, -1) 31 +(48, 33, -1) 32 +(48, 34, -1) 33 +(48, 35, -1) 34 +(48, 36, -1) 35 +(48, 37, -1) 36 +(48, 38, -1) 37 +(48, 39, -1) 38 +(48, 62, -1) 38 +(48, 63, -1) 37 +(48, 64, -1) 36 +(48, 65, -1) 35 +(48, 66, -1) 34 +(48, 67, -1) 33 +(48, 68, -1) 32 +(48, 69, -1) 31 +(48, 70, -1) 30 +(48, 71, -1) 29 +(48, 72, -1) 28 +(48, 73, -1) 27 +(48, 74, -1) 26 +(48, 75, -1) 25 +(48, 76, -1) 24 +(48, 77, -1) 23 +(48, 78, -1) 22 +(48, 79, -1) 21 +(48, 80, -1) 20 +(48, 81, -1) 19 +(48, 82, -1) 18 +(48, 83, -1) 17 +(48, 84, -1) 16 +(48, 85, -1) 15 +(48, 86, -1) 14 +(48, 87, -1) 13 +(48, 88, -1) 12 +(48, 89, -1) 11 +(48, 90, -1) 10 +(48, 91, -1) 9 +(48, 92, -1) 8 +(48, 93, -1) 7 +(48, 94, -1) 6 +(48, 95, -1) 5 +(48, 96, -1) 4 +(48, 97, -1) 3 +(48, 98, -1) 2 +(48, 99, -1) 1 +(48, 100, -1) 0 +(49, 1, -1) 0 +(49, 2, -1) 1 +(49, 3, -1) 2 +(49, 4, -1) 3 +(49, 5, -1) 4 +(49, 6, -1) 5 +(49, 7, -1) 6 +(49, 8, -1) 7 +(49, 9, -1) 8 +(49, 10, -1) 9 +(49, 11, -1) 10 +(49, 12, -1) 11 +(49, 13, -1) 12 +(49, 14, -1) 13 +(49, 15, -1) 14 +(49, 16, -1) 15 +(49, 17, -1) 16 +(49, 18, -1) 17 +(49, 19, -1) 18 +(49, 20, -1) 19 +(49, 21, -1) 20 +(49, 22, -1) 21 +(49, 23, -1) 22 +(49, 24, -1) 23 +(49, 25, -1) 24 +(49, 26, -1) 25 +(49, 27, -1) 26 +(49, 28, -1) 27 +(49, 29, -1) 28 +(49, 30, -1) 29 +(49, 31, -1) 30 +(49, 32, -1) 31 +(49, 33, -1) 32 +(49, 34, -1) 33 +(49, 35, -1) 34 +(49, 36, -1) 35 +(49, 37, -1) 36 +(49, 38, -1) 37 +(49, 39, -1) 38 +(49, 62, -1) 38 +(49, 63, -1) 37 +(49, 64, -1) 36 +(49, 65, -1) 35 +(49, 66, -1) 34 +(49, 67, -1) 33 +(49, 68, -1) 32 +(49, 69, -1) 31 +(49, 70, -1) 30 +(49, 71, -1) 29 +(49, 72, -1) 28 +(49, 73, -1) 27 +(49, 74, -1) 26 +(49, 75, -1) 25 +(49, 76, -1) 24 +(49, 77, -1) 23 +(49, 78, -1) 22 +(49, 79, -1) 21 +(49, 80, -1) 20 +(49, 81, -1) 19 +(49, 82, -1) 18 +(49, 83, -1) 17 +(49, 84, -1) 16 +(49, 85, -1) 15 +(49, 86, -1) 14 +(49, 87, -1) 13 +(49, 88, -1) 12 +(49, 89, -1) 11 +(49, 90, -1) 10 +(49, 91, -1) 9 +(49, 92, -1) 8 +(49, 93, -1) 7 +(49, 94, -1) 6 +(49, 95, -1) 5 +(49, 96, -1) 4 +(49, 97, -1) 3 +(49, 98, -1) 2 +(49, 99, -1) 1 +(49, 100, -1) 0 +(50, 1, -1) 0 +(50, 2, -1) 1 +(50, 3, -1) 2 +(50, 4, -1) 3 +(50, 5, -1) 4 +(50, 6, -1) 5 +(50, 7, -1) 6 +(50, 8, -1) 7 +(50, 9, -1) 8 +(50, 10, -1) 9 +(50, 11, -1) 10 +(50, 12, -1) 11 +(50, 13, -1) 12 +(50, 14, -1) 13 +(50, 15, -1) 14 +(50, 16, -1) 15 +(50, 17, -1) 16 +(50, 18, -1) 17 +(50, 19, -1) 18 +(50, 20, -1) 19 +(50, 21, -1) 20 +(50, 22, -1) 21 +(50, 23, -1) 22 +(50, 24, -1) 23 +(50, 25, -1) 24 +(50, 26, -1) 25 +(50, 27, -1) 26 +(50, 28, -1) 27 +(50, 29, -1) 28 +(50, 30, -1) 29 +(50, 31, -1) 30 +(50, 32, -1) 31 +(50, 33, -1) 32 +(50, 34, -1) 33 +(50, 35, -1) 34 +(50, 36, -1) 35 +(50, 37, -1) 36 +(50, 38, -1) 37 +(50, 39, -1) 38 +(50, 62, -1) 38 +(50, 63, -1) 37 +(50, 64, -1) 36 +(50, 65, -1) 35 +(50, 66, -1) 34 +(50, 67, -1) 33 +(50, 68, -1) 32 +(50, 69, -1) 31 +(50, 70, -1) 30 +(50, 71, -1) 29 +(50, 72, -1) 28 +(50, 73, -1) 27 +(50, 74, -1) 26 +(50, 75, -1) 25 +(50, 76, -1) 24 +(50, 77, -1) 23 +(50, 78, -1) 22 +(50, 79, -1) 21 +(50, 80, -1) 20 +(50, 81, -1) 19 +(50, 82, -1) 18 +(50, 83, -1) 17 +(50, 84, -1) 16 +(50, 85, -1) 15 +(50, 86, -1) 14 +(50, 87, -1) 13 +(50, 88, -1) 12 +(50, 89, -1) 11 +(50, 90, -1) 10 +(50, 91, -1) 9 +(50, 92, -1) 8 +(50, 93, -1) 7 +(50, 94, -1) 6 +(50, 95, -1) 5 +(50, 96, -1) 4 +(50, 97, -1) 3 +(50, 98, -1) 2 +(50, 99, -1) 1 +(50, 100, -1) 0 +(51, 1, -1) 0 +(51, 2, -1) 1 +(51, 3, -1) 2 +(51, 4, -1) 3 +(51, 5, -1) 4 +(51, 6, -1) 5 +(51, 7, -1) 6 +(51, 8, -1) 7 +(51, 9, -1) 8 +(51, 10, -1) 9 +(51, 11, -1) 10 +(51, 12, -1) 11 +(51, 13, -1) 12 +(51, 14, -1) 13 +(51, 15, -1) 14 +(51, 16, -1) 15 +(51, 17, -1) 16 +(51, 18, -1) 17 +(51, 19, -1) 18 +(51, 20, -1) 19 +(51, 21, -1) 20 +(51, 22, -1) 21 +(51, 23, -1) 22 +(51, 24, -1) 23 +(51, 25, -1) 24 +(51, 26, -1) 25 +(51, 27, -1) 26 +(51, 28, -1) 27 +(51, 29, -1) 28 +(51, 30, -1) 29 +(51, 31, -1) 30 +(51, 32, -1) 31 +(51, 33, -1) 32 +(51, 34, -1) 33 +(51, 35, -1) 34 +(51, 36, -1) 35 +(51, 37, -1) 36 +(51, 38, -1) 37 +(51, 39, -1) 38 +(51, 62, -1) 38 +(51, 63, -1) 37 +(51, 64, -1) 36 +(51, 65, -1) 35 +(51, 66, -1) 34 +(51, 67, -1) 33 +(51, 68, -1) 32 +(51, 69, -1) 31 +(51, 70, -1) 30 +(51, 71, -1) 29 +(51, 72, -1) 28 +(51, 73, -1) 27 +(51, 74, -1) 26 +(51, 75, -1) 25 +(51, 76, -1) 24 +(51, 77, -1) 23 +(51, 78, -1) 22 +(51, 79, -1) 21 +(51, 80, -1) 20 +(51, 81, -1) 19 +(51, 82, -1) 18 +(51, 83, -1) 17 +(51, 84, -1) 16 +(51, 85, -1) 15 +(51, 86, -1) 14 +(51, 87, -1) 13 +(51, 88, -1) 12 +(51, 89, -1) 11 +(51, 90, -1) 10 +(51, 91, -1) 9 +(51, 92, -1) 8 +(51, 93, -1) 7 +(51, 94, -1) 6 +(51, 95, -1) 5 +(51, 96, -1) 4 +(51, 97, -1) 3 +(51, 98, -1) 2 +(51, 99, -1) 1 +(51, 100, -1) 0 +(52, 1, -1) 0 +(52, 2, -1) 1 +(52, 3, -1) 2 +(52, 4, -1) 3 +(52, 5, -1) 4 +(52, 6, -1) 5 +(52, 7, -1) 6 +(52, 8, -1) 7 +(52, 9, -1) 8 +(52, 10, -1) 9 +(52, 11, -1) 10 +(52, 12, -1) 11 +(52, 13, -1) 12 +(52, 14, -1) 13 +(52, 15, -1) 14 +(52, 16, -1) 15 +(52, 17, -1) 16 +(52, 18, -1) 17 +(52, 19, -1) 18 +(52, 20, -1) 19 +(52, 21, -1) 20 +(52, 22, -1) 21 +(52, 23, -1) 22 +(52, 24, -1) 23 +(52, 25, -1) 24 +(52, 26, -1) 25 +(52, 27, -1) 26 +(52, 28, -1) 27 +(52, 29, -1) 28 +(52, 30, -1) 29 +(52, 31, -1) 30 +(52, 32, -1) 31 +(52, 33, -1) 32 +(52, 34, -1) 33 +(52, 35, -1) 34 +(52, 36, -1) 35 +(52, 37, -1) 36 +(52, 38, -1) 37 +(52, 39, -1) 38 +(52, 62, -1) 38 +(52, 63, -1) 37 +(52, 64, -1) 36 +(52, 65, -1) 35 +(52, 66, -1) 34 +(52, 67, -1) 33 +(52, 68, -1) 32 +(52, 69, -1) 31 +(52, 70, -1) 30 +(52, 71, -1) 29 +(52, 72, -1) 28 +(52, 73, -1) 27 +(52, 74, -1) 26 +(52, 75, -1) 25 +(52, 76, -1) 24 +(52, 77, -1) 23 +(52, 78, -1) 22 +(52, 79, -1) 21 +(52, 80, -1) 20 +(52, 81, -1) 19 +(52, 82, -1) 18 +(52, 83, -1) 17 +(52, 84, -1) 16 +(52, 85, -1) 15 +(52, 86, -1) 14 +(52, 87, -1) 13 +(52, 88, -1) 12 +(52, 89, -1) 11 +(52, 90, -1) 10 +(52, 91, -1) 9 +(52, 92, -1) 8 +(52, 93, -1) 7 +(52, 94, -1) 6 +(52, 95, -1) 5 +(52, 96, -1) 4 +(52, 97, -1) 3 +(52, 98, -1) 2 +(52, 99, -1) 1 +(52, 100, -1) 0 +(53, 1, -1) 0 +(53, 2, -1) 1 +(53, 3, -1) 2 +(53, 4, -1) 3 +(53, 5, -1) 4 +(53, 6, -1) 5 +(53, 7, -1) 6 +(53, 8, -1) 7 +(53, 9, -1) 8 +(53, 10, -1) 9 +(53, 11, -1) 10 +(53, 12, -1) 11 +(53, 13, -1) 12 +(53, 14, -1) 13 +(53, 15, -1) 14 +(53, 16, -1) 15 +(53, 17, -1) 16 +(53, 18, -1) 17 +(53, 19, -1) 18 +(53, 20, -1) 19 +(53, 21, -1) 20 +(53, 22, -1) 21 +(53, 23, -1) 22 +(53, 24, -1) 23 +(53, 25, -1) 24 +(53, 26, -1) 25 +(53, 27, -1) 26 +(53, 28, -1) 27 +(53, 29, -1) 28 +(53, 30, -1) 29 +(53, 31, -1) 30 +(53, 32, -1) 31 +(53, 33, -1) 32 +(53, 34, -1) 33 +(53, 35, -1) 34 +(53, 36, -1) 35 +(53, 37, -1) 36 +(53, 38, -1) 37 +(53, 39, -1) 38 +(53, 62, -1) 38 +(53, 63, -1) 37 +(53, 64, -1) 36 +(53, 65, -1) 35 +(53, 66, -1) 34 +(53, 67, -1) 33 +(53, 68, -1) 32 +(53, 69, -1) 31 +(53, 70, -1) 30 +(53, 71, -1) 29 +(53, 72, -1) 28 +(53, 73, -1) 27 +(53, 74, -1) 26 +(53, 75, -1) 25 +(53, 76, -1) 24 +(53, 77, -1) 23 +(53, 78, -1) 22 +(53, 79, -1) 21 +(53, 80, -1) 20 +(53, 81, -1) 19 +(53, 82, -1) 18 +(53, 83, -1) 17 +(53, 84, -1) 16 +(53, 85, -1) 15 +(53, 86, -1) 14 +(53, 87, -1) 13 +(53, 88, -1) 12 +(53, 89, -1) 11 +(53, 90, -1) 10 +(53, 91, -1) 9 +(53, 92, -1) 8 +(53, 93, -1) 7 +(53, 94, -1) 6 +(53, 95, -1) 5 +(53, 96, -1) 4 +(53, 97, -1) 3 +(53, 98, -1) 2 +(53, 99, -1) 1 +(53, 100, -1) 0 +(54, 1, -1) 0 +(54, 2, -1) 1 +(54, 3, -1) 2 +(54, 4, -1) 3 +(54, 5, -1) 4 +(54, 6, -1) 5 +(54, 7, -1) 6 +(54, 8, -1) 7 +(54, 9, -1) 8 +(54, 10, -1) 9 +(54, 11, -1) 10 +(54, 12, -1) 11 +(54, 13, -1) 12 +(54, 14, -1) 13 +(54, 15, -1) 14 +(54, 16, -1) 15 +(54, 17, -1) 16 +(54, 18, -1) 17 +(54, 19, -1) 18 +(54, 20, -1) 19 +(54, 21, -1) 20 +(54, 22, -1) 21 +(54, 23, -1) 22 +(54, 24, -1) 23 +(54, 25, -1) 24 +(54, 26, -1) 25 +(54, 27, -1) 26 +(54, 28, -1) 27 +(54, 29, -1) 28 +(54, 30, -1) 29 +(54, 31, -1) 30 +(54, 32, -1) 31 +(54, 33, -1) 32 +(54, 34, -1) 33 +(54, 35, -1) 34 +(54, 36, -1) 35 +(54, 37, -1) 36 +(54, 38, -1) 37 +(54, 39, -1) 38 +(54, 62, -1) 38 +(54, 63, -1) 37 +(54, 64, -1) 36 +(54, 65, -1) 35 +(54, 66, -1) 34 +(54, 67, -1) 33 +(54, 68, -1) 32 +(54, 69, -1) 31 +(54, 70, -1) 30 +(54, 71, -1) 29 +(54, 72, -1) 28 +(54, 73, -1) 27 +(54, 74, -1) 26 +(54, 75, -1) 25 +(54, 76, -1) 24 +(54, 77, -1) 23 +(54, 78, -1) 22 +(54, 79, -1) 21 +(54, 80, -1) 20 +(54, 81, -1) 19 +(54, 82, -1) 18 +(54, 83, -1) 17 +(54, 84, -1) 16 +(54, 85, -1) 15 +(54, 86, -1) 14 +(54, 87, -1) 13 +(54, 88, -1) 12 +(54, 89, -1) 11 +(54, 90, -1) 10 +(54, 91, -1) 9 +(54, 92, -1) 8 +(54, 93, -1) 7 +(54, 94, -1) 6 +(54, 95, -1) 5 +(54, 96, -1) 4 +(54, 97, -1) 3 +(54, 98, -1) 2 +(54, 99, -1) 1 +(54, 100, -1) 0 +(55, 1, -1) 0 +(55, 2, -1) 1 +(55, 3, -1) 2 +(55, 4, -1) 3 +(55, 5, -1) 4 +(55, 6, -1) 5 +(55, 7, -1) 6 +(55, 8, -1) 7 +(55, 9, -1) 8 +(55, 10, -1) 9 +(55, 11, -1) 10 +(55, 12, -1) 11 +(55, 13, -1) 12 +(55, 14, -1) 13 +(55, 15, -1) 14 +(55, 16, -1) 15 +(55, 17, -1) 16 +(55, 18, -1) 17 +(55, 19, -1) 18 +(55, 20, -1) 19 +(55, 21, -1) 20 +(55, 22, -1) 21 +(55, 23, -1) 22 +(55, 24, -1) 23 +(55, 25, -1) 24 +(55, 26, -1) 25 +(55, 27, -1) 26 +(55, 28, -1) 27 +(55, 29, -1) 28 +(55, 30, -1) 29 +(55, 31, -1) 30 +(55, 32, -1) 30 +(55, 33, -1) 31 +(55, 34, -1) 32 +(55, 35, -1) 33 +(55, 36, -1) 34 +(55, 37, -1) 35 +(55, 38, -1) 36 +(55, 39, -1) 37 +(55, 62, -1) 37 +(55, 63, -1) 36 +(55, 64, -1) 35 +(55, 65, -1) 34 +(55, 66, -1) 33 +(55, 67, -1) 32 +(55, 68, -1) 31 +(55, 69, -1) 30 +(55, 70, -1) 30 +(55, 71, -1) 29 +(55, 72, -1) 28 +(55, 73, -1) 27 +(55, 74, -1) 26 +(55, 75, -1) 25 +(55, 76, -1) 24 +(55, 77, -1) 23 +(55, 78, -1) 22 +(55, 79, -1) 21 +(55, 80, -1) 20 +(55, 81, -1) 19 +(55, 82, -1) 18 +(55, 83, -1) 17 +(55, 84, -1) 16 +(55, 85, -1) 15 +(55, 86, -1) 14 +(55, 87, -1) 13 +(55, 88, -1) 12 +(55, 89, -1) 11 +(55, 90, -1) 10 +(55, 91, -1) 9 +(55, 92, -1) 8 +(55, 93, -1) 7 +(55, 94, -1) 6 +(55, 95, -1) 5 +(55, 96, -1) 4 +(55, 97, -1) 3 +(55, 98, -1) 2 +(55, 99, -1) 1 +(55, 100, -1) 0 +(56, 1, -1) 0 +(56, 2, -1) 1 +(56, 3, -1) 2 +(56, 4, -1) 3 +(56, 5, -1) 4 +(56, 6, -1) 5 +(56, 7, -1) 6 +(56, 8, -1) 7 +(56, 9, -1) 8 +(56, 10, -1) 9 +(56, 11, -1) 10 +(56, 12, -1) 11 +(56, 13, -1) 12 +(56, 14, -1) 13 +(56, 15, -1) 14 +(56, 16, -1) 15 +(56, 17, -1) 16 +(56, 18, -1) 17 +(56, 19, -1) 18 +(56, 20, -1) 19 +(56, 21, -1) 20 +(56, 22, -1) 21 +(56, 23, -1) 22 +(56, 24, -1) 23 +(56, 25, -1) 23 +(56, 26, -1) 24 +(56, 27, -1) 25 +(56, 28, -1) 26 +(56, 29, -1) 27 +(56, 30, -1) 28 +(56, 31, -1) 29 +(56, 32, -1) 30 +(56, 33, -1) 31 +(56, 34, -1) 32 +(56, 35, -1) 33 +(56, 36, -1) 34 +(56, 37, -1) 35 +(56, 38, -1) 36 +(56, 39, -1) 37 +(56, 40, -1) 38 +(56, 61, -1) 38 +(56, 62, -1) 37 +(56, 63, -1) 36 +(56, 64, -1) 35 +(56, 65, -1) 34 +(56, 66, -1) 33 +(56, 67, -1) 32 +(56, 68, -1) 31 +(56, 69, -1) 30 +(56, 70, -1) 29 +(56, 71, -1) 28 +(56, 72, -1) 27 +(56, 73, -1) 26 +(56, 74, -1) 25 +(56, 75, -1) 24 +(56, 76, -1) 23 +(56, 77, -1) 23 +(56, 78, -1) 22 +(56, 79, -1) 21 +(56, 80, -1) 20 +(56, 81, -1) 19 +(56, 82, -1) 18 +(56, 83, -1) 17 +(56, 84, -1) 16 +(56, 85, -1) 15 +(56, 86, -1) 14 +(56, 87, -1) 13 +(56, 88, -1) 12 +(56, 89, -1) 11 +(56, 90, -1) 10 +(56, 91, -1) 9 +(56, 92, -1) 8 +(56, 93, -1) 7 +(56, 94, -1) 6 +(56, 95, -1) 5 +(56, 96, -1) 4 +(56, 97, -1) 3 +(56, 98, -1) 2 +(56, 99, -1) 1 +(56, 100, -1) 0 +(57, 1, -1) 0 +(57, 2, -1) 1 +(57, 3, -1) 2 +(57, 4, -1) 3 +(57, 5, -1) 4 +(57, 6, -1) 5 +(57, 7, -1) 6 +(57, 8, -1) 7 +(57, 9, -1) 8 +(57, 10, -1) 9 +(57, 11, -1) 10 +(57, 12, -1) 11 +(57, 13, -1) 12 +(57, 14, -1) 13 +(57, 15, -1) 14 +(57, 16, -1) 14 +(57, 17, -1) 15 +(57, 18, -1) 16 +(57, 19, -1) 17 +(57, 20, -1) 18 +(57, 21, -1) 19 +(57, 22, -1) 20 +(57, 23, -1) 21 +(57, 24, -1) 22 +(57, 25, -1) 23 +(57, 26, -1) 24 +(57, 27, -1) 25 +(57, 28, -1) 26 +(57, 29, -1) 27 +(57, 30, -1) 28 +(57, 31, -1) 29 +(57, 32, -1) 30 +(57, 33, -1) 31 +(57, 34, -1) 32 +(57, 35, -1) 33 +(57, 36, -1) 34 +(57, 37, -1) 35 +(57, 38, -1) 35 +(57, 39, -1) 36 +(57, 40, -1) 37 +(57, 61, -1) 37 +(57, 62, -1) 36 +(57, 63, -1) 35 +(57, 64, -1) 35 +(57, 65, -1) 34 +(57, 66, -1) 33 +(57, 67, -1) 32 +(57, 68, -1) 31 +(57, 69, -1) 30 +(57, 70, -1) 29 +(57, 71, -1) 28 +(57, 72, -1) 27 +(57, 73, -1) 26 +(57, 74, -1) 25 +(57, 75, -1) 24 +(57, 76, -1) 23 +(57, 77, -1) 22 +(57, 78, -1) 21 +(57, 79, -1) 20 +(57, 80, -1) 19 +(57, 81, -1) 18 +(57, 82, -1) 17 +(57, 83, -1) 16 +(57, 84, -1) 15 +(57, 85, -1) 14 +(57, 86, -1) 14 +(57, 87, -1) 13 +(57, 88, -1) 12 +(57, 89, -1) 11 +(57, 90, -1) 10 +(57, 91, -1) 9 +(57, 92, -1) 8 +(57, 93, -1) 7 +(57, 94, -1) 6 +(57, 95, -1) 5 +(57, 96, -1) 4 +(57, 97, -1) 3 +(57, 98, -1) 2 +(57, 99, -1) 1 +(57, 100, -1) 0 +(58, 1, -1) 0 +(58, 2, -1) 1 +(58, 3, -1) 2 +(58, 4, -1) 3 +(58, 5, -1) 4 +(58, 6, -1) 4 +(58, 7, -1) 5 +(58, 8, -1) 6 +(58, 9, -1) 7 +(58, 10, -1) 8 +(58, 11, -1) 9 +(58, 12, -1) 10 +(58, 13, -1) 11 +(58, 14, -1) 12 +(58, 15, -1) 13 +(58, 16, -1) 14 +(58, 17, -1) 15 +(58, 18, -1) 16 +(58, 19, -1) 17 +(58, 20, -1) 18 +(58, 21, -1) 19 +(58, 22, -1) 20 +(58, 23, -1) 21 +(58, 24, -1) 22 +(58, 25, -1) 23 +(58, 26, -1) 24 +(58, 27, -1) 25 +(58, 28, -1) 26 +(58, 29, -1) 27 +(58, 30, -1) 28 +(58, 31, -1) 29 +(58, 32, -1) 30 +(58, 33, -1) 30 +(58, 34, -1) 31 +(58, 35, -1) 32 +(58, 36, -1) 33 +(58, 37, -1) 34 +(58, 38, -1) 35 +(58, 39, -1) 36 +(58, 40, -1) 37 +(58, 41, -1) 37 +(58, 60, -1) 37 +(58, 61, -1) 37 +(58, 62, -1) 36 +(58, 63, -1) 35 +(58, 64, -1) 34 +(58, 65, -1) 33 +(58, 66, -1) 32 +(58, 67, -1) 31 +(58, 68, -1) 30 +(58, 69, -1) 30 +(58, 70, -1) 29 +(58, 71, -1) 28 +(58, 72, -1) 27 +(58, 73, -1) 26 +(58, 74, -1) 25 +(58, 75, -1) 24 +(58, 76, -1) 23 +(58, 77, -1) 22 +(58, 78, -1) 21 +(58, 79, -1) 20 +(58, 80, -1) 19 +(58, 81, -1) 18 +(58, 82, -1) 17 +(58, 83, -1) 16 +(58, 84, -1) 15 +(58, 85, -1) 14 +(58, 86, -1) 13 +(58, 87, -1) 12 +(58, 88, -1) 11 +(58, 89, -1) 10 +(58, 90, -1) 9 +(58, 91, -1) 8 +(58, 92, -1) 7 +(58, 93, -1) 6 +(58, 94, -1) 5 +(58, 95, -1) 4 +(58, 96, -1) 4 +(58, 97, -1) 3 +(58, 98, -1) 2 +(58, 99, -1) 1 +(58, 100, -1) 0 +(59, 1, -1) 0 +(59, 2, -1) 0 +(59, 3, -1) 1 +(59, 4, -1) 2 +(59, 5, -1) 3 +(59, 6, -1) 4 +(59, 7, -1) 5 +(59, 8, -1) 6 +(59, 9, -1) 7 +(59, 10, -1) 8 +(59, 11, -1) 9 +(59, 12, -1) 10 +(59, 13, -1) 11 +(59, 14, -1) 12 +(59, 15, -1) 13 +(59, 16, -1) 14 +(59, 17, -1) 15 +(59, 18, -1) 16 +(59, 19, -1) 17 +(59, 20, -1) 18 +(59, 21, -1) 19 +(59, 22, -1) 20 +(59, 23, -1) 21 +(59, 24, -1) 22 +(59, 25, -1) 23 +(59, 26, -1) 24 +(59, 27, -1) 25 +(59, 28, -1) 25 +(59, 29, -1) 26 +(59, 30, -1) 27 +(59, 31, -1) 28 +(59, 32, -1) 29 +(59, 33, -1) 30 +(59, 34, -1) 31 +(59, 35, -1) 32 +(59, 36, -1) 33 +(59, 37, -1) 34 +(59, 38, -1) 34 +(59, 39, -1) 35 +(59, 40, -1) 36 +(59, 41, -1) 37 +(59, 42, -1) 38 +(59, 59, -1) 38 +(59, 60, -1) 37 +(59, 61, -1) 36 +(59, 62, -1) 35 +(59, 63, -1) 34 +(59, 64, -1) 34 +(59, 65, -1) 33 +(59, 66, -1) 32 +(59, 67, -1) 31 +(59, 68, -1) 30 +(59, 69, -1) 29 +(59, 70, -1) 28 +(59, 71, -1) 27 +(59, 72, -1) 26 +(59, 73, -1) 25 +(59, 74, -1) 25 +(59, 75, -1) 24 +(59, 76, -1) 23 +(59, 77, -1) 22 +(59, 78, -1) 21 +(59, 79, -1) 20 +(59, 80, -1) 19 +(59, 81, -1) 18 +(59, 82, -1) 17 +(59, 83, -1) 16 +(59, 84, -1) 15 +(59, 85, -1) 14 +(59, 86, -1) 13 +(59, 87, -1) 12 +(59, 88, -1) 11 +(59, 89, -1) 10 +(59, 90, -1) 9 +(59, 91, -1) 8 +(59, 92, -1) 7 +(59, 93, -1) 6 +(59, 94, -1) 5 +(59, 95, -1) 4 +(59, 96, -1) 3 +(59, 97, -1) 2 +(59, 98, -1) 1 +(59, 99, -1) 0 +(59, 100, -1) 0 +(60, 1, -1) 0 +(60, 2, -1) 0 +(60, 3, -1) 1 +(60, 4, -1) 2 +(60, 5, -1) 3 +(60, 6, -1) 4 +(60, 7, -1) 5 +(60, 8, -1) 6 +(60, 9, -1) 7 +(60, 10, -1) 8 +(60, 11, -1) 9 +(60, 12, -1) 10 +(60, 13, -1) 11 +(60, 14, -1) 12 +(60, 15, -1) 13 +(60, 16, -1) 14 +(60, 17, -1) 15 +(60, 18, -1) 16 +(60, 19, -1) 17 +(60, 20, -1) 18 +(60, 21, -1) 19 +(60, 22, -1) 20 +(60, 23, -1) 20 +(60, 24, -1) 21 +(60, 25, -1) 22 +(60, 26, -1) 23 +(60, 27, -1) 24 +(60, 28, -1) 25 +(60, 29, -1) 26 +(60, 30, -1) 27 +(60, 31, -1) 28 +(60, 32, -1) 29 +(60, 33, -1) 30 +(60, 34, -1) 30 +(60, 35, -1) 31 +(60, 36, -1) 32 +(60, 37, -1) 33 +(60, 38, -1) 34 +(60, 39, -1) 35 +(60, 40, -1) 35 +(60, 41, -1) 36 +(60, 42, -1) 37 +(60, 43, -1) 37 +(60, 58, -1) 37 +(60, 59, -1) 37 +(60, 60, -1) 36 +(60, 61, -1) 35 +(60, 62, -1) 35 +(60, 63, -1) 34 +(60, 64, -1) 33 +(60, 65, -1) 32 +(60, 66, -1) 31 +(60, 67, -1) 30 +(60, 68, -1) 30 +(60, 69, -1) 29 +(60, 70, -1) 28 +(60, 71, -1) 27 +(60, 72, -1) 26 +(60, 73, -1) 25 +(60, 74, -1) 24 +(60, 75, -1) 23 +(60, 76, -1) 22 +(60, 77, -1) 21 +(60, 78, -1) 20 +(60, 79, -1) 20 +(60, 80, -1) 19 +(60, 81, -1) 18 +(60, 82, -1) 17 +(60, 83, -1) 16 +(60, 84, -1) 15 +(60, 85, -1) 14 +(60, 86, -1) 13 +(60, 87, -1) 12 +(60, 88, -1) 11 +(60, 89, -1) 10 +(60, 90, -1) 9 +(60, 91, -1) 8 +(60, 92, -1) 7 +(60, 93, -1) 6 +(60, 94, -1) 5 +(60, 95, -1) 4 +(60, 96, -1) 3 +(60, 97, -1) 2 +(60, 98, -1) 1 +(60, 99, -1) 0 +(60, 100, -1) 0 +(61, 4, -1) 2 +(61, 5, -1) 3 +(61, 6, -1) 4 +(61, 7, -1) 5 +(61, 8, -1) 6 +(61, 9, -1) 7 +(61, 10, -1) 8 +(61, 11, -1) 9 +(61, 12, -1) 10 +(61, 13, -1) 11 +(61, 14, -1) 12 +(61, 15, -1) 13 +(61, 16, -1) 14 +(61, 17, -1) 15 +(61, 18, -1) 16 +(61, 19, -1) 16 +(61, 20, -1) 17 +(61, 21, -1) 18 +(61, 22, -1) 19 +(61, 23, -1) 20 +(61, 24, -1) 21 +(61, 25, -1) 22 +(61, 26, -1) 23 +(61, 27, -1) 24 +(61, 28, -1) 25 +(61, 29, -1) 26 +(61, 30, -1) 27 +(61, 31, -1) 27 +(61, 32, -1) 28 +(61, 33, -1) 29 +(61, 34, -1) 30 +(61, 35, -1) 31 +(61, 36, -1) 32 +(61, 37, -1) 32 +(61, 38, -1) 33 +(61, 39, -1) 34 +(61, 40, -1) 35 +(61, 41, -1) 35 +(61, 42, -1) 36 +(61, 43, -1) 37 +(61, 44, -1) 37 +(61, 45, -1) 38 +(61, 56, -1) 38 +(61, 57, -1) 37 +(61, 58, -1) 37 +(61, 59, -1) 36 +(61, 60, -1) 35 +(61, 61, -1) 35 +(61, 62, -1) 34 +(61, 63, -1) 33 +(61, 64, -1) 32 +(61, 65, -1) 32 +(61, 66, -1) 31 +(61, 67, -1) 30 +(61, 68, -1) 29 +(61, 69, -1) 28 +(61, 70, -1) 27 +(61, 71, -1) 27 +(61, 72, -1) 26 +(61, 73, -1) 25 +(61, 74, -1) 24 +(61, 75, -1) 23 +(61, 76, -1) 22 +(61, 77, -1) 21 +(61, 78, -1) 20 +(61, 79, -1) 19 +(61, 80, -1) 18 +(61, 81, -1) 17 +(61, 82, -1) 16 +(61, 83, -1) 16 +(61, 84, -1) 15 +(61, 85, -1) 14 +(61, 86, -1) 13 +(61, 87, -1) 12 +(61, 88, -1) 11 +(61, 89, -1) 10 +(61, 90, -1) 9 +(61, 91, -1) 8 +(61, 92, -1) 7 +(61, 93, -1) 6 +(61, 94, -1) 5 +(61, 95, -1) 4 +(61, 96, -1) 3 +(61, 97, -1) 2 +(62, 4, -1) 2 +(62, 5, -1) 3 +(62, 6, -1) 4 +(62, 7, -1) 5 +(62, 8, -1) 6 +(62, 9, -1) 7 +(62, 10, -1) 8 +(62, 11, -1) 9 +(62, 12, -1) 9 +(62, 13, -1) 10 +(62, 14, -1) 11 +(62, 15, -1) 12 +(62, 16, -1) 13 +(62, 17, -1) 14 +(62, 18, -1) 15 +(62, 19, -1) 16 +(62, 20, -1) 17 +(62, 21, -1) 18 +(62, 22, -1) 19 +(62, 23, -1) 20 +(62, 24, -1) 21 +(62, 25, -1) 22 +(62, 26, -1) 23 +(62, 27, -1) 23 +(62, 28, -1) 24 +(62, 29, -1) 25 +(62, 30, -1) 26 +(62, 31, -1) 27 +(62, 32, -1) 28 +(62, 33, -1) 29 +(62, 34, -1) 29 +(62, 35, -1) 30 +(62, 36, -1) 31 +(62, 37, -1) 32 +(62, 38, -1) 33 +(62, 39, -1) 33 +(62, 40, -1) 34 +(62, 41, -1) 35 +(62, 42, -1) 35 +(62, 43, -1) 36 +(62, 44, -1) 36 +(62, 45, -1) 37 +(62, 46, -1) 37 +(62, 47, -1) 37 +(62, 48, -1) 38 +(62, 49, -1) 38 +(62, 50, -1) 38 +(62, 51, -1) 38 +(62, 52, -1) 38 +(62, 53, -1) 38 +(62, 54, -1) 37 +(62, 55, -1) 37 +(62, 56, -1) 37 +(62, 57, -1) 36 +(62, 58, -1) 36 +(62, 59, -1) 35 +(62, 60, -1) 35 +(62, 61, -1) 34 +(62, 62, -1) 33 +(62, 63, -1) 33 +(62, 64, -1) 32 +(62, 65, -1) 31 +(62, 66, -1) 30 +(62, 67, -1) 29 +(62, 68, -1) 29 +(62, 69, -1) 28 +(62, 70, -1) 27 +(62, 71, -1) 26 +(62, 72, -1) 25 +(62, 73, -1) 24 +(62, 74, -1) 23 +(62, 75, -1) 23 +(62, 76, -1) 22 +(62, 77, -1) 21 +(62, 78, -1) 20 +(62, 79, -1) 19 +(62, 80, -1) 18 +(62, 81, -1) 17 +(62, 82, -1) 16 +(62, 83, -1) 15 +(62, 84, -1) 14 +(62, 85, -1) 13 +(62, 86, -1) 12 +(62, 87, -1) 11 +(62, 88, -1) 10 +(62, 89, -1) 9 +(62, 90, -1) 9 +(62, 91, -1) 8 +(62, 92, -1) 7 +(62, 93, -1) 6 +(62, 94, -1) 5 +(62, 95, -1) 4 +(62, 96, -1) 3 +(62, 97, -1) 2 +(63, 4, -1) 2 +(63, 5, -1) 3 +(63, 6, -1) 3 +(63, 7, -1) 4 +(63, 8, -1) 5 +(63, 9, -1) 6 +(63, 10, -1) 7 +(63, 11, -1) 8 +(63, 12, -1) 9 +(63, 13, -1) 10 +(63, 14, -1) 11 +(63, 15, -1) 12 +(63, 16, -1) 13 +(63, 17, -1) 14 +(63, 18, -1) 15 +(63, 19, -1) 16 +(63, 20, -1) 17 +(63, 21, -1) 18 +(63, 22, -1) 18 +(63, 23, -1) 19 +(63, 24, -1) 20 +(63, 25, -1) 21 +(63, 26, -1) 22 +(63, 27, -1) 23 +(63, 28, -1) 24 +(63, 29, -1) 25 +(63, 30, -1) 26 +(63, 31, -1) 26 +(63, 32, -1) 27 +(63, 33, -1) 28 +(63, 34, -1) 29 +(63, 35, -1) 30 +(63, 36, -1) 30 +(63, 37, -1) 31 +(63, 38, -1) 32 +(63, 39, -1) 33 +(63, 40, -1) 33 +(63, 41, -1) 34 +(63, 42, -1) 34 +(63, 43, -1) 35 +(63, 44, -1) 35 +(63, 45, -1) 36 +(63, 46, -1) 36 +(63, 47, -1) 37 +(63, 48, -1) 37 +(63, 49, -1) 37 +(63, 50, -1) 37 +(63, 51, -1) 37 +(63, 52, -1) 37 +(63, 53, -1) 37 +(63, 54, -1) 37 +(63, 55, -1) 36 +(63, 56, -1) 36 +(63, 57, -1) 35 +(63, 58, -1) 35 +(63, 59, -1) 34 +(63, 60, -1) 34 +(63, 61, -1) 33 +(63, 62, -1) 33 +(63, 63, -1) 32 +(63, 64, -1) 31 +(63, 65, -1) 30 +(63, 66, -1) 30 +(63, 67, -1) 29 +(63, 68, -1) 28 +(63, 69, -1) 27 +(63, 70, -1) 26 +(63, 71, -1) 26 +(63, 72, -1) 25 +(63, 73, -1) 24 +(63, 74, -1) 23 +(63, 75, -1) 22 +(63, 76, -1) 21 +(63, 77, -1) 20 +(63, 78, -1) 19 +(63, 79, -1) 18 +(63, 80, -1) 18 +(63, 81, -1) 17 +(63, 82, -1) 16 +(63, 83, -1) 15 +(63, 84, -1) 14 +(63, 85, -1) 13 +(63, 86, -1) 12 +(63, 87, -1) 11 +(63, 88, -1) 10 +(63, 89, -1) 9 +(63, 90, -1) 8 +(63, 91, -1) 7 +(63, 92, -1) 6 +(63, 93, -1) 5 +(63, 94, -1) 4 +(63, 95, -1) 3 +(63, 96, -1) 3 +(63, 97, -1) 2 +(64, 4, -1) 1 +(64, 5, -1) 2 +(64, 6, -1) 3 +(64, 7, -1) 4 +(64, 8, -1) 5 +(64, 9, -1) 6 +(64, 10, -1) 7 +(64, 11, -1) 8 +(64, 12, -1) 9 +(64, 13, -1) 10 +(64, 14, -1) 11 +(64, 15, -1) 12 +(64, 16, -1) 13 +(64, 17, -1) 14 +(64, 18, -1) 14 +(64, 19, -1) 15 +(64, 20, -1) 16 +(64, 21, -1) 17 +(64, 22, -1) 18 +(64, 23, -1) 19 +(64, 24, -1) 20 +(64, 25, -1) 21 +(64, 26, -1) 22 +(64, 27, -1) 22 +(64, 28, -1) 23 +(64, 29, -1) 24 +(64, 30, -1) 25 +(64, 31, -1) 26 +(64, 32, -1) 27 +(64, 33, -1) 27 +(64, 34, -1) 28 +(64, 35, -1) 29 +(64, 36, -1) 30 +(64, 37, -1) 30 +(64, 38, -1) 31 +(64, 39, -1) 32 +(64, 40, -1) 32 +(64, 41, -1) 33 +(64, 42, -1) 34 +(64, 43, -1) 34 +(64, 44, -1) 35 +(64, 45, -1) 35 +(64, 46, -1) 35 +(64, 47, -1) 36 +(64, 48, -1) 36 +(64, 49, -1) 36 +(64, 50, -1) 36 +(64, 51, -1) 36 +(64, 52, -1) 36 +(64, 53, -1) 36 +(64, 54, -1) 36 +(64, 55, -1) 35 +(64, 56, -1) 35 +(64, 57, -1) 35 +(64, 58, -1) 34 +(64, 59, -1) 34 +(64, 60, -1) 33 +(64, 61, -1) 32 +(64, 62, -1) 32 +(64, 63, -1) 31 +(64, 64, -1) 30 +(64, 65, -1) 30 +(64, 66, -1) 29 +(64, 67, -1) 28 +(64, 68, -1) 27 +(64, 69, -1) 27 +(64, 70, -1) 26 +(64, 71, -1) 25 +(64, 72, -1) 24 +(64, 73, -1) 23 +(64, 74, -1) 22 +(64, 75, -1) 22 +(64, 76, -1) 21 +(64, 77, -1) 20 +(64, 78, -1) 19 +(64, 79, -1) 18 +(64, 80, -1) 17 +(64, 81, -1) 16 +(64, 82, -1) 15 +(64, 83, -1) 14 +(64, 84, -1) 14 +(64, 85, -1) 13 +(64, 86, -1) 12 +(64, 87, -1) 11 +(64, 88, -1) 10 +(64, 89, -1) 9 +(64, 90, -1) 8 +(64, 91, -1) 7 +(64, 92, -1) 6 +(64, 93, -1) 5 +(64, 94, -1) 4 +(64, 95, -1) 3 +(64, 96, -1) 2 +(64, 97, -1) 1 +(65, 4, -1) 1 +(65, 5, -1) 2 +(65, 6, -1) 3 +(65, 7, -1) 4 +(65, 8, -1) 5 +(65, 9, -1) 6 +(65, 10, -1) 7 +(65, 11, -1) 8 +(65, 12, -1) 8 +(65, 13, -1) 9 +(65, 14, -1) 10 +(65, 15, -1) 11 +(65, 16, -1) 12 +(65, 17, -1) 13 +(65, 18, -1) 14 +(65, 19, -1) 15 +(65, 20, -1) 16 +(65, 21, -1) 17 +(65, 22, -1) 18 +(65, 23, -1) 19 +(65, 24, -1) 19 +(65, 25, -1) 20 +(65, 26, -1) 21 +(65, 27, -1) 22 +(65, 28, -1) 23 +(65, 29, -1) 24 +(65, 30, -1) 24 +(65, 31, -1) 25 +(65, 32, -1) 26 +(65, 33, -1) 27 +(65, 34, -1) 28 +(65, 35, -1) 28 +(65, 36, -1) 29 +(65, 37, -1) 30 +(65, 38, -1) 30 +(65, 39, -1) 31 +(65, 40, -1) 32 +(65, 41, -1) 32 +(65, 42, -1) 33 +(65, 43, -1) 33 +(65, 44, -1) 34 +(65, 45, -1) 34 +(65, 46, -1) 34 +(65, 47, -1) 35 +(65, 48, -1) 35 +(65, 49, -1) 35 +(65, 50, -1) 35 +(65, 51, -1) 35 +(65, 52, -1) 35 +(65, 53, -1) 35 +(65, 54, -1) 35 +(65, 55, -1) 34 +(65, 56, -1) 34 +(65, 57, -1) 34 +(65, 58, -1) 33 +(65, 59, -1) 33 +(65, 60, -1) 32 +(65, 61, -1) 32 +(65, 62, -1) 31 +(65, 63, -1) 30 +(65, 64, -1) 30 +(65, 65, -1) 29 +(65, 66, -1) 28 +(65, 67, -1) 28 +(65, 68, -1) 27 +(65, 69, -1) 26 +(65, 70, -1) 25 +(65, 71, -1) 24 +(65, 72, -1) 24 +(65, 73, -1) 23 +(65, 74, -1) 22 +(65, 75, -1) 21 +(65, 76, -1) 20 +(65, 77, -1) 19 +(65, 78, -1) 19 +(65, 79, -1) 18 +(65, 80, -1) 17 +(65, 81, -1) 16 +(65, 82, -1) 15 +(65, 83, -1) 14 +(65, 84, -1) 13 +(65, 85, -1) 12 +(65, 86, -1) 11 +(65, 87, -1) 10 +(65, 88, -1) 9 +(65, 89, -1) 8 +(65, 90, -1) 8 +(65, 91, -1) 7 +(65, 92, -1) 6 +(65, 93, -1) 5 +(65, 94, -1) 4 +(65, 95, -1) 3 +(65, 96, -1) 2 +(65, 97, -1) 1 +(66, 6, -1) 3 +(66, 7, -1) 4 +(66, 8, -1) 5 +(66, 9, -1) 6 +(66, 10, -1) 6 +(66, 11, -1) 7 +(66, 12, -1) 8 +(66, 13, -1) 9 +(66, 14, -1) 10 +(66, 15, -1) 11 +(66, 16, -1) 12 +(66, 17, -1) 13 +(66, 18, -1) 14 +(66, 19, -1) 15 +(66, 20, -1) 16 +(66, 21, -1) 16 +(66, 22, -1) 17 +(66, 23, -1) 18 +(66, 24, -1) 19 +(66, 25, -1) 20 +(66, 26, -1) 21 +(66, 27, -1) 21 +(66, 28, -1) 22 +(66, 29, -1) 23 +(66, 30, -1) 24 +(66, 31, -1) 25 +(66, 32, -1) 25 +(66, 33, -1) 26 +(66, 34, -1) 27 +(66, 35, -1) 28 +(66, 36, -1) 28 +(66, 37, -1) 29 +(66, 38, -1) 30 +(66, 39, -1) 30 +(66, 40, -1) 31 +(66, 41, -1) 31 +(66, 42, -1) 32 +(66, 43, -1) 32 +(66, 44, -1) 33 +(66, 45, -1) 33 +(66, 46, -1) 33 +(66, 47, -1) 34 +(66, 48, -1) 34 +(66, 49, -1) 34 +(66, 50, -1) 34 +(66, 51, -1) 34 +(66, 52, -1) 34 +(66, 53, -1) 34 +(66, 54, -1) 34 +(66, 55, -1) 33 +(66, 56, -1) 33 +(66, 57, -1) 33 +(66, 58, -1) 32 +(66, 59, -1) 32 +(66, 60, -1) 31 +(66, 61, -1) 31 +(66, 62, -1) 30 +(66, 63, -1) 30 +(66, 64, -1) 29 +(66, 65, -1) 28 +(66, 66, -1) 28 +(66, 67, -1) 27 +(66, 68, -1) 26 +(66, 69, -1) 25 +(66, 70, -1) 25 +(66, 71, -1) 24 +(66, 72, -1) 23 +(66, 73, -1) 22 +(66, 74, -1) 21 +(66, 75, -1) 21 +(66, 76, -1) 20 +(66, 77, -1) 19 +(66, 78, -1) 18 +(66, 79, -1) 17 +(66, 80, -1) 16 +(66, 81, -1) 16 +(66, 82, -1) 15 +(66, 83, -1) 14 +(66, 84, -1) 13 +(66, 85, -1) 12 +(66, 86, -1) 11 +(66, 87, -1) 10 +(66, 88, -1) 9 +(66, 89, -1) 8 +(66, 90, -1) 7 +(66, 91, -1) 6 +(66, 92, -1) 6 +(66, 93, -1) 5 +(66, 94, -1) 4 +(66, 95, -1) 3 +(67, 6, -1) 2 +(67, 7, -1) 3 +(67, 8, -1) 4 +(67, 9, -1) 5 +(67, 10, -1) 6 +(67, 11, -1) 7 +(67, 12, -1) 8 +(67, 13, -1) 9 +(67, 14, -1) 10 +(67, 15, -1) 11 +(67, 16, -1) 11 +(67, 17, -1) 12 +(67, 18, -1) 13 +(67, 19, -1) 14 +(67, 20, -1) 15 +(67, 21, -1) 16 +(67, 22, -1) 17 +(67, 23, -1) 18 +(67, 24, -1) 18 +(67, 25, -1) 19 +(67, 26, -1) 20 +(67, 27, -1) 21 +(67, 28, -1) 22 +(67, 29, -1) 23 +(67, 30, -1) 23 +(67, 31, -1) 24 +(67, 32, -1) 25 +(67, 33, -1) 26 +(67, 34, -1) 26 +(67, 35, -1) 27 +(67, 36, -1) 28 +(67, 37, -1) 28 +(67, 38, -1) 29 +(67, 39, -1) 29 +(67, 40, -1) 30 +(67, 41, -1) 30 +(67, 42, -1) 31 +(67, 43, -1) 31 +(67, 44, -1) 32 +(67, 45, -1) 32 +(67, 46, -1) 32 +(67, 47, -1) 33 +(67, 48, -1) 33 +(67, 49, -1) 33 +(67, 50, -1) 33 +(67, 51, -1) 33 +(67, 52, -1) 33 +(67, 53, -1) 33 +(67, 54, -1) 33 +(67, 55, -1) 32 +(67, 56, -1) 32 +(67, 57, -1) 32 +(67, 58, -1) 31 +(67, 59, -1) 31 +(67, 60, -1) 30 +(67, 61, -1) 30 +(67, 62, -1) 29 +(67, 63, -1) 29 +(67, 64, -1) 28 +(67, 65, -1) 28 +(67, 66, -1) 27 +(67, 67, -1) 26 +(67, 68, -1) 26 +(67, 69, -1) 25 +(67, 70, -1) 24 +(67, 71, -1) 23 +(67, 72, -1) 23 +(67, 73, -1) 22 +(67, 74, -1) 21 +(67, 75, -1) 20 +(67, 76, -1) 19 +(67, 77, -1) 18 +(67, 78, -1) 18 +(67, 79, -1) 17 +(67, 80, -1) 16 +(67, 81, -1) 15 +(67, 82, -1) 14 +(67, 83, -1) 13 +(67, 84, -1) 12 +(67, 85, -1) 11 +(67, 86, -1) 11 +(67, 87, -1) 10 +(67, 88, -1) 9 +(67, 89, -1) 8 +(67, 90, -1) 7 +(67, 91, -1) 6 +(67, 92, -1) 5 +(67, 93, -1) 4 +(67, 94, -1) 3 +(67, 95, -1) 2 +(68, 6, -1) 2 +(68, 7, -1) 3 +(68, 8, -1) 4 +(68, 9, -1) 5 +(68, 10, -1) 6 +(68, 11, -1) 7 +(68, 12, -1) 7 +(68, 13, -1) 8 +(68, 14, -1) 9 +(68, 15, -1) 10 +(68, 16, -1) 11 +(68, 17, -1) 12 +(68, 18, -1) 13 +(68, 19, -1) 14 +(68, 20, -1) 15 +(68, 21, -1) 15 +(68, 22, -1) 16 +(68, 23, -1) 17 +(68, 24, -1) 18 +(68, 25, -1) 19 +(68, 26, -1) 20 +(68, 27, -1) 20 +(68, 28, -1) 21 +(68, 29, -1) 22 +(68, 30, -1) 23 +(68, 31, -1) 23 +(68, 32, -1) 24 +(68, 33, -1) 25 +(68, 34, -1) 26 +(68, 35, -1) 26 +(68, 36, -1) 27 +(68, 37, -1) 27 +(68, 38, -1) 28 +(68, 39, -1) 29 +(68, 40, -1) 29 +(68, 41, -1) 30 +(68, 42, -1) 30 +(68, 43, -1) 30 +(68, 44, -1) 31 +(68, 45, -1) 31 +(68, 46, -1) 31 +(68, 47, -1) 32 +(68, 48, -1) 32 +(68, 49, -1) 32 +(68, 50, -1) 32 +(68, 51, -1) 32 +(68, 52, -1) 32 +(68, 53, -1) 32 +(68, 54, -1) 32 +(68, 55, -1) 31 +(68, 56, -1) 31 +(68, 57, -1) 31 +(68, 58, -1) 30 +(68, 59, -1) 30 +(68, 60, -1) 30 +(68, 61, -1) 29 +(68, 62, -1) 29 +(68, 63, -1) 28 +(68, 64, -1) 27 +(68, 65, -1) 27 +(68, 66, -1) 26 +(68, 67, -1) 26 +(68, 68, -1) 25 +(68, 69, -1) 24 +(68, 70, -1) 23 +(68, 71, -1) 23 +(68, 72, -1) 22 +(68, 73, -1) 21 +(68, 74, -1) 20 +(68, 75, -1) 20 +(68, 76, -1) 19 +(68, 77, -1) 18 +(68, 78, -1) 17 +(68, 79, -1) 16 +(68, 80, -1) 15 +(68, 81, -1) 15 +(68, 82, -1) 14 +(68, 83, -1) 13 +(68, 84, -1) 12 +(68, 85, -1) 11 +(68, 86, -1) 10 +(68, 87, -1) 9 +(68, 88, -1) 8 +(68, 89, -1) 7 +(68, 90, -1) 7 +(68, 91, -1) 6 +(68, 92, -1) 5 +(68, 93, -1) 4 +(68, 94, -1) 3 +(68, 95, -1) 2 +(69, 6, -1) 2 +(69, 7, -1) 2 +(69, 8, -1) 3 +(69, 9, -1) 4 +(69, 10, -1) 5 +(69, 11, -1) 6 +(69, 12, -1) 7 +(69, 13, -1) 8 +(69, 14, -1) 9 +(69, 15, -1) 10 +(69, 16, -1) 11 +(69, 17, -1) 11 +(69, 18, -1) 12 +(69, 19, -1) 13 +(69, 20, -1) 14 +(69, 21, -1) 15 +(69, 22, -1) 16 +(69, 23, -1) 17 +(69, 24, -1) 17 +(69, 25, -1) 18 +(69, 26, -1) 19 +(69, 27, -1) 20 +(69, 28, -1) 20 +(69, 29, -1) 21 +(69, 30, -1) 22 +(69, 31, -1) 23 +(69, 32, -1) 23 +(69, 33, -1) 24 +(69, 34, -1) 25 +(69, 35, -1) 25 +(69, 36, -1) 26 +(69, 37, -1) 27 +(69, 38, -1) 27 +(69, 39, -1) 28 +(69, 40, -1) 28 +(69, 41, -1) 29 +(69, 42, -1) 29 +(69, 43, -1) 30 +(69, 44, -1) 30 +(69, 45, -1) 30 +(69, 46, -1) 30 +(69, 47, -1) 31 +(69, 48, -1) 31 +(69, 49, -1) 31 +(69, 50, -1) 31 +(69, 51, -1) 31 +(69, 52, -1) 31 +(69, 53, -1) 31 +(69, 54, -1) 31 +(69, 55, -1) 30 +(69, 56, -1) 30 +(69, 57, -1) 30 +(69, 58, -1) 30 +(69, 59, -1) 29 +(69, 60, -1) 29 +(69, 61, -1) 28 +(69, 62, -1) 28 +(69, 63, -1) 27 +(69, 64, -1) 27 +(69, 65, -1) 26 +(69, 66, -1) 25 +(69, 67, -1) 25 +(69, 68, -1) 24 +(69, 69, -1) 23 +(69, 70, -1) 23 +(69, 71, -1) 22 +(69, 72, -1) 21 +(69, 73, -1) 20 +(69, 74, -1) 20 +(69, 75, -1) 19 +(69, 76, -1) 18 +(69, 77, -1) 17 +(69, 78, -1) 17 +(69, 79, -1) 16 +(69, 80, -1) 15 +(69, 81, -1) 14 +(69, 82, -1) 13 +(69, 83, -1) 12 +(69, 84, -1) 11 +(69, 85, -1) 11 +(69, 86, -1) 10 +(69, 87, -1) 9 +(69, 88, -1) 8 +(69, 89, -1) 7 +(69, 90, -1) 6 +(69, 91, -1) 5 +(69, 92, -1) 4 +(69, 93, -1) 3 +(69, 94, -1) 2 +(69, 95, -1) 2 +(70, 6, -1) 1 +(70, 7, -1) 2 +(70, 8, -1) 3 +(70, 9, -1) 4 +(70, 10, -1) 5 +(70, 11, -1) 6 +(70, 12, -1) 7 +(70, 13, -1) 7 +(70, 14, -1) 8 +(70, 15, -1) 9 +(70, 16, -1) 10 +(70, 17, -1) 11 +(70, 18, -1) 12 +(70, 19, -1) 13 +(70, 20, -1) 13 +(70, 21, -1) 14 +(70, 22, -1) 15 +(70, 23, -1) 16 +(70, 24, -1) 17 +(70, 25, -1) 18 +(70, 26, -1) 18 +(70, 27, -1) 19 +(70, 28, -1) 20 +(70, 29, -1) 21 +(70, 30, -1) 21 +(70, 31, -1) 22 +(70, 32, -1) 23 +(70, 33, -1) 23 +(70, 34, -1) 24 +(70, 35, -1) 25 +(70, 36, -1) 25 +(70, 37, -1) 26 +(70, 38, -1) 26 +(70, 39, -1) 27 +(70, 40, -1) 27 +(70, 41, -1) 28 +(70, 42, -1) 28 +(70, 43, -1) 29 +(70, 44, -1) 29 +(70, 45, -1) 29 +(70, 46, -1) 30 +(70, 47, -1) 30 +(70, 48, -1) 30 +(70, 49, -1) 30 +(70, 50, -1) 30 +(70, 51, -1) 30 +(70, 52, -1) 30 +(70, 53, -1) 30 +(70, 54, -1) 30 +(70, 55, -1) 30 +(70, 56, -1) 29 +(70, 57, -1) 29 +(70, 58, -1) 29 +(70, 59, -1) 28 +(70, 60, -1) 28 +(70, 61, -1) 27 +(70, 62, -1) 27 +(70, 63, -1) 26 +(70, 64, -1) 26 +(70, 65, -1) 25 +(70, 66, -1) 25 +(70, 67, -1) 24 +(70, 68, -1) 23 +(70, 69, -1) 23 +(70, 70, -1) 22 +(70, 71, -1) 21 +(70, 72, -1) 21 +(70, 73, -1) 20 +(70, 74, -1) 19 +(70, 75, -1) 18 +(70, 76, -1) 18 +(70, 77, -1) 17 +(70, 78, -1) 16 +(70, 79, -1) 15 +(70, 80, -1) 14 +(70, 81, -1) 13 +(70, 82, -1) 13 +(70, 83, -1) 12 +(70, 84, -1) 11 +(70, 85, -1) 10 +(70, 86, -1) 9 +(70, 87, -1) 8 +(70, 88, -1) 7 +(70, 89, -1) 7 +(70, 90, -1) 6 +(70, 91, -1) 5 +(70, 92, -1) 4 +(70, 93, -1) 3 +(70, 94, -1) 2 +(70, 95, -1) 1 +(71, 6, -1) 1 +(71, 7, -1) 2 +(71, 8, -1) 3 +(71, 9, -1) 4 +(71, 10, -1) 5 +(71, 11, -1) 5 +(71, 12, -1) 6 +(71, 13, -1) 7 +(71, 14, -1) 8 +(71, 15, -1) 9 +(71, 16, -1) 10 +(71, 17, -1) 11 +(71, 18, -1) 11 +(71, 19, -1) 12 +(71, 20, -1) 13 +(71, 21, -1) 14 +(71, 22, -1) 15 +(71, 23, -1) 15 +(71, 24, -1) 16 +(71, 25, -1) 17 +(71, 26, -1) 18 +(71, 27, -1) 19 +(71, 28, -1) 19 +(71, 29, -1) 20 +(71, 30, -1) 21 +(71, 31, -1) 21 +(71, 32, -1) 22 +(71, 33, -1) 23 +(71, 34, -1) 23 +(71, 35, -1) 24 +(71, 36, -1) 24 +(71, 37, -1) 25 +(71, 38, -1) 26 +(71, 39, -1) 26 +(71, 40, -1) 27 +(71, 41, -1) 27 +(71, 42, -1) 27 +(71, 43, -1) 28 +(71, 44, -1) 28 +(71, 45, -1) 28 +(71, 46, -1) 29 +(71, 47, -1) 29 +(71, 48, -1) 29 +(71, 49, -1) 29 +(71, 50, -1) 29 +(71, 51, -1) 29 +(71, 52, -1) 29 +(71, 53, -1) 29 +(71, 54, -1) 29 +(71, 55, -1) 29 +(71, 56, -1) 28 +(71, 57, -1) 28 +(71, 58, -1) 28 +(71, 59, -1) 27 +(71, 60, -1) 27 +(71, 61, -1) 27 +(71, 62, -1) 26 +(71, 63, -1) 26 +(71, 64, -1) 25 +(71, 65, -1) 24 +(71, 66, -1) 24 +(71, 67, -1) 23 +(71, 68, -1) 23 +(71, 69, -1) 22 +(71, 70, -1) 21 +(71, 71, -1) 21 +(71, 72, -1) 20 +(71, 73, -1) 19 +(71, 74, -1) 19 +(71, 75, -1) 18 +(71, 76, -1) 17 +(71, 77, -1) 16 +(71, 78, -1) 15 +(71, 79, -1) 15 +(71, 80, -1) 14 +(71, 81, -1) 13 +(71, 82, -1) 12 +(71, 83, -1) 11 +(71, 84, -1) 11 +(71, 85, -1) 10 +(71, 86, -1) 9 +(71, 87, -1) 8 +(71, 88, -1) 7 +(71, 89, -1) 6 +(71, 90, -1) 5 +(71, 91, -1) 5 +(71, 92, -1) 4 +(71, 93, -1) 3 +(71, 94, -1) 2 +(71, 95, -1) 1 +(72, 6, -1) 1 +(72, 7, -1) 1 +(72, 8, -1) 2 +(72, 9, -1) 3 +(72, 10, -1) 4 +(72, 11, -1) 5 +(72, 12, -1) 6 +(72, 13, -1) 7 +(72, 14, -1) 7 +(72, 15, -1) 8 +(72, 16, -1) 9 +(72, 17, -1) 10 +(72, 18, -1) 11 +(72, 19, -1) 12 +(72, 20, -1) 12 +(72, 21, -1) 13 +(72, 22, -1) 14 +(72, 23, -1) 15 +(72, 24, -1) 16 +(72, 25, -1) 16 +(72, 26, -1) 17 +(72, 27, -1) 18 +(72, 28, -1) 19 +(72, 29, -1) 19 +(72, 30, -1) 20 +(72, 31, -1) 21 +(72, 32, -1) 21 +(72, 33, -1) 22 +(72, 34, -1) 23 +(72, 35, -1) 23 +(72, 36, -1) 24 +(72, 37, -1) 24 +(72, 38, -1) 25 +(72, 39, -1) 25 +(72, 40, -1) 26 +(72, 41, -1) 26 +(72, 42, -1) 26 +(72, 43, -1) 27 +(72, 44, -1) 27 +(72, 45, -1) 27 +(72, 46, -1) 28 +(72, 47, -1) 28 +(72, 48, -1) 28 +(72, 49, -1) 28 +(72, 50, -1) 28 +(72, 51, -1) 28 +(72, 52, -1) 28 +(72, 53, -1) 28 +(72, 54, -1) 28 +(72, 55, -1) 28 +(72, 56, -1) 27 +(72, 57, -1) 27 +(72, 58, -1) 27 +(72, 59, -1) 26 +(72, 60, -1) 26 +(72, 61, -1) 26 +(72, 62, -1) 25 +(72, 63, -1) 25 +(72, 64, -1) 24 +(72, 65, -1) 24 +(72, 66, -1) 23 +(72, 67, -1) 23 +(72, 68, -1) 22 +(72, 69, -1) 21 +(72, 70, -1) 21 +(72, 71, -1) 20 +(72, 72, -1) 19 +(72, 73, -1) 19 +(72, 74, -1) 18 +(72, 75, -1) 17 +(72, 76, -1) 16 +(72, 77, -1) 16 +(72, 78, -1) 15 +(72, 79, -1) 14 +(72, 80, -1) 13 +(72, 81, -1) 12 +(72, 82, -1) 12 +(72, 83, -1) 11 +(72, 84, -1) 10 +(72, 85, -1) 9 +(72, 86, -1) 8 +(72, 87, -1) 7 +(72, 88, -1) 7 +(72, 89, -1) 6 +(72, 90, -1) 5 +(72, 91, -1) 4 +(72, 92, -1) 3 +(72, 93, -1) 2 +(72, 94, -1) 1 +(72, 95, -1) 1 +(73, 6, -1) 0 +(73, 7, -1) 1 +(73, 8, -1) 2 +(73, 9, -1) 3 +(73, 10, -1) 4 +(73, 11, -1) 4 +(73, 12, -1) 5 +(73, 13, -1) 6 +(73, 14, -1) 7 +(73, 15, -1) 8 +(73, 16, -1) 9 +(73, 17, -1) 9 +(73, 18, -1) 10 +(73, 19, -1) 11 +(73, 20, -1) 12 +(73, 21, -1) 13 +(73, 22, -1) 13 +(73, 23, -1) 14 +(73, 24, -1) 15 +(73, 25, -1) 16 +(73, 26, -1) 16 +(73, 27, -1) 17 +(73, 28, -1) 18 +(73, 29, -1) 19 +(73, 30, -1) 19 +(73, 31, -1) 20 +(73, 32, -1) 20 +(73, 33, -1) 21 +(73, 34, -1) 22 +(73, 35, -1) 22 +(73, 36, -1) 23 +(73, 37, -1) 23 +(73, 38, -1) 24 +(73, 39, -1) 24 +(73, 40, -1) 25 +(73, 41, -1) 25 +(73, 42, -1) 25 +(73, 43, -1) 26 +(73, 44, -1) 26 +(73, 45, -1) 26 +(73, 46, -1) 27 +(73, 47, -1) 27 +(73, 48, -1) 27 +(73, 49, -1) 27 +(73, 50, -1) 27 +(73, 51, -1) 27 +(73, 52, -1) 27 +(73, 53, -1) 27 +(73, 54, -1) 27 +(73, 55, -1) 27 +(73, 56, -1) 26 +(73, 57, -1) 26 +(73, 58, -1) 26 +(73, 59, -1) 25 +(73, 60, -1) 25 +(73, 61, -1) 25 +(73, 62, -1) 24 +(73, 63, -1) 24 +(73, 64, -1) 23 +(73, 65, -1) 23 +(73, 66, -1) 22 +(73, 67, -1) 22 +(73, 68, -1) 21 +(73, 69, -1) 20 +(73, 70, -1) 20 +(73, 71, -1) 19 +(73, 72, -1) 19 +(73, 73, -1) 18 +(73, 74, -1) 17 +(73, 75, -1) 16 +(73, 76, -1) 16 +(73, 77, -1) 15 +(73, 78, -1) 14 +(73, 79, -1) 13 +(73, 80, -1) 13 +(73, 81, -1) 12 +(73, 82, -1) 11 +(73, 83, -1) 10 +(73, 84, -1) 9 +(73, 85, -1) 9 +(73, 86, -1) 8 +(73, 87, -1) 7 +(73, 88, -1) 6 +(73, 89, -1) 5 +(73, 90, -1) 4 +(73, 91, -1) 4 +(73, 92, -1) 3 +(73, 93, -1) 2 +(73, 94, -1) 1 +(73, 95, -1) 0 +(74, 6, -1) 0 +(74, 7, -1) 0 +(74, 8, -1) 1 +(74, 9, -1) 2 +(74, 10, -1) 3 +(74, 11, -1) 4 +(74, 12, -1) 5 +(74, 13, -1) 6 +(74, 14, -1) 6 +(74, 15, -1) 7 +(74, 16, -1) 8 +(74, 17, -1) 9 +(74, 18, -1) 10 +(74, 19, -1) 10 +(74, 20, -1) 11 +(74, 21, -1) 12 +(74, 22, -1) 13 +(74, 23, -1) 14 +(74, 24, -1) 14 +(74, 25, -1) 15 +(74, 26, -1) 16 +(74, 27, -1) 16 +(74, 28, -1) 17 +(74, 29, -1) 18 +(74, 30, -1) 18 +(74, 31, -1) 19 +(74, 32, -1) 20 +(74, 33, -1) 20 +(74, 34, -1) 21 +(74, 35, -1) 21 +(74, 36, -1) 22 +(74, 37, -1) 22 +(74, 38, -1) 23 +(74, 39, -1) 23 +(74, 40, -1) 24 +(74, 41, -1) 24 +(74, 42, -1) 25 +(74, 43, -1) 25 +(74, 44, -1) 25 +(74, 45, -1) 25 +(74, 46, -1) 26 +(74, 47, -1) 26 +(74, 48, -1) 26 +(74, 49, -1) 26 +(74, 50, -1) 26 +(74, 51, -1) 26 +(74, 52, -1) 26 +(74, 53, -1) 26 +(74, 54, -1) 26 +(74, 55, -1) 26 +(74, 56, -1) 25 +(74, 57, -1) 25 +(74, 58, -1) 25 +(74, 59, -1) 25 +(74, 60, -1) 24 +(74, 61, -1) 24 +(74, 62, -1) 23 +(74, 63, -1) 23 +(74, 64, -1) 22 +(74, 65, -1) 22 +(74, 66, -1) 21 +(74, 67, -1) 21 +(74, 68, -1) 20 +(74, 69, -1) 20 +(74, 70, -1) 19 +(74, 71, -1) 18 +(74, 72, -1) 18 +(74, 73, -1) 17 +(74, 74, -1) 16 +(74, 75, -1) 16 +(74, 76, -1) 15 +(74, 77, -1) 14 +(74, 78, -1) 14 +(74, 79, -1) 13 +(74, 80, -1) 12 +(74, 81, -1) 11 +(74, 82, -1) 10 +(74, 83, -1) 10 +(74, 84, -1) 9 +(74, 85, -1) 8 +(74, 86, -1) 7 +(74, 87, -1) 6 +(74, 88, -1) 6 +(74, 89, -1) 5 +(74, 90, -1) 4 +(74, 91, -1) 3 +(74, 92, -1) 2 +(74, 93, -1) 1 +(74, 94, -1) 0 +(74, 95, -1) 0 +(75, 6, -1) 0 +(75, 7, -1) 0 +(75, 8, -1) 1 +(75, 9, -1) 2 +(75, 10, -1) 3 +(75, 11, -1) 3 +(75, 12, -1) 4 +(75, 13, -1) 5 +(75, 14, -1) 6 +(75, 15, -1) 7 +(75, 16, -1) 7 +(75, 17, -1) 8 +(75, 18, -1) 9 +(75, 19, -1) 10 +(75, 20, -1) 11 +(75, 21, -1) 11 +(75, 22, -1) 12 +(75, 23, -1) 13 +(75, 24, -1) 14 +(75, 25, -1) 14 +(75, 26, -1) 15 +(75, 27, -1) 16 +(75, 28, -1) 16 +(75, 29, -1) 17 +(75, 30, -1) 18 +(75, 31, -1) 18 +(75, 32, -1) 19 +(75, 33, -1) 19 +(75, 34, -1) 20 +(75, 35, -1) 21 +(75, 36, -1) 21 +(75, 37, -1) 22 +(75, 38, -1) 22 +(75, 39, -1) 22 +(75, 40, -1) 23 +(75, 41, -1) 23 +(75, 42, -1) 24 +(75, 43, -1) 24 +(75, 44, -1) 24 +(75, 45, -1) 24 +(75, 46, -1) 25 +(75, 47, -1) 25 +(75, 48, -1) 25 +(75, 49, -1) 25 +(75, 50, -1) 25 +(75, 51, -1) 25 +(75, 52, -1) 25 +(75, 53, -1) 25 +(75, 54, -1) 25 +(75, 55, -1) 25 +(75, 56, -1) 24 +(75, 57, -1) 24 +(75, 58, -1) 24 +(75, 59, -1) 24 +(75, 60, -1) 23 +(75, 61, -1) 23 +(75, 62, -1) 22 +(75, 63, -1) 22 +(75, 64, -1) 22 +(75, 65, -1) 21 +(75, 66, -1) 21 +(75, 67, -1) 20 +(75, 68, -1) 19 +(75, 69, -1) 19 +(75, 70, -1) 18 +(75, 71, -1) 18 +(75, 72, -1) 17 +(75, 73, -1) 16 +(75, 74, -1) 16 +(75, 75, -1) 15 +(75, 76, -1) 14 +(75, 77, -1) 14 +(75, 78, -1) 13 +(75, 79, -1) 12 +(75, 80, -1) 11 +(75, 81, -1) 11 +(75, 82, -1) 10 +(75, 83, -1) 9 +(75, 84, -1) 8 +(75, 85, -1) 7 +(75, 86, -1) 7 +(75, 87, -1) 6 +(75, 88, -1) 5 +(75, 89, -1) 4 +(75, 90, -1) 3 +(75, 91, -1) 3 +(75, 92, -1) 2 +(75, 93, -1) 1 +(75, 94, -1) 0 +(75, 95, -1) 0 +(76, 9, -1) 1 +(76, 10, -1) 2 +(76, 11, -1) 3 +(76, 12, -1) 4 +(76, 13, -1) 5 +(76, 14, -1) 5 +(76, 15, -1) 6 +(76, 16, -1) 7 +(76, 17, -1) 8 +(76, 18, -1) 9 +(76, 19, -1) 9 +(76, 20, -1) 10 +(76, 21, -1) 11 +(76, 22, -1) 12 +(76, 23, -1) 12 +(76, 24, -1) 13 +(76, 25, -1) 14 +(76, 26, -1) 14 +(76, 27, -1) 15 +(76, 28, -1) 16 +(76, 29, -1) 16 +(76, 30, -1) 17 +(76, 31, -1) 18 +(76, 32, -1) 18 +(76, 33, -1) 19 +(76, 34, -1) 19 +(76, 35, -1) 20 +(76, 36, -1) 20 +(76, 37, -1) 21 +(76, 38, -1) 21 +(76, 39, -1) 22 +(76, 40, -1) 22 +(76, 41, -1) 22 +(76, 42, -1) 23 +(76, 43, -1) 23 +(76, 44, -1) 23 +(76, 45, -1) 23 +(76, 46, -1) 24 +(76, 47, -1) 24 +(76, 48, -1) 24 +(76, 49, -1) 24 +(76, 50, -1) 24 +(76, 51, -1) 24 +(76, 52, -1) 24 +(76, 53, -1) 24 +(76, 54, -1) 24 +(76, 55, -1) 24 +(76, 56, -1) 23 +(76, 57, -1) 23 +(76, 58, -1) 23 +(76, 59, -1) 23 +(76, 60, -1) 22 +(76, 61, -1) 22 +(76, 62, -1) 22 +(76, 63, -1) 21 +(76, 64, -1) 21 +(76, 65, -1) 20 +(76, 66, -1) 20 +(76, 67, -1) 19 +(76, 68, -1) 19 +(76, 69, -1) 18 +(76, 70, -1) 18 +(76, 71, -1) 17 +(76, 72, -1) 16 +(76, 73, -1) 16 +(76, 74, -1) 15 +(76, 75, -1) 14 +(76, 76, -1) 14 +(76, 77, -1) 13 +(76, 78, -1) 12 +(76, 79, -1) 12 +(76, 80, -1) 11 +(76, 81, -1) 10 +(76, 82, -1) 9 +(76, 83, -1) 9 +(76, 84, -1) 8 +(76, 85, -1) 7 +(76, 86, -1) 6 +(76, 87, -1) 5 +(76, 88, -1) 5 +(76, 89, -1) 4 +(76, 90, -1) 3 +(76, 91, -1) 2 +(76, 92, -1) 1 +(77, 9, -1) 1 +(77, 10, -1) 2 +(77, 11, -1) 2 +(77, 12, -1) 3 +(77, 13, -1) 4 +(77, 14, -1) 5 +(77, 15, -1) 6 +(77, 16, -1) 6 +(77, 17, -1) 7 +(77, 18, -1) 8 +(77, 19, -1) 9 +(77, 20, -1) 9 +(77, 21, -1) 10 +(77, 22, -1) 11 +(77, 23, -1) 12 +(77, 24, -1) 12 +(77, 25, -1) 13 +(77, 26, -1) 14 +(77, 27, -1) 14 +(77, 28, -1) 15 +(77, 29, -1) 16 +(77, 30, -1) 16 +(77, 31, -1) 17 +(77, 32, -1) 17 +(77, 33, -1) 18 +(77, 34, -1) 18 +(77, 35, -1) 19 +(77, 36, -1) 19 +(77, 37, -1) 20 +(77, 38, -1) 20 +(77, 39, -1) 21 +(77, 40, -1) 21 +(77, 41, -1) 21 +(77, 42, -1) 22 +(77, 43, -1) 22 +(77, 44, -1) 22 +(77, 45, -1) 22 +(77, 46, -1) 23 +(77, 47, -1) 23 +(77, 48, -1) 23 +(77, 49, -1) 23 +(77, 50, -1) 23 +(77, 51, -1) 23 +(77, 52, -1) 23 +(77, 53, -1) 23 +(77, 54, -1) 23 +(77, 55, -1) 23 +(77, 56, -1) 22 +(77, 57, -1) 22 +(77, 58, -1) 22 +(77, 59, -1) 22 +(77, 60, -1) 21 +(77, 61, -1) 21 +(77, 62, -1) 21 +(77, 63, -1) 20 +(77, 64, -1) 20 +(77, 65, -1) 19 +(77, 66, -1) 19 +(77, 67, -1) 18 +(77, 68, -1) 18 +(77, 69, -1) 17 +(77, 70, -1) 17 +(77, 71, -1) 16 +(77, 72, -1) 16 +(77, 73, -1) 15 +(77, 74, -1) 14 +(77, 75, -1) 14 +(77, 76, -1) 13 +(77, 77, -1) 12 +(77, 78, -1) 12 +(77, 79, -1) 11 +(77, 80, -1) 10 +(77, 81, -1) 9 +(77, 82, -1) 9 +(77, 83, -1) 8 +(77, 84, -1) 7 +(77, 85, -1) 6 +(77, 86, -1) 6 +(77, 87, -1) 5 +(77, 88, -1) 4 +(77, 89, -1) 3 +(77, 90, -1) 2 +(77, 91, -1) 2 +(77, 92, -1) 1 +(78, 9, -1) 0 +(78, 10, -1) 1 +(78, 11, -1) 2 +(78, 12, -1) 3 +(78, 13, -1) 3 +(78, 14, -1) 4 +(78, 15, -1) 5 +(78, 16, -1) 6 +(78, 17, -1) 7 +(78, 18, -1) 7 +(78, 19, -1) 8 +(78, 20, -1) 9 +(78, 21, -1) 9 +(78, 22, -1) 10 +(78, 23, -1) 11 +(78, 24, -1) 12 +(78, 25, -1) 12 +(78, 26, -1) 13 +(78, 27, -1) 14 +(78, 28, -1) 14 +(78, 29, -1) 15 +(78, 30, -1) 15 +(78, 31, -1) 16 +(78, 32, -1) 17 +(78, 33, -1) 17 +(78, 34, -1) 18 +(78, 35, -1) 18 +(78, 36, -1) 19 +(78, 37, -1) 19 +(78, 38, -1) 19 +(78, 39, -1) 20 +(78, 40, -1) 20 +(78, 41, -1) 20 +(78, 42, -1) 21 +(78, 43, -1) 21 +(78, 44, -1) 21 +(78, 45, -1) 21 +(78, 46, -1) 22 +(78, 47, -1) 22 +(78, 48, -1) 22 +(78, 49, -1) 22 +(78, 50, -1) 22 +(78, 51, -1) 22 +(78, 52, -1) 22 +(78, 53, -1) 22 +(78, 54, -1) 22 +(78, 55, -1) 22 +(78, 56, -1) 21 +(78, 57, -1) 21 +(78, 58, -1) 21 +(78, 59, -1) 21 +(78, 60, -1) 20 +(78, 61, -1) 20 +(78, 62, -1) 20 +(78, 63, -1) 19 +(78, 64, -1) 19 +(78, 65, -1) 19 +(78, 66, -1) 18 +(78, 67, -1) 18 +(78, 68, -1) 17 +(78, 69, -1) 17 +(78, 70, -1) 16 +(78, 71, -1) 15 +(78, 72, -1) 15 +(78, 73, -1) 14 +(78, 74, -1) 14 +(78, 75, -1) 13 +(78, 76, -1) 12 +(78, 77, -1) 12 +(78, 78, -1) 11 +(78, 79, -1) 10 +(78, 80, -1) 9 +(78, 81, -1) 9 +(78, 82, -1) 8 +(78, 83, -1) 7 +(78, 84, -1) 7 +(78, 85, -1) 6 +(78, 86, -1) 5 +(78, 87, -1) 4 +(78, 88, -1) 3 +(78, 89, -1) 3 +(78, 90, -1) 2 +(78, 91, -1) 1 +(78, 92, -1) 0 +(79, 9, -1) 0 +(79, 10, -1) 1 +(79, 11, -1) 1 +(79, 12, -1) 2 +(79, 13, -1) 3 +(79, 14, -1) 4 +(79, 15, -1) 4 +(79, 16, -1) 5 +(79, 17, -1) 6 +(79, 18, -1) 7 +(79, 19, -1) 7 +(79, 20, -1) 8 +(79, 21, -1) 9 +(79, 22, -1) 9 +(79, 23, -1) 10 +(79, 24, -1) 11 +(79, 25, -1) 12 +(79, 26, -1) 12 +(79, 27, -1) 13 +(79, 28, -1) 13 +(79, 29, -1) 14 +(79, 30, -1) 15 +(79, 31, -1) 15 +(79, 32, -1) 16 +(79, 33, -1) 16 +(79, 34, -1) 17 +(79, 35, -1) 17 +(79, 36, -1) 18 +(79, 37, -1) 18 +(79, 38, -1) 18 +(79, 39, -1) 19 +(79, 40, -1) 19 +(79, 41, -1) 20 +(79, 42, -1) 20 +(79, 43, -1) 20 +(79, 44, -1) 20 +(79, 45, -1) 20 +(79, 46, -1) 21 +(79, 47, -1) 21 +(79, 48, -1) 21 +(79, 49, -1) 21 +(79, 50, -1) 21 +(79, 51, -1) 21 +(79, 52, -1) 21 +(79, 53, -1) 21 +(79, 54, -1) 21 +(79, 55, -1) 21 +(79, 56, -1) 20 +(79, 57, -1) 20 +(79, 58, -1) 20 +(79, 59, -1) 20 +(79, 60, -1) 20 +(79, 61, -1) 19 +(79, 62, -1) 19 +(79, 63, -1) 18 +(79, 64, -1) 18 +(79, 65, -1) 18 +(79, 66, -1) 17 +(79, 67, -1) 17 +(79, 68, -1) 16 +(79, 69, -1) 16 +(79, 70, -1) 15 +(79, 71, -1) 15 +(79, 72, -1) 14 +(79, 73, -1) 13 +(79, 74, -1) 13 +(79, 75, -1) 12 +(79, 76, -1) 12 +(79, 77, -1) 11 +(79, 78, -1) 10 +(79, 79, -1) 9 +(79, 80, -1) 9 +(79, 81, -1) 8 +(79, 82, -1) 7 +(79, 83, -1) 7 +(79, 84, -1) 6 +(79, 85, -1) 5 +(79, 86, -1) 4 +(79, 87, -1) 4 +(79, 88, -1) 3 +(79, 89, -1) 2 +(79, 90, -1) 1 +(79, 91, -1) 1 +(79, 92, -1) 0 +(80, 9, -1) 0 +(80, 10, -1) 0 +(80, 11, -1) 1 +(80, 12, -1) 1 +(80, 13, -1) 2 +(80, 14, -1) 3 +(80, 15, -1) 4 +(80, 16, -1) 4 +(80, 17, -1) 5 +(80, 18, -1) 6 +(80, 19, -1) 7 +(80, 20, -1) 7 +(80, 21, -1) 8 +(80, 22, -1) 9 +(80, 23, -1) 9 +(80, 24, -1) 10 +(80, 25, -1) 11 +(80, 26, -1) 11 +(80, 27, -1) 12 +(80, 28, -1) 13 +(80, 29, -1) 13 +(80, 30, -1) 14 +(80, 31, -1) 14 +(80, 32, -1) 15 +(80, 33, -1) 15 +(80, 34, -1) 16 +(80, 35, -1) 16 +(80, 36, -1) 17 +(80, 37, -1) 17 +(80, 38, -1) 18 +(80, 39, -1) 18 +(80, 40, -1) 18 +(80, 41, -1) 19 +(80, 42, -1) 19 +(80, 43, -1) 19 +(80, 44, -1) 19 +(80, 45, -1) 20 +(80, 46, -1) 20 +(80, 47, -1) 20 +(80, 48, -1) 20 +(80, 49, -1) 20 +(80, 50, -1) 20 +(80, 51, -1) 20 +(80, 52, -1) 20 +(80, 53, -1) 20 +(80, 54, -1) 20 +(80, 55, -1) 20 +(80, 56, -1) 20 +(80, 57, -1) 19 +(80, 58, -1) 19 +(80, 59, -1) 19 +(80, 60, -1) 19 +(80, 61, -1) 18 +(80, 62, -1) 18 +(80, 63, -1) 18 +(80, 64, -1) 17 +(80, 65, -1) 17 +(80, 66, -1) 16 +(80, 67, -1) 16 +(80, 68, -1) 15 +(80, 69, -1) 15 +(80, 70, -1) 14 +(80, 71, -1) 14 +(80, 72, -1) 13 +(80, 73, -1) 13 +(80, 74, -1) 12 +(80, 75, -1) 11 +(80, 76, -1) 11 +(80, 77, -1) 10 +(80, 78, -1) 9 +(80, 79, -1) 9 +(80, 80, -1) 8 +(80, 81, -1) 7 +(80, 82, -1) 7 +(80, 83, -1) 6 +(80, 84, -1) 5 +(80, 85, -1) 4 +(80, 86, -1) 4 +(80, 87, -1) 3 +(80, 88, -1) 2 +(80, 89, -1) 1 +(80, 90, -1) 1 +(80, 91, -1) 0 +(80, 92, -1) 0 +(81, 14, -1) 3 +(81, 15, -1) 3 +(81, 16, -1) 4 +(81, 17, -1) 5 +(81, 18, -1) 5 +(81, 19, -1) 6 +(81, 20, -1) 7 +(81, 21, -1) 7 +(81, 22, -1) 8 +(81, 23, -1) 9 +(81, 24, -1) 9 +(81, 25, -1) 10 +(81, 26, -1) 11 +(81, 27, -1) 11 +(81, 28, -1) 12 +(81, 29, -1) 12 +(81, 30, -1) 13 +(81, 31, -1) 14 +(81, 32, -1) 14 +(81, 33, -1) 15 +(81, 34, -1) 15 +(81, 35, -1) 15 +(81, 36, -1) 16 +(81, 37, -1) 16 +(81, 38, -1) 17 +(81, 39, -1) 17 +(81, 40, -1) 17 +(81, 41, -1) 18 +(81, 42, -1) 18 +(81, 43, -1) 18 +(81, 44, -1) 18 +(81, 45, -1) 19 +(81, 46, -1) 19 +(81, 47, -1) 19 +(81, 48, -1) 19 +(81, 49, -1) 19 +(81, 50, -1) 19 +(81, 51, -1) 19 +(81, 52, -1) 19 +(81, 53, -1) 19 +(81, 54, -1) 19 +(81, 55, -1) 19 +(81, 56, -1) 19 +(81, 57, -1) 18 +(81, 58, -1) 18 +(81, 59, -1) 18 +(81, 60, -1) 18 +(81, 61, -1) 17 +(81, 62, -1) 17 +(81, 63, -1) 17 +(81, 64, -1) 16 +(81, 65, -1) 16 +(81, 66, -1) 15 +(81, 67, -1) 15 +(81, 68, -1) 15 +(81, 69, -1) 14 +(81, 70, -1) 14 +(81, 71, -1) 13 +(81, 72, -1) 12 +(81, 73, -1) 12 +(81, 74, -1) 11 +(81, 75, -1) 11 +(81, 76, -1) 10 +(81, 77, -1) 9 +(81, 78, -1) 9 +(81, 79, -1) 8 +(81, 80, -1) 7 +(81, 81, -1) 7 +(81, 82, -1) 6 +(81, 83, -1) 5 +(81, 84, -1) 5 +(81, 85, -1) 4 +(81, 86, -1) 3 +(81, 87, -1) 3 +(82, 14, -1) 2 +(82, 15, -1) 3 +(82, 16, -1) 3 +(82, 17, -1) 4 +(82, 18, -1) 5 +(82, 19, -1) 5 +(82, 20, -1) 6 +(82, 21, -1) 7 +(82, 22, -1) 7 +(82, 23, -1) 8 +(82, 24, -1) 9 +(82, 25, -1) 9 +(82, 26, -1) 10 +(82, 27, -1) 10 +(82, 28, -1) 11 +(82, 29, -1) 12 +(82, 30, -1) 12 +(82, 31, -1) 13 +(82, 32, -1) 13 +(82, 33, -1) 14 +(82, 34, -1) 14 +(82, 35, -1) 15 +(82, 36, -1) 15 +(82, 37, -1) 15 +(82, 38, -1) 16 +(82, 39, -1) 16 +(82, 40, -1) 16 +(82, 41, -1) 17 +(82, 42, -1) 17 +(82, 43, -1) 17 +(82, 44, -1) 17 +(82, 45, -1) 18 +(82, 46, -1) 18 +(82, 47, -1) 18 +(82, 48, -1) 18 +(82, 49, -1) 18 +(82, 50, -1) 18 +(82, 51, -1) 18 +(82, 52, -1) 18 +(82, 53, -1) 18 +(82, 54, -1) 18 +(82, 55, -1) 18 +(82, 56, -1) 18 +(82, 57, -1) 17 +(82, 58, -1) 17 +(82, 59, -1) 17 +(82, 60, -1) 17 +(82, 61, -1) 16 +(82, 62, -1) 16 +(82, 63, -1) 16 +(82, 64, -1) 15 +(82, 65, -1) 15 +(82, 66, -1) 15 +(82, 67, -1) 14 +(82, 68, -1) 14 +(82, 69, -1) 13 +(82, 70, -1) 13 +(82, 71, -1) 12 +(82, 72, -1) 12 +(82, 73, -1) 11 +(82, 74, -1) 10 +(82, 75, -1) 10 +(82, 76, -1) 9 +(82, 77, -1) 9 +(82, 78, -1) 8 +(82, 79, -1) 7 +(82, 80, -1) 7 +(82, 81, -1) 6 +(82, 82, -1) 5 +(82, 83, -1) 5 +(82, 84, -1) 4 +(82, 85, -1) 3 +(82, 86, -1) 3 +(82, 87, -1) 2 +(83, 14, -1) 1 +(83, 15, -1) 2 +(83, 16, -1) 3 +(83, 17, -1) 3 +(83, 18, -1) 4 +(83, 19, -1) 5 +(83, 20, -1) 5 +(83, 21, -1) 6 +(83, 22, -1) 7 +(83, 23, -1) 7 +(83, 24, -1) 8 +(83, 25, -1) 8 +(83, 26, -1) 9 +(83, 27, -1) 10 +(83, 28, -1) 10 +(83, 29, -1) 11 +(83, 30, -1) 11 +(83, 31, -1) 12 +(83, 32, -1) 12 +(83, 33, -1) 13 +(83, 34, -1) 13 +(83, 35, -1) 14 +(83, 36, -1) 14 +(83, 37, -1) 14 +(83, 38, -1) 15 +(83, 39, -1) 15 +(83, 40, -1) 15 +(83, 41, -1) 16 +(83, 42, -1) 16 +(83, 43, -1) 16 +(83, 44, -1) 16 +(83, 45, -1) 17 +(83, 46, -1) 17 +(83, 47, -1) 17 +(83, 48, -1) 17 +(83, 49, -1) 17 +(83, 50, -1) 17 +(83, 51, -1) 17 +(83, 52, -1) 17 +(83, 53, -1) 17 +(83, 54, -1) 17 +(83, 55, -1) 17 +(83, 56, -1) 17 +(83, 57, -1) 16 +(83, 58, -1) 16 +(83, 59, -1) 16 +(83, 60, -1) 16 +(83, 61, -1) 15 +(83, 62, -1) 15 +(83, 63, -1) 15 +(83, 64, -1) 14 +(83, 65, -1) 14 +(83, 66, -1) 14 +(83, 67, -1) 13 +(83, 68, -1) 13 +(83, 69, -1) 12 +(83, 70, -1) 12 +(83, 71, -1) 11 +(83, 72, -1) 11 +(83, 73, -1) 10 +(83, 74, -1) 10 +(83, 75, -1) 9 +(83, 76, -1) 8 +(83, 77, -1) 8 +(83, 78, -1) 7 +(83, 79, -1) 7 +(83, 80, -1) 6 +(83, 81, -1) 5 +(83, 82, -1) 5 +(83, 83, -1) 4 +(83, 84, -1) 3 +(83, 85, -1) 3 +(83, 86, -1) 2 +(83, 87, -1) 1 +(84, 14, -1) 1 +(84, 15, -1) 1 +(84, 16, -1) 2 +(84, 17, -1) 3 +(84, 18, -1) 3 +(84, 19, -1) 4 +(84, 20, -1) 5 +(84, 21, -1) 5 +(84, 22, -1) 6 +(84, 23, -1) 6 +(84, 24, -1) 7 +(84, 25, -1) 8 +(84, 26, -1) 8 +(84, 27, -1) 9 +(84, 28, -1) 9 +(84, 29, -1) 10 +(84, 30, -1) 10 +(84, 31, -1) 11 +(84, 32, -1) 11 +(84, 33, -1) 12 +(84, 34, -1) 12 +(84, 35, -1) 13 +(84, 36, -1) 13 +(84, 37, -1) 13 +(84, 38, -1) 14 +(84, 39, -1) 14 +(84, 40, -1) 14 +(84, 41, -1) 15 +(84, 42, -1) 15 +(84, 43, -1) 15 +(84, 44, -1) 15 +(84, 45, -1) 16 +(84, 46, -1) 16 +(84, 47, -1) 16 +(84, 48, -1) 16 +(84, 49, -1) 16 +(84, 50, -1) 16 +(84, 51, -1) 16 +(84, 52, -1) 16 +(84, 53, -1) 16 +(84, 54, -1) 16 +(84, 55, -1) 16 +(84, 56, -1) 16 +(84, 57, -1) 15 +(84, 58, -1) 15 +(84, 59, -1) 15 +(84, 60, -1) 15 +(84, 61, -1) 14 +(84, 62, -1) 14 +(84, 63, -1) 14 +(84, 64, -1) 13 +(84, 65, -1) 13 +(84, 66, -1) 13 +(84, 67, -1) 12 +(84, 68, -1) 12 +(84, 69, -1) 11 +(84, 70, -1) 11 +(84, 71, -1) 10 +(84, 72, -1) 10 +(84, 73, -1) 9 +(84, 74, -1) 9 +(84, 75, -1) 8 +(84, 76, -1) 8 +(84, 77, -1) 7 +(84, 78, -1) 6 +(84, 79, -1) 6 +(84, 80, -1) 5 +(84, 81, -1) 5 +(84, 82, -1) 4 +(84, 83, -1) 3 +(84, 84, -1) 3 +(84, 85, -1) 2 +(84, 86, -1) 1 +(84, 87, -1) 1 +(85, 14, -1) 0 +(85, 15, -1) 1 +(85, 16, -1) 1 +(85, 17, -1) 2 +(85, 18, -1) 2 +(85, 19, -1) 3 +(85, 20, -1) 4 +(85, 21, -1) 4 +(85, 22, -1) 5 +(85, 23, -1) 6 +(85, 24, -1) 6 +(85, 25, -1) 7 +(85, 26, -1) 7 +(85, 27, -1) 8 +(85, 28, -1) 9 +(85, 29, -1) 9 +(85, 30, -1) 10 +(85, 31, -1) 10 +(85, 32, -1) 11 +(85, 33, -1) 11 +(85, 34, -1) 11 +(85, 35, -1) 12 +(85, 36, -1) 12 +(85, 37, -1) 13 +(85, 38, -1) 13 +(85, 39, -1) 13 +(85, 40, -1) 13 +(85, 41, -1) 14 +(85, 42, -1) 14 +(85, 43, -1) 14 +(85, 44, -1) 14 +(85, 45, -1) 15 +(85, 46, -1) 15 +(85, 47, -1) 15 +(85, 48, -1) 15 +(85, 49, -1) 15 +(85, 50, -1) 15 +(85, 51, -1) 15 +(85, 52, -1) 15 +(85, 53, -1) 15 +(85, 54, -1) 15 +(85, 55, -1) 15 +(85, 56, -1) 15 +(85, 57, -1) 14 +(85, 58, -1) 14 +(85, 59, -1) 14 +(85, 60, -1) 14 +(85, 61, -1) 13 +(85, 62, -1) 13 +(85, 63, -1) 13 +(85, 64, -1) 13 +(85, 65, -1) 12 +(85, 66, -1) 12 +(85, 67, -1) 11 +(85, 68, -1) 11 +(85, 69, -1) 11 +(85, 70, -1) 10 +(85, 71, -1) 10 +(85, 72, -1) 9 +(85, 73, -1) 9 +(85, 74, -1) 8 +(85, 75, -1) 7 +(85, 76, -1) 7 +(85, 77, -1) 6 +(85, 78, -1) 6 +(85, 79, -1) 5 +(85, 80, -1) 4 +(85, 81, -1) 4 +(85, 82, -1) 3 +(85, 83, -1) 2 +(85, 84, -1) 2 +(85, 85, -1) 1 +(85, 86, -1) 1 +(85, 87, -1) 0 +(86, 16, -1) 1 +(86, 17, -1) 1 +(86, 18, -1) 2 +(86, 19, -1) 3 +(86, 20, -1) 3 +(86, 21, -1) 4 +(86, 22, -1) 4 +(86, 23, -1) 5 +(86, 24, -1) 6 +(86, 25, -1) 6 +(86, 26, -1) 7 +(86, 27, -1) 7 +(86, 28, -1) 8 +(86, 29, -1) 8 +(86, 30, -1) 9 +(86, 31, -1) 9 +(86, 32, -1) 10 +(86, 33, -1) 10 +(86, 34, -1) 11 +(86, 35, -1) 11 +(86, 36, -1) 11 +(86, 37, -1) 12 +(86, 38, -1) 12 +(86, 39, -1) 12 +(86, 40, -1) 13 +(86, 41, -1) 13 +(86, 42, -1) 13 +(86, 43, -1) 13 +(86, 44, -1) 13 +(86, 45, -1) 14 +(86, 46, -1) 14 +(86, 47, -1) 14 +(86, 48, -1) 14 +(86, 49, -1) 14 +(86, 50, -1) 14 +(86, 51, -1) 14 +(86, 52, -1) 14 +(86, 53, -1) 14 +(86, 54, -1) 14 +(86, 55, -1) 14 +(86, 56, -1) 14 +(86, 57, -1) 13 +(86, 58, -1) 13 +(86, 59, -1) 13 +(86, 60, -1) 13 +(86, 61, -1) 13 +(86, 62, -1) 12 +(86, 63, -1) 12 +(86, 64, -1) 12 +(86, 65, -1) 11 +(86, 66, -1) 11 +(86, 67, -1) 11 +(86, 68, -1) 10 +(86, 69, -1) 10 +(86, 70, -1) 9 +(86, 71, -1) 9 +(86, 72, -1) 8 +(86, 73, -1) 8 +(86, 74, -1) 7 +(86, 75, -1) 7 +(86, 76, -1) 6 +(86, 77, -1) 6 +(86, 78, -1) 5 +(86, 79, -1) 4 +(86, 80, -1) 4 +(86, 81, -1) 3 +(86, 82, -1) 3 +(86, 83, -1) 2 +(86, 84, -1) 1 +(86, 85, -1) 1 +(87, 16, -1) 0 +(87, 17, -1) 1 +(87, 18, -1) 1 +(87, 19, -1) 2 +(87, 20, -1) 2 +(87, 21, -1) 3 +(87, 22, -1) 4 +(87, 23, -1) 4 +(87, 24, -1) 5 +(87, 25, -1) 5 +(87, 26, -1) 6 +(87, 27, -1) 6 +(87, 28, -1) 7 +(87, 29, -1) 7 +(87, 30, -1) 8 +(87, 31, -1) 8 +(87, 32, -1) 9 +(87, 33, -1) 9 +(87, 34, -1) 10 +(87, 35, -1) 10 +(87, 36, -1) 10 +(87, 37, -1) 11 +(87, 38, -1) 11 +(87, 39, -1) 11 +(87, 40, -1) 12 +(87, 41, -1) 12 +(87, 42, -1) 12 +(87, 43, -1) 12 +(87, 44, -1) 12 +(87, 45, -1) 13 +(87, 46, -1) 13 +(87, 47, -1) 13 +(87, 48, -1) 13 +(87, 49, -1) 13 +(87, 50, -1) 13 +(87, 51, -1) 13 +(87, 52, -1) 13 +(87, 53, -1) 13 +(87, 54, -1) 13 +(87, 55, -1) 13 +(87, 56, -1) 13 +(87, 57, -1) 12 +(87, 58, -1) 12 +(87, 59, -1) 12 +(87, 60, -1) 12 +(87, 61, -1) 12 +(87, 62, -1) 11 +(87, 63, -1) 11 +(87, 64, -1) 11 +(87, 65, -1) 10 +(87, 66, -1) 10 +(87, 67, -1) 10 +(87, 68, -1) 9 +(87, 69, -1) 9 +(87, 70, -1) 8 +(87, 71, -1) 8 +(87, 72, -1) 7 +(87, 73, -1) 7 +(87, 74, -1) 6 +(87, 75, -1) 6 +(87, 76, -1) 5 +(87, 77, -1) 5 +(87, 78, -1) 4 +(87, 79, -1) 4 +(87, 80, -1) 3 +(87, 81, -1) 2 +(87, 82, -1) 2 +(87, 83, -1) 1 +(87, 84, -1) 1 +(87, 85, -1) 0 +(88, 21, -1) 2 +(88, 22, -1) 3 +(88, 23, -1) 3 +(88, 24, -1) 4 +(88, 25, -1) 5 +(88, 26, -1) 5 +(88, 27, -1) 6 +(88, 28, -1) 6 +(88, 29, -1) 7 +(88, 30, -1) 7 +(88, 31, -1) 7 +(88, 32, -1) 8 +(88, 33, -1) 8 +(88, 34, -1) 9 +(88, 35, -1) 9 +(88, 36, -1) 9 +(88, 37, -1) 10 +(88, 38, -1) 10 +(88, 39, -1) 10 +(88, 40, -1) 11 +(88, 41, -1) 11 +(88, 42, -1) 11 +(88, 43, -1) 11 +(88, 44, -1) 11 +(88, 45, -1) 12 +(88, 46, -1) 12 +(88, 47, -1) 12 +(88, 48, -1) 12 +(88, 49, -1) 12 +(88, 50, -1) 12 +(88, 51, -1) 12 +(88, 52, -1) 12 +(88, 53, -1) 12 +(88, 54, -1) 12 +(88, 55, -1) 12 +(88, 56, -1) 12 +(88, 57, -1) 11 +(88, 58, -1) 11 +(88, 59, -1) 11 +(88, 60, -1) 11 +(88, 61, -1) 11 +(88, 62, -1) 10 +(88, 63, -1) 10 +(88, 64, -1) 10 +(88, 65, -1) 9 +(88, 66, -1) 9 +(88, 67, -1) 9 +(88, 68, -1) 8 +(88, 69, -1) 8 +(88, 70, -1) 7 +(88, 71, -1) 7 +(88, 72, -1) 7 +(88, 73, -1) 6 +(88, 74, -1) 6 +(88, 75, -1) 5 +(88, 76, -1) 5 +(88, 77, -1) 4 +(88, 78, -1) 3 +(88, 79, -1) 3 +(88, 80, -1) 2 +(89, 21, -1) 1 +(89, 22, -1) 2 +(89, 23, -1) 3 +(89, 24, -1) 3 +(89, 25, -1) 4 +(89, 26, -1) 4 +(89, 27, -1) 5 +(89, 28, -1) 5 +(89, 29, -1) 6 +(89, 30, -1) 6 +(89, 31, -1) 7 +(89, 32, -1) 7 +(89, 33, -1) 7 +(89, 34, -1) 8 +(89, 35, -1) 8 +(89, 36, -1) 8 +(89, 37, -1) 9 +(89, 38, -1) 9 +(89, 39, -1) 9 +(89, 40, -1) 10 +(89, 41, -1) 10 +(89, 42, -1) 10 +(89, 43, -1) 10 +(89, 44, -1) 10 +(89, 45, -1) 11 +(89, 46, -1) 11 +(89, 47, -1) 11 +(89, 48, -1) 11 +(89, 49, -1) 11 +(89, 50, -1) 11 +(89, 51, -1) 11 +(89, 52, -1) 11 +(89, 53, -1) 11 +(89, 54, -1) 11 +(89, 55, -1) 11 +(89, 56, -1) 11 +(89, 57, -1) 10 +(89, 58, -1) 10 +(89, 59, -1) 10 +(89, 60, -1) 10 +(89, 61, -1) 10 +(89, 62, -1) 9 +(89, 63, -1) 9 +(89, 64, -1) 9 +(89, 65, -1) 8 +(89, 66, -1) 8 +(89, 67, -1) 8 +(89, 68, -1) 7 +(89, 69, -1) 7 +(89, 70, -1) 7 +(89, 71, -1) 6 +(89, 72, -1) 6 +(89, 73, -1) 5 +(89, 74, -1) 5 +(89, 75, -1) 4 +(89, 76, -1) 4 +(89, 77, -1) 3 +(89, 78, -1) 3 +(89, 79, -1) 2 +(89, 80, -1) 1 +(90, 21, -1) 1 +(90, 22, -1) 1 +(90, 23, -1) 2 +(90, 24, -1) 2 +(90, 25, -1) 3 +(90, 26, -1) 3 +(90, 27, -1) 4 +(90, 28, -1) 4 +(90, 29, -1) 5 +(90, 30, -1) 5 +(90, 31, -1) 6 +(90, 32, -1) 6 +(90, 33, -1) 6 +(90, 34, -1) 7 +(90, 35, -1) 7 +(90, 36, -1) 8 +(90, 37, -1) 8 +(90, 38, -1) 8 +(90, 39, -1) 8 +(90, 40, -1) 9 +(90, 41, -1) 9 +(90, 42, -1) 9 +(90, 43, -1) 9 +(90, 44, -1) 9 +(90, 45, -1) 10 +(90, 46, -1) 10 +(90, 47, -1) 10 +(90, 48, -1) 10 +(90, 49, -1) 10 +(90, 50, -1) 10 +(90, 51, -1) 10 +(90, 52, -1) 10 +(90, 53, -1) 10 +(90, 54, -1) 10 +(90, 55, -1) 10 +(90, 56, -1) 10 +(90, 57, -1) 9 +(90, 58, -1) 9 +(90, 59, -1) 9 +(90, 60, -1) 9 +(90, 61, -1) 9 +(90, 62, -1) 8 +(90, 63, -1) 8 +(90, 64, -1) 8 +(90, 65, -1) 8 +(90, 66, -1) 7 +(90, 67, -1) 7 +(90, 68, -1) 6 +(90, 69, -1) 6 +(90, 70, -1) 6 +(90, 71, -1) 5 +(90, 72, -1) 5 +(90, 73, -1) 4 +(90, 74, -1) 4 +(90, 75, -1) 3 +(90, 76, -1) 3 +(90, 77, -1) 2 +(90, 78, -1) 2 +(90, 79, -1) 1 +(90, 80, -1) 1 +(91, 21, -1) 0 +(91, 22, -1) 1 +(91, 23, -1) 1 +(91, 24, -1) 2 +(91, 25, -1) 2 +(91, 26, -1) 3 +(91, 27, -1) 3 +(91, 28, -1) 4 +(91, 29, -1) 4 +(91, 30, -1) 4 +(91, 31, -1) 5 +(91, 32, -1) 5 +(91, 33, -1) 6 +(91, 34, -1) 6 +(91, 35, -1) 6 +(91, 36, -1) 7 +(91, 37, -1) 7 +(91, 38, -1) 7 +(91, 39, -1) 8 +(91, 40, -1) 8 +(91, 41, -1) 8 +(91, 42, -1) 8 +(91, 43, -1) 8 +(91, 44, -1) 9 +(91, 45, -1) 9 +(91, 46, -1) 9 +(91, 47, -1) 9 +(91, 48, -1) 9 +(91, 49, -1) 9 +(91, 50, -1) 9 +(91, 51, -1) 9 +(91, 52, -1) 9 +(91, 53, -1) 9 +(91, 54, -1) 9 +(91, 55, -1) 9 +(91, 56, -1) 9 +(91, 57, -1) 9 +(91, 58, -1) 8 +(91, 59, -1) 8 +(91, 60, -1) 8 +(91, 61, -1) 8 +(91, 62, -1) 8 +(91, 63, -1) 7 +(91, 64, -1) 7 +(91, 65, -1) 7 +(91, 66, -1) 6 +(91, 67, -1) 6 +(91, 68, -1) 6 +(91, 69, -1) 5 +(91, 70, -1) 5 +(91, 71, -1) 4 +(91, 72, -1) 4 +(91, 73, -1) 4 +(91, 74, -1) 3 +(91, 75, -1) 3 +(91, 76, -1) 2 +(91, 77, -1) 2 +(91, 78, -1) 1 +(91, 79, -1) 1 +(91, 80, -1) 0 +(92, 21, -1) 0 +(92, 22, -1) 0 +(92, 23, -1) 0 +(92, 24, -1) 1 +(92, 25, -1) 1 +(92, 26, -1) 2 +(92, 27, -1) 2 +(92, 28, -1) 3 +(92, 29, -1) 3 +(92, 30, -1) 4 +(92, 31, -1) 4 +(92, 32, -1) 4 +(92, 33, -1) 5 +(92, 34, -1) 5 +(92, 35, -1) 5 +(92, 36, -1) 6 +(92, 37, -1) 6 +(92, 38, -1) 6 +(92, 39, -1) 7 +(92, 40, -1) 7 +(92, 41, -1) 7 +(92, 42, -1) 7 +(92, 43, -1) 7 +(92, 44, -1) 8 +(92, 45, -1) 8 +(92, 46, -1) 8 +(92, 47, -1) 8 +(92, 48, -1) 8 +(92, 49, -1) 8 +(92, 50, -1) 8 +(92, 51, -1) 8 +(92, 52, -1) 8 +(92, 53, -1) 8 +(92, 54, -1) 8 +(92, 55, -1) 8 +(92, 56, -1) 8 +(92, 57, -1) 8 +(92, 58, -1) 7 +(92, 59, -1) 7 +(92, 60, -1) 7 +(92, 61, -1) 7 +(92, 62, -1) 7 +(92, 63, -1) 6 +(92, 64, -1) 6 +(92, 65, -1) 6 +(92, 66, -1) 5 +(92, 67, -1) 5 +(92, 68, -1) 5 +(92, 69, -1) 4 +(92, 70, -1) 4 +(92, 71, -1) 4 +(92, 72, -1) 3 +(92, 73, -1) 3 +(92, 74, -1) 2 +(92, 75, -1) 2 +(92, 76, -1) 1 +(92, 77, -1) 1 +(92, 78, -1) 0 +(92, 79, -1) 0 +(92, 80, -1) 0 +(93, 26, -1) 1 +(93, 27, -1) 1 +(93, 28, -1) 2 +(93, 29, -1) 2 +(93, 30, -1) 3 +(93, 31, -1) 3 +(93, 32, -1) 3 +(93, 33, -1) 4 +(93, 34, -1) 4 +(93, 35, -1) 4 +(93, 36, -1) 5 +(93, 37, -1) 5 +(93, 38, -1) 5 +(93, 39, -1) 6 +(93, 40, -1) 6 +(93, 41, -1) 6 +(93, 42, -1) 6 +(93, 43, -1) 6 +(93, 44, -1) 7 +(93, 45, -1) 7 +(93, 46, -1) 7 +(93, 47, -1) 7 +(93, 48, -1) 7 +(93, 49, -1) 7 +(93, 50, -1) 7 +(93, 51, -1) 7 +(93, 52, -1) 7 +(93, 53, -1) 7 +(93, 54, -1) 7 +(93, 55, -1) 7 +(93, 56, -1) 7 +(93, 57, -1) 7 +(93, 58, -1) 6 +(93, 59, -1) 6 +(93, 60, -1) 6 +(93, 61, -1) 6 +(93, 62, -1) 6 +(93, 63, -1) 5 +(93, 64, -1) 5 +(93, 65, -1) 5 +(93, 66, -1) 4 +(93, 67, -1) 4 +(93, 68, -1) 4 +(93, 69, -1) 3 +(93, 70, -1) 3 +(93, 71, -1) 3 +(93, 72, -1) 2 +(93, 73, -1) 2 +(93, 74, -1) 1 +(93, 75, -1) 1 +(94, 26, -1) 0 +(94, 27, -1) 0 +(94, 28, -1) 1 +(94, 29, -1) 1 +(94, 30, -1) 2 +(94, 31, -1) 2 +(94, 32, -1) 2 +(94, 33, -1) 3 +(94, 34, -1) 3 +(94, 35, -1) 3 +(94, 36, -1) 4 +(94, 37, -1) 4 +(94, 38, -1) 4 +(94, 39, -1) 5 +(94, 40, -1) 5 +(94, 41, -1) 5 +(94, 42, -1) 5 +(94, 43, -1) 5 +(94, 44, -1) 6 +(94, 45, -1) 6 +(94, 46, -1) 6 +(94, 47, -1) 6 +(94, 48, -1) 6 +(94, 49, -1) 6 +(94, 50, -1) 6 +(94, 51, -1) 6 +(94, 52, -1) 6 +(94, 53, -1) 6 +(94, 54, -1) 6 +(94, 55, -1) 6 +(94, 56, -1) 6 +(94, 57, -1) 6 +(94, 58, -1) 5 +(94, 59, -1) 5 +(94, 60, -1) 5 +(94, 61, -1) 5 +(94, 62, -1) 5 +(94, 63, -1) 4 +(94, 64, -1) 4 +(94, 65, -1) 4 +(94, 66, -1) 3 +(94, 67, -1) 3 +(94, 68, -1) 3 +(94, 69, -1) 2 +(94, 70, -1) 2 +(94, 71, -1) 2 +(94, 72, -1) 1 +(94, 73, -1) 1 +(94, 74, -1) 0 +(94, 75, -1) 0 +(95, 26, -1) 0 +(95, 27, -1) 0 +(95, 28, -1) 0 +(95, 29, -1) 0 +(95, 30, -1) 1 +(95, 31, -1) 1 +(95, 32, -1) 1 +(95, 33, -1) 2 +(95, 34, -1) 2 +(95, 35, -1) 3 +(95, 36, -1) 3 +(95, 37, -1) 3 +(95, 38, -1) 3 +(95, 39, -1) 4 +(95, 40, -1) 4 +(95, 41, -1) 4 +(95, 42, -1) 4 +(95, 43, -1) 4 +(95, 44, -1) 5 +(95, 45, -1) 5 +(95, 46, -1) 5 +(95, 47, -1) 5 +(95, 48, -1) 5 +(95, 49, -1) 5 +(95, 50, -1) 5 +(95, 51, -1) 5 +(95, 52, -1) 5 +(95, 53, -1) 5 +(95, 54, -1) 5 +(95, 55, -1) 5 +(95, 56, -1) 5 +(95, 57, -1) 5 +(95, 58, -1) 4 +(95, 59, -1) 4 +(95, 60, -1) 4 +(95, 61, -1) 4 +(95, 62, -1) 4 +(95, 63, -1) 3 +(95, 64, -1) 3 +(95, 65, -1) 3 +(95, 66, -1) 3 +(95, 67, -1) 2 +(95, 68, -1) 2 +(95, 69, -1) 1 +(95, 70, -1) 1 +(95, 71, -1) 1 +(95, 72, -1) 0 +(95, 73, -1) 0 +(95, 74, -1) 0 +(95, 75, -1) 0 +(96, 36, -1) 2 +(96, 37, -1) 2 +(96, 38, -1) 2 +(96, 39, -1) 3 +(96, 40, -1) 3 +(96, 41, -1) 3 +(96, 42, -1) 3 +(96, 43, -1) 3 +(96, 44, -1) 4 +(96, 45, -1) 4 +(96, 46, -1) 4 +(96, 47, -1) 4 +(96, 48, -1) 4 +(96, 49, -1) 4 +(96, 50, -1) 4 +(96, 51, -1) 4 +(96, 52, -1) 4 +(96, 53, -1) 4 +(96, 54, -1) 4 +(96, 55, -1) 4 +(96, 56, -1) 4 +(96, 57, -1) 4 +(96, 58, -1) 3 +(96, 59, -1) 3 +(96, 60, -1) 3 +(96, 61, -1) 3 +(96, 62, -1) 3 +(96, 63, -1) 2 +(96, 64, -1) 2 +(96, 65, -1) 2 +(97, 36, -1) 1 +(97, 37, -1) 1 +(97, 38, -1) 2 +(97, 39, -1) 2 +(97, 40, -1) 2 +(97, 41, -1) 2 +(97, 42, -1) 2 +(97, 43, -1) 2 +(97, 44, -1) 3 +(97, 45, -1) 3 +(97, 46, -1) 3 +(97, 47, -1) 3 +(97, 48, -1) 3 +(97, 49, -1) 3 +(97, 50, -1) 3 +(97, 51, -1) 3 +(97, 52, -1) 3 +(97, 53, -1) 3 +(97, 54, -1) 3 +(97, 55, -1) 3 +(97, 56, -1) 3 +(97, 57, -1) 3 +(97, 58, -1) 2 +(97, 59, -1) 2 +(97, 60, -1) 2 +(97, 61, -1) 2 +(97, 62, -1) 2 +(97, 63, -1) 2 +(97, 64, -1) 1 +(97, 65, -1) 1 +(98, 41, -1) 1 +(98, 42, -1) 1 +(98, 43, -1) 1 +(98, 44, -1) 2 +(98, 45, -1) 2 +(98, 46, -1) 2 +(98, 47, -1) 2 +(98, 48, -1) 2 +(98, 49, -1) 2 +(98, 50, -1) 2 +(98, 51, -1) 2 +(98, 52, -1) 2 +(98, 53, -1) 2 +(98, 54, -1) 2 +(98, 55, -1) 2 +(98, 56, -1) 2 +(98, 57, -1) 2 +(98, 58, -1) 1 +(98, 59, -1) 1 +(98, 60, -1) 1 +(99, 41, -1) 0 +(99, 42, -1) 0 +(99, 43, -1) 0 +(99, 44, -1) 1 +(99, 45, -1) 1 +(99, 46, -1) 1 +(99, 47, -1) 1 +(99, 48, -1) 1 +(99, 49, -1) 1 +(99, 50, -1) 1 +(99, 51, -1) 1 +(99, 52, -1) 1 +(99, 53, -1) 1 +(99, 54, -1) 1 +(99, 55, -1) 1 +(99, 56, -1) 1 +(99, 57, -1) 1 +(99, 58, -1) 0 +(99, 59, -1) 0 +(99, 60, -1) 0 +(100, 41, -1) 0 +(100, 42, -1) 0 +(100, 43, -1) 0 +(100, 44, -1) 0 +(100, 45, -1) 0 +(100, 46, -1) 0 +(100, 47, -1) 0 +(100, 48, -1) 0 +(100, 49, -1) 0 +(100, 50, -1) 0 +(100, 51, -1) 0 +(100, 52, -1) 0 +(100, 53, -1) 0 +(100, 54, -1) 0 +(100, 55, -1) 0 +(100, 56, -1) 0 +(100, 57, -1) 0 +(100, 58, -1) 0 +(100, 59, -1) 0 +(100, 60, -1) 0 +(1, 41, 1) 0 +(1, 42, 1) 0 +(1, 43, 1) 0 +(1, 44, 1) 0 +(1, 45, 1) 0 +(1, 46, 1) 0 +(1, 47, 1) 0 +(1, 48, 1) 0 +(1, 49, 1) 0 +(1, 50, 1) 0 +(1, 51, 1) 0 +(1, 52, 1) 0 +(1, 53, 1) 0 +(1, 54, 1) 0 +(1, 55, 1) 0 +(1, 56, 1) 0 +(1, 57, 1) 0 +(1, 58, 1) 0 +(1, 59, 1) 0 +(1, 60, 1) 0 +(2, 41, 1) 0 +(2, 42, 1) 0 +(2, 43, 1) 0 +(2, 44, 1) 1 +(2, 45, 1) 1 +(2, 46, 1) 1 +(2, 47, 1) 1 +(2, 48, 1) 1 +(2, 49, 1) 1 +(2, 50, 1) 1 +(2, 51, 1) 1 +(2, 52, 1) 1 +(2, 53, 1) 1 +(2, 54, 1) 1 +(2, 55, 1) 1 +(2, 56, 1) 1 +(2, 57, 1) 1 +(2, 58, 1) 0 +(2, 59, 1) 0 +(2, 60, 1) 0 +(3, 41, 1) 1 +(3, 42, 1) 1 +(3, 43, 1) 1 +(3, 44, 1) 2 +(3, 45, 1) 2 +(3, 46, 1) 2 +(3, 47, 1) 2 +(3, 48, 1) 2 +(3, 49, 1) 2 +(3, 50, 1) 2 +(3, 51, 1) 2 +(3, 52, 1) 2 +(3, 53, 1) 2 +(3, 54, 1) 2 +(3, 55, 1) 2 +(3, 56, 1) 2 +(3, 57, 1) 2 +(3, 58, 1) 1 +(3, 59, 1) 1 +(3, 60, 1) 1 +(4, 36, 1) 1 +(4, 37, 1) 1 +(4, 38, 1) 2 +(4, 39, 1) 2 +(4, 40, 1) 2 +(4, 41, 1) 2 +(4, 42, 1) 2 +(4, 43, 1) 2 +(4, 44, 1) 3 +(4, 45, 1) 3 +(4, 46, 1) 3 +(4, 47, 1) 3 +(4, 48, 1) 3 +(4, 49, 1) 3 +(4, 50, 1) 3 +(4, 51, 1) 3 +(4, 52, 1) 3 +(4, 53, 1) 3 +(4, 54, 1) 3 +(4, 55, 1) 3 +(4, 56, 1) 3 +(4, 57, 1) 3 +(4, 58, 1) 2 +(4, 59, 1) 2 +(4, 60, 1) 2 +(4, 61, 1) 2 +(4, 62, 1) 2 +(4, 63, 1) 2 +(4, 64, 1) 1 +(4, 65, 1) 1 +(5, 36, 1) 2 +(5, 37, 1) 2 +(5, 38, 1) 2 +(5, 39, 1) 3 +(5, 40, 1) 3 +(5, 41, 1) 3 +(5, 42, 1) 3 +(5, 43, 1) 3 +(5, 44, 1) 4 +(5, 45, 1) 4 +(5, 46, 1) 4 +(5, 47, 1) 4 +(5, 48, 1) 4 +(5, 49, 1) 4 +(5, 50, 1) 4 +(5, 51, 1) 4 +(5, 52, 1) 4 +(5, 53, 1) 4 +(5, 54, 1) 4 +(5, 55, 1) 4 +(5, 56, 1) 4 +(5, 57, 1) 4 +(5, 58, 1) 3 +(5, 59, 1) 3 +(5, 60, 1) 3 +(5, 61, 1) 3 +(5, 62, 1) 3 +(5, 63, 1) 2 +(5, 64, 1) 2 +(5, 65, 1) 2 +(6, 26, 1) 0 +(6, 27, 1) 0 +(6, 28, 1) 0 +(6, 29, 1) 0 +(6, 30, 1) 1 +(6, 31, 1) 1 +(6, 32, 1) 1 +(6, 33, 1) 2 +(6, 34, 1) 2 +(6, 35, 1) 3 +(6, 36, 1) 3 +(6, 37, 1) 3 +(6, 38, 1) 3 +(6, 39, 1) 4 +(6, 40, 1) 4 +(6, 41, 1) 4 +(6, 42, 1) 4 +(6, 43, 1) 4 +(6, 44, 1) 5 +(6, 45, 1) 5 +(6, 46, 1) 5 +(6, 47, 1) 5 +(6, 48, 1) 5 +(6, 49, 1) 5 +(6, 50, 1) 5 +(6, 51, 1) 5 +(6, 52, 1) 5 +(6, 53, 1) 5 +(6, 54, 1) 5 +(6, 55, 1) 5 +(6, 56, 1) 5 +(6, 57, 1) 5 +(6, 58, 1) 4 +(6, 59, 1) 4 +(6, 60, 1) 4 +(6, 61, 1) 4 +(6, 62, 1) 4 +(6, 63, 1) 3 +(6, 64, 1) 3 +(6, 65, 1) 3 +(6, 66, 1) 3 +(6, 67, 1) 2 +(6, 68, 1) 2 +(6, 69, 1) 1 +(6, 70, 1) 1 +(6, 71, 1) 1 +(6, 72, 1) 0 +(6, 73, 1) 0 +(6, 74, 1) 0 +(6, 75, 1) 0 +(7, 26, 1) 0 +(7, 27, 1) 0 +(7, 28, 1) 1 +(7, 29, 1) 1 +(7, 30, 1) 2 +(7, 31, 1) 2 +(7, 32, 1) 2 +(7, 33, 1) 3 +(7, 34, 1) 3 +(7, 35, 1) 3 +(7, 36, 1) 4 +(7, 37, 1) 4 +(7, 38, 1) 4 +(7, 39, 1) 5 +(7, 40, 1) 5 +(7, 41, 1) 5 +(7, 42, 1) 5 +(7, 43, 1) 5 +(7, 44, 1) 6 +(7, 45, 1) 6 +(7, 46, 1) 6 +(7, 47, 1) 6 +(7, 48, 1) 6 +(7, 49, 1) 6 +(7, 50, 1) 6 +(7, 51, 1) 6 +(7, 52, 1) 6 +(7, 53, 1) 6 +(7, 54, 1) 6 +(7, 55, 1) 6 +(7, 56, 1) 6 +(7, 57, 1) 6 +(7, 58, 1) 5 +(7, 59, 1) 5 +(7, 60, 1) 5 +(7, 61, 1) 5 +(7, 62, 1) 5 +(7, 63, 1) 4 +(7, 64, 1) 4 +(7, 65, 1) 4 +(7, 66, 1) 3 +(7, 67, 1) 3 +(7, 68, 1) 3 +(7, 69, 1) 2 +(7, 70, 1) 2 +(7, 71, 1) 2 +(7, 72, 1) 1 +(7, 73, 1) 1 +(7, 74, 1) 0 +(7, 75, 1) 0 +(8, 26, 1) 1 +(8, 27, 1) 1 +(8, 28, 1) 2 +(8, 29, 1) 2 +(8, 30, 1) 3 +(8, 31, 1) 3 +(8, 32, 1) 3 +(8, 33, 1) 4 +(8, 34, 1) 4 +(8, 35, 1) 4 +(8, 36, 1) 5 +(8, 37, 1) 5 +(8, 38, 1) 5 +(8, 39, 1) 6 +(8, 40, 1) 6 +(8, 41, 1) 6 +(8, 42, 1) 6 +(8, 43, 1) 6 +(8, 44, 1) 7 +(8, 45, 1) 7 +(8, 46, 1) 7 +(8, 47, 1) 7 +(8, 48, 1) 7 +(8, 49, 1) 7 +(8, 50, 1) 7 +(8, 51, 1) 7 +(8, 52, 1) 7 +(8, 53, 1) 7 +(8, 54, 1) 7 +(8, 55, 1) 7 +(8, 56, 1) 7 +(8, 57, 1) 7 +(8, 58, 1) 6 +(8, 59, 1) 6 +(8, 60, 1) 6 +(8, 61, 1) 6 +(8, 62, 1) 6 +(8, 63, 1) 5 +(8, 64, 1) 5 +(8, 65, 1) 5 +(8, 66, 1) 4 +(8, 67, 1) 4 +(8, 68, 1) 4 +(8, 69, 1) 3 +(8, 70, 1) 3 +(8, 71, 1) 3 +(8, 72, 1) 2 +(8, 73, 1) 2 +(8, 74, 1) 1 +(8, 75, 1) 1 +(9, 21, 1) 0 +(9, 22, 1) 0 +(9, 23, 1) 0 +(9, 24, 1) 1 +(9, 25, 1) 1 +(9, 26, 1) 2 +(9, 27, 1) 2 +(9, 28, 1) 3 +(9, 29, 1) 3 +(9, 30, 1) 4 +(9, 31, 1) 4 +(9, 32, 1) 4 +(9, 33, 1) 5 +(9, 34, 1) 5 +(9, 35, 1) 5 +(9, 36, 1) 6 +(9, 37, 1) 6 +(9, 38, 1) 6 +(9, 39, 1) 7 +(9, 40, 1) 7 +(9, 41, 1) 7 +(9, 42, 1) 7 +(9, 43, 1) 7 +(9, 44, 1) 8 +(9, 45, 1) 8 +(9, 46, 1) 8 +(9, 47, 1) 8 +(9, 48, 1) 8 +(9, 49, 1) 8 +(9, 50, 1) 8 +(9, 51, 1) 8 +(9, 52, 1) 8 +(9, 53, 1) 8 +(9, 54, 1) 8 +(9, 55, 1) 8 +(9, 56, 1) 8 +(9, 57, 1) 8 +(9, 58, 1) 7 +(9, 59, 1) 7 +(9, 60, 1) 7 +(9, 61, 1) 7 +(9, 62, 1) 7 +(9, 63, 1) 6 +(9, 64, 1) 6 +(9, 65, 1) 6 +(9, 66, 1) 5 +(9, 67, 1) 5 +(9, 68, 1) 5 +(9, 69, 1) 4 +(9, 70, 1) 4 +(9, 71, 1) 4 +(9, 72, 1) 3 +(9, 73, 1) 3 +(9, 74, 1) 2 +(9, 75, 1) 2 +(9, 76, 1) 1 +(9, 77, 1) 1 +(9, 78, 1) 0 +(9, 79, 1) 0 +(9, 80, 1) 0 +(10, 21, 1) 0 +(10, 22, 1) 1 +(10, 23, 1) 1 +(10, 24, 1) 2 +(10, 25, 1) 2 +(10, 26, 1) 3 +(10, 27, 1) 3 +(10, 28, 1) 4 +(10, 29, 1) 4 +(10, 30, 1) 4 +(10, 31, 1) 5 +(10, 32, 1) 5 +(10, 33, 1) 6 +(10, 34, 1) 6 +(10, 35, 1) 6 +(10, 36, 1) 7 +(10, 37, 1) 7 +(10, 38, 1) 7 +(10, 39, 1) 8 +(10, 40, 1) 8 +(10, 41, 1) 8 +(10, 42, 1) 8 +(10, 43, 1) 8 +(10, 44, 1) 9 +(10, 45, 1) 9 +(10, 46, 1) 9 +(10, 47, 1) 9 +(10, 48, 1) 9 +(10, 49, 1) 9 +(10, 50, 1) 9 +(10, 51, 1) 9 +(10, 52, 1) 9 +(10, 53, 1) 9 +(10, 54, 1) 9 +(10, 55, 1) 9 +(10, 56, 1) 9 +(10, 57, 1) 9 +(10, 58, 1) 8 +(10, 59, 1) 8 +(10, 60, 1) 8 +(10, 61, 1) 8 +(10, 62, 1) 8 +(10, 63, 1) 7 +(10, 64, 1) 7 +(10, 65, 1) 7 +(10, 66, 1) 6 +(10, 67, 1) 6 +(10, 68, 1) 6 +(10, 69, 1) 5 +(10, 70, 1) 5 +(10, 71, 1) 4 +(10, 72, 1) 4 +(10, 73, 1) 4 +(10, 74, 1) 3 +(10, 75, 1) 3 +(10, 76, 1) 2 +(10, 77, 1) 2 +(10, 78, 1) 1 +(10, 79, 1) 1 +(10, 80, 1) 0 +(11, 21, 1) 1 +(11, 22, 1) 1 +(11, 23, 1) 2 +(11, 24, 1) 2 +(11, 25, 1) 3 +(11, 26, 1) 3 +(11, 27, 1) 4 +(11, 28, 1) 4 +(11, 29, 1) 5 +(11, 30, 1) 5 +(11, 31, 1) 6 +(11, 32, 1) 6 +(11, 33, 1) 6 +(11, 34, 1) 7 +(11, 35, 1) 7 +(11, 36, 1) 8 +(11, 37, 1) 8 +(11, 38, 1) 8 +(11, 39, 1) 8 +(11, 40, 1) 9 +(11, 41, 1) 9 +(11, 42, 1) 9 +(11, 43, 1) 9 +(11, 44, 1) 9 +(11, 45, 1) 10 +(11, 46, 1) 10 +(11, 47, 1) 10 +(11, 48, 1) 10 +(11, 49, 1) 10 +(11, 50, 1) 10 +(11, 51, 1) 10 +(11, 52, 1) 10 +(11, 53, 1) 10 +(11, 54, 1) 10 +(11, 55, 1) 10 +(11, 56, 1) 10 +(11, 57, 1) 9 +(11, 58, 1) 9 +(11, 59, 1) 9 +(11, 60, 1) 9 +(11, 61, 1) 9 +(11, 62, 1) 8 +(11, 63, 1) 8 +(11, 64, 1) 8 +(11, 65, 1) 8 +(11, 66, 1) 7 +(11, 67, 1) 7 +(11, 68, 1) 6 +(11, 69, 1) 6 +(11, 70, 1) 6 +(11, 71, 1) 5 +(11, 72, 1) 5 +(11, 73, 1) 4 +(11, 74, 1) 4 +(11, 75, 1) 3 +(11, 76, 1) 3 +(11, 77, 1) 2 +(11, 78, 1) 2 +(11, 79, 1) 1 +(11, 80, 1) 1 +(12, 21, 1) 1 +(12, 22, 1) 2 +(12, 23, 1) 3 +(12, 24, 1) 3 +(12, 25, 1) 4 +(12, 26, 1) 4 +(12, 27, 1) 5 +(12, 28, 1) 5 +(12, 29, 1) 6 +(12, 30, 1) 6 +(12, 31, 1) 7 +(12, 32, 1) 7 +(12, 33, 1) 7 +(12, 34, 1) 8 +(12, 35, 1) 8 +(12, 36, 1) 8 +(12, 37, 1) 9 +(12, 38, 1) 9 +(12, 39, 1) 9 +(12, 40, 1) 10 +(12, 41, 1) 10 +(12, 42, 1) 10 +(12, 43, 1) 10 +(12, 44, 1) 10 +(12, 45, 1) 11 +(12, 46, 1) 11 +(12, 47, 1) 11 +(12, 48, 1) 11 +(12, 49, 1) 11 +(12, 50, 1) 11 +(12, 51, 1) 11 +(12, 52, 1) 11 +(12, 53, 1) 11 +(12, 54, 1) 11 +(12, 55, 1) 11 +(12, 56, 1) 11 +(12, 57, 1) 10 +(12, 58, 1) 10 +(12, 59, 1) 10 +(12, 60, 1) 10 +(12, 61, 1) 10 +(12, 62, 1) 9 +(12, 63, 1) 9 +(12, 64, 1) 9 +(12, 65, 1) 8 +(12, 66, 1) 8 +(12, 67, 1) 8 +(12, 68, 1) 7 +(12, 69, 1) 7 +(12, 70, 1) 7 +(12, 71, 1) 6 +(12, 72, 1) 6 +(12, 73, 1) 5 +(12, 74, 1) 5 +(12, 75, 1) 4 +(12, 76, 1) 4 +(12, 77, 1) 3 +(12, 78, 1) 3 +(12, 79, 1) 2 +(12, 80, 1) 1 +(13, 21, 1) 2 +(13, 22, 1) 3 +(13, 23, 1) 3 +(13, 24, 1) 4 +(13, 25, 1) 5 +(13, 26, 1) 5 +(13, 27, 1) 6 +(13, 28, 1) 6 +(13, 29, 1) 7 +(13, 30, 1) 7 +(13, 31, 1) 7 +(13, 32, 1) 8 +(13, 33, 1) 8 +(13, 34, 1) 9 +(13, 35, 1) 9 +(13, 36, 1) 9 +(13, 37, 1) 10 +(13, 38, 1) 10 +(13, 39, 1) 10 +(13, 40, 1) 11 +(13, 41, 1) 11 +(13, 42, 1) 11 +(13, 43, 1) 11 +(13, 44, 1) 11 +(13, 45, 1) 12 +(13, 46, 1) 12 +(13, 47, 1) 12 +(13, 48, 1) 12 +(13, 49, 1) 12 +(13, 50, 1) 12 +(13, 51, 1) 12 +(13, 52, 1) 12 +(13, 53, 1) 12 +(13, 54, 1) 12 +(13, 55, 1) 12 +(13, 56, 1) 12 +(13, 57, 1) 11 +(13, 58, 1) 11 +(13, 59, 1) 11 +(13, 60, 1) 11 +(13, 61, 1) 11 +(13, 62, 1) 10 +(13, 63, 1) 10 +(13, 64, 1) 10 +(13, 65, 1) 9 +(13, 66, 1) 9 +(13, 67, 1) 9 +(13, 68, 1) 8 +(13, 69, 1) 8 +(13, 70, 1) 7 +(13, 71, 1) 7 +(13, 72, 1) 7 +(13, 73, 1) 6 +(13, 74, 1) 6 +(13, 75, 1) 5 +(13, 76, 1) 5 +(13, 77, 1) 4 +(13, 78, 1) 3 +(13, 79, 1) 3 +(13, 80, 1) 2 +(14, 16, 1) 0 +(14, 17, 1) 1 +(14, 18, 1) 1 +(14, 19, 1) 2 +(14, 20, 1) 2 +(14, 21, 1) 3 +(14, 22, 1) 4 +(14, 23, 1) 4 +(14, 24, 1) 5 +(14, 25, 1) 5 +(14, 26, 1) 6 +(14, 27, 1) 6 +(14, 28, 1) 7 +(14, 29, 1) 7 +(14, 30, 1) 8 +(14, 31, 1) 8 +(14, 32, 1) 9 +(14, 33, 1) 9 +(14, 34, 1) 10 +(14, 35, 1) 10 +(14, 36, 1) 10 +(14, 37, 1) 11 +(14, 38, 1) 11 +(14, 39, 1) 11 +(14, 40, 1) 12 +(14, 41, 1) 12 +(14, 42, 1) 12 +(14, 43, 1) 12 +(14, 44, 1) 12 +(14, 45, 1) 13 +(14, 46, 1) 13 +(14, 47, 1) 13 +(14, 48, 1) 13 +(14, 49, 1) 13 +(14, 50, 1) 13 +(14, 51, 1) 13 +(14, 52, 1) 13 +(14, 53, 1) 13 +(14, 54, 1) 13 +(14, 55, 1) 13 +(14, 56, 1) 13 +(14, 57, 1) 12 +(14, 58, 1) 12 +(14, 59, 1) 12 +(14, 60, 1) 12 +(14, 61, 1) 12 +(14, 62, 1) 11 +(14, 63, 1) 11 +(14, 64, 1) 11 +(14, 65, 1) 10 +(14, 66, 1) 10 +(14, 67, 1) 10 +(14, 68, 1) 9 +(14, 69, 1) 9 +(14, 70, 1) 8 +(14, 71, 1) 8 +(14, 72, 1) 7 +(14, 73, 1) 7 +(14, 74, 1) 6 +(14, 75, 1) 6 +(14, 76, 1) 5 +(14, 77, 1) 5 +(14, 78, 1) 4 +(14, 79, 1) 4 +(14, 80, 1) 3 +(14, 81, 1) 2 +(14, 82, 1) 2 +(14, 83, 1) 1 +(14, 84, 1) 1 +(14, 85, 1) 0 +(15, 16, 1) 1 +(15, 17, 1) 1 +(15, 18, 1) 2 +(15, 19, 1) 3 +(15, 20, 1) 3 +(15, 21, 1) 4 +(15, 22, 1) 4 +(15, 23, 1) 5 +(15, 24, 1) 6 +(15, 25, 1) 6 +(15, 26, 1) 7 +(15, 27, 1) 7 +(15, 28, 1) 8 +(15, 29, 1) 8 +(15, 30, 1) 9 +(15, 31, 1) 9 +(15, 32, 1) 10 +(15, 33, 1) 10 +(15, 34, 1) 11 +(15, 35, 1) 11 +(15, 36, 1) 11 +(15, 37, 1) 12 +(15, 38, 1) 12 +(15, 39, 1) 12 +(15, 40, 1) 13 +(15, 41, 1) 13 +(15, 42, 1) 13 +(15, 43, 1) 13 +(15, 44, 1) 13 +(15, 45, 1) 14 +(15, 46, 1) 14 +(15, 47, 1) 14 +(15, 48, 1) 14 +(15, 49, 1) 14 +(15, 50, 1) 14 +(15, 51, 1) 14 +(15, 52, 1) 14 +(15, 53, 1) 14 +(15, 54, 1) 14 +(15, 55, 1) 14 +(15, 56, 1) 14 +(15, 57, 1) 13 +(15, 58, 1) 13 +(15, 59, 1) 13 +(15, 60, 1) 13 +(15, 61, 1) 13 +(15, 62, 1) 12 +(15, 63, 1) 12 +(15, 64, 1) 12 +(15, 65, 1) 11 +(15, 66, 1) 11 +(15, 67, 1) 11 +(15, 68, 1) 10 +(15, 69, 1) 10 +(15, 70, 1) 9 +(15, 71, 1) 9 +(15, 72, 1) 8 +(15, 73, 1) 8 +(15, 74, 1) 7 +(15, 75, 1) 7 +(15, 76, 1) 6 +(15, 77, 1) 6 +(15, 78, 1) 5 +(15, 79, 1) 4 +(15, 80, 1) 4 +(15, 81, 1) 3 +(15, 82, 1) 3 +(15, 83, 1) 2 +(15, 84, 1) 1 +(15, 85, 1) 1 +(16, 14, 1) 0 +(16, 15, 1) 1 +(16, 16, 1) 1 +(16, 17, 1) 2 +(16, 18, 1) 2 +(16, 19, 1) 3 +(16, 20, 1) 4 +(16, 21, 1) 4 +(16, 22, 1) 5 +(16, 23, 1) 6 +(16, 24, 1) 6 +(16, 25, 1) 7 +(16, 26, 1) 7 +(16, 27, 1) 8 +(16, 28, 1) 9 +(16, 29, 1) 9 +(16, 30, 1) 10 +(16, 31, 1) 10 +(16, 32, 1) 11 +(16, 33, 1) 11 +(16, 34, 1) 11 +(16, 35, 1) 12 +(16, 36, 1) 12 +(16, 37, 1) 13 +(16, 38, 1) 13 +(16, 39, 1) 13 +(16, 40, 1) 13 +(16, 41, 1) 14 +(16, 42, 1) 14 +(16, 43, 1) 14 +(16, 44, 1) 14 +(16, 45, 1) 15 +(16, 46, 1) 15 +(16, 47, 1) 15 +(16, 48, 1) 15 +(16, 49, 1) 15 +(16, 50, 1) 15 +(16, 51, 1) 15 +(16, 52, 1) 15 +(16, 53, 1) 15 +(16, 54, 1) 15 +(16, 55, 1) 15 +(16, 56, 1) 15 +(16, 57, 1) 14 +(16, 58, 1) 14 +(16, 59, 1) 14 +(16, 60, 1) 14 +(16, 61, 1) 13 +(16, 62, 1) 13 +(16, 63, 1) 13 +(16, 64, 1) 13 +(16, 65, 1) 12 +(16, 66, 1) 12 +(16, 67, 1) 11 +(16, 68, 1) 11 +(16, 69, 1) 11 +(16, 70, 1) 10 +(16, 71, 1) 10 +(16, 72, 1) 9 +(16, 73, 1) 9 +(16, 74, 1) 8 +(16, 75, 1) 7 +(16, 76, 1) 7 +(16, 77, 1) 6 +(16, 78, 1) 6 +(16, 79, 1) 5 +(16, 80, 1) 4 +(16, 81, 1) 4 +(16, 82, 1) 3 +(16, 83, 1) 2 +(16, 84, 1) 2 +(16, 85, 1) 1 +(16, 86, 1) 1 +(16, 87, 1) 0 +(17, 14, 1) 1 +(17, 15, 1) 1 +(17, 16, 1) 2 +(17, 17, 1) 3 +(17, 18, 1) 3 +(17, 19, 1) 4 +(17, 20, 1) 5 +(17, 21, 1) 5 +(17, 22, 1) 6 +(17, 23, 1) 6 +(17, 24, 1) 7 +(17, 25, 1) 8 +(17, 26, 1) 8 +(17, 27, 1) 9 +(17, 28, 1) 9 +(17, 29, 1) 10 +(17, 30, 1) 10 +(17, 31, 1) 11 +(17, 32, 1) 11 +(17, 33, 1) 12 +(17, 34, 1) 12 +(17, 35, 1) 13 +(17, 36, 1) 13 +(17, 37, 1) 13 +(17, 38, 1) 14 +(17, 39, 1) 14 +(17, 40, 1) 14 +(17, 41, 1) 15 +(17, 42, 1) 15 +(17, 43, 1) 15 +(17, 44, 1) 15 +(17, 45, 1) 16 +(17, 46, 1) 16 +(17, 47, 1) 16 +(17, 48, 1) 16 +(17, 49, 1) 16 +(17, 50, 1) 16 +(17, 51, 1) 16 +(17, 52, 1) 16 +(17, 53, 1) 16 +(17, 54, 1) 16 +(17, 55, 1) 16 +(17, 56, 1) 16 +(17, 57, 1) 15 +(17, 58, 1) 15 +(17, 59, 1) 15 +(17, 60, 1) 15 +(17, 61, 1) 14 +(17, 62, 1) 14 +(17, 63, 1) 14 +(17, 64, 1) 13 +(17, 65, 1) 13 +(17, 66, 1) 13 +(17, 67, 1) 12 +(17, 68, 1) 12 +(17, 69, 1) 11 +(17, 70, 1) 11 +(17, 71, 1) 10 +(17, 72, 1) 10 +(17, 73, 1) 9 +(17, 74, 1) 9 +(17, 75, 1) 8 +(17, 76, 1) 8 +(17, 77, 1) 7 +(17, 78, 1) 6 +(17, 79, 1) 6 +(17, 80, 1) 5 +(17, 81, 1) 5 +(17, 82, 1) 4 +(17, 83, 1) 3 +(17, 84, 1) 3 +(17, 85, 1) 2 +(17, 86, 1) 1 +(17, 87, 1) 1 +(18, 14, 1) 1 +(18, 15, 1) 2 +(18, 16, 1) 3 +(18, 17, 1) 3 +(18, 18, 1) 4 +(18, 19, 1) 5 +(18, 20, 1) 5 +(18, 21, 1) 6 +(18, 22, 1) 7 +(18, 23, 1) 7 +(18, 24, 1) 8 +(18, 25, 1) 8 +(18, 26, 1) 9 +(18, 27, 1) 10 +(18, 28, 1) 10 +(18, 29, 1) 11 +(18, 30, 1) 11 +(18, 31, 1) 12 +(18, 32, 1) 12 +(18, 33, 1) 13 +(18, 34, 1) 13 +(18, 35, 1) 14 +(18, 36, 1) 14 +(18, 37, 1) 14 +(18, 38, 1) 15 +(18, 39, 1) 15 +(18, 40, 1) 15 +(18, 41, 1) 16 +(18, 42, 1) 16 +(18, 43, 1) 16 +(18, 44, 1) 16 +(18, 45, 1) 17 +(18, 46, 1) 17 +(18, 47, 1) 17 +(18, 48, 1) 17 +(18, 49, 1) 17 +(18, 50, 1) 17 +(18, 51, 1) 17 +(18, 52, 1) 17 +(18, 53, 1) 17 +(18, 54, 1) 17 +(18, 55, 1) 17 +(18, 56, 1) 17 +(18, 57, 1) 16 +(18, 58, 1) 16 +(18, 59, 1) 16 +(18, 60, 1) 16 +(18, 61, 1) 15 +(18, 62, 1) 15 +(18, 63, 1) 15 +(18, 64, 1) 14 +(18, 65, 1) 14 +(18, 66, 1) 14 +(18, 67, 1) 13 +(18, 68, 1) 13 +(18, 69, 1) 12 +(18, 70, 1) 12 +(18, 71, 1) 11 +(18, 72, 1) 11 +(18, 73, 1) 10 +(18, 74, 1) 10 +(18, 75, 1) 9 +(18, 76, 1) 8 +(18, 77, 1) 8 +(18, 78, 1) 7 +(18, 79, 1) 7 +(18, 80, 1) 6 +(18, 81, 1) 5 +(18, 82, 1) 5 +(18, 83, 1) 4 +(18, 84, 1) 3 +(18, 85, 1) 3 +(18, 86, 1) 2 +(18, 87, 1) 1 +(19, 14, 1) 2 +(19, 15, 1) 3 +(19, 16, 1) 3 +(19, 17, 1) 4 +(19, 18, 1) 5 +(19, 19, 1) 5 +(19, 20, 1) 6 +(19, 21, 1) 7 +(19, 22, 1) 7 +(19, 23, 1) 8 +(19, 24, 1) 9 +(19, 25, 1) 9 +(19, 26, 1) 10 +(19, 27, 1) 10 +(19, 28, 1) 11 +(19, 29, 1) 12 +(19, 30, 1) 12 +(19, 31, 1) 13 +(19, 32, 1) 13 +(19, 33, 1) 14 +(19, 34, 1) 14 +(19, 35, 1) 15 +(19, 36, 1) 15 +(19, 37, 1) 15 +(19, 38, 1) 16 +(19, 39, 1) 16 +(19, 40, 1) 16 +(19, 41, 1) 17 +(19, 42, 1) 17 +(19, 43, 1) 17 +(19, 44, 1) 17 +(19, 45, 1) 18 +(19, 46, 1) 18 +(19, 47, 1) 18 +(19, 48, 1) 18 +(19, 49, 1) 18 +(19, 50, 1) 18 +(19, 51, 1) 18 +(19, 52, 1) 18 +(19, 53, 1) 18 +(19, 54, 1) 18 +(19, 55, 1) 18 +(19, 56, 1) 18 +(19, 57, 1) 17 +(19, 58, 1) 17 +(19, 59, 1) 17 +(19, 60, 1) 17 +(19, 61, 1) 16 +(19, 62, 1) 16 +(19, 63, 1) 16 +(19, 64, 1) 15 +(19, 65, 1) 15 +(19, 66, 1) 15 +(19, 67, 1) 14 +(19, 68, 1) 14 +(19, 69, 1) 13 +(19, 70, 1) 13 +(19, 71, 1) 12 +(19, 72, 1) 12 +(19, 73, 1) 11 +(19, 74, 1) 10 +(19, 75, 1) 10 +(19, 76, 1) 9 +(19, 77, 1) 9 +(19, 78, 1) 8 +(19, 79, 1) 7 +(19, 80, 1) 7 +(19, 81, 1) 6 +(19, 82, 1) 5 +(19, 83, 1) 5 +(19, 84, 1) 4 +(19, 85, 1) 3 +(19, 86, 1) 3 +(19, 87, 1) 2 +(20, 14, 1) 3 +(20, 15, 1) 3 +(20, 16, 1) 4 +(20, 17, 1) 5 +(20, 18, 1) 5 +(20, 19, 1) 6 +(20, 20, 1) 7 +(20, 21, 1) 7 +(20, 22, 1) 8 +(20, 23, 1) 9 +(20, 24, 1) 9 +(20, 25, 1) 10 +(20, 26, 1) 11 +(20, 27, 1) 11 +(20, 28, 1) 12 +(20, 29, 1) 12 +(20, 30, 1) 13 +(20, 31, 1) 14 +(20, 32, 1) 14 +(20, 33, 1) 15 +(20, 34, 1) 15 +(20, 35, 1) 15 +(20, 36, 1) 16 +(20, 37, 1) 16 +(20, 38, 1) 17 +(20, 39, 1) 17 +(20, 40, 1) 17 +(20, 41, 1) 18 +(20, 42, 1) 18 +(20, 43, 1) 18 +(20, 44, 1) 18 +(20, 45, 1) 19 +(20, 46, 1) 19 +(20, 47, 1) 19 +(20, 48, 1) 19 +(20, 49, 1) 19 +(20, 50, 1) 19 +(20, 51, 1) 19 +(20, 52, 1) 19 +(20, 53, 1) 19 +(20, 54, 1) 19 +(20, 55, 1) 19 +(20, 56, 1) 19 +(20, 57, 1) 18 +(20, 58, 1) 18 +(20, 59, 1) 18 +(20, 60, 1) 18 +(20, 61, 1) 17 +(20, 62, 1) 17 +(20, 63, 1) 17 +(20, 64, 1) 16 +(20, 65, 1) 16 +(20, 66, 1) 15 +(20, 67, 1) 15 +(20, 68, 1) 15 +(20, 69, 1) 14 +(20, 70, 1) 14 +(20, 71, 1) 13 +(20, 72, 1) 12 +(20, 73, 1) 12 +(20, 74, 1) 11 +(20, 75, 1) 11 +(20, 76, 1) 10 +(20, 77, 1) 9 +(20, 78, 1) 9 +(20, 79, 1) 8 +(20, 80, 1) 7 +(20, 81, 1) 7 +(20, 82, 1) 6 +(20, 83, 1) 5 +(20, 84, 1) 5 +(20, 85, 1) 4 +(20, 86, 1) 3 +(20, 87, 1) 3 +(21, 9, 1) 0 +(21, 10, 1) 0 +(21, 11, 1) 1 +(21, 12, 1) 1 +(21, 13, 1) 2 +(21, 14, 1) 3 +(21, 15, 1) 4 +(21, 16, 1) 4 +(21, 17, 1) 5 +(21, 18, 1) 6 +(21, 19, 1) 7 +(21, 20, 1) 7 +(21, 21, 1) 8 +(21, 22, 1) 9 +(21, 23, 1) 9 +(21, 24, 1) 10 +(21, 25, 1) 11 +(21, 26, 1) 11 +(21, 27, 1) 12 +(21, 28, 1) 13 +(21, 29, 1) 13 +(21, 30, 1) 14 +(21, 31, 1) 14 +(21, 32, 1) 15 +(21, 33, 1) 15 +(21, 34, 1) 16 +(21, 35, 1) 16 +(21, 36, 1) 17 +(21, 37, 1) 17 +(21, 38, 1) 18 +(21, 39, 1) 18 +(21, 40, 1) 18 +(21, 41, 1) 19 +(21, 42, 1) 19 +(21, 43, 1) 19 +(21, 44, 1) 19 +(21, 45, 1) 20 +(21, 46, 1) 20 +(21, 47, 1) 20 +(21, 48, 1) 20 +(21, 49, 1) 20 +(21, 50, 1) 20 +(21, 51, 1) 20 +(21, 52, 1) 20 +(21, 53, 1) 20 +(21, 54, 1) 20 +(21, 55, 1) 20 +(21, 56, 1) 20 +(21, 57, 1) 19 +(21, 58, 1) 19 +(21, 59, 1) 19 +(21, 60, 1) 19 +(21, 61, 1) 18 +(21, 62, 1) 18 +(21, 63, 1) 18 +(21, 64, 1) 17 +(21, 65, 1) 17 +(21, 66, 1) 16 +(21, 67, 1) 16 +(21, 68, 1) 15 +(21, 69, 1) 15 +(21, 70, 1) 14 +(21, 71, 1) 14 +(21, 72, 1) 13 +(21, 73, 1) 13 +(21, 74, 1) 12 +(21, 75, 1) 11 +(21, 76, 1) 11 +(21, 77, 1) 10 +(21, 78, 1) 9 +(21, 79, 1) 9 +(21, 80, 1) 8 +(21, 81, 1) 7 +(21, 82, 1) 7 +(21, 83, 1) 6 +(21, 84, 1) 5 +(21, 85, 1) 4 +(21, 86, 1) 4 +(21, 87, 1) 3 +(21, 88, 1) 2 +(21, 89, 1) 1 +(21, 90, 1) 1 +(21, 91, 1) 0 +(21, 92, 1) 0 +(22, 9, 1) 0 +(22, 10, 1) 1 +(22, 11, 1) 1 +(22, 12, 1) 2 +(22, 13, 1) 3 +(22, 14, 1) 4 +(22, 15, 1) 4 +(22, 16, 1) 5 +(22, 17, 1) 6 +(22, 18, 1) 7 +(22, 19, 1) 7 +(22, 20, 1) 8 +(22, 21, 1) 9 +(22, 22, 1) 9 +(22, 23, 1) 10 +(22, 24, 1) 11 +(22, 25, 1) 12 +(22, 26, 1) 12 +(22, 27, 1) 13 +(22, 28, 1) 13 +(22, 29, 1) 14 +(22, 30, 1) 15 +(22, 31, 1) 15 +(22, 32, 1) 16 +(22, 33, 1) 16 +(22, 34, 1) 17 +(22, 35, 1) 17 +(22, 36, 1) 18 +(22, 37, 1) 18 +(22, 38, 1) 18 +(22, 39, 1) 19 +(22, 40, 1) 19 +(22, 41, 1) 20 +(22, 42, 1) 20 +(22, 43, 1) 20 +(22, 44, 1) 20 +(22, 45, 1) 20 +(22, 46, 1) 21 +(22, 47, 1) 21 +(22, 48, 1) 21 +(22, 49, 1) 21 +(22, 50, 1) 21 +(22, 51, 1) 21 +(22, 52, 1) 21 +(22, 53, 1) 21 +(22, 54, 1) 21 +(22, 55, 1) 21 +(22, 56, 1) 20 +(22, 57, 1) 20 +(22, 58, 1) 20 +(22, 59, 1) 20 +(22, 60, 1) 20 +(22, 61, 1) 19 +(22, 62, 1) 19 +(22, 63, 1) 18 +(22, 64, 1) 18 +(22, 65, 1) 18 +(22, 66, 1) 17 +(22, 67, 1) 17 +(22, 68, 1) 16 +(22, 69, 1) 16 +(22, 70, 1) 15 +(22, 71, 1) 15 +(22, 72, 1) 14 +(22, 73, 1) 13 +(22, 74, 1) 13 +(22, 75, 1) 12 +(22, 76, 1) 12 +(22, 77, 1) 11 +(22, 78, 1) 10 +(22, 79, 1) 9 +(22, 80, 1) 9 +(22, 81, 1) 8 +(22, 82, 1) 7 +(22, 83, 1) 7 +(22, 84, 1) 6 +(22, 85, 1) 5 +(22, 86, 1) 4 +(22, 87, 1) 4 +(22, 88, 1) 3 +(22, 89, 1) 2 +(22, 90, 1) 1 +(22, 91, 1) 1 +(22, 92, 1) 0 +(23, 9, 1) 0 +(23, 10, 1) 1 +(23, 11, 1) 2 +(23, 12, 1) 3 +(23, 13, 1) 3 +(23, 14, 1) 4 +(23, 15, 1) 5 +(23, 16, 1) 6 +(23, 17, 1) 7 +(23, 18, 1) 7 +(23, 19, 1) 8 +(23, 20, 1) 9 +(23, 21, 1) 9 +(23, 22, 1) 10 +(23, 23, 1) 11 +(23, 24, 1) 12 +(23, 25, 1) 12 +(23, 26, 1) 13 +(23, 27, 1) 14 +(23, 28, 1) 14 +(23, 29, 1) 15 +(23, 30, 1) 15 +(23, 31, 1) 16 +(23, 32, 1) 17 +(23, 33, 1) 17 +(23, 34, 1) 18 +(23, 35, 1) 18 +(23, 36, 1) 19 +(23, 37, 1) 19 +(23, 38, 1) 19 +(23, 39, 1) 20 +(23, 40, 1) 20 +(23, 41, 1) 20 +(23, 42, 1) 21 +(23, 43, 1) 21 +(23, 44, 1) 21 +(23, 45, 1) 21 +(23, 46, 1) 22 +(23, 47, 1) 22 +(23, 48, 1) 22 +(23, 49, 1) 22 +(23, 50, 1) 22 +(23, 51, 1) 22 +(23, 52, 1) 22 +(23, 53, 1) 22 +(23, 54, 1) 22 +(23, 55, 1) 22 +(23, 56, 1) 21 +(23, 57, 1) 21 +(23, 58, 1) 21 +(23, 59, 1) 21 +(23, 60, 1) 20 +(23, 61, 1) 20 +(23, 62, 1) 20 +(23, 63, 1) 19 +(23, 64, 1) 19 +(23, 65, 1) 19 +(23, 66, 1) 18 +(23, 67, 1) 18 +(23, 68, 1) 17 +(23, 69, 1) 17 +(23, 70, 1) 16 +(23, 71, 1) 15 +(23, 72, 1) 15 +(23, 73, 1) 14 +(23, 74, 1) 14 +(23, 75, 1) 13 +(23, 76, 1) 12 +(23, 77, 1) 12 +(23, 78, 1) 11 +(23, 79, 1) 10 +(23, 80, 1) 9 +(23, 81, 1) 9 +(23, 82, 1) 8 +(23, 83, 1) 7 +(23, 84, 1) 7 +(23, 85, 1) 6 +(23, 86, 1) 5 +(23, 87, 1) 4 +(23, 88, 1) 3 +(23, 89, 1) 3 +(23, 90, 1) 2 +(23, 91, 1) 1 +(23, 92, 1) 0 +(24, 9, 1) 1 +(24, 10, 1) 2 +(24, 11, 1) 2 +(24, 12, 1) 3 +(24, 13, 1) 4 +(24, 14, 1) 5 +(24, 15, 1) 6 +(24, 16, 1) 6 +(24, 17, 1) 7 +(24, 18, 1) 8 +(24, 19, 1) 9 +(24, 20, 1) 9 +(24, 21, 1) 10 +(24, 22, 1) 11 +(24, 23, 1) 12 +(24, 24, 1) 12 +(24, 25, 1) 13 +(24, 26, 1) 14 +(24, 27, 1) 14 +(24, 28, 1) 15 +(24, 29, 1) 16 +(24, 30, 1) 16 +(24, 31, 1) 17 +(24, 32, 1) 17 +(24, 33, 1) 18 +(24, 34, 1) 18 +(24, 35, 1) 19 +(24, 36, 1) 19 +(24, 37, 1) 20 +(24, 38, 1) 20 +(24, 39, 1) 21 +(24, 40, 1) 21 +(24, 41, 1) 21 +(24, 42, 1) 22 +(24, 43, 1) 22 +(24, 44, 1) 22 +(24, 45, 1) 22 +(24, 46, 1) 23 +(24, 47, 1) 23 +(24, 48, 1) 23 +(24, 49, 1) 23 +(24, 50, 1) 23 +(24, 51, 1) 23 +(24, 52, 1) 23 +(24, 53, 1) 23 +(24, 54, 1) 23 +(24, 55, 1) 23 +(24, 56, 1) 22 +(24, 57, 1) 22 +(24, 58, 1) 22 +(24, 59, 1) 22 +(24, 60, 1) 21 +(24, 61, 1) 21 +(24, 62, 1) 21 +(24, 63, 1) 20 +(24, 64, 1) 20 +(24, 65, 1) 19 +(24, 66, 1) 19 +(24, 67, 1) 18 +(24, 68, 1) 18 +(24, 69, 1) 17 +(24, 70, 1) 17 +(24, 71, 1) 16 +(24, 72, 1) 16 +(24, 73, 1) 15 +(24, 74, 1) 14 +(24, 75, 1) 14 +(24, 76, 1) 13 +(24, 77, 1) 12 +(24, 78, 1) 12 +(24, 79, 1) 11 +(24, 80, 1) 10 +(24, 81, 1) 9 +(24, 82, 1) 9 +(24, 83, 1) 8 +(24, 84, 1) 7 +(24, 85, 1) 6 +(24, 86, 1) 6 +(24, 87, 1) 5 +(24, 88, 1) 4 +(24, 89, 1) 3 +(24, 90, 1) 2 +(24, 91, 1) 2 +(24, 92, 1) 1 +(25, 9, 1) 1 +(25, 10, 1) 2 +(25, 11, 1) 3 +(25, 12, 1) 4 +(25, 13, 1) 5 +(25, 14, 1) 5 +(25, 15, 1) 6 +(25, 16, 1) 7 +(25, 17, 1) 8 +(25, 18, 1) 9 +(25, 19, 1) 9 +(25, 20, 1) 10 +(25, 21, 1) 11 +(25, 22, 1) 12 +(25, 23, 1) 12 +(25, 24, 1) 13 +(25, 25, 1) 14 +(25, 26, 1) 14 +(25, 27, 1) 15 +(25, 28, 1) 16 +(25, 29, 1) 16 +(25, 30, 1) 17 +(25, 31, 1) 18 +(25, 32, 1) 18 +(25, 33, 1) 19 +(25, 34, 1) 19 +(25, 35, 1) 20 +(25, 36, 1) 20 +(25, 37, 1) 21 +(25, 38, 1) 21 +(25, 39, 1) 22 +(25, 40, 1) 22 +(25, 41, 1) 22 +(25, 42, 1) 23 +(25, 43, 1) 23 +(25, 44, 1) 23 +(25, 45, 1) 23 +(25, 46, 1) 24 +(25, 47, 1) 24 +(25, 48, 1) 24 +(25, 49, 1) 24 +(25, 50, 1) 24 +(25, 51, 1) 24 +(25, 52, 1) 24 +(25, 53, 1) 24 +(25, 54, 1) 24 +(25, 55, 1) 24 +(25, 56, 1) 23 +(25, 57, 1) 23 +(25, 58, 1) 23 +(25, 59, 1) 23 +(25, 60, 1) 22 +(25, 61, 1) 22 +(25, 62, 1) 22 +(25, 63, 1) 21 +(25, 64, 1) 21 +(25, 65, 1) 20 +(25, 66, 1) 20 +(25, 67, 1) 19 +(25, 68, 1) 19 +(25, 69, 1) 18 +(25, 70, 1) 18 +(25, 71, 1) 17 +(25, 72, 1) 16 +(25, 73, 1) 16 +(25, 74, 1) 15 +(25, 75, 1) 14 +(25, 76, 1) 14 +(25, 77, 1) 13 +(25, 78, 1) 12 +(25, 79, 1) 12 +(25, 80, 1) 11 +(25, 81, 1) 10 +(25, 82, 1) 9 +(25, 83, 1) 9 +(25, 84, 1) 8 +(25, 85, 1) 7 +(25, 86, 1) 6 +(25, 87, 1) 5 +(25, 88, 1) 5 +(25, 89, 1) 4 +(25, 90, 1) 3 +(25, 91, 1) 2 +(25, 92, 1) 1 +(26, 6, 1) 0 +(26, 7, 1) 0 +(26, 8, 1) 1 +(26, 9, 1) 2 +(26, 10, 1) 3 +(26, 11, 1) 3 +(26, 12, 1) 4 +(26, 13, 1) 5 +(26, 14, 1) 6 +(26, 15, 1) 7 +(26, 16, 1) 7 +(26, 17, 1) 8 +(26, 18, 1) 9 +(26, 19, 1) 10 +(26, 20, 1) 11 +(26, 21, 1) 11 +(26, 22, 1) 12 +(26, 23, 1) 13 +(26, 24, 1) 14 +(26, 25, 1) 14 +(26, 26, 1) 15 +(26, 27, 1) 16 +(26, 28, 1) 16 +(26, 29, 1) 17 +(26, 30, 1) 18 +(26, 31, 1) 18 +(26, 32, 1) 19 +(26, 33, 1) 19 +(26, 34, 1) 20 +(26, 35, 1) 21 +(26, 36, 1) 21 +(26, 37, 1) 22 +(26, 38, 1) 22 +(26, 39, 1) 22 +(26, 40, 1) 23 +(26, 41, 1) 23 +(26, 42, 1) 24 +(26, 43, 1) 24 +(26, 44, 1) 24 +(26, 45, 1) 24 +(26, 46, 1) 25 +(26, 47, 1) 25 +(26, 48, 1) 25 +(26, 49, 1) 25 +(26, 50, 1) 25 +(26, 51, 1) 25 +(26, 52, 1) 25 +(26, 53, 1) 25 +(26, 54, 1) 25 +(26, 55, 1) 25 +(26, 56, 1) 24 +(26, 57, 1) 24 +(26, 58, 1) 24 +(26, 59, 1) 24 +(26, 60, 1) 23 +(26, 61, 1) 23 +(26, 62, 1) 22 +(26, 63, 1) 22 +(26, 64, 1) 22 +(26, 65, 1) 21 +(26, 66, 1) 21 +(26, 67, 1) 20 +(26, 68, 1) 19 +(26, 69, 1) 19 +(26, 70, 1) 18 +(26, 71, 1) 18 +(26, 72, 1) 17 +(26, 73, 1) 16 +(26, 74, 1) 16 +(26, 75, 1) 15 +(26, 76, 1) 14 +(26, 77, 1) 14 +(26, 78, 1) 13 +(26, 79, 1) 12 +(26, 80, 1) 11 +(26, 81, 1) 11 +(26, 82, 1) 10 +(26, 83, 1) 9 +(26, 84, 1) 8 +(26, 85, 1) 7 +(26, 86, 1) 7 +(26, 87, 1) 6 +(26, 88, 1) 5 +(26, 89, 1) 4 +(26, 90, 1) 3 +(26, 91, 1) 3 +(26, 92, 1) 2 +(26, 93, 1) 1 +(26, 94, 1) 0 +(26, 95, 1) 0 +(27, 6, 1) 0 +(27, 7, 1) 0 +(27, 8, 1) 1 +(27, 9, 1) 2 +(27, 10, 1) 3 +(27, 11, 1) 4 +(27, 12, 1) 5 +(27, 13, 1) 6 +(27, 14, 1) 6 +(27, 15, 1) 7 +(27, 16, 1) 8 +(27, 17, 1) 9 +(27, 18, 1) 10 +(27, 19, 1) 10 +(27, 20, 1) 11 +(27, 21, 1) 12 +(27, 22, 1) 13 +(27, 23, 1) 14 +(27, 24, 1) 14 +(27, 25, 1) 15 +(27, 26, 1) 16 +(27, 27, 1) 16 +(27, 28, 1) 17 +(27, 29, 1) 18 +(27, 30, 1) 18 +(27, 31, 1) 19 +(27, 32, 1) 20 +(27, 33, 1) 20 +(27, 34, 1) 21 +(27, 35, 1) 21 +(27, 36, 1) 22 +(27, 37, 1) 22 +(27, 38, 1) 23 +(27, 39, 1) 23 +(27, 40, 1) 24 +(27, 41, 1) 24 +(27, 42, 1) 25 +(27, 43, 1) 25 +(27, 44, 1) 25 +(27, 45, 1) 25 +(27, 46, 1) 26 +(27, 47, 1) 26 +(27, 48, 1) 26 +(27, 49, 1) 26 +(27, 50, 1) 26 +(27, 51, 1) 26 +(27, 52, 1) 26 +(27, 53, 1) 26 +(27, 54, 1) 26 +(27, 55, 1) 26 +(27, 56, 1) 25 +(27, 57, 1) 25 +(27, 58, 1) 25 +(27, 59, 1) 25 +(27, 60, 1) 24 +(27, 61, 1) 24 +(27, 62, 1) 23 +(27, 63, 1) 23 +(27, 64, 1) 22 +(27, 65, 1) 22 +(27, 66, 1) 21 +(27, 67, 1) 21 +(27, 68, 1) 20 +(27, 69, 1) 20 +(27, 70, 1) 19 +(27, 71, 1) 18 +(27, 72, 1) 18 +(27, 73, 1) 17 +(27, 74, 1) 16 +(27, 75, 1) 16 +(27, 76, 1) 15 +(27, 77, 1) 14 +(27, 78, 1) 14 +(27, 79, 1) 13 +(27, 80, 1) 12 +(27, 81, 1) 11 +(27, 82, 1) 10 +(27, 83, 1) 10 +(27, 84, 1) 9 +(27, 85, 1) 8 +(27, 86, 1) 7 +(27, 87, 1) 6 +(27, 88, 1) 6 +(27, 89, 1) 5 +(27, 90, 1) 4 +(27, 91, 1) 3 +(27, 92, 1) 2 +(27, 93, 1) 1 +(27, 94, 1) 0 +(27, 95, 1) 0 +(28, 6, 1) 0 +(28, 7, 1) 1 +(28, 8, 1) 2 +(28, 9, 1) 3 +(28, 10, 1) 4 +(28, 11, 1) 4 +(28, 12, 1) 5 +(28, 13, 1) 6 +(28, 14, 1) 7 +(28, 15, 1) 8 +(28, 16, 1) 9 +(28, 17, 1) 9 +(28, 18, 1) 10 +(28, 19, 1) 11 +(28, 20, 1) 12 +(28, 21, 1) 13 +(28, 22, 1) 13 +(28, 23, 1) 14 +(28, 24, 1) 15 +(28, 25, 1) 16 +(28, 26, 1) 16 +(28, 27, 1) 17 +(28, 28, 1) 18 +(28, 29, 1) 19 +(28, 30, 1) 19 +(28, 31, 1) 20 +(28, 32, 1) 20 +(28, 33, 1) 21 +(28, 34, 1) 22 +(28, 35, 1) 22 +(28, 36, 1) 23 +(28, 37, 1) 23 +(28, 38, 1) 24 +(28, 39, 1) 24 +(28, 40, 1) 25 +(28, 41, 1) 25 +(28, 42, 1) 25 +(28, 43, 1) 26 +(28, 44, 1) 26 +(28, 45, 1) 26 +(28, 46, 1) 27 +(28, 47, 1) 27 +(28, 48, 1) 27 +(28, 49, 1) 27 +(28, 50, 1) 27 +(28, 51, 1) 27 +(28, 52, 1) 27 +(28, 53, 1) 27 +(28, 54, 1) 27 +(28, 55, 1) 27 +(28, 56, 1) 26 +(28, 57, 1) 26 +(28, 58, 1) 26 +(28, 59, 1) 25 +(28, 60, 1) 25 +(28, 61, 1) 25 +(28, 62, 1) 24 +(28, 63, 1) 24 +(28, 64, 1) 23 +(28, 65, 1) 23 +(28, 66, 1) 22 +(28, 67, 1) 22 +(28, 68, 1) 21 +(28, 69, 1) 20 +(28, 70, 1) 20 +(28, 71, 1) 19 +(28, 72, 1) 19 +(28, 73, 1) 18 +(28, 74, 1) 17 +(28, 75, 1) 16 +(28, 76, 1) 16 +(28, 77, 1) 15 +(28, 78, 1) 14 +(28, 79, 1) 13 +(28, 80, 1) 13 +(28, 81, 1) 12 +(28, 82, 1) 11 +(28, 83, 1) 10 +(28, 84, 1) 9 +(28, 85, 1) 9 +(28, 86, 1) 8 +(28, 87, 1) 7 +(28, 88, 1) 6 +(28, 89, 1) 5 +(28, 90, 1) 4 +(28, 91, 1) 4 +(28, 92, 1) 3 +(28, 93, 1) 2 +(28, 94, 1) 1 +(28, 95, 1) 0 +(29, 6, 1) 1 +(29, 7, 1) 1 +(29, 8, 1) 2 +(29, 9, 1) 3 +(29, 10, 1) 4 +(29, 11, 1) 5 +(29, 12, 1) 6 +(29, 13, 1) 7 +(29, 14, 1) 7 +(29, 15, 1) 8 +(29, 16, 1) 9 +(29, 17, 1) 10 +(29, 18, 1) 11 +(29, 19, 1) 12 +(29, 20, 1) 12 +(29, 21, 1) 13 +(29, 22, 1) 14 +(29, 23, 1) 15 +(29, 24, 1) 16 +(29, 25, 1) 16 +(29, 26, 1) 17 +(29, 27, 1) 18 +(29, 28, 1) 19 +(29, 29, 1) 19 +(29, 30, 1) 20 +(29, 31, 1) 21 +(29, 32, 1) 21 +(29, 33, 1) 22 +(29, 34, 1) 23 +(29, 35, 1) 23 +(29, 36, 1) 24 +(29, 37, 1) 24 +(29, 38, 1) 25 +(29, 39, 1) 25 +(29, 40, 1) 26 +(29, 41, 1) 26 +(29, 42, 1) 26 +(29, 43, 1) 27 +(29, 44, 1) 27 +(29, 45, 1) 27 +(29, 46, 1) 28 +(29, 47, 1) 28 +(29, 48, 1) 28 +(29, 49, 1) 28 +(29, 50, 1) 28 +(29, 51, 1) 28 +(29, 52, 1) 28 +(29, 53, 1) 28 +(29, 54, 1) 28 +(29, 55, 1) 28 +(29, 56, 1) 27 +(29, 57, 1) 27 +(29, 58, 1) 27 +(29, 59, 1) 26 +(29, 60, 1) 26 +(29, 61, 1) 26 +(29, 62, 1) 25 +(29, 63, 1) 25 +(29, 64, 1) 24 +(29, 65, 1) 24 +(29, 66, 1) 23 +(29, 67, 1) 23 +(29, 68, 1) 22 +(29, 69, 1) 21 +(29, 70, 1) 21 +(29, 71, 1) 20 +(29, 72, 1) 19 +(29, 73, 1) 19 +(29, 74, 1) 18 +(29, 75, 1) 17 +(29, 76, 1) 16 +(29, 77, 1) 16 +(29, 78, 1) 15 +(29, 79, 1) 14 +(29, 80, 1) 13 +(29, 81, 1) 12 +(29, 82, 1) 12 +(29, 83, 1) 11 +(29, 84, 1) 10 +(29, 85, 1) 9 +(29, 86, 1) 8 +(29, 87, 1) 7 +(29, 88, 1) 7 +(29, 89, 1) 6 +(29, 90, 1) 5 +(29, 91, 1) 4 +(29, 92, 1) 3 +(29, 93, 1) 2 +(29, 94, 1) 1 +(29, 95, 1) 1 +(30, 6, 1) 1 +(30, 7, 1) 2 +(30, 8, 1) 3 +(30, 9, 1) 4 +(30, 10, 1) 5 +(30, 11, 1) 5 +(30, 12, 1) 6 +(30, 13, 1) 7 +(30, 14, 1) 8 +(30, 15, 1) 9 +(30, 16, 1) 10 +(30, 17, 1) 11 +(30, 18, 1) 11 +(30, 19, 1) 12 +(30, 20, 1) 13 +(30, 21, 1) 14 +(30, 22, 1) 15 +(30, 23, 1) 15 +(30, 24, 1) 16 +(30, 25, 1) 17 +(30, 26, 1) 18 +(30, 27, 1) 19 +(30, 28, 1) 19 +(30, 29, 1) 20 +(30, 30, 1) 21 +(30, 31, 1) 21 +(30, 32, 1) 22 +(30, 33, 1) 23 +(30, 34, 1) 23 +(30, 35, 1) 24 +(30, 36, 1) 24 +(30, 37, 1) 25 +(30, 38, 1) 26 +(30, 39, 1) 26 +(30, 40, 1) 27 +(30, 41, 1) 27 +(30, 42, 1) 27 +(30, 43, 1) 28 +(30, 44, 1) 28 +(30, 45, 1) 28 +(30, 46, 1) 29 +(30, 47, 1) 29 +(30, 48, 1) 29 +(30, 49, 1) 29 +(30, 50, 1) 29 +(30, 51, 1) 29 +(30, 52, 1) 29 +(30, 53, 1) 29 +(30, 54, 1) 29 +(30, 55, 1) 29 +(30, 56, 1) 28 +(30, 57, 1) 28 +(30, 58, 1) 28 +(30, 59, 1) 27 +(30, 60, 1) 27 +(30, 61, 1) 27 +(30, 62, 1) 26 +(30, 63, 1) 26 +(30, 64, 1) 25 +(30, 65, 1) 24 +(30, 66, 1) 24 +(30, 67, 1) 23 +(30, 68, 1) 23 +(30, 69, 1) 22 +(30, 70, 1) 21 +(30, 71, 1) 21 +(30, 72, 1) 20 +(30, 73, 1) 19 +(30, 74, 1) 19 +(30, 75, 1) 18 +(30, 76, 1) 17 +(30, 77, 1) 16 +(30, 78, 1) 15 +(30, 79, 1) 15 +(30, 80, 1) 14 +(30, 81, 1) 13 +(30, 82, 1) 12 +(30, 83, 1) 11 +(30, 84, 1) 11 +(30, 85, 1) 10 +(30, 86, 1) 9 +(30, 87, 1) 8 +(30, 88, 1) 7 +(30, 89, 1) 6 +(30, 90, 1) 5 +(30, 91, 1) 5 +(30, 92, 1) 4 +(30, 93, 1) 3 +(30, 94, 1) 2 +(30, 95, 1) 1 +(31, 6, 1) 1 +(31, 7, 1) 2 +(31, 8, 1) 3 +(31, 9, 1) 4 +(31, 10, 1) 5 +(31, 11, 1) 6 +(31, 12, 1) 7 +(31, 13, 1) 7 +(31, 14, 1) 8 +(31, 15, 1) 9 +(31, 16, 1) 10 +(31, 17, 1) 11 +(31, 18, 1) 12 +(31, 19, 1) 13 +(31, 20, 1) 13 +(31, 21, 1) 14 +(31, 22, 1) 15 +(31, 23, 1) 16 +(31, 24, 1) 17 +(31, 25, 1) 18 +(31, 26, 1) 18 +(31, 27, 1) 19 +(31, 28, 1) 20 +(31, 29, 1) 21 +(31, 30, 1) 21 +(31, 31, 1) 22 +(31, 32, 1) 23 +(31, 33, 1) 23 +(31, 34, 1) 24 +(31, 35, 1) 25 +(31, 36, 1) 25 +(31, 37, 1) 26 +(31, 38, 1) 26 +(31, 39, 1) 27 +(31, 40, 1) 27 +(31, 41, 1) 28 +(31, 42, 1) 28 +(31, 43, 1) 29 +(31, 44, 1) 29 +(31, 45, 1) 29 +(31, 46, 1) 30 +(31, 47, 1) 30 +(31, 48, 1) 30 +(31, 49, 1) 30 +(31, 50, 1) 30 +(31, 51, 1) 30 +(31, 52, 1) 30 +(31, 53, 1) 30 +(31, 54, 1) 30 +(31, 55, 1) 30 +(31, 56, 1) 29 +(31, 57, 1) 29 +(31, 58, 1) 29 +(31, 59, 1) 28 +(31, 60, 1) 28 +(31, 61, 1) 27 +(31, 62, 1) 27 +(31, 63, 1) 26 +(31, 64, 1) 26 +(31, 65, 1) 25 +(31, 66, 1) 25 +(31, 67, 1) 24 +(31, 68, 1) 23 +(31, 69, 1) 23 +(31, 70, 1) 22 +(31, 71, 1) 21 +(31, 72, 1) 21 +(31, 73, 1) 20 +(31, 74, 1) 19 +(31, 75, 1) 18 +(31, 76, 1) 18 +(31, 77, 1) 17 +(31, 78, 1) 16 +(31, 79, 1) 15 +(31, 80, 1) 14 +(31, 81, 1) 13 +(31, 82, 1) 13 +(31, 83, 1) 12 +(31, 84, 1) 11 +(31, 85, 1) 10 +(31, 86, 1) 9 +(31, 87, 1) 8 +(31, 88, 1) 7 +(31, 89, 1) 7 +(31, 90, 1) 6 +(31, 91, 1) 5 +(31, 92, 1) 4 +(31, 93, 1) 3 +(31, 94, 1) 2 +(31, 95, 1) 1 +(32, 6, 1) 2 +(32, 7, 1) 2 +(32, 8, 1) 3 +(32, 9, 1) 4 +(32, 10, 1) 5 +(32, 11, 1) 6 +(32, 12, 1) 7 +(32, 13, 1) 8 +(32, 14, 1) 9 +(32, 15, 1) 10 +(32, 16, 1) 11 +(32, 17, 1) 11 +(32, 18, 1) 12 +(32, 19, 1) 13 +(32, 20, 1) 14 +(32, 21, 1) 15 +(32, 22, 1) 16 +(32, 23, 1) 17 +(32, 24, 1) 17 +(32, 25, 1) 18 +(32, 26, 1) 19 +(32, 27, 1) 20 +(32, 28, 1) 20 +(32, 29, 1) 21 +(32, 30, 1) 22 +(32, 31, 1) 23 +(32, 32, 1) 23 +(32, 33, 1) 24 +(32, 34, 1) 25 +(32, 35, 1) 25 +(32, 36, 1) 26 +(32, 37, 1) 27 +(32, 38, 1) 27 +(32, 39, 1) 28 +(32, 40, 1) 28 +(32, 41, 1) 29 +(32, 42, 1) 29 +(32, 43, 1) 30 +(32, 44, 1) 30 +(32, 45, 1) 30 +(32, 46, 1) 30 +(32, 47, 1) 31 +(32, 48, 1) 31 +(32, 49, 1) 31 +(32, 50, 1) 31 +(32, 51, 1) 31 +(32, 52, 1) 31 +(32, 53, 1) 31 +(32, 54, 1) 31 +(32, 55, 1) 30 +(32, 56, 1) 30 +(32, 57, 1) 30 +(32, 58, 1) 30 +(32, 59, 1) 29 +(32, 60, 1) 29 +(32, 61, 1) 28 +(32, 62, 1) 28 +(32, 63, 1) 27 +(32, 64, 1) 27 +(32, 65, 1) 26 +(32, 66, 1) 25 +(32, 67, 1) 25 +(32, 68, 1) 24 +(32, 69, 1) 23 +(32, 70, 1) 23 +(32, 71, 1) 22 +(32, 72, 1) 21 +(32, 73, 1) 20 +(32, 74, 1) 20 +(32, 75, 1) 19 +(32, 76, 1) 18 +(32, 77, 1) 17 +(32, 78, 1) 17 +(32, 79, 1) 16 +(32, 80, 1) 15 +(32, 81, 1) 14 +(32, 82, 1) 13 +(32, 83, 1) 12 +(32, 84, 1) 11 +(32, 85, 1) 11 +(32, 86, 1) 10 +(32, 87, 1) 9 +(32, 88, 1) 8 +(32, 89, 1) 7 +(32, 90, 1) 6 +(32, 91, 1) 5 +(32, 92, 1) 4 +(32, 93, 1) 3 +(32, 94, 1) 2 +(32, 95, 1) 2 +(33, 6, 1) 2 +(33, 7, 1) 3 +(33, 8, 1) 4 +(33, 9, 1) 5 +(33, 10, 1) 6 +(33, 11, 1) 7 +(33, 12, 1) 7 +(33, 13, 1) 8 +(33, 14, 1) 9 +(33, 15, 1) 10 +(33, 16, 1) 11 +(33, 17, 1) 12 +(33, 18, 1) 13 +(33, 19, 1) 14 +(33, 20, 1) 15 +(33, 21, 1) 15 +(33, 22, 1) 16 +(33, 23, 1) 17 +(33, 24, 1) 18 +(33, 25, 1) 19 +(33, 26, 1) 20 +(33, 27, 1) 20 +(33, 28, 1) 21 +(33, 29, 1) 22 +(33, 30, 1) 23 +(33, 31, 1) 23 +(33, 32, 1) 24 +(33, 33, 1) 25 +(33, 34, 1) 26 +(33, 35, 1) 26 +(33, 36, 1) 27 +(33, 37, 1) 27 +(33, 38, 1) 28 +(33, 39, 1) 29 +(33, 40, 1) 29 +(33, 41, 1) 30 +(33, 42, 1) 30 +(33, 43, 1) 30 +(33, 44, 1) 31 +(33, 45, 1) 31 +(33, 46, 1) 31 +(33, 47, 1) 32 +(33, 48, 1) 32 +(33, 49, 1) 32 +(33, 50, 1) 32 +(33, 51, 1) 32 +(33, 52, 1) 32 +(33, 53, 1) 32 +(33, 54, 1) 32 +(33, 55, 1) 31 +(33, 56, 1) 31 +(33, 57, 1) 31 +(33, 58, 1) 30 +(33, 59, 1) 30 +(33, 60, 1) 30 +(33, 61, 1) 29 +(33, 62, 1) 29 +(33, 63, 1) 28 +(33, 64, 1) 27 +(33, 65, 1) 27 +(33, 66, 1) 26 +(33, 67, 1) 26 +(33, 68, 1) 25 +(33, 69, 1) 24 +(33, 70, 1) 23 +(33, 71, 1) 23 +(33, 72, 1) 22 +(33, 73, 1) 21 +(33, 74, 1) 20 +(33, 75, 1) 20 +(33, 76, 1) 19 +(33, 77, 1) 18 +(33, 78, 1) 17 +(33, 79, 1) 16 +(33, 80, 1) 15 +(33, 81, 1) 15 +(33, 82, 1) 14 +(33, 83, 1) 13 +(33, 84, 1) 12 +(33, 85, 1) 11 +(33, 86, 1) 10 +(33, 87, 1) 9 +(33, 88, 1) 8 +(33, 89, 1) 7 +(33, 90, 1) 7 +(33, 91, 1) 6 +(33, 92, 1) 5 +(33, 93, 1) 4 +(33, 94, 1) 3 +(33, 95, 1) 2 +(34, 6, 1) 2 +(34, 7, 1) 3 +(34, 8, 1) 4 +(34, 9, 1) 5 +(34, 10, 1) 6 +(34, 11, 1) 7 +(34, 12, 1) 8 +(34, 13, 1) 9 +(34, 14, 1) 10 +(34, 15, 1) 11 +(34, 16, 1) 11 +(34, 17, 1) 12 +(34, 18, 1) 13 +(34, 19, 1) 14 +(34, 20, 1) 15 +(34, 21, 1) 16 +(34, 22, 1) 17 +(34, 23, 1) 18 +(34, 24, 1) 18 +(34, 25, 1) 19 +(34, 26, 1) 20 +(34, 27, 1) 21 +(34, 28, 1) 22 +(34, 29, 1) 23 +(34, 30, 1) 23 +(34, 31, 1) 24 +(34, 32, 1) 25 +(34, 33, 1) 26 +(34, 34, 1) 26 +(34, 35, 1) 27 +(34, 36, 1) 28 +(34, 37, 1) 28 +(34, 38, 1) 29 +(34, 39, 1) 29 +(34, 40, 1) 30 +(34, 41, 1) 30 +(34, 42, 1) 31 +(34, 43, 1) 31 +(34, 44, 1) 32 +(34, 45, 1) 32 +(34, 46, 1) 32 +(34, 47, 1) 33 +(34, 48, 1) 33 +(34, 49, 1) 33 +(34, 50, 1) 33 +(34, 51, 1) 33 +(34, 52, 1) 33 +(34, 53, 1) 33 +(34, 54, 1) 33 +(34, 55, 1) 32 +(34, 56, 1) 32 +(34, 57, 1) 32 +(34, 58, 1) 31 +(34, 59, 1) 31 +(34, 60, 1) 30 +(34, 61, 1) 30 +(34, 62, 1) 29 +(34, 63, 1) 29 +(34, 64, 1) 28 +(34, 65, 1) 28 +(34, 66, 1) 27 +(34, 67, 1) 26 +(34, 68, 1) 26 +(34, 69, 1) 25 +(34, 70, 1) 24 +(34, 71, 1) 23 +(34, 72, 1) 23 +(34, 73, 1) 22 +(34, 74, 1) 21 +(34, 75, 1) 20 +(34, 76, 1) 19 +(34, 77, 1) 18 +(34, 78, 1) 18 +(34, 79, 1) 17 +(34, 80, 1) 16 +(34, 81, 1) 15 +(34, 82, 1) 14 +(34, 83, 1) 13 +(34, 84, 1) 12 +(34, 85, 1) 11 +(34, 86, 1) 11 +(34, 87, 1) 10 +(34, 88, 1) 9 +(34, 89, 1) 8 +(34, 90, 1) 7 +(34, 91, 1) 6 +(34, 92, 1) 5 +(34, 93, 1) 4 +(34, 94, 1) 3 +(34, 95, 1) 2 +(35, 6, 1) 3 +(35, 7, 1) 4 +(35, 8, 1) 5 +(35, 9, 1) 6 +(35, 10, 1) 6 +(35, 11, 1) 7 +(35, 12, 1) 8 +(35, 13, 1) 9 +(35, 14, 1) 10 +(35, 15, 1) 11 +(35, 16, 1) 12 +(35, 17, 1) 13 +(35, 18, 1) 14 +(35, 19, 1) 15 +(35, 20, 1) 16 +(35, 21, 1) 16 +(35, 22, 1) 17 +(35, 23, 1) 18 +(35, 24, 1) 19 +(35, 25, 1) 20 +(35, 26, 1) 21 +(35, 27, 1) 21 +(35, 28, 1) 22 +(35, 29, 1) 23 +(35, 30, 1) 24 +(35, 31, 1) 25 +(35, 32, 1) 25 +(35, 33, 1) 26 +(35, 34, 1) 27 +(35, 35, 1) 28 +(35, 36, 1) 28 +(35, 37, 1) 29 +(35, 38, 1) 30 +(35, 39, 1) 30 +(35, 40, 1) 31 +(35, 41, 1) 31 +(35, 42, 1) 32 +(35, 43, 1) 32 +(35, 44, 1) 33 +(35, 45, 1) 33 +(35, 46, 1) 33 +(35, 47, 1) 34 +(35, 48, 1) 34 +(35, 49, 1) 34 +(35, 50, 1) 34 +(35, 51, 1) 34 +(35, 52, 1) 34 +(35, 53, 1) 34 +(35, 54, 1) 34 +(35, 55, 1) 33 +(35, 56, 1) 33 +(35, 57, 1) 33 +(35, 58, 1) 32 +(35, 59, 1) 32 +(35, 60, 1) 31 +(35, 61, 1) 31 +(35, 62, 1) 30 +(35, 63, 1) 30 +(35, 64, 1) 29 +(35, 65, 1) 28 +(35, 66, 1) 28 +(35, 67, 1) 27 +(35, 68, 1) 26 +(35, 69, 1) 25 +(35, 70, 1) 25 +(35, 71, 1) 24 +(35, 72, 1) 23 +(35, 73, 1) 22 +(35, 74, 1) 21 +(35, 75, 1) 21 +(35, 76, 1) 20 +(35, 77, 1) 19 +(35, 78, 1) 18 +(35, 79, 1) 17 +(35, 80, 1) 16 +(35, 81, 1) 16 +(35, 82, 1) 15 +(35, 83, 1) 14 +(35, 84, 1) 13 +(35, 85, 1) 12 +(35, 86, 1) 11 +(35, 87, 1) 10 +(35, 88, 1) 9 +(35, 89, 1) 8 +(35, 90, 1) 7 +(35, 91, 1) 6 +(35, 92, 1) 6 +(35, 93, 1) 5 +(35, 94, 1) 4 +(35, 95, 1) 3 +(36, 4, 1) 1 +(36, 5, 1) 2 +(36, 6, 1) 3 +(36, 7, 1) 4 +(36, 8, 1) 5 +(36, 9, 1) 6 +(36, 10, 1) 7 +(36, 11, 1) 8 +(36, 12, 1) 8 +(36, 13, 1) 9 +(36, 14, 1) 10 +(36, 15, 1) 11 +(36, 16, 1) 12 +(36, 17, 1) 13 +(36, 18, 1) 14 +(36, 19, 1) 15 +(36, 20, 1) 16 +(36, 21, 1) 17 +(36, 22, 1) 18 +(36, 23, 1) 19 +(36, 24, 1) 19 +(36, 25, 1) 20 +(36, 26, 1) 21 +(36, 27, 1) 22 +(36, 28, 1) 23 +(36, 29, 1) 24 +(36, 30, 1) 24 +(36, 31, 1) 25 +(36, 32, 1) 26 +(36, 33, 1) 27 +(36, 34, 1) 28 +(36, 35, 1) 28 +(36, 36, 1) 29 +(36, 37, 1) 30 +(36, 38, 1) 30 +(36, 39, 1) 31 +(36, 40, 1) 32 +(36, 41, 1) 32 +(36, 42, 1) 33 +(36, 43, 1) 33 +(36, 44, 1) 34 +(36, 45, 1) 34 +(36, 46, 1) 34 +(36, 47, 1) 35 +(36, 48, 1) 35 +(36, 49, 1) 35 +(36, 50, 1) 35 +(36, 51, 1) 35 +(36, 52, 1) 35 +(36, 53, 1) 35 +(36, 54, 1) 35 +(36, 55, 1) 34 +(36, 56, 1) 34 +(36, 57, 1) 34 +(36, 58, 1) 33 +(36, 59, 1) 33 +(36, 60, 1) 32 +(36, 61, 1) 32 +(36, 62, 1) 31 +(36, 63, 1) 30 +(36, 64, 1) 30 +(36, 65, 1) 29 +(36, 66, 1) 28 +(36, 67, 1) 28 +(36, 68, 1) 27 +(36, 69, 1) 26 +(36, 70, 1) 25 +(36, 71, 1) 24 +(36, 72, 1) 24 +(36, 73, 1) 23 +(36, 74, 1) 22 +(36, 75, 1) 21 +(36, 76, 1) 20 +(36, 77, 1) 19 +(36, 78, 1) 19 +(36, 79, 1) 18 +(36, 80, 1) 17 +(36, 81, 1) 16 +(36, 82, 1) 15 +(36, 83, 1) 14 +(36, 84, 1) 13 +(36, 85, 1) 12 +(36, 86, 1) 11 +(36, 87, 1) 10 +(36, 88, 1) 9 +(36, 89, 1) 8 +(36, 90, 1) 8 +(36, 91, 1) 7 +(36, 92, 1) 6 +(36, 93, 1) 5 +(36, 94, 1) 4 +(36, 95, 1) 3 +(36, 96, 1) 2 +(36, 97, 1) 1 +(37, 4, 1) 1 +(37, 5, 1) 2 +(37, 6, 1) 3 +(37, 7, 1) 4 +(37, 8, 1) 5 +(37, 9, 1) 6 +(37, 10, 1) 7 +(37, 11, 1) 8 +(37, 12, 1) 9 +(37, 13, 1) 10 +(37, 14, 1) 11 +(37, 15, 1) 12 +(37, 16, 1) 13 +(37, 17, 1) 14 +(37, 18, 1) 14 +(37, 19, 1) 15 +(37, 20, 1) 16 +(37, 21, 1) 17 +(37, 22, 1) 18 +(37, 23, 1) 19 +(37, 24, 1) 20 +(37, 25, 1) 21 +(37, 26, 1) 22 +(37, 27, 1) 22 +(37, 28, 1) 23 +(37, 29, 1) 24 +(37, 30, 1) 25 +(37, 31, 1) 26 +(37, 32, 1) 27 +(37, 33, 1) 27 +(37, 34, 1) 28 +(37, 35, 1) 29 +(37, 36, 1) 30 +(37, 37, 1) 30 +(37, 38, 1) 31 +(37, 39, 1) 32 +(37, 40, 1) 32 +(37, 41, 1) 33 +(37, 42, 1) 34 +(37, 43, 1) 34 +(37, 44, 1) 35 +(37, 45, 1) 35 +(37, 46, 1) 35 +(37, 47, 1) 36 +(37, 48, 1) 36 +(37, 49, 1) 36 +(37, 50, 1) 36 +(37, 51, 1) 36 +(37, 52, 1) 36 +(37, 53, 1) 36 +(37, 54, 1) 36 +(37, 55, 1) 35 +(37, 56, 1) 35 +(37, 57, 1) 35 +(37, 58, 1) 34 +(37, 59, 1) 34 +(37, 60, 1) 33 +(37, 61, 1) 32 +(37, 62, 1) 32 +(37, 63, 1) 31 +(37, 64, 1) 30 +(37, 65, 1) 30 +(37, 66, 1) 29 +(37, 67, 1) 28 +(37, 68, 1) 27 +(37, 69, 1) 27 +(37, 70, 1) 26 +(37, 71, 1) 25 +(37, 72, 1) 24 +(37, 73, 1) 23 +(37, 74, 1) 22 +(37, 75, 1) 22 +(37, 76, 1) 21 +(37, 77, 1) 20 +(37, 78, 1) 19 +(37, 79, 1) 18 +(37, 80, 1) 17 +(37, 81, 1) 16 +(37, 82, 1) 15 +(37, 83, 1) 14 +(37, 84, 1) 14 +(37, 85, 1) 13 +(37, 86, 1) 12 +(37, 87, 1) 11 +(37, 88, 1) 10 +(37, 89, 1) 9 +(37, 90, 1) 8 +(37, 91, 1) 7 +(37, 92, 1) 6 +(37, 93, 1) 5 +(37, 94, 1) 4 +(37, 95, 1) 3 +(37, 96, 1) 2 +(37, 97, 1) 1 +(38, 4, 1) 2 +(38, 5, 1) 3 +(38, 6, 1) 3 +(38, 7, 1) 4 +(38, 8, 1) 5 +(38, 9, 1) 6 +(38, 10, 1) 7 +(38, 11, 1) 8 +(38, 12, 1) 9 +(38, 13, 1) 10 +(38, 14, 1) 11 +(38, 15, 1) 12 +(38, 16, 1) 13 +(38, 17, 1) 14 +(38, 18, 1) 15 +(38, 19, 1) 16 +(38, 20, 1) 17 +(38, 21, 1) 18 +(38, 22, 1) 18 +(38, 23, 1) 19 +(38, 24, 1) 20 +(38, 25, 1) 21 +(38, 26, 1) 22 +(38, 27, 1) 23 +(38, 28, 1) 24 +(38, 29, 1) 25 +(38, 30, 1) 26 +(38, 31, 1) 26 +(38, 32, 1) 27 +(38, 33, 1) 28 +(38, 34, 1) 29 +(38, 35, 1) 30 +(38, 36, 1) 30 +(38, 37, 1) 31 +(38, 38, 1) 32 +(38, 39, 1) 33 +(38, 40, 1) 33 +(38, 41, 1) 34 +(38, 42, 1) 34 +(38, 43, 1) 35 +(38, 44, 1) 35 +(38, 45, 1) 36 +(38, 46, 1) 36 +(38, 47, 1) 37 +(38, 48, 1) 37 +(38, 49, 1) 37 +(38, 50, 1) 37 +(38, 51, 1) 37 +(38, 52, 1) 37 +(38, 53, 1) 37 +(38, 54, 1) 37 +(38, 55, 1) 36 +(38, 56, 1) 36 +(38, 57, 1) 35 +(38, 58, 1) 35 +(38, 59, 1) 34 +(38, 60, 1) 34 +(38, 61, 1) 33 +(38, 62, 1) 33 +(38, 63, 1) 32 +(38, 64, 1) 31 +(38, 65, 1) 30 +(38, 66, 1) 30 +(38, 67, 1) 29 +(38, 68, 1) 28 +(38, 69, 1) 27 +(38, 70, 1) 26 +(38, 71, 1) 26 +(38, 72, 1) 25 +(38, 73, 1) 24 +(38, 74, 1) 23 +(38, 75, 1) 22 +(38, 76, 1) 21 +(38, 77, 1) 20 +(38, 78, 1) 19 +(38, 79, 1) 18 +(38, 80, 1) 18 +(38, 81, 1) 17 +(38, 82, 1) 16 +(38, 83, 1) 15 +(38, 84, 1) 14 +(38, 85, 1) 13 +(38, 86, 1) 12 +(38, 87, 1) 11 +(38, 88, 1) 10 +(38, 89, 1) 9 +(38, 90, 1) 8 +(38, 91, 1) 7 +(38, 92, 1) 6 +(38, 93, 1) 5 +(38, 94, 1) 4 +(38, 95, 1) 3 +(38, 96, 1) 3 +(38, 97, 1) 2 +(39, 4, 1) 2 +(39, 5, 1) 3 +(39, 6, 1) 4 +(39, 7, 1) 5 +(39, 8, 1) 6 +(39, 9, 1) 7 +(39, 10, 1) 8 +(39, 11, 1) 9 +(39, 12, 1) 9 +(39, 13, 1) 10 +(39, 14, 1) 11 +(39, 15, 1) 12 +(39, 16, 1) 13 +(39, 17, 1) 14 +(39, 18, 1) 15 +(39, 19, 1) 16 +(39, 20, 1) 17 +(39, 21, 1) 18 +(39, 22, 1) 19 +(39, 23, 1) 20 +(39, 24, 1) 21 +(39, 25, 1) 22 +(39, 26, 1) 23 +(39, 27, 1) 23 +(39, 28, 1) 24 +(39, 29, 1) 25 +(39, 30, 1) 26 +(39, 31, 1) 27 +(39, 32, 1) 28 +(39, 33, 1) 29 +(39, 34, 1) 29 +(39, 35, 1) 30 +(39, 36, 1) 31 +(39, 37, 1) 32 +(39, 38, 1) 33 +(39, 39, 1) 33 +(39, 40, 1) 34 +(39, 41, 1) 35 +(39, 42, 1) 35 +(39, 43, 1) 36 +(39, 44, 1) 36 +(39, 45, 1) 37 +(39, 46, 1) 37 +(39, 47, 1) 37 +(39, 48, 1) 38 +(39, 49, 1) 38 +(39, 50, 1) 38 +(39, 51, 1) 38 +(39, 52, 1) 38 +(39, 53, 1) 38 +(39, 54, 1) 37 +(39, 55, 1) 37 +(39, 56, 1) 37 +(39, 57, 1) 36 +(39, 58, 1) 36 +(39, 59, 1) 35 +(39, 60, 1) 35 +(39, 61, 1) 34 +(39, 62, 1) 33 +(39, 63, 1) 33 +(39, 64, 1) 32 +(39, 65, 1) 31 +(39, 66, 1) 30 +(39, 67, 1) 29 +(39, 68, 1) 29 +(39, 69, 1) 28 +(39, 70, 1) 27 +(39, 71, 1) 26 +(39, 72, 1) 25 +(39, 73, 1) 24 +(39, 74, 1) 23 +(39, 75, 1) 23 +(39, 76, 1) 22 +(39, 77, 1) 21 +(39, 78, 1) 20 +(39, 79, 1) 19 +(39, 80, 1) 18 +(39, 81, 1) 17 +(39, 82, 1) 16 +(39, 83, 1) 15 +(39, 84, 1) 14 +(39, 85, 1) 13 +(39, 86, 1) 12 +(39, 87, 1) 11 +(39, 88, 1) 10 +(39, 89, 1) 9 +(39, 90, 1) 9 +(39, 91, 1) 8 +(39, 92, 1) 7 +(39, 93, 1) 6 +(39, 94, 1) 5 +(39, 95, 1) 4 +(39, 96, 1) 3 +(39, 97, 1) 2 +(40, 4, 1) 2 +(40, 5, 1) 3 +(40, 6, 1) 4 +(40, 7, 1) 5 +(40, 8, 1) 6 +(40, 9, 1) 7 +(40, 10, 1) 8 +(40, 11, 1) 9 +(40, 12, 1) 10 +(40, 13, 1) 11 +(40, 14, 1) 12 +(40, 15, 1) 13 +(40, 16, 1) 14 +(40, 17, 1) 15 +(40, 18, 1) 16 +(40, 19, 1) 16 +(40, 20, 1) 17 +(40, 21, 1) 18 +(40, 22, 1) 19 +(40, 23, 1) 20 +(40, 24, 1) 21 +(40, 25, 1) 22 +(40, 26, 1) 23 +(40, 27, 1) 24 +(40, 28, 1) 25 +(40, 29, 1) 26 +(40, 30, 1) 27 +(40, 31, 1) 27 +(40, 32, 1) 28 +(40, 33, 1) 29 +(40, 34, 1) 30 +(40, 35, 1) 31 +(40, 36, 1) 32 +(40, 37, 1) 32 +(40, 38, 1) 33 +(40, 39, 1) 34 +(40, 40, 1) 35 +(40, 41, 1) 35 +(40, 42, 1) 36 +(40, 43, 1) 37 +(40, 44, 1) 37 +(40, 45, 1) 38 +(40, 56, 1) 38 +(40, 57, 1) 37 +(40, 58, 1) 37 +(40, 59, 1) 36 +(40, 60, 1) 35 +(40, 61, 1) 35 +(40, 62, 1) 34 +(40, 63, 1) 33 +(40, 64, 1) 32 +(40, 65, 1) 32 +(40, 66, 1) 31 +(40, 67, 1) 30 +(40, 68, 1) 29 +(40, 69, 1) 28 +(40, 70, 1) 27 +(40, 71, 1) 27 +(40, 72, 1) 26 +(40, 73, 1) 25 +(40, 74, 1) 24 +(40, 75, 1) 23 +(40, 76, 1) 22 +(40, 77, 1) 21 +(40, 78, 1) 20 +(40, 79, 1) 19 +(40, 80, 1) 18 +(40, 81, 1) 17 +(40, 82, 1) 16 +(40, 83, 1) 16 +(40, 84, 1) 15 +(40, 85, 1) 14 +(40, 86, 1) 13 +(40, 87, 1) 12 +(40, 88, 1) 11 +(40, 89, 1) 10 +(40, 90, 1) 9 +(40, 91, 1) 8 +(40, 92, 1) 7 +(40, 93, 1) 6 +(40, 94, 1) 5 +(40, 95, 1) 4 +(40, 96, 1) 3 +(40, 97, 1) 2 +(41, 1, 1) 0 +(41, 2, 1) 0 +(41, 3, 1) 1 +(41, 4, 1) 2 +(41, 5, 1) 3 +(41, 6, 1) 4 +(41, 7, 1) 5 +(41, 8, 1) 6 +(41, 9, 1) 7 +(41, 10, 1) 8 +(41, 11, 1) 9 +(41, 12, 1) 10 +(41, 13, 1) 11 +(41, 14, 1) 12 +(41, 15, 1) 13 +(41, 16, 1) 14 +(41, 17, 1) 15 +(41, 18, 1) 16 +(41, 19, 1) 17 +(41, 20, 1) 18 +(41, 21, 1) 19 +(41, 22, 1) 20 +(41, 23, 1) 20 +(41, 24, 1) 21 +(41, 25, 1) 22 +(41, 26, 1) 23 +(41, 27, 1) 24 +(41, 28, 1) 25 +(41, 29, 1) 26 +(41, 30, 1) 27 +(41, 31, 1) 28 +(41, 32, 1) 29 +(41, 33, 1) 30 +(41, 34, 1) 30 +(41, 35, 1) 31 +(41, 36, 1) 32 +(41, 37, 1) 33 +(41, 38, 1) 34 +(41, 39, 1) 35 +(41, 40, 1) 35 +(41, 41, 1) 36 +(41, 42, 1) 37 +(41, 43, 1) 37 +(41, 58, 1) 37 +(41, 59, 1) 37 +(41, 60, 1) 36 +(41, 61, 1) 35 +(41, 62, 1) 35 +(41, 63, 1) 34 +(41, 64, 1) 33 +(41, 65, 1) 32 +(41, 66, 1) 31 +(41, 67, 1) 30 +(41, 68, 1) 30 +(41, 69, 1) 29 +(41, 70, 1) 28 +(41, 71, 1) 27 +(41, 72, 1) 26 +(41, 73, 1) 25 +(41, 74, 1) 24 +(41, 75, 1) 23 +(41, 76, 1) 22 +(41, 77, 1) 21 +(41, 78, 1) 20 +(41, 79, 1) 20 +(41, 80, 1) 19 +(41, 81, 1) 18 +(41, 82, 1) 17 +(41, 83, 1) 16 +(41, 84, 1) 15 +(41, 85, 1) 14 +(41, 86, 1) 13 +(41, 87, 1) 12 +(41, 88, 1) 11 +(41, 89, 1) 10 +(41, 90, 1) 9 +(41, 91, 1) 8 +(41, 92, 1) 7 +(41, 93, 1) 6 +(41, 94, 1) 5 +(41, 95, 1) 4 +(41, 96, 1) 3 +(41, 97, 1) 2 +(41, 98, 1) 1 +(41, 99, 1) 0 +(41, 100, 1) 0 +(42, 1, 1) 0 +(42, 2, 1) 0 +(42, 3, 1) 1 +(42, 4, 1) 2 +(42, 5, 1) 3 +(42, 6, 1) 4 +(42, 7, 1) 5 +(42, 8, 1) 6 +(42, 9, 1) 7 +(42, 10, 1) 8 +(42, 11, 1) 9 +(42, 12, 1) 10 +(42, 13, 1) 11 +(42, 14, 1) 12 +(42, 15, 1) 13 +(42, 16, 1) 14 +(42, 17, 1) 15 +(42, 18, 1) 16 +(42, 19, 1) 17 +(42, 20, 1) 18 +(42, 21, 1) 19 +(42, 22, 1) 20 +(42, 23, 1) 21 +(42, 24, 1) 22 +(42, 25, 1) 23 +(42, 26, 1) 24 +(42, 27, 1) 25 +(42, 28, 1) 25 +(42, 29, 1) 26 +(42, 30, 1) 27 +(42, 31, 1) 28 +(42, 32, 1) 29 +(42, 33, 1) 30 +(42, 34, 1) 31 +(42, 35, 1) 32 +(42, 36, 1) 33 +(42, 37, 1) 34 +(42, 38, 1) 34 +(42, 39, 1) 35 +(42, 40, 1) 36 +(42, 41, 1) 37 +(42, 42, 1) 38 +(42, 59, 1) 38 +(42, 60, 1) 37 +(42, 61, 1) 36 +(42, 62, 1) 35 +(42, 63, 1) 34 +(42, 64, 1) 34 +(42, 65, 1) 33 +(42, 66, 1) 32 +(42, 67, 1) 31 +(42, 68, 1) 30 +(42, 69, 1) 29 +(42, 70, 1) 28 +(42, 71, 1) 27 +(42, 72, 1) 26 +(42, 73, 1) 25 +(42, 74, 1) 25 +(42, 75, 1) 24 +(42, 76, 1) 23 +(42, 77, 1) 22 +(42, 78, 1) 21 +(42, 79, 1) 20 +(42, 80, 1) 19 +(42, 81, 1) 18 +(42, 82, 1) 17 +(42, 83, 1) 16 +(42, 84, 1) 15 +(42, 85, 1) 14 +(42, 86, 1) 13 +(42, 87, 1) 12 +(42, 88, 1) 11 +(42, 89, 1) 10 +(42, 90, 1) 9 +(42, 91, 1) 8 +(42, 92, 1) 7 +(42, 93, 1) 6 +(42, 94, 1) 5 +(42, 95, 1) 4 +(42, 96, 1) 3 +(42, 97, 1) 2 +(42, 98, 1) 1 +(42, 99, 1) 0 +(42, 100, 1) 0 +(43, 1, 1) 0 +(43, 2, 1) 1 +(43, 3, 1) 2 +(43, 4, 1) 3 +(43, 5, 1) 4 +(43, 6, 1) 4 +(43, 7, 1) 5 +(43, 8, 1) 6 +(43, 9, 1) 7 +(43, 10, 1) 8 +(43, 11, 1) 9 +(43, 12, 1) 10 +(43, 13, 1) 11 +(43, 14, 1) 12 +(43, 15, 1) 13 +(43, 16, 1) 14 +(43, 17, 1) 15 +(43, 18, 1) 16 +(43, 19, 1) 17 +(43, 20, 1) 18 +(43, 21, 1) 19 +(43, 22, 1) 20 +(43, 23, 1) 21 +(43, 24, 1) 22 +(43, 25, 1) 23 +(43, 26, 1) 24 +(43, 27, 1) 25 +(43, 28, 1) 26 +(43, 29, 1) 27 +(43, 30, 1) 28 +(43, 31, 1) 29 +(43, 32, 1) 30 +(43, 33, 1) 30 +(43, 34, 1) 31 +(43, 35, 1) 32 +(43, 36, 1) 33 +(43, 37, 1) 34 +(43, 38, 1) 35 +(43, 39, 1) 36 +(43, 40, 1) 37 +(43, 41, 1) 37 +(43, 60, 1) 37 +(43, 61, 1) 37 +(43, 62, 1) 36 +(43, 63, 1) 35 +(43, 64, 1) 34 +(43, 65, 1) 33 +(43, 66, 1) 32 +(43, 67, 1) 31 +(43, 68, 1) 30 +(43, 69, 1) 30 +(43, 70, 1) 29 +(43, 71, 1) 28 +(43, 72, 1) 27 +(43, 73, 1) 26 +(43, 74, 1) 25 +(43, 75, 1) 24 +(43, 76, 1) 23 +(43, 77, 1) 22 +(43, 78, 1) 21 +(43, 79, 1) 20 +(43, 80, 1) 19 +(43, 81, 1) 18 +(43, 82, 1) 17 +(43, 83, 1) 16 +(43, 84, 1) 15 +(43, 85, 1) 14 +(43, 86, 1) 13 +(43, 87, 1) 12 +(43, 88, 1) 11 +(43, 89, 1) 10 +(43, 90, 1) 9 +(43, 91, 1) 8 +(43, 92, 1) 7 +(43, 93, 1) 6 +(43, 94, 1) 5 +(43, 95, 1) 4 +(43, 96, 1) 4 +(43, 97, 1) 3 +(43, 98, 1) 2 +(43, 99, 1) 1 +(43, 100, 1) 0 +(44, 1, 1) 0 +(44, 2, 1) 1 +(44, 3, 1) 2 +(44, 4, 1) 3 +(44, 5, 1) 4 +(44, 6, 1) 5 +(44, 7, 1) 6 +(44, 8, 1) 7 +(44, 9, 1) 8 +(44, 10, 1) 9 +(44, 11, 1) 10 +(44, 12, 1) 11 +(44, 13, 1) 12 +(44, 14, 1) 13 +(44, 15, 1) 14 +(44, 16, 1) 14 +(44, 17, 1) 15 +(44, 18, 1) 16 +(44, 19, 1) 17 +(44, 20, 1) 18 +(44, 21, 1) 19 +(44, 22, 1) 20 +(44, 23, 1) 21 +(44, 24, 1) 22 +(44, 25, 1) 23 +(44, 26, 1) 24 +(44, 27, 1) 25 +(44, 28, 1) 26 +(44, 29, 1) 27 +(44, 30, 1) 28 +(44, 31, 1) 29 +(44, 32, 1) 30 +(44, 33, 1) 31 +(44, 34, 1) 32 +(44, 35, 1) 33 +(44, 36, 1) 34 +(44, 37, 1) 35 +(44, 38, 1) 35 +(44, 39, 1) 36 +(44, 40, 1) 37 +(44, 61, 1) 37 +(44, 62, 1) 36 +(44, 63, 1) 35 +(44, 64, 1) 35 +(44, 65, 1) 34 +(44, 66, 1) 33 +(44, 67, 1) 32 +(44, 68, 1) 31 +(44, 69, 1) 30 +(44, 70, 1) 29 +(44, 71, 1) 28 +(44, 72, 1) 27 +(44, 73, 1) 26 +(44, 74, 1) 25 +(44, 75, 1) 24 +(44, 76, 1) 23 +(44, 77, 1) 22 +(44, 78, 1) 21 +(44, 79, 1) 20 +(44, 80, 1) 19 +(44, 81, 1) 18 +(44, 82, 1) 17 +(44, 83, 1) 16 +(44, 84, 1) 15 +(44, 85, 1) 14 +(44, 86, 1) 14 +(44, 87, 1) 13 +(44, 88, 1) 12 +(44, 89, 1) 11 +(44, 90, 1) 10 +(44, 91, 1) 9 +(44, 92, 1) 8 +(44, 93, 1) 7 +(44, 94, 1) 6 +(44, 95, 1) 5 +(44, 96, 1) 4 +(44, 97, 1) 3 +(44, 98, 1) 2 +(44, 99, 1) 1 +(44, 100, 1) 0 +(45, 1, 1) 0 +(45, 2, 1) 1 +(45, 3, 1) 2 +(45, 4, 1) 3 +(45, 5, 1) 4 +(45, 6, 1) 5 +(45, 7, 1) 6 +(45, 8, 1) 7 +(45, 9, 1) 8 +(45, 10, 1) 9 +(45, 11, 1) 10 +(45, 12, 1) 11 +(45, 13, 1) 12 +(45, 14, 1) 13 +(45, 15, 1) 14 +(45, 16, 1) 15 +(45, 17, 1) 16 +(45, 18, 1) 17 +(45, 19, 1) 18 +(45, 20, 1) 19 +(45, 21, 1) 20 +(45, 22, 1) 21 +(45, 23, 1) 22 +(45, 24, 1) 23 +(45, 25, 1) 23 +(45, 26, 1) 24 +(45, 27, 1) 25 +(45, 28, 1) 26 +(45, 29, 1) 27 +(45, 30, 1) 28 +(45, 31, 1) 29 +(45, 32, 1) 30 +(45, 33, 1) 31 +(45, 34, 1) 32 +(45, 35, 1) 33 +(45, 36, 1) 34 +(45, 37, 1) 35 +(45, 38, 1) 36 +(45, 39, 1) 37 +(45, 40, 1) 38 +(45, 61, 1) 38 +(45, 62, 1) 37 +(45, 63, 1) 36 +(45, 64, 1) 35 +(45, 65, 1) 34 +(45, 66, 1) 33 +(45, 67, 1) 32 +(45, 68, 1) 31 +(45, 69, 1) 30 +(45, 70, 1) 29 +(45, 71, 1) 28 +(45, 72, 1) 27 +(45, 73, 1) 26 +(45, 74, 1) 25 +(45, 75, 1) 24 +(45, 76, 1) 23 +(45, 77, 1) 23 +(45, 78, 1) 22 +(45, 79, 1) 21 +(45, 80, 1) 20 +(45, 81, 1) 19 +(45, 82, 1) 18 +(45, 83, 1) 17 +(45, 84, 1) 16 +(45, 85, 1) 15 +(45, 86, 1) 14 +(45, 87, 1) 13 +(45, 88, 1) 12 +(45, 89, 1) 11 +(45, 90, 1) 10 +(45, 91, 1) 9 +(45, 92, 1) 8 +(45, 93, 1) 7 +(45, 94, 1) 6 +(45, 95, 1) 5 +(45, 96, 1) 4 +(45, 97, 1) 3 +(45, 98, 1) 2 +(45, 99, 1) 1 +(45, 100, 1) 0 +(46, 1, 1) 0 +(46, 2, 1) 1 +(46, 3, 1) 2 +(46, 4, 1) 3 +(46, 5, 1) 4 +(46, 6, 1) 5 +(46, 7, 1) 6 +(46, 8, 1) 7 +(46, 9, 1) 8 +(46, 10, 1) 9 +(46, 11, 1) 10 +(46, 12, 1) 11 +(46, 13, 1) 12 +(46, 14, 1) 13 +(46, 15, 1) 14 +(46, 16, 1) 15 +(46, 17, 1) 16 +(46, 18, 1) 17 +(46, 19, 1) 18 +(46, 20, 1) 19 +(46, 21, 1) 20 +(46, 22, 1) 21 +(46, 23, 1) 22 +(46, 24, 1) 23 +(46, 25, 1) 24 +(46, 26, 1) 25 +(46, 27, 1) 26 +(46, 28, 1) 27 +(46, 29, 1) 28 +(46, 30, 1) 29 +(46, 31, 1) 30 +(46, 32, 1) 30 +(46, 33, 1) 31 +(46, 34, 1) 32 +(46, 35, 1) 33 +(46, 36, 1) 34 +(46, 37, 1) 35 +(46, 38, 1) 36 +(46, 39, 1) 37 +(46, 62, 1) 37 +(46, 63, 1) 36 +(46, 64, 1) 35 +(46, 65, 1) 34 +(46, 66, 1) 33 +(46, 67, 1) 32 +(46, 68, 1) 31 +(46, 69, 1) 30 +(46, 70, 1) 30 +(46, 71, 1) 29 +(46, 72, 1) 28 +(46, 73, 1) 27 +(46, 74, 1) 26 +(46, 75, 1) 25 +(46, 76, 1) 24 +(46, 77, 1) 23 +(46, 78, 1) 22 +(46, 79, 1) 21 +(46, 80, 1) 20 +(46, 81, 1) 19 +(46, 82, 1) 18 +(46, 83, 1) 17 +(46, 84, 1) 16 +(46, 85, 1) 15 +(46, 86, 1) 14 +(46, 87, 1) 13 +(46, 88, 1) 12 +(46, 89, 1) 11 +(46, 90, 1) 10 +(46, 91, 1) 9 +(46, 92, 1) 8 +(46, 93, 1) 7 +(46, 94, 1) 6 +(46, 95, 1) 5 +(46, 96, 1) 4 +(46, 97, 1) 3 +(46, 98, 1) 2 +(46, 99, 1) 1 +(46, 100, 1) 0 +(47, 1, 1) 0 +(47, 2, 1) 1 +(47, 3, 1) 2 +(47, 4, 1) 3 +(47, 5, 1) 4 +(47, 6, 1) 5 +(47, 7, 1) 6 +(47, 8, 1) 7 +(47, 9, 1) 8 +(47, 10, 1) 9 +(47, 11, 1) 10 +(47, 12, 1) 11 +(47, 13, 1) 12 +(47, 14, 1) 13 +(47, 15, 1) 14 +(47, 16, 1) 15 +(47, 17, 1) 16 +(47, 18, 1) 17 +(47, 19, 1) 18 +(47, 20, 1) 19 +(47, 21, 1) 20 +(47, 22, 1) 21 +(47, 23, 1) 22 +(47, 24, 1) 23 +(47, 25, 1) 24 +(47, 26, 1) 25 +(47, 27, 1) 26 +(47, 28, 1) 27 +(47, 29, 1) 28 +(47, 30, 1) 29 +(47, 31, 1) 30 +(47, 32, 1) 31 +(47, 33, 1) 32 +(47, 34, 1) 33 +(47, 35, 1) 34 +(47, 36, 1) 35 +(47, 37, 1) 36 +(47, 38, 1) 37 +(47, 39, 1) 38 +(47, 62, 1) 38 +(47, 63, 1) 37 +(47, 64, 1) 36 +(47, 65, 1) 35 +(47, 66, 1) 34 +(47, 67, 1) 33 +(47, 68, 1) 32 +(47, 69, 1) 31 +(47, 70, 1) 30 +(47, 71, 1) 29 +(47, 72, 1) 28 +(47, 73, 1) 27 +(47, 74, 1) 26 +(47, 75, 1) 25 +(47, 76, 1) 24 +(47, 77, 1) 23 +(47, 78, 1) 22 +(47, 79, 1) 21 +(47, 80, 1) 20 +(47, 81, 1) 19 +(47, 82, 1) 18 +(47, 83, 1) 17 +(47, 84, 1) 16 +(47, 85, 1) 15 +(47, 86, 1) 14 +(47, 87, 1) 13 +(47, 88, 1) 12 +(47, 89, 1) 11 +(47, 90, 1) 10 +(47, 91, 1) 9 +(47, 92, 1) 8 +(47, 93, 1) 7 +(47, 94, 1) 6 +(47, 95, 1) 5 +(47, 96, 1) 4 +(47, 97, 1) 3 +(47, 98, 1) 2 +(47, 99, 1) 1 +(47, 100, 1) 0 +(48, 1, 1) 0 +(48, 2, 1) 1 +(48, 3, 1) 2 +(48, 4, 1) 3 +(48, 5, 1) 4 +(48, 6, 1) 5 +(48, 7, 1) 6 +(48, 8, 1) 7 +(48, 9, 1) 8 +(48, 10, 1) 9 +(48, 11, 1) 10 +(48, 12, 1) 11 +(48, 13, 1) 12 +(48, 14, 1) 13 +(48, 15, 1) 14 +(48, 16, 1) 15 +(48, 17, 1) 16 +(48, 18, 1) 17 +(48, 19, 1) 18 +(48, 20, 1) 19 +(48, 21, 1) 20 +(48, 22, 1) 21 +(48, 23, 1) 22 +(48, 24, 1) 23 +(48, 25, 1) 24 +(48, 26, 1) 25 +(48, 27, 1) 26 +(48, 28, 1) 27 +(48, 29, 1) 28 +(48, 30, 1) 29 +(48, 31, 1) 30 +(48, 32, 1) 31 +(48, 33, 1) 32 +(48, 34, 1) 33 +(48, 35, 1) 34 +(48, 36, 1) 35 +(48, 37, 1) 36 +(48, 38, 1) 37 +(48, 39, 1) 38 +(48, 62, 1) 38 +(48, 63, 1) 37 +(48, 64, 1) 36 +(48, 65, 1) 35 +(48, 66, 1) 34 +(48, 67, 1) 33 +(48, 68, 1) 32 +(48, 69, 1) 31 +(48, 70, 1) 30 +(48, 71, 1) 29 +(48, 72, 1) 28 +(48, 73, 1) 27 +(48, 74, 1) 26 +(48, 75, 1) 25 +(48, 76, 1) 24 +(48, 77, 1) 23 +(48, 78, 1) 22 +(48, 79, 1) 21 +(48, 80, 1) 20 +(48, 81, 1) 19 +(48, 82, 1) 18 +(48, 83, 1) 17 +(48, 84, 1) 16 +(48, 85, 1) 15 +(48, 86, 1) 14 +(48, 87, 1) 13 +(48, 88, 1) 12 +(48, 89, 1) 11 +(48, 90, 1) 10 +(48, 91, 1) 9 +(48, 92, 1) 8 +(48, 93, 1) 7 +(48, 94, 1) 6 +(48, 95, 1) 5 +(48, 96, 1) 4 +(48, 97, 1) 3 +(48, 98, 1) 2 +(48, 99, 1) 1 +(48, 100, 1) 0 +(49, 1, 1) 0 +(49, 2, 1) 1 +(49, 3, 1) 2 +(49, 4, 1) 3 +(49, 5, 1) 4 +(49, 6, 1) 5 +(49, 7, 1) 6 +(49, 8, 1) 7 +(49, 9, 1) 8 +(49, 10, 1) 9 +(49, 11, 1) 10 +(49, 12, 1) 11 +(49, 13, 1) 12 +(49, 14, 1) 13 +(49, 15, 1) 14 +(49, 16, 1) 15 +(49, 17, 1) 16 +(49, 18, 1) 17 +(49, 19, 1) 18 +(49, 20, 1) 19 +(49, 21, 1) 20 +(49, 22, 1) 21 +(49, 23, 1) 22 +(49, 24, 1) 23 +(49, 25, 1) 24 +(49, 26, 1) 25 +(49, 27, 1) 26 +(49, 28, 1) 27 +(49, 29, 1) 28 +(49, 30, 1) 29 +(49, 31, 1) 30 +(49, 32, 1) 31 +(49, 33, 1) 32 +(49, 34, 1) 33 +(49, 35, 1) 34 +(49, 36, 1) 35 +(49, 37, 1) 36 +(49, 38, 1) 37 +(49, 39, 1) 38 +(49, 62, 1) 38 +(49, 63, 1) 37 +(49, 64, 1) 36 +(49, 65, 1) 35 +(49, 66, 1) 34 +(49, 67, 1) 33 +(49, 68, 1) 32 +(49, 69, 1) 31 +(49, 70, 1) 30 +(49, 71, 1) 29 +(49, 72, 1) 28 +(49, 73, 1) 27 +(49, 74, 1) 26 +(49, 75, 1) 25 +(49, 76, 1) 24 +(49, 77, 1) 23 +(49, 78, 1) 22 +(49, 79, 1) 21 +(49, 80, 1) 20 +(49, 81, 1) 19 +(49, 82, 1) 18 +(49, 83, 1) 17 +(49, 84, 1) 16 +(49, 85, 1) 15 +(49, 86, 1) 14 +(49, 87, 1) 13 +(49, 88, 1) 12 +(49, 89, 1) 11 +(49, 90, 1) 10 +(49, 91, 1) 9 +(49, 92, 1) 8 +(49, 93, 1) 7 +(49, 94, 1) 6 +(49, 95, 1) 5 +(49, 96, 1) 4 +(49, 97, 1) 3 +(49, 98, 1) 2 +(49, 99, 1) 1 +(49, 100, 1) 0 +(50, 1, 1) 0 +(50, 2, 1) 1 +(50, 3, 1) 2 +(50, 4, 1) 3 +(50, 5, 1) 4 +(50, 6, 1) 5 +(50, 7, 1) 6 +(50, 8, 1) 7 +(50, 9, 1) 8 +(50, 10, 1) 9 +(50, 11, 1) 10 +(50, 12, 1) 11 +(50, 13, 1) 12 +(50, 14, 1) 13 +(50, 15, 1) 14 +(50, 16, 1) 15 +(50, 17, 1) 16 +(50, 18, 1) 17 +(50, 19, 1) 18 +(50, 20, 1) 19 +(50, 21, 1) 20 +(50, 22, 1) 21 +(50, 23, 1) 22 +(50, 24, 1) 23 +(50, 25, 1) 24 +(50, 26, 1) 25 +(50, 27, 1) 26 +(50, 28, 1) 27 +(50, 29, 1) 28 +(50, 30, 1) 29 +(50, 31, 1) 30 +(50, 32, 1) 31 +(50, 33, 1) 32 +(50, 34, 1) 33 +(50, 35, 1) 34 +(50, 36, 1) 35 +(50, 37, 1) 36 +(50, 38, 1) 37 +(50, 39, 1) 38 +(50, 62, 1) 38 +(50, 63, 1) 37 +(50, 64, 1) 36 +(50, 65, 1) 35 +(50, 66, 1) 34 +(50, 67, 1) 33 +(50, 68, 1) 32 +(50, 69, 1) 31 +(50, 70, 1) 30 +(50, 71, 1) 29 +(50, 72, 1) 28 +(50, 73, 1) 27 +(50, 74, 1) 26 +(50, 75, 1) 25 +(50, 76, 1) 24 +(50, 77, 1) 23 +(50, 78, 1) 22 +(50, 79, 1) 21 +(50, 80, 1) 20 +(50, 81, 1) 19 +(50, 82, 1) 18 +(50, 83, 1) 17 +(50, 84, 1) 16 +(50, 85, 1) 15 +(50, 86, 1) 14 +(50, 87, 1) 13 +(50, 88, 1) 12 +(50, 89, 1) 11 +(50, 90, 1) 10 +(50, 91, 1) 9 +(50, 92, 1) 8 +(50, 93, 1) 7 +(50, 94, 1) 6 +(50, 95, 1) 5 +(50, 96, 1) 4 +(50, 97, 1) 3 +(50, 98, 1) 2 +(50, 99, 1) 1 +(50, 100, 1) 0 +(51, 1, 1) 0 +(51, 2, 1) 1 +(51, 3, 1) 2 +(51, 4, 1) 3 +(51, 5, 1) 4 +(51, 6, 1) 5 +(51, 7, 1) 6 +(51, 8, 1) 7 +(51, 9, 1) 8 +(51, 10, 1) 9 +(51, 11, 1) 10 +(51, 12, 1) 11 +(51, 13, 1) 12 +(51, 14, 1) 13 +(51, 15, 1) 14 +(51, 16, 1) 15 +(51, 17, 1) 16 +(51, 18, 1) 17 +(51, 19, 1) 18 +(51, 20, 1) 19 +(51, 21, 1) 20 +(51, 22, 1) 21 +(51, 23, 1) 22 +(51, 24, 1) 23 +(51, 25, 1) 24 +(51, 26, 1) 25 +(51, 27, 1) 26 +(51, 28, 1) 27 +(51, 29, 1) 28 +(51, 30, 1) 29 +(51, 31, 1) 30 +(51, 32, 1) 31 +(51, 33, 1) 32 +(51, 34, 1) 33 +(51, 35, 1) 34 +(51, 36, 1) 35 +(51, 37, 1) 36 +(51, 38, 1) 37 +(51, 39, 1) 38 +(51, 62, 1) 38 +(51, 63, 1) 37 +(51, 64, 1) 36 +(51, 65, 1) 35 +(51, 66, 1) 34 +(51, 67, 1) 33 +(51, 68, 1) 32 +(51, 69, 1) 31 +(51, 70, 1) 30 +(51, 71, 1) 29 +(51, 72, 1) 28 +(51, 73, 1) 27 +(51, 74, 1) 26 +(51, 75, 1) 25 +(51, 76, 1) 24 +(51, 77, 1) 23 +(51, 78, 1) 22 +(51, 79, 1) 21 +(51, 80, 1) 20 +(51, 81, 1) 19 +(51, 82, 1) 18 +(51, 83, 1) 17 +(51, 84, 1) 16 +(51, 85, 1) 15 +(51, 86, 1) 14 +(51, 87, 1) 13 +(51, 88, 1) 12 +(51, 89, 1) 11 +(51, 90, 1) 10 +(51, 91, 1) 9 +(51, 92, 1) 8 +(51, 93, 1) 7 +(51, 94, 1) 6 +(51, 95, 1) 5 +(51, 96, 1) 4 +(51, 97, 1) 3 +(51, 98, 1) 2 +(51, 99, 1) 1 +(51, 100, 1) 0 +(52, 1, 1) 0 +(52, 2, 1) 1 +(52, 3, 1) 2 +(52, 4, 1) 3 +(52, 5, 1) 4 +(52, 6, 1) 5 +(52, 7, 1) 6 +(52, 8, 1) 7 +(52, 9, 1) 8 +(52, 10, 1) 9 +(52, 11, 1) 10 +(52, 12, 1) 11 +(52, 13, 1) 12 +(52, 14, 1) 13 +(52, 15, 1) 14 +(52, 16, 1) 15 +(52, 17, 1) 16 +(52, 18, 1) 17 +(52, 19, 1) 18 +(52, 20, 1) 19 +(52, 21, 1) 20 +(52, 22, 1) 21 +(52, 23, 1) 22 +(52, 24, 1) 23 +(52, 25, 1) 24 +(52, 26, 1) 25 +(52, 27, 1) 26 +(52, 28, 1) 27 +(52, 29, 1) 28 +(52, 30, 1) 29 +(52, 31, 1) 30 +(52, 32, 1) 31 +(52, 33, 1) 32 +(52, 34, 1) 33 +(52, 35, 1) 34 +(52, 36, 1) 35 +(52, 37, 1) 36 +(52, 38, 1) 37 +(52, 39, 1) 38 +(52, 62, 1) 38 +(52, 63, 1) 37 +(52, 64, 1) 36 +(52, 65, 1) 35 +(52, 66, 1) 34 +(52, 67, 1) 33 +(52, 68, 1) 32 +(52, 69, 1) 31 +(52, 70, 1) 30 +(52, 71, 1) 29 +(52, 72, 1) 28 +(52, 73, 1) 27 +(52, 74, 1) 26 +(52, 75, 1) 25 +(52, 76, 1) 24 +(52, 77, 1) 23 +(52, 78, 1) 22 +(52, 79, 1) 21 +(52, 80, 1) 20 +(52, 81, 1) 19 +(52, 82, 1) 18 +(52, 83, 1) 17 +(52, 84, 1) 16 +(52, 85, 1) 15 +(52, 86, 1) 14 +(52, 87, 1) 13 +(52, 88, 1) 12 +(52, 89, 1) 11 +(52, 90, 1) 10 +(52, 91, 1) 9 +(52, 92, 1) 8 +(52, 93, 1) 7 +(52, 94, 1) 6 +(52, 95, 1) 5 +(52, 96, 1) 4 +(52, 97, 1) 3 +(52, 98, 1) 2 +(52, 99, 1) 1 +(52, 100, 1) 0 +(53, 1, 1) 0 +(53, 2, 1) 1 +(53, 3, 1) 2 +(53, 4, 1) 3 +(53, 5, 1) 4 +(53, 6, 1) 5 +(53, 7, 1) 6 +(53, 8, 1) 7 +(53, 9, 1) 8 +(53, 10, 1) 9 +(53, 11, 1) 10 +(53, 12, 1) 11 +(53, 13, 1) 12 +(53, 14, 1) 13 +(53, 15, 1) 14 +(53, 16, 1) 15 +(53, 17, 1) 16 +(53, 18, 1) 17 +(53, 19, 1) 18 +(53, 20, 1) 19 +(53, 21, 1) 20 +(53, 22, 1) 21 +(53, 23, 1) 22 +(53, 24, 1) 23 +(53, 25, 1) 24 +(53, 26, 1) 25 +(53, 27, 1) 26 +(53, 28, 1) 27 +(53, 29, 1) 28 +(53, 30, 1) 29 +(53, 31, 1) 30 +(53, 32, 1) 31 +(53, 33, 1) 32 +(53, 34, 1) 33 +(53, 35, 1) 34 +(53, 36, 1) 35 +(53, 37, 1) 36 +(53, 38, 1) 37 +(53, 39, 1) 38 +(53, 62, 1) 38 +(53, 63, 1) 37 +(53, 64, 1) 36 +(53, 65, 1) 35 +(53, 66, 1) 34 +(53, 67, 1) 33 +(53, 68, 1) 32 +(53, 69, 1) 31 +(53, 70, 1) 30 +(53, 71, 1) 29 +(53, 72, 1) 28 +(53, 73, 1) 27 +(53, 74, 1) 26 +(53, 75, 1) 25 +(53, 76, 1) 24 +(53, 77, 1) 23 +(53, 78, 1) 22 +(53, 79, 1) 21 +(53, 80, 1) 20 +(53, 81, 1) 19 +(53, 82, 1) 18 +(53, 83, 1) 17 +(53, 84, 1) 16 +(53, 85, 1) 15 +(53, 86, 1) 14 +(53, 87, 1) 13 +(53, 88, 1) 12 +(53, 89, 1) 11 +(53, 90, 1) 10 +(53, 91, 1) 9 +(53, 92, 1) 8 +(53, 93, 1) 7 +(53, 94, 1) 6 +(53, 95, 1) 5 +(53, 96, 1) 4 +(53, 97, 1) 3 +(53, 98, 1) 2 +(53, 99, 1) 1 +(53, 100, 1) 0 +(54, 1, 1) 0 +(54, 2, 1) 1 +(54, 3, 1) 2 +(54, 4, 1) 3 +(54, 5, 1) 4 +(54, 6, 1) 5 +(54, 7, 1) 6 +(54, 8, 1) 7 +(54, 9, 1) 8 +(54, 10, 1) 9 +(54, 11, 1) 10 +(54, 12, 1) 11 +(54, 13, 1) 12 +(54, 14, 1) 13 +(54, 15, 1) 14 +(54, 16, 1) 15 +(54, 17, 1) 16 +(54, 18, 1) 17 +(54, 19, 1) 18 +(54, 20, 1) 19 +(54, 21, 1) 20 +(54, 22, 1) 21 +(54, 23, 1) 22 +(54, 24, 1) 23 +(54, 25, 1) 24 +(54, 26, 1) 25 +(54, 27, 1) 26 +(54, 28, 1) 27 +(54, 29, 1) 28 +(54, 30, 1) 29 +(54, 31, 1) 30 +(54, 32, 1) 31 +(54, 33, 1) 32 +(54, 34, 1) 33 +(54, 35, 1) 34 +(54, 36, 1) 35 +(54, 37, 1) 36 +(54, 38, 1) 37 +(54, 39, 1) 38 +(54, 62, 1) 38 +(54, 63, 1) 37 +(54, 64, 1) 36 +(54, 65, 1) 35 +(54, 66, 1) 34 +(54, 67, 1) 33 +(54, 68, 1) 32 +(54, 69, 1) 31 +(54, 70, 1) 30 +(54, 71, 1) 29 +(54, 72, 1) 28 +(54, 73, 1) 27 +(54, 74, 1) 26 +(54, 75, 1) 25 +(54, 76, 1) 24 +(54, 77, 1) 23 +(54, 78, 1) 22 +(54, 79, 1) 21 +(54, 80, 1) 20 +(54, 81, 1) 19 +(54, 82, 1) 18 +(54, 83, 1) 17 +(54, 84, 1) 16 +(54, 85, 1) 15 +(54, 86, 1) 14 +(54, 87, 1) 13 +(54, 88, 1) 12 +(54, 89, 1) 11 +(54, 90, 1) 10 +(54, 91, 1) 9 +(54, 92, 1) 8 +(54, 93, 1) 7 +(54, 94, 1) 6 +(54, 95, 1) 5 +(54, 96, 1) 4 +(54, 97, 1) 3 +(54, 98, 1) 2 +(54, 99, 1) 1 +(54, 100, 1) 0 +(55, 1, 1) 0 +(55, 2, 1) 1 +(55, 3, 1) 2 +(55, 4, 1) 3 +(55, 5, 1) 4 +(55, 6, 1) 5 +(55, 7, 1) 6 +(55, 8, 1) 7 +(55, 9, 1) 8 +(55, 10, 1) 9 +(55, 11, 1) 10 +(55, 12, 1) 11 +(55, 13, 1) 12 +(55, 14, 1) 13 +(55, 15, 1) 14 +(55, 16, 1) 15 +(55, 17, 1) 16 +(55, 18, 1) 17 +(55, 19, 1) 18 +(55, 20, 1) 19 +(55, 21, 1) 20 +(55, 22, 1) 21 +(55, 23, 1) 22 +(55, 24, 1) 23 +(55, 25, 1) 24 +(55, 26, 1) 25 +(55, 27, 1) 26 +(55, 28, 1) 27 +(55, 29, 1) 28 +(55, 30, 1) 29 +(55, 31, 1) 30 +(55, 32, 1) 30 +(55, 33, 1) 31 +(55, 34, 1) 32 +(55, 35, 1) 33 +(55, 36, 1) 34 +(55, 37, 1) 35 +(55, 38, 1) 36 +(55, 39, 1) 37 +(55, 62, 1) 37 +(55, 63, 1) 36 +(55, 64, 1) 35 +(55, 65, 1) 34 +(55, 66, 1) 33 +(55, 67, 1) 32 +(55, 68, 1) 31 +(55, 69, 1) 30 +(55, 70, 1) 30 +(55, 71, 1) 29 +(55, 72, 1) 28 +(55, 73, 1) 27 +(55, 74, 1) 26 +(55, 75, 1) 25 +(55, 76, 1) 24 +(55, 77, 1) 23 +(55, 78, 1) 22 +(55, 79, 1) 21 +(55, 80, 1) 20 +(55, 81, 1) 19 +(55, 82, 1) 18 +(55, 83, 1) 17 +(55, 84, 1) 16 +(55, 85, 1) 15 +(55, 86, 1) 14 +(55, 87, 1) 13 +(55, 88, 1) 12 +(55, 89, 1) 11 +(55, 90, 1) 10 +(55, 91, 1) 9 +(55, 92, 1) 8 +(55, 93, 1) 7 +(55, 94, 1) 6 +(55, 95, 1) 5 +(55, 96, 1) 4 +(55, 97, 1) 3 +(55, 98, 1) 2 +(55, 99, 1) 1 +(55, 100, 1) 0 +(56, 1, 1) 0 +(56, 2, 1) 1 +(56, 3, 1) 2 +(56, 4, 1) 3 +(56, 5, 1) 4 +(56, 6, 1) 5 +(56, 7, 1) 6 +(56, 8, 1) 7 +(56, 9, 1) 8 +(56, 10, 1) 9 +(56, 11, 1) 10 +(56, 12, 1) 11 +(56, 13, 1) 12 +(56, 14, 1) 13 +(56, 15, 1) 14 +(56, 16, 1) 15 +(56, 17, 1) 16 +(56, 18, 1) 17 +(56, 19, 1) 18 +(56, 20, 1) 19 +(56, 21, 1) 20 +(56, 22, 1) 21 +(56, 23, 1) 22 +(56, 24, 1) 23 +(56, 25, 1) 23 +(56, 26, 1) 24 +(56, 27, 1) 25 +(56, 28, 1) 26 +(56, 29, 1) 27 +(56, 30, 1) 28 +(56, 31, 1) 29 +(56, 32, 1) 30 +(56, 33, 1) 31 +(56, 34, 1) 32 +(56, 35, 1) 33 +(56, 36, 1) 34 +(56, 37, 1) 35 +(56, 38, 1) 36 +(56, 39, 1) 37 +(56, 40, 1) 38 +(56, 61, 1) 38 +(56, 62, 1) 37 +(56, 63, 1) 36 +(56, 64, 1) 35 +(56, 65, 1) 34 +(56, 66, 1) 33 +(56, 67, 1) 32 +(56, 68, 1) 31 +(56, 69, 1) 30 +(56, 70, 1) 29 +(56, 71, 1) 28 +(56, 72, 1) 27 +(56, 73, 1) 26 +(56, 74, 1) 25 +(56, 75, 1) 24 +(56, 76, 1) 23 +(56, 77, 1) 23 +(56, 78, 1) 22 +(56, 79, 1) 21 +(56, 80, 1) 20 +(56, 81, 1) 19 +(56, 82, 1) 18 +(56, 83, 1) 17 +(56, 84, 1) 16 +(56, 85, 1) 15 +(56, 86, 1) 14 +(56, 87, 1) 13 +(56, 88, 1) 12 +(56, 89, 1) 11 +(56, 90, 1) 10 +(56, 91, 1) 9 +(56, 92, 1) 8 +(56, 93, 1) 7 +(56, 94, 1) 6 +(56, 95, 1) 5 +(56, 96, 1) 4 +(56, 97, 1) 3 +(56, 98, 1) 2 +(56, 99, 1) 1 +(56, 100, 1) 0 +(57, 1, 1) 0 +(57, 2, 1) 1 +(57, 3, 1) 2 +(57, 4, 1) 3 +(57, 5, 1) 4 +(57, 6, 1) 5 +(57, 7, 1) 6 +(57, 8, 1) 7 +(57, 9, 1) 8 +(57, 10, 1) 9 +(57, 11, 1) 10 +(57, 12, 1) 11 +(57, 13, 1) 12 +(57, 14, 1) 13 +(57, 15, 1) 14 +(57, 16, 1) 14 +(57, 17, 1) 15 +(57, 18, 1) 16 +(57, 19, 1) 17 +(57, 20, 1) 18 +(57, 21, 1) 19 +(57, 22, 1) 20 +(57, 23, 1) 21 +(57, 24, 1) 22 +(57, 25, 1) 23 +(57, 26, 1) 24 +(57, 27, 1) 25 +(57, 28, 1) 26 +(57, 29, 1) 27 +(57, 30, 1) 28 +(57, 31, 1) 29 +(57, 32, 1) 30 +(57, 33, 1) 31 +(57, 34, 1) 32 +(57, 35, 1) 33 +(57, 36, 1) 34 +(57, 37, 1) 35 +(57, 38, 1) 35 +(57, 39, 1) 36 +(57, 40, 1) 37 +(57, 61, 1) 37 +(57, 62, 1) 36 +(57, 63, 1) 35 +(57, 64, 1) 35 +(57, 65, 1) 34 +(57, 66, 1) 33 +(57, 67, 1) 32 +(57, 68, 1) 31 +(57, 69, 1) 30 +(57, 70, 1) 29 +(57, 71, 1) 28 +(57, 72, 1) 27 +(57, 73, 1) 26 +(57, 74, 1) 25 +(57, 75, 1) 24 +(57, 76, 1) 23 +(57, 77, 1) 22 +(57, 78, 1) 21 +(57, 79, 1) 20 +(57, 80, 1) 19 +(57, 81, 1) 18 +(57, 82, 1) 17 +(57, 83, 1) 16 +(57, 84, 1) 15 +(57, 85, 1) 14 +(57, 86, 1) 14 +(57, 87, 1) 13 +(57, 88, 1) 12 +(57, 89, 1) 11 +(57, 90, 1) 10 +(57, 91, 1) 9 +(57, 92, 1) 8 +(57, 93, 1) 7 +(57, 94, 1) 6 +(57, 95, 1) 5 +(57, 96, 1) 4 +(57, 97, 1) 3 +(57, 98, 1) 2 +(57, 99, 1) 1 +(57, 100, 1) 0 +(58, 1, 1) 0 +(58, 2, 1) 1 +(58, 3, 1) 2 +(58, 4, 1) 3 +(58, 5, 1) 4 +(58, 6, 1) 4 +(58, 7, 1) 5 +(58, 8, 1) 6 +(58, 9, 1) 7 +(58, 10, 1) 8 +(58, 11, 1) 9 +(58, 12, 1) 10 +(58, 13, 1) 11 +(58, 14, 1) 12 +(58, 15, 1) 13 +(58, 16, 1) 14 +(58, 17, 1) 15 +(58, 18, 1) 16 +(58, 19, 1) 17 +(58, 20, 1) 18 +(58, 21, 1) 19 +(58, 22, 1) 20 +(58, 23, 1) 21 +(58, 24, 1) 22 +(58, 25, 1) 23 +(58, 26, 1) 24 +(58, 27, 1) 25 +(58, 28, 1) 26 +(58, 29, 1) 27 +(58, 30, 1) 28 +(58, 31, 1) 29 +(58, 32, 1) 30 +(58, 33, 1) 30 +(58, 34, 1) 31 +(58, 35, 1) 32 +(58, 36, 1) 33 +(58, 37, 1) 34 +(58, 38, 1) 35 +(58, 39, 1) 36 +(58, 40, 1) 37 +(58, 41, 1) 37 +(58, 60, 1) 37 +(58, 61, 1) 37 +(58, 62, 1) 36 +(58, 63, 1) 35 +(58, 64, 1) 34 +(58, 65, 1) 33 +(58, 66, 1) 32 +(58, 67, 1) 31 +(58, 68, 1) 30 +(58, 69, 1) 30 +(58, 70, 1) 29 +(58, 71, 1) 28 +(58, 72, 1) 27 +(58, 73, 1) 26 +(58, 74, 1) 25 +(58, 75, 1) 24 +(58, 76, 1) 23 +(58, 77, 1) 22 +(58, 78, 1) 21 +(58, 79, 1) 20 +(58, 80, 1) 19 +(58, 81, 1) 18 +(58, 82, 1) 17 +(58, 83, 1) 16 +(58, 84, 1) 15 +(58, 85, 1) 14 +(58, 86, 1) 13 +(58, 87, 1) 12 +(58, 88, 1) 11 +(58, 89, 1) 10 +(58, 90, 1) 9 +(58, 91, 1) 8 +(58, 92, 1) 7 +(58, 93, 1) 6 +(58, 94, 1) 5 +(58, 95, 1) 4 +(58, 96, 1) 4 +(58, 97, 1) 3 +(58, 98, 1) 2 +(58, 99, 1) 1 +(58, 100, 1) 0 +(59, 1, 1) 0 +(59, 2, 1) 0 +(59, 3, 1) 1 +(59, 4, 1) 2 +(59, 5, 1) 3 +(59, 6, 1) 4 +(59, 7, 1) 5 +(59, 8, 1) 6 +(59, 9, 1) 7 +(59, 10, 1) 8 +(59, 11, 1) 9 +(59, 12, 1) 10 +(59, 13, 1) 11 +(59, 14, 1) 12 +(59, 15, 1) 13 +(59, 16, 1) 14 +(59, 17, 1) 15 +(59, 18, 1) 16 +(59, 19, 1) 17 +(59, 20, 1) 18 +(59, 21, 1) 19 +(59, 22, 1) 20 +(59, 23, 1) 21 +(59, 24, 1) 22 +(59, 25, 1) 23 +(59, 26, 1) 24 +(59, 27, 1) 25 +(59, 28, 1) 25 +(59, 29, 1) 26 +(59, 30, 1) 27 +(59, 31, 1) 28 +(59, 32, 1) 29 +(59, 33, 1) 30 +(59, 34, 1) 31 +(59, 35, 1) 32 +(59, 36, 1) 33 +(59, 37, 1) 34 +(59, 38, 1) 34 +(59, 39, 1) 35 +(59, 40, 1) 36 +(59, 41, 1) 37 +(59, 42, 1) 38 +(59, 59, 1) 38 +(59, 60, 1) 37 +(59, 61, 1) 36 +(59, 62, 1) 35 +(59, 63, 1) 34 +(59, 64, 1) 34 +(59, 65, 1) 33 +(59, 66, 1) 32 +(59, 67, 1) 31 +(59, 68, 1) 30 +(59, 69, 1) 29 +(59, 70, 1) 28 +(59, 71, 1) 27 +(59, 72, 1) 26 +(59, 73, 1) 25 +(59, 74, 1) 25 +(59, 75, 1) 24 +(59, 76, 1) 23 +(59, 77, 1) 22 +(59, 78, 1) 21 +(59, 79, 1) 20 +(59, 80, 1) 19 +(59, 81, 1) 18 +(59, 82, 1) 17 +(59, 83, 1) 16 +(59, 84, 1) 15 +(59, 85, 1) 14 +(59, 86, 1) 13 +(59, 87, 1) 12 +(59, 88, 1) 11 +(59, 89, 1) 10 +(59, 90, 1) 9 +(59, 91, 1) 8 +(59, 92, 1) 7 +(59, 93, 1) 6 +(59, 94, 1) 5 +(59, 95, 1) 4 +(59, 96, 1) 3 +(59, 97, 1) 2 +(59, 98, 1) 1 +(59, 99, 1) 0 +(59, 100, 1) 0 +(60, 1, 1) 0 +(60, 2, 1) 0 +(60, 3, 1) 1 +(60, 4, 1) 2 +(60, 5, 1) 3 +(60, 6, 1) 4 +(60, 7, 1) 5 +(60, 8, 1) 6 +(60, 9, 1) 7 +(60, 10, 1) 8 +(60, 11, 1) 9 +(60, 12, 1) 10 +(60, 13, 1) 11 +(60, 14, 1) 12 +(60, 15, 1) 13 +(60, 16, 1) 14 +(60, 17, 1) 15 +(60, 18, 1) 16 +(60, 19, 1) 17 +(60, 20, 1) 18 +(60, 21, 1) 19 +(60, 22, 1) 20 +(60, 23, 1) 20 +(60, 24, 1) 21 +(60, 25, 1) 22 +(60, 26, 1) 23 +(60, 27, 1) 24 +(60, 28, 1) 25 +(60, 29, 1) 26 +(60, 30, 1) 27 +(60, 31, 1) 28 +(60, 32, 1) 29 +(60, 33, 1) 30 +(60, 34, 1) 30 +(60, 35, 1) 31 +(60, 36, 1) 32 +(60, 37, 1) 33 +(60, 38, 1) 34 +(60, 39, 1) 35 +(60, 40, 1) 35 +(60, 41, 1) 36 +(60, 42, 1) 37 +(60, 43, 1) 37 +(60, 58, 1) 37 +(60, 59, 1) 37 +(60, 60, 1) 36 +(60, 61, 1) 35 +(60, 62, 1) 35 +(60, 63, 1) 34 +(60, 64, 1) 33 +(60, 65, 1) 32 +(60, 66, 1) 31 +(60, 67, 1) 30 +(60, 68, 1) 30 +(60, 69, 1) 29 +(60, 70, 1) 28 +(60, 71, 1) 27 +(60, 72, 1) 26 +(60, 73, 1) 25 +(60, 74, 1) 24 +(60, 75, 1) 23 +(60, 76, 1) 22 +(60, 77, 1) 21 +(60, 78, 1) 20 +(60, 79, 1) 20 +(60, 80, 1) 19 +(60, 81, 1) 18 +(60, 82, 1) 17 +(60, 83, 1) 16 +(60, 84, 1) 15 +(60, 85, 1) 14 +(60, 86, 1) 13 +(60, 87, 1) 12 +(60, 88, 1) 11 +(60, 89, 1) 10 +(60, 90, 1) 9 +(60, 91, 1) 8 +(60, 92, 1) 7 +(60, 93, 1) 6 +(60, 94, 1) 5 +(60, 95, 1) 4 +(60, 96, 1) 3 +(60, 97, 1) 2 +(60, 98, 1) 1 +(60, 99, 1) 0 +(60, 100, 1) 0 +(61, 4, 1) 2 +(61, 5, 1) 3 +(61, 6, 1) 4 +(61, 7, 1) 5 +(61, 8, 1) 6 +(61, 9, 1) 7 +(61, 10, 1) 8 +(61, 11, 1) 9 +(61, 12, 1) 10 +(61, 13, 1) 11 +(61, 14, 1) 12 +(61, 15, 1) 13 +(61, 16, 1) 14 +(61, 17, 1) 15 +(61, 18, 1) 16 +(61, 19, 1) 16 +(61, 20, 1) 17 +(61, 21, 1) 18 +(61, 22, 1) 19 +(61, 23, 1) 20 +(61, 24, 1) 21 +(61, 25, 1) 22 +(61, 26, 1) 23 +(61, 27, 1) 24 +(61, 28, 1) 25 +(61, 29, 1) 26 +(61, 30, 1) 27 +(61, 31, 1) 27 +(61, 32, 1) 28 +(61, 33, 1) 29 +(61, 34, 1) 30 +(61, 35, 1) 31 +(61, 36, 1) 32 +(61, 37, 1) 32 +(61, 38, 1) 33 +(61, 39, 1) 34 +(61, 40, 1) 35 +(61, 41, 1) 35 +(61, 42, 1) 36 +(61, 43, 1) 37 +(61, 44, 1) 37 +(61, 45, 1) 38 +(61, 56, 1) 38 +(61, 57, 1) 37 +(61, 58, 1) 37 +(61, 59, 1) 36 +(61, 60, 1) 35 +(61, 61, 1) 35 +(61, 62, 1) 34 +(61, 63, 1) 33 +(61, 64, 1) 32 +(61, 65, 1) 32 +(61, 66, 1) 31 +(61, 67, 1) 30 +(61, 68, 1) 29 +(61, 69, 1) 28 +(61, 70, 1) 27 +(61, 71, 1) 27 +(61, 72, 1) 26 +(61, 73, 1) 25 +(61, 74, 1) 24 +(61, 75, 1) 23 +(61, 76, 1) 22 +(61, 77, 1) 21 +(61, 78, 1) 20 +(61, 79, 1) 19 +(61, 80, 1) 18 +(61, 81, 1) 17 +(61, 82, 1) 16 +(61, 83, 1) 16 +(61, 84, 1) 15 +(61, 85, 1) 14 +(61, 86, 1) 13 +(61, 87, 1) 12 +(61, 88, 1) 11 +(61, 89, 1) 10 +(61, 90, 1) 9 +(61, 91, 1) 8 +(61, 92, 1) 7 +(61, 93, 1) 6 +(61, 94, 1) 5 +(61, 95, 1) 4 +(61, 96, 1) 3 +(61, 97, 1) 2 +(62, 4, 1) 2 +(62, 5, 1) 3 +(62, 6, 1) 4 +(62, 7, 1) 5 +(62, 8, 1) 6 +(62, 9, 1) 7 +(62, 10, 1) 8 +(62, 11, 1) 9 +(62, 12, 1) 9 +(62, 13, 1) 10 +(62, 14, 1) 11 +(62, 15, 1) 12 +(62, 16, 1) 13 +(62, 17, 1) 14 +(62, 18, 1) 15 +(62, 19, 1) 16 +(62, 20, 1) 17 +(62, 21, 1) 18 +(62, 22, 1) 19 +(62, 23, 1) 20 +(62, 24, 1) 21 +(62, 25, 1) 22 +(62, 26, 1) 23 +(62, 27, 1) 23 +(62, 28, 1) 24 +(62, 29, 1) 25 +(62, 30, 1) 26 +(62, 31, 1) 27 +(62, 32, 1) 28 +(62, 33, 1) 29 +(62, 34, 1) 29 +(62, 35, 1) 30 +(62, 36, 1) 31 +(62, 37, 1) 32 +(62, 38, 1) 33 +(62, 39, 1) 33 +(62, 40, 1) 34 +(62, 41, 1) 35 +(62, 42, 1) 35 +(62, 43, 1) 36 +(62, 44, 1) 36 +(62, 45, 1) 37 +(62, 46, 1) 37 +(62, 47, 1) 37 +(62, 48, 1) 38 +(62, 49, 1) 38 +(62, 50, 1) 38 +(62, 51, 1) 38 +(62, 52, 1) 38 +(62, 53, 1) 38 +(62, 54, 1) 37 +(62, 55, 1) 37 +(62, 56, 1) 37 +(62, 57, 1) 36 +(62, 58, 1) 36 +(62, 59, 1) 35 +(62, 60, 1) 35 +(62, 61, 1) 34 +(62, 62, 1) 33 +(62, 63, 1) 33 +(62, 64, 1) 32 +(62, 65, 1) 31 +(62, 66, 1) 30 +(62, 67, 1) 29 +(62, 68, 1) 29 +(62, 69, 1) 28 +(62, 70, 1) 27 +(62, 71, 1) 26 +(62, 72, 1) 25 +(62, 73, 1) 24 +(62, 74, 1) 23 +(62, 75, 1) 23 +(62, 76, 1) 22 +(62, 77, 1) 21 +(62, 78, 1) 20 +(62, 79, 1) 19 +(62, 80, 1) 18 +(62, 81, 1) 17 +(62, 82, 1) 16 +(62, 83, 1) 15 +(62, 84, 1) 14 +(62, 85, 1) 13 +(62, 86, 1) 12 +(62, 87, 1) 11 +(62, 88, 1) 10 +(62, 89, 1) 9 +(62, 90, 1) 9 +(62, 91, 1) 8 +(62, 92, 1) 7 +(62, 93, 1) 6 +(62, 94, 1) 5 +(62, 95, 1) 4 +(62, 96, 1) 3 +(62, 97, 1) 2 +(63, 4, 1) 2 +(63, 5, 1) 3 +(63, 6, 1) 3 +(63, 7, 1) 4 +(63, 8, 1) 5 +(63, 9, 1) 6 +(63, 10, 1) 7 +(63, 11, 1) 8 +(63, 12, 1) 9 +(63, 13, 1) 10 +(63, 14, 1) 11 +(63, 15, 1) 12 +(63, 16, 1) 13 +(63, 17, 1) 14 +(63, 18, 1) 15 +(63, 19, 1) 16 +(63, 20, 1) 17 +(63, 21, 1) 18 +(63, 22, 1) 18 +(63, 23, 1) 19 +(63, 24, 1) 20 +(63, 25, 1) 21 +(63, 26, 1) 22 +(63, 27, 1) 23 +(63, 28, 1) 24 +(63, 29, 1) 25 +(63, 30, 1) 26 +(63, 31, 1) 26 +(63, 32, 1) 27 +(63, 33, 1) 28 +(63, 34, 1) 29 +(63, 35, 1) 30 +(63, 36, 1) 30 +(63, 37, 1) 31 +(63, 38, 1) 32 +(63, 39, 1) 33 +(63, 40, 1) 33 +(63, 41, 1) 34 +(63, 42, 1) 34 +(63, 43, 1) 35 +(63, 44, 1) 35 +(63, 45, 1) 36 +(63, 46, 1) 36 +(63, 47, 1) 37 +(63, 48, 1) 37 +(63, 49, 1) 37 +(63, 50, 1) 37 +(63, 51, 1) 37 +(63, 52, 1) 37 +(63, 53, 1) 37 +(63, 54, 1) 37 +(63, 55, 1) 36 +(63, 56, 1) 36 +(63, 57, 1) 35 +(63, 58, 1) 35 +(63, 59, 1) 34 +(63, 60, 1) 34 +(63, 61, 1) 33 +(63, 62, 1) 33 +(63, 63, 1) 32 +(63, 64, 1) 31 +(63, 65, 1) 30 +(63, 66, 1) 30 +(63, 67, 1) 29 +(63, 68, 1) 28 +(63, 69, 1) 27 +(63, 70, 1) 26 +(63, 71, 1) 26 +(63, 72, 1) 25 +(63, 73, 1) 24 +(63, 74, 1) 23 +(63, 75, 1) 22 +(63, 76, 1) 21 +(63, 77, 1) 20 +(63, 78, 1) 19 +(63, 79, 1) 18 +(63, 80, 1) 18 +(63, 81, 1) 17 +(63, 82, 1) 16 +(63, 83, 1) 15 +(63, 84, 1) 14 +(63, 85, 1) 13 +(63, 86, 1) 12 +(63, 87, 1) 11 +(63, 88, 1) 10 +(63, 89, 1) 9 +(63, 90, 1) 8 +(63, 91, 1) 7 +(63, 92, 1) 6 +(63, 93, 1) 5 +(63, 94, 1) 4 +(63, 95, 1) 3 +(63, 96, 1) 3 +(63, 97, 1) 2 +(64, 4, 1) 1 +(64, 5, 1) 2 +(64, 6, 1) 3 +(64, 7, 1) 4 +(64, 8, 1) 5 +(64, 9, 1) 6 +(64, 10, 1) 7 +(64, 11, 1) 8 +(64, 12, 1) 9 +(64, 13, 1) 10 +(64, 14, 1) 11 +(64, 15, 1) 12 +(64, 16, 1) 13 +(64, 17, 1) 14 +(64, 18, 1) 14 +(64, 19, 1) 15 +(64, 20, 1) 16 +(64, 21, 1) 17 +(64, 22, 1) 18 +(64, 23, 1) 19 +(64, 24, 1) 20 +(64, 25, 1) 21 +(64, 26, 1) 22 +(64, 27, 1) 22 +(64, 28, 1) 23 +(64, 29, 1) 24 +(64, 30, 1) 25 +(64, 31, 1) 26 +(64, 32, 1) 27 +(64, 33, 1) 27 +(64, 34, 1) 28 +(64, 35, 1) 29 +(64, 36, 1) 30 +(64, 37, 1) 30 +(64, 38, 1) 31 +(64, 39, 1) 32 +(64, 40, 1) 32 +(64, 41, 1) 33 +(64, 42, 1) 34 +(64, 43, 1) 34 +(64, 44, 1) 35 +(64, 45, 1) 35 +(64, 46, 1) 35 +(64, 47, 1) 36 +(64, 48, 1) 36 +(64, 49, 1) 36 +(64, 50, 1) 36 +(64, 51, 1) 36 +(64, 52, 1) 36 +(64, 53, 1) 36 +(64, 54, 1) 36 +(64, 55, 1) 35 +(64, 56, 1) 35 +(64, 57, 1) 35 +(64, 58, 1) 34 +(64, 59, 1) 34 +(64, 60, 1) 33 +(64, 61, 1) 32 +(64, 62, 1) 32 +(64, 63, 1) 31 +(64, 64, 1) 30 +(64, 65, 1) 30 +(64, 66, 1) 29 +(64, 67, 1) 28 +(64, 68, 1) 27 +(64, 69, 1) 27 +(64, 70, 1) 26 +(64, 71, 1) 25 +(64, 72, 1) 24 +(64, 73, 1) 23 +(64, 74, 1) 22 +(64, 75, 1) 22 +(64, 76, 1) 21 +(64, 77, 1) 20 +(64, 78, 1) 19 +(64, 79, 1) 18 +(64, 80, 1) 17 +(64, 81, 1) 16 +(64, 82, 1) 15 +(64, 83, 1) 14 +(64, 84, 1) 14 +(64, 85, 1) 13 +(64, 86, 1) 12 +(64, 87, 1) 11 +(64, 88, 1) 10 +(64, 89, 1) 9 +(64, 90, 1) 8 +(64, 91, 1) 7 +(64, 92, 1) 6 +(64, 93, 1) 5 +(64, 94, 1) 4 +(64, 95, 1) 3 +(64, 96, 1) 2 +(64, 97, 1) 1 +(65, 4, 1) 1 +(65, 5, 1) 2 +(65, 6, 1) 3 +(65, 7, 1) 4 +(65, 8, 1) 5 +(65, 9, 1) 6 +(65, 10, 1) 7 +(65, 11, 1) 8 +(65, 12, 1) 8 +(65, 13, 1) 9 +(65, 14, 1) 10 +(65, 15, 1) 11 +(65, 16, 1) 12 +(65, 17, 1) 13 +(65, 18, 1) 14 +(65, 19, 1) 15 +(65, 20, 1) 16 +(65, 21, 1) 17 +(65, 22, 1) 18 +(65, 23, 1) 19 +(65, 24, 1) 19 +(65, 25, 1) 20 +(65, 26, 1) 21 +(65, 27, 1) 22 +(65, 28, 1) 23 +(65, 29, 1) 24 +(65, 30, 1) 24 +(65, 31, 1) 25 +(65, 32, 1) 26 +(65, 33, 1) 27 +(65, 34, 1) 28 +(65, 35, 1) 28 +(65, 36, 1) 29 +(65, 37, 1) 30 +(65, 38, 1) 30 +(65, 39, 1) 31 +(65, 40, 1) 32 +(65, 41, 1) 32 +(65, 42, 1) 33 +(65, 43, 1) 33 +(65, 44, 1) 34 +(65, 45, 1) 34 +(65, 46, 1) 34 +(65, 47, 1) 35 +(65, 48, 1) 35 +(65, 49, 1) 35 +(65, 50, 1) 35 +(65, 51, 1) 35 +(65, 52, 1) 35 +(65, 53, 1) 35 +(65, 54, 1) 35 +(65, 55, 1) 34 +(65, 56, 1) 34 +(65, 57, 1) 34 +(65, 58, 1) 33 +(65, 59, 1) 33 +(65, 60, 1) 32 +(65, 61, 1) 32 +(65, 62, 1) 31 +(65, 63, 1) 30 +(65, 64, 1) 30 +(65, 65, 1) 29 +(65, 66, 1) 28 +(65, 67, 1) 28 +(65, 68, 1) 27 +(65, 69, 1) 26 +(65, 70, 1) 25 +(65, 71, 1) 24 +(65, 72, 1) 24 +(65, 73, 1) 23 +(65, 74, 1) 22 +(65, 75, 1) 21 +(65, 76, 1) 20 +(65, 77, 1) 19 +(65, 78, 1) 19 +(65, 79, 1) 18 +(65, 80, 1) 17 +(65, 81, 1) 16 +(65, 82, 1) 15 +(65, 83, 1) 14 +(65, 84, 1) 13 +(65, 85, 1) 12 +(65, 86, 1) 11 +(65, 87, 1) 10 +(65, 88, 1) 9 +(65, 89, 1) 8 +(65, 90, 1) 8 +(65, 91, 1) 7 +(65, 92, 1) 6 +(65, 93, 1) 5 +(65, 94, 1) 4 +(65, 95, 1) 3 +(65, 96, 1) 2 +(65, 97, 1) 1 +(66, 6, 1) 3 +(66, 7, 1) 4 +(66, 8, 1) 5 +(66, 9, 1) 6 +(66, 10, 1) 6 +(66, 11, 1) 7 +(66, 12, 1) 8 +(66, 13, 1) 9 +(66, 14, 1) 10 +(66, 15, 1) 11 +(66, 16, 1) 12 +(66, 17, 1) 13 +(66, 18, 1) 14 +(66, 19, 1) 15 +(66, 20, 1) 16 +(66, 21, 1) 16 +(66, 22, 1) 17 +(66, 23, 1) 18 +(66, 24, 1) 19 +(66, 25, 1) 20 +(66, 26, 1) 21 +(66, 27, 1) 21 +(66, 28, 1) 22 +(66, 29, 1) 23 +(66, 30, 1) 24 +(66, 31, 1) 25 +(66, 32, 1) 25 +(66, 33, 1) 26 +(66, 34, 1) 27 +(66, 35, 1) 28 +(66, 36, 1) 28 +(66, 37, 1) 29 +(66, 38, 1) 30 +(66, 39, 1) 30 +(66, 40, 1) 31 +(66, 41, 1) 31 +(66, 42, 1) 32 +(66, 43, 1) 32 +(66, 44, 1) 33 +(66, 45, 1) 33 +(66, 46, 1) 33 +(66, 47, 1) 34 +(66, 48, 1) 34 +(66, 49, 1) 34 +(66, 50, 1) 34 +(66, 51, 1) 34 +(66, 52, 1) 34 +(66, 53, 1) 34 +(66, 54, 1) 34 +(66, 55, 1) 33 +(66, 56, 1) 33 +(66, 57, 1) 33 +(66, 58, 1) 32 +(66, 59, 1) 32 +(66, 60, 1) 31 +(66, 61, 1) 31 +(66, 62, 1) 30 +(66, 63, 1) 30 +(66, 64, 1) 29 +(66, 65, 1) 28 +(66, 66, 1) 28 +(66, 67, 1) 27 +(66, 68, 1) 26 +(66, 69, 1) 25 +(66, 70, 1) 25 +(66, 71, 1) 24 +(66, 72, 1) 23 +(66, 73, 1) 22 +(66, 74, 1) 21 +(66, 75, 1) 21 +(66, 76, 1) 20 +(66, 77, 1) 19 +(66, 78, 1) 18 +(66, 79, 1) 17 +(66, 80, 1) 16 +(66, 81, 1) 16 +(66, 82, 1) 15 +(66, 83, 1) 14 +(66, 84, 1) 13 +(66, 85, 1) 12 +(66, 86, 1) 11 +(66, 87, 1) 10 +(66, 88, 1) 9 +(66, 89, 1) 8 +(66, 90, 1) 7 +(66, 91, 1) 6 +(66, 92, 1) 6 +(66, 93, 1) 5 +(66, 94, 1) 4 +(66, 95, 1) 3 +(67, 6, 1) 2 +(67, 7, 1) 3 +(67, 8, 1) 4 +(67, 9, 1) 5 +(67, 10, 1) 6 +(67, 11, 1) 7 +(67, 12, 1) 8 +(67, 13, 1) 9 +(67, 14, 1) 10 +(67, 15, 1) 11 +(67, 16, 1) 11 +(67, 17, 1) 12 +(67, 18, 1) 13 +(67, 19, 1) 14 +(67, 20, 1) 15 +(67, 21, 1) 16 +(67, 22, 1) 17 +(67, 23, 1) 18 +(67, 24, 1) 18 +(67, 25, 1) 19 +(67, 26, 1) 20 +(67, 27, 1) 21 +(67, 28, 1) 22 +(67, 29, 1) 23 +(67, 30, 1) 23 +(67, 31, 1) 24 +(67, 32, 1) 25 +(67, 33, 1) 26 +(67, 34, 1) 26 +(67, 35, 1) 27 +(67, 36, 1) 28 +(67, 37, 1) 28 +(67, 38, 1) 29 +(67, 39, 1) 29 +(67, 40, 1) 30 +(67, 41, 1) 30 +(67, 42, 1) 31 +(67, 43, 1) 31 +(67, 44, 1) 32 +(67, 45, 1) 32 +(67, 46, 1) 32 +(67, 47, 1) 33 +(67, 48, 1) 33 +(67, 49, 1) 33 +(67, 50, 1) 33 +(67, 51, 1) 33 +(67, 52, 1) 33 +(67, 53, 1) 33 +(67, 54, 1) 33 +(67, 55, 1) 32 +(67, 56, 1) 32 +(67, 57, 1) 32 +(67, 58, 1) 31 +(67, 59, 1) 31 +(67, 60, 1) 30 +(67, 61, 1) 30 +(67, 62, 1) 29 +(67, 63, 1) 29 +(67, 64, 1) 28 +(67, 65, 1) 28 +(67, 66, 1) 27 +(67, 67, 1) 26 +(67, 68, 1) 26 +(67, 69, 1) 25 +(67, 70, 1) 24 +(67, 71, 1) 23 +(67, 72, 1) 23 +(67, 73, 1) 22 +(67, 74, 1) 21 +(67, 75, 1) 20 +(67, 76, 1) 19 +(67, 77, 1) 18 +(67, 78, 1) 18 +(67, 79, 1) 17 +(67, 80, 1) 16 +(67, 81, 1) 15 +(67, 82, 1) 14 +(67, 83, 1) 13 +(67, 84, 1) 12 +(67, 85, 1) 11 +(67, 86, 1) 11 +(67, 87, 1) 10 +(67, 88, 1) 9 +(67, 89, 1) 8 +(67, 90, 1) 7 +(67, 91, 1) 6 +(67, 92, 1) 5 +(67, 93, 1) 4 +(67, 94, 1) 3 +(67, 95, 1) 2 +(68, 6, 1) 2 +(68, 7, 1) 3 +(68, 8, 1) 4 +(68, 9, 1) 5 +(68, 10, 1) 6 +(68, 11, 1) 7 +(68, 12, 1) 7 +(68, 13, 1) 8 +(68, 14, 1) 9 +(68, 15, 1) 10 +(68, 16, 1) 11 +(68, 17, 1) 12 +(68, 18, 1) 13 +(68, 19, 1) 14 +(68, 20, 1) 15 +(68, 21, 1) 15 +(68, 22, 1) 16 +(68, 23, 1) 17 +(68, 24, 1) 18 +(68, 25, 1) 19 +(68, 26, 1) 20 +(68, 27, 1) 20 +(68, 28, 1) 21 +(68, 29, 1) 22 +(68, 30, 1) 23 +(68, 31, 1) 23 +(68, 32, 1) 24 +(68, 33, 1) 25 +(68, 34, 1) 26 +(68, 35, 1) 26 +(68, 36, 1) 27 +(68, 37, 1) 27 +(68, 38, 1) 28 +(68, 39, 1) 29 +(68, 40, 1) 29 +(68, 41, 1) 30 +(68, 42, 1) 30 +(68, 43, 1) 30 +(68, 44, 1) 31 +(68, 45, 1) 31 +(68, 46, 1) 31 +(68, 47, 1) 32 +(68, 48, 1) 32 +(68, 49, 1) 32 +(68, 50, 1) 32 +(68, 51, 1) 32 +(68, 52, 1) 32 +(68, 53, 1) 32 +(68, 54, 1) 32 +(68, 55, 1) 31 +(68, 56, 1) 31 +(68, 57, 1) 31 +(68, 58, 1) 30 +(68, 59, 1) 30 +(68, 60, 1) 30 +(68, 61, 1) 29 +(68, 62, 1) 29 +(68, 63, 1) 28 +(68, 64, 1) 27 +(68, 65, 1) 27 +(68, 66, 1) 26 +(68, 67, 1) 26 +(68, 68, 1) 25 +(68, 69, 1) 24 +(68, 70, 1) 23 +(68, 71, 1) 23 +(68, 72, 1) 22 +(68, 73, 1) 21 +(68, 74, 1) 20 +(68, 75, 1) 20 +(68, 76, 1) 19 +(68, 77, 1) 18 +(68, 78, 1) 17 +(68, 79, 1) 16 +(68, 80, 1) 15 +(68, 81, 1) 15 +(68, 82, 1) 14 +(68, 83, 1) 13 +(68, 84, 1) 12 +(68, 85, 1) 11 +(68, 86, 1) 10 +(68, 87, 1) 9 +(68, 88, 1) 8 +(68, 89, 1) 7 +(68, 90, 1) 7 +(68, 91, 1) 6 +(68, 92, 1) 5 +(68, 93, 1) 4 +(68, 94, 1) 3 +(68, 95, 1) 2 +(69, 6, 1) 2 +(69, 7, 1) 2 +(69, 8, 1) 3 +(69, 9, 1) 4 +(69, 10, 1) 5 +(69, 11, 1) 6 +(69, 12, 1) 7 +(69, 13, 1) 8 +(69, 14, 1) 9 +(69, 15, 1) 10 +(69, 16, 1) 11 +(69, 17, 1) 11 +(69, 18, 1) 12 +(69, 19, 1) 13 +(69, 20, 1) 14 +(69, 21, 1) 15 +(69, 22, 1) 16 +(69, 23, 1) 17 +(69, 24, 1) 17 +(69, 25, 1) 18 +(69, 26, 1) 19 +(69, 27, 1) 20 +(69, 28, 1) 20 +(69, 29, 1) 21 +(69, 30, 1) 22 +(69, 31, 1) 23 +(69, 32, 1) 23 +(69, 33, 1) 24 +(69, 34, 1) 25 +(69, 35, 1) 25 +(69, 36, 1) 26 +(69, 37, 1) 27 +(69, 38, 1) 27 +(69, 39, 1) 28 +(69, 40, 1) 28 +(69, 41, 1) 29 +(69, 42, 1) 29 +(69, 43, 1) 30 +(69, 44, 1) 30 +(69, 45, 1) 30 +(69, 46, 1) 30 +(69, 47, 1) 31 +(69, 48, 1) 31 +(69, 49, 1) 31 +(69, 50, 1) 31 +(69, 51, 1) 31 +(69, 52, 1) 31 +(69, 53, 1) 31 +(69, 54, 1) 31 +(69, 55, 1) 30 +(69, 56, 1) 30 +(69, 57, 1) 30 +(69, 58, 1) 30 +(69, 59, 1) 29 +(69, 60, 1) 29 +(69, 61, 1) 28 +(69, 62, 1) 28 +(69, 63, 1) 27 +(69, 64, 1) 27 +(69, 65, 1) 26 +(69, 66, 1) 25 +(69, 67, 1) 25 +(69, 68, 1) 24 +(69, 69, 1) 23 +(69, 70, 1) 23 +(69, 71, 1) 22 +(69, 72, 1) 21 +(69, 73, 1) 20 +(69, 74, 1) 20 +(69, 75, 1) 19 +(69, 76, 1) 18 +(69, 77, 1) 17 +(69, 78, 1) 17 +(69, 79, 1) 16 +(69, 80, 1) 15 +(69, 81, 1) 14 +(69, 82, 1) 13 +(69, 83, 1) 12 +(69, 84, 1) 11 +(69, 85, 1) 11 +(69, 86, 1) 10 +(69, 87, 1) 9 +(69, 88, 1) 8 +(69, 89, 1) 7 +(69, 90, 1) 6 +(69, 91, 1) 5 +(69, 92, 1) 4 +(69, 93, 1) 3 +(69, 94, 1) 2 +(69, 95, 1) 2 +(70, 6, 1) 1 +(70, 7, 1) 2 +(70, 8, 1) 3 +(70, 9, 1) 4 +(70, 10, 1) 5 +(70, 11, 1) 6 +(70, 12, 1) 7 +(70, 13, 1) 7 +(70, 14, 1) 8 +(70, 15, 1) 9 +(70, 16, 1) 10 +(70, 17, 1) 11 +(70, 18, 1) 12 +(70, 19, 1) 13 +(70, 20, 1) 13 +(70, 21, 1) 14 +(70, 22, 1) 15 +(70, 23, 1) 16 +(70, 24, 1) 17 +(70, 25, 1) 18 +(70, 26, 1) 18 +(70, 27, 1) 19 +(70, 28, 1) 20 +(70, 29, 1) 21 +(70, 30, 1) 21 +(70, 31, 1) 22 +(70, 32, 1) 23 +(70, 33, 1) 23 +(70, 34, 1) 24 +(70, 35, 1) 25 +(70, 36, 1) 25 +(70, 37, 1) 26 +(70, 38, 1) 26 +(70, 39, 1) 27 +(70, 40, 1) 27 +(70, 41, 1) 28 +(70, 42, 1) 28 +(70, 43, 1) 29 +(70, 44, 1) 29 +(70, 45, 1) 29 +(70, 46, 1) 30 +(70, 47, 1) 30 +(70, 48, 1) 30 +(70, 49, 1) 30 +(70, 50, 1) 30 +(70, 51, 1) 30 +(70, 52, 1) 30 +(70, 53, 1) 30 +(70, 54, 1) 30 +(70, 55, 1) 30 +(70, 56, 1) 29 +(70, 57, 1) 29 +(70, 58, 1) 29 +(70, 59, 1) 28 +(70, 60, 1) 28 +(70, 61, 1) 27 +(70, 62, 1) 27 +(70, 63, 1) 26 +(70, 64, 1) 26 +(70, 65, 1) 25 +(70, 66, 1) 25 +(70, 67, 1) 24 +(70, 68, 1) 23 +(70, 69, 1) 23 +(70, 70, 1) 22 +(70, 71, 1) 21 +(70, 72, 1) 21 +(70, 73, 1) 20 +(70, 74, 1) 19 +(70, 75, 1) 18 +(70, 76, 1) 18 +(70, 77, 1) 17 +(70, 78, 1) 16 +(70, 79, 1) 15 +(70, 80, 1) 14 +(70, 81, 1) 13 +(70, 82, 1) 13 +(70, 83, 1) 12 +(70, 84, 1) 11 +(70, 85, 1) 10 +(70, 86, 1) 9 +(70, 87, 1) 8 +(70, 88, 1) 7 +(70, 89, 1) 7 +(70, 90, 1) 6 +(70, 91, 1) 5 +(70, 92, 1) 4 +(70, 93, 1) 3 +(70, 94, 1) 2 +(70, 95, 1) 1 +(71, 6, 1) 1 +(71, 7, 1) 2 +(71, 8, 1) 3 +(71, 9, 1) 4 +(71, 10, 1) 5 +(71, 11, 1) 5 +(71, 12, 1) 6 +(71, 13, 1) 7 +(71, 14, 1) 8 +(71, 15, 1) 9 +(71, 16, 1) 10 +(71, 17, 1) 11 +(71, 18, 1) 11 +(71, 19, 1) 12 +(71, 20, 1) 13 +(71, 21, 1) 14 +(71, 22, 1) 15 +(71, 23, 1) 15 +(71, 24, 1) 16 +(71, 25, 1) 17 +(71, 26, 1) 18 +(71, 27, 1) 19 +(71, 28, 1) 19 +(71, 29, 1) 20 +(71, 30, 1) 21 +(71, 31, 1) 21 +(71, 32, 1) 22 +(71, 33, 1) 23 +(71, 34, 1) 23 +(71, 35, 1) 24 +(71, 36, 1) 24 +(71, 37, 1) 25 +(71, 38, 1) 26 +(71, 39, 1) 26 +(71, 40, 1) 27 +(71, 41, 1) 27 +(71, 42, 1) 27 +(71, 43, 1) 28 +(71, 44, 1) 28 +(71, 45, 1) 28 +(71, 46, 1) 29 +(71, 47, 1) 29 +(71, 48, 1) 29 +(71, 49, 1) 29 +(71, 50, 1) 29 +(71, 51, 1) 29 +(71, 52, 1) 29 +(71, 53, 1) 29 +(71, 54, 1) 29 +(71, 55, 1) 29 +(71, 56, 1) 28 +(71, 57, 1) 28 +(71, 58, 1) 28 +(71, 59, 1) 27 +(71, 60, 1) 27 +(71, 61, 1) 27 +(71, 62, 1) 26 +(71, 63, 1) 26 +(71, 64, 1) 25 +(71, 65, 1) 24 +(71, 66, 1) 24 +(71, 67, 1) 23 +(71, 68, 1) 23 +(71, 69, 1) 22 +(71, 70, 1) 21 +(71, 71, 1) 21 +(71, 72, 1) 20 +(71, 73, 1) 19 +(71, 74, 1) 19 +(71, 75, 1) 18 +(71, 76, 1) 17 +(71, 77, 1) 16 +(71, 78, 1) 15 +(71, 79, 1) 15 +(71, 80, 1) 14 +(71, 81, 1) 13 +(71, 82, 1) 12 +(71, 83, 1) 11 +(71, 84, 1) 11 +(71, 85, 1) 10 +(71, 86, 1) 9 +(71, 87, 1) 8 +(71, 88, 1) 7 +(71, 89, 1) 6 +(71, 90, 1) 5 +(71, 91, 1) 5 +(71, 92, 1) 4 +(71, 93, 1) 3 +(71, 94, 1) 2 +(71, 95, 1) 1 +(72, 6, 1) 1 +(72, 7, 1) 1 +(72, 8, 1) 2 +(72, 9, 1) 3 +(72, 10, 1) 4 +(72, 11, 1) 5 +(72, 12, 1) 6 +(72, 13, 1) 7 +(72, 14, 1) 7 +(72, 15, 1) 8 +(72, 16, 1) 9 +(72, 17, 1) 10 +(72, 18, 1) 11 +(72, 19, 1) 12 +(72, 20, 1) 12 +(72, 21, 1) 13 +(72, 22, 1) 14 +(72, 23, 1) 15 +(72, 24, 1) 16 +(72, 25, 1) 16 +(72, 26, 1) 17 +(72, 27, 1) 18 +(72, 28, 1) 19 +(72, 29, 1) 19 +(72, 30, 1) 20 +(72, 31, 1) 21 +(72, 32, 1) 21 +(72, 33, 1) 22 +(72, 34, 1) 23 +(72, 35, 1) 23 +(72, 36, 1) 24 +(72, 37, 1) 24 +(72, 38, 1) 25 +(72, 39, 1) 25 +(72, 40, 1) 26 +(72, 41, 1) 26 +(72, 42, 1) 26 +(72, 43, 1) 27 +(72, 44, 1) 27 +(72, 45, 1) 27 +(72, 46, 1) 28 +(72, 47, 1) 28 +(72, 48, 1) 28 +(72, 49, 1) 28 +(72, 50, 1) 28 +(72, 51, 1) 28 +(72, 52, 1) 28 +(72, 53, 1) 28 +(72, 54, 1) 28 +(72, 55, 1) 28 +(72, 56, 1) 27 +(72, 57, 1) 27 +(72, 58, 1) 27 +(72, 59, 1) 26 +(72, 60, 1) 26 +(72, 61, 1) 26 +(72, 62, 1) 25 +(72, 63, 1) 25 +(72, 64, 1) 24 +(72, 65, 1) 24 +(72, 66, 1) 23 +(72, 67, 1) 23 +(72, 68, 1) 22 +(72, 69, 1) 21 +(72, 70, 1) 21 +(72, 71, 1) 20 +(72, 72, 1) 19 +(72, 73, 1) 19 +(72, 74, 1) 18 +(72, 75, 1) 17 +(72, 76, 1) 16 +(72, 77, 1) 16 +(72, 78, 1) 15 +(72, 79, 1) 14 +(72, 80, 1) 13 +(72, 81, 1) 12 +(72, 82, 1) 12 +(72, 83, 1) 11 +(72, 84, 1) 10 +(72, 85, 1) 9 +(72, 86, 1) 8 +(72, 87, 1) 7 +(72, 88, 1) 7 +(72, 89, 1) 6 +(72, 90, 1) 5 +(72, 91, 1) 4 +(72, 92, 1) 3 +(72, 93, 1) 2 +(72, 94, 1) 1 +(72, 95, 1) 1 +(73, 6, 1) 0 +(73, 7, 1) 1 +(73, 8, 1) 2 +(73, 9, 1) 3 +(73, 10, 1) 4 +(73, 11, 1) 4 +(73, 12, 1) 5 +(73, 13, 1) 6 +(73, 14, 1) 7 +(73, 15, 1) 8 +(73, 16, 1) 9 +(73, 17, 1) 9 +(73, 18, 1) 10 +(73, 19, 1) 11 +(73, 20, 1) 12 +(73, 21, 1) 13 +(73, 22, 1) 13 +(73, 23, 1) 14 +(73, 24, 1) 15 +(73, 25, 1) 16 +(73, 26, 1) 16 +(73, 27, 1) 17 +(73, 28, 1) 18 +(73, 29, 1) 19 +(73, 30, 1) 19 +(73, 31, 1) 20 +(73, 32, 1) 20 +(73, 33, 1) 21 +(73, 34, 1) 22 +(73, 35, 1) 22 +(73, 36, 1) 23 +(73, 37, 1) 23 +(73, 38, 1) 24 +(73, 39, 1) 24 +(73, 40, 1) 25 +(73, 41, 1) 25 +(73, 42, 1) 25 +(73, 43, 1) 26 +(73, 44, 1) 26 +(73, 45, 1) 26 +(73, 46, 1) 27 +(73, 47, 1) 27 +(73, 48, 1) 27 +(73, 49, 1) 27 +(73, 50, 1) 27 +(73, 51, 1) 27 +(73, 52, 1) 27 +(73, 53, 1) 27 +(73, 54, 1) 27 +(73, 55, 1) 27 +(73, 56, 1) 26 +(73, 57, 1) 26 +(73, 58, 1) 26 +(73, 59, 1) 25 +(73, 60, 1) 25 +(73, 61, 1) 25 +(73, 62, 1) 24 +(73, 63, 1) 24 +(73, 64, 1) 23 +(73, 65, 1) 23 +(73, 66, 1) 22 +(73, 67, 1) 22 +(73, 68, 1) 21 +(73, 69, 1) 20 +(73, 70, 1) 20 +(73, 71, 1) 19 +(73, 72, 1) 19 +(73, 73, 1) 18 +(73, 74, 1) 17 +(73, 75, 1) 16 +(73, 76, 1) 16 +(73, 77, 1) 15 +(73, 78, 1) 14 +(73, 79, 1) 13 +(73, 80, 1) 13 +(73, 81, 1) 12 +(73, 82, 1) 11 +(73, 83, 1) 10 +(73, 84, 1) 9 +(73, 85, 1) 9 +(73, 86, 1) 8 +(73, 87, 1) 7 +(73, 88, 1) 6 +(73, 89, 1) 5 +(73, 90, 1) 4 +(73, 91, 1) 4 +(73, 92, 1) 3 +(73, 93, 1) 2 +(73, 94, 1) 1 +(73, 95, 1) 0 +(74, 6, 1) 0 +(74, 7, 1) 0 +(74, 8, 1) 1 +(74, 9, 1) 2 +(74, 10, 1) 3 +(74, 11, 1) 4 +(74, 12, 1) 5 +(74, 13, 1) 6 +(74, 14, 1) 6 +(74, 15, 1) 7 +(74, 16, 1) 8 +(74, 17, 1) 9 +(74, 18, 1) 10 +(74, 19, 1) 10 +(74, 20, 1) 11 +(74, 21, 1) 12 +(74, 22, 1) 13 +(74, 23, 1) 14 +(74, 24, 1) 14 +(74, 25, 1) 15 +(74, 26, 1) 16 +(74, 27, 1) 16 +(74, 28, 1) 17 +(74, 29, 1) 18 +(74, 30, 1) 18 +(74, 31, 1) 19 +(74, 32, 1) 20 +(74, 33, 1) 20 +(74, 34, 1) 21 +(74, 35, 1) 21 +(74, 36, 1) 22 +(74, 37, 1) 22 +(74, 38, 1) 23 +(74, 39, 1) 23 +(74, 40, 1) 24 +(74, 41, 1) 24 +(74, 42, 1) 25 +(74, 43, 1) 25 +(74, 44, 1) 25 +(74, 45, 1) 25 +(74, 46, 1) 26 +(74, 47, 1) 26 +(74, 48, 1) 26 +(74, 49, 1) 26 +(74, 50, 1) 26 +(74, 51, 1) 26 +(74, 52, 1) 26 +(74, 53, 1) 26 +(74, 54, 1) 26 +(74, 55, 1) 26 +(74, 56, 1) 25 +(74, 57, 1) 25 +(74, 58, 1) 25 +(74, 59, 1) 25 +(74, 60, 1) 24 +(74, 61, 1) 24 +(74, 62, 1) 23 +(74, 63, 1) 23 +(74, 64, 1) 22 +(74, 65, 1) 22 +(74, 66, 1) 21 +(74, 67, 1) 21 +(74, 68, 1) 20 +(74, 69, 1) 20 +(74, 70, 1) 19 +(74, 71, 1) 18 +(74, 72, 1) 18 +(74, 73, 1) 17 +(74, 74, 1) 16 +(74, 75, 1) 16 +(74, 76, 1) 15 +(74, 77, 1) 14 +(74, 78, 1) 14 +(74, 79, 1) 13 +(74, 80, 1) 12 +(74, 81, 1) 11 +(74, 82, 1) 10 +(74, 83, 1) 10 +(74, 84, 1) 9 +(74, 85, 1) 8 +(74, 86, 1) 7 +(74, 87, 1) 6 +(74, 88, 1) 6 +(74, 89, 1) 5 +(74, 90, 1) 4 +(74, 91, 1) 3 +(74, 92, 1) 2 +(74, 93, 1) 1 +(74, 94, 1) 0 +(74, 95, 1) 0 +(75, 6, 1) 0 +(75, 7, 1) 0 +(75, 8, 1) 1 +(75, 9, 1) 2 +(75, 10, 1) 3 +(75, 11, 1) 3 +(75, 12, 1) 4 +(75, 13, 1) 5 +(75, 14, 1) 6 +(75, 15, 1) 7 +(75, 16, 1) 7 +(75, 17, 1) 8 +(75, 18, 1) 9 +(75, 19, 1) 10 +(75, 20, 1) 11 +(75, 21, 1) 11 +(75, 22, 1) 12 +(75, 23, 1) 13 +(75, 24, 1) 14 +(75, 25, 1) 14 +(75, 26, 1) 15 +(75, 27, 1) 16 +(75, 28, 1) 16 +(75, 29, 1) 17 +(75, 30, 1) 18 +(75, 31, 1) 18 +(75, 32, 1) 19 +(75, 33, 1) 19 +(75, 34, 1) 20 +(75, 35, 1) 21 +(75, 36, 1) 21 +(75, 37, 1) 22 +(75, 38, 1) 22 +(75, 39, 1) 22 +(75, 40, 1) 23 +(75, 41, 1) 23 +(75, 42, 1) 24 +(75, 43, 1) 24 +(75, 44, 1) 24 +(75, 45, 1) 24 +(75, 46, 1) 25 +(75, 47, 1) 25 +(75, 48, 1) 25 +(75, 49, 1) 25 +(75, 50, 1) 25 +(75, 51, 1) 25 +(75, 52, 1) 25 +(75, 53, 1) 25 +(75, 54, 1) 25 +(75, 55, 1) 25 +(75, 56, 1) 24 +(75, 57, 1) 24 +(75, 58, 1) 24 +(75, 59, 1) 24 +(75, 60, 1) 23 +(75, 61, 1) 23 +(75, 62, 1) 22 +(75, 63, 1) 22 +(75, 64, 1) 22 +(75, 65, 1) 21 +(75, 66, 1) 21 +(75, 67, 1) 20 +(75, 68, 1) 19 +(75, 69, 1) 19 +(75, 70, 1) 18 +(75, 71, 1) 18 +(75, 72, 1) 17 +(75, 73, 1) 16 +(75, 74, 1) 16 +(75, 75, 1) 15 +(75, 76, 1) 14 +(75, 77, 1) 14 +(75, 78, 1) 13 +(75, 79, 1) 12 +(75, 80, 1) 11 +(75, 81, 1) 11 +(75, 82, 1) 10 +(75, 83, 1) 9 +(75, 84, 1) 8 +(75, 85, 1) 7 +(75, 86, 1) 7 +(75, 87, 1) 6 +(75, 88, 1) 5 +(75, 89, 1) 4 +(75, 90, 1) 3 +(75, 91, 1) 3 +(75, 92, 1) 2 +(75, 93, 1) 1 +(75, 94, 1) 0 +(75, 95, 1) 0 +(76, 9, 1) 1 +(76, 10, 1) 2 +(76, 11, 1) 3 +(76, 12, 1) 4 +(76, 13, 1) 5 +(76, 14, 1) 5 +(76, 15, 1) 6 +(76, 16, 1) 7 +(76, 17, 1) 8 +(76, 18, 1) 9 +(76, 19, 1) 9 +(76, 20, 1) 10 +(76, 21, 1) 11 +(76, 22, 1) 12 +(76, 23, 1) 12 +(76, 24, 1) 13 +(76, 25, 1) 14 +(76, 26, 1) 14 +(76, 27, 1) 15 +(76, 28, 1) 16 +(76, 29, 1) 16 +(76, 30, 1) 17 +(76, 31, 1) 18 +(76, 32, 1) 18 +(76, 33, 1) 19 +(76, 34, 1) 19 +(76, 35, 1) 20 +(76, 36, 1) 20 +(76, 37, 1) 21 +(76, 38, 1) 21 +(76, 39, 1) 22 +(76, 40, 1) 22 +(76, 41, 1) 22 +(76, 42, 1) 23 +(76, 43, 1) 23 +(76, 44, 1) 23 +(76, 45, 1) 23 +(76, 46, 1) 24 +(76, 47, 1) 24 +(76, 48, 1) 24 +(76, 49, 1) 24 +(76, 50, 1) 24 +(76, 51, 1) 24 +(76, 52, 1) 24 +(76, 53, 1) 24 +(76, 54, 1) 24 +(76, 55, 1) 24 +(76, 56, 1) 23 +(76, 57, 1) 23 +(76, 58, 1) 23 +(76, 59, 1) 23 +(76, 60, 1) 22 +(76, 61, 1) 22 +(76, 62, 1) 22 +(76, 63, 1) 21 +(76, 64, 1) 21 +(76, 65, 1) 20 +(76, 66, 1) 20 +(76, 67, 1) 19 +(76, 68, 1) 19 +(76, 69, 1) 18 +(76, 70, 1) 18 +(76, 71, 1) 17 +(76, 72, 1) 16 +(76, 73, 1) 16 +(76, 74, 1) 15 +(76, 75, 1) 14 +(76, 76, 1) 14 +(76, 77, 1) 13 +(76, 78, 1) 12 +(76, 79, 1) 12 +(76, 80, 1) 11 +(76, 81, 1) 10 +(76, 82, 1) 9 +(76, 83, 1) 9 +(76, 84, 1) 8 +(76, 85, 1) 7 +(76, 86, 1) 6 +(76, 87, 1) 5 +(76, 88, 1) 5 +(76, 89, 1) 4 +(76, 90, 1) 3 +(76, 91, 1) 2 +(76, 92, 1) 1 +(77, 9, 1) 1 +(77, 10, 1) 2 +(77, 11, 1) 2 +(77, 12, 1) 3 +(77, 13, 1) 4 +(77, 14, 1) 5 +(77, 15, 1) 6 +(77, 16, 1) 6 +(77, 17, 1) 7 +(77, 18, 1) 8 +(77, 19, 1) 9 +(77, 20, 1) 9 +(77, 21, 1) 10 +(77, 22, 1) 11 +(77, 23, 1) 12 +(77, 24, 1) 12 +(77, 25, 1) 13 +(77, 26, 1) 14 +(77, 27, 1) 14 +(77, 28, 1) 15 +(77, 29, 1) 16 +(77, 30, 1) 16 +(77, 31, 1) 17 +(77, 32, 1) 17 +(77, 33, 1) 18 +(77, 34, 1) 18 +(77, 35, 1) 19 +(77, 36, 1) 19 +(77, 37, 1) 20 +(77, 38, 1) 20 +(77, 39, 1) 21 +(77, 40, 1) 21 +(77, 41, 1) 21 +(77, 42, 1) 22 +(77, 43, 1) 22 +(77, 44, 1) 22 +(77, 45, 1) 22 +(77, 46, 1) 23 +(77, 47, 1) 23 +(77, 48, 1) 23 +(77, 49, 1) 23 +(77, 50, 1) 23 +(77, 51, 1) 23 +(77, 52, 1) 23 +(77, 53, 1) 23 +(77, 54, 1) 23 +(77, 55, 1) 23 +(77, 56, 1) 22 +(77, 57, 1) 22 +(77, 58, 1) 22 +(77, 59, 1) 22 +(77, 60, 1) 21 +(77, 61, 1) 21 +(77, 62, 1) 21 +(77, 63, 1) 20 +(77, 64, 1) 20 +(77, 65, 1) 19 +(77, 66, 1) 19 +(77, 67, 1) 18 +(77, 68, 1) 18 +(77, 69, 1) 17 +(77, 70, 1) 17 +(77, 71, 1) 16 +(77, 72, 1) 16 +(77, 73, 1) 15 +(77, 74, 1) 14 +(77, 75, 1) 14 +(77, 76, 1) 13 +(77, 77, 1) 12 +(77, 78, 1) 12 +(77, 79, 1) 11 +(77, 80, 1) 10 +(77, 81, 1) 9 +(77, 82, 1) 9 +(77, 83, 1) 8 +(77, 84, 1) 7 +(77, 85, 1) 6 +(77, 86, 1) 6 +(77, 87, 1) 5 +(77, 88, 1) 4 +(77, 89, 1) 3 +(77, 90, 1) 2 +(77, 91, 1) 2 +(77, 92, 1) 1 +(78, 9, 1) 0 +(78, 10, 1) 1 +(78, 11, 1) 2 +(78, 12, 1) 3 +(78, 13, 1) 3 +(78, 14, 1) 4 +(78, 15, 1) 5 +(78, 16, 1) 6 +(78, 17, 1) 7 +(78, 18, 1) 7 +(78, 19, 1) 8 +(78, 20, 1) 9 +(78, 21, 1) 9 +(78, 22, 1) 10 +(78, 23, 1) 11 +(78, 24, 1) 12 +(78, 25, 1) 12 +(78, 26, 1) 13 +(78, 27, 1) 14 +(78, 28, 1) 14 +(78, 29, 1) 15 +(78, 30, 1) 15 +(78, 31, 1) 16 +(78, 32, 1) 17 +(78, 33, 1) 17 +(78, 34, 1) 18 +(78, 35, 1) 18 +(78, 36, 1) 19 +(78, 37, 1) 19 +(78, 38, 1) 19 +(78, 39, 1) 20 +(78, 40, 1) 20 +(78, 41, 1) 20 +(78, 42, 1) 21 +(78, 43, 1) 21 +(78, 44, 1) 21 +(78, 45, 1) 21 +(78, 46, 1) 22 +(78, 47, 1) 22 +(78, 48, 1) 22 +(78, 49, 1) 22 +(78, 50, 1) 22 +(78, 51, 1) 22 +(78, 52, 1) 22 +(78, 53, 1) 22 +(78, 54, 1) 22 +(78, 55, 1) 22 +(78, 56, 1) 21 +(78, 57, 1) 21 +(78, 58, 1) 21 +(78, 59, 1) 21 +(78, 60, 1) 20 +(78, 61, 1) 20 +(78, 62, 1) 20 +(78, 63, 1) 19 +(78, 64, 1) 19 +(78, 65, 1) 19 +(78, 66, 1) 18 +(78, 67, 1) 18 +(78, 68, 1) 17 +(78, 69, 1) 17 +(78, 70, 1) 16 +(78, 71, 1) 15 +(78, 72, 1) 15 +(78, 73, 1) 14 +(78, 74, 1) 14 +(78, 75, 1) 13 +(78, 76, 1) 12 +(78, 77, 1) 12 +(78, 78, 1) 11 +(78, 79, 1) 10 +(78, 80, 1) 9 +(78, 81, 1) 9 +(78, 82, 1) 8 +(78, 83, 1) 7 +(78, 84, 1) 7 +(78, 85, 1) 6 +(78, 86, 1) 5 +(78, 87, 1) 4 +(78, 88, 1) 3 +(78, 89, 1) 3 +(78, 90, 1) 2 +(78, 91, 1) 1 +(78, 92, 1) 0 +(79, 9, 1) 0 +(79, 10, 1) 1 +(79, 11, 1) 1 +(79, 12, 1) 2 +(79, 13, 1) 3 +(79, 14, 1) 4 +(79, 15, 1) 4 +(79, 16, 1) 5 +(79, 17, 1) 6 +(79, 18, 1) 7 +(79, 19, 1) 7 +(79, 20, 1) 8 +(79, 21, 1) 9 +(79, 22, 1) 9 +(79, 23, 1) 10 +(79, 24, 1) 11 +(79, 25, 1) 12 +(79, 26, 1) 12 +(79, 27, 1) 13 +(79, 28, 1) 13 +(79, 29, 1) 14 +(79, 30, 1) 15 +(79, 31, 1) 15 +(79, 32, 1) 16 +(79, 33, 1) 16 +(79, 34, 1) 17 +(79, 35, 1) 17 +(79, 36, 1) 18 +(79, 37, 1) 18 +(79, 38, 1) 18 +(79, 39, 1) 19 +(79, 40, 1) 19 +(79, 41, 1) 20 +(79, 42, 1) 20 +(79, 43, 1) 20 +(79, 44, 1) 20 +(79, 45, 1) 20 +(79, 46, 1) 21 +(79, 47, 1) 21 +(79, 48, 1) 21 +(79, 49, 1) 21 +(79, 50, 1) 21 +(79, 51, 1) 21 +(79, 52, 1) 21 +(79, 53, 1) 21 +(79, 54, 1) 21 +(79, 55, 1) 21 +(79, 56, 1) 20 +(79, 57, 1) 20 +(79, 58, 1) 20 +(79, 59, 1) 20 +(79, 60, 1) 20 +(79, 61, 1) 19 +(79, 62, 1) 19 +(79, 63, 1) 18 +(79, 64, 1) 18 +(79, 65, 1) 18 +(79, 66, 1) 17 +(79, 67, 1) 17 +(79, 68, 1) 16 +(79, 69, 1) 16 +(79, 70, 1) 15 +(79, 71, 1) 15 +(79, 72, 1) 14 +(79, 73, 1) 13 +(79, 74, 1) 13 +(79, 75, 1) 12 +(79, 76, 1) 12 +(79, 77, 1) 11 +(79, 78, 1) 10 +(79, 79, 1) 9 +(79, 80, 1) 9 +(79, 81, 1) 8 +(79, 82, 1) 7 +(79, 83, 1) 7 +(79, 84, 1) 6 +(79, 85, 1) 5 +(79, 86, 1) 4 +(79, 87, 1) 4 +(79, 88, 1) 3 +(79, 89, 1) 2 +(79, 90, 1) 1 +(79, 91, 1) 1 +(79, 92, 1) 0 +(80, 9, 1) 0 +(80, 10, 1) 0 +(80, 11, 1) 1 +(80, 12, 1) 1 +(80, 13, 1) 2 +(80, 14, 1) 3 +(80, 15, 1) 4 +(80, 16, 1) 4 +(80, 17, 1) 5 +(80, 18, 1) 6 +(80, 19, 1) 7 +(80, 20, 1) 7 +(80, 21, 1) 8 +(80, 22, 1) 9 +(80, 23, 1) 9 +(80, 24, 1) 10 +(80, 25, 1) 11 +(80, 26, 1) 11 +(80, 27, 1) 12 +(80, 28, 1) 13 +(80, 29, 1) 13 +(80, 30, 1) 14 +(80, 31, 1) 14 +(80, 32, 1) 15 +(80, 33, 1) 15 +(80, 34, 1) 16 +(80, 35, 1) 16 +(80, 36, 1) 17 +(80, 37, 1) 17 +(80, 38, 1) 18 +(80, 39, 1) 18 +(80, 40, 1) 18 +(80, 41, 1) 19 +(80, 42, 1) 19 +(80, 43, 1) 19 +(80, 44, 1) 19 +(80, 45, 1) 20 +(80, 46, 1) 20 +(80, 47, 1) 20 +(80, 48, 1) 20 +(80, 49, 1) 20 +(80, 50, 1) 20 +(80, 51, 1) 20 +(80, 52, 1) 20 +(80, 53, 1) 20 +(80, 54, 1) 20 +(80, 55, 1) 20 +(80, 56, 1) 20 +(80, 57, 1) 19 +(80, 58, 1) 19 +(80, 59, 1) 19 +(80, 60, 1) 19 +(80, 61, 1) 18 +(80, 62, 1) 18 +(80, 63, 1) 18 +(80, 64, 1) 17 +(80, 65, 1) 17 +(80, 66, 1) 16 +(80, 67, 1) 16 +(80, 68, 1) 15 +(80, 69, 1) 15 +(80, 70, 1) 14 +(80, 71, 1) 14 +(80, 72, 1) 13 +(80, 73, 1) 13 +(80, 74, 1) 12 +(80, 75, 1) 11 +(80, 76, 1) 11 +(80, 77, 1) 10 +(80, 78, 1) 9 +(80, 79, 1) 9 +(80, 80, 1) 8 +(80, 81, 1) 7 +(80, 82, 1) 7 +(80, 83, 1) 6 +(80, 84, 1) 5 +(80, 85, 1) 4 +(80, 86, 1) 4 +(80, 87, 1) 3 +(80, 88, 1) 2 +(80, 89, 1) 1 +(80, 90, 1) 1 +(80, 91, 1) 0 +(80, 92, 1) 0 +(81, 14, 1) 3 +(81, 15, 1) 3 +(81, 16, 1) 4 +(81, 17, 1) 5 +(81, 18, 1) 5 +(81, 19, 1) 6 +(81, 20, 1) 7 +(81, 21, 1) 7 +(81, 22, 1) 8 +(81, 23, 1) 9 +(81, 24, 1) 9 +(81, 25, 1) 10 +(81, 26, 1) 11 +(81, 27, 1) 11 +(81, 28, 1) 12 +(81, 29, 1) 12 +(81, 30, 1) 13 +(81, 31, 1) 14 +(81, 32, 1) 14 +(81, 33, 1) 15 +(81, 34, 1) 15 +(81, 35, 1) 15 +(81, 36, 1) 16 +(81, 37, 1) 16 +(81, 38, 1) 17 +(81, 39, 1) 17 +(81, 40, 1) 17 +(81, 41, 1) 18 +(81, 42, 1) 18 +(81, 43, 1) 18 +(81, 44, 1) 18 +(81, 45, 1) 19 +(81, 46, 1) 19 +(81, 47, 1) 19 +(81, 48, 1) 19 +(81, 49, 1) 19 +(81, 50, 1) 19 +(81, 51, 1) 19 +(81, 52, 1) 19 +(81, 53, 1) 19 +(81, 54, 1) 19 +(81, 55, 1) 19 +(81, 56, 1) 19 +(81, 57, 1) 18 +(81, 58, 1) 18 +(81, 59, 1) 18 +(81, 60, 1) 18 +(81, 61, 1) 17 +(81, 62, 1) 17 +(81, 63, 1) 17 +(81, 64, 1) 16 +(81, 65, 1) 16 +(81, 66, 1) 15 +(81, 67, 1) 15 +(81, 68, 1) 15 +(81, 69, 1) 14 +(81, 70, 1) 14 +(81, 71, 1) 13 +(81, 72, 1) 12 +(81, 73, 1) 12 +(81, 74, 1) 11 +(81, 75, 1) 11 +(81, 76, 1) 10 +(81, 77, 1) 9 +(81, 78, 1) 9 +(81, 79, 1) 8 +(81, 80, 1) 7 +(81, 81, 1) 7 +(81, 82, 1) 6 +(81, 83, 1) 5 +(81, 84, 1) 5 +(81, 85, 1) 4 +(81, 86, 1) 3 +(81, 87, 1) 3 +(82, 14, 1) 2 +(82, 15, 1) 3 +(82, 16, 1) 3 +(82, 17, 1) 4 +(82, 18, 1) 5 +(82, 19, 1) 5 +(82, 20, 1) 6 +(82, 21, 1) 7 +(82, 22, 1) 7 +(82, 23, 1) 8 +(82, 24, 1) 9 +(82, 25, 1) 9 +(82, 26, 1) 10 +(82, 27, 1) 10 +(82, 28, 1) 11 +(82, 29, 1) 12 +(82, 30, 1) 12 +(82, 31, 1) 13 +(82, 32, 1) 13 +(82, 33, 1) 14 +(82, 34, 1) 14 +(82, 35, 1) 15 +(82, 36, 1) 15 +(82, 37, 1) 15 +(82, 38, 1) 16 +(82, 39, 1) 16 +(82, 40, 1) 16 +(82, 41, 1) 17 +(82, 42, 1) 17 +(82, 43, 1) 17 +(82, 44, 1) 17 +(82, 45, 1) 18 +(82, 46, 1) 18 +(82, 47, 1) 18 +(82, 48, 1) 18 +(82, 49, 1) 18 +(82, 50, 1) 18 +(82, 51, 1) 18 +(82, 52, 1) 18 +(82, 53, 1) 18 +(82, 54, 1) 18 +(82, 55, 1) 18 +(82, 56, 1) 18 +(82, 57, 1) 17 +(82, 58, 1) 17 +(82, 59, 1) 17 +(82, 60, 1) 17 +(82, 61, 1) 16 +(82, 62, 1) 16 +(82, 63, 1) 16 +(82, 64, 1) 15 +(82, 65, 1) 15 +(82, 66, 1) 15 +(82, 67, 1) 14 +(82, 68, 1) 14 +(82, 69, 1) 13 +(82, 70, 1) 13 +(82, 71, 1) 12 +(82, 72, 1) 12 +(82, 73, 1) 11 +(82, 74, 1) 10 +(82, 75, 1) 10 +(82, 76, 1) 9 +(82, 77, 1) 9 +(82, 78, 1) 8 +(82, 79, 1) 7 +(82, 80, 1) 7 +(82, 81, 1) 6 +(82, 82, 1) 5 +(82, 83, 1) 5 +(82, 84, 1) 4 +(82, 85, 1) 3 +(82, 86, 1) 3 +(82, 87, 1) 2 +(83, 14, 1) 1 +(83, 15, 1) 2 +(83, 16, 1) 3 +(83, 17, 1) 3 +(83, 18, 1) 4 +(83, 19, 1) 5 +(83, 20, 1) 5 +(83, 21, 1) 6 +(83, 22, 1) 7 +(83, 23, 1) 7 +(83, 24, 1) 8 +(83, 25, 1) 8 +(83, 26, 1) 9 +(83, 27, 1) 10 +(83, 28, 1) 10 +(83, 29, 1) 11 +(83, 30, 1) 11 +(83, 31, 1) 12 +(83, 32, 1) 12 +(83, 33, 1) 13 +(83, 34, 1) 13 +(83, 35, 1) 14 +(83, 36, 1) 14 +(83, 37, 1) 14 +(83, 38, 1) 15 +(83, 39, 1) 15 +(83, 40, 1) 15 +(83, 41, 1) 16 +(83, 42, 1) 16 +(83, 43, 1) 16 +(83, 44, 1) 16 +(83, 45, 1) 17 +(83, 46, 1) 17 +(83, 47, 1) 17 +(83, 48, 1) 17 +(83, 49, 1) 17 +(83, 50, 1) 17 +(83, 51, 1) 17 +(83, 52, 1) 17 +(83, 53, 1) 17 +(83, 54, 1) 17 +(83, 55, 1) 17 +(83, 56, 1) 17 +(83, 57, 1) 16 +(83, 58, 1) 16 +(83, 59, 1) 16 +(83, 60, 1) 16 +(83, 61, 1) 15 +(83, 62, 1) 15 +(83, 63, 1) 15 +(83, 64, 1) 14 +(83, 65, 1) 14 +(83, 66, 1) 14 +(83, 67, 1) 13 +(83, 68, 1) 13 +(83, 69, 1) 12 +(83, 70, 1) 12 +(83, 71, 1) 11 +(83, 72, 1) 11 +(83, 73, 1) 10 +(83, 74, 1) 10 +(83, 75, 1) 9 +(83, 76, 1) 8 +(83, 77, 1) 8 +(83, 78, 1) 7 +(83, 79, 1) 7 +(83, 80, 1) 6 +(83, 81, 1) 5 +(83, 82, 1) 5 +(83, 83, 1) 4 +(83, 84, 1) 3 +(83, 85, 1) 3 +(83, 86, 1) 2 +(83, 87, 1) 1 +(84, 14, 1) 1 +(84, 15, 1) 1 +(84, 16, 1) 2 +(84, 17, 1) 3 +(84, 18, 1) 3 +(84, 19, 1) 4 +(84, 20, 1) 5 +(84, 21, 1) 5 +(84, 22, 1) 6 +(84, 23, 1) 6 +(84, 24, 1) 7 +(84, 25, 1) 8 +(84, 26, 1) 8 +(84, 27, 1) 9 +(84, 28, 1) 9 +(84, 29, 1) 10 +(84, 30, 1) 10 +(84, 31, 1) 11 +(84, 32, 1) 11 +(84, 33, 1) 12 +(84, 34, 1) 12 +(84, 35, 1) 13 +(84, 36, 1) 13 +(84, 37, 1) 13 +(84, 38, 1) 14 +(84, 39, 1) 14 +(84, 40, 1) 14 +(84, 41, 1) 15 +(84, 42, 1) 15 +(84, 43, 1) 15 +(84, 44, 1) 15 +(84, 45, 1) 16 +(84, 46, 1) 16 +(84, 47, 1) 16 +(84, 48, 1) 16 +(84, 49, 1) 16 +(84, 50, 1) 16 +(84, 51, 1) 16 +(84, 52, 1) 16 +(84, 53, 1) 16 +(84, 54, 1) 16 +(84, 55, 1) 16 +(84, 56, 1) 16 +(84, 57, 1) 15 +(84, 58, 1) 15 +(84, 59, 1) 15 +(84, 60, 1) 15 +(84, 61, 1) 14 +(84, 62, 1) 14 +(84, 63, 1) 14 +(84, 64, 1) 13 +(84, 65, 1) 13 +(84, 66, 1) 13 +(84, 67, 1) 12 +(84, 68, 1) 12 +(84, 69, 1) 11 +(84, 70, 1) 11 +(84, 71, 1) 10 +(84, 72, 1) 10 +(84, 73, 1) 9 +(84, 74, 1) 9 +(84, 75, 1) 8 +(84, 76, 1) 8 +(84, 77, 1) 7 +(84, 78, 1) 6 +(84, 79, 1) 6 +(84, 80, 1) 5 +(84, 81, 1) 5 +(84, 82, 1) 4 +(84, 83, 1) 3 +(84, 84, 1) 3 +(84, 85, 1) 2 +(84, 86, 1) 1 +(84, 87, 1) 1 +(85, 14, 1) 0 +(85, 15, 1) 1 +(85, 16, 1) 1 +(85, 17, 1) 2 +(85, 18, 1) 2 +(85, 19, 1) 3 +(85, 20, 1) 4 +(85, 21, 1) 4 +(85, 22, 1) 5 +(85, 23, 1) 6 +(85, 24, 1) 6 +(85, 25, 1) 7 +(85, 26, 1) 7 +(85, 27, 1) 8 +(85, 28, 1) 9 +(85, 29, 1) 9 +(85, 30, 1) 10 +(85, 31, 1) 10 +(85, 32, 1) 11 +(85, 33, 1) 11 +(85, 34, 1) 11 +(85, 35, 1) 12 +(85, 36, 1) 12 +(85, 37, 1) 13 +(85, 38, 1) 13 +(85, 39, 1) 13 +(85, 40, 1) 13 +(85, 41, 1) 14 +(85, 42, 1) 14 +(85, 43, 1) 14 +(85, 44, 1) 14 +(85, 45, 1) 15 +(85, 46, 1) 15 +(85, 47, 1) 15 +(85, 48, 1) 15 +(85, 49, 1) 15 +(85, 50, 1) 15 +(85, 51, 1) 15 +(85, 52, 1) 15 +(85, 53, 1) 15 +(85, 54, 1) 15 +(85, 55, 1) 15 +(85, 56, 1) 15 +(85, 57, 1) 14 +(85, 58, 1) 14 +(85, 59, 1) 14 +(85, 60, 1) 14 +(85, 61, 1) 13 +(85, 62, 1) 13 +(85, 63, 1) 13 +(85, 64, 1) 13 +(85, 65, 1) 12 +(85, 66, 1) 12 +(85, 67, 1) 11 +(85, 68, 1) 11 +(85, 69, 1) 11 +(85, 70, 1) 10 +(85, 71, 1) 10 +(85, 72, 1) 9 +(85, 73, 1) 9 +(85, 74, 1) 8 +(85, 75, 1) 7 +(85, 76, 1) 7 +(85, 77, 1) 6 +(85, 78, 1) 6 +(85, 79, 1) 5 +(85, 80, 1) 4 +(85, 81, 1) 4 +(85, 82, 1) 3 +(85, 83, 1) 2 +(85, 84, 1) 2 +(85, 85, 1) 1 +(85, 86, 1) 1 +(85, 87, 1) 0 +(86, 16, 1) 1 +(86, 17, 1) 1 +(86, 18, 1) 2 +(86, 19, 1) 3 +(86, 20, 1) 3 +(86, 21, 1) 4 +(86, 22, 1) 4 +(86, 23, 1) 5 +(86, 24, 1) 6 +(86, 25, 1) 6 +(86, 26, 1) 7 +(86, 27, 1) 7 +(86, 28, 1) 8 +(86, 29, 1) 8 +(86, 30, 1) 9 +(86, 31, 1) 9 +(86, 32, 1) 10 +(86, 33, 1) 10 +(86, 34, 1) 11 +(86, 35, 1) 11 +(86, 36, 1) 11 +(86, 37, 1) 12 +(86, 38, 1) 12 +(86, 39, 1) 12 +(86, 40, 1) 13 +(86, 41, 1) 13 +(86, 42, 1) 13 +(86, 43, 1) 13 +(86, 44, 1) 13 +(86, 45, 1) 14 +(86, 46, 1) 14 +(86, 47, 1) 14 +(86, 48, 1) 14 +(86, 49, 1) 14 +(86, 50, 1) 14 +(86, 51, 1) 14 +(86, 52, 1) 14 +(86, 53, 1) 14 +(86, 54, 1) 14 +(86, 55, 1) 14 +(86, 56, 1) 14 +(86, 57, 1) 13 +(86, 58, 1) 13 +(86, 59, 1) 13 +(86, 60, 1) 13 +(86, 61, 1) 13 +(86, 62, 1) 12 +(86, 63, 1) 12 +(86, 64, 1) 12 +(86, 65, 1) 11 +(86, 66, 1) 11 +(86, 67, 1) 11 +(86, 68, 1) 10 +(86, 69, 1) 10 +(86, 70, 1) 9 +(86, 71, 1) 9 +(86, 72, 1) 8 +(86, 73, 1) 8 +(86, 74, 1) 7 +(86, 75, 1) 7 +(86, 76, 1) 6 +(86, 77, 1) 6 +(86, 78, 1) 5 +(86, 79, 1) 4 +(86, 80, 1) 4 +(86, 81, 1) 3 +(86, 82, 1) 3 +(86, 83, 1) 2 +(86, 84, 1) 1 +(86, 85, 1) 1 +(87, 16, 1) 0 +(87, 17, 1) 1 +(87, 18, 1) 1 +(87, 19, 1) 2 +(87, 20, 1) 2 +(87, 21, 1) 3 +(87, 22, 1) 4 +(87, 23, 1) 4 +(87, 24, 1) 5 +(87, 25, 1) 5 +(87, 26, 1) 6 +(87, 27, 1) 6 +(87, 28, 1) 7 +(87, 29, 1) 7 +(87, 30, 1) 8 +(87, 31, 1) 8 +(87, 32, 1) 9 +(87, 33, 1) 9 +(87, 34, 1) 10 +(87, 35, 1) 10 +(87, 36, 1) 10 +(87, 37, 1) 11 +(87, 38, 1) 11 +(87, 39, 1) 11 +(87, 40, 1) 12 +(87, 41, 1) 12 +(87, 42, 1) 12 +(87, 43, 1) 12 +(87, 44, 1) 12 +(87, 45, 1) 13 +(87, 46, 1) 13 +(87, 47, 1) 13 +(87, 48, 1) 13 +(87, 49, 1) 13 +(87, 50, 1) 13 +(87, 51, 1) 13 +(87, 52, 1) 13 +(87, 53, 1) 13 +(87, 54, 1) 13 +(87, 55, 1) 13 +(87, 56, 1) 13 +(87, 57, 1) 12 +(87, 58, 1) 12 +(87, 59, 1) 12 +(87, 60, 1) 12 +(87, 61, 1) 12 +(87, 62, 1) 11 +(87, 63, 1) 11 +(87, 64, 1) 11 +(87, 65, 1) 10 +(87, 66, 1) 10 +(87, 67, 1) 10 +(87, 68, 1) 9 +(87, 69, 1) 9 +(87, 70, 1) 8 +(87, 71, 1) 8 +(87, 72, 1) 7 +(87, 73, 1) 7 +(87, 74, 1) 6 +(87, 75, 1) 6 +(87, 76, 1) 5 +(87, 77, 1) 5 +(87, 78, 1) 4 +(87, 79, 1) 4 +(87, 80, 1) 3 +(87, 81, 1) 2 +(87, 82, 1) 2 +(87, 83, 1) 1 +(87, 84, 1) 1 +(87, 85, 1) 0 +(88, 21, 1) 2 +(88, 22, 1) 3 +(88, 23, 1) 3 +(88, 24, 1) 4 +(88, 25, 1) 5 +(88, 26, 1) 5 +(88, 27, 1) 6 +(88, 28, 1) 6 +(88, 29, 1) 7 +(88, 30, 1) 7 +(88, 31, 1) 7 +(88, 32, 1) 8 +(88, 33, 1) 8 +(88, 34, 1) 9 +(88, 35, 1) 9 +(88, 36, 1) 9 +(88, 37, 1) 10 +(88, 38, 1) 10 +(88, 39, 1) 10 +(88, 40, 1) 11 +(88, 41, 1) 11 +(88, 42, 1) 11 +(88, 43, 1) 11 +(88, 44, 1) 11 +(88, 45, 1) 12 +(88, 46, 1) 12 +(88, 47, 1) 12 +(88, 48, 1) 12 +(88, 49, 1) 12 +(88, 50, 1) 12 +(88, 51, 1) 12 +(88, 52, 1) 12 +(88, 53, 1) 12 +(88, 54, 1) 12 +(88, 55, 1) 12 +(88, 56, 1) 12 +(88, 57, 1) 11 +(88, 58, 1) 11 +(88, 59, 1) 11 +(88, 60, 1) 11 +(88, 61, 1) 11 +(88, 62, 1) 10 +(88, 63, 1) 10 +(88, 64, 1) 10 +(88, 65, 1) 9 +(88, 66, 1) 9 +(88, 67, 1) 9 +(88, 68, 1) 8 +(88, 69, 1) 8 +(88, 70, 1) 7 +(88, 71, 1) 7 +(88, 72, 1) 7 +(88, 73, 1) 6 +(88, 74, 1) 6 +(88, 75, 1) 5 +(88, 76, 1) 5 +(88, 77, 1) 4 +(88, 78, 1) 3 +(88, 79, 1) 3 +(88, 80, 1) 2 +(89, 21, 1) 1 +(89, 22, 1) 2 +(89, 23, 1) 3 +(89, 24, 1) 3 +(89, 25, 1) 4 +(89, 26, 1) 4 +(89, 27, 1) 5 +(89, 28, 1) 5 +(89, 29, 1) 6 +(89, 30, 1) 6 +(89, 31, 1) 7 +(89, 32, 1) 7 +(89, 33, 1) 7 +(89, 34, 1) 8 +(89, 35, 1) 8 +(89, 36, 1) 8 +(89, 37, 1) 9 +(89, 38, 1) 9 +(89, 39, 1) 9 +(89, 40, 1) 10 +(89, 41, 1) 10 +(89, 42, 1) 10 +(89, 43, 1) 10 +(89, 44, 1) 10 +(89, 45, 1) 11 +(89, 46, 1) 11 +(89, 47, 1) 11 +(89, 48, 1) 11 +(89, 49, 1) 11 +(89, 50, 1) 11 +(89, 51, 1) 11 +(89, 52, 1) 11 +(89, 53, 1) 11 +(89, 54, 1) 11 +(89, 55, 1) 11 +(89, 56, 1) 11 +(89, 57, 1) 10 +(89, 58, 1) 10 +(89, 59, 1) 10 +(89, 60, 1) 10 +(89, 61, 1) 10 +(89, 62, 1) 9 +(89, 63, 1) 9 +(89, 64, 1) 9 +(89, 65, 1) 8 +(89, 66, 1) 8 +(89, 67, 1) 8 +(89, 68, 1) 7 +(89, 69, 1) 7 +(89, 70, 1) 7 +(89, 71, 1) 6 +(89, 72, 1) 6 +(89, 73, 1) 5 +(89, 74, 1) 5 +(89, 75, 1) 4 +(89, 76, 1) 4 +(89, 77, 1) 3 +(89, 78, 1) 3 +(89, 79, 1) 2 +(89, 80, 1) 1 +(90, 21, 1) 1 +(90, 22, 1) 1 +(90, 23, 1) 2 +(90, 24, 1) 2 +(90, 25, 1) 3 +(90, 26, 1) 3 +(90, 27, 1) 4 +(90, 28, 1) 4 +(90, 29, 1) 5 +(90, 30, 1) 5 +(90, 31, 1) 6 +(90, 32, 1) 6 +(90, 33, 1) 6 +(90, 34, 1) 7 +(90, 35, 1) 7 +(90, 36, 1) 8 +(90, 37, 1) 8 +(90, 38, 1) 8 +(90, 39, 1) 8 +(90, 40, 1) 9 +(90, 41, 1) 9 +(90, 42, 1) 9 +(90, 43, 1) 9 +(90, 44, 1) 9 +(90, 45, 1) 10 +(90, 46, 1) 10 +(90, 47, 1) 10 +(90, 48, 1) 10 +(90, 49, 1) 10 +(90, 50, 1) 10 +(90, 51, 1) 10 +(90, 52, 1) 10 +(90, 53, 1) 10 +(90, 54, 1) 10 +(90, 55, 1) 10 +(90, 56, 1) 10 +(90, 57, 1) 9 +(90, 58, 1) 9 +(90, 59, 1) 9 +(90, 60, 1) 9 +(90, 61, 1) 9 +(90, 62, 1) 8 +(90, 63, 1) 8 +(90, 64, 1) 8 +(90, 65, 1) 8 +(90, 66, 1) 7 +(90, 67, 1) 7 +(90, 68, 1) 6 +(90, 69, 1) 6 +(90, 70, 1) 6 +(90, 71, 1) 5 +(90, 72, 1) 5 +(90, 73, 1) 4 +(90, 74, 1) 4 +(90, 75, 1) 3 +(90, 76, 1) 3 +(90, 77, 1) 2 +(90, 78, 1) 2 +(90, 79, 1) 1 +(90, 80, 1) 1 +(91, 21, 1) 0 +(91, 22, 1) 1 +(91, 23, 1) 1 +(91, 24, 1) 2 +(91, 25, 1) 2 +(91, 26, 1) 3 +(91, 27, 1) 3 +(91, 28, 1) 4 +(91, 29, 1) 4 +(91, 30, 1) 4 +(91, 31, 1) 5 +(91, 32, 1) 5 +(91, 33, 1) 6 +(91, 34, 1) 6 +(91, 35, 1) 6 +(91, 36, 1) 7 +(91, 37, 1) 7 +(91, 38, 1) 7 +(91, 39, 1) 8 +(91, 40, 1) 8 +(91, 41, 1) 8 +(91, 42, 1) 8 +(91, 43, 1) 8 +(91, 44, 1) 9 +(91, 45, 1) 9 +(91, 46, 1) 9 +(91, 47, 1) 9 +(91, 48, 1) 9 +(91, 49, 1) 9 +(91, 50, 1) 9 +(91, 51, 1) 9 +(91, 52, 1) 9 +(91, 53, 1) 9 +(91, 54, 1) 9 +(91, 55, 1) 9 +(91, 56, 1) 9 +(91, 57, 1) 9 +(91, 58, 1) 8 +(91, 59, 1) 8 +(91, 60, 1) 8 +(91, 61, 1) 8 +(91, 62, 1) 8 +(91, 63, 1) 7 +(91, 64, 1) 7 +(91, 65, 1) 7 +(91, 66, 1) 6 +(91, 67, 1) 6 +(91, 68, 1) 6 +(91, 69, 1) 5 +(91, 70, 1) 5 +(91, 71, 1) 4 +(91, 72, 1) 4 +(91, 73, 1) 4 +(91, 74, 1) 3 +(91, 75, 1) 3 +(91, 76, 1) 2 +(91, 77, 1) 2 +(91, 78, 1) 1 +(91, 79, 1) 1 +(91, 80, 1) 0 +(92, 21, 1) 0 +(92, 22, 1) 0 +(92, 23, 1) 0 +(92, 24, 1) 1 +(92, 25, 1) 1 +(92, 26, 1) 2 +(92, 27, 1) 2 +(92, 28, 1) 3 +(92, 29, 1) 3 +(92, 30, 1) 4 +(92, 31, 1) 4 +(92, 32, 1) 4 +(92, 33, 1) 5 +(92, 34, 1) 5 +(92, 35, 1) 5 +(92, 36, 1) 6 +(92, 37, 1) 6 +(92, 38, 1) 6 +(92, 39, 1) 7 +(92, 40, 1) 7 +(92, 41, 1) 7 +(92, 42, 1) 7 +(92, 43, 1) 7 +(92, 44, 1) 8 +(92, 45, 1) 8 +(92, 46, 1) 8 +(92, 47, 1) 8 +(92, 48, 1) 8 +(92, 49, 1) 8 +(92, 50, 1) 8 +(92, 51, 1) 8 +(92, 52, 1) 8 +(92, 53, 1) 8 +(92, 54, 1) 8 +(92, 55, 1) 8 +(92, 56, 1) 8 +(92, 57, 1) 8 +(92, 58, 1) 7 +(92, 59, 1) 7 +(92, 60, 1) 7 +(92, 61, 1) 7 +(92, 62, 1) 7 +(92, 63, 1) 6 +(92, 64, 1) 6 +(92, 65, 1) 6 +(92, 66, 1) 5 +(92, 67, 1) 5 +(92, 68, 1) 5 +(92, 69, 1) 4 +(92, 70, 1) 4 +(92, 71, 1) 4 +(92, 72, 1) 3 +(92, 73, 1) 3 +(92, 74, 1) 2 +(92, 75, 1) 2 +(92, 76, 1) 1 +(92, 77, 1) 1 +(92, 78, 1) 0 +(92, 79, 1) 0 +(92, 80, 1) 0 +(93, 26, 1) 1 +(93, 27, 1) 1 +(93, 28, 1) 2 +(93, 29, 1) 2 +(93, 30, 1) 3 +(93, 31, 1) 3 +(93, 32, 1) 3 +(93, 33, 1) 4 +(93, 34, 1) 4 +(93, 35, 1) 4 +(93, 36, 1) 5 +(93, 37, 1) 5 +(93, 38, 1) 5 +(93, 39, 1) 6 +(93, 40, 1) 6 +(93, 41, 1) 6 +(93, 42, 1) 6 +(93, 43, 1) 6 +(93, 44, 1) 7 +(93, 45, 1) 7 +(93, 46, 1) 7 +(93, 47, 1) 7 +(93, 48, 1) 7 +(93, 49, 1) 7 +(93, 50, 1) 7 +(93, 51, 1) 7 +(93, 52, 1) 7 +(93, 53, 1) 7 +(93, 54, 1) 7 +(93, 55, 1) 7 +(93, 56, 1) 7 +(93, 57, 1) 7 +(93, 58, 1) 6 +(93, 59, 1) 6 +(93, 60, 1) 6 +(93, 61, 1) 6 +(93, 62, 1) 6 +(93, 63, 1) 5 +(93, 64, 1) 5 +(93, 65, 1) 5 +(93, 66, 1) 4 +(93, 67, 1) 4 +(93, 68, 1) 4 +(93, 69, 1) 3 +(93, 70, 1) 3 +(93, 71, 1) 3 +(93, 72, 1) 2 +(93, 73, 1) 2 +(93, 74, 1) 1 +(93, 75, 1) 1 +(94, 26, 1) 0 +(94, 27, 1) 0 +(94, 28, 1) 1 +(94, 29, 1) 1 +(94, 30, 1) 2 +(94, 31, 1) 2 +(94, 32, 1) 2 +(94, 33, 1) 3 +(94, 34, 1) 3 +(94, 35, 1) 3 +(94, 36, 1) 4 +(94, 37, 1) 4 +(94, 38, 1) 4 +(94, 39, 1) 5 +(94, 40, 1) 5 +(94, 41, 1) 5 +(94, 42, 1) 5 +(94, 43, 1) 5 +(94, 44, 1) 6 +(94, 45, 1) 6 +(94, 46, 1) 6 +(94, 47, 1) 6 +(94, 48, 1) 6 +(94, 49, 1) 6 +(94, 50, 1) 6 +(94, 51, 1) 6 +(94, 52, 1) 6 +(94, 53, 1) 6 +(94, 54, 1) 6 +(94, 55, 1) 6 +(94, 56, 1) 6 +(94, 57, 1) 6 +(94, 58, 1) 5 +(94, 59, 1) 5 +(94, 60, 1) 5 +(94, 61, 1) 5 +(94, 62, 1) 5 +(94, 63, 1) 4 +(94, 64, 1) 4 +(94, 65, 1) 4 +(94, 66, 1) 3 +(94, 67, 1) 3 +(94, 68, 1) 3 +(94, 69, 1) 2 +(94, 70, 1) 2 +(94, 71, 1) 2 +(94, 72, 1) 1 +(94, 73, 1) 1 +(94, 74, 1) 0 +(94, 75, 1) 0 +(95, 26, 1) 0 +(95, 27, 1) 0 +(95, 28, 1) 0 +(95, 29, 1) 0 +(95, 30, 1) 1 +(95, 31, 1) 1 +(95, 32, 1) 1 +(95, 33, 1) 2 +(95, 34, 1) 2 +(95, 35, 1) 3 +(95, 36, 1) 3 +(95, 37, 1) 3 +(95, 38, 1) 3 +(95, 39, 1) 4 +(95, 40, 1) 4 +(95, 41, 1) 4 +(95, 42, 1) 4 +(95, 43, 1) 4 +(95, 44, 1) 5 +(95, 45, 1) 5 +(95, 46, 1) 5 +(95, 47, 1) 5 +(95, 48, 1) 5 +(95, 49, 1) 5 +(95, 50, 1) 5 +(95, 51, 1) 5 +(95, 52, 1) 5 +(95, 53, 1) 5 +(95, 54, 1) 5 +(95, 55, 1) 5 +(95, 56, 1) 5 +(95, 57, 1) 5 +(95, 58, 1) 4 +(95, 59, 1) 4 +(95, 60, 1) 4 +(95, 61, 1) 4 +(95, 62, 1) 4 +(95, 63, 1) 3 +(95, 64, 1) 3 +(95, 65, 1) 3 +(95, 66, 1) 3 +(95, 67, 1) 2 +(95, 68, 1) 2 +(95, 69, 1) 1 +(95, 70, 1) 1 +(95, 71, 1) 1 +(95, 72, 1) 0 +(95, 73, 1) 0 +(95, 74, 1) 0 +(95, 75, 1) 0 +(96, 36, 1) 2 +(96, 37, 1) 2 +(96, 38, 1) 2 +(96, 39, 1) 3 +(96, 40, 1) 3 +(96, 41, 1) 3 +(96, 42, 1) 3 +(96, 43, 1) 3 +(96, 44, 1) 4 +(96, 45, 1) 4 +(96, 46, 1) 4 +(96, 47, 1) 4 +(96, 48, 1) 4 +(96, 49, 1) 4 +(96, 50, 1) 4 +(96, 51, 1) 4 +(96, 52, 1) 4 +(96, 53, 1) 4 +(96, 54, 1) 4 +(96, 55, 1) 4 +(96, 56, 1) 4 +(96, 57, 1) 4 +(96, 58, 1) 3 +(96, 59, 1) 3 +(96, 60, 1) 3 +(96, 61, 1) 3 +(96, 62, 1) 3 +(96, 63, 1) 2 +(96, 64, 1) 2 +(96, 65, 1) 2 +(97, 36, 1) 1 +(97, 37, 1) 1 +(97, 38, 1) 2 +(97, 39, 1) 2 +(97, 40, 1) 2 +(97, 41, 1) 2 +(97, 42, 1) 2 +(97, 43, 1) 2 +(97, 44, 1) 3 +(97, 45, 1) 3 +(97, 46, 1) 3 +(97, 47, 1) 3 +(97, 48, 1) 3 +(97, 49, 1) 3 +(97, 50, 1) 3 +(97, 51, 1) 3 +(97, 52, 1) 3 +(97, 53, 1) 3 +(97, 54, 1) 3 +(97, 55, 1) 3 +(97, 56, 1) 3 +(97, 57, 1) 3 +(97, 58, 1) 2 +(97, 59, 1) 2 +(97, 60, 1) 2 +(97, 61, 1) 2 +(97, 62, 1) 2 +(97, 63, 1) 2 +(97, 64, 1) 1 +(97, 65, 1) 1 +(98, 41, 1) 1 +(98, 42, 1) 1 +(98, 43, 1) 1 +(98, 44, 1) 2 +(98, 45, 1) 2 +(98, 46, 1) 2 +(98, 47, 1) 2 +(98, 48, 1) 2 +(98, 49, 1) 2 +(98, 50, 1) 2 +(98, 51, 1) 2 +(98, 52, 1) 2 +(98, 53, 1) 2 +(98, 54, 1) 2 +(98, 55, 1) 2 +(98, 56, 1) 2 +(98, 57, 1) 2 +(98, 58, 1) 1 +(98, 59, 1) 1 +(98, 60, 1) 1 +(99, 41, 1) 0 +(99, 42, 1) 0 +(99, 43, 1) 0 +(99, 44, 1) 1 +(99, 45, 1) 1 +(99, 46, 1) 1 +(99, 47, 1) 1 +(99, 48, 1) 1 +(99, 49, 1) 1 +(99, 50, 1) 1 +(99, 51, 1) 1 +(99, 52, 1) 1 +(99, 53, 1) 1 +(99, 54, 1) 1 +(99, 55, 1) 1 +(99, 56, 1) 1 +(99, 57, 1) 1 +(99, 58, 1) 0 +(99, 59, 1) 0 +(99, 60, 1) 0 +(100, 41, 1) 0 +(100, 42, 1) 0 +(100, 43, 1) 0 +(100, 44, 1) 0 +(100, 45, 1) 0 +(100, 46, 1) 0 +(100, 47, 1) 0 +(100, 48, 1) 0 +(100, 49, 1) 0 +(100, 50, 1) 0 +(100, 51, 1) 0 +(100, 52, 1) 0 +(100, 53, 1) 0 +(100, 54, 1) 0 +(100, 55, 1) 0 +(100, 56, 1) 0 +(100, 57, 1) 0 +(100, 58, 1) 0 +(100, 59, 1) 0 +(100, 60, 1) 0 \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc b/EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc new file mode 100644 index 00000000000..34dea0da4f1 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc @@ -0,0 +1,1069 @@ +#include "../interface/CalibrationUtils.h" + + + + + + +/////////////////////////////////////////////////////////////// +// check if a xtal confines with a bad xtal or lies in a bad TT +/////////////////////////////////////////////////////////////// + +bool CheckxtalIC_EB(TH2F* h_scale_EB, int iPhi, int iEta) +{ + if( h_scale_EB->GetBinContent(iPhi,iEta) == 0 ) return false; + if( h_scale_EB->GetBinContent(iPhi,iEta) > 5 ) return false; + + int bx = h_scale_EB->GetNbinsX(); + int by = h_scale_EB->GetNbinsY(); + + if( (iPhiGetBinContent(iPhi+1,iEta)==0) || + (iPhi>1 && h_scale_EB->GetBinContent(iPhi-1,iEta)==0) ) return false; + + if( (iEta!=85 && iEtaGetBinContent(iPhi,iEta+1)==0) || + (iEta!=87 && iEta>1 && h_scale_EB->GetBinContent(iPhi,iEta-1)==0) ) return false; + + if( (iEta!=85 && iEtaGetBinContent(iPhi+1,iEta+1)==0) || + (iEta!=87 && iEta>1 && iPhi>1 && h_scale_EB->GetBinContent(iPhi-1,iEta-1)==0) ) return false; + + if( (iEta!=87 && iEta>1 && iPhiGetBinContent(iPhi+1,iEta-1)==0) || + (iEta!=85 && iEta1 && h_scale_EB->GetBinContent(iPhi-1,iEta+1)==0) ) return false; + + return true; +} + +bool CheckxtalTT_EB(int iPhi, int iEta, const std::vector >& TT_centre) +{ + for(unsigned int k = 0; k < TT_centre.size(); ++k) + if( (fabs(iPhi-TT_centre.at(k).second) < 5) && (fabs(iEta-86-TT_centre.at(k).first) < 5) ) return false; + + return true; +} + + + +bool CheckxtalIC_EE(TH2F* h_scale_EE,int ix, int iy, int ir) +{ + if( h_scale_EE->GetBinContent(ix,iy)==0 ) return false; + if( h_scale_EE->GetBinContent(ix,iy) > 5 ) return false; + + int bx= h_scale_EE->GetNbinsX(); + int by= h_scale_EE->GetNbinsY(); + + if( ( h_scale_EE->GetBinContent(ix+1,iy)==0 && (ir!=0 || ir<33) && ixGetBinContent(ix-1,iy)==0 && (ir!=0 || ir<33) && ix>1 ) ) return false; + + if( ( h_scale_EE->GetBinContent(ix,iy+1)==0 && (ir!=0 || ir<33) && iyGetBinContent(ix,iy-1)==0 && (ir!=0 || ir<33) && iy>1) ) return false; + + if( ( h_scale_EE->GetBinContent(ix+1,iy+1)==0 && (ir!=0 || ir<33) && ixGetBinContent(ix-1,iy-1)==0 && (ir!=0 || ir<33) && iy>1 && ix>1 ) ) return false; + + if( ( h_scale_EE->GetBinContent(ix+1,iy-1)==0 && (ir!=0 || ir<33) && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && (ir!=0 || ir<33) && ix>1 && iy >& TT_centre) +{ + for( unsigned int k =0; k > & TT_centre, bool skip) +{ + // mean over phi corrected skipping dead channel + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + float sumIC = 0.; + int numIC = 0; + + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + + if( isGood && isGoodTT ) + { + sumIC += h_scale_EB -> GetBinContent(iPhi,iEta); + ++numIC; + } + } + + // normalize IC skipping bad channels and bad TTs + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX(); ++iPhi) + { + if( numIC == 0 || sumIC == 0 ) continue; + + if( !skip ) + { + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC/numIC)); + continue; + } + else + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + if( !isGood || !isGoodTT ) continue; + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC/numIC)); + } + } + } +} + +///////////////////////////////////////////////////////////////////////// + +void NormalizeIC_LMR_EB(TH2F* h_scale_EB, TH2F* hcmap_EB, const std::vector< std::pair > & TT_centre, bool skip) +{ + TFile* inFile = TFile::Open("./src/drawRegions.root", "READ"); + TH2F* h2_EB_LMR = (TH2F*)(inFile -> Get("h2_EB_LMR")); + + float sumIC[325]; + float numIC[325]; + for(int ii = 0; ii < 325; ii++) + { + sumIC[ii] = 0; + numIC[ii] = 0; + } + + // mean over LMR corrected skipping dead channel + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + int regionId = h2_EB_LMR -> GetBinContent(iEta,iPhi); + if( isGood && isGoodTT ) + { + sumIC[regionId] = sumIC[regionId] + h_scale_EB -> GetBinContent(iPhi,iEta); + numIC[regionId] = numIC[regionId] + 1; + } + } + } + + // normalize IC skipping bad channels and bad TTs + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + int regionId = h2_EB_LMR -> GetBinContent(iPhi,iEta); + if( numIC[regionId] == 0 || sumIC[regionId] == 0 ) continue; + + if( !skip ) + { + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + continue; + } + else + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + if( !isGood || !isGoodTT ) continue; + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + } + } + } +} + +///////////////////////////////////////////////////////////////////////// + +void NormalizeIC_SM_EB(TH2F* h_scale_EB, TH2F* hcmap_EB, const std::vector< std::pair > & TT_centre, bool skip) +{ + TFile* inFile = TFile::Open("./src/drawRegions.root", "READ"); + TH2F* h2_EB_LMR = (TH2F*)(inFile -> Get("h2_EB_SM")); + + float sumIC[36]; + float numIC[36]; + for(int ii = 0; ii < 36; ii++) + { + sumIC[ii] = 0; + numIC[ii] = 0; + } + + // mean over LMR corrected skipping dead channel + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + int regionId = h2_EB_LMR -> GetBinContent(iEta,iPhi); + if( isGood && isGoodTT ) + { + sumIC[regionId] = sumIC[regionId] + h_scale_EB -> GetBinContent(iPhi,iEta); + numIC[regionId] = numIC[regionId] + 1; + } + } + } + + // normalize IC skipping bad channels and bad TTs + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + int regionId = h2_EB_LMR -> GetBinContent(iPhi,iEta); + if( numIC[regionId] == 0 || sumIC[regionId] == 0 ) continue; + + if( !skip ) + { + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + continue; + } + else + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + if( !isGood || !isGoodTT ) continue; + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + } + } + } +} + + +///////////////////////////////////////////////////////////////////////// +void NormalizeIC_EE(TH2F* h_scale_EEM, TH2F* h_scale_EEP, + TH2F* hcmap_EEM, TH2F* hcmap_EEP, + const std::vector< std::pair >& TT_centre_EEM, + const std::vector< std::pair >& TT_centre_EEP, + TEndcapRings* eRings, bool skip) +{ + std::map h_scale_EE; + std::map hcmap_EE; + + h_scale_EE[0] = h_scale_EEM; + h_scale_EE[1] = h_scale_EEP; + + hcmap_EE[0] = hcmap_EEM; + hcmap_EE[1] = hcmap_EEP; + + + + std::map > sumIC; + std::map > numIC; + + (sumIC[0]).assign(40,0.); + (sumIC[1]).assign(40,0.); + + (numIC[0]).assign(40,0); + (numIC[1]).assign(40,0); + + + + // mean over phi corrected skipping dead channel + for(int k = 0; k < 2; ++k) + for(int ix = 1; ix <= h_scale_EE[k] -> GetNbinsX(); ++ix) + for(int iy = 1; iy <= h_scale_EE[k] -> GetNbinsY(); ++iy) + { + int ring = eRings->GetEndcapRing(ix,iy,k); + if( ring == -1 ) continue; + + bool isGood = CheckxtalIC_EE(h_scale_EE[k],ix,iy,ring); + bool isGoodTT; + if( k == 0 ) isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEM); + else isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEP); + + if( isGoodTT && isGood ) + { + (sumIC[k]).at(ring) += h_scale_EE[k]->GetBinContent(ix,iy); + (numIC[k]).at(ring) += 1; + } + } + + // normalize IC skipping bad channels and bad TTs + for(int k = 0; k < 2; ++k) + for(int ix = 1; ix <= h_scale_EE[k]->GetNbinsX(); ++ix) + for(int iy = 1; iy <= h_scale_EE[k]->GetNbinsY(); ++iy) + { + int ring = eRings->GetEndcapRing(ix,iy,k); + if( ring == -1 ) continue; + + if( !skip ) + { + if( ring > 33 ) + { + hcmap_EE[k] -> Fill(ix,iy,0.); + continue; + } + else + { + if( (numIC[k]).at(ring) != 0 && (sumIC[k]).at(ring) != 0 ) + hcmap_EE[k] -> Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/((sumIC[k]).at(ring)/(numIC[k]).at(ring))); + } + } + + if( skip ) + { + bool isGood = CheckxtalIC_EE(h_scale_EE[k],ix,iy,ring); + bool isGoodTT; + + if( k == 0 ) isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEM); + else isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEP); + + if( isGood && isGoodTT ) + { + if( ring > 33 ) + { + hcmap_EE[k] -> Fill(ix,iy,0.); + continue; + } + else + { + if( (numIC[k]).at(ring) != 0 && (sumIC[k]).at(ring) != 0 ) + hcmap_EE[k] -> Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/((sumIC[k]).at(ring)/(numIC[k]).at(ring))); + } + } + } + } + +} + + + + + + + +//------------------------------------------------------------------------------------------------------------- + + + + + + +/////////////////////////////////////////////////////////////////////// +void BookSpreadHistos_EB(TH1F* h_spread, std::vector& h_spread_vsEta, TGraphErrors* g_spread_vsEta, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + TH2F* hcmap, TH2F* hcmap2) +{ + char histoName[100]; + char funcName[100]; + + std::ofstream RMSFile; + if (hcmap2 == NULL) { + RMSFile.open ("RMSFile.txt"); + } + + // define the number of eta rings + int nEtaRings = 85/etaRingWidth; + if( 85%etaRingWidth > 0 ) nEtaRings += 1; + + // initialize the histograms + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + int etaMin = 1 + etaRing * etaRingWidth; + + sprintf(histoName,"h_%s%02d",name.c_str(),etaMin); + h_spread_vsEta.push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + + + // spread histos folding EB+ and EB- + for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) + { + float etaRingMin = hcmap->GetYaxis()->GetBinLowEdge(jbin); + int etaRing = int( (fabs(etaRingMin) - 1.)/etaRingWidth ); + if( etaRing == -1 ) continue; + + + for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) + { + if( hcmap2 == NULL ) + { + float IC = hcmap->GetBinContent(ibin,jbin); + if( IC > 0. && IC < 2. ) + { + h_spread -> Fill(IC); + h_spread_vsEta.at(etaRing) -> Fill(IC); + } + } + else + { + float IC1 = hcmap -> GetBinContent(ibin,jbin); + float IC2 = hcmap2 -> GetBinContent(ibin,jbin); + if( IC1 > 0. && IC1 < 2. && IC2 > 0. && IC2 < 2. ) + { + h_spread -> Fill((IC1-IC2)/(IC1+IC2)); + h_spread_vsEta.at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); + // std::cout<<"eta: "< SetNpx(10000); + if( hcmap2 == NULL ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kRed+2); + + float center = 0.5*(spreadMin+spreadMax); + fgaus -> SetParameter(1,h_spread->GetMean()); + fgaus -> SetParameter(2,h_spread->GetRMS()); + h_spread -> Fit(funcName,"QLS+","",center-h_spread->GetRMS(),center+h_spread->GetRMS()); + + + // fill the TGraph + g_spread_vsEta -> SetMarkerStyle(20); + g_spread_vsEta -> SetMarkerSize(1); + g_spread_vsEta -> GetYaxis() -> SetRangeUser(0.,0.05); + if( hcmap2 == NULL ) g_spread_vsEta -> SetMarkerColor(kBlue+2); + else g_spread_vsEta -> SetMarkerColor(kRed+2); + + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + int etaMin = 1 + etaRing * etaRingWidth; + + sprintf(funcName,"f_%s%02d",name.c_str(),etaMin); + fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); + + fgaus -> SetNpx(10000); + if( hcmap2 == NULL ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kRed+2); + + fgaus -> SetParameter(1,h_spread_vsEta[etaRing]->GetMean()); + fgaus -> SetParameter(2,h_spread_vsEta[etaRing]->GetRMS()); + h_spread_vsEta[etaRing] -> Fit(funcName,"QLS+","",center-3.*h_spread_vsEta[etaRing]->GetRMS(),center+3.*h_spread_vsEta[etaRing]->GetRMS()); + + g_spread_vsEta -> SetPoint(etaRing,etaMin,fgaus->GetParameter(2)); + g_spread_vsEta -> SetPointError(etaRing,0.5*etaRingWidth,fgaus->GetParError(2)); + + // std::cout<GetParameter(2)<GetParameter(2)<<"\n"; + } +} + + + + + + +/////////////////////////////////////////////////////////////////////////////// +void PhiProfile(TH1F* h_phiAvgICSpread, TGraphErrors* g_avgIC_vsPhi, const int& phiRegionWidth, + TH2F* hcmap, TEndcapRings* eRings) +{ + // define the number of phi regions + int nPhiRegions = 360/phiRegionWidth; + if( 360%phiRegionWidth > 0 ) nPhiRegions += 1; + + std::vector h_IC_vsPhi(nPhiRegions); + for(int i = 0; i < nPhiRegions; ++i) + { + char histoName[50]; + sprintf(histoName,"h_IC_vsPhi%03d",i); + h_IC_vsPhi.at(i) = new TH1F(histoName,"",1000,0.,2.); + } + + + for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) + { + float IC = hcmap->GetBinContent(ibin,jbin); + if( IC <= 0. || IC >= 2. ) continue; + + float phiRegionMin = hcmap->GetXaxis()->GetBinLowEdge(ibin); + if( eRings != NULL ) phiRegionMin = eRings -> GetEndcapIphi(ibin,jbin,1); + + int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ); + + h_IC_vsPhi.at(phiRegion) -> Fill(IC); + } + + + for(int i = 0; i < nPhiRegions; ++i) + { + int phiMin = 1 + i * phiRegionWidth; + + h_phiAvgICSpread -> Fill(h_IC_vsPhi.at(i)->GetMean()); + + g_avgIC_vsPhi -> SetPoint(i,phiMin,h_IC_vsPhi.at(i)->GetMean()); + g_avgIC_vsPhi -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhi.at(i)->GetMeanError()); + } + + + TF1* fgaus = new TF1("f_phiAvgICSpread","gaus",0.,2.); + fgaus -> SetNpx(10000); + fgaus -> SetLineColor(kBlack); + + fgaus -> SetParameter(1,h_phiAvgICSpread->GetMean()); + fgaus -> SetParameter(2,h_phiAvgICSpread->GetRMS()); + h_phiAvgICSpread -> Fit("f_phiAvgICSpread","QLS+","",1.-3.*h_phiAvgICSpread->GetRMS(),1.+3.*h_phiAvgICSpread->GetRMS()); + + + + for(int i = 0; i < nPhiRegions; ++i) + { + delete h_IC_vsPhi.at(i); + } +} + + + +void PhiFoldProfile_EB(TGraphErrors* g_avgIC_vsPhiFold_EBM, TGraphErrors* g_avgIC_vsPhiFold_EBP, const int& phiRegionWidth, + TH2F* hcmap) +{ + // define the number of phi regions + int nPhiRegions = 20/phiRegionWidth; + if( 20%phiRegionWidth > 0 ) nPhiRegions += 1; + + std::vector h_IC_vsPhiFold_EBM(nPhiRegions); + std::vector h_IC_vsPhiFold_EBP(nPhiRegions); + for(int i = 0; i < nPhiRegions; ++i) + { + char histoName[50]; + sprintf(histoName,"h_IC_vsPhiFold_EBM_%03d",i); + h_IC_vsPhiFold_EBM.at(i) = new TH1F(histoName,"",1000,0.,2.); + sprintf(histoName,"h_IC_vsPhiFold_EBP_%03d",i); + h_IC_vsPhiFold_EBP.at(i) = new TH1F(histoName,"",1000,0.,2.); + } + + + for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) + { + float IC = hcmap->GetBinContent(ibin,jbin); + if( IC <= 0. || IC >= 2. ) continue; + + float phiRegionMin = hcmap->GetXaxis()->GetBinLowEdge(ibin); + int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ) % 20; + + float etaBinCenter = hcmap->GetYaxis()->GetBinCenter(jbin); + + if( etaBinCenter < 0. ) h_IC_vsPhiFold_EBM.at(phiRegion) -> Fill(IC); + if( etaBinCenter > 0. ) h_IC_vsPhiFold_EBP.at(phiRegion) -> Fill(IC); + } + + + for(int i = 0; i < nPhiRegions; ++i) + { + int phiMin = 1 + i * phiRegionWidth; + + g_avgIC_vsPhiFold_EBM -> SetPoint(i,phiMin,h_IC_vsPhiFold_EBM.at(i)->GetMean()); + g_avgIC_vsPhiFold_EBM -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhiFold_EBM.at(i)->GetMeanError()); + + g_avgIC_vsPhiFold_EBP -> SetPoint(i,phiMin,h_IC_vsPhiFold_EBP.at(i)->GetMean()); + g_avgIC_vsPhiFold_EBP -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhiFold_EBP.at(i)->GetMeanError()); + } +} + +//////////////////////////////////////////////////////////////////////////// +void ResidualSpread(TGraphErrors* g_stat, TGraphErrors* g_spread, TGraphErrors* g_residual) +{ + g_residual -> SetMarkerStyle(20); + g_residual -> SetMarkerSize(1); + g_residual -> SetMarkerColor(kGreen+2); + + + for(int i = 0; i < g_stat->GetN(); ++i) + { + double spread, espread; + double stat, estat; + double residual, eresidual; + double x,ex; + + ex = g_stat-> GetErrorX(i); + + g_stat -> GetPoint(i,x,stat); + estat = g_stat-> GetErrorY(i); + + g_spread -> GetPoint(i,x,spread); + espread = g_spread -> GetErrorY(i); + + if( spread > stat ) + { + residual = sqrt( pow(spread,2) - pow(stat,2) ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2) ) / residual; + } + else + { + residual = 0; + eresidual = 0; + } + + g_residual -> SetPoint(i,x,residual); + g_residual -> SetPointError(i,ex,eresidual); + } +} + +////////////////////////////////////////////////////////////// + + + + +///////////////////////////////////////////////////////////////////////////// +void BookSpreadHistos_EE(std::map& h_spread, std::map >& h_spread_vsEta, std::map& g_spread_vsEta, + TEndcapRings* eRings, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + std::map& hcmap, std::map& hcmap2) +{ + char histoName[100]; + char funcName[100]; + + + // define the number of eta rings + int nEtaRings = 39/etaRingWidth; + if( 39%etaRingWidth > 0 ) nEtaRings += 1; + + + // initialize the histograms (EE-, all EE, EE+) + for(int k = -1; k <= 1; ++k) + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + int etaMin = 0 + etaRing * etaRingWidth; + + if( k == -1 ) + { + sprintf(histoName,"h_%s%02d_EEM",name.c_str(),etaMin); + h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + if( k == 0 ) + { + sprintf(histoName,"h_%s%02d_EE",name.c_str(),etaMin); + h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + if( k == 1 ) + { + sprintf(histoName,"h_%s%02d_EEP",name.c_str(),etaMin); + h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + } + + + // spread histos + for(int k = -1; k <= 1; ++k) + { + if( k == 0 ) continue; + + for(int ibin = 1; ibin <= hcmap[k]->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= hcmap[k]->GetNbinsY(); ++jbin) + { + int etaRing = eRings -> GetEndcapRing(ibin,jbin,k); + if( etaRing == -1 ) continue; + + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) + { + float IC = hcmap[k]->GetBinContent(ibin,jbin); + if( IC > 0. && IC < 2. ) + { + h_spread[k] -> Fill(IC); + h_spread_vsEta[k].at(etaRing) -> Fill(IC); + + h_spread[0] -> Fill(IC); + h_spread_vsEta[0].at(etaRing) -> Fill(IC); + } + } + + else + { + float IC1 = hcmap[k] -> GetBinContent(ibin,jbin); + float IC2 = hcmap2[k] -> GetBinContent(ibin,jbin); + if( IC1 > 0. && IC1 < 2. && IC2 > 0. && IC2 < 2. ) + { + h_spread[k] -> Fill((IC1-IC2)/(IC1+IC2)); + h_spread_vsEta[k].at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); + + h_spread[0] -> Fill((IC1-IC2)/(IC1+IC2)); + h_spread_vsEta[0].at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); + } + } + } + } + + + + // fit the global spread + for(int k = -1; k <= 1; ++k) + { + if( k == -1 ) sprintf(funcName,"f_%s_EEM",name.c_str()); + if( k == 0 ) sprintf(funcName,"f_%s_EE", name.c_str()); + if( k == +1 ) sprintf(funcName,"f_%s_EEP",name.c_str()); + + TF1* fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); + + fgaus -> SetNpx(10000); + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kBlue+2); + + float center = 0.5*(spreadMin+spreadMax); + fgaus -> SetParameter(1,h_spread[k]->GetMean()); + fgaus -> SetParameter(2,h_spread[k]->GetRMS()); + h_spread[k] -> Fit(funcName,"QLS+","",center-h_spread[k]->GetRMS(),center+h_spread[k]->GetRMS()); + + + // fill the TGraph + g_spread_vsEta[k] -> SetMarkerStyle(20); + g_spread_vsEta[k] -> SetMarkerSize(1); + g_spread_vsEta[k] -> GetYaxis() -> SetRangeUser(0.,0.05); + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) )g_spread_vsEta[k] -> SetMarkerColor(kBlue+2); + else g_spread_vsEta[k] -> SetMarkerColor(kRed+2); + + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + if( (h_spread_vsEta[k])[etaRing]->Integral() == 0 ) continue; + + int etaMin = etaRing * etaRingWidth; + + sprintf(funcName,"f_%s%02d",name.c_str(),etaMin); + fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); + + fgaus -> SetNpx(10000); + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kRed+2); + + fgaus -> SetParameter(1,(h_spread_vsEta[k])[etaRing]->GetMean()); + fgaus -> SetParameter(2,(h_spread_vsEta[k])[etaRing]->GetRMS()); + (h_spread_vsEta[k])[etaRing] -> Fit(funcName,"QLS+","",center-3.*(h_spread_vsEta[k])[etaRing]->GetRMS(),center+3.*(h_spread_vsEta[k])[etaRing]->GetRMS()); + + g_spread_vsEta[k] -> SetPoint(etaRing,etaMin,fgaus->GetParameter(2)); + g_spread_vsEta[k] -> SetPointError(etaRing,0.5*etaRingWidth,fgaus->GetParError(2)); + } + } +} + + +/////////////////////////////////////////////////////////////////////// +void PhiProfileEE(TGraphErrors *phiProjection, TGraphErrors **MomentumScale, TH2F* hcmap,TEndcapRings *eRings, const int & iz) +{ + std::vector vectSum; + std::vector vectCounter; + + vectCounter.assign(MomentumScale[0]->GetN(),0.); + vectSum.assign(MomentumScale[0]->GetN(),0.); + + for(int ix=1; ixGetNbinsX()+1;ix++) + for(int iy=1; iyGetNbinsY()+1;iy++) + { + if(hcmap->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,iz)/(360./MomentumScale[0]->GetN())); + vectSum.at(iPhi) = vectSum.at(iPhi)+hcmap->GetBinContent(ix,iy); + vectCounter.at(iPhi) = vectCounter.at(iPhi)+1; + } + + for(unsigned int i=0; i SetPoint(i,int(i*(360./MomentumScale[0]->GetN())),vectSum.at(i)/vectCounter.at(i)); +} + + + + + + +//------------------------------------------------------------------------------------------------------------- + + + + + + +//////////////////////////// +// define the list of bad TT +//////////////////////////// + +void InitializeDeadTT_EB(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (58,49)); + TT_centre.push_back(std::pair (53,109)); + TT_centre.push_back(std::pair (8,114)); + TT_centre.push_back(std::pair (83,169)); + TT_centre.push_back(std::pair (53,174)); + TT_centre.push_back(std::pair (63,194)); + TT_centre.push_back(std::pair (83,224)); + TT_centre.push_back(std::pair (73,344)); + TT_centre.push_back(std::pair (83,358)); + TT_centre.push_back(std::pair (-13,18)); + TT_centre.push_back(std::pair (-18,23)); + TT_centre.push_back(std::pair (-8,53)); + TT_centre.push_back(std::pair (-3,63)); + TT_centre.push_back(std::pair (-53,128)); + TT_centre.push_back(std::pair (-53,183)); + TT_centre.push_back(std::pair (-83,193)); + TT_centre.push_back(std::pair (-74,218)); + TT_centre.push_back(std::pair (-8,223)); + TT_centre.push_back(std::pair (-68,303)); + TT_centre.push_back(std::pair (-43,328)); +} + +void InitializeDeadTT_EB2012(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (58,49)); + TT_centre.push_back(std::pair (53,109)); + TT_centre.push_back(std::pair (8,114)); + TT_centre.push_back(std::pair (83,169)); + TT_centre.push_back(std::pair (53,174)); + TT_centre.push_back(std::pair (63,194)); + TT_centre.push_back(std::pair (83,224)); + TT_centre.push_back(std::pair (73,344)); + TT_centre.push_back(std::pair (83,358)); + TT_centre.push_back(std::pair (-13,18)); + TT_centre.push_back(std::pair (-18,23)); + TT_centre.push_back(std::pair (-8,53)); + TT_centre.push_back(std::pair (-3,63)); + TT_centre.push_back(std::pair (-53,128)); + TT_centre.push_back(std::pair (-53,183)); + TT_centre.push_back(std::pair (-83,193)); + TT_centre.push_back(std::pair (-74,218)); + TT_centre.push_back(std::pair (-8,223)); + TT_centre.push_back(std::pair (-68,303)); + TT_centre.push_back(std::pair (-43,328)); + TT_centre.push_back(std::pair (-23,167)); +} + +void InitializeDeadTTEEP(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (78,78)); + TT_centre.push_back(std::pair (83,28)); + TT_centre.push_back(std::pair (83,23)); +} + +void InitializeDeadTTEEM(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (53,28)); +} + +void InitializeDeadTTEEP2012(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (78,78)); + TT_centre.push_back(std::pair (83,28)); + TT_centre.push_back(std::pair (83,23)); + TT_centre.push_back(std::pair (91,23)); +} + +void InitializeDeadTTEEM2012(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (53,28)); + TT_centre.push_back(std::pair (28,33)); + TT_centre.push_back(std::pair (89,80)); +} + + + + + + +int GetNRegionsEB(const std::string& type) +{ + if( type == "none" ) return 1; + + if( type == "R9" ) return 2; + + if( type == "charge" ) return 2; + + if( type == "eta1" ) return 1; + if( type == "eta2" ) return 2; + if( type == "eta4" ) return 4; + + if( type == "absEta2" ) return 2; + + if( type == "eta2-charge" ) return 4; + + if( type == "absEta2-charge" ) return 4; + + return 0; +} + +int templIndexEB(const std::string& type, const float& eta, const float& charge, const float& R9) +{ + if( type == "none" ) + { + return 0; + } + + + if( type == "R9" ) + { + if( R9 < 0.94 ) return 0; + if( R9 >= 0.94 ) return 1; + } + + + if( type == "charge" ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + + + if( type == "eta1" ) + { + return 0; + } + if( type == "eta2" ) + { + if( eta < 0. ) return 0; + if( eta >= 0. ) return 1; + } + if( type == "eta4" ) + { + if( (eta < -1.) ) return 0; + if( (eta >= -1.) && (eta < 0.) ) return 1; + if( (eta >= 0.) && (eta < 1.) ) return 2; + if( (eta >= 1.) ) return 3; + } + + + if( type == "absEta2" ) + { + if( fabs(eta) < 1. ) return 0; + if( fabs(eta) >= 1. ) return 1; + } + + + if( type == "eta2-charge" ) + { + if( eta < 0. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( eta >= 0. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + if( type == "absEta2-charge" ) + { + if( fabs(eta) < 1. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( fabs(eta) >= 1. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + return -1; +} + + + +int GetNRegionsEE(const std::string& type) +{ + if( type == "none" ) return 1; + + if( type == "R9" ) return 2; + + if( type == "charge" ) return 2; + + if( type == "eta1" ) return 1; + if( type == "eta2" ) return 2; + if( type == "eta4" ) return 4; + + if( type == "absEta2" ) return 2; + + if( type == "eta2-charge" ) return 4; + + if( type == "absEta2-charge" ) return 4; + + return 0; +} + +int templIndexEE(const std::string& type, const float& eta, const float& charge, const float& R9) +{ + if( type == "none" ) + { + return 0; + } + + + if( type == "R9" ) + { + if( R9 < 0.94 ) return 0; + if( R9 >= 0.94 ) return 1; + } + + + if( type == "charge" ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + + + if( type == "eta1" ) + { + return 0; + } + if( type == "eta2" ) + { + if( eta < 0. ) return 0; + if( eta >= 0. ) return 1; + } + if( type == "eta4" ) + { + if( (eta < -2.) ) return 0; + if( (eta >= -2.) && (eta < -1.479) ) return 1; + if( (eta >= 1.479) && (eta < 2.) ) return 2; + if( (eta >= 2.) ) return 3; + } + + + if( type == "absEta2" ) + { + if( fabs(eta) < 2. ) return 0; + if( fabs(eta) >= 2. ) return 1; + } + + + if( type == "eta2-charge" ) + { + if( eta < 0. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( eta >= 0. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + + if( type == "absEta2-charge" ) + { + if( fabs(eta) < 2. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( fabs(eta) >= 2. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + + return -1; +} diff --git a/EOverPCalibration/FastCalibrator/src/DrawingUtils.cc b/EOverPCalibration/FastCalibrator/src/DrawingUtils.cc new file mode 100644 index 00000000000..d2c20a79288 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/DrawingUtils.cc @@ -0,0 +1,318 @@ +#include "../interface/DrawingUtils.h" + + + +void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c; + + SetLabelAndTitle(h2); + + if( isEB == true ) + { + c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + h2 -> GetXaxis() -> SetNdivisions(418); + h2 -> GetXaxis() -> SetTitle("i#phi"); + h2 -> GetYaxis() -> SetTitle("i#eta"); + h2 -> GetZaxis() -> SetRangeUser(0.90,1.10); + } + else + { + c = new TCanvas("c",fileName.c_str(),0,0,700,600); + c -> SetGridx(); + c -> SetGridy(); + + h2 -> GetXaxis() -> SetNdivisions(510); + h2 -> GetXaxis() -> SetTitle("ix"); + h2 -> GetYaxis() -> SetTitle("iy"); + h2 -> GetZaxis() -> SetRangeUser(0.70,1.30); + } + + h2 -> Draw("COLZ"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawSpreadHisto(TH1F* h, const std::string& fileName, const std::string& funcName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,700,600); + + SetLabelAndTitle(h); + + if( isEB == true ) h -> GetXaxis() -> SetRangeUser(0.9,1.0999); + else h -> GetXaxis() -> SetRangeUser(0.7,1.2999); + if( isEB == true ) h -> GetYaxis() -> SetRangeUser(0.,2500.*(h->GetNbinsX()/2000.)); + else h -> GetYaxis() -> SetRangeUser(0., 150.*(h->GetNbinsX()/2000.)); + h -> GetYaxis() -> SetTitle("entries"); + h -> GetXaxis() -> SetTitle("IC"); + h -> SetFillColor(kBlue+2); + h -> SetFillStyle(3002); + h -> Draw(""); + + TF1* f_spread = h -> GetFunction(funcName.c_str()); + f_spread -> SetLineWidth(2); + + char latexBuffer[50]; + sprintf(latexBuffer,"#mu = %1.2e",f_spread->GetParameter(1)); + TLatex* latex_mean = new TLatex(0.17,0.80,latexBuffer); + latex_mean -> SetNDC(); + latex_mean -> SetTextFont(42); + latex_mean -> SetTextSize(0.05); + latex_mean -> Draw("same"); + sprintf(latexBuffer,"#sigma = %1.2e",f_spread->GetParameter(2)); + TLatex* latex_sigma = new TLatex(0.17,0.75,latexBuffer); + latex_sigma -> SetNDC(); + latex_sigma -> SetTextFont(42); + latex_sigma -> SetTextSize(0.05); + latex_sigma -> Draw("same"); + sprintf(latexBuffer,"RMS = %1.2e",h->GetRMS()); + TLatex* latex_RMS = new TLatex(0.17,0.70,latexBuffer); + latex_RMS -> SetNDC(); + latex_RMS -> SetTextFont(42); + latex_RMS -> SetTextSize(0.05); + latex_RMS -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + +void DrawSpreadGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB, + TGraphErrors* g_stat) +{ + TCanvas* c; + + SetLabelAndTitle(g); + + if( isEB == true ) + { + c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(0.,85.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.05); + g -> GetXaxis() -> SetTitle("|i#eta|"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + else + { + c = new TCanvas("c",fileName.c_str(),0,0,700,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(-1.,38.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.30); + g -> GetXaxis() -> SetTitle("iRing"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + + TLegend* leg = new TLegend(0.15,0.74,0.43,0.89); + leg -> SetFillColor(0); + leg -> SetTextFont(42); + leg -> SetTextSize(0.05); + leg -> AddEntry(g,"IC spread","P"); + + if( g_stat != NULL ) + { + g_stat -> Draw("P,same"); + leg -> AddEntry(g_stat,"statistical precision","P"); + } + + leg -> Draw("same"); + + c -> Print((fileName+".png").c_str(),"png"); + + delete c; +} + + + +void DrawPhiAvgICSpread(TH1F* h, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,700,600); + + SetLabelAndTitle(h); + + if( isEB == true ) h -> GetXaxis() -> SetRangeUser(0.98,1.01999); + else h -> GetXaxis() -> SetRangeUser(0.90,1.0999); + if(isEB == true ) h -> GetYaxis() -> SetRangeUser(0.,70.); + h -> GetYaxis() -> SetTitle("entries"); + h -> GetXaxis() -> SetTitle("#LTIC#GT_{i#phi}"); + h -> SetFillColor(kBlack); + h -> SetFillStyle(3003); + h -> Draw(""); + + TF1* f_phiAvgICSpread = h -> GetFunction("f_phiAvgICSpread"); + f_phiAvgICSpread -> SetLineWidth(2); + + char latexBuffer[50]; + sprintf(latexBuffer,"#mu = %1.2e",f_phiAvgICSpread->GetParameter(1)); + TLatex* latex_mean = new TLatex(0.17,0.80,latexBuffer); + latex_mean -> SetNDC(); + latex_mean -> SetTextFont(42); + latex_mean -> SetTextSize(0.05); + latex_mean -> Draw("same"); + sprintf(latexBuffer,"#sigma = %1.2e",f_phiAvgICSpread->GetParameter(2)); + TLatex* latex_sigma = new TLatex(0.17,0.75,latexBuffer); + latex_sigma -> SetNDC(); + latex_sigma -> SetTextFont(42); + latex_sigma -> SetTextSize(0.05); + latex_sigma -> Draw("same"); + sprintf(latexBuffer,"RMS = %1.2e",h->GetRMS()); + TLatex* latex_RMS = new TLatex(0.17,0.70,latexBuffer); + latex_RMS -> SetNDC(); + latex_RMS -> SetTextFont(42); + latex_RMS -> SetTextSize(0.05); + latex_RMS -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawAvgICVsPhiGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const Color_t& color, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + SetLabelAndTitle(g); + + g -> GetXaxis() -> SetRangeUser(0.,360.999); + if( isEB == true) g -> GetYaxis() -> SetRangeUser(0.975,1.025); + else g -> GetYaxis() -> SetRangeUser(0.900,1.100); + g -> GetYaxis() -> SetTitle("#LTIC#GT_{i#phi}"); + g -> GetXaxis() -> SetTitle("i#phi"); + g -> SetMarkerStyle(20); + g -> SetMarkerSize(0.5); + g -> SetMarkerColor(color); + g -> Draw("APL"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawAvgICVsPhiFoldGraph(TGraphErrors* g, TGraphErrors* g2, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + SetLabelAndTitle(g); + SetLabelAndTitle(g2); + + g -> GetYaxis() -> SetRangeUser(0.98,1.01999); + g -> GetXaxis() -> SetRangeUser(0.,21.); + g -> GetYaxis() -> SetTitle("#LTIC#GT_{i#phi}"); + g -> GetXaxis() -> SetTitle("i#phi%20"); + g -> SetMarkerStyle(20); + g -> SetMarkerSize(0.7); + g -> SetMarkerColor(kRed+2); + g -> SetLineColor(kRed+2); + g -> Draw("APL"); + + g2 -> SetMarkerStyle(20); + g2 -> SetMarkerSize(0.7); + g2 -> SetMarkerColor(kGreen+2); + g2 -> SetLineColor(kGreen+2); + g2 -> Draw("PL,same"); + + TLegend* leg = new TLegend(0.13,0.74,0.43,0.89); + leg -> SetFillColor(0); + leg -> AddEntry(g, "w/o crack corr.","P"); + leg -> AddEntry(g2,"w/ crack corr.", "P"); + leg -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawResidualGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c; + + SetLabelAndTitle(g); + + if( isEB == true ) + { + c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(0.,85.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.03); + g -> GetXaxis() -> SetTitle("|i#eta|"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + else + { + c = new TCanvas("c",fileName.c_str(),0,0,700,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(-1.,38.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.20); + g -> GetXaxis() -> SetTitle("iRing"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + + TLegend* leg = new TLegend(0.15,0.74,0.43,0.89); + leg -> SetFillColor(0); + leg -> SetTextFont(42); + leg -> SetTextSize(0.05); + leg -> AddEntry(g,"IC residual spread","P"); + + leg -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + + delete c; +} + + + +void SetLabelAndTitle(TGraphErrors* g) +{ + g -> GetXaxis() -> SetLabelSize(0.04); + g -> GetYaxis() -> SetLabelSize(0.04); + g -> GetXaxis() -> SetTitleSize(0.05); + g -> GetYaxis() -> SetTitleSize(0.05); + g -> GetXaxis() -> SetTitleOffset(1.20); + g -> GetYaxis() -> SetTitleOffset(1.20); +} + +void SetLabelAndTitle(TH1F* h) +{ + h -> GetXaxis() -> SetLabelSize(0.04); + h -> GetYaxis() -> SetLabelSize(0.04); + h -> GetXaxis() -> SetTitleSize(0.05); + h -> GetYaxis() -> SetTitleSize(0.05); + h -> GetXaxis() -> SetTitleOffset(1.20); + h -> GetYaxis() -> SetTitleOffset(1.20); +} + +void SetLabelAndTitle(TH2F* h2) +{ + h2 -> GetXaxis() -> SetLabelSize(0.04); + h2 -> GetYaxis() -> SetLabelSize(0.04); + h2 -> GetXaxis() -> SetTitleSize(0.05); + h2 -> GetYaxis() -> SetTitleSize(0.05); + h2 -> GetXaxis() -> SetTitleOffset(1.20); + h2 -> GetYaxis() -> SetTitleOffset(1.20); +} diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc new file mode 100644 index 00000000000..5d418535037 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc @@ -0,0 +1,974 @@ +//adapting it to ECALELF ntuple + +#include "../interface/FastCalibratorEB.h" +#include "../interface/GetHashedIndexEB.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +///==== Default constructor Contructor + +FastCalibratorEB::FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + + // if parameter tree is not specified (or zero), connect the file + // used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + } + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEB = typeEB; +} + +///==== deconstructor + +FastCalibratorEB::~FastCalibratorEB(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +///=== Acces to the entry information in the input tree or chain + +Int_t FastCalibratorEB::GetEntry(Long64_t entry){ + + if (!fChain) return 0; + return fChain->GetEntry(entry); +} + +///==== Load information of input Ntupla + +Long64_t FastCalibratorEB::LoadTree(Long64_t entry){ +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + + +//===== Fill Scalibration Map + +void FastCalibratorEB::FillScalibMap(TString miscalibMap){ + + std::ifstream scalibFile; + scalibFile.open(miscalibMap.Data()); + + if (!scalibFile) { + std::cout<<"miscalib map missing!!!"<> eta >> scalibValue; + scalibMap.insert(std::pair(eta,scalibValue)); + } + scalibFile.close(); +} + + +///==== Variables initialization + +void FastCalibratorEB::Init(TTree *tree){ + + /// Set object pointer + + energyRecHitSCEle1 = 0; + XRecHitSCEle1 = 0; //ETA + YRecHitSCEle1 = 0; //PHI + ZRecHitSCEle1 = 0; + recoFlagRecHitSCEle1 = 0; + + energyRecHitSCEle2 = 0; + XRecHitSCEle2 = 0; //ETA + YRecHitSCEle2 = 0; //PHI + ZRecHitSCEle2 = 0; + recoFlagRecHitSCEle2 = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + + fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); + fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); + fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); + fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); + fChain->SetBranchStatus("PtEle", 1); fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); + fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); + fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); + fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); + fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); + fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); + fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); + fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); + fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); + fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); + fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); + fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); + fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); + + // ele1 + fChain->SetBranchStatus("energyRecHitSCEle1", 1); fChain->SetBranchAddress("energyRecHitSCEle1", &energyRecHitSCEle1, &b_energyRecHitSCEle1); + fChain->SetBranchStatus("XRecHitSCEle1", 1); fChain->SetBranchAddress("XRecHitSCEle1", &XRecHitSCEle1, &b_XRecHitSCEle1); + fChain->SetBranchStatus("YRecHitSCEle1", 1); fChain->SetBranchAddress("YRecHitSCEle1", &YRecHitSCEle1, &b_YRecHitSCEle1); + fChain->SetBranchStatus("ZRecHitSCEle1", 1); fChain->SetBranchAddress("ZRecHitSCEle1", &ZRecHitSCEle1, &b_ZRecHitSCEle1); + fChain->SetBranchStatus("recoFlagRecHitSCEle1", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle1", &recoFlagRecHitSCEle1, &b_recoFlagRecHitSCEle1); + + // ele2 + fChain->SetBranchStatus("energyRecHitSCEle2", 1); fChain->SetBranchAddress("energyRecHitSCEle2", &energyRecHitSCEle2, &b_energyRecHitSCEle2); + fChain->SetBranchStatus("XRecHitSCEle2", 1); fChain->SetBranchAddress("XRecHitSCEle2", &XRecHitSCEle2, &b_XRecHitSCEle2); + fChain->SetBranchStatus("YRecHitSCEle2", 1); fChain->SetBranchAddress("YRecHitSCEle2", &YRecHitSCEle2, &b_YRecHitSCEle2); + fChain->SetBranchStatus("ZRecHitSCEle2", 1); fChain->SetBranchAddress("ZRecHitSCEle2", &ZRecHitSCEle2, &b_ZRecHitSCEle2); + fChain->SetBranchStatus("recoFlagRecHitSCEle2", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle2", &recoFlagRecHitSCEle2, &b_recoFlagRecHitSCEle2); + +} + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEB::bookHistos(int nLoops){ + + hC_IntercalibValues = new hChain ("IntercalibValues", "IntercalibValues", 2000,0.5,1.5, nLoops); + + hC_PullFromScalib = new hChain ("hC_PullFromScalib", "hC_PullFromScalib", 2000,-0.5,0.5, nLoops); + + hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); + + hC_scale_EB = new h2Chain("hC_scale_EB", "hC_scale_EB", 360,1, 361, 171, -85, 86, nLoops ); + + h_scalib_EB = new TH2F("h_scalib_EB", "h_scalib_EB", 360,1, 361, 171, -85, 86 ); + + h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); + + p_IntercalibValues_iEta = new TProfile ("p_IntercalibValues_iEta","p_IntercalibValues_iEta", 171, -85, 86, -0.1, 2.1); + + h_IntercalibSpread_iEta = new TH1F ("h_IntercalibSpread_iEta", "h_IntercalibSpread_iEta", 171, -85, 86); + + h_IntercalibValues_test = new TH1F ("h_IntercalibValues_test", "h_IntercalibValues_test", 400, -1, 1); + + h_scale_EB_hashedIndex = new TH1F("h_scale_EB_hashedIndex", "h_scale_EB_hashedIndex", 61201,-0.5,61999.5 ); + + h_Init_IntercalibValues = new TH1F("h_Init_IntercalibValues","h_Init_IntercalibValues",2000,0.5,1.5); + + h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); + + g_ICmeanVsLoop = new TGraphErrors(); + g_ICmeanVsLoop -> SetName("g_ICmeanVsLoop"); + g_ICmeanVsLoop -> SetTitle("g_ICmeanVsLoop"); + + g_ICrmsVsLoop = new TGraphErrors(); + g_ICrmsVsLoop -> SetName("g_ICrmsVsLoop"); + g_ICrmsVsLoop ->SetTitle("g_ICrmsVsLoop"); + + h_scale_EB = new TH2F("h_scale_EB", "h_scale_EB", 360,1, 361, 171, -85, 86 ); + + h_scale_EB_meanOnPhi = new TH2F("h_scale_EB_meanOnPhi", "h_scale_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); + + h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); + + return; +} + +//! Build E/p distribution for both ele1 and ele2 + +void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, + float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, bool isMCTruth){ + + if(iLoop ==0){ + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + else{ + hC_EoP_eta_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1->at(iRecHit) < 4 ) /// control if this recHit is good + { + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle1 -> at(iRecHit); ///! Seed search + } + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle1->at(iRecHit) < 4) ///! SC energy taking only good channels + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && recoFlagRecHitSCEle1->at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + } + + ///! Eta seed from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + ///! different E/p if I am using MCThruth informations or not + if(!isMCTruth) { + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + /// fbrem Selection + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; + + /// fbrem Selection + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + + /// Save electron E/p in a chain of histogramm each for eta bin + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + + } + ///=== Second medium electron from Z + + if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = energySCEle[1]/rawEnergySCEle[1]; /// FEta approximation + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2->at(iRecHit) < 4) + { + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle2 -> at(iRecHit); ///Seed informations + } + + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if (recoFlagRecHitSCEle2->at(iRecHit) < 4 ) /// SC Energy only for good channels + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2->at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + } + + + /// Eta seed info from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + /// MCTruth analysis option + if(!isMCTruth) { + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + ///R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection==true ) skipElectron = true; + + /// fbrem Selection + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; + + /// fbrem Selection + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + + /// Save E/p electron information + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + } + } + + /// Histogramm Normalization + for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++) hC_EoP_eta_ele->Normalize(ieta); + + /// Save E/p pdf if it is required + if(isSaveEPDistribution == true) { + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// Calibration Loop over the ntu events +void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection,bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, + bool isMCTruth, std::map > > jsonMap, float miscalibMethod, TString miscalibMap){ + if (fChain == 0) return; + + if(isMiscalib == true) { + std::cout<<"method used for the scalibration (1=from map, 0=linear): "< theScalibration(m_regions, 0.); + TRandom3 genRand; + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { + + bool isDeadXtal = false ; + + /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); + } + else{ + if(isMiscalib == true) { + if (miscalibMethod == 1) { //miscalibration with a gaussian spread (eta-dependent) + theScalibration[iIndex] = scalibMap.at(GetIetaFromHashedIndex(iIndex)); //take the values from the map filled before + } + else + theScalibration[iIndex] = 1 + 0.1*fabs(GetIetaFromHashedIndex(iIndex))/85.; //linear eta-dependent scalibration + + } + +// theScalibration[iIndex] = 1.+ 0.01*fabs(GetIetaFromHashedIndex(iIndex));// genRand.Gaus(1.,0.01); ///! 5% of Miscalibration fixed + if(isMiscalib == false) theScalibration[iIndex] = 1.; + h_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map + } + } + + /// ----------------- Calibration Loops -----------------------------// + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// prepare the numerator and denominator for each Xtal + + std::vector theNumerator(m_regions, 0.); + std::vector theDenominator(m_regions, 0.); + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + ///==== build E/p distribution ele 1 and 2 + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isfbrem,fbremMax,isPtCut,PtMin,isMCTruth); + + // define map with events + std::map >,int> eventsMap; + + /// Loop on each entry + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + //********************************* + // JSON FILE AND DUPLIACTES IN DATA + + bool skipEvent = false; + if( isMCTruth == 0 ) + { + if(AcceptEventByRunAndLumiSection(runNumber,lumiBlock,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiBlock,eventNumber); + std::pair > eventRUNandLSandID(runNumber,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + float pIn, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Tight electron information from W and Z, it depends on the flag variable isW, isZ + + if ( isEBEle[0] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = energySCEle[0]/rawEnergySCEle[0]; + + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0 ; + + bool skipElectron = false; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0 ) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if (recoFlagRecHitSCEle1->at(iRecHit) < 4) ///! SC Energy + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + if(theScalibration[thisIndex] == 0 && energyRecHitSCEle1 -> at(iRecHit)/energySCEle[0] >= 0.15 ) ///! not to introduce a bias in the Dead xtal study + skipElectron = true; + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1->at(iRecHit)<4){ + E_seed=energyRecHitSCEle1 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); //! Seed Infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && + recoFlagRecHitSCEle1->at(iRecHit) < 4 ) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + } + + + ///! if MCTruth Analysis + if(!isMCTruth) { + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])); + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// Take the correct pdf for the ring in order to reweight the events in L3 + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + + /// Basic selection on E/p or R9 if you want to apply + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron = true; + if( !skipElectron) { + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + if (recoFlagRecHitSCEle1->at(iRecHit) >= 4) continue ; + + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/pIn); /// factor use to reweight the evemts + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + + } + /// Use Half Statistic only even + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odd event + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + skipElectron = false; + + /// Ele2 medium from Z only Barrel + if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + FdiEta = energySCEle[1]/rawEnergySCEle[1]; + // Electron energy + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle2->at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + if(theScalibration[thisIndex] == 0 && energyRecHitSCEle2 -> at(iRecHit)/energySCEle[1] >= 0.15 ) ///! not to introduce a bias in the Dead xtal study + skipElectron = true; + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2->at(iRecHit) < 4){ + E_seed=energyRecHitSCEle2 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); /// Seed information + } + + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2->at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + + } + + ///! Option for MCTruth analysis + if(!isMCTruth){ + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])); + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// discard electrons with bad E/P or R9 + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + + if( !skipElectron ){ + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + if (recoFlagRecHitSCEle2->at(iRecHit) >= 4) continue ; + + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + // std::cout<<"DEBUG: "<at(iRecHit)<<" "<at(iRecHit)<<" "<at(iRecHit)< 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use evens + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odds + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*(thisIC/thisE)*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + + } + + } + ///! End Cycle on the events + + ///New Loop cycle + Save info + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC("auxiliary_IC","auxiliary_IC",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < 61200; iIndex++ ){ + + if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ + + float thisIntercalibConstant = 1.; + /// Solve the cases where the recHit energy is always 0 (dead Xtal?) + bool isDeadXtal = false ; + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) continue; + + + if ( theDenominator[iIndex] != 0. ) thisIntercalibConstant = theNumerator[iIndex]/theDenominator[iIndex]; + float oldIntercalibConstant = 1.; + if ( iLoop > 0 ) oldIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (iIndex+1); + + h_scale_EB_hashedIndex -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); /// IC product useful for L3 methods + hC_IntercalibValues -> Fill(iLoop, thisIntercalibConstant); /// IC distribution at each loop + hC_PullFromScalib -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); ///IC Map + + ///Save the new IC coefficient + auxiliary_IC.Fill(thisIntercalibConstant); + + } + + } + /// Info in order to test convergence + g_ICmeanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetMean()); + g_ICmeanVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetMeanError()); + + g_ICrmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetRMS()); + g_ICrmsVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetRMSError()); + }/// end calibration loop + + + int myPhiIndex = 0; + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + ///Setup the histo for fit + TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",400, 0.2, 1.9); + TF1 f1("f1","gaus",0.2,1.9); + + int totIphi = 0; + float meanICforPhiRing = 0.; + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + float thisIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); + // std::cout< GetBinContent(thisHashedIndex+1)< Fill(iphi, iabseta*theZside, thisIntercalibConstant); ///Fill with Last IC Value + + if (GetIetaFromHashedIndex(thisHashedIndex) == 85) h_IntercalibValues_test -> Fill (thisIntercalibConstant); + + p_IntercalibValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisIntercalibConstant); + + histoAuxiliary . Fill (thisIntercalibConstant); + + + ///Vectors + IetaValues.push_back(iabseta*theZside); + IphiValues.push_back(iphi); + ICValues.push_back(thisIntercalibConstant); + + meanICforPhiRing += thisIntercalibConstant; + totIphi++; + + } + + for ( int uu = 0; uu < totIphi; uu++ ) + meanICforPhiRingValues.push_back(meanICforPhiRing/totIphi); + /// Note this info are not used furhter because channels near to the dead ones are not skipped + + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + + h_scale_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, ICValues.at(myPhiIndex)/meanICforPhiRingValues.at(myPhiIndex)); + myPhiIndex++; /// Normalization IC with the mean of each ring + + } + f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); + f1.SetRange(1-5*histoAuxiliary.GetRMS(), 1+5*histoAuxiliary.GetRMS()); + histoAuxiliary . Fit("f1","QR+"); + + if ( f1.GetParError(2) > 0.5 ) continue; + h_IntercalibSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); + h_IntercalibSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); + + } + + } + +} +/// Save infos in the output +void FastCalibratorEB::saveHistos(TFile * f1){ + + f1->cd(); + hC_IntercalibValues -> Write(*f1); + hC_PullFromScalib -> Write(*f1); + hC_EoP -> Write(*f1); + hC_scale_EB -> Write("",*f1); + h_scalib_EB -> Write(); + + h_IntercalibValues_test -> Write(); + h_Occupancy_hashedIndex -> Write(); + p_IntercalibValues_iEta -> Write(); + h_Init_IntercalibValues -> Write(); + + h_IntercalibSpread_iEta -> Write(); + h_scale_EB -> Write(); + h_scale_EB_meanOnPhi -> Write("h_scale_map"); + h_scale_EB_hashedIndex -> Write(); + + h_occupancy -> Write(); + + g_ICmeanVsLoop -> Write(); + g_ICrmsVsLoop -> Write(); + + h_map_Dead_Channels -> Write() ; + + f1->Close(); + + return; +} +/// Save E/0 distribution +void FastCalibratorEB::saveEoPeta(TFile * f2){ + f2->cd(); + hC_EoP_eta_ele ->Write(*f2); + f2->Close(); +} + +///! Acquire fake dead channel list on order to evaluate the effected of IC near to them +void FastCalibratorEB::AcquireDeadXtal(TString inputDeadXtal, const bool & isDeadTriggerTower){ + + if(inputDeadXtal!="NULL"){ + + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iEta, iPhi ; + + while(!DeadXtal.eof()){ + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iEta >> iPhi ; + + if(iEta >=0){ + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; + if(isDeadTriggerTower) { + for(int iphi = -2 ; iphi <= 2 ; iphi ++){ + for(int ieta = -2 ; ieta <=2 ; ieta ++){ + if(iphi==0 && ieta==0) continue ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta+ieta,iPhi+iphi,1)) ; + } + } + } + } + + else{ + + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; + if(isDeadTriggerTower) { + for(int iphi = -2 ; iphi <= 2 ; iphi ++){ + for(int ieta = -2 ; ieta <=2 ; ieta ++){ + if(iphi==0 && ieta==0) continue ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta+ieta,iPhi+iphi,-1)) ; + } + } + } + } + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + + else DeadXtal_HashedIndex.push_back(-9999); + +} + +///! Check if the channel is dead or not +bool FastCalibratorEB::CheckDeadXtal(const int & iEta, const int & iPhi){ + int hashed_Index; + if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); + else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc new file mode 100644 index 00000000000..b1949705b59 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc @@ -0,0 +1,1048 @@ +#include "../interface/FastCalibratorEB_MVA.h" +#include "../interface/GetHashedIndexEB.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +///==== Default constructor Contructor + +FastCalibratorEB_MVA::FastCalibratorEB_MVA(TTree *tree,TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + +// if parameter tree is not specified (or zero), connect the file +// used to generate this class and read the Tree. + if (tree == 0) {TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject ("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + if (!f) f = new TFile("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + + tree = (TTree*)gDirectory->Get("ntu"); + } + Init(tree); +} + +///==== deconstructor + +FastCalibratorEB_MVA::~FastCalibratorEB_MVA(){ + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +///=== Acces to the entry information in the input tree or chain + +Int_t FastCalibratorEB_MVA::GetEntry(Long64_t entry){ + if (!fChain) return 0; + return fChain->GetEntry(entry); + +} + +///==== Load information of input Ntupla + +Long64_t FastCalibratorEB_MVA::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + Notify(); + } + return centry; +} + +///==== Variables initialization + +void FastCalibratorEB_MVA::Init(TTree *tree){ + + /// Set object pointer + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix = 0; + ele1_recHit_flag = 0; + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_flag = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchAddress("BDTG_weightEB_W_1", &BDTG_weightEB_W_1, &b_BDTG_weightEB_W_1); + fChain->SetBranchAddress("BDTG_weightEB_W_2", &BDTG_weightEB_W_2, &b_BDTG_weightEB_W_2); +// fChain->SetBranchAddress("BDTG_weightEB_Z_1", &BDTG_weightEB_Z_1, &b_BDTG_weightEB_Z_1); +// fChain->SetBranchAddress("BDTG_weightEB_Z_2", &BDTG_weightEB_Z_2, &b_BDTG_weightEB_Z_2); + + fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex, &b_ele1_recHit_hashedIndex); + fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); + fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + +// fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); +// fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); +// fChain->SetBranchAddress("ele1_DR", &ele1_DR, &b_ele1_DR); +// fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + + fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); + + + fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); + fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); + +// fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); +// fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); +// fChain->SetBranchAddress("ele2_DR", &ele2_DR, &b_ele2_DR); +// fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + + fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchAddress("ele2_scEta", &ele2_scEta, &b_ele2_scEta); + + fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); + fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); + + fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); + fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + + Notify(); +} + +Bool_t FastCalibratorEB_MVA::Notify(){ + // The Notify() function is called when a new file is opened. This + // can be either for a new TTree in a TChain or when when a new TTree + // is started when using PROOF. It is normally not necessary to make changes + // to the generated code, but the routine can be extended by the + // user if needed. The return value is currently not used. + + return kTRUE; +} + +void FastCalibratorEB_MVA::Show(Long64_t entry){ +// Print contents of entry. +// If entry is not specified, print current entry + if (!fChain) return; + fChain->Show(entry); +} + +Int_t FastCalibratorEB_MVA::Cut(Long64_t entry){ +// This function may be called from Loop. +// returns 1 if entry is accepted. +// returns -1 otherwise. + return 1; +} + + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEB_MVA::bookHistos(int nLoops){ + + hC_IntercalibValues = new hChain ("IntercalibValues", "IntercalibValues", 2000,0.5,1.5, nLoops); + + hC_PullFromScalib = new hChain ("hC_PullFromScalib", "hC_PullFromScalib", 2000,-0.5,0.5, nLoops); + + hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); + + hC_scale_EB = new h2Chain("hC_scale_EB", "hC_scale_EB", 360,1, 361, 171, -85, 86, nLoops ); + + h_scalib_EB = new TH2F("h_scalib_EB", "h_scalib_EB", 360,1, 361, 171, -85, 86 ); + + h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); + + p_IntercalibValues_iEta = new TProfile ("p_IntercalibValues_iEta","p_IntercalibValues_iEta", 171, -85, 86, -0.1, 2.1); + + h_IntercalibSpread_iEta = new TH1F ("h_IntercalibSpread_iEta", "h_IntercalibSpread_iEta", 171, -85, 86); + + h_IntercalibValues_test = new TH1F ("h_IntercalibValues_test", "h_IntercalibValues_test", 400, -1, 1); + + h_scale_EB_hashedIndex = new TH1F("h_scale_EB_hashedIndex", "h_scale_EB_hashedIndex", 61201,-0.5,61999.5 ); + + h_Init_IntercalibValues = new TH1F("h_Init_IntercalibValues","h_Init_IntercalibValues",2000,0.5,1.5); + + h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); + + h_WeigthEB_W_1 = new TH1F ("h_WeigthEB_W_1","h_WeigthEB_W_1",500,0.,1.5); + h_WeigthEB_W_2 = new TH1F ("h_WeigthEB_W_2","h_WeigthEB_W_2",500,0.,1.5); + + g_ICmeanVsLoop = new TGraphErrors(); + g_ICmeanVsLoop -> SetName("g_ICmeanVsLoop"); + g_ICmeanVsLoop -> SetTitle("g_ICmeanVsLoop"); + + g_ICrmsVsLoop = new TGraphErrors(); + g_ICrmsVsLoop -> SetName("g_ICrmsVsLoop"); + g_ICrmsVsLoop ->SetTitle("g_ICrmsVsLoop"); + + h_scale_EB = new TH2F("h_scale_EB", "h_scale_EB", 360,1, 361, 171, -85, 86 ); + + h_scale_EB_meanOnPhi = new TH2F("h_scale_EB_meanOnPhi", "h_scale_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); + + h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); + + return; +} + +//! Build weight distribution for TMVA correction +void FastCalibratorEB_MVA::BuildWeightDistribution_ele(int iLoop, int nentries , int useW, int useZ,std::vector theScalibration,bool isR9selection){ + +if(iLoop ==0){ + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building Weight distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag->at(iRecHit) < 4*/ ) /// control if this recHit is good + { + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + } + + // if(ele1_recHit_flag->at(iRecHit) < 4) ///! SC energy taking only good channels + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 + /*&& ele1_recHit_flag->at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + bool skipElectron = false; + + + /// R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; + + + if(!skipElectron){ h_WeigthEB_W_1->Fill(BDTG_weightEB_W_1); + h_WeigthEB_W_2->Fill(BDTG_weightEB_W_2); + } + } + } + } + else return; + +} + + + + +//! Build E/p distribution for both ele1 and ele2 + +void FastCalibratorEB_MVA::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration,bool isSaveEPDistribution,bool isR9selection, bool isMCTruth){ + + if(iLoop ==0) { + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + else{ + hC_EoP_eta_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& + ele1_recHit_flag->at(iRecHit) < 4*/ + ) /// control if this recHit is good + { + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + + } + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + // if(ele1_recHit_flag->at(iRecHit) < 4) ///! SC energy taking only good channels + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 + //&& ele1_recHit_flag->at(iRecHit) < 4 + ) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + ///! Eta seed from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + ///! different E/p if I am using MCThruth informations or not + if(!isMCTruth) pIn = ele1_tkP; + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; + + /// Save electron E/p in a chain of histogramm each for eta bin + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + + } + ///=== Second medium electron from Z + + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/ele2_scERaw; /// FEta approximation + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag->at(iRecHit) < 4*/){ + + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); ///Seed informations + + } + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + // if (ele2_recHit_flag->at(iRecHit) < 4 ) /// SC Energy only for good channels + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag->at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + /// Eta seed info from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + + bool skipElectron = false; + + /// MCTruth analysis option + + if(!isMCTruth) pIn = ele2_tkP; + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + ///R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.35 && fabs(ele2_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.7 && fabs(ele2_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>1.05) skipElectron = true; + /// Save E/p electron information + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + } + + + } + + /// Histogramm Normalization + for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++) hC_EoP_eta_ele->Normalize(ieta); + + /// Save E/p pdf if it is required + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL"){ + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// Calibration Loop over the ntu events + +void FastCalibratorEB_MVA::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution,bool isEPselection,bool isR9selection, bool isMCTruth) +{ + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = 0; + + + /// Define useful numbers + static const int MIN_IETA = 1; + static const int MIN_IPHI = 1; + static const int MAX_IETA = 85; + static const int MAX_IPHI = 360; + + for ( int iabseta = MIN_IETA; iabseta <= MAX_IETA; iabseta++ ){ + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + m_regions++; + + } + } + } + + /// Barrel region = Barrel xtal + std::cout << "m_regions " << m_regions << std::endl; + + /// Build the scalibration Map for MC Analysis + + std::vector theScalibration(m_regions, 0.); + TRandom3 genRand; + + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { + + bool isDeadXtal = false ; + + /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); + } + else{ + + if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); ///! 5% of Miscalibration fixed + if(isMiscalib == false) theScalibration[iIndex] = 1.; + h_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map + } + } + + /// ----------------- Calibration Loops -----------------------------// + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// prepare the numerator and denominator for each Xtal + + std::vector theNumerator(m_regions, 0.); + std::vector theDenominator(m_regions, 0.); + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + + /// === Build Weight Distribution + + BuildWeightDistribution_ele(iLoop,nentries,useW,useZ,theScalibration,isR9selection); + + ///==== build E/p distribution ele 1 and 2 + + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,isMCTruth); + + + Long64_t nbytes = 0, nb = 0; + + /// Loop on each entry + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + float pIn, pSub, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Tight electron information from W and Z, it depends on the flag variable isW, isZ + + if ( ele1_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/ele1_scERaw; + + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0 ; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0 ) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + //if (ele1_recHit_flag->at(iRecHit) < 4) ///! SC Energy + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag->at(iRecHit)<4*/) + { + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); //! Seed Infos + } + + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag->at(iRecHit) < 4 */) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + pSub = 0.; //NOTALEO : test dummy + bool skipElectron = false; + + ///! if MCTruth Analysis + if(!isMCTruth) + { + pIn = ele1_tkP; + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// Take the correct pdf for the ring in order to reweight the events in L3 + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// Basic selection on E/p or R9 if you want to apply + if ( fabs(thisE/pIn - 1) > 0.3 && isEPselection==true) skipElectron = true; + + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; + + if ( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if ( !skipElectron && BDTG_weightEB_W_1!=-99. && BDTG_weightEB_W_2!=-99. ) { + + double Maximum_h_WeigthEB_W_1 = h_WeigthEB_W_1->GetBinCenter(h_WeigthEB_W_1->GetMaximumBin()); + double Maximum_h_WeigthEB_W_2 = h_WeigthEB_W_2->GetBinCenter(h_WeigthEB_W_2->GetMaximumBin()); + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + // if (ele1_recHit_flag->at(iRecHit) >= 4) continue ; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)* + exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + } + /// Use Half Statistic only even + else if ( splitStat == 1 && jentry%2 == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + + /// use odd event + else if ( splitStat == -1 && jentry%2 != 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + + } + + } + + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + skipElectron = false; + + /// Ele2 medium from Z only Barrel + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + FdiEta = ele2_scE/ele2_scERaw; + // Electron energy + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + //if(ele2_recHit_flag->at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag->at(iRecHit) < 4*/){ + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); /// Seed information + + } + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag->at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + pSub = 0.; //NOTALEO : test dummy + + ///! Option for MCTruth analysis + if(!isMCTruth) pIn = ele2_tkP; + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// discard electrons with bad E/P or R9 + if ( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if ( fabs(thisE/pIn - 1) > 0.3 && isEPselection==true) skipElectron = true; + ///R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.35 && fabs(ele2_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.7 && fabs(ele2_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>1.05) skipElectron = true; + + if ( !skipElectron && BDTG_weightEB_W_1!=-99. && BDTG_weightEB_W_2!=-99. ) { + + double Maximum_h_WeigthEB_W_1 = h_WeigthEB_W_1->GetBinCenter(h_WeigthEB_W_1->GetMaximumBin()); + double Maximum_h_WeigthEB_W_2 = h_WeigthEB_W_2->GetBinCenter(h_WeigthEB_W_2->GetMaximumBin()); + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + // if (ele2_recHit_flag->at(iRecHit) >= 4) continue ; + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + /// use evens + else if ( splitStat == 1 && jentry%2 == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + } + + /// use odds + else if ( splitStat == -1 && jentry%2 != 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*(thisIC/thisE)*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + + } + + } + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + } + ///! End Cycle on the events + + ///New Loop cycle + Save info + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC("auxiliary_IC","auxiliary_IC",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < 61200; iIndex++ ){ + + if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ + + float thisIntercalibConstant = 1.; + /// Solve the cases where the recHit energy is always 0 (dead Xtal?) + bool isDeadXtal = false ; + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) continue; + + + if ( theDenominator[iIndex] != 0. ) thisIntercalibConstant = theNumerator[iIndex]/theDenominator[iIndex]; + float oldIntercalibConstant = 1.; + if ( iLoop > 0 ) oldIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (iIndex+1); + + h_scale_EB_hashedIndex -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); /// IC product useful for L3 methods + hC_IntercalibValues -> Fill(iLoop, thisIntercalibConstant); /// IC distribution at each loop + hC_PullFromScalib -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); ///IC Map + + ///Save the new IC coefficient + auxiliary_IC.Fill(thisIntercalibConstant); + + } + + } + /// Info in order to test convergence + g_ICmeanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetMean()); + g_ICmeanVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetMeanError()); + + g_ICrmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetRMS()); + g_ICrmsVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetRMSError()); + }/// end calibration loop + + + int myPhiIndex = 0; + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + ///Setup the histo for fit + TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",400, 0.2, 1.9); + TF1 f1("f1","gaus",0.2,1.9); + + int totIphi = 0; + float meanICforPhiRing = 0.; + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + float thisIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); + h_scale_EB -> Fill(iphi, iabseta*theZside, thisIntercalibConstant); ///Fill with Last IC Value + + if (GetIetaFromHashedIndex(thisHashedIndex) == 85) h_IntercalibValues_test -> Fill (thisIntercalibConstant); + p_IntercalibValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisIntercalibConstant); + + histoAuxiliary . Fill (thisIntercalibConstant); + + ///Vectors + IetaValues.push_back(iabseta*theZside); + IphiValues.push_back(iphi); + ICValues.push_back(thisIntercalibConstant); + + meanICforPhiRing += thisIntercalibConstant; + totIphi++; + + } + + for ( int uu = 0; uu < totIphi; uu++ ) meanICforPhiRingValues.push_back(meanICforPhiRing/totIphi); + + /// Note this info are not used furhter because channels near to the dead ones are not skipped + + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + + h_scale_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, ICValues.at(myPhiIndex)/meanICforPhiRingValues.at(myPhiIndex)); + myPhiIndex++; /// Normalization IC with the mean of each ring + + } + + f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); + f1.SetRange(1-5*histoAuxiliary.GetRMS(), 1+5*histoAuxiliary.GetRMS()); + histoAuxiliary . Fit("f1","QR"); + + if ( f1.GetParError(2) > 0.5 ) continue; + h_IntercalibSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); + h_IntercalibSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); + + } + + } +} +/// Save infos in the output +void FastCalibratorEB_MVA::saveHistos(TFile * f1){ + + f1->cd(); + hC_IntercalibValues -> Write(*f1); + hC_PullFromScalib -> Write(*f1); + hC_EoP -> Write(*f1); + hC_scale_EB -> Write("",*f1); + h_scalib_EB -> Write(); + + h_IntercalibValues_test -> Write(); + h_Occupancy_hashedIndex -> Write(); + p_IntercalibValues_iEta -> Write(); + h_Init_IntercalibValues -> Write(); + + h_IntercalibSpread_iEta -> Write(); + h_scale_EB -> Write(); + h_scale_EB_meanOnPhi -> Write("h_scale_map"); + h_scale_EB_hashedIndex -> Write(); + + h_occupancy -> Write(); + + g_ICmeanVsLoop -> Write(); + g_ICrmsVsLoop -> Write(); + + h_map_Dead_Channels -> Write() ; + + + f1->Close(); + + return; +} + +/// Save E/P distribution +void FastCalibratorEB_MVA::saveEoPeta(TFile * f2){ + f2->cd(); + hC_EoP_eta_ele ->Write(*f2); + f2->Close(); +} + +///! Acquire fake dead channel list on order to evaluate the effected of IC near to them +void FastCalibratorEB_MVA::AcquireDeadXtal(TString inputDeadXtal){ + + if(inputDeadXtal!="NULL"){ + + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iEta, iPhi ; + + while(!DeadXtal.eof()){ + + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iEta >> iPhi ; + + if(iEta >=0) DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; + else DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; + + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else DeadXtal_HashedIndex.push_back(-9999); + +} + +///! Check if the channel is dead or not +bool FastCalibratorEB_MVA::CheckDeadXtal(const int & iEta, const int & iPhi){ + int hashed_Index; + if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); + else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc new file mode 100644 index 00000000000..e17fbc58663 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc @@ -0,0 +1,1085 @@ +#include "../interface/FastCalibratorEE.h" +#include "../interface/GetHashedIndexEE.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/// Default constructor +FastCalibratorEE::FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + +// if parameter tree is not specified (or zero), connect the file +// used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + + } + + // endcap geometry + eRings = new TEndcapRings(); + + /// Vector for ring normalization IC + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEE = typeEE; +} + +/// Deconstructor + +FastCalibratorEE::~FastCalibratorEE(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +/// Get Entry Method +Int_t FastCalibratorEE::GetEntry(Long64_t entry){ +// Read contents of entry. + if (!fChain) return 0; + return fChain->GetEntry(entry); +} + +/// Load Tree infos in a chain +Long64_t FastCalibratorEE::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + +///Fill the miscalib map +void FastCalibratorEE::FillScalibMap(TString miscalibMap){ + + std::ifstream scalibFile; + scalibFile.open(miscalibMap.Data()); + + if (!scalibFile) { + std::cout<<"miscalib map missing!!!"<> etaRing >> scalibValue; + scalibMap.insert(std::pair(etaRing,scalibValue)); + } + scalibFile.close(); +} + + +/// Intialize pointers +void FastCalibratorEE::Init(TTree *tree){ + + /// Set object pointer + + energyRecHitSCEle1 = 0; + XRecHitSCEle1 = 0; + YRecHitSCEle1 = 0; + ZRecHitSCEle1 = 0; + recoFlagRecHitSCEle1 = 0; + + energyRecHitSCEle2 = 0; + XRecHitSCEle2 = 0; + YRecHitSCEle2 = 0; + ZRecHitSCEle2 = 0; + recoFlagRecHitSCEle2 = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + + fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); + fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); + fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); + fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); + fChain->SetBranchStatus("PtEle", 1); fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); + fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); + fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); + fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); + fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); + fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); + fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); + fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); + fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); + fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); + fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); + fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); + fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); + + // ele1 + fChain->SetBranchStatus("energyRecHitSCEle1", 1); fChain->SetBranchAddress("energyRecHitSCEle1", &energyRecHitSCEle1, &b_energyRecHitSCEle1); + fChain->SetBranchStatus("XRecHitSCEle1", 1); fChain->SetBranchAddress("XRecHitSCEle1", &XRecHitSCEle1, &b_XRecHitSCEle1); + fChain->SetBranchStatus("YRecHitSCEle1", 1); fChain->SetBranchAddress("YRecHitSCEle1", &YRecHitSCEle1, &b_YRecHitSCEle1); + fChain->SetBranchStatus("ZRecHitSCEle1", 1); fChain->SetBranchAddress("ZRecHitSCEle1", &ZRecHitSCEle1, &b_ZRecHitSCEle1); + fChain->SetBranchStatus("recoFlagRecHitSCEle1", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle1", &recoFlagRecHitSCEle1, &b_recoFlagRecHitSCEle1); + + // ele2 + fChain->SetBranchStatus("energyRecHitSCEle2", 1); fChain->SetBranchAddress("energyRecHitSCEle2", &energyRecHitSCEle2, &b_energyRecHitSCEle2); + fChain->SetBranchStatus("XRecHitSCEle2", 1); fChain->SetBranchAddress("XRecHitSCEle2", &XRecHitSCEle2, &b_XRecHitSCEle2); + fChain->SetBranchStatus("YRecHitSCEle2", 1); fChain->SetBranchAddress("YRecHitSCEle2", &YRecHitSCEle2, &b_YRecHitSCEle2); + fChain->SetBranchStatus("ZRecHitSCEle2", 1); fChain->SetBranchAddress("ZRecHitSCEle2", &ZRecHitSCEle2, &b_ZRecHitSCEle2); + fChain->SetBranchStatus("recoFlagRecHitSCEle2", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle2", &recoFlagRecHitSCEle2, &b_recoFlagRecHitSCEle2); + +} + + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEE::bookHistos(int nLoops){ + + ///service histos + h_scale_hashedIndex_EE = new TH1F ("h_scale_hashedIndex_EE","h_scale_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); + + ///EE+ + + hC_IntercalibValues_EEP = new hChain ("IntercalibValues_EEP", "IntercalibValues_EEP", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEP = new hChain ("hC_PullFromScalib_EEP", "hC_PullFromScalib_EEP", 2000,-0.5,0.5, nLoops); + hC_scale_EEP = new h2Chain("hC_scale_EEP", "hC_scale_EEP", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEP = new TH2F("h_scale_EEP", "h_scale_EEP", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); + h_scalib_EEP = new TH2F("h_scalib_EEP", "h_scalib_EEP", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); + h_scale_meanOnring_EEP = new TH2F ("h_scale_meanOnring_EEP", "h_scale_meanOnring_EEP", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEP = new TGraphErrors(); + g_ICmeanVsLoop_EEP -> SetName("g_ICmeanVsLoop_EEP"); + g_ICmeanVsLoop_EEP -> SetTitle("g_ICmeanVsLoop_EEP"); + + g_ICrmsVsLoop_EEP = new TGraphErrors(); + g_ICrmsVsLoop_EEP -> SetName("g_ICrmsVsLoop_EEP"); + g_ICrmsVsLoop_EEP -> SetTitle("g_ICrmsVsLoop_EEP"); + + + + ///EE- + hC_IntercalibValues_EEM = new hChain ("IntercalibValues_EEM", "IntercalibValues_EEM", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEM = new hChain ("hC_PullFromScalib_EEM", "hC_PullFromScalib_EEM", 2000,-0.5,0.5, nLoops); + hC_scale_EEM = new h2Chain("hC_scale_EEM", "hC_scale_EEM", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEM = new TH2F("h_scale_EEM", "h_scale_EEM", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); + h_scalib_EEM = new TH2F("h_scalib_EEM", "h_scalib_EEM", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); + h_scale_meanOnring_EEM = new TH2F ("h_scale_meanOnring_EEM", "h_scale_meanOnring_EEM", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEM = new TGraphErrors(); + g_ICmeanVsLoop_EEM -> SetName("g_ICmeanVsLoop_EEM"); + g_ICmeanVsLoop_EEM -> SetTitle("g_ICmeanVsLoop_EEM"); + + g_ICrmsVsLoop_EEM = new TGraphErrors(); + g_ICrmsVsLoop_EEM -> SetName("g_ICrmsVsLoop_EEM"); + g_ICrmsVsLoop_EEM -> SetTitle("g_ICrmsVsLoop_EEM"); + + + return; +} + + + +///===== Build E/p for electron 1 and 2 + +void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, bool isMCTruth){ + + if(iLoop ==0){ + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + else{ + hC_EoP_ir_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + + Long64_t nbytes = 0, nb = 0; + /// Loop on ntu entries + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + // std::cerr<<"building E/p distribution ----> "< "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1 -> at(iRecHit) < 4 ){ + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle1 -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + //if(recoFlagRecHitSCEle1 -> at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; /// SC energy + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && + recoFlagRecHitSCEle1 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + + /// Option for MCTruth analysis + if(!isMCTruth){ + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9, fbrem selection before E/p distribution + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[0]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[0]) > 1.75 && fabs(etaSCEle[0]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[0]) > 2.00 && fabs(etaSCEle[0]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[0]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron =true; + + // std::cout< Fill(ir_seed,thisE/(pIn-esEnergySCEle[0])); + } + + ///=== Second medium electron from Z only Endcaps + if ( isEBEle[1] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2 -> at(iRecHit) < 4 ){ + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle2 -> at(iRecHit); + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle2 -> at(iRecHit) < 4) /// Only Good channels + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + } + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + } + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + /// Option for MCTruth Analysis + if(!isMCTruth){ + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[1]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[1]) > 1.75 && fabs(etaSCEle[1]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[1]) > 2.00 && fabs(etaSCEle[1]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[1]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron =true; + + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-esEnergySCEle[1])); + } + + + } + + /// Normalization E/p distribution + for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); + + /// Save E/p distributions + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// L3 Loop method ----> Calibration Loop function +void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection, bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, + bool isMCTruth, std::map > > jsonMap, float miscalibMethod, TString miscalibMap){ + + if (fChain == 0) return; + + if(isMiscalib == true) { + std::cout<<"method used for the scalibration (1=from map, 0=linear): "< theScalibration(m_regions*2, 0.); + TRandom3 genRand; + for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ + + bool isDeadXtal = false ; + /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + + if(GetZsideFromHashedIndex(iIndex)>0) + h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + } + else{ + if(isMiscalib == true) { + int etaRing = eRings->GetEndcapRing(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if (miscalibMethod == 1) { //miscalibration with a gaussian spread (eta-dependent) + theScalibration[iIndex] = scalibMap.at(etaRing); //take the values from the map filled before + } + else + theScalibration[iIndex] = 1 + 0.015*etaRing/33.; //linear eta-dependent scalibration + // theScalibration[iIndex] = genRand.Gaus(1.,0.001); + } + + // if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); /// Miscalibration fixed at 5% + if(isMiscalib == false) theScalibration[iIndex] = 1.; + if(GetZsideFromHashedIndex(iIndex)>0) + h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- + else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); + + } + } + + + /// ----------------- Calibration Loops -----------------------------// + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + /// L3 numerator and denominator for EE+ and EE- + std::vector theNumerator_EEP(m_regions*2+1, 0.); + std::vector theDenominator_EEP(m_regions*2+1, 0.); + std::vector theNumerator_EEM(m_regions+1, 0.); + std::vector theDenominator_EEM(m_regions+1, 0.); + + ///==== build E/p distribution ele 1 and 2 + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isfbrem,fbremMax,isPtCut,PtMin,isMCTruth); + + // define map with events + std::map >,int> eventsMap; + + /// Loop over events + std::cout << "Number of analyzed events = " << nentries << std::endl; + + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + + //********************************* + // JSON FILE AND DUPLIACTES IN DATA + + bool skipEvent = false; + if( isMCTruth == 0 ){ + + if(AcceptEventByRunAndLumiSection(runNumber,lumiBlock,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiBlock,eventNumber); + std::pair > eventRUNandLSandID(runNumber,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + float pIn, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Only tight electron from W and Z, only Endcap + + if ( isEBEle[0] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = energySCEle[0]/(rawEnergySCEle[0]+esEnergySCEle[0]); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0 ; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle1 -> at(iRecHit) < 4) /// Skip bad channel + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1 -> at(iRecHit) < 4 ){ + E_seed=energyRecHitSCEle1 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); /// Seed infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && + recoFlagRecHitSCEle1 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(GetHashedIndexEE(XRecHitSCEle1->at(iseed), YRecHitSCEle1->at(iseed), ZRecHitSCEle1->at(iseed))) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// MCTruth option + if(!isMCTruth) { + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); + + if ( fabs(thisE/(pAtVtxGsfEle[0]-esEnergySCEle[0]) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[0]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[0]) > 1.75 && fabs(etaSCEle[0]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[0]) > 2.00 && fabs(etaSCEle[0]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[0]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron =true; + + if( thisE/(pIn-esEnergySCEle[0]) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-esEnergySCEle[0]) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ){ + for( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++){ + if(recoFlagRecHitSCEle1 -> at(iRecHit) >= 4) continue; + + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + float thisIC = 1.; + + if( iLoop > 0 ) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + ///Use full statistic + if( splitStat == 0 ){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ){ + if( thisCaliBlock == 0 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + ///Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-esEnergySCEle[0])); + } + + skipElectron = false; + + + /// Medium ele from Z only Endcap + if( isEBEle[1] == 0 && ( useZ == 1 && isZ == 1 ) ){ + /// SCL energy containment correction + FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for(unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ){ + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if( recoFlagRecHitSCEle2 -> at(iRecHit) < 4 ) + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2 -> at(iRecHit) < 4){ + E_seed=energyRecHitSCEle2 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + } + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) + { + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(GetHashedIndexEE(XRecHitSCEle2->at(iseed), YRecHitSCEle2->at(iseed), ZRecHitSCEle2->at(iseed))) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// Option for MCTruth Analysis + if(!isMCTruth) { + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; + if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele + } + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure + + /// E/p and R9 selections + if ( fabs(thisE/(pIn-esEnergySCEle[1]) - 1) > 0.7 && isEPselection==true) skipElectron = true; + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[1]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[1]) > 1.75 && fabs(etaSCEle[1]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[1]) > 2.00 && fabs(etaSCEle[1]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[1]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron =true; + + + if( thisE/(pIn-esEnergySCEle[1]) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-esEnergySCEle[1]) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ){ + for( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ){ + if(recoFlagRecHitSCEle2 -> at(iRecHit) >= 4) continue; + + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + float thisIC = 1.; + + if(iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + /// Use full statistic + if( splitStat == 0){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ){ + if( thisCaliBlock == 0 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin);} + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + //Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-esEnergySCEle[1])); + } + } /// End Cycle on the events + + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC_EEM("auxiliary_IC_EEM","auxiliary_IC_EEM",50,0.2,1.9); + TH1F auxiliary_IC_EEP("auxiliary_IC_EEP","auxiliary_IC_EEP",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + int thisCaliBlock = -1; + if( GetZsideFromHashedIndex(iIndex) < 0 ) thisCaliBlock = 0; + else thisCaliBlock = 1; + + float thisIntercalibConstant = 1.; + + if( thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0. ) thisIntercalibConstant = theNumerator_EEM[iIndex] / theDenominator_EEM[iIndex]; + if( thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0. ) thisIntercalibConstant = theNumerator_EEP[iIndex] / theDenominator_EEP[iIndex]; + + float oldIntercalibConstant = 1.; + if( iLoop > 0 ) oldIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + h_scale_hashedIndex_EE -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); + + if( thisCaliBlock == 0 ){ + hC_IntercalibValues_EEM -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEM -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEM -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEM.Fill(thisIntercalibConstant); + } + if( thisCaliBlock == 1){ + hC_IntercalibValues_EEP -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEP -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEP.Fill(thisIntercalibConstant); + } + } + } + + g_ICmeanVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM.GetMean()); + g_ICmeanVsLoop_EEM -> SetPointError(iLoop, 0.,auxiliary_IC_EEM.GetMeanError()); + + g_ICrmsVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM . GetRMS()); + g_ICrmsVsLoop_EEM -> SetPointError(iLoop, 0., auxiliary_IC_EEM . GetRMSError()); + + g_ICmeanVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetMean()); + g_ICmeanVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetMeanError()); + + g_ICrmsVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetRMS()); + g_ICrmsVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetRMSError()); + + } /// End of Calibration Loops + + + + ///Fill the histo of IntercalibValues after the loops at last step + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value + if ( thisCaliBlock == 0 ) h_scale_EEM -> Fill (thisIx, thisIy, thisIntercalibConstant); + else h_scale_EEP -> Fill (thisIx, thisIy, thisIntercalibConstant); + + if( thisCaliBlock == 0 ) + { + ///Vectors for IC Normalization + IxValues_EEM.push_back(thisIx); + IyValues_EEM.push_back(thisIy); + ICValues_EEM.push_back(thisIntercalibConstant); + } + else + { + IxValues_EEP.push_back(thisIx); + IyValues_EEP.push_back(thisIy); + ICValues_EEP.push_back(thisIntercalibConstant); + } + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to + if(thisIz >0) + { + SumIC_Ring_EEP.at(thisIr) = SumIC_Ring_EEP.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEP.at(thisIr) = Sumxtal_Ring_EEP.at(thisIr) + 1; + } + else + { + SumIC_Ring_EEM.at(thisIr) = SumIC_Ring_EEM.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEM.at(thisIr) = Sumxtal_Ring_EEM.at(thisIr) + 1; + } + } + } + + /// IC Normaliztion trough the mean value of each ring + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ) + { + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ) + { + // int thisCaliBlock = -1; + // if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + // else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + + if( thisIz > 0 ) + { + if(Sumxtal_Ring_EEP.at(thisIr) != 0 && SumIC_Ring_EEP.at(thisIr)!= 0) + h_scale_meanOnring_EEP->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEP.at(thisIr)/Sumxtal_Ring_EEP.at(thisIr))); + } + else + { + if(Sumxtal_Ring_EEM.at(thisIr) != 0 && SumIC_Ring_EEM.at(thisIr) != 0) + h_scale_meanOnring_EEM->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEM.at(thisIr)/Sumxtal_Ring_EEM.at(thisIr))); + } + } + } + +} + +/// Save in the output +void FastCalibratorEE::saveHistos(TFile * f1) +{ + + f1->cd(); + + /// EE+ + hC_IntercalibValues_EEP-> Write(*f1); + hC_PullFromScalib_EEP->Write(*f1); + hC_EoP->Write(*f1); + hC_scale_EEP->Write("",*f1); + + h_occupancy_EEP->Write(); + h_scale_EEP->Write(); + h_scalib_EEP->Write(); + + h_scale_hashedIndex_EE->Write(); + h_occupancy_hashedIndex_EE->Write(); + h_map_Dead_Channels_EEP->Write(); + + g_ICmeanVsLoop_EEP->Write(); + g_ICrmsVsLoop_EEP->Write(); + h_scale_meanOnring_EEP->Write("h_scale_map_EEP"); + h_map_Dead_Channels_EEP->Write(); + + + /// EE- + hC_IntercalibValues_EEM-> Write(*f1); + hC_scale_EEM->Write("",*f1); + hC_PullFromScalib_EEM->Write(*f1); + h_occupancy_EEM->Write(); + h_scale_EEM->Write(); + h_scalib_EEM->Write(); + + g_ICmeanVsLoop_EEM->Write(); + g_ICrmsVsLoop_EEM->Write(); + h_scale_meanOnring_EEM->Write("h_scale_map_EEM"); + h_map_Dead_Channels_EEM->Write(); + + + f1->Close(); + + return; +} + +/// Save E/p distributions +void FastCalibratorEE::saveEoPeta(TFile * f2) +{ + f2->cd(); + hC_EoP_ir_ele ->Write(*f2); + f2->Close(); +} + +/// Acquire fake Dead Xtal in order to study the effect of IC near them +void FastCalibratorEE::AcquireDeadXtal(TString inputDeadXtal, const bool & isDeadTriggerTower){ + + if(inputDeadXtal!="NULL"){ + + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iX, iY ,iZ; + + while(!DeadXtal.eof()){ + + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iX >> iY >>iZ ; + + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; + if(isDeadTriggerTower){ + + for (int ix = -2 ; ix <=2 ; ix++){ + for (int iy = -2 ; iy <=2 ; iy++){ + if(ix==0 && iy==0) continue ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX+ix,iY+iy,iZ)) ; + } + } + } + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else DeadXtal_HashedIndex.push_back(-9999); + + +} +/// Check if the channel considered is in the list of dead or not +bool FastCalibratorEE::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ + + int hashed_Index; + hashed_Index = GetHashedIndexEE(iX,iY,iZ); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc new file mode 100644 index 00000000000..238f92a2ebe --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc @@ -0,0 +1,1149 @@ +#include "../interface/FastCalibratorEE_MVA.h" +#include "../interface/GetHashedIndexEE.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/// Default constructor +FastCalibratorEE_MVA::FastCalibratorEE_MVA(TTree *tree,TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ +// if parameter tree is not specified (or zero), connect the file +// used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + if (!f) { + f = new TFile("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + } + + tree = (TTree*)gDirectory->Get("ntu"); + } + + // endcap geometry + eRings = new TEndcapRings(); + + /// Vector for ring normalization IC + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + Init(tree); +} + +/// Deconstructor + +FastCalibratorEE_MVA::~FastCalibratorEE_MVA(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +/// Get Entry Method +Int_t FastCalibratorEE_MVA::GetEntry(Long64_t entry){ + +// Read contents of entry. + if (!fChain) return 0; + return fChain->GetEntry(entry); + +} + +/// Load Tree infos in a chain +Long64_t FastCalibratorEE_MVA::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + Notify(); + } + return centry; +} + +/// Intialize pointers +void FastCalibratorEE_MVA::Init(TTree *tree){ + + /// Set object pointer + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix =0 ; + ele1_recHit_flag =0 ; + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_flag =0 ; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchAddress("BDTG_weightEE_W_1", &BDTG_weightEE_W_1, &b_BDTG_weightEE_W_1); + fChain->SetBranchAddress("BDTG_weightEE_W_2", &BDTG_weightEE_W_2, &b_BDTG_weightEE_W_2); +// fChain->SetBranchAddress("BDTG_weightEE_Z_1", &BDTG_weightEE_Z_1, &b_BDTG_weightEE_Z_1); +// fChain->SetBranchAddress("BDTG_weightEE_Z_2", &BDTG_weightEE_Z_2, &b_BDTG_weightEE_Z_2); + + + fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex, &b_ele1_recHit_hashedIndex); + fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); +// fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); + + fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); +// fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); +// fChain->SetBranchAddress("ele1_DR ", &ele1_DR , &b_ele1_DR); + fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); + fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); +// fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); + + fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); + fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); +// fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); +// fChain->SetBranchAddress("ele2_DR ", &ele2_DR , &b_ele2_DR); + fChain->SetBranchAddress("ele2_scERaw_PUcleaned", &ele2_scERaw_PUcleaned, &b_ele2_scERaw_PUcleaned); + fChain->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression, &b_ele2_scE_regression); + + fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + Notify(); +} + +Bool_t FastCalibratorEE_MVA::Notify(){ + // The Notify() function is called when a new file is opened. This + // can be either for a new TTree in a TChain or when when a new TTree + // is started when using PROOF. It is normally not necessary to make changes + // to the generated code, but the routine can be extended by the + // user if needed. The return value is currently not used. + + return kTRUE; +} + +void FastCalibratorEE_MVA::Show(Long64_t entry){ +/// Print contents of entry. +/// If entry is not specified, print current entry + if (!fChain) return; + fChain->Show(entry); +} + +Int_t FastCalibratorEE_MVA::Cut(Long64_t entry){ +// This function may be called from Loop. +// returns 1 if entry is accepted. +// returns -1 otherwise. + return 1; +} + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEE_MVA::bookHistos(int nLoops) +{ + + ///service histos + h_scale_hashedIndex_EE = new TH1F ("h_scale_hashedIndex_EE","h_scale_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); + + h_WeightEE_W_1 = new TH1F ("h_WeightEE_W_1","h_WeightEE_W_1",500,0.,1.5); + + h_WeightEE_W_2 = new TH1F ("h_WeightEE_W_2","h_WeightEE_W_2",500,0.,1.5); + + ///EE+ + + hC_IntercalibValues_EEP = new hChain ("IntercalibValues_EEP", "IntercalibValues_EEP", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEP = new hChain ("hC_PullFromScalib_EEP", "hC_PullFromScalib_EEP", 2000,-0.5,0.5, nLoops); + hC_scale_EEP = new h2Chain("hC_scale_EEP", "hC_scale_EEP", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEP = new TH2F("h_scale_EEP", "h_scale_EEP", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); + h_scalib_EEP = new TH2F("h_scalib_EEP", "h_scalib_EEP", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); + h_scale_meanOnring_EEP = new TH2F ("h_scale_meanOnring_EEP", "h_scale_meanOnring_EEP", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEP = new TGraphErrors(); + g_ICmeanVsLoop_EEP -> SetName("g_ICmeanVsLoop_EEP"); + g_ICmeanVsLoop_EEP -> SetTitle("g_ICmeanVsLoop_EEP"); + + g_ICrmsVsLoop_EEP = new TGraphErrors(); + g_ICrmsVsLoop_EEP -> SetName("g_ICrmsVsLoop_EEP"); + g_ICrmsVsLoop_EEP -> SetTitle("g_ICrmsVsLoop_EEP"); + + + + ///EE- + hC_IntercalibValues_EEM = new hChain ("IntercalibValues_EEM", "IntercalibValues_EEM", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEM = new hChain ("hC_PullFromScalib_EEM", "hC_PullFromScalib_EEM", 2000,-0.5,0.5, nLoops); + hC_scale_EEM = new h2Chain("hC_scale_EEM", "hC_scale_EEM", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEM = new TH2F("h_scale_EEM", "h_scale_EEM", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); + h_scalib_EEM = new TH2F("h_scalib_EEM", "h_scalib_EEM", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); + h_scale_meanOnring_EEM = new TH2F ("h_scale_meanOnring_EEM", "h_scale_meanOnring_EEM", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEM = new TGraphErrors(); + g_ICmeanVsLoop_EEM -> SetName("g_ICmeanVsLoop_EEM"); + g_ICmeanVsLoop_EEM -> SetTitle("g_ICmeanVsLoop_EEM"); + + g_ICrmsVsLoop_EEM = new TGraphErrors(); + g_ICrmsVsLoop_EEM -> SetName("g_ICrmsVsLoop_EEM"); + g_ICrmsVsLoop_EEM -> SetTitle("g_ICrmsVsLoop_EEM"); + + + return; +} + +/// ===== Build Weight MVA distribution +void FastCalibratorEE_MVA::BuildWeightDistribution_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isR9selection,bool isfbrem){ + +if(iLoop ==0){ + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building Weight distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4 */){ + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + +// if(ele1_recHit_flag -> at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; /// SC energy + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + bool skipElectron = false; + + /// R9, fbrem selection before E/p distribution + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; + if(fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; + + if(!skipElectron){ h_WeightEE_W_1->Fill(BDTG_weightEE_W_1); + h_WeightEE_W_2->Fill(BDTG_weightEE_W_2); + } + } + } + } + else return; + +} + + +///===== Build E/p for electron 1 and 2 + +void FastCalibratorEE_MVA::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration,bool isSaveEPDistribution, bool isR9selection, bool isMCTruth,bool isfbrem){ + + if(iLoop ==0) { + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + else{ + hC_EoP_ir_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + + Long64_t nbytes = 0, nb = 0; + + /// Loop on ntu entries + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4 */){ + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + +// if(ele1_recHit_flag -> at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; /// SC energy + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + + /// Option for MCTruth analysis + if(!isMCTruth) pIn = ele1_tkP; + else{ pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9, fbrem selection before E/p distribution + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; + + if(fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele1_es)); + + + } + ///=== Second medium electron from Z only Endcaps + if ( ele2_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag -> at(iRecHit) < 4*/){ + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + //if(ele2_recHit_flag -> at(iRecHit) < 4) /// Only Good channels + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + + bool skipElectron = false; + /// Option for MCTruth Analysis + if(!isMCTruth) pIn = ele2_tkP; + else{ pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 and fbrem selection + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta)>1.75 && fabs(ele2_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta)>2.0 && fabs(ele2_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>2.15) skipElectron = true; + + if ( fabs(ele2_fbrem)>0.4 && isfbrem==true) skipElectron =true; + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele2_es)); + + } + } + + /// Normalization E/p distribution + for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); + + + /// Save E/p distributions + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + +/// L3 Loop method ----> Calibration Loop function +void FastCalibratorEE_MVA::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection,bool isR9selection,bool isMCTruth,bool isfbrem){ + + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = kEEhalf; + + std::cout << "m_regions " << m_regions << std::endl; + + /// build up scalibration map + std::vector theScalibration(m_regions*2, 0.); + TRandom genRand; + for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ + + bool isDeadXtal = false ; + /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + + if(GetZsideFromHashedIndex(iIndex)>0) + h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + } + else{ + + if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); /// Miscalibration fixed at 5% + if(isMiscalib == false) theScalibration[iIndex] = 1.; + if(GetZsideFromHashedIndex(iIndex)>0) + h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- + else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); + + } + } + + + /// ----------------- Calibration Loops -----------------------------// + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + /// L3 numerator and denominator for EE+ and EE- + std::vector theNumerator_EEP(m_regions*2+1, 0.); + std::vector theDenominator_EEP(m_regions*2+1, 0.); + std::vector theNumerator_EEM(m_regions+1, 0.); + std::vector theDenominator_EEM(m_regions+1, 0.); + + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + /// === Build Weight Distribution + + BuildWeightDistribution_ele(iLoop,nentries,useW,useZ,theScalibration,isR9selection,isfbrem); + + ///==== build E/p distribution ele 1 and 2 + + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,isMCTruth,isfbrem); + + + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + float pIn, pSub, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Only tight electron from W and Z, only Endcap + + if ( ele1_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/(ele1_scERaw+ele1_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0 ; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + // if(ele1_recHit_flag -> at(iRecHit) < 4) /// Skip bad channel + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4*/ ){ + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); /// Seed infos + + } + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + pSub = 0.; //NOTALEO : test dummy + + /// MCTruth option + if(!isMCTruth) pIn = ele1_tkP; + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele1_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); + + if ( fabs(thisE/(ele1_tkP-ele1_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure + + /// R9 and fbrem selection + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; + + if ( fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; + if ( thisE/(pIn-ele1_es) < EoPHisto->GetXaxis()->GetXmin() || thisE/(pIn-ele1_es) > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + + if(!skipElectron && BDTG_weightEE_W_1!=-99. && BDTG_weightEE_W_2!=-99.){ + + double Maximum_h_WeightEE_W_1 = h_WeightEE_W_1->GetBinCenter(h_WeightEE_W_1->GetMaximumBin()); + double Maximum_h_WeightEE_W_2 = h_WeightEE_W_2->GetBinCenter(h_WeightEE_W_2->GetMaximumBin()); + + for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + +// if(ele1_recHit_flag -> at(iRecHit) >= 4) continue; + + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) + h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + ///Use full statistic + if ( splitStat == 0) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> + at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + + } + + /// use evens + if ( splitStat == 1 && jentry%2 == 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + } + + /// use odd + if ( splitStat == -1 && jentry%2 != 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2)));} + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); } + } + } + } + ///Fill EoP + if (thisCaliBlock != -1) hC_EoP -> Fill(iLoop, thisE/(pIn-ele1_es)); + + } + skipElectron = false; + + /// Medium ele from Z only Endcap + if ( ele2_isEB == 0 && ( useZ == 1 && isZ == 1 ) ) { + + /// SCL energy containment correction + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + +// if( ele2_recHit_flag -> at(iRecHit) < 4 ) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag -> at(iRecHit) < 4*/){ + + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + } + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + pSub = 0.; //NOTALEO : test dummy + /// Option for MCTruth Analysis + if(!isMCTruth) pIn = ele2_tkP; + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele2_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure + /// E/p and R9 selections + if ( fabs(thisE/(pIn-ele2_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; + /// R9 and fbrem selection + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta)>1.75 && fabs(ele2_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta)>2.0 && fabs(ele2_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>2.15) skipElectron = true; + + if ( fabs(ele2_fbrem)>0.4 && isfbrem==true) skipElectron =true; + + if ( thisE/(pIn-ele2_es) < EoPHisto->GetXaxis()->GetXmin() || thisE/(pIn-ele2_es) > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + + if(!skipElectron && BDTG_weightEE_W_1!=-99. && BDTG_weightEE_W_2!=-99.) { + + double Maximum_h_WeightEE_W_1 = h_WeightEE_W_1->GetBinCenter(h_WeightEE_W_1->GetMaximumBin()); + double Maximum_h_WeightEE_W_2 = h_WeightEE_W_2->GetBinCenter(h_WeightEE_W_2->GetMaximumBin()); + + + for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + +// if(ele2_recHit_flag -> at(iRecHit) >= 4) continue; + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) + h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + /// Use full statistic + if ( splitStat == 0) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + } + + /// use evens + if ( splitStat == 1 && jentry%2 == 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + } + + /// use odd + if ( splitStat == -1 && jentry%2 != 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*(thisE3x3/thisE)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + + if(thisCaliBlock == 1) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2)));} + } + } + } + //Fill EoP + if (thisCaliBlock != -1) hC_EoP -> Fill(iLoop, thisE/(pIn-ele2_es)); + + } + } + /// End Cycle on the events + + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC_EEM("auxiliary_IC_EEM","auxiliary_IC_EEM",50,0.2,1.9); + TH1F auxiliary_IC_EEP("auxiliary_IC_EEP","auxiliary_IC_EEP",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + float thisIntercalibConstant =1. ; + + if(thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0.){ + thisIntercalibConstant = theNumerator_EEM[iIndex]/theDenominator_EEM[iIndex];} + else{ + if(thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0.) + thisIntercalibConstant = theNumerator_EEP[iIndex]/theDenominator_EEP[iIndex];} + + float oldIntercalibConstant = 1.; + if ( iLoop > 0 ) oldIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + h_scale_hashedIndex_EE -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); + + if ( thisCaliBlock == 0 ) { + hC_IntercalibValues_EEM -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEM -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEM -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEM.Fill(thisIntercalibConstant); + + } + else { + if( thisCaliBlock == 1) + { + hC_IntercalibValues_EEP -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEP -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEP.Fill(thisIntercalibConstant);} + } + + + } + + } + + g_ICmeanVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM.GetMean()); + g_ICmeanVsLoop_EEM -> SetPointError(iLoop, 0.,auxiliary_IC_EEM.GetMeanError()); + + g_ICrmsVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM . GetRMS()); + g_ICrmsVsLoop_EEM -> SetPointError(iLoop, 0., auxiliary_IC_EEM . GetRMSError()); + + g_ICmeanVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetMean()); + g_ICmeanVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetMeanError()); + + g_ICrmsVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetRMS()); + g_ICrmsVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetRMSError()); + + } + /// End of Calibration Loops + + ///Fill the histo of IntercalibValues after the loops at last step + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value + if ( thisCaliBlock == 0 ) + h_scale_EEM -> Fill (thisIx, thisIy, thisIntercalibConstant); + else + h_scale_EEP -> Fill (thisIx, thisIy, thisIntercalibConstant); + + if ( thisCaliBlock == 0 ) + { + ///Vectors for IC Normalization + IxValues_EEM.push_back(thisIx); + IyValues_EEM.push_back(thisIy); + ICValues_EEM.push_back(thisIntercalibConstant); + } + else{ + IxValues_EEP.push_back(thisIx); + IyValues_EEP.push_back(thisIy); + ICValues_EEP.push_back(thisIntercalibConstant); + } + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to + if(thisIz >0) + { + SumIC_Ring_EEP.at(thisIr) = SumIC_Ring_EEP.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEP.at(thisIr) = Sumxtal_Ring_EEP.at(thisIr) + 1; + } + else{ + SumIC_Ring_EEM.at(thisIr) = SumIC_Ring_EEM.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEM.at(thisIr) = Sumxtal_Ring_EEM.at(thisIr) + 1; + } + + } + + + } + /// IC Normaliztion trough the mean value of each ring + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + // int thisCaliBlock = -1; + // if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + // else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + + + if(thisIz > 0) + { + if(Sumxtal_Ring_EEP.at(thisIr) != 0 && SumIC_Ring_EEP.at(thisIr)!= 0) + h_scale_meanOnring_EEP->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEP.at(thisIr)/Sumxtal_Ring_EEP.at(thisIr))); + } + else{ + if(Sumxtal_Ring_EEM.at(thisIr) != 0 && SumIC_Ring_EEM.at(thisIr) != 0) + h_scale_meanOnring_EEM->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEM.at(thisIr)/Sumxtal_Ring_EEM.at(thisIr))); + } + } + } + +} + +/// Save in the output +void FastCalibratorEE_MVA::saveHistos(TFile * f1){ + + f1->cd(); + + /// EE+ + hC_IntercalibValues_EEP-> Write(*f1); + hC_PullFromScalib_EEP->Write(*f1); + hC_EoP->Write(*f1); + hC_scale_EEP->Write("",*f1); + + h_occupancy_EEP->Write(); + h_scale_EEP->Write(); + h_scalib_EEP->Write(); + + h_scale_hashedIndex_EE->Write(); + h_occupancy_hashedIndex_EE->Write(); + h_map_Dead_Channels_EEP->Write(); + + g_ICmeanVsLoop_EEP->Write(); + g_ICrmsVsLoop_EEP->Write(); + h_scale_meanOnring_EEP->Write("h_scale_map_EEP"); + h_map_Dead_Channels_EEP->Write(); + + + /// EE- + hC_IntercalibValues_EEM-> Write(*f1); + hC_scale_EEM->Write("",*f1); + hC_PullFromScalib_EEM->Write(*f1); + h_occupancy_EEM->Write(); + h_scale_EEM->Write(); + h_scalib_EEM->Write(); + + g_ICmeanVsLoop_EEM->Write(); + g_ICrmsVsLoop_EEM->Write(); + h_scale_meanOnring_EEM->Write("h_scale_map_EEM"); + h_map_Dead_Channels_EEM->Write(); + + + f1->Close(); + + return; +} + +/// Save E/p distributions +void FastCalibratorEE_MVA::saveEoPeta(TFile * f2){ + f2->cd(); + hC_EoP_ir_ele ->Write(*f2); + f2->Close(); +} + +/// Acquire fake Dead Xtal in order to study the effect of IC near them +void FastCalibratorEE_MVA::AcquireDeadXtal(TString inputDeadXtal){ + if(inputDeadXtal!="NULL") + { + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iX, iY ,iZ; + + while(!DeadXtal.eof()) + { + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iX >> iY >>iZ ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else{ + DeadXtal_HashedIndex.push_back(-9999); + } + +} +/// Check if the channel considered is in the list of dead or not +bool FastCalibratorEE_MVA::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ + + int hashed_Index; + hashed_Index = GetHashedIndexEE(iX,iY,iZ); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc b/EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc new file mode 100644 index 00000000000..82d323c622a --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc @@ -0,0 +1,32 @@ +#include "../interface/GetHashedIndexEB.h" + +int GetHashedIndexEB(int iEta, int iPhi, int Zside) +{ + int MAX_IETA = 85; + int MAX_IPHI = 360; + bool positiveZ = true; + if ( Zside == -1 ) positiveZ = false; + int absEta = iEta * Zside; + + return ((MAX_IETA + (positiveZ ? absEta-1 : -absEta) )*MAX_IPHI+ iPhi-1); +} + +int GetIetaFromHashedIndex(int Index) +{ + int MAX_IETA = 85; + int MAX_IPHI = 360; + + int iEta = Index/MAX_IPHI - MAX_IETA; + if ( iEta >= 0 ) iEta++; + return iEta; +} + +int GetIphiFromHashedIndex(int Index) +{ + int MAX_IETA = 85; + int MAX_IPHI = 360; + + int iEta = Index/MAX_IPHI - MAX_IETA; + int iPhi = Index - (MAX_IETA + iEta)*MAX_IPHI + 1; + return iPhi; +} diff --git a/EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc b/EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc new file mode 100644 index 00000000000..7642ba7af47 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc @@ -0,0 +1,75 @@ +#include "../interface/GetHashedIndexEE.h" + +const int kxf[] = { + 41, 51, 41, 51, 41, 51, 36, 51, 36, 51, + 26, 51, 26, 51, 26, 51, 21, 51, 21, 51, + 21, 51, 21, 51, 21, 51, 16, 51, 16, 51, + 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, + 9, 51, 9, 51, 9, 51, 9, 51, 9, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 4, 51, 4, 51, 4, 51, 4, 51, 4, 56, + 1, 58, 1, 59, 1, 60, 1, 61, 1, 61, + 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, + 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, + 1, 61, 1, 61, 1, 60, 1, 59, 1, 58, + 4, 56, 4, 51, 4, 51, 4, 51, 4, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 9, 51, 9, 51, 9, 51, 9, 51, 9, 51, + 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, + 16, 51, 16, 51, 21, 51, 21, 51, 21, 51, + 21, 51, 21, 51, 26, 51, 26, 51, 26, 51, + 36, 51, 36, 51, 41, 51, 41, 51, 41, 51 +} ; + +const int kdi[] = { + 0, 10, 20, 30, 40, 50, 60, 75, 90, 105, + 120, 145, 170, 195, 220, 245, 270, 300, 330, 360, + 390, 420, 450, 480, 510, 540, 570, 605, 640, 675, + 710, 747, 784, 821, 858, 895, 932, 969, 1006, 1043, + 1080, 1122, 1164, 1206, 1248, 1290, 1332, 1374, 1416, 1458, + 1500, 1545, 1590, 1635, 1680, 1725, 1770, 1815, 1860, 1905, + 1950, 1995, 2040, 2085, 2130, 2175, 2220, 2265, 2310, 2355, + 2400, 2447, 2494, 2541, 2588, 2635, 2682, 2729, 2776, 2818, + 2860, 2903, 2946, 2988, 3030, 3071, 3112, 3152, 3192, 3232, + 3272, 3311, 3350, 3389, 3428, 3467, 3506, 3545, 3584, 3623, + 3662, 3701, 3740, 3779, 3818, 3857, 3896, 3935, 3974, 4013, + 4052, 4092, 4132, 4172, 4212, 4253, 4294, 4336, 4378, 4421, + 4464, 4506, 4548, 4595, 4642, 4689, 4736, 4783, 4830, 4877, + 4924, 4969, 5014, 5059, 5104, 5149, 5194, 5239, 5284, 5329, + 5374, 5419, 5464, 5509, 5554, 5599, 5644, 5689, 5734, 5779, + 5824, 5866, 5908, 5950, 5992, 6034, 6076, 6118, 6160, 6202, + 6244, 6281, 6318, 6355, 6392, 6429, 6466, 6503, 6540, 6577, + 6614, 6649, 6684, 6719, 6754, 6784, 6814, 6844, 6874, 6904, + 6934, 6964, 6994, 7024, 7054, 7079, 7104, 7129, 7154, 7179, + 7204, 7219, 7234, 7249, 7264, 7274, 7284, 7294, 7304, 7314 +} ; + + +int GetHashedIndexEE(int ix, int iy, int zside) +{ + int jx = ix ; + int jd = 2*( iy - 1 ) + ( jx - 1 )/50 ; + return ( ( zside < 0 ? 0 : kEEhalf ) + kdi[jd] + jx - kxf[jd] ) ; +} + +int GetIxFromHashedIndex(int Index) +{ + int di = Index%kEEhalf ; + int ii = ( std::upper_bound( kdi, kdi+(2*IY_MAX), di ) - kdi ) - 1 ; + return ( kxf[ii] + di - kdi[ii] ) ; +} + +int GetIyFromHashedIndex(int Index) +{ + int di = Index%kEEhalf ; + int ii = ( std::upper_bound( kdi, kdi+(2*IY_MAX), di ) - kdi ) - 1 ; + return ( 1 + ii/2 ) ; +} + +int GetZsideFromHashedIndex(int Index) +{ + + return ( Index < kEEhalf ? -1 : 1) ; +} diff --git a/EOverPCalibration/FastCalibrator/src/README b/EOverPCalibration/FastCalibrator/src/README new file mode 100644 index 00000000000..d273192073e --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/README @@ -0,0 +1,29 @@ +--------------------------------------------------------- +Summary of all the classes in FastCalibratot/src package: +---------------------------------------------------------- + +1) interface/GetHashedIndexEB.h src/GetHashedIndexEB.cc + + Functions to convert the hashed index of a xtal in EB in iEta and iPhi coordinates and + to get the hashed index from iPhi, iEta and zside + +2) interface/GetHashedIndexEE.h src/GetHashedIndexEE.cc + + Function to convert the hashed idexn xtal in EE in ix,iy and iz coordinates and to get + the hashed index from ix,iy and zside. + +3) interface/EERings.h src/EERings.cc + + Function that gives the EE ring from ix,iy and zside informations (EE is subdiveded in 40 rings from the external part to the inner one) + +4) interface/FastCalibratorWeight.h src/FastCalibratorWeight.cc + + Class used to calculate IC coefficient through L3 "weighted" method for EB + +5) interface/FastCalibratorEE.h src/FastCalibratorEE.cc + + Class used to calculate IC coefficient through L3 "weighted" method for EE+ and EE- + +##### Note #### + +In order to Run this package you have to use the NtuplePackage version in UserCode/RGerosa/NtuplePackage \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/src/TEndcapRings.cc b/EOverPCalibration/FastCalibrator/src/TEndcapRings.cc new file mode 100644 index 00000000000..b8a61d872c8 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/TEndcapRings.cc @@ -0,0 +1,71 @@ +#include "../interface/TEndcapRings.h" + + + +//----- +// ctor + +TEndcapRings::TEndcapRings() +{ + // initialization + for(int ix = 1; ix <= 100; ++ix) + for(int iy = 1; iy <= 100; ++iy) + for(int iz = 0; iz <= 1; ++iz) + iEndcapRing[ix][iy][iz] = -1; + + FILE *fRing; + fRing = fopen("./CommonTools/eerings.dat","r"); + std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; + int ix,iy,iz,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&ix,&iy,&iz,&ir) !=EOF ) + { + if( iz < 0 ) iz = 0; + iEndcapRing[ix][iy][iz] = ir; + } + + return; +} + +//----- +// dtor + +TEndcapRings::~TEndcapRings() +{ + return; +} + + + +//-------- +// methods + +int TEndcapRings::GetEndcapRing(int ix, int iy, int iz) +{ + int iSide = iz; + if( iSide < 0 ) iSide = 0; + return iEndcapRing[ix][iy][iSide]; +} + +int TEndcapRings::GetEndcapIeta(int ix, int iy, int iz) +{ + int iSide = iz; + if( iSide < 0 ) iSide = 0; + int iEtaOffset = 86*iz; + int iEta = iEtaOffset + iz*iEndcapRing[ix][iy][iSide]; + + return iEta; +} + +int TEndcapRings::GetEndcapIphi(int ix, int iy, int iz) +{ + double iX = ix-50.5; + double iY = iy-50.5; + int iPhi = -1; + + if( iX > 0 && iY > 0 ) iPhi = int( 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + if( iX < 0 && iY > 0 ) iPhi = int( 180 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + if( iX < 0 && iY < 0 ) iPhi = int( 180 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + if( iX > 0 && iY < 0 ) iPhi = int( 360 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + + return iPhi; +} diff --git a/EOverPCalibration/FastCalibrator/src/TSicCrystals.cc b/EOverPCalibration/FastCalibrator/src/TSicCrystals.cc new file mode 100644 index 00000000000..ff752fc15de --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/TSicCrystals.cc @@ -0,0 +1,28 @@ +#include "../interface/TSicCrystals.h" + +// default constructor, reading the map from file +TSicCrystals::TSicCrystals() +{ + int ix,iy,iz; + for (ix=0;ix<100;ix++) + { + for (iy=0;iy<100;iy++) + { + for (iz=-1;iz<2;iz++) sicMap[ix][iy][iz]=0; + } + } + + FILE *fSic; + fSic = fopen("./interface/SIC_ixiyiz.list","r"); + std::cout << "Reading SIC crystals map: SIC_ixiyiz.list" << std::endl; + while(fscanf(fSic,"%d %d %d \n",&ix,&iy,&iz) !=EOF ) { + sicMap[ix][iy][iz] = 1; + } + return; + +} +TSicCrystals::~TSicCrystals() { return;} + +int TSicCrystals::isSic(Int_t ix, Int_t iy, Int_t iz){ + return sicMap[ix][iy][iz]; +} diff --git a/EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc b/EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc new file mode 100644 index 00000000000..83588d53d6c --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc @@ -0,0 +1,998 @@ +#include "../interface/XtalAlphaEB.h" +#include "../interface/GetHashedIndexEB.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +///==== Default constructor Contructor + +XtalAlphaEB::XtalAlphaEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + + // if parameter tree is not specified (or zero), connect the file + // used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + + } + + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEB = typeEB; +} + +///==== deconstructor + +XtalAlphaEB::~XtalAlphaEB(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + + +///==== Load information of input Ntupla + +Long64_t XtalAlphaEB::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + +///==== Variables initialization + +void XtalAlphaEB::Init(TTree *tree) +{ + /// Set object pointer + + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix = 0; + ele1_recHit_flag = 0; + ele1_recHit_LaserCorr = 0; + ele1_recHit_Alpha = 0; + + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_flag = 0; + ele2_recHit_LaserCorr = 0; + ele2_recHit_Alpha = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + + fChain->SetBranchStatus("runId", 1); fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchStatus("lumiId", 1); fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchStatus("eventId", 1); fChain->SetBranchAddress("eventId", &eventId, &b_eventId); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + // ele1 + fChain->SetBranchStatus("ele1_recHit_E", 1); fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchStatus("ele1_recHit_hashedIndex",1); fChain->SetBranchAddress("ele1_recHit_hashedIndex",&ele1_recHit_hashedIndex,&b_ele1_recHit_hashedIndex); + fChain->SetBranchStatus("ele1_recHit_ietaORix", 1); fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); + fChain->SetBranchStatus("ele1_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + fChain->SetBranchStatus("ele1_recHit_flag", 1); fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); + fChain->SetBranchStatus("ele1_recHit_laserCorrection", 1); fChain->SetBranchAddress("ele1_recHit_laserCorrection", &ele1_recHit_LaserCorr, &b_ele1_recHit_LaserCorr); + fChain->SetBranchStatus("ele1_recHit_Alpha", 1); fChain->SetBranchAddress("ele1_recHit_Alpha", &ele1_recHit_Alpha, &b_ele1_recHit_Alpha); + + //fChain->SetBranchStatus("ele1_E_true", 1); fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); + //fChain->SetBranchStatus("ele1_DR", 1); fChain->SetBranchAddress("ele1_DR", &ele1_DR, &b_ele1_DR); + + fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + fChain->SetBranchStatus("ele1_eta", 1); fChain->SetBranchAddress("ele1_eta", &ele1_eta, &b_ele1_eta); + fChain->SetBranchStatus("ele1_phi", 1); fChain->SetBranchAddress("ele1_phi", &ele1_phi, &b_ele1_phi); + fChain->SetBranchStatus("ele1_scERaw", 1); fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchStatus("ele1_scE", 1); fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchStatus("ele1_es", 1); fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + fChain->SetBranchStatus("ele1_e3x3", 1); fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchStatus("ele1_tkP", 1); fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchStatus("ele1_fbrem", 1); fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchStatus("ele1_EOverP", 1); fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchStatus("ele1_isEB", 1); fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchStatus("ele1_isEBEEGap", 1); fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); + fChain->SetBranchStatus("ele1_isEBEtaGap", 1); fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchStatus("ele1_isEBPhiGap", 1); fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchStatus("ele1_isEEDeeGap", 1); fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchStatus("ele1_isEERingGap", 1); fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + + fChain->SetBranchStatus("ele1_seedLaserAlpha", 1); fChain->SetBranchAddress("ele1_seedLaserAlpha", &ele1_seedLaserAlpha, &b_ele1_seedLaserAlpha); + fChain->SetBranchStatus("ele1_seedLaserCorr", 1); fChain->SetBranchAddress("ele1_seedLaserCorr", &ele1_seedLaserCorr, &b_ele1_seedLaserCorr); + + // ele2 + fChain->SetBranchStatus("ele2_recHit_E", 1); fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchStatus("ele2_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchStatus("ele2_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchStatus("ele2_recHit_ietaORix", 1); fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); + fChain->SetBranchStatus("ele2_recHit_flag", 1); fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); + fChain->SetBranchStatus("ele2_recHit_laserCorrection", 1); fChain->SetBranchAddress("ele2_recHit_laserCorrection", &ele2_recHit_LaserCorr, &b_ele2_recHit_LaserCorr); + fChain->SetBranchStatus("ele2_recHit_Alpha", 1); fChain->SetBranchAddress("ele2_recHit_Alpha", &ele2_recHit_Alpha, &b_ele2_recHit_Alpha); + + //fChain->SetBranchStatus("ele2_E_true", 1); fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); + //fChain->SetBranchStatus("ele2_DR", 1); fChain->SetBranchAddress("ele2_DR", &ele2_DR, &b_ele2_DR); + fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + + fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + fChain->SetBranchStatus("ele2_eta", 1); fChain->SetBranchAddress("ele2_eta", &ele2_eta, &b_ele2_eta); + fChain->SetBranchStatus("ele2_phi", 1); fChain->SetBranchAddress("ele2_phi", &ele2_phi, &b_ele2_phi); + fChain->SetBranchStatus("ele2_scERaw", 1); fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchStatus("ele2_scE", 1); fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchStatus("ele2_e3x3", 1); fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchStatus("ele2_tkP", 1); fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchStatus("ele2_fbrem", 1); fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchStatus("ele2_EOverP", 1); fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchStatus("ele2_isEB", 1); fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); + fChain->SetBranchStatus("ele2_isEBEEGap", 1); fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchStatus("ele2_isEBEtaGap", 1); fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchStatus("ele2_isEBPhiGap", 1); fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchStatus("ele2_isEEDeeGap", 1); fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchStatus("ele2_isEERingGap", 1); fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + + fChain->SetBranchStatus("ele2_seedLaserAlpha", 1); fChain->SetBranchAddress("ele2_seedLaserAlpha", &ele2_seedLaserAlpha, &b_ele2_seedLaserAlpha); + fChain->SetBranchStatus("ele2_seedLaserCorr", 1); fChain->SetBranchAddress("ele2_seedLaserCorr", &ele2_seedLaserCorr, &b_ele2_seedLaserCorr); + +} + + + +//! Declaration of the objects that are save in the output file + +void XtalAlphaEB::bookHistos(int nLoops){ + + hC_AlphaValues = new hChain ("AlphaValues", "AlphaValues", 2000,0.5,1.5, nLoops); + + hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); + + hC_AlphaSpreadVsLoop = new hChain ("hC_AlphaSpreadVsLoop", "hC_AlphaSpreadVsLoop", 171,-85,86,nLoops); + + hC_Alpha_EB = new h2Chain("hC_Alpha_EB", "hC_Alpha_EB", 360,1, 361, 171, -85, 86, nLoops ); + + h_Alpha_EB = new TH2F("h_Alpha_EB", "h_Alpha_EB", 360,1, 361, 171, -85, 86 ); + + h_Intial_AlphaValues = new TH2F("h_Intial_AlphaValues","h_Intial_AlphaValues",360,1,361,171,-85,86); + + h_Alpha_scalib_EB = new TH2F("h_Alpha_scalib_EB", "h_Alpha_scalib_EB", 360,1, 361, 171, -85, 86 ); + + p_AlphaValues_iEta = new TProfile ("p_AlphaValues_iEta","p_AlphaValues_iEta", 171, -85, 86, -0.1, 2.1); + + h_AlphaSpread_iEta = new TH1F ("h_AlphaSpread_iEta", "h_AlphaSpread_iEta", 171, -85, 86); + + h_Alpha_EB_hashedIndex = new TH1F("h_Alpha_EB_hashedIndex", "h_Alpha_EB_hashedIndex", 61201,-0.5,61999.5 ); + + h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); + + g_AlphameanVsLoop = new TGraphErrors(); + g_AlphameanVsLoop -> SetName("g_AlphameanVsLoop"); + g_AlphameanVsLoop -> SetTitle("g_AlphameanVsLoop"); + + g_AlpharmsVsLoop = new TGraphErrors(); + g_AlpharmsVsLoop ->SetName("g_AlpharmsVsLoop"); + g_AlpharmsVsLoop ->SetTitle("g_AlpharmsVsLoop"); + + g_AlphaSigmaVsLoop = new TGraphErrors(); + g_AlphaSigmaVsLoop ->SetName("g_AlphaSigmaVsLoop"); + g_AlphaSigmaVsLoop ->SetTitle("g_AlphaSigmaVsLoop"); + + h_Alpha_EB_meanOnPhi = new TH2F("h_Alpha_EB_meanOnPhi", "h_Alpha_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); + + h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); + + h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); + + return; +} + +//! Build E/p distribution for both ele1 and ele2 + +void XtalAlphaEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, float R9Min, bool isMCTruth){ + + if(iLoop ==0) { // Set Chain fo Histogram for E/p distribution + + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + else{ + hC_EoP_eta_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_LaserCorr->at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) /// control if this recHit is good + { + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + } + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_LaserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0. + ) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + } + + ///! Eta seed from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + ///! different E/p if I am using MCThruth informations or not + if(!isMCTruth) { + + pIn = ele1_tkP; + int regionId = templIndexEB(myTypeEB,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + /// Save electron E/p in a chain of histogramm each for eta bin + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + + } + ///=== Second medium electron from Z + + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/ele2_scERaw; /// FEta approximation + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + { + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); ///Seed informations + } + + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_LaserCorr -> at(iRecHit)>0. && + ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + } + + + /// Eta seed info from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + /// MCTruth analysis option + if(!isMCTruth) { + + pIn = ele2_tkP; + int regionId = templIndexEB(myTypeEB,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + ///R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection==true ) skipElectron = true; + /// Save E/p electron information + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + } + + + } + + /// Histogramm Normalization + for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++){ + + hC_EoP_eta_ele->Normalize(ieta); + } + + /// Save E/p pdf if it is required + if(isSaveEPDistribution == true) { + + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// Calibration Loop over the ntu events + +void XtalAlphaEB::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection,bool isR9selection, float R9Min, bool isMCTruth, std::map > > jsonMap){ + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = 0; + + + /// Define useful numbers + static const int MIN_IETA = 1; + static const int MIN_IPHI = 1; + static const int MAX_IETA = 85; + static const int MAX_IPHI = 360; + + for ( int iabseta = MIN_IETA; iabseta <= MAX_IETA; iabseta++ ){ + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + m_regions++; + + } + } + } + + /// Barrel region = Barrel xtal + std::cout << "m_regions " << m_regions << std::endl; + + /// Build the scalibration Map for MC Analysis + + std::vector theScalibration(m_regions, 0.); + TRandom3 genRand; + + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { + + bool isDeadXtal = false ; + + /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); + } + else{ + + if(isMiscalib == true) theScalibration[iIndex] = genRand.Gaus(1.,0.01); ///! 1% of Miscalibration fixed + if(isMiscalib == false) theScalibration[iIndex] = 1.; + h_Alpha_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map + } + } + + /// ----------------- Calibration Loops -----------------------------// + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// prepare the numerator and denominator for each Xtal + + std::vector theNumerator(m_regions, 0.); + std::vector theDenominator(m_regions, 0.); + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + ///==== build E/p distribution ele 1 and 2 + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isMCTruth); + + // define map with events + std::map >,int> eventsMap; + + /// Loop on each entry + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + + //********************************* + // JSON FILE AND DUPLIACTES IN DATA + + bool skipEvent = false; + if( isMCTruth == 0 ){ + + if(AcceptEventByRunAndLumiSection(runId,lumiId,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiId,eventId); + std::pair > eventRUNandLSandID(runId,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + + + float pIn, pSub, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Tight electron information from W and Z, it depends on the flag variable isW, isZ + + if ( ele1_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/ele1_scERaw; + + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0 ; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0 ) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(ele1_recHit_LaserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_LaserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ + + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); //! Seed Infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_LaserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + } + + // Iniatila Map of Alpha Values + + if(iLoop==0) { + for ( unsigned int iRecHit = 0; iRecHit< ele1_recHit_Alpha->size(); iRecHit++){ + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + int ieta = GetIetaFromHashedIndex(thisIndex); + int iphi = GetIphiFromHashedIndex(thisIndex); + if(h_Intial_AlphaValues->GetBinContent(iphi,fabs(ieta+85))!=0) continue; + h_Intial_AlphaValues -> SetBinContent(iphi,fabs(ieta+85),ele1_recHit_Alpha->at(iRecHit)); + } + } + + + + pSub = 0.; //NOTALEO : test dummy + bool skipElectron = false; + + ///! if MCTruth Analysis + if(!isMCTruth) { + + pIn = ele1_tkP; + int regionId = templIndexEB(myTypeEB,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// Take the correct pdf for the ring in order to reweight the events in L3 + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// Basic selection on E/p or R9 if you want to apply + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron = true; + if( !skipElectron) { + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); /// factor use to reweight the evemts + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + + } + /// Use Half Statistic only even + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odd event + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + skipElectron = false; + + /// Ele2 medium from Z only Barrel + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + FdiEta = ele2_scE/ele2_scERaw; + // Electron energy + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if( ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.){ + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); /// Seed information + } + + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_LaserCorr -> at(iRecHit)>0. && + ele2_recHit_Alpha -> at(iRecHit)>0.) + + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + } + + if(iLoop==0) { + for ( unsigned int iRecHit = 0; iRecHit< ele2_recHit_Alpha->size(); iRecHit++){ + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + int ieta = GetIetaFromHashedIndex(thisIndex); + int iphi = GetIphiFromHashedIndex(thisIndex); + + if(h_Intial_AlphaValues->GetBinContent(iphi,fabs(ieta+85))!=0) continue; + h_Intial_AlphaValues -> SetBinContent(iphi,fabs(ieta+85),ele2_recHit_Alpha->at(iRecHit)); + + } + } + + pSub = 0.; //NOTALEO : test dummy + + ///! Option for MCTruth analysis + if(!isMCTruth) + { + pIn = ele2_tkP; + int regionId = templIndexEB(myTypeEB,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// discard electrons with bad E/P or R9 + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( !skipElectron ){ + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use evens + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odds + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + } + + ///! End Cycle on the events + + ///New Loop cycle + Save info + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_Alpha("auxiliary_Alpha","auxiliary_Alpha",50,0.2,1.9); + + TF1* f1 = new TF1("f1","gaus",0,5); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ){ + + if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ + + float thisAlphaConstant = 1.; + /// Solve the cases where the recHit energy is always 0 (dead Xtal?) + bool isDeadXtal = false ; + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) continue; + + + if (theNumerator[iIndex]/theDenominator[iIndex]>0 && theDenominator[iIndex]!=0) thisAlphaConstant = theNumerator[iIndex]/theDenominator[iIndex]; + float oldAlphaConstant = 1.; + if ( iLoop > 0 ) oldAlphaConstant = h_Alpha_EB_hashedIndex -> GetBinContent (iIndex+1); + + h_Alpha_EB_hashedIndex -> SetBinContent(iIndex+1, thisAlphaConstant*oldAlphaConstant); /// Alpha product useful for L3 methods + hC_AlphaValues -> Fill(iLoop, thisAlphaConstant); /// Alpha correction distribution at each loop + hC_Alpha_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + ///Save the new IC coefficient + auxiliary_Alpha.Fill(thisAlphaConstant); + } + + } + /// Info in order to test convergence + g_AlphameanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_Alpha . GetMean()); + g_AlphameanVsLoop -> SetPointError(iLoop, 0., auxiliary_Alpha . GetMeanError()); + + g_AlpharmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_Alpha . GetRMS()); + g_AlpharmsVsLoop -> SetPointError(iLoop, 0., auxiliary_Alpha . GetRMSError()); + + auxiliary_Alpha.Fit("f1","QR"); + + g_AlphaSigmaVsLoop -> SetPoint(iLoop, iLoop, f1->GetParameter(2)); + g_AlphaSigmaVsLoop -> SetPointError(iLoop, 0., f1->GetParError(2)); + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + TH1F* histoTemp = new TH1F("histoTemp","histoTemp",800, 0., 3.); + ///Setup the histo for fit + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + int hashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(hashedIndex+1) == 0 ) continue; + histoTemp->Fill(h_Alpha_EB_hashedIndex->GetBinContent(hashedIndex+1)); + } + + TF1* f2 = new TF1("f2","gaus",0,5); + f2->SetParameters(histoTemp->GetEntries(),histoTemp->GetMean(),histoTemp->GetRMS()); + f2->SetRange(histoTemp->GetMean()-8*histoTemp->GetRMS(),histoTemp->GetMean()+8*histoTemp->GetRMS()); + histoTemp -> Fit("f2","QR"); + hC_AlphaSpreadVsLoop -> SetBinContent(iLoop,iabseta*theZside + 85 + 1, f2->GetParameter(2)); + hC_AlphaSpreadVsLoop -> SetBinError(iLoop, iabseta*theZside + 85 + 1, f2->GetParError(2) ); + + delete histoTemp; + delete f2; + } + } + + delete f1; + }/// end calibration loop + + int myPhiIndex = 0; + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + ///Setup the histo for fit + TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",800, 0., 3.); + TF1 f1("f1","gaus",0.,5.); + + int totIphi = 0; + float meanAlphaforPhiRing =0.; + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + float thisAlphaConstant = h_Alpha_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); + + h_Alpha_EB -> Fill(iphi, iabseta*theZside, thisAlphaConstant); ///Fill with Last Alpha correction Value + + p_AlphaValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisAlphaConstant); + + histoAuxiliary . Fill (thisAlphaConstant); + + ///Vectors + IetaValues.push_back(iabseta*theZside); + IphiValues.push_back(iphi); + AlphaValues.push_back(thisAlphaConstant); + + meanAlphaforPhiRing += thisAlphaConstant; + totIphi++; + + } + + for ( int uu = 0; uu < totIphi; uu++ ) meanAlphaforPhiRingValues.push_back(meanAlphaforPhiRing/totIphi); + /// Note this info are not used furhter because channels near to the dead ones are not skipped + + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + + h_Alpha_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, AlphaValues.at(myPhiIndex)/meanAlphaforPhiRingValues.at(myPhiIndex)); + myPhiIndex++; /// Normalization IC with the mean of each ring + + } + + f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); + f1.SetRange(histoAuxiliary.GetMean()-8*histoAuxiliary.GetRMS(), histoAuxiliary.GetMean()+8*histoAuxiliary.GetRMS()); + histoAuxiliary . Fit("f1","QR"); + + h_AlphaSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); + h_AlphaSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); + + } + + } +} +/// Save infos in the output +void XtalAlphaEB::saveHistos(TFile * f1){ + + f1->cd(); + + h_occupancy -> Write(); + h_Occupancy_hashedIndex -> Write(); + h_Intial_AlphaValues -> Write(); + + hC_AlphaValues -> Write(*f1); + hC_Alpha_EB -> Write("",*f1); + hC_EoP -> Write(*f1); + + g_AlphameanVsLoop -> Write(); + g_AlpharmsVsLoop -> Write(); + g_AlphaSigmaVsLoop -> Write(); + + hC_AlphaSpreadVsLoop -> Write(*f1); + + h_Alpha_EB_hashedIndex -> Write(); + h_Alpha_EB -> Write(); + h_Alpha_EB_meanOnPhi -> Write(); + + + p_AlphaValues_iEta -> Write(); + h_AlphaSpread_iEta -> Write(); + + + h_map_Dead_Channels -> Write() ; + + + f1->Close(); + + return; +} +/// Save E/0 distribution +void XtalAlphaEB::saveEoPeta(TFile * f2){ + + f2->cd(); + + hC_EoP_eta_ele ->Write(*f2); + + f2->Close(); +} + +///! Acquire fake dead channel list on order to evaluate the effected of IC near to them +void XtalAlphaEB::AcquireDeadXtal(TString inputDeadXtal){ + + if(inputDeadXtal!="NULL") + { + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iEta, iPhi ; + + + while(!DeadXtal.eof()) + { + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iEta >> iPhi ; + + if(iEta >=0) DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; + else DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; + + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else{ + DeadXtal_HashedIndex.push_back(-9999); + } + +} +///! Check if the channel is dead or not +bool XtalAlphaEB::CheckDeadXtal(const int & iEta, const int & iPhi){ + int hashed_Index; + if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); + else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} diff --git a/EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc b/EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc new file mode 100644 index 00000000000..9a4be80299d --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc @@ -0,0 +1,1474 @@ +#include "../interface/XtalAlphaEE.h" +#include "../interface/GetHashedIndexEE.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/// Default constructor +XtalAlphaEE::XtalAlphaEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A- WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + } + + // endcap geometry + eRings = new TEndcapRings(); + SicCrystal = new TSicCrystals(); + + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEE = typeEE; +} + +/// Deconstructor + +XtalAlphaEE::~XtalAlphaEE(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + + +Long64_t XtalAlphaEE::LoadTree(Long64_t entry){ + + // Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + + +/// Intialize pointers +void XtalAlphaEE::Init(TTree *tree){ + + /// Set object pointer + + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix =0 ; + ele1_recHit_laserCorr =0 ; + ele1_recHit_Alpha =0 ; + + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_laserCorr= 0 ; + ele2_recHit_Alpha =0 ; + + /// Set branch addresses and branch pointers + + if (!tree) return; + + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + fChain->SetBranchStatus("runId", 1); fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchStatus("lumiId", 1); fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchStatus("eventId", 1); fChain->SetBranchAddress("eventId", &eventId, &b_eventId); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + // ele1 + fChain->SetBranchStatus("ele1_recHit_E", 1); fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchStatus("ele1_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele1_recHit_hashedIndex",&ele1_recHit_hashedIndex,&b_ele1_recHit_hashedIndex); + fChain->SetBranchStatus("ele1_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + fChain->SetBranchStatus("ele1_recHit_ietaORix", 1); fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); + fChain->SetBranchStatus("ele1_recHit_laserCorrection",1); fChain->SetBranchAddress("ele1_recHit_laserCorrection",&ele1_recHit_laserCorr,&b_ele1_recHit_laserCorr); + fChain->SetBranchStatus("ele1_recHit_Alpha", 1); fChain->SetBranchAddress("ele1_recHit_Alpha", &ele1_recHit_Alpha, &b_ele1_recHit_Alpha); + + fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + fChain->SetBranchStatus("ele1_eta", 1); fChain->SetBranchAddress("ele1_eta", &ele1_eta, &b_ele1_eta); + fChain->SetBranchStatus("ele1_phi", 1); fChain->SetBranchAddress("ele1_phi", &ele1_phi, &b_ele1_phi); + fChain->SetBranchStatus("ele1_scERaw", 1); fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchStatus("ele1_scE", 1); fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchStatus("ele1_scEta", 1); fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchStatus("ele1_es", 1); fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchStatus("ele1_e3x3", 1); fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchStatus("ele1_tkP", 1); fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchStatus("ele1_fbrem", 1); fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchStatus("ele1_EOverP", 1); fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchStatus("ele1_isEB", 1); fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchStatus("ele1_isEBEEGap", 1); fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); + fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchStatus("ele1_seedLaserAlpha", 1); fChain->SetBranchAddress("ele1_seedLaserAlpha", &ele1_seedLaserAlpha, &b_ele1_seedLaserAlpha); + fChain->SetBranchStatus("ele1_seedLaserCorr", 1); fChain->SetBranchAddress("ele1_seedLaserCorr", &ele1_seedLaserCorr, &b_ele1_seedLaserCorr); + + fChain->SetBranchStatus("ele1_isEBEtaGap", 1); fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchStatus("ele1_isEBPhiGap", 1); fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchStatus("ele1_isEEDeeGap", 1); fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchStatus("ele1_isEERingGap", 1); fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + // ele2 + fChain->SetBranchStatus("ele2_recHit_E", 1); fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchStatus("ele2_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchStatus("ele2_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchStatus("ele2_recHit_ietaORix", 1); fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); + fChain->SetBranchStatus("ele2_recHit_laserCorrection",1); fChain->SetBranchAddress("ele2_recHit_laserCorrection",&ele2_recHit_laserCorr,&b_ele2_recHit_laserCorr); + fChain->SetBranchStatus("ele2_recHit_Alpha", 1); fChain->SetBranchAddress("ele2_recHit_Alpha", &ele2_recHit_Alpha, &b_ele2_recHit_Alpha); + + + fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + fChain->SetBranchStatus("ele2_eta", 1); fChain->SetBranchAddress("ele2_eta", &ele2_eta, &b_ele2_eta); + fChain->SetBranchStatus("ele2_phi", 1); fChain->SetBranchAddress("ele2_phi", &ele2_phi, &b_ele2_phi); + fChain->SetBranchStatus("ele2_scERaw", 1); fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchStatus("ele2_scE", 1); fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchStatus("ele2_scEta", 1); fChain->SetBranchAddress("ele2_scEta", &ele2_scEta, &b_ele2_scEta); + fChain->SetBranchStatus("ele2_es", 1); fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); + fChain->SetBranchStatus("ele2_e3x3", 1); fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchStatus("ele2_tkP", 1); fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchStatus("ele2_fbrem", 1); fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchStatus("ele2_EOverP", 1); fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchStatus("ele2_isEB", 1); fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); + fChain->SetBranchStatus("ele2_scE_regression", 1); fChain->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression, &b_ele2_scE_regression); + + fChain->SetBranchStatus("ele2_seedLaserAlpha", 1); fChain->SetBranchAddress("ele2_seedLaserAlpha", &ele2_seedLaserAlpha, &b_ele2_seedLaserAlpha); + fChain->SetBranchStatus("ele2_seedLaserCorr", 1); fChain->SetBranchAddress("ele2_seedLaserCorr", &ele2_seedLaserCorr, &b_ele2_seedLaserCorr); + + fChain->SetBranchStatus("ele2_isEBEEGap", 1); fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchStatus("ele2_isEBEtaGap", 1); fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchStatus("ele2_isEBPhiGap", 1); fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchStatus("ele2_isEEDeeGap", 1); fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchStatus("ele2_isEERingGap", 1); fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + +} + + +//! Declaration of the objects that are save in the output file + +void XtalAlphaEE::bookHistos(int nLoops){ + + ///service histos + + h_Alpha_hashedIndex_EE = new TH1F ("h_scale_Alpha_EE","h_Alpha_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); + + ///EE+ + + hC_AlphaValues_BTCP_EEP = new hChain ("AlphaValues_BTCP_EEP", "AlphaValues_BTCP_EEP", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_BTCP_EEP = new hChain ("hC_AlphaSpreadVsLoop_BTCP_EEP", "hC_AlphaSpreadVsLoop_BTCP_EEP", 40,0,40,nLoops); + hC_Alpha_BTCP_EEP = new h2Chain("hC_Alpha_BTCP_EEP", "hC_Alpha_BTCP_EEP", 100,1, 101, 100, 1, 101, nLoops ); + hC_AlphaValues_SIC_EEP = new hChain ("AlphaValues_SIC_EEP", "AlphaValues_SIC_EEP", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_SIC_EEP = new hChain ("hC_AlphaSpreadVsLoop_SIC_EEP", "hC_AlphaSpreadVsLoop_SIC_EEP", 40,0,40,nLoops); + hC_Alpha_SIC_EEP = new h2Chain("hC_Alpha_SIC_EEP", "hC_Alpha_SIC_EEP", 100,1, 101, 100, 1, 101, nLoops ); + + h_Alpha_EEP = new TH2F("h_Alpha_EEP", "h_Alpha_EEP", 100,1,101,100,1,101); + h_scalib_EEP = new TH2F("h_scalib_EEP","h_scalib_EEP",100,1,101,100,1,101); + + h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); + h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); + + p_AlphaVsIeta_BTCP_EEP = new TProfile("p_AlphaVsIeta_BTCP_EEP","p_AlphaVsIeta_BTCP_EEP",40,0,40); + AlphaSpreadVsIeta_BTCP_EEP = new TH1F("AlphaSpreadVsIeta_BTCP_EEP","AlphaSpreadVsIeta_BTCP_EEP",40,0,40); + + g_AlphameanVsLoop_BTCP_EEP = new TGraphErrors(); + g_AlphameanVsLoop_BTCP_EEP -> SetName("g_AlphameanVsLoop_BTCP_EEP"); + g_AlphameanVsLoop_BTCP_EEP -> SetTitle("g_AlphameanVsLoop_BTCP_EEP"); + + g_AlpharmsVsLoop_BTCP_EEP = new TGraphErrors(); + g_AlpharmsVsLoop_BTCP_EEP -> SetName("g_AlpharmsVsLoop_BTCP_EEP"); + g_AlpharmsVsLoop_BTCP_EEP -> SetTitle("g_AlpharmsVsLoop_BTCP_EEP"); + + g_AlphaSigmaVsLoop_BTCP_EEP = new TGraphErrors(); + g_AlphaSigmaVsLoop_BTCP_EEP -> SetName("g_AlpharmsVsLoop_BTCP_EEP"); + g_AlphaSigmaVsLoop_BTCP_EEP -> SetTitle("g_AlpharmsVsLoop_BTCP_EEP"); + + p_AlphaVsIeta_SIC_EEP = new TProfile("p_AlphaVsIeta_SIC_EEP","p_AlphaVsIeta_SIC_EEP",40,0,40); + AlphaSpreadVsIeta_SIC_EEP = new TH1F("AlphaSpreadVsIeta_SIC_EEP","AlphaSpreadVsIeta_SIC_EEP",40,0,40); + + g_AlphameanVsLoop_SIC_EEP = new TGraphErrors(); + g_AlphameanVsLoop_SIC_EEP -> SetName("g_AlphameanVsLoop_SIC_EEP"); + g_AlphameanVsLoop_SIC_EEP -> SetTitle("g_AlphameanVsLoop_SIC_EEP"); + + g_AlpharmsVsLoop_SIC_EEP = new TGraphErrors(); + g_AlpharmsVsLoop_SIC_EEP -> SetName("g_AlpharmsVsLoop_SIC_EEP"); + g_AlpharmsVsLoop_SIC_EEP -> SetTitle("g_AlpharmsVsLoop_SIC_EEP"); + + g_AlphaSigmaVsLoop_SIC_EEP = new TGraphErrors(); + g_AlphaSigmaVsLoop_SIC_EEP -> SetName("g_AlpharmsVsLoop_SIC_EEP"); + g_AlphaSigmaVsLoop_SIC_EEP -> SetTitle("g_AlpharmsVsLoop_SIC_EEP"); + + ///EE+ + + hC_AlphaValues_BTCP_EEM = new hChain ("AlphaValues_BTCP_EEM", "AlphaValues_BTCP_EEM", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_BTCP_EEM = new hChain ("hC_AlphaSpreadVsLoop_BTCP_EEM", "hC_AlphaSpreadVsLoop_BTCP_EEM", 40,0,40,nLoops); + hC_Alpha_BTCP_EEM = new h2Chain("hC_Alpha_BTCP_EEM", "hC_Alpha_BTCP_EEM", 100,1, 101, 100, 1, 101, nLoops ); + hC_AlphaValues_SIC_EEM = new hChain ("AlphaValues_SIC_EEM", "AlphaValues_SIC_EEM", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_SIC_EEM = new hChain ("hC_AlphaSpreadVsLoop_SIC_EEM", "hC_AlphaSpreadVsLoop_SIC_EEM", 40,0,40,nLoops); + hC_Alpha_SIC_EEM = new h2Chain("hC_Alpha_SIC_EEM", "hC_Alpha_SIC_EEM", 100,1, 101, 100, 1, 101, nLoops ); + + h_Alpha_EEM = new TH2F("h_Alpha_EEM", "h_Alpha_EEM", 100,1,101,100,1,101); + h_scalib_EEM = new TH2F("h_scalib_EEM","h_scalib_EEM",100,1,101,100,1,101); + + h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); + h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); + + p_AlphaVsIeta_BTCP_EEM = new TProfile("p_AlphaVsIeta_BTCP_EEM","p_AlphaVsIeta_BTCP_EEM",40,0,40); + AlphaSpreadVsIeta_BTCP_EEM = new TH1F("AlphaSpreadVsIeta_BTCP_EEM","AlphaSpreadVsIeta_BTCP_EEM",40,0,40); + + g_AlphameanVsLoop_BTCP_EEM = new TGraphErrors(); + g_AlphameanVsLoop_BTCP_EEM -> SetName("g_AlphameanVsLoop_BTCP_EEM"); + g_AlphameanVsLoop_BTCP_EEM -> SetTitle("g_AlphameanVsLoop_BTCP_EEM"); + + g_AlpharmsVsLoop_BTCP_EEM = new TGraphErrors(); + g_AlpharmsVsLoop_BTCP_EEM -> SetName("g_AlpharmsVsLoop_BTCP_EEM"); + g_AlpharmsVsLoop_BTCP_EEM -> SetTitle("g_AlpharmsVsLoop_BTCP_EEM"); + + g_AlphaSigmaVsLoop_BTCP_EEM = new TGraphErrors(); + g_AlphaSigmaVsLoop_BTCP_EEM -> SetName("g_AlpharmsVsLoop_BTCP_EEM"); + g_AlphaSigmaVsLoop_BTCP_EEM -> SetTitle("g_AlpharmsVsLoop_BTCP_EEM"); + + p_AlphaVsIeta_SIC_EEM = new TProfile("p_AlphaVsIeta_SIC_EEM","p_AlphaVsIeta_SIC_EEM",40,0,40); + AlphaSpreadVsIeta_SIC_EEM = new TH1F("AlphaSpreadVsIeta_SIC_EEM","AlphaSpreadVsIeta_SIC_EEM",40,0,40); + + g_AlphameanVsLoop_SIC_EEM = new TGraphErrors(); + g_AlphameanVsLoop_SIC_EEM -> SetName("g_AlphameanVsLoop_SIC_EEM"); + g_AlphameanVsLoop_SIC_EEM -> SetTitle("g_AlphameanVsLoop_SIC_EEM"); + + g_AlpharmsVsLoop_SIC_EEM = new TGraphErrors(); + g_AlpharmsVsLoop_SIC_EEM -> SetName("g_AlpharmsVsLoop_SIC_EEM"); + g_AlpharmsVsLoop_SIC_EEM -> SetTitle("g_AlpharmsVsLoop_SIC_EEM"); + + g_AlphaSigmaVsLoop_SIC_EEM = new TGraphErrors(); + g_AlphaSigmaVsLoop_SIC_EEM -> SetName("g_AlpharmsVsLoop_SIC_EEM"); + g_AlphaSigmaVsLoop_SIC_EEM -> SetTitle("g_AlpharmsVsLoop_SIC_EEM"); + + + return; +} + + + + +///===== Build E/p for electron 1 and 2 + +void XtalAlphaEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution,bool isR9selection, float R9Min, bool isMCTruth,bool isfbrem){ + + if(iLoop ==0){ + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + else{ + hC_EoP_ir_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + + // Long64_t nb = 0; + + for(Long64_t jentry=0; jentryGetEntry(jentry); + + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + if(ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); /// SC energy + + } + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_laserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + + /// Option for MCTruth analysis + if(!isMCTruth){ + + pIn = ele1_tkP; + int regionId = templIndexEE(myTypeEE,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9, fbrem selection before E/p distribution + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta) > 1.75 && fabs(ele1_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta) > 2.00 && fabs(ele1_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele1_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; + + if( !skipElectron ) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele1_es)); // Fill E/p ditribution + } + + ///=== Second medium electron from Z only Endcaps + if ( ele2_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0. ) { + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); + } + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_laserCorr -> at(iRecHit)>0. && + ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + /// Option for MCTruth Analysis + if(!isMCTruth){ + + pIn = ele2_tkP; + int regionId = templIndexEE(myTypeEE,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else{ + + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta) > 1.75 && fabs(ele2_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta) > 2.00 && fabs(ele2_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele2_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; + + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele2_es)); + + } + } + + + /// Normalization E/p distribution + for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); + + + /// Save E/p distributions + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { + + if(iLoop ==0){ + TFile *f2 = new TFile(outEPDistribution_p.Data(),"RECREATE"); + saveEoPeta(f2); + } + else{ + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + + } + +} + + +/// L3 Loop method ----> Calibration Loop function +void XtalAlphaEE::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection, bool isR9selection, float R9Min, bool isMCTruth, bool isfbrem, std::map > > jsonMap){ + + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = kEEhalf; + + std::cout << "m_regions " << m_regions << std::endl; + + /// build up scalibration map + std::vector theScalibration(m_regions*2, 0.); + TRandom genRand; + + for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ + + bool isDeadXtal = false ; + + /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + + theScalibration[iIndex]=0; + + if(GetZsideFromHashedIndex(iIndex)>0) + h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + } + else{ + if(isMiscalib == true) theScalibration[iIndex] = genRand.Gaus(1.,0.03); /// Miscalibration fixed at 5% + if(isMiscalib == false) theScalibration[iIndex] = 1.; + if(GetZsideFromHashedIndex(iIndex)>0) + h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- + else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); + + } + } + + /// ----------------- Calibration Loops -----------------------------// + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// L3 numerator and denominator for EE+ and EE- + std::vector theNumerator_EEP(m_regions*2+1, 0.); + std::vector theDenominator_EEP(m_regions*2+1, 0.); + std::vector theNumerator_EEM(m_regions+1, 0.); + std::vector theDenominator_EEM(m_regions+1, 0.); + + ///==== build E/p distribution ele 1 and 2 + + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isMCTruth,isfbrem); + + // define map with events + std::map >,int> eventsMap; + + /// Loop over events + std::cout << "Number of analyzed events = " << nentries << std::endl; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + + bool skipEvent = false; + + if( isMCTruth == 0 ){ + + if(AcceptEventByRunAndLumiSection(runId,lumiId,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiId,eventId); + std::pair > eventRUNandLSandID(runId,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + float pIn, FdiEta; + std::map map; + bool skipElectron=false; + + /// Only tight electron from W and Z, only Endcap + + if ( ele1_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/(ele1_scERaw+ele1_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0 ; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ + + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); /// Seed infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_laserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele1_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// MCTruth option + if(!isMCTruth) { + + pIn = ele1_tkP; + int regionId = templIndexEE(myTypeEE,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); + + if ( fabs(thisE/(ele1_tkP-ele1_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta) > 1.75 && fabs(ele1_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta) > 2.00 && fabs(ele1_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele1_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; + + if( thisE/(pIn-ele1_es) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-ele1_es) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ){ + + for( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++){ + + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + /// Fill the occupancy map JUST for the first Loop + if( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + if( iLoop > 0 ) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + + ///Use full statistic + if( splitStat == 0 ){ + + if(thisCaliBlock == 0){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.) / + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ){ + + if( thisCaliBlock == 0 ){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ){ + + if(thisCaliBlock == 0){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + ///Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-ele1_es)); + } + + skipElectron = false; + + /// Medium ele from Z only Endcap + if( ele2_isEB == 0 && ( useZ == 1 && isZ == 1 ) ){ + /// SCL energy containment correction + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for(unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + if(ele2_recHit_E -> at(iRecHit) > E_seed){ + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + } + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_laserCorr -> at(iRecHit)>0. + && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele2_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// Option for MCTruth Analysis + if(!isMCTruth) { + pIn = ele2_tkP; + int regionId = templIndexEE(myTypeEE,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else + { + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele + } + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure + + /// E/p and R9 selections + if ( fabs(thisE/(pIn-ele2_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta) > 1.75 && fabs(ele2_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta) > 2.00 && fabs(ele2_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele2_fbrem) > 0.4 && isfbrem == true) skipElectron =true; + + if( thisE/(pIn-ele2_es) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-ele2_es) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ) + { + for( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + if(iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Use full statistic + if( splitStat == 0){ + if(thisCaliBlock == 0) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ) + { + if( thisCaliBlock == 0 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ) + { + if(thisCaliBlock == 0) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin);} + + if( thisCaliBlock == 1 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + //Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-ele2_es)); + } + } /// End Cycle on the events + + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F* auxiliary_Alpha_BTCP_EEM = new TH1F("auxiliary_Alpha_BTCP_EEM","auxiliary_Alpha_BTCP_EEM",400,0.,3.); + TH1F* auxiliary_Alpha_BTCP_EEP = new TH1F("auxiliary_Alpha_BTCP_EEP","auxiliary_Alpha_BTCP_EEP",400,0.,3.); + TH1F* auxiliary_Alpha_SIC_EEM = new TH1F("auxiliary_Alpha_SIC_EEM","auxiliary_Alpha_SIC_EEM",400,0.,3.); + TH1F* auxiliary_Alpha_SIC_EEP = new TH1F("auxiliary_Alpha_SIC_EEP","auxiliary_Alpha_SIC_EEP",400,0.,3.); + + TF1* f_BTCP_EEP = new TF1("f_BTCP_EEP","gaus",0.,3.); + TF1* f_BTCP_EEM = new TF1("f_BTCP_EEM","gaus",0.,3.); + TF1* f_SIC_EEP = new TF1("f_SIC_EEP","gaus",0.,3.); + TF1* f_SIC_EEM = new TF1("f_SIC_EEM","gaus",0.,3.); + + ///Fill the histo of IntercalibValues before the solve + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + int thisCaliBlock = -1; + if( GetZsideFromHashedIndex(iIndex) < 0 ) thisCaliBlock = 0; + else thisCaliBlock = 1; + + float thisAlphaConstant = 1.; + float oldAlphaConstant = 1.; + if( iLoop > 0 ) oldAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); + + + if( thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0. ) thisAlphaConstant = theNumerator_EEM[iIndex] / theDenominator_EEM[iIndex]; + if( thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0. ) thisAlphaConstant = theNumerator_EEP[iIndex] / theDenominator_EEP[iIndex]; + + h_Alpha_hashedIndex_EE -> SetBinContent(iIndex+1, thisAlphaConstant*oldAlphaConstant); + + if(SicCrystal->isSic(GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), GetZsideFromHashedIndex(iIndex))){ + if( thisCaliBlock == 0 ){ + + hC_AlphaValues_SIC_EEM -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_SIC_EEM -> Fill (iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_SIC_EEM->Fill(thisAlphaConstant); + } + if( thisCaliBlock == 1){ + hC_AlphaValues_SIC_EEP -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_SIC_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_SIC_EEP->Fill(thisAlphaConstant); + } + } + else{ + if( thisCaliBlock == 0 ){ + + hC_AlphaValues_BTCP_EEM -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_BTCP_EEM -> Fill (iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_BTCP_EEM->Fill(thisAlphaConstant); + } + if( thisCaliBlock == 1){ + hC_AlphaValues_BTCP_EEP -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_BTCP_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_BTCP_EEP->Fill(thisAlphaConstant); + } + } + + } + } + //******************************* EE- *************************** + + g_AlphameanVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEM->GetMean()); + g_AlphameanVsLoop_SIC_EEM -> SetPointError(iLoop, 0.,auxiliary_Alpha_SIC_EEM->GetMeanError()); + + g_AlpharmsVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEM -> GetRMS()); + g_AlpharmsVsLoop_SIC_EEM -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEM -> GetRMSError()); + + f_SIC_EEM -> SetParameters (auxiliary_Alpha_SIC_EEM->GetEntries(),auxiliary_Alpha_SIC_EEM->GetMean(),auxiliary_Alpha_SIC_EEM->GetRMS()); + f_SIC_EEM -> SetRange (auxiliary_Alpha_SIC_EEM->GetMean()-8*auxiliary_Alpha_SIC_EEM->GetRMS(),auxiliary_Alpha_SIC_EEM->GetMean()+ + 8*auxiliary_Alpha_SIC_EEM->GetRMS()); + + auxiliary_Alpha_SIC_EEM->Fit("f_SIC_EEM","QR"); + + g_AlphaSigmaVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, f_SIC_EEM -> GetParameter(2)); + g_AlphaSigmaVsLoop_SIC_EEM -> SetPointError(iLoop, 0., f_SIC_EEM -> GetParError(2)); + + g_AlphameanVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEM->GetMean()); + g_AlphameanVsLoop_BTCP_EEM -> SetPointError(iLoop, 0.,auxiliary_Alpha_BTCP_EEM->GetMeanError()); + + g_AlpharmsVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEM -> GetRMS()); + g_AlpharmsVsLoop_BTCP_EEM -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEM -> GetRMSError()); + + f_BTCP_EEM -> SetParameters (auxiliary_Alpha_BTCP_EEM->GetEntries(),auxiliary_Alpha_BTCP_EEM->GetMean(),auxiliary_Alpha_BTCP_EEM->GetRMS()); + f_BTCP_EEM -> SetRange (auxiliary_Alpha_BTCP_EEM->GetMean()-8*auxiliary_Alpha_BTCP_EEM->GetRMS(),auxiliary_Alpha_BTCP_EEM->GetMean()+ + 8*auxiliary_Alpha_BTCP_EEM->GetRMS()); + + auxiliary_Alpha_BTCP_EEM->Fit("f_BTCP_EEM","QR"); + + g_AlphaSigmaVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, f_BTCP_EEM -> GetParameter(2)); + g_AlphaSigmaVsLoop_BTCP_EEM -> SetPointError(iLoop, 0., f_BTCP_EEM -> GetParError(2)); + + //******************************* EE+ *************************** + + g_AlphameanVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEP -> GetMean()); + g_AlphameanVsLoop_SIC_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEP -> GetMeanError()); + + g_AlpharmsVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEP -> GetRMS()); + g_AlpharmsVsLoop_SIC_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEP -> GetRMSError()); + + f_SIC_EEP -> SetParameters (auxiliary_Alpha_SIC_EEP->GetEntries(),auxiliary_Alpha_SIC_EEP->GetMean(),auxiliary_Alpha_SIC_EEP->GetRMS()); + f_SIC_EEP -> SetRange (auxiliary_Alpha_SIC_EEP->GetMean()-8*auxiliary_Alpha_SIC_EEP->GetRMS(),auxiliary_Alpha_SIC_EEP->GetMean()+ + 8*auxiliary_Alpha_SIC_EEP->GetRMS()); + + auxiliary_Alpha_SIC_EEP->Fit("f_SIC_EEP","QR"); + + g_AlphaSigmaVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, f_SIC_EEP -> GetParameter(2)); + g_AlphaSigmaVsLoop_SIC_EEP -> SetPointError(iLoop, 0., f_SIC_EEP -> GetParError(2)); + + g_AlphameanVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEP -> GetMean()); + g_AlphameanVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEP -> GetMeanError()); + + g_AlpharmsVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEP -> GetRMS()); + g_AlpharmsVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEP -> GetRMSError()); + + f_BTCP_EEP -> SetParameters (auxiliary_Alpha_BTCP_EEP->GetEntries(),auxiliary_Alpha_BTCP_EEP->GetMean(),auxiliary_Alpha_BTCP_EEP->GetRMS()); + f_BTCP_EEP -> SetRange (auxiliary_Alpha_BTCP_EEP->GetMean()-8*auxiliary_Alpha_BTCP_EEP->GetRMS(),auxiliary_Alpha_BTCP_EEP->GetMean()+ + 8*auxiliary_Alpha_BTCP_EEP->GetRMS()); + + auxiliary_Alpha_BTCP_EEP->Fit("f_BTCP_EEP","QR"); + + g_AlphaSigmaVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, f_BTCP_EEP -> GetParameter(2)); + g_AlphaSigmaVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., f_BTCP_EEP -> GetParError(2)); + + delete auxiliary_Alpha_SIC_EEP ; + delete auxiliary_Alpha_SIC_EEM ; + delete auxiliary_Alpha_BTCP_EEP ; + delete auxiliary_Alpha_BTCP_EEM ; + delete f_SIC_EEP; + delete f_SIC_EEM; + delete f_BTCP_EEP; + delete f_BTCP_EEM; + + //Alpha spread in each ring + std::map *histoTemp_BTCP_EEP = new std::map (); + std::map *histoTemp_BTCP_EEM = new std::map (); + std::map *histoTemp_SIC_EEP = new std::map (); + std::map *histoTemp_SIC_EEM = new std::map (); + + TString Name ; + + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) == 0) continue; + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); + + if(SicCrystal->isSic(thisIx,thisIy,thisIz)){ + if(!((*histoTemp_SIC_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histoTemp_SIC_EEP_%d",thisIr); + (*histoTemp_SIC_EEP)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(!((*histoTemp_SIC_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histoTemp_SIC_EEM_%d",thisIr); + (*histoTemp_SIC_EEM)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Alpha value + + if(thisCaliBlock==0) (*histoTemp_SIC_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histoTemp_SIC_EEP)[thisIr]->Fill(thisAlphaConstant); + } + + else{ + if(!((*histoTemp_BTCP_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histoTemp_BTCP_EEP_%d",thisIr); + (*histoTemp_BTCP_EEP)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(!((*histoTemp_BTCP_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histoTemp_BTCP_EEM_%d",thisIr); + (*histoTemp_BTCP_EEM)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Alpha value + + if(thisCaliBlock==0) (*histoTemp_BTCP_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histoTemp_BTCP_EEP)[thisIr]->Fill(thisAlphaConstant); + } + + } + + + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_SIC_EEP)[iRing]) continue; + + TF1* funz_SIC_EEP = new TF1("funz_SIC_EEP","gaus",0.,3.); + + funz_SIC_EEP->SetParameters((*histoTemp_SIC_EEP)[iRing]->GetEntries(),(*histoTemp_SIC_EEP)[iRing]->GetMean(),(*histoTemp_SIC_EEP)[iRing]->GetRMS()); + funz_SIC_EEP->SetRange((*histoTemp_SIC_EEP)[iRing]->GetMean()-8*(*histoTemp_SIC_EEP)[iRing]->GetRMS(),(*histoTemp_SIC_EEP)[iRing]->GetMean() + +8*(*histoTemp_SIC_EEP)[iRing]->GetRMS()); + + (*histoTemp_SIC_EEP)[iRing]->Fit("funz_SIC_EEP","QR"); + + hC_AlphaSpreadVsLoop_SIC_EEP->SetBinContent(iLoop,iRing,funz_SIC_EEP->GetParameter(2)); + hC_AlphaSpreadVsLoop_SIC_EEP->SetBinError(iLoop,iRing,funz_SIC_EEP->GetParError(2)); + + delete funz_SIC_EEP; + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_BTCP_EEP)[iRing]) continue; + + TF1* funz_BTCP_EEP = new TF1("funz_BTCP_EEP","gaus",0.,3.); + + funz_BTCP_EEP->SetParameters((*histoTemp_BTCP_EEP)[iRing]->GetEntries(),(*histoTemp_BTCP_EEP)[iRing]->GetMean(),(*histoTemp_BTCP_EEP)[iRing]->GetRMS()); + funz_BTCP_EEP->SetRange((*histoTemp_BTCP_EEP)[iRing]->GetMean()-8*(*histoTemp_BTCP_EEP)[iRing]->GetRMS(),(*histoTemp_BTCP_EEP)[iRing]->GetMean() + +8*(*histoTemp_BTCP_EEP)[iRing]->GetRMS()); + + (*histoTemp_BTCP_EEP)[iRing]->Fit("funz_BTCP_EEP","QR"); + + hC_AlphaSpreadVsLoop_BTCP_EEP->SetBinContent(iLoop,iRing,funz_BTCP_EEP->GetParameter(2)); + hC_AlphaSpreadVsLoop_BTCP_EEP->SetBinError(iLoop,iRing,funz_BTCP_EEP->GetParError(2)); + + delete funz_BTCP_EEP; + } + + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_SIC_EEM)[iRing]) continue; + + TF1* funz_SIC_EEM = new TF1("funz_SIC_EEM","gaus",0.,3.); + funz_SIC_EEM->SetParameters((*histoTemp_SIC_EEM)[iRing]->GetEntries(),(*histoTemp_SIC_EEM)[iRing]->GetMean(),(*histoTemp_SIC_EEM)[iRing]->GetRMS()); + funz_SIC_EEM->SetRange((*histoTemp_SIC_EEM)[iRing]->GetMean()-8*(*histoTemp_SIC_EEM)[iRing]->GetRMS(),(*histoTemp_SIC_EEM)[iRing]->GetMean() + +8*(*histoTemp_SIC_EEM)[iRing]->GetRMS()); + + (*histoTemp_SIC_EEM)[iRing]->Fit("funz_SIC_EEM","QR"); + + hC_AlphaSpreadVsLoop_SIC_EEM->SetBinContent(iLoop,iRing,funz_SIC_EEM->GetParameter(2)); + hC_AlphaSpreadVsLoop_SIC_EEM->SetBinError(iLoop,iRing,funz_SIC_EEM->GetParError(2)); + delete funz_SIC_EEM; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_SIC_EEM)[iRing]) continue; + + TF1* funz_BTCP_EEM = new TF1("funz_BTCP_EEM","gaus",0.,3.); + funz_BTCP_EEM->SetParameters((*histoTemp_BTCP_EEM)[iRing]->GetEntries(),(*histoTemp_BTCP_EEM)[iRing]->GetMean(),(*histoTemp_BTCP_EEM)[iRing]->GetRMS()); + funz_BTCP_EEM->SetRange((*histoTemp_BTCP_EEM)[iRing]->GetMean()-8*(*histoTemp_BTCP_EEM)[iRing]->GetRMS(),(*histoTemp_BTCP_EEM)[iRing]->GetMean() + +8*(*histoTemp_BTCP_EEM)[iRing]->GetRMS()); + + (*histoTemp_BTCP_EEM)[iRing]->Fit("funz_BTCP_EEM","QR"); + + hC_AlphaSpreadVsLoop_BTCP_EEM->SetBinContent(iLoop,iRing,funz_BTCP_EEM->GetParameter(2)); + hC_AlphaSpreadVsLoop_BTCP_EEM->SetBinError(iLoop,iRing,funz_BTCP_EEM->GetParError(2)); + delete funz_BTCP_EEM; + + } + + for( std::map::const_iterator itrechit = histoTemp_SIC_EEM->begin(); itrechit !=histoTemp_SIC_EEM->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histoTemp_SIC_EEP->begin(); itrechit !=histoTemp_SIC_EEP->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histoTemp_BTCP_EEM->begin(); itrechit !=histoTemp_BTCP_EEM->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histoTemp_BTCP_EEP->begin(); itrechit !=histoTemp_BTCP_EEP->end(); itrechit++) delete itrechit->second; + + delete histoTemp_BTCP_EEP; + delete histoTemp_BTCP_EEM; + delete histoTemp_SIC_EEP; + delete histoTemp_SIC_EEM; + + + } /// End of Calibration Loops + + std::map *histo_SIC_EEP = new std::map(); + std::map *histo_SIC_EEM = new std::map(); + std::map *histo_BTCP_EEP = new std::map(); + std::map *histo_BTCP_EEM = new std::map(); + + TString Name ; + + ///Fill the histo of IntercalibValues after the loops at last step + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) == 0 ) continue; + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to + + float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value + + if ( thisCaliBlock == 0 ) h_Alpha_EEM -> Fill (thisIx, thisIy, thisAlphaConstant); + else h_Alpha_EEP -> Fill (thisIx, thisIy, thisAlphaConstant); + + + if(SicCrystal->isSic(thisIx,thisIy,thisIz)){ + + if ( thisCaliBlock == 0 ) p_AlphaVsIeta_SIC_EEM -> Fill (thisIr,thisAlphaConstant); + else p_AlphaVsIeta_SIC_EEP -> Fill (thisIr,thisAlphaConstant); + + + if((!(*histo_SIC_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histo_SIC_EEP_%d",thisIr); + (*histo_SIC_EEP)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + if((!(*histo_SIC_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histo_SIC_EEM_%d",thisIr); + (*histo_SIC_EEM)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(thisCaliBlock==0) (*histo_SIC_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histo_SIC_EEP)[thisIr]->Fill(thisAlphaConstant); + } + else{ + + if ( thisCaliBlock == 0 ) p_AlphaVsIeta_BTCP_EEM -> Fill (thisIr,thisAlphaConstant); + else p_AlphaVsIeta_BTCP_EEP -> Fill (thisIr,thisAlphaConstant); + + if((!(*histo_BTCP_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histo_BTCP_EEP_%d",thisIr); + (*histo_BTCP_EEP)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + if((!(*histo_BTCP_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histo_BTCP_EEM_%d",thisIr); + (*histo_BTCP_EEM)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(thisCaliBlock==0) (*histo_BTCP_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histo_BTCP_EEP)[thisIr]->Fill(thisAlphaConstant); + } + + } + + // spread and mean value vs iRing + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_SIC_EEP)[iRing]) continue; + + TF1* f_SIC_EEP = new TF1("f_SIC_EEP","gaus",0.,3.); + f_SIC_EEP->SetParameters((*histo_SIC_EEP)[iRing]->GetEntries(),(*histo_SIC_EEP)[iRing]->GetMean(),(*histo_SIC_EEP)[iRing]->GetRMS()); + f_SIC_EEP->SetRange((*histo_SIC_EEP)[iRing]->GetMean()-8*(*histo_SIC_EEP)[iRing]->GetRMS(),(*histo_SIC_EEP)[iRing]->GetMean() + +8*(*histo_SIC_EEP)[iRing]->GetRMS()); + + (*histo_SIC_EEP)[iRing]->Fit("f_SIC_EEP","QR"); + + AlphaSpreadVsIeta_SIC_EEP->SetBinContent(iRing,f_SIC_EEP->GetParameter(2)); + AlphaSpreadVsIeta_SIC_EEP->SetBinError(iRing,f_SIC_EEP->GetParError(2)); + + delete f_SIC_EEP; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_BTCP_EEP)[iRing]) continue; + + TF1* f_BTCP_EEP = new TF1("f_BTCP_EEP","gaus",0.,3.); + f_BTCP_EEP->SetParameters((*histo_BTCP_EEP)[iRing]->GetEntries(),(*histo_BTCP_EEP)[iRing]->GetMean(),(*histo_BTCP_EEP)[iRing]->GetRMS()); + f_BTCP_EEP->SetRange((*histo_BTCP_EEP)[iRing]->GetMean()-8*(*histo_BTCP_EEP)[iRing]->GetRMS(),(*histo_BTCP_EEP)[iRing]->GetMean() + +8*(*histo_BTCP_EEP)[iRing]->GetRMS()); + + (*histo_BTCP_EEP)[iRing]->Fit("f_BTCP_EEP","QR"); + + AlphaSpreadVsIeta_BTCP_EEP->SetBinContent(iRing,f_BTCP_EEP->GetParameter(2)); + AlphaSpreadVsIeta_BTCP_EEP->SetBinError(iRing,f_BTCP_EEP->GetParError(2)); + + delete f_BTCP_EEP; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_SIC_EEM)[iRing]) continue; + + TF1* f_SIC_EEM = new TF1("f_SIC_EEM","gaus",0.,3.); + f_SIC_EEM->SetParameters((*histo_SIC_EEM)[iRing]->GetEntries(),(*histo_SIC_EEM)[iRing]->GetMean(),(*histo_SIC_EEM)[iRing]->GetRMS()); + f_SIC_EEM->SetRange((*histo_SIC_EEM)[iRing]->GetMean()-8*(*histo_SIC_EEM)[iRing]->GetRMS(),(*histo_SIC_EEM)[iRing]->GetMean() + +8*(*histo_SIC_EEM)[iRing]->GetRMS()); + + (*histo_SIC_EEM)[iRing]->Fit("f_SIC_EEM","QR"); + + AlphaSpreadVsIeta_SIC_EEM->SetBinContent(iRing,f_SIC_EEM->GetParameter(2)); + AlphaSpreadVsIeta_SIC_EEM->SetBinError(iRing,f_SIC_EEM->GetParError(2)); + + delete f_SIC_EEM; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_BTCP_EEM)[iRing]) continue; + + TF1* f_BTCP_EEM = new TF1("f_BTCP_EEM","gaus",0.,3.); + f_BTCP_EEM->SetParameters((*histo_BTCP_EEM)[iRing]->GetEntries(),(*histo_BTCP_EEM)[iRing]->GetMean(),(*histo_BTCP_EEM)[iRing]->GetRMS()); + f_BTCP_EEM->SetRange((*histo_BTCP_EEM)[iRing]->GetMean()-8*(*histo_BTCP_EEM)[iRing]->GetRMS(),(*histo_BTCP_EEM)[iRing]->GetMean() + +8*(*histo_BTCP_EEM)[iRing]->GetRMS()); + + (*histo_BTCP_EEM)[iRing]->Fit("f_BTCP_EEM","QR"); + + AlphaSpreadVsIeta_BTCP_EEM->SetBinContent(iRing,f_BTCP_EEM->GetParameter(2)); + AlphaSpreadVsIeta_BTCP_EEM->SetBinError(iRing,f_BTCP_EEM->GetParError(2)); + + delete f_BTCP_EEM; + + } + + + for( std::map::const_iterator itrechit = histo_SIC_EEP->begin(); itrechit !=histo_SIC_EEP->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histo_SIC_EEM->begin(); itrechit !=histo_SIC_EEM->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histo_BTCP_EEP->begin(); itrechit !=histo_BTCP_EEP->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histo_BTCP_EEM->begin(); itrechit !=histo_BTCP_EEM->end(); itrechit++) delete itrechit->second; + + delete histo_SIC_EEP; + delete histo_SIC_EEM; + delete histo_BTCP_EEP; + delete histo_BTCP_EEM; +} + + +/// Save in the output +void XtalAlphaEE::saveHistos(TFile * f1){ + + f1->cd(); + + ///service histos + h_Alpha_hashedIndex_EE ->Write(); + h_occupancy_hashedIndex_EE ->Write(); + hC_EoP ->Write(*f1); + + ///EE+ + + hC_AlphaValues_SIC_EEP ->Write(*f1); + hC_AlphaSpreadVsLoop_SIC_EEP ->Write(*f1); + hC_Alpha_SIC_EEP ->Write("",*f1); + hC_AlphaValues_BTCP_EEP ->Write(*f1); + hC_AlphaSpreadVsLoop_BTCP_EEP ->Write(*f1); + hC_Alpha_BTCP_EEP ->Write("",*f1); + + h_Alpha_EEP ->Write(); + h_scalib_EEP ->Write(); + + h_occupancy_EEP ->Write(); + h_map_Dead_Channels_EEP ->Write(); + + p_AlphaVsIeta_SIC_EEP ->Write(); + AlphaSpreadVsIeta_SIC_EEP ->Write(); + + g_AlphameanVsLoop_SIC_EEP ->Write("g_AlphameanVsLoop_SIC_EEP"); + g_AlpharmsVsLoop_SIC_EEP ->Write("g_AlpharmsVsLoop_SIC_EEP"); + g_AlphaSigmaVsLoop_SIC_EEP ->Write("g_AlphaSigmaVsLoop_SIC_EEP"); + + p_AlphaVsIeta_BTCP_EEP ->Write(); + AlphaSpreadVsIeta_BTCP_EEP ->Write(); + + g_AlphameanVsLoop_BTCP_EEP ->Write("g_AlphameanVsLoop_BTCP_EEP"); + g_AlpharmsVsLoop_BTCP_EEP ->Write("g_AlpharmsVsLoop_BTCP_EEP"); + g_AlphaSigmaVsLoop_BTCP_EEP ->Write("g_AlphaSigmaVsLoop_BTCP_EEP"); + + ///EE- + + hC_AlphaValues_SIC_EEM ->Write(*f1); + hC_AlphaSpreadVsLoop_SIC_EEM ->Write(*f1); + hC_Alpha_SIC_EEM ->Write("",*f1); + hC_AlphaValues_BTCP_EEM ->Write(*f1); + hC_AlphaSpreadVsLoop_BTCP_EEM ->Write(*f1); + hC_Alpha_BTCP_EEM ->Write("",*f1); + + h_Alpha_EEM ->Write(); + h_scalib_EEM ->Write(); + + h_occupancy_EEM ->Write(); + h_map_Dead_Channels_EEM ->Write(); + + p_AlphaVsIeta_SIC_EEM ->Write(); + AlphaSpreadVsIeta_SIC_EEM ->Write(); + + g_AlphameanVsLoop_SIC_EEM ->Write("g_AlphameanVsLoop_SIC_EEM"); + g_AlpharmsVsLoop_SIC_EEM ->Write("g_AlpharmsVsLoop_SIC_EEM"); + g_AlphaSigmaVsLoop_SIC_EEM ->Write("g_AlphaSigmaVsLoop_SIC_EEM"); + + p_AlphaVsIeta_BTCP_EEM ->Write(); + AlphaSpreadVsIeta_BTCP_EEM ->Write(); + + g_AlphameanVsLoop_BTCP_EEM ->Write("g_AlphameanVsLoop_BTCP_EEM"); + g_AlpharmsVsLoop_BTCP_EEM ->Write("g_AlpharmsVsLoop_BTCP_EEM"); + g_AlphaSigmaVsLoop_BTCP_EEM ->Write("g_AlphaSigmaVsLoop_BTCP_EEM"); + + f1->Close(); + + return; +} + +/// Save E/p distributions +void XtalAlphaEE::saveEoPeta(TFile * f2){ + + f2->cd(); + + hC_EoP_ir_ele ->Write(*f2); + + f2->Close(); +} + +/// Acquire fake Dead Xtal in order to study the effect of IC near them +void XtalAlphaEE::AcquireDeadXtal(TString inputDeadXtal){ + + if(inputDeadXtal!="NULL") + { + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iX, iY ,iZ; + + while(!DeadXtal.eof()) + { + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iX >> iY >>iZ ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else{ + DeadXtal_HashedIndex.push_back(-9999); + } + +} +/// Check if the channel considered is in the list of dead or not +bool XtalAlphaEE::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ + + int hashed_Index; + hashed_Index = GetHashedIndexEE(iX,iY,iZ); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/FastCalibrator/src/Zutils.cc b/EOverPCalibration/FastCalibrator/src/Zutils.cc new file mode 100644 index 00000000000..8c7b0581ddb --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/Zutils.cc @@ -0,0 +1,640 @@ +#include "../interface/Zutils.h" +#include +#include "TMath.h" +#include "TRandom3.h" +#include "TStyle.h" + +int nPoint; +double mZ_min, mZ_max ; +std::string energySC ; + +/*** breit-wigner ***/ +double breitWigner(double* x, double* par){ + //[0] = N + //[1] = mass + //[2] = width + + double xx = x[0]; + double M = par[1]; + double G = par[2]; + + double gamma = sqrt(M*M*(M*M+G*G)); + double norm =(2.*sqrt(2)*M*G*gamma)/(TMath::Pi()*sqrt(M*M+gamma)); + + return par[0]*norm / ( pow((xx*xx-M*M),2) + M*M*G*G ); +} + +/*** crystall ball with low tail ***/ +double crystalBallLow(double* x, double* par){ + //[0] = N + //[1] = mean + //[2] = sigma + //[3] = alpha + //[4] = n + + double xx = x[0]; + double mean = par[1]; + double sigma = par[2]; + double alpha = par[3]; + double n = par[4]; + + if( (xx-mean)/sigma <= -1.*fabs(alpha) ) { + double A = pow(n/fabs(alpha), n) * exp(-0.5 * TMath::Power(fabs(alpha),2)); + double B = n/fabs(alpha) - fabs(alpha); + return par[0] * A * pow((B - (xx-mean)/sigma), -1.*n); + } + + else{ + return par[0] * exp(-1. * (xx-mean)*(xx-mean) / (2*sigma*sigma) ); + } + +} + +/*** double crystall ball ***/ +double crystalBallLowHigh(double* x, double* par) +{ + //[0] = N + //[1] = mean + //[2] = sigma + //[3] = alpha + //[4] = n + //[5] = alpha2 + //[6] = n2 + //[7] = scale + + double xx = x[0] * par[7]; + double mean = par[1]; + double sigma = par[2]; + double alpha = par[3]; + double n = par[4]; + double alpha2 = par[5]; + double n2 = par[6]; + + if( (xx-mean)/sigma > fabs(alpha) ) + { + double A = pow(n/fabs(alpha), n) * exp(-0.5 * alpha*alpha); + double B = n/fabs(alpha) - fabs(alpha); + + return par[0] * par[7] * A * pow(B + (xx-mean)/sigma, -1.*n); + } + + else if( (xx-mean)/sigma < -1.*fabs(alpha2) ) + { + double A = pow(n2/fabs(alpha2), n2) * exp(-0.5 * alpha2*alpha2); + double B = n2/fabs(alpha2) - fabs(alpha2); + + return par[0] * par[7] * A * pow(B - (xx-mean)/sigma, -1.*n2); + } + + else + { + return par[0] * par[7] * exp(-1. * (xx-mean)*(xx-mean) / (2*sigma*sigma) ); + } + +} + +/*** breit-wigner convoluted with crystalBall ***/ +double breitWigner_crystalBallLow(double* x, double* par){ + //[0] = N + //[1] = b.w. - mass + //[2] = b.w. - width + //[3] = c.b. - mean + //[4] = c.b. - sigma + //[5] = c.b. - alpha + //[6] = c.b. - n + + double xx = x[0]; + double N = par[0]; + double M = par[1]; + double G = par[2]; + double mean = par[3]; + double sigma = par[4]; + double alpha = par[5]; + double n = par[6]; + + TF1* bw = new TF1("temp_bw",breitWigner,mZ_min,mZ_max,3); + bw -> FixParameter(0,1.); + bw -> FixParameter(1,M); + bw -> FixParameter(2,G); + + TF1* cb = new TF1("temp_cb",crystalBallLow,mZ_min,mZ_max,5); + + cb -> FixParameter(0,N); + cb -> FixParameter(1,mean); + cb -> FixParameter(2,sigma); + cb -> FixParameter(3,alpha); + cb -> FixParameter(4,n); + + double stepWidth = (mZ_max-mZ_min)/nPoint; + double val = 0.; + + for(int ibin = 0; ibin < nPoint; ++ibin){ + double yy = mZ_min+ibin*stepWidth; + val += bw->Eval(yy) * cb->Eval(xx-yy); + } + + delete bw; + delete cb; + return val; +} + +/*** Visible BwCB FWH estimation assumption the function is monotonic in the interval***/ +std::pair breitWigner_crystalBallLowFWHM(TF1* bwcb, const double &min,const double &max, const double &Precision,const int & maxCycle){ + +std::pair extreme ; +extreme.first = -99. ; extreme.second=-99.; + +std::cout<<" Entering "<GetMaximumX(); + +std::cout<<" xMax = "<GetMaximum(); + +std::cout<<" MAX = "< IntervalUp ; +IntervalUp.first = xMAX ; IntervalUp.second=max; + +std::pair IntervalDown ; +IntervalDown.first = min ; IntervalDown.second=xMAX; + +bool EndUp=false, EndDown=false; + +for(int icycle=0; icycleEval(IntervalDown.second)-bwcb->Eval(IntervalDown.first))<=Precision) EndDown = true; + +if(fabs(bwcb->Eval(IntervalUp.second)-bwcb->Eval(IntervalUp.first))<=Precision) EndUp = true; + +if(EndUp && EndDown) break; + +} + +extreme.first=(IntervalDown.second -IntervalDown.first )/2 +IntervalDown.first; +extreme.second=(IntervalUp.second -IntervalUp.first )/2 +IntervalUp.first; + +std::cout<<" extreme first = "<>>Zutils::DrawZPeak::draw peaks" << std::endl; + std::string h_mZ_DATA_Name = h_mZ_DATA->GetName(); + std::string h_mZ_MC_Name = h_mZ_MC->GetName(); + + TCanvas* c = new TCanvas(("c_mZ_DATA"+h_mZ_DATA_Name).c_str(),("mZ - "+h_mZ_DATA_Name).c_str(),0,0,600,600); + c -> cd(); + c -> SetGridx(); + c -> SetGridy(); + + c -> SetLeftMargin(0.15); + c -> SetRightMargin(0.15); + + char axisTitle[50]; + sprintf(axisTitle,"events / %.2e GeV/c^{2}",h_mZ_DATA->GetBinWidth(1)); + h_mZ_DATA -> Rebin(rebin); + h_mZ_DATA -> GetXaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetLabelFont(42); + h_mZ_DATA -> GetXaxis() -> SetTitleSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); + h_mZ_DATA -> GetYaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetYaxis() -> SetTitle(axisTitle); + + h_mZ_DATA -> SetLineWidth(2); + h_mZ_DATA -> SetLineColor(kGreen+2); + h_mZ_DATA -> SetMarkerColor(kBlack); + h_mZ_DATA -> SetMarkerStyle(20); + h_mZ_DATA -> SetMarkerSize(0.5); + h_mZ_DATA -> GetYaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> Draw("P"); + gPad->Update(); + + h_mZ_DATA -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_DATA->GetMaximum()); + gPad->Update(); + + TCanvas* c1 = new TCanvas(("c_mZ_MC"+h_mZ_MC_Name).c_str(),("mZ - "+h_mZ_MC_Name).c_str(),0,0,600,600); + c1 -> cd(); + c1 -> SetGridx(); + c1 -> SetGridy(); + + c1 -> SetLeftMargin(0.15); + c1 -> SetRightMargin(0.15); + + h_mZ_MC -> Rebin(rebin); + h_mZ_MC -> Scale(1.*h_mZ_DATA->GetEntries()/h_mZ_MC->GetEntries()); + h_mZ_MC -> GetXaxis() -> SetLabelSize(0.03); + h_mZ_MC -> GetXaxis() -> SetLabelFont(42); + h_mZ_MC -> GetXaxis() -> SetTitleSize(0.03); + h_mZ_MC -> GetXaxis() -> SetTitleOffset(1.5); + h_mZ_MC -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); + h_mZ_MC -> GetYaxis() -> SetLabelSize(0.03); + h_mZ_MC -> GetYaxis() -> SetTitleOffset(1.5); + h_mZ_MC -> GetYaxis() -> SetTitle(axisTitle); + + h_mZ_MC -> SetLineWidth(2); + h_mZ_MC -> SetLineColor(kRed+1); + h_mZ_MC -> SetMarkerColor(kBlack); + h_mZ_MC -> SetMarkerStyle(20); + h_mZ_MC -> SetMarkerSize(0.5); + h_mZ_MC -> Draw("P"); + gPad->Update(); + + h_mZ_MC -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_MC->GetMaximum()); + gPad->Update(); + + //---------- + // fit peaks + + std::cout << ">>>Zutils::DrawZPeak::fit peaks" << std::endl; + std::string funcNameDATA = "bw_cb_DATA_" + category +"_"+energySC; + std::string funcNameMC = "bw_cb_MC_" + category +"_"+energySC; + + if(category == "EE-EE" || category == "EEp" || category == "EEm" || category=="EE_R9_g" || category=="EE_R9_l" || category=="EE_Eta_l" || category=="EE_Eta_g" ){ + + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + + TFitResultPtr rpDATA; + int fStatusDATA; + do{ + SetParameterFunctionEE_EE(bw_cb_DATA, rand); + rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatusDATA = rpDATA; + } while(fStatusDATA!=0); + + bw_cb_DATA -> Draw("same"); + + + TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_MC -> SetNpx(10000); + bw_cb_MC -> SetLineWidth(2); + bw_cb_MC -> SetLineStyle(1); + bw_cb_MC -> SetLineColor(kRed+1); + c1->cd(); + + int fStatusMC; + TFitResultPtr rpMC; + do{ + + SetParameterFunctionEE_EE(bw_cb_MC, rand); + rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL"); + fStatusMC = rpMC; + std::cout<<" fStatus "< Draw("same"); + } + +if(category == "EB-EE" || category=="EB_R9_l"){ + + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rpDATA; + int fStatusDATA; + do{ + SetParameterFunctionEB_EE(bw_cb_DATA, rand); + rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatusDATA = rpDATA; + } while(fStatusDATA!=0); + + bw_cb_DATA -> Draw("same"); + + TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_MC -> SetNpx(10000); + bw_cb_MC -> SetLineWidth(2); + bw_cb_MC -> SetLineStyle(1); + bw_cb_MC -> SetLineColor(kRed+1); + c1->cd(); + + TFitResultPtr rpMC; + int fStatusMC; + do{ + SetParameterFunctionEB_EE(bw_cb_MC, rand); + rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL"); + fStatusMC = rpMC; + } while(fStatusMC!=0); + + bw_cb_MC -> Draw("same"); + } + +if(category == "EB-EB" || category == "EBp" || category == "EBm" || category=="EB_R9_g" || category=="EB_Eta_l"|| category=="EB_Eta_g"){ + + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + + TFitResultPtr rpDATA; + int fStatusDATA; + do{ + SetParameterFunctionEB_EB(bw_cb_DATA, rand); + rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatusDATA = rpDATA; + } while(fStatusDATA!=0); + + bw_cb_DATA -> Draw("same"); + + TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_MC -> SetNpx(10000); + bw_cb_MC -> SetLineWidth(2); + bw_cb_MC -> SetLineStyle(1); + bw_cb_MC -> SetLineColor(kRed+1); + c1->cd(); + + TFitResultPtr rpMC; + int fStatusMC; + do{ + SetParameterFunctionEB_EB(bw_cb_MC, rand); + rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL+"); + fStatusMC = rpMC; + } while(fStatusMC!=0); + + bw_cb_MC -> Draw("same"); + + } + + // ------------------ + // get the statistics + + + TPaveStats* p_mZ_DATA = (TPaveStats*)(h_mZ_DATA->GetListOfFunctions()->FindObject("stats")); + p_mZ_DATA->SetX1NDC(0.69); + p_mZ_DATA->SetX2NDC(0.99); + p_mZ_DATA->SetY1NDC(0.69); + p_mZ_DATA->SetY2NDC(0.99); + p_mZ_DATA->SetTextColor(kGreen+2); + p_mZ_DATA->SetOptFit(0012); + p_mZ_DATA->Draw("same"); + + TPaveStats* p_mZ_MC = (TPaveStats*)(h_mZ_MC->GetListOfFunctions()->FindObject("stats")); + p_mZ_MC->SetX1NDC(0.69); + p_mZ_MC->SetX2NDC(0.99); + p_mZ_MC->SetY1NDC(0.69); + p_mZ_MC->SetY2NDC(0.99); + p_mZ_MC->SetTextColor(kRed+1); + p_mZ_MC->SetOptFit(0012); + p_mZ_MC->Draw("same"); + + + // --------------- + // print the plots + + c -> Print((h_mZ_DATA_Name+"_rerecoICHEP2012.png").c_str(),"png"); + c1 -> Print((h_mZ_MC_Name+"_MC_IC_v2.png").c_str(),"png"); + + delete c; + delete c1; +} + + +void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, + int nPoints, const double &min,const double &max,std::string energyType ){ + + nPoint = nPoints; + mZ_min = min; + mZ_max = max; + energySC = energyType ; + + TRandom3 * rand = new TRandom3(); + + //----------- + // draw peaks + std::cout << ">>>Zutils::DrawZPeak::draw peaks" << std::endl; + std::string h_mZ_DATA_Name = h_mZ_DATA->GetName(); + + TCanvas* c = new TCanvas(("c_mZ_DATA"+h_mZ_DATA_Name).c_str(),("mZ - "+h_mZ_DATA_Name).c_str(),0,0,600,600); + c -> cd(); + c -> SetGridx(); + c -> SetGridy(); + + c -> SetLeftMargin(0.15); + c -> SetRightMargin(0.15); + + char axisTitle[50]; + sprintf(axisTitle,"events / %.2e GeV/c^{2}",h_mZ_DATA->GetBinWidth(1)); + h_mZ_DATA -> Rebin(rebin); + h_mZ_DATA -> GetXaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetLabelFont(42); + h_mZ_DATA -> GetXaxis() -> SetTitleSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); + h_mZ_DATA -> GetYaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetYaxis() -> SetTitle(axisTitle); + + h_mZ_DATA -> SetLineWidth(2); + h_mZ_DATA -> SetLineColor(kGreen+2); + h_mZ_DATA -> SetMarkerColor(kBlack); + h_mZ_DATA -> SetMarkerStyle(20); + h_mZ_DATA -> SetMarkerSize(0.5); + h_mZ_DATA -> GetYaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> Draw("P"); + gPad->Update(); + + h_mZ_DATA -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_DATA->GetMaximum()); + gPad->Update(); + + //---------- + // fit peaks + + std::cout << ">>>Zutils::DrawZPeak::fit peaks" << std::endl; + std::string funcNameDATA = "bw_cb_DATA_" + category+"_"+energyType; + + + if(category == "EE-EE" || category == "EEp" || category == "EEm" || category=="EE_R9_g" || category=="EE_R9_l" || category=="EE_Eta_l" || category=="EE_Eta_g" ){ + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rp; + int fStatus; + do{ + SetParameterFunctionEE_EE(bw_cb_DATA, rand); + rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatus = rp; + }while(fStatus!=0); + + bw_cb_DATA -> Draw("same"); + + } + +if(category == "EB-EE" || category=="EB_R9_l" ){ + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rp; + int fStatus; + do{ + SetParameterFunctionEB_EE(bw_cb_DATA, rand); + rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatus = rp; + }while(fStatus!=0); + bw_cb_DATA -> Draw("same"); + } + +if(category == "EB-EB" || category == "EBp" || category == "EBm" || category=="EB_R9_g" || category=="EB_Eta_l" || category=="EB_Eta_g"){ + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rp; + int fStatus; + do{ + SetParameterFunctionEB_EB(bw_cb_DATA, rand); + rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatus = rp; + }while(fStatus!=0); + bw_cb_DATA -> Draw("same"); + } + + + // ------------------ + // get the statistics + + + TPaveStats* p_mZ_DATA = (TPaveStats*)(h_mZ_DATA->GetListOfFunctions()->FindObject("stats")); + p_mZ_DATA->SetX1NDC(0.69); + p_mZ_DATA->SetX2NDC(0.99); + p_mZ_DATA->SetY1NDC(0.69); + p_mZ_DATA->SetY2NDC(0.99); + p_mZ_DATA->SetTextColor(kGreen+2); + p_mZ_DATA->SetOptFit(0012); + p_mZ_DATA->Draw("same"); + + // --------------- + // print the plots + + c -> Print((h_mZ_DATA_Name+"_DATA_DATA_rerecoICHEP2012_v2.png").c_str(),"png"); + + delete c; +} + +void SetParameterFunctionEE_EE(TF1* bw_cb, TRandom3 * rand){ + + // Z invariant Mass + bw_cb -> SetParName(1,"M_{Z}"); + bw_cb -> FixParameter(1,91.18); + // Z FWHM + bw_cb -> SetParName(2,"#Gamma_{Z}"); + bw_cb -> FixParameter(2,2.4952); + // Normalization + bw_cb -> SetParName(0,"N"); + bw_cb -> SetParameter(0,rand->Uniform(10.,20.)); + // Delta M + bw_cb -> SetParName(3,"#Deltam"); + bw_cb -> SetParameter(3,rand->Uniform(0.,1.5)); + // Sigma CB + bw_cb -> SetParName(4,"#sigma_{CB}"); + bw_cb -> SetParameter(4,rand->Uniform(2.,3.5)); + // Alpha CB + bw_cb -> SetParName(5,"#alpha"); + bw_cb -> SetParameter(5,rand->Uniform(1.,2.)); + // n parameter CB + bw_cb -> SetParName(6,"n"); + bw_cb -> SetParameter(6,rand->Uniform(1.5,4.)); +} + +void SetParameterFunctionEB_EE(TF1* bw_cb, TRandom3 * rand){ + + // Z invariant Mass + bw_cb -> SetParName(1,"M_{Z}"); + bw_cb -> FixParameter(1,91.18); + // Z FWHM + bw_cb -> SetParName(2,"#Gamma_{Z}"); + bw_cb -> FixParameter(2,2.4952); + // Normalization + bw_cb -> SetParName(0,"N"); + bw_cb -> SetParameter(0,rand->Uniform(300.,600.)); + // Delta M + bw_cb -> SetParName(3,"#Deltam"); + bw_cb -> SetParameter(3,rand->Uniform(0.9,1.5)); + // Sigma CB + bw_cb -> SetParName(4,"#sigma_{CB}"); + bw_cb -> SetParameter(4,rand->Uniform(2.,3.)); + // Alpha CB + bw_cb -> SetParName(5,"#alpha"); + bw_cb -> SetParameter(5,rand->Uniform(0.7,1.4)); + // n parameter CB + bw_cb -> SetParName(6,"n"); + bw_cb -> SetParameter(6,rand->Uniform(2.,4.)); +} + +void SetParameterFunctionEB_EB(TF1* bw_cb, TRandom3 * rand){ + + // Z invariant Mass + bw_cb -> SetParName(1,"M_{Z}"); + bw_cb -> FixParameter(1,91.18); + // Z FWHM + bw_cb -> SetParName(2,"#Gamma_{Z}"); + bw_cb -> FixParameter(2,2.4952); + // Normalization + bw_cb -> SetParName(0,"N"); + bw_cb -> SetParameter(0,rand->Uniform(300.,500.)); + // Delta M + bw_cb -> SetParName(3,"#Deltam"); + bw_cb -> SetParameter(3,rand->Uniform(-0.5,0.7)); + // Sigma CB + bw_cb -> SetParName(4,"#sigma_{CB}"); + bw_cb -> SetParameter(4,rand->Uniform(0.7,1.6)); + // Alpha CB + bw_cb -> SetParName(5,"#alpha"); + bw_cb -> SetParameter(5,rand->Uniform(1.,1.9)); + // n parameter CB + bw_cb -> SetParName(6,"n"); + bw_cb -> SetParameter(6,rand->Uniform(1.5,3.7)); +} diff --git a/EOverPCalibration/FastCalibrator/src/geometryUtils.cc b/EOverPCalibration/FastCalibrator/src/geometryUtils.cc new file mode 100644 index 00000000000..155b76e722a --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/geometryUtils.cc @@ -0,0 +1,256 @@ +#include "../interface/geometryUtils.h" + +// --- EE --- +// default constructor, reading the map from file +TEndcapRegions::TEndcapRegions() +{ + //initializing the matrix + for(int ii=0; ii<100; ++ii) + for(int jj=0; jj<100; ++jj) + { + iEndcapRing[ii][jj][-1] = -1; + iEndcapRing[ii][jj][0] = -1; + iEndcapRing[ii][jj][+1] = -1; + iLMR[ii][jj][0] = -1; + iLMR[ii][jj][1] = -1; + } + FILE *fRing; + fRing = fopen("eeregions.dat","r"); + std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; + int ix,iy,iz,ir,lmr; + while(fscanf(fRing,"(%d,%d,%d) %d %d\n",&ix,&iy,&iz,&lmr,&ir) !=EOF ) { + iEndcapRing[ix-1][iy-1][iz] = ir; + iLMR[ix-1][iy-1][iz] = lmr; + } + return; +} + +//dtor +TEndcapRegions::~TEndcapRegions() { return;} + + + + +//methods +int TEndcapRegions::GetNRegions(const std::string& type, const int nRings) +{ + if( type == "LMR" ) return 38; + if( type == "RING" && nRings == 0 ) return 78; + if( type == "RING" ) return 2*nRings; + + return -1; +} + +int TEndcapRegions::GetRegionId(const int ix, const int iy, const int iz, const std::string& type) +{ + int iSide = iz; + if (iSide<0) iSide=0; + if( type == "LMR" ) + { + return iLMR[ix-1][iy-1][iSide] + 19*iSide; + } + if(type == "RING") + { + if(iSide == 0) + return -(iEndcapRing[ix-1][iy-1][iz]); + if(iSide > 0) + return iEndcapRing[ix-1][iy-1][iz]; + } + return -1; +} + +int TEndcapRegions::GetEndcapRing(const int ix, const int iy, const int iz, const int nRings ){ + int iSide = iz; + float ringWidth = int(39./nRings)+1; + if(nRings == 0) + { + if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; + else return iEndcapRing[ix-1][iy-1][iSide]; + } + else + { + if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; + else + { + if(iSide < 0) return -int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + if(iSide > 0) return int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + } + } + return -1; +} + +int TEndcapRegions::GetEndcapIeta(const int ix, const int iy, const int iz, const std::string& type, const int nRings){ + int iSide = iz; + int iEtaOffset = 86*iz; + int iEta = iEtaOffset + iz*iEndcapRing[ix-1][iy-1][iSide]; + float ringWidth = int(39./nRings); + if(type == "RING") + { + if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; + else + { + if(iSide < 0) return -int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + if(iSide > 0) return int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + } + } + return iEta; +} + + + + +// --- EB --- +// default constructor (NEEDED FOR INPUT REGIONS FROM EXTERNAL FILE) +TBarrelRegions::TBarrelRegions() { + //initializing the matrix + for(int ii=0; ii<171; ++ii) + for(int kk=0; kk<360; ++kk) + { + iBarrelRings[ii][kk] = -1; + iLMR[ii][kk] = -1; + iSM[ii][kk] = -1; + iTT[ii][kk] = -1; + } + + FILE *fRegion; + fRegion = fopen("ebregions.dat","r"); + std::cout << "Inizializing barrel geometry from: ebregions.dat" << std::endl; + + int ieta,iphi,sm,tt,lmr; + std::map dummyMap; + while(fscanf(fRegion,"(%d ,%d) %d %d %d\n",&ieta,&iphi,&sm,&tt,&lmr) !=EOF ) + { + iBarrelRings[ieta+85][iphi-1] = ieta+85; + iLMR[ieta+85][iphi-1] = lmr; + iSM[ieta+85][iphi-1] = sm; + iTT[ieta+85][iphi-1] = tt; + + //inverse map containing the ietaMin in that region + if(dummyMap.find(lmr) == dummyMap.end()) dummyMap[lmr] = abs(ieta); + else if(abs(ieta) < dummyMap[lmr]) dummyMap[lmr] = abs(ieta); + } + + int counter=0; + std::map dummyMapEtaCount; + for(std::map::const_iterator itr = dummyMap.begin(); itr != dummyMap.end(); ++itr) + { + if(dummyMapEtaCount.find(itr->second) == dummyMapEtaCount.end()) + { + dummyMapEtaCount[itr->second] = counter; + ++counter; + } + LmrEtaMap[itr->first] = dummyMapEtaCount[itr->second]; + } + + + return; +} + +//dtor +TBarrelRegions::~TBarrelRegions() +{ + return; +} + + + +//methods +int TBarrelRegions::GetNRegions(const std::string& type) +{ + if( type == "ALL" ) return 1; + if( type == "SM" ) return 36; + if( type == "LMR" ) return 324; + if( type == "TT" ) return 2448; + if( type == "RING" ) return 171; + + return -1; +} + +int TBarrelRegions::GetRegionId(const int iEta, const int iPhi, const std::string& type) +{ + if( (iEta < -85) || (iEta == 0) || (iEta > 85) ) return -1; + if( (iPhi < 1) || (iPhi > 360) ) return -1; + + if( type == "ALL" ) + { + return 0; + } + if( type == "SM" ) + { + return iSM[iEta+85][iPhi-1]; + } + if( type == "LMR" ) + { + return iLMR[iEta+85][iPhi-1]; + } + if( type == "TT" ) + { + return iTT[iEta+85][iPhi-1]; + } + if( type == "RING" ) + { + return iBarrelRings[iEta+85][iPhi-1]; + } + return -1; +} + + + +// ---- geometry functions ---- +int TBarrelRegions::GetNRegionsIeta(const std::string& type) +{ + if( type == "SM" ) return 36; + if( type == "LMR" ) return 5; + if( type == "TT" ) return 17; + if( type == "RING" ) return 171; + + + return -1; +} + + +int TBarrelRegions::GetRegionIdIeta(const int& regionId, const std::string& type) +{ + if( type == "LMR" ) + { + return ( LmrEtaMap[regionId] ); + } + if( type == "SM" ) + { + return regionId; + } + if( type == "RING" ) + { + return regionId; + } + + return -1; + + //-------------------------------- + + // int nPhiRegions; + // float regionEtaWidth; + // float regionPhiWidth; + + // if( type == "SM" ) + // { + // nPhiRegions = 18; + // regionEtaWidth = 85.; + // regionPhiWidth = 20.; + // } + // if( type == "TT" ) + // { + // nPhiRegions = 72; + // regionEtaWidth = 5.; + // regionPhiWidth = 5.; + // } + + // iPhi = regionPhiWidth/2. + regionPhiWidth * (regionId % nPhiRegions); + // iEta = regionEtaWidth/2. + regionPhiWidth * (regionId / nPhiRegions); + + // iPhi += 1.; + // if( iEta < 75 ) iEta = -1. * (iEta+1.); + // if( iEta >= 75 ) iEta -= 74.; +} + + diff --git a/EOverPCalibration/FastCalibrator/src/setTDRStyle.cc b/EOverPCalibration/FastCalibrator/src/setTDRStyle.cc new file mode 100755 index 00000000000..5818b23dc26 --- /dev/null +++ b/EOverPCalibration/FastCalibrator/src/setTDRStyle.cc @@ -0,0 +1,168 @@ +#include "../interface/setTDRStyle.h" + + + +void setTDRStyle() +{ + TStyle* tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); + + // For the canvas: + tdrStyle->SetCanvasBorderMode(0); + tdrStyle->SetCanvasColor(kWhite); + tdrStyle->SetCanvasDefH(600); //Height of canvas + tdrStyle->SetCanvasDefW(700); //Width of canvas + //tdrStyle->SetCanvasDefW(800); //Width of canvas + tdrStyle->SetCanvasDefX(0); //POsition on screen + tdrStyle->SetCanvasDefY(0); + + // For the Pad: + tdrStyle->SetPadBorderMode(0); + // tdrStyle->SetPadBorderSize(Width_t size = 1); + tdrStyle->SetPadColor(kWhite); + tdrStyle->SetPadGridX(false); + tdrStyle->SetPadGridY(false); + tdrStyle->SetGridColor(0); + tdrStyle->SetGridStyle(3); + tdrStyle->SetGridWidth(1); + + // For the frame: + tdrStyle->SetFrameBorderMode(0); + tdrStyle->SetFrameBorderSize(1); + tdrStyle->SetFrameFillColor(0); + tdrStyle->SetFrameFillStyle(0); + tdrStyle->SetFrameLineColor(1); + tdrStyle->SetFrameLineStyle(1); + tdrStyle->SetFrameLineWidth(1); + + // For the histo: + // tdrStyle->SetHistFillColor(1); + // tdrStyle->SetHistFillStyle(0); + tdrStyle->SetHistLineColor(1); + tdrStyle->SetHistLineStyle(0); + tdrStyle->SetHistLineWidth(1); + // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); + // tdrStyle->SetNumberContours(Int_t number = 20); + + tdrStyle->SetEndErrorSize(2); + // tdrStyle->SetErrorMarker(20); + //tdrStyle->SetErrorX(0.); + + tdrStyle->SetMarkerStyle(20); + + //For the fit/function: + tdrStyle->SetOptFit(0); + tdrStyle->SetFitFormat("5.4g"); + tdrStyle->SetFuncColor(2); + tdrStyle->SetFuncStyle(1); + tdrStyle->SetFuncWidth(1); + + //For the date: + tdrStyle->SetOptDate(0); + // tdrStyle->SetDateX(Float_t x = 0.01); + // tdrStyle->SetDateY(Float_t y = 0.01); + + // For the statistics box: + tdrStyle->SetOptFile(0); + tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); + tdrStyle->SetStatColor(kWhite); + tdrStyle->SetStatFont(42); + tdrStyle->SetStatFontSize(0.025); + tdrStyle->SetStatTextColor(1); + tdrStyle->SetStatFormat("6.4g"); + tdrStyle->SetStatBorderSize(1); + tdrStyle->SetStatH(0.1); + tdrStyle->SetStatW(0.15); + // tdrStyle->SetStatStyle(Style_t style = 1001); + // tdrStyle->SetStatX(Float_t x = 0); + // tdrStyle->SetStatY(Float_t y = 0); + + // Margins: + tdrStyle->SetPadTopMargin(0.05); + tdrStyle->SetPadBottomMargin(0.13); + tdrStyle->SetPadLeftMargin(0.13); + tdrStyle->SetPadRightMargin(0.17); + //tdrStyle->SetPadRightMargin(0.25); + + // For the Global title: + tdrStyle->SetOptTitle(0); + tdrStyle->SetTitleFont(42); + tdrStyle->SetTitleColor(1); + tdrStyle->SetTitleTextColor(1); + tdrStyle->SetTitleFillColor(10); + tdrStyle->SetTitleFontSize(0.05); + // tdrStyle->SetTitleH(0); // Set the height of the title box + // tdrStyle->SetTitleW(0); // Set the width of the title box + // tdrStyle->SetTitleX(0); // Set the position of the title box + // tdrStyle->SetTitleY(0.985); // Set the position of the title box + // tdrStyle->SetTitleStyle(Style_t style = 1001); + // tdrStyle->SetTitleBorderSize(2); + + // For the axis titles: + tdrStyle->SetTitleColor(1, "XYZ"); + tdrStyle->SetTitleFont(42, "XYZ"); + tdrStyle->SetTitleSize(0.05, "XYZ"); + // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? + // tdrStyle->SetTitleYSize(Float_t size = 0.02); + tdrStyle->SetTitleXOffset(1.20); + tdrStyle->SetTitleYOffset(1.40); + tdrStyle->SetTitleOffset(1.30, "Z"); + // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset + + // For the axis labels: + tdrStyle->SetLabelColor(1, "XYZ"); + tdrStyle->SetLabelFont(42, "XYZ"); + tdrStyle->SetLabelOffset(0.005, "XYZ"); + tdrStyle->SetLabelSize(0.04, "XYZ"); + + // For the axis: + tdrStyle->SetAxisColor(1, "XYZ"); + tdrStyle->SetStripDecimals(kTRUE); + tdrStyle->SetTickLength(0.03, "XYZ"); + tdrStyle->SetNdivisions(510, "XYZ"); + tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame + tdrStyle->SetPadTickY(1); + + // Change for log plots: + tdrStyle->SetOptLogx(0); + tdrStyle->SetOptLogy(0); + tdrStyle->SetOptLogz(0); + + // Postscript options: + tdrStyle->SetPaperSize(20.,20.); + // tdrStyle->SetLineScalePS(Float_t scale = 3); + // tdrStyle->SetLineStyleString(Int_t i, const char* text); + // tdrStyle->SetHeaderPS(const char* header); + // tdrStyle->SetTitlePS(const char* pstitle); + + //tdrStyle->SetBarOffset(Float_t baroff = 0.5); + //tdrStyle->SetBarWidth(Float_t barwidth = 0.5); + //tdrStyle->SetPaintTextFormat(const char* format = "g"); + tdrStyle->SetPalette(1); + //tdrStyle->SetTimeOffset(Double_t toffset); + //tdrStyle->SetHistMinimumZero(kTRUE); + + + + const Int_t NRGBs = 5; + const Int_t NCont = 255; + + Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; + Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; + Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; + Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + tdrStyle->SetNumberContours(NCont); + + //TLatex *lab = new TLatex(0.70,0.85, "CMS 2008"); + //lab->SetNDC(); + //lab->SetTextFont(42); + //lab->SetTextSize(0.05); + //lab->Draw("same"); + + + + gROOT -> ForceStyle(); + + tdrStyle->cd(); +} diff --git a/EOverPCalibration/NtuplePackage/BuildFile.xml b/EOverPCalibration/NtuplePackage/BuildFile.xml new file mode 100644 index 00000000000..39cdb79b8a2 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/BuildFile.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h b/EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h new file mode 100644 index 00000000000..39b5b7733bf --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h @@ -0,0 +1,77 @@ +// H4ConfigFileLine.h +// +// A class representing a (continued) line in the configuration +// file, that is a pair of an option name and a (list of) value(s) +// +// last change : $Date: 2012/02/12 20:14:50 $ +// by : $Author: rgerosa $ +// + +#ifndef CONFIGFILELINE_H +#define CONFIGFILELINE_H + +#include +#include + +class ConfigFileLine { + public: + + //! Constructor with name of the option and a single option value (no list!) + ConfigFileLine(const std::string &option, const std::string &value=""); + + //! Destructor: Does currently nothing + virtual ~ConfigFileLine(); + + //! Append the option name of another ConfigFileLine as value + void append(const ConfigFileLine &other); + + //! Append the values of another ConfigFileLine + void appendList(const ConfigFileLine &other); + + //! Check whether name of option is "name" + bool isOption(const std::string &name) const{ + return name==option; + } + + //! Check whether the option line has a name, i.e. is defined + bool isDefined() const{ + return option.length(); + } + + //! Return the list of configuration values + std::list getValues() const{ + // This operation is somewhat time-consuming! + return values; + } + + //! Sets the list of configuration values + void setValues(const std::list &v){ + values=v; + } + + //! Get option name + const std::string &getOptionName() const{ + return option; + } + + //! Sets the scope by prepending "scope":: to the option name + void setScope(const std::string &scope); + + //! Print the contents of the rule to stdout + void print() const; + + //! stream operator + friend std::ostream & operator<< (std::ostream & out, const ConfigFileLine & line) ; + + private: + + std::string option; //!< The name of the option + std::list values; //!< The list of option values + + //! For convinience a ValueIterator type is defined which walks along + //! the list of option strings + typedef std::list::const_iterator ValueIterator; + +}; + +#endif // #ifndef CONFIGFILELINE diff --git a/EOverPCalibration/NtuplePackage/interface/ConfigParser.h b/EOverPCalibration/NtuplePackage/interface/ConfigParser.h new file mode 100644 index 00000000000..02d25c089ee --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/ConfigParser.h @@ -0,0 +1,95 @@ +// ConfigParser.h +// +// A class representing the configuration of the analysis program, +// gathered from the configuration file and the command line +// +// last change : $Date: 2012/02/12 20:14:50 $ +// by : $Author: rgerosa $ +// + +#ifndef CONFIGPARSER_H +#define CONFIGPARSER_H + +#include "ConfigFileLine.h" +#include "TROOT.h" +#include "TObject.h" + +#include "stdio.h" +#include +#include + +class ConfigParser { + public: + + + FILE *config_file; + + // Constructor which does basically nothing + ConfigParser(); + + // Initialize configuration using the command line arguments + bool init(const char *fileName=0); + + // Destructor: Deletes the entries in the list of configuration file lines + virtual ~ConfigParser(); + + // Append the option name of another ConfigFileLine as value + void appendLine(ConfigFileLine *line); + + // Deletes a line from the already parsed configuration file lines + bool deleteLine(const char *name, const char *scope=0); + + // Override an option + bool overrideOption(const char *name, std::list &values, + const char *scope = 0); + + // Is this option defined? + bool isDefined(const char *name) const; + + // Read Integer Option + int readIntOption(const char *name) const throw(const char *); + + // Read Double Option + double readDoubleOption(const char *name) const throw(const char *); + + // Read Float Option + float readFloatOption(const char *name) const throw(const char *); + + // Read bool Option + const bool readBoolOption(const char *name) const throw(const char *); + + // Read Integer Option + const char *readStringOption(const char *name) const throw(const char *); + + // Read Integer List Option + std::vector readIntListOption(const char *name) const throw(const char *); + + // Read Double List Option + std::vector readDoubleListOption(const char *name) + const throw(const char *); + + // Read String List Option + std::vector readStringListOption(const char *name) + const throw(const char *); + + // Print all options + void print() const; + + //! stream operator + friend std::ostream & operator<< (std::ostream & out, const ConfigParser & conf) ; + + private: + + std::list configLines; //!< A list of configuration file lines + + //! For convinience a ValueIterator type is defined which walks along + //! the list of option strings + typedef std::list::const_iterator LineIterator; + +}; + +// Do not forget to define the global variables so that rootcint +// produces the necessary stub +R__EXTERN ConfigParser *gConfigParser; + +#endif // #ifndef CONFIGPARSER_H diff --git a/EOverPCalibration/NtuplePackage/interface/LHEReader.h b/EOverPCalibration/NtuplePackage/interface/LHEReader.h new file mode 100644 index 00000000000..776fdb4975e --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/LHEReader.h @@ -0,0 +1,74 @@ +#ifndef LHEReader_h +#define LHEReader_h + +#include +#include +#include +#include +#include + + + +class LHEReader +{ + public: + + //! ctor + LHEReader(const std::string& LHEFileName); + + //! dtor + ~LHEReader(); + + //! methods + bool GetNextEvent(); + void PrintEvent(); + + int GetNUP() { return NUP; }; + int GetIDPRUP() { return IDPRUP; }; + float GetXWGTUP() { return XWGTUP; }; + float GetSCALUP() { return SCALUP; }; + float GetAQEDUP() { return AQEDUP; }; + float GetAQCDUP() { return AQCDUP; }; + + std::vector GetIDUP() { return IDUP; }; + std::vector GetISTUP() { return ISTUP; }; + std::vector GetMOTH1UP() { return MOTH1UP; }; + std::vector GetMOTH2UP() { return MOTH2UP; }; + std::vector GetICOL1UP() { return ICOL1UP; }; + std::vector GetICOL2UP() { return ICOL2UP; }; + std::vector GetPXUP() { return PXUP; }; + std::vector GetPYUP() { return PYUP; }; + std::vector GetPZUP() { return PZUP; }; + std::vector GetPEUP() { return PEUP; }; + std::vector GetPMUP() { return PMUP; }; + std::vector GetVTIMUP() { return VTIMUP; }; + std::vector GetSPINUP() { return SPINUP; }; + + + + private: + + int NUP; + int IDPRUP; + float XWGTUP; + float SCALUP; + float AQEDUP; + float AQCDUP; + + std::ifstream* m_LHEFile; + std::vector IDUP; + std::vector ISTUP; + std::vector MOTH1UP; + std::vector MOTH2UP; + std::vector ICOL1UP; + std::vector ICOL2UP; + std::vector PXUP; + std::vector PYUP; + std::vector PZUP; + std::vector PEUP; + std::vector PMUP; + std::vector VTIMUP; + std::vector SPINUP; +}; + +#endif diff --git a/EOverPCalibration/NtuplePackage/interface/LinkDef.h b/EOverPCalibration/NtuplePackage/interface/LinkDef.h new file mode 100644 index 00000000000..f66d3f12402 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/LinkDef.h @@ -0,0 +1,19 @@ +#ifndef ROOT_TREE_VECTOR_LINKDEF_H +#define ROOT_TREE_VECTOR_LINKDEF_H 1 + +#include "Math/Vector4D.h" + +#ifdef __CINT__ + +#pragma link off all classes; +#pragma link off all function; + +#pragma link C++ class std::vector; +#pragma link C++ function deltaEta (const double&, const double&); +#pragma link C++ function deltaPhi (const double&, const double&); +#pragma link C++ function deltaR (const double&, const double&, const double&, const double&); + +#endif + +#endif + diff --git a/EOverPCalibration/NtuplePackage/interface/h2Chain.h b/EOverPCalibration/NtuplePackage/interface/h2Chain.h new file mode 100644 index 00000000000..a12aaf41e3f --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/h2Chain.h @@ -0,0 +1,37 @@ +#ifndef h2Chain_h +#define h2Chain_h + +#include "TROOT.h" +#include "TH1.h" +#include "TH2.h" +#include "TFile.h" +#include "THStack.h" +//#include "TCanvas.h" +#include "TPad.h" + +#include + + +struct h2Chain +{ + h2Chain (TString baseName, TString baseTitle, + int nbinsx, double minx, double maxx, + int nbinsy, double miny, double maxy, int NUM) ; + ~h2Chain () ; + + void SetColors (std::vector colors) ; + void Fill (int i, double valx, double valy) ; + void Fill (int i, double valx, double valy, double weight) ; + // void Print (bool isLog = false, int rebinx = 1, int rebiny = 1) ; + // void PrintEach () ; + void Scale (int index, double factor) ; + void Write (const std::string& dirName, TFile & outputFile) ; + + private : + + TString m_baseName ; + std::vector m_histos ; + +} ; + +#endif diff --git a/EOverPCalibration/NtuplePackage/interface/hChain.h b/EOverPCalibration/NtuplePackage/interface/hChain.h new file mode 100644 index 00000000000..05baba5f1f3 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/hChain.h @@ -0,0 +1,46 @@ +#ifndef hChain_h +#define hChain_h + +#include "TROOT.h" +#include "TH1.h" +#include "TH2.h" +#include "TFile.h" +#include "THStack.h" +#include "TCanvas.h" +#include "TNtuple.h" + +#include + + +struct hChain +{ + hChain (TString baseName, TString baseTitle, + int nbins, double min, double max, int NUM) ; + virtual ~hChain (); + + void SetColors (std::vector colors) ; + void Fill (int i, double val) ; + double GetEffectiveEntries(int index); + TH1F* GetHisto (int index); + void SetBinContent (int i, int bin, double val) ; + void SetBinError (int i, int bin, double val) ; + void Print (bool isLog = false, int rebin = 1, TString altName = "default") ; + void PrintEach (bool isLog = false, int rebin = 1) ; + void Normalize (int index) ; + void Scale (int index, double factor) ; + void Reset(); + void Write (TFile & outputFile) ; + void Write (const std::string& dirName, TFile & outputFile) ; + unsigned int Size() { return m_histos.size(); }; + + + private : + + TString m_baseName ; + std::vector m_histos ; + + double findNMin () ; + double findNMax () ; +} ; + +#endif diff --git a/EOverPCalibration/NtuplePackage/interface/ntpleUtils.h b/EOverPCalibration/NtuplePackage/interface/ntpleUtils.h new file mode 100644 index 00000000000..e5c14d844ad --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/ntpleUtils.h @@ -0,0 +1,51 @@ +#ifndef ntpleUtils_h +#define ntpleUtils_h + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "TFile.h" +#include "TH1F.h" +#include "TChain.h" +#include "TVector3.h" +#include "Math/Vector3D.h" +#include "Math/Vector4D.h" +#include "Math/Boost.h" + + + +bool maggiore(double i, double j); + + + +/** get the number of events from a list of files */ +std::map GetTotalEvents(const std::string& histoName, const std::string& inputFileList); +TH1F* GetTotalHisto(const std::string& histoName, const std::string& inputFileList); +std::map GetBinLabels(const std::string& histoName, const std::string& inputFileList); + +/** fill a chain from a list of files */ +bool FillChain(TChain& chain, const std::string& inputFileList); + + +/** compute delta phi */ +double deltaPhi (const double& phi1, const double& phi2); + +/** compute delta eta */ +double deltaEta (const double& eta1, const double& eta2); + +/** compute delta R */ +double deltaR (const double& eta1, const double& phi1, + const double& eta2, const double& phi2); + + + +/** print 4-vector */ +void Print4V(const ROOT::Math::XYZTVector& p); + +#endif diff --git a/EOverPCalibration/NtuplePackage/interface/readJSONFile.h b/EOverPCalibration/NtuplePackage/interface/readJSONFile.h new file mode 100644 index 00000000000..34e29f6f744 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/readJSONFile.h @@ -0,0 +1,23 @@ +#ifndef readJSONFile_h +#define readJSONFile_h + +#include +#include +#include +#include +#include +#include +#include + + + + + +std::map > > + readJSONFile(const std::string& inFileName); + +bool AcceptEventByRunAndLumiSection(const int& runId, const int& lumiId, + std::map > >& jsonMap); + + +#endif diff --git a/EOverPCalibration/NtuplePackage/interface/setTDRStyle.h b/EOverPCalibration/NtuplePackage/interface/setTDRStyle.h new file mode 100755 index 00000000000..3da88767dd1 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/setTDRStyle.h @@ -0,0 +1,15 @@ +#ifndef setTDRStyle_h +#define setTDRStyle_h + +#include + +#include "TStyle.h" +#include "TColor.h" + + + +void setTDRStyle(); + +int getColor(const int& i); + +#endif diff --git a/EOverPCalibration/NtuplePackage/interface/treeReader.h b/EOverPCalibration/NtuplePackage/interface/treeReader.h new file mode 100644 index 00000000000..3c4ea2b2f14 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/interface/treeReader.h @@ -0,0 +1,70 @@ +#ifndef treeReader_h +#define treeReader_h + +#include +#include +#include +#include + +#include "TFile.h" +#include "TTree.h" +#include "TMath.h" +#include "Math/Vector4D.h" +#include "Math/Vector3D.h" +#include "TBranch.h" +#include "TBranchElement.h" +#include "TLeaf.h" + + +class treeReader +{ + public: + + treeReader (TTree *, bool verbosity = false) ; + ~treeReader () ; + + void GetEntry (int iEvent) {m_tree->GetEntry (iEvent) ; } ; + int GetEntries () {return m_tree->GetEntries () ; } ; + + std::vector* Get3V (const std::string &name); + std::vector* Get4V (const std::string &name); + std::vector* GetDouble(const std::string &name); + std::vector* GetFloat (const std::string &name); + std::vector* GetInt (const std::string &name); + std::vector* GetBool (const std::string &name); + std::vector* GetString(const std::string &name); + + ROOT::Math::XYZVector* get3V (const std::string &name); + ROOT::Math::XYZTVector* get4V (const std::string &name); + double* getDouble(const std::string &name); + float* getFloat (const std::string &name); + int* getInt (const std::string &name); + bool* getBool (const std::string &name); + std::string* getString(const std::string &name); + + private: + + std::map * > m_3Vvectors ; + std::map * > m_4Vvectors ; + std::map * > m_Dvectors ; + std::map * > m_Fvectors ; + std::map * > m_Ivectors ; + std::map * > m_Bvectors ; + std::map * > m_Svectors ; + + std::map k_3Vvectors ; + std::map k_4Vvectors ; + std::map k_Dvectors ; + std::map k_Fvectors ; + std::map k_Ivectors ; + std::map k_Bvectors ; + std::map k_Svectors ; + + + TTree * m_tree ; + bool m_verbosity ; + +} ; + +#endif + diff --git a/EOverPCalibration/NtuplePackage/obj/mydict.cc b/EOverPCalibration/NtuplePackage/obj/mydict.cc new file mode 100644 index 00000000000..bdb8aec6c9c --- /dev/null +++ b/EOverPCalibration/NtuplePackage/obj/mydict.cc @@ -0,0 +1,858 @@ +// +// File generated by rootcint at Wed Jun 5 10:42:56 2013 + +// Do NOT change. Changes will be lost next time file is generated +// + +#define R__DICTIONARY_FILENAME dOdOdIobjdImydict +#include "RConfig.h" //rootcint 4834 +#if !defined(R__ACCESS_IN_SYMBOL) +//Break the privacy of classes -- Disabled for the moment +#define private public +#define protected public +#endif + +// Since CINT ignores the std namespace, we need to do so in this file. +namespace std {} using namespace std; +#include "mydict.h" + +#include "TCollectionProxyInfo.h" +#include "TClass.h" +#include "TBuffer.h" +#include "TMemberInspector.h" +#include "TError.h" + +#ifndef G__ROOT +#define G__ROOT +#endif + +#include "RtypesImp.h" +#include "TIsAProxy.h" +#include "TFileMergeInfo.h" + +// START OF SHADOWS + +namespace ROOT { + namespace Shadow { + } // of namespace Shadow +} // of namespace ROOT +// END OF SHADOWS + +namespace ROOT { + void vectorlEfloatgR_ShowMembers(void *obj, TMemberInspector &R__insp); + static void vectorlEfloatgR_Dictionary(); + static void *new_vectorlEfloatgR(void *p = 0); + static void *newArray_vectorlEfloatgR(Long_t size, void *p); + static void delete_vectorlEfloatgR(void *p); + static void deleteArray_vectorlEfloatgR(void *p); + static void destruct_vectorlEfloatgR(void *p); + + // Function generating the singleton type initializer + static TGenericClassInfo *GenerateInitInstanceLocal(const vector*) + { + vector *ptr = 0; + static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector),0); + static ::ROOT::TGenericClassInfo + instance("vector", -2, "vector.dll", 0, + typeid(vector), DefineBehavior(ptr, ptr), + 0, &vectorlEfloatgR_Dictionary, isa_proxy, 0, + sizeof(vector) ); + instance.SetNew(&new_vectorlEfloatgR); + instance.SetNewArray(&newArray_vectorlEfloatgR); + instance.SetDelete(&delete_vectorlEfloatgR); + instance.SetDeleteArray(&deleteArray_vectorlEfloatgR); + instance.SetDestructor(&destruct_vectorlEfloatgR); + instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector >())); + return &instance; + } + // Static variable to force the class initialization + static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstanceLocal((const vector*)0x0); R__UseDummy(_R__UNIQUE_(Init)); + + // Dictionary for non-ClassDef classes + static void vectorlEfloatgR_Dictionary() { + ::ROOT::GenerateInitInstanceLocal((const vector*)0x0)->GetClass(); + } + +} // end of namespace ROOT + +namespace ROOT { + // Wrappers around operator new + static void *new_vectorlEfloatgR(void *p) { + return p ? ::new((::ROOT::TOperatorNewHelper*)p) vector : new vector; + } + static void *newArray_vectorlEfloatgR(Long_t nElements, void *p) { + return p ? ::new((::ROOT::TOperatorNewHelper*)p) vector[nElements] : new vector[nElements]; + } + // Wrapper around operator delete + static void delete_vectorlEfloatgR(void *p) { + delete ((vector*)p); + } + static void deleteArray_vectorlEfloatgR(void *p) { + delete [] ((vector*)p); + } + static void destruct_vectorlEfloatgR(void *p) { + typedef vector current_t; + ((current_t*)p)->~current_t(); + } +} // end of namespace ROOT for class vector + +/******************************************************** +* ../obj/mydict.cc +* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED +* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). +* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. +********************************************************/ + +#ifdef G__MEMTEST +#undef malloc +#undef free +#endif + +#if defined(__GNUC__) && __GNUC__ >= 4 && ((__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >= 1) || (__GNUC_MINOR__ >= 3)) +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + +extern "C" void G__cpp_reset_tagtablemydict(); + +extern "C" void G__set_cpp_environmentmydict() { + G__cpp_reset_tagtablemydict(); +} +#include +extern "C" int G__cpp_dllrevmydict() { return(30051515); } + +/********************************************************* +* Member function Interface Method +*********************************************************/ + +/* Setting up global function */ +static int G__mydict__0_2602(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) +{ + G__letdouble(result7, 100, (double) deltaPhi(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__mydict__0_2603(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) +{ + G__letdouble(result7, 100, (double) deltaEta(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__mydict__0_2604(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) +{ + G__letdouble(result7, 100, (double) deltaR(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]) +, *(double*) G__Doubleref(&libp->para[2]), *(double*) G__Doubleref(&libp->para[3]))); + return(1 || funcname || hash || result7 || libp) ; +} + + +/********************************************************* +* Member function Stub +*********************************************************/ + +/********************************************************* +* Global function Stub +*********************************************************/ + +/********************************************************* +* Get size of pointer to member function +*********************************************************/ +class G__Sizep2memfuncmydict { + public: + G__Sizep2memfuncmydict(): p(&G__Sizep2memfuncmydict::sizep2memfunc) {} + size_t sizep2memfunc() { return(sizeof(p)); } + private: + size_t (G__Sizep2memfuncmydict::*p)(); +}; + +size_t G__get_sizep2memfuncmydict() +{ + G__Sizep2memfuncmydict a; + G__setsizep2memfunc((int)a.sizep2memfunc()); + return((size_t)a.sizep2memfunc()); +} + + +/********************************************************* +* virtual base class offset calculation interface +*********************************************************/ + + /* Setting up class inheritance */ + +/********************************************************* +* Inheritance information setup/ +*********************************************************/ +extern "C" void G__cpp_setup_inheritancemydict() { + + /* Setting up class inheritance */ +} + +/********************************************************* +* typedef information setup/ +*********************************************************/ +extern "C" void G__cpp_setup_typetablemydict() { + + /* Setting up typedef entry */ + G__search_typename2("value_type",102,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("pointer",70,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_pointer",70,-1,256,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reference",102,-1,1,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_reference",102,-1,257,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("size_type",107,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("difference_type",108,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_iterator",117,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator),256,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("list",117,G__get_linked_tagnum(&G__mydictLN_listlEstringcOallocatorlEstringgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("list",117,G__get_linked_tagnum(&G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TVectorT",117,G__get_linked_tagnum(&G__mydictLN_TVectorTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TVectorT",117,G__get_linked_tagnum(&G__mydictLN_TVectorTlEdoublegR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTBase",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTBaselEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTBase",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTBaselEdoublegR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixT",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTRow_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTRow_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTColumn_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTColumn_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTDiag_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTDiag_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTFlat_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTFlat_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSub_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSub_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseRow_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseRow_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseDiag_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseDiag_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTRow",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTRowlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTColumn",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTColumnlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTDiag",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTDiaglEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTFlat",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTFlatlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSub",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSublEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseRow",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseRowlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseDiag",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseDiaglEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TElementActionT",117,G__get_linked_tagnum(&G__mydictLN_TElementActionTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TElementPosActionT",117,G__get_linked_tagnum(&G__mydictLN_TElementPosActionTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map > >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,allocator > > >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,allocator > >,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector,ROOT::Math::DefaultCoordinateSystemTag> >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector > >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >,allocator > > >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >,allocator > > >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); +} + +/********************************************************* +* Data Member information setup/ +*********************************************************/ + + /* Setting up class,struct,union tag member variable */ +extern "C" void G__cpp_setup_memvarmydict() { +} +/*********************************************************** +************************************************************ +************************************************************ +************************************************************ +************************************************************ +************************************************************ +************************************************************ +***********************************************************/ + +/********************************************************* +* Member function information setup for each class +*********************************************************/ + +/********************************************************* +* Member function information setup +*********************************************************/ +extern "C" void G__cpp_setup_memfuncmydict() { +} + +/********************************************************* +* Global variable information setup for each class +*********************************************************/ +static void G__cpp_setup_global0() { + + /* Setting up global variables */ + G__resetplocal(); + +} + +static void G__cpp_setup_global1() { +} + +static void G__cpp_setup_global2() { +} + +static void G__cpp_setup_global3() { +} + +static void G__cpp_setup_global4() { + + G__resetglobalenv(); +} +extern "C" void G__cpp_setup_globalmydict() { + G__cpp_setup_global0(); + G__cpp_setup_global1(); + G__cpp_setup_global2(); + G__cpp_setup_global3(); + G__cpp_setup_global4(); +} + +/********************************************************* +* Global function information setup for each class +*********************************************************/ +static void G__cpp_setup_func0() { + G__lastifuncposition(); + +} + +static void G__cpp_setup_func1() { +} + +static void G__cpp_setup_func2() { +} + +static void G__cpp_setup_func3() { +} + +static void G__cpp_setup_func4() { +} + +static void G__cpp_setup_func5() { +} + +static void G__cpp_setup_func6() { +} + +static void G__cpp_setup_func7() { +} + +static void G__cpp_setup_func8() { +} + +static void G__cpp_setup_func9() { +} + +static void G__cpp_setup_func10() { +} + +static void G__cpp_setup_func11() { +} + +static void G__cpp_setup_func12() { +} + +static void G__cpp_setup_func13() { +} + +static void G__cpp_setup_func14() { +} + +static void G__cpp_setup_func15() { +} + +static void G__cpp_setup_func16() { +} + +static void G__cpp_setup_func17() { +} + +static void G__cpp_setup_func18() { +} + +static void G__cpp_setup_func19() { +} + +static void G__cpp_setup_func20() { +} + +static void G__cpp_setup_func21() { +} + +static void G__cpp_setup_func22() { +} + +static void G__cpp_setup_func23() { +} + +static void G__cpp_setup_func24() { +} + +static void G__cpp_setup_func25() { + G__memfunc_setup("deltaPhi", 811, G__mydict__0_2602, 100, -1, -1, 0, 2, 1, 1, 0, +"d - - 11 - phi1 d - - 11 - phi2", (char*) NULL +, (void*) NULL, 0); + G__memfunc_setup("deltaEta", 804, G__mydict__0_2603, 100, -1, -1, 0, 2, 1, 1, 0, +"d - - 11 - eta1 d - - 11 - eta2", (char*) NULL +, (void*) NULL, 0); + G__memfunc_setup("deltaR", 604, G__mydict__0_2604, 100, -1, -1, 0, 4, 1, 1, 0, +"d - - 11 - eta1 d - - 11 - phi1 " +"d - - 11 - eta2 d - - 11 - phi2", (char*) NULL +, (void*) NULL, 0); +} + +static void G__cpp_setup_func26() { +} + +static void G__cpp_setup_func27() { +} + +static void G__cpp_setup_func28() { + + G__resetifuncposition(); +} + +extern "C" void G__cpp_setup_funcmydict() { + G__cpp_setup_func0(); + G__cpp_setup_func1(); + G__cpp_setup_func2(); + G__cpp_setup_func3(); + G__cpp_setup_func4(); + G__cpp_setup_func5(); + G__cpp_setup_func6(); + G__cpp_setup_func7(); + G__cpp_setup_func8(); + G__cpp_setup_func9(); + G__cpp_setup_func10(); + G__cpp_setup_func11(); + G__cpp_setup_func12(); + G__cpp_setup_func13(); + G__cpp_setup_func14(); + G__cpp_setup_func15(); + G__cpp_setup_func16(); + G__cpp_setup_func17(); + G__cpp_setup_func18(); + G__cpp_setup_func19(); + G__cpp_setup_func20(); + G__cpp_setup_func21(); + G__cpp_setup_func22(); + G__cpp_setup_func23(); + G__cpp_setup_func24(); + G__cpp_setup_func25(); + G__cpp_setup_func26(); + G__cpp_setup_func27(); + G__cpp_setup_func28(); +} + +/********************************************************* +* Class,struct,union,enum tag information setup +*********************************************************/ +/* Setup class/struct taginfo */ +G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator = { "vector >::iterator" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_listlEstringcOallocatorlEstringgRsPgR = { "list >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR = { "iterator" , 115 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEintcOallocatorlEintgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR = { "list >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TVectorTlEfloatgR = { "TVectorT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TVectorTlEdoublegR = { "TVectorT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTBaselEfloatgR = { "TMatrixTBase" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTBaselEdoublegR = { "TMatrixTBase" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TElementActionTlEfloatgR = { "TElementActionT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TElementPosActionTlEfloatgR = { "TElementPosActionT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTlEfloatgR = { "TMatrixT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTRow_constlEfloatgR = { "TMatrixTRow_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTRowlEfloatgR = { "TMatrixTRow" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTDiag_constlEfloatgR = { "TMatrixTDiag_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTColumn_constlEfloatgR = { "TMatrixTColumn_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTFlat_constlEfloatgR = { "TMatrixTFlat_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSub_constlEfloatgR = { "TMatrixTSub_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseRow_constlEfloatgR = { "TMatrixTSparseRow_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseDiag_constlEfloatgR = { "TMatrixTSparseDiag_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTColumnlEfloatgR = { "TMatrixTColumn" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTDiaglEfloatgR = { "TMatrixTDiag" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTFlatlEfloatgR = { "TMatrixTFlat" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSublEfloatgR = { "TMatrixTSub" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseRowlEfloatgR = { "TMatrixTSparseRow" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseDiaglEfloatgR = { "TMatrixTSparseDiag" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR = { "vector,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR = { "reverse_iterator,allocator > >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR = { "map,allocator > >,less,allocator,allocator > > > > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR = { "vector,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR = { "reverse_iterator,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR = { "vector >,allocator > > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR = { "reverse_iterator >,allocator > > >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR = { "map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*,less,allocator,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR = { "map >,allocator > > >*,less,allocator >,allocator > > >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR = { "map,ROOT::Math::DefaultCoordinateSystemTag>*,less,allocator,ROOT::Math::DefaultCoordinateSystemTag>*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; + +/* Reset class/struct taginfo */ +extern "C" void G__cpp_reset_tagtablemydict() { + G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_listlEstringcOallocatorlEstringgRsPgR.tagnum = -1 ; + G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR.tagnum = -1 ; + G__mydictLN_vectorlEintcOallocatorlEintgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR.tagnum = -1 ; + G__mydictLN_TVectorTlEfloatgR.tagnum = -1 ; + G__mydictLN_TVectorTlEdoublegR.tagnum = -1 ; + G__mydictLN_TMatrixTBaselEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTBaselEdoublegR.tagnum = -1 ; + G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_TElementActionTlEfloatgR.tagnum = -1 ; + G__mydictLN_TElementPosActionTlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTRow_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTRowlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTDiag_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTColumn_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTFlat_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSub_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseRow_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseDiag_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTColumnlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTDiaglEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTFlatlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSublEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseRowlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseDiaglEfloatgR.tagnum = -1 ; + G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR.tagnum = -1 ; +} + + +extern "C" void G__cpp_setup_tagtablemydict() { + + /* Setting up class,struct,union tag entry */ + G__tagtable_setup(G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR),0,-1,36608,(char*)NULL,NULL,NULL); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_listlEstringcOallocatorlEstringgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TVectorTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TVectorTlEdoublegR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTBaselEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTBaselEdoublegR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TElementActionTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TElementPosActionTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTRow_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTRowlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTDiag_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTColumn_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTFlat_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSub_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseRow_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseDiag_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTColumnlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTDiaglEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTFlatlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSublEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseRowlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseDiaglEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR); +} +extern "C" void G__cpp_setupmydict(void) { + G__check_setup_version(30051515,"G__cpp_setupmydict()"); + G__set_cpp_environmentmydict(); + G__cpp_setup_tagtablemydict(); + + G__cpp_setup_inheritancemydict(); + + G__cpp_setup_typetablemydict(); + + G__cpp_setup_memvarmydict(); + + G__cpp_setup_memfuncmydict(); + G__cpp_setup_globalmydict(); + G__cpp_setup_funcmydict(); + + if(0==G__getsizep2memfunc()) G__get_sizep2memfuncmydict(); + return; +} +class G__cpp_setup_initmydict { + public: + G__cpp_setup_initmydict() { G__add_setup_func("mydict",(G__incsetup)(&G__cpp_setupmydict)); G__call_setup_funcs(); } + ~G__cpp_setup_initmydict() { G__remove_setup_func("mydict"); } +}; +G__cpp_setup_initmydict G__cpp_setup_initializermydict; + diff --git a/EOverPCalibration/NtuplePackage/obj/mydict.h b/EOverPCalibration/NtuplePackage/obj/mydict.h new file mode 100644 index 00000000000..1690231977a --- /dev/null +++ b/EOverPCalibration/NtuplePackage/obj/mydict.h @@ -0,0 +1,114 @@ +/******************************************************************** +* ../obj/mydict.h +* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED +* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). +* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. +********************************************************************/ +#ifdef __CINT__ +#error ../obj/mydict.h/C is only for compilation. Abort cint. +#endif +#include +#include +#include +#include +#include +#define G__ANSIHEADER +#define G__DICTIONARY +#define G__PRIVATE_GVALUE +#include "G__ci.h" +#include "FastAllocString.h" +extern "C" { +extern void G__cpp_setup_tagtablemydict(); +extern void G__cpp_setup_inheritancemydict(); +extern void G__cpp_setup_typetablemydict(); +extern void G__cpp_setup_memvarmydict(); +extern void G__cpp_setup_globalmydict(); +extern void G__cpp_setup_memfuncmydict(); +extern void G__cpp_setup_funcmydict(); +extern void G__set_cpp_environmentmydict(); +} + + +#include "TObject.h" +#include "TMemberInspector.h" +#include "../interface/ConfigFileLine.h" +#include "../interface/ConfigParser.h" +#include "../interface/LHEReader.h" +#include "../interface/h2Chain.h" +#include "../interface/hChain.h" +#include "../interface/ntpleUtils.h" +#include "../interface/readJSONFile.h" +#include "../interface/setTDRStyle.h" +#include "../interface/treeReader.h" +#include +namespace std { } +using namespace std; + +#ifndef G__MEMFUNCBODY +#endif + +extern G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_listlEstringcOallocatorlEstringgRsPgR; +extern G__linked_taginfo G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR; +extern G__linked_taginfo G__mydictLN_vectorlEintcOallocatorlEintgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR; +extern G__linked_taginfo G__mydictLN_TVectorTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TVectorTlEdoublegR; +extern G__linked_taginfo G__mydictLN_TMatrixTBaselEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTBaselEdoublegR; +extern G__linked_taginfo G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_TElementActionTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TElementPosActionTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTRow_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTRowlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTDiag_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTColumn_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTFlat_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSub_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseRow_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseDiag_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTColumnlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTDiaglEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTFlatlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSublEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseRowlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseDiaglEfloatgR; +extern G__linked_taginfo G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR; + +/* STUB derived class for protected member access */ +typedef vector > G__vectorlEfloatcOallocatorlEfloatgRsPgR; diff --git a/EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc b/EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc new file mode 100644 index 00000000000..84d5f356a48 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc @@ -0,0 +1,106 @@ +// +// File ConfigFileLine.C +// +/*! \class ConfigFileLine + * \brief A class representing a (continued) line in the configuration + * file, that is a pair of an option name and a (list of) value(s) + * + * + * $Date: 2012/02/12 20:16:10 $ + * $Author: rgerosa $ + * + * The class ConfigFileLine is used by the config_parser during + * parsing of the analyis configuration file. Every parsed line is put + * into a ConfigFile line object. Lines may be continued by the \ + * line continuation character. The name of the configuration option + * is stored as a string in the "values" class member, while options + * contains a list of configuration options. The latter field + * might also be empty if the option is boolean. As soon as the name + * field contains a non-zero string, the respective option is defined. + * + * The class is used during the parsing proceedure itself and must + * therefore also be able to contain the data during the parsing + * step. This includes ConfigFileLine objects which have no option + * name because they are on the right hand side of the '=' assignment + * operator. + * + * This class is not usable by root itself, no dictionary is generated + * for it. +*/ + +#include "../interface/ConfigFileLine.h" +#include + +using namespace std; + +ConfigFileLine::ConfigFileLine(const string &o, const string &v) +{ + option=o; + if( v.length()) + values.push_back(v); +} + + +ConfigFileLine::~ConfigFileLine() +{ + // The "option" string and the list are "self deleting" + // we do not need to do anything therefore, here. +} + +void ConfigFileLine::append(const ConfigFileLine &other){ + values.push_back(other.getOptionName()); +} + +void ConfigFileLine::appendList(const ConfigFileLine &other){ + ValueIterator I=other.values.begin(); + while (I != other.values.end()) { + values.push_back(*I); + I++; + } +} + +void ConfigFileLine::setScope(const string &scope){ + string s=scope; + s.append("::"); + s.append(option); + option=s; +} + +void ConfigFileLine::print() const{ + std::cout << "Option '" << option <<"' "; + if (!values.empty() ){ + ValueIterator I=values.begin(); + std::cout << "set to '"; + while (I != values.end()) { + std::cout << *I ; + I++; + if(I != values.end()) std::cout << ", "; + } + std::cout << "'" << std::endl; + } else { + std::cout << "is defined!" << std::endl; + } +} + + +//! stream operator +std::ostream & operator<< (std::ostream & out, const ConfigFileLine & line) +{ + out << "Option '" << line.option <<"' "; + if (!line.values.empty() ){ +// line.ValueIterator I=line.values.begin(); + std::list::const_iterator I=line.values.begin(); + out << "set to '"; + while (I != line.values.end()) { + out << *I ; + I++; + if(I != line.values.end()) out << ", "; + } + out << "'" << std::endl; + } else { + out << "is defined!" << std::endl; + } + return out ; +} + + diff --git a/EOverPCalibration/NtuplePackage/src/LHEReader.cc b/EOverPCalibration/NtuplePackage/src/LHEReader.cc new file mode 100644 index 00000000000..735bdb349e2 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/LHEReader.cc @@ -0,0 +1,135 @@ +#include "../interface/LHEReader.h" + + + +LHEReader::LHEReader(const std::string& LHEFileName) +{ + m_LHEFile = new std::ifstream(LHEFileName.c_str(), std::ios::in); + + std::string buffer; + while(1) + { + getline(*m_LHEFile, buffer); + if( buffer == "" ) break; + } +} + +// ---------------------------------------------------------------- + + + + + +LHEReader::~LHEReader() +{} + +// ---------------------------------------------------------------- + + + + + + +bool LHEReader::GetNextEvent() +{ + IDUP.clear(); + ISTUP.clear(); + MOTH1UP.clear(); + MOTH2UP.clear(); + ICOL1UP.clear(); + ICOL2UP.clear(); + PXUP.clear(); + PYUP.clear(); + PZUP.clear(); + PEUP.clear(); + PMUP.clear(); + VTIMUP.clear(); + SPINUP.clear(); + + + + //common event information + (*m_LHEFile) >> NUP >> IDPRUP >> XWGTUP >> SCALUP >> AQEDUP >> AQCDUP; + + // NUP lines, one for each particle + int idup,istup,moth1up,moth2up,icol1up,icol2up; + float pxup,pyup,pzup,peup,pmup,vtimup,spinup; + + for(int i = 0; i < NUP; ++i) + { + (*m_LHEFile) >> idup >> istup >> moth1up >> moth2up >> icol1up >> icol2up >> pxup >> pyup >> pzup >> peup >> pmup >> vtimup >> spinup; + + IDUP.push_back(idup); + ISTUP.push_back(istup); + MOTH1UP.push_back(moth1up); + MOTH2UP.push_back(moth2up); + ICOL1UP.push_back(icol1up); + ICOL2UP.push_back(icol2up); + PXUP.push_back(pxup); + PYUP.push_back(pyup); + PZUP.push_back(pzup); + PEUP.push_back(peup); + PMUP.push_back(pmup); + VTIMUP.push_back(vtimup); + SPINUP.push_back(spinup); + } + + + // Goto next event + bool nextEventFound = false; + std::string buffer; + while( !(*m_LHEFile).eof() ) + { + getline(*m_LHEFile, buffer); + if( buffer == "" ) + { + nextEventFound = true; + break; + } + } + + + return nextEventFound; +} + +// ---------------------------------------------------------------- + + + + + + +void LHEReader::PrintEvent() +{ + std::cout << "" << std::endl; + + std::cout << " " << NUP + << " " << IDPRUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << XWGTUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << SCALUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << AQEDUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << AQCDUP + << std::endl; + + for(int i = 0; i < NUP; ++i) + { + std::cout << " " << std::fixed << std::setprecision(0) << std::setw(7) << IDUP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << ISTUP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << MOTH1UP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << MOTH2UP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << ICOL1UP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << ICOL2UP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PXUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PYUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PZUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PEUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PMUP.at(i) + << " " << std::scientific << std::setprecision(5) << std::setw(10) << VTIMUP.at(i) + << " " << std::fixed << std::setprecision(1) << std::setw(4) << SPINUP.at(i) + << std::endl; + } + + std::cout << "" << std::endl; +} + +// ---------------------------------------------------------------- diff --git a/EOverPCalibration/NtuplePackage/src/Makefile b/EOverPCalibration/NtuplePackage/src/Makefile new file mode 100644 index 00000000000..7c09385686b --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/Makefile @@ -0,0 +1,127 @@ +HDR = ../interface/ +OBJ = ../obj/ +LIB = ../lib/ +BIN = ../bin/ +PRG = ../test/ +SCRIPT = ../scripts/ + + +Shell = .sh +HdrSuf = .h +SrcSuf = .cc +ObjSuf = .o +PrgSuf = .cpp +BinSuf = .exe +LibSuf = .so + +HDRS = $(wildcard $(HDR)*$(HdrSuf)) +SRCS = $(wildcard *$(SrcSuf)) +_OBJS = $(patsubst %$(SrcSuf), %$(ObjSuf), $(SRCS)) +OBJS = $(addprefix $(OBJ),$(_OBJS)) +PRGS = $(wildcard $(PRG)*$(PrgSuf)) +_BINS = $(wildcard $(PRG)*$(PrgSuf)) +__BINS = $(_BINS:$(PrgSuf)=$(BinSuf)) +___BINS = $(notdir $(__BINS)) +BINS = $(addprefix $(BIN),${___BINS}) + +LINKDEF = $(wildcard ${HDR}*LinkDef.h) +DICTHDRS = $(patsubst $(LINKDEF),,$(HDRS)) $(LINKDEF) + + +ROOTCFLAGS = $(shell root-config --cflags) +ROOTGLIBS = $(shell root-config --glibs) + +ARCHL = -m64 + +CXX = c++ +CXXFLAGS = -Wall -O -fPIC -I$(HDR) $(ROOTCFLAGS) +CPP = c++ +CPPFLAGS = -Wall $(ARCHL) -I$(HDR) $(ROOTCFLAGS) + +LD = c++ +LDFLAGS = -rdynamic -shared $(ARCHL) +SONAME = libEvent.so +SOFLAGS = -Wl,-soname,$(SONAME) + +GLIBS = -lm -ldl -rdynamic $(ROOTGLIBS) -lGenVector + + +################################################# +#if mac +ARCH = $(shell root-config --arch) +ifeq ($(ARCH),macosx) +LibSuf = .dylib + +ARCHL = -m32 + +CPPFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +CXXFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +LDFLAGS = -dynamiclib -shared -single_module -undefined dynamic_lookup $(ARCHL) +SONAME = libEvent.dylib +SOFLAGS = +endif +################################################# + +################################################# +#if mac 64 +ARCH = $(shell root-config --arch) +ifeq ($(ARCH),macosx64) +LibSuf = .dylib + +ARCHL = -m64 + +CPPFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +CXXFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +LDFLAGS = -dynamiclib -shared -single_module -undefined dynamic_lookup $(ARCHL) +SONAME = libEvent.dylib +SOFLAGS = +endif +################################################# + + + + +.PHONY: all exe test clean + + +all: $(LIB)$(SONAME) + + +exe: $(BINS) + + +test: + @echo "HDRS = $(HDRS)" + @echo "DICTHDRS = $(DICTHDRS)" + @echo "SRCS = $(SRCS)" + @echo "OBJS = $(OBJS)" + @echo "PRGS = $(PRGS)" + @echo "BINS = $(BINS)" + + +$(OBJ)%$(ObjSuf): %$(SrcSuf) $(HDRS) + $(CXX) -c $(CXXFLAGS) -o $@ $< + + +$(OBJ)mydict.o: $(OBJ)mydict.cc $(OBJ)mydict.h + $(CXX) -c $(CXXFLAGS) -o $@ $< + + +$(OBJ)mydict.cc: $(DICTHDRS) + @echo "Generating dictionary for ..." + rootcint -f $(OBJ)mydict.cc -c -p ${CXXFLAGS} $(DICTHDRS) + +$(LIB)$(SONAME): $(OBJS) $(OBJ)mydict.o + @echo "Linking $(SONAME):" + $(LD) $(LDFLAGS) $(OBJS) $(OBJ)mydict.o $(SOFLAGS) -o $(LIB)$(SONAME) + +$(BIN)%$(BinSuf): $(PRG)%$(PrgSuf) $(HDRS) $(LIB)$(SONAME) + $(CPP) $(CPPFLAGS) -L$(LIB) $(GLIBS) -lEvent -o $@ $< + + +clean: + rm -f $(OBJ)*$(ObjSuf) $(LIB)*$(LibSuf) $(OBJ)mydict* diff --git a/EOverPCalibration/NtuplePackage/src/h2Chain.cc b/EOverPCalibration/NtuplePackage/src/h2Chain.cc new file mode 100644 index 00000000000..cd6ed7a465d --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/h2Chain.cc @@ -0,0 +1,153 @@ +#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" + + h2Chain::h2Chain (TString baseName, TString baseTitle, + int nbinsx, double minx, double maxx, + int nbinsy, double miny, double maxy, int NUM) : + m_baseName (baseName) + { + TString name ; + TString title ; + for (int i=0 ; iSetStats (0) ; + m_histos.push_back (dummy) ; + } + } + + +//PG -------------------------------------------------------- + + +h2Chain::~h2Chain () +{ + for (unsigned int i=0 ; i colors) + { + //PG this is weak, assumes correct number of elements + for (unsigned int i=0 ; iSetMarkerColor (colors.at (i)) ; + m_histos.at (i)->SetLineColor (colors.at (i)) ; + m_histos.at (i)->SetFillColor (colors.at (i)) ; + m_histos.at (i)->SetFillStyle (3001) ; + } + //PG this is a hack +// m_histos.back ()->SetLineColor (kBlack) ; +// m_histos.back ()->SetLineWidth (2) ; + } + + +//PG -------------------------------------------------------- + + +void +h2Chain::Fill (int i, double valx, double valy) + { + m_histos.at (i)->Fill (valx, valy) ; + return ; + } + + +//PG -------------------------------------------------------- + + +void +h2Chain::Fill (int i, double valx, double valy, double weight) + { + m_histos.at (i)->Fill (valx, valy, weight) ; + return ; + } + + + +//PG -------------------------------------------------------- + +/* +void +h2Chain::Print (bool isLog, int rebinx, int rebiny) + { + TCanvas *c1 = new TCanvas("c1", "c1", 52,180,500,500); + c1->cd () ; + if(isLog) c1->SetLogz(); + + m_histos.at (0)->Draw ("box") ; + for (unsigned int i=0 ; iSetStats (0) ; + m_histos.at (i)->Draw ("boxsame") ; + m_histos.at (i)->RebinX (rebinx) ; + m_histos.at (i)->RebinY (rebiny) ; + } + //PG this is a hack +// m_histos.back ()->Draw ("same") ; + TString name = m_baseName + TString ("_h2.gif") ; + c1->Print (name,"gif") ; + + m_histos.at (0)->DrawNormalized ("box") ; + for (unsigned int i=0 ; iDrawNormalized ("boxsame") ; + //PG this is a hack +// m_histos.back ()->DrawNormalized ("same") ; + name = TString ("N") + m_baseName + TString ("_h2.gif") ; + c1->Print (name,"gif") ; + } +*/ + +//PG -------------------------------------------------------- + +/* +void +h2Chain::PrintEach () + { + TCanvas *c1 = new TCanvas("c1","c1", 180, 52, 550, 550); + c1->cd () ; + for (unsigned int i=0 ; iSetStats (0) ; + m_histos.at (i)->Draw () ; + TString name = m_baseName ; + name += TString ("_") ; + name += i ; + name += TString ("_h2.gif") ; + c1->Print (name,"gif") ; + } + } +*/ + +//PG -------------------------------------------------------- + + +void +h2Chain::Write (const std::string& dirName, TFile & outputFile) + { + outputFile.cd () ; + outputFile.mkdir(dirName.c_str()); + outputFile.cd(dirName.c_str()); + for (unsigned int i=0 ; iWrite () ; + return ; + } + + +//PG -------------------------------------------------------- + + +void +h2Chain::Scale (int index, double factor) +{ + m_histos.at (index)->Scale (factor) ; +} diff --git a/EOverPCalibration/NtuplePackage/src/hChain.cc b/EOverPCalibration/NtuplePackage/src/hChain.cc new file mode 100644 index 00000000000..5c0ba042080 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/hChain.cc @@ -0,0 +1,282 @@ +#include "../interface/hChain.h" +#include "TStyle.h" +#include "TROOT.h" +#include "TCanvas.h" + +hChain::hChain (TString baseName, TString baseTitle, + int nbins, double min, double max, int NUM) : + m_baseName (baseName) + { + for (int i=0 ; i colors) + { + //PG this is weak, assumes correct number of elements + for (unsigned int i=0 ; iSetLineColor (colors.at (i)) ; + m_histos.at (i)->SetLineWidth (2) ; + } + } + + +//PG -------------------------------------------------------- + + +void +hChain::Fill (int i, double val) + { + m_histos.at (i)->Fill (val) ; +// m_ntuples.at (i)->Fill (val) ; + return ; + } + + +//RG -------------------------------------------------------- + + + +void +hChain::SetBinContent (int i, int bin, double val) + { + m_histos.at (i)->SetBinContent (bin,val) ; +// m_ntuples.at (i)->Fill (val) ; + return ; + } + +//RG -------------------------------------------------------- + + + +void +hChain::SetBinError (int i, int bin, double val) + { + m_histos.at (i)->SetBinError (bin,val) ; +// m_ntuples.at (i)->Fill (val) ; + return ; + } + + + +//PG -------------------------------------------------------- + + +void +hChain::Print (bool isLog, int rebin, TString altName) + { + gROOT->SetStyle ("Plain") ; + + for (unsigned int i=0 ; iSetFillStyle (3001) ; + m_histos.at (i)->SetStats (0) ; + m_histos.at (i)->Rebin (rebin) ; + } + + TString name = "s_" ; + if (altName == "default") name += m_baseName ; + else name += altName ; + THStack hs (name,"stacked m_histos") ; + for (unsigned int i=0 ; iGetXaxis ()->GetXmin (), + m_histos.at (0)->GetXaxis ()->GetXmax (), + 10,min,max) ; + bkg.SetStats (0) ; + bkg.AddDirectory (0) ; + bkg.Draw () ; + for (unsigned int i=0 ; iDrawNormalized ("same") ; + name = TString ("N") + m_baseName + TString ("_h1.gif") ; + c1.Print (name,"gif") ; + } + + +//PG -------------------------------------------------------- + +/* +void +hChain::PrintEach (bool isLog, int rebin) + { + for (unsigned int i=0 ; iSetFillStyle (3001) ; + m_histos.at (i)->SetStats (0) ; + m_histos.at (i)->Rebin (rebin) ; + } + + TCanvas c1 ; + c1.cd () ; + if(isLog) c1.SetLogy(); + + for (unsigned int i=0 ; iSetStats (0) ; + m_histos.at (i)->Draw () ; + TString name = m_baseName ; + name += TString ("_") ; + name += i ; + name += TString ("_h1.gif") ; + c1.Print (name,"gif") ; + } + + } +*/ + +//PG -------------------------------------------------------- + + +void +hChain::Write (TFile & outputFile) + { + outputFile.cd () ; + for (unsigned int i=0 ; i GetEntries() > 0) + m_histos.at (i)->Write () ; +// for (unsigned int i=0 ; iWrite () ; + return ; + } + + +//PG -------------------------------------------------------- + + + + +void +hChain::Write (const std::string& dirName, TFile & outputFile) + { + outputFile.cd () ; + outputFile.mkdir(dirName.c_str()); + outputFile.cd(dirName.c_str()); + for (unsigned int i=0 ; i GetEntries() > 0) + m_histos.at (i)->Write () ; +// for (unsigned int i=0 ; iWrite () ; + return ; + } + + +//PG -------------------------------------------------------- + + + +double +hChain::findNMin () + { + double minVal = m_histos.at (0)->GetMinimum (0.0000001)/ + m_histos.at (0)->Integral () ; + for (unsigned int i = 0 ; i < m_histos.size () ; ++i) + { + double dummy = m_histos.at (i)->GetMinimum (0.0000001)/ + m_histos.at (i)->Integral () ; + if (minVal > dummy) minVal = dummy ; + } + return minVal ; + } + + +//PG -------------------------------------------------------- + + +double +hChain::findNMax () + { + double maxVal = m_histos.at (0)->GetMaximum ()/ + m_histos.at (0)->Integral () ; + for (unsigned int i = 0 ; i < m_histos.size () ; ++i) + { + double dummy = m_histos.at (i)->GetMaximum ()/ + m_histos.at (i)->Integral () ; + if (maxVal < dummy) maxVal = dummy ; + } + return maxVal ; + } + + +//PG -------------------------------------------------------- + + +void +hChain::Normalize (int index) +{ + if(m_histos.at (index) -> GetEntries() > 0) + m_histos.at (index)->Scale (1./m_histos.at(index)->GetEntries()) ; +} + + + +void +hChain::Scale (int index, double factor) +{ + m_histos.at (index)->Scale (factor) ; +} + +//RG ----------------------------------------------------- +double +hChain::GetEffectiveEntries(int index) +{ + return m_histos.at(index)->GetEffectiveEntries(); +} + +//RG ----------------------------------------------------- +void +hChain::Reset() +{ + for(unsigned int index=0; indexDelete(); +} + +//RG ------------------------------------------------------- +TH1F* +hChain::GetHisto(int index) +{ + return m_histos.at(index); +} diff --git a/EOverPCalibration/NtuplePackage/src/ntpleUtils.cc b/EOverPCalibration/NtuplePackage/src/ntpleUtils.cc new file mode 100644 index 00000000000..a0b79d30998 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/ntpleUtils.cc @@ -0,0 +1,214 @@ +#include "../interface/ntpleUtils.h" + + + +bool maggiore(double i, double j) +{ + return( i>j ); +} + + + +// ------------------------------------------------------------ + + + +std::map GetTotalEvents(const std::string& histoName, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + std::map totalEvents; + + if(!inFile.is_open()) + { + std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; + return totalEvents; + } + + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + + TFile* f = TFile::Open(buffer.c_str()); + TH1F* histo = NULL; + f -> GetObject(histoName.c_str(), histo); + if(histo == NULL) + { + std::cout << ">>>ntpleUtils::Error in getting object " << histoName << std::endl; + exit(-1); + } + + + for(int bin = 1; bin <= histo -> GetNbinsX(); ++bin) + totalEvents[bin] += int(histo -> GetBinContent(bin)); + + f -> Close(); + delete f; + } + + return totalEvents; +} + + + +TH1F* GetTotalHisto(const std::string& histoName, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + TH1F* totalHisto = NULL; + + if(!inFile.is_open()) + { + std::cerr << ">>>ntpleUtils::GetTotalHisto::can't open file " << inputFileList << " for input" << std::endl; + return totalHisto; + } + + bool isFirstFile = true; + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + + //std::cout << "ntpleUtils::GetTotalHisto::getting histogram " << histoName << " from file " << buffer << std::endl; + TFile* f = TFile::Open(buffer.c_str()); + TH1F* histo = NULL; + f -> GetObject(histoName.c_str(), histo); + if(histo == NULL) + { + std::cout << ">>>ntpleUtils::GetTotalHisto::Error in getting object " << histoName << std::endl; + exit(-1); + } + + if( isFirstFile ) + totalHisto = (TH1F*)(histo->Clone()); + else + totalHisto -> Add(histo); + + if( !isFirstFile ) + { + f -> Close(); + delete f; + isFirstFile = false; + } + } + + return totalHisto; +} + + + +std::map GetBinLabels(const std::string& histoName, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + std::map binLabels; + + if(!inFile.is_open()) + { + std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; + return binLabels; + } + + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + + TFile* f = TFile::Open(buffer.c_str()); + TH1F* histo = NULL; + f -> GetObject(histoName.c_str(), histo); + if(histo == NULL) + { + std::cout << ">>>ntpleUtils::Error in getting object " << histoName << std::endl; + exit(-1); + } + + + for(int bin = 1; bin <= histo -> GetNbinsX(); ++bin) + binLabels[bin] = std::string(histo -> GetXaxis() -> GetBinLabel(bin)); + + f -> Close(); + delete f; + } + + return binLabels; +} + + + +bool FillChain(TChain& chain, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + + if(!inFile.is_open()) + { + std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; + return false; + } + + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + if( buffer.at(0) == '#' ) continue; + chain.Add(buffer.c_str()); + std::cout << ">>> ntupleUtils::FillChain - treeName = " << chain.GetName() << " from file " << buffer << std::endl; + } + + return true; +} + + + +// ------------------------------------------------------------ + + + +double deltaPhi(const double& phi1, const double& phi2) +{ + double deltaphi = fabs(phi1 - phi2); + if (deltaphi > 6.283185308) deltaphi -= 6.283185308; + if (deltaphi > 3.141592654) deltaphi = 6.283185308 - deltaphi; + return deltaphi; +} + +double deltaEta(const double& eta1, const double& eta2) +{ + double deltaeta = fabs(eta1 - eta2); + return deltaeta; +} + +double deltaR(const double& eta1, const double& phi1, + const double& eta2, const double& phi2) +{ + double deltaphi = deltaPhi(phi1, phi2); + double deltaeta = deltaEta(eta1, eta2); + double deltar = sqrt(deltaphi*deltaphi + deltaeta*deltaeta); + return deltar; +} + + + +// ------------------------------------------------------------ + + + +void Print4V(const ROOT::Math::XYZTVector& p) +{ + std::cout << std::fixed << std::setprecision(2) + << "(E,px,py,pz) = " + << "(" << std::setw(8) << p.energy() + << "," << std::setw(8) << p.px() + << "," << std::setw(8) << p.py() + << "," << std::setw(8) << p.pz() + << ")" + << "\tpt = " + << std::setw(7) << p.pt() + << "\teta = " + << std::setw(6) << p.eta() + << "\tphi = " + << std::setw(5) << p.phi() + << std::endl; +} diff --git a/EOverPCalibration/NtuplePackage/src/readJSONFile.cc b/EOverPCalibration/NtuplePackage/src/readJSONFile.cc new file mode 100644 index 00000000000..14052c644da --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/readJSONFile.cc @@ -0,0 +1,111 @@ +#include "../interface/readJSONFile.h" + + + + + +std::map > > + readJSONFile(const std::string& inFileName) +{ + std::ifstream inFile(inFileName.c_str(), std::ios::in); + + std::string line; + while(!inFile.eof()) + { + std::string buffer; + inFile >> buffer; + line += buffer; + } + + + + // define map with result + std::map > > jsonMap; + + + + // loop on JSON file + for(std::string::const_iterator it = line.begin(); it < line.end(); ++it) + { + // find run number + if( (*(it) == '"') && (*(it+7) == '"') ) + { + std::string run(it+1, it+7); + //std::cout << "found run " << run << std::endl; + + + + // find lumi sections + std::vector > lumisections; + for(std::string::const_iterator it2 = it+10; it2 < line.end(); ++it2) + { + if( (*(it2) == ']') && (*(it2-1) == ']') ) break; + if( *(it2) != '[' ) continue; + + std::string::const_iterator it_beg = it2; + std::string::const_iterator it_mid; + std::string::const_iterator it_end; + + for(std::string::const_iterator it3 = it_beg; it3 < line.end(); ++it3) + { + if( *(it3) == ',' ) it_mid = it3; + if( *(it3) == ']' ) + { + it_end = it3; + break; + } + } + + + + std::string lumi_beg(it_beg+1, it_mid); + std::string lumi_end(it_mid+1, it_end); + //std::cout << "[" << lumi_beg; + //std::cout << ","; + //std::cout << lumi_end << "]" << std::endl; + + std::pair tempLS(atoi(lumi_beg.c_str()), atoi(lumi_end.c_str())); + lumisections.push_back(tempLS); + + it2 = it_end; + } + + + jsonMap[atoi(run.c_str())] = lumisections; + } // find run number + + } // loop on JSON file + + + + return jsonMap; +} + + + + + + +bool AcceptEventByRunAndLumiSection(const int& runId, const int& lumiId, + std::map > >& jsonMap) +{ + // select by runId + if( jsonMap.find(runId) == jsonMap.end() ) return false; + + + + // select by lumiId + std::vector > lumisections = jsonMap[runId]; + + int skipEvent = true; + for(unsigned int i = 0; i < lumisections.size(); ++i) + if( (lumiId >= lumisections.at(i).first) && + (lumiId <= lumisections.at(i).second) ) + skipEvent = false; + + if( skipEvent == true ) return false; + + + return true; +} + diff --git a/EOverPCalibration/NtuplePackage/src/setTDRStyle.cc b/EOverPCalibration/NtuplePackage/src/setTDRStyle.cc new file mode 100755 index 00000000000..beb0a29a60d --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/setTDRStyle.cc @@ -0,0 +1,203 @@ +#include "../interface/setTDRStyle.h" + + + +void setTDRStyle() +{ + TStyle* tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); + + // For the canvas: + tdrStyle->SetCanvasBorderMode(0); + tdrStyle->SetCanvasColor(kWhite); + tdrStyle->SetCanvasDefH(600); //Height of canvas + tdrStyle->SetCanvasDefW(800); //Width of canvas + tdrStyle->SetCanvasDefX(0); //POsition on screen + tdrStyle->SetCanvasDefY(0); + + // For the Pad: + tdrStyle->SetPadBorderMode(0); + // tdrStyle->SetPadBorderSize(Width_t size = 1); + tdrStyle->SetPadColor(kWhite); + tdrStyle->SetPadGridX(false); + tdrStyle->SetPadGridY(false); + tdrStyle->SetGridColor(0); + tdrStyle->SetGridStyle(3); + tdrStyle->SetGridWidth(1); + + // For the frame: + tdrStyle->SetFrameBorderMode(0); + tdrStyle->SetFrameBorderSize(1); + tdrStyle->SetFrameFillColor(0); + tdrStyle->SetFrameFillStyle(0); + tdrStyle->SetFrameLineColor(1); + tdrStyle->SetFrameLineStyle(1); + tdrStyle->SetFrameLineWidth(1); + + // For the histo: + // tdrStyle->SetHistFillColor(1); + // tdrStyle->SetHistFillStyle(0); + tdrStyle->SetHistLineColor(1); + tdrStyle->SetHistLineStyle(0); + tdrStyle->SetHistLineWidth(1); + // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); + // tdrStyle->SetNumberContours(Int_t number = 20); + + tdrStyle->SetEndErrorSize(2); + // tdrStyle->SetErrorMarker(20); + //tdrStyle->SetErrorX(0.); + + tdrStyle->SetMarkerStyle(20); + + //For the fit/function: + tdrStyle->SetOptFit(1); + tdrStyle->SetFitFormat("5.4g"); + tdrStyle->SetFuncColor(2); + tdrStyle->SetFuncStyle(1); + tdrStyle->SetFuncWidth(1); + + //For the date: + tdrStyle->SetOptDate(0); + // tdrStyle->SetDateX(Float_t x = 0.01); + // tdrStyle->SetDateY(Float_t y = 0.01); + + // For the statistics box: + tdrStyle->SetOptFile(0); + tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); + tdrStyle->SetStatColor(kWhite); + tdrStyle->SetStatFont(42); + tdrStyle->SetStatFontSize(0.025); + tdrStyle->SetStatTextColor(1); + tdrStyle->SetStatFormat("6.4g"); + tdrStyle->SetStatBorderSize(1); + tdrStyle->SetStatH(0.1); + tdrStyle->SetStatW(0.15); + // tdrStyle->SetStatStyle(Style_t style = 1001); + // tdrStyle->SetStatX(Float_t x = 0); + // tdrStyle->SetStatY(Float_t y = 0); + + // Margins: + tdrStyle->SetPadTopMargin(0.05); + tdrStyle->SetPadBottomMargin(0.13); + tdrStyle->SetPadLeftMargin(0.13); + tdrStyle->SetPadRightMargin(0.25); + + // For the Global title: + tdrStyle->SetOptTitle(0); + tdrStyle->SetTitleFont(42); + tdrStyle->SetTitleColor(1); + tdrStyle->SetTitleTextColor(1); + tdrStyle->SetTitleFillColor(10); + tdrStyle->SetTitleFontSize(0.05); + // tdrStyle->SetTitleH(0); // Set the height of the title box + // tdrStyle->SetTitleW(0); // Set the width of the title box + // tdrStyle->SetTitleX(0); // Set the position of the title box + // tdrStyle->SetTitleY(0.985); // Set the position of the title box + // tdrStyle->SetTitleStyle(Style_t style = 1001); + // tdrStyle->SetTitleBorderSize(2); + + // For the axis titles: + tdrStyle->SetTitleColor(1, "XYZ"); + tdrStyle->SetTitleFont(42, "XYZ"); + tdrStyle->SetTitleSize(0.04, "XYZ"); + // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? + // tdrStyle->SetTitleYSize(Float_t size = 0.02); + tdrStyle->SetTitleXOffset(1.25); + tdrStyle->SetTitleYOffset(1.50); + // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset + + // For the axis labels: + tdrStyle->SetLabelColor(1, "XYZ"); + tdrStyle->SetLabelFont(42, "XYZ"); + tdrStyle->SetLabelOffset(0.007, "XYZ"); + tdrStyle->SetLabelSize(0.03, "XYZ"); + + // For the axis: + tdrStyle->SetAxisColor(1, "XYZ"); + tdrStyle->SetStripDecimals(kTRUE); + tdrStyle->SetTickLength(0.03, "XYZ"); + tdrStyle->SetNdivisions(510, "XYZ"); + tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame + tdrStyle->SetPadTickY(1); + + // Change for log plots: + tdrStyle->SetOptLogx(0); + tdrStyle->SetOptLogy(0); + tdrStyle->SetOptLogz(0); + + // Postscript options: + tdrStyle->SetPaperSize(20.,20.); + // tdrStyle->SetLineScalePS(Float_t scale = 3); + // tdrStyle->SetLineStyleString(Int_t i, const char* text); + // tdrStyle->SetHeaderPS(const char* header); + // tdrStyle->SetTitlePS(const char* pstitle); + + //tdrStyle->SetBarOffset(Float_t baroff = 0.5); + //tdrStyle->SetBarWidth(Float_t barwidth = 0.5); + //tdrStyle->SetPaintTextFormat(const char* format = "g"); + tdrStyle->SetPalette(1); + //tdrStyle->SetTimeOffset(Double_t toffset); + //tdrStyle->SetHistMinimumZero(kTRUE); + + + + + + + const Int_t NRGBs = 5; + const Int_t NCont = 255; + + Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; + Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; + Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; + Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + tdrStyle->SetNumberContours(NCont); + + + //TLatex *lab = new TLatex(0.70,0.85, "CMS 2008"); + //lab->SetNDC(); + //lab->SetTextFont(42); + //lab->SetTextSize(0.05); + //lab->Draw("same"); + + + + + //gROOT -> ForceStyle(); + + tdrStyle->cd(); +} + + + +int getColor(const int& i) +{ + std::vector colors(19); + + colors[0] = kBlack; + + colors[1] = kBlue; + colors[2] = kRed; + colors[3] = kGreen; + colors[4] = kMagenta; + colors[5] = kCyan; + colors[6] = kOrange; + colors[7] = kGray; + + colors[8] = kCyan+2; + colors[9] = kOrange+2; + colors[10] = kMagenta+2; + colors[11] = kRed+2; + colors[12] = kBlue+2; + colors[13] = kOrange+2; + colors[14] = kGray+2; + + colors[15] = kRed+3; + colors[16] = kBlue+3; + colors[17] = kGreen+3; + colors[18] = kMagenta+3; + + if(i < 19) return colors.at(i); + else return i; +} diff --git a/EOverPCalibration/NtuplePackage/src/treeReader.cc b/EOverPCalibration/NtuplePackage/src/treeReader.cc new file mode 100644 index 00000000000..00045319059 --- /dev/null +++ b/EOverPCalibration/NtuplePackage/src/treeReader.cc @@ -0,0 +1,691 @@ +#include "../interface/treeReader.h" + +treeReader::treeReader (TTree * tree, bool verbosity) : +m_tree (tree), +m_verbosity (verbosity) +{ + + TObjArray * br_list = m_tree->GetListOfBranches () ; + TIter br_it (br_list) ; + + TBranch * iBranch ; + TBranchElement* bre ; + TLeaf* Leaf; + + while ((iBranch = (TBranch *) br_it.Next ())) { + bre = (TBranchElement*) iBranch ; + std::string bname = bre->GetClassName () ; + std::string branchTitle = iBranch->GetTitle(); + if(branchTitle.find("bsmReweight")!= std::string::npos) continue ; + if(bname!=""){ + + if (bname.find ("Event") != std::string::npos) continue ; + + if (!bname.find ("vector > >")){ + if (m_verbosity) + std::cout << "4V | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_4Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_4Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector,ROOT::Math::DefaultCoordinateSystemTag> >") ){ + if (m_verbosity) + std::cout << "3V | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_3Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_3Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Bvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Bvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "IV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Ivectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Ivectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "SV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Svectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Svectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Fvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Fvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Dvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Dvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("ROOT::Math::LorentzVector > ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName() << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + else{ k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector ;m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>* ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + else{ k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector ;m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("bool") || !bname.find ("Bool_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Bvectors[bre->GetName ()] = new bool [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + else{ k_Bvectors[bre->GetName ()] = new bool ; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + } + + + else if (!bname.find ("int") || !bname.find ("Int_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Ivectors[bre->GetName ()] = new int [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + else{ k_Ivectors[bre->GetName ()] = new int ; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + } + + + else if (!bname.find ("std::string") || !bname.find ("TString") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Svectors[bre->GetName ()] = new std::string [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + else{ k_Svectors[bre->GetName ()] = new std::string ; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("float") || !bname.find ("Float_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Fvectors[bre->GetName ()] = new float [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + else if(vectorx==0 && vectory==0){ k_Fvectors[bre->GetName ()] = new float ; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + + } + + else if (!bname.find ("double") || !bname.find ("Double_t") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + if(vectorx!=0 && vectory==0){k_Dvectors[bre->GetName ()] = new double [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + else{ k_Dvectors[bre->GetName ()] = new double ; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + } + + } + + else{ + + Leaf = iBranch->GetLeaf(iBranch->GetName()); + if(Leaf==0) continue; + std::string bname = Leaf->GetTypeName(); + + if (!bname.find ("Event") ) continue ; + + else if (!bname.find ("vector > >") ){ + if (m_verbosity) + std::cout << "4V | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_4Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_4Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector,ROOT::Math::DefaultCoordinateSystemTag> >") ){ + if (m_verbosity) + std::cout << "3V | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_3Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_3Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "IV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Bvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Bvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "IV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Ivectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Ivectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "SV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Svectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Svectors[bre->GetName ()]) ; + } + + else if (bname.find ("vector") != std::string::npos){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Fvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (),&m_Fvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Dvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Dvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("ROOT::Math::LorentzVector >* ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + else{ k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector ;m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>* ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + else{ k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector ;m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + } + + else if (!bname.find ("bool") || !bname.find ("Bool_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Bvectors[bre->GetName ()] = new bool [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + else{ k_Bvectors[bre->GetName ()] = new bool ; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + } + + + + else if (!bname.find ("int") || !bname.find ("Int_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Ivectors[bre->GetName ()] = new int [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + else{ k_Ivectors[bre->GetName ()] = new int ; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + } + + + else if (!bname.find ("std::string") || !bname.find ("TString") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Svectors[bre->GetName ()] = new std::string [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + else{ k_Svectors[bre->GetName ()] = new std::string ; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("float") || !bname.find ("Float_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Fvectors[bre->GetName ()] = new float [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + else if(vectorx==0 && vectory==0){ k_Fvectors[bre->GetName ()] = new float ; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + + } + + else if (!bname.find ("double") || !bname.find ("Double_t") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + if(vectorx!=0 && vectory==0){k_Dvectors[bre->GetName ()] = new double [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + else{ k_Dvectors[bre->GetName ()] = new double ; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + } + + } + + } //PG loop over branches + + std::cout << " --> " << (m_3Vvectors.size () + m_4Vvectors.size () + m_Fvectors.size () + m_Dvectors.size () + m_Ivectors.size ()) + + (k_3Vvectors.size () + k_4Vvectors.size () + k_Fvectors.size () + k_Dvectors.size () + k_Ivectors.size ()) << " branches read\n" ; + +} + + +// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- + + +treeReader::~treeReader () { + + for (std::map * >::const_iterator iMap = m_Dvectors.begin () ; iMap != m_Dvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + + for (std::map * >::const_iterator iMap = m_Fvectors.begin () ; iMap != m_Fvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_Ivectors.begin () ; iMap != m_Ivectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_Svectors.begin () ; iMap != m_Svectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_4Vvectors.begin () ; iMap != m_4Vvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_3Vvectors.begin () ; iMap != m_3Vvectors.end (); ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Dvectors.begin () ; iMap != k_Dvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Fvectors.begin () ; iMap != k_Fvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Ivectors.begin () ; iMap != k_Ivectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Svectors.begin () ; iMap != k_Svectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_4Vvectors.begin () ; iMap != k_4Vvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_3Vvectors.begin () ; iMap != k_3Vvectors.end (); ++iMap) + if(iMap->second) delete iMap->second ; + +} + + +std::vector* treeReader::Get3V(const std::string &name){ + std::map * >::const_iterator it_3V = m_3Vvectors.find(name); + if (it_3V != m_3Vvectors.end() ) return m_3Vvectors[name]; + else return new std::vector; +} + +ROOT::Math::XYZVector* treeReader::get3V(const std::string &name){ + std::map::const_iterator it_3V = k_3Vvectors.find(name); + if (it_3V != k_3Vvectors.end() ) return k_3Vvectors[name]; + else return new ROOT::Math::XYZVector; +} + +std::vector* treeReader::Get4V(const std::string &name){ + std::map * >::const_iterator it_4V = m_4Vvectors.find(name); + if (it_4V != m_4Vvectors.end() ) return m_4Vvectors[name]; + else return new std::vector; +} + +ROOT::Math::XYZTVector* treeReader::get4V(const std::string &name){ + std::map::const_iterator it_4V = k_4Vvectors.find(name); + if (it_4V != k_4Vvectors.end() ) return k_4Vvectors[name]; + else return new ROOT::Math::XYZTVector; +} + +std::vector* treeReader::GetDouble(const std::string &name){ + std::map * >::const_iterator it_D = m_Dvectors.find(name); + if (it_D != m_Dvectors.end() ) return m_Dvectors[name]; + else return new std::vector; +} + +double* treeReader::getDouble(const std::string &name){ + std::map::const_iterator it_D = k_Dvectors.find(name); + if (it_D != k_Dvectors.end() ) return k_Dvectors[name]; + else return new double; +} + +std::vector* treeReader::GetFloat(const std::string &name){ + std::map * >::const_iterator it_F = m_Fvectors.find(name); + if (it_F != m_Fvectors.end() ) return m_Fvectors[name]; + else return new std::vector; +} + +float* treeReader::getFloat(const std::string &name){ + std::map::const_iterator it_F = k_Fvectors.find(name); + if (it_F != k_Fvectors.end() ) return k_Fvectors[name]; + else return new float; +} + +std::vector* treeReader::GetInt(const std::string &name){ + std::map * >::const_iterator it_I = m_Ivectors.find(name); + if (it_I != m_Ivectors.end() ) return m_Ivectors[name]; + else return new std::vector; +} + +int* treeReader::getInt(const std::string &name){ + std::map::const_iterator it_I = k_Ivectors.find(name); + if (it_I != k_Ivectors.end() ) return k_Ivectors[name]; + else return new int; +} + + +std::vector* treeReader::GetBool(const std::string &name){ + std::map * >::const_iterator it_I = m_Bvectors.find(name); + if (it_I != m_Bvectors.end() ) return m_Bvectors[name]; + else return new std::vector; +} + +bool* treeReader::getBool(const std::string &name){ + std::map::const_iterator it_I = k_Bvectors.find(name); + if (it_I != k_Bvectors.end() ) return k_Bvectors[name]; + else return new bool; +} + +std::vector* treeReader::GetString(const std::string &name){ + std::map * >::const_iterator it_S = m_Svectors.find(name); + if (it_S != m_Svectors.end() ) return m_Svectors[name]; + else return new std::vector; +} + +std::string* treeReader::getString(const std::string &name){ + std::map::const_iterator it_S = k_Svectors.find(name); + if (it_S != k_Svectors.end() ) return k_Svectors[name]; + else return new std::string; +} diff --git a/EOverPCalibration/README.md b/EOverPCalibration/README.md new file mode 100644 index 00000000000..aef40c64d0b --- /dev/null +++ b/EOverPCalibration/README.md @@ -0,0 +1,4 @@ +EOverPCalibration +================= + +Package for Single Electron Calibration From ba9c8e816ffd119d4785badcc98076d6523c3492 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 21 Sep 2014 17:54:51 +0200 Subject: [PATCH 450/475] update --- .../FastCalibrator/BuildFile.xml | 8 - .../BasicClusterLocalContainementCorrection.C | 26 - ...asicClusterLocalContainmentCorrectionEta.C | 29 - ...asicClusterLocalContainmentCorrectionPhi.C | 24 - .../CommonTools/TMomentumCalibration.h | 46 - .../CommonTools/TPileupReweighting.h | 35 - .../FastCalibrator/CommonTools/eerings.dat | 14648 ---------------- .../FastCalibrator/CommonTools/histoFunc.h | 92 - EOverPCalibration/FastCalibrator/README | 160 - EOverPCalibration/FastCalibrator/RMSFile.txt | 85 - .../bin/AddRegressionWeight.cpp | 637 - .../FastCalibrator/bin/BuildFile.xml | 25 - .../bin/CalibrationMomentum.cpp | 1143 -- .../FastCalibrator/bin/CalibrationPlots.cpp | 854 - .../FastCalibrator/bin/CompareICSet.cpp | 1087 -- .../bin/CompareSCalibMCTruth_EB.cpp | 256 - .../bin/CompareSCalibMCTruth_EE.cpp | 612 - .../FastCalibrator/bin/DeadXtalAnalysisEB.cpp | 2313 --- .../bin/DrawPrecisionPlotsEB.cpp | 207 - .../bin/DrawPrecisionPlotsEE.cpp | 319 - .../FastCalibrator/bin/FastCalibratorEB.cpp | 361 - .../bin/FastCalibratorEB_MVA.cpp | 203 - .../FastCalibrator/bin/FastCalibratorEE.cpp | 365 - .../bin/FastCalibratorEE_MVA.cpp | 230 - .../FastCalibrator/bin/MVARegression.cpp | 389 - .../FastCalibrator/bin/MakeJobs.cpp | 584 - .../bin/MomentumCorrection_MC.cpp | 327 - .../FastCalibrator/bin/NormalizeIC_EE.cpp | 572 - .../FastCalibrator/bin/OccupancyPlot.cpp | 647 - .../FastCalibrator/bin/PlotICMapsRatio.cpp | 269 - .../FastCalibrator/bin/PlotICMapsRatioEE.cpp | 235 - .../FastCalibrator/bin/RateHLTvsEta.cpp | 231 - .../FastCalibrator/bin/XtalAlphaEB.cpp | 219 - .../FastCalibrator/bin/XtalAlphaEE.cpp | 250 - .../FastCalibrator/bin/Zlineshape.cpp | 945 - .../cfg/AddRegressionWeight_cfg.py | 17 - .../FastCalibrator/cfg/Barrel.cfg | 50 - .../FastCalibrator/cfg/DeadXtalAnalysisEB.cfg | 32 - .../FastCalibrator/cfg/Endcap.cfg | 25 - .../cfg/FastCalibrator_EB_nosplit_cfg.py | 34 - .../cfg/FastCalibrator_EB_split_cfg.py | 34 - .../cfg/FastCalibrator_EE_nosplit_cfg.py | 35 - .../cfg/FastCalibrator_EE_split_cfg.py | 35 - .../cfg/FastCalibrator_Template.cfg | 37 - .../FastCalibrator/cfg/MVARegression_cfg.cfg | 33 - .../FastCalibrator/cfg/MakeJobs_cfg.cfg | 61 - .../FastCalibrator/cfg/NormalizeEE_cfg.py | 16 - .../cfg/XtalAlphaEB_noSplit.cfg | 33 - .../FastCalibrator/cfg/XtalAlphaEB_split.cfg | 33 - .../cfg/XtalAlphaEE_noSplit.cfg | 31 - .../FastCalibrator/cfg/XtalAlphaEE_split.cfg | 34 - .../FastCalibrator/cfg/Zlineshape_cfg.cfg | 49 - .../cfg/calibrationMomentum_cfg.py | 23 - .../cfg/calibrationPlots_EB_cfg.py | 22 - .../cfg/calibrationPlots_EE_cfg.py | 22 - .../FastCalibrator/cfg/comparisonEB_cfg.py | 12 - .../FastCalibrator/cfg/comparisonEE_cfg.py | 13 - EOverPCalibration/FastCalibrator/cfg/list.txt | 5 - .../cfg/listDATA_momentumCalibration.txt | 5 - .../cfg/listMC2012_momentumCalibration.txt | 6 - EOverPCalibration/FastCalibrator/cfg/test.cfg | 34 - .../interface/CalibrationUtils.h | 102 - .../FastCalibrator/interface/DrawingUtils.h | 46 - .../interface/FastCalibratorEB.h | 219 - .../interface/FastCalibratorEB_MVA.h | 243 - .../interface/FastCalibratorEE.h | 258 - .../interface/FastCalibratorEE_MVA.h | 277 - .../interface/GetHashedIndexEB.h | 22 - .../interface/GetHashedIndexEE.h | 29 - .../FastCalibrator/interface/LinkDef.h | 8 - .../FastCalibrator/interface/SIC_ixiyiz.list | 1546 -- .../FastCalibrator/interface/TEndcapRings.h | 49 - .../FastCalibrator/interface/TSicCrystals.h | 41 - .../FastCalibrator/interface/XtalAlphaEB.h | 251 - .../FastCalibrator/interface/XtalAlphaEE.h | 298 - .../FastCalibrator/interface/Zutils.h | 60 - .../FastCalibrator/interface/geometryUtils.h | 56 - .../FastCalibrator/interface/setTDRStyle.h | 14 - ...V_13Jul2012ReReco_Collisions12_JSON_v2.txt | 1 - ...2_8TeV_PromptReco_Collisions12_JSON_v2.txt | 374 - ...2_8TeV_PromptReco_Collisions12_JSON_v2.txt | 1 - ...8686_8TeV_PromptReco_Collisions12_JSON.txt | 1 - .../macros/CombineMomentumCalibration.cxx | 339 - .../FastCalibrator/macros/CompareCoeff.cxx | 144 - .../FastCalibrator/macros/CompareL3Template.C | 136 - .../Correction_TrackerEffect_EE_DATA.cxx | 295 - .../macros/Correction_TrackerEffect_EE_MC.cxx | 384 - .../macros/DrawCalibrationPlotsEB.C | 442 - .../macros/DrawCalibrationPlotsEB_phiGroups.C | 406 - .../macros/DrawCalibrationPlotsEE.C | 763 - .../macros/DrawEPDistributions.cxx | 89 - .../macros/DrawMomentumCalibration.cxx | 227 - .../macros/DrawResidualPlotsEB.C | 330 - .../FastCalibrator/macros/Normalize_IC_EE.cxx | 277 - .../FastCalibrator/macros/ProduceScalibMap.C | 45 - .../macros/ProduceScalibMapEE.C | 46 - .../FastCalibrator/macros/README | 94 - .../FastCalibrator/macros/eerings.dat | 14648 ---------------- .../FastCalibrator/src/CalibrationUtils.cc | 1069 -- .../FastCalibrator/src/DrawingUtils.cc | 318 - .../FastCalibrator/src/FastCalibratorEB.cc | 974 - .../src/FastCalibratorEB_MVA.cc | 1048 -- .../FastCalibrator/src/FastCalibratorEE.cc | 1085 -- .../src/FastCalibratorEE_MVA.cc | 1149 -- .../FastCalibrator/src/GetHashedIndexEB.cc | 32 - .../FastCalibrator/src/GetHashedIndexEE.cc | 75 - EOverPCalibration/FastCalibrator/src/README | 29 - .../FastCalibrator/src/TEndcapRings.cc | 71 - .../FastCalibrator/src/TSicCrystals.cc | 28 - .../FastCalibrator/src/XtalAlphaEB.cc | 998 -- .../FastCalibrator/src/XtalAlphaEE.cc | 1474 -- .../FastCalibrator/src/Zutils.cc | 640 - .../FastCalibrator/src/geometryUtils.cc | 256 - .../FastCalibrator/src/setTDRStyle.cc | 168 - EOverPCalibration/NtuplePackage/BuildFile.xml | 7 - .../NtuplePackage/interface/ConfigFileLine.h | 77 - .../NtuplePackage/interface/ConfigParser.h | 95 - .../NtuplePackage/interface/LHEReader.h | 74 - .../NtuplePackage/interface/LinkDef.h | 19 - .../NtuplePackage/interface/h2Chain.h | 37 - .../NtuplePackage/interface/hChain.h | 46 - .../NtuplePackage/interface/ntpleUtils.h | 51 - .../NtuplePackage/interface/readJSONFile.h | 23 - .../NtuplePackage/interface/setTDRStyle.h | 15 - .../NtuplePackage/interface/treeReader.h | 70 - EOverPCalibration/NtuplePackage/obj/mydict.cc | 858 - EOverPCalibration/NtuplePackage/obj/mydict.h | 114 - .../NtuplePackage/src/ConfigFileLine.cc | 106 - .../NtuplePackage/src/LHEReader.cc | 135 - EOverPCalibration/NtuplePackage/src/Makefile | 127 - .../NtuplePackage/src/h2Chain.cc | 153 - EOverPCalibration/NtuplePackage/src/hChain.cc | 282 - .../NtuplePackage/src/ntpleUtils.cc | 214 - .../NtuplePackage/src/readJSONFile.cc | 111 - .../NtuplePackage/src/setTDRStyle.cc | 203 - .../NtuplePackage/src/treeReader.cc | 691 - EOverPCalibration/README.md | 4 - 137 files changed, 64651 deletions(-) delete mode 100644 EOverPCalibration/FastCalibrator/BuildFile.xml delete mode 100644 EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C delete mode 100644 EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C delete mode 100644 EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C delete mode 100644 EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h delete mode 100644 EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h delete mode 100644 EOverPCalibration/FastCalibrator/CommonTools/eerings.dat delete mode 100755 EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h delete mode 100644 EOverPCalibration/FastCalibrator/README delete mode 100644 EOverPCalibration/FastCalibrator/RMSFile.txt delete mode 100755 EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/BuildFile.xml delete mode 100644 EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEB_MVA.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/FastCalibratorEE_MVA.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/MVARegression.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/MomentumCorrection_MC.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/OccupancyPlot.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp delete mode 100644 EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp delete mode 100644 EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/Barrel.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/Endcap.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg delete mode 100644 EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py delete mode 100644 EOverPCalibration/FastCalibrator/cfg/list.txt delete mode 100644 EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt delete mode 100644 EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt delete mode 100644 EOverPCalibration/FastCalibrator/cfg/test.cfg delete mode 100644 EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/DrawingUtils.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/LinkDef.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list delete mode 100644 EOverPCalibration/FastCalibrator/interface/TEndcapRings.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/TSicCrystals.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/Zutils.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/geometryUtils.h delete mode 100644 EOverPCalibration/FastCalibrator/interface/setTDRStyle.h delete mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt delete mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt delete mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt delete mode 100644 EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt delete mode 100644 EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx delete mode 100644 EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx delete mode 100644 EOverPCalibration/FastCalibrator/macros/CompareL3Template.C delete mode 100644 EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx delete mode 100644 EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx delete mode 100644 EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C delete mode 100644 EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C delete mode 100644 EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C delete mode 100644 EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx delete mode 100644 EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx delete mode 100644 EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C delete mode 100644 EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx delete mode 100644 EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C delete mode 100644 EOverPCalibration/FastCalibrator/macros/ProduceScalibMapEE.C delete mode 100644 EOverPCalibration/FastCalibrator/macros/README delete mode 100644 EOverPCalibration/FastCalibrator/macros/eerings.dat delete mode 100644 EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/DrawingUtils.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/README delete mode 100644 EOverPCalibration/FastCalibrator/src/TEndcapRings.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/TSicCrystals.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/Zutils.cc delete mode 100644 EOverPCalibration/FastCalibrator/src/geometryUtils.cc delete mode 100755 EOverPCalibration/FastCalibrator/src/setTDRStyle.cc delete mode 100644 EOverPCalibration/NtuplePackage/BuildFile.xml delete mode 100644 EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/ConfigParser.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/LHEReader.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/LinkDef.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/h2Chain.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/hChain.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/ntpleUtils.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/readJSONFile.h delete mode 100755 EOverPCalibration/NtuplePackage/interface/setTDRStyle.h delete mode 100644 EOverPCalibration/NtuplePackage/interface/treeReader.h delete mode 100644 EOverPCalibration/NtuplePackage/obj/mydict.cc delete mode 100644 EOverPCalibration/NtuplePackage/obj/mydict.h delete mode 100644 EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc delete mode 100644 EOverPCalibration/NtuplePackage/src/LHEReader.cc delete mode 100644 EOverPCalibration/NtuplePackage/src/Makefile delete mode 100644 EOverPCalibration/NtuplePackage/src/h2Chain.cc delete mode 100644 EOverPCalibration/NtuplePackage/src/hChain.cc delete mode 100644 EOverPCalibration/NtuplePackage/src/ntpleUtils.cc delete mode 100644 EOverPCalibration/NtuplePackage/src/readJSONFile.cc delete mode 100755 EOverPCalibration/NtuplePackage/src/setTDRStyle.cc delete mode 100644 EOverPCalibration/NtuplePackage/src/treeReader.cc delete mode 100644 EOverPCalibration/README.md diff --git a/EOverPCalibration/FastCalibrator/BuildFile.xml b/EOverPCalibration/FastCalibrator/BuildFile.xml deleted file mode 100644 index 85e5f1fcd13..00000000000 --- a/EOverPCalibration/FastCalibrator/BuildFile.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C deleted file mode 100644 index 0e3838269e3..00000000000 --- a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainementCorrection.C +++ /dev/null @@ -1,26 +0,0 @@ -#include "TF1.h" - -//TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2)-[3]*pow(x,3)-[4]*pow(x,4))",-1,1.); -TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); - -double BasicClusterLocalContainementCorrection (float localEta, int imod){ - - // --- correction function derived from E/p data - // pol4 - // if (imod==0) f->SetParameters(1.00613,0.0049502 , 0.0677101 , 0.0148299 , 0.00523093); - // if (imod==1) f->SetParameters(1.00633,0.00403076 , 0.0689901 , 0.00242213 , 0.0239275); - // if (imod==2) f->SetParameters(1.00648,0.0111289 , 0.0878569 , 0.0299266 , -0.0597349); - // if (imod==3) f->SetParameters(1.01058,0.0135225 , 0.16731 , 0.0208505 , -0.21014); - - // pol2 - if (imod==0) f->SetParameters(1.00603,0.00300789 , 0.0667232); - if (imod==1) f->SetParameters(1.00655,0.00386189 , 0.073931); - if (imod==2) f->SetParameters(1.00634,0.00631341 , 0.0764134); - if (imod==3) f->SetParameters(1.00957,0.0113306 , 0.123808); - - - double corr = f-> Eval(localEta); - return(1./corr); - -} - diff --git a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C deleted file mode 100644 index 5a188322f65..00000000000 --- a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionEta.C +++ /dev/null @@ -1,29 +0,0 @@ -// Local containment correction vs local eta of basic clusters -// --- correction function derived from E/p data -// --- tested both pol2 and plo4 --> very similar results - -#include "TF1.h" - -//TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2)-[3]*pow(x,3)-[4]*pow(x,4))",-1,1.); -TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); - -double BasicClusterLocalContainmentCorrectionEta (float localEta, int imod){ - - // pol4 - // if (imod==0) f->SetParameters(1.00613,0.0049502 , 0.0677101 , 0.0148299 , 0.00523093); - // if (imod==1) f->SetParameters(1.00633,0.00403076 , 0.0689901 , 0.00242213 , 0.0239275); - // if (imod==2) f->SetParameters(1.00648,0.0111289 , 0.0878569 , 0.0299266 , -0.0597349); - // if (imod==3) f->SetParameters(1.01058,0.0135225 , 0.16731 , 0.0208505 , -0.21014); - - // pol2 - if (imod==0) f->SetParameters(1.00603,0.00300789 , 0.0667232); - if (imod==1) f->SetParameters(1.00655,0.00386189 , 0.073931); - if (imod==2) f->SetParameters(1.00634,0.00631341 , 0.0764134); - if (imod==3) f->SetParameters(1.00957,0.0113306 , 0.123808); - - - double corr = f-> Eval(localEta); - return(1./corr); - -} - diff --git a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C b/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C deleted file mode 100644 index b487726c3e2..00000000000 --- a/EOverPCalibration/FastCalibrator/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C +++ /dev/null @@ -1,24 +0,0 @@ -// Local containment correction vs local eta of basic clusters -// --- correction function derived from E/p data -// --- caveat : E/p realtive scale vs local phi depends on (eta*charge). -// this is an average correction for all R9 and all (eta*charge) electrons - -#include "TF1.h" - -TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); - -double BasicClusterLocalContainmentCorrectionPhi (float localPhi, int imod){ - - // --- correction function derived from E/p data - - // pol2 - if (imod==0) f->SetParameters(1.00403,-0.0012733 , 0.042925); - if (imod==1) f->SetParameters(1.00394,-0.00137567 , 0.0416698); - if (imod==2) f->SetParameters(1.00298,-0.00111589 , 0.0320377); - if (imod==3)f->SetParameters(1.00269,-0.00153347 , 0.0296769); - - double corr = f-> Eval(localPhi); - return(1./corr); - -} - diff --git a/EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h b/EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h deleted file mode 100644 index 347691f68be..00000000000 --- a/EOverPCalibration/FastCalibrator/CommonTools/TMomentumCalibration.h +++ /dev/null @@ -1,46 +0,0 @@ -#include "TFile.h" -#include "TF1.h" -#include "TH1.h" -#include "TCanvas.h" -#include "TGraphErrors.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class TMomentumCalibration { - private: - TGraphErrors *gdata; - TGraphErrors *gmc; - public: - TMomentumCalibration(std::string); - ~TMomentumCalibration(); - double GetMomentumCalibration(int, int); - // ClassDef(TMomentumCalibration,1); -}; - -// default constructor, reading the corrections from file -TMomentumCalibration::TMomentumCalibration(std::string fname) { - TFile *fP = TFile::Open(fname.c_str(), "READ"); - std::cout << "Reading momentum calibration from :"<< fname.c_str() << std::endl; - gdata = (TGraphErrors*)fP->Get("g_EoC"); - gmc = (TGraphErrors*)fP->Get("g_EoP"); - return; -} - -TMomentumCalibration::~TMomentumCalibration() { return;} - -double TMomentumCalibration::GetMomentumCalibration(int ieta, int isData){ - double scale; - // NB: i graps contengono la scala di 1/p. - if ( isData) scale = gdata -> Eval(ieta); - if (!isData) scale = gmc -> Eval(ieta); - if (scale == 0) scale = 1.; - return (scale); -} diff --git a/EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h b/EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h deleted file mode 100644 index 082b2a51e91..00000000000 --- a/EOverPCalibration/FastCalibrator/CommonTools/TPileupReweighting.h +++ /dev/null @@ -1,35 +0,0 @@ -#include "TFile.h" -#include "TH1.h" - -#include -#include -#include -#include - - -class TPileupReweighting { - private: - float w[100]; - public: - TPileupReweighting(std::string,std::string); - ~TPileupReweighting(); - double GetWeight(int); - // ClassDef(TPileupReweighting,1); -}; - -// default constructor, reading the corrections from file -TPileupReweighting::TPileupReweighting(std::string fname, std::string hname) { - TFile weightsFile(fname.c_str(),"READ"); - TH1F* hweights = (TH1F*)weightsFile.Get(hname.c_str()); - for (int ibin = 1; ibin < hweights->GetNbinsX()+1; ibin++){ - w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 - } - weightsFile.Close(); - return; -} - -TPileupReweighting::~TPileupReweighting() { return;} - -double TPileupReweighting::GetWeight(int npu){ - return (w[npu]); -} diff --git a/EOverPCalibration/FastCalibrator/CommonTools/eerings.dat b/EOverPCalibration/FastCalibrator/CommonTools/eerings.dat deleted file mode 100644 index b1a1f13daae..00000000000 --- a/EOverPCalibration/FastCalibrator/CommonTools/eerings.dat +++ /dev/null @@ -1,14648 +0,0 @@ -(1, 41, -1) 0 -(1, 42, -1) 0 -(1, 43, -1) 0 -(1, 44, -1) 0 -(1, 45, -1) 0 -(1, 46, -1) 0 -(1, 47, -1) 0 -(1, 48, -1) 0 -(1, 49, -1) 0 -(1, 50, -1) 0 -(1, 51, -1) 0 -(1, 52, -1) 0 -(1, 53, -1) 0 -(1, 54, -1) 0 -(1, 55, -1) 0 -(1, 56, -1) 0 -(1, 57, -1) 0 -(1, 58, -1) 0 -(1, 59, -1) 0 -(1, 60, -1) 0 -(2, 41, -1) 0 -(2, 42, -1) 0 -(2, 43, -1) 0 -(2, 44, -1) 1 -(2, 45, -1) 1 -(2, 46, -1) 1 -(2, 47, -1) 1 -(2, 48, -1) 1 -(2, 49, -1) 1 -(2, 50, -1) 1 -(2, 51, -1) 1 -(2, 52, -1) 1 -(2, 53, -1) 1 -(2, 54, -1) 1 -(2, 55, -1) 1 -(2, 56, -1) 1 -(2, 57, -1) 1 -(2, 58, -1) 0 -(2, 59, -1) 0 -(2, 60, -1) 0 -(3, 41, -1) 1 -(3, 42, -1) 1 -(3, 43, -1) 1 -(3, 44, -1) 2 -(3, 45, -1) 2 -(3, 46, -1) 2 -(3, 47, -1) 2 -(3, 48, -1) 2 -(3, 49, -1) 2 -(3, 50, -1) 2 -(3, 51, -1) 2 -(3, 52, -1) 2 -(3, 53, -1) 2 -(3, 54, -1) 2 -(3, 55, -1) 2 -(3, 56, -1) 2 -(3, 57, -1) 2 -(3, 58, -1) 1 -(3, 59, -1) 1 -(3, 60, -1) 1 -(4, 36, -1) 1 -(4, 37, -1) 1 -(4, 38, -1) 2 -(4, 39, -1) 2 -(4, 40, -1) 2 -(4, 41, -1) 2 -(4, 42, -1) 2 -(4, 43, -1) 2 -(4, 44, -1) 3 -(4, 45, -1) 3 -(4, 46, -1) 3 -(4, 47, -1) 3 -(4, 48, -1) 3 -(4, 49, -1) 3 -(4, 50, -1) 3 -(4, 51, -1) 3 -(4, 52, -1) 3 -(4, 53, -1) 3 -(4, 54, -1) 3 -(4, 55, -1) 3 -(4, 56, -1) 3 -(4, 57, -1) 3 -(4, 58, -1) 2 -(4, 59, -1) 2 -(4, 60, -1) 2 -(4, 61, -1) 2 -(4, 62, -1) 2 -(4, 63, -1) 2 -(4, 64, -1) 1 -(4, 65, -1) 1 -(5, 36, -1) 2 -(5, 37, -1) 2 -(5, 38, -1) 2 -(5, 39, -1) 3 -(5, 40, -1) 3 -(5, 41, -1) 3 -(5, 42, -1) 3 -(5, 43, -1) 3 -(5, 44, -1) 4 -(5, 45, -1) 4 -(5, 46, -1) 4 -(5, 47, -1) 4 -(5, 48, -1) 4 -(5, 49, -1) 4 -(5, 50, -1) 4 -(5, 51, -1) 4 -(5, 52, -1) 4 -(5, 53, -1) 4 -(5, 54, -1) 4 -(5, 55, -1) 4 -(5, 56, -1) 4 -(5, 57, -1) 4 -(5, 58, -1) 3 -(5, 59, -1) 3 -(5, 60, -1) 3 -(5, 61, -1) 3 -(5, 62, -1) 3 -(5, 63, -1) 2 -(5, 64, -1) 2 -(5, 65, -1) 2 -(6, 26, -1) 0 -(6, 27, -1) 0 -(6, 28, -1) 0 -(6, 29, -1) 0 -(6, 30, -1) 1 -(6, 31, -1) 1 -(6, 32, -1) 1 -(6, 33, -1) 2 -(6, 34, -1) 2 -(6, 35, -1) 3 -(6, 36, -1) 3 -(6, 37, -1) 3 -(6, 38, -1) 3 -(6, 39, -1) 4 -(6, 40, -1) 4 -(6, 41, -1) 4 -(6, 42, -1) 4 -(6, 43, -1) 4 -(6, 44, -1) 5 -(6, 45, -1) 5 -(6, 46, -1) 5 -(6, 47, -1) 5 -(6, 48, -1) 5 -(6, 49, -1) 5 -(6, 50, -1) 5 -(6, 51, -1) 5 -(6, 52, -1) 5 -(6, 53, -1) 5 -(6, 54, -1) 5 -(6, 55, -1) 5 -(6, 56, -1) 5 -(6, 57, -1) 5 -(6, 58, -1) 4 -(6, 59, -1) 4 -(6, 60, -1) 4 -(6, 61, -1) 4 -(6, 62, -1) 4 -(6, 63, -1) 3 -(6, 64, -1) 3 -(6, 65, -1) 3 -(6, 66, -1) 3 -(6, 67, -1) 2 -(6, 68, -1) 2 -(6, 69, -1) 1 -(6, 70, -1) 1 -(6, 71, -1) 1 -(6, 72, -1) 0 -(6, 73, -1) 0 -(6, 74, -1) 0 -(6, 75, -1) 0 -(7, 26, -1) 0 -(7, 27, -1) 0 -(7, 28, -1) 1 -(7, 29, -1) 1 -(7, 30, -1) 2 -(7, 31, -1) 2 -(7, 32, -1) 2 -(7, 33, -1) 3 -(7, 34, -1) 3 -(7, 35, -1) 3 -(7, 36, -1) 4 -(7, 37, -1) 4 -(7, 38, -1) 4 -(7, 39, -1) 5 -(7, 40, -1) 5 -(7, 41, -1) 5 -(7, 42, -1) 5 -(7, 43, -1) 5 -(7, 44, -1) 6 -(7, 45, -1) 6 -(7, 46, -1) 6 -(7, 47, -1) 6 -(7, 48, -1) 6 -(7, 49, -1) 6 -(7, 50, -1) 6 -(7, 51, -1) 6 -(7, 52, -1) 6 -(7, 53, -1) 6 -(7, 54, -1) 6 -(7, 55, -1) 6 -(7, 56, -1) 6 -(7, 57, -1) 6 -(7, 58, -1) 5 -(7, 59, -1) 5 -(7, 60, -1) 5 -(7, 61, -1) 5 -(7, 62, -1) 5 -(7, 63, -1) 4 -(7, 64, -1) 4 -(7, 65, -1) 4 -(7, 66, -1) 3 -(7, 67, -1) 3 -(7, 68, -1) 3 -(7, 69, -1) 2 -(7, 70, -1) 2 -(7, 71, -1) 2 -(7, 72, -1) 1 -(7, 73, -1) 1 -(7, 74, -1) 0 -(7, 75, -1) 0 -(8, 26, -1) 1 -(8, 27, -1) 1 -(8, 28, -1) 2 -(8, 29, -1) 2 -(8, 30, -1) 3 -(8, 31, -1) 3 -(8, 32, -1) 3 -(8, 33, -1) 4 -(8, 34, -1) 4 -(8, 35, -1) 4 -(8, 36, -1) 5 -(8, 37, -1) 5 -(8, 38, -1) 5 -(8, 39, -1) 6 -(8, 40, -1) 6 -(8, 41, -1) 6 -(8, 42, -1) 6 -(8, 43, -1) 6 -(8, 44, -1) 7 -(8, 45, -1) 7 -(8, 46, -1) 7 -(8, 47, -1) 7 -(8, 48, -1) 7 -(8, 49, -1) 7 -(8, 50, -1) 7 -(8, 51, -1) 7 -(8, 52, -1) 7 -(8, 53, -1) 7 -(8, 54, -1) 7 -(8, 55, -1) 7 -(8, 56, -1) 7 -(8, 57, -1) 7 -(8, 58, -1) 6 -(8, 59, -1) 6 -(8, 60, -1) 6 -(8, 61, -1) 6 -(8, 62, -1) 6 -(8, 63, -1) 5 -(8, 64, -1) 5 -(8, 65, -1) 5 -(8, 66, -1) 4 -(8, 67, -1) 4 -(8, 68, -1) 4 -(8, 69, -1) 3 -(8, 70, -1) 3 -(8, 71, -1) 3 -(8, 72, -1) 2 -(8, 73, -1) 2 -(8, 74, -1) 1 -(8, 75, -1) 1 -(9, 21, -1) 0 -(9, 22, -1) 0 -(9, 23, -1) 0 -(9, 24, -1) 1 -(9, 25, -1) 1 -(9, 26, -1) 2 -(9, 27, -1) 2 -(9, 28, -1) 3 -(9, 29, -1) 3 -(9, 30, -1) 4 -(9, 31, -1) 4 -(9, 32, -1) 4 -(9, 33, -1) 5 -(9, 34, -1) 5 -(9, 35, -1) 5 -(9, 36, -1) 6 -(9, 37, -1) 6 -(9, 38, -1) 6 -(9, 39, -1) 7 -(9, 40, -1) 7 -(9, 41, -1) 7 -(9, 42, -1) 7 -(9, 43, -1) 7 -(9, 44, -1) 8 -(9, 45, -1) 8 -(9, 46, -1) 8 -(9, 47, -1) 8 -(9, 48, -1) 8 -(9, 49, -1) 8 -(9, 50, -1) 8 -(9, 51, -1) 8 -(9, 52, -1) 8 -(9, 53, -1) 8 -(9, 54, -1) 8 -(9, 55, -1) 8 -(9, 56, -1) 8 -(9, 57, -1) 8 -(9, 58, -1) 7 -(9, 59, -1) 7 -(9, 60, -1) 7 -(9, 61, -1) 7 -(9, 62, -1) 7 -(9, 63, -1) 6 -(9, 64, -1) 6 -(9, 65, -1) 6 -(9, 66, -1) 5 -(9, 67, -1) 5 -(9, 68, -1) 5 -(9, 69, -1) 4 -(9, 70, -1) 4 -(9, 71, -1) 4 -(9, 72, -1) 3 -(9, 73, -1) 3 -(9, 74, -1) 2 -(9, 75, -1) 2 -(9, 76, -1) 1 -(9, 77, -1) 1 -(9, 78, -1) 0 -(9, 79, -1) 0 -(9, 80, -1) 0 -(10, 21, -1) 0 -(10, 22, -1) 1 -(10, 23, -1) 1 -(10, 24, -1) 2 -(10, 25, -1) 2 -(10, 26, -1) 3 -(10, 27, -1) 3 -(10, 28, -1) 4 -(10, 29, -1) 4 -(10, 30, -1) 4 -(10, 31, -1) 5 -(10, 32, -1) 5 -(10, 33, -1) 6 -(10, 34, -1) 6 -(10, 35, -1) 6 -(10, 36, -1) 7 -(10, 37, -1) 7 -(10, 38, -1) 7 -(10, 39, -1) 8 -(10, 40, -1) 8 -(10, 41, -1) 8 -(10, 42, -1) 8 -(10, 43, -1) 8 -(10, 44, -1) 9 -(10, 45, -1) 9 -(10, 46, -1) 9 -(10, 47, -1) 9 -(10, 48, -1) 9 -(10, 49, -1) 9 -(10, 50, -1) 9 -(10, 51, -1) 9 -(10, 52, -1) 9 -(10, 53, -1) 9 -(10, 54, -1) 9 -(10, 55, -1) 9 -(10, 56, -1) 9 -(10, 57, -1) 9 -(10, 58, -1) 8 -(10, 59, -1) 8 -(10, 60, -1) 8 -(10, 61, -1) 8 -(10, 62, -1) 8 -(10, 63, -1) 7 -(10, 64, -1) 7 -(10, 65, -1) 7 -(10, 66, -1) 6 -(10, 67, -1) 6 -(10, 68, -1) 6 -(10, 69, -1) 5 -(10, 70, -1) 5 -(10, 71, -1) 4 -(10, 72, -1) 4 -(10, 73, -1) 4 -(10, 74, -1) 3 -(10, 75, -1) 3 -(10, 76, -1) 2 -(10, 77, -1) 2 -(10, 78, -1) 1 -(10, 79, -1) 1 -(10, 80, -1) 0 -(11, 21, -1) 1 -(11, 22, -1) 1 -(11, 23, -1) 2 -(11, 24, -1) 2 -(11, 25, -1) 3 -(11, 26, -1) 3 -(11, 27, -1) 4 -(11, 28, -1) 4 -(11, 29, -1) 5 -(11, 30, -1) 5 -(11, 31, -1) 6 -(11, 32, -1) 6 -(11, 33, -1) 6 -(11, 34, -1) 7 -(11, 35, -1) 7 -(11, 36, -1) 8 -(11, 37, -1) 8 -(11, 38, -1) 8 -(11, 39, -1) 8 -(11, 40, -1) 9 -(11, 41, -1) 9 -(11, 42, -1) 9 -(11, 43, -1) 9 -(11, 44, -1) 9 -(11, 45, -1) 10 -(11, 46, -1) 10 -(11, 47, -1) 10 -(11, 48, -1) 10 -(11, 49, -1) 10 -(11, 50, -1) 10 -(11, 51, -1) 10 -(11, 52, -1) 10 -(11, 53, -1) 10 -(11, 54, -1) 10 -(11, 55, -1) 10 -(11, 56, -1) 10 -(11, 57, -1) 9 -(11, 58, -1) 9 -(11, 59, -1) 9 -(11, 60, -1) 9 -(11, 61, -1) 9 -(11, 62, -1) 8 -(11, 63, -1) 8 -(11, 64, -1) 8 -(11, 65, -1) 8 -(11, 66, -1) 7 -(11, 67, -1) 7 -(11, 68, -1) 6 -(11, 69, -1) 6 -(11, 70, -1) 6 -(11, 71, -1) 5 -(11, 72, -1) 5 -(11, 73, -1) 4 -(11, 74, -1) 4 -(11, 75, -1) 3 -(11, 76, -1) 3 -(11, 77, -1) 2 -(11, 78, -1) 2 -(11, 79, -1) 1 -(11, 80, -1) 1 -(12, 21, -1) 1 -(12, 22, -1) 2 -(12, 23, -1) 3 -(12, 24, -1) 3 -(12, 25, -1) 4 -(12, 26, -1) 4 -(12, 27, -1) 5 -(12, 28, -1) 5 -(12, 29, -1) 6 -(12, 30, -1) 6 -(12, 31, -1) 7 -(12, 32, -1) 7 -(12, 33, -1) 7 -(12, 34, -1) 8 -(12, 35, -1) 8 -(12, 36, -1) 8 -(12, 37, -1) 9 -(12, 38, -1) 9 -(12, 39, -1) 9 -(12, 40, -1) 10 -(12, 41, -1) 10 -(12, 42, -1) 10 -(12, 43, -1) 10 -(12, 44, -1) 10 -(12, 45, -1) 11 -(12, 46, -1) 11 -(12, 47, -1) 11 -(12, 48, -1) 11 -(12, 49, -1) 11 -(12, 50, -1) 11 -(12, 51, -1) 11 -(12, 52, -1) 11 -(12, 53, -1) 11 -(12, 54, -1) 11 -(12, 55, -1) 11 -(12, 56, -1) 11 -(12, 57, -1) 10 -(12, 58, -1) 10 -(12, 59, -1) 10 -(12, 60, -1) 10 -(12, 61, -1) 10 -(12, 62, -1) 9 -(12, 63, -1) 9 -(12, 64, -1) 9 -(12, 65, -1) 8 -(12, 66, -1) 8 -(12, 67, -1) 8 -(12, 68, -1) 7 -(12, 69, -1) 7 -(12, 70, -1) 7 -(12, 71, -1) 6 -(12, 72, -1) 6 -(12, 73, -1) 5 -(12, 74, -1) 5 -(12, 75, -1) 4 -(12, 76, -1) 4 -(12, 77, -1) 3 -(12, 78, -1) 3 -(12, 79, -1) 2 -(12, 80, -1) 1 -(13, 21, -1) 2 -(13, 22, -1) 3 -(13, 23, -1) 3 -(13, 24, -1) 4 -(13, 25, -1) 5 -(13, 26, -1) 5 -(13, 27, -1) 6 -(13, 28, -1) 6 -(13, 29, -1) 7 -(13, 30, -1) 7 -(13, 31, -1) 7 -(13, 32, -1) 8 -(13, 33, -1) 8 -(13, 34, -1) 9 -(13, 35, -1) 9 -(13, 36, -1) 9 -(13, 37, -1) 10 -(13, 38, -1) 10 -(13, 39, -1) 10 -(13, 40, -1) 11 -(13, 41, -1) 11 -(13, 42, -1) 11 -(13, 43, -1) 11 -(13, 44, -1) 11 -(13, 45, -1) 12 -(13, 46, -1) 12 -(13, 47, -1) 12 -(13, 48, -1) 12 -(13, 49, -1) 12 -(13, 50, -1) 12 -(13, 51, -1) 12 -(13, 52, -1) 12 -(13, 53, -1) 12 -(13, 54, -1) 12 -(13, 55, -1) 12 -(13, 56, -1) 12 -(13, 57, -1) 11 -(13, 58, -1) 11 -(13, 59, -1) 11 -(13, 60, -1) 11 -(13, 61, -1) 11 -(13, 62, -1) 10 -(13, 63, -1) 10 -(13, 64, -1) 10 -(13, 65, -1) 9 -(13, 66, -1) 9 -(13, 67, -1) 9 -(13, 68, -1) 8 -(13, 69, -1) 8 -(13, 70, -1) 7 -(13, 71, -1) 7 -(13, 72, -1) 7 -(13, 73, -1) 6 -(13, 74, -1) 6 -(13, 75, -1) 5 -(13, 76, -1) 5 -(13, 77, -1) 4 -(13, 78, -1) 3 -(13, 79, -1) 3 -(13, 80, -1) 2 -(14, 16, -1) 0 -(14, 17, -1) 1 -(14, 18, -1) 1 -(14, 19, -1) 2 -(14, 20, -1) 2 -(14, 21, -1) 3 -(14, 22, -1) 4 -(14, 23, -1) 4 -(14, 24, -1) 5 -(14, 25, -1) 5 -(14, 26, -1) 6 -(14, 27, -1) 6 -(14, 28, -1) 7 -(14, 29, -1) 7 -(14, 30, -1) 8 -(14, 31, -1) 8 -(14, 32, -1) 9 -(14, 33, -1) 9 -(14, 34, -1) 10 -(14, 35, -1) 10 -(14, 36, -1) 10 -(14, 37, -1) 11 -(14, 38, -1) 11 -(14, 39, -1) 11 -(14, 40, -1) 12 -(14, 41, -1) 12 -(14, 42, -1) 12 -(14, 43, -1) 12 -(14, 44, -1) 12 -(14, 45, -1) 13 -(14, 46, -1) 13 -(14, 47, -1) 13 -(14, 48, -1) 13 -(14, 49, -1) 13 -(14, 50, -1) 13 -(14, 51, -1) 13 -(14, 52, -1) 13 -(14, 53, -1) 13 -(14, 54, -1) 13 -(14, 55, -1) 13 -(14, 56, -1) 13 -(14, 57, -1) 12 -(14, 58, -1) 12 -(14, 59, -1) 12 -(14, 60, -1) 12 -(14, 61, -1) 12 -(14, 62, -1) 11 -(14, 63, -1) 11 -(14, 64, -1) 11 -(14, 65, -1) 10 -(14, 66, -1) 10 -(14, 67, -1) 10 -(14, 68, -1) 9 -(14, 69, -1) 9 -(14, 70, -1) 8 -(14, 71, -1) 8 -(14, 72, -1) 7 -(14, 73, -1) 7 -(14, 74, -1) 6 -(14, 75, -1) 6 -(14, 76, -1) 5 -(14, 77, -1) 5 -(14, 78, -1) 4 -(14, 79, -1) 4 -(14, 80, -1) 3 -(14, 81, -1) 2 -(14, 82, -1) 2 -(14, 83, -1) 1 -(14, 84, -1) 1 -(14, 85, -1) 0 -(15, 16, -1) 1 -(15, 17, -1) 1 -(15, 18, -1) 2 -(15, 19, -1) 3 -(15, 20, -1) 3 -(15, 21, -1) 4 -(15, 22, -1) 4 -(15, 23, -1) 5 -(15, 24, -1) 6 -(15, 25, -1) 6 -(15, 26, -1) 7 -(15, 27, -1) 7 -(15, 28, -1) 8 -(15, 29, -1) 8 -(15, 30, -1) 9 -(15, 31, -1) 9 -(15, 32, -1) 10 -(15, 33, -1) 10 -(15, 34, -1) 11 -(15, 35, -1) 11 -(15, 36, -1) 11 -(15, 37, -1) 12 -(15, 38, -1) 12 -(15, 39, -1) 12 -(15, 40, -1) 13 -(15, 41, -1) 13 -(15, 42, -1) 13 -(15, 43, -1) 13 -(15, 44, -1) 13 -(15, 45, -1) 14 -(15, 46, -1) 14 -(15, 47, -1) 14 -(15, 48, -1) 14 -(15, 49, -1) 14 -(15, 50, -1) 14 -(15, 51, -1) 14 -(15, 52, -1) 14 -(15, 53, -1) 14 -(15, 54, -1) 14 -(15, 55, -1) 14 -(15, 56, -1) 14 -(15, 57, -1) 13 -(15, 58, -1) 13 -(15, 59, -1) 13 -(15, 60, -1) 13 -(15, 61, -1) 13 -(15, 62, -1) 12 -(15, 63, -1) 12 -(15, 64, -1) 12 -(15, 65, -1) 11 -(15, 66, -1) 11 -(15, 67, -1) 11 -(15, 68, -1) 10 -(15, 69, -1) 10 -(15, 70, -1) 9 -(15, 71, -1) 9 -(15, 72, -1) 8 -(15, 73, -1) 8 -(15, 74, -1) 7 -(15, 75, -1) 7 -(15, 76, -1) 6 -(15, 77, -1) 6 -(15, 78, -1) 5 -(15, 79, -1) 4 -(15, 80, -1) 4 -(15, 81, -1) 3 -(15, 82, -1) 3 -(15, 83, -1) 2 -(15, 84, -1) 1 -(15, 85, -1) 1 -(16, 14, -1) 0 -(16, 15, -1) 1 -(16, 16, -1) 1 -(16, 17, -1) 2 -(16, 18, -1) 2 -(16, 19, -1) 3 -(16, 20, -1) 4 -(16, 21, -1) 4 -(16, 22, -1) 5 -(16, 23, -1) 6 -(16, 24, -1) 6 -(16, 25, -1) 7 -(16, 26, -1) 7 -(16, 27, -1) 8 -(16, 28, -1) 9 -(16, 29, -1) 9 -(16, 30, -1) 10 -(16, 31, -1) 10 -(16, 32, -1) 11 -(16, 33, -1) 11 -(16, 34, -1) 11 -(16, 35, -1) 12 -(16, 36, -1) 12 -(16, 37, -1) 13 -(16, 38, -1) 13 -(16, 39, -1) 13 -(16, 40, -1) 13 -(16, 41, -1) 14 -(16, 42, -1) 14 -(16, 43, -1) 14 -(16, 44, -1) 14 -(16, 45, -1) 15 -(16, 46, -1) 15 -(16, 47, -1) 15 -(16, 48, -1) 15 -(16, 49, -1) 15 -(16, 50, -1) 15 -(16, 51, -1) 15 -(16, 52, -1) 15 -(16, 53, -1) 15 -(16, 54, -1) 15 -(16, 55, -1) 15 -(16, 56, -1) 15 -(16, 57, -1) 14 -(16, 58, -1) 14 -(16, 59, -1) 14 -(16, 60, -1) 14 -(16, 61, -1) 13 -(16, 62, -1) 13 -(16, 63, -1) 13 -(16, 64, -1) 13 -(16, 65, -1) 12 -(16, 66, -1) 12 -(16, 67, -1) 11 -(16, 68, -1) 11 -(16, 69, -1) 11 -(16, 70, -1) 10 -(16, 71, -1) 10 -(16, 72, -1) 9 -(16, 73, -1) 9 -(16, 74, -1) 8 -(16, 75, -1) 7 -(16, 76, -1) 7 -(16, 77, -1) 6 -(16, 78, -1) 6 -(16, 79, -1) 5 -(16, 80, -1) 4 -(16, 81, -1) 4 -(16, 82, -1) 3 -(16, 83, -1) 2 -(16, 84, -1) 2 -(16, 85, -1) 1 -(16, 86, -1) 1 -(16, 87, -1) 0 -(17, 14, -1) 1 -(17, 15, -1) 1 -(17, 16, -1) 2 -(17, 17, -1) 3 -(17, 18, -1) 3 -(17, 19, -1) 4 -(17, 20, -1) 5 -(17, 21, -1) 5 -(17, 22, -1) 6 -(17, 23, -1) 6 -(17, 24, -1) 7 -(17, 25, -1) 8 -(17, 26, -1) 8 -(17, 27, -1) 9 -(17, 28, -1) 9 -(17, 29, -1) 10 -(17, 30, -1) 10 -(17, 31, -1) 11 -(17, 32, -1) 11 -(17, 33, -1) 12 -(17, 34, -1) 12 -(17, 35, -1) 13 -(17, 36, -1) 13 -(17, 37, -1) 13 -(17, 38, -1) 14 -(17, 39, -1) 14 -(17, 40, -1) 14 -(17, 41, -1) 15 -(17, 42, -1) 15 -(17, 43, -1) 15 -(17, 44, -1) 15 -(17, 45, -1) 16 -(17, 46, -1) 16 -(17, 47, -1) 16 -(17, 48, -1) 16 -(17, 49, -1) 16 -(17, 50, -1) 16 -(17, 51, -1) 16 -(17, 52, -1) 16 -(17, 53, -1) 16 -(17, 54, -1) 16 -(17, 55, -1) 16 -(17, 56, -1) 16 -(17, 57, -1) 15 -(17, 58, -1) 15 -(17, 59, -1) 15 -(17, 60, -1) 15 -(17, 61, -1) 14 -(17, 62, -1) 14 -(17, 63, -1) 14 -(17, 64, -1) 13 -(17, 65, -1) 13 -(17, 66, -1) 13 -(17, 67, -1) 12 -(17, 68, -1) 12 -(17, 69, -1) 11 -(17, 70, -1) 11 -(17, 71, -1) 10 -(17, 72, -1) 10 -(17, 73, -1) 9 -(17, 74, -1) 9 -(17, 75, -1) 8 -(17, 76, -1) 8 -(17, 77, -1) 7 -(17, 78, -1) 6 -(17, 79, -1) 6 -(17, 80, -1) 5 -(17, 81, -1) 5 -(17, 82, -1) 4 -(17, 83, -1) 3 -(17, 84, -1) 3 -(17, 85, -1) 2 -(17, 86, -1) 1 -(17, 87, -1) 1 -(18, 14, -1) 1 -(18, 15, -1) 2 -(18, 16, -1) 3 -(18, 17, -1) 3 -(18, 18, -1) 4 -(18, 19, -1) 5 -(18, 20, -1) 5 -(18, 21, -1) 6 -(18, 22, -1) 7 -(18, 23, -1) 7 -(18, 24, -1) 8 -(18, 25, -1) 8 -(18, 26, -1) 9 -(18, 27, -1) 10 -(18, 28, -1) 10 -(18, 29, -1) 11 -(18, 30, -1) 11 -(18, 31, -1) 12 -(18, 32, -1) 12 -(18, 33, -1) 13 -(18, 34, -1) 13 -(18, 35, -1) 14 -(18, 36, -1) 14 -(18, 37, -1) 14 -(18, 38, -1) 15 -(18, 39, -1) 15 -(18, 40, -1) 15 -(18, 41, -1) 16 -(18, 42, -1) 16 -(18, 43, -1) 16 -(18, 44, -1) 16 -(18, 45, -1) 17 -(18, 46, -1) 17 -(18, 47, -1) 17 -(18, 48, -1) 17 -(18, 49, -1) 17 -(18, 50, -1) 17 -(18, 51, -1) 17 -(18, 52, -1) 17 -(18, 53, -1) 17 -(18, 54, -1) 17 -(18, 55, -1) 17 -(18, 56, -1) 17 -(18, 57, -1) 16 -(18, 58, -1) 16 -(18, 59, -1) 16 -(18, 60, -1) 16 -(18, 61, -1) 15 -(18, 62, -1) 15 -(18, 63, -1) 15 -(18, 64, -1) 14 -(18, 65, -1) 14 -(18, 66, -1) 14 -(18, 67, -1) 13 -(18, 68, -1) 13 -(18, 69, -1) 12 -(18, 70, -1) 12 -(18, 71, -1) 11 -(18, 72, -1) 11 -(18, 73, -1) 10 -(18, 74, -1) 10 -(18, 75, -1) 9 -(18, 76, -1) 8 -(18, 77, -1) 8 -(18, 78, -1) 7 -(18, 79, -1) 7 -(18, 80, -1) 6 -(18, 81, -1) 5 -(18, 82, -1) 5 -(18, 83, -1) 4 -(18, 84, -1) 3 -(18, 85, -1) 3 -(18, 86, -1) 2 -(18, 87, -1) 1 -(19, 14, -1) 2 -(19, 15, -1) 3 -(19, 16, -1) 3 -(19, 17, -1) 4 -(19, 18, -1) 5 -(19, 19, -1) 5 -(19, 20, -1) 6 -(19, 21, -1) 7 -(19, 22, -1) 7 -(19, 23, -1) 8 -(19, 24, -1) 9 -(19, 25, -1) 9 -(19, 26, -1) 10 -(19, 27, -1) 10 -(19, 28, -1) 11 -(19, 29, -1) 12 -(19, 30, -1) 12 -(19, 31, -1) 13 -(19, 32, -1) 13 -(19, 33, -1) 14 -(19, 34, -1) 14 -(19, 35, -1) 15 -(19, 36, -1) 15 -(19, 37, -1) 15 -(19, 38, -1) 16 -(19, 39, -1) 16 -(19, 40, -1) 16 -(19, 41, -1) 17 -(19, 42, -1) 17 -(19, 43, -1) 17 -(19, 44, -1) 17 -(19, 45, -1) 18 -(19, 46, -1) 18 -(19, 47, -1) 18 -(19, 48, -1) 18 -(19, 49, -1) 18 -(19, 50, -1) 18 -(19, 51, -1) 18 -(19, 52, -1) 18 -(19, 53, -1) 18 -(19, 54, -1) 18 -(19, 55, -1) 18 -(19, 56, -1) 18 -(19, 57, -1) 17 -(19, 58, -1) 17 -(19, 59, -1) 17 -(19, 60, -1) 17 -(19, 61, -1) 16 -(19, 62, -1) 16 -(19, 63, -1) 16 -(19, 64, -1) 15 -(19, 65, -1) 15 -(19, 66, -1) 15 -(19, 67, -1) 14 -(19, 68, -1) 14 -(19, 69, -1) 13 -(19, 70, -1) 13 -(19, 71, -1) 12 -(19, 72, -1) 12 -(19, 73, -1) 11 -(19, 74, -1) 10 -(19, 75, -1) 10 -(19, 76, -1) 9 -(19, 77, -1) 9 -(19, 78, -1) 8 -(19, 79, -1) 7 -(19, 80, -1) 7 -(19, 81, -1) 6 -(19, 82, -1) 5 -(19, 83, -1) 5 -(19, 84, -1) 4 -(19, 85, -1) 3 -(19, 86, -1) 3 -(19, 87, -1) 2 -(20, 14, -1) 3 -(20, 15, -1) 3 -(20, 16, -1) 4 -(20, 17, -1) 5 -(20, 18, -1) 5 -(20, 19, -1) 6 -(20, 20, -1) 7 -(20, 21, -1) 7 -(20, 22, -1) 8 -(20, 23, -1) 9 -(20, 24, -1) 9 -(20, 25, -1) 10 -(20, 26, -1) 11 -(20, 27, -1) 11 -(20, 28, -1) 12 -(20, 29, -1) 12 -(20, 30, -1) 13 -(20, 31, -1) 14 -(20, 32, -1) 14 -(20, 33, -1) 15 -(20, 34, -1) 15 -(20, 35, -1) 15 -(20, 36, -1) 16 -(20, 37, -1) 16 -(20, 38, -1) 17 -(20, 39, -1) 17 -(20, 40, -1) 17 -(20, 41, -1) 18 -(20, 42, -1) 18 -(20, 43, -1) 18 -(20, 44, -1) 18 -(20, 45, -1) 19 -(20, 46, -1) 19 -(20, 47, -1) 19 -(20, 48, -1) 19 -(20, 49, -1) 19 -(20, 50, -1) 19 -(20, 51, -1) 19 -(20, 52, -1) 19 -(20, 53, -1) 19 -(20, 54, -1) 19 -(20, 55, -1) 19 -(20, 56, -1) 19 -(20, 57, -1) 18 -(20, 58, -1) 18 -(20, 59, -1) 18 -(20, 60, -1) 18 -(20, 61, -1) 17 -(20, 62, -1) 17 -(20, 63, -1) 17 -(20, 64, -1) 16 -(20, 65, -1) 16 -(20, 66, -1) 15 -(20, 67, -1) 15 -(20, 68, -1) 15 -(20, 69, -1) 14 -(20, 70, -1) 14 -(20, 71, -1) 13 -(20, 72, -1) 12 -(20, 73, -1) 12 -(20, 74, -1) 11 -(20, 75, -1) 11 -(20, 76, -1) 10 -(20, 77, -1) 9 -(20, 78, -1) 9 -(20, 79, -1) 8 -(20, 80, -1) 7 -(20, 81, -1) 7 -(20, 82, -1) 6 -(20, 83, -1) 5 -(20, 84, -1) 5 -(20, 85, -1) 4 -(20, 86, -1) 3 -(20, 87, -1) 3 -(21, 9, -1) 0 -(21, 10, -1) 0 -(21, 11, -1) 1 -(21, 12, -1) 1 -(21, 13, -1) 2 -(21, 14, -1) 3 -(21, 15, -1) 4 -(21, 16, -1) 4 -(21, 17, -1) 5 -(21, 18, -1) 6 -(21, 19, -1) 7 -(21, 20, -1) 7 -(21, 21, -1) 8 -(21, 22, -1) 9 -(21, 23, -1) 9 -(21, 24, -1) 10 -(21, 25, -1) 11 -(21, 26, -1) 11 -(21, 27, -1) 12 -(21, 28, -1) 13 -(21, 29, -1) 13 -(21, 30, -1) 14 -(21, 31, -1) 14 -(21, 32, -1) 15 -(21, 33, -1) 15 -(21, 34, -1) 16 -(21, 35, -1) 16 -(21, 36, -1) 17 -(21, 37, -1) 17 -(21, 38, -1) 18 -(21, 39, -1) 18 -(21, 40, -1) 18 -(21, 41, -1) 19 -(21, 42, -1) 19 -(21, 43, -1) 19 -(21, 44, -1) 19 -(21, 45, -1) 20 -(21, 46, -1) 20 -(21, 47, -1) 20 -(21, 48, -1) 20 -(21, 49, -1) 20 -(21, 50, -1) 20 -(21, 51, -1) 20 -(21, 52, -1) 20 -(21, 53, -1) 20 -(21, 54, -1) 20 -(21, 55, -1) 20 -(21, 56, -1) 20 -(21, 57, -1) 19 -(21, 58, -1) 19 -(21, 59, -1) 19 -(21, 60, -1) 19 -(21, 61, -1) 18 -(21, 62, -1) 18 -(21, 63, -1) 18 -(21, 64, -1) 17 -(21, 65, -1) 17 -(21, 66, -1) 16 -(21, 67, -1) 16 -(21, 68, -1) 15 -(21, 69, -1) 15 -(21, 70, -1) 14 -(21, 71, -1) 14 -(21, 72, -1) 13 -(21, 73, -1) 13 -(21, 74, -1) 12 -(21, 75, -1) 11 -(21, 76, -1) 11 -(21, 77, -1) 10 -(21, 78, -1) 9 -(21, 79, -1) 9 -(21, 80, -1) 8 -(21, 81, -1) 7 -(21, 82, -1) 7 -(21, 83, -1) 6 -(21, 84, -1) 5 -(21, 85, -1) 4 -(21, 86, -1) 4 -(21, 87, -1) 3 -(21, 88, -1) 2 -(21, 89, -1) 1 -(21, 90, -1) 1 -(21, 91, -1) 0 -(21, 92, -1) 0 -(22, 9, -1) 0 -(22, 10, -1) 1 -(22, 11, -1) 1 -(22, 12, -1) 2 -(22, 13, -1) 3 -(22, 14, -1) 4 -(22, 15, -1) 4 -(22, 16, -1) 5 -(22, 17, -1) 6 -(22, 18, -1) 7 -(22, 19, -1) 7 -(22, 20, -1) 8 -(22, 21, -1) 9 -(22, 22, -1) 9 -(22, 23, -1) 10 -(22, 24, -1) 11 -(22, 25, -1) 12 -(22, 26, -1) 12 -(22, 27, -1) 13 -(22, 28, -1) 13 -(22, 29, -1) 14 -(22, 30, -1) 15 -(22, 31, -1) 15 -(22, 32, -1) 16 -(22, 33, -1) 16 -(22, 34, -1) 17 -(22, 35, -1) 17 -(22, 36, -1) 18 -(22, 37, -1) 18 -(22, 38, -1) 18 -(22, 39, -1) 19 -(22, 40, -1) 19 -(22, 41, -1) 20 -(22, 42, -1) 20 -(22, 43, -1) 20 -(22, 44, -1) 20 -(22, 45, -1) 20 -(22, 46, -1) 21 -(22, 47, -1) 21 -(22, 48, -1) 21 -(22, 49, -1) 21 -(22, 50, -1) 21 -(22, 51, -1) 21 -(22, 52, -1) 21 -(22, 53, -1) 21 -(22, 54, -1) 21 -(22, 55, -1) 21 -(22, 56, -1) 20 -(22, 57, -1) 20 -(22, 58, -1) 20 -(22, 59, -1) 20 -(22, 60, -1) 20 -(22, 61, -1) 19 -(22, 62, -1) 19 -(22, 63, -1) 18 -(22, 64, -1) 18 -(22, 65, -1) 18 -(22, 66, -1) 17 -(22, 67, -1) 17 -(22, 68, -1) 16 -(22, 69, -1) 16 -(22, 70, -1) 15 -(22, 71, -1) 15 -(22, 72, -1) 14 -(22, 73, -1) 13 -(22, 74, -1) 13 -(22, 75, -1) 12 -(22, 76, -1) 12 -(22, 77, -1) 11 -(22, 78, -1) 10 -(22, 79, -1) 9 -(22, 80, -1) 9 -(22, 81, -1) 8 -(22, 82, -1) 7 -(22, 83, -1) 7 -(22, 84, -1) 6 -(22, 85, -1) 5 -(22, 86, -1) 4 -(22, 87, -1) 4 -(22, 88, -1) 3 -(22, 89, -1) 2 -(22, 90, -1) 1 -(22, 91, -1) 1 -(22, 92, -1) 0 -(23, 9, -1) 0 -(23, 10, -1) 1 -(23, 11, -1) 2 -(23, 12, -1) 3 -(23, 13, -1) 3 -(23, 14, -1) 4 -(23, 15, -1) 5 -(23, 16, -1) 6 -(23, 17, -1) 7 -(23, 18, -1) 7 -(23, 19, -1) 8 -(23, 20, -1) 9 -(23, 21, -1) 9 -(23, 22, -1) 10 -(23, 23, -1) 11 -(23, 24, -1) 12 -(23, 25, -1) 12 -(23, 26, -1) 13 -(23, 27, -1) 14 -(23, 28, -1) 14 -(23, 29, -1) 15 -(23, 30, -1) 15 -(23, 31, -1) 16 -(23, 32, -1) 17 -(23, 33, -1) 17 -(23, 34, -1) 18 -(23, 35, -1) 18 -(23, 36, -1) 19 -(23, 37, -1) 19 -(23, 38, -1) 19 -(23, 39, -1) 20 -(23, 40, -1) 20 -(23, 41, -1) 20 -(23, 42, -1) 21 -(23, 43, -1) 21 -(23, 44, -1) 21 -(23, 45, -1) 21 -(23, 46, -1) 22 -(23, 47, -1) 22 -(23, 48, -1) 22 -(23, 49, -1) 22 -(23, 50, -1) 22 -(23, 51, -1) 22 -(23, 52, -1) 22 -(23, 53, -1) 22 -(23, 54, -1) 22 -(23, 55, -1) 22 -(23, 56, -1) 21 -(23, 57, -1) 21 -(23, 58, -1) 21 -(23, 59, -1) 21 -(23, 60, -1) 20 -(23, 61, -1) 20 -(23, 62, -1) 20 -(23, 63, -1) 19 -(23, 64, -1) 19 -(23, 65, -1) 19 -(23, 66, -1) 18 -(23, 67, -1) 18 -(23, 68, -1) 17 -(23, 69, -1) 17 -(23, 70, -1) 16 -(23, 71, -1) 15 -(23, 72, -1) 15 -(23, 73, -1) 14 -(23, 74, -1) 14 -(23, 75, -1) 13 -(23, 76, -1) 12 -(23, 77, -1) 12 -(23, 78, -1) 11 -(23, 79, -1) 10 -(23, 80, -1) 9 -(23, 81, -1) 9 -(23, 82, -1) 8 -(23, 83, -1) 7 -(23, 84, -1) 7 -(23, 85, -1) 6 -(23, 86, -1) 5 -(23, 87, -1) 4 -(23, 88, -1) 3 -(23, 89, -1) 3 -(23, 90, -1) 2 -(23, 91, -1) 1 -(23, 92, -1) 0 -(24, 9, -1) 1 -(24, 10, -1) 2 -(24, 11, -1) 2 -(24, 12, -1) 3 -(24, 13, -1) 4 -(24, 14, -1) 5 -(24, 15, -1) 6 -(24, 16, -1) 6 -(24, 17, -1) 7 -(24, 18, -1) 8 -(24, 19, -1) 9 -(24, 20, -1) 9 -(24, 21, -1) 10 -(24, 22, -1) 11 -(24, 23, -1) 12 -(24, 24, -1) 12 -(24, 25, -1) 13 -(24, 26, -1) 14 -(24, 27, -1) 14 -(24, 28, -1) 15 -(24, 29, -1) 16 -(24, 30, -1) 16 -(24, 31, -1) 17 -(24, 32, -1) 17 -(24, 33, -1) 18 -(24, 34, -1) 18 -(24, 35, -1) 19 -(24, 36, -1) 19 -(24, 37, -1) 20 -(24, 38, -1) 20 -(24, 39, -1) 21 -(24, 40, -1) 21 -(24, 41, -1) 21 -(24, 42, -1) 22 -(24, 43, -1) 22 -(24, 44, -1) 22 -(24, 45, -1) 22 -(24, 46, -1) 23 -(24, 47, -1) 23 -(24, 48, -1) 23 -(24, 49, -1) 23 -(24, 50, -1) 23 -(24, 51, -1) 23 -(24, 52, -1) 23 -(24, 53, -1) 23 -(24, 54, -1) 23 -(24, 55, -1) 23 -(24, 56, -1) 22 -(24, 57, -1) 22 -(24, 58, -1) 22 -(24, 59, -1) 22 -(24, 60, -1) 21 -(24, 61, -1) 21 -(24, 62, -1) 21 -(24, 63, -1) 20 -(24, 64, -1) 20 -(24, 65, -1) 19 -(24, 66, -1) 19 -(24, 67, -1) 18 -(24, 68, -1) 18 -(24, 69, -1) 17 -(24, 70, -1) 17 -(24, 71, -1) 16 -(24, 72, -1) 16 -(24, 73, -1) 15 -(24, 74, -1) 14 -(24, 75, -1) 14 -(24, 76, -1) 13 -(24, 77, -1) 12 -(24, 78, -1) 12 -(24, 79, -1) 11 -(24, 80, -1) 10 -(24, 81, -1) 9 -(24, 82, -1) 9 -(24, 83, -1) 8 -(24, 84, -1) 7 -(24, 85, -1) 6 -(24, 86, -1) 6 -(24, 87, -1) 5 -(24, 88, -1) 4 -(24, 89, -1) 3 -(24, 90, -1) 2 -(24, 91, -1) 2 -(24, 92, -1) 1 -(25, 9, -1) 1 -(25, 10, -1) 2 -(25, 11, -1) 3 -(25, 12, -1) 4 -(25, 13, -1) 5 -(25, 14, -1) 5 -(25, 15, -1) 6 -(25, 16, -1) 7 -(25, 17, -1) 8 -(25, 18, -1) 9 -(25, 19, -1) 9 -(25, 20, -1) 10 -(25, 21, -1) 11 -(25, 22, -1) 12 -(25, 23, -1) 12 -(25, 24, -1) 13 -(25, 25, -1) 14 -(25, 26, -1) 14 -(25, 27, -1) 15 -(25, 28, -1) 16 -(25, 29, -1) 16 -(25, 30, -1) 17 -(25, 31, -1) 18 -(25, 32, -1) 18 -(25, 33, -1) 19 -(25, 34, -1) 19 -(25, 35, -1) 20 -(25, 36, -1) 20 -(25, 37, -1) 21 -(25, 38, -1) 21 -(25, 39, -1) 22 -(25, 40, -1) 22 -(25, 41, -1) 22 -(25, 42, -1) 23 -(25, 43, -1) 23 -(25, 44, -1) 23 -(25, 45, -1) 23 -(25, 46, -1) 24 -(25, 47, -1) 24 -(25, 48, -1) 24 -(25, 49, -1) 24 -(25, 50, -1) 24 -(25, 51, -1) 24 -(25, 52, -1) 24 -(25, 53, -1) 24 -(25, 54, -1) 24 -(25, 55, -1) 24 -(25, 56, -1) 23 -(25, 57, -1) 23 -(25, 58, -1) 23 -(25, 59, -1) 23 -(25, 60, -1) 22 -(25, 61, -1) 22 -(25, 62, -1) 22 -(25, 63, -1) 21 -(25, 64, -1) 21 -(25, 65, -1) 20 -(25, 66, -1) 20 -(25, 67, -1) 19 -(25, 68, -1) 19 -(25, 69, -1) 18 -(25, 70, -1) 18 -(25, 71, -1) 17 -(25, 72, -1) 16 -(25, 73, -1) 16 -(25, 74, -1) 15 -(25, 75, -1) 14 -(25, 76, -1) 14 -(25, 77, -1) 13 -(25, 78, -1) 12 -(25, 79, -1) 12 -(25, 80, -1) 11 -(25, 81, -1) 10 -(25, 82, -1) 9 -(25, 83, -1) 9 -(25, 84, -1) 8 -(25, 85, -1) 7 -(25, 86, -1) 6 -(25, 87, -1) 5 -(25, 88, -1) 5 -(25, 89, -1) 4 -(25, 90, -1) 3 -(25, 91, -1) 2 -(25, 92, -1) 1 -(26, 6, -1) 0 -(26, 7, -1) 0 -(26, 8, -1) 1 -(26, 9, -1) 2 -(26, 10, -1) 3 -(26, 11, -1) 3 -(26, 12, -1) 4 -(26, 13, -1) 5 -(26, 14, -1) 6 -(26, 15, -1) 7 -(26, 16, -1) 7 -(26, 17, -1) 8 -(26, 18, -1) 9 -(26, 19, -1) 10 -(26, 20, -1) 11 -(26, 21, -1) 11 -(26, 22, -1) 12 -(26, 23, -1) 13 -(26, 24, -1) 14 -(26, 25, -1) 14 -(26, 26, -1) 15 -(26, 27, -1) 16 -(26, 28, -1) 16 -(26, 29, -1) 17 -(26, 30, -1) 18 -(26, 31, -1) 18 -(26, 32, -1) 19 -(26, 33, -1) 19 -(26, 34, -1) 20 -(26, 35, -1) 21 -(26, 36, -1) 21 -(26, 37, -1) 22 -(26, 38, -1) 22 -(26, 39, -1) 22 -(26, 40, -1) 23 -(26, 41, -1) 23 -(26, 42, -1) 24 -(26, 43, -1) 24 -(26, 44, -1) 24 -(26, 45, -1) 24 -(26, 46, -1) 25 -(26, 47, -1) 25 -(26, 48, -1) 25 -(26, 49, -1) 25 -(26, 50, -1) 25 -(26, 51, -1) 25 -(26, 52, -1) 25 -(26, 53, -1) 25 -(26, 54, -1) 25 -(26, 55, -1) 25 -(26, 56, -1) 24 -(26, 57, -1) 24 -(26, 58, -1) 24 -(26, 59, -1) 24 -(26, 60, -1) 23 -(26, 61, -1) 23 -(26, 62, -1) 22 -(26, 63, -1) 22 -(26, 64, -1) 22 -(26, 65, -1) 21 -(26, 66, -1) 21 -(26, 67, -1) 20 -(26, 68, -1) 19 -(26, 69, -1) 19 -(26, 70, -1) 18 -(26, 71, -1) 18 -(26, 72, -1) 17 -(26, 73, -1) 16 -(26, 74, -1) 16 -(26, 75, -1) 15 -(26, 76, -1) 14 -(26, 77, -1) 14 -(26, 78, -1) 13 -(26, 79, -1) 12 -(26, 80, -1) 11 -(26, 81, -1) 11 -(26, 82, -1) 10 -(26, 83, -1) 9 -(26, 84, -1) 8 -(26, 85, -1) 7 -(26, 86, -1) 7 -(26, 87, -1) 6 -(26, 88, -1) 5 -(26, 89, -1) 4 -(26, 90, -1) 3 -(26, 91, -1) 3 -(26, 92, -1) 2 -(26, 93, -1) 1 -(26, 94, -1) 0 -(26, 95, -1) 0 -(27, 6, -1) 0 -(27, 7, -1) 0 -(27, 8, -1) 1 -(27, 9, -1) 2 -(27, 10, -1) 3 -(27, 11, -1) 4 -(27, 12, -1) 5 -(27, 13, -1) 6 -(27, 14, -1) 6 -(27, 15, -1) 7 -(27, 16, -1) 8 -(27, 17, -1) 9 -(27, 18, -1) 10 -(27, 19, -1) 10 -(27, 20, -1) 11 -(27, 21, -1) 12 -(27, 22, -1) 13 -(27, 23, -1) 14 -(27, 24, -1) 14 -(27, 25, -1) 15 -(27, 26, -1) 16 -(27, 27, -1) 16 -(27, 28, -1) 17 -(27, 29, -1) 18 -(27, 30, -1) 18 -(27, 31, -1) 19 -(27, 32, -1) 20 -(27, 33, -1) 20 -(27, 34, -1) 21 -(27, 35, -1) 21 -(27, 36, -1) 22 -(27, 37, -1) 22 -(27, 38, -1) 23 -(27, 39, -1) 23 -(27, 40, -1) 24 -(27, 41, -1) 24 -(27, 42, -1) 25 -(27, 43, -1) 25 -(27, 44, -1) 25 -(27, 45, -1) 25 -(27, 46, -1) 26 -(27, 47, -1) 26 -(27, 48, -1) 26 -(27, 49, -1) 26 -(27, 50, -1) 26 -(27, 51, -1) 26 -(27, 52, -1) 26 -(27, 53, -1) 26 -(27, 54, -1) 26 -(27, 55, -1) 26 -(27, 56, -1) 25 -(27, 57, -1) 25 -(27, 58, -1) 25 -(27, 59, -1) 25 -(27, 60, -1) 24 -(27, 61, -1) 24 -(27, 62, -1) 23 -(27, 63, -1) 23 -(27, 64, -1) 22 -(27, 65, -1) 22 -(27, 66, -1) 21 -(27, 67, -1) 21 -(27, 68, -1) 20 -(27, 69, -1) 20 -(27, 70, -1) 19 -(27, 71, -1) 18 -(27, 72, -1) 18 -(27, 73, -1) 17 -(27, 74, -1) 16 -(27, 75, -1) 16 -(27, 76, -1) 15 -(27, 77, -1) 14 -(27, 78, -1) 14 -(27, 79, -1) 13 -(27, 80, -1) 12 -(27, 81, -1) 11 -(27, 82, -1) 10 -(27, 83, -1) 10 -(27, 84, -1) 9 -(27, 85, -1) 8 -(27, 86, -1) 7 -(27, 87, -1) 6 -(27, 88, -1) 6 -(27, 89, -1) 5 -(27, 90, -1) 4 -(27, 91, -1) 3 -(27, 92, -1) 2 -(27, 93, -1) 1 -(27, 94, -1) 0 -(27, 95, -1) 0 -(28, 6, -1) 0 -(28, 7, -1) 1 -(28, 8, -1) 2 -(28, 9, -1) 3 -(28, 10, -1) 4 -(28, 11, -1) 4 -(28, 12, -1) 5 -(28, 13, -1) 6 -(28, 14, -1) 7 -(28, 15, -1) 8 -(28, 16, -1) 9 -(28, 17, -1) 9 -(28, 18, -1) 10 -(28, 19, -1) 11 -(28, 20, -1) 12 -(28, 21, -1) 13 -(28, 22, -1) 13 -(28, 23, -1) 14 -(28, 24, -1) 15 -(28, 25, -1) 16 -(28, 26, -1) 16 -(28, 27, -1) 17 -(28, 28, -1) 18 -(28, 29, -1) 19 -(28, 30, -1) 19 -(28, 31, -1) 20 -(28, 32, -1) 20 -(28, 33, -1) 21 -(28, 34, -1) 22 -(28, 35, -1) 22 -(28, 36, -1) 23 -(28, 37, -1) 23 -(28, 38, -1) 24 -(28, 39, -1) 24 -(28, 40, -1) 25 -(28, 41, -1) 25 -(28, 42, -1) 25 -(28, 43, -1) 26 -(28, 44, -1) 26 -(28, 45, -1) 26 -(28, 46, -1) 27 -(28, 47, -1) 27 -(28, 48, -1) 27 -(28, 49, -1) 27 -(28, 50, -1) 27 -(28, 51, -1) 27 -(28, 52, -1) 27 -(28, 53, -1) 27 -(28, 54, -1) 27 -(28, 55, -1) 27 -(28, 56, -1) 26 -(28, 57, -1) 26 -(28, 58, -1) 26 -(28, 59, -1) 25 -(28, 60, -1) 25 -(28, 61, -1) 25 -(28, 62, -1) 24 -(28, 63, -1) 24 -(28, 64, -1) 23 -(28, 65, -1) 23 -(28, 66, -1) 22 -(28, 67, -1) 22 -(28, 68, -1) 21 -(28, 69, -1) 20 -(28, 70, -1) 20 -(28, 71, -1) 19 -(28, 72, -1) 19 -(28, 73, -1) 18 -(28, 74, -1) 17 -(28, 75, -1) 16 -(28, 76, -1) 16 -(28, 77, -1) 15 -(28, 78, -1) 14 -(28, 79, -1) 13 -(28, 80, -1) 13 -(28, 81, -1) 12 -(28, 82, -1) 11 -(28, 83, -1) 10 -(28, 84, -1) 9 -(28, 85, -1) 9 -(28, 86, -1) 8 -(28, 87, -1) 7 -(28, 88, -1) 6 -(28, 89, -1) 5 -(28, 90, -1) 4 -(28, 91, -1) 4 -(28, 92, -1) 3 -(28, 93, -1) 2 -(28, 94, -1) 1 -(28, 95, -1) 0 -(29, 6, -1) 1 -(29, 7, -1) 1 -(29, 8, -1) 2 -(29, 9, -1) 3 -(29, 10, -1) 4 -(29, 11, -1) 5 -(29, 12, -1) 6 -(29, 13, -1) 7 -(29, 14, -1) 7 -(29, 15, -1) 8 -(29, 16, -1) 9 -(29, 17, -1) 10 -(29, 18, -1) 11 -(29, 19, -1) 12 -(29, 20, -1) 12 -(29, 21, -1) 13 -(29, 22, -1) 14 -(29, 23, -1) 15 -(29, 24, -1) 16 -(29, 25, -1) 16 -(29, 26, -1) 17 -(29, 27, -1) 18 -(29, 28, -1) 19 -(29, 29, -1) 19 -(29, 30, -1) 20 -(29, 31, -1) 21 -(29, 32, -1) 21 -(29, 33, -1) 22 -(29, 34, -1) 23 -(29, 35, -1) 23 -(29, 36, -1) 24 -(29, 37, -1) 24 -(29, 38, -1) 25 -(29, 39, -1) 25 -(29, 40, -1) 26 -(29, 41, -1) 26 -(29, 42, -1) 26 -(29, 43, -1) 27 -(29, 44, -1) 27 -(29, 45, -1) 27 -(29, 46, -1) 28 -(29, 47, -1) 28 -(29, 48, -1) 28 -(29, 49, -1) 28 -(29, 50, -1) 28 -(29, 51, -1) 28 -(29, 52, -1) 28 -(29, 53, -1) 28 -(29, 54, -1) 28 -(29, 55, -1) 28 -(29, 56, -1) 27 -(29, 57, -1) 27 -(29, 58, -1) 27 -(29, 59, -1) 26 -(29, 60, -1) 26 -(29, 61, -1) 26 -(29, 62, -1) 25 -(29, 63, -1) 25 -(29, 64, -1) 24 -(29, 65, -1) 24 -(29, 66, -1) 23 -(29, 67, -1) 23 -(29, 68, -1) 22 -(29, 69, -1) 21 -(29, 70, -1) 21 -(29, 71, -1) 20 -(29, 72, -1) 19 -(29, 73, -1) 19 -(29, 74, -1) 18 -(29, 75, -1) 17 -(29, 76, -1) 16 -(29, 77, -1) 16 -(29, 78, -1) 15 -(29, 79, -1) 14 -(29, 80, -1) 13 -(29, 81, -1) 12 -(29, 82, -1) 12 -(29, 83, -1) 11 -(29, 84, -1) 10 -(29, 85, -1) 9 -(29, 86, -1) 8 -(29, 87, -1) 7 -(29, 88, -1) 7 -(29, 89, -1) 6 -(29, 90, -1) 5 -(29, 91, -1) 4 -(29, 92, -1) 3 -(29, 93, -1) 2 -(29, 94, -1) 1 -(29, 95, -1) 1 -(30, 6, -1) 1 -(30, 7, -1) 2 -(30, 8, -1) 3 -(30, 9, -1) 4 -(30, 10, -1) 5 -(30, 11, -1) 5 -(30, 12, -1) 6 -(30, 13, -1) 7 -(30, 14, -1) 8 -(30, 15, -1) 9 -(30, 16, -1) 10 -(30, 17, -1) 11 -(30, 18, -1) 11 -(30, 19, -1) 12 -(30, 20, -1) 13 -(30, 21, -1) 14 -(30, 22, -1) 15 -(30, 23, -1) 15 -(30, 24, -1) 16 -(30, 25, -1) 17 -(30, 26, -1) 18 -(30, 27, -1) 19 -(30, 28, -1) 19 -(30, 29, -1) 20 -(30, 30, -1) 21 -(30, 31, -1) 21 -(30, 32, -1) 22 -(30, 33, -1) 23 -(30, 34, -1) 23 -(30, 35, -1) 24 -(30, 36, -1) 24 -(30, 37, -1) 25 -(30, 38, -1) 26 -(30, 39, -1) 26 -(30, 40, -1) 27 -(30, 41, -1) 27 -(30, 42, -1) 27 -(30, 43, -1) 28 -(30, 44, -1) 28 -(30, 45, -1) 28 -(30, 46, -1) 29 -(30, 47, -1) 29 -(30, 48, -1) 29 -(30, 49, -1) 29 -(30, 50, -1) 29 -(30, 51, -1) 29 -(30, 52, -1) 29 -(30, 53, -1) 29 -(30, 54, -1) 29 -(30, 55, -1) 29 -(30, 56, -1) 28 -(30, 57, -1) 28 -(30, 58, -1) 28 -(30, 59, -1) 27 -(30, 60, -1) 27 -(30, 61, -1) 27 -(30, 62, -1) 26 -(30, 63, -1) 26 -(30, 64, -1) 25 -(30, 65, -1) 24 -(30, 66, -1) 24 -(30, 67, -1) 23 -(30, 68, -1) 23 -(30, 69, -1) 22 -(30, 70, -1) 21 -(30, 71, -1) 21 -(30, 72, -1) 20 -(30, 73, -1) 19 -(30, 74, -1) 19 -(30, 75, -1) 18 -(30, 76, -1) 17 -(30, 77, -1) 16 -(30, 78, -1) 15 -(30, 79, -1) 15 -(30, 80, -1) 14 -(30, 81, -1) 13 -(30, 82, -1) 12 -(30, 83, -1) 11 -(30, 84, -1) 11 -(30, 85, -1) 10 -(30, 86, -1) 9 -(30, 87, -1) 8 -(30, 88, -1) 7 -(30, 89, -1) 6 -(30, 90, -1) 5 -(30, 91, -1) 5 -(30, 92, -1) 4 -(30, 93, -1) 3 -(30, 94, -1) 2 -(30, 95, -1) 1 -(31, 6, -1) 1 -(31, 7, -1) 2 -(31, 8, -1) 3 -(31, 9, -1) 4 -(31, 10, -1) 5 -(31, 11, -1) 6 -(31, 12, -1) 7 -(31, 13, -1) 7 -(31, 14, -1) 8 -(31, 15, -1) 9 -(31, 16, -1) 10 -(31, 17, -1) 11 -(31, 18, -1) 12 -(31, 19, -1) 13 -(31, 20, -1) 13 -(31, 21, -1) 14 -(31, 22, -1) 15 -(31, 23, -1) 16 -(31, 24, -1) 17 -(31, 25, -1) 18 -(31, 26, -1) 18 -(31, 27, -1) 19 -(31, 28, -1) 20 -(31, 29, -1) 21 -(31, 30, -1) 21 -(31, 31, -1) 22 -(31, 32, -1) 23 -(31, 33, -1) 23 -(31, 34, -1) 24 -(31, 35, -1) 25 -(31, 36, -1) 25 -(31, 37, -1) 26 -(31, 38, -1) 26 -(31, 39, -1) 27 -(31, 40, -1) 27 -(31, 41, -1) 28 -(31, 42, -1) 28 -(31, 43, -1) 29 -(31, 44, -1) 29 -(31, 45, -1) 29 -(31, 46, -1) 30 -(31, 47, -1) 30 -(31, 48, -1) 30 -(31, 49, -1) 30 -(31, 50, -1) 30 -(31, 51, -1) 30 -(31, 52, -1) 30 -(31, 53, -1) 30 -(31, 54, -1) 30 -(31, 55, -1) 30 -(31, 56, -1) 29 -(31, 57, -1) 29 -(31, 58, -1) 29 -(31, 59, -1) 28 -(31, 60, -1) 28 -(31, 61, -1) 27 -(31, 62, -1) 27 -(31, 63, -1) 26 -(31, 64, -1) 26 -(31, 65, -1) 25 -(31, 66, -1) 25 -(31, 67, -1) 24 -(31, 68, -1) 23 -(31, 69, -1) 23 -(31, 70, -1) 22 -(31, 71, -1) 21 -(31, 72, -1) 21 -(31, 73, -1) 20 -(31, 74, -1) 19 -(31, 75, -1) 18 -(31, 76, -1) 18 -(31, 77, -1) 17 -(31, 78, -1) 16 -(31, 79, -1) 15 -(31, 80, -1) 14 -(31, 81, -1) 13 -(31, 82, -1) 13 -(31, 83, -1) 12 -(31, 84, -1) 11 -(31, 85, -1) 10 -(31, 86, -1) 9 -(31, 87, -1) 8 -(31, 88, -1) 7 -(31, 89, -1) 7 -(31, 90, -1) 6 -(31, 91, -1) 5 -(31, 92, -1) 4 -(31, 93, -1) 3 -(31, 94, -1) 2 -(31, 95, -1) 1 -(32, 6, -1) 2 -(32, 7, -1) 2 -(32, 8, -1) 3 -(32, 9, -1) 4 -(32, 10, -1) 5 -(32, 11, -1) 6 -(32, 12, -1) 7 -(32, 13, -1) 8 -(32, 14, -1) 9 -(32, 15, -1) 10 -(32, 16, -1) 11 -(32, 17, -1) 11 -(32, 18, -1) 12 -(32, 19, -1) 13 -(32, 20, -1) 14 -(32, 21, -1) 15 -(32, 22, -1) 16 -(32, 23, -1) 17 -(32, 24, -1) 17 -(32, 25, -1) 18 -(32, 26, -1) 19 -(32, 27, -1) 20 -(32, 28, -1) 20 -(32, 29, -1) 21 -(32, 30, -1) 22 -(32, 31, -1) 23 -(32, 32, -1) 23 -(32, 33, -1) 24 -(32, 34, -1) 25 -(32, 35, -1) 25 -(32, 36, -1) 26 -(32, 37, -1) 27 -(32, 38, -1) 27 -(32, 39, -1) 28 -(32, 40, -1) 28 -(32, 41, -1) 29 -(32, 42, -1) 29 -(32, 43, -1) 30 -(32, 44, -1) 30 -(32, 45, -1) 30 -(32, 46, -1) 30 -(32, 47, -1) 31 -(32, 48, -1) 31 -(32, 49, -1) 31 -(32, 50, -1) 31 -(32, 51, -1) 31 -(32, 52, -1) 31 -(32, 53, -1) 31 -(32, 54, -1) 31 -(32, 55, -1) 30 -(32, 56, -1) 30 -(32, 57, -1) 30 -(32, 58, -1) 30 -(32, 59, -1) 29 -(32, 60, -1) 29 -(32, 61, -1) 28 -(32, 62, -1) 28 -(32, 63, -1) 27 -(32, 64, -1) 27 -(32, 65, -1) 26 -(32, 66, -1) 25 -(32, 67, -1) 25 -(32, 68, -1) 24 -(32, 69, -1) 23 -(32, 70, -1) 23 -(32, 71, -1) 22 -(32, 72, -1) 21 -(32, 73, -1) 20 -(32, 74, -1) 20 -(32, 75, -1) 19 -(32, 76, -1) 18 -(32, 77, -1) 17 -(32, 78, -1) 17 -(32, 79, -1) 16 -(32, 80, -1) 15 -(32, 81, -1) 14 -(32, 82, -1) 13 -(32, 83, -1) 12 -(32, 84, -1) 11 -(32, 85, -1) 11 -(32, 86, -1) 10 -(32, 87, -1) 9 -(32, 88, -1) 8 -(32, 89, -1) 7 -(32, 90, -1) 6 -(32, 91, -1) 5 -(32, 92, -1) 4 -(32, 93, -1) 3 -(32, 94, -1) 2 -(32, 95, -1) 2 -(33, 6, -1) 2 -(33, 7, -1) 3 -(33, 8, -1) 4 -(33, 9, -1) 5 -(33, 10, -1) 6 -(33, 11, -1) 7 -(33, 12, -1) 7 -(33, 13, -1) 8 -(33, 14, -1) 9 -(33, 15, -1) 10 -(33, 16, -1) 11 -(33, 17, -1) 12 -(33, 18, -1) 13 -(33, 19, -1) 14 -(33, 20, -1) 15 -(33, 21, -1) 15 -(33, 22, -1) 16 -(33, 23, -1) 17 -(33, 24, -1) 18 -(33, 25, -1) 19 -(33, 26, -1) 20 -(33, 27, -1) 20 -(33, 28, -1) 21 -(33, 29, -1) 22 -(33, 30, -1) 23 -(33, 31, -1) 23 -(33, 32, -1) 24 -(33, 33, -1) 25 -(33, 34, -1) 26 -(33, 35, -1) 26 -(33, 36, -1) 27 -(33, 37, -1) 27 -(33, 38, -1) 28 -(33, 39, -1) 29 -(33, 40, -1) 29 -(33, 41, -1) 30 -(33, 42, -1) 30 -(33, 43, -1) 30 -(33, 44, -1) 31 -(33, 45, -1) 31 -(33, 46, -1) 31 -(33, 47, -1) 32 -(33, 48, -1) 32 -(33, 49, -1) 32 -(33, 50, -1) 32 -(33, 51, -1) 32 -(33, 52, -1) 32 -(33, 53, -1) 32 -(33, 54, -1) 32 -(33, 55, -1) 31 -(33, 56, -1) 31 -(33, 57, -1) 31 -(33, 58, -1) 30 -(33, 59, -1) 30 -(33, 60, -1) 30 -(33, 61, -1) 29 -(33, 62, -1) 29 -(33, 63, -1) 28 -(33, 64, -1) 27 -(33, 65, -1) 27 -(33, 66, -1) 26 -(33, 67, -1) 26 -(33, 68, -1) 25 -(33, 69, -1) 24 -(33, 70, -1) 23 -(33, 71, -1) 23 -(33, 72, -1) 22 -(33, 73, -1) 21 -(33, 74, -1) 20 -(33, 75, -1) 20 -(33, 76, -1) 19 -(33, 77, -1) 18 -(33, 78, -1) 17 -(33, 79, -1) 16 -(33, 80, -1) 15 -(33, 81, -1) 15 -(33, 82, -1) 14 -(33, 83, -1) 13 -(33, 84, -1) 12 -(33, 85, -1) 11 -(33, 86, -1) 10 -(33, 87, -1) 9 -(33, 88, -1) 8 -(33, 89, -1) 7 -(33, 90, -1) 7 -(33, 91, -1) 6 -(33, 92, -1) 5 -(33, 93, -1) 4 -(33, 94, -1) 3 -(33, 95, -1) 2 -(34, 6, -1) 2 -(34, 7, -1) 3 -(34, 8, -1) 4 -(34, 9, -1) 5 -(34, 10, -1) 6 -(34, 11, -1) 7 -(34, 12, -1) 8 -(34, 13, -1) 9 -(34, 14, -1) 10 -(34, 15, -1) 11 -(34, 16, -1) 11 -(34, 17, -1) 12 -(34, 18, -1) 13 -(34, 19, -1) 14 -(34, 20, -1) 15 -(34, 21, -1) 16 -(34, 22, -1) 17 -(34, 23, -1) 18 -(34, 24, -1) 18 -(34, 25, -1) 19 -(34, 26, -1) 20 -(34, 27, -1) 21 -(34, 28, -1) 22 -(34, 29, -1) 23 -(34, 30, -1) 23 -(34, 31, -1) 24 -(34, 32, -1) 25 -(34, 33, -1) 26 -(34, 34, -1) 26 -(34, 35, -1) 27 -(34, 36, -1) 28 -(34, 37, -1) 28 -(34, 38, -1) 29 -(34, 39, -1) 29 -(34, 40, -1) 30 -(34, 41, -1) 30 -(34, 42, -1) 31 -(34, 43, -1) 31 -(34, 44, -1) 32 -(34, 45, -1) 32 -(34, 46, -1) 32 -(34, 47, -1) 33 -(34, 48, -1) 33 -(34, 49, -1) 33 -(34, 50, -1) 33 -(34, 51, -1) 33 -(34, 52, -1) 33 -(34, 53, -1) 33 -(34, 54, -1) 33 -(34, 55, -1) 32 -(34, 56, -1) 32 -(34, 57, -1) 32 -(34, 58, -1) 31 -(34, 59, -1) 31 -(34, 60, -1) 30 -(34, 61, -1) 30 -(34, 62, -1) 29 -(34, 63, -1) 29 -(34, 64, -1) 28 -(34, 65, -1) 28 -(34, 66, -1) 27 -(34, 67, -1) 26 -(34, 68, -1) 26 -(34, 69, -1) 25 -(34, 70, -1) 24 -(34, 71, -1) 23 -(34, 72, -1) 23 -(34, 73, -1) 22 -(34, 74, -1) 21 -(34, 75, -1) 20 -(34, 76, -1) 19 -(34, 77, -1) 18 -(34, 78, -1) 18 -(34, 79, -1) 17 -(34, 80, -1) 16 -(34, 81, -1) 15 -(34, 82, -1) 14 -(34, 83, -1) 13 -(34, 84, -1) 12 -(34, 85, -1) 11 -(34, 86, -1) 11 -(34, 87, -1) 10 -(34, 88, -1) 9 -(34, 89, -1) 8 -(34, 90, -1) 7 -(34, 91, -1) 6 -(34, 92, -1) 5 -(34, 93, -1) 4 -(34, 94, -1) 3 -(34, 95, -1) 2 -(35, 6, -1) 3 -(35, 7, -1) 4 -(35, 8, -1) 5 -(35, 9, -1) 6 -(35, 10, -1) 6 -(35, 11, -1) 7 -(35, 12, -1) 8 -(35, 13, -1) 9 -(35, 14, -1) 10 -(35, 15, -1) 11 -(35, 16, -1) 12 -(35, 17, -1) 13 -(35, 18, -1) 14 -(35, 19, -1) 15 -(35, 20, -1) 16 -(35, 21, -1) 16 -(35, 22, -1) 17 -(35, 23, -1) 18 -(35, 24, -1) 19 -(35, 25, -1) 20 -(35, 26, -1) 21 -(35, 27, -1) 21 -(35, 28, -1) 22 -(35, 29, -1) 23 -(35, 30, -1) 24 -(35, 31, -1) 25 -(35, 32, -1) 25 -(35, 33, -1) 26 -(35, 34, -1) 27 -(35, 35, -1) 28 -(35, 36, -1) 28 -(35, 37, -1) 29 -(35, 38, -1) 30 -(35, 39, -1) 30 -(35, 40, -1) 31 -(35, 41, -1) 31 -(35, 42, -1) 32 -(35, 43, -1) 32 -(35, 44, -1) 33 -(35, 45, -1) 33 -(35, 46, -1) 33 -(35, 47, -1) 34 -(35, 48, -1) 34 -(35, 49, -1) 34 -(35, 50, -1) 34 -(35, 51, -1) 34 -(35, 52, -1) 34 -(35, 53, -1) 34 -(35, 54, -1) 34 -(35, 55, -1) 33 -(35, 56, -1) 33 -(35, 57, -1) 33 -(35, 58, -1) 32 -(35, 59, -1) 32 -(35, 60, -1) 31 -(35, 61, -1) 31 -(35, 62, -1) 30 -(35, 63, -1) 30 -(35, 64, -1) 29 -(35, 65, -1) 28 -(35, 66, -1) 28 -(35, 67, -1) 27 -(35, 68, -1) 26 -(35, 69, -1) 25 -(35, 70, -1) 25 -(35, 71, -1) 24 -(35, 72, -1) 23 -(35, 73, -1) 22 -(35, 74, -1) 21 -(35, 75, -1) 21 -(35, 76, -1) 20 -(35, 77, -1) 19 -(35, 78, -1) 18 -(35, 79, -1) 17 -(35, 80, -1) 16 -(35, 81, -1) 16 -(35, 82, -1) 15 -(35, 83, -1) 14 -(35, 84, -1) 13 -(35, 85, -1) 12 -(35, 86, -1) 11 -(35, 87, -1) 10 -(35, 88, -1) 9 -(35, 89, -1) 8 -(35, 90, -1) 7 -(35, 91, -1) 6 -(35, 92, -1) 6 -(35, 93, -1) 5 -(35, 94, -1) 4 -(35, 95, -1) 3 -(36, 4, -1) 1 -(36, 5, -1) 2 -(36, 6, -1) 3 -(36, 7, -1) 4 -(36, 8, -1) 5 -(36, 9, -1) 6 -(36, 10, -1) 7 -(36, 11, -1) 8 -(36, 12, -1) 8 -(36, 13, -1) 9 -(36, 14, -1) 10 -(36, 15, -1) 11 -(36, 16, -1) 12 -(36, 17, -1) 13 -(36, 18, -1) 14 -(36, 19, -1) 15 -(36, 20, -1) 16 -(36, 21, -1) 17 -(36, 22, -1) 18 -(36, 23, -1) 19 -(36, 24, -1) 19 -(36, 25, -1) 20 -(36, 26, -1) 21 -(36, 27, -1) 22 -(36, 28, -1) 23 -(36, 29, -1) 24 -(36, 30, -1) 24 -(36, 31, -1) 25 -(36, 32, -1) 26 -(36, 33, -1) 27 -(36, 34, -1) 28 -(36, 35, -1) 28 -(36, 36, -1) 29 -(36, 37, -1) 30 -(36, 38, -1) 30 -(36, 39, -1) 31 -(36, 40, -1) 32 -(36, 41, -1) 32 -(36, 42, -1) 33 -(36, 43, -1) 33 -(36, 44, -1) 34 -(36, 45, -1) 34 -(36, 46, -1) 34 -(36, 47, -1) 35 -(36, 48, -1) 35 -(36, 49, -1) 35 -(36, 50, -1) 35 -(36, 51, -1) 35 -(36, 52, -1) 35 -(36, 53, -1) 35 -(36, 54, -1) 35 -(36, 55, -1) 34 -(36, 56, -1) 34 -(36, 57, -1) 34 -(36, 58, -1) 33 -(36, 59, -1) 33 -(36, 60, -1) 32 -(36, 61, -1) 32 -(36, 62, -1) 31 -(36, 63, -1) 30 -(36, 64, -1) 30 -(36, 65, -1) 29 -(36, 66, -1) 28 -(36, 67, -1) 28 -(36, 68, -1) 27 -(36, 69, -1) 26 -(36, 70, -1) 25 -(36, 71, -1) 24 -(36, 72, -1) 24 -(36, 73, -1) 23 -(36, 74, -1) 22 -(36, 75, -1) 21 -(36, 76, -1) 20 -(36, 77, -1) 19 -(36, 78, -1) 19 -(36, 79, -1) 18 -(36, 80, -1) 17 -(36, 81, -1) 16 -(36, 82, -1) 15 -(36, 83, -1) 14 -(36, 84, -1) 13 -(36, 85, -1) 12 -(36, 86, -1) 11 -(36, 87, -1) 10 -(36, 88, -1) 9 -(36, 89, -1) 8 -(36, 90, -1) 8 -(36, 91, -1) 7 -(36, 92, -1) 6 -(36, 93, -1) 5 -(36, 94, -1) 4 -(36, 95, -1) 3 -(36, 96, -1) 2 -(36, 97, -1) 1 -(37, 4, -1) 1 -(37, 5, -1) 2 -(37, 6, -1) 3 -(37, 7, -1) 4 -(37, 8, -1) 5 -(37, 9, -1) 6 -(37, 10, -1) 7 -(37, 11, -1) 8 -(37, 12, -1) 9 -(37, 13, -1) 10 -(37, 14, -1) 11 -(37, 15, -1) 12 -(37, 16, -1) 13 -(37, 17, -1) 14 -(37, 18, -1) 14 -(37, 19, -1) 15 -(37, 20, -1) 16 -(37, 21, -1) 17 -(37, 22, -1) 18 -(37, 23, -1) 19 -(37, 24, -1) 20 -(37, 25, -1) 21 -(37, 26, -1) 22 -(37, 27, -1) 22 -(37, 28, -1) 23 -(37, 29, -1) 24 -(37, 30, -1) 25 -(37, 31, -1) 26 -(37, 32, -1) 27 -(37, 33, -1) 27 -(37, 34, -1) 28 -(37, 35, -1) 29 -(37, 36, -1) 30 -(37, 37, -1) 30 -(37, 38, -1) 31 -(37, 39, -1) 32 -(37, 40, -1) 32 -(37, 41, -1) 33 -(37, 42, -1) 34 -(37, 43, -1) 34 -(37, 44, -1) 35 -(37, 45, -1) 35 -(37, 46, -1) 35 -(37, 47, -1) 36 -(37, 48, -1) 36 -(37, 49, -1) 36 -(37, 50, -1) 36 -(37, 51, -1) 36 -(37, 52, -1) 36 -(37, 53, -1) 36 -(37, 54, -1) 36 -(37, 55, -1) 35 -(37, 56, -1) 35 -(37, 57, -1) 35 -(37, 58, -1) 34 -(37, 59, -1) 34 -(37, 60, -1) 33 -(37, 61, -1) 32 -(37, 62, -1) 32 -(37, 63, -1) 31 -(37, 64, -1) 30 -(37, 65, -1) 30 -(37, 66, -1) 29 -(37, 67, -1) 28 -(37, 68, -1) 27 -(37, 69, -1) 27 -(37, 70, -1) 26 -(37, 71, -1) 25 -(37, 72, -1) 24 -(37, 73, -1) 23 -(37, 74, -1) 22 -(37, 75, -1) 22 -(37, 76, -1) 21 -(37, 77, -1) 20 -(37, 78, -1) 19 -(37, 79, -1) 18 -(37, 80, -1) 17 -(37, 81, -1) 16 -(37, 82, -1) 15 -(37, 83, -1) 14 -(37, 84, -1) 14 -(37, 85, -1) 13 -(37, 86, -1) 12 -(37, 87, -1) 11 -(37, 88, -1) 10 -(37, 89, -1) 9 -(37, 90, -1) 8 -(37, 91, -1) 7 -(37, 92, -1) 6 -(37, 93, -1) 5 -(37, 94, -1) 4 -(37, 95, -1) 3 -(37, 96, -1) 2 -(37, 97, -1) 1 -(38, 4, -1) 2 -(38, 5, -1) 3 -(38, 6, -1) 3 -(38, 7, -1) 4 -(38, 8, -1) 5 -(38, 9, -1) 6 -(38, 10, -1) 7 -(38, 11, -1) 8 -(38, 12, -1) 9 -(38, 13, -1) 10 -(38, 14, -1) 11 -(38, 15, -1) 12 -(38, 16, -1) 13 -(38, 17, -1) 14 -(38, 18, -1) 15 -(38, 19, -1) 16 -(38, 20, -1) 17 -(38, 21, -1) 18 -(38, 22, -1) 18 -(38, 23, -1) 19 -(38, 24, -1) 20 -(38, 25, -1) 21 -(38, 26, -1) 22 -(38, 27, -1) 23 -(38, 28, -1) 24 -(38, 29, -1) 25 -(38, 30, -1) 26 -(38, 31, -1) 26 -(38, 32, -1) 27 -(38, 33, -1) 28 -(38, 34, -1) 29 -(38, 35, -1) 30 -(38, 36, -1) 30 -(38, 37, -1) 31 -(38, 38, -1) 32 -(38, 39, -1) 33 -(38, 40, -1) 33 -(38, 41, -1) 34 -(38, 42, -1) 34 -(38, 43, -1) 35 -(38, 44, -1) 35 -(38, 45, -1) 36 -(38, 46, -1) 36 -(38, 47, -1) 37 -(38, 48, -1) 37 -(38, 49, -1) 37 -(38, 50, -1) 37 -(38, 51, -1) 37 -(38, 52, -1) 37 -(38, 53, -1) 37 -(38, 54, -1) 37 -(38, 55, -1) 36 -(38, 56, -1) 36 -(38, 57, -1) 35 -(38, 58, -1) 35 -(38, 59, -1) 34 -(38, 60, -1) 34 -(38, 61, -1) 33 -(38, 62, -1) 33 -(38, 63, -1) 32 -(38, 64, -1) 31 -(38, 65, -1) 30 -(38, 66, -1) 30 -(38, 67, -1) 29 -(38, 68, -1) 28 -(38, 69, -1) 27 -(38, 70, -1) 26 -(38, 71, -1) 26 -(38, 72, -1) 25 -(38, 73, -1) 24 -(38, 74, -1) 23 -(38, 75, -1) 22 -(38, 76, -1) 21 -(38, 77, -1) 20 -(38, 78, -1) 19 -(38, 79, -1) 18 -(38, 80, -1) 18 -(38, 81, -1) 17 -(38, 82, -1) 16 -(38, 83, -1) 15 -(38, 84, -1) 14 -(38, 85, -1) 13 -(38, 86, -1) 12 -(38, 87, -1) 11 -(38, 88, -1) 10 -(38, 89, -1) 9 -(38, 90, -1) 8 -(38, 91, -1) 7 -(38, 92, -1) 6 -(38, 93, -1) 5 -(38, 94, -1) 4 -(38, 95, -1) 3 -(38, 96, -1) 3 -(38, 97, -1) 2 -(39, 4, -1) 2 -(39, 5, -1) 3 -(39, 6, -1) 4 -(39, 7, -1) 5 -(39, 8, -1) 6 -(39, 9, -1) 7 -(39, 10, -1) 8 -(39, 11, -1) 9 -(39, 12, -1) 9 -(39, 13, -1) 10 -(39, 14, -1) 11 -(39, 15, -1) 12 -(39, 16, -1) 13 -(39, 17, -1) 14 -(39, 18, -1) 15 -(39, 19, -1) 16 -(39, 20, -1) 17 -(39, 21, -1) 18 -(39, 22, -1) 19 -(39, 23, -1) 20 -(39, 24, -1) 21 -(39, 25, -1) 22 -(39, 26, -1) 23 -(39, 27, -1) 23 -(39, 28, -1) 24 -(39, 29, -1) 25 -(39, 30, -1) 26 -(39, 31, -1) 27 -(39, 32, -1) 28 -(39, 33, -1) 29 -(39, 34, -1) 29 -(39, 35, -1) 30 -(39, 36, -1) 31 -(39, 37, -1) 32 -(39, 38, -1) 33 -(39, 39, -1) 33 -(39, 40, -1) 34 -(39, 41, -1) 35 -(39, 42, -1) 35 -(39, 43, -1) 36 -(39, 44, -1) 36 -(39, 45, -1) 37 -(39, 46, -1) 37 -(39, 47, -1) 37 -(39, 48, -1) 38 -(39, 49, -1) 38 -(39, 50, -1) 38 -(39, 51, -1) 38 -(39, 52, -1) 38 -(39, 53, -1) 38 -(39, 54, -1) 37 -(39, 55, -1) 37 -(39, 56, -1) 37 -(39, 57, -1) 36 -(39, 58, -1) 36 -(39, 59, -1) 35 -(39, 60, -1) 35 -(39, 61, -1) 34 -(39, 62, -1) 33 -(39, 63, -1) 33 -(39, 64, -1) 32 -(39, 65, -1) 31 -(39, 66, -1) 30 -(39, 67, -1) 29 -(39, 68, -1) 29 -(39, 69, -1) 28 -(39, 70, -1) 27 -(39, 71, -1) 26 -(39, 72, -1) 25 -(39, 73, -1) 24 -(39, 74, -1) 23 -(39, 75, -1) 23 -(39, 76, -1) 22 -(39, 77, -1) 21 -(39, 78, -1) 20 -(39, 79, -1) 19 -(39, 80, -1) 18 -(39, 81, -1) 17 -(39, 82, -1) 16 -(39, 83, -1) 15 -(39, 84, -1) 14 -(39, 85, -1) 13 -(39, 86, -1) 12 -(39, 87, -1) 11 -(39, 88, -1) 10 -(39, 89, -1) 9 -(39, 90, -1) 9 -(39, 91, -1) 8 -(39, 92, -1) 7 -(39, 93, -1) 6 -(39, 94, -1) 5 -(39, 95, -1) 4 -(39, 96, -1) 3 -(39, 97, -1) 2 -(40, 4, -1) 2 -(40, 5, -1) 3 -(40, 6, -1) 4 -(40, 7, -1) 5 -(40, 8, -1) 6 -(40, 9, -1) 7 -(40, 10, -1) 8 -(40, 11, -1) 9 -(40, 12, -1) 10 -(40, 13, -1) 11 -(40, 14, -1) 12 -(40, 15, -1) 13 -(40, 16, -1) 14 -(40, 17, -1) 15 -(40, 18, -1) 16 -(40, 19, -1) 16 -(40, 20, -1) 17 -(40, 21, -1) 18 -(40, 22, -1) 19 -(40, 23, -1) 20 -(40, 24, -1) 21 -(40, 25, -1) 22 -(40, 26, -1) 23 -(40, 27, -1) 24 -(40, 28, -1) 25 -(40, 29, -1) 26 -(40, 30, -1) 27 -(40, 31, -1) 27 -(40, 32, -1) 28 -(40, 33, -1) 29 -(40, 34, -1) 30 -(40, 35, -1) 31 -(40, 36, -1) 32 -(40, 37, -1) 32 -(40, 38, -1) 33 -(40, 39, -1) 34 -(40, 40, -1) 35 -(40, 41, -1) 35 -(40, 42, -1) 36 -(40, 43, -1) 37 -(40, 44, -1) 37 -(40, 45, -1) 38 -(40, 56, -1) 38 -(40, 57, -1) 37 -(40, 58, -1) 37 -(40, 59, -1) 36 -(40, 60, -1) 35 -(40, 61, -1) 35 -(40, 62, -1) 34 -(40, 63, -1) 33 -(40, 64, -1) 32 -(40, 65, -1) 32 -(40, 66, -1) 31 -(40, 67, -1) 30 -(40, 68, -1) 29 -(40, 69, -1) 28 -(40, 70, -1) 27 -(40, 71, -1) 27 -(40, 72, -1) 26 -(40, 73, -1) 25 -(40, 74, -1) 24 -(40, 75, -1) 23 -(40, 76, -1) 22 -(40, 77, -1) 21 -(40, 78, -1) 20 -(40, 79, -1) 19 -(40, 80, -1) 18 -(40, 81, -1) 17 -(40, 82, -1) 16 -(40, 83, -1) 16 -(40, 84, -1) 15 -(40, 85, -1) 14 -(40, 86, -1) 13 -(40, 87, -1) 12 -(40, 88, -1) 11 -(40, 89, -1) 10 -(40, 90, -1) 9 -(40, 91, -1) 8 -(40, 92, -1) 7 -(40, 93, -1) 6 -(40, 94, -1) 5 -(40, 95, -1) 4 -(40, 96, -1) 3 -(40, 97, -1) 2 -(41, 1, -1) 0 -(41, 2, -1) 0 -(41, 3, -1) 1 -(41, 4, -1) 2 -(41, 5, -1) 3 -(41, 6, -1) 4 -(41, 7, -1) 5 -(41, 8, -1) 6 -(41, 9, -1) 7 -(41, 10, -1) 8 -(41, 11, -1) 9 -(41, 12, -1) 10 -(41, 13, -1) 11 -(41, 14, -1) 12 -(41, 15, -1) 13 -(41, 16, -1) 14 -(41, 17, -1) 15 -(41, 18, -1) 16 -(41, 19, -1) 17 -(41, 20, -1) 18 -(41, 21, -1) 19 -(41, 22, -1) 20 -(41, 23, -1) 20 -(41, 24, -1) 21 -(41, 25, -1) 22 -(41, 26, -1) 23 -(41, 27, -1) 24 -(41, 28, -1) 25 -(41, 29, -1) 26 -(41, 30, -1) 27 -(41, 31, -1) 28 -(41, 32, -1) 29 -(41, 33, -1) 30 -(41, 34, -1) 30 -(41, 35, -1) 31 -(41, 36, -1) 32 -(41, 37, -1) 33 -(41, 38, -1) 34 -(41, 39, -1) 35 -(41, 40, -1) 35 -(41, 41, -1) 36 -(41, 42, -1) 37 -(41, 43, -1) 37 -(41, 58, -1) 37 -(41, 59, -1) 37 -(41, 60, -1) 36 -(41, 61, -1) 35 -(41, 62, -1) 35 -(41, 63, -1) 34 -(41, 64, -1) 33 -(41, 65, -1) 32 -(41, 66, -1) 31 -(41, 67, -1) 30 -(41, 68, -1) 30 -(41, 69, -1) 29 -(41, 70, -1) 28 -(41, 71, -1) 27 -(41, 72, -1) 26 -(41, 73, -1) 25 -(41, 74, -1) 24 -(41, 75, -1) 23 -(41, 76, -1) 22 -(41, 77, -1) 21 -(41, 78, -1) 20 -(41, 79, -1) 20 -(41, 80, -1) 19 -(41, 81, -1) 18 -(41, 82, -1) 17 -(41, 83, -1) 16 -(41, 84, -1) 15 -(41, 85, -1) 14 -(41, 86, -1) 13 -(41, 87, -1) 12 -(41, 88, -1) 11 -(41, 89, -1) 10 -(41, 90, -1) 9 -(41, 91, -1) 8 -(41, 92, -1) 7 -(41, 93, -1) 6 -(41, 94, -1) 5 -(41, 95, -1) 4 -(41, 96, -1) 3 -(41, 97, -1) 2 -(41, 98, -1) 1 -(41, 99, -1) 0 -(41, 100, -1) 0 -(42, 1, -1) 0 -(42, 2, -1) 0 -(42, 3, -1) 1 -(42, 4, -1) 2 -(42, 5, -1) 3 -(42, 6, -1) 4 -(42, 7, -1) 5 -(42, 8, -1) 6 -(42, 9, -1) 7 -(42, 10, -1) 8 -(42, 11, -1) 9 -(42, 12, -1) 10 -(42, 13, -1) 11 -(42, 14, -1) 12 -(42, 15, -1) 13 -(42, 16, -1) 14 -(42, 17, -1) 15 -(42, 18, -1) 16 -(42, 19, -1) 17 -(42, 20, -1) 18 -(42, 21, -1) 19 -(42, 22, -1) 20 -(42, 23, -1) 21 -(42, 24, -1) 22 -(42, 25, -1) 23 -(42, 26, -1) 24 -(42, 27, -1) 25 -(42, 28, -1) 25 -(42, 29, -1) 26 -(42, 30, -1) 27 -(42, 31, -1) 28 -(42, 32, -1) 29 -(42, 33, -1) 30 -(42, 34, -1) 31 -(42, 35, -1) 32 -(42, 36, -1) 33 -(42, 37, -1) 34 -(42, 38, -1) 34 -(42, 39, -1) 35 -(42, 40, -1) 36 -(42, 41, -1) 37 -(42, 42, -1) 38 -(42, 59, -1) 38 -(42, 60, -1) 37 -(42, 61, -1) 36 -(42, 62, -1) 35 -(42, 63, -1) 34 -(42, 64, -1) 34 -(42, 65, -1) 33 -(42, 66, -1) 32 -(42, 67, -1) 31 -(42, 68, -1) 30 -(42, 69, -1) 29 -(42, 70, -1) 28 -(42, 71, -1) 27 -(42, 72, -1) 26 -(42, 73, -1) 25 -(42, 74, -1) 25 -(42, 75, -1) 24 -(42, 76, -1) 23 -(42, 77, -1) 22 -(42, 78, -1) 21 -(42, 79, -1) 20 -(42, 80, -1) 19 -(42, 81, -1) 18 -(42, 82, -1) 17 -(42, 83, -1) 16 -(42, 84, -1) 15 -(42, 85, -1) 14 -(42, 86, -1) 13 -(42, 87, -1) 12 -(42, 88, -1) 11 -(42, 89, -1) 10 -(42, 90, -1) 9 -(42, 91, -1) 8 -(42, 92, -1) 7 -(42, 93, -1) 6 -(42, 94, -1) 5 -(42, 95, -1) 4 -(42, 96, -1) 3 -(42, 97, -1) 2 -(42, 98, -1) 1 -(42, 99, -1) 0 -(42, 100, -1) 0 -(43, 1, -1) 0 -(43, 2, -1) 1 -(43, 3, -1) 2 -(43, 4, -1) 3 -(43, 5, -1) 4 -(43, 6, -1) 4 -(43, 7, -1) 5 -(43, 8, -1) 6 -(43, 9, -1) 7 -(43, 10, -1) 8 -(43, 11, -1) 9 -(43, 12, -1) 10 -(43, 13, -1) 11 -(43, 14, -1) 12 -(43, 15, -1) 13 -(43, 16, -1) 14 -(43, 17, -1) 15 -(43, 18, -1) 16 -(43, 19, -1) 17 -(43, 20, -1) 18 -(43, 21, -1) 19 -(43, 22, -1) 20 -(43, 23, -1) 21 -(43, 24, -1) 22 -(43, 25, -1) 23 -(43, 26, -1) 24 -(43, 27, -1) 25 -(43, 28, -1) 26 -(43, 29, -1) 27 -(43, 30, -1) 28 -(43, 31, -1) 29 -(43, 32, -1) 30 -(43, 33, -1) 30 -(43, 34, -1) 31 -(43, 35, -1) 32 -(43, 36, -1) 33 -(43, 37, -1) 34 -(43, 38, -1) 35 -(43, 39, -1) 36 -(43, 40, -1) 37 -(43, 41, -1) 37 -(43, 60, -1) 37 -(43, 61, -1) 37 -(43, 62, -1) 36 -(43, 63, -1) 35 -(43, 64, -1) 34 -(43, 65, -1) 33 -(43, 66, -1) 32 -(43, 67, -1) 31 -(43, 68, -1) 30 -(43, 69, -1) 30 -(43, 70, -1) 29 -(43, 71, -1) 28 -(43, 72, -1) 27 -(43, 73, -1) 26 -(43, 74, -1) 25 -(43, 75, -1) 24 -(43, 76, -1) 23 -(43, 77, -1) 22 -(43, 78, -1) 21 -(43, 79, -1) 20 -(43, 80, -1) 19 -(43, 81, -1) 18 -(43, 82, -1) 17 -(43, 83, -1) 16 -(43, 84, -1) 15 -(43, 85, -1) 14 -(43, 86, -1) 13 -(43, 87, -1) 12 -(43, 88, -1) 11 -(43, 89, -1) 10 -(43, 90, -1) 9 -(43, 91, -1) 8 -(43, 92, -1) 7 -(43, 93, -1) 6 -(43, 94, -1) 5 -(43, 95, -1) 4 -(43, 96, -1) 4 -(43, 97, -1) 3 -(43, 98, -1) 2 -(43, 99, -1) 1 -(43, 100, -1) 0 -(44, 1, -1) 0 -(44, 2, -1) 1 -(44, 3, -1) 2 -(44, 4, -1) 3 -(44, 5, -1) 4 -(44, 6, -1) 5 -(44, 7, -1) 6 -(44, 8, -1) 7 -(44, 9, -1) 8 -(44, 10, -1) 9 -(44, 11, -1) 10 -(44, 12, -1) 11 -(44, 13, -1) 12 -(44, 14, -1) 13 -(44, 15, -1) 14 -(44, 16, -1) 14 -(44, 17, -1) 15 -(44, 18, -1) 16 -(44, 19, -1) 17 -(44, 20, -1) 18 -(44, 21, -1) 19 -(44, 22, -1) 20 -(44, 23, -1) 21 -(44, 24, -1) 22 -(44, 25, -1) 23 -(44, 26, -1) 24 -(44, 27, -1) 25 -(44, 28, -1) 26 -(44, 29, -1) 27 -(44, 30, -1) 28 -(44, 31, -1) 29 -(44, 32, -1) 30 -(44, 33, -1) 31 -(44, 34, -1) 32 -(44, 35, -1) 33 -(44, 36, -1) 34 -(44, 37, -1) 35 -(44, 38, -1) 35 -(44, 39, -1) 36 -(44, 40, -1) 37 -(44, 61, -1) 37 -(44, 62, -1) 36 -(44, 63, -1) 35 -(44, 64, -1) 35 -(44, 65, -1) 34 -(44, 66, -1) 33 -(44, 67, -1) 32 -(44, 68, -1) 31 -(44, 69, -1) 30 -(44, 70, -1) 29 -(44, 71, -1) 28 -(44, 72, -1) 27 -(44, 73, -1) 26 -(44, 74, -1) 25 -(44, 75, -1) 24 -(44, 76, -1) 23 -(44, 77, -1) 22 -(44, 78, -1) 21 -(44, 79, -1) 20 -(44, 80, -1) 19 -(44, 81, -1) 18 -(44, 82, -1) 17 -(44, 83, -1) 16 -(44, 84, -1) 15 -(44, 85, -1) 14 -(44, 86, -1) 14 -(44, 87, -1) 13 -(44, 88, -1) 12 -(44, 89, -1) 11 -(44, 90, -1) 10 -(44, 91, -1) 9 -(44, 92, -1) 8 -(44, 93, -1) 7 -(44, 94, -1) 6 -(44, 95, -1) 5 -(44, 96, -1) 4 -(44, 97, -1) 3 -(44, 98, -1) 2 -(44, 99, -1) 1 -(44, 100, -1) 0 -(45, 1, -1) 0 -(45, 2, -1) 1 -(45, 3, -1) 2 -(45, 4, -1) 3 -(45, 5, -1) 4 -(45, 6, -1) 5 -(45, 7, -1) 6 -(45, 8, -1) 7 -(45, 9, -1) 8 -(45, 10, -1) 9 -(45, 11, -1) 10 -(45, 12, -1) 11 -(45, 13, -1) 12 -(45, 14, -1) 13 -(45, 15, -1) 14 -(45, 16, -1) 15 -(45, 17, -1) 16 -(45, 18, -1) 17 -(45, 19, -1) 18 -(45, 20, -1) 19 -(45, 21, -1) 20 -(45, 22, -1) 21 -(45, 23, -1) 22 -(45, 24, -1) 23 -(45, 25, -1) 23 -(45, 26, -1) 24 -(45, 27, -1) 25 -(45, 28, -1) 26 -(45, 29, -1) 27 -(45, 30, -1) 28 -(45, 31, -1) 29 -(45, 32, -1) 30 -(45, 33, -1) 31 -(45, 34, -1) 32 -(45, 35, -1) 33 -(45, 36, -1) 34 -(45, 37, -1) 35 -(45, 38, -1) 36 -(45, 39, -1) 37 -(45, 40, -1) 38 -(45, 61, -1) 38 -(45, 62, -1) 37 -(45, 63, -1) 36 -(45, 64, -1) 35 -(45, 65, -1) 34 -(45, 66, -1) 33 -(45, 67, -1) 32 -(45, 68, -1) 31 -(45, 69, -1) 30 -(45, 70, -1) 29 -(45, 71, -1) 28 -(45, 72, -1) 27 -(45, 73, -1) 26 -(45, 74, -1) 25 -(45, 75, -1) 24 -(45, 76, -1) 23 -(45, 77, -1) 23 -(45, 78, -1) 22 -(45, 79, -1) 21 -(45, 80, -1) 20 -(45, 81, -1) 19 -(45, 82, -1) 18 -(45, 83, -1) 17 -(45, 84, -1) 16 -(45, 85, -1) 15 -(45, 86, -1) 14 -(45, 87, -1) 13 -(45, 88, -1) 12 -(45, 89, -1) 11 -(45, 90, -1) 10 -(45, 91, -1) 9 -(45, 92, -1) 8 -(45, 93, -1) 7 -(45, 94, -1) 6 -(45, 95, -1) 5 -(45, 96, -1) 4 -(45, 97, -1) 3 -(45, 98, -1) 2 -(45, 99, -1) 1 -(45, 100, -1) 0 -(46, 1, -1) 0 -(46, 2, -1) 1 -(46, 3, -1) 2 -(46, 4, -1) 3 -(46, 5, -1) 4 -(46, 6, -1) 5 -(46, 7, -1) 6 -(46, 8, -1) 7 -(46, 9, -1) 8 -(46, 10, -1) 9 -(46, 11, -1) 10 -(46, 12, -1) 11 -(46, 13, -1) 12 -(46, 14, -1) 13 -(46, 15, -1) 14 -(46, 16, -1) 15 -(46, 17, -1) 16 -(46, 18, -1) 17 -(46, 19, -1) 18 -(46, 20, -1) 19 -(46, 21, -1) 20 -(46, 22, -1) 21 -(46, 23, -1) 22 -(46, 24, -1) 23 -(46, 25, -1) 24 -(46, 26, -1) 25 -(46, 27, -1) 26 -(46, 28, -1) 27 -(46, 29, -1) 28 -(46, 30, -1) 29 -(46, 31, -1) 30 -(46, 32, -1) 30 -(46, 33, -1) 31 -(46, 34, -1) 32 -(46, 35, -1) 33 -(46, 36, -1) 34 -(46, 37, -1) 35 -(46, 38, -1) 36 -(46, 39, -1) 37 -(46, 62, -1) 37 -(46, 63, -1) 36 -(46, 64, -1) 35 -(46, 65, -1) 34 -(46, 66, -1) 33 -(46, 67, -1) 32 -(46, 68, -1) 31 -(46, 69, -1) 30 -(46, 70, -1) 30 -(46, 71, -1) 29 -(46, 72, -1) 28 -(46, 73, -1) 27 -(46, 74, -1) 26 -(46, 75, -1) 25 -(46, 76, -1) 24 -(46, 77, -1) 23 -(46, 78, -1) 22 -(46, 79, -1) 21 -(46, 80, -1) 20 -(46, 81, -1) 19 -(46, 82, -1) 18 -(46, 83, -1) 17 -(46, 84, -1) 16 -(46, 85, -1) 15 -(46, 86, -1) 14 -(46, 87, -1) 13 -(46, 88, -1) 12 -(46, 89, -1) 11 -(46, 90, -1) 10 -(46, 91, -1) 9 -(46, 92, -1) 8 -(46, 93, -1) 7 -(46, 94, -1) 6 -(46, 95, -1) 5 -(46, 96, -1) 4 -(46, 97, -1) 3 -(46, 98, -1) 2 -(46, 99, -1) 1 -(46, 100, -1) 0 -(47, 1, -1) 0 -(47, 2, -1) 1 -(47, 3, -1) 2 -(47, 4, -1) 3 -(47, 5, -1) 4 -(47, 6, -1) 5 -(47, 7, -1) 6 -(47, 8, -1) 7 -(47, 9, -1) 8 -(47, 10, -1) 9 -(47, 11, -1) 10 -(47, 12, -1) 11 -(47, 13, -1) 12 -(47, 14, -1) 13 -(47, 15, -1) 14 -(47, 16, -1) 15 -(47, 17, -1) 16 -(47, 18, -1) 17 -(47, 19, -1) 18 -(47, 20, -1) 19 -(47, 21, -1) 20 -(47, 22, -1) 21 -(47, 23, -1) 22 -(47, 24, -1) 23 -(47, 25, -1) 24 -(47, 26, -1) 25 -(47, 27, -1) 26 -(47, 28, -1) 27 -(47, 29, -1) 28 -(47, 30, -1) 29 -(47, 31, -1) 30 -(47, 32, -1) 31 -(47, 33, -1) 32 -(47, 34, -1) 33 -(47, 35, -1) 34 -(47, 36, -1) 35 -(47, 37, -1) 36 -(47, 38, -1) 37 -(47, 39, -1) 38 -(47, 62, -1) 38 -(47, 63, -1) 37 -(47, 64, -1) 36 -(47, 65, -1) 35 -(47, 66, -1) 34 -(47, 67, -1) 33 -(47, 68, -1) 32 -(47, 69, -1) 31 -(47, 70, -1) 30 -(47, 71, -1) 29 -(47, 72, -1) 28 -(47, 73, -1) 27 -(47, 74, -1) 26 -(47, 75, -1) 25 -(47, 76, -1) 24 -(47, 77, -1) 23 -(47, 78, -1) 22 -(47, 79, -1) 21 -(47, 80, -1) 20 -(47, 81, -1) 19 -(47, 82, -1) 18 -(47, 83, -1) 17 -(47, 84, -1) 16 -(47, 85, -1) 15 -(47, 86, -1) 14 -(47, 87, -1) 13 -(47, 88, -1) 12 -(47, 89, -1) 11 -(47, 90, -1) 10 -(47, 91, -1) 9 -(47, 92, -1) 8 -(47, 93, -1) 7 -(47, 94, -1) 6 -(47, 95, -1) 5 -(47, 96, -1) 4 -(47, 97, -1) 3 -(47, 98, -1) 2 -(47, 99, -1) 1 -(47, 100, -1) 0 -(48, 1, -1) 0 -(48, 2, -1) 1 -(48, 3, -1) 2 -(48, 4, -1) 3 -(48, 5, -1) 4 -(48, 6, -1) 5 -(48, 7, -1) 6 -(48, 8, -1) 7 -(48, 9, -1) 8 -(48, 10, -1) 9 -(48, 11, -1) 10 -(48, 12, -1) 11 -(48, 13, -1) 12 -(48, 14, -1) 13 -(48, 15, -1) 14 -(48, 16, -1) 15 -(48, 17, -1) 16 -(48, 18, -1) 17 -(48, 19, -1) 18 -(48, 20, -1) 19 -(48, 21, -1) 20 -(48, 22, -1) 21 -(48, 23, -1) 22 -(48, 24, -1) 23 -(48, 25, -1) 24 -(48, 26, -1) 25 -(48, 27, -1) 26 -(48, 28, -1) 27 -(48, 29, -1) 28 -(48, 30, -1) 29 -(48, 31, -1) 30 -(48, 32, -1) 31 -(48, 33, -1) 32 -(48, 34, -1) 33 -(48, 35, -1) 34 -(48, 36, -1) 35 -(48, 37, -1) 36 -(48, 38, -1) 37 -(48, 39, -1) 38 -(48, 62, -1) 38 -(48, 63, -1) 37 -(48, 64, -1) 36 -(48, 65, -1) 35 -(48, 66, -1) 34 -(48, 67, -1) 33 -(48, 68, -1) 32 -(48, 69, -1) 31 -(48, 70, -1) 30 -(48, 71, -1) 29 -(48, 72, -1) 28 -(48, 73, -1) 27 -(48, 74, -1) 26 -(48, 75, -1) 25 -(48, 76, -1) 24 -(48, 77, -1) 23 -(48, 78, -1) 22 -(48, 79, -1) 21 -(48, 80, -1) 20 -(48, 81, -1) 19 -(48, 82, -1) 18 -(48, 83, -1) 17 -(48, 84, -1) 16 -(48, 85, -1) 15 -(48, 86, -1) 14 -(48, 87, -1) 13 -(48, 88, -1) 12 -(48, 89, -1) 11 -(48, 90, -1) 10 -(48, 91, -1) 9 -(48, 92, -1) 8 -(48, 93, -1) 7 -(48, 94, -1) 6 -(48, 95, -1) 5 -(48, 96, -1) 4 -(48, 97, -1) 3 -(48, 98, -1) 2 -(48, 99, -1) 1 -(48, 100, -1) 0 -(49, 1, -1) 0 -(49, 2, -1) 1 -(49, 3, -1) 2 -(49, 4, -1) 3 -(49, 5, -1) 4 -(49, 6, -1) 5 -(49, 7, -1) 6 -(49, 8, -1) 7 -(49, 9, -1) 8 -(49, 10, -1) 9 -(49, 11, -1) 10 -(49, 12, -1) 11 -(49, 13, -1) 12 -(49, 14, -1) 13 -(49, 15, -1) 14 -(49, 16, -1) 15 -(49, 17, -1) 16 -(49, 18, -1) 17 -(49, 19, -1) 18 -(49, 20, -1) 19 -(49, 21, -1) 20 -(49, 22, -1) 21 -(49, 23, -1) 22 -(49, 24, -1) 23 -(49, 25, -1) 24 -(49, 26, -1) 25 -(49, 27, -1) 26 -(49, 28, -1) 27 -(49, 29, -1) 28 -(49, 30, -1) 29 -(49, 31, -1) 30 -(49, 32, -1) 31 -(49, 33, -1) 32 -(49, 34, -1) 33 -(49, 35, -1) 34 -(49, 36, -1) 35 -(49, 37, -1) 36 -(49, 38, -1) 37 -(49, 39, -1) 38 -(49, 62, -1) 38 -(49, 63, -1) 37 -(49, 64, -1) 36 -(49, 65, -1) 35 -(49, 66, -1) 34 -(49, 67, -1) 33 -(49, 68, -1) 32 -(49, 69, -1) 31 -(49, 70, -1) 30 -(49, 71, -1) 29 -(49, 72, -1) 28 -(49, 73, -1) 27 -(49, 74, -1) 26 -(49, 75, -1) 25 -(49, 76, -1) 24 -(49, 77, -1) 23 -(49, 78, -1) 22 -(49, 79, -1) 21 -(49, 80, -1) 20 -(49, 81, -1) 19 -(49, 82, -1) 18 -(49, 83, -1) 17 -(49, 84, -1) 16 -(49, 85, -1) 15 -(49, 86, -1) 14 -(49, 87, -1) 13 -(49, 88, -1) 12 -(49, 89, -1) 11 -(49, 90, -1) 10 -(49, 91, -1) 9 -(49, 92, -1) 8 -(49, 93, -1) 7 -(49, 94, -1) 6 -(49, 95, -1) 5 -(49, 96, -1) 4 -(49, 97, -1) 3 -(49, 98, -1) 2 -(49, 99, -1) 1 -(49, 100, -1) 0 -(50, 1, -1) 0 -(50, 2, -1) 1 -(50, 3, -1) 2 -(50, 4, -1) 3 -(50, 5, -1) 4 -(50, 6, -1) 5 -(50, 7, -1) 6 -(50, 8, -1) 7 -(50, 9, -1) 8 -(50, 10, -1) 9 -(50, 11, -1) 10 -(50, 12, -1) 11 -(50, 13, -1) 12 -(50, 14, -1) 13 -(50, 15, -1) 14 -(50, 16, -1) 15 -(50, 17, -1) 16 -(50, 18, -1) 17 -(50, 19, -1) 18 -(50, 20, -1) 19 -(50, 21, -1) 20 -(50, 22, -1) 21 -(50, 23, -1) 22 -(50, 24, -1) 23 -(50, 25, -1) 24 -(50, 26, -1) 25 -(50, 27, -1) 26 -(50, 28, -1) 27 -(50, 29, -1) 28 -(50, 30, -1) 29 -(50, 31, -1) 30 -(50, 32, -1) 31 -(50, 33, -1) 32 -(50, 34, -1) 33 -(50, 35, -1) 34 -(50, 36, -1) 35 -(50, 37, -1) 36 -(50, 38, -1) 37 -(50, 39, -1) 38 -(50, 62, -1) 38 -(50, 63, -1) 37 -(50, 64, -1) 36 -(50, 65, -1) 35 -(50, 66, -1) 34 -(50, 67, -1) 33 -(50, 68, -1) 32 -(50, 69, -1) 31 -(50, 70, -1) 30 -(50, 71, -1) 29 -(50, 72, -1) 28 -(50, 73, -1) 27 -(50, 74, -1) 26 -(50, 75, -1) 25 -(50, 76, -1) 24 -(50, 77, -1) 23 -(50, 78, -1) 22 -(50, 79, -1) 21 -(50, 80, -1) 20 -(50, 81, -1) 19 -(50, 82, -1) 18 -(50, 83, -1) 17 -(50, 84, -1) 16 -(50, 85, -1) 15 -(50, 86, -1) 14 -(50, 87, -1) 13 -(50, 88, -1) 12 -(50, 89, -1) 11 -(50, 90, -1) 10 -(50, 91, -1) 9 -(50, 92, -1) 8 -(50, 93, -1) 7 -(50, 94, -1) 6 -(50, 95, -1) 5 -(50, 96, -1) 4 -(50, 97, -1) 3 -(50, 98, -1) 2 -(50, 99, -1) 1 -(50, 100, -1) 0 -(51, 1, -1) 0 -(51, 2, -1) 1 -(51, 3, -1) 2 -(51, 4, -1) 3 -(51, 5, -1) 4 -(51, 6, -1) 5 -(51, 7, -1) 6 -(51, 8, -1) 7 -(51, 9, -1) 8 -(51, 10, -1) 9 -(51, 11, -1) 10 -(51, 12, -1) 11 -(51, 13, -1) 12 -(51, 14, -1) 13 -(51, 15, -1) 14 -(51, 16, -1) 15 -(51, 17, -1) 16 -(51, 18, -1) 17 -(51, 19, -1) 18 -(51, 20, -1) 19 -(51, 21, -1) 20 -(51, 22, -1) 21 -(51, 23, -1) 22 -(51, 24, -1) 23 -(51, 25, -1) 24 -(51, 26, -1) 25 -(51, 27, -1) 26 -(51, 28, -1) 27 -(51, 29, -1) 28 -(51, 30, -1) 29 -(51, 31, -1) 30 -(51, 32, -1) 31 -(51, 33, -1) 32 -(51, 34, -1) 33 -(51, 35, -1) 34 -(51, 36, -1) 35 -(51, 37, -1) 36 -(51, 38, -1) 37 -(51, 39, -1) 38 -(51, 62, -1) 38 -(51, 63, -1) 37 -(51, 64, -1) 36 -(51, 65, -1) 35 -(51, 66, -1) 34 -(51, 67, -1) 33 -(51, 68, -1) 32 -(51, 69, -1) 31 -(51, 70, -1) 30 -(51, 71, -1) 29 -(51, 72, -1) 28 -(51, 73, -1) 27 -(51, 74, -1) 26 -(51, 75, -1) 25 -(51, 76, -1) 24 -(51, 77, -1) 23 -(51, 78, -1) 22 -(51, 79, -1) 21 -(51, 80, -1) 20 -(51, 81, -1) 19 -(51, 82, -1) 18 -(51, 83, -1) 17 -(51, 84, -1) 16 -(51, 85, -1) 15 -(51, 86, -1) 14 -(51, 87, -1) 13 -(51, 88, -1) 12 -(51, 89, -1) 11 -(51, 90, -1) 10 -(51, 91, -1) 9 -(51, 92, -1) 8 -(51, 93, -1) 7 -(51, 94, -1) 6 -(51, 95, -1) 5 -(51, 96, -1) 4 -(51, 97, -1) 3 -(51, 98, -1) 2 -(51, 99, -1) 1 -(51, 100, -1) 0 -(52, 1, -1) 0 -(52, 2, -1) 1 -(52, 3, -1) 2 -(52, 4, -1) 3 -(52, 5, -1) 4 -(52, 6, -1) 5 -(52, 7, -1) 6 -(52, 8, -1) 7 -(52, 9, -1) 8 -(52, 10, -1) 9 -(52, 11, -1) 10 -(52, 12, -1) 11 -(52, 13, -1) 12 -(52, 14, -1) 13 -(52, 15, -1) 14 -(52, 16, -1) 15 -(52, 17, -1) 16 -(52, 18, -1) 17 -(52, 19, -1) 18 -(52, 20, -1) 19 -(52, 21, -1) 20 -(52, 22, -1) 21 -(52, 23, -1) 22 -(52, 24, -1) 23 -(52, 25, -1) 24 -(52, 26, -1) 25 -(52, 27, -1) 26 -(52, 28, -1) 27 -(52, 29, -1) 28 -(52, 30, -1) 29 -(52, 31, -1) 30 -(52, 32, -1) 31 -(52, 33, -1) 32 -(52, 34, -1) 33 -(52, 35, -1) 34 -(52, 36, -1) 35 -(52, 37, -1) 36 -(52, 38, -1) 37 -(52, 39, -1) 38 -(52, 62, -1) 38 -(52, 63, -1) 37 -(52, 64, -1) 36 -(52, 65, -1) 35 -(52, 66, -1) 34 -(52, 67, -1) 33 -(52, 68, -1) 32 -(52, 69, -1) 31 -(52, 70, -1) 30 -(52, 71, -1) 29 -(52, 72, -1) 28 -(52, 73, -1) 27 -(52, 74, -1) 26 -(52, 75, -1) 25 -(52, 76, -1) 24 -(52, 77, -1) 23 -(52, 78, -1) 22 -(52, 79, -1) 21 -(52, 80, -1) 20 -(52, 81, -1) 19 -(52, 82, -1) 18 -(52, 83, -1) 17 -(52, 84, -1) 16 -(52, 85, -1) 15 -(52, 86, -1) 14 -(52, 87, -1) 13 -(52, 88, -1) 12 -(52, 89, -1) 11 -(52, 90, -1) 10 -(52, 91, -1) 9 -(52, 92, -1) 8 -(52, 93, -1) 7 -(52, 94, -1) 6 -(52, 95, -1) 5 -(52, 96, -1) 4 -(52, 97, -1) 3 -(52, 98, -1) 2 -(52, 99, -1) 1 -(52, 100, -1) 0 -(53, 1, -1) 0 -(53, 2, -1) 1 -(53, 3, -1) 2 -(53, 4, -1) 3 -(53, 5, -1) 4 -(53, 6, -1) 5 -(53, 7, -1) 6 -(53, 8, -1) 7 -(53, 9, -1) 8 -(53, 10, -1) 9 -(53, 11, -1) 10 -(53, 12, -1) 11 -(53, 13, -1) 12 -(53, 14, -1) 13 -(53, 15, -1) 14 -(53, 16, -1) 15 -(53, 17, -1) 16 -(53, 18, -1) 17 -(53, 19, -1) 18 -(53, 20, -1) 19 -(53, 21, -1) 20 -(53, 22, -1) 21 -(53, 23, -1) 22 -(53, 24, -1) 23 -(53, 25, -1) 24 -(53, 26, -1) 25 -(53, 27, -1) 26 -(53, 28, -1) 27 -(53, 29, -1) 28 -(53, 30, -1) 29 -(53, 31, -1) 30 -(53, 32, -1) 31 -(53, 33, -1) 32 -(53, 34, -1) 33 -(53, 35, -1) 34 -(53, 36, -1) 35 -(53, 37, -1) 36 -(53, 38, -1) 37 -(53, 39, -1) 38 -(53, 62, -1) 38 -(53, 63, -1) 37 -(53, 64, -1) 36 -(53, 65, -1) 35 -(53, 66, -1) 34 -(53, 67, -1) 33 -(53, 68, -1) 32 -(53, 69, -1) 31 -(53, 70, -1) 30 -(53, 71, -1) 29 -(53, 72, -1) 28 -(53, 73, -1) 27 -(53, 74, -1) 26 -(53, 75, -1) 25 -(53, 76, -1) 24 -(53, 77, -1) 23 -(53, 78, -1) 22 -(53, 79, -1) 21 -(53, 80, -1) 20 -(53, 81, -1) 19 -(53, 82, -1) 18 -(53, 83, -1) 17 -(53, 84, -1) 16 -(53, 85, -1) 15 -(53, 86, -1) 14 -(53, 87, -1) 13 -(53, 88, -1) 12 -(53, 89, -1) 11 -(53, 90, -1) 10 -(53, 91, -1) 9 -(53, 92, -1) 8 -(53, 93, -1) 7 -(53, 94, -1) 6 -(53, 95, -1) 5 -(53, 96, -1) 4 -(53, 97, -1) 3 -(53, 98, -1) 2 -(53, 99, -1) 1 -(53, 100, -1) 0 -(54, 1, -1) 0 -(54, 2, -1) 1 -(54, 3, -1) 2 -(54, 4, -1) 3 -(54, 5, -1) 4 -(54, 6, -1) 5 -(54, 7, -1) 6 -(54, 8, -1) 7 -(54, 9, -1) 8 -(54, 10, -1) 9 -(54, 11, -1) 10 -(54, 12, -1) 11 -(54, 13, -1) 12 -(54, 14, -1) 13 -(54, 15, -1) 14 -(54, 16, -1) 15 -(54, 17, -1) 16 -(54, 18, -1) 17 -(54, 19, -1) 18 -(54, 20, -1) 19 -(54, 21, -1) 20 -(54, 22, -1) 21 -(54, 23, -1) 22 -(54, 24, -1) 23 -(54, 25, -1) 24 -(54, 26, -1) 25 -(54, 27, -1) 26 -(54, 28, -1) 27 -(54, 29, -1) 28 -(54, 30, -1) 29 -(54, 31, -1) 30 -(54, 32, -1) 31 -(54, 33, -1) 32 -(54, 34, -1) 33 -(54, 35, -1) 34 -(54, 36, -1) 35 -(54, 37, -1) 36 -(54, 38, -1) 37 -(54, 39, -1) 38 -(54, 62, -1) 38 -(54, 63, -1) 37 -(54, 64, -1) 36 -(54, 65, -1) 35 -(54, 66, -1) 34 -(54, 67, -1) 33 -(54, 68, -1) 32 -(54, 69, -1) 31 -(54, 70, -1) 30 -(54, 71, -1) 29 -(54, 72, -1) 28 -(54, 73, -1) 27 -(54, 74, -1) 26 -(54, 75, -1) 25 -(54, 76, -1) 24 -(54, 77, -1) 23 -(54, 78, -1) 22 -(54, 79, -1) 21 -(54, 80, -1) 20 -(54, 81, -1) 19 -(54, 82, -1) 18 -(54, 83, -1) 17 -(54, 84, -1) 16 -(54, 85, -1) 15 -(54, 86, -1) 14 -(54, 87, -1) 13 -(54, 88, -1) 12 -(54, 89, -1) 11 -(54, 90, -1) 10 -(54, 91, -1) 9 -(54, 92, -1) 8 -(54, 93, -1) 7 -(54, 94, -1) 6 -(54, 95, -1) 5 -(54, 96, -1) 4 -(54, 97, -1) 3 -(54, 98, -1) 2 -(54, 99, -1) 1 -(54, 100, -1) 0 -(55, 1, -1) 0 -(55, 2, -1) 1 -(55, 3, -1) 2 -(55, 4, -1) 3 -(55, 5, -1) 4 -(55, 6, -1) 5 -(55, 7, -1) 6 -(55, 8, -1) 7 -(55, 9, -1) 8 -(55, 10, -1) 9 -(55, 11, -1) 10 -(55, 12, -1) 11 -(55, 13, -1) 12 -(55, 14, -1) 13 -(55, 15, -1) 14 -(55, 16, -1) 15 -(55, 17, -1) 16 -(55, 18, -1) 17 -(55, 19, -1) 18 -(55, 20, -1) 19 -(55, 21, -1) 20 -(55, 22, -1) 21 -(55, 23, -1) 22 -(55, 24, -1) 23 -(55, 25, -1) 24 -(55, 26, -1) 25 -(55, 27, -1) 26 -(55, 28, -1) 27 -(55, 29, -1) 28 -(55, 30, -1) 29 -(55, 31, -1) 30 -(55, 32, -1) 30 -(55, 33, -1) 31 -(55, 34, -1) 32 -(55, 35, -1) 33 -(55, 36, -1) 34 -(55, 37, -1) 35 -(55, 38, -1) 36 -(55, 39, -1) 37 -(55, 62, -1) 37 -(55, 63, -1) 36 -(55, 64, -1) 35 -(55, 65, -1) 34 -(55, 66, -1) 33 -(55, 67, -1) 32 -(55, 68, -1) 31 -(55, 69, -1) 30 -(55, 70, -1) 30 -(55, 71, -1) 29 -(55, 72, -1) 28 -(55, 73, -1) 27 -(55, 74, -1) 26 -(55, 75, -1) 25 -(55, 76, -1) 24 -(55, 77, -1) 23 -(55, 78, -1) 22 -(55, 79, -1) 21 -(55, 80, -1) 20 -(55, 81, -1) 19 -(55, 82, -1) 18 -(55, 83, -1) 17 -(55, 84, -1) 16 -(55, 85, -1) 15 -(55, 86, -1) 14 -(55, 87, -1) 13 -(55, 88, -1) 12 -(55, 89, -1) 11 -(55, 90, -1) 10 -(55, 91, -1) 9 -(55, 92, -1) 8 -(55, 93, -1) 7 -(55, 94, -1) 6 -(55, 95, -1) 5 -(55, 96, -1) 4 -(55, 97, -1) 3 -(55, 98, -1) 2 -(55, 99, -1) 1 -(55, 100, -1) 0 -(56, 1, -1) 0 -(56, 2, -1) 1 -(56, 3, -1) 2 -(56, 4, -1) 3 -(56, 5, -1) 4 -(56, 6, -1) 5 -(56, 7, -1) 6 -(56, 8, -1) 7 -(56, 9, -1) 8 -(56, 10, -1) 9 -(56, 11, -1) 10 -(56, 12, -1) 11 -(56, 13, -1) 12 -(56, 14, -1) 13 -(56, 15, -1) 14 -(56, 16, -1) 15 -(56, 17, -1) 16 -(56, 18, -1) 17 -(56, 19, -1) 18 -(56, 20, -1) 19 -(56, 21, -1) 20 -(56, 22, -1) 21 -(56, 23, -1) 22 -(56, 24, -1) 23 -(56, 25, -1) 23 -(56, 26, -1) 24 -(56, 27, -1) 25 -(56, 28, -1) 26 -(56, 29, -1) 27 -(56, 30, -1) 28 -(56, 31, -1) 29 -(56, 32, -1) 30 -(56, 33, -1) 31 -(56, 34, -1) 32 -(56, 35, -1) 33 -(56, 36, -1) 34 -(56, 37, -1) 35 -(56, 38, -1) 36 -(56, 39, -1) 37 -(56, 40, -1) 38 -(56, 61, -1) 38 -(56, 62, -1) 37 -(56, 63, -1) 36 -(56, 64, -1) 35 -(56, 65, -1) 34 -(56, 66, -1) 33 -(56, 67, -1) 32 -(56, 68, -1) 31 -(56, 69, -1) 30 -(56, 70, -1) 29 -(56, 71, -1) 28 -(56, 72, -1) 27 -(56, 73, -1) 26 -(56, 74, -1) 25 -(56, 75, -1) 24 -(56, 76, -1) 23 -(56, 77, -1) 23 -(56, 78, -1) 22 -(56, 79, -1) 21 -(56, 80, -1) 20 -(56, 81, -1) 19 -(56, 82, -1) 18 -(56, 83, -1) 17 -(56, 84, -1) 16 -(56, 85, -1) 15 -(56, 86, -1) 14 -(56, 87, -1) 13 -(56, 88, -1) 12 -(56, 89, -1) 11 -(56, 90, -1) 10 -(56, 91, -1) 9 -(56, 92, -1) 8 -(56, 93, -1) 7 -(56, 94, -1) 6 -(56, 95, -1) 5 -(56, 96, -1) 4 -(56, 97, -1) 3 -(56, 98, -1) 2 -(56, 99, -1) 1 -(56, 100, -1) 0 -(57, 1, -1) 0 -(57, 2, -1) 1 -(57, 3, -1) 2 -(57, 4, -1) 3 -(57, 5, -1) 4 -(57, 6, -1) 5 -(57, 7, -1) 6 -(57, 8, -1) 7 -(57, 9, -1) 8 -(57, 10, -1) 9 -(57, 11, -1) 10 -(57, 12, -1) 11 -(57, 13, -1) 12 -(57, 14, -1) 13 -(57, 15, -1) 14 -(57, 16, -1) 14 -(57, 17, -1) 15 -(57, 18, -1) 16 -(57, 19, -1) 17 -(57, 20, -1) 18 -(57, 21, -1) 19 -(57, 22, -1) 20 -(57, 23, -1) 21 -(57, 24, -1) 22 -(57, 25, -1) 23 -(57, 26, -1) 24 -(57, 27, -1) 25 -(57, 28, -1) 26 -(57, 29, -1) 27 -(57, 30, -1) 28 -(57, 31, -1) 29 -(57, 32, -1) 30 -(57, 33, -1) 31 -(57, 34, -1) 32 -(57, 35, -1) 33 -(57, 36, -1) 34 -(57, 37, -1) 35 -(57, 38, -1) 35 -(57, 39, -1) 36 -(57, 40, -1) 37 -(57, 61, -1) 37 -(57, 62, -1) 36 -(57, 63, -1) 35 -(57, 64, -1) 35 -(57, 65, -1) 34 -(57, 66, -1) 33 -(57, 67, -1) 32 -(57, 68, -1) 31 -(57, 69, -1) 30 -(57, 70, -1) 29 -(57, 71, -1) 28 -(57, 72, -1) 27 -(57, 73, -1) 26 -(57, 74, -1) 25 -(57, 75, -1) 24 -(57, 76, -1) 23 -(57, 77, -1) 22 -(57, 78, -1) 21 -(57, 79, -1) 20 -(57, 80, -1) 19 -(57, 81, -1) 18 -(57, 82, -1) 17 -(57, 83, -1) 16 -(57, 84, -1) 15 -(57, 85, -1) 14 -(57, 86, -1) 14 -(57, 87, -1) 13 -(57, 88, -1) 12 -(57, 89, -1) 11 -(57, 90, -1) 10 -(57, 91, -1) 9 -(57, 92, -1) 8 -(57, 93, -1) 7 -(57, 94, -1) 6 -(57, 95, -1) 5 -(57, 96, -1) 4 -(57, 97, -1) 3 -(57, 98, -1) 2 -(57, 99, -1) 1 -(57, 100, -1) 0 -(58, 1, -1) 0 -(58, 2, -1) 1 -(58, 3, -1) 2 -(58, 4, -1) 3 -(58, 5, -1) 4 -(58, 6, -1) 4 -(58, 7, -1) 5 -(58, 8, -1) 6 -(58, 9, -1) 7 -(58, 10, -1) 8 -(58, 11, -1) 9 -(58, 12, -1) 10 -(58, 13, -1) 11 -(58, 14, -1) 12 -(58, 15, -1) 13 -(58, 16, -1) 14 -(58, 17, -1) 15 -(58, 18, -1) 16 -(58, 19, -1) 17 -(58, 20, -1) 18 -(58, 21, -1) 19 -(58, 22, -1) 20 -(58, 23, -1) 21 -(58, 24, -1) 22 -(58, 25, -1) 23 -(58, 26, -1) 24 -(58, 27, -1) 25 -(58, 28, -1) 26 -(58, 29, -1) 27 -(58, 30, -1) 28 -(58, 31, -1) 29 -(58, 32, -1) 30 -(58, 33, -1) 30 -(58, 34, -1) 31 -(58, 35, -1) 32 -(58, 36, -1) 33 -(58, 37, -1) 34 -(58, 38, -1) 35 -(58, 39, -1) 36 -(58, 40, -1) 37 -(58, 41, -1) 37 -(58, 60, -1) 37 -(58, 61, -1) 37 -(58, 62, -1) 36 -(58, 63, -1) 35 -(58, 64, -1) 34 -(58, 65, -1) 33 -(58, 66, -1) 32 -(58, 67, -1) 31 -(58, 68, -1) 30 -(58, 69, -1) 30 -(58, 70, -1) 29 -(58, 71, -1) 28 -(58, 72, -1) 27 -(58, 73, -1) 26 -(58, 74, -1) 25 -(58, 75, -1) 24 -(58, 76, -1) 23 -(58, 77, -1) 22 -(58, 78, -1) 21 -(58, 79, -1) 20 -(58, 80, -1) 19 -(58, 81, -1) 18 -(58, 82, -1) 17 -(58, 83, -1) 16 -(58, 84, -1) 15 -(58, 85, -1) 14 -(58, 86, -1) 13 -(58, 87, -1) 12 -(58, 88, -1) 11 -(58, 89, -1) 10 -(58, 90, -1) 9 -(58, 91, -1) 8 -(58, 92, -1) 7 -(58, 93, -1) 6 -(58, 94, -1) 5 -(58, 95, -1) 4 -(58, 96, -1) 4 -(58, 97, -1) 3 -(58, 98, -1) 2 -(58, 99, -1) 1 -(58, 100, -1) 0 -(59, 1, -1) 0 -(59, 2, -1) 0 -(59, 3, -1) 1 -(59, 4, -1) 2 -(59, 5, -1) 3 -(59, 6, -1) 4 -(59, 7, -1) 5 -(59, 8, -1) 6 -(59, 9, -1) 7 -(59, 10, -1) 8 -(59, 11, -1) 9 -(59, 12, -1) 10 -(59, 13, -1) 11 -(59, 14, -1) 12 -(59, 15, -1) 13 -(59, 16, -1) 14 -(59, 17, -1) 15 -(59, 18, -1) 16 -(59, 19, -1) 17 -(59, 20, -1) 18 -(59, 21, -1) 19 -(59, 22, -1) 20 -(59, 23, -1) 21 -(59, 24, -1) 22 -(59, 25, -1) 23 -(59, 26, -1) 24 -(59, 27, -1) 25 -(59, 28, -1) 25 -(59, 29, -1) 26 -(59, 30, -1) 27 -(59, 31, -1) 28 -(59, 32, -1) 29 -(59, 33, -1) 30 -(59, 34, -1) 31 -(59, 35, -1) 32 -(59, 36, -1) 33 -(59, 37, -1) 34 -(59, 38, -1) 34 -(59, 39, -1) 35 -(59, 40, -1) 36 -(59, 41, -1) 37 -(59, 42, -1) 38 -(59, 59, -1) 38 -(59, 60, -1) 37 -(59, 61, -1) 36 -(59, 62, -1) 35 -(59, 63, -1) 34 -(59, 64, -1) 34 -(59, 65, -1) 33 -(59, 66, -1) 32 -(59, 67, -1) 31 -(59, 68, -1) 30 -(59, 69, -1) 29 -(59, 70, -1) 28 -(59, 71, -1) 27 -(59, 72, -1) 26 -(59, 73, -1) 25 -(59, 74, -1) 25 -(59, 75, -1) 24 -(59, 76, -1) 23 -(59, 77, -1) 22 -(59, 78, -1) 21 -(59, 79, -1) 20 -(59, 80, -1) 19 -(59, 81, -1) 18 -(59, 82, -1) 17 -(59, 83, -1) 16 -(59, 84, -1) 15 -(59, 85, -1) 14 -(59, 86, -1) 13 -(59, 87, -1) 12 -(59, 88, -1) 11 -(59, 89, -1) 10 -(59, 90, -1) 9 -(59, 91, -1) 8 -(59, 92, -1) 7 -(59, 93, -1) 6 -(59, 94, -1) 5 -(59, 95, -1) 4 -(59, 96, -1) 3 -(59, 97, -1) 2 -(59, 98, -1) 1 -(59, 99, -1) 0 -(59, 100, -1) 0 -(60, 1, -1) 0 -(60, 2, -1) 0 -(60, 3, -1) 1 -(60, 4, -1) 2 -(60, 5, -1) 3 -(60, 6, -1) 4 -(60, 7, -1) 5 -(60, 8, -1) 6 -(60, 9, -1) 7 -(60, 10, -1) 8 -(60, 11, -1) 9 -(60, 12, -1) 10 -(60, 13, -1) 11 -(60, 14, -1) 12 -(60, 15, -1) 13 -(60, 16, -1) 14 -(60, 17, -1) 15 -(60, 18, -1) 16 -(60, 19, -1) 17 -(60, 20, -1) 18 -(60, 21, -1) 19 -(60, 22, -1) 20 -(60, 23, -1) 20 -(60, 24, -1) 21 -(60, 25, -1) 22 -(60, 26, -1) 23 -(60, 27, -1) 24 -(60, 28, -1) 25 -(60, 29, -1) 26 -(60, 30, -1) 27 -(60, 31, -1) 28 -(60, 32, -1) 29 -(60, 33, -1) 30 -(60, 34, -1) 30 -(60, 35, -1) 31 -(60, 36, -1) 32 -(60, 37, -1) 33 -(60, 38, -1) 34 -(60, 39, -1) 35 -(60, 40, -1) 35 -(60, 41, -1) 36 -(60, 42, -1) 37 -(60, 43, -1) 37 -(60, 58, -1) 37 -(60, 59, -1) 37 -(60, 60, -1) 36 -(60, 61, -1) 35 -(60, 62, -1) 35 -(60, 63, -1) 34 -(60, 64, -1) 33 -(60, 65, -1) 32 -(60, 66, -1) 31 -(60, 67, -1) 30 -(60, 68, -1) 30 -(60, 69, -1) 29 -(60, 70, -1) 28 -(60, 71, -1) 27 -(60, 72, -1) 26 -(60, 73, -1) 25 -(60, 74, -1) 24 -(60, 75, -1) 23 -(60, 76, -1) 22 -(60, 77, -1) 21 -(60, 78, -1) 20 -(60, 79, -1) 20 -(60, 80, -1) 19 -(60, 81, -1) 18 -(60, 82, -1) 17 -(60, 83, -1) 16 -(60, 84, -1) 15 -(60, 85, -1) 14 -(60, 86, -1) 13 -(60, 87, -1) 12 -(60, 88, -1) 11 -(60, 89, -1) 10 -(60, 90, -1) 9 -(60, 91, -1) 8 -(60, 92, -1) 7 -(60, 93, -1) 6 -(60, 94, -1) 5 -(60, 95, -1) 4 -(60, 96, -1) 3 -(60, 97, -1) 2 -(60, 98, -1) 1 -(60, 99, -1) 0 -(60, 100, -1) 0 -(61, 4, -1) 2 -(61, 5, -1) 3 -(61, 6, -1) 4 -(61, 7, -1) 5 -(61, 8, -1) 6 -(61, 9, -1) 7 -(61, 10, -1) 8 -(61, 11, -1) 9 -(61, 12, -1) 10 -(61, 13, -1) 11 -(61, 14, -1) 12 -(61, 15, -1) 13 -(61, 16, -1) 14 -(61, 17, -1) 15 -(61, 18, -1) 16 -(61, 19, -1) 16 -(61, 20, -1) 17 -(61, 21, -1) 18 -(61, 22, -1) 19 -(61, 23, -1) 20 -(61, 24, -1) 21 -(61, 25, -1) 22 -(61, 26, -1) 23 -(61, 27, -1) 24 -(61, 28, -1) 25 -(61, 29, -1) 26 -(61, 30, -1) 27 -(61, 31, -1) 27 -(61, 32, -1) 28 -(61, 33, -1) 29 -(61, 34, -1) 30 -(61, 35, -1) 31 -(61, 36, -1) 32 -(61, 37, -1) 32 -(61, 38, -1) 33 -(61, 39, -1) 34 -(61, 40, -1) 35 -(61, 41, -1) 35 -(61, 42, -1) 36 -(61, 43, -1) 37 -(61, 44, -1) 37 -(61, 45, -1) 38 -(61, 56, -1) 38 -(61, 57, -1) 37 -(61, 58, -1) 37 -(61, 59, -1) 36 -(61, 60, -1) 35 -(61, 61, -1) 35 -(61, 62, -1) 34 -(61, 63, -1) 33 -(61, 64, -1) 32 -(61, 65, -1) 32 -(61, 66, -1) 31 -(61, 67, -1) 30 -(61, 68, -1) 29 -(61, 69, -1) 28 -(61, 70, -1) 27 -(61, 71, -1) 27 -(61, 72, -1) 26 -(61, 73, -1) 25 -(61, 74, -1) 24 -(61, 75, -1) 23 -(61, 76, -1) 22 -(61, 77, -1) 21 -(61, 78, -1) 20 -(61, 79, -1) 19 -(61, 80, -1) 18 -(61, 81, -1) 17 -(61, 82, -1) 16 -(61, 83, -1) 16 -(61, 84, -1) 15 -(61, 85, -1) 14 -(61, 86, -1) 13 -(61, 87, -1) 12 -(61, 88, -1) 11 -(61, 89, -1) 10 -(61, 90, -1) 9 -(61, 91, -1) 8 -(61, 92, -1) 7 -(61, 93, -1) 6 -(61, 94, -1) 5 -(61, 95, -1) 4 -(61, 96, -1) 3 -(61, 97, -1) 2 -(62, 4, -1) 2 -(62, 5, -1) 3 -(62, 6, -1) 4 -(62, 7, -1) 5 -(62, 8, -1) 6 -(62, 9, -1) 7 -(62, 10, -1) 8 -(62, 11, -1) 9 -(62, 12, -1) 9 -(62, 13, -1) 10 -(62, 14, -1) 11 -(62, 15, -1) 12 -(62, 16, -1) 13 -(62, 17, -1) 14 -(62, 18, -1) 15 -(62, 19, -1) 16 -(62, 20, -1) 17 -(62, 21, -1) 18 -(62, 22, -1) 19 -(62, 23, -1) 20 -(62, 24, -1) 21 -(62, 25, -1) 22 -(62, 26, -1) 23 -(62, 27, -1) 23 -(62, 28, -1) 24 -(62, 29, -1) 25 -(62, 30, -1) 26 -(62, 31, -1) 27 -(62, 32, -1) 28 -(62, 33, -1) 29 -(62, 34, -1) 29 -(62, 35, -1) 30 -(62, 36, -1) 31 -(62, 37, -1) 32 -(62, 38, -1) 33 -(62, 39, -1) 33 -(62, 40, -1) 34 -(62, 41, -1) 35 -(62, 42, -1) 35 -(62, 43, -1) 36 -(62, 44, -1) 36 -(62, 45, -1) 37 -(62, 46, -1) 37 -(62, 47, -1) 37 -(62, 48, -1) 38 -(62, 49, -1) 38 -(62, 50, -1) 38 -(62, 51, -1) 38 -(62, 52, -1) 38 -(62, 53, -1) 38 -(62, 54, -1) 37 -(62, 55, -1) 37 -(62, 56, -1) 37 -(62, 57, -1) 36 -(62, 58, -1) 36 -(62, 59, -1) 35 -(62, 60, -1) 35 -(62, 61, -1) 34 -(62, 62, -1) 33 -(62, 63, -1) 33 -(62, 64, -1) 32 -(62, 65, -1) 31 -(62, 66, -1) 30 -(62, 67, -1) 29 -(62, 68, -1) 29 -(62, 69, -1) 28 -(62, 70, -1) 27 -(62, 71, -1) 26 -(62, 72, -1) 25 -(62, 73, -1) 24 -(62, 74, -1) 23 -(62, 75, -1) 23 -(62, 76, -1) 22 -(62, 77, -1) 21 -(62, 78, -1) 20 -(62, 79, -1) 19 -(62, 80, -1) 18 -(62, 81, -1) 17 -(62, 82, -1) 16 -(62, 83, -1) 15 -(62, 84, -1) 14 -(62, 85, -1) 13 -(62, 86, -1) 12 -(62, 87, -1) 11 -(62, 88, -1) 10 -(62, 89, -1) 9 -(62, 90, -1) 9 -(62, 91, -1) 8 -(62, 92, -1) 7 -(62, 93, -1) 6 -(62, 94, -1) 5 -(62, 95, -1) 4 -(62, 96, -1) 3 -(62, 97, -1) 2 -(63, 4, -1) 2 -(63, 5, -1) 3 -(63, 6, -1) 3 -(63, 7, -1) 4 -(63, 8, -1) 5 -(63, 9, -1) 6 -(63, 10, -1) 7 -(63, 11, -1) 8 -(63, 12, -1) 9 -(63, 13, -1) 10 -(63, 14, -1) 11 -(63, 15, -1) 12 -(63, 16, -1) 13 -(63, 17, -1) 14 -(63, 18, -1) 15 -(63, 19, -1) 16 -(63, 20, -1) 17 -(63, 21, -1) 18 -(63, 22, -1) 18 -(63, 23, -1) 19 -(63, 24, -1) 20 -(63, 25, -1) 21 -(63, 26, -1) 22 -(63, 27, -1) 23 -(63, 28, -1) 24 -(63, 29, -1) 25 -(63, 30, -1) 26 -(63, 31, -1) 26 -(63, 32, -1) 27 -(63, 33, -1) 28 -(63, 34, -1) 29 -(63, 35, -1) 30 -(63, 36, -1) 30 -(63, 37, -1) 31 -(63, 38, -1) 32 -(63, 39, -1) 33 -(63, 40, -1) 33 -(63, 41, -1) 34 -(63, 42, -1) 34 -(63, 43, -1) 35 -(63, 44, -1) 35 -(63, 45, -1) 36 -(63, 46, -1) 36 -(63, 47, -1) 37 -(63, 48, -1) 37 -(63, 49, -1) 37 -(63, 50, -1) 37 -(63, 51, -1) 37 -(63, 52, -1) 37 -(63, 53, -1) 37 -(63, 54, -1) 37 -(63, 55, -1) 36 -(63, 56, -1) 36 -(63, 57, -1) 35 -(63, 58, -1) 35 -(63, 59, -1) 34 -(63, 60, -1) 34 -(63, 61, -1) 33 -(63, 62, -1) 33 -(63, 63, -1) 32 -(63, 64, -1) 31 -(63, 65, -1) 30 -(63, 66, -1) 30 -(63, 67, -1) 29 -(63, 68, -1) 28 -(63, 69, -1) 27 -(63, 70, -1) 26 -(63, 71, -1) 26 -(63, 72, -1) 25 -(63, 73, -1) 24 -(63, 74, -1) 23 -(63, 75, -1) 22 -(63, 76, -1) 21 -(63, 77, -1) 20 -(63, 78, -1) 19 -(63, 79, -1) 18 -(63, 80, -1) 18 -(63, 81, -1) 17 -(63, 82, -1) 16 -(63, 83, -1) 15 -(63, 84, -1) 14 -(63, 85, -1) 13 -(63, 86, -1) 12 -(63, 87, -1) 11 -(63, 88, -1) 10 -(63, 89, -1) 9 -(63, 90, -1) 8 -(63, 91, -1) 7 -(63, 92, -1) 6 -(63, 93, -1) 5 -(63, 94, -1) 4 -(63, 95, -1) 3 -(63, 96, -1) 3 -(63, 97, -1) 2 -(64, 4, -1) 1 -(64, 5, -1) 2 -(64, 6, -1) 3 -(64, 7, -1) 4 -(64, 8, -1) 5 -(64, 9, -1) 6 -(64, 10, -1) 7 -(64, 11, -1) 8 -(64, 12, -1) 9 -(64, 13, -1) 10 -(64, 14, -1) 11 -(64, 15, -1) 12 -(64, 16, -1) 13 -(64, 17, -1) 14 -(64, 18, -1) 14 -(64, 19, -1) 15 -(64, 20, -1) 16 -(64, 21, -1) 17 -(64, 22, -1) 18 -(64, 23, -1) 19 -(64, 24, -1) 20 -(64, 25, -1) 21 -(64, 26, -1) 22 -(64, 27, -1) 22 -(64, 28, -1) 23 -(64, 29, -1) 24 -(64, 30, -1) 25 -(64, 31, -1) 26 -(64, 32, -1) 27 -(64, 33, -1) 27 -(64, 34, -1) 28 -(64, 35, -1) 29 -(64, 36, -1) 30 -(64, 37, -1) 30 -(64, 38, -1) 31 -(64, 39, -1) 32 -(64, 40, -1) 32 -(64, 41, -1) 33 -(64, 42, -1) 34 -(64, 43, -1) 34 -(64, 44, -1) 35 -(64, 45, -1) 35 -(64, 46, -1) 35 -(64, 47, -1) 36 -(64, 48, -1) 36 -(64, 49, -1) 36 -(64, 50, -1) 36 -(64, 51, -1) 36 -(64, 52, -1) 36 -(64, 53, -1) 36 -(64, 54, -1) 36 -(64, 55, -1) 35 -(64, 56, -1) 35 -(64, 57, -1) 35 -(64, 58, -1) 34 -(64, 59, -1) 34 -(64, 60, -1) 33 -(64, 61, -1) 32 -(64, 62, -1) 32 -(64, 63, -1) 31 -(64, 64, -1) 30 -(64, 65, -1) 30 -(64, 66, -1) 29 -(64, 67, -1) 28 -(64, 68, -1) 27 -(64, 69, -1) 27 -(64, 70, -1) 26 -(64, 71, -1) 25 -(64, 72, -1) 24 -(64, 73, -1) 23 -(64, 74, -1) 22 -(64, 75, -1) 22 -(64, 76, -1) 21 -(64, 77, -1) 20 -(64, 78, -1) 19 -(64, 79, -1) 18 -(64, 80, -1) 17 -(64, 81, -1) 16 -(64, 82, -1) 15 -(64, 83, -1) 14 -(64, 84, -1) 14 -(64, 85, -1) 13 -(64, 86, -1) 12 -(64, 87, -1) 11 -(64, 88, -1) 10 -(64, 89, -1) 9 -(64, 90, -1) 8 -(64, 91, -1) 7 -(64, 92, -1) 6 -(64, 93, -1) 5 -(64, 94, -1) 4 -(64, 95, -1) 3 -(64, 96, -1) 2 -(64, 97, -1) 1 -(65, 4, -1) 1 -(65, 5, -1) 2 -(65, 6, -1) 3 -(65, 7, -1) 4 -(65, 8, -1) 5 -(65, 9, -1) 6 -(65, 10, -1) 7 -(65, 11, -1) 8 -(65, 12, -1) 8 -(65, 13, -1) 9 -(65, 14, -1) 10 -(65, 15, -1) 11 -(65, 16, -1) 12 -(65, 17, -1) 13 -(65, 18, -1) 14 -(65, 19, -1) 15 -(65, 20, -1) 16 -(65, 21, -1) 17 -(65, 22, -1) 18 -(65, 23, -1) 19 -(65, 24, -1) 19 -(65, 25, -1) 20 -(65, 26, -1) 21 -(65, 27, -1) 22 -(65, 28, -1) 23 -(65, 29, -1) 24 -(65, 30, -1) 24 -(65, 31, -1) 25 -(65, 32, -1) 26 -(65, 33, -1) 27 -(65, 34, -1) 28 -(65, 35, -1) 28 -(65, 36, -1) 29 -(65, 37, -1) 30 -(65, 38, -1) 30 -(65, 39, -1) 31 -(65, 40, -1) 32 -(65, 41, -1) 32 -(65, 42, -1) 33 -(65, 43, -1) 33 -(65, 44, -1) 34 -(65, 45, -1) 34 -(65, 46, -1) 34 -(65, 47, -1) 35 -(65, 48, -1) 35 -(65, 49, -1) 35 -(65, 50, -1) 35 -(65, 51, -1) 35 -(65, 52, -1) 35 -(65, 53, -1) 35 -(65, 54, -1) 35 -(65, 55, -1) 34 -(65, 56, -1) 34 -(65, 57, -1) 34 -(65, 58, -1) 33 -(65, 59, -1) 33 -(65, 60, -1) 32 -(65, 61, -1) 32 -(65, 62, -1) 31 -(65, 63, -1) 30 -(65, 64, -1) 30 -(65, 65, -1) 29 -(65, 66, -1) 28 -(65, 67, -1) 28 -(65, 68, -1) 27 -(65, 69, -1) 26 -(65, 70, -1) 25 -(65, 71, -1) 24 -(65, 72, -1) 24 -(65, 73, -1) 23 -(65, 74, -1) 22 -(65, 75, -1) 21 -(65, 76, -1) 20 -(65, 77, -1) 19 -(65, 78, -1) 19 -(65, 79, -1) 18 -(65, 80, -1) 17 -(65, 81, -1) 16 -(65, 82, -1) 15 -(65, 83, -1) 14 -(65, 84, -1) 13 -(65, 85, -1) 12 -(65, 86, -1) 11 -(65, 87, -1) 10 -(65, 88, -1) 9 -(65, 89, -1) 8 -(65, 90, -1) 8 -(65, 91, -1) 7 -(65, 92, -1) 6 -(65, 93, -1) 5 -(65, 94, -1) 4 -(65, 95, -1) 3 -(65, 96, -1) 2 -(65, 97, -1) 1 -(66, 6, -1) 3 -(66, 7, -1) 4 -(66, 8, -1) 5 -(66, 9, -1) 6 -(66, 10, -1) 6 -(66, 11, -1) 7 -(66, 12, -1) 8 -(66, 13, -1) 9 -(66, 14, -1) 10 -(66, 15, -1) 11 -(66, 16, -1) 12 -(66, 17, -1) 13 -(66, 18, -1) 14 -(66, 19, -1) 15 -(66, 20, -1) 16 -(66, 21, -1) 16 -(66, 22, -1) 17 -(66, 23, -1) 18 -(66, 24, -1) 19 -(66, 25, -1) 20 -(66, 26, -1) 21 -(66, 27, -1) 21 -(66, 28, -1) 22 -(66, 29, -1) 23 -(66, 30, -1) 24 -(66, 31, -1) 25 -(66, 32, -1) 25 -(66, 33, -1) 26 -(66, 34, -1) 27 -(66, 35, -1) 28 -(66, 36, -1) 28 -(66, 37, -1) 29 -(66, 38, -1) 30 -(66, 39, -1) 30 -(66, 40, -1) 31 -(66, 41, -1) 31 -(66, 42, -1) 32 -(66, 43, -1) 32 -(66, 44, -1) 33 -(66, 45, -1) 33 -(66, 46, -1) 33 -(66, 47, -1) 34 -(66, 48, -1) 34 -(66, 49, -1) 34 -(66, 50, -1) 34 -(66, 51, -1) 34 -(66, 52, -1) 34 -(66, 53, -1) 34 -(66, 54, -1) 34 -(66, 55, -1) 33 -(66, 56, -1) 33 -(66, 57, -1) 33 -(66, 58, -1) 32 -(66, 59, -1) 32 -(66, 60, -1) 31 -(66, 61, -1) 31 -(66, 62, -1) 30 -(66, 63, -1) 30 -(66, 64, -1) 29 -(66, 65, -1) 28 -(66, 66, -1) 28 -(66, 67, -1) 27 -(66, 68, -1) 26 -(66, 69, -1) 25 -(66, 70, -1) 25 -(66, 71, -1) 24 -(66, 72, -1) 23 -(66, 73, -1) 22 -(66, 74, -1) 21 -(66, 75, -1) 21 -(66, 76, -1) 20 -(66, 77, -1) 19 -(66, 78, -1) 18 -(66, 79, -1) 17 -(66, 80, -1) 16 -(66, 81, -1) 16 -(66, 82, -1) 15 -(66, 83, -1) 14 -(66, 84, -1) 13 -(66, 85, -1) 12 -(66, 86, -1) 11 -(66, 87, -1) 10 -(66, 88, -1) 9 -(66, 89, -1) 8 -(66, 90, -1) 7 -(66, 91, -1) 6 -(66, 92, -1) 6 -(66, 93, -1) 5 -(66, 94, -1) 4 -(66, 95, -1) 3 -(67, 6, -1) 2 -(67, 7, -1) 3 -(67, 8, -1) 4 -(67, 9, -1) 5 -(67, 10, -1) 6 -(67, 11, -1) 7 -(67, 12, -1) 8 -(67, 13, -1) 9 -(67, 14, -1) 10 -(67, 15, -1) 11 -(67, 16, -1) 11 -(67, 17, -1) 12 -(67, 18, -1) 13 -(67, 19, -1) 14 -(67, 20, -1) 15 -(67, 21, -1) 16 -(67, 22, -1) 17 -(67, 23, -1) 18 -(67, 24, -1) 18 -(67, 25, -1) 19 -(67, 26, -1) 20 -(67, 27, -1) 21 -(67, 28, -1) 22 -(67, 29, -1) 23 -(67, 30, -1) 23 -(67, 31, -1) 24 -(67, 32, -1) 25 -(67, 33, -1) 26 -(67, 34, -1) 26 -(67, 35, -1) 27 -(67, 36, -1) 28 -(67, 37, -1) 28 -(67, 38, -1) 29 -(67, 39, -1) 29 -(67, 40, -1) 30 -(67, 41, -1) 30 -(67, 42, -1) 31 -(67, 43, -1) 31 -(67, 44, -1) 32 -(67, 45, -1) 32 -(67, 46, -1) 32 -(67, 47, -1) 33 -(67, 48, -1) 33 -(67, 49, -1) 33 -(67, 50, -1) 33 -(67, 51, -1) 33 -(67, 52, -1) 33 -(67, 53, -1) 33 -(67, 54, -1) 33 -(67, 55, -1) 32 -(67, 56, -1) 32 -(67, 57, -1) 32 -(67, 58, -1) 31 -(67, 59, -1) 31 -(67, 60, -1) 30 -(67, 61, -1) 30 -(67, 62, -1) 29 -(67, 63, -1) 29 -(67, 64, -1) 28 -(67, 65, -1) 28 -(67, 66, -1) 27 -(67, 67, -1) 26 -(67, 68, -1) 26 -(67, 69, -1) 25 -(67, 70, -1) 24 -(67, 71, -1) 23 -(67, 72, -1) 23 -(67, 73, -1) 22 -(67, 74, -1) 21 -(67, 75, -1) 20 -(67, 76, -1) 19 -(67, 77, -1) 18 -(67, 78, -1) 18 -(67, 79, -1) 17 -(67, 80, -1) 16 -(67, 81, -1) 15 -(67, 82, -1) 14 -(67, 83, -1) 13 -(67, 84, -1) 12 -(67, 85, -1) 11 -(67, 86, -1) 11 -(67, 87, -1) 10 -(67, 88, -1) 9 -(67, 89, -1) 8 -(67, 90, -1) 7 -(67, 91, -1) 6 -(67, 92, -1) 5 -(67, 93, -1) 4 -(67, 94, -1) 3 -(67, 95, -1) 2 -(68, 6, -1) 2 -(68, 7, -1) 3 -(68, 8, -1) 4 -(68, 9, -1) 5 -(68, 10, -1) 6 -(68, 11, -1) 7 -(68, 12, -1) 7 -(68, 13, -1) 8 -(68, 14, -1) 9 -(68, 15, -1) 10 -(68, 16, -1) 11 -(68, 17, -1) 12 -(68, 18, -1) 13 -(68, 19, -1) 14 -(68, 20, -1) 15 -(68, 21, -1) 15 -(68, 22, -1) 16 -(68, 23, -1) 17 -(68, 24, -1) 18 -(68, 25, -1) 19 -(68, 26, -1) 20 -(68, 27, -1) 20 -(68, 28, -1) 21 -(68, 29, -1) 22 -(68, 30, -1) 23 -(68, 31, -1) 23 -(68, 32, -1) 24 -(68, 33, -1) 25 -(68, 34, -1) 26 -(68, 35, -1) 26 -(68, 36, -1) 27 -(68, 37, -1) 27 -(68, 38, -1) 28 -(68, 39, -1) 29 -(68, 40, -1) 29 -(68, 41, -1) 30 -(68, 42, -1) 30 -(68, 43, -1) 30 -(68, 44, -1) 31 -(68, 45, -1) 31 -(68, 46, -1) 31 -(68, 47, -1) 32 -(68, 48, -1) 32 -(68, 49, -1) 32 -(68, 50, -1) 32 -(68, 51, -1) 32 -(68, 52, -1) 32 -(68, 53, -1) 32 -(68, 54, -1) 32 -(68, 55, -1) 31 -(68, 56, -1) 31 -(68, 57, -1) 31 -(68, 58, -1) 30 -(68, 59, -1) 30 -(68, 60, -1) 30 -(68, 61, -1) 29 -(68, 62, -1) 29 -(68, 63, -1) 28 -(68, 64, -1) 27 -(68, 65, -1) 27 -(68, 66, -1) 26 -(68, 67, -1) 26 -(68, 68, -1) 25 -(68, 69, -1) 24 -(68, 70, -1) 23 -(68, 71, -1) 23 -(68, 72, -1) 22 -(68, 73, -1) 21 -(68, 74, -1) 20 -(68, 75, -1) 20 -(68, 76, -1) 19 -(68, 77, -1) 18 -(68, 78, -1) 17 -(68, 79, -1) 16 -(68, 80, -1) 15 -(68, 81, -1) 15 -(68, 82, -1) 14 -(68, 83, -1) 13 -(68, 84, -1) 12 -(68, 85, -1) 11 -(68, 86, -1) 10 -(68, 87, -1) 9 -(68, 88, -1) 8 -(68, 89, -1) 7 -(68, 90, -1) 7 -(68, 91, -1) 6 -(68, 92, -1) 5 -(68, 93, -1) 4 -(68, 94, -1) 3 -(68, 95, -1) 2 -(69, 6, -1) 2 -(69, 7, -1) 2 -(69, 8, -1) 3 -(69, 9, -1) 4 -(69, 10, -1) 5 -(69, 11, -1) 6 -(69, 12, -1) 7 -(69, 13, -1) 8 -(69, 14, -1) 9 -(69, 15, -1) 10 -(69, 16, -1) 11 -(69, 17, -1) 11 -(69, 18, -1) 12 -(69, 19, -1) 13 -(69, 20, -1) 14 -(69, 21, -1) 15 -(69, 22, -1) 16 -(69, 23, -1) 17 -(69, 24, -1) 17 -(69, 25, -1) 18 -(69, 26, -1) 19 -(69, 27, -1) 20 -(69, 28, -1) 20 -(69, 29, -1) 21 -(69, 30, -1) 22 -(69, 31, -1) 23 -(69, 32, -1) 23 -(69, 33, -1) 24 -(69, 34, -1) 25 -(69, 35, -1) 25 -(69, 36, -1) 26 -(69, 37, -1) 27 -(69, 38, -1) 27 -(69, 39, -1) 28 -(69, 40, -1) 28 -(69, 41, -1) 29 -(69, 42, -1) 29 -(69, 43, -1) 30 -(69, 44, -1) 30 -(69, 45, -1) 30 -(69, 46, -1) 30 -(69, 47, -1) 31 -(69, 48, -1) 31 -(69, 49, -1) 31 -(69, 50, -1) 31 -(69, 51, -1) 31 -(69, 52, -1) 31 -(69, 53, -1) 31 -(69, 54, -1) 31 -(69, 55, -1) 30 -(69, 56, -1) 30 -(69, 57, -1) 30 -(69, 58, -1) 30 -(69, 59, -1) 29 -(69, 60, -1) 29 -(69, 61, -1) 28 -(69, 62, -1) 28 -(69, 63, -1) 27 -(69, 64, -1) 27 -(69, 65, -1) 26 -(69, 66, -1) 25 -(69, 67, -1) 25 -(69, 68, -1) 24 -(69, 69, -1) 23 -(69, 70, -1) 23 -(69, 71, -1) 22 -(69, 72, -1) 21 -(69, 73, -1) 20 -(69, 74, -1) 20 -(69, 75, -1) 19 -(69, 76, -1) 18 -(69, 77, -1) 17 -(69, 78, -1) 17 -(69, 79, -1) 16 -(69, 80, -1) 15 -(69, 81, -1) 14 -(69, 82, -1) 13 -(69, 83, -1) 12 -(69, 84, -1) 11 -(69, 85, -1) 11 -(69, 86, -1) 10 -(69, 87, -1) 9 -(69, 88, -1) 8 -(69, 89, -1) 7 -(69, 90, -1) 6 -(69, 91, -1) 5 -(69, 92, -1) 4 -(69, 93, -1) 3 -(69, 94, -1) 2 -(69, 95, -1) 2 -(70, 6, -1) 1 -(70, 7, -1) 2 -(70, 8, -1) 3 -(70, 9, -1) 4 -(70, 10, -1) 5 -(70, 11, -1) 6 -(70, 12, -1) 7 -(70, 13, -1) 7 -(70, 14, -1) 8 -(70, 15, -1) 9 -(70, 16, -1) 10 -(70, 17, -1) 11 -(70, 18, -1) 12 -(70, 19, -1) 13 -(70, 20, -1) 13 -(70, 21, -1) 14 -(70, 22, -1) 15 -(70, 23, -1) 16 -(70, 24, -1) 17 -(70, 25, -1) 18 -(70, 26, -1) 18 -(70, 27, -1) 19 -(70, 28, -1) 20 -(70, 29, -1) 21 -(70, 30, -1) 21 -(70, 31, -1) 22 -(70, 32, -1) 23 -(70, 33, -1) 23 -(70, 34, -1) 24 -(70, 35, -1) 25 -(70, 36, -1) 25 -(70, 37, -1) 26 -(70, 38, -1) 26 -(70, 39, -1) 27 -(70, 40, -1) 27 -(70, 41, -1) 28 -(70, 42, -1) 28 -(70, 43, -1) 29 -(70, 44, -1) 29 -(70, 45, -1) 29 -(70, 46, -1) 30 -(70, 47, -1) 30 -(70, 48, -1) 30 -(70, 49, -1) 30 -(70, 50, -1) 30 -(70, 51, -1) 30 -(70, 52, -1) 30 -(70, 53, -1) 30 -(70, 54, -1) 30 -(70, 55, -1) 30 -(70, 56, -1) 29 -(70, 57, -1) 29 -(70, 58, -1) 29 -(70, 59, -1) 28 -(70, 60, -1) 28 -(70, 61, -1) 27 -(70, 62, -1) 27 -(70, 63, -1) 26 -(70, 64, -1) 26 -(70, 65, -1) 25 -(70, 66, -1) 25 -(70, 67, -1) 24 -(70, 68, -1) 23 -(70, 69, -1) 23 -(70, 70, -1) 22 -(70, 71, -1) 21 -(70, 72, -1) 21 -(70, 73, -1) 20 -(70, 74, -1) 19 -(70, 75, -1) 18 -(70, 76, -1) 18 -(70, 77, -1) 17 -(70, 78, -1) 16 -(70, 79, -1) 15 -(70, 80, -1) 14 -(70, 81, -1) 13 -(70, 82, -1) 13 -(70, 83, -1) 12 -(70, 84, -1) 11 -(70, 85, -1) 10 -(70, 86, -1) 9 -(70, 87, -1) 8 -(70, 88, -1) 7 -(70, 89, -1) 7 -(70, 90, -1) 6 -(70, 91, -1) 5 -(70, 92, -1) 4 -(70, 93, -1) 3 -(70, 94, -1) 2 -(70, 95, -1) 1 -(71, 6, -1) 1 -(71, 7, -1) 2 -(71, 8, -1) 3 -(71, 9, -1) 4 -(71, 10, -1) 5 -(71, 11, -1) 5 -(71, 12, -1) 6 -(71, 13, -1) 7 -(71, 14, -1) 8 -(71, 15, -1) 9 -(71, 16, -1) 10 -(71, 17, -1) 11 -(71, 18, -1) 11 -(71, 19, -1) 12 -(71, 20, -1) 13 -(71, 21, -1) 14 -(71, 22, -1) 15 -(71, 23, -1) 15 -(71, 24, -1) 16 -(71, 25, -1) 17 -(71, 26, -1) 18 -(71, 27, -1) 19 -(71, 28, -1) 19 -(71, 29, -1) 20 -(71, 30, -1) 21 -(71, 31, -1) 21 -(71, 32, -1) 22 -(71, 33, -1) 23 -(71, 34, -1) 23 -(71, 35, -1) 24 -(71, 36, -1) 24 -(71, 37, -1) 25 -(71, 38, -1) 26 -(71, 39, -1) 26 -(71, 40, -1) 27 -(71, 41, -1) 27 -(71, 42, -1) 27 -(71, 43, -1) 28 -(71, 44, -1) 28 -(71, 45, -1) 28 -(71, 46, -1) 29 -(71, 47, -1) 29 -(71, 48, -1) 29 -(71, 49, -1) 29 -(71, 50, -1) 29 -(71, 51, -1) 29 -(71, 52, -1) 29 -(71, 53, -1) 29 -(71, 54, -1) 29 -(71, 55, -1) 29 -(71, 56, -1) 28 -(71, 57, -1) 28 -(71, 58, -1) 28 -(71, 59, -1) 27 -(71, 60, -1) 27 -(71, 61, -1) 27 -(71, 62, -1) 26 -(71, 63, -1) 26 -(71, 64, -1) 25 -(71, 65, -1) 24 -(71, 66, -1) 24 -(71, 67, -1) 23 -(71, 68, -1) 23 -(71, 69, -1) 22 -(71, 70, -1) 21 -(71, 71, -1) 21 -(71, 72, -1) 20 -(71, 73, -1) 19 -(71, 74, -1) 19 -(71, 75, -1) 18 -(71, 76, -1) 17 -(71, 77, -1) 16 -(71, 78, -1) 15 -(71, 79, -1) 15 -(71, 80, -1) 14 -(71, 81, -1) 13 -(71, 82, -1) 12 -(71, 83, -1) 11 -(71, 84, -1) 11 -(71, 85, -1) 10 -(71, 86, -1) 9 -(71, 87, -1) 8 -(71, 88, -1) 7 -(71, 89, -1) 6 -(71, 90, -1) 5 -(71, 91, -1) 5 -(71, 92, -1) 4 -(71, 93, -1) 3 -(71, 94, -1) 2 -(71, 95, -1) 1 -(72, 6, -1) 1 -(72, 7, -1) 1 -(72, 8, -1) 2 -(72, 9, -1) 3 -(72, 10, -1) 4 -(72, 11, -1) 5 -(72, 12, -1) 6 -(72, 13, -1) 7 -(72, 14, -1) 7 -(72, 15, -1) 8 -(72, 16, -1) 9 -(72, 17, -1) 10 -(72, 18, -1) 11 -(72, 19, -1) 12 -(72, 20, -1) 12 -(72, 21, -1) 13 -(72, 22, -1) 14 -(72, 23, -1) 15 -(72, 24, -1) 16 -(72, 25, -1) 16 -(72, 26, -1) 17 -(72, 27, -1) 18 -(72, 28, -1) 19 -(72, 29, -1) 19 -(72, 30, -1) 20 -(72, 31, -1) 21 -(72, 32, -1) 21 -(72, 33, -1) 22 -(72, 34, -1) 23 -(72, 35, -1) 23 -(72, 36, -1) 24 -(72, 37, -1) 24 -(72, 38, -1) 25 -(72, 39, -1) 25 -(72, 40, -1) 26 -(72, 41, -1) 26 -(72, 42, -1) 26 -(72, 43, -1) 27 -(72, 44, -1) 27 -(72, 45, -1) 27 -(72, 46, -1) 28 -(72, 47, -1) 28 -(72, 48, -1) 28 -(72, 49, -1) 28 -(72, 50, -1) 28 -(72, 51, -1) 28 -(72, 52, -1) 28 -(72, 53, -1) 28 -(72, 54, -1) 28 -(72, 55, -1) 28 -(72, 56, -1) 27 -(72, 57, -1) 27 -(72, 58, -1) 27 -(72, 59, -1) 26 -(72, 60, -1) 26 -(72, 61, -1) 26 -(72, 62, -1) 25 -(72, 63, -1) 25 -(72, 64, -1) 24 -(72, 65, -1) 24 -(72, 66, -1) 23 -(72, 67, -1) 23 -(72, 68, -1) 22 -(72, 69, -1) 21 -(72, 70, -1) 21 -(72, 71, -1) 20 -(72, 72, -1) 19 -(72, 73, -1) 19 -(72, 74, -1) 18 -(72, 75, -1) 17 -(72, 76, -1) 16 -(72, 77, -1) 16 -(72, 78, -1) 15 -(72, 79, -1) 14 -(72, 80, -1) 13 -(72, 81, -1) 12 -(72, 82, -1) 12 -(72, 83, -1) 11 -(72, 84, -1) 10 -(72, 85, -1) 9 -(72, 86, -1) 8 -(72, 87, -1) 7 -(72, 88, -1) 7 -(72, 89, -1) 6 -(72, 90, -1) 5 -(72, 91, -1) 4 -(72, 92, -1) 3 -(72, 93, -1) 2 -(72, 94, -1) 1 -(72, 95, -1) 1 -(73, 6, -1) 0 -(73, 7, -1) 1 -(73, 8, -1) 2 -(73, 9, -1) 3 -(73, 10, -1) 4 -(73, 11, -1) 4 -(73, 12, -1) 5 -(73, 13, -1) 6 -(73, 14, -1) 7 -(73, 15, -1) 8 -(73, 16, -1) 9 -(73, 17, -1) 9 -(73, 18, -1) 10 -(73, 19, -1) 11 -(73, 20, -1) 12 -(73, 21, -1) 13 -(73, 22, -1) 13 -(73, 23, -1) 14 -(73, 24, -1) 15 -(73, 25, -1) 16 -(73, 26, -1) 16 -(73, 27, -1) 17 -(73, 28, -1) 18 -(73, 29, -1) 19 -(73, 30, -1) 19 -(73, 31, -1) 20 -(73, 32, -1) 20 -(73, 33, -1) 21 -(73, 34, -1) 22 -(73, 35, -1) 22 -(73, 36, -1) 23 -(73, 37, -1) 23 -(73, 38, -1) 24 -(73, 39, -1) 24 -(73, 40, -1) 25 -(73, 41, -1) 25 -(73, 42, -1) 25 -(73, 43, -1) 26 -(73, 44, -1) 26 -(73, 45, -1) 26 -(73, 46, -1) 27 -(73, 47, -1) 27 -(73, 48, -1) 27 -(73, 49, -1) 27 -(73, 50, -1) 27 -(73, 51, -1) 27 -(73, 52, -1) 27 -(73, 53, -1) 27 -(73, 54, -1) 27 -(73, 55, -1) 27 -(73, 56, -1) 26 -(73, 57, -1) 26 -(73, 58, -1) 26 -(73, 59, -1) 25 -(73, 60, -1) 25 -(73, 61, -1) 25 -(73, 62, -1) 24 -(73, 63, -1) 24 -(73, 64, -1) 23 -(73, 65, -1) 23 -(73, 66, -1) 22 -(73, 67, -1) 22 -(73, 68, -1) 21 -(73, 69, -1) 20 -(73, 70, -1) 20 -(73, 71, -1) 19 -(73, 72, -1) 19 -(73, 73, -1) 18 -(73, 74, -1) 17 -(73, 75, -1) 16 -(73, 76, -1) 16 -(73, 77, -1) 15 -(73, 78, -1) 14 -(73, 79, -1) 13 -(73, 80, -1) 13 -(73, 81, -1) 12 -(73, 82, -1) 11 -(73, 83, -1) 10 -(73, 84, -1) 9 -(73, 85, -1) 9 -(73, 86, -1) 8 -(73, 87, -1) 7 -(73, 88, -1) 6 -(73, 89, -1) 5 -(73, 90, -1) 4 -(73, 91, -1) 4 -(73, 92, -1) 3 -(73, 93, -1) 2 -(73, 94, -1) 1 -(73, 95, -1) 0 -(74, 6, -1) 0 -(74, 7, -1) 0 -(74, 8, -1) 1 -(74, 9, -1) 2 -(74, 10, -1) 3 -(74, 11, -1) 4 -(74, 12, -1) 5 -(74, 13, -1) 6 -(74, 14, -1) 6 -(74, 15, -1) 7 -(74, 16, -1) 8 -(74, 17, -1) 9 -(74, 18, -1) 10 -(74, 19, -1) 10 -(74, 20, -1) 11 -(74, 21, -1) 12 -(74, 22, -1) 13 -(74, 23, -1) 14 -(74, 24, -1) 14 -(74, 25, -1) 15 -(74, 26, -1) 16 -(74, 27, -1) 16 -(74, 28, -1) 17 -(74, 29, -1) 18 -(74, 30, -1) 18 -(74, 31, -1) 19 -(74, 32, -1) 20 -(74, 33, -1) 20 -(74, 34, -1) 21 -(74, 35, -1) 21 -(74, 36, -1) 22 -(74, 37, -1) 22 -(74, 38, -1) 23 -(74, 39, -1) 23 -(74, 40, -1) 24 -(74, 41, -1) 24 -(74, 42, -1) 25 -(74, 43, -1) 25 -(74, 44, -1) 25 -(74, 45, -1) 25 -(74, 46, -1) 26 -(74, 47, -1) 26 -(74, 48, -1) 26 -(74, 49, -1) 26 -(74, 50, -1) 26 -(74, 51, -1) 26 -(74, 52, -1) 26 -(74, 53, -1) 26 -(74, 54, -1) 26 -(74, 55, -1) 26 -(74, 56, -1) 25 -(74, 57, -1) 25 -(74, 58, -1) 25 -(74, 59, -1) 25 -(74, 60, -1) 24 -(74, 61, -1) 24 -(74, 62, -1) 23 -(74, 63, -1) 23 -(74, 64, -1) 22 -(74, 65, -1) 22 -(74, 66, -1) 21 -(74, 67, -1) 21 -(74, 68, -1) 20 -(74, 69, -1) 20 -(74, 70, -1) 19 -(74, 71, -1) 18 -(74, 72, -1) 18 -(74, 73, -1) 17 -(74, 74, -1) 16 -(74, 75, -1) 16 -(74, 76, -1) 15 -(74, 77, -1) 14 -(74, 78, -1) 14 -(74, 79, -1) 13 -(74, 80, -1) 12 -(74, 81, -1) 11 -(74, 82, -1) 10 -(74, 83, -1) 10 -(74, 84, -1) 9 -(74, 85, -1) 8 -(74, 86, -1) 7 -(74, 87, -1) 6 -(74, 88, -1) 6 -(74, 89, -1) 5 -(74, 90, -1) 4 -(74, 91, -1) 3 -(74, 92, -1) 2 -(74, 93, -1) 1 -(74, 94, -1) 0 -(74, 95, -1) 0 -(75, 6, -1) 0 -(75, 7, -1) 0 -(75, 8, -1) 1 -(75, 9, -1) 2 -(75, 10, -1) 3 -(75, 11, -1) 3 -(75, 12, -1) 4 -(75, 13, -1) 5 -(75, 14, -1) 6 -(75, 15, -1) 7 -(75, 16, -1) 7 -(75, 17, -1) 8 -(75, 18, -1) 9 -(75, 19, -1) 10 -(75, 20, -1) 11 -(75, 21, -1) 11 -(75, 22, -1) 12 -(75, 23, -1) 13 -(75, 24, -1) 14 -(75, 25, -1) 14 -(75, 26, -1) 15 -(75, 27, -1) 16 -(75, 28, -1) 16 -(75, 29, -1) 17 -(75, 30, -1) 18 -(75, 31, -1) 18 -(75, 32, -1) 19 -(75, 33, -1) 19 -(75, 34, -1) 20 -(75, 35, -1) 21 -(75, 36, -1) 21 -(75, 37, -1) 22 -(75, 38, -1) 22 -(75, 39, -1) 22 -(75, 40, -1) 23 -(75, 41, -1) 23 -(75, 42, -1) 24 -(75, 43, -1) 24 -(75, 44, -1) 24 -(75, 45, -1) 24 -(75, 46, -1) 25 -(75, 47, -1) 25 -(75, 48, -1) 25 -(75, 49, -1) 25 -(75, 50, -1) 25 -(75, 51, -1) 25 -(75, 52, -1) 25 -(75, 53, -1) 25 -(75, 54, -1) 25 -(75, 55, -1) 25 -(75, 56, -1) 24 -(75, 57, -1) 24 -(75, 58, -1) 24 -(75, 59, -1) 24 -(75, 60, -1) 23 -(75, 61, -1) 23 -(75, 62, -1) 22 -(75, 63, -1) 22 -(75, 64, -1) 22 -(75, 65, -1) 21 -(75, 66, -1) 21 -(75, 67, -1) 20 -(75, 68, -1) 19 -(75, 69, -1) 19 -(75, 70, -1) 18 -(75, 71, -1) 18 -(75, 72, -1) 17 -(75, 73, -1) 16 -(75, 74, -1) 16 -(75, 75, -1) 15 -(75, 76, -1) 14 -(75, 77, -1) 14 -(75, 78, -1) 13 -(75, 79, -1) 12 -(75, 80, -1) 11 -(75, 81, -1) 11 -(75, 82, -1) 10 -(75, 83, -1) 9 -(75, 84, -1) 8 -(75, 85, -1) 7 -(75, 86, -1) 7 -(75, 87, -1) 6 -(75, 88, -1) 5 -(75, 89, -1) 4 -(75, 90, -1) 3 -(75, 91, -1) 3 -(75, 92, -1) 2 -(75, 93, -1) 1 -(75, 94, -1) 0 -(75, 95, -1) 0 -(76, 9, -1) 1 -(76, 10, -1) 2 -(76, 11, -1) 3 -(76, 12, -1) 4 -(76, 13, -1) 5 -(76, 14, -1) 5 -(76, 15, -1) 6 -(76, 16, -1) 7 -(76, 17, -1) 8 -(76, 18, -1) 9 -(76, 19, -1) 9 -(76, 20, -1) 10 -(76, 21, -1) 11 -(76, 22, -1) 12 -(76, 23, -1) 12 -(76, 24, -1) 13 -(76, 25, -1) 14 -(76, 26, -1) 14 -(76, 27, -1) 15 -(76, 28, -1) 16 -(76, 29, -1) 16 -(76, 30, -1) 17 -(76, 31, -1) 18 -(76, 32, -1) 18 -(76, 33, -1) 19 -(76, 34, -1) 19 -(76, 35, -1) 20 -(76, 36, -1) 20 -(76, 37, -1) 21 -(76, 38, -1) 21 -(76, 39, -1) 22 -(76, 40, -1) 22 -(76, 41, -1) 22 -(76, 42, -1) 23 -(76, 43, -1) 23 -(76, 44, -1) 23 -(76, 45, -1) 23 -(76, 46, -1) 24 -(76, 47, -1) 24 -(76, 48, -1) 24 -(76, 49, -1) 24 -(76, 50, -1) 24 -(76, 51, -1) 24 -(76, 52, -1) 24 -(76, 53, -1) 24 -(76, 54, -1) 24 -(76, 55, -1) 24 -(76, 56, -1) 23 -(76, 57, -1) 23 -(76, 58, -1) 23 -(76, 59, -1) 23 -(76, 60, -1) 22 -(76, 61, -1) 22 -(76, 62, -1) 22 -(76, 63, -1) 21 -(76, 64, -1) 21 -(76, 65, -1) 20 -(76, 66, -1) 20 -(76, 67, -1) 19 -(76, 68, -1) 19 -(76, 69, -1) 18 -(76, 70, -1) 18 -(76, 71, -1) 17 -(76, 72, -1) 16 -(76, 73, -1) 16 -(76, 74, -1) 15 -(76, 75, -1) 14 -(76, 76, -1) 14 -(76, 77, -1) 13 -(76, 78, -1) 12 -(76, 79, -1) 12 -(76, 80, -1) 11 -(76, 81, -1) 10 -(76, 82, -1) 9 -(76, 83, -1) 9 -(76, 84, -1) 8 -(76, 85, -1) 7 -(76, 86, -1) 6 -(76, 87, -1) 5 -(76, 88, -1) 5 -(76, 89, -1) 4 -(76, 90, -1) 3 -(76, 91, -1) 2 -(76, 92, -1) 1 -(77, 9, -1) 1 -(77, 10, -1) 2 -(77, 11, -1) 2 -(77, 12, -1) 3 -(77, 13, -1) 4 -(77, 14, -1) 5 -(77, 15, -1) 6 -(77, 16, -1) 6 -(77, 17, -1) 7 -(77, 18, -1) 8 -(77, 19, -1) 9 -(77, 20, -1) 9 -(77, 21, -1) 10 -(77, 22, -1) 11 -(77, 23, -1) 12 -(77, 24, -1) 12 -(77, 25, -1) 13 -(77, 26, -1) 14 -(77, 27, -1) 14 -(77, 28, -1) 15 -(77, 29, -1) 16 -(77, 30, -1) 16 -(77, 31, -1) 17 -(77, 32, -1) 17 -(77, 33, -1) 18 -(77, 34, -1) 18 -(77, 35, -1) 19 -(77, 36, -1) 19 -(77, 37, -1) 20 -(77, 38, -1) 20 -(77, 39, -1) 21 -(77, 40, -1) 21 -(77, 41, -1) 21 -(77, 42, -1) 22 -(77, 43, -1) 22 -(77, 44, -1) 22 -(77, 45, -1) 22 -(77, 46, -1) 23 -(77, 47, -1) 23 -(77, 48, -1) 23 -(77, 49, -1) 23 -(77, 50, -1) 23 -(77, 51, -1) 23 -(77, 52, -1) 23 -(77, 53, -1) 23 -(77, 54, -1) 23 -(77, 55, -1) 23 -(77, 56, -1) 22 -(77, 57, -1) 22 -(77, 58, -1) 22 -(77, 59, -1) 22 -(77, 60, -1) 21 -(77, 61, -1) 21 -(77, 62, -1) 21 -(77, 63, -1) 20 -(77, 64, -1) 20 -(77, 65, -1) 19 -(77, 66, -1) 19 -(77, 67, -1) 18 -(77, 68, -1) 18 -(77, 69, -1) 17 -(77, 70, -1) 17 -(77, 71, -1) 16 -(77, 72, -1) 16 -(77, 73, -1) 15 -(77, 74, -1) 14 -(77, 75, -1) 14 -(77, 76, -1) 13 -(77, 77, -1) 12 -(77, 78, -1) 12 -(77, 79, -1) 11 -(77, 80, -1) 10 -(77, 81, -1) 9 -(77, 82, -1) 9 -(77, 83, -1) 8 -(77, 84, -1) 7 -(77, 85, -1) 6 -(77, 86, -1) 6 -(77, 87, -1) 5 -(77, 88, -1) 4 -(77, 89, -1) 3 -(77, 90, -1) 2 -(77, 91, -1) 2 -(77, 92, -1) 1 -(78, 9, -1) 0 -(78, 10, -1) 1 -(78, 11, -1) 2 -(78, 12, -1) 3 -(78, 13, -1) 3 -(78, 14, -1) 4 -(78, 15, -1) 5 -(78, 16, -1) 6 -(78, 17, -1) 7 -(78, 18, -1) 7 -(78, 19, -1) 8 -(78, 20, -1) 9 -(78, 21, -1) 9 -(78, 22, -1) 10 -(78, 23, -1) 11 -(78, 24, -1) 12 -(78, 25, -1) 12 -(78, 26, -1) 13 -(78, 27, -1) 14 -(78, 28, -1) 14 -(78, 29, -1) 15 -(78, 30, -1) 15 -(78, 31, -1) 16 -(78, 32, -1) 17 -(78, 33, -1) 17 -(78, 34, -1) 18 -(78, 35, -1) 18 -(78, 36, -1) 19 -(78, 37, -1) 19 -(78, 38, -1) 19 -(78, 39, -1) 20 -(78, 40, -1) 20 -(78, 41, -1) 20 -(78, 42, -1) 21 -(78, 43, -1) 21 -(78, 44, -1) 21 -(78, 45, -1) 21 -(78, 46, -1) 22 -(78, 47, -1) 22 -(78, 48, -1) 22 -(78, 49, -1) 22 -(78, 50, -1) 22 -(78, 51, -1) 22 -(78, 52, -1) 22 -(78, 53, -1) 22 -(78, 54, -1) 22 -(78, 55, -1) 22 -(78, 56, -1) 21 -(78, 57, -1) 21 -(78, 58, -1) 21 -(78, 59, -1) 21 -(78, 60, -1) 20 -(78, 61, -1) 20 -(78, 62, -1) 20 -(78, 63, -1) 19 -(78, 64, -1) 19 -(78, 65, -1) 19 -(78, 66, -1) 18 -(78, 67, -1) 18 -(78, 68, -1) 17 -(78, 69, -1) 17 -(78, 70, -1) 16 -(78, 71, -1) 15 -(78, 72, -1) 15 -(78, 73, -1) 14 -(78, 74, -1) 14 -(78, 75, -1) 13 -(78, 76, -1) 12 -(78, 77, -1) 12 -(78, 78, -1) 11 -(78, 79, -1) 10 -(78, 80, -1) 9 -(78, 81, -1) 9 -(78, 82, -1) 8 -(78, 83, -1) 7 -(78, 84, -1) 7 -(78, 85, -1) 6 -(78, 86, -1) 5 -(78, 87, -1) 4 -(78, 88, -1) 3 -(78, 89, -1) 3 -(78, 90, -1) 2 -(78, 91, -1) 1 -(78, 92, -1) 0 -(79, 9, -1) 0 -(79, 10, -1) 1 -(79, 11, -1) 1 -(79, 12, -1) 2 -(79, 13, -1) 3 -(79, 14, -1) 4 -(79, 15, -1) 4 -(79, 16, -1) 5 -(79, 17, -1) 6 -(79, 18, -1) 7 -(79, 19, -1) 7 -(79, 20, -1) 8 -(79, 21, -1) 9 -(79, 22, -1) 9 -(79, 23, -1) 10 -(79, 24, -1) 11 -(79, 25, -1) 12 -(79, 26, -1) 12 -(79, 27, -1) 13 -(79, 28, -1) 13 -(79, 29, -1) 14 -(79, 30, -1) 15 -(79, 31, -1) 15 -(79, 32, -1) 16 -(79, 33, -1) 16 -(79, 34, -1) 17 -(79, 35, -1) 17 -(79, 36, -1) 18 -(79, 37, -1) 18 -(79, 38, -1) 18 -(79, 39, -1) 19 -(79, 40, -1) 19 -(79, 41, -1) 20 -(79, 42, -1) 20 -(79, 43, -1) 20 -(79, 44, -1) 20 -(79, 45, -1) 20 -(79, 46, -1) 21 -(79, 47, -1) 21 -(79, 48, -1) 21 -(79, 49, -1) 21 -(79, 50, -1) 21 -(79, 51, -1) 21 -(79, 52, -1) 21 -(79, 53, -1) 21 -(79, 54, -1) 21 -(79, 55, -1) 21 -(79, 56, -1) 20 -(79, 57, -1) 20 -(79, 58, -1) 20 -(79, 59, -1) 20 -(79, 60, -1) 20 -(79, 61, -1) 19 -(79, 62, -1) 19 -(79, 63, -1) 18 -(79, 64, -1) 18 -(79, 65, -1) 18 -(79, 66, -1) 17 -(79, 67, -1) 17 -(79, 68, -1) 16 -(79, 69, -1) 16 -(79, 70, -1) 15 -(79, 71, -1) 15 -(79, 72, -1) 14 -(79, 73, -1) 13 -(79, 74, -1) 13 -(79, 75, -1) 12 -(79, 76, -1) 12 -(79, 77, -1) 11 -(79, 78, -1) 10 -(79, 79, -1) 9 -(79, 80, -1) 9 -(79, 81, -1) 8 -(79, 82, -1) 7 -(79, 83, -1) 7 -(79, 84, -1) 6 -(79, 85, -1) 5 -(79, 86, -1) 4 -(79, 87, -1) 4 -(79, 88, -1) 3 -(79, 89, -1) 2 -(79, 90, -1) 1 -(79, 91, -1) 1 -(79, 92, -1) 0 -(80, 9, -1) 0 -(80, 10, -1) 0 -(80, 11, -1) 1 -(80, 12, -1) 1 -(80, 13, -1) 2 -(80, 14, -1) 3 -(80, 15, -1) 4 -(80, 16, -1) 4 -(80, 17, -1) 5 -(80, 18, -1) 6 -(80, 19, -1) 7 -(80, 20, -1) 7 -(80, 21, -1) 8 -(80, 22, -1) 9 -(80, 23, -1) 9 -(80, 24, -1) 10 -(80, 25, -1) 11 -(80, 26, -1) 11 -(80, 27, -1) 12 -(80, 28, -1) 13 -(80, 29, -1) 13 -(80, 30, -1) 14 -(80, 31, -1) 14 -(80, 32, -1) 15 -(80, 33, -1) 15 -(80, 34, -1) 16 -(80, 35, -1) 16 -(80, 36, -1) 17 -(80, 37, -1) 17 -(80, 38, -1) 18 -(80, 39, -1) 18 -(80, 40, -1) 18 -(80, 41, -1) 19 -(80, 42, -1) 19 -(80, 43, -1) 19 -(80, 44, -1) 19 -(80, 45, -1) 20 -(80, 46, -1) 20 -(80, 47, -1) 20 -(80, 48, -1) 20 -(80, 49, -1) 20 -(80, 50, -1) 20 -(80, 51, -1) 20 -(80, 52, -1) 20 -(80, 53, -1) 20 -(80, 54, -1) 20 -(80, 55, -1) 20 -(80, 56, -1) 20 -(80, 57, -1) 19 -(80, 58, -1) 19 -(80, 59, -1) 19 -(80, 60, -1) 19 -(80, 61, -1) 18 -(80, 62, -1) 18 -(80, 63, -1) 18 -(80, 64, -1) 17 -(80, 65, -1) 17 -(80, 66, -1) 16 -(80, 67, -1) 16 -(80, 68, -1) 15 -(80, 69, -1) 15 -(80, 70, -1) 14 -(80, 71, -1) 14 -(80, 72, -1) 13 -(80, 73, -1) 13 -(80, 74, -1) 12 -(80, 75, -1) 11 -(80, 76, -1) 11 -(80, 77, -1) 10 -(80, 78, -1) 9 -(80, 79, -1) 9 -(80, 80, -1) 8 -(80, 81, -1) 7 -(80, 82, -1) 7 -(80, 83, -1) 6 -(80, 84, -1) 5 -(80, 85, -1) 4 -(80, 86, -1) 4 -(80, 87, -1) 3 -(80, 88, -1) 2 -(80, 89, -1) 1 -(80, 90, -1) 1 -(80, 91, -1) 0 -(80, 92, -1) 0 -(81, 14, -1) 3 -(81, 15, -1) 3 -(81, 16, -1) 4 -(81, 17, -1) 5 -(81, 18, -1) 5 -(81, 19, -1) 6 -(81, 20, -1) 7 -(81, 21, -1) 7 -(81, 22, -1) 8 -(81, 23, -1) 9 -(81, 24, -1) 9 -(81, 25, -1) 10 -(81, 26, -1) 11 -(81, 27, -1) 11 -(81, 28, -1) 12 -(81, 29, -1) 12 -(81, 30, -1) 13 -(81, 31, -1) 14 -(81, 32, -1) 14 -(81, 33, -1) 15 -(81, 34, -1) 15 -(81, 35, -1) 15 -(81, 36, -1) 16 -(81, 37, -1) 16 -(81, 38, -1) 17 -(81, 39, -1) 17 -(81, 40, -1) 17 -(81, 41, -1) 18 -(81, 42, -1) 18 -(81, 43, -1) 18 -(81, 44, -1) 18 -(81, 45, -1) 19 -(81, 46, -1) 19 -(81, 47, -1) 19 -(81, 48, -1) 19 -(81, 49, -1) 19 -(81, 50, -1) 19 -(81, 51, -1) 19 -(81, 52, -1) 19 -(81, 53, -1) 19 -(81, 54, -1) 19 -(81, 55, -1) 19 -(81, 56, -1) 19 -(81, 57, -1) 18 -(81, 58, -1) 18 -(81, 59, -1) 18 -(81, 60, -1) 18 -(81, 61, -1) 17 -(81, 62, -1) 17 -(81, 63, -1) 17 -(81, 64, -1) 16 -(81, 65, -1) 16 -(81, 66, -1) 15 -(81, 67, -1) 15 -(81, 68, -1) 15 -(81, 69, -1) 14 -(81, 70, -1) 14 -(81, 71, -1) 13 -(81, 72, -1) 12 -(81, 73, -1) 12 -(81, 74, -1) 11 -(81, 75, -1) 11 -(81, 76, -1) 10 -(81, 77, -1) 9 -(81, 78, -1) 9 -(81, 79, -1) 8 -(81, 80, -1) 7 -(81, 81, -1) 7 -(81, 82, -1) 6 -(81, 83, -1) 5 -(81, 84, -1) 5 -(81, 85, -1) 4 -(81, 86, -1) 3 -(81, 87, -1) 3 -(82, 14, -1) 2 -(82, 15, -1) 3 -(82, 16, -1) 3 -(82, 17, -1) 4 -(82, 18, -1) 5 -(82, 19, -1) 5 -(82, 20, -1) 6 -(82, 21, -1) 7 -(82, 22, -1) 7 -(82, 23, -1) 8 -(82, 24, -1) 9 -(82, 25, -1) 9 -(82, 26, -1) 10 -(82, 27, -1) 10 -(82, 28, -1) 11 -(82, 29, -1) 12 -(82, 30, -1) 12 -(82, 31, -1) 13 -(82, 32, -1) 13 -(82, 33, -1) 14 -(82, 34, -1) 14 -(82, 35, -1) 15 -(82, 36, -1) 15 -(82, 37, -1) 15 -(82, 38, -1) 16 -(82, 39, -1) 16 -(82, 40, -1) 16 -(82, 41, -1) 17 -(82, 42, -1) 17 -(82, 43, -1) 17 -(82, 44, -1) 17 -(82, 45, -1) 18 -(82, 46, -1) 18 -(82, 47, -1) 18 -(82, 48, -1) 18 -(82, 49, -1) 18 -(82, 50, -1) 18 -(82, 51, -1) 18 -(82, 52, -1) 18 -(82, 53, -1) 18 -(82, 54, -1) 18 -(82, 55, -1) 18 -(82, 56, -1) 18 -(82, 57, -1) 17 -(82, 58, -1) 17 -(82, 59, -1) 17 -(82, 60, -1) 17 -(82, 61, -1) 16 -(82, 62, -1) 16 -(82, 63, -1) 16 -(82, 64, -1) 15 -(82, 65, -1) 15 -(82, 66, -1) 15 -(82, 67, -1) 14 -(82, 68, -1) 14 -(82, 69, -1) 13 -(82, 70, -1) 13 -(82, 71, -1) 12 -(82, 72, -1) 12 -(82, 73, -1) 11 -(82, 74, -1) 10 -(82, 75, -1) 10 -(82, 76, -1) 9 -(82, 77, -1) 9 -(82, 78, -1) 8 -(82, 79, -1) 7 -(82, 80, -1) 7 -(82, 81, -1) 6 -(82, 82, -1) 5 -(82, 83, -1) 5 -(82, 84, -1) 4 -(82, 85, -1) 3 -(82, 86, -1) 3 -(82, 87, -1) 2 -(83, 14, -1) 1 -(83, 15, -1) 2 -(83, 16, -1) 3 -(83, 17, -1) 3 -(83, 18, -1) 4 -(83, 19, -1) 5 -(83, 20, -1) 5 -(83, 21, -1) 6 -(83, 22, -1) 7 -(83, 23, -1) 7 -(83, 24, -1) 8 -(83, 25, -1) 8 -(83, 26, -1) 9 -(83, 27, -1) 10 -(83, 28, -1) 10 -(83, 29, -1) 11 -(83, 30, -1) 11 -(83, 31, -1) 12 -(83, 32, -1) 12 -(83, 33, -1) 13 -(83, 34, -1) 13 -(83, 35, -1) 14 -(83, 36, -1) 14 -(83, 37, -1) 14 -(83, 38, -1) 15 -(83, 39, -1) 15 -(83, 40, -1) 15 -(83, 41, -1) 16 -(83, 42, -1) 16 -(83, 43, -1) 16 -(83, 44, -1) 16 -(83, 45, -1) 17 -(83, 46, -1) 17 -(83, 47, -1) 17 -(83, 48, -1) 17 -(83, 49, -1) 17 -(83, 50, -1) 17 -(83, 51, -1) 17 -(83, 52, -1) 17 -(83, 53, -1) 17 -(83, 54, -1) 17 -(83, 55, -1) 17 -(83, 56, -1) 17 -(83, 57, -1) 16 -(83, 58, -1) 16 -(83, 59, -1) 16 -(83, 60, -1) 16 -(83, 61, -1) 15 -(83, 62, -1) 15 -(83, 63, -1) 15 -(83, 64, -1) 14 -(83, 65, -1) 14 -(83, 66, -1) 14 -(83, 67, -1) 13 -(83, 68, -1) 13 -(83, 69, -1) 12 -(83, 70, -1) 12 -(83, 71, -1) 11 -(83, 72, -1) 11 -(83, 73, -1) 10 -(83, 74, -1) 10 -(83, 75, -1) 9 -(83, 76, -1) 8 -(83, 77, -1) 8 -(83, 78, -1) 7 -(83, 79, -1) 7 -(83, 80, -1) 6 -(83, 81, -1) 5 -(83, 82, -1) 5 -(83, 83, -1) 4 -(83, 84, -1) 3 -(83, 85, -1) 3 -(83, 86, -1) 2 -(83, 87, -1) 1 -(84, 14, -1) 1 -(84, 15, -1) 1 -(84, 16, -1) 2 -(84, 17, -1) 3 -(84, 18, -1) 3 -(84, 19, -1) 4 -(84, 20, -1) 5 -(84, 21, -1) 5 -(84, 22, -1) 6 -(84, 23, -1) 6 -(84, 24, -1) 7 -(84, 25, -1) 8 -(84, 26, -1) 8 -(84, 27, -1) 9 -(84, 28, -1) 9 -(84, 29, -1) 10 -(84, 30, -1) 10 -(84, 31, -1) 11 -(84, 32, -1) 11 -(84, 33, -1) 12 -(84, 34, -1) 12 -(84, 35, -1) 13 -(84, 36, -1) 13 -(84, 37, -1) 13 -(84, 38, -1) 14 -(84, 39, -1) 14 -(84, 40, -1) 14 -(84, 41, -1) 15 -(84, 42, -1) 15 -(84, 43, -1) 15 -(84, 44, -1) 15 -(84, 45, -1) 16 -(84, 46, -1) 16 -(84, 47, -1) 16 -(84, 48, -1) 16 -(84, 49, -1) 16 -(84, 50, -1) 16 -(84, 51, -1) 16 -(84, 52, -1) 16 -(84, 53, -1) 16 -(84, 54, -1) 16 -(84, 55, -1) 16 -(84, 56, -1) 16 -(84, 57, -1) 15 -(84, 58, -1) 15 -(84, 59, -1) 15 -(84, 60, -1) 15 -(84, 61, -1) 14 -(84, 62, -1) 14 -(84, 63, -1) 14 -(84, 64, -1) 13 -(84, 65, -1) 13 -(84, 66, -1) 13 -(84, 67, -1) 12 -(84, 68, -1) 12 -(84, 69, -1) 11 -(84, 70, -1) 11 -(84, 71, -1) 10 -(84, 72, -1) 10 -(84, 73, -1) 9 -(84, 74, -1) 9 -(84, 75, -1) 8 -(84, 76, -1) 8 -(84, 77, -1) 7 -(84, 78, -1) 6 -(84, 79, -1) 6 -(84, 80, -1) 5 -(84, 81, -1) 5 -(84, 82, -1) 4 -(84, 83, -1) 3 -(84, 84, -1) 3 -(84, 85, -1) 2 -(84, 86, -1) 1 -(84, 87, -1) 1 -(85, 14, -1) 0 -(85, 15, -1) 1 -(85, 16, -1) 1 -(85, 17, -1) 2 -(85, 18, -1) 2 -(85, 19, -1) 3 -(85, 20, -1) 4 -(85, 21, -1) 4 -(85, 22, -1) 5 -(85, 23, -1) 6 -(85, 24, -1) 6 -(85, 25, -1) 7 -(85, 26, -1) 7 -(85, 27, -1) 8 -(85, 28, -1) 9 -(85, 29, -1) 9 -(85, 30, -1) 10 -(85, 31, -1) 10 -(85, 32, -1) 11 -(85, 33, -1) 11 -(85, 34, -1) 11 -(85, 35, -1) 12 -(85, 36, -1) 12 -(85, 37, -1) 13 -(85, 38, -1) 13 -(85, 39, -1) 13 -(85, 40, -1) 13 -(85, 41, -1) 14 -(85, 42, -1) 14 -(85, 43, -1) 14 -(85, 44, -1) 14 -(85, 45, -1) 15 -(85, 46, -1) 15 -(85, 47, -1) 15 -(85, 48, -1) 15 -(85, 49, -1) 15 -(85, 50, -1) 15 -(85, 51, -1) 15 -(85, 52, -1) 15 -(85, 53, -1) 15 -(85, 54, -1) 15 -(85, 55, -1) 15 -(85, 56, -1) 15 -(85, 57, -1) 14 -(85, 58, -1) 14 -(85, 59, -1) 14 -(85, 60, -1) 14 -(85, 61, -1) 13 -(85, 62, -1) 13 -(85, 63, -1) 13 -(85, 64, -1) 13 -(85, 65, -1) 12 -(85, 66, -1) 12 -(85, 67, -1) 11 -(85, 68, -1) 11 -(85, 69, -1) 11 -(85, 70, -1) 10 -(85, 71, -1) 10 -(85, 72, -1) 9 -(85, 73, -1) 9 -(85, 74, -1) 8 -(85, 75, -1) 7 -(85, 76, -1) 7 -(85, 77, -1) 6 -(85, 78, -1) 6 -(85, 79, -1) 5 -(85, 80, -1) 4 -(85, 81, -1) 4 -(85, 82, -1) 3 -(85, 83, -1) 2 -(85, 84, -1) 2 -(85, 85, -1) 1 -(85, 86, -1) 1 -(85, 87, -1) 0 -(86, 16, -1) 1 -(86, 17, -1) 1 -(86, 18, -1) 2 -(86, 19, -1) 3 -(86, 20, -1) 3 -(86, 21, -1) 4 -(86, 22, -1) 4 -(86, 23, -1) 5 -(86, 24, -1) 6 -(86, 25, -1) 6 -(86, 26, -1) 7 -(86, 27, -1) 7 -(86, 28, -1) 8 -(86, 29, -1) 8 -(86, 30, -1) 9 -(86, 31, -1) 9 -(86, 32, -1) 10 -(86, 33, -1) 10 -(86, 34, -1) 11 -(86, 35, -1) 11 -(86, 36, -1) 11 -(86, 37, -1) 12 -(86, 38, -1) 12 -(86, 39, -1) 12 -(86, 40, -1) 13 -(86, 41, -1) 13 -(86, 42, -1) 13 -(86, 43, -1) 13 -(86, 44, -1) 13 -(86, 45, -1) 14 -(86, 46, -1) 14 -(86, 47, -1) 14 -(86, 48, -1) 14 -(86, 49, -1) 14 -(86, 50, -1) 14 -(86, 51, -1) 14 -(86, 52, -1) 14 -(86, 53, -1) 14 -(86, 54, -1) 14 -(86, 55, -1) 14 -(86, 56, -1) 14 -(86, 57, -1) 13 -(86, 58, -1) 13 -(86, 59, -1) 13 -(86, 60, -1) 13 -(86, 61, -1) 13 -(86, 62, -1) 12 -(86, 63, -1) 12 -(86, 64, -1) 12 -(86, 65, -1) 11 -(86, 66, -1) 11 -(86, 67, -1) 11 -(86, 68, -1) 10 -(86, 69, -1) 10 -(86, 70, -1) 9 -(86, 71, -1) 9 -(86, 72, -1) 8 -(86, 73, -1) 8 -(86, 74, -1) 7 -(86, 75, -1) 7 -(86, 76, -1) 6 -(86, 77, -1) 6 -(86, 78, -1) 5 -(86, 79, -1) 4 -(86, 80, -1) 4 -(86, 81, -1) 3 -(86, 82, -1) 3 -(86, 83, -1) 2 -(86, 84, -1) 1 -(86, 85, -1) 1 -(87, 16, -1) 0 -(87, 17, -1) 1 -(87, 18, -1) 1 -(87, 19, -1) 2 -(87, 20, -1) 2 -(87, 21, -1) 3 -(87, 22, -1) 4 -(87, 23, -1) 4 -(87, 24, -1) 5 -(87, 25, -1) 5 -(87, 26, -1) 6 -(87, 27, -1) 6 -(87, 28, -1) 7 -(87, 29, -1) 7 -(87, 30, -1) 8 -(87, 31, -1) 8 -(87, 32, -1) 9 -(87, 33, -1) 9 -(87, 34, -1) 10 -(87, 35, -1) 10 -(87, 36, -1) 10 -(87, 37, -1) 11 -(87, 38, -1) 11 -(87, 39, -1) 11 -(87, 40, -1) 12 -(87, 41, -1) 12 -(87, 42, -1) 12 -(87, 43, -1) 12 -(87, 44, -1) 12 -(87, 45, -1) 13 -(87, 46, -1) 13 -(87, 47, -1) 13 -(87, 48, -1) 13 -(87, 49, -1) 13 -(87, 50, -1) 13 -(87, 51, -1) 13 -(87, 52, -1) 13 -(87, 53, -1) 13 -(87, 54, -1) 13 -(87, 55, -1) 13 -(87, 56, -1) 13 -(87, 57, -1) 12 -(87, 58, -1) 12 -(87, 59, -1) 12 -(87, 60, -1) 12 -(87, 61, -1) 12 -(87, 62, -1) 11 -(87, 63, -1) 11 -(87, 64, -1) 11 -(87, 65, -1) 10 -(87, 66, -1) 10 -(87, 67, -1) 10 -(87, 68, -1) 9 -(87, 69, -1) 9 -(87, 70, -1) 8 -(87, 71, -1) 8 -(87, 72, -1) 7 -(87, 73, -1) 7 -(87, 74, -1) 6 -(87, 75, -1) 6 -(87, 76, -1) 5 -(87, 77, -1) 5 -(87, 78, -1) 4 -(87, 79, -1) 4 -(87, 80, -1) 3 -(87, 81, -1) 2 -(87, 82, -1) 2 -(87, 83, -1) 1 -(87, 84, -1) 1 -(87, 85, -1) 0 -(88, 21, -1) 2 -(88, 22, -1) 3 -(88, 23, -1) 3 -(88, 24, -1) 4 -(88, 25, -1) 5 -(88, 26, -1) 5 -(88, 27, -1) 6 -(88, 28, -1) 6 -(88, 29, -1) 7 -(88, 30, -1) 7 -(88, 31, -1) 7 -(88, 32, -1) 8 -(88, 33, -1) 8 -(88, 34, -1) 9 -(88, 35, -1) 9 -(88, 36, -1) 9 -(88, 37, -1) 10 -(88, 38, -1) 10 -(88, 39, -1) 10 -(88, 40, -1) 11 -(88, 41, -1) 11 -(88, 42, -1) 11 -(88, 43, -1) 11 -(88, 44, -1) 11 -(88, 45, -1) 12 -(88, 46, -1) 12 -(88, 47, -1) 12 -(88, 48, -1) 12 -(88, 49, -1) 12 -(88, 50, -1) 12 -(88, 51, -1) 12 -(88, 52, -1) 12 -(88, 53, -1) 12 -(88, 54, -1) 12 -(88, 55, -1) 12 -(88, 56, -1) 12 -(88, 57, -1) 11 -(88, 58, -1) 11 -(88, 59, -1) 11 -(88, 60, -1) 11 -(88, 61, -1) 11 -(88, 62, -1) 10 -(88, 63, -1) 10 -(88, 64, -1) 10 -(88, 65, -1) 9 -(88, 66, -1) 9 -(88, 67, -1) 9 -(88, 68, -1) 8 -(88, 69, -1) 8 -(88, 70, -1) 7 -(88, 71, -1) 7 -(88, 72, -1) 7 -(88, 73, -1) 6 -(88, 74, -1) 6 -(88, 75, -1) 5 -(88, 76, -1) 5 -(88, 77, -1) 4 -(88, 78, -1) 3 -(88, 79, -1) 3 -(88, 80, -1) 2 -(89, 21, -1) 1 -(89, 22, -1) 2 -(89, 23, -1) 3 -(89, 24, -1) 3 -(89, 25, -1) 4 -(89, 26, -1) 4 -(89, 27, -1) 5 -(89, 28, -1) 5 -(89, 29, -1) 6 -(89, 30, -1) 6 -(89, 31, -1) 7 -(89, 32, -1) 7 -(89, 33, -1) 7 -(89, 34, -1) 8 -(89, 35, -1) 8 -(89, 36, -1) 8 -(89, 37, -1) 9 -(89, 38, -1) 9 -(89, 39, -1) 9 -(89, 40, -1) 10 -(89, 41, -1) 10 -(89, 42, -1) 10 -(89, 43, -1) 10 -(89, 44, -1) 10 -(89, 45, -1) 11 -(89, 46, -1) 11 -(89, 47, -1) 11 -(89, 48, -1) 11 -(89, 49, -1) 11 -(89, 50, -1) 11 -(89, 51, -1) 11 -(89, 52, -1) 11 -(89, 53, -1) 11 -(89, 54, -1) 11 -(89, 55, -1) 11 -(89, 56, -1) 11 -(89, 57, -1) 10 -(89, 58, -1) 10 -(89, 59, -1) 10 -(89, 60, -1) 10 -(89, 61, -1) 10 -(89, 62, -1) 9 -(89, 63, -1) 9 -(89, 64, -1) 9 -(89, 65, -1) 8 -(89, 66, -1) 8 -(89, 67, -1) 8 -(89, 68, -1) 7 -(89, 69, -1) 7 -(89, 70, -1) 7 -(89, 71, -1) 6 -(89, 72, -1) 6 -(89, 73, -1) 5 -(89, 74, -1) 5 -(89, 75, -1) 4 -(89, 76, -1) 4 -(89, 77, -1) 3 -(89, 78, -1) 3 -(89, 79, -1) 2 -(89, 80, -1) 1 -(90, 21, -1) 1 -(90, 22, -1) 1 -(90, 23, -1) 2 -(90, 24, -1) 2 -(90, 25, -1) 3 -(90, 26, -1) 3 -(90, 27, -1) 4 -(90, 28, -1) 4 -(90, 29, -1) 5 -(90, 30, -1) 5 -(90, 31, -1) 6 -(90, 32, -1) 6 -(90, 33, -1) 6 -(90, 34, -1) 7 -(90, 35, -1) 7 -(90, 36, -1) 8 -(90, 37, -1) 8 -(90, 38, -1) 8 -(90, 39, -1) 8 -(90, 40, -1) 9 -(90, 41, -1) 9 -(90, 42, -1) 9 -(90, 43, -1) 9 -(90, 44, -1) 9 -(90, 45, -1) 10 -(90, 46, -1) 10 -(90, 47, -1) 10 -(90, 48, -1) 10 -(90, 49, -1) 10 -(90, 50, -1) 10 -(90, 51, -1) 10 -(90, 52, -1) 10 -(90, 53, -1) 10 -(90, 54, -1) 10 -(90, 55, -1) 10 -(90, 56, -1) 10 -(90, 57, -1) 9 -(90, 58, -1) 9 -(90, 59, -1) 9 -(90, 60, -1) 9 -(90, 61, -1) 9 -(90, 62, -1) 8 -(90, 63, -1) 8 -(90, 64, -1) 8 -(90, 65, -1) 8 -(90, 66, -1) 7 -(90, 67, -1) 7 -(90, 68, -1) 6 -(90, 69, -1) 6 -(90, 70, -1) 6 -(90, 71, -1) 5 -(90, 72, -1) 5 -(90, 73, -1) 4 -(90, 74, -1) 4 -(90, 75, -1) 3 -(90, 76, -1) 3 -(90, 77, -1) 2 -(90, 78, -1) 2 -(90, 79, -1) 1 -(90, 80, -1) 1 -(91, 21, -1) 0 -(91, 22, -1) 1 -(91, 23, -1) 1 -(91, 24, -1) 2 -(91, 25, -1) 2 -(91, 26, -1) 3 -(91, 27, -1) 3 -(91, 28, -1) 4 -(91, 29, -1) 4 -(91, 30, -1) 4 -(91, 31, -1) 5 -(91, 32, -1) 5 -(91, 33, -1) 6 -(91, 34, -1) 6 -(91, 35, -1) 6 -(91, 36, -1) 7 -(91, 37, -1) 7 -(91, 38, -1) 7 -(91, 39, -1) 8 -(91, 40, -1) 8 -(91, 41, -1) 8 -(91, 42, -1) 8 -(91, 43, -1) 8 -(91, 44, -1) 9 -(91, 45, -1) 9 -(91, 46, -1) 9 -(91, 47, -1) 9 -(91, 48, -1) 9 -(91, 49, -1) 9 -(91, 50, -1) 9 -(91, 51, -1) 9 -(91, 52, -1) 9 -(91, 53, -1) 9 -(91, 54, -1) 9 -(91, 55, -1) 9 -(91, 56, -1) 9 -(91, 57, -1) 9 -(91, 58, -1) 8 -(91, 59, -1) 8 -(91, 60, -1) 8 -(91, 61, -1) 8 -(91, 62, -1) 8 -(91, 63, -1) 7 -(91, 64, -1) 7 -(91, 65, -1) 7 -(91, 66, -1) 6 -(91, 67, -1) 6 -(91, 68, -1) 6 -(91, 69, -1) 5 -(91, 70, -1) 5 -(91, 71, -1) 4 -(91, 72, -1) 4 -(91, 73, -1) 4 -(91, 74, -1) 3 -(91, 75, -1) 3 -(91, 76, -1) 2 -(91, 77, -1) 2 -(91, 78, -1) 1 -(91, 79, -1) 1 -(91, 80, -1) 0 -(92, 21, -1) 0 -(92, 22, -1) 0 -(92, 23, -1) 0 -(92, 24, -1) 1 -(92, 25, -1) 1 -(92, 26, -1) 2 -(92, 27, -1) 2 -(92, 28, -1) 3 -(92, 29, -1) 3 -(92, 30, -1) 4 -(92, 31, -1) 4 -(92, 32, -1) 4 -(92, 33, -1) 5 -(92, 34, -1) 5 -(92, 35, -1) 5 -(92, 36, -1) 6 -(92, 37, -1) 6 -(92, 38, -1) 6 -(92, 39, -1) 7 -(92, 40, -1) 7 -(92, 41, -1) 7 -(92, 42, -1) 7 -(92, 43, -1) 7 -(92, 44, -1) 8 -(92, 45, -1) 8 -(92, 46, -1) 8 -(92, 47, -1) 8 -(92, 48, -1) 8 -(92, 49, -1) 8 -(92, 50, -1) 8 -(92, 51, -1) 8 -(92, 52, -1) 8 -(92, 53, -1) 8 -(92, 54, -1) 8 -(92, 55, -1) 8 -(92, 56, -1) 8 -(92, 57, -1) 8 -(92, 58, -1) 7 -(92, 59, -1) 7 -(92, 60, -1) 7 -(92, 61, -1) 7 -(92, 62, -1) 7 -(92, 63, -1) 6 -(92, 64, -1) 6 -(92, 65, -1) 6 -(92, 66, -1) 5 -(92, 67, -1) 5 -(92, 68, -1) 5 -(92, 69, -1) 4 -(92, 70, -1) 4 -(92, 71, -1) 4 -(92, 72, -1) 3 -(92, 73, -1) 3 -(92, 74, -1) 2 -(92, 75, -1) 2 -(92, 76, -1) 1 -(92, 77, -1) 1 -(92, 78, -1) 0 -(92, 79, -1) 0 -(92, 80, -1) 0 -(93, 26, -1) 1 -(93, 27, -1) 1 -(93, 28, -1) 2 -(93, 29, -1) 2 -(93, 30, -1) 3 -(93, 31, -1) 3 -(93, 32, -1) 3 -(93, 33, -1) 4 -(93, 34, -1) 4 -(93, 35, -1) 4 -(93, 36, -1) 5 -(93, 37, -1) 5 -(93, 38, -1) 5 -(93, 39, -1) 6 -(93, 40, -1) 6 -(93, 41, -1) 6 -(93, 42, -1) 6 -(93, 43, -1) 6 -(93, 44, -1) 7 -(93, 45, -1) 7 -(93, 46, -1) 7 -(93, 47, -1) 7 -(93, 48, -1) 7 -(93, 49, -1) 7 -(93, 50, -1) 7 -(93, 51, -1) 7 -(93, 52, -1) 7 -(93, 53, -1) 7 -(93, 54, -1) 7 -(93, 55, -1) 7 -(93, 56, -1) 7 -(93, 57, -1) 7 -(93, 58, -1) 6 -(93, 59, -1) 6 -(93, 60, -1) 6 -(93, 61, -1) 6 -(93, 62, -1) 6 -(93, 63, -1) 5 -(93, 64, -1) 5 -(93, 65, -1) 5 -(93, 66, -1) 4 -(93, 67, -1) 4 -(93, 68, -1) 4 -(93, 69, -1) 3 -(93, 70, -1) 3 -(93, 71, -1) 3 -(93, 72, -1) 2 -(93, 73, -1) 2 -(93, 74, -1) 1 -(93, 75, -1) 1 -(94, 26, -1) 0 -(94, 27, -1) 0 -(94, 28, -1) 1 -(94, 29, -1) 1 -(94, 30, -1) 2 -(94, 31, -1) 2 -(94, 32, -1) 2 -(94, 33, -1) 3 -(94, 34, -1) 3 -(94, 35, -1) 3 -(94, 36, -1) 4 -(94, 37, -1) 4 -(94, 38, -1) 4 -(94, 39, -1) 5 -(94, 40, -1) 5 -(94, 41, -1) 5 -(94, 42, -1) 5 -(94, 43, -1) 5 -(94, 44, -1) 6 -(94, 45, -1) 6 -(94, 46, -1) 6 -(94, 47, -1) 6 -(94, 48, -1) 6 -(94, 49, -1) 6 -(94, 50, -1) 6 -(94, 51, -1) 6 -(94, 52, -1) 6 -(94, 53, -1) 6 -(94, 54, -1) 6 -(94, 55, -1) 6 -(94, 56, -1) 6 -(94, 57, -1) 6 -(94, 58, -1) 5 -(94, 59, -1) 5 -(94, 60, -1) 5 -(94, 61, -1) 5 -(94, 62, -1) 5 -(94, 63, -1) 4 -(94, 64, -1) 4 -(94, 65, -1) 4 -(94, 66, -1) 3 -(94, 67, -1) 3 -(94, 68, -1) 3 -(94, 69, -1) 2 -(94, 70, -1) 2 -(94, 71, -1) 2 -(94, 72, -1) 1 -(94, 73, -1) 1 -(94, 74, -1) 0 -(94, 75, -1) 0 -(95, 26, -1) 0 -(95, 27, -1) 0 -(95, 28, -1) 0 -(95, 29, -1) 0 -(95, 30, -1) 1 -(95, 31, -1) 1 -(95, 32, -1) 1 -(95, 33, -1) 2 -(95, 34, -1) 2 -(95, 35, -1) 3 -(95, 36, -1) 3 -(95, 37, -1) 3 -(95, 38, -1) 3 -(95, 39, -1) 4 -(95, 40, -1) 4 -(95, 41, -1) 4 -(95, 42, -1) 4 -(95, 43, -1) 4 -(95, 44, -1) 5 -(95, 45, -1) 5 -(95, 46, -1) 5 -(95, 47, -1) 5 -(95, 48, -1) 5 -(95, 49, -1) 5 -(95, 50, -1) 5 -(95, 51, -1) 5 -(95, 52, -1) 5 -(95, 53, -1) 5 -(95, 54, -1) 5 -(95, 55, -1) 5 -(95, 56, -1) 5 -(95, 57, -1) 5 -(95, 58, -1) 4 -(95, 59, -1) 4 -(95, 60, -1) 4 -(95, 61, -1) 4 -(95, 62, -1) 4 -(95, 63, -1) 3 -(95, 64, -1) 3 -(95, 65, -1) 3 -(95, 66, -1) 3 -(95, 67, -1) 2 -(95, 68, -1) 2 -(95, 69, -1) 1 -(95, 70, -1) 1 -(95, 71, -1) 1 -(95, 72, -1) 0 -(95, 73, -1) 0 -(95, 74, -1) 0 -(95, 75, -1) 0 -(96, 36, -1) 2 -(96, 37, -1) 2 -(96, 38, -1) 2 -(96, 39, -1) 3 -(96, 40, -1) 3 -(96, 41, -1) 3 -(96, 42, -1) 3 -(96, 43, -1) 3 -(96, 44, -1) 4 -(96, 45, -1) 4 -(96, 46, -1) 4 -(96, 47, -1) 4 -(96, 48, -1) 4 -(96, 49, -1) 4 -(96, 50, -1) 4 -(96, 51, -1) 4 -(96, 52, -1) 4 -(96, 53, -1) 4 -(96, 54, -1) 4 -(96, 55, -1) 4 -(96, 56, -1) 4 -(96, 57, -1) 4 -(96, 58, -1) 3 -(96, 59, -1) 3 -(96, 60, -1) 3 -(96, 61, -1) 3 -(96, 62, -1) 3 -(96, 63, -1) 2 -(96, 64, -1) 2 -(96, 65, -1) 2 -(97, 36, -1) 1 -(97, 37, -1) 1 -(97, 38, -1) 2 -(97, 39, -1) 2 -(97, 40, -1) 2 -(97, 41, -1) 2 -(97, 42, -1) 2 -(97, 43, -1) 2 -(97, 44, -1) 3 -(97, 45, -1) 3 -(97, 46, -1) 3 -(97, 47, -1) 3 -(97, 48, -1) 3 -(97, 49, -1) 3 -(97, 50, -1) 3 -(97, 51, -1) 3 -(97, 52, -1) 3 -(97, 53, -1) 3 -(97, 54, -1) 3 -(97, 55, -1) 3 -(97, 56, -1) 3 -(97, 57, -1) 3 -(97, 58, -1) 2 -(97, 59, -1) 2 -(97, 60, -1) 2 -(97, 61, -1) 2 -(97, 62, -1) 2 -(97, 63, -1) 2 -(97, 64, -1) 1 -(97, 65, -1) 1 -(98, 41, -1) 1 -(98, 42, -1) 1 -(98, 43, -1) 1 -(98, 44, -1) 2 -(98, 45, -1) 2 -(98, 46, -1) 2 -(98, 47, -1) 2 -(98, 48, -1) 2 -(98, 49, -1) 2 -(98, 50, -1) 2 -(98, 51, -1) 2 -(98, 52, -1) 2 -(98, 53, -1) 2 -(98, 54, -1) 2 -(98, 55, -1) 2 -(98, 56, -1) 2 -(98, 57, -1) 2 -(98, 58, -1) 1 -(98, 59, -1) 1 -(98, 60, -1) 1 -(99, 41, -1) 0 -(99, 42, -1) 0 -(99, 43, -1) 0 -(99, 44, -1) 1 -(99, 45, -1) 1 -(99, 46, -1) 1 -(99, 47, -1) 1 -(99, 48, -1) 1 -(99, 49, -1) 1 -(99, 50, -1) 1 -(99, 51, -1) 1 -(99, 52, -1) 1 -(99, 53, -1) 1 -(99, 54, -1) 1 -(99, 55, -1) 1 -(99, 56, -1) 1 -(99, 57, -1) 1 -(99, 58, -1) 0 -(99, 59, -1) 0 -(99, 60, -1) 0 -(100, 41, -1) 0 -(100, 42, -1) 0 -(100, 43, -1) 0 -(100, 44, -1) 0 -(100, 45, -1) 0 -(100, 46, -1) 0 -(100, 47, -1) 0 -(100, 48, -1) 0 -(100, 49, -1) 0 -(100, 50, -1) 0 -(100, 51, -1) 0 -(100, 52, -1) 0 -(100, 53, -1) 0 -(100, 54, -1) 0 -(100, 55, -1) 0 -(100, 56, -1) 0 -(100, 57, -1) 0 -(100, 58, -1) 0 -(100, 59, -1) 0 -(100, 60, -1) 0 -(1, 41, 1) 0 -(1, 42, 1) 0 -(1, 43, 1) 0 -(1, 44, 1) 0 -(1, 45, 1) 0 -(1, 46, 1) 0 -(1, 47, 1) 0 -(1, 48, 1) 0 -(1, 49, 1) 0 -(1, 50, 1) 0 -(1, 51, 1) 0 -(1, 52, 1) 0 -(1, 53, 1) 0 -(1, 54, 1) 0 -(1, 55, 1) 0 -(1, 56, 1) 0 -(1, 57, 1) 0 -(1, 58, 1) 0 -(1, 59, 1) 0 -(1, 60, 1) 0 -(2, 41, 1) 0 -(2, 42, 1) 0 -(2, 43, 1) 0 -(2, 44, 1) 1 -(2, 45, 1) 1 -(2, 46, 1) 1 -(2, 47, 1) 1 -(2, 48, 1) 1 -(2, 49, 1) 1 -(2, 50, 1) 1 -(2, 51, 1) 1 -(2, 52, 1) 1 -(2, 53, 1) 1 -(2, 54, 1) 1 -(2, 55, 1) 1 -(2, 56, 1) 1 -(2, 57, 1) 1 -(2, 58, 1) 0 -(2, 59, 1) 0 -(2, 60, 1) 0 -(3, 41, 1) 1 -(3, 42, 1) 1 -(3, 43, 1) 1 -(3, 44, 1) 2 -(3, 45, 1) 2 -(3, 46, 1) 2 -(3, 47, 1) 2 -(3, 48, 1) 2 -(3, 49, 1) 2 -(3, 50, 1) 2 -(3, 51, 1) 2 -(3, 52, 1) 2 -(3, 53, 1) 2 -(3, 54, 1) 2 -(3, 55, 1) 2 -(3, 56, 1) 2 -(3, 57, 1) 2 -(3, 58, 1) 1 -(3, 59, 1) 1 -(3, 60, 1) 1 -(4, 36, 1) 1 -(4, 37, 1) 1 -(4, 38, 1) 2 -(4, 39, 1) 2 -(4, 40, 1) 2 -(4, 41, 1) 2 -(4, 42, 1) 2 -(4, 43, 1) 2 -(4, 44, 1) 3 -(4, 45, 1) 3 -(4, 46, 1) 3 -(4, 47, 1) 3 -(4, 48, 1) 3 -(4, 49, 1) 3 -(4, 50, 1) 3 -(4, 51, 1) 3 -(4, 52, 1) 3 -(4, 53, 1) 3 -(4, 54, 1) 3 -(4, 55, 1) 3 -(4, 56, 1) 3 -(4, 57, 1) 3 -(4, 58, 1) 2 -(4, 59, 1) 2 -(4, 60, 1) 2 -(4, 61, 1) 2 -(4, 62, 1) 2 -(4, 63, 1) 2 -(4, 64, 1) 1 -(4, 65, 1) 1 -(5, 36, 1) 2 -(5, 37, 1) 2 -(5, 38, 1) 2 -(5, 39, 1) 3 -(5, 40, 1) 3 -(5, 41, 1) 3 -(5, 42, 1) 3 -(5, 43, 1) 3 -(5, 44, 1) 4 -(5, 45, 1) 4 -(5, 46, 1) 4 -(5, 47, 1) 4 -(5, 48, 1) 4 -(5, 49, 1) 4 -(5, 50, 1) 4 -(5, 51, 1) 4 -(5, 52, 1) 4 -(5, 53, 1) 4 -(5, 54, 1) 4 -(5, 55, 1) 4 -(5, 56, 1) 4 -(5, 57, 1) 4 -(5, 58, 1) 3 -(5, 59, 1) 3 -(5, 60, 1) 3 -(5, 61, 1) 3 -(5, 62, 1) 3 -(5, 63, 1) 2 -(5, 64, 1) 2 -(5, 65, 1) 2 -(6, 26, 1) 0 -(6, 27, 1) 0 -(6, 28, 1) 0 -(6, 29, 1) 0 -(6, 30, 1) 1 -(6, 31, 1) 1 -(6, 32, 1) 1 -(6, 33, 1) 2 -(6, 34, 1) 2 -(6, 35, 1) 3 -(6, 36, 1) 3 -(6, 37, 1) 3 -(6, 38, 1) 3 -(6, 39, 1) 4 -(6, 40, 1) 4 -(6, 41, 1) 4 -(6, 42, 1) 4 -(6, 43, 1) 4 -(6, 44, 1) 5 -(6, 45, 1) 5 -(6, 46, 1) 5 -(6, 47, 1) 5 -(6, 48, 1) 5 -(6, 49, 1) 5 -(6, 50, 1) 5 -(6, 51, 1) 5 -(6, 52, 1) 5 -(6, 53, 1) 5 -(6, 54, 1) 5 -(6, 55, 1) 5 -(6, 56, 1) 5 -(6, 57, 1) 5 -(6, 58, 1) 4 -(6, 59, 1) 4 -(6, 60, 1) 4 -(6, 61, 1) 4 -(6, 62, 1) 4 -(6, 63, 1) 3 -(6, 64, 1) 3 -(6, 65, 1) 3 -(6, 66, 1) 3 -(6, 67, 1) 2 -(6, 68, 1) 2 -(6, 69, 1) 1 -(6, 70, 1) 1 -(6, 71, 1) 1 -(6, 72, 1) 0 -(6, 73, 1) 0 -(6, 74, 1) 0 -(6, 75, 1) 0 -(7, 26, 1) 0 -(7, 27, 1) 0 -(7, 28, 1) 1 -(7, 29, 1) 1 -(7, 30, 1) 2 -(7, 31, 1) 2 -(7, 32, 1) 2 -(7, 33, 1) 3 -(7, 34, 1) 3 -(7, 35, 1) 3 -(7, 36, 1) 4 -(7, 37, 1) 4 -(7, 38, 1) 4 -(7, 39, 1) 5 -(7, 40, 1) 5 -(7, 41, 1) 5 -(7, 42, 1) 5 -(7, 43, 1) 5 -(7, 44, 1) 6 -(7, 45, 1) 6 -(7, 46, 1) 6 -(7, 47, 1) 6 -(7, 48, 1) 6 -(7, 49, 1) 6 -(7, 50, 1) 6 -(7, 51, 1) 6 -(7, 52, 1) 6 -(7, 53, 1) 6 -(7, 54, 1) 6 -(7, 55, 1) 6 -(7, 56, 1) 6 -(7, 57, 1) 6 -(7, 58, 1) 5 -(7, 59, 1) 5 -(7, 60, 1) 5 -(7, 61, 1) 5 -(7, 62, 1) 5 -(7, 63, 1) 4 -(7, 64, 1) 4 -(7, 65, 1) 4 -(7, 66, 1) 3 -(7, 67, 1) 3 -(7, 68, 1) 3 -(7, 69, 1) 2 -(7, 70, 1) 2 -(7, 71, 1) 2 -(7, 72, 1) 1 -(7, 73, 1) 1 -(7, 74, 1) 0 -(7, 75, 1) 0 -(8, 26, 1) 1 -(8, 27, 1) 1 -(8, 28, 1) 2 -(8, 29, 1) 2 -(8, 30, 1) 3 -(8, 31, 1) 3 -(8, 32, 1) 3 -(8, 33, 1) 4 -(8, 34, 1) 4 -(8, 35, 1) 4 -(8, 36, 1) 5 -(8, 37, 1) 5 -(8, 38, 1) 5 -(8, 39, 1) 6 -(8, 40, 1) 6 -(8, 41, 1) 6 -(8, 42, 1) 6 -(8, 43, 1) 6 -(8, 44, 1) 7 -(8, 45, 1) 7 -(8, 46, 1) 7 -(8, 47, 1) 7 -(8, 48, 1) 7 -(8, 49, 1) 7 -(8, 50, 1) 7 -(8, 51, 1) 7 -(8, 52, 1) 7 -(8, 53, 1) 7 -(8, 54, 1) 7 -(8, 55, 1) 7 -(8, 56, 1) 7 -(8, 57, 1) 7 -(8, 58, 1) 6 -(8, 59, 1) 6 -(8, 60, 1) 6 -(8, 61, 1) 6 -(8, 62, 1) 6 -(8, 63, 1) 5 -(8, 64, 1) 5 -(8, 65, 1) 5 -(8, 66, 1) 4 -(8, 67, 1) 4 -(8, 68, 1) 4 -(8, 69, 1) 3 -(8, 70, 1) 3 -(8, 71, 1) 3 -(8, 72, 1) 2 -(8, 73, 1) 2 -(8, 74, 1) 1 -(8, 75, 1) 1 -(9, 21, 1) 0 -(9, 22, 1) 0 -(9, 23, 1) 0 -(9, 24, 1) 1 -(9, 25, 1) 1 -(9, 26, 1) 2 -(9, 27, 1) 2 -(9, 28, 1) 3 -(9, 29, 1) 3 -(9, 30, 1) 4 -(9, 31, 1) 4 -(9, 32, 1) 4 -(9, 33, 1) 5 -(9, 34, 1) 5 -(9, 35, 1) 5 -(9, 36, 1) 6 -(9, 37, 1) 6 -(9, 38, 1) 6 -(9, 39, 1) 7 -(9, 40, 1) 7 -(9, 41, 1) 7 -(9, 42, 1) 7 -(9, 43, 1) 7 -(9, 44, 1) 8 -(9, 45, 1) 8 -(9, 46, 1) 8 -(9, 47, 1) 8 -(9, 48, 1) 8 -(9, 49, 1) 8 -(9, 50, 1) 8 -(9, 51, 1) 8 -(9, 52, 1) 8 -(9, 53, 1) 8 -(9, 54, 1) 8 -(9, 55, 1) 8 -(9, 56, 1) 8 -(9, 57, 1) 8 -(9, 58, 1) 7 -(9, 59, 1) 7 -(9, 60, 1) 7 -(9, 61, 1) 7 -(9, 62, 1) 7 -(9, 63, 1) 6 -(9, 64, 1) 6 -(9, 65, 1) 6 -(9, 66, 1) 5 -(9, 67, 1) 5 -(9, 68, 1) 5 -(9, 69, 1) 4 -(9, 70, 1) 4 -(9, 71, 1) 4 -(9, 72, 1) 3 -(9, 73, 1) 3 -(9, 74, 1) 2 -(9, 75, 1) 2 -(9, 76, 1) 1 -(9, 77, 1) 1 -(9, 78, 1) 0 -(9, 79, 1) 0 -(9, 80, 1) 0 -(10, 21, 1) 0 -(10, 22, 1) 1 -(10, 23, 1) 1 -(10, 24, 1) 2 -(10, 25, 1) 2 -(10, 26, 1) 3 -(10, 27, 1) 3 -(10, 28, 1) 4 -(10, 29, 1) 4 -(10, 30, 1) 4 -(10, 31, 1) 5 -(10, 32, 1) 5 -(10, 33, 1) 6 -(10, 34, 1) 6 -(10, 35, 1) 6 -(10, 36, 1) 7 -(10, 37, 1) 7 -(10, 38, 1) 7 -(10, 39, 1) 8 -(10, 40, 1) 8 -(10, 41, 1) 8 -(10, 42, 1) 8 -(10, 43, 1) 8 -(10, 44, 1) 9 -(10, 45, 1) 9 -(10, 46, 1) 9 -(10, 47, 1) 9 -(10, 48, 1) 9 -(10, 49, 1) 9 -(10, 50, 1) 9 -(10, 51, 1) 9 -(10, 52, 1) 9 -(10, 53, 1) 9 -(10, 54, 1) 9 -(10, 55, 1) 9 -(10, 56, 1) 9 -(10, 57, 1) 9 -(10, 58, 1) 8 -(10, 59, 1) 8 -(10, 60, 1) 8 -(10, 61, 1) 8 -(10, 62, 1) 8 -(10, 63, 1) 7 -(10, 64, 1) 7 -(10, 65, 1) 7 -(10, 66, 1) 6 -(10, 67, 1) 6 -(10, 68, 1) 6 -(10, 69, 1) 5 -(10, 70, 1) 5 -(10, 71, 1) 4 -(10, 72, 1) 4 -(10, 73, 1) 4 -(10, 74, 1) 3 -(10, 75, 1) 3 -(10, 76, 1) 2 -(10, 77, 1) 2 -(10, 78, 1) 1 -(10, 79, 1) 1 -(10, 80, 1) 0 -(11, 21, 1) 1 -(11, 22, 1) 1 -(11, 23, 1) 2 -(11, 24, 1) 2 -(11, 25, 1) 3 -(11, 26, 1) 3 -(11, 27, 1) 4 -(11, 28, 1) 4 -(11, 29, 1) 5 -(11, 30, 1) 5 -(11, 31, 1) 6 -(11, 32, 1) 6 -(11, 33, 1) 6 -(11, 34, 1) 7 -(11, 35, 1) 7 -(11, 36, 1) 8 -(11, 37, 1) 8 -(11, 38, 1) 8 -(11, 39, 1) 8 -(11, 40, 1) 9 -(11, 41, 1) 9 -(11, 42, 1) 9 -(11, 43, 1) 9 -(11, 44, 1) 9 -(11, 45, 1) 10 -(11, 46, 1) 10 -(11, 47, 1) 10 -(11, 48, 1) 10 -(11, 49, 1) 10 -(11, 50, 1) 10 -(11, 51, 1) 10 -(11, 52, 1) 10 -(11, 53, 1) 10 -(11, 54, 1) 10 -(11, 55, 1) 10 -(11, 56, 1) 10 -(11, 57, 1) 9 -(11, 58, 1) 9 -(11, 59, 1) 9 -(11, 60, 1) 9 -(11, 61, 1) 9 -(11, 62, 1) 8 -(11, 63, 1) 8 -(11, 64, 1) 8 -(11, 65, 1) 8 -(11, 66, 1) 7 -(11, 67, 1) 7 -(11, 68, 1) 6 -(11, 69, 1) 6 -(11, 70, 1) 6 -(11, 71, 1) 5 -(11, 72, 1) 5 -(11, 73, 1) 4 -(11, 74, 1) 4 -(11, 75, 1) 3 -(11, 76, 1) 3 -(11, 77, 1) 2 -(11, 78, 1) 2 -(11, 79, 1) 1 -(11, 80, 1) 1 -(12, 21, 1) 1 -(12, 22, 1) 2 -(12, 23, 1) 3 -(12, 24, 1) 3 -(12, 25, 1) 4 -(12, 26, 1) 4 -(12, 27, 1) 5 -(12, 28, 1) 5 -(12, 29, 1) 6 -(12, 30, 1) 6 -(12, 31, 1) 7 -(12, 32, 1) 7 -(12, 33, 1) 7 -(12, 34, 1) 8 -(12, 35, 1) 8 -(12, 36, 1) 8 -(12, 37, 1) 9 -(12, 38, 1) 9 -(12, 39, 1) 9 -(12, 40, 1) 10 -(12, 41, 1) 10 -(12, 42, 1) 10 -(12, 43, 1) 10 -(12, 44, 1) 10 -(12, 45, 1) 11 -(12, 46, 1) 11 -(12, 47, 1) 11 -(12, 48, 1) 11 -(12, 49, 1) 11 -(12, 50, 1) 11 -(12, 51, 1) 11 -(12, 52, 1) 11 -(12, 53, 1) 11 -(12, 54, 1) 11 -(12, 55, 1) 11 -(12, 56, 1) 11 -(12, 57, 1) 10 -(12, 58, 1) 10 -(12, 59, 1) 10 -(12, 60, 1) 10 -(12, 61, 1) 10 -(12, 62, 1) 9 -(12, 63, 1) 9 -(12, 64, 1) 9 -(12, 65, 1) 8 -(12, 66, 1) 8 -(12, 67, 1) 8 -(12, 68, 1) 7 -(12, 69, 1) 7 -(12, 70, 1) 7 -(12, 71, 1) 6 -(12, 72, 1) 6 -(12, 73, 1) 5 -(12, 74, 1) 5 -(12, 75, 1) 4 -(12, 76, 1) 4 -(12, 77, 1) 3 -(12, 78, 1) 3 -(12, 79, 1) 2 -(12, 80, 1) 1 -(13, 21, 1) 2 -(13, 22, 1) 3 -(13, 23, 1) 3 -(13, 24, 1) 4 -(13, 25, 1) 5 -(13, 26, 1) 5 -(13, 27, 1) 6 -(13, 28, 1) 6 -(13, 29, 1) 7 -(13, 30, 1) 7 -(13, 31, 1) 7 -(13, 32, 1) 8 -(13, 33, 1) 8 -(13, 34, 1) 9 -(13, 35, 1) 9 -(13, 36, 1) 9 -(13, 37, 1) 10 -(13, 38, 1) 10 -(13, 39, 1) 10 -(13, 40, 1) 11 -(13, 41, 1) 11 -(13, 42, 1) 11 -(13, 43, 1) 11 -(13, 44, 1) 11 -(13, 45, 1) 12 -(13, 46, 1) 12 -(13, 47, 1) 12 -(13, 48, 1) 12 -(13, 49, 1) 12 -(13, 50, 1) 12 -(13, 51, 1) 12 -(13, 52, 1) 12 -(13, 53, 1) 12 -(13, 54, 1) 12 -(13, 55, 1) 12 -(13, 56, 1) 12 -(13, 57, 1) 11 -(13, 58, 1) 11 -(13, 59, 1) 11 -(13, 60, 1) 11 -(13, 61, 1) 11 -(13, 62, 1) 10 -(13, 63, 1) 10 -(13, 64, 1) 10 -(13, 65, 1) 9 -(13, 66, 1) 9 -(13, 67, 1) 9 -(13, 68, 1) 8 -(13, 69, 1) 8 -(13, 70, 1) 7 -(13, 71, 1) 7 -(13, 72, 1) 7 -(13, 73, 1) 6 -(13, 74, 1) 6 -(13, 75, 1) 5 -(13, 76, 1) 5 -(13, 77, 1) 4 -(13, 78, 1) 3 -(13, 79, 1) 3 -(13, 80, 1) 2 -(14, 16, 1) 0 -(14, 17, 1) 1 -(14, 18, 1) 1 -(14, 19, 1) 2 -(14, 20, 1) 2 -(14, 21, 1) 3 -(14, 22, 1) 4 -(14, 23, 1) 4 -(14, 24, 1) 5 -(14, 25, 1) 5 -(14, 26, 1) 6 -(14, 27, 1) 6 -(14, 28, 1) 7 -(14, 29, 1) 7 -(14, 30, 1) 8 -(14, 31, 1) 8 -(14, 32, 1) 9 -(14, 33, 1) 9 -(14, 34, 1) 10 -(14, 35, 1) 10 -(14, 36, 1) 10 -(14, 37, 1) 11 -(14, 38, 1) 11 -(14, 39, 1) 11 -(14, 40, 1) 12 -(14, 41, 1) 12 -(14, 42, 1) 12 -(14, 43, 1) 12 -(14, 44, 1) 12 -(14, 45, 1) 13 -(14, 46, 1) 13 -(14, 47, 1) 13 -(14, 48, 1) 13 -(14, 49, 1) 13 -(14, 50, 1) 13 -(14, 51, 1) 13 -(14, 52, 1) 13 -(14, 53, 1) 13 -(14, 54, 1) 13 -(14, 55, 1) 13 -(14, 56, 1) 13 -(14, 57, 1) 12 -(14, 58, 1) 12 -(14, 59, 1) 12 -(14, 60, 1) 12 -(14, 61, 1) 12 -(14, 62, 1) 11 -(14, 63, 1) 11 -(14, 64, 1) 11 -(14, 65, 1) 10 -(14, 66, 1) 10 -(14, 67, 1) 10 -(14, 68, 1) 9 -(14, 69, 1) 9 -(14, 70, 1) 8 -(14, 71, 1) 8 -(14, 72, 1) 7 -(14, 73, 1) 7 -(14, 74, 1) 6 -(14, 75, 1) 6 -(14, 76, 1) 5 -(14, 77, 1) 5 -(14, 78, 1) 4 -(14, 79, 1) 4 -(14, 80, 1) 3 -(14, 81, 1) 2 -(14, 82, 1) 2 -(14, 83, 1) 1 -(14, 84, 1) 1 -(14, 85, 1) 0 -(15, 16, 1) 1 -(15, 17, 1) 1 -(15, 18, 1) 2 -(15, 19, 1) 3 -(15, 20, 1) 3 -(15, 21, 1) 4 -(15, 22, 1) 4 -(15, 23, 1) 5 -(15, 24, 1) 6 -(15, 25, 1) 6 -(15, 26, 1) 7 -(15, 27, 1) 7 -(15, 28, 1) 8 -(15, 29, 1) 8 -(15, 30, 1) 9 -(15, 31, 1) 9 -(15, 32, 1) 10 -(15, 33, 1) 10 -(15, 34, 1) 11 -(15, 35, 1) 11 -(15, 36, 1) 11 -(15, 37, 1) 12 -(15, 38, 1) 12 -(15, 39, 1) 12 -(15, 40, 1) 13 -(15, 41, 1) 13 -(15, 42, 1) 13 -(15, 43, 1) 13 -(15, 44, 1) 13 -(15, 45, 1) 14 -(15, 46, 1) 14 -(15, 47, 1) 14 -(15, 48, 1) 14 -(15, 49, 1) 14 -(15, 50, 1) 14 -(15, 51, 1) 14 -(15, 52, 1) 14 -(15, 53, 1) 14 -(15, 54, 1) 14 -(15, 55, 1) 14 -(15, 56, 1) 14 -(15, 57, 1) 13 -(15, 58, 1) 13 -(15, 59, 1) 13 -(15, 60, 1) 13 -(15, 61, 1) 13 -(15, 62, 1) 12 -(15, 63, 1) 12 -(15, 64, 1) 12 -(15, 65, 1) 11 -(15, 66, 1) 11 -(15, 67, 1) 11 -(15, 68, 1) 10 -(15, 69, 1) 10 -(15, 70, 1) 9 -(15, 71, 1) 9 -(15, 72, 1) 8 -(15, 73, 1) 8 -(15, 74, 1) 7 -(15, 75, 1) 7 -(15, 76, 1) 6 -(15, 77, 1) 6 -(15, 78, 1) 5 -(15, 79, 1) 4 -(15, 80, 1) 4 -(15, 81, 1) 3 -(15, 82, 1) 3 -(15, 83, 1) 2 -(15, 84, 1) 1 -(15, 85, 1) 1 -(16, 14, 1) 0 -(16, 15, 1) 1 -(16, 16, 1) 1 -(16, 17, 1) 2 -(16, 18, 1) 2 -(16, 19, 1) 3 -(16, 20, 1) 4 -(16, 21, 1) 4 -(16, 22, 1) 5 -(16, 23, 1) 6 -(16, 24, 1) 6 -(16, 25, 1) 7 -(16, 26, 1) 7 -(16, 27, 1) 8 -(16, 28, 1) 9 -(16, 29, 1) 9 -(16, 30, 1) 10 -(16, 31, 1) 10 -(16, 32, 1) 11 -(16, 33, 1) 11 -(16, 34, 1) 11 -(16, 35, 1) 12 -(16, 36, 1) 12 -(16, 37, 1) 13 -(16, 38, 1) 13 -(16, 39, 1) 13 -(16, 40, 1) 13 -(16, 41, 1) 14 -(16, 42, 1) 14 -(16, 43, 1) 14 -(16, 44, 1) 14 -(16, 45, 1) 15 -(16, 46, 1) 15 -(16, 47, 1) 15 -(16, 48, 1) 15 -(16, 49, 1) 15 -(16, 50, 1) 15 -(16, 51, 1) 15 -(16, 52, 1) 15 -(16, 53, 1) 15 -(16, 54, 1) 15 -(16, 55, 1) 15 -(16, 56, 1) 15 -(16, 57, 1) 14 -(16, 58, 1) 14 -(16, 59, 1) 14 -(16, 60, 1) 14 -(16, 61, 1) 13 -(16, 62, 1) 13 -(16, 63, 1) 13 -(16, 64, 1) 13 -(16, 65, 1) 12 -(16, 66, 1) 12 -(16, 67, 1) 11 -(16, 68, 1) 11 -(16, 69, 1) 11 -(16, 70, 1) 10 -(16, 71, 1) 10 -(16, 72, 1) 9 -(16, 73, 1) 9 -(16, 74, 1) 8 -(16, 75, 1) 7 -(16, 76, 1) 7 -(16, 77, 1) 6 -(16, 78, 1) 6 -(16, 79, 1) 5 -(16, 80, 1) 4 -(16, 81, 1) 4 -(16, 82, 1) 3 -(16, 83, 1) 2 -(16, 84, 1) 2 -(16, 85, 1) 1 -(16, 86, 1) 1 -(16, 87, 1) 0 -(17, 14, 1) 1 -(17, 15, 1) 1 -(17, 16, 1) 2 -(17, 17, 1) 3 -(17, 18, 1) 3 -(17, 19, 1) 4 -(17, 20, 1) 5 -(17, 21, 1) 5 -(17, 22, 1) 6 -(17, 23, 1) 6 -(17, 24, 1) 7 -(17, 25, 1) 8 -(17, 26, 1) 8 -(17, 27, 1) 9 -(17, 28, 1) 9 -(17, 29, 1) 10 -(17, 30, 1) 10 -(17, 31, 1) 11 -(17, 32, 1) 11 -(17, 33, 1) 12 -(17, 34, 1) 12 -(17, 35, 1) 13 -(17, 36, 1) 13 -(17, 37, 1) 13 -(17, 38, 1) 14 -(17, 39, 1) 14 -(17, 40, 1) 14 -(17, 41, 1) 15 -(17, 42, 1) 15 -(17, 43, 1) 15 -(17, 44, 1) 15 -(17, 45, 1) 16 -(17, 46, 1) 16 -(17, 47, 1) 16 -(17, 48, 1) 16 -(17, 49, 1) 16 -(17, 50, 1) 16 -(17, 51, 1) 16 -(17, 52, 1) 16 -(17, 53, 1) 16 -(17, 54, 1) 16 -(17, 55, 1) 16 -(17, 56, 1) 16 -(17, 57, 1) 15 -(17, 58, 1) 15 -(17, 59, 1) 15 -(17, 60, 1) 15 -(17, 61, 1) 14 -(17, 62, 1) 14 -(17, 63, 1) 14 -(17, 64, 1) 13 -(17, 65, 1) 13 -(17, 66, 1) 13 -(17, 67, 1) 12 -(17, 68, 1) 12 -(17, 69, 1) 11 -(17, 70, 1) 11 -(17, 71, 1) 10 -(17, 72, 1) 10 -(17, 73, 1) 9 -(17, 74, 1) 9 -(17, 75, 1) 8 -(17, 76, 1) 8 -(17, 77, 1) 7 -(17, 78, 1) 6 -(17, 79, 1) 6 -(17, 80, 1) 5 -(17, 81, 1) 5 -(17, 82, 1) 4 -(17, 83, 1) 3 -(17, 84, 1) 3 -(17, 85, 1) 2 -(17, 86, 1) 1 -(17, 87, 1) 1 -(18, 14, 1) 1 -(18, 15, 1) 2 -(18, 16, 1) 3 -(18, 17, 1) 3 -(18, 18, 1) 4 -(18, 19, 1) 5 -(18, 20, 1) 5 -(18, 21, 1) 6 -(18, 22, 1) 7 -(18, 23, 1) 7 -(18, 24, 1) 8 -(18, 25, 1) 8 -(18, 26, 1) 9 -(18, 27, 1) 10 -(18, 28, 1) 10 -(18, 29, 1) 11 -(18, 30, 1) 11 -(18, 31, 1) 12 -(18, 32, 1) 12 -(18, 33, 1) 13 -(18, 34, 1) 13 -(18, 35, 1) 14 -(18, 36, 1) 14 -(18, 37, 1) 14 -(18, 38, 1) 15 -(18, 39, 1) 15 -(18, 40, 1) 15 -(18, 41, 1) 16 -(18, 42, 1) 16 -(18, 43, 1) 16 -(18, 44, 1) 16 -(18, 45, 1) 17 -(18, 46, 1) 17 -(18, 47, 1) 17 -(18, 48, 1) 17 -(18, 49, 1) 17 -(18, 50, 1) 17 -(18, 51, 1) 17 -(18, 52, 1) 17 -(18, 53, 1) 17 -(18, 54, 1) 17 -(18, 55, 1) 17 -(18, 56, 1) 17 -(18, 57, 1) 16 -(18, 58, 1) 16 -(18, 59, 1) 16 -(18, 60, 1) 16 -(18, 61, 1) 15 -(18, 62, 1) 15 -(18, 63, 1) 15 -(18, 64, 1) 14 -(18, 65, 1) 14 -(18, 66, 1) 14 -(18, 67, 1) 13 -(18, 68, 1) 13 -(18, 69, 1) 12 -(18, 70, 1) 12 -(18, 71, 1) 11 -(18, 72, 1) 11 -(18, 73, 1) 10 -(18, 74, 1) 10 -(18, 75, 1) 9 -(18, 76, 1) 8 -(18, 77, 1) 8 -(18, 78, 1) 7 -(18, 79, 1) 7 -(18, 80, 1) 6 -(18, 81, 1) 5 -(18, 82, 1) 5 -(18, 83, 1) 4 -(18, 84, 1) 3 -(18, 85, 1) 3 -(18, 86, 1) 2 -(18, 87, 1) 1 -(19, 14, 1) 2 -(19, 15, 1) 3 -(19, 16, 1) 3 -(19, 17, 1) 4 -(19, 18, 1) 5 -(19, 19, 1) 5 -(19, 20, 1) 6 -(19, 21, 1) 7 -(19, 22, 1) 7 -(19, 23, 1) 8 -(19, 24, 1) 9 -(19, 25, 1) 9 -(19, 26, 1) 10 -(19, 27, 1) 10 -(19, 28, 1) 11 -(19, 29, 1) 12 -(19, 30, 1) 12 -(19, 31, 1) 13 -(19, 32, 1) 13 -(19, 33, 1) 14 -(19, 34, 1) 14 -(19, 35, 1) 15 -(19, 36, 1) 15 -(19, 37, 1) 15 -(19, 38, 1) 16 -(19, 39, 1) 16 -(19, 40, 1) 16 -(19, 41, 1) 17 -(19, 42, 1) 17 -(19, 43, 1) 17 -(19, 44, 1) 17 -(19, 45, 1) 18 -(19, 46, 1) 18 -(19, 47, 1) 18 -(19, 48, 1) 18 -(19, 49, 1) 18 -(19, 50, 1) 18 -(19, 51, 1) 18 -(19, 52, 1) 18 -(19, 53, 1) 18 -(19, 54, 1) 18 -(19, 55, 1) 18 -(19, 56, 1) 18 -(19, 57, 1) 17 -(19, 58, 1) 17 -(19, 59, 1) 17 -(19, 60, 1) 17 -(19, 61, 1) 16 -(19, 62, 1) 16 -(19, 63, 1) 16 -(19, 64, 1) 15 -(19, 65, 1) 15 -(19, 66, 1) 15 -(19, 67, 1) 14 -(19, 68, 1) 14 -(19, 69, 1) 13 -(19, 70, 1) 13 -(19, 71, 1) 12 -(19, 72, 1) 12 -(19, 73, 1) 11 -(19, 74, 1) 10 -(19, 75, 1) 10 -(19, 76, 1) 9 -(19, 77, 1) 9 -(19, 78, 1) 8 -(19, 79, 1) 7 -(19, 80, 1) 7 -(19, 81, 1) 6 -(19, 82, 1) 5 -(19, 83, 1) 5 -(19, 84, 1) 4 -(19, 85, 1) 3 -(19, 86, 1) 3 -(19, 87, 1) 2 -(20, 14, 1) 3 -(20, 15, 1) 3 -(20, 16, 1) 4 -(20, 17, 1) 5 -(20, 18, 1) 5 -(20, 19, 1) 6 -(20, 20, 1) 7 -(20, 21, 1) 7 -(20, 22, 1) 8 -(20, 23, 1) 9 -(20, 24, 1) 9 -(20, 25, 1) 10 -(20, 26, 1) 11 -(20, 27, 1) 11 -(20, 28, 1) 12 -(20, 29, 1) 12 -(20, 30, 1) 13 -(20, 31, 1) 14 -(20, 32, 1) 14 -(20, 33, 1) 15 -(20, 34, 1) 15 -(20, 35, 1) 15 -(20, 36, 1) 16 -(20, 37, 1) 16 -(20, 38, 1) 17 -(20, 39, 1) 17 -(20, 40, 1) 17 -(20, 41, 1) 18 -(20, 42, 1) 18 -(20, 43, 1) 18 -(20, 44, 1) 18 -(20, 45, 1) 19 -(20, 46, 1) 19 -(20, 47, 1) 19 -(20, 48, 1) 19 -(20, 49, 1) 19 -(20, 50, 1) 19 -(20, 51, 1) 19 -(20, 52, 1) 19 -(20, 53, 1) 19 -(20, 54, 1) 19 -(20, 55, 1) 19 -(20, 56, 1) 19 -(20, 57, 1) 18 -(20, 58, 1) 18 -(20, 59, 1) 18 -(20, 60, 1) 18 -(20, 61, 1) 17 -(20, 62, 1) 17 -(20, 63, 1) 17 -(20, 64, 1) 16 -(20, 65, 1) 16 -(20, 66, 1) 15 -(20, 67, 1) 15 -(20, 68, 1) 15 -(20, 69, 1) 14 -(20, 70, 1) 14 -(20, 71, 1) 13 -(20, 72, 1) 12 -(20, 73, 1) 12 -(20, 74, 1) 11 -(20, 75, 1) 11 -(20, 76, 1) 10 -(20, 77, 1) 9 -(20, 78, 1) 9 -(20, 79, 1) 8 -(20, 80, 1) 7 -(20, 81, 1) 7 -(20, 82, 1) 6 -(20, 83, 1) 5 -(20, 84, 1) 5 -(20, 85, 1) 4 -(20, 86, 1) 3 -(20, 87, 1) 3 -(21, 9, 1) 0 -(21, 10, 1) 0 -(21, 11, 1) 1 -(21, 12, 1) 1 -(21, 13, 1) 2 -(21, 14, 1) 3 -(21, 15, 1) 4 -(21, 16, 1) 4 -(21, 17, 1) 5 -(21, 18, 1) 6 -(21, 19, 1) 7 -(21, 20, 1) 7 -(21, 21, 1) 8 -(21, 22, 1) 9 -(21, 23, 1) 9 -(21, 24, 1) 10 -(21, 25, 1) 11 -(21, 26, 1) 11 -(21, 27, 1) 12 -(21, 28, 1) 13 -(21, 29, 1) 13 -(21, 30, 1) 14 -(21, 31, 1) 14 -(21, 32, 1) 15 -(21, 33, 1) 15 -(21, 34, 1) 16 -(21, 35, 1) 16 -(21, 36, 1) 17 -(21, 37, 1) 17 -(21, 38, 1) 18 -(21, 39, 1) 18 -(21, 40, 1) 18 -(21, 41, 1) 19 -(21, 42, 1) 19 -(21, 43, 1) 19 -(21, 44, 1) 19 -(21, 45, 1) 20 -(21, 46, 1) 20 -(21, 47, 1) 20 -(21, 48, 1) 20 -(21, 49, 1) 20 -(21, 50, 1) 20 -(21, 51, 1) 20 -(21, 52, 1) 20 -(21, 53, 1) 20 -(21, 54, 1) 20 -(21, 55, 1) 20 -(21, 56, 1) 20 -(21, 57, 1) 19 -(21, 58, 1) 19 -(21, 59, 1) 19 -(21, 60, 1) 19 -(21, 61, 1) 18 -(21, 62, 1) 18 -(21, 63, 1) 18 -(21, 64, 1) 17 -(21, 65, 1) 17 -(21, 66, 1) 16 -(21, 67, 1) 16 -(21, 68, 1) 15 -(21, 69, 1) 15 -(21, 70, 1) 14 -(21, 71, 1) 14 -(21, 72, 1) 13 -(21, 73, 1) 13 -(21, 74, 1) 12 -(21, 75, 1) 11 -(21, 76, 1) 11 -(21, 77, 1) 10 -(21, 78, 1) 9 -(21, 79, 1) 9 -(21, 80, 1) 8 -(21, 81, 1) 7 -(21, 82, 1) 7 -(21, 83, 1) 6 -(21, 84, 1) 5 -(21, 85, 1) 4 -(21, 86, 1) 4 -(21, 87, 1) 3 -(21, 88, 1) 2 -(21, 89, 1) 1 -(21, 90, 1) 1 -(21, 91, 1) 0 -(21, 92, 1) 0 -(22, 9, 1) 0 -(22, 10, 1) 1 -(22, 11, 1) 1 -(22, 12, 1) 2 -(22, 13, 1) 3 -(22, 14, 1) 4 -(22, 15, 1) 4 -(22, 16, 1) 5 -(22, 17, 1) 6 -(22, 18, 1) 7 -(22, 19, 1) 7 -(22, 20, 1) 8 -(22, 21, 1) 9 -(22, 22, 1) 9 -(22, 23, 1) 10 -(22, 24, 1) 11 -(22, 25, 1) 12 -(22, 26, 1) 12 -(22, 27, 1) 13 -(22, 28, 1) 13 -(22, 29, 1) 14 -(22, 30, 1) 15 -(22, 31, 1) 15 -(22, 32, 1) 16 -(22, 33, 1) 16 -(22, 34, 1) 17 -(22, 35, 1) 17 -(22, 36, 1) 18 -(22, 37, 1) 18 -(22, 38, 1) 18 -(22, 39, 1) 19 -(22, 40, 1) 19 -(22, 41, 1) 20 -(22, 42, 1) 20 -(22, 43, 1) 20 -(22, 44, 1) 20 -(22, 45, 1) 20 -(22, 46, 1) 21 -(22, 47, 1) 21 -(22, 48, 1) 21 -(22, 49, 1) 21 -(22, 50, 1) 21 -(22, 51, 1) 21 -(22, 52, 1) 21 -(22, 53, 1) 21 -(22, 54, 1) 21 -(22, 55, 1) 21 -(22, 56, 1) 20 -(22, 57, 1) 20 -(22, 58, 1) 20 -(22, 59, 1) 20 -(22, 60, 1) 20 -(22, 61, 1) 19 -(22, 62, 1) 19 -(22, 63, 1) 18 -(22, 64, 1) 18 -(22, 65, 1) 18 -(22, 66, 1) 17 -(22, 67, 1) 17 -(22, 68, 1) 16 -(22, 69, 1) 16 -(22, 70, 1) 15 -(22, 71, 1) 15 -(22, 72, 1) 14 -(22, 73, 1) 13 -(22, 74, 1) 13 -(22, 75, 1) 12 -(22, 76, 1) 12 -(22, 77, 1) 11 -(22, 78, 1) 10 -(22, 79, 1) 9 -(22, 80, 1) 9 -(22, 81, 1) 8 -(22, 82, 1) 7 -(22, 83, 1) 7 -(22, 84, 1) 6 -(22, 85, 1) 5 -(22, 86, 1) 4 -(22, 87, 1) 4 -(22, 88, 1) 3 -(22, 89, 1) 2 -(22, 90, 1) 1 -(22, 91, 1) 1 -(22, 92, 1) 0 -(23, 9, 1) 0 -(23, 10, 1) 1 -(23, 11, 1) 2 -(23, 12, 1) 3 -(23, 13, 1) 3 -(23, 14, 1) 4 -(23, 15, 1) 5 -(23, 16, 1) 6 -(23, 17, 1) 7 -(23, 18, 1) 7 -(23, 19, 1) 8 -(23, 20, 1) 9 -(23, 21, 1) 9 -(23, 22, 1) 10 -(23, 23, 1) 11 -(23, 24, 1) 12 -(23, 25, 1) 12 -(23, 26, 1) 13 -(23, 27, 1) 14 -(23, 28, 1) 14 -(23, 29, 1) 15 -(23, 30, 1) 15 -(23, 31, 1) 16 -(23, 32, 1) 17 -(23, 33, 1) 17 -(23, 34, 1) 18 -(23, 35, 1) 18 -(23, 36, 1) 19 -(23, 37, 1) 19 -(23, 38, 1) 19 -(23, 39, 1) 20 -(23, 40, 1) 20 -(23, 41, 1) 20 -(23, 42, 1) 21 -(23, 43, 1) 21 -(23, 44, 1) 21 -(23, 45, 1) 21 -(23, 46, 1) 22 -(23, 47, 1) 22 -(23, 48, 1) 22 -(23, 49, 1) 22 -(23, 50, 1) 22 -(23, 51, 1) 22 -(23, 52, 1) 22 -(23, 53, 1) 22 -(23, 54, 1) 22 -(23, 55, 1) 22 -(23, 56, 1) 21 -(23, 57, 1) 21 -(23, 58, 1) 21 -(23, 59, 1) 21 -(23, 60, 1) 20 -(23, 61, 1) 20 -(23, 62, 1) 20 -(23, 63, 1) 19 -(23, 64, 1) 19 -(23, 65, 1) 19 -(23, 66, 1) 18 -(23, 67, 1) 18 -(23, 68, 1) 17 -(23, 69, 1) 17 -(23, 70, 1) 16 -(23, 71, 1) 15 -(23, 72, 1) 15 -(23, 73, 1) 14 -(23, 74, 1) 14 -(23, 75, 1) 13 -(23, 76, 1) 12 -(23, 77, 1) 12 -(23, 78, 1) 11 -(23, 79, 1) 10 -(23, 80, 1) 9 -(23, 81, 1) 9 -(23, 82, 1) 8 -(23, 83, 1) 7 -(23, 84, 1) 7 -(23, 85, 1) 6 -(23, 86, 1) 5 -(23, 87, 1) 4 -(23, 88, 1) 3 -(23, 89, 1) 3 -(23, 90, 1) 2 -(23, 91, 1) 1 -(23, 92, 1) 0 -(24, 9, 1) 1 -(24, 10, 1) 2 -(24, 11, 1) 2 -(24, 12, 1) 3 -(24, 13, 1) 4 -(24, 14, 1) 5 -(24, 15, 1) 6 -(24, 16, 1) 6 -(24, 17, 1) 7 -(24, 18, 1) 8 -(24, 19, 1) 9 -(24, 20, 1) 9 -(24, 21, 1) 10 -(24, 22, 1) 11 -(24, 23, 1) 12 -(24, 24, 1) 12 -(24, 25, 1) 13 -(24, 26, 1) 14 -(24, 27, 1) 14 -(24, 28, 1) 15 -(24, 29, 1) 16 -(24, 30, 1) 16 -(24, 31, 1) 17 -(24, 32, 1) 17 -(24, 33, 1) 18 -(24, 34, 1) 18 -(24, 35, 1) 19 -(24, 36, 1) 19 -(24, 37, 1) 20 -(24, 38, 1) 20 -(24, 39, 1) 21 -(24, 40, 1) 21 -(24, 41, 1) 21 -(24, 42, 1) 22 -(24, 43, 1) 22 -(24, 44, 1) 22 -(24, 45, 1) 22 -(24, 46, 1) 23 -(24, 47, 1) 23 -(24, 48, 1) 23 -(24, 49, 1) 23 -(24, 50, 1) 23 -(24, 51, 1) 23 -(24, 52, 1) 23 -(24, 53, 1) 23 -(24, 54, 1) 23 -(24, 55, 1) 23 -(24, 56, 1) 22 -(24, 57, 1) 22 -(24, 58, 1) 22 -(24, 59, 1) 22 -(24, 60, 1) 21 -(24, 61, 1) 21 -(24, 62, 1) 21 -(24, 63, 1) 20 -(24, 64, 1) 20 -(24, 65, 1) 19 -(24, 66, 1) 19 -(24, 67, 1) 18 -(24, 68, 1) 18 -(24, 69, 1) 17 -(24, 70, 1) 17 -(24, 71, 1) 16 -(24, 72, 1) 16 -(24, 73, 1) 15 -(24, 74, 1) 14 -(24, 75, 1) 14 -(24, 76, 1) 13 -(24, 77, 1) 12 -(24, 78, 1) 12 -(24, 79, 1) 11 -(24, 80, 1) 10 -(24, 81, 1) 9 -(24, 82, 1) 9 -(24, 83, 1) 8 -(24, 84, 1) 7 -(24, 85, 1) 6 -(24, 86, 1) 6 -(24, 87, 1) 5 -(24, 88, 1) 4 -(24, 89, 1) 3 -(24, 90, 1) 2 -(24, 91, 1) 2 -(24, 92, 1) 1 -(25, 9, 1) 1 -(25, 10, 1) 2 -(25, 11, 1) 3 -(25, 12, 1) 4 -(25, 13, 1) 5 -(25, 14, 1) 5 -(25, 15, 1) 6 -(25, 16, 1) 7 -(25, 17, 1) 8 -(25, 18, 1) 9 -(25, 19, 1) 9 -(25, 20, 1) 10 -(25, 21, 1) 11 -(25, 22, 1) 12 -(25, 23, 1) 12 -(25, 24, 1) 13 -(25, 25, 1) 14 -(25, 26, 1) 14 -(25, 27, 1) 15 -(25, 28, 1) 16 -(25, 29, 1) 16 -(25, 30, 1) 17 -(25, 31, 1) 18 -(25, 32, 1) 18 -(25, 33, 1) 19 -(25, 34, 1) 19 -(25, 35, 1) 20 -(25, 36, 1) 20 -(25, 37, 1) 21 -(25, 38, 1) 21 -(25, 39, 1) 22 -(25, 40, 1) 22 -(25, 41, 1) 22 -(25, 42, 1) 23 -(25, 43, 1) 23 -(25, 44, 1) 23 -(25, 45, 1) 23 -(25, 46, 1) 24 -(25, 47, 1) 24 -(25, 48, 1) 24 -(25, 49, 1) 24 -(25, 50, 1) 24 -(25, 51, 1) 24 -(25, 52, 1) 24 -(25, 53, 1) 24 -(25, 54, 1) 24 -(25, 55, 1) 24 -(25, 56, 1) 23 -(25, 57, 1) 23 -(25, 58, 1) 23 -(25, 59, 1) 23 -(25, 60, 1) 22 -(25, 61, 1) 22 -(25, 62, 1) 22 -(25, 63, 1) 21 -(25, 64, 1) 21 -(25, 65, 1) 20 -(25, 66, 1) 20 -(25, 67, 1) 19 -(25, 68, 1) 19 -(25, 69, 1) 18 -(25, 70, 1) 18 -(25, 71, 1) 17 -(25, 72, 1) 16 -(25, 73, 1) 16 -(25, 74, 1) 15 -(25, 75, 1) 14 -(25, 76, 1) 14 -(25, 77, 1) 13 -(25, 78, 1) 12 -(25, 79, 1) 12 -(25, 80, 1) 11 -(25, 81, 1) 10 -(25, 82, 1) 9 -(25, 83, 1) 9 -(25, 84, 1) 8 -(25, 85, 1) 7 -(25, 86, 1) 6 -(25, 87, 1) 5 -(25, 88, 1) 5 -(25, 89, 1) 4 -(25, 90, 1) 3 -(25, 91, 1) 2 -(25, 92, 1) 1 -(26, 6, 1) 0 -(26, 7, 1) 0 -(26, 8, 1) 1 -(26, 9, 1) 2 -(26, 10, 1) 3 -(26, 11, 1) 3 -(26, 12, 1) 4 -(26, 13, 1) 5 -(26, 14, 1) 6 -(26, 15, 1) 7 -(26, 16, 1) 7 -(26, 17, 1) 8 -(26, 18, 1) 9 -(26, 19, 1) 10 -(26, 20, 1) 11 -(26, 21, 1) 11 -(26, 22, 1) 12 -(26, 23, 1) 13 -(26, 24, 1) 14 -(26, 25, 1) 14 -(26, 26, 1) 15 -(26, 27, 1) 16 -(26, 28, 1) 16 -(26, 29, 1) 17 -(26, 30, 1) 18 -(26, 31, 1) 18 -(26, 32, 1) 19 -(26, 33, 1) 19 -(26, 34, 1) 20 -(26, 35, 1) 21 -(26, 36, 1) 21 -(26, 37, 1) 22 -(26, 38, 1) 22 -(26, 39, 1) 22 -(26, 40, 1) 23 -(26, 41, 1) 23 -(26, 42, 1) 24 -(26, 43, 1) 24 -(26, 44, 1) 24 -(26, 45, 1) 24 -(26, 46, 1) 25 -(26, 47, 1) 25 -(26, 48, 1) 25 -(26, 49, 1) 25 -(26, 50, 1) 25 -(26, 51, 1) 25 -(26, 52, 1) 25 -(26, 53, 1) 25 -(26, 54, 1) 25 -(26, 55, 1) 25 -(26, 56, 1) 24 -(26, 57, 1) 24 -(26, 58, 1) 24 -(26, 59, 1) 24 -(26, 60, 1) 23 -(26, 61, 1) 23 -(26, 62, 1) 22 -(26, 63, 1) 22 -(26, 64, 1) 22 -(26, 65, 1) 21 -(26, 66, 1) 21 -(26, 67, 1) 20 -(26, 68, 1) 19 -(26, 69, 1) 19 -(26, 70, 1) 18 -(26, 71, 1) 18 -(26, 72, 1) 17 -(26, 73, 1) 16 -(26, 74, 1) 16 -(26, 75, 1) 15 -(26, 76, 1) 14 -(26, 77, 1) 14 -(26, 78, 1) 13 -(26, 79, 1) 12 -(26, 80, 1) 11 -(26, 81, 1) 11 -(26, 82, 1) 10 -(26, 83, 1) 9 -(26, 84, 1) 8 -(26, 85, 1) 7 -(26, 86, 1) 7 -(26, 87, 1) 6 -(26, 88, 1) 5 -(26, 89, 1) 4 -(26, 90, 1) 3 -(26, 91, 1) 3 -(26, 92, 1) 2 -(26, 93, 1) 1 -(26, 94, 1) 0 -(26, 95, 1) 0 -(27, 6, 1) 0 -(27, 7, 1) 0 -(27, 8, 1) 1 -(27, 9, 1) 2 -(27, 10, 1) 3 -(27, 11, 1) 4 -(27, 12, 1) 5 -(27, 13, 1) 6 -(27, 14, 1) 6 -(27, 15, 1) 7 -(27, 16, 1) 8 -(27, 17, 1) 9 -(27, 18, 1) 10 -(27, 19, 1) 10 -(27, 20, 1) 11 -(27, 21, 1) 12 -(27, 22, 1) 13 -(27, 23, 1) 14 -(27, 24, 1) 14 -(27, 25, 1) 15 -(27, 26, 1) 16 -(27, 27, 1) 16 -(27, 28, 1) 17 -(27, 29, 1) 18 -(27, 30, 1) 18 -(27, 31, 1) 19 -(27, 32, 1) 20 -(27, 33, 1) 20 -(27, 34, 1) 21 -(27, 35, 1) 21 -(27, 36, 1) 22 -(27, 37, 1) 22 -(27, 38, 1) 23 -(27, 39, 1) 23 -(27, 40, 1) 24 -(27, 41, 1) 24 -(27, 42, 1) 25 -(27, 43, 1) 25 -(27, 44, 1) 25 -(27, 45, 1) 25 -(27, 46, 1) 26 -(27, 47, 1) 26 -(27, 48, 1) 26 -(27, 49, 1) 26 -(27, 50, 1) 26 -(27, 51, 1) 26 -(27, 52, 1) 26 -(27, 53, 1) 26 -(27, 54, 1) 26 -(27, 55, 1) 26 -(27, 56, 1) 25 -(27, 57, 1) 25 -(27, 58, 1) 25 -(27, 59, 1) 25 -(27, 60, 1) 24 -(27, 61, 1) 24 -(27, 62, 1) 23 -(27, 63, 1) 23 -(27, 64, 1) 22 -(27, 65, 1) 22 -(27, 66, 1) 21 -(27, 67, 1) 21 -(27, 68, 1) 20 -(27, 69, 1) 20 -(27, 70, 1) 19 -(27, 71, 1) 18 -(27, 72, 1) 18 -(27, 73, 1) 17 -(27, 74, 1) 16 -(27, 75, 1) 16 -(27, 76, 1) 15 -(27, 77, 1) 14 -(27, 78, 1) 14 -(27, 79, 1) 13 -(27, 80, 1) 12 -(27, 81, 1) 11 -(27, 82, 1) 10 -(27, 83, 1) 10 -(27, 84, 1) 9 -(27, 85, 1) 8 -(27, 86, 1) 7 -(27, 87, 1) 6 -(27, 88, 1) 6 -(27, 89, 1) 5 -(27, 90, 1) 4 -(27, 91, 1) 3 -(27, 92, 1) 2 -(27, 93, 1) 1 -(27, 94, 1) 0 -(27, 95, 1) 0 -(28, 6, 1) 0 -(28, 7, 1) 1 -(28, 8, 1) 2 -(28, 9, 1) 3 -(28, 10, 1) 4 -(28, 11, 1) 4 -(28, 12, 1) 5 -(28, 13, 1) 6 -(28, 14, 1) 7 -(28, 15, 1) 8 -(28, 16, 1) 9 -(28, 17, 1) 9 -(28, 18, 1) 10 -(28, 19, 1) 11 -(28, 20, 1) 12 -(28, 21, 1) 13 -(28, 22, 1) 13 -(28, 23, 1) 14 -(28, 24, 1) 15 -(28, 25, 1) 16 -(28, 26, 1) 16 -(28, 27, 1) 17 -(28, 28, 1) 18 -(28, 29, 1) 19 -(28, 30, 1) 19 -(28, 31, 1) 20 -(28, 32, 1) 20 -(28, 33, 1) 21 -(28, 34, 1) 22 -(28, 35, 1) 22 -(28, 36, 1) 23 -(28, 37, 1) 23 -(28, 38, 1) 24 -(28, 39, 1) 24 -(28, 40, 1) 25 -(28, 41, 1) 25 -(28, 42, 1) 25 -(28, 43, 1) 26 -(28, 44, 1) 26 -(28, 45, 1) 26 -(28, 46, 1) 27 -(28, 47, 1) 27 -(28, 48, 1) 27 -(28, 49, 1) 27 -(28, 50, 1) 27 -(28, 51, 1) 27 -(28, 52, 1) 27 -(28, 53, 1) 27 -(28, 54, 1) 27 -(28, 55, 1) 27 -(28, 56, 1) 26 -(28, 57, 1) 26 -(28, 58, 1) 26 -(28, 59, 1) 25 -(28, 60, 1) 25 -(28, 61, 1) 25 -(28, 62, 1) 24 -(28, 63, 1) 24 -(28, 64, 1) 23 -(28, 65, 1) 23 -(28, 66, 1) 22 -(28, 67, 1) 22 -(28, 68, 1) 21 -(28, 69, 1) 20 -(28, 70, 1) 20 -(28, 71, 1) 19 -(28, 72, 1) 19 -(28, 73, 1) 18 -(28, 74, 1) 17 -(28, 75, 1) 16 -(28, 76, 1) 16 -(28, 77, 1) 15 -(28, 78, 1) 14 -(28, 79, 1) 13 -(28, 80, 1) 13 -(28, 81, 1) 12 -(28, 82, 1) 11 -(28, 83, 1) 10 -(28, 84, 1) 9 -(28, 85, 1) 9 -(28, 86, 1) 8 -(28, 87, 1) 7 -(28, 88, 1) 6 -(28, 89, 1) 5 -(28, 90, 1) 4 -(28, 91, 1) 4 -(28, 92, 1) 3 -(28, 93, 1) 2 -(28, 94, 1) 1 -(28, 95, 1) 0 -(29, 6, 1) 1 -(29, 7, 1) 1 -(29, 8, 1) 2 -(29, 9, 1) 3 -(29, 10, 1) 4 -(29, 11, 1) 5 -(29, 12, 1) 6 -(29, 13, 1) 7 -(29, 14, 1) 7 -(29, 15, 1) 8 -(29, 16, 1) 9 -(29, 17, 1) 10 -(29, 18, 1) 11 -(29, 19, 1) 12 -(29, 20, 1) 12 -(29, 21, 1) 13 -(29, 22, 1) 14 -(29, 23, 1) 15 -(29, 24, 1) 16 -(29, 25, 1) 16 -(29, 26, 1) 17 -(29, 27, 1) 18 -(29, 28, 1) 19 -(29, 29, 1) 19 -(29, 30, 1) 20 -(29, 31, 1) 21 -(29, 32, 1) 21 -(29, 33, 1) 22 -(29, 34, 1) 23 -(29, 35, 1) 23 -(29, 36, 1) 24 -(29, 37, 1) 24 -(29, 38, 1) 25 -(29, 39, 1) 25 -(29, 40, 1) 26 -(29, 41, 1) 26 -(29, 42, 1) 26 -(29, 43, 1) 27 -(29, 44, 1) 27 -(29, 45, 1) 27 -(29, 46, 1) 28 -(29, 47, 1) 28 -(29, 48, 1) 28 -(29, 49, 1) 28 -(29, 50, 1) 28 -(29, 51, 1) 28 -(29, 52, 1) 28 -(29, 53, 1) 28 -(29, 54, 1) 28 -(29, 55, 1) 28 -(29, 56, 1) 27 -(29, 57, 1) 27 -(29, 58, 1) 27 -(29, 59, 1) 26 -(29, 60, 1) 26 -(29, 61, 1) 26 -(29, 62, 1) 25 -(29, 63, 1) 25 -(29, 64, 1) 24 -(29, 65, 1) 24 -(29, 66, 1) 23 -(29, 67, 1) 23 -(29, 68, 1) 22 -(29, 69, 1) 21 -(29, 70, 1) 21 -(29, 71, 1) 20 -(29, 72, 1) 19 -(29, 73, 1) 19 -(29, 74, 1) 18 -(29, 75, 1) 17 -(29, 76, 1) 16 -(29, 77, 1) 16 -(29, 78, 1) 15 -(29, 79, 1) 14 -(29, 80, 1) 13 -(29, 81, 1) 12 -(29, 82, 1) 12 -(29, 83, 1) 11 -(29, 84, 1) 10 -(29, 85, 1) 9 -(29, 86, 1) 8 -(29, 87, 1) 7 -(29, 88, 1) 7 -(29, 89, 1) 6 -(29, 90, 1) 5 -(29, 91, 1) 4 -(29, 92, 1) 3 -(29, 93, 1) 2 -(29, 94, 1) 1 -(29, 95, 1) 1 -(30, 6, 1) 1 -(30, 7, 1) 2 -(30, 8, 1) 3 -(30, 9, 1) 4 -(30, 10, 1) 5 -(30, 11, 1) 5 -(30, 12, 1) 6 -(30, 13, 1) 7 -(30, 14, 1) 8 -(30, 15, 1) 9 -(30, 16, 1) 10 -(30, 17, 1) 11 -(30, 18, 1) 11 -(30, 19, 1) 12 -(30, 20, 1) 13 -(30, 21, 1) 14 -(30, 22, 1) 15 -(30, 23, 1) 15 -(30, 24, 1) 16 -(30, 25, 1) 17 -(30, 26, 1) 18 -(30, 27, 1) 19 -(30, 28, 1) 19 -(30, 29, 1) 20 -(30, 30, 1) 21 -(30, 31, 1) 21 -(30, 32, 1) 22 -(30, 33, 1) 23 -(30, 34, 1) 23 -(30, 35, 1) 24 -(30, 36, 1) 24 -(30, 37, 1) 25 -(30, 38, 1) 26 -(30, 39, 1) 26 -(30, 40, 1) 27 -(30, 41, 1) 27 -(30, 42, 1) 27 -(30, 43, 1) 28 -(30, 44, 1) 28 -(30, 45, 1) 28 -(30, 46, 1) 29 -(30, 47, 1) 29 -(30, 48, 1) 29 -(30, 49, 1) 29 -(30, 50, 1) 29 -(30, 51, 1) 29 -(30, 52, 1) 29 -(30, 53, 1) 29 -(30, 54, 1) 29 -(30, 55, 1) 29 -(30, 56, 1) 28 -(30, 57, 1) 28 -(30, 58, 1) 28 -(30, 59, 1) 27 -(30, 60, 1) 27 -(30, 61, 1) 27 -(30, 62, 1) 26 -(30, 63, 1) 26 -(30, 64, 1) 25 -(30, 65, 1) 24 -(30, 66, 1) 24 -(30, 67, 1) 23 -(30, 68, 1) 23 -(30, 69, 1) 22 -(30, 70, 1) 21 -(30, 71, 1) 21 -(30, 72, 1) 20 -(30, 73, 1) 19 -(30, 74, 1) 19 -(30, 75, 1) 18 -(30, 76, 1) 17 -(30, 77, 1) 16 -(30, 78, 1) 15 -(30, 79, 1) 15 -(30, 80, 1) 14 -(30, 81, 1) 13 -(30, 82, 1) 12 -(30, 83, 1) 11 -(30, 84, 1) 11 -(30, 85, 1) 10 -(30, 86, 1) 9 -(30, 87, 1) 8 -(30, 88, 1) 7 -(30, 89, 1) 6 -(30, 90, 1) 5 -(30, 91, 1) 5 -(30, 92, 1) 4 -(30, 93, 1) 3 -(30, 94, 1) 2 -(30, 95, 1) 1 -(31, 6, 1) 1 -(31, 7, 1) 2 -(31, 8, 1) 3 -(31, 9, 1) 4 -(31, 10, 1) 5 -(31, 11, 1) 6 -(31, 12, 1) 7 -(31, 13, 1) 7 -(31, 14, 1) 8 -(31, 15, 1) 9 -(31, 16, 1) 10 -(31, 17, 1) 11 -(31, 18, 1) 12 -(31, 19, 1) 13 -(31, 20, 1) 13 -(31, 21, 1) 14 -(31, 22, 1) 15 -(31, 23, 1) 16 -(31, 24, 1) 17 -(31, 25, 1) 18 -(31, 26, 1) 18 -(31, 27, 1) 19 -(31, 28, 1) 20 -(31, 29, 1) 21 -(31, 30, 1) 21 -(31, 31, 1) 22 -(31, 32, 1) 23 -(31, 33, 1) 23 -(31, 34, 1) 24 -(31, 35, 1) 25 -(31, 36, 1) 25 -(31, 37, 1) 26 -(31, 38, 1) 26 -(31, 39, 1) 27 -(31, 40, 1) 27 -(31, 41, 1) 28 -(31, 42, 1) 28 -(31, 43, 1) 29 -(31, 44, 1) 29 -(31, 45, 1) 29 -(31, 46, 1) 30 -(31, 47, 1) 30 -(31, 48, 1) 30 -(31, 49, 1) 30 -(31, 50, 1) 30 -(31, 51, 1) 30 -(31, 52, 1) 30 -(31, 53, 1) 30 -(31, 54, 1) 30 -(31, 55, 1) 30 -(31, 56, 1) 29 -(31, 57, 1) 29 -(31, 58, 1) 29 -(31, 59, 1) 28 -(31, 60, 1) 28 -(31, 61, 1) 27 -(31, 62, 1) 27 -(31, 63, 1) 26 -(31, 64, 1) 26 -(31, 65, 1) 25 -(31, 66, 1) 25 -(31, 67, 1) 24 -(31, 68, 1) 23 -(31, 69, 1) 23 -(31, 70, 1) 22 -(31, 71, 1) 21 -(31, 72, 1) 21 -(31, 73, 1) 20 -(31, 74, 1) 19 -(31, 75, 1) 18 -(31, 76, 1) 18 -(31, 77, 1) 17 -(31, 78, 1) 16 -(31, 79, 1) 15 -(31, 80, 1) 14 -(31, 81, 1) 13 -(31, 82, 1) 13 -(31, 83, 1) 12 -(31, 84, 1) 11 -(31, 85, 1) 10 -(31, 86, 1) 9 -(31, 87, 1) 8 -(31, 88, 1) 7 -(31, 89, 1) 7 -(31, 90, 1) 6 -(31, 91, 1) 5 -(31, 92, 1) 4 -(31, 93, 1) 3 -(31, 94, 1) 2 -(31, 95, 1) 1 -(32, 6, 1) 2 -(32, 7, 1) 2 -(32, 8, 1) 3 -(32, 9, 1) 4 -(32, 10, 1) 5 -(32, 11, 1) 6 -(32, 12, 1) 7 -(32, 13, 1) 8 -(32, 14, 1) 9 -(32, 15, 1) 10 -(32, 16, 1) 11 -(32, 17, 1) 11 -(32, 18, 1) 12 -(32, 19, 1) 13 -(32, 20, 1) 14 -(32, 21, 1) 15 -(32, 22, 1) 16 -(32, 23, 1) 17 -(32, 24, 1) 17 -(32, 25, 1) 18 -(32, 26, 1) 19 -(32, 27, 1) 20 -(32, 28, 1) 20 -(32, 29, 1) 21 -(32, 30, 1) 22 -(32, 31, 1) 23 -(32, 32, 1) 23 -(32, 33, 1) 24 -(32, 34, 1) 25 -(32, 35, 1) 25 -(32, 36, 1) 26 -(32, 37, 1) 27 -(32, 38, 1) 27 -(32, 39, 1) 28 -(32, 40, 1) 28 -(32, 41, 1) 29 -(32, 42, 1) 29 -(32, 43, 1) 30 -(32, 44, 1) 30 -(32, 45, 1) 30 -(32, 46, 1) 30 -(32, 47, 1) 31 -(32, 48, 1) 31 -(32, 49, 1) 31 -(32, 50, 1) 31 -(32, 51, 1) 31 -(32, 52, 1) 31 -(32, 53, 1) 31 -(32, 54, 1) 31 -(32, 55, 1) 30 -(32, 56, 1) 30 -(32, 57, 1) 30 -(32, 58, 1) 30 -(32, 59, 1) 29 -(32, 60, 1) 29 -(32, 61, 1) 28 -(32, 62, 1) 28 -(32, 63, 1) 27 -(32, 64, 1) 27 -(32, 65, 1) 26 -(32, 66, 1) 25 -(32, 67, 1) 25 -(32, 68, 1) 24 -(32, 69, 1) 23 -(32, 70, 1) 23 -(32, 71, 1) 22 -(32, 72, 1) 21 -(32, 73, 1) 20 -(32, 74, 1) 20 -(32, 75, 1) 19 -(32, 76, 1) 18 -(32, 77, 1) 17 -(32, 78, 1) 17 -(32, 79, 1) 16 -(32, 80, 1) 15 -(32, 81, 1) 14 -(32, 82, 1) 13 -(32, 83, 1) 12 -(32, 84, 1) 11 -(32, 85, 1) 11 -(32, 86, 1) 10 -(32, 87, 1) 9 -(32, 88, 1) 8 -(32, 89, 1) 7 -(32, 90, 1) 6 -(32, 91, 1) 5 -(32, 92, 1) 4 -(32, 93, 1) 3 -(32, 94, 1) 2 -(32, 95, 1) 2 -(33, 6, 1) 2 -(33, 7, 1) 3 -(33, 8, 1) 4 -(33, 9, 1) 5 -(33, 10, 1) 6 -(33, 11, 1) 7 -(33, 12, 1) 7 -(33, 13, 1) 8 -(33, 14, 1) 9 -(33, 15, 1) 10 -(33, 16, 1) 11 -(33, 17, 1) 12 -(33, 18, 1) 13 -(33, 19, 1) 14 -(33, 20, 1) 15 -(33, 21, 1) 15 -(33, 22, 1) 16 -(33, 23, 1) 17 -(33, 24, 1) 18 -(33, 25, 1) 19 -(33, 26, 1) 20 -(33, 27, 1) 20 -(33, 28, 1) 21 -(33, 29, 1) 22 -(33, 30, 1) 23 -(33, 31, 1) 23 -(33, 32, 1) 24 -(33, 33, 1) 25 -(33, 34, 1) 26 -(33, 35, 1) 26 -(33, 36, 1) 27 -(33, 37, 1) 27 -(33, 38, 1) 28 -(33, 39, 1) 29 -(33, 40, 1) 29 -(33, 41, 1) 30 -(33, 42, 1) 30 -(33, 43, 1) 30 -(33, 44, 1) 31 -(33, 45, 1) 31 -(33, 46, 1) 31 -(33, 47, 1) 32 -(33, 48, 1) 32 -(33, 49, 1) 32 -(33, 50, 1) 32 -(33, 51, 1) 32 -(33, 52, 1) 32 -(33, 53, 1) 32 -(33, 54, 1) 32 -(33, 55, 1) 31 -(33, 56, 1) 31 -(33, 57, 1) 31 -(33, 58, 1) 30 -(33, 59, 1) 30 -(33, 60, 1) 30 -(33, 61, 1) 29 -(33, 62, 1) 29 -(33, 63, 1) 28 -(33, 64, 1) 27 -(33, 65, 1) 27 -(33, 66, 1) 26 -(33, 67, 1) 26 -(33, 68, 1) 25 -(33, 69, 1) 24 -(33, 70, 1) 23 -(33, 71, 1) 23 -(33, 72, 1) 22 -(33, 73, 1) 21 -(33, 74, 1) 20 -(33, 75, 1) 20 -(33, 76, 1) 19 -(33, 77, 1) 18 -(33, 78, 1) 17 -(33, 79, 1) 16 -(33, 80, 1) 15 -(33, 81, 1) 15 -(33, 82, 1) 14 -(33, 83, 1) 13 -(33, 84, 1) 12 -(33, 85, 1) 11 -(33, 86, 1) 10 -(33, 87, 1) 9 -(33, 88, 1) 8 -(33, 89, 1) 7 -(33, 90, 1) 7 -(33, 91, 1) 6 -(33, 92, 1) 5 -(33, 93, 1) 4 -(33, 94, 1) 3 -(33, 95, 1) 2 -(34, 6, 1) 2 -(34, 7, 1) 3 -(34, 8, 1) 4 -(34, 9, 1) 5 -(34, 10, 1) 6 -(34, 11, 1) 7 -(34, 12, 1) 8 -(34, 13, 1) 9 -(34, 14, 1) 10 -(34, 15, 1) 11 -(34, 16, 1) 11 -(34, 17, 1) 12 -(34, 18, 1) 13 -(34, 19, 1) 14 -(34, 20, 1) 15 -(34, 21, 1) 16 -(34, 22, 1) 17 -(34, 23, 1) 18 -(34, 24, 1) 18 -(34, 25, 1) 19 -(34, 26, 1) 20 -(34, 27, 1) 21 -(34, 28, 1) 22 -(34, 29, 1) 23 -(34, 30, 1) 23 -(34, 31, 1) 24 -(34, 32, 1) 25 -(34, 33, 1) 26 -(34, 34, 1) 26 -(34, 35, 1) 27 -(34, 36, 1) 28 -(34, 37, 1) 28 -(34, 38, 1) 29 -(34, 39, 1) 29 -(34, 40, 1) 30 -(34, 41, 1) 30 -(34, 42, 1) 31 -(34, 43, 1) 31 -(34, 44, 1) 32 -(34, 45, 1) 32 -(34, 46, 1) 32 -(34, 47, 1) 33 -(34, 48, 1) 33 -(34, 49, 1) 33 -(34, 50, 1) 33 -(34, 51, 1) 33 -(34, 52, 1) 33 -(34, 53, 1) 33 -(34, 54, 1) 33 -(34, 55, 1) 32 -(34, 56, 1) 32 -(34, 57, 1) 32 -(34, 58, 1) 31 -(34, 59, 1) 31 -(34, 60, 1) 30 -(34, 61, 1) 30 -(34, 62, 1) 29 -(34, 63, 1) 29 -(34, 64, 1) 28 -(34, 65, 1) 28 -(34, 66, 1) 27 -(34, 67, 1) 26 -(34, 68, 1) 26 -(34, 69, 1) 25 -(34, 70, 1) 24 -(34, 71, 1) 23 -(34, 72, 1) 23 -(34, 73, 1) 22 -(34, 74, 1) 21 -(34, 75, 1) 20 -(34, 76, 1) 19 -(34, 77, 1) 18 -(34, 78, 1) 18 -(34, 79, 1) 17 -(34, 80, 1) 16 -(34, 81, 1) 15 -(34, 82, 1) 14 -(34, 83, 1) 13 -(34, 84, 1) 12 -(34, 85, 1) 11 -(34, 86, 1) 11 -(34, 87, 1) 10 -(34, 88, 1) 9 -(34, 89, 1) 8 -(34, 90, 1) 7 -(34, 91, 1) 6 -(34, 92, 1) 5 -(34, 93, 1) 4 -(34, 94, 1) 3 -(34, 95, 1) 2 -(35, 6, 1) 3 -(35, 7, 1) 4 -(35, 8, 1) 5 -(35, 9, 1) 6 -(35, 10, 1) 6 -(35, 11, 1) 7 -(35, 12, 1) 8 -(35, 13, 1) 9 -(35, 14, 1) 10 -(35, 15, 1) 11 -(35, 16, 1) 12 -(35, 17, 1) 13 -(35, 18, 1) 14 -(35, 19, 1) 15 -(35, 20, 1) 16 -(35, 21, 1) 16 -(35, 22, 1) 17 -(35, 23, 1) 18 -(35, 24, 1) 19 -(35, 25, 1) 20 -(35, 26, 1) 21 -(35, 27, 1) 21 -(35, 28, 1) 22 -(35, 29, 1) 23 -(35, 30, 1) 24 -(35, 31, 1) 25 -(35, 32, 1) 25 -(35, 33, 1) 26 -(35, 34, 1) 27 -(35, 35, 1) 28 -(35, 36, 1) 28 -(35, 37, 1) 29 -(35, 38, 1) 30 -(35, 39, 1) 30 -(35, 40, 1) 31 -(35, 41, 1) 31 -(35, 42, 1) 32 -(35, 43, 1) 32 -(35, 44, 1) 33 -(35, 45, 1) 33 -(35, 46, 1) 33 -(35, 47, 1) 34 -(35, 48, 1) 34 -(35, 49, 1) 34 -(35, 50, 1) 34 -(35, 51, 1) 34 -(35, 52, 1) 34 -(35, 53, 1) 34 -(35, 54, 1) 34 -(35, 55, 1) 33 -(35, 56, 1) 33 -(35, 57, 1) 33 -(35, 58, 1) 32 -(35, 59, 1) 32 -(35, 60, 1) 31 -(35, 61, 1) 31 -(35, 62, 1) 30 -(35, 63, 1) 30 -(35, 64, 1) 29 -(35, 65, 1) 28 -(35, 66, 1) 28 -(35, 67, 1) 27 -(35, 68, 1) 26 -(35, 69, 1) 25 -(35, 70, 1) 25 -(35, 71, 1) 24 -(35, 72, 1) 23 -(35, 73, 1) 22 -(35, 74, 1) 21 -(35, 75, 1) 21 -(35, 76, 1) 20 -(35, 77, 1) 19 -(35, 78, 1) 18 -(35, 79, 1) 17 -(35, 80, 1) 16 -(35, 81, 1) 16 -(35, 82, 1) 15 -(35, 83, 1) 14 -(35, 84, 1) 13 -(35, 85, 1) 12 -(35, 86, 1) 11 -(35, 87, 1) 10 -(35, 88, 1) 9 -(35, 89, 1) 8 -(35, 90, 1) 7 -(35, 91, 1) 6 -(35, 92, 1) 6 -(35, 93, 1) 5 -(35, 94, 1) 4 -(35, 95, 1) 3 -(36, 4, 1) 1 -(36, 5, 1) 2 -(36, 6, 1) 3 -(36, 7, 1) 4 -(36, 8, 1) 5 -(36, 9, 1) 6 -(36, 10, 1) 7 -(36, 11, 1) 8 -(36, 12, 1) 8 -(36, 13, 1) 9 -(36, 14, 1) 10 -(36, 15, 1) 11 -(36, 16, 1) 12 -(36, 17, 1) 13 -(36, 18, 1) 14 -(36, 19, 1) 15 -(36, 20, 1) 16 -(36, 21, 1) 17 -(36, 22, 1) 18 -(36, 23, 1) 19 -(36, 24, 1) 19 -(36, 25, 1) 20 -(36, 26, 1) 21 -(36, 27, 1) 22 -(36, 28, 1) 23 -(36, 29, 1) 24 -(36, 30, 1) 24 -(36, 31, 1) 25 -(36, 32, 1) 26 -(36, 33, 1) 27 -(36, 34, 1) 28 -(36, 35, 1) 28 -(36, 36, 1) 29 -(36, 37, 1) 30 -(36, 38, 1) 30 -(36, 39, 1) 31 -(36, 40, 1) 32 -(36, 41, 1) 32 -(36, 42, 1) 33 -(36, 43, 1) 33 -(36, 44, 1) 34 -(36, 45, 1) 34 -(36, 46, 1) 34 -(36, 47, 1) 35 -(36, 48, 1) 35 -(36, 49, 1) 35 -(36, 50, 1) 35 -(36, 51, 1) 35 -(36, 52, 1) 35 -(36, 53, 1) 35 -(36, 54, 1) 35 -(36, 55, 1) 34 -(36, 56, 1) 34 -(36, 57, 1) 34 -(36, 58, 1) 33 -(36, 59, 1) 33 -(36, 60, 1) 32 -(36, 61, 1) 32 -(36, 62, 1) 31 -(36, 63, 1) 30 -(36, 64, 1) 30 -(36, 65, 1) 29 -(36, 66, 1) 28 -(36, 67, 1) 28 -(36, 68, 1) 27 -(36, 69, 1) 26 -(36, 70, 1) 25 -(36, 71, 1) 24 -(36, 72, 1) 24 -(36, 73, 1) 23 -(36, 74, 1) 22 -(36, 75, 1) 21 -(36, 76, 1) 20 -(36, 77, 1) 19 -(36, 78, 1) 19 -(36, 79, 1) 18 -(36, 80, 1) 17 -(36, 81, 1) 16 -(36, 82, 1) 15 -(36, 83, 1) 14 -(36, 84, 1) 13 -(36, 85, 1) 12 -(36, 86, 1) 11 -(36, 87, 1) 10 -(36, 88, 1) 9 -(36, 89, 1) 8 -(36, 90, 1) 8 -(36, 91, 1) 7 -(36, 92, 1) 6 -(36, 93, 1) 5 -(36, 94, 1) 4 -(36, 95, 1) 3 -(36, 96, 1) 2 -(36, 97, 1) 1 -(37, 4, 1) 1 -(37, 5, 1) 2 -(37, 6, 1) 3 -(37, 7, 1) 4 -(37, 8, 1) 5 -(37, 9, 1) 6 -(37, 10, 1) 7 -(37, 11, 1) 8 -(37, 12, 1) 9 -(37, 13, 1) 10 -(37, 14, 1) 11 -(37, 15, 1) 12 -(37, 16, 1) 13 -(37, 17, 1) 14 -(37, 18, 1) 14 -(37, 19, 1) 15 -(37, 20, 1) 16 -(37, 21, 1) 17 -(37, 22, 1) 18 -(37, 23, 1) 19 -(37, 24, 1) 20 -(37, 25, 1) 21 -(37, 26, 1) 22 -(37, 27, 1) 22 -(37, 28, 1) 23 -(37, 29, 1) 24 -(37, 30, 1) 25 -(37, 31, 1) 26 -(37, 32, 1) 27 -(37, 33, 1) 27 -(37, 34, 1) 28 -(37, 35, 1) 29 -(37, 36, 1) 30 -(37, 37, 1) 30 -(37, 38, 1) 31 -(37, 39, 1) 32 -(37, 40, 1) 32 -(37, 41, 1) 33 -(37, 42, 1) 34 -(37, 43, 1) 34 -(37, 44, 1) 35 -(37, 45, 1) 35 -(37, 46, 1) 35 -(37, 47, 1) 36 -(37, 48, 1) 36 -(37, 49, 1) 36 -(37, 50, 1) 36 -(37, 51, 1) 36 -(37, 52, 1) 36 -(37, 53, 1) 36 -(37, 54, 1) 36 -(37, 55, 1) 35 -(37, 56, 1) 35 -(37, 57, 1) 35 -(37, 58, 1) 34 -(37, 59, 1) 34 -(37, 60, 1) 33 -(37, 61, 1) 32 -(37, 62, 1) 32 -(37, 63, 1) 31 -(37, 64, 1) 30 -(37, 65, 1) 30 -(37, 66, 1) 29 -(37, 67, 1) 28 -(37, 68, 1) 27 -(37, 69, 1) 27 -(37, 70, 1) 26 -(37, 71, 1) 25 -(37, 72, 1) 24 -(37, 73, 1) 23 -(37, 74, 1) 22 -(37, 75, 1) 22 -(37, 76, 1) 21 -(37, 77, 1) 20 -(37, 78, 1) 19 -(37, 79, 1) 18 -(37, 80, 1) 17 -(37, 81, 1) 16 -(37, 82, 1) 15 -(37, 83, 1) 14 -(37, 84, 1) 14 -(37, 85, 1) 13 -(37, 86, 1) 12 -(37, 87, 1) 11 -(37, 88, 1) 10 -(37, 89, 1) 9 -(37, 90, 1) 8 -(37, 91, 1) 7 -(37, 92, 1) 6 -(37, 93, 1) 5 -(37, 94, 1) 4 -(37, 95, 1) 3 -(37, 96, 1) 2 -(37, 97, 1) 1 -(38, 4, 1) 2 -(38, 5, 1) 3 -(38, 6, 1) 3 -(38, 7, 1) 4 -(38, 8, 1) 5 -(38, 9, 1) 6 -(38, 10, 1) 7 -(38, 11, 1) 8 -(38, 12, 1) 9 -(38, 13, 1) 10 -(38, 14, 1) 11 -(38, 15, 1) 12 -(38, 16, 1) 13 -(38, 17, 1) 14 -(38, 18, 1) 15 -(38, 19, 1) 16 -(38, 20, 1) 17 -(38, 21, 1) 18 -(38, 22, 1) 18 -(38, 23, 1) 19 -(38, 24, 1) 20 -(38, 25, 1) 21 -(38, 26, 1) 22 -(38, 27, 1) 23 -(38, 28, 1) 24 -(38, 29, 1) 25 -(38, 30, 1) 26 -(38, 31, 1) 26 -(38, 32, 1) 27 -(38, 33, 1) 28 -(38, 34, 1) 29 -(38, 35, 1) 30 -(38, 36, 1) 30 -(38, 37, 1) 31 -(38, 38, 1) 32 -(38, 39, 1) 33 -(38, 40, 1) 33 -(38, 41, 1) 34 -(38, 42, 1) 34 -(38, 43, 1) 35 -(38, 44, 1) 35 -(38, 45, 1) 36 -(38, 46, 1) 36 -(38, 47, 1) 37 -(38, 48, 1) 37 -(38, 49, 1) 37 -(38, 50, 1) 37 -(38, 51, 1) 37 -(38, 52, 1) 37 -(38, 53, 1) 37 -(38, 54, 1) 37 -(38, 55, 1) 36 -(38, 56, 1) 36 -(38, 57, 1) 35 -(38, 58, 1) 35 -(38, 59, 1) 34 -(38, 60, 1) 34 -(38, 61, 1) 33 -(38, 62, 1) 33 -(38, 63, 1) 32 -(38, 64, 1) 31 -(38, 65, 1) 30 -(38, 66, 1) 30 -(38, 67, 1) 29 -(38, 68, 1) 28 -(38, 69, 1) 27 -(38, 70, 1) 26 -(38, 71, 1) 26 -(38, 72, 1) 25 -(38, 73, 1) 24 -(38, 74, 1) 23 -(38, 75, 1) 22 -(38, 76, 1) 21 -(38, 77, 1) 20 -(38, 78, 1) 19 -(38, 79, 1) 18 -(38, 80, 1) 18 -(38, 81, 1) 17 -(38, 82, 1) 16 -(38, 83, 1) 15 -(38, 84, 1) 14 -(38, 85, 1) 13 -(38, 86, 1) 12 -(38, 87, 1) 11 -(38, 88, 1) 10 -(38, 89, 1) 9 -(38, 90, 1) 8 -(38, 91, 1) 7 -(38, 92, 1) 6 -(38, 93, 1) 5 -(38, 94, 1) 4 -(38, 95, 1) 3 -(38, 96, 1) 3 -(38, 97, 1) 2 -(39, 4, 1) 2 -(39, 5, 1) 3 -(39, 6, 1) 4 -(39, 7, 1) 5 -(39, 8, 1) 6 -(39, 9, 1) 7 -(39, 10, 1) 8 -(39, 11, 1) 9 -(39, 12, 1) 9 -(39, 13, 1) 10 -(39, 14, 1) 11 -(39, 15, 1) 12 -(39, 16, 1) 13 -(39, 17, 1) 14 -(39, 18, 1) 15 -(39, 19, 1) 16 -(39, 20, 1) 17 -(39, 21, 1) 18 -(39, 22, 1) 19 -(39, 23, 1) 20 -(39, 24, 1) 21 -(39, 25, 1) 22 -(39, 26, 1) 23 -(39, 27, 1) 23 -(39, 28, 1) 24 -(39, 29, 1) 25 -(39, 30, 1) 26 -(39, 31, 1) 27 -(39, 32, 1) 28 -(39, 33, 1) 29 -(39, 34, 1) 29 -(39, 35, 1) 30 -(39, 36, 1) 31 -(39, 37, 1) 32 -(39, 38, 1) 33 -(39, 39, 1) 33 -(39, 40, 1) 34 -(39, 41, 1) 35 -(39, 42, 1) 35 -(39, 43, 1) 36 -(39, 44, 1) 36 -(39, 45, 1) 37 -(39, 46, 1) 37 -(39, 47, 1) 37 -(39, 48, 1) 38 -(39, 49, 1) 38 -(39, 50, 1) 38 -(39, 51, 1) 38 -(39, 52, 1) 38 -(39, 53, 1) 38 -(39, 54, 1) 37 -(39, 55, 1) 37 -(39, 56, 1) 37 -(39, 57, 1) 36 -(39, 58, 1) 36 -(39, 59, 1) 35 -(39, 60, 1) 35 -(39, 61, 1) 34 -(39, 62, 1) 33 -(39, 63, 1) 33 -(39, 64, 1) 32 -(39, 65, 1) 31 -(39, 66, 1) 30 -(39, 67, 1) 29 -(39, 68, 1) 29 -(39, 69, 1) 28 -(39, 70, 1) 27 -(39, 71, 1) 26 -(39, 72, 1) 25 -(39, 73, 1) 24 -(39, 74, 1) 23 -(39, 75, 1) 23 -(39, 76, 1) 22 -(39, 77, 1) 21 -(39, 78, 1) 20 -(39, 79, 1) 19 -(39, 80, 1) 18 -(39, 81, 1) 17 -(39, 82, 1) 16 -(39, 83, 1) 15 -(39, 84, 1) 14 -(39, 85, 1) 13 -(39, 86, 1) 12 -(39, 87, 1) 11 -(39, 88, 1) 10 -(39, 89, 1) 9 -(39, 90, 1) 9 -(39, 91, 1) 8 -(39, 92, 1) 7 -(39, 93, 1) 6 -(39, 94, 1) 5 -(39, 95, 1) 4 -(39, 96, 1) 3 -(39, 97, 1) 2 -(40, 4, 1) 2 -(40, 5, 1) 3 -(40, 6, 1) 4 -(40, 7, 1) 5 -(40, 8, 1) 6 -(40, 9, 1) 7 -(40, 10, 1) 8 -(40, 11, 1) 9 -(40, 12, 1) 10 -(40, 13, 1) 11 -(40, 14, 1) 12 -(40, 15, 1) 13 -(40, 16, 1) 14 -(40, 17, 1) 15 -(40, 18, 1) 16 -(40, 19, 1) 16 -(40, 20, 1) 17 -(40, 21, 1) 18 -(40, 22, 1) 19 -(40, 23, 1) 20 -(40, 24, 1) 21 -(40, 25, 1) 22 -(40, 26, 1) 23 -(40, 27, 1) 24 -(40, 28, 1) 25 -(40, 29, 1) 26 -(40, 30, 1) 27 -(40, 31, 1) 27 -(40, 32, 1) 28 -(40, 33, 1) 29 -(40, 34, 1) 30 -(40, 35, 1) 31 -(40, 36, 1) 32 -(40, 37, 1) 32 -(40, 38, 1) 33 -(40, 39, 1) 34 -(40, 40, 1) 35 -(40, 41, 1) 35 -(40, 42, 1) 36 -(40, 43, 1) 37 -(40, 44, 1) 37 -(40, 45, 1) 38 -(40, 56, 1) 38 -(40, 57, 1) 37 -(40, 58, 1) 37 -(40, 59, 1) 36 -(40, 60, 1) 35 -(40, 61, 1) 35 -(40, 62, 1) 34 -(40, 63, 1) 33 -(40, 64, 1) 32 -(40, 65, 1) 32 -(40, 66, 1) 31 -(40, 67, 1) 30 -(40, 68, 1) 29 -(40, 69, 1) 28 -(40, 70, 1) 27 -(40, 71, 1) 27 -(40, 72, 1) 26 -(40, 73, 1) 25 -(40, 74, 1) 24 -(40, 75, 1) 23 -(40, 76, 1) 22 -(40, 77, 1) 21 -(40, 78, 1) 20 -(40, 79, 1) 19 -(40, 80, 1) 18 -(40, 81, 1) 17 -(40, 82, 1) 16 -(40, 83, 1) 16 -(40, 84, 1) 15 -(40, 85, 1) 14 -(40, 86, 1) 13 -(40, 87, 1) 12 -(40, 88, 1) 11 -(40, 89, 1) 10 -(40, 90, 1) 9 -(40, 91, 1) 8 -(40, 92, 1) 7 -(40, 93, 1) 6 -(40, 94, 1) 5 -(40, 95, 1) 4 -(40, 96, 1) 3 -(40, 97, 1) 2 -(41, 1, 1) 0 -(41, 2, 1) 0 -(41, 3, 1) 1 -(41, 4, 1) 2 -(41, 5, 1) 3 -(41, 6, 1) 4 -(41, 7, 1) 5 -(41, 8, 1) 6 -(41, 9, 1) 7 -(41, 10, 1) 8 -(41, 11, 1) 9 -(41, 12, 1) 10 -(41, 13, 1) 11 -(41, 14, 1) 12 -(41, 15, 1) 13 -(41, 16, 1) 14 -(41, 17, 1) 15 -(41, 18, 1) 16 -(41, 19, 1) 17 -(41, 20, 1) 18 -(41, 21, 1) 19 -(41, 22, 1) 20 -(41, 23, 1) 20 -(41, 24, 1) 21 -(41, 25, 1) 22 -(41, 26, 1) 23 -(41, 27, 1) 24 -(41, 28, 1) 25 -(41, 29, 1) 26 -(41, 30, 1) 27 -(41, 31, 1) 28 -(41, 32, 1) 29 -(41, 33, 1) 30 -(41, 34, 1) 30 -(41, 35, 1) 31 -(41, 36, 1) 32 -(41, 37, 1) 33 -(41, 38, 1) 34 -(41, 39, 1) 35 -(41, 40, 1) 35 -(41, 41, 1) 36 -(41, 42, 1) 37 -(41, 43, 1) 37 -(41, 58, 1) 37 -(41, 59, 1) 37 -(41, 60, 1) 36 -(41, 61, 1) 35 -(41, 62, 1) 35 -(41, 63, 1) 34 -(41, 64, 1) 33 -(41, 65, 1) 32 -(41, 66, 1) 31 -(41, 67, 1) 30 -(41, 68, 1) 30 -(41, 69, 1) 29 -(41, 70, 1) 28 -(41, 71, 1) 27 -(41, 72, 1) 26 -(41, 73, 1) 25 -(41, 74, 1) 24 -(41, 75, 1) 23 -(41, 76, 1) 22 -(41, 77, 1) 21 -(41, 78, 1) 20 -(41, 79, 1) 20 -(41, 80, 1) 19 -(41, 81, 1) 18 -(41, 82, 1) 17 -(41, 83, 1) 16 -(41, 84, 1) 15 -(41, 85, 1) 14 -(41, 86, 1) 13 -(41, 87, 1) 12 -(41, 88, 1) 11 -(41, 89, 1) 10 -(41, 90, 1) 9 -(41, 91, 1) 8 -(41, 92, 1) 7 -(41, 93, 1) 6 -(41, 94, 1) 5 -(41, 95, 1) 4 -(41, 96, 1) 3 -(41, 97, 1) 2 -(41, 98, 1) 1 -(41, 99, 1) 0 -(41, 100, 1) 0 -(42, 1, 1) 0 -(42, 2, 1) 0 -(42, 3, 1) 1 -(42, 4, 1) 2 -(42, 5, 1) 3 -(42, 6, 1) 4 -(42, 7, 1) 5 -(42, 8, 1) 6 -(42, 9, 1) 7 -(42, 10, 1) 8 -(42, 11, 1) 9 -(42, 12, 1) 10 -(42, 13, 1) 11 -(42, 14, 1) 12 -(42, 15, 1) 13 -(42, 16, 1) 14 -(42, 17, 1) 15 -(42, 18, 1) 16 -(42, 19, 1) 17 -(42, 20, 1) 18 -(42, 21, 1) 19 -(42, 22, 1) 20 -(42, 23, 1) 21 -(42, 24, 1) 22 -(42, 25, 1) 23 -(42, 26, 1) 24 -(42, 27, 1) 25 -(42, 28, 1) 25 -(42, 29, 1) 26 -(42, 30, 1) 27 -(42, 31, 1) 28 -(42, 32, 1) 29 -(42, 33, 1) 30 -(42, 34, 1) 31 -(42, 35, 1) 32 -(42, 36, 1) 33 -(42, 37, 1) 34 -(42, 38, 1) 34 -(42, 39, 1) 35 -(42, 40, 1) 36 -(42, 41, 1) 37 -(42, 42, 1) 38 -(42, 59, 1) 38 -(42, 60, 1) 37 -(42, 61, 1) 36 -(42, 62, 1) 35 -(42, 63, 1) 34 -(42, 64, 1) 34 -(42, 65, 1) 33 -(42, 66, 1) 32 -(42, 67, 1) 31 -(42, 68, 1) 30 -(42, 69, 1) 29 -(42, 70, 1) 28 -(42, 71, 1) 27 -(42, 72, 1) 26 -(42, 73, 1) 25 -(42, 74, 1) 25 -(42, 75, 1) 24 -(42, 76, 1) 23 -(42, 77, 1) 22 -(42, 78, 1) 21 -(42, 79, 1) 20 -(42, 80, 1) 19 -(42, 81, 1) 18 -(42, 82, 1) 17 -(42, 83, 1) 16 -(42, 84, 1) 15 -(42, 85, 1) 14 -(42, 86, 1) 13 -(42, 87, 1) 12 -(42, 88, 1) 11 -(42, 89, 1) 10 -(42, 90, 1) 9 -(42, 91, 1) 8 -(42, 92, 1) 7 -(42, 93, 1) 6 -(42, 94, 1) 5 -(42, 95, 1) 4 -(42, 96, 1) 3 -(42, 97, 1) 2 -(42, 98, 1) 1 -(42, 99, 1) 0 -(42, 100, 1) 0 -(43, 1, 1) 0 -(43, 2, 1) 1 -(43, 3, 1) 2 -(43, 4, 1) 3 -(43, 5, 1) 4 -(43, 6, 1) 4 -(43, 7, 1) 5 -(43, 8, 1) 6 -(43, 9, 1) 7 -(43, 10, 1) 8 -(43, 11, 1) 9 -(43, 12, 1) 10 -(43, 13, 1) 11 -(43, 14, 1) 12 -(43, 15, 1) 13 -(43, 16, 1) 14 -(43, 17, 1) 15 -(43, 18, 1) 16 -(43, 19, 1) 17 -(43, 20, 1) 18 -(43, 21, 1) 19 -(43, 22, 1) 20 -(43, 23, 1) 21 -(43, 24, 1) 22 -(43, 25, 1) 23 -(43, 26, 1) 24 -(43, 27, 1) 25 -(43, 28, 1) 26 -(43, 29, 1) 27 -(43, 30, 1) 28 -(43, 31, 1) 29 -(43, 32, 1) 30 -(43, 33, 1) 30 -(43, 34, 1) 31 -(43, 35, 1) 32 -(43, 36, 1) 33 -(43, 37, 1) 34 -(43, 38, 1) 35 -(43, 39, 1) 36 -(43, 40, 1) 37 -(43, 41, 1) 37 -(43, 60, 1) 37 -(43, 61, 1) 37 -(43, 62, 1) 36 -(43, 63, 1) 35 -(43, 64, 1) 34 -(43, 65, 1) 33 -(43, 66, 1) 32 -(43, 67, 1) 31 -(43, 68, 1) 30 -(43, 69, 1) 30 -(43, 70, 1) 29 -(43, 71, 1) 28 -(43, 72, 1) 27 -(43, 73, 1) 26 -(43, 74, 1) 25 -(43, 75, 1) 24 -(43, 76, 1) 23 -(43, 77, 1) 22 -(43, 78, 1) 21 -(43, 79, 1) 20 -(43, 80, 1) 19 -(43, 81, 1) 18 -(43, 82, 1) 17 -(43, 83, 1) 16 -(43, 84, 1) 15 -(43, 85, 1) 14 -(43, 86, 1) 13 -(43, 87, 1) 12 -(43, 88, 1) 11 -(43, 89, 1) 10 -(43, 90, 1) 9 -(43, 91, 1) 8 -(43, 92, 1) 7 -(43, 93, 1) 6 -(43, 94, 1) 5 -(43, 95, 1) 4 -(43, 96, 1) 4 -(43, 97, 1) 3 -(43, 98, 1) 2 -(43, 99, 1) 1 -(43, 100, 1) 0 -(44, 1, 1) 0 -(44, 2, 1) 1 -(44, 3, 1) 2 -(44, 4, 1) 3 -(44, 5, 1) 4 -(44, 6, 1) 5 -(44, 7, 1) 6 -(44, 8, 1) 7 -(44, 9, 1) 8 -(44, 10, 1) 9 -(44, 11, 1) 10 -(44, 12, 1) 11 -(44, 13, 1) 12 -(44, 14, 1) 13 -(44, 15, 1) 14 -(44, 16, 1) 14 -(44, 17, 1) 15 -(44, 18, 1) 16 -(44, 19, 1) 17 -(44, 20, 1) 18 -(44, 21, 1) 19 -(44, 22, 1) 20 -(44, 23, 1) 21 -(44, 24, 1) 22 -(44, 25, 1) 23 -(44, 26, 1) 24 -(44, 27, 1) 25 -(44, 28, 1) 26 -(44, 29, 1) 27 -(44, 30, 1) 28 -(44, 31, 1) 29 -(44, 32, 1) 30 -(44, 33, 1) 31 -(44, 34, 1) 32 -(44, 35, 1) 33 -(44, 36, 1) 34 -(44, 37, 1) 35 -(44, 38, 1) 35 -(44, 39, 1) 36 -(44, 40, 1) 37 -(44, 61, 1) 37 -(44, 62, 1) 36 -(44, 63, 1) 35 -(44, 64, 1) 35 -(44, 65, 1) 34 -(44, 66, 1) 33 -(44, 67, 1) 32 -(44, 68, 1) 31 -(44, 69, 1) 30 -(44, 70, 1) 29 -(44, 71, 1) 28 -(44, 72, 1) 27 -(44, 73, 1) 26 -(44, 74, 1) 25 -(44, 75, 1) 24 -(44, 76, 1) 23 -(44, 77, 1) 22 -(44, 78, 1) 21 -(44, 79, 1) 20 -(44, 80, 1) 19 -(44, 81, 1) 18 -(44, 82, 1) 17 -(44, 83, 1) 16 -(44, 84, 1) 15 -(44, 85, 1) 14 -(44, 86, 1) 14 -(44, 87, 1) 13 -(44, 88, 1) 12 -(44, 89, 1) 11 -(44, 90, 1) 10 -(44, 91, 1) 9 -(44, 92, 1) 8 -(44, 93, 1) 7 -(44, 94, 1) 6 -(44, 95, 1) 5 -(44, 96, 1) 4 -(44, 97, 1) 3 -(44, 98, 1) 2 -(44, 99, 1) 1 -(44, 100, 1) 0 -(45, 1, 1) 0 -(45, 2, 1) 1 -(45, 3, 1) 2 -(45, 4, 1) 3 -(45, 5, 1) 4 -(45, 6, 1) 5 -(45, 7, 1) 6 -(45, 8, 1) 7 -(45, 9, 1) 8 -(45, 10, 1) 9 -(45, 11, 1) 10 -(45, 12, 1) 11 -(45, 13, 1) 12 -(45, 14, 1) 13 -(45, 15, 1) 14 -(45, 16, 1) 15 -(45, 17, 1) 16 -(45, 18, 1) 17 -(45, 19, 1) 18 -(45, 20, 1) 19 -(45, 21, 1) 20 -(45, 22, 1) 21 -(45, 23, 1) 22 -(45, 24, 1) 23 -(45, 25, 1) 23 -(45, 26, 1) 24 -(45, 27, 1) 25 -(45, 28, 1) 26 -(45, 29, 1) 27 -(45, 30, 1) 28 -(45, 31, 1) 29 -(45, 32, 1) 30 -(45, 33, 1) 31 -(45, 34, 1) 32 -(45, 35, 1) 33 -(45, 36, 1) 34 -(45, 37, 1) 35 -(45, 38, 1) 36 -(45, 39, 1) 37 -(45, 40, 1) 38 -(45, 61, 1) 38 -(45, 62, 1) 37 -(45, 63, 1) 36 -(45, 64, 1) 35 -(45, 65, 1) 34 -(45, 66, 1) 33 -(45, 67, 1) 32 -(45, 68, 1) 31 -(45, 69, 1) 30 -(45, 70, 1) 29 -(45, 71, 1) 28 -(45, 72, 1) 27 -(45, 73, 1) 26 -(45, 74, 1) 25 -(45, 75, 1) 24 -(45, 76, 1) 23 -(45, 77, 1) 23 -(45, 78, 1) 22 -(45, 79, 1) 21 -(45, 80, 1) 20 -(45, 81, 1) 19 -(45, 82, 1) 18 -(45, 83, 1) 17 -(45, 84, 1) 16 -(45, 85, 1) 15 -(45, 86, 1) 14 -(45, 87, 1) 13 -(45, 88, 1) 12 -(45, 89, 1) 11 -(45, 90, 1) 10 -(45, 91, 1) 9 -(45, 92, 1) 8 -(45, 93, 1) 7 -(45, 94, 1) 6 -(45, 95, 1) 5 -(45, 96, 1) 4 -(45, 97, 1) 3 -(45, 98, 1) 2 -(45, 99, 1) 1 -(45, 100, 1) 0 -(46, 1, 1) 0 -(46, 2, 1) 1 -(46, 3, 1) 2 -(46, 4, 1) 3 -(46, 5, 1) 4 -(46, 6, 1) 5 -(46, 7, 1) 6 -(46, 8, 1) 7 -(46, 9, 1) 8 -(46, 10, 1) 9 -(46, 11, 1) 10 -(46, 12, 1) 11 -(46, 13, 1) 12 -(46, 14, 1) 13 -(46, 15, 1) 14 -(46, 16, 1) 15 -(46, 17, 1) 16 -(46, 18, 1) 17 -(46, 19, 1) 18 -(46, 20, 1) 19 -(46, 21, 1) 20 -(46, 22, 1) 21 -(46, 23, 1) 22 -(46, 24, 1) 23 -(46, 25, 1) 24 -(46, 26, 1) 25 -(46, 27, 1) 26 -(46, 28, 1) 27 -(46, 29, 1) 28 -(46, 30, 1) 29 -(46, 31, 1) 30 -(46, 32, 1) 30 -(46, 33, 1) 31 -(46, 34, 1) 32 -(46, 35, 1) 33 -(46, 36, 1) 34 -(46, 37, 1) 35 -(46, 38, 1) 36 -(46, 39, 1) 37 -(46, 62, 1) 37 -(46, 63, 1) 36 -(46, 64, 1) 35 -(46, 65, 1) 34 -(46, 66, 1) 33 -(46, 67, 1) 32 -(46, 68, 1) 31 -(46, 69, 1) 30 -(46, 70, 1) 30 -(46, 71, 1) 29 -(46, 72, 1) 28 -(46, 73, 1) 27 -(46, 74, 1) 26 -(46, 75, 1) 25 -(46, 76, 1) 24 -(46, 77, 1) 23 -(46, 78, 1) 22 -(46, 79, 1) 21 -(46, 80, 1) 20 -(46, 81, 1) 19 -(46, 82, 1) 18 -(46, 83, 1) 17 -(46, 84, 1) 16 -(46, 85, 1) 15 -(46, 86, 1) 14 -(46, 87, 1) 13 -(46, 88, 1) 12 -(46, 89, 1) 11 -(46, 90, 1) 10 -(46, 91, 1) 9 -(46, 92, 1) 8 -(46, 93, 1) 7 -(46, 94, 1) 6 -(46, 95, 1) 5 -(46, 96, 1) 4 -(46, 97, 1) 3 -(46, 98, 1) 2 -(46, 99, 1) 1 -(46, 100, 1) 0 -(47, 1, 1) 0 -(47, 2, 1) 1 -(47, 3, 1) 2 -(47, 4, 1) 3 -(47, 5, 1) 4 -(47, 6, 1) 5 -(47, 7, 1) 6 -(47, 8, 1) 7 -(47, 9, 1) 8 -(47, 10, 1) 9 -(47, 11, 1) 10 -(47, 12, 1) 11 -(47, 13, 1) 12 -(47, 14, 1) 13 -(47, 15, 1) 14 -(47, 16, 1) 15 -(47, 17, 1) 16 -(47, 18, 1) 17 -(47, 19, 1) 18 -(47, 20, 1) 19 -(47, 21, 1) 20 -(47, 22, 1) 21 -(47, 23, 1) 22 -(47, 24, 1) 23 -(47, 25, 1) 24 -(47, 26, 1) 25 -(47, 27, 1) 26 -(47, 28, 1) 27 -(47, 29, 1) 28 -(47, 30, 1) 29 -(47, 31, 1) 30 -(47, 32, 1) 31 -(47, 33, 1) 32 -(47, 34, 1) 33 -(47, 35, 1) 34 -(47, 36, 1) 35 -(47, 37, 1) 36 -(47, 38, 1) 37 -(47, 39, 1) 38 -(47, 62, 1) 38 -(47, 63, 1) 37 -(47, 64, 1) 36 -(47, 65, 1) 35 -(47, 66, 1) 34 -(47, 67, 1) 33 -(47, 68, 1) 32 -(47, 69, 1) 31 -(47, 70, 1) 30 -(47, 71, 1) 29 -(47, 72, 1) 28 -(47, 73, 1) 27 -(47, 74, 1) 26 -(47, 75, 1) 25 -(47, 76, 1) 24 -(47, 77, 1) 23 -(47, 78, 1) 22 -(47, 79, 1) 21 -(47, 80, 1) 20 -(47, 81, 1) 19 -(47, 82, 1) 18 -(47, 83, 1) 17 -(47, 84, 1) 16 -(47, 85, 1) 15 -(47, 86, 1) 14 -(47, 87, 1) 13 -(47, 88, 1) 12 -(47, 89, 1) 11 -(47, 90, 1) 10 -(47, 91, 1) 9 -(47, 92, 1) 8 -(47, 93, 1) 7 -(47, 94, 1) 6 -(47, 95, 1) 5 -(47, 96, 1) 4 -(47, 97, 1) 3 -(47, 98, 1) 2 -(47, 99, 1) 1 -(47, 100, 1) 0 -(48, 1, 1) 0 -(48, 2, 1) 1 -(48, 3, 1) 2 -(48, 4, 1) 3 -(48, 5, 1) 4 -(48, 6, 1) 5 -(48, 7, 1) 6 -(48, 8, 1) 7 -(48, 9, 1) 8 -(48, 10, 1) 9 -(48, 11, 1) 10 -(48, 12, 1) 11 -(48, 13, 1) 12 -(48, 14, 1) 13 -(48, 15, 1) 14 -(48, 16, 1) 15 -(48, 17, 1) 16 -(48, 18, 1) 17 -(48, 19, 1) 18 -(48, 20, 1) 19 -(48, 21, 1) 20 -(48, 22, 1) 21 -(48, 23, 1) 22 -(48, 24, 1) 23 -(48, 25, 1) 24 -(48, 26, 1) 25 -(48, 27, 1) 26 -(48, 28, 1) 27 -(48, 29, 1) 28 -(48, 30, 1) 29 -(48, 31, 1) 30 -(48, 32, 1) 31 -(48, 33, 1) 32 -(48, 34, 1) 33 -(48, 35, 1) 34 -(48, 36, 1) 35 -(48, 37, 1) 36 -(48, 38, 1) 37 -(48, 39, 1) 38 -(48, 62, 1) 38 -(48, 63, 1) 37 -(48, 64, 1) 36 -(48, 65, 1) 35 -(48, 66, 1) 34 -(48, 67, 1) 33 -(48, 68, 1) 32 -(48, 69, 1) 31 -(48, 70, 1) 30 -(48, 71, 1) 29 -(48, 72, 1) 28 -(48, 73, 1) 27 -(48, 74, 1) 26 -(48, 75, 1) 25 -(48, 76, 1) 24 -(48, 77, 1) 23 -(48, 78, 1) 22 -(48, 79, 1) 21 -(48, 80, 1) 20 -(48, 81, 1) 19 -(48, 82, 1) 18 -(48, 83, 1) 17 -(48, 84, 1) 16 -(48, 85, 1) 15 -(48, 86, 1) 14 -(48, 87, 1) 13 -(48, 88, 1) 12 -(48, 89, 1) 11 -(48, 90, 1) 10 -(48, 91, 1) 9 -(48, 92, 1) 8 -(48, 93, 1) 7 -(48, 94, 1) 6 -(48, 95, 1) 5 -(48, 96, 1) 4 -(48, 97, 1) 3 -(48, 98, 1) 2 -(48, 99, 1) 1 -(48, 100, 1) 0 -(49, 1, 1) 0 -(49, 2, 1) 1 -(49, 3, 1) 2 -(49, 4, 1) 3 -(49, 5, 1) 4 -(49, 6, 1) 5 -(49, 7, 1) 6 -(49, 8, 1) 7 -(49, 9, 1) 8 -(49, 10, 1) 9 -(49, 11, 1) 10 -(49, 12, 1) 11 -(49, 13, 1) 12 -(49, 14, 1) 13 -(49, 15, 1) 14 -(49, 16, 1) 15 -(49, 17, 1) 16 -(49, 18, 1) 17 -(49, 19, 1) 18 -(49, 20, 1) 19 -(49, 21, 1) 20 -(49, 22, 1) 21 -(49, 23, 1) 22 -(49, 24, 1) 23 -(49, 25, 1) 24 -(49, 26, 1) 25 -(49, 27, 1) 26 -(49, 28, 1) 27 -(49, 29, 1) 28 -(49, 30, 1) 29 -(49, 31, 1) 30 -(49, 32, 1) 31 -(49, 33, 1) 32 -(49, 34, 1) 33 -(49, 35, 1) 34 -(49, 36, 1) 35 -(49, 37, 1) 36 -(49, 38, 1) 37 -(49, 39, 1) 38 -(49, 62, 1) 38 -(49, 63, 1) 37 -(49, 64, 1) 36 -(49, 65, 1) 35 -(49, 66, 1) 34 -(49, 67, 1) 33 -(49, 68, 1) 32 -(49, 69, 1) 31 -(49, 70, 1) 30 -(49, 71, 1) 29 -(49, 72, 1) 28 -(49, 73, 1) 27 -(49, 74, 1) 26 -(49, 75, 1) 25 -(49, 76, 1) 24 -(49, 77, 1) 23 -(49, 78, 1) 22 -(49, 79, 1) 21 -(49, 80, 1) 20 -(49, 81, 1) 19 -(49, 82, 1) 18 -(49, 83, 1) 17 -(49, 84, 1) 16 -(49, 85, 1) 15 -(49, 86, 1) 14 -(49, 87, 1) 13 -(49, 88, 1) 12 -(49, 89, 1) 11 -(49, 90, 1) 10 -(49, 91, 1) 9 -(49, 92, 1) 8 -(49, 93, 1) 7 -(49, 94, 1) 6 -(49, 95, 1) 5 -(49, 96, 1) 4 -(49, 97, 1) 3 -(49, 98, 1) 2 -(49, 99, 1) 1 -(49, 100, 1) 0 -(50, 1, 1) 0 -(50, 2, 1) 1 -(50, 3, 1) 2 -(50, 4, 1) 3 -(50, 5, 1) 4 -(50, 6, 1) 5 -(50, 7, 1) 6 -(50, 8, 1) 7 -(50, 9, 1) 8 -(50, 10, 1) 9 -(50, 11, 1) 10 -(50, 12, 1) 11 -(50, 13, 1) 12 -(50, 14, 1) 13 -(50, 15, 1) 14 -(50, 16, 1) 15 -(50, 17, 1) 16 -(50, 18, 1) 17 -(50, 19, 1) 18 -(50, 20, 1) 19 -(50, 21, 1) 20 -(50, 22, 1) 21 -(50, 23, 1) 22 -(50, 24, 1) 23 -(50, 25, 1) 24 -(50, 26, 1) 25 -(50, 27, 1) 26 -(50, 28, 1) 27 -(50, 29, 1) 28 -(50, 30, 1) 29 -(50, 31, 1) 30 -(50, 32, 1) 31 -(50, 33, 1) 32 -(50, 34, 1) 33 -(50, 35, 1) 34 -(50, 36, 1) 35 -(50, 37, 1) 36 -(50, 38, 1) 37 -(50, 39, 1) 38 -(50, 62, 1) 38 -(50, 63, 1) 37 -(50, 64, 1) 36 -(50, 65, 1) 35 -(50, 66, 1) 34 -(50, 67, 1) 33 -(50, 68, 1) 32 -(50, 69, 1) 31 -(50, 70, 1) 30 -(50, 71, 1) 29 -(50, 72, 1) 28 -(50, 73, 1) 27 -(50, 74, 1) 26 -(50, 75, 1) 25 -(50, 76, 1) 24 -(50, 77, 1) 23 -(50, 78, 1) 22 -(50, 79, 1) 21 -(50, 80, 1) 20 -(50, 81, 1) 19 -(50, 82, 1) 18 -(50, 83, 1) 17 -(50, 84, 1) 16 -(50, 85, 1) 15 -(50, 86, 1) 14 -(50, 87, 1) 13 -(50, 88, 1) 12 -(50, 89, 1) 11 -(50, 90, 1) 10 -(50, 91, 1) 9 -(50, 92, 1) 8 -(50, 93, 1) 7 -(50, 94, 1) 6 -(50, 95, 1) 5 -(50, 96, 1) 4 -(50, 97, 1) 3 -(50, 98, 1) 2 -(50, 99, 1) 1 -(50, 100, 1) 0 -(51, 1, 1) 0 -(51, 2, 1) 1 -(51, 3, 1) 2 -(51, 4, 1) 3 -(51, 5, 1) 4 -(51, 6, 1) 5 -(51, 7, 1) 6 -(51, 8, 1) 7 -(51, 9, 1) 8 -(51, 10, 1) 9 -(51, 11, 1) 10 -(51, 12, 1) 11 -(51, 13, 1) 12 -(51, 14, 1) 13 -(51, 15, 1) 14 -(51, 16, 1) 15 -(51, 17, 1) 16 -(51, 18, 1) 17 -(51, 19, 1) 18 -(51, 20, 1) 19 -(51, 21, 1) 20 -(51, 22, 1) 21 -(51, 23, 1) 22 -(51, 24, 1) 23 -(51, 25, 1) 24 -(51, 26, 1) 25 -(51, 27, 1) 26 -(51, 28, 1) 27 -(51, 29, 1) 28 -(51, 30, 1) 29 -(51, 31, 1) 30 -(51, 32, 1) 31 -(51, 33, 1) 32 -(51, 34, 1) 33 -(51, 35, 1) 34 -(51, 36, 1) 35 -(51, 37, 1) 36 -(51, 38, 1) 37 -(51, 39, 1) 38 -(51, 62, 1) 38 -(51, 63, 1) 37 -(51, 64, 1) 36 -(51, 65, 1) 35 -(51, 66, 1) 34 -(51, 67, 1) 33 -(51, 68, 1) 32 -(51, 69, 1) 31 -(51, 70, 1) 30 -(51, 71, 1) 29 -(51, 72, 1) 28 -(51, 73, 1) 27 -(51, 74, 1) 26 -(51, 75, 1) 25 -(51, 76, 1) 24 -(51, 77, 1) 23 -(51, 78, 1) 22 -(51, 79, 1) 21 -(51, 80, 1) 20 -(51, 81, 1) 19 -(51, 82, 1) 18 -(51, 83, 1) 17 -(51, 84, 1) 16 -(51, 85, 1) 15 -(51, 86, 1) 14 -(51, 87, 1) 13 -(51, 88, 1) 12 -(51, 89, 1) 11 -(51, 90, 1) 10 -(51, 91, 1) 9 -(51, 92, 1) 8 -(51, 93, 1) 7 -(51, 94, 1) 6 -(51, 95, 1) 5 -(51, 96, 1) 4 -(51, 97, 1) 3 -(51, 98, 1) 2 -(51, 99, 1) 1 -(51, 100, 1) 0 -(52, 1, 1) 0 -(52, 2, 1) 1 -(52, 3, 1) 2 -(52, 4, 1) 3 -(52, 5, 1) 4 -(52, 6, 1) 5 -(52, 7, 1) 6 -(52, 8, 1) 7 -(52, 9, 1) 8 -(52, 10, 1) 9 -(52, 11, 1) 10 -(52, 12, 1) 11 -(52, 13, 1) 12 -(52, 14, 1) 13 -(52, 15, 1) 14 -(52, 16, 1) 15 -(52, 17, 1) 16 -(52, 18, 1) 17 -(52, 19, 1) 18 -(52, 20, 1) 19 -(52, 21, 1) 20 -(52, 22, 1) 21 -(52, 23, 1) 22 -(52, 24, 1) 23 -(52, 25, 1) 24 -(52, 26, 1) 25 -(52, 27, 1) 26 -(52, 28, 1) 27 -(52, 29, 1) 28 -(52, 30, 1) 29 -(52, 31, 1) 30 -(52, 32, 1) 31 -(52, 33, 1) 32 -(52, 34, 1) 33 -(52, 35, 1) 34 -(52, 36, 1) 35 -(52, 37, 1) 36 -(52, 38, 1) 37 -(52, 39, 1) 38 -(52, 62, 1) 38 -(52, 63, 1) 37 -(52, 64, 1) 36 -(52, 65, 1) 35 -(52, 66, 1) 34 -(52, 67, 1) 33 -(52, 68, 1) 32 -(52, 69, 1) 31 -(52, 70, 1) 30 -(52, 71, 1) 29 -(52, 72, 1) 28 -(52, 73, 1) 27 -(52, 74, 1) 26 -(52, 75, 1) 25 -(52, 76, 1) 24 -(52, 77, 1) 23 -(52, 78, 1) 22 -(52, 79, 1) 21 -(52, 80, 1) 20 -(52, 81, 1) 19 -(52, 82, 1) 18 -(52, 83, 1) 17 -(52, 84, 1) 16 -(52, 85, 1) 15 -(52, 86, 1) 14 -(52, 87, 1) 13 -(52, 88, 1) 12 -(52, 89, 1) 11 -(52, 90, 1) 10 -(52, 91, 1) 9 -(52, 92, 1) 8 -(52, 93, 1) 7 -(52, 94, 1) 6 -(52, 95, 1) 5 -(52, 96, 1) 4 -(52, 97, 1) 3 -(52, 98, 1) 2 -(52, 99, 1) 1 -(52, 100, 1) 0 -(53, 1, 1) 0 -(53, 2, 1) 1 -(53, 3, 1) 2 -(53, 4, 1) 3 -(53, 5, 1) 4 -(53, 6, 1) 5 -(53, 7, 1) 6 -(53, 8, 1) 7 -(53, 9, 1) 8 -(53, 10, 1) 9 -(53, 11, 1) 10 -(53, 12, 1) 11 -(53, 13, 1) 12 -(53, 14, 1) 13 -(53, 15, 1) 14 -(53, 16, 1) 15 -(53, 17, 1) 16 -(53, 18, 1) 17 -(53, 19, 1) 18 -(53, 20, 1) 19 -(53, 21, 1) 20 -(53, 22, 1) 21 -(53, 23, 1) 22 -(53, 24, 1) 23 -(53, 25, 1) 24 -(53, 26, 1) 25 -(53, 27, 1) 26 -(53, 28, 1) 27 -(53, 29, 1) 28 -(53, 30, 1) 29 -(53, 31, 1) 30 -(53, 32, 1) 31 -(53, 33, 1) 32 -(53, 34, 1) 33 -(53, 35, 1) 34 -(53, 36, 1) 35 -(53, 37, 1) 36 -(53, 38, 1) 37 -(53, 39, 1) 38 -(53, 62, 1) 38 -(53, 63, 1) 37 -(53, 64, 1) 36 -(53, 65, 1) 35 -(53, 66, 1) 34 -(53, 67, 1) 33 -(53, 68, 1) 32 -(53, 69, 1) 31 -(53, 70, 1) 30 -(53, 71, 1) 29 -(53, 72, 1) 28 -(53, 73, 1) 27 -(53, 74, 1) 26 -(53, 75, 1) 25 -(53, 76, 1) 24 -(53, 77, 1) 23 -(53, 78, 1) 22 -(53, 79, 1) 21 -(53, 80, 1) 20 -(53, 81, 1) 19 -(53, 82, 1) 18 -(53, 83, 1) 17 -(53, 84, 1) 16 -(53, 85, 1) 15 -(53, 86, 1) 14 -(53, 87, 1) 13 -(53, 88, 1) 12 -(53, 89, 1) 11 -(53, 90, 1) 10 -(53, 91, 1) 9 -(53, 92, 1) 8 -(53, 93, 1) 7 -(53, 94, 1) 6 -(53, 95, 1) 5 -(53, 96, 1) 4 -(53, 97, 1) 3 -(53, 98, 1) 2 -(53, 99, 1) 1 -(53, 100, 1) 0 -(54, 1, 1) 0 -(54, 2, 1) 1 -(54, 3, 1) 2 -(54, 4, 1) 3 -(54, 5, 1) 4 -(54, 6, 1) 5 -(54, 7, 1) 6 -(54, 8, 1) 7 -(54, 9, 1) 8 -(54, 10, 1) 9 -(54, 11, 1) 10 -(54, 12, 1) 11 -(54, 13, 1) 12 -(54, 14, 1) 13 -(54, 15, 1) 14 -(54, 16, 1) 15 -(54, 17, 1) 16 -(54, 18, 1) 17 -(54, 19, 1) 18 -(54, 20, 1) 19 -(54, 21, 1) 20 -(54, 22, 1) 21 -(54, 23, 1) 22 -(54, 24, 1) 23 -(54, 25, 1) 24 -(54, 26, 1) 25 -(54, 27, 1) 26 -(54, 28, 1) 27 -(54, 29, 1) 28 -(54, 30, 1) 29 -(54, 31, 1) 30 -(54, 32, 1) 31 -(54, 33, 1) 32 -(54, 34, 1) 33 -(54, 35, 1) 34 -(54, 36, 1) 35 -(54, 37, 1) 36 -(54, 38, 1) 37 -(54, 39, 1) 38 -(54, 62, 1) 38 -(54, 63, 1) 37 -(54, 64, 1) 36 -(54, 65, 1) 35 -(54, 66, 1) 34 -(54, 67, 1) 33 -(54, 68, 1) 32 -(54, 69, 1) 31 -(54, 70, 1) 30 -(54, 71, 1) 29 -(54, 72, 1) 28 -(54, 73, 1) 27 -(54, 74, 1) 26 -(54, 75, 1) 25 -(54, 76, 1) 24 -(54, 77, 1) 23 -(54, 78, 1) 22 -(54, 79, 1) 21 -(54, 80, 1) 20 -(54, 81, 1) 19 -(54, 82, 1) 18 -(54, 83, 1) 17 -(54, 84, 1) 16 -(54, 85, 1) 15 -(54, 86, 1) 14 -(54, 87, 1) 13 -(54, 88, 1) 12 -(54, 89, 1) 11 -(54, 90, 1) 10 -(54, 91, 1) 9 -(54, 92, 1) 8 -(54, 93, 1) 7 -(54, 94, 1) 6 -(54, 95, 1) 5 -(54, 96, 1) 4 -(54, 97, 1) 3 -(54, 98, 1) 2 -(54, 99, 1) 1 -(54, 100, 1) 0 -(55, 1, 1) 0 -(55, 2, 1) 1 -(55, 3, 1) 2 -(55, 4, 1) 3 -(55, 5, 1) 4 -(55, 6, 1) 5 -(55, 7, 1) 6 -(55, 8, 1) 7 -(55, 9, 1) 8 -(55, 10, 1) 9 -(55, 11, 1) 10 -(55, 12, 1) 11 -(55, 13, 1) 12 -(55, 14, 1) 13 -(55, 15, 1) 14 -(55, 16, 1) 15 -(55, 17, 1) 16 -(55, 18, 1) 17 -(55, 19, 1) 18 -(55, 20, 1) 19 -(55, 21, 1) 20 -(55, 22, 1) 21 -(55, 23, 1) 22 -(55, 24, 1) 23 -(55, 25, 1) 24 -(55, 26, 1) 25 -(55, 27, 1) 26 -(55, 28, 1) 27 -(55, 29, 1) 28 -(55, 30, 1) 29 -(55, 31, 1) 30 -(55, 32, 1) 30 -(55, 33, 1) 31 -(55, 34, 1) 32 -(55, 35, 1) 33 -(55, 36, 1) 34 -(55, 37, 1) 35 -(55, 38, 1) 36 -(55, 39, 1) 37 -(55, 62, 1) 37 -(55, 63, 1) 36 -(55, 64, 1) 35 -(55, 65, 1) 34 -(55, 66, 1) 33 -(55, 67, 1) 32 -(55, 68, 1) 31 -(55, 69, 1) 30 -(55, 70, 1) 30 -(55, 71, 1) 29 -(55, 72, 1) 28 -(55, 73, 1) 27 -(55, 74, 1) 26 -(55, 75, 1) 25 -(55, 76, 1) 24 -(55, 77, 1) 23 -(55, 78, 1) 22 -(55, 79, 1) 21 -(55, 80, 1) 20 -(55, 81, 1) 19 -(55, 82, 1) 18 -(55, 83, 1) 17 -(55, 84, 1) 16 -(55, 85, 1) 15 -(55, 86, 1) 14 -(55, 87, 1) 13 -(55, 88, 1) 12 -(55, 89, 1) 11 -(55, 90, 1) 10 -(55, 91, 1) 9 -(55, 92, 1) 8 -(55, 93, 1) 7 -(55, 94, 1) 6 -(55, 95, 1) 5 -(55, 96, 1) 4 -(55, 97, 1) 3 -(55, 98, 1) 2 -(55, 99, 1) 1 -(55, 100, 1) 0 -(56, 1, 1) 0 -(56, 2, 1) 1 -(56, 3, 1) 2 -(56, 4, 1) 3 -(56, 5, 1) 4 -(56, 6, 1) 5 -(56, 7, 1) 6 -(56, 8, 1) 7 -(56, 9, 1) 8 -(56, 10, 1) 9 -(56, 11, 1) 10 -(56, 12, 1) 11 -(56, 13, 1) 12 -(56, 14, 1) 13 -(56, 15, 1) 14 -(56, 16, 1) 15 -(56, 17, 1) 16 -(56, 18, 1) 17 -(56, 19, 1) 18 -(56, 20, 1) 19 -(56, 21, 1) 20 -(56, 22, 1) 21 -(56, 23, 1) 22 -(56, 24, 1) 23 -(56, 25, 1) 23 -(56, 26, 1) 24 -(56, 27, 1) 25 -(56, 28, 1) 26 -(56, 29, 1) 27 -(56, 30, 1) 28 -(56, 31, 1) 29 -(56, 32, 1) 30 -(56, 33, 1) 31 -(56, 34, 1) 32 -(56, 35, 1) 33 -(56, 36, 1) 34 -(56, 37, 1) 35 -(56, 38, 1) 36 -(56, 39, 1) 37 -(56, 40, 1) 38 -(56, 61, 1) 38 -(56, 62, 1) 37 -(56, 63, 1) 36 -(56, 64, 1) 35 -(56, 65, 1) 34 -(56, 66, 1) 33 -(56, 67, 1) 32 -(56, 68, 1) 31 -(56, 69, 1) 30 -(56, 70, 1) 29 -(56, 71, 1) 28 -(56, 72, 1) 27 -(56, 73, 1) 26 -(56, 74, 1) 25 -(56, 75, 1) 24 -(56, 76, 1) 23 -(56, 77, 1) 23 -(56, 78, 1) 22 -(56, 79, 1) 21 -(56, 80, 1) 20 -(56, 81, 1) 19 -(56, 82, 1) 18 -(56, 83, 1) 17 -(56, 84, 1) 16 -(56, 85, 1) 15 -(56, 86, 1) 14 -(56, 87, 1) 13 -(56, 88, 1) 12 -(56, 89, 1) 11 -(56, 90, 1) 10 -(56, 91, 1) 9 -(56, 92, 1) 8 -(56, 93, 1) 7 -(56, 94, 1) 6 -(56, 95, 1) 5 -(56, 96, 1) 4 -(56, 97, 1) 3 -(56, 98, 1) 2 -(56, 99, 1) 1 -(56, 100, 1) 0 -(57, 1, 1) 0 -(57, 2, 1) 1 -(57, 3, 1) 2 -(57, 4, 1) 3 -(57, 5, 1) 4 -(57, 6, 1) 5 -(57, 7, 1) 6 -(57, 8, 1) 7 -(57, 9, 1) 8 -(57, 10, 1) 9 -(57, 11, 1) 10 -(57, 12, 1) 11 -(57, 13, 1) 12 -(57, 14, 1) 13 -(57, 15, 1) 14 -(57, 16, 1) 14 -(57, 17, 1) 15 -(57, 18, 1) 16 -(57, 19, 1) 17 -(57, 20, 1) 18 -(57, 21, 1) 19 -(57, 22, 1) 20 -(57, 23, 1) 21 -(57, 24, 1) 22 -(57, 25, 1) 23 -(57, 26, 1) 24 -(57, 27, 1) 25 -(57, 28, 1) 26 -(57, 29, 1) 27 -(57, 30, 1) 28 -(57, 31, 1) 29 -(57, 32, 1) 30 -(57, 33, 1) 31 -(57, 34, 1) 32 -(57, 35, 1) 33 -(57, 36, 1) 34 -(57, 37, 1) 35 -(57, 38, 1) 35 -(57, 39, 1) 36 -(57, 40, 1) 37 -(57, 61, 1) 37 -(57, 62, 1) 36 -(57, 63, 1) 35 -(57, 64, 1) 35 -(57, 65, 1) 34 -(57, 66, 1) 33 -(57, 67, 1) 32 -(57, 68, 1) 31 -(57, 69, 1) 30 -(57, 70, 1) 29 -(57, 71, 1) 28 -(57, 72, 1) 27 -(57, 73, 1) 26 -(57, 74, 1) 25 -(57, 75, 1) 24 -(57, 76, 1) 23 -(57, 77, 1) 22 -(57, 78, 1) 21 -(57, 79, 1) 20 -(57, 80, 1) 19 -(57, 81, 1) 18 -(57, 82, 1) 17 -(57, 83, 1) 16 -(57, 84, 1) 15 -(57, 85, 1) 14 -(57, 86, 1) 14 -(57, 87, 1) 13 -(57, 88, 1) 12 -(57, 89, 1) 11 -(57, 90, 1) 10 -(57, 91, 1) 9 -(57, 92, 1) 8 -(57, 93, 1) 7 -(57, 94, 1) 6 -(57, 95, 1) 5 -(57, 96, 1) 4 -(57, 97, 1) 3 -(57, 98, 1) 2 -(57, 99, 1) 1 -(57, 100, 1) 0 -(58, 1, 1) 0 -(58, 2, 1) 1 -(58, 3, 1) 2 -(58, 4, 1) 3 -(58, 5, 1) 4 -(58, 6, 1) 4 -(58, 7, 1) 5 -(58, 8, 1) 6 -(58, 9, 1) 7 -(58, 10, 1) 8 -(58, 11, 1) 9 -(58, 12, 1) 10 -(58, 13, 1) 11 -(58, 14, 1) 12 -(58, 15, 1) 13 -(58, 16, 1) 14 -(58, 17, 1) 15 -(58, 18, 1) 16 -(58, 19, 1) 17 -(58, 20, 1) 18 -(58, 21, 1) 19 -(58, 22, 1) 20 -(58, 23, 1) 21 -(58, 24, 1) 22 -(58, 25, 1) 23 -(58, 26, 1) 24 -(58, 27, 1) 25 -(58, 28, 1) 26 -(58, 29, 1) 27 -(58, 30, 1) 28 -(58, 31, 1) 29 -(58, 32, 1) 30 -(58, 33, 1) 30 -(58, 34, 1) 31 -(58, 35, 1) 32 -(58, 36, 1) 33 -(58, 37, 1) 34 -(58, 38, 1) 35 -(58, 39, 1) 36 -(58, 40, 1) 37 -(58, 41, 1) 37 -(58, 60, 1) 37 -(58, 61, 1) 37 -(58, 62, 1) 36 -(58, 63, 1) 35 -(58, 64, 1) 34 -(58, 65, 1) 33 -(58, 66, 1) 32 -(58, 67, 1) 31 -(58, 68, 1) 30 -(58, 69, 1) 30 -(58, 70, 1) 29 -(58, 71, 1) 28 -(58, 72, 1) 27 -(58, 73, 1) 26 -(58, 74, 1) 25 -(58, 75, 1) 24 -(58, 76, 1) 23 -(58, 77, 1) 22 -(58, 78, 1) 21 -(58, 79, 1) 20 -(58, 80, 1) 19 -(58, 81, 1) 18 -(58, 82, 1) 17 -(58, 83, 1) 16 -(58, 84, 1) 15 -(58, 85, 1) 14 -(58, 86, 1) 13 -(58, 87, 1) 12 -(58, 88, 1) 11 -(58, 89, 1) 10 -(58, 90, 1) 9 -(58, 91, 1) 8 -(58, 92, 1) 7 -(58, 93, 1) 6 -(58, 94, 1) 5 -(58, 95, 1) 4 -(58, 96, 1) 4 -(58, 97, 1) 3 -(58, 98, 1) 2 -(58, 99, 1) 1 -(58, 100, 1) 0 -(59, 1, 1) 0 -(59, 2, 1) 0 -(59, 3, 1) 1 -(59, 4, 1) 2 -(59, 5, 1) 3 -(59, 6, 1) 4 -(59, 7, 1) 5 -(59, 8, 1) 6 -(59, 9, 1) 7 -(59, 10, 1) 8 -(59, 11, 1) 9 -(59, 12, 1) 10 -(59, 13, 1) 11 -(59, 14, 1) 12 -(59, 15, 1) 13 -(59, 16, 1) 14 -(59, 17, 1) 15 -(59, 18, 1) 16 -(59, 19, 1) 17 -(59, 20, 1) 18 -(59, 21, 1) 19 -(59, 22, 1) 20 -(59, 23, 1) 21 -(59, 24, 1) 22 -(59, 25, 1) 23 -(59, 26, 1) 24 -(59, 27, 1) 25 -(59, 28, 1) 25 -(59, 29, 1) 26 -(59, 30, 1) 27 -(59, 31, 1) 28 -(59, 32, 1) 29 -(59, 33, 1) 30 -(59, 34, 1) 31 -(59, 35, 1) 32 -(59, 36, 1) 33 -(59, 37, 1) 34 -(59, 38, 1) 34 -(59, 39, 1) 35 -(59, 40, 1) 36 -(59, 41, 1) 37 -(59, 42, 1) 38 -(59, 59, 1) 38 -(59, 60, 1) 37 -(59, 61, 1) 36 -(59, 62, 1) 35 -(59, 63, 1) 34 -(59, 64, 1) 34 -(59, 65, 1) 33 -(59, 66, 1) 32 -(59, 67, 1) 31 -(59, 68, 1) 30 -(59, 69, 1) 29 -(59, 70, 1) 28 -(59, 71, 1) 27 -(59, 72, 1) 26 -(59, 73, 1) 25 -(59, 74, 1) 25 -(59, 75, 1) 24 -(59, 76, 1) 23 -(59, 77, 1) 22 -(59, 78, 1) 21 -(59, 79, 1) 20 -(59, 80, 1) 19 -(59, 81, 1) 18 -(59, 82, 1) 17 -(59, 83, 1) 16 -(59, 84, 1) 15 -(59, 85, 1) 14 -(59, 86, 1) 13 -(59, 87, 1) 12 -(59, 88, 1) 11 -(59, 89, 1) 10 -(59, 90, 1) 9 -(59, 91, 1) 8 -(59, 92, 1) 7 -(59, 93, 1) 6 -(59, 94, 1) 5 -(59, 95, 1) 4 -(59, 96, 1) 3 -(59, 97, 1) 2 -(59, 98, 1) 1 -(59, 99, 1) 0 -(59, 100, 1) 0 -(60, 1, 1) 0 -(60, 2, 1) 0 -(60, 3, 1) 1 -(60, 4, 1) 2 -(60, 5, 1) 3 -(60, 6, 1) 4 -(60, 7, 1) 5 -(60, 8, 1) 6 -(60, 9, 1) 7 -(60, 10, 1) 8 -(60, 11, 1) 9 -(60, 12, 1) 10 -(60, 13, 1) 11 -(60, 14, 1) 12 -(60, 15, 1) 13 -(60, 16, 1) 14 -(60, 17, 1) 15 -(60, 18, 1) 16 -(60, 19, 1) 17 -(60, 20, 1) 18 -(60, 21, 1) 19 -(60, 22, 1) 20 -(60, 23, 1) 20 -(60, 24, 1) 21 -(60, 25, 1) 22 -(60, 26, 1) 23 -(60, 27, 1) 24 -(60, 28, 1) 25 -(60, 29, 1) 26 -(60, 30, 1) 27 -(60, 31, 1) 28 -(60, 32, 1) 29 -(60, 33, 1) 30 -(60, 34, 1) 30 -(60, 35, 1) 31 -(60, 36, 1) 32 -(60, 37, 1) 33 -(60, 38, 1) 34 -(60, 39, 1) 35 -(60, 40, 1) 35 -(60, 41, 1) 36 -(60, 42, 1) 37 -(60, 43, 1) 37 -(60, 58, 1) 37 -(60, 59, 1) 37 -(60, 60, 1) 36 -(60, 61, 1) 35 -(60, 62, 1) 35 -(60, 63, 1) 34 -(60, 64, 1) 33 -(60, 65, 1) 32 -(60, 66, 1) 31 -(60, 67, 1) 30 -(60, 68, 1) 30 -(60, 69, 1) 29 -(60, 70, 1) 28 -(60, 71, 1) 27 -(60, 72, 1) 26 -(60, 73, 1) 25 -(60, 74, 1) 24 -(60, 75, 1) 23 -(60, 76, 1) 22 -(60, 77, 1) 21 -(60, 78, 1) 20 -(60, 79, 1) 20 -(60, 80, 1) 19 -(60, 81, 1) 18 -(60, 82, 1) 17 -(60, 83, 1) 16 -(60, 84, 1) 15 -(60, 85, 1) 14 -(60, 86, 1) 13 -(60, 87, 1) 12 -(60, 88, 1) 11 -(60, 89, 1) 10 -(60, 90, 1) 9 -(60, 91, 1) 8 -(60, 92, 1) 7 -(60, 93, 1) 6 -(60, 94, 1) 5 -(60, 95, 1) 4 -(60, 96, 1) 3 -(60, 97, 1) 2 -(60, 98, 1) 1 -(60, 99, 1) 0 -(60, 100, 1) 0 -(61, 4, 1) 2 -(61, 5, 1) 3 -(61, 6, 1) 4 -(61, 7, 1) 5 -(61, 8, 1) 6 -(61, 9, 1) 7 -(61, 10, 1) 8 -(61, 11, 1) 9 -(61, 12, 1) 10 -(61, 13, 1) 11 -(61, 14, 1) 12 -(61, 15, 1) 13 -(61, 16, 1) 14 -(61, 17, 1) 15 -(61, 18, 1) 16 -(61, 19, 1) 16 -(61, 20, 1) 17 -(61, 21, 1) 18 -(61, 22, 1) 19 -(61, 23, 1) 20 -(61, 24, 1) 21 -(61, 25, 1) 22 -(61, 26, 1) 23 -(61, 27, 1) 24 -(61, 28, 1) 25 -(61, 29, 1) 26 -(61, 30, 1) 27 -(61, 31, 1) 27 -(61, 32, 1) 28 -(61, 33, 1) 29 -(61, 34, 1) 30 -(61, 35, 1) 31 -(61, 36, 1) 32 -(61, 37, 1) 32 -(61, 38, 1) 33 -(61, 39, 1) 34 -(61, 40, 1) 35 -(61, 41, 1) 35 -(61, 42, 1) 36 -(61, 43, 1) 37 -(61, 44, 1) 37 -(61, 45, 1) 38 -(61, 56, 1) 38 -(61, 57, 1) 37 -(61, 58, 1) 37 -(61, 59, 1) 36 -(61, 60, 1) 35 -(61, 61, 1) 35 -(61, 62, 1) 34 -(61, 63, 1) 33 -(61, 64, 1) 32 -(61, 65, 1) 32 -(61, 66, 1) 31 -(61, 67, 1) 30 -(61, 68, 1) 29 -(61, 69, 1) 28 -(61, 70, 1) 27 -(61, 71, 1) 27 -(61, 72, 1) 26 -(61, 73, 1) 25 -(61, 74, 1) 24 -(61, 75, 1) 23 -(61, 76, 1) 22 -(61, 77, 1) 21 -(61, 78, 1) 20 -(61, 79, 1) 19 -(61, 80, 1) 18 -(61, 81, 1) 17 -(61, 82, 1) 16 -(61, 83, 1) 16 -(61, 84, 1) 15 -(61, 85, 1) 14 -(61, 86, 1) 13 -(61, 87, 1) 12 -(61, 88, 1) 11 -(61, 89, 1) 10 -(61, 90, 1) 9 -(61, 91, 1) 8 -(61, 92, 1) 7 -(61, 93, 1) 6 -(61, 94, 1) 5 -(61, 95, 1) 4 -(61, 96, 1) 3 -(61, 97, 1) 2 -(62, 4, 1) 2 -(62, 5, 1) 3 -(62, 6, 1) 4 -(62, 7, 1) 5 -(62, 8, 1) 6 -(62, 9, 1) 7 -(62, 10, 1) 8 -(62, 11, 1) 9 -(62, 12, 1) 9 -(62, 13, 1) 10 -(62, 14, 1) 11 -(62, 15, 1) 12 -(62, 16, 1) 13 -(62, 17, 1) 14 -(62, 18, 1) 15 -(62, 19, 1) 16 -(62, 20, 1) 17 -(62, 21, 1) 18 -(62, 22, 1) 19 -(62, 23, 1) 20 -(62, 24, 1) 21 -(62, 25, 1) 22 -(62, 26, 1) 23 -(62, 27, 1) 23 -(62, 28, 1) 24 -(62, 29, 1) 25 -(62, 30, 1) 26 -(62, 31, 1) 27 -(62, 32, 1) 28 -(62, 33, 1) 29 -(62, 34, 1) 29 -(62, 35, 1) 30 -(62, 36, 1) 31 -(62, 37, 1) 32 -(62, 38, 1) 33 -(62, 39, 1) 33 -(62, 40, 1) 34 -(62, 41, 1) 35 -(62, 42, 1) 35 -(62, 43, 1) 36 -(62, 44, 1) 36 -(62, 45, 1) 37 -(62, 46, 1) 37 -(62, 47, 1) 37 -(62, 48, 1) 38 -(62, 49, 1) 38 -(62, 50, 1) 38 -(62, 51, 1) 38 -(62, 52, 1) 38 -(62, 53, 1) 38 -(62, 54, 1) 37 -(62, 55, 1) 37 -(62, 56, 1) 37 -(62, 57, 1) 36 -(62, 58, 1) 36 -(62, 59, 1) 35 -(62, 60, 1) 35 -(62, 61, 1) 34 -(62, 62, 1) 33 -(62, 63, 1) 33 -(62, 64, 1) 32 -(62, 65, 1) 31 -(62, 66, 1) 30 -(62, 67, 1) 29 -(62, 68, 1) 29 -(62, 69, 1) 28 -(62, 70, 1) 27 -(62, 71, 1) 26 -(62, 72, 1) 25 -(62, 73, 1) 24 -(62, 74, 1) 23 -(62, 75, 1) 23 -(62, 76, 1) 22 -(62, 77, 1) 21 -(62, 78, 1) 20 -(62, 79, 1) 19 -(62, 80, 1) 18 -(62, 81, 1) 17 -(62, 82, 1) 16 -(62, 83, 1) 15 -(62, 84, 1) 14 -(62, 85, 1) 13 -(62, 86, 1) 12 -(62, 87, 1) 11 -(62, 88, 1) 10 -(62, 89, 1) 9 -(62, 90, 1) 9 -(62, 91, 1) 8 -(62, 92, 1) 7 -(62, 93, 1) 6 -(62, 94, 1) 5 -(62, 95, 1) 4 -(62, 96, 1) 3 -(62, 97, 1) 2 -(63, 4, 1) 2 -(63, 5, 1) 3 -(63, 6, 1) 3 -(63, 7, 1) 4 -(63, 8, 1) 5 -(63, 9, 1) 6 -(63, 10, 1) 7 -(63, 11, 1) 8 -(63, 12, 1) 9 -(63, 13, 1) 10 -(63, 14, 1) 11 -(63, 15, 1) 12 -(63, 16, 1) 13 -(63, 17, 1) 14 -(63, 18, 1) 15 -(63, 19, 1) 16 -(63, 20, 1) 17 -(63, 21, 1) 18 -(63, 22, 1) 18 -(63, 23, 1) 19 -(63, 24, 1) 20 -(63, 25, 1) 21 -(63, 26, 1) 22 -(63, 27, 1) 23 -(63, 28, 1) 24 -(63, 29, 1) 25 -(63, 30, 1) 26 -(63, 31, 1) 26 -(63, 32, 1) 27 -(63, 33, 1) 28 -(63, 34, 1) 29 -(63, 35, 1) 30 -(63, 36, 1) 30 -(63, 37, 1) 31 -(63, 38, 1) 32 -(63, 39, 1) 33 -(63, 40, 1) 33 -(63, 41, 1) 34 -(63, 42, 1) 34 -(63, 43, 1) 35 -(63, 44, 1) 35 -(63, 45, 1) 36 -(63, 46, 1) 36 -(63, 47, 1) 37 -(63, 48, 1) 37 -(63, 49, 1) 37 -(63, 50, 1) 37 -(63, 51, 1) 37 -(63, 52, 1) 37 -(63, 53, 1) 37 -(63, 54, 1) 37 -(63, 55, 1) 36 -(63, 56, 1) 36 -(63, 57, 1) 35 -(63, 58, 1) 35 -(63, 59, 1) 34 -(63, 60, 1) 34 -(63, 61, 1) 33 -(63, 62, 1) 33 -(63, 63, 1) 32 -(63, 64, 1) 31 -(63, 65, 1) 30 -(63, 66, 1) 30 -(63, 67, 1) 29 -(63, 68, 1) 28 -(63, 69, 1) 27 -(63, 70, 1) 26 -(63, 71, 1) 26 -(63, 72, 1) 25 -(63, 73, 1) 24 -(63, 74, 1) 23 -(63, 75, 1) 22 -(63, 76, 1) 21 -(63, 77, 1) 20 -(63, 78, 1) 19 -(63, 79, 1) 18 -(63, 80, 1) 18 -(63, 81, 1) 17 -(63, 82, 1) 16 -(63, 83, 1) 15 -(63, 84, 1) 14 -(63, 85, 1) 13 -(63, 86, 1) 12 -(63, 87, 1) 11 -(63, 88, 1) 10 -(63, 89, 1) 9 -(63, 90, 1) 8 -(63, 91, 1) 7 -(63, 92, 1) 6 -(63, 93, 1) 5 -(63, 94, 1) 4 -(63, 95, 1) 3 -(63, 96, 1) 3 -(63, 97, 1) 2 -(64, 4, 1) 1 -(64, 5, 1) 2 -(64, 6, 1) 3 -(64, 7, 1) 4 -(64, 8, 1) 5 -(64, 9, 1) 6 -(64, 10, 1) 7 -(64, 11, 1) 8 -(64, 12, 1) 9 -(64, 13, 1) 10 -(64, 14, 1) 11 -(64, 15, 1) 12 -(64, 16, 1) 13 -(64, 17, 1) 14 -(64, 18, 1) 14 -(64, 19, 1) 15 -(64, 20, 1) 16 -(64, 21, 1) 17 -(64, 22, 1) 18 -(64, 23, 1) 19 -(64, 24, 1) 20 -(64, 25, 1) 21 -(64, 26, 1) 22 -(64, 27, 1) 22 -(64, 28, 1) 23 -(64, 29, 1) 24 -(64, 30, 1) 25 -(64, 31, 1) 26 -(64, 32, 1) 27 -(64, 33, 1) 27 -(64, 34, 1) 28 -(64, 35, 1) 29 -(64, 36, 1) 30 -(64, 37, 1) 30 -(64, 38, 1) 31 -(64, 39, 1) 32 -(64, 40, 1) 32 -(64, 41, 1) 33 -(64, 42, 1) 34 -(64, 43, 1) 34 -(64, 44, 1) 35 -(64, 45, 1) 35 -(64, 46, 1) 35 -(64, 47, 1) 36 -(64, 48, 1) 36 -(64, 49, 1) 36 -(64, 50, 1) 36 -(64, 51, 1) 36 -(64, 52, 1) 36 -(64, 53, 1) 36 -(64, 54, 1) 36 -(64, 55, 1) 35 -(64, 56, 1) 35 -(64, 57, 1) 35 -(64, 58, 1) 34 -(64, 59, 1) 34 -(64, 60, 1) 33 -(64, 61, 1) 32 -(64, 62, 1) 32 -(64, 63, 1) 31 -(64, 64, 1) 30 -(64, 65, 1) 30 -(64, 66, 1) 29 -(64, 67, 1) 28 -(64, 68, 1) 27 -(64, 69, 1) 27 -(64, 70, 1) 26 -(64, 71, 1) 25 -(64, 72, 1) 24 -(64, 73, 1) 23 -(64, 74, 1) 22 -(64, 75, 1) 22 -(64, 76, 1) 21 -(64, 77, 1) 20 -(64, 78, 1) 19 -(64, 79, 1) 18 -(64, 80, 1) 17 -(64, 81, 1) 16 -(64, 82, 1) 15 -(64, 83, 1) 14 -(64, 84, 1) 14 -(64, 85, 1) 13 -(64, 86, 1) 12 -(64, 87, 1) 11 -(64, 88, 1) 10 -(64, 89, 1) 9 -(64, 90, 1) 8 -(64, 91, 1) 7 -(64, 92, 1) 6 -(64, 93, 1) 5 -(64, 94, 1) 4 -(64, 95, 1) 3 -(64, 96, 1) 2 -(64, 97, 1) 1 -(65, 4, 1) 1 -(65, 5, 1) 2 -(65, 6, 1) 3 -(65, 7, 1) 4 -(65, 8, 1) 5 -(65, 9, 1) 6 -(65, 10, 1) 7 -(65, 11, 1) 8 -(65, 12, 1) 8 -(65, 13, 1) 9 -(65, 14, 1) 10 -(65, 15, 1) 11 -(65, 16, 1) 12 -(65, 17, 1) 13 -(65, 18, 1) 14 -(65, 19, 1) 15 -(65, 20, 1) 16 -(65, 21, 1) 17 -(65, 22, 1) 18 -(65, 23, 1) 19 -(65, 24, 1) 19 -(65, 25, 1) 20 -(65, 26, 1) 21 -(65, 27, 1) 22 -(65, 28, 1) 23 -(65, 29, 1) 24 -(65, 30, 1) 24 -(65, 31, 1) 25 -(65, 32, 1) 26 -(65, 33, 1) 27 -(65, 34, 1) 28 -(65, 35, 1) 28 -(65, 36, 1) 29 -(65, 37, 1) 30 -(65, 38, 1) 30 -(65, 39, 1) 31 -(65, 40, 1) 32 -(65, 41, 1) 32 -(65, 42, 1) 33 -(65, 43, 1) 33 -(65, 44, 1) 34 -(65, 45, 1) 34 -(65, 46, 1) 34 -(65, 47, 1) 35 -(65, 48, 1) 35 -(65, 49, 1) 35 -(65, 50, 1) 35 -(65, 51, 1) 35 -(65, 52, 1) 35 -(65, 53, 1) 35 -(65, 54, 1) 35 -(65, 55, 1) 34 -(65, 56, 1) 34 -(65, 57, 1) 34 -(65, 58, 1) 33 -(65, 59, 1) 33 -(65, 60, 1) 32 -(65, 61, 1) 32 -(65, 62, 1) 31 -(65, 63, 1) 30 -(65, 64, 1) 30 -(65, 65, 1) 29 -(65, 66, 1) 28 -(65, 67, 1) 28 -(65, 68, 1) 27 -(65, 69, 1) 26 -(65, 70, 1) 25 -(65, 71, 1) 24 -(65, 72, 1) 24 -(65, 73, 1) 23 -(65, 74, 1) 22 -(65, 75, 1) 21 -(65, 76, 1) 20 -(65, 77, 1) 19 -(65, 78, 1) 19 -(65, 79, 1) 18 -(65, 80, 1) 17 -(65, 81, 1) 16 -(65, 82, 1) 15 -(65, 83, 1) 14 -(65, 84, 1) 13 -(65, 85, 1) 12 -(65, 86, 1) 11 -(65, 87, 1) 10 -(65, 88, 1) 9 -(65, 89, 1) 8 -(65, 90, 1) 8 -(65, 91, 1) 7 -(65, 92, 1) 6 -(65, 93, 1) 5 -(65, 94, 1) 4 -(65, 95, 1) 3 -(65, 96, 1) 2 -(65, 97, 1) 1 -(66, 6, 1) 3 -(66, 7, 1) 4 -(66, 8, 1) 5 -(66, 9, 1) 6 -(66, 10, 1) 6 -(66, 11, 1) 7 -(66, 12, 1) 8 -(66, 13, 1) 9 -(66, 14, 1) 10 -(66, 15, 1) 11 -(66, 16, 1) 12 -(66, 17, 1) 13 -(66, 18, 1) 14 -(66, 19, 1) 15 -(66, 20, 1) 16 -(66, 21, 1) 16 -(66, 22, 1) 17 -(66, 23, 1) 18 -(66, 24, 1) 19 -(66, 25, 1) 20 -(66, 26, 1) 21 -(66, 27, 1) 21 -(66, 28, 1) 22 -(66, 29, 1) 23 -(66, 30, 1) 24 -(66, 31, 1) 25 -(66, 32, 1) 25 -(66, 33, 1) 26 -(66, 34, 1) 27 -(66, 35, 1) 28 -(66, 36, 1) 28 -(66, 37, 1) 29 -(66, 38, 1) 30 -(66, 39, 1) 30 -(66, 40, 1) 31 -(66, 41, 1) 31 -(66, 42, 1) 32 -(66, 43, 1) 32 -(66, 44, 1) 33 -(66, 45, 1) 33 -(66, 46, 1) 33 -(66, 47, 1) 34 -(66, 48, 1) 34 -(66, 49, 1) 34 -(66, 50, 1) 34 -(66, 51, 1) 34 -(66, 52, 1) 34 -(66, 53, 1) 34 -(66, 54, 1) 34 -(66, 55, 1) 33 -(66, 56, 1) 33 -(66, 57, 1) 33 -(66, 58, 1) 32 -(66, 59, 1) 32 -(66, 60, 1) 31 -(66, 61, 1) 31 -(66, 62, 1) 30 -(66, 63, 1) 30 -(66, 64, 1) 29 -(66, 65, 1) 28 -(66, 66, 1) 28 -(66, 67, 1) 27 -(66, 68, 1) 26 -(66, 69, 1) 25 -(66, 70, 1) 25 -(66, 71, 1) 24 -(66, 72, 1) 23 -(66, 73, 1) 22 -(66, 74, 1) 21 -(66, 75, 1) 21 -(66, 76, 1) 20 -(66, 77, 1) 19 -(66, 78, 1) 18 -(66, 79, 1) 17 -(66, 80, 1) 16 -(66, 81, 1) 16 -(66, 82, 1) 15 -(66, 83, 1) 14 -(66, 84, 1) 13 -(66, 85, 1) 12 -(66, 86, 1) 11 -(66, 87, 1) 10 -(66, 88, 1) 9 -(66, 89, 1) 8 -(66, 90, 1) 7 -(66, 91, 1) 6 -(66, 92, 1) 6 -(66, 93, 1) 5 -(66, 94, 1) 4 -(66, 95, 1) 3 -(67, 6, 1) 2 -(67, 7, 1) 3 -(67, 8, 1) 4 -(67, 9, 1) 5 -(67, 10, 1) 6 -(67, 11, 1) 7 -(67, 12, 1) 8 -(67, 13, 1) 9 -(67, 14, 1) 10 -(67, 15, 1) 11 -(67, 16, 1) 11 -(67, 17, 1) 12 -(67, 18, 1) 13 -(67, 19, 1) 14 -(67, 20, 1) 15 -(67, 21, 1) 16 -(67, 22, 1) 17 -(67, 23, 1) 18 -(67, 24, 1) 18 -(67, 25, 1) 19 -(67, 26, 1) 20 -(67, 27, 1) 21 -(67, 28, 1) 22 -(67, 29, 1) 23 -(67, 30, 1) 23 -(67, 31, 1) 24 -(67, 32, 1) 25 -(67, 33, 1) 26 -(67, 34, 1) 26 -(67, 35, 1) 27 -(67, 36, 1) 28 -(67, 37, 1) 28 -(67, 38, 1) 29 -(67, 39, 1) 29 -(67, 40, 1) 30 -(67, 41, 1) 30 -(67, 42, 1) 31 -(67, 43, 1) 31 -(67, 44, 1) 32 -(67, 45, 1) 32 -(67, 46, 1) 32 -(67, 47, 1) 33 -(67, 48, 1) 33 -(67, 49, 1) 33 -(67, 50, 1) 33 -(67, 51, 1) 33 -(67, 52, 1) 33 -(67, 53, 1) 33 -(67, 54, 1) 33 -(67, 55, 1) 32 -(67, 56, 1) 32 -(67, 57, 1) 32 -(67, 58, 1) 31 -(67, 59, 1) 31 -(67, 60, 1) 30 -(67, 61, 1) 30 -(67, 62, 1) 29 -(67, 63, 1) 29 -(67, 64, 1) 28 -(67, 65, 1) 28 -(67, 66, 1) 27 -(67, 67, 1) 26 -(67, 68, 1) 26 -(67, 69, 1) 25 -(67, 70, 1) 24 -(67, 71, 1) 23 -(67, 72, 1) 23 -(67, 73, 1) 22 -(67, 74, 1) 21 -(67, 75, 1) 20 -(67, 76, 1) 19 -(67, 77, 1) 18 -(67, 78, 1) 18 -(67, 79, 1) 17 -(67, 80, 1) 16 -(67, 81, 1) 15 -(67, 82, 1) 14 -(67, 83, 1) 13 -(67, 84, 1) 12 -(67, 85, 1) 11 -(67, 86, 1) 11 -(67, 87, 1) 10 -(67, 88, 1) 9 -(67, 89, 1) 8 -(67, 90, 1) 7 -(67, 91, 1) 6 -(67, 92, 1) 5 -(67, 93, 1) 4 -(67, 94, 1) 3 -(67, 95, 1) 2 -(68, 6, 1) 2 -(68, 7, 1) 3 -(68, 8, 1) 4 -(68, 9, 1) 5 -(68, 10, 1) 6 -(68, 11, 1) 7 -(68, 12, 1) 7 -(68, 13, 1) 8 -(68, 14, 1) 9 -(68, 15, 1) 10 -(68, 16, 1) 11 -(68, 17, 1) 12 -(68, 18, 1) 13 -(68, 19, 1) 14 -(68, 20, 1) 15 -(68, 21, 1) 15 -(68, 22, 1) 16 -(68, 23, 1) 17 -(68, 24, 1) 18 -(68, 25, 1) 19 -(68, 26, 1) 20 -(68, 27, 1) 20 -(68, 28, 1) 21 -(68, 29, 1) 22 -(68, 30, 1) 23 -(68, 31, 1) 23 -(68, 32, 1) 24 -(68, 33, 1) 25 -(68, 34, 1) 26 -(68, 35, 1) 26 -(68, 36, 1) 27 -(68, 37, 1) 27 -(68, 38, 1) 28 -(68, 39, 1) 29 -(68, 40, 1) 29 -(68, 41, 1) 30 -(68, 42, 1) 30 -(68, 43, 1) 30 -(68, 44, 1) 31 -(68, 45, 1) 31 -(68, 46, 1) 31 -(68, 47, 1) 32 -(68, 48, 1) 32 -(68, 49, 1) 32 -(68, 50, 1) 32 -(68, 51, 1) 32 -(68, 52, 1) 32 -(68, 53, 1) 32 -(68, 54, 1) 32 -(68, 55, 1) 31 -(68, 56, 1) 31 -(68, 57, 1) 31 -(68, 58, 1) 30 -(68, 59, 1) 30 -(68, 60, 1) 30 -(68, 61, 1) 29 -(68, 62, 1) 29 -(68, 63, 1) 28 -(68, 64, 1) 27 -(68, 65, 1) 27 -(68, 66, 1) 26 -(68, 67, 1) 26 -(68, 68, 1) 25 -(68, 69, 1) 24 -(68, 70, 1) 23 -(68, 71, 1) 23 -(68, 72, 1) 22 -(68, 73, 1) 21 -(68, 74, 1) 20 -(68, 75, 1) 20 -(68, 76, 1) 19 -(68, 77, 1) 18 -(68, 78, 1) 17 -(68, 79, 1) 16 -(68, 80, 1) 15 -(68, 81, 1) 15 -(68, 82, 1) 14 -(68, 83, 1) 13 -(68, 84, 1) 12 -(68, 85, 1) 11 -(68, 86, 1) 10 -(68, 87, 1) 9 -(68, 88, 1) 8 -(68, 89, 1) 7 -(68, 90, 1) 7 -(68, 91, 1) 6 -(68, 92, 1) 5 -(68, 93, 1) 4 -(68, 94, 1) 3 -(68, 95, 1) 2 -(69, 6, 1) 2 -(69, 7, 1) 2 -(69, 8, 1) 3 -(69, 9, 1) 4 -(69, 10, 1) 5 -(69, 11, 1) 6 -(69, 12, 1) 7 -(69, 13, 1) 8 -(69, 14, 1) 9 -(69, 15, 1) 10 -(69, 16, 1) 11 -(69, 17, 1) 11 -(69, 18, 1) 12 -(69, 19, 1) 13 -(69, 20, 1) 14 -(69, 21, 1) 15 -(69, 22, 1) 16 -(69, 23, 1) 17 -(69, 24, 1) 17 -(69, 25, 1) 18 -(69, 26, 1) 19 -(69, 27, 1) 20 -(69, 28, 1) 20 -(69, 29, 1) 21 -(69, 30, 1) 22 -(69, 31, 1) 23 -(69, 32, 1) 23 -(69, 33, 1) 24 -(69, 34, 1) 25 -(69, 35, 1) 25 -(69, 36, 1) 26 -(69, 37, 1) 27 -(69, 38, 1) 27 -(69, 39, 1) 28 -(69, 40, 1) 28 -(69, 41, 1) 29 -(69, 42, 1) 29 -(69, 43, 1) 30 -(69, 44, 1) 30 -(69, 45, 1) 30 -(69, 46, 1) 30 -(69, 47, 1) 31 -(69, 48, 1) 31 -(69, 49, 1) 31 -(69, 50, 1) 31 -(69, 51, 1) 31 -(69, 52, 1) 31 -(69, 53, 1) 31 -(69, 54, 1) 31 -(69, 55, 1) 30 -(69, 56, 1) 30 -(69, 57, 1) 30 -(69, 58, 1) 30 -(69, 59, 1) 29 -(69, 60, 1) 29 -(69, 61, 1) 28 -(69, 62, 1) 28 -(69, 63, 1) 27 -(69, 64, 1) 27 -(69, 65, 1) 26 -(69, 66, 1) 25 -(69, 67, 1) 25 -(69, 68, 1) 24 -(69, 69, 1) 23 -(69, 70, 1) 23 -(69, 71, 1) 22 -(69, 72, 1) 21 -(69, 73, 1) 20 -(69, 74, 1) 20 -(69, 75, 1) 19 -(69, 76, 1) 18 -(69, 77, 1) 17 -(69, 78, 1) 17 -(69, 79, 1) 16 -(69, 80, 1) 15 -(69, 81, 1) 14 -(69, 82, 1) 13 -(69, 83, 1) 12 -(69, 84, 1) 11 -(69, 85, 1) 11 -(69, 86, 1) 10 -(69, 87, 1) 9 -(69, 88, 1) 8 -(69, 89, 1) 7 -(69, 90, 1) 6 -(69, 91, 1) 5 -(69, 92, 1) 4 -(69, 93, 1) 3 -(69, 94, 1) 2 -(69, 95, 1) 2 -(70, 6, 1) 1 -(70, 7, 1) 2 -(70, 8, 1) 3 -(70, 9, 1) 4 -(70, 10, 1) 5 -(70, 11, 1) 6 -(70, 12, 1) 7 -(70, 13, 1) 7 -(70, 14, 1) 8 -(70, 15, 1) 9 -(70, 16, 1) 10 -(70, 17, 1) 11 -(70, 18, 1) 12 -(70, 19, 1) 13 -(70, 20, 1) 13 -(70, 21, 1) 14 -(70, 22, 1) 15 -(70, 23, 1) 16 -(70, 24, 1) 17 -(70, 25, 1) 18 -(70, 26, 1) 18 -(70, 27, 1) 19 -(70, 28, 1) 20 -(70, 29, 1) 21 -(70, 30, 1) 21 -(70, 31, 1) 22 -(70, 32, 1) 23 -(70, 33, 1) 23 -(70, 34, 1) 24 -(70, 35, 1) 25 -(70, 36, 1) 25 -(70, 37, 1) 26 -(70, 38, 1) 26 -(70, 39, 1) 27 -(70, 40, 1) 27 -(70, 41, 1) 28 -(70, 42, 1) 28 -(70, 43, 1) 29 -(70, 44, 1) 29 -(70, 45, 1) 29 -(70, 46, 1) 30 -(70, 47, 1) 30 -(70, 48, 1) 30 -(70, 49, 1) 30 -(70, 50, 1) 30 -(70, 51, 1) 30 -(70, 52, 1) 30 -(70, 53, 1) 30 -(70, 54, 1) 30 -(70, 55, 1) 30 -(70, 56, 1) 29 -(70, 57, 1) 29 -(70, 58, 1) 29 -(70, 59, 1) 28 -(70, 60, 1) 28 -(70, 61, 1) 27 -(70, 62, 1) 27 -(70, 63, 1) 26 -(70, 64, 1) 26 -(70, 65, 1) 25 -(70, 66, 1) 25 -(70, 67, 1) 24 -(70, 68, 1) 23 -(70, 69, 1) 23 -(70, 70, 1) 22 -(70, 71, 1) 21 -(70, 72, 1) 21 -(70, 73, 1) 20 -(70, 74, 1) 19 -(70, 75, 1) 18 -(70, 76, 1) 18 -(70, 77, 1) 17 -(70, 78, 1) 16 -(70, 79, 1) 15 -(70, 80, 1) 14 -(70, 81, 1) 13 -(70, 82, 1) 13 -(70, 83, 1) 12 -(70, 84, 1) 11 -(70, 85, 1) 10 -(70, 86, 1) 9 -(70, 87, 1) 8 -(70, 88, 1) 7 -(70, 89, 1) 7 -(70, 90, 1) 6 -(70, 91, 1) 5 -(70, 92, 1) 4 -(70, 93, 1) 3 -(70, 94, 1) 2 -(70, 95, 1) 1 -(71, 6, 1) 1 -(71, 7, 1) 2 -(71, 8, 1) 3 -(71, 9, 1) 4 -(71, 10, 1) 5 -(71, 11, 1) 5 -(71, 12, 1) 6 -(71, 13, 1) 7 -(71, 14, 1) 8 -(71, 15, 1) 9 -(71, 16, 1) 10 -(71, 17, 1) 11 -(71, 18, 1) 11 -(71, 19, 1) 12 -(71, 20, 1) 13 -(71, 21, 1) 14 -(71, 22, 1) 15 -(71, 23, 1) 15 -(71, 24, 1) 16 -(71, 25, 1) 17 -(71, 26, 1) 18 -(71, 27, 1) 19 -(71, 28, 1) 19 -(71, 29, 1) 20 -(71, 30, 1) 21 -(71, 31, 1) 21 -(71, 32, 1) 22 -(71, 33, 1) 23 -(71, 34, 1) 23 -(71, 35, 1) 24 -(71, 36, 1) 24 -(71, 37, 1) 25 -(71, 38, 1) 26 -(71, 39, 1) 26 -(71, 40, 1) 27 -(71, 41, 1) 27 -(71, 42, 1) 27 -(71, 43, 1) 28 -(71, 44, 1) 28 -(71, 45, 1) 28 -(71, 46, 1) 29 -(71, 47, 1) 29 -(71, 48, 1) 29 -(71, 49, 1) 29 -(71, 50, 1) 29 -(71, 51, 1) 29 -(71, 52, 1) 29 -(71, 53, 1) 29 -(71, 54, 1) 29 -(71, 55, 1) 29 -(71, 56, 1) 28 -(71, 57, 1) 28 -(71, 58, 1) 28 -(71, 59, 1) 27 -(71, 60, 1) 27 -(71, 61, 1) 27 -(71, 62, 1) 26 -(71, 63, 1) 26 -(71, 64, 1) 25 -(71, 65, 1) 24 -(71, 66, 1) 24 -(71, 67, 1) 23 -(71, 68, 1) 23 -(71, 69, 1) 22 -(71, 70, 1) 21 -(71, 71, 1) 21 -(71, 72, 1) 20 -(71, 73, 1) 19 -(71, 74, 1) 19 -(71, 75, 1) 18 -(71, 76, 1) 17 -(71, 77, 1) 16 -(71, 78, 1) 15 -(71, 79, 1) 15 -(71, 80, 1) 14 -(71, 81, 1) 13 -(71, 82, 1) 12 -(71, 83, 1) 11 -(71, 84, 1) 11 -(71, 85, 1) 10 -(71, 86, 1) 9 -(71, 87, 1) 8 -(71, 88, 1) 7 -(71, 89, 1) 6 -(71, 90, 1) 5 -(71, 91, 1) 5 -(71, 92, 1) 4 -(71, 93, 1) 3 -(71, 94, 1) 2 -(71, 95, 1) 1 -(72, 6, 1) 1 -(72, 7, 1) 1 -(72, 8, 1) 2 -(72, 9, 1) 3 -(72, 10, 1) 4 -(72, 11, 1) 5 -(72, 12, 1) 6 -(72, 13, 1) 7 -(72, 14, 1) 7 -(72, 15, 1) 8 -(72, 16, 1) 9 -(72, 17, 1) 10 -(72, 18, 1) 11 -(72, 19, 1) 12 -(72, 20, 1) 12 -(72, 21, 1) 13 -(72, 22, 1) 14 -(72, 23, 1) 15 -(72, 24, 1) 16 -(72, 25, 1) 16 -(72, 26, 1) 17 -(72, 27, 1) 18 -(72, 28, 1) 19 -(72, 29, 1) 19 -(72, 30, 1) 20 -(72, 31, 1) 21 -(72, 32, 1) 21 -(72, 33, 1) 22 -(72, 34, 1) 23 -(72, 35, 1) 23 -(72, 36, 1) 24 -(72, 37, 1) 24 -(72, 38, 1) 25 -(72, 39, 1) 25 -(72, 40, 1) 26 -(72, 41, 1) 26 -(72, 42, 1) 26 -(72, 43, 1) 27 -(72, 44, 1) 27 -(72, 45, 1) 27 -(72, 46, 1) 28 -(72, 47, 1) 28 -(72, 48, 1) 28 -(72, 49, 1) 28 -(72, 50, 1) 28 -(72, 51, 1) 28 -(72, 52, 1) 28 -(72, 53, 1) 28 -(72, 54, 1) 28 -(72, 55, 1) 28 -(72, 56, 1) 27 -(72, 57, 1) 27 -(72, 58, 1) 27 -(72, 59, 1) 26 -(72, 60, 1) 26 -(72, 61, 1) 26 -(72, 62, 1) 25 -(72, 63, 1) 25 -(72, 64, 1) 24 -(72, 65, 1) 24 -(72, 66, 1) 23 -(72, 67, 1) 23 -(72, 68, 1) 22 -(72, 69, 1) 21 -(72, 70, 1) 21 -(72, 71, 1) 20 -(72, 72, 1) 19 -(72, 73, 1) 19 -(72, 74, 1) 18 -(72, 75, 1) 17 -(72, 76, 1) 16 -(72, 77, 1) 16 -(72, 78, 1) 15 -(72, 79, 1) 14 -(72, 80, 1) 13 -(72, 81, 1) 12 -(72, 82, 1) 12 -(72, 83, 1) 11 -(72, 84, 1) 10 -(72, 85, 1) 9 -(72, 86, 1) 8 -(72, 87, 1) 7 -(72, 88, 1) 7 -(72, 89, 1) 6 -(72, 90, 1) 5 -(72, 91, 1) 4 -(72, 92, 1) 3 -(72, 93, 1) 2 -(72, 94, 1) 1 -(72, 95, 1) 1 -(73, 6, 1) 0 -(73, 7, 1) 1 -(73, 8, 1) 2 -(73, 9, 1) 3 -(73, 10, 1) 4 -(73, 11, 1) 4 -(73, 12, 1) 5 -(73, 13, 1) 6 -(73, 14, 1) 7 -(73, 15, 1) 8 -(73, 16, 1) 9 -(73, 17, 1) 9 -(73, 18, 1) 10 -(73, 19, 1) 11 -(73, 20, 1) 12 -(73, 21, 1) 13 -(73, 22, 1) 13 -(73, 23, 1) 14 -(73, 24, 1) 15 -(73, 25, 1) 16 -(73, 26, 1) 16 -(73, 27, 1) 17 -(73, 28, 1) 18 -(73, 29, 1) 19 -(73, 30, 1) 19 -(73, 31, 1) 20 -(73, 32, 1) 20 -(73, 33, 1) 21 -(73, 34, 1) 22 -(73, 35, 1) 22 -(73, 36, 1) 23 -(73, 37, 1) 23 -(73, 38, 1) 24 -(73, 39, 1) 24 -(73, 40, 1) 25 -(73, 41, 1) 25 -(73, 42, 1) 25 -(73, 43, 1) 26 -(73, 44, 1) 26 -(73, 45, 1) 26 -(73, 46, 1) 27 -(73, 47, 1) 27 -(73, 48, 1) 27 -(73, 49, 1) 27 -(73, 50, 1) 27 -(73, 51, 1) 27 -(73, 52, 1) 27 -(73, 53, 1) 27 -(73, 54, 1) 27 -(73, 55, 1) 27 -(73, 56, 1) 26 -(73, 57, 1) 26 -(73, 58, 1) 26 -(73, 59, 1) 25 -(73, 60, 1) 25 -(73, 61, 1) 25 -(73, 62, 1) 24 -(73, 63, 1) 24 -(73, 64, 1) 23 -(73, 65, 1) 23 -(73, 66, 1) 22 -(73, 67, 1) 22 -(73, 68, 1) 21 -(73, 69, 1) 20 -(73, 70, 1) 20 -(73, 71, 1) 19 -(73, 72, 1) 19 -(73, 73, 1) 18 -(73, 74, 1) 17 -(73, 75, 1) 16 -(73, 76, 1) 16 -(73, 77, 1) 15 -(73, 78, 1) 14 -(73, 79, 1) 13 -(73, 80, 1) 13 -(73, 81, 1) 12 -(73, 82, 1) 11 -(73, 83, 1) 10 -(73, 84, 1) 9 -(73, 85, 1) 9 -(73, 86, 1) 8 -(73, 87, 1) 7 -(73, 88, 1) 6 -(73, 89, 1) 5 -(73, 90, 1) 4 -(73, 91, 1) 4 -(73, 92, 1) 3 -(73, 93, 1) 2 -(73, 94, 1) 1 -(73, 95, 1) 0 -(74, 6, 1) 0 -(74, 7, 1) 0 -(74, 8, 1) 1 -(74, 9, 1) 2 -(74, 10, 1) 3 -(74, 11, 1) 4 -(74, 12, 1) 5 -(74, 13, 1) 6 -(74, 14, 1) 6 -(74, 15, 1) 7 -(74, 16, 1) 8 -(74, 17, 1) 9 -(74, 18, 1) 10 -(74, 19, 1) 10 -(74, 20, 1) 11 -(74, 21, 1) 12 -(74, 22, 1) 13 -(74, 23, 1) 14 -(74, 24, 1) 14 -(74, 25, 1) 15 -(74, 26, 1) 16 -(74, 27, 1) 16 -(74, 28, 1) 17 -(74, 29, 1) 18 -(74, 30, 1) 18 -(74, 31, 1) 19 -(74, 32, 1) 20 -(74, 33, 1) 20 -(74, 34, 1) 21 -(74, 35, 1) 21 -(74, 36, 1) 22 -(74, 37, 1) 22 -(74, 38, 1) 23 -(74, 39, 1) 23 -(74, 40, 1) 24 -(74, 41, 1) 24 -(74, 42, 1) 25 -(74, 43, 1) 25 -(74, 44, 1) 25 -(74, 45, 1) 25 -(74, 46, 1) 26 -(74, 47, 1) 26 -(74, 48, 1) 26 -(74, 49, 1) 26 -(74, 50, 1) 26 -(74, 51, 1) 26 -(74, 52, 1) 26 -(74, 53, 1) 26 -(74, 54, 1) 26 -(74, 55, 1) 26 -(74, 56, 1) 25 -(74, 57, 1) 25 -(74, 58, 1) 25 -(74, 59, 1) 25 -(74, 60, 1) 24 -(74, 61, 1) 24 -(74, 62, 1) 23 -(74, 63, 1) 23 -(74, 64, 1) 22 -(74, 65, 1) 22 -(74, 66, 1) 21 -(74, 67, 1) 21 -(74, 68, 1) 20 -(74, 69, 1) 20 -(74, 70, 1) 19 -(74, 71, 1) 18 -(74, 72, 1) 18 -(74, 73, 1) 17 -(74, 74, 1) 16 -(74, 75, 1) 16 -(74, 76, 1) 15 -(74, 77, 1) 14 -(74, 78, 1) 14 -(74, 79, 1) 13 -(74, 80, 1) 12 -(74, 81, 1) 11 -(74, 82, 1) 10 -(74, 83, 1) 10 -(74, 84, 1) 9 -(74, 85, 1) 8 -(74, 86, 1) 7 -(74, 87, 1) 6 -(74, 88, 1) 6 -(74, 89, 1) 5 -(74, 90, 1) 4 -(74, 91, 1) 3 -(74, 92, 1) 2 -(74, 93, 1) 1 -(74, 94, 1) 0 -(74, 95, 1) 0 -(75, 6, 1) 0 -(75, 7, 1) 0 -(75, 8, 1) 1 -(75, 9, 1) 2 -(75, 10, 1) 3 -(75, 11, 1) 3 -(75, 12, 1) 4 -(75, 13, 1) 5 -(75, 14, 1) 6 -(75, 15, 1) 7 -(75, 16, 1) 7 -(75, 17, 1) 8 -(75, 18, 1) 9 -(75, 19, 1) 10 -(75, 20, 1) 11 -(75, 21, 1) 11 -(75, 22, 1) 12 -(75, 23, 1) 13 -(75, 24, 1) 14 -(75, 25, 1) 14 -(75, 26, 1) 15 -(75, 27, 1) 16 -(75, 28, 1) 16 -(75, 29, 1) 17 -(75, 30, 1) 18 -(75, 31, 1) 18 -(75, 32, 1) 19 -(75, 33, 1) 19 -(75, 34, 1) 20 -(75, 35, 1) 21 -(75, 36, 1) 21 -(75, 37, 1) 22 -(75, 38, 1) 22 -(75, 39, 1) 22 -(75, 40, 1) 23 -(75, 41, 1) 23 -(75, 42, 1) 24 -(75, 43, 1) 24 -(75, 44, 1) 24 -(75, 45, 1) 24 -(75, 46, 1) 25 -(75, 47, 1) 25 -(75, 48, 1) 25 -(75, 49, 1) 25 -(75, 50, 1) 25 -(75, 51, 1) 25 -(75, 52, 1) 25 -(75, 53, 1) 25 -(75, 54, 1) 25 -(75, 55, 1) 25 -(75, 56, 1) 24 -(75, 57, 1) 24 -(75, 58, 1) 24 -(75, 59, 1) 24 -(75, 60, 1) 23 -(75, 61, 1) 23 -(75, 62, 1) 22 -(75, 63, 1) 22 -(75, 64, 1) 22 -(75, 65, 1) 21 -(75, 66, 1) 21 -(75, 67, 1) 20 -(75, 68, 1) 19 -(75, 69, 1) 19 -(75, 70, 1) 18 -(75, 71, 1) 18 -(75, 72, 1) 17 -(75, 73, 1) 16 -(75, 74, 1) 16 -(75, 75, 1) 15 -(75, 76, 1) 14 -(75, 77, 1) 14 -(75, 78, 1) 13 -(75, 79, 1) 12 -(75, 80, 1) 11 -(75, 81, 1) 11 -(75, 82, 1) 10 -(75, 83, 1) 9 -(75, 84, 1) 8 -(75, 85, 1) 7 -(75, 86, 1) 7 -(75, 87, 1) 6 -(75, 88, 1) 5 -(75, 89, 1) 4 -(75, 90, 1) 3 -(75, 91, 1) 3 -(75, 92, 1) 2 -(75, 93, 1) 1 -(75, 94, 1) 0 -(75, 95, 1) 0 -(76, 9, 1) 1 -(76, 10, 1) 2 -(76, 11, 1) 3 -(76, 12, 1) 4 -(76, 13, 1) 5 -(76, 14, 1) 5 -(76, 15, 1) 6 -(76, 16, 1) 7 -(76, 17, 1) 8 -(76, 18, 1) 9 -(76, 19, 1) 9 -(76, 20, 1) 10 -(76, 21, 1) 11 -(76, 22, 1) 12 -(76, 23, 1) 12 -(76, 24, 1) 13 -(76, 25, 1) 14 -(76, 26, 1) 14 -(76, 27, 1) 15 -(76, 28, 1) 16 -(76, 29, 1) 16 -(76, 30, 1) 17 -(76, 31, 1) 18 -(76, 32, 1) 18 -(76, 33, 1) 19 -(76, 34, 1) 19 -(76, 35, 1) 20 -(76, 36, 1) 20 -(76, 37, 1) 21 -(76, 38, 1) 21 -(76, 39, 1) 22 -(76, 40, 1) 22 -(76, 41, 1) 22 -(76, 42, 1) 23 -(76, 43, 1) 23 -(76, 44, 1) 23 -(76, 45, 1) 23 -(76, 46, 1) 24 -(76, 47, 1) 24 -(76, 48, 1) 24 -(76, 49, 1) 24 -(76, 50, 1) 24 -(76, 51, 1) 24 -(76, 52, 1) 24 -(76, 53, 1) 24 -(76, 54, 1) 24 -(76, 55, 1) 24 -(76, 56, 1) 23 -(76, 57, 1) 23 -(76, 58, 1) 23 -(76, 59, 1) 23 -(76, 60, 1) 22 -(76, 61, 1) 22 -(76, 62, 1) 22 -(76, 63, 1) 21 -(76, 64, 1) 21 -(76, 65, 1) 20 -(76, 66, 1) 20 -(76, 67, 1) 19 -(76, 68, 1) 19 -(76, 69, 1) 18 -(76, 70, 1) 18 -(76, 71, 1) 17 -(76, 72, 1) 16 -(76, 73, 1) 16 -(76, 74, 1) 15 -(76, 75, 1) 14 -(76, 76, 1) 14 -(76, 77, 1) 13 -(76, 78, 1) 12 -(76, 79, 1) 12 -(76, 80, 1) 11 -(76, 81, 1) 10 -(76, 82, 1) 9 -(76, 83, 1) 9 -(76, 84, 1) 8 -(76, 85, 1) 7 -(76, 86, 1) 6 -(76, 87, 1) 5 -(76, 88, 1) 5 -(76, 89, 1) 4 -(76, 90, 1) 3 -(76, 91, 1) 2 -(76, 92, 1) 1 -(77, 9, 1) 1 -(77, 10, 1) 2 -(77, 11, 1) 2 -(77, 12, 1) 3 -(77, 13, 1) 4 -(77, 14, 1) 5 -(77, 15, 1) 6 -(77, 16, 1) 6 -(77, 17, 1) 7 -(77, 18, 1) 8 -(77, 19, 1) 9 -(77, 20, 1) 9 -(77, 21, 1) 10 -(77, 22, 1) 11 -(77, 23, 1) 12 -(77, 24, 1) 12 -(77, 25, 1) 13 -(77, 26, 1) 14 -(77, 27, 1) 14 -(77, 28, 1) 15 -(77, 29, 1) 16 -(77, 30, 1) 16 -(77, 31, 1) 17 -(77, 32, 1) 17 -(77, 33, 1) 18 -(77, 34, 1) 18 -(77, 35, 1) 19 -(77, 36, 1) 19 -(77, 37, 1) 20 -(77, 38, 1) 20 -(77, 39, 1) 21 -(77, 40, 1) 21 -(77, 41, 1) 21 -(77, 42, 1) 22 -(77, 43, 1) 22 -(77, 44, 1) 22 -(77, 45, 1) 22 -(77, 46, 1) 23 -(77, 47, 1) 23 -(77, 48, 1) 23 -(77, 49, 1) 23 -(77, 50, 1) 23 -(77, 51, 1) 23 -(77, 52, 1) 23 -(77, 53, 1) 23 -(77, 54, 1) 23 -(77, 55, 1) 23 -(77, 56, 1) 22 -(77, 57, 1) 22 -(77, 58, 1) 22 -(77, 59, 1) 22 -(77, 60, 1) 21 -(77, 61, 1) 21 -(77, 62, 1) 21 -(77, 63, 1) 20 -(77, 64, 1) 20 -(77, 65, 1) 19 -(77, 66, 1) 19 -(77, 67, 1) 18 -(77, 68, 1) 18 -(77, 69, 1) 17 -(77, 70, 1) 17 -(77, 71, 1) 16 -(77, 72, 1) 16 -(77, 73, 1) 15 -(77, 74, 1) 14 -(77, 75, 1) 14 -(77, 76, 1) 13 -(77, 77, 1) 12 -(77, 78, 1) 12 -(77, 79, 1) 11 -(77, 80, 1) 10 -(77, 81, 1) 9 -(77, 82, 1) 9 -(77, 83, 1) 8 -(77, 84, 1) 7 -(77, 85, 1) 6 -(77, 86, 1) 6 -(77, 87, 1) 5 -(77, 88, 1) 4 -(77, 89, 1) 3 -(77, 90, 1) 2 -(77, 91, 1) 2 -(77, 92, 1) 1 -(78, 9, 1) 0 -(78, 10, 1) 1 -(78, 11, 1) 2 -(78, 12, 1) 3 -(78, 13, 1) 3 -(78, 14, 1) 4 -(78, 15, 1) 5 -(78, 16, 1) 6 -(78, 17, 1) 7 -(78, 18, 1) 7 -(78, 19, 1) 8 -(78, 20, 1) 9 -(78, 21, 1) 9 -(78, 22, 1) 10 -(78, 23, 1) 11 -(78, 24, 1) 12 -(78, 25, 1) 12 -(78, 26, 1) 13 -(78, 27, 1) 14 -(78, 28, 1) 14 -(78, 29, 1) 15 -(78, 30, 1) 15 -(78, 31, 1) 16 -(78, 32, 1) 17 -(78, 33, 1) 17 -(78, 34, 1) 18 -(78, 35, 1) 18 -(78, 36, 1) 19 -(78, 37, 1) 19 -(78, 38, 1) 19 -(78, 39, 1) 20 -(78, 40, 1) 20 -(78, 41, 1) 20 -(78, 42, 1) 21 -(78, 43, 1) 21 -(78, 44, 1) 21 -(78, 45, 1) 21 -(78, 46, 1) 22 -(78, 47, 1) 22 -(78, 48, 1) 22 -(78, 49, 1) 22 -(78, 50, 1) 22 -(78, 51, 1) 22 -(78, 52, 1) 22 -(78, 53, 1) 22 -(78, 54, 1) 22 -(78, 55, 1) 22 -(78, 56, 1) 21 -(78, 57, 1) 21 -(78, 58, 1) 21 -(78, 59, 1) 21 -(78, 60, 1) 20 -(78, 61, 1) 20 -(78, 62, 1) 20 -(78, 63, 1) 19 -(78, 64, 1) 19 -(78, 65, 1) 19 -(78, 66, 1) 18 -(78, 67, 1) 18 -(78, 68, 1) 17 -(78, 69, 1) 17 -(78, 70, 1) 16 -(78, 71, 1) 15 -(78, 72, 1) 15 -(78, 73, 1) 14 -(78, 74, 1) 14 -(78, 75, 1) 13 -(78, 76, 1) 12 -(78, 77, 1) 12 -(78, 78, 1) 11 -(78, 79, 1) 10 -(78, 80, 1) 9 -(78, 81, 1) 9 -(78, 82, 1) 8 -(78, 83, 1) 7 -(78, 84, 1) 7 -(78, 85, 1) 6 -(78, 86, 1) 5 -(78, 87, 1) 4 -(78, 88, 1) 3 -(78, 89, 1) 3 -(78, 90, 1) 2 -(78, 91, 1) 1 -(78, 92, 1) 0 -(79, 9, 1) 0 -(79, 10, 1) 1 -(79, 11, 1) 1 -(79, 12, 1) 2 -(79, 13, 1) 3 -(79, 14, 1) 4 -(79, 15, 1) 4 -(79, 16, 1) 5 -(79, 17, 1) 6 -(79, 18, 1) 7 -(79, 19, 1) 7 -(79, 20, 1) 8 -(79, 21, 1) 9 -(79, 22, 1) 9 -(79, 23, 1) 10 -(79, 24, 1) 11 -(79, 25, 1) 12 -(79, 26, 1) 12 -(79, 27, 1) 13 -(79, 28, 1) 13 -(79, 29, 1) 14 -(79, 30, 1) 15 -(79, 31, 1) 15 -(79, 32, 1) 16 -(79, 33, 1) 16 -(79, 34, 1) 17 -(79, 35, 1) 17 -(79, 36, 1) 18 -(79, 37, 1) 18 -(79, 38, 1) 18 -(79, 39, 1) 19 -(79, 40, 1) 19 -(79, 41, 1) 20 -(79, 42, 1) 20 -(79, 43, 1) 20 -(79, 44, 1) 20 -(79, 45, 1) 20 -(79, 46, 1) 21 -(79, 47, 1) 21 -(79, 48, 1) 21 -(79, 49, 1) 21 -(79, 50, 1) 21 -(79, 51, 1) 21 -(79, 52, 1) 21 -(79, 53, 1) 21 -(79, 54, 1) 21 -(79, 55, 1) 21 -(79, 56, 1) 20 -(79, 57, 1) 20 -(79, 58, 1) 20 -(79, 59, 1) 20 -(79, 60, 1) 20 -(79, 61, 1) 19 -(79, 62, 1) 19 -(79, 63, 1) 18 -(79, 64, 1) 18 -(79, 65, 1) 18 -(79, 66, 1) 17 -(79, 67, 1) 17 -(79, 68, 1) 16 -(79, 69, 1) 16 -(79, 70, 1) 15 -(79, 71, 1) 15 -(79, 72, 1) 14 -(79, 73, 1) 13 -(79, 74, 1) 13 -(79, 75, 1) 12 -(79, 76, 1) 12 -(79, 77, 1) 11 -(79, 78, 1) 10 -(79, 79, 1) 9 -(79, 80, 1) 9 -(79, 81, 1) 8 -(79, 82, 1) 7 -(79, 83, 1) 7 -(79, 84, 1) 6 -(79, 85, 1) 5 -(79, 86, 1) 4 -(79, 87, 1) 4 -(79, 88, 1) 3 -(79, 89, 1) 2 -(79, 90, 1) 1 -(79, 91, 1) 1 -(79, 92, 1) 0 -(80, 9, 1) 0 -(80, 10, 1) 0 -(80, 11, 1) 1 -(80, 12, 1) 1 -(80, 13, 1) 2 -(80, 14, 1) 3 -(80, 15, 1) 4 -(80, 16, 1) 4 -(80, 17, 1) 5 -(80, 18, 1) 6 -(80, 19, 1) 7 -(80, 20, 1) 7 -(80, 21, 1) 8 -(80, 22, 1) 9 -(80, 23, 1) 9 -(80, 24, 1) 10 -(80, 25, 1) 11 -(80, 26, 1) 11 -(80, 27, 1) 12 -(80, 28, 1) 13 -(80, 29, 1) 13 -(80, 30, 1) 14 -(80, 31, 1) 14 -(80, 32, 1) 15 -(80, 33, 1) 15 -(80, 34, 1) 16 -(80, 35, 1) 16 -(80, 36, 1) 17 -(80, 37, 1) 17 -(80, 38, 1) 18 -(80, 39, 1) 18 -(80, 40, 1) 18 -(80, 41, 1) 19 -(80, 42, 1) 19 -(80, 43, 1) 19 -(80, 44, 1) 19 -(80, 45, 1) 20 -(80, 46, 1) 20 -(80, 47, 1) 20 -(80, 48, 1) 20 -(80, 49, 1) 20 -(80, 50, 1) 20 -(80, 51, 1) 20 -(80, 52, 1) 20 -(80, 53, 1) 20 -(80, 54, 1) 20 -(80, 55, 1) 20 -(80, 56, 1) 20 -(80, 57, 1) 19 -(80, 58, 1) 19 -(80, 59, 1) 19 -(80, 60, 1) 19 -(80, 61, 1) 18 -(80, 62, 1) 18 -(80, 63, 1) 18 -(80, 64, 1) 17 -(80, 65, 1) 17 -(80, 66, 1) 16 -(80, 67, 1) 16 -(80, 68, 1) 15 -(80, 69, 1) 15 -(80, 70, 1) 14 -(80, 71, 1) 14 -(80, 72, 1) 13 -(80, 73, 1) 13 -(80, 74, 1) 12 -(80, 75, 1) 11 -(80, 76, 1) 11 -(80, 77, 1) 10 -(80, 78, 1) 9 -(80, 79, 1) 9 -(80, 80, 1) 8 -(80, 81, 1) 7 -(80, 82, 1) 7 -(80, 83, 1) 6 -(80, 84, 1) 5 -(80, 85, 1) 4 -(80, 86, 1) 4 -(80, 87, 1) 3 -(80, 88, 1) 2 -(80, 89, 1) 1 -(80, 90, 1) 1 -(80, 91, 1) 0 -(80, 92, 1) 0 -(81, 14, 1) 3 -(81, 15, 1) 3 -(81, 16, 1) 4 -(81, 17, 1) 5 -(81, 18, 1) 5 -(81, 19, 1) 6 -(81, 20, 1) 7 -(81, 21, 1) 7 -(81, 22, 1) 8 -(81, 23, 1) 9 -(81, 24, 1) 9 -(81, 25, 1) 10 -(81, 26, 1) 11 -(81, 27, 1) 11 -(81, 28, 1) 12 -(81, 29, 1) 12 -(81, 30, 1) 13 -(81, 31, 1) 14 -(81, 32, 1) 14 -(81, 33, 1) 15 -(81, 34, 1) 15 -(81, 35, 1) 15 -(81, 36, 1) 16 -(81, 37, 1) 16 -(81, 38, 1) 17 -(81, 39, 1) 17 -(81, 40, 1) 17 -(81, 41, 1) 18 -(81, 42, 1) 18 -(81, 43, 1) 18 -(81, 44, 1) 18 -(81, 45, 1) 19 -(81, 46, 1) 19 -(81, 47, 1) 19 -(81, 48, 1) 19 -(81, 49, 1) 19 -(81, 50, 1) 19 -(81, 51, 1) 19 -(81, 52, 1) 19 -(81, 53, 1) 19 -(81, 54, 1) 19 -(81, 55, 1) 19 -(81, 56, 1) 19 -(81, 57, 1) 18 -(81, 58, 1) 18 -(81, 59, 1) 18 -(81, 60, 1) 18 -(81, 61, 1) 17 -(81, 62, 1) 17 -(81, 63, 1) 17 -(81, 64, 1) 16 -(81, 65, 1) 16 -(81, 66, 1) 15 -(81, 67, 1) 15 -(81, 68, 1) 15 -(81, 69, 1) 14 -(81, 70, 1) 14 -(81, 71, 1) 13 -(81, 72, 1) 12 -(81, 73, 1) 12 -(81, 74, 1) 11 -(81, 75, 1) 11 -(81, 76, 1) 10 -(81, 77, 1) 9 -(81, 78, 1) 9 -(81, 79, 1) 8 -(81, 80, 1) 7 -(81, 81, 1) 7 -(81, 82, 1) 6 -(81, 83, 1) 5 -(81, 84, 1) 5 -(81, 85, 1) 4 -(81, 86, 1) 3 -(81, 87, 1) 3 -(82, 14, 1) 2 -(82, 15, 1) 3 -(82, 16, 1) 3 -(82, 17, 1) 4 -(82, 18, 1) 5 -(82, 19, 1) 5 -(82, 20, 1) 6 -(82, 21, 1) 7 -(82, 22, 1) 7 -(82, 23, 1) 8 -(82, 24, 1) 9 -(82, 25, 1) 9 -(82, 26, 1) 10 -(82, 27, 1) 10 -(82, 28, 1) 11 -(82, 29, 1) 12 -(82, 30, 1) 12 -(82, 31, 1) 13 -(82, 32, 1) 13 -(82, 33, 1) 14 -(82, 34, 1) 14 -(82, 35, 1) 15 -(82, 36, 1) 15 -(82, 37, 1) 15 -(82, 38, 1) 16 -(82, 39, 1) 16 -(82, 40, 1) 16 -(82, 41, 1) 17 -(82, 42, 1) 17 -(82, 43, 1) 17 -(82, 44, 1) 17 -(82, 45, 1) 18 -(82, 46, 1) 18 -(82, 47, 1) 18 -(82, 48, 1) 18 -(82, 49, 1) 18 -(82, 50, 1) 18 -(82, 51, 1) 18 -(82, 52, 1) 18 -(82, 53, 1) 18 -(82, 54, 1) 18 -(82, 55, 1) 18 -(82, 56, 1) 18 -(82, 57, 1) 17 -(82, 58, 1) 17 -(82, 59, 1) 17 -(82, 60, 1) 17 -(82, 61, 1) 16 -(82, 62, 1) 16 -(82, 63, 1) 16 -(82, 64, 1) 15 -(82, 65, 1) 15 -(82, 66, 1) 15 -(82, 67, 1) 14 -(82, 68, 1) 14 -(82, 69, 1) 13 -(82, 70, 1) 13 -(82, 71, 1) 12 -(82, 72, 1) 12 -(82, 73, 1) 11 -(82, 74, 1) 10 -(82, 75, 1) 10 -(82, 76, 1) 9 -(82, 77, 1) 9 -(82, 78, 1) 8 -(82, 79, 1) 7 -(82, 80, 1) 7 -(82, 81, 1) 6 -(82, 82, 1) 5 -(82, 83, 1) 5 -(82, 84, 1) 4 -(82, 85, 1) 3 -(82, 86, 1) 3 -(82, 87, 1) 2 -(83, 14, 1) 1 -(83, 15, 1) 2 -(83, 16, 1) 3 -(83, 17, 1) 3 -(83, 18, 1) 4 -(83, 19, 1) 5 -(83, 20, 1) 5 -(83, 21, 1) 6 -(83, 22, 1) 7 -(83, 23, 1) 7 -(83, 24, 1) 8 -(83, 25, 1) 8 -(83, 26, 1) 9 -(83, 27, 1) 10 -(83, 28, 1) 10 -(83, 29, 1) 11 -(83, 30, 1) 11 -(83, 31, 1) 12 -(83, 32, 1) 12 -(83, 33, 1) 13 -(83, 34, 1) 13 -(83, 35, 1) 14 -(83, 36, 1) 14 -(83, 37, 1) 14 -(83, 38, 1) 15 -(83, 39, 1) 15 -(83, 40, 1) 15 -(83, 41, 1) 16 -(83, 42, 1) 16 -(83, 43, 1) 16 -(83, 44, 1) 16 -(83, 45, 1) 17 -(83, 46, 1) 17 -(83, 47, 1) 17 -(83, 48, 1) 17 -(83, 49, 1) 17 -(83, 50, 1) 17 -(83, 51, 1) 17 -(83, 52, 1) 17 -(83, 53, 1) 17 -(83, 54, 1) 17 -(83, 55, 1) 17 -(83, 56, 1) 17 -(83, 57, 1) 16 -(83, 58, 1) 16 -(83, 59, 1) 16 -(83, 60, 1) 16 -(83, 61, 1) 15 -(83, 62, 1) 15 -(83, 63, 1) 15 -(83, 64, 1) 14 -(83, 65, 1) 14 -(83, 66, 1) 14 -(83, 67, 1) 13 -(83, 68, 1) 13 -(83, 69, 1) 12 -(83, 70, 1) 12 -(83, 71, 1) 11 -(83, 72, 1) 11 -(83, 73, 1) 10 -(83, 74, 1) 10 -(83, 75, 1) 9 -(83, 76, 1) 8 -(83, 77, 1) 8 -(83, 78, 1) 7 -(83, 79, 1) 7 -(83, 80, 1) 6 -(83, 81, 1) 5 -(83, 82, 1) 5 -(83, 83, 1) 4 -(83, 84, 1) 3 -(83, 85, 1) 3 -(83, 86, 1) 2 -(83, 87, 1) 1 -(84, 14, 1) 1 -(84, 15, 1) 1 -(84, 16, 1) 2 -(84, 17, 1) 3 -(84, 18, 1) 3 -(84, 19, 1) 4 -(84, 20, 1) 5 -(84, 21, 1) 5 -(84, 22, 1) 6 -(84, 23, 1) 6 -(84, 24, 1) 7 -(84, 25, 1) 8 -(84, 26, 1) 8 -(84, 27, 1) 9 -(84, 28, 1) 9 -(84, 29, 1) 10 -(84, 30, 1) 10 -(84, 31, 1) 11 -(84, 32, 1) 11 -(84, 33, 1) 12 -(84, 34, 1) 12 -(84, 35, 1) 13 -(84, 36, 1) 13 -(84, 37, 1) 13 -(84, 38, 1) 14 -(84, 39, 1) 14 -(84, 40, 1) 14 -(84, 41, 1) 15 -(84, 42, 1) 15 -(84, 43, 1) 15 -(84, 44, 1) 15 -(84, 45, 1) 16 -(84, 46, 1) 16 -(84, 47, 1) 16 -(84, 48, 1) 16 -(84, 49, 1) 16 -(84, 50, 1) 16 -(84, 51, 1) 16 -(84, 52, 1) 16 -(84, 53, 1) 16 -(84, 54, 1) 16 -(84, 55, 1) 16 -(84, 56, 1) 16 -(84, 57, 1) 15 -(84, 58, 1) 15 -(84, 59, 1) 15 -(84, 60, 1) 15 -(84, 61, 1) 14 -(84, 62, 1) 14 -(84, 63, 1) 14 -(84, 64, 1) 13 -(84, 65, 1) 13 -(84, 66, 1) 13 -(84, 67, 1) 12 -(84, 68, 1) 12 -(84, 69, 1) 11 -(84, 70, 1) 11 -(84, 71, 1) 10 -(84, 72, 1) 10 -(84, 73, 1) 9 -(84, 74, 1) 9 -(84, 75, 1) 8 -(84, 76, 1) 8 -(84, 77, 1) 7 -(84, 78, 1) 6 -(84, 79, 1) 6 -(84, 80, 1) 5 -(84, 81, 1) 5 -(84, 82, 1) 4 -(84, 83, 1) 3 -(84, 84, 1) 3 -(84, 85, 1) 2 -(84, 86, 1) 1 -(84, 87, 1) 1 -(85, 14, 1) 0 -(85, 15, 1) 1 -(85, 16, 1) 1 -(85, 17, 1) 2 -(85, 18, 1) 2 -(85, 19, 1) 3 -(85, 20, 1) 4 -(85, 21, 1) 4 -(85, 22, 1) 5 -(85, 23, 1) 6 -(85, 24, 1) 6 -(85, 25, 1) 7 -(85, 26, 1) 7 -(85, 27, 1) 8 -(85, 28, 1) 9 -(85, 29, 1) 9 -(85, 30, 1) 10 -(85, 31, 1) 10 -(85, 32, 1) 11 -(85, 33, 1) 11 -(85, 34, 1) 11 -(85, 35, 1) 12 -(85, 36, 1) 12 -(85, 37, 1) 13 -(85, 38, 1) 13 -(85, 39, 1) 13 -(85, 40, 1) 13 -(85, 41, 1) 14 -(85, 42, 1) 14 -(85, 43, 1) 14 -(85, 44, 1) 14 -(85, 45, 1) 15 -(85, 46, 1) 15 -(85, 47, 1) 15 -(85, 48, 1) 15 -(85, 49, 1) 15 -(85, 50, 1) 15 -(85, 51, 1) 15 -(85, 52, 1) 15 -(85, 53, 1) 15 -(85, 54, 1) 15 -(85, 55, 1) 15 -(85, 56, 1) 15 -(85, 57, 1) 14 -(85, 58, 1) 14 -(85, 59, 1) 14 -(85, 60, 1) 14 -(85, 61, 1) 13 -(85, 62, 1) 13 -(85, 63, 1) 13 -(85, 64, 1) 13 -(85, 65, 1) 12 -(85, 66, 1) 12 -(85, 67, 1) 11 -(85, 68, 1) 11 -(85, 69, 1) 11 -(85, 70, 1) 10 -(85, 71, 1) 10 -(85, 72, 1) 9 -(85, 73, 1) 9 -(85, 74, 1) 8 -(85, 75, 1) 7 -(85, 76, 1) 7 -(85, 77, 1) 6 -(85, 78, 1) 6 -(85, 79, 1) 5 -(85, 80, 1) 4 -(85, 81, 1) 4 -(85, 82, 1) 3 -(85, 83, 1) 2 -(85, 84, 1) 2 -(85, 85, 1) 1 -(85, 86, 1) 1 -(85, 87, 1) 0 -(86, 16, 1) 1 -(86, 17, 1) 1 -(86, 18, 1) 2 -(86, 19, 1) 3 -(86, 20, 1) 3 -(86, 21, 1) 4 -(86, 22, 1) 4 -(86, 23, 1) 5 -(86, 24, 1) 6 -(86, 25, 1) 6 -(86, 26, 1) 7 -(86, 27, 1) 7 -(86, 28, 1) 8 -(86, 29, 1) 8 -(86, 30, 1) 9 -(86, 31, 1) 9 -(86, 32, 1) 10 -(86, 33, 1) 10 -(86, 34, 1) 11 -(86, 35, 1) 11 -(86, 36, 1) 11 -(86, 37, 1) 12 -(86, 38, 1) 12 -(86, 39, 1) 12 -(86, 40, 1) 13 -(86, 41, 1) 13 -(86, 42, 1) 13 -(86, 43, 1) 13 -(86, 44, 1) 13 -(86, 45, 1) 14 -(86, 46, 1) 14 -(86, 47, 1) 14 -(86, 48, 1) 14 -(86, 49, 1) 14 -(86, 50, 1) 14 -(86, 51, 1) 14 -(86, 52, 1) 14 -(86, 53, 1) 14 -(86, 54, 1) 14 -(86, 55, 1) 14 -(86, 56, 1) 14 -(86, 57, 1) 13 -(86, 58, 1) 13 -(86, 59, 1) 13 -(86, 60, 1) 13 -(86, 61, 1) 13 -(86, 62, 1) 12 -(86, 63, 1) 12 -(86, 64, 1) 12 -(86, 65, 1) 11 -(86, 66, 1) 11 -(86, 67, 1) 11 -(86, 68, 1) 10 -(86, 69, 1) 10 -(86, 70, 1) 9 -(86, 71, 1) 9 -(86, 72, 1) 8 -(86, 73, 1) 8 -(86, 74, 1) 7 -(86, 75, 1) 7 -(86, 76, 1) 6 -(86, 77, 1) 6 -(86, 78, 1) 5 -(86, 79, 1) 4 -(86, 80, 1) 4 -(86, 81, 1) 3 -(86, 82, 1) 3 -(86, 83, 1) 2 -(86, 84, 1) 1 -(86, 85, 1) 1 -(87, 16, 1) 0 -(87, 17, 1) 1 -(87, 18, 1) 1 -(87, 19, 1) 2 -(87, 20, 1) 2 -(87, 21, 1) 3 -(87, 22, 1) 4 -(87, 23, 1) 4 -(87, 24, 1) 5 -(87, 25, 1) 5 -(87, 26, 1) 6 -(87, 27, 1) 6 -(87, 28, 1) 7 -(87, 29, 1) 7 -(87, 30, 1) 8 -(87, 31, 1) 8 -(87, 32, 1) 9 -(87, 33, 1) 9 -(87, 34, 1) 10 -(87, 35, 1) 10 -(87, 36, 1) 10 -(87, 37, 1) 11 -(87, 38, 1) 11 -(87, 39, 1) 11 -(87, 40, 1) 12 -(87, 41, 1) 12 -(87, 42, 1) 12 -(87, 43, 1) 12 -(87, 44, 1) 12 -(87, 45, 1) 13 -(87, 46, 1) 13 -(87, 47, 1) 13 -(87, 48, 1) 13 -(87, 49, 1) 13 -(87, 50, 1) 13 -(87, 51, 1) 13 -(87, 52, 1) 13 -(87, 53, 1) 13 -(87, 54, 1) 13 -(87, 55, 1) 13 -(87, 56, 1) 13 -(87, 57, 1) 12 -(87, 58, 1) 12 -(87, 59, 1) 12 -(87, 60, 1) 12 -(87, 61, 1) 12 -(87, 62, 1) 11 -(87, 63, 1) 11 -(87, 64, 1) 11 -(87, 65, 1) 10 -(87, 66, 1) 10 -(87, 67, 1) 10 -(87, 68, 1) 9 -(87, 69, 1) 9 -(87, 70, 1) 8 -(87, 71, 1) 8 -(87, 72, 1) 7 -(87, 73, 1) 7 -(87, 74, 1) 6 -(87, 75, 1) 6 -(87, 76, 1) 5 -(87, 77, 1) 5 -(87, 78, 1) 4 -(87, 79, 1) 4 -(87, 80, 1) 3 -(87, 81, 1) 2 -(87, 82, 1) 2 -(87, 83, 1) 1 -(87, 84, 1) 1 -(87, 85, 1) 0 -(88, 21, 1) 2 -(88, 22, 1) 3 -(88, 23, 1) 3 -(88, 24, 1) 4 -(88, 25, 1) 5 -(88, 26, 1) 5 -(88, 27, 1) 6 -(88, 28, 1) 6 -(88, 29, 1) 7 -(88, 30, 1) 7 -(88, 31, 1) 7 -(88, 32, 1) 8 -(88, 33, 1) 8 -(88, 34, 1) 9 -(88, 35, 1) 9 -(88, 36, 1) 9 -(88, 37, 1) 10 -(88, 38, 1) 10 -(88, 39, 1) 10 -(88, 40, 1) 11 -(88, 41, 1) 11 -(88, 42, 1) 11 -(88, 43, 1) 11 -(88, 44, 1) 11 -(88, 45, 1) 12 -(88, 46, 1) 12 -(88, 47, 1) 12 -(88, 48, 1) 12 -(88, 49, 1) 12 -(88, 50, 1) 12 -(88, 51, 1) 12 -(88, 52, 1) 12 -(88, 53, 1) 12 -(88, 54, 1) 12 -(88, 55, 1) 12 -(88, 56, 1) 12 -(88, 57, 1) 11 -(88, 58, 1) 11 -(88, 59, 1) 11 -(88, 60, 1) 11 -(88, 61, 1) 11 -(88, 62, 1) 10 -(88, 63, 1) 10 -(88, 64, 1) 10 -(88, 65, 1) 9 -(88, 66, 1) 9 -(88, 67, 1) 9 -(88, 68, 1) 8 -(88, 69, 1) 8 -(88, 70, 1) 7 -(88, 71, 1) 7 -(88, 72, 1) 7 -(88, 73, 1) 6 -(88, 74, 1) 6 -(88, 75, 1) 5 -(88, 76, 1) 5 -(88, 77, 1) 4 -(88, 78, 1) 3 -(88, 79, 1) 3 -(88, 80, 1) 2 -(89, 21, 1) 1 -(89, 22, 1) 2 -(89, 23, 1) 3 -(89, 24, 1) 3 -(89, 25, 1) 4 -(89, 26, 1) 4 -(89, 27, 1) 5 -(89, 28, 1) 5 -(89, 29, 1) 6 -(89, 30, 1) 6 -(89, 31, 1) 7 -(89, 32, 1) 7 -(89, 33, 1) 7 -(89, 34, 1) 8 -(89, 35, 1) 8 -(89, 36, 1) 8 -(89, 37, 1) 9 -(89, 38, 1) 9 -(89, 39, 1) 9 -(89, 40, 1) 10 -(89, 41, 1) 10 -(89, 42, 1) 10 -(89, 43, 1) 10 -(89, 44, 1) 10 -(89, 45, 1) 11 -(89, 46, 1) 11 -(89, 47, 1) 11 -(89, 48, 1) 11 -(89, 49, 1) 11 -(89, 50, 1) 11 -(89, 51, 1) 11 -(89, 52, 1) 11 -(89, 53, 1) 11 -(89, 54, 1) 11 -(89, 55, 1) 11 -(89, 56, 1) 11 -(89, 57, 1) 10 -(89, 58, 1) 10 -(89, 59, 1) 10 -(89, 60, 1) 10 -(89, 61, 1) 10 -(89, 62, 1) 9 -(89, 63, 1) 9 -(89, 64, 1) 9 -(89, 65, 1) 8 -(89, 66, 1) 8 -(89, 67, 1) 8 -(89, 68, 1) 7 -(89, 69, 1) 7 -(89, 70, 1) 7 -(89, 71, 1) 6 -(89, 72, 1) 6 -(89, 73, 1) 5 -(89, 74, 1) 5 -(89, 75, 1) 4 -(89, 76, 1) 4 -(89, 77, 1) 3 -(89, 78, 1) 3 -(89, 79, 1) 2 -(89, 80, 1) 1 -(90, 21, 1) 1 -(90, 22, 1) 1 -(90, 23, 1) 2 -(90, 24, 1) 2 -(90, 25, 1) 3 -(90, 26, 1) 3 -(90, 27, 1) 4 -(90, 28, 1) 4 -(90, 29, 1) 5 -(90, 30, 1) 5 -(90, 31, 1) 6 -(90, 32, 1) 6 -(90, 33, 1) 6 -(90, 34, 1) 7 -(90, 35, 1) 7 -(90, 36, 1) 8 -(90, 37, 1) 8 -(90, 38, 1) 8 -(90, 39, 1) 8 -(90, 40, 1) 9 -(90, 41, 1) 9 -(90, 42, 1) 9 -(90, 43, 1) 9 -(90, 44, 1) 9 -(90, 45, 1) 10 -(90, 46, 1) 10 -(90, 47, 1) 10 -(90, 48, 1) 10 -(90, 49, 1) 10 -(90, 50, 1) 10 -(90, 51, 1) 10 -(90, 52, 1) 10 -(90, 53, 1) 10 -(90, 54, 1) 10 -(90, 55, 1) 10 -(90, 56, 1) 10 -(90, 57, 1) 9 -(90, 58, 1) 9 -(90, 59, 1) 9 -(90, 60, 1) 9 -(90, 61, 1) 9 -(90, 62, 1) 8 -(90, 63, 1) 8 -(90, 64, 1) 8 -(90, 65, 1) 8 -(90, 66, 1) 7 -(90, 67, 1) 7 -(90, 68, 1) 6 -(90, 69, 1) 6 -(90, 70, 1) 6 -(90, 71, 1) 5 -(90, 72, 1) 5 -(90, 73, 1) 4 -(90, 74, 1) 4 -(90, 75, 1) 3 -(90, 76, 1) 3 -(90, 77, 1) 2 -(90, 78, 1) 2 -(90, 79, 1) 1 -(90, 80, 1) 1 -(91, 21, 1) 0 -(91, 22, 1) 1 -(91, 23, 1) 1 -(91, 24, 1) 2 -(91, 25, 1) 2 -(91, 26, 1) 3 -(91, 27, 1) 3 -(91, 28, 1) 4 -(91, 29, 1) 4 -(91, 30, 1) 4 -(91, 31, 1) 5 -(91, 32, 1) 5 -(91, 33, 1) 6 -(91, 34, 1) 6 -(91, 35, 1) 6 -(91, 36, 1) 7 -(91, 37, 1) 7 -(91, 38, 1) 7 -(91, 39, 1) 8 -(91, 40, 1) 8 -(91, 41, 1) 8 -(91, 42, 1) 8 -(91, 43, 1) 8 -(91, 44, 1) 9 -(91, 45, 1) 9 -(91, 46, 1) 9 -(91, 47, 1) 9 -(91, 48, 1) 9 -(91, 49, 1) 9 -(91, 50, 1) 9 -(91, 51, 1) 9 -(91, 52, 1) 9 -(91, 53, 1) 9 -(91, 54, 1) 9 -(91, 55, 1) 9 -(91, 56, 1) 9 -(91, 57, 1) 9 -(91, 58, 1) 8 -(91, 59, 1) 8 -(91, 60, 1) 8 -(91, 61, 1) 8 -(91, 62, 1) 8 -(91, 63, 1) 7 -(91, 64, 1) 7 -(91, 65, 1) 7 -(91, 66, 1) 6 -(91, 67, 1) 6 -(91, 68, 1) 6 -(91, 69, 1) 5 -(91, 70, 1) 5 -(91, 71, 1) 4 -(91, 72, 1) 4 -(91, 73, 1) 4 -(91, 74, 1) 3 -(91, 75, 1) 3 -(91, 76, 1) 2 -(91, 77, 1) 2 -(91, 78, 1) 1 -(91, 79, 1) 1 -(91, 80, 1) 0 -(92, 21, 1) 0 -(92, 22, 1) 0 -(92, 23, 1) 0 -(92, 24, 1) 1 -(92, 25, 1) 1 -(92, 26, 1) 2 -(92, 27, 1) 2 -(92, 28, 1) 3 -(92, 29, 1) 3 -(92, 30, 1) 4 -(92, 31, 1) 4 -(92, 32, 1) 4 -(92, 33, 1) 5 -(92, 34, 1) 5 -(92, 35, 1) 5 -(92, 36, 1) 6 -(92, 37, 1) 6 -(92, 38, 1) 6 -(92, 39, 1) 7 -(92, 40, 1) 7 -(92, 41, 1) 7 -(92, 42, 1) 7 -(92, 43, 1) 7 -(92, 44, 1) 8 -(92, 45, 1) 8 -(92, 46, 1) 8 -(92, 47, 1) 8 -(92, 48, 1) 8 -(92, 49, 1) 8 -(92, 50, 1) 8 -(92, 51, 1) 8 -(92, 52, 1) 8 -(92, 53, 1) 8 -(92, 54, 1) 8 -(92, 55, 1) 8 -(92, 56, 1) 8 -(92, 57, 1) 8 -(92, 58, 1) 7 -(92, 59, 1) 7 -(92, 60, 1) 7 -(92, 61, 1) 7 -(92, 62, 1) 7 -(92, 63, 1) 6 -(92, 64, 1) 6 -(92, 65, 1) 6 -(92, 66, 1) 5 -(92, 67, 1) 5 -(92, 68, 1) 5 -(92, 69, 1) 4 -(92, 70, 1) 4 -(92, 71, 1) 4 -(92, 72, 1) 3 -(92, 73, 1) 3 -(92, 74, 1) 2 -(92, 75, 1) 2 -(92, 76, 1) 1 -(92, 77, 1) 1 -(92, 78, 1) 0 -(92, 79, 1) 0 -(92, 80, 1) 0 -(93, 26, 1) 1 -(93, 27, 1) 1 -(93, 28, 1) 2 -(93, 29, 1) 2 -(93, 30, 1) 3 -(93, 31, 1) 3 -(93, 32, 1) 3 -(93, 33, 1) 4 -(93, 34, 1) 4 -(93, 35, 1) 4 -(93, 36, 1) 5 -(93, 37, 1) 5 -(93, 38, 1) 5 -(93, 39, 1) 6 -(93, 40, 1) 6 -(93, 41, 1) 6 -(93, 42, 1) 6 -(93, 43, 1) 6 -(93, 44, 1) 7 -(93, 45, 1) 7 -(93, 46, 1) 7 -(93, 47, 1) 7 -(93, 48, 1) 7 -(93, 49, 1) 7 -(93, 50, 1) 7 -(93, 51, 1) 7 -(93, 52, 1) 7 -(93, 53, 1) 7 -(93, 54, 1) 7 -(93, 55, 1) 7 -(93, 56, 1) 7 -(93, 57, 1) 7 -(93, 58, 1) 6 -(93, 59, 1) 6 -(93, 60, 1) 6 -(93, 61, 1) 6 -(93, 62, 1) 6 -(93, 63, 1) 5 -(93, 64, 1) 5 -(93, 65, 1) 5 -(93, 66, 1) 4 -(93, 67, 1) 4 -(93, 68, 1) 4 -(93, 69, 1) 3 -(93, 70, 1) 3 -(93, 71, 1) 3 -(93, 72, 1) 2 -(93, 73, 1) 2 -(93, 74, 1) 1 -(93, 75, 1) 1 -(94, 26, 1) 0 -(94, 27, 1) 0 -(94, 28, 1) 1 -(94, 29, 1) 1 -(94, 30, 1) 2 -(94, 31, 1) 2 -(94, 32, 1) 2 -(94, 33, 1) 3 -(94, 34, 1) 3 -(94, 35, 1) 3 -(94, 36, 1) 4 -(94, 37, 1) 4 -(94, 38, 1) 4 -(94, 39, 1) 5 -(94, 40, 1) 5 -(94, 41, 1) 5 -(94, 42, 1) 5 -(94, 43, 1) 5 -(94, 44, 1) 6 -(94, 45, 1) 6 -(94, 46, 1) 6 -(94, 47, 1) 6 -(94, 48, 1) 6 -(94, 49, 1) 6 -(94, 50, 1) 6 -(94, 51, 1) 6 -(94, 52, 1) 6 -(94, 53, 1) 6 -(94, 54, 1) 6 -(94, 55, 1) 6 -(94, 56, 1) 6 -(94, 57, 1) 6 -(94, 58, 1) 5 -(94, 59, 1) 5 -(94, 60, 1) 5 -(94, 61, 1) 5 -(94, 62, 1) 5 -(94, 63, 1) 4 -(94, 64, 1) 4 -(94, 65, 1) 4 -(94, 66, 1) 3 -(94, 67, 1) 3 -(94, 68, 1) 3 -(94, 69, 1) 2 -(94, 70, 1) 2 -(94, 71, 1) 2 -(94, 72, 1) 1 -(94, 73, 1) 1 -(94, 74, 1) 0 -(94, 75, 1) 0 -(95, 26, 1) 0 -(95, 27, 1) 0 -(95, 28, 1) 0 -(95, 29, 1) 0 -(95, 30, 1) 1 -(95, 31, 1) 1 -(95, 32, 1) 1 -(95, 33, 1) 2 -(95, 34, 1) 2 -(95, 35, 1) 3 -(95, 36, 1) 3 -(95, 37, 1) 3 -(95, 38, 1) 3 -(95, 39, 1) 4 -(95, 40, 1) 4 -(95, 41, 1) 4 -(95, 42, 1) 4 -(95, 43, 1) 4 -(95, 44, 1) 5 -(95, 45, 1) 5 -(95, 46, 1) 5 -(95, 47, 1) 5 -(95, 48, 1) 5 -(95, 49, 1) 5 -(95, 50, 1) 5 -(95, 51, 1) 5 -(95, 52, 1) 5 -(95, 53, 1) 5 -(95, 54, 1) 5 -(95, 55, 1) 5 -(95, 56, 1) 5 -(95, 57, 1) 5 -(95, 58, 1) 4 -(95, 59, 1) 4 -(95, 60, 1) 4 -(95, 61, 1) 4 -(95, 62, 1) 4 -(95, 63, 1) 3 -(95, 64, 1) 3 -(95, 65, 1) 3 -(95, 66, 1) 3 -(95, 67, 1) 2 -(95, 68, 1) 2 -(95, 69, 1) 1 -(95, 70, 1) 1 -(95, 71, 1) 1 -(95, 72, 1) 0 -(95, 73, 1) 0 -(95, 74, 1) 0 -(95, 75, 1) 0 -(96, 36, 1) 2 -(96, 37, 1) 2 -(96, 38, 1) 2 -(96, 39, 1) 3 -(96, 40, 1) 3 -(96, 41, 1) 3 -(96, 42, 1) 3 -(96, 43, 1) 3 -(96, 44, 1) 4 -(96, 45, 1) 4 -(96, 46, 1) 4 -(96, 47, 1) 4 -(96, 48, 1) 4 -(96, 49, 1) 4 -(96, 50, 1) 4 -(96, 51, 1) 4 -(96, 52, 1) 4 -(96, 53, 1) 4 -(96, 54, 1) 4 -(96, 55, 1) 4 -(96, 56, 1) 4 -(96, 57, 1) 4 -(96, 58, 1) 3 -(96, 59, 1) 3 -(96, 60, 1) 3 -(96, 61, 1) 3 -(96, 62, 1) 3 -(96, 63, 1) 2 -(96, 64, 1) 2 -(96, 65, 1) 2 -(97, 36, 1) 1 -(97, 37, 1) 1 -(97, 38, 1) 2 -(97, 39, 1) 2 -(97, 40, 1) 2 -(97, 41, 1) 2 -(97, 42, 1) 2 -(97, 43, 1) 2 -(97, 44, 1) 3 -(97, 45, 1) 3 -(97, 46, 1) 3 -(97, 47, 1) 3 -(97, 48, 1) 3 -(97, 49, 1) 3 -(97, 50, 1) 3 -(97, 51, 1) 3 -(97, 52, 1) 3 -(97, 53, 1) 3 -(97, 54, 1) 3 -(97, 55, 1) 3 -(97, 56, 1) 3 -(97, 57, 1) 3 -(97, 58, 1) 2 -(97, 59, 1) 2 -(97, 60, 1) 2 -(97, 61, 1) 2 -(97, 62, 1) 2 -(97, 63, 1) 2 -(97, 64, 1) 1 -(97, 65, 1) 1 -(98, 41, 1) 1 -(98, 42, 1) 1 -(98, 43, 1) 1 -(98, 44, 1) 2 -(98, 45, 1) 2 -(98, 46, 1) 2 -(98, 47, 1) 2 -(98, 48, 1) 2 -(98, 49, 1) 2 -(98, 50, 1) 2 -(98, 51, 1) 2 -(98, 52, 1) 2 -(98, 53, 1) 2 -(98, 54, 1) 2 -(98, 55, 1) 2 -(98, 56, 1) 2 -(98, 57, 1) 2 -(98, 58, 1) 1 -(98, 59, 1) 1 -(98, 60, 1) 1 -(99, 41, 1) 0 -(99, 42, 1) 0 -(99, 43, 1) 0 -(99, 44, 1) 1 -(99, 45, 1) 1 -(99, 46, 1) 1 -(99, 47, 1) 1 -(99, 48, 1) 1 -(99, 49, 1) 1 -(99, 50, 1) 1 -(99, 51, 1) 1 -(99, 52, 1) 1 -(99, 53, 1) 1 -(99, 54, 1) 1 -(99, 55, 1) 1 -(99, 56, 1) 1 -(99, 57, 1) 1 -(99, 58, 1) 0 -(99, 59, 1) 0 -(99, 60, 1) 0 -(100, 41, 1) 0 -(100, 42, 1) 0 -(100, 43, 1) 0 -(100, 44, 1) 0 -(100, 45, 1) 0 -(100, 46, 1) 0 -(100, 47, 1) 0 -(100, 48, 1) 0 -(100, 49, 1) 0 -(100, 50, 1) 0 -(100, 51, 1) 0 -(100, 52, 1) 0 -(100, 53, 1) 0 -(100, 54, 1) 0 -(100, 55, 1) 0 -(100, 56, 1) 0 -(100, 57, 1) 0 -(100, 58, 1) 0 -(100, 59, 1) 0 -(100, 60, 1) 0 diff --git a/EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h b/EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h deleted file mode 100755 index 7862ce130d4..00000000000 --- a/EOverPCalibration/FastCalibrator/CommonTools/histoFunc.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef histoFunc_h -#define histoFunc_h - -#include "TH1.h" - - - - - - -class histoFunc -{ - public: - - - //! ctor - histoFunc(TH1F* histo) - { - histo_p = histo; - }; - - - //! dtor - ~histoFunc() - {}; - - //norm histo - double GetIntegral(){ - double nn = histo_p -> Integral(); - return(nn); - } - - //! operator() - double operator()(double* x, double* par) - { - double xx = par[1] * (x[0] - par[2]); - - double xMin = histo_p -> GetBinCenter(1); - double xMax = histo_p -> GetBinCenter(histo_p -> GetNbinsX()); - - - - if( (xx < xMin) || (xx >= xMax) ) - return 1.e-10; - - else - { - int bin = histo_p -> FindBin(xx); - int bin1 = 0; - int bin2 = 0; - - if(xx >= histo_p -> GetBinCenter(bin)) - { - bin1 = bin; - bin2 = bin+1; - } - - else - { - bin1 = bin-1; - bin2 = bin; - } - - - double x1 = histo_p -> GetBinCenter(bin1); - double y1 = histo_p -> GetBinContent(bin1); - - double x2 = histo_p -> GetBinCenter(bin2); - double y2 = histo_p -> GetBinContent(bin2); - - double m = 1. * (y2 - y1) / (x2 - x1); - - - - if( (y1 + m * (xx - x1)) < 1.e-10) - return 1.e-10; - - - return par[0] * par[1] * (y1 + m * (xx - x1)); - } - - return 1.e-10; - } - - - - private: - - TH1F* histo_p; -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/README b/EOverPCalibration/FastCalibrator/README deleted file mode 100644 index 5d2d7261371..00000000000 --- a/EOverPCalibration/FastCalibrator/README +++ /dev/null @@ -1,160 +0,0 @@ -------------------------------------- -------- Intercalibration Tool ------- -------------------------------------- - -Compile the package : scramv1 b -j16 - -List of codes for intercalibration: - -1) Intercalibration on EB (Ecal Barrel) : - -Run the code: FastCalibratorEB cfg/FastCalibrator_EB_split_cfg.py - -Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu - -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC - -> inputTree = tree name - -> isMiscalib = Miscalibration 5% option - -> isSaveEPDistribution = save E/p pdf - -> isEPselection = apply E/p selection setted in the .cc - -> isR9selection = apply R9 selection > 0.9 - -> isMCTruth = use calibration E/E_{Truth} - -> outputFile = output file - -> numberOfEvents = -1 (all statistic) - -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) - -> useW = 1 (use W event) 0 (no W event in IC procedure) - -> splitStat = 1 (split odd and even event) 0 (no split) - -> nLoops = number of L3 iteration - -2) Intercalibration on EE (Ecal EndCaps) : - -Run the code: FastCalibratorEE cfg/FastCalibrator_EE_split_cfg.py - -Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu - -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC - -> inputTree = tree name - -> isMiscalib = Miscalibration 5% option - -> isSaveEPDistribution = save E/p pdf - -> isEPselection = apply E/p selection setted in the .cc - -> isR9selection = apply R9 selection > 0.9 - -> isfbrem = apply fbrem selection < 0.4 - -> isMCTruth = use calibration E/E_{Truth} - -> outputFile = output file - -> numberOfEvents = -1 (all statistic) - -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) - -> useW = 1 (use W event) 0 (no W event in IC procedure) - -> splitStat = 1 (split odd and even event) 0 (no split) - -> nLoops = number of L3 iteration - - -1b-2b) CalibrationPlots.cpp --> draw results of calibration (run it after FastCalibratorEB (EE)) - -Run the code: CalibrationPlots cfg/calibrationPlots_EB_cfg.py - - - -3) CompareSCalibMCTruth_EB.cpp --> Comaparison beetween scalib MC with the truth in EB - -Run the code: CompareSCalibMCTruth_EB.exe cfg/comparisonEB_cfg.py - -Paramters to set in the cfg file: -> inputFile = Root file input MC scalib to analyse - -> fileMCTruth = MC truth IC map for EB - -> fileMCRecoIC = MC Reco IC map for EB - -> fileStatPrecision = stat precision on non scalib MC in EB - - - -4) CompareSCalibMCTruth_EE.cpp --> Comaparison beetween scalib MC with the truth in EE - -Run the code: CompareSCalibMCTruth_EE cfg/comparisonEE_cfg.py - -Paramters to set in the cfg file: -> inputFile = Root file input MC scalib to analyse - -> fileMCTruth = MC truth IC map for EE - -> fileMCRecoIC = MC Reco IC map for EE - -> fileStatPrecision = stat precision on non scalib MC in EE - -> outputFile = output file for residual systematic - - - -5) CompareICSet.cpp --> compare two set of ICs taken by repository - -Run the code: CompareICSet.exe file1_IC_Set.txt file2_IC_Set.txt - - - -6) CalibrationMomentum.cpp --> study momentum scale vs phi in EB and EE - -Run the code: CalibrationMomentum cfg/calibrationMomentum_cfg.py - -Paramters to set in the cfg file: -> TreeName = name of the tree contained in each root file input - -> infileDATA = txt file with the list of .root data files - -> infileMC = txt file with the list of .root MC files - -> WeightforMC = .root file for weight MC events - -> nPhiBinsEB = number of phi bin in EB -> for data and MC dist - -> nPhiBinsEE = number of phi bin in EE -> for data and MC dist - -> nEtaBinsEB = number of eta bin in EB -> for template, data and MC dist - -> nEtaBinsEB = number of eta bin in EE -> for template, data and MC dist - -> nPhiBinsTempEB = number of phi bin in EB -> for template - -> nPhiBinsTempEE = number of phi bin in EB -> for template - -> rebinEB = rebin Template, MC and Data in EB - -> rebinEE = rebin Template, MC and Data in EE - -> outputFile = path of .root output file - - - -7) test/NormalizeIC_EE.cpp --> make normalization eta ring EE+ and EE- - -Run the code: ./bin/NormalizeIC_EE.exe cfg/NormalizeEE_cfg.cfg - -Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat - -> Inputfile2 = L3 calib output on half stat (even or odd) - -> Inputfile3 = L3 calib output on half stat (even or odd) - -> evalStat = 0 -> normalize only file1 1 -> normalize all files 1,2 and 3 - -> isMC = true -> calib mC false -> calib data - -> fileType = for plot image production - -> dirName = dir for output plots - -> printPlots = true -> print false -> no print - -Normalized map are insert in the input root file with the name h_scale_map_EEP h_scale_map_EEM - - - -##################### OBSOLETE ########## - -8) test/CalibrationBarrel.cpp --> make precision plot + normalization + momentum and crack correction in EB - make .txt IC output file - -Run the code: ./bin/CalibrationBarrel.exe cfg/calibrationEB_cfg.cfg - -Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat - -> Inputfile2 = L3 calib output on half stat (even or odd) - -> Inputfile3 = L3 calib output on half stat (even or odd) - -> inputMomentumScale = momentum scale correction - -> evalStat = 0 -> no statistical precision 1 -> stat prec - -> isMC = true -> calib mC false -> calib data - -> fileType = for plot image production - -> dirName = dir for output plots - -> printPlots = true -> print false -> no print - -> outputTxt = output IC txt file - - - - -8) test/CalibrationEndcap.cpp --> make precision plot + momentum correction + sys add in EE - make .txt IC output file - -Run the code: ./bin/CalibrationEndcap.exe cfg/calibrationEE_cfg.cfg - -Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat - -> Inputfile2 = L3 calib output on half stat (even or odd) - -> Inputfile3 = L3 calib output on half stat (even or odd) - -> inputMomentumScale = momentum scale correction - -> SystematicToAdd = file from scalib MC of the residual sys to Add - -> evalStat = 0 -> no statistical precision 1 -> stat prec - -> isMC = true -> calib mC false -> calib data - -> fileType = for plot image production - -> dirName = dir for output plots - -> printPlots = true -> print false -> no print - -> outputTxt = output IC txt file - - - \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/RMSFile.txt b/EOverPCalibration/FastCalibrator/RMSFile.txt deleted file mode 100644 index 796de9b3a31..00000000000 --- a/EOverPCalibration/FastCalibrator/RMSFile.txt +++ /dev/null @@ -1,85 +0,0 @@ -1 0.00480365 -2 0.0040155 -3 0.00393103 -4 0.00397678 -5 0.00408274 -6 0.00445059 -7 0.00480351 -8 0.00478856 -9 0.00451166 -10 0.00488884 -11 0.00473805 -12 0.00433899 -13 0.0044261 -14 0.00463762 -15 0.00457602 -16 0.00489055 -17 0.00492733 -18 0.00460034 -19 0.00504573 -20 0.00496545 -21 0.00487833 -22 0.00503167 -23 0.00481444 -24 0.00478102 -25 0.00496812 -26 0.0049009 -27 0.00486267 -28 0.00470549 -29 0.00485762 -30 0.00467856 -31 0.00480772 -32 0.00507802 -33 0.00490454 -34 0.00513913 -35 0.00497808 -36 0.00517048 -37 0.00516998 -38 0.0051385 -39 0.00557952 -40 0.00587326 -41 0.00564539 -42 0.00536694 -43 0.00533608 -44 0.00588372 -45 0.00548201 -46 0.00552564 -47 0.00540657 -48 0.00507765 -49 0.00525103 -50 0.00539545 -51 0.00540359 -52 0.00590778 -53 0.00559148 -54 0.00589544 -55 0.00576401 -56 0.00568239 -57 0.00611321 -58 0.00603015 -59 0.00604824 -60 0.00587608 -61 0.0061889 -62 0.00635032 -63 0.00694852 -64 0.00695395 -65 0.00726495 -66 0.00801555 -67 0.00748724 -68 0.00731111 -69 0.00857006 -70 0.00757396 -71 0.00837833 -72 0.00816152 -73 0.00897918 -74 0.00934053 -75 0.0084456 -76 0.00907767 -77 0.00970266 -78 0.00998469 -79 0.0106416 -80 0.0116338 -81 0.0112471 -82 0.0112015 -83 0.011917 -84 0.0124452 -85 0.0189653 diff --git a/EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp b/EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp deleted file mode 100755 index 64383ab9a79..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/AddRegressionWeight.cpp +++ /dev/null @@ -1,637 +0,0 @@ -#include -#include -#include -#include - -#include "TChain.h" -#include "TFile.h" -#include "TTree.h" -#include "TString.h" -#include "TObjString.h" -#include "TSystem.h" -#include "TROOT.h" -#include "TApplication.h" - -#include "../../NtuplePackage/interface/ntpleUtils.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - -//#if not defined(__CINT__) || defined(__MAKECINT__) -#include "TMVA/Tools.h" -#include "TMVA/Factory.h" -#include "TMVA/Reader.h" -//#endif - -#include "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.00/x86_64-slc5-gcc46-opt/root/tmva/test/TMVARegGui.C" - - -int main(int argc, char**argv){ - - if(argc != 2){ - std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("AddRegressionWeight"); - parameterSet.reset(); - - std::string treeNameDATA = Options.getParameter("treeNameDATA"); - std::string UseMethodFlag = Options.getParameter("UseMethodFlag"); - - std::string FilemethodXML_EB_E = Options.getParameter("FilemethodXML_EB_E"); - std::string FilemethodXML_EB_P = Options.getParameter("FilemethodXML_EB_P"); - - std::string FilemethodXML_EE_E = Options.getParameter("FilemethodXML_EE_E"); - std::string FilemethodXML_EE_P = Options.getParameter("FilemethodXML_EE_P"); - - std::string RegionOfTraining = Options.getParameter("RegionOfTraining"); - std::string inputFile = Options.getParameter("inputFile"); - - bool useW = Options.getParameter("useW"); - bool isMC = Options.getParameter("isMC"); - - - TFile *File = new TFile(inputFile.c_str(),"UPDATE"); - - TTree* treeDATA = (TTree*) File->Get(treeNameDATA.c_str()); - - - float input_variables_1[1000]; - float input_variables_2[1000]; - - - double MVA_ValueZ_1,MVA_ValueZ_2, MVA_ValueW_1,MVA_ValueW_2; - - float targetW_1,targetZ_1,targetW_2,targetZ_2; - - TBranch *weightBranchW_1 = new TBranch(); - TBranch *weightBranchW_2 = new TBranch(); - TBranch *weightBranchZ_1 = new TBranch(); - TBranch *weightBranchZ_2 = new TBranch(); - TBranch *btargetW_1 = new TBranch(); - TBranch *btargetZ_1 = new TBranch(); - TBranch *btargetW_2 = new TBranch(); - TBranch *btargetZ_2 = new TBranch(); - - - - if(RegionOfTraining=="EB"){ - - - TMVA::Reader *TMVAreader_1 = new TMVA::Reader( "!Color:!Silent" ); - TMVA::Reader *TMVAreader_2 = new TMVA::Reader( "!Color:!Silent" ); - - int ele1_isEB,isW; - float ele1_eRegrInput_nPV,ele1_eRegrInput_r9,ele1_fbrem,ele1_eta,ele1_DphiIn,ele1_DetaIn,ele1_sigmaIetaIeta, ele1_E_true, ele1_scE, ele1_tkP,ele1_eRegrInput_etaW,ele1_eRegrInput_phiW,ele1_scERaw; - - - TMVAreader_1->AddVariable("ele1_scE/ele1_scERaw",&input_variables_1[0]); - TMVAreader_1->AddVariable("ele1_eRegrInput_nPV",&input_variables_1[1]); - TMVAreader_1->AddVariable("ele1_eRegrInput_r9",&input_variables_1[2]); - TMVAreader_1->AddVariable("ele1_fbrem",&input_variables_1[3]); - TMVAreader_1->AddVariable("ele1_eta",&input_variables_1[4]); - TMVAreader_1->AddVariable("ele1_DphiIn",&input_variables_1[5]); - TMVAreader_1->AddVariable("ele1_DetaIn",&input_variables_1[6]); - TMVAreader_1->AddVariable("ele1_sigmaIetaIeta", &input_variables_1[7]); - TMVAreader_1->AddVariable("ele1_eRegrInput_etaW",&input_variables_1[8]); - TMVAreader_1->AddVariable("ele1_eRegrInput_phiW", &input_variables_1[9]); - - TMVAreader_2->AddVariable("ele1_scE/ele1_scERaw",&input_variables_2[0]); - TMVAreader_2->AddVariable("ele1_eRegrInput_nPV",&input_variables_2[1]); - TMVAreader_2->AddVariable("ele1_eRegrInput_r9",&input_variables_2[2]); - TMVAreader_2->AddVariable("ele1_fbrem",&input_variables_2[3]); - TMVAreader_2->AddVariable("ele1_eta",&input_variables_2[4]); - TMVAreader_2->AddVariable("ele1_DphiIn",&input_variables_2[5]); - TMVAreader_2->AddVariable("ele1_DetaIn",&input_variables_2[6]); - TMVAreader_2->AddVariable("ele1_sigmaIetaIeta", &input_variables_2[7]); - TMVAreader_2->AddVariable("ele1_eRegrInput_etaW",&input_variables_2[8]); - TMVAreader_2->AddVariable("ele1_eRegrInput_phiW", &input_variables_2[9]); - - - treeDATA -> SetBranchAddress("ele1_isEB", &ele1_isEB); - treeDATA -> SetBranchAddress("isW", &isW); - treeDATA -> SetBranchAddress("ele1_scE", &ele1_scE); - treeDATA -> SetBranchAddress("ele1_scERaw", &ele1_scERaw); - treeDATA -> SetBranchAddress("ele1_tkP", &ele1_tkP); - treeDATA -> SetBranchAddress("ele1_eRegrInput_nPV", &ele1_eRegrInput_nPV); - treeDATA -> SetBranchAddress("ele1_eRegrInput_r9", &ele1_eRegrInput_r9); - treeDATA -> SetBranchAddress("ele1_fbrem", &ele1_fbrem); - treeDATA -> SetBranchAddress("ele1_eta", &ele1_eta); - treeDATA -> SetBranchAddress("ele1_DphiIn", &ele1_DphiIn); - treeDATA -> SetBranchAddress("ele1_DetaIn", &ele1_DetaIn); - treeDATA -> SetBranchAddress("ele1_sigmaIetaIeta", &ele1_sigmaIetaIeta); - treeDATA -> SetBranchAddress("ele1_eRegrInput_etaW", &ele1_eRegrInput_etaW); - treeDATA -> SetBranchAddress("ele1_eRegrInput_phiW", &ele1_eRegrInput_phiW); - - if(isMC == true) treeDATA -> SetBranchAddress("ele1_E_true", &ele1_E_true); - - - float ele1_eRegrInput_bCE_Over_sCE,ele1_eRegrInput_sigietaieta_bC1,ele1_eRegrInput_sigiphiiphi_bC1,ele1_eRegrInput_sigietaiphi_bC1,ele1_eRegrInput_e3x3_Over_bCE,ele1_eRegrInput_Deta_bC_sC,ele1_eRegrInput_Dphi_bC_sC,ele1_eRegrInput_bEMax_Over_bCE; - - - TMVAreader_1->AddVariable("ele1_eRegrInput_bCE_Over_sCE",&input_variables_1[10]); - TMVAreader_1->AddVariable("ele1_eRegrInput_sigietaieta_bC1",&input_variables_1[11]); - TMVAreader_1->AddVariable("ele1_eRegrInput_sigiphiiphi_bC1",&input_variables_1[12]); - TMVAreader_1->AddVariable("ele1_eRegrInput_sigietaiphi_bC1",&input_variables_1[13]); - TMVAreader_1->AddVariable("ele1_eRegrInput_e3x3_Over_bCE", &input_variables_1[14]); - TMVAreader_1->AddVariable("ele1_eRegrInput_Deta_bC_sC", &input_variables_1[15]); - TMVAreader_1->AddVariable("ele1_eRegrInput_Dphi_bC_sC", &input_variables_1[16]); - TMVAreader_1->AddVariable("ele1_eRegrInput_bEMax_Over_bCE", &input_variables_1[17]); - - TMVAreader_2->AddVariable("ele1_eRegrInput_bCE_Over_sCE",&input_variables_2[10]); - TMVAreader_2->AddVariable("ele1_eRegrInput_sigietaieta_bC1",&input_variables_2[11]); - TMVAreader_2->AddVariable("ele1_eRegrInput_sigiphiiphi_bC1",&input_variables_2[12]); - TMVAreader_2->AddVariable("ele1_eRegrInput_sigietaiphi_bC1",&input_variables_2[13]); - TMVAreader_2->AddVariable("ele1_eRegrInput_e3x3_Over_bCE", &input_variables_2[14]); - TMVAreader_2->AddVariable("ele1_eRegrInput_Deta_bC_sC", &input_variables_2[15]); - TMVAreader_2->AddVariable("ele1_eRegrInput_Dphi_bC_sC", &input_variables_2[16]); - TMVAreader_2->AddVariable("ele1_eRegrInput_bEMax_Over_bCE", &input_variables_2[17]); - - - treeDATA -> SetBranchAddress("ele1_eRegrInput_bCE_Over_sCE", &ele1_eRegrInput_bCE_Over_sCE); - treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaieta_bC1", &ele1_eRegrInput_sigietaieta_bC1); - treeDATA -> SetBranchAddress("ele1_eRegrInput_sigiphiiphi_bC1", &ele1_eRegrInput_sigiphiiphi_bC1); - treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaiphi_bC1", &ele1_eRegrInput_sigietaiphi_bC1); - treeDATA -> SetBranchAddress("ele1_eRegrInput_e3x3_Over_bCE", &ele1_eRegrInput_e3x3_Over_bCE); - treeDATA -> SetBranchAddress("ele1_eRegrInput_Deta_bC_sC", &ele1_eRegrInput_Deta_bC_sC); - treeDATA -> SetBranchAddress("ele1_eRegrInput_Dphi_bC_sC", &ele1_eRegrInput_Dphi_bC_sC); - treeDATA -> SetBranchAddress("ele1_eRegrInput_bEMax_Over_bCE", &ele1_eRegrInput_bEMax_Over_bCE); - - - float ele1_dxy_PV,ele1_dz_PV,ele1_sigmaP; - - TMVAreader_1->AddVariable( "ele1_dxy_PV" , &input_variables_1[18]); - TMVAreader_1->AddVariable( "ele1_dz_PV" , &input_variables_1[19]); - TMVAreader_1->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_1[20]); - - TMVAreader_2->AddVariable( "ele1_dxy_PV" , &input_variables_2[18]); - TMVAreader_2->AddVariable( "ele1_dz_PV" , &input_variables_2[19]); - TMVAreader_2->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_2[20]); - - - treeDATA -> SetBranchAddress("ele1_dxy_PV", &ele1_dxy_PV); - treeDATA -> SetBranchAddress("ele1_dz_PV", &ele1_dz_PV); - treeDATA -> SetBranchAddress("ele1_sigmaP", &ele1_sigmaP); - - float ele1_eRegrInput_bCELow_Over_sCE,ele1_eRegrInput_sigietaieta_bCLow,ele1_eRegrInput_sigiphiiphi_bCLow,ele1_eRegrInput_sigietaiphi_bCLow,ele1_eRegrInput_e3x3_Over_bCELow,ele1_eRegrInput_Deta_bCLow_sC,ele1_eRegrInput_Dphi_bCLow_sC; - - TMVAreader_1->AddVariable("ele1_eRegrInput_bCELow_Over_sCE",&input_variables_1[21]); - TMVAreader_1->AddVariable("ele1_eRegrInput_e3x3_Over_bCELow", &input_variables_1[22]); - TMVAreader_1->AddVariable("ele1_eRegrInput_Deta_bCLow_sC", &input_variables_1[23]); - TMVAreader_1->AddVariable("ele1_eRegrInput_Dphi_bCLow_sC", &input_variables_1[24]); - - - TMVAreader_2->AddVariable("ele1_eRegrInput_bCELow_Over_sCE",&input_variables_2[21]); - TMVAreader_2->AddVariable("ele1_eRegrInput_e3x3_Over_bCELow", &input_variables_2[22]); - TMVAreader_2->AddVariable("ele1_eRegrInput_Deta_bCLow_sC", &input_variables_2[23]); - TMVAreader_2->AddVariable("ele1_eRegrInput_Dphi_bCLow_sC", &input_variables_2[24]); - - treeDATA -> SetBranchAddress("ele1_eRegrInput_bCELow_Over_sCE", &ele1_eRegrInput_bCELow_Over_sCE); - treeDATA -> SetBranchAddress("ele1_eRegrInput_e3x3_Over_bCELow", &ele1_eRegrInput_e3x3_Over_bCELow); - treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaieta_bCLow", &ele1_eRegrInput_sigietaieta_bCLow); - treeDATA -> SetBranchAddress("ele1_eRegrInput_sigiphiiphi_bCLow", &ele1_eRegrInput_sigiphiiphi_bCLow); - treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaiphi_bCLow", &ele1_eRegrInput_sigietaiphi_bCLow); - treeDATA -> SetBranchAddress("ele1_eRegrInput_Deta_bCLow_sC", &ele1_eRegrInput_Deta_bCLow_sC); - treeDATA -> SetBranchAddress("ele1_eRegrInput_Dphi_bCLow_sC", &ele1_eRegrInput_Dphi_bCLow_sC); - - float ele1_eRegrInput_seedbC_etacry,ele1_eRegrInput_seedbC_phicry; - - TMVAreader_1->AddVariable("ele1_eRegrInput_seedbC_etacry", &input_variables_1[25]); - TMVAreader_1->AddVariable("ele1_eRegrInput_seedbC_phicry", &input_variables_1[26]); - TMVAreader_2->AddVariable("ele1_eRegrInput_seedbC_etacry", &input_variables_2[25]); - TMVAreader_2->AddVariable("ele1_eRegrInput_seedbC_phicry", &input_variables_2[26]); - - - treeDATA -> SetBranchAddress("ele1_eRegrInput_seedbC_etacry", &ele1_eRegrInput_seedbC_etacry); - treeDATA -> SetBranchAddress("ele1_eRegrInput_seedbC_phicry", &ele1_eRegrInput_seedbC_phicry); - - - ///==== add new branches ==== - TString weightfile_1 = FilemethodXML_EB_E; - TString weightfile_2 = FilemethodXML_EB_P; - - std::cout<<" UseMethodFlag "<BookMVA( UseMethodFlag, weightfile_1 ); - TMVAreader_2->BookMVA( UseMethodFlag, weightfile_2 ); - - TString methodName4TreeW_1 = Form ("%s_weightEB_W_1",UseMethodFlag.c_str()); - TString methodName4TreeZ_1 = Form ("%s_weightEB_Z_1",UseMethodFlag.c_str()); - TString methodName4TreeW_1_ = Form ("%s_weightEB_W_1/D",UseMethodFlag.c_str()); - TString methodName4TreeZ_1_ = Form ("%s_weightEB_Z_1/D",UseMethodFlag.c_str()); - - TString methodName4TreeW_2 = Form ("%s_weightEB_W_2",UseMethodFlag.c_str()); - TString methodName4TreeZ_2 = Form ("%s_weightEB_Z_2",UseMethodFlag.c_str()); - TString methodName4TreeW_2_ = Form ("%s_weightEB_W_2/D",UseMethodFlag.c_str()); - TString methodName4TreeZ_2_ = Form ("%s_weightEB_Z_2/D",UseMethodFlag.c_str()); - - TString methodtargetW_1; - TString methodtargetZ_1; - TString methodtargetW_1_; - TString methodtargetZ_1_; - TString methodtargetW_2; - TString methodtargetZ_2; - TString methodtargetW_2_; - TString methodtargetZ_2_; - - if(isMC == true){ - - methodtargetW_1 = Form ("%s_targetEB_W_1",UseMethodFlag.c_str()); - methodtargetZ_1 = Form ("%s_targetEB_Z_1",UseMethodFlag.c_str()); - methodtargetW_1_= Form ("%s_targetEB_W_1/F",UseMethodFlag.c_str()); - methodtargetZ_1_= Form ("%s_targetEB_Z_1/F",UseMethodFlag.c_str()); - - methodtargetW_2 = Form ("%s_targetEB_W_2",UseMethodFlag.c_str()); - methodtargetZ_2 = Form ("%s_targetEB_Z_2",UseMethodFlag.c_str()); - methodtargetW_2_= Form ("%s_targetEB_W_2/F",UseMethodFlag.c_str()); - methodtargetZ_2_= Form ("%s_targetEB_Z_2/F",UseMethodFlag.c_str()); - - } - - if(useW) { - weightBranchW_1 = treeDATA->Branch(methodName4TreeW_1,&MVA_ValueW_1,methodName4TreeW_1_); - weightBranchW_2 = treeDATA->Branch(methodName4TreeW_2,&MVA_ValueW_2,methodName4TreeW_2_); - if(isMC == true){ - btargetW_1 = treeDATA->Branch(methodtargetW_1,&targetW_1,methodtargetW_1); - btargetW_2 = treeDATA->Branch(methodtargetW_2,&targetW_2,methodtargetW_2); } - } - - if(!useW){ - weightBranchZ_1 = treeDATA->Branch(methodName4TreeZ_1,&MVA_ValueZ_1,methodName4TreeZ_1); - weightBranchZ_2 = treeDATA->Branch(methodName4TreeZ_2,&MVA_ValueZ_2,methodName4TreeZ_2); - - if(isMC == true){ btargetZ_1 = treeDATA->Branch(methodtargetZ_1,&targetZ_1,methodtargetZ_1); - btargetZ_2 = treeDATA->Branch(methodtargetZ_2,&targetZ_2,methodtargetZ_2); } - } - - ///==== loop ==== - Long64_t nentries = treeDATA->GetEntries(); - - for (Long64_t iEntry = 0; iEntry < nentries; iEntry++){ - if((iEntry%100000) == 0) std::cout << ">>>>> analysis::GetEntry " << iEntry << " : " << nentries << std::endl; - - treeDATA->GetEntry(iEntry); - - if(ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0. && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && - ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && - abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2){ - - input_variables_1[0] = static_cast(ele1_scE/ele1_scERaw); - input_variables_1[1] = static_cast(ele1_eRegrInput_nPV); - input_variables_1[2] = static_cast(ele1_eRegrInput_r9); - input_variables_1[3] = static_cast(ele1_fbrem); - input_variables_1[4] = static_cast(ele1_eta); - input_variables_1[5] = static_cast(ele1_DphiIn); - input_variables_1[6] = static_cast(ele1_DetaIn); - input_variables_1[7] = static_cast(ele1_sigmaIetaIeta); - input_variables_1[8] = static_cast(ele1_eRegrInput_etaW); - input_variables_1[9] = static_cast(ele1_eRegrInput_phiW); - input_variables_1[10] = static_cast(ele1_eRegrInput_bCE_Over_sCE); - input_variables_1[11] = static_cast(ele1_eRegrInput_sigietaieta_bC1); - input_variables_1[12] = static_cast(ele1_eRegrInput_sigiphiiphi_bC1); - input_variables_1[13] = static_cast(ele1_eRegrInput_sigietaiphi_bC1); - input_variables_1[14] = static_cast(ele1_eRegrInput_e3x3_Over_bCE); - input_variables_1[15] = static_cast(ele1_eRegrInput_Deta_bC_sC); - input_variables_1[16] = static_cast(ele1_eRegrInput_Dphi_bC_sC); - input_variables_1[17] = static_cast(ele1_eRegrInput_bEMax_Over_bCE); - input_variables_1[18] = static_cast(ele1_dxy_PV); - input_variables_1[19] = static_cast(ele1_dz_PV); - input_variables_1[29] = static_cast(ele1_sigmaP/ele1_tkP); - input_variables_1[21] = static_cast(ele1_eRegrInput_bCELow_Over_sCE); - input_variables_1[22] = static_cast(ele1_eRegrInput_e3x3_Over_bCELow); - input_variables_1[23] = static_cast(ele1_eRegrInput_Deta_bCLow_sC); - input_variables_1[24] = static_cast(ele1_eRegrInput_Dphi_bCLow_sC); - input_variables_1[25] = static_cast(ele1_eRegrInput_seedbC_etacry); - input_variables_1[26] = static_cast(ele1_eRegrInput_seedbC_phicry); - - - input_variables_2[0] = static_cast(ele1_scE/ele1_scERaw); - input_variables_2[1] = static_cast(ele1_eRegrInput_nPV); - input_variables_2[2] = static_cast(ele1_eRegrInput_r9); - input_variables_2[3] = static_cast(ele1_fbrem); - input_variables_2[4] = static_cast(ele1_eta); - input_variables_2[5] = static_cast(ele1_DphiIn); - input_variables_2[6] = static_cast(ele1_DetaIn); - input_variables_2[7] = static_cast(ele1_sigmaIetaIeta); - input_variables_2[8] = static_cast(ele1_eRegrInput_etaW); - input_variables_2[9] = static_cast(ele1_eRegrInput_phiW); - input_variables_2[10] = static_cast(ele1_eRegrInput_bCE_Over_sCE); - input_variables_2[11] = static_cast(ele1_eRegrInput_sigietaieta_bC1); - input_variables_2[12] = static_cast(ele1_eRegrInput_sigiphiiphi_bC1); - input_variables_2[13] = static_cast(ele1_eRegrInput_sigietaiphi_bC1); - input_variables_2[14] = static_cast(ele1_eRegrInput_e3x3_Over_bCE); - input_variables_2[15] = static_cast(ele1_eRegrInput_Deta_bC_sC); - input_variables_2[16] = static_cast(ele1_eRegrInput_Dphi_bC_sC); - input_variables_2[17] = static_cast(ele1_eRegrInput_bEMax_Over_bCE); - input_variables_2[18] = static_cast(ele1_dxy_PV); - input_variables_2[19] = static_cast(ele1_dz_PV); - input_variables_2[29] = static_cast(ele1_sigmaP/ele1_tkP); - input_variables_2[21] = static_cast(ele1_eRegrInput_bCELow_Over_sCE); - input_variables_2[22] = static_cast(ele1_eRegrInput_e3x3_Over_bCELow); - input_variables_2[23] = static_cast(ele1_eRegrInput_Deta_bCLow_sC); - input_variables_2[24] = static_cast(ele1_eRegrInput_Dphi_bCLow_sC); - input_variables_2[25] = static_cast(ele1_eRegrInput_seedbC_etacry); - input_variables_2[26] = static_cast(ele1_eRegrInput_seedbC_phicry); - - - if(useW){ - - MVA_ValueW_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag); - MVA_ValueW_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag); - - - if(isMC == true) { - targetW_1 = ele1_scE/ele1_E_true; - targetW_2 = ele1_tkP/ele1_E_true; - btargetW_1 -> Fill(); - btargetW_2 -> Fill(); - } - - weightBranchW_1 -> Fill(); - weightBranchW_2 -> Fill(); - - } - - if(!useW){ - - MVA_ValueZ_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag); - MVA_ValueZ_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag); - - if(isMC == true) { - targetZ_1 = ele1_scE/ele1_E_true; - targetZ_2 = ele1_tkP/ele1_E_true; - btargetZ_1 -> Fill(); - btargetZ_2 -> Fill(); - } - - weightBranchZ_1 -> Fill(); - weightBranchZ_2 -> Fill(); - } - - } - else{ - if( useW == true){ - MVA_ValueW_1 = -99. ; MVA_ValueW_2 = -99.; - if(isMC == true) { - targetW_1 = -99. ; targetW_2=-99. ; - btargetW_1 -> Fill(); - btargetW_2 -> Fill(); - } - - weightBranchW_1 -> Fill(); - weightBranchW_2 -> Fill(); - } - - if( useW == false){ - MVA_ValueZ_1 = -99.; MVA_ValueZ_2 = -99.; - if(isMC == true) { - targetZ_1 = -99. ; targetZ_2=-99. ; - btargetZ_1 -> Fill(); - btargetZ_2 -> Fill(); - } - weightBranchZ_1 -> Fill(); - weightBranchZ_2 -> Fill(); - } - - } - } - } - -if(RegionOfTraining=="EE"){ - - TMVA::Reader *TMVAreader_1 = new TMVA::Reader( "!Color:!Silent" ); - TMVA::Reader *TMVAreader_2 = new TMVA::Reader( "!Color:!Silent" ); - - - int ele1_isEB,isW; - float ele1_eRegrInput_nPV,ele1_eRegrInput_r9,ele1_fbrem,ele1_eta,ele1_DphiIn,ele1_DetaIn,ele1_sigmaIetaIeta, ele1_E_true, ele1_scE, ele1_tkP,ele1_eRegrInput_etaW,ele1_eRegrInput_phiW,ele1_scERaw; - - - TMVAreader_1->AddVariable("ele1_scE/ele1_scERaw",&input_variables_1[0]); - TMVAreader_1->AddVariable("ele1_eRegrInput_nPV",&input_variables_1[1]); - TMVAreader_1->AddVariable("ele1_eRegrInput_r9",&input_variables_1[2]); - TMVAreader_1->AddVariable("ele1_fbrem",&input_variables_1[3]); - TMVAreader_1->AddVariable("ele1_eta",&input_variables_1[4]); - TMVAreader_1->AddVariable("ele1_DphiIn",&input_variables_1[5]); - TMVAreader_1->AddVariable("ele1_DetaIn",&input_variables_1[6]); - TMVAreader_1->AddVariable("ele1_sigmaIetaIeta", &input_variables_1[7]); - TMVAreader_1->AddVariable("ele1_eRegrInput_etaW",&input_variables_1[8]); - TMVAreader_1->AddVariable("ele1_eRegrInput_phiW", &input_variables_1[9]); - - - TMVAreader_2->AddVariable("ele1_scE/ele1_scERaw",&input_variables_2[0]); - TMVAreader_2->AddVariable("ele1_eRegrInput_nPV",&input_variables_2[1]); - TMVAreader_2->AddVariable("ele1_eRegrInput_r9",&input_variables_2[2]); - TMVAreader_2->AddVariable("ele1_fbrem",&input_variables_2[3]); - TMVAreader_2->AddVariable("ele1_eta",&input_variables_2[4]); - TMVAreader_2->AddVariable("ele1_DphiIn",&input_variables_2[5]); - TMVAreader_2->AddVariable("ele1_DetaIn",&input_variables_2[6]); - TMVAreader_2->AddVariable("ele1_sigmaIetaIeta", &input_variables_2[7]); - TMVAreader_2->AddVariable("ele1_eRegrInput_etaW",&input_variables_2[8]); - TMVAreader_2->AddVariable("ele1_eRegrInput_phiW", &input_variables_2[9]); - - - treeDATA -> SetBranchAddress("ele1_isEB", &ele1_isEB); - treeDATA -> SetBranchAddress("isW", &isW); - - if(isMC == true) treeDATA -> SetBranchAddress("ele1_E_true", &ele1_E_true); - treeDATA -> SetBranchAddress("ele1_scE", &ele1_scE); - treeDATA -> SetBranchAddress("ele1_scERaw", &ele1_scERaw); - treeDATA -> SetBranchAddress("ele1_tkP", &ele1_tkP); - treeDATA -> SetBranchAddress("ele1_eRegrInput_nPV", &ele1_eRegrInput_nPV); - treeDATA -> SetBranchAddress("ele1_eRegrInput_r9", &ele1_eRegrInput_r9); - treeDATA -> SetBranchAddress("ele1_fbrem", &ele1_fbrem); - treeDATA -> SetBranchAddress("ele1_eta", &ele1_eta); - treeDATA -> SetBranchAddress("ele1_DphiIn", &ele1_DphiIn); - treeDATA -> SetBranchAddress("ele1_DetaIn", &ele1_DetaIn); - treeDATA -> SetBranchAddress("ele1_sigmaIetaIeta", &ele1_sigmaIetaIeta); - treeDATA -> SetBranchAddress("ele1_eRegrInput_etaW", &ele1_eRegrInput_etaW); - treeDATA -> SetBranchAddress("ele1_eRegrInput_phiW", &ele1_eRegrInput_phiW); - - - float ele1_dxy_PV,ele1_dz_PV,ele1_sigmaP; - - TMVAreader_1->AddVariable( "ele1_dxy_PV" , &input_variables_1[18]); - TMVAreader_1->AddVariable( "ele1_dz_PV" , &input_variables_1[19]); - TMVAreader_1->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_1[20]); - - TMVAreader_2->AddVariable( "ele1_dxy_PV" , &input_variables_2[18]); - TMVAreader_2->AddVariable( "ele1_dz_PV" , &input_variables_2[19]); - TMVAreader_2->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_2[20]); - - treeDATA -> SetBranchAddress("ele1_dxy_PV", &ele1_dxy_PV); - treeDATA -> SetBranchAddress("ele1_dz_PV", &ele1_dz_PV); - treeDATA -> SetBranchAddress("ele1_sigmaP", &ele1_sigmaP); - - - ///==== add new branches ==== - TString weightfile_1 = FilemethodXML_EE_E; - TString weightfile_2 = FilemethodXML_EE_P; - - std::cout<<" UseMethodFlag "<BookMVA( UseMethodFlag, weightfile_1 ); - TMVAreader_2->BookMVA( UseMethodFlag, weightfile_2 ); - - TString methodName4TreeW_1 = Form ("%s_weightEE_W_1",UseMethodFlag.c_str()); - TString methodName4TreeZ_1 = Form ("%s_weightEE_Z_1",UseMethodFlag.c_str()); - TString methodName4TreeW_1_ = Form ("%s_weightEE_W_1/D",UseMethodFlag.c_str()); - TString methodName4TreeZ_1_ = Form ("%s_weightEE_Z_1/D",UseMethodFlag.c_str()); - - TString methodName4TreeW_2 = Form ("%s_weightEE_W_2",UseMethodFlag.c_str()); - TString methodName4TreeZ_2 = Form ("%s_weightEE_Z_2",UseMethodFlag.c_str()); - TString methodName4TreeW_2_ = Form ("%s_weightEE_W_2/D",UseMethodFlag.c_str()); - TString methodName4TreeZ_2_ = Form ("%s_weightEE_Z_2/D",UseMethodFlag.c_str()); - - TString methodtargetW_1; - TString methodtargetZ_1; - TString methodtargetW_1_; - TString methodtargetZ_1_; - TString methodtargetW_2; - TString methodtargetZ_2; - TString methodtargetW_2_; - TString methodtargetZ_2_; - - if(isMC == true){ - methodtargetW_1 = Form ("%s_targetEE_W_1",UseMethodFlag.c_str()); - methodtargetZ_1 = Form ("%s_targetEE_Z_1",UseMethodFlag.c_str()); - methodtargetW_1_= Form ("%s_targetEE_W_1/F",UseMethodFlag.c_str()); - methodtargetZ_1_= Form ("%s_targetEE_Z_1/F",UseMethodFlag.c_str()); - - methodtargetW_2 = Form ("%s_targetEE_W_2",UseMethodFlag.c_str()); - methodtargetZ_2 = Form ("%s_targetEE_Z_2",UseMethodFlag.c_str()); - methodtargetW_2_= Form ("%s_targetEE_W_2/F",UseMethodFlag.c_str()); - methodtargetZ_2_= Form ("%s_targetEE_Z_2/F",UseMethodFlag.c_str()); - } - - if(useW) { - weightBranchW_1 = treeDATA->Branch(methodName4TreeW_1,&MVA_ValueW_1,methodName4TreeW_1_); - weightBranchW_2 = treeDATA->Branch(methodName4TreeW_2,&MVA_ValueW_2,methodName4TreeW_2_); - if(isMC==true){ - btargetW_1 = treeDATA->Branch(methodtargetW_1,&targetW_1,methodtargetW_1); - btargetW_2 = treeDATA->Branch(methodtargetW_2,&targetW_2,methodtargetW_2);} - } - - if(!useW){ - weightBranchZ_1 = treeDATA->Branch(methodName4TreeZ_1,&MVA_ValueZ_1,methodName4TreeZ_1); - weightBranchZ_2 = treeDATA->Branch(methodName4TreeZ_2,&MVA_ValueZ_2,methodName4TreeZ_2); - if(isMC==true){ - btargetZ_1 = treeDATA->Branch(methodtargetZ_1,&targetZ_1,methodtargetZ_1); - btargetZ_2 = treeDATA->Branch(methodtargetZ_2,&targetZ_2,methodtargetZ_2);} - } - - ///==== loop ==== - Long64_t nentries = treeDATA->GetEntries(); - - for (Long64_t iEntry = 0; iEntry < nentries; iEntry++){ - if((iEntry%100000) == 0) std::cout << ">>>>> analysis::GetEntry " << iEntry << " : " << nentries << std::endl; - - treeDATA->GetEntry(iEntry); - - if(ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05){ - - input_variables_1[0] = static_cast(ele1_scE/ele1_scERaw); - input_variables_1[1] = static_cast(ele1_eRegrInput_nPV); - input_variables_1[2] = static_cast(ele1_eRegrInput_r9); - input_variables_1[3] = static_cast(ele1_fbrem); - input_variables_1[4] = static_cast(ele1_eta); - input_variables_1[5] = static_cast(ele1_DphiIn); - input_variables_1[6] = static_cast(ele1_DetaIn); - input_variables_1[7] = static_cast(ele1_sigmaIetaIeta); - input_variables_1[8] = static_cast(ele1_eRegrInput_etaW); - input_variables_1[9] = static_cast(ele1_eRegrInput_phiW); - input_variables_1[10] = static_cast(ele1_dxy_PV); - input_variables_1[11] = static_cast(ele1_dz_PV); - input_variables_1[12] = static_cast(ele1_sigmaP/ele1_tkP); - - input_variables_2[0] = static_cast(ele1_scE/ele1_scERaw); - input_variables_2[1] = static_cast(ele1_eRegrInput_nPV); - input_variables_2[2] = static_cast(ele1_eRegrInput_r9); - input_variables_2[3] = static_cast(ele1_fbrem); - input_variables_2[4] = static_cast(ele1_eta); - input_variables_2[5] = static_cast(ele1_DphiIn); - input_variables_2[6] = static_cast(ele1_DetaIn); - input_variables_2[7] = static_cast(ele1_sigmaIetaIeta); - input_variables_2[8] = static_cast(ele1_eRegrInput_etaW); - input_variables_2[9] = static_cast(ele1_eRegrInput_phiW); - input_variables_2[10] = static_cast(ele1_dxy_PV); - input_variables_2[11] = static_cast(ele1_dz_PV); - input_variables_2[12] = static_cast(ele1_sigmaP/ele1_tkP); - - - if(useW){ - - MVA_ValueW_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag) ; - MVA_ValueW_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag) ; - - if(isMC== true){ - targetW_1 = ele1_scE/ele1_E_true; - targetW_2 = ele1_tkP/ele1_E_true; - - btargetW_1 -> Fill(); - btargetW_2 -> Fill(); - } - weightBranchW_1 -> Fill(); - weightBranchW_2 -> Fill(); - - } - - if(!useW){ - - MVA_ValueZ_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag) ; - MVA_ValueZ_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag) ; - - if(isMC== true){ - targetZ_1 = ele1_scE/ele1_E_true; - targetZ_2 = ele1_tkP/ele1_E_true; - - btargetZ_1 -> Fill(); - btargetZ_2 -> Fill(); - } - - weightBranchZ_1 -> Fill(); - weightBranchZ_2 -> Fill(); - } - - } - else{ - if( useW == true){ - MVA_ValueW_1 = -99. ; MVA_ValueW_2 = -99.; - if(isMC== true){ - targetW_1 = -99. ; targetW_2=-99. ; - btargetW_1 -> Fill(); - btargetW_2 -> Fill(); - } - weightBranchW_1 -> Fill(); - weightBranchW_2 -> Fill(); } - - if( useW == false){ - MVA_ValueZ_1 = -99.; MVA_ValueZ_2 = -99.; - if(isMC == true){ - targetZ_1 = -99. ; targetZ_2=-99. ; - btargetZ_1 -> Fill(); - btargetZ_2 -> Fill(); - } - weightBranchZ_1 -> Fill(); - weightBranchZ_2 -> Fill(); - } - - } - } - -} - - // save only the new version of the tree - treeDATA->Write("", TObject::kOverwrite); - - return 0; - -} - - - - diff --git a/EOverPCalibration/FastCalibrator/bin/BuildFile.xml b/EOverPCalibration/FastCalibrator/bin/BuildFile.xml deleted file mode 100644 index 304114ca245..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/BuildFile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp b/EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp deleted file mode 100644 index 7a51e37e326..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/CalibrationMomentum.cpp +++ /dev/null @@ -1,1143 +0,0 @@ -#include "../interface/TEndcapRings.h" -#include "../../NtuplePackage/interface/ntpleUtils.h" -#include "../../NtuplePackage/interface/treeReader.h" -#include "../interface/CalibrationUtils.h" -#include "../CommonTools/histoFunc.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "TROOT.h" -#include "TStyle.h" -#include "TFile.h" -#include "TF1.h" -#include "TH1.h" -#include "TH2.h" -#include "TCanvas.h" -#include "TProfile.h" -#include "TGraphErrors.h" -#include "TPaveStats.h" -#include "TLegend.h" -#include "TChain.h" -#include "TVirtualFitter.h" -#include "TMath.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - -using namespace std; - - -bool IsEtaGap(float eta) -{ - float feta = fabs(eta); - if( fabs(feta - 0 ) < 3 ) return true; - if( fabs(feta - 25) < 3 ) return true; - if( fabs(feta - 45) < 3 ) return true; - if( fabs(feta - 65) < 3 ) return true; - if( fabs(feta - 85) < 3 ) return true; - return false; -} - - - - - - -//************** MAIN PROGRAM ************************************************************** -int main(int argc, char** argv) -{ - // Acquisition from cfg file - if(argc != 2) - { - std::cerr << ">>>>> CalibrationMomentum.cpp::usage: " << argv[0] << " configFileName" << std::endl; - return 1; - } - - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("Options"); - // parameterSet.reset(); - - std::string TreeName = "NULL"; - if(Options.existsAs("TreeName")) - TreeName = Options.getParameter("TreeName"); - - std::string infileDATA = "NULL"; - if(Options.existsAs("infileDATA")) - infileDATA = Options.getParameter("infileDATA"); - - std::string infileMC = "NULL"; - if(Options.existsAs("infileMC")) - infileMC = Options.getParameter("infileMC"); - - std::string WeightforMC = "NULL"; - if(Options.existsAs("WeightforMC")) - WeightforMC = Options.getParameter("WeightforMC"); - - std::string typeEB = "NULL"; - if(Options.existsAs("typeEB")) - typeEB = Options.getParameter("typeEB"); - - std::string typeEE = "NULL"; - if(Options.existsAs("typeEE")) - typeEE = Options.getParameter("typeEE"); - - int nPhiBinsEB = 1; - if(Options.existsAs("nPhiBinsEB")) - nPhiBinsEB = Options.getParameter("nPhiBinsEB"); - - int nPhiBinsEE = 1; - if(Options.existsAs("nPhiBinsEE")) - nPhiBinsEE = Options.getParameter("nPhiBinsEE"); - - int nPhiBinsTempEB = 1; - if(Options.existsAs("nPhiBinsTempEB")) - nPhiBinsTempEB = Options.getParameter("nPhiBinsTempEB"); - - int nPhiBinsTempEE = 1; - if(Options.existsAs("nPhiBinsTempEE")) - nPhiBinsTempEE = Options.getParameter("nPhiBinsTempEE"); - - int rebinEB = 1; - if(Options.existsAs("rebinEB")) - rebinEB = Options.getParameter("rebinEB"); - - int rebinEE = 1; - if(Options.existsAs("rebinEE")) - rebinEE = Options.getParameter("rebinEE"); - - int nRegionsEB = 1; - if(Options.existsAs("nRegionsEB")) - nRegionsEB = Options.getParameter("nRegionsEB"); - - int nRegionsEE = 1; - if(Options.existsAs("nRegionsEE")) - nRegionsEE = Options.getParameter("nRegionsEE"); - - std::string outputFile = "NULL"; - if(Options.existsAs("outputFile")) - outputFile = Options.getParameter("outputFile"); - - bool usePUweights = false; - if(Options.existsAs("usePUweights")) - usePUweights = Options.getParameter("usePUweights"); - - cout <<" Basic Configuration " <GetNbinsX()+1; ibin++){ - w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 - } - weightsFile.Close(); - - //histos to get the bin in phi given the electron phi - TH1F* hPhiBinEB = new TH1F("hphiEB","hphiEB",nPhiBinsEB, -1.*TMath::Pi(),1.*TMath::Pi()); - TH1F* hPhiBinEE = new TH1F("hphiEE","hphiEE",nPhiBinsEE, -1.*TMath::Pi(),1.*TMath::Pi()); - - //----- NTUPLES-------------------- - TChain *ntu_DA = new TChain(TreeName.c_str()); - TChain *ntu_MC = new TChain(TreeName.c_str()); - - if(!FillChain(*ntu_DA, infileDATA.c_str())) return 1; - if(!FillChain(*ntu_MC, infileMC.c_str())) return 1; - - std::cout << " DATA: " << ntu_DA->GetEntries() << " entries in Data sample" << std::endl; - std::cout << " MC : " << ntu_MC->GetEntries() << " entries in MC sample" << std::endl; - - // observables - int isW; - float mZ; - float scEta, scPhi; - float scEta2, scPhi2; - float eleEta, elePhi; - float eleEta2, elePhi2; - float scEne, scEneReg, scEt, scERaw, e3x3, R9; - float scEne2, scEneReg2, scEt2, scERaw2, e3x32, R92; - float charge, charge2; - float pTK,pTK2; - int iphiSeed, ele1_ix, ele1_iy, ele1_iz; - int iphiSeed2, ele2_ix, ele2_iy, ele2_iz; - int npu; - - // Set branch addresses for Data - ntu_DA->SetBranchStatus("*",0); - ntu_DA->SetBranchStatus("isW", 1); ntu_DA->SetBranchAddress("isW", &isW); - ntu_DA->SetBranchStatus("ele1_eta", 1); ntu_DA->SetBranchAddress("ele1_eta", &eleEta); - ntu_DA->SetBranchStatus("ele2_eta", 1); ntu_DA->SetBranchAddress("ele2_eta", &eleEta2); - ntu_DA->SetBranchStatus("ele1_phi", 1); ntu_DA->SetBranchAddress("ele1_phi", &elePhi); - ntu_DA->SetBranchStatus("ele2_phi", 1); ntu_DA->SetBranchAddress("ele2_phi", &elePhi2); - ntu_DA->SetBranchStatus("ele1_scEta", 1); ntu_DA->SetBranchAddress("ele1_scEta", &scEta); - ntu_DA->SetBranchStatus("ele2_scEta", 1); ntu_DA->SetBranchAddress("ele2_scEta", &scEta2); - ntu_DA->SetBranchStatus("ele1_scPhi", 1); ntu_DA->SetBranchAddress("ele1_scPhi", &scPhi); - ntu_DA->SetBranchStatus("ele2_scPhi", 1); ntu_DA->SetBranchAddress("ele2_scPhi", &scPhi2); - ntu_DA->SetBranchStatus("ele1_scE", 1); ntu_DA->SetBranchAddress("ele1_scE", &scEne); - ntu_DA->SetBranchStatus("ele2_scE", 1); ntu_DA->SetBranchAddress("ele2_scE", &scEne2); - ntu_DA->SetBranchStatus("ele1_scE_regression", 1); ntu_DA->SetBranchAddress("ele1_scE_regression", &scEneReg); - ntu_DA->SetBranchStatus("ele2_scE_regression", 1); ntu_DA->SetBranchAddress("ele2_scE_regression", &scEneReg2); - ntu_DA->SetBranchStatus("ele1_scEt", 1); ntu_DA->SetBranchAddress("ele1_scEt",&scEt); - ntu_DA->SetBranchStatus("ele2_scEt", 1); ntu_DA->SetBranchAddress("ele2_scEt",&scEt2); - ntu_DA->SetBranchStatus("ele1_scERaw", 1); ntu_DA->SetBranchAddress("ele1_scERaw", &scERaw); - ntu_DA->SetBranchStatus("ele2_scERaw", 1); ntu_DA->SetBranchAddress("ele2_scERaw", &scERaw2); - ntu_DA->SetBranchStatus("ele1_e3x3", 1); ntu_DA->SetBranchAddress("ele1_e3x3", &e3x3); - ntu_DA->SetBranchStatus("ele2_e3x3", 1); ntu_DA->SetBranchAddress("ele2_e3x3", &e3x32); - ntu_DA->SetBranchStatus("ele1ele2_scM", 1); ntu_DA->SetBranchAddress("ele1ele2_scM", &mZ); - ntu_DA->SetBranchStatus("ele1_charge", 1); ntu_DA->SetBranchAddress("ele1_charge", &charge); - ntu_DA->SetBranchStatus("ele2_charge", 1); ntu_DA->SetBranchAddress("ele2_charge", &charge2); - ntu_DA->SetBranchStatus("ele1_tkP", 1); ntu_DA->SetBranchAddress("ele1_tkP", &pTK); - ntu_DA->SetBranchStatus("ele2_tkP", 1); ntu_DA->SetBranchAddress("ele2_tkP", &pTK2); - ntu_DA->SetBranchStatus("ele1_seedIphi", 1); ntu_DA->SetBranchAddress("ele1_seedIphi", &iphiSeed); - ntu_DA->SetBranchStatus("ele2_seedIphi", 1); ntu_DA->SetBranchAddress("ele2_seedIphi", &iphiSeed2); - ntu_DA->SetBranchStatus("ele1_seedIx", 1); ntu_DA->SetBranchAddress("ele1_seedIx", &ele1_ix); - ntu_DA->SetBranchStatus("ele2_seedIx", 1); ntu_DA->SetBranchAddress("ele2_seedIx", &ele2_ix); - ntu_DA->SetBranchStatus("ele1_seedIy", 1); ntu_DA->SetBranchAddress("ele1_seedIy", &ele1_iy); - ntu_DA->SetBranchStatus("ele2_seedIy", 1); ntu_DA->SetBranchAddress("ele2_seedIy", &ele2_iy); - ntu_DA->SetBranchStatus("ele1_seedZside", 1); ntu_DA->SetBranchAddress("ele1_seedZside", &ele1_iz); - ntu_DA->SetBranchStatus("ele2_seedZside", 1); ntu_DA->SetBranchAddress("ele2_seedZside", &ele2_iz); - - - // Set branch addresses for MC - ntu_MC->SetBranchStatus("*",0); - ntu_MC->SetBranchStatus("isW", 1); ntu_MC->SetBranchAddress("isW", &isW); - ntu_MC->SetBranchStatus("ele1_eta", 1); ntu_MC->SetBranchAddress("ele1_eta", &eleEta); - ntu_MC->SetBranchStatus("ele2_eta", 1); ntu_MC->SetBranchAddress("ele2_eta", &eleEta2); - ntu_MC->SetBranchStatus("ele1_phi", 1); ntu_MC->SetBranchAddress("ele1_phi", &elePhi); - ntu_MC->SetBranchStatus("ele2_phi", 1); ntu_MC->SetBranchAddress("ele2_phi", &elePhi2); - ntu_MC->SetBranchStatus("ele1_scEta", 1); ntu_MC->SetBranchAddress("ele1_scEta", &scEta); - ntu_MC->SetBranchStatus("ele2_scEta", 1); ntu_MC->SetBranchAddress("ele2_scEta", &scEta2); - ntu_MC->SetBranchStatus("ele1_scPhi", 1); ntu_MC->SetBranchAddress("ele1_scPhi", &scPhi); - ntu_MC->SetBranchStatus("ele2_scPhi", 1); ntu_MC->SetBranchAddress("ele2_scPhi", &scPhi2); - ntu_MC->SetBranchStatus("ele1_scE", 1); ntu_MC->SetBranchAddress("ele1_scE", &scEne); - ntu_MC->SetBranchStatus("ele2_scE", 1); ntu_MC->SetBranchAddress("ele2_scE", &scEne2); - ntu_MC->SetBranchStatus("ele1_scE_regression", 1); ntu_MC->SetBranchAddress("ele1_scE_regression", &scEneReg); - ntu_MC->SetBranchStatus("ele2_scE_regression", 1); ntu_MC->SetBranchAddress("ele2_scE_regression", &scEneReg2); - ntu_MC->SetBranchStatus("ele1_scEt", 1); ntu_MC->SetBranchAddress("ele1_scEt",&scEt); - ntu_MC->SetBranchStatus("ele2_scEt", 1); ntu_MC->SetBranchAddress("ele2_scEt",&scEt2); - ntu_MC->SetBranchStatus("ele1_scERaw", 1); ntu_MC->SetBranchAddress("ele1_scERaw", &scERaw); - ntu_MC->SetBranchStatus("ele2_scERaw", 1); ntu_MC->SetBranchAddress("ele2_scERaw", &scERaw2); - ntu_MC->SetBranchStatus("ele1_e3x3", 1); ntu_MC->SetBranchAddress("ele1_e3x3", &e3x3); - ntu_MC->SetBranchStatus("ele2_e3x3", 1); ntu_MC->SetBranchAddress("ele2_e3x3", &e3x32); - ntu_MC->SetBranchStatus("ele1ele2_scM", 1); ntu_MC->SetBranchAddress("ele1ele2_scM", &mZ); - ntu_MC->SetBranchStatus("ele1_charge", 1); ntu_MC->SetBranchAddress("ele1_charge", &charge); - ntu_MC->SetBranchStatus("ele2_charge", 1); ntu_MC->SetBranchAddress("ele2_charge", &charge2); - ntu_MC->SetBranchStatus("ele1_tkP", 1); ntu_MC->SetBranchAddress("ele1_tkP", &pTK); - ntu_MC->SetBranchStatus("ele2_tkP", 1); ntu_MC->SetBranchAddress("ele2_tkP", &pTK2); - ntu_MC->SetBranchStatus("ele1_seedIphi", 1); ntu_MC->SetBranchAddress("ele1_seedIphi", &iphiSeed); - ntu_MC->SetBranchStatus("ele2_seedIphi", 1); ntu_MC->SetBranchAddress("ele2_seedIphi", &iphiSeed2); - ntu_MC->SetBranchStatus("ele1_seedIx", 1); ntu_MC->SetBranchAddress("ele1_seedIx", &ele1_ix); - ntu_MC->SetBranchStatus("ele2_seedIx", 1); ntu_MC->SetBranchAddress("ele2_seedIx", &ele2_ix); - ntu_MC->SetBranchStatus("ele1_seedIy", 1); ntu_MC->SetBranchAddress("ele1_seedIy", &ele1_iy); - ntu_MC->SetBranchStatus("ele2_seedIy", 1); ntu_MC->SetBranchAddress("ele2_seedIy", &ele2_iy); - ntu_MC->SetBranchStatus("ele1_seedZside", 1); ntu_MC->SetBranchAddress("ele1_seedZside", &ele1_iz); - ntu_MC->SetBranchStatus("ele2_seedZside", 1); ntu_MC->SetBranchAddress("ele2_seedZside", &ele2_iz); - if(usePUweights) - { - ntu_MC->SetBranchStatus("PUit_NumInteractions", 1); ntu_MC->SetBranchAddress("PUit_NumInteractions", &npu); - } - - - - // histogram definition in EB and fit functions - std::vector > h_Phi_EB(nPhiBinsEB); // used to map iEta (as defined for Barrel and Endcap geom) into eta - std::vector > h_EoP_EB(nPhiBinsEB); - std::vector > h_EoC_EB(nPhiBinsEB); - std::vector > f_EoP_EB(nPhiBinsEB); - std::vector > f_EoC_EB(nPhiBinsEB); - - // histogram definition in EE and fit functions - std::vector > h_Phi_EE(nPhiBinsEE); // used to map iEta (as defined for Barrel and Endcap geom) into eta - std::vector > h_EoP_EE(nPhiBinsEE); - std::vector > h_EoC_EE(nPhiBinsEE); - std::vector > f_EoP_EE(nPhiBinsEE); - std::vector > f_EoC_EE(nPhiBinsEE); - - - - // Initializate histos in EB - std::cout << ">>> Initialize EB histos" << std::endl; - for(int i = 0; i < nPhiBinsEB; ++i) - { - for(int j = 0; j < nRegionsEB; ++j) - { - TString histoName; - histoName= Form("EB_EoP_%d_%d", i,j); - TH1F* temp = new TH1F (histoName, histoName, 2200, 0.2, 1.6); - temp->Sumw2(); - temp->SetFillColor(kRed+2); - temp->SetLineColor(kRed+2); - temp->SetFillStyle(3004); - (h_EoP_EB.at(i)).push_back(temp); - - histoName=Form("EB_EoC_%d_%d", i,j); - temp = new TH1F(histoName, histoName, 2200, 0.2, 1.6); - temp->Sumw2(); - temp->SetFillColor(kGreen+2); - temp->SetLineColor(kGreen+2); - temp->SetFillStyle(3004); - (h_EoC_EB.at(i)).push_back(temp); - - histoName=Form("EB_Phi_%d_%d", i,j); - temp = new TH1F(histoName, histoName, 360, 0., 360.); - (h_Phi_EB.at(i)).push_back(temp); - } - } - - // Initializate histos in EE - std::cout << ">>> Initialize EE histos" << std::endl; - for(int i = 0; i < nPhiBinsEE; ++i) - { - for(int j = 0; j < nRegionsEE; ++j) - { - TString histoName; - histoName= Form("EE_EoP_%d_%d", i,j); - TH1F* temp = new TH1F (histoName, histoName, 2200, 0., 2.); - temp->Sumw2(); - temp->SetFillColor(kRed+2); - temp->SetLineColor(kRed+2); - temp->SetFillStyle(3004); - (h_EoP_EE.at(i)).push_back(temp); - - histoName=Form("EE_EoC_%d_%d", i,j); - temp = new TH1F(histoName, histoName, 2200, 0., 2.); - temp->Sumw2(); - temp->SetFillColor(kGreen+2); - temp->SetLineColor(kGreen+2); - temp->SetFillStyle(3004); - (h_EoC_EE.at(i)).push_back(temp); - - histoName=Form("EE_Phi_%d_%d", i,j); - temp = new TH1F(histoName, histoName, 360, 0., 360.); - (h_Phi_EE.at(i)).push_back(temp); - } - } - - - - // Template in EE and EB - std::vector > h_template_EB(nPhiBinsTempEB); - std::vector > h_template_EE(nPhiBinsTempEE); - - std::cout << ">>> Initialize EB template" << std::endl; - for(int mod = 0; mod < nPhiBinsTempEB; ++mod) - { - for(int j = 0; j < nRegionsEB; ++j) - { - TString histoName; - histoName=Form("EB_template_%d_%d",mod,j); - TH1F* temp = new TH1F(histoName,"",2200,0.2,1.6); - (h_template_EB.at(mod)).push_back(temp); - } - } - - std::cout << ">>> Initialize EE template" << std::endl; - for(int mod = 0; mod < nPhiBinsTempEE; ++mod) - { - for(int j = 0; j < nRegionsEE; ++j) - { - TString histoName; - histoName=Form("EE_template_%d_%d",mod,j); - TH1F* temp = new TH1F(histoName,"",2200,0.,2.); - (h_template_EE.at(mod)).push_back(temp); - } - } - - - TH1F** h_phi_data_EB = new TH1F*[nRegionsEB]; - TH1F** h_phi_mc_EB = new TH1F*[nRegionsEB]; - TH1F** h_phi_data_EE = new TH1F*[nRegionsEE]; - TH1F** h_phi_mc_EE = new TH1F*[nRegionsEE]; - - for(int index = 0; index < nRegionsEB; ++index) - { - TString name; - name=Form("EB_h_phi_data_%d",index); - h_phi_data_EB[index]= new TH1F(name,"h_phi_data",100,-TMath::Pi(),TMath::Pi()); - name=Form("EB_h_phi_mc_%d",index); - h_phi_mc_EB[index]= new TH1F(name,"h_phi_mc",100,-TMath::Pi(),TMath::Pi()); - } - - for(int index = 0; index < nRegionsEE; ++index) - { - TString name; - name=Form("EE_h_phi_data_%d",index); - h_phi_data_EE[index] = new TH1F(name,"h_phi_data",100,-TMath::Pi(),TMath::Pi()); - name=Form("EE_h_phi_mc_%d",index); - h_phi_mc_EE[index] = new TH1F(name,"h_phi_mc",100,-TMath::Pi(),TMath::Pi()); - } - - TH1F* h_et_data = new TH1F("h_et_data","h_et_data",100,0.,100.); - TH1F* h_et_mc = new TH1F("h_et_mc", "h_et_mc", 100,0.,100.); - - - - // Initialize endcap geometry - TEndcapRings *eRings = new TEndcapRings(); - - // Map for conversion (ix,iy) into Eta for EE - TH2F * mapConversionEEp = new TH2F ("mapConversionEEp","mapConversionEEp",101,1,101,101,1,101); - TH2F * mapConversionEEm = new TH2F ("mapConversionEEm","mapConversionEEm",101,1,101,101,1,101); - - for(int ix =0; ixGetNbinsX(); ix++) - for(int iy =0; iyGetNbinsY(); iy++) - { - mapConversionEEp->SetBinContent(ix+1,iy+1,0); - mapConversionEEm->SetBinContent(ix+1,iy+1,0); - } - - - - // fill MC templates - std::vector refIdEB; - refIdEB.assign(nPhiBinsEB,0); - - std::vector refIdEE; - refIdEE.assign(nPhiBinsEE,0); - - for(int iphi = 0; iphi < nPhiBinsEB; ++iphi) - { - float phi = hPhiBinEB->GetBinCenter(iphi+1); - - phi = 2.*TMath::Pi() + phi + TMath::Pi()*10./180.; - phi -= int(phi/2./TMath::Pi()) * 2.*TMath::Pi(); - - int modPhi = int(phi/(2.*TMath::Pi()/nPhiBinsTempEB)); - if( modPhi == nPhiBinsTempEB ) modPhi = 0; - refIdEB.at(iphi) = modPhi; - } - - for(int iphi = 0; iphi < nPhiBinsEE; ++iphi) - { - float phi = hPhiBinEE->GetBinCenter(iphi+1); - - phi = 2.*TMath::Pi() + phi + TMath::Pi()*10./180.; - phi -= int(phi/2./TMath::Pi()) * 2.*TMath::Pi(); - - int modPhi = int(phi/(2.*TMath::Pi()/nPhiBinsTempEE)); - if( modPhi == nPhiBinsTempEE ) modPhi = 0; - refIdEE.at(iphi) = modPhi; - } - - - - - - - //**************************** loop on MC, make refernce and fit dist - - float var = 0.; - std::cout << "Loop in MC events " << endl; - for(int entry = 0; entry < ntu_MC->GetEntries(); ++entry) - { - if( entry%10000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; - //if( entry > 1000 ) break; - - ntu_MC->GetEntry(entry); - - if( isW == 1 ) continue; - if( fabs(scEta) > etaMax ) continue; - if( fabs(scEta2) > eta2Max ) continue; - if( scEt < 20. ) continue; - if( scEt2 < 20. ) continue; - - R9 = e3x3 / scERaw; - R92 = e3x32 / scERaw2; - - - //--- PU weights - float ww = 1.; - if( usePUweights ) ww *= w[npu]; - - - - //--- set the mass for ele1 - var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; - // simulate e+/e- asymmetry - //if( charge > 0 ) ww *= 1.*(6/5); - //else ww *= 1.*(4/5); - - // MC - BARREL - ele1 - if( ele1_iz == 0 ) - { - // fill MC templates - int modPhi = int(iphiSeed/(360./nPhiBinsTempEB)); - if( modPhi == nPhiBinsTempEB ) modPhi = 0; - - int regionId = templIndexEB(typeEB,eleEta,charge,R9); - if( regionId == -1 ) continue; - - (h_template_EB.at(modPhi)).at(regionId) -> Fill(var*var,ww); - - - // fill MC histos in eta bins - int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1; - if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; - - (h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC - h_phi_mc_EB[regionId] -> Fill(scPhi,ww); - } - - // MC - ENDCAP - ele1 - else - { - int iphi = eRings->GetEndcapIphi(ele1_ix,ele1_iy,ele1_iz); - - if( ele1_iz == 1 )mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta); - if( ele1_iz == -1 )mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta); - - - // fill MC templates - int modPhi = int (iphi/(360./nPhiBinsTempEE)); - if( modPhi == nPhiBinsTempEE ) modPhi = 0; - - int regionId = templIndexEE(typeEE,eleEta,charge,R9); - if( regionId == -1 ) continue; - - (h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww); - - - // fill MC histos in eta bins - int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1; - if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; - - (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC - h_phi_mc_EE[regionId] -> Fill(scPhi,ww); - } - - - - //--- set the mass for ele2 - var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; - // simulate e+/e- asymmetry - //if( charge > 0 ) ww *= 1.*(6/5); - //else ww *= 1.*(4/5); - - // MC - BARREL - ele2 - if( ele2_iz == 0) - { - // fill MC templates - int modPhi = int (iphiSeed2/(360./nPhiBinsTempEB)); - if( modPhi == nPhiBinsTempEB ) modPhi = 0; - - int regionId = templIndexEB(typeEB,eleEta2,charge2,R92); - if(regionId == -1) continue; - - (h_template_EB.at(modPhi)).at(regionId)->Fill(var*var,ww); - - - // fill MC histos in eta bins - int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1; - if( PhibinEB==nPhiBinsEB ) PhibinEB = 0; - - (h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC - h_phi_mc_EB[regionId]->Fill(scPhi2,ww); - } - - // MC - ENDCAP - ele2 - else - { - if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2); - if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2); - - int iphi = eRings->GetEndcapIphi(ele2_ix,ele2_iy,ele2_iz); - - - // fill MC templates - int modPhi = int (iphi/(360./nPhiBinsTempEE)); - if( modPhi == nPhiBinsTempEE ) modPhi = 0; - - int regionId = templIndexEE(typeEE,eleEta2,charge2,R92); - if(regionId == -1) continue; - - (h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww); - - - // fill MC histos in eta bins - int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1; - if(PhibinEE==nPhiBinsEE) PhibinEE = 0; - - (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC - h_phi_mc_EE[regionId]->Fill(scPhi2,ww); - } - - h_et_mc ->Fill(scEt, ww); - h_et_mc ->Fill(scEt2,ww); - } - - - - - - - //**************************** loop on DATA - - std::cout << "Loop in Data events " << endl; - - for(int entry = 0; entry < ntu_DA->GetEntries(); ++entry) - { - if( entry%10000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; - - ntu_DA->GetEntry(entry); - - if( isW == 1 ) continue; - if( fabs(scEta) > etaMax ) continue; - if( fabs(scEta2) > eta2Max ) continue; - if( scEt < 20. ) continue; - if( scEt2 < 20. ) continue; - - R9 = e3x3 / scERaw; - R92 = e3x32 / scERaw2; - - float ww = 1.; - - - - //--- set the mass for ele1 - if( ele1_iz == 0 ) var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; - else var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; - // simulate e+/e- asymmetry - //if( charge > 0 ) ww *= 1.*(6/5); - //else ww *= 1.*(4/5); - - // DATA - BARREL - ele1 - if( ele1_iz == 0 ) - { - int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1; - if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; - - int regionId = templIndexEB(typeEB,eleEta,charge,R9); - if(regionId == -1) continue; - - (h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA - (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi); - h_phi_data_EB[regionId]->Fill(elePhi); - } - - // DATA - ENDCAP - ele1 - else - { - if( ele1_iz == 1 ) mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta); - if( ele1_iz == -1 ) mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta); - - int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1; - if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; - - int regionId = templIndexEE(typeEE,eleEta,charge,R9); - if( regionId == -1 ) continue; - - (h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA - (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi); - h_phi_data_EE[regionId] -> Fill(elePhi); - } - - - - //--- set the mass for ele2 - if( ele2_iz == 0 ) var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; - else var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; - // simulate e+/e- asymmetry - //if( charge2 > 0 ) ww *= 1.*(6/5); - //else ww *= 1.*(4/5); - - // DATA - BARREL - ele2 - if( ele2_iz == 0 ) - { - int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1; - if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; - - int regionId = templIndexEB(typeEB,eleEta2,charge2,R92); - if( regionId == -1 ) continue; - - (h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA - (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi2); - h_phi_data_EB[regionId] -> Fill(elePhi2); - } - else - { - if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2); - if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2); - - int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1; - if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; - - int regionId = templIndexEE(typeEE,eleEta2,charge2,R92); - if( regionId == -1 ) continue; - - (h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA - (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi2); - h_phi_data_EE[regionId] ->Fill(elePhi2); - } - - h_et_data ->Fill(scEt); - h_et_data ->Fill(scEt2); - } - - std::cout << "End loop: Analyze events " << endl; - - - - - - - //---------------- - // Initializations - - // initialize TGraphs - TFile* o = new TFile((outputFile+"_"+typeEB+"_"+typeEE+".root").c_str(),"RECREATE"); - - TGraphErrors** g_EoP_EB = new TGraphErrors*[nRegionsEB]; - TGraphErrors** g_EoC_EB = new TGraphErrors*[nRegionsEB]; - TGraphErrors** g_Rat_EB = new TGraphErrors*[nRegionsEB]; - - for(int j = 0; j < nRegionsEB; ++j) - { - g_EoP_EB[j] = new TGraphErrors(); - g_EoC_EB[j] = new TGraphErrors(); - g_Rat_EB[j] = new TGraphErrors(); - } - - TGraphErrors** g_EoP_EE = new TGraphErrors*[nRegionsEB]; - TGraphErrors** g_EoC_EE = new TGraphErrors*[nRegionsEB]; - TGraphErrors** g_Rat_EE = new TGraphErrors*[nRegionsEB]; - - for(int j = 0; j < nRegionsEE; ++j) - { - g_EoP_EE[j]= new TGraphErrors(); - g_EoC_EE[j]= new TGraphErrors(); - g_Rat_EE[j]= new TGraphErrors(); - } - - // initialize template functions - std::vector > templateHistoFuncEB(nPhiBinsTempEB); - std::vector > templateHistoFuncEE(nPhiBinsTempEE); - - for(int mod = 0; mod < nPhiBinsTempEB; ++mod) - { - for(int j = 0; j < nRegionsEB; ++j) - { - (h_template_EB.at(mod)).at(j) -> Rebin(rebinEB); - (templateHistoFuncEB.at(mod)).push_back( new histoFunc((h_template_EB.at(mod)).at(j)) ); - } - } - - for(int mod = 0; mod < nPhiBinsTempEE; ++mod) - { - for(int j = 0; j < nRegionsEE; ++j) - { - (h_template_EE.at(mod)).at(j) -> Rebin(rebinEE); - (templateHistoFuncEE.at(mod)).push_back( new histoFunc((h_template_EE.at(mod)).at(j)) ); - } - } - - - - - - - //------------------- - // Template Fit in EB - - if( typeEB != "none" ) - { - for(int i = 0; i < nPhiBinsEB; ++i) - { - for(int j = 0; j < nRegionsEB; ++j) - { - float flPhi = hPhiBinEB->GetXaxis()->GetBinCenter(i+1); - - (h_EoP_EB.at(i)).at(j) -> Rebin(rebinEB); - (h_EoC_EB.at(i)).at(j) -> Rebin(rebinEB); - - - // define the fitting function - // N.B. [0] * ( [1] * f( [1]*(x-[2]) ) ) - char funcName[50]; - sprintf(funcName,"f_EoP_%d_%d_Ref_%d_%d_EB",i,j,refIdEB.at(i),j); - (f_EoP_EB.at(i)).push_back( new TF1(funcName, (templateHistoFuncEB.at(refIdEB.at(i))).at(j), 0.85, 1.1, 3, "histoFunc") ); - - (f_EoP_EB.at(i)).at(j) -> SetParName(0,"Norm"); - (f_EoP_EB.at(i)).at(j) -> SetParName(1,"Scale factor"); - - (f_EoP_EB.at(i)).at(j) -> SetLineWidth(1); - (f_EoP_EB.at(i)).at(j) -> SetLineColor(kRed+2); - (f_EoP_EB.at(i)).at(j) -> SetNpx(10000); - - (h_EoP_EB.at(i)).at(j) -> Scale(1*(h_EoC_EB.at(i)).at(j)->GetEntries()/(h_EoP_EB.at(i)).at(j)->GetEntries()); - - // uncorrected - double xNorm = (h_EoP_EB.at(i)).at(j)->Integral()/(h_template_EB.at(refIdEB.at(i))).at(j)->Integral() * - (h_EoP_EB.at(i)).at(j)->GetBinWidth(1)/(h_template_EB.at(refIdEB.at(i))).at(j)->GetBinWidth(1); - - - (f_EoP_EB.at(i)).at(j) -> FixParameter(0, xNorm); - (f_EoP_EB.at(i)).at(j) -> FixParameter(2, 0.); - - - std::cout << "***** Fitting MC EB " << flPhi << " (" << i << "," << j << "): "; - TFitResultPtr rp; - int fStatus; - for(int trial = 0; trial < 10; ++trial) - { - (f_EoP_EB.at(i)).at(j) -> SetParameter(1, 0.99); - rp = (h_EoP_EB.at(i)).at(j) -> Fit(funcName, "QRWL+"); - fStatus = rp; - if(fStatus !=4 && (f_EoP_EB.at(i)).at(j)->GetParError(1) != 0. ) - { - std::cout << "fit OK "; - - double k = (f_EoP_EB.at(i)).at(j)->GetParameter(1); - double eee = (f_EoP_EB.at(i)).at(j)->GetParError(1); - g_EoP_EB[j] -> SetPoint(i, flPhi, 1./k); - g_EoP_EB[j] -> SetPointError(i, 0., eee/k/k); - - break; - } - else if( trial == 9 ) - { - std::cout << "fit BAD "; - - g_EoP_EB[j] -> SetPoint(i, flPhi, 1.); - g_EoP_EB[j] -> SetPointError(i, 0., 0.01); - } - } - - - //ratio preparation - float rat = (f_EoP_EB.at(i)).at(j)->GetParameter(1); - float era = (f_EoP_EB.at(i)).at(j)->GetParError(1); - - xNorm = (h_EoC_EB.at(i)).at(j)->Integral()/(h_template_EB.at(refIdEB.at(i))).at(j)->Integral() * - (h_EoC_EB.at(i)).at(j)->GetBinWidth(1)/(h_template_EB.at(refIdEB.at(i))).at(j)->GetBinWidth(1); - - sprintf(funcName,"f_EoC_%d_%d_Ref_%d_%d_EB",i,j,refIdEB.at(i),i); - - (f_EoC_EB.at(i)).push_back( new TF1(funcName, (templateHistoFuncEB.at(refIdEB.at(i))).at(j), 0.85, 1.1, 3, "histoFunc") ); - - (f_EoC_EB.at(i)).at(j) -> SetParName(0,"Norm"); - (f_EoC_EB.at(i)).at(j) -> SetParName(1,"Scale factor"); - - (f_EoC_EB.at(i)).at(j) -> SetLineWidth(1); - (f_EoC_EB.at(i)).at(j) -> SetLineColor(kGreen+2); - (f_EoC_EB.at(i)).at(j) -> SetNpx(10000); - - (f_EoC_EB.at(i)).at(j) -> FixParameter(0, xNorm); - (f_EoC_EB.at(i)).at(j) -> FixParameter(2, 0.); - - - std::cout << "***** Fitting DATA EB (" << i << "," << j << "): "; - for(int trial = 0; trial < 10; ++trial) - { - (f_EoC_EB.at(i)).at(j) -> SetParameter(1, 0.99); - rp = (h_EoC_EB.at(i)).at(j) -> Fit(funcName, "QR+"); - fStatus = rp; - if( fStatus !=4 && (f_EoC_EB.at(i)).at(j)->GetParError(1) != 0 ) - { - std::cout << "fit OK "; - - double k = (f_EoC_EB.at(i)).at(j)->GetParameter(1); - double eee = (f_EoC_EB.at(i)).at(j)->GetParError(1); - g_EoC_EB[j] -> SetPoint(i, flPhi, 1./k); - g_EoC_EB[j] -> SetPointError(i, 0., eee/k/k); - - break; - } - else if( trial == 9 ) - { - std::cout << "fit BAD "; - - g_EoC_EB[j] -> SetPoint(i, flPhi, 1.); - g_EoC_EB[j] -> SetPointError(i, 0., 0.01); - } - } - - - //ratio finalization - rat /= (f_EoC_EB.at(i)).at(j)->GetParameter(1); - era = rat*sqrt(era*era+(f_EoC_EB.at(i)).at(j)->GetParError(1)*(f_EoC_EB.at(i)).at(j)->GetParError(1)); - - if(i==0) g_Rat_EB[j] -> SetPoint(i, 0., rat); - else g_Rat_EB[j] -> SetPoint(i, flPhi, rat); - - g_Rat_EB[j] -> SetPointError(i, 0. , era); - g_Rat_EB[j]->SetLineColor(kBlue+2); - - std::cout << std::endl; - } - } - } - else - { - for(int i = 0; i < nPhiBinsEB; ++i) - { - for(int j = 0; j < nRegionsEB; ++j) - { - float flPhi = hPhiBinEB->GetXaxis()->GetBinCenter(i+1); - g_EoP_EB[j] -> SetPoint(i, flPhi, 1.); - g_EoC_EB[j] -> SetPoint(i, flPhi, 1.); - g_Rat_EB[j] -> SetPoint(i, flPhi, 1.); - } - } - } - - - - - - - //------------------- - // Template Fit in EE - - if( typeEE != "none" ) - { - for(int i = 0; i < nPhiBinsEE; ++i) - { - for(int j = 0; j < nRegionsEE; ++j) - { - float flPhi = hPhiBinEE->GetXaxis()->GetBinCenter(i); - - (h_EoP_EE.at(i)).at(j) -> Rebin(rebinEE); - (h_EoC_EE.at(i)).at(j) -> Rebin(rebinEE); - - - // define the fitting function - // N.B. [0] * ( [1] * f( [1]*(x-[2]) ) ) - - char funcName[50]; - sprintf(funcName,"f_EoP_%d_%d_Ref_%d_%d_EE",i,j,refIdEE.at(i),j); - (f_EoP_EE.at(i)).push_back( new TF1(funcName, (templateHistoFuncEE.at(refIdEE.at(i))).at(j), 0.7, 1.1, 3, "histoFunc") ); - - (f_EoP_EE.at(i)).at(j) -> SetParName(0,"Norm"); - (f_EoP_EE.at(i)).at(j) -> SetParName(1,"Scale factor"); - - (f_EoP_EE.at(i)).at(j) -> SetLineWidth(1); - (f_EoP_EE.at(i)).at(j) -> SetLineColor(kRed+2); - (f_EoP_EE.at(i)).at(j) -> SetNpx(10000); - (f_EoP_EE.at(i)).at(j) -> SetNpx(10000); - - (h_EoP_EE.at(i)).at(j) -> Scale(1*(h_EoC_EE.at(i)).at(j)->GetEntries()/(h_EoP_EE.at(i)).at(j)->GetEntries()); - - // uncorrected - double xNorm = (h_EoP_EE.at(i)).at(j)->Integral()/(h_template_EE.at(refIdEE.at(i))).at(j)->Integral() * - (h_EoP_EE.at(i)).at(j)->GetBinWidth(1)/(h_template_EE.at(refIdEE.at(i))).at(j)->GetBinWidth(1); - - (f_EoP_EE.at(i)).at(j) -> FixParameter(0, xNorm); - (f_EoP_EE.at(i)).at(j) -> FixParameter(2, 0.); - - - std::cout << "***** Fitting MC EE " << flPhi << " (" << i << "," << j << "): "; - TFitResultPtr rp; - int fStatus; - for(int trial = 0; trial < 10; ++trial) - { - (f_EoP_EE.at(i)).at(j) -> SetParameter(1, 0.99); - rp = (h_EoP_EE.at(i)).at(j) -> Fit(funcName, "QRWL+"); - fStatus = rp; - - if( fStatus !=4 && (f_EoP_EE.at(i)).at(j)->GetParError(1) != 0. ) - { - std::cout << "fit OK "; - - double k = (f_EoP_EE.at(i)).at(j)->GetParameter(1); - double eee = (f_EoP_EE.at(i)).at(j)->GetParError(1); - g_EoP_EE[j] -> SetPoint(i, flPhi, 1./k); - g_EoP_EE[j] -> SetPointError(i, 0., eee/k/k); - - break; - } - else if( trial == 9 ) - { - std::cout << "fit BAD "; - - g_EoP_EE[j] -> SetPoint(i, flPhi, 1.); - g_EoP_EE[j] -> SetPointError(i, 0., 0.03); - } - } - - //ratio preparation - float rat = (f_EoP_EE.at(i)).at(j)->GetParameter(1); - float era = (f_EoP_EE.at(i)).at(j)->GetParError(1); - - // corrected - xNorm = (h_EoC_EE.at(i)).at(j)->Integral()/(h_template_EE.at(refIdEE.at(i))).at(j)->Integral() * - (h_EoC_EE.at(i)).at(j)->GetBinWidth(1)/(h_template_EE.at(refIdEE.at(i))).at(j)->GetBinWidth(1); - - sprintf(funcName,"f_EoC_%d_%d_Ref_%d_%d_EE",i,j,refIdEE.at(i),j); - (f_EoC_EE.at(i)).push_back( new TF1(funcName, (templateHistoFuncEE.at(refIdEE.at(i))).at(j), 0.7, 1.1, 3, "histoFunc") ); - - (f_EoC_EE.at(i)).at(j) -> SetParName(0,"Norm"); - (f_EoC_EE.at(i)).at(j) -> SetParName(1,"Scale factor"); - - (f_EoC_EE.at(i)).at(j) -> SetLineWidth(1); - (f_EoC_EE.at(i)).at(j) -> SetLineColor(kGreen+2); - (f_EoC_EE.at(i)).at(j) -> SetNpx(10000); - - (f_EoC_EE.at(i)).at(j) -> FixParameter(0, xNorm); - (f_EoC_EE.at(i)).at(j) -> FixParameter(2, 0.); - - - std::cout << "***** Fitting DATA EE " << flPhi << " (" << i << "," << j << "): "; - for(int trial = 0; trial < 10; ++trial) - { - (f_EoC_EE.at(i)).at(j) -> SetParameter(1, 0.99); - rp = (h_EoC_EE.at(i)).at(j) -> Fit(funcName, "QR+"); - if( fStatus !=4 && (f_EoC_EE.at(i)).at(j)->GetParError(1) != 0. ) - { - std::cout << "fit OK "; - - double k = (f_EoC_EE.at(i)).at(j)->GetParameter(1); - double eee = (f_EoC_EE.at(i)).at(j)->GetParError(1); - g_EoC_EE[j] -> SetPoint(i, flPhi, 1./k); - g_EoC_EE[j] -> SetPointError(i, 0., eee/k/k); - - break; - } - else if( trial == 9 ) - { - g_EoC_EE[j] -> SetPoint(i, flPhi, 1.); - g_EoC_EE[j] -> SetPointError(i, 0., 0.03); - } - } - - - //ratio finalization - rat /= (f_EoC_EE.at(i)).at(j)->GetParameter(1); - era = rat*sqrt(era*era+(f_EoC_EE.at(i)).at(j)->GetParError(1)*(f_EoC_EE.at(i)).at(j)->GetParError(1)); - - g_Rat_EE[j] -> SetPoint(i, flPhi, rat); - g_Rat_EE[j] -> SetPointError(i, 0. , era); - - g_Rat_EE[j]->SetLineColor(kBlue+2); - } - - std::cout << std::endl; - } - } - else - { - for(int i = 0; i < nPhiBinsEE; ++i) - { - for(int j = 0; j < nRegionsEE; ++j) - { - float flPhi = hPhiBinEE->GetXaxis()->GetBinCenter(i+1); - g_EoP_EE[j] -> SetPoint(i, flPhi, 1.); - g_EoC_EE[j] -> SetPoint(i, flPhi, 1.); - g_Rat_EE[j] -> SetPoint(i, flPhi, 1.); - } - } - } - - - - - - - //------- - // Output - - o -> cd(); - - for(int j = 0; j < nRegionsEB; ++j) - { - TString Name; - //Name = Form("g_EoP_EB_%d",j); - //if(g_EoP_EB[j]->GetN()!=0) g_EoP_EB[j] -> Write(Name); - Name = Form("g_EoC_EB_%d",j); - if(g_EoC_EB[j]->GetN()!=0) g_EoC_EB[j] -> Write(Name); - //Name = Form("g_Rat_EB_%d",j); - //if(g_Rat_EB[j]->GetN()!=0) g_Rat_EB[j] -> Write(Name); - } - - for(int j = 0; j < nRegionsEE; ++j) - { - TString Name; - //Name = Form("g_EoP_EE_%d",j); - //if(g_EoP_EE[j]->GetN()!=0) g_EoP_EE[j] -> Write(Name); - Name = Form("g_EoC_EE_%d",j); - if(g_EoC_EE[j]->GetN()!=0) g_EoC_EE[j] -> Write(Name); - //Name = Form("g_Rat_EE_%d",j); - //if(g_Rat_EE[j]->GetN()!=0) g_Rat_EE[j] -> Write(Name); - } - - for(int mod = 0; mod GetEntries() != 0 ) h_template_EB[mod][j] -> Write(); - } - - for(int mod = 0; mod GetEntries() != 0 ) h_template_EE[mod][j] -> Write(); - } - - for(int i = 0; i GetEntries() != 0 ) (h_EoP_EB.at(i)).at(j) -> Write(); - //if( (h_EoC_EB.at(i)).at(j) -> GetEntries() != 0 ) (h_EoC_EB.at(i)).at(j) -> Write(); - } - - for(int i = 0; i GetEntries() != 0 ) (h_EoP_EE.at(i)).at(j) -> Write(); - //if( (h_EoC_EE.at(i)).at(j) -> GetEntries() != 0 ) (h_EoC_EE.at(i)).at(j) -> Write(); - } - - for(int j =0; j< nRegionsEB; ++j) - { - if( h_phi_mc_EB[j] -> GetEntries() !=0 ) h_phi_mc_EB[j] -> Write(); - if( h_phi_data_EB[j] -> GetEntries() !=0 ) h_phi_data_EB[j] -> Write(); - } - - for(int j =0; j< nRegionsEE; ++j) - { - if( h_phi_mc_EE[j] -> GetEntries() !=0 ) h_phi_mc_EE[j] -> Write(); - if( h_phi_data_EE[j] -> GetEntries() !=0 ) h_phi_data_EE[j] -> Write(); - } - - h_et_mc->Write(); - h_et_data->Write(); - - mapConversionEEp -> Write(); - mapConversionEEm -> Write(); - - o -> Close(); - - - - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp b/EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp deleted file mode 100644 index 683202442d8..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/CalibrationPlots.cpp +++ /dev/null @@ -1,854 +0,0 @@ -/// Standalone program to mormalize IC EB by the mean on a eta ring + skipping xtal near dead channels and TT -/// in the normalization procedure -/// Folded Plots for Spread IC, Statistical Precision and spread -/// Correct IC near cracks and for momentum scale and produce txt IC values - -#include -#include -#include -#include -#include -#include -#include - -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TF1.h" -#include "TLegend.h" -#include "TGraphErrors.h" -#include "TApplication.h" -#include "TLatex.h" - -#include "../interface/TEndcapRings.h" -#include "../../NtuplePackage/interface/ntpleUtils.h" -#include "../interface/CalibrationUtils.h" -#include "../interface/DrawingUtils.h" -#include "../interface/setTDRStyle.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - - -int main(int argc, char **argv) -{ - //------------------ - // Set style options - - setTDRStyle(); - gStyle->SetPadTopMargin(0.05); - gStyle->SetPadBottomMargin(0.13); - gStyle->SetPadLeftMargin(0.13); - gStyle->SetPadRightMargin(0.17); - gStyle->SetLabelSize(0.04,"XYZ"); - gStyle->SetTitleSize(0.05,"XYZ"); - gStyle->SetOptStat(0); - gStyle->SetOptFit(0); - - - - //---------------- - // parse cfg file - - if( argc != 2 ) - { - std::cerr << ">>>>> Calibration.cpp::usage: " << argv[0] << " configFileName" << std::endl; - return 1; - } - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("Options"); - - - std::string inFileName = "NULL"; - if(Options.existsAs("inFileName")) - inFileName = Options.getParameter("inFileName"); - else{ std::cout<<" Exit from code, no input file"<("is2012Calib")) - is2012Calib = Options.getParameter("is2012Calib"); - - bool isEB = true; - if(Options.existsAs("isEB")) - isEB = Options.getParameter("isEB"); - - std::string outputFolder = "output/"; - if(Options.existsAs("outputFolder")) - outputFolder = Options.getParameter("outputFolder"); - - std::string outputTxt = "IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"; - if(Options.existsAs("outputTxt")) - outputTxt = Options.getParameter("outputTxt"); - - std::string outFileName = "calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"; - if(Options.existsAs("outFileName")) - outFileName = Options.getParameter("outFileName"); - - std::string fileType = "cxx"; - if(Options.existsAs("fileType")) - fileType = Options.getParameter("fileType"); - - int evalStat = true; - if(Options.existsAs("evalStat")) - evalStat = Options.getParameter("evalStat"); - - std::string inFileNameEven="NULL", inFileNameOdd="NULL"; - if( evalStat ) - { - if(Options.existsAs("inFileNameEven")) - inFileNameEven = Options.getParameter("inFileNameEven"); - else{ std::cout<<" Exit from code, no even input file"<("inFileNameOdd")) - inFileNameOdd = Options.getParameter("inFileNameOdd"); - else{ std::cout<<" Exit from code, no odd input file"<>> No input file specified!" << std::endl; - return 1; - } - std::cout << ">>> Making calibration plots for: " << inFileName << std::endl; - - if( evalStat ) - { - if( inFileNameEven.empty() || inFileNameOdd.empty() ) - { - std::cout << ">>> No input files to evaluate statistical precision specified!" << std::endl; - return 1; - } - std::cout << ">>> Evaluating statistical precision from: " << inFileNameEven << std::endl; - std::cout << ">>> Evaluating statistical precision from: " << inFileNameOdd << std::endl; - } - - - - //--------------------- - // endcap ring geometry - - TEndcapRings* eRings = new TEndcapRings(); - TFile* exisistingEEFile = new TFile("CommonTools/existingEE.root","READ"); - TH2F* existingEE = (TH2F*)( exisistingEEFile->Get("endcap") ); - - TFile* MCSystematicFile = new TFile("CommonTools/ResidualForSystematic_EE_MC.root","READ"); - //TGraphErrors* MCSystematic_EEM = (TGraphErrors*)( MCSystematicFile->Get("residual_EEM") ); - TGraphErrors* MCSystematic_EE = (TGraphErrors*)( MCSystematicFile->Get("residual_All") ); - //TGraphErrors* MCSystematic_EEP = (TGraphErrors*)( MCSystematicFile->Get("residual_EEP") ); - - - - //----------------------- - // map for dead TT centre - - std::map > > TT_centre; - if( isEB == true ) - { - std::vector< std::pair > TT_centre_EB; - - if( !is2012Calib ) InitializeDeadTT_EB(TT_centre_EB); - if( is2012Calib ) InitializeDeadTT_EB2012(TT_centre_EB); - - TT_centre[0] = TT_centre_EB; - } - else - { - std::vector< std::pair > TT_centre_EEM; - std::vector< std::pair > TT_centre_EEP; - - if( !is2012Calib ) InitializeDeadTTEEM(TT_centre_EEM); - if( is2012Calib ) InitializeDeadTTEEM2012(TT_centre_EEM); - - if( !is2012Calib ) InitializeDeadTTEEP(TT_centre_EEP); - if( is2012Calib ) InitializeDeadTTEEP2012(TT_centre_EEP); - - TT_centre[-1] = TT_centre_EEM; - TT_centre[1] = TT_centre_EEP; - } - - - - //--------------- - // define outfile - - TCanvas* c1 = new TCanvas(); - c1 -> cd(); - - TFile* outFile = new TFile((outputFolder+"/"+outFileName).c_str(),"RECREATE"); - - - - - - - //-------------------------------------------------------------- - // Build the precision vs ieta plot starting from the TH2F of IC - //-------------------------------------------------------------- - - - - // open files - TFile* inFile = new TFile(inFileName.c_str(),"READ"); - TFile* inFileEven = new TFile(); - TFile* inFileOdd = new TFile(); - if( evalStat ) - { - inFileEven = new TFile(inFileNameEven.c_str(),"READ"); - inFileOdd = new TFile(inFileNameOdd.c_str(),"READ"); - } - - - - // get the IC maps as they come from the algorithm - std::map h2_IC_raw; - std::map h2_IC_raw_phiNorm; - std::map h2_IC_crackCorr; - std::map h2_IC_crackCorr_phiNorm; - - std::map h2_ICEven_raw; - std::map h2_IC_raw_phiNorm_even; - std::map h2_IC_crackCorr_phiNorm_even; - - std::map h2_ICOdd_raw; - std::map h2_IC_raw_phiNorm_odd; - std::map h2_IC_crackCorr_phiNorm_odd; - - if( isEB == true ) - { - h2_IC_raw[0] = (TH2F*)( inFile->Get("h_scale_EB") ); - - h2_IC_raw_phiNorm[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_raw_phiNorm_EB") ); - h2_IC_raw_phiNorm[0] -> Reset("ICEMS"); - h2_IC_raw_phiNorm[0] -> ResetStats(); - - h2_IC_crackCorr[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_crackCorr_EB") ); - h2_IC_crackCorr[0] -> Reset("ICEMS"); - h2_IC_crackCorr[0] -> ResetStats(); - - h2_IC_crackCorr_phiNorm[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_crackCorr_phiNorm_EB") ); - h2_IC_crackCorr_phiNorm[0] -> Reset("ICEMS"); - h2_IC_crackCorr_phiNorm[0] -> ResetStats(); - - if( evalStat ) - { - h2_ICEven_raw[0] = (TH2F*)( inFileEven->Get("h_scale_EB") ); - h2_ICOdd_raw[0] = (TH2F*)( inFileOdd ->Get("h_scale_EB") ); - - h2_IC_raw_phiNorm_even[0] = (TH2F*)( h2_ICEven_raw[0]->Clone("h2_IC_raw_phiNorm_even_EB") ); - h2_IC_raw_phiNorm_even[0] -> Reset("ICEMS"); - h2_IC_raw_phiNorm_even[0] -> ResetStats(); - - h2_IC_raw_phiNorm_odd[0] = (TH2F*)( h2_ICOdd_raw[0]->Clone("h2_IC_raw_phiNorm_odd_EB") ); - h2_IC_raw_phiNorm_odd[0] -> Reset("ICEMS"); - h2_IC_raw_phiNorm_odd[0] -> ResetStats(); - - h2_IC_crackCorr_phiNorm_even[0] = (TH2F*)( h2_ICEven_raw[0]->Clone("h2_IC_crackCorr_phiNorm_even_EB") ); - h2_IC_crackCorr_phiNorm_even[0] -> Reset("ICEMS"); - h2_IC_crackCorr_phiNorm_even[0] -> ResetStats(); - - h2_IC_crackCorr_phiNorm_odd[0] = (TH2F*)( h2_ICOdd_raw[0]->Clone("h2_IC_crackCorr_phiNorm_odd_EB") ); - h2_IC_crackCorr_phiNorm_odd[0] -> Reset("ICEMS"); - h2_IC_crackCorr_phiNorm_odd[0] -> ResetStats(); - } - } - else - { - h2_IC_raw[-1] = (TH2F*)( inFile->Get("h_scale_EEM") ); - h2_IC_raw[1] = (TH2F*)( inFile->Get("h_scale_EEP") ); - - h2_IC_raw_phiNorm[-1] = (TH2F*)( h2_IC_raw[-1]->Clone("h2_IC_raw_phiNorm_EEM") ); - h2_IC_raw_phiNorm[1] = (TH2F*)( h2_IC_raw[1] ->Clone("h2_IC_raw_phiNorm_EEP") ); - h2_IC_raw_phiNorm[-1] -> Reset("ICEMS"); - h2_IC_raw_phiNorm[1] -> Reset("ICEMS"); - h2_IC_raw_phiNorm[-1] -> ResetStats(); - h2_IC_raw_phiNorm[1] -> ResetStats(); - - if( evalStat ) - { - h2_ICEven_raw[-1] = (TH2F*)( inFileEven->Get("h_scale_EEM") ); - h2_ICEven_raw[1] = (TH2F*)( inFileEven->Get("h_scale_EEP") ); - h2_ICOdd_raw[-1 ] = (TH2F*)( inFileOdd ->Get("h_scale_EEM") ); - h2_ICOdd_raw[1] = (TH2F*)( inFileOdd ->Get("h_scale_EEP") ); - - h2_IC_raw_phiNorm_even[-1] = (TH2F*)( h2_ICEven_raw[-1]->Clone("h2_IC_raw_phiNorm_even_EEM") ); - h2_IC_raw_phiNorm_even[1] = (TH2F*)( h2_ICEven_raw[1] ->Clone("h2_IC_raw_phiNorm_even_EEP") ); - h2_IC_raw_phiNorm_even[-1] -> Reset("ICEMS"); - h2_IC_raw_phiNorm_even[1] -> Reset("ICEMS"); - h2_IC_raw_phiNorm_even[-1] -> ResetStats(); - h2_IC_raw_phiNorm_even[1] -> ResetStats(); - - h2_IC_raw_phiNorm_odd[-1] = (TH2F*)( h2_ICOdd_raw[-1]->Clone("h2_IC_raw_phiNorm_odd_EEM") ); - h2_IC_raw_phiNorm_odd[1] = (TH2F*)( h2_ICOdd_raw[1] ->Clone("h2_IC_raw_phiNorm_odd_EEP") ); - h2_IC_raw_phiNorm_odd[-1] -> Reset("ICEMS"); - h2_IC_raw_phiNorm_odd[1] -> Reset("ICEMS"); - h2_IC_raw_phiNorm_odd[-1] -> ResetStats(); - h2_IC_raw_phiNorm_odd[1] -> ResetStats(); - } - } - - - - // normalize each ring to the average IC of that eta ring - if( isEB == true ) - { - NormalizeIC_EB(h2_IC_raw[0],h2_IC_raw_phiNorm[0],TT_centre[0]); - if( evalStat ) - { - NormalizeIC_EB(h2_ICEven_raw[0],h2_IC_raw_phiNorm_even[0],TT_centre[0]); - NormalizeIC_EB(h2_ICOdd_raw[0], h2_IC_raw_phiNorm_odd[0], TT_centre[0]); - } - } - else - { - NormalizeIC_EE(h2_IC_raw[-1],h2_IC_raw[1],h2_IC_raw_phiNorm[-1],h2_IC_raw_phiNorm[1],TT_centre[-1],TT_centre[1],eRings); - if( evalStat ) - { - NormalizeIC_EE(h2_ICEven_raw[-1],h2_ICEven_raw[1],h2_IC_raw_phiNorm_even[-1],h2_IC_raw_phiNorm_even[1],TT_centre[-1],TT_centre[1],eRings); - NormalizeIC_EE(h2_ICOdd_raw[-1], h2_ICOdd_raw[1], h2_IC_raw_phiNorm_odd[-1], h2_IC_raw_phiNorm_odd[1], TT_centre[-1],TT_centre[1],eRings); - } - } - - - - - - - ///////////////////////////////////////////////////////////// - // plots for raw IC (only ring normalization) - ///////////////////////////////////////////////////////////// - std::cout << ">>> Draw plots for raw IC" << std::endl; - - int etaRingWidth = 1; - int phiRegionWidth = 1; - - int nBins_spread = 2000; - float spreadMin = 0.; - float spreadMax = 2.; - - int nBins_stat = 1000; - float statMin = -1.; - float statMax = 1.; - - outFile -> mkdir("raw"); - outFile -> cd("raw"); - - - - //-------------- - // spread histos - std::cout << ">>>>>> spread histos" << std::endl; - - std::map h_spread; - std::map > h_spread_vsEta; - std::map g_spread_vsEta; - - if( isEB == true ) - { - h_spread[0] = new TH1F("h_spread_EB","",nBins_spread,spreadMin,spreadMax); - g_spread_vsEta[0] = new TGraphErrors(); - - BookSpreadHistos_EB(h_spread[0], h_spread_vsEta[0], g_spread_vsEta[0], etaRingWidth, - "EB_spread_vsEta",nBins_spread,spreadMin,spreadMax, - h2_IC_raw_phiNorm[0]); - - h_spread[0] -> Write(); - //for(unsigned int i = 0; i < h_spread_vsEta[0].size(); ++i) - // h_spread_vsEta[0].at(i) -> Write(); - g_spread_vsEta[0] -> Write("g_spread_vsEta_EB"); - } - else - { - h_spread[-1] = new TH1F("h_spread_EEM","",nBins_spread,spreadMin,spreadMax); - h_spread[0] = new TH1F("h_spread_EE", "",nBins_spread,spreadMin,spreadMax); - h_spread[+1] = new TH1F("h_spread_EEP","",nBins_spread,spreadMin,spreadMax); - g_spread_vsEta[-1] = new TGraphErrors(); - g_spread_vsEta[0] = new TGraphErrors(); - g_spread_vsEta[+1] = new TGraphErrors(); - - std::map dummy; - BookSpreadHistos_EE(h_spread, h_spread_vsEta, g_spread_vsEta, - eRings,etaRingWidth, - "EE_spread_vsEta",nBins_spread,spreadMin,spreadMax, - h2_IC_raw_phiNorm,dummy); - - h_spread[-1] -> Write(); - h_spread[0] -> Write(); - h_spread[+1] -> Write(); - //for(unsigned int i = 0; i < h_spread_vsEta[0].size(); ++i) - //{ - // h_spread_vsEta[-1].at(i) -> Write(); - // h_spread_vsEta[0].at(i) -> Write(); - // h_spread_vsEta[+1].at(i) -> Write(); - //} - g_spread_vsEta[-1] -> Write("g_spread_vsEta_EEM"); - g_spread_vsEta[0] -> Write("g_spread_vsEta_EE"); - g_spread_vsEta[+1] -> Write("g_spread_vsEta_EEP"); - } - - - - //------------------- - // phi profile histos - std::cout << ">>>>>> phi profile histos" << std::endl; - - std::map h_phiAvgICSpread; - std::map g_avgIC_vsPhi; - - if( isEB == true ) - { - h_phiAvgICSpread[0] = new TH1F("h_phiAvgICSpread_EB","",nBins_spread,spreadMin,spreadMax); - g_avgIC_vsPhi[0] = new TGraphErrors(); - - PhiProfile(h_phiAvgICSpread[0], g_avgIC_vsPhi[0], phiRegionWidth, h2_IC_raw_phiNorm[0]); - - h_phiAvgICSpread[0] -> Write(); - g_avgIC_vsPhi[0] -> Write("g_avgIC_vsPhi_EB"); - } - else - { - h_phiAvgICSpread[-1] = new TH1F("h_phiAvgICSpread_EEM","",nBins_spread,spreadMin,spreadMax); - h_phiAvgICSpread[+1] = new TH1F("h_phiAvgICSpread_EEP","",nBins_spread,spreadMin,spreadMax); - g_avgIC_vsPhi[-1] = new TGraphErrors(); - g_avgIC_vsPhi[+1] = new TGraphErrors(); - - PhiProfile(h_phiAvgICSpread[-1],g_avgIC_vsPhi[-1],phiRegionWidth,h2_IC_raw_phiNorm[-1],eRings); - PhiProfile(h_phiAvgICSpread[+1],g_avgIC_vsPhi[+1],phiRegionWidth,h2_IC_raw_phiNorm[+1],eRings); - - h_phiAvgICSpread[-1] -> Write(); - h_phiAvgICSpread[+1] -> Write(); - g_avgIC_vsPhi[-1] -> Write("g_avgIC_vsPhi_EEM"); - g_avgIC_vsPhi[+1] -> Write("g_avgIC_vsPhi_EEP"); - } - - - - //---------------------------------- - // phi-fold profile histos (EB only) - std::cout << ">>>>>> phi-fold profile histos" << std::endl; - - TGraphErrors* g_avgIC_vsPhiFold_EBM = new TGraphErrors(); - TGraphErrors* g_avgIC_vsPhiFold_EBP = new TGraphErrors(); - - if( isEB == true ) - { - PhiFoldProfile_EB(g_avgIC_vsPhiFold_EBM, g_avgIC_vsPhiFold_EBP, phiRegionWidth, h2_IC_raw_phiNorm[0]); - - g_avgIC_vsPhiFold_EBM -> Write("g_avgIC_vsPhiFold_EBM"); - g_avgIC_vsPhiFold_EBP -> Write("g_avgIC_vsPhiFold_EBP"); - } - - - - //----------------------------- - // statistical precision histos - std::cout << ">>>>>> stat histos" << std::endl; - - std::map h_stat; - std::map > h_stat_vsEta; - std::map g_stat_vsEta; - std::map g_residual_vsEta; - - if( isEB == true ) - { - h_stat[0] = new TH1F("h_stat_EB","",nBins_stat,statMin,statMax); - g_stat_vsEta[0] = new TGraphErrors(); - g_residual_vsEta[0] = new TGraphErrors(); - - if( evalStat ) - { - BookSpreadHistos_EB(h_stat[0], h_stat_vsEta[0], g_stat_vsEta[0], etaRingWidth, - "EB_stat_vsEta",nBins_stat,statMin,statMax, - h2_IC_raw_phiNorm_even[0],h2_IC_raw_phiNorm_odd[0]); - - h_stat[0] -> Write(); - //for(unsigned int i = 0; i < h_stat_vsEta[0].size(); ++i) - // h_stat_vsEta[0].at(i) -> Write(); - g_stat_vsEta[0] -> Write("g_stat_vsEta_EB"); - - ResidualSpread(g_stat_vsEta[0],g_spread_vsEta[0],g_residual_vsEta[0]); - } - } - else - { - h_stat[-1] = new TH1F("h_stat_EEM","",nBins_stat,statMin,statMax); - h_stat[0] = new TH1F("h_stat_EE", "",nBins_stat,statMin,statMax); - h_stat[+1] = new TH1F("h_stat_EEP","",nBins_stat,statMin,statMax); - g_stat_vsEta[-1] = new TGraphErrors(); - g_stat_vsEta[0] = new TGraphErrors(); - g_stat_vsEta[+1] = new TGraphErrors(); - g_residual_vsEta[-1] = new TGraphErrors(); - g_residual_vsEta[0] = new TGraphErrors(); - g_residual_vsEta[+1] = new TGraphErrors(); - - if( evalStat ) - { - BookSpreadHistos_EE(h_stat, h_stat_vsEta, g_stat_vsEta, - eRings,etaRingWidth, - "EE_stat_vsEta",nBins_stat,statMin,statMax, - h2_IC_raw_phiNorm_even,h2_IC_raw_phiNorm_odd); - - h_stat[-1] -> Write(); - h_stat[0] -> Write(); - h_stat[+1] -> Write(); - //for(unsigned int i = 0; i < h_stat_vsEta[0].size(); ++i) - //{ - // h_stat_vsEta[-1].at(i) -> Write(); - // h_stat_vsEta[0].at(i) -> Write(); - // h_stat_vsEta[+1].at(i) -> Write(); - //} - g_stat_vsEta[-1] -> Write("g_stat_vsEta_EEM"); - g_stat_vsEta[0] -> Write("g_stat_vsEta_EE"); - g_stat_vsEta[+1] -> Write("g_stat_vsEta_EEP"); - - ResidualSpread(g_stat_vsEta[-1],g_spread_vsEta[-1],g_residual_vsEta[-1]); - ResidualSpread(g_stat_vsEta[0], g_spread_vsEta[0], g_residual_vsEta[0]); - ResidualSpread(g_stat_vsEta[+1],g_spread_vsEta[+1],g_residual_vsEta[+1]); - } - } - - outFile -> cd(); - - - - - - - //////////////////////////////////////// - // apply corrections for crack structure - //////////////////////////////////////// - std::cout << ">>> Draw plots for crack-corrected IC" << std::endl; - - TF1* pol0_EBM = new TF1("pol0_EBM","pol0",4.,16.); - TF1* pol0_EBP = new TF1("pol0_EBP","pol0",4.,16.); - - if( isEB == true ) - { - pol0_EBP -> SetLineColor(kRed+2); - pol0_EBM -> SetLineColor(kRed+2); - pol0_EBP -> SetLineStyle(7); - pol0_EBM -> SetLineStyle(7); - - g_avgIC_vsPhiFold_EBM -> Fit("pol0_EBM","QRS+"); - g_avgIC_vsPhiFold_EBP -> Fit("pol0_EBP","QRS+"); - - outFile -> cd("raw"); - - pol0_EBM -> Write(); - pol0_EBP -> Write(); - } - - outFile -> cd(); - - - - if( isEB == true ) - { - for(int ibin = 1; ibin <= h2_IC_crackCorr[0]->GetNbinsX(); ++ibin) - for(int jbin = 1; jbin <= h2_IC_crackCorr[0]->GetNbinsY(); ++jbin) - { - float IC = h2_IC_raw_phiNorm[0] -> GetBinContent(ibin,jbin); - - float phiRegionMin = h2_IC_crackCorr[0]->GetXaxis()->GetBinLowEdge(ibin); - int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ) % 20; - - float etaBinCenter = h2_IC_crackCorr[0]->GetYaxis()->GetBinCenter(jbin); - - double phiFold,ICPhiFoldAvg; - if( etaBinCenter < 0. ) - { - g_avgIC_vsPhiFold_EBM -> GetPoint(phiRegion,phiFold,ICPhiFoldAvg); - h2_IC_crackCorr[0] -> SetBinContent(ibin,jbin,IC*pol0_EBM->GetParameter(0)/ICPhiFoldAvg); - } - if( etaBinCenter > 0. ) - { - g_avgIC_vsPhiFold_EBP -> GetPoint(phiRegion,phiFold,ICPhiFoldAvg); - h2_IC_crackCorr[0] -> SetBinContent(ibin,jbin,IC*pol0_EBM->GetParameter(0)/ICPhiFoldAvg); - } - } - - NormalizeIC_EB(h2_IC_crackCorr[0],h2_IC_crackCorr_phiNorm[0],TT_centre[0]); - - outFile -> mkdir("crackCorr"); - outFile -> cd("crackCorr"); - } - - - - //-------------- - // spread histos - std::cout << ">>>>>> spread histos" << std::endl; - - TH1F* h_spread_crackCorr = new TH1F("h_spread_crackCorr","",nBins_spread,spreadMin,spreadMax); - std::vector h_spread_vsEta_crackCorr; - TGraphErrors* g_spread_vsEta_crackCorr = new TGraphErrors(); - - if( isEB == true ) - { - BookSpreadHistos_EB(h_spread_crackCorr, h_spread_vsEta_crackCorr, g_spread_vsEta_crackCorr, etaRingWidth, - "EB_spread_vsEta_crackCorr",nBins_spread,spreadMin,spreadMax, - h2_IC_crackCorr_phiNorm[0]); - - h_spread_crackCorr -> Write(); - //for(unsigned int i = 0; i < h_spread_vsEta_crackCorr.size(); ++i) - // h_spread_vsEta_crackCorr.at(i) -> Write(); - g_spread_vsEta_crackCorr -> Write("g_spread_vsEta_crackCorr"); - } - - - - //------------------- - // phi profile histos - std::cout << ">>>>>> phi profile histos" << std::endl; - - TH1F* h_phiAvgICSpread_crackCorr = new TH1F("h_phiAvgICSpread_crackCorr","",nBins_spread,spreadMin,spreadMax); - TGraphErrors* g_avgIC_vsPhi_crackCorr = new TGraphErrors(); - - if( isEB == true ) - { - PhiProfile(h_phiAvgICSpread_crackCorr, g_avgIC_vsPhi_crackCorr, phiRegionWidth, h2_IC_crackCorr_phiNorm[0]); - - h_phiAvgICSpread_crackCorr -> Write(); - g_avgIC_vsPhi_crackCorr -> Write("g_avgIC_vsPhi_crackCorr"); - } - - - - //------------------------ - // phi-fold profile histos - std::cout << ">>>>>> phi-fold profile histos" << std::endl; - - TGraphErrors* g_avgIC_vsPhiFold_crackCorr_EBM = new TGraphErrors(); - TGraphErrors* g_avgIC_vsPhiFold_crackCorr_EBP = new TGraphErrors(); - - if( isEB == true ) - { - PhiFoldProfile_EB(g_avgIC_vsPhiFold_crackCorr_EBM, g_avgIC_vsPhiFold_crackCorr_EBP, phiRegionWidth, h2_IC_crackCorr_phiNorm[0]); - - g_avgIC_vsPhiFold_crackCorr_EBM -> Write("g_avgIC_vsPhiFold_crackCorr_EBM"); - g_avgIC_vsPhiFold_crackCorr_EBP -> Write("g_avgIC_vsPhiFold_crackCorr_EBP"); - } - - - - //----------------------------- - // statistical precision histos - std::cout << ">>>>>> stat histos" << std::endl; - - std::vector h_stat_vsEta_crackCorr; - - TH1F* h_stat_crackCorr = new TH1F("h_stat_crackCorr","",nBins_stat,statMin,statMax); - TGraphErrors* g_stat_vsEta_crackCorr = new TGraphErrors(); - TGraphErrors* g_residual_vsEta_crackCorr = new TGraphErrors(); - - if( isEB == true) - { - - if( evalStat ) - { - BookSpreadHistos_EB(h_stat_crackCorr, h_stat_vsEta_crackCorr, g_stat_vsEta_crackCorr, etaRingWidth, - "EB_stat_vsEta_crackCorr",nBins_stat,statMin,statMax, - h2_IC_raw_phiNorm_even[0],h2_IC_raw_phiNorm_odd[0]); - - h_stat_crackCorr -> Write(); - //for(unsigned int i = 0; i < h_stat_vsEta_crackCorr.size(); ++i) - // h_stat_vsEta_crackCorr.at(i) -> Write(); - g_stat_vsEta_crackCorr -> Write("g_stat_vsEta_crackCorr"); - - - ResidualSpread(g_stat_vsEta_crackCorr, g_spread_vsEta_crackCorr,g_residual_vsEta_crackCorr); - g_residual_vsEta_crackCorr -> Write("g_residual_vsEta_crackCorr"); - } - } - outFile -> cd(); - - - - - - - ///////////////////////////////////////////////////////////// - // draw plots - ///////////////////////////////////////////////////////////// - - if( isEB == true ) - { - DrawICMap(h2_IC_raw_phiNorm[0], outputFolder+"/EB_h2_IC_raw_phiNorm", "png",isEB); - DrawICMap(h2_IC_crackCorr_phiNorm[0],outputFolder+"/EB_h2_IC_crackCorr_phiNorm","png",isEB); - - DrawSpreadHisto(h_spread[0], outputFolder+"/EB_h_spread", "f_EB_spread_vsEta", "png",isEB); - DrawSpreadHisto(h_spread_crackCorr,outputFolder+"/EB_h_spread_crackCorr","f_EB_spread_vsEta_crackCorr","png",isEB); - - DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EB_g_spread_vsEta", "png",isEB,g_stat_vsEta[0]); - DrawSpreadGraph(g_spread_vsEta_crackCorr,outputFolder+"/EB_g_spread_vsEta_crackCorr","png",isEB,g_stat_vsEta_crackCorr); - - DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EB_g_residual_vsEta", "png",isEB); - DrawResidualGraph(g_residual_vsEta_crackCorr,outputFolder+"/EB_g_residual_vsEta_crackCorr","png",isEB); - - DrawPhiAvgICSpread(h_phiAvgICSpread[0], outputFolder+"/EB_h_phiAvgICSpread", "png",isEB); - DrawPhiAvgICSpread(h_phiAvgICSpread_crackCorr,outputFolder+"/EB_h_phiAvgICSpread_crackCorr","png",isEB); - - DrawAvgICVsPhiGraph(g_avgIC_vsPhi[0], outputFolder+"/EB_g_avgIC_vsPhi", "png",kRed+2, isEB); - DrawAvgICVsPhiGraph(g_avgIC_vsPhi_crackCorr,outputFolder+"/EB_g_avgIC_vsPhi_crackCorr","png",kGreen+2,isEB); - - DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBM,g_avgIC_vsPhiFold_crackCorr_EBM,outputFolder+"/EBM_g_avgIC_vsPhiFold","png",isEB); - DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBP,g_avgIC_vsPhiFold_crackCorr_EBP,outputFolder+"/EBP_g_avgIC_vsPhiFold","png",isEB); - } - else - { - DrawICMap(h2_IC_raw_phiNorm[-1],outputFolder+"/EEM_h2_IC_raw_phiNorm","png",isEB); - DrawICMap(h2_IC_raw_phiNorm[+1],outputFolder+"/EEP_h2_IC_raw_phiNorm","png",isEB); - - DrawSpreadHisto(h_spread[-1],outputFolder+"/EEM_h_spread","f_EE_spread_vsEta_EEM","png",isEB); - DrawSpreadHisto(h_spread[0], outputFolder+"/EE_h_spread","f_EE_spread_vsEta_EE", "png",isEB); - DrawSpreadHisto(h_spread[+1],outputFolder+"/EEP_h_spread","f_EE_spread_vsEta_EEP","png",isEB); - - DrawSpreadGraph(g_spread_vsEta[-1],outputFolder+"/EEM_g_spread_vsEta","png",isEB,g_stat_vsEta[-1]); - DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EE_g_spread_vsEta","png",isEB,g_stat_vsEta[0]); - DrawSpreadGraph(g_spread_vsEta[+1],outputFolder+"/EEP_g_spread_vsEta","png",isEB,g_stat_vsEta[+1]); - - DrawResidualGraph(g_residual_vsEta[-1],outputFolder+"/EEM_g_residual_vsEta","png",isEB); - DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EE_g_residual_vsEta","png",isEB); - DrawResidualGraph(g_residual_vsEta[+1],outputFolder+"/EEP_g_residual_vsEta","png",isEB); - - DrawPhiAvgICSpread(h_phiAvgICSpread[-1],outputFolder+"/EEM_h_phiAvgICSpread","png",isEB); - DrawPhiAvgICSpread(h_phiAvgICSpread[+1],outputFolder+"/EEP_h_phiAvgICSpread","png",isEB); - - DrawAvgICVsPhiGraph(g_avgIC_vsPhi[-1],outputFolder+"/EEM_g_avgIC_vsPhi","png",kRed+2,isEB); - DrawAvgICVsPhiGraph(g_avgIC_vsPhi[+1],outputFolder+"/EEP_g_avgIC_vsPhi","png",kRed+2,isEB); - } - - outFile -> Close(); - - - - - - - //------------------------------------------------------ - // Dump IC in a txt file ---> IC from isolated electrons - - std::ofstream outTxt((outputFolder+"/"+outputTxt+"_relative.txt").c_str(),std::ios::out); - - //outTxt << "---------------------------------------------------------------" << std::endl; - //if( isEB == true ) - // outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iEta" - // << std::fixed << std::setprecision(0) << std::setw(10) << "iPhi" - // << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" - // << std::fixed << std::setprecision(6) << std::setw(15) << "IC" - // << std::fixed << std::setprecision(6) << std::setw(15) << "error" - // << std::endl; - //else - // outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iX" - // << std::fixed << std::setprecision(0) << std::setw(10) << "iY" - // << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" - // << std::fixed << std::setprecision(6) << std::setw(15) << "IC" - // << std::fixed << std::setprecision(6) << std::setw(15) << "error" - // << std::endl; - //outTxt << "---------------------------------------------------------------" << std::endl; - - - std::map h2_final; - - if( isEB == true) - { - h2_final[0] = h2_IC_crackCorr_phiNorm[0]; - } - else - { - h2_final[-1] = h2_IC_raw_phiNorm[-1]; - h2_final[+1] = h2_IC_raw_phiNorm[+1]; - } - - - if( isEB == true ) - { - for(int jbin = 1; jbin < h2_final[0]->GetNbinsY()+1; ++jbin) - { - float iEta = h2_final[0] -> GetYaxis() -> GetBinLowEdge(jbin); - - if( iEta == 0. ) continue; // skip ieta=0 - - double x, statPrec; - if( iEta < 0 ) - g_stat_vsEta[0] -> GetPoint(int(fabs(iEta+1)),x,statPrec); //mirroring of the folded precision - else - g_stat_vsEta[0] -> GetPoint(int(fabs(iEta-1)),x,statPrec); //mirroring of the folded precision - - for(int ibin = 1; ibin < h2_final[0]->GetNbinsX()+1; ++ibin) - { - float IC = h2_final[0] -> GetBinContent(ibin,jbin); - - outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[0]->GetYaxis()->GetBinLowEdge(jbin) - << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[0]->GetXaxis()->GetBinLowEdge(ibin) - << std::fixed << std::setprecision(0) << std::setw(10) << "0"; //iz for the barrel - - if( IC == 0. ) - { - outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." - << std::fixed << std::setprecision(6) << std::setw(15) << "999." - << std::endl; - } - else - { - outTxt << std::fixed << std::setprecision(6) << std::setw(15) << IC - << std::fixed << std::setprecision(6) << std::setw(15) << statPrec - << std::endl; - } - } - } - } - else - { - for(int iz = -1; iz <= 1; ++iz) - { - if( iz == 0 ) continue; - - for(int ix = 1; ix < h2_final[iz]->GetNbinsX()+1; ++ix) - { - for (int iy = 1; iy < h2_final[iz] -> GetNbinsY()+1; ++iy) - { - if( existingEE->GetBinContent(ix,iy) != 1 ) continue; - - float IC = h2_final[iz]->GetBinContent(ix,iy); - - double x,statPrec,y,sysPrec; - g_stat_vsEta[iz] -> GetPoint(int(eRings->GetEndcapRing(ix,iy,iz)),x,statPrec); - MCSystematic_EE -> GetPoint(int(eRings->GetEndcapRing(ix,iy,iz)),y,sysPrec); - - if( IC > 0. && IC < 2. ) - { - outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetXaxis()->GetBinLowEdge(ix) - << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetYaxis()->GetBinLowEdge(iy) - << std::fixed << std::setprecision(0) << std::setw(10) << iz - << std::fixed << std::setprecision(6) << std::setw(15) << IC - << std::fixed << std::setprecision(6) << std::setw(15) << sqrt( statPrec*statPrec + sysPrec*sysPrec ) - << std::endl; - } - else - { - outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetXaxis()->GetBinLowEdge(ix) - << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetYaxis()->GetBinLowEdge(iy) - << std::fixed << std::setprecision(0) << std::setw(10) << iz - << std::fixed << std::setprecision(6) << std::setw(15) << "-1." - << std::fixed << std::setprecision(6) << std::setw(15) << "999." - << std::endl; - } - } - } - } - } - - - - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp b/EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp deleted file mode 100644 index d993f4f5490..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/CompareICSet.cpp +++ /dev/null @@ -1,1087 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include "TStyle.h" -#include "TROOT.h" -#include "TH1F.h" -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TString.h" -#include "TGraphErrors.h" -#include "../interface/TEndcapRings.h" -#include "TLegend.h" -#include "TApplication.h" - -using namespace std; - -int main (int argc, char**argv){ - -if(argc!=3){ - std::cerr<<" Wrongs input "<Reset(); -gROOT->SetStyle("Plain"); - -gStyle->SetPadTickX(1); -gStyle->SetPadTickY(1); -gStyle->SetOptTitle(1); -gStyle->SetOptStat(0); -gStyle->SetFitFormat("6.3g"); -gStyle->SetPalette(1); -gStyle->SetOptTitle(0); - -gStyle->SetTextFont(42); -gStyle->SetTextSize(0.05); -gStyle->SetTitleFont(42,"xyz"); -gStyle->SetTitleSize(0.05); -gStyle->SetLabelFont(42,"xyz"); -gStyle->SetLabelSize(0.05); -gStyle->SetTitleXOffset(0.8); -gStyle->SetTitleYOffset(1.1); -gROOT->ForceStyle(); - - - -int iPhi, iEta, iz; -double ic, eic; - -/// Histo for first ic set -TString Name = Form("mapEB_%s",inputFile1.c_str()); -TH2F * map1_EB = new TH2F(Name,Name,360,1, 361, 171, -85, 86); -Name = Form("mapEEp_%s",inputFile1.c_str()); -TH2F * map1_EEp = new TH2F(Name,Name,100,1, 101, 100, 1, 101); -Name = Form("mapEEm_%s",inputFile1.c_str()); -TH2F * map1_EEm = new TH2F(Name,Name,100,1, 101, 100, 1, 101); - -std::cout<<" Opening first file ..... reading "<> iEta >> iPhi >> iz >> ic >> eic ; -if(iz==0) map1_EB->Fill(iPhi,iEta,ic); -if(iz==1) map1_EEp->Fill(iEta,iPhi,ic); -if(iz==-1)map1_EEm->Fill(iEta,iPhi,ic); -} -std::cout<<" End first file "<> iEta >> iPhi >> iz >> ic >> eic ; -if(iz==0) map2_EB->Fill(iPhi,iEta,ic); -if(iz==1) map2_EEp->Fill(iEta,iPhi,ic); -if(iz==-1) map2_EEm->Fill(iEta,iPhi,ic); -} -std::cout<<" End second file "<Clone("diffmapEB"); -diffmap_EB->Reset(); - -Name = Form("diffmapEEp"); -TH2F * diffmap_EEp = (TH2F*) map1_EEp->Clone("diffmapEEp"); -diffmap_EEp->Reset(); - -Name = Form("diffmapEEm"); -TH2F * diffmap_EEm = (TH2F*) map1_EEm->Clone("diffmapEEm"); -diffmap_EEm->Reset(); - -Name = Form("ratiomapEB"); -TH2F * ratiomap_EB = (TH2F*) map1_EB->Clone("ratiomapEB"); -ratiomap_EB->Reset(); - -Name = Form("ratiomapEEp"); -TH2F * ratiomap_EEp = (TH2F*) map1_EEp->Clone("ratiomapEEp"); -ratiomap_EEp->Reset(); - -Name = Form("ratiomapEEm"); -TH2F * ratiomap_EEm = (TH2F*) map1_EEm->Clone("ratiomapEEm"); -ratiomap_EEm->Reset(); - -Name = Form("diffHistEB"); -TH1F * diffHistEB = new TH1F(Name,Name,100,-0.6,0.6); -diffHistEB->SetLineWidth(2); - -Name = Form("diffHistEEp"); -TH1F * diffHistEEp = new TH1F(Name,Name,100,-0.6,0.6); -diffHistEEp->SetLineWidth(2); - -Name = Form("diffHistEEm"); -TH1F * diffHistEEm = new TH1F(Name,Name,100,-0.6,0.6); -diffHistEEm->SetLineWidth(2); - -Name = Form("correlationEB"); -TH2F * correlationEB = new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); - -Name = Form("correlationEEp"); -TH2F * correlationEEp= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); - -Name = Form("correlationEEm"); -TH2F * correlationEEm= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); - - - - - -for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ - for(int iEta=1; iEtaGetNbinsY()+1; iEta++){ - - if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map2_EB->GetBinContent(iPhi,iEta)==-1.){ - diffmap_EB->SetBinContent(iPhi,iEta,-1.); - ratiomap_EB->SetBinContent(iPhi,iEta,-1.); - continue;} - - diffmap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta)); - diffHistEB->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta)); - ratiomap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta)); - correlationEB->Fill(map1_EB->GetBinContent(iPhi,iEta),map2_EB->GetBinContent(iPhi,iEta)); - - } -} - -for(int ix =1; ixGetNbinsX()+1; ix++){ - for(int iy=1; iyGetNbinsY()+1; iy++){ - - if(map1_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==-1.){ - diffmap_EEp->SetBinContent(ix,iy,-1.); - ratiomap_EEp->SetBinContent(ix,iy,-1.); - continue;} - - diffmap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy)); - diffHistEEp->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy)); - ratiomap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy)); - correlationEEp->Fill(map1_EEp->GetBinContent(ix,iy),map2_EEp->GetBinContent(ix,iy)); - - } -} - -for(int ix =1; ixGetNbinsX()+1; ix++){ - for(int iy=1; iyGetNbinsY()+1; iy++){ - - if(map1_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==-1.){ - diffmap_EEm->SetBinContent(ix,iy,-1.); - ratiomap_EEm->SetBinContent(ix,iy,-1.); - continue;} - - diffmap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy)); - diffHistEEm->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy)); - ratiomap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy)); - correlationEEm->Fill(map1_EEm->GetBinContent(ix,iy),map2_EEm->GetBinContent(ix,iy)); - - } -} - - - -/// Profile along phi for EB: - -TGraphErrors *phiProjectionEB1 = new TGraphErrors(); -phiProjectionEB1->SetMarkerStyle(20); -phiProjectionEB1->SetMarkerSize(1); -phiProjectionEB1->SetMarkerColor(kBlue); - -TGraphErrors *phiProjectionEB2 = new TGraphErrors(); -phiProjectionEB2->SetMarkerStyle(20); -phiProjectionEB2->SetMarkerSize(1); -phiProjectionEB2->SetMarkerColor(kRed); - - -for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ - double sumEta=0, nEta=0; - - for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ - if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map1_EB->GetBinContent(iPhi,iEta)==0.) continue; - sumEta=sumEta+map1_EB->GetBinContent(iPhi,iEta); - nEta++; - } - phiProjectionEB1->SetPoint(iPhi-1,iPhi-1,sumEta/nEta); - phiProjectionEB1->SetPointError(iPhi-1,0.,0.002); - } - -for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ - double sumEta=0, nEta=0; - - for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ - if(map2_EB->GetBinContent(iPhi,iEta)==-1.||map2_EB->GetBinContent(iPhi,iEta)==0. ) continue; - sumEta=sumEta+map2_EB->GetBinContent(iPhi,iEta); - nEta++; - } - phiProjectionEB2->SetPoint(iPhi-1,iPhi-1,sumEta/nEta); - phiProjectionEB2->SetPointError(iPhi-1,0.,0.002); - } - -/// Profile along phi for EE+: - -TEndcapRings *eRings = new TEndcapRings(); -std::vector vectSum; -std::vector vectCounter; - -vectCounter.assign(360,0.); -vectSum.assign(360,0.); - - -TGraphErrors *phiProjectionEEp1 = new TGraphErrors(); -phiProjectionEEp1->SetMarkerStyle(20); -phiProjectionEEp1->SetMarkerSize(1); -phiProjectionEEp1->SetMarkerColor(kBlue); - -TGraphErrors *phiProjectionEEp2 = new TGraphErrors(); -phiProjectionEEp2->SetMarkerStyle(20); -phiProjectionEEp2->SetMarkerSize(1); -phiProjectionEEp2->SetMarkerColor(kRed); - - for(int ix=1; ixGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map1_EEp->GetBinContent(ix,iy)==-1. || map1_EEp->GetBinContent(ix,iy)==0. ) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); - vectSum.at(iPhi)=vectSum.at(iPhi)+map1_EEp->GetBinContent(ix,iy); - vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; - } - } - - int j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; - } - - for(unsigned int i=0; iGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map2_EEp->GetBinContent(ix,iy)==-1. ||map2_EEp->GetBinContent(ix,iy)==0.) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); - vectSum.at(iPhi)=vectSum.at(iPhi)+map2_EEp->GetBinContent(ix,iy); - vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; - } - } - - j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; - } - - for(unsigned int i=0; iSetMarkerStyle(20); -phiProjectionEEm1->SetMarkerSize(1); -phiProjectionEEm1->SetMarkerColor(kBlue); - -TGraphErrors *phiProjectionEEm2 = new TGraphErrors(); -phiProjectionEEm2->SetMarkerStyle(20); -phiProjectionEEm2->SetMarkerSize(1); -phiProjectionEEm2->SetMarkerColor(kRed); - - for(int ix=1; ixGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map1_EEm->GetBinContent(ix,iy)==-1. || map1_EEm->GetBinContent(ix,iy)==0. ) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); - vectSum.at(iPhi)=vectSum.at(iPhi)+map1_EEm->GetBinContent(ix,iy); - vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; - } - } - - j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; - } - for(unsigned int i=0; iGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map2_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==0.) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); - vectSum.at(iPhi)=vectSum.at(iPhi)+map2_EEm->GetBinContent(ix,iy); - vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; - } - } - - j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; -} - - for(unsigned int i=0; iSetMarkerStyle(20); -etaProjectionEB1->SetMarkerSize(1); -etaProjectionEB1->SetMarkerColor(kBlue); - -TGraphErrors *etaProjectionEB2 = new TGraphErrors(); -etaProjectionEB2->SetMarkerStyle(20); -etaProjectionEB2->SetMarkerSize(1); -etaProjectionEB2->SetMarkerColor(kRed); - - -for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ - double sumPhi=0, nPhi=0; - - for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ - if(map1_EB->GetBinContent(iPhi,iEta)==-1.) continue; - sumPhi=sumPhi+map1_EB->GetBinContent(iPhi,iEta); - nPhi++; - } - etaProjectionEB1->SetPoint(iEta-1,iEta-1,sumPhi/nPhi); - etaProjectionEB1->SetPointError(iEta-1,0.,0.002); - } - -for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ - double sumPhi=0, nPhi=0; - - for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ - if(map2_EB->GetBinContent(iPhi,iEta)==-1.) continue; - sumPhi=sumPhi+map2_EB->GetBinContent(iPhi,iEta); - nPhi++; - } - etaProjectionEB2->SetPoint(iEta-1,iEta-1,sumPhi/nPhi); - etaProjectionEB2->SetPointError(iEta-1,0.,0.002); - } - - -/// projection along eta for EE+: - -TGraphErrors *etaProjectionEEp1 = new TGraphErrors(); -etaProjectionEEp1->SetMarkerStyle(20); -etaProjectionEEp1->SetMarkerSize(1); -etaProjectionEEp1->SetMarkerColor(kBlue); - -TGraphErrors *etaProjectionEEp2 = new TGraphErrors(); -etaProjectionEEp2->SetMarkerStyle(20); -etaProjectionEEp2->SetMarkerSize(1); -etaProjectionEEp2->SetMarkerColor(kRed); - -vectCounter.clear(); -vectSum.clear(); -vectCounter.assign(360,0.); -vectSum.assign(360,0.); - - for(int ix=1; ixGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map1_EEp->GetBinContent(ix,iy)==-1. || map1_EEp->GetBinContent(ix,iy)==0.) continue; - int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); - if(iEta<0 || iEta>360)continue; - vectSum.at(iEta)=vectSum.at(iEta)+map1_EEp->GetBinContent(ix,iy); - vectCounter.at(iEta)=vectCounter.at(iEta)+1; - } - } - j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; - } - - for(unsigned int i=0; iGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map2_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==0. ) continue; - int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); - if(iEta<0 || iEta>360)continue; - vectSum.at(iEta)=vectSum.at(iEta)+map2_EEp->GetBinContent(ix,iy); - vectCounter.at(iEta)=vectCounter.at(iEta)+1; - } - } - - j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; - } - - for(unsigned int i=0; iSetMarkerStyle(20); -etaProjectionEEm1->SetMarkerSize(1); -etaProjectionEEm1->SetMarkerColor(kBlue); - -TGraphErrors *etaProjectionEEm2 = new TGraphErrors(); -etaProjectionEEm2->SetMarkerStyle(20); -etaProjectionEEm2->SetMarkerSize(1); -etaProjectionEEm2->SetMarkerColor(kRed); - - for(int ix=1; ixGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map1_EEm->GetBinContent(ix,iy)==-1.||map1_EEm->GetBinContent(ix,iy)==0.) continue; - int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); - if(iEta<0 || iEta>360)continue; - vectSum.at(iEta)=vectSum.at(iEta)+map1_EEm->GetBinContent(ix,iy); - vectCounter.at(iEta)=vectCounter.at(iEta)+1; - } - } - - j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; - } - - for(unsigned int i=0; iGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(map2_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==0.) continue; - int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); - if(iEta<0 || iEta>171)continue; - vectSum.at(iEta)=vectSum.at(iEta)+map2_EEm->GetBinContent(ix,iy); - vectCounter.at(iEta)=vectCounter.at(iEta)+1; - } - } - - j=0; - for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); - j++; - } - - for(unsigned int i=0; iGetN() ; i++){ - double x=0,y=0; - phiProjectionEB1->GetPoint(i,x,y); - phiProfileEB1->Fill(y); - } - -for(int i=0; iGetN() ; i++){ - double x=0,y=0; - phiProjectionEB2->GetPoint(i,x,y); - phiProfileEB2->Fill(y); - } - -TF1 *fgaus = new TF1("fgaus","gaus",-10,10); - -fgaus->SetParameter(1,1); -fgaus->SetParameter(2,phiProfileEB1->GetRMS()); -fgaus->SetRange(1-5*phiProfileEB1->GetRMS(),1+5*phiProfileEB1->GetRMS()); -fgaus->SetLineColor(kBlue); -phiProfileEB1->Fit("fgaus","QRME"); -cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); -fgaus->SetParameter(2,phiProfileEB2->GetRMS()); -fgaus->SetRange(1-5*phiProfileEB2->GetRMS(),1+5*phiProfileEB2->GetRMS()); -fgaus->SetLineColor(kRed); -phiProfileEB2->Fit("fgaus","QRME"); -cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ - double x=0,y=0; - phiProjectionEEp1->GetPoint(i,x,y); - phiProfileEEp1->Fill(y); - } - -for(int i=0; iGetN() ; i++){ - double x=0,y=0; - phiProjectionEEp2->GetPoint(i,x,y); - phiProfileEEp2->Fill(y); - } - -fgaus->SetParameter(1,1); -fgaus->SetParameter(2,phiProfileEEp1->GetRMS()); -fgaus->SetRange(1-5*phiProfileEEp1->GetRMS(),1+5*phiProfileEEp1->GetRMS()); -fgaus->SetLineColor(kBlue); -phiProfileEEp1->Fit("fgaus","QRME"); -cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); -fgaus->SetParameter(2,phiProfileEEp2->GetRMS()); -fgaus->SetRange(1-5*phiProfileEEp2->GetRMS(),1+5*phiProfileEEp2->GetRMS()); -fgaus->SetLineColor(kRed); -phiProfileEEp2->Fit("fgaus","QRME"); -cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ - double x=0,y=0; - phiProjectionEEm1->GetPoint(i,x,y); - phiProfileEEm1->Fill(y); - } - -for(int i=0; iGetN() ; i++){ - double x=0,y=0; - phiProjectionEEm2->GetPoint(i,x,y); - phiProfileEEm2->Fill(y); - } - -fgaus->SetParameter(1,1); -fgaus->SetParameter(2,phiProfileEEm1->GetRMS()); -fgaus->SetRange(1-5*phiProfileEEm1->GetRMS(),1+5*phiProfileEEm1->GetRMS()); -fgaus->SetLineColor(kBlue); -phiProfileEEm1->Fit("fgaus","QRME"); -cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); -fgaus->SetParameter(2,phiProfileEEm2->GetRMS()); -fgaus->SetRange(1-5*phiProfileEEm2->GetRMS(),1+5*phiProfileEEm2->GetRMS()); -fgaus->SetLineColor(kRed); -phiProfileEEm2->Fit("fgaus","QRME"); -cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ - double x=0,y=0; - etaProjectionEB1->GetPoint(i,x,y); - etaProfileEB1->Fill(y); - } - -for(int i=0; iGetN() ; i++){ - double x=0,y=0; - etaProjectionEB2->GetPoint(i,x,y); - etaProfileEB2->Fill(y); - } - -fgaus->SetParameter(1,1); -fgaus->SetParameter(2,etaProfileEB1->GetRMS()); -fgaus->SetRange(1-5*etaProfileEB1->GetRMS(),1+5*etaProfileEB1->GetRMS()); -fgaus->SetLineColor(kBlue); -etaProfileEB1->Fit("fgaus","QRME"); -cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); -fgaus->SetParameter(2,etaProfileEB2->GetRMS()); -fgaus->SetRange(1-5*etaProfileEB2->GetRMS(),1+5*etaProfileEB2->GetRMS()); -fgaus->SetLineColor(kRed); -etaProfileEB2->Fit("fgaus","QRME"); -cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ - double x=0,y=0; - etaProjectionEEp1->GetPoint(i,x,y); - etaProfileEEp1->Fill(y); - } - -for(int i=0; iGetN() ; i++){ - double x=0,y=0; - etaProjectionEEp2->GetPoint(i,x,y); - etaProfileEEp2->Fill(y); - } - -fgaus->SetParameter(1,1); -fgaus->SetParameter(2,etaProfileEEp1->GetRMS()); -fgaus->SetRange(1-5*etaProfileEEp1->GetRMS(),1+5*etaProfileEEp1->GetRMS()); -fgaus->SetLineColor(kBlue); -etaProfileEEp1->Fit("fgaus","QRME"); -cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); -fgaus->SetParameter(2,etaProfileEEp2->GetRMS()); -fgaus->SetRange(1-5*etaProfileEEp2->GetRMS(),1+5*etaProfileEEp2->GetRMS()); -fgaus->SetLineColor(kRed); -etaProfileEEp2->Fit("fgaus","QRME"); -cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ - double x=0,y=0; - etaProjectionEEm1->GetPoint(i,x,y); - etaProfileEEm1->Fill(y); - } - -for(int i=0; iGetN() ; i++){ - double x=0,y=0; - etaProjectionEEm2->GetPoint(i,x,y); - etaProfileEEm2->Fill(y); - } - -fgaus->SetParameter(1,1); -fgaus->SetParameter(2,etaProfileEEm1->GetRMS()); -fgaus->SetRange(1-5*etaProfileEEm1->GetRMS(),1+5*etaProfileEEm1->GetRMS()); -fgaus->SetLineColor(kBlue); -etaProfileEEm1->Fit("fgaus","QRME"); -cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); -fgaus->SetParameter(2,etaProfileEEm2->GetRMS()); -fgaus->SetRange(1-5*etaProfileEEm2->GetRMS(),1+5*etaProfileEEm2->GetRMS()); -fgaus->SetLineColor(kRed); -etaProfileEEm2->Fit("fgaus","QRME"); -cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetLeftMargin(0.1); - c[0]->SetRightMargin(0.13); - c[0]->SetGridx(); - - diffmap_EB->GetXaxis()->SetNdivisions(1020); - diffmap_EB->GetXaxis() -> SetLabelSize(0.03); - diffmap_EB->GetXaxis() ->SetTitle("i#phi"); - diffmap_EB->GetYaxis() ->SetTitle("i#eta"); - diffmap_EB->GetZaxis() ->SetRangeUser(-0.1,0.1); - diffmap_EB->Draw("COLZ"); - - c[1] = new TCanvas("histdiffEB","histdiffEB"); - c[1]->SetLeftMargin(0.1); - c[1]->SetRightMargin(0.13); - c[1]->SetLogy(); - - diffHistEB->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); - diffHistEB->Draw(); - - - c[2] = new TCanvas("hratioEB","hratioEB"); - c[2]->SetLeftMargin(0.1); - c[2]->SetRightMargin(0.13); - c[2]->SetGridx(); - - ratiomap_EB->GetXaxis()->SetNdivisions(1020); - ratiomap_EB->GetXaxis() -> SetLabelSize(0.03); - ratiomap_EB->GetXaxis() ->SetTitle("i#phi"); - ratiomap_EB->GetYaxis() ->SetTitle("i#eta"); - ratiomap_EB->GetZaxis() ->SetRangeUser(0.95,1.05); - ratiomap_EB->Draw("COLZ"); - - c[3] = new TCanvas("correlationEB","correlationEB"); - c[3]->SetLeftMargin(0.1); - c[3]->SetRightMargin(0.13); - c[3]->SetGridx(); - c[3]->SetGridy(); - - correlationEB->GetXaxis()->SetNdivisions(1020); - correlationEB->GetXaxis() -> SetLabelSize(0.03); - correlationEB->GetXaxis() ->SetTitle("c_{#pi}"); - correlationEB->GetYaxis() ->SetTitle("c_{ele}"); - correlationEB->Draw("COLZ"); - - - c[4] = new TCanvas("hdiffEEp","hdiffEEp"); - c[4]->SetLeftMargin(0.1); - c[4]->SetRightMargin(0.13); - c[4]->SetGridx(); - - diffmap_EEp->GetXaxis()->SetNdivisions(1020); - diffmap_EEp->GetXaxis() -> SetLabelSize(0.03); - diffmap_EEp->GetXaxis() ->SetTitle("ix"); - diffmap_EEp->GetYaxis() ->SetTitle("iy"); - diffmap_EEp->GetZaxis() ->SetRangeUser(-0.15,0.15); - diffmap_EEp->Draw("COLZ"); - - c[5] = new TCanvas("histdiffEEp","histdiffEEp"); - c[5]->SetLeftMargin(0.1); - c[5]->SetRightMargin(0.13); - c[5]->SetLogy(); - - diffHistEEp->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); - diffHistEEp->Draw(); - - c[6] = new TCanvas("hratioEEp","hratioEEp"); - c[6]->SetLeftMargin(0.1); - c[6]->SetRightMargin(0.13); - c[6]->SetGridx(); - - ratiomap_EEp->GetXaxis()->SetNdivisions(1020); - ratiomap_EEp->GetXaxis() -> SetLabelSize(0.03); - ratiomap_EEp->GetXaxis() ->SetTitle("ix"); - ratiomap_EEp->GetYaxis() ->SetTitle("iy"); - ratiomap_EEp->GetZaxis() ->SetRangeUser(0.9,1.1); - ratiomap_EEp->Draw("COLZ"); - - c[7] = new TCanvas("correlationEEp","correlationEEp"); - c[7]->SetLeftMargin(0.1); - c[7]->SetRightMargin(0.13); - c[7]->SetGridx(); - c[7]->SetGridy(); - - correlationEEp->GetXaxis()->SetNdivisions(1020); - correlationEEp->GetXaxis() -> SetLabelSize(0.03); - correlationEEp->GetXaxis() ->SetTitle("c_{#pi}"); - correlationEEp->GetYaxis() ->SetTitle("c_{ele}"); - correlationEEp->Draw("COLZ"); - - c[8] = new TCanvas("hdiffEEm","hdiffEEm"); - c[8]->SetLeftMargin(0.1); - c[8]->SetRightMargin(0.13); - c[8]->SetGridx(); - - diffmap_EEm->GetXaxis()->SetNdivisions(1020); - diffmap_EEm->GetXaxis() -> SetLabelSize(0.03); - diffmap_EEm->GetXaxis() ->SetTitle("ix"); - diffmap_EEm->GetYaxis() ->SetTitle("iy"); - diffmap_EEm->GetZaxis() ->SetRangeUser(-0.15,0.15); - diffmap_EEm->Draw("COLZ"); - - c[9] = new TCanvas("histdiffEEm","histdiffEEm"); - c[9]->SetLeftMargin(0.1); - c[9]->SetRightMargin(0.13); - c[9]->SetLogy(); - - diffHistEEm->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); - diffHistEEm->Draw(); - - - - c[10] = new TCanvas("hratioEEm","hratioEEm"); - c[10]->SetLeftMargin(0.1); - c[10]->SetRightMargin(0.13); - c[10]->SetGridx(); - - ratiomap_EEm->GetXaxis()->SetNdivisions(1020); - ratiomap_EEm->GetXaxis() -> SetLabelSize(0.03); - ratiomap_EEm->GetXaxis() ->SetTitle("ix"); - ratiomap_EEm->GetYaxis() ->SetTitle("iy"); - ratiomap_EEm->GetZaxis() ->SetRangeUser(0.9,1.1); - ratiomap_EEm->Draw("COLZ"); - - c[11] = new TCanvas("correlationEEm","correlationEEm"); - c[11]->SetLeftMargin(0.1); - c[11]->SetRightMargin(0.13); - c[11]->SetGridx(); - c[11]->SetGridy(); - - correlationEEm->GetXaxis()->SetNdivisions(1020); - correlationEEm->GetXaxis() -> SetLabelSize(0.03); - correlationEEm->GetXaxis() ->SetTitle("c_{#pi}"); - correlationEEm->GetYaxis() ->SetTitle("c_{ele}"); - correlationEEm->Draw("COLZ"); - - - c[12] = new TCanvas("phiProjectionEB","phiProjectionEB"); - c[12]->SetGridx(); - c[12]->SetGridy(); - phiProjectionEB1->GetHistogram()->GetYaxis()-> SetRangeUser(0.85,1.1); - phiProjectionEB1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); - phiProjectionEB1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); - phiProjectionEB1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); - phiProjectionEB1->Draw("apl"); - phiProjectionEB2->Draw("plsame"); - - TLegend * leg1 = new TLegend(0.75,0.75,0.89, 0.89); - leg1->AddEntry(phiProjectionEB1,"IC set 1","LP"); - leg1->AddEntry(phiProjectionEB2,"IC set 2","LP"); - leg1->SetFillColor(0); - leg1->Draw("same"); - - c[13] = new TCanvas("phiProjectionEEp","phiProjectionEEp"); - c[13]->SetGridx(); - c[13]->SetGridy(); - phiProjectionEEp1->GetHistogram()->GetYaxis()-> SetRangeUser(0.7,1.4); - phiProjectionEEp1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); - phiProjectionEEp1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); - phiProjectionEEp1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); - phiProjectionEEp1->Draw("apl"); - phiProjectionEEp2->Draw("plsame"); - - TLegend * leg2 = new TLegend(0.75,0.75,0.89, 0.89); - leg2->AddEntry(phiProjectionEEp1,"IC set 1","LP"); - leg2->AddEntry(phiProjectionEEp2,"IC set 2","LP"); - leg2->SetFillColor(0); - leg2->Draw("same"); - - - c[14] = new TCanvas("phiProjectionEEm","phiProjectionEEm"); - c[14]->SetGridx(); - c[14]->SetGridy(); - phiProjectionEEm1->GetHistogram()->GetYaxis()-> SetRangeUser(0.7,1.4); - phiProjectionEEm1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); - phiProjectionEEm1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); - phiProjectionEEm1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); - phiProjectionEEm1->Draw("apl"); - phiProjectionEEm2->Draw("plsame"); - - TLegend * leg3 = new TLegend(0.75,0.75,0.89, 0.89); - leg3->AddEntry(phiProjectionEEm1,"IC set 1","LP"); - leg3->AddEntry(phiProjectionEEm2,"IC set 2","LP"); - leg3->SetFillColor(0); - leg3->Draw("same"); - - c[15] = new TCanvas("etaProjectionEB","etaProjectionEB"); - c[15]->SetGridx(); - c[15]->SetGridy(); - etaProjectionEB1->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); - etaProjectionEB1->GetHistogram()->GetXaxis()-> SetRangeUser(0,171); - etaProjectionEB1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); - etaProjectionEB1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - etaProjectionEB1->Draw("apl"); - etaProjectionEB2->Draw("plsame"); - - TLegend * leg4 = new TLegend(0.75,0.75,0.89, 0.89); - leg4->AddEntry(etaProjectionEB1,"IC set 1","LP"); - leg4->AddEntry(etaProjectionEB2,"IC set 2","LP"); - leg4->SetFillColor(0); - leg1->Draw("same"); - - c[16] = new TCanvas("etaProjectionEEp","etaProjectionEEp"); - c[16]->SetGridx(); - c[16]->SetGridy(); - etaProjectionEEp1->GetHistogram()->GetYaxis()-> SetRangeUser(0.55,1.5); - etaProjectionEEp1->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); - etaProjectionEEp1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); - etaProjectionEEp1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - etaProjectionEEp1->Draw("apl"); - etaProjectionEEp2->Draw("plsame"); - - TLegend * leg5 = new TLegend(0.75,0.75,0.89, 0.89); - leg5->AddEntry(etaProjectionEEp1,"IC set 1","LP"); - leg5->AddEntry(etaProjectionEEp2,"IC set 2","LP"); - leg5->SetFillColor(0); - leg5->Draw("same"); - - - c[17] = new TCanvas("etaProjectionEEm","etaProjectionEEm"); - c[17]->SetGridx(); - c[17]->SetGridy(); - etaProjectionEEm1->GetHistogram()->GetYaxis()-> SetRangeUser(0.55,1.5); - etaProjectionEEm1->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); - etaProjectionEEm1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); - etaProjectionEEm1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - etaProjectionEEm1->Draw("apl"); - etaProjectionEEm2->Draw("plsame"); - - TLegend * leg6 = new TLegend(0.75,0.75,0.89, 0.89); - leg6->AddEntry(etaProjectionEEm1,"IC set 1","LP"); - leg6->AddEntry(etaProjectionEEm2,"IC set 2","LP"); - leg6->SetFillColor(0); - leg6->Draw("same"); - - c[18] = new TCanvas("phiProfileEB","phiProfileEB"); - c[18]->SetGridx(); - c[18]->SetGridy(); - phiProfileEB1->GetXaxis()->SetTitle("#bar{IC}"); - phiProfileEB1->SetLineColor(kBlue); - phiProfileEB1->SetMarkerSize(0.8); - phiProfileEB1->SetLineWidth(2); - phiProfileEB2->SetLineColor(kRed); - phiProfileEB2->SetMarkerSize(0.8); - phiProfileEB2->SetLineWidth(2); - phiProfileEB1->Draw(); - phiProfileEB2->Draw("same"); - - TLegend * leg7 = new TLegend(0.6,0.7,0.89, 0.89); - leg7->SetFillColor(0); - leg7->AddEntry(phiProfileEB1,"EB Projection I set ", "LP"); - leg7->AddEntry(phiProfileEB2,"EB Projection II set ", "LP"); - leg7->Draw("same"); - - c[19] = new TCanvas("phiProfileEEp","phiProfileEEp"); - c[19]->SetGridx(); - c[19]->SetGridy(); - phiProfileEEp1->GetXaxis()->SetTitle("#bar{IC}"); - phiProfileEEp1->SetLineColor(kBlue); - phiProfileEEp1->SetMarkerSize(0.8); - phiProfileEEp1->SetLineWidth(2); - phiProfileEEp2->SetLineColor(kRed); - phiProfileEEp2->SetMarkerSize(0.8); - phiProfileEEp2->SetLineWidth(2); - phiProfileEEp1->Draw(); - phiProfileEEp2->Draw("same"); - - TLegend * leg8 = new TLegend(0.6,0.7,0.89, 0.89); - leg8->SetFillColor(0); - leg8->AddEntry(phiProfileEEp1,"EE+ Projection I set ", "LP"); - leg8->AddEntry(phiProfileEEp2,"EE+ Projection II set ", "LP"); - leg8->Draw("same"); - - c[20] = new TCanvas("phiProfileEEm","phiProfileEEm"); - c[20]->SetGridx(); - c[20]->SetGridy(); - phiProfileEEm1->GetXaxis()->SetTitle("#bar{IC}"); - phiProfileEEm1->SetLineColor(kBlue); - phiProfileEEm1->SetMarkerSize(0.8); - phiProfileEEm1->SetLineWidth(2); - phiProfileEEm2->SetLineColor(kRed); - phiProfileEEm2->SetMarkerSize(0.8); - phiProfileEEm2->SetLineWidth(2); - phiProfileEEm1->Draw(); - phiProfileEEm2->Draw("same"); - - TLegend * leg9 = new TLegend(0.6,0.7,0.89, 0.89); - leg9->SetFillColor(0); - leg9->AddEntry(phiProfileEEm1,"EE- Projection I set ", "LP"); - leg9->AddEntry(phiProfileEEm2,"EE- Projection II set ", "LP"); - leg9->Draw("same"); - - c[21] = new TCanvas("etaProfileEB","etaProfileEB"); - c[21]->SetGridx(); - c[21]->SetGridy(); - etaProfileEB1->GetXaxis()->SetTitle("#bar{IC}"); - etaProfileEB1->SetLineColor(kBlue); - etaProfileEB1->SetMarkerSize(0.8); - etaProfileEB1->SetLineWidth(2); - etaProfileEB2->SetLineColor(kRed); - etaProfileEB2->SetMarkerSize(0.8); - etaProfileEB2->SetLineWidth(2); - etaProfileEB1->Draw(); - etaProfileEB2->Draw("same"); - - TLegend * leg10 = new TLegend(0.6,0.7,0.89, 0.89); - leg10->SetFillColor(0); - leg10->AddEntry(etaProfileEB1,"EB Projection I set ", "LP"); - leg10->AddEntry(etaProfileEB2,"EB Projection II set ", "LP"); - leg10->Draw("same"); - - c[22] = new TCanvas("etaProfileEEp","etaProfileEEp"); - c[22]->SetGridx(); - c[22]->SetGridy(); - etaProfileEEp1->GetXaxis()->SetTitle("#bar{IC}"); - etaProfileEEp1->SetLineColor(kBlue); - etaProfileEEp1->SetMarkerSize(0.8); - etaProfileEEp1->SetLineWidth(2); - etaProfileEEp2->SetLineColor(kRed); - etaProfileEEp2->SetMarkerSize(0.8); - etaProfileEEp2->SetLineWidth(2); - etaProfileEEp1->Draw(); - etaProfileEEp2->Draw("same"); - - TLegend * leg11 = new TLegend(0.6,0.7,0.89, 0.89); - leg11->SetFillColor(0); - leg11->AddEntry(phiProfileEEp1,"EE+ Projection I set ", "LP"); - leg11->AddEntry(phiProfileEEp2,"EE+ Projection II set ", "LP"); - leg11->Draw("same"); - - c[23] = new TCanvas("etaProfileEEm","etaProfileEEm"); - c[23]->SetGridx(); - c[23]->SetGridy(); - etaProfileEEm1->GetXaxis()->SetTitle("#bar{IC}"); - etaProfileEEm1->SetLineColor(kBlue); - etaProfileEEm1->SetMarkerSize(0.8); - etaProfileEEm1->SetLineWidth(2); - etaProfileEEm2->SetLineColor(kRed); - etaProfileEEm2->SetMarkerSize(0.8); - etaProfileEEm2->SetLineWidth(2); - etaProfileEEm1->Draw(); - etaProfileEEm2->Draw("same"); - - TLegend * leg12 = new TLegend(0.6,0.7,0.89, 0.89); - leg12->SetFillColor(0); - leg12->AddEntry(phiProfileEEm1,"EE- Projection I set ", "LP"); - leg12->AddEntry(phiProfileEEm2,"EE- Projection II set ", "LP"); - leg12->Draw("same"); - -theApp->Run(); - -return 0; - -} - - diff --git a/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp b/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp deleted file mode 100644 index 881e2e8d9d8..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EB.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/// Stand-alone program for compare calibration result obtained on MC with -/// the original configuration for EB Input: IC 2D map after L3 calib - -#include -#include "TH2F.h" -#include "TH1F.h" -#include "TCanvas.h" -#include "TFile.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TGraphErrors.h" -#include "TF1.h" -#include "TApplication.h" - -#include "../../NtuplePackage/interface/ntpleUtils.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - -using namespace std; - - -int main(int argc, char**argv){ - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(0); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gROOT->ForceStyle(); - - /// Input File MCTruth IC Map , RECO IC map, MC IC set after calibration (Usually set with miscalibration 5%) - /// and StatPrecision IC coefficient obtained from CalibrationBarrel.cpp - - if(argc != 2){ - std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("Options"); - - std::string inputFile = "NULL"; - if(Options.existsAs("inputFile")) - inputFile = Options.getParameter("inputFile"); - - std::string fileMCTruth = "NULL"; - if(Options.existsAs("fileMCTruth")) - fileMCTruth = Options.getParameter("fileMCTruth"); - - std::string fileMCRecoIC = "NULL"; - if(Options.existsAs("fileMCRecoIC")) - fileMCRecoIC = Options.getParameter("fileMCRecoIC"); - - std::string fileStatPrecision = "NULL"; - if(Options.existsAs("fileStatPrecision")) - fileStatPrecision = Options.getParameter("fileStatPrecision"); - - TApplication* theApp = new TApplication("Application",&argc, argv); - - - TFile *f1 = TFile::Open(fileMCTruth.c_str()); - TFile *f2 = TFile::Open(fileMCRecoIC.c_str()); - TFile *f3 = TFile::Open(inputFile.c_str()); - TFile *f4 = TFile::Open(fileStatPrecision.c_str()); - - if( f1 ==0 || f2 == 0 || f3 == 0 || f4 == 0) return -1; - - TH2F *hcmapMcT = (TH2F*)f1->Get("h_scale_map"); - TH2F *hcmapMcR = (TH2F*)f2->Get("h_scale_map"); - - TH2F * hcmap1 = (TH2F*)hcmapMcT->Clone("hcmap1"); - hcmap1->Reset(); - TH1F * hringdiff = new TH1F("hringdiff","difference of ring average",100,-0.1,0.1); - - for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ - for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ - hcmap1->SetBinContent(ibin,jbin,hcmapMcT->GetBinContent(ibin,jbin)/hcmapMcR->GetBinContent(ibin,jbin)); - } - } - - - TH2F * miscalib_map = (TH2F*) f3 -> Get("h_scalib_EB"); - TH2F *hcL3 = (TH2F*)f3->Get("h_scale_map"); - - TH2F *hcmap2 = (TH2F*)hcL3 ->Clone("hcmap2"); - hcmap2->Reset(); - - for (int jbin = 1; jbin < hcmap2-> GetNbinsY()+1; jbin++){ - for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ - hcmap2->SetBinContent(ibin,jbin,miscalib_map->GetBinContent(ibin,jbin)*hcL3->GetBinContent(ibin,jbin)); - } - } - - /// IC Histogramm in Eta ring and 2D map difference - TH2F * h2 = new TH2F("h2","h2",400,0.5,1.5,400,0.5,1.5); - TH2F * h2diff = (TH2F*)hcmap1->Clone("h2diff"); - h2diff->Reset(); - TH1F *hdiff = new TH1F("hdiff", "hdiff", 400,-0.5,0.5); - - char hname[100]; - - TH1F *hspread[172]; - for (int jbin = 1; jbin < hcmap1-> GetNbinsY()+1; jbin++){ - int etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); - sprintf(hname,"hspread_ring_ieta%02d",etaring); - hspread[jbin-1]= new TH1F(hname, hname, 400,-0.5,0.5); - } - - for (int jbin = 1; jbin < hcmap1-> GetNbinsY()+1; jbin++){ - float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); - for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ - float c1 = hcmap1->GetBinContent(ibin,jbin); - float c2 = hcmap2->GetBinContent(ibin,jbin); - if (c1!=0 && c2!=0 ){ - hspread[jbin-1]->Fill( c1-c2 ); - h2->Fill(c1,c2); - h2diff->SetBinContent(ibin,jbin,c1-c2); - if (fabs(etaring) < 40) hdiff->Fill(c1-c2); - - } - } - } - - /// Final Plot in eta ring (stat prescision and scale) - TGraphErrors *sigma_vs_ieta = new TGraphErrors(); - sigma_vs_ieta->SetMarkerStyle(20); - sigma_vs_ieta->SetMarkerSize(1); - sigma_vs_ieta->SetMarkerColor(kBlue+2); - - TGraphErrors *rms_vs_ieta = new TGraphErrors(); - rms_vs_ieta->SetMarkerStyle(24); - rms_vs_ieta->SetMarkerSize(1); - rms_vs_ieta->SetMarkerColor(kBlue+2); - - TGraphErrors *scale_vs_ieta = new TGraphErrors(); - scale_vs_ieta->SetMarkerStyle(20); - scale_vs_ieta->SetMarkerSize(1); - scale_vs_ieta->SetMarkerColor(kBlue+2); - - /// Gaussian Fit of spread coefficient dstribution - TF1 *fgaus = new TF1("fgaus","gaus",-1,1); - int np = 0; - for (int i = 1; i < hcmap1-> GetNbinsY()+1; i++){ - float etaring = hcmap1-> GetYaxis()->GetBinCenter(i); - if (etaring==0.5) continue; - if ( hspread[i-1]->GetEntries() == 0) {sigma_vs_ieta-> SetPoint(np,etaring,-100);np++;continue;} - hspread[i-1]->Fit("fgaus","Q"); - sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)); - sigma_vs_ieta-> SetPointError(np,0,fgaus->GetParError(2)); - rms_vs_ieta -> SetPoint(np,etaring, hspread[i-1]->GetRMS()); - rms_vs_ieta -> SetPointError(np,0,hspread[i-1]->GetRMSError() ); - scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); - scale_vs_ieta-> SetPointError(np,0,fgaus->GetParError(1)); - if( fabs(etaring) < 20 ){hringdiff->Fill( fgaus->GetParameter(1) );} - np++; - } - - /// Final Plot - TGraphErrors* gr_stat_prec = (TGraphErrors*) f4->Get("gr_stat_prec"); - TCanvas *csigma = new TCanvas("csigma","csigma"); - csigma->SetGridx(); - csigma->SetGridy(); - sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); - sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); - sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); - sigma_vs_ieta->Draw("ap"); - rms_vs_ieta->Draw("psame"); - gr_stat_prec->Draw("psame"); - - - /// Residual Plot (spread - statistical precision) - TGraphErrors* residual = new TGraphErrors(); - - for(int pp=0; pp< gr_stat_prec->GetN(); pp++){ - double eta1, eta2,tot, stat; - gr_stat_prec->GetPoint(pp, eta1, stat); - sigma_vs_ieta->GetPoint(pp, eta2, tot); - if(eta1 != eta2){cout<<"error different ring "< 0) res = sqrt(res); - else res = -sqrt(fabs(res)); - double errres = sqrt( pow(tot*sigma_vs_ieta->GetErrorY(pp),2) +pow(stat*gr_stat_prec->GetErrorY(pp),2))/fabs(res); - residual->SetPoint(pp,eta1,res); - residual->SetPointError(pp,0,errres); - } - - /// Residual spread plot - TCanvas *cres = new TCanvas("cres","cresidual"); - cres->SetGridx(); - cres->SetGridy(); - residual->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); - residual->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - residual->GetHistogram()->GetYaxis()-> SetTitle("residual"); - residual->GetHistogram()->GetXaxis()-> SetTitle("ieta"); - residual ->SetMarkerStyle(20); - residual->SetMarkerSize(1); - residual->SetMarkerColor(kGreen+2); - residual->GetYaxis()->SetTitle("residual"); - residual->GetXaxis()->SetTitle("i#eta"); - residual->Draw("ap"); - - /// scale vs eta plot - TCanvas *cscale = new TCanvas("cscale","cscale"); - cscale->SetGridx(); - cscale->SetGridy(); - scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); - scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); - scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); - scale_vs_ieta->Draw("ap"); - - /// IC Diff map - TCanvas *cmap2 = new TCanvas("cmap2","cmap2",500,500); - cmap2->SetGridx(); - cmap2->SetGridy(); - cmap2 -> cd(); - cmap2->SetLeftMargin(0.1); - cmap2->SetRightMargin(0.15); - h2->GetXaxis()->SetRangeUser(0.85,1.15); - h2->GetYaxis()->SetRangeUser(0.85,1.15); - h2->GetXaxis()->SetTitle("C_{1}"); - h2->GetYaxis()->SetTitle("C_{2}"); - h2->Draw("colz"); - - TCanvas *cdiff = new TCanvas("cdiff","cdiff",700,500); - cdiff->SetGridx(); - cdiff->SetGridy(); - cdiff -> cd(); - cdiff->SetLeftMargin(0.1); - cdiff->SetRightMargin(0.15); - h2diff->GetZaxis()->SetRangeUser(-0.05,0.05); - h2diff->GetXaxis()->SetTitle("i#phi"); - h2diff->GetYaxis()->SetTitle("i#eta"); - h2diff->Draw("colz"); - - theApp->Run(); - - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp b/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp deleted file mode 100644 index 25c0d76a8bf..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/CompareSCalibMCTruth_EE.cpp +++ /dev/null @@ -1,612 +0,0 @@ -/// Stand-alone program for compare calibration result obtained on MC with -/// the original configuration for EE Input: IC 2D map after L3 calib - -#include -#include -#include -#include "TH2F.h" -#include "TH1F.h" -#include "TCanvas.h" -#include "TFile.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TGraphErrors.h" -#include "TF1.h" -#include "TApplication.h" -#include "../../NtuplePackage/interface/ntpleUtils.h" -#include "../interface/TEndcapRings.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - -using namespace std; - -int main (int argc, char **argv) { - - /// Input File MCTruth IC Map , RECO IC map, MC IC set after calibration (Usually set with miscalibration 5%) - /// and StatPrecision IC coefficient obtained from DrawCalibrationPlotsEE.C - - if(argc != 2){ - std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("Options"); - - std::string inputFile = "NULL"; - if(Options.existsAs("inputFile")) - inputFile = Options.getParameter("inputFile"); - - std::string inputMomentumScale = "NULL"; - if(Options.existsAs("inputMomentumScale")) - inputMomentumScale = Options.getParameter("inputMomentumScale"); - - std::string fileMCTruth = "NULL"; - if(Options.existsAs("fileMCTruth")) - fileMCTruth = Options.getParameter("fileMCTruth"); - - std::string fileMCRecoIC = "NULL"; - if(Options.existsAs("fileMCRecoIC")) - fileMCRecoIC = Options.getParameter("fileMCRecoIC"); - - std::string fileStatPrecision = "NULL"; - if(Options.existsAs("fileStatPrecision")) - fileStatPrecision = Options.getParameter("fileStatPrecision"); - - std::string outputFile = "NULL"; - if(Options.existsAs("outputFile")) - outputFile = Options.getParameter("outputFile"); - - TApplication* theApp = new TApplication("Application",&argc, argv); - - TFile *f1 = TFile::Open(fileMCTruth.c_str()); - TFile *f2 = TFile::Open(fileMCRecoIC.c_str()); - /// L3 result MC endcap - TFile *f3 = TFile::Open(inputFile.c_str()); - /// File form momentum scale correction - TFile* input = new TFile(inputMomentumScale.c_str()); - /// Statistical Precision map - TFile *f4 = TFile::Open(fileStatPrecision.c_str()); - - if(f1==0 || f2==0 || f3==0 || f4==0) return -1; - - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gROOT->ForceStyle(); - - - /// input coeff map for EEP and EEM - - TH2F *hcmapMcT_EEP = (TH2F*)f1->Get("h_scale_EEP"); - TH2F *hcmapMcT_EEM = (TH2F*)f1->Get("h_scale_EEM"); - TH2F *hcmapMcR_EEP = (TH2F*)f2->Get("h_scale_EEP"); - TH2F *hcmapMcR_EEM = (TH2F*)f2->Get("h_scale_EEM"); - - TH2F * hcmap_EEP = (TH2F*)hcmapMcT_EEP->Clone("hcmap_EEP"); - TH2F * hcmap_EEM = (TH2F*)hcmapMcT_EEM->Clone("hcmap_EEM"); - - hcmap_EEP->Reset(); - hcmap_EEM->Reset(); - - for (int jbin = 1; jbin < hcmap_EEP-> GetNbinsY(); jbin++){ - for (int ibin = 1; ibin < hcmap_EEM-> GetNbinsX()+1; ibin++){ - - if(hcmapMcT_EEP->GetBinContent(ibin,jbin)!=0 && hcmapMcR_EEP->GetBinContent(ibin,jbin)!=0) - hcmap_EEP->SetBinContent(ibin,jbin,hcmapMcT_EEP->GetBinContent(ibin,jbin)/hcmapMcR_EEP->GetBinContent(ibin,jbin)); - if(hcmapMcT_EEM->GetBinContent(ibin,jbin)!=0 && hcmapMcR_EEM->GetBinContent(ibin,jbin)!=0) - hcmap_EEM->SetBinContent(ibin,jbin,hcmapMcT_EEM->GetBinContent(ibin,jbin)/hcmapMcR_EEM->GetBinContent(ibin,jbin)); - } - } - - /// Scalib and L3 map Normalized for EE+ and EE- - - TH2F * miscalib_map_EEP = (TH2F*) f3 -> Get("h_scalib_EEP"); - TH2F * miscalib_map_EEM = (TH2F*) f3 -> Get("h_scalib_EEM"); - - TH2F *hcL3_EEP = (TH2F*)f3->Get("h_scale_map_EEP"); - TH2F *hcL3_EEM = (TH2F*)f3->Get("h_scale_map_EEM"); - - TH2F *hcmap2_EEP = (TH2F*)hcL3_EEP ->Clone("hcmap2_EEP"); - TH2F *hcmap2_EEM = (TH2F*)hcL3_EEM ->Clone("hcmap2_EEM"); - - hcmap2_EEP->Reset(); - hcmap2_EEM->Reset(); - - - /// Momentum scale correction - - TGraphErrors* g_EoP_EE = (TGraphErrors*) input->Get("g_EoP_EE_0"); - TGraphErrors* PhiProjectionEEp = new TGraphErrors(); - TGraphErrors* PhiProjectionEEm = new TGraphErrors(); - - PhiProjectionEEp->SetMarkerStyle(20); - PhiProjectionEEp->SetMarkerSize(1); - PhiProjectionEEp->SetMarkerColor(kRed); - - PhiProjectionEEm->SetMarkerStyle(20); - PhiProjectionEEm->SetMarkerSize(1); - PhiProjectionEEm->SetMarkerColor(kBlue); - - - TEndcapRings *eRings = new TEndcapRings(); - std::vector vectSum; - std::vector vectCounter; - - vectCounter.assign(g_EoP_EE->GetN(),0.); - vectSum.assign(g_EoP_EE->GetN(),0.); - - /// EE+ and EE- projection - - for(int ix=1; ixGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(hcL3_EEM->GetBinContent(ix,iy)==0) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)/(360./g_EoP_EE->GetN())); - vectSum.at(iPhi)=vectSum.at(iPhi)+hcL3_EEM->GetBinContent(ix,iy); - vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; - } - } - - - for(unsigned int i=0; iSetPoint(i,int(i*(360./g_EoP_EE->GetN())),vectSum.at(i)/vectCounter.at(i)); - - for(unsigned int i=0; iGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(hcL3_EEP->GetBinContent(ix,iy)==0) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)/(360./g_EoP_EE->GetN())); - vectSum.at(iPhi)=vectSum.at(iPhi)+hcL3_EEP->GetBinContent(ix,iy); - vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; - } - } - - - for(unsigned int i=0; iSetPoint(i,int(i*(360./g_EoP_EE->GetN())),vectSum.at(i)/vectCounter.at(i)); - - for(unsigned int i=0; iClone("mapMomentumCorrected_EEM"); - mapMomentumCorrected[1] = (TH2F*) hcL3_EEP->Clone("mapMomentumCorrected_EEP"); - mapMomentumCorrected[0]->Reset(); - mapMomentumCorrected[1]->Reset(); - - for(int ix=1; ixGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(hcL3_EEM->GetBinContent(ix,iy)==0) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); - double xphi,yphi; - g_EoP_EE->GetPoint(int(iPhi/(360./PhiProjectionEEm->GetN())),xphi,yphi); - mapMomentumCorrected[0]->SetBinContent(ix,iy,hcL3_EEM->GetBinContent(ix,iy)*yphi); - } - } - - for(int ix=1; ixGetNbinsX()+1;ix++){ - for(int iy=1; iyGetNbinsY()+1;iy++){ - if(hcL3_EEP->GetBinContent(ix,iy)==0) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); - double xphi,yphi; - g_EoP_EE->GetPoint(int(iPhi/(360./PhiProjectionEEp->GetN())),xphi,yphi); - mapMomentumCorrected[1]->SetBinContent(ix,iy,hcL3_EEP->GetBinContent(ix,iy)*yphi); - } - } - -/// Use momentum map corrected - - for (int jbin = 1; jbin < mapMomentumCorrected[1]-> GetNbinsY()+1; jbin++){ - for (int ibin = 1; ibin < mapMomentumCorrected[1]-> GetNbinsX()+1; ibin++){ - if(miscalib_map_EEP->GetBinContent(ibin,jbin)!=0 && mapMomentumCorrected[1]->GetBinContent(ibin,jbin)!=0) - hcmap2_EEP->SetBinContent(ibin,jbin,miscalib_map_EEP->GetBinContent(ibin,jbin)*mapMomentumCorrected[1]->GetBinContent(ibin,jbin)); - if(miscalib_map_EEM->GetBinContent(ibin,jbin)!=0 && mapMomentumCorrected[0]->GetBinContent(ibin,jbin)!=0) - hcmap2_EEM->SetBinContent(ibin,jbin,miscalib_map_EEM->GetBinContent(ibin,jbin)*mapMomentumCorrected[0]->GetBinContent(ibin,jbin)); - } - } - - - /// output histos - - TH2F * h2_EEP = new TH2F("h2_EEP","h2_EEP",400,0.5,1.5,400,0.5,1.5); - TH2F * h2_EEM = new TH2F("h2_EEM","h2_EEM",400,0.5,1.5,400,0.5,1.5); - - TH2F * h2diff_EEP = (TH2F*)hcmap_EEP->Clone("h2diff_EEP"); - TH2F * h2diff_EEM = (TH2F*)hcmap_EEM->Clone("h2diff_EEM"); - - h2diff_EEP->Reset(); - h2diff_EEM->Reset(); - - char hname[100]; - - TH1F *hspread_EEP[40]; - TH1F *hspread_EEM[40]; - TH1F *hspread_All[40]; - - /// ring geometry for the endcap - - TH2F *hrings_EEP; - TH2F *hrings_EEM; - - hrings_EEP = (TH2F*)hcmap2_EEP->Clone("hringsEEP"); - hrings_EEM = (TH2F*)hcmap2_EEM->Clone("hringsEEM"); - hrings_EEP ->Reset(); - hrings_EEM ->Reset(); - - FILE *fRing; - fRing = fopen("macros/eerings.dat","r"); - int x,y,z,ir; - while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { - if(z>0) hrings_EEP->Fill(x,y,ir); - if(z<0) hrings_EEM->Fill(x,y,ir); - } - - /// spread IC histos - for (int jbin = 0; jbin < 40; jbin++){ - sprintf(hname,"hspread_ring_EEP_%02d",jbin); - hspread_EEP[jbin]= new TH1F(hname, hname, 75,0.5,1.5); - sprintf(hname,"hspread_ring_EEM_%02d",jbin); - hspread_EEM[jbin]= new TH1F(hname, hname, 75,0.5,1.5); - sprintf(hname,"hspread_ring_All_%02d",jbin); - hspread_All[jbin]= new TH1F(hname, hname, 75,0.5,1.5); - - } - - for (int jbin = 1; jbin < hcmap_EEP-> GetNbinsY()+1; jbin++){ - for (int ibin = 1; ibin < hcmap_EEP-> GetNbinsX()+1; ibin++){ - - int mybin_EEP = hcmap_EEP -> FindBin(ibin,jbin); - int ring_EEP = int(hrings_EEP-> GetBinContent(mybin_EEP)); - float c1_EEP = hcmap_EEP->GetBinContent(mybin_EEP); - float c2_EEP = hcmap2_EEP->GetBinContent(mybin_EEP); - - int mybin_EEM = hcmap_EEM -> FindBin(ibin,jbin); - int ring_EEM = int(hrings_EEM-> GetBinContent(mybin_EEM)); - float c1_EEM = hcmap_EEM->GetBinContent(mybin_EEM); - float c2_EEM = hcmap2_EEM->GetBinContent(mybin_EEM); - - if (c1_EEP!=0 && c2_EEP!=0 ){ - ///Ratio betweem IC and not the difference - hspread_EEP[ring_EEP]->Fill(c1_EEP/c2_EEP); - hspread_All[ring_EEP]->Fill(c1_EEP/c2_EEP); - - h2_EEP->Fill(c1_EEP,c2_EEP); - h2diff_EEP->SetBinContent(ibin,jbin,c1_EEP/c2_EEP); - } - else h2diff_EEP->SetBinContent(ibin,jbin,0); - - if (c1_EEM!=0 && c2_EEM!=0 ){ - hspread_EEM[ring_EEM]->Fill(c1_EEM/c2_EEM); - hspread_All[ring_EEM]->Fill(c1_EEM/c2_EEM); - - h2_EEM->Fill(c1_EEM,c2_EEM); - h2diff_EEM->SetBinContent(ibin,jbin,c1_EEM/c2_EEM); - } - else h2diff_EEM->SetBinContent(ibin,jbin,0); - } - } - - /// TGraphErrors for final plot - TGraphErrors *sigma_vs_iring_EEP = new TGraphErrors(); - sigma_vs_iring_EEP->SetMarkerStyle(20); - sigma_vs_iring_EEP->SetMarkerSize(1); - sigma_vs_iring_EEP->SetMarkerColor(kBlue+2); - - TGraphErrors *sigma_vs_iring_EEM = new TGraphErrors(); - sigma_vs_iring_EEM->SetMarkerStyle(20); - sigma_vs_iring_EEM->SetMarkerSize(1); - sigma_vs_iring_EEM->SetMarkerColor(kBlue+2); - - TGraphErrors *sigma_vs_iring_All = new TGraphErrors(); - sigma_vs_iring_All->SetMarkerStyle(20); - sigma_vs_iring_All->SetMarkerSize(1); - sigma_vs_iring_All->SetMarkerColor(kBlue+2); - - TGraphErrors *scale_vs_iring_EEP = new TGraphErrors(); - scale_vs_iring_EEP->SetMarkerStyle(20); - scale_vs_iring_EEP->SetMarkerSize(1); - scale_vs_iring_EEP->SetMarkerColor(kBlue+2); - - TGraphErrors *scale_vs_iring_EEM = new TGraphErrors(); - scale_vs_iring_EEM->SetMarkerStyle(20); - scale_vs_iring_EEM->SetMarkerSize(1); - scale_vs_iring_EEM->SetMarkerColor(kBlue+2); - - TGraphErrors *scale_vs_iring_All = new TGraphErrors(); - scale_vs_iring_All->SetMarkerStyle(20); - scale_vs_iring_All->SetMarkerSize(1); - scale_vs_iring_All->SetMarkerColor(kBlue+2); - - /// Gauss function for fit - TF1 *fgaus_EEP = new TF1("fgaus_EEP","gaus",0.,2.); - TF1 *fgaus_EEM = new TF1("fgaus_EEM","gaus",0.,2.); - TF1 *fgaus_All = new TF1("fgaus_All","gaus",0.,2.); - - int np_EEP = 0; - int np_EEM = 0; - int np_All = 0; - for (int i = 0; i < 40; i++){ - if ( hspread_EEP[i]->GetEntries() == 0) {sigma_vs_iring_EEP-> SetPoint(np_EEP,i,-100);np_EEP++;continue;} - if ( hspread_EEM[i]->GetEntries() == 0) {sigma_vs_iring_EEM-> SetPoint(np_EEM,i,-100);np_EEM++;continue;} - if ( hspread_All[i]->GetEntries() == 0) {sigma_vs_iring_All-> SetPoint(np_All,i,-100);np_All++;continue;} - - hspread_EEP[i]->Fit("fgaus_EEP","QRME"); - hspread_EEM[i]->Fit("fgaus_EEM","QRME"); - hspread_All[i]->Fit("fgaus_All","QRME"); - TString Name = Form("c_%d",i); - - sigma_vs_iring_EEP-> SetPoint(np_EEP,i,fgaus_EEP->GetParameter(2)); - sigma_vs_iring_EEP-> SetPointError(np_EEP,0,fgaus_EEP->GetParError(2)); - - scale_vs_iring_EEP-> SetPoint(np_EEP,i,fgaus_EEP->GetParameter(1)); - scale_vs_iring_EEP-> SetPointError(np_EEP,0,fgaus_EEP->GetParError(1)); - - np_EEP++; - - sigma_vs_iring_EEM-> SetPoint(np_EEM,i,fgaus_EEM->GetParameter(2)); - sigma_vs_iring_EEM-> SetPointError(np_EEM,0,fgaus_EEM->GetParError(2)); - - scale_vs_iring_EEM-> SetPoint(np_EEM,i,fgaus_EEM->GetParameter(1)); - scale_vs_iring_EEM-> SetPointError(np_EEM,0,fgaus_EEM->GetParError(1)); - - np_EEM++; - - sigma_vs_iring_All-> SetPoint(np_All,i,fgaus_All->GetParameter(2)); - sigma_vs_iring_All-> SetPointError(np_All,0,fgaus_All->GetParError(2)); - - scale_vs_iring_All-> SetPoint(np_All,i,fgaus_All->GetParameter(1)); - scale_vs_iring_All-> SetPointError(np_All,0,fgaus_All->GetParError(1)); - - np_All++; - } - - /// For from statistical precision analysis - - TGraphErrors* gr_stat_prec_EEP = (TGraphErrors*) f4->Get("gr_stat_prec_EEP"); - TGraphErrors* gr_stat_prec_EEM = (TGraphErrors*) f4->Get("gr_stat_prec_EEM"); - TGraphErrors* gr_stat_prec_All = (TGraphErrors*) f4->Get("gr_stat_prec"); - - /// Residual Plot - TGraphErrors* residual_EEP = new TGraphErrors(); - TGraphErrors* residual_EEM = new TGraphErrors(); - TGraphErrors* residual_All = new TGraphErrors(); - - for(int pp=0; pp< gr_stat_prec_EEP->GetN(); pp++){ - double ring1, ring2,tot, stat, espread, estat,ex,res,eres; - - sigma_vs_iring_EEP->GetPoint(pp, ring2, tot); - espread = sigma_vs_iring_EEP-> GetErrorY(pp); - - gr_stat_prec_EEP->GetPoint(pp,ring1, stat); - estat = gr_stat_prec_EEP-> GetErrorY(pp); - - ex = gr_stat_prec_EEP-> GetErrorX(pp); - - if (tot > stat ){res = sqrt( tot*tot - stat*stat ); - eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; - } - else {res = -sqrt( fabs(tot*tot - stat*stat) ); - eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); - } - - residual_EEP->SetPoint(pp,ring1,res); - if(eres<0.01) residual_EEP->SetPointError(pp,ex,eres); - else residual_EEP->SetPointError(pp,ex,0.01); - } - - for(int pp=0; pp< gr_stat_prec_EEM->GetN(); pp++){ - double ring1, ring2,tot, stat, espread, estat,ex,res,eres; - - sigma_vs_iring_EEM->GetPoint(pp, ring2, tot); - espread = sigma_vs_iring_EEM-> GetErrorY(pp); - - gr_stat_prec_EEM->GetPoint(pp,ring1, stat); - estat = gr_stat_prec_EEM-> GetErrorY(pp); - - ex = gr_stat_prec_EEM-> GetErrorX(pp); - if (tot > stat ){res = sqrt( tot*tot - stat*stat ); - eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; - } - else {res = -sqrt( fabs(tot*tot - stat*stat) ); - eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); - } - residual_EEM->SetPoint(pp,ring1,res); - if(eres<0.01) residual_EEM->SetPointError(pp,ex,eres); - else residual_EEM->SetPointError(pp,ex,0.01); - } - - for(int pp=0; pp< gr_stat_prec_All->GetN(); pp++){ - double ring1, ring2,tot, stat, espread, estat,ex,res,eres; - - sigma_vs_iring_All->GetPoint(pp, ring2, tot); - espread = sigma_vs_iring_All-> GetErrorY(pp); - - gr_stat_prec_All->GetPoint(pp,ring1, stat); - estat = gr_stat_prec_All-> GetErrorY(pp); - - ex = gr_stat_prec_All-> GetErrorX(pp); - if (tot > stat ){ res = sqrt( tot*tot - stat*stat ); - eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; - } - else {res = -sqrt( fabs(tot*tot - stat*stat) ); - eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); - } - - residual_All->SetPoint(pp,ring1,res); - if(eres<0.01) residual_All->SetPointError(pp,ex,eres); - else residual_All->SetPointError(pp,ex,0.01); - - } - - /// Final Plot - TCanvas *cscale_EEP = new TCanvas("cscale_EEP","cscale_EEP"); - cscale_EEP->SetGridx(); - cscale_EEP->SetGridy(); - scale_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); - scale_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - scale_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); - scale_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetTitle("iring"); - scale_vs_iring_EEP->Draw("ap"); - - TCanvas *cscale_EEM = new TCanvas("cscale_EEM","cscale_EEM"); - cscale_EEM->SetGridx(); - cscale_EEM->SetGridy(); - scale_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); - scale_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - scale_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); - scale_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); - scale_vs_iring_EEM->Draw("ap"); - - TCanvas *cmap2_EEP = new TCanvas("cmap2_EEP","cmap2_EEP",500,500); - cmap2_EEP->SetGridx(); - cmap2_EEP->SetGridy(); - cmap2_EEP -> cd(); - cmap2_EEP->SetLeftMargin(0.1); - cmap2_EEP->SetRightMargin(0.15); - h2_EEP->GetXaxis()->SetRangeUser(0.85,1.15); - h2_EEP->GetYaxis()->SetRangeUser(0.85,1.15); - h2_EEP->GetXaxis()->SetTitle("C_{1}"); - h2_EEP->GetYaxis()->SetTitle("C_{2}"); - h2_EEP->Draw("colz"); - - TCanvas *cmap2_EEM = new TCanvas("cmap2_EEM","cmap2_EEM",500,500); - cmap2_EEM->SetGridx(); - cmap2_EEM->SetGridy(); - cmap2_EEM -> cd(); - cmap2_EEM->SetLeftMargin(0.1); - cmap2_EEM->SetRightMargin(0.15); - h2_EEM->GetXaxis()->SetRangeUser(0.85,1.15); - h2_EEM->GetYaxis()->SetRangeUser(0.85,1.15); - h2_EEM->GetXaxis()->SetTitle("C_{1}"); - h2_EEM->GetYaxis()->SetTitle("C_{2}"); - h2_EEM->Draw("colz"); - - TCanvas *cdiff_EEP = new TCanvas("cdiff_EEP","cdiff_EEP",700,500); - cdiff_EEP->SetGridx(); - cdiff_EEP->SetGridy(); - cdiff_EEP -> cd(); - cdiff_EEP->SetLeftMargin(0.1); - cdiff_EEP->SetRightMargin(0.15); - h2diff_EEP->GetZaxis()->SetRangeUser(0.5,1.6); - h2diff_EEP->GetXaxis()->SetTitle("ix"); - h2diff_EEP->GetYaxis()->SetTitle("iy"); - h2diff_EEP->Draw("colz"); - - TCanvas *cdiff_EEM = new TCanvas("cdiff_EEM","cdiff_EEM",700,500); - cdiff_EEM->SetGridx(); - cdiff_EEM->SetGridy(); - cdiff_EEM -> cd(); - cdiff_EEM->SetLeftMargin(0.1); - cdiff_EEM->SetRightMargin(0.15); - h2diff_EEM->GetZaxis()->SetRangeUser(0.5,1.6); - h2diff_EEM->GetXaxis()->SetTitle("ix"); - h2diff_EEM->GetYaxis()->SetTitle("iy"); - h2diff_EEM->Draw("colz"); - - TCanvas *csigma_EEP = new TCanvas("csigma_EEP","csigma_EEP"); - csigma_EEP->SetGridx(); - csigma_EEP->SetGridy(); - sigma_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); - sigma_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - sigma_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); - sigma_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetTitle("iring"); - sigma_vs_iring_EEP->Draw("ap"); - gr_stat_prec_EEP->Draw("psame"); - - TCanvas *csigma_EEM = new TCanvas("csigma_EEM","csigma_EEM"); - csigma_EEM->SetGridx(); - csigma_EEM->SetGridy(); - sigma_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); - sigma_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - sigma_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); - sigma_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); - sigma_vs_iring_EEM->Draw("ap"); - gr_stat_prec_EEM->Draw("psame"); - - TCanvas *csigma_All= new TCanvas("csigma_All","csigma_Folded"); - csigma_All->SetGridx(); - csigma_All->SetGridy(); - sigma_vs_iring_All->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); - sigma_vs_iring_All->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - sigma_vs_iring_All->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); - sigma_vs_iring_All->GetHistogram()->GetXaxis()-> SetTitle("iring"); - sigma_vs_iring_All->Draw("ap"); - gr_stat_prec_All->Draw("psame"); - - TCanvas *cres_EEP = new TCanvas("cres_EEP","cresidual_EEP"); - cres_EEP->SetGridx(); - cres_EEP->SetGridy(); - residual_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); - residual_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - residual_EEP-> SetTitle("residual EE+"); - residual_EEP-> SetTitle("iring"); - residual_EEP->SetMarkerStyle(20); - residual_EEP->SetMarkerSize(1); - residual_EEP->SetMarkerColor(kGreen+2); - residual_EEP->Draw("ap"); - - TCanvas *cres_EEM = new TCanvas("cres_EEM","cresidual_EEM"); - cres_EEM->SetGridx(); - cres_EEM->SetGridy(); - residual_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); - residual_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - residual_EEM->GetHistogram()->GetYaxis()-> SetTitle("residual EE-"); - residual_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); - residual_EEM ->SetMarkerStyle(20); - residual_EEM->SetMarkerSize(1); - residual_EEM->SetMarkerColor(kGreen+2); - residual_EEM->Draw("ap"); - - TCanvas *cres_All = new TCanvas("cres_All","cresidual_Folded"); - cres_All->SetGridx(); - cres_All->SetGridy(); - residual_All->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); - residual_All->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); - residual_All->GetYaxis()->SetTitle("residual EE Folded"); - residual_All->GetXaxis()->SetTitle("iring"); - residual_All->SetMarkerStyle(20); - residual_All->SetMarkerSize(1); - residual_All->SetMarkerColor(kGreen+2); - residual_All->Draw("ap"); - - /// save output result: - - TFile* output = new TFile(outputFile.c_str(),"RECREATE"); - output->cd(); - residual_EEM->Write("residual_EEM"); - residual_EEP->Write("residual_EEP"); - residual_All->Write("residual_All"); - - output->Close(); - - theApp->Run(); - - return 0; - -} diff --git a/EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp b/EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp deleted file mode 100644 index 5c26987ec53..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/DeadXtalAnalysisEB.cpp +++ /dev/null @@ -1,2313 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include "TFile.h" -#include "TStyle.h" -#include "TMath.h" -#include "TH2F.h" -#include "TH1F.h" -#include "TGraphErrors.h" -#include "TCanvas.h" -#include "TF1.h" -#include "TROOT.h" -#include "TLegend.h" -#include "TPaveStats.h" -#include "TApplication.h" -#include "TEndcapRings.h" - -#include "ConfigParser.h" -#include "ntpleUtils.h" - - -int main (int argc, char** argv){ - - /* std::string ROOTStyle = getenv ("ROOTStyle"); - - gROOT->ProcessLine((".x "+ROOTStyle+"/rootLogon.C").c_str()); - gROOT->ProcessLine((".x "+ROOTStyle+"/rootPalette.C").c_str()); - gROOT->ProcessLine((".x "+ROOTStyle+"/rootColors.C").c_str()); - gROOT->ProcessLine((".x "+ROOTStyle+"/setTDRStyle.C").c_str()); - */ - - if(argc<2){ std::cout<<" Not correct number of input parameter --> Need Just one cfg file exit "< readStringOption("Input::inputList"); - std::string inputStandardMap = gConfigParser -> readStringOption("Input::inputStandardMap"); - - std::string DeadChannelMapName ; - try{ DeadChannelMapName = gConfigParser -> readStringOption("Input::DeadChannelMapName"); } - catch(char const* exceptionString ){ DeadChannelMapName = "h_map_Dead_Channels";} - - std::string ICMapName ; - try{ ICMapName = gConfigParser -> readStringOption("Input::ICMapName"); } - catch(char const* exceptionString ){ ICMapName = "h_scale_EB";} - - bool isDeadTriggerTower ; - try{ isDeadTriggerTower = gConfigParser -> readBoolOption("Input::isDeadTriggerTower"); } - catch(char const* exceptionString ){ isDeadTriggerTower = false;} - - std::vector EtaBinCenterDeadTT ; - try{ EtaBinCenterDeadTT = gConfigParser -> readDoubleListOption("Input::EtaBinCenterDeadTT"); } - catch(char const* exceptionString ){ EtaBinCenterDeadTT.push_back(-999);} - - int NPhiShift ; - try{ NPhiShift = gConfigParser -> readIntOption("Input::NPhiShift"); } - catch(char const* exceptionString ){ NPhiShift=14; } - - int PhiOffset ; - try{ PhiOffset = gConfigParser -> readIntOption("Input::PhiOffset"); } - catch(char const* exceptionString ){ PhiOffset=4; } - - bool icMapRatio ; - try{ icMapRatio = gConfigParser -> readBoolOption("Input::icMapRatio"); } - catch(char const* exceptionString ){ icMapRatio = true;} - - std::vector iEtaBinDivision ; - try{ iEtaBinDivision = gConfigParser -> readDoubleListOption("Input::iEtaBinDivision"); } - catch(char const* exceptionString ){ iEtaBinDivision.push_back(0); - iEtaBinDivision.push_back(20); - iEtaBinDivision.push_back(40); - iEtaBinDivision.push_back(60); - iEtaBinDivision.push_back(85); - } - - std::vector iPhiBinDivision ; - try{ iPhiBinDivision = gConfigParser -> readDoubleListOption("Input::iPhiBinDivision"); } - catch(char const* exceptionString ){ iPhiBinDivision.push_back(0); - iPhiBinDivision.push_back(90); - iPhiBinDivision.push_back(180); - iPhiBinDivision.push_back(270); - iPhiBinDivision.push_back(360); - } - - int NPhiSMBinDivision ; - try{ NPhiSMBinDivision = gConfigParser -> readIntOption("Input::NPhiSMBinDivision"); } - catch(char const* exceptionString ){ NPhiSMBinDivision = 5 ; } - - - int IPhiWindow ; - try{ IPhiWindow = gConfigParser -> readIntOption("Input::IPhiWindow"); } - catch(char const* exceptionString ){ IPhiWindow = 3;} - - int IEtaWindow ; - try{ IEtaWindow = gConfigParser -> readIntOption("Input::IEtaWindow"); } - catch(char const* exceptionString ){ IEtaWindow = 3;} - - std::string outputCanvasPlot ; - try{ outputCanvasPlot = gConfigParser -> readStringOption("Output::outputCanvasPlot"); } - catch(char const* exceptionString ){ outputCanvasPlot = "output/outDeadXtalPlots/";} - - std::cout<<"inputList : "<SetOptFit(111); - if(isDeadTriggerTower)gStyle->SetOptStat(111110); - else gStyle->SetOptStat(11110); - - - // ic map running a standard calibration without any dead channel - - TFile* inputFileStandardMap = new TFile(inputStandardMap.c_str(),"READ"); - inputFileStandardMap->cd(); - TH2F* ICMapEBStandard = (TH2F*) inputFileStandardMap->Get(ICMapName.c_str()) ; - - - std::ifstream inFile(inputList.c_str()); - std::string buffer; - - std::vector inputFileList ; - - if(!inFile.is_open()){ std::cout << "** ERROR: Can't open '" << inputList << "' for input" << std::endl; return -1;} - - std::cout<<"Input Files : "<> buffer; - if( buffer.at(0) == '#' ) continue; - std::cout< > ICCrystalEB (IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis - std::vector > ICCrystalEBP(IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis in EB+ - std::vector > ICCrystalEBM(IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis in EB- - - // for differential eta and phi analysis - std::vector > > ICCrystalEB_EtaBinned(iEtaBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); - std::vector > > ICCrystalEB_PhiBinned(iPhiBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); - std::vector > > ICCrystalEB_SMBinned(int(20/NPhiSMBinDivision), std::vector >(IPhiWindow, std::vector (IEtaWindow))); - - - std::vector DeadCrystalEB(inputFileList.size()); - std::vector ICMapEB(inputFileList.size()); - - for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ - - for( int iEta = 0 ; iEta < IEtaWindow ; iEta ++) { - - if(isDeadTriggerTower) (ICCrystalEB.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_%d_%d",iPhi,iEta)).c_str(),"",10000,0,100); - else (ICCrystalEB.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); - (ICCrystalEB.at(iPhi)).at(iEta)->Sumw2(); - if(isDeadTriggerTower) (ICCrystalEBP.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBP_%d_%d",iPhi,iEta)).c_str(),"",500,0,5); - else (ICCrystalEBP.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBP_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); - (ICCrystalEBP.at(iPhi)).at(iEta)->Sumw2(); - if(isDeadTriggerTower) (ICCrystalEBM.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBM_%d_%d",iPhi,iEta)).c_str(),"",10000,0,100); - else (ICCrystalEBM.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBM_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); - (ICCrystalEBM.at(iPhi)).at(iEta)->Sumw2(); - - for( int iEtaBin = 0; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ - - if(isDeadTriggerTower) ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_EtaBin_%f_%f_iEta_%d_iPhi_%d",iEtaBinDivision.at(iEtaBin), - iEtaBinDivision.at(iEtaBin+1),iPhi,iEta)).c_str(),"",10000,0,100); - else ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_EtaBin_%f_%f_iEta_%d_iPhi_%d",iEtaBinDivision.at(iEtaBin), - iEtaBinDivision.at(iEtaBin+1),iPhi,iEta)).c_str(),"",100,0.95,1.4); - ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Sumw2(); - } - - for( int iPhiBin = 0; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ - - if(isDeadTriggerTower) ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_PhiBin_%f_%f_iEta_%d_iPhi_%d",iPhiBinDivision.at(iPhiBin), - iPhiBinDivision.at(iPhiBin+1),iPhi,iEta)).c_str(),"",10000,0,100); - else ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_PhiBin_%f_%f_iEta_%d_iPhi_%d",iPhiBinDivision.at(iPhiBin), - iPhiBinDivision.at(iPhiBin+1),iPhi,iEta)).c_str(),"",100,0.95,1.4); - ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Sumw2(); - - } - - for( int iSMBin = 0; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ - - if(isDeadTriggerTower) ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_SMBin_%d_%d_iEta_%d_iPhi_%d",iSMBin*NPhiSMBinDivision, - (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",10000,0,100); - else ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_SMBin_%d_%d_iEta_%d_iPhi_%d",iSMBin*NPhiSMBinDivision, - (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",100,0.95,1.4); - ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Sumw2(); - - } - } - } - - for( unsigned int iFile = 0 ; iFile < inputFileList.size() ; iFile ++){ - - DeadCrystalEB.push_back((TH2F*) inputFileList.at(iFile)->Get(DeadChannelMapName.c_str())); - ICMapEB.push_back((TH2F*) inputFileList.at(iFile)->Get(ICMapName.c_str())); - - if(isDeadTriggerTower){ - - int PhiShift = 0 ; - if(TString(inputFileList.at(iFile)->GetName()).Contains("p1")) PhiShift = 1 ; - else if(TString(inputFileList.at(iFile)->GetName()).Contains("m1")) PhiShift = -1 ; - else if(TString(inputFileList.at(iFile)->GetName()).Contains("p2")) PhiShift = 2 ; - else if(TString(inputFileList.at(iFile)->GetName()).Contains("m2")) PhiShift = -2 ; - - for(int iEta = 0 ; iEta < int(EtaBinCenterDeadTT.size()) ; iEta ++ ){ - for( int iPhi = PhiOffset + PhiShift ; iPhi < 360 ; iPhi = iPhi + NPhiShift) { - - if(DeadCrystalEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)!=0 && EtaBinCenterDeadTT.at(iEta)!=0){ - - if(icMapRatio){ - ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ - ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - if(fabs(EtaBinCenterDeadTT.at(iEta)+85)<=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ - ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ - ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - } - else{ - ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - if(fabs(EtaBinCenterDeadTT.at(iEta)+85)<=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - } - - int iEtaBin = 0 ; - int iPhiBin = 0 ; - - for( ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++){ - if(fabs(EtaBinCenterDeadTT.at(iEta)) > iEtaBinDivision.at(iEtaBin) && fabs(EtaBinCenterDeadTT.at(iEta)) <= iEtaBinDivision.at(iEtaBin+1)) break ; - } - - for( ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++){ - if(iPhi == 0) { iPhiBin = 0 ; break ; } - else if (iPhi == 360){ iPhiBin = int(iPhiBinDivision.size()-1) -1 ; break;} - else if(iPhi > iPhiBinDivision.at(iPhiBin) && iPhi <= iPhiBinDivision.at(iPhiBin+1)) break ; - } - - if(icMapRatio){ - if(ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)!=0){ - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86) / - ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86) / - ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ - ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); } - } - else{ - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); - } - - for( int IPHI = iPhi - int((IPhiWindow-1)/2) ; IPHI <= iPhi + int((IPhiWindow-1)/2) ; IPHI ++){ - for( int IETA = EtaBinCenterDeadTT.at(iEta)+85 - int((IEtaWindow-1)/2) ; IETA <= EtaBinCenterDeadTT.at(iEta)+85 + int((IEtaWindow-1)/2) ; IETA ++){ - - if(icMapRatio){ - ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - if(fabs(EtaBinCenterDeadTT.at(iEta)+85)>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - } - else{ - - ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - if(fabs(EtaBinCenterDeadTT.at(iEta)+85)>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - } - } - } - } - } - } - } - - else{ - for( int iPhi = 0 ; iPhi < 360 ; iPhi ++){ - for( int iEta = 0 ; iEta < 170 ; iEta ++){ - - if(DeadCrystalEB.back()->GetBinContent(iPhi+1,iEta+1)!=0 && iEta!=0){ - - if(icMapRatio){ - ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); - if(iEta <=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); - else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); - } - else{ - ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); - if(iEta <=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); - else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); - } - - int iEtaBin = 0 ; - int iPhiBin = 0 ; - - for( ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++){ - if(fabs(iEta-85) > iEtaBinDivision.at(iEtaBin) && fabs(iEta-85) <= iEtaBinDivision.at(iEtaBin+1)) break ; - } - - for( ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++){ - if(iPhi == 0) { iPhiBin = 0 ; break ; } - else if (iPhi == 360){ iPhiBin = int(iPhiBinDivision.size()-1) -1 ; break;} - else if(iPhi > iPhiBinDivision.at(iPhiBin) && iPhi <= iPhiBinDivision.at(iPhiBin+1)) break ; - } - - if(icMapRatio){ - if(ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)!=0){ - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1) / ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1) / ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ - ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); } - } - else{ - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); - } - - for( int IPHI = iPhi - int((IPhiWindow-1)/2) ; IPHI <= iPhi + int((IPhiWindow-1)/2) ; IPHI ++){ - for( int IETA = iEta - int((IEtaWindow-1)/2) ; IETA <= iEta + int((IEtaWindow-1)/2) ; IETA ++){ - - if(icMapRatio){ - ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - if(iEta>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ - ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); - } - else{ - - ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - if(iEta>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - - ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); - } - } - } - } - } - } - } - } - - std::vector > Can (IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_EBP (IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_EBM (IPhiWindow,std::vector (IEtaWindow)); - std::vector > > Can_EtaBinned (iEtaBinDivision.size()-1,std::vector >(IPhiWindow, std::vector (IEtaWindow))); - std::vector > > Can_PhiBinned (iPhiBinDivision.size()-1,std::vector >(IPhiWindow, std::vector (IEtaWindow))); - std::vector > > Can_SMBinned (int(20/NPhiSMBinDivision) ,std::vector >(IPhiWindow, std::vector (IEtaWindow))); - - for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ - - for(int iEta = 0 ; iEta < IPhiWindow ; iEta ++){ - (Can.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_%d_%d",iPhi,iEta)).c_str(),"",500,500); - (Can_EBP.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EBP_%d_%d",iPhi,iEta)).c_str(),"",500,500); - (Can_EBM.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EBM_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - for( int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++) - ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EtaBin_%d_%d_iPhi_%d_iEta_%d",int(iEtaBinDivision.at(iEtaBin)), - int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"",500,500); - - for( int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++) - ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_PhiBin_%d_%d_iPhi_%d_iEta_%d",int(iPhiBinDivision.at(iPhiBin)), - int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"",500,500); - for( int iSMBin = 0 ; iSMBin < int(NPhiSMBinDivision-1) ; iSMBin ++) - ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_SMBin_%d_%d_iPhi_%d_iEta_%d",iSMBin*NPhiSMBinDivision, - (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",500,500); - } - } - - std::vector > GaussianFits (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits - std::vector > GaussianFits_EBP (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits - std::vector > GaussianFits_EBM (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits - std::vector > > GaussianFits_EtaBinned (iEtaBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); - std::vector > > GaussianFits_PhiBinned (iPhiBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); - std::vector > > GaussianFits_SMBinned (int(20/NPhiSMBinDivision), std::vector >(IPhiWindow, std::vector (IEtaWindow))); - - std::vector > MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > Pol0_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol0_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > Pol0_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol0_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > Pol0_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol0_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > Pol0_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol0_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > Pol0_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol0_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - - std::vector > Pol0_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol0_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol1_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - std::vector > Pol2_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); - - - std::vector > Can_MeanIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_Gaus_MeanIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_RMSIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_Gaus_RMSIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); - - std::vector > Can_MeanIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_Gaus_MeanIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_RMSIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_Gaus_RMSIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); - - std::vector > Can_MeanIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_Gaus_MeanIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_RMSIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); - std::vector > Can_Gaus_RMSIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); - - TH1F* htemp1; - TH1F* htemp2; - TPaveStats* pave1, *pave2, *pave3; - - for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ - for( int iEta = 0 ; iEta < IEtaWindow ; iEta ++){ - - if(iPhi == int(IPhiWindow/2) && iEta == int(IEtaWindow/2)) continue ; - if(isDeadTriggerTower && ( int(fabs(iPhi-IPhiWindow/2)) < int(IPhiWindow/2-1) && int(fabs(iEta-IEtaWindow/2)) < int(IPhiWindow/2-1))) continue ; - - if(isDeadTriggerTower) GaussianFits[iPhi][iEta] = new TF1(std::string(Form("Gaus_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); - else GaussianFits[iPhi][iEta] = new TF1(std::string(Form("Gaus_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); - if(isDeadTriggerTower) GaussianFits_EBP[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBP_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); - else GaussianFits_EBP[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBP_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); - if(isDeadTriggerTower) GaussianFits_EBM[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBM_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); - else GaussianFits_EBM[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBM_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); - - for(int iEtaBin =0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ - if(isDeadTriggerTower) GaussianFits_EtaBinned[iEtaBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_EtaBin_%d_%d_iPhi_%d_iEta_%d", - int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"gaus",0.,100); - else GaussianFits_EtaBinned[iEtaBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_EtaBin_%d_%d_iPhi_%d_iEta_%d", - int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"gaus",0.9,1.4); - } - - for(int iPhiBin =0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ - - if(isDeadTriggerTower) GaussianFits_PhiBinned[iPhiBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_PhiBin_%d_%d_iPhi_%d_iEta_%d", - int(iPhiBinDivision.at(iPhiBin)),int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"gaus",0.,100); - else GaussianFits_PhiBinned[iPhiBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_PhiBin_%d_%d_iPhi_%d_iEta_%d", - int(iPhiBinDivision.at(iPhiBin)),int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"gaus",0.9,1.5); - } - - for(int iSMBin =0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ - - if(isDeadTriggerTower) GaussianFits_SMBinned[iSMBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_SMBin_%d_%d_iPhi_%d_iEta_%d", - iSMBin*NPhiSMBinDivision,NPhiSMBinDivision*(iSMBin+1),iPhi,iEta)).c_str(),"gaus",0.,100); - else GaussianFits_SMBinned[iSMBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_SMBin_%d_%d_iPhi_%d_iEta_%d", - iSMBin*NPhiSMBinDivision,NPhiSMBinDivision*(iSMBin+1),iPhi,iEta)).c_str(),"gaus",0.9,1.5); - } - - MeanIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); - Can_MeanIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - RMSIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); - Can_RMSIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - MeanIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); - Can_MeanIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - RMSIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); - Can_RMSIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - MeanIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); - Can_MeanIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - RMSIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); - Can_RMSIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); - Can_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); - Can_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); - Can_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); - Can_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - Gaus_MeanIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); - Can_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - Gaus_RMSIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); - Can_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); - - Pol0_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol1_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol2_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); - - Pol0_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol1_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol2_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); - - Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); - - Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); - Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); - - Pol0_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol1_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol2_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); - - Pol0_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol1_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol2_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); - - Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); - - Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); - Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); - - Pol0_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); - Pol1_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); - Pol2_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); - - Pol0_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); - Pol1_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); - Pol2_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); - - Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); - Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); - Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); - - Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); - Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); - Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); - - /// Original IC distribution - (Can.at(iPhi)).at(iEta)->cd(); - (Can.at(iPhi)).at(iEta)->SetGridx(); - (Can.at(iPhi)).at(iEta)->SetGridy(); - ICCrystalEB[iPhi][iEta]->SetLineColor(kBlack); - ICCrystalEB[iPhi][iEta]->SetLineWidth(2); - ICCrystalEB[iPhi][iEta]->SetMarkerStyle(20); - ICCrystalEB[iPhi][iEta]->SetMarkerSize(1.); - ICCrystalEB[iPhi][iEta]->SetMarkerColor(kRed); - if(!isDeadTriggerTower){ - GaussianFits[iPhi][iEta]->SetLineColor(kBlue); - GaussianFits[iPhi][iEta]->SetLineWidth(2); - ICCrystalEB[iPhi][iEta]->Fit(GaussianFits[iPhi][iEta],"RMEQ"); - } - ICCrystalEB[iPhi][iEta]->Draw("E"); - ICCrystalEB[iPhi][iEta]->GetXaxis()->SetTitle("IC"); - ICCrystalEB[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); - (Can.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - (Can_EBP.at(iPhi)).at(iEta)->cd(); - (Can_EBP.at(iPhi)).at(iEta)->SetGridx(); - (Can_EBP.at(iPhi)).at(iEta)->SetGridy(); - ICCrystalEBP[iPhi][iEta]->SetLineColor(kBlack); - ICCrystalEBP[iPhi][iEta]->SetLineWidth(2); - ICCrystalEBP[iPhi][iEta]->SetMarkerStyle(20); - ICCrystalEBP[iPhi][iEta]->SetMarkerSize(1.); - ICCrystalEBP[iPhi][iEta]->SetMarkerColor(kRed); - if(!isDeadTriggerTower){ - GaussianFits_EBP[iPhi][iEta]->SetLineColor(kBlue); - GaussianFits_EBP[iPhi][iEta]->SetLineWidth(2); - ICCrystalEBP[iPhi][iEta]->Fit(GaussianFits_EBP[iPhi][iEta],"RMEQ"); - } - ICCrystalEBP[iPhi][iEta]->Draw("E"); - ICCrystalEBP[iPhi][iEta]->GetXaxis()->SetTitle("IC"); - ICCrystalEBP[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); - (Can_EBP.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBP.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_EBP.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBP.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - (Can_EBM.at(iPhi)).at(iEta)->cd(); - (Can_EBM.at(iPhi)).at(iEta)->SetGridx(); - (Can_EBM.at(iPhi)).at(iEta)->SetGridy(); - ICCrystalEBM[iPhi][iEta]->SetLineColor(kBlack); - ICCrystalEBM[iPhi][iEta]->SetLineWidth(2); - ICCrystalEBM[iPhi][iEta]->SetMarkerStyle(20); - ICCrystalEBM[iPhi][iEta]->SetMarkerSize(1.); - ICCrystalEBM[iPhi][iEta]->SetMarkerColor(kRed); - if(!isDeadTriggerTower){ - GaussianFits_EBM[iPhi][iEta]->SetLineColor(kBlue); - GaussianFits_EBM[iPhi][iEta]->SetLineWidth(2); - ICCrystalEBM[iPhi][iEta]->Fit(GaussianFits_EBM[iPhi][iEta],"RMEQ"); - } - ICCrystalEBM[iPhi][iEta]->Draw("E"); - ICCrystalEBM[iPhi][iEta]->GetXaxis()->SetTitle("IC"); - ICCrystalEBM[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); - (Can_EBM.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBM.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_EBM.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBM.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - /// Original IC distribution vs the chosen eta binning - for(int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ - ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->cd(); - ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->SetGridx(); - ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->SetGridy(); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetLineColor(kBlack); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetLineWidth(2); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerStyle(20); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerSize(1.); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerColor(kRed); - if(!isDeadTriggerTower){GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->SetLineColor(kBlue); - GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->SetLineWidth(2); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->Fit(GaussianFits_EtaBinned[iEtaBin][iPhi][iEta],"RMEQ"); - } - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->Draw("E"); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); - ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); - ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - } - - /// Mean IC vs Eta - - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->cd(); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); - - MeanIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); - MeanIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); - MeanIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); - MeanIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < MeanIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - MeanIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetMean()); - MeanIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetMeanError()); - } - - - Pol0_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - - MeanIC_EtaBinned[iPhi][iEta]->Fit(Pol2_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); - - MeanIC_EtaBinned[iPhi][iEta]->Draw("E"); - MeanIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); - MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); - MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.95,MeanIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.15); - - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(MeanIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - if(htemp1!=0) delete htemp1 ; - if(htemp2!=0) delete htemp2 ; - - /// RMS IC vs Eta - - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->cd(); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); - - RMSIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); - RMSIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); - RMSIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); - RMSIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < RMSIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - RMSIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetRMS()); - RMSIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetRMSError()); - } - - - Pol0_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - - RMSIC_EtaBinned[iPhi][iEta]->Fit(Pol2_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); - - RMSIC_EtaBinned[iPhi][iEta]->Draw("E"); - RMSIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); - RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); - RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.3); - - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(RMSIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - if(htemp1!=0) delete htemp1 ; - if(htemp2!=0) delete htemp2 ; - - /// Gauss Mean vs Eta - if(!isDeadTriggerTower){ - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->cd(); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); - - Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); - Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); - Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); - Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParameter(1)); - Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParError(1)); - } - - Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - - Gaus_MeanIC_EtaBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) Gaus_MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) Gaus_MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); - - Gaus_MeanIC_EtaBinned[iPhi][iEta]->Draw("E"); - Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); - Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); - Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.95,Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.15); - - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Close(); - - delete htemp1 ; - delete htemp2 ; - - /// Gauss Sigma vs Eta - - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->cd(); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); - - Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); - Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); - Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); - Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParameter(2)); - Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParError(2)); - } - - Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); - - Gaus_RMSIC_EtaBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) Gaus_RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) Gaus_RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); - - Gaus_RMSIC_EtaBinned[iPhi][iEta]->Draw("E"); - Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); - Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); - Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.3); - - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Close(); - - delete htemp1 ; - delete htemp2 ; - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - - /// Original IC distribution vs the chosen eta binning - - for(int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ - ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->cd(); - ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->SetGridx(); - ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->SetGridy(); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetLineColor(kBlack); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetLineWidth(2); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerStyle(20); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerSize(1.); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerColor(kRed); - if(!isDeadTriggerTower){GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->SetLineColor(kBlue); - GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->SetLineWidth(2); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->Fit(GaussianFits_PhiBinned[iPhiBin][iPhi][iEta],"RMEQ"); - } - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->Draw("E"); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); - ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); - ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - } - - - /// Mean IC vs Phi - - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->cd(); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); - - MeanIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); - MeanIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); - MeanIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); - MeanIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < MeanIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - MeanIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetMean()); - MeanIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetMeanError()); - } - - - Pol0_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - - MeanIC_PhiBinned[iPhi][iEta]->Fit(Pol2_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); - - MeanIC_PhiBinned[iPhi][iEta]->Draw("E"); - MeanIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); - MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); - MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.98,MeanIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.05); - - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(MeanIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - if(htemp1!=0) delete htemp1 ; - if(htemp2!=0) delete htemp2 ; - - /// RMS IC vs Phi - - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->cd(); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); - - RMSIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); - RMSIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); - RMSIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); - RMSIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < RMSIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - RMSIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetRMS()); - RMSIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetRMSError()); - } - - - Pol0_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - - RMSIC_PhiBinned[iPhi][iEta]->Fit(Pol2_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); - - RMSIC_PhiBinned[iPhi][iEta]->Draw("E"); - RMSIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); - RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); - RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.3); - - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(RMSIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - if(htemp1!=0) delete htemp1 ; - if(htemp2!=0) delete htemp2 ; - - /// Gauss Mean vs Phi - if(!isDeadTriggerTower){ - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->cd(); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); - - Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); - Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); - Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); - Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParameter(1)); - Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParError(1)); - } - - Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - - Gaus_MeanIC_PhiBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) Gaus_MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) Gaus_MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); - - Gaus_MeanIC_PhiBinned[iPhi][iEta]->Draw("E"); - Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); - Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); - Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.98,Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.05); - - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Close(); - - delete htemp1 ; - delete htemp2 ; - - /// Gauss Sigma vs Eta - - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->cd(); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); - - Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); - Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); - Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); - Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParameter(2)); - Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParError(2)); - } - - Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); - - Gaus_RMSIC_PhiBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) Gaus_RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) Gaus_RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); - - Gaus_RMSIC_PhiBinned[iPhi][iEta]->Draw("E"); - Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); - Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); - Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.3); - - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Close(); - - delete htemp1 ; - delete htemp2 ; - } - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - /// Original IC distribution vs SM folding - - for(int iSMBin = 0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ - ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->cd(); - ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->SetGridx(); - ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->SetGridy(); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetLineColor(kBlack); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetLineWidth(2); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerStyle(20); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerSize(1.); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerColor(kRed); - if(!isDeadTriggerTower){GaussianFits_SMBinned[iSMBin][iPhi][iEta]->SetLineColor(kBlue); - GaussianFits_SMBinned[iSMBin][iPhi][iEta]->SetLineWidth(2); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->Fit(GaussianFits_SMBinned[iSMBin][iPhi][iEta],"RMEQ"); - } - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->Draw("E"); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); - ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); - ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - } - - /// Mean IC vs Eta - - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->cd(); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); - - MeanIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); - MeanIC_SMBinned[iPhi][iEta]->SetLineWidth(2); - MeanIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); - MeanIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < MeanIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - MeanIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetMean()); - MeanIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetMeanError()); - } - - - Pol0_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - - MeanIC_SMBinned[iPhi][iEta]->Fit(Pol2_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) MeanIC_SMBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) MeanIC_SMBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); - - MeanIC_SMBinned[iPhi][iEta]->Draw("E"); - MeanIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); - MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); - MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_SMBinned[iPhi][iEta]->GetMinimum()*0.95,MeanIC_SMBinned[iPhi][iEta]->GetMaximum()*1.15); - - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(MeanIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - if(htemp1!=0) delete htemp1 ; - if(htemp2!=0) delete htemp2 ; - - /// RMS IC vs SM - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->cd(); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); - - RMSIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); - RMSIC_SMBinned[iPhi][iEta]->SetLineWidth(2); - RMSIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); - RMSIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < RMSIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - RMSIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetRMS()); - RMSIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetRMSError()); - } - - - Pol0_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - - RMSIC_SMBinned[iPhi][iEta]->Fit(Pol2_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) RMSIC_SMBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) RMSIC_SMBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); - - RMSIC_SMBinned[iPhi][iEta]->Draw("E"); - RMSIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); - RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); - RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_SMBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_SMBinned[iPhi][iEta]->GetMaximum()*1.30); - - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(RMSIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - - if(htemp1!=0) delete htemp1 ; - if(htemp2!=0) delete htemp2 ; - - /// Gauss Mean vs SM - if(isDeadTriggerTower){ - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->cd(); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); - - Gaus_MeanIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); - Gaus_MeanIC_SMBinned[iPhi][iEta]->SetLineWidth(2); - Gaus_MeanIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); - Gaus_MeanIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < Gaus_MeanIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - Gaus_MeanIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParameter(1)); - Gaus_MeanIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParError(1)); - } - - Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - - Gaus_MeanIC_SMBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) Gaus_MeanIC_SMBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) Gaus_MeanIC_SMBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); - - Gaus_MeanIC_SMBinned[iPhi][iEta]->Draw("E"); - Gaus_MeanIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); - Gaus_MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); - Gaus_MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_SMBinned[iPhi][iEta]->GetMinimum()*0.95,Gaus_MeanIC_SMBinned[iPhi][iEta]->GetMaximum()*1.10); - - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(Gaus_MeanIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Close(); - - delete htemp1 ; - delete htemp2 ; - - /// Gauss Sigma vs SM - - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->cd(); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); - - Gaus_RMSIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); - Gaus_RMSIC_SMBinned[iPhi][iEta]->SetLineWidth(2); - Gaus_RMSIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); - Gaus_RMSIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); - - for(int iBin =0; iBin < Gaus_RMSIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ - Gaus_RMSIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParameter(2)); - Gaus_RMSIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParError(2)); - } - - Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); - Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); - Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); - Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); - - Gaus_RMSIC_SMBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp1 = (TH1F*) Gaus_RMSIC_SMBinned[iPhi][iEta]->Clone("htemp1"); - htemp1->Fit(Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); - htemp2 = (TH1F*) Gaus_RMSIC_SMBinned[iPhi][iEta]->Clone("htemp2"); - htemp2->Fit(Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); - - Gaus_RMSIC_SMBinned[iPhi][iEta]->Draw("E"); - Gaus_RMSIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); - Gaus_RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); - Gaus_RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_SMBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_SMBinned[iPhi][iEta]->GetMaximum()*1.30); - - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave1=(TPaveStats*)(Gaus_RMSIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); - pave1->SetTextColor(kRed); - pave1->SetBorderSize(2); - pave1->SetLineColor(kRed); - pave1->SetFillStyle(0); - pave1->SetY1NDC(0.6); - pave1->SetY2NDC(0.9); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp1->Draw("Esames"); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); - pave2->SetOptStat(000); - pave2->SetBorderSize(2); - pave2->SetLineColor(kGreen+1); - pave2->SetFillStyle(0); - pave2->SetTextSize(pave2->GetTextSize()*1.7); - pave2->SetTextColor(kGreen+1); - pave2->SetX1NDC(0.35); - pave2->SetX2NDC(0.6); - pave2->SetY1NDC(0.6); - pave2->SetY2NDC(0.9); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - htemp2->Draw("Esames"); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); - pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); - pave3->SetOptStat(000); - pave3->SetBorderSize(2); - pave3->SetLineColor(kBlue); - pave3->SetFillStyle(0); - pave3->SetTextSize(pave3->GetTextSize()*1.7); - pave3->SetTextColor(kBlue); - pave3->SetX1NDC(0.11); - pave3->SetX2NDC(0.33); - pave3->SetY1NDC(0.6); - pave3->SetY2NDC(0.9); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); - - Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); - - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); - (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Close(); - - delete htemp1 ; - delete htemp2 ; - } - } - - } - - // Final way to represent the results - - TH2F* inclusiveMeanIC = new TH2F("inclusiveMeanIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - TH2F* inclusiveRMSIC = new TH2F("inclusiveRMSIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - - TH2F* inclusiveGausMeanIC = new TH2F("inclusiveGausMeanIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - TH2F* inclusiveGausRMSIC = new TH2F("inclusiveGausRMSIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - - TH2F* inclusiveMeanIC_EBP = new TH2F("inclusiveMeanIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - TH2F* inclusiveRMSIC_EBP = new TH2F("inclusiveRMSIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - - TH2F* inclusiveGausMeanIC_EBP = new TH2F("inclusiveGausMeanIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - TH2F* inclusiveGausRMSIC_EBP = new TH2F("inclusiveGausRMSIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - - TH2F* inclusiveMeanIC_EBM = new TH2F("inclusiveMeanIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - TH2F* inclusiveRMSIC_EBM = new TH2F("inclusiveRMSIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - - TH2F* inclusiveGausMeanIC_EBM = new TH2F("inclusiveGausMeanIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - TH2F* inclusiveGausRMSIC_EBM = new TH2F("inclusiveGausRMSIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; - - std::vector EtaBinned_MeanIC (iEtaBinDivision.size()-1); - std::vector PhiBinned_MeanIC (iPhiBinDivision.size()-1); - std::vector SMBinned_MeanIC (int(20/NPhiSMBinDivision)); - - std::vector EtaBinned_GausMeanIC (iEtaBinDivision.size()-1); - std::vector PhiBinned_GausMeanIC (iPhiBinDivision.size()-1); - std::vector SMBinned_GausMeanIC (int(20/NPhiSMBinDivision)); - - std::vector EtaBinned_RMSIC (iEtaBinDivision.size()-1); - std::vector PhiBinned_RMSIC (iPhiBinDivision.size()-1); - std::vector SMBinned_RMSIC (int(20/NPhiSMBinDivision)); - - std::vector EtaBinned_GausRMSIC (iEtaBinDivision.size()-1); - std::vector PhiBinned_GausRMSIC (iPhiBinDivision.size()-1); - std::vector SMBinned_GausRMSIC (int(20/NPhiSMBinDivision)); - - for(int iEtaBin = 0; iEtaBinSetBinContent(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetMean()); - inclusiveMeanIC->SetBinError(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetMeanError()); - - if(!isDeadTriggerTower){ inclusiveGausMeanIC->SetBinContent(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParameter(1)); - inclusiveGausMeanIC->SetBinError(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParError(1)); - } - - inclusiveRMSIC->SetBinContent(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetRMS()); - inclusiveRMSIC->SetBinError(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetRMSError()); - - if(!isDeadTriggerTower){ inclusiveGausRMSIC->SetBinContent(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParameter(2)); - inclusiveGausRMSIC->SetBinError(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParError(2)); - } - - inclusiveMeanIC_EBP->SetBinContent(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetMean()); - inclusiveMeanIC_EBP->SetBinError(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetMeanError()); - - if(!isDeadTriggerTower){ inclusiveGausMeanIC_EBP->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParameter(1)); - inclusiveGausMeanIC_EBP->SetBinError(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParError(1)); - } - - inclusiveRMSIC_EBP->SetBinContent(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetRMS()); - inclusiveRMSIC_EBP->SetBinError(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetRMSError()); - - if(!isDeadTriggerTower){ inclusiveGausRMSIC_EBP->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParameter(2)); - inclusiveGausRMSIC_EBP->SetBinError(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParError(2)); - } - - inclusiveMeanIC_EBM->SetBinContent(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetMean()); - inclusiveMeanIC_EBM->SetBinError(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetMeanError()); - - if(!isDeadTriggerTower){ inclusiveGausMeanIC_EBM->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParameter(1)); - inclusiveGausMeanIC_EBM->SetBinError(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParError(1)); - } - - inclusiveRMSIC_EBM->SetBinContent(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetRMS()); - inclusiveRMSIC_EBM->SetBinError(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetRMSError()); - - if(!isDeadTriggerTower){ inclusiveGausRMSIC_EBM->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParameter(2)); - inclusiveGausRMSIC_EBM->SetBinError(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParError(2)); - } - - for(int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ - - EtaBinned_MeanIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetMean()); - EtaBinned_MeanIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetMeanError()); - - EtaBinned_RMSIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetRMS()); - EtaBinned_RMSIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetRMSError()); - - if(!isDeadTriggerTower){ EtaBinned_GausMeanIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParameter(1)); - EtaBinned_GausMeanIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParError(1)); - - EtaBinned_GausRMSIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParameter(2)); - EtaBinned_GausRMSIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParError(2)); - } - } - - for(int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ - - PhiBinned_MeanIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetMean()); - PhiBinned_MeanIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetMeanError()); - - PhiBinned_RMSIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetRMS()); - PhiBinned_RMSIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetRMSError()); - - if(!isDeadTriggerTower){ PhiBinned_GausMeanIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParameter(1)); - PhiBinned_GausMeanIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParError(1)); - - PhiBinned_GausRMSIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParameter(2)); - PhiBinned_GausRMSIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParError(2)); - } - } - - for(int iSMBin = 0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ - - SMBinned_MeanIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetMean()); - SMBinned_MeanIC[iSMBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetMeanError()); - - SMBinned_RMSIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetRMS()); - SMBinned_RMSIC[iSMBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetRMSError()); - - if(!isDeadTriggerTower){ SMBinned_GausMeanIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParameter(1)); - SMBinned_GausMeanIC[iSMBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParError(1)); - - SMBinned_GausRMSIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParameter(2)); - SMBinned_GausRMSIC[iSMBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParError(2)); - } - } - } - } - - TCanvas* Can_inclusiveMeanIC = new TCanvas("Can_inclusiveMeanIC","",600,500); - TCanvas* Can_inclusiveRMSIC = new TCanvas("Can_inclusiveRMSIC","",600,500); - - TCanvas* Can_inclusiveGausMeanIC = new TCanvas("Can_inclusiveGausMeanIC","",600,500); - TCanvas* Can_inclusiveGausRMSIC = new TCanvas("Can_inclusiveGausRMSIC","",600,500); - - TCanvas* Can_inclusiveMeanIC_EBP = new TCanvas("Can_inclusiveMeanIC_EBP","",600,500); - TCanvas* Can_inclusiveRMSIC_EBP = new TCanvas("Can_inclusiveRMSIC_EBP","",600,500); - - TCanvas* Can_inclusiveGausMeanIC_EBP = new TCanvas("Can_inclusiveGausMeanIC_EBP","",600,500); - TCanvas* Can_inclusiveGausRMSIC_EBP = new TCanvas("Can_inclusiveGausRMSIC_EBP","",600,500); - - TCanvas* Can_inclusiveMeanIC_EBM = new TCanvas("Can_inclusiveMeanIC_EBM","",600,500); - TCanvas* Can_inclusiveRMSIC_EBM = new TCanvas("Can_inclusiveRMSIC_EBM","",600,500); - - TCanvas* Can_inclusiveGausMeanIC_EBM = new TCanvas("Can_inclusiveGausMeanIC_EBM","",600,500); - TCanvas* Can_inclusiveGausRMSIC_EBM = new TCanvas("Can_inclusiveGausRMSIC_EBM","",600,500); - - std::vector Can_EtaBinned_MeanIC (iEtaBinDivision.size()-1); - std::vector Can_PhiBinned_MeanIC (iPhiBinDivision.size()-1); - std::vector Can_SMBinned_MeanIC (int(20/NPhiSMBinDivision)); - - std::vector Can_EtaBinned_GausMeanIC (iEtaBinDivision.size()-1); - std::vector Can_PhiBinned_GausMeanIC (iPhiBinDivision.size()-1); - std::vector Can_SMBinned_GausMeanIC (int(20/NPhiSMBinDivision)); - - std::vector Can_EtaBinned_RMSIC (iEtaBinDivision.size()-1); - std::vector Can_PhiBinned_RMSIC (iPhiBinDivision.size()-1); - std::vector Can_SMBinned_RMSIC (int(20/NPhiSMBinDivision)); - - std::vector Can_EtaBinned_GausRMSIC (iEtaBinDivision.size()-1); - std::vector Can_PhiBinned_GausRMSIC (iPhiBinDivision.size()-1); - std::vector Can_SMBinned_GausRMSIC (int(20/NPhiSMBinDivision)); - - gStyle->SetOptStat(00000); - - - Can_inclusiveMeanIC->cd(); - Can_inclusiveMeanIC->SetGridx(); - Can_inclusiveMeanIC->SetGridy(); - inclusiveMeanIC->GetXaxis()->SetTitle("i#phi"); - inclusiveMeanIC->GetYaxis()->SetTitle("i#eta"); - inclusiveMeanIC->Draw("colz"); - if(!isDeadTriggerTower) inclusiveMeanIC->SetMinimum(inclusiveMeanIC->GetMinimum()+0.9); - else inclusiveMeanIC->SetMinimum(inclusiveMeanIC->GetMinimum()+0.75); - inclusiveMeanIC->Draw("textSAME"); - Can_inclusiveMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC->GetName())+".png").c_str(),"png"); - - Can_inclusiveRMSIC->cd(); - Can_inclusiveRMSIC->SetGridx(); - Can_inclusiveRMSIC->SetGridy(); - inclusiveRMSIC->GetXaxis()->SetTitle("i#phi"); - inclusiveRMSIC->GetYaxis()->SetTitle("i#eta"); - inclusiveRMSIC->Draw("colz"); - inclusiveRMSIC->Draw("textSAME"); - Can_inclusiveRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC->GetName())+".png").c_str(),"png"); - - if(!isDeadTriggerTower){ - Can_inclusiveGausMeanIC->cd(); - Can_inclusiveGausMeanIC->SetGridx(); - Can_inclusiveGausMeanIC->SetGridy(); - inclusiveGausMeanIC->SetMinimum(inclusiveGausMeanIC->GetMinimum()+0.9); - inclusiveGausMeanIC->GetXaxis()->SetTitle("i#phi"); - inclusiveGausMeanIC->GetYaxis()->SetTitle("i#eta"); - inclusiveGausMeanIC->Draw("colz"); - inclusiveGausMeanIC->Draw("textSAME"); - Can_inclusiveGausMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveGausMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC->GetName())+".png").c_str(),"png"); - - Can_inclusiveGausRMSIC->cd(); - Can_inclusiveGausRMSIC->SetGridx(); - Can_inclusiveGausRMSIC->SetGridy(); - inclusiveGausRMSIC->GetXaxis()->SetTitle("i#phi"); - inclusiveGausRMSIC->GetYaxis()->SetTitle("i#eta"); - inclusiveGausRMSIC->Draw("colz"); - inclusiveGausRMSIC->Draw("textSAME"); - Can_inclusiveGausRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveGausRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC->GetName())+".png").c_str(),"png"); - } - - Can_inclusiveMeanIC_EBP->cd(); - Can_inclusiveMeanIC_EBP->SetGridx(); - Can_inclusiveMeanIC_EBP->SetGridy(); - inclusiveMeanIC_EBP->GetXaxis()->SetTitle("i#phi"); - inclusiveMeanIC_EBP->GetYaxis()->SetTitle("i#eta"); - if(!isDeadTriggerTower) inclusiveMeanIC_EBP->SetMinimum(inclusiveMeanIC_EBP->GetMinimum()+0.9); - else inclusiveMeanIC_EBP->SetMinimum(inclusiveMeanIC_EBP->GetMinimum()+0.75); - inclusiveMeanIC_EBP->Draw("colz"); - inclusiveMeanIC_EBP->Draw("textSAME"); - Can_inclusiveMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBP->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBP->GetName())+".png").c_str(),"png"); - - Can_inclusiveRMSIC_EBP->cd(); - Can_inclusiveRMSIC_EBP->SetGridx(); - Can_inclusiveRMSIC_EBP->SetGridy(); - inclusiveRMSIC_EBP->GetXaxis()->SetTitle("i#phi"); - inclusiveRMSIC_EBP->GetYaxis()->SetTitle("i#eta"); - inclusiveRMSIC_EBP->Draw("colz"); - inclusiveRMSIC_EBP->Draw("textSAME"); - Can_inclusiveRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBP->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBP->GetName())+".png").c_str(),"png"); - - if(!isDeadTriggerTower){ - Can_inclusiveGausMeanIC_EBP->cd(); - Can_inclusiveGausMeanIC_EBP->SetGridx(); - Can_inclusiveGausMeanIC_EBP->SetGridy(); - inclusiveGausMeanIC_EBP->GetXaxis()->SetTitle("i#phi"); - inclusiveGausMeanIC_EBP->GetYaxis()->SetTitle("i#eta"); - inclusiveGausMeanIC_EBP->SetMinimum(inclusiveGausMeanIC_EBP->GetMinimum()+0.9); - inclusiveGausMeanIC_EBP->Draw("colz"); - inclusiveGausMeanIC_EBP->Draw("textSAME"); - Can_inclusiveGausMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBP->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveGausMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBP->GetName())+".png").c_str(),"png"); - - Can_inclusiveGausRMSIC_EBP->cd(); - Can_inclusiveGausRMSIC_EBP->SetGridx(); - Can_inclusiveGausRMSIC_EBP->SetGridy(); - inclusiveGausRMSIC_EBP->GetXaxis()->SetTitle("i#phi"); - inclusiveGausRMSIC_EBP->GetYaxis()->SetTitle("i#eta"); - inclusiveGausRMSIC_EBP->Draw("colz"); - inclusiveGausRMSIC_EBP->Draw("textSAME"); - Can_inclusiveGausRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBP->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveGausRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBP->GetName())+".png").c_str(),"png"); - } - - Can_inclusiveMeanIC_EBM->cd(); - Can_inclusiveMeanIC_EBM->SetGridx(); - Can_inclusiveMeanIC_EBM->SetGridy(); - inclusiveMeanIC_EBM->GetXaxis()->SetTitle("i#phi"); - inclusiveMeanIC_EBM->GetYaxis()->SetTitle("i#eta"); - if(!isDeadTriggerTower) inclusiveMeanIC_EBM->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.9); - else inclusiveMeanIC_EBM->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.75); - inclusiveMeanIC_EBM->Draw("colz"); - inclusiveMeanIC_EBM->Draw("textSAME"); - Can_inclusiveMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBM->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBM->GetName())+".png").c_str(),"png"); - - Can_inclusiveRMSIC_EBM->cd(); - Can_inclusiveRMSIC_EBM->SetGridx(); - Can_inclusiveRMSIC_EBM->SetGridy(); - inclusiveRMSIC_EBM->GetXaxis()->SetTitle("i#phi"); - inclusiveRMSIC_EBM->GetYaxis()->SetTitle("i#eta"); - inclusiveRMSIC_EBM->Draw("colz"); - inclusiveRMSIC_EBM->Draw("textSAME"); - Can_inclusiveRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBM->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBM->GetName())+".png").c_str(),"png"); - - if(!isDeadTriggerTower){ - Can_inclusiveGausMeanIC_EBM->cd(); - Can_inclusiveGausMeanIC_EBM->SetGridx(); - Can_inclusiveGausMeanIC_EBM->SetGridy(); - inclusiveGausMeanIC_EBM->GetXaxis()->SetTitle("i#phi"); - inclusiveGausMeanIC_EBM->GetYaxis()->SetTitle("i#eta"); - inclusiveGausMeanIC_EBM->SetMinimum(inclusiveGausMeanIC_EBM->GetMinimum()+0.9); - inclusiveGausMeanIC_EBM->Draw("colz"); - inclusiveGausMeanIC_EBM->Draw("textSAME"); - Can_inclusiveGausMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBM->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveGausMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBM->GetName())+".png").c_str(),"png"); - - Can_inclusiveGausRMSIC_EBM->cd(); - Can_inclusiveGausRMSIC_EBM->SetGridx(); - Can_inclusiveGausRMSIC_EBM->SetGridy(); - inclusiveGausRMSIC_EBM->GetXaxis()->SetTitle("i#phi"); - inclusiveGausRMSIC_EBM->GetYaxis()->SetTitle("i#eta"); - inclusiveGausRMSIC_EBM->Draw("colz"); - inclusiveGausRMSIC_EBM->Draw("textSAME"); - Can_inclusiveGausRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBM->GetName())+".pdf").c_str(),"pdf"); - Can_inclusiveGausRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBM->GetName())+".png").c_str(),"png"); - } - - for(int iEtaBin = 0; iEtaBin< int(EtaBinned_MeanIC.size()) ; iEtaBin++){ - - Can_EtaBinned_MeanIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_MeanIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); - Can_EtaBinned_RMSIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_RMSIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); - Can_EtaBinned_GausMeanIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_GausMeanIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)), - int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); - Can_EtaBinned_GausRMSIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_GausRMSIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)), - int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); - - Can_EtaBinned_MeanIC[iEtaBin]->cd(); - Can_EtaBinned_MeanIC[iEtaBin]->SetGridx(); - Can_EtaBinned_MeanIC[iEtaBin]->SetGridy(); - EtaBinned_MeanIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); - EtaBinned_MeanIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); - if(!isDeadTriggerTower) EtaBinned_MeanIC[iEtaBin]->SetMinimum(EtaBinned_MeanIC[iEtaBin]->GetMinimum()+0.9); - else EtaBinned_MeanIC[iEtaBin]->SetMinimum(EtaBinned_MeanIC[iEtaBin]->GetMinimum()+0.75); - EtaBinned_MeanIC[iEtaBin]->Draw("colz"); - EtaBinned_MeanIC[iEtaBin]->Draw("textSAME"); - Can_EtaBinned_MeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_MeanIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); - Can_EtaBinned_MeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_MeanIC[iEtaBin]->GetName())+".png").c_str(),"png"); - - Can_EtaBinned_RMSIC[iEtaBin]->cd(); - Can_EtaBinned_RMSIC[iEtaBin]->SetGridx(); - Can_EtaBinned_RMSIC[iEtaBin]->SetGridy(); - EtaBinned_RMSIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); - EtaBinned_RMSIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); - EtaBinned_RMSIC[iEtaBin]->Draw("colz"); - EtaBinned_RMSIC[iEtaBin]->Draw("textSAME"); - Can_EtaBinned_RMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); - Can_EtaBinned_RMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".png").c_str(),"png"); - - if(!isDeadTriggerTower){ - Can_EtaBinned_GausMeanIC[iEtaBin]->cd(); - Can_EtaBinned_GausMeanIC[iEtaBin]->SetGridx(); - Can_EtaBinned_GausMeanIC[iEtaBin]->SetGridy(); - EtaBinned_GausMeanIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); - EtaBinned_GausMeanIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); - EtaBinned_GausMeanIC[iEtaBin]->SetMinimum(EtaBinned_GausMeanIC[iEtaBin]->GetMinimum()+0.9); - EtaBinned_GausMeanIC[iEtaBin]->Draw("colz"); - EtaBinned_GausMeanIC[iEtaBin]->Draw("textSAME"); - Can_EtaBinned_GausMeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_GausMeanIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); - Can_EtaBinned_GausMeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_GausMeanIC[iEtaBin]->GetName())+".png").c_str(),"png"); - Can_EtaBinned_GausRMSIC[iEtaBin]->cd(); - Can_EtaBinned_GausRMSIC[iEtaBin]->SetGridx(); - Can_EtaBinned_GausRMSIC[iEtaBin]->SetGridy(); - EtaBinned_GausRMSIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); - EtaBinned_GausRMSIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); - EtaBinned_GausRMSIC[iEtaBin]->Draw("colz"); - EtaBinned_GausRMSIC[iEtaBin]->Draw("textSAME"); - Can_EtaBinned_GausRMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); - Can_EtaBinned_GausRMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".png").c_str(),"png"); - } - } - - for(int iPhiBin = 0; iPhiBincd(); - Can_PhiBinned_MeanIC[iPhiBin]->SetGridx(); - Can_PhiBinned_MeanIC[iPhiBin]->SetGridy(); - PhiBinned_MeanIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); - PhiBinned_MeanIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); - if(!isDeadTriggerTower) PhiBinned_MeanIC[iPhiBin]->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.9); - else PhiBinned_MeanIC[iPhiBin]->SetMinimum(PhiBinned_MeanIC[iPhiBin]->GetMinimum()+0.75); - PhiBinned_MeanIC[iPhiBin]->Draw("colz"); - PhiBinned_MeanIC[iPhiBin]->Draw("textSAME"); - Can_PhiBinned_MeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_MeanIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); - Can_PhiBinned_MeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_MeanIC[iPhiBin]->GetName())+".png").c_str(),"png"); - - Can_PhiBinned_RMSIC[iPhiBin]->cd(); - Can_PhiBinned_RMSIC[iPhiBin]->SetGridx(); - Can_PhiBinned_RMSIC[iPhiBin]->SetGridy(); - PhiBinned_RMSIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); - PhiBinned_RMSIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); - PhiBinned_RMSIC[iPhiBin]->Draw("colz"); - PhiBinned_RMSIC[iPhiBin]->Draw("textSAME"); - Can_PhiBinned_RMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); - Can_PhiBinned_RMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".png").c_str(),"png"); - - - if(!isDeadTriggerTower){ - Can_PhiBinned_GausMeanIC[iPhiBin]->cd(); - Can_PhiBinned_GausMeanIC[iPhiBin]->SetGridx(); - Can_PhiBinned_GausMeanIC[iPhiBin]->SetGridy(); - PhiBinned_GausMeanIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); - PhiBinned_GausMeanIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); - PhiBinned_GausMeanIC[iPhiBin]->SetMinimum(PhiBinned_GausMeanIC[iPhiBin]->GetMinimum()+0.9); - PhiBinned_GausMeanIC[iPhiBin]->Draw("colz"); - PhiBinned_GausMeanIC[iPhiBin]->Draw("textSAME"); - Can_PhiBinned_GausMeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_GausMeanIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); - Can_PhiBinned_GausMeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_GausMeanIC[iPhiBin]->GetName())+".png").c_str(),"png"); - - Can_PhiBinned_GausRMSIC[iPhiBin]->cd(); - Can_PhiBinned_GausRMSIC[iPhiBin]->SetGridx(); - Can_PhiBinned_GausRMSIC[iPhiBin]->SetGridy(); - PhiBinned_GausRMSIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); - PhiBinned_GausRMSIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); - PhiBinned_GausRMSIC[iPhiBin]->Draw("colz"); - PhiBinned_GausRMSIC[iPhiBin]->Draw("textSAME"); - Can_PhiBinned_GausRMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); - Can_PhiBinned_GausRMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".png").c_str(),"png"); - } - } - - for(int iSMBin = 0; iSMBincd(); - Can_SMBinned_MeanIC[iSMBin]->SetGridx(); - Can_SMBinned_MeanIC[iSMBin]->SetGridy(); - SMBinned_MeanIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); - SMBinned_MeanIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); - if(!isDeadTriggerTower) SMBinned_MeanIC[iSMBin]->SetMinimum(SMBinned_MeanIC[iSMBin]->GetMinimum()+0.9); - else SMBinned_MeanIC[iSMBin]->SetMinimum(SMBinned_MeanIC[iSMBin]->GetMinimum()+0.75); - SMBinned_MeanIC[iSMBin]->Draw("colz"); - SMBinned_MeanIC[iSMBin]->Draw("textSAME"); - Can_SMBinned_MeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_MeanIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); - Can_SMBinned_MeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_MeanIC[iSMBin]->GetName())+".png").c_str(),"png"); - - Can_SMBinned_RMSIC[iSMBin]->cd(); - Can_SMBinned_RMSIC[iSMBin]->SetGridx(); - Can_SMBinned_RMSIC[iSMBin]->SetGridy(); - SMBinned_RMSIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); - SMBinned_RMSIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); - SMBinned_RMSIC[iSMBin]->Draw("colz"); - SMBinned_RMSIC[iSMBin]->Draw("textSAME"); - Can_SMBinned_RMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); - Can_SMBinned_RMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".png").c_str(),"png"); - - if(!isDeadTriggerTower){ - Can_SMBinned_GausMeanIC[iSMBin]->cd(); - Can_SMBinned_GausMeanIC[iSMBin]->SetGridx(); - Can_SMBinned_GausMeanIC[iSMBin]->SetGridy(); - SMBinned_GausMeanIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); - SMBinned_GausMeanIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); - SMBinned_GausMeanIC[iSMBin]->SetMinimum(SMBinned_GausMeanIC[iSMBin]->GetMinimum()+0.9); - SMBinned_GausMeanIC[iSMBin]->Draw("colz"); - SMBinned_GausMeanIC[iSMBin]->Draw("textSAME"); - Can_SMBinned_GausMeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_GausMeanIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); - Can_SMBinned_GausMeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_GausMeanIC[iSMBin]->GetName())+".png").c_str(),"png"); - - Can_SMBinned_GausRMSIC[iSMBin]->cd(); - Can_SMBinned_GausRMSIC[iSMBin]->SetGridx(); - Can_SMBinned_GausRMSIC[iSMBin]->SetGridy(); - SMBinned_GausRMSIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); - SMBinned_GausRMSIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); - SMBinned_GausRMSIC[iSMBin]->Draw("colz"); - SMBinned_GausRMSIC[iSMBin]->Draw("textSAME"); - Can_SMBinned_GausRMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); - Can_SMBinned_GausRMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".png").c_str(),"png"); - } - } - - return 0; - -} - - -// LocalWords: ieta diff --git a/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp b/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp deleted file mode 100644 index 99a572a1973..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEB.cpp +++ /dev/null @@ -1,207 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include "TFile.h" -#include "TStyle.h" -#include "TMath.h" -#include "TH2F.h" -#include "TH1F.h" -#include "TGraphErrors.h" -#include "TCanvas.h" -#include "TF1.h" -#include "TROOT.h" -#include "TLegend.h" -#include "TPaveStats.h" -#include "TApplication.h" -#include "../interface/TEndcapRings.h" - -using namespace std ; - -int main(int argc, char**argv){ - - - const char* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root"; - const char* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root"; - int evalStat = 1; - int inputLoops = 25; - - const int nLoops = inputLoops; - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(1); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - - if ( evalStat && (!infile2 || !infile3 )){ - cout << " No input files to evaluate statistical precision specified !" << endl; - return -1; - } - - cout << "Making calibration plots for: " << infile2 << endl; - - TApplication* theApp = new TApplication("Application",&argc, argv); - - char hname[100]; - - TF1 *fgaus = new TF1("fgaus","gaus",-10,10); - - TF1 *pol0_0 = new TF1("pol0_0","pol1",0,20); - TF1 *pol0_1 = new TF1("pol0_1","pol1",20,40); - TF1 *pol0_2 = new TF1("pol0_2","pol1",40,60); - TF1 *pol0_3 = new TF1("pol0_3","pol1",60,85); - - TFile *f2 = new TFile(infile2); - TFile *f3 = new TFile(infile3); - TH2F *hcmap2[nLoops]; - TH2F *hcmap3[nLoops]; - - TGraphErrors *statprecision_vs_ieta[nLoops]; - TGraphErrors *statprecision_vs_loop[4]; - - int ipoint = 0; - - for ( int ietaregion=0; ietaregion<4; ietaregion++){ - - statprecision_vs_loop[ietaregion] = new TGraphErrors(); - statprecision_vs_loop[ietaregion]->SetMarkerStyle(20); - statprecision_vs_loop[ietaregion]->SetMarkerSize(1); - statprecision_vs_loop[ietaregion]->SetMarkerColor(kBlue+2); - if (ietaregion == 0) statprecision_vs_loop[ietaregion]->SetTitle("i#eta < 20"); - if (ietaregion == 1) statprecision_vs_loop[ietaregion]->SetTitle("20 < i#eta < 40"); - if (ietaregion == 2) statprecision_vs_loop[ietaregion]->SetTitle("40 < i#eta < 60"); - if (ietaregion == 3) statprecision_vs_loop[ietaregion]->SetTitle("60 < i#eta < 85"); - } - - - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - sprintf(hname,"h2_%d_hC_scale_EB",iLoop); - hcmap2[iLoop] = (TH2F*)f2->Get(hname); - hcmap3[iLoop] = (TH2F*)f3->Get(hname); - - TH1F *hstatprecision[171]; - - for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ - - float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(jbin); - sprintf(hname,"hstatprecision_ring_ieta%02f_%d",etaring,iLoop); - hstatprecision[jbin-1] = new TH1F(hname, hname, 150,-0.5,0.5); - for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ - - float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); - float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ - hstatprecision[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample - - } - } - } - - - statprecision_vs_ieta[iLoop] = new TGraphErrors(); - statprecision_vs_ieta[iLoop]->SetMarkerStyle(20); - statprecision_vs_ieta[iLoop]->SetMarkerSize(1); - statprecision_vs_ieta[iLoop]->SetMarkerColor(kRed+2); - - int n = 0; - - for (int i = 1; i < hcmap2[iLoop]-> GetNbinsY()+1; i++){ - float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(i); - if (int(etaring)==0) continue; - if ( hstatprecision[i-1]->GetEntries() == 0) continue; - float e = 0.5*hcmap2[iLoop]-> GetYaxis()->GetBinWidth(i); - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hstatprecision[i-1]->GetRMS()); - fgaus->SetRange(-5*hstatprecision[i-1]->GetRMS(),5*hstatprecision[i-1]->GetRMS()); - hstatprecision[i-1]->Fit("fgaus","QR"); - statprecision_vs_ieta[iLoop]-> SetPoint(n,etaring,fgaus->GetParameter(2)); - statprecision_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); - n++; - } - - statprecision_vs_ieta[iLoop]->Fit("pol0_0","QR"); - statprecision_vs_ieta[iLoop]->Fit("pol0_1","QR"); - statprecision_vs_ieta[iLoop]->Fit("pol0_2","QR"); - statprecision_vs_ieta[iLoop]->Fit("pol0_3","QR"); - - statprecision_vs_loop[0]->SetPoint(ipoint,iLoop+1,pol0_0->GetParameter(0)+pol0_0->GetParameter(1)*10); - statprecision_vs_loop[0]->SetPointError(ipoint,0.5,sqrt(pol0_0->GetParError(0)*pol0_0->GetParError(0)+pol0_0->GetParError(1)*pol0_0->GetParError(1))); - statprecision_vs_loop[1]->SetPoint(ipoint,iLoop+1,pol0_1->GetParameter(0)+pol0_1->GetParameter(1)*30); - statprecision_vs_loop[1]->SetPointError(ipoint,0.5,sqrt(pol0_1->GetParError(0)*pol0_1->GetParError(0)+pol0_1->GetParError(1)*pol0_1->GetParError(1))); - statprecision_vs_loop[2]->SetPoint(ipoint,iLoop+1,pol0_2->GetParameter(0)+pol0_2->GetParameter(1)*50); - statprecision_vs_loop[2]->SetPointError(ipoint,0.5,sqrt(pol0_0->GetParError(0)*pol0_2->GetParError(0)+pol0_2->GetParError(1)*pol0_2->GetParError(1))); - statprecision_vs_loop[3]->SetPoint(ipoint,iLoop+1,pol0_3->GetParameter(0)+pol0_3->GetParameter(1)*72.5); - statprecision_vs_loop[3]->SetPointError(ipoint,0.5,sqrt(pol0_3->GetParError(0)*pol0_3->GetParError(0)+pol0_3->GetParError(1)*pol0_3->GetParError(1))); - ipoint++; - - } - - //----------------------------------------------------------------- - //--- Draw plots - //----------------------------------------------------------------- - TCanvas *c[nLoops]; - TCanvas *c2[4]; - - TFile * out = new TFile ("StatPrecEB.root","RECREATE"); - // --- plot 5 : statistical precision vs ieta - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - sprintf(hname,"cstat_%d",iLoop); - c[iLoop] = new TCanvas(hname,hname); - c[iLoop]->SetGridx(); - c[iLoop]->SetGridy(); - statprecision_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.07); - statprecision_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - statprecision_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); - statprecision_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - statprecision_vs_ieta[iLoop]->Draw("ap"); - - if(iLoop == nLoops -1){ - out->cd(); - statprecision_vs_ieta[iLoop]->SetName("gr_stat_prec"); - statprecision_vs_ieta[iLoop]->Write(); - } - - } - - - for ( int ietaregion = 0; ietaregion < 4; ietaregion++ ) { - - sprintf(hname,"ietaregion_%d",ietaregion); - c2[ietaregion] = new TCanvas(hname,hname); - c2[ietaregion]->SetGridx(); - c2[ietaregion]->SetGridy(); - statprecision_vs_loop[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.04); - statprecision_vs_loop[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); - statprecision_vs_loop[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); - statprecision_vs_loop[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); - statprecision_vs_loop[ietaregion]->Draw("ap"); - } - - theApp->Run(); - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp b/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp deleted file mode 100644 index b3bd09dca17..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/DrawPrecisionPlotsEE.cpp +++ /dev/null @@ -1,319 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include "TFile.h" -#include "TStyle.h" -#include "TMath.h" -#include "TH2F.h" -#include "TH1F.h" -#include "TGraphErrors.h" -#include "TCanvas.h" -#include "TF1.h" -#include "TROOT.h" -#include "TLegend.h" -#include "TPaveStats.h" -#include "TApplication.h" -#include "../interface/TEndcapRings.h" - -using namespace std ; - -int main(int argc, char**argv){ - - // Foundamental parameters - const char* infile2 = "/data1/rgerosa/L3_Weight/16Jan_LC_20120131_FT_R_42_V24/Even_WZAnalysis_WElectron_ZElectron_42XReReco_16Jan_LC_20120131_FT_R_42_V24_Z_R9_EE.root "; - const char* infile3 = "/data1/rgerosa/L3_Weight/16Jan_LC_20120131_FT_R_42_V24/Odd_WZAnalysis_WElectron_ZElectron_42XReReco_16Jan_LC_20120131_FT_R_42_V24_Z_R9_EE.root"; - int evalStat = 1; - int inputLoops = 25; - - const int nLoops = inputLoops; - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(1); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - TApplication* theApp = new TApplication("Application",&argc, argv); - - - if ( evalStat && (!infile2 || !infile3 )){ - cout << " No input files to evaluate statistical precision specified !" << endl; - return -1; - } - - cout << "Making calibration plots for: " << infile2 << endl; - - char hname[100]; - - // Functions for fit - - TF1 *fgaus = new TF1("fgaus","gaus",-10,10); - - TF1 *pol0_0EEP = new TF1("pol0_0EEP","pol1",85,95); - TF1 *pol0_1EEP= new TF1("pol0_1EEP","pol1",95,105); - TF1 *pol0_2EEP = new TF1("pol0_2EEP","pol1",105,125); - TF1 *pol0_0EEM = new TF1("pol0_0EEM","pol1",85,95); - TF1 *pol0_1EEM= new TF1("pol0_1EEM","pol1",95,105); - TF1 *pol0_2EEM = new TF1("pol0_2EEM","pol1",105,125); - - TGraphErrors *statprecision_vs_ietaEEP[nLoops]; - TGraphErrors *statprecision_vs_ietaEEM[nLoops]; - - TGraphErrors *statprecision_vs_loopEEP[3]; - TGraphErrors *statprecision_vs_loopEEM[3]; - - - int ipointEEP = 0; - int ipointEEM = 0; - - TFile *f2 = new TFile(infile2); - TFile *f3 = new TFile(infile3); - TH2F *hcmap1EEP[nLoops]; - TH2F *hcmap1EEM[nLoops]; - TH2F *hcmap2EEP[nLoops]; - TH2F *hcmap2EEM[nLoops]; - - - for ( int ietaregion=0; ietaregion<3; ietaregion++){ - - statprecision_vs_loopEEP[ietaregion] = new TGraphErrors(); - statprecision_vs_loopEEP[ietaregion]->SetMarkerStyle(20); - statprecision_vs_loopEEP[ietaregion]->SetMarkerColor(kBlue+2); - - statprecision_vs_loopEEM[ietaregion] = new TGraphErrors(); - statprecision_vs_loopEEM[ietaregion]->SetMarkerStyle(20); - statprecision_vs_loopEEM[ietaregion]->SetMarkerColor(kBlue+2); - - if (ietaregion == 0) statprecision_vs_loopEEP[ietaregion]->SetTitle("85SetTitle("100 < i#eta < 110"); - if (ietaregion == 2) statprecision_vs_loopEEP[ietaregion]->SetTitle("110 < i#eta < 125"); - - if (ietaregion == 0) statprecision_vs_loopEEM[ietaregion]->SetTitle("85SetTitle("100 < i#eta < 110"); - if (ietaregion == 2) statprecision_vs_loopEEM[ietaregion]->SetTitle("110 < i#eta < 125"); - - } - - // analyze each iteration loop step - - TEndcapRings *eRings = new TEndcapRings(); - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - sprintf(hname,"h2_%d_hC_scale_EEP",iLoop); - hcmap1EEP[iLoop] = (TH2F*)f2->Get(hname); - hcmap2EEP[iLoop] = (TH2F*)f3->Get(hname); - - sprintf(hname,"h2_%d_hC_scale_EEM",iLoop); - hcmap1EEM[iLoop] = (TH2F*)f2->Get(hname); - hcmap2EEM[iLoop] = (TH2F*)f3->Get(hname); - - // compute statistical precision - TH1F *hstatprecisionEEP[40]; - TH1F *hstatprecisionEEM[40]; - - for(int i =0;i<40; i++){ - - sprintf(hname,"hstatprecision_ring_ieta_EEP%02d_iLoop%02d",i,iLoop); - hstatprecisionEEP[i] = new TH1F(hname, hname, 100,-0.4,0.4); - sprintf(hname,"hstatprecision_ring_ieta_EEM%02d_iLoop%02d",i,iLoop); - hstatprecisionEEM[i] = new TH1F(hname, hname, 100,-0.4,0.4); - } - - for (int ix = 1; ix < hcmap1EEP[iLoop]-> GetNbinsX()+1; ix++){ - for (int iy = 1; iy < hcmap1EEP[iLoop]-> GetNbinsY()+1; iy++){ - - if( hcmap1EEP[iLoop]->GetBinContent(ix,iy) ==0 || hcmap2EEP[iLoop]->GetBinContent(ix,iy) ==0 ) continue; - int etaring = int(fabs(eRings->GetEndcapIeta(ix,iy,1))); - if(etaring<0) continue; - float ic1 = hcmap1EEP[iLoop]->GetBinContent(ix,iy); - float ic2 = hcmap2EEP[iLoop]->GetBinContent(ix,iy); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ - hstatprecisionEEP[etaring-86]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire - - } - } - } - - for (int ix = 1; ix < hcmap1EEM[iLoop]-> GetNbinsX()+1; ix++){ - for (int iy = 1; iy < hcmap1EEM[iLoop]-> GetNbinsY()+1; iy++){ - - if( hcmap1EEM[iLoop]->GetBinContent(ix,iy) ==0 || hcmap2EEM[iLoop]->GetBinContent(ix,iy) ==0 ) continue; - int etaring = int(fabs(eRings->GetEndcapIeta(ix,iy,-1))); - if(etaring<0) continue; - float ic1 = hcmap1EEM[iLoop]->GetBinContent(ix,iy); - float ic2 = hcmap2EEM[iLoop]->GetBinContent(ix,iy); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ - hstatprecisionEEM[etaring-86]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample - - } - } - } - - - statprecision_vs_ietaEEP[iLoop] = new TGraphErrors(); - statprecision_vs_ietaEEP[iLoop]->SetMarkerStyle(20); - statprecision_vs_ietaEEP[iLoop]->SetMarkerSize(1); - statprecision_vs_ietaEEP[iLoop]->SetMarkerColor(kRed+2); - - int nEEP = 0; - int nEEM = 0; - for (int i = 0 ; i<33 ; i++){ - if ( hstatprecisionEEP[i]->GetEntries() <= 25) continue; - fgaus->SetParameter(1,hstatprecisionEEP[i]->GetMean()); - fgaus->SetParameter(2,hstatprecisionEEP[i]->GetRMS()); - fgaus->SetRange(-5*hstatprecisionEEP[i]->GetRMS(),5*hstatprecisionEEP[i]->GetRMS()); - hstatprecisionEEP[i]->Fit("fgaus","QRM"); - statprecision_vs_ietaEEP[iLoop]-> SetPoint(nEEP,86+i,fgaus->GetParameter(2)); - statprecision_vs_ietaEEP[iLoop]-> SetPointError(nEEP,0,fgaus->GetParError(2)); - nEEP++; - } - statprecision_vs_ietaEEP[iLoop]->Fit("pol0_0EEP","QMER"); - statprecision_vs_ietaEEP[iLoop]->Fit("pol0_1EEP","QMER"); - statprecision_vs_ietaEEP[iLoop]->Fit("pol0_2EEP","QMER"); - - statprecision_vs_loopEEP[0]->SetPoint(ipointEEP,iLoop+1,pol0_0EEP->GetParameter(0)+pol0_0EEP->GetParameter(1)*90); - statprecision_vs_loopEEP[0]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_0EEP->GetParError(0)*pol0_0EEP->GetParError(0)+pol0_0EEP->GetParError(1)*pol0_0EEP->GetParError(1))); - - - statprecision_vs_loopEEP[1]->SetPoint(ipointEEP,iLoop+1,pol0_1EEP->GetParameter(0)+pol0_1EEP->GetParameter(1)*100); - statprecision_vs_loopEEP[1]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_1EEP->GetParError(0)*pol0_1EEP->GetParError(0)+pol0_1EEP->GetParError(1)*pol0_1EEP->GetParError(1))); - - - statprecision_vs_loopEEP[2]->SetPoint(ipointEEP,iLoop+1,pol0_2EEP->GetParameter(0)+pol0_2EEP->GetParameter(1)*110); - statprecision_vs_loopEEP[2]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_2EEP->GetParError(0)*pol0_2EEP->GetParError(0)+pol0_2EEP->GetParError(1)*pol0_2EEP->GetParError(1))); - - - ipointEEP++; - - statprecision_vs_ietaEEM[iLoop] = new TGraphErrors(); - statprecision_vs_ietaEEM[iLoop]->SetMarkerStyle(20); - statprecision_vs_ietaEEM[iLoop]->SetMarkerSize(1); - statprecision_vs_ietaEEM[iLoop]->SetMarkerColor(kRed+2); - - for (int i = 0 ; i<33 ; i++){ - - if ( hstatprecisionEEM[i]->GetEntries() <= 25) continue; - fgaus->SetParameter(1,hstatprecisionEEM[i]->GetMean()); - fgaus->SetParameter(2,hstatprecisionEEM[i]->GetRMS()); - fgaus->SetRange(-5*hstatprecisionEEM[i]->GetRMS(),5*hstatprecisionEEM[i]->GetRMS()); - hstatprecisionEEM[i]->Fit("fgaus","QRM"); - statprecision_vs_ietaEEM[iLoop]-> SetPoint(nEEM,86+i,fgaus->GetParameter(2)); - statprecision_vs_ietaEEM[iLoop]-> SetPointError(nEEM,0,fgaus->GetParError(2)); - nEEM++; - } - - statprecision_vs_ietaEEM[iLoop]->Fit("pol0_0EEM","QRME"); - statprecision_vs_ietaEEM[iLoop]->Fit("pol0_1EEM","QRME"); - statprecision_vs_ietaEEM[iLoop]->Fit("pol0_2EEM","QRME"); - - statprecision_vs_loopEEM[0]->SetPoint(ipointEEM,iLoop+1,pol0_0EEM->GetParameter(0)+pol0_0EEM->GetParameter(1)*90); - statprecision_vs_loopEEM[0]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_0EEM->GetParError(0)*pol0_0EEM->GetParError(0)+pol0_0EEM->GetParError(1)*pol0_0EEM->GetParError(1))); - statprecision_vs_loopEEM[1]->SetPoint(ipointEEM,iLoop+1,pol0_1EEM->GetParameter(0)+pol0_1EEM->GetParameter(1)*100); - statprecision_vs_loopEEM[1]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_1EEM->GetParError(0)*pol0_1EEM->GetParError(0)+pol0_1EEM->GetParError(1)*pol0_1EEM->GetParError(1))); - statprecision_vs_loopEEM[2]->SetPoint(ipointEEM,iLoop+1,pol0_2EEM->GetParameter(0)+pol0_2EEM->GetParameter(1)*110); - statprecision_vs_loopEEM[2]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_2EEM->GetParError(0)*pol0_2EEM->GetParError(0)+pol0_2EEM->GetParError(1)*pol0_2EEM->GetParError(1))); - - - ipointEEM++; - - } - - - // DrawPlots - - TCanvas *cEEP[4]; - TCanvas *cEEM[4]; - - - // TFile * out = new TFile ("StatPrecEE.root","RECREATE"); - // --- plot 5 : statistical precision vs ieta - - /* for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - sprintf(hname,"cstat_EEP%d",iLoop); - c[iLoop] = new TCanvas(hname,hname); - c[iLoop]->SetGridx(); - c[iLoop]->SetGridy(); - statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.001,0.15); - statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); - statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); - statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - statprecision_vs_ietaEEP[iLoop]->Draw("ap"); - if(iLoop == nLoops -1) - { - out->cd(); - statprecision_vs_ietaEEP[iLoop]->SetName("gr_stat_precEEP"); - statprecision_vs_ietaEEP[iLoop]->Write(); - } - - }*/ - - - /* for ( int iLoop = nLoops; iLoop < nLoops*2; iLoop++ ) { - sprintf(hname,"cstat_EEM%d",iLoop-nLoops); - c[iLoop] = new TCanvas(hname,hname); - c[iLoop]->SetGridx(); - c[iLoop]->SetGridy(); - statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetYaxis()-> SetRangeUser(0.001,0.15); - statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetXaxis()-> SetRangeUser(-125,-85); - statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); - statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - statprecision_vs_ietaEEM[iLoop-nLoops]->Draw("ap"); - if(iLoop == 2*nLoops -1) - { - out->cd(); - statprecision_vs_ietaEEM[iLoop-nLoops]->SetName("gr_stat_precEEM"); - statprecision_vs_ietaEEM[iLoop-nLoops]->Write(); - } - - }*/ - - // --- plot 6 : statistical precision vs loop - - for ( int ietaregion = 0; ietaregion < 3; ietaregion++ ) { - sprintf(hname,"ietaregion_EEP%d",ietaregion); - cEEP[ietaregion] = new TCanvas(hname,hname); - cEEP[ietaregion]->SetGridx(); - cEEP[ietaregion]->SetGridy(); - statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.1); - statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); - statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); - statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); - statprecision_vs_loopEEP[ietaregion]->Draw("ap"); - } - - for ( int ietaregion = 0; ietaregion < 3; ietaregion++ ) { - sprintf(hname,"ietaregion_EEM%d",ietaregion); - cEEM[ietaregion] = new TCanvas(hname,hname); - cEEM[ietaregion]->SetGridx(); - cEEM[ietaregion]->SetGridy(); - statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.1); - statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); - statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); - statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); - statprecision_vs_loopEEM[ietaregion]->Draw("ap"); - } - - theApp->Run(); - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp b/EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp deleted file mode 100644 index a5004905e52..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/FastCalibratorEB.cpp +++ /dev/null @@ -1,361 +0,0 @@ -#include "../interface/FastCalibratorEB.h" -#include -#include -#include - -#include "../../NtuplePackage/interface/ntpleUtils.h" -#include "../interface/CalibrationUtils.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - -int main (int argc, char ** argv) { - - ///Check if all nedeed arguments to parse are there - if(argc != 2){ - std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("Options"); - // parameterSet.reset(); - - std::string inputList = "NULL"; - if(Options.existsAs("inputList")) - inputList = Options.getParameter("inputList"); - else{ std::cout<<" Exit from code, no input list found"<("inputFileDeadXtal")) - inputFileDeadXtal = Options.getParameter("inputFileDeadXtal"); - else{ std::cout<<" No input File Dead Xtal found! "<("inputTree")) - inputTree = Options.getParameter("inputTree"); - else{ std::cout<<" Exit from code, no input tree found"<("jsonFileName")) - jsonFileName = Options.getParameter("jsonFileName"); - else{ std::cout<<" Exit from code, no jsonFile found"< > > jsonMap; - jsonMap = readJSONFile(jsonFileName); - - std::string miscalibMap = "NULL"; - if(Options.existsAs("miscalibMap")) - miscalibMap = Options.getParameter("miscalibMap"); - else{ std::cout<<" no miscalib map found"<("isMiscalib")) - isMiscalib = Options.getParameter("isMiscalib"); - - bool isSaveEPDistribution = false; - if(Options.existsAs("isSaveEPDistribution")) - isSaveEPDistribution = Options.getParameter("isSaveEPDistribution"); - - bool isMCTruth = false; - if(Options.existsAs("isMCTruth")) - isMCTruth = Options.getParameter("isMCTruth"); - - bool isEPselection = false; - if(Options.existsAs("isEPselection")) - isEPselection = Options.getParameter("isEPselection"); - - bool isPtCut = false; - if(Options.existsAs("isPtCut")) - isPtCut = Options.getParameter("isPtCut"); - - double PtMin = 0.; - if(Options.existsAs("PtMin")) - PtMin = Options.getParameter("PtMin"); - - bool isfbrem = false; - if(Options.existsAs("isfbrem")) - isfbrem = Options.getParameter("isfbrem"); - - double fbremMax = 100.; - if(Options.existsAs("fbremMax")) - fbremMax = Options.getParameter("fbremMax"); - - bool isR9selection = false; - if(Options.existsAs("isR9selection")) - isR9selection = Options.getParameter("isR9selection"); - - double R9Min = -1.; - if(Options.existsAs("R9Min")) - R9Min = Options.getParameter("R9Min"); - - int miscalibMethod = 1; - if(Options.existsAs("miscalibMethod")) - miscalibMethod = Options.getParameter("miscalibMethod"); - - std::string inputMomentumScale = "NULL"; - if(Options.existsAs("inputMomentumScale")) - inputMomentumScale = Options.getParameter("inputMomentumScale"); - - std::string typeEB = "NULL"; - if(Options.existsAs("typeEB")) - typeEB = Options.getParameter("typeEB"); - int nRegionsEB = GetNRegionsEB(typeEB); - - std::string typeEE = "NULL"; - if(Options.existsAs("typeEE")) - typeEE = Options.getParameter("typeEE"); - - std::string outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; - if(Options.existsAs("outputPath")) - outputPath = Options.getParameter("outputPath"); - system(("mkdir -p "+outputPath).c_str()); - - std::string outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"; - if(Options.existsAs("outputFile")) - outputFile = Options.getParameter("outputFile"); - - int numberOfEvents = -1; - if(Options.existsAs("numberOfEvents")) - numberOfEvents = Options.getParameter("numberOfEvents"); - - int useZ = 1; - if(Options.existsAs("useZ")) - useZ = Options.getParameter("useZ"); - - int useW = 1; - if(Options.existsAs("useW")) - useW = Options.getParameter("useW"); - - int splitStat = 0; - if(Options.existsAs("splitStat")) - splitStat = Options.getParameter("splitStat"); - - int nLoops = 20; - if(Options.existsAs("nLoops")) - nLoops = Options.getParameter("nLoops"); - - bool isDeadTriggerTower = false; - if(Options.existsAs("isDeadTriggerTower")) - isDeadTriggerTower = Options.getParameter("isDeadTriggerTower"); - - - /// open ntupla of data or MC - TChain * tree = new TChain (inputTree.c_str()); - FillChain(*tree,inputList); - - /// open calibration momentum graph - TFile* momentumscale = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); - std::vector g_EoC_EB; - - for(int i = 0; i < nRegionsEB; ++i){ - TString Name = Form("g_EoC_EB_%d",i); - g_EoC_EB.push_back( (TGraphErrors*)(momentumscale->Get(Name)) ); - } - - ///Use the whole sample statistics if numberOfEvents < 0 - if ( numberOfEvents < 0 ) numberOfEvents = tree->GetEntries(); - - /// run in normal mode: full statistics - if ( splitStat == 0 ) { - - TString name ; - TString name_tmp; - - if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_R9_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_WZ_Fbrem_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_WZ_PT_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_EP_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_WZ_noEP_miscalib_EB",outputFile.c_str()); - - else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_WZ_Fbrem_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_WZ_PT_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_EP_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_WZ_noEP_EB",outputFile.c_str()); - - else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_W_R9_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_W_Fbrem_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_W_PT_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_W_EP_miscalib_EB",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_W_noEP_miscalib_EB",outputFile.c_str()); - - else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_W_Fbrem_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_W_PT_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_W_EP_EB",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_W_noEP_EB",outputFile.c_str()); - else { std::cout<<" Option not considered --> exit "< exit "< -#include -#include -#include -#include "ConfigParser.h" -#include "ntpleUtils.h" - -/// Code used for Run IC procedure on EB/ - -int main (int argc, char ** argv) -{ - - ///Check if all nedeed arguments to parse are there - if(argc != 2) - { - std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - /// Parse the config file - parseConfigFile (argv[1]) ; - -// std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); - std::string inputList = gConfigParser -> readStringOption("Input::inputList"); - - std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); - - std::string inputFileDeadXtal ="NULL" ; - try { - inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); - } - catch ( char const* exceptionString ){ - std::cerr << " exception = " << exceptionString << std::endl; - - } - bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); - bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); - bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); - bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); - bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); - - std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); - - - - int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); - int useZ = gConfigParser -> readIntOption("Options::useZ"); - int useW = gConfigParser -> readIntOption("Options::useW"); - int splitStat = gConfigParser -> readIntOption("Options::splitStat"); - int nLoops = gConfigParser -> readIntOption("Options::nLoops"); - - /// open ntupla of data or MC - TChain * albero = new TChain (inputTree.c_str()); - FillChain(*albero,inputList); - - ///Use the whole sample statistics if numberOfEvents < 0 - if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); - - - /// run in normal mode: full statistics - if ( splitStat == 0 ) { - - TString name ; - TString name_tmp; - if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_miscalib",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_miscalib",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_Z_noEP_miscalib",outputFile.c_str()); - - if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_Z_noEP",outputFile.c_str()); - - - if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_miscalib",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_miscalib",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_noEP_miscalib",outputFile.c_str()); - - - if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_noEP",outputFile.c_str()); - - name = Form("%s.root",name_tmp.Data()); - TFile *f1 = new TFile(name,"RECREATE"); - - TString outEPDistribution = "Weight_"+name; - - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - if(isSaveEPDistribution == true) - { - FastCalibratorEB_MVA analyzer(albero,outEPDistribution); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); - analyzer.saveHistos(f1); - } - else - { - FastCalibratorEB_MVA analyzer(albero); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); - analyzer.saveHistos(f1); - } - - } - - /// run in even-odd mode: half statistics - else if ( splitStat == 1 ) { - - /// Prepare the outputs - std::string evenFile = "Even_" + outputFile; - std::string oddFile = "Odd_" + outputFile; - TString name; - TString name2; - - if(isMiscalib == true && useZ == 1 && isR9selection==true) - { name = Form ("%s_Z_R9_miscalib.root",evenFile.c_str()); - name2 = Form ("%s_Z_R9_miscalib.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isEPselection==true) - { name = Form ("%s_Z_EP_miscalib.root",evenFile.c_str()); - name2 = Form ("%s_Z_EP_miscalib.root",oddFile.c_str()); - } - if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false) - { name = Form ("%s_Z_noEP_miscalib.root",evenFile.c_str()); - name2 = Form ("%s_Z_noEP_miscalib.root",oddFile.c_str()); - } - - - - if(isMiscalib == false && useZ == 1 && isR9selection==true) - { name = Form ("%s_Z_R9.root",evenFile.c_str()); - name2 = Form ("%s_Z_R9.root",oddFile.c_str()); - } - - if(isMiscalib == false && useZ == 1 && isEPselection==true) - { name = Form ("%s_Z_EP.root",evenFile.c_str()); - name2 = Form ("%s_Z_EP.root",oddFile.c_str()); - } - if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false) - { name = Form ("%s_Z_noEP.root",evenFile.c_str()); - name2 = Form ("%s_Z_noEP.root",oddFile.c_str()); - } - - - if(isMiscalib == true && useZ == 0 && isR9selection==true) - { name = Form ("%s_R9_miscalib.root",evenFile.c_str()); - name2 = Form ("%s_R9_miscalib.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isEPselection==true) - { name = Form ("%s_EP_miscalib.root",evenFile.c_str()); - name2 = Form ("%s_EP_miscalib.root",oddFile.c_str()); - } - if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false) - { name = Form ("%s_noEP_miscalib.root",evenFile.c_str()); - name2 = Form ("%s_noEP_miscalib.root",oddFile.c_str()); - } - - - if(isMiscalib == false && useZ == 0 && isR9selection==true) - { name = Form ("%s_R9.root",evenFile.c_str()); - name2 = Form ("%s_R9.root",oddFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isEPselection==true) - { name = Form ("%s_EP.root",evenFile.c_str()); - name2 = Form ("%s_EP.root",oddFile.c_str()); - } - if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false) - { name = Form ("%s_noEP.root",evenFile.c_str()); - name2 = Form ("%s_noEP.root",oddFile.c_str()); - } - - TFile *f1 = new TFile(name,"RECREATE"); - TFile *f2 = new TFile(name2,"RECREATE"); - - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - /// Run on odd - FastCalibratorEB_MVA analyzer_even(albero); - analyzer_even.bookHistos(nLoops); - analyzer_even.AcquireDeadXtal(DeadXtal); - analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); - analyzer_even.saveHistos(f1); - - /// Run on even - FastCalibratorEB_MVA analyzer_odd(albero); - analyzer_odd.bookHistos(nLoops); - analyzer_odd.AcquireDeadXtal(DeadXtal); - analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); - analyzer_odd.saveHistos(f2); - - } - - delete albero; - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp b/EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp deleted file mode 100644 index 86733ae6139..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/FastCalibratorEE.cpp +++ /dev/null @@ -1,365 +0,0 @@ -#include "../interface/FastCalibratorEE.h" -#include -#include -#include - -#include "../../NtuplePackage/interface/ntpleUtils.h" -#include "../interface/CalibrationUtils.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - - -int main (int argc, char ** argv) { - - ///Check if all nedeed arguments to parse are there - if(argc != 2){ - std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("Options"); - parameterSet.reset(); - - std::string inputList = "NULL"; - if(Options.existsAs("inputList")) - inputList = Options.getParameter("inputList"); - else{ std::cout<<" Exit from code, no input list found"<("inputFileDeadXtal")) - inputFileDeadXtal = Options.getParameter("inputFileDeadXtal"); - else{ std::cout<<" No input File Dead Xtal found! "<("inputTree")) - inputTree = Options.getParameter("inputTree"); - else{ std::cout<<" Exit from code, no input tree found"<("jsonFileName")) - jsonFileName = Options.getParameter("jsonFileName"); - else{ std::cout<<" Exit from code, no jsonFile found"< > > jsonMap; - jsonMap = readJSONFile(jsonFileName); - - std::string miscalibMap = "NULL"; - if(Options.existsAs("miscalibMap")) - miscalibMap = Options.getParameter("miscalibMap"); - else{ std::cout<<" no miscalib map found"<("isMiscalib")) - isMiscalib = Options.getParameter("isMiscalib"); - - bool isSaveEPDistribution = false; - if(Options.existsAs("isSaveEPDistribution")) - isSaveEPDistribution = Options.getParameter("isSaveEPDistribution"); - - bool isMCTruth = false; - if(Options.existsAs("isMCTruth")) - isMCTruth = Options.getParameter("isMCTruth"); - - bool isEPselection = false; - if(Options.existsAs("isEPselection")) - isEPselection = Options.getParameter("isEPselection"); - - bool isPtCut = false; - if(Options.existsAs("isPtCut")) - isPtCut = Options.getParameter("isPtCut"); - - double PtMin = 0.; - if(Options.existsAs("PtMin")) - PtMin = Options.getParameter("PtMin"); - - bool isfbrem = false; - if(Options.existsAs("isfbrem")) - isfbrem = Options.getParameter("isfbrem"); - - double fbremMax = 100.; - if(Options.existsAs("fbremMax")) - fbremMax = Options.getParameter("fbremMax"); - - bool isR9selection = false; - if(Options.existsAs("isR9selection")) - isR9selection = Options.getParameter("isR9selection"); - - double R9Min = -1.; - if(Options.existsAs("R9Min")) - R9Min = Options.getParameter("R9Min"); - - int miscalibMethod = 1; - if(Options.existsAs("miscalibMethod")) - miscalibMethod = Options.getParameter("miscalibMethod"); - - std::string inputMomentumScale = "NULL"; - if(Options.existsAs("inputMomentumScale")) - inputMomentumScale = Options.getParameter("inputMomentumScale"); - - std::string typeEB = "NULL"; - if(Options.existsAs("typeEB")) - typeEB = Options.getParameter("typeEB"); - - std::string typeEE = "NULL"; - if(Options.existsAs("typeEE")) - typeEE = Options.getParameter("typeEE"); - int nRegionsEE = GetNRegionsEE(typeEE); - - std::string outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; - if(Options.existsAs("outputPath")) - outputPath = Options.getParameter("outputPath"); - system(("mkdir -p "+outputPath).c_str()); - - std::string outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"; - if(Options.existsAs("outputFile")) - outputFile = Options.getParameter("outputFile"); - - int numberOfEvents = -1; - if(Options.existsAs("numberOfEvents")) - numberOfEvents = Options.getParameter("numberOfEvents"); - - int useZ = 1; - if(Options.existsAs("useZ")) - useZ = Options.getParameter("useZ"); - - int useW = 1; - if(Options.existsAs("useW")) - useW = Options.getParameter("useW"); - - int splitStat = 0; - if(Options.existsAs("splitStat")) - splitStat = Options.getParameter("splitStat"); - - int nLoops = 20; - if(Options.existsAs("nLoops")) - nLoops = Options.getParameter("nLoops"); - - bool isDeadTriggerTower = false; - if(Options.existsAs("isDeadTriggerTower")) - isDeadTriggerTower = Options.getParameter("isDeadTriggerTower"); - - - /// Acquistion input ntuples - TChain * tree = new TChain (inputTree.c_str()); - FillChain(*tree,inputList); - - /// open calibration momentum graph - TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); - std::vector g_EoC_EE; - - for(int i = 0; i < nRegionsEE; ++i){ - TString Name = Form("g_EoC_EE_%d",i); - g_EoC_EE.push_back( (TGraphErrors*)(f4->Get(Name)) ); - } - - ///Use the whole sample statistics if numberOfEvents < 0 - if ( numberOfEvents < 0 ) numberOfEvents = tree->GetEntries(); - - - /// run in normal mode: full statistics - if ( splitStat == 0 ) { - - TString name ; - TString name_tmp; - - if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_R9_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_WZ_Fbrem_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_WZ_PT_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_EP_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_WZ_noEP_miscalib_EE",outputFile.c_str()); - - else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_WZ_Fbrem_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_WZ_PT_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_EP_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_WZ_noEP_EE",outputFile.c_str()); - - - - else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_W_R9_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_W_Fbrem_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_W_PT_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_W_EP_miscalib_EE",outputFile.c_str()); - else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_W_noEP_miscalib_EE",outputFile.c_str()); - - else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) - name_tmp = Form ("%s_W_Fbrem_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) - name_tmp = Form ("%s_W_PT_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) - name_tmp = Form ("%s_W_EP_EE",outputFile.c_str()); - else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) - name_tmp =Form ("%s_W_noEP_EE",outputFile.c_str()); - else { std::cout<<" Option not considered --> exit "< exit "< -#include -#include - -#include "ConfigParser.h" -#include "ntpleUtils.h" - -/// Code for Run the IC procedure on EE - -int main (int argc, char ** argv) -{ - - ///Check if all nedeed arguments to parse are there - if(argc != 2) - { - std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - /// Parse the config file - parseConfigFile (argv[1]) ; - -// std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); - std::string inputList = gConfigParser -> readStringOption("Input::inputList"); - - std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); - std::string inputFileDeadXtal ="NULL" ; - try { - inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); - } - catch ( char const* exceptionString ){ - std::cerr << " exception = " << exceptionString << std::endl; - - } - - bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); - bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); - bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); - bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); - bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); - bool isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); - - std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); - - int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); - int useZ = gConfigParser -> readIntOption("Options::useZ"); - int useW = gConfigParser -> readIntOption("Options::useW"); - int splitStat = gConfigParser -> readIntOption("Options::splitStat"); - int nLoops = gConfigParser -> readIntOption("Options::nLoops"); - - /// Acquistion input ntuplas - TChain * albero = new TChain (inputTree.c_str()); - FillChain(*albero,inputList); - - ///Use the whole sample statistics if numberOfEvents < 0 - if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); - - - /// run in normal mode: full statistics - if ( splitStat == 0 ) { - - TString name ; - TString outputTxtFile ; - TString name_tmp; - if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_Z_noEP_miscalib_EE",outputFile.c_str()); - - if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_Z_noEP_EE",outputFile.c_str()); - - - if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isfbrem == true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_noEP_miscalib_EE",outputFile.c_str()); - - - if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_noEP_EE",outputFile.c_str()); - - name = Form("%s.root",name_tmp.Data()); - TFile *f1 = new TFile(name,"RECREATE"); - - TString outEPDistribution = "Weight_"+name; - - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - - if(isSaveEPDistribution == true) - { - FastCalibratorEE_MVA analyzer(albero,outEPDistribution); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); - analyzer.saveHistos(f1); - } - else - { - FastCalibratorEE_MVA analyzer(albero); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); - analyzer.saveHistos(f1); - } - - } - - /// run in even-odd mode: half statistics - else if ( splitStat == 1 ) { - - /// Prepare the outputs - std::string evenFile = "Even_" + outputFile; - std::string oddFile = "Odd_" + outputFile; - TString name; - TString name2; - - if(isMiscalib == true && useZ == 1 && isR9selection==true) - { name = Form ("%s_Z_R9_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_R9_miscalib_EE.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isEPselection==true) - { name = Form ("%s_Z_EP_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_EP_miscalib_EE.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isfbrem==true) - { name = Form ("%s_Z_fbrem_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_fbrem_miscalib_EE.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_Z_noEP_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_noEP_miscalib_EE.root",oddFile.c_str()); - } - - - - if(isMiscalib == false && useZ == 1 && isR9selection==true) - { name = Form ("%s_Z_R9_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_R9_EE.root",oddFile.c_str()); - } - - if(isMiscalib == false && useZ == 1 && isEPselection==true) - { name = Form ("%s_Z_EP_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_EP_EE.root",oddFile.c_str()); - } - - if(isMiscalib == false && useZ == 1 && isfbrem==true) - { name = Form ("%s_Z_fbrem_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_fbrem_EE.root",oddFile.c_str()); - } - if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_Z_noEP_EE.root",evenFile.c_str()); - name2 = Form ("%s_Z_noEP_EE.root",oddFile.c_str()); - } - - - if(isMiscalib == true && useZ == 0 && isR9selection==true) - { name = Form ("%s_R9_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_R9_miscalib_EE.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isEPselection==true) - { name = Form ("%s_EP_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_EP_miscalib_EE.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isfbrem==true) - { name = Form ("%s_fbrem_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_fbrem_miscalib_EE.root",oddFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_noEP_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_noEP_miscalib_EE.root",oddFile.c_str()); - } - - - if(isMiscalib == false && useZ == 0 && isR9selection==true) - { name = Form ("%s_R9_EE.root",evenFile.c_str()); - name2 = Form ("%s_R9_EE.root",oddFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isEPselection==true) - { name = Form ("%s_EP_EE.root",evenFile.c_str()); - name2 = Form ("%s_EP_EE.root",oddFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isfbrem==true) - { name = Form ("%s_fbrem_miscalib_EE.root",evenFile.c_str()); - name2 = Form ("%s_fbrem_miscalib_EE.root",oddFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_noEP_EE.root",evenFile.c_str()); - name2 = Form ("%s_noEP_EE.root",oddFile.c_str()); - } - - TFile *f1 = new TFile(name,"RECREATE"); - TFile *f2 = new TFile(name2,"RECREATE"); - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - - /// Run on odd - FastCalibratorEE_MVA analyzer_even(albero); - analyzer_even.bookHistos(nLoops); - analyzer_even.AcquireDeadXtal(DeadXtal); - analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); - analyzer_even.saveHistos(f1); - - /// Run on even - FastCalibratorEE_MVA analyzer_odd(albero); - analyzer_odd.bookHistos(nLoops); - analyzer_odd.AcquireDeadXtal(DeadXtal); - analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); - analyzer_odd.saveHistos(f2); - - } - - delete albero; - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/MVARegression.cpp b/EOverPCalibration/FastCalibrator/bin/MVARegression.cpp deleted file mode 100644 index a93b1078e52..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/MVARegression.cpp +++ /dev/null @@ -1,389 +0,0 @@ -// @(#)root/tmva $Id: MVARegression.cpp,v 1.3 2012/07/17 08:31:45 rgerosa Exp $ -/********************************************************************************** - * Project : TMVA - a Root-integrated toolkit for multivariate data analysis * - * Package : TMVA * - * Root Macro: TMVARegression * - * * - * This macro provides examples for the training and testing of the * - * TMVA classifiers. * - * * - * As input data is used a toy-MC sample consisting of four Gaussian-distributed * - * and linearly correlated input variables. * - * * - * The methods to be used can be switched on and off by means of booleans, or * - * via the prompt command, for example: * - * * - * root -l TMVARegression.C\(\"LD,MLP\"\) * - * * - * (note that the backslashes are mandatory) * - * If no method given, a default set is used. * - * * - * The output file "TMVAReg.root" can be analysed with the use of dedicated * - * macros (simply say: root -l ), which can be conveniently * - * invoked through a GUI that will appear at the end of the run of this macro. * - **********************************************************************************/ - -#include -#include -#include -#include - -#include "TChain.h" -#include "TFile.h" -#include "TTree.h" -#include "TString.h" -#include "TObjString.h" -#include "TSystem.h" -#include "TROOT.h" -#include "TApplication.h" -#include "TMVA/MsgLogger.h" -#include "TMVA/Config.h" - -#include "ConfigParser.h" -#include "ntpleUtils.h" - -#if not defined(__CINT__) || defined(__MAKECINT__) -#include "TMVA/Tools.h" -#include "TMVA/Factory.h" -#endif - -#include "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.00/x86_64-slc5-gcc46-opt/root/tmva/test/TMVARegGui.C" - -using namespace TMVA; - -int main(int argc, char**argv){ - - if(argc != 2){ - std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - parseConfigFile (argv[1]) ; - - // The explicit loading of the shared libTMVA is done in TMVAlogon.C, defined in .rootrc - // if you use your private .rootrc, or run from a different directory, please copy the - // corresponding lines from .rootrc - // methods to be processed can be given as an argument; use format: - // - // mylinux~> root -l TMVARegression.C\(\"myMethod1,myMethod2,myMethod3\"\) - // - //--------------------------------------------------------------- - // This loads the library - TMVA::Tools::Instance(); - - std::vector UseMethodName; - UseMethodName = gConfigParser -> readStringListOption("Input::UseMethodName"); - - std::cout << " >>>>> Input::UseMethodName size = " << UseMethodName.size() << std::endl; - std::cout << " >>>>> >>>>> "; - for (unsigned int iCat = 0; iCat < UseMethodName.size(); iCat++){ - std::cout << " " << UseMethodName.at(iCat) << ", "; - } - std::cout << std::endl; - - - - // --------------------------------------------------------------- - - std::cout << std::endl; - std::cout << "==> Start TMVARegression" << std::endl; - - std::map Use; - - for(std::vector::iterator it=UseMethodName.begin(); it!=UseMethodName.end(); ++it) Use[*it]=0; - - std::string UseMethodFlag; - try{ UseMethodFlag = gConfigParser -> readStringOption("Input::UseMethodFlag"); - std::cout<< UseMethodFlag< mlist = gTools().SplitString( UseMethodFlag, '/' ); - for (UInt_t i=0; i::iterator it = Use.begin(); it != Use.end(); it++) std::cout << it->first << " "; - std::cout << std::endl; - return -1; - } - Use[regMethod] = 1; - std::cout << "regMethod= " << regMethod<< " 1 "<::iterator it=UseMethodName.begin() ;it!=UseMethodName.end(); it++) Use[*it]=1; - - } - - - // -------------------------------------------------------------------------------------------------- - // --- Here the preparation phase begins - // Create a new root output file - - std::string outputFileName = gConfigParser -> readStringOption("Output::outputFileName"); - std::cout<<" Output Data File = "< readStringOption("Input::inputFileList"); - std::string treeNameDATA = gConfigParser -> readStringOption("Input::treeNameDATA"); - - std::cout<<" Input Data List = "< readStringOption("Input::RegionOfTraining"); - std::cout<<" RegionOfTraining = "<AddVariable( "ele1_scE/ele1_scERaw" , 'F'); - factory->AddVariable( "ele1_eRegrInput_nPV" , 'F'); - factory->AddVariable( "ele1_eRegrInput_r9" , 'F'); - factory->AddVariable( "ele1_fbrem" , 'F'); - factory->AddVariable( "ele1_eta" , 'F'); - factory->AddVariable( "ele1_DphiIn" , 'F'); - factory->AddVariable( "ele1_DetaIn" , 'F'); - factory->AddVariable( "ele1_sigmaIetaIeta" , 'F'); - - factory->AddVariable( "ele1_eRegrInput_etaW" , 'F'); - factory->AddVariable( "ele1_eRegrInput_phiW" , 'F'); - - factory->AddVariable( "ele1_eRegrInput_bCE_Over_sCE", 'F'); - factory->AddVariable( "ele1_eRegrInput_sigietaieta_bC1" , 'F'); - factory->AddVariable( "ele1_eRegrInput_sigiphiiphi_bC1" , 'F'); - factory->AddVariable( "ele1_eRegrInput_sigietaiphi_bC1" , 'F'); - factory->AddVariable( "ele1_eRegrInput_e3x3_Over_bCE" , 'F'); - factory->AddVariable( "ele1_eRegrInput_Deta_bC_sC" , 'F'); - factory->AddVariable( "ele1_eRegrInput_Dphi_bC_sC" , 'F'); - factory->AddVariable( "ele1_eRegrInput_bEMax_Over_bCE" , 'F'); - - - factory->AddVariable( "ele1_dxy_PV" , 'F'); - factory->AddVariable( "ele1_dz_PV" , 'F'); - factory->AddVariable( "ele1_sigmaP/ele1_tkP" , 'F'); - - factory->AddVariable( "ele1_eRegrInput_bCELow_Over_sCE", 'F'); - factory->AddVariable( "ele1_eRegrInput_e3x3_Over_bCELow" , 'F'); - factory->AddVariable( "ele1_eRegrInput_Deta_bCLow_sC" , 'F'); - factory->AddVariable( "ele1_eRegrInput_Dphi_bCLow_sC" , 'F'); - - factory->AddVariable( "ele1_eRegrInput_seedbC_etacry" , 'F'); - factory->AddVariable( "ele1_eRegrInput_seedbC_phicry" , 'F'); - - // You can add so-called "Spectator variables", which are not used in the MVA training, - // but will appear in the final "TestTree" produced by TMVA. This TestTree will contain the - // input variables, the response values of all trained MVAs, and the spectator variables - // factory->AddSpectator( "spec1:=var1*2", "Spectator 1", "units", 'F' ); - // factory->AddSpectator( "spec2:=var1*3", "Spectator 2", "units", 'F' ); - // Add the variable carrying the regression target -// factory->AddTarget("ele1_scE/ele1_E_true" ); - factory->AddTarget("ele1_tkP/ele1_E_true" ); - - - // It is also possible to declare additional targets for multi-dimensional regression, ie: - // -- factory->AddTarget( "fvalue2" ); - // BUT: this is currently ONLY implemented for MLP - - // global event weights per tree (see below for setting event-wise weights) - Double_t regWeight = 1.0; - - // You can add an arbitrary number of regression trees - factory->AddRegressionTree( treeDATA, regWeight ); - - // This would set individual event weights (the variables defined in the - // expression need to exist in the original TTree) - // factory->SetWeightExpression( "var1", "Regression" ); - -// TCut mycut = "ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2 && (ele1_scE/ele1_E_true)<1.4 && (ele1_scE/ele1_E_true)>0.3"; // for example: TCut mycut = "abs(var1)<0.5 && abs(var2-0.5)<1"; - - TCut mycut = "ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2 && ele1_tkP/ele1_E_true<1.8 && ele1_tkP/ele1_E_true>0.2"; // for example: TCut mycut = "abs(var1)<0.5 && abs(var2-0.5)<1"; - - - // tell the factory to use all remaining events in the trees after training for testing: - factory->PrepareTrainingAndTestTree( mycut, - "nTrain_Regression=2500000:nTest_Regression=2500000:SplitMode=Random:NormMode=NumEvents:!V" ); - - TString Name = Form("weight_%s_%s_P_W",RegionOfTraining.c_str(),UseMethodFlag.c_str()); - (TMVA::gConfig().GetIONames()).fWeightFileDir = Name; - } - - if(RegionOfTraining=="EE"){ - - factory->AddVariable( "ele1_scE/ele1_scERaw" , 'F'); - factory->AddVariable( "ele1_eRegrInput_nPV",'F'); - factory->AddVariable( "ele1_eRegrInput_r9",'F'); - factory->AddVariable( "ele1_fbrem",'F'); - factory->AddVariable( "ele1_eta",'F'); - factory->AddVariable( "ele1_DphiIn",'F'); - factory->AddVariable( "ele1_DetaIn",'F'); - factory->AddVariable( "ele1_sigmaIetaIeta",'F'); - - factory->AddVariable( "ele1_eRegrInput_etaW",'F'); - factory->AddVariable( "ele1_eRegrInput_phiW",'F'); - - factory->AddVariable( "ele1_dxy_PV",'F'); - factory->AddVariable( "ele1_dz_PV",'F'); - factory->AddVariable( "ele1_sigmaP/ele1_tkP",'F'); - - - // You can add so-called "Spectator variables", which are not used in the MVA training, - // but will appear in the final "TestTree" produced by TMVA. This TestTree will contain the - // input variables, the response values of all trained MVAs, and the spectator variables - // factory->AddSpectator( "spec1:=var1*2", "Spectator 1", "units", 'F' ); - // factory->AddSpectator( "spec2:=var1*3", "Spectator 2", "units", 'F' ); - // Add the variable carrying the regression target - -// factory->AddTarget("ele1_scE/ele1_E_true" ); - factory->AddTarget("ele1_tkP/ele1_E_true" ); - - // It is also possible to declare additional targets for multi-dimensional regression, ie: - // -- factory->AddTarget( "fvalue2" ); - // BUT: this is currently ONLY implemented for MLP - - // global event weights per tree (see below for setting event-wise weights) - Double_t regWeight = 1.0; - - // You can add an arbitrary number of regression trees - factory->AddRegressionTree( treeDATA, regWeight ); - - // This would set individual event weights (the variables defined in the - // expression need to exist in the original TTree) - // factory->SetWeightExpression( "var1", "Regression" ); -// TCut mycut = "ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 &&(ele1_scE/ele1_E_true)<1.4 && (ele1_scE/ele1_E_true)>0.3"; - TCut mycut = "ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && (ele1_tkP/ele1_E_true)<1.6"; - - // for example: TCut mycut = "abs(var1)<0.5 && - // tell the factory to use all remaining events in the trees after training for testing: - factory->PrepareTrainingAndTestTree( mycut, - "nTrain_Regression=3000000:nTest_Regression=3000000:SplitMode=Random:NormMode=NumEvents:!V" ); - - TString Name = Form("weight_%s_%s_P_W",RegionOfTraining.c_str(),UseMethodFlag.c_str()); - (TMVA::gConfig().GetIONames()).fWeightFileDir = Name; - - } - // Apply additional cuts on the signal and background samples (can be different) - -// // If no numbers of events are given, half of the events in the tree are used - // for training, and the other half for testing: - // factory->PrepareTrainingAndTestTree( mycut, "SplitMode=random:!V" ); - - // ---- Book MVA methods - // - // please lookup the various method configuration options in the corresponding cxx files, eg: - // src/MethoCuts.cxx, etc, or here: http://tmva.sourceforge.net/optionRef.html - // it is possible to preset ranges in the option string in which the cut optimisation should be done: - // "...:CutRangeMin[2]=-1:CutRangeMax[2]=1"...", where [2] is the third input variable - - // PDE - RS method - if (Use["PDERS"]) - factory->BookMethod( TMVA::Types::kPDERS, "PDERS", "!H:!V:Normthree=T:VolumeRangeMode=Adaptive:KernelEstimator=Gauss:GaussSigma=0.3:NEventsMin=40:NEventsMax=60:VarTransform=None" ); - // And the options strings for the MinMax and RMS methods, respectively: - // "!H:!V:VolumeRangeMode=MinMax:DeltaFrac=0.2:KernelEstimator=Gauss:GaussSigma=0.3" ); - // "!H:!V:VolumeRangeMode=RMS:DeltaFrac=3:KernelEstimator=Gauss:GaussSigma=0.3" ); - - if (Use["PDEFoam"]) - factory->BookMethod( TMVA::Types::kPDEFoam, "PDEFoam", "!H:!V:MultiTargetRegression=F:TargetSelection=Mpv:TailCut=0.001:VolFrac=0.3:nActiveCells=500:nSampl=2000:nBin=5:Compress=T:Kernel=None:Nmin=10:VarTransform=None" ); - - // K-Nearest Neighbour classifier (KNN) - if (Use["KNN"]) - factory->BookMethod( TMVA::Types::kKNN, "KNN", "nkNN=20:ScaleFrac=0.8:SigmaFact=1.0:Kernel=Gaus:UseKernel=F:UseWeight=T:!Trim" ); - - // Linear discriminant - if (Use["LD"]) factory->BookMethod( TMVA::Types::kLD, "LD","!H:!V:VarTransform=G,U,D" ); - - // Function discrimination analysis (FDA) -- test of various fitters - the recommended one is Minuit (or GA or SA) - if (Use["FDA_MC"]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_MC", - "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=MC:SampleSize=100000:Sigma=0.1:VarTransform=D" ); - - if (Use["FDA_GA"]) // can also use Simulated Annealing (SA) algorithm (see Cuts_SA options) .. the formula of this example is good for parabolas - factory->BookMethod( TMVA::Types::kFDA, "FDA_GA", - "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=GA:PopSize=100:Cycles=3:Steps=30:Trim=True:SaveBestGen=1:VarTransform=Norm" ); - - if (Use["FDA_MT"]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_MT", - "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100);(-10,10):FitMethod=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=2:UseImprove:UseMinos:SetBatch" ); - - if (Use["FDA_GAMT"]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_GAMT", - "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=GA:Converger=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=0:!UseImprove:!UseMinos:SetBatch:Cycles=1:PopSize=5:Steps=5:Trim" ); - - // Neural network (MLP) - if (Use["MLP"]) -// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=20000:HiddenLayers=N+20:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator" ); -// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=200:HiddenLayers=N+20:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator" ); -// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=400:HiddenLayers=N+10:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); -// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=N:NeuronType=tanh:NCycles=200:HiddenLayers=N+10:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); -// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=G,N:NeuronType=tanh:NCycles=200:HiddenLayers=N+5:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); - factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:NeuronType=tanh:NCycles=250:HiddenLayers=N+5:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:TestRate=10"); - - // Support Vector Machine - if (Use["SVM"]) - factory->BookMethod( TMVA::Types::kSVM, "SVM", "Gamma=0.25:Tol=0.001:VarTransform=N" ); -// factory->BookMethod( TMVA::Types::kSVM, "SVM", "Gamma=0.25:Tol=0.001:VarTransform=N,G" ); - - // Boosted Decision Trees - if (Use["BDT"]) -// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:nCuts=20:PruneMethod=CostComplexity:PruneStrength=30" ); -// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=200:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); -// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=300:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); -// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); - factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=20:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30"); - - if (Use["BDTG"]) -// factory->BookMethod( TMVA::Types::kBDT, "BDTG","!H:!V:NTrees=2000::BoostType=Grad:Shrinkage=0.1:UseBaggedGrad:GradBaggingFraction=0.5:nCuts=20:MaxDepth=3:NNodesMax=15" ); - factory->BookMethod( TMVA::Types::kBDT, "BDTG","!H:!V:NTrees=1000::BoostType=Grad:Shrinkage=0.1:UseBaggedGrad:GradBaggingFraction=0.5:MaxDepth=5:NNodesMax=25:PruneMethod=CostComplexity:PruneStrength=30"); - // -------------------------------------------------------------------------------------------------- - // ---- Now you can tell the factory to train, test, and evaluate the MVAs - - // Train MVAs using the set of training events - factory->TrainAllMethods(); - - // ---- Evaluate all MVAs using the set of test events - factory->TestAllMethods(); - - // ----- Evaluate and compare performance of all configured MVAs - factory->EvaluateAllMethods(); - - // -------------------------------------------------------------- - - // Save the output - outputFile->Close(); - - std::cout << "==> Wrote root file: " << outputFile->GetName() << std::endl; - std::cout << "==> TMVARegression is done!" << std::endl; - - delete factory; - - // Launch the GUI for the root macros -// if (!gROOT->IsBatch()) TMVARegGui( outputFileName.c_str() ); - - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp b/EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp deleted file mode 100644 index 074e1e87e6f..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/MakeJobs.cpp +++ /dev/null @@ -1,584 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ConfigParser.h" -#include "ntpleUtils.h" - - -int main (int argc, char** argv){ - - if(argc<2){ std::cout<<" Not correct number of input parameter --> Need Just one cfg file exit "< readIntOption("Input::PhiStartDeadXtal"); } - catch(char const* exceptionString ){ PhiStartDeadXtal=-999.; } - - int PhiStepDeadXtal ; - try{ PhiStepDeadXtal = gConfigParser -> readIntOption("Input::PhiStepDeadXtal");} - catch(char const* exceptionString ){ PhiStepDeadXtal=-999.; } - - int PhiNShiftDeadXtal ; - try{ PhiNShiftDeadXtal = gConfigParser -> readIntOption("Input::PhiNShiftDeadXtal");} - catch(char const* exceptionString ){ PhiNShiftDeadXtal = -999.;} - - std::vector EtaBinCenterDeadXtal ; - try{ EtaBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::EtaBinCenterDeadXtal"); } - catch(char const* exceptionString ){ EtaBinCenterDeadXtal.push_back(-999.); } - - - bool isDeadTriggerTower ; - try{ isDeadTriggerTower = gConfigParser -> readBoolOption("Input::isDeadTriggerTower");} - catch(char const* exceptionString ){ isDeadTriggerTower = false ;} - - // Dead xtal in EE - - std::vector IxEEPBinCenterDeadXtal ; - try{ IxEEPBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IxEEPBinCenterDeadXtal"); } - catch(char const* exceptionString ){ IxEEPBinCenterDeadXtal.push_back(-999.); } - - std::vector IxEEMBinCenterDeadXtal ; - try{ IxEEMBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IxEEMBinCenterDeadXtal"); } - catch(char const* exceptionString ){ IxEEMBinCenterDeadXtal.push_back(-999.); } - - std::vector IyEEPBinCenterDeadXtal ; - try{ IyEEPBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IyEEPBinCenterDeadXtal"); } - catch(char const* exceptionString ){ IyEEPBinCenterDeadXtal.push_back(-999.); } - - std::vector IyEEMBinCenterDeadXtal ; - try{ IyEEMBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IyEEMBinCenterDeadXtal"); } - catch(char const* exceptionString ){ IyEEMBinCenterDeadXtal.push_back(-999.); } - - int iXNShiftDeadXtal ; - try{ iXNShiftDeadXtal = gConfigParser -> readIntOption("Input::iXNShiftDeadXtal");} - catch(char const* exceptionString ){ iXNShiftDeadXtal = -999.;} - - int iYNShiftDeadXtal ; - try{ iYNShiftDeadXtal = gConfigParser -> readIntOption("Input::iYNShiftDeadXtal");} - catch(char const* exceptionString ){ iYNShiftDeadXtal = -999.;} - - std::string OutputDeadXtalPath ; - try{ OutputDeadXtalPath = gConfigParser -> readStringOption("Input::OutputDeadXtalPath"); - system(("mkdir -p "+OutputDeadXtalPath).c_str());} - catch(char const* exceptionString ){ OutputDeadXtalPath = "cfg/InputDeadXtal/" ; - system(("mkdir -p "+OutputDeadXtalPath).c_str()); - } - - std::string OutputDeadXtalFile ; - try{ OutputDeadXtalFile = gConfigParser -> readStringOption("Input::OutputDeadXtalFile");} - catch(char const* exceptionString ){ OutputDeadXtalFile = "DeadXtalFile"; } - - - std::string inputCfgTemplate ; - try{ inputCfgTemplate = gConfigParser -> readStringOption("Input::inputCfgTemplate");} - catch(char const* exceptionString ){ inputCfgTemplate = "cfg/FastCalibrator_Template.cfg"; } - - - ///// Common cfg setup - - // txt file with the list of input root files - std::string inputList = gConfigParser -> readStringOption("Input::inputList"); - - // input tree name - std::string inputTree = "NULL"; - try{ inputTree = gConfigParser -> readStringOption("Input::inputTree");} - catch(char const* exceptionString ){ inputTree = "simpleNtupleEoverP/SimpleNtupleEoverP";} - - // jsonFileName - std::string jsonFileName ="NULL"; - try{ jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName");} - catch( char const* exceptionString ){ jsonFileName = "json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt";} - - // Miscalibration --> scalib 5% - bool isMiscalib ; - try{isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib");} - catch( char const* exceptionString ){ isMiscalib = false;} - - // Save EoverP distribution - bool isSaveEPDistribution ; - try{ isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution");} - catch( char const* exceptionString ){ isSaveEPDistribution = false; } - - // Do the E/P selection - bool isEPselection ; - try{ isEPselection = gConfigParser -> readBoolOption("Input::isEPselection");} - catch( char const* exceptionString ){ isEPselection = false;} - - - // Pt treshold bool and cut - bool isPtCut ; - try{ isPtCut = gConfigParser -> readBoolOption("Input::isPtCut"); } - catch( char const* exceptionString ){ isPtCut = false;} - - float PtMin ; - try{ PtMin = gConfigParser -> readFloatOption("Input::PtMin"); } - catch( char const* exceptionString ){ PtMin = 0.;} - - // fbrem treshold bool and cut - bool isfbrem ; - try { isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); } - catch( char const* exceptionString ){ isfbrem = false;} - - float fbremMax ; - try { fbremMax = gConfigParser -> readFloatOption("Input::fbremMax"); } - catch( char const* exceptionString ){ fbremMax = 100.;} - - // R9 treshold bool and cut - bool isR9selection ; - try{ isR9selection = gConfigParser -> readBoolOption("Input::isR9selection");} - catch( char const* exceptionString ){ isR9selection = false; } - - float R9Min ; - try{ R9Min = gConfigParser -> readFloatOption("Input::R9Min");} - catch( char const* exceptionString ){ R9Min = 0.; } - - // Run Calibration on E/Etrue instead of E/P --> MC only - bool isMCTruth ; - try { isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); } - catch( char const* exceptionString ){ isMCTruth = false; } - - // Momentum scale file - std::string inputMomentumScale ; - try{ inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); } - catch( char const* exceptionString ) { inputMomentumScale = "output/MomentumCalibrationCombined_2011AB-2012ABC.root";} - - std::string typeEB ; - try{ typeEB = gConfigParser -> readStringOption("Input::typeEB"); } - catch( char const* exceptionString ) { typeEB = "none" ; } - - - std::string typeEE ; - try{ typeEE = gConfigParser -> readStringOption("Input::typeEE"); } - catch( char const* exceptionString ) { typeEE = "none" ; } - - // Name of the output calib file - std::string outputPath; - try{ outputPath = gConfigParser -> readStringOption("Output::outputPath"); - system(("mkdir -p "+outputPath).c_str());} - catch( char const* exceptionString ) { outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; - system(("mkdir -p "+outputPath).c_str()); - } - - std::string outputFile ; - try{ outputFile = gConfigParser -> readStringOption("Output::outputFile"); } - catch( char const* exceptionString ) { outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012" ; - } - - std::string OutputCfgPath ; - try{ OutputCfgPath = gConfigParser -> readStringOption("Output::OutputCfgPath"); - system(("mkdir -p "+OutputCfgPath).c_str()); } - catch(char const* exceptionString ){ OutputCfgPath = "cfg/JOB/"; - system(("mkdir -p "+OutputCfgPath).c_str()); - } - - // Other options for the L3 algo - int numberOfEvents ; - try { numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); } - catch( char const* exceptionString ) { numberOfEvents = -1 ; } - - int useZ ; - try { useZ = gConfigParser -> readIntOption("Options::useZ"); } - catch( char const* exceptionString ) { useZ = 1 ; } - - int useW ; - try{ useW = gConfigParser -> readIntOption("Options::useW"); } - catch( char const* exceptionString ) { useW = 1 ; } - - int splitStat ; - try{ splitStat = gConfigParser -> readIntOption("Options::splitStat"); } - catch( char const* exceptionString ) { splitStat = 0 ; } - - int nLoops ; - try{ nLoops = gConfigParser -> readIntOption("Options::nLoops"); } - catch( char const* exceptionString ) { nLoops = 20 ; } - - // prepare the general cfg: - std::string inputTemp1 = inputCfgTemplate+"_tmp1" ; - std::string inputTemp2 = inputCfgTemplate+"_tmp2" ; - - system(("rm "+OutputCfgPath+"/*").c_str()); - - system (("cat "+inputCfgTemplate+" | sed -e s%INPUTLIST%"+inputList+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%INPUTTREE%"+inputTree+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%JSONFILENAME%"+jsonFileName+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%MISCALIB%"+std::string(Form("%o",isMiscalib))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%EOVERP%"+std::string(Form("%o",isSaveEPDistribution))+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%EPSELECTION%"+std::string(Form("%o",isEPselection))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%MCTRUTH%"+std::string(Form("%o",isMCTruth))+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%PTCUT%"+std::string(Form("%o",isPtCut))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%PTMIN%"+std::string(Form("%0.2f",PtMin))+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%ISFBREM%"+std::string(Form("%o",isfbrem))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%FBREMMAX%"+std::string(Form("%0.2f",fbremMax))+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%R9CUT%"+std::string(Form("%o",isR9selection))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%R9MIN%"+std::string(Form("%0.2f",R9Min))+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%INPUTMOMENTUMSCALE%"+std::string(inputMomentumScale)+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%TYPEEB%"+std::string(typeEB)+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%TYPEEE%"+std::string(typeEE)+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%OUTPUTPATH%"+std::string(outputPath)+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%NUMEVENTS%"+std::string(Form("%d",numberOfEvents))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%USEZ%"+std::string(Form("%d",useZ))+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%USEW%"+std::string(Form("%d",useW))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%SPLIT%"+std::string(Form("%d",splitStat))+"%g > "+inputTemp1).c_str()) ; - system (("cat "+inputTemp1+" | sed -e s%LOOPS%"+std::string(Form("%d",nLoops))+"%g > "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%DEADTRIGGERTOWER%"+std::string(Form("%o",isDeadTriggerTower))+"%g > "+inputTemp1).c_str()) ; - - - system(std::string(Form("touch %slancia_EB.sh",OutputCfgPath.c_str())).c_str()); - system(std::string(Form("touch %slancia_EE.sh",OutputCfgPath.c_str())).c_str()); - - std::ofstream JobStringEB(std::string(OutputCfgPath+"lancia_EB.sh").c_str(),std::ios::out); - std::ofstream JobStringEE(std::string(OutputCfgPath+"lancia_EE.sh").c_str(),std::ios::out); - - std::cout<<" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< "< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+"%g > "+std::string(NameCfg_EB)).c_str()) ; - - TString NameJobFile_EB = Form("%sbjob_FastCalibrator_EB.sh",OutputCfgPath.c_str()); - TString NameOut_EB = Form("%sout_EB.txt",OutputCfgPath.c_str()); - - system(("touch "+std::string(NameJobFile_EB)).c_str()); - - std::ofstream outJobEB(std::string(NameJobFile_EB).c_str(),std::ios::out); - outJobEB<< "#!/bin/sh"<> "+std::string(NameOut_EB)< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EB_1)).c_str()) ; - - TString NameJobFile_EB_1 = Form("%sbjob_FastCalibrator_EB_p%d.sh",OutputCfgPath.c_str(),nShift); - TString NameOut_EB_1 = Form("%sout_EB_p%d.txt",OutputCfgPath.c_str(),nShift); - system(("touch "+std::string(NameJobFile_EB_1)).c_str()); - - std::ofstream outJobEB_1(std::string(NameJobFile_EB_1).c_str(),std::ios::out); - outJobEB_1<< "#!/bin/sh"<> "+std::string(NameOut_EB_1)< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EB_2)).c_str()) ; - - TString NameJobFile_EB_2 = Form("%sbjob_FastCalibrator_EB_m%d.sh",OutputCfgPath.c_str(),nShift); - TString NameOut_EB_2 = Form("%sout_EB_m%d.txt",OutputCfgPath.c_str(),nShift); - system(("touch "+std::string(NameJobFile_EB_2)).c_str()); - - - std::ofstream outJobEB_2(std::string(NameJobFile_EB_2).c_str(),std::ios::out); - outJobEB_2<< "#!/bin/sh"<> "+std::string(NameOut_EB_2)< temp2.cfg").c_str()) ; - system (("cat temp2.cfg | sed -e s%"+std::string(Name1)+"%"+std::string(Name)+"%g > "+std::string(NameCfg_EB)).c_str()) ; - system(std::string("rm temp.cfg temp2.cfg").c_str()); - - - system (std::string(" cp "+NameJobFile_EB+" "+" temp.sh").c_str()); - system (("cat temp.sh | sed -e s%"+std::string(NameCfg_EB_1)+"%"+std::string(NameCfg_EB)+"%g > temp2.sh").c_str()) ; - system (("cat temp2.sh | sed -e s%"+std::string(NameOut_EB_1)+"%"+std::string(NameOut_EB)+"%g > "+std::string(NameJobFile_EB)).c_str()) ; - system(std::string("rm temp.sh temp2.sh").c_str()); - - JobStringEB.close(); - system(("sed '$d' < "+std::string(OutputCfgPath+"lancia_EB.sh")+" > tmp.txt ; sed '$d' < tmp.txt > "+std::string(OutputCfgPath+"lancia_EB.sh")).c_str()); - system(std::string(" rm tmp.txt ").c_str()); - JobStringEB.open(std::string(OutputCfgPath+"lancia_EB.sh").c_str(),std::ios::out); - JobStringEB<<"qsub -V -d "+std::string(getenv("PWD"))+"/"+OutputCfgPath+" -q longcms "+std::string(getenv("PWD"))+"/"+NameJobFile_EB< exit "< exit "< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+"%g > "+std::string(NameCfg_EE)).c_str()) ; - - TString NameJobFile_EE = Form("%sbjob_FastCalibrator_EE.sh",OutputCfgPath.c_str()); - TString NameOut_EE = Form("%sout_EE.txt",OutputCfgPath.c_str()); - system(("touch "+std::string(NameJobFile_EE)).c_str()); - - std::ofstream outJobEE(std::string(NameJobFile_EE).c_str(),std::ios::out); - outJobEE<< "#!/bin/sh"<> "+std::string(NameOut_EE)< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EE_1)).c_str()) ; - - TString NameJobFile_EE_1 = Form("%sbjob_FastCalibrator_EE_pX%d.sh",OutputCfgPath.c_str(),xShift); - TString NameOut_EE_1 = Form("%sout_EE_pX%d.txt",OutputCfgPath.c_str(),xShift); - system(("touch "+std::string(NameJobFile_EE_1)).c_str()); - - std::ofstream outJobEE_1(std::string(NameJobFile_EE_1).c_str(),std::ios::out); - outJobEE_1<< "#!/bin/sh"<> "+std::string(NameOut_EE_1)< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EE_2)).c_str()) ; - - TString NameJobFile_EE_2 = Form("%sbjob_FastCalibrator_EE_mX%d.sh",OutputCfgPath.c_str(),xShift); - TString NameOut_EE_2 = Form("%sout_EE_mX%d.txt",OutputCfgPath.c_str(),xShift); - system(("touch "+std::string(NameJobFile_EE_2)).c_str()); - - std::ofstream outJobEE_2(std::string(NameJobFile_EE_2).c_str(),std::ios::out); - outJobEE_2<< "#!/bin/sh"<> "+std::string(NameOut_EE_2)< temp2.cfg").c_str()) ; - system (("cat temp2.cfg | sed -e s%"+std::string(Name1)+"%"+std::string(Name)+"%g > "+std::string(NameCfg_EE)).c_str()) ; - system(std::string("rm temp.cfg temp2.cfg").c_str()); - - - system (std::string(" cp "+NameJobFile_EE+" "+" temp.sh").c_str()); - system (("cat temp.sh | sed -e s%"+std::string(NameCfg_EE_1)+"%"+std::string(NameCfg_EE)+"%g > temp2.sh").c_str()) ; - system (("cat temp2.sh | sed -e s%"+std::string(NameOut_EE_1)+"%"+std::string(NameOut_EE)+"%g > "+std::string(NameJobFile_EE)).c_str()) ; - system(std::string("rm temp.sh temp2.sh").c_str()); - - JobStringEE.close(); - system(("sed '$d' < "+std::string(OutputCfgPath+"lancia_EE.sh")+" > tmp.txt ; sed '$d' < tmp.txt > "+std::string(OutputCfgPath+"lancia_EE.sh")).c_str()); - system(std::string(" rm tmp.txt ").c_str()); - JobStringEE.open(std::string(OutputCfgPath+"lancia_EE.sh").c_str(),std::ios::out); - JobStringEE<<"qsub -V -d "+std::string(getenv("PWD"))+"/"+OutputCfgPath+" -q longcms "+std::string(getenv("PWD"))+"/"+NameJobFile_EE< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EE_1)).c_str()) ; - - TString NameJobFile_EE_1 = Form("%sbjob_FastCalibrator_EE_pY%d.sh",OutputCfgPath.c_str(),yShift); - TString NameOut_EE_1 = Form("%sout_EE_pY%d.txt",OutputCfgPath.c_str(),yShift); - system(("touch "+std::string(NameJobFile_EE_1)).c_str()); - - std::ofstream outJobEE_1(std::string(NameJobFile_EE_1).c_str(),std::ios::out); - outJobEE_1<< "#!/bin/sh"<> "+std::string(NameOut_EE_1)< "+inputTemp2).c_str()) ; - system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EE_2)).c_str()) ; - - TString NameJobFile_EE_2 = Form("%sbjob_FastCalibrator_EE_mY%d.sh",OutputCfgPath.c_str(),yShift); - TString NameOut_EE_2 = Form("%sout_EE_mY%d.txt",OutputCfgPath.c_str(),yShift); - system(("touch "+std::string(NameJobFile_EE_2)).c_str()); - - std::ofstream outJobEE_2(std::string(NameJobFile_EE_2).c_str(),std::ios::out); - outJobEE_2<< "#!/bin/sh"<> "+std::string(NameOut_EE_2)< -#include -#include -#include -#include -#include -#include "TFile.h" -#include "TStyle.h" -#include "TProfile2D.h" -#include "TH2F.h" -#include "TGraphErrors.h" -#include "TCanvas.h" -#include "TF1.h" -#include "TROOT.h" -#include "TLegend.h" -#include "TPaveStats.h" -#include "TTree.h" -#include "TApplication.h" -using namespace std; -/// Check if the crystal is near to a dead one - -bool CheckxtalIC (TH2F* h_scale_EB,int iPhi, int iEta ) -{ - if(h_scale_EB->GetBinContent(iPhi,iEta) ==0) return false; - - int bx= h_scale_EB->GetNbinsX(); - int by= h_scale_EB->GetNbinsY(); - - if((iPhiGetBinContent(iPhi+1,iEta) ==0) || (h_scale_EB->GetBinContent(iPhi-1,iEta)==0 && iPhi>1)) return false; - - if((iEtaGetBinContent(iPhi,iEta+1) ==0 && iEta!=85 ) || (h_scale_EB->GetBinContent(iPhi,iEta-1)==0 && iEta>1 && iEta!=87)) return false; - - if((iPhiGetBinContent(iPhi+1,iEta+1) ==0 && iEta!=85 && iEtaGetBinContent(iPhi-1,iEta-1)==0 && iEta>1 && iEta!=87 && iPhi>1)) return false; - - if((h_scale_EB->GetBinContent(iPhi+1,iEta-1) ==0 && iEta>1 && iEta!=87 && iPhiGetBinContent(iPhi-1,iEta+1)==0 && iPhi>1 && iEta!=85 && iEta >& TT_centre ) -{ - for(unsigned int k =0; kGet("ntu"); - - TFile *f2 = new TFile(input2,""); - TH2F *h_scale_EB = (TH2F*)f2->Get("h_scale_EB"); - TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); - - hcmap -> Reset("ICEMS"); - hcmap -> ResetStats(); - - /// Taking infos - - std::vector* ele1_recHit_E=0; - std::vector* ele2_recHit_E=0; - std::vector* ele1_recHit_hashedIndex=0; - std::vector* ele2_recHit_hashedIndex=0; - std::vector* ele1_recHit_flag=0; - std::vector* ele2_recHit_flag=0; - float ele1_E_true,ele2_E_true; - float ele1_tkP,ele2_tkP; - int ele1_isEB, ele2_isEB; - float ele1_fbrem,ele2_fbrem; - int isW, isZ; - - inputTree->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E); - inputTree->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E); - inputTree->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex); - inputTree->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex); - inputTree->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag); - inputTree->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag); - inputTree->SetBranchAddress("ele1_E_true", &ele1_E_true); - inputTree->SetBranchAddress("ele2_E_true", &ele2_E_true); - inputTree->SetBranchAddress("ele1_tkP", &ele1_tkP); - inputTree->SetBranchAddress("ele2_tkP", &ele2_tkP); - inputTree->SetBranchAddress("ele1_isEB", &ele1_isEB); - inputTree->SetBranchAddress("ele2_isEB", &ele2_isEB); - inputTree->SetBranchAddress("ele1_fbrem", &ele1_fbrem); - inputTree->SetBranchAddress("ele2_fbrem", &ele2_fbrem); - inputTree->SetBranchAddress("isW", &isW); - inputTree->SetBranchAddress("isZ", &isZ); - - TProfile2D* mapMomentum = new TProfile2D("mapMomentum","mapMomentum",360,0,360,170,-85,85); - TProfile2D* mapfbrem = new TProfile2D("mapfbrem","mapfbrem",360,0,360,170,-85,85); - - /// Make fbrem and p/ptrue map cycling on MC --> all the events - - for(Long64_t i=0; i< inputTree->GetEntries(); i++) - { - inputTree->GetEntry(i); - if (!(i%100000))std::cerr<size(); iRecHit++ ) { - - if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_flag->at(iRecHit) < 4 ) /// control if this recHit is good - { - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); - // iseed=iRecHit; - E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search - - } - } - - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - int phi_seed = GetIphiFromHashedIndex(seed_hashedIndex); - if(ele1_tkP>0 && ele1_E_true>0 && abs(ele1_tkP/ele1_E_true)<2. && abs(ele1_tkP/ele1_E_true)>0.5) mapMomentum->Fill(phi_seed,eta_seed,abs(ele1_tkP/ele1_E_true)); - mapfbrem->Fill(phi_seed,eta_seed,abs(ele1_fbrem)); - } - - if (ele2_isEB == 1 && isZ==1) { - - double E_seed=0; - int seed_hashedIndex=-1;// iseed; - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_flag->at(iRecHit) < 4 ) /// control if this recHit is good - { - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); - // iseed=iRecHit; - E_seed=ele2_recHit_E -> at(iRecHit); ///! Seed search - - } - } - - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - int phi_seed = GetIphiFromHashedIndex(seed_hashedIndex); - if(ele2_tkP>0 && ele2_E_true>0 && abs(ele2_tkP/ele2_E_true)<2. && abs(ele2_tkP/ele2_E_true)>0.5) mapMomentum->Fill(phi_seed,eta_seed,abs(ele2_tkP/ele2_E_true)); - mapfbrem->Fill(phi_seed,eta_seed,abs(ele2_fbrem)); - - } - } - - /// Map of IC normalized in eta rings - - std::vector< std::pair > TT_centre ; - - TT_centre.push_back(std::pair (58,49)); - TT_centre.push_back(std::pair (53,109)); - TT_centre.push_back(std::pair (8,114)); - TT_centre.push_back(std::pair (83,169)); - TT_centre.push_back(std::pair (53,174)); - TT_centre.push_back(std::pair (63,194)); - TT_centre.push_back(std::pair (83,224)); - TT_centre.push_back(std::pair (73,344)); - TT_centre.push_back(std::pair (83,358)); - TT_centre.push_back(std::pair (-13,18)); - TT_centre.push_back(std::pair (-18,23)); - TT_centre.push_back(std::pair (-8,53)); - TT_centre.push_back(std::pair (-3,63)); - TT_centre.push_back(std::pair (-53,128)); - TT_centre.push_back(std::pair (-53,183)); - TT_centre.push_back(std::pair (-83,193)); - TT_centre.push_back(std::pair (-74,218)); - TT_centre.push_back(std::pair (-8,223)); - TT_centre.push_back(std::pair (-68,303)); - TT_centre.push_back(std::pair (-43,328)); - - /// Mean over phi corrected skipping dead channel - - for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1; iEta ++) - { - float SumIC = 0; - int numIC = 0; - - for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) - { - bool isGood = CheckxtalIC(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT(iPhi,iEta,TT_centre); - - if(isGood && isGoodTT) - { - SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); - numIC ++ ; - } - } - //fede: skip bad channels and bad TTs - for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) - { - if(numIC==0 || SumIC==0) continue; - - bool isGood = CheckxtalIC(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT(iPhi,iEta,TT_centre); - if (!isGood || !isGoodTT) continue; - - hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); - } - } - - /// ratio map - - TH2F* ratioMap = (TH2F*) hcmap -> Clone("ratioMap"); - ratioMap->Reset(); - - for( int i =0 ; iGetNbinsX() ; i++){ - for( int j=0; jGetNbinsY() ; j++){ - if(hcmap->GetBinContent(i,j)!=0 && mapMomentum->GetBinContent(i,j)!=0) - ratioMap->SetBinContent(i+1,j+1,mapMomentum->GetBinContent(i,j)/hcmap->GetBinContent(i,j)); - } - } - - /// Profile along phi taking into account dead channels - TGraphErrors *coeffEBp = new TGraphErrors(); - TGraphErrors *coeffEBm = new TGraphErrors(); - - for (int iPhi =1; iPhi< hcmap->GetNbinsX()+1 ; iPhi++){ - double SumEBp =0, SumEBm=0; - double iEBp=0, iEBm=0; - for(int iEta = 1; iEtaGetNbinsY()+1 ; iEta++){ - if(hcmap->GetBinContent(iPhi,iEta)==0)continue; - if(iEta>85) {SumEBp=SumEBp+mapMomentum->GetBinContent(iPhi,iEta)/hcmap->GetBinContent(iPhi,iEta); - iEBp++;} - else{ SumEBm=SumEBm+mapMomentum->GetBinContent(iPhi,iEta)/hcmap->GetBinContent(iPhi,iEta); - iEBm++;} - } - coeffEBp->SetPoint(iPhi-1,iPhi-1,SumEBp/iEBp); - coeffEBm->SetPoint(iPhi-1,iPhi-1,SumEBm/iEBm); - - } - - TFile* outputGraph = new TFile("output/GraphFor_P_Correction.root","RECREATE"); - outputGraph->cd(); - - coeffEBp->Write("coeffEBp"); - coeffEBm->Write("coeffEBm"); - outputGraph->Close(); - - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(1); - gStyle->SetOptStat(0); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - TCanvas* c1 = new TCanvas("mapMomentum","mapMomentum",1); - c1->cd(); - mapMomentum->GetXaxis()->SetTitle("#phi"); - mapMomentum->GetXaxis()->SetNdivisions(20); - c1->SetGridx(); - mapMomentum->GetYaxis()->SetTitle("#eta"); - mapMomentum->GetZaxis()->SetRangeUser(0.7,1.3); - mapMomentum->Draw("colz"); - - TCanvas* c2 = new TCanvas("mapfbrem","mapfbrem",1); - c2->cd(); - mapfbrem->GetXaxis()->SetTitle("#phi"); - mapfbrem->GetYaxis()->SetTitle("#eta"); - mapfbrem->GetXaxis()->SetNdivisions(20); - c2->SetGridx(); - mapfbrem->GetZaxis()->SetRangeUser(0.,0.7); - mapfbrem->Draw("colz"); - - TCanvas* c3 = new TCanvas("ratioMap","ratioMap",1); - c3->cd(); - ratioMap->GetXaxis()->SetTitle("#phi"); - ratioMap->GetYaxis()->SetTitle("#eta"); - ratioMap->GetXaxis()->SetNdivisions(20); - c3->SetGridx(); - ratioMap->GetZaxis()->SetRangeUser(0.7,1.3); - ratioMap->Draw("colz"); - - TCanvas* c4 = new TCanvas("coeffEB","coeffEB",1); - c4->cd(); - coeffEBp->GetXaxis()->SetTitle("#phi"); - coeffEBp->GetYaxis()->SetTitle("p/p_{true}"); - coeffEBp -> SetMarkerStyle(20); - coeffEBp -> SetMarkerSize(1); - coeffEBp -> SetMarkerColor(kRed+1); - coeffEBp -> SetLineColor(kRed+1); - c4->SetGridx(); - c4->SetGridy(); - ratioMap->Draw("ap"); - - coeffEBm->GetXaxis()->SetTitle("#phi"); - coeffEBm->GetYaxis()->SetTitle("p/p_{true}"); - coeffEBm -> SetMarkerStyle(20); - coeffEBm -> SetMarkerSize(1); - coeffEBm -> SetMarkerColor(kBlue+1); - coeffEBm -> SetLineColor(kBlue+1); - coeffEBm->Draw("ap same"); - - - theApp->Run(); - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp b/EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp deleted file mode 100644 index 8a19e32250f..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/NormalizeIC_EE.cpp +++ /dev/null @@ -1,572 +0,0 @@ -/// -/// Stand-alone to Normalize DATA/MC IC Coefficient along one ring skipping dead channels and TT EE -/// Input File Scale Map of a data sample (can be used also on MC) an this is saved in the same -/// file updating the old scale_map normalized by rings without skip dead channels - -#include -#include -#include -#include -#include -#include -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TROOT.h" -#include "TStyle.h" -#include -#include "../../NtuplePackage/interface/ntpleUtils.h" -#include "TApplication.h" - -#include "FWCore/ParameterSet/interface/ProcessDesc.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" - -using namespace std; - -/// Check if the crystal is near to a dead one -bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir); -/// Check if the crystal is near to a dead TT -bool CheckxtalTT (int ix, int iy, int ir, std::vector >& TT_centre ); - -int main( int argc, char **argv){ - - /// map for dead TT centre - - std::vector< std::pair > TT_centre_EEP; - std::vector< std::pair > TT_centre_EEM; - - TT_centre_EEP.push_back(std::pair (78,78)); - TT_centre_EEP.push_back(std::pair (83,28)); - TT_centre_EEP.push_back(std::pair (83,23)); - TT_centre_EEM.push_back(std::pair (53,28)); - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - /// Acquisition from cfg file - - if(argc != 2){ - std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - - std::string configFileName = argv[1]; - boost::shared_ptr parameterSet = edm::readConfig(configFileName); - edm::ParameterSet Options = parameterSet -> getParameter("Options"); - // parameterSet.reset(); - - std::string infile1 = "NULL"; - if(Options.existsAs("infile1")) - infile1 = Options.getParameter("infile1"); - - std::string infile2 = "NULL"; - if(Options.existsAs("infile2")) - infile2 = Options.getParameter("infile2"); - - std::string infile3 = "NULL"; - if(Options.existsAs("infile3")) - infile3 = Options.getParameter("infile3"); - - int evalStat = 1; - if(Options.existsAs("evalStat")) - evalStat = Options.getParameter("evalStat"); - - if ( infile1.empty()) { - cout << " No input file specified !" << endl; - return 1; - } - - if ( evalStat && (infile2.empty() || infile3.empty() )){ - cout << " No input files to evaluate statistical precision specified !" << endl; - return 1; - } - - std::string fileType = "NULL"; - if(Options.existsAs("fileType")) - fileType = Options.getParameter("fileType"); - - std::string dirName = "NULL"; - if(Options.existsAs("dirName")) - dirName = Options.getParameter("dirName"); - - cout << "Making Eta ring Normalization for: " << infile1 << endl; - - - TApplication* theApp = new TApplication("Application",&argc, argv); - - /// Input file with full statistic - - TFile *f = new TFile(infile1.c_str(),"UPDATE"); - TH2F* h_scale_EE[2],*hcmap_EE[2]; - - h_scale_EE[1] = (TH2F*)f->Get("h_scale_EEP"); - h_scale_EE[0] = (TH2F*)f->Get("h_scale_EEM"); - - hcmap_EE[1] = (TH2F*) h_scale_EE[1]->Clone("hcmap_EEP"); - hcmap_EE[0] = (TH2F*) h_scale_EE[0]->Clone("hcmap_EEM"); - - hcmap_EE[0] -> Reset("ICEMS"); - hcmap_EE[1] -> Reset("ICEMS"); - hcmap_EE[0] -> ResetStats(); - hcmap_EE[1] -> ResetStats(); - - /// ring structure from eerings.dat - TH2F *hrings[2]; - hrings[0] = (TH2F*)h_scale_EE[0]->Clone("hringsEEM"); - hrings[1] = (TH2F*)h_scale_EE[1]->Clone("hringsEEP"); - hrings[0] ->Reset("ICMES"); - hrings[1] ->Reset("ICMES"); - hrings[0] ->ResetStats(); - hrings[1] ->ResetStats(); - - - FILE *fRing; - fRing = fopen("macros/eerings.dat","r"); - int x,y,z,ir; - while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { - if(z>0) hrings[1]->Fill(x,y,ir); - if(z<0) hrings[0]->Fill(x,y,ir); - } - - std::vector SumIC_Ring_EEP,SumIC_Ring_EEM,Sumxtal_Ring_EEP,Sumxtal_Ring_EEM; - - SumIC_Ring_EEP.assign(40,0); - SumIC_Ring_EEM.assign(40,0); - Sumxtal_Ring_EEP.assign(40,0); - Sumxtal_Ring_EEM.assign(40,0); - - /// Mean over phi corrected skipping dead channel - - for(int k=0; k<2 ; k++){ - for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ - for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ - - ir = int(hrings[k]->GetBinContent(ix,iy)); - - bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); - bool isGoodTT; - - if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); - else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); - - if(k!=0 && isGoodTT && isGood ){ - SumIC_Ring_EEP.at(ir) = SumIC_Ring_EEP.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEP.at(ir) = Sumxtal_Ring_EEP.at(ir) + 1.; - } - if(k==0 && isGoodTT && isGood){ - SumIC_Ring_EEM.at(ir) = SumIC_Ring_EEM.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEM.at(ir) = Sumxtal_Ring_EEM.at(ir) + 1.; - } - } - } - } - - for(int k=0; k<2 ; k++){ - for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ - for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ - - ir = int(hrings[k]->GetBinContent(ix,iy)); - - if(k!=0){ - if(ir>33){ hcmap_EE[k]->Fill(ix,iy,0.); - continue;} - if(Sumxtal_Ring_EEP.at(ir) != 0 && SumIC_Ring_EEP.at(ir)!= 0) - hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP.at(ir)/Sumxtal_Ring_EEP.at(ir))); - } - else{ - if(ir>33){hcmap_EE[k]->Fill(ix,iy,0.); - continue; - } - if(Sumxtal_Ring_EEM.at(ir) != 0 && SumIC_Ring_EEM.at(ir) != 0) - hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM.at(ir)/Sumxtal_Ring_EEM.at(ir))); - } - } - } - } - - TH2F* h_scale_EE_Even[2],*hcmap_EE_Even[2]; - TH2F* h_scale_EE_Odd[2],*hcmap_EE_Odd[2]; - - h_scale_EE_Even[1] = new TH2F(); - h_scale_EE_Even[0] = new TH2F(); - - h_scale_EE_Odd[1] = new TH2F(); - h_scale_EE_Odd[0] = new TH2F(); - - hcmap_EE_Even[1] = new TH2F(); - hcmap_EE_Even[0] = new TH2F(); - - hcmap_EE_Odd[1] = new TH2F(); - hcmap_EE_Odd[0] = new TH2F(); - - TFile *f2 = new TFile(); - TFile *f3 = new TFile(); - - /// if evalstat --> apply also to the other file Odd and Even - if(evalStat){ - - f2 = new TFile(infile2.c_str(),"UPDATE"); - f3 = new TFile(infile3.c_str(),"UPDATE"); - - h_scale_EE_Even[1] = (TH2F*)f2->Get("h_scale_EEP"); - h_scale_EE_Even[0] = (TH2F*)f2->Get("h_scale_EEM"); - - h_scale_EE_Odd[1] = (TH2F*)f3->Get("h_scale_EEP"); - h_scale_EE_Odd[0] = (TH2F*)f3->Get("h_scale_EEM"); - - hcmap_EE_Even[1] = (TH2F*) h_scale_EE_Even[1]->Clone("hcmap_EEP"); - hcmap_EE_Even[0] = (TH2F*) h_scale_EE_Even[0]->Clone("hcmap_EEM"); - - hcmap_EE_Odd[1] = (TH2F*) h_scale_EE_Odd[1]->Clone("hcmap_EEP"); - hcmap_EE_Odd[0] = (TH2F*) h_scale_EE_Odd[0]->Clone("hcmap_EEM"); - - hcmap_EE_Even[0] -> Reset("ICEMS"); - hcmap_EE_Even[1] -> Reset("ICEMS"); - hcmap_EE_Even[0] -> ResetStats(); - hcmap_EE_Even[1] -> ResetStats(); - - hcmap_EE_Odd[0] -> Reset("ICEMS"); - hcmap_EE_Odd[1] -> Reset("ICEMS"); - hcmap_EE_Odd[0] -> ResetStats(); - hcmap_EE_Odd[1] -> ResetStats(); - - std::vector SumIC_Ring_EEP_Even,SumIC_Ring_EEM_Even,Sumxtal_Ring_EEP_Even,Sumxtal_Ring_EEM_Even; - std::vector SumIC_Ring_EEP_Odd,SumIC_Ring_EEM_Odd,Sumxtal_Ring_EEP_Odd,Sumxtal_Ring_EEM_Odd; - - SumIC_Ring_EEP_Even.assign(40,0); - SumIC_Ring_EEM_Even.assign(40,0); - Sumxtal_Ring_EEP_Even.assign(40,0); - Sumxtal_Ring_EEM_Even.assign(40,0); - SumIC_Ring_EEP_Odd.assign(40,0); - SumIC_Ring_EEM_Odd.assign(40,0); - Sumxtal_Ring_EEP_Odd.assign(40,0); - Sumxtal_Ring_EEM_Odd.assign(40,0); - - /// Mean over phi corrected skipping dead channel: Even sample - - for(int k=0; k<2 ; k++){ - for( int ix = 0; ix < h_scale_EE_Even[k]->GetNbinsX()+1 ; ix++ ){ - for(int iy = 0; iy < h_scale_EE_Even[k]->GetNbinsY()+1 ; iy++ ){ - - ir = int(hrings[k]->GetBinContent(ix,iy)); - - bool isGood = CheckxtalIC(h_scale_EE_Even[k],ix,iy,ir); - bool isGoodTT; - - if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); - else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); - - if(k!=0 && isGoodTT && isGood ){ - SumIC_Ring_EEP_Even.at(ir) = SumIC_Ring_EEP_Even.at(ir) + h_scale_EE_Even[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEP_Even.at(ir) = Sumxtal_Ring_EEP_Even.at(ir) + 1.; - } - if(k==0 && isGoodTT && isGood){ - SumIC_Ring_EEM_Even.at(ir) = SumIC_Ring_EEM_Even.at(ir) + h_scale_EE_Even[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEM_Even.at(ir) = Sumxtal_Ring_EEM_Even.at(ir) + 1.; - } - } - } - } - - for(int k=0; k<2 ; k++){ - for( int ix = 0; ix < h_scale_EE_Even[k]->GetNbinsX()+1 ; ix++ ){ - for(int iy = 0; iy < h_scale_EE_Even[k]->GetNbinsY()+1 ; iy++ ){ - - ir = int(hrings[k]->GetBinContent(ix,iy)); - - if(k!=0){ - if(ir>33){ hcmap_EE_Even[k]->Fill(ix,iy,0.); - continue;} - if(Sumxtal_Ring_EEP_Even.at(ir) != 0 && SumIC_Ring_EEP_Even.at(ir)!= 0) - hcmap_EE_Even[k]->Fill(ix,iy,h_scale_EE_Even[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP_Even.at(ir)/Sumxtal_Ring_EEP_Even.at(ir))); - } - else{ - if(ir>33){hcmap_EE_Even[k]->Fill(ix,iy,0.); - continue; - } - if(Sumxtal_Ring_EEM_Even.at(ir) != 0 && SumIC_Ring_EEM_Even.at(ir) != 0) - hcmap_EE_Even[k]->Fill(ix,iy,h_scale_EE_Even[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM_Even.at(ir)/Sumxtal_Ring_EEM_Even.at(ir))); - } - } - } - } - - - /// Mean over phi corrected skipping dead channel: Odd sample - - for(int k=0; k<2 ; k++){ - for( int ix = 0; ix < h_scale_EE_Odd[k]->GetNbinsX()+1 ; ix++ ){ - for(int iy = 0; iy < h_scale_EE_Odd[k]->GetNbinsY()+1 ; iy++ ){ - - ir = int(hrings[k]->GetBinContent(ix,iy)); - - bool isGood = CheckxtalIC(h_scale_EE_Odd[k],ix,iy,ir); - bool isGoodTT; - - if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); - else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); - - if(k!=0 && isGoodTT && isGood ){ - SumIC_Ring_EEP_Odd.at(ir) = SumIC_Ring_EEP_Odd.at(ir) + h_scale_EE_Odd[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEP_Odd.at(ir) = Sumxtal_Ring_EEP_Odd.at(ir) + 1.; - } - if(k==0 && isGoodTT && isGood){ - SumIC_Ring_EEM_Odd.at(ir) = SumIC_Ring_EEM_Odd.at(ir) + h_scale_EE_Odd[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEM_Odd.at(ir) = Sumxtal_Ring_EEM_Odd.at(ir) + 1.; - } - } - } - } - - for(int k=0; k<2 ; k++){ - for( int ix = 0; ix < h_scale_EE_Odd[k]->GetNbinsX()+1 ; ix++ ){ - for(int iy = 0; iy < h_scale_EE_Odd[k]->GetNbinsY()+1 ; iy++ ){ - - ir = int(hrings[k]->GetBinContent(ix,iy)); - - if(k!=0){ - if(ir>33){ hcmap_EE_Odd[k]->Fill(ix,iy,0.); - continue;} - if(Sumxtal_Ring_EEP_Odd.at(ir) != 0 && SumIC_Ring_EEP_Odd.at(ir)!= 0) - hcmap_EE_Odd[k]->Fill(ix,iy,h_scale_EE_Odd[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP_Odd.at(ir)/Sumxtal_Ring_EEP_Odd.at(ir))); - } - else{ - if(ir>33){hcmap_EE_Odd[k]->Fill(ix,iy,0.); - continue; - } - if(Sumxtal_Ring_EEM_Odd.at(ir) != 0 && SumIC_Ring_EEM_Odd.at(ir) != 0) - hcmap_EE_Odd[k]->Fill(ix,iy,h_scale_EE_Odd[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM_Odd.at(ir)/Sumxtal_Ring_EEM_Odd.at(ir))); - } - } - } - } - } - - TCanvas *cEEP[12]; - TCanvas *cEEM[12]; - - /// --- plot 0 : map of coefficients - cEEP[0] = new TCanvas("cEEP","cmapEEP not normalized"); - cEEP[0] -> cd(); - cEEP[0]->SetLeftMargin(0.1); - cEEP[0]->SetRightMargin(0.13); - cEEP[0]->SetGridx(); - cEEP[0]->SetGridy(); - h_scale_EE[1]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE[1]->Draw("COLZ"); - h_scale_EE[1]->GetXaxis() ->SetTitle("ix"); - h_scale_EE[1]->GetYaxis() ->SetTitle("iy"); - h_scale_EE[1]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEM[0] = new TCanvas("cEEM","cmapEEM not normalized"); - cEEM[0] -> cd(); - cEEM[0]->SetLeftMargin(0.1); - cEEM[0]->SetRightMargin(0.13); - cEEM[0]->SetGridx(); - cEEM[0]->SetGridy(); - - h_scale_EE[0]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE[0]->Draw("COLZ"); - h_scale_EE[0]->GetXaxis() ->SetTitle("ix"); - h_scale_EE[0]->GetYaxis() ->SetTitle("iy"); - h_scale_EE[0]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEP[1] = new TCanvas("cmapEEP Normalized","cmapEEP Normalized"); - cEEP[1] -> cd(); - cEEP[1]->SetLeftMargin(0.1); - cEEP[1]->SetRightMargin(0.13); - cEEP[1]->SetGridx(); - cEEP[1]->SetGridy(); - - hcmap_EE[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE[1]->Draw("COLZ"); - hcmap_EE[1]->GetXaxis() ->SetTitle("ix"); - hcmap_EE[1]->GetYaxis() ->SetTitle("iy"); - hcmap_EE[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[1] = new TCanvas("cmapEEM Normalized","cmapEEM Normalized"); - cEEM[1] -> cd(); - cEEM[1]->SetLeftMargin(0.1); - cEEM[1]->SetRightMargin(0.13); - cEEM[1]->SetGridx(); - cEEM[1]->SetGridy(); - hcmap_EE[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE[0]->Draw("COLZ"); - hcmap_EE[0]->GetXaxis() ->SetTitle("ix"); - hcmap_EE[0]->GetYaxis() ->SetTitle("iy"); - hcmap_EE[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - - f->cd(); - hcmap_EE[0]->Write("h_scale_map_EEP"); - hcmap_EE[1]->Write("h_scale_map_EEP"); - - if(evalStat){ - /// --- plot 0 : map of coefficients - cEEP[2] = new TCanvas("cEEP_Even","cmapEEP not normalized Even"); - cEEP[2] -> cd(); - cEEP[2]->SetLeftMargin(0.1); - cEEP[2]->SetRightMargin(0.13); - cEEP[2]->SetGridx(); - cEEP[2]->SetGridy(); - h_scale_EE_Even[1]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE_Even[1]->Draw("COLZ"); - h_scale_EE_Even[1]->GetXaxis() ->SetTitle("ix"); - h_scale_EE_Even[1]->GetYaxis() ->SetTitle("iy"); - h_scale_EE_Even[1]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEM[2] = new TCanvas("cEEM_Even","cmapEEM not normalized Even"); - cEEM[2] -> cd(); - cEEM[2]->SetLeftMargin(0.1); - cEEM[2]->SetRightMargin(0.13); - cEEM[2]->SetGridx(); - cEEM[2]->SetGridy(); - - h_scale_EE_Even[0]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE_Even[0]->Draw("COLZ"); - h_scale_EE_Even[0]->GetXaxis() ->SetTitle("ix"); - h_scale_EE_Even[0]->GetYaxis() ->SetTitle("iy"); - h_scale_EE_Even[0]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEP[3] = new TCanvas("cmapEEP Normalized Even","cmapEEP Normalized Even"); - cEEP[3] -> cd(); - cEEP[3]->SetLeftMargin(0.1); - cEEP[3]->SetRightMargin(0.13); - cEEP[3]->SetGridx(); - cEEP[3]->SetGridy(); - - hcmap_EE_Even[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE_Even[1]->Draw("COLZ"); - hcmap_EE_Even[1]->GetXaxis() ->SetTitle("ix"); - hcmap_EE_Even[1]->GetYaxis() ->SetTitle("iy"); - hcmap_EE_Even[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[3] = new TCanvas("cmapEEM Normalized Even","cmapEEM Normalized Even"); - cEEM[3] -> cd(); - cEEM[3]->SetLeftMargin(0.1); - cEEM[3]->SetRightMargin(0.13); - cEEM[3]->SetGridx(); - cEEM[3]->SetGridy(); - hcmap_EE_Even[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE_Even[0]->Draw("COLZ"); - hcmap_EE_Even[0]->GetXaxis() ->SetTitle("ix"); - hcmap_EE_Even[0]->GetYaxis() ->SetTitle("iy"); - hcmap_EE_Even[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - - f2->cd(); - hcmap_EE_Even[0]->Write("h_scale_map_EEP"); - hcmap_EE_Even[1]->Write("h_scale_map_EEP"); - - /// --- plot 0 : map of coefficients - cEEP[4] = new TCanvas("cEEP_Odd","cmapEEP not normalized Odd"); - cEEP[4] -> cd(); - cEEP[4]->SetLeftMargin(0.1); - cEEP[4]->SetRightMargin(0.13); - cEEP[4]->SetGridx(); - cEEP[4]->SetGridy(); - h_scale_EE_Odd[1]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE_Odd[1]->Draw("COLZ"); - h_scale_EE_Odd[1]->GetXaxis() ->SetTitle("ix"); - h_scale_EE_Odd[1]->GetYaxis() ->SetTitle("iy"); - h_scale_EE_Odd[1]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEM[4] = new TCanvas("cEEM_Odd","cmapEEM not normalized Odd"); - cEEM[4] -> cd(); - cEEM[4]->SetLeftMargin(0.1); - cEEM[4]->SetRightMargin(0.13); - cEEM[4]->SetGridx(); - cEEM[4]->SetGridy(); - - h_scale_EE_Odd[0]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE_Odd[0]->Draw("COLZ"); - h_scale_EE_Odd[0]->GetXaxis() ->SetTitle("ix"); - h_scale_EE_Odd[0]->GetYaxis() ->SetTitle("iy"); - h_scale_EE_Odd[0]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEP[5] = new TCanvas("cmapEEP Normalized Odd","cmapEEP Normalized Odd"); - cEEP[5] -> cd(); - cEEP[5]->SetLeftMargin(0.1); - cEEP[5]->SetRightMargin(0.13); - cEEP[5]->SetGridx(); - cEEP[5]->SetGridy(); - - hcmap_EE_Odd[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE_Odd[1]->Draw("COLZ"); - hcmap_EE_Odd[1]->GetXaxis() ->SetTitle("ix"); - hcmap_EE_Odd[1]->GetYaxis() ->SetTitle("iy"); - hcmap_EE_Odd[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[5] = new TCanvas("cmapEEM Normalized Odd","cmapEEM Normalized Odd"); - cEEM[5] -> cd(); - cEEM[5]->SetLeftMargin(0.1); - cEEM[5]->SetRightMargin(0.13); - cEEM[5]->SetGridx(); - cEEM[5]->SetGridy(); - hcmap_EE_Odd[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE_Odd[0]->Draw("COLZ"); - hcmap_EE_Odd[0]->GetXaxis() ->SetTitle("ix"); - hcmap_EE_Odd[0]->GetYaxis() ->SetTitle("iy"); - hcmap_EE_Odd[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - f3->cd(); - hcmap_EE_Odd[0]->Write("h_scale_map_EEP"); - hcmap_EE_Odd[1]->Write("h_scale_map_EEP"); - } - - theApp->Run(); - return 0; - - } - -////////////////////////////////////////////////////////////// - -bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir) -{ - if(h_scale_EE->GetBinContent(ix,iy) ==0) return false; - - int bx= h_scale_EE->GetNbinsX(); - int by= h_scale_EE->GetNbinsY(); - - if((ixGetBinContent(ix+1,iy) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix-1,iy)==0 && ix>1 && (ir!=0 || ir<33))) return false; - - if((iyGetBinContent(ix,iy+1) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix,iy-1)==0 && iy>1 && (ir!=0 || ir<33))) return false; - - if((ixGetBinContent(ix+1,iy+1) ==0 && iyGetBinContent(ix-1,iy-1)==0 && iy>1 && ix>1 && (ir!=0 || ir<33))) return false; - - if((h_scale_EE->GetBinContent(ix+1,iy-1) ==0 && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && ix>1 && iy >& TT_centre ) -{ - for( unsigned int k =0; k -#include -#include -#include "TFile.h" -#include "TStyle.h" -#include "TCanvas.h" -#include "TLegend.h" -#include "TPaveStats.h" -#include "TH2F.h" -#include "TGraphErrors.h" -#include "TROOT.h" -#include "TLatex.h" -#include "TTree.h" -#include "TChain.h" - -#include -#include -#include "../../NtuplePackage/interface/treeReader.h" - - -void SetWHLTPathNames(std::vector > > & WHLTPathNames) ; - - -int main (int argc, char ** argv){ - -std::string category = std::string(argv[1]); - -double xtalWidth=0.01745329; -double luminosity=11.35; -double etaringEE=0.0325; - -// Acquisition of input file -TChain* treeDATA = new TChain("simpleNtupleEoverP/SimpleNtupleEoverP"); - -treeDATA->Add("/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012D_22Jan2013-v1.root"); - - -treeReader *fReader = new treeReader((TTree*)(treeDATA), false); -treeDATA->SetBranchStatus("*",0); -treeDATA->SetBranchStatus("isW",1); -treeDATA->SetBranchStatus("isZ",1); -treeDATA->SetBranchStatus("ele1_seedZside",1); -treeDATA->SetBranchStatus("ele1_seedIx",1); -treeDATA->SetBranchStatus("ele1_seedIy",1); -treeDATA->SetBranchStatus("ele1_seedIphi",1); -treeDATA->SetBranchStatus("ele1_seedIeta",1); -treeDATA->SetBranchStatus("ele1_e3x3",1); -treeDATA->SetBranchStatus("ele1_scEta",1); -treeDATA->SetBranchStatus("ele1_scERaw",1); - -treeDATA->SetBranchStatus("ele2_seedZside",1); -treeDATA->SetBranchStatus("ele2_seedIx",1); -treeDATA->SetBranchStatus("ele2_seedIy",1); -treeDATA->SetBranchStatus("ele2_seedIphi",1); -treeDATA->SetBranchStatus("ele2_seedIeta",1); -treeDATA->SetBranchStatus("ele2_e3x3",1); -treeDATA->SetBranchStatus("ele2_scEta",1); -treeDATA->SetBranchStatus("ele2_scERaw",1); - -// Set Single Electron Trigger Names - -std::vector > > WHLTPathNames; -SetWHLTPathNames(WHLTPathNames); - -TH2F* h_OccupancyEB = new TH2F("h_OccupancyEB","h_OccupancyEB",360,1,361,171,-85,86); -TH2F* h_OccupancyEB2 = new TH2F("h_OccupancyEB2","h_OccupancyEB",360,1,361,171,-85,86); - -TH2F* h_OccupancyEE[2]; -h_OccupancyEE[0] = new TH2F("h_OccupancyEEM","h_OccupancyEEP",100,1,101,100,1,101); -h_OccupancyEE[1] = new TH2F("h_OccupancyEEP","h_OccupancyEEM",100,1,101,100,1,101); - -TH2F* h_OccupancyEE2[2]; -h_OccupancyEE2[1] = new TH2F("h_OccupancyEEP2","h_OccupancyEEP2",100,1,101,100,1,101); -h_OccupancyEE2[0] = new TH2F("h_OccupancyEEM2","h_OccupancyEEM2",100,1,101,100,1,101); - - -std::cout<<" DATA Entries = "<GetEntries()<GetEntries(); ++entry) { - - if( entry%100000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; - treeDATA->GetEntry(entry); - - //if(fReader->getInt("isHLTEle27")[0] != 1 || fReader->getInt("isGood")[0] !=1 ) continue; - - bool skipEvent = true; - bool isWHLT = false; - - // W triggers - for(unsigned int HLTIt = 0; HLTIt < WHLTPathNames.size(); ++HLTIt){ - - if( fReader->getInt("runId")[0] < ((WHLTPathNames.at(HLTIt)).second).first ) continue; - if( fReader->getInt("runId")[0] > ((WHLTPathNames.at(HLTIt)).second).second ) continue; - - for(unsigned int iHLTIt = 0; iHLTIt < fReader->GetString("HLT_Names")->size(); ++iHLTIt){ - if( (fReader->GetString("HLT_Names")->at(iHLTIt) == WHLTPathNames.at(HLTIt).first) && (fReader->GetInt("HLT_Accept")->at(iHLTIt) == 1) ) isWHLT = true; - } - - if( isWHLT == true ) skipEvent = false; - } - - - if(skipEvent == true) continue ; - - - if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); - if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0) -// h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0) -// h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0) -// h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - -// if(category == "Default"){ -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0) -// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); -// } - -// if(category == "R9"){ -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) -// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) -// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) -// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// } - -// if(category == "fbrem") { -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) -// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) -// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) -// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// } - -// if(category == "Pt"){ -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) -// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) -// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) -// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// } - - if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 ){ - if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - } - - -// if(category=="Default"){ -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0){ -// if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_r9")[0]>0.8) -// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - -// if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_r9")[0]>0.88) -// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - -// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_r9")[0]>0.92) -// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - -// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_r9")[0]>0.94) -// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// } -// } - - - if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1){ - - if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - } - - -// if(category == "Default"){ - -// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0){ - -// if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_r9")[0]>0.8) -// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - -// if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_r9")[0]>0.88) -// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - -// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_r9")[0]>0.92) -// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - -// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_r9")[0]>0.94) -// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); -// } -// } - - - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); - - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1){ - - if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - } - - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==1){ - - if(fabs(fReader->getFloat("ele2_scEta")[0])<1.75 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.8) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); - - if(fabs(fReader->getFloat("ele2_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele2_scEta")[0])<2. && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.88) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - if(fabs(fReader->getFloat("ele2_scEta")[0])>=2. && fabs(fReader->getFloat("ele2_scEta")[0])<2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.92) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - if(fabs(fReader->getFloat("ele2_scEta")[0])>=2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.94) - h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - } - - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1){ - - if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); - - } - - if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==-1){ - - if(fabs(fReader->getFloat("ele2_scEta")[0])<1.75 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.8) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); - - if(fabs(fReader->getFloat("ele2_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele2_scEta")[0])<2. && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.88) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - if(fabs(fReader->getFloat("ele2_scEta")[0])>=2. && fabs(fReader->getFloat("ele2_scEta")[0])<2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.92) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - if(fabs(fReader->getFloat("ele2_scEta")[0])>=2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.94) - h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); - - } - - -} - -// Graph ocuppancy for single xtal - -TGraphErrors *OccupancyEB_vs_Eta = new TGraphErrors(); -TGraphErrors *OccupancyEEP_vs_Eta = new TGraphErrors(); -TGraphErrors *OccupancyEEM_vs_Eta = new TGraphErrors(); - -TGraphErrors *OccupancyAll = new TGraphErrors(); -TGraphErrors *OccupancyAll2 = new TGraphErrors(); - - -// Graph for EB -int nPoint=0, nPointAll =0, nPointAll2 =0; - - -for(int iEta =0; iEtaGetNbinsY() ;iEta++){ - double sumHit =0, nHit=0; - for(int iPhi =0; iPhiGetNbinsX() ;iPhi++){ - if(h_OccupancyEB->GetBinContent(iPhi+1,iEta+1)==0) continue; - sumHit=sumHit+h_OccupancyEB->GetBinContent(iPhi+1,iEta+1); - nHit++; - } - if(iEta<85 && sumHit!=0 && nHit!=0 ){ OccupancyEB_vs_Eta->SetPoint(nPoint,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); - OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - - OccupancyAll->SetPoint(nPointAll,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); - OccupancyAll->SetPointError(nPointAll,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - } - - if(iEta<85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,-(85-iEta)*xtalWidth,0.); - OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); - OccupancyAll->SetPoint(nPointAll,-(85-iEta)*xtalWidth,0.); - OccupancyAll->SetPointError(nPointAll,0.,0.); -} - - if(iEta==85 && sumHit!=0 && nHit!=0){ OccupancyEB_vs_Eta->SetPoint(nPoint,0.,sumHit/(nHit*luminosity)); - OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - OccupancyAll->SetPoint(nPointAll,0.,sumHit/(nHit*luminosity)); - OccupancyAll->SetPoint(nPointAll,0.,sumHit/(nHit*luminosity)); - } - - if(iEta==85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,0.,0.); - OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); - OccupancyAll->SetPoint(nPointAll,0.,0.); - OccupancyAll->SetPointError(nPointAll,0.,0.); -} - - if(iEta>85 && sumHit!=0 && nHit!=0){ OccupancyEB_vs_Eta->SetPoint(nPoint,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); - OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - OccupancyAll->SetPoint(nPointAll,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); - OccupancyAll->SetPointError(nPointAll,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - } - - if(iEta<85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,(iEta-85)*xtalWidth,0.); - OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); - OccupancyAll->SetPoint(nPointAll,(iEta-85)*xtalWidth,0.); - OccupancyAll->SetPointError(nPointAll,0.,0.); -} - - nPoint++;nPointAll++;nPointAll2++; -} - -// Graph for EB -nPoint=0; nPointAll =0; nPointAll2 =0; - -for(int iEta =0; iEtaGetNbinsY() ;iEta++){ - double sumHit =0, nHit=0; - for(int iPhi =0; iPhiGetNbinsX() ;iPhi++){ - if(h_OccupancyEB2->GetBinContent(iPhi+1,iEta+1)==0) continue; - sumHit=sumHit+h_OccupancyEB2->GetBinContent(iPhi+1,iEta+1); - nHit++; - } - if(iEta<85 && sumHit!=0 && nHit!=0 ){ - OccupancyAll2->SetPoint(nPointAll2,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); - OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - } - - if(iEta<85 && sumHit==0 && nHit==0 ){ - OccupancyAll2->SetPoint(nPointAll2,-(85-iEta)*xtalWidth,0.); - OccupancyAll2->SetPointError(nPointAll2,0.,0.); -} - - if(iEta==85 && sumHit!=0 && nHit!=0){ - OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - - } - - if(iEta==85 && sumHit==0 && nHit==0 ){ - OccupancyAll2->SetPoint(nPointAll2,0.,0.); - OccupancyAll2->SetPointError(nPointAll2,0.,0.); -} - - if(iEta>85 && sumHit!=0 && nHit!=0){ - OccupancyAll2->SetPoint(nPointAll2,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); - OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); - - } - - if(iEta<85 && sumHit==0 && nHit==0 ){ - OccupancyAll2->SetPoint(nPointAll2,(iEta-85)*xtalWidth,0.); - OccupancyAll2->SetPointError(nPointAll2,0.,0.); -} - - nPoint++;nPointAll++;nPointAll2++; -} - - - -// Plot for EE : EEP and EEM -/// ring geometry for the endcap -TH2F *hrings[2]; -hrings[0] = (TH2F*) h_OccupancyEE[0]->Clone("hringsEEM"); -hrings[1] = (TH2F*) h_OccupancyEE[1]->Clone("hringsEEP"); -hrings[0] ->Reset("ICMES"); -hrings[1] ->Reset("ICMES"); -hrings[0] ->ResetStats(); -hrings[1] ->ResetStats(); - -FILE *fRing; -fRing = fopen("macros/eerings.dat","r"); -int x,y,z,ir; -while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { - if(z>0) hrings[1]->Fill(x,y,ir); - if(z<0) hrings[0]->Fill(x,y,ir); -} - -std::vector sumHitEEM ; -std::vector nHitEEM ; -sumHitEEM.assign(40,0.); nHitEEM.assign(40,0); -std::vector sumHitEEP ; -std::vector nHitEEP ; -sumHitEEP.assign(40,0.); nHitEEP.assign(40,0); - -for(int k =0; k<2 ; k++){ - for(int ix =0; ixGetNbinsX() ;ix++){ - for(int iy =0; iyGetNbinsY() ;iy++){ - if(h_OccupancyEE[k]->GetBinContent(ix+1,iy+1)==0) continue; - int mybin = h_OccupancyEE[k] -> FindBin(ix,iy); - int ring = int(hrings[k]-> GetBinContent(mybin)); - float occ = h_OccupancyEE[k]->GetBinContent(mybin); - if(k==0){ sumHitEEM.at(ring)=sumHitEEM.at(ring)+occ; nHitEEM.at(ring)=nHitEEM.at(ring)+1;} - if(k==1){ sumHitEEP.at(ring)=sumHitEEP.at(ring)+occ; nHitEEP.at(ring)=nHitEEP.at(ring)+1;} - } - } -} - -for(int k=0; k<2 ; k++){ -nPoint=0; -if(k==0){ - - for(unsigned int iring = 0; iringSetPoint(nPoint,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); - OccupancyEEM_vs_Eta->SetPointError(nPoint,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); - OccupancyAll->SetPoint(nPointAll,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); - OccupancyAll->SetPointError(nPointAll,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); - nPoint++;nPointAll++;} - if(sumHitEEM.at(iring)==0 || nHitEEM.at(iring)==0){ - OccupancyEEM_vs_Eta->SetPoint(nPoint,-1.*(85*xtalWidth+iring*etaringEE),0.); - OccupancyEEM_vs_Eta->SetPointError(nPoint,0.,0.); - OccupancyAll->SetPoint(nPointAll,-1.*(85*xtalWidth+iring*etaringEE),0.); - OccupancyAll->SetPointError(nPointAll,0.,0.); - nPoint++;nPointAll++;} - - } - } - -if(k==1) { - for(unsigned int iring = 0; iringSetPoint(nPoint,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); - OccupancyEEP_vs_Eta->SetPointError(nPoint,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); - OccupancyAll->SetPoint(nPointAll,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); - OccupancyAll->SetPointError(nPointAll,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); - nPoint++; nPointAll++;} - - if(sumHitEEP.at(iring)==0 || nHitEEP.at(iring)==0){ - OccupancyEEP_vs_Eta->SetPoint(nPoint,(85*xtalWidth+iring*etaringEE),0.); - OccupancyEEP_vs_Eta->SetPointError(nPoint,0.,0.); - OccupancyAll->SetPoint(nPointAll,(85*xtalWidth+iring*etaringEE),0.); - OccupancyAll->SetPointError(nPointAll,0.,0.); - nPoint++; nPointAll++;} - } - } -} - - -sumHitEEM.clear() ; -nHitEEM.clear() ; -sumHitEEM.assign(40,0.); nHitEEM.assign(40,0); -sumHitEEP.clear() ; -nHitEEP.clear() ; -sumHitEEP.assign(40,0.); nHitEEP.assign(40,0); - -for(int k =0; k<2 ; k++){ - for(int ix =0; ixGetNbinsX() ;ix++){ - for(int iy =0; iyGetNbinsY() ;iy++){ - if(h_OccupancyEE2[k]->GetBinContent(ix+1,iy+1)==0) continue; - int mybin = h_OccupancyEE2[k] -> FindBin(ix,iy); - int ring = int(hrings[k]-> GetBinContent(mybin)); - float occ = h_OccupancyEE2[k]->GetBinContent(mybin); - if(k==0){ sumHitEEM.at(ring)=sumHitEEM.at(ring)+occ; nHitEEM.at(ring)=nHitEEM.at(ring)+1;} - if(k==1){ sumHitEEP.at(ring)=sumHitEEP.at(ring)+occ; nHitEEP.at(ring)=nHitEEP.at(ring)+1;} - } - } -} - -for(int k=0; k<2 ; k++){ -nPoint=0; -if(k==0){ - for(unsigned int iring = 0; iringSetPoint(nPointAll2,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); - OccupancyAll2->SetPointError(nPointAll2,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); - nPoint++;nPointAll2++;} - if(sumHitEEM.at(iring)==0 || nHitEEM.at(iring)==0){ - OccupancyAll2->SetPoint(nPointAll2,-1.*(85*xtalWidth+iring*etaringEE),0.); - OccupancyAll2->SetPointError(nPointAll2,0.,0.); - nPoint++;nPointAll2++;} - } - - } -if(k==1) { - for(unsigned int iring = 0; iringSetPoint(nPointAll2,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); - OccupancyAll2->SetPointError(nPointAll2,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); - nPoint++; nPointAll2++;} - if(sumHitEEP.at(iring)==0 && nHitEEP.at(iring)==0){ - OccupancyAll2->SetPoint(nPointAll2,(85*xtalWidth+iring*etaringEE),0.); - OccupancyAll2->SetPointError(nPointAll2,0.,0.); - nPoint++; nPointAll2++;} - - } - } -} - -gROOT->Reset(); -gROOT->SetStyle("Plain"); - -gStyle->SetPadTickX(1); -gStyle->SetPadTickY(1); -gStyle->SetOptTitle(0); -gStyle->SetOptStat(0); -gStyle->SetFitFormat("6.3g"); -gStyle->SetPalette(1); - -gStyle->SetTextFont(42); -gStyle->SetTextSize(0.05); -gStyle->SetTitleFont(42,"xyz"); -gStyle->SetTitleSize(0.05); -gStyle->SetLabelFont(42,"xyz"); -gStyle->SetLabelSize(0.05); -gStyle->SetTitleXOffset(0.8); -gStyle->SetTitleYOffset(1.1); -gROOT->ForceStyle(); - -TFile *th = new TFile("output/Occupancy.root","RECREATE"); -th->cd(); - -// Final plots -TCanvas *cEB = new TCanvas ("EB occupancy","EB occupancy"); -cEB->cd(); -cEB->SetGridx(); -cEB->SetGridy(); -h_OccupancyEB->Write(); -th->Close(); - - -// Final plots -TCanvas *cEEp = new TCanvas ("EE+ occupancy","EE+ occupancy"); -cEEp->cd(); -cEEp->SetGridx(); -cEEp->SetGridy(); -OccupancyEEP_vs_Eta->SetMarkerStyle(20); -OccupancyEEP_vs_Eta->SetMarkerColor(kGreen+2); -OccupancyEEP_vs_Eta->GetHistogram()->GetXaxis()-> SetRangeUser(1.5,2.5); -OccupancyEEP_vs_Eta->GetHistogram()->GetYaxis()-> SetTitle("Single xtal Event / fb^{-1}"); -OccupancyEEP_vs_Eta->GetHistogram()->GetXaxis()-> SetTitle("#eta"); -OccupancyEEP_vs_Eta->Draw("ap"); - - -// Final plots -TCanvas *cEEm = new TCanvas ("EE- occupancy","EE- occupancy"); -cEEm->cd(); -cEEm->SetGridx(); -cEEm->SetGridy(); -OccupancyEEM_vs_Eta->SetMarkerStyle(20); -OccupancyEEM_vs_Eta->SetMarkerColor(kGreen+2); -OccupancyEEM_vs_Eta->GetHistogram()->GetXaxis()-> SetRangeUser(-2.5,-1.5); -OccupancyEEM_vs_Eta->GetHistogram()->GetYaxis()-> SetTitle("Single xtal Event / fb^{-1}"); -OccupancyEEM_vs_Eta->GetHistogram()->GetXaxis()-> SetTitle("#eta"); -OccupancyEEM_vs_Eta->Draw("ap"); - - -TCanvas* cAll = new TCanvas("cAll", "history plot vs date",1); -cAll ->cd(); -cAll ->SetGridx(); -cAll ->SetGridy(); -OccupancyAll->SetMarkerStyle(20); -OccupancyAll->SetMarkerColor(kRed+2); -OccupancyAll->GetHistogram()->GetXaxis()-> SetRangeUser(-2.55,2.55); -OccupancyAll->GetHistogram()->GetYaxis()-> SetTitle("Number of Electrons / Crystal / fb^{-1}"); -OccupancyAll->GetHistogram()->GetXaxis()-> SetTitle("#eta_{seed}"); -OccupancyAll->Draw("ap"); -OccupancyAll2->SetMarkerStyle(20); -OccupancyAll2->SetMarkerColor(kGreen+2); -OccupancyAll2->Draw("psame"); -TLegend * leg = new TLegend(0.5,0.7,0.6,0.87); -leg->SetFillColor(0); -leg->AddEntry(OccupancyAll,"Preselected Events", "LP"); -leg->AddEntry(OccupancyAll2,"Events Used For Calibration", "LP"); -leg->Draw("same"); - - -char latexBuffer[250]; - -sprintf(latexBuffer,"CMS 2012 Preliminary"); -TLatex* latex = new TLatex(0.18,0.92,latexBuffer); -latex -> SetNDC(); -latex -> SetTextFont(62); -latex -> SetTextSize(0.035); -latex -> Draw("same"); - -sprintf(latexBuffer,"#sqrt{s} = 8 TeV L = 11.35 fb^{-1}"); -TLatex* latex2 = new TLatex(0.6,0.92,latexBuffer); -latex2 -> SetNDC(); -latex2 -> SetTextFont(42); -latex2 -> SetTextSize(0.035); -latex2 -> Draw("same"); - -cAll -> Print(("EleOccupancy_W_"+category+".C").c_str(),"cxx"); - -return 0; -} - - - -void SetWHLTPathNames(std::vector > > & WHLTPathNames){ - - std::pair WRunRanges1(190456,190738); - std::pair > WHLTPathName1("HLT_Ele27_WP80_v8",WRunRanges1); - std::pair WRunRanges2(190782,191411); - std::pair > WHLTPathName2("HLT_Ele27_WP80_v9",WRunRanges2); - std::pair WRunRanges3(191691,196531); - std::pair > WHLTPathName3("HLT_Ele27_WP80_v10",WRunRanges3); - std::pair WRunRanges4(198022,209151); - std::pair > WHLTPathName4("HLT_Ele27_WP80_v11",WRunRanges4); - - WHLTPathNames.push_back(WHLTPathName1); - WHLTPathNames.push_back(WHLTPathName2); - WHLTPathNames.push_back(WHLTPathName3); - WHLTPathNames.push_back(WHLTPathName4); -} - diff --git a/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp b/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp deleted file mode 100644 index 53ddbca748f..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatio.cpp +++ /dev/null @@ -1,269 +0,0 @@ -//Plot map ratio between two IC sets (used in miscalib studies) - -#include -#include -#include -#include -#include -#include -#include - -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TF1.h" -#include "TLegend.h" -#include "TGraphErrors.h" -#include "TApplication.h" -#include "TLatex.h" -#include "TFile.h" -#include "TGraph.h" - -int main(int argc, char **argv) -{ - - std::ifstream io1, io2, rms1, rms2; - - // std::ifstream io3, io4, io6; - io1.open ("output_runD_10ITER_SISCALIB_ETABIN2/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); - io2.open ("output_runD_10ITER_NOSCALIB/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); - - // io3.open ("output_runD_10ITER_SISCALIB_ETABIN3/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); - // io4.open ("output_runD_10ITER_SISCALIB_ETABIN4/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); - // io6.open ("output_runD_10ITER_SISCALIB_ETABIN6/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); - // rms1.open ("output_runD_10ITER_SISCALIB_ETALINEAR/RMSFile.txt"); - // rms2.open ("output_runD_10ITER_NOSCALIB/RMSFile.txt"); - - float status, IC, err; - float status2, IC2, err2; - - // float IC3,IC4,IC6; - float etaCount = 0., etaCount2 = 0.; - - int eta, phi, eta2, phi2; - - TH2F *mapRatio = new TH2F ("map", "map", 360, 0.5, 360.5, 171, -85, +85); - TH1F *histo = new TH1F ("histo", "histo", 100, 0.995, 1.005); - // TH1F *histoSpreadRatio = new TH1F ("histoSpreadRatio", "histoSpreadRatio", 100, 0.9, 1.1); - TH1F *histoMeanEta = new TH1F ("histoMeanEta", "histoMeanEta", 100, 0.995, 1.005); - TH1F *histoMeanPhi = new TH1F ("histoMeanPhi", "histoMeanPhi", 100, 0.995, 1.005); - - TH2F *ICmap1 = new TH2F ("map1", "map1", 360, 0.5, 360.5, 171, -85, +85); - TH2F *ICmap2 = new TH2F ("map2", "map2", 360, 0.5, 360.5, 171, -85, +85); - TH1F *hIC1 = new TH1F ("hIC1", "hIC1", 100, 0.7, 1.3); - TH1F *hIC2 = new TH1F ("hIC2", "hIC2", 100, 0.7, 1.3); - - // TH1F *hprova = new TH1F ("g_RMS", "g_RMS", 91,0,91); - TGraph *g_RMS = new TGraph(); - - // TGraph *g_RMS3 = new TGraph(); - // TGraph *g_RMS4 = new TGraph(); - // TGraph *g_RMS6 = new TGraph(); - - TH1F *histoEtaRing[86]; - char histoName[100]; - char funcName[100]; - - /* TH1F *histoEtaRing4[86]; - char histoName4[100]; - TH1F *histoEtaRing3[86]; - char histoName3[100]; - TH1F *histoEtaRing6[86]; - char histoName6[100]; - */ - float map[171][360]; - float map2[171][360]; - - for (int e=0; e<86; e++) { - sprintf(histoName,"h_ratio_%d",e); - histoEtaRing[e] = new TH1F(histoName,"",50,0.9,1.1); - - /* sprintf(histoName4,"h_ratio4_%d",e); - histoEtaRing4[e] = new TH1F(histoName4,"",50,0.99,1.01); - sprintf(histoName3,"h_ratio3_%d",e); - histoEtaRing3[e] = new TH1F(histoName3,"",50,0.99,1.01); - sprintf(histoName6,"h_ratio6_%d",e); - histoEtaRing6[e] = new TH1F(histoName6,"",50,0.99,1.01); - */ } - - for (int e=0; e<171; e++) { - for (int p=0; p<360; p++) { - map[e][p]=0.; - map2[e][p]=0.; - } - } - - - // mapRatio->SetDrawOption ("colz"); - - eta=0; - - - while (!io1.eof()) - { - io1>>eta>>phi>>status>>IC>>err; - io2>>eta2>>phi2>>status2>>IC2>>err2; - - // io3>>eta>>phi>>status>>IC3>>err; - // io4>>eta>>phi>>status>>IC4>>err; - // io6>>eta>>phi>>status>>IC6>>err; - map[eta+85][phi-1]=IC; - map2[eta2+85][phi2-1]=IC2; - - if ((status==0) && (IC!=-1) && (status2==0) && (IC2!=-1)) { - histoEtaRing[int(fabs(eta))]->Fill(IC/IC2); - - // histoEtaRing3[int(fabs(eta))]->Fill(IC3/IC2); - // histoEtaRing4[int(fabs(eta))]->Fill(IC4/IC2); - // histoEtaRing6[int(fabs(eta))]->Fill(IC6/IC2); - } - - // if (fabs(eta)==46) std::cout<Fill(etaCount/etaCount2); - - etaCount=0.; - etaCount2=0.; - - } - - - if ((status==0) && (IC!=-1) && (status2==0) && (IC2!=-1) && (IC<1.5)) { - if ((eta==eta2) && (phi==phi2)) { - mapRatio->SetBinContent (phi,eta+85,IC/IC2); - histo->Fill(IC/IC2); - // std::cout<SetBinContent (phi,eta+85,IC); - ICmap2->SetBinContent (phi,eta+85,IC2); - // std::cout<Fill(IC); - hIC2->Fill(IC2); - - etaCount+=IC; - etaCount2+=IC2; - // std::cout<> e1 >> r1; - rms2 >> e2 >> r2; - histoSpreadRatio->Fill(r1/r2); - } - */ - float phiCount=0., phiCount2=0.; - for (int p=0; p<360; p++) { - for (int e=0; e<171; e++) { - phiCount+=map[e][p]; - phiCount2+=map2[e][p]; - } - histoMeanPhi->Fill(phiCount/phiCount2); - phiCount=0.; - phiCount2=0.; - } - - TFile f1 ("confronti_etabin2.root", "RECREATE"); - f1.cd(); - - for (int e=1; e<86; e++) { - - sprintf(funcName,"f_%d",e); - TF1* fgaus = new TF1(funcName,"gaus",0.99,1.01); - fgaus -> SetParameter(1,histoEtaRing[e]->GetMean()); - fgaus -> SetParameter(2,histoEtaRing[e]->GetRMS()); - // histoEtaRing[e] -> Fit(funcName,"QS+","",1-histoEtaRing[e]->GetRMS(),1+histoEtaRing[e]->GetRMS()); - g_RMS->SetPoint (e-1, float(e), histoEtaRing[e]->GetRMS()); - - // g_RMS3->SetPoint (e-1, float(e), histoEtaRing3[e]->GetRMS()); - // g_RMS4->SetPoint (e-1, float(e), histoEtaRing4[e]->GetRMS()); - // g_RMS6->SetPoint (e-1, float(e), histoEtaRing6[e]->GetRMS()); - // g_RMS->SetPointError (e-1, 0, 0); - if (e==20 || e==40 || e==60 || e==75 || e==85 || e==45 || e==46 || e==47) { - histoEtaRing[e]->Draw(); - // fgaus->Draw("same"); - histoEtaRing[e]->Write(); - } - } - - TCanvas *c1 = new TCanvas("c1"); - c1->cd(); - g_RMS -> GetXaxis() -> SetTitle("|i#eta|"); - g_RMS -> GetYaxis() -> SetTitle("RMS"); - g_RMS -> SetMinimum(0.00000); - // g_RMS -> SetMaximum(0.0025); - g_RMS -> SetMarkerStyle(20); - g_RMS -> SetMarkerSize(1.0); - g_RMS -> SetMarkerColor(kBlue+1); - c1->SetGrid(); - g_RMS -> Draw("APL"); - - g_RMS -> GetXaxis() -> SetRangeUser (0,86); - - /* g_RMS3 -> SetMarkerStyle(20); - g_RMS3 -> SetMarkerSize(1.0); - g_RMS3 -> SetMarkerColor(51+1); - g_RMS4 -> SetMarkerStyle(20); - g_RMS4 -> SetMarkerSize(1.0); - g_RMS4 -> SetMarkerColor(kRed+1); - g_RMS6 -> SetMarkerStyle(20); - g_RMS6 -> SetMarkerSize(1.0); - g_RMS6 -> SetMarkerColor(kOrange+1); - - g_RMS3 -> Draw("PLsame"); - g_RMS4 -> Draw("PLsame"); - g_RMS6 -> Draw("PLsame"); - - TLegend* leg = new TLegend(0.15,0.72,0.43,0.89); - leg -> SetFillColor(0); - leg -> SetTextFont(42); - leg -> SetTextSize(0.05); - leg -> AddEntry(g_RMS,"Miscalib. 2%","P"); - leg -> AddEntry(g_RMS3,"Miscalib. 3%","P"); - leg -> AddEntry(g_RMS4,"Miscalib. 4%","P"); - leg -> AddEntry(g_RMS6,"Miscalib. 6%","P"); - leg -> Draw("same"); - */ - c1->Print("g_RMS.png","png"); - - mapRatio -> GetXaxis() -> SetTitle("i#phi"); - mapRatio -> GetYaxis() -> SetRangeUser(-85,85); - - mapRatio -> GetYaxis() -> SetTitle("i#eta"); - - histo -> GetXaxis() -> SetTitle("IC1/IC2"); - histo -> GetYaxis() -> SetTitle("N"); - - histo->SetStats(1); - - mapRatio->GetZaxis()->SetRangeUser(0.99, 1.01); - // mapRatio->Draw("COLZ"); - // mapRatio->SaveAs("map.root","root"); - mapRatio->Write(); - // histo->Draw(); - histo->Write(); - histoMeanEta->Write(); - histoMeanPhi->Write(); - hIC1->Write(); - hIC2->Write(); - ICmap1->Write(); - ICmap2->Write(); - // histoSpreadRatio->Write(); - g_RMS->Write("g_RMS"); - f1.Close(); - - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp b/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp deleted file mode 100644 index 61e7f9b52c1..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/PlotICMapsRatioEE.cpp +++ /dev/null @@ -1,235 +0,0 @@ -//Plot map ratio between two IC sets (used in miscalib studies) - -#include -#include -#include -#include -#include -#include -#include - -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TF1.h" -#include "TLegend.h" -#include "TGraphErrors.h" -#include "TApplication.h" -#include "TLatex.h" -#include "TFile.h" -#include "TGraph.h" - -#include "../interface/TEndcapRings.h" - -int main(int argc, char **argv) -{ - - std::ifstream io1, io2, rms1, rms2; - - io1.open ("output_EE_runD_SISCALIB_GAUSS_NOETA_STRAWEAK/IC_Run2012ABC_22JanuaryRereco_WZ_R9_EE_relative.txt"); - io2.open ("output_EE_runD_NOSCALIB/IC_Run2012ABC_22JanuaryRereco_WZ_R9_EE_relative.txt"); - - TEndcapRings *eRings = new TEndcapRings(); - - - float status, IC, err; - float status2, IC2, err2; - - int x, y, x2, y2; - - TH2F *mapRatioEEp = new TH2F ("mapEEp", "mapEEp", 100, 0.5, 100.5, 100, 0.5, 100.5); - TH2F *mapRatioEEm = new TH2F ("mapEEm", "mapEEm", 100, 0.5, 100.5, 100, 0.5, 100.5); - - TH1F *histoEEp = new TH1F ("histoEEp", "histoEEp", 100, 0.97, 1.03); - TH1F *histoEEm = new TH1F ("histoEEm", "histoEEm", 100, 0.97, 1.03); - - TH2F *ICmap1EEp = new TH2F ("map1EEp", "map1EEp", 100, 0.5, 100.5, 100, 0.5, 100.5); - TH2F *ICmap2EEp = new TH2F ("map2EEp", "map2EEp", 100, 0.5, 100.5, 100, 0.5, 100.5); - TH2F *ICmap1EEm = new TH2F ("map1EEm", "map1EEm", 100, 0.5, 100.5, 100, 0.5, 100.5); - TH2F *ICmap2EEm = new TH2F ("map2EEm", "map2EEm", 100, 0.5, 100.5, 100, 0.5, 100.5); - - TH1F *hIC1EEp = new TH1F ("hIC1EEp", "hIC1EEp", 100, 0.7, 1.3); - TH1F *hIC2EEp = new TH1F ("hIC2EEp", "hIC2EEp", 100, 0.7, 1.3); - TH1F *hIC1EEm = new TH1F ("hIC1EEm", "hIC1EEm", 100, 0.7, 1.3); - TH1F *hIC2EEm = new TH1F ("hIC2EEm", "hIC2EEm", 100, 0.7, 1.3); - - TGraph *g_RMSEEp = new TGraph(); - TGraph *g_RMSEEm = new TGraph(); - - - TH1F *histoEtaRingEEp[40]; - char histoNameEEp[100]; - char funcNameEEp[100]; - TH1F *histoEtaRingEEm[40]; - char histoNameEEm[100]; - char funcNameEEm[100]; - - for (int e=0; e<40; e++) { - sprintf(histoNameEEp,"h_ratio_EEp_%d",e); - histoEtaRingEEp[e] = new TH1F(histoNameEEp,"",150,0.0,2.0); - sprintf(histoNameEEm,"h_ratio_EEm_%d",e); - histoEtaRingEEm[e] = new TH1F(histoNameEEm,"",150,0.0,2.0); - } - - - - - x=0; - - while (!io1.eof()) - { - io1>>x>>y>>status>>IC>>err; - io2>>x2>>y2>>status2>>IC2>>err2; - - if ( (status==-1) && (IC!=-1) && (status2==-1) && (IC2!=-1)) { - if ((x==x2) && (y==y2)) { - - histoEtaRingEEm[int(eRings->GetEndcapRing(x,y,0))]->Fill(IC/IC2); - // if (x==34 && y==47) std::cout<<"anello: "<GetEndcapRing(x,y,status)<GetEndcapRing(x,y,0)==16) - std::cout<SetBinContent (x-1,y-1,IC/IC2); - histoEEm->Fill(IC/IC2); - // std::cout<SetBinContent (x-1,y-1,IC); - ICmap2EEm->SetBinContent (x2-1,y2-1,IC2); - // std::cout<Fill(IC); - hIC2EEm->Fill(IC2); - - } - else - std::cout<<"Problem: incoherent x or y "<GetEndcapRing(x,y,status))]->Fill(IC/IC2); - - mapRatioEEp->SetBinContent (x-1,y-1,IC/IC2); - histoEEp->Fill(IC/IC2); - // std::cout<SetBinContent (x-1,y-1,IC); - ICmap2EEp->SetBinContent (x2-1,y2-1,IC2); - // std::cout<Fill(IC); - hIC2EEp->Fill(IC2); - - } - else - std::cout<<"Problem: incoherent x or y "< SetParameter(1,histoEtaRingEEp[e]->GetMean()); - fgausEEp -> SetParameter(2,histoEtaRingEEp[e]->GetRMS()); - // histoEtaRingEEp[e] -> Fit(funcNameEEp,"QS+","",1-histoEtaRingEEp[e]->GetRMS(),1+histoEtaRingEEp[e]->GetRMS()); - // g_RMSEEp->SetPoint (e, float(e), fgausEEp->GetParameter(2)); - - sprintf(funcNameEEm,"f_EEm_%d",e); - TF1* fgausEEm = new TF1(funcNameEEm,"gaus",0.1,1.9); - fgausEEm -> SetParameter(1,histoEtaRingEEm[e]->GetMean()); - fgausEEm -> SetParameter(2,histoEtaRingEEm[e]->GetRMS()); - // histoEtaRingEEm[e] -> Fit(funcNameEEm,"QS+","",1-histoEtaRingEEm[e]->GetRMS(),1+histoEtaRingEEm[e]->GetRMS()); - // g_RMSEEm->SetPoint (e, float(e), fgausEEm->GetParameter(2)); - - g_RMSEEp->SetPoint (e, float(e), histoEtaRingEEp[e]->GetRMS()); - g_RMSEEm->SetPoint (e, float(e), histoEtaRingEEm[e]->GetRMS()); - - if (e==1 || e==2 || e==4 || e==19 || e==26 || e==30 || e==31 || e==32 || e==33 ) { - histoEtaRingEEp[e]->Draw(); - // fgausEEp->Draw("same"); - - histoEtaRingEEm[e]->Draw(); - // fgausEEm->Draw("same"); - - histoEtaRingEEp[e]->Write(); - histoEtaRingEEm[e]->Write(); - } - } - - TCanvas *c1 = new TCanvas("c1"); - c1->cd(); - g_RMSEEp -> GetXaxis() -> SetTitle("i|#eta|"); - g_RMSEEp -> GetYaxis() -> SetTitle("RMS"); - g_RMSEEp -> SetMinimum(0.00000); - // g_RMSEEp -> SetMaximum(0.015); - // g_RMSEEm -> SetMaximum(0.015); - g_RMSEEp -> SetMarkerStyle(20); - g_RMSEEp -> SetMarkerSize(1.0); - g_RMSEEp -> SetMarkerColor(kBlue+1); - c1->SetGrid(); - g_RMSEEp -> Draw("AP"); - - g_RMSEEp -> GetXaxis() -> SetRangeUser (0,32.5); - - c1->Print("g_RMS_EE+.png","png"); - - - TCanvas *c2 = new TCanvas("c2"); - c2->cd(); - g_RMSEEm -> GetXaxis() -> SetTitle("i|#eta|"); - g_RMSEEm -> GetYaxis() -> SetTitle("RMS"); - g_RMSEEm -> SetMinimum(0.00000); - // g_RMS -> SetMaximum(0.0025); - g_RMSEEm -> SetMarkerStyle(20); - g_RMSEEm -> SetMarkerSize(1.0); - g_RMSEEm -> SetMarkerColor(kBlue+1); - c2->SetGrid(); - g_RMSEEm -> Draw("AP"); - g_RMSEEm -> GetXaxis() -> SetRangeUser (0,33.5); - c2->Print("g_RMS_EE-.png","png"); - - mapRatioEEp -> GetXaxis() -> SetTitle("ix"); - mapRatioEEp -> GetYaxis() -> SetRangeUser(-100.5,100.5); - mapRatioEEp -> GetYaxis() -> SetTitle("iy"); - histoEEp -> GetXaxis() -> SetTitle("IC1/IC2"); - histoEEp -> GetYaxis() -> SetTitle("N"); - histoEEp->SetStats(1); - mapRatioEEp->GetZaxis()->SetRangeUser(0.98, 1.02); - - mapRatioEEm -> GetXaxis() -> SetTitle("ix"); - mapRatioEEm -> GetYaxis() -> SetRangeUser(-100.5,100.5); - mapRatioEEm -> GetYaxis() -> SetTitle("iy"); - histoEEm -> GetXaxis() -> SetTitle("IC1/IC2"); - histoEEm -> GetYaxis() -> SetTitle("N"); - histoEEm->SetStats(1); - mapRatioEEm->GetZaxis()->SetRangeUser(0.98, 1.02); - - mapRatioEEp->Write(); - histoEEp->Write(); - hIC1EEp->Write(); - hIC2EEp->Write(); - ICmap1EEp->Write(); - ICmap2EEp->Write(); - g_RMSEEp->Write("g_RMSEEp"); - g_RMSEEm->Write("g_RMSEEm"); - mapRatioEEm->Write(); - histoEEm->Write(); - hIC1EEm->Write(); - hIC2EEm->Write(); - ICmap1EEm->Write(); - ICmap2EEm->Write(); - - f1.Close(); - - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp b/EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp deleted file mode 100644 index 92e78e07ef9..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/RateHLTvsEta.cpp +++ /dev/null @@ -1,231 +0,0 @@ -#include -#include -#include -#include "TFile.h" -#include "TStyle.h" -#include "TCanvas.h" -#include "TLegend.h" -#include "TPaveStats.h" -#include "TH2F.h" -#include "TGraphErrors.h" -#include "TROOT.h" -#include "TLatex.h" -#include "TTree.h" -#include "TChain.h" -#include "TGraphAsymmErrors.h" - -#include -#include -#include "../../NtuplePackage/interface/treeReader.h" - - -int main (int argc, char ** argv){ - - // double xtalWidth=0.01745329; - // double luminosity=11.53; - // double etaringEE=0.0325; - - - // Acquisition of input file - TChain* treeDATA_HLT = new TChain("simpleNtupleEoverP/SimpleNtupleEoverP"); - treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012A-22Jan2013-v1_HLT.root"); - treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012B-22Jan2013-v1_HLT.root"); - // treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012C-22Jan2013-v1_HLT.root"); - treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012D-22Jan2013-v1_HLT.root"); - - treeReader *fReader_HLT = new treeReader((TTree*)(treeDATA_HLT), false); - - TH1F* Denominator = new TH1F ("Denominator","",100,-2.5,2.5); - TH1F* HLTEle27_RateVsEta = new TH1F ("HLTEle27_RateVsEta","",100,-2.5,2.5); - TH1F* HLTEle27_PFMET_RateVsEta = new TH1F ("HLTEle27_PFMET_RateVsEta","",100,-2.5,2.5); - TH1F* HLTEle27_Offline_RateVsEta = new TH1F ("HLTEle27_Offline_RateVsEta","",100,-2.5,2.5); - TH1F* HLTEle27_Offline_R9_RateVsEta = new TH1F ("HLTEle27_R9_RateVsEta","",100,-2.5,2.5); - TH1F* HLTEle27_Offline_fbrem_RateVsEta = new TH1F ("HLTEle27_fbrem_RateVsEta","",100,-2.5,2.5); - TH1F* HLTEle27_Offline_Pt_RateVsEta = new TH1F ("HLTEle27_Pt_RateVsEta","",100,-2.5,2.5); - TH1F* HLTEle27_Offline_PFMET_RateVsEta = new TH1F ("HLTEle27_Offline_PFMET_RateVsEta","",100,-2.5,2.5); - TH1F* HLTEle27_PFMET_VsEle27Offline = new TH1F ("HLTEle27_PFMET_VsEle27Offline","",100,-2.5,2.5); - - std::cout<<" DATA Entries = "<GetEntries()<GetEntries(); ++entry) { - - if( entry%100000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; - treeDATA_HLT->GetEntry(entry); - - Denominator->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if(fReader_HLT->getInt("isHLTEle27")[0] == 1 ) HLTEle27_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if(fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 ) HLTEle27_PFMET_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0) - HLTEle27_Offline_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fReader_HLT->getFloat("ele1_r9")[0] >0.94) - HLTEle27_Offline_R9_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fabs(fReader_HLT->getFloat("ele1_fbrem")[0]) <0.5) - HLTEle27_Offline_fbrem_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fabs(fReader_HLT->getFloat("ele1_pt")[0]) >50) - HLTEle27_Offline_Pt_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 ) - HLTEle27_Offline_PFMET_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - if( fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fReader_HLT->getInt("isGood")[0] == 1) - HLTEle27_PFMET_VsEle27Offline->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); - - - - } - - - TGraphAsymmErrors* HLTEle27_Efficiency = new TGraphAsymmErrors(HLTEle27_RateVsEta,Denominator); - TGraphAsymmErrors* HLTEle27_PFMET_Efficiency = new TGraphAsymmErrors(HLTEle27_PFMET_RateVsEta,Denominator); - TGraphAsymmErrors* HLTEle27_Offline_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_RateVsEta,HLTEle27_RateVsEta); - TGraphAsymmErrors* HLTEle27_Offline_R9_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_R9_RateVsEta,HLTEle27_RateVsEta); - TGraphAsymmErrors* HLTEle27_Offline_fbrem_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_fbrem_RateVsEta,HLTEle27_RateVsEta); - TGraphAsymmErrors* HLTEle27_Offline_Pt_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_Pt_RateVsEta,HLTEle27_RateVsEta); - TGraphAsymmErrors* HLTEle27_Offline_PFMET_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_PFMET_RateVsEta,HLTEle27_PFMET_RateVsEta); - TGraphAsymmErrors* HLTEle27_PFMET_VsEle27Offline_Efficiency = new TGraphAsymmErrors(HLTEle27_PFMET_VsEle27Offline,HLTEle27_Offline_RateVsEta); - - HLTEle27_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - HLTEle27_PFMET_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - HLTEle27_Offline_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - HLTEle27_Offline_R9_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - HLTEle27_Offline_fbrem_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - HLTEle27_Offline_Pt_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - HLTEle27_Offline_PFMET_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - HLTEle27_PFMET_VsEle27Offline_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); - - - HLTEle27_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - HLTEle27_PFMET_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - HLTEle27_Offline_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - HLTEle27_Offline_R9_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - HLTEle27_Offline_fbrem_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - HLTEle27_Offline_Pt_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - HLTEle27_Offline_PFMET_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - HLTEle27_PFMET_VsEle27Offline_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); - - HLTEle27_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Ele27}}{N^{all}}"); - HLTEle27_PFMET_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Ele27PFMET}}{N^{all}}"); - HLTEle27_Offline_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Offline}}{N^{Ele27}}"); - HLTEle27_Offline_R9_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{R9}}{N^{Ele27}}"); - HLTEle27_Offline_fbrem_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{fbrem}}{N^{Ele27}}"); - HLTEle27_Offline_Pt_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{pT}}{N^{Ele27}}"); - HLTEle27_Offline_PFMET_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Offline}}{N^{Ele27PFMET}}"); - HLTEle27_PFMET_VsEle27Offline_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Off+Ele27PFMET}}{N^{Off+Ele27}}"); - - HLTEle27_Efficiency->SetMarkerStyle(20); - HLTEle27_PFMET_Efficiency->SetMarkerStyle(20); - HLTEle27_Offline_Efficiency->SetMarkerStyle(20); - HLTEle27_Offline_R9_Efficiency->SetMarkerStyle(20); - HLTEle27_Offline_fbrem_Efficiency->SetMarkerStyle(20); - HLTEle27_Offline_Pt_Efficiency->SetMarkerStyle(20); - HLTEle27_Offline_PFMET_Efficiency->SetMarkerStyle(20); - HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerStyle(20); - - HLTEle27_Efficiency->SetMarkerSize(1.2); - HLTEle27_PFMET_Efficiency->SetMarkerSize(1.2); - HLTEle27_Offline_Efficiency->SetMarkerSize(1.2); - HLTEle27_Offline_R9_Efficiency->SetMarkerSize(1.2); - HLTEle27_Offline_fbrem_Efficiency->SetMarkerSize(1.2); - HLTEle27_Offline_Pt_Efficiency->SetMarkerSize(1.2); - HLTEle27_Offline_PFMET_Efficiency->SetMarkerSize(1.2); - HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerSize(1.2); - - HLTEle27_Efficiency->SetMarkerColor(kBlue); - HLTEle27_PFMET_Efficiency->SetMarkerColor(kBlue); - HLTEle27_Offline_Efficiency->SetMarkerColor(kBlue); - HLTEle27_Offline_R9_Efficiency->SetMarkerColor(kBlue); - HLTEle27_Offline_fbrem_Efficiency->SetMarkerColor(kBlue); - HLTEle27_Offline_Pt_Efficiency->SetMarkerColor(kBlue); - HLTEle27_Offline_PFMET_Efficiency->SetMarkerColor(kBlue); - HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerColor(kBlue); - - HLTEle27_Efficiency->SetLineColor(kBlack); - HLTEle27_PFMET_Efficiency->SetLineColor(kBlack); - HLTEle27_Offline_Efficiency->SetLineColor(kBlack); - HLTEle27_Offline_R9_Efficiency->SetLineColor(kBlack); - HLTEle27_Offline_fbrem_Efficiency->SetLineColor(kBlack); - HLTEle27_Offline_Pt_Efficiency->SetLineColor(kBlack); - HLTEle27_Offline_PFMET_Efficiency->SetLineColor(kBlack); - HLTEle27_PFMET_VsEle27Offline_Efficiency->SetLineColor(kBlack); - - TCanvas* cHLTEle27_Efficiency = new TCanvas("cHLTEle27_Efficiency","",1); - cHLTEle27_Efficiency->cd(); - cHLTEle27_Efficiency->SetGridx(); - cHLTEle27_Efficiency->SetGridy(); - HLTEle27_Efficiency->Draw("ap"); - - TCanvas* cHLTEle27_PFMET_Efficiency = new TCanvas("cHLTEle27_PFMET_Efficiency","",1); - cHLTEle27_PFMET_Efficiency ->cd(); - cHLTEle27_PFMET_Efficiency ->SetGridx(); - cHLTEle27_PFMET_Efficiency ->SetGridy(); - HLTEle27_PFMET_Efficiency->Draw("ap"); - - TCanvas* cHLTEle27_Offline_Efficiency = new TCanvas("cHLTEle27_Offline_Efficiency","",1); - cHLTEle27_Offline_Efficiency ->cd(); - cHLTEle27_Offline_Efficiency ->SetGridx(); - cHLTEle27_Offline_Efficiency ->SetGridy(); - HLTEle27_Offline_Efficiency ->Draw("ap"); - - TCanvas* cHLTEle27_Offline_R9_Efficiency = new TCanvas("cHLTEle27_Offline_R9_Efficiency","",1); - cHLTEle27_Offline_R9_Efficiency ->cd(); - cHLTEle27_Offline_R9_Efficiency ->SetGridx(); - cHLTEle27_Offline_R9_Efficiency ->SetGridy(); - HLTEle27_Offline_R9_Efficiency ->Draw("ap"); - - TCanvas* cHLTEle27_Offline_fbrem_Efficiency = new TCanvas("cHLTEle27_Offline_fbrem_Efficiency","",1); - cHLTEle27_Offline_fbrem_Efficiency ->cd(); - cHLTEle27_Offline_fbrem_Efficiency ->SetGridx(); - cHLTEle27_Offline_fbrem_Efficiency ->SetGridy(); - HLTEle27_Offline_fbrem_Efficiency ->Draw("ap"); - - TCanvas* cHLTEle27_Offline_Pt_Efficiency = new TCanvas("cHLTEle27_Offline_Pt_Efficiency","",1); - cHLTEle27_Offline_Pt_Efficiency ->cd(); - cHLTEle27_Offline_Pt_Efficiency ->SetGridx(); - cHLTEle27_Offline_Pt_Efficiency ->SetGridy(); - HLTEle27_Offline_Pt_Efficiency ->Draw("ap"); - - TCanvas* cHLTEle27_Offline_PFMET_Efficiency = new TCanvas("cHLTEle27_Offline_PFMET_Efficiency","",1); - cHLTEle27_Offline_PFMET_Efficiency ->cd(); - cHLTEle27_Offline_PFMET_Efficiency ->SetGridx(); - cHLTEle27_Offline_PFMET_Efficiency ->SetGridy(); - HLTEle27_Offline_PFMET_Efficiency ->Draw("ap"); - - - TCanvas* cHLTEle27_PFMET_VsEle27Offline_Efficiency = new TCanvas("HLTEle27_PFMET_VsEle27Offline_Efficiency","",1); - cHLTEle27_PFMET_VsEle27Offline_Efficiency ->cd(); - cHLTEle27_PFMET_VsEle27Offline_Efficiency ->SetGridx(); - cHLTEle27_PFMET_VsEle27Offline_Efficiency ->SetGridy(); - HLTEle27_PFMET_VsEle27Offline_Efficiency ->Draw("ap"); - - - TFile *output = new TFile("output/outputTriggerRate.root","RECREATE"); - output->cd(); - cHLTEle27_Efficiency->Write(); - cHLTEle27_PFMET_Efficiency->Write(); - cHLTEle27_Offline_Efficiency->Write(); - cHLTEle27_Offline_R9_Efficiency->Write(); - cHLTEle27_Offline_fbrem_Efficiency->Write(); - cHLTEle27_Offline_Pt_Efficiency->Write(); - cHLTEle27_Offline_PFMET_Efficiency->Write(); - cHLTEle27_PFMET_VsEle27Offline_Efficiency->Write(); - - Denominator->Write(); - HLTEle27_RateVsEta->Write(); - HLTEle27_PFMET_RateVsEta->Write(); - HLTEle27_Offline_RateVsEta->Write(); - HLTEle27_Offline_R9_RateVsEta->Write(); - HLTEle27_Offline_fbrem_RateVsEta->Write(); - HLTEle27_Offline_Pt_RateVsEta->Write(); - HLTEle27_Offline_PFMET_RateVsEta->Write(); - HLTEle27_PFMET_VsEle27Offline->Write(); - output->Close(); - - return 0 ; - -} diff --git a/EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp b/EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp deleted file mode 100644 index a8a59919280..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/XtalAlphaEB.cpp +++ /dev/null @@ -1,219 +0,0 @@ -#include "XtalAlphaEB.h" -#include -#include -#include - -#include "ConfigParser.h" -#include "ntpleUtils.h" -#include "CalibrationUtils.h" - - - -int main (int argc, char ** argv) -{ - - ///Check if all nedeed arguments to parse are there - if(argc != 2) - { - std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - /// Parse the config file - parseConfigFile (argv[1]) ; - - //std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); - std::string inputList = gConfigParser -> readStringOption("Input::inputList"); - std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); - - std::string inputFileDeadXtal = "NULL"; - try - { - inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); - } - catch( char const* exceptionString ) - { - std::cerr << " exception = " << exceptionString << std::endl; - } - - std::string jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName"); - std::map > > jsonMap; - jsonMap = readJSONFile(jsonFileName); - - bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); - bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); - bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); - bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); - float R9Min = gConfigParser -> readFloatOption("Input::R9Min"); - bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); - std::string inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); - - std::string typeEB = gConfigParser -> readStringOption("Input::typeEB"); - std::string typeEE = gConfigParser -> readStringOption("Input::typeEE"); - int nRegionsEB = GetNRegionsEB(typeEB); - - std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); - - int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); - int useZ = gConfigParser -> readIntOption("Options::useZ"); - int useW = gConfigParser -> readIntOption("Options::useW"); - int splitStat = gConfigParser -> readIntOption("Options::splitStat"); - int nLoops = gConfigParser -> readIntOption("Options::nLoops"); - - /// open ntupla of data or MC - TChain * albero = new TChain (inputTree.c_str()); - FillChain(*albero,inputList); - - /// open calibration momentum graph - TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); - std::vector g_EoC_EB; - - for(int i = 0; i < nRegionsEB; ++i) - { - TString Name = Form("g_EoC_EB_%d",i); - g_EoC_EB.push_back( (TGraphErrors*)(f4->Get(Name)) ); - } - - ///Use the whole sample statistics if numberOfEvents < 0 - if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); - - - /// run in normal mode: full statistics - if ( splitStat == 0 ) { - - TString name ; - TString name_tmp; - if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_miscalib_EB",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_miscalib_EB",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_WZ_noEP_miscalib_EB",outputFile.c_str()); - - if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_EB",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_WZ_noEP_EB",outputFile.c_str()); - - - if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_miscalib_EB",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_miscalib_EB",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_W_noEP_miscalib_EB",outputFile.c_str()); - - - if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_EB",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_EB",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_W_noEP_EB",outputFile.c_str()); - - name = Form("%s.root",name_tmp.Data()); - TFile *f1 = new TFile(name,"RECREATE"); - - TString outEPDistribution = "Weight_"+name; - - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - if(isSaveEPDistribution == true) - { - XtalAlphaEB analyzer(albero, g_EoC_EB, typeEB, outEPDistribution); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); - analyzer.saveHistos(f1); - } - else - { - XtalAlphaEB analyzer(albero, g_EoC_EB, typeEB); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); - analyzer.saveHistos(f1); - } - - } - - /// run in even-odd mode: half statistics - else if ( splitStat == 1 ) { - - /// Prepare the outputs - TString name; - TString name2; - - if(isMiscalib == true && useZ == 1 && isR9selection==true) - { name = Form ("%s_WZ_R9_miscalib_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_R9_miscalib_EB_odd.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isEPselection==true) - { name = Form ("%s_WZ_EP_miscalib_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_EP_miscalib_EB_odd.root", outputFile.c_str()); - } - if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false) - { name = Form ("%s_WZ_noEP_miscalib_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_noEP_miscalib_EB_odd.root", outputFile.c_str()); - } - - - - if(isMiscalib == false && useZ == 1 && isR9selection==true) - { name = Form ("%s_WZ_R9_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_R9_EB_odd.root", outputFile.c_str()); - } - - if(isMiscalib == false && useZ == 1 && isEPselection==true) - { name = Form ("%s_WZ_EP_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_EP_EB_odd.root", outputFile.c_str()); - } - if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false) - { name = Form ("%s_WZ_noEP_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_noEP_EB_odd.root", outputFile.c_str()); - } - - - if(isMiscalib == true && useZ == 0 && isR9selection==true) - { name = Form ("%s_W_R9_miscalib_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_W_R9_miscalib_EB_odd.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isEPselection==true) - { name = Form ("%s_W_EP_miscalib_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_W_EP_miscalib_EB_odd.root", outputFile.c_str()); - } - if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false) - { name = Form ("%s_W_noEP_miscalib_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_W_noEP_miscalib_EB_odd.root", outputFile.c_str()); - } - - - if(isMiscalib == false && useZ == 0 && isR9selection==true) - { name = Form ("%s_W_R9_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_W_R9_EB_odd.root", outputFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isEPselection==true) - { name = Form ("%s_EP_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_EP_EB_odd.root", outputFile.c_str()); - } - if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false) - { name = Form ("%s_W_noEP_EB_even.root",outputFile.c_str()); - name2 = Form ("%s_W_noEP_EB_odd.root", outputFile.c_str()); - } - - TFile *f1 = new TFile(name,"RECREATE"); - TFile *f2 = new TFile(name2,"RECREATE"); - - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - /// Run on odd - XtalAlphaEB analyzer_even(albero, g_EoC_EB, typeEB); - analyzer_even.bookHistos(nLoops); - analyzer_even.AcquireDeadXtal(DeadXtal); - analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); - analyzer_even.saveHistos(f1); - - /// Run on even - XtalAlphaEB analyzer_odd(albero, g_EoC_EB, typeEB); - analyzer_odd.bookHistos(nLoops); - analyzer_odd.AcquireDeadXtal(DeadXtal); - analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); - analyzer_odd.saveHistos(f2);} - - - delete albero; - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp b/EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp deleted file mode 100644 index 3a829684ff5..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/XtalAlphaEE.cpp +++ /dev/null @@ -1,250 +0,0 @@ -#include "XtalAlphaEE.h" -#include -#include -#include - -#include "ConfigParser.h" -#include "ntpleUtils.h" -#include "CalibrationUtils.h" - - - -int main (int argc, char ** argv) -{ - - ///Check if all nedeed arguments to parse are there - if(argc != 2) - { - std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - /// Parse the config file - parseConfigFile (argv[1]) ; - - //std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); - std::string inputList = gConfigParser -> readStringOption("Input::inputList"); - std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); - - std::string inputFileDeadXtal = "NULL"; - try - { - inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); - } - catch( char const* exceptionString ) - { - std::cerr << " exception = " << exceptionString << std::endl; - } - - std::string jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName"); - std::map > > jsonMap; - jsonMap = readJSONFile(jsonFileName); - - bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); - bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); - bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); - bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); - float R9Min = gConfigParser -> readFloatOption("Input::R9Min"); - bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); - bool isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); - std::string inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); - - std::string typeEB = gConfigParser -> readStringOption("Input::typeEB"); - std::string typeEE = gConfigParser -> readStringOption("Input::typeEE"); - - int nRegionsEE = GetNRegionsEE(typeEE); - - std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); - - int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); - int useZ = gConfigParser -> readIntOption("Options::useZ"); - int useW = gConfigParser -> readIntOption("Options::useW"); - int splitStat = gConfigParser -> readIntOption("Options::splitStat"); - int nLoops = gConfigParser -> readIntOption("Options::nLoops"); - - /// Acquistion input ntuples - TChain * albero = new TChain (inputTree.c_str()); - FillChain(*albero,inputList); - - /// open calibration momentum graph - TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); - std::vector g_EoC_EE; - - for(int i = 0; i < nRegionsEE; ++i){ - - TString Name = Form("g_EoC_EE_%d",i); - g_EoC_EE.push_back( (TGraphErrors*)(f4->Get(Name)) ); - } - - ///Use the whole sample statistics if numberOfEvents < 0 - if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); - - /// run in normal mode: full statistics - if ( splitStat == 0 ) { - - TString name ; - TString outputTxtFile ; - TString name_tmp; - if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_WZ_fbrem_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_WZ_noEP_miscalib_EE",outputFile.c_str()); - - if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_WZ_fbrem_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_WZ_noEP_EE",outputFile.c_str()); - - - if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_miscalib_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isfbrem == true ) name_tmp = Form ("%s_W_fbrem_EE",outputFile.c_str()); - if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_W_noEP_miscalib_EE",outputFile.c_str()); - - - if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isfbrem ==true ) name_tmp = Form ("%s_W_fbrem_EE",outputFile.c_str()); - if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_W_noEP_EE",outputFile.c_str()); - - name = Form("%s.root",name_tmp.Data()); - TFile *f1 = new TFile(name,"RECREATE"); - - TString outEPDistribution = "Weight_"+name; - - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - - if(isSaveEPDistribution == true){ - - XtalAlphaEE analyzer(albero, g_EoC_EE, typeEE, outEPDistribution); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); - analyzer.saveHistos(f1); - } - else - { - XtalAlphaEE analyzer(albero, g_EoC_EE, typeEE); - analyzer.bookHistos(nLoops); - analyzer.AcquireDeadXtal(DeadXtal); - analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); - analyzer.saveHistos(f1); - } - - } - - /// run in even-odd mode: half statistics - else if ( splitStat == 1 ) { - - /// Prepare the outputs - TString name; - TString name2; - - if(isMiscalib == true && useZ == 1 && isR9selection==true) - { name = Form ("%s_WZ_R9_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_R9_miscalib_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isEPselection==true) - { name = Form ("%s_WZ_EP_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_EP_miscalib_EE.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isfbrem==true) - { name = Form ("%s_WZ_fbrem_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_fbrem_miscalib_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_WZ_noEP_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_noEP_miscalib_EE_odd.root", outputFile.c_str()); - } - - - - if(isMiscalib == false && useZ == 1 && isR9selection==true) - { name = Form ("%s_WZ_R9_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_R9_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == false && useZ == 1 && isEPselection==true) - { name = Form ("%s_WZ_EP_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_EP_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == false && useZ == 1 && isfbrem==true) - { name = Form ("%s_WZ_fbrem_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_fbrem_EE_odd.root", outputFile.c_str()); - } - if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_WZ_noEP_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_WZ_noEP_EE_odd.root", outputFile.c_str()); - } - - - if(isMiscalib == true && useZ == 0 && isR9selection==true) - { name = Form ("%s_W_R9_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_R9_miscalib_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isEPselection==true) - { name = Form ("%s_W_EP_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_EP_miscalib_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isfbrem==true) - { name = Form ("%s_W_fbrem_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_fbrem_miscalib_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_W_noEP_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_noEP_miscalib_EE_odd.root", outputFile.c_str()); - } - - - if(isMiscalib == false && useZ == 0 && isR9selection==true) - { name = Form ("%s_W_R9_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_R9_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isEPselection==true) - { name = Form ("%s_W_EP_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_EP_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isfbrem==true) - { name = Form ("%s_W_fbrem_miscalib_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_fbrem_miscalib_EE_odd.root", outputFile.c_str()); - } - - if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) - { name = Form ("%s_W_noEP_EE_even.root",outputFile.c_str()); - name2 = Form ("%s_W_noEP_EE_odd.root", outputFile.c_str()); - } - - TFile *f1 = new TFile(name,"RECREATE"); - TFile *f2 = new TFile(name2,"RECREATE"); - TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); - - - /// Run on odd - XtalAlphaEE analyzer_even(albero, g_EoC_EE, typeEE); - analyzer_even.bookHistos(nLoops); - analyzer_even.AcquireDeadXtal(DeadXtal); - analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); - analyzer_even.saveHistos(f1); - - /// Run on even - XtalAlphaEE analyzer_odd(albero, g_EoC_EE, typeEE); - analyzer_odd.bookHistos(nLoops); - analyzer_odd.AcquireDeadXtal(DeadXtal); - analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); - analyzer_odd.saveHistos(f2); - - } - - delete albero; - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp b/EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp deleted file mode 100644 index 5e8d16b692d..00000000000 --- a/EOverPCalibration/FastCalibrator/bin/Zlineshape.cpp +++ /dev/null @@ -1,945 +0,0 @@ -#include "Zutils.h" -#include "setTDRStyle.h" -#include "ConfigParser.h" -#include "ntpleUtils.h" - -#include "TROOT.h" -#include "TStyle.h" -#include "TFile.h" -#include "TF1.h" -#include "TH1.h" -#include "TH2.h" -#include "TChain.h" -#include "TCanvas.h" -#include "TGraphAsymmErrors.h" -#include "TPaveStats.h" -#include "TLegend.h" -#include "TTree.h" -#include "TVirtualFitter.h" -#include "TMath.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define a 0.5346 -#define b 0.2166 -#define FWHMZ 2.4952 - - -int main(int argc, char **argv){ - - //set the style - setTDRStyle(); - gROOT->Reset(); - gROOT->SetStyle("Plain"); - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - - - /// Acquisition from cfg file - - if(argc != 2){ - std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; - return 1; - } - - parseConfigFile (argv[1]) ; - - std::string treeNameDATA = gConfigParser -> readStringOption("Input::treeNameDATA"); - std::cout<<" Input Tree Name DATA = "< readStringOption("Input::treeNameMC"); - std::cout<<" Input Tree Name MC = "< readStringOption("Input::inputDataFile"); - std::cout<<" Input Data File = "< readStringOption("Input::inputMCFile"); - std::cout<<" Input MC File = "< readStringOption("Input::WeightforMC"); - std::cout<<" Weights for MC = "< readBoolOption("Input::useMC"); - std::cout<<" Fit also MC = "< readStringOption("Output::outputFile"); - std::cout<<" Output Data File = "< readStringOption("Output::outputFileTable"); - std::cout<<" Output Table File = "<GetEntries() << " entries" << std::endl; - std::cout << " DATA: " << std::setw(8) << treeDATA->GetEntries() << " entries" << std::endl; - - if (treeDATA->GetEntries() == 0 || treeMC->GetEntries() == 0 ){ - std::cout << ">>>recalibZ::Error: at least one file is empty" << std::endl; - return -1; - } - - std::vector FitCategories; - FitCategories = gConfigParser -> readStringListOption("Input::FitCategories"); - - std::cout << " >>>>> Input::FitCategories size = " << FitCategories.size() << std::endl; - std::cout << " >>>>> >>>>> "; - for (unsigned int iCat = 0; iCat < FitCategories.size(); iCat++){ - std::cout << " " << FitCategories.at(iCat) << ", "; - } - std::cout << std::endl; - - //--- weights for MC - TFile weightsFile (WeightforMC.c_str(),"READ"); - TH1F* hweights = (TH1F*)weightsFile.Get("hweights"); - float w[100]; - for (int ibin = 1; ibin < hweights->GetNbinsX()+1; ibin++){ - w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 - } - weightsFile.Close(); - - /// Output infos - TFile* outputTFile = new TFile(outputFile.c_str(),"RECREATE"); - - /// option Infos - int nbinZ = gConfigParser -> readIntOption("Option::nbinZ"); - std::cout<<" nbinZ = "< readDoubleOption("Option::mZMax"); - std::cout<<" mZ_Max = "< readDoubleOption("Option::mZMin"); - std::cout<<" mZ_Min = "< readDoubleOption("Option::scaleEB"); - std::cout<<" scaleEB = "< readDoubleOption("Option::scaleEE"); - std::cout<<" scaleEE = "< readIntOption("Option::nPoints"); - std::cout<<" nPoints = "< ZmassDATA; - std::map ZmassDATA_regression; - std::map ZmassMC; - std::map ZmassMC_regression; - - - for(unsigned int i = 0; i < FitCategories.size(); ++i){ - std::string category = FitCategories.at(i); - std::string histoName1 = "h_ZmassDATA_"+category; - ZmassDATA[category] = new TH1F(histoName1.c_str(),"",nbinZ,mZ_Min,mZ_Max); - ZmassDATA[category] -> Sumw2(); - - std::string histoName2 = "h_ZmassDATA_regression_"+category; - ZmassDATA_regression[category] = new TH1F(histoName2.c_str(),"",nbinZ,mZ_Min,mZ_Max); - ZmassDATA_regression[category] -> Sumw2(); - - std::string histoName3 = "h_ZmassMC_"+category; - ZmassMC[category] = new TH1F(histoName3.c_str(),"",nbinZ,mZ_Min,mZ_Max); - ZmassMC[category] -> Sumw2(); - - std::string histoName4 = "h_ZmassMC_regression_"+category; - ZmassMC_regression[category] = new TH1F(histoName4.c_str(),"",nbinZ,mZ_Min,mZ_Max); - ZmassMC_regression[category] -> Sumw2(); - - } - - /// Set branch addresses - int isZ; - float ele1ele2_scM,ele1ele2_scM_regression; - int ele1_isEB,ele2_isEB; - float ele1_scEta,ele2_scEta,ele1_scE,ele2_scE,ele1_es,ele2_es,ele1_scERaw,ele2_scERaw, ele1_scE_regression, - ele2_scE_regression,ele1_e3x3,ele2_e3x3; - int ele1_seedIeta,ele1_seedIphi,ele2_seedIeta,ele2_seedIphi,ele1_seedIx,ele2_seedIx,ele1_seedIy,ele2_seedIy,ele1_seedZside,ele2_seedZside; - int PUit_NumInteractions; - - treeDATA->SetBranchAddress("isZ", &isZ); - treeDATA->SetBranchAddress("ele1ele2_scM", &ele1ele2_scM); - treeDATA->SetBranchAddress("ele1ele2_scM_regression", &ele1ele2_scM_regression); - treeDATA->SetBranchAddress("ele1_isEB", &ele1_isEB); - treeDATA->SetBranchAddress("ele2_isEB", &ele2_isEB); - - treeMC->SetBranchAddress("isZ", &isZ); - treeMC->SetBranchAddress("ele1ele2_scM", &ele1ele2_scM); - treeMC->SetBranchAddress("ele1_isEB", &ele1_isEB); - treeMC->SetBranchAddress("ele2_isEB", &ele2_isEB); - treeMC->SetBranchAddress("PUit_NumInteractions", &PUit_NumInteractions); - - treeDATA->SetBranchAddress("ele1_scEta", &ele1_scEta); - treeDATA->SetBranchAddress("ele2_scEta", &ele2_scEta); - - treeMC->SetBranchAddress("ele1_scEta", &ele1_scEta); - treeMC->SetBranchAddress("ele2_scEta", &ele2_scEta); - - treeDATA->SetBranchAddress("ele1_seedIeta", &ele1_seedIeta); - treeDATA->SetBranchAddress("ele1_seedIphi", &ele1_seedIphi); - treeDATA->SetBranchAddress("ele2_seedIeta", &ele2_seedIeta); - treeDATA->SetBranchAddress("ele2_seedIphi", &ele2_seedIphi); - treeDATA->SetBranchAddress("ele1_seedIx", &ele1_seedIx); - treeDATA->SetBranchAddress("ele2_seedIx", &ele2_seedIx); - treeDATA->SetBranchAddress("ele1_seedIy", &ele1_seedIy); - treeDATA->SetBranchAddress("ele2_seedIy", &ele2_seedIy); - treeDATA->SetBranchAddress("ele1_seedZside", &ele1_seedZside); - treeDATA->SetBranchAddress("ele2_seedZside", &ele2_seedZside); - - treeMC->SetBranchAddress("ele1_seedIeta", &ele1_seedIeta); - treeMC->SetBranchAddress("ele1_seedIphi", &ele1_seedIphi); - treeMC->SetBranchAddress("ele2_seedIeta", &ele2_seedIeta); - treeMC->SetBranchAddress("ele2_seedIphi", &ele2_seedIphi); - treeMC->SetBranchAddress("ele1_seedIx", &ele1_seedIx); - treeMC->SetBranchAddress("ele2_seedIx", &ele2_seedIx); - treeMC->SetBranchAddress("ele1_seedIy", &ele1_seedIy); - treeMC->SetBranchAddress("ele2_seedIy", &ele2_seedIy); - treeMC->SetBranchAddress("ele1_seedZside", &ele1_seedZside); - treeMC->SetBranchAddress("ele2_seedZside", &ele2_seedZside); - - - treeDATA->SetBranchAddress("ele1_scE", &ele1_scE); - treeDATA->SetBranchAddress("ele1_e3x3", &ele1_e3x3); - treeDATA->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression); - treeDATA->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression); - treeDATA->SetBranchAddress("ele2_scE", &ele2_scE); - treeDATA->SetBranchAddress("ele1_scERaw", &ele1_scERaw); - treeDATA->SetBranchAddress("ele2_e3x3", &ele2_e3x3); - treeDATA->SetBranchAddress("ele1_es", &ele1_es); - treeDATA->SetBranchAddress("ele2_scERaw", &ele2_scERaw); - treeDATA->SetBranchAddress("ele2_es", &ele2_es); - - treeMC->SetBranchAddress("ele1_scE", &ele1_scE); - treeMC->SetBranchAddress("ele1_e3x3", &ele1_e3x3); - treeMC->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression); - treeMC->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression); - treeMC->SetBranchAddress("ele1_scERaw", &ele1_scERaw); - treeMC->SetBranchAddress("ele1_es", &ele1_es); - treeMC->SetBranchAddress("ele2_scE", &ele2_scE); - treeMC->SetBranchAddress("ele2_e3x3", &ele2_e3x3); - treeMC->SetBranchAddress("ele2_scERaw", &ele2_scERaw); - treeMC->SetBranchAddress("ele2_es", &ele2_es); - - //*** Loop on MC **// - std::cout <<" Fill with MC Events "< GetEntries(); - std::cout <<" MC Events = "< GetEntry(iEntry); - double weight = w[PUit_NumInteractions]; - //only the Z - if (isZ != 1) continue; - if( (ele1_seedZside== 0) && (ele2_seedZside == 0) ){ - ZmassMC["EB-EB"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); - ZmassMC_regression["EB-EB"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); - } - else if( fabs(ele1_seedZside)== 1 && fabs(ele2_seedZside)== 1 ){ - ZmassMC["EE-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); - ZmassMC_regression["EE-EE"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight ); - - } - else{ - ZmassMC["EB-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEE),weight ); - ZmassMC_regression["EB-EE"] -> Fill( ele1ele2_scM* sqrt(scaleEB*scaleEE)* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)),weight ); - } - - if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta>0. && ele2_scEta>0. ){ - ZmassMC["EBp"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); - ZmassMC_regression["EBp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); - } - else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta<0. && ele2_scEta<0. ){ - ZmassMC["EBm"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); - ZmassMC_regression["EBm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); - } - - if((ele1_seedZside== 1) && (ele2_seedZside == 1)){ - ZmassMC["EEp"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); - ZmassMC_regression["EEp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); - } - else if((ele1_seedZside== -1) && (ele2_seedZside == -1)){ - ZmassMC["EEm"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); - ZmassMC_regression["EEm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); - } - - if((ele1_seedZside!=0) && (ele2_seedZside !=0) && ele1_e3x3/ele1_scERaw>0.94 && ele2_e3x3/ele2_scERaw>0.94){ - ZmassMC["EE_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); - ZmassMC_regression["EE_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); - } - - else if((ele1_seedZside!=0) && (ele2_seedZside !=0) && ele1_e3x3/ele1_scERaw<0.94 && ele2_e3x3/ele2_scERaw<0.94){ - ZmassMC["EE_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); - ZmassMC_regression["EE_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); - } - - if((ele1_seedZside==0) && (ele2_seedZside ==0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ - ZmassMC["EB_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); - ZmassMC_regression["EB_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); - } - - else if((ele1_seedZside==0) && (ele2_seedZside==0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ - ZmassMC["EB_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); - ZmassMC_regression["EB_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); - } - - if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)<1. && fabs(ele2_scEta)<1. ){ - ZmassMC["EB_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); - ZmassMC_regression["EB_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); - } - else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)>1. && fabs(ele2_scEta)>1. ){ - ZmassMC["EB_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); - ZmassMC_regression["EB_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); - } - - if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)<2. && fabs(ele2_scEta)<2. ){ - ZmassMC["EE_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); - ZmassMC_regression["EE_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); - } - else if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)>2. && fabs(ele2_scEta)>2. ){ - ZmassMC["EE_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); - ZmassMC_regression["EE_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); - } - - - } - - //*** Loop over Data **// - int nEntriesDATA = treeDATA -> GetEntries(); - std::cout <<" Fill with DATA Events "< GetEntry(iEntry); - //only the Z - if (isZ != 1) continue; - - if( (ele1_seedZside== 0) && (ele2_seedZside== 0) ){ - ZmassDATA["EB-EB"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB) ); - ZmassDATA_regression["EB-EB"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE))* sqrt(scaleEB*scaleEB)); - } - else if( fabs(ele1_seedZside)== 1 && fabs(ele2_seedZside)== 1 ){ - ZmassDATA["EE-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE) ); - ZmassDATA_regression["EE-EE"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE) ); - - } - else{ - ZmassDATA["EB-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEE) ); - ZmassDATA_regression["EB-EE"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEE) ); - } - - if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta>0. && ele2_scEta>0. ){ - ZmassDATA["EBp"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); - ZmassDATA_regression["EBp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); - } - else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta<0. && ele2_scEta<0. ){ - ZmassDATA["EBm"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); - ZmassDATA_regression["EBm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); - } - - if((ele1_seedZside== 1) && (ele2_seedZside == 1)){ - ZmassDATA["EEp"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); - ZmassDATA_regression["EEp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); - } - -else if((ele1_seedZside== -1) && (ele2_seedZside == -1)){ - ZmassDATA["EEm"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); - ZmassDATA_regression["EEm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); -} - - - if((ele1_seedZside!=0) && (ele2_seedZside !=0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ - ZmassDATA["EE_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); - ZmassDATA_regression["EE_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); - } - - else if((ele1_seedZside!=0) && (ele2_seedZside !=0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ - ZmassDATA["EE_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); - ZmassDATA_regression["EE_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); - } - - if((ele1_seedZside==0) && (ele2_seedZside ==0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ - ZmassDATA["EB_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); - ZmassDATA_regression["EB_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); - } - - else if((ele1_seedZside==0) && (ele2_seedZside==0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ - ZmassDATA["EB_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); - ZmassDATA_regression["EB_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); - } - - if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)<1. && fabs(ele2_scEta)<1. ){ - ZmassDATA["EB_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB) ); - ZmassDATA_regression["EB_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); - } - else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)>1. && fabs(ele2_scEta)>1. ){ - ZmassDATA["EB_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); - ZmassDATA_regression["EB_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); - } - - if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)<2. && fabs(ele2_scEta)<2. ){ - ZmassDATA["EE_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); - ZmassDATA_regression["EE_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); - } - else if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)>2. && fabs(ele2_scEta)>2. ){ - ZmassDATA["EE_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); - ZmassDATA_regression["EE_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); - } - - - } - - /// Z Lineshape Tool -if(useMC){ - - std::string energyType = "NoReg"; - - std::ofstream outTableFile (outputTable.c_str(),std::ios::out); - - outTableFile<<"\\begin{table}[!htb]"< extremeDATA = breitWigner_crystalBallLowFWHM(ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg"), mZ_Min,mZ_Max); - - double sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - std::pair extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg"),mZ_Min,mZ_Max); - - double sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB-EB_Reg")->GetParError(3)<<" &"<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EBp_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EBp_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EBm_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EBm_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3)) <<" \\\\ "< DATA and MC Regression"<GetFunction("bw_cb_DATA_EB_R9_g_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EB_R9_l_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3)) <<" \\\\ "< 1 DATA and MC Regression "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE-EE_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE-EE_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EEp_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EEp_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EEm_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EEm_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3)) <<" \\\\ "< DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_R9_g_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE_R9_l_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3)) <<" \\\\ "< 2 DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg"), mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - - extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg"),mZ_Min,mZ_Max); - - sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3)) <<" & "<< - ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3)) <<" \\\\ "< extremeDATA = breitWigner_crystalBallLowFWHM(ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg"),mZ_Min,mZ_Max); - - double sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EBp_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EBm_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" \\\\ "< DATA and MC Regression"<GetFunction("bw_cb_DATA_EB_R9_g_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EB_R9_l_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" \\\\ "< 1 DATA Regression "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE-EE_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EEp_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EEm_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" \\\\ "< DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_R9_g_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE_R9_l_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" \\\\ "< 2 DATA Regression "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg"),mZ_Min,mZ_Max); - - sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); - - outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" \\\\ "<Write(); - ZmassDATA["EB-EE"]->Write(); - ZmassDATA["EE-EE"]->Write(); - ZmassDATA["EBp"]->Write(); - ZmassDATA["EB_R9_g"]->Write(); - ZmassDATA["EB_R9_l"]->Write(); - ZmassDATA["EEp"]->Write(); - ZmassDATA["EEm"]->Write(); - ZmassDATA["EE_R9_g"]->Write(); - ZmassDATA["EE_R9_l"]->Write(); - ZmassDATA["EB-EE"]->Write(); - - ZmassMC["EB-EB"]->Write(); - ZmassMC["EB-EE"]->Write(); - ZmassMC["EE-EE"]->Write(); - ZmassMC["EBp"]->Write(); - ZmassMC["EB_R9_g"]->Write(); - ZmassMC["EB_R9_l"]->Write(); - ZmassMC["EEp"]->Write(); - ZmassMC["EEm"]->Write(); - ZmassMC["EE_R9_g"]->Write(); - ZmassMC["EE_R9_l"]->Write(); - ZmassMC["EB-EE"]->Write(); - - ZmassDATA_regression["EB-EB"]->Write(); - ZmassDATA_regression["EB-EE"]->Write(); - ZmassDATA_regression["EE-EE"]->Write(); - - ZmassMC_regression["EB-EB"]->Write(); - ZmassMC_regression["EB-EE"]->Write(); - ZmassMC_regression["EE-EE"]->Write(); - - outputTFile -> Close(); - - return 0; -} diff --git a/EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py b/EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py deleted file mode 100644 index a992cae30db..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/AddRegressionWeight_cfg.py +++ /dev/null @@ -1,17 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("AddRegressionWeight") - -process.Options = cms.PSet( - - inputFile = cms.string("../WZAnalysis_DATA.root"), - treeNameDATA = cms.string("simpleNtupleEoverP/ntu"), - UseMethodFlag = cms.string("BDTG"), - FilemethodXMLEBE = cms.string("weight_EB_BDTG_E_W/TMVARegression_BDTG.weights.xml"), - FilemethodXMLEBP = cms.string("weight_EB_BDTG_P_W/TMVARegression_BDTG.weights.xml"), - FilemethodXMLEEE = cms.string("weight_EE_BDTG_E_W/TMVARegression_BDTG.weights.xml"), - FilemethodXMLEEP = cms.string("weight_EE_BDTG_P_W/TMVARegression_BDTG.weights.xml"), - RegionOfTraining = cms.string("EE"), - useW = cms.bool(True), - isMC = cms.bool(False) -) \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/Barrel.cfg b/EOverPCalibration/FastCalibrator/cfg/Barrel.cfg deleted file mode 100644 index 3e88c2343ca..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/Barrel.cfg +++ /dev/null @@ -1,50 +0,0 @@ -#@@@@@@@@@@ ON LSF FOR ECAL EB @@@@@@@@@ -##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ -#ls -lrth cfg/cfg_lunch/ | grep -v ~ | grep -v EE | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorWeight.exe cfg/job_sh/"$9}' -##### Generate .sh on LSF -# cd CMSSW_4_2.... -#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | grep -v EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh -#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh -#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh -##### Run Job on LSF -#ls -lrth cfg/job_sh/ | grep DATA | grep -v EE | awk '{print "bsub -cwd ./LSF -q 1nd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' -#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' - - -#@@@@@@@@@@ ON LSF FOR ECAL EE @@@@@@@@@ -##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ -#ls -lrth cfg/cfg_lunch/ | grep -v ~ | grep EE | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorEE.exe cfg/job_sh/"$9}' -##### Generate .sh on LSF -# cd CMSSW_4_2.... -#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | grep EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorEE.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh -#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | grep EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorEE.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh -#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh -##### Run Job on LSF -#ls -lrth cfg/job_sh/ | grep DATA | grep EE | awk '{print "bsub -cwd ./LSF -q 1nd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' -#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' - - -[Input] -#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root -#inputFile= /data1/rgerosa/NTUPLES_FINAL_CALIB/MC/WJetsToLNu_DYJetsToLL_7TeV-madgraph-tauola_Fall11_All.root - -inputList = cfg/list.txt - -inputFileDeadXtal= - -inputTree = ntu -isMiscalib = false -isSaveEPDistribution = false -isEPselection = false -isR9selection = false -isMCTruth = true - -[Output] -outputFile = WJetsToLNu_DYJetsToLL_7TeV-madgraph-tauola_Fall11_Etrue - -[Options] -numberOfEvents = 100 -useZ = 1 -useW = 1 -splitStat = 0 -nLoops = 2 \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg b/EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg deleted file mode 100644 index 87a53d10c32..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/DeadXtalAnalysisEB.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[Input] - -inputList = cfg/DeadXtalEBFile_noSkip_split.txt -inputStandardMap = output/Aug28_22JanReReco_RunABCD_standard/FastCalibrator_Aug28_22JanReReco_RunABCD_0_WZ_noEP_EB.root - -DeadChannelMapName = h_map_Dead_Channels -ICMapName = h_scale_EB - -isDeadTriggerTower = false - -EtaBinCenterDeadTT = 78, 46, 18, -12, -34, -60, -72 -NPhiShift = 14 -PhiOffset = 4 - - -IPhiWindow = 3 -IEtaWindow = 3 - -icMapRatio = false - -iEtaBinDivision = 0, 12, 24, 36, 45, 55, 65, 75, 85 -#iEtaBinDivision = 0, 20, 40, 60, 85 -iPhiBinDivision = 0, 45, 90, 135, 180, 225, 270, 315, 360 -#iPhiBinDivision = 0, 180, 360 -NPhiSMBinDivision = 5 - - -[Output] - -outputCanvasPlot = output/outDeadXtalPlots/ - - diff --git a/EOverPCalibration/FastCalibrator/cfg/Endcap.cfg b/EOverPCalibration/FastCalibrator/cfg/Endcap.cfg deleted file mode 100644 index c58b9d32cc7..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/Endcap.cfg +++ /dev/null @@ -1,25 +0,0 @@ -[Input] -#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root -#inputFile=/data1/rgerosa/NTUPLES_FINAL_CALIB/MC/WJetsToLNu_TuneZ2_7TeV-madgraph-tauola_Fall11_All.root - -inputList = cfg/list.txt - -inputFileDeadXtal= - -inputTree = ntu -isMiscalib = true -isSaveEPDistribution = false -isEPselection = false -isR9selection = true -isfbrem = false -isMCTruth = false - -[Output] -outputFile = WJetsToLNu_7TeV-madgraph-tauola_Fall11 - -[Options] -numberOfEvents = -1 -useZ = 1 -useW = 1 -splitStat = 1 -nLoops = 25 diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py deleted file mode 100644 index 01bd9a57822..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_nosplit_cfg.py +++ /dev/null @@ -1,34 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("FastCalibratorEBparameters") - -process.Options = cms.PSet( - - inputList = cms.string("cfg/list.txt"), - # inputFileDeadXtal = cms.string() - inputTree = cms.string("selected"), - jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), - miscalibMap = cms.string("/gwteray/users/brianza/scalibMap2.txt"), - isMiscalib = cms.bool(False), - isSaveEPDistribution = cms.bool(False), - isMCTruth = cms.bool(False), - isEPselection = cms.bool(False), - isPtCut = cms.bool(False), - PtMin = cms.double(0.), - isfbrem = cms.bool(False), - fbremMax = cms.double(100.), - isR9selection = cms.bool(False), - R9Min = cms.double(-1.), - miscalibMethod = cms.int32(1), - inputMomentumScale = cms.string("output/MomentumCalibration2012"), - typeEB = cms.string("eta1"), - typeEE = cms.string("eta1"), - outputPath = cms.string("output/output_runD"), - outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), - numberOfEvents = cms.int32(-1), - useZ = cms.int32(1), - useW = cms.int32(1), - splitStat = cms.int32(0), - nLoops = cms.int32(20), - isDeadTriggerTower = cms.bool(False) -) diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py deleted file mode 100644 index c44930860ae..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EB_split_cfg.py +++ /dev/null @@ -1,34 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("FastCalibratorEBparameters") - -process.Options = cms.PSet( - - inputList = cms.string("cfg/list.txt"), - # inputFileDeadXtal = cms.string() - inputTree = cms.string("selected"), - jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), - miscalibMap = cms.string("/gwteray/users/brianza/scalibMap2.txt"), - isMiscalib = cms.bool(False), - isSaveEPDistribution = cms.bool(False), - isMCTruth = cms.bool(False), - isEPselection = cms.bool(False), - isPtCut = cms.bool(False), - PtMin = cms.double(0.), - isfbrem = cms.bool(False), - fbremMax = cms.double(100.), - isR9selection = cms.bool(False), - R9Min = cms.double(-1.), - miscalibMethod = cms.int32(1), - inputMomentumScale = cms.string("output/MomentumCalibration2012"), - typeEB = cms.string("eta1"), - typeEE = cms.string("eta1"), - outputPath = cms.string("output/output_runD"), - outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), - numberOfEvents = cms.int32(-1), - useZ = cms.int32(1), - useW = cms.int32(1), - splitStat = cms.int32(1), - nLoops = cms.int32(20), - isDeadTriggerTower = cms.bool(False) -) diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py deleted file mode 100644 index f41cde327a9..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_nosplit_cfg.py +++ /dev/null @@ -1,35 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("FastCalibratorEEoptimization") - -process.Options = cms.PSet( - - inputList = cms.string("cfg/list.txt"), -# inputFileDeadXtal = cms.string(), - inputTree = cms.string("selected"), - jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), - miscalibMap = cms.string("scalibMapEE_eta_straweak.txt"), - isMiscalib = cms.bool(False), - isSaveEPDistribution = cms.bool(False), - isMCTruth = cms.bool(False), - isEPselection = cms.bool(False), - isPtCut = cms.bool(False), - PtMin = cms.double(0.), - isfbrem = cms.bool(False), - fbremMax = cms.double(100.), - isR9selection = cms.bool(False), - R9Min = cms.double(-1.), - miscalibMethod = cms.int32(1), - inputMomentumScale = cms.string("output/MomentumCalibration2012"), - typeEB = cms.string("eta1"), - typeEE = cms.string("eta1"), - outputPath = cms.string("output/output_runD_EE"), - outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), - numberOfEvents = cms.int32(-1), - useZ = cms.int32(1), - useW = cms.int32(1), - splitStat = cms.int32(0), - nLoops = cms.int32(20), - isDeadTriggerTower = cms.bool(False) -) - diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py deleted file mode 100644 index 1ed47d11848..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_EE_split_cfg.py +++ /dev/null @@ -1,35 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("FastCalibratorEEparameters") - -process.Options = cms.PSet( - - inputList = cms.string("cfg/list.txt"), -# inputFileDeadXtal = cms.string(), - inputTree = cms.string("selected"), - jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), - miscalibMap = cms.string("scalibMapEE_eta_straweak.txt"), - isMiscalib = cms.bool(False), - isSaveEPDistribution = cms.bool(False), - isMCTruth = cms.bool(False), - isEPselection = cms.bool(False), - isPtCut = cms.bool(False), - PtMin = cms.double(0.), - isfbrem = cms.bool(False), - fbremMax = cms.double(100.), - isR9selection = cms.bool(False), - R9Min = cms.double(-1.), - miscalibMethod = cms.int32(1), - inputMomentumScale = cms.string("output/MomentumCalibration2012"), - typeEB = cms.string("eta1"), - typeEE = cms.string("eta1"), - outputPath = cms.string("output/output_runD_EE"), - outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), - numberOfEvents = cms.int32(-1), - useZ = cms.int32(1), - useW = cms.int32(1), - splitStat = cms.int32(1), - nLoops = cms.int32(20), - isDeadTriggerTower = cms.bool(False) -) - diff --git a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg b/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg deleted file mode 100644 index f3ab2846c3f..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/FastCalibrator_Template.cfg +++ /dev/null @@ -1,37 +0,0 @@ -[Input] - -inputList = INPUTLIST -inputTree = INPUTTREE -jsonFileName = JSONFILENAME -inputFileDeadXtal = INPUTFILEDEADXTAL - -isMiscalib = MISCALIB -isSaveEPDistribution = EOVERP -isMCTruth = MCTRUTH -isEPselection = EPSELECTION -isPtCut = PTCUT -PtMin = PTMIN -isfbrem = ISFBREM -fbremMax = FBREMMAX -isR9selection = R9CUT -R9Min = R9MIN - -inputMomentumScale = INPUTMOMENTUMSCALE - -typeEB = TYPEEB -typeEE = TYPEEE - - -[Output] - -outputPath = OUTPUTPATH -outputFile = OUTPUTFILE - - -[Options] - -numberOfEvents = NUMEVENTS -useZ = USEZ -useW = USEW -splitStat = SPLIT -nLoops = LOOPS diff --git a/EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg b/EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg deleted file mode 100644 index 1b140ebca73..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/MVARegression_cfg.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[Input] - -inputFileList = cfg/MVATraining.txt - -treeNameDATA = ntu - -UseMethodName = PDERS ,\ - PDEFoam ,\ - KNN ,\ - LD ,\ - FDA_GA ,\ - FDA_MC ,\ - FDA_MT ,\ - FDA_GAMT ,\ - MLP ,\ - SVM ,\ - BDT ,\ - BDTG - - -#UseMethodFlag = LD -#UseMethodFlag = MLP -UseMethodFlag = BDT -#UseMethodFlag = BDTG - - -RegionOfTraining = EB - -[Output] - -#outputFileName = TMVA/TMVARegEB_LD_Z.root -#outputFileName = TMVA/TMVARegEB_MLP_multitarget.root -outputFileName = TMVA/TMVAReg_BDT_EB_P_W.root \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg b/EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg deleted file mode 100644 index cf5b10d8565..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/MakeJobs_cfg.cfg +++ /dev/null @@ -1,61 +0,0 @@ -[Input] - -EtaBinCenterDeadXtal = 78, 46, 18, -12, -34, -60, -72 -PhiStartDeadXtal = 4 -PhiStepDeadXtal = 15 -PhiNShiftDeadXtal = 3 - -isDeadTriggerTower = true - -IxEEPBinCenterDeadXtal = 10, 20, 30, 40 -IyEEPBinCenterDeadXtal = 10, 20, 30, 40 -IxEEMBinCenterDeadXtal = 10, 20, 30, 40 -IyEEMBinCenterDeadXtal = 10, 20, 30, 40 - -iXStepDeadXtal = 1 -iXNShiftDeadXtal = 3 -iYStepDeadXtal = 1 -iYNShiftDeadXtal = 3 - - -OutputDeadXtalPath = cfg/DeadXTalList/ -OutputDeadXtalFile = DeadXtalFile -inputCfgTemplate = cfg/FastCalibrator_Template.cfg - -inputList = cfg/list.txt -inputTree = simpleNtupleEoverP/SimpleNtupleEoverP -jsonFileName = json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt - - -isMiscalib = false -isSaveEPDistribution = false -isMCTruth = false -isEPselection = false -isPtCut = false -PtMin = 0. -isfbrem = false -fbremMax = 100. -isR9selection = false -R9Min = -1. - -inputMomentumScale = output/MomentumCalibration2012 - -typeEB = eta1 -typeEE = eta1 - - - - -[Output] - -outputPath = output/Aug28_22JanReReco_RunABCD_DeadTT/ -outputFile = FastCalibrator_Aug28_22JanReReco_RunABCD -OutputCfgPath = cfg/JOB/ - -[Options] - -numberOfEvents = -1 -useZ = 1 -useW = 1 -splitStat = 0 -nLoops = 18 diff --git a/EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py b/EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py deleted file mode 100644 index baca0629328..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/NormalizeEE_cfg.py +++ /dev/null @@ -1,16 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("FastCalibratorEBparameters") - -process.Options = cms.PSet( - - Inputfile1 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), - Inputfile2 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), - Inputfile3 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), - evalStat = cms.int32(1), - isMC = cms.bool(false), - fileType = cms.string("png"), - dirName = cms.string("."), - printPlots = cms.bool(false) - -) diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg deleted file mode 100644 index d5e79b76fae..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_noSplit.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[Input] -inputList = cfg/list.txt - -inputFileDeadXtal= - -jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt - -typeEB = eta1 -typeEE = absEta2 -inputMomentumScale = output/MomentumCalibration2012 - -inputTree = simpleNtupleEoverP/SimpleNtupleEoverP -isMiscalib = false -isSaveEPDistribution = false -isEPselection = false -isR9selection = false -R9Min = -1. -isMCTruth = false - - - -[Output] -outputFile = output/Test - - - - -[Options] -numberOfEvents = -1 -useZ = 1 -useW = 1 -splitStat = 0 -nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg deleted file mode 100644 index 46d6d2e15da..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEB_split.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[Input] -inputList = cfg/list.txt - -inputFileDeadXtal= - -jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt - -typeEB = eta1 -typeEE = absEta2 -inputMomentumScale = output/MomentumCalibration2012 - -inputTree = simpleNtupleEoverP/SimpleNtupleEoverP -isMiscalib = false -isSaveEPDistribution = false -isEPselection = false -isR9selection = false -R9Min = -1. -isMCTruth = false - - - -[Output] -outputFile = output/AlphaEB_CalDic_2012 - - - - -[Options] -numberOfEvents = -1 -useZ = 1 -useW = 1 -splitStat = 1 -nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg deleted file mode 100644 index e568e7e08b7..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_noSplit.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[Input] -inputList = cfg/list.txt - -inputFileDeadXtal= - -jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt - -typeEB = eta1 -typeEE = absEta2 -inputMomentumScale = output/MomentumCalibration2012 - -inputTree = simpleNtupleEoverP/SimpleNtupleEoverP -isMiscalib = false -isSaveEPDistribution = false -isEPselection = false -isR9selection = true -R9Min = -1. -isMCTruth = false -isfbrem = false - - -[Output] -outputFile = output/AlphaEE_CalDic_2012 - - -[Options] -numberOfEvents = -1 -useZ = 1 -useW = 1 -splitStat = 0 -nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg b/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg deleted file mode 100644 index 0162f755076..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/XtalAlphaEE_split.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[Input] -inputList = cfg/list.txt - -inputFileDeadXtal= - -jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt - -typeEB = eta1 -typeEE = absEta2 -inputMomentumScale = output/MomentumCalibration2012 - -inputTree = simpleNtupleEoverP/SimpleNtupleEoverP -isMiscalib = false -isSaveEPDistribution = false -isEPselection = false -isR9selection = true -isfbrem = false -R9Min = -1. -isMCTruth = false - - - -[Output] -outputFile = output/AlphaEE_CalDic_2012 - - - - -[Options] -numberOfEvents = -1 -useZ = 1 -useW = 1 -splitStat = 1 -nLoops = 50 diff --git a/EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg b/EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg deleted file mode 100644 index 4591570a722..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/Zlineshape_cfg.cfg +++ /dev/null @@ -1,49 +0,0 @@ -[Input] - -treeNameDATA = simpleNtupleEoverP/SimpleNtupleEoverP - -treeNameMC = simpleNtupleEoverP/SimpleNtupleEoverP - -inputDataFile = cfg/ZFitInputDATA/rerecoICHEP2012.txt - -inputMCFile = cfg/listMC2012.txt - -WeightforMC = CommonTools/weights/PUweights_DYJetsToLL_Summer12_S6_new.root - -useMC = true - -FitCategories = EB-EB, \ - EB-EE, \ - EE-EE, \ - EBp, \ - EBm, \ - EB_R9_g, \ - EB_R9_l, \ - EB_Eta_g, \ - EB_Eta_l, \ - EEp, \ - EEm, \ - EE_R9_g, \ - EE_R9_l, \ - EE_Eta_g, \ - EE_Eta_l - -[Option] - -nbinZ = 150 - -mZMax = 115 - -mZMin = 65 - -scaleEB = 1 - -scaleEE = 1 - -nPoints = 4000 - -[Output] - -outputFile = output/outputZLineshape.root - -outputFileTable = output/1.txt \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py b/EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py deleted file mode 100644 index 710e5f6f530..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/calibrationMomentum_cfg.py +++ /dev/null @@ -1,23 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("calibrationMomentumparameters") - -process.Options = cms.PSet( - - TreeName = cms.string("selected"), - infileDATA = cms.string("cfg/listDATA_momentumCalibration.txt"), - infileMC = cms.string("cfg/listMC2012_momentumCalibration.txt"), - WeightforMC = cms.string("CommonTools/PUweights_DYJetsToLL_Summer12_Prompt_TrueNumInteractions.root"), - usePUweights = cms.bool(false), - nPhiBinsEB = cms.int32(360), - nPhiBinsEE = cms.int32(360), - nEtaBinsEB = cms.int32(1), - nEtaBinsEE = cms.int32(1), - nPhiBinsTempEB = cms.int32(1), - nPhiBinsTempEE = cms.int32(1), - rebinEB = cms.int32(10), - rebinEE = cms.int32(20), - outputFile = cms.string("output/MomentumCalibration2012.root") - -) - diff --git a/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py b/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py deleted file mode 100644 index 2c0c02cecce..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EB_cfg.py +++ /dev/null @@ -1,22 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("calibrationPlotsEBparameters") - -process.Options = cms.PSet( - - inFileName = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), - inFileNameEven = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), - inFileNameOdd = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_odd.root"), - nEtaBinsEB = cms.int32(1), - nEtaBinsEE = cms.int32(1), - is2012Calib = cms.bool(True), - isEB = cms.bool(True), - evalStat = cms.int32(1), - outputFolder = cms.string("output/"), - outFileName = cms.string("calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"), - outputTxt = cms.string("IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"), - fileType = cms.string("cxx") - -) - - diff --git a/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py b/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py deleted file mode 100644 index f1bc13a2ad2..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/calibrationPlots_EE_cfg.py +++ /dev/null @@ -1,22 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("calibrationPlotsEEparameters") - -process.Options = cms.PSet( - - inFileName = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), - inFileNameEven = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), - inFileNameOdd = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_odd.root"), - nEtaBinsEB = cms.int32(1), - nEtaBinsEE = cms.int32(1), - is2012Calib = cms.bool(True), - isEB = cms.bool(False), - evalStat = cms.int32(1), - outputFolder = cms.string("output/"), - outFileName = cms.string("calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"), - outputTxt = cms.string("IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"), - fileType = cms.string("cxx") - -) - - diff --git a/EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py b/EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py deleted file mode 100644 index 354a973034b..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/comparisonEB_cfg.py +++ /dev/null @@ -1,12 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("comparisonEBparameters") - -process.Options = cms.PSet( - - inputFile = cms.string("/data1/rgerosa/L3_Weight/MC_WJets/noEP_Z/WZAnalysis_SingleEle_WJetsToLNu_Z_noEP_miscalib.root"), - fileMCTruth = cms.string("output/MCtruthIC.root"), - fileMCRecoIC = cms.string("output/MCRecoIC.root"), - fileStatPrecision = cms.string("output/StatPrec.root") -) - diff --git a/EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py b/EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py deleted file mode 100644 index 089fa2c1300..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/comparisonEE_cfg.py +++ /dev/null @@ -1,13 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("comparisonEEparameters") - -process.Options = cms.PSet( - - inputFile = cms.string("/data1/rgerosa/L3_Weight/MC_WJets/EE_recoFlag/WJetsToLNu_7TeV-madgraph-tauola_Fall11_Z_R9_miscalib_EE.root"), - fileMCTruth = cms.string("output/MCtruthIC_EE.root"), - fileMCRecoIC = cms.string("output/MCRecoIC_EE.root"), - fileStatPrecision = cms.string("output/StatPrec_MC_R9.root"), - outputFile = cms.string("output/ResidualForSystematic_EE_MC.root") - ) - diff --git a/EOverPCalibration/FastCalibrator/cfg/list.txt b/EOverPCalibration/FastCalibrator/cfg/list.txt deleted file mode 100644 index ae80f89101b..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/list.txt +++ /dev/null @@ -1,5 +0,0 @@ -/afs/cern.ch/user/l/lbrianza/work/public/RUND_DoubleElectron.root -#/gwteray/users/brianza/ntuple.root -#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012A_22Jan2013-v1.root -#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012B_22Jan2013-v1.root -#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012D_22Jan2013-v1.root diff --git a/EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt b/EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt deleted file mode 100644 index 134a62475a9..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/listDATA_momentumCalibration.txt +++ /dev/null @@ -1,5 +0,0 @@ -##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/DoubleElectron_Run2011AB-29Jun2012.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012A-13Jul-v1.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012B-13Jul-v1.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v2.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v3.root diff --git a/EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt b/EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt deleted file mode 100644 index 485a82a821d..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/listMC2012_momentumCalibration.txt +++ /dev/null @@ -1,6 +0,0 @@ -##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/MC/DYJets-Summer12.root -##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/DoubleElectron_Run2011AB-29Jun2012.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012A-13Jul-v1.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012B-13Jul-v1.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v2.root -/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v3.root diff --git a/EOverPCalibration/FastCalibrator/cfg/test.cfg b/EOverPCalibration/FastCalibrator/cfg/test.cfg deleted file mode 100644 index 34d9ace23e7..00000000000 --- a/EOverPCalibration/FastCalibrator/cfg/test.cfg +++ /dev/null @@ -1,34 +0,0 @@ -#@@@@@@@@@@ ON LSF @@@@@@@@@ -##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ -#ls -lrth cfg/cfg_lunch/ | grep -v ~ | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorWeight.exe cfg/job_sh/"$9}' -##### Generate .sh on LSF -# cd CMSSW_4_2.... -#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh -#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh -#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh -##### Run Job on LSF -#ls -lrth cfg/job_sh/ | grep DATA | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' -#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' - - -[Input] -#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root -#inputFile = /gwteraz/users/govoni/WJetsToLNu_TuneZ2_tTeV_madgraph-tauola_Fall11.root -inputFile = /data2/calibrator/NTUPLES/Run2011B/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011B-WElectron-PromptSkim_recHitFlag/WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim.root -inputFileDeadXtal= - -inputTree = ntu -isMiscalib = false -isSaveEPDistribution = true -isEPselection = false -isR9selection = false - -[Output] -outputFile = WZAnalysis_Occupancy_recoFlag - -[Options] -numberOfEvents = -1 -useZ = 0 -useW = 1 -splitStat = 0 -nLoops = 2 diff --git a/EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h b/EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h deleted file mode 100644 index cdf3860bb16..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/CalibrationUtils.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef CalibrationUtils_h -#define CalibrationUtils_h - -#include -#include -#include -#include - -#include "TFile.h" -#include "TChain.h" -#include "TCanvas.h" -#include "TPaveStats.h" -#include "TH1F.h" -#include "TF1.h" -#include "TRandom3.h" -#include "TGraphErrors.h" -#include "TH2F.h" -#include "TEndcapRings.h" -#include "geometryUtils.h" - - -//############## ECAL BARREL #################### - -/// Check if the crystal is near to a dead one -bool CheckxtalIC_EB (TH2F* h_scale_EB,int iPhi, int iEta ); - -/// Check if the crystal is near to a dead TT -bool CheckxtalTT_EB (int iPhi, int iEta, const std::vector >& TT_centre ); - -/// Initialize TT dead map -void InitializeDeadTT_EB(std::vector >& TT_centre); - -void InitializeDeadTT_EB2012(std::vector >& TT_centre); - - -/// Normalize IC vs ring EB -void NormalizeIC_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); - -/// Normalize IC vs LMR EB -void NormalizeIC_LMR_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); - -/// Normalize IC vs SM EB -void NormalizeIC_SM_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); - -/// Book spread Histos -void BookSpreadHistos_EB(TH1F* h_spread, std::vector& h_spread_vsEtaFold, TGraphErrors* g_spread_vsEtaFold, const int& etaRingWidth, - const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, - TH2F* hcmap, TH2F* hcmap2 = NULL); - -/// Phi Projection EB -void PhiProfile(TH1F* h_phiAvgICSpread, TGraphErrors* g_avgIC_vsPhi, const int& phiRegionWidth, - TH2F* hcmap, TEndcapRings* eRings = NULL); - -void PhiFoldProfile_EB(TGraphErrors* g_avgIC_vsPhiFold_EBM, TGraphErrors* g_avgIC_vsPhiFold_EBP, const int& phiRegionWidth, - TH2F* hcmap); - -/// Residual Spread -void ResidualSpread (TGraphErrors *statprecision, TGraphErrors *Spread, TGraphErrors *Residual); - -//################# ECAL ENDCAPS ##################### - -/// check if the xtal is near to a dead one -bool CheckxtalIC_EE(TH2F* h_scale_EE,int ix, int iy, int ir); - -/// check if the xtal is neat to a dead TT -bool CheckxtalTT_EE(int ix, int iy, int ir,const std::vector >& TT_centre ); - -/// Map dead TT EE+ -void InitializeDeadTTEEP(std::vector >& TT_centre); - -void InitializeDeadTTEEP2012(std::vector >& TT_centre); - -/// Map dead TT EE- -void InitializeDeadTTEEM(std::vector >& TT_centre); - -void InitializeDeadTTEEM2012(std::vector >& TT_centre); - -/// Normalize in function of ring -void NormalizeIC_EE(TH2F* h_scale_EEM, TH2F* h_scale_EEP, TH2F* hcmap_EEM, TH2F* hcmap_EEP, const std::vector< std::pair > & TT_centre_EEM, const std::vector< std::pair > & TT_centre_EEP, TEndcapRings *eRings, bool skip = true); - -/// Book spread Histos -void BookSpreadHistos_EE(std::map& h_spread, std::map >& h_spread_vsEtaFold, std::map& g_spread_vsEtaFold, - TEndcapRings* eRings, const int& etaRingWidth, - const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, - std::map& hcmap, std::map& hcmap2); - -/// Book spread stat Histos -void BookSpreadStatHistos_EE(TH2F** hcmap2,TH2F** hcmap3, TH1F ***hstatprecision, TH1F **hstatprecisionAll, TEndcapRings *eRings); - -/// Phi Projection EB -void PhiProfileEE(TGraphErrors *phiProjection, TGraphErrors **MomentumScale, TH2F* hcmap,TEndcapRings *eRings, const int & iz); - - - - -int GetNRegionsEB(const std::string& type); -int templIndexEB(const std::string& type, const float& eta, const float& charge, const float& R9); - -int GetNRegionsEE(const std::string& type); -int templIndexEE(const std::string& type, const float& eta, const float& charge, const float& R9); - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/DrawingUtils.h b/EOverPCalibration/FastCalibrator/interface/DrawingUtils.h deleted file mode 100644 index 5427509027c..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/DrawingUtils.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef DrawingUtils_h -#define DrawingUtils_h - -#include -#include - -#include "TFile.h" -#include "TCanvas.h" -#include "TH1F.h" -#include "TH2F.h" -#include "TGraphErrors.h" -#include "TF1.h" -#include "TLegend.h" -#include "TLatex.h" -#include "TColor.h" - - - -void SetLabelAndTitle(TGraphErrors* h); -void SetLabelAndTitle(TH1F* h); -void SetLabelAndTitle(TH2F* h2); - - - -void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileType, const bool& isEB = true); - - - -void DrawSpreadHisto(TH1F* h, const std::string& fileName, const std::string& funcName, const std::string& fileType, const bool& isEB); - -void DrawSpreadGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB, - TGraphErrors* g_stat); - - - -void DrawPhiAvgICSpread(TH1F* h, const std::string& fileName, const std::string& fileType, const bool& isEB); - -void DrawAvgICVsPhiGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const Color_t& color, const bool& isEB); - -void DrawAvgICVsPhiFoldGraph(TGraphErrors* g, TGraphErrors* g2, const std::string& fileName, const std::string& fileType, const bool& isEB); - - - -void DrawResidualGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB); - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h deleted file mode 100644 index 14f6f7d099e..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB.h +++ /dev/null @@ -1,219 +0,0 @@ -////////////////////////////////////////////////////////// -// This class has been automatically generated on -// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b -// from TTree ntu/ntu -// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root -////////////////////////////////////////////////////////// - -#ifndef FastCalibratorEB_h -#define FastCalibratorEB_h - -#include -#include -#include -#include -#include -#include -#include -#include "EOverPCalibration/NtuplePackage/interface/hChain.h" -#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - -#include "../interface/CalibrationUtils.h" -#include "../../NtuplePackage/interface/readJSONFile.h" - -class FastCalibratorEB { - - public : - - ///! List of class methods - - FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution="NULL"); - - virtual ~FastCalibratorEB(); - - virtual void bookHistos(int); - - virtual void saveHistos(TFile *f1); - - virtual Int_t GetEntry(Long64_t entry); - - virtual Long64_t LoadTree(Long64_t entry); - - virtual void Init(TTree *tree); - - virtual void FillScalibMap (TString miscalibMap); - - virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,float,bool,float,bool,std::map > >, float, TString); - - virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool,float,bool,float,bool); - - virtual void saveEoPeta(TFile * f2); - - virtual void AcquireDeadXtal(TString imputDeadXtal, const bool & isDeadTriggerTower = false); - - virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); - - - // Public Variables - - std::vector myMomentumScale; - std::string myTypeEB; - - TTree *fChain; //!pointer to the analyzed TTree or TChain - Int_t fCurrent; //!current Tree number in a TChain - - ///! Declaration of leaf types - - Int_t runNumber; - Int_t lumiBlock; - Int_t eventNumber; - Int_t isW; - Int_t isZ; - - Int_t chargeEle[2]; - Float_t etaEle[2]; - Float_t PtEle[2]; - Float_t phiEle[2]; - Float_t rawEnergySCEle[2]; - Float_t energySCEle[2]; - Float_t etaSCEle[2]; - Float_t esEnergySCEle[2]; - Float_t e3x3SCEle[2]; - Float_t pAtVtxGsfEle[2]; - Float_t fbremEle[2]; - Int_t isEBEle[2]; - Float_t energyMCEle[2]; - Float_t etaMCEle[2]; - Float_t phiMCEle[2]; - - - ///! Ele 1 variables - - std::vector *energyRecHitSCEle1; - // std::vector *ele1_recHit_hashedIndex; - std::vector *XRecHitSCEle1; //ETA - std::vector *YRecHitSCEle1; //PHI - std::vector *ZRecHitSCEle1; - std::vector *recoFlagRecHitSCEle1; - - Int_t ele1_charge; - Float_t ele1_eta; - Float_t ele1_pt; - Float_t ele1_phi; - Float_t ele1_scERaw; - Float_t ele1_scE; - Float_t ele1_es; - Float_t ele1_e3x3; - Float_t ele1_tkP; - Float_t ele1_fbrem; - Int_t ele1_isEB; - Float_t ele1_E_true; - Float_t ele1_DR; - - ///! Ele 2 variables - - std::vector *energyRecHitSCEle2; - // std::vector *ele1_recHit_hashedIndex; - std::vector *XRecHitSCEle2; //ETA - std::vector *YRecHitSCEle2; //PHI - std::vector *ZRecHitSCEle2; - std::vector *recoFlagRecHitSCEle2; - - Int_t ele2_charge; - Float_t ele2_eta; - Float_t ele2_pt; - Float_t ele2_phi; - Float_t ele2_scERaw; - Float_t ele2_scE; - Float_t ele2_es; - Float_t ele2_e3x3; - Float_t ele2_tkP; - Float_t ele2_fbrem; - Int_t ele2_isEB; - Float_t ele2_E_true; - Float_t ele2_DR; - - ///! List of input branches from ntu - - TBranch *b_runNumber; //! - TBranch *b_lumiBlock; //! - TBranch *b_eventNumber; //! - TBranch *b_isW; //! - TBranch *b_isZ; //! - - TBranch *b_chargeEle; - TBranch *b_etaEle; - TBranch *b_PtEle; - TBranch *b_phiEle; - TBranch *b_rawEnergySCEle; - TBranch *b_energySCEle; - TBranch *b_etaSCEle; - TBranch *b_esEnergySCEle; - TBranch *b_e3x3SCEle; - TBranch *b_pAtVtxGsfEle; - TBranch *b_fbremEle; - TBranch *b_isEBEle; - TBranch *b_energyMCEle; - TBranch *b_etaMCEle; - TBranch *b_phiMCEle; - - TBranch *b_energyRecHitSCEle1; //! - TBranch *b_XRecHitSCEle1; - TBranch *b_YRecHitSCEle1; - TBranch *b_ZRecHitSCEle1; - TBranch *b_recoFlagRecHitSCEle1; - - TBranch *b_energyRecHitSCEle2; //! - TBranch *b_XRecHitSCEle2; - TBranch *b_YRecHitSCEle2; - TBranch *b_ZRecHitSCEle2; - TBranch *b_recoFlagRecHitSCEle2; - - - - ///! Output information - - std::vector IetaValues; - std::vector IphiValues; - std::vector ICValues; - std::vector meanICforPhiRingValues; - std::vector DeadXtal_HashedIndex; - - - hChain *hC_EoP_eta_ele; - hChain *hC_IntercalibValues; - hChain *hC_EoP; - hChain *hC_PullFromScalib; - h2Chain *hC_scale_EB; - TH1F *h_Occupancy_hashedIndex; - TH2F *h_occupancy; - TProfile *p_IntercalibValues_iEta; - TH2F *h_scalib_EB; - TH2F *h_scale_EB; - TH2F *h_scale_EB_meanOnPhi; - TH1F *h_scale_EB_hashedIndex; - TH1F *h_IntercalibSpread_iEta; - TH1F *h_IntercalibValues_test; - TH1F *h_Init_IntercalibValues; - - - TH2F *h_map_Dead_Channels ; - - TGraphErrors *g_ICmeanVsLoop; - TGraphErrors *g_ICrmsVsLoop; - - std::map scalibMap; - - private: - - TString outEPDistribution_p; - -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h deleted file mode 100644 index c1a9c1ecba4..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEB_MVA.h +++ /dev/null @@ -1,243 +0,0 @@ -////////////////////////////////////////////////////////// -// This class has been automatically generated on -// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b -// from TTree ntu/ntu -// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root -////////////////////////////////////////////////////////// - -#ifndef FastCalibratorEB_MVA_h -#define FastCalibratorEB_MVA_h - -#include -#include -#include -#include -#include -#include -#include "EOverPCalibration/NtuplePackage/interface/hChain.h" -#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - - -class FastCalibratorEB_MVA { - public : - TTree *fChain; //!pointer to the analyzed TTree or TChain - Int_t fCurrent; //!current Tree number in a TChain - - ///! Declaration of leaf types - - Int_t runId; - Int_t lumiId; - Int_t isW; - Int_t isZ; - - //! Declaration of regression weights - - Double_t BDTG_weightEB_W_1 ; - Double_t BDTG_weightEB_W_2 ; - Double_t BDTG_weightEB_Z_1 ; - Double_t BDTG_weightEB_Z_2 ; - - TBranch *b_BDTG_weightEB_W_1; - TBranch *b_BDTG_weightEB_W_2; - TBranch *b_BDTG_weightEB_Z_1; - TBranch *b_BDTG_weightEB_Z_2; - - ///! Ele 1 variables - - std::vector *ele1_recHit_E; - std::vector *ele1_recHit_hashedIndex; - std::vector *ele1_recHit_ietaORix; - std::vector *ele1_recHit_iphiORiy; - std::vector *ele1_recHit_flag; - - Float_t ele1_scERaw; - Float_t ele1_scE; - Float_t ele1_scEta; - Float_t ele1_es; - Float_t ele1_e3x3; - Float_t ele1_tkP; - Float_t ele1_fbrem; - Float_t ele1_EOverP; - Int_t ele1_isEB; - Int_t ele1_isEBEEGap; - Int_t ele1_isEBEtaGap; - Int_t ele1_isEBPhiGap; - Int_t ele1_isEEDeeGap; - Int_t ele1_isEERingGap; - Float_t ele1_E_true; - Float_t ele1_DR; - Float_t ele1_scE_regression; - Float_t ele1_scERaw_PUcleaned; - -// Float_t ele1_charge; - - ///! Ele 2 variables - - std::vector *ele2_recHit_E; - std::vector *ele2_recHit_hashedIndex; - std::vector *ele2_recHit_iphiORiy; - std::vector *ele2_recHit_ietaORix; - std::vector *ele2_recHit_flag; - - Float_t ele2_scERaw; - Float_t ele2_scE; - Float_t ele2_scEta; - Float_t ele2_es; - Float_t ele2_e3x3; - Float_t ele2_tkP; - Float_t ele2_fbrem; - Float_t ele2_EOverP; - Int_t ele2_isEB; - Int_t ele2_isEBEEGap; - Int_t ele2_isEBEtaGap; - Int_t ele2_isEBPhiGap; - Int_t ele2_isEEDeeGap; - Int_t ele2_isEERingGap; - Float_t ele2_E_true; - Float_t ele2_DR; - Float_t ele2_scE_regression; - Float_t ele2_scERaw_PUcleaned; - -// Float_t ele2_charge; - - ///! List of input branches from ntu - - TBranch *b_runId; //! - TBranch *b_lumiId; //! - TBranch *b_isW; //! - TBranch *b_isZ; //! - - TBranch *b_ele1_recHit_E; //! - TBranch *b_ele1_recHit_hashedIndex; - TBranch *b_ele1_recHit_iphiORiy; - TBranch *b_ele1_recHit_ietaORix; - TBranch *b_ele1_recHit_flag; - TBranch *b_ele1_scERaw_PUcleaned; - TBranch *b_ele1_scE_regression; - - TBranch *b_ele1_scERaw; //! - TBranch *b_ele1_scE; //! - TBranch *b_ele1_scEta; //! - TBranch *b_ele1_es; //! - TBranch *b_ele1_e3x3; //! - TBranch *b_ele1_tkP; //! - TBranch *b_ele1_fbrem; //! - TBranch *b_ele1_EOverP; //! - TBranch *b_ele1_isEB; //! - TBranch *b_ele1_E_true; //! - TBranch *b_ele1_DR; //! - TBranch *b_ele1_charge; //! - - TBranch *b_ele1_isEBEEGap; //! - TBranch *b_ele1_isEBEtaGap; //! - TBranch *b_ele1_isEBPhiGap; //! - TBranch *b_ele1_isEEDeeGap; //! - TBranch *b_ele1_isEERingGap; //! - - TBranch *b_ele2_recHit_E; //! - TBranch *b_ele2_recHit_hashedIndex; - TBranch *b_ele2_recHit_iphiORiy; - TBranch *b_ele2_recHit_ietaORix; //! - TBranch *b_ele2_recHit_flag; - TBranch *b_ele2_scERaw; //! - TBranch *b_ele2_scE; //! - TBranch *b_ele2_scEta; //! - TBranch *b_ele2_es; //! - TBranch *b_ele2_e3x3; //! - TBranch *b_ele2_tkP; //! - TBranch *b_ele2_fbrem; //! - TBranch *b_ele2_E_true; //! - TBranch *b_ele2_DR; //! - TBranch *b_ele2_charge; //! - - TBranch *b_ele2_scERaw_PUcleaned; - TBranch *b_ele2_scE_regression; - - TBranch *b_ele2_EOverP; //! - TBranch *b_ele2_isEB; //! - TBranch *b_ele2_isEBEEGap; //! - TBranch *b_ele2_isEBEtaGap; //! - TBranch *b_ele2_isEBPhiGap; //! - TBranch *b_ele2_isEEDeeGap; //! - TBranch *b_ele2_isEERingGap; //! - - ///! List of class methods - - FastCalibratorEB_MVA(TTree *tree=0, TString outEPDistribution="NULL"); - - virtual ~FastCalibratorEB_MVA(); - - virtual void bookHistos(int); - - virtual void saveHistos(TFile *f1); - - virtual Int_t Cut(Long64_t entry); - - virtual Int_t GetEntry(Long64_t entry); - - virtual Long64_t LoadTree(Long64_t entry); - - virtual void Init(TTree *tree); - - virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,bool); - - virtual Bool_t Notify(); - - virtual void Show(Long64_t entry = -1); - - virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,bool); - - virtual void BuildWeightDistribution_ele(int,int,int,int,std::vector,bool); - - virtual void saveEoPeta(TFile * f2); - - virtual void AcquireDeadXtal(TString imputDeadXtal); - - virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); - - ///! Output information - - std::vector IetaValues; - std::vector IphiValues; - std::vector ICValues; - std::vector meanICforPhiRingValues; - std::vector DeadXtal_HashedIndex; - - - hChain *hC_EoP_eta_ele; - hChain *hC_IntercalibValues; - hChain *hC_EoP; - hChain *hC_PullFromScalib; - h2Chain *hC_scale_EB; - TH1F *h_Occupancy_hashedIndex; - TH2F *h_occupancy; - TProfile *p_IntercalibValues_iEta; - TH2F *h_scalib_EB; - TH2F *h_scale_EB; - TH2F *h_scale_EB_meanOnPhi; - TH1F *h_scale_EB_hashedIndex; - TH1F *h_IntercalibSpread_iEta; - TH1F *h_IntercalibValues_test; - TH1F *h_Init_IntercalibValues; - TH1F *h_WeigthEB_W_1; - TH1F *h_WeigthEB_W_2; - - - TH2F *h_map_Dead_Channels ; - - TGraphErrors *g_ICmeanVsLoop; - TGraphErrors *g_ICrmsVsLoop; - - private: - - TString outEPDistribution_p; - -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h deleted file mode 100644 index 152c371fcd5..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE.h +++ /dev/null @@ -1,258 +0,0 @@ -////////////////////////////////////////////////////////// -// This class has been automatically generated on -// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b -// from TTree ntu/ntu -// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root -////////////////////////////////////////////////////////// - -#ifndef FastCalibratorEE_h -#define FastCalibratorEE_h - -#include -#include -#include -#include -#include -#include -#include -#include "../../NtuplePackage/interface/hChain.h" -#include "../../NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - -#include "../interface/CalibrationUtils.h" -#include "../../NtuplePackage/interface/readJSONFile.h" -#include "../interface/TEndcapRings.h" - -class FastCalibratorEE{ - - public : - - ///! Class methods - FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution="NULL"); - - virtual ~FastCalibratorEE(); - - virtual void bookHistos(int); - - virtual void saveHistos(TFile *f1); - - virtual Int_t GetEntry(Long64_t entry); - - virtual Long64_t LoadTree(Long64_t entry); - - virtual void Init(TTree *tree); - - virtual void FillScalibMap (TString miscalibMap); - - virtual void Loop(int, int, int, int, int, bool,bool,bool,bool,float,bool,float,bool,float,bool,std::map > >, float, TString); - virtual void BuildEoPeta_ele(int,int,int,int,std::vector ,bool,bool,float,bool,float,bool,float,bool); - - virtual void saveEoPeta(TFile * f2); - - virtual void AcquireDeadXtal(TString imputDeadXtal, const bool & isDeadTriggerTower = false); - - virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); - - - std::vector myMomentumScale; - std::string myTypeEE; - - TTree *fChain; //!pointer to the analyzed TTree or TChain - Int_t fCurrent; //!current Tree number in a TChain - - - ///! Declaration of leaf types - - Int_t runNumber; - Int_t lumiBlock; - Int_t eventNumber; - Int_t isW; - Int_t isZ; - - Int_t chargeEle[2]; - Float_t etaEle[2]; - Float_t PtEle[2]; - Float_t phiEle[2]; - Float_t rawEnergySCEle[2]; - Float_t energySCEle[2]; - Float_t etaSCEle[2]; - Float_t esEnergySCEle[2]; - Float_t e3x3SCEle[2]; - Float_t pAtVtxGsfEle[2]; - Float_t fbremEle[2]; - Int_t isEBEle[2]; - Float_t energyMCEle[2]; - Float_t etaMCEle[2]; - Float_t phiMCEle[2]; - - - ///! Ele 1 variables - - std::vector *energyRecHitSCEle1; - // std::vector *ele1_recHit_hashedIndex; - std::vector *XRecHitSCEle1; - std::vector *YRecHitSCEle1; - std::vector *ZRecHitSCEle1; - std::vector *recoFlagRecHitSCEle1; - - Int_t ele1_charge; - Float_t ele1_eta; - Float_t ele1_pt; - Float_t ele1_phi; - Float_t ele1_scERaw; - Float_t ele1_scE; - Float_t ele1_scEta; - Float_t ele1_es; - Float_t ele1_e3x3; - Float_t ele1_tkP; - Float_t ele1_fbrem; - Int_t ele1_isEB; - Float_t ele1_E_true; - Float_t ele1_DR; - - ///! Ele 2 variables - - std::vector *energyRecHitSCEle2; - // std::vector *ele1_recHit_hashedIndex; - std::vector *XRecHitSCEle2; - std::vector *YRecHitSCEle2; - std::vector *ZRecHitSCEle2; - std::vector *recoFlagRecHitSCEle2; - - Int_t ele2_charge; - Float_t ele2_eta; - Float_t ele2_pt; - Float_t ele2_phi; - Float_t ele2_scERaw; - Float_t ele2_scE; - Float_t ele2_scEta; - Float_t ele2_es; - Float_t ele2_e3x3; - Float_t ele2_tkP; - Float_t ele2_fbrem; - Int_t ele2_isEB; - Float_t ele2_E_true; - Float_t ele2_DR; - - - - - ///! List of input branches from ntu - - TBranch *b_runNumber; //! - TBranch *b_lumiBlock; //! - TBranch *b_eventNumber; //! - TBranch *b_isW; //! - TBranch *b_isZ; //! - - TBranch *b_chargeEle; - TBranch *b_etaEle; - TBranch *b_PtEle; - TBranch *b_phiEle; - TBranch *b_rawEnergySCEle; - TBranch *b_energySCEle; - TBranch *b_etaSCEle; - TBranch *b_esEnergySCEle; - TBranch *b_e3x3SCEle; - TBranch *b_pAtVtxGsfEle; - TBranch *b_fbremEle; - TBranch *b_isEBEle; - TBranch *b_energyMCEle; - TBranch *b_etaMCEle; - TBranch *b_phiMCEle; - - TBranch *b_energyRecHitSCEle1; //! - TBranch *b_XRecHitSCEle1; - TBranch *b_YRecHitSCEle1; - TBranch *b_ZRecHitSCEle1; - TBranch *b_recoFlagRecHitSCEle1; - - TBranch *b_energyRecHitSCEle2; //! - TBranch *b_XRecHitSCEle2; - TBranch *b_YRecHitSCEle2; - TBranch *b_ZRecHitSCEle2; - TBranch *b_recoFlagRecHitSCEle2; - - - /// Output informations - hChain *hC_EoP_ir_ele; - - TH1F *h_scale_hashedIndex_EE; - TH1F *h_occupancy_hashedIndex_EE; - hChain *hC_EoP; - - /// EE+ - hChain *hC_IntercalibValues_EEP; - hChain *hC_PullFromScalib_EEP; - h2Chain *hC_scale_EEP; - - - TH2F *h_occupancy_EEP; - TH2F *h_scale_EEP; - TH2F *h_scalib_EEP; - TH2F *h_scale_meanOnring_EEP; - - TGraphErrors *g_ICmeanVsLoop_EEP; - TGraphErrors *g_ICrmsVsLoop_EEP; - - std::vector IxValues_EEP; - std::vector IyValues_EEP; - std::vector ICValues_EEP; - - std::vector SumIC_Ring_EEP; - std::vector Sumxtal_Ring_EEP; - - - /// EE- - hChain *hC_IntercalibValues_EEM; - hChain *hC_PullFromScalib_EEM; - h2Chain *hC_scale_EEM; - - TH2F *h_occupancy_EEM; - TH2F *h_scale_EEM; - TH2F *h_scalib_EEM; - TH2F *h_scale_meanOnring_EEM; - - TGraphErrors *g_ICmeanVsLoop_EEM; - TGraphErrors *g_ICrmsVsLoop_EEM; - - std::vector IxValues_EEM; - std::vector IyValues_EEM; - std::vector ICValues_EEM; - - std::vector SumIC_Ring_EEM; - std::vector Sumxtal_Ring_EEM; - - /// Dead Channel infos - std::vector DeadXtal_HashedIndex; - - TH2F *h_map_Dead_Channels_EEP ; - TH2F *h_map_Dead_Channels_EEM ; - - std::map scalibMap; - - - private : - - TString outEPDistribution_p; - - /// Essential values to get EE geometry - TEndcapRings* eRings; - - static const int IX_MIN = 1; - static const int IY_MIN = 1; - static const int IX_MAX = 100; - static const int IY_MAX = 100; - static const int kEEhalf = 7324; - - static const int kxf[200]; - - static const int kdi[200]; -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h b/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h deleted file mode 100644 index 0642d321349..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/FastCalibratorEE_MVA.h +++ /dev/null @@ -1,277 +0,0 @@ -////////////////////////////////////////////////////////// -// This class has been automatically generated on -// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b -// from TTree ntu/ntu -// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root -////////////////////////////////////////////////////////// - -#ifndef FastCalibratorEE_h -#define FastCalibratorEE_h - -#include -#include -#include -#include -#include -#include -#include "../../NtuplePackage/interface/hChain.h" -#include "../../NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - -#include "../interface/TEndcapRings.h" - -class FastCalibratorEE_MVA { - public : - TTree *fChain; //!pointer to the analyzed TTree or TChain - Int_t fCurrent; //!current Tree number in a TChain - - ///! Declaration of leaf types - Int_t runId; - Int_t lumiId; - Int_t isW; - Int_t isZ; - - //! Declaration of regression weights - - Double_t BDTG_weightEE_W_1 ; - Double_t BDTG_weightEE_W_2 ; - Double_t BDTG_weightEE_Z_1 ; - Double_t BDTG_weightEE_Z_2 ; - - TBranch *b_BDTG_weightEE_W_1; - TBranch *b_BDTG_weightEE_W_2; - TBranch *b_BDTG_weightEE_Z_1; - TBranch *b_BDTG_weightEE_Z_2; - - ///! Ele1 Variables - - std::vector *ele1_recHit_E; - std::vector *ele1_recHit_hashedIndex; - std::vector *ele1_recHit_ietaORix; - std::vector *ele1_recHit_iphiORiy; - std::vector *ele1_recHit_flag; - - Float_t ele1_scERaw; - Float_t ele1_scE; - Float_t ele1_scEta; - Float_t ele1_es; - Float_t ele1_e3x3; - Float_t ele1_tkP; - Float_t ele1_fbrem; - Float_t ele1_EOverP; - Int_t ele1_isEB; - Int_t ele1_isEBEEGap; - Int_t ele1_isEBEtaGap; - Int_t ele1_isEBPhiGap; - Int_t ele1_isEEDeeGap; - Int_t ele1_isEERingGap; - Float_t ele1_E_true; - Float_t ele1_DR; - Float_t ele1_scE_regression; - Float_t ele1_scERaw_PUcleaned; - - ///! Ele1 Variables - - std::vector *ele2_recHit_E; - std::vector *ele2_recHit_hashedIndex; - std::vector *ele2_recHit_iphiORiy; - std::vector *ele2_recHit_ietaORix; - std::vector *ele2_recHit_flag; - - Float_t ele2_scERaw; - Float_t ele2_scE; - Float_t ele2_scEta; - Float_t ele2_es; - Float_t ele2_e3x3; - Float_t ele2_tkP; - Float_t ele2_fbrem; - Float_t ele2_EOverP; - Int_t ele2_isEB; - Int_t ele2_isEBEEGap; - Int_t ele2_isEBEtaGap; - Int_t ele2_isEBPhiGap; - Int_t ele2_isEEDeeGap; - Int_t ele2_isEERingGap; - Float_t ele2_E_true; - Float_t ele2_DR; - Float_t ele2_scE_regression; - Float_t ele2_scERaw_PUcleaned; - - - ///! List of input branches from ntu - - TBranch *b_runId; //! - TBranch *b_lumiId; //! - TBranch *b_isW; //! - TBranch *b_isZ; //! - TBranch *b_ele1_recHit_E; //! - TBranch *b_ele1_recHit_iphiORiy; - TBranch *b_ele1_recHit_ietaORix; - TBranch *b_ele1_recHit_hashedIndex; //! - TBranch *b_ele1_recHit_flag; - TBranch *b_ele1_scERaw; //! - TBranch *b_ele1_scE; //! - TBranch *b_ele1_scEta; //! - TBranch *b_ele1_es; //! - TBranch *b_ele1_E_true; //! - TBranch *b_ele1_DR; //! - TBranch *b_ele1_e3x3; //! - TBranch *b_ele1_tkP; //! - TBranch *b_ele1_fbrem; //! - TBranch *b_ele1_EOverP; //! - TBranch *b_ele1_isEB; //! - TBranch *b_ele1_scE_regression; - TBranch *b_ele1_scERaw_PUcleaned; - - TBranch *b_ele1_isEBEEGap; //! - TBranch *b_ele1_isEBEtaGap; //! - TBranch *b_ele1_isEBPhiGap; //! - TBranch *b_ele1_isEEDeeGap; //! - TBranch *b_ele1_isEERingGap; //! - - TBranch *b_ele2_recHit_E; //! - TBranch *b_ele2_recHit_hashedIndex; //! - TBranch *b_ele2_recHit_iphiORiy; - TBranch *b_ele2_recHit_ietaORix; //! - TBranch *b_ele2_recHit_flag; - TBranch *b_ele2_scERaw; //! - TBranch *b_ele2_scE; //! - TBranch *b_ele2_scEta; //! - TBranch *b_ele2_es; //! - TBranch *b_ele2_E_true; //! - TBranch *b_ele2_DR; //! - TBranch *b_ele2_e3x3; //! - TBranch *b_ele2_tkP; //! - TBranch *b_ele2_fbrem; //! - TBranch *b_ele2_EOverP; //! - TBranch *b_ele2_isEB; //! - TBranch *b_ele2_isEBEEGap; //! - TBranch *b_ele2_isEBEtaGap; //! - TBranch *b_ele2_isEBPhiGap; //! - TBranch *b_ele2_isEEDeeGap; //! - TBranch *b_ele2_isEERingGap; //! - TBranch *b_ele2_scE_regression; - TBranch *b_ele2_scERaw_PUcleaned; - - ///! Class methods - - FastCalibratorEE_MVA(TTree *tree=0, TString outEPDistribution="NULL"); - virtual ~FastCalibratorEE_MVA(); - - virtual void bookHistos(int); - - virtual void saveHistos(TFile *f1); - - virtual Int_t Cut(Long64_t entry); - - virtual Int_t GetEntry(Long64_t entry); - - virtual Long64_t LoadTree(Long64_t entry); - - virtual void Init(TTree *tree); - - virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,bool,bool); - - virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,bool,bool); - - virtual void BuildWeightDistribution_ele(int,int,int,int,std::vector,bool,bool); - - virtual Bool_t Notify(); - - virtual void Show(Long64_t entry = -1); - - virtual void saveEoPeta(TFile * f2); - - virtual void AcquireDeadXtal(TString imputDeadXtal); - - virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); - - /// Output informations - - hChain *hC_EoP_ir_ele; - - TH1F *h_scale_hashedIndex_EE; - TH1F *h_occupancy_hashedIndex_EE; - hChain *hC_EoP; - - TH1F *h_WeightEE_W_1; - TH1F *h_WeightEE_W_2; - - /// EE+ - - hChain *hC_IntercalibValues_EEP; - hChain *hC_PullFromScalib_EEP; - h2Chain *hC_scale_EEP; - - - TH2F *h_occupancy_EEP; - TH2F *h_scale_EEP; - TH2F *h_scalib_EEP; - TH2F *h_scale_meanOnring_EEP; - - TGraphErrors *g_ICmeanVsLoop_EEP; - TGraphErrors *g_ICrmsVsLoop_EEP; - - std::vector IxValues_EEP; - std::vector IyValues_EEP; - std::vector ICValues_EEP; - - std::vector SumIC_Ring_EEP; - std::vector Sumxtal_Ring_EEP; - - - /// EE- - - hChain *hC_IntercalibValues_EEM; - hChain *hC_PullFromScalib_EEM; - h2Chain *hC_scale_EEM; - - TH2F *h_occupancy_EEM; - TH2F *h_scale_EEM; - TH2F *h_scalib_EEM; - TH2F *h_scale_meanOnring_EEM; - - TGraphErrors *g_ICmeanVsLoop_EEM; - TGraphErrors *g_ICrmsVsLoop_EEM; - - std::vector IxValues_EEM; - std::vector IyValues_EEM; - std::vector ICValues_EEM; - - std::vector SumIC_Ring_EEM; - std::vector Sumxtal_Ring_EEM; - - /// Dead Channel infos - - std::vector DeadXtal_HashedIndex; - - TH2F *h_map_Dead_Channels_EEP ; - TH2F *h_map_Dead_Channels_EEM ; - - - - - - private : - - TString outEPDistribution_p; - - /// Essential values to get EE geometry - TEndcapRings* eRings; - static const int IX_MIN = 1; - static const int IY_MIN = 1; - static const int IX_MAX = 100; - static const int IY_MAX = 100; - static const int kEEhalf = 7324; - - static const int kxf[200]; - - static const int kdi[200]; -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h b/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h deleted file mode 100644 index a27733343f7..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEB.h +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "../../NtuplePackage/interface/hChain.h" -#include "../../NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - - - -int GetHashedIndexEB(int iEta, int iPhi, int Zside); - -int GetIetaFromHashedIndex(int Index); - -int GetIphiFromHashedIndex(int Index); diff --git a/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h b/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h deleted file mode 100644 index 94edb63c4d4..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/GetHashedIndexEE.h +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "../../NtuplePackage/interface/hChain.h" -#include "../../NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - -int GetHashedIndexEE(int, int, int); - -int GetIxFromHashedIndex(int); - -int GetIyFromHashedIndex(int); - -int GetZsideFromHashedIndex(int); - -// Essential values to get EE geometry -static const int IX_MIN = 1; -static const int IY_MIN = 1; -static const int IX_MAX = 100; -static const int IY_MAX = 100; -static const int kEEhalf = 7324; diff --git a/EOverPCalibration/FastCalibrator/interface/LinkDef.h b/EOverPCalibration/FastCalibrator/interface/LinkDef.h deleted file mode 100644 index 93670cf4402..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/LinkDef.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef ROOT_TREE_VECTOR_LINKDEFF_H -#define ROOT_TREE_VECTOR_LINKDEFF_H 1 - -#ifdef __CINT__ - -#endif - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list b/EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list deleted file mode 100644 index 871eebe25a0..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/SIC_ixiyiz.list +++ /dev/null @@ -1,1546 +0,0 @@ -4 36 -1 -4 37 -1 -4 38 -1 -4 39 -1 -4 40 -1 -4 61 -1 -4 62 -1 -4 63 -1 -4 64 -1 -4 65 -1 -5 36 -1 -5 37 -1 -5 38 -1 -5 39 -1 -5 40 -1 -5 61 -1 -5 62 -1 -5 63 -1 -5 64 -1 -5 65 -1 -6 26 -1 -6 27 -1 -6 28 -1 -6 29 -1 -6 30 -1 -7 27 -1 -7 28 -1 -7 29 -1 -7 30 -1 -8 26 -1 -8 27 -1 -8 28 -1 -8 29 -1 -8 30 -1 -9 21 -1 -9 22 -1 -9 23 -1 -9 24 -1 -9 25 -1 -9 26 -1 -9 27 -1 -9 28 -1 -9 29 -1 -9 30 -1 -9 76 -1 -9 77 -1 -9 78 -1 -9 79 -1 -10 21 -1 -10 22 -1 -10 23 -1 -10 24 -1 -10 25 -1 -10 26 -1 -10 27 -1 -10 28 -1 -10 29 -1 -10 30 -1 -10 76 -1 -10 77 -1 -10 78 -1 -10 79 -1 -10 80 -1 -11 21 -1 -11 22 -1 -11 23 -1 -11 24 -1 -11 25 -1 -12 21 -1 -12 22 -1 -12 23 -1 -12 24 -1 -12 25 -1 -13 21 -1 -13 22 -1 -13 23 -1 -13 24 -1 -13 25 -1 -14 16 -1 -14 17 -1 -14 18 -1 -14 19 -1 -14 20 -1 -14 21 -1 -14 22 -1 -14 23 -1 -14 24 -1 -14 25 -1 -14 81 -1 -14 82 -1 -14 83 -1 -14 84 -1 -14 85 -1 -15 16 -1 -15 17 -1 -15 18 -1 -15 19 -1 -15 20 -1 -15 21 -1 -15 22 -1 -15 23 -1 -15 24 -1 -15 25 -1 -15 81 -1 -15 82 -1 -15 83 -1 -15 84 -1 -15 85 -1 -16 14 -1 -16 15 -1 -16 51 -1 -16 52 -1 -16 53 -1 -16 54 -1 -16 55 -1 -16 56 -1 -16 57 -1 -16 58 -1 -16 59 -1 -16 60 -1 -16 61 -1 -16 62 -1 -16 63 -1 -16 64 -1 -16 65 -1 -16 66 -1 -16 67 -1 -16 68 -1 -16 69 -1 -16 70 -1 -16 86 -1 -16 87 -1 -17 14 -1 -17 15 -1 -17 51 -1 -17 52 -1 -17 53 -1 -17 54 -1 -17 55 -1 -17 56 -1 -17 57 -1 -17 58 -1 -17 59 -1 -17 60 -1 -17 61 -1 -17 62 -1 -17 63 -1 -17 64 -1 -17 65 -1 -17 66 -1 -17 67 -1 -17 68 -1 -17 69 -1 -17 70 -1 -17 86 -1 -17 87 -1 -18 14 -1 -18 15 -1 -18 51 -1 -18 52 -1 -18 53 -1 -18 54 -1 -18 55 -1 -18 56 -1 -18 57 -1 -18 58 -1 -18 59 -1 -18 60 -1 -18 61 -1 -18 62 -1 -18 63 -1 -18 64 -1 -18 65 -1 -18 86 -1 -18 87 -1 -19 14 -1 -19 15 -1 -19 51 -1 -19 52 -1 -19 53 -1 -19 54 -1 -19 55 -1 -19 56 -1 -19 57 -1 -19 58 -1 -19 59 -1 -19 60 -1 -19 61 -1 -19 62 -1 -19 63 -1 -19 64 -1 -19 65 -1 -19 66 -1 -19 67 -1 -19 68 -1 -19 69 -1 -19 70 -1 -19 86 -1 -19 87 -1 -20 14 -1 -20 15 -1 -20 51 -1 -20 52 -1 -20 53 -1 -20 54 -1 -20 55 -1 -20 56 -1 -20 57 -1 -20 58 -1 -20 59 -1 -20 60 -1 -20 61 -1 -20 62 -1 -20 63 -1 -20 64 -1 -20 65 -1 -20 66 -1 -20 67 -1 -20 68 -1 -20 69 -1 -20 70 -1 -20 86 -1 -20 87 -1 -21 10 -1 -21 51 -1 -21 52 -1 -21 53 -1 -21 54 -1 -21 55 -1 -21 56 -1 -21 57 -1 -21 58 -1 -21 59 -1 -21 60 -1 -21 61 -1 -21 62 -1 -21 63 -1 -21 64 -1 -21 65 -1 -22 9 -1 -22 10 -1 -22 51 -1 -22 52 -1 -22 53 -1 -22 54 -1 -22 55 -1 -22 56 -1 -22 57 -1 -22 58 -1 -22 59 -1 -22 60 -1 -22 61 -1 -22 62 -1 -22 63 -1 -22 64 -1 -22 65 -1 -23 9 -1 -23 10 -1 -23 51 -1 -23 52 -1 -23 53 -1 -23 54 -1 -23 55 -1 -23 56 -1 -23 57 -1 -23 58 -1 -23 59 -1 -23 60 -1 -23 61 -1 -23 62 -1 -23 63 -1 -23 64 -1 -23 65 -1 -23 66 -1 -23 67 -1 -23 68 -1 -23 69 -1 -23 70 -1 -24 9 -1 -24 10 -1 -24 51 -1 -24 52 -1 -24 53 -1 -24 54 -1 -24 55 -1 -24 56 -1 -24 57 -1 -24 58 -1 -24 59 -1 -24 60 -1 -24 61 -1 -24 62 -1 -24 63 -1 -24 64 -1 -24 65 -1 -24 66 -1 -24 67 -1 -24 68 -1 -24 69 -1 -24 70 -1 -25 9 -1 -25 10 -1 -25 51 -1 -25 52 -1 -25 53 -1 -25 54 -1 -25 55 -1 -25 56 -1 -25 57 -1 -25 58 -1 -25 59 -1 -25 60 -1 -25 61 -1 -25 62 -1 -25 63 -1 -25 64 -1 -25 65 -1 -25 66 -1 -25 67 -1 -25 68 -1 -25 69 -1 -25 70 -1 -26 7 -1 -26 8 -1 -26 9 -1 -26 10 -1 -26 71 -1 -26 72 -1 -26 73 -1 -26 74 -1 -26 75 -1 -27 6 -1 -27 7 -1 -27 8 -1 -27 9 -1 -27 10 -1 -27 71 -1 -27 72 -1 -28 6 -1 -28 7 -1 -28 8 -1 -28 9 -1 -28 10 -1 -28 71 -1 -28 72 -1 -28 73 -1 -28 74 -1 -28 75 -1 -29 6 -1 -29 7 -1 -29 8 -1 -29 9 -1 -29 10 -1 -29 71 -1 -29 72 -1 -29 73 -1 -29 74 -1 -29 75 -1 -30 6 -1 -30 7 -1 -30 8 -1 -30 9 -1 -30 10 -1 -30 71 -1 -30 72 -1 -30 73 -1 -30 74 -1 -30 75 -1 -31 46 -1 -31 47 -1 -31 48 -1 -31 49 -1 -31 50 -1 -32 46 -1 -32 47 -1 -32 48 -1 -32 49 -1 -32 50 -1 -33 46 -1 -33 47 -1 -33 48 -1 -33 49 -1 -33 50 -1 -34 46 -1 -36 36 -1 -36 37 -1 -36 38 -1 -36 39 -1 -36 40 -1 -36 61 -1 -36 62 -1 -36 63 -1 -36 64 -1 -36 65 -1 -37 36 -1 -37 37 -1 -37 38 -1 -37 39 -1 -37 62 -1 -37 63 -1 -37 64 -1 -37 65 -1 -38 36 -1 -38 37 -1 -38 38 -1 -38 63 -1 -38 64 -1 -38 65 -1 -39 36 -1 -39 37 -1 -39 64 -1 -39 65 -1 -40 36 -1 -40 65 -1 -41 36 -1 -51 1 -1 -51 3 -1 -51 4 -1 -51 5 -1 -51 31 -1 -51 32 -1 -51 33 -1 -51 69 -1 -51 70 -1 -52 1 -1 -52 2 -1 -52 3 -1 -52 4 -1 -52 5 -1 -52 31 -1 -52 32 -1 -52 33 -1 -52 69 -1 -52 70 -1 -53 1 -1 -53 2 -1 -53 3 -1 -53 4 -1 -53 5 -1 -53 31 -1 -53 32 -1 -53 33 -1 -53 68 -1 -53 69 -1 -53 70 -1 -54 1 -1 -54 2 -1 -54 3 -1 -54 4 -1 -54 5 -1 -54 31 -1 -54 32 -1 -54 33 -1 -54 68 -1 -54 69 -1 -54 70 -1 -55 1 -1 -55 2 -1 -55 3 -1 -55 4 -1 -55 5 -1 -55 31 -1 -55 32 -1 -55 33 -1 -55 34 -1 -55 68 -1 -55 69 -1 -55 70 -1 -60 36 -1 -61 4 -1 -61 5 -1 -61 36 -1 -61 65 -1 -61 96 -1 -61 97 -1 -62 4 -1 -62 5 -1 -62 36 -1 -62 37 -1 -62 64 -1 -62 65 -1 -62 96 -1 -62 97 -1 -63 4 -1 -63 5 -1 -63 36 -1 -63 37 -1 -63 38 -1 -63 64 -1 -63 65 -1 -63 96 -1 -63 97 -1 -64 4 -1 -64 5 -1 -64 36 -1 -64 37 -1 -64 38 -1 -64 39 -1 -64 63 -1 -64 64 -1 -64 65 -1 -64 96 -1 -64 97 -1 -65 4 -1 -65 5 -1 -65 36 -1 -65 37 -1 -65 38 -1 -65 39 -1 -65 40 -1 -65 61 -1 -65 62 -1 -65 63 -1 -65 64 -1 -65 65 -1 -65 96 -1 -65 97 -1 -66 91 -1 -66 92 -1 -66 93 -1 -66 94 -1 -66 95 -1 -67 91 -1 -67 92 -1 -67 93 -1 -67 94 -1 -67 95 -1 -68 46 -1 -68 47 -1 -68 48 -1 -68 49 -1 -68 53 -1 -68 54 -1 -68 55 -1 -68 91 -1 -68 92 -1 -68 93 -1 -68 94 -1 -68 95 -1 -69 46 -1 -69 47 -1 -69 48 -1 -69 49 -1 -69 50 -1 -69 51 -1 -69 52 -1 -69 53 -1 -69 54 -1 -69 55 -1 -69 91 -1 -69 92 -1 -69 93 -1 -69 94 -1 -69 95 -1 -70 46 -1 -70 47 -1 -70 48 -1 -70 49 -1 -70 50 -1 -70 51 -1 -70 52 -1 -70 53 -1 -70 54 -1 -70 55 -1 -70 91 -1 -70 92 -1 -70 93 -1 -70 94 -1 -70 95 -1 -71 6 -1 -71 7 -1 -71 8 -1 -71 9 -1 -71 10 -1 -71 91 -1 -71 92 -1 -71 93 -1 -71 94 -1 -71 95 -1 -72 6 -1 -72 7 -1 -72 8 -1 -72 9 -1 -72 10 -1 -72 91 -1 -72 92 -1 -72 93 -1 -72 94 -1 -72 95 -1 -73 6 -1 -73 7 -1 -73 8 -1 -73 9 -1 -73 10 -1 -73 91 -1 -73 92 -1 -73 93 -1 -73 94 -1 -73 95 -1 -74 6 -1 -74 7 -1 -74 8 -1 -74 9 -1 -74 10 -1 -74 91 -1 -74 92 -1 -74 93 -1 -74 94 -1 -74 95 -1 -75 6 -1 -75 7 -1 -75 8 -1 -75 9 -1 -75 10 -1 -75 91 -1 -75 92 -1 -75 93 -1 -75 94 -1 -76 9 -1 -76 10 -1 -76 11 -1 -76 12 -1 -76 13 -1 -76 14 -1 -76 15 -1 -76 91 -1 -76 92 -1 -77 9 -1 -77 10 -1 -77 11 -1 -77 12 -1 -77 13 -1 -77 14 -1 -77 15 -1 -77 91 -1 -77 92 -1 -78 9 -1 -78 10 -1 -78 11 -1 -78 12 -1 -78 13 -1 -78 14 -1 -78 15 -1 -78 91 -1 -78 92 -1 -79 9 -1 -79 10 -1 -79 11 -1 -79 12 -1 -79 13 -1 -79 14 -1 -79 15 -1 -79 91 -1 -79 92 -1 -80 9 -1 -80 10 -1 -80 11 -1 -80 12 -1 -80 13 -1 -80 14 -1 -80 15 -1 -80 91 -1 -81 14 -1 -81 15 -1 -81 86 -1 -81 87 -1 -82 14 -1 -82 15 -1 -82 86 -1 -82 87 -1 -83 14 -1 -83 15 -1 -83 86 -1 -83 87 -1 -84 14 -1 -84 15 -1 -84 86 -1 -84 87 -1 -85 14 -1 -85 15 -1 -85 86 -1 -86 16 -1 -86 17 -1 -86 18 -1 -86 19 -1 -86 20 -1 -86 21 -1 -86 22 -1 -86 23 -1 -86 24 -1 -86 25 -1 -86 81 -1 -86 82 -1 -86 83 -1 -86 84 -1 -86 85 -1 -87 17 -1 -87 18 -1 -87 19 -1 -87 20 -1 -87 21 -1 -87 22 -1 -87 23 -1 -87 24 -1 -87 25 -1 -87 81 -1 -87 82 -1 -87 83 -1 -87 84 -1 -87 85 -1 -88 21 -1 -88 22 -1 -88 23 -1 -88 24 -1 -88 25 -1 -89 21 -1 -89 22 -1 -89 23 -1 -89 24 -1 -89 25 -1 -90 21 -1 -90 22 -1 -90 23 -1 -90 24 -1 -90 25 -1 -91 21 -1 -91 22 -1 -91 23 -1 -91 24 -1 -91 25 -1 -91 26 -1 -91 27 -1 -91 28 -1 -91 29 -1 -91 30 -1 -91 66 -1 -91 67 -1 -91 68 -1 -91 69 -1 -91 70 -1 -91 71 -1 -91 72 -1 -91 73 -1 -91 74 -1 -91 75 -1 -91 76 -1 -91 77 -1 -91 78 -1 -91 79 -1 -91 80 -1 -92 22 -1 -92 23 -1 -92 24 -1 -92 25 -1 -92 26 -1 -92 27 -1 -92 28 -1 -92 29 -1 -92 30 -1 -92 66 -1 -92 67 -1 -92 68 -1 -92 69 -1 -92 70 -1 -92 71 -1 -92 72 -1 -92 73 -1 -92 74 -1 -92 75 -1 -92 76 -1 -92 77 -1 -92 78 -1 -92 79 -1 -93 26 -1 -93 27 -1 -93 28 -1 -93 29 -1 -93 30 -1 -93 66 -1 -93 67 -1 -93 68 -1 -93 69 -1 -93 70 -1 -93 71 -1 -93 72 -1 -93 73 -1 -93 74 -1 -93 75 -1 -94 27 -1 -94 28 -1 -94 29 -1 -94 30 -1 -94 66 -1 -94 67 -1 -94 68 -1 -94 69 -1 -94 70 -1 -94 71 -1 -94 72 -1 -94 73 -1 -94 74 -1 -95 27 -1 -95 28 -1 -95 29 -1 -95 30 -1 -95 66 -1 -95 67 -1 -95 68 -1 -95 69 -1 -95 70 -1 -95 71 -1 -95 72 -1 -95 73 -1 -95 74 -1 -96 36 -1 -96 37 -1 -96 38 -1 -96 39 -1 -96 40 -1 -96 41 -1 -96 42 -1 -96 43 -1 -96 44 -1 -96 45 -1 -96 56 -1 -96 57 -1 -96 58 -1 -96 59 -1 -96 60 -1 -96 61 -1 -96 62 -1 -96 63 -1 -96 64 -1 -96 65 -1 -97 36 -1 -97 37 -1 -97 38 -1 -97 39 -1 -97 40 -1 -97 41 -1 -97 42 -1 -97 43 -1 -97 44 -1 -97 45 -1 -97 56 -1 -97 57 -1 -97 58 -1 -97 59 -1 -97 60 -1 -97 61 -1 -97 62 -1 -97 63 -1 -97 64 -1 -97 65 -1 -98 41 -1 -98 42 -1 -98 43 -1 -98 44 -1 -98 45 -1 -98 56 -1 -98 57 -1 -98 58 -1 -98 59 -1 -98 60 -1 -99 41 -1 -99 42 -1 -99 43 -1 -99 44 -1 -99 45 -1 -99 54 -1 -99 57 -1 -99 58 -1 -99 59 -1 -99 60 -1 -100 41 -1 -100 42 -1 -100 43 -1 -100 44 -1 -100 45 -1 -100 56 -1 -100 57 -1 -100 58 -1 -100 59 -1 -100 60 -1 -4 37 1 -4 38 1 -4 39 1 -4 40 1 -4 61 1 -4 62 1 -4 63 1 -4 64 1 -4 65 1 -5 36 1 -5 37 1 -5 38 1 -5 39 1 -5 40 1 -5 61 1 -5 62 1 -5 63 1 -5 64 1 -5 65 1 -6 28 1 -6 29 1 -6 30 1 -6 71 1 -6 72 1 -6 74 1 -7 26 1 -7 27 1 -7 28 1 -7 29 1 -7 30 1 -7 71 1 -7 72 1 -7 73 1 -7 74 1 -7 75 1 -8 26 1 -8 27 1 -8 28 1 -8 29 1 -8 30 1 -8 71 1 -8 72 1 -8 73 1 -8 74 1 -8 75 1 -9 22 1 -9 23 1 -9 24 1 -9 25 1 -9 26 1 -9 27 1 -9 28 1 -9 29 1 -9 30 1 -9 71 1 -9 72 1 -9 73 1 -9 74 1 -9 75 1 -10 26 1 -10 27 1 -10 28 1 -10 29 1 -10 30 1 -10 73 1 -10 74 1 -10 75 1 -14 17 1 -14 18 1 -14 19 1 -14 20 1 -14 81 1 -14 82 1 -14 83 1 -14 84 1 -15 81 1 -15 82 1 -15 83 1 -15 84 1 -15 85 1 -16 81 1 -16 82 1 -16 83 1 -16 84 1 -16 85 1 -16 86 1 -16 87 1 -17 81 1 -17 82 1 -17 83 1 -17 84 1 -17 85 1 -17 86 1 -17 87 1 -18 81 1 -18 82 1 -18 83 1 -18 84 1 -18 85 1 -18 86 1 -18 87 1 -19 81 1 -19 82 1 -19 83 1 -19 84 1 -19 85 1 -19 86 1 -19 87 1 -20 81 1 -20 82 1 -20 83 1 -20 84 1 -20 85 1 -20 86 1 -20 87 1 -21 91 1 -22 91 1 -22 92 1 -23 91 1 -23 92 1 -24 91 1 -24 92 1 -25 91 1 -25 92 1 -26 7 1 -26 8 1 -26 9 1 -26 10 1 -26 91 1 -26 92 1 -26 93 1 -26 94 1 -27 6 1 -27 7 1 -27 8 1 -27 9 1 -27 10 1 -27 91 1 -27 92 1 -27 93 1 -27 94 1 -27 95 1 -28 6 1 -28 7 1 -28 8 1 -28 9 1 -28 10 1 -28 91 1 -28 92 1 -28 93 1 -28 94 1 -28 95 1 -29 6 1 -29 7 1 -29 8 1 -29 9 1 -29 10 1 -29 91 1 -29 92 1 -29 93 1 -29 94 1 -29 95 1 -30 6 1 -30 7 1 -30 8 1 -30 9 1 -30 10 1 -30 91 1 -30 92 1 -30 94 1 -30 95 1 -31 46 1 -31 47 1 -31 48 1 -31 49 1 -31 50 1 -31 51 1 -31 52 1 -31 53 1 -31 54 1 -31 55 1 -32 46 1 -32 47 1 -32 48 1 -32 49 1 -32 50 1 -32 51 1 -32 52 1 -32 53 1 -32 54 1 -32 55 1 -33 46 1 -33 47 1 -33 53 1 -33 54 1 -33 55 1 -36 36 1 -36 37 1 -36 38 1 -36 39 1 -36 40 1 -36 61 1 -36 62 1 -36 63 1 -36 64 1 -36 65 1 -36 96 1 -37 36 1 -37 37 1 -37 38 1 -37 39 1 -37 62 1 -37 63 1 -37 64 1 -37 65 1 -37 96 1 -37 97 1 -38 36 1 -38 37 1 -38 38 1 -38 63 1 -38 64 1 -38 65 1 -38 96 1 -38 97 1 -39 36 1 -39 37 1 -39 64 1 -39 65 1 -39 96 1 -39 97 1 -40 36 1 -40 65 1 -40 96 1 -40 97 1 -46 31 1 -46 32 1 -46 33 1 -46 68 1 -46 69 1 -46 70 1 -47 31 1 -47 32 1 -47 33 1 -47 68 1 -47 69 1 -47 70 1 -48 31 1 -48 32 1 -48 33 1 -48 68 1 -48 69 1 -48 70 1 -49 31 1 -49 32 1 -49 33 1 -49 69 1 -49 70 1 -50 31 1 -50 32 1 -50 33 1 -50 69 1 -50 70 1 -51 31 1 -51 32 1 -51 33 1 -51 69 1 -51 70 1 -51 96 1 -51 97 1 -51 98 1 -51 99 1 -51 100 1 -52 31 1 -52 32 1 -52 33 1 -52 69 1 -52 70 1 -52 96 1 -52 97 1 -52 98 1 -52 99 1 -52 100 1 -53 31 1 -53 32 1 -53 33 1 -53 68 1 -53 69 1 -53 70 1 -53 96 1 -53 97 1 -53 98 1 -53 99 1 -53 100 1 -54 31 1 -54 32 1 -54 33 1 -54 68 1 -54 69 1 -54 70 1 -54 96 1 -54 97 1 -54 98 1 -54 99 1 -54 100 1 -55 31 1 -55 32 1 -55 33 1 -55 34 1 -55 68 1 -55 69 1 -55 70 1 -55 96 1 -55 97 1 -55 98 1 -55 99 1 -55 100 1 -60 36 1 -61 4 1 -61 5 1 -61 36 1 -61 65 1 -61 96 1 -61 97 1 -62 4 1 -62 5 1 -62 36 1 -62 37 1 -62 64 1 -62 65 1 -62 96 1 -62 97 1 -63 4 1 -63 5 1 -63 36 1 -63 37 1 -63 38 1 -63 63 1 -63 64 1 -63 65 1 -63 96 1 -63 97 1 -64 4 1 -64 5 1 -64 36 1 -64 37 1 -64 38 1 -64 39 1 -64 62 1 -64 63 1 -64 64 1 -64 65 1 -64 96 1 -65 4 1 -65 5 1 -65 36 1 -65 37 1 -65 38 1 -65 39 1 -65 40 1 -65 61 1 -65 62 1 -65 63 1 -65 64 1 -65 65 1 -65 96 1 -66 91 1 -66 92 1 -66 93 1 -66 94 1 -66 95 1 -67 46 1 -67 91 1 -67 92 1 -67 93 1 -67 94 1 -67 95 1 -68 46 1 -68 47 1 -68 48 1 -68 49 1 -68 50 1 -68 51 1 -68 52 1 -68 53 1 -68 54 1 -68 55 1 -68 91 1 -68 92 1 -68 93 1 -68 94 1 -68 95 1 -69 46 1 -69 47 1 -69 48 1 -69 49 1 -69 50 1 -69 51 1 -69 52 1 -69 53 1 -69 54 1 -69 55 1 -69 91 1 -69 92 1 -69 93 1 -69 94 1 -69 95 1 -70 46 1 -70 47 1 -70 48 1 -70 49 1 -70 50 1 -70 51 1 -70 52 1 -70 53 1 -70 54 1 -70 55 1 -70 91 1 -70 92 1 -70 93 1 -70 94 1 -70 95 1 -71 6 1 -71 7 1 -71 8 1 -71 9 1 -71 10 1 -71 91 1 -71 92 1 -71 93 1 -71 94 1 -71 95 1 -72 6 1 -72 7 1 -72 8 1 -72 9 1 -72 10 1 -72 91 1 -72 92 1 -72 93 1 -72 94 1 -72 95 1 -73 7 1 -73 8 1 -73 9 1 -73 10 1 -73 91 1 -73 92 1 -73 93 1 -73 94 1 -73 95 1 -74 6 1 -74 7 1 -74 8 1 -74 9 1 -74 10 1 -74 91 1 -74 92 1 -74 93 1 -74 94 1 -74 95 1 -75 7 1 -75 8 1 -75 9 1 -75 10 1 -75 91 1 -75 92 1 -75 93 1 -75 94 1 -75 95 1 -76 9 1 -76 10 1 -76 91 1 -76 92 1 -77 9 1 -77 10 1 -77 91 1 -77 92 1 -78 9 1 -78 10 1 -78 91 1 -78 92 1 -79 9 1 -79 10 1 -79 91 1 -79 92 1 -80 10 1 -80 91 1 -81 14 1 -81 15 1 -81 16 1 -81 17 1 -81 18 1 -81 19 1 -81 20 1 -81 81 1 -81 82 1 -81 83 1 -81 84 1 -81 85 1 -81 86 1 -81 87 1 -82 14 1 -82 15 1 -82 16 1 -82 17 1 -82 18 1 -82 19 1 -82 20 1 -82 81 1 -82 82 1 -82 83 1 -82 84 1 -82 85 1 -82 86 1 -82 87 1 -83 14 1 -83 15 1 -83 16 1 -83 17 1 -83 18 1 -83 19 1 -83 20 1 -83 81 1 -83 82 1 -83 83 1 -83 84 1 -83 85 1 -83 86 1 -83 87 1 -84 14 1 -84 15 1 -84 16 1 -84 17 1 -84 18 1 -84 19 1 -84 20 1 -84 81 1 -84 82 1 -84 83 1 -84 84 1 -84 85 1 -84 86 1 -84 87 1 -85 14 1 -85 15 1 -85 16 1 -85 17 1 -85 18 1 -85 19 1 -85 20 1 -85 81 1 -85 82 1 -85 83 1 -85 84 1 -85 85 1 -85 86 1 -85 87 1 -86 81 1 -86 82 1 -86 83 1 -86 84 1 -86 85 1 -87 81 1 -87 82 1 -87 83 1 -87 84 1 -91 26 1 -91 27 1 -91 28 1 -91 29 1 -91 30 1 -91 32 1 -91 33 1 -91 34 1 -91 35 1 -91 66 1 -91 67 1 -91 68 1 -91 69 1 -91 70 1 -91 71 1 -91 72 1 -91 73 1 -91 74 1 -91 75 1 -92 26 1 -92 27 1 -92 28 1 -92 29 1 -92 30 1 -92 31 1 -92 32 1 -92 33 1 -92 34 1 -92 35 1 -92 68 1 -92 69 1 -92 70 1 -92 71 1 -92 72 1 -92 73 1 -92 74 1 -92 75 1 -93 26 1 -93 27 1 -93 28 1 -93 29 1 -93 30 1 -93 31 1 -93 32 1 -93 33 1 -93 34 1 -93 35 1 -93 66 1 -93 67 1 -93 68 1 -93 69 1 -93 70 1 -93 71 1 -93 72 1 -93 73 1 -93 74 1 -93 75 1 -94 26 1 -94 27 1 -94 28 1 -94 29 1 -94 30 1 -94 31 1 -94 32 1 -94 33 1 -94 34 1 -94 35 1 -94 66 1 -94 67 1 -94 68 1 -94 69 1 -94 70 1 -94 71 1 -94 72 1 -94 73 1 -94 74 1 -94 75 1 -95 28 1 -95 29 1 -95 30 1 -95 31 1 -95 32 1 -95 33 1 -95 34 1 -95 35 1 -95 66 1 -95 67 1 -95 68 1 -95 69 1 -95 70 1 -95 71 1 -95 72 1 -95 73 1 -95 74 1 -96 38 1 diff --git a/EOverPCalibration/FastCalibrator/interface/TEndcapRings.h b/EOverPCalibration/FastCalibrator/interface/TEndcapRings.h deleted file mode 100644 index 1c3915d8fb8..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/TEndcapRings.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef TEndcapRings_h -#define TEndcapRings_h - -#include "TROOT.h" -#include "TStyle.h" -#include "TFile.h" -#include "TF1.h" -#include "TH1.h" -#include "TCanvas.h" -#include "TGraphErrors.h" -#include "TPaveStats.h" -#include "TLegend.h" -#include "TTree.h" -#include "TVirtualFitter.h" -#include "TFitResultPtr.h" -#include "TFitResult.h" -#include "TChain.h" -#include "TMath.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class TEndcapRings -{ - private: - int iEndcapRing[101][101][2]; - - public: - - // ctor - TEndcapRings(); - - // dtor - ~TEndcapRings(); - - int GetEndcapRing(int,int,int); - int GetEndcapIeta(int,int,int); - int GetEndcapIphi(int,int,int); - // ClassDef(TEndcapRings,1); //ring class -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/TSicCrystals.h b/EOverPCalibration/FastCalibrator/interface/TSicCrystals.h deleted file mode 100644 index a37e7a26fe2..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/TSicCrystals.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef TSicCrystals_h -#define TSicCrystals_h - -#include "TROOT.h" -#include "TStyle.h" -#include "TFile.h" -#include "TF1.h" -#include "TH1.h" -#include "TH2.h" -#include "TCanvas.h" -#include "TGraphAsymmErrors.h" -#include "TMultiGraph.h" -#include "TPaveStats.h" -#include "TLegend.h" -#include "TTree.h" -#include "TVirtualFitter.h" -#include "TStyle.h" -#include "TApplication.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/// SIC Crystals MAP /// -class TSicCrystals { - private: - int sicMap[100][100][3]; - public: - TSicCrystals(); - virtual ~TSicCrystals(); - int isSic(Int_t,Int_t,Int_t); -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h b/EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h deleted file mode 100644 index a7c228ac5b7..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/XtalAlphaEB.h +++ /dev/null @@ -1,251 +0,0 @@ -////////////////////////////////////////////////////////// -// This class has been automatically generated on -// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b -// from TTree ntu/ntu -// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root -////////////////////////////////////////////////////////// - -#ifndef XtalAlphaEB_h -#define XtalAlphaEB_h - -#include -#include -#include -#include -#include -#include -#include "EOverPCalibration/NtuplePackage/interface/hChain.h" -#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - -#include "../interface/CalibrationUtils.h" -#include "EOverPCalibration/NtuplePackage/interface/readJSONFile.h" - -class XtalAlphaEB { - - public : - - std::vector myMomentumScale; - std::string myTypeEB; - - TTree *fChain; //!pointer to the analyzed TTree or TChain - Int_t fCurrent; //!current Tree number in a TChain - - ///! Declaration of leaf types - - Int_t runId; - Int_t lumiId; - Int_t eventId; - Int_t isW; - Int_t isZ; - - ///! Ele 1 variables - - std::vector *ele1_recHit_E; - std::vector *ele1_recHit_hashedIndex; - std::vector *ele1_recHit_ietaORix; - std::vector *ele1_recHit_iphiORiy; - std::vector *ele1_recHit_flag; - std::vector *ele1_recHit_LaserCorr; - std::vector *ele1_recHit_Alpha; - - Float_t ele1_charge; - Float_t ele1_eta; - Float_t ele1_phi; - Float_t ele1_scERaw; - Float_t ele1_scE; - Float_t ele1_es; - Float_t ele1_e3x3; - Float_t ele1_tkP; - Float_t ele1_fbrem; - Float_t ele1_EOverP; - Int_t ele1_isEB; - Int_t ele1_isEBEEGap; - Int_t ele1_isEBEtaGap; - Int_t ele1_isEBPhiGap; - Int_t ele1_isEEDeeGap; - Int_t ele1_isEERingGap; - Float_t ele1_E_true; - Float_t ele1_DR; - Float_t ele1_scE_regression; - Float_t ele1_scERaw_PUcleaned; - Float_t ele1_seedLaserAlpha; - Float_t ele1_seedLaserCorr; - - ///! Ele 2 variables - - std::vector *ele2_recHit_E; - std::vector *ele2_recHit_hashedIndex; - std::vector *ele2_recHit_iphiORiy; - std::vector *ele2_recHit_ietaORix; - std::vector *ele2_recHit_flag; - std::vector *ele2_recHit_LaserCorr; - std::vector *ele2_recHit_Alpha; - - Float_t ele2_charge; - Float_t ele2_eta; - Float_t ele2_phi; - Float_t ele2_scERaw; - Float_t ele2_scE; - Float_t ele2_es; - Float_t ele2_e3x3; - Float_t ele2_tkP; - Float_t ele2_fbrem; - Float_t ele2_EOverP; - Int_t ele2_isEB; - Int_t ele2_isEBEEGap; - Int_t ele2_isEBEtaGap; - Int_t ele2_isEBPhiGap; - Int_t ele2_isEEDeeGap; - Int_t ele2_isEERingGap; - Float_t ele2_E_true; - Float_t ele2_DR; - Float_t ele2_scE_regression; - Float_t ele2_scERaw_PUcleaned; - Float_t ele2_seedLaserAlpha; - Float_t ele2_seedLaserCorr; - - ///! List of input branches from ntu - - TBranch *b_runId; //! - TBranch *b_lumiId; //! - TBranch *b_eventId; //! - TBranch *b_isW; //! - TBranch *b_isZ; //! - - TBranch *b_ele1_recHit_E; //! - TBranch *b_ele1_recHit_hashedIndex; - TBranch *b_ele1_recHit_iphiORiy; - TBranch *b_ele1_recHit_ietaORix; - TBranch *b_ele1_recHit_flag; - TBranch *b_ele1_recHit_LaserCorr; - TBranch *b_ele1_recHit_Alpha; - - TBranch *b_ele1_scERaw_PUcleaned; - TBranch *b_ele1_scE_regression; - - TBranch *b_ele1_eta; //! - TBranch *b_ele1_phi; //! - TBranch *b_ele1_scERaw; //! - TBranch *b_ele1_scE; //! - TBranch *b_ele1_es; //! - TBranch *b_ele1_e3x3; //! - TBranch *b_ele1_tkP; //! - TBranch *b_ele1_fbrem; //! - TBranch *b_ele1_EOverP; //! - TBranch *b_ele1_isEB; //! - TBranch *b_ele1_E_true; //! - TBranch *b_ele1_DR; //! - TBranch *b_ele1_seedLaserAlpha; - TBranch *b_ele1_seedLaserCorr; - TBranch *b_ele1_charge; - - - - TBranch *b_ele1_isEBEEGap; //! - TBranch *b_ele1_isEBEtaGap; //! - TBranch *b_ele1_isEBPhiGap; //! - TBranch *b_ele1_isEEDeeGap; //! - TBranch *b_ele1_isEERingGap; //! - - TBranch *b_ele2_recHit_E; //! - TBranch *b_ele2_recHit_hashedIndex; - TBranch *b_ele2_recHit_iphiORiy; - TBranch *b_ele2_recHit_ietaORix; //! - TBranch *b_ele2_recHit_flag; - TBranch *b_ele2_recHit_LaserCorr; - TBranch *b_ele2_recHit_Alpha; - - TBranch *b_ele2_eta; //! - TBranch *b_ele2_phi; //! - TBranch *b_ele2_scERaw; //! - TBranch *b_ele2_scE; //! - TBranch *b_ele2_es; //! - TBranch *b_ele2_e3x3; //! - TBranch *b_ele2_tkP; //! - TBranch *b_ele2_fbrem; //! - TBranch *b_ele2_E_true; //! - TBranch *b_ele2_DR; //! - - TBranch *b_ele2_scERaw_PUcleaned; - TBranch *b_ele2_scE_regression; - - TBranch *b_ele2_EOverP; //! - TBranch *b_ele2_isEB; //! - TBranch *b_ele2_isEBEEGap; //! - TBranch *b_ele2_isEBEtaGap; //! - TBranch *b_ele2_isEBPhiGap; //! - TBranch *b_ele2_isEEDeeGap; //! - TBranch *b_ele2_isEERingGap; //! - TBranch *b_ele2_seedLaserAlpha; - TBranch *b_ele2_seedLaserCorr; - TBranch *b_ele2_charge; - - ///! List of class methods - - XtalAlphaEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution="NULL"); - - virtual ~XtalAlphaEB(); - - virtual void bookHistos(int); - - virtual void saveHistos(TFile *f1); - - virtual Long64_t LoadTree(Long64_t entry); - - virtual void Init(TTree *tree); - - virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,std::map > >); - - virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool); - - virtual void saveEoPeta(TFile * f2); - - virtual void AcquireDeadXtal(TString imputDeadXtal); - - virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); - - ///! Output information - - std::vector IetaValues; - std::vector IphiValues; - std::vector AlphaValues; - std::vector meanAlphaforPhiRingValues; - std::vector DeadXtal_HashedIndex; - - - hChain *hC_EoP_eta_ele; - hChain *hC_AlphaValues; - hChain *hC_EoP; - hChain *hC_AlphaSpreadVsLoop; - - h2Chain *hC_Alpha_EB; - - TH1F *h_Occupancy_hashedIndex; - TH2F *h_occupancy; - TProfile *p_AlphaValues_iEta; - TH2F *h_Alpha_scalib_EB; - TH2F *h_Alpha_EB; - TH2F *h_Alpha_EB_meanOnPhi; - TH1F *h_Alpha_EB_hashedIndex; - TH1F *h_AlphaSpread_iEta; - TH2F *h_Intial_AlphaValues; - - TH2F *h_map_Dead_Channels ; - - TGraphErrors *g_AlphameanVsLoop; - TGraphErrors *g_AlpharmsVsLoop; - TGraphErrors *g_AlphaSigmaVsLoop; - - private: - - TString outEPDistribution_p; - -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h b/EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h deleted file mode 100644 index a9b51998cb8..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/XtalAlphaEE.h +++ /dev/null @@ -1,298 +0,0 @@ -////////////////////////////////////////////////////////// -// This class has been automatically generated on -// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b -// from TTree ntu/ntu -// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root -////////////////////////////////////////////////////////// - -#ifndef XtalAlphaEE_h -#define XtalAlphaEE_h - -#include -#include -#include -#include -#include -#include -#include "../../NtuplePackage/interface/hChain.h" -#include "../../NtuplePackage/interface/h2Chain.h" -#include - -#include -#include "Math/PtEtaPhiE4D.h" -#include "Math/PtEtaPhiM4D.h" -#include "Math/LorentzVector.h" - -#include "../interface/CalibrationUtils.h" -#include "../../NtuplePackage/interface/readJSONFile.h" -#include "../interface/TEndcapRings.h" -#include "../interface/TSicCrystals.h" - -class XtalAlphaEE{ - - public : - - std::vector myMomentumScale; - std::string myTypeEE; - - TTree *fChain; //!pointer to the analyzed TTree or TChain - Int_t fCurrent; //!current Tree number in a TChain - - - ///! Declaration of leaf types - Int_t runId; - Int_t lumiId; - Int_t eventId; - Int_t isW; - Int_t isZ; - - ///! Ele1 Variables - std::vector *ele1_recHit_E; - std::vector *ele1_recHit_hashedIndex; - std::vector *ele1_recHit_ietaORix; - std::vector *ele1_recHit_iphiORiy; - std::vector *ele1_recHit_laserCorr; - std::vector *ele1_recHit_Alpha; - - Float_t ele1_charge; - Float_t ele1_eta; - Float_t ele1_phi; - Float_t ele1_scERaw; - Float_t ele1_scE; - Float_t ele1_scEta; - Float_t ele1_es; - Float_t ele1_e3x3; - Float_t ele1_tkP; - Float_t ele1_fbrem; - Float_t ele1_EOverP; - Int_t ele1_isEB; - Int_t ele1_isEBEEGap; - Int_t ele1_isEBEtaGap; - Int_t ele1_isEBPhiGap; - Int_t ele1_isEEDeeGap; - Int_t ele1_isEERingGap; - Float_t ele1_E_true; - Float_t ele1_DR; - Float_t ele1_scE_regression; - Float_t ele1_scERaw_PUcleaned; - Float_t ele1_seedLaserAlpha; - Float_t ele1_seedLaserCorr; - - ///! Ele Variables - std::vector *ele2_recHit_E; - std::vector *ele2_recHit_hashedIndex; - std::vector *ele2_recHit_iphiORiy; - std::vector *ele2_recHit_ietaORix; - std::vector *ele2_recHit_laserCorr; - std::vector *ele2_recHit_Alpha; - - Float_t ele2_charge; - Float_t ele2_eta; - Float_t ele2_phi; - Float_t ele2_scERaw; - Float_t ele2_scE; - Float_t ele2_scEta; - Float_t ele2_es; - Float_t ele2_e3x3; - Float_t ele2_tkP; - Float_t ele2_fbrem; - Float_t ele2_EOverP; - Int_t ele2_isEB; - Int_t ele2_isEBEEGap; - Int_t ele2_isEBEtaGap; - Int_t ele2_isEBPhiGap; - Int_t ele2_isEEDeeGap; - Int_t ele2_isEERingGap; - Float_t ele2_E_true; - Float_t ele2_DR; - Float_t ele2_scE_regression; - Float_t ele2_scERaw_PUcleaned; - Float_t ele2_seedLaserAlpha; - Float_t ele2_seedLaserCorr; - - - ///! List of input branches from ntu - TBranch *b_runId; //! - TBranch *b_lumiId; //! - TBranch *b_eventId; //! - TBranch *b_isW; //! - TBranch *b_isZ; //! - TBranch *b_ele1_recHit_E; //! - TBranch *b_ele1_recHit_iphiORiy; - TBranch *b_ele1_recHit_ietaORix; - TBranch *b_ele1_recHit_hashedIndex; //! - TBranch *b_ele1_recHit_laserCorr; //! - TBranch *b_ele1_recHit_Alpha; - - TBranch *b_ele1_charge; //! - TBranch *b_ele1_eta; //! - TBranch *b_ele1_phi; //! - TBranch *b_ele1_scERaw; //! - TBranch *b_ele1_scE; //! - TBranch *b_ele1_scEta; //! - TBranch *b_ele1_es; //! - TBranch *b_ele1_E_true; //! - TBranch *b_ele1_DR; //! - TBranch *b_ele1_e3x3; //! - TBranch *b_ele1_tkP; //! - TBranch *b_ele1_fbrem; //! - TBranch *b_ele1_EOverP; //! - TBranch *b_ele1_isEB; //! - TBranch *b_ele1_scE_regression; - TBranch *b_ele1_scERaw_PUcleaned; - - TBranch *b_ele1_seedLaserAlpha; - TBranch *b_ele1_seedLaserCorr; - - TBranch *b_ele1_isEBEEGap; //! - TBranch *b_ele1_isEBEtaGap; //! - TBranch *b_ele1_isEBPhiGap; //! - TBranch *b_ele1_isEEDeeGap; //! - TBranch *b_ele1_isEERingGap; //! - - TBranch *b_ele2_recHit_E; //! - TBranch *b_ele2_recHit_hashedIndex; //! - TBranch *b_ele2_recHit_iphiORiy; - TBranch *b_ele2_recHit_ietaORix; //! - TBranch *b_ele2_recHit_laserCorr; //! - TBranch *b_ele2_recHit_Alpha; - - TBranch *b_ele2_charge; //! - TBranch *b_ele2_eta; //! - TBranch *b_ele2_phi; //! - TBranch *b_ele2_scERaw; //! - TBranch *b_ele2_scE; //! - TBranch *b_ele2_scEta; //! - TBranch *b_ele2_es; //! - TBranch *b_ele2_E_true; //! - TBranch *b_ele2_DR; //! - TBranch *b_ele2_e3x3; //! - TBranch *b_ele2_tkP; //! - TBranch *b_ele2_fbrem; //! - TBranch *b_ele2_EOverP; //! - TBranch *b_ele2_isEB; //! - TBranch *b_ele2_isEBEEGap; //! - TBranch *b_ele2_isEBEtaGap; //! - TBranch *b_ele2_isEBPhiGap; //! - TBranch *b_ele2_isEEDeeGap; //! - TBranch *b_ele2_isEERingGap; //! - TBranch *b_ele2_scE_regression; - TBranch *b_ele2_scERaw_PUcleaned; - - TBranch *b_ele2_seedLaserAlpha; - TBranch *b_ele2_seedLaserCorr; - - ///! Class methods - XtalAlphaEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution="NULL"); - - virtual ~XtalAlphaEE(); - - virtual void bookHistos(int); - - virtual void saveHistos(TFile *f1); - - virtual void Init(TTree *tree); - - virtual Long64_t LoadTree(Long64_t entry); - - virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,bool,std::map > >); - - virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool,bool); - - virtual void saveEoPeta(TFile * f2); - - virtual void AcquireDeadXtal(TString imputDeadXtal); - - virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); - - /// Output informations - TH1F *h_occupancy_hashedIndex_EE; - TH1F *h_Alpha_hashedIndex_EE; - - hChain *hC_EoP_ir_ele; - hChain *hC_EoP; - - /// EE+ - hChain *hC_AlphaValues_BTCP_EEP; - h2Chain *hC_Alpha_BTCP_EEP; - hChain *hC_AlphaSpreadVsLoop_BTCP_EEP; - - hChain *hC_AlphaValues_SIC_EEP; - h2Chain *hC_Alpha_SIC_EEP; - hChain *hC_AlphaSpreadVsLoop_SIC_EEP; - - TProfile *p_AlphaVsIeta_BTCP_EEP; - TH1F *AlphaSpreadVsIeta_BTCP_EEP; - TProfile *p_AlphaVsIeta_SIC_EEP; - TH1F *AlphaSpreadVsIeta_SIC_EEP; - - TH2F *h_occupancy_EEP; - - TH2F *h_Alpha_EEP; - TH2F *h_scalib_EEP; - TH2F *h_Alpha_Original_EEP; - - - TGraphErrors *g_AlphameanVsLoop_BTCP_EEP; - TGraphErrors *g_AlpharmsVsLoop_BTCP_EEP; - TGraphErrors *g_AlphaSigmaVsLoop_BTCP_EEP; - TGraphErrors *g_AlphameanVsLoop_SIC_EEP; - TGraphErrors *g_AlpharmsVsLoop_SIC_EEP; - TGraphErrors *g_AlphaSigmaVsLoop_SIC_EEP; - - /// EE- - hChain *hC_AlphaValues_BTCP_EEM; - h2Chain *hC_Alpha_BTCP_EEM; - hChain *hC_AlphaSpreadVsLoop_BTCP_EEM; - - hChain *hC_AlphaValues_SIC_EEM; - h2Chain *hC_Alpha_SIC_EEM; - hChain *hC_AlphaSpreadVsLoop_SIC_EEM; - - TProfile *p_AlphaVsIeta_BTCP_EEM; - TH1F *AlphaSpreadVsIeta_BTCP_EEM; - TProfile *p_AlphaVsIeta_SIC_EEM; - TH1F *AlphaSpreadVsIeta_SIC_EEM; - - TH2F *h_occupancy_EEM; - - TH2F *h_Alpha_EEM; - TH2F *h_scalib_EEM; - TH2F *h_Alpha_Original_EEM; - - - TGraphErrors *g_AlphameanVsLoop_BTCP_EEM; - TGraphErrors *g_AlpharmsVsLoop_BTCP_EEM; - TGraphErrors *g_AlphaSigmaVsLoop_BTCP_EEM; - TGraphErrors *g_AlphameanVsLoop_SIC_EEM; - TGraphErrors *g_AlpharmsVsLoop_SIC_EEM; - TGraphErrors *g_AlphaSigmaVsLoop_SIC_EEM; - - - /// Dead Channel infos - std::vector DeadXtal_HashedIndex; - - TH2F *h_map_Dead_Channels_EEP ; - TH2F *h_map_Dead_Channels_EEM ; - - - private : - - TString outEPDistribution_p; - - /// Essential values to get EE geometry - TEndcapRings* eRings; - TSicCrystals* SicCrystal; - - static const int IX_MIN = 1; - static const int IY_MIN = 1; - static const int IX_MAX = 100; - static const int IY_MAX = 100; - static const int kEEhalf = 7324; - - static const int kxf[200]; - - static const int kdi[200]; -}; - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/Zutils.h b/EOverPCalibration/FastCalibrator/interface/Zutils.h deleted file mode 100644 index 9e613b31009..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/Zutils.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef ntupleUtils_h -#define ntupleUtils_h - -#include -#include -#include -#include - - -#include "TFile.h" -#include "TChain.h" -#include "TCanvas.h" -#include "TPaveStats.h" -#include "TH1F.h" -#include "TF1.h" -#include "TRandom3.h" -#include "TMath.h" - - -#ifdef _MAKECINT_ -#pragma link C++ class map+; -#pragma link C++ class map+; -#pragma link C++ class map+; -#endif - - - -/*** breit-wigner ***/ -double breitWigner(double* x, double* par); - -/*** crystall ball with low tail ***/ -double crystalBallLow(double* x, double* par); - -/*** double crystall ball ***/ -double crystalBallLowHigh(double* x, double* par); - -/*** breit-wigner convoluted with crystalBall ***/ - -double breitWigner_crystalBallLow(double* x, double* par,const int nPoints); - - -std::pair breitWigner_crystalBallLowFWHM(TF1* bwcb, const double &min, const double &max, const double &Precision = 0.001, const int & maxCycle=100000); - -void MoveInterval(TF1* bwcb,const double & xCenter,std::pair & Interval, const double & MAX); - - -/*** Method for binned and ubinned lineshape fit ***/ - -void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, TH1F* h_mZ_MC, - int nPoints, const double &min,const double &max, std::string energyType = "Reg"); - -void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, - int nPoints, const double &min,const double &max, std::string energyType ="Reg"); - - -void SetParameterFunctionEE_EE(TF1* bw_cb, TRandom3 * rand); -void SetParameterFunctionEB_EE(TF1* bw_cb, TRandom3 * rand); -void SetParameterFunctionEB_EB(TF1* bw_cb, TRandom3 * rand); - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/geometryUtils.h b/EOverPCalibration/FastCalibrator/interface/geometryUtils.h deleted file mode 100644 index 19e22de771b..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/geometryUtils.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef geometryUtils_h -#define geometryUtils_h - -//ECAL GEOMETRY - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "TSicCrystals.h" - -/// EE Geometry /// -class TEndcapRegions { - private: - int iEndcapRing[100][100][3]; - int iLMR[100][100][2]; - public: - TEndcapRegions(); - virtual ~TEndcapRegions(); - int GetNRegions(const std::string& , const int ); - int GetRegionId(const int,const int,const int,const std::string&); - int GetEndcapRing(const int,const int,const int,const int); - int GetEndcapIeta(const int,const int,const int, const std::string&, const int); - -}; - -/// EB Geometry -class TBarrelRegions { - - private: - std::map LmrEtaMap; - int iBarrelRings[171][360]; - int iLMR[171][360]; - int iTT[171][360]; - int iSM[171][360]; - - public: - TBarrelRegions(); - virtual ~TBarrelRegions(); - int GetNRegions(const std::string& type); - int GetNRegionsIeta(const std::string& type); - int GetRegionId(const int,const int,const std::string&); - int GetRegionIdIeta(const int& regionId, const std::string& type); - - -}; - - - -#endif diff --git a/EOverPCalibration/FastCalibrator/interface/setTDRStyle.h b/EOverPCalibration/FastCalibrator/interface/setTDRStyle.h deleted file mode 100644 index 706f02026e1..00000000000 --- a/EOverPCalibration/FastCalibrator/interface/setTDRStyle.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef setTDRStyle_h -#define setTDRStyle_h - -#include "TStyle.h" -#include "TColor.h" -#include "TROOT.h" - - - -void setTDRStyle(); - -int getColor(const int& i); - -#endif diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt deleted file mode 100644 index 12c3db78ac7..00000000000 --- a/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt +++ /dev/null @@ -1 +0,0 @@ -{"190645": [[10, 110]], "190646": [[1, 111]], "190659": [[33, 167]], "190679": [[1, 55]], "190688": [[69, 249]], "190702": [[51, 53], [55, 122], [124, 169]], "190703": [[1, 252]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190706": [[1, 126]], "190707": [[1, 237], [239, 257]], "190708": [[1, 189]], "190733": [[71, 96], [99, 389], [392, 460]], "190736": [[1, 80], [83, 185]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 55], [58, 65]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 223], [225, 363]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193192": [[58, 86]], "193193": [[1, 6], [8, 8], [11, 83], [86, 120], [122, 160], [162, 274], [276, 495], [497, 506]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]]} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt deleted file mode 100644 index 7f74ddd0a9c..00000000000 --- a/EOverPCalibration/FastCalibrator/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt +++ /dev/null @@ -1,374 +0,0 @@ -{"190645": [[10, 110]], - "190646": [[1, 111]], - "190659": [[33, 167]], - "190679": [[1, 55]], - "190688": [[69, 249]], - "190702": [[51, 53], [55, 122], [124, 169]], - "190703": [[1, 252]], - "190704": [[1, 3]], - "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], - "190706": [[1, 126]], - "190707": [[1, 237], [239, 257]], - "190708": [[1, 189]], - "190733": [[71, 96], [99, 389], [392, 460]], - "190736": [[1, 80], [83, 185]], - "190738": [[1, 130], [133, 226], [229, 355]], - "191043": [[45, 47]], - "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], - "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], - "191057": [[1, 1], [4, 55], [58, 65]], - "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], - "191090": [[1, 55]], - "191201": [[38, 49], [52, 79]], - "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], - "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], - "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], - "191248": [[1, 103]], - "191264": [[59, 79], [82, 152], [155, 189]], - "191271": [[56, 223], [225, 363]], - "191276": [[1, 16]], - "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], - "191367": [[1, 2]], - "191411": [[1, 23]], - "191695": [[1, 1]], - "191718": [[43, 95], [98, 207]], - "191720": [[1, 1], [3, 15], [17, 181]], - "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], - "191726": [[1, 13]], - "191810": [[15, 15], [22, 49], [52, 92]], - "191830": [[54, 242], [245, 301], [304, 393]], - "191833": [[1, 1], [3, 103]], - "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], - "191837": [[1, 44], [47, 53], [56, 65]], - "191856": [[1, 133]], - "191859": [[1, 28], [31, 126]], - "193093": [[1, 33]], - "193123": [[1, 27]], - "193124": [[1, 52]], - "193192": [[58, 86]], - "193193": [[1, 6], [8, 8], [11, 83], [86, 120], [122, 160], [162, 274], [276, 495], [497, 506]], - "193207": [[54, 182]], - "193334": [[29, 172]], - "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], - "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], - "193556": [[41, 83]], - "193557": [[1, 84]], - "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], - "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], - "193834": [[1, 35]], - "193835": [[1, 20], [22, 26]], - "193836": [[1, 2]], - "193998": [[66, 113], [115, 278]], - "193999": [[1, 50]], - "194027": [[53, 115]], - "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], - "194051": [[1, 12]], - "194052": [[1, 99], [102, 166]], - "194075": [[48, 101], [103, 111]], - "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], - "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], - "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], - "194117": [[1, 38]], - "194119": [[1, 229], [232, 261]], - "194120": [[1, 162], [165, 406]], - "194150": [[42, 127], [129, 261], [264, 311]], - "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], - "194153": [[1, 119]], - "194199": [[92, 227], [229, 336], [339, 402]], - "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], - "194223": [[61, 112]], - "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], - "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], - "194270": [[56, 73]], - "194303": [[56, 66], [69, 102]], - "194304": [[1, 43], [46, 46]], - "194305": [[1, 86]], - "194314": [[52, 130], [133, 301]], - "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], - "194317": [[1, 33]], - "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], - "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], - "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], - "194439": [[46, 77], [79, 106]], - "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], - "194464": [[1, 127], [130, 142], [145, 210]], - "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], - "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], - "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], - "194619": [[31, 110]], - "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], - "194643": [[1, 287]], - "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], - "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], - "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], - "194702": [[1, 138], [141, 191]], - "194704": [[1, 41], [44, 545], [548, 592]], - "194711": [[1, 7], [9, 619]], - "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], - "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], - "194778": [[60, 118], [120, 219]], - "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], - "194790": [[1, 45]], - "194825": [[72, 117], [120, 221]], - "194896": [[34, 55], [58, 79], [82, 103]], - "194897": [[1, 6], [8, 78], [80, 107]], - "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], - "194914": [[1, 38]], - "194915": [[1, 74]], - "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], - "195014": [[1, 6], [9, 119], [121, 148]], - "195015": [[1, 13]], - "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], - "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], - "195109": [[98, 241]], - "195112": [[1, 12], [15, 26]], - "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], - "195114": [[1, 69], [72, 103]], - "195115": [[1, 7], [10, 36]], - "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], - "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], - "195164": [[1, 64]], - "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], - "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], - "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], - "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], - "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], - "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], - "195396": [[49, 55], [58, 63], [66, 131]], - "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], - "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], - "195399": [[1, 192], [194, 382], [384, 394]], - "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], - "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], - "195551": [[91, 106]], - "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], - "195633": [[40, 42]], - "195647": [[1, 41]], - "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], - "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], - "195656": [[1, 362]], - "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], - "195749": [[1, 8], [10, 33], [36, 131]], - "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], - "195758": [[1, 18]], - "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], - "195775": [[1, 57], [60, 100], [103, 170]], - "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], - "195841": [[74, 90]], - "195868": [[1, 88], [90, 107], [110, 205]], - "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], - "195916": [[1, 16], [19, 68], [71, 212]], - "195917": [[1, 4]], - "195918": [[1, 44], [46, 46], [49, 64]], - "195919": [[1, 15]], - "195923": [[1, 14]], - "195925": [[1, 12]], - "195926": [[1, 1], [3, 19], [21, 34]], - "195929": [[1, 29]], - "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], - "195937": [[1, 28], [31, 186], [188, 400]], - "195947": [[23, 62], [64, 88]], - "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], - "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], - "195963": [[54, 61]], - "195970": [[44, 49], [51, 85]], - "196019": [[54, 68]], - "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], - "196046": [[12, 40]], - "196047": [[1, 64], [70, 75]], - "196048": [[1, 44], [46, 48], [51, 52]], - "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], - "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], - "196200": [[1, 68]], - "196202": [[3, 61], [64, 108]], - "196203": [[1, 102], [107, 135]], - "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], - "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], - "196249": [[63, 77], [80, 99]], - "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], - "196252": [[1, 38]], - "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], - "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], - "196357": [[1, 4]], - "196359": [[1, 2]], - "196362": [[1, 88]], - "196363": [[1, 8], [11, 34]], - "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], - "196437": [[1, 1], [3, 74], [77, 169]], - "196438": [[1, 181], [184, 699], [701, 1269]], - "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], - "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], - "196495": [[114, 180], [182, 272]], - "196509": [[1, 68]], - "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], - "198049": [[1, 11], [14, 57]], - "198050": [[2, 155]], - "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], - "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], - "198207": [[1, 97]], - "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], - "198210": [[1, 221]], - "198212": [[1, 574]], - "198213": [[1, 107]], - "198215": [[1, 12]], - "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], - "198249": [[1, 7]], - "198269": [[3, 199], [201, 201], [203, 203]], - "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], - "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], - "198346": [[44, 57]], - "198372": [[57, 114]], - "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], - "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], - "198522": [[65, 144], [147, 208]], - "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], - "198954": [[108, 156], [159, 277]], - "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], - "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], - "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], - "199011": [[1, 11], [13, 27]], - "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], - "199318": [[65, 138]], - "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], - "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], - "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], - "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], - "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], - "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], - "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], - "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], - "199564": [[1, 3]], - "199569": [[1, 2], [5, 136], [139, 367]], - "199570": [[1, 17]], - "199571": [[1, 184], [186, 360], [363, 561]], - "199572": [[1, 317]], - "199573": [[1, 22]], - "199574": [[1, 53], [56, 153], [156, 246]], - "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], - "199698": [[72, 94], [96, 127]], - "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], - "199703": [[1, 94], [97, 482], [485, 539]], - "199739": [[66, 174]], - "199745": [[137, 143]], - "199751": [[103, 119], [121, 127]], - "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], - "199753": [[1, 59]], - "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], - "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], - "199812": [[70, 141], [144, 163], [187, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], - "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], - "199862": [[59, 142]], - "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], - "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], - "199868": [[1, 26]], - "199875": [[70, 150], [152, 334]], - "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], - "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], - "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], - "199961": [[1, 211], [213, 292]], - "199973": [[73, 96]], - "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], - "200042": [[1, 110], [112, 536]], - "200049": [[1, 177]], - "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], - "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], - "200152": [[74, 152]], - "200180": [[1, 18]], - "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], - "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], - "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 531], [534, 624], [627, 629]], - "200243": [[69, 103], [106, 139]], - "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], - "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], - "200368": [[72, 180]], - "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], - "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], - "200466": [[134, 274]], - "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], - "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], - "200515": [[97, 183]], - "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], - "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], - "200532": [[1, 59]], - "200599": [[75, 129], [132, 137]], - "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], - "200990": [[75, 143]], - "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], - "200992": [[1, 405], [408, 434], [436, 581]], - "201062": [[78, 270]], - "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], - "201114": [[1, 14]], - "201115": [[1, 75]], - "201159": [[70, 211]], - "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], - "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], - "201173": [[1, 194], [197, 586]], - "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], - "201193": [[1, 19]], - "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], - "201197": [[1, 23]], - "201202": [[1, 437]], - "201229": [[1, 5], [8, 26], [29, 77]], - "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], - "201554": [[70, 86], [88, 114], [116, 127]], - "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], - "201611": [[87, 145], [149, 182], [184, 186]], - "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], - "201624": [[83, 92], [95, 240], [270, 270]], - "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], - "201657": [[77, 93], [95, 108], [110, 118]], - "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], - "201668": [[78, 157]], - "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], - "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], - "201678": [[1, 120]], - "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], - "201692": [[78, 81], [83, 180]], - "201705": [[65, 73], [75, 109], [111, 187]], - "201706": [[1, 62]], - "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], - "201708": [[1, 87]], - "201718": [[58, 113]], - "201727": [[67, 185]], - "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], - "201794": [[58, 100]], - "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], - "201816": [[1, 72], [74, 105], [107, 157]], - "201817": [[1, 274]], - "201818": [[1, 1]], - "201819": [[1, 94], [96, 241]], - "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], - "202012": [[98, 121], [126, 131]], - "202013": [[1, 2], [5, 35], [38, 57]], - "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], - "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], - "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], - "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], - "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], - "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], - "202074": [[66, 174]], - "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], - "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], - "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], - "202088": [[1, 286]], - "202093": [[1, 104], [107, 320], [322, 360]], - "202116": [[59, 64]], - "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], - "202205": [[94, 114]], - "202209": [[1, 48], [51, 159]], - "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], - "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], - "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], - "202305": [[1, 89], [92, 130], [133, 323]], - "202314": [[67, 104], [107, 265], [268, 284]], - "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], - "202333": [[1, 251]], - "202389": [[81, 182], [185, 190], [192, 203]], - "202469": [[87, 158], [160, 174], [177, 352]], - "202472": [[1, 96], [99, 112]], - "202477": [[1, 129], [131, 150]], - "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], - "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], - "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], - "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 909], [913, 1408]], - "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]]} diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt deleted file mode 100644 index aece012650f..00000000000 --- a/EOverPCalibration/FastCalibrator/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt +++ /dev/null @@ -1 +0,0 @@ -{"190645": [[10, 110]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 55], [58, 65]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 158]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], "198049": [[1, 11], [14, 57]], "198050": [[2, 155]], "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], "198207": [[1, 97]], "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], "198210": [[1, 221]], "198212": [[1, 574]], "198213": [[1, 107]], "198215": [[1, 12]], "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], "198249": [[1, 7]], "198269": [[3, 199], [201, 201], [203, 203]], "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], "198346": [[44, 57]], "198372": [[57, 114]], "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], "198522": [[65, 144], [147, 208]], "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], "198954": [[108, 156], [159, 277]], "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], "199011": [[1, 11], [13, 27]], "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], "199318": [[65, 138]], "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], "199564": [[1, 3]], "199569": [[1, 2], [5, 136], [139, 367]], "199570": [[1, 17]], "199571": [[1, 184], [186, 360], [363, 561]], "199572": [[1, 317]], "199573": [[1, 22]], "199574": [[1, 53], [56, 153], [156, 246]], "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], "199698": [[72, 94], [96, 127]], "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], "199703": [[1, 94], [97, 482], [485, 539]], "199739": [[66, 174]], "199745": [[137, 143]], "199751": [[103, 119], [121, 127]], "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], "199753": [[1, 59]], "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], "199812": [[70, 141], [144, 163], [187, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], "199862": [[59, 142]], "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], "199868": [[1, 26]], "199875": [[70, 150], [152, 334]], "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], "199961": [[1, 211], [213, 292]], "199973": [[73, 96]], "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], "200042": [[1, 110], [112, 536]], "200049": [[1, 177]], "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], "200152": [[74, 152]], "200180": [[1, 18]], "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 531], [534, 624], [627, 629]], "200243": [[69, 103], [106, 139]], "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], "200368": [[72, 180]], "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], "200466": [[134, 274]], "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], "200515": [[97, 183]], "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], "200532": [[1, 59]], "200599": [[75, 129], [132, 137]], "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], "200990": [[75, 143]], "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], "200992": [[1, 405], [408, 434], [436, 581]], "201062": [[78, 270]], "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], "201114": [[1, 14]], "201115": [[1, 75]], "201159": [[70, 211]], "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], "201173": [[1, 194], [197, 586]], "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], "201193": [[1, 19]], "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], "201197": [[1, 23]], "201202": [[1, 437]], "201229": [[1, 5], [8, 26], [29, 77]], "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], "201554": [[70, 86], [88, 114], [116, 127]], "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], "201611": [[87, 145], [149, 182], [184, 186]], "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], "201624": [[83, 92], [95, 240], [270, 270]], "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], "201657": [[77, 93], [95, 108], [110, 118]], "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], "201668": [[78, 157]], "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], "201678": [[1, 120]], "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], "201692": [[78, 81], [83, 180]], "201705": [[65, 73], [75, 109], [111, 187]], "201706": [[1, 62]], "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], "201708": [[1, 87]], "201718": [[58, 113]], "201727": [[67, 185]], "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], "201794": [[58, 100]], "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], "201816": [[1, 72], [74, 105], [107, 157]], "201817": [[1, 274]], "201818": [[1, 1]], "201819": [[1, 94], [96, 241]], "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], "202012": [[98, 121], [126, 131]], "202013": [[1, 2], [5, 35], [38, 57]], "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], "202074": [[66, 174]], "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], "202088": [[1, 286]], "202093": [[1, 104], [107, 320], [322, 360]], "202116": [[59, 64]], "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], "202205": [[94, 114]], "202209": [[1, 48], [51, 159]], "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], "202305": [[1, 89], [92, 130], [133, 323]], "202314": [[67, 104], [107, 265], [268, 284]], "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], "202333": [[1, 251]], "202389": [[81, 182], [185, 190], [192, 203]], "202469": [[87, 158], [160, 174], [177, 352]], "202472": [[1, 96], [99, 112]], "202477": [[1, 129], [131, 150]], "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 909], [913, 1408]], "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]]} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt b/EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt deleted file mode 100644 index a6bb7018583..00000000000 --- a/EOverPCalibration/FastCalibrator/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt +++ /dev/null @@ -1 +0,0 @@ -{"190645": [[10, 110]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 40]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 158]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], "198049": [[1, 11], [14, 57]], "198050": [[2, 155]], "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], "198207": [[1, 97]], "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], "198210": [[1, 221]], "198212": [[1, 574]], "198213": [[1, 107]], "198215": [[1, 12]], "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], "198249": [[1, 7]], "198269": [[3, 199], [201, 201], [203, 203]], "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], "198346": [[44, 57]], "198372": [[57, 114]], "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], "198522": [[65, 144], [147, 208]], "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], "198954": [[108, 156], [159, 277]], "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], "199011": [[1, 11], [13, 27]], "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], "199318": [[65, 138]], "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], "199564": [[1, 3]], "199569": [[1, 2], [5, 136], [139, 367]], "199570": [[1, 17]], "199571": [[1, 184], [186, 360], [363, 561]], "199572": [[1, 317]], "199573": [[1, 22]], "199574": [[1, 53], [56, 153], [156, 246]], "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], "199698": [[72, 94], [96, 127]], "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], "199703": [[1, 94], [97, 482], [485, 539]], "199739": [[66, 174]], "199745": [[137, 143]], "199751": [[103, 119], [121, 127]], "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], "199753": [[1, 59]], "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], "199812": [[70, 141], [144, 163], [182, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], "199862": [[59, 142]], "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], "199868": [[1, 26]], "199875": [[70, 150], [152, 334]], "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], "199961": [[1, 211], [213, 292]], "199973": [[73, 96]], "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], "200042": [[1, 110], [112, 536]], "200049": [[1, 177]], "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], "200152": [[74, 152]], "200180": [[1, 18]], "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 624], [627, 629]], "200243": [[69, 103], [106, 139]], "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], "200368": [[72, 180]], "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], "200466": [[134, 274]], "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], "200515": [[97, 183]], "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], "200532": [[1, 59]], "200599": [[75, 129], [132, 137]], "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], "200961": [[1, 115]], "200976": [[94, 164]], "200990": [[75, 143]], "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], "200992": [[1, 405], [408, 434], [436, 581]], "201062": [[78, 270]], "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], "201114": [[1, 14]], "201115": [[1, 75]], "201159": [[70, 211]], "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], "201173": [[1, 194], [197, 586]], "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], "201193": [[1, 19]], "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], "201197": [[1, 23]], "201202": [[1, 437]], "201229": [[1, 5], [8, 26], [29, 77]], "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], "201554": [[70, 86], [88, 114], [116, 127]], "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], "201611": [[87, 145], [149, 182], [184, 186]], "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], "201624": [[83, 92], [95, 240], [270, 270]], "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], "201657": [[77, 93], [95, 108], [110, 118]], "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], "201668": [[78, 157]], "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], "201678": [[1, 120]], "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], "201692": [[78, 81], [83, 180]], "201705": [[65, 73], [75, 109], [111, 187]], "201706": [[1, 62]], "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], "201708": [[1, 87]], "201718": [[58, 113]], "201727": [[67, 185]], "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], "201794": [[58, 100]], "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], "201816": [[1, 72], [74, 105], [107, 157]], "201817": [[1, 274]], "201818": [[1, 1]], "201819": [[1, 94], [96, 241]], "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], "202012": [[98, 121], [126, 131]], "202013": [[1, 2], [5, 35], [38, 57]], "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], "202074": [[66, 174]], "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], "202088": [[1, 286]], "202093": [[1, 104], [107, 320], [322, 360]], "202116": [[59, 64]], "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], "202205": [[94, 114]], "202209": [[1, 48], [51, 159]], "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], "202305": [[1, 89], [92, 130], [133, 323]], "202314": [[67, 104], [107, 265], [268, 284]], "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], "202333": [[1, 251]], "202389": [[81, 182], [185, 190], [192, 203]], "202469": [[87, 158], [160, 174], [177, 352]], "202472": [[1, 96], [99, 112]], "202477": [[1, 129], [131, 150]], "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 1408]], "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]], "203894": [[82, 272], [275, 477], [480, 902], [905, 1322]], "203909": [[79, 113], [116, 117], [120, 140], [143, 382]], "203912": [[1, 306], [308, 566], [569, 609], [611, 698], [701, 820], [823, 865], [867, 1033], [1035, 1321]], "203985": [[1, 10]], "203986": [[1, 45]], "203987": [[1, 9], [12, 241], [243, 339], [342, 781], [784, 1014]], "203991": [[1, 3]], "203992": [[1, 15]], "203994": [[1, 56], [59, 136], [139, 304], [306, 342], [344, 425]], "204100": [[117, 139]], "204101": [[1, 83]], "204113": [[82, 96], [98, 102], [105, 127], [129, 191], [194, 258], [261, 327], [329, 388], [390, 400], [402, 583], [585, 690], [693, 693], [696, 696]], "204114": [[1, 364]], "204238": [[23, 52], [55, 60]], "204250": [[92, 118], [121, 177], [179, 285], [287, 336], [339, 400], [403, 521], [524, 543], [546, 682], [684, 803]], "204511": [[1, 60]], "204541": [[5, 39], [42, 42], [44, 139], [142, 149], [151, 204]], "204544": [[1, 11], [13, 93], [96, 195], [197, 224], [226, 334], [337, 426]], "204552": [[1, 9]], "204553": [[1, 51], [53, 60], [63, 101], [103, 104]], "204554": [[1, 5], [7, 221], [224, 455], [458, 470], [472, 481], [483, 514]], "204555": [[1, 329], [331, 334]], "204563": [[91, 99], [102, 178], [180, 219], [222, 229], [231, 364], [366, 366], [369, 470], [473, 524], [527, 571]], "204564": [[1, 84], [87, 89], [92, 159], [161, 187], [190, 191], [193, 293], [296, 315], [317, 340], [343, 427], [429, 434], [437, 735], [737, 855], [858, 1206], [1209, 1248], [1251, 1284]], "204565": [[1, 48]], "204566": [[1, 12]], "204567": [[1, 38]], "204576": [[49, 192], [195, 301]], "204577": [[1, 46], [49, 64], [67, 105], [107, 170], [173, 181], [183, 193], [196, 653], [656, 669], [671, 740], [742, 913], [915, 1057], [1059, 1115], [1117, 1287]], "204599": [[73, 83], [85, 94], [97, 121], [124, 125], [128, 173], [175, 240], [243, 245], [248, 264], [266, 292], [294, 335]], "204601": [[1, 25], [28, 62], [65, 80], [83, 89], [92, 290], [292, 563], [565, 591], [593, 652], [655, 780], [783, 812], [814, 892], [894, 984], [986, 1003], [1006, 1038], [1040, 1088], [1091, 1102], [1105, 1161], [1164, 1255]], "205086": [[95, 149]], "205111": [[88, 390], [392, 441], [444, 449]], "205158": [[81, 289], [292, 313], [315, 473], [476, 591], [594, 595], [597, 612], [615, 663], [665, 667], [672, 685], [687, 733], [736, 741]], "205193": [[80, 109], [111, 349], [352, 486], [488, 650], [652, 712], [714, 902]], "205217": [[1, 12], [16, 111], [113, 171], [174, 250], [253, 322]], "205233": [[94, 153]], "205236": [[1, 190], [193, 207], [209, 260], [263, 331], [334, 352]], "205238": [[1, 6], [9, 199], [202, 254], [256, 304], [306, 355], [358, 381], [384, 596], [598, 621]], "205303": [[35, 54], [90, 132], [135, 153]], "205310": [[76, 306], [309, 313], [316, 316], [319, 321], [324, 457], [460, 559]], "205311": [[1, 85], [88, 92], [95, 183], [186, 395], [397, 592], [595, 910], [913, 1260]], "205339": [[71, 175], [178, 213], [216, 230], [233, 262], [265, 404]], "205344": [[1, 83], [86, 104], [106, 359], [362, 431], [433, 949], [951, 967], [969, 1127], [1129, 1346], [1348, 1586]], "205515": [[82, 201], [203, 216]], "205519": [[1, 47], [50, 172], [175, 367], [370, 386], [389, 472]], "205526": [[1, 269], [272, 277], [280, 332]], "205614": [[1, 4], [7, 40]], "205617": [[1, 29], [32, 102], [105, 123], [125, 140], [143, 264], [266, 448], [451, 532], [534, 547]], "205618": [[1, 12]], "205620": [[1, 175]], "205666": [[60, 119], [122, 165], [168, 259], [261, 322], [325, 578], [580, 594], [597, 721], [724, 739]], "205667": [[1, 165], [168, 282], [285, 318], [321, 412], [415, 689], [692, 751], [754, 774], [777, 1109]], "205683": [[76, 82], [85, 178], [181, 198], [201, 305]], "205690": [[1, 40]], "205694": [[1, 205], [208, 230], [233, 347], [350, 452], [455, 593], [595, 890]], "205718": [[49, 75], [78, 97], [100, 103], [105, 176], [178, 338], [341, 361], [363, 524], [527, 531], [534, 589], [591, 734]], "205774": [[1, 80]], "205777": [[1, 9]], "205781": [[1, 89], [91, 197], [200, 509]], "205826": [[80, 232], [235, 303], [306, 469]], "205833": [[84, 86], [89, 121], [123, 155], [157, 165], [167, 173], [176, 219], [221, 267], [270, 312], [315, 346], [350, 355], [360, 366]], "205834": [[1, 12], [14, 202]], "205908": [[68, 200], [202, 214]], "205921": [[22, 73], [76, 268], [271, 394], [397, 401], [410, 428], [431, 498], [500, 571], [574, 779], [782, 853]], "206066": [[89, 155]], "206088": [[86, 159], [161, 178], [181, 199], [202, 286]], "206102": [[83, 116], [120, 130], [133, 208], [211, 235], [238, 246], [249, 278], [281, 349]], "206187": [[107, 169], [172, 242], [245, 288], [290, 340], [343, 427], [429, 435], [437, 486], [489, 569], [571, 647], [649, 662], [664, 708]], "206188": [[1, 40], [42, 58]], "206199": [[1, 75], [77, 82], [85, 117]], "206207": [[82, 130], [132, 176], [179, 194], [196, 388], [390, 419], [422, 447], [450, 569], [572, 690]], "206208": [[1, 470], [472, 518]], "206210": [[11, 25], [28, 275], [277, 298], [300, 383], [386, 469]], "206243": [[62, 169], [172, 196], [199, 354], [357, 433], [435, 448], [451, 533], [536, 554], [557, 723], [726, 905]], "206245": [[1, 62]], "206246": [[1, 14], [16, 237], [240, 285], [288, 407], [412, 676], [678, 704], [706, 785], [787, 962], [965, 997], [1000, 1198], [1201, 1290]], "206257": [[1, 29]], "206258": [[1, 36], [39, 223], [226, 249]], "206302": [[1, 8], [11, 33], [36, 44], [47, 82], [84, 108], [110, 149], [151, 186], [189, 229], [231, 232], [234, 241], [243, 276]], "206303": [[1, 19], [23, 286]], "206304": [[1, 4], [6, 70]], "206331": [[91, 222], [225, 314]], "206389": [[88, 185], [187, 249], [252, 272], [275, 392]], "206391": [[1, 55], [57, 98]], "206401": [[69, 90], [92, 194], [197, 210], [212, 249], [251, 265], [267, 411]], "206446": [[92, 141], [143, 159], [162, 205], [208, 301], [304, 442], [445, 445], [448, 474], [476, 616], [619, 872], [874, 910], [912, 948], [950, 989], [992, 1030], [1033, 1075], [1109, 1149]], "206448": [[1, 143], [145, 559], [561, 1170], [1173, 1231], [1235, 1237]], "206466": [[24, 137], [140, 277], [280, 296], [299, 303], [306, 405], [407, 419], [422, 477], [480, 511], [514, 682]], "206476": [[73, 129], [133, 137], [140, 141], [143, 219]], "206477": [[1, 14], [16, 31], [33, 41], [44, 51], [53, 70], [73, 75], [77, 89], [91, 94], [97, 115], [118, 184]], "206478": [[1, 27], [29, 136], [139, 147]], "206484": [[73, 95], [98, 133], [136, 163], [166, 186], [189, 384], [387, 463], [465, 551], [554, 554], [556, 673]], "206512": [[91, 123], [125, 133], [136, 161], [163, 190], [193, 201], [203, 212], [214, 332], [334, 584], [587, 604], [607, 1005], [1008, 1123], [1126, 1163], [1165, 1211]], "206513": [[3, 39], [42, 188], [191, 234], [237, 238], [241, 329]], "206542": [[1, 115], [117, 165], [168, 511], [514, 547], [550, 603], [606, 668], [671, 727], [730, 739], [741, 836]], "206550": [[77, 132], [135, 155]], "206572": [[37, 47]], "206573": [[2, 14]], "206574": [[1, 87]], "206575": [[1, 7], [10, 10], [12, 75]], "206594": [[72, 107], [110, 246], [249, 281]], "206595": [[1, 34], [37, 42], [45, 193]], "206596": [[1, 13], [15, 220], [222, 228], [231, 236], [239, 292], [295, 695], [697, 728], [730, 810]], "206598": [[1, 81], [83, 103], [105, 588], [591, 657], [659, 719]], "206605": [[1, 36], [39, 82]], "206744": [[49, 157], [160, 192], [195, 395], [398, 452]], "206745": [[1, 81], [84, 199], [202, 224], [227, 237], [240, 304], [306, 318], [321, 720], [723, 796], [799, 894], [897, 944], [946, 1106], [1108, 1524], [1527, 1862], [1988, 1996]], "206859": [[79, 210], [212, 258], [260, 323], [325, 356], [359, 609], [612, 681], [684, 732], [734, 768], [771, 808], [811, 827], [830, 848]], "206866": [[1, 30], [33, 113], [115, 274]], "206868": [[1, 3], [10, 16]], "206869": [[1, 251], [253, 271], [274, 502], [507, 520], [522, 566], [568, 752]], "206897": [[1, 34], [38, 61], [63, 102], [109, 109], [111, 112], [114, 131], [133, 137]], "206901": [[1, 98]], "206906": [[1, 31], [38, 94], [96, 136], [138, 139], [142, 149], [151, 175], [177, 218]], "206940": [[1, 151], [153, 153], [155, 298], [301, 382], [384, 712], [715, 803], [805, 960], [963, 1027]], "207099": [[83, 134], [137, 172], [175, 213], [216, 314], [316, 320], [323, 330], [333, 367], [370, 481], [484, 602], [605, 755], [757, 1046], [1048, 1171]], "207100": [[1, 91], [94, 98]], "207214": [[57, 112], [114, 177], [179, 181], [184, 196], [199, 220], [223, 262], [265, 405], [408, 482], [485, 640], [643, 708], [718, 757], [759, 808], [811, 829]], "207217": [[1, 32]], "207219": [[1, 112]], "207220": [[1, 160]], "207221": [[1, 102]], "207222": [[1, 17], [20, 289]], "207231": [[70, 84], [86, 121], [123, 184], [187, 189], [192, 303], [306, 354], [357, 481], [484, 504], [508, 549], [552, 626], [628, 690], [693, 875], [878, 1000], [1003, 1170], [1173, 1187], [1189, 1227], [1229, 1415], [1418, 1445], [1447, 1505]], "207233": [[1, 119], [121, 155]], "207269": [[80, 394], [397, 436], [439, 463], [466, 551], [568, 577]], "207273": [[3, 877]], "207279": [[68, 138], [141, 149], [151, 237], [240, 266], [269, 307], [309, 416], [498, 551], [554, 640], [643, 961], [963, 1095], [1098, 1160]], "207320": [[1, 110], [112, 350]], "207371": [[72, 117], [120, 124]], "207372": [[1, 27], [30, 113], [116, 154], [156, 174], [176, 478], [480, 501]], "207397": [[32, 77], [80, 140], [143, 179]], "207398": [[1, 14], [16, 35]], "207454": [[79, 95], [98, 123], [126, 259], [261, 363], [365, 458], [461, 498], [501, 609], [612, 632], [635, 781], [784, 866], [869, 974], [977, 1064], [1067, 1079], [1081, 1321], [1323, 1464], [1467, 1569], [1571, 1604], [1607, 1712], [1714, 1988]], "207469": [[1, 31], [34, 51]], "207477": [[76, 104], [107, 111], [114, 147], [150, 295], [298, 483], [486, 494], [497, 527], [530, 563], [565, 570]], "207487": [[50, 98], [101, 311], [313, 359], [363, 468], [471, 472]], "207488": [[1, 63], [66, 92], [95, 113], [116, 198], [200, 250], [252, 288], [291, 365], [368, 377], [379, 440]], "207490": [[1, 48], [51, 111]], "207491": [[1, 176], [179, 458]], "207492": [[1, 20], [23, 298]], "207515": [[79, 109], [112, 132], [134, 208], [211, 225], [228, 320], [322, 381], [383, 498], [500, 730], [733, 849], [851, 954], [957, 994], [997, 1052], [1055, 1143], [1145, 1211]], "207517": [[1, 12], [15, 57]], "207518": [[1, 59], [61, 83]], "207882": [[22, 45]], "207883": [[1, 1], [3, 4], [7, 75]], "207884": [[1, 106], [108, 183]], "207885": [[1, 90]], "207886": [[1, 30], [32, 90], [92, 156], [158, 166], [168, 171]], "207889": [[1, 43], [47, 57], [60, 303], [306, 442], [445, 445], [447, 551], [553, 731], [733, 907], [910, 945]], "207898": [[1, 33], [36, 57], [60, 235], [239, 257], [260, 288]], "207905": [[75, 196], [198, 281], [284, 329], [331, 402], [404, 565], [568, 672], [675, 805], [807, 850], [852, 861], [864, 884], [886, 1180], [1183, 1283], [1285, 1331], [1333, 1515], [1518, 1734], [1737, 1796]], "207920": [[84, 146], [149, 241], [243, 261], [264, 291], [294, 486], [489, 518], [520, 598], [600, 708], [710, 826]], "207921": [[1, 37], [40, 58]], "207922": [[1, 69], [71, 100], [103, 126], [129, 242], [274, 291]], "207924": [[1, 52], [54, 171], [173, 178], [181, 339]], "208307": [[2, 42], [45, 45], [47, 70], [72, 147], [150, 252], [256, 259], [262, 275], [278, 342], [345, 450], [453, 527], [530, 583], [586, 605], [608, 616], [618, 667], [670, 761], [763, 798], [800, 889], [891, 893], [896, 1055], [1057, 1205], [1208, 1294], [1297, 1328]], "208339": [[77, 89], [91, 122], [125, 208], [211, 346], [349, 363]], "208341": [[1, 84], [86, 117], [120, 513], [515, 685], [688, 693], [695, 775], [777, 824]], "208351": [[83, 97], [100, 356], [359, 369]], "208353": [[1, 76], [78, 269], [271, 348]], "208357": [[1, 70], [73, 507]], "208390": [[72, 128], [130, 169]], "208391": [[52, 82], [84, 162], [164, 216], [219, 493], [495, 498], [500, 523], [526, 533], [535, 588], [591, 660], [663, 869]], "208427": [[49, 89], [92, 161], [164, 164], [166, 173], [175, 268], [271, 312], [315, 315], [317, 335], [337, 361], [364, 402], [404, 422], [425, 577], [580, 647]], "208428": [[1, 58], [61, 68], [70, 156], [159, 227]], "208429": [[1, 56], [59, 139], [141, 159], [162, 237], [240, 440], [442, 452], [455, 589], [592, 712], [715, 922]], "208487": [[2, 26], [29, 159], [161, 307], [309, 459], [462, 476], [479, 632]], "208509": [[71, 232]], "208538": [[2, 43]], "208540": [[1, 26], [29, 98]], "208541": [[1, 57], [59, 173], [175, 376], [378, 417]], "208551": [[119, 193], [195, 212], [215, 300], [303, 354], [356, 554], [557, 580]], "208686": [[73, 79], [82, 181], [183, 224], [227, 243], [246, 311], [313, 463]]} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx b/EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx deleted file mode 100644 index c68d6cc415f..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/CombineMomentumCalibration.cxx +++ /dev/null @@ -1,339 +0,0 @@ -#include -#include "TFile.h" -#include "TGraphErrors.h" -#include "TROOT.h" -#include "TString.h" -#include "TCanvas.h" -#include "TPad.h" -#include "TLegend.h" -#include "TStyle.h" -#include "TH2F.h" -#include "TMath.h" - - - -int nEtaBinsEB = 1; -int nEtaBinsEE = 1; - -void CombineMomentumCalibration() -{ - gROOT->SetStyle("Plain"); - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetStatFont(42); - gStyle->SetStatFontSize(0.05); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(10111); - gStyle->SetOptFit(1); - gStyle->SetPalette(1); - gROOT->ForceStyle(); - - TFile *f1 = TFile::Open("output/MomentumCalibration2011_fede_eta1_eta1.root"); - TFile *f2 = TFile::Open("output/MomentumCalibration2012_fede_eta1_eta1.root"); - TFile *f3 = new TFile("output/MomentumCalibrationCombined_2011AB-2012ABC_fede_eta1_eta1.root","RECREATE"); - f3->cd(); - - double x,y; - - - - //------- - // Barrel - - for(int etaBin = 0; etaBin < nEtaBinsEB; ++etaBin) - { - TString Name = Form("g_EoC_EB_%d",etaBin); - TGraphErrors* g_EoC_EB_1 = (TGraphErrors*)f1->Get(Name); - double yAvg_EB_1 = 0.; - int nGoodPoints_EB_1 = 0; - for(int point = 0; point < g_EoC_EB_1->GetN(); ++point) - { - g_EoC_EB_1 -> GetPoint(point,x,y); - if( (y > 0.9) && (y < 1.1) ) - { - yAvg_EB_1 += y; - ++nGoodPoints_EB_1; - } - } - yAvg_EB_1 /= nGoodPoints_EB_1; - std::cout << "*** EB_" << etaBin << "_1 yScale: " << yAvg_EB_1 << std::endl; - - - TString Name = Form("g_EoC_EB_%d",etaBin); - TGraphErrors* g_EoC_EB_2 = (TGraphErrors*)f2->Get(Name); - double yAvg_EB_2 = 0.; - int nGoodPoints_EB_2 = 0; - for(int point = 0; point < g_EoC_EB_2->GetN(); ++point) - { - g_EoC_EB_2 -> GetPoint(point,x,y); - if( (y > 0.9) && (y < 1.1) ) - { - yAvg_EB_2 += y; - ++nGoodPoints_EB_2; - } - } - yAvg_EB_2 /= nGoodPoints_EB_2; - std::cout << "*** EB_" << etaBin << "_2 yScale: " << yAvg_EB_2 << std::endl; - - - - g_EoC_EB_1 -> SetMarkerStyle(20); - g_EoC_EB_1 -> SetMarkerSize(1); - g_EoC_EB_1 -> SetMarkerColor(kGreen+1); - g_EoC_EB_1 -> SetLineColor(kGreen+1); - - g_EoC_EB_2 -> SetMarkerStyle(20); - g_EoC_EB_2 -> SetMarkerSize(1); - g_EoC_EB_2 -> SetMarkerColor(kRed+1); - g_EoC_EB_2 -> SetLineColor(kRed+1); - - TGraphErrors* g_Diff_EB = (TGraphErrors*)g_EoC_EB_1->Clone(0); - TGraphErrors* g_Corr_EB = (TGraphErrors*)g_EoC_EB_1->Clone(0); - - g_Diff_EB -> SetMarkerStyle(20); - g_Diff_EB -> SetMarkerSize(1); - g_Diff_EB -> SetMarkerColor(kBlue+2); - g_Diff_EB -> SetLineColor(kBlue+2); - - g_Corr_EB -> SetMarkerStyle(20); - g_Corr_EB -> SetMarkerSize(1); - g_Corr_EB -> SetMarkerColor(kBlack); - g_Corr_EB -> SetLineColor(kBlack); - - - for(int jPoint = 0; jPoint < g_EoC_EB_1->GetN(); jPoint++) - { - double x1,y1,ex1,ey1; - double x2,y2,ex2,ey2; - g_EoC_EB_1->GetPoint(jPoint,x1,y1); - ex1= g_EoC_EB_1->GetErrorX(jPoint); - ey1= g_EoC_EB_1->GetErrorY(jPoint); - - g_EoC_EB_2->GetPoint(jPoint,x2,y2); - ex2= g_EoC_EB_2->GetErrorX(jPoint); - ey2= g_EoC_EB_2->GetErrorY(jPoint); - - g_Corr_EB ->SetPoint(jPoint,x1,(y2+y1)/2); - g_Corr_EB ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); - - g_Diff_EB ->SetPoint(jPoint,x1,(y2-y1)/2); - g_Diff_EB ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); - } - - - float phiLim = 360; - Name = Form("g_fit_EB_%d",etaBin); - TCanvas* c_g_fit_EB = new TCanvas(Name, Name,100,100,800,600); - Name = Form("pad_0_EB_%d",etaBin); - TPad *cLower_EB = new TPad(Name,Name,0.01,0.00,0.99,0.30); - Name = Form("pad_1_EB_%d",etaBin); - TPad *cUpper_EB = new TPad(Name,Name,0.01,0.30,0.99,0.99); - - cLower_EB->SetBottomMargin(0.25); cUpper_EB->SetTopMargin(0.01); - cUpper_EB->SetBottomMargin(0.01); - - cLower_EB->Draw(); - cUpper_EB->Draw(); - - float FontSCF = cUpper_EB->GetHNDC()/cLower_EB->GetHNDC(); - float tYoffset = 0.8; - float labSize = 0.06; - cUpper_EB -> cd(); - gPad->SetGrid(); - - TH1F *hPad_EB = (TH1F*)gPad->DrawFrame(-3.15,0.95,3.15,1.05); - hPad_EB->GetXaxis()->SetLabelSize(labSize); - hPad_EB->GetXaxis()->SetTitleSize(labSize); - hPad_EB->GetYaxis()->SetLabelSize(labSize); - hPad_EB->GetYaxis()->SetTitleSize(labSize); - hPad_EB->GetXaxis()->SetTitleOffset(tYoffset); - hPad_EB->GetYaxis()->SetTitleOffset(tYoffset); - hPad_EB->GetXaxis()->SetTitle("#phi_{SC}"); - hPad_EB->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto p"); - - g_EoC_EB_1 -> Draw("PL"); - g_EoC_EB_2 -> Draw("PL"); - //g_Corr_EB -> Draw("PL"); - - - TLegend *tl_EB = new TLegend(0.80,0.80,0.90,0.95); - tl_EB -> SetTextFont(40); - tl_EB -> SetFillColor(0); - //tl -> SetBorderSize(0); - tl_EB -> AddEntry(g_EoC_EB_1,"Data 2011 EB","PL"); - tl_EB -> AddEntry(g_EoC_EB_2,"Data 2012 EB","PL"); - //tl_EB -> AddEntry(g_Corr_EB,"2011-2012 Combined","PL"); - - tl_EB -> Draw(); - - cLower_EB -> cd(); - gPad->SetGrid(); - - TH1F *hRat_EB = (TH1F*)gPad->DrawFrame(-3.15,-0.01,3.15,0.01); - hRat_EB->GetYaxis()->SetNdivisions(505); - hRat_EB->GetXaxis()->SetLabelSize(labSize*FontSCF); - hRat_EB->GetXaxis()->SetTitleSize(labSize*FontSCF); - hRat_EB->GetYaxis()->SetLabelSize(labSize*FontSCF); - hRat_EB->GetYaxis()->SetTitleSize(labSize*FontSCF); - hRat_EB->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); - hRat_EB->GetXaxis()->SetTitleOffset(0.6); - hRat_EB->GetXaxis()->SetTitle("#phi_{SC}"); - hRat_EB->GetYaxis()->SetTitle("Spread/2"); - g_Diff_EB->Draw("PL"); - - Name = Form("g_EoC_EB_%d",etaBin); - g_Corr_EB->Write(Name); - } - - - - //-------- - // Endcaps - - for(int etaBin = 0; etaBin < nEtaBinsEE; ++etaBin) - { - TString Name = Form("g_EoC_EE_%d",etaBin); - TGraphErrors* g_EoC_EE_1 = (TGraphErrors*)f1->Get(Name); - double yAvg_EE_1 = 0.; - int nGoodPoints_EE_1 = 0; - for(int point = 0; point < g_EoC_EE_1->GetN(); ++point) - { - g_EoC_EE_1 -> GetPoint(point,x,y); - if( (y > 0.9) && (y < 1.1) ) - { - yAvg_EE_1 += y; - ++nGoodPoints_EE_1; - } - } - yAvg_EE_1 /= nGoodPoints_EE_1; - std::cout << "*** EE_" << etaBin << "_1 yScale: " << yAvg_EE_1 << std::endl; - - Name= Form("g_EoC_EE_%d",etaBin); - TGraphErrors* g_EoC_EE_2 = (TGraphErrors*)f2->Get(Name); - double yAvg_EE_2 = 0.; - int nGoodPoints_EE_2 = 0; - for(int point = 0; point < g_EoC_EE_2->GetN(); ++point) - { - g_EoC_EE_2 -> GetPoint(point,x,y); - if( (y > 0.9) && (y < 1.1) ) - { - yAvg_EE_2 += y; - ++nGoodPoints_EE_2; - } - } - yAvg_EE_2 /= nGoodPoints_EE_2; - std::cout << "*** EE_" << etaBin << "_2 yScale: " << yAvg_EE_2 << std::endl; - - - g_EoC_EE_1 -> SetMarkerStyle(20); - g_EoC_EE_1 -> SetMarkerSize(1); - g_EoC_EE_1 -> SetMarkerColor(kGreen+1); - g_EoC_EE_1 -> SetLineColor(kGreen+1); - - g_EoC_EE_2 -> SetMarkerStyle(20); - g_EoC_EE_2 -> SetMarkerSize(1); - g_EoC_EE_2 -> SetMarkerColor(kRed+1); - g_EoC_EE_2 -> SetLineColor(kRed+1); - - TGraphErrors* g_Diff_EE = (TGraphErrors*)g_EoC_EE_1->Clone(0); - TGraphErrors* g_Corr_EE = (TGraphErrors*)g_EoC_EE_1->Clone(0); - - g_Diff_EE -> SetMarkerStyle(20); - g_Diff_EE -> SetMarkerSize(1); - g_Diff_EE -> SetMarkerColor(kBlue+2); - g_Diff_EE -> SetLineColor(kBlue+2); - - g_Corr_EE -> SetMarkerStyle(20); - g_Corr_EE -> SetMarkerSize(1); - g_Corr_EE -> SetMarkerColor(kBlack); - g_Corr_EE -> SetLineColor(kBlack); - - - for(int jPoint = 0; jPoint < g_EoC_EE_1->GetN() ; jPoint++) - { - double x1,y1,ex1,ey1; - double x2,y2,ex2,ey2; - g_EoC_EE_1->GetPoint(jPoint,x1,y1); - ex1= g_EoC_EE_1->GetErrorX(jPoint); - ey1= g_EoC_EE_1->GetErrorY(jPoint); - - g_EoC_EE_2->GetPoint(jPoint,x2,y2); - ex2= g_EoC_EE_2->GetErrorX(jPoint); - ey2= g_EoC_EE_2->GetErrorY(jPoint); - - g_Diff_EE ->SetPoint(jPoint,x1,(y2-y1)/2); - g_Diff_EE ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); - - g_Corr_EE ->SetPoint(jPoint,x1,(y2+y1)/2); - g_Corr_EE ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); - } - - - Name = Form("g_fit_EE_%d",etaBin); - - TCanvas* c_g_fit_EE = new TCanvas(Name, Name,100,100,800,600); - TPad *cLower_EE = new TPad("pad_0_EE","pad_0_EE",0.01,0.00,0.99,0.30); - TPad *cUpper_EE = new TPad("pad_1_EE","pad_1_EE",0.01,0.30,0.99,0.99); - - cLower_EE->SetBottomMargin(0.25); cUpper_EE->SetTopMargin(0.01); - cUpper_EE->SetBottomMargin(0.01); - - cLower_EE->Draw(); - cUpper_EE->Draw(); - - float FontSCF = cUpper_EE->GetHNDC()/cLower_EE->GetHNDC(); - float tYoffset = 0.8; - float labSize = 0.06; - float phiLim = 360.; - cUpper_EE -> cd(); - gPad->SetGrid(); - TH1F *hPad_EE = (TH1F*)gPad->DrawFrame(-3.15,0.90,3.15,1.10); - hPad_EE->GetXaxis()->SetLabelSize(labSize); - hPad_EE->GetXaxis()->SetTitleSize(labSize); - hPad_EE->GetYaxis()->SetLabelSize(labSize); - hPad_EE->GetYaxis()->SetTitleSize(labSize); - hPad_EE->GetXaxis()->SetTitleOffset(tYoffset); - hPad_EE->GetYaxis()->SetTitleOffset(tYoffset); - hPad_EE->GetXaxis()->SetTitle("#phi_{SC}"); - hPad_EE->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto 1/p"); - - g_EoC_EE_1 -> Draw("PL"); - g_EoC_EE_2 -> Draw("PL"); - //g_Corr_EE -> Draw("PL"); - - TLegend *tl_EE = new TLegend(0.80,0.80,0.90,0.95); - tl_EE -> SetTextFont(40); - tl_EE -> SetFillColor(0); - //tl -> SetBorderSize(0); - tl_EE -> AddEntry(g_EoC_EE_1,"Data 2011 EE","PL"); - tl_EE -> AddEntry(g_EoC_EE_2,"Data 2012 EE","PL"); - //tl_EE -> AddEntry(g_Corr_EE,"2011-2012 Combination EE","PL"); - - tl_EE -> Draw(); - - cLower_EE -> cd(); - gPad->SetGrid(); - - TH1F *hRat_EE = (TH1F*)gPad->DrawFrame(-3.15,-0.03,3.15,0.03); - hRat_EE->GetYaxis()->SetNdivisions(505); - hRat_EE->GetXaxis()->SetLabelSize(labSize*FontSCF); - hRat_EE->GetXaxis()->SetTitleSize(labSize*FontSCF); - hRat_EE->GetYaxis()->SetLabelSize(labSize*FontSCF); - hRat_EE->GetYaxis()->SetTitleSize(labSize*FontSCF); - hRat_EE->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); - hRat_EE->GetXaxis()->SetTitleOffset(0.6); - hRat_EE->GetXaxis()->SetTitle("#phi_{SC}"); - hRat_EE->GetYaxis()->SetTitle("Spread/2"); - g_Diff_EE->Draw("PL"); - - Name = Form("g_EoC_EE_%d",etaBin); - g_Corr_EE->Write(Name); - } - - - f3->Close(); -} diff --git a/EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx b/EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx deleted file mode 100644 index a261f1522e9..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/CompareCoeff.cxx +++ /dev/null @@ -1,144 +0,0 @@ -// To compare two sets of IC -// Input needed: two set of IC (2D maps) -{ - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gROOT->ForceStyle(); - - TFile *f1 = TFile::Open("calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B.root"); - TFile *f2 = TFile::Open("calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B_new.root"); - - // input coeff - TH2F *hcmap1 = (TH2F*)f1->Get("h_scale_map"); - TH2F *hcmap2 = (TH2F*)f2->Get("h_scale_map"); - TH2F *hemap1 = (TH2F*)f1->Get("h_error_map"); - TH2F *hemap2 = (TH2F*)f2->Get("h_error_map"); - - // output histos - TH2F * h2 = new TH2F("h2","h2",400,0.5,1.5,400,0.5,1.5); - TH2F * h2diff = (TH2F*)hcmap1->Clone("h2diff"); - h2diff->Reset(); - - TH1F *hdiff = new TH1F("hdiff", "hdiff", 400,-0.5,0.5); - - char hname[100]; - - TH1F *hspread[172]; - for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ - float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); - sprintf(hname,"hspread_ring_ieta%02d",etaring); - hspread[jbin-1]= new TH1F(hname, hname, 400,-0.5,0.5); - } - - for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ - float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); - for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ - float c1 = hcmap1->GetBinContent(ibin,jbin); - float c2 = hcmap2->GetBinContent(ibin,jbin); - float e1 = hemap1->GetBinContent(ibin,jbin); - float e2 = hemap2->GetBinContent(ibin,jbin); - if (c1!=0 && c2!=0 && e1!=-1 && e2!=-1){ - hspread[jbin-1]->Fill( c1-c2 ); - h2->Fill(c1,c2); - h2diff->SetBinContent(ibin,jbin,c1-c2); - if (fabs(etaring) < 40) hdiff->Fill(c1-c2); - - } - } - } - - - TGraphErrors *sigma_vs_ieta = new TGraphErrors(); - sigma_vs_ieta->SetMarkerStyle(20); - sigma_vs_ieta->SetMarkerSize(1); - sigma_vs_ieta->SetMarkerColor(kBlue+2); - - TGraphErrors *rms_vs_ieta = new TGraphErrors(); - rms_vs_ieta->SetMarkerStyle(24); - rms_vs_ieta->SetMarkerSize(1); - rms_vs_ieta->SetMarkerColor(kBlue+2); - - TGraphErrors *scale_vs_ieta = new TGraphErrors(); - scale_vs_ieta->SetMarkerStyle(20); - scale_vs_ieta->SetMarkerSize(1); - scale_vs_ieta->SetMarkerColor(kBlue+2); - - TF1 *fgaus = new TF1("fgaus","gaus",-1,1); - int np = 0; - for (int i = 1; i < hcmap1-> GetNbinsY(); i++){ - float etaring = hcmap1-> GetYaxis()->GetBinCenter(i); - if (int(etaring)==0) continue; - if ( hspread[i-1]->GetEntries() == 0) continue; - hspread[i-1]->Fit("fgaus","Q"); - np++; - sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)); - sigma_vs_ieta-> SetPointError(np,0,fgaus->GetParError(2)); - rms_vs_ieta -> SetPoint(np,etaring, hspread[i-1]->GetRMS()); - rms_vs_ieta -> SetPointError(np,0,hspread[i-1]->GetRMSError() ); - scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); - scale_vs_ieta-> SetPointError(np,0,fgaus->GetParError(1)); - } - - // plot - - TCanvas *csigma = new TCanvas("csigma","csigma"); - csigma->SetGridx(); - csigma->SetGridy(); - sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); - sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); - sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); - sigma_vs_ieta->Draw("ap"); - //rms_vs_ieta->Draw("psame"); - - TCanvas *cscale = new TCanvas("cscale","cscale"); - cscale->SetGridx(); - cscale->SetGridy(); - scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); - scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); - scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); - scale_vs_ieta->Draw("ap"); - - TCanvas *cmap2 = new TCanvas("cmap2","cmap2",500,500); - cmap2->SetGridx(); - cmap2->SetGridy(); - cmap2 -> cd(); - cmap2->SetLeftMargin(0.1); - cmap2->SetRightMargin(0.15); - h2->GetXaxis()->SetRangeUser(0.85,1.15); - h2->GetYaxis()->SetRangeUser(0.85,1.15); - h2->GetXaxis()->SetTitle("C_{1}"); - h2->GetYaxis()->SetTitle("C_{2}"); - h2->Draw("colz"); - - - TCanvas *cdiff = new TCanvas("cdiff","cdiff",700,500); - cdiff->SetGridx(); - cdiff->SetGridy(); - cdiff -> cd(); - cdiff->SetLeftMargin(0.1); - cdiff->SetRightMargin(0.15); - h2diff->GetZaxis()->SetRangeUser(-0.05,0.05); - h2diff->GetXaxis()->SetTitle("i#phi"); - h2diff->GetYaxis()->SetTitle("i#eta"); - h2diff->Draw("colz"); - - -} diff --git a/EOverPCalibration/FastCalibrator/macros/CompareL3Template.C b/EOverPCalibration/FastCalibrator/macros/CompareL3Template.C deleted file mode 100644 index 1df70b5312c..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/CompareL3Template.C +++ /dev/null @@ -1,136 +0,0 @@ -// -// Compare L3 and Template starting from .txt files (IC mediated on phi ring) -// - -{ - // Set style options - - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(1); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - - char TxtFile1[1000] = "/afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/WZAnalysis_SingleEle_Run2011AB.txt"; - char TxtFile2[1000] = "/data2/malberti/Calibration/calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B_new.txt"; - - char buffer[80]; - int Ieta,Iphi; - float IC; - - ifstream file1 (TxtFile1); - ifstream file2 (TxtFile2); - - for (int i=0;i<3;i++) file1.getline (&buffer[0],1000); //skip 3 lines - - TH1F *hL3 = new TH1F("L3","L3",300,0.5,1.5); - TH1F *hTemplate = new TH1F("Template","Template",300,0.5,1.5); - TH1F *hDiff = new TH1F("Diff","Diff",300,-0.5,0.5); - - TH2F *IC_L3 = new TH2F("IC_L3","L3",360,1, 361, 171, -85, 86); - TH2F *IC_Template = new TH2F("IC_Template","Template",360,1, 361, 171, -85, 86); - - TH2F* corr = new TH2F("IC_L3_vs_IC_Template","IC_L3_vs_IC_Template",100,0.8,1.2,100,0.8,1.2); - - while (!file1.eof()){ - - file1.getline (&buffer[0],1000); // read channels - istrstream line (buffer); - line >> Ieta; - line >> Iphi; - line >> IC; - - hL3 -> Fill(IC); - IC_L3 -> Fill(Iphi,Ieta,IC); - - } - - - while (!file2.eof()){ - file2.getline (&buffer[0],1000); // read channels - istrstream line (buffer); - line >> Ieta; - line >> Iphi; - line >> IC; - - if (IC > 1.5 || IC < 0.5) continue; - - hTemplate -> Fill(IC); - IC_Template-> Fill(Iphi,Ieta,IC); - - } - - - for (int iphi=1; iphi<=360; iphi++) - { - for (int ieta=1; ieta<=171; ieta++) - { - if (IC_L3->GetBinContent(iphi,ieta) != 0 && IC_Template->GetBinContent(iphi,ieta) != 0){ - hDiff->Fill( IC_L3->GetBinContent(iphi,ieta) - IC_Template->GetBinContent(iphi,ieta) ); - corr -> Fill(IC_L3->GetBinContent(iphi,ieta),IC_Template->GetBinContent(iphi,ieta)); - - } - } - } - - - TCanvas *c1 = new TCanvas(); - hL3->Draw(); - - TCanvas *c2 = new TCanvas(); - hTemplate->Draw(); - - TCanvas *c3 = new TCanvas(); - IC_L3 -> GetZaxis() -> SetRangeUser(0.93,1.07); - IC_L3->Draw("colz"); - - TCanvas *c4 = new TCanvas(); - IC_Template -> GetZaxis() -> SetRangeUser(0.85,1.15); - IC_Template->Draw("colz"); - - TCanvas *c5 = new TCanvas(); - hDiff->Draw(); - - TCanvas *c6 = new TCanvas(); - corr->GetXaxis()->SetRangeUser(0.8,1.2); - corr->GetYaxis()->SetRangeUser(0.8,1.2); - corr->Draw(); - - double correlation_coeffcient=corr->GetCorrelationFactor(); - double N=corr->GetEntries(); - double t=(fabs(correlation_coeffcient)*sqrt(N-2))/(sqrt(1-pow(fabs(correlation_coeffcient),2))); - double Probability=2*(1-TMath::StudentI(t,N-2)); - - - std::cout<<" Correlation Value = "<GetCorrelationFactor()<<" Probability = "<Print("hL3.png","png"); - c2->Print("hTemplate.png","png"); - c3->Print("IC_L3.png","png"); - c4->Print("IC_Template.png","png"); - c5->Print("hDiff.png","png"); - c6->Print("corr.png","png"); - } - -} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx b/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx deleted file mode 100644 index e74e6966764..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_DATA.cxx +++ /dev/null @@ -1,295 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "TStyle.h" -#include "TROOT.h" -#include "TH1F.h" -#include "TH2F.h" -#include -#include "TFile.h" -#include "TCanvas.h" -// -/// Macro to Correct DATA dinamic alpha with MC/MCTruth for phi lines due to the tracker -// - - -void Correction_TrackerEffect_EE_DATA_dinamic_alpha (Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE/fbrem/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_fbrem_EE.root", - Char_t* fileType = "png", - Char_t* dirName = ".") -{ - - bool printPlots = false; - - /// by xtal - int nbins = 250; - - /// Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(0); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - if ( !infile1 ) { - cout << " No input file specified !" << endl; - return; - } - - - cout << "Making calibration plots for: " << infile1 << endl; - - - /// imput file with full statistic normlized to the mean in a ring - - TFile *f = new TFile(infile1,"UPDATE"); - TH2F *hcmap[2]; - hcmap[0] = (TH2F*)f->Get("h_scale_map_EEM"); - hcmap[1] = (TH2F*)f->Get("h_scale_map_EEP"); - - - /// ring geometry for the endcap - TH2F *hrings[2]; - hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); - hrings[1] = (TH2F*)hcmap[1]->Clone("hringsEEP"); - hrings[0] ->Reset("IMCES"); - hrings[1] ->Reset("IMCES"); - hrings[0] ->ResetStats(); - hrings[1] ->ResetStats(); - - - FILE *fRing; - fRing = fopen("macros/eerings.dat","r"); - int x,y,z,ir; - std::vector number_of_Rings_EEP(40,0); - std::vector number_of_Rings_EEM(40,0); - - while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { - if(z>0) { hrings[1]->Fill(x,y,ir); - number_of_Rings_EEP.at(ir)++; - } - if(z<0) {hrings[0]->Fill(x,y,ir); - number_of_Rings_EEM.at(ir)++; - } - } - - /// noEp Selections -/* std::vector< std::pair > phi_line_EEM; - phi_line_EEM.push_back(std::pair (16.,1.025)); - phi_line_EEM.push_back(std::pair (59.5,1.047)); - phi_line_EEM.push_back(std::pair (71.5,1.028)); - phi_line_EEM.push_back(std::pair (86.,1.042)); - phi_line_EEM.push_back(std::pair (103.,1.034)); - phi_line_EEM.push_back(std::pair (122.5,1.024)); - phi_line_EEM.push_back(std::pair (145.5,1.016)); - phi_line_EEM.push_back(std::pair (164.,1.034)); - phi_line_EEM.push_back(std::pair (183.5,1.043)); - phi_line_EEM.push_back(std::pair (203.5,1.026)); - phi_line_EEM.push_back(std::pair (240.,1.043)); - phi_line_EEM.push_back(std::pair (296.5,1.031)); - phi_line_EEM.push_back(std::pair (315.5,1.029)); - phi_line_EEM.push_back(std::pair (356.,1.038)); - - std::vector > phi_line_EEP; - phi_line_EEP.push_back(std::pair (16.5,1.042)); - phi_line_EEP.push_back(std::pair (60.,1.043)); - phi_line_EEP.push_back(std::pair (72.,1.016)); - phi_line_EEP.push_back(std::pair (85.5,1.042)); - phi_line_EEP.push_back(std::pair (103.,1.024)); - phi_line_EEP.push_back(std::pair (122.5,1.025)); - phi_line_EEP.push_back(std::pair (135.,1.035)); - phi_line_EEP.push_back(std::pair (145.,1.016)); - phi_line_EEP.push_back(std::pair (163.,1.034)); - phi_line_EEP.push_back(std::pair (184.,1.033)); - phi_line_EEP.push_back(std::pair (240.,1.054)); - phi_line_EEP.push_back(std::pair (276.,1.026)); - phi_line_EEP.push_back(std::pair (297.,1.043)); - phi_line_EEP.push_back(std::pair (314.,1.024)); - phi_line_EEP.push_back(std::pair (357.,1.055)); -*/ - -/// R9 Selections - - std::vector< std::pair > phi_line_EEM; - phi_line_EEM.push_back(std::pair (16.,1.02244)); - phi_line_EEM.push_back(std::pair (59.5, 1.03235)); - phi_line_EEM.push_back(std::pair (71.5,1.02545)); - phi_line_EEM.push_back(std::pair (86.,1.04242)); - phi_line_EEM.push_back(std::pair (103.,1.02082)); - phi_line_EEM.push_back(std::pair (122.5,1.01224)); - phi_line_EEM.push_back(std::pair (145.5, 1.01207)); - phi_line_EEM.push_back(std::pair (164.,1.02766)); - phi_line_EEM.push_back(std::pair (183.5,1.03397)); - phi_line_EEM.push_back(std::pair (203.5,1.01597)); - phi_line_EEM.push_back(std::pair (240.,1.03305)); - phi_line_EEM.push_back(std::pair (296.5,1.02419)); - phi_line_EEM.push_back(std::pair (315.5,1.02211)); - phi_line_EEM.push_back(std::pair (356.,1.03243)); - - std::vector > phi_line_EEP; - phi_line_EEP.push_back(std::pair (16.5,1.02514)); - phi_line_EEP.push_back(std::pair (60.,1.02929)); - phi_line_EEP.push_back(std::pair (72.,1.01563)); - phi_line_EEP.push_back(std::pair (85.5,1.02029)); - phi_line_EEP.push_back(std::pair (103.,1.02159)); - phi_line_EEP.push_back(std::pair (122.5,1.02598)); - phi_line_EEP.push_back(std::pair (135.,1.0163)); - phi_line_EEP.push_back(std::pair (145.,1.03654)); - phi_line_EEP.push_back(std::pair (163.,1.02249)); - phi_line_EEP.push_back(std::pair (184.,1.04225)); - phi_line_EEP.push_back(std::pair (240.,1.03254)); - phi_line_EEP.push_back(std::pair (276.,1.01565)); - phi_line_EEP.push_back(std::pair (297.,1.03486)); - phi_line_EEP.push_back(std::pair (314.,1.01318)); - phi_line_EEP.push_back(std::pair (357.,1.03728)); - - TH2F *hcmap_corrected[2]; - hcmap_corrected[0] = (TH2F*)hcmap[0]->Clone("h_scale_map_EEM"); - hcmap_corrected[1] = (TH2F*)hcmap[1]->Clone("h_scale_map_EEP"); - hcmap_corrected[0] ->Reset("ICMES"); - hcmap_corrected[1] ->Reset("ICMES"); - hcmap_corrected[0] ->ResetStats(); - hcmap_corrected[1] ->ResetStats(); - - /// Correction of IC map data - - for(int k=0 ; k<2 ; k++) - { - for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) - { - for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) - { - if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; - float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); - if(phi_xtal<0.) phi_xtal=360.+phi_xtal; - if(k==0) - { int flag=0; - for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) - { int ir = hrings[0]->GetBinContent(ix,iy); - float deltaphi; - if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; - if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; - if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; - if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - float dphi; - if(fabs(phi_xtal-phi_line_EEM.at(ivect).first)<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect).first); - else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect).first); - if(dphiGetBinContent(ix,iy)>1.05) continue; - hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*phi_line_EEM.at(ivect).second); - } - else if(flag==0) {hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - flag=1;} - } - } - - else{ int flag=0; - for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) - { - int ir = hrings[0]->GetBinContent(ix,iy); - float deltaphi; - if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; - if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; - if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; - if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - float dphi; - if(fabs(phi_xtal-phi_line_EEP.at(ivect).first)<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect).first); - else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect).first); - if(dphiGetBinContent(ix,iy)>1.05) continue; - hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*phi_line_EEP.at(ivect).second); - } - else if(flag==0) - { - hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - flag=1; - } - } - } - - } - } - } - - TCanvas *cEEP[12]; - TCanvas *cEEM[12]; - - /// --- plot 0 : map of coefficients - cEEP[0] = new TCanvas("cEEP","cmapEEP Uncorrected"); - cEEP[0] -> cd(); - cEEP[0]->SetLeftMargin(0.1); - cEEP[0]->SetRightMargin(0.13); - cEEP[0]->SetGridx(); - cEEP[0]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - hcmap[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap[1]->Draw("COLZ"); - hcmap[1]->GetXaxis() ->SetTitle("ix"); - hcmap[1]->GetYaxis() ->SetTitle("iy"); - hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[0] = new TCanvas("cEEM","cmapEEM Uncorrected"); - cEEM[0] -> cd(); - cEEM[0]->SetLeftMargin(0.1); - cEEM[0]->SetRightMargin(0.13); - cEEM[0]->SetGridx(); - cEEM[0]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - hcmap[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap[0]->Draw("COLZ"); - hcmap[0]->GetXaxis() ->SetTitle("ix"); - hcmap[0]->GetYaxis() ->SetTitle("iy"); - hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - /// --- plot 0 : map of coefficients - cEEP[1] = new TCanvas("cmapEEP Corrected","cmapEEP Corrected"); - cEEP[1] -> cd(); - cEEP[1]->SetLeftMargin(0.1); - cEEP[1]->SetRightMargin(0.13); - cEEP[1]->SetGridx(); - cEEP[1]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - hcmap_corrected[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap_corrected[1]->Draw("COLZ"); - hcmap_corrected[1]->GetXaxis() ->SetTitle("ix"); - hcmap_corrected[1]->GetYaxis() ->SetTitle("iy"); - hcmap_corrected[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[1] = new TCanvas("cmapEEM Corrected","cmapEEM Corrected"); - cEEM[1] -> cd(); - cEEM[1]->SetLeftMargin(0.1); - cEEM[1]->SetRightMargin(0.13); - cEEM[1]->SetGridx(); - cEEM[1]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - hcmap_corrected[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap_corrected[0]->Draw("COLZ"); - hcmap_corrected[0]->GetXaxis() ->SetTitle("ix"); - hcmap_corrected[0]->GetYaxis() ->SetTitle("iy"); - hcmap_corrected[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - f->cd(); - hcmap_corrected[0]->Write("h_scale_map_corrected_EEM"); - hcmap_corrected[1]->Write("h_scale_map_corrected_EEP"); - - - -} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx b/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx deleted file mode 100644 index 4b3ff1f1c63..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/Correction_TrackerEffect_EE_MC.cxx +++ /dev/null @@ -1,384 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "TStyle.h" -#include "TROOT.h" -#include "TH1F.h" -#include "TH2F.h" -#include -#include "TFile.h" -#include "TCanvas.h" -// -/// Macro to produce correction taking MC and MCTruth to apply on data for phi structure due to the tracker -// - - -void Correction_TrackerEffect_EE_MC (Char_t* infile1 = "/afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/output/IC_MC_4Correction.root", - Char_t* fileType = "png", - Char_t* dirName = ".") -{ - - bool printPlots = false; - - /// by xtal - int nbins = 250; - - /// Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - if ( !infile1 ) { - cout << " No input file specified !" << endl; - return; - } - - - cout << "Making calibration plots for: " << infile1 << endl; - - - /// imput file with full statistic normlized to the mean in a ring - - TFile *f = new TFile(infile1); - TH2F *hcmap[2]; - hcmap[0] = (TH2F*)f->Get("ICComparison_EEM"); - hcmap[1] = (TH2F*)f->Get("ICComparison_EEP"); - - - /// ring geometry for the endcap - TH2F *hrings[2]; - hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); - hrings[1] = (TH2F*)hcmap[0]->Clone("hringsEEP"); - hrings[0] ->Reset("ICMES"); - hrings[1] ->Reset("ICEMS"); - hrings[0] ->ResetStats(); - hrings[1] ->ResetStats(); - - - FILE *fRing; - fRing = fopen("macros/eerings.dat","r"); - int x,y,z,ir; - std::vector number_of_Rings_EEP(40,0); - std::vector number_of_Rings_EEM(40,0); - - while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { - if(z>0) { hrings[1]->Fill(x,y,ir); - number_of_Rings_EEP.at(ir)++; - } - if(z<0) {hrings[0]->Fill(x,y,ir); - number_of_Rings_EEM.at(ir)++; - } - } - /// Declaration of phi structure coordinate - std::vector phi_line_EEM; - phi_line_EEM.push_back(16.); - phi_line_EEM.push_back(59.5); - phi_line_EEM.push_back(71.5); - phi_line_EEM.push_back(83.5); - phi_line_EEM.push_back(105.); - phi_line_EEM.push_back(123.5); - phi_line_EEM.push_back(145.); - phi_line_EEM.push_back(164.); - phi_line_EEM.push_back(183.5); - phi_line_EEM.push_back(203.5); - phi_line_EEM.push_back(240.); - phi_line_EEM.push_back(297.); - phi_line_EEM.push_back(314.5); - phi_line_EEM.push_back(356.5); - - std::vector phi_line_EEP; - phi_line_EEP.push_back(16.5); - phi_line_EEP.push_back(60.); - phi_line_EEP.push_back(72.); - phi_line_EEP.push_back(85.); - phi_line_EEP.push_back(105.); - phi_line_EEP.push_back(123.); - phi_line_EEP.push_back(135.); - phi_line_EEP.push_back(145.); - phi_line_EEP.push_back(163.); - phi_line_EEP.push_back(184.); - phi_line_EEP.push_back(240.); - phi_line_EEP.push_back(287.); - phi_line_EEP.push_back(296.); - phi_line_EEP.push_back(314.); - phi_line_EEP.push_back(356.); - - /// Calcolation of correction factors - std::vector Bad_IC_EEP(phi_line_EEP.size(),0); - std::vector Good_IC_EEP(phi_line_EEP.size(),0); - std::vector Bad_IC_EEM(phi_line_EEM.size(),0); - std::vector Good_IC_EEM(phi_line_EEM.size(),0); - std::vector sum_Bad_IC_EEP(phi_line_EEP.size(),0),sum_Good_IC_EEP(phi_line_EEP.size(),0),sum_Good_IC_EEM(phi_line_EEM.size(),0),sum_Bad_IC_EEM(phi_line_EEM.size(),0); - std::vector num_Bad_IC_EEP(phi_line_EEP.size(),0),num_Good_IC_EEP(phi_line_EEP.size(),0),num_Good_IC_EEM(phi_line_EEM.size(),0),num_Bad_IC_EEM(phi_line_EEM.size(),0); - - TH2F *Bad_EEP = (TH2F*) hcmap[0]->Clone("Bad_EEP"); - TH2F *Bad_EEM = (TH2F*) hcmap[1]->Clone("Bad_EEM"); - Bad_EEP->Reset(); - Bad_EEM->Reset(); - Bad_EEP->ResetStats(); - Bad_EEM->ResetStats(); - - - for(int k=0 ; k<2 ; k++) - { - for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) - { - for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) - { - if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; - float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); - if(phi_xtal<0.) phi_xtal=360.+phi_xtal; - if(k==0) - { - for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) - { - float deltaphi=0; - int ir = hrings[0]->GetBinContent(ix,iy); - if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; - if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; - if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; - if(ir>=32) continue; - float dphi=0; - if(fabs(phi_xtal-phi_line_EEM.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect)); - else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect)); - if(dphiGetBinContent(ix,iy)>1.05) continue; - sum_Bad_IC_EEM[ivect]=sum_Bad_IC_EEM[ivect]+hcmap[k]->GetBinContent(ix,iy); - num_Bad_IC_EEM[ivect]++; - Bad_EEM->Fill(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - } - else{ - sum_Good_IC_EEM[ivect] = sum_Good_IC_EEM[ivect] +hcmap[k]->GetBinContent(ix,iy); - num_Good_IC_EEM[ivect]++; - } - } - } - - else{ - for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) - { - int ir = hrings[1]->GetBinContent(ix,iy); - float deltaphi; - if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; - if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; - if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; - if(ir>=33) continue; - float dphi; - if(fabs(phi_xtal-phi_line_EEP.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect)); - else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect)); - - if(dphiGetBinContent(ix,iy)>1.05) continue; - sum_Bad_IC_EEP[ivect]=sum_Bad_IC_EEP[ivect]+hcmap[k]->GetBinContent(ix,iy); - num_Bad_IC_EEP[ivect]++; - Bad_EEP->Fill(ix,iy,hcmap[k]->GetBinContent(ix,iy));} - else{ - sum_Good_IC_EEP[ivect] = sum_Good_IC_EEP[ivect] +hcmap[k]->GetBinContent(ix,iy); - num_Good_IC_EEP[ivect]++;} - } - - } - } - } - } - /// Vectors of empiric correction factors - for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++){ - if(num_Bad_IC_EEM[ivect]!=0) - Bad_IC_EEM.at(ivect)=sum_Bad_IC_EEM[ivect]/num_Bad_IC_EEM[ivect]; - if(num_Good_IC_EEM[ivect]!=0) - Good_IC_EEM.at(ivect)= sum_Good_IC_EEM[ivect]/num_Good_IC_EEM[ivect]; - cout<<" Good/Bad - "<< Good_IC_EEM.at(ivect)/Bad_IC_EEM.at(ivect)<Clone("h_scale_map_EEM"); - hcmap_corrected[1] = (TH2F*)hcmap[1]->Clone("h_scale_map_EEP"); - hcmap_corrected[0] ->Reset("ICMES"); - hcmap_corrected[1] ->Reset("ICMES"); - hcmap_corrected[0] ->ResetStats(); - hcmap_corrected[1] ->ResetStats(); - - for(int k=0 ; k<2 ; k++) - { - for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) - { - for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) - { - if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; - float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); - if(phi_xtal<0.) phi_xtal=360.+phi_xtal; - if(k==0) - { int flag=0; - for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) - { - int ir = hrings[0]->GetBinContent(ix,iy); - float deltaphi; - if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; - if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; - if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; - if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - float dphi; - if(fabs(phi_xtal-phi_line_EEM.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect)); - else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect)); - if(dphiGetBinContent(ix,iy)>1.05) continue; - hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*Good_IC_EEM.at(ivect)/Bad_IC_EEM.at(ivect)); -// cout<<"original "<GetBinContent(ix,iy)<<" Corrected "<GetBinContent(ix,iy)<SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - flag=1;} - } - } - - else{ int flag=0; - for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) - { - int ir = hrings[0]->GetBinContent(ix,iy); - float deltaphi; - if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; - if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; - if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; - if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - float dphi; - if(fabs(phi_xtal-phi_line_EEP.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect)); - else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect)); - if(dphiGetBinContent(ix,iy)>1.05) continue; - hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*Good_IC_EEP.at(ivect)/Bad_IC_EEP.at(ivect)); - } - else if(flag==0) - { - hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); - flag=1; - } - } - } - - } - } - } - - TCanvas *cEEP[12]; - TCanvas *cEEM[12]; - - /// --- plot 0 : map of coefficients - cEEP[0] = new TCanvas("cEEP","cmapEEP Uncorrected"); - cEEP[0] -> cd(); - cEEP[0]->SetLeftMargin(0.1); - cEEP[0]->SetRightMargin(0.13); - cEEP[0]->SetGridx(); - cEEP[0]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - hcmap[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap[1]->Draw("COLZ"); - hcmap[1]->GetXaxis() ->SetTitle("ix"); - hcmap[1]->GetYaxis() ->SetTitle("iy"); - hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[0] = new TCanvas("cEEM","cmapEEM Uncorrected"); - cEEM[0] -> cd(); - cEEM[0]->SetLeftMargin(0.1); - cEEM[0]->SetRightMargin(0.13); - cEEM[0]->SetGridx(); - cEEM[0]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - hcmap[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap[0]->Draw("COLZ"); - hcmap[0]->GetXaxis() ->SetTitle("ix"); - hcmap[0]->GetYaxis() ->SetTitle("iy"); - hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - - // --- plot 0 : map of coefficients - cEEP[1] = new TCanvas("cmapEEP","cmapEEP"); - cEEP[1] -> cd(); - cEEP[1]->SetLeftMargin(0.1); - cEEP[1]->SetRightMargin(0.13); - cEEP[1]->SetGridx(); - cEEP[1]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - Bad_EEP->GetXaxis() -> SetLabelSize(0.03); - Bad_EEP->Draw("COLZ"); - Bad_EEP->GetXaxis() ->SetTitle("ix"); - Bad_EEP->GetYaxis() ->SetTitle("iy"); - Bad_EEP->GetZaxis() ->SetRangeUser(0.85,1.15); - - cEEM[1] = new TCanvas("cmapEEM","cmapEEM"); - cEEM[1] -> cd(); - cEEM[1]->SetLeftMargin(0.1); - cEEM[1]->SetRightMargin(0.13); - cEEM[1]->SetGridx(); - cEEM[1]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - Bad_EEM->GetXaxis() -> SetLabelSize(0.03); - Bad_EEM->Draw("COLZ"); - Bad_EEM->GetXaxis() ->SetTitle("ix"); - Bad_EEM->GetYaxis() ->SetTitle("iy"); - Bad_EEM->GetZaxis() ->SetRangeUser(0.85,1.15); - - // --- plot 0 : map of coefficients - cEEP[2] = new TCanvas("cmapEEP Corrected","cmapEEP Corrected"); - cEEP[2] -> cd(); - cEEP[2]->SetLeftMargin(0.1); - cEEP[2]->SetRightMargin(0.13); - cEEP[2]->SetGridx(); - cEEP[2]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - hcmap_corrected[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap_corrected[1]->Draw("COLZ"); - hcmap_corrected[1]->GetXaxis() ->SetTitle("ix"); - hcmap_corrected[1]->GetYaxis() ->SetTitle("iy"); - hcmap_corrected[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[2] = new TCanvas("cmapEEM Corrected","cmapEEM Corrected"); - cEEM[2] -> cd(); - cEEM[2]->SetLeftMargin(0.1); - cEEM[2]->SetRightMargin(0.13); - cEEM[2]->SetGridx(); - cEEM[2]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - hcmap_corrected[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap_corrected[0]->Draw("COLZ"); - hcmap_corrected[0]->GetXaxis() ->SetTitle("ix"); - hcmap_corrected[0]->GetYaxis() ->SetTitle("iy"); - hcmap_corrected[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - - - - - -} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C deleted file mode 100644 index 94fcdd1a8ca..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB.C +++ /dev/null @@ -1,442 +0,0 @@ - -// -// Macro to produce ECAL single electron calibration plots -// - -void DrawCalibrationPlotsEB( Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", - Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", - Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", - int evalStat = 0, - Char_t* fileType = "png", - Char_t* dirName = ".") -{ - - bool printPlots = false; - - // by TT - int nbins = 500; - - // by xtal - //int nbins = 500; - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - if ( !infile1 ) { - cout << " No input file specified !" << endl; - return; - } - - - if ( evalStat && (!infile2 || !infile3 )){ - cout << " No input files to evaluate statistical precision specified !" << endl; - return; - } - - cout << "Making calibration plots for: " << infile1 << endl; - - TFile *f = new TFile(infile1); - TH2F *h_scale_EB = (TH2F*)f->Get("h_scale_EB"); - TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); - hcmap -> Reset("ICEMS"); - - // Mean over phi - - for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1 ; iEta ++) - { - float SumIC = 0; - int numIC = 0; - - for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) - { - if( h_scale_EB->GetBinContent(iPhi,iEta) !=0) - { - SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); - numIC ++ ; - } - } - - for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) - { - if(numIC!=0 && SumIC!=0) - hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); - } - } - - - - //----------------------------------------------------------------- - //--- Build the precision vs ieta plot starting from the TH2F of IC - //----------------------------------------------------------------- - TH1F *hoccall = new TH1F("hoccall", "hoccall", 1000,0.,1000.); - for (int jbin = 1; jbin < h_occupancy-> GetNbinsY()+1; jbin++){ - for (int ibin = 1; ibin < h_occupancy-> GetNbinsX()+1; ibin++){ - float ic = h_occupancy->GetBinContent(ibin,jbin); - hoccall->Fill(ic); - } - } - - TH1F *hspreadall = new TH1F("hspreadall", "hspreadall", 800,0.,2.); - for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ - for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ - float ic = hcmap->GetBinContent(ibin,jbin); - if (ic>0 && ic<2 && ic !=1) { - hspreadall->Fill(ic); - } - } - } - - - TH1F *hspread[172]; - char hname[100]; - char htitle[100]; - - for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ - //float etaring = hcmap-> GetYaxis()->GetBinLowEdge(jbin); - float etaring = hcmap-> GetYaxis()->GetBinCenter(jbin); - sprintf(hname,"hspread_ring_ieta%02d",etaring); - hspread[jbin-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); - for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ - float ic = hcmap->GetBinContent(ibin,jbin); - if (ic>0 && ic<2 && ic!=1) { - hspread[jbin-1]->Fill(ic); - } - } - } - - TGraphErrors *sigma_vs_ieta = new TGraphErrors(); - sigma_vs_ieta->SetMarkerStyle(20); - sigma_vs_ieta->SetMarkerSize(1); - sigma_vs_ieta->SetMarkerColor(kBlue+2); - - TGraphErrors *scale_vs_ieta = new TGraphErrors(); - scale_vs_ieta->SetMarkerStyle(20); - scale_vs_ieta->SetMarkerSize(1); - scale_vs_ieta->SetMarkerColor(kBlue+2); - - TF1 *fgaus = new TF1("fgaus","gaus",-10,10); - int np = 0; - for (int i = 1; i < hcmap-> GetNbinsY()+1; i++){ - float etaring = hcmap-> GetYaxis()->GetBinCenter(i); - //float etaring = hcmap-> GetYaxis()->GetBinLowEdge(i); - if (int(etaring)==0) continue; - if (hspread[i-1]-> GetEntries() == 0) continue; - if (fabs(etaring) > 60) hspread[i-1]->Rebin(2); - float e = 0.5*hcmap-> GetYaxis()->GetBinWidth(i); - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hspread[i-1]->GetRMS()); - fgaus->SetRange(1-5*hspread[i-1]->GetRMS(),1+5*hspread[i-1]->GetRMS()); - hspread[i-1]->Fit("fgaus","QR"); - sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)/fgaus->GetParameter(1)); - //cout << etaring << " " << fgaus->GetParameter(2)/fgaus->GetParameter(1) << endl; - sigma_vs_ieta-> SetPointError(np, e ,fgaus->GetParError(2)/fgaus->GetParameter(1)); - scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); - scale_vs_ieta-> SetPointError(np,e,fgaus->GetParError(1)); - np++; - - } - - - if (evalStat){ - TFile *f2 = new TFile(infile2); - TH2F *h_scale_EB_2 = (TH2F*)f2->Get("h_scale_EB"); - TH2F *hcmap2 = (TH2F*) h_scale_EB->Clone("hcmap2"); - hcmap2 -> Reset("ICEMS"); - - // Mean over phi - - for (int iEta = 1 ; iEta < h_scale_EB_2->GetNbinsY()+1 ; iEta ++) - { - float SumIC = 0; - int numIC = 0; - - for(int iPhi = 1 ; iPhi < h_scale_EB_2->GetNbinsX()+1 ; iPhi++) - { - if( h_scale_EB_2->GetBinContent(iPhi,iEta) !=0) - { - SumIC = SumIC + h_scale_EB_2->GetBinContent(iPhi,iEta); - numIC ++ ; - } - } - - for (int iPhi = 1; iPhi< h_scale_EB_2->GetNbinsX()+1 ; iPhi++) - { - if(numIC!=0 && SumIC!=0) - hcmap2->SetBinContent(iPhi,iEta,h_scale_EB_2->GetBinContent(iPhi,iEta)/(SumIC/numIC)); - } - } - - - TFile *f3 = new TFile(infile3); - TH2F *h_scale_EB_3 = (TH2F*)f3->Get("h_scale_EB"); - TH2F *hcmap3 = (TH2F*) h_scale_EB->Clone("hcmap3"); - hcmap3 -> Reset("ICEMS"); - - // Mean over phi - - for (int iEta = 1 ; iEta < h_scale_EB_3->GetNbinsY()+1 ; iEta ++) - { - float SumIC = 0; - int numIC = 0; - - for(int iPhi = 1 ; iPhi < h_scale_EB_3->GetNbinsX()+1 ; iPhi++) - { - if( h_scale_EB_3->GetBinContent(iPhi,iEta) !=0) - { - SumIC = SumIC + h_scale_EB_3->GetBinContent(iPhi,iEta); - numIC ++ ; - } - } - - for (int iPhi = 1; iPhi< h_scale_EB_3->GetNbinsX()+1 ; iPhi++) - { - if(numIC!=0 && SumIC!=0) - hcmap3->SetBinContent(iPhi,iEta,h_scale_EB_3->GetBinContent(iPhi,iEta)/(SumIC/numIC)); - } - } - - TH1F *hstatprecision[171]; - - for (int jbin = 1; jbin < hcmap2-> GetNbinsY()+1; jbin++){ - //int etaring = -85+(jbin-1); - float etaring = hcmap2-> GetYaxis()->GetBinCenter(jbin); - sprintf(hname,"hstatprecision_ring_ieta%02d",etaring); - hstatprecision[jbin-1] = new TH1F(hname, hname, nbins,-0.5,0.5); - for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ - float ic1 = hcmap2->GetBinContent(ibin,jbin); - float ic2 = hcmap3->GetBinContent(ibin,jbin); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ - hstatprecision[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample - } - } - - - } - - TGraphErrors *statprecision_vs_ieta = new TGraphErrors(); - statprecision_vs_ieta->SetMarkerStyle(20); - statprecision_vs_ieta->SetMarkerSize(1); - statprecision_vs_ieta->SetMarkerColor(kRed+2); - - int n = 0; - for (int i = 1; i < hcmap2-> GetNbinsY()+1; i++){ - etaring = hcmap2-> GetYaxis()->GetBinCenter(i); - //etaring = hcmap2-> GetYaxis()->GetBinLowEdge(i); - if (etaring==0) continue; - if ( hstatprecision[i-1]->GetEntries() == 0) continue; - if (fabs(etaring) > 60)hstatprecision[i-1]->Rebin(2); - float e = 0.5*hcmap2-> GetYaxis()->GetBinWidth(i); - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hstatprecision[i-1]->GetRMS()); - fgaus->SetRange(-5*hstatprecision[i-1]->GetRMS(),5*hstatprecision[i-1]->GetRMS()); - hstatprecision[i-1]->Fit("fgaus","QR"); - statprecision_vs_ieta-> SetPoint(n,etaring,fgaus->GetParameter(2)); - statprecision_vs_ieta-> SetPointError(n,e,fgaus->GetParError(2)); - n++; - } - - TGraphErrors *residual_vs_ieta = new TGraphErrors(); - residual_vs_ieta->SetMarkerStyle(20); - residual_vs_ieta->SetMarkerSize(1); - residual_vs_ieta->SetMarkerColor(kGreen+2); - - - - for (int i= 0; i < statprecision_vs_ieta-> GetN(); i++){ - double spread, espread; - double stat, estat; - double residual, eresidual; - double xdummy,ex; - sigma_vs_ieta-> GetPoint(i, xdummy, spread ); - espread = sigma_vs_ieta-> GetErrorY(i); - statprecision_vs_ieta-> GetPoint(i, xdummy, stat ); - estat = statprecision_vs_ieta-> GetErrorY(i); - ex = statprecision_vs_ieta-> GetErrorX(i); - if (spread > stat ){ - residual = sqrt( spread*spread - stat*stat ); - eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; - } - else { - residual = 0; - eresidual = 0; - } - cout << residual << " " << eresidual << endl; - residual_vs_ieta->SetPoint(i,xdummy, residual); - residual_vs_ieta->SetPointError(i,ex,eresidual); - - - } - - } - - - - //------------------------------------------------------------------------ - - - - - //----------------------------------------------------------------- - //--- Draw plots - //----------------------------------------------------------------- - TCanvas *c[10]; - - // --- plot 0 : map of coefficients - c[0] = new TCanvas("cmap","cmap"); - c[0] -> cd(); - c[0]->SetLeftMargin(0.1); - c[0]->SetRightMargin(0.13); - c[0]->SetGridx(); - hcmap->GetXaxis()->SetNdivisions(1020); - hcmap->GetXaxis() -> SetLabelSize(0.03); - hcmap->Draw("COLZ"); - hcmap->GetXaxis() ->SetTitle("i#phi"); - hcmap->GetYaxis() ->SetTitle("i#eta"); - hcmap->GetZaxis() ->SetRangeUser(0.9,1.1); - - c[7] = new TCanvas("cmap2","cmap2"); - c[7] -> cd(); - c[7]->SetLeftMargin(0.1); - c[7]->SetRightMargin(0.13); - c[7]->SetGridx(); - h_scale_EB->GetXaxis()->SetNdivisions(1020); - h_scale_EB->GetXaxis() -> SetLabelSize(0.03); - h_scale_EB->Draw("COLZ"); - h_scale_EB->GetXaxis() ->SetTitle("i#phi"); - h_scale_EB->GetYaxis() ->SetTitle("i#eta"); - h_scale_EB->GetZaxis() ->SetRangeUser(0.9,1.1); - - - - - // --- plot 1 : ring precision vs ieta - c[1] = new TCanvas("csigma","csigma"); - c[1]->SetGridx(); - c[1]->SetGridy(); - sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); - sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); - sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - sigma_vs_ieta->Draw("ap"); - if (evalStat){ - statprecision_vs_ieta->Draw("psame"); - sigma_vs_ieta->Draw("psame"); - TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); - leg->SetFillColor(0); - leg->AddEntry(statprecision_vs_ieta,"statistical precision", "LP"); - leg->AddEntry(sigma_vs_ieta,"spread", "LP"); - leg->Draw("same"); - } - - // --- plot 2 : scale vs ieta - c[2] = new TCanvas("c_scale_vs_ieta","c_scale_vs_ieta"); - c[2]->SetGridx(); - c[2]->SetGridy(); - scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.95,1.05); - scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("scale"); - scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - scale_vs_ieta->Draw("ap"); - - // --- plot 3 : spread all coefficients - c[3] = new TCanvas("cspread","cspread",500,500); - hspreadall->SetFillStyle(3004); - hspreadall->SetFillColor(kGreen+2); - hspreadall->GetXaxis()-> SetRangeUser(0.8,1.2); - hspreadall->GetXaxis()-> SetTitle("c"); - hspreadall->Draw("hs"); - gPad->Update(); - - TPaveStats *s_spread = (TPaveStats*)(hspreadall->GetListOfFunctions()->FindObject("stats")); - s_spread -> SetX1NDC(0.55); //new x start position - s_spread -> SetX2NDC(0.85); //new x end position - s_spread -> SetY1NDC(0.750); //new x start position - s_spread -> SetY2NDC(0.85); //new x end position - s_spread -> SetOptStat(1110); - s_spread -> SetTextColor(kGreen+2); - s_spread -> SetTextSize(0.03); - s_spread -> Draw("sames"); - - //--- plot 4 : occupancy map - c[4] = new TCanvas("cOcc","cOcc"); - c[4]->SetLeftMargin(0.1); - c[4]->SetRightMargin(0.13); - c[4]-> cd(); - c[4]->SetGridx(); - h_occupancy->GetXaxis()->SetNdivisions(1020); - h_occupancy->GetXaxis() -> SetLabelSize(0.03); - h_occupancy->Draw("COLZ"); - h_occupancy->GetXaxis() ->SetTitle("i#phi"); - h_occupancy->GetYaxis() ->SetTitle("i#eta"); - - - // --- plot 5 : statistical precision vs ieta - if (evalStat){ - c[5] = new TCanvas("cstat","cstat"); - c[5]->SetGridx(); - c[5]->SetGridy(); - statprecision_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); - statprecision_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - statprecision_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); - statprecision_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - statprecision_vs_ieta->Draw("ap"); - -// TF1 *fp = new TF1("fp","pol0"); -// fp->SetRange(-40,40); -// statprecision_vs_ieta->Fit("fp","QRN"); -// float stat = fp->GetParameter(0); -// float estat = fp->GetParError(0); -// cout << "Statistical precision in |ieta| < 40 --> " << stat << " +/- " << estat << endl; -// sigma_vs_ieta->Fit("fp","QRN"); -// float spread = fp->GetParameter(0); -// float espread = fp->GetParError(0); -// cout << "Spread in |ieta| < 40 --> " << spread << " +/- " << espread << endl; -// float residual = sqrt( spread*spread - stat*stat ); -// float eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; -// cout << "Residual miscalibration : " << residual << " +/- " << eresidual << endl; - - c[6] = new TCanvas("cresidual","cresidual"); - c[6]->SetGridx(); - c[6]->SetGridy(); - residual_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); - residual_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - residual_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); - residual_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - residual_vs_ieta->Draw("ap"); - - - } - - //----------------------------------------------------------------- - //--- Print plots - //----------------------------------------------------------------- - - if (printPlots){ - - //gStyle->SetOptStat(1110); - c[0]->Print("IC_map.png",fileType); - c[1]->Print("IC_precision_vs_ieta.png",fileType); - c[2]->Print("IC_scale_vs_ieta.png",fileType); - c[3]->Print("IC_spread.png",fileType); - c[4]->Print("occupancy_map.png",fileType); - } -} diff --git a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C deleted file mode 100644 index 10534cc792b..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEB_phiGroups.C +++ /dev/null @@ -1,406 +0,0 @@ -// -// Macro to produce ECAL single electron calibration plots -// - -void DrawCalibrationPlotsEB_phiGroups(Char_t* infile1 = -"/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", - Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/Even_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", - Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/Odd_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", - int evalStat = 1, - Char_t* fileType = "png", - Char_t* dirName = ".") -{ - - - // by xtal - int nbins = 500; - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - if ( !infile1 ) { - cout << " No input file specified !" << endl; - return; - } - - - if ( evalStat && (!infile2 || !infile3 )){ - cout << " No input files to evaluate statistical precision specified !" << endl; - return; - } - - cout << "Making calibration plots for: " << infile1 << endl; - - TFile *f = new TFile(infile1); - TH2F *h_scale_EB = (TH2F*)f->Get("h_scale_EB"); - TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); - hcmap -> Reset("ICEMS"); - - // Mean over phi - - for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1 ; iEta ++) - { - float SumIC = 0; - int numIC = 0; - - for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) - { - if( h_scale_EB->GetBinContent(iPhi,iEta) !=0) - { - SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); - numIC ++ ; - } - } - - for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) - { - if(numIC!=0 && SumIC!=0) - hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); - } - } - - - - //----------------------------------------------------------------- - //--- Build the precision vs ieta plot starting from the TH2F of IC - //----------------------------------------------------------------- - - TH1F *hspreadGroupEta[34]; - TH1F *hspreadGroupEtaFold[17]; - - char hname[100]; - char htitle[100]; - - int ringGroupSize = 5; - int nStep = 0; - - for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ - if (jbin < 86 && (jbin-1)%ringGroupSize == 0 ) { - nStep++; - sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); - hspreadGroupEta[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); - sprintf(hname,"hspread_ringGroup_ietaFolded%02d",nStep); - hspreadGroupEtaFold[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); - } - if (jbin > 86 && (jbin-2)%ringGroupSize == 0 ) { - nStep++; - sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); - hspreadGroupEta[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); - } - - for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ - float ic = hcmap->GetBinContent(ibin,jbin); - if (ic>0 && ic<2 && ic!=1) { - hspreadGroupEta[nStep-1]->Fill(ic); - if (nStep <= 17) hspreadGroupEtaFold[nStep-1]->Fill(ic); - else hspreadGroupEtaFold[34-nStep]->Fill(ic); - } - } - } - - - TGraphErrors *sigma_vs_GroupEta = new TGraphErrors(); - sigma_vs_GroupEta->SetMarkerStyle(20); - sigma_vs_GroupEta->SetMarkerSize(1); - sigma_vs_GroupEta->SetMarkerColor(kBlue+2); - - TGraphErrors *sigma_vs_GroupEtaFold = new TGraphErrors(); - sigma_vs_GroupEtaFold->SetMarkerStyle(20); - sigma_vs_GroupEtaFold->SetMarkerSize(1); - sigma_vs_GroupEtaFold->SetMarkerColor(kBlue+2); - - TF1 *fgaus = new TF1("fgaus","gaus",-10,10); - int np = 0; - for (int i = 1; i < 35; i++){ - float etaring = hcmap->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); - float e = 0.5*ringGroupSize; - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hspreadGroupEta[i-1]->GetRMS()); - fgaus->SetRange(1-5*hspreadGroupEta[i-1]->GetRMS(),1+5*hspreadGroupEta[i-1]->GetRMS()); - hspreadGroupEta[i-1]->Fit("fgaus","QR"); - - sigma_vs_GroupEta-> SetPoint(np,etaring,fgaus->GetParameter(2)); - sigma_vs_GroupEta-> SetPointError(np,e,fgaus->GetParError(2)); - np++; - } - - np = 0; - for (int i = 1; i < 18; i++){ - float etaring = hcmap->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); - float e = 0.5*ringGroupSize; - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hspreadGroupEtaFold[i-1]->GetRMS()); - fgaus->SetRange(1-5*hspreadGroupEtaFold[i-1]->GetRMS(),1+5*hspreadGroupEtaFold[i-1]->GetRMS()); - hspreadGroupEtaFold[i-1]->Fit("fgaus","QR"); - - sigma_vs_GroupEtaFold-> SetPoint(np,fabs(etaring),fgaus->GetParameter(2)); - sigma_vs_GroupEtaFold-> SetPointError(np,e,fgaus->GetParError(2)); - np++; - } - - - if (evalStat){ - TFile *f2 = new TFile(infile2); - TH2F *h_scale_EB_2 = (TH2F*)f2->Get("h_scale_EB"); - TH2F *hcmap2 = (TH2F*) h_scale_EB->Clone("hcmap2"); - hcmap2 -> Reset("ICEMS"); - - // Mean over phi - - for (int iEta = 1 ; iEta < h_scale_EB_2->GetNbinsY()+1 ; iEta ++) - { - float SumIC = 0; - int numIC = 0; - - for(int iPhi = 1 ; iPhi < h_scale_EB_2->GetNbinsX()+1 ; iPhi++) - { - if( h_scale_EB_2->GetBinContent(iPhi,iEta) !=0) - { - SumIC = SumIC + h_scale_EB_2->GetBinContent(iPhi,iEta); - numIC ++ ; - } - } - - for (int iPhi = 1; iPhi< h_scale_EB_2->GetNbinsX()+1 ; iPhi++) - { - if(numIC!=0 && SumIC!=0) - hcmap2->SetBinContent(iPhi,iEta,h_scale_EB_2->GetBinContent(iPhi,iEta)/(SumIC/numIC)); - } - } - - - TFile *f3 = new TFile(infile3); - TH2F *h_scale_EB_3 = (TH2F*)f3->Get("h_scale_EB"); - TH2F *hcmap3 = (TH2F*) h_scale_EB_3->Clone("hcmap3"); - hcmap3 -> Reset("ICEMS"); - - // Mean over phi - - for (int iEta = 1 ; iEta < h_scale_EB_3->GetNbinsY()+1 ; iEta ++) - { - float SumIC = 0; - int numIC = 0; - - for(int iPhi = 1 ; iPhi < h_scale_EB_3->GetNbinsX()+1 ; iPhi++) - { - if( h_scale_EB_3->GetBinContent(iPhi,iEta) !=0) - { - SumIC = SumIC + h_scale_EB_3->GetBinContent(iPhi,iEta); - numIC ++ ; - } - } - - for (int iPhi = 1; iPhi< h_scale_EB_3->GetNbinsX()+1 ; iPhi++) - { - if(numIC!=0 && SumIC!=0) - hcmap3->SetBinContent(iPhi,iEta,h_scale_EB_3->GetBinContent(iPhi,iEta)/(SumIC/numIC)); - } - } - TH1F *hstatprecisionGroupEta[34]; - TH1F *hstatprecisionGroupEtaFold[17]; - - nStep = 0; - for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ - if (jbin < 86 && (jbin-1)%ringGroupSize == 0 ) { - nStep++; - sprintf(hname,"hstatprecision_ringGroup_ieta%02d",nStep); - hstatprecisionGroupEta[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); - sprintf(hname,"hstatprecision_ringGroup_ietaFolded%02d",nStep); - hstatprecisionGroupEtaFold[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); - } - if (jbin > 86 && (jbin-2)%ringGroupSize == 0 ) { - nStep++; - sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); - hstatprecisionGroupEta[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); - } - - for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ - float ic1 = hcmap2->GetBinContent(ibin,jbin); - float ic2 = hcmap3->GetBinContent(ibin,jbin); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1) { - hstatprecisionGroupEta[nStep-1]->Fill((ic1-ic2)/(ic1+ic2)); - if (nStep <= 17) hstatprecisionGroupEtaFold[nStep-1]->Fill((ic1-ic2)/(ic1+ic2)); - else hstatprecisionGroupEtaFold[34-nStep]->Fill((ic1-ic2)/(ic1+ic2)); - } - } - } - - - TGraphErrors *statprecision_vs_GroupEta = new TGraphErrors(); - statprecision_vs_GroupEta->SetMarkerStyle(20); - statprecision_vs_GroupEta->SetMarkerSize(1); - statprecision_vs_GroupEta->SetMarkerColor(kRed+2); - - TGraphErrors *statprecision_vs_GroupEtaFold = new TGraphErrors(); - statprecision_vs_GroupEtaFold->SetMarkerStyle(20); - statprecision_vs_GroupEtaFold->SetMarkerSize(1); - statprecision_vs_GroupEtaFold->SetMarkerColor(kRed+2); - - np = 0; - for (int i = 1; i < 35; i++){ - float etaring = hcmap2->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); - float e = 0.5*ringGroupSize; - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hstatprecisionGroupEta[i-1]->GetRMS()); - fgaus->SetRange(-5*hstatprecisionGroupEta[i-1]->GetRMS(),5*hstatprecisionGroupEta[i-1]->GetRMS()); - hstatprecisionGroupEta[i-1]->Fit("fgaus","QR"); - - statprecision_vs_GroupEta-> SetPoint(np,etaring,fgaus->GetParameter(2)); - statprecision_vs_GroupEta-> SetPointError(np,e,fgaus->GetParError(2)); - np++; - } - - np = 0; - for (int i = 1; i < 18; i++){ - float etaring = hcmap2->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); - float e = 0.5*ringGroupSize; - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hstatprecisionGroupEtaFold[i-1]->GetRMS()); - fgaus->SetRange(-5*hstatprecisionGroupEtaFold[i-1]->GetRMS(),5*hstatprecisionGroupEtaFold[i-1]->GetRMS()); - hstatprecisionGroupEtaFold[i-1]->Fit("fgaus","QR"); - - statprecision_vs_GroupEtaFold-> SetPoint(np,fabs(etaring),fgaus->GetParameter(2)); - statprecision_vs_GroupEtaFold-> SetPointError(np,e,fgaus->GetParError(2)); - np++; - } - - - TGraphErrors *residual_vs_GroupEta = new TGraphErrors(); - residual_vs_GroupEta->SetMarkerStyle(20); - residual_vs_GroupEta->SetMarkerSize(1); - residual_vs_GroupEta->SetMarkerColor(kGreen+2); - - TGraphErrors *residual_vs_GroupEtaFold = new TGraphErrors(); - residual_vs_GroupEtaFold->SetMarkerStyle(20); - residual_vs_GroupEtaFold->SetMarkerSize(1); - residual_vs_GroupEtaFold->SetMarkerColor(kGreen+2); - - for (int i= 0; i < statprecision_vs_GroupEta-> GetN(); i++){ - double spread, espread; - double stat, estat; - double residual, eresidual; - double xdummy,ex; - sigma_vs_GroupEta-> GetPoint(i, xdummy, spread); - espread = sigma_vs_GroupEta-> GetErrorY(i); - statprecision_vs_GroupEta-> GetPoint(i, xdummy, stat); - estat = statprecision_vs_GroupEta-> GetErrorY(i); - ex = statprecision_vs_GroupEta-> GetErrorX(i); - if (spread > stat ){ - residual = sqrt( spread*spread - stat*stat ); - eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; - } - else { - residual = 0; - eresidual = 0; - } - residual_vs_GroupEta->SetPoint(i,xdummy, residual); - residual_vs_GroupEta->SetPointError(i,ex,eresidual); - } - - for (int i= 0; i < statprecision_vs_GroupEtaFold-> GetN(); i++){ - double spread, espread; - double stat, estat; - double residual, eresidual; - double xdummy,ex; - sigma_vs_GroupEtaFold-> GetPoint(i, xdummy, spread); - espread = sigma_vs_GroupEtaFold-> GetErrorY(i); - statprecision_vs_GroupEtaFold-> GetPoint(i, xdummy, stat); - estat = statprecision_vs_GroupEtaFold-> GetErrorY(i); - ex = statprecision_vs_GroupEtaFold-> GetErrorX(i); - if (spread > stat ){ - residual = sqrt( spread*spread - stat*stat ); - eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; - } - else { - residual = 0; - eresidual = 0; - } - residual_vs_GroupEtaFold->SetPoint(i,xdummy, residual); - residual_vs_GroupEtaFold->SetPointError(i,ex,eresidual); - } - -} - - //------------------------------------------------------------------------ - - //----------------------------------------------------------------- - //--- Draw plots - //----------------------------------------------------------------- - TCanvas *c[4]; - - c[0] = new TCanvas("csigma","csigma"); - c[0]->SetGridx(); - c[0]->SetGridy(); - sigma_vs_GroupEta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); - sigma_vs_GroupEta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - sigma_vs_GroupEta->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); - sigma_vs_GroupEta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - sigma_vs_GroupEta->Draw("ap"); - if (evalStat){ - statprecision_vs_GroupEta->Draw("psame"); - sigma_vs_GroupEta->Draw("psame"); - TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); - leg->SetFillColor(0); - leg->AddEntry(statprecision_vs_GroupEta,"statistical precision", "LP"); - leg->AddEntry(sigma_vs_GroupEta,"spread", "LP"); - leg->Draw("same"); - } - - c[1] = new TCanvas("csigmaFold","csigmaFold"); - c[1]->SetGridx(); - c[1]->SetGridy(); - sigma_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); - sigma_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetRangeUser(0,85); - sigma_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); - sigma_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetTitle("|i#eta|"); - sigma_vs_GroupEtaFold->Draw("ap"); - if (evalStat){ - statprecision_vs_GroupEtaFold->Draw("psame"); - sigma_vs_GroupEtaFold->Draw("psame"); - TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); - leg->SetFillColor(0); - leg->AddEntry(statprecision_vs_GroupEtaFold,"statistical precision", "LP"); - leg->AddEntry(sigma_vs_GroupEtaFold,"spread", "LP"); - leg->Draw("same"); - } - - - c[2] = new TCanvas("cresidual","cresidual"); - c[2]->SetGridx(); - c[2]->SetGridy(); - residual_vs_GroupEta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); - residual_vs_GroupEta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - residual_vs_GroupEta->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); - residual_vs_GroupEta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - residual_vs_GroupEta->Draw("ap"); - - c[3] = new TCanvas("cresidualFold","cresidualFold"); - c[3]->SetGridx(); - c[3]->SetGridy(); - residual_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); - residual_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetRangeUser(0,85); - residual_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); - residual_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetTitle("|i#eta|"); - residual_vs_GroupEtaFold->Draw("ap"); - - -} diff --git a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C b/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C deleted file mode 100644 index aa096a86431..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/DrawCalibrationPlotsEE.C +++ /dev/null @@ -1,763 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "TFile.h" -#include "TStyle.h" -#include "TH2F.h" -#include "TH1F.h" -#include "TGraphErrors.h" -#include "TCanvas.h" -#include "TF1.h" -#include "TROOT.h" -#include "TLegend.h" -#include "TPaveStats.h" -// -/// Macro to produce ECAL single electron calibration plots for EE -/// Input Files : MC or Data splistat and no splitstat, MCTruth and MCReco IC maps EE -/// Output Files : StatPrec_MC_EE.root --> stat precision MC usefull for CompareCalibMCTruth_EE.C only MC -/// IC_MC_4Correction.root --> Map IC for radial correction only MC -// -using namespace std; - -void DrawCalibrationPlotsEE ( - Char_t* infile1 = "data_LC_20120131_ALPHA_test_prompt/SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", - Char_t* infile2 = "data_LC_20120131_ALPHA_test_prompt/Even_SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", - Char_t* infile3 = "data_LC_20120131_ALPHA_test_prompt/Odd_SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", - //Char_t* infile1 = "FT_R_42_V21B/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", - //Char_t* infile2 = "FT_R_42_V21B/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", - //Char_t* infile3 = "FT_R_42_V21B/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", - int evalStat = 1, - bool isMC=false, - Char_t* fileType = "png", - Char_t* dirName = ".") -{ - - bool printPlots = false; - - /// by xtal - - int nbins = 250; - - /// Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(11110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - if ( !infile1 ) { - cout << " No input file specified !" << endl; - return; - } - - - if ( evalStat && (!infile2 || !infile3 )){ - cout << " No input files to evaluate statistical precision specified !" << endl; - return; - } - - cout << "Making calibration plots for: " << infile1 << endl; - - - /// imput file with full statistic normlized to the mean in a ring - - TFile *f = new TFile(infile1); - TH2F *hcmap[2]; - hcmap[0] = (TH2F*)f->Get("h_scale_map_EEM"); - hcmap[1] = (TH2F*)f->Get("h_scale_map_EEP"); - - - /// ring geometry for the endcap - TH2F *hrings[2]; - hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); - hrings[1] = (TH2F*)hcmap[0]->Clone("hringsEEP"); - hrings[0] ->Reset("ICMES"); - hrings[1] ->Reset("ICMES"); - hrings[0] ->ResetStats(); - hrings[1] ->ResetStats(); - - FILE *fRing; - fRing = fopen("macros/eerings.dat","r"); - int x,y,z,ir; - while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { - if(z>0) hrings[1]->Fill(x,y,ir); - if(z<0) hrings[0]->Fill(x,y,ir); - } - - TFile *f4 = TFile::Open("MCtruthIC_EE.root"); - TFile *f5 = TFile::Open("MCRecoIC_EE.root"); - - TH2F *hcmapMcT_EEP = (TH2F*)f4->Get("h_scale_EEP"); - TH2F *hcmapMcT_EEM = (TH2F*)f4->Get("h_scale_EEM"); - TH2F *hcmapMcR_EEP = (TH2F*)f5->Get("h_scale_EEP"); - TH2F *hcmapMcR_EEM = (TH2F*)f5->Get("h_scale_EEM"); - - - ///-------------------------------------------------------------------------------- - ///--- Build the precision vs ring plot starting from the TH2F of IC folded and not - ///-------------------------------------------------------------------------------- - - char hname[100]; - char htitle[100]; - TH1F *hspread[2][50]; - TH1F* hspreadAll [40]; - - TH2F* ICComparison [2]; - ICComparison[0] = (TH2F*) hcmapMcT_EEP->Clone("ICComparison_EEM"); - ICComparison[1] = (TH2F*) hcmapMcT_EEM->Clone("ICComparison_EEP"); - ICComparison[0]->Reset("ICMES"); - ICComparison[1]->Reset("ICMES"); - ICComparison[0]->ResetStats(); - ICComparison[1]->ResetStats(); - - - for (int k = 0; k < 2; k++){ - - for (int iring = 0; iring < 40 ; iring++){ - if (k==0) - { - sprintf(hname,"hspreadAll_ring%02d",iring); - hspreadAll[iring] = new TH1F(hname, hname, nbins,0.,2.); - sprintf(hname,"hspreadEEM_MCTruth_ring%02d",iring); - hspread[k][iring] = new TH1F(hname, hname, nbins,0.,2.); - - } - else{ - - sprintf(hname,"hspreadEEP_ring%02d",iring); - hspread[k][iring] = new TH1F(hname, hname, nbins,0.,2.); - - } - } - } - - /// spread all distribution, spread for EE+ and EE- and comparison with the MC truth - for (int k = 0; k < 2 ; k++){ - for (int ix = 1; ix < 101; ix++){ - for (int iy = 1; iy < 101; iy++){ - int iz = k; - if (k==0) iz = -1; - int mybin = hcmap[k] -> FindBin(ix,iy); - int ring = hrings[1]-> GetBinContent(mybin); - float ic = hcmap[k]->GetBinContent(mybin); - float ic2=0; - if(k==0 && hcmapMcT_EEM->GetBinContent(mybin)!=0 && hcmapMcR_EEM->GetBinContent(mybin)!=0 ) ic2 = hcmapMcT_EEM->GetBinContent(mybin)/hcmapMcR_EEM->GetBinContent(mybin); - else if(hcmapMcT_EEP->GetBinContent(mybin)!=0 && hcmapMcR_EEP->GetBinContent(mybin)!=0 ) ic2 = hcmapMcT_EEP->GetBinContent(mybin)/hcmapMcR_EEP->GetBinContent(mybin); - - if ( ic>0 && ic2>0 ) { - hspread[k][ring]->Fill(ic); - hspreadAll[ring]->Fill(ic); - ICComparison[k]->Fill(ix,iy,ic/ic2); - } - } - } - } - - /// Graph Error for spread EE+ and EE- - - TGraphErrors *sigma_vs_ring[3]; - sigma_vs_ring[0] = new TGraphErrors(); - sigma_vs_ring[0]->SetMarkerStyle(20); - sigma_vs_ring[0]->SetMarkerSize(1); - sigma_vs_ring[0]->SetMarkerColor(kBlue+2); - - sigma_vs_ring[1] = new TGraphErrors(); - sigma_vs_ring[1]->SetMarkerStyle(20); - sigma_vs_ring[1]->SetMarkerSize(1); - sigma_vs_ring[1]->SetMarkerColor(kBlue+2); - - sigma_vs_ring[2] = new TGraphErrors(); - sigma_vs_ring[2]->SetMarkerStyle(20); - sigma_vs_ring[2]->SetMarkerSize(1); - sigma_vs_ring[2]->SetMarkerColor(kBlue+2); - - /// Graph for scale vs ring EE+, EE- and folded - - TGraphErrors *scale_vs_ring[3]; - scale_vs_ring[0] = new TGraphErrors(); - scale_vs_ring[0]->SetMarkerStyle(20); - scale_vs_ring[0]->SetMarkerSize(1); - scale_vs_ring[0]->SetMarkerColor(kBlue+2); - - scale_vs_ring[1] = new TGraphErrors(); - scale_vs_ring[1]->SetMarkerStyle(20); - scale_vs_ring[1]->SetMarkerSize(1); - scale_vs_ring[1]->SetMarkerColor(kBlue+2); - - scale_vs_ring[2] = new TGraphErrors(); - scale_vs_ring[2]->SetMarkerStyle(20); - scale_vs_ring[2]->SetMarkerSize(1); - scale_vs_ring[2]->SetMarkerColor(kBlue+2); - - - TF1 *fgaus = new TF1("fgaus","gaus",-10,10); - int np[3] = {0}; - - /// Gaussian fit for EE+ and EE- - - for (int k = 0; k < 2 ; k++){ - for (int iring = 0; iring < 40; iring++){ - if (hspread[k][iring]-> GetEntries() == 0) continue; - float e = 0.5*hcmap[k]-> GetYaxis()->GetBinWidth(1); - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hspread[k][iring]->GetRMS()); - fgaus->SetRange(1-5*hspread[k][iring]->GetRMS(),1+5*hspread[k][iring]->GetRMS()); - hspread[k][iring]->Fit("fgaus","QR"); - sigma_vs_ring[k]-> SetPoint(np[k],iring,fgaus->GetParameter(2)); - sigma_vs_ring[k]-> SetPointError(np[k], e ,fgaus->GetParError(2)); - scale_vs_ring[k]-> SetPoint(np[k],iring,fgaus->GetParameter(1)); - scale_vs_ring[k]-> SetPointError(np[k],e,fgaus->GetParError(1)); - np[k]++; - } - } - - for (int iring = 0; iring < 40; iring++){ - if (hspreadAll[iring]-> GetEntries() == 0) continue; - float e = 0.5*hcmap[0]-> GetYaxis()->GetBinWidth(1); - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hspreadAll[iring]->GetRMS()); - fgaus->SetRange(1-5*hspreadAll[iring]->GetRMS(),1+5*hspreadAll[iring]->GetRMS()); - hspreadAll[iring]->Fit("fgaus","QR"); - sigma_vs_ring[2]-> SetPoint(np[2],iring,fgaus->GetParameter(2)); - sigma_vs_ring[2]-> SetPointError(np[2], e ,fgaus->GetParError(2)); - scale_vs_ring[2]-> SetPoint(np[2],iring,fgaus->GetParameter(1)); - scale_vs_ring[2]-> SetPointError(np[2],e,fgaus->GetParError(1)); - np[2]++; - } - - /// Intercalibration constant vs phi - - /* TGraphErrors *IC_vs_phi[2]; - IC_vs_phi[0] = new TGraphErrors(); - IC_vs_phi[0]->SetMarkerStyle(20); - IC_vs_phi[0]->SetMarkerSize(1); - IC_vs_phi[0]->SetMarkerColor(kBlue+2); - - IC_vs_phi[1] = new TGraphErrors(); - IC_vs_phi[1]->SetMarkerStyle(20); - IC_vs_phi[1]->SetMarkerSize(1); - IC_vs_phi[1]->SetMarkerColor(kBlue+2); - - TH1F* Spread_vs_phi[2][360]; - - for (int k = 0; k < 2; k++){ - for (int iphi = 0; iphi < 360 ; iphi++){ - if (k==0) - { - sprintf(hname,"hspread_vs_phi%02d_EEP",iphi); - Spread_vs_phi[k][iphi] = new TH1F(hname, hname, nbins,0.,2.); - - } - else{ - sprintf(hname,"hspread_vs_ring%02d_EEM",iphi); - Spread_vs_phi[k][iphi] = new TH1F(hname, hname, nbins,0.,2.);} - } - } - - - for (int k = 0; k < 2 ; k++){ - for (int ix = 1; ix < 101; ix++){ - for (int iy = 1; iy < 101; iy++){ - float iphibin; - if((atan2(iy-50.,ix-50.)-int(atan2(iy-50.,ix-50.)))*(360./(2.*3.14159)) <0.5) iphibin=floor(180.+atan2(iy-50.,ix-50.)*(360./(2.*3.14159))); - else iphibin=ceil(180.+atan2(iy-50.,ix-50.)*(360./(2.*3.14159))); - - if(iphibin>359) iphibin=359; - int mybin = hcmap[k] -> FindBin(ix,iy); - float ic = hcmap[k]->GetBinContent(mybin); - if ( ic>0 ) { - Spread_vs_phi[k][iphibin] ->Fill(ic); - } - } - } - } - - int N[2]={0}; - for (int k = 0; k < 2 ; k++){ - for (int iphi = 0; iphi < 360; iphi++){ - if (Spread_vs_phi[k][iphi]-> GetEntries() == 0) continue; - IC_vs_phi[k]-> SetPoint(N[k],iphi,Spread_vs_phi[k][iphi]->GetMean()); - IC_vs_phi[k]-> SetPointError(N[k],0,Spread_vs_phi[k][iphi]->GetRMS()/sqrt(Spread_vs_phi[k][iphi]->GetEntries())); - - N[k]++; - } - } - */ - - ///----------------- Statistical Precision and Residual -------------------- - - TGraphErrors *statprecision_vs_ring[3]; - statprecision_vs_ring[0] = new TGraphErrors(); - statprecision_vs_ring[0]->SetMarkerStyle(20); - statprecision_vs_ring[0]->SetMarkerSize(1); - statprecision_vs_ring[0]->SetMarkerColor(kRed+2); - - statprecision_vs_ring[1] = new TGraphErrors(); - statprecision_vs_ring[1]->SetMarkerStyle(20); - statprecision_vs_ring[1]->SetMarkerSize(1); - statprecision_vs_ring[1]->SetMarkerColor(kRed+2); - - statprecision_vs_ring[2] = new TGraphErrors(); - statprecision_vs_ring[2]->SetMarkerStyle(20); - statprecision_vs_ring[2]->SetMarkerSize(1); - statprecision_vs_ring[2]->SetMarkerColor(kRed+2); - - TGraphErrors *residual_vs_ring[3]; - residual_vs_ring[0] = new TGraphErrors(); - residual_vs_ring[0]->SetMarkerStyle(20); - residual_vs_ring[0]->SetMarkerSize(1); - residual_vs_ring[0]->SetMarkerColor(kGreen+2); - - residual_vs_ring[1] = new TGraphErrors(); - residual_vs_ring[1]->SetMarkerStyle(20); - residual_vs_ring[1]->SetMarkerSize(1); - residual_vs_ring[1]->SetMarkerColor(kGreen+2); - - residual_vs_ring[2] = new TGraphErrors(); - residual_vs_ring[2]->SetMarkerStyle(20); - residual_vs_ring[2]->SetMarkerSize(1); - residual_vs_ring[2]->SetMarkerColor(kGreen+2); - - - if (evalStat){ - - /// acquisition file for statistical precision - - TFile *f2 = new TFile(infile2); - TFile *f3 = new TFile(infile3); - TH2F *hcmap2[2]; - hcmap2[0] = (TH2F*)f2->Get("h_scale_map_EEM"); - hcmap2[1] = (TH2F*)f2->Get("h_scale_map_EEP"); - - TH2F *hcmap3[2]; - hcmap3[0] = (TH2F*)f3->Get("h_scale_map_EEM"); - hcmap3[1] = (TH2F*)f3->Get("h_scale_map_EEP"); - - TH1F *hstatprecision[2][40]; - TH1F *hstatprecisionAll[40]; - - /// stat precision histos for each EE ring - for (int k = 0; k < 2; k++){ - for (int iring = 0; iring < 40 ; iring ++){ - - if (k==0) - { sprintf(hname,"hstatprecisionAll_ring%02d",iring); - hstatprecisionAll[iring] = new TH1F(hname, hname, nbins,-2.,2.); - sprintf(hname,"hstatprecisionEEM_ring%02d",iring); - hstatprecision[k][iring] = new TH1F(hname, hname, nbins,-2.,2.); - } - else { - sprintf(hname,"hstatprecisionEEP_ring%02d",iring); - hstatprecision[k][iring] = new TH1F(hname, hname, nbins,-2.,2.); - } - - } - } - - for (int k = 0; k < 2 ; k++){ - for (int ix = 1; ix < 102; ix++){ - for (int iy = 1; iy < 102; iy++){ - int iz = k; - if (k==0) iz = -1; - int mybin = hcmap2[k] -> FindBin(ix,iy); - int ring = hrings[1]-> GetBinContent(mybin); - float ic1 = hcmap2[k]->GetBinContent(mybin); - float ic2 = hcmap3[k]->GetBinContent(mybin); - if (ic1>0 && ic2 >0){ - hstatprecision[k][ring]->Fill((ic1-ic2)/(ic1+ic2)); /// sigma (diff/sum) gives the stat. precision on teh entire sample - hstatprecisionAll[ring]->Fill((ic1-ic2)/(ic1+ic2)); - } - } - } - } - - - TCanvas* c44 [120]; - /// Gaussian fit of the even/odd distribution (rms of the distribution can be also used) - int n[3] = {0}; - for (int k = 0; k < 2; k++){ - for (int iring = 0; iring < 40 ; iring++){ - if ( hstatprecision[k][iring]->GetEntries() == 0) continue; - float e = 0.5*hcmap2[k]-> GetYaxis()->GetBinWidth(1); - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hstatprecision[k][iring]->GetRMS()); - fgaus->SetRange(-5*hstatprecision[k][iring]->GetRMS(),5*hstatprecision[k][iring]->GetRMS()); - TString name = Form("ff%d_%d",iring,k); - - hstatprecision[k][iring]->Fit("fgaus","QR"); - - statprecision_vs_ring[k]-> SetPoint(n[k],iring,fgaus->GetParameter(2)); - statprecision_vs_ring[k]-> SetPointError(n[k],e,fgaus->GetParError(2)); - n[k]++; - } - } - - for (int iring = 0; iring < 40 ; iring++){ - if ( hstatprecisionAll[iring]->GetEntries() == 0) continue; - float e = 0.5*hcmap2[0]-> GetYaxis()->GetBinWidth(1); - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hstatprecisionAll[iring]->GetRMS()); - fgaus->SetRange(-5*hstatprecisionAll[iring]->GetRMS(),5*hstatprecisionAll[iring]->GetRMS()); - TString name = Form("ffAll%d",iring); - hstatprecisionAll[iring]->Fit("fgaus","QR"); - - statprecision_vs_ring[2]-> SetPoint(n[2],iring,fgaus->GetParameter(2)); - statprecision_vs_ring[2]-> SetPointError(n[2],e,fgaus->GetParError(2)); - n[2]++; - } - - - TH1F *hresidual[3]; - hresidual[0] = new TH1F("hresidualEEM","hresidualEEM",1000,0,1); - hresidual[1] = new TH1F("hresidualEEP","hresidualEEP",1000,0,1); - hresidual[2] = new TH1F("hresidualAll","hresidualAll",1000,0,1); - - TH1F *hstat[3]; - hstat[0] = new TH1F("hstatEEM","hstatEEM",1000,0,0.5); - hstat[1] = new TH1F("hstatEEP","hstatEEP",1000,0,0.5); - hstat[2] = new TH1F("hstatAll","hstatAll",1000,0,0.5); - - TH1F *hspre[3]; - hspre[0] = new TH1F("hspreEEM","hspreEEM",1000,0,0.5); - hspre[1] = new TH1F("hspreEEP","hspreEEP",1000,0,0.5); - hspre[2] = new TH1F("hspreAll","hspreAll",1000,0,0.5); - - /// Residual spread plot - - for (int k = 0; k < 3 ; k++){ - for (int i= 0; i < statprecision_vs_ring[k]-> GetN(); i++){ - double spread, espread; - double stat, estat; - double residual, eresidual; - double xdummy,ex; - sigma_vs_ring[k]-> GetPoint(i, xdummy, spread ); - espread = sigma_vs_ring[k]-> GetErrorY(i); - statprecision_vs_ring[k]-> GetPoint(i, xdummy, stat ); - estat = statprecision_vs_ring[k]-> GetErrorY(i); - ex = statprecision_vs_ring[k]-> GetErrorX(i); - if (spread > stat ){ - residual = sqrt( spread*spread - stat*stat ); - eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; - } - else { - residual = 0; - eresidual = 0; - } - residual_vs_ring[k]->SetPoint(i,xdummy, residual); - residual_vs_ring[k]->SetPointError(i,ex,eresidual); - } - } - - } - - ///----------------------------------------------------------------- - ///--- Draw plots - ///----------------------------------------------------------------- - TCanvas *cEEP[12]; - TCanvas *cEEM[12]; - - /// --- plot 0 : map of coefficients - cEEP[0] = new TCanvas("cmapEEP","cmapEEP"); - cEEP[0] -> cd(); - cEEP[0]->SetLeftMargin(0.1); - cEEP[0]->SetRightMargin(0.13); - cEEP[0]->SetGridx(); - cEEP[0]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - hcmap[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap[1]->Draw("COLZ"); - hcmap[1]->GetXaxis() ->SetTitle("ix"); - hcmap[1]->GetYaxis() ->SetTitle("iy"); - hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[0] = new TCanvas("cmapEEM","cmapEEM"); - cEEM[0] -> cd(); - cEEM[0]->SetLeftMargin(0.1); - cEEM[0]->SetRightMargin(0.13); - cEEM[0]->SetGridx(); - cEEM[0]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - hcmap[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap[0]->Draw("COLZ"); - hcmap[0]->GetXaxis() ->SetTitle("ix"); - hcmap[0]->GetYaxis() ->SetTitle("iy"); - hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - /// --- plot 1 : ring precision vs ieta - cEEP[1] = new TCanvas("csigmaEEP","csigmaEEP"); - cEEP[1]->SetGridx(); - cEEP[1]->SetGridy(); - sigma_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); - sigma_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - sigma_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); - sigma_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("ring"); - sigma_vs_ring[1]->Draw("ap"); - if (evalStat){ - statprecision_vs_ring[1]->Draw("psame"); - sigma_vs_ring[1]->Draw("psame"); - TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); - leg->SetFillColor(0); - leg->AddEntry(statprecision_vs_ring[1],"statistical precision", "LP"); - leg->AddEntry(sigma_vs_ring[1],"spread", "LP"); - leg->Draw("same"); - } - - cEEM[1] = new TCanvas("csigmaEEM","csigmaEEM"); - cEEM[1]->SetGridx(); - cEEM[1]->SetGridy(); - sigma_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); - sigma_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - sigma_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); - sigma_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("ring"); - sigma_vs_ring[0]->Draw("ap"); - if (evalStat){ - statprecision_vs_ring[0]->Draw("psame"); - sigma_vs_ring[0]->Draw("psame"); - TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); - leg->SetFillColor(0); - leg->AddEntry(statprecision_vs_ring[0],"statistical precision", "LP"); - leg->AddEntry(sigma_vs_ring[0],"spread", "LP"); - leg->Draw("same"); - } - - - /// --- plot 5 : statistical precision vs ieta - if (evalStat){ - cEEP[5] = new TCanvas("cstat","cstat"); - cEEP[5]->SetGridx(); - cEEP[5]->SetGridy(); - statprecision_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); - statprecision_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - statprecision_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); - statprecision_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - statprecision_vs_ring[1]->Draw("ap"); - - cEEP[6] = new TCanvas("cresidualP","cresidualP"); - cEEP[6]->SetGridx(); - cEEP[6]->SetGridy(); - residual_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); - residual_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - residual_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); - residual_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - residual_vs_ring[1]->Draw("ap"); - - cEEM[5] = new TCanvas("cstatM","cstatM"); - cEEM[5]->SetGridx(); - cEEM[5]->SetGridy(); - statprecision_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); - statprecision_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - statprecision_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); - statprecision_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - statprecision_vs_ring[0]->Draw("ap"); - - cEEM[6] = new TCanvas("cresidualM","cresidualM"); - cEEM[6]->SetGridx(); - cEEM[6]->SetGridy(); - residual_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); - residual_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - residual_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); - residual_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - residual_vs_ring[0]->Draw("ap"); - - cEEP[8] = new TCanvas("csigmaFolded","csigmaFolded"); - cEEP[8]->SetGridx(); - cEEP[8]->SetGridy(); - sigma_vs_ring[2]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); - sigma_vs_ring[2]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - sigma_vs_ring[2]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); - sigma_vs_ring[2]->GetHistogram()->GetXaxis()-> SetTitle("ring"); - sigma_vs_ring[2]->Draw("ap"); - if (evalStat){ - statprecision_vs_ring[2]->Draw("psame"); - sigma_vs_ring[2]->Draw("psame"); - TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); - leg->SetFillColor(0); - leg->AddEntry(statprecision_vs_ring[2],"statistical precision", "LP"); - leg->AddEntry(sigma_vs_ring[2],"spread", "LP"); - leg->Draw("same"); - } - - cEEP[9] = new TCanvas("cresidualFolded","cresidualFolded"); - cEEP[9]->SetGridx(); - cEEP[9]->SetGridy(); - residual_vs_ring[2]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); - residual_vs_ring[2]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - residual_vs_ring[2]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); - residual_vs_ring[2]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - residual_vs_ring[2]->Draw("ap"); - - /// save precision for MC comparison - - if(isMC==true) - { - TFile * output = new TFile ("StatPrec_MC_EE.root","RECREATE"); - output->cd(); - statprecision_vs_ring[0]->SetName("gr_stat_prec_EEP"); - statprecision_vs_ring[1]->SetName("gr_stat_prec_EEM"); - statprecision_vs_ring[2]->SetName("gr_stat_prec"); - - statprecision_vs_ring[0]->Write(); - statprecision_vs_ring[1]->Write(); - statprecision_vs_ring[2]->Write(); - } - } - - /// Comparison Plot MC - Data - TCanvas* canEEP[10], *canEEM[10]; - if(isMC == true) - { - - canEEM[0] = new TCanvas("ICComparison MC EEM","ICComparison MC EEM"); - canEEM[0]->SetGridx(); - canEEM[0]->SetGridy(); - ICComparison[0]->GetXaxis() -> SetLabelSize(0.03); - ICComparison[0]->Draw("COLZ"); - ICComparison[0]->GetXaxis() ->SetTitle("ix"); - ICComparison[0]->GetYaxis() ->SetTitle("iy"); - ICComparison[0]->GetZaxis() ->SetRangeUser(0.85,1.15); - - canEEP[0] = new TCanvas("ICComparison MC EEP","ICComparison MC EEP"); - canEEP[0]->SetGridx(); - canEEP[0]->SetGridy(); - ICComparison[1]->GetXaxis() -> SetLabelSize(0.03); - ICComparison[1]->Draw("COLZ"); - ICComparison[1]->GetXaxis() ->SetTitle("ix"); - ICComparison[1]->GetYaxis() ->SetTitle("iy"); - ICComparison[1]->GetZaxis() ->SetRangeUser(0.85,1.15); - - TFile* output = new TFile ("IC_MC_4Correction.root","RECREATE"); - output->cd(); - ICComparison[0]->Write(); - ICComparison[1]->Write(); - output->Close(); - } - - TFile *exisistingEE = new TFile ("existingEE.root","READ"); - TH2F* exmap = (TH2F*) exisistingEE->Get("endcap"); - - TH2F* warning_Map_EEP = (TH2F*) exmap->Clone("warning_Map_EEP"); - warning_Map_EEP->Reset("ICMES"); - warning_Map_EEP->Reset(); - - TH2F* warning_Map_EEM = (TH2F*) exmap->Clone("warning_Map_EEM"); - warning_Map_EEM->Reset("ICMES"); - warning_Map_EEM->Reset(); - - - if(isMC == false) - { - std::ofstream outTxt ("Calibration_Coefficient_EE_dinamic_alpha.txt",std::ios::out); - - outTxt << "---------------------------------------------------------------" << std::endl; - outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iX" - << std::fixed << std::setprecision(0) << std::setw(10) << "iY" - << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" - << std::fixed << std::setprecision(6) << std::setw(15) << "IC" - << std::fixed << std::setprecision(6) << std::setw(15) << "error" - << std::endl; - outTxt << "---------------------------------------------------------------" << std::endl; - - for (int ix = 1; ix < hcmap[0]->GetNbinsX()+1 ; ix ++) - { - for (int iy = 1; iy < hcmap[0] -> GetNbinsY()+1; iy++) - { - if( exmap->GetBinContent(ix,iy) !=1) continue; - - double x,statPrec; - statprecision_vs_ring[0]->GetPoint(hrings[0]->GetBinContent(ix,iy),x,statPrec); - - outTxt << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[0]->GetXaxis()->GetBinLowEdge(ix) - << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[0]->GetYaxis()->GetBinLowEdge(iy) - << std::fixed << std::setprecision(0) << std::setw(10) << "-1"; - - if( hcmap[0]->GetBinContent(ix,iy) == 0. ) - { - outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." - << std::fixed << std::setprecision(6) << std::setw(15) << "999." - << std::endl; - } - else - { - outTxt << std::fixed << std::setprecision(6) << std::setw(15) << hcmap[0]->GetBinContent(ix,iy) - << std::fixed << std::setprecision(6) << std::setw(15) << statPrec - << std::endl; - - //warning_Map_EEM->Fill(ix,iy); - } - - } - } - - for (int ix = 1; ix < hcmap[1]->GetNbinsX()+1 ; ix ++) - { - for (int iy = 1; iy < hcmap[1] -> GetNbinsY()+1; iy++) - { - if( exmap->GetBinContent(ix,iy) !=1) continue; - - double x,statPrec; - statprecision_vs_ring[1]->GetPoint(hrings[1]->GetBinContent(ix,iy),x,statPrec); - - outTxt << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[1]->GetXaxis()->GetBinLowEdge(ix) - << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[1]->GetYaxis()->GetBinLowEdge(iy) - << std::fixed << std::setprecision(0) << std::setw(10) << "1"; - - if( hcmap[1]->GetBinContent(ix,iy) == 0. ) - { - outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." - << std::fixed << std::setprecision(6) << std::setw(15) << "999." - << std::endl; - } - else - { - outTxt << std::fixed << std::setprecision(6) << std::setw(15) << hcmap[1]->GetBinContent(ix,iy) - << std::fixed << std::setprecision(6) << std::setw(15) << statPrec - << std::endl; - - //warning_Map_EEM->Fill(ix,iy); - } - - } - } - } - - - canEEP[1] = new TCanvas("Warning_EEP","Warning_EEP"); - canEEP[1]->SetGridx(); - canEEP[1]->SetGridy(); - warning_Map_EEP->GetXaxis() -> SetLabelSize(0.03); - warning_Map_EEP->Draw("COLZ"); - warning_Map_EEP->GetXaxis() ->SetTitle("ix"); - warning_Map_EEP->GetYaxis() ->SetTitle("iy"); - warning_Map_EEP->GetZaxis() ->SetRangeUser(0.85,1.15); - - canEEM[1] = new TCanvas("Warning_EEM","Warning_EEM"); - canEEM[1]->SetGridx(); - canEEM[1]->SetGridy(); - warning_Map_EEM->GetXaxis() -> SetLabelSize(0.03); - warning_Map_EEM->Draw("COLZ"); - warning_Map_EEM->GetXaxis() ->SetTitle("ix"); - warning_Map_EEM->GetYaxis() ->SetTitle("iy"); - warning_Map_EEM->GetZaxis() ->SetRangeUser(0.85,1.15); - - - -} - diff --git a/EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx b/EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx deleted file mode 100644 index eddd7b97cbb..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/DrawEPDistributions.cxx +++ /dev/null @@ -1,89 +0,0 @@ -// To Plot E/p distributions for endcap or barrel at different iteration -#include "TH2F.h" -#include "TCanvas.h" -#include -#include "TH1F.h" -#include "TFile.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TLegend.h" -// Input needed: E/p distributions file -void DrawEPDistributions (){ - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gROOT->ForceStyle(); - gStyle->SetOptStat(0); - - - TFile *f1 = TFile::Open("/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EE/Weight_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_R9_EE.root"); - TH1F *EoP_eta_2_iter_0 = (TH1F*)f1->Get("h_24_hC_EoP_eta_0"); - TH1F *EoP_eta_2_iter_4 = (TH1F*)f1->Get("h_24_hC_EoP_eta_10"); - TH1F *EoP_eta_2_iter_14 = (TH1F*)f1->Get("h_24_hC_EoP_eta_24"); - - TH1F *EoP_eta_70_iter_0 = (TH1F*)f1->Get("h_31_hC_EoP_eta_0"); - TH1F *EoP_eta_70_iter_4 = (TH1F*)f1->Get("h_31_hC_EoP_eta_10"); - TH1F *EoP_eta_70_iter_14 = (TH1F*)f1->Get("h_31_hC_EoP_eta_24"); - - - - TCanvas *cEoP2 = new TCanvas("cEoP2","cEoP2"); - cEoP2->SetGridx(); - cEoP2->SetGridy(); - EoP_eta_2_iter_0->GetXaxis()-> SetTitle("E/p"); - EoP_eta_2_iter_0->SetTitle("E/p ring n#circ24"); - EoP_eta_2_iter_0->SetLineColor(kGreen); - EoP_eta_2_iter_0->SetLineWidth(2); - EoP_eta_2_iter_0->SetLineStyle(1); - EoP_eta_2_iter_0->Draw(); - EoP_eta_2_iter_4->SetLineColor(kBlue); - EoP_eta_2_iter_4->SetLineWidth(3); - EoP_eta_2_iter_4->SetLineStyle(7); - EoP_eta_2_iter_4->Draw("same"); - EoP_eta_2_iter_14->SetLineColor(kRed); - EoP_eta_2_iter_14->SetLineWidth(2); - EoP_eta_2_iter_14->SetLineStyle(2); - EoP_eta_2_iter_14->Draw("same"); - TLegend * leg = new TLegend(0.6,0.6,0.89, 0.89); - leg->SetFillColor(0); - leg->AddEntry(EoP_eta_2_iter_0,"EoP at iteration 1", "LP"); - leg->AddEntry(EoP_eta_2_iter_4,"EoP at iteration 10", "LP"); - leg->AddEntry(EoP_eta_2_iter_14,"EoP at iteration 25", "LP"); - - leg->Draw(); - - - TCanvas *cEoP70 = new TCanvas("cEoP70","cEoP70"); - cEoP70->SetGridx(); - cEoP70->SetGridy(); - EoP_eta_70_iter_0->GetXaxis()-> SetTitle("E/p"); - EoP_eta_70_iter_0->SetTitle("E/p ring n#circ31"); - EoP_eta_70_iter_0->SetLineColor(kGreen); - EoP_eta_70_iter_0->SetLineWidth(2); - EoP_eta_70_iter_0->SetLineStyle(1); - EoP_eta_70_iter_0->Draw(); - EoP_eta_70_iter_4->SetLineColor(kBlue); - EoP_eta_70_iter_4->SetLineWidth(3); - EoP_eta_70_iter_4->SetLineStyle(7); - EoP_eta_70_iter_4->Draw("same"); - EoP_eta_70_iter_14->SetLineColor(kRed); - EoP_eta_70_iter_14->SetLineWidth(2); - EoP_eta_70_iter_14->SetLineStyle(2); - EoP_eta_70_iter_14->Draw("same"); - leg->Draw(); - -} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx b/EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx deleted file mode 100644 index cd9ed85d38a..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/DrawMomentumCalibration.cxx +++ /dev/null @@ -1,227 +0,0 @@ -#include -#include "TFile.h" -#include "TGraphErrors.h" -#include "TROOT.h" -#include "TString.h" -#include "TCanvas.h" -#include "TPad.h" -#include "TLegend.h" -#include "TStyle.h" -#include "TH2F.h" - -void DrawMomentumCalibration() -{ - gROOT->SetStyle("Plain"); - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetStatFont(42); - gStyle->SetStatFontSize(0.05); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(10111); - gStyle->SetOptFit(1); - gStyle->SetPalette(1); - gROOT->ForceStyle(); - - TFile *f = TFile::Open("output/MomentumCalibration.root"); - int i=0; - - while(f!=0) - { - - TString Name = Form("g_EoP_EB_%d",i); - TGraphErrors* g_EoP_EB = (TGraphErrors*)f->Get(Name); - Name= Form("g_EoC_EB_%d",i); - TGraphErrors* g_EoC_EB = (TGraphErrors*)f->Get(Name); - Name= Form("g_EoC_EB_%d",i+1); - TGraphErrors* g_EoC_EB2 = (TGraphErrors*)f->Get(Name); - - Name= Form("g_Rat_EB_%d",i); - TGraphErrors* g_Rat_EB = (TGraphErrors*)f->Get(Name); - - if(g_EoP_EB==0 && g_EoC_EB==0 && g_Rat_EB==0) break; - - g_EoP_EB -> SetMarkerStyle(20); - g_EoP_EB -> SetMarkerSize(1); - g_EoP_EB -> SetMarkerColor(kRed+1); - g_EoP_EB -> SetLineColor(kRed+1); - - - g_EoC_EB -> SetMarkerStyle(20); - g_EoC_EB -> SetMarkerSize(1); - g_EoC_EB -> SetMarkerColor(kGreen+1); - g_EoC_EB -> SetLineColor(kGreen+1); - - if(g_EoC_EB2!=0) - { - - g_EoC_EB2 -> SetMarkerStyle(20); - g_EoC_EB2 -> SetMarkerSize(1); - g_EoC_EB2 -> SetMarkerColor(kGreen+1); - g_EoC_EB2 -> SetLineColor(kGreen+1); - - TH2F* correlation = new TH2F("correlation","correlation",50,0.98,1.02,50,0.97,1.03); - for(int i=0; iGetN() && iGetN() ; i++) - { double x,y,z,k; - g_EoC_EB->GetPoint(i,x,y); - g_EoC_EB2->GetPoint(i,z,k); - - correlation->Fill(y,k); - } - correlation->GetXaxis()->SetTitle("mod1-2"); - correlation->GetYaxis()->SetTitle("mod3-4"); - cout<<" correlation "<GetCorrelationFactor()<Draw("colz"); - } -// correlation->Draw("colz"); - g_Rat_EB -> SetMarkerStyle(20); - g_Rat_EB -> SetMarkerSize(1); - g_Rat_EB -> SetMarkerColor(kBlue+2); - g_Rat_EB -> SetLineColor(kBlue+2); - - float phiLim = 360; - Name = Form("g_fit_EB_%d",i); - TCanvas* c_g_fit_EB = new TCanvas(Name, Name,100,100,800,600); - Name = Form("pad_0_EB_%d",i); - TPad *cLower_EB = new TPad(Name,Name,0.00,0.00,1.00,0.30); - Name = Form("pad_1_EB_%d",i); - TPad *cUpper_EB = new TPad(Name,Name,0.00,0.30,1.00,1.00); - - cLower_EB->SetBottomMargin(0.25); cUpper_EB->SetTopMargin(0.01); - cUpper_EB->SetBottomMargin(0.01); - - cLower_EB->Draw(); - cUpper_EB->Draw(); - - float FontSCF = cUpper_EB->GetHNDC()/cLower_EB->GetHNDC(); - float tYoffset = 0.8; - float labSize = 0.06; - - cUpper_EB -> cd(); - gPad->SetGrid(); - - TH1F *hPad_EB = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); - hPad_EB->GetXaxis()->SetLabelSize(labSize); - hPad_EB->GetXaxis()->SetTitleSize(labSize); - hPad_EB->GetYaxis()->SetLabelSize(labSize); - hPad_EB->GetYaxis()->SetTitleSize(labSize); - hPad_EB->GetXaxis()->SetTitleOffset(tYoffset); - hPad_EB->GetYaxis()->SetTitleOffset(tYoffset); - hPad_EB->GetXaxis()->SetTitle("#phi_{SC}"); - hPad_EB->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto p"); - - g_EoP_EB -> Draw("PL"); - g_EoC_EB -> Draw("PL"); - - TLegend *tl_EB = new TLegend(0.80,0.80,0.90,0.95); - tl_EB -> SetTextFont(40); - tl_EB -> SetFillColor(0); - // tl -> SetBorderSize(0); - tl_EB -> AddEntry(g_EoP_EB,"MC EB","PL"); - tl_EB -> AddEntry(g_EoC_EB,"Data EB","PL"); - tl_EB -> Draw(); - - cLower_EB -> cd(); - gPad->SetGrid(); - - TH1F *hRat_EB = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); - hRat_EB->GetYaxis()->SetNdivisions(505); - hRat_EB->GetXaxis()->SetLabelSize(labSize*FontSCF); - hRat_EB->GetXaxis()->SetTitleSize(labSize*FontSCF); - hRat_EB->GetYaxis()->SetLabelSize(labSize*FontSCF); - hRat_EB->GetYaxis()->SetTitleSize(labSize*FontSCF); - hRat_EB->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); - hRat_EB->GetXaxis()->SetTitleOffset(0.6); - hRat_EB->GetXaxis()->SetTitle("#phi_{SC}"); - hRat_EB->GetYaxis()->SetTitle("Data / MC"); - g_Rat_EB->Draw("PL"); - i++; - } - - i=0; - - while (f!=0) { - - TString Name = Form("g_EoP_EE_%d",i); - TGraphErrors* g_EoP_EE = (TGraphErrors*)f->Get(Name); - Name= Form("g_EoC_EE_%d",i); - TGraphErrors* g_EoC_EE = (TGraphErrors*)f->Get(Name); - Name= Form("g_Rat_EE_%d",i); - TGraphErrors* g_Rat_EE = (TGraphErrors*)f->Get(Name); - if(g_EoP_EE==0 && g_EoC_EE==0 && g_Rat_EE==0) break; - - g_EoP_EE -> SetMarkerStyle(20); - g_EoP_EE -> SetMarkerSize(1); - g_EoP_EE -> SetMarkerColor(kRed+1); - g_EoP_EE -> SetLineColor(kRed+1); - - g_EoC_EE -> SetMarkerStyle(20); - g_EoC_EE -> SetMarkerSize(1); - g_EoC_EE -> SetMarkerColor(kGreen+1); - g_EoC_EE -> SetLineColor(kGreen+1); - - g_Rat_EE -> SetMarkerStyle(20); - g_Rat_EE -> SetMarkerSize(1); - g_Rat_EE -> SetMarkerColor(kBlue+2); - g_Rat_EE -> SetLineColor(kBlue+2); - - Name = Form("g_fit_EE_%d",i); - TCanvas* c_g_fit_EE = new TCanvas(Name, Name,100,100,800,600); - TPad *cLower_EE = new TPad("pad_0_EE","pad_0_EE",0.00,0.00,1.00,0.30); - TPad *cUpper_EE = new TPad("pad_1_EE","pad_1_EE",0.00,0.30,1.00,1.00); - - cLower_EE->SetBottomMargin(0.25); cUpper_EE->SetTopMargin(0.01); - cUpper_EE->SetBottomMargin(0.01); - - cLower_EE->Draw(); - cUpper_EE->Draw(); - - float FontSCF = cUpper_EE->GetHNDC()/cLower_EE->GetHNDC(); - float tYoffset = 0.8; - float labSize = 0.06; - float phiLim = 360.; - cUpper_EE -> cd(); - gPad->SetGrid(); - TH1F *hPad_EE = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); - hPad_EE->GetXaxis()->SetLabelSize(labSize); - hPad_EE->GetXaxis()->SetTitleSize(labSize); - hPad_EE->GetYaxis()->SetLabelSize(labSize); - hPad_EE->GetYaxis()->SetTitleSize(labSize); - hPad_EE->GetXaxis()->SetTitleOffset(tYoffset); - hPad_EE->GetYaxis()->SetTitleOffset(tYoffset); - hPad_EE->GetXaxis()->SetTitle("#phi_{SC}"); - hPad_EE->GetYaxis()->SetTitle("M_{ee}^{2}/M_{Z}^{2} #propto 1/p"); - - g_EoP_EE -> Draw("PL"); - g_EoC_EE -> Draw("PL"); - - TLegend *tl_EE = new TLegend(0.80,0.80,0.90,0.95); - tl_EE -> SetTextFont(40); - tl_EE -> SetFillColor(0); - // tl -> SetBorderSize(0); - tl_EE -> AddEntry(g_EoP_EE,"MC EE","PL"); - tl_EE -> AddEntry(g_EoC_EE,"Data EE","PL"); - tl_EE -> Draw(); - - cLower_EE -> cd(); - gPad->SetGrid(); - - TH1F *hRat_EE = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); - hRat_EE->GetYaxis()->SetNdivisions(505); - hRat_EE->GetXaxis()->SetLabelSize(labSize*FontSCF); - hRat_EE->GetXaxis()->SetTitleSize(labSize*FontSCF); - hRat_EE->GetYaxis()->SetLabelSize(labSize*FontSCF); - hRat_EE->GetYaxis()->SetTitleSize(labSize*FontSCF); - hRat_EE->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); - hRat_EE->GetXaxis()->SetTitleOffset(0.6); - hRat_EE->GetXaxis()->SetTitle("#phi_{SC}"); - hRat_EE->GetYaxis()->SetTitle("Data / MC"); - g_Rat_EE->Draw("PL"); - i++; - - } - -} \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C b/EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C deleted file mode 100644 index e92f2c23983..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/DrawResidualPlotsEB.C +++ /dev/null @@ -1,330 +0,0 @@ -// -// Macro to produce ECAL single electron calibration plots -// - -void DrawResidualPlotsEB( - Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim/WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", - Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim/Odd_WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", - Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim/Even_WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", - int evalStat = 1, - int inputLoops = 25, - Char_t* fileType = "png", - Char_t* dirName = ".") -{ - - // Draw plots in different modality : xtal, TT, SM - TString modality = "xtal"; - bool printPlots = false; - const int nLoops = inputLoops; - - // Set style options - gROOT->Reset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - if ( !infile1 ) { - cout << " No input file specified !" << endl; - return; - } - - - if ( evalStat && (!infile2 || !infile3 )){ - cout << " No input files to evaluate statistical precision specified !" << endl; - return; - } - - cout << "Making calibration plots for: " << infile2 << endl; - - char hname[100]; - char htitle[100]; - TF1 *fgaus = new TF1("fgaus","gaus",-10,10); - - TFile *f1 = new TFile(infile1); - TFile *f2 = new TFile(infile2); - TFile *f3 = new TFile(infile3); - TH2F *hcmap1[nLoops]; - TH2F *hcmap2[nLoops]; - TH2F *hcmap3[nLoops]; - TGraphErrors *residual_vs_ieta[nLoops]; - - TH2F *hcmap1_TT[nLoops]; - TH2F *hcmap2_TT[nLoops]; - TH2F *hcmap3_TT[nLoops]; - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - sprintf(hname,"h2_%d_hC_scale_EB",iLoop); - hcmap1[iLoop] = (TH2F*)f1->Get(hname); - hcmap2[iLoop] = (TH2F*)f2->Get(hname); - hcmap3[iLoop] = (TH2F*)f3->Get(hname); - - if ( modality == "TT" ) { - sprintf(hname,"h1_%d_hC_scale_EB_TT",iLoop); - hcmap1_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); - sprintf(hname,"h2_%d_hC_scale_EB_TT",iLoop); - hcmap2_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); - sprintf(hname,"h3_%d_hC_scale_EB_TT",iLoop); - hcmap3_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); - - for ( int iTTphi = 1; iTTphi < 72; iTTphi++ ) { - - for ( int iTTeta = -17; iTTeta < 18; iTTeta++ ) { - if ( iTTeta == 0 ) continue; - float theICsum = hcmap1[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; - hcmap1_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); - theICsum = hcmap2[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; - hcmap2_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); - theICsum = hcmap3[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; - hcmap3_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); - - } - - } - - } - - TH1F *hscale[171]; - TH1F *hsigma[171]; - TH1F *hresidual[171]; - - if ( modality == "xtal" ) { - - for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ - //int etaring = -85+(jbin-1); - float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(jbin); - sprintf(hname,"hscale_ring_ieta%02d",etaring); - hscale[jbin-1] = new TH1F(hname, hname, 250,0.9,1.1); - sprintf(hname,"hsigma_ring_ieta%02d",etaring); - hsigma[jbin-1] = new TH1F(hname, hname, 250,-0.1,0.1); - for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ - float ic = hcmap1[iLoop]->GetBinContent(ibin,jbin); - hscale[jbin-1] -> Fill (ic); - float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); - float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ - hsigma[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); - } - } - } - - } - - else if ( modality == "TT" ) { - - for (int jbin = 1; jbin < hcmap2_TT[iLoop]-> GetNbinsY()+1; jbin++){ - //int etaring = -85+(jbin-1); - float etaring = hcmap2_TT[iLoop]-> GetYaxis()->GetBinCenter(jbin); - sprintf(hname,"hscale_ring_ieta%02d",etaring); - hscale[jbin-1] = new TH1F(hname, hname, 250,0.9,1.1); - sprintf(hname,"hsigma_ring_ieta%02d",etaring); - hsigma[jbin-1] = new TH1F(hname, hname, 250,-0.1,0.1); - for (int ibin = 1; ibin < hcmap2_TT[iLoop]-> GetNbinsX()+1; ibin++){ - float ic = hcmap1_TT[iLoop]->GetBinContent(ibin,jbin); - hscale[jbin-1] -> Fill (ic); - float ic1 = hcmap2_TT[iLoop]->GetBinContent(ibin,jbin); - float ic2 = hcmap3_TT[iLoop]->GetBinContent(ibin,jbin); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ - hsigma[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); - } - } - } - - } - else if ( modality == "SM" ) { - - for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ - // Get the SM number - int iSM = (ibin-1)/20 + 1; - if ( (ibin-1)%20 == 0 ) { - sprintf(hname,"hscale_ring_ieta%02d",iSM); - hscale[iSM-1] = new TH1F(hname, hname, 250,0.9,1.1); - sprintf(hname,"hscale_ring_ieta%02d",iSM+18); - hscale[iSM-1+18] = new TH1F(hname, hname, 250,0.9,1.1); - sprintf(hname,"hsigma_ring_ieta%02d",iSM); - hsigma[iSM-1] = new TH1F(hname, hname, 250,-0.1,0.1); - sprintf(hname,"hsigma_ring_ieta%02d",iSM+18); - hsigma[iSM-1+18] = new TH1F(hname, hname, 250,-0.1,0.1); - } - for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ - float ic = hcmap1[iLoop]->GetBinContent(ibin,jbin); - float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); - float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); - if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ - float sigma = (ic1-ic2)/(ic1+ic2); // sigma (diff/sum) gives the stat. precision on teh entire sample - if ( jbin < 86 ) { //EE- - hscale[iSM-1+18]->Fill(ic); - hsigma[iSM-1+18]->Fill(sigma); // sigma (diff/sum) gives the stat. precision on teh entire sample - } - else { //EE+ - hscale[iSM-1]->Fill(ic); - hsigma[iSM-1]->Fill(sigma); // sigma (diff/sum) gives the stat. precision on teh entire sample - } - } - } - } - - } - - - residual_vs_ieta[iLoop] = new TGraphErrors(); - residual_vs_ieta[iLoop]->SetMarkerStyle(20); - residual_vs_ieta[iLoop]->SetMarkerSize(1); - residual_vs_ieta[iLoop]->SetMarkerColor(kRed+2); - - int n = 0; - - if ( modality == "xtal" ) { - - for (int i = 1; i < hcmap2[iLoop]-> GetNbinsY()+1; i++){ - etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(i); - if (etaring==0) continue; - if ( hsigma[i-1]->GetEntries() == 0) continue; - float e = 0.5*hcmap2[iLoop]-> GetYaxis()->GetBinWidth(i); - // Get the sigma - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); - fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); - hsigma[i-1] -> Fit("fgaus","QR"); - float sigma = fgaus -> GetParameter(2); - // Get the scale - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hscale[i-1]->GetRMS()); - fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); - hscale[i-1] -> Fit("fgaus","QR"); - float scale = fgaus -> GetParameter(2); - float residual = scale*scale - sigma*sigma; - if ( residual < 0 ) residual = -sqrt(-residual); - else residual = sqrt(residual); - residual_vs_ieta[iLoop]-> SetPoint(n,etaring,residual); - residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); - n++; - } - - } - - else if ( modality == "TT" ) { - - for (int i = 1; i < hcmap2_TT[iLoop]-> GetNbinsY()+1; i++){ - etaring = hcmap2_TT[iLoop]-> GetYaxis()->GetBinCenter(i); - if (etaring==0) continue; - if ( hsigma[i-1]->GetEntries() == 0) continue; - float e = 0.5*hcmap2_TT[iLoop]-> GetYaxis()->GetBinWidth(i); - // Get the sigma - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); - fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); - hsigma[i-1] -> Fit("fgaus","QR"); - float sigma = fgaus -> GetParameter(2); - // Get the scale - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hscale[i-1]->GetRMS()); - fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); - hscale[i-1] -> Fit("fgaus","QR"); - float scale = fgaus -> GetParameter(2); - float residual = scale*scale - sigma*sigma; - if ( residual < 0 ) residual = -sqrt(-residual); - else residual = sqrt(residual); - residual_vs_ieta[iLoop]-> SetPoint(n,etaring,residual); - residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); - n++; - } - - } - - else if ( modality == "SM" ) { - - for (int i = 1; i < 36+1; i++){ - - if ( hsigma[i-1]->GetEntries() == 0) continue; - float e = 0.5; - // Get the sigma - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); - fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); - hsigma[i-1] -> Fit("fgaus","QR"); - float sigma = fgaus -> GetParameter(2); - // Get the scale - fgaus->SetParameter(1,1); - fgaus->SetParameter(2,hscale[i-1]->GetRMS()); - fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); - hscale[i-1] -> Fit("fgaus","QR"); - float scale = fgaus -> GetParameter(2); - float residual = scale*scale - sigma*sigma; - if ( residual < 0 ) residual = -sqrt(-residual); - else residual = sqrt(residual); - residual_vs_ieta[iLoop]-> SetPoint(n,i,residual); - residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); - n++; - - - } - - - } - -// delete hresidual; - - } - - - - //------------------------------------------------------------------------ - - - - - //----------------------------------------------------------------- - //--- Draw plots - //----------------------------------------------------------------- - TCanvas *c[nLoops]; - - // --- plot 5 : statistical precision vs ieta - if (evalStat){ - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - sprintf(hname,"cstat_%d",iLoop); - c[iLoop] = new TCanvas(hname,hname); - c[iLoop]->SetGridx(); - c[iLoop]->SetGridy(); - residual_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.07); - residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); - residual_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("residual miscalibration"); - residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); - if ( modality = "SM" ) residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("iSM"); - residual_vs_ieta[iLoop]->Draw("ap"); - } - } - - //----------------------------------------------------------------- - //--- Print plots - //----------------------------------------------------------------- - - if (printPlots){ - - //gStyle->SetOptStat(1110); - c[0]->Print("IC_map.png",fileType); - c[1]->Print("IC_precision_vs_ieta.png",fileType); - c[2]->Print("IC_scale_vs_ieta.png",fileType); - c[3]->Print("IC_spread.png",fileType); - c[4]->Print("occupancy_map.png",fileType); - } -} - - diff --git a/EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx b/EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx deleted file mode 100644 index bbed2c46e03..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/Normalize_IC_EE.cxx +++ /dev/null @@ -1,277 +0,0 @@ -// -// Macro to Normalize DATA IC Coefficient along one ring skipping dead channels and TT -// Input File Scale Map of a data sample (can be used also on MC) an this is saved in the same -// file updating the old scale_map normalized by rings without skip dead channels -#include -#include -#include -#include -#include -#include -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TROOT.h" -#include "TStyle.h" -#include - -using namespace std; - -// Check if the crystal is near to a dead one - -bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir) -{ - if(h_scale_EE->GetBinContent(ix,iy) ==0) return false; - - int bx= h_scale_EE->GetNbinsX(); - int by= h_scale_EE->GetNbinsY(); - - if((ixGetBinContent(ix+1,iy) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix-1,iy)==0 && ix>1 && (ir!=0 || ir<33))) return false; - - if((iyGetBinContent(ix,iy+1) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix,iy-1)==0 && iy>1 && (ir!=0 || ir<33))) return false; - - if((ixGetBinContent(ix+1,iy+1) ==0 && iyGetBinContent(ix-1,iy-1)==0 && iy>1 && ix>1 && (ir!=0 || ir<33))) return false; - - if((h_scale_EE->GetBinContent(ix+1,iy-1) ==0 && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && ix>1 && iy >& TT_centre ) -{ - for( int k =0; kReset(); - gROOT->SetStyle("Plain"); - - gStyle->SetPadTickX(1); - gStyle->SetPadTickY(1); - gStyle->SetOptTitle(0); - gStyle->SetOptStat(1110); - gStyle->SetOptFit(0); - gStyle->SetFitFormat("6.3g"); - gStyle->SetPalette(1); - - gStyle->SetTextFont(42); - gStyle->SetTextSize(0.05); - gStyle->SetTitleFont(42,"xyz"); - gStyle->SetTitleSize(0.05); - gStyle->SetLabelFont(42,"xyz"); - gStyle->SetLabelSize(0.05); - gStyle->SetTitleXOffset(0.8); - gStyle->SetTitleYOffset(1.1); - gROOT->ForceStyle(); - - if ( !infile1 ) { - cout << " No input file specified !" << endl; - return; - } - - // map for dead TT centre - - std::vector< std::pair > TT_centre_EEP ; - std::vector< std::pair > TT_centre_EEM ; - - TT_centre_EEP.push_back(std::pair (78,78)); - TT_centre_EEP.push_back(std::pair (83,28)); - TT_centre_EEP.push_back(std::pair (83,23)); - TT_centre_EEM.push_back(std::pair (53,28)); - - // Input file with full statistic - - TFile *f = new TFile(infile1,"UPDATE"); - TH2F* h_scale_EE[2],*hcmap_EE[2]; - - h_scale_EE[1] = (TH2F*)f->Get("h_scale_EEP"); - h_scale_EE[0] = (TH2F*)f->Get("h_scale_EEM"); - - hcmap_EE[1] = (TH2F*) h_scale_EE[1]->Clone("hcmap_EEP"); - hcmap_EE[0] = (TH2F*) h_scale_EE[0]->Clone("hcmap_EEM"); - - hcmap_EE[0] -> Reset("ICEMS"); - hcmap_EE[1] -> Reset("ICEMS"); - hcmap_EE[0] -> ResetStats(); - hcmap_EE[1] -> ResetStats(); - - - TH2F *hrings[2]; - hrings[0] = (TH2F*)h_scale_EE[0]->Clone("hringsEEM"); - hrings[1] = (TH2F*)h_scale_EE[1]->Clone("hringsEEP"); - hrings[0] ->Reset("ICMES"); - hrings[1] ->Reset("ICMES"); - hrings[0] ->ResetStats(); - hrings[1] ->ResetStats(); - - - FILE *fRing; - fRing = fopen("macros/eerings.dat","r"); - int x,y,z,ir; - while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { - if(z>0) hrings[1]->Fill(x,y,ir); - if(z<0) hrings[0]->Fill(x,y,ir); - } - - std::vector SumIC_Ring_EEP,SumIC_Ring_EEM,Sumxtal_Ring_EEP,Sumxtal_Ring_EEM; - - SumIC_Ring_EEP.assign(40,0); - SumIC_Ring_EEM.assign(40,0); - Sumxtal_Ring_EEP.assign(40,0); - Sumxtal_Ring_EEM.assign(40,0); - - // Mean over phi corrected skipping dead channel - for(int k=0; k<2 ; k++) - { - for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ - - for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ - - ir = hrings[k]->GetBinContent(ix,iy); - - bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); - bool isGoodTT; - if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); - else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); - - if(k!=0 && isGoodTT && isGood ) - { - SumIC_Ring_EEP.at(ir) = SumIC_Ring_EEP.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEP.at(ir) = Sumxtal_Ring_EEP.at(ir) + 1.; - } - if(k==0 && isGoodTT && isGood) - { - SumIC_Ring_EEM.at(ir) = SumIC_Ring_EEM.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); - Sumxtal_Ring_EEM.at(ir) = Sumxtal_Ring_EEM.at(ir) + 1.; - } - - } - } - } - - for(int k=0; k<2 ; k++) - { - for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ) - { - for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ) - { - ir = hrings[k]->GetBinContent(ix,iy); - - //fede: skip bad channels and bad TTs - bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); - bool isGoodTT; - if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); - else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); - if (!isGood || !isGoodTT) continue; - - if(k!=0) - { - if(ir>33){ - hcmap_EE[k]->Fill(ix,iy,0.); - continue; - } - if(Sumxtal_Ring_EEP.at(ir) != 0 && SumIC_Ring_EEP.at(ir)!= 0) - hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP.at(ir)/Sumxtal_Ring_EEP.at(ir))); - } - else - { - if(ir>33){ - hcmap_EE[k]->Fill(ix,iy,0.); - continue; - } - if(Sumxtal_Ring_EEM.at(ir) != 0 && SumIC_Ring_EEM.at(ir) != 0) - hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM.at(ir)/Sumxtal_Ring_EEM.at(ir))); - } - } - } - } - - TCanvas *cEEP[12]; - TCanvas *cEEM[12]; - - // --- plot 0 : map of coefficients - cEEP[0] = new TCanvas("cEEP","cmapEEP not normalized"); - cEEP[0] -> cd(); - cEEP[0]->SetLeftMargin(0.1); - cEEP[0]->SetRightMargin(0.13); - cEEP[0]->SetGridx(); - cEEP[0]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - h_scale_EE[1]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE[1]->Draw("COLZ"); - h_scale_EE[1]->GetXaxis() ->SetTitle("ix"); - h_scale_EE[1]->GetYaxis() ->SetTitle("iy"); - h_scale_EE[1]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEM[0] = new TCanvas("cEEM","cmapEEM not normalized"); - cEEM[0] -> cd(); - cEEM[0]->SetLeftMargin(0.1); - cEEM[0]->SetRightMargin(0.13); - cEEM[0]->SetGridx(); - cEEM[0]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - h_scale_EE[0]->GetXaxis() -> SetLabelSize(0.03); - h_scale_EE[0]->Draw("COLZ"); - h_scale_EE[0]->GetXaxis() ->SetTitle("ix"); - h_scale_EE[0]->GetYaxis() ->SetTitle("iy"); - h_scale_EE[0]->GetZaxis() ->SetRangeUser(0.5,2.); - - cEEP[1] = new TCanvas("cmapEEP Normalized","cmapEEP Normalized"); - cEEP[1] -> cd(); - cEEP[1]->SetLeftMargin(0.1); - cEEP[1]->SetRightMargin(0.13); - cEEP[1]->SetGridx(); - cEEP[1]->SetGridy(); - // hcmap[1]->GetXaxis()->SetNdivisions(1020); - hcmap_EE[1]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE[1]->Draw("COLZ"); - hcmap_EE[1]->GetXaxis() ->SetTitle("ix"); - hcmap_EE[1]->GetYaxis() ->SetTitle("iy"); - hcmap_EE[1]->GetZaxis() ->SetRangeUser(0.8,1.2); - - cEEM[1] = new TCanvas("cmapEEM Normalized","cmapEEM Normalized"); - cEEM[1] -> cd(); - cEEM[1]->SetLeftMargin(0.1); - cEEM[1]->SetRightMargin(0.13); - cEEM[1]->SetGridx(); - cEEM[1]->SetGridy(); - //hcmap[0]->GetXaxis()->SetNdivisions(1020); - hcmap_EE[0]->GetXaxis() -> SetLabelSize(0.03); - hcmap_EE[0]->Draw("COLZ"); - hcmap_EE[0]->GetXaxis() ->SetTitle("ix"); - hcmap_EE[0]->GetYaxis() ->SetTitle("iy"); - hcmap_EE[0]->GetZaxis() ->SetRangeUser(0.8,1.2); - - - f->cd(); - hcmap_EE[0]->Write("h_scale_map_EEM"); - hcmap_EE[1]->Write("h_scale_map_EEP"); - - - } diff --git a/EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C b/EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C deleted file mode 100644 index 8be08eaa6df..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/ProduceScalibMap.C +++ /dev/null @@ -1,45 +0,0 @@ -/// Produce miscalibration map for EB - -#include -#include -#include -#include -#include -#include -#include - -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TF1.h" -#include "TLegend.h" -#include "TGraphErrors.h" -#include "TApplication.h" -#include "TLatex.h" -#include "TFile.h" -#include "TRandom.h" -#include "TRandom3.h" - -void main(int argc, char **argv) -{ - - TRandom3 genRand; - - std::ofstream io1; - io1.open ("scalibMap6.txt"); - - float eta, scalib; - - for (eta=-85; eta<86; eta++) { - - if (fabs(eta)<30) scalib = genRand.Gaus(1,0.06); - else if (fabs(eta)<60) scalib = genRand.Gaus(1,0.07); - else if (fabs(eta)<70) scalib = genRand.Gaus(1,0.08); - else scalib = genRand.Gaus(1,0.09); - - io1< -#include -#include -#include -#include -#include -#include - -#include "TH2F.h" -#include "TFile.h" -#include "TCanvas.h" -#include "TROOT.h" -#include "TStyle.h" -#include "TF1.h" -#include "TLegend.h" -#include "TGraphErrors.h" -#include "TApplication.h" -#include "TLatex.h" -#include "TFile.h" -#include "TRandom.h" -#include "TRandom3.h" - -void main(int argc, char **argv) -{ - - TRandom3 genRand; - - std::ofstream io1; - io1.open ("scalibMapEE.txt"); - - float r, scalib; - - for (r=0; r<40; r++) { - - if (fabs(r)<5) scalib = genRand.Gaus(1,0.01); - else if (fabs(r)<15) scalib = genRand.Gaus(1,0.005); - else if (fabs(r)<30) scalib = genRand.Gaus(1,0.005); - else if (fabs(r)<40) scalib = genRand.Gaus(1,0.01); - else scalib = genRand.Gaus(1,0.015); - - io1< 2 File for Even and Odd L3 output for a defined data sample - -> evalStat = 1 for statistical precision analysis - -> inputLoops = number of L3 loops - - Run : root -l macros/DrawPrecisionPlot.C - - Output: -> Plots = stat precision in eta ring no Folded, convergence Plots in 4 eta region - evaluate through linear fit - -> StatPrec.root = has to be used in the comparision with miscalibrated MC in CompareCalibToMCTruth.C - - -########################################## ------ Macros for EE Calibration ---------- -########################################## - - -1) macros/Correction_TrackerEffect_EE_MC.cxx - - input : -> Calibration Maps of (Normalized MC IC * IC_RECO)/(IC_Truth) used to extract empiric correction for data - -> macros/eerings.dat is used to built EE ring geometry - -> List of phi structure coordinates (iphi calcolated from ix and iy) for EE+ and EE- - - Run : root -l macros/Correction_TrackerEffect_EE_MC.cxx+ - - Output : k(correction_factor) = (inside a given phi structure)/(outside, in the all endcap) - The analysis is independent between EE+ and EE-. - -> Map IC are plotted before and after correction - -> Empiric coefficient are printed and used in Correction_TrackerEffect_EE_DATA_dinamic_alpha.cxx - - Note : these coefficient are strictly dependent on the MC production used (WJetsToLnu and DYToLL Fall1 are considered) - -2) macros/Correction_TrackerEffect_EE_DATA.cxx - - input : -> Ntupla of data on which apply correction - -> macros/eerings.dat is used to built EE ring geometry - -> List of phi structure coordinates (iphi calcolated from ix and iy) for EE+ and EE- and - empiric coefficient for correction that are different - between noEP and R9 selection applied in the calibration procedure. - - Run : root -l macros/Correction_TrackerEffect_EE_DATA.cxx+ - - Output : -> maps of IC corrected are added in the original input file under the name - h_scale_map_corrected_EEM and h_scale_map_corrected_EEP - -3) macros/DrawCalibrationPlotsEE.C - - input : -> Files for full, even and odd calibration analysis on data or MC - -> evalstat=1 in order to evaluate statistic spread IC - -> isMC = true stands for MC EE analysis - -> MCtruthIC_EE.root and MCRecoIC_EE.root are used for MC Analysis - -> existingEE.root -> contains problematic channel in the Endcap - - Run : root -l macros/DrawCalibrationPlotsEE.C+ - - Output: -> Plot for spread, statistical precision and residual spred for EE+, EE- and folding EE+ over EE- - -> If isMC=true Plots of statistic precision for EE+, EE- and folded are saved in StatPrec_MC_EE.root - You have to run this code before run CompareCalibToMCTruth_EE.C - -> if isMC=true comparison plot MC(Truth/RECO)/MC IC that are saved in IC_MC_4Correction.root - This file is used as input in macros/Correction_TrackerEffect_EE_MC.cxx - -> ifMC=false Calibration_Coefficient_EE_dinamic_alpha.txt that is the txt file of EE IC - -> Map of warning channel after InterCalibration - - -############################### --------- Other macros --------- -############################### - - -1) macros/DrawEPDistributions.cxx - - input : -> file from FastCalibratorWeight or FastCalibratorEE with the EoP distributions for each eta ring at - different iteration step - - Run : root -l macros/DrawEPDistributions.cxx+ - - Output : Plots in different eta ring - - -2) macros/DrawMomentumCalibration.cxx - - input : -> output from test/CalibrationMomentum.cpp - - Run : root -l macros/DrawMomentumCalibration.cxx+ - - Output : Plots of the scale, correlation and ratios in different eta region for EB and EE - - - \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/macros/eerings.dat b/EOverPCalibration/FastCalibrator/macros/eerings.dat deleted file mode 100644 index 4d581446724..00000000000 --- a/EOverPCalibration/FastCalibrator/macros/eerings.dat +++ /dev/null @@ -1,14648 +0,0 @@ -(1, 41, -1) 0 -(1, 42, -1) 0 -(1, 43, -1) 0 -(1, 44, -1) 0 -(1, 45, -1) 0 -(1, 46, -1) 0 -(1, 47, -1) 0 -(1, 48, -1) 0 -(1, 49, -1) 0 -(1, 50, -1) 0 -(1, 51, -1) 0 -(1, 52, -1) 0 -(1, 53, -1) 0 -(1, 54, -1) 0 -(1, 55, -1) 0 -(1, 56, -1) 0 -(1, 57, -1) 0 -(1, 58, -1) 0 -(1, 59, -1) 0 -(1, 60, -1) 0 -(2, 41, -1) 0 -(2, 42, -1) 0 -(2, 43, -1) 0 -(2, 44, -1) 1 -(2, 45, -1) 1 -(2, 46, -1) 1 -(2, 47, -1) 1 -(2, 48, -1) 1 -(2, 49, -1) 1 -(2, 50, -1) 1 -(2, 51, -1) 1 -(2, 52, -1) 1 -(2, 53, -1) 1 -(2, 54, -1) 1 -(2, 55, -1) 1 -(2, 56, -1) 1 -(2, 57, -1) 1 -(2, 58, -1) 0 -(2, 59, -1) 0 -(2, 60, -1) 0 -(3, 41, -1) 1 -(3, 42, -1) 1 -(3, 43, -1) 1 -(3, 44, -1) 2 -(3, 45, -1) 2 -(3, 46, -1) 2 -(3, 47, -1) 2 -(3, 48, -1) 2 -(3, 49, -1) 2 -(3, 50, -1) 2 -(3, 51, -1) 2 -(3, 52, -1) 2 -(3, 53, -1) 2 -(3, 54, -1) 2 -(3, 55, -1) 2 -(3, 56, -1) 2 -(3, 57, -1) 2 -(3, 58, -1) 1 -(3, 59, -1) 1 -(3, 60, -1) 1 -(4, 36, -1) 1 -(4, 37, -1) 1 -(4, 38, -1) 2 -(4, 39, -1) 2 -(4, 40, -1) 2 -(4, 41, -1) 2 -(4, 42, -1) 2 -(4, 43, -1) 2 -(4, 44, -1) 3 -(4, 45, -1) 3 -(4, 46, -1) 3 -(4, 47, -1) 3 -(4, 48, -1) 3 -(4, 49, -1) 3 -(4, 50, -1) 3 -(4, 51, -1) 3 -(4, 52, -1) 3 -(4, 53, -1) 3 -(4, 54, -1) 3 -(4, 55, -1) 3 -(4, 56, -1) 3 -(4, 57, -1) 3 -(4, 58, -1) 2 -(4, 59, -1) 2 -(4, 60, -1) 2 -(4, 61, -1) 2 -(4, 62, -1) 2 -(4, 63, -1) 2 -(4, 64, -1) 1 -(4, 65, -1) 1 -(5, 36, -1) 2 -(5, 37, -1) 2 -(5, 38, -1) 2 -(5, 39, -1) 3 -(5, 40, -1) 3 -(5, 41, -1) 3 -(5, 42, -1) 3 -(5, 43, -1) 3 -(5, 44, -1) 4 -(5, 45, -1) 4 -(5, 46, -1) 4 -(5, 47, -1) 4 -(5, 48, -1) 4 -(5, 49, -1) 4 -(5, 50, -1) 4 -(5, 51, -1) 4 -(5, 52, -1) 4 -(5, 53, -1) 4 -(5, 54, -1) 4 -(5, 55, -1) 4 -(5, 56, -1) 4 -(5, 57, -1) 4 -(5, 58, -1) 3 -(5, 59, -1) 3 -(5, 60, -1) 3 -(5, 61, -1) 3 -(5, 62, -1) 3 -(5, 63, -1) 2 -(5, 64, -1) 2 -(5, 65, -1) 2 -(6, 26, -1) 0 -(6, 27, -1) 0 -(6, 28, -1) 0 -(6, 29, -1) 0 -(6, 30, -1) 1 -(6, 31, -1) 1 -(6, 32, -1) 1 -(6, 33, -1) 2 -(6, 34, -1) 2 -(6, 35, -1) 3 -(6, 36, -1) 3 -(6, 37, -1) 3 -(6, 38, -1) 3 -(6, 39, -1) 4 -(6, 40, -1) 4 -(6, 41, -1) 4 -(6, 42, -1) 4 -(6, 43, -1) 4 -(6, 44, -1) 5 -(6, 45, -1) 5 -(6, 46, -1) 5 -(6, 47, -1) 5 -(6, 48, -1) 5 -(6, 49, -1) 5 -(6, 50, -1) 5 -(6, 51, -1) 5 -(6, 52, -1) 5 -(6, 53, -1) 5 -(6, 54, -1) 5 -(6, 55, -1) 5 -(6, 56, -1) 5 -(6, 57, -1) 5 -(6, 58, -1) 4 -(6, 59, -1) 4 -(6, 60, -1) 4 -(6, 61, -1) 4 -(6, 62, -1) 4 -(6, 63, -1) 3 -(6, 64, -1) 3 -(6, 65, -1) 3 -(6, 66, -1) 3 -(6, 67, -1) 2 -(6, 68, -1) 2 -(6, 69, -1) 1 -(6, 70, -1) 1 -(6, 71, -1) 1 -(6, 72, -1) 0 -(6, 73, -1) 0 -(6, 74, -1) 0 -(6, 75, -1) 0 -(7, 26, -1) 0 -(7, 27, -1) 0 -(7, 28, -1) 1 -(7, 29, -1) 1 -(7, 30, -1) 2 -(7, 31, -1) 2 -(7, 32, -1) 2 -(7, 33, -1) 3 -(7, 34, -1) 3 -(7, 35, -1) 3 -(7, 36, -1) 4 -(7, 37, -1) 4 -(7, 38, -1) 4 -(7, 39, -1) 5 -(7, 40, -1) 5 -(7, 41, -1) 5 -(7, 42, -1) 5 -(7, 43, -1) 5 -(7, 44, -1) 6 -(7, 45, -1) 6 -(7, 46, -1) 6 -(7, 47, -1) 6 -(7, 48, -1) 6 -(7, 49, -1) 6 -(7, 50, -1) 6 -(7, 51, -1) 6 -(7, 52, -1) 6 -(7, 53, -1) 6 -(7, 54, -1) 6 -(7, 55, -1) 6 -(7, 56, -1) 6 -(7, 57, -1) 6 -(7, 58, -1) 5 -(7, 59, -1) 5 -(7, 60, -1) 5 -(7, 61, -1) 5 -(7, 62, -1) 5 -(7, 63, -1) 4 -(7, 64, -1) 4 -(7, 65, -1) 4 -(7, 66, -1) 3 -(7, 67, -1) 3 -(7, 68, -1) 3 -(7, 69, -1) 2 -(7, 70, -1) 2 -(7, 71, -1) 2 -(7, 72, -1) 1 -(7, 73, -1) 1 -(7, 74, -1) 0 -(7, 75, -1) 0 -(8, 26, -1) 1 -(8, 27, -1) 1 -(8, 28, -1) 2 -(8, 29, -1) 2 -(8, 30, -1) 3 -(8, 31, -1) 3 -(8, 32, -1) 3 -(8, 33, -1) 4 -(8, 34, -1) 4 -(8, 35, -1) 4 -(8, 36, -1) 5 -(8, 37, -1) 5 -(8, 38, -1) 5 -(8, 39, -1) 6 -(8, 40, -1) 6 -(8, 41, -1) 6 -(8, 42, -1) 6 -(8, 43, -1) 6 -(8, 44, -1) 7 -(8, 45, -1) 7 -(8, 46, -1) 7 -(8, 47, -1) 7 -(8, 48, -1) 7 -(8, 49, -1) 7 -(8, 50, -1) 7 -(8, 51, -1) 7 -(8, 52, -1) 7 -(8, 53, -1) 7 -(8, 54, -1) 7 -(8, 55, -1) 7 -(8, 56, -1) 7 -(8, 57, -1) 7 -(8, 58, -1) 6 -(8, 59, -1) 6 -(8, 60, -1) 6 -(8, 61, -1) 6 -(8, 62, -1) 6 -(8, 63, -1) 5 -(8, 64, -1) 5 -(8, 65, -1) 5 -(8, 66, -1) 4 -(8, 67, -1) 4 -(8, 68, -1) 4 -(8, 69, -1) 3 -(8, 70, -1) 3 -(8, 71, -1) 3 -(8, 72, -1) 2 -(8, 73, -1) 2 -(8, 74, -1) 1 -(8, 75, -1) 1 -(9, 21, -1) 0 -(9, 22, -1) 0 -(9, 23, -1) 0 -(9, 24, -1) 1 -(9, 25, -1) 1 -(9, 26, -1) 2 -(9, 27, -1) 2 -(9, 28, -1) 3 -(9, 29, -1) 3 -(9, 30, -1) 4 -(9, 31, -1) 4 -(9, 32, -1) 4 -(9, 33, -1) 5 -(9, 34, -1) 5 -(9, 35, -1) 5 -(9, 36, -1) 6 -(9, 37, -1) 6 -(9, 38, -1) 6 -(9, 39, -1) 7 -(9, 40, -1) 7 -(9, 41, -1) 7 -(9, 42, -1) 7 -(9, 43, -1) 7 -(9, 44, -1) 8 -(9, 45, -1) 8 -(9, 46, -1) 8 -(9, 47, -1) 8 -(9, 48, -1) 8 -(9, 49, -1) 8 -(9, 50, -1) 8 -(9, 51, -1) 8 -(9, 52, -1) 8 -(9, 53, -1) 8 -(9, 54, -1) 8 -(9, 55, -1) 8 -(9, 56, -1) 8 -(9, 57, -1) 8 -(9, 58, -1) 7 -(9, 59, -1) 7 -(9, 60, -1) 7 -(9, 61, -1) 7 -(9, 62, -1) 7 -(9, 63, -1) 6 -(9, 64, -1) 6 -(9, 65, -1) 6 -(9, 66, -1) 5 -(9, 67, -1) 5 -(9, 68, -1) 5 -(9, 69, -1) 4 -(9, 70, -1) 4 -(9, 71, -1) 4 -(9, 72, -1) 3 -(9, 73, -1) 3 -(9, 74, -1) 2 -(9, 75, -1) 2 -(9, 76, -1) 1 -(9, 77, -1) 1 -(9, 78, -1) 0 -(9, 79, -1) 0 -(9, 80, -1) 0 -(10, 21, -1) 0 -(10, 22, -1) 1 -(10, 23, -1) 1 -(10, 24, -1) 2 -(10, 25, -1) 2 -(10, 26, -1) 3 -(10, 27, -1) 3 -(10, 28, -1) 4 -(10, 29, -1) 4 -(10, 30, -1) 4 -(10, 31, -1) 5 -(10, 32, -1) 5 -(10, 33, -1) 6 -(10, 34, -1) 6 -(10, 35, -1) 6 -(10, 36, -1) 7 -(10, 37, -1) 7 -(10, 38, -1) 7 -(10, 39, -1) 8 -(10, 40, -1) 8 -(10, 41, -1) 8 -(10, 42, -1) 8 -(10, 43, -1) 8 -(10, 44, -1) 9 -(10, 45, -1) 9 -(10, 46, -1) 9 -(10, 47, -1) 9 -(10, 48, -1) 9 -(10, 49, -1) 9 -(10, 50, -1) 9 -(10, 51, -1) 9 -(10, 52, -1) 9 -(10, 53, -1) 9 -(10, 54, -1) 9 -(10, 55, -1) 9 -(10, 56, -1) 9 -(10, 57, -1) 9 -(10, 58, -1) 8 -(10, 59, -1) 8 -(10, 60, -1) 8 -(10, 61, -1) 8 -(10, 62, -1) 8 -(10, 63, -1) 7 -(10, 64, -1) 7 -(10, 65, -1) 7 -(10, 66, -1) 6 -(10, 67, -1) 6 -(10, 68, -1) 6 -(10, 69, -1) 5 -(10, 70, -1) 5 -(10, 71, -1) 4 -(10, 72, -1) 4 -(10, 73, -1) 4 -(10, 74, -1) 3 -(10, 75, -1) 3 -(10, 76, -1) 2 -(10, 77, -1) 2 -(10, 78, -1) 1 -(10, 79, -1) 1 -(10, 80, -1) 0 -(11, 21, -1) 1 -(11, 22, -1) 1 -(11, 23, -1) 2 -(11, 24, -1) 2 -(11, 25, -1) 3 -(11, 26, -1) 3 -(11, 27, -1) 4 -(11, 28, -1) 4 -(11, 29, -1) 5 -(11, 30, -1) 5 -(11, 31, -1) 6 -(11, 32, -1) 6 -(11, 33, -1) 6 -(11, 34, -1) 7 -(11, 35, -1) 7 -(11, 36, -1) 8 -(11, 37, -1) 8 -(11, 38, -1) 8 -(11, 39, -1) 8 -(11, 40, -1) 9 -(11, 41, -1) 9 -(11, 42, -1) 9 -(11, 43, -1) 9 -(11, 44, -1) 9 -(11, 45, -1) 10 -(11, 46, -1) 10 -(11, 47, -1) 10 -(11, 48, -1) 10 -(11, 49, -1) 10 -(11, 50, -1) 10 -(11, 51, -1) 10 -(11, 52, -1) 10 -(11, 53, -1) 10 -(11, 54, -1) 10 -(11, 55, -1) 10 -(11, 56, -1) 10 -(11, 57, -1) 9 -(11, 58, -1) 9 -(11, 59, -1) 9 -(11, 60, -1) 9 -(11, 61, -1) 9 -(11, 62, -1) 8 -(11, 63, -1) 8 -(11, 64, -1) 8 -(11, 65, -1) 8 -(11, 66, -1) 7 -(11, 67, -1) 7 -(11, 68, -1) 6 -(11, 69, -1) 6 -(11, 70, -1) 6 -(11, 71, -1) 5 -(11, 72, -1) 5 -(11, 73, -1) 4 -(11, 74, -1) 4 -(11, 75, -1) 3 -(11, 76, -1) 3 -(11, 77, -1) 2 -(11, 78, -1) 2 -(11, 79, -1) 1 -(11, 80, -1) 1 -(12, 21, -1) 1 -(12, 22, -1) 2 -(12, 23, -1) 3 -(12, 24, -1) 3 -(12, 25, -1) 4 -(12, 26, -1) 4 -(12, 27, -1) 5 -(12, 28, -1) 5 -(12, 29, -1) 6 -(12, 30, -1) 6 -(12, 31, -1) 7 -(12, 32, -1) 7 -(12, 33, -1) 7 -(12, 34, -1) 8 -(12, 35, -1) 8 -(12, 36, -1) 8 -(12, 37, -1) 9 -(12, 38, -1) 9 -(12, 39, -1) 9 -(12, 40, -1) 10 -(12, 41, -1) 10 -(12, 42, -1) 10 -(12, 43, -1) 10 -(12, 44, -1) 10 -(12, 45, -1) 11 -(12, 46, -1) 11 -(12, 47, -1) 11 -(12, 48, -1) 11 -(12, 49, -1) 11 -(12, 50, -1) 11 -(12, 51, -1) 11 -(12, 52, -1) 11 -(12, 53, -1) 11 -(12, 54, -1) 11 -(12, 55, -1) 11 -(12, 56, -1) 11 -(12, 57, -1) 10 -(12, 58, -1) 10 -(12, 59, -1) 10 -(12, 60, -1) 10 -(12, 61, -1) 10 -(12, 62, -1) 9 -(12, 63, -1) 9 -(12, 64, -1) 9 -(12, 65, -1) 8 -(12, 66, -1) 8 -(12, 67, -1) 8 -(12, 68, -1) 7 -(12, 69, -1) 7 -(12, 70, -1) 7 -(12, 71, -1) 6 -(12, 72, -1) 6 -(12, 73, -1) 5 -(12, 74, -1) 5 -(12, 75, -1) 4 -(12, 76, -1) 4 -(12, 77, -1) 3 -(12, 78, -1) 3 -(12, 79, -1) 2 -(12, 80, -1) 1 -(13, 21, -1) 2 -(13, 22, -1) 3 -(13, 23, -1) 3 -(13, 24, -1) 4 -(13, 25, -1) 5 -(13, 26, -1) 5 -(13, 27, -1) 6 -(13, 28, -1) 6 -(13, 29, -1) 7 -(13, 30, -1) 7 -(13, 31, -1) 7 -(13, 32, -1) 8 -(13, 33, -1) 8 -(13, 34, -1) 9 -(13, 35, -1) 9 -(13, 36, -1) 9 -(13, 37, -1) 10 -(13, 38, -1) 10 -(13, 39, -1) 10 -(13, 40, -1) 11 -(13, 41, -1) 11 -(13, 42, -1) 11 -(13, 43, -1) 11 -(13, 44, -1) 11 -(13, 45, -1) 12 -(13, 46, -1) 12 -(13, 47, -1) 12 -(13, 48, -1) 12 -(13, 49, -1) 12 -(13, 50, -1) 12 -(13, 51, -1) 12 -(13, 52, -1) 12 -(13, 53, -1) 12 -(13, 54, -1) 12 -(13, 55, -1) 12 -(13, 56, -1) 12 -(13, 57, -1) 11 -(13, 58, -1) 11 -(13, 59, -1) 11 -(13, 60, -1) 11 -(13, 61, -1) 11 -(13, 62, -1) 10 -(13, 63, -1) 10 -(13, 64, -1) 10 -(13, 65, -1) 9 -(13, 66, -1) 9 -(13, 67, -1) 9 -(13, 68, -1) 8 -(13, 69, -1) 8 -(13, 70, -1) 7 -(13, 71, -1) 7 -(13, 72, -1) 7 -(13, 73, -1) 6 -(13, 74, -1) 6 -(13, 75, -1) 5 -(13, 76, -1) 5 -(13, 77, -1) 4 -(13, 78, -1) 3 -(13, 79, -1) 3 -(13, 80, -1) 2 -(14, 16, -1) 0 -(14, 17, -1) 1 -(14, 18, -1) 1 -(14, 19, -1) 2 -(14, 20, -1) 2 -(14, 21, -1) 3 -(14, 22, -1) 4 -(14, 23, -1) 4 -(14, 24, -1) 5 -(14, 25, -1) 5 -(14, 26, -1) 6 -(14, 27, -1) 6 -(14, 28, -1) 7 -(14, 29, -1) 7 -(14, 30, -1) 8 -(14, 31, -1) 8 -(14, 32, -1) 9 -(14, 33, -1) 9 -(14, 34, -1) 10 -(14, 35, -1) 10 -(14, 36, -1) 10 -(14, 37, -1) 11 -(14, 38, -1) 11 -(14, 39, -1) 11 -(14, 40, -1) 12 -(14, 41, -1) 12 -(14, 42, -1) 12 -(14, 43, -1) 12 -(14, 44, -1) 12 -(14, 45, -1) 13 -(14, 46, -1) 13 -(14, 47, -1) 13 -(14, 48, -1) 13 -(14, 49, -1) 13 -(14, 50, -1) 13 -(14, 51, -1) 13 -(14, 52, -1) 13 -(14, 53, -1) 13 -(14, 54, -1) 13 -(14, 55, -1) 13 -(14, 56, -1) 13 -(14, 57, -1) 12 -(14, 58, -1) 12 -(14, 59, -1) 12 -(14, 60, -1) 12 -(14, 61, -1) 12 -(14, 62, -1) 11 -(14, 63, -1) 11 -(14, 64, -1) 11 -(14, 65, -1) 10 -(14, 66, -1) 10 -(14, 67, -1) 10 -(14, 68, -1) 9 -(14, 69, -1) 9 -(14, 70, -1) 8 -(14, 71, -1) 8 -(14, 72, -1) 7 -(14, 73, -1) 7 -(14, 74, -1) 6 -(14, 75, -1) 6 -(14, 76, -1) 5 -(14, 77, -1) 5 -(14, 78, -1) 4 -(14, 79, -1) 4 -(14, 80, -1) 3 -(14, 81, -1) 2 -(14, 82, -1) 2 -(14, 83, -1) 1 -(14, 84, -1) 1 -(14, 85, -1) 0 -(15, 16, -1) 1 -(15, 17, -1) 1 -(15, 18, -1) 2 -(15, 19, -1) 3 -(15, 20, -1) 3 -(15, 21, -1) 4 -(15, 22, -1) 4 -(15, 23, -1) 5 -(15, 24, -1) 6 -(15, 25, -1) 6 -(15, 26, -1) 7 -(15, 27, -1) 7 -(15, 28, -1) 8 -(15, 29, -1) 8 -(15, 30, -1) 9 -(15, 31, -1) 9 -(15, 32, -1) 10 -(15, 33, -1) 10 -(15, 34, -1) 11 -(15, 35, -1) 11 -(15, 36, -1) 11 -(15, 37, -1) 12 -(15, 38, -1) 12 -(15, 39, -1) 12 -(15, 40, -1) 13 -(15, 41, -1) 13 -(15, 42, -1) 13 -(15, 43, -1) 13 -(15, 44, -1) 13 -(15, 45, -1) 14 -(15, 46, -1) 14 -(15, 47, -1) 14 -(15, 48, -1) 14 -(15, 49, -1) 14 -(15, 50, -1) 14 -(15, 51, -1) 14 -(15, 52, -1) 14 -(15, 53, -1) 14 -(15, 54, -1) 14 -(15, 55, -1) 14 -(15, 56, -1) 14 -(15, 57, -1) 13 -(15, 58, -1) 13 -(15, 59, -1) 13 -(15, 60, -1) 13 -(15, 61, -1) 13 -(15, 62, -1) 12 -(15, 63, -1) 12 -(15, 64, -1) 12 -(15, 65, -1) 11 -(15, 66, -1) 11 -(15, 67, -1) 11 -(15, 68, -1) 10 -(15, 69, -1) 10 -(15, 70, -1) 9 -(15, 71, -1) 9 -(15, 72, -1) 8 -(15, 73, -1) 8 -(15, 74, -1) 7 -(15, 75, -1) 7 -(15, 76, -1) 6 -(15, 77, -1) 6 -(15, 78, -1) 5 -(15, 79, -1) 4 -(15, 80, -1) 4 -(15, 81, -1) 3 -(15, 82, -1) 3 -(15, 83, -1) 2 -(15, 84, -1) 1 -(15, 85, -1) 1 -(16, 14, -1) 0 -(16, 15, -1) 1 -(16, 16, -1) 1 -(16, 17, -1) 2 -(16, 18, -1) 2 -(16, 19, -1) 3 -(16, 20, -1) 4 -(16, 21, -1) 4 -(16, 22, -1) 5 -(16, 23, -1) 6 -(16, 24, -1) 6 -(16, 25, -1) 7 -(16, 26, -1) 7 -(16, 27, -1) 8 -(16, 28, -1) 9 -(16, 29, -1) 9 -(16, 30, -1) 10 -(16, 31, -1) 10 -(16, 32, -1) 11 -(16, 33, -1) 11 -(16, 34, -1) 11 -(16, 35, -1) 12 -(16, 36, -1) 12 -(16, 37, -1) 13 -(16, 38, -1) 13 -(16, 39, -1) 13 -(16, 40, -1) 13 -(16, 41, -1) 14 -(16, 42, -1) 14 -(16, 43, -1) 14 -(16, 44, -1) 14 -(16, 45, -1) 15 -(16, 46, -1) 15 -(16, 47, -1) 15 -(16, 48, -1) 15 -(16, 49, -1) 15 -(16, 50, -1) 15 -(16, 51, -1) 15 -(16, 52, -1) 15 -(16, 53, -1) 15 -(16, 54, -1) 15 -(16, 55, -1) 15 -(16, 56, -1) 15 -(16, 57, -1) 14 -(16, 58, -1) 14 -(16, 59, -1) 14 -(16, 60, -1) 14 -(16, 61, -1) 13 -(16, 62, -1) 13 -(16, 63, -1) 13 -(16, 64, -1) 13 -(16, 65, -1) 12 -(16, 66, -1) 12 -(16, 67, -1) 11 -(16, 68, -1) 11 -(16, 69, -1) 11 -(16, 70, -1) 10 -(16, 71, -1) 10 -(16, 72, -1) 9 -(16, 73, -1) 9 -(16, 74, -1) 8 -(16, 75, -1) 7 -(16, 76, -1) 7 -(16, 77, -1) 6 -(16, 78, -1) 6 -(16, 79, -1) 5 -(16, 80, -1) 4 -(16, 81, -1) 4 -(16, 82, -1) 3 -(16, 83, -1) 2 -(16, 84, -1) 2 -(16, 85, -1) 1 -(16, 86, -1) 1 -(16, 87, -1) 0 -(17, 14, -1) 1 -(17, 15, -1) 1 -(17, 16, -1) 2 -(17, 17, -1) 3 -(17, 18, -1) 3 -(17, 19, -1) 4 -(17, 20, -1) 5 -(17, 21, -1) 5 -(17, 22, -1) 6 -(17, 23, -1) 6 -(17, 24, -1) 7 -(17, 25, -1) 8 -(17, 26, -1) 8 -(17, 27, -1) 9 -(17, 28, -1) 9 -(17, 29, -1) 10 -(17, 30, -1) 10 -(17, 31, -1) 11 -(17, 32, -1) 11 -(17, 33, -1) 12 -(17, 34, -1) 12 -(17, 35, -1) 13 -(17, 36, -1) 13 -(17, 37, -1) 13 -(17, 38, -1) 14 -(17, 39, -1) 14 -(17, 40, -1) 14 -(17, 41, -1) 15 -(17, 42, -1) 15 -(17, 43, -1) 15 -(17, 44, -1) 15 -(17, 45, -1) 16 -(17, 46, -1) 16 -(17, 47, -1) 16 -(17, 48, -1) 16 -(17, 49, -1) 16 -(17, 50, -1) 16 -(17, 51, -1) 16 -(17, 52, -1) 16 -(17, 53, -1) 16 -(17, 54, -1) 16 -(17, 55, -1) 16 -(17, 56, -1) 16 -(17, 57, -1) 15 -(17, 58, -1) 15 -(17, 59, -1) 15 -(17, 60, -1) 15 -(17, 61, -1) 14 -(17, 62, -1) 14 -(17, 63, -1) 14 -(17, 64, -1) 13 -(17, 65, -1) 13 -(17, 66, -1) 13 -(17, 67, -1) 12 -(17, 68, -1) 12 -(17, 69, -1) 11 -(17, 70, -1) 11 -(17, 71, -1) 10 -(17, 72, -1) 10 -(17, 73, -1) 9 -(17, 74, -1) 9 -(17, 75, -1) 8 -(17, 76, -1) 8 -(17, 77, -1) 7 -(17, 78, -1) 6 -(17, 79, -1) 6 -(17, 80, -1) 5 -(17, 81, -1) 5 -(17, 82, -1) 4 -(17, 83, -1) 3 -(17, 84, -1) 3 -(17, 85, -1) 2 -(17, 86, -1) 1 -(17, 87, -1) 1 -(18, 14, -1) 1 -(18, 15, -1) 2 -(18, 16, -1) 3 -(18, 17, -1) 3 -(18, 18, -1) 4 -(18, 19, -1) 5 -(18, 20, -1) 5 -(18, 21, -1) 6 -(18, 22, -1) 7 -(18, 23, -1) 7 -(18, 24, -1) 8 -(18, 25, -1) 8 -(18, 26, -1) 9 -(18, 27, -1) 10 -(18, 28, -1) 10 -(18, 29, -1) 11 -(18, 30, -1) 11 -(18, 31, -1) 12 -(18, 32, -1) 12 -(18, 33, -1) 13 -(18, 34, -1) 13 -(18, 35, -1) 14 -(18, 36, -1) 14 -(18, 37, -1) 14 -(18, 38, -1) 15 -(18, 39, -1) 15 -(18, 40, -1) 15 -(18, 41, -1) 16 -(18, 42, -1) 16 -(18, 43, -1) 16 -(18, 44, -1) 16 -(18, 45, -1) 17 -(18, 46, -1) 17 -(18, 47, -1) 17 -(18, 48, -1) 17 -(18, 49, -1) 17 -(18, 50, -1) 17 -(18, 51, -1) 17 -(18, 52, -1) 17 -(18, 53, -1) 17 -(18, 54, -1) 17 -(18, 55, -1) 17 -(18, 56, -1) 17 -(18, 57, -1) 16 -(18, 58, -1) 16 -(18, 59, -1) 16 -(18, 60, -1) 16 -(18, 61, -1) 15 -(18, 62, -1) 15 -(18, 63, -1) 15 -(18, 64, -1) 14 -(18, 65, -1) 14 -(18, 66, -1) 14 -(18, 67, -1) 13 -(18, 68, -1) 13 -(18, 69, -1) 12 -(18, 70, -1) 12 -(18, 71, -1) 11 -(18, 72, -1) 11 -(18, 73, -1) 10 -(18, 74, -1) 10 -(18, 75, -1) 9 -(18, 76, -1) 8 -(18, 77, -1) 8 -(18, 78, -1) 7 -(18, 79, -1) 7 -(18, 80, -1) 6 -(18, 81, -1) 5 -(18, 82, -1) 5 -(18, 83, -1) 4 -(18, 84, -1) 3 -(18, 85, -1) 3 -(18, 86, -1) 2 -(18, 87, -1) 1 -(19, 14, -1) 2 -(19, 15, -1) 3 -(19, 16, -1) 3 -(19, 17, -1) 4 -(19, 18, -1) 5 -(19, 19, -1) 5 -(19, 20, -1) 6 -(19, 21, -1) 7 -(19, 22, -1) 7 -(19, 23, -1) 8 -(19, 24, -1) 9 -(19, 25, -1) 9 -(19, 26, -1) 10 -(19, 27, -1) 10 -(19, 28, -1) 11 -(19, 29, -1) 12 -(19, 30, -1) 12 -(19, 31, -1) 13 -(19, 32, -1) 13 -(19, 33, -1) 14 -(19, 34, -1) 14 -(19, 35, -1) 15 -(19, 36, -1) 15 -(19, 37, -1) 15 -(19, 38, -1) 16 -(19, 39, -1) 16 -(19, 40, -1) 16 -(19, 41, -1) 17 -(19, 42, -1) 17 -(19, 43, -1) 17 -(19, 44, -1) 17 -(19, 45, -1) 18 -(19, 46, -1) 18 -(19, 47, -1) 18 -(19, 48, -1) 18 -(19, 49, -1) 18 -(19, 50, -1) 18 -(19, 51, -1) 18 -(19, 52, -1) 18 -(19, 53, -1) 18 -(19, 54, -1) 18 -(19, 55, -1) 18 -(19, 56, -1) 18 -(19, 57, -1) 17 -(19, 58, -1) 17 -(19, 59, -1) 17 -(19, 60, -1) 17 -(19, 61, -1) 16 -(19, 62, -1) 16 -(19, 63, -1) 16 -(19, 64, -1) 15 -(19, 65, -1) 15 -(19, 66, -1) 15 -(19, 67, -1) 14 -(19, 68, -1) 14 -(19, 69, -1) 13 -(19, 70, -1) 13 -(19, 71, -1) 12 -(19, 72, -1) 12 -(19, 73, -1) 11 -(19, 74, -1) 10 -(19, 75, -1) 10 -(19, 76, -1) 9 -(19, 77, -1) 9 -(19, 78, -1) 8 -(19, 79, -1) 7 -(19, 80, -1) 7 -(19, 81, -1) 6 -(19, 82, -1) 5 -(19, 83, -1) 5 -(19, 84, -1) 4 -(19, 85, -1) 3 -(19, 86, -1) 3 -(19, 87, -1) 2 -(20, 14, -1) 3 -(20, 15, -1) 3 -(20, 16, -1) 4 -(20, 17, -1) 5 -(20, 18, -1) 5 -(20, 19, -1) 6 -(20, 20, -1) 7 -(20, 21, -1) 7 -(20, 22, -1) 8 -(20, 23, -1) 9 -(20, 24, -1) 9 -(20, 25, -1) 10 -(20, 26, -1) 11 -(20, 27, -1) 11 -(20, 28, -1) 12 -(20, 29, -1) 12 -(20, 30, -1) 13 -(20, 31, -1) 14 -(20, 32, -1) 14 -(20, 33, -1) 15 -(20, 34, -1) 15 -(20, 35, -1) 15 -(20, 36, -1) 16 -(20, 37, -1) 16 -(20, 38, -1) 17 -(20, 39, -1) 17 -(20, 40, -1) 17 -(20, 41, -1) 18 -(20, 42, -1) 18 -(20, 43, -1) 18 -(20, 44, -1) 18 -(20, 45, -1) 19 -(20, 46, -1) 19 -(20, 47, -1) 19 -(20, 48, -1) 19 -(20, 49, -1) 19 -(20, 50, -1) 19 -(20, 51, -1) 19 -(20, 52, -1) 19 -(20, 53, -1) 19 -(20, 54, -1) 19 -(20, 55, -1) 19 -(20, 56, -1) 19 -(20, 57, -1) 18 -(20, 58, -1) 18 -(20, 59, -1) 18 -(20, 60, -1) 18 -(20, 61, -1) 17 -(20, 62, -1) 17 -(20, 63, -1) 17 -(20, 64, -1) 16 -(20, 65, -1) 16 -(20, 66, -1) 15 -(20, 67, -1) 15 -(20, 68, -1) 15 -(20, 69, -1) 14 -(20, 70, -1) 14 -(20, 71, -1) 13 -(20, 72, -1) 12 -(20, 73, -1) 12 -(20, 74, -1) 11 -(20, 75, -1) 11 -(20, 76, -1) 10 -(20, 77, -1) 9 -(20, 78, -1) 9 -(20, 79, -1) 8 -(20, 80, -1) 7 -(20, 81, -1) 7 -(20, 82, -1) 6 -(20, 83, -1) 5 -(20, 84, -1) 5 -(20, 85, -1) 4 -(20, 86, -1) 3 -(20, 87, -1) 3 -(21, 9, -1) 0 -(21, 10, -1) 0 -(21, 11, -1) 1 -(21, 12, -1) 1 -(21, 13, -1) 2 -(21, 14, -1) 3 -(21, 15, -1) 4 -(21, 16, -1) 4 -(21, 17, -1) 5 -(21, 18, -1) 6 -(21, 19, -1) 7 -(21, 20, -1) 7 -(21, 21, -1) 8 -(21, 22, -1) 9 -(21, 23, -1) 9 -(21, 24, -1) 10 -(21, 25, -1) 11 -(21, 26, -1) 11 -(21, 27, -1) 12 -(21, 28, -1) 13 -(21, 29, -1) 13 -(21, 30, -1) 14 -(21, 31, -1) 14 -(21, 32, -1) 15 -(21, 33, -1) 15 -(21, 34, -1) 16 -(21, 35, -1) 16 -(21, 36, -1) 17 -(21, 37, -1) 17 -(21, 38, -1) 18 -(21, 39, -1) 18 -(21, 40, -1) 18 -(21, 41, -1) 19 -(21, 42, -1) 19 -(21, 43, -1) 19 -(21, 44, -1) 19 -(21, 45, -1) 20 -(21, 46, -1) 20 -(21, 47, -1) 20 -(21, 48, -1) 20 -(21, 49, -1) 20 -(21, 50, -1) 20 -(21, 51, -1) 20 -(21, 52, -1) 20 -(21, 53, -1) 20 -(21, 54, -1) 20 -(21, 55, -1) 20 -(21, 56, -1) 20 -(21, 57, -1) 19 -(21, 58, -1) 19 -(21, 59, -1) 19 -(21, 60, -1) 19 -(21, 61, -1) 18 -(21, 62, -1) 18 -(21, 63, -1) 18 -(21, 64, -1) 17 -(21, 65, -1) 17 -(21, 66, -1) 16 -(21, 67, -1) 16 -(21, 68, -1) 15 -(21, 69, -1) 15 -(21, 70, -1) 14 -(21, 71, -1) 14 -(21, 72, -1) 13 -(21, 73, -1) 13 -(21, 74, -1) 12 -(21, 75, -1) 11 -(21, 76, -1) 11 -(21, 77, -1) 10 -(21, 78, -1) 9 -(21, 79, -1) 9 -(21, 80, -1) 8 -(21, 81, -1) 7 -(21, 82, -1) 7 -(21, 83, -1) 6 -(21, 84, -1) 5 -(21, 85, -1) 4 -(21, 86, -1) 4 -(21, 87, -1) 3 -(21, 88, -1) 2 -(21, 89, -1) 1 -(21, 90, -1) 1 -(21, 91, -1) 0 -(21, 92, -1) 0 -(22, 9, -1) 0 -(22, 10, -1) 1 -(22, 11, -1) 1 -(22, 12, -1) 2 -(22, 13, -1) 3 -(22, 14, -1) 4 -(22, 15, -1) 4 -(22, 16, -1) 5 -(22, 17, -1) 6 -(22, 18, -1) 7 -(22, 19, -1) 7 -(22, 20, -1) 8 -(22, 21, -1) 9 -(22, 22, -1) 9 -(22, 23, -1) 10 -(22, 24, -1) 11 -(22, 25, -1) 12 -(22, 26, -1) 12 -(22, 27, -1) 13 -(22, 28, -1) 13 -(22, 29, -1) 14 -(22, 30, -1) 15 -(22, 31, -1) 15 -(22, 32, -1) 16 -(22, 33, -1) 16 -(22, 34, -1) 17 -(22, 35, -1) 17 -(22, 36, -1) 18 -(22, 37, -1) 18 -(22, 38, -1) 18 -(22, 39, -1) 19 -(22, 40, -1) 19 -(22, 41, -1) 20 -(22, 42, -1) 20 -(22, 43, -1) 20 -(22, 44, -1) 20 -(22, 45, -1) 20 -(22, 46, -1) 21 -(22, 47, -1) 21 -(22, 48, -1) 21 -(22, 49, -1) 21 -(22, 50, -1) 21 -(22, 51, -1) 21 -(22, 52, -1) 21 -(22, 53, -1) 21 -(22, 54, -1) 21 -(22, 55, -1) 21 -(22, 56, -1) 20 -(22, 57, -1) 20 -(22, 58, -1) 20 -(22, 59, -1) 20 -(22, 60, -1) 20 -(22, 61, -1) 19 -(22, 62, -1) 19 -(22, 63, -1) 18 -(22, 64, -1) 18 -(22, 65, -1) 18 -(22, 66, -1) 17 -(22, 67, -1) 17 -(22, 68, -1) 16 -(22, 69, -1) 16 -(22, 70, -1) 15 -(22, 71, -1) 15 -(22, 72, -1) 14 -(22, 73, -1) 13 -(22, 74, -1) 13 -(22, 75, -1) 12 -(22, 76, -1) 12 -(22, 77, -1) 11 -(22, 78, -1) 10 -(22, 79, -1) 9 -(22, 80, -1) 9 -(22, 81, -1) 8 -(22, 82, -1) 7 -(22, 83, -1) 7 -(22, 84, -1) 6 -(22, 85, -1) 5 -(22, 86, -1) 4 -(22, 87, -1) 4 -(22, 88, -1) 3 -(22, 89, -1) 2 -(22, 90, -1) 1 -(22, 91, -1) 1 -(22, 92, -1) 0 -(23, 9, -1) 0 -(23, 10, -1) 1 -(23, 11, -1) 2 -(23, 12, -1) 3 -(23, 13, -1) 3 -(23, 14, -1) 4 -(23, 15, -1) 5 -(23, 16, -1) 6 -(23, 17, -1) 7 -(23, 18, -1) 7 -(23, 19, -1) 8 -(23, 20, -1) 9 -(23, 21, -1) 9 -(23, 22, -1) 10 -(23, 23, -1) 11 -(23, 24, -1) 12 -(23, 25, -1) 12 -(23, 26, -1) 13 -(23, 27, -1) 14 -(23, 28, -1) 14 -(23, 29, -1) 15 -(23, 30, -1) 15 -(23, 31, -1) 16 -(23, 32, -1) 17 -(23, 33, -1) 17 -(23, 34, -1) 18 -(23, 35, -1) 18 -(23, 36, -1) 19 -(23, 37, -1) 19 -(23, 38, -1) 19 -(23, 39, -1) 20 -(23, 40, -1) 20 -(23, 41, -1) 20 -(23, 42, -1) 21 -(23, 43, -1) 21 -(23, 44, -1) 21 -(23, 45, -1) 21 -(23, 46, -1) 22 -(23, 47, -1) 22 -(23, 48, -1) 22 -(23, 49, -1) 22 -(23, 50, -1) 22 -(23, 51, -1) 22 -(23, 52, -1) 22 -(23, 53, -1) 22 -(23, 54, -1) 22 -(23, 55, -1) 22 -(23, 56, -1) 21 -(23, 57, -1) 21 -(23, 58, -1) 21 -(23, 59, -1) 21 -(23, 60, -1) 20 -(23, 61, -1) 20 -(23, 62, -1) 20 -(23, 63, -1) 19 -(23, 64, -1) 19 -(23, 65, -1) 19 -(23, 66, -1) 18 -(23, 67, -1) 18 -(23, 68, -1) 17 -(23, 69, -1) 17 -(23, 70, -1) 16 -(23, 71, -1) 15 -(23, 72, -1) 15 -(23, 73, -1) 14 -(23, 74, -1) 14 -(23, 75, -1) 13 -(23, 76, -1) 12 -(23, 77, -1) 12 -(23, 78, -1) 11 -(23, 79, -1) 10 -(23, 80, -1) 9 -(23, 81, -1) 9 -(23, 82, -1) 8 -(23, 83, -1) 7 -(23, 84, -1) 7 -(23, 85, -1) 6 -(23, 86, -1) 5 -(23, 87, -1) 4 -(23, 88, -1) 3 -(23, 89, -1) 3 -(23, 90, -1) 2 -(23, 91, -1) 1 -(23, 92, -1) 0 -(24, 9, -1) 1 -(24, 10, -1) 2 -(24, 11, -1) 2 -(24, 12, -1) 3 -(24, 13, -1) 4 -(24, 14, -1) 5 -(24, 15, -1) 6 -(24, 16, -1) 6 -(24, 17, -1) 7 -(24, 18, -1) 8 -(24, 19, -1) 9 -(24, 20, -1) 9 -(24, 21, -1) 10 -(24, 22, -1) 11 -(24, 23, -1) 12 -(24, 24, -1) 12 -(24, 25, -1) 13 -(24, 26, -1) 14 -(24, 27, -1) 14 -(24, 28, -1) 15 -(24, 29, -1) 16 -(24, 30, -1) 16 -(24, 31, -1) 17 -(24, 32, -1) 17 -(24, 33, -1) 18 -(24, 34, -1) 18 -(24, 35, -1) 19 -(24, 36, -1) 19 -(24, 37, -1) 20 -(24, 38, -1) 20 -(24, 39, -1) 21 -(24, 40, -1) 21 -(24, 41, -1) 21 -(24, 42, -1) 22 -(24, 43, -1) 22 -(24, 44, -1) 22 -(24, 45, -1) 22 -(24, 46, -1) 23 -(24, 47, -1) 23 -(24, 48, -1) 23 -(24, 49, -1) 23 -(24, 50, -1) 23 -(24, 51, -1) 23 -(24, 52, -1) 23 -(24, 53, -1) 23 -(24, 54, -1) 23 -(24, 55, -1) 23 -(24, 56, -1) 22 -(24, 57, -1) 22 -(24, 58, -1) 22 -(24, 59, -1) 22 -(24, 60, -1) 21 -(24, 61, -1) 21 -(24, 62, -1) 21 -(24, 63, -1) 20 -(24, 64, -1) 20 -(24, 65, -1) 19 -(24, 66, -1) 19 -(24, 67, -1) 18 -(24, 68, -1) 18 -(24, 69, -1) 17 -(24, 70, -1) 17 -(24, 71, -1) 16 -(24, 72, -1) 16 -(24, 73, -1) 15 -(24, 74, -1) 14 -(24, 75, -1) 14 -(24, 76, -1) 13 -(24, 77, -1) 12 -(24, 78, -1) 12 -(24, 79, -1) 11 -(24, 80, -1) 10 -(24, 81, -1) 9 -(24, 82, -1) 9 -(24, 83, -1) 8 -(24, 84, -1) 7 -(24, 85, -1) 6 -(24, 86, -1) 6 -(24, 87, -1) 5 -(24, 88, -1) 4 -(24, 89, -1) 3 -(24, 90, -1) 2 -(24, 91, -1) 2 -(24, 92, -1) 1 -(25, 9, -1) 1 -(25, 10, -1) 2 -(25, 11, -1) 3 -(25, 12, -1) 4 -(25, 13, -1) 5 -(25, 14, -1) 5 -(25, 15, -1) 6 -(25, 16, -1) 7 -(25, 17, -1) 8 -(25, 18, -1) 9 -(25, 19, -1) 9 -(25, 20, -1) 10 -(25, 21, -1) 11 -(25, 22, -1) 12 -(25, 23, -1) 12 -(25, 24, -1) 13 -(25, 25, -1) 14 -(25, 26, -1) 14 -(25, 27, -1) 15 -(25, 28, -1) 16 -(25, 29, -1) 16 -(25, 30, -1) 17 -(25, 31, -1) 18 -(25, 32, -1) 18 -(25, 33, -1) 19 -(25, 34, -1) 19 -(25, 35, -1) 20 -(25, 36, -1) 20 -(25, 37, -1) 21 -(25, 38, -1) 21 -(25, 39, -1) 22 -(25, 40, -1) 22 -(25, 41, -1) 22 -(25, 42, -1) 23 -(25, 43, -1) 23 -(25, 44, -1) 23 -(25, 45, -1) 23 -(25, 46, -1) 24 -(25, 47, -1) 24 -(25, 48, -1) 24 -(25, 49, -1) 24 -(25, 50, -1) 24 -(25, 51, -1) 24 -(25, 52, -1) 24 -(25, 53, -1) 24 -(25, 54, -1) 24 -(25, 55, -1) 24 -(25, 56, -1) 23 -(25, 57, -1) 23 -(25, 58, -1) 23 -(25, 59, -1) 23 -(25, 60, -1) 22 -(25, 61, -1) 22 -(25, 62, -1) 22 -(25, 63, -1) 21 -(25, 64, -1) 21 -(25, 65, -1) 20 -(25, 66, -1) 20 -(25, 67, -1) 19 -(25, 68, -1) 19 -(25, 69, -1) 18 -(25, 70, -1) 18 -(25, 71, -1) 17 -(25, 72, -1) 16 -(25, 73, -1) 16 -(25, 74, -1) 15 -(25, 75, -1) 14 -(25, 76, -1) 14 -(25, 77, -1) 13 -(25, 78, -1) 12 -(25, 79, -1) 12 -(25, 80, -1) 11 -(25, 81, -1) 10 -(25, 82, -1) 9 -(25, 83, -1) 9 -(25, 84, -1) 8 -(25, 85, -1) 7 -(25, 86, -1) 6 -(25, 87, -1) 5 -(25, 88, -1) 5 -(25, 89, -1) 4 -(25, 90, -1) 3 -(25, 91, -1) 2 -(25, 92, -1) 1 -(26, 6, -1) 0 -(26, 7, -1) 0 -(26, 8, -1) 1 -(26, 9, -1) 2 -(26, 10, -1) 3 -(26, 11, -1) 3 -(26, 12, -1) 4 -(26, 13, -1) 5 -(26, 14, -1) 6 -(26, 15, -1) 7 -(26, 16, -1) 7 -(26, 17, -1) 8 -(26, 18, -1) 9 -(26, 19, -1) 10 -(26, 20, -1) 11 -(26, 21, -1) 11 -(26, 22, -1) 12 -(26, 23, -1) 13 -(26, 24, -1) 14 -(26, 25, -1) 14 -(26, 26, -1) 15 -(26, 27, -1) 16 -(26, 28, -1) 16 -(26, 29, -1) 17 -(26, 30, -1) 18 -(26, 31, -1) 18 -(26, 32, -1) 19 -(26, 33, -1) 19 -(26, 34, -1) 20 -(26, 35, -1) 21 -(26, 36, -1) 21 -(26, 37, -1) 22 -(26, 38, -1) 22 -(26, 39, -1) 22 -(26, 40, -1) 23 -(26, 41, -1) 23 -(26, 42, -1) 24 -(26, 43, -1) 24 -(26, 44, -1) 24 -(26, 45, -1) 24 -(26, 46, -1) 25 -(26, 47, -1) 25 -(26, 48, -1) 25 -(26, 49, -1) 25 -(26, 50, -1) 25 -(26, 51, -1) 25 -(26, 52, -1) 25 -(26, 53, -1) 25 -(26, 54, -1) 25 -(26, 55, -1) 25 -(26, 56, -1) 24 -(26, 57, -1) 24 -(26, 58, -1) 24 -(26, 59, -1) 24 -(26, 60, -1) 23 -(26, 61, -1) 23 -(26, 62, -1) 22 -(26, 63, -1) 22 -(26, 64, -1) 22 -(26, 65, -1) 21 -(26, 66, -1) 21 -(26, 67, -1) 20 -(26, 68, -1) 19 -(26, 69, -1) 19 -(26, 70, -1) 18 -(26, 71, -1) 18 -(26, 72, -1) 17 -(26, 73, -1) 16 -(26, 74, -1) 16 -(26, 75, -1) 15 -(26, 76, -1) 14 -(26, 77, -1) 14 -(26, 78, -1) 13 -(26, 79, -1) 12 -(26, 80, -1) 11 -(26, 81, -1) 11 -(26, 82, -1) 10 -(26, 83, -1) 9 -(26, 84, -1) 8 -(26, 85, -1) 7 -(26, 86, -1) 7 -(26, 87, -1) 6 -(26, 88, -1) 5 -(26, 89, -1) 4 -(26, 90, -1) 3 -(26, 91, -1) 3 -(26, 92, -1) 2 -(26, 93, -1) 1 -(26, 94, -1) 0 -(26, 95, -1) 0 -(27, 6, -1) 0 -(27, 7, -1) 0 -(27, 8, -1) 1 -(27, 9, -1) 2 -(27, 10, -1) 3 -(27, 11, -1) 4 -(27, 12, -1) 5 -(27, 13, -1) 6 -(27, 14, -1) 6 -(27, 15, -1) 7 -(27, 16, -1) 8 -(27, 17, -1) 9 -(27, 18, -1) 10 -(27, 19, -1) 10 -(27, 20, -1) 11 -(27, 21, -1) 12 -(27, 22, -1) 13 -(27, 23, -1) 14 -(27, 24, -1) 14 -(27, 25, -1) 15 -(27, 26, -1) 16 -(27, 27, -1) 16 -(27, 28, -1) 17 -(27, 29, -1) 18 -(27, 30, -1) 18 -(27, 31, -1) 19 -(27, 32, -1) 20 -(27, 33, -1) 20 -(27, 34, -1) 21 -(27, 35, -1) 21 -(27, 36, -1) 22 -(27, 37, -1) 22 -(27, 38, -1) 23 -(27, 39, -1) 23 -(27, 40, -1) 24 -(27, 41, -1) 24 -(27, 42, -1) 25 -(27, 43, -1) 25 -(27, 44, -1) 25 -(27, 45, -1) 25 -(27, 46, -1) 26 -(27, 47, -1) 26 -(27, 48, -1) 26 -(27, 49, -1) 26 -(27, 50, -1) 26 -(27, 51, -1) 26 -(27, 52, -1) 26 -(27, 53, -1) 26 -(27, 54, -1) 26 -(27, 55, -1) 26 -(27, 56, -1) 25 -(27, 57, -1) 25 -(27, 58, -1) 25 -(27, 59, -1) 25 -(27, 60, -1) 24 -(27, 61, -1) 24 -(27, 62, -1) 23 -(27, 63, -1) 23 -(27, 64, -1) 22 -(27, 65, -1) 22 -(27, 66, -1) 21 -(27, 67, -1) 21 -(27, 68, -1) 20 -(27, 69, -1) 20 -(27, 70, -1) 19 -(27, 71, -1) 18 -(27, 72, -1) 18 -(27, 73, -1) 17 -(27, 74, -1) 16 -(27, 75, -1) 16 -(27, 76, -1) 15 -(27, 77, -1) 14 -(27, 78, -1) 14 -(27, 79, -1) 13 -(27, 80, -1) 12 -(27, 81, -1) 11 -(27, 82, -1) 10 -(27, 83, -1) 10 -(27, 84, -1) 9 -(27, 85, -1) 8 -(27, 86, -1) 7 -(27, 87, -1) 6 -(27, 88, -1) 6 -(27, 89, -1) 5 -(27, 90, -1) 4 -(27, 91, -1) 3 -(27, 92, -1) 2 -(27, 93, -1) 1 -(27, 94, -1) 0 -(27, 95, -1) 0 -(28, 6, -1) 0 -(28, 7, -1) 1 -(28, 8, -1) 2 -(28, 9, -1) 3 -(28, 10, -1) 4 -(28, 11, -1) 4 -(28, 12, -1) 5 -(28, 13, -1) 6 -(28, 14, -1) 7 -(28, 15, -1) 8 -(28, 16, -1) 9 -(28, 17, -1) 9 -(28, 18, -1) 10 -(28, 19, -1) 11 -(28, 20, -1) 12 -(28, 21, -1) 13 -(28, 22, -1) 13 -(28, 23, -1) 14 -(28, 24, -1) 15 -(28, 25, -1) 16 -(28, 26, -1) 16 -(28, 27, -1) 17 -(28, 28, -1) 18 -(28, 29, -1) 19 -(28, 30, -1) 19 -(28, 31, -1) 20 -(28, 32, -1) 20 -(28, 33, -1) 21 -(28, 34, -1) 22 -(28, 35, -1) 22 -(28, 36, -1) 23 -(28, 37, -1) 23 -(28, 38, -1) 24 -(28, 39, -1) 24 -(28, 40, -1) 25 -(28, 41, -1) 25 -(28, 42, -1) 25 -(28, 43, -1) 26 -(28, 44, -1) 26 -(28, 45, -1) 26 -(28, 46, -1) 27 -(28, 47, -1) 27 -(28, 48, -1) 27 -(28, 49, -1) 27 -(28, 50, -1) 27 -(28, 51, -1) 27 -(28, 52, -1) 27 -(28, 53, -1) 27 -(28, 54, -1) 27 -(28, 55, -1) 27 -(28, 56, -1) 26 -(28, 57, -1) 26 -(28, 58, -1) 26 -(28, 59, -1) 25 -(28, 60, -1) 25 -(28, 61, -1) 25 -(28, 62, -1) 24 -(28, 63, -1) 24 -(28, 64, -1) 23 -(28, 65, -1) 23 -(28, 66, -1) 22 -(28, 67, -1) 22 -(28, 68, -1) 21 -(28, 69, -1) 20 -(28, 70, -1) 20 -(28, 71, -1) 19 -(28, 72, -1) 19 -(28, 73, -1) 18 -(28, 74, -1) 17 -(28, 75, -1) 16 -(28, 76, -1) 16 -(28, 77, -1) 15 -(28, 78, -1) 14 -(28, 79, -1) 13 -(28, 80, -1) 13 -(28, 81, -1) 12 -(28, 82, -1) 11 -(28, 83, -1) 10 -(28, 84, -1) 9 -(28, 85, -1) 9 -(28, 86, -1) 8 -(28, 87, -1) 7 -(28, 88, -1) 6 -(28, 89, -1) 5 -(28, 90, -1) 4 -(28, 91, -1) 4 -(28, 92, -1) 3 -(28, 93, -1) 2 -(28, 94, -1) 1 -(28, 95, -1) 0 -(29, 6, -1) 1 -(29, 7, -1) 1 -(29, 8, -1) 2 -(29, 9, -1) 3 -(29, 10, -1) 4 -(29, 11, -1) 5 -(29, 12, -1) 6 -(29, 13, -1) 7 -(29, 14, -1) 7 -(29, 15, -1) 8 -(29, 16, -1) 9 -(29, 17, -1) 10 -(29, 18, -1) 11 -(29, 19, -1) 12 -(29, 20, -1) 12 -(29, 21, -1) 13 -(29, 22, -1) 14 -(29, 23, -1) 15 -(29, 24, -1) 16 -(29, 25, -1) 16 -(29, 26, -1) 17 -(29, 27, -1) 18 -(29, 28, -1) 19 -(29, 29, -1) 19 -(29, 30, -1) 20 -(29, 31, -1) 21 -(29, 32, -1) 21 -(29, 33, -1) 22 -(29, 34, -1) 23 -(29, 35, -1) 23 -(29, 36, -1) 24 -(29, 37, -1) 24 -(29, 38, -1) 25 -(29, 39, -1) 25 -(29, 40, -1) 26 -(29, 41, -1) 26 -(29, 42, -1) 26 -(29, 43, -1) 27 -(29, 44, -1) 27 -(29, 45, -1) 27 -(29, 46, -1) 28 -(29, 47, -1) 28 -(29, 48, -1) 28 -(29, 49, -1) 28 -(29, 50, -1) 28 -(29, 51, -1) 28 -(29, 52, -1) 28 -(29, 53, -1) 28 -(29, 54, -1) 28 -(29, 55, -1) 28 -(29, 56, -1) 27 -(29, 57, -1) 27 -(29, 58, -1) 27 -(29, 59, -1) 26 -(29, 60, -1) 26 -(29, 61, -1) 26 -(29, 62, -1) 25 -(29, 63, -1) 25 -(29, 64, -1) 24 -(29, 65, -1) 24 -(29, 66, -1) 23 -(29, 67, -1) 23 -(29, 68, -1) 22 -(29, 69, -1) 21 -(29, 70, -1) 21 -(29, 71, -1) 20 -(29, 72, -1) 19 -(29, 73, -1) 19 -(29, 74, -1) 18 -(29, 75, -1) 17 -(29, 76, -1) 16 -(29, 77, -1) 16 -(29, 78, -1) 15 -(29, 79, -1) 14 -(29, 80, -1) 13 -(29, 81, -1) 12 -(29, 82, -1) 12 -(29, 83, -1) 11 -(29, 84, -1) 10 -(29, 85, -1) 9 -(29, 86, -1) 8 -(29, 87, -1) 7 -(29, 88, -1) 7 -(29, 89, -1) 6 -(29, 90, -1) 5 -(29, 91, -1) 4 -(29, 92, -1) 3 -(29, 93, -1) 2 -(29, 94, -1) 1 -(29, 95, -1) 1 -(30, 6, -1) 1 -(30, 7, -1) 2 -(30, 8, -1) 3 -(30, 9, -1) 4 -(30, 10, -1) 5 -(30, 11, -1) 5 -(30, 12, -1) 6 -(30, 13, -1) 7 -(30, 14, -1) 8 -(30, 15, -1) 9 -(30, 16, -1) 10 -(30, 17, -1) 11 -(30, 18, -1) 11 -(30, 19, -1) 12 -(30, 20, -1) 13 -(30, 21, -1) 14 -(30, 22, -1) 15 -(30, 23, -1) 15 -(30, 24, -1) 16 -(30, 25, -1) 17 -(30, 26, -1) 18 -(30, 27, -1) 19 -(30, 28, -1) 19 -(30, 29, -1) 20 -(30, 30, -1) 21 -(30, 31, -1) 21 -(30, 32, -1) 22 -(30, 33, -1) 23 -(30, 34, -1) 23 -(30, 35, -1) 24 -(30, 36, -1) 24 -(30, 37, -1) 25 -(30, 38, -1) 26 -(30, 39, -1) 26 -(30, 40, -1) 27 -(30, 41, -1) 27 -(30, 42, -1) 27 -(30, 43, -1) 28 -(30, 44, -1) 28 -(30, 45, -1) 28 -(30, 46, -1) 29 -(30, 47, -1) 29 -(30, 48, -1) 29 -(30, 49, -1) 29 -(30, 50, -1) 29 -(30, 51, -1) 29 -(30, 52, -1) 29 -(30, 53, -1) 29 -(30, 54, -1) 29 -(30, 55, -1) 29 -(30, 56, -1) 28 -(30, 57, -1) 28 -(30, 58, -1) 28 -(30, 59, -1) 27 -(30, 60, -1) 27 -(30, 61, -1) 27 -(30, 62, -1) 26 -(30, 63, -1) 26 -(30, 64, -1) 25 -(30, 65, -1) 24 -(30, 66, -1) 24 -(30, 67, -1) 23 -(30, 68, -1) 23 -(30, 69, -1) 22 -(30, 70, -1) 21 -(30, 71, -1) 21 -(30, 72, -1) 20 -(30, 73, -1) 19 -(30, 74, -1) 19 -(30, 75, -1) 18 -(30, 76, -1) 17 -(30, 77, -1) 16 -(30, 78, -1) 15 -(30, 79, -1) 15 -(30, 80, -1) 14 -(30, 81, -1) 13 -(30, 82, -1) 12 -(30, 83, -1) 11 -(30, 84, -1) 11 -(30, 85, -1) 10 -(30, 86, -1) 9 -(30, 87, -1) 8 -(30, 88, -1) 7 -(30, 89, -1) 6 -(30, 90, -1) 5 -(30, 91, -1) 5 -(30, 92, -1) 4 -(30, 93, -1) 3 -(30, 94, -1) 2 -(30, 95, -1) 1 -(31, 6, -1) 1 -(31, 7, -1) 2 -(31, 8, -1) 3 -(31, 9, -1) 4 -(31, 10, -1) 5 -(31, 11, -1) 6 -(31, 12, -1) 7 -(31, 13, -1) 7 -(31, 14, -1) 8 -(31, 15, -1) 9 -(31, 16, -1) 10 -(31, 17, -1) 11 -(31, 18, -1) 12 -(31, 19, -1) 13 -(31, 20, -1) 13 -(31, 21, -1) 14 -(31, 22, -1) 15 -(31, 23, -1) 16 -(31, 24, -1) 17 -(31, 25, -1) 18 -(31, 26, -1) 18 -(31, 27, -1) 19 -(31, 28, -1) 20 -(31, 29, -1) 21 -(31, 30, -1) 21 -(31, 31, -1) 22 -(31, 32, -1) 23 -(31, 33, -1) 23 -(31, 34, -1) 24 -(31, 35, -1) 25 -(31, 36, -1) 25 -(31, 37, -1) 26 -(31, 38, -1) 26 -(31, 39, -1) 27 -(31, 40, -1) 27 -(31, 41, -1) 28 -(31, 42, -1) 28 -(31, 43, -1) 29 -(31, 44, -1) 29 -(31, 45, -1) 29 -(31, 46, -1) 30 -(31, 47, -1) 30 -(31, 48, -1) 30 -(31, 49, -1) 30 -(31, 50, -1) 30 -(31, 51, -1) 30 -(31, 52, -1) 30 -(31, 53, -1) 30 -(31, 54, -1) 30 -(31, 55, -1) 30 -(31, 56, -1) 29 -(31, 57, -1) 29 -(31, 58, -1) 29 -(31, 59, -1) 28 -(31, 60, -1) 28 -(31, 61, -1) 27 -(31, 62, -1) 27 -(31, 63, -1) 26 -(31, 64, -1) 26 -(31, 65, -1) 25 -(31, 66, -1) 25 -(31, 67, -1) 24 -(31, 68, -1) 23 -(31, 69, -1) 23 -(31, 70, -1) 22 -(31, 71, -1) 21 -(31, 72, -1) 21 -(31, 73, -1) 20 -(31, 74, -1) 19 -(31, 75, -1) 18 -(31, 76, -1) 18 -(31, 77, -1) 17 -(31, 78, -1) 16 -(31, 79, -1) 15 -(31, 80, -1) 14 -(31, 81, -1) 13 -(31, 82, -1) 13 -(31, 83, -1) 12 -(31, 84, -1) 11 -(31, 85, -1) 10 -(31, 86, -1) 9 -(31, 87, -1) 8 -(31, 88, -1) 7 -(31, 89, -1) 7 -(31, 90, -1) 6 -(31, 91, -1) 5 -(31, 92, -1) 4 -(31, 93, -1) 3 -(31, 94, -1) 2 -(31, 95, -1) 1 -(32, 6, -1) 2 -(32, 7, -1) 2 -(32, 8, -1) 3 -(32, 9, -1) 4 -(32, 10, -1) 5 -(32, 11, -1) 6 -(32, 12, -1) 7 -(32, 13, -1) 8 -(32, 14, -1) 9 -(32, 15, -1) 10 -(32, 16, -1) 11 -(32, 17, -1) 11 -(32, 18, -1) 12 -(32, 19, -1) 13 -(32, 20, -1) 14 -(32, 21, -1) 15 -(32, 22, -1) 16 -(32, 23, -1) 17 -(32, 24, -1) 17 -(32, 25, -1) 18 -(32, 26, -1) 19 -(32, 27, -1) 20 -(32, 28, -1) 20 -(32, 29, -1) 21 -(32, 30, -1) 22 -(32, 31, -1) 23 -(32, 32, -1) 23 -(32, 33, -1) 24 -(32, 34, -1) 25 -(32, 35, -1) 25 -(32, 36, -1) 26 -(32, 37, -1) 27 -(32, 38, -1) 27 -(32, 39, -1) 28 -(32, 40, -1) 28 -(32, 41, -1) 29 -(32, 42, -1) 29 -(32, 43, -1) 30 -(32, 44, -1) 30 -(32, 45, -1) 30 -(32, 46, -1) 30 -(32, 47, -1) 31 -(32, 48, -1) 31 -(32, 49, -1) 31 -(32, 50, -1) 31 -(32, 51, -1) 31 -(32, 52, -1) 31 -(32, 53, -1) 31 -(32, 54, -1) 31 -(32, 55, -1) 30 -(32, 56, -1) 30 -(32, 57, -1) 30 -(32, 58, -1) 30 -(32, 59, -1) 29 -(32, 60, -1) 29 -(32, 61, -1) 28 -(32, 62, -1) 28 -(32, 63, -1) 27 -(32, 64, -1) 27 -(32, 65, -1) 26 -(32, 66, -1) 25 -(32, 67, -1) 25 -(32, 68, -1) 24 -(32, 69, -1) 23 -(32, 70, -1) 23 -(32, 71, -1) 22 -(32, 72, -1) 21 -(32, 73, -1) 20 -(32, 74, -1) 20 -(32, 75, -1) 19 -(32, 76, -1) 18 -(32, 77, -1) 17 -(32, 78, -1) 17 -(32, 79, -1) 16 -(32, 80, -1) 15 -(32, 81, -1) 14 -(32, 82, -1) 13 -(32, 83, -1) 12 -(32, 84, -1) 11 -(32, 85, -1) 11 -(32, 86, -1) 10 -(32, 87, -1) 9 -(32, 88, -1) 8 -(32, 89, -1) 7 -(32, 90, -1) 6 -(32, 91, -1) 5 -(32, 92, -1) 4 -(32, 93, -1) 3 -(32, 94, -1) 2 -(32, 95, -1) 2 -(33, 6, -1) 2 -(33, 7, -1) 3 -(33, 8, -1) 4 -(33, 9, -1) 5 -(33, 10, -1) 6 -(33, 11, -1) 7 -(33, 12, -1) 7 -(33, 13, -1) 8 -(33, 14, -1) 9 -(33, 15, -1) 10 -(33, 16, -1) 11 -(33, 17, -1) 12 -(33, 18, -1) 13 -(33, 19, -1) 14 -(33, 20, -1) 15 -(33, 21, -1) 15 -(33, 22, -1) 16 -(33, 23, -1) 17 -(33, 24, -1) 18 -(33, 25, -1) 19 -(33, 26, -1) 20 -(33, 27, -1) 20 -(33, 28, -1) 21 -(33, 29, -1) 22 -(33, 30, -1) 23 -(33, 31, -1) 23 -(33, 32, -1) 24 -(33, 33, -1) 25 -(33, 34, -1) 26 -(33, 35, -1) 26 -(33, 36, -1) 27 -(33, 37, -1) 27 -(33, 38, -1) 28 -(33, 39, -1) 29 -(33, 40, -1) 29 -(33, 41, -1) 30 -(33, 42, -1) 30 -(33, 43, -1) 30 -(33, 44, -1) 31 -(33, 45, -1) 31 -(33, 46, -1) 31 -(33, 47, -1) 32 -(33, 48, -1) 32 -(33, 49, -1) 32 -(33, 50, -1) 32 -(33, 51, -1) 32 -(33, 52, -1) 32 -(33, 53, -1) 32 -(33, 54, -1) 32 -(33, 55, -1) 31 -(33, 56, -1) 31 -(33, 57, -1) 31 -(33, 58, -1) 30 -(33, 59, -1) 30 -(33, 60, -1) 30 -(33, 61, -1) 29 -(33, 62, -1) 29 -(33, 63, -1) 28 -(33, 64, -1) 27 -(33, 65, -1) 27 -(33, 66, -1) 26 -(33, 67, -1) 26 -(33, 68, -1) 25 -(33, 69, -1) 24 -(33, 70, -1) 23 -(33, 71, -1) 23 -(33, 72, -1) 22 -(33, 73, -1) 21 -(33, 74, -1) 20 -(33, 75, -1) 20 -(33, 76, -1) 19 -(33, 77, -1) 18 -(33, 78, -1) 17 -(33, 79, -1) 16 -(33, 80, -1) 15 -(33, 81, -1) 15 -(33, 82, -1) 14 -(33, 83, -1) 13 -(33, 84, -1) 12 -(33, 85, -1) 11 -(33, 86, -1) 10 -(33, 87, -1) 9 -(33, 88, -1) 8 -(33, 89, -1) 7 -(33, 90, -1) 7 -(33, 91, -1) 6 -(33, 92, -1) 5 -(33, 93, -1) 4 -(33, 94, -1) 3 -(33, 95, -1) 2 -(34, 6, -1) 2 -(34, 7, -1) 3 -(34, 8, -1) 4 -(34, 9, -1) 5 -(34, 10, -1) 6 -(34, 11, -1) 7 -(34, 12, -1) 8 -(34, 13, -1) 9 -(34, 14, -1) 10 -(34, 15, -1) 11 -(34, 16, -1) 11 -(34, 17, -1) 12 -(34, 18, -1) 13 -(34, 19, -1) 14 -(34, 20, -1) 15 -(34, 21, -1) 16 -(34, 22, -1) 17 -(34, 23, -1) 18 -(34, 24, -1) 18 -(34, 25, -1) 19 -(34, 26, -1) 20 -(34, 27, -1) 21 -(34, 28, -1) 22 -(34, 29, -1) 23 -(34, 30, -1) 23 -(34, 31, -1) 24 -(34, 32, -1) 25 -(34, 33, -1) 26 -(34, 34, -1) 26 -(34, 35, -1) 27 -(34, 36, -1) 28 -(34, 37, -1) 28 -(34, 38, -1) 29 -(34, 39, -1) 29 -(34, 40, -1) 30 -(34, 41, -1) 30 -(34, 42, -1) 31 -(34, 43, -1) 31 -(34, 44, -1) 32 -(34, 45, -1) 32 -(34, 46, -1) 32 -(34, 47, -1) 33 -(34, 48, -1) 33 -(34, 49, -1) 33 -(34, 50, -1) 33 -(34, 51, -1) 33 -(34, 52, -1) 33 -(34, 53, -1) 33 -(34, 54, -1) 33 -(34, 55, -1) 32 -(34, 56, -1) 32 -(34, 57, -1) 32 -(34, 58, -1) 31 -(34, 59, -1) 31 -(34, 60, -1) 30 -(34, 61, -1) 30 -(34, 62, -1) 29 -(34, 63, -1) 29 -(34, 64, -1) 28 -(34, 65, -1) 28 -(34, 66, -1) 27 -(34, 67, -1) 26 -(34, 68, -1) 26 -(34, 69, -1) 25 -(34, 70, -1) 24 -(34, 71, -1) 23 -(34, 72, -1) 23 -(34, 73, -1) 22 -(34, 74, -1) 21 -(34, 75, -1) 20 -(34, 76, -1) 19 -(34, 77, -1) 18 -(34, 78, -1) 18 -(34, 79, -1) 17 -(34, 80, -1) 16 -(34, 81, -1) 15 -(34, 82, -1) 14 -(34, 83, -1) 13 -(34, 84, -1) 12 -(34, 85, -1) 11 -(34, 86, -1) 11 -(34, 87, -1) 10 -(34, 88, -1) 9 -(34, 89, -1) 8 -(34, 90, -1) 7 -(34, 91, -1) 6 -(34, 92, -1) 5 -(34, 93, -1) 4 -(34, 94, -1) 3 -(34, 95, -1) 2 -(35, 6, -1) 3 -(35, 7, -1) 4 -(35, 8, -1) 5 -(35, 9, -1) 6 -(35, 10, -1) 6 -(35, 11, -1) 7 -(35, 12, -1) 8 -(35, 13, -1) 9 -(35, 14, -1) 10 -(35, 15, -1) 11 -(35, 16, -1) 12 -(35, 17, -1) 13 -(35, 18, -1) 14 -(35, 19, -1) 15 -(35, 20, -1) 16 -(35, 21, -1) 16 -(35, 22, -1) 17 -(35, 23, -1) 18 -(35, 24, -1) 19 -(35, 25, -1) 20 -(35, 26, -1) 21 -(35, 27, -1) 21 -(35, 28, -1) 22 -(35, 29, -1) 23 -(35, 30, -1) 24 -(35, 31, -1) 25 -(35, 32, -1) 25 -(35, 33, -1) 26 -(35, 34, -1) 27 -(35, 35, -1) 28 -(35, 36, -1) 28 -(35, 37, -1) 29 -(35, 38, -1) 30 -(35, 39, -1) 30 -(35, 40, -1) 31 -(35, 41, -1) 31 -(35, 42, -1) 32 -(35, 43, -1) 32 -(35, 44, -1) 33 -(35, 45, -1) 33 -(35, 46, -1) 33 -(35, 47, -1) 34 -(35, 48, -1) 34 -(35, 49, -1) 34 -(35, 50, -1) 34 -(35, 51, -1) 34 -(35, 52, -1) 34 -(35, 53, -1) 34 -(35, 54, -1) 34 -(35, 55, -1) 33 -(35, 56, -1) 33 -(35, 57, -1) 33 -(35, 58, -1) 32 -(35, 59, -1) 32 -(35, 60, -1) 31 -(35, 61, -1) 31 -(35, 62, -1) 30 -(35, 63, -1) 30 -(35, 64, -1) 29 -(35, 65, -1) 28 -(35, 66, -1) 28 -(35, 67, -1) 27 -(35, 68, -1) 26 -(35, 69, -1) 25 -(35, 70, -1) 25 -(35, 71, -1) 24 -(35, 72, -1) 23 -(35, 73, -1) 22 -(35, 74, -1) 21 -(35, 75, -1) 21 -(35, 76, -1) 20 -(35, 77, -1) 19 -(35, 78, -1) 18 -(35, 79, -1) 17 -(35, 80, -1) 16 -(35, 81, -1) 16 -(35, 82, -1) 15 -(35, 83, -1) 14 -(35, 84, -1) 13 -(35, 85, -1) 12 -(35, 86, -1) 11 -(35, 87, -1) 10 -(35, 88, -1) 9 -(35, 89, -1) 8 -(35, 90, -1) 7 -(35, 91, -1) 6 -(35, 92, -1) 6 -(35, 93, -1) 5 -(35, 94, -1) 4 -(35, 95, -1) 3 -(36, 4, -1) 1 -(36, 5, -1) 2 -(36, 6, -1) 3 -(36, 7, -1) 4 -(36, 8, -1) 5 -(36, 9, -1) 6 -(36, 10, -1) 7 -(36, 11, -1) 8 -(36, 12, -1) 8 -(36, 13, -1) 9 -(36, 14, -1) 10 -(36, 15, -1) 11 -(36, 16, -1) 12 -(36, 17, -1) 13 -(36, 18, -1) 14 -(36, 19, -1) 15 -(36, 20, -1) 16 -(36, 21, -1) 17 -(36, 22, -1) 18 -(36, 23, -1) 19 -(36, 24, -1) 19 -(36, 25, -1) 20 -(36, 26, -1) 21 -(36, 27, -1) 22 -(36, 28, -1) 23 -(36, 29, -1) 24 -(36, 30, -1) 24 -(36, 31, -1) 25 -(36, 32, -1) 26 -(36, 33, -1) 27 -(36, 34, -1) 28 -(36, 35, -1) 28 -(36, 36, -1) 29 -(36, 37, -1) 30 -(36, 38, -1) 30 -(36, 39, -1) 31 -(36, 40, -1) 32 -(36, 41, -1) 32 -(36, 42, -1) 33 -(36, 43, -1) 33 -(36, 44, -1) 34 -(36, 45, -1) 34 -(36, 46, -1) 34 -(36, 47, -1) 35 -(36, 48, -1) 35 -(36, 49, -1) 35 -(36, 50, -1) 35 -(36, 51, -1) 35 -(36, 52, -1) 35 -(36, 53, -1) 35 -(36, 54, -1) 35 -(36, 55, -1) 34 -(36, 56, -1) 34 -(36, 57, -1) 34 -(36, 58, -1) 33 -(36, 59, -1) 33 -(36, 60, -1) 32 -(36, 61, -1) 32 -(36, 62, -1) 31 -(36, 63, -1) 30 -(36, 64, -1) 30 -(36, 65, -1) 29 -(36, 66, -1) 28 -(36, 67, -1) 28 -(36, 68, -1) 27 -(36, 69, -1) 26 -(36, 70, -1) 25 -(36, 71, -1) 24 -(36, 72, -1) 24 -(36, 73, -1) 23 -(36, 74, -1) 22 -(36, 75, -1) 21 -(36, 76, -1) 20 -(36, 77, -1) 19 -(36, 78, -1) 19 -(36, 79, -1) 18 -(36, 80, -1) 17 -(36, 81, -1) 16 -(36, 82, -1) 15 -(36, 83, -1) 14 -(36, 84, -1) 13 -(36, 85, -1) 12 -(36, 86, -1) 11 -(36, 87, -1) 10 -(36, 88, -1) 9 -(36, 89, -1) 8 -(36, 90, -1) 8 -(36, 91, -1) 7 -(36, 92, -1) 6 -(36, 93, -1) 5 -(36, 94, -1) 4 -(36, 95, -1) 3 -(36, 96, -1) 2 -(36, 97, -1) 1 -(37, 4, -1) 1 -(37, 5, -1) 2 -(37, 6, -1) 3 -(37, 7, -1) 4 -(37, 8, -1) 5 -(37, 9, -1) 6 -(37, 10, -1) 7 -(37, 11, -1) 8 -(37, 12, -1) 9 -(37, 13, -1) 10 -(37, 14, -1) 11 -(37, 15, -1) 12 -(37, 16, -1) 13 -(37, 17, -1) 14 -(37, 18, -1) 14 -(37, 19, -1) 15 -(37, 20, -1) 16 -(37, 21, -1) 17 -(37, 22, -1) 18 -(37, 23, -1) 19 -(37, 24, -1) 20 -(37, 25, -1) 21 -(37, 26, -1) 22 -(37, 27, -1) 22 -(37, 28, -1) 23 -(37, 29, -1) 24 -(37, 30, -1) 25 -(37, 31, -1) 26 -(37, 32, -1) 27 -(37, 33, -1) 27 -(37, 34, -1) 28 -(37, 35, -1) 29 -(37, 36, -1) 30 -(37, 37, -1) 30 -(37, 38, -1) 31 -(37, 39, -1) 32 -(37, 40, -1) 32 -(37, 41, -1) 33 -(37, 42, -1) 34 -(37, 43, -1) 34 -(37, 44, -1) 35 -(37, 45, -1) 35 -(37, 46, -1) 35 -(37, 47, -1) 36 -(37, 48, -1) 36 -(37, 49, -1) 36 -(37, 50, -1) 36 -(37, 51, -1) 36 -(37, 52, -1) 36 -(37, 53, -1) 36 -(37, 54, -1) 36 -(37, 55, -1) 35 -(37, 56, -1) 35 -(37, 57, -1) 35 -(37, 58, -1) 34 -(37, 59, -1) 34 -(37, 60, -1) 33 -(37, 61, -1) 32 -(37, 62, -1) 32 -(37, 63, -1) 31 -(37, 64, -1) 30 -(37, 65, -1) 30 -(37, 66, -1) 29 -(37, 67, -1) 28 -(37, 68, -1) 27 -(37, 69, -1) 27 -(37, 70, -1) 26 -(37, 71, -1) 25 -(37, 72, -1) 24 -(37, 73, -1) 23 -(37, 74, -1) 22 -(37, 75, -1) 22 -(37, 76, -1) 21 -(37, 77, -1) 20 -(37, 78, -1) 19 -(37, 79, -1) 18 -(37, 80, -1) 17 -(37, 81, -1) 16 -(37, 82, -1) 15 -(37, 83, -1) 14 -(37, 84, -1) 14 -(37, 85, -1) 13 -(37, 86, -1) 12 -(37, 87, -1) 11 -(37, 88, -1) 10 -(37, 89, -1) 9 -(37, 90, -1) 8 -(37, 91, -1) 7 -(37, 92, -1) 6 -(37, 93, -1) 5 -(37, 94, -1) 4 -(37, 95, -1) 3 -(37, 96, -1) 2 -(37, 97, -1) 1 -(38, 4, -1) 2 -(38, 5, -1) 3 -(38, 6, -1) 3 -(38, 7, -1) 4 -(38, 8, -1) 5 -(38, 9, -1) 6 -(38, 10, -1) 7 -(38, 11, -1) 8 -(38, 12, -1) 9 -(38, 13, -1) 10 -(38, 14, -1) 11 -(38, 15, -1) 12 -(38, 16, -1) 13 -(38, 17, -1) 14 -(38, 18, -1) 15 -(38, 19, -1) 16 -(38, 20, -1) 17 -(38, 21, -1) 18 -(38, 22, -1) 18 -(38, 23, -1) 19 -(38, 24, -1) 20 -(38, 25, -1) 21 -(38, 26, -1) 22 -(38, 27, -1) 23 -(38, 28, -1) 24 -(38, 29, -1) 25 -(38, 30, -1) 26 -(38, 31, -1) 26 -(38, 32, -1) 27 -(38, 33, -1) 28 -(38, 34, -1) 29 -(38, 35, -1) 30 -(38, 36, -1) 30 -(38, 37, -1) 31 -(38, 38, -1) 32 -(38, 39, -1) 33 -(38, 40, -1) 33 -(38, 41, -1) 34 -(38, 42, -1) 34 -(38, 43, -1) 35 -(38, 44, -1) 35 -(38, 45, -1) 36 -(38, 46, -1) 36 -(38, 47, -1) 37 -(38, 48, -1) 37 -(38, 49, -1) 37 -(38, 50, -1) 37 -(38, 51, -1) 37 -(38, 52, -1) 37 -(38, 53, -1) 37 -(38, 54, -1) 37 -(38, 55, -1) 36 -(38, 56, -1) 36 -(38, 57, -1) 35 -(38, 58, -1) 35 -(38, 59, -1) 34 -(38, 60, -1) 34 -(38, 61, -1) 33 -(38, 62, -1) 33 -(38, 63, -1) 32 -(38, 64, -1) 31 -(38, 65, -1) 30 -(38, 66, -1) 30 -(38, 67, -1) 29 -(38, 68, -1) 28 -(38, 69, -1) 27 -(38, 70, -1) 26 -(38, 71, -1) 26 -(38, 72, -1) 25 -(38, 73, -1) 24 -(38, 74, -1) 23 -(38, 75, -1) 22 -(38, 76, -1) 21 -(38, 77, -1) 20 -(38, 78, -1) 19 -(38, 79, -1) 18 -(38, 80, -1) 18 -(38, 81, -1) 17 -(38, 82, -1) 16 -(38, 83, -1) 15 -(38, 84, -1) 14 -(38, 85, -1) 13 -(38, 86, -1) 12 -(38, 87, -1) 11 -(38, 88, -1) 10 -(38, 89, -1) 9 -(38, 90, -1) 8 -(38, 91, -1) 7 -(38, 92, -1) 6 -(38, 93, -1) 5 -(38, 94, -1) 4 -(38, 95, -1) 3 -(38, 96, -1) 3 -(38, 97, -1) 2 -(39, 4, -1) 2 -(39, 5, -1) 3 -(39, 6, -1) 4 -(39, 7, -1) 5 -(39, 8, -1) 6 -(39, 9, -1) 7 -(39, 10, -1) 8 -(39, 11, -1) 9 -(39, 12, -1) 9 -(39, 13, -1) 10 -(39, 14, -1) 11 -(39, 15, -1) 12 -(39, 16, -1) 13 -(39, 17, -1) 14 -(39, 18, -1) 15 -(39, 19, -1) 16 -(39, 20, -1) 17 -(39, 21, -1) 18 -(39, 22, -1) 19 -(39, 23, -1) 20 -(39, 24, -1) 21 -(39, 25, -1) 22 -(39, 26, -1) 23 -(39, 27, -1) 23 -(39, 28, -1) 24 -(39, 29, -1) 25 -(39, 30, -1) 26 -(39, 31, -1) 27 -(39, 32, -1) 28 -(39, 33, -1) 29 -(39, 34, -1) 29 -(39, 35, -1) 30 -(39, 36, -1) 31 -(39, 37, -1) 32 -(39, 38, -1) 33 -(39, 39, -1) 33 -(39, 40, -1) 34 -(39, 41, -1) 35 -(39, 42, -1) 35 -(39, 43, -1) 36 -(39, 44, -1) 36 -(39, 45, -1) 37 -(39, 46, -1) 37 -(39, 47, -1) 37 -(39, 48, -1) 38 -(39, 49, -1) 38 -(39, 50, -1) 38 -(39, 51, -1) 38 -(39, 52, -1) 38 -(39, 53, -1) 38 -(39, 54, -1) 37 -(39, 55, -1) 37 -(39, 56, -1) 37 -(39, 57, -1) 36 -(39, 58, -1) 36 -(39, 59, -1) 35 -(39, 60, -1) 35 -(39, 61, -1) 34 -(39, 62, -1) 33 -(39, 63, -1) 33 -(39, 64, -1) 32 -(39, 65, -1) 31 -(39, 66, -1) 30 -(39, 67, -1) 29 -(39, 68, -1) 29 -(39, 69, -1) 28 -(39, 70, -1) 27 -(39, 71, -1) 26 -(39, 72, -1) 25 -(39, 73, -1) 24 -(39, 74, -1) 23 -(39, 75, -1) 23 -(39, 76, -1) 22 -(39, 77, -1) 21 -(39, 78, -1) 20 -(39, 79, -1) 19 -(39, 80, -1) 18 -(39, 81, -1) 17 -(39, 82, -1) 16 -(39, 83, -1) 15 -(39, 84, -1) 14 -(39, 85, -1) 13 -(39, 86, -1) 12 -(39, 87, -1) 11 -(39, 88, -1) 10 -(39, 89, -1) 9 -(39, 90, -1) 9 -(39, 91, -1) 8 -(39, 92, -1) 7 -(39, 93, -1) 6 -(39, 94, -1) 5 -(39, 95, -1) 4 -(39, 96, -1) 3 -(39, 97, -1) 2 -(40, 4, -1) 2 -(40, 5, -1) 3 -(40, 6, -1) 4 -(40, 7, -1) 5 -(40, 8, -1) 6 -(40, 9, -1) 7 -(40, 10, -1) 8 -(40, 11, -1) 9 -(40, 12, -1) 10 -(40, 13, -1) 11 -(40, 14, -1) 12 -(40, 15, -1) 13 -(40, 16, -1) 14 -(40, 17, -1) 15 -(40, 18, -1) 16 -(40, 19, -1) 16 -(40, 20, -1) 17 -(40, 21, -1) 18 -(40, 22, -1) 19 -(40, 23, -1) 20 -(40, 24, -1) 21 -(40, 25, -1) 22 -(40, 26, -1) 23 -(40, 27, -1) 24 -(40, 28, -1) 25 -(40, 29, -1) 26 -(40, 30, -1) 27 -(40, 31, -1) 27 -(40, 32, -1) 28 -(40, 33, -1) 29 -(40, 34, -1) 30 -(40, 35, -1) 31 -(40, 36, -1) 32 -(40, 37, -1) 32 -(40, 38, -1) 33 -(40, 39, -1) 34 -(40, 40, -1) 35 -(40, 41, -1) 35 -(40, 42, -1) 36 -(40, 43, -1) 37 -(40, 44, -1) 37 -(40, 45, -1) 38 -(40, 56, -1) 38 -(40, 57, -1) 37 -(40, 58, -1) 37 -(40, 59, -1) 36 -(40, 60, -1) 35 -(40, 61, -1) 35 -(40, 62, -1) 34 -(40, 63, -1) 33 -(40, 64, -1) 32 -(40, 65, -1) 32 -(40, 66, -1) 31 -(40, 67, -1) 30 -(40, 68, -1) 29 -(40, 69, -1) 28 -(40, 70, -1) 27 -(40, 71, -1) 27 -(40, 72, -1) 26 -(40, 73, -1) 25 -(40, 74, -1) 24 -(40, 75, -1) 23 -(40, 76, -1) 22 -(40, 77, -1) 21 -(40, 78, -1) 20 -(40, 79, -1) 19 -(40, 80, -1) 18 -(40, 81, -1) 17 -(40, 82, -1) 16 -(40, 83, -1) 16 -(40, 84, -1) 15 -(40, 85, -1) 14 -(40, 86, -1) 13 -(40, 87, -1) 12 -(40, 88, -1) 11 -(40, 89, -1) 10 -(40, 90, -1) 9 -(40, 91, -1) 8 -(40, 92, -1) 7 -(40, 93, -1) 6 -(40, 94, -1) 5 -(40, 95, -1) 4 -(40, 96, -1) 3 -(40, 97, -1) 2 -(41, 1, -1) 0 -(41, 2, -1) 0 -(41, 3, -1) 1 -(41, 4, -1) 2 -(41, 5, -1) 3 -(41, 6, -1) 4 -(41, 7, -1) 5 -(41, 8, -1) 6 -(41, 9, -1) 7 -(41, 10, -1) 8 -(41, 11, -1) 9 -(41, 12, -1) 10 -(41, 13, -1) 11 -(41, 14, -1) 12 -(41, 15, -1) 13 -(41, 16, -1) 14 -(41, 17, -1) 15 -(41, 18, -1) 16 -(41, 19, -1) 17 -(41, 20, -1) 18 -(41, 21, -1) 19 -(41, 22, -1) 20 -(41, 23, -1) 20 -(41, 24, -1) 21 -(41, 25, -1) 22 -(41, 26, -1) 23 -(41, 27, -1) 24 -(41, 28, -1) 25 -(41, 29, -1) 26 -(41, 30, -1) 27 -(41, 31, -1) 28 -(41, 32, -1) 29 -(41, 33, -1) 30 -(41, 34, -1) 30 -(41, 35, -1) 31 -(41, 36, -1) 32 -(41, 37, -1) 33 -(41, 38, -1) 34 -(41, 39, -1) 35 -(41, 40, -1) 35 -(41, 41, -1) 36 -(41, 42, -1) 37 -(41, 43, -1) 37 -(41, 58, -1) 37 -(41, 59, -1) 37 -(41, 60, -1) 36 -(41, 61, -1) 35 -(41, 62, -1) 35 -(41, 63, -1) 34 -(41, 64, -1) 33 -(41, 65, -1) 32 -(41, 66, -1) 31 -(41, 67, -1) 30 -(41, 68, -1) 30 -(41, 69, -1) 29 -(41, 70, -1) 28 -(41, 71, -1) 27 -(41, 72, -1) 26 -(41, 73, -1) 25 -(41, 74, -1) 24 -(41, 75, -1) 23 -(41, 76, -1) 22 -(41, 77, -1) 21 -(41, 78, -1) 20 -(41, 79, -1) 20 -(41, 80, -1) 19 -(41, 81, -1) 18 -(41, 82, -1) 17 -(41, 83, -1) 16 -(41, 84, -1) 15 -(41, 85, -1) 14 -(41, 86, -1) 13 -(41, 87, -1) 12 -(41, 88, -1) 11 -(41, 89, -1) 10 -(41, 90, -1) 9 -(41, 91, -1) 8 -(41, 92, -1) 7 -(41, 93, -1) 6 -(41, 94, -1) 5 -(41, 95, -1) 4 -(41, 96, -1) 3 -(41, 97, -1) 2 -(41, 98, -1) 1 -(41, 99, -1) 0 -(41, 100, -1) 0 -(42, 1, -1) 0 -(42, 2, -1) 0 -(42, 3, -1) 1 -(42, 4, -1) 2 -(42, 5, -1) 3 -(42, 6, -1) 4 -(42, 7, -1) 5 -(42, 8, -1) 6 -(42, 9, -1) 7 -(42, 10, -1) 8 -(42, 11, -1) 9 -(42, 12, -1) 10 -(42, 13, -1) 11 -(42, 14, -1) 12 -(42, 15, -1) 13 -(42, 16, -1) 14 -(42, 17, -1) 15 -(42, 18, -1) 16 -(42, 19, -1) 17 -(42, 20, -1) 18 -(42, 21, -1) 19 -(42, 22, -1) 20 -(42, 23, -1) 21 -(42, 24, -1) 22 -(42, 25, -1) 23 -(42, 26, -1) 24 -(42, 27, -1) 25 -(42, 28, -1) 25 -(42, 29, -1) 26 -(42, 30, -1) 27 -(42, 31, -1) 28 -(42, 32, -1) 29 -(42, 33, -1) 30 -(42, 34, -1) 31 -(42, 35, -1) 32 -(42, 36, -1) 33 -(42, 37, -1) 34 -(42, 38, -1) 34 -(42, 39, -1) 35 -(42, 40, -1) 36 -(42, 41, -1) 37 -(42, 42, -1) 38 -(42, 59, -1) 38 -(42, 60, -1) 37 -(42, 61, -1) 36 -(42, 62, -1) 35 -(42, 63, -1) 34 -(42, 64, -1) 34 -(42, 65, -1) 33 -(42, 66, -1) 32 -(42, 67, -1) 31 -(42, 68, -1) 30 -(42, 69, -1) 29 -(42, 70, -1) 28 -(42, 71, -1) 27 -(42, 72, -1) 26 -(42, 73, -1) 25 -(42, 74, -1) 25 -(42, 75, -1) 24 -(42, 76, -1) 23 -(42, 77, -1) 22 -(42, 78, -1) 21 -(42, 79, -1) 20 -(42, 80, -1) 19 -(42, 81, -1) 18 -(42, 82, -1) 17 -(42, 83, -1) 16 -(42, 84, -1) 15 -(42, 85, -1) 14 -(42, 86, -1) 13 -(42, 87, -1) 12 -(42, 88, -1) 11 -(42, 89, -1) 10 -(42, 90, -1) 9 -(42, 91, -1) 8 -(42, 92, -1) 7 -(42, 93, -1) 6 -(42, 94, -1) 5 -(42, 95, -1) 4 -(42, 96, -1) 3 -(42, 97, -1) 2 -(42, 98, -1) 1 -(42, 99, -1) 0 -(42, 100, -1) 0 -(43, 1, -1) 0 -(43, 2, -1) 1 -(43, 3, -1) 2 -(43, 4, -1) 3 -(43, 5, -1) 4 -(43, 6, -1) 4 -(43, 7, -1) 5 -(43, 8, -1) 6 -(43, 9, -1) 7 -(43, 10, -1) 8 -(43, 11, -1) 9 -(43, 12, -1) 10 -(43, 13, -1) 11 -(43, 14, -1) 12 -(43, 15, -1) 13 -(43, 16, -1) 14 -(43, 17, -1) 15 -(43, 18, -1) 16 -(43, 19, -1) 17 -(43, 20, -1) 18 -(43, 21, -1) 19 -(43, 22, -1) 20 -(43, 23, -1) 21 -(43, 24, -1) 22 -(43, 25, -1) 23 -(43, 26, -1) 24 -(43, 27, -1) 25 -(43, 28, -1) 26 -(43, 29, -1) 27 -(43, 30, -1) 28 -(43, 31, -1) 29 -(43, 32, -1) 30 -(43, 33, -1) 30 -(43, 34, -1) 31 -(43, 35, -1) 32 -(43, 36, -1) 33 -(43, 37, -1) 34 -(43, 38, -1) 35 -(43, 39, -1) 36 -(43, 40, -1) 37 -(43, 41, -1) 37 -(43, 60, -1) 37 -(43, 61, -1) 37 -(43, 62, -1) 36 -(43, 63, -1) 35 -(43, 64, -1) 34 -(43, 65, -1) 33 -(43, 66, -1) 32 -(43, 67, -1) 31 -(43, 68, -1) 30 -(43, 69, -1) 30 -(43, 70, -1) 29 -(43, 71, -1) 28 -(43, 72, -1) 27 -(43, 73, -1) 26 -(43, 74, -1) 25 -(43, 75, -1) 24 -(43, 76, -1) 23 -(43, 77, -1) 22 -(43, 78, -1) 21 -(43, 79, -1) 20 -(43, 80, -1) 19 -(43, 81, -1) 18 -(43, 82, -1) 17 -(43, 83, -1) 16 -(43, 84, -1) 15 -(43, 85, -1) 14 -(43, 86, -1) 13 -(43, 87, -1) 12 -(43, 88, -1) 11 -(43, 89, -1) 10 -(43, 90, -1) 9 -(43, 91, -1) 8 -(43, 92, -1) 7 -(43, 93, -1) 6 -(43, 94, -1) 5 -(43, 95, -1) 4 -(43, 96, -1) 4 -(43, 97, -1) 3 -(43, 98, -1) 2 -(43, 99, -1) 1 -(43, 100, -1) 0 -(44, 1, -1) 0 -(44, 2, -1) 1 -(44, 3, -1) 2 -(44, 4, -1) 3 -(44, 5, -1) 4 -(44, 6, -1) 5 -(44, 7, -1) 6 -(44, 8, -1) 7 -(44, 9, -1) 8 -(44, 10, -1) 9 -(44, 11, -1) 10 -(44, 12, -1) 11 -(44, 13, -1) 12 -(44, 14, -1) 13 -(44, 15, -1) 14 -(44, 16, -1) 14 -(44, 17, -1) 15 -(44, 18, -1) 16 -(44, 19, -1) 17 -(44, 20, -1) 18 -(44, 21, -1) 19 -(44, 22, -1) 20 -(44, 23, -1) 21 -(44, 24, -1) 22 -(44, 25, -1) 23 -(44, 26, -1) 24 -(44, 27, -1) 25 -(44, 28, -1) 26 -(44, 29, -1) 27 -(44, 30, -1) 28 -(44, 31, -1) 29 -(44, 32, -1) 30 -(44, 33, -1) 31 -(44, 34, -1) 32 -(44, 35, -1) 33 -(44, 36, -1) 34 -(44, 37, -1) 35 -(44, 38, -1) 35 -(44, 39, -1) 36 -(44, 40, -1) 37 -(44, 61, -1) 37 -(44, 62, -1) 36 -(44, 63, -1) 35 -(44, 64, -1) 35 -(44, 65, -1) 34 -(44, 66, -1) 33 -(44, 67, -1) 32 -(44, 68, -1) 31 -(44, 69, -1) 30 -(44, 70, -1) 29 -(44, 71, -1) 28 -(44, 72, -1) 27 -(44, 73, -1) 26 -(44, 74, -1) 25 -(44, 75, -1) 24 -(44, 76, -1) 23 -(44, 77, -1) 22 -(44, 78, -1) 21 -(44, 79, -1) 20 -(44, 80, -1) 19 -(44, 81, -1) 18 -(44, 82, -1) 17 -(44, 83, -1) 16 -(44, 84, -1) 15 -(44, 85, -1) 14 -(44, 86, -1) 14 -(44, 87, -1) 13 -(44, 88, -1) 12 -(44, 89, -1) 11 -(44, 90, -1) 10 -(44, 91, -1) 9 -(44, 92, -1) 8 -(44, 93, -1) 7 -(44, 94, -1) 6 -(44, 95, -1) 5 -(44, 96, -1) 4 -(44, 97, -1) 3 -(44, 98, -1) 2 -(44, 99, -1) 1 -(44, 100, -1) 0 -(45, 1, -1) 0 -(45, 2, -1) 1 -(45, 3, -1) 2 -(45, 4, -1) 3 -(45, 5, -1) 4 -(45, 6, -1) 5 -(45, 7, -1) 6 -(45, 8, -1) 7 -(45, 9, -1) 8 -(45, 10, -1) 9 -(45, 11, -1) 10 -(45, 12, -1) 11 -(45, 13, -1) 12 -(45, 14, -1) 13 -(45, 15, -1) 14 -(45, 16, -1) 15 -(45, 17, -1) 16 -(45, 18, -1) 17 -(45, 19, -1) 18 -(45, 20, -1) 19 -(45, 21, -1) 20 -(45, 22, -1) 21 -(45, 23, -1) 22 -(45, 24, -1) 23 -(45, 25, -1) 23 -(45, 26, -1) 24 -(45, 27, -1) 25 -(45, 28, -1) 26 -(45, 29, -1) 27 -(45, 30, -1) 28 -(45, 31, -1) 29 -(45, 32, -1) 30 -(45, 33, -1) 31 -(45, 34, -1) 32 -(45, 35, -1) 33 -(45, 36, -1) 34 -(45, 37, -1) 35 -(45, 38, -1) 36 -(45, 39, -1) 37 -(45, 40, -1) 38 -(45, 61, -1) 38 -(45, 62, -1) 37 -(45, 63, -1) 36 -(45, 64, -1) 35 -(45, 65, -1) 34 -(45, 66, -1) 33 -(45, 67, -1) 32 -(45, 68, -1) 31 -(45, 69, -1) 30 -(45, 70, -1) 29 -(45, 71, -1) 28 -(45, 72, -1) 27 -(45, 73, -1) 26 -(45, 74, -1) 25 -(45, 75, -1) 24 -(45, 76, -1) 23 -(45, 77, -1) 23 -(45, 78, -1) 22 -(45, 79, -1) 21 -(45, 80, -1) 20 -(45, 81, -1) 19 -(45, 82, -1) 18 -(45, 83, -1) 17 -(45, 84, -1) 16 -(45, 85, -1) 15 -(45, 86, -1) 14 -(45, 87, -1) 13 -(45, 88, -1) 12 -(45, 89, -1) 11 -(45, 90, -1) 10 -(45, 91, -1) 9 -(45, 92, -1) 8 -(45, 93, -1) 7 -(45, 94, -1) 6 -(45, 95, -1) 5 -(45, 96, -1) 4 -(45, 97, -1) 3 -(45, 98, -1) 2 -(45, 99, -1) 1 -(45, 100, -1) 0 -(46, 1, -1) 0 -(46, 2, -1) 1 -(46, 3, -1) 2 -(46, 4, -1) 3 -(46, 5, -1) 4 -(46, 6, -1) 5 -(46, 7, -1) 6 -(46, 8, -1) 7 -(46, 9, -1) 8 -(46, 10, -1) 9 -(46, 11, -1) 10 -(46, 12, -1) 11 -(46, 13, -1) 12 -(46, 14, -1) 13 -(46, 15, -1) 14 -(46, 16, -1) 15 -(46, 17, -1) 16 -(46, 18, -1) 17 -(46, 19, -1) 18 -(46, 20, -1) 19 -(46, 21, -1) 20 -(46, 22, -1) 21 -(46, 23, -1) 22 -(46, 24, -1) 23 -(46, 25, -1) 24 -(46, 26, -1) 25 -(46, 27, -1) 26 -(46, 28, -1) 27 -(46, 29, -1) 28 -(46, 30, -1) 29 -(46, 31, -1) 30 -(46, 32, -1) 30 -(46, 33, -1) 31 -(46, 34, -1) 32 -(46, 35, -1) 33 -(46, 36, -1) 34 -(46, 37, -1) 35 -(46, 38, -1) 36 -(46, 39, -1) 37 -(46, 62, -1) 37 -(46, 63, -1) 36 -(46, 64, -1) 35 -(46, 65, -1) 34 -(46, 66, -1) 33 -(46, 67, -1) 32 -(46, 68, -1) 31 -(46, 69, -1) 30 -(46, 70, -1) 30 -(46, 71, -1) 29 -(46, 72, -1) 28 -(46, 73, -1) 27 -(46, 74, -1) 26 -(46, 75, -1) 25 -(46, 76, -1) 24 -(46, 77, -1) 23 -(46, 78, -1) 22 -(46, 79, -1) 21 -(46, 80, -1) 20 -(46, 81, -1) 19 -(46, 82, -1) 18 -(46, 83, -1) 17 -(46, 84, -1) 16 -(46, 85, -1) 15 -(46, 86, -1) 14 -(46, 87, -1) 13 -(46, 88, -1) 12 -(46, 89, -1) 11 -(46, 90, -1) 10 -(46, 91, -1) 9 -(46, 92, -1) 8 -(46, 93, -1) 7 -(46, 94, -1) 6 -(46, 95, -1) 5 -(46, 96, -1) 4 -(46, 97, -1) 3 -(46, 98, -1) 2 -(46, 99, -1) 1 -(46, 100, -1) 0 -(47, 1, -1) 0 -(47, 2, -1) 1 -(47, 3, -1) 2 -(47, 4, -1) 3 -(47, 5, -1) 4 -(47, 6, -1) 5 -(47, 7, -1) 6 -(47, 8, -1) 7 -(47, 9, -1) 8 -(47, 10, -1) 9 -(47, 11, -1) 10 -(47, 12, -1) 11 -(47, 13, -1) 12 -(47, 14, -1) 13 -(47, 15, -1) 14 -(47, 16, -1) 15 -(47, 17, -1) 16 -(47, 18, -1) 17 -(47, 19, -1) 18 -(47, 20, -1) 19 -(47, 21, -1) 20 -(47, 22, -1) 21 -(47, 23, -1) 22 -(47, 24, -1) 23 -(47, 25, -1) 24 -(47, 26, -1) 25 -(47, 27, -1) 26 -(47, 28, -1) 27 -(47, 29, -1) 28 -(47, 30, -1) 29 -(47, 31, -1) 30 -(47, 32, -1) 31 -(47, 33, -1) 32 -(47, 34, -1) 33 -(47, 35, -1) 34 -(47, 36, -1) 35 -(47, 37, -1) 36 -(47, 38, -1) 37 -(47, 39, -1) 38 -(47, 62, -1) 38 -(47, 63, -1) 37 -(47, 64, -1) 36 -(47, 65, -1) 35 -(47, 66, -1) 34 -(47, 67, -1) 33 -(47, 68, -1) 32 -(47, 69, -1) 31 -(47, 70, -1) 30 -(47, 71, -1) 29 -(47, 72, -1) 28 -(47, 73, -1) 27 -(47, 74, -1) 26 -(47, 75, -1) 25 -(47, 76, -1) 24 -(47, 77, -1) 23 -(47, 78, -1) 22 -(47, 79, -1) 21 -(47, 80, -1) 20 -(47, 81, -1) 19 -(47, 82, -1) 18 -(47, 83, -1) 17 -(47, 84, -1) 16 -(47, 85, -1) 15 -(47, 86, -1) 14 -(47, 87, -1) 13 -(47, 88, -1) 12 -(47, 89, -1) 11 -(47, 90, -1) 10 -(47, 91, -1) 9 -(47, 92, -1) 8 -(47, 93, -1) 7 -(47, 94, -1) 6 -(47, 95, -1) 5 -(47, 96, -1) 4 -(47, 97, -1) 3 -(47, 98, -1) 2 -(47, 99, -1) 1 -(47, 100, -1) 0 -(48, 1, -1) 0 -(48, 2, -1) 1 -(48, 3, -1) 2 -(48, 4, -1) 3 -(48, 5, -1) 4 -(48, 6, -1) 5 -(48, 7, -1) 6 -(48, 8, -1) 7 -(48, 9, -1) 8 -(48, 10, -1) 9 -(48, 11, -1) 10 -(48, 12, -1) 11 -(48, 13, -1) 12 -(48, 14, -1) 13 -(48, 15, -1) 14 -(48, 16, -1) 15 -(48, 17, -1) 16 -(48, 18, -1) 17 -(48, 19, -1) 18 -(48, 20, -1) 19 -(48, 21, -1) 20 -(48, 22, -1) 21 -(48, 23, -1) 22 -(48, 24, -1) 23 -(48, 25, -1) 24 -(48, 26, -1) 25 -(48, 27, -1) 26 -(48, 28, -1) 27 -(48, 29, -1) 28 -(48, 30, -1) 29 -(48, 31, -1) 30 -(48, 32, -1) 31 -(48, 33, -1) 32 -(48, 34, -1) 33 -(48, 35, -1) 34 -(48, 36, -1) 35 -(48, 37, -1) 36 -(48, 38, -1) 37 -(48, 39, -1) 38 -(48, 62, -1) 38 -(48, 63, -1) 37 -(48, 64, -1) 36 -(48, 65, -1) 35 -(48, 66, -1) 34 -(48, 67, -1) 33 -(48, 68, -1) 32 -(48, 69, -1) 31 -(48, 70, -1) 30 -(48, 71, -1) 29 -(48, 72, -1) 28 -(48, 73, -1) 27 -(48, 74, -1) 26 -(48, 75, -1) 25 -(48, 76, -1) 24 -(48, 77, -1) 23 -(48, 78, -1) 22 -(48, 79, -1) 21 -(48, 80, -1) 20 -(48, 81, -1) 19 -(48, 82, -1) 18 -(48, 83, -1) 17 -(48, 84, -1) 16 -(48, 85, -1) 15 -(48, 86, -1) 14 -(48, 87, -1) 13 -(48, 88, -1) 12 -(48, 89, -1) 11 -(48, 90, -1) 10 -(48, 91, -1) 9 -(48, 92, -1) 8 -(48, 93, -1) 7 -(48, 94, -1) 6 -(48, 95, -1) 5 -(48, 96, -1) 4 -(48, 97, -1) 3 -(48, 98, -1) 2 -(48, 99, -1) 1 -(48, 100, -1) 0 -(49, 1, -1) 0 -(49, 2, -1) 1 -(49, 3, -1) 2 -(49, 4, -1) 3 -(49, 5, -1) 4 -(49, 6, -1) 5 -(49, 7, -1) 6 -(49, 8, -1) 7 -(49, 9, -1) 8 -(49, 10, -1) 9 -(49, 11, -1) 10 -(49, 12, -1) 11 -(49, 13, -1) 12 -(49, 14, -1) 13 -(49, 15, -1) 14 -(49, 16, -1) 15 -(49, 17, -1) 16 -(49, 18, -1) 17 -(49, 19, -1) 18 -(49, 20, -1) 19 -(49, 21, -1) 20 -(49, 22, -1) 21 -(49, 23, -1) 22 -(49, 24, -1) 23 -(49, 25, -1) 24 -(49, 26, -1) 25 -(49, 27, -1) 26 -(49, 28, -1) 27 -(49, 29, -1) 28 -(49, 30, -1) 29 -(49, 31, -1) 30 -(49, 32, -1) 31 -(49, 33, -1) 32 -(49, 34, -1) 33 -(49, 35, -1) 34 -(49, 36, -1) 35 -(49, 37, -1) 36 -(49, 38, -1) 37 -(49, 39, -1) 38 -(49, 62, -1) 38 -(49, 63, -1) 37 -(49, 64, -1) 36 -(49, 65, -1) 35 -(49, 66, -1) 34 -(49, 67, -1) 33 -(49, 68, -1) 32 -(49, 69, -1) 31 -(49, 70, -1) 30 -(49, 71, -1) 29 -(49, 72, -1) 28 -(49, 73, -1) 27 -(49, 74, -1) 26 -(49, 75, -1) 25 -(49, 76, -1) 24 -(49, 77, -1) 23 -(49, 78, -1) 22 -(49, 79, -1) 21 -(49, 80, -1) 20 -(49, 81, -1) 19 -(49, 82, -1) 18 -(49, 83, -1) 17 -(49, 84, -1) 16 -(49, 85, -1) 15 -(49, 86, -1) 14 -(49, 87, -1) 13 -(49, 88, -1) 12 -(49, 89, -1) 11 -(49, 90, -1) 10 -(49, 91, -1) 9 -(49, 92, -1) 8 -(49, 93, -1) 7 -(49, 94, -1) 6 -(49, 95, -1) 5 -(49, 96, -1) 4 -(49, 97, -1) 3 -(49, 98, -1) 2 -(49, 99, -1) 1 -(49, 100, -1) 0 -(50, 1, -1) 0 -(50, 2, -1) 1 -(50, 3, -1) 2 -(50, 4, -1) 3 -(50, 5, -1) 4 -(50, 6, -1) 5 -(50, 7, -1) 6 -(50, 8, -1) 7 -(50, 9, -1) 8 -(50, 10, -1) 9 -(50, 11, -1) 10 -(50, 12, -1) 11 -(50, 13, -1) 12 -(50, 14, -1) 13 -(50, 15, -1) 14 -(50, 16, -1) 15 -(50, 17, -1) 16 -(50, 18, -1) 17 -(50, 19, -1) 18 -(50, 20, -1) 19 -(50, 21, -1) 20 -(50, 22, -1) 21 -(50, 23, -1) 22 -(50, 24, -1) 23 -(50, 25, -1) 24 -(50, 26, -1) 25 -(50, 27, -1) 26 -(50, 28, -1) 27 -(50, 29, -1) 28 -(50, 30, -1) 29 -(50, 31, -1) 30 -(50, 32, -1) 31 -(50, 33, -1) 32 -(50, 34, -1) 33 -(50, 35, -1) 34 -(50, 36, -1) 35 -(50, 37, -1) 36 -(50, 38, -1) 37 -(50, 39, -1) 38 -(50, 62, -1) 38 -(50, 63, -1) 37 -(50, 64, -1) 36 -(50, 65, -1) 35 -(50, 66, -1) 34 -(50, 67, -1) 33 -(50, 68, -1) 32 -(50, 69, -1) 31 -(50, 70, -1) 30 -(50, 71, -1) 29 -(50, 72, -1) 28 -(50, 73, -1) 27 -(50, 74, -1) 26 -(50, 75, -1) 25 -(50, 76, -1) 24 -(50, 77, -1) 23 -(50, 78, -1) 22 -(50, 79, -1) 21 -(50, 80, -1) 20 -(50, 81, -1) 19 -(50, 82, -1) 18 -(50, 83, -1) 17 -(50, 84, -1) 16 -(50, 85, -1) 15 -(50, 86, -1) 14 -(50, 87, -1) 13 -(50, 88, -1) 12 -(50, 89, -1) 11 -(50, 90, -1) 10 -(50, 91, -1) 9 -(50, 92, -1) 8 -(50, 93, -1) 7 -(50, 94, -1) 6 -(50, 95, -1) 5 -(50, 96, -1) 4 -(50, 97, -1) 3 -(50, 98, -1) 2 -(50, 99, -1) 1 -(50, 100, -1) 0 -(51, 1, -1) 0 -(51, 2, -1) 1 -(51, 3, -1) 2 -(51, 4, -1) 3 -(51, 5, -1) 4 -(51, 6, -1) 5 -(51, 7, -1) 6 -(51, 8, -1) 7 -(51, 9, -1) 8 -(51, 10, -1) 9 -(51, 11, -1) 10 -(51, 12, -1) 11 -(51, 13, -1) 12 -(51, 14, -1) 13 -(51, 15, -1) 14 -(51, 16, -1) 15 -(51, 17, -1) 16 -(51, 18, -1) 17 -(51, 19, -1) 18 -(51, 20, -1) 19 -(51, 21, -1) 20 -(51, 22, -1) 21 -(51, 23, -1) 22 -(51, 24, -1) 23 -(51, 25, -1) 24 -(51, 26, -1) 25 -(51, 27, -1) 26 -(51, 28, -1) 27 -(51, 29, -1) 28 -(51, 30, -1) 29 -(51, 31, -1) 30 -(51, 32, -1) 31 -(51, 33, -1) 32 -(51, 34, -1) 33 -(51, 35, -1) 34 -(51, 36, -1) 35 -(51, 37, -1) 36 -(51, 38, -1) 37 -(51, 39, -1) 38 -(51, 62, -1) 38 -(51, 63, -1) 37 -(51, 64, -1) 36 -(51, 65, -1) 35 -(51, 66, -1) 34 -(51, 67, -1) 33 -(51, 68, -1) 32 -(51, 69, -1) 31 -(51, 70, -1) 30 -(51, 71, -1) 29 -(51, 72, -1) 28 -(51, 73, -1) 27 -(51, 74, -1) 26 -(51, 75, -1) 25 -(51, 76, -1) 24 -(51, 77, -1) 23 -(51, 78, -1) 22 -(51, 79, -1) 21 -(51, 80, -1) 20 -(51, 81, -1) 19 -(51, 82, -1) 18 -(51, 83, -1) 17 -(51, 84, -1) 16 -(51, 85, -1) 15 -(51, 86, -1) 14 -(51, 87, -1) 13 -(51, 88, -1) 12 -(51, 89, -1) 11 -(51, 90, -1) 10 -(51, 91, -1) 9 -(51, 92, -1) 8 -(51, 93, -1) 7 -(51, 94, -1) 6 -(51, 95, -1) 5 -(51, 96, -1) 4 -(51, 97, -1) 3 -(51, 98, -1) 2 -(51, 99, -1) 1 -(51, 100, -1) 0 -(52, 1, -1) 0 -(52, 2, -1) 1 -(52, 3, -1) 2 -(52, 4, -1) 3 -(52, 5, -1) 4 -(52, 6, -1) 5 -(52, 7, -1) 6 -(52, 8, -1) 7 -(52, 9, -1) 8 -(52, 10, -1) 9 -(52, 11, -1) 10 -(52, 12, -1) 11 -(52, 13, -1) 12 -(52, 14, -1) 13 -(52, 15, -1) 14 -(52, 16, -1) 15 -(52, 17, -1) 16 -(52, 18, -1) 17 -(52, 19, -1) 18 -(52, 20, -1) 19 -(52, 21, -1) 20 -(52, 22, -1) 21 -(52, 23, -1) 22 -(52, 24, -1) 23 -(52, 25, -1) 24 -(52, 26, -1) 25 -(52, 27, -1) 26 -(52, 28, -1) 27 -(52, 29, -1) 28 -(52, 30, -1) 29 -(52, 31, -1) 30 -(52, 32, -1) 31 -(52, 33, -1) 32 -(52, 34, -1) 33 -(52, 35, -1) 34 -(52, 36, -1) 35 -(52, 37, -1) 36 -(52, 38, -1) 37 -(52, 39, -1) 38 -(52, 62, -1) 38 -(52, 63, -1) 37 -(52, 64, -1) 36 -(52, 65, -1) 35 -(52, 66, -1) 34 -(52, 67, -1) 33 -(52, 68, -1) 32 -(52, 69, -1) 31 -(52, 70, -1) 30 -(52, 71, -1) 29 -(52, 72, -1) 28 -(52, 73, -1) 27 -(52, 74, -1) 26 -(52, 75, -1) 25 -(52, 76, -1) 24 -(52, 77, -1) 23 -(52, 78, -1) 22 -(52, 79, -1) 21 -(52, 80, -1) 20 -(52, 81, -1) 19 -(52, 82, -1) 18 -(52, 83, -1) 17 -(52, 84, -1) 16 -(52, 85, -1) 15 -(52, 86, -1) 14 -(52, 87, -1) 13 -(52, 88, -1) 12 -(52, 89, -1) 11 -(52, 90, -1) 10 -(52, 91, -1) 9 -(52, 92, -1) 8 -(52, 93, -1) 7 -(52, 94, -1) 6 -(52, 95, -1) 5 -(52, 96, -1) 4 -(52, 97, -1) 3 -(52, 98, -1) 2 -(52, 99, -1) 1 -(52, 100, -1) 0 -(53, 1, -1) 0 -(53, 2, -1) 1 -(53, 3, -1) 2 -(53, 4, -1) 3 -(53, 5, -1) 4 -(53, 6, -1) 5 -(53, 7, -1) 6 -(53, 8, -1) 7 -(53, 9, -1) 8 -(53, 10, -1) 9 -(53, 11, -1) 10 -(53, 12, -1) 11 -(53, 13, -1) 12 -(53, 14, -1) 13 -(53, 15, -1) 14 -(53, 16, -1) 15 -(53, 17, -1) 16 -(53, 18, -1) 17 -(53, 19, -1) 18 -(53, 20, -1) 19 -(53, 21, -1) 20 -(53, 22, -1) 21 -(53, 23, -1) 22 -(53, 24, -1) 23 -(53, 25, -1) 24 -(53, 26, -1) 25 -(53, 27, -1) 26 -(53, 28, -1) 27 -(53, 29, -1) 28 -(53, 30, -1) 29 -(53, 31, -1) 30 -(53, 32, -1) 31 -(53, 33, -1) 32 -(53, 34, -1) 33 -(53, 35, -1) 34 -(53, 36, -1) 35 -(53, 37, -1) 36 -(53, 38, -1) 37 -(53, 39, -1) 38 -(53, 62, -1) 38 -(53, 63, -1) 37 -(53, 64, -1) 36 -(53, 65, -1) 35 -(53, 66, -1) 34 -(53, 67, -1) 33 -(53, 68, -1) 32 -(53, 69, -1) 31 -(53, 70, -1) 30 -(53, 71, -1) 29 -(53, 72, -1) 28 -(53, 73, -1) 27 -(53, 74, -1) 26 -(53, 75, -1) 25 -(53, 76, -1) 24 -(53, 77, -1) 23 -(53, 78, -1) 22 -(53, 79, -1) 21 -(53, 80, -1) 20 -(53, 81, -1) 19 -(53, 82, -1) 18 -(53, 83, -1) 17 -(53, 84, -1) 16 -(53, 85, -1) 15 -(53, 86, -1) 14 -(53, 87, -1) 13 -(53, 88, -1) 12 -(53, 89, -1) 11 -(53, 90, -1) 10 -(53, 91, -1) 9 -(53, 92, -1) 8 -(53, 93, -1) 7 -(53, 94, -1) 6 -(53, 95, -1) 5 -(53, 96, -1) 4 -(53, 97, -1) 3 -(53, 98, -1) 2 -(53, 99, -1) 1 -(53, 100, -1) 0 -(54, 1, -1) 0 -(54, 2, -1) 1 -(54, 3, -1) 2 -(54, 4, -1) 3 -(54, 5, -1) 4 -(54, 6, -1) 5 -(54, 7, -1) 6 -(54, 8, -1) 7 -(54, 9, -1) 8 -(54, 10, -1) 9 -(54, 11, -1) 10 -(54, 12, -1) 11 -(54, 13, -1) 12 -(54, 14, -1) 13 -(54, 15, -1) 14 -(54, 16, -1) 15 -(54, 17, -1) 16 -(54, 18, -1) 17 -(54, 19, -1) 18 -(54, 20, -1) 19 -(54, 21, -1) 20 -(54, 22, -1) 21 -(54, 23, -1) 22 -(54, 24, -1) 23 -(54, 25, -1) 24 -(54, 26, -1) 25 -(54, 27, -1) 26 -(54, 28, -1) 27 -(54, 29, -1) 28 -(54, 30, -1) 29 -(54, 31, -1) 30 -(54, 32, -1) 31 -(54, 33, -1) 32 -(54, 34, -1) 33 -(54, 35, -1) 34 -(54, 36, -1) 35 -(54, 37, -1) 36 -(54, 38, -1) 37 -(54, 39, -1) 38 -(54, 62, -1) 38 -(54, 63, -1) 37 -(54, 64, -1) 36 -(54, 65, -1) 35 -(54, 66, -1) 34 -(54, 67, -1) 33 -(54, 68, -1) 32 -(54, 69, -1) 31 -(54, 70, -1) 30 -(54, 71, -1) 29 -(54, 72, -1) 28 -(54, 73, -1) 27 -(54, 74, -1) 26 -(54, 75, -1) 25 -(54, 76, -1) 24 -(54, 77, -1) 23 -(54, 78, -1) 22 -(54, 79, -1) 21 -(54, 80, -1) 20 -(54, 81, -1) 19 -(54, 82, -1) 18 -(54, 83, -1) 17 -(54, 84, -1) 16 -(54, 85, -1) 15 -(54, 86, -1) 14 -(54, 87, -1) 13 -(54, 88, -1) 12 -(54, 89, -1) 11 -(54, 90, -1) 10 -(54, 91, -1) 9 -(54, 92, -1) 8 -(54, 93, -1) 7 -(54, 94, -1) 6 -(54, 95, -1) 5 -(54, 96, -1) 4 -(54, 97, -1) 3 -(54, 98, -1) 2 -(54, 99, -1) 1 -(54, 100, -1) 0 -(55, 1, -1) 0 -(55, 2, -1) 1 -(55, 3, -1) 2 -(55, 4, -1) 3 -(55, 5, -1) 4 -(55, 6, -1) 5 -(55, 7, -1) 6 -(55, 8, -1) 7 -(55, 9, -1) 8 -(55, 10, -1) 9 -(55, 11, -1) 10 -(55, 12, -1) 11 -(55, 13, -1) 12 -(55, 14, -1) 13 -(55, 15, -1) 14 -(55, 16, -1) 15 -(55, 17, -1) 16 -(55, 18, -1) 17 -(55, 19, -1) 18 -(55, 20, -1) 19 -(55, 21, -1) 20 -(55, 22, -1) 21 -(55, 23, -1) 22 -(55, 24, -1) 23 -(55, 25, -1) 24 -(55, 26, -1) 25 -(55, 27, -1) 26 -(55, 28, -1) 27 -(55, 29, -1) 28 -(55, 30, -1) 29 -(55, 31, -1) 30 -(55, 32, -1) 30 -(55, 33, -1) 31 -(55, 34, -1) 32 -(55, 35, -1) 33 -(55, 36, -1) 34 -(55, 37, -1) 35 -(55, 38, -1) 36 -(55, 39, -1) 37 -(55, 62, -1) 37 -(55, 63, -1) 36 -(55, 64, -1) 35 -(55, 65, -1) 34 -(55, 66, -1) 33 -(55, 67, -1) 32 -(55, 68, -1) 31 -(55, 69, -1) 30 -(55, 70, -1) 30 -(55, 71, -1) 29 -(55, 72, -1) 28 -(55, 73, -1) 27 -(55, 74, -1) 26 -(55, 75, -1) 25 -(55, 76, -1) 24 -(55, 77, -1) 23 -(55, 78, -1) 22 -(55, 79, -1) 21 -(55, 80, -1) 20 -(55, 81, -1) 19 -(55, 82, -1) 18 -(55, 83, -1) 17 -(55, 84, -1) 16 -(55, 85, -1) 15 -(55, 86, -1) 14 -(55, 87, -1) 13 -(55, 88, -1) 12 -(55, 89, -1) 11 -(55, 90, -1) 10 -(55, 91, -1) 9 -(55, 92, -1) 8 -(55, 93, -1) 7 -(55, 94, -1) 6 -(55, 95, -1) 5 -(55, 96, -1) 4 -(55, 97, -1) 3 -(55, 98, -1) 2 -(55, 99, -1) 1 -(55, 100, -1) 0 -(56, 1, -1) 0 -(56, 2, -1) 1 -(56, 3, -1) 2 -(56, 4, -1) 3 -(56, 5, -1) 4 -(56, 6, -1) 5 -(56, 7, -1) 6 -(56, 8, -1) 7 -(56, 9, -1) 8 -(56, 10, -1) 9 -(56, 11, -1) 10 -(56, 12, -1) 11 -(56, 13, -1) 12 -(56, 14, -1) 13 -(56, 15, -1) 14 -(56, 16, -1) 15 -(56, 17, -1) 16 -(56, 18, -1) 17 -(56, 19, -1) 18 -(56, 20, -1) 19 -(56, 21, -1) 20 -(56, 22, -1) 21 -(56, 23, -1) 22 -(56, 24, -1) 23 -(56, 25, -1) 23 -(56, 26, -1) 24 -(56, 27, -1) 25 -(56, 28, -1) 26 -(56, 29, -1) 27 -(56, 30, -1) 28 -(56, 31, -1) 29 -(56, 32, -1) 30 -(56, 33, -1) 31 -(56, 34, -1) 32 -(56, 35, -1) 33 -(56, 36, -1) 34 -(56, 37, -1) 35 -(56, 38, -1) 36 -(56, 39, -1) 37 -(56, 40, -1) 38 -(56, 61, -1) 38 -(56, 62, -1) 37 -(56, 63, -1) 36 -(56, 64, -1) 35 -(56, 65, -1) 34 -(56, 66, -1) 33 -(56, 67, -1) 32 -(56, 68, -1) 31 -(56, 69, -1) 30 -(56, 70, -1) 29 -(56, 71, -1) 28 -(56, 72, -1) 27 -(56, 73, -1) 26 -(56, 74, -1) 25 -(56, 75, -1) 24 -(56, 76, -1) 23 -(56, 77, -1) 23 -(56, 78, -1) 22 -(56, 79, -1) 21 -(56, 80, -1) 20 -(56, 81, -1) 19 -(56, 82, -1) 18 -(56, 83, -1) 17 -(56, 84, -1) 16 -(56, 85, -1) 15 -(56, 86, -1) 14 -(56, 87, -1) 13 -(56, 88, -1) 12 -(56, 89, -1) 11 -(56, 90, -1) 10 -(56, 91, -1) 9 -(56, 92, -1) 8 -(56, 93, -1) 7 -(56, 94, -1) 6 -(56, 95, -1) 5 -(56, 96, -1) 4 -(56, 97, -1) 3 -(56, 98, -1) 2 -(56, 99, -1) 1 -(56, 100, -1) 0 -(57, 1, -1) 0 -(57, 2, -1) 1 -(57, 3, -1) 2 -(57, 4, -1) 3 -(57, 5, -1) 4 -(57, 6, -1) 5 -(57, 7, -1) 6 -(57, 8, -1) 7 -(57, 9, -1) 8 -(57, 10, -1) 9 -(57, 11, -1) 10 -(57, 12, -1) 11 -(57, 13, -1) 12 -(57, 14, -1) 13 -(57, 15, -1) 14 -(57, 16, -1) 14 -(57, 17, -1) 15 -(57, 18, -1) 16 -(57, 19, -1) 17 -(57, 20, -1) 18 -(57, 21, -1) 19 -(57, 22, -1) 20 -(57, 23, -1) 21 -(57, 24, -1) 22 -(57, 25, -1) 23 -(57, 26, -1) 24 -(57, 27, -1) 25 -(57, 28, -1) 26 -(57, 29, -1) 27 -(57, 30, -1) 28 -(57, 31, -1) 29 -(57, 32, -1) 30 -(57, 33, -1) 31 -(57, 34, -1) 32 -(57, 35, -1) 33 -(57, 36, -1) 34 -(57, 37, -1) 35 -(57, 38, -1) 35 -(57, 39, -1) 36 -(57, 40, -1) 37 -(57, 61, -1) 37 -(57, 62, -1) 36 -(57, 63, -1) 35 -(57, 64, -1) 35 -(57, 65, -1) 34 -(57, 66, -1) 33 -(57, 67, -1) 32 -(57, 68, -1) 31 -(57, 69, -1) 30 -(57, 70, -1) 29 -(57, 71, -1) 28 -(57, 72, -1) 27 -(57, 73, -1) 26 -(57, 74, -1) 25 -(57, 75, -1) 24 -(57, 76, -1) 23 -(57, 77, -1) 22 -(57, 78, -1) 21 -(57, 79, -1) 20 -(57, 80, -1) 19 -(57, 81, -1) 18 -(57, 82, -1) 17 -(57, 83, -1) 16 -(57, 84, -1) 15 -(57, 85, -1) 14 -(57, 86, -1) 14 -(57, 87, -1) 13 -(57, 88, -1) 12 -(57, 89, -1) 11 -(57, 90, -1) 10 -(57, 91, -1) 9 -(57, 92, -1) 8 -(57, 93, -1) 7 -(57, 94, -1) 6 -(57, 95, -1) 5 -(57, 96, -1) 4 -(57, 97, -1) 3 -(57, 98, -1) 2 -(57, 99, -1) 1 -(57, 100, -1) 0 -(58, 1, -1) 0 -(58, 2, -1) 1 -(58, 3, -1) 2 -(58, 4, -1) 3 -(58, 5, -1) 4 -(58, 6, -1) 4 -(58, 7, -1) 5 -(58, 8, -1) 6 -(58, 9, -1) 7 -(58, 10, -1) 8 -(58, 11, -1) 9 -(58, 12, -1) 10 -(58, 13, -1) 11 -(58, 14, -1) 12 -(58, 15, -1) 13 -(58, 16, -1) 14 -(58, 17, -1) 15 -(58, 18, -1) 16 -(58, 19, -1) 17 -(58, 20, -1) 18 -(58, 21, -1) 19 -(58, 22, -1) 20 -(58, 23, -1) 21 -(58, 24, -1) 22 -(58, 25, -1) 23 -(58, 26, -1) 24 -(58, 27, -1) 25 -(58, 28, -1) 26 -(58, 29, -1) 27 -(58, 30, -1) 28 -(58, 31, -1) 29 -(58, 32, -1) 30 -(58, 33, -1) 30 -(58, 34, -1) 31 -(58, 35, -1) 32 -(58, 36, -1) 33 -(58, 37, -1) 34 -(58, 38, -1) 35 -(58, 39, -1) 36 -(58, 40, -1) 37 -(58, 41, -1) 37 -(58, 60, -1) 37 -(58, 61, -1) 37 -(58, 62, -1) 36 -(58, 63, -1) 35 -(58, 64, -1) 34 -(58, 65, -1) 33 -(58, 66, -1) 32 -(58, 67, -1) 31 -(58, 68, -1) 30 -(58, 69, -1) 30 -(58, 70, -1) 29 -(58, 71, -1) 28 -(58, 72, -1) 27 -(58, 73, -1) 26 -(58, 74, -1) 25 -(58, 75, -1) 24 -(58, 76, -1) 23 -(58, 77, -1) 22 -(58, 78, -1) 21 -(58, 79, -1) 20 -(58, 80, -1) 19 -(58, 81, -1) 18 -(58, 82, -1) 17 -(58, 83, -1) 16 -(58, 84, -1) 15 -(58, 85, -1) 14 -(58, 86, -1) 13 -(58, 87, -1) 12 -(58, 88, -1) 11 -(58, 89, -1) 10 -(58, 90, -1) 9 -(58, 91, -1) 8 -(58, 92, -1) 7 -(58, 93, -1) 6 -(58, 94, -1) 5 -(58, 95, -1) 4 -(58, 96, -1) 4 -(58, 97, -1) 3 -(58, 98, -1) 2 -(58, 99, -1) 1 -(58, 100, -1) 0 -(59, 1, -1) 0 -(59, 2, -1) 0 -(59, 3, -1) 1 -(59, 4, -1) 2 -(59, 5, -1) 3 -(59, 6, -1) 4 -(59, 7, -1) 5 -(59, 8, -1) 6 -(59, 9, -1) 7 -(59, 10, -1) 8 -(59, 11, -1) 9 -(59, 12, -1) 10 -(59, 13, -1) 11 -(59, 14, -1) 12 -(59, 15, -1) 13 -(59, 16, -1) 14 -(59, 17, -1) 15 -(59, 18, -1) 16 -(59, 19, -1) 17 -(59, 20, -1) 18 -(59, 21, -1) 19 -(59, 22, -1) 20 -(59, 23, -1) 21 -(59, 24, -1) 22 -(59, 25, -1) 23 -(59, 26, -1) 24 -(59, 27, -1) 25 -(59, 28, -1) 25 -(59, 29, -1) 26 -(59, 30, -1) 27 -(59, 31, -1) 28 -(59, 32, -1) 29 -(59, 33, -1) 30 -(59, 34, -1) 31 -(59, 35, -1) 32 -(59, 36, -1) 33 -(59, 37, -1) 34 -(59, 38, -1) 34 -(59, 39, -1) 35 -(59, 40, -1) 36 -(59, 41, -1) 37 -(59, 42, -1) 38 -(59, 59, -1) 38 -(59, 60, -1) 37 -(59, 61, -1) 36 -(59, 62, -1) 35 -(59, 63, -1) 34 -(59, 64, -1) 34 -(59, 65, -1) 33 -(59, 66, -1) 32 -(59, 67, -1) 31 -(59, 68, -1) 30 -(59, 69, -1) 29 -(59, 70, -1) 28 -(59, 71, -1) 27 -(59, 72, -1) 26 -(59, 73, -1) 25 -(59, 74, -1) 25 -(59, 75, -1) 24 -(59, 76, -1) 23 -(59, 77, -1) 22 -(59, 78, -1) 21 -(59, 79, -1) 20 -(59, 80, -1) 19 -(59, 81, -1) 18 -(59, 82, -1) 17 -(59, 83, -1) 16 -(59, 84, -1) 15 -(59, 85, -1) 14 -(59, 86, -1) 13 -(59, 87, -1) 12 -(59, 88, -1) 11 -(59, 89, -1) 10 -(59, 90, -1) 9 -(59, 91, -1) 8 -(59, 92, -1) 7 -(59, 93, -1) 6 -(59, 94, -1) 5 -(59, 95, -1) 4 -(59, 96, -1) 3 -(59, 97, -1) 2 -(59, 98, -1) 1 -(59, 99, -1) 0 -(59, 100, -1) 0 -(60, 1, -1) 0 -(60, 2, -1) 0 -(60, 3, -1) 1 -(60, 4, -1) 2 -(60, 5, -1) 3 -(60, 6, -1) 4 -(60, 7, -1) 5 -(60, 8, -1) 6 -(60, 9, -1) 7 -(60, 10, -1) 8 -(60, 11, -1) 9 -(60, 12, -1) 10 -(60, 13, -1) 11 -(60, 14, -1) 12 -(60, 15, -1) 13 -(60, 16, -1) 14 -(60, 17, -1) 15 -(60, 18, -1) 16 -(60, 19, -1) 17 -(60, 20, -1) 18 -(60, 21, -1) 19 -(60, 22, -1) 20 -(60, 23, -1) 20 -(60, 24, -1) 21 -(60, 25, -1) 22 -(60, 26, -1) 23 -(60, 27, -1) 24 -(60, 28, -1) 25 -(60, 29, -1) 26 -(60, 30, -1) 27 -(60, 31, -1) 28 -(60, 32, -1) 29 -(60, 33, -1) 30 -(60, 34, -1) 30 -(60, 35, -1) 31 -(60, 36, -1) 32 -(60, 37, -1) 33 -(60, 38, -1) 34 -(60, 39, -1) 35 -(60, 40, -1) 35 -(60, 41, -1) 36 -(60, 42, -1) 37 -(60, 43, -1) 37 -(60, 58, -1) 37 -(60, 59, -1) 37 -(60, 60, -1) 36 -(60, 61, -1) 35 -(60, 62, -1) 35 -(60, 63, -1) 34 -(60, 64, -1) 33 -(60, 65, -1) 32 -(60, 66, -1) 31 -(60, 67, -1) 30 -(60, 68, -1) 30 -(60, 69, -1) 29 -(60, 70, -1) 28 -(60, 71, -1) 27 -(60, 72, -1) 26 -(60, 73, -1) 25 -(60, 74, -1) 24 -(60, 75, -1) 23 -(60, 76, -1) 22 -(60, 77, -1) 21 -(60, 78, -1) 20 -(60, 79, -1) 20 -(60, 80, -1) 19 -(60, 81, -1) 18 -(60, 82, -1) 17 -(60, 83, -1) 16 -(60, 84, -1) 15 -(60, 85, -1) 14 -(60, 86, -1) 13 -(60, 87, -1) 12 -(60, 88, -1) 11 -(60, 89, -1) 10 -(60, 90, -1) 9 -(60, 91, -1) 8 -(60, 92, -1) 7 -(60, 93, -1) 6 -(60, 94, -1) 5 -(60, 95, -1) 4 -(60, 96, -1) 3 -(60, 97, -1) 2 -(60, 98, -1) 1 -(60, 99, -1) 0 -(60, 100, -1) 0 -(61, 4, -1) 2 -(61, 5, -1) 3 -(61, 6, -1) 4 -(61, 7, -1) 5 -(61, 8, -1) 6 -(61, 9, -1) 7 -(61, 10, -1) 8 -(61, 11, -1) 9 -(61, 12, -1) 10 -(61, 13, -1) 11 -(61, 14, -1) 12 -(61, 15, -1) 13 -(61, 16, -1) 14 -(61, 17, -1) 15 -(61, 18, -1) 16 -(61, 19, -1) 16 -(61, 20, -1) 17 -(61, 21, -1) 18 -(61, 22, -1) 19 -(61, 23, -1) 20 -(61, 24, -1) 21 -(61, 25, -1) 22 -(61, 26, -1) 23 -(61, 27, -1) 24 -(61, 28, -1) 25 -(61, 29, -1) 26 -(61, 30, -1) 27 -(61, 31, -1) 27 -(61, 32, -1) 28 -(61, 33, -1) 29 -(61, 34, -1) 30 -(61, 35, -1) 31 -(61, 36, -1) 32 -(61, 37, -1) 32 -(61, 38, -1) 33 -(61, 39, -1) 34 -(61, 40, -1) 35 -(61, 41, -1) 35 -(61, 42, -1) 36 -(61, 43, -1) 37 -(61, 44, -1) 37 -(61, 45, -1) 38 -(61, 56, -1) 38 -(61, 57, -1) 37 -(61, 58, -1) 37 -(61, 59, -1) 36 -(61, 60, -1) 35 -(61, 61, -1) 35 -(61, 62, -1) 34 -(61, 63, -1) 33 -(61, 64, -1) 32 -(61, 65, -1) 32 -(61, 66, -1) 31 -(61, 67, -1) 30 -(61, 68, -1) 29 -(61, 69, -1) 28 -(61, 70, -1) 27 -(61, 71, -1) 27 -(61, 72, -1) 26 -(61, 73, -1) 25 -(61, 74, -1) 24 -(61, 75, -1) 23 -(61, 76, -1) 22 -(61, 77, -1) 21 -(61, 78, -1) 20 -(61, 79, -1) 19 -(61, 80, -1) 18 -(61, 81, -1) 17 -(61, 82, -1) 16 -(61, 83, -1) 16 -(61, 84, -1) 15 -(61, 85, -1) 14 -(61, 86, -1) 13 -(61, 87, -1) 12 -(61, 88, -1) 11 -(61, 89, -1) 10 -(61, 90, -1) 9 -(61, 91, -1) 8 -(61, 92, -1) 7 -(61, 93, -1) 6 -(61, 94, -1) 5 -(61, 95, -1) 4 -(61, 96, -1) 3 -(61, 97, -1) 2 -(62, 4, -1) 2 -(62, 5, -1) 3 -(62, 6, -1) 4 -(62, 7, -1) 5 -(62, 8, -1) 6 -(62, 9, -1) 7 -(62, 10, -1) 8 -(62, 11, -1) 9 -(62, 12, -1) 9 -(62, 13, -1) 10 -(62, 14, -1) 11 -(62, 15, -1) 12 -(62, 16, -1) 13 -(62, 17, -1) 14 -(62, 18, -1) 15 -(62, 19, -1) 16 -(62, 20, -1) 17 -(62, 21, -1) 18 -(62, 22, -1) 19 -(62, 23, -1) 20 -(62, 24, -1) 21 -(62, 25, -1) 22 -(62, 26, -1) 23 -(62, 27, -1) 23 -(62, 28, -1) 24 -(62, 29, -1) 25 -(62, 30, -1) 26 -(62, 31, -1) 27 -(62, 32, -1) 28 -(62, 33, -1) 29 -(62, 34, -1) 29 -(62, 35, -1) 30 -(62, 36, -1) 31 -(62, 37, -1) 32 -(62, 38, -1) 33 -(62, 39, -1) 33 -(62, 40, -1) 34 -(62, 41, -1) 35 -(62, 42, -1) 35 -(62, 43, -1) 36 -(62, 44, -1) 36 -(62, 45, -1) 37 -(62, 46, -1) 37 -(62, 47, -1) 37 -(62, 48, -1) 38 -(62, 49, -1) 38 -(62, 50, -1) 38 -(62, 51, -1) 38 -(62, 52, -1) 38 -(62, 53, -1) 38 -(62, 54, -1) 37 -(62, 55, -1) 37 -(62, 56, -1) 37 -(62, 57, -1) 36 -(62, 58, -1) 36 -(62, 59, -1) 35 -(62, 60, -1) 35 -(62, 61, -1) 34 -(62, 62, -1) 33 -(62, 63, -1) 33 -(62, 64, -1) 32 -(62, 65, -1) 31 -(62, 66, -1) 30 -(62, 67, -1) 29 -(62, 68, -1) 29 -(62, 69, -1) 28 -(62, 70, -1) 27 -(62, 71, -1) 26 -(62, 72, -1) 25 -(62, 73, -1) 24 -(62, 74, -1) 23 -(62, 75, -1) 23 -(62, 76, -1) 22 -(62, 77, -1) 21 -(62, 78, -1) 20 -(62, 79, -1) 19 -(62, 80, -1) 18 -(62, 81, -1) 17 -(62, 82, -1) 16 -(62, 83, -1) 15 -(62, 84, -1) 14 -(62, 85, -1) 13 -(62, 86, -1) 12 -(62, 87, -1) 11 -(62, 88, -1) 10 -(62, 89, -1) 9 -(62, 90, -1) 9 -(62, 91, -1) 8 -(62, 92, -1) 7 -(62, 93, -1) 6 -(62, 94, -1) 5 -(62, 95, -1) 4 -(62, 96, -1) 3 -(62, 97, -1) 2 -(63, 4, -1) 2 -(63, 5, -1) 3 -(63, 6, -1) 3 -(63, 7, -1) 4 -(63, 8, -1) 5 -(63, 9, -1) 6 -(63, 10, -1) 7 -(63, 11, -1) 8 -(63, 12, -1) 9 -(63, 13, -1) 10 -(63, 14, -1) 11 -(63, 15, -1) 12 -(63, 16, -1) 13 -(63, 17, -1) 14 -(63, 18, -1) 15 -(63, 19, -1) 16 -(63, 20, -1) 17 -(63, 21, -1) 18 -(63, 22, -1) 18 -(63, 23, -1) 19 -(63, 24, -1) 20 -(63, 25, -1) 21 -(63, 26, -1) 22 -(63, 27, -1) 23 -(63, 28, -1) 24 -(63, 29, -1) 25 -(63, 30, -1) 26 -(63, 31, -1) 26 -(63, 32, -1) 27 -(63, 33, -1) 28 -(63, 34, -1) 29 -(63, 35, -1) 30 -(63, 36, -1) 30 -(63, 37, -1) 31 -(63, 38, -1) 32 -(63, 39, -1) 33 -(63, 40, -1) 33 -(63, 41, -1) 34 -(63, 42, -1) 34 -(63, 43, -1) 35 -(63, 44, -1) 35 -(63, 45, -1) 36 -(63, 46, -1) 36 -(63, 47, -1) 37 -(63, 48, -1) 37 -(63, 49, -1) 37 -(63, 50, -1) 37 -(63, 51, -1) 37 -(63, 52, -1) 37 -(63, 53, -1) 37 -(63, 54, -1) 37 -(63, 55, -1) 36 -(63, 56, -1) 36 -(63, 57, -1) 35 -(63, 58, -1) 35 -(63, 59, -1) 34 -(63, 60, -1) 34 -(63, 61, -1) 33 -(63, 62, -1) 33 -(63, 63, -1) 32 -(63, 64, -1) 31 -(63, 65, -1) 30 -(63, 66, -1) 30 -(63, 67, -1) 29 -(63, 68, -1) 28 -(63, 69, -1) 27 -(63, 70, -1) 26 -(63, 71, -1) 26 -(63, 72, -1) 25 -(63, 73, -1) 24 -(63, 74, -1) 23 -(63, 75, -1) 22 -(63, 76, -1) 21 -(63, 77, -1) 20 -(63, 78, -1) 19 -(63, 79, -1) 18 -(63, 80, -1) 18 -(63, 81, -1) 17 -(63, 82, -1) 16 -(63, 83, -1) 15 -(63, 84, -1) 14 -(63, 85, -1) 13 -(63, 86, -1) 12 -(63, 87, -1) 11 -(63, 88, -1) 10 -(63, 89, -1) 9 -(63, 90, -1) 8 -(63, 91, -1) 7 -(63, 92, -1) 6 -(63, 93, -1) 5 -(63, 94, -1) 4 -(63, 95, -1) 3 -(63, 96, -1) 3 -(63, 97, -1) 2 -(64, 4, -1) 1 -(64, 5, -1) 2 -(64, 6, -1) 3 -(64, 7, -1) 4 -(64, 8, -1) 5 -(64, 9, -1) 6 -(64, 10, -1) 7 -(64, 11, -1) 8 -(64, 12, -1) 9 -(64, 13, -1) 10 -(64, 14, -1) 11 -(64, 15, -1) 12 -(64, 16, -1) 13 -(64, 17, -1) 14 -(64, 18, -1) 14 -(64, 19, -1) 15 -(64, 20, -1) 16 -(64, 21, -1) 17 -(64, 22, -1) 18 -(64, 23, -1) 19 -(64, 24, -1) 20 -(64, 25, -1) 21 -(64, 26, -1) 22 -(64, 27, -1) 22 -(64, 28, -1) 23 -(64, 29, -1) 24 -(64, 30, -1) 25 -(64, 31, -1) 26 -(64, 32, -1) 27 -(64, 33, -1) 27 -(64, 34, -1) 28 -(64, 35, -1) 29 -(64, 36, -1) 30 -(64, 37, -1) 30 -(64, 38, -1) 31 -(64, 39, -1) 32 -(64, 40, -1) 32 -(64, 41, -1) 33 -(64, 42, -1) 34 -(64, 43, -1) 34 -(64, 44, -1) 35 -(64, 45, -1) 35 -(64, 46, -1) 35 -(64, 47, -1) 36 -(64, 48, -1) 36 -(64, 49, -1) 36 -(64, 50, -1) 36 -(64, 51, -1) 36 -(64, 52, -1) 36 -(64, 53, -1) 36 -(64, 54, -1) 36 -(64, 55, -1) 35 -(64, 56, -1) 35 -(64, 57, -1) 35 -(64, 58, -1) 34 -(64, 59, -1) 34 -(64, 60, -1) 33 -(64, 61, -1) 32 -(64, 62, -1) 32 -(64, 63, -1) 31 -(64, 64, -1) 30 -(64, 65, -1) 30 -(64, 66, -1) 29 -(64, 67, -1) 28 -(64, 68, -1) 27 -(64, 69, -1) 27 -(64, 70, -1) 26 -(64, 71, -1) 25 -(64, 72, -1) 24 -(64, 73, -1) 23 -(64, 74, -1) 22 -(64, 75, -1) 22 -(64, 76, -1) 21 -(64, 77, -1) 20 -(64, 78, -1) 19 -(64, 79, -1) 18 -(64, 80, -1) 17 -(64, 81, -1) 16 -(64, 82, -1) 15 -(64, 83, -1) 14 -(64, 84, -1) 14 -(64, 85, -1) 13 -(64, 86, -1) 12 -(64, 87, -1) 11 -(64, 88, -1) 10 -(64, 89, -1) 9 -(64, 90, -1) 8 -(64, 91, -1) 7 -(64, 92, -1) 6 -(64, 93, -1) 5 -(64, 94, -1) 4 -(64, 95, -1) 3 -(64, 96, -1) 2 -(64, 97, -1) 1 -(65, 4, -1) 1 -(65, 5, -1) 2 -(65, 6, -1) 3 -(65, 7, -1) 4 -(65, 8, -1) 5 -(65, 9, -1) 6 -(65, 10, -1) 7 -(65, 11, -1) 8 -(65, 12, -1) 8 -(65, 13, -1) 9 -(65, 14, -1) 10 -(65, 15, -1) 11 -(65, 16, -1) 12 -(65, 17, -1) 13 -(65, 18, -1) 14 -(65, 19, -1) 15 -(65, 20, -1) 16 -(65, 21, -1) 17 -(65, 22, -1) 18 -(65, 23, -1) 19 -(65, 24, -1) 19 -(65, 25, -1) 20 -(65, 26, -1) 21 -(65, 27, -1) 22 -(65, 28, -1) 23 -(65, 29, -1) 24 -(65, 30, -1) 24 -(65, 31, -1) 25 -(65, 32, -1) 26 -(65, 33, -1) 27 -(65, 34, -1) 28 -(65, 35, -1) 28 -(65, 36, -1) 29 -(65, 37, -1) 30 -(65, 38, -1) 30 -(65, 39, -1) 31 -(65, 40, -1) 32 -(65, 41, -1) 32 -(65, 42, -1) 33 -(65, 43, -1) 33 -(65, 44, -1) 34 -(65, 45, -1) 34 -(65, 46, -1) 34 -(65, 47, -1) 35 -(65, 48, -1) 35 -(65, 49, -1) 35 -(65, 50, -1) 35 -(65, 51, -1) 35 -(65, 52, -1) 35 -(65, 53, -1) 35 -(65, 54, -1) 35 -(65, 55, -1) 34 -(65, 56, -1) 34 -(65, 57, -1) 34 -(65, 58, -1) 33 -(65, 59, -1) 33 -(65, 60, -1) 32 -(65, 61, -1) 32 -(65, 62, -1) 31 -(65, 63, -1) 30 -(65, 64, -1) 30 -(65, 65, -1) 29 -(65, 66, -1) 28 -(65, 67, -1) 28 -(65, 68, -1) 27 -(65, 69, -1) 26 -(65, 70, -1) 25 -(65, 71, -1) 24 -(65, 72, -1) 24 -(65, 73, -1) 23 -(65, 74, -1) 22 -(65, 75, -1) 21 -(65, 76, -1) 20 -(65, 77, -1) 19 -(65, 78, -1) 19 -(65, 79, -1) 18 -(65, 80, -1) 17 -(65, 81, -1) 16 -(65, 82, -1) 15 -(65, 83, -1) 14 -(65, 84, -1) 13 -(65, 85, -1) 12 -(65, 86, -1) 11 -(65, 87, -1) 10 -(65, 88, -1) 9 -(65, 89, -1) 8 -(65, 90, -1) 8 -(65, 91, -1) 7 -(65, 92, -1) 6 -(65, 93, -1) 5 -(65, 94, -1) 4 -(65, 95, -1) 3 -(65, 96, -1) 2 -(65, 97, -1) 1 -(66, 6, -1) 3 -(66, 7, -1) 4 -(66, 8, -1) 5 -(66, 9, -1) 6 -(66, 10, -1) 6 -(66, 11, -1) 7 -(66, 12, -1) 8 -(66, 13, -1) 9 -(66, 14, -1) 10 -(66, 15, -1) 11 -(66, 16, -1) 12 -(66, 17, -1) 13 -(66, 18, -1) 14 -(66, 19, -1) 15 -(66, 20, -1) 16 -(66, 21, -1) 16 -(66, 22, -1) 17 -(66, 23, -1) 18 -(66, 24, -1) 19 -(66, 25, -1) 20 -(66, 26, -1) 21 -(66, 27, -1) 21 -(66, 28, -1) 22 -(66, 29, -1) 23 -(66, 30, -1) 24 -(66, 31, -1) 25 -(66, 32, -1) 25 -(66, 33, -1) 26 -(66, 34, -1) 27 -(66, 35, -1) 28 -(66, 36, -1) 28 -(66, 37, -1) 29 -(66, 38, -1) 30 -(66, 39, -1) 30 -(66, 40, -1) 31 -(66, 41, -1) 31 -(66, 42, -1) 32 -(66, 43, -1) 32 -(66, 44, -1) 33 -(66, 45, -1) 33 -(66, 46, -1) 33 -(66, 47, -1) 34 -(66, 48, -1) 34 -(66, 49, -1) 34 -(66, 50, -1) 34 -(66, 51, -1) 34 -(66, 52, -1) 34 -(66, 53, -1) 34 -(66, 54, -1) 34 -(66, 55, -1) 33 -(66, 56, -1) 33 -(66, 57, -1) 33 -(66, 58, -1) 32 -(66, 59, -1) 32 -(66, 60, -1) 31 -(66, 61, -1) 31 -(66, 62, -1) 30 -(66, 63, -1) 30 -(66, 64, -1) 29 -(66, 65, -1) 28 -(66, 66, -1) 28 -(66, 67, -1) 27 -(66, 68, -1) 26 -(66, 69, -1) 25 -(66, 70, -1) 25 -(66, 71, -1) 24 -(66, 72, -1) 23 -(66, 73, -1) 22 -(66, 74, -1) 21 -(66, 75, -1) 21 -(66, 76, -1) 20 -(66, 77, -1) 19 -(66, 78, -1) 18 -(66, 79, -1) 17 -(66, 80, -1) 16 -(66, 81, -1) 16 -(66, 82, -1) 15 -(66, 83, -1) 14 -(66, 84, -1) 13 -(66, 85, -1) 12 -(66, 86, -1) 11 -(66, 87, -1) 10 -(66, 88, -1) 9 -(66, 89, -1) 8 -(66, 90, -1) 7 -(66, 91, -1) 6 -(66, 92, -1) 6 -(66, 93, -1) 5 -(66, 94, -1) 4 -(66, 95, -1) 3 -(67, 6, -1) 2 -(67, 7, -1) 3 -(67, 8, -1) 4 -(67, 9, -1) 5 -(67, 10, -1) 6 -(67, 11, -1) 7 -(67, 12, -1) 8 -(67, 13, -1) 9 -(67, 14, -1) 10 -(67, 15, -1) 11 -(67, 16, -1) 11 -(67, 17, -1) 12 -(67, 18, -1) 13 -(67, 19, -1) 14 -(67, 20, -1) 15 -(67, 21, -1) 16 -(67, 22, -1) 17 -(67, 23, -1) 18 -(67, 24, -1) 18 -(67, 25, -1) 19 -(67, 26, -1) 20 -(67, 27, -1) 21 -(67, 28, -1) 22 -(67, 29, -1) 23 -(67, 30, -1) 23 -(67, 31, -1) 24 -(67, 32, -1) 25 -(67, 33, -1) 26 -(67, 34, -1) 26 -(67, 35, -1) 27 -(67, 36, -1) 28 -(67, 37, -1) 28 -(67, 38, -1) 29 -(67, 39, -1) 29 -(67, 40, -1) 30 -(67, 41, -1) 30 -(67, 42, -1) 31 -(67, 43, -1) 31 -(67, 44, -1) 32 -(67, 45, -1) 32 -(67, 46, -1) 32 -(67, 47, -1) 33 -(67, 48, -1) 33 -(67, 49, -1) 33 -(67, 50, -1) 33 -(67, 51, -1) 33 -(67, 52, -1) 33 -(67, 53, -1) 33 -(67, 54, -1) 33 -(67, 55, -1) 32 -(67, 56, -1) 32 -(67, 57, -1) 32 -(67, 58, -1) 31 -(67, 59, -1) 31 -(67, 60, -1) 30 -(67, 61, -1) 30 -(67, 62, -1) 29 -(67, 63, -1) 29 -(67, 64, -1) 28 -(67, 65, -1) 28 -(67, 66, -1) 27 -(67, 67, -1) 26 -(67, 68, -1) 26 -(67, 69, -1) 25 -(67, 70, -1) 24 -(67, 71, -1) 23 -(67, 72, -1) 23 -(67, 73, -1) 22 -(67, 74, -1) 21 -(67, 75, -1) 20 -(67, 76, -1) 19 -(67, 77, -1) 18 -(67, 78, -1) 18 -(67, 79, -1) 17 -(67, 80, -1) 16 -(67, 81, -1) 15 -(67, 82, -1) 14 -(67, 83, -1) 13 -(67, 84, -1) 12 -(67, 85, -1) 11 -(67, 86, -1) 11 -(67, 87, -1) 10 -(67, 88, -1) 9 -(67, 89, -1) 8 -(67, 90, -1) 7 -(67, 91, -1) 6 -(67, 92, -1) 5 -(67, 93, -1) 4 -(67, 94, -1) 3 -(67, 95, -1) 2 -(68, 6, -1) 2 -(68, 7, -1) 3 -(68, 8, -1) 4 -(68, 9, -1) 5 -(68, 10, -1) 6 -(68, 11, -1) 7 -(68, 12, -1) 7 -(68, 13, -1) 8 -(68, 14, -1) 9 -(68, 15, -1) 10 -(68, 16, -1) 11 -(68, 17, -1) 12 -(68, 18, -1) 13 -(68, 19, -1) 14 -(68, 20, -1) 15 -(68, 21, -1) 15 -(68, 22, -1) 16 -(68, 23, -1) 17 -(68, 24, -1) 18 -(68, 25, -1) 19 -(68, 26, -1) 20 -(68, 27, -1) 20 -(68, 28, -1) 21 -(68, 29, -1) 22 -(68, 30, -1) 23 -(68, 31, -1) 23 -(68, 32, -1) 24 -(68, 33, -1) 25 -(68, 34, -1) 26 -(68, 35, -1) 26 -(68, 36, -1) 27 -(68, 37, -1) 27 -(68, 38, -1) 28 -(68, 39, -1) 29 -(68, 40, -1) 29 -(68, 41, -1) 30 -(68, 42, -1) 30 -(68, 43, -1) 30 -(68, 44, -1) 31 -(68, 45, -1) 31 -(68, 46, -1) 31 -(68, 47, -1) 32 -(68, 48, -1) 32 -(68, 49, -1) 32 -(68, 50, -1) 32 -(68, 51, -1) 32 -(68, 52, -1) 32 -(68, 53, -1) 32 -(68, 54, -1) 32 -(68, 55, -1) 31 -(68, 56, -1) 31 -(68, 57, -1) 31 -(68, 58, -1) 30 -(68, 59, -1) 30 -(68, 60, -1) 30 -(68, 61, -1) 29 -(68, 62, -1) 29 -(68, 63, -1) 28 -(68, 64, -1) 27 -(68, 65, -1) 27 -(68, 66, -1) 26 -(68, 67, -1) 26 -(68, 68, -1) 25 -(68, 69, -1) 24 -(68, 70, -1) 23 -(68, 71, -1) 23 -(68, 72, -1) 22 -(68, 73, -1) 21 -(68, 74, -1) 20 -(68, 75, -1) 20 -(68, 76, -1) 19 -(68, 77, -1) 18 -(68, 78, -1) 17 -(68, 79, -1) 16 -(68, 80, -1) 15 -(68, 81, -1) 15 -(68, 82, -1) 14 -(68, 83, -1) 13 -(68, 84, -1) 12 -(68, 85, -1) 11 -(68, 86, -1) 10 -(68, 87, -1) 9 -(68, 88, -1) 8 -(68, 89, -1) 7 -(68, 90, -1) 7 -(68, 91, -1) 6 -(68, 92, -1) 5 -(68, 93, -1) 4 -(68, 94, -1) 3 -(68, 95, -1) 2 -(69, 6, -1) 2 -(69, 7, -1) 2 -(69, 8, -1) 3 -(69, 9, -1) 4 -(69, 10, -1) 5 -(69, 11, -1) 6 -(69, 12, -1) 7 -(69, 13, -1) 8 -(69, 14, -1) 9 -(69, 15, -1) 10 -(69, 16, -1) 11 -(69, 17, -1) 11 -(69, 18, -1) 12 -(69, 19, -1) 13 -(69, 20, -1) 14 -(69, 21, -1) 15 -(69, 22, -1) 16 -(69, 23, -1) 17 -(69, 24, -1) 17 -(69, 25, -1) 18 -(69, 26, -1) 19 -(69, 27, -1) 20 -(69, 28, -1) 20 -(69, 29, -1) 21 -(69, 30, -1) 22 -(69, 31, -1) 23 -(69, 32, -1) 23 -(69, 33, -1) 24 -(69, 34, -1) 25 -(69, 35, -1) 25 -(69, 36, -1) 26 -(69, 37, -1) 27 -(69, 38, -1) 27 -(69, 39, -1) 28 -(69, 40, -1) 28 -(69, 41, -1) 29 -(69, 42, -1) 29 -(69, 43, -1) 30 -(69, 44, -1) 30 -(69, 45, -1) 30 -(69, 46, -1) 30 -(69, 47, -1) 31 -(69, 48, -1) 31 -(69, 49, -1) 31 -(69, 50, -1) 31 -(69, 51, -1) 31 -(69, 52, -1) 31 -(69, 53, -1) 31 -(69, 54, -1) 31 -(69, 55, -1) 30 -(69, 56, -1) 30 -(69, 57, -1) 30 -(69, 58, -1) 30 -(69, 59, -1) 29 -(69, 60, -1) 29 -(69, 61, -1) 28 -(69, 62, -1) 28 -(69, 63, -1) 27 -(69, 64, -1) 27 -(69, 65, -1) 26 -(69, 66, -1) 25 -(69, 67, -1) 25 -(69, 68, -1) 24 -(69, 69, -1) 23 -(69, 70, -1) 23 -(69, 71, -1) 22 -(69, 72, -1) 21 -(69, 73, -1) 20 -(69, 74, -1) 20 -(69, 75, -1) 19 -(69, 76, -1) 18 -(69, 77, -1) 17 -(69, 78, -1) 17 -(69, 79, -1) 16 -(69, 80, -1) 15 -(69, 81, -1) 14 -(69, 82, -1) 13 -(69, 83, -1) 12 -(69, 84, -1) 11 -(69, 85, -1) 11 -(69, 86, -1) 10 -(69, 87, -1) 9 -(69, 88, -1) 8 -(69, 89, -1) 7 -(69, 90, -1) 6 -(69, 91, -1) 5 -(69, 92, -1) 4 -(69, 93, -1) 3 -(69, 94, -1) 2 -(69, 95, -1) 2 -(70, 6, -1) 1 -(70, 7, -1) 2 -(70, 8, -1) 3 -(70, 9, -1) 4 -(70, 10, -1) 5 -(70, 11, -1) 6 -(70, 12, -1) 7 -(70, 13, -1) 7 -(70, 14, -1) 8 -(70, 15, -1) 9 -(70, 16, -1) 10 -(70, 17, -1) 11 -(70, 18, -1) 12 -(70, 19, -1) 13 -(70, 20, -1) 13 -(70, 21, -1) 14 -(70, 22, -1) 15 -(70, 23, -1) 16 -(70, 24, -1) 17 -(70, 25, -1) 18 -(70, 26, -1) 18 -(70, 27, -1) 19 -(70, 28, -1) 20 -(70, 29, -1) 21 -(70, 30, -1) 21 -(70, 31, -1) 22 -(70, 32, -1) 23 -(70, 33, -1) 23 -(70, 34, -1) 24 -(70, 35, -1) 25 -(70, 36, -1) 25 -(70, 37, -1) 26 -(70, 38, -1) 26 -(70, 39, -1) 27 -(70, 40, -1) 27 -(70, 41, -1) 28 -(70, 42, -1) 28 -(70, 43, -1) 29 -(70, 44, -1) 29 -(70, 45, -1) 29 -(70, 46, -1) 30 -(70, 47, -1) 30 -(70, 48, -1) 30 -(70, 49, -1) 30 -(70, 50, -1) 30 -(70, 51, -1) 30 -(70, 52, -1) 30 -(70, 53, -1) 30 -(70, 54, -1) 30 -(70, 55, -1) 30 -(70, 56, -1) 29 -(70, 57, -1) 29 -(70, 58, -1) 29 -(70, 59, -1) 28 -(70, 60, -1) 28 -(70, 61, -1) 27 -(70, 62, -1) 27 -(70, 63, -1) 26 -(70, 64, -1) 26 -(70, 65, -1) 25 -(70, 66, -1) 25 -(70, 67, -1) 24 -(70, 68, -1) 23 -(70, 69, -1) 23 -(70, 70, -1) 22 -(70, 71, -1) 21 -(70, 72, -1) 21 -(70, 73, -1) 20 -(70, 74, -1) 19 -(70, 75, -1) 18 -(70, 76, -1) 18 -(70, 77, -1) 17 -(70, 78, -1) 16 -(70, 79, -1) 15 -(70, 80, -1) 14 -(70, 81, -1) 13 -(70, 82, -1) 13 -(70, 83, -1) 12 -(70, 84, -1) 11 -(70, 85, -1) 10 -(70, 86, -1) 9 -(70, 87, -1) 8 -(70, 88, -1) 7 -(70, 89, -1) 7 -(70, 90, -1) 6 -(70, 91, -1) 5 -(70, 92, -1) 4 -(70, 93, -1) 3 -(70, 94, -1) 2 -(70, 95, -1) 1 -(71, 6, -1) 1 -(71, 7, -1) 2 -(71, 8, -1) 3 -(71, 9, -1) 4 -(71, 10, -1) 5 -(71, 11, -1) 5 -(71, 12, -1) 6 -(71, 13, -1) 7 -(71, 14, -1) 8 -(71, 15, -1) 9 -(71, 16, -1) 10 -(71, 17, -1) 11 -(71, 18, -1) 11 -(71, 19, -1) 12 -(71, 20, -1) 13 -(71, 21, -1) 14 -(71, 22, -1) 15 -(71, 23, -1) 15 -(71, 24, -1) 16 -(71, 25, -1) 17 -(71, 26, -1) 18 -(71, 27, -1) 19 -(71, 28, -1) 19 -(71, 29, -1) 20 -(71, 30, -1) 21 -(71, 31, -1) 21 -(71, 32, -1) 22 -(71, 33, -1) 23 -(71, 34, -1) 23 -(71, 35, -1) 24 -(71, 36, -1) 24 -(71, 37, -1) 25 -(71, 38, -1) 26 -(71, 39, -1) 26 -(71, 40, -1) 27 -(71, 41, -1) 27 -(71, 42, -1) 27 -(71, 43, -1) 28 -(71, 44, -1) 28 -(71, 45, -1) 28 -(71, 46, -1) 29 -(71, 47, -1) 29 -(71, 48, -1) 29 -(71, 49, -1) 29 -(71, 50, -1) 29 -(71, 51, -1) 29 -(71, 52, -1) 29 -(71, 53, -1) 29 -(71, 54, -1) 29 -(71, 55, -1) 29 -(71, 56, -1) 28 -(71, 57, -1) 28 -(71, 58, -1) 28 -(71, 59, -1) 27 -(71, 60, -1) 27 -(71, 61, -1) 27 -(71, 62, -1) 26 -(71, 63, -1) 26 -(71, 64, -1) 25 -(71, 65, -1) 24 -(71, 66, -1) 24 -(71, 67, -1) 23 -(71, 68, -1) 23 -(71, 69, -1) 22 -(71, 70, -1) 21 -(71, 71, -1) 21 -(71, 72, -1) 20 -(71, 73, -1) 19 -(71, 74, -1) 19 -(71, 75, -1) 18 -(71, 76, -1) 17 -(71, 77, -1) 16 -(71, 78, -1) 15 -(71, 79, -1) 15 -(71, 80, -1) 14 -(71, 81, -1) 13 -(71, 82, -1) 12 -(71, 83, -1) 11 -(71, 84, -1) 11 -(71, 85, -1) 10 -(71, 86, -1) 9 -(71, 87, -1) 8 -(71, 88, -1) 7 -(71, 89, -1) 6 -(71, 90, -1) 5 -(71, 91, -1) 5 -(71, 92, -1) 4 -(71, 93, -1) 3 -(71, 94, -1) 2 -(71, 95, -1) 1 -(72, 6, -1) 1 -(72, 7, -1) 1 -(72, 8, -1) 2 -(72, 9, -1) 3 -(72, 10, -1) 4 -(72, 11, -1) 5 -(72, 12, -1) 6 -(72, 13, -1) 7 -(72, 14, -1) 7 -(72, 15, -1) 8 -(72, 16, -1) 9 -(72, 17, -1) 10 -(72, 18, -1) 11 -(72, 19, -1) 12 -(72, 20, -1) 12 -(72, 21, -1) 13 -(72, 22, -1) 14 -(72, 23, -1) 15 -(72, 24, -1) 16 -(72, 25, -1) 16 -(72, 26, -1) 17 -(72, 27, -1) 18 -(72, 28, -1) 19 -(72, 29, -1) 19 -(72, 30, -1) 20 -(72, 31, -1) 21 -(72, 32, -1) 21 -(72, 33, -1) 22 -(72, 34, -1) 23 -(72, 35, -1) 23 -(72, 36, -1) 24 -(72, 37, -1) 24 -(72, 38, -1) 25 -(72, 39, -1) 25 -(72, 40, -1) 26 -(72, 41, -1) 26 -(72, 42, -1) 26 -(72, 43, -1) 27 -(72, 44, -1) 27 -(72, 45, -1) 27 -(72, 46, -1) 28 -(72, 47, -1) 28 -(72, 48, -1) 28 -(72, 49, -1) 28 -(72, 50, -1) 28 -(72, 51, -1) 28 -(72, 52, -1) 28 -(72, 53, -1) 28 -(72, 54, -1) 28 -(72, 55, -1) 28 -(72, 56, -1) 27 -(72, 57, -1) 27 -(72, 58, -1) 27 -(72, 59, -1) 26 -(72, 60, -1) 26 -(72, 61, -1) 26 -(72, 62, -1) 25 -(72, 63, -1) 25 -(72, 64, -1) 24 -(72, 65, -1) 24 -(72, 66, -1) 23 -(72, 67, -1) 23 -(72, 68, -1) 22 -(72, 69, -1) 21 -(72, 70, -1) 21 -(72, 71, -1) 20 -(72, 72, -1) 19 -(72, 73, -1) 19 -(72, 74, -1) 18 -(72, 75, -1) 17 -(72, 76, -1) 16 -(72, 77, -1) 16 -(72, 78, -1) 15 -(72, 79, -1) 14 -(72, 80, -1) 13 -(72, 81, -1) 12 -(72, 82, -1) 12 -(72, 83, -1) 11 -(72, 84, -1) 10 -(72, 85, -1) 9 -(72, 86, -1) 8 -(72, 87, -1) 7 -(72, 88, -1) 7 -(72, 89, -1) 6 -(72, 90, -1) 5 -(72, 91, -1) 4 -(72, 92, -1) 3 -(72, 93, -1) 2 -(72, 94, -1) 1 -(72, 95, -1) 1 -(73, 6, -1) 0 -(73, 7, -1) 1 -(73, 8, -1) 2 -(73, 9, -1) 3 -(73, 10, -1) 4 -(73, 11, -1) 4 -(73, 12, -1) 5 -(73, 13, -1) 6 -(73, 14, -1) 7 -(73, 15, -1) 8 -(73, 16, -1) 9 -(73, 17, -1) 9 -(73, 18, -1) 10 -(73, 19, -1) 11 -(73, 20, -1) 12 -(73, 21, -1) 13 -(73, 22, -1) 13 -(73, 23, -1) 14 -(73, 24, -1) 15 -(73, 25, -1) 16 -(73, 26, -1) 16 -(73, 27, -1) 17 -(73, 28, -1) 18 -(73, 29, -1) 19 -(73, 30, -1) 19 -(73, 31, -1) 20 -(73, 32, -1) 20 -(73, 33, -1) 21 -(73, 34, -1) 22 -(73, 35, -1) 22 -(73, 36, -1) 23 -(73, 37, -1) 23 -(73, 38, -1) 24 -(73, 39, -1) 24 -(73, 40, -1) 25 -(73, 41, -1) 25 -(73, 42, -1) 25 -(73, 43, -1) 26 -(73, 44, -1) 26 -(73, 45, -1) 26 -(73, 46, -1) 27 -(73, 47, -1) 27 -(73, 48, -1) 27 -(73, 49, -1) 27 -(73, 50, -1) 27 -(73, 51, -1) 27 -(73, 52, -1) 27 -(73, 53, -1) 27 -(73, 54, -1) 27 -(73, 55, -1) 27 -(73, 56, -1) 26 -(73, 57, -1) 26 -(73, 58, -1) 26 -(73, 59, -1) 25 -(73, 60, -1) 25 -(73, 61, -1) 25 -(73, 62, -1) 24 -(73, 63, -1) 24 -(73, 64, -1) 23 -(73, 65, -1) 23 -(73, 66, -1) 22 -(73, 67, -1) 22 -(73, 68, -1) 21 -(73, 69, -1) 20 -(73, 70, -1) 20 -(73, 71, -1) 19 -(73, 72, -1) 19 -(73, 73, -1) 18 -(73, 74, -1) 17 -(73, 75, -1) 16 -(73, 76, -1) 16 -(73, 77, -1) 15 -(73, 78, -1) 14 -(73, 79, -1) 13 -(73, 80, -1) 13 -(73, 81, -1) 12 -(73, 82, -1) 11 -(73, 83, -1) 10 -(73, 84, -1) 9 -(73, 85, -1) 9 -(73, 86, -1) 8 -(73, 87, -1) 7 -(73, 88, -1) 6 -(73, 89, -1) 5 -(73, 90, -1) 4 -(73, 91, -1) 4 -(73, 92, -1) 3 -(73, 93, -1) 2 -(73, 94, -1) 1 -(73, 95, -1) 0 -(74, 6, -1) 0 -(74, 7, -1) 0 -(74, 8, -1) 1 -(74, 9, -1) 2 -(74, 10, -1) 3 -(74, 11, -1) 4 -(74, 12, -1) 5 -(74, 13, -1) 6 -(74, 14, -1) 6 -(74, 15, -1) 7 -(74, 16, -1) 8 -(74, 17, -1) 9 -(74, 18, -1) 10 -(74, 19, -1) 10 -(74, 20, -1) 11 -(74, 21, -1) 12 -(74, 22, -1) 13 -(74, 23, -1) 14 -(74, 24, -1) 14 -(74, 25, -1) 15 -(74, 26, -1) 16 -(74, 27, -1) 16 -(74, 28, -1) 17 -(74, 29, -1) 18 -(74, 30, -1) 18 -(74, 31, -1) 19 -(74, 32, -1) 20 -(74, 33, -1) 20 -(74, 34, -1) 21 -(74, 35, -1) 21 -(74, 36, -1) 22 -(74, 37, -1) 22 -(74, 38, -1) 23 -(74, 39, -1) 23 -(74, 40, -1) 24 -(74, 41, -1) 24 -(74, 42, -1) 25 -(74, 43, -1) 25 -(74, 44, -1) 25 -(74, 45, -1) 25 -(74, 46, -1) 26 -(74, 47, -1) 26 -(74, 48, -1) 26 -(74, 49, -1) 26 -(74, 50, -1) 26 -(74, 51, -1) 26 -(74, 52, -1) 26 -(74, 53, -1) 26 -(74, 54, -1) 26 -(74, 55, -1) 26 -(74, 56, -1) 25 -(74, 57, -1) 25 -(74, 58, -1) 25 -(74, 59, -1) 25 -(74, 60, -1) 24 -(74, 61, -1) 24 -(74, 62, -1) 23 -(74, 63, -1) 23 -(74, 64, -1) 22 -(74, 65, -1) 22 -(74, 66, -1) 21 -(74, 67, -1) 21 -(74, 68, -1) 20 -(74, 69, -1) 20 -(74, 70, -1) 19 -(74, 71, -1) 18 -(74, 72, -1) 18 -(74, 73, -1) 17 -(74, 74, -1) 16 -(74, 75, -1) 16 -(74, 76, -1) 15 -(74, 77, -1) 14 -(74, 78, -1) 14 -(74, 79, -1) 13 -(74, 80, -1) 12 -(74, 81, -1) 11 -(74, 82, -1) 10 -(74, 83, -1) 10 -(74, 84, -1) 9 -(74, 85, -1) 8 -(74, 86, -1) 7 -(74, 87, -1) 6 -(74, 88, -1) 6 -(74, 89, -1) 5 -(74, 90, -1) 4 -(74, 91, -1) 3 -(74, 92, -1) 2 -(74, 93, -1) 1 -(74, 94, -1) 0 -(74, 95, -1) 0 -(75, 6, -1) 0 -(75, 7, -1) 0 -(75, 8, -1) 1 -(75, 9, -1) 2 -(75, 10, -1) 3 -(75, 11, -1) 3 -(75, 12, -1) 4 -(75, 13, -1) 5 -(75, 14, -1) 6 -(75, 15, -1) 7 -(75, 16, -1) 7 -(75, 17, -1) 8 -(75, 18, -1) 9 -(75, 19, -1) 10 -(75, 20, -1) 11 -(75, 21, -1) 11 -(75, 22, -1) 12 -(75, 23, -1) 13 -(75, 24, -1) 14 -(75, 25, -1) 14 -(75, 26, -1) 15 -(75, 27, -1) 16 -(75, 28, -1) 16 -(75, 29, -1) 17 -(75, 30, -1) 18 -(75, 31, -1) 18 -(75, 32, -1) 19 -(75, 33, -1) 19 -(75, 34, -1) 20 -(75, 35, -1) 21 -(75, 36, -1) 21 -(75, 37, -1) 22 -(75, 38, -1) 22 -(75, 39, -1) 22 -(75, 40, -1) 23 -(75, 41, -1) 23 -(75, 42, -1) 24 -(75, 43, -1) 24 -(75, 44, -1) 24 -(75, 45, -1) 24 -(75, 46, -1) 25 -(75, 47, -1) 25 -(75, 48, -1) 25 -(75, 49, -1) 25 -(75, 50, -1) 25 -(75, 51, -1) 25 -(75, 52, -1) 25 -(75, 53, -1) 25 -(75, 54, -1) 25 -(75, 55, -1) 25 -(75, 56, -1) 24 -(75, 57, -1) 24 -(75, 58, -1) 24 -(75, 59, -1) 24 -(75, 60, -1) 23 -(75, 61, -1) 23 -(75, 62, -1) 22 -(75, 63, -1) 22 -(75, 64, -1) 22 -(75, 65, -1) 21 -(75, 66, -1) 21 -(75, 67, -1) 20 -(75, 68, -1) 19 -(75, 69, -1) 19 -(75, 70, -1) 18 -(75, 71, -1) 18 -(75, 72, -1) 17 -(75, 73, -1) 16 -(75, 74, -1) 16 -(75, 75, -1) 15 -(75, 76, -1) 14 -(75, 77, -1) 14 -(75, 78, -1) 13 -(75, 79, -1) 12 -(75, 80, -1) 11 -(75, 81, -1) 11 -(75, 82, -1) 10 -(75, 83, -1) 9 -(75, 84, -1) 8 -(75, 85, -1) 7 -(75, 86, -1) 7 -(75, 87, -1) 6 -(75, 88, -1) 5 -(75, 89, -1) 4 -(75, 90, -1) 3 -(75, 91, -1) 3 -(75, 92, -1) 2 -(75, 93, -1) 1 -(75, 94, -1) 0 -(75, 95, -1) 0 -(76, 9, -1) 1 -(76, 10, -1) 2 -(76, 11, -1) 3 -(76, 12, -1) 4 -(76, 13, -1) 5 -(76, 14, -1) 5 -(76, 15, -1) 6 -(76, 16, -1) 7 -(76, 17, -1) 8 -(76, 18, -1) 9 -(76, 19, -1) 9 -(76, 20, -1) 10 -(76, 21, -1) 11 -(76, 22, -1) 12 -(76, 23, -1) 12 -(76, 24, -1) 13 -(76, 25, -1) 14 -(76, 26, -1) 14 -(76, 27, -1) 15 -(76, 28, -1) 16 -(76, 29, -1) 16 -(76, 30, -1) 17 -(76, 31, -1) 18 -(76, 32, -1) 18 -(76, 33, -1) 19 -(76, 34, -1) 19 -(76, 35, -1) 20 -(76, 36, -1) 20 -(76, 37, -1) 21 -(76, 38, -1) 21 -(76, 39, -1) 22 -(76, 40, -1) 22 -(76, 41, -1) 22 -(76, 42, -1) 23 -(76, 43, -1) 23 -(76, 44, -1) 23 -(76, 45, -1) 23 -(76, 46, -1) 24 -(76, 47, -1) 24 -(76, 48, -1) 24 -(76, 49, -1) 24 -(76, 50, -1) 24 -(76, 51, -1) 24 -(76, 52, -1) 24 -(76, 53, -1) 24 -(76, 54, -1) 24 -(76, 55, -1) 24 -(76, 56, -1) 23 -(76, 57, -1) 23 -(76, 58, -1) 23 -(76, 59, -1) 23 -(76, 60, -1) 22 -(76, 61, -1) 22 -(76, 62, -1) 22 -(76, 63, -1) 21 -(76, 64, -1) 21 -(76, 65, -1) 20 -(76, 66, -1) 20 -(76, 67, -1) 19 -(76, 68, -1) 19 -(76, 69, -1) 18 -(76, 70, -1) 18 -(76, 71, -1) 17 -(76, 72, -1) 16 -(76, 73, -1) 16 -(76, 74, -1) 15 -(76, 75, -1) 14 -(76, 76, -1) 14 -(76, 77, -1) 13 -(76, 78, -1) 12 -(76, 79, -1) 12 -(76, 80, -1) 11 -(76, 81, -1) 10 -(76, 82, -1) 9 -(76, 83, -1) 9 -(76, 84, -1) 8 -(76, 85, -1) 7 -(76, 86, -1) 6 -(76, 87, -1) 5 -(76, 88, -1) 5 -(76, 89, -1) 4 -(76, 90, -1) 3 -(76, 91, -1) 2 -(76, 92, -1) 1 -(77, 9, -1) 1 -(77, 10, -1) 2 -(77, 11, -1) 2 -(77, 12, -1) 3 -(77, 13, -1) 4 -(77, 14, -1) 5 -(77, 15, -1) 6 -(77, 16, -1) 6 -(77, 17, -1) 7 -(77, 18, -1) 8 -(77, 19, -1) 9 -(77, 20, -1) 9 -(77, 21, -1) 10 -(77, 22, -1) 11 -(77, 23, -1) 12 -(77, 24, -1) 12 -(77, 25, -1) 13 -(77, 26, -1) 14 -(77, 27, -1) 14 -(77, 28, -1) 15 -(77, 29, -1) 16 -(77, 30, -1) 16 -(77, 31, -1) 17 -(77, 32, -1) 17 -(77, 33, -1) 18 -(77, 34, -1) 18 -(77, 35, -1) 19 -(77, 36, -1) 19 -(77, 37, -1) 20 -(77, 38, -1) 20 -(77, 39, -1) 21 -(77, 40, -1) 21 -(77, 41, -1) 21 -(77, 42, -1) 22 -(77, 43, -1) 22 -(77, 44, -1) 22 -(77, 45, -1) 22 -(77, 46, -1) 23 -(77, 47, -1) 23 -(77, 48, -1) 23 -(77, 49, -1) 23 -(77, 50, -1) 23 -(77, 51, -1) 23 -(77, 52, -1) 23 -(77, 53, -1) 23 -(77, 54, -1) 23 -(77, 55, -1) 23 -(77, 56, -1) 22 -(77, 57, -1) 22 -(77, 58, -1) 22 -(77, 59, -1) 22 -(77, 60, -1) 21 -(77, 61, -1) 21 -(77, 62, -1) 21 -(77, 63, -1) 20 -(77, 64, -1) 20 -(77, 65, -1) 19 -(77, 66, -1) 19 -(77, 67, -1) 18 -(77, 68, -1) 18 -(77, 69, -1) 17 -(77, 70, -1) 17 -(77, 71, -1) 16 -(77, 72, -1) 16 -(77, 73, -1) 15 -(77, 74, -1) 14 -(77, 75, -1) 14 -(77, 76, -1) 13 -(77, 77, -1) 12 -(77, 78, -1) 12 -(77, 79, -1) 11 -(77, 80, -1) 10 -(77, 81, -1) 9 -(77, 82, -1) 9 -(77, 83, -1) 8 -(77, 84, -1) 7 -(77, 85, -1) 6 -(77, 86, -1) 6 -(77, 87, -1) 5 -(77, 88, -1) 4 -(77, 89, -1) 3 -(77, 90, -1) 2 -(77, 91, -1) 2 -(77, 92, -1) 1 -(78, 9, -1) 0 -(78, 10, -1) 1 -(78, 11, -1) 2 -(78, 12, -1) 3 -(78, 13, -1) 3 -(78, 14, -1) 4 -(78, 15, -1) 5 -(78, 16, -1) 6 -(78, 17, -1) 7 -(78, 18, -1) 7 -(78, 19, -1) 8 -(78, 20, -1) 9 -(78, 21, -1) 9 -(78, 22, -1) 10 -(78, 23, -1) 11 -(78, 24, -1) 12 -(78, 25, -1) 12 -(78, 26, -1) 13 -(78, 27, -1) 14 -(78, 28, -1) 14 -(78, 29, -1) 15 -(78, 30, -1) 15 -(78, 31, -1) 16 -(78, 32, -1) 17 -(78, 33, -1) 17 -(78, 34, -1) 18 -(78, 35, -1) 18 -(78, 36, -1) 19 -(78, 37, -1) 19 -(78, 38, -1) 19 -(78, 39, -1) 20 -(78, 40, -1) 20 -(78, 41, -1) 20 -(78, 42, -1) 21 -(78, 43, -1) 21 -(78, 44, -1) 21 -(78, 45, -1) 21 -(78, 46, -1) 22 -(78, 47, -1) 22 -(78, 48, -1) 22 -(78, 49, -1) 22 -(78, 50, -1) 22 -(78, 51, -1) 22 -(78, 52, -1) 22 -(78, 53, -1) 22 -(78, 54, -1) 22 -(78, 55, -1) 22 -(78, 56, -1) 21 -(78, 57, -1) 21 -(78, 58, -1) 21 -(78, 59, -1) 21 -(78, 60, -1) 20 -(78, 61, -1) 20 -(78, 62, -1) 20 -(78, 63, -1) 19 -(78, 64, -1) 19 -(78, 65, -1) 19 -(78, 66, -1) 18 -(78, 67, -1) 18 -(78, 68, -1) 17 -(78, 69, -1) 17 -(78, 70, -1) 16 -(78, 71, -1) 15 -(78, 72, -1) 15 -(78, 73, -1) 14 -(78, 74, -1) 14 -(78, 75, -1) 13 -(78, 76, -1) 12 -(78, 77, -1) 12 -(78, 78, -1) 11 -(78, 79, -1) 10 -(78, 80, -1) 9 -(78, 81, -1) 9 -(78, 82, -1) 8 -(78, 83, -1) 7 -(78, 84, -1) 7 -(78, 85, -1) 6 -(78, 86, -1) 5 -(78, 87, -1) 4 -(78, 88, -1) 3 -(78, 89, -1) 3 -(78, 90, -1) 2 -(78, 91, -1) 1 -(78, 92, -1) 0 -(79, 9, -1) 0 -(79, 10, -1) 1 -(79, 11, -1) 1 -(79, 12, -1) 2 -(79, 13, -1) 3 -(79, 14, -1) 4 -(79, 15, -1) 4 -(79, 16, -1) 5 -(79, 17, -1) 6 -(79, 18, -1) 7 -(79, 19, -1) 7 -(79, 20, -1) 8 -(79, 21, -1) 9 -(79, 22, -1) 9 -(79, 23, -1) 10 -(79, 24, -1) 11 -(79, 25, -1) 12 -(79, 26, -1) 12 -(79, 27, -1) 13 -(79, 28, -1) 13 -(79, 29, -1) 14 -(79, 30, -1) 15 -(79, 31, -1) 15 -(79, 32, -1) 16 -(79, 33, -1) 16 -(79, 34, -1) 17 -(79, 35, -1) 17 -(79, 36, -1) 18 -(79, 37, -1) 18 -(79, 38, -1) 18 -(79, 39, -1) 19 -(79, 40, -1) 19 -(79, 41, -1) 20 -(79, 42, -1) 20 -(79, 43, -1) 20 -(79, 44, -1) 20 -(79, 45, -1) 20 -(79, 46, -1) 21 -(79, 47, -1) 21 -(79, 48, -1) 21 -(79, 49, -1) 21 -(79, 50, -1) 21 -(79, 51, -1) 21 -(79, 52, -1) 21 -(79, 53, -1) 21 -(79, 54, -1) 21 -(79, 55, -1) 21 -(79, 56, -1) 20 -(79, 57, -1) 20 -(79, 58, -1) 20 -(79, 59, -1) 20 -(79, 60, -1) 20 -(79, 61, -1) 19 -(79, 62, -1) 19 -(79, 63, -1) 18 -(79, 64, -1) 18 -(79, 65, -1) 18 -(79, 66, -1) 17 -(79, 67, -1) 17 -(79, 68, -1) 16 -(79, 69, -1) 16 -(79, 70, -1) 15 -(79, 71, -1) 15 -(79, 72, -1) 14 -(79, 73, -1) 13 -(79, 74, -1) 13 -(79, 75, -1) 12 -(79, 76, -1) 12 -(79, 77, -1) 11 -(79, 78, -1) 10 -(79, 79, -1) 9 -(79, 80, -1) 9 -(79, 81, -1) 8 -(79, 82, -1) 7 -(79, 83, -1) 7 -(79, 84, -1) 6 -(79, 85, -1) 5 -(79, 86, -1) 4 -(79, 87, -1) 4 -(79, 88, -1) 3 -(79, 89, -1) 2 -(79, 90, -1) 1 -(79, 91, -1) 1 -(79, 92, -1) 0 -(80, 9, -1) 0 -(80, 10, -1) 0 -(80, 11, -1) 1 -(80, 12, -1) 1 -(80, 13, -1) 2 -(80, 14, -1) 3 -(80, 15, -1) 4 -(80, 16, -1) 4 -(80, 17, -1) 5 -(80, 18, -1) 6 -(80, 19, -1) 7 -(80, 20, -1) 7 -(80, 21, -1) 8 -(80, 22, -1) 9 -(80, 23, -1) 9 -(80, 24, -1) 10 -(80, 25, -1) 11 -(80, 26, -1) 11 -(80, 27, -1) 12 -(80, 28, -1) 13 -(80, 29, -1) 13 -(80, 30, -1) 14 -(80, 31, -1) 14 -(80, 32, -1) 15 -(80, 33, -1) 15 -(80, 34, -1) 16 -(80, 35, -1) 16 -(80, 36, -1) 17 -(80, 37, -1) 17 -(80, 38, -1) 18 -(80, 39, -1) 18 -(80, 40, -1) 18 -(80, 41, -1) 19 -(80, 42, -1) 19 -(80, 43, -1) 19 -(80, 44, -1) 19 -(80, 45, -1) 20 -(80, 46, -1) 20 -(80, 47, -1) 20 -(80, 48, -1) 20 -(80, 49, -1) 20 -(80, 50, -1) 20 -(80, 51, -1) 20 -(80, 52, -1) 20 -(80, 53, -1) 20 -(80, 54, -1) 20 -(80, 55, -1) 20 -(80, 56, -1) 20 -(80, 57, -1) 19 -(80, 58, -1) 19 -(80, 59, -1) 19 -(80, 60, -1) 19 -(80, 61, -1) 18 -(80, 62, -1) 18 -(80, 63, -1) 18 -(80, 64, -1) 17 -(80, 65, -1) 17 -(80, 66, -1) 16 -(80, 67, -1) 16 -(80, 68, -1) 15 -(80, 69, -1) 15 -(80, 70, -1) 14 -(80, 71, -1) 14 -(80, 72, -1) 13 -(80, 73, -1) 13 -(80, 74, -1) 12 -(80, 75, -1) 11 -(80, 76, -1) 11 -(80, 77, -1) 10 -(80, 78, -1) 9 -(80, 79, -1) 9 -(80, 80, -1) 8 -(80, 81, -1) 7 -(80, 82, -1) 7 -(80, 83, -1) 6 -(80, 84, -1) 5 -(80, 85, -1) 4 -(80, 86, -1) 4 -(80, 87, -1) 3 -(80, 88, -1) 2 -(80, 89, -1) 1 -(80, 90, -1) 1 -(80, 91, -1) 0 -(80, 92, -1) 0 -(81, 14, -1) 3 -(81, 15, -1) 3 -(81, 16, -1) 4 -(81, 17, -1) 5 -(81, 18, -1) 5 -(81, 19, -1) 6 -(81, 20, -1) 7 -(81, 21, -1) 7 -(81, 22, -1) 8 -(81, 23, -1) 9 -(81, 24, -1) 9 -(81, 25, -1) 10 -(81, 26, -1) 11 -(81, 27, -1) 11 -(81, 28, -1) 12 -(81, 29, -1) 12 -(81, 30, -1) 13 -(81, 31, -1) 14 -(81, 32, -1) 14 -(81, 33, -1) 15 -(81, 34, -1) 15 -(81, 35, -1) 15 -(81, 36, -1) 16 -(81, 37, -1) 16 -(81, 38, -1) 17 -(81, 39, -1) 17 -(81, 40, -1) 17 -(81, 41, -1) 18 -(81, 42, -1) 18 -(81, 43, -1) 18 -(81, 44, -1) 18 -(81, 45, -1) 19 -(81, 46, -1) 19 -(81, 47, -1) 19 -(81, 48, -1) 19 -(81, 49, -1) 19 -(81, 50, -1) 19 -(81, 51, -1) 19 -(81, 52, -1) 19 -(81, 53, -1) 19 -(81, 54, -1) 19 -(81, 55, -1) 19 -(81, 56, -1) 19 -(81, 57, -1) 18 -(81, 58, -1) 18 -(81, 59, -1) 18 -(81, 60, -1) 18 -(81, 61, -1) 17 -(81, 62, -1) 17 -(81, 63, -1) 17 -(81, 64, -1) 16 -(81, 65, -1) 16 -(81, 66, -1) 15 -(81, 67, -1) 15 -(81, 68, -1) 15 -(81, 69, -1) 14 -(81, 70, -1) 14 -(81, 71, -1) 13 -(81, 72, -1) 12 -(81, 73, -1) 12 -(81, 74, -1) 11 -(81, 75, -1) 11 -(81, 76, -1) 10 -(81, 77, -1) 9 -(81, 78, -1) 9 -(81, 79, -1) 8 -(81, 80, -1) 7 -(81, 81, -1) 7 -(81, 82, -1) 6 -(81, 83, -1) 5 -(81, 84, -1) 5 -(81, 85, -1) 4 -(81, 86, -1) 3 -(81, 87, -1) 3 -(82, 14, -1) 2 -(82, 15, -1) 3 -(82, 16, -1) 3 -(82, 17, -1) 4 -(82, 18, -1) 5 -(82, 19, -1) 5 -(82, 20, -1) 6 -(82, 21, -1) 7 -(82, 22, -1) 7 -(82, 23, -1) 8 -(82, 24, -1) 9 -(82, 25, -1) 9 -(82, 26, -1) 10 -(82, 27, -1) 10 -(82, 28, -1) 11 -(82, 29, -1) 12 -(82, 30, -1) 12 -(82, 31, -1) 13 -(82, 32, -1) 13 -(82, 33, -1) 14 -(82, 34, -1) 14 -(82, 35, -1) 15 -(82, 36, -1) 15 -(82, 37, -1) 15 -(82, 38, -1) 16 -(82, 39, -1) 16 -(82, 40, -1) 16 -(82, 41, -1) 17 -(82, 42, -1) 17 -(82, 43, -1) 17 -(82, 44, -1) 17 -(82, 45, -1) 18 -(82, 46, -1) 18 -(82, 47, -1) 18 -(82, 48, -1) 18 -(82, 49, -1) 18 -(82, 50, -1) 18 -(82, 51, -1) 18 -(82, 52, -1) 18 -(82, 53, -1) 18 -(82, 54, -1) 18 -(82, 55, -1) 18 -(82, 56, -1) 18 -(82, 57, -1) 17 -(82, 58, -1) 17 -(82, 59, -1) 17 -(82, 60, -1) 17 -(82, 61, -1) 16 -(82, 62, -1) 16 -(82, 63, -1) 16 -(82, 64, -1) 15 -(82, 65, -1) 15 -(82, 66, -1) 15 -(82, 67, -1) 14 -(82, 68, -1) 14 -(82, 69, -1) 13 -(82, 70, -1) 13 -(82, 71, -1) 12 -(82, 72, -1) 12 -(82, 73, -1) 11 -(82, 74, -1) 10 -(82, 75, -1) 10 -(82, 76, -1) 9 -(82, 77, -1) 9 -(82, 78, -1) 8 -(82, 79, -1) 7 -(82, 80, -1) 7 -(82, 81, -1) 6 -(82, 82, -1) 5 -(82, 83, -1) 5 -(82, 84, -1) 4 -(82, 85, -1) 3 -(82, 86, -1) 3 -(82, 87, -1) 2 -(83, 14, -1) 1 -(83, 15, -1) 2 -(83, 16, -1) 3 -(83, 17, -1) 3 -(83, 18, -1) 4 -(83, 19, -1) 5 -(83, 20, -1) 5 -(83, 21, -1) 6 -(83, 22, -1) 7 -(83, 23, -1) 7 -(83, 24, -1) 8 -(83, 25, -1) 8 -(83, 26, -1) 9 -(83, 27, -1) 10 -(83, 28, -1) 10 -(83, 29, -1) 11 -(83, 30, -1) 11 -(83, 31, -1) 12 -(83, 32, -1) 12 -(83, 33, -1) 13 -(83, 34, -1) 13 -(83, 35, -1) 14 -(83, 36, -1) 14 -(83, 37, -1) 14 -(83, 38, -1) 15 -(83, 39, -1) 15 -(83, 40, -1) 15 -(83, 41, -1) 16 -(83, 42, -1) 16 -(83, 43, -1) 16 -(83, 44, -1) 16 -(83, 45, -1) 17 -(83, 46, -1) 17 -(83, 47, -1) 17 -(83, 48, -1) 17 -(83, 49, -1) 17 -(83, 50, -1) 17 -(83, 51, -1) 17 -(83, 52, -1) 17 -(83, 53, -1) 17 -(83, 54, -1) 17 -(83, 55, -1) 17 -(83, 56, -1) 17 -(83, 57, -1) 16 -(83, 58, -1) 16 -(83, 59, -1) 16 -(83, 60, -1) 16 -(83, 61, -1) 15 -(83, 62, -1) 15 -(83, 63, -1) 15 -(83, 64, -1) 14 -(83, 65, -1) 14 -(83, 66, -1) 14 -(83, 67, -1) 13 -(83, 68, -1) 13 -(83, 69, -1) 12 -(83, 70, -1) 12 -(83, 71, -1) 11 -(83, 72, -1) 11 -(83, 73, -1) 10 -(83, 74, -1) 10 -(83, 75, -1) 9 -(83, 76, -1) 8 -(83, 77, -1) 8 -(83, 78, -1) 7 -(83, 79, -1) 7 -(83, 80, -1) 6 -(83, 81, -1) 5 -(83, 82, -1) 5 -(83, 83, -1) 4 -(83, 84, -1) 3 -(83, 85, -1) 3 -(83, 86, -1) 2 -(83, 87, -1) 1 -(84, 14, -1) 1 -(84, 15, -1) 1 -(84, 16, -1) 2 -(84, 17, -1) 3 -(84, 18, -1) 3 -(84, 19, -1) 4 -(84, 20, -1) 5 -(84, 21, -1) 5 -(84, 22, -1) 6 -(84, 23, -1) 6 -(84, 24, -1) 7 -(84, 25, -1) 8 -(84, 26, -1) 8 -(84, 27, -1) 9 -(84, 28, -1) 9 -(84, 29, -1) 10 -(84, 30, -1) 10 -(84, 31, -1) 11 -(84, 32, -1) 11 -(84, 33, -1) 12 -(84, 34, -1) 12 -(84, 35, -1) 13 -(84, 36, -1) 13 -(84, 37, -1) 13 -(84, 38, -1) 14 -(84, 39, -1) 14 -(84, 40, -1) 14 -(84, 41, -1) 15 -(84, 42, -1) 15 -(84, 43, -1) 15 -(84, 44, -1) 15 -(84, 45, -1) 16 -(84, 46, -1) 16 -(84, 47, -1) 16 -(84, 48, -1) 16 -(84, 49, -1) 16 -(84, 50, -1) 16 -(84, 51, -1) 16 -(84, 52, -1) 16 -(84, 53, -1) 16 -(84, 54, -1) 16 -(84, 55, -1) 16 -(84, 56, -1) 16 -(84, 57, -1) 15 -(84, 58, -1) 15 -(84, 59, -1) 15 -(84, 60, -1) 15 -(84, 61, -1) 14 -(84, 62, -1) 14 -(84, 63, -1) 14 -(84, 64, -1) 13 -(84, 65, -1) 13 -(84, 66, -1) 13 -(84, 67, -1) 12 -(84, 68, -1) 12 -(84, 69, -1) 11 -(84, 70, -1) 11 -(84, 71, -1) 10 -(84, 72, -1) 10 -(84, 73, -1) 9 -(84, 74, -1) 9 -(84, 75, -1) 8 -(84, 76, -1) 8 -(84, 77, -1) 7 -(84, 78, -1) 6 -(84, 79, -1) 6 -(84, 80, -1) 5 -(84, 81, -1) 5 -(84, 82, -1) 4 -(84, 83, -1) 3 -(84, 84, -1) 3 -(84, 85, -1) 2 -(84, 86, -1) 1 -(84, 87, -1) 1 -(85, 14, -1) 0 -(85, 15, -1) 1 -(85, 16, -1) 1 -(85, 17, -1) 2 -(85, 18, -1) 2 -(85, 19, -1) 3 -(85, 20, -1) 4 -(85, 21, -1) 4 -(85, 22, -1) 5 -(85, 23, -1) 6 -(85, 24, -1) 6 -(85, 25, -1) 7 -(85, 26, -1) 7 -(85, 27, -1) 8 -(85, 28, -1) 9 -(85, 29, -1) 9 -(85, 30, -1) 10 -(85, 31, -1) 10 -(85, 32, -1) 11 -(85, 33, -1) 11 -(85, 34, -1) 11 -(85, 35, -1) 12 -(85, 36, -1) 12 -(85, 37, -1) 13 -(85, 38, -1) 13 -(85, 39, -1) 13 -(85, 40, -1) 13 -(85, 41, -1) 14 -(85, 42, -1) 14 -(85, 43, -1) 14 -(85, 44, -1) 14 -(85, 45, -1) 15 -(85, 46, -1) 15 -(85, 47, -1) 15 -(85, 48, -1) 15 -(85, 49, -1) 15 -(85, 50, -1) 15 -(85, 51, -1) 15 -(85, 52, -1) 15 -(85, 53, -1) 15 -(85, 54, -1) 15 -(85, 55, -1) 15 -(85, 56, -1) 15 -(85, 57, -1) 14 -(85, 58, -1) 14 -(85, 59, -1) 14 -(85, 60, -1) 14 -(85, 61, -1) 13 -(85, 62, -1) 13 -(85, 63, -1) 13 -(85, 64, -1) 13 -(85, 65, -1) 12 -(85, 66, -1) 12 -(85, 67, -1) 11 -(85, 68, -1) 11 -(85, 69, -1) 11 -(85, 70, -1) 10 -(85, 71, -1) 10 -(85, 72, -1) 9 -(85, 73, -1) 9 -(85, 74, -1) 8 -(85, 75, -1) 7 -(85, 76, -1) 7 -(85, 77, -1) 6 -(85, 78, -1) 6 -(85, 79, -1) 5 -(85, 80, -1) 4 -(85, 81, -1) 4 -(85, 82, -1) 3 -(85, 83, -1) 2 -(85, 84, -1) 2 -(85, 85, -1) 1 -(85, 86, -1) 1 -(85, 87, -1) 0 -(86, 16, -1) 1 -(86, 17, -1) 1 -(86, 18, -1) 2 -(86, 19, -1) 3 -(86, 20, -1) 3 -(86, 21, -1) 4 -(86, 22, -1) 4 -(86, 23, -1) 5 -(86, 24, -1) 6 -(86, 25, -1) 6 -(86, 26, -1) 7 -(86, 27, -1) 7 -(86, 28, -1) 8 -(86, 29, -1) 8 -(86, 30, -1) 9 -(86, 31, -1) 9 -(86, 32, -1) 10 -(86, 33, -1) 10 -(86, 34, -1) 11 -(86, 35, -1) 11 -(86, 36, -1) 11 -(86, 37, -1) 12 -(86, 38, -1) 12 -(86, 39, -1) 12 -(86, 40, -1) 13 -(86, 41, -1) 13 -(86, 42, -1) 13 -(86, 43, -1) 13 -(86, 44, -1) 13 -(86, 45, -1) 14 -(86, 46, -1) 14 -(86, 47, -1) 14 -(86, 48, -1) 14 -(86, 49, -1) 14 -(86, 50, -1) 14 -(86, 51, -1) 14 -(86, 52, -1) 14 -(86, 53, -1) 14 -(86, 54, -1) 14 -(86, 55, -1) 14 -(86, 56, -1) 14 -(86, 57, -1) 13 -(86, 58, -1) 13 -(86, 59, -1) 13 -(86, 60, -1) 13 -(86, 61, -1) 13 -(86, 62, -1) 12 -(86, 63, -1) 12 -(86, 64, -1) 12 -(86, 65, -1) 11 -(86, 66, -1) 11 -(86, 67, -1) 11 -(86, 68, -1) 10 -(86, 69, -1) 10 -(86, 70, -1) 9 -(86, 71, -1) 9 -(86, 72, -1) 8 -(86, 73, -1) 8 -(86, 74, -1) 7 -(86, 75, -1) 7 -(86, 76, -1) 6 -(86, 77, -1) 6 -(86, 78, -1) 5 -(86, 79, -1) 4 -(86, 80, -1) 4 -(86, 81, -1) 3 -(86, 82, -1) 3 -(86, 83, -1) 2 -(86, 84, -1) 1 -(86, 85, -1) 1 -(87, 16, -1) 0 -(87, 17, -1) 1 -(87, 18, -1) 1 -(87, 19, -1) 2 -(87, 20, -1) 2 -(87, 21, -1) 3 -(87, 22, -1) 4 -(87, 23, -1) 4 -(87, 24, -1) 5 -(87, 25, -1) 5 -(87, 26, -1) 6 -(87, 27, -1) 6 -(87, 28, -1) 7 -(87, 29, -1) 7 -(87, 30, -1) 8 -(87, 31, -1) 8 -(87, 32, -1) 9 -(87, 33, -1) 9 -(87, 34, -1) 10 -(87, 35, -1) 10 -(87, 36, -1) 10 -(87, 37, -1) 11 -(87, 38, -1) 11 -(87, 39, -1) 11 -(87, 40, -1) 12 -(87, 41, -1) 12 -(87, 42, -1) 12 -(87, 43, -1) 12 -(87, 44, -1) 12 -(87, 45, -1) 13 -(87, 46, -1) 13 -(87, 47, -1) 13 -(87, 48, -1) 13 -(87, 49, -1) 13 -(87, 50, -1) 13 -(87, 51, -1) 13 -(87, 52, -1) 13 -(87, 53, -1) 13 -(87, 54, -1) 13 -(87, 55, -1) 13 -(87, 56, -1) 13 -(87, 57, -1) 12 -(87, 58, -1) 12 -(87, 59, -1) 12 -(87, 60, -1) 12 -(87, 61, -1) 12 -(87, 62, -1) 11 -(87, 63, -1) 11 -(87, 64, -1) 11 -(87, 65, -1) 10 -(87, 66, -1) 10 -(87, 67, -1) 10 -(87, 68, -1) 9 -(87, 69, -1) 9 -(87, 70, -1) 8 -(87, 71, -1) 8 -(87, 72, -1) 7 -(87, 73, -1) 7 -(87, 74, -1) 6 -(87, 75, -1) 6 -(87, 76, -1) 5 -(87, 77, -1) 5 -(87, 78, -1) 4 -(87, 79, -1) 4 -(87, 80, -1) 3 -(87, 81, -1) 2 -(87, 82, -1) 2 -(87, 83, -1) 1 -(87, 84, -1) 1 -(87, 85, -1) 0 -(88, 21, -1) 2 -(88, 22, -1) 3 -(88, 23, -1) 3 -(88, 24, -1) 4 -(88, 25, -1) 5 -(88, 26, -1) 5 -(88, 27, -1) 6 -(88, 28, -1) 6 -(88, 29, -1) 7 -(88, 30, -1) 7 -(88, 31, -1) 7 -(88, 32, -1) 8 -(88, 33, -1) 8 -(88, 34, -1) 9 -(88, 35, -1) 9 -(88, 36, -1) 9 -(88, 37, -1) 10 -(88, 38, -1) 10 -(88, 39, -1) 10 -(88, 40, -1) 11 -(88, 41, -1) 11 -(88, 42, -1) 11 -(88, 43, -1) 11 -(88, 44, -1) 11 -(88, 45, -1) 12 -(88, 46, -1) 12 -(88, 47, -1) 12 -(88, 48, -1) 12 -(88, 49, -1) 12 -(88, 50, -1) 12 -(88, 51, -1) 12 -(88, 52, -1) 12 -(88, 53, -1) 12 -(88, 54, -1) 12 -(88, 55, -1) 12 -(88, 56, -1) 12 -(88, 57, -1) 11 -(88, 58, -1) 11 -(88, 59, -1) 11 -(88, 60, -1) 11 -(88, 61, -1) 11 -(88, 62, -1) 10 -(88, 63, -1) 10 -(88, 64, -1) 10 -(88, 65, -1) 9 -(88, 66, -1) 9 -(88, 67, -1) 9 -(88, 68, -1) 8 -(88, 69, -1) 8 -(88, 70, -1) 7 -(88, 71, -1) 7 -(88, 72, -1) 7 -(88, 73, -1) 6 -(88, 74, -1) 6 -(88, 75, -1) 5 -(88, 76, -1) 5 -(88, 77, -1) 4 -(88, 78, -1) 3 -(88, 79, -1) 3 -(88, 80, -1) 2 -(89, 21, -1) 1 -(89, 22, -1) 2 -(89, 23, -1) 3 -(89, 24, -1) 3 -(89, 25, -1) 4 -(89, 26, -1) 4 -(89, 27, -1) 5 -(89, 28, -1) 5 -(89, 29, -1) 6 -(89, 30, -1) 6 -(89, 31, -1) 7 -(89, 32, -1) 7 -(89, 33, -1) 7 -(89, 34, -1) 8 -(89, 35, -1) 8 -(89, 36, -1) 8 -(89, 37, -1) 9 -(89, 38, -1) 9 -(89, 39, -1) 9 -(89, 40, -1) 10 -(89, 41, -1) 10 -(89, 42, -1) 10 -(89, 43, -1) 10 -(89, 44, -1) 10 -(89, 45, -1) 11 -(89, 46, -1) 11 -(89, 47, -1) 11 -(89, 48, -1) 11 -(89, 49, -1) 11 -(89, 50, -1) 11 -(89, 51, -1) 11 -(89, 52, -1) 11 -(89, 53, -1) 11 -(89, 54, -1) 11 -(89, 55, -1) 11 -(89, 56, -1) 11 -(89, 57, -1) 10 -(89, 58, -1) 10 -(89, 59, -1) 10 -(89, 60, -1) 10 -(89, 61, -1) 10 -(89, 62, -1) 9 -(89, 63, -1) 9 -(89, 64, -1) 9 -(89, 65, -1) 8 -(89, 66, -1) 8 -(89, 67, -1) 8 -(89, 68, -1) 7 -(89, 69, -1) 7 -(89, 70, -1) 7 -(89, 71, -1) 6 -(89, 72, -1) 6 -(89, 73, -1) 5 -(89, 74, -1) 5 -(89, 75, -1) 4 -(89, 76, -1) 4 -(89, 77, -1) 3 -(89, 78, -1) 3 -(89, 79, -1) 2 -(89, 80, -1) 1 -(90, 21, -1) 1 -(90, 22, -1) 1 -(90, 23, -1) 2 -(90, 24, -1) 2 -(90, 25, -1) 3 -(90, 26, -1) 3 -(90, 27, -1) 4 -(90, 28, -1) 4 -(90, 29, -1) 5 -(90, 30, -1) 5 -(90, 31, -1) 6 -(90, 32, -1) 6 -(90, 33, -1) 6 -(90, 34, -1) 7 -(90, 35, -1) 7 -(90, 36, -1) 8 -(90, 37, -1) 8 -(90, 38, -1) 8 -(90, 39, -1) 8 -(90, 40, -1) 9 -(90, 41, -1) 9 -(90, 42, -1) 9 -(90, 43, -1) 9 -(90, 44, -1) 9 -(90, 45, -1) 10 -(90, 46, -1) 10 -(90, 47, -1) 10 -(90, 48, -1) 10 -(90, 49, -1) 10 -(90, 50, -1) 10 -(90, 51, -1) 10 -(90, 52, -1) 10 -(90, 53, -1) 10 -(90, 54, -1) 10 -(90, 55, -1) 10 -(90, 56, -1) 10 -(90, 57, -1) 9 -(90, 58, -1) 9 -(90, 59, -1) 9 -(90, 60, -1) 9 -(90, 61, -1) 9 -(90, 62, -1) 8 -(90, 63, -1) 8 -(90, 64, -1) 8 -(90, 65, -1) 8 -(90, 66, -1) 7 -(90, 67, -1) 7 -(90, 68, -1) 6 -(90, 69, -1) 6 -(90, 70, -1) 6 -(90, 71, -1) 5 -(90, 72, -1) 5 -(90, 73, -1) 4 -(90, 74, -1) 4 -(90, 75, -1) 3 -(90, 76, -1) 3 -(90, 77, -1) 2 -(90, 78, -1) 2 -(90, 79, -1) 1 -(90, 80, -1) 1 -(91, 21, -1) 0 -(91, 22, -1) 1 -(91, 23, -1) 1 -(91, 24, -1) 2 -(91, 25, -1) 2 -(91, 26, -1) 3 -(91, 27, -1) 3 -(91, 28, -1) 4 -(91, 29, -1) 4 -(91, 30, -1) 4 -(91, 31, -1) 5 -(91, 32, -1) 5 -(91, 33, -1) 6 -(91, 34, -1) 6 -(91, 35, -1) 6 -(91, 36, -1) 7 -(91, 37, -1) 7 -(91, 38, -1) 7 -(91, 39, -1) 8 -(91, 40, -1) 8 -(91, 41, -1) 8 -(91, 42, -1) 8 -(91, 43, -1) 8 -(91, 44, -1) 9 -(91, 45, -1) 9 -(91, 46, -1) 9 -(91, 47, -1) 9 -(91, 48, -1) 9 -(91, 49, -1) 9 -(91, 50, -1) 9 -(91, 51, -1) 9 -(91, 52, -1) 9 -(91, 53, -1) 9 -(91, 54, -1) 9 -(91, 55, -1) 9 -(91, 56, -1) 9 -(91, 57, -1) 9 -(91, 58, -1) 8 -(91, 59, -1) 8 -(91, 60, -1) 8 -(91, 61, -1) 8 -(91, 62, -1) 8 -(91, 63, -1) 7 -(91, 64, -1) 7 -(91, 65, -1) 7 -(91, 66, -1) 6 -(91, 67, -1) 6 -(91, 68, -1) 6 -(91, 69, -1) 5 -(91, 70, -1) 5 -(91, 71, -1) 4 -(91, 72, -1) 4 -(91, 73, -1) 4 -(91, 74, -1) 3 -(91, 75, -1) 3 -(91, 76, -1) 2 -(91, 77, -1) 2 -(91, 78, -1) 1 -(91, 79, -1) 1 -(91, 80, -1) 0 -(92, 21, -1) 0 -(92, 22, -1) 0 -(92, 23, -1) 0 -(92, 24, -1) 1 -(92, 25, -1) 1 -(92, 26, -1) 2 -(92, 27, -1) 2 -(92, 28, -1) 3 -(92, 29, -1) 3 -(92, 30, -1) 4 -(92, 31, -1) 4 -(92, 32, -1) 4 -(92, 33, -1) 5 -(92, 34, -1) 5 -(92, 35, -1) 5 -(92, 36, -1) 6 -(92, 37, -1) 6 -(92, 38, -1) 6 -(92, 39, -1) 7 -(92, 40, -1) 7 -(92, 41, -1) 7 -(92, 42, -1) 7 -(92, 43, -1) 7 -(92, 44, -1) 8 -(92, 45, -1) 8 -(92, 46, -1) 8 -(92, 47, -1) 8 -(92, 48, -1) 8 -(92, 49, -1) 8 -(92, 50, -1) 8 -(92, 51, -1) 8 -(92, 52, -1) 8 -(92, 53, -1) 8 -(92, 54, -1) 8 -(92, 55, -1) 8 -(92, 56, -1) 8 -(92, 57, -1) 8 -(92, 58, -1) 7 -(92, 59, -1) 7 -(92, 60, -1) 7 -(92, 61, -1) 7 -(92, 62, -1) 7 -(92, 63, -1) 6 -(92, 64, -1) 6 -(92, 65, -1) 6 -(92, 66, -1) 5 -(92, 67, -1) 5 -(92, 68, -1) 5 -(92, 69, -1) 4 -(92, 70, -1) 4 -(92, 71, -1) 4 -(92, 72, -1) 3 -(92, 73, -1) 3 -(92, 74, -1) 2 -(92, 75, -1) 2 -(92, 76, -1) 1 -(92, 77, -1) 1 -(92, 78, -1) 0 -(92, 79, -1) 0 -(92, 80, -1) 0 -(93, 26, -1) 1 -(93, 27, -1) 1 -(93, 28, -1) 2 -(93, 29, -1) 2 -(93, 30, -1) 3 -(93, 31, -1) 3 -(93, 32, -1) 3 -(93, 33, -1) 4 -(93, 34, -1) 4 -(93, 35, -1) 4 -(93, 36, -1) 5 -(93, 37, -1) 5 -(93, 38, -1) 5 -(93, 39, -1) 6 -(93, 40, -1) 6 -(93, 41, -1) 6 -(93, 42, -1) 6 -(93, 43, -1) 6 -(93, 44, -1) 7 -(93, 45, -1) 7 -(93, 46, -1) 7 -(93, 47, -1) 7 -(93, 48, -1) 7 -(93, 49, -1) 7 -(93, 50, -1) 7 -(93, 51, -1) 7 -(93, 52, -1) 7 -(93, 53, -1) 7 -(93, 54, -1) 7 -(93, 55, -1) 7 -(93, 56, -1) 7 -(93, 57, -1) 7 -(93, 58, -1) 6 -(93, 59, -1) 6 -(93, 60, -1) 6 -(93, 61, -1) 6 -(93, 62, -1) 6 -(93, 63, -1) 5 -(93, 64, -1) 5 -(93, 65, -1) 5 -(93, 66, -1) 4 -(93, 67, -1) 4 -(93, 68, -1) 4 -(93, 69, -1) 3 -(93, 70, -1) 3 -(93, 71, -1) 3 -(93, 72, -1) 2 -(93, 73, -1) 2 -(93, 74, -1) 1 -(93, 75, -1) 1 -(94, 26, -1) 0 -(94, 27, -1) 0 -(94, 28, -1) 1 -(94, 29, -1) 1 -(94, 30, -1) 2 -(94, 31, -1) 2 -(94, 32, -1) 2 -(94, 33, -1) 3 -(94, 34, -1) 3 -(94, 35, -1) 3 -(94, 36, -1) 4 -(94, 37, -1) 4 -(94, 38, -1) 4 -(94, 39, -1) 5 -(94, 40, -1) 5 -(94, 41, -1) 5 -(94, 42, -1) 5 -(94, 43, -1) 5 -(94, 44, -1) 6 -(94, 45, -1) 6 -(94, 46, -1) 6 -(94, 47, -1) 6 -(94, 48, -1) 6 -(94, 49, -1) 6 -(94, 50, -1) 6 -(94, 51, -1) 6 -(94, 52, -1) 6 -(94, 53, -1) 6 -(94, 54, -1) 6 -(94, 55, -1) 6 -(94, 56, -1) 6 -(94, 57, -1) 6 -(94, 58, -1) 5 -(94, 59, -1) 5 -(94, 60, -1) 5 -(94, 61, -1) 5 -(94, 62, -1) 5 -(94, 63, -1) 4 -(94, 64, -1) 4 -(94, 65, -1) 4 -(94, 66, -1) 3 -(94, 67, -1) 3 -(94, 68, -1) 3 -(94, 69, -1) 2 -(94, 70, -1) 2 -(94, 71, -1) 2 -(94, 72, -1) 1 -(94, 73, -1) 1 -(94, 74, -1) 0 -(94, 75, -1) 0 -(95, 26, -1) 0 -(95, 27, -1) 0 -(95, 28, -1) 0 -(95, 29, -1) 0 -(95, 30, -1) 1 -(95, 31, -1) 1 -(95, 32, -1) 1 -(95, 33, -1) 2 -(95, 34, -1) 2 -(95, 35, -1) 3 -(95, 36, -1) 3 -(95, 37, -1) 3 -(95, 38, -1) 3 -(95, 39, -1) 4 -(95, 40, -1) 4 -(95, 41, -1) 4 -(95, 42, -1) 4 -(95, 43, -1) 4 -(95, 44, -1) 5 -(95, 45, -1) 5 -(95, 46, -1) 5 -(95, 47, -1) 5 -(95, 48, -1) 5 -(95, 49, -1) 5 -(95, 50, -1) 5 -(95, 51, -1) 5 -(95, 52, -1) 5 -(95, 53, -1) 5 -(95, 54, -1) 5 -(95, 55, -1) 5 -(95, 56, -1) 5 -(95, 57, -1) 5 -(95, 58, -1) 4 -(95, 59, -1) 4 -(95, 60, -1) 4 -(95, 61, -1) 4 -(95, 62, -1) 4 -(95, 63, -1) 3 -(95, 64, -1) 3 -(95, 65, -1) 3 -(95, 66, -1) 3 -(95, 67, -1) 2 -(95, 68, -1) 2 -(95, 69, -1) 1 -(95, 70, -1) 1 -(95, 71, -1) 1 -(95, 72, -1) 0 -(95, 73, -1) 0 -(95, 74, -1) 0 -(95, 75, -1) 0 -(96, 36, -1) 2 -(96, 37, -1) 2 -(96, 38, -1) 2 -(96, 39, -1) 3 -(96, 40, -1) 3 -(96, 41, -1) 3 -(96, 42, -1) 3 -(96, 43, -1) 3 -(96, 44, -1) 4 -(96, 45, -1) 4 -(96, 46, -1) 4 -(96, 47, -1) 4 -(96, 48, -1) 4 -(96, 49, -1) 4 -(96, 50, -1) 4 -(96, 51, -1) 4 -(96, 52, -1) 4 -(96, 53, -1) 4 -(96, 54, -1) 4 -(96, 55, -1) 4 -(96, 56, -1) 4 -(96, 57, -1) 4 -(96, 58, -1) 3 -(96, 59, -1) 3 -(96, 60, -1) 3 -(96, 61, -1) 3 -(96, 62, -1) 3 -(96, 63, -1) 2 -(96, 64, -1) 2 -(96, 65, -1) 2 -(97, 36, -1) 1 -(97, 37, -1) 1 -(97, 38, -1) 2 -(97, 39, -1) 2 -(97, 40, -1) 2 -(97, 41, -1) 2 -(97, 42, -1) 2 -(97, 43, -1) 2 -(97, 44, -1) 3 -(97, 45, -1) 3 -(97, 46, -1) 3 -(97, 47, -1) 3 -(97, 48, -1) 3 -(97, 49, -1) 3 -(97, 50, -1) 3 -(97, 51, -1) 3 -(97, 52, -1) 3 -(97, 53, -1) 3 -(97, 54, -1) 3 -(97, 55, -1) 3 -(97, 56, -1) 3 -(97, 57, -1) 3 -(97, 58, -1) 2 -(97, 59, -1) 2 -(97, 60, -1) 2 -(97, 61, -1) 2 -(97, 62, -1) 2 -(97, 63, -1) 2 -(97, 64, -1) 1 -(97, 65, -1) 1 -(98, 41, -1) 1 -(98, 42, -1) 1 -(98, 43, -1) 1 -(98, 44, -1) 2 -(98, 45, -1) 2 -(98, 46, -1) 2 -(98, 47, -1) 2 -(98, 48, -1) 2 -(98, 49, -1) 2 -(98, 50, -1) 2 -(98, 51, -1) 2 -(98, 52, -1) 2 -(98, 53, -1) 2 -(98, 54, -1) 2 -(98, 55, -1) 2 -(98, 56, -1) 2 -(98, 57, -1) 2 -(98, 58, -1) 1 -(98, 59, -1) 1 -(98, 60, -1) 1 -(99, 41, -1) 0 -(99, 42, -1) 0 -(99, 43, -1) 0 -(99, 44, -1) 1 -(99, 45, -1) 1 -(99, 46, -1) 1 -(99, 47, -1) 1 -(99, 48, -1) 1 -(99, 49, -1) 1 -(99, 50, -1) 1 -(99, 51, -1) 1 -(99, 52, -1) 1 -(99, 53, -1) 1 -(99, 54, -1) 1 -(99, 55, -1) 1 -(99, 56, -1) 1 -(99, 57, -1) 1 -(99, 58, -1) 0 -(99, 59, -1) 0 -(99, 60, -1) 0 -(100, 41, -1) 0 -(100, 42, -1) 0 -(100, 43, -1) 0 -(100, 44, -1) 0 -(100, 45, -1) 0 -(100, 46, -1) 0 -(100, 47, -1) 0 -(100, 48, -1) 0 -(100, 49, -1) 0 -(100, 50, -1) 0 -(100, 51, -1) 0 -(100, 52, -1) 0 -(100, 53, -1) 0 -(100, 54, -1) 0 -(100, 55, -1) 0 -(100, 56, -1) 0 -(100, 57, -1) 0 -(100, 58, -1) 0 -(100, 59, -1) 0 -(100, 60, -1) 0 -(1, 41, 1) 0 -(1, 42, 1) 0 -(1, 43, 1) 0 -(1, 44, 1) 0 -(1, 45, 1) 0 -(1, 46, 1) 0 -(1, 47, 1) 0 -(1, 48, 1) 0 -(1, 49, 1) 0 -(1, 50, 1) 0 -(1, 51, 1) 0 -(1, 52, 1) 0 -(1, 53, 1) 0 -(1, 54, 1) 0 -(1, 55, 1) 0 -(1, 56, 1) 0 -(1, 57, 1) 0 -(1, 58, 1) 0 -(1, 59, 1) 0 -(1, 60, 1) 0 -(2, 41, 1) 0 -(2, 42, 1) 0 -(2, 43, 1) 0 -(2, 44, 1) 1 -(2, 45, 1) 1 -(2, 46, 1) 1 -(2, 47, 1) 1 -(2, 48, 1) 1 -(2, 49, 1) 1 -(2, 50, 1) 1 -(2, 51, 1) 1 -(2, 52, 1) 1 -(2, 53, 1) 1 -(2, 54, 1) 1 -(2, 55, 1) 1 -(2, 56, 1) 1 -(2, 57, 1) 1 -(2, 58, 1) 0 -(2, 59, 1) 0 -(2, 60, 1) 0 -(3, 41, 1) 1 -(3, 42, 1) 1 -(3, 43, 1) 1 -(3, 44, 1) 2 -(3, 45, 1) 2 -(3, 46, 1) 2 -(3, 47, 1) 2 -(3, 48, 1) 2 -(3, 49, 1) 2 -(3, 50, 1) 2 -(3, 51, 1) 2 -(3, 52, 1) 2 -(3, 53, 1) 2 -(3, 54, 1) 2 -(3, 55, 1) 2 -(3, 56, 1) 2 -(3, 57, 1) 2 -(3, 58, 1) 1 -(3, 59, 1) 1 -(3, 60, 1) 1 -(4, 36, 1) 1 -(4, 37, 1) 1 -(4, 38, 1) 2 -(4, 39, 1) 2 -(4, 40, 1) 2 -(4, 41, 1) 2 -(4, 42, 1) 2 -(4, 43, 1) 2 -(4, 44, 1) 3 -(4, 45, 1) 3 -(4, 46, 1) 3 -(4, 47, 1) 3 -(4, 48, 1) 3 -(4, 49, 1) 3 -(4, 50, 1) 3 -(4, 51, 1) 3 -(4, 52, 1) 3 -(4, 53, 1) 3 -(4, 54, 1) 3 -(4, 55, 1) 3 -(4, 56, 1) 3 -(4, 57, 1) 3 -(4, 58, 1) 2 -(4, 59, 1) 2 -(4, 60, 1) 2 -(4, 61, 1) 2 -(4, 62, 1) 2 -(4, 63, 1) 2 -(4, 64, 1) 1 -(4, 65, 1) 1 -(5, 36, 1) 2 -(5, 37, 1) 2 -(5, 38, 1) 2 -(5, 39, 1) 3 -(5, 40, 1) 3 -(5, 41, 1) 3 -(5, 42, 1) 3 -(5, 43, 1) 3 -(5, 44, 1) 4 -(5, 45, 1) 4 -(5, 46, 1) 4 -(5, 47, 1) 4 -(5, 48, 1) 4 -(5, 49, 1) 4 -(5, 50, 1) 4 -(5, 51, 1) 4 -(5, 52, 1) 4 -(5, 53, 1) 4 -(5, 54, 1) 4 -(5, 55, 1) 4 -(5, 56, 1) 4 -(5, 57, 1) 4 -(5, 58, 1) 3 -(5, 59, 1) 3 -(5, 60, 1) 3 -(5, 61, 1) 3 -(5, 62, 1) 3 -(5, 63, 1) 2 -(5, 64, 1) 2 -(5, 65, 1) 2 -(6, 26, 1) 0 -(6, 27, 1) 0 -(6, 28, 1) 0 -(6, 29, 1) 0 -(6, 30, 1) 1 -(6, 31, 1) 1 -(6, 32, 1) 1 -(6, 33, 1) 2 -(6, 34, 1) 2 -(6, 35, 1) 3 -(6, 36, 1) 3 -(6, 37, 1) 3 -(6, 38, 1) 3 -(6, 39, 1) 4 -(6, 40, 1) 4 -(6, 41, 1) 4 -(6, 42, 1) 4 -(6, 43, 1) 4 -(6, 44, 1) 5 -(6, 45, 1) 5 -(6, 46, 1) 5 -(6, 47, 1) 5 -(6, 48, 1) 5 -(6, 49, 1) 5 -(6, 50, 1) 5 -(6, 51, 1) 5 -(6, 52, 1) 5 -(6, 53, 1) 5 -(6, 54, 1) 5 -(6, 55, 1) 5 -(6, 56, 1) 5 -(6, 57, 1) 5 -(6, 58, 1) 4 -(6, 59, 1) 4 -(6, 60, 1) 4 -(6, 61, 1) 4 -(6, 62, 1) 4 -(6, 63, 1) 3 -(6, 64, 1) 3 -(6, 65, 1) 3 -(6, 66, 1) 3 -(6, 67, 1) 2 -(6, 68, 1) 2 -(6, 69, 1) 1 -(6, 70, 1) 1 -(6, 71, 1) 1 -(6, 72, 1) 0 -(6, 73, 1) 0 -(6, 74, 1) 0 -(6, 75, 1) 0 -(7, 26, 1) 0 -(7, 27, 1) 0 -(7, 28, 1) 1 -(7, 29, 1) 1 -(7, 30, 1) 2 -(7, 31, 1) 2 -(7, 32, 1) 2 -(7, 33, 1) 3 -(7, 34, 1) 3 -(7, 35, 1) 3 -(7, 36, 1) 4 -(7, 37, 1) 4 -(7, 38, 1) 4 -(7, 39, 1) 5 -(7, 40, 1) 5 -(7, 41, 1) 5 -(7, 42, 1) 5 -(7, 43, 1) 5 -(7, 44, 1) 6 -(7, 45, 1) 6 -(7, 46, 1) 6 -(7, 47, 1) 6 -(7, 48, 1) 6 -(7, 49, 1) 6 -(7, 50, 1) 6 -(7, 51, 1) 6 -(7, 52, 1) 6 -(7, 53, 1) 6 -(7, 54, 1) 6 -(7, 55, 1) 6 -(7, 56, 1) 6 -(7, 57, 1) 6 -(7, 58, 1) 5 -(7, 59, 1) 5 -(7, 60, 1) 5 -(7, 61, 1) 5 -(7, 62, 1) 5 -(7, 63, 1) 4 -(7, 64, 1) 4 -(7, 65, 1) 4 -(7, 66, 1) 3 -(7, 67, 1) 3 -(7, 68, 1) 3 -(7, 69, 1) 2 -(7, 70, 1) 2 -(7, 71, 1) 2 -(7, 72, 1) 1 -(7, 73, 1) 1 -(7, 74, 1) 0 -(7, 75, 1) 0 -(8, 26, 1) 1 -(8, 27, 1) 1 -(8, 28, 1) 2 -(8, 29, 1) 2 -(8, 30, 1) 3 -(8, 31, 1) 3 -(8, 32, 1) 3 -(8, 33, 1) 4 -(8, 34, 1) 4 -(8, 35, 1) 4 -(8, 36, 1) 5 -(8, 37, 1) 5 -(8, 38, 1) 5 -(8, 39, 1) 6 -(8, 40, 1) 6 -(8, 41, 1) 6 -(8, 42, 1) 6 -(8, 43, 1) 6 -(8, 44, 1) 7 -(8, 45, 1) 7 -(8, 46, 1) 7 -(8, 47, 1) 7 -(8, 48, 1) 7 -(8, 49, 1) 7 -(8, 50, 1) 7 -(8, 51, 1) 7 -(8, 52, 1) 7 -(8, 53, 1) 7 -(8, 54, 1) 7 -(8, 55, 1) 7 -(8, 56, 1) 7 -(8, 57, 1) 7 -(8, 58, 1) 6 -(8, 59, 1) 6 -(8, 60, 1) 6 -(8, 61, 1) 6 -(8, 62, 1) 6 -(8, 63, 1) 5 -(8, 64, 1) 5 -(8, 65, 1) 5 -(8, 66, 1) 4 -(8, 67, 1) 4 -(8, 68, 1) 4 -(8, 69, 1) 3 -(8, 70, 1) 3 -(8, 71, 1) 3 -(8, 72, 1) 2 -(8, 73, 1) 2 -(8, 74, 1) 1 -(8, 75, 1) 1 -(9, 21, 1) 0 -(9, 22, 1) 0 -(9, 23, 1) 0 -(9, 24, 1) 1 -(9, 25, 1) 1 -(9, 26, 1) 2 -(9, 27, 1) 2 -(9, 28, 1) 3 -(9, 29, 1) 3 -(9, 30, 1) 4 -(9, 31, 1) 4 -(9, 32, 1) 4 -(9, 33, 1) 5 -(9, 34, 1) 5 -(9, 35, 1) 5 -(9, 36, 1) 6 -(9, 37, 1) 6 -(9, 38, 1) 6 -(9, 39, 1) 7 -(9, 40, 1) 7 -(9, 41, 1) 7 -(9, 42, 1) 7 -(9, 43, 1) 7 -(9, 44, 1) 8 -(9, 45, 1) 8 -(9, 46, 1) 8 -(9, 47, 1) 8 -(9, 48, 1) 8 -(9, 49, 1) 8 -(9, 50, 1) 8 -(9, 51, 1) 8 -(9, 52, 1) 8 -(9, 53, 1) 8 -(9, 54, 1) 8 -(9, 55, 1) 8 -(9, 56, 1) 8 -(9, 57, 1) 8 -(9, 58, 1) 7 -(9, 59, 1) 7 -(9, 60, 1) 7 -(9, 61, 1) 7 -(9, 62, 1) 7 -(9, 63, 1) 6 -(9, 64, 1) 6 -(9, 65, 1) 6 -(9, 66, 1) 5 -(9, 67, 1) 5 -(9, 68, 1) 5 -(9, 69, 1) 4 -(9, 70, 1) 4 -(9, 71, 1) 4 -(9, 72, 1) 3 -(9, 73, 1) 3 -(9, 74, 1) 2 -(9, 75, 1) 2 -(9, 76, 1) 1 -(9, 77, 1) 1 -(9, 78, 1) 0 -(9, 79, 1) 0 -(9, 80, 1) 0 -(10, 21, 1) 0 -(10, 22, 1) 1 -(10, 23, 1) 1 -(10, 24, 1) 2 -(10, 25, 1) 2 -(10, 26, 1) 3 -(10, 27, 1) 3 -(10, 28, 1) 4 -(10, 29, 1) 4 -(10, 30, 1) 4 -(10, 31, 1) 5 -(10, 32, 1) 5 -(10, 33, 1) 6 -(10, 34, 1) 6 -(10, 35, 1) 6 -(10, 36, 1) 7 -(10, 37, 1) 7 -(10, 38, 1) 7 -(10, 39, 1) 8 -(10, 40, 1) 8 -(10, 41, 1) 8 -(10, 42, 1) 8 -(10, 43, 1) 8 -(10, 44, 1) 9 -(10, 45, 1) 9 -(10, 46, 1) 9 -(10, 47, 1) 9 -(10, 48, 1) 9 -(10, 49, 1) 9 -(10, 50, 1) 9 -(10, 51, 1) 9 -(10, 52, 1) 9 -(10, 53, 1) 9 -(10, 54, 1) 9 -(10, 55, 1) 9 -(10, 56, 1) 9 -(10, 57, 1) 9 -(10, 58, 1) 8 -(10, 59, 1) 8 -(10, 60, 1) 8 -(10, 61, 1) 8 -(10, 62, 1) 8 -(10, 63, 1) 7 -(10, 64, 1) 7 -(10, 65, 1) 7 -(10, 66, 1) 6 -(10, 67, 1) 6 -(10, 68, 1) 6 -(10, 69, 1) 5 -(10, 70, 1) 5 -(10, 71, 1) 4 -(10, 72, 1) 4 -(10, 73, 1) 4 -(10, 74, 1) 3 -(10, 75, 1) 3 -(10, 76, 1) 2 -(10, 77, 1) 2 -(10, 78, 1) 1 -(10, 79, 1) 1 -(10, 80, 1) 0 -(11, 21, 1) 1 -(11, 22, 1) 1 -(11, 23, 1) 2 -(11, 24, 1) 2 -(11, 25, 1) 3 -(11, 26, 1) 3 -(11, 27, 1) 4 -(11, 28, 1) 4 -(11, 29, 1) 5 -(11, 30, 1) 5 -(11, 31, 1) 6 -(11, 32, 1) 6 -(11, 33, 1) 6 -(11, 34, 1) 7 -(11, 35, 1) 7 -(11, 36, 1) 8 -(11, 37, 1) 8 -(11, 38, 1) 8 -(11, 39, 1) 8 -(11, 40, 1) 9 -(11, 41, 1) 9 -(11, 42, 1) 9 -(11, 43, 1) 9 -(11, 44, 1) 9 -(11, 45, 1) 10 -(11, 46, 1) 10 -(11, 47, 1) 10 -(11, 48, 1) 10 -(11, 49, 1) 10 -(11, 50, 1) 10 -(11, 51, 1) 10 -(11, 52, 1) 10 -(11, 53, 1) 10 -(11, 54, 1) 10 -(11, 55, 1) 10 -(11, 56, 1) 10 -(11, 57, 1) 9 -(11, 58, 1) 9 -(11, 59, 1) 9 -(11, 60, 1) 9 -(11, 61, 1) 9 -(11, 62, 1) 8 -(11, 63, 1) 8 -(11, 64, 1) 8 -(11, 65, 1) 8 -(11, 66, 1) 7 -(11, 67, 1) 7 -(11, 68, 1) 6 -(11, 69, 1) 6 -(11, 70, 1) 6 -(11, 71, 1) 5 -(11, 72, 1) 5 -(11, 73, 1) 4 -(11, 74, 1) 4 -(11, 75, 1) 3 -(11, 76, 1) 3 -(11, 77, 1) 2 -(11, 78, 1) 2 -(11, 79, 1) 1 -(11, 80, 1) 1 -(12, 21, 1) 1 -(12, 22, 1) 2 -(12, 23, 1) 3 -(12, 24, 1) 3 -(12, 25, 1) 4 -(12, 26, 1) 4 -(12, 27, 1) 5 -(12, 28, 1) 5 -(12, 29, 1) 6 -(12, 30, 1) 6 -(12, 31, 1) 7 -(12, 32, 1) 7 -(12, 33, 1) 7 -(12, 34, 1) 8 -(12, 35, 1) 8 -(12, 36, 1) 8 -(12, 37, 1) 9 -(12, 38, 1) 9 -(12, 39, 1) 9 -(12, 40, 1) 10 -(12, 41, 1) 10 -(12, 42, 1) 10 -(12, 43, 1) 10 -(12, 44, 1) 10 -(12, 45, 1) 11 -(12, 46, 1) 11 -(12, 47, 1) 11 -(12, 48, 1) 11 -(12, 49, 1) 11 -(12, 50, 1) 11 -(12, 51, 1) 11 -(12, 52, 1) 11 -(12, 53, 1) 11 -(12, 54, 1) 11 -(12, 55, 1) 11 -(12, 56, 1) 11 -(12, 57, 1) 10 -(12, 58, 1) 10 -(12, 59, 1) 10 -(12, 60, 1) 10 -(12, 61, 1) 10 -(12, 62, 1) 9 -(12, 63, 1) 9 -(12, 64, 1) 9 -(12, 65, 1) 8 -(12, 66, 1) 8 -(12, 67, 1) 8 -(12, 68, 1) 7 -(12, 69, 1) 7 -(12, 70, 1) 7 -(12, 71, 1) 6 -(12, 72, 1) 6 -(12, 73, 1) 5 -(12, 74, 1) 5 -(12, 75, 1) 4 -(12, 76, 1) 4 -(12, 77, 1) 3 -(12, 78, 1) 3 -(12, 79, 1) 2 -(12, 80, 1) 1 -(13, 21, 1) 2 -(13, 22, 1) 3 -(13, 23, 1) 3 -(13, 24, 1) 4 -(13, 25, 1) 5 -(13, 26, 1) 5 -(13, 27, 1) 6 -(13, 28, 1) 6 -(13, 29, 1) 7 -(13, 30, 1) 7 -(13, 31, 1) 7 -(13, 32, 1) 8 -(13, 33, 1) 8 -(13, 34, 1) 9 -(13, 35, 1) 9 -(13, 36, 1) 9 -(13, 37, 1) 10 -(13, 38, 1) 10 -(13, 39, 1) 10 -(13, 40, 1) 11 -(13, 41, 1) 11 -(13, 42, 1) 11 -(13, 43, 1) 11 -(13, 44, 1) 11 -(13, 45, 1) 12 -(13, 46, 1) 12 -(13, 47, 1) 12 -(13, 48, 1) 12 -(13, 49, 1) 12 -(13, 50, 1) 12 -(13, 51, 1) 12 -(13, 52, 1) 12 -(13, 53, 1) 12 -(13, 54, 1) 12 -(13, 55, 1) 12 -(13, 56, 1) 12 -(13, 57, 1) 11 -(13, 58, 1) 11 -(13, 59, 1) 11 -(13, 60, 1) 11 -(13, 61, 1) 11 -(13, 62, 1) 10 -(13, 63, 1) 10 -(13, 64, 1) 10 -(13, 65, 1) 9 -(13, 66, 1) 9 -(13, 67, 1) 9 -(13, 68, 1) 8 -(13, 69, 1) 8 -(13, 70, 1) 7 -(13, 71, 1) 7 -(13, 72, 1) 7 -(13, 73, 1) 6 -(13, 74, 1) 6 -(13, 75, 1) 5 -(13, 76, 1) 5 -(13, 77, 1) 4 -(13, 78, 1) 3 -(13, 79, 1) 3 -(13, 80, 1) 2 -(14, 16, 1) 0 -(14, 17, 1) 1 -(14, 18, 1) 1 -(14, 19, 1) 2 -(14, 20, 1) 2 -(14, 21, 1) 3 -(14, 22, 1) 4 -(14, 23, 1) 4 -(14, 24, 1) 5 -(14, 25, 1) 5 -(14, 26, 1) 6 -(14, 27, 1) 6 -(14, 28, 1) 7 -(14, 29, 1) 7 -(14, 30, 1) 8 -(14, 31, 1) 8 -(14, 32, 1) 9 -(14, 33, 1) 9 -(14, 34, 1) 10 -(14, 35, 1) 10 -(14, 36, 1) 10 -(14, 37, 1) 11 -(14, 38, 1) 11 -(14, 39, 1) 11 -(14, 40, 1) 12 -(14, 41, 1) 12 -(14, 42, 1) 12 -(14, 43, 1) 12 -(14, 44, 1) 12 -(14, 45, 1) 13 -(14, 46, 1) 13 -(14, 47, 1) 13 -(14, 48, 1) 13 -(14, 49, 1) 13 -(14, 50, 1) 13 -(14, 51, 1) 13 -(14, 52, 1) 13 -(14, 53, 1) 13 -(14, 54, 1) 13 -(14, 55, 1) 13 -(14, 56, 1) 13 -(14, 57, 1) 12 -(14, 58, 1) 12 -(14, 59, 1) 12 -(14, 60, 1) 12 -(14, 61, 1) 12 -(14, 62, 1) 11 -(14, 63, 1) 11 -(14, 64, 1) 11 -(14, 65, 1) 10 -(14, 66, 1) 10 -(14, 67, 1) 10 -(14, 68, 1) 9 -(14, 69, 1) 9 -(14, 70, 1) 8 -(14, 71, 1) 8 -(14, 72, 1) 7 -(14, 73, 1) 7 -(14, 74, 1) 6 -(14, 75, 1) 6 -(14, 76, 1) 5 -(14, 77, 1) 5 -(14, 78, 1) 4 -(14, 79, 1) 4 -(14, 80, 1) 3 -(14, 81, 1) 2 -(14, 82, 1) 2 -(14, 83, 1) 1 -(14, 84, 1) 1 -(14, 85, 1) 0 -(15, 16, 1) 1 -(15, 17, 1) 1 -(15, 18, 1) 2 -(15, 19, 1) 3 -(15, 20, 1) 3 -(15, 21, 1) 4 -(15, 22, 1) 4 -(15, 23, 1) 5 -(15, 24, 1) 6 -(15, 25, 1) 6 -(15, 26, 1) 7 -(15, 27, 1) 7 -(15, 28, 1) 8 -(15, 29, 1) 8 -(15, 30, 1) 9 -(15, 31, 1) 9 -(15, 32, 1) 10 -(15, 33, 1) 10 -(15, 34, 1) 11 -(15, 35, 1) 11 -(15, 36, 1) 11 -(15, 37, 1) 12 -(15, 38, 1) 12 -(15, 39, 1) 12 -(15, 40, 1) 13 -(15, 41, 1) 13 -(15, 42, 1) 13 -(15, 43, 1) 13 -(15, 44, 1) 13 -(15, 45, 1) 14 -(15, 46, 1) 14 -(15, 47, 1) 14 -(15, 48, 1) 14 -(15, 49, 1) 14 -(15, 50, 1) 14 -(15, 51, 1) 14 -(15, 52, 1) 14 -(15, 53, 1) 14 -(15, 54, 1) 14 -(15, 55, 1) 14 -(15, 56, 1) 14 -(15, 57, 1) 13 -(15, 58, 1) 13 -(15, 59, 1) 13 -(15, 60, 1) 13 -(15, 61, 1) 13 -(15, 62, 1) 12 -(15, 63, 1) 12 -(15, 64, 1) 12 -(15, 65, 1) 11 -(15, 66, 1) 11 -(15, 67, 1) 11 -(15, 68, 1) 10 -(15, 69, 1) 10 -(15, 70, 1) 9 -(15, 71, 1) 9 -(15, 72, 1) 8 -(15, 73, 1) 8 -(15, 74, 1) 7 -(15, 75, 1) 7 -(15, 76, 1) 6 -(15, 77, 1) 6 -(15, 78, 1) 5 -(15, 79, 1) 4 -(15, 80, 1) 4 -(15, 81, 1) 3 -(15, 82, 1) 3 -(15, 83, 1) 2 -(15, 84, 1) 1 -(15, 85, 1) 1 -(16, 14, 1) 0 -(16, 15, 1) 1 -(16, 16, 1) 1 -(16, 17, 1) 2 -(16, 18, 1) 2 -(16, 19, 1) 3 -(16, 20, 1) 4 -(16, 21, 1) 4 -(16, 22, 1) 5 -(16, 23, 1) 6 -(16, 24, 1) 6 -(16, 25, 1) 7 -(16, 26, 1) 7 -(16, 27, 1) 8 -(16, 28, 1) 9 -(16, 29, 1) 9 -(16, 30, 1) 10 -(16, 31, 1) 10 -(16, 32, 1) 11 -(16, 33, 1) 11 -(16, 34, 1) 11 -(16, 35, 1) 12 -(16, 36, 1) 12 -(16, 37, 1) 13 -(16, 38, 1) 13 -(16, 39, 1) 13 -(16, 40, 1) 13 -(16, 41, 1) 14 -(16, 42, 1) 14 -(16, 43, 1) 14 -(16, 44, 1) 14 -(16, 45, 1) 15 -(16, 46, 1) 15 -(16, 47, 1) 15 -(16, 48, 1) 15 -(16, 49, 1) 15 -(16, 50, 1) 15 -(16, 51, 1) 15 -(16, 52, 1) 15 -(16, 53, 1) 15 -(16, 54, 1) 15 -(16, 55, 1) 15 -(16, 56, 1) 15 -(16, 57, 1) 14 -(16, 58, 1) 14 -(16, 59, 1) 14 -(16, 60, 1) 14 -(16, 61, 1) 13 -(16, 62, 1) 13 -(16, 63, 1) 13 -(16, 64, 1) 13 -(16, 65, 1) 12 -(16, 66, 1) 12 -(16, 67, 1) 11 -(16, 68, 1) 11 -(16, 69, 1) 11 -(16, 70, 1) 10 -(16, 71, 1) 10 -(16, 72, 1) 9 -(16, 73, 1) 9 -(16, 74, 1) 8 -(16, 75, 1) 7 -(16, 76, 1) 7 -(16, 77, 1) 6 -(16, 78, 1) 6 -(16, 79, 1) 5 -(16, 80, 1) 4 -(16, 81, 1) 4 -(16, 82, 1) 3 -(16, 83, 1) 2 -(16, 84, 1) 2 -(16, 85, 1) 1 -(16, 86, 1) 1 -(16, 87, 1) 0 -(17, 14, 1) 1 -(17, 15, 1) 1 -(17, 16, 1) 2 -(17, 17, 1) 3 -(17, 18, 1) 3 -(17, 19, 1) 4 -(17, 20, 1) 5 -(17, 21, 1) 5 -(17, 22, 1) 6 -(17, 23, 1) 6 -(17, 24, 1) 7 -(17, 25, 1) 8 -(17, 26, 1) 8 -(17, 27, 1) 9 -(17, 28, 1) 9 -(17, 29, 1) 10 -(17, 30, 1) 10 -(17, 31, 1) 11 -(17, 32, 1) 11 -(17, 33, 1) 12 -(17, 34, 1) 12 -(17, 35, 1) 13 -(17, 36, 1) 13 -(17, 37, 1) 13 -(17, 38, 1) 14 -(17, 39, 1) 14 -(17, 40, 1) 14 -(17, 41, 1) 15 -(17, 42, 1) 15 -(17, 43, 1) 15 -(17, 44, 1) 15 -(17, 45, 1) 16 -(17, 46, 1) 16 -(17, 47, 1) 16 -(17, 48, 1) 16 -(17, 49, 1) 16 -(17, 50, 1) 16 -(17, 51, 1) 16 -(17, 52, 1) 16 -(17, 53, 1) 16 -(17, 54, 1) 16 -(17, 55, 1) 16 -(17, 56, 1) 16 -(17, 57, 1) 15 -(17, 58, 1) 15 -(17, 59, 1) 15 -(17, 60, 1) 15 -(17, 61, 1) 14 -(17, 62, 1) 14 -(17, 63, 1) 14 -(17, 64, 1) 13 -(17, 65, 1) 13 -(17, 66, 1) 13 -(17, 67, 1) 12 -(17, 68, 1) 12 -(17, 69, 1) 11 -(17, 70, 1) 11 -(17, 71, 1) 10 -(17, 72, 1) 10 -(17, 73, 1) 9 -(17, 74, 1) 9 -(17, 75, 1) 8 -(17, 76, 1) 8 -(17, 77, 1) 7 -(17, 78, 1) 6 -(17, 79, 1) 6 -(17, 80, 1) 5 -(17, 81, 1) 5 -(17, 82, 1) 4 -(17, 83, 1) 3 -(17, 84, 1) 3 -(17, 85, 1) 2 -(17, 86, 1) 1 -(17, 87, 1) 1 -(18, 14, 1) 1 -(18, 15, 1) 2 -(18, 16, 1) 3 -(18, 17, 1) 3 -(18, 18, 1) 4 -(18, 19, 1) 5 -(18, 20, 1) 5 -(18, 21, 1) 6 -(18, 22, 1) 7 -(18, 23, 1) 7 -(18, 24, 1) 8 -(18, 25, 1) 8 -(18, 26, 1) 9 -(18, 27, 1) 10 -(18, 28, 1) 10 -(18, 29, 1) 11 -(18, 30, 1) 11 -(18, 31, 1) 12 -(18, 32, 1) 12 -(18, 33, 1) 13 -(18, 34, 1) 13 -(18, 35, 1) 14 -(18, 36, 1) 14 -(18, 37, 1) 14 -(18, 38, 1) 15 -(18, 39, 1) 15 -(18, 40, 1) 15 -(18, 41, 1) 16 -(18, 42, 1) 16 -(18, 43, 1) 16 -(18, 44, 1) 16 -(18, 45, 1) 17 -(18, 46, 1) 17 -(18, 47, 1) 17 -(18, 48, 1) 17 -(18, 49, 1) 17 -(18, 50, 1) 17 -(18, 51, 1) 17 -(18, 52, 1) 17 -(18, 53, 1) 17 -(18, 54, 1) 17 -(18, 55, 1) 17 -(18, 56, 1) 17 -(18, 57, 1) 16 -(18, 58, 1) 16 -(18, 59, 1) 16 -(18, 60, 1) 16 -(18, 61, 1) 15 -(18, 62, 1) 15 -(18, 63, 1) 15 -(18, 64, 1) 14 -(18, 65, 1) 14 -(18, 66, 1) 14 -(18, 67, 1) 13 -(18, 68, 1) 13 -(18, 69, 1) 12 -(18, 70, 1) 12 -(18, 71, 1) 11 -(18, 72, 1) 11 -(18, 73, 1) 10 -(18, 74, 1) 10 -(18, 75, 1) 9 -(18, 76, 1) 8 -(18, 77, 1) 8 -(18, 78, 1) 7 -(18, 79, 1) 7 -(18, 80, 1) 6 -(18, 81, 1) 5 -(18, 82, 1) 5 -(18, 83, 1) 4 -(18, 84, 1) 3 -(18, 85, 1) 3 -(18, 86, 1) 2 -(18, 87, 1) 1 -(19, 14, 1) 2 -(19, 15, 1) 3 -(19, 16, 1) 3 -(19, 17, 1) 4 -(19, 18, 1) 5 -(19, 19, 1) 5 -(19, 20, 1) 6 -(19, 21, 1) 7 -(19, 22, 1) 7 -(19, 23, 1) 8 -(19, 24, 1) 9 -(19, 25, 1) 9 -(19, 26, 1) 10 -(19, 27, 1) 10 -(19, 28, 1) 11 -(19, 29, 1) 12 -(19, 30, 1) 12 -(19, 31, 1) 13 -(19, 32, 1) 13 -(19, 33, 1) 14 -(19, 34, 1) 14 -(19, 35, 1) 15 -(19, 36, 1) 15 -(19, 37, 1) 15 -(19, 38, 1) 16 -(19, 39, 1) 16 -(19, 40, 1) 16 -(19, 41, 1) 17 -(19, 42, 1) 17 -(19, 43, 1) 17 -(19, 44, 1) 17 -(19, 45, 1) 18 -(19, 46, 1) 18 -(19, 47, 1) 18 -(19, 48, 1) 18 -(19, 49, 1) 18 -(19, 50, 1) 18 -(19, 51, 1) 18 -(19, 52, 1) 18 -(19, 53, 1) 18 -(19, 54, 1) 18 -(19, 55, 1) 18 -(19, 56, 1) 18 -(19, 57, 1) 17 -(19, 58, 1) 17 -(19, 59, 1) 17 -(19, 60, 1) 17 -(19, 61, 1) 16 -(19, 62, 1) 16 -(19, 63, 1) 16 -(19, 64, 1) 15 -(19, 65, 1) 15 -(19, 66, 1) 15 -(19, 67, 1) 14 -(19, 68, 1) 14 -(19, 69, 1) 13 -(19, 70, 1) 13 -(19, 71, 1) 12 -(19, 72, 1) 12 -(19, 73, 1) 11 -(19, 74, 1) 10 -(19, 75, 1) 10 -(19, 76, 1) 9 -(19, 77, 1) 9 -(19, 78, 1) 8 -(19, 79, 1) 7 -(19, 80, 1) 7 -(19, 81, 1) 6 -(19, 82, 1) 5 -(19, 83, 1) 5 -(19, 84, 1) 4 -(19, 85, 1) 3 -(19, 86, 1) 3 -(19, 87, 1) 2 -(20, 14, 1) 3 -(20, 15, 1) 3 -(20, 16, 1) 4 -(20, 17, 1) 5 -(20, 18, 1) 5 -(20, 19, 1) 6 -(20, 20, 1) 7 -(20, 21, 1) 7 -(20, 22, 1) 8 -(20, 23, 1) 9 -(20, 24, 1) 9 -(20, 25, 1) 10 -(20, 26, 1) 11 -(20, 27, 1) 11 -(20, 28, 1) 12 -(20, 29, 1) 12 -(20, 30, 1) 13 -(20, 31, 1) 14 -(20, 32, 1) 14 -(20, 33, 1) 15 -(20, 34, 1) 15 -(20, 35, 1) 15 -(20, 36, 1) 16 -(20, 37, 1) 16 -(20, 38, 1) 17 -(20, 39, 1) 17 -(20, 40, 1) 17 -(20, 41, 1) 18 -(20, 42, 1) 18 -(20, 43, 1) 18 -(20, 44, 1) 18 -(20, 45, 1) 19 -(20, 46, 1) 19 -(20, 47, 1) 19 -(20, 48, 1) 19 -(20, 49, 1) 19 -(20, 50, 1) 19 -(20, 51, 1) 19 -(20, 52, 1) 19 -(20, 53, 1) 19 -(20, 54, 1) 19 -(20, 55, 1) 19 -(20, 56, 1) 19 -(20, 57, 1) 18 -(20, 58, 1) 18 -(20, 59, 1) 18 -(20, 60, 1) 18 -(20, 61, 1) 17 -(20, 62, 1) 17 -(20, 63, 1) 17 -(20, 64, 1) 16 -(20, 65, 1) 16 -(20, 66, 1) 15 -(20, 67, 1) 15 -(20, 68, 1) 15 -(20, 69, 1) 14 -(20, 70, 1) 14 -(20, 71, 1) 13 -(20, 72, 1) 12 -(20, 73, 1) 12 -(20, 74, 1) 11 -(20, 75, 1) 11 -(20, 76, 1) 10 -(20, 77, 1) 9 -(20, 78, 1) 9 -(20, 79, 1) 8 -(20, 80, 1) 7 -(20, 81, 1) 7 -(20, 82, 1) 6 -(20, 83, 1) 5 -(20, 84, 1) 5 -(20, 85, 1) 4 -(20, 86, 1) 3 -(20, 87, 1) 3 -(21, 9, 1) 0 -(21, 10, 1) 0 -(21, 11, 1) 1 -(21, 12, 1) 1 -(21, 13, 1) 2 -(21, 14, 1) 3 -(21, 15, 1) 4 -(21, 16, 1) 4 -(21, 17, 1) 5 -(21, 18, 1) 6 -(21, 19, 1) 7 -(21, 20, 1) 7 -(21, 21, 1) 8 -(21, 22, 1) 9 -(21, 23, 1) 9 -(21, 24, 1) 10 -(21, 25, 1) 11 -(21, 26, 1) 11 -(21, 27, 1) 12 -(21, 28, 1) 13 -(21, 29, 1) 13 -(21, 30, 1) 14 -(21, 31, 1) 14 -(21, 32, 1) 15 -(21, 33, 1) 15 -(21, 34, 1) 16 -(21, 35, 1) 16 -(21, 36, 1) 17 -(21, 37, 1) 17 -(21, 38, 1) 18 -(21, 39, 1) 18 -(21, 40, 1) 18 -(21, 41, 1) 19 -(21, 42, 1) 19 -(21, 43, 1) 19 -(21, 44, 1) 19 -(21, 45, 1) 20 -(21, 46, 1) 20 -(21, 47, 1) 20 -(21, 48, 1) 20 -(21, 49, 1) 20 -(21, 50, 1) 20 -(21, 51, 1) 20 -(21, 52, 1) 20 -(21, 53, 1) 20 -(21, 54, 1) 20 -(21, 55, 1) 20 -(21, 56, 1) 20 -(21, 57, 1) 19 -(21, 58, 1) 19 -(21, 59, 1) 19 -(21, 60, 1) 19 -(21, 61, 1) 18 -(21, 62, 1) 18 -(21, 63, 1) 18 -(21, 64, 1) 17 -(21, 65, 1) 17 -(21, 66, 1) 16 -(21, 67, 1) 16 -(21, 68, 1) 15 -(21, 69, 1) 15 -(21, 70, 1) 14 -(21, 71, 1) 14 -(21, 72, 1) 13 -(21, 73, 1) 13 -(21, 74, 1) 12 -(21, 75, 1) 11 -(21, 76, 1) 11 -(21, 77, 1) 10 -(21, 78, 1) 9 -(21, 79, 1) 9 -(21, 80, 1) 8 -(21, 81, 1) 7 -(21, 82, 1) 7 -(21, 83, 1) 6 -(21, 84, 1) 5 -(21, 85, 1) 4 -(21, 86, 1) 4 -(21, 87, 1) 3 -(21, 88, 1) 2 -(21, 89, 1) 1 -(21, 90, 1) 1 -(21, 91, 1) 0 -(21, 92, 1) 0 -(22, 9, 1) 0 -(22, 10, 1) 1 -(22, 11, 1) 1 -(22, 12, 1) 2 -(22, 13, 1) 3 -(22, 14, 1) 4 -(22, 15, 1) 4 -(22, 16, 1) 5 -(22, 17, 1) 6 -(22, 18, 1) 7 -(22, 19, 1) 7 -(22, 20, 1) 8 -(22, 21, 1) 9 -(22, 22, 1) 9 -(22, 23, 1) 10 -(22, 24, 1) 11 -(22, 25, 1) 12 -(22, 26, 1) 12 -(22, 27, 1) 13 -(22, 28, 1) 13 -(22, 29, 1) 14 -(22, 30, 1) 15 -(22, 31, 1) 15 -(22, 32, 1) 16 -(22, 33, 1) 16 -(22, 34, 1) 17 -(22, 35, 1) 17 -(22, 36, 1) 18 -(22, 37, 1) 18 -(22, 38, 1) 18 -(22, 39, 1) 19 -(22, 40, 1) 19 -(22, 41, 1) 20 -(22, 42, 1) 20 -(22, 43, 1) 20 -(22, 44, 1) 20 -(22, 45, 1) 20 -(22, 46, 1) 21 -(22, 47, 1) 21 -(22, 48, 1) 21 -(22, 49, 1) 21 -(22, 50, 1) 21 -(22, 51, 1) 21 -(22, 52, 1) 21 -(22, 53, 1) 21 -(22, 54, 1) 21 -(22, 55, 1) 21 -(22, 56, 1) 20 -(22, 57, 1) 20 -(22, 58, 1) 20 -(22, 59, 1) 20 -(22, 60, 1) 20 -(22, 61, 1) 19 -(22, 62, 1) 19 -(22, 63, 1) 18 -(22, 64, 1) 18 -(22, 65, 1) 18 -(22, 66, 1) 17 -(22, 67, 1) 17 -(22, 68, 1) 16 -(22, 69, 1) 16 -(22, 70, 1) 15 -(22, 71, 1) 15 -(22, 72, 1) 14 -(22, 73, 1) 13 -(22, 74, 1) 13 -(22, 75, 1) 12 -(22, 76, 1) 12 -(22, 77, 1) 11 -(22, 78, 1) 10 -(22, 79, 1) 9 -(22, 80, 1) 9 -(22, 81, 1) 8 -(22, 82, 1) 7 -(22, 83, 1) 7 -(22, 84, 1) 6 -(22, 85, 1) 5 -(22, 86, 1) 4 -(22, 87, 1) 4 -(22, 88, 1) 3 -(22, 89, 1) 2 -(22, 90, 1) 1 -(22, 91, 1) 1 -(22, 92, 1) 0 -(23, 9, 1) 0 -(23, 10, 1) 1 -(23, 11, 1) 2 -(23, 12, 1) 3 -(23, 13, 1) 3 -(23, 14, 1) 4 -(23, 15, 1) 5 -(23, 16, 1) 6 -(23, 17, 1) 7 -(23, 18, 1) 7 -(23, 19, 1) 8 -(23, 20, 1) 9 -(23, 21, 1) 9 -(23, 22, 1) 10 -(23, 23, 1) 11 -(23, 24, 1) 12 -(23, 25, 1) 12 -(23, 26, 1) 13 -(23, 27, 1) 14 -(23, 28, 1) 14 -(23, 29, 1) 15 -(23, 30, 1) 15 -(23, 31, 1) 16 -(23, 32, 1) 17 -(23, 33, 1) 17 -(23, 34, 1) 18 -(23, 35, 1) 18 -(23, 36, 1) 19 -(23, 37, 1) 19 -(23, 38, 1) 19 -(23, 39, 1) 20 -(23, 40, 1) 20 -(23, 41, 1) 20 -(23, 42, 1) 21 -(23, 43, 1) 21 -(23, 44, 1) 21 -(23, 45, 1) 21 -(23, 46, 1) 22 -(23, 47, 1) 22 -(23, 48, 1) 22 -(23, 49, 1) 22 -(23, 50, 1) 22 -(23, 51, 1) 22 -(23, 52, 1) 22 -(23, 53, 1) 22 -(23, 54, 1) 22 -(23, 55, 1) 22 -(23, 56, 1) 21 -(23, 57, 1) 21 -(23, 58, 1) 21 -(23, 59, 1) 21 -(23, 60, 1) 20 -(23, 61, 1) 20 -(23, 62, 1) 20 -(23, 63, 1) 19 -(23, 64, 1) 19 -(23, 65, 1) 19 -(23, 66, 1) 18 -(23, 67, 1) 18 -(23, 68, 1) 17 -(23, 69, 1) 17 -(23, 70, 1) 16 -(23, 71, 1) 15 -(23, 72, 1) 15 -(23, 73, 1) 14 -(23, 74, 1) 14 -(23, 75, 1) 13 -(23, 76, 1) 12 -(23, 77, 1) 12 -(23, 78, 1) 11 -(23, 79, 1) 10 -(23, 80, 1) 9 -(23, 81, 1) 9 -(23, 82, 1) 8 -(23, 83, 1) 7 -(23, 84, 1) 7 -(23, 85, 1) 6 -(23, 86, 1) 5 -(23, 87, 1) 4 -(23, 88, 1) 3 -(23, 89, 1) 3 -(23, 90, 1) 2 -(23, 91, 1) 1 -(23, 92, 1) 0 -(24, 9, 1) 1 -(24, 10, 1) 2 -(24, 11, 1) 2 -(24, 12, 1) 3 -(24, 13, 1) 4 -(24, 14, 1) 5 -(24, 15, 1) 6 -(24, 16, 1) 6 -(24, 17, 1) 7 -(24, 18, 1) 8 -(24, 19, 1) 9 -(24, 20, 1) 9 -(24, 21, 1) 10 -(24, 22, 1) 11 -(24, 23, 1) 12 -(24, 24, 1) 12 -(24, 25, 1) 13 -(24, 26, 1) 14 -(24, 27, 1) 14 -(24, 28, 1) 15 -(24, 29, 1) 16 -(24, 30, 1) 16 -(24, 31, 1) 17 -(24, 32, 1) 17 -(24, 33, 1) 18 -(24, 34, 1) 18 -(24, 35, 1) 19 -(24, 36, 1) 19 -(24, 37, 1) 20 -(24, 38, 1) 20 -(24, 39, 1) 21 -(24, 40, 1) 21 -(24, 41, 1) 21 -(24, 42, 1) 22 -(24, 43, 1) 22 -(24, 44, 1) 22 -(24, 45, 1) 22 -(24, 46, 1) 23 -(24, 47, 1) 23 -(24, 48, 1) 23 -(24, 49, 1) 23 -(24, 50, 1) 23 -(24, 51, 1) 23 -(24, 52, 1) 23 -(24, 53, 1) 23 -(24, 54, 1) 23 -(24, 55, 1) 23 -(24, 56, 1) 22 -(24, 57, 1) 22 -(24, 58, 1) 22 -(24, 59, 1) 22 -(24, 60, 1) 21 -(24, 61, 1) 21 -(24, 62, 1) 21 -(24, 63, 1) 20 -(24, 64, 1) 20 -(24, 65, 1) 19 -(24, 66, 1) 19 -(24, 67, 1) 18 -(24, 68, 1) 18 -(24, 69, 1) 17 -(24, 70, 1) 17 -(24, 71, 1) 16 -(24, 72, 1) 16 -(24, 73, 1) 15 -(24, 74, 1) 14 -(24, 75, 1) 14 -(24, 76, 1) 13 -(24, 77, 1) 12 -(24, 78, 1) 12 -(24, 79, 1) 11 -(24, 80, 1) 10 -(24, 81, 1) 9 -(24, 82, 1) 9 -(24, 83, 1) 8 -(24, 84, 1) 7 -(24, 85, 1) 6 -(24, 86, 1) 6 -(24, 87, 1) 5 -(24, 88, 1) 4 -(24, 89, 1) 3 -(24, 90, 1) 2 -(24, 91, 1) 2 -(24, 92, 1) 1 -(25, 9, 1) 1 -(25, 10, 1) 2 -(25, 11, 1) 3 -(25, 12, 1) 4 -(25, 13, 1) 5 -(25, 14, 1) 5 -(25, 15, 1) 6 -(25, 16, 1) 7 -(25, 17, 1) 8 -(25, 18, 1) 9 -(25, 19, 1) 9 -(25, 20, 1) 10 -(25, 21, 1) 11 -(25, 22, 1) 12 -(25, 23, 1) 12 -(25, 24, 1) 13 -(25, 25, 1) 14 -(25, 26, 1) 14 -(25, 27, 1) 15 -(25, 28, 1) 16 -(25, 29, 1) 16 -(25, 30, 1) 17 -(25, 31, 1) 18 -(25, 32, 1) 18 -(25, 33, 1) 19 -(25, 34, 1) 19 -(25, 35, 1) 20 -(25, 36, 1) 20 -(25, 37, 1) 21 -(25, 38, 1) 21 -(25, 39, 1) 22 -(25, 40, 1) 22 -(25, 41, 1) 22 -(25, 42, 1) 23 -(25, 43, 1) 23 -(25, 44, 1) 23 -(25, 45, 1) 23 -(25, 46, 1) 24 -(25, 47, 1) 24 -(25, 48, 1) 24 -(25, 49, 1) 24 -(25, 50, 1) 24 -(25, 51, 1) 24 -(25, 52, 1) 24 -(25, 53, 1) 24 -(25, 54, 1) 24 -(25, 55, 1) 24 -(25, 56, 1) 23 -(25, 57, 1) 23 -(25, 58, 1) 23 -(25, 59, 1) 23 -(25, 60, 1) 22 -(25, 61, 1) 22 -(25, 62, 1) 22 -(25, 63, 1) 21 -(25, 64, 1) 21 -(25, 65, 1) 20 -(25, 66, 1) 20 -(25, 67, 1) 19 -(25, 68, 1) 19 -(25, 69, 1) 18 -(25, 70, 1) 18 -(25, 71, 1) 17 -(25, 72, 1) 16 -(25, 73, 1) 16 -(25, 74, 1) 15 -(25, 75, 1) 14 -(25, 76, 1) 14 -(25, 77, 1) 13 -(25, 78, 1) 12 -(25, 79, 1) 12 -(25, 80, 1) 11 -(25, 81, 1) 10 -(25, 82, 1) 9 -(25, 83, 1) 9 -(25, 84, 1) 8 -(25, 85, 1) 7 -(25, 86, 1) 6 -(25, 87, 1) 5 -(25, 88, 1) 5 -(25, 89, 1) 4 -(25, 90, 1) 3 -(25, 91, 1) 2 -(25, 92, 1) 1 -(26, 6, 1) 0 -(26, 7, 1) 0 -(26, 8, 1) 1 -(26, 9, 1) 2 -(26, 10, 1) 3 -(26, 11, 1) 3 -(26, 12, 1) 4 -(26, 13, 1) 5 -(26, 14, 1) 6 -(26, 15, 1) 7 -(26, 16, 1) 7 -(26, 17, 1) 8 -(26, 18, 1) 9 -(26, 19, 1) 10 -(26, 20, 1) 11 -(26, 21, 1) 11 -(26, 22, 1) 12 -(26, 23, 1) 13 -(26, 24, 1) 14 -(26, 25, 1) 14 -(26, 26, 1) 15 -(26, 27, 1) 16 -(26, 28, 1) 16 -(26, 29, 1) 17 -(26, 30, 1) 18 -(26, 31, 1) 18 -(26, 32, 1) 19 -(26, 33, 1) 19 -(26, 34, 1) 20 -(26, 35, 1) 21 -(26, 36, 1) 21 -(26, 37, 1) 22 -(26, 38, 1) 22 -(26, 39, 1) 22 -(26, 40, 1) 23 -(26, 41, 1) 23 -(26, 42, 1) 24 -(26, 43, 1) 24 -(26, 44, 1) 24 -(26, 45, 1) 24 -(26, 46, 1) 25 -(26, 47, 1) 25 -(26, 48, 1) 25 -(26, 49, 1) 25 -(26, 50, 1) 25 -(26, 51, 1) 25 -(26, 52, 1) 25 -(26, 53, 1) 25 -(26, 54, 1) 25 -(26, 55, 1) 25 -(26, 56, 1) 24 -(26, 57, 1) 24 -(26, 58, 1) 24 -(26, 59, 1) 24 -(26, 60, 1) 23 -(26, 61, 1) 23 -(26, 62, 1) 22 -(26, 63, 1) 22 -(26, 64, 1) 22 -(26, 65, 1) 21 -(26, 66, 1) 21 -(26, 67, 1) 20 -(26, 68, 1) 19 -(26, 69, 1) 19 -(26, 70, 1) 18 -(26, 71, 1) 18 -(26, 72, 1) 17 -(26, 73, 1) 16 -(26, 74, 1) 16 -(26, 75, 1) 15 -(26, 76, 1) 14 -(26, 77, 1) 14 -(26, 78, 1) 13 -(26, 79, 1) 12 -(26, 80, 1) 11 -(26, 81, 1) 11 -(26, 82, 1) 10 -(26, 83, 1) 9 -(26, 84, 1) 8 -(26, 85, 1) 7 -(26, 86, 1) 7 -(26, 87, 1) 6 -(26, 88, 1) 5 -(26, 89, 1) 4 -(26, 90, 1) 3 -(26, 91, 1) 3 -(26, 92, 1) 2 -(26, 93, 1) 1 -(26, 94, 1) 0 -(26, 95, 1) 0 -(27, 6, 1) 0 -(27, 7, 1) 0 -(27, 8, 1) 1 -(27, 9, 1) 2 -(27, 10, 1) 3 -(27, 11, 1) 4 -(27, 12, 1) 5 -(27, 13, 1) 6 -(27, 14, 1) 6 -(27, 15, 1) 7 -(27, 16, 1) 8 -(27, 17, 1) 9 -(27, 18, 1) 10 -(27, 19, 1) 10 -(27, 20, 1) 11 -(27, 21, 1) 12 -(27, 22, 1) 13 -(27, 23, 1) 14 -(27, 24, 1) 14 -(27, 25, 1) 15 -(27, 26, 1) 16 -(27, 27, 1) 16 -(27, 28, 1) 17 -(27, 29, 1) 18 -(27, 30, 1) 18 -(27, 31, 1) 19 -(27, 32, 1) 20 -(27, 33, 1) 20 -(27, 34, 1) 21 -(27, 35, 1) 21 -(27, 36, 1) 22 -(27, 37, 1) 22 -(27, 38, 1) 23 -(27, 39, 1) 23 -(27, 40, 1) 24 -(27, 41, 1) 24 -(27, 42, 1) 25 -(27, 43, 1) 25 -(27, 44, 1) 25 -(27, 45, 1) 25 -(27, 46, 1) 26 -(27, 47, 1) 26 -(27, 48, 1) 26 -(27, 49, 1) 26 -(27, 50, 1) 26 -(27, 51, 1) 26 -(27, 52, 1) 26 -(27, 53, 1) 26 -(27, 54, 1) 26 -(27, 55, 1) 26 -(27, 56, 1) 25 -(27, 57, 1) 25 -(27, 58, 1) 25 -(27, 59, 1) 25 -(27, 60, 1) 24 -(27, 61, 1) 24 -(27, 62, 1) 23 -(27, 63, 1) 23 -(27, 64, 1) 22 -(27, 65, 1) 22 -(27, 66, 1) 21 -(27, 67, 1) 21 -(27, 68, 1) 20 -(27, 69, 1) 20 -(27, 70, 1) 19 -(27, 71, 1) 18 -(27, 72, 1) 18 -(27, 73, 1) 17 -(27, 74, 1) 16 -(27, 75, 1) 16 -(27, 76, 1) 15 -(27, 77, 1) 14 -(27, 78, 1) 14 -(27, 79, 1) 13 -(27, 80, 1) 12 -(27, 81, 1) 11 -(27, 82, 1) 10 -(27, 83, 1) 10 -(27, 84, 1) 9 -(27, 85, 1) 8 -(27, 86, 1) 7 -(27, 87, 1) 6 -(27, 88, 1) 6 -(27, 89, 1) 5 -(27, 90, 1) 4 -(27, 91, 1) 3 -(27, 92, 1) 2 -(27, 93, 1) 1 -(27, 94, 1) 0 -(27, 95, 1) 0 -(28, 6, 1) 0 -(28, 7, 1) 1 -(28, 8, 1) 2 -(28, 9, 1) 3 -(28, 10, 1) 4 -(28, 11, 1) 4 -(28, 12, 1) 5 -(28, 13, 1) 6 -(28, 14, 1) 7 -(28, 15, 1) 8 -(28, 16, 1) 9 -(28, 17, 1) 9 -(28, 18, 1) 10 -(28, 19, 1) 11 -(28, 20, 1) 12 -(28, 21, 1) 13 -(28, 22, 1) 13 -(28, 23, 1) 14 -(28, 24, 1) 15 -(28, 25, 1) 16 -(28, 26, 1) 16 -(28, 27, 1) 17 -(28, 28, 1) 18 -(28, 29, 1) 19 -(28, 30, 1) 19 -(28, 31, 1) 20 -(28, 32, 1) 20 -(28, 33, 1) 21 -(28, 34, 1) 22 -(28, 35, 1) 22 -(28, 36, 1) 23 -(28, 37, 1) 23 -(28, 38, 1) 24 -(28, 39, 1) 24 -(28, 40, 1) 25 -(28, 41, 1) 25 -(28, 42, 1) 25 -(28, 43, 1) 26 -(28, 44, 1) 26 -(28, 45, 1) 26 -(28, 46, 1) 27 -(28, 47, 1) 27 -(28, 48, 1) 27 -(28, 49, 1) 27 -(28, 50, 1) 27 -(28, 51, 1) 27 -(28, 52, 1) 27 -(28, 53, 1) 27 -(28, 54, 1) 27 -(28, 55, 1) 27 -(28, 56, 1) 26 -(28, 57, 1) 26 -(28, 58, 1) 26 -(28, 59, 1) 25 -(28, 60, 1) 25 -(28, 61, 1) 25 -(28, 62, 1) 24 -(28, 63, 1) 24 -(28, 64, 1) 23 -(28, 65, 1) 23 -(28, 66, 1) 22 -(28, 67, 1) 22 -(28, 68, 1) 21 -(28, 69, 1) 20 -(28, 70, 1) 20 -(28, 71, 1) 19 -(28, 72, 1) 19 -(28, 73, 1) 18 -(28, 74, 1) 17 -(28, 75, 1) 16 -(28, 76, 1) 16 -(28, 77, 1) 15 -(28, 78, 1) 14 -(28, 79, 1) 13 -(28, 80, 1) 13 -(28, 81, 1) 12 -(28, 82, 1) 11 -(28, 83, 1) 10 -(28, 84, 1) 9 -(28, 85, 1) 9 -(28, 86, 1) 8 -(28, 87, 1) 7 -(28, 88, 1) 6 -(28, 89, 1) 5 -(28, 90, 1) 4 -(28, 91, 1) 4 -(28, 92, 1) 3 -(28, 93, 1) 2 -(28, 94, 1) 1 -(28, 95, 1) 0 -(29, 6, 1) 1 -(29, 7, 1) 1 -(29, 8, 1) 2 -(29, 9, 1) 3 -(29, 10, 1) 4 -(29, 11, 1) 5 -(29, 12, 1) 6 -(29, 13, 1) 7 -(29, 14, 1) 7 -(29, 15, 1) 8 -(29, 16, 1) 9 -(29, 17, 1) 10 -(29, 18, 1) 11 -(29, 19, 1) 12 -(29, 20, 1) 12 -(29, 21, 1) 13 -(29, 22, 1) 14 -(29, 23, 1) 15 -(29, 24, 1) 16 -(29, 25, 1) 16 -(29, 26, 1) 17 -(29, 27, 1) 18 -(29, 28, 1) 19 -(29, 29, 1) 19 -(29, 30, 1) 20 -(29, 31, 1) 21 -(29, 32, 1) 21 -(29, 33, 1) 22 -(29, 34, 1) 23 -(29, 35, 1) 23 -(29, 36, 1) 24 -(29, 37, 1) 24 -(29, 38, 1) 25 -(29, 39, 1) 25 -(29, 40, 1) 26 -(29, 41, 1) 26 -(29, 42, 1) 26 -(29, 43, 1) 27 -(29, 44, 1) 27 -(29, 45, 1) 27 -(29, 46, 1) 28 -(29, 47, 1) 28 -(29, 48, 1) 28 -(29, 49, 1) 28 -(29, 50, 1) 28 -(29, 51, 1) 28 -(29, 52, 1) 28 -(29, 53, 1) 28 -(29, 54, 1) 28 -(29, 55, 1) 28 -(29, 56, 1) 27 -(29, 57, 1) 27 -(29, 58, 1) 27 -(29, 59, 1) 26 -(29, 60, 1) 26 -(29, 61, 1) 26 -(29, 62, 1) 25 -(29, 63, 1) 25 -(29, 64, 1) 24 -(29, 65, 1) 24 -(29, 66, 1) 23 -(29, 67, 1) 23 -(29, 68, 1) 22 -(29, 69, 1) 21 -(29, 70, 1) 21 -(29, 71, 1) 20 -(29, 72, 1) 19 -(29, 73, 1) 19 -(29, 74, 1) 18 -(29, 75, 1) 17 -(29, 76, 1) 16 -(29, 77, 1) 16 -(29, 78, 1) 15 -(29, 79, 1) 14 -(29, 80, 1) 13 -(29, 81, 1) 12 -(29, 82, 1) 12 -(29, 83, 1) 11 -(29, 84, 1) 10 -(29, 85, 1) 9 -(29, 86, 1) 8 -(29, 87, 1) 7 -(29, 88, 1) 7 -(29, 89, 1) 6 -(29, 90, 1) 5 -(29, 91, 1) 4 -(29, 92, 1) 3 -(29, 93, 1) 2 -(29, 94, 1) 1 -(29, 95, 1) 1 -(30, 6, 1) 1 -(30, 7, 1) 2 -(30, 8, 1) 3 -(30, 9, 1) 4 -(30, 10, 1) 5 -(30, 11, 1) 5 -(30, 12, 1) 6 -(30, 13, 1) 7 -(30, 14, 1) 8 -(30, 15, 1) 9 -(30, 16, 1) 10 -(30, 17, 1) 11 -(30, 18, 1) 11 -(30, 19, 1) 12 -(30, 20, 1) 13 -(30, 21, 1) 14 -(30, 22, 1) 15 -(30, 23, 1) 15 -(30, 24, 1) 16 -(30, 25, 1) 17 -(30, 26, 1) 18 -(30, 27, 1) 19 -(30, 28, 1) 19 -(30, 29, 1) 20 -(30, 30, 1) 21 -(30, 31, 1) 21 -(30, 32, 1) 22 -(30, 33, 1) 23 -(30, 34, 1) 23 -(30, 35, 1) 24 -(30, 36, 1) 24 -(30, 37, 1) 25 -(30, 38, 1) 26 -(30, 39, 1) 26 -(30, 40, 1) 27 -(30, 41, 1) 27 -(30, 42, 1) 27 -(30, 43, 1) 28 -(30, 44, 1) 28 -(30, 45, 1) 28 -(30, 46, 1) 29 -(30, 47, 1) 29 -(30, 48, 1) 29 -(30, 49, 1) 29 -(30, 50, 1) 29 -(30, 51, 1) 29 -(30, 52, 1) 29 -(30, 53, 1) 29 -(30, 54, 1) 29 -(30, 55, 1) 29 -(30, 56, 1) 28 -(30, 57, 1) 28 -(30, 58, 1) 28 -(30, 59, 1) 27 -(30, 60, 1) 27 -(30, 61, 1) 27 -(30, 62, 1) 26 -(30, 63, 1) 26 -(30, 64, 1) 25 -(30, 65, 1) 24 -(30, 66, 1) 24 -(30, 67, 1) 23 -(30, 68, 1) 23 -(30, 69, 1) 22 -(30, 70, 1) 21 -(30, 71, 1) 21 -(30, 72, 1) 20 -(30, 73, 1) 19 -(30, 74, 1) 19 -(30, 75, 1) 18 -(30, 76, 1) 17 -(30, 77, 1) 16 -(30, 78, 1) 15 -(30, 79, 1) 15 -(30, 80, 1) 14 -(30, 81, 1) 13 -(30, 82, 1) 12 -(30, 83, 1) 11 -(30, 84, 1) 11 -(30, 85, 1) 10 -(30, 86, 1) 9 -(30, 87, 1) 8 -(30, 88, 1) 7 -(30, 89, 1) 6 -(30, 90, 1) 5 -(30, 91, 1) 5 -(30, 92, 1) 4 -(30, 93, 1) 3 -(30, 94, 1) 2 -(30, 95, 1) 1 -(31, 6, 1) 1 -(31, 7, 1) 2 -(31, 8, 1) 3 -(31, 9, 1) 4 -(31, 10, 1) 5 -(31, 11, 1) 6 -(31, 12, 1) 7 -(31, 13, 1) 7 -(31, 14, 1) 8 -(31, 15, 1) 9 -(31, 16, 1) 10 -(31, 17, 1) 11 -(31, 18, 1) 12 -(31, 19, 1) 13 -(31, 20, 1) 13 -(31, 21, 1) 14 -(31, 22, 1) 15 -(31, 23, 1) 16 -(31, 24, 1) 17 -(31, 25, 1) 18 -(31, 26, 1) 18 -(31, 27, 1) 19 -(31, 28, 1) 20 -(31, 29, 1) 21 -(31, 30, 1) 21 -(31, 31, 1) 22 -(31, 32, 1) 23 -(31, 33, 1) 23 -(31, 34, 1) 24 -(31, 35, 1) 25 -(31, 36, 1) 25 -(31, 37, 1) 26 -(31, 38, 1) 26 -(31, 39, 1) 27 -(31, 40, 1) 27 -(31, 41, 1) 28 -(31, 42, 1) 28 -(31, 43, 1) 29 -(31, 44, 1) 29 -(31, 45, 1) 29 -(31, 46, 1) 30 -(31, 47, 1) 30 -(31, 48, 1) 30 -(31, 49, 1) 30 -(31, 50, 1) 30 -(31, 51, 1) 30 -(31, 52, 1) 30 -(31, 53, 1) 30 -(31, 54, 1) 30 -(31, 55, 1) 30 -(31, 56, 1) 29 -(31, 57, 1) 29 -(31, 58, 1) 29 -(31, 59, 1) 28 -(31, 60, 1) 28 -(31, 61, 1) 27 -(31, 62, 1) 27 -(31, 63, 1) 26 -(31, 64, 1) 26 -(31, 65, 1) 25 -(31, 66, 1) 25 -(31, 67, 1) 24 -(31, 68, 1) 23 -(31, 69, 1) 23 -(31, 70, 1) 22 -(31, 71, 1) 21 -(31, 72, 1) 21 -(31, 73, 1) 20 -(31, 74, 1) 19 -(31, 75, 1) 18 -(31, 76, 1) 18 -(31, 77, 1) 17 -(31, 78, 1) 16 -(31, 79, 1) 15 -(31, 80, 1) 14 -(31, 81, 1) 13 -(31, 82, 1) 13 -(31, 83, 1) 12 -(31, 84, 1) 11 -(31, 85, 1) 10 -(31, 86, 1) 9 -(31, 87, 1) 8 -(31, 88, 1) 7 -(31, 89, 1) 7 -(31, 90, 1) 6 -(31, 91, 1) 5 -(31, 92, 1) 4 -(31, 93, 1) 3 -(31, 94, 1) 2 -(31, 95, 1) 1 -(32, 6, 1) 2 -(32, 7, 1) 2 -(32, 8, 1) 3 -(32, 9, 1) 4 -(32, 10, 1) 5 -(32, 11, 1) 6 -(32, 12, 1) 7 -(32, 13, 1) 8 -(32, 14, 1) 9 -(32, 15, 1) 10 -(32, 16, 1) 11 -(32, 17, 1) 11 -(32, 18, 1) 12 -(32, 19, 1) 13 -(32, 20, 1) 14 -(32, 21, 1) 15 -(32, 22, 1) 16 -(32, 23, 1) 17 -(32, 24, 1) 17 -(32, 25, 1) 18 -(32, 26, 1) 19 -(32, 27, 1) 20 -(32, 28, 1) 20 -(32, 29, 1) 21 -(32, 30, 1) 22 -(32, 31, 1) 23 -(32, 32, 1) 23 -(32, 33, 1) 24 -(32, 34, 1) 25 -(32, 35, 1) 25 -(32, 36, 1) 26 -(32, 37, 1) 27 -(32, 38, 1) 27 -(32, 39, 1) 28 -(32, 40, 1) 28 -(32, 41, 1) 29 -(32, 42, 1) 29 -(32, 43, 1) 30 -(32, 44, 1) 30 -(32, 45, 1) 30 -(32, 46, 1) 30 -(32, 47, 1) 31 -(32, 48, 1) 31 -(32, 49, 1) 31 -(32, 50, 1) 31 -(32, 51, 1) 31 -(32, 52, 1) 31 -(32, 53, 1) 31 -(32, 54, 1) 31 -(32, 55, 1) 30 -(32, 56, 1) 30 -(32, 57, 1) 30 -(32, 58, 1) 30 -(32, 59, 1) 29 -(32, 60, 1) 29 -(32, 61, 1) 28 -(32, 62, 1) 28 -(32, 63, 1) 27 -(32, 64, 1) 27 -(32, 65, 1) 26 -(32, 66, 1) 25 -(32, 67, 1) 25 -(32, 68, 1) 24 -(32, 69, 1) 23 -(32, 70, 1) 23 -(32, 71, 1) 22 -(32, 72, 1) 21 -(32, 73, 1) 20 -(32, 74, 1) 20 -(32, 75, 1) 19 -(32, 76, 1) 18 -(32, 77, 1) 17 -(32, 78, 1) 17 -(32, 79, 1) 16 -(32, 80, 1) 15 -(32, 81, 1) 14 -(32, 82, 1) 13 -(32, 83, 1) 12 -(32, 84, 1) 11 -(32, 85, 1) 11 -(32, 86, 1) 10 -(32, 87, 1) 9 -(32, 88, 1) 8 -(32, 89, 1) 7 -(32, 90, 1) 6 -(32, 91, 1) 5 -(32, 92, 1) 4 -(32, 93, 1) 3 -(32, 94, 1) 2 -(32, 95, 1) 2 -(33, 6, 1) 2 -(33, 7, 1) 3 -(33, 8, 1) 4 -(33, 9, 1) 5 -(33, 10, 1) 6 -(33, 11, 1) 7 -(33, 12, 1) 7 -(33, 13, 1) 8 -(33, 14, 1) 9 -(33, 15, 1) 10 -(33, 16, 1) 11 -(33, 17, 1) 12 -(33, 18, 1) 13 -(33, 19, 1) 14 -(33, 20, 1) 15 -(33, 21, 1) 15 -(33, 22, 1) 16 -(33, 23, 1) 17 -(33, 24, 1) 18 -(33, 25, 1) 19 -(33, 26, 1) 20 -(33, 27, 1) 20 -(33, 28, 1) 21 -(33, 29, 1) 22 -(33, 30, 1) 23 -(33, 31, 1) 23 -(33, 32, 1) 24 -(33, 33, 1) 25 -(33, 34, 1) 26 -(33, 35, 1) 26 -(33, 36, 1) 27 -(33, 37, 1) 27 -(33, 38, 1) 28 -(33, 39, 1) 29 -(33, 40, 1) 29 -(33, 41, 1) 30 -(33, 42, 1) 30 -(33, 43, 1) 30 -(33, 44, 1) 31 -(33, 45, 1) 31 -(33, 46, 1) 31 -(33, 47, 1) 32 -(33, 48, 1) 32 -(33, 49, 1) 32 -(33, 50, 1) 32 -(33, 51, 1) 32 -(33, 52, 1) 32 -(33, 53, 1) 32 -(33, 54, 1) 32 -(33, 55, 1) 31 -(33, 56, 1) 31 -(33, 57, 1) 31 -(33, 58, 1) 30 -(33, 59, 1) 30 -(33, 60, 1) 30 -(33, 61, 1) 29 -(33, 62, 1) 29 -(33, 63, 1) 28 -(33, 64, 1) 27 -(33, 65, 1) 27 -(33, 66, 1) 26 -(33, 67, 1) 26 -(33, 68, 1) 25 -(33, 69, 1) 24 -(33, 70, 1) 23 -(33, 71, 1) 23 -(33, 72, 1) 22 -(33, 73, 1) 21 -(33, 74, 1) 20 -(33, 75, 1) 20 -(33, 76, 1) 19 -(33, 77, 1) 18 -(33, 78, 1) 17 -(33, 79, 1) 16 -(33, 80, 1) 15 -(33, 81, 1) 15 -(33, 82, 1) 14 -(33, 83, 1) 13 -(33, 84, 1) 12 -(33, 85, 1) 11 -(33, 86, 1) 10 -(33, 87, 1) 9 -(33, 88, 1) 8 -(33, 89, 1) 7 -(33, 90, 1) 7 -(33, 91, 1) 6 -(33, 92, 1) 5 -(33, 93, 1) 4 -(33, 94, 1) 3 -(33, 95, 1) 2 -(34, 6, 1) 2 -(34, 7, 1) 3 -(34, 8, 1) 4 -(34, 9, 1) 5 -(34, 10, 1) 6 -(34, 11, 1) 7 -(34, 12, 1) 8 -(34, 13, 1) 9 -(34, 14, 1) 10 -(34, 15, 1) 11 -(34, 16, 1) 11 -(34, 17, 1) 12 -(34, 18, 1) 13 -(34, 19, 1) 14 -(34, 20, 1) 15 -(34, 21, 1) 16 -(34, 22, 1) 17 -(34, 23, 1) 18 -(34, 24, 1) 18 -(34, 25, 1) 19 -(34, 26, 1) 20 -(34, 27, 1) 21 -(34, 28, 1) 22 -(34, 29, 1) 23 -(34, 30, 1) 23 -(34, 31, 1) 24 -(34, 32, 1) 25 -(34, 33, 1) 26 -(34, 34, 1) 26 -(34, 35, 1) 27 -(34, 36, 1) 28 -(34, 37, 1) 28 -(34, 38, 1) 29 -(34, 39, 1) 29 -(34, 40, 1) 30 -(34, 41, 1) 30 -(34, 42, 1) 31 -(34, 43, 1) 31 -(34, 44, 1) 32 -(34, 45, 1) 32 -(34, 46, 1) 32 -(34, 47, 1) 33 -(34, 48, 1) 33 -(34, 49, 1) 33 -(34, 50, 1) 33 -(34, 51, 1) 33 -(34, 52, 1) 33 -(34, 53, 1) 33 -(34, 54, 1) 33 -(34, 55, 1) 32 -(34, 56, 1) 32 -(34, 57, 1) 32 -(34, 58, 1) 31 -(34, 59, 1) 31 -(34, 60, 1) 30 -(34, 61, 1) 30 -(34, 62, 1) 29 -(34, 63, 1) 29 -(34, 64, 1) 28 -(34, 65, 1) 28 -(34, 66, 1) 27 -(34, 67, 1) 26 -(34, 68, 1) 26 -(34, 69, 1) 25 -(34, 70, 1) 24 -(34, 71, 1) 23 -(34, 72, 1) 23 -(34, 73, 1) 22 -(34, 74, 1) 21 -(34, 75, 1) 20 -(34, 76, 1) 19 -(34, 77, 1) 18 -(34, 78, 1) 18 -(34, 79, 1) 17 -(34, 80, 1) 16 -(34, 81, 1) 15 -(34, 82, 1) 14 -(34, 83, 1) 13 -(34, 84, 1) 12 -(34, 85, 1) 11 -(34, 86, 1) 11 -(34, 87, 1) 10 -(34, 88, 1) 9 -(34, 89, 1) 8 -(34, 90, 1) 7 -(34, 91, 1) 6 -(34, 92, 1) 5 -(34, 93, 1) 4 -(34, 94, 1) 3 -(34, 95, 1) 2 -(35, 6, 1) 3 -(35, 7, 1) 4 -(35, 8, 1) 5 -(35, 9, 1) 6 -(35, 10, 1) 6 -(35, 11, 1) 7 -(35, 12, 1) 8 -(35, 13, 1) 9 -(35, 14, 1) 10 -(35, 15, 1) 11 -(35, 16, 1) 12 -(35, 17, 1) 13 -(35, 18, 1) 14 -(35, 19, 1) 15 -(35, 20, 1) 16 -(35, 21, 1) 16 -(35, 22, 1) 17 -(35, 23, 1) 18 -(35, 24, 1) 19 -(35, 25, 1) 20 -(35, 26, 1) 21 -(35, 27, 1) 21 -(35, 28, 1) 22 -(35, 29, 1) 23 -(35, 30, 1) 24 -(35, 31, 1) 25 -(35, 32, 1) 25 -(35, 33, 1) 26 -(35, 34, 1) 27 -(35, 35, 1) 28 -(35, 36, 1) 28 -(35, 37, 1) 29 -(35, 38, 1) 30 -(35, 39, 1) 30 -(35, 40, 1) 31 -(35, 41, 1) 31 -(35, 42, 1) 32 -(35, 43, 1) 32 -(35, 44, 1) 33 -(35, 45, 1) 33 -(35, 46, 1) 33 -(35, 47, 1) 34 -(35, 48, 1) 34 -(35, 49, 1) 34 -(35, 50, 1) 34 -(35, 51, 1) 34 -(35, 52, 1) 34 -(35, 53, 1) 34 -(35, 54, 1) 34 -(35, 55, 1) 33 -(35, 56, 1) 33 -(35, 57, 1) 33 -(35, 58, 1) 32 -(35, 59, 1) 32 -(35, 60, 1) 31 -(35, 61, 1) 31 -(35, 62, 1) 30 -(35, 63, 1) 30 -(35, 64, 1) 29 -(35, 65, 1) 28 -(35, 66, 1) 28 -(35, 67, 1) 27 -(35, 68, 1) 26 -(35, 69, 1) 25 -(35, 70, 1) 25 -(35, 71, 1) 24 -(35, 72, 1) 23 -(35, 73, 1) 22 -(35, 74, 1) 21 -(35, 75, 1) 21 -(35, 76, 1) 20 -(35, 77, 1) 19 -(35, 78, 1) 18 -(35, 79, 1) 17 -(35, 80, 1) 16 -(35, 81, 1) 16 -(35, 82, 1) 15 -(35, 83, 1) 14 -(35, 84, 1) 13 -(35, 85, 1) 12 -(35, 86, 1) 11 -(35, 87, 1) 10 -(35, 88, 1) 9 -(35, 89, 1) 8 -(35, 90, 1) 7 -(35, 91, 1) 6 -(35, 92, 1) 6 -(35, 93, 1) 5 -(35, 94, 1) 4 -(35, 95, 1) 3 -(36, 4, 1) 1 -(36, 5, 1) 2 -(36, 6, 1) 3 -(36, 7, 1) 4 -(36, 8, 1) 5 -(36, 9, 1) 6 -(36, 10, 1) 7 -(36, 11, 1) 8 -(36, 12, 1) 8 -(36, 13, 1) 9 -(36, 14, 1) 10 -(36, 15, 1) 11 -(36, 16, 1) 12 -(36, 17, 1) 13 -(36, 18, 1) 14 -(36, 19, 1) 15 -(36, 20, 1) 16 -(36, 21, 1) 17 -(36, 22, 1) 18 -(36, 23, 1) 19 -(36, 24, 1) 19 -(36, 25, 1) 20 -(36, 26, 1) 21 -(36, 27, 1) 22 -(36, 28, 1) 23 -(36, 29, 1) 24 -(36, 30, 1) 24 -(36, 31, 1) 25 -(36, 32, 1) 26 -(36, 33, 1) 27 -(36, 34, 1) 28 -(36, 35, 1) 28 -(36, 36, 1) 29 -(36, 37, 1) 30 -(36, 38, 1) 30 -(36, 39, 1) 31 -(36, 40, 1) 32 -(36, 41, 1) 32 -(36, 42, 1) 33 -(36, 43, 1) 33 -(36, 44, 1) 34 -(36, 45, 1) 34 -(36, 46, 1) 34 -(36, 47, 1) 35 -(36, 48, 1) 35 -(36, 49, 1) 35 -(36, 50, 1) 35 -(36, 51, 1) 35 -(36, 52, 1) 35 -(36, 53, 1) 35 -(36, 54, 1) 35 -(36, 55, 1) 34 -(36, 56, 1) 34 -(36, 57, 1) 34 -(36, 58, 1) 33 -(36, 59, 1) 33 -(36, 60, 1) 32 -(36, 61, 1) 32 -(36, 62, 1) 31 -(36, 63, 1) 30 -(36, 64, 1) 30 -(36, 65, 1) 29 -(36, 66, 1) 28 -(36, 67, 1) 28 -(36, 68, 1) 27 -(36, 69, 1) 26 -(36, 70, 1) 25 -(36, 71, 1) 24 -(36, 72, 1) 24 -(36, 73, 1) 23 -(36, 74, 1) 22 -(36, 75, 1) 21 -(36, 76, 1) 20 -(36, 77, 1) 19 -(36, 78, 1) 19 -(36, 79, 1) 18 -(36, 80, 1) 17 -(36, 81, 1) 16 -(36, 82, 1) 15 -(36, 83, 1) 14 -(36, 84, 1) 13 -(36, 85, 1) 12 -(36, 86, 1) 11 -(36, 87, 1) 10 -(36, 88, 1) 9 -(36, 89, 1) 8 -(36, 90, 1) 8 -(36, 91, 1) 7 -(36, 92, 1) 6 -(36, 93, 1) 5 -(36, 94, 1) 4 -(36, 95, 1) 3 -(36, 96, 1) 2 -(36, 97, 1) 1 -(37, 4, 1) 1 -(37, 5, 1) 2 -(37, 6, 1) 3 -(37, 7, 1) 4 -(37, 8, 1) 5 -(37, 9, 1) 6 -(37, 10, 1) 7 -(37, 11, 1) 8 -(37, 12, 1) 9 -(37, 13, 1) 10 -(37, 14, 1) 11 -(37, 15, 1) 12 -(37, 16, 1) 13 -(37, 17, 1) 14 -(37, 18, 1) 14 -(37, 19, 1) 15 -(37, 20, 1) 16 -(37, 21, 1) 17 -(37, 22, 1) 18 -(37, 23, 1) 19 -(37, 24, 1) 20 -(37, 25, 1) 21 -(37, 26, 1) 22 -(37, 27, 1) 22 -(37, 28, 1) 23 -(37, 29, 1) 24 -(37, 30, 1) 25 -(37, 31, 1) 26 -(37, 32, 1) 27 -(37, 33, 1) 27 -(37, 34, 1) 28 -(37, 35, 1) 29 -(37, 36, 1) 30 -(37, 37, 1) 30 -(37, 38, 1) 31 -(37, 39, 1) 32 -(37, 40, 1) 32 -(37, 41, 1) 33 -(37, 42, 1) 34 -(37, 43, 1) 34 -(37, 44, 1) 35 -(37, 45, 1) 35 -(37, 46, 1) 35 -(37, 47, 1) 36 -(37, 48, 1) 36 -(37, 49, 1) 36 -(37, 50, 1) 36 -(37, 51, 1) 36 -(37, 52, 1) 36 -(37, 53, 1) 36 -(37, 54, 1) 36 -(37, 55, 1) 35 -(37, 56, 1) 35 -(37, 57, 1) 35 -(37, 58, 1) 34 -(37, 59, 1) 34 -(37, 60, 1) 33 -(37, 61, 1) 32 -(37, 62, 1) 32 -(37, 63, 1) 31 -(37, 64, 1) 30 -(37, 65, 1) 30 -(37, 66, 1) 29 -(37, 67, 1) 28 -(37, 68, 1) 27 -(37, 69, 1) 27 -(37, 70, 1) 26 -(37, 71, 1) 25 -(37, 72, 1) 24 -(37, 73, 1) 23 -(37, 74, 1) 22 -(37, 75, 1) 22 -(37, 76, 1) 21 -(37, 77, 1) 20 -(37, 78, 1) 19 -(37, 79, 1) 18 -(37, 80, 1) 17 -(37, 81, 1) 16 -(37, 82, 1) 15 -(37, 83, 1) 14 -(37, 84, 1) 14 -(37, 85, 1) 13 -(37, 86, 1) 12 -(37, 87, 1) 11 -(37, 88, 1) 10 -(37, 89, 1) 9 -(37, 90, 1) 8 -(37, 91, 1) 7 -(37, 92, 1) 6 -(37, 93, 1) 5 -(37, 94, 1) 4 -(37, 95, 1) 3 -(37, 96, 1) 2 -(37, 97, 1) 1 -(38, 4, 1) 2 -(38, 5, 1) 3 -(38, 6, 1) 3 -(38, 7, 1) 4 -(38, 8, 1) 5 -(38, 9, 1) 6 -(38, 10, 1) 7 -(38, 11, 1) 8 -(38, 12, 1) 9 -(38, 13, 1) 10 -(38, 14, 1) 11 -(38, 15, 1) 12 -(38, 16, 1) 13 -(38, 17, 1) 14 -(38, 18, 1) 15 -(38, 19, 1) 16 -(38, 20, 1) 17 -(38, 21, 1) 18 -(38, 22, 1) 18 -(38, 23, 1) 19 -(38, 24, 1) 20 -(38, 25, 1) 21 -(38, 26, 1) 22 -(38, 27, 1) 23 -(38, 28, 1) 24 -(38, 29, 1) 25 -(38, 30, 1) 26 -(38, 31, 1) 26 -(38, 32, 1) 27 -(38, 33, 1) 28 -(38, 34, 1) 29 -(38, 35, 1) 30 -(38, 36, 1) 30 -(38, 37, 1) 31 -(38, 38, 1) 32 -(38, 39, 1) 33 -(38, 40, 1) 33 -(38, 41, 1) 34 -(38, 42, 1) 34 -(38, 43, 1) 35 -(38, 44, 1) 35 -(38, 45, 1) 36 -(38, 46, 1) 36 -(38, 47, 1) 37 -(38, 48, 1) 37 -(38, 49, 1) 37 -(38, 50, 1) 37 -(38, 51, 1) 37 -(38, 52, 1) 37 -(38, 53, 1) 37 -(38, 54, 1) 37 -(38, 55, 1) 36 -(38, 56, 1) 36 -(38, 57, 1) 35 -(38, 58, 1) 35 -(38, 59, 1) 34 -(38, 60, 1) 34 -(38, 61, 1) 33 -(38, 62, 1) 33 -(38, 63, 1) 32 -(38, 64, 1) 31 -(38, 65, 1) 30 -(38, 66, 1) 30 -(38, 67, 1) 29 -(38, 68, 1) 28 -(38, 69, 1) 27 -(38, 70, 1) 26 -(38, 71, 1) 26 -(38, 72, 1) 25 -(38, 73, 1) 24 -(38, 74, 1) 23 -(38, 75, 1) 22 -(38, 76, 1) 21 -(38, 77, 1) 20 -(38, 78, 1) 19 -(38, 79, 1) 18 -(38, 80, 1) 18 -(38, 81, 1) 17 -(38, 82, 1) 16 -(38, 83, 1) 15 -(38, 84, 1) 14 -(38, 85, 1) 13 -(38, 86, 1) 12 -(38, 87, 1) 11 -(38, 88, 1) 10 -(38, 89, 1) 9 -(38, 90, 1) 8 -(38, 91, 1) 7 -(38, 92, 1) 6 -(38, 93, 1) 5 -(38, 94, 1) 4 -(38, 95, 1) 3 -(38, 96, 1) 3 -(38, 97, 1) 2 -(39, 4, 1) 2 -(39, 5, 1) 3 -(39, 6, 1) 4 -(39, 7, 1) 5 -(39, 8, 1) 6 -(39, 9, 1) 7 -(39, 10, 1) 8 -(39, 11, 1) 9 -(39, 12, 1) 9 -(39, 13, 1) 10 -(39, 14, 1) 11 -(39, 15, 1) 12 -(39, 16, 1) 13 -(39, 17, 1) 14 -(39, 18, 1) 15 -(39, 19, 1) 16 -(39, 20, 1) 17 -(39, 21, 1) 18 -(39, 22, 1) 19 -(39, 23, 1) 20 -(39, 24, 1) 21 -(39, 25, 1) 22 -(39, 26, 1) 23 -(39, 27, 1) 23 -(39, 28, 1) 24 -(39, 29, 1) 25 -(39, 30, 1) 26 -(39, 31, 1) 27 -(39, 32, 1) 28 -(39, 33, 1) 29 -(39, 34, 1) 29 -(39, 35, 1) 30 -(39, 36, 1) 31 -(39, 37, 1) 32 -(39, 38, 1) 33 -(39, 39, 1) 33 -(39, 40, 1) 34 -(39, 41, 1) 35 -(39, 42, 1) 35 -(39, 43, 1) 36 -(39, 44, 1) 36 -(39, 45, 1) 37 -(39, 46, 1) 37 -(39, 47, 1) 37 -(39, 48, 1) 38 -(39, 49, 1) 38 -(39, 50, 1) 38 -(39, 51, 1) 38 -(39, 52, 1) 38 -(39, 53, 1) 38 -(39, 54, 1) 37 -(39, 55, 1) 37 -(39, 56, 1) 37 -(39, 57, 1) 36 -(39, 58, 1) 36 -(39, 59, 1) 35 -(39, 60, 1) 35 -(39, 61, 1) 34 -(39, 62, 1) 33 -(39, 63, 1) 33 -(39, 64, 1) 32 -(39, 65, 1) 31 -(39, 66, 1) 30 -(39, 67, 1) 29 -(39, 68, 1) 29 -(39, 69, 1) 28 -(39, 70, 1) 27 -(39, 71, 1) 26 -(39, 72, 1) 25 -(39, 73, 1) 24 -(39, 74, 1) 23 -(39, 75, 1) 23 -(39, 76, 1) 22 -(39, 77, 1) 21 -(39, 78, 1) 20 -(39, 79, 1) 19 -(39, 80, 1) 18 -(39, 81, 1) 17 -(39, 82, 1) 16 -(39, 83, 1) 15 -(39, 84, 1) 14 -(39, 85, 1) 13 -(39, 86, 1) 12 -(39, 87, 1) 11 -(39, 88, 1) 10 -(39, 89, 1) 9 -(39, 90, 1) 9 -(39, 91, 1) 8 -(39, 92, 1) 7 -(39, 93, 1) 6 -(39, 94, 1) 5 -(39, 95, 1) 4 -(39, 96, 1) 3 -(39, 97, 1) 2 -(40, 4, 1) 2 -(40, 5, 1) 3 -(40, 6, 1) 4 -(40, 7, 1) 5 -(40, 8, 1) 6 -(40, 9, 1) 7 -(40, 10, 1) 8 -(40, 11, 1) 9 -(40, 12, 1) 10 -(40, 13, 1) 11 -(40, 14, 1) 12 -(40, 15, 1) 13 -(40, 16, 1) 14 -(40, 17, 1) 15 -(40, 18, 1) 16 -(40, 19, 1) 16 -(40, 20, 1) 17 -(40, 21, 1) 18 -(40, 22, 1) 19 -(40, 23, 1) 20 -(40, 24, 1) 21 -(40, 25, 1) 22 -(40, 26, 1) 23 -(40, 27, 1) 24 -(40, 28, 1) 25 -(40, 29, 1) 26 -(40, 30, 1) 27 -(40, 31, 1) 27 -(40, 32, 1) 28 -(40, 33, 1) 29 -(40, 34, 1) 30 -(40, 35, 1) 31 -(40, 36, 1) 32 -(40, 37, 1) 32 -(40, 38, 1) 33 -(40, 39, 1) 34 -(40, 40, 1) 35 -(40, 41, 1) 35 -(40, 42, 1) 36 -(40, 43, 1) 37 -(40, 44, 1) 37 -(40, 45, 1) 38 -(40, 56, 1) 38 -(40, 57, 1) 37 -(40, 58, 1) 37 -(40, 59, 1) 36 -(40, 60, 1) 35 -(40, 61, 1) 35 -(40, 62, 1) 34 -(40, 63, 1) 33 -(40, 64, 1) 32 -(40, 65, 1) 32 -(40, 66, 1) 31 -(40, 67, 1) 30 -(40, 68, 1) 29 -(40, 69, 1) 28 -(40, 70, 1) 27 -(40, 71, 1) 27 -(40, 72, 1) 26 -(40, 73, 1) 25 -(40, 74, 1) 24 -(40, 75, 1) 23 -(40, 76, 1) 22 -(40, 77, 1) 21 -(40, 78, 1) 20 -(40, 79, 1) 19 -(40, 80, 1) 18 -(40, 81, 1) 17 -(40, 82, 1) 16 -(40, 83, 1) 16 -(40, 84, 1) 15 -(40, 85, 1) 14 -(40, 86, 1) 13 -(40, 87, 1) 12 -(40, 88, 1) 11 -(40, 89, 1) 10 -(40, 90, 1) 9 -(40, 91, 1) 8 -(40, 92, 1) 7 -(40, 93, 1) 6 -(40, 94, 1) 5 -(40, 95, 1) 4 -(40, 96, 1) 3 -(40, 97, 1) 2 -(41, 1, 1) 0 -(41, 2, 1) 0 -(41, 3, 1) 1 -(41, 4, 1) 2 -(41, 5, 1) 3 -(41, 6, 1) 4 -(41, 7, 1) 5 -(41, 8, 1) 6 -(41, 9, 1) 7 -(41, 10, 1) 8 -(41, 11, 1) 9 -(41, 12, 1) 10 -(41, 13, 1) 11 -(41, 14, 1) 12 -(41, 15, 1) 13 -(41, 16, 1) 14 -(41, 17, 1) 15 -(41, 18, 1) 16 -(41, 19, 1) 17 -(41, 20, 1) 18 -(41, 21, 1) 19 -(41, 22, 1) 20 -(41, 23, 1) 20 -(41, 24, 1) 21 -(41, 25, 1) 22 -(41, 26, 1) 23 -(41, 27, 1) 24 -(41, 28, 1) 25 -(41, 29, 1) 26 -(41, 30, 1) 27 -(41, 31, 1) 28 -(41, 32, 1) 29 -(41, 33, 1) 30 -(41, 34, 1) 30 -(41, 35, 1) 31 -(41, 36, 1) 32 -(41, 37, 1) 33 -(41, 38, 1) 34 -(41, 39, 1) 35 -(41, 40, 1) 35 -(41, 41, 1) 36 -(41, 42, 1) 37 -(41, 43, 1) 37 -(41, 58, 1) 37 -(41, 59, 1) 37 -(41, 60, 1) 36 -(41, 61, 1) 35 -(41, 62, 1) 35 -(41, 63, 1) 34 -(41, 64, 1) 33 -(41, 65, 1) 32 -(41, 66, 1) 31 -(41, 67, 1) 30 -(41, 68, 1) 30 -(41, 69, 1) 29 -(41, 70, 1) 28 -(41, 71, 1) 27 -(41, 72, 1) 26 -(41, 73, 1) 25 -(41, 74, 1) 24 -(41, 75, 1) 23 -(41, 76, 1) 22 -(41, 77, 1) 21 -(41, 78, 1) 20 -(41, 79, 1) 20 -(41, 80, 1) 19 -(41, 81, 1) 18 -(41, 82, 1) 17 -(41, 83, 1) 16 -(41, 84, 1) 15 -(41, 85, 1) 14 -(41, 86, 1) 13 -(41, 87, 1) 12 -(41, 88, 1) 11 -(41, 89, 1) 10 -(41, 90, 1) 9 -(41, 91, 1) 8 -(41, 92, 1) 7 -(41, 93, 1) 6 -(41, 94, 1) 5 -(41, 95, 1) 4 -(41, 96, 1) 3 -(41, 97, 1) 2 -(41, 98, 1) 1 -(41, 99, 1) 0 -(41, 100, 1) 0 -(42, 1, 1) 0 -(42, 2, 1) 0 -(42, 3, 1) 1 -(42, 4, 1) 2 -(42, 5, 1) 3 -(42, 6, 1) 4 -(42, 7, 1) 5 -(42, 8, 1) 6 -(42, 9, 1) 7 -(42, 10, 1) 8 -(42, 11, 1) 9 -(42, 12, 1) 10 -(42, 13, 1) 11 -(42, 14, 1) 12 -(42, 15, 1) 13 -(42, 16, 1) 14 -(42, 17, 1) 15 -(42, 18, 1) 16 -(42, 19, 1) 17 -(42, 20, 1) 18 -(42, 21, 1) 19 -(42, 22, 1) 20 -(42, 23, 1) 21 -(42, 24, 1) 22 -(42, 25, 1) 23 -(42, 26, 1) 24 -(42, 27, 1) 25 -(42, 28, 1) 25 -(42, 29, 1) 26 -(42, 30, 1) 27 -(42, 31, 1) 28 -(42, 32, 1) 29 -(42, 33, 1) 30 -(42, 34, 1) 31 -(42, 35, 1) 32 -(42, 36, 1) 33 -(42, 37, 1) 34 -(42, 38, 1) 34 -(42, 39, 1) 35 -(42, 40, 1) 36 -(42, 41, 1) 37 -(42, 42, 1) 38 -(42, 59, 1) 38 -(42, 60, 1) 37 -(42, 61, 1) 36 -(42, 62, 1) 35 -(42, 63, 1) 34 -(42, 64, 1) 34 -(42, 65, 1) 33 -(42, 66, 1) 32 -(42, 67, 1) 31 -(42, 68, 1) 30 -(42, 69, 1) 29 -(42, 70, 1) 28 -(42, 71, 1) 27 -(42, 72, 1) 26 -(42, 73, 1) 25 -(42, 74, 1) 25 -(42, 75, 1) 24 -(42, 76, 1) 23 -(42, 77, 1) 22 -(42, 78, 1) 21 -(42, 79, 1) 20 -(42, 80, 1) 19 -(42, 81, 1) 18 -(42, 82, 1) 17 -(42, 83, 1) 16 -(42, 84, 1) 15 -(42, 85, 1) 14 -(42, 86, 1) 13 -(42, 87, 1) 12 -(42, 88, 1) 11 -(42, 89, 1) 10 -(42, 90, 1) 9 -(42, 91, 1) 8 -(42, 92, 1) 7 -(42, 93, 1) 6 -(42, 94, 1) 5 -(42, 95, 1) 4 -(42, 96, 1) 3 -(42, 97, 1) 2 -(42, 98, 1) 1 -(42, 99, 1) 0 -(42, 100, 1) 0 -(43, 1, 1) 0 -(43, 2, 1) 1 -(43, 3, 1) 2 -(43, 4, 1) 3 -(43, 5, 1) 4 -(43, 6, 1) 4 -(43, 7, 1) 5 -(43, 8, 1) 6 -(43, 9, 1) 7 -(43, 10, 1) 8 -(43, 11, 1) 9 -(43, 12, 1) 10 -(43, 13, 1) 11 -(43, 14, 1) 12 -(43, 15, 1) 13 -(43, 16, 1) 14 -(43, 17, 1) 15 -(43, 18, 1) 16 -(43, 19, 1) 17 -(43, 20, 1) 18 -(43, 21, 1) 19 -(43, 22, 1) 20 -(43, 23, 1) 21 -(43, 24, 1) 22 -(43, 25, 1) 23 -(43, 26, 1) 24 -(43, 27, 1) 25 -(43, 28, 1) 26 -(43, 29, 1) 27 -(43, 30, 1) 28 -(43, 31, 1) 29 -(43, 32, 1) 30 -(43, 33, 1) 30 -(43, 34, 1) 31 -(43, 35, 1) 32 -(43, 36, 1) 33 -(43, 37, 1) 34 -(43, 38, 1) 35 -(43, 39, 1) 36 -(43, 40, 1) 37 -(43, 41, 1) 37 -(43, 60, 1) 37 -(43, 61, 1) 37 -(43, 62, 1) 36 -(43, 63, 1) 35 -(43, 64, 1) 34 -(43, 65, 1) 33 -(43, 66, 1) 32 -(43, 67, 1) 31 -(43, 68, 1) 30 -(43, 69, 1) 30 -(43, 70, 1) 29 -(43, 71, 1) 28 -(43, 72, 1) 27 -(43, 73, 1) 26 -(43, 74, 1) 25 -(43, 75, 1) 24 -(43, 76, 1) 23 -(43, 77, 1) 22 -(43, 78, 1) 21 -(43, 79, 1) 20 -(43, 80, 1) 19 -(43, 81, 1) 18 -(43, 82, 1) 17 -(43, 83, 1) 16 -(43, 84, 1) 15 -(43, 85, 1) 14 -(43, 86, 1) 13 -(43, 87, 1) 12 -(43, 88, 1) 11 -(43, 89, 1) 10 -(43, 90, 1) 9 -(43, 91, 1) 8 -(43, 92, 1) 7 -(43, 93, 1) 6 -(43, 94, 1) 5 -(43, 95, 1) 4 -(43, 96, 1) 4 -(43, 97, 1) 3 -(43, 98, 1) 2 -(43, 99, 1) 1 -(43, 100, 1) 0 -(44, 1, 1) 0 -(44, 2, 1) 1 -(44, 3, 1) 2 -(44, 4, 1) 3 -(44, 5, 1) 4 -(44, 6, 1) 5 -(44, 7, 1) 6 -(44, 8, 1) 7 -(44, 9, 1) 8 -(44, 10, 1) 9 -(44, 11, 1) 10 -(44, 12, 1) 11 -(44, 13, 1) 12 -(44, 14, 1) 13 -(44, 15, 1) 14 -(44, 16, 1) 14 -(44, 17, 1) 15 -(44, 18, 1) 16 -(44, 19, 1) 17 -(44, 20, 1) 18 -(44, 21, 1) 19 -(44, 22, 1) 20 -(44, 23, 1) 21 -(44, 24, 1) 22 -(44, 25, 1) 23 -(44, 26, 1) 24 -(44, 27, 1) 25 -(44, 28, 1) 26 -(44, 29, 1) 27 -(44, 30, 1) 28 -(44, 31, 1) 29 -(44, 32, 1) 30 -(44, 33, 1) 31 -(44, 34, 1) 32 -(44, 35, 1) 33 -(44, 36, 1) 34 -(44, 37, 1) 35 -(44, 38, 1) 35 -(44, 39, 1) 36 -(44, 40, 1) 37 -(44, 61, 1) 37 -(44, 62, 1) 36 -(44, 63, 1) 35 -(44, 64, 1) 35 -(44, 65, 1) 34 -(44, 66, 1) 33 -(44, 67, 1) 32 -(44, 68, 1) 31 -(44, 69, 1) 30 -(44, 70, 1) 29 -(44, 71, 1) 28 -(44, 72, 1) 27 -(44, 73, 1) 26 -(44, 74, 1) 25 -(44, 75, 1) 24 -(44, 76, 1) 23 -(44, 77, 1) 22 -(44, 78, 1) 21 -(44, 79, 1) 20 -(44, 80, 1) 19 -(44, 81, 1) 18 -(44, 82, 1) 17 -(44, 83, 1) 16 -(44, 84, 1) 15 -(44, 85, 1) 14 -(44, 86, 1) 14 -(44, 87, 1) 13 -(44, 88, 1) 12 -(44, 89, 1) 11 -(44, 90, 1) 10 -(44, 91, 1) 9 -(44, 92, 1) 8 -(44, 93, 1) 7 -(44, 94, 1) 6 -(44, 95, 1) 5 -(44, 96, 1) 4 -(44, 97, 1) 3 -(44, 98, 1) 2 -(44, 99, 1) 1 -(44, 100, 1) 0 -(45, 1, 1) 0 -(45, 2, 1) 1 -(45, 3, 1) 2 -(45, 4, 1) 3 -(45, 5, 1) 4 -(45, 6, 1) 5 -(45, 7, 1) 6 -(45, 8, 1) 7 -(45, 9, 1) 8 -(45, 10, 1) 9 -(45, 11, 1) 10 -(45, 12, 1) 11 -(45, 13, 1) 12 -(45, 14, 1) 13 -(45, 15, 1) 14 -(45, 16, 1) 15 -(45, 17, 1) 16 -(45, 18, 1) 17 -(45, 19, 1) 18 -(45, 20, 1) 19 -(45, 21, 1) 20 -(45, 22, 1) 21 -(45, 23, 1) 22 -(45, 24, 1) 23 -(45, 25, 1) 23 -(45, 26, 1) 24 -(45, 27, 1) 25 -(45, 28, 1) 26 -(45, 29, 1) 27 -(45, 30, 1) 28 -(45, 31, 1) 29 -(45, 32, 1) 30 -(45, 33, 1) 31 -(45, 34, 1) 32 -(45, 35, 1) 33 -(45, 36, 1) 34 -(45, 37, 1) 35 -(45, 38, 1) 36 -(45, 39, 1) 37 -(45, 40, 1) 38 -(45, 61, 1) 38 -(45, 62, 1) 37 -(45, 63, 1) 36 -(45, 64, 1) 35 -(45, 65, 1) 34 -(45, 66, 1) 33 -(45, 67, 1) 32 -(45, 68, 1) 31 -(45, 69, 1) 30 -(45, 70, 1) 29 -(45, 71, 1) 28 -(45, 72, 1) 27 -(45, 73, 1) 26 -(45, 74, 1) 25 -(45, 75, 1) 24 -(45, 76, 1) 23 -(45, 77, 1) 23 -(45, 78, 1) 22 -(45, 79, 1) 21 -(45, 80, 1) 20 -(45, 81, 1) 19 -(45, 82, 1) 18 -(45, 83, 1) 17 -(45, 84, 1) 16 -(45, 85, 1) 15 -(45, 86, 1) 14 -(45, 87, 1) 13 -(45, 88, 1) 12 -(45, 89, 1) 11 -(45, 90, 1) 10 -(45, 91, 1) 9 -(45, 92, 1) 8 -(45, 93, 1) 7 -(45, 94, 1) 6 -(45, 95, 1) 5 -(45, 96, 1) 4 -(45, 97, 1) 3 -(45, 98, 1) 2 -(45, 99, 1) 1 -(45, 100, 1) 0 -(46, 1, 1) 0 -(46, 2, 1) 1 -(46, 3, 1) 2 -(46, 4, 1) 3 -(46, 5, 1) 4 -(46, 6, 1) 5 -(46, 7, 1) 6 -(46, 8, 1) 7 -(46, 9, 1) 8 -(46, 10, 1) 9 -(46, 11, 1) 10 -(46, 12, 1) 11 -(46, 13, 1) 12 -(46, 14, 1) 13 -(46, 15, 1) 14 -(46, 16, 1) 15 -(46, 17, 1) 16 -(46, 18, 1) 17 -(46, 19, 1) 18 -(46, 20, 1) 19 -(46, 21, 1) 20 -(46, 22, 1) 21 -(46, 23, 1) 22 -(46, 24, 1) 23 -(46, 25, 1) 24 -(46, 26, 1) 25 -(46, 27, 1) 26 -(46, 28, 1) 27 -(46, 29, 1) 28 -(46, 30, 1) 29 -(46, 31, 1) 30 -(46, 32, 1) 30 -(46, 33, 1) 31 -(46, 34, 1) 32 -(46, 35, 1) 33 -(46, 36, 1) 34 -(46, 37, 1) 35 -(46, 38, 1) 36 -(46, 39, 1) 37 -(46, 62, 1) 37 -(46, 63, 1) 36 -(46, 64, 1) 35 -(46, 65, 1) 34 -(46, 66, 1) 33 -(46, 67, 1) 32 -(46, 68, 1) 31 -(46, 69, 1) 30 -(46, 70, 1) 30 -(46, 71, 1) 29 -(46, 72, 1) 28 -(46, 73, 1) 27 -(46, 74, 1) 26 -(46, 75, 1) 25 -(46, 76, 1) 24 -(46, 77, 1) 23 -(46, 78, 1) 22 -(46, 79, 1) 21 -(46, 80, 1) 20 -(46, 81, 1) 19 -(46, 82, 1) 18 -(46, 83, 1) 17 -(46, 84, 1) 16 -(46, 85, 1) 15 -(46, 86, 1) 14 -(46, 87, 1) 13 -(46, 88, 1) 12 -(46, 89, 1) 11 -(46, 90, 1) 10 -(46, 91, 1) 9 -(46, 92, 1) 8 -(46, 93, 1) 7 -(46, 94, 1) 6 -(46, 95, 1) 5 -(46, 96, 1) 4 -(46, 97, 1) 3 -(46, 98, 1) 2 -(46, 99, 1) 1 -(46, 100, 1) 0 -(47, 1, 1) 0 -(47, 2, 1) 1 -(47, 3, 1) 2 -(47, 4, 1) 3 -(47, 5, 1) 4 -(47, 6, 1) 5 -(47, 7, 1) 6 -(47, 8, 1) 7 -(47, 9, 1) 8 -(47, 10, 1) 9 -(47, 11, 1) 10 -(47, 12, 1) 11 -(47, 13, 1) 12 -(47, 14, 1) 13 -(47, 15, 1) 14 -(47, 16, 1) 15 -(47, 17, 1) 16 -(47, 18, 1) 17 -(47, 19, 1) 18 -(47, 20, 1) 19 -(47, 21, 1) 20 -(47, 22, 1) 21 -(47, 23, 1) 22 -(47, 24, 1) 23 -(47, 25, 1) 24 -(47, 26, 1) 25 -(47, 27, 1) 26 -(47, 28, 1) 27 -(47, 29, 1) 28 -(47, 30, 1) 29 -(47, 31, 1) 30 -(47, 32, 1) 31 -(47, 33, 1) 32 -(47, 34, 1) 33 -(47, 35, 1) 34 -(47, 36, 1) 35 -(47, 37, 1) 36 -(47, 38, 1) 37 -(47, 39, 1) 38 -(47, 62, 1) 38 -(47, 63, 1) 37 -(47, 64, 1) 36 -(47, 65, 1) 35 -(47, 66, 1) 34 -(47, 67, 1) 33 -(47, 68, 1) 32 -(47, 69, 1) 31 -(47, 70, 1) 30 -(47, 71, 1) 29 -(47, 72, 1) 28 -(47, 73, 1) 27 -(47, 74, 1) 26 -(47, 75, 1) 25 -(47, 76, 1) 24 -(47, 77, 1) 23 -(47, 78, 1) 22 -(47, 79, 1) 21 -(47, 80, 1) 20 -(47, 81, 1) 19 -(47, 82, 1) 18 -(47, 83, 1) 17 -(47, 84, 1) 16 -(47, 85, 1) 15 -(47, 86, 1) 14 -(47, 87, 1) 13 -(47, 88, 1) 12 -(47, 89, 1) 11 -(47, 90, 1) 10 -(47, 91, 1) 9 -(47, 92, 1) 8 -(47, 93, 1) 7 -(47, 94, 1) 6 -(47, 95, 1) 5 -(47, 96, 1) 4 -(47, 97, 1) 3 -(47, 98, 1) 2 -(47, 99, 1) 1 -(47, 100, 1) 0 -(48, 1, 1) 0 -(48, 2, 1) 1 -(48, 3, 1) 2 -(48, 4, 1) 3 -(48, 5, 1) 4 -(48, 6, 1) 5 -(48, 7, 1) 6 -(48, 8, 1) 7 -(48, 9, 1) 8 -(48, 10, 1) 9 -(48, 11, 1) 10 -(48, 12, 1) 11 -(48, 13, 1) 12 -(48, 14, 1) 13 -(48, 15, 1) 14 -(48, 16, 1) 15 -(48, 17, 1) 16 -(48, 18, 1) 17 -(48, 19, 1) 18 -(48, 20, 1) 19 -(48, 21, 1) 20 -(48, 22, 1) 21 -(48, 23, 1) 22 -(48, 24, 1) 23 -(48, 25, 1) 24 -(48, 26, 1) 25 -(48, 27, 1) 26 -(48, 28, 1) 27 -(48, 29, 1) 28 -(48, 30, 1) 29 -(48, 31, 1) 30 -(48, 32, 1) 31 -(48, 33, 1) 32 -(48, 34, 1) 33 -(48, 35, 1) 34 -(48, 36, 1) 35 -(48, 37, 1) 36 -(48, 38, 1) 37 -(48, 39, 1) 38 -(48, 62, 1) 38 -(48, 63, 1) 37 -(48, 64, 1) 36 -(48, 65, 1) 35 -(48, 66, 1) 34 -(48, 67, 1) 33 -(48, 68, 1) 32 -(48, 69, 1) 31 -(48, 70, 1) 30 -(48, 71, 1) 29 -(48, 72, 1) 28 -(48, 73, 1) 27 -(48, 74, 1) 26 -(48, 75, 1) 25 -(48, 76, 1) 24 -(48, 77, 1) 23 -(48, 78, 1) 22 -(48, 79, 1) 21 -(48, 80, 1) 20 -(48, 81, 1) 19 -(48, 82, 1) 18 -(48, 83, 1) 17 -(48, 84, 1) 16 -(48, 85, 1) 15 -(48, 86, 1) 14 -(48, 87, 1) 13 -(48, 88, 1) 12 -(48, 89, 1) 11 -(48, 90, 1) 10 -(48, 91, 1) 9 -(48, 92, 1) 8 -(48, 93, 1) 7 -(48, 94, 1) 6 -(48, 95, 1) 5 -(48, 96, 1) 4 -(48, 97, 1) 3 -(48, 98, 1) 2 -(48, 99, 1) 1 -(48, 100, 1) 0 -(49, 1, 1) 0 -(49, 2, 1) 1 -(49, 3, 1) 2 -(49, 4, 1) 3 -(49, 5, 1) 4 -(49, 6, 1) 5 -(49, 7, 1) 6 -(49, 8, 1) 7 -(49, 9, 1) 8 -(49, 10, 1) 9 -(49, 11, 1) 10 -(49, 12, 1) 11 -(49, 13, 1) 12 -(49, 14, 1) 13 -(49, 15, 1) 14 -(49, 16, 1) 15 -(49, 17, 1) 16 -(49, 18, 1) 17 -(49, 19, 1) 18 -(49, 20, 1) 19 -(49, 21, 1) 20 -(49, 22, 1) 21 -(49, 23, 1) 22 -(49, 24, 1) 23 -(49, 25, 1) 24 -(49, 26, 1) 25 -(49, 27, 1) 26 -(49, 28, 1) 27 -(49, 29, 1) 28 -(49, 30, 1) 29 -(49, 31, 1) 30 -(49, 32, 1) 31 -(49, 33, 1) 32 -(49, 34, 1) 33 -(49, 35, 1) 34 -(49, 36, 1) 35 -(49, 37, 1) 36 -(49, 38, 1) 37 -(49, 39, 1) 38 -(49, 62, 1) 38 -(49, 63, 1) 37 -(49, 64, 1) 36 -(49, 65, 1) 35 -(49, 66, 1) 34 -(49, 67, 1) 33 -(49, 68, 1) 32 -(49, 69, 1) 31 -(49, 70, 1) 30 -(49, 71, 1) 29 -(49, 72, 1) 28 -(49, 73, 1) 27 -(49, 74, 1) 26 -(49, 75, 1) 25 -(49, 76, 1) 24 -(49, 77, 1) 23 -(49, 78, 1) 22 -(49, 79, 1) 21 -(49, 80, 1) 20 -(49, 81, 1) 19 -(49, 82, 1) 18 -(49, 83, 1) 17 -(49, 84, 1) 16 -(49, 85, 1) 15 -(49, 86, 1) 14 -(49, 87, 1) 13 -(49, 88, 1) 12 -(49, 89, 1) 11 -(49, 90, 1) 10 -(49, 91, 1) 9 -(49, 92, 1) 8 -(49, 93, 1) 7 -(49, 94, 1) 6 -(49, 95, 1) 5 -(49, 96, 1) 4 -(49, 97, 1) 3 -(49, 98, 1) 2 -(49, 99, 1) 1 -(49, 100, 1) 0 -(50, 1, 1) 0 -(50, 2, 1) 1 -(50, 3, 1) 2 -(50, 4, 1) 3 -(50, 5, 1) 4 -(50, 6, 1) 5 -(50, 7, 1) 6 -(50, 8, 1) 7 -(50, 9, 1) 8 -(50, 10, 1) 9 -(50, 11, 1) 10 -(50, 12, 1) 11 -(50, 13, 1) 12 -(50, 14, 1) 13 -(50, 15, 1) 14 -(50, 16, 1) 15 -(50, 17, 1) 16 -(50, 18, 1) 17 -(50, 19, 1) 18 -(50, 20, 1) 19 -(50, 21, 1) 20 -(50, 22, 1) 21 -(50, 23, 1) 22 -(50, 24, 1) 23 -(50, 25, 1) 24 -(50, 26, 1) 25 -(50, 27, 1) 26 -(50, 28, 1) 27 -(50, 29, 1) 28 -(50, 30, 1) 29 -(50, 31, 1) 30 -(50, 32, 1) 31 -(50, 33, 1) 32 -(50, 34, 1) 33 -(50, 35, 1) 34 -(50, 36, 1) 35 -(50, 37, 1) 36 -(50, 38, 1) 37 -(50, 39, 1) 38 -(50, 62, 1) 38 -(50, 63, 1) 37 -(50, 64, 1) 36 -(50, 65, 1) 35 -(50, 66, 1) 34 -(50, 67, 1) 33 -(50, 68, 1) 32 -(50, 69, 1) 31 -(50, 70, 1) 30 -(50, 71, 1) 29 -(50, 72, 1) 28 -(50, 73, 1) 27 -(50, 74, 1) 26 -(50, 75, 1) 25 -(50, 76, 1) 24 -(50, 77, 1) 23 -(50, 78, 1) 22 -(50, 79, 1) 21 -(50, 80, 1) 20 -(50, 81, 1) 19 -(50, 82, 1) 18 -(50, 83, 1) 17 -(50, 84, 1) 16 -(50, 85, 1) 15 -(50, 86, 1) 14 -(50, 87, 1) 13 -(50, 88, 1) 12 -(50, 89, 1) 11 -(50, 90, 1) 10 -(50, 91, 1) 9 -(50, 92, 1) 8 -(50, 93, 1) 7 -(50, 94, 1) 6 -(50, 95, 1) 5 -(50, 96, 1) 4 -(50, 97, 1) 3 -(50, 98, 1) 2 -(50, 99, 1) 1 -(50, 100, 1) 0 -(51, 1, 1) 0 -(51, 2, 1) 1 -(51, 3, 1) 2 -(51, 4, 1) 3 -(51, 5, 1) 4 -(51, 6, 1) 5 -(51, 7, 1) 6 -(51, 8, 1) 7 -(51, 9, 1) 8 -(51, 10, 1) 9 -(51, 11, 1) 10 -(51, 12, 1) 11 -(51, 13, 1) 12 -(51, 14, 1) 13 -(51, 15, 1) 14 -(51, 16, 1) 15 -(51, 17, 1) 16 -(51, 18, 1) 17 -(51, 19, 1) 18 -(51, 20, 1) 19 -(51, 21, 1) 20 -(51, 22, 1) 21 -(51, 23, 1) 22 -(51, 24, 1) 23 -(51, 25, 1) 24 -(51, 26, 1) 25 -(51, 27, 1) 26 -(51, 28, 1) 27 -(51, 29, 1) 28 -(51, 30, 1) 29 -(51, 31, 1) 30 -(51, 32, 1) 31 -(51, 33, 1) 32 -(51, 34, 1) 33 -(51, 35, 1) 34 -(51, 36, 1) 35 -(51, 37, 1) 36 -(51, 38, 1) 37 -(51, 39, 1) 38 -(51, 62, 1) 38 -(51, 63, 1) 37 -(51, 64, 1) 36 -(51, 65, 1) 35 -(51, 66, 1) 34 -(51, 67, 1) 33 -(51, 68, 1) 32 -(51, 69, 1) 31 -(51, 70, 1) 30 -(51, 71, 1) 29 -(51, 72, 1) 28 -(51, 73, 1) 27 -(51, 74, 1) 26 -(51, 75, 1) 25 -(51, 76, 1) 24 -(51, 77, 1) 23 -(51, 78, 1) 22 -(51, 79, 1) 21 -(51, 80, 1) 20 -(51, 81, 1) 19 -(51, 82, 1) 18 -(51, 83, 1) 17 -(51, 84, 1) 16 -(51, 85, 1) 15 -(51, 86, 1) 14 -(51, 87, 1) 13 -(51, 88, 1) 12 -(51, 89, 1) 11 -(51, 90, 1) 10 -(51, 91, 1) 9 -(51, 92, 1) 8 -(51, 93, 1) 7 -(51, 94, 1) 6 -(51, 95, 1) 5 -(51, 96, 1) 4 -(51, 97, 1) 3 -(51, 98, 1) 2 -(51, 99, 1) 1 -(51, 100, 1) 0 -(52, 1, 1) 0 -(52, 2, 1) 1 -(52, 3, 1) 2 -(52, 4, 1) 3 -(52, 5, 1) 4 -(52, 6, 1) 5 -(52, 7, 1) 6 -(52, 8, 1) 7 -(52, 9, 1) 8 -(52, 10, 1) 9 -(52, 11, 1) 10 -(52, 12, 1) 11 -(52, 13, 1) 12 -(52, 14, 1) 13 -(52, 15, 1) 14 -(52, 16, 1) 15 -(52, 17, 1) 16 -(52, 18, 1) 17 -(52, 19, 1) 18 -(52, 20, 1) 19 -(52, 21, 1) 20 -(52, 22, 1) 21 -(52, 23, 1) 22 -(52, 24, 1) 23 -(52, 25, 1) 24 -(52, 26, 1) 25 -(52, 27, 1) 26 -(52, 28, 1) 27 -(52, 29, 1) 28 -(52, 30, 1) 29 -(52, 31, 1) 30 -(52, 32, 1) 31 -(52, 33, 1) 32 -(52, 34, 1) 33 -(52, 35, 1) 34 -(52, 36, 1) 35 -(52, 37, 1) 36 -(52, 38, 1) 37 -(52, 39, 1) 38 -(52, 62, 1) 38 -(52, 63, 1) 37 -(52, 64, 1) 36 -(52, 65, 1) 35 -(52, 66, 1) 34 -(52, 67, 1) 33 -(52, 68, 1) 32 -(52, 69, 1) 31 -(52, 70, 1) 30 -(52, 71, 1) 29 -(52, 72, 1) 28 -(52, 73, 1) 27 -(52, 74, 1) 26 -(52, 75, 1) 25 -(52, 76, 1) 24 -(52, 77, 1) 23 -(52, 78, 1) 22 -(52, 79, 1) 21 -(52, 80, 1) 20 -(52, 81, 1) 19 -(52, 82, 1) 18 -(52, 83, 1) 17 -(52, 84, 1) 16 -(52, 85, 1) 15 -(52, 86, 1) 14 -(52, 87, 1) 13 -(52, 88, 1) 12 -(52, 89, 1) 11 -(52, 90, 1) 10 -(52, 91, 1) 9 -(52, 92, 1) 8 -(52, 93, 1) 7 -(52, 94, 1) 6 -(52, 95, 1) 5 -(52, 96, 1) 4 -(52, 97, 1) 3 -(52, 98, 1) 2 -(52, 99, 1) 1 -(52, 100, 1) 0 -(53, 1, 1) 0 -(53, 2, 1) 1 -(53, 3, 1) 2 -(53, 4, 1) 3 -(53, 5, 1) 4 -(53, 6, 1) 5 -(53, 7, 1) 6 -(53, 8, 1) 7 -(53, 9, 1) 8 -(53, 10, 1) 9 -(53, 11, 1) 10 -(53, 12, 1) 11 -(53, 13, 1) 12 -(53, 14, 1) 13 -(53, 15, 1) 14 -(53, 16, 1) 15 -(53, 17, 1) 16 -(53, 18, 1) 17 -(53, 19, 1) 18 -(53, 20, 1) 19 -(53, 21, 1) 20 -(53, 22, 1) 21 -(53, 23, 1) 22 -(53, 24, 1) 23 -(53, 25, 1) 24 -(53, 26, 1) 25 -(53, 27, 1) 26 -(53, 28, 1) 27 -(53, 29, 1) 28 -(53, 30, 1) 29 -(53, 31, 1) 30 -(53, 32, 1) 31 -(53, 33, 1) 32 -(53, 34, 1) 33 -(53, 35, 1) 34 -(53, 36, 1) 35 -(53, 37, 1) 36 -(53, 38, 1) 37 -(53, 39, 1) 38 -(53, 62, 1) 38 -(53, 63, 1) 37 -(53, 64, 1) 36 -(53, 65, 1) 35 -(53, 66, 1) 34 -(53, 67, 1) 33 -(53, 68, 1) 32 -(53, 69, 1) 31 -(53, 70, 1) 30 -(53, 71, 1) 29 -(53, 72, 1) 28 -(53, 73, 1) 27 -(53, 74, 1) 26 -(53, 75, 1) 25 -(53, 76, 1) 24 -(53, 77, 1) 23 -(53, 78, 1) 22 -(53, 79, 1) 21 -(53, 80, 1) 20 -(53, 81, 1) 19 -(53, 82, 1) 18 -(53, 83, 1) 17 -(53, 84, 1) 16 -(53, 85, 1) 15 -(53, 86, 1) 14 -(53, 87, 1) 13 -(53, 88, 1) 12 -(53, 89, 1) 11 -(53, 90, 1) 10 -(53, 91, 1) 9 -(53, 92, 1) 8 -(53, 93, 1) 7 -(53, 94, 1) 6 -(53, 95, 1) 5 -(53, 96, 1) 4 -(53, 97, 1) 3 -(53, 98, 1) 2 -(53, 99, 1) 1 -(53, 100, 1) 0 -(54, 1, 1) 0 -(54, 2, 1) 1 -(54, 3, 1) 2 -(54, 4, 1) 3 -(54, 5, 1) 4 -(54, 6, 1) 5 -(54, 7, 1) 6 -(54, 8, 1) 7 -(54, 9, 1) 8 -(54, 10, 1) 9 -(54, 11, 1) 10 -(54, 12, 1) 11 -(54, 13, 1) 12 -(54, 14, 1) 13 -(54, 15, 1) 14 -(54, 16, 1) 15 -(54, 17, 1) 16 -(54, 18, 1) 17 -(54, 19, 1) 18 -(54, 20, 1) 19 -(54, 21, 1) 20 -(54, 22, 1) 21 -(54, 23, 1) 22 -(54, 24, 1) 23 -(54, 25, 1) 24 -(54, 26, 1) 25 -(54, 27, 1) 26 -(54, 28, 1) 27 -(54, 29, 1) 28 -(54, 30, 1) 29 -(54, 31, 1) 30 -(54, 32, 1) 31 -(54, 33, 1) 32 -(54, 34, 1) 33 -(54, 35, 1) 34 -(54, 36, 1) 35 -(54, 37, 1) 36 -(54, 38, 1) 37 -(54, 39, 1) 38 -(54, 62, 1) 38 -(54, 63, 1) 37 -(54, 64, 1) 36 -(54, 65, 1) 35 -(54, 66, 1) 34 -(54, 67, 1) 33 -(54, 68, 1) 32 -(54, 69, 1) 31 -(54, 70, 1) 30 -(54, 71, 1) 29 -(54, 72, 1) 28 -(54, 73, 1) 27 -(54, 74, 1) 26 -(54, 75, 1) 25 -(54, 76, 1) 24 -(54, 77, 1) 23 -(54, 78, 1) 22 -(54, 79, 1) 21 -(54, 80, 1) 20 -(54, 81, 1) 19 -(54, 82, 1) 18 -(54, 83, 1) 17 -(54, 84, 1) 16 -(54, 85, 1) 15 -(54, 86, 1) 14 -(54, 87, 1) 13 -(54, 88, 1) 12 -(54, 89, 1) 11 -(54, 90, 1) 10 -(54, 91, 1) 9 -(54, 92, 1) 8 -(54, 93, 1) 7 -(54, 94, 1) 6 -(54, 95, 1) 5 -(54, 96, 1) 4 -(54, 97, 1) 3 -(54, 98, 1) 2 -(54, 99, 1) 1 -(54, 100, 1) 0 -(55, 1, 1) 0 -(55, 2, 1) 1 -(55, 3, 1) 2 -(55, 4, 1) 3 -(55, 5, 1) 4 -(55, 6, 1) 5 -(55, 7, 1) 6 -(55, 8, 1) 7 -(55, 9, 1) 8 -(55, 10, 1) 9 -(55, 11, 1) 10 -(55, 12, 1) 11 -(55, 13, 1) 12 -(55, 14, 1) 13 -(55, 15, 1) 14 -(55, 16, 1) 15 -(55, 17, 1) 16 -(55, 18, 1) 17 -(55, 19, 1) 18 -(55, 20, 1) 19 -(55, 21, 1) 20 -(55, 22, 1) 21 -(55, 23, 1) 22 -(55, 24, 1) 23 -(55, 25, 1) 24 -(55, 26, 1) 25 -(55, 27, 1) 26 -(55, 28, 1) 27 -(55, 29, 1) 28 -(55, 30, 1) 29 -(55, 31, 1) 30 -(55, 32, 1) 30 -(55, 33, 1) 31 -(55, 34, 1) 32 -(55, 35, 1) 33 -(55, 36, 1) 34 -(55, 37, 1) 35 -(55, 38, 1) 36 -(55, 39, 1) 37 -(55, 62, 1) 37 -(55, 63, 1) 36 -(55, 64, 1) 35 -(55, 65, 1) 34 -(55, 66, 1) 33 -(55, 67, 1) 32 -(55, 68, 1) 31 -(55, 69, 1) 30 -(55, 70, 1) 30 -(55, 71, 1) 29 -(55, 72, 1) 28 -(55, 73, 1) 27 -(55, 74, 1) 26 -(55, 75, 1) 25 -(55, 76, 1) 24 -(55, 77, 1) 23 -(55, 78, 1) 22 -(55, 79, 1) 21 -(55, 80, 1) 20 -(55, 81, 1) 19 -(55, 82, 1) 18 -(55, 83, 1) 17 -(55, 84, 1) 16 -(55, 85, 1) 15 -(55, 86, 1) 14 -(55, 87, 1) 13 -(55, 88, 1) 12 -(55, 89, 1) 11 -(55, 90, 1) 10 -(55, 91, 1) 9 -(55, 92, 1) 8 -(55, 93, 1) 7 -(55, 94, 1) 6 -(55, 95, 1) 5 -(55, 96, 1) 4 -(55, 97, 1) 3 -(55, 98, 1) 2 -(55, 99, 1) 1 -(55, 100, 1) 0 -(56, 1, 1) 0 -(56, 2, 1) 1 -(56, 3, 1) 2 -(56, 4, 1) 3 -(56, 5, 1) 4 -(56, 6, 1) 5 -(56, 7, 1) 6 -(56, 8, 1) 7 -(56, 9, 1) 8 -(56, 10, 1) 9 -(56, 11, 1) 10 -(56, 12, 1) 11 -(56, 13, 1) 12 -(56, 14, 1) 13 -(56, 15, 1) 14 -(56, 16, 1) 15 -(56, 17, 1) 16 -(56, 18, 1) 17 -(56, 19, 1) 18 -(56, 20, 1) 19 -(56, 21, 1) 20 -(56, 22, 1) 21 -(56, 23, 1) 22 -(56, 24, 1) 23 -(56, 25, 1) 23 -(56, 26, 1) 24 -(56, 27, 1) 25 -(56, 28, 1) 26 -(56, 29, 1) 27 -(56, 30, 1) 28 -(56, 31, 1) 29 -(56, 32, 1) 30 -(56, 33, 1) 31 -(56, 34, 1) 32 -(56, 35, 1) 33 -(56, 36, 1) 34 -(56, 37, 1) 35 -(56, 38, 1) 36 -(56, 39, 1) 37 -(56, 40, 1) 38 -(56, 61, 1) 38 -(56, 62, 1) 37 -(56, 63, 1) 36 -(56, 64, 1) 35 -(56, 65, 1) 34 -(56, 66, 1) 33 -(56, 67, 1) 32 -(56, 68, 1) 31 -(56, 69, 1) 30 -(56, 70, 1) 29 -(56, 71, 1) 28 -(56, 72, 1) 27 -(56, 73, 1) 26 -(56, 74, 1) 25 -(56, 75, 1) 24 -(56, 76, 1) 23 -(56, 77, 1) 23 -(56, 78, 1) 22 -(56, 79, 1) 21 -(56, 80, 1) 20 -(56, 81, 1) 19 -(56, 82, 1) 18 -(56, 83, 1) 17 -(56, 84, 1) 16 -(56, 85, 1) 15 -(56, 86, 1) 14 -(56, 87, 1) 13 -(56, 88, 1) 12 -(56, 89, 1) 11 -(56, 90, 1) 10 -(56, 91, 1) 9 -(56, 92, 1) 8 -(56, 93, 1) 7 -(56, 94, 1) 6 -(56, 95, 1) 5 -(56, 96, 1) 4 -(56, 97, 1) 3 -(56, 98, 1) 2 -(56, 99, 1) 1 -(56, 100, 1) 0 -(57, 1, 1) 0 -(57, 2, 1) 1 -(57, 3, 1) 2 -(57, 4, 1) 3 -(57, 5, 1) 4 -(57, 6, 1) 5 -(57, 7, 1) 6 -(57, 8, 1) 7 -(57, 9, 1) 8 -(57, 10, 1) 9 -(57, 11, 1) 10 -(57, 12, 1) 11 -(57, 13, 1) 12 -(57, 14, 1) 13 -(57, 15, 1) 14 -(57, 16, 1) 14 -(57, 17, 1) 15 -(57, 18, 1) 16 -(57, 19, 1) 17 -(57, 20, 1) 18 -(57, 21, 1) 19 -(57, 22, 1) 20 -(57, 23, 1) 21 -(57, 24, 1) 22 -(57, 25, 1) 23 -(57, 26, 1) 24 -(57, 27, 1) 25 -(57, 28, 1) 26 -(57, 29, 1) 27 -(57, 30, 1) 28 -(57, 31, 1) 29 -(57, 32, 1) 30 -(57, 33, 1) 31 -(57, 34, 1) 32 -(57, 35, 1) 33 -(57, 36, 1) 34 -(57, 37, 1) 35 -(57, 38, 1) 35 -(57, 39, 1) 36 -(57, 40, 1) 37 -(57, 61, 1) 37 -(57, 62, 1) 36 -(57, 63, 1) 35 -(57, 64, 1) 35 -(57, 65, 1) 34 -(57, 66, 1) 33 -(57, 67, 1) 32 -(57, 68, 1) 31 -(57, 69, 1) 30 -(57, 70, 1) 29 -(57, 71, 1) 28 -(57, 72, 1) 27 -(57, 73, 1) 26 -(57, 74, 1) 25 -(57, 75, 1) 24 -(57, 76, 1) 23 -(57, 77, 1) 22 -(57, 78, 1) 21 -(57, 79, 1) 20 -(57, 80, 1) 19 -(57, 81, 1) 18 -(57, 82, 1) 17 -(57, 83, 1) 16 -(57, 84, 1) 15 -(57, 85, 1) 14 -(57, 86, 1) 14 -(57, 87, 1) 13 -(57, 88, 1) 12 -(57, 89, 1) 11 -(57, 90, 1) 10 -(57, 91, 1) 9 -(57, 92, 1) 8 -(57, 93, 1) 7 -(57, 94, 1) 6 -(57, 95, 1) 5 -(57, 96, 1) 4 -(57, 97, 1) 3 -(57, 98, 1) 2 -(57, 99, 1) 1 -(57, 100, 1) 0 -(58, 1, 1) 0 -(58, 2, 1) 1 -(58, 3, 1) 2 -(58, 4, 1) 3 -(58, 5, 1) 4 -(58, 6, 1) 4 -(58, 7, 1) 5 -(58, 8, 1) 6 -(58, 9, 1) 7 -(58, 10, 1) 8 -(58, 11, 1) 9 -(58, 12, 1) 10 -(58, 13, 1) 11 -(58, 14, 1) 12 -(58, 15, 1) 13 -(58, 16, 1) 14 -(58, 17, 1) 15 -(58, 18, 1) 16 -(58, 19, 1) 17 -(58, 20, 1) 18 -(58, 21, 1) 19 -(58, 22, 1) 20 -(58, 23, 1) 21 -(58, 24, 1) 22 -(58, 25, 1) 23 -(58, 26, 1) 24 -(58, 27, 1) 25 -(58, 28, 1) 26 -(58, 29, 1) 27 -(58, 30, 1) 28 -(58, 31, 1) 29 -(58, 32, 1) 30 -(58, 33, 1) 30 -(58, 34, 1) 31 -(58, 35, 1) 32 -(58, 36, 1) 33 -(58, 37, 1) 34 -(58, 38, 1) 35 -(58, 39, 1) 36 -(58, 40, 1) 37 -(58, 41, 1) 37 -(58, 60, 1) 37 -(58, 61, 1) 37 -(58, 62, 1) 36 -(58, 63, 1) 35 -(58, 64, 1) 34 -(58, 65, 1) 33 -(58, 66, 1) 32 -(58, 67, 1) 31 -(58, 68, 1) 30 -(58, 69, 1) 30 -(58, 70, 1) 29 -(58, 71, 1) 28 -(58, 72, 1) 27 -(58, 73, 1) 26 -(58, 74, 1) 25 -(58, 75, 1) 24 -(58, 76, 1) 23 -(58, 77, 1) 22 -(58, 78, 1) 21 -(58, 79, 1) 20 -(58, 80, 1) 19 -(58, 81, 1) 18 -(58, 82, 1) 17 -(58, 83, 1) 16 -(58, 84, 1) 15 -(58, 85, 1) 14 -(58, 86, 1) 13 -(58, 87, 1) 12 -(58, 88, 1) 11 -(58, 89, 1) 10 -(58, 90, 1) 9 -(58, 91, 1) 8 -(58, 92, 1) 7 -(58, 93, 1) 6 -(58, 94, 1) 5 -(58, 95, 1) 4 -(58, 96, 1) 4 -(58, 97, 1) 3 -(58, 98, 1) 2 -(58, 99, 1) 1 -(58, 100, 1) 0 -(59, 1, 1) 0 -(59, 2, 1) 0 -(59, 3, 1) 1 -(59, 4, 1) 2 -(59, 5, 1) 3 -(59, 6, 1) 4 -(59, 7, 1) 5 -(59, 8, 1) 6 -(59, 9, 1) 7 -(59, 10, 1) 8 -(59, 11, 1) 9 -(59, 12, 1) 10 -(59, 13, 1) 11 -(59, 14, 1) 12 -(59, 15, 1) 13 -(59, 16, 1) 14 -(59, 17, 1) 15 -(59, 18, 1) 16 -(59, 19, 1) 17 -(59, 20, 1) 18 -(59, 21, 1) 19 -(59, 22, 1) 20 -(59, 23, 1) 21 -(59, 24, 1) 22 -(59, 25, 1) 23 -(59, 26, 1) 24 -(59, 27, 1) 25 -(59, 28, 1) 25 -(59, 29, 1) 26 -(59, 30, 1) 27 -(59, 31, 1) 28 -(59, 32, 1) 29 -(59, 33, 1) 30 -(59, 34, 1) 31 -(59, 35, 1) 32 -(59, 36, 1) 33 -(59, 37, 1) 34 -(59, 38, 1) 34 -(59, 39, 1) 35 -(59, 40, 1) 36 -(59, 41, 1) 37 -(59, 42, 1) 38 -(59, 59, 1) 38 -(59, 60, 1) 37 -(59, 61, 1) 36 -(59, 62, 1) 35 -(59, 63, 1) 34 -(59, 64, 1) 34 -(59, 65, 1) 33 -(59, 66, 1) 32 -(59, 67, 1) 31 -(59, 68, 1) 30 -(59, 69, 1) 29 -(59, 70, 1) 28 -(59, 71, 1) 27 -(59, 72, 1) 26 -(59, 73, 1) 25 -(59, 74, 1) 25 -(59, 75, 1) 24 -(59, 76, 1) 23 -(59, 77, 1) 22 -(59, 78, 1) 21 -(59, 79, 1) 20 -(59, 80, 1) 19 -(59, 81, 1) 18 -(59, 82, 1) 17 -(59, 83, 1) 16 -(59, 84, 1) 15 -(59, 85, 1) 14 -(59, 86, 1) 13 -(59, 87, 1) 12 -(59, 88, 1) 11 -(59, 89, 1) 10 -(59, 90, 1) 9 -(59, 91, 1) 8 -(59, 92, 1) 7 -(59, 93, 1) 6 -(59, 94, 1) 5 -(59, 95, 1) 4 -(59, 96, 1) 3 -(59, 97, 1) 2 -(59, 98, 1) 1 -(59, 99, 1) 0 -(59, 100, 1) 0 -(60, 1, 1) 0 -(60, 2, 1) 0 -(60, 3, 1) 1 -(60, 4, 1) 2 -(60, 5, 1) 3 -(60, 6, 1) 4 -(60, 7, 1) 5 -(60, 8, 1) 6 -(60, 9, 1) 7 -(60, 10, 1) 8 -(60, 11, 1) 9 -(60, 12, 1) 10 -(60, 13, 1) 11 -(60, 14, 1) 12 -(60, 15, 1) 13 -(60, 16, 1) 14 -(60, 17, 1) 15 -(60, 18, 1) 16 -(60, 19, 1) 17 -(60, 20, 1) 18 -(60, 21, 1) 19 -(60, 22, 1) 20 -(60, 23, 1) 20 -(60, 24, 1) 21 -(60, 25, 1) 22 -(60, 26, 1) 23 -(60, 27, 1) 24 -(60, 28, 1) 25 -(60, 29, 1) 26 -(60, 30, 1) 27 -(60, 31, 1) 28 -(60, 32, 1) 29 -(60, 33, 1) 30 -(60, 34, 1) 30 -(60, 35, 1) 31 -(60, 36, 1) 32 -(60, 37, 1) 33 -(60, 38, 1) 34 -(60, 39, 1) 35 -(60, 40, 1) 35 -(60, 41, 1) 36 -(60, 42, 1) 37 -(60, 43, 1) 37 -(60, 58, 1) 37 -(60, 59, 1) 37 -(60, 60, 1) 36 -(60, 61, 1) 35 -(60, 62, 1) 35 -(60, 63, 1) 34 -(60, 64, 1) 33 -(60, 65, 1) 32 -(60, 66, 1) 31 -(60, 67, 1) 30 -(60, 68, 1) 30 -(60, 69, 1) 29 -(60, 70, 1) 28 -(60, 71, 1) 27 -(60, 72, 1) 26 -(60, 73, 1) 25 -(60, 74, 1) 24 -(60, 75, 1) 23 -(60, 76, 1) 22 -(60, 77, 1) 21 -(60, 78, 1) 20 -(60, 79, 1) 20 -(60, 80, 1) 19 -(60, 81, 1) 18 -(60, 82, 1) 17 -(60, 83, 1) 16 -(60, 84, 1) 15 -(60, 85, 1) 14 -(60, 86, 1) 13 -(60, 87, 1) 12 -(60, 88, 1) 11 -(60, 89, 1) 10 -(60, 90, 1) 9 -(60, 91, 1) 8 -(60, 92, 1) 7 -(60, 93, 1) 6 -(60, 94, 1) 5 -(60, 95, 1) 4 -(60, 96, 1) 3 -(60, 97, 1) 2 -(60, 98, 1) 1 -(60, 99, 1) 0 -(60, 100, 1) 0 -(61, 4, 1) 2 -(61, 5, 1) 3 -(61, 6, 1) 4 -(61, 7, 1) 5 -(61, 8, 1) 6 -(61, 9, 1) 7 -(61, 10, 1) 8 -(61, 11, 1) 9 -(61, 12, 1) 10 -(61, 13, 1) 11 -(61, 14, 1) 12 -(61, 15, 1) 13 -(61, 16, 1) 14 -(61, 17, 1) 15 -(61, 18, 1) 16 -(61, 19, 1) 16 -(61, 20, 1) 17 -(61, 21, 1) 18 -(61, 22, 1) 19 -(61, 23, 1) 20 -(61, 24, 1) 21 -(61, 25, 1) 22 -(61, 26, 1) 23 -(61, 27, 1) 24 -(61, 28, 1) 25 -(61, 29, 1) 26 -(61, 30, 1) 27 -(61, 31, 1) 27 -(61, 32, 1) 28 -(61, 33, 1) 29 -(61, 34, 1) 30 -(61, 35, 1) 31 -(61, 36, 1) 32 -(61, 37, 1) 32 -(61, 38, 1) 33 -(61, 39, 1) 34 -(61, 40, 1) 35 -(61, 41, 1) 35 -(61, 42, 1) 36 -(61, 43, 1) 37 -(61, 44, 1) 37 -(61, 45, 1) 38 -(61, 56, 1) 38 -(61, 57, 1) 37 -(61, 58, 1) 37 -(61, 59, 1) 36 -(61, 60, 1) 35 -(61, 61, 1) 35 -(61, 62, 1) 34 -(61, 63, 1) 33 -(61, 64, 1) 32 -(61, 65, 1) 32 -(61, 66, 1) 31 -(61, 67, 1) 30 -(61, 68, 1) 29 -(61, 69, 1) 28 -(61, 70, 1) 27 -(61, 71, 1) 27 -(61, 72, 1) 26 -(61, 73, 1) 25 -(61, 74, 1) 24 -(61, 75, 1) 23 -(61, 76, 1) 22 -(61, 77, 1) 21 -(61, 78, 1) 20 -(61, 79, 1) 19 -(61, 80, 1) 18 -(61, 81, 1) 17 -(61, 82, 1) 16 -(61, 83, 1) 16 -(61, 84, 1) 15 -(61, 85, 1) 14 -(61, 86, 1) 13 -(61, 87, 1) 12 -(61, 88, 1) 11 -(61, 89, 1) 10 -(61, 90, 1) 9 -(61, 91, 1) 8 -(61, 92, 1) 7 -(61, 93, 1) 6 -(61, 94, 1) 5 -(61, 95, 1) 4 -(61, 96, 1) 3 -(61, 97, 1) 2 -(62, 4, 1) 2 -(62, 5, 1) 3 -(62, 6, 1) 4 -(62, 7, 1) 5 -(62, 8, 1) 6 -(62, 9, 1) 7 -(62, 10, 1) 8 -(62, 11, 1) 9 -(62, 12, 1) 9 -(62, 13, 1) 10 -(62, 14, 1) 11 -(62, 15, 1) 12 -(62, 16, 1) 13 -(62, 17, 1) 14 -(62, 18, 1) 15 -(62, 19, 1) 16 -(62, 20, 1) 17 -(62, 21, 1) 18 -(62, 22, 1) 19 -(62, 23, 1) 20 -(62, 24, 1) 21 -(62, 25, 1) 22 -(62, 26, 1) 23 -(62, 27, 1) 23 -(62, 28, 1) 24 -(62, 29, 1) 25 -(62, 30, 1) 26 -(62, 31, 1) 27 -(62, 32, 1) 28 -(62, 33, 1) 29 -(62, 34, 1) 29 -(62, 35, 1) 30 -(62, 36, 1) 31 -(62, 37, 1) 32 -(62, 38, 1) 33 -(62, 39, 1) 33 -(62, 40, 1) 34 -(62, 41, 1) 35 -(62, 42, 1) 35 -(62, 43, 1) 36 -(62, 44, 1) 36 -(62, 45, 1) 37 -(62, 46, 1) 37 -(62, 47, 1) 37 -(62, 48, 1) 38 -(62, 49, 1) 38 -(62, 50, 1) 38 -(62, 51, 1) 38 -(62, 52, 1) 38 -(62, 53, 1) 38 -(62, 54, 1) 37 -(62, 55, 1) 37 -(62, 56, 1) 37 -(62, 57, 1) 36 -(62, 58, 1) 36 -(62, 59, 1) 35 -(62, 60, 1) 35 -(62, 61, 1) 34 -(62, 62, 1) 33 -(62, 63, 1) 33 -(62, 64, 1) 32 -(62, 65, 1) 31 -(62, 66, 1) 30 -(62, 67, 1) 29 -(62, 68, 1) 29 -(62, 69, 1) 28 -(62, 70, 1) 27 -(62, 71, 1) 26 -(62, 72, 1) 25 -(62, 73, 1) 24 -(62, 74, 1) 23 -(62, 75, 1) 23 -(62, 76, 1) 22 -(62, 77, 1) 21 -(62, 78, 1) 20 -(62, 79, 1) 19 -(62, 80, 1) 18 -(62, 81, 1) 17 -(62, 82, 1) 16 -(62, 83, 1) 15 -(62, 84, 1) 14 -(62, 85, 1) 13 -(62, 86, 1) 12 -(62, 87, 1) 11 -(62, 88, 1) 10 -(62, 89, 1) 9 -(62, 90, 1) 9 -(62, 91, 1) 8 -(62, 92, 1) 7 -(62, 93, 1) 6 -(62, 94, 1) 5 -(62, 95, 1) 4 -(62, 96, 1) 3 -(62, 97, 1) 2 -(63, 4, 1) 2 -(63, 5, 1) 3 -(63, 6, 1) 3 -(63, 7, 1) 4 -(63, 8, 1) 5 -(63, 9, 1) 6 -(63, 10, 1) 7 -(63, 11, 1) 8 -(63, 12, 1) 9 -(63, 13, 1) 10 -(63, 14, 1) 11 -(63, 15, 1) 12 -(63, 16, 1) 13 -(63, 17, 1) 14 -(63, 18, 1) 15 -(63, 19, 1) 16 -(63, 20, 1) 17 -(63, 21, 1) 18 -(63, 22, 1) 18 -(63, 23, 1) 19 -(63, 24, 1) 20 -(63, 25, 1) 21 -(63, 26, 1) 22 -(63, 27, 1) 23 -(63, 28, 1) 24 -(63, 29, 1) 25 -(63, 30, 1) 26 -(63, 31, 1) 26 -(63, 32, 1) 27 -(63, 33, 1) 28 -(63, 34, 1) 29 -(63, 35, 1) 30 -(63, 36, 1) 30 -(63, 37, 1) 31 -(63, 38, 1) 32 -(63, 39, 1) 33 -(63, 40, 1) 33 -(63, 41, 1) 34 -(63, 42, 1) 34 -(63, 43, 1) 35 -(63, 44, 1) 35 -(63, 45, 1) 36 -(63, 46, 1) 36 -(63, 47, 1) 37 -(63, 48, 1) 37 -(63, 49, 1) 37 -(63, 50, 1) 37 -(63, 51, 1) 37 -(63, 52, 1) 37 -(63, 53, 1) 37 -(63, 54, 1) 37 -(63, 55, 1) 36 -(63, 56, 1) 36 -(63, 57, 1) 35 -(63, 58, 1) 35 -(63, 59, 1) 34 -(63, 60, 1) 34 -(63, 61, 1) 33 -(63, 62, 1) 33 -(63, 63, 1) 32 -(63, 64, 1) 31 -(63, 65, 1) 30 -(63, 66, 1) 30 -(63, 67, 1) 29 -(63, 68, 1) 28 -(63, 69, 1) 27 -(63, 70, 1) 26 -(63, 71, 1) 26 -(63, 72, 1) 25 -(63, 73, 1) 24 -(63, 74, 1) 23 -(63, 75, 1) 22 -(63, 76, 1) 21 -(63, 77, 1) 20 -(63, 78, 1) 19 -(63, 79, 1) 18 -(63, 80, 1) 18 -(63, 81, 1) 17 -(63, 82, 1) 16 -(63, 83, 1) 15 -(63, 84, 1) 14 -(63, 85, 1) 13 -(63, 86, 1) 12 -(63, 87, 1) 11 -(63, 88, 1) 10 -(63, 89, 1) 9 -(63, 90, 1) 8 -(63, 91, 1) 7 -(63, 92, 1) 6 -(63, 93, 1) 5 -(63, 94, 1) 4 -(63, 95, 1) 3 -(63, 96, 1) 3 -(63, 97, 1) 2 -(64, 4, 1) 1 -(64, 5, 1) 2 -(64, 6, 1) 3 -(64, 7, 1) 4 -(64, 8, 1) 5 -(64, 9, 1) 6 -(64, 10, 1) 7 -(64, 11, 1) 8 -(64, 12, 1) 9 -(64, 13, 1) 10 -(64, 14, 1) 11 -(64, 15, 1) 12 -(64, 16, 1) 13 -(64, 17, 1) 14 -(64, 18, 1) 14 -(64, 19, 1) 15 -(64, 20, 1) 16 -(64, 21, 1) 17 -(64, 22, 1) 18 -(64, 23, 1) 19 -(64, 24, 1) 20 -(64, 25, 1) 21 -(64, 26, 1) 22 -(64, 27, 1) 22 -(64, 28, 1) 23 -(64, 29, 1) 24 -(64, 30, 1) 25 -(64, 31, 1) 26 -(64, 32, 1) 27 -(64, 33, 1) 27 -(64, 34, 1) 28 -(64, 35, 1) 29 -(64, 36, 1) 30 -(64, 37, 1) 30 -(64, 38, 1) 31 -(64, 39, 1) 32 -(64, 40, 1) 32 -(64, 41, 1) 33 -(64, 42, 1) 34 -(64, 43, 1) 34 -(64, 44, 1) 35 -(64, 45, 1) 35 -(64, 46, 1) 35 -(64, 47, 1) 36 -(64, 48, 1) 36 -(64, 49, 1) 36 -(64, 50, 1) 36 -(64, 51, 1) 36 -(64, 52, 1) 36 -(64, 53, 1) 36 -(64, 54, 1) 36 -(64, 55, 1) 35 -(64, 56, 1) 35 -(64, 57, 1) 35 -(64, 58, 1) 34 -(64, 59, 1) 34 -(64, 60, 1) 33 -(64, 61, 1) 32 -(64, 62, 1) 32 -(64, 63, 1) 31 -(64, 64, 1) 30 -(64, 65, 1) 30 -(64, 66, 1) 29 -(64, 67, 1) 28 -(64, 68, 1) 27 -(64, 69, 1) 27 -(64, 70, 1) 26 -(64, 71, 1) 25 -(64, 72, 1) 24 -(64, 73, 1) 23 -(64, 74, 1) 22 -(64, 75, 1) 22 -(64, 76, 1) 21 -(64, 77, 1) 20 -(64, 78, 1) 19 -(64, 79, 1) 18 -(64, 80, 1) 17 -(64, 81, 1) 16 -(64, 82, 1) 15 -(64, 83, 1) 14 -(64, 84, 1) 14 -(64, 85, 1) 13 -(64, 86, 1) 12 -(64, 87, 1) 11 -(64, 88, 1) 10 -(64, 89, 1) 9 -(64, 90, 1) 8 -(64, 91, 1) 7 -(64, 92, 1) 6 -(64, 93, 1) 5 -(64, 94, 1) 4 -(64, 95, 1) 3 -(64, 96, 1) 2 -(64, 97, 1) 1 -(65, 4, 1) 1 -(65, 5, 1) 2 -(65, 6, 1) 3 -(65, 7, 1) 4 -(65, 8, 1) 5 -(65, 9, 1) 6 -(65, 10, 1) 7 -(65, 11, 1) 8 -(65, 12, 1) 8 -(65, 13, 1) 9 -(65, 14, 1) 10 -(65, 15, 1) 11 -(65, 16, 1) 12 -(65, 17, 1) 13 -(65, 18, 1) 14 -(65, 19, 1) 15 -(65, 20, 1) 16 -(65, 21, 1) 17 -(65, 22, 1) 18 -(65, 23, 1) 19 -(65, 24, 1) 19 -(65, 25, 1) 20 -(65, 26, 1) 21 -(65, 27, 1) 22 -(65, 28, 1) 23 -(65, 29, 1) 24 -(65, 30, 1) 24 -(65, 31, 1) 25 -(65, 32, 1) 26 -(65, 33, 1) 27 -(65, 34, 1) 28 -(65, 35, 1) 28 -(65, 36, 1) 29 -(65, 37, 1) 30 -(65, 38, 1) 30 -(65, 39, 1) 31 -(65, 40, 1) 32 -(65, 41, 1) 32 -(65, 42, 1) 33 -(65, 43, 1) 33 -(65, 44, 1) 34 -(65, 45, 1) 34 -(65, 46, 1) 34 -(65, 47, 1) 35 -(65, 48, 1) 35 -(65, 49, 1) 35 -(65, 50, 1) 35 -(65, 51, 1) 35 -(65, 52, 1) 35 -(65, 53, 1) 35 -(65, 54, 1) 35 -(65, 55, 1) 34 -(65, 56, 1) 34 -(65, 57, 1) 34 -(65, 58, 1) 33 -(65, 59, 1) 33 -(65, 60, 1) 32 -(65, 61, 1) 32 -(65, 62, 1) 31 -(65, 63, 1) 30 -(65, 64, 1) 30 -(65, 65, 1) 29 -(65, 66, 1) 28 -(65, 67, 1) 28 -(65, 68, 1) 27 -(65, 69, 1) 26 -(65, 70, 1) 25 -(65, 71, 1) 24 -(65, 72, 1) 24 -(65, 73, 1) 23 -(65, 74, 1) 22 -(65, 75, 1) 21 -(65, 76, 1) 20 -(65, 77, 1) 19 -(65, 78, 1) 19 -(65, 79, 1) 18 -(65, 80, 1) 17 -(65, 81, 1) 16 -(65, 82, 1) 15 -(65, 83, 1) 14 -(65, 84, 1) 13 -(65, 85, 1) 12 -(65, 86, 1) 11 -(65, 87, 1) 10 -(65, 88, 1) 9 -(65, 89, 1) 8 -(65, 90, 1) 8 -(65, 91, 1) 7 -(65, 92, 1) 6 -(65, 93, 1) 5 -(65, 94, 1) 4 -(65, 95, 1) 3 -(65, 96, 1) 2 -(65, 97, 1) 1 -(66, 6, 1) 3 -(66, 7, 1) 4 -(66, 8, 1) 5 -(66, 9, 1) 6 -(66, 10, 1) 6 -(66, 11, 1) 7 -(66, 12, 1) 8 -(66, 13, 1) 9 -(66, 14, 1) 10 -(66, 15, 1) 11 -(66, 16, 1) 12 -(66, 17, 1) 13 -(66, 18, 1) 14 -(66, 19, 1) 15 -(66, 20, 1) 16 -(66, 21, 1) 16 -(66, 22, 1) 17 -(66, 23, 1) 18 -(66, 24, 1) 19 -(66, 25, 1) 20 -(66, 26, 1) 21 -(66, 27, 1) 21 -(66, 28, 1) 22 -(66, 29, 1) 23 -(66, 30, 1) 24 -(66, 31, 1) 25 -(66, 32, 1) 25 -(66, 33, 1) 26 -(66, 34, 1) 27 -(66, 35, 1) 28 -(66, 36, 1) 28 -(66, 37, 1) 29 -(66, 38, 1) 30 -(66, 39, 1) 30 -(66, 40, 1) 31 -(66, 41, 1) 31 -(66, 42, 1) 32 -(66, 43, 1) 32 -(66, 44, 1) 33 -(66, 45, 1) 33 -(66, 46, 1) 33 -(66, 47, 1) 34 -(66, 48, 1) 34 -(66, 49, 1) 34 -(66, 50, 1) 34 -(66, 51, 1) 34 -(66, 52, 1) 34 -(66, 53, 1) 34 -(66, 54, 1) 34 -(66, 55, 1) 33 -(66, 56, 1) 33 -(66, 57, 1) 33 -(66, 58, 1) 32 -(66, 59, 1) 32 -(66, 60, 1) 31 -(66, 61, 1) 31 -(66, 62, 1) 30 -(66, 63, 1) 30 -(66, 64, 1) 29 -(66, 65, 1) 28 -(66, 66, 1) 28 -(66, 67, 1) 27 -(66, 68, 1) 26 -(66, 69, 1) 25 -(66, 70, 1) 25 -(66, 71, 1) 24 -(66, 72, 1) 23 -(66, 73, 1) 22 -(66, 74, 1) 21 -(66, 75, 1) 21 -(66, 76, 1) 20 -(66, 77, 1) 19 -(66, 78, 1) 18 -(66, 79, 1) 17 -(66, 80, 1) 16 -(66, 81, 1) 16 -(66, 82, 1) 15 -(66, 83, 1) 14 -(66, 84, 1) 13 -(66, 85, 1) 12 -(66, 86, 1) 11 -(66, 87, 1) 10 -(66, 88, 1) 9 -(66, 89, 1) 8 -(66, 90, 1) 7 -(66, 91, 1) 6 -(66, 92, 1) 6 -(66, 93, 1) 5 -(66, 94, 1) 4 -(66, 95, 1) 3 -(67, 6, 1) 2 -(67, 7, 1) 3 -(67, 8, 1) 4 -(67, 9, 1) 5 -(67, 10, 1) 6 -(67, 11, 1) 7 -(67, 12, 1) 8 -(67, 13, 1) 9 -(67, 14, 1) 10 -(67, 15, 1) 11 -(67, 16, 1) 11 -(67, 17, 1) 12 -(67, 18, 1) 13 -(67, 19, 1) 14 -(67, 20, 1) 15 -(67, 21, 1) 16 -(67, 22, 1) 17 -(67, 23, 1) 18 -(67, 24, 1) 18 -(67, 25, 1) 19 -(67, 26, 1) 20 -(67, 27, 1) 21 -(67, 28, 1) 22 -(67, 29, 1) 23 -(67, 30, 1) 23 -(67, 31, 1) 24 -(67, 32, 1) 25 -(67, 33, 1) 26 -(67, 34, 1) 26 -(67, 35, 1) 27 -(67, 36, 1) 28 -(67, 37, 1) 28 -(67, 38, 1) 29 -(67, 39, 1) 29 -(67, 40, 1) 30 -(67, 41, 1) 30 -(67, 42, 1) 31 -(67, 43, 1) 31 -(67, 44, 1) 32 -(67, 45, 1) 32 -(67, 46, 1) 32 -(67, 47, 1) 33 -(67, 48, 1) 33 -(67, 49, 1) 33 -(67, 50, 1) 33 -(67, 51, 1) 33 -(67, 52, 1) 33 -(67, 53, 1) 33 -(67, 54, 1) 33 -(67, 55, 1) 32 -(67, 56, 1) 32 -(67, 57, 1) 32 -(67, 58, 1) 31 -(67, 59, 1) 31 -(67, 60, 1) 30 -(67, 61, 1) 30 -(67, 62, 1) 29 -(67, 63, 1) 29 -(67, 64, 1) 28 -(67, 65, 1) 28 -(67, 66, 1) 27 -(67, 67, 1) 26 -(67, 68, 1) 26 -(67, 69, 1) 25 -(67, 70, 1) 24 -(67, 71, 1) 23 -(67, 72, 1) 23 -(67, 73, 1) 22 -(67, 74, 1) 21 -(67, 75, 1) 20 -(67, 76, 1) 19 -(67, 77, 1) 18 -(67, 78, 1) 18 -(67, 79, 1) 17 -(67, 80, 1) 16 -(67, 81, 1) 15 -(67, 82, 1) 14 -(67, 83, 1) 13 -(67, 84, 1) 12 -(67, 85, 1) 11 -(67, 86, 1) 11 -(67, 87, 1) 10 -(67, 88, 1) 9 -(67, 89, 1) 8 -(67, 90, 1) 7 -(67, 91, 1) 6 -(67, 92, 1) 5 -(67, 93, 1) 4 -(67, 94, 1) 3 -(67, 95, 1) 2 -(68, 6, 1) 2 -(68, 7, 1) 3 -(68, 8, 1) 4 -(68, 9, 1) 5 -(68, 10, 1) 6 -(68, 11, 1) 7 -(68, 12, 1) 7 -(68, 13, 1) 8 -(68, 14, 1) 9 -(68, 15, 1) 10 -(68, 16, 1) 11 -(68, 17, 1) 12 -(68, 18, 1) 13 -(68, 19, 1) 14 -(68, 20, 1) 15 -(68, 21, 1) 15 -(68, 22, 1) 16 -(68, 23, 1) 17 -(68, 24, 1) 18 -(68, 25, 1) 19 -(68, 26, 1) 20 -(68, 27, 1) 20 -(68, 28, 1) 21 -(68, 29, 1) 22 -(68, 30, 1) 23 -(68, 31, 1) 23 -(68, 32, 1) 24 -(68, 33, 1) 25 -(68, 34, 1) 26 -(68, 35, 1) 26 -(68, 36, 1) 27 -(68, 37, 1) 27 -(68, 38, 1) 28 -(68, 39, 1) 29 -(68, 40, 1) 29 -(68, 41, 1) 30 -(68, 42, 1) 30 -(68, 43, 1) 30 -(68, 44, 1) 31 -(68, 45, 1) 31 -(68, 46, 1) 31 -(68, 47, 1) 32 -(68, 48, 1) 32 -(68, 49, 1) 32 -(68, 50, 1) 32 -(68, 51, 1) 32 -(68, 52, 1) 32 -(68, 53, 1) 32 -(68, 54, 1) 32 -(68, 55, 1) 31 -(68, 56, 1) 31 -(68, 57, 1) 31 -(68, 58, 1) 30 -(68, 59, 1) 30 -(68, 60, 1) 30 -(68, 61, 1) 29 -(68, 62, 1) 29 -(68, 63, 1) 28 -(68, 64, 1) 27 -(68, 65, 1) 27 -(68, 66, 1) 26 -(68, 67, 1) 26 -(68, 68, 1) 25 -(68, 69, 1) 24 -(68, 70, 1) 23 -(68, 71, 1) 23 -(68, 72, 1) 22 -(68, 73, 1) 21 -(68, 74, 1) 20 -(68, 75, 1) 20 -(68, 76, 1) 19 -(68, 77, 1) 18 -(68, 78, 1) 17 -(68, 79, 1) 16 -(68, 80, 1) 15 -(68, 81, 1) 15 -(68, 82, 1) 14 -(68, 83, 1) 13 -(68, 84, 1) 12 -(68, 85, 1) 11 -(68, 86, 1) 10 -(68, 87, 1) 9 -(68, 88, 1) 8 -(68, 89, 1) 7 -(68, 90, 1) 7 -(68, 91, 1) 6 -(68, 92, 1) 5 -(68, 93, 1) 4 -(68, 94, 1) 3 -(68, 95, 1) 2 -(69, 6, 1) 2 -(69, 7, 1) 2 -(69, 8, 1) 3 -(69, 9, 1) 4 -(69, 10, 1) 5 -(69, 11, 1) 6 -(69, 12, 1) 7 -(69, 13, 1) 8 -(69, 14, 1) 9 -(69, 15, 1) 10 -(69, 16, 1) 11 -(69, 17, 1) 11 -(69, 18, 1) 12 -(69, 19, 1) 13 -(69, 20, 1) 14 -(69, 21, 1) 15 -(69, 22, 1) 16 -(69, 23, 1) 17 -(69, 24, 1) 17 -(69, 25, 1) 18 -(69, 26, 1) 19 -(69, 27, 1) 20 -(69, 28, 1) 20 -(69, 29, 1) 21 -(69, 30, 1) 22 -(69, 31, 1) 23 -(69, 32, 1) 23 -(69, 33, 1) 24 -(69, 34, 1) 25 -(69, 35, 1) 25 -(69, 36, 1) 26 -(69, 37, 1) 27 -(69, 38, 1) 27 -(69, 39, 1) 28 -(69, 40, 1) 28 -(69, 41, 1) 29 -(69, 42, 1) 29 -(69, 43, 1) 30 -(69, 44, 1) 30 -(69, 45, 1) 30 -(69, 46, 1) 30 -(69, 47, 1) 31 -(69, 48, 1) 31 -(69, 49, 1) 31 -(69, 50, 1) 31 -(69, 51, 1) 31 -(69, 52, 1) 31 -(69, 53, 1) 31 -(69, 54, 1) 31 -(69, 55, 1) 30 -(69, 56, 1) 30 -(69, 57, 1) 30 -(69, 58, 1) 30 -(69, 59, 1) 29 -(69, 60, 1) 29 -(69, 61, 1) 28 -(69, 62, 1) 28 -(69, 63, 1) 27 -(69, 64, 1) 27 -(69, 65, 1) 26 -(69, 66, 1) 25 -(69, 67, 1) 25 -(69, 68, 1) 24 -(69, 69, 1) 23 -(69, 70, 1) 23 -(69, 71, 1) 22 -(69, 72, 1) 21 -(69, 73, 1) 20 -(69, 74, 1) 20 -(69, 75, 1) 19 -(69, 76, 1) 18 -(69, 77, 1) 17 -(69, 78, 1) 17 -(69, 79, 1) 16 -(69, 80, 1) 15 -(69, 81, 1) 14 -(69, 82, 1) 13 -(69, 83, 1) 12 -(69, 84, 1) 11 -(69, 85, 1) 11 -(69, 86, 1) 10 -(69, 87, 1) 9 -(69, 88, 1) 8 -(69, 89, 1) 7 -(69, 90, 1) 6 -(69, 91, 1) 5 -(69, 92, 1) 4 -(69, 93, 1) 3 -(69, 94, 1) 2 -(69, 95, 1) 2 -(70, 6, 1) 1 -(70, 7, 1) 2 -(70, 8, 1) 3 -(70, 9, 1) 4 -(70, 10, 1) 5 -(70, 11, 1) 6 -(70, 12, 1) 7 -(70, 13, 1) 7 -(70, 14, 1) 8 -(70, 15, 1) 9 -(70, 16, 1) 10 -(70, 17, 1) 11 -(70, 18, 1) 12 -(70, 19, 1) 13 -(70, 20, 1) 13 -(70, 21, 1) 14 -(70, 22, 1) 15 -(70, 23, 1) 16 -(70, 24, 1) 17 -(70, 25, 1) 18 -(70, 26, 1) 18 -(70, 27, 1) 19 -(70, 28, 1) 20 -(70, 29, 1) 21 -(70, 30, 1) 21 -(70, 31, 1) 22 -(70, 32, 1) 23 -(70, 33, 1) 23 -(70, 34, 1) 24 -(70, 35, 1) 25 -(70, 36, 1) 25 -(70, 37, 1) 26 -(70, 38, 1) 26 -(70, 39, 1) 27 -(70, 40, 1) 27 -(70, 41, 1) 28 -(70, 42, 1) 28 -(70, 43, 1) 29 -(70, 44, 1) 29 -(70, 45, 1) 29 -(70, 46, 1) 30 -(70, 47, 1) 30 -(70, 48, 1) 30 -(70, 49, 1) 30 -(70, 50, 1) 30 -(70, 51, 1) 30 -(70, 52, 1) 30 -(70, 53, 1) 30 -(70, 54, 1) 30 -(70, 55, 1) 30 -(70, 56, 1) 29 -(70, 57, 1) 29 -(70, 58, 1) 29 -(70, 59, 1) 28 -(70, 60, 1) 28 -(70, 61, 1) 27 -(70, 62, 1) 27 -(70, 63, 1) 26 -(70, 64, 1) 26 -(70, 65, 1) 25 -(70, 66, 1) 25 -(70, 67, 1) 24 -(70, 68, 1) 23 -(70, 69, 1) 23 -(70, 70, 1) 22 -(70, 71, 1) 21 -(70, 72, 1) 21 -(70, 73, 1) 20 -(70, 74, 1) 19 -(70, 75, 1) 18 -(70, 76, 1) 18 -(70, 77, 1) 17 -(70, 78, 1) 16 -(70, 79, 1) 15 -(70, 80, 1) 14 -(70, 81, 1) 13 -(70, 82, 1) 13 -(70, 83, 1) 12 -(70, 84, 1) 11 -(70, 85, 1) 10 -(70, 86, 1) 9 -(70, 87, 1) 8 -(70, 88, 1) 7 -(70, 89, 1) 7 -(70, 90, 1) 6 -(70, 91, 1) 5 -(70, 92, 1) 4 -(70, 93, 1) 3 -(70, 94, 1) 2 -(70, 95, 1) 1 -(71, 6, 1) 1 -(71, 7, 1) 2 -(71, 8, 1) 3 -(71, 9, 1) 4 -(71, 10, 1) 5 -(71, 11, 1) 5 -(71, 12, 1) 6 -(71, 13, 1) 7 -(71, 14, 1) 8 -(71, 15, 1) 9 -(71, 16, 1) 10 -(71, 17, 1) 11 -(71, 18, 1) 11 -(71, 19, 1) 12 -(71, 20, 1) 13 -(71, 21, 1) 14 -(71, 22, 1) 15 -(71, 23, 1) 15 -(71, 24, 1) 16 -(71, 25, 1) 17 -(71, 26, 1) 18 -(71, 27, 1) 19 -(71, 28, 1) 19 -(71, 29, 1) 20 -(71, 30, 1) 21 -(71, 31, 1) 21 -(71, 32, 1) 22 -(71, 33, 1) 23 -(71, 34, 1) 23 -(71, 35, 1) 24 -(71, 36, 1) 24 -(71, 37, 1) 25 -(71, 38, 1) 26 -(71, 39, 1) 26 -(71, 40, 1) 27 -(71, 41, 1) 27 -(71, 42, 1) 27 -(71, 43, 1) 28 -(71, 44, 1) 28 -(71, 45, 1) 28 -(71, 46, 1) 29 -(71, 47, 1) 29 -(71, 48, 1) 29 -(71, 49, 1) 29 -(71, 50, 1) 29 -(71, 51, 1) 29 -(71, 52, 1) 29 -(71, 53, 1) 29 -(71, 54, 1) 29 -(71, 55, 1) 29 -(71, 56, 1) 28 -(71, 57, 1) 28 -(71, 58, 1) 28 -(71, 59, 1) 27 -(71, 60, 1) 27 -(71, 61, 1) 27 -(71, 62, 1) 26 -(71, 63, 1) 26 -(71, 64, 1) 25 -(71, 65, 1) 24 -(71, 66, 1) 24 -(71, 67, 1) 23 -(71, 68, 1) 23 -(71, 69, 1) 22 -(71, 70, 1) 21 -(71, 71, 1) 21 -(71, 72, 1) 20 -(71, 73, 1) 19 -(71, 74, 1) 19 -(71, 75, 1) 18 -(71, 76, 1) 17 -(71, 77, 1) 16 -(71, 78, 1) 15 -(71, 79, 1) 15 -(71, 80, 1) 14 -(71, 81, 1) 13 -(71, 82, 1) 12 -(71, 83, 1) 11 -(71, 84, 1) 11 -(71, 85, 1) 10 -(71, 86, 1) 9 -(71, 87, 1) 8 -(71, 88, 1) 7 -(71, 89, 1) 6 -(71, 90, 1) 5 -(71, 91, 1) 5 -(71, 92, 1) 4 -(71, 93, 1) 3 -(71, 94, 1) 2 -(71, 95, 1) 1 -(72, 6, 1) 1 -(72, 7, 1) 1 -(72, 8, 1) 2 -(72, 9, 1) 3 -(72, 10, 1) 4 -(72, 11, 1) 5 -(72, 12, 1) 6 -(72, 13, 1) 7 -(72, 14, 1) 7 -(72, 15, 1) 8 -(72, 16, 1) 9 -(72, 17, 1) 10 -(72, 18, 1) 11 -(72, 19, 1) 12 -(72, 20, 1) 12 -(72, 21, 1) 13 -(72, 22, 1) 14 -(72, 23, 1) 15 -(72, 24, 1) 16 -(72, 25, 1) 16 -(72, 26, 1) 17 -(72, 27, 1) 18 -(72, 28, 1) 19 -(72, 29, 1) 19 -(72, 30, 1) 20 -(72, 31, 1) 21 -(72, 32, 1) 21 -(72, 33, 1) 22 -(72, 34, 1) 23 -(72, 35, 1) 23 -(72, 36, 1) 24 -(72, 37, 1) 24 -(72, 38, 1) 25 -(72, 39, 1) 25 -(72, 40, 1) 26 -(72, 41, 1) 26 -(72, 42, 1) 26 -(72, 43, 1) 27 -(72, 44, 1) 27 -(72, 45, 1) 27 -(72, 46, 1) 28 -(72, 47, 1) 28 -(72, 48, 1) 28 -(72, 49, 1) 28 -(72, 50, 1) 28 -(72, 51, 1) 28 -(72, 52, 1) 28 -(72, 53, 1) 28 -(72, 54, 1) 28 -(72, 55, 1) 28 -(72, 56, 1) 27 -(72, 57, 1) 27 -(72, 58, 1) 27 -(72, 59, 1) 26 -(72, 60, 1) 26 -(72, 61, 1) 26 -(72, 62, 1) 25 -(72, 63, 1) 25 -(72, 64, 1) 24 -(72, 65, 1) 24 -(72, 66, 1) 23 -(72, 67, 1) 23 -(72, 68, 1) 22 -(72, 69, 1) 21 -(72, 70, 1) 21 -(72, 71, 1) 20 -(72, 72, 1) 19 -(72, 73, 1) 19 -(72, 74, 1) 18 -(72, 75, 1) 17 -(72, 76, 1) 16 -(72, 77, 1) 16 -(72, 78, 1) 15 -(72, 79, 1) 14 -(72, 80, 1) 13 -(72, 81, 1) 12 -(72, 82, 1) 12 -(72, 83, 1) 11 -(72, 84, 1) 10 -(72, 85, 1) 9 -(72, 86, 1) 8 -(72, 87, 1) 7 -(72, 88, 1) 7 -(72, 89, 1) 6 -(72, 90, 1) 5 -(72, 91, 1) 4 -(72, 92, 1) 3 -(72, 93, 1) 2 -(72, 94, 1) 1 -(72, 95, 1) 1 -(73, 6, 1) 0 -(73, 7, 1) 1 -(73, 8, 1) 2 -(73, 9, 1) 3 -(73, 10, 1) 4 -(73, 11, 1) 4 -(73, 12, 1) 5 -(73, 13, 1) 6 -(73, 14, 1) 7 -(73, 15, 1) 8 -(73, 16, 1) 9 -(73, 17, 1) 9 -(73, 18, 1) 10 -(73, 19, 1) 11 -(73, 20, 1) 12 -(73, 21, 1) 13 -(73, 22, 1) 13 -(73, 23, 1) 14 -(73, 24, 1) 15 -(73, 25, 1) 16 -(73, 26, 1) 16 -(73, 27, 1) 17 -(73, 28, 1) 18 -(73, 29, 1) 19 -(73, 30, 1) 19 -(73, 31, 1) 20 -(73, 32, 1) 20 -(73, 33, 1) 21 -(73, 34, 1) 22 -(73, 35, 1) 22 -(73, 36, 1) 23 -(73, 37, 1) 23 -(73, 38, 1) 24 -(73, 39, 1) 24 -(73, 40, 1) 25 -(73, 41, 1) 25 -(73, 42, 1) 25 -(73, 43, 1) 26 -(73, 44, 1) 26 -(73, 45, 1) 26 -(73, 46, 1) 27 -(73, 47, 1) 27 -(73, 48, 1) 27 -(73, 49, 1) 27 -(73, 50, 1) 27 -(73, 51, 1) 27 -(73, 52, 1) 27 -(73, 53, 1) 27 -(73, 54, 1) 27 -(73, 55, 1) 27 -(73, 56, 1) 26 -(73, 57, 1) 26 -(73, 58, 1) 26 -(73, 59, 1) 25 -(73, 60, 1) 25 -(73, 61, 1) 25 -(73, 62, 1) 24 -(73, 63, 1) 24 -(73, 64, 1) 23 -(73, 65, 1) 23 -(73, 66, 1) 22 -(73, 67, 1) 22 -(73, 68, 1) 21 -(73, 69, 1) 20 -(73, 70, 1) 20 -(73, 71, 1) 19 -(73, 72, 1) 19 -(73, 73, 1) 18 -(73, 74, 1) 17 -(73, 75, 1) 16 -(73, 76, 1) 16 -(73, 77, 1) 15 -(73, 78, 1) 14 -(73, 79, 1) 13 -(73, 80, 1) 13 -(73, 81, 1) 12 -(73, 82, 1) 11 -(73, 83, 1) 10 -(73, 84, 1) 9 -(73, 85, 1) 9 -(73, 86, 1) 8 -(73, 87, 1) 7 -(73, 88, 1) 6 -(73, 89, 1) 5 -(73, 90, 1) 4 -(73, 91, 1) 4 -(73, 92, 1) 3 -(73, 93, 1) 2 -(73, 94, 1) 1 -(73, 95, 1) 0 -(74, 6, 1) 0 -(74, 7, 1) 0 -(74, 8, 1) 1 -(74, 9, 1) 2 -(74, 10, 1) 3 -(74, 11, 1) 4 -(74, 12, 1) 5 -(74, 13, 1) 6 -(74, 14, 1) 6 -(74, 15, 1) 7 -(74, 16, 1) 8 -(74, 17, 1) 9 -(74, 18, 1) 10 -(74, 19, 1) 10 -(74, 20, 1) 11 -(74, 21, 1) 12 -(74, 22, 1) 13 -(74, 23, 1) 14 -(74, 24, 1) 14 -(74, 25, 1) 15 -(74, 26, 1) 16 -(74, 27, 1) 16 -(74, 28, 1) 17 -(74, 29, 1) 18 -(74, 30, 1) 18 -(74, 31, 1) 19 -(74, 32, 1) 20 -(74, 33, 1) 20 -(74, 34, 1) 21 -(74, 35, 1) 21 -(74, 36, 1) 22 -(74, 37, 1) 22 -(74, 38, 1) 23 -(74, 39, 1) 23 -(74, 40, 1) 24 -(74, 41, 1) 24 -(74, 42, 1) 25 -(74, 43, 1) 25 -(74, 44, 1) 25 -(74, 45, 1) 25 -(74, 46, 1) 26 -(74, 47, 1) 26 -(74, 48, 1) 26 -(74, 49, 1) 26 -(74, 50, 1) 26 -(74, 51, 1) 26 -(74, 52, 1) 26 -(74, 53, 1) 26 -(74, 54, 1) 26 -(74, 55, 1) 26 -(74, 56, 1) 25 -(74, 57, 1) 25 -(74, 58, 1) 25 -(74, 59, 1) 25 -(74, 60, 1) 24 -(74, 61, 1) 24 -(74, 62, 1) 23 -(74, 63, 1) 23 -(74, 64, 1) 22 -(74, 65, 1) 22 -(74, 66, 1) 21 -(74, 67, 1) 21 -(74, 68, 1) 20 -(74, 69, 1) 20 -(74, 70, 1) 19 -(74, 71, 1) 18 -(74, 72, 1) 18 -(74, 73, 1) 17 -(74, 74, 1) 16 -(74, 75, 1) 16 -(74, 76, 1) 15 -(74, 77, 1) 14 -(74, 78, 1) 14 -(74, 79, 1) 13 -(74, 80, 1) 12 -(74, 81, 1) 11 -(74, 82, 1) 10 -(74, 83, 1) 10 -(74, 84, 1) 9 -(74, 85, 1) 8 -(74, 86, 1) 7 -(74, 87, 1) 6 -(74, 88, 1) 6 -(74, 89, 1) 5 -(74, 90, 1) 4 -(74, 91, 1) 3 -(74, 92, 1) 2 -(74, 93, 1) 1 -(74, 94, 1) 0 -(74, 95, 1) 0 -(75, 6, 1) 0 -(75, 7, 1) 0 -(75, 8, 1) 1 -(75, 9, 1) 2 -(75, 10, 1) 3 -(75, 11, 1) 3 -(75, 12, 1) 4 -(75, 13, 1) 5 -(75, 14, 1) 6 -(75, 15, 1) 7 -(75, 16, 1) 7 -(75, 17, 1) 8 -(75, 18, 1) 9 -(75, 19, 1) 10 -(75, 20, 1) 11 -(75, 21, 1) 11 -(75, 22, 1) 12 -(75, 23, 1) 13 -(75, 24, 1) 14 -(75, 25, 1) 14 -(75, 26, 1) 15 -(75, 27, 1) 16 -(75, 28, 1) 16 -(75, 29, 1) 17 -(75, 30, 1) 18 -(75, 31, 1) 18 -(75, 32, 1) 19 -(75, 33, 1) 19 -(75, 34, 1) 20 -(75, 35, 1) 21 -(75, 36, 1) 21 -(75, 37, 1) 22 -(75, 38, 1) 22 -(75, 39, 1) 22 -(75, 40, 1) 23 -(75, 41, 1) 23 -(75, 42, 1) 24 -(75, 43, 1) 24 -(75, 44, 1) 24 -(75, 45, 1) 24 -(75, 46, 1) 25 -(75, 47, 1) 25 -(75, 48, 1) 25 -(75, 49, 1) 25 -(75, 50, 1) 25 -(75, 51, 1) 25 -(75, 52, 1) 25 -(75, 53, 1) 25 -(75, 54, 1) 25 -(75, 55, 1) 25 -(75, 56, 1) 24 -(75, 57, 1) 24 -(75, 58, 1) 24 -(75, 59, 1) 24 -(75, 60, 1) 23 -(75, 61, 1) 23 -(75, 62, 1) 22 -(75, 63, 1) 22 -(75, 64, 1) 22 -(75, 65, 1) 21 -(75, 66, 1) 21 -(75, 67, 1) 20 -(75, 68, 1) 19 -(75, 69, 1) 19 -(75, 70, 1) 18 -(75, 71, 1) 18 -(75, 72, 1) 17 -(75, 73, 1) 16 -(75, 74, 1) 16 -(75, 75, 1) 15 -(75, 76, 1) 14 -(75, 77, 1) 14 -(75, 78, 1) 13 -(75, 79, 1) 12 -(75, 80, 1) 11 -(75, 81, 1) 11 -(75, 82, 1) 10 -(75, 83, 1) 9 -(75, 84, 1) 8 -(75, 85, 1) 7 -(75, 86, 1) 7 -(75, 87, 1) 6 -(75, 88, 1) 5 -(75, 89, 1) 4 -(75, 90, 1) 3 -(75, 91, 1) 3 -(75, 92, 1) 2 -(75, 93, 1) 1 -(75, 94, 1) 0 -(75, 95, 1) 0 -(76, 9, 1) 1 -(76, 10, 1) 2 -(76, 11, 1) 3 -(76, 12, 1) 4 -(76, 13, 1) 5 -(76, 14, 1) 5 -(76, 15, 1) 6 -(76, 16, 1) 7 -(76, 17, 1) 8 -(76, 18, 1) 9 -(76, 19, 1) 9 -(76, 20, 1) 10 -(76, 21, 1) 11 -(76, 22, 1) 12 -(76, 23, 1) 12 -(76, 24, 1) 13 -(76, 25, 1) 14 -(76, 26, 1) 14 -(76, 27, 1) 15 -(76, 28, 1) 16 -(76, 29, 1) 16 -(76, 30, 1) 17 -(76, 31, 1) 18 -(76, 32, 1) 18 -(76, 33, 1) 19 -(76, 34, 1) 19 -(76, 35, 1) 20 -(76, 36, 1) 20 -(76, 37, 1) 21 -(76, 38, 1) 21 -(76, 39, 1) 22 -(76, 40, 1) 22 -(76, 41, 1) 22 -(76, 42, 1) 23 -(76, 43, 1) 23 -(76, 44, 1) 23 -(76, 45, 1) 23 -(76, 46, 1) 24 -(76, 47, 1) 24 -(76, 48, 1) 24 -(76, 49, 1) 24 -(76, 50, 1) 24 -(76, 51, 1) 24 -(76, 52, 1) 24 -(76, 53, 1) 24 -(76, 54, 1) 24 -(76, 55, 1) 24 -(76, 56, 1) 23 -(76, 57, 1) 23 -(76, 58, 1) 23 -(76, 59, 1) 23 -(76, 60, 1) 22 -(76, 61, 1) 22 -(76, 62, 1) 22 -(76, 63, 1) 21 -(76, 64, 1) 21 -(76, 65, 1) 20 -(76, 66, 1) 20 -(76, 67, 1) 19 -(76, 68, 1) 19 -(76, 69, 1) 18 -(76, 70, 1) 18 -(76, 71, 1) 17 -(76, 72, 1) 16 -(76, 73, 1) 16 -(76, 74, 1) 15 -(76, 75, 1) 14 -(76, 76, 1) 14 -(76, 77, 1) 13 -(76, 78, 1) 12 -(76, 79, 1) 12 -(76, 80, 1) 11 -(76, 81, 1) 10 -(76, 82, 1) 9 -(76, 83, 1) 9 -(76, 84, 1) 8 -(76, 85, 1) 7 -(76, 86, 1) 6 -(76, 87, 1) 5 -(76, 88, 1) 5 -(76, 89, 1) 4 -(76, 90, 1) 3 -(76, 91, 1) 2 -(76, 92, 1) 1 -(77, 9, 1) 1 -(77, 10, 1) 2 -(77, 11, 1) 2 -(77, 12, 1) 3 -(77, 13, 1) 4 -(77, 14, 1) 5 -(77, 15, 1) 6 -(77, 16, 1) 6 -(77, 17, 1) 7 -(77, 18, 1) 8 -(77, 19, 1) 9 -(77, 20, 1) 9 -(77, 21, 1) 10 -(77, 22, 1) 11 -(77, 23, 1) 12 -(77, 24, 1) 12 -(77, 25, 1) 13 -(77, 26, 1) 14 -(77, 27, 1) 14 -(77, 28, 1) 15 -(77, 29, 1) 16 -(77, 30, 1) 16 -(77, 31, 1) 17 -(77, 32, 1) 17 -(77, 33, 1) 18 -(77, 34, 1) 18 -(77, 35, 1) 19 -(77, 36, 1) 19 -(77, 37, 1) 20 -(77, 38, 1) 20 -(77, 39, 1) 21 -(77, 40, 1) 21 -(77, 41, 1) 21 -(77, 42, 1) 22 -(77, 43, 1) 22 -(77, 44, 1) 22 -(77, 45, 1) 22 -(77, 46, 1) 23 -(77, 47, 1) 23 -(77, 48, 1) 23 -(77, 49, 1) 23 -(77, 50, 1) 23 -(77, 51, 1) 23 -(77, 52, 1) 23 -(77, 53, 1) 23 -(77, 54, 1) 23 -(77, 55, 1) 23 -(77, 56, 1) 22 -(77, 57, 1) 22 -(77, 58, 1) 22 -(77, 59, 1) 22 -(77, 60, 1) 21 -(77, 61, 1) 21 -(77, 62, 1) 21 -(77, 63, 1) 20 -(77, 64, 1) 20 -(77, 65, 1) 19 -(77, 66, 1) 19 -(77, 67, 1) 18 -(77, 68, 1) 18 -(77, 69, 1) 17 -(77, 70, 1) 17 -(77, 71, 1) 16 -(77, 72, 1) 16 -(77, 73, 1) 15 -(77, 74, 1) 14 -(77, 75, 1) 14 -(77, 76, 1) 13 -(77, 77, 1) 12 -(77, 78, 1) 12 -(77, 79, 1) 11 -(77, 80, 1) 10 -(77, 81, 1) 9 -(77, 82, 1) 9 -(77, 83, 1) 8 -(77, 84, 1) 7 -(77, 85, 1) 6 -(77, 86, 1) 6 -(77, 87, 1) 5 -(77, 88, 1) 4 -(77, 89, 1) 3 -(77, 90, 1) 2 -(77, 91, 1) 2 -(77, 92, 1) 1 -(78, 9, 1) 0 -(78, 10, 1) 1 -(78, 11, 1) 2 -(78, 12, 1) 3 -(78, 13, 1) 3 -(78, 14, 1) 4 -(78, 15, 1) 5 -(78, 16, 1) 6 -(78, 17, 1) 7 -(78, 18, 1) 7 -(78, 19, 1) 8 -(78, 20, 1) 9 -(78, 21, 1) 9 -(78, 22, 1) 10 -(78, 23, 1) 11 -(78, 24, 1) 12 -(78, 25, 1) 12 -(78, 26, 1) 13 -(78, 27, 1) 14 -(78, 28, 1) 14 -(78, 29, 1) 15 -(78, 30, 1) 15 -(78, 31, 1) 16 -(78, 32, 1) 17 -(78, 33, 1) 17 -(78, 34, 1) 18 -(78, 35, 1) 18 -(78, 36, 1) 19 -(78, 37, 1) 19 -(78, 38, 1) 19 -(78, 39, 1) 20 -(78, 40, 1) 20 -(78, 41, 1) 20 -(78, 42, 1) 21 -(78, 43, 1) 21 -(78, 44, 1) 21 -(78, 45, 1) 21 -(78, 46, 1) 22 -(78, 47, 1) 22 -(78, 48, 1) 22 -(78, 49, 1) 22 -(78, 50, 1) 22 -(78, 51, 1) 22 -(78, 52, 1) 22 -(78, 53, 1) 22 -(78, 54, 1) 22 -(78, 55, 1) 22 -(78, 56, 1) 21 -(78, 57, 1) 21 -(78, 58, 1) 21 -(78, 59, 1) 21 -(78, 60, 1) 20 -(78, 61, 1) 20 -(78, 62, 1) 20 -(78, 63, 1) 19 -(78, 64, 1) 19 -(78, 65, 1) 19 -(78, 66, 1) 18 -(78, 67, 1) 18 -(78, 68, 1) 17 -(78, 69, 1) 17 -(78, 70, 1) 16 -(78, 71, 1) 15 -(78, 72, 1) 15 -(78, 73, 1) 14 -(78, 74, 1) 14 -(78, 75, 1) 13 -(78, 76, 1) 12 -(78, 77, 1) 12 -(78, 78, 1) 11 -(78, 79, 1) 10 -(78, 80, 1) 9 -(78, 81, 1) 9 -(78, 82, 1) 8 -(78, 83, 1) 7 -(78, 84, 1) 7 -(78, 85, 1) 6 -(78, 86, 1) 5 -(78, 87, 1) 4 -(78, 88, 1) 3 -(78, 89, 1) 3 -(78, 90, 1) 2 -(78, 91, 1) 1 -(78, 92, 1) 0 -(79, 9, 1) 0 -(79, 10, 1) 1 -(79, 11, 1) 1 -(79, 12, 1) 2 -(79, 13, 1) 3 -(79, 14, 1) 4 -(79, 15, 1) 4 -(79, 16, 1) 5 -(79, 17, 1) 6 -(79, 18, 1) 7 -(79, 19, 1) 7 -(79, 20, 1) 8 -(79, 21, 1) 9 -(79, 22, 1) 9 -(79, 23, 1) 10 -(79, 24, 1) 11 -(79, 25, 1) 12 -(79, 26, 1) 12 -(79, 27, 1) 13 -(79, 28, 1) 13 -(79, 29, 1) 14 -(79, 30, 1) 15 -(79, 31, 1) 15 -(79, 32, 1) 16 -(79, 33, 1) 16 -(79, 34, 1) 17 -(79, 35, 1) 17 -(79, 36, 1) 18 -(79, 37, 1) 18 -(79, 38, 1) 18 -(79, 39, 1) 19 -(79, 40, 1) 19 -(79, 41, 1) 20 -(79, 42, 1) 20 -(79, 43, 1) 20 -(79, 44, 1) 20 -(79, 45, 1) 20 -(79, 46, 1) 21 -(79, 47, 1) 21 -(79, 48, 1) 21 -(79, 49, 1) 21 -(79, 50, 1) 21 -(79, 51, 1) 21 -(79, 52, 1) 21 -(79, 53, 1) 21 -(79, 54, 1) 21 -(79, 55, 1) 21 -(79, 56, 1) 20 -(79, 57, 1) 20 -(79, 58, 1) 20 -(79, 59, 1) 20 -(79, 60, 1) 20 -(79, 61, 1) 19 -(79, 62, 1) 19 -(79, 63, 1) 18 -(79, 64, 1) 18 -(79, 65, 1) 18 -(79, 66, 1) 17 -(79, 67, 1) 17 -(79, 68, 1) 16 -(79, 69, 1) 16 -(79, 70, 1) 15 -(79, 71, 1) 15 -(79, 72, 1) 14 -(79, 73, 1) 13 -(79, 74, 1) 13 -(79, 75, 1) 12 -(79, 76, 1) 12 -(79, 77, 1) 11 -(79, 78, 1) 10 -(79, 79, 1) 9 -(79, 80, 1) 9 -(79, 81, 1) 8 -(79, 82, 1) 7 -(79, 83, 1) 7 -(79, 84, 1) 6 -(79, 85, 1) 5 -(79, 86, 1) 4 -(79, 87, 1) 4 -(79, 88, 1) 3 -(79, 89, 1) 2 -(79, 90, 1) 1 -(79, 91, 1) 1 -(79, 92, 1) 0 -(80, 9, 1) 0 -(80, 10, 1) 0 -(80, 11, 1) 1 -(80, 12, 1) 1 -(80, 13, 1) 2 -(80, 14, 1) 3 -(80, 15, 1) 4 -(80, 16, 1) 4 -(80, 17, 1) 5 -(80, 18, 1) 6 -(80, 19, 1) 7 -(80, 20, 1) 7 -(80, 21, 1) 8 -(80, 22, 1) 9 -(80, 23, 1) 9 -(80, 24, 1) 10 -(80, 25, 1) 11 -(80, 26, 1) 11 -(80, 27, 1) 12 -(80, 28, 1) 13 -(80, 29, 1) 13 -(80, 30, 1) 14 -(80, 31, 1) 14 -(80, 32, 1) 15 -(80, 33, 1) 15 -(80, 34, 1) 16 -(80, 35, 1) 16 -(80, 36, 1) 17 -(80, 37, 1) 17 -(80, 38, 1) 18 -(80, 39, 1) 18 -(80, 40, 1) 18 -(80, 41, 1) 19 -(80, 42, 1) 19 -(80, 43, 1) 19 -(80, 44, 1) 19 -(80, 45, 1) 20 -(80, 46, 1) 20 -(80, 47, 1) 20 -(80, 48, 1) 20 -(80, 49, 1) 20 -(80, 50, 1) 20 -(80, 51, 1) 20 -(80, 52, 1) 20 -(80, 53, 1) 20 -(80, 54, 1) 20 -(80, 55, 1) 20 -(80, 56, 1) 20 -(80, 57, 1) 19 -(80, 58, 1) 19 -(80, 59, 1) 19 -(80, 60, 1) 19 -(80, 61, 1) 18 -(80, 62, 1) 18 -(80, 63, 1) 18 -(80, 64, 1) 17 -(80, 65, 1) 17 -(80, 66, 1) 16 -(80, 67, 1) 16 -(80, 68, 1) 15 -(80, 69, 1) 15 -(80, 70, 1) 14 -(80, 71, 1) 14 -(80, 72, 1) 13 -(80, 73, 1) 13 -(80, 74, 1) 12 -(80, 75, 1) 11 -(80, 76, 1) 11 -(80, 77, 1) 10 -(80, 78, 1) 9 -(80, 79, 1) 9 -(80, 80, 1) 8 -(80, 81, 1) 7 -(80, 82, 1) 7 -(80, 83, 1) 6 -(80, 84, 1) 5 -(80, 85, 1) 4 -(80, 86, 1) 4 -(80, 87, 1) 3 -(80, 88, 1) 2 -(80, 89, 1) 1 -(80, 90, 1) 1 -(80, 91, 1) 0 -(80, 92, 1) 0 -(81, 14, 1) 3 -(81, 15, 1) 3 -(81, 16, 1) 4 -(81, 17, 1) 5 -(81, 18, 1) 5 -(81, 19, 1) 6 -(81, 20, 1) 7 -(81, 21, 1) 7 -(81, 22, 1) 8 -(81, 23, 1) 9 -(81, 24, 1) 9 -(81, 25, 1) 10 -(81, 26, 1) 11 -(81, 27, 1) 11 -(81, 28, 1) 12 -(81, 29, 1) 12 -(81, 30, 1) 13 -(81, 31, 1) 14 -(81, 32, 1) 14 -(81, 33, 1) 15 -(81, 34, 1) 15 -(81, 35, 1) 15 -(81, 36, 1) 16 -(81, 37, 1) 16 -(81, 38, 1) 17 -(81, 39, 1) 17 -(81, 40, 1) 17 -(81, 41, 1) 18 -(81, 42, 1) 18 -(81, 43, 1) 18 -(81, 44, 1) 18 -(81, 45, 1) 19 -(81, 46, 1) 19 -(81, 47, 1) 19 -(81, 48, 1) 19 -(81, 49, 1) 19 -(81, 50, 1) 19 -(81, 51, 1) 19 -(81, 52, 1) 19 -(81, 53, 1) 19 -(81, 54, 1) 19 -(81, 55, 1) 19 -(81, 56, 1) 19 -(81, 57, 1) 18 -(81, 58, 1) 18 -(81, 59, 1) 18 -(81, 60, 1) 18 -(81, 61, 1) 17 -(81, 62, 1) 17 -(81, 63, 1) 17 -(81, 64, 1) 16 -(81, 65, 1) 16 -(81, 66, 1) 15 -(81, 67, 1) 15 -(81, 68, 1) 15 -(81, 69, 1) 14 -(81, 70, 1) 14 -(81, 71, 1) 13 -(81, 72, 1) 12 -(81, 73, 1) 12 -(81, 74, 1) 11 -(81, 75, 1) 11 -(81, 76, 1) 10 -(81, 77, 1) 9 -(81, 78, 1) 9 -(81, 79, 1) 8 -(81, 80, 1) 7 -(81, 81, 1) 7 -(81, 82, 1) 6 -(81, 83, 1) 5 -(81, 84, 1) 5 -(81, 85, 1) 4 -(81, 86, 1) 3 -(81, 87, 1) 3 -(82, 14, 1) 2 -(82, 15, 1) 3 -(82, 16, 1) 3 -(82, 17, 1) 4 -(82, 18, 1) 5 -(82, 19, 1) 5 -(82, 20, 1) 6 -(82, 21, 1) 7 -(82, 22, 1) 7 -(82, 23, 1) 8 -(82, 24, 1) 9 -(82, 25, 1) 9 -(82, 26, 1) 10 -(82, 27, 1) 10 -(82, 28, 1) 11 -(82, 29, 1) 12 -(82, 30, 1) 12 -(82, 31, 1) 13 -(82, 32, 1) 13 -(82, 33, 1) 14 -(82, 34, 1) 14 -(82, 35, 1) 15 -(82, 36, 1) 15 -(82, 37, 1) 15 -(82, 38, 1) 16 -(82, 39, 1) 16 -(82, 40, 1) 16 -(82, 41, 1) 17 -(82, 42, 1) 17 -(82, 43, 1) 17 -(82, 44, 1) 17 -(82, 45, 1) 18 -(82, 46, 1) 18 -(82, 47, 1) 18 -(82, 48, 1) 18 -(82, 49, 1) 18 -(82, 50, 1) 18 -(82, 51, 1) 18 -(82, 52, 1) 18 -(82, 53, 1) 18 -(82, 54, 1) 18 -(82, 55, 1) 18 -(82, 56, 1) 18 -(82, 57, 1) 17 -(82, 58, 1) 17 -(82, 59, 1) 17 -(82, 60, 1) 17 -(82, 61, 1) 16 -(82, 62, 1) 16 -(82, 63, 1) 16 -(82, 64, 1) 15 -(82, 65, 1) 15 -(82, 66, 1) 15 -(82, 67, 1) 14 -(82, 68, 1) 14 -(82, 69, 1) 13 -(82, 70, 1) 13 -(82, 71, 1) 12 -(82, 72, 1) 12 -(82, 73, 1) 11 -(82, 74, 1) 10 -(82, 75, 1) 10 -(82, 76, 1) 9 -(82, 77, 1) 9 -(82, 78, 1) 8 -(82, 79, 1) 7 -(82, 80, 1) 7 -(82, 81, 1) 6 -(82, 82, 1) 5 -(82, 83, 1) 5 -(82, 84, 1) 4 -(82, 85, 1) 3 -(82, 86, 1) 3 -(82, 87, 1) 2 -(83, 14, 1) 1 -(83, 15, 1) 2 -(83, 16, 1) 3 -(83, 17, 1) 3 -(83, 18, 1) 4 -(83, 19, 1) 5 -(83, 20, 1) 5 -(83, 21, 1) 6 -(83, 22, 1) 7 -(83, 23, 1) 7 -(83, 24, 1) 8 -(83, 25, 1) 8 -(83, 26, 1) 9 -(83, 27, 1) 10 -(83, 28, 1) 10 -(83, 29, 1) 11 -(83, 30, 1) 11 -(83, 31, 1) 12 -(83, 32, 1) 12 -(83, 33, 1) 13 -(83, 34, 1) 13 -(83, 35, 1) 14 -(83, 36, 1) 14 -(83, 37, 1) 14 -(83, 38, 1) 15 -(83, 39, 1) 15 -(83, 40, 1) 15 -(83, 41, 1) 16 -(83, 42, 1) 16 -(83, 43, 1) 16 -(83, 44, 1) 16 -(83, 45, 1) 17 -(83, 46, 1) 17 -(83, 47, 1) 17 -(83, 48, 1) 17 -(83, 49, 1) 17 -(83, 50, 1) 17 -(83, 51, 1) 17 -(83, 52, 1) 17 -(83, 53, 1) 17 -(83, 54, 1) 17 -(83, 55, 1) 17 -(83, 56, 1) 17 -(83, 57, 1) 16 -(83, 58, 1) 16 -(83, 59, 1) 16 -(83, 60, 1) 16 -(83, 61, 1) 15 -(83, 62, 1) 15 -(83, 63, 1) 15 -(83, 64, 1) 14 -(83, 65, 1) 14 -(83, 66, 1) 14 -(83, 67, 1) 13 -(83, 68, 1) 13 -(83, 69, 1) 12 -(83, 70, 1) 12 -(83, 71, 1) 11 -(83, 72, 1) 11 -(83, 73, 1) 10 -(83, 74, 1) 10 -(83, 75, 1) 9 -(83, 76, 1) 8 -(83, 77, 1) 8 -(83, 78, 1) 7 -(83, 79, 1) 7 -(83, 80, 1) 6 -(83, 81, 1) 5 -(83, 82, 1) 5 -(83, 83, 1) 4 -(83, 84, 1) 3 -(83, 85, 1) 3 -(83, 86, 1) 2 -(83, 87, 1) 1 -(84, 14, 1) 1 -(84, 15, 1) 1 -(84, 16, 1) 2 -(84, 17, 1) 3 -(84, 18, 1) 3 -(84, 19, 1) 4 -(84, 20, 1) 5 -(84, 21, 1) 5 -(84, 22, 1) 6 -(84, 23, 1) 6 -(84, 24, 1) 7 -(84, 25, 1) 8 -(84, 26, 1) 8 -(84, 27, 1) 9 -(84, 28, 1) 9 -(84, 29, 1) 10 -(84, 30, 1) 10 -(84, 31, 1) 11 -(84, 32, 1) 11 -(84, 33, 1) 12 -(84, 34, 1) 12 -(84, 35, 1) 13 -(84, 36, 1) 13 -(84, 37, 1) 13 -(84, 38, 1) 14 -(84, 39, 1) 14 -(84, 40, 1) 14 -(84, 41, 1) 15 -(84, 42, 1) 15 -(84, 43, 1) 15 -(84, 44, 1) 15 -(84, 45, 1) 16 -(84, 46, 1) 16 -(84, 47, 1) 16 -(84, 48, 1) 16 -(84, 49, 1) 16 -(84, 50, 1) 16 -(84, 51, 1) 16 -(84, 52, 1) 16 -(84, 53, 1) 16 -(84, 54, 1) 16 -(84, 55, 1) 16 -(84, 56, 1) 16 -(84, 57, 1) 15 -(84, 58, 1) 15 -(84, 59, 1) 15 -(84, 60, 1) 15 -(84, 61, 1) 14 -(84, 62, 1) 14 -(84, 63, 1) 14 -(84, 64, 1) 13 -(84, 65, 1) 13 -(84, 66, 1) 13 -(84, 67, 1) 12 -(84, 68, 1) 12 -(84, 69, 1) 11 -(84, 70, 1) 11 -(84, 71, 1) 10 -(84, 72, 1) 10 -(84, 73, 1) 9 -(84, 74, 1) 9 -(84, 75, 1) 8 -(84, 76, 1) 8 -(84, 77, 1) 7 -(84, 78, 1) 6 -(84, 79, 1) 6 -(84, 80, 1) 5 -(84, 81, 1) 5 -(84, 82, 1) 4 -(84, 83, 1) 3 -(84, 84, 1) 3 -(84, 85, 1) 2 -(84, 86, 1) 1 -(84, 87, 1) 1 -(85, 14, 1) 0 -(85, 15, 1) 1 -(85, 16, 1) 1 -(85, 17, 1) 2 -(85, 18, 1) 2 -(85, 19, 1) 3 -(85, 20, 1) 4 -(85, 21, 1) 4 -(85, 22, 1) 5 -(85, 23, 1) 6 -(85, 24, 1) 6 -(85, 25, 1) 7 -(85, 26, 1) 7 -(85, 27, 1) 8 -(85, 28, 1) 9 -(85, 29, 1) 9 -(85, 30, 1) 10 -(85, 31, 1) 10 -(85, 32, 1) 11 -(85, 33, 1) 11 -(85, 34, 1) 11 -(85, 35, 1) 12 -(85, 36, 1) 12 -(85, 37, 1) 13 -(85, 38, 1) 13 -(85, 39, 1) 13 -(85, 40, 1) 13 -(85, 41, 1) 14 -(85, 42, 1) 14 -(85, 43, 1) 14 -(85, 44, 1) 14 -(85, 45, 1) 15 -(85, 46, 1) 15 -(85, 47, 1) 15 -(85, 48, 1) 15 -(85, 49, 1) 15 -(85, 50, 1) 15 -(85, 51, 1) 15 -(85, 52, 1) 15 -(85, 53, 1) 15 -(85, 54, 1) 15 -(85, 55, 1) 15 -(85, 56, 1) 15 -(85, 57, 1) 14 -(85, 58, 1) 14 -(85, 59, 1) 14 -(85, 60, 1) 14 -(85, 61, 1) 13 -(85, 62, 1) 13 -(85, 63, 1) 13 -(85, 64, 1) 13 -(85, 65, 1) 12 -(85, 66, 1) 12 -(85, 67, 1) 11 -(85, 68, 1) 11 -(85, 69, 1) 11 -(85, 70, 1) 10 -(85, 71, 1) 10 -(85, 72, 1) 9 -(85, 73, 1) 9 -(85, 74, 1) 8 -(85, 75, 1) 7 -(85, 76, 1) 7 -(85, 77, 1) 6 -(85, 78, 1) 6 -(85, 79, 1) 5 -(85, 80, 1) 4 -(85, 81, 1) 4 -(85, 82, 1) 3 -(85, 83, 1) 2 -(85, 84, 1) 2 -(85, 85, 1) 1 -(85, 86, 1) 1 -(85, 87, 1) 0 -(86, 16, 1) 1 -(86, 17, 1) 1 -(86, 18, 1) 2 -(86, 19, 1) 3 -(86, 20, 1) 3 -(86, 21, 1) 4 -(86, 22, 1) 4 -(86, 23, 1) 5 -(86, 24, 1) 6 -(86, 25, 1) 6 -(86, 26, 1) 7 -(86, 27, 1) 7 -(86, 28, 1) 8 -(86, 29, 1) 8 -(86, 30, 1) 9 -(86, 31, 1) 9 -(86, 32, 1) 10 -(86, 33, 1) 10 -(86, 34, 1) 11 -(86, 35, 1) 11 -(86, 36, 1) 11 -(86, 37, 1) 12 -(86, 38, 1) 12 -(86, 39, 1) 12 -(86, 40, 1) 13 -(86, 41, 1) 13 -(86, 42, 1) 13 -(86, 43, 1) 13 -(86, 44, 1) 13 -(86, 45, 1) 14 -(86, 46, 1) 14 -(86, 47, 1) 14 -(86, 48, 1) 14 -(86, 49, 1) 14 -(86, 50, 1) 14 -(86, 51, 1) 14 -(86, 52, 1) 14 -(86, 53, 1) 14 -(86, 54, 1) 14 -(86, 55, 1) 14 -(86, 56, 1) 14 -(86, 57, 1) 13 -(86, 58, 1) 13 -(86, 59, 1) 13 -(86, 60, 1) 13 -(86, 61, 1) 13 -(86, 62, 1) 12 -(86, 63, 1) 12 -(86, 64, 1) 12 -(86, 65, 1) 11 -(86, 66, 1) 11 -(86, 67, 1) 11 -(86, 68, 1) 10 -(86, 69, 1) 10 -(86, 70, 1) 9 -(86, 71, 1) 9 -(86, 72, 1) 8 -(86, 73, 1) 8 -(86, 74, 1) 7 -(86, 75, 1) 7 -(86, 76, 1) 6 -(86, 77, 1) 6 -(86, 78, 1) 5 -(86, 79, 1) 4 -(86, 80, 1) 4 -(86, 81, 1) 3 -(86, 82, 1) 3 -(86, 83, 1) 2 -(86, 84, 1) 1 -(86, 85, 1) 1 -(87, 16, 1) 0 -(87, 17, 1) 1 -(87, 18, 1) 1 -(87, 19, 1) 2 -(87, 20, 1) 2 -(87, 21, 1) 3 -(87, 22, 1) 4 -(87, 23, 1) 4 -(87, 24, 1) 5 -(87, 25, 1) 5 -(87, 26, 1) 6 -(87, 27, 1) 6 -(87, 28, 1) 7 -(87, 29, 1) 7 -(87, 30, 1) 8 -(87, 31, 1) 8 -(87, 32, 1) 9 -(87, 33, 1) 9 -(87, 34, 1) 10 -(87, 35, 1) 10 -(87, 36, 1) 10 -(87, 37, 1) 11 -(87, 38, 1) 11 -(87, 39, 1) 11 -(87, 40, 1) 12 -(87, 41, 1) 12 -(87, 42, 1) 12 -(87, 43, 1) 12 -(87, 44, 1) 12 -(87, 45, 1) 13 -(87, 46, 1) 13 -(87, 47, 1) 13 -(87, 48, 1) 13 -(87, 49, 1) 13 -(87, 50, 1) 13 -(87, 51, 1) 13 -(87, 52, 1) 13 -(87, 53, 1) 13 -(87, 54, 1) 13 -(87, 55, 1) 13 -(87, 56, 1) 13 -(87, 57, 1) 12 -(87, 58, 1) 12 -(87, 59, 1) 12 -(87, 60, 1) 12 -(87, 61, 1) 12 -(87, 62, 1) 11 -(87, 63, 1) 11 -(87, 64, 1) 11 -(87, 65, 1) 10 -(87, 66, 1) 10 -(87, 67, 1) 10 -(87, 68, 1) 9 -(87, 69, 1) 9 -(87, 70, 1) 8 -(87, 71, 1) 8 -(87, 72, 1) 7 -(87, 73, 1) 7 -(87, 74, 1) 6 -(87, 75, 1) 6 -(87, 76, 1) 5 -(87, 77, 1) 5 -(87, 78, 1) 4 -(87, 79, 1) 4 -(87, 80, 1) 3 -(87, 81, 1) 2 -(87, 82, 1) 2 -(87, 83, 1) 1 -(87, 84, 1) 1 -(87, 85, 1) 0 -(88, 21, 1) 2 -(88, 22, 1) 3 -(88, 23, 1) 3 -(88, 24, 1) 4 -(88, 25, 1) 5 -(88, 26, 1) 5 -(88, 27, 1) 6 -(88, 28, 1) 6 -(88, 29, 1) 7 -(88, 30, 1) 7 -(88, 31, 1) 7 -(88, 32, 1) 8 -(88, 33, 1) 8 -(88, 34, 1) 9 -(88, 35, 1) 9 -(88, 36, 1) 9 -(88, 37, 1) 10 -(88, 38, 1) 10 -(88, 39, 1) 10 -(88, 40, 1) 11 -(88, 41, 1) 11 -(88, 42, 1) 11 -(88, 43, 1) 11 -(88, 44, 1) 11 -(88, 45, 1) 12 -(88, 46, 1) 12 -(88, 47, 1) 12 -(88, 48, 1) 12 -(88, 49, 1) 12 -(88, 50, 1) 12 -(88, 51, 1) 12 -(88, 52, 1) 12 -(88, 53, 1) 12 -(88, 54, 1) 12 -(88, 55, 1) 12 -(88, 56, 1) 12 -(88, 57, 1) 11 -(88, 58, 1) 11 -(88, 59, 1) 11 -(88, 60, 1) 11 -(88, 61, 1) 11 -(88, 62, 1) 10 -(88, 63, 1) 10 -(88, 64, 1) 10 -(88, 65, 1) 9 -(88, 66, 1) 9 -(88, 67, 1) 9 -(88, 68, 1) 8 -(88, 69, 1) 8 -(88, 70, 1) 7 -(88, 71, 1) 7 -(88, 72, 1) 7 -(88, 73, 1) 6 -(88, 74, 1) 6 -(88, 75, 1) 5 -(88, 76, 1) 5 -(88, 77, 1) 4 -(88, 78, 1) 3 -(88, 79, 1) 3 -(88, 80, 1) 2 -(89, 21, 1) 1 -(89, 22, 1) 2 -(89, 23, 1) 3 -(89, 24, 1) 3 -(89, 25, 1) 4 -(89, 26, 1) 4 -(89, 27, 1) 5 -(89, 28, 1) 5 -(89, 29, 1) 6 -(89, 30, 1) 6 -(89, 31, 1) 7 -(89, 32, 1) 7 -(89, 33, 1) 7 -(89, 34, 1) 8 -(89, 35, 1) 8 -(89, 36, 1) 8 -(89, 37, 1) 9 -(89, 38, 1) 9 -(89, 39, 1) 9 -(89, 40, 1) 10 -(89, 41, 1) 10 -(89, 42, 1) 10 -(89, 43, 1) 10 -(89, 44, 1) 10 -(89, 45, 1) 11 -(89, 46, 1) 11 -(89, 47, 1) 11 -(89, 48, 1) 11 -(89, 49, 1) 11 -(89, 50, 1) 11 -(89, 51, 1) 11 -(89, 52, 1) 11 -(89, 53, 1) 11 -(89, 54, 1) 11 -(89, 55, 1) 11 -(89, 56, 1) 11 -(89, 57, 1) 10 -(89, 58, 1) 10 -(89, 59, 1) 10 -(89, 60, 1) 10 -(89, 61, 1) 10 -(89, 62, 1) 9 -(89, 63, 1) 9 -(89, 64, 1) 9 -(89, 65, 1) 8 -(89, 66, 1) 8 -(89, 67, 1) 8 -(89, 68, 1) 7 -(89, 69, 1) 7 -(89, 70, 1) 7 -(89, 71, 1) 6 -(89, 72, 1) 6 -(89, 73, 1) 5 -(89, 74, 1) 5 -(89, 75, 1) 4 -(89, 76, 1) 4 -(89, 77, 1) 3 -(89, 78, 1) 3 -(89, 79, 1) 2 -(89, 80, 1) 1 -(90, 21, 1) 1 -(90, 22, 1) 1 -(90, 23, 1) 2 -(90, 24, 1) 2 -(90, 25, 1) 3 -(90, 26, 1) 3 -(90, 27, 1) 4 -(90, 28, 1) 4 -(90, 29, 1) 5 -(90, 30, 1) 5 -(90, 31, 1) 6 -(90, 32, 1) 6 -(90, 33, 1) 6 -(90, 34, 1) 7 -(90, 35, 1) 7 -(90, 36, 1) 8 -(90, 37, 1) 8 -(90, 38, 1) 8 -(90, 39, 1) 8 -(90, 40, 1) 9 -(90, 41, 1) 9 -(90, 42, 1) 9 -(90, 43, 1) 9 -(90, 44, 1) 9 -(90, 45, 1) 10 -(90, 46, 1) 10 -(90, 47, 1) 10 -(90, 48, 1) 10 -(90, 49, 1) 10 -(90, 50, 1) 10 -(90, 51, 1) 10 -(90, 52, 1) 10 -(90, 53, 1) 10 -(90, 54, 1) 10 -(90, 55, 1) 10 -(90, 56, 1) 10 -(90, 57, 1) 9 -(90, 58, 1) 9 -(90, 59, 1) 9 -(90, 60, 1) 9 -(90, 61, 1) 9 -(90, 62, 1) 8 -(90, 63, 1) 8 -(90, 64, 1) 8 -(90, 65, 1) 8 -(90, 66, 1) 7 -(90, 67, 1) 7 -(90, 68, 1) 6 -(90, 69, 1) 6 -(90, 70, 1) 6 -(90, 71, 1) 5 -(90, 72, 1) 5 -(90, 73, 1) 4 -(90, 74, 1) 4 -(90, 75, 1) 3 -(90, 76, 1) 3 -(90, 77, 1) 2 -(90, 78, 1) 2 -(90, 79, 1) 1 -(90, 80, 1) 1 -(91, 21, 1) 0 -(91, 22, 1) 1 -(91, 23, 1) 1 -(91, 24, 1) 2 -(91, 25, 1) 2 -(91, 26, 1) 3 -(91, 27, 1) 3 -(91, 28, 1) 4 -(91, 29, 1) 4 -(91, 30, 1) 4 -(91, 31, 1) 5 -(91, 32, 1) 5 -(91, 33, 1) 6 -(91, 34, 1) 6 -(91, 35, 1) 6 -(91, 36, 1) 7 -(91, 37, 1) 7 -(91, 38, 1) 7 -(91, 39, 1) 8 -(91, 40, 1) 8 -(91, 41, 1) 8 -(91, 42, 1) 8 -(91, 43, 1) 8 -(91, 44, 1) 9 -(91, 45, 1) 9 -(91, 46, 1) 9 -(91, 47, 1) 9 -(91, 48, 1) 9 -(91, 49, 1) 9 -(91, 50, 1) 9 -(91, 51, 1) 9 -(91, 52, 1) 9 -(91, 53, 1) 9 -(91, 54, 1) 9 -(91, 55, 1) 9 -(91, 56, 1) 9 -(91, 57, 1) 9 -(91, 58, 1) 8 -(91, 59, 1) 8 -(91, 60, 1) 8 -(91, 61, 1) 8 -(91, 62, 1) 8 -(91, 63, 1) 7 -(91, 64, 1) 7 -(91, 65, 1) 7 -(91, 66, 1) 6 -(91, 67, 1) 6 -(91, 68, 1) 6 -(91, 69, 1) 5 -(91, 70, 1) 5 -(91, 71, 1) 4 -(91, 72, 1) 4 -(91, 73, 1) 4 -(91, 74, 1) 3 -(91, 75, 1) 3 -(91, 76, 1) 2 -(91, 77, 1) 2 -(91, 78, 1) 1 -(91, 79, 1) 1 -(91, 80, 1) 0 -(92, 21, 1) 0 -(92, 22, 1) 0 -(92, 23, 1) 0 -(92, 24, 1) 1 -(92, 25, 1) 1 -(92, 26, 1) 2 -(92, 27, 1) 2 -(92, 28, 1) 3 -(92, 29, 1) 3 -(92, 30, 1) 4 -(92, 31, 1) 4 -(92, 32, 1) 4 -(92, 33, 1) 5 -(92, 34, 1) 5 -(92, 35, 1) 5 -(92, 36, 1) 6 -(92, 37, 1) 6 -(92, 38, 1) 6 -(92, 39, 1) 7 -(92, 40, 1) 7 -(92, 41, 1) 7 -(92, 42, 1) 7 -(92, 43, 1) 7 -(92, 44, 1) 8 -(92, 45, 1) 8 -(92, 46, 1) 8 -(92, 47, 1) 8 -(92, 48, 1) 8 -(92, 49, 1) 8 -(92, 50, 1) 8 -(92, 51, 1) 8 -(92, 52, 1) 8 -(92, 53, 1) 8 -(92, 54, 1) 8 -(92, 55, 1) 8 -(92, 56, 1) 8 -(92, 57, 1) 8 -(92, 58, 1) 7 -(92, 59, 1) 7 -(92, 60, 1) 7 -(92, 61, 1) 7 -(92, 62, 1) 7 -(92, 63, 1) 6 -(92, 64, 1) 6 -(92, 65, 1) 6 -(92, 66, 1) 5 -(92, 67, 1) 5 -(92, 68, 1) 5 -(92, 69, 1) 4 -(92, 70, 1) 4 -(92, 71, 1) 4 -(92, 72, 1) 3 -(92, 73, 1) 3 -(92, 74, 1) 2 -(92, 75, 1) 2 -(92, 76, 1) 1 -(92, 77, 1) 1 -(92, 78, 1) 0 -(92, 79, 1) 0 -(92, 80, 1) 0 -(93, 26, 1) 1 -(93, 27, 1) 1 -(93, 28, 1) 2 -(93, 29, 1) 2 -(93, 30, 1) 3 -(93, 31, 1) 3 -(93, 32, 1) 3 -(93, 33, 1) 4 -(93, 34, 1) 4 -(93, 35, 1) 4 -(93, 36, 1) 5 -(93, 37, 1) 5 -(93, 38, 1) 5 -(93, 39, 1) 6 -(93, 40, 1) 6 -(93, 41, 1) 6 -(93, 42, 1) 6 -(93, 43, 1) 6 -(93, 44, 1) 7 -(93, 45, 1) 7 -(93, 46, 1) 7 -(93, 47, 1) 7 -(93, 48, 1) 7 -(93, 49, 1) 7 -(93, 50, 1) 7 -(93, 51, 1) 7 -(93, 52, 1) 7 -(93, 53, 1) 7 -(93, 54, 1) 7 -(93, 55, 1) 7 -(93, 56, 1) 7 -(93, 57, 1) 7 -(93, 58, 1) 6 -(93, 59, 1) 6 -(93, 60, 1) 6 -(93, 61, 1) 6 -(93, 62, 1) 6 -(93, 63, 1) 5 -(93, 64, 1) 5 -(93, 65, 1) 5 -(93, 66, 1) 4 -(93, 67, 1) 4 -(93, 68, 1) 4 -(93, 69, 1) 3 -(93, 70, 1) 3 -(93, 71, 1) 3 -(93, 72, 1) 2 -(93, 73, 1) 2 -(93, 74, 1) 1 -(93, 75, 1) 1 -(94, 26, 1) 0 -(94, 27, 1) 0 -(94, 28, 1) 1 -(94, 29, 1) 1 -(94, 30, 1) 2 -(94, 31, 1) 2 -(94, 32, 1) 2 -(94, 33, 1) 3 -(94, 34, 1) 3 -(94, 35, 1) 3 -(94, 36, 1) 4 -(94, 37, 1) 4 -(94, 38, 1) 4 -(94, 39, 1) 5 -(94, 40, 1) 5 -(94, 41, 1) 5 -(94, 42, 1) 5 -(94, 43, 1) 5 -(94, 44, 1) 6 -(94, 45, 1) 6 -(94, 46, 1) 6 -(94, 47, 1) 6 -(94, 48, 1) 6 -(94, 49, 1) 6 -(94, 50, 1) 6 -(94, 51, 1) 6 -(94, 52, 1) 6 -(94, 53, 1) 6 -(94, 54, 1) 6 -(94, 55, 1) 6 -(94, 56, 1) 6 -(94, 57, 1) 6 -(94, 58, 1) 5 -(94, 59, 1) 5 -(94, 60, 1) 5 -(94, 61, 1) 5 -(94, 62, 1) 5 -(94, 63, 1) 4 -(94, 64, 1) 4 -(94, 65, 1) 4 -(94, 66, 1) 3 -(94, 67, 1) 3 -(94, 68, 1) 3 -(94, 69, 1) 2 -(94, 70, 1) 2 -(94, 71, 1) 2 -(94, 72, 1) 1 -(94, 73, 1) 1 -(94, 74, 1) 0 -(94, 75, 1) 0 -(95, 26, 1) 0 -(95, 27, 1) 0 -(95, 28, 1) 0 -(95, 29, 1) 0 -(95, 30, 1) 1 -(95, 31, 1) 1 -(95, 32, 1) 1 -(95, 33, 1) 2 -(95, 34, 1) 2 -(95, 35, 1) 3 -(95, 36, 1) 3 -(95, 37, 1) 3 -(95, 38, 1) 3 -(95, 39, 1) 4 -(95, 40, 1) 4 -(95, 41, 1) 4 -(95, 42, 1) 4 -(95, 43, 1) 4 -(95, 44, 1) 5 -(95, 45, 1) 5 -(95, 46, 1) 5 -(95, 47, 1) 5 -(95, 48, 1) 5 -(95, 49, 1) 5 -(95, 50, 1) 5 -(95, 51, 1) 5 -(95, 52, 1) 5 -(95, 53, 1) 5 -(95, 54, 1) 5 -(95, 55, 1) 5 -(95, 56, 1) 5 -(95, 57, 1) 5 -(95, 58, 1) 4 -(95, 59, 1) 4 -(95, 60, 1) 4 -(95, 61, 1) 4 -(95, 62, 1) 4 -(95, 63, 1) 3 -(95, 64, 1) 3 -(95, 65, 1) 3 -(95, 66, 1) 3 -(95, 67, 1) 2 -(95, 68, 1) 2 -(95, 69, 1) 1 -(95, 70, 1) 1 -(95, 71, 1) 1 -(95, 72, 1) 0 -(95, 73, 1) 0 -(95, 74, 1) 0 -(95, 75, 1) 0 -(96, 36, 1) 2 -(96, 37, 1) 2 -(96, 38, 1) 2 -(96, 39, 1) 3 -(96, 40, 1) 3 -(96, 41, 1) 3 -(96, 42, 1) 3 -(96, 43, 1) 3 -(96, 44, 1) 4 -(96, 45, 1) 4 -(96, 46, 1) 4 -(96, 47, 1) 4 -(96, 48, 1) 4 -(96, 49, 1) 4 -(96, 50, 1) 4 -(96, 51, 1) 4 -(96, 52, 1) 4 -(96, 53, 1) 4 -(96, 54, 1) 4 -(96, 55, 1) 4 -(96, 56, 1) 4 -(96, 57, 1) 4 -(96, 58, 1) 3 -(96, 59, 1) 3 -(96, 60, 1) 3 -(96, 61, 1) 3 -(96, 62, 1) 3 -(96, 63, 1) 2 -(96, 64, 1) 2 -(96, 65, 1) 2 -(97, 36, 1) 1 -(97, 37, 1) 1 -(97, 38, 1) 2 -(97, 39, 1) 2 -(97, 40, 1) 2 -(97, 41, 1) 2 -(97, 42, 1) 2 -(97, 43, 1) 2 -(97, 44, 1) 3 -(97, 45, 1) 3 -(97, 46, 1) 3 -(97, 47, 1) 3 -(97, 48, 1) 3 -(97, 49, 1) 3 -(97, 50, 1) 3 -(97, 51, 1) 3 -(97, 52, 1) 3 -(97, 53, 1) 3 -(97, 54, 1) 3 -(97, 55, 1) 3 -(97, 56, 1) 3 -(97, 57, 1) 3 -(97, 58, 1) 2 -(97, 59, 1) 2 -(97, 60, 1) 2 -(97, 61, 1) 2 -(97, 62, 1) 2 -(97, 63, 1) 2 -(97, 64, 1) 1 -(97, 65, 1) 1 -(98, 41, 1) 1 -(98, 42, 1) 1 -(98, 43, 1) 1 -(98, 44, 1) 2 -(98, 45, 1) 2 -(98, 46, 1) 2 -(98, 47, 1) 2 -(98, 48, 1) 2 -(98, 49, 1) 2 -(98, 50, 1) 2 -(98, 51, 1) 2 -(98, 52, 1) 2 -(98, 53, 1) 2 -(98, 54, 1) 2 -(98, 55, 1) 2 -(98, 56, 1) 2 -(98, 57, 1) 2 -(98, 58, 1) 1 -(98, 59, 1) 1 -(98, 60, 1) 1 -(99, 41, 1) 0 -(99, 42, 1) 0 -(99, 43, 1) 0 -(99, 44, 1) 1 -(99, 45, 1) 1 -(99, 46, 1) 1 -(99, 47, 1) 1 -(99, 48, 1) 1 -(99, 49, 1) 1 -(99, 50, 1) 1 -(99, 51, 1) 1 -(99, 52, 1) 1 -(99, 53, 1) 1 -(99, 54, 1) 1 -(99, 55, 1) 1 -(99, 56, 1) 1 -(99, 57, 1) 1 -(99, 58, 1) 0 -(99, 59, 1) 0 -(99, 60, 1) 0 -(100, 41, 1) 0 -(100, 42, 1) 0 -(100, 43, 1) 0 -(100, 44, 1) 0 -(100, 45, 1) 0 -(100, 46, 1) 0 -(100, 47, 1) 0 -(100, 48, 1) 0 -(100, 49, 1) 0 -(100, 50, 1) 0 -(100, 51, 1) 0 -(100, 52, 1) 0 -(100, 53, 1) 0 -(100, 54, 1) 0 -(100, 55, 1) 0 -(100, 56, 1) 0 -(100, 57, 1) 0 -(100, 58, 1) 0 -(100, 59, 1) 0 -(100, 60, 1) 0 \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc b/EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc deleted file mode 100644 index 34dea0da4f1..00000000000 --- a/EOverPCalibration/FastCalibrator/src/CalibrationUtils.cc +++ /dev/null @@ -1,1069 +0,0 @@ -#include "../interface/CalibrationUtils.h" - - - - - - -/////////////////////////////////////////////////////////////// -// check if a xtal confines with a bad xtal or lies in a bad TT -/////////////////////////////////////////////////////////////// - -bool CheckxtalIC_EB(TH2F* h_scale_EB, int iPhi, int iEta) -{ - if( h_scale_EB->GetBinContent(iPhi,iEta) == 0 ) return false; - if( h_scale_EB->GetBinContent(iPhi,iEta) > 5 ) return false; - - int bx = h_scale_EB->GetNbinsX(); - int by = h_scale_EB->GetNbinsY(); - - if( (iPhiGetBinContent(iPhi+1,iEta)==0) || - (iPhi>1 && h_scale_EB->GetBinContent(iPhi-1,iEta)==0) ) return false; - - if( (iEta!=85 && iEtaGetBinContent(iPhi,iEta+1)==0) || - (iEta!=87 && iEta>1 && h_scale_EB->GetBinContent(iPhi,iEta-1)==0) ) return false; - - if( (iEta!=85 && iEtaGetBinContent(iPhi+1,iEta+1)==0) || - (iEta!=87 && iEta>1 && iPhi>1 && h_scale_EB->GetBinContent(iPhi-1,iEta-1)==0) ) return false; - - if( (iEta!=87 && iEta>1 && iPhiGetBinContent(iPhi+1,iEta-1)==0) || - (iEta!=85 && iEta1 && h_scale_EB->GetBinContent(iPhi-1,iEta+1)==0) ) return false; - - return true; -} - -bool CheckxtalTT_EB(int iPhi, int iEta, const std::vector >& TT_centre) -{ - for(unsigned int k = 0; k < TT_centre.size(); ++k) - if( (fabs(iPhi-TT_centre.at(k).second) < 5) && (fabs(iEta-86-TT_centre.at(k).first) < 5) ) return false; - - return true; -} - - - -bool CheckxtalIC_EE(TH2F* h_scale_EE,int ix, int iy, int ir) -{ - if( h_scale_EE->GetBinContent(ix,iy)==0 ) return false; - if( h_scale_EE->GetBinContent(ix,iy) > 5 ) return false; - - int bx= h_scale_EE->GetNbinsX(); - int by= h_scale_EE->GetNbinsY(); - - if( ( h_scale_EE->GetBinContent(ix+1,iy)==0 && (ir!=0 || ir<33) && ixGetBinContent(ix-1,iy)==0 && (ir!=0 || ir<33) && ix>1 ) ) return false; - - if( ( h_scale_EE->GetBinContent(ix,iy+1)==0 && (ir!=0 || ir<33) && iyGetBinContent(ix,iy-1)==0 && (ir!=0 || ir<33) && iy>1) ) return false; - - if( ( h_scale_EE->GetBinContent(ix+1,iy+1)==0 && (ir!=0 || ir<33) && ixGetBinContent(ix-1,iy-1)==0 && (ir!=0 || ir<33) && iy>1 && ix>1 ) ) return false; - - if( ( h_scale_EE->GetBinContent(ix+1,iy-1)==0 && (ir!=0 || ir<33) && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && (ir!=0 || ir<33) && ix>1 && iy >& TT_centre) -{ - for( unsigned int k =0; k > & TT_centre, bool skip) -{ - // mean over phi corrected skipping dead channel - for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) - { - float sumIC = 0.; - int numIC = 0; - - for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) - { - bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); - - if( isGood && isGoodTT ) - { - sumIC += h_scale_EB -> GetBinContent(iPhi,iEta); - ++numIC; - } - } - - // normalize IC skipping bad channels and bad TTs - for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX(); ++iPhi) - { - if( numIC == 0 || sumIC == 0 ) continue; - - if( !skip ) - { - hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC/numIC)); - continue; - } - else - { - bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); - if( !isGood || !isGoodTT ) continue; - hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC/numIC)); - } - } - } -} - -///////////////////////////////////////////////////////////////////////// - -void NormalizeIC_LMR_EB(TH2F* h_scale_EB, TH2F* hcmap_EB, const std::vector< std::pair > & TT_centre, bool skip) -{ - TFile* inFile = TFile::Open("./src/drawRegions.root", "READ"); - TH2F* h2_EB_LMR = (TH2F*)(inFile -> Get("h2_EB_LMR")); - - float sumIC[325]; - float numIC[325]; - for(int ii = 0; ii < 325; ii++) - { - sumIC[ii] = 0; - numIC[ii] = 0; - } - - // mean over LMR corrected skipping dead channel - for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) - { - for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) - { - - bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); - int regionId = h2_EB_LMR -> GetBinContent(iEta,iPhi); - if( isGood && isGoodTT ) - { - sumIC[regionId] = sumIC[regionId] + h_scale_EB -> GetBinContent(iPhi,iEta); - numIC[regionId] = numIC[regionId] + 1; - } - } - } - - // normalize IC skipping bad channels and bad TTs - for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) - { - for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) - { - int regionId = h2_EB_LMR -> GetBinContent(iPhi,iEta); - if( numIC[regionId] == 0 || sumIC[regionId] == 0 ) continue; - - if( !skip ) - { - hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); - continue; - } - else - { - bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); - if( !isGood || !isGoodTT ) continue; - hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); - } - } - } -} - -///////////////////////////////////////////////////////////////////////// - -void NormalizeIC_SM_EB(TH2F* h_scale_EB, TH2F* hcmap_EB, const std::vector< std::pair > & TT_centre, bool skip) -{ - TFile* inFile = TFile::Open("./src/drawRegions.root", "READ"); - TH2F* h2_EB_LMR = (TH2F*)(inFile -> Get("h2_EB_SM")); - - float sumIC[36]; - float numIC[36]; - for(int ii = 0; ii < 36; ii++) - { - sumIC[ii] = 0; - numIC[ii] = 0; - } - - // mean over LMR corrected skipping dead channel - for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) - { - for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) - { - - bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); - int regionId = h2_EB_LMR -> GetBinContent(iEta,iPhi); - if( isGood && isGoodTT ) - { - sumIC[regionId] = sumIC[regionId] + h_scale_EB -> GetBinContent(iPhi,iEta); - numIC[regionId] = numIC[regionId] + 1; - } - } - } - - // normalize IC skipping bad channels and bad TTs - for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) - { - for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) - { - int regionId = h2_EB_LMR -> GetBinContent(iPhi,iEta); - if( numIC[regionId] == 0 || sumIC[regionId] == 0 ) continue; - - if( !skip ) - { - hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); - continue; - } - else - { - bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); - bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); - if( !isGood || !isGoodTT ) continue; - hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); - } - } - } -} - - -///////////////////////////////////////////////////////////////////////// -void NormalizeIC_EE(TH2F* h_scale_EEM, TH2F* h_scale_EEP, - TH2F* hcmap_EEM, TH2F* hcmap_EEP, - const std::vector< std::pair >& TT_centre_EEM, - const std::vector< std::pair >& TT_centre_EEP, - TEndcapRings* eRings, bool skip) -{ - std::map h_scale_EE; - std::map hcmap_EE; - - h_scale_EE[0] = h_scale_EEM; - h_scale_EE[1] = h_scale_EEP; - - hcmap_EE[0] = hcmap_EEM; - hcmap_EE[1] = hcmap_EEP; - - - - std::map > sumIC; - std::map > numIC; - - (sumIC[0]).assign(40,0.); - (sumIC[1]).assign(40,0.); - - (numIC[0]).assign(40,0); - (numIC[1]).assign(40,0); - - - - // mean over phi corrected skipping dead channel - for(int k = 0; k < 2; ++k) - for(int ix = 1; ix <= h_scale_EE[k] -> GetNbinsX(); ++ix) - for(int iy = 1; iy <= h_scale_EE[k] -> GetNbinsY(); ++iy) - { - int ring = eRings->GetEndcapRing(ix,iy,k); - if( ring == -1 ) continue; - - bool isGood = CheckxtalIC_EE(h_scale_EE[k],ix,iy,ring); - bool isGoodTT; - if( k == 0 ) isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEM); - else isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEP); - - if( isGoodTT && isGood ) - { - (sumIC[k]).at(ring) += h_scale_EE[k]->GetBinContent(ix,iy); - (numIC[k]).at(ring) += 1; - } - } - - // normalize IC skipping bad channels and bad TTs - for(int k = 0; k < 2; ++k) - for(int ix = 1; ix <= h_scale_EE[k]->GetNbinsX(); ++ix) - for(int iy = 1; iy <= h_scale_EE[k]->GetNbinsY(); ++iy) - { - int ring = eRings->GetEndcapRing(ix,iy,k); - if( ring == -1 ) continue; - - if( !skip ) - { - if( ring > 33 ) - { - hcmap_EE[k] -> Fill(ix,iy,0.); - continue; - } - else - { - if( (numIC[k]).at(ring) != 0 && (sumIC[k]).at(ring) != 0 ) - hcmap_EE[k] -> Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/((sumIC[k]).at(ring)/(numIC[k]).at(ring))); - } - } - - if( skip ) - { - bool isGood = CheckxtalIC_EE(h_scale_EE[k],ix,iy,ring); - bool isGoodTT; - - if( k == 0 ) isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEM); - else isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEP); - - if( isGood && isGoodTT ) - { - if( ring > 33 ) - { - hcmap_EE[k] -> Fill(ix,iy,0.); - continue; - } - else - { - if( (numIC[k]).at(ring) != 0 && (sumIC[k]).at(ring) != 0 ) - hcmap_EE[k] -> Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/((sumIC[k]).at(ring)/(numIC[k]).at(ring))); - } - } - } - } - -} - - - - - - - -//------------------------------------------------------------------------------------------------------------- - - - - - - -/////////////////////////////////////////////////////////////////////// -void BookSpreadHistos_EB(TH1F* h_spread, std::vector& h_spread_vsEta, TGraphErrors* g_spread_vsEta, const int& etaRingWidth, - const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, - TH2F* hcmap, TH2F* hcmap2) -{ - char histoName[100]; - char funcName[100]; - - std::ofstream RMSFile; - if (hcmap2 == NULL) { - RMSFile.open ("RMSFile.txt"); - } - - // define the number of eta rings - int nEtaRings = 85/etaRingWidth; - if( 85%etaRingWidth > 0 ) nEtaRings += 1; - - // initialize the histograms - for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) - { - int etaMin = 1 + etaRing * etaRingWidth; - - sprintf(histoName,"h_%s%02d",name.c_str(),etaMin); - h_spread_vsEta.push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); - } - - - // spread histos folding EB+ and EB- - for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) - { - float etaRingMin = hcmap->GetYaxis()->GetBinLowEdge(jbin); - int etaRing = int( (fabs(etaRingMin) - 1.)/etaRingWidth ); - if( etaRing == -1 ) continue; - - - for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) - { - if( hcmap2 == NULL ) - { - float IC = hcmap->GetBinContent(ibin,jbin); - if( IC > 0. && IC < 2. ) - { - h_spread -> Fill(IC); - h_spread_vsEta.at(etaRing) -> Fill(IC); - } - } - else - { - float IC1 = hcmap -> GetBinContent(ibin,jbin); - float IC2 = hcmap2 -> GetBinContent(ibin,jbin); - if( IC1 > 0. && IC1 < 2. && IC2 > 0. && IC2 < 2. ) - { - h_spread -> Fill((IC1-IC2)/(IC1+IC2)); - h_spread_vsEta.at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); - // std::cout<<"eta: "< SetNpx(10000); - if( hcmap2 == NULL ) fgaus -> SetLineColor(kBlue+2); - else fgaus -> SetLineColor(kRed+2); - - float center = 0.5*(spreadMin+spreadMax); - fgaus -> SetParameter(1,h_spread->GetMean()); - fgaus -> SetParameter(2,h_spread->GetRMS()); - h_spread -> Fit(funcName,"QLS+","",center-h_spread->GetRMS(),center+h_spread->GetRMS()); - - - // fill the TGraph - g_spread_vsEta -> SetMarkerStyle(20); - g_spread_vsEta -> SetMarkerSize(1); - g_spread_vsEta -> GetYaxis() -> SetRangeUser(0.,0.05); - if( hcmap2 == NULL ) g_spread_vsEta -> SetMarkerColor(kBlue+2); - else g_spread_vsEta -> SetMarkerColor(kRed+2); - - for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) - { - int etaMin = 1 + etaRing * etaRingWidth; - - sprintf(funcName,"f_%s%02d",name.c_str(),etaMin); - fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); - - fgaus -> SetNpx(10000); - if( hcmap2 == NULL ) fgaus -> SetLineColor(kBlue+2); - else fgaus -> SetLineColor(kRed+2); - - fgaus -> SetParameter(1,h_spread_vsEta[etaRing]->GetMean()); - fgaus -> SetParameter(2,h_spread_vsEta[etaRing]->GetRMS()); - h_spread_vsEta[etaRing] -> Fit(funcName,"QLS+","",center-3.*h_spread_vsEta[etaRing]->GetRMS(),center+3.*h_spread_vsEta[etaRing]->GetRMS()); - - g_spread_vsEta -> SetPoint(etaRing,etaMin,fgaus->GetParameter(2)); - g_spread_vsEta -> SetPointError(etaRing,0.5*etaRingWidth,fgaus->GetParError(2)); - - // std::cout<GetParameter(2)<GetParameter(2)<<"\n"; - } -} - - - - - - -/////////////////////////////////////////////////////////////////////////////// -void PhiProfile(TH1F* h_phiAvgICSpread, TGraphErrors* g_avgIC_vsPhi, const int& phiRegionWidth, - TH2F* hcmap, TEndcapRings* eRings) -{ - // define the number of phi regions - int nPhiRegions = 360/phiRegionWidth; - if( 360%phiRegionWidth > 0 ) nPhiRegions += 1; - - std::vector h_IC_vsPhi(nPhiRegions); - for(int i = 0; i < nPhiRegions; ++i) - { - char histoName[50]; - sprintf(histoName,"h_IC_vsPhi%03d",i); - h_IC_vsPhi.at(i) = new TH1F(histoName,"",1000,0.,2.); - } - - - for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) - for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) - { - float IC = hcmap->GetBinContent(ibin,jbin); - if( IC <= 0. || IC >= 2. ) continue; - - float phiRegionMin = hcmap->GetXaxis()->GetBinLowEdge(ibin); - if( eRings != NULL ) phiRegionMin = eRings -> GetEndcapIphi(ibin,jbin,1); - - int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ); - - h_IC_vsPhi.at(phiRegion) -> Fill(IC); - } - - - for(int i = 0; i < nPhiRegions; ++i) - { - int phiMin = 1 + i * phiRegionWidth; - - h_phiAvgICSpread -> Fill(h_IC_vsPhi.at(i)->GetMean()); - - g_avgIC_vsPhi -> SetPoint(i,phiMin,h_IC_vsPhi.at(i)->GetMean()); - g_avgIC_vsPhi -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhi.at(i)->GetMeanError()); - } - - - TF1* fgaus = new TF1("f_phiAvgICSpread","gaus",0.,2.); - fgaus -> SetNpx(10000); - fgaus -> SetLineColor(kBlack); - - fgaus -> SetParameter(1,h_phiAvgICSpread->GetMean()); - fgaus -> SetParameter(2,h_phiAvgICSpread->GetRMS()); - h_phiAvgICSpread -> Fit("f_phiAvgICSpread","QLS+","",1.-3.*h_phiAvgICSpread->GetRMS(),1.+3.*h_phiAvgICSpread->GetRMS()); - - - - for(int i = 0; i < nPhiRegions; ++i) - { - delete h_IC_vsPhi.at(i); - } -} - - - -void PhiFoldProfile_EB(TGraphErrors* g_avgIC_vsPhiFold_EBM, TGraphErrors* g_avgIC_vsPhiFold_EBP, const int& phiRegionWidth, - TH2F* hcmap) -{ - // define the number of phi regions - int nPhiRegions = 20/phiRegionWidth; - if( 20%phiRegionWidth > 0 ) nPhiRegions += 1; - - std::vector h_IC_vsPhiFold_EBM(nPhiRegions); - std::vector h_IC_vsPhiFold_EBP(nPhiRegions); - for(int i = 0; i < nPhiRegions; ++i) - { - char histoName[50]; - sprintf(histoName,"h_IC_vsPhiFold_EBM_%03d",i); - h_IC_vsPhiFold_EBM.at(i) = new TH1F(histoName,"",1000,0.,2.); - sprintf(histoName,"h_IC_vsPhiFold_EBP_%03d",i); - h_IC_vsPhiFold_EBP.at(i) = new TH1F(histoName,"",1000,0.,2.); - } - - - for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) - for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) - { - float IC = hcmap->GetBinContent(ibin,jbin); - if( IC <= 0. || IC >= 2. ) continue; - - float phiRegionMin = hcmap->GetXaxis()->GetBinLowEdge(ibin); - int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ) % 20; - - float etaBinCenter = hcmap->GetYaxis()->GetBinCenter(jbin); - - if( etaBinCenter < 0. ) h_IC_vsPhiFold_EBM.at(phiRegion) -> Fill(IC); - if( etaBinCenter > 0. ) h_IC_vsPhiFold_EBP.at(phiRegion) -> Fill(IC); - } - - - for(int i = 0; i < nPhiRegions; ++i) - { - int phiMin = 1 + i * phiRegionWidth; - - g_avgIC_vsPhiFold_EBM -> SetPoint(i,phiMin,h_IC_vsPhiFold_EBM.at(i)->GetMean()); - g_avgIC_vsPhiFold_EBM -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhiFold_EBM.at(i)->GetMeanError()); - - g_avgIC_vsPhiFold_EBP -> SetPoint(i,phiMin,h_IC_vsPhiFold_EBP.at(i)->GetMean()); - g_avgIC_vsPhiFold_EBP -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhiFold_EBP.at(i)->GetMeanError()); - } -} - -//////////////////////////////////////////////////////////////////////////// -void ResidualSpread(TGraphErrors* g_stat, TGraphErrors* g_spread, TGraphErrors* g_residual) -{ - g_residual -> SetMarkerStyle(20); - g_residual -> SetMarkerSize(1); - g_residual -> SetMarkerColor(kGreen+2); - - - for(int i = 0; i < g_stat->GetN(); ++i) - { - double spread, espread; - double stat, estat; - double residual, eresidual; - double x,ex; - - ex = g_stat-> GetErrorX(i); - - g_stat -> GetPoint(i,x,stat); - estat = g_stat-> GetErrorY(i); - - g_spread -> GetPoint(i,x,spread); - espread = g_spread -> GetErrorY(i); - - if( spread > stat ) - { - residual = sqrt( pow(spread,2) - pow(stat,2) ); - eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2) ) / residual; - } - else - { - residual = 0; - eresidual = 0; - } - - g_residual -> SetPoint(i,x,residual); - g_residual -> SetPointError(i,ex,eresidual); - } -} - -////////////////////////////////////////////////////////////// - - - - -///////////////////////////////////////////////////////////////////////////// -void BookSpreadHistos_EE(std::map& h_spread, std::map >& h_spread_vsEta, std::map& g_spread_vsEta, - TEndcapRings* eRings, const int& etaRingWidth, - const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, - std::map& hcmap, std::map& hcmap2) -{ - char histoName[100]; - char funcName[100]; - - - // define the number of eta rings - int nEtaRings = 39/etaRingWidth; - if( 39%etaRingWidth > 0 ) nEtaRings += 1; - - - // initialize the histograms (EE-, all EE, EE+) - for(int k = -1; k <= 1; ++k) - for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) - { - int etaMin = 0 + etaRing * etaRingWidth; - - if( k == -1 ) - { - sprintf(histoName,"h_%s%02d_EEM",name.c_str(),etaMin); - h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); - } - if( k == 0 ) - { - sprintf(histoName,"h_%s%02d_EE",name.c_str(),etaMin); - h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); - } - if( k == 1 ) - { - sprintf(histoName,"h_%s%02d_EEP",name.c_str(),etaMin); - h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); - } - } - - - // spread histos - for(int k = -1; k <= 1; ++k) - { - if( k == 0 ) continue; - - for(int ibin = 1; ibin <= hcmap[k]->GetNbinsX(); ++ibin) - for(int jbin = 1; jbin <= hcmap[k]->GetNbinsY(); ++jbin) - { - int etaRing = eRings -> GetEndcapRing(ibin,jbin,k); - if( etaRing == -1 ) continue; - - if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) - { - float IC = hcmap[k]->GetBinContent(ibin,jbin); - if( IC > 0. && IC < 2. ) - { - h_spread[k] -> Fill(IC); - h_spread_vsEta[k].at(etaRing) -> Fill(IC); - - h_spread[0] -> Fill(IC); - h_spread_vsEta[0].at(etaRing) -> Fill(IC); - } - } - - else - { - float IC1 = hcmap[k] -> GetBinContent(ibin,jbin); - float IC2 = hcmap2[k] -> GetBinContent(ibin,jbin); - if( IC1 > 0. && IC1 < 2. && IC2 > 0. && IC2 < 2. ) - { - h_spread[k] -> Fill((IC1-IC2)/(IC1+IC2)); - h_spread_vsEta[k].at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); - - h_spread[0] -> Fill((IC1-IC2)/(IC1+IC2)); - h_spread_vsEta[0].at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); - } - } - } - } - - - - // fit the global spread - for(int k = -1; k <= 1; ++k) - { - if( k == -1 ) sprintf(funcName,"f_%s_EEM",name.c_str()); - if( k == 0 ) sprintf(funcName,"f_%s_EE", name.c_str()); - if( k == +1 ) sprintf(funcName,"f_%s_EEP",name.c_str()); - - TF1* fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); - - fgaus -> SetNpx(10000); - if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) fgaus -> SetLineColor(kBlue+2); - else fgaus -> SetLineColor(kBlue+2); - - float center = 0.5*(spreadMin+spreadMax); - fgaus -> SetParameter(1,h_spread[k]->GetMean()); - fgaus -> SetParameter(2,h_spread[k]->GetRMS()); - h_spread[k] -> Fit(funcName,"QLS+","",center-h_spread[k]->GetRMS(),center+h_spread[k]->GetRMS()); - - - // fill the TGraph - g_spread_vsEta[k] -> SetMarkerStyle(20); - g_spread_vsEta[k] -> SetMarkerSize(1); - g_spread_vsEta[k] -> GetYaxis() -> SetRangeUser(0.,0.05); - if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) )g_spread_vsEta[k] -> SetMarkerColor(kBlue+2); - else g_spread_vsEta[k] -> SetMarkerColor(kRed+2); - - for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) - { - if( (h_spread_vsEta[k])[etaRing]->Integral() == 0 ) continue; - - int etaMin = etaRing * etaRingWidth; - - sprintf(funcName,"f_%s%02d",name.c_str(),etaMin); - fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); - - fgaus -> SetNpx(10000); - if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) fgaus -> SetLineColor(kBlue+2); - else fgaus -> SetLineColor(kRed+2); - - fgaus -> SetParameter(1,(h_spread_vsEta[k])[etaRing]->GetMean()); - fgaus -> SetParameter(2,(h_spread_vsEta[k])[etaRing]->GetRMS()); - (h_spread_vsEta[k])[etaRing] -> Fit(funcName,"QLS+","",center-3.*(h_spread_vsEta[k])[etaRing]->GetRMS(),center+3.*(h_spread_vsEta[k])[etaRing]->GetRMS()); - - g_spread_vsEta[k] -> SetPoint(etaRing,etaMin,fgaus->GetParameter(2)); - g_spread_vsEta[k] -> SetPointError(etaRing,0.5*etaRingWidth,fgaus->GetParError(2)); - } - } -} - - -/////////////////////////////////////////////////////////////////////// -void PhiProfileEE(TGraphErrors *phiProjection, TGraphErrors **MomentumScale, TH2F* hcmap,TEndcapRings *eRings, const int & iz) -{ - std::vector vectSum; - std::vector vectCounter; - - vectCounter.assign(MomentumScale[0]->GetN(),0.); - vectSum.assign(MomentumScale[0]->GetN(),0.); - - for(int ix=1; ixGetNbinsX()+1;ix++) - for(int iy=1; iyGetNbinsY()+1;iy++) - { - if(hcmap->GetBinContent(ix,iy)==0) continue; - int iPhi = int(eRings->GetEndcapIphi(ix,iy,iz)/(360./MomentumScale[0]->GetN())); - vectSum.at(iPhi) = vectSum.at(iPhi)+hcmap->GetBinContent(ix,iy); - vectCounter.at(iPhi) = vectCounter.at(iPhi)+1; - } - - for(unsigned int i=0; i SetPoint(i,int(i*(360./MomentumScale[0]->GetN())),vectSum.at(i)/vectCounter.at(i)); -} - - - - - - -//------------------------------------------------------------------------------------------------------------- - - - - - - -//////////////////////////// -// define the list of bad TT -//////////////////////////// - -void InitializeDeadTT_EB(std::vector >& TT_centre) -{ - TT_centre.push_back(std::pair (58,49)); - TT_centre.push_back(std::pair (53,109)); - TT_centre.push_back(std::pair (8,114)); - TT_centre.push_back(std::pair (83,169)); - TT_centre.push_back(std::pair (53,174)); - TT_centre.push_back(std::pair (63,194)); - TT_centre.push_back(std::pair (83,224)); - TT_centre.push_back(std::pair (73,344)); - TT_centre.push_back(std::pair (83,358)); - TT_centre.push_back(std::pair (-13,18)); - TT_centre.push_back(std::pair (-18,23)); - TT_centre.push_back(std::pair (-8,53)); - TT_centre.push_back(std::pair (-3,63)); - TT_centre.push_back(std::pair (-53,128)); - TT_centre.push_back(std::pair (-53,183)); - TT_centre.push_back(std::pair (-83,193)); - TT_centre.push_back(std::pair (-74,218)); - TT_centre.push_back(std::pair (-8,223)); - TT_centre.push_back(std::pair (-68,303)); - TT_centre.push_back(std::pair (-43,328)); -} - -void InitializeDeadTT_EB2012(std::vector >& TT_centre) -{ - TT_centre.push_back(std::pair (58,49)); - TT_centre.push_back(std::pair (53,109)); - TT_centre.push_back(std::pair (8,114)); - TT_centre.push_back(std::pair (83,169)); - TT_centre.push_back(std::pair (53,174)); - TT_centre.push_back(std::pair (63,194)); - TT_centre.push_back(std::pair (83,224)); - TT_centre.push_back(std::pair (73,344)); - TT_centre.push_back(std::pair (83,358)); - TT_centre.push_back(std::pair (-13,18)); - TT_centre.push_back(std::pair (-18,23)); - TT_centre.push_back(std::pair (-8,53)); - TT_centre.push_back(std::pair (-3,63)); - TT_centre.push_back(std::pair (-53,128)); - TT_centre.push_back(std::pair (-53,183)); - TT_centre.push_back(std::pair (-83,193)); - TT_centre.push_back(std::pair (-74,218)); - TT_centre.push_back(std::pair (-8,223)); - TT_centre.push_back(std::pair (-68,303)); - TT_centre.push_back(std::pair (-43,328)); - TT_centre.push_back(std::pair (-23,167)); -} - -void InitializeDeadTTEEP(std::vector >& TT_centre) -{ - TT_centre.push_back(std::pair (78,78)); - TT_centre.push_back(std::pair (83,28)); - TT_centre.push_back(std::pair (83,23)); -} - -void InitializeDeadTTEEM(std::vector >& TT_centre) -{ - TT_centre.push_back(std::pair (53,28)); -} - -void InitializeDeadTTEEP2012(std::vector >& TT_centre) -{ - TT_centre.push_back(std::pair (78,78)); - TT_centre.push_back(std::pair (83,28)); - TT_centre.push_back(std::pair (83,23)); - TT_centre.push_back(std::pair (91,23)); -} - -void InitializeDeadTTEEM2012(std::vector >& TT_centre) -{ - TT_centre.push_back(std::pair (53,28)); - TT_centre.push_back(std::pair (28,33)); - TT_centre.push_back(std::pair (89,80)); -} - - - - - - -int GetNRegionsEB(const std::string& type) -{ - if( type == "none" ) return 1; - - if( type == "R9" ) return 2; - - if( type == "charge" ) return 2; - - if( type == "eta1" ) return 1; - if( type == "eta2" ) return 2; - if( type == "eta4" ) return 4; - - if( type == "absEta2" ) return 2; - - if( type == "eta2-charge" ) return 4; - - if( type == "absEta2-charge" ) return 4; - - return 0; -} - -int templIndexEB(const std::string& type, const float& eta, const float& charge, const float& R9) -{ - if( type == "none" ) - { - return 0; - } - - - if( type == "R9" ) - { - if( R9 < 0.94 ) return 0; - if( R9 >= 0.94 ) return 1; - } - - - if( type == "charge" ) - { - if( charge < 0. ) return 0; - if( charge > 0. ) return 1; - } - - - if( type == "eta1" ) - { - return 0; - } - if( type == "eta2" ) - { - if( eta < 0. ) return 0; - if( eta >= 0. ) return 1; - } - if( type == "eta4" ) - { - if( (eta < -1.) ) return 0; - if( (eta >= -1.) && (eta < 0.) ) return 1; - if( (eta >= 0.) && (eta < 1.) ) return 2; - if( (eta >= 1.) ) return 3; - } - - - if( type == "absEta2" ) - { - if( fabs(eta) < 1. ) return 0; - if( fabs(eta) >= 1. ) return 1; - } - - - if( type == "eta2-charge" ) - { - if( eta < 0. ) - { - if( charge < 0. ) return 0; - if( charge > 0. ) return 1; - } - if( eta >= 0. ) - { - if( charge < 0. ) return 2; - if( charge > 0. ) return 3; - } - } - - if( type == "absEta2-charge" ) - { - if( fabs(eta) < 1. ) - { - if( charge < 0. ) return 0; - if( charge > 0. ) return 1; - } - if( fabs(eta) >= 1. ) - { - if( charge < 0. ) return 2; - if( charge > 0. ) return 3; - } - } - - return -1; -} - - - -int GetNRegionsEE(const std::string& type) -{ - if( type == "none" ) return 1; - - if( type == "R9" ) return 2; - - if( type == "charge" ) return 2; - - if( type == "eta1" ) return 1; - if( type == "eta2" ) return 2; - if( type == "eta4" ) return 4; - - if( type == "absEta2" ) return 2; - - if( type == "eta2-charge" ) return 4; - - if( type == "absEta2-charge" ) return 4; - - return 0; -} - -int templIndexEE(const std::string& type, const float& eta, const float& charge, const float& R9) -{ - if( type == "none" ) - { - return 0; - } - - - if( type == "R9" ) - { - if( R9 < 0.94 ) return 0; - if( R9 >= 0.94 ) return 1; - } - - - if( type == "charge" ) - { - if( charge < 0. ) return 0; - if( charge > 0. ) return 1; - } - - - if( type == "eta1" ) - { - return 0; - } - if( type == "eta2" ) - { - if( eta < 0. ) return 0; - if( eta >= 0. ) return 1; - } - if( type == "eta4" ) - { - if( (eta < -2.) ) return 0; - if( (eta >= -2.) && (eta < -1.479) ) return 1; - if( (eta >= 1.479) && (eta < 2.) ) return 2; - if( (eta >= 2.) ) return 3; - } - - - if( type == "absEta2" ) - { - if( fabs(eta) < 2. ) return 0; - if( fabs(eta) >= 2. ) return 1; - } - - - if( type == "eta2-charge" ) - { - if( eta < 0. ) - { - if( charge < 0. ) return 0; - if( charge > 0. ) return 1; - } - if( eta >= 0. ) - { - if( charge < 0. ) return 2; - if( charge > 0. ) return 3; - } - } - - - if( type == "absEta2-charge" ) - { - if( fabs(eta) < 2. ) - { - if( charge < 0. ) return 0; - if( charge > 0. ) return 1; - } - if( fabs(eta) >= 2. ) - { - if( charge < 0. ) return 2; - if( charge > 0. ) return 3; - } - } - - - return -1; -} diff --git a/EOverPCalibration/FastCalibrator/src/DrawingUtils.cc b/EOverPCalibration/FastCalibrator/src/DrawingUtils.cc deleted file mode 100644 index d2c20a79288..00000000000 --- a/EOverPCalibration/FastCalibrator/src/DrawingUtils.cc +++ /dev/null @@ -1,318 +0,0 @@ -#include "../interface/DrawingUtils.h" - - - -void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileType, const bool& isEB) -{ - TCanvas* c; - - SetLabelAndTitle(h2); - - if( isEB == true ) - { - c = new TCanvas("c",fileName.c_str(),0,0,1000,600); - c -> SetGridx(); - c -> SetGridy(); - - h2 -> GetXaxis() -> SetNdivisions(418); - h2 -> GetXaxis() -> SetTitle("i#phi"); - h2 -> GetYaxis() -> SetTitle("i#eta"); - h2 -> GetZaxis() -> SetRangeUser(0.90,1.10); - } - else - { - c = new TCanvas("c",fileName.c_str(),0,0,700,600); - c -> SetGridx(); - c -> SetGridy(); - - h2 -> GetXaxis() -> SetNdivisions(510); - h2 -> GetXaxis() -> SetTitle("ix"); - h2 -> GetYaxis() -> SetTitle("iy"); - h2 -> GetZaxis() -> SetRangeUser(0.70,1.30); - } - - h2 -> Draw("COLZ"); - - c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); - delete c; -} - - - -void DrawSpreadHisto(TH1F* h, const std::string& fileName, const std::string& funcName, const std::string& fileType, const bool& isEB) -{ - TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,700,600); - - SetLabelAndTitle(h); - - if( isEB == true ) h -> GetXaxis() -> SetRangeUser(0.9,1.0999); - else h -> GetXaxis() -> SetRangeUser(0.7,1.2999); - if( isEB == true ) h -> GetYaxis() -> SetRangeUser(0.,2500.*(h->GetNbinsX()/2000.)); - else h -> GetYaxis() -> SetRangeUser(0., 150.*(h->GetNbinsX()/2000.)); - h -> GetYaxis() -> SetTitle("entries"); - h -> GetXaxis() -> SetTitle("IC"); - h -> SetFillColor(kBlue+2); - h -> SetFillStyle(3002); - h -> Draw(""); - - TF1* f_spread = h -> GetFunction(funcName.c_str()); - f_spread -> SetLineWidth(2); - - char latexBuffer[50]; - sprintf(latexBuffer,"#mu = %1.2e",f_spread->GetParameter(1)); - TLatex* latex_mean = new TLatex(0.17,0.80,latexBuffer); - latex_mean -> SetNDC(); - latex_mean -> SetTextFont(42); - latex_mean -> SetTextSize(0.05); - latex_mean -> Draw("same"); - sprintf(latexBuffer,"#sigma = %1.2e",f_spread->GetParameter(2)); - TLatex* latex_sigma = new TLatex(0.17,0.75,latexBuffer); - latex_sigma -> SetNDC(); - latex_sigma -> SetTextFont(42); - latex_sigma -> SetTextSize(0.05); - latex_sigma -> Draw("same"); - sprintf(latexBuffer,"RMS = %1.2e",h->GetRMS()); - TLatex* latex_RMS = new TLatex(0.17,0.70,latexBuffer); - latex_RMS -> SetNDC(); - latex_RMS -> SetTextFont(42); - latex_RMS -> SetTextSize(0.05); - latex_RMS -> Draw("same"); - - c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); - delete c; -} - - -void DrawSpreadGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB, - TGraphErrors* g_stat) -{ - TCanvas* c; - - SetLabelAndTitle(g); - - if( isEB == true ) - { - c = new TCanvas("c",fileName.c_str(),0,0,1000,600); - c -> SetGridx(); - c -> SetGridy(); - - g -> GetXaxis() -> SetRangeUser(0.,85.999); - g -> GetYaxis() -> SetRangeUser(0.00,0.05); - g -> GetXaxis() -> SetTitle("|i#eta|"); - g -> GetYaxis() -> SetTitle("#sigma"); - g -> Draw("AP"); - } - else - { - c = new TCanvas("c",fileName.c_str(),0,0,700,600); - c -> SetGridx(); - c -> SetGridy(); - - g -> GetXaxis() -> SetRangeUser(-1.,38.999); - g -> GetYaxis() -> SetRangeUser(0.00,0.30); - g -> GetXaxis() -> SetTitle("iRing"); - g -> GetYaxis() -> SetTitle("#sigma"); - g -> Draw("AP"); - } - - TLegend* leg = new TLegend(0.15,0.74,0.43,0.89); - leg -> SetFillColor(0); - leg -> SetTextFont(42); - leg -> SetTextSize(0.05); - leg -> AddEntry(g,"IC spread","P"); - - if( g_stat != NULL ) - { - g_stat -> Draw("P,same"); - leg -> AddEntry(g_stat,"statistical precision","P"); - } - - leg -> Draw("same"); - - c -> Print((fileName+".png").c_str(),"png"); - - delete c; -} - - - -void DrawPhiAvgICSpread(TH1F* h, const std::string& fileName, const std::string& fileType, const bool& isEB) -{ - TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,700,600); - - SetLabelAndTitle(h); - - if( isEB == true ) h -> GetXaxis() -> SetRangeUser(0.98,1.01999); - else h -> GetXaxis() -> SetRangeUser(0.90,1.0999); - if(isEB == true ) h -> GetYaxis() -> SetRangeUser(0.,70.); - h -> GetYaxis() -> SetTitle("entries"); - h -> GetXaxis() -> SetTitle("#LTIC#GT_{i#phi}"); - h -> SetFillColor(kBlack); - h -> SetFillStyle(3003); - h -> Draw(""); - - TF1* f_phiAvgICSpread = h -> GetFunction("f_phiAvgICSpread"); - f_phiAvgICSpread -> SetLineWidth(2); - - char latexBuffer[50]; - sprintf(latexBuffer,"#mu = %1.2e",f_phiAvgICSpread->GetParameter(1)); - TLatex* latex_mean = new TLatex(0.17,0.80,latexBuffer); - latex_mean -> SetNDC(); - latex_mean -> SetTextFont(42); - latex_mean -> SetTextSize(0.05); - latex_mean -> Draw("same"); - sprintf(latexBuffer,"#sigma = %1.2e",f_phiAvgICSpread->GetParameter(2)); - TLatex* latex_sigma = new TLatex(0.17,0.75,latexBuffer); - latex_sigma -> SetNDC(); - latex_sigma -> SetTextFont(42); - latex_sigma -> SetTextSize(0.05); - latex_sigma -> Draw("same"); - sprintf(latexBuffer,"RMS = %1.2e",h->GetRMS()); - TLatex* latex_RMS = new TLatex(0.17,0.70,latexBuffer); - latex_RMS -> SetNDC(); - latex_RMS -> SetTextFont(42); - latex_RMS -> SetTextSize(0.05); - latex_RMS -> Draw("same"); - - c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); - delete c; -} - - - -void DrawAvgICVsPhiGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const Color_t& color, const bool& isEB) -{ - TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,1000,600); - c -> SetGridx(); - c -> SetGridy(); - - SetLabelAndTitle(g); - - g -> GetXaxis() -> SetRangeUser(0.,360.999); - if( isEB == true) g -> GetYaxis() -> SetRangeUser(0.975,1.025); - else g -> GetYaxis() -> SetRangeUser(0.900,1.100); - g -> GetYaxis() -> SetTitle("#LTIC#GT_{i#phi}"); - g -> GetXaxis() -> SetTitle("i#phi"); - g -> SetMarkerStyle(20); - g -> SetMarkerSize(0.5); - g -> SetMarkerColor(color); - g -> Draw("APL"); - - c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); - delete c; -} - - - -void DrawAvgICVsPhiFoldGraph(TGraphErrors* g, TGraphErrors* g2, const std::string& fileName, const std::string& fileType, const bool& isEB) -{ - TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,1000,600); - c -> SetGridx(); - c -> SetGridy(); - - SetLabelAndTitle(g); - SetLabelAndTitle(g2); - - g -> GetYaxis() -> SetRangeUser(0.98,1.01999); - g -> GetXaxis() -> SetRangeUser(0.,21.); - g -> GetYaxis() -> SetTitle("#LTIC#GT_{i#phi}"); - g -> GetXaxis() -> SetTitle("i#phi%20"); - g -> SetMarkerStyle(20); - g -> SetMarkerSize(0.7); - g -> SetMarkerColor(kRed+2); - g -> SetLineColor(kRed+2); - g -> Draw("APL"); - - g2 -> SetMarkerStyle(20); - g2 -> SetMarkerSize(0.7); - g2 -> SetMarkerColor(kGreen+2); - g2 -> SetLineColor(kGreen+2); - g2 -> Draw("PL,same"); - - TLegend* leg = new TLegend(0.13,0.74,0.43,0.89); - leg -> SetFillColor(0); - leg -> AddEntry(g, "w/o crack corr.","P"); - leg -> AddEntry(g2,"w/ crack corr.", "P"); - leg -> Draw("same"); - - c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); - delete c; -} - - - -void DrawResidualGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB) -{ - TCanvas* c; - - SetLabelAndTitle(g); - - if( isEB == true ) - { - c = new TCanvas("c",fileName.c_str(),0,0,1000,600); - c -> SetGridx(); - c -> SetGridy(); - - g -> GetXaxis() -> SetRangeUser(0.,85.999); - g -> GetYaxis() -> SetRangeUser(0.00,0.03); - g -> GetXaxis() -> SetTitle("|i#eta|"); - g -> GetYaxis() -> SetTitle("#sigma"); - g -> Draw("AP"); - } - else - { - c = new TCanvas("c",fileName.c_str(),0,0,700,600); - c -> SetGridx(); - c -> SetGridy(); - - g -> GetXaxis() -> SetRangeUser(-1.,38.999); - g -> GetYaxis() -> SetRangeUser(0.00,0.20); - g -> GetXaxis() -> SetTitle("iRing"); - g -> GetYaxis() -> SetTitle("#sigma"); - g -> Draw("AP"); - } - - TLegend* leg = new TLegend(0.15,0.74,0.43,0.89); - leg -> SetFillColor(0); - leg -> SetTextFont(42); - leg -> SetTextSize(0.05); - leg -> AddEntry(g,"IC residual spread","P"); - - leg -> Draw("same"); - - c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); - - delete c; -} - - - -void SetLabelAndTitle(TGraphErrors* g) -{ - g -> GetXaxis() -> SetLabelSize(0.04); - g -> GetYaxis() -> SetLabelSize(0.04); - g -> GetXaxis() -> SetTitleSize(0.05); - g -> GetYaxis() -> SetTitleSize(0.05); - g -> GetXaxis() -> SetTitleOffset(1.20); - g -> GetYaxis() -> SetTitleOffset(1.20); -} - -void SetLabelAndTitle(TH1F* h) -{ - h -> GetXaxis() -> SetLabelSize(0.04); - h -> GetYaxis() -> SetLabelSize(0.04); - h -> GetXaxis() -> SetTitleSize(0.05); - h -> GetYaxis() -> SetTitleSize(0.05); - h -> GetXaxis() -> SetTitleOffset(1.20); - h -> GetYaxis() -> SetTitleOffset(1.20); -} - -void SetLabelAndTitle(TH2F* h2) -{ - h2 -> GetXaxis() -> SetLabelSize(0.04); - h2 -> GetYaxis() -> SetLabelSize(0.04); - h2 -> GetXaxis() -> SetTitleSize(0.05); - h2 -> GetYaxis() -> SetTitleSize(0.05); - h2 -> GetXaxis() -> SetTitleOffset(1.20); - h2 -> GetYaxis() -> SetTitleOffset(1.20); -} diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc deleted file mode 100644 index 5d418535037..00000000000 --- a/EOverPCalibration/FastCalibrator/src/FastCalibratorEB.cc +++ /dev/null @@ -1,974 +0,0 @@ -//adapting it to ECALELF ntuple - -#include "../interface/FastCalibratorEB.h" -#include "../interface/GetHashedIndexEB.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -///==== Default constructor Contructor - -FastCalibratorEB::FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution): -outEPDistribution_p(outEPDistribution){ - - // if parameter tree is not specified (or zero), connect the file - // used to generate this class and read the Tree. - if (tree == 0) { - TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); - if (!f) { - f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); - } - tree = (TTree*)gDirectory->Get("ntu"); - } - Init(tree); - - // Set my momentum scale using the input graphs - myMomentumScale = inputMomentumScale; - myTypeEB = typeEB; -} - -///==== deconstructor - -FastCalibratorEB::~FastCalibratorEB(){ - - if (!fChain) return; - delete fChain->GetCurrentFile(); -} - -///=== Acces to the entry information in the input tree or chain - -Int_t FastCalibratorEB::GetEntry(Long64_t entry){ - - if (!fChain) return 0; - return fChain->GetEntry(entry); -} - -///==== Load information of input Ntupla - -Long64_t FastCalibratorEB::LoadTree(Long64_t entry){ -// Set the environment to read one entry - if (!fChain) return -5; - Long64_t centry = fChain->LoadTree(entry); - if (centry < 0) return centry; - if (!fChain->InheritsFrom(TChain::Class())) return centry; - - TChain *chain = (TChain*)fChain; - if (chain->GetTreeNumber() != fCurrent) { - fCurrent = chain->GetTreeNumber(); - } - return centry; -} - - -//===== Fill Scalibration Map - -void FastCalibratorEB::FillScalibMap(TString miscalibMap){ - - std::ifstream scalibFile; - scalibFile.open(miscalibMap.Data()); - - if (!scalibFile) { - std::cout<<"miscalib map missing!!!"<> eta >> scalibValue; - scalibMap.insert(std::pair(eta,scalibValue)); - } - scalibFile.close(); -} - - -///==== Variables initialization - -void FastCalibratorEB::Init(TTree *tree){ - - /// Set object pointer - - energyRecHitSCEle1 = 0; - XRecHitSCEle1 = 0; //ETA - YRecHitSCEle1 = 0; //PHI - ZRecHitSCEle1 = 0; - recoFlagRecHitSCEle1 = 0; - - energyRecHitSCEle2 = 0; - XRecHitSCEle2 = 0; //ETA - YRecHitSCEle2 = 0; //PHI - ZRecHitSCEle2 = 0; - recoFlagRecHitSCEle2 = 0; - - /// Set branch addresses and branch pointers - - if (!tree) return; - fChain = tree; - fCurrent = -1; - fChain->SetMakeClass(1); - - fChain->SetBranchStatus("*", 0); - - fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); - fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); - fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); - fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); - - fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); - fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); - fChain->SetBranchStatus("PtEle", 1); fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); - fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); - fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); - fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); - fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); - fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); - fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); - fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); - fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); - fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); - fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); - fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); - fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); - - // ele1 - fChain->SetBranchStatus("energyRecHitSCEle1", 1); fChain->SetBranchAddress("energyRecHitSCEle1", &energyRecHitSCEle1, &b_energyRecHitSCEle1); - fChain->SetBranchStatus("XRecHitSCEle1", 1); fChain->SetBranchAddress("XRecHitSCEle1", &XRecHitSCEle1, &b_XRecHitSCEle1); - fChain->SetBranchStatus("YRecHitSCEle1", 1); fChain->SetBranchAddress("YRecHitSCEle1", &YRecHitSCEle1, &b_YRecHitSCEle1); - fChain->SetBranchStatus("ZRecHitSCEle1", 1); fChain->SetBranchAddress("ZRecHitSCEle1", &ZRecHitSCEle1, &b_ZRecHitSCEle1); - fChain->SetBranchStatus("recoFlagRecHitSCEle1", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle1", &recoFlagRecHitSCEle1, &b_recoFlagRecHitSCEle1); - - // ele2 - fChain->SetBranchStatus("energyRecHitSCEle2", 1); fChain->SetBranchAddress("energyRecHitSCEle2", &energyRecHitSCEle2, &b_energyRecHitSCEle2); - fChain->SetBranchStatus("XRecHitSCEle2", 1); fChain->SetBranchAddress("XRecHitSCEle2", &XRecHitSCEle2, &b_XRecHitSCEle2); - fChain->SetBranchStatus("YRecHitSCEle2", 1); fChain->SetBranchAddress("YRecHitSCEle2", &YRecHitSCEle2, &b_YRecHitSCEle2); - fChain->SetBranchStatus("ZRecHitSCEle2", 1); fChain->SetBranchAddress("ZRecHitSCEle2", &ZRecHitSCEle2, &b_ZRecHitSCEle2); - fChain->SetBranchStatus("recoFlagRecHitSCEle2", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle2", &recoFlagRecHitSCEle2, &b_recoFlagRecHitSCEle2); - -} - -//! Declaration of the objects that are save in the output file - -void FastCalibratorEB::bookHistos(int nLoops){ - - hC_IntercalibValues = new hChain ("IntercalibValues", "IntercalibValues", 2000,0.5,1.5, nLoops); - - hC_PullFromScalib = new hChain ("hC_PullFromScalib", "hC_PullFromScalib", 2000,-0.5,0.5, nLoops); - - hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); - - hC_scale_EB = new h2Chain("hC_scale_EB", "hC_scale_EB", 360,1, 361, 171, -85, 86, nLoops ); - - h_scalib_EB = new TH2F("h_scalib_EB", "h_scalib_EB", 360,1, 361, 171, -85, 86 ); - - h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); - - p_IntercalibValues_iEta = new TProfile ("p_IntercalibValues_iEta","p_IntercalibValues_iEta", 171, -85, 86, -0.1, 2.1); - - h_IntercalibSpread_iEta = new TH1F ("h_IntercalibSpread_iEta", "h_IntercalibSpread_iEta", 171, -85, 86); - - h_IntercalibValues_test = new TH1F ("h_IntercalibValues_test", "h_IntercalibValues_test", 400, -1, 1); - - h_scale_EB_hashedIndex = new TH1F("h_scale_EB_hashedIndex", "h_scale_EB_hashedIndex", 61201,-0.5,61999.5 ); - - h_Init_IntercalibValues = new TH1F("h_Init_IntercalibValues","h_Init_IntercalibValues",2000,0.5,1.5); - - h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); - - g_ICmeanVsLoop = new TGraphErrors(); - g_ICmeanVsLoop -> SetName("g_ICmeanVsLoop"); - g_ICmeanVsLoop -> SetTitle("g_ICmeanVsLoop"); - - g_ICrmsVsLoop = new TGraphErrors(); - g_ICrmsVsLoop -> SetName("g_ICrmsVsLoop"); - g_ICrmsVsLoop ->SetTitle("g_ICrmsVsLoop"); - - h_scale_EB = new TH2F("h_scale_EB", "h_scale_EB", 360,1, 361, 171, -85, 86 ); - - h_scale_EB_meanOnPhi = new TH2F("h_scale_EB_meanOnPhi", "h_scale_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); - - h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); - - return; -} - -//! Build E/p distribution for both ele1 and ele2 - -void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, - float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, bool isMCTruth){ - - if(iLoop ==0){ - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); - } - else{ - hC_EoP_eta_ele -> Reset(); - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); - } - - - Long64_t nbytes = 0, nb = 0; - - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1->at(iRecHit) < 4 ) /// control if this recHit is good - { - seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - iseed=iRecHit; - E_seed=energyRecHitSCEle1 -> at(iRecHit); ///! Seed search - } - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(recoFlagRecHitSCEle1->at(iRecHit) < 4) ///! SC energy taking only good channels - thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; - - } - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - ///! 3x3 matrix informations in order to apply R9 selection - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && - fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && recoFlagRecHitSCEle1->at(iRecHit) < 4) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; - } - - ///! Eta seed from hashed index - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - - bool skipElectron = false; - - ///! different E/p if I am using MCThruth informations or not - if(!isMCTruth) { - pIn = pAtVtxGsfEle[0]; - int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); - } - else{ - pIn = energyMCEle[0]; - ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9 Selection - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - /// fbrem Selection - if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; - - /// fbrem Selection - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; - - /// Save electron E/p in a chain of histogramm each for eta bin - if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); - - - } - ///=== Second medium electron from Z - - if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ - - FdiEta = energySCEle[1]/rawEnergySCEle[1]; /// FEta approximation - - float thisE = 0; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - - if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2->at(iRecHit) < 4) - { - seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - iseed=iRecHit; - E_seed=energyRecHitSCEle2 -> at(iRecHit); ///Seed informations - } - - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if (recoFlagRecHitSCEle2->at(iRecHit) < 4 ) /// SC Energy only for good channels - thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - - } - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && - fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && - recoFlagRecHitSCEle2->at(iRecHit) < 4) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - } - - - /// Eta seed info from hashed index - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - - bool skipElectron = false; - - /// MCTruth analysis option - if(!isMCTruth) { - pIn = pAtVtxGsfEle[1]; - int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); - } - else{ - pIn = energyMCEle[1]; - ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - ///R9 Selection - if( fabs(thisE3x3/thisE) < R9Min && isR9selection==true ) skipElectron = true; - - /// fbrem Selection - if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; - - /// fbrem Selection - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; - - /// Save E/p electron information - if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); - - } - } - - /// Histogramm Normalization - for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++) hC_EoP_eta_ele->Normalize(ieta); - - /// Save E/p pdf if it is required - if(isSaveEPDistribution == true) { - TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); - saveEoPeta(f2); - } - -} - - -/// Calibration Loop over the ntu events -void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, - bool isEPselection,bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, - bool isMCTruth, std::map > > jsonMap, float miscalibMethod, TString miscalibMap){ - if (fChain == 0) return; - - if(isMiscalib == true) { - std::cout<<"method used for the scalibration (1=from map, 0=linear): "< theScalibration(m_regions, 0.); - TRandom3 genRand; - for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { - - bool isDeadXtal = false ; - - /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user - - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); - if(isDeadXtal == true ) { - theScalibration[iIndex]=0; - h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); - } - else{ - if(isMiscalib == true) { - if (miscalibMethod == 1) { //miscalibration with a gaussian spread (eta-dependent) - theScalibration[iIndex] = scalibMap.at(GetIetaFromHashedIndex(iIndex)); //take the values from the map filled before - } - else - theScalibration[iIndex] = 1 + 0.1*fabs(GetIetaFromHashedIndex(iIndex))/85.; //linear eta-dependent scalibration - - } - -// theScalibration[iIndex] = 1.+ 0.01*fabs(GetIetaFromHashedIndex(iIndex));// genRand.Gaus(1.,0.01); ///! 5% of Miscalibration fixed - if(isMiscalib == false) theScalibration[iIndex] = 1.; - h_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map - } - } - - /// ----------------- Calibration Loops -----------------------------// - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - std::cout << "Starting iteration " << iLoop + 1 << std::endl; - - /// prepare the numerator and denominator for each Xtal - - std::vector theNumerator(m_regions, 0.); - std::vector theDenominator(m_regions, 0.); - - std::cout << "Number of analyzed events = " << nentries << std::endl; - - ///==== build E/p distribution ele 1 and 2 - BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isfbrem,fbremMax,isPtCut,PtMin,isMCTruth); - - // define map with events - std::map >,int> eventsMap; - - /// Loop on each entry - Long64_t nbytes = 0, nb = 0; - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - - //********************************* - // JSON FILE AND DUPLIACTES IN DATA - - bool skipEvent = false; - if( isMCTruth == 0 ) - { - if(AcceptEventByRunAndLumiSection(runNumber,lumiBlock,jsonMap) == false) skipEvent = true; - - std::pair eventLSandID(lumiBlock,eventNumber); - std::pair > eventRUNandLSandID(runNumber,eventLSandID); - if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; - else eventsMap[eventRUNandLSandID] = 1; - } - - if( skipEvent == true ) continue; - - float pIn, FdiEta; - - std::map map; - bool skipElectron=false; - - /// Tight electron information from W and Z, it depends on the flag variable isW, isZ - - if ( isEBEle[0] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - /// SCL energy containment correction - FdiEta = energySCEle[0]/rawEnergySCEle[0]; - - float thisE = 0; - int iseed = 0 ; - float E_seed = 0; - int seed_hashedIndex = 0; - float thisE3x3 = 0 ; - - bool skipElectron = false; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - if (iLoop > 0 ) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if (recoFlagRecHitSCEle1->at(iRecHit) < 4) ///! SC Energy - thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; - - if(theScalibration[thisIndex] == 0 && energyRecHitSCEle1 -> at(iRecHit)/energySCEle[0] >= 0.15 ) ///! not to introduce a bias in the Dead xtal study - skipElectron = true; - - if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1->at(iRecHit)<4){ - E_seed=energyRecHitSCEle1 -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); //! Seed Infos - } - - } - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && - fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && - recoFlagRecHitSCEle1->at(iRecHit) < 4 ) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; - } - - - ///! if MCTruth Analysis - if(!isMCTruth) { - pIn = pAtVtxGsfEle[0]; - int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); - } - else{ - pIn = energyMCEle[0]; - ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])); - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// Take the correct pdf for the ring in order to reweight the events in L3 - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); - - - /// Basic selection on E/p or R9 if you want to apply - if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; - - if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron = true; - if( !skipElectron) { - - /// Now cycle on the all the recHits and update the numerator and denominator - for ( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { - - if (recoFlagRecHitSCEle1->at(iRecHit) >= 4) continue ; - - int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - float thisIC = 1.; - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { - h_Occupancy_hashedIndex -> Fill(thisIndex); - h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); - } - - /// use full statistics - if ( splitStat == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/pIn); /// factor use to reweight the evemts - theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); - - } - /// Use Half Statistic only even - else if ( splitStat == 1 && jentry%2 == 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/pIn); - theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); - } - /// use odd event - else if ( splitStat == -1 && jentry%2 != 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/pIn); - theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); - } - - } - - } - - - //Fill EoP - hC_EoP -> Fill(iLoop, thisE/pIn); - - } - - skipElectron = false; - - /// Ele2 medium from Z only Barrel - if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - FdiEta = energySCEle[1]/rawEnergySCEle[1]; - // Electron energy - float thisE = 0; - int iseed = 0 ; - float E_seed = 0; - int seed_hashedIndex = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(recoFlagRecHitSCEle2->at(iRecHit) < 4) - thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - - if(theScalibration[thisIndex] == 0 && energyRecHitSCEle2 -> at(iRecHit)/energySCEle[1] >= 0.15 ) ///! not to introduce a bias in the Dead xtal study - skipElectron = true; - - if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2->at(iRecHit) < 4){ - E_seed=energyRecHitSCEle2 -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); /// Seed information - } - - - } - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - // IC obtained from previous Loops - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - - if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && - fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && - recoFlagRecHitSCEle2->at(iRecHit) < 4) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - - - } - - ///! Option for MCTruth analysis - if(!isMCTruth){ - pIn = pAtVtxGsfEle[1]; - int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); - } - else{ - pIn = energyMCEle[1]; - ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])); - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); - - /// discard electrons with bad E/P or R9 - if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; - if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; - - if( !skipElectron ){ - - /// Now cycle on the all the recHits and update the numerator and denominator - for ( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { - - if (recoFlagRecHitSCEle2->at(iRecHit) >= 4) continue ; - - int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - // std::cout<<"DEBUG: "<at(iRecHit)<<" "<at(iRecHit)<<" "<at(iRecHit)< 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { - h_Occupancy_hashedIndex -> Fill(thisIndex); - h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); - } - - /// use full statistics - if ( splitStat == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/pIn); - theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); - } - /// use evens - else if ( splitStat == 1 && jentry%2 == 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/pIn); - theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); - } - /// use odds - else if ( splitStat == -1 && jentry%2 != 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/pIn); - theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*(thisIC/thisE)*pIn/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); - } - - } - - } - - - //Fill EoP - hC_EoP -> Fill(iLoop, thisE/pIn); - - - } - - } - ///! End Cycle on the events - - ///New Loop cycle + Save info - std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; - - TH1F auxiliary_IC("auxiliary_IC","auxiliary_IC",50,0.2,1.9); - - ///Fill the histo of IntercalibValues before the solve - for ( int iIndex = 0; iIndex < 61200; iIndex++ ){ - - if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ - - float thisIntercalibConstant = 1.; - /// Solve the cases where the recHit energy is always 0 (dead Xtal?) - bool isDeadXtal = false ; - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); - if(isDeadXtal == true ) continue; - - - if ( theDenominator[iIndex] != 0. ) thisIntercalibConstant = theNumerator[iIndex]/theDenominator[iIndex]; - float oldIntercalibConstant = 1.; - if ( iLoop > 0 ) oldIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (iIndex+1); - - h_scale_EB_hashedIndex -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); /// IC product useful for L3 methods - hC_IntercalibValues -> Fill(iLoop, thisIntercalibConstant); /// IC distribution at each loop - hC_PullFromScalib -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); - hC_scale_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); ///IC Map - - ///Save the new IC coefficient - auxiliary_IC.Fill(thisIntercalibConstant); - - } - - } - /// Info in order to test convergence - g_ICmeanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetMean()); - g_ICmeanVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetMeanError()); - - g_ICrmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetRMS()); - g_ICrmsVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetRMSError()); - }/// end calibration loop - - - int myPhiIndex = 0; - - for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ - for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ - - ///Setup the histo for fit - TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",400, 0.2, 1.9); - TF1 f1("f1","gaus",0.2,1.9); - - int totIphi = 0; - float meanICforPhiRing = 0.; - - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - - int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); - if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; - float thisIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); - // std::cout< GetBinContent(thisHashedIndex+1)< Fill(iphi, iabseta*theZside, thisIntercalibConstant); ///Fill with Last IC Value - - if (GetIetaFromHashedIndex(thisHashedIndex) == 85) h_IntercalibValues_test -> Fill (thisIntercalibConstant); - - p_IntercalibValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisIntercalibConstant); - - histoAuxiliary . Fill (thisIntercalibConstant); - - - ///Vectors - IetaValues.push_back(iabseta*theZside); - IphiValues.push_back(iphi); - ICValues.push_back(thisIntercalibConstant); - - meanICforPhiRing += thisIntercalibConstant; - totIphi++; - - } - - for ( int uu = 0; uu < totIphi; uu++ ) - meanICforPhiRingValues.push_back(meanICforPhiRing/totIphi); - /// Note this info are not used furhter because channels near to the dead ones are not skipped - - - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - - int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); - if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; - - h_scale_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, ICValues.at(myPhiIndex)/meanICforPhiRingValues.at(myPhiIndex)); - myPhiIndex++; /// Normalization IC with the mean of each ring - - } - f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); - f1.SetRange(1-5*histoAuxiliary.GetRMS(), 1+5*histoAuxiliary.GetRMS()); - histoAuxiliary . Fit("f1","QR+"); - - if ( f1.GetParError(2) > 0.5 ) continue; - h_IntercalibSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); - h_IntercalibSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); - - } - - } - -} -/// Save infos in the output -void FastCalibratorEB::saveHistos(TFile * f1){ - - f1->cd(); - hC_IntercalibValues -> Write(*f1); - hC_PullFromScalib -> Write(*f1); - hC_EoP -> Write(*f1); - hC_scale_EB -> Write("",*f1); - h_scalib_EB -> Write(); - - h_IntercalibValues_test -> Write(); - h_Occupancy_hashedIndex -> Write(); - p_IntercalibValues_iEta -> Write(); - h_Init_IntercalibValues -> Write(); - - h_IntercalibSpread_iEta -> Write(); - h_scale_EB -> Write(); - h_scale_EB_meanOnPhi -> Write("h_scale_map"); - h_scale_EB_hashedIndex -> Write(); - - h_occupancy -> Write(); - - g_ICmeanVsLoop -> Write(); - g_ICrmsVsLoop -> Write(); - - h_map_Dead_Channels -> Write() ; - - f1->Close(); - - return; -} -/// Save E/0 distribution -void FastCalibratorEB::saveEoPeta(TFile * f2){ - f2->cd(); - hC_EoP_eta_ele ->Write(*f2); - f2->Close(); -} - -///! Acquire fake dead channel list on order to evaluate the effected of IC near to them -void FastCalibratorEB::AcquireDeadXtal(TString inputDeadXtal, const bool & isDeadTriggerTower){ - - if(inputDeadXtal!="NULL"){ - - std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); - - std::string buffer; - int iEta, iPhi ; - - while(!DeadXtal.eof()){ - getline(DeadXtal,buffer); - std::stringstream line( buffer ); - line >> iEta >> iPhi ; - - if(iEta >=0){ - DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; - if(isDeadTriggerTower) { - for(int iphi = -2 ; iphi <= 2 ; iphi ++){ - for(int ieta = -2 ; ieta <=2 ; ieta ++){ - if(iphi==0 && ieta==0) continue ; - DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta+ieta,iPhi+iphi,1)) ; - } - } - } - } - - else{ - - DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; - if(isDeadTriggerTower) { - for(int iphi = -2 ; iphi <= 2 ; iphi ++){ - for(int ieta = -2 ; ieta <=2 ; ieta ++){ - if(iphi==0 && ieta==0) continue ; - DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta+ieta,iPhi+iphi,-1)) ; - } - } - } - } - } - - sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); - } - - else DeadXtal_HashedIndex.push_back(-9999); - -} - -///! Check if the channel is dead or not -bool FastCalibratorEB::CheckDeadXtal(const int & iEta, const int & iPhi){ - int hashed_Index; - if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); - else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); - - std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); - - if(iter !=DeadXtal_HashedIndex.end()) - return true; - else return false; -} diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc deleted file mode 100644 index b1949705b59..00000000000 --- a/EOverPCalibration/FastCalibrator/src/FastCalibratorEB_MVA.cc +++ /dev/null @@ -1,1048 +0,0 @@ -#include "../interface/FastCalibratorEB_MVA.h" -#include "../interface/GetHashedIndexEB.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -///==== Default constructor Contructor - -FastCalibratorEB_MVA::FastCalibratorEB_MVA(TTree *tree,TString outEPDistribution): -outEPDistribution_p(outEPDistribution){ - -// if parameter tree is not specified (or zero), connect the file -// used to generate this class and read the Tree. - if (tree == 0) {TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject ("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); - if (!f) f = new TFile("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); - - tree = (TTree*)gDirectory->Get("ntu"); - } - Init(tree); -} - -///==== deconstructor - -FastCalibratorEB_MVA::~FastCalibratorEB_MVA(){ - if (!fChain) return; - delete fChain->GetCurrentFile(); -} - -///=== Acces to the entry information in the input tree or chain - -Int_t FastCalibratorEB_MVA::GetEntry(Long64_t entry){ - if (!fChain) return 0; - return fChain->GetEntry(entry); - -} - -///==== Load information of input Ntupla - -Long64_t FastCalibratorEB_MVA::LoadTree(Long64_t entry){ - -// Set the environment to read one entry - if (!fChain) return -5; - Long64_t centry = fChain->LoadTree(entry); - if (centry < 0) return centry; - if (!fChain->InheritsFrom(TChain::Class())) return centry; - - TChain *chain = (TChain*)fChain; - if (chain->GetTreeNumber() != fCurrent) { - fCurrent = chain->GetTreeNumber(); - Notify(); - } - return centry; -} - -///==== Variables initialization - -void FastCalibratorEB_MVA::Init(TTree *tree){ - - /// Set object pointer - ele1_recHit_E = 0; - ele1_recHit_hashedIndex = 0; - ele1_recHit_iphiORiy = 0; - ele1_recHit_ietaORix = 0; - ele1_recHit_flag = 0; - - ele2_recHit_E = 0; - ele2_recHit_hashedIndex = 0; - ele2_recHit_iphiORiy = 0; - ele2_recHit_ietaORix = 0; - ele2_recHit_flag = 0; - - /// Set branch addresses and branch pointers - - if (!tree) return; - fChain = tree; - fCurrent = -1; - fChain->SetMakeClass(1); - - fChain->SetBranchAddress("runId", &runId, &b_runId); - fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); - fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchAddress("isZ", &isZ, &b_isZ); - - fChain->SetBranchAddress("BDTG_weightEB_W_1", &BDTG_weightEB_W_1, &b_BDTG_weightEB_W_1); - fChain->SetBranchAddress("BDTG_weightEB_W_2", &BDTG_weightEB_W_2, &b_BDTG_weightEB_W_2); -// fChain->SetBranchAddress("BDTG_weightEB_Z_1", &BDTG_weightEB_Z_1, &b_BDTG_weightEB_Z_1); -// fChain->SetBranchAddress("BDTG_weightEB_Z_2", &BDTG_weightEB_Z_2, &b_BDTG_weightEB_Z_2); - - fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); - fChain->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex, &b_ele1_recHit_hashedIndex); - fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); - fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); - -// fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); -// fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); -// fChain->SetBranchAddress("ele1_DR", &ele1_DR, &b_ele1_DR); -// fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); - - fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); - fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); - fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); - fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); - fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); - - - fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); - fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); - fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); - fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); - fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); - fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); - fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); - fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); - fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); - fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); - fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); - - fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); - fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); - fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); - fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); - -// fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); -// fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); -// fChain->SetBranchAddress("ele2_DR", &ele2_DR, &b_ele2_DR); -// fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); - - fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); - fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); - fChain->SetBranchAddress("ele2_scEta", &ele2_scEta, &b_ele2_scEta); - - fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); - fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); - fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); - - fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); - fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); - fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); - fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); - fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); - fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); - fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); - fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); - fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); - fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); - - Notify(); -} - -Bool_t FastCalibratorEB_MVA::Notify(){ - // The Notify() function is called when a new file is opened. This - // can be either for a new TTree in a TChain or when when a new TTree - // is started when using PROOF. It is normally not necessary to make changes - // to the generated code, but the routine can be extended by the - // user if needed. The return value is currently not used. - - return kTRUE; -} - -void FastCalibratorEB_MVA::Show(Long64_t entry){ -// Print contents of entry. -// If entry is not specified, print current entry - if (!fChain) return; - fChain->Show(entry); -} - -Int_t FastCalibratorEB_MVA::Cut(Long64_t entry){ -// This function may be called from Loop. -// returns 1 if entry is accepted. -// returns -1 otherwise. - return 1; -} - - -//! Declaration of the objects that are save in the output file - -void FastCalibratorEB_MVA::bookHistos(int nLoops){ - - hC_IntercalibValues = new hChain ("IntercalibValues", "IntercalibValues", 2000,0.5,1.5, nLoops); - - hC_PullFromScalib = new hChain ("hC_PullFromScalib", "hC_PullFromScalib", 2000,-0.5,0.5, nLoops); - - hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); - - hC_scale_EB = new h2Chain("hC_scale_EB", "hC_scale_EB", 360,1, 361, 171, -85, 86, nLoops ); - - h_scalib_EB = new TH2F("h_scalib_EB", "h_scalib_EB", 360,1, 361, 171, -85, 86 ); - - h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); - - p_IntercalibValues_iEta = new TProfile ("p_IntercalibValues_iEta","p_IntercalibValues_iEta", 171, -85, 86, -0.1, 2.1); - - h_IntercalibSpread_iEta = new TH1F ("h_IntercalibSpread_iEta", "h_IntercalibSpread_iEta", 171, -85, 86); - - h_IntercalibValues_test = new TH1F ("h_IntercalibValues_test", "h_IntercalibValues_test", 400, -1, 1); - - h_scale_EB_hashedIndex = new TH1F("h_scale_EB_hashedIndex", "h_scale_EB_hashedIndex", 61201,-0.5,61999.5 ); - - h_Init_IntercalibValues = new TH1F("h_Init_IntercalibValues","h_Init_IntercalibValues",2000,0.5,1.5); - - h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); - - h_WeigthEB_W_1 = new TH1F ("h_WeigthEB_W_1","h_WeigthEB_W_1",500,0.,1.5); - h_WeigthEB_W_2 = new TH1F ("h_WeigthEB_W_2","h_WeigthEB_W_2",500,0.,1.5); - - g_ICmeanVsLoop = new TGraphErrors(); - g_ICmeanVsLoop -> SetName("g_ICmeanVsLoop"); - g_ICmeanVsLoop -> SetTitle("g_ICmeanVsLoop"); - - g_ICrmsVsLoop = new TGraphErrors(); - g_ICrmsVsLoop -> SetName("g_ICrmsVsLoop"); - g_ICrmsVsLoop ->SetTitle("g_ICrmsVsLoop"); - - h_scale_EB = new TH2F("h_scale_EB", "h_scale_EB", 360,1, 361, 171, -85, 86 ); - - h_scale_EB_meanOnPhi = new TH2F("h_scale_EB_meanOnPhi", "h_scale_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); - - h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); - - return; -} - -//! Build weight distribution for TMVA correction -void FastCalibratorEB_MVA::BuildWeightDistribution_ele(int iLoop, int nentries , int useW, int useZ,std::vector theScalibration,bool isR9selection){ - -if(iLoop ==0){ - - Long64_t nbytes = 0, nb = 0; - - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - if (!(jentry%1000000))std::cerr<<"building Weight distribution ----> "<size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag->at(iRecHit) < 4*/ ) /// control if this recHit is good - { - iseed=iRecHit; - E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search - } - - // if(ele1_recHit_flag->at(iRecHit) < 4) ///! SC energy taking only good channels - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - ///! 3x3 matrix informations in order to apply R9 selection - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 - /*&& ele1_recHit_flag->at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - bool skipElectron = false; - - - /// R9 Selection - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; - - - if(!skipElectron){ h_WeigthEB_W_1->Fill(BDTG_weightEB_W_1); - h_WeigthEB_W_2->Fill(BDTG_weightEB_W_2); - } - } - } - } - else return; - -} - - - - -//! Build E/p distribution for both ele1 and ele2 - -void FastCalibratorEB_MVA::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration,bool isSaveEPDistribution,bool isR9selection, bool isMCTruth){ - - if(iLoop ==0) { - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); - } - else{ - hC_EoP_eta_ele -> Reset(); - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); - } - - - Long64_t nbytes = 0, nb = 0; - - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& - ele1_recHit_flag->at(iRecHit) < 4*/ - ) /// control if this recHit is good - { - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search - - } - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - // if(ele1_recHit_flag->at(iRecHit) < 4) ///! SC energy taking only good channels - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - ///! 3x3 matrix informations in order to apply R9 selection - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 - //&& ele1_recHit_flag->at(iRecHit) < 4 - ) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - ///! Eta seed from hashed index - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - - bool skipElectron = false; - - ///! different E/p if I am using MCThruth informations or not - if(!isMCTruth) pIn = ele1_tkP; - else{ - pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9 Selection - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; - - /// Save electron E/p in a chain of histogramm each for eta bin - if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); - - - } - ///=== Second medium electron from Z - - if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ - - FdiEta = ele2_scE/ele2_scERaw; /// FEta approximation - - float thisE = 0; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag->at(iRecHit) < 4*/){ - - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele2_recHit_E -> at(iRecHit); ///Seed informations - - } - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - // if (ele2_recHit_flag->at(iRecHit) < 4 ) /// SC Energy only for good channels - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& - ele2_recHit_flag->at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - - /// Eta seed info from hashed index - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - - - bool skipElectron = false; - - /// MCTruth analysis option - - if(!isMCTruth) pIn = ele2_tkP; - else{ - pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - ///R9 Selection - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)<=0.35) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.35 && fabs(ele2_scEta)<=0.7) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.7 && fabs(ele2_scEta)<=1.05 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>1.05) skipElectron = true; - /// Save E/p electron information - if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); - - } - - - } - - /// Histogramm Normalization - for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++) hC_EoP_eta_ele->Normalize(ieta); - - /// Save E/p pdf if it is required - if(isSaveEPDistribution == true && outEPDistribution_p!="NULL"){ - TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); - saveEoPeta(f2); - } - -} - - -/// Calibration Loop over the ntu events - -void FastCalibratorEB_MVA::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution,bool isEPselection,bool isR9selection, bool isMCTruth) -{ - if (fChain == 0) return; - - /// Define the number of crystal you want to calibrate - int m_regions = 0; - - - /// Define useful numbers - static const int MIN_IETA = 1; - static const int MIN_IPHI = 1; - static const int MAX_IETA = 85; - static const int MAX_IPHI = 360; - - for ( int iabseta = MIN_IETA; iabseta <= MAX_IETA; iabseta++ ){ - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ - - m_regions++; - - } - } - } - - /// Barrel region = Barrel xtal - std::cout << "m_regions " << m_regions << std::endl; - - /// Build the scalibration Map for MC Analysis - - std::vector theScalibration(m_regions, 0.); - TRandom3 genRand; - - for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { - - bool isDeadXtal = false ; - - /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user - - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); - if(isDeadXtal == true ) { - theScalibration[iIndex]=0; - h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); - } - else{ - - if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); ///! 5% of Miscalibration fixed - if(isMiscalib == false) theScalibration[iIndex] = 1.; - h_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map - } - } - - /// ----------------- Calibration Loops -----------------------------// - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - std::cout << "Starting iteration " << iLoop + 1 << std::endl; - - /// prepare the numerator and denominator for each Xtal - - std::vector theNumerator(m_regions, 0.); - std::vector theDenominator(m_regions, 0.); - - std::cout << "Number of analyzed events = " << nentries << std::endl; - - - /// === Build Weight Distribution - - BuildWeightDistribution_ele(iLoop,nentries,useW,useZ,theScalibration,isR9selection); - - ///==== build E/p distribution ele 1 and 2 - - BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,isMCTruth); - - - Long64_t nbytes = 0, nb = 0; - - /// Loop on each entry - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - - float pIn, pSub, FdiEta; - - std::map map; - bool skipElectron=false; - - /// Tight electron information from W and Z, it depends on the flag variable isW, isZ - - if ( ele1_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - /// SCL energy containment correction - FdiEta = ele1_scE/ele1_scERaw; - - float thisE = 0; - int iseed = 0 ; - float E_seed = 0; - int seed_hashedIndex = 0; - float thisE3x3 = 0 ; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0 ) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - //if (ele1_recHit_flag->at(iRecHit) < 4) ///! SC Energy - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - - if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag->at(iRecHit)<4*/) - { - E_seed=ele1_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); //! Seed Infos - } - - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& - ele1_recHit_flag->at(iRecHit) < 4 */) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - pSub = 0.; //NOTALEO : test dummy - bool skipElectron = false; - - ///! if MCTruth Analysis - if(!isMCTruth) - { - pIn = ele1_tkP; - } - else{ - pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// Take the correct pdf for the ring in order to reweight the events in L3 - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); - - /// Basic selection on E/p or R9 if you want to apply - if ( fabs(thisE/pIn - 1) > 0.3 && isEPselection==true) skipElectron = true; - - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; - - if ( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; - if ( !skipElectron && BDTG_weightEB_W_1!=-99. && BDTG_weightEB_W_2!=-99. ) { - - double Maximum_h_WeigthEB_W_1 = h_WeigthEB_W_1->GetBinCenter(h_WeigthEB_W_1->GetMaximumBin()); - double Maximum_h_WeigthEB_W_2 = h_WeigthEB_W_2->GetBinCenter(h_WeigthEB_W_2->GetMaximumBin()); - - /// Now cycle on the all the recHits and update the numerator and denominator - for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - // if (ele1_recHit_flag->at(iRecHit) >= 4) continue ; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - float thisIC = 1.; - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { - h_Occupancy_hashedIndex -> Fill(thisIndex); - h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); - } - - /// use full statistics - if ( splitStat == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - - theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)* - exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - } - /// Use Half Statistic only even - else if ( splitStat == 1 && jentry%2 == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - - theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - } - - /// use odd event - else if ( splitStat == -1 && jentry%2 != 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - - theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - } - - } - - } - - - //Fill EoP - hC_EoP -> Fill(iLoop, thisE/pIn); - - } - - skipElectron = false; - - /// Ele2 medium from Z only Barrel - if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - FdiEta = ele2_scE/ele2_scERaw; - // Electron energy - float thisE = 0; - int iseed = 0 ; - float E_seed = 0; - int seed_hashedIndex = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - //if(ele2_recHit_flag->at(iRecHit) < 4) - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - - if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag->at(iRecHit) < 4*/){ - E_seed=ele2_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); /// Seed information - - } - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - // IC obtained from previous Loops - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& - ele2_recHit_flag->at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - - pSub = 0.; //NOTALEO : test dummy - - ///! Option for MCTruth analysis - if(!isMCTruth) pIn = ele2_tkP; - else{ - pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); - - /// discard electrons with bad E/P or R9 - if ( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; - if ( fabs(thisE/pIn - 1) > 0.3 && isEPselection==true) skipElectron = true; - ///R9 Selection - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)<=0.35) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.35 && fabs(ele2_scEta)<=0.7) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.7 && fabs(ele2_scEta)<=1.05 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>1.05) skipElectron = true; - - if ( !skipElectron && BDTG_weightEB_W_1!=-99. && BDTG_weightEB_W_2!=-99. ) { - - double Maximum_h_WeigthEB_W_1 = h_WeigthEB_W_1->GetBinCenter(h_WeigthEB_W_1->GetMaximumBin()); - double Maximum_h_WeigthEB_W_2 = h_WeigthEB_W_2->GetBinCenter(h_WeigthEB_W_2->GetMaximumBin()); - - /// Now cycle on the all the recHits and update the numerator and denominator - for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - // if (ele2_recHit_flag->at(iRecHit) >= 4) continue ; - - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - float thisIC = 1.; - - if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { - h_Occupancy_hashedIndex -> Fill(thisIndex); - h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); - } - - /// use full statistics - if ( splitStat == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - - theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - } - /// use evens - else if ( splitStat == 1 && jentry%2 == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - - theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - } - - /// use odds - else if ( splitStat == -1 && jentry%2 != 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - - theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*(thisIC/thisE)*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - - theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); - } - - } - - } - - //Fill EoP - hC_EoP -> Fill(iLoop, thisE/pIn); - - } - - } - ///! End Cycle on the events - - ///New Loop cycle + Save info - std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; - - TH1F auxiliary_IC("auxiliary_IC","auxiliary_IC",50,0.2,1.9); - - ///Fill the histo of IntercalibValues before the solve - for ( int iIndex = 0; iIndex < 61200; iIndex++ ){ - - if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ - - float thisIntercalibConstant = 1.; - /// Solve the cases where the recHit energy is always 0 (dead Xtal?) - bool isDeadXtal = false ; - - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); - if(isDeadXtal == true ) continue; - - - if ( theDenominator[iIndex] != 0. ) thisIntercalibConstant = theNumerator[iIndex]/theDenominator[iIndex]; - float oldIntercalibConstant = 1.; - if ( iLoop > 0 ) oldIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (iIndex+1); - - h_scale_EB_hashedIndex -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); /// IC product useful for L3 methods - hC_IntercalibValues -> Fill(iLoop, thisIntercalibConstant); /// IC distribution at each loop - hC_PullFromScalib -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); - hC_scale_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); ///IC Map - - ///Save the new IC coefficient - auxiliary_IC.Fill(thisIntercalibConstant); - - } - - } - /// Info in order to test convergence - g_ICmeanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetMean()); - g_ICmeanVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetMeanError()); - - g_ICrmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetRMS()); - g_ICrmsVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetRMSError()); - }/// end calibration loop - - - int myPhiIndex = 0; - - for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ - for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ - - ///Setup the histo for fit - TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",400, 0.2, 1.9); - TF1 f1("f1","gaus",0.2,1.9); - - int totIphi = 0; - float meanICforPhiRing = 0.; - - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - - - int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); - if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; - float thisIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); - h_scale_EB -> Fill(iphi, iabseta*theZside, thisIntercalibConstant); ///Fill with Last IC Value - - if (GetIetaFromHashedIndex(thisHashedIndex) == 85) h_IntercalibValues_test -> Fill (thisIntercalibConstant); - p_IntercalibValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisIntercalibConstant); - - histoAuxiliary . Fill (thisIntercalibConstant); - - ///Vectors - IetaValues.push_back(iabseta*theZside); - IphiValues.push_back(iphi); - ICValues.push_back(thisIntercalibConstant); - - meanICforPhiRing += thisIntercalibConstant; - totIphi++; - - } - - for ( int uu = 0; uu < totIphi; uu++ ) meanICforPhiRingValues.push_back(meanICforPhiRing/totIphi); - - /// Note this info are not used furhter because channels near to the dead ones are not skipped - - - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - - int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); - if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; - - h_scale_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, ICValues.at(myPhiIndex)/meanICforPhiRingValues.at(myPhiIndex)); - myPhiIndex++; /// Normalization IC with the mean of each ring - - } - - f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); - f1.SetRange(1-5*histoAuxiliary.GetRMS(), 1+5*histoAuxiliary.GetRMS()); - histoAuxiliary . Fit("f1","QR"); - - if ( f1.GetParError(2) > 0.5 ) continue; - h_IntercalibSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); - h_IntercalibSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); - - } - - } -} -/// Save infos in the output -void FastCalibratorEB_MVA::saveHistos(TFile * f1){ - - f1->cd(); - hC_IntercalibValues -> Write(*f1); - hC_PullFromScalib -> Write(*f1); - hC_EoP -> Write(*f1); - hC_scale_EB -> Write("",*f1); - h_scalib_EB -> Write(); - - h_IntercalibValues_test -> Write(); - h_Occupancy_hashedIndex -> Write(); - p_IntercalibValues_iEta -> Write(); - h_Init_IntercalibValues -> Write(); - - h_IntercalibSpread_iEta -> Write(); - h_scale_EB -> Write(); - h_scale_EB_meanOnPhi -> Write("h_scale_map"); - h_scale_EB_hashedIndex -> Write(); - - h_occupancy -> Write(); - - g_ICmeanVsLoop -> Write(); - g_ICrmsVsLoop -> Write(); - - h_map_Dead_Channels -> Write() ; - - - f1->Close(); - - return; -} - -/// Save E/P distribution -void FastCalibratorEB_MVA::saveEoPeta(TFile * f2){ - f2->cd(); - hC_EoP_eta_ele ->Write(*f2); - f2->Close(); -} - -///! Acquire fake dead channel list on order to evaluate the effected of IC near to them -void FastCalibratorEB_MVA::AcquireDeadXtal(TString inputDeadXtal){ - - if(inputDeadXtal!="NULL"){ - - std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); - - std::string buffer; - int iEta, iPhi ; - - while(!DeadXtal.eof()){ - - getline(DeadXtal,buffer); - std::stringstream line( buffer ); - line >> iEta >> iPhi ; - - if(iEta >=0) DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; - else DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; - - - } - - sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); - } - else DeadXtal_HashedIndex.push_back(-9999); - -} - -///! Check if the channel is dead or not -bool FastCalibratorEB_MVA::CheckDeadXtal(const int & iEta, const int & iPhi){ - int hashed_Index; - if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); - else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); - - std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); - - if(iter !=DeadXtal_HashedIndex.end()) - return true; - else return false; -} - diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc deleted file mode 100644 index e17fbc58663..00000000000 --- a/EOverPCalibration/FastCalibrator/src/FastCalibratorEE.cc +++ /dev/null @@ -1,1085 +0,0 @@ -#include "../interface/FastCalibratorEE.h" -#include "../interface/GetHashedIndexEE.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/// Default constructor -FastCalibratorEE::FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution): -outEPDistribution_p(outEPDistribution){ - -// if parameter tree is not specified (or zero), connect the file -// used to generate this class and read the Tree. - if (tree == 0) { - TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); - if (!f) { - f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); - } - tree = (TTree*)gDirectory->Get("ntu"); - - } - - // endcap geometry - eRings = new TEndcapRings(); - - /// Vector for ring normalization IC - SumIC_Ring_EEP.assign(40,0); - SumIC_Ring_EEM.assign(40,0); - Sumxtal_Ring_EEP.assign(40,0); - Sumxtal_Ring_EEM.assign(40,0); - - Init(tree); - - // Set my momentum scale using the input graphs - myMomentumScale = inputMomentumScale; - myTypeEE = typeEE; -} - -/// Deconstructor - -FastCalibratorEE::~FastCalibratorEE(){ - - if (!fChain) return; - delete fChain->GetCurrentFile(); -} - -/// Get Entry Method -Int_t FastCalibratorEE::GetEntry(Long64_t entry){ -// Read contents of entry. - if (!fChain) return 0; - return fChain->GetEntry(entry); -} - -/// Load Tree infos in a chain -Long64_t FastCalibratorEE::LoadTree(Long64_t entry){ - -// Set the environment to read one entry - if (!fChain) return -5; - Long64_t centry = fChain->LoadTree(entry); - if (centry < 0) return centry; - if (!fChain->InheritsFrom(TChain::Class())) return centry; - TChain *chain = (TChain*)fChain; - if (chain->GetTreeNumber() != fCurrent) { - fCurrent = chain->GetTreeNumber(); - } - return centry; -} - -///Fill the miscalib map -void FastCalibratorEE::FillScalibMap(TString miscalibMap){ - - std::ifstream scalibFile; - scalibFile.open(miscalibMap.Data()); - - if (!scalibFile) { - std::cout<<"miscalib map missing!!!"<> etaRing >> scalibValue; - scalibMap.insert(std::pair(etaRing,scalibValue)); - } - scalibFile.close(); -} - - -/// Intialize pointers -void FastCalibratorEE::Init(TTree *tree){ - - /// Set object pointer - - energyRecHitSCEle1 = 0; - XRecHitSCEle1 = 0; - YRecHitSCEle1 = 0; - ZRecHitSCEle1 = 0; - recoFlagRecHitSCEle1 = 0; - - energyRecHitSCEle2 = 0; - XRecHitSCEle2 = 0; - YRecHitSCEle2 = 0; - ZRecHitSCEle2 = 0; - recoFlagRecHitSCEle2 = 0; - - /// Set branch addresses and branch pointers - - if (!tree) return; - fChain = tree; - fCurrent = -1; - fChain->SetMakeClass(1); - - fChain->SetBranchStatus("*", 0); - - fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); - fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); - fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); - fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); - - fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); - fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); - fChain->SetBranchStatus("PtEle", 1); fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); - fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); - fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); - fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); - fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); - fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); - fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); - fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); - fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); - fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); - fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); - fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); - fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); - - // ele1 - fChain->SetBranchStatus("energyRecHitSCEle1", 1); fChain->SetBranchAddress("energyRecHitSCEle1", &energyRecHitSCEle1, &b_energyRecHitSCEle1); - fChain->SetBranchStatus("XRecHitSCEle1", 1); fChain->SetBranchAddress("XRecHitSCEle1", &XRecHitSCEle1, &b_XRecHitSCEle1); - fChain->SetBranchStatus("YRecHitSCEle1", 1); fChain->SetBranchAddress("YRecHitSCEle1", &YRecHitSCEle1, &b_YRecHitSCEle1); - fChain->SetBranchStatus("ZRecHitSCEle1", 1); fChain->SetBranchAddress("ZRecHitSCEle1", &ZRecHitSCEle1, &b_ZRecHitSCEle1); - fChain->SetBranchStatus("recoFlagRecHitSCEle1", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle1", &recoFlagRecHitSCEle1, &b_recoFlagRecHitSCEle1); - - // ele2 - fChain->SetBranchStatus("energyRecHitSCEle2", 1); fChain->SetBranchAddress("energyRecHitSCEle2", &energyRecHitSCEle2, &b_energyRecHitSCEle2); - fChain->SetBranchStatus("XRecHitSCEle2", 1); fChain->SetBranchAddress("XRecHitSCEle2", &XRecHitSCEle2, &b_XRecHitSCEle2); - fChain->SetBranchStatus("YRecHitSCEle2", 1); fChain->SetBranchAddress("YRecHitSCEle2", &YRecHitSCEle2, &b_YRecHitSCEle2); - fChain->SetBranchStatus("ZRecHitSCEle2", 1); fChain->SetBranchAddress("ZRecHitSCEle2", &ZRecHitSCEle2, &b_ZRecHitSCEle2); - fChain->SetBranchStatus("recoFlagRecHitSCEle2", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle2", &recoFlagRecHitSCEle2, &b_recoFlagRecHitSCEle2); - -} - - -//! Declaration of the objects that are save in the output file - -void FastCalibratorEE::bookHistos(int nLoops){ - - ///service histos - h_scale_hashedIndex_EE = new TH1F ("h_scale_hashedIndex_EE","h_scale_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); - h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); - hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); - - ///EE+ - - hC_IntercalibValues_EEP = new hChain ("IntercalibValues_EEP", "IntercalibValues_EEP", 400,0.2,1.9, nLoops); - hC_PullFromScalib_EEP = new hChain ("hC_PullFromScalib_EEP", "hC_PullFromScalib_EEP", 2000,-0.5,0.5, nLoops); - hC_scale_EEP = new h2Chain("hC_scale_EEP", "hC_scale_EEP", 100,1, 101, 100, 1, 101, nLoops ); - - h_scale_EEP = new TH2F("h_scale_EEP", "h_scale_EEP", 100,1, 101, 100, 1, 101 ); - h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); - h_scalib_EEP = new TH2F("h_scalib_EEP", "h_scalib_EEP", 100,1, 101, 100, 1, 101); - h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); - h_scale_meanOnring_EEP = new TH2F ("h_scale_meanOnring_EEP", "h_scale_meanOnring_EEP", 100,1, 101, 100, 1, 101); - - g_ICmeanVsLoop_EEP = new TGraphErrors(); - g_ICmeanVsLoop_EEP -> SetName("g_ICmeanVsLoop_EEP"); - g_ICmeanVsLoop_EEP -> SetTitle("g_ICmeanVsLoop_EEP"); - - g_ICrmsVsLoop_EEP = new TGraphErrors(); - g_ICrmsVsLoop_EEP -> SetName("g_ICrmsVsLoop_EEP"); - g_ICrmsVsLoop_EEP -> SetTitle("g_ICrmsVsLoop_EEP"); - - - - ///EE- - hC_IntercalibValues_EEM = new hChain ("IntercalibValues_EEM", "IntercalibValues_EEM", 400,0.2,1.9, nLoops); - hC_PullFromScalib_EEM = new hChain ("hC_PullFromScalib_EEM", "hC_PullFromScalib_EEM", 2000,-0.5,0.5, nLoops); - hC_scale_EEM = new h2Chain("hC_scale_EEM", "hC_scale_EEM", 100,1, 101, 100, 1, 101, nLoops ); - - h_scale_EEM = new TH2F("h_scale_EEM", "h_scale_EEM", 100,1, 101, 100, 1, 101 ); - h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); - h_scalib_EEM = new TH2F("h_scalib_EEM", "h_scalib_EEM", 100,1, 101, 100, 1, 101); - h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); - h_scale_meanOnring_EEM = new TH2F ("h_scale_meanOnring_EEM", "h_scale_meanOnring_EEM", 100,1, 101, 100, 1, 101); - - g_ICmeanVsLoop_EEM = new TGraphErrors(); - g_ICmeanVsLoop_EEM -> SetName("g_ICmeanVsLoop_EEM"); - g_ICmeanVsLoop_EEM -> SetTitle("g_ICmeanVsLoop_EEM"); - - g_ICrmsVsLoop_EEM = new TGraphErrors(); - g_ICrmsVsLoop_EEM -> SetName("g_ICrmsVsLoop_EEM"); - g_ICrmsVsLoop_EEM -> SetTitle("g_ICrmsVsLoop_EEM"); - - - return; -} - - - -///===== Build E/p for electron 1 and 2 - -void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, bool isMCTruth){ - - if(iLoop ==0){ - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); - } - else{ - hC_EoP_ir_ele -> Reset(); - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); - } - - Long64_t nbytes = 0, nb = 0; - /// Loop on ntu entries - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - // std::cerr<<"building E/p distribution ----> "< "<size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1 -> at(iRecHit) < 4 ){ - seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - iseed=iRecHit; - E_seed=energyRecHitSCEle1 -> at(iRecHit); ///Seed infos - - } - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - //if(recoFlagRecHitSCEle1 -> at(iRecHit) < 4) - thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; /// SC energy - - } - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && - fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && - recoFlagRecHitSCEle1 -> at(iRecHit) < 4) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; - } - - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring - - bool skipElectron = false; - - /// Option for MCTruth analysis - if(!isMCTruth){ - pIn = pAtVtxGsfEle[0]; - int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); - } - else{ - pIn = energyMCEle[0]; - ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9, fbrem selection before E/p distribution - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[0]) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[0]) > 1.75 && fabs(etaSCEle[0]) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[0]) > 2.00 && fabs(etaSCEle[0]) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[0]) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron =true; - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron =true; - - // std::cout< Fill(ir_seed,thisE/(pIn-esEnergySCEle[0])); - } - - ///=== Second medium electron from Z only Endcaps - if ( isEBEle[1] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ - - FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); - - float thisE = 0; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - - if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2 -> at(iRecHit) < 4 ){ - seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - iseed=iRecHit; - E_seed=energyRecHitSCEle2 -> at(iRecHit); - - } - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(recoFlagRecHitSCEle2 -> at(iRecHit) < 4) /// Only Good channels - thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - - } - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - // IC obtained from previous Loops - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && - fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && - recoFlagRecHitSCEle2 -> at(iRecHit) < 4) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - } - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring - - bool skipElectron = false; - /// Option for MCTruth Analysis - if(!isMCTruth){ - pIn = pAtVtxGsfEle[1]; - int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); - } - else{ - pIn = energyMCEle[1]; - ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - /// R9 and fbrem selection - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[1]) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[1]) > 1.75 && fabs(etaSCEle[1]) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[1]) > 2.00 && fabs(etaSCEle[1]) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[1]) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron =true; - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron =true; - - if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-esEnergySCEle[1])); - } - - - } - - /// Normalization E/p distribution - for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); - - /// Save E/p distributions - if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { - TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); - saveEoPeta(f2); - } - -} - - -/// L3 Loop method ----> Calibration Loop function -void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, - bool isEPselection, bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, - bool isMCTruth, std::map > > jsonMap, float miscalibMethod, TString miscalibMap){ - - if (fChain == 0) return; - - if(isMiscalib == true) { - std::cout<<"method used for the scalibration (1=from map, 0=linear): "< theScalibration(m_regions*2, 0.); - TRandom3 genRand; - for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ - - bool isDeadXtal = false ; - /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); - if(isDeadXtal == true ) { - theScalibration[iIndex]=0; - - if(GetZsideFromHashedIndex(iIndex)>0) - h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); - else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); - } - else{ - if(isMiscalib == true) { - int etaRing = eRings->GetEndcapRing(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); - if (miscalibMethod == 1) { //miscalibration with a gaussian spread (eta-dependent) - theScalibration[iIndex] = scalibMap.at(etaRing); //take the values from the map filled before - } - else - theScalibration[iIndex] = 1 + 0.015*etaRing/33.; //linear eta-dependent scalibration - // theScalibration[iIndex] = genRand.Gaus(1.,0.001); - } - - // if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); /// Miscalibration fixed at 5% - if(isMiscalib == false) theScalibration[iIndex] = 1.; - if(GetZsideFromHashedIndex(iIndex)>0) - h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- - else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); - - } - } - - - /// ----------------- Calibration Loops -----------------------------// - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - std::cout << "Starting iteration " << iLoop + 1 << std::endl; - /// L3 numerator and denominator for EE+ and EE- - std::vector theNumerator_EEP(m_regions*2+1, 0.); - std::vector theDenominator_EEP(m_regions*2+1, 0.); - std::vector theNumerator_EEM(m_regions+1, 0.); - std::vector theDenominator_EEM(m_regions+1, 0.); - - ///==== build E/p distribution ele 1 and 2 - BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isfbrem,fbremMax,isPtCut,PtMin,isMCTruth); - - // define map with events - std::map >,int> eventsMap; - - /// Loop over events - std::cout << "Number of analyzed events = " << nentries << std::endl; - - Long64_t nbytes = 0, nb = 0; - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - - - //********************************* - // JSON FILE AND DUPLIACTES IN DATA - - bool skipEvent = false; - if( isMCTruth == 0 ){ - - if(AcceptEventByRunAndLumiSection(runNumber,lumiBlock,jsonMap) == false) skipEvent = true; - - std::pair eventLSandID(lumiBlock,eventNumber); - std::pair > eventRUNandLSandID(runNumber,eventLSandID); - if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; - else eventsMap[eventRUNandLSandID] = 1; - } - - if( skipEvent == true ) continue; - - float pIn, FdiEta; - - std::map map; - bool skipElectron=false; - - /// Only tight electron from W and Z, only Endcap - - if ( isEBEle[0] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - /// SCL energy containment correction - FdiEta = energySCEle[0]/(rawEnergySCEle[0]+esEnergySCEle[0]); - - float thisE = 0; - float thisE3x3 =0 ; - int iseed = 0 ; - int seed_hashedIndex = 0 ; - float E_seed = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(recoFlagRecHitSCEle1 -> at(iRecHit) < 4) /// Skip bad channel - thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; - - if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1 -> at(iRecHit) < 4 ){ - E_seed=energyRecHitSCEle1 -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); /// Seed infos - } - - } - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && - fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && - recoFlagRecHitSCEle1 -> at(iRecHit) < 4) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; - - } - - /// find the zside - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(GetHashedIndexEE(XRecHitSCEle1->at(iseed), YRecHitSCEle1->at(iseed), ZRecHitSCEle1->at(iseed))) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); - - /// MCTruth option - if(!isMCTruth) { - pIn = pAtVtxGsfEle[0]; - int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); - } - else{ - pIn = energyMCEle[0]; - ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - - TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); - - if ( fabs(thisE/(pAtVtxGsfEle[0]-esEnergySCEle[0]) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure - - /// R9 and fbrem selection - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[0]) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[0]) > 1.75 && fabs(etaSCEle[0]) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[0]) > 2.00 && fabs(etaSCEle[0]) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[0]) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron =true; - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron =true; - - if( thisE/(pIn-esEnergySCEle[0]) < EoPHisto->GetXaxis()->GetXmin() || - thisE/(pIn-esEnergySCEle[0]) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; - - if( !skipElectron ){ - for( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++){ - if(recoFlagRecHitSCEle1 -> at(iRecHit) >= 4) continue; - - int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); - float thisIC = 1.; - - if( iLoop > 0 ) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if( iLoop == 0 ){ - h_occupancy_hashedIndex_EE -> Fill(thisIndex); - if ( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - } - - ///Use full statistic - if( splitStat == 0 ){ - if(thisCaliBlock == 0){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if( thisCaliBlock == 1 ){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - - /// use evens - if( splitStat == 1 && jentry%2 == 0 ){ - if( thisCaliBlock == 0 ){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if(thisCaliBlock == 1){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - /// use odd - if( splitStat == -1 && jentry%2 != 0 ){ - if(thisCaliBlock == 0){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if(thisCaliBlock == 1){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - } - } - - ///Fill EoP - if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-esEnergySCEle[0])); - } - - skipElectron = false; - - - /// Medium ele from Z only Endcap - if( isEBEle[1] == 0 && ( useZ == 1 && isZ == 1 ) ){ - /// SCL energy containment correction - FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); - - float thisE = 0; - float thisE3x3 =0 ; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for(unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ){ - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if( recoFlagRecHitSCEle2 -> at(iRecHit) < 4 ) - thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - - if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2 -> at(iRecHit) < 4){ - E_seed=energyRecHitSCEle2 -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - } - } - - for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) - { - float thisIC = 1.; - int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && - fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && - recoFlagRecHitSCEle2 -> at(iRecHit) < 4) - thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; - } - - /// find the zside - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(GetHashedIndexEE(XRecHitSCEle2->at(iseed), YRecHitSCEle2->at(iseed), ZRecHitSCEle2->at(iseed))) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); - - /// Option for MCTruth Analysis - if(!isMCTruth) { - pIn = pAtVtxGsfEle[1]; - int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); - } - else{ - pIn = energyMCEle[1]; - ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; - if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele - } - - TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure - - /// E/p and R9 selections - if ( fabs(thisE/(pIn-esEnergySCEle[1]) - 1) > 0.7 && isEPselection==true) skipElectron = true; - - /// R9 and fbrem selection - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[1]) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[1]) > 1.75 && fabs(etaSCEle[1]) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[1]) > 2.00 && fabs(etaSCEle[1]) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[1]) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron =true; - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron =true; - - - if( thisE/(pIn-esEnergySCEle[1]) < EoPHisto->GetXaxis()->GetXmin() || - thisE/(pIn-esEnergySCEle[1]) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; - - if( !skipElectron ){ - for( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ){ - if(recoFlagRecHitSCEle2 -> at(iRecHit) >= 4) continue; - - int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); - float thisIC = 1.; - - if(iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ){ - h_occupancy_hashedIndex_EE -> Fill(thisIndex); - if( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - } - - /// Use full statistic - if( splitStat == 0){ - if(thisCaliBlock == 0){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if( thisCaliBlock == 1 ){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - - /// use evens - if( splitStat == 1 && jentry%2 == 0 ){ - if( thisCaliBlock == 0 ){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if( thisCaliBlock == 1 ){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - /// use odd - if( splitStat == -1 && jentry%2 != 0 ){ - if(thisCaliBlock == 0){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin);} - - if( thisCaliBlock == 1 ){ - int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - } - } - - //Fill EoP - if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-esEnergySCEle[1])); - } - } /// End Cycle on the events - - std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; - - TH1F auxiliary_IC_EEM("auxiliary_IC_EEM","auxiliary_IC_EEM",50,0.2,1.9); - TH1F auxiliary_IC_EEP("auxiliary_IC_EEP","auxiliary_IC_EEP",50,0.2,1.9); - - ///Fill the histo of IntercalibValues before the solve - for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ - int thisCaliBlock = -1; - if( GetZsideFromHashedIndex(iIndex) < 0 ) thisCaliBlock = 0; - else thisCaliBlock = 1; - - float thisIntercalibConstant = 1.; - - if( thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0. ) thisIntercalibConstant = theNumerator_EEM[iIndex] / theDenominator_EEM[iIndex]; - if( thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0. ) thisIntercalibConstant = theNumerator_EEP[iIndex] / theDenominator_EEP[iIndex]; - - float oldIntercalibConstant = 1.; - if( iLoop > 0 ) oldIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); - h_scale_hashedIndex_EE -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); - - if( thisCaliBlock == 0 ){ - hC_IntercalibValues_EEM -> Fill (iLoop, thisIntercalibConstant); - hC_PullFromScalib_EEM -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); - hC_scale_EEM -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); - - auxiliary_IC_EEM.Fill(thisIntercalibConstant); - } - if( thisCaliBlock == 1){ - hC_IntercalibValues_EEP -> Fill (iLoop, thisIntercalibConstant); - hC_PullFromScalib_EEP -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); - hC_scale_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); - - auxiliary_IC_EEP.Fill(thisIntercalibConstant); - } - } - } - - g_ICmeanVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM.GetMean()); - g_ICmeanVsLoop_EEM -> SetPointError(iLoop, 0.,auxiliary_IC_EEM.GetMeanError()); - - g_ICrmsVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM . GetRMS()); - g_ICrmsVsLoop_EEM -> SetPointError(iLoop, 0., auxiliary_IC_EEM . GetRMSError()); - - g_ICmeanVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetMean()); - g_ICmeanVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetMeanError()); - - g_ICrmsVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetRMS()); - g_ICrmsVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetRMSError()); - - } /// End of Calibration Loops - - - - ///Fill the histo of IntercalibValues after the loops at last step - for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int thisIx = GetIxFromHashedIndex(iIndex); - int thisIy = GetIyFromHashedIndex(iIndex); - int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal - - float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value - if ( thisCaliBlock == 0 ) h_scale_EEM -> Fill (thisIx, thisIy, thisIntercalibConstant); - else h_scale_EEP -> Fill (thisIx, thisIy, thisIntercalibConstant); - - if( thisCaliBlock == 0 ) - { - ///Vectors for IC Normalization - IxValues_EEM.push_back(thisIx); - IyValues_EEM.push_back(thisIy); - ICValues_EEM.push_back(thisIntercalibConstant); - } - else - { - IxValues_EEP.push_back(thisIx); - IyValues_EEP.push_back(thisIy); - ICValues_EEP.push_back(thisIntercalibConstant); - } - - int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to - if(thisIz >0) - { - SumIC_Ring_EEP.at(thisIr) = SumIC_Ring_EEP.at(thisIr) + thisIntercalibConstant; - Sumxtal_Ring_EEP.at(thisIr) = Sumxtal_Ring_EEP.at(thisIr) + 1; - } - else - { - SumIC_Ring_EEM.at(thisIr) = SumIC_Ring_EEM.at(thisIr) + thisIntercalibConstant; - Sumxtal_Ring_EEM.at(thisIr) = Sumxtal_Ring_EEM.at(thisIr) + 1; - } - } - } - - /// IC Normaliztion trough the mean value of each ring - for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ) - { - if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ) - { - // int thisCaliBlock = -1; - // if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; - // else thisCaliBlock = 1; - - int thisIx = GetIxFromHashedIndex(iIndex); - int thisIy = GetIyFromHashedIndex(iIndex); - int thisIz = GetZsideFromHashedIndex(iIndex); - - int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); - - float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); - - if( thisIz > 0 ) - { - if(Sumxtal_Ring_EEP.at(thisIr) != 0 && SumIC_Ring_EEP.at(thisIr)!= 0) - h_scale_meanOnring_EEP->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEP.at(thisIr)/Sumxtal_Ring_EEP.at(thisIr))); - } - else - { - if(Sumxtal_Ring_EEM.at(thisIr) != 0 && SumIC_Ring_EEM.at(thisIr) != 0) - h_scale_meanOnring_EEM->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEM.at(thisIr)/Sumxtal_Ring_EEM.at(thisIr))); - } - } - } - -} - -/// Save in the output -void FastCalibratorEE::saveHistos(TFile * f1) -{ - - f1->cd(); - - /// EE+ - hC_IntercalibValues_EEP-> Write(*f1); - hC_PullFromScalib_EEP->Write(*f1); - hC_EoP->Write(*f1); - hC_scale_EEP->Write("",*f1); - - h_occupancy_EEP->Write(); - h_scale_EEP->Write(); - h_scalib_EEP->Write(); - - h_scale_hashedIndex_EE->Write(); - h_occupancy_hashedIndex_EE->Write(); - h_map_Dead_Channels_EEP->Write(); - - g_ICmeanVsLoop_EEP->Write(); - g_ICrmsVsLoop_EEP->Write(); - h_scale_meanOnring_EEP->Write("h_scale_map_EEP"); - h_map_Dead_Channels_EEP->Write(); - - - /// EE- - hC_IntercalibValues_EEM-> Write(*f1); - hC_scale_EEM->Write("",*f1); - hC_PullFromScalib_EEM->Write(*f1); - h_occupancy_EEM->Write(); - h_scale_EEM->Write(); - h_scalib_EEM->Write(); - - g_ICmeanVsLoop_EEM->Write(); - g_ICrmsVsLoop_EEM->Write(); - h_scale_meanOnring_EEM->Write("h_scale_map_EEM"); - h_map_Dead_Channels_EEM->Write(); - - - f1->Close(); - - return; -} - -/// Save E/p distributions -void FastCalibratorEE::saveEoPeta(TFile * f2) -{ - f2->cd(); - hC_EoP_ir_ele ->Write(*f2); - f2->Close(); -} - -/// Acquire fake Dead Xtal in order to study the effect of IC near them -void FastCalibratorEE::AcquireDeadXtal(TString inputDeadXtal, const bool & isDeadTriggerTower){ - - if(inputDeadXtal!="NULL"){ - - std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); - - std::string buffer; - int iX, iY ,iZ; - - while(!DeadXtal.eof()){ - - getline(DeadXtal,buffer); - std::stringstream line( buffer ); - line >> iX >> iY >>iZ ; - - DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; - if(isDeadTriggerTower){ - - for (int ix = -2 ; ix <=2 ; ix++){ - for (int iy = -2 ; iy <=2 ; iy++){ - if(ix==0 && iy==0) continue ; - DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX+ix,iY+iy,iZ)) ; - } - } - } - } - - sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); - } - else DeadXtal_HashedIndex.push_back(-9999); - - -} -/// Check if the channel considered is in the list of dead or not -bool FastCalibratorEE::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ - - int hashed_Index; - hashed_Index = GetHashedIndexEE(iX,iY,iZ); - - std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); - - if(iter !=DeadXtal_HashedIndex.end()) - return true; - else return false; -} - diff --git a/EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc b/EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc deleted file mode 100644 index 238f92a2ebe..00000000000 --- a/EOverPCalibration/FastCalibrator/src/FastCalibratorEE_MVA.cc +++ /dev/null @@ -1,1149 +0,0 @@ -#include "../interface/FastCalibratorEE_MVA.h" -#include "../interface/GetHashedIndexEE.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/// Default constructor -FastCalibratorEE_MVA::FastCalibratorEE_MVA(TTree *tree,TString outEPDistribution): -outEPDistribution_p(outEPDistribution){ -// if parameter tree is not specified (or zero), connect the file -// used to generate this class and read the Tree. - if (tree == 0) { - TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); - if (!f) { - f = new TFile("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); - } - - tree = (TTree*)gDirectory->Get("ntu"); - } - - // endcap geometry - eRings = new TEndcapRings(); - - /// Vector for ring normalization IC - SumIC_Ring_EEP.assign(40,0); - SumIC_Ring_EEM.assign(40,0); - Sumxtal_Ring_EEP.assign(40,0); - Sumxtal_Ring_EEM.assign(40,0); - - Init(tree); -} - -/// Deconstructor - -FastCalibratorEE_MVA::~FastCalibratorEE_MVA(){ - - if (!fChain) return; - delete fChain->GetCurrentFile(); -} - -/// Get Entry Method -Int_t FastCalibratorEE_MVA::GetEntry(Long64_t entry){ - -// Read contents of entry. - if (!fChain) return 0; - return fChain->GetEntry(entry); - -} - -/// Load Tree infos in a chain -Long64_t FastCalibratorEE_MVA::LoadTree(Long64_t entry){ - -// Set the environment to read one entry - if (!fChain) return -5; - Long64_t centry = fChain->LoadTree(entry); - if (centry < 0) return centry; - if (!fChain->InheritsFrom(TChain::Class())) return centry; - TChain *chain = (TChain*)fChain; - if (chain->GetTreeNumber() != fCurrent) { - fCurrent = chain->GetTreeNumber(); - Notify(); - } - return centry; -} - -/// Intialize pointers -void FastCalibratorEE_MVA::Init(TTree *tree){ - - /// Set object pointer - ele1_recHit_E = 0; - ele1_recHit_hashedIndex = 0; - ele1_recHit_iphiORiy = 0; - ele1_recHit_ietaORix =0 ; - ele1_recHit_flag =0 ; - - ele2_recHit_E = 0; - ele2_recHit_hashedIndex = 0; - ele2_recHit_iphiORiy = 0; - ele2_recHit_ietaORix = 0; - ele2_recHit_flag =0 ; - - /// Set branch addresses and branch pointers - - if (!tree) return; - fChain = tree; - fCurrent = -1; - fChain->SetMakeClass(1); - - fChain->SetBranchAddress("runId", &runId, &b_runId); - fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); - fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchAddress("isZ", &isZ, &b_isZ); - - fChain->SetBranchAddress("BDTG_weightEE_W_1", &BDTG_weightEE_W_1, &b_BDTG_weightEE_W_1); - fChain->SetBranchAddress("BDTG_weightEE_W_2", &BDTG_weightEE_W_2, &b_BDTG_weightEE_W_2); -// fChain->SetBranchAddress("BDTG_weightEE_Z_1", &BDTG_weightEE_Z_1, &b_BDTG_weightEE_Z_1); -// fChain->SetBranchAddress("BDTG_weightEE_Z_2", &BDTG_weightEE_Z_2, &b_BDTG_weightEE_Z_2); - - - fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); - fChain->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex, &b_ele1_recHit_hashedIndex); - fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); - fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); -// fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); - - fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); - fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); - fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); - fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); - fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); - fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); - fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); - fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); - fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); - fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); -// fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); -// fChain->SetBranchAddress("ele1_DR ", &ele1_DR , &b_ele1_DR); - fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); - fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); - - fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); - fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); - fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); - fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); - - fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); - fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); - fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); - fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); -// fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); - - fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); - fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); - fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); - fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); - fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); - fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); - fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); - fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); - fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); -// fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); -// fChain->SetBranchAddress("ele2_DR ", &ele2_DR , &b_ele2_DR); - fChain->SetBranchAddress("ele2_scERaw_PUcleaned", &ele2_scERaw_PUcleaned, &b_ele2_scERaw_PUcleaned); - fChain->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression, &b_ele2_scE_regression); - - fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); - fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); - fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); - fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); - fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); - Notify(); -} - -Bool_t FastCalibratorEE_MVA::Notify(){ - // The Notify() function is called when a new file is opened. This - // can be either for a new TTree in a TChain or when when a new TTree - // is started when using PROOF. It is normally not necessary to make changes - // to the generated code, but the routine can be extended by the - // user if needed. The return value is currently not used. - - return kTRUE; -} - -void FastCalibratorEE_MVA::Show(Long64_t entry){ -/// Print contents of entry. -/// If entry is not specified, print current entry - if (!fChain) return; - fChain->Show(entry); -} - -Int_t FastCalibratorEE_MVA::Cut(Long64_t entry){ -// This function may be called from Loop. -// returns 1 if entry is accepted. -// returns -1 otherwise. - return 1; -} - -//! Declaration of the objects that are save in the output file - -void FastCalibratorEE_MVA::bookHistos(int nLoops) -{ - - ///service histos - h_scale_hashedIndex_EE = new TH1F ("h_scale_hashedIndex_EE","h_scale_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); - h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); - hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); - - h_WeightEE_W_1 = new TH1F ("h_WeightEE_W_1","h_WeightEE_W_1",500,0.,1.5); - - h_WeightEE_W_2 = new TH1F ("h_WeightEE_W_2","h_WeightEE_W_2",500,0.,1.5); - - ///EE+ - - hC_IntercalibValues_EEP = new hChain ("IntercalibValues_EEP", "IntercalibValues_EEP", 400,0.2,1.9, nLoops); - hC_PullFromScalib_EEP = new hChain ("hC_PullFromScalib_EEP", "hC_PullFromScalib_EEP", 2000,-0.5,0.5, nLoops); - hC_scale_EEP = new h2Chain("hC_scale_EEP", "hC_scale_EEP", 100,1, 101, 100, 1, 101, nLoops ); - - h_scale_EEP = new TH2F("h_scale_EEP", "h_scale_EEP", 100,1, 101, 100, 1, 101 ); - h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); - h_scalib_EEP = new TH2F("h_scalib_EEP", "h_scalib_EEP", 100,1, 101, 100, 1, 101); - h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); - h_scale_meanOnring_EEP = new TH2F ("h_scale_meanOnring_EEP", "h_scale_meanOnring_EEP", 100,1, 101, 100, 1, 101); - - g_ICmeanVsLoop_EEP = new TGraphErrors(); - g_ICmeanVsLoop_EEP -> SetName("g_ICmeanVsLoop_EEP"); - g_ICmeanVsLoop_EEP -> SetTitle("g_ICmeanVsLoop_EEP"); - - g_ICrmsVsLoop_EEP = new TGraphErrors(); - g_ICrmsVsLoop_EEP -> SetName("g_ICrmsVsLoop_EEP"); - g_ICrmsVsLoop_EEP -> SetTitle("g_ICrmsVsLoop_EEP"); - - - - ///EE- - hC_IntercalibValues_EEM = new hChain ("IntercalibValues_EEM", "IntercalibValues_EEM", 400,0.2,1.9, nLoops); - hC_PullFromScalib_EEM = new hChain ("hC_PullFromScalib_EEM", "hC_PullFromScalib_EEM", 2000,-0.5,0.5, nLoops); - hC_scale_EEM = new h2Chain("hC_scale_EEM", "hC_scale_EEM", 100,1, 101, 100, 1, 101, nLoops ); - - h_scale_EEM = new TH2F("h_scale_EEM", "h_scale_EEM", 100,1, 101, 100, 1, 101 ); - h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); - h_scalib_EEM = new TH2F("h_scalib_EEM", "h_scalib_EEM", 100,1, 101, 100, 1, 101); - h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); - h_scale_meanOnring_EEM = new TH2F ("h_scale_meanOnring_EEM", "h_scale_meanOnring_EEM", 100,1, 101, 100, 1, 101); - - g_ICmeanVsLoop_EEM = new TGraphErrors(); - g_ICmeanVsLoop_EEM -> SetName("g_ICmeanVsLoop_EEM"); - g_ICmeanVsLoop_EEM -> SetTitle("g_ICmeanVsLoop_EEM"); - - g_ICrmsVsLoop_EEM = new TGraphErrors(); - g_ICrmsVsLoop_EEM -> SetName("g_ICrmsVsLoop_EEM"); - g_ICrmsVsLoop_EEM -> SetTitle("g_ICrmsVsLoop_EEM"); - - - return; -} - -/// ===== Build Weight MVA distribution -void FastCalibratorEE_MVA::BuildWeightDistribution_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isR9selection,bool isfbrem){ - -if(iLoop ==0){ - - Long64_t nbytes = 0, nb = 0; - - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - if (!(jentry%1000000))std::cerr<<"building Weight distribution ----> "<size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4 */){ - iseed=iRecHit; - E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos - - } - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - -// if(ele1_recHit_flag -> at(iRecHit) < 4) - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; /// SC energy - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& - ele1_recHit_flag -> at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - bool skipElectron = false; - - /// R9, fbrem selection before E/p distribution - if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; - if(fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; - - if(!skipElectron){ h_WeightEE_W_1->Fill(BDTG_weightEE_W_1); - h_WeightEE_W_2->Fill(BDTG_weightEE_W_2); - } - } - } - } - else return; - -} - - -///===== Build E/p for electron 1 and 2 - -void FastCalibratorEE_MVA::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration,bool isSaveEPDistribution, bool isR9selection, bool isMCTruth,bool isfbrem){ - - if(iLoop ==0) { - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); - } - else{ - hC_EoP_ir_ele -> Reset(); - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); - } - - Long64_t nbytes = 0, nb = 0; - - /// Loop on ntu entries - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4 */){ - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos - - } - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - -// if(ele1_recHit_flag -> at(iRecHit) < 4) - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; /// SC energy - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& - ele1_recHit_flag -> at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring - - bool skipElectron = false; - - /// Option for MCTruth analysis - if(!isMCTruth) pIn = ele1_tkP; - else{ pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9, fbrem selection before E/p distribution - if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; - - if(fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; - if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele1_es)); - - - } - ///=== Second medium electron from Z only Endcaps - if ( ele2_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ - - FdiEta = ele2_scE/(ele2_scERaw+ele2_es); - - float thisE = 0; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag -> at(iRecHit) < 4*/){ - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele2_recHit_E -> at(iRecHit); - - } - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - //if(ele2_recHit_flag -> at(iRecHit) < 4) /// Only Good channels - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - // IC obtained from previous Loops - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& - ele2_recHit_flag -> at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - } - - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring - - - bool skipElectron = false; - /// Option for MCTruth Analysis - if(!isMCTruth) pIn = ele2_tkP; - else{ pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9 and fbrem selection - if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta)<=1.75) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta)>1.75 && fabs(ele2_scEta)<=2.0) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta)>2.0 && fabs(ele2_scEta)<=2.15 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>2.15) skipElectron = true; - - if ( fabs(ele2_fbrem)>0.4 && isfbrem==true) skipElectron =true; - if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele2_es)); - - } - } - - /// Normalization E/p distribution - for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); - - - /// Save E/p distributions - if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { - TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); - saveEoPeta(f2); - } - -} - -/// L3 Loop method ----> Calibration Loop function -void FastCalibratorEE_MVA::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, - bool isEPselection,bool isR9selection,bool isMCTruth,bool isfbrem){ - - if (fChain == 0) return; - - /// Define the number of crystal you want to calibrate - int m_regions = kEEhalf; - - std::cout << "m_regions " << m_regions << std::endl; - - /// build up scalibration map - std::vector theScalibration(m_regions*2, 0.); - TRandom genRand; - for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ - - bool isDeadXtal = false ; - /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); - if(isDeadXtal == true ) { - theScalibration[iIndex]=0; - - if(GetZsideFromHashedIndex(iIndex)>0) - h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); - else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); - } - else{ - - if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); /// Miscalibration fixed at 5% - if(isMiscalib == false) theScalibration[iIndex] = 1.; - if(GetZsideFromHashedIndex(iIndex)>0) - h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- - else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); - - } - } - - - /// ----------------- Calibration Loops -----------------------------// - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - std::cout << "Starting iteration " << iLoop + 1 << std::endl; - /// L3 numerator and denominator for EE+ and EE- - std::vector theNumerator_EEP(m_regions*2+1, 0.); - std::vector theDenominator_EEP(m_regions*2+1, 0.); - std::vector theNumerator_EEM(m_regions+1, 0.); - std::vector theDenominator_EEM(m_regions+1, 0.); - - - std::cout << "Number of analyzed events = " << nentries << std::endl; - - /// === Build Weight Distribution - - BuildWeightDistribution_ele(iLoop,nentries,useW,useZ,theScalibration,isR9selection,isfbrem); - - ///==== build E/p distribution ele 1 and 2 - - BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,isMCTruth,isfbrem); - - - Long64_t nbytes = 0, nb = 0; - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - - float pIn, pSub, FdiEta; - - std::map map; - bool skipElectron=false; - - /// Only tight electron from W and Z, only Endcap - - if ( ele1_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - /// SCL energy containment correction - FdiEta = ele1_scE/(ele1_scERaw+ele1_es); - - float thisE = 0; - float thisE3x3 =0 ; - int iseed = 0 ; - int seed_hashedIndex = 0 ; - float E_seed = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - // if(ele1_recHit_flag -> at(iRecHit) < 4) /// Skip bad channel - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4*/ ){ - E_seed=ele1_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); /// Seed infos - - } - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& - ele1_recHit_flag -> at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - } - - pSub = 0.; //NOTALEO : test dummy - - /// MCTruth option - if(!isMCTruth) pIn = ele1_tkP; - else{ - pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// find the zside - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(ele1_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); - - TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); - - if ( fabs(thisE/(ele1_tkP-ele1_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure - - /// R9 and fbrem selection - if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; - - if ( fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; - if ( thisE/(pIn-ele1_es) < EoPHisto->GetXaxis()->GetXmin() || thisE/(pIn-ele1_es) > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; - - if(!skipElectron && BDTG_weightEE_W_1!=-99. && BDTG_weightEE_W_2!=-99.){ - - double Maximum_h_WeightEE_W_1 = h_WeightEE_W_1->GetBinCenter(h_WeightEE_W_1->GetMaximumBin()); - double Maximum_h_WeightEE_W_2 = h_WeightEE_W_2->GetBinCenter(h_WeightEE_W_2->GetMaximumBin()); - - for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - -// if(ele1_recHit_flag -> at(iRecHit) >= 4) continue; - - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - float thisIC = 1.; - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { h_occupancy_hashedIndex_EE -> Fill(thisIndex); - if ( GetZsideFromHashedIndex(thisIndex) < 0 ) - h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - } - - ///Use full statistic - if ( splitStat == 0) { - - if(thisCaliBlock == 0) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> - at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - } - - if(thisCaliBlock == 1) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); - - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - } - - } - - /// use evens - if ( splitStat == 1 && jentry%2 == 0 ) { - - if(thisCaliBlock == 0) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); } - - if(thisCaliBlock == 1) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); - - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - } - } - - /// use odd - if ( splitStat == -1 && jentry%2 != 0 ) { - - if(thisCaliBlock == 0) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); - - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2)));} - - if(thisCaliBlock == 1) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); - - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); } - } - } - } - ///Fill EoP - if (thisCaliBlock != -1) hC_EoP -> Fill(iLoop, thisE/(pIn-ele1_es)); - - } - skipElectron = false; - - /// Medium ele from Z only Endcap - if ( ele2_isEB == 0 && ( useZ == 1 && isZ == 1 ) ) { - - /// SCL energy containment correction - FdiEta = ele2_scE/(ele2_scERaw+ele2_es); - - float thisE = 0; - float thisE3x3 =0 ; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - -// if( ele2_recHit_flag -> at(iRecHit) < 4 ) - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag -> at(iRecHit) < 4*/){ - - E_seed=ele2_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); - } - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisIC = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& - ele2_recHit_flag -> at(iRecHit) < 4*/) - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; - - } - - pSub = 0.; //NOTALEO : test dummy - /// Option for MCTruth Analysis - if(!isMCTruth) pIn = ele2_tkP; - else{ - pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele - } - - /// find the zside - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(ele2_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); - - TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure - /// E/p and R9 selections - if ( fabs(thisE/(pIn-ele2_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; - /// R9 and fbrem selection - if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta)<=1.75) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta)>1.75 && fabs(ele2_scEta)<=2.0) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta)>2.0 && fabs(ele2_scEta)<=2.15 ) skipElectron = true; - if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>2.15) skipElectron = true; - - if ( fabs(ele2_fbrem)>0.4 && isfbrem==true) skipElectron =true; - - if ( thisE/(pIn-ele2_es) < EoPHisto->GetXaxis()->GetXmin() || thisE/(pIn-ele2_es) > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; - - if(!skipElectron && BDTG_weightEE_W_1!=-99. && BDTG_weightEE_W_2!=-99.) { - - double Maximum_h_WeightEE_W_1 = h_WeightEE_W_1->GetBinCenter(h_WeightEE_W_1->GetMaximumBin()); - double Maximum_h_WeightEE_W_2 = h_WeightEE_W_2->GetBinCenter(h_WeightEE_W_2->GetMaximumBin()); - - - for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - -// if(ele2_recHit_flag -> at(iRecHit) >= 4) continue; - - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - float thisIC = 1.; - - if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { - h_occupancy_hashedIndex_EE -> Fill(thisIndex); - if ( GetZsideFromHashedIndex(thisIndex) < 0 ) - h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - } - - /// Use full statistic - if ( splitStat == 0) { - - if(thisCaliBlock == 0) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); - - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - } - - if(thisCaliBlock == 1) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); - - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - } - } - - /// use evens - if ( splitStat == 1 && jentry%2 == 0 ) { - - if(thisCaliBlock == 0) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); - - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - } - - if(thisCaliBlock == 1) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); - - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - } - } - - /// use odd - if ( splitStat == -1 && jentry%2 != 0 ) { - - if(thisCaliBlock == 0) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); - - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*(thisE3x3/thisE)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - } - - if(thisCaliBlock == 1) { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); - - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); - - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2)));} - } - } - } - //Fill EoP - if (thisCaliBlock != -1) hC_EoP -> Fill(iLoop, thisE/(pIn-ele2_es)); - - } - } - /// End Cycle on the events - - std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; - - TH1F auxiliary_IC_EEM("auxiliary_IC_EEM","auxiliary_IC_EEM",50,0.2,1.9); - TH1F auxiliary_IC_EEP("auxiliary_IC_EEP","auxiliary_IC_EEP",50,0.2,1.9); - - ///Fill the histo of IntercalibValues before the solve - for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - - if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ - - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - float thisIntercalibConstant =1. ; - - if(thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0.){ - thisIntercalibConstant = theNumerator_EEM[iIndex]/theDenominator_EEM[iIndex];} - else{ - if(thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0.) - thisIntercalibConstant = theNumerator_EEP[iIndex]/theDenominator_EEP[iIndex];} - - float oldIntercalibConstant = 1.; - if ( iLoop > 0 ) oldIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); - h_scale_hashedIndex_EE -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); - - if ( thisCaliBlock == 0 ) { - hC_IntercalibValues_EEM -> Fill (iLoop, thisIntercalibConstant); - hC_PullFromScalib_EEM -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); - hC_scale_EEM -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); - - auxiliary_IC_EEM.Fill(thisIntercalibConstant); - - } - else { - if( thisCaliBlock == 1) - { - hC_IntercalibValues_EEP -> Fill (iLoop, thisIntercalibConstant); - hC_PullFromScalib_EEP -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); - hC_scale_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); - - auxiliary_IC_EEP.Fill(thisIntercalibConstant);} - } - - - } - - } - - g_ICmeanVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM.GetMean()); - g_ICmeanVsLoop_EEM -> SetPointError(iLoop, 0.,auxiliary_IC_EEM.GetMeanError()); - - g_ICrmsVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM . GetRMS()); - g_ICrmsVsLoop_EEM -> SetPointError(iLoop, 0., auxiliary_IC_EEM . GetRMSError()); - - g_ICmeanVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetMean()); - g_ICmeanVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetMeanError()); - - g_ICrmsVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetRMS()); - g_ICrmsVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetRMSError()); - - } - /// End of Calibration Loops - - ///Fill the histo of IntercalibValues after the loops at last step - for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - - if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ - - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int thisIx = GetIxFromHashedIndex(iIndex); - int thisIy = GetIyFromHashedIndex(iIndex); - int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal - - float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value - if ( thisCaliBlock == 0 ) - h_scale_EEM -> Fill (thisIx, thisIy, thisIntercalibConstant); - else - h_scale_EEP -> Fill (thisIx, thisIy, thisIntercalibConstant); - - if ( thisCaliBlock == 0 ) - { - ///Vectors for IC Normalization - IxValues_EEM.push_back(thisIx); - IyValues_EEM.push_back(thisIy); - ICValues_EEM.push_back(thisIntercalibConstant); - } - else{ - IxValues_EEP.push_back(thisIx); - IyValues_EEP.push_back(thisIy); - ICValues_EEP.push_back(thisIntercalibConstant); - } - - int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to - if(thisIz >0) - { - SumIC_Ring_EEP.at(thisIr) = SumIC_Ring_EEP.at(thisIr) + thisIntercalibConstant; - Sumxtal_Ring_EEP.at(thisIr) = Sumxtal_Ring_EEP.at(thisIr) + 1; - } - else{ - SumIC_Ring_EEM.at(thisIr) = SumIC_Ring_EEM.at(thisIr) + thisIntercalibConstant; - Sumxtal_Ring_EEM.at(thisIr) = Sumxtal_Ring_EEM.at(thisIr) + 1; - } - - } - - - } - /// IC Normaliztion trough the mean value of each ring - for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - - if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ - - // int thisCaliBlock = -1; - // if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; - // else thisCaliBlock = 1; - - int thisIx = GetIxFromHashedIndex(iIndex); - int thisIy = GetIyFromHashedIndex(iIndex); - int thisIz = GetZsideFromHashedIndex(iIndex); - - int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); - - float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); - - - if(thisIz > 0) - { - if(Sumxtal_Ring_EEP.at(thisIr) != 0 && SumIC_Ring_EEP.at(thisIr)!= 0) - h_scale_meanOnring_EEP->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEP.at(thisIr)/Sumxtal_Ring_EEP.at(thisIr))); - } - else{ - if(Sumxtal_Ring_EEM.at(thisIr) != 0 && SumIC_Ring_EEM.at(thisIr) != 0) - h_scale_meanOnring_EEM->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEM.at(thisIr)/Sumxtal_Ring_EEM.at(thisIr))); - } - } - } - -} - -/// Save in the output -void FastCalibratorEE_MVA::saveHistos(TFile * f1){ - - f1->cd(); - - /// EE+ - hC_IntercalibValues_EEP-> Write(*f1); - hC_PullFromScalib_EEP->Write(*f1); - hC_EoP->Write(*f1); - hC_scale_EEP->Write("",*f1); - - h_occupancy_EEP->Write(); - h_scale_EEP->Write(); - h_scalib_EEP->Write(); - - h_scale_hashedIndex_EE->Write(); - h_occupancy_hashedIndex_EE->Write(); - h_map_Dead_Channels_EEP->Write(); - - g_ICmeanVsLoop_EEP->Write(); - g_ICrmsVsLoop_EEP->Write(); - h_scale_meanOnring_EEP->Write("h_scale_map_EEP"); - h_map_Dead_Channels_EEP->Write(); - - - /// EE- - hC_IntercalibValues_EEM-> Write(*f1); - hC_scale_EEM->Write("",*f1); - hC_PullFromScalib_EEM->Write(*f1); - h_occupancy_EEM->Write(); - h_scale_EEM->Write(); - h_scalib_EEM->Write(); - - g_ICmeanVsLoop_EEM->Write(); - g_ICrmsVsLoop_EEM->Write(); - h_scale_meanOnring_EEM->Write("h_scale_map_EEM"); - h_map_Dead_Channels_EEM->Write(); - - - f1->Close(); - - return; -} - -/// Save E/p distributions -void FastCalibratorEE_MVA::saveEoPeta(TFile * f2){ - f2->cd(); - hC_EoP_ir_ele ->Write(*f2); - f2->Close(); -} - -/// Acquire fake Dead Xtal in order to study the effect of IC near them -void FastCalibratorEE_MVA::AcquireDeadXtal(TString inputDeadXtal){ - if(inputDeadXtal!="NULL") - { - std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); - - std::string buffer; - int iX, iY ,iZ; - - while(!DeadXtal.eof()) - { - getline(DeadXtal,buffer); - std::stringstream line( buffer ); - line >> iX >> iY >>iZ ; - DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; - - } - - sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); - } - else{ - DeadXtal_HashedIndex.push_back(-9999); - } - -} -/// Check if the channel considered is in the list of dead or not -bool FastCalibratorEE_MVA::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ - - int hashed_Index; - hashed_Index = GetHashedIndexEE(iX,iY,iZ); - - std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); - - if(iter !=DeadXtal_HashedIndex.end()) - return true; - else return false; -} - diff --git a/EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc b/EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc deleted file mode 100644 index 82d323c622a..00000000000 --- a/EOverPCalibration/FastCalibrator/src/GetHashedIndexEB.cc +++ /dev/null @@ -1,32 +0,0 @@ -#include "../interface/GetHashedIndexEB.h" - -int GetHashedIndexEB(int iEta, int iPhi, int Zside) -{ - int MAX_IETA = 85; - int MAX_IPHI = 360; - bool positiveZ = true; - if ( Zside == -1 ) positiveZ = false; - int absEta = iEta * Zside; - - return ((MAX_IETA + (positiveZ ? absEta-1 : -absEta) )*MAX_IPHI+ iPhi-1); -} - -int GetIetaFromHashedIndex(int Index) -{ - int MAX_IETA = 85; - int MAX_IPHI = 360; - - int iEta = Index/MAX_IPHI - MAX_IETA; - if ( iEta >= 0 ) iEta++; - return iEta; -} - -int GetIphiFromHashedIndex(int Index) -{ - int MAX_IETA = 85; - int MAX_IPHI = 360; - - int iEta = Index/MAX_IPHI - MAX_IETA; - int iPhi = Index - (MAX_IETA + iEta)*MAX_IPHI + 1; - return iPhi; -} diff --git a/EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc b/EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc deleted file mode 100644 index 7642ba7af47..00000000000 --- a/EOverPCalibration/FastCalibrator/src/GetHashedIndexEE.cc +++ /dev/null @@ -1,75 +0,0 @@ -#include "../interface/GetHashedIndexEE.h" - -const int kxf[] = { - 41, 51, 41, 51, 41, 51, 36, 51, 36, 51, - 26, 51, 26, 51, 26, 51, 21, 51, 21, 51, - 21, 51, 21, 51, 21, 51, 16, 51, 16, 51, - 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, - 9, 51, 9, 51, 9, 51, 9, 51, 9, 51, - 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, - 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, - 4, 51, 4, 51, 4, 51, 4, 51, 4, 56, - 1, 58, 1, 59, 1, 60, 1, 61, 1, 61, - 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, - 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, - 1, 61, 1, 61, 1, 60, 1, 59, 1, 58, - 4, 56, 4, 51, 4, 51, 4, 51, 4, 51, - 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, - 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, - 9, 51, 9, 51, 9, 51, 9, 51, 9, 51, - 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, - 16, 51, 16, 51, 21, 51, 21, 51, 21, 51, - 21, 51, 21, 51, 26, 51, 26, 51, 26, 51, - 36, 51, 36, 51, 41, 51, 41, 51, 41, 51 -} ; - -const int kdi[] = { - 0, 10, 20, 30, 40, 50, 60, 75, 90, 105, - 120, 145, 170, 195, 220, 245, 270, 300, 330, 360, - 390, 420, 450, 480, 510, 540, 570, 605, 640, 675, - 710, 747, 784, 821, 858, 895, 932, 969, 1006, 1043, - 1080, 1122, 1164, 1206, 1248, 1290, 1332, 1374, 1416, 1458, - 1500, 1545, 1590, 1635, 1680, 1725, 1770, 1815, 1860, 1905, - 1950, 1995, 2040, 2085, 2130, 2175, 2220, 2265, 2310, 2355, - 2400, 2447, 2494, 2541, 2588, 2635, 2682, 2729, 2776, 2818, - 2860, 2903, 2946, 2988, 3030, 3071, 3112, 3152, 3192, 3232, - 3272, 3311, 3350, 3389, 3428, 3467, 3506, 3545, 3584, 3623, - 3662, 3701, 3740, 3779, 3818, 3857, 3896, 3935, 3974, 4013, - 4052, 4092, 4132, 4172, 4212, 4253, 4294, 4336, 4378, 4421, - 4464, 4506, 4548, 4595, 4642, 4689, 4736, 4783, 4830, 4877, - 4924, 4969, 5014, 5059, 5104, 5149, 5194, 5239, 5284, 5329, - 5374, 5419, 5464, 5509, 5554, 5599, 5644, 5689, 5734, 5779, - 5824, 5866, 5908, 5950, 5992, 6034, 6076, 6118, 6160, 6202, - 6244, 6281, 6318, 6355, 6392, 6429, 6466, 6503, 6540, 6577, - 6614, 6649, 6684, 6719, 6754, 6784, 6814, 6844, 6874, 6904, - 6934, 6964, 6994, 7024, 7054, 7079, 7104, 7129, 7154, 7179, - 7204, 7219, 7234, 7249, 7264, 7274, 7284, 7294, 7304, 7314 -} ; - - -int GetHashedIndexEE(int ix, int iy, int zside) -{ - int jx = ix ; - int jd = 2*( iy - 1 ) + ( jx - 1 )/50 ; - return ( ( zside < 0 ? 0 : kEEhalf ) + kdi[jd] + jx - kxf[jd] ) ; -} - -int GetIxFromHashedIndex(int Index) -{ - int di = Index%kEEhalf ; - int ii = ( std::upper_bound( kdi, kdi+(2*IY_MAX), di ) - kdi ) - 1 ; - return ( kxf[ii] + di - kdi[ii] ) ; -} - -int GetIyFromHashedIndex(int Index) -{ - int di = Index%kEEhalf ; - int ii = ( std::upper_bound( kdi, kdi+(2*IY_MAX), di ) - kdi ) - 1 ; - return ( 1 + ii/2 ) ; -} - -int GetZsideFromHashedIndex(int Index) -{ - - return ( Index < kEEhalf ? -1 : 1) ; -} diff --git a/EOverPCalibration/FastCalibrator/src/README b/EOverPCalibration/FastCalibrator/src/README deleted file mode 100644 index d273192073e..00000000000 --- a/EOverPCalibration/FastCalibrator/src/README +++ /dev/null @@ -1,29 +0,0 @@ ---------------------------------------------------------- -Summary of all the classes in FastCalibratot/src package: ----------------------------------------------------------- - -1) interface/GetHashedIndexEB.h src/GetHashedIndexEB.cc - - Functions to convert the hashed index of a xtal in EB in iEta and iPhi coordinates and - to get the hashed index from iPhi, iEta and zside - -2) interface/GetHashedIndexEE.h src/GetHashedIndexEE.cc - - Function to convert the hashed idexn xtal in EE in ix,iy and iz coordinates and to get - the hashed index from ix,iy and zside. - -3) interface/EERings.h src/EERings.cc - - Function that gives the EE ring from ix,iy and zside informations (EE is subdiveded in 40 rings from the external part to the inner one) - -4) interface/FastCalibratorWeight.h src/FastCalibratorWeight.cc - - Class used to calculate IC coefficient through L3 "weighted" method for EB - -5) interface/FastCalibratorEE.h src/FastCalibratorEE.cc - - Class used to calculate IC coefficient through L3 "weighted" method for EE+ and EE- - -##### Note #### - -In order to Run this package you have to use the NtuplePackage version in UserCode/RGerosa/NtuplePackage \ No newline at end of file diff --git a/EOverPCalibration/FastCalibrator/src/TEndcapRings.cc b/EOverPCalibration/FastCalibrator/src/TEndcapRings.cc deleted file mode 100644 index b8a61d872c8..00000000000 --- a/EOverPCalibration/FastCalibrator/src/TEndcapRings.cc +++ /dev/null @@ -1,71 +0,0 @@ -#include "../interface/TEndcapRings.h" - - - -//----- -// ctor - -TEndcapRings::TEndcapRings() -{ - // initialization - for(int ix = 1; ix <= 100; ++ix) - for(int iy = 1; iy <= 100; ++iy) - for(int iz = 0; iz <= 1; ++iz) - iEndcapRing[ix][iy][iz] = -1; - - FILE *fRing; - fRing = fopen("./CommonTools/eerings.dat","r"); - std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; - int ix,iy,iz,ir; - while(fscanf(fRing,"(%d,%d,%d) %d \n",&ix,&iy,&iz,&ir) !=EOF ) - { - if( iz < 0 ) iz = 0; - iEndcapRing[ix][iy][iz] = ir; - } - - return; -} - -//----- -// dtor - -TEndcapRings::~TEndcapRings() -{ - return; -} - - - -//-------- -// methods - -int TEndcapRings::GetEndcapRing(int ix, int iy, int iz) -{ - int iSide = iz; - if( iSide < 0 ) iSide = 0; - return iEndcapRing[ix][iy][iSide]; -} - -int TEndcapRings::GetEndcapIeta(int ix, int iy, int iz) -{ - int iSide = iz; - if( iSide < 0 ) iSide = 0; - int iEtaOffset = 86*iz; - int iEta = iEtaOffset + iz*iEndcapRing[ix][iy][iSide]; - - return iEta; -} - -int TEndcapRings::GetEndcapIphi(int ix, int iy, int iz) -{ - double iX = ix-50.5; - double iY = iy-50.5; - int iPhi = -1; - - if( iX > 0 && iY > 0 ) iPhi = int( 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; - if( iX < 0 && iY > 0 ) iPhi = int( 180 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; - if( iX < 0 && iY < 0 ) iPhi = int( 180 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; - if( iX > 0 && iY < 0 ) iPhi = int( 360 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; - - return iPhi; -} diff --git a/EOverPCalibration/FastCalibrator/src/TSicCrystals.cc b/EOverPCalibration/FastCalibrator/src/TSicCrystals.cc deleted file mode 100644 index ff752fc15de..00000000000 --- a/EOverPCalibration/FastCalibrator/src/TSicCrystals.cc +++ /dev/null @@ -1,28 +0,0 @@ -#include "../interface/TSicCrystals.h" - -// default constructor, reading the map from file -TSicCrystals::TSicCrystals() -{ - int ix,iy,iz; - for (ix=0;ix<100;ix++) - { - for (iy=0;iy<100;iy++) - { - for (iz=-1;iz<2;iz++) sicMap[ix][iy][iz]=0; - } - } - - FILE *fSic; - fSic = fopen("./interface/SIC_ixiyiz.list","r"); - std::cout << "Reading SIC crystals map: SIC_ixiyiz.list" << std::endl; - while(fscanf(fSic,"%d %d %d \n",&ix,&iy,&iz) !=EOF ) { - sicMap[ix][iy][iz] = 1; - } - return; - -} -TSicCrystals::~TSicCrystals() { return;} - -int TSicCrystals::isSic(Int_t ix, Int_t iy, Int_t iz){ - return sicMap[ix][iy][iz]; -} diff --git a/EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc b/EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc deleted file mode 100644 index 83588d53d6c..00000000000 --- a/EOverPCalibration/FastCalibrator/src/XtalAlphaEB.cc +++ /dev/null @@ -1,998 +0,0 @@ -#include "../interface/XtalAlphaEB.h" -#include "../interface/GetHashedIndexEB.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -///==== Default constructor Contructor - -XtalAlphaEB::XtalAlphaEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution): -outEPDistribution_p(outEPDistribution){ - - // if parameter tree is not specified (or zero), connect the file - // used to generate this class and read the Tree. - if (tree == 0) { - TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); - if (!f) { - f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); - } - tree = (TTree*)gDirectory->Get("ntu"); - - } - - Init(tree); - - // Set my momentum scale using the input graphs - myMomentumScale = inputMomentumScale; - myTypeEB = typeEB; -} - -///==== deconstructor - -XtalAlphaEB::~XtalAlphaEB(){ - - if (!fChain) return; - delete fChain->GetCurrentFile(); -} - - -///==== Load information of input Ntupla - -Long64_t XtalAlphaEB::LoadTree(Long64_t entry){ - -// Set the environment to read one entry - if (!fChain) return -5; - Long64_t centry = fChain->LoadTree(entry); - if (centry < 0) return centry; - if (!fChain->InheritsFrom(TChain::Class())) return centry; - - TChain *chain = (TChain*)fChain; - if (chain->GetTreeNumber() != fCurrent) { - fCurrent = chain->GetTreeNumber(); - } - return centry; -} - -///==== Variables initialization - -void XtalAlphaEB::Init(TTree *tree) -{ - /// Set object pointer - - ele1_recHit_E = 0; - ele1_recHit_hashedIndex = 0; - ele1_recHit_iphiORiy = 0; - ele1_recHit_ietaORix = 0; - ele1_recHit_flag = 0; - ele1_recHit_LaserCorr = 0; - ele1_recHit_Alpha = 0; - - - ele2_recHit_E = 0; - ele2_recHit_hashedIndex = 0; - ele2_recHit_iphiORiy = 0; - ele2_recHit_ietaORix = 0; - ele2_recHit_flag = 0; - ele2_recHit_LaserCorr = 0; - ele2_recHit_Alpha = 0; - - /// Set branch addresses and branch pointers - - if (!tree) return; - fChain = tree; - fCurrent = -1; - fChain->SetMakeClass(1); - - fChain->SetBranchStatus("*", 0); - - fChain->SetBranchStatus("runId", 1); fChain->SetBranchAddress("runId", &runId, &b_runId); - fChain->SetBranchStatus("lumiId", 1); fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); - fChain->SetBranchStatus("eventId", 1); fChain->SetBranchAddress("eventId", &eventId, &b_eventId); - fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); - - // ele1 - fChain->SetBranchStatus("ele1_recHit_E", 1); fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); - fChain->SetBranchStatus("ele1_recHit_hashedIndex",1); fChain->SetBranchAddress("ele1_recHit_hashedIndex",&ele1_recHit_hashedIndex,&b_ele1_recHit_hashedIndex); - fChain->SetBranchStatus("ele1_recHit_ietaORix", 1); fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); - fChain->SetBranchStatus("ele1_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); - fChain->SetBranchStatus("ele1_recHit_flag", 1); fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); - fChain->SetBranchStatus("ele1_recHit_laserCorrection", 1); fChain->SetBranchAddress("ele1_recHit_laserCorrection", &ele1_recHit_LaserCorr, &b_ele1_recHit_LaserCorr); - fChain->SetBranchStatus("ele1_recHit_Alpha", 1); fChain->SetBranchAddress("ele1_recHit_Alpha", &ele1_recHit_Alpha, &b_ele1_recHit_Alpha); - - //fChain->SetBranchStatus("ele1_E_true", 1); fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); - //fChain->SetBranchStatus("ele1_DR", 1); fChain->SetBranchAddress("ele1_DR", &ele1_DR, &b_ele1_DR); - - fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); - fChain->SetBranchStatus("ele1_eta", 1); fChain->SetBranchAddress("ele1_eta", &ele1_eta, &b_ele1_eta); - fChain->SetBranchStatus("ele1_phi", 1); fChain->SetBranchAddress("ele1_phi", &ele1_phi, &b_ele1_phi); - fChain->SetBranchStatus("ele1_scERaw", 1); fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); - fChain->SetBranchStatus("ele1_scE", 1); fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); - fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); - - fChain->SetBranchStatus("ele1_es", 1); fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); - fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); - fChain->SetBranchStatus("ele1_e3x3", 1); fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); - fChain->SetBranchStatus("ele1_tkP", 1); fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); - fChain->SetBranchStatus("ele1_fbrem", 1); fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); - fChain->SetBranchStatus("ele1_EOverP", 1); fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); - fChain->SetBranchStatus("ele1_isEB", 1); fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); - fChain->SetBranchStatus("ele1_isEBEEGap", 1); fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); - fChain->SetBranchStatus("ele1_isEBEtaGap", 1); fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); - fChain->SetBranchStatus("ele1_isEBPhiGap", 1); fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); - fChain->SetBranchStatus("ele1_isEEDeeGap", 1); fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); - fChain->SetBranchStatus("ele1_isEERingGap", 1); fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); - - - fChain->SetBranchStatus("ele1_seedLaserAlpha", 1); fChain->SetBranchAddress("ele1_seedLaserAlpha", &ele1_seedLaserAlpha, &b_ele1_seedLaserAlpha); - fChain->SetBranchStatus("ele1_seedLaserCorr", 1); fChain->SetBranchAddress("ele1_seedLaserCorr", &ele1_seedLaserCorr, &b_ele1_seedLaserCorr); - - // ele2 - fChain->SetBranchStatus("ele2_recHit_E", 1); fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); - fChain->SetBranchStatus("ele2_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); - fChain->SetBranchStatus("ele2_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); - fChain->SetBranchStatus("ele2_recHit_ietaORix", 1); fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); - fChain->SetBranchStatus("ele2_recHit_flag", 1); fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); - fChain->SetBranchStatus("ele2_recHit_laserCorrection", 1); fChain->SetBranchAddress("ele2_recHit_laserCorrection", &ele2_recHit_LaserCorr, &b_ele2_recHit_LaserCorr); - fChain->SetBranchStatus("ele2_recHit_Alpha", 1); fChain->SetBranchAddress("ele2_recHit_Alpha", &ele2_recHit_Alpha, &b_ele2_recHit_Alpha); - - //fChain->SetBranchStatus("ele2_E_true", 1); fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); - //fChain->SetBranchStatus("ele2_DR", 1); fChain->SetBranchAddress("ele2_DR", &ele2_DR, &b_ele2_DR); - fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); - - fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); - fChain->SetBranchStatus("ele2_eta", 1); fChain->SetBranchAddress("ele2_eta", &ele2_eta, &b_ele2_eta); - fChain->SetBranchStatus("ele2_phi", 1); fChain->SetBranchAddress("ele2_phi", &ele2_phi, &b_ele2_phi); - fChain->SetBranchStatus("ele2_scERaw", 1); fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); - fChain->SetBranchStatus("ele2_scE", 1); fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); - fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); - - fChain->SetBranchStatus("ele2_e3x3", 1); fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); - fChain->SetBranchStatus("ele2_tkP", 1); fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); - fChain->SetBranchStatus("ele2_fbrem", 1); fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); - fChain->SetBranchStatus("ele2_EOverP", 1); fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); - fChain->SetBranchStatus("ele2_isEB", 1); fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); - fChain->SetBranchStatus("ele2_isEBEEGap", 1); fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); - fChain->SetBranchStatus("ele2_isEBEtaGap", 1); fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); - fChain->SetBranchStatus("ele2_isEBPhiGap", 1); fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); - fChain->SetBranchStatus("ele2_isEEDeeGap", 1); fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); - fChain->SetBranchStatus("ele2_isEERingGap", 1); fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); - - fChain->SetBranchStatus("ele2_seedLaserAlpha", 1); fChain->SetBranchAddress("ele2_seedLaserAlpha", &ele2_seedLaserAlpha, &b_ele2_seedLaserAlpha); - fChain->SetBranchStatus("ele2_seedLaserCorr", 1); fChain->SetBranchAddress("ele2_seedLaserCorr", &ele2_seedLaserCorr, &b_ele2_seedLaserCorr); - -} - - - -//! Declaration of the objects that are save in the output file - -void XtalAlphaEB::bookHistos(int nLoops){ - - hC_AlphaValues = new hChain ("AlphaValues", "AlphaValues", 2000,0.5,1.5, nLoops); - - hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); - - hC_AlphaSpreadVsLoop = new hChain ("hC_AlphaSpreadVsLoop", "hC_AlphaSpreadVsLoop", 171,-85,86,nLoops); - - hC_Alpha_EB = new h2Chain("hC_Alpha_EB", "hC_Alpha_EB", 360,1, 361, 171, -85, 86, nLoops ); - - h_Alpha_EB = new TH2F("h_Alpha_EB", "h_Alpha_EB", 360,1, 361, 171, -85, 86 ); - - h_Intial_AlphaValues = new TH2F("h_Intial_AlphaValues","h_Intial_AlphaValues",360,1,361,171,-85,86); - - h_Alpha_scalib_EB = new TH2F("h_Alpha_scalib_EB", "h_Alpha_scalib_EB", 360,1, 361, 171, -85, 86 ); - - p_AlphaValues_iEta = new TProfile ("p_AlphaValues_iEta","p_AlphaValues_iEta", 171, -85, 86, -0.1, 2.1); - - h_AlphaSpread_iEta = new TH1F ("h_AlphaSpread_iEta", "h_AlphaSpread_iEta", 171, -85, 86); - - h_Alpha_EB_hashedIndex = new TH1F("h_Alpha_EB_hashedIndex", "h_Alpha_EB_hashedIndex", 61201,-0.5,61999.5 ); - - h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); - - g_AlphameanVsLoop = new TGraphErrors(); - g_AlphameanVsLoop -> SetName("g_AlphameanVsLoop"); - g_AlphameanVsLoop -> SetTitle("g_AlphameanVsLoop"); - - g_AlpharmsVsLoop = new TGraphErrors(); - g_AlpharmsVsLoop ->SetName("g_AlpharmsVsLoop"); - g_AlpharmsVsLoop ->SetTitle("g_AlpharmsVsLoop"); - - g_AlphaSigmaVsLoop = new TGraphErrors(); - g_AlphaSigmaVsLoop ->SetName("g_AlphaSigmaVsLoop"); - g_AlphaSigmaVsLoop ->SetTitle("g_AlphaSigmaVsLoop"); - - h_Alpha_EB_meanOnPhi = new TH2F("h_Alpha_EB_meanOnPhi", "h_Alpha_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); - - h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); - - h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); - - return; -} - -//! Build E/p distribution for both ele1 and ele2 - -void XtalAlphaEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, float R9Min, bool isMCTruth){ - - if(iLoop ==0) { // Set Chain fo Histogram for E/p distribution - - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); - } - else{ - hC_EoP_eta_ele -> Reset(); - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); - } - - - Long64_t nbytes = 0, nb = 0; - - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_LaserCorr->at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) /// control if this recHit is good - { - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search - } - - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - ///! 3x3 matrix informations in order to apply R9 selection - - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_LaserCorr -> at(iRecHit)>0. && - ele1_recHit_Alpha -> at(iRecHit)>0. - ) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - } - - ///! Eta seed from hashed index - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - - bool skipElectron = false; - - ///! different E/p if I am using MCThruth informations or not - if(!isMCTruth) { - - pIn = ele1_tkP; - int regionId = templIndexEB(myTypeEB,ele1_eta,ele1_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); - } - else{ - pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9 Selection - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - /// Save electron E/p in a chain of histogramm each for eta bin - if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); - - - } - ///=== Second medium electron from Z - - if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ - - FdiEta = ele2_scE/ele2_scERaw; /// FEta approximation - - float thisE = 0; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) - { - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele2_recHit_E -> at(iRecHit); ///Seed informations - } - - - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_LaserCorr -> at(iRecHit)>0. && - ele2_recHit_Alpha -> at(iRecHit)>0.) - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - } - - - /// Eta seed info from hashed index - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - - bool skipElectron = false; - - /// MCTruth analysis option - if(!isMCTruth) { - - pIn = ele2_tkP; - int regionId = templIndexEB(myTypeEB,ele2_eta,ele2_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); - } - else{ - pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - ///R9 Selection - if( fabs(thisE3x3/thisE) < R9Min && isR9selection==true ) skipElectron = true; - /// Save E/p electron information - if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); - - } - - - } - - /// Histogramm Normalization - for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++){ - - hC_EoP_eta_ele->Normalize(ieta); - } - - /// Save E/p pdf if it is required - if(isSaveEPDistribution == true) { - - TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); - saveEoPeta(f2); - } - -} - - -/// Calibration Loop over the ntu events - -void XtalAlphaEB::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, - bool isEPselection,bool isR9selection, float R9Min, bool isMCTruth, std::map > > jsonMap){ - if (fChain == 0) return; - - /// Define the number of crystal you want to calibrate - int m_regions = 0; - - - /// Define useful numbers - static const int MIN_IETA = 1; - static const int MIN_IPHI = 1; - static const int MAX_IETA = 85; - static const int MAX_IPHI = 360; - - for ( int iabseta = MIN_IETA; iabseta <= MAX_IETA; iabseta++ ){ - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ - - m_regions++; - - } - } - } - - /// Barrel region = Barrel xtal - std::cout << "m_regions " << m_regions << std::endl; - - /// Build the scalibration Map for MC Analysis - - std::vector theScalibration(m_regions, 0.); - TRandom3 genRand; - - for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { - - bool isDeadXtal = false ; - - /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user - - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); - if(isDeadXtal == true ) { - theScalibration[iIndex]=0; - h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); - } - else{ - - if(isMiscalib == true) theScalibration[iIndex] = genRand.Gaus(1.,0.01); ///! 1% of Miscalibration fixed - if(isMiscalib == false) theScalibration[iIndex] = 1.; - h_Alpha_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map - } - } - - /// ----------------- Calibration Loops -----------------------------// - - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - std::cout << "Starting iteration " << iLoop + 1 << std::endl; - - /// prepare the numerator and denominator for each Xtal - - std::vector theNumerator(m_regions, 0.); - std::vector theDenominator(m_regions, 0.); - - std::cout << "Number of analyzed events = " << nentries << std::endl; - - ///==== build E/p distribution ele 1 and 2 - BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isMCTruth); - - // define map with events - std::map >,int> eventsMap; - - /// Loop on each entry - Long64_t nbytes = 0, nb = 0; - for (Long64_t jentry=0; jentryGetEntry(jentry); - nbytes += nb; - - - //********************************* - // JSON FILE AND DUPLIACTES IN DATA - - bool skipEvent = false; - if( isMCTruth == 0 ){ - - if(AcceptEventByRunAndLumiSection(runId,lumiId,jsonMap) == false) skipEvent = true; - - std::pair eventLSandID(lumiId,eventId); - std::pair > eventRUNandLSandID(runId,eventLSandID); - if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; - else eventsMap[eventRUNandLSandID] = 1; - } - - if( skipEvent == true ) continue; - - - - float pIn, pSub, FdiEta; - - std::map map; - bool skipElectron=false; - - /// Tight electron information from W and Z, it depends on the flag variable isW, isZ - - if ( ele1_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - /// SCL energy containment correction - FdiEta = ele1_scE/ele1_scERaw; - - float thisE = 0; - int iseed = 0 ; - float E_seed = 0; - int seed_hashedIndex = 0; - float thisE3x3 = 0 ; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0 ) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(ele1_recHit_LaserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - - if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_LaserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ - - E_seed=ele1_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); //! Seed Infos - } - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_LaserCorr -> at(iRecHit)>0. && - ele1_recHit_Alpha -> at(iRecHit)>0.) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - } - - // Iniatila Map of Alpha Values - - if(iLoop==0) { - for ( unsigned int iRecHit = 0; iRecHit< ele1_recHit_Alpha->size(); iRecHit++){ - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - int ieta = GetIetaFromHashedIndex(thisIndex); - int iphi = GetIphiFromHashedIndex(thisIndex); - if(h_Intial_AlphaValues->GetBinContent(iphi,fabs(ieta+85))!=0) continue; - h_Intial_AlphaValues -> SetBinContent(iphi,fabs(ieta+85),ele1_recHit_Alpha->at(iRecHit)); - } - } - - - - pSub = 0.; //NOTALEO : test dummy - bool skipElectron = false; - - ///! if MCTruth Analysis - if(!isMCTruth) { - - pIn = ele1_tkP; - int regionId = templIndexEB(myTypeEB,ele1_eta,ele1_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); - } - else{ - pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// Take the correct pdf for the ring in order to reweight the events in L3 - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); - - /// Basic selection on E/p or R9 if you want to apply - if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron = true; - if( !skipElectron) { - - /// Now cycle on the all the recHits and update the numerator and denominator - for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - float thisAlpha = 1.; - - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { - h_Occupancy_hashedIndex -> Fill(thisIndex); - h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); - } - - /// use full statistics - if ( splitStat == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); /// factor use to reweight the evemts - theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); - - } - /// Use Half Statistic only even - else if ( splitStat == 1 && jentry%2 == 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); - } - /// use odd event - else if ( splitStat == -1 && jentry%2 != 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); - } - - } - - } - //Fill EoP - hC_EoP -> Fill(iLoop, thisE/pIn); - - } - - skipElectron = false; - - /// Ele2 medium from Z only Barrel - if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - FdiEta = ele2_scE/ele2_scERaw; - // Electron energy - float thisE = 0; - int iseed = 0 ; - float E_seed = 0; - int seed_hashedIndex = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - if( ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - - - if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.){ - E_seed=ele2_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); /// Seed information - } - - - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - // IC obtained from previous Loops - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_LaserCorr -> at(iRecHit)>0. && - ele2_recHit_Alpha -> at(iRecHit)>0.) - - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); - - } - - if(iLoop==0) { - for ( unsigned int iRecHit = 0; iRecHit< ele2_recHit_Alpha->size(); iRecHit++){ - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - int ieta = GetIetaFromHashedIndex(thisIndex); - int iphi = GetIphiFromHashedIndex(thisIndex); - - if(h_Intial_AlphaValues->GetBinContent(iphi,fabs(ieta+85))!=0) continue; - h_Intial_AlphaValues -> SetBinContent(iphi,fabs(ieta+85),ele2_recHit_Alpha->at(iRecHit)); - - } - } - - pSub = 0.; //NOTALEO : test dummy - - ///! Option for MCTruth analysis - if(!isMCTruth) - { - pIn = ele2_tkP; - int regionId = templIndexEB(myTypeEB,ele2_eta,ele2_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); - } - else{ - pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); - TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); - - /// discard electrons with bad E/P or R9 - if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; - if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( !skipElectron ){ - - /// Now cycle on the all the recHits and update the numerator and denominator - for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - float thisAlpha = 1.; - - if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ) { - h_Occupancy_hashedIndex -> Fill(thisIndex); - h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); - } - - /// use full statistics - if ( splitStat == 0 ) { - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); - } - /// use evens - else if ( splitStat == 1 && jentry%2 == 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); - } - /// use odds - else if ( splitStat == -1 && jentry%2 != 0 ) { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); - theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); - } - - } - - } - //Fill EoP - hC_EoP -> Fill(iLoop, thisE/pIn); - - } - - } - - ///! End Cycle on the events - - ///New Loop cycle + Save info - std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; - - TH1F auxiliary_Alpha("auxiliary_Alpha","auxiliary_Alpha",50,0.2,1.9); - - TF1* f1 = new TF1("f1","gaus",0,5); - - ///Fill the histo of IntercalibValues before the solve - for ( int iIndex = 0; iIndex < m_regions; iIndex++ ){ - - if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ - - float thisAlphaConstant = 1.; - /// Solve the cases where the recHit energy is always 0 (dead Xtal?) - bool isDeadXtal = false ; - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); - if(isDeadXtal == true ) continue; - - - if (theNumerator[iIndex]/theDenominator[iIndex]>0 && theDenominator[iIndex]!=0) thisAlphaConstant = theNumerator[iIndex]/theDenominator[iIndex]; - float oldAlphaConstant = 1.; - if ( iLoop > 0 ) oldAlphaConstant = h_Alpha_EB_hashedIndex -> GetBinContent (iIndex+1); - - h_Alpha_EB_hashedIndex -> SetBinContent(iIndex+1, thisAlphaConstant*oldAlphaConstant); /// Alpha product useful for L3 methods - hC_AlphaValues -> Fill(iLoop, thisAlphaConstant); /// Alpha correction distribution at each loop - hC_Alpha_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); - ///Save the new IC coefficient - auxiliary_Alpha.Fill(thisAlphaConstant); - } - - } - /// Info in order to test convergence - g_AlphameanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_Alpha . GetMean()); - g_AlphameanVsLoop -> SetPointError(iLoop, 0., auxiliary_Alpha . GetMeanError()); - - g_AlpharmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_Alpha . GetRMS()); - g_AlpharmsVsLoop -> SetPointError(iLoop, 0., auxiliary_Alpha . GetRMSError()); - - auxiliary_Alpha.Fit("f1","QR"); - - g_AlphaSigmaVsLoop -> SetPoint(iLoop, iLoop, f1->GetParameter(2)); - g_AlphaSigmaVsLoop -> SetPointError(iLoop, 0., f1->GetParError(2)); - - for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ - for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ - - TH1F* histoTemp = new TH1F("histoTemp","histoTemp",800, 0., 3.); - ///Setup the histo for fit - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - int hashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); - if ( h_Occupancy_hashedIndex -> GetBinContent(hashedIndex+1) == 0 ) continue; - histoTemp->Fill(h_Alpha_EB_hashedIndex->GetBinContent(hashedIndex+1)); - } - - TF1* f2 = new TF1("f2","gaus",0,5); - f2->SetParameters(histoTemp->GetEntries(),histoTemp->GetMean(),histoTemp->GetRMS()); - f2->SetRange(histoTemp->GetMean()-8*histoTemp->GetRMS(),histoTemp->GetMean()+8*histoTemp->GetRMS()); - histoTemp -> Fit("f2","QR"); - hC_AlphaSpreadVsLoop -> SetBinContent(iLoop,iabseta*theZside + 85 + 1, f2->GetParameter(2)); - hC_AlphaSpreadVsLoop -> SetBinError(iLoop, iabseta*theZside + 85 + 1, f2->GetParError(2) ); - - delete histoTemp; - delete f2; - } - } - - delete f1; - }/// end calibration loop - - int myPhiIndex = 0; - - for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ - for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ - - ///Setup the histo for fit - TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",800, 0., 3.); - TF1 f1("f1","gaus",0.,5.); - - int totIphi = 0; - float meanAlphaforPhiRing =0.; - - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - - - int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); - if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; - float thisAlphaConstant = h_Alpha_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); - - h_Alpha_EB -> Fill(iphi, iabseta*theZside, thisAlphaConstant); ///Fill with Last Alpha correction Value - - p_AlphaValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisAlphaConstant); - - histoAuxiliary . Fill (thisAlphaConstant); - - ///Vectors - IetaValues.push_back(iabseta*theZside); - IphiValues.push_back(iphi); - AlphaValues.push_back(thisAlphaConstant); - - meanAlphaforPhiRing += thisAlphaConstant; - totIphi++; - - } - - for ( int uu = 0; uu < totIphi; uu++ ) meanAlphaforPhiRingValues.push_back(meanAlphaforPhiRing/totIphi); - /// Note this info are not used furhter because channels near to the dead ones are not skipped - - - for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ - - int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); - if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; - - h_Alpha_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, AlphaValues.at(myPhiIndex)/meanAlphaforPhiRingValues.at(myPhiIndex)); - myPhiIndex++; /// Normalization IC with the mean of each ring - - } - - f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); - f1.SetRange(histoAuxiliary.GetMean()-8*histoAuxiliary.GetRMS(), histoAuxiliary.GetMean()+8*histoAuxiliary.GetRMS()); - histoAuxiliary . Fit("f1","QR"); - - h_AlphaSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); - h_AlphaSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); - - } - - } -} -/// Save infos in the output -void XtalAlphaEB::saveHistos(TFile * f1){ - - f1->cd(); - - h_occupancy -> Write(); - h_Occupancy_hashedIndex -> Write(); - h_Intial_AlphaValues -> Write(); - - hC_AlphaValues -> Write(*f1); - hC_Alpha_EB -> Write("",*f1); - hC_EoP -> Write(*f1); - - g_AlphameanVsLoop -> Write(); - g_AlpharmsVsLoop -> Write(); - g_AlphaSigmaVsLoop -> Write(); - - hC_AlphaSpreadVsLoop -> Write(*f1); - - h_Alpha_EB_hashedIndex -> Write(); - h_Alpha_EB -> Write(); - h_Alpha_EB_meanOnPhi -> Write(); - - - p_AlphaValues_iEta -> Write(); - h_AlphaSpread_iEta -> Write(); - - - h_map_Dead_Channels -> Write() ; - - - f1->Close(); - - return; -} -/// Save E/0 distribution -void XtalAlphaEB::saveEoPeta(TFile * f2){ - - f2->cd(); - - hC_EoP_eta_ele ->Write(*f2); - - f2->Close(); -} - -///! Acquire fake dead channel list on order to evaluate the effected of IC near to them -void XtalAlphaEB::AcquireDeadXtal(TString inputDeadXtal){ - - if(inputDeadXtal!="NULL") - { - std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); - - std::string buffer; - int iEta, iPhi ; - - - while(!DeadXtal.eof()) - { - getline(DeadXtal,buffer); - std::stringstream line( buffer ); - line >> iEta >> iPhi ; - - if(iEta >=0) DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; - else DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; - - - } - - sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); - } - else{ - DeadXtal_HashedIndex.push_back(-9999); - } - -} -///! Check if the channel is dead or not -bool XtalAlphaEB::CheckDeadXtal(const int & iEta, const int & iPhi){ - int hashed_Index; - if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); - else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); - - std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); - - if(iter !=DeadXtal_HashedIndex.end()) - return true; - else return false; -} diff --git a/EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc b/EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc deleted file mode 100644 index 9a4be80299d..00000000000 --- a/EOverPCalibration/FastCalibrator/src/XtalAlphaEE.cc +++ /dev/null @@ -1,1474 +0,0 @@ -#include "../interface/XtalAlphaEE.h" -#include "../interface/GetHashedIndexEE.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/// Default constructor -XtalAlphaEE::XtalAlphaEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution): -outEPDistribution_p(outEPDistribution){ - - if (tree == 0) { - TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A- WElectron-May10ReReco-v1.root"); - if (!f) { - f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); - } - tree = (TTree*)gDirectory->Get("ntu"); - } - - // endcap geometry - eRings = new TEndcapRings(); - SicCrystal = new TSicCrystals(); - - Init(tree); - - // Set my momentum scale using the input graphs - myMomentumScale = inputMomentumScale; - myTypeEE = typeEE; -} - -/// Deconstructor - -XtalAlphaEE::~XtalAlphaEE(){ - - if (!fChain) return; - delete fChain->GetCurrentFile(); -} - - -Long64_t XtalAlphaEE::LoadTree(Long64_t entry){ - - // Set the environment to read one entry - if (!fChain) return -5; - Long64_t centry = fChain->LoadTree(entry); - if (centry < 0) return centry; - if (!fChain->InheritsFrom(TChain::Class())) return centry; - - TChain *chain = (TChain*)fChain; - if (chain->GetTreeNumber() != fCurrent) { - fCurrent = chain->GetTreeNumber(); - } - return centry; -} - - -/// Intialize pointers -void XtalAlphaEE::Init(TTree *tree){ - - /// Set object pointer - - ele1_recHit_E = 0; - ele1_recHit_hashedIndex = 0; - ele1_recHit_iphiORiy = 0; - ele1_recHit_ietaORix =0 ; - ele1_recHit_laserCorr =0 ; - ele1_recHit_Alpha =0 ; - - - ele2_recHit_E = 0; - ele2_recHit_hashedIndex = 0; - ele2_recHit_iphiORiy = 0; - ele2_recHit_ietaORix = 0; - ele2_recHit_laserCorr= 0 ; - ele2_recHit_Alpha =0 ; - - /// Set branch addresses and branch pointers - - if (!tree) return; - - fChain = tree; - fCurrent = -1; - fChain->SetMakeClass(1); - - fChain->SetBranchStatus("*", 0); - fChain->SetBranchStatus("runId", 1); fChain->SetBranchAddress("runId", &runId, &b_runId); - fChain->SetBranchStatus("lumiId", 1); fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); - fChain->SetBranchStatus("eventId", 1); fChain->SetBranchAddress("eventId", &eventId, &b_eventId); - fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); - - // ele1 - fChain->SetBranchStatus("ele1_recHit_E", 1); fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); - fChain->SetBranchStatus("ele1_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele1_recHit_hashedIndex",&ele1_recHit_hashedIndex,&b_ele1_recHit_hashedIndex); - fChain->SetBranchStatus("ele1_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); - fChain->SetBranchStatus("ele1_recHit_ietaORix", 1); fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); - fChain->SetBranchStatus("ele1_recHit_laserCorrection",1); fChain->SetBranchAddress("ele1_recHit_laserCorrection",&ele1_recHit_laserCorr,&b_ele1_recHit_laserCorr); - fChain->SetBranchStatus("ele1_recHit_Alpha", 1); fChain->SetBranchAddress("ele1_recHit_Alpha", &ele1_recHit_Alpha, &b_ele1_recHit_Alpha); - - fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); - fChain->SetBranchStatus("ele1_eta", 1); fChain->SetBranchAddress("ele1_eta", &ele1_eta, &b_ele1_eta); - fChain->SetBranchStatus("ele1_phi", 1); fChain->SetBranchAddress("ele1_phi", &ele1_phi, &b_ele1_phi); - fChain->SetBranchStatus("ele1_scERaw", 1); fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); - fChain->SetBranchStatus("ele1_scE", 1); fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); - fChain->SetBranchStatus("ele1_scEta", 1); fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); - fChain->SetBranchStatus("ele1_es", 1); fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); - fChain->SetBranchStatus("ele1_e3x3", 1); fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); - fChain->SetBranchStatus("ele1_tkP", 1); fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); - fChain->SetBranchStatus("ele1_fbrem", 1); fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); - fChain->SetBranchStatus("ele1_EOverP", 1); fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); - fChain->SetBranchStatus("ele1_isEB", 1); fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); - fChain->SetBranchStatus("ele1_isEBEEGap", 1); fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); - fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); - - fChain->SetBranchStatus("ele1_seedLaserAlpha", 1); fChain->SetBranchAddress("ele1_seedLaserAlpha", &ele1_seedLaserAlpha, &b_ele1_seedLaserAlpha); - fChain->SetBranchStatus("ele1_seedLaserCorr", 1); fChain->SetBranchAddress("ele1_seedLaserCorr", &ele1_seedLaserCorr, &b_ele1_seedLaserCorr); - - fChain->SetBranchStatus("ele1_isEBEtaGap", 1); fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); - fChain->SetBranchStatus("ele1_isEBPhiGap", 1); fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); - fChain->SetBranchStatus("ele1_isEEDeeGap", 1); fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); - fChain->SetBranchStatus("ele1_isEERingGap", 1); fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); - - // ele2 - fChain->SetBranchStatus("ele2_recHit_E", 1); fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); - fChain->SetBranchStatus("ele2_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); - fChain->SetBranchStatus("ele2_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); - fChain->SetBranchStatus("ele2_recHit_ietaORix", 1); fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); - fChain->SetBranchStatus("ele2_recHit_laserCorrection",1); fChain->SetBranchAddress("ele2_recHit_laserCorrection",&ele2_recHit_laserCorr,&b_ele2_recHit_laserCorr); - fChain->SetBranchStatus("ele2_recHit_Alpha", 1); fChain->SetBranchAddress("ele2_recHit_Alpha", &ele2_recHit_Alpha, &b_ele2_recHit_Alpha); - - - fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); - fChain->SetBranchStatus("ele2_eta", 1); fChain->SetBranchAddress("ele2_eta", &ele2_eta, &b_ele2_eta); - fChain->SetBranchStatus("ele2_phi", 1); fChain->SetBranchAddress("ele2_phi", &ele2_phi, &b_ele2_phi); - fChain->SetBranchStatus("ele2_scERaw", 1); fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); - fChain->SetBranchStatus("ele2_scE", 1); fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); - fChain->SetBranchStatus("ele2_scEta", 1); fChain->SetBranchAddress("ele2_scEta", &ele2_scEta, &b_ele2_scEta); - fChain->SetBranchStatus("ele2_es", 1); fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); - fChain->SetBranchStatus("ele2_e3x3", 1); fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); - fChain->SetBranchStatus("ele2_tkP", 1); fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); - fChain->SetBranchStatus("ele2_fbrem", 1); fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); - fChain->SetBranchStatus("ele2_EOverP", 1); fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); - fChain->SetBranchStatus("ele2_isEB", 1); fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); - fChain->SetBranchStatus("ele2_scE_regression", 1); fChain->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression, &b_ele2_scE_regression); - - fChain->SetBranchStatus("ele2_seedLaserAlpha", 1); fChain->SetBranchAddress("ele2_seedLaserAlpha", &ele2_seedLaserAlpha, &b_ele2_seedLaserAlpha); - fChain->SetBranchStatus("ele2_seedLaserCorr", 1); fChain->SetBranchAddress("ele2_seedLaserCorr", &ele2_seedLaserCorr, &b_ele2_seedLaserCorr); - - fChain->SetBranchStatus("ele2_isEBEEGap", 1); fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); - fChain->SetBranchStatus("ele2_isEBEtaGap", 1); fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); - fChain->SetBranchStatus("ele2_isEBPhiGap", 1); fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); - fChain->SetBranchStatus("ele2_isEEDeeGap", 1); fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); - fChain->SetBranchStatus("ele2_isEERingGap", 1); fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); - -} - - -//! Declaration of the objects that are save in the output file - -void XtalAlphaEE::bookHistos(int nLoops){ - - ///service histos - - h_Alpha_hashedIndex_EE = new TH1F ("h_scale_Alpha_EE","h_Alpha_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); - h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); - hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); - - ///EE+ - - hC_AlphaValues_BTCP_EEP = new hChain ("AlphaValues_BTCP_EEP", "AlphaValues_BTCP_EEP", 400,0.2,1.9, nLoops); - hC_AlphaSpreadVsLoop_BTCP_EEP = new hChain ("hC_AlphaSpreadVsLoop_BTCP_EEP", "hC_AlphaSpreadVsLoop_BTCP_EEP", 40,0,40,nLoops); - hC_Alpha_BTCP_EEP = new h2Chain("hC_Alpha_BTCP_EEP", "hC_Alpha_BTCP_EEP", 100,1, 101, 100, 1, 101, nLoops ); - hC_AlphaValues_SIC_EEP = new hChain ("AlphaValues_SIC_EEP", "AlphaValues_SIC_EEP", 400,0.2,1.9, nLoops); - hC_AlphaSpreadVsLoop_SIC_EEP = new hChain ("hC_AlphaSpreadVsLoop_SIC_EEP", "hC_AlphaSpreadVsLoop_SIC_EEP", 40,0,40,nLoops); - hC_Alpha_SIC_EEP = new h2Chain("hC_Alpha_SIC_EEP", "hC_Alpha_SIC_EEP", 100,1, 101, 100, 1, 101, nLoops ); - - h_Alpha_EEP = new TH2F("h_Alpha_EEP", "h_Alpha_EEP", 100,1,101,100,1,101); - h_scalib_EEP = new TH2F("h_scalib_EEP","h_scalib_EEP",100,1,101,100,1,101); - - h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); - h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); - - p_AlphaVsIeta_BTCP_EEP = new TProfile("p_AlphaVsIeta_BTCP_EEP","p_AlphaVsIeta_BTCP_EEP",40,0,40); - AlphaSpreadVsIeta_BTCP_EEP = new TH1F("AlphaSpreadVsIeta_BTCP_EEP","AlphaSpreadVsIeta_BTCP_EEP",40,0,40); - - g_AlphameanVsLoop_BTCP_EEP = new TGraphErrors(); - g_AlphameanVsLoop_BTCP_EEP -> SetName("g_AlphameanVsLoop_BTCP_EEP"); - g_AlphameanVsLoop_BTCP_EEP -> SetTitle("g_AlphameanVsLoop_BTCP_EEP"); - - g_AlpharmsVsLoop_BTCP_EEP = new TGraphErrors(); - g_AlpharmsVsLoop_BTCP_EEP -> SetName("g_AlpharmsVsLoop_BTCP_EEP"); - g_AlpharmsVsLoop_BTCP_EEP -> SetTitle("g_AlpharmsVsLoop_BTCP_EEP"); - - g_AlphaSigmaVsLoop_BTCP_EEP = new TGraphErrors(); - g_AlphaSigmaVsLoop_BTCP_EEP -> SetName("g_AlpharmsVsLoop_BTCP_EEP"); - g_AlphaSigmaVsLoop_BTCP_EEP -> SetTitle("g_AlpharmsVsLoop_BTCP_EEP"); - - p_AlphaVsIeta_SIC_EEP = new TProfile("p_AlphaVsIeta_SIC_EEP","p_AlphaVsIeta_SIC_EEP",40,0,40); - AlphaSpreadVsIeta_SIC_EEP = new TH1F("AlphaSpreadVsIeta_SIC_EEP","AlphaSpreadVsIeta_SIC_EEP",40,0,40); - - g_AlphameanVsLoop_SIC_EEP = new TGraphErrors(); - g_AlphameanVsLoop_SIC_EEP -> SetName("g_AlphameanVsLoop_SIC_EEP"); - g_AlphameanVsLoop_SIC_EEP -> SetTitle("g_AlphameanVsLoop_SIC_EEP"); - - g_AlpharmsVsLoop_SIC_EEP = new TGraphErrors(); - g_AlpharmsVsLoop_SIC_EEP -> SetName("g_AlpharmsVsLoop_SIC_EEP"); - g_AlpharmsVsLoop_SIC_EEP -> SetTitle("g_AlpharmsVsLoop_SIC_EEP"); - - g_AlphaSigmaVsLoop_SIC_EEP = new TGraphErrors(); - g_AlphaSigmaVsLoop_SIC_EEP -> SetName("g_AlpharmsVsLoop_SIC_EEP"); - g_AlphaSigmaVsLoop_SIC_EEP -> SetTitle("g_AlpharmsVsLoop_SIC_EEP"); - - ///EE+ - - hC_AlphaValues_BTCP_EEM = new hChain ("AlphaValues_BTCP_EEM", "AlphaValues_BTCP_EEM", 400,0.2,1.9, nLoops); - hC_AlphaSpreadVsLoop_BTCP_EEM = new hChain ("hC_AlphaSpreadVsLoop_BTCP_EEM", "hC_AlphaSpreadVsLoop_BTCP_EEM", 40,0,40,nLoops); - hC_Alpha_BTCP_EEM = new h2Chain("hC_Alpha_BTCP_EEM", "hC_Alpha_BTCP_EEM", 100,1, 101, 100, 1, 101, nLoops ); - hC_AlphaValues_SIC_EEM = new hChain ("AlphaValues_SIC_EEM", "AlphaValues_SIC_EEM", 400,0.2,1.9, nLoops); - hC_AlphaSpreadVsLoop_SIC_EEM = new hChain ("hC_AlphaSpreadVsLoop_SIC_EEM", "hC_AlphaSpreadVsLoop_SIC_EEM", 40,0,40,nLoops); - hC_Alpha_SIC_EEM = new h2Chain("hC_Alpha_SIC_EEM", "hC_Alpha_SIC_EEM", 100,1, 101, 100, 1, 101, nLoops ); - - h_Alpha_EEM = new TH2F("h_Alpha_EEM", "h_Alpha_EEM", 100,1,101,100,1,101); - h_scalib_EEM = new TH2F("h_scalib_EEM","h_scalib_EEM",100,1,101,100,1,101); - - h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); - h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); - - p_AlphaVsIeta_BTCP_EEM = new TProfile("p_AlphaVsIeta_BTCP_EEM","p_AlphaVsIeta_BTCP_EEM",40,0,40); - AlphaSpreadVsIeta_BTCP_EEM = new TH1F("AlphaSpreadVsIeta_BTCP_EEM","AlphaSpreadVsIeta_BTCP_EEM",40,0,40); - - g_AlphameanVsLoop_BTCP_EEM = new TGraphErrors(); - g_AlphameanVsLoop_BTCP_EEM -> SetName("g_AlphameanVsLoop_BTCP_EEM"); - g_AlphameanVsLoop_BTCP_EEM -> SetTitle("g_AlphameanVsLoop_BTCP_EEM"); - - g_AlpharmsVsLoop_BTCP_EEM = new TGraphErrors(); - g_AlpharmsVsLoop_BTCP_EEM -> SetName("g_AlpharmsVsLoop_BTCP_EEM"); - g_AlpharmsVsLoop_BTCP_EEM -> SetTitle("g_AlpharmsVsLoop_BTCP_EEM"); - - g_AlphaSigmaVsLoop_BTCP_EEM = new TGraphErrors(); - g_AlphaSigmaVsLoop_BTCP_EEM -> SetName("g_AlpharmsVsLoop_BTCP_EEM"); - g_AlphaSigmaVsLoop_BTCP_EEM -> SetTitle("g_AlpharmsVsLoop_BTCP_EEM"); - - p_AlphaVsIeta_SIC_EEM = new TProfile("p_AlphaVsIeta_SIC_EEM","p_AlphaVsIeta_SIC_EEM",40,0,40); - AlphaSpreadVsIeta_SIC_EEM = new TH1F("AlphaSpreadVsIeta_SIC_EEM","AlphaSpreadVsIeta_SIC_EEM",40,0,40); - - g_AlphameanVsLoop_SIC_EEM = new TGraphErrors(); - g_AlphameanVsLoop_SIC_EEM -> SetName("g_AlphameanVsLoop_SIC_EEM"); - g_AlphameanVsLoop_SIC_EEM -> SetTitle("g_AlphameanVsLoop_SIC_EEM"); - - g_AlpharmsVsLoop_SIC_EEM = new TGraphErrors(); - g_AlpharmsVsLoop_SIC_EEM -> SetName("g_AlpharmsVsLoop_SIC_EEM"); - g_AlpharmsVsLoop_SIC_EEM -> SetTitle("g_AlpharmsVsLoop_SIC_EEM"); - - g_AlphaSigmaVsLoop_SIC_EEM = new TGraphErrors(); - g_AlphaSigmaVsLoop_SIC_EEM -> SetName("g_AlpharmsVsLoop_SIC_EEM"); - g_AlphaSigmaVsLoop_SIC_EEM -> SetTitle("g_AlpharmsVsLoop_SIC_EEM"); - - - return; -} - - - - -///===== Build E/p for electron 1 and 2 - -void XtalAlphaEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution,bool isR9selection, float R9Min, bool isMCTruth,bool isfbrem){ - - if(iLoop ==0){ - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); - } - else{ - hC_EoP_ir_ele -> Reset(); - TString name = Form ("hC_EoP_eta_%d",iLoop); - hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); - } - - // Long64_t nb = 0; - - for(Long64_t jentry=0; jentryGetEntry(jentry); - - if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos - - } - - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - if(ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); /// SC energy - - } - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_laserCorr -> at(iRecHit)>0. && - ele1_recHit_Alpha -> at(iRecHit)>0.) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); - } - - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring - - bool skipElectron = false; - - /// Option for MCTruth analysis - if(!isMCTruth){ - - pIn = ele1_tkP; - int regionId = templIndexEE(myTypeEE,ele1_eta,ele1_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); - } - else{ - pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9, fbrem selection before E/p distribution - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta) > 1.75 && fabs(ele1_scEta) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta) > 2.00 && fabs(ele1_scEta) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(ele1_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; - - if( !skipElectron ) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele1_es)); // Fill E/p ditribution - } - - ///=== Second medium electron from Z only Endcaps - if ( ele2_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ - - FdiEta = ele2_scE/(ele2_scERaw+ele2_es); - - float thisE = 0; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - float thisE3x3 = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0. ) { - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); - iseed=iRecHit; - E_seed=ele2_recHit_E -> at(iRecHit); - } - - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); - - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - // IC obtained from previous Loops - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_laserCorr -> at(iRecHit)>0. && - ele2_recHit_Alpha -> at(iRecHit)>0.) - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); - } - - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring - - bool skipElectron = false; - /// Option for MCTruth Analysis - if(!isMCTruth){ - - pIn = ele2_tkP; - int regionId = templIndexEE(myTypeEE,ele2_eta,ele2_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); - } - else{ - - pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - /// R9 and fbrem selection - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta) > 1.75 && fabs(ele2_scEta) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta) > 2.00 && fabs(ele2_scEta) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(ele2_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; - - if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele2_es)); - - } - } - - - /// Normalization E/p distribution - for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); - - - /// Save E/p distributions - if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { - - if(iLoop ==0){ - TFile *f2 = new TFile(outEPDistribution_p.Data(),"RECREATE"); - saveEoPeta(f2); - } - else{ - TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); - saveEoPeta(f2); - } - - } - -} - - -/// L3 Loop method ----> Calibration Loop function -void XtalAlphaEE::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, - bool isEPselection, bool isR9selection, float R9Min, bool isMCTruth, bool isfbrem, std::map > > jsonMap){ - - if (fChain == 0) return; - - /// Define the number of crystal you want to calibrate - int m_regions = kEEhalf; - - std::cout << "m_regions " << m_regions << std::endl; - - /// build up scalibration map - std::vector theScalibration(m_regions*2, 0.); - TRandom genRand; - - for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ - - bool isDeadXtal = false ; - - /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user - if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); - if(isDeadXtal == true ) { - - theScalibration[iIndex]=0; - - if(GetZsideFromHashedIndex(iIndex)>0) - h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); - else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); - } - else{ - if(isMiscalib == true) theScalibration[iIndex] = genRand.Gaus(1.,0.03); /// Miscalibration fixed at 5% - if(isMiscalib == false) theScalibration[iIndex] = 1.; - if(GetZsideFromHashedIndex(iIndex)>0) - h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- - else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); - - } - } - - /// ----------------- Calibration Loops -----------------------------// - for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { - - std::cout << "Starting iteration " << iLoop + 1 << std::endl; - - /// L3 numerator and denominator for EE+ and EE- - std::vector theNumerator_EEP(m_regions*2+1, 0.); - std::vector theDenominator_EEP(m_regions*2+1, 0.); - std::vector theNumerator_EEM(m_regions+1, 0.); - std::vector theDenominator_EEM(m_regions+1, 0.); - - ///==== build E/p distribution ele 1 and 2 - - BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isMCTruth,isfbrem); - - // define map with events - std::map >,int> eventsMap; - - /// Loop over events - std::cout << "Number of analyzed events = " << nentries << std::endl; - - for (Long64_t jentry=0; jentryGetEntry(jentry); - - bool skipEvent = false; - - if( isMCTruth == 0 ){ - - if(AcceptEventByRunAndLumiSection(runId,lumiId,jsonMap) == false) skipEvent = true; - - std::pair eventLSandID(lumiId,eventId); - std::pair > eventRUNandLSandID(runId,eventLSandID); - if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; - else eventsMap[eventRUNandLSandID] = 1; - } - - if( skipEvent == true ) continue; - - float pIn, FdiEta; - std::map map; - bool skipElectron=false; - - /// Only tight electron from W and Z, only Endcap - - if ( ele1_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { - - /// SCL energy containment correction - FdiEta = ele1_scE/(ele1_scERaw+ele1_es); - - float thisE = 0; - float thisE3x3 =0 ; - int iseed = 0 ; - int seed_hashedIndex = 0 ; - float E_seed = 0; - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) - thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); - - if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ - - E_seed=ele1_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); /// Seed infos - } - - } - - for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { - - float thisAlpha = 1.; - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && - fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_laserCorr -> at(iRecHit)>0. && - ele1_recHit_Alpha -> at(iRecHit)>0.) - thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); - - } - - /// find the zside - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(ele1_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); - - /// MCTruth option - if(!isMCTruth) { - - pIn = ele1_tkP; - int regionId = templIndexEE(myTypeEE,ele1_eta,ele1_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); - } - else{ - pIn = ele1_E_true; - if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele - } - - TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); - - if ( fabs(thisE/(ele1_tkP-ele1_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure - - /// R9 and fbrem selection - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta) > 1.75 && fabs(ele1_scEta) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta) > 2.00 && fabs(ele1_scEta) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(ele1_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; - - if( thisE/(pIn-ele1_es) < EoPHisto->GetXaxis()->GetXmin() || - thisE/(pIn-ele1_es) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; - - if( !skipElectron ){ - - for( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++){ - - int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); - float thisAlpha = 1.; - - /// Fill the occupancy map JUST for the first Loop - if( iLoop == 0 ){ - h_occupancy_hashedIndex_EE -> Fill(thisIndex); - if ( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - } - - if( iLoop > 0 ) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - - ///Use full statistic - if( splitStat == 0 ){ - - if(thisCaliBlock == 0){ - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if( thisCaliBlock == 1 ){ - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.) / - thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - /// use evens - if( splitStat == 1 && jentry%2 == 0 ){ - - if( thisCaliBlock == 0 ){ - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if(thisCaliBlock == 1){ - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - /// use odd - if( splitStat == -1 && jentry%2 != 0 ){ - - if(thisCaliBlock == 0){ - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if(thisCaliBlock == 1){ - - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - } - } - - ///Fill EoP - if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-ele1_es)); - } - - skipElectron = false; - - /// Medium ele from Z only Endcap - if( ele2_isEB == 0 && ( useZ == 1 && isZ == 1 ) ){ - /// SCL energy containment correction - FdiEta = ele2_scE/(ele2_scERaw+ele2_es); - - float thisE = 0; - float thisE3x3 =0 ; - int iseed = 0 ; - int seed_hashedIndex = 0; - float E_seed = 0; - - - /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy - for(unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) - thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); - - if(ele2_recHit_E -> at(iRecHit) > E_seed){ - E_seed=ele2_recHit_E -> at(iRecHit); - iseed=iRecHit; - seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); - } - } - - for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ - - float thisAlpha = 1.; - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - - if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && - fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_laserCorr -> at(iRecHit)>0. - && ele2_recHit_Alpha -> at(iRecHit)>0.) - thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); - } - - /// find the zside - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(ele2_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); - int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); - int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); - int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); - - /// Option for MCTruth Analysis - if(!isMCTruth) { - pIn = ele2_tkP; - int regionId = templIndexEE(myTypeEE,ele2_eta,ele2_charge,thisE3x3/thisE); - pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); - } - else - { - pIn = ele2_E_true; - if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele - } - - TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure - - /// E/p and R9 selections - if ( fabs(thisE/(pIn-ele2_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; - - /// R9 and fbrem selection - if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta) <= 1.75 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta) > 1.75 && fabs(ele2_scEta) <= 2.00 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta) > 2.00 && fabs(ele2_scEta) <= 2.15 ) skipElectron = true; - if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta) > 2.15 ) skipElectron = true; - - if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; - - if( fabs(ele2_fbrem) > 0.4 && isfbrem == true) skipElectron =true; - - if( thisE/(pIn-ele2_es) < EoPHisto->GetXaxis()->GetXmin() || - thisE/(pIn-ele2_es) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; - - if( !skipElectron ) - { - for( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ - - int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); - float thisAlpha = 1.; - - /// Fill the occupancy map JUST for the first Loop - if ( iLoop == 0 ){ - h_occupancy_hashedIndex_EE -> Fill(thisIndex); - if( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); - } - - if(iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); - - /// Use full statistic - if( splitStat == 0){ - if(thisCaliBlock == 0) - { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if( thisCaliBlock == 1 ) - { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - - /// use evens - if( splitStat == 1 && jentry%2 == 0 ) - { - if( thisCaliBlock == 0 ) - { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - - if( thisCaliBlock == 1 ) - { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - - /// use odd - if( splitStat == -1 && jentry%2 != 0 ) - { - if(thisCaliBlock == 0) - { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); - theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin);} - - if( thisCaliBlock == 1 ) - { - int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); - theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); - theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* - TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ - thisE*EoPHisto->GetBinContent(EoPbin); - } - } - } - } - - //Fill EoP - if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-ele2_es)); - } - } /// End Cycle on the events - - std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; - - TH1F* auxiliary_Alpha_BTCP_EEM = new TH1F("auxiliary_Alpha_BTCP_EEM","auxiliary_Alpha_BTCP_EEM",400,0.,3.); - TH1F* auxiliary_Alpha_BTCP_EEP = new TH1F("auxiliary_Alpha_BTCP_EEP","auxiliary_Alpha_BTCP_EEP",400,0.,3.); - TH1F* auxiliary_Alpha_SIC_EEM = new TH1F("auxiliary_Alpha_SIC_EEM","auxiliary_Alpha_SIC_EEM",400,0.,3.); - TH1F* auxiliary_Alpha_SIC_EEP = new TH1F("auxiliary_Alpha_SIC_EEP","auxiliary_Alpha_SIC_EEP",400,0.,3.); - - TF1* f_BTCP_EEP = new TF1("f_BTCP_EEP","gaus",0.,3.); - TF1* f_BTCP_EEM = new TF1("f_BTCP_EEM","gaus",0.,3.); - TF1* f_SIC_EEP = new TF1("f_SIC_EEP","gaus",0.,3.); - TF1* f_SIC_EEM = new TF1("f_SIC_EEM","gaus",0.,3.); - - ///Fill the histo of IntercalibValues before the solve - for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ - - int thisCaliBlock = -1; - if( GetZsideFromHashedIndex(iIndex) < 0 ) thisCaliBlock = 0; - else thisCaliBlock = 1; - - float thisAlphaConstant = 1.; - float oldAlphaConstant = 1.; - if( iLoop > 0 ) oldAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); - - - if( thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0. ) thisAlphaConstant = theNumerator_EEM[iIndex] / theDenominator_EEM[iIndex]; - if( thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0. ) thisAlphaConstant = theNumerator_EEP[iIndex] / theDenominator_EEP[iIndex]; - - h_Alpha_hashedIndex_EE -> SetBinContent(iIndex+1, thisAlphaConstant*oldAlphaConstant); - - if(SicCrystal->isSic(GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), GetZsideFromHashedIndex(iIndex))){ - if( thisCaliBlock == 0 ){ - - hC_AlphaValues_SIC_EEM -> Fill (iLoop, thisAlphaConstant); - hC_Alpha_SIC_EEM -> Fill (iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); - - auxiliary_Alpha_SIC_EEM->Fill(thisAlphaConstant); - } - if( thisCaliBlock == 1){ - hC_AlphaValues_SIC_EEP -> Fill (iLoop, thisAlphaConstant); - hC_Alpha_SIC_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); - - auxiliary_Alpha_SIC_EEP->Fill(thisAlphaConstant); - } - } - else{ - if( thisCaliBlock == 0 ){ - - hC_AlphaValues_BTCP_EEM -> Fill (iLoop, thisAlphaConstant); - hC_Alpha_BTCP_EEM -> Fill (iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); - - auxiliary_Alpha_BTCP_EEM->Fill(thisAlphaConstant); - } - if( thisCaliBlock == 1){ - hC_AlphaValues_BTCP_EEP -> Fill (iLoop, thisAlphaConstant); - hC_Alpha_BTCP_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); - - auxiliary_Alpha_BTCP_EEP->Fill(thisAlphaConstant); - } - } - - } - } - //******************************* EE- *************************** - - g_AlphameanVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEM->GetMean()); - g_AlphameanVsLoop_SIC_EEM -> SetPointError(iLoop, 0.,auxiliary_Alpha_SIC_EEM->GetMeanError()); - - g_AlpharmsVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEM -> GetRMS()); - g_AlpharmsVsLoop_SIC_EEM -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEM -> GetRMSError()); - - f_SIC_EEM -> SetParameters (auxiliary_Alpha_SIC_EEM->GetEntries(),auxiliary_Alpha_SIC_EEM->GetMean(),auxiliary_Alpha_SIC_EEM->GetRMS()); - f_SIC_EEM -> SetRange (auxiliary_Alpha_SIC_EEM->GetMean()-8*auxiliary_Alpha_SIC_EEM->GetRMS(),auxiliary_Alpha_SIC_EEM->GetMean()+ - 8*auxiliary_Alpha_SIC_EEM->GetRMS()); - - auxiliary_Alpha_SIC_EEM->Fit("f_SIC_EEM","QR"); - - g_AlphaSigmaVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, f_SIC_EEM -> GetParameter(2)); - g_AlphaSigmaVsLoop_SIC_EEM -> SetPointError(iLoop, 0., f_SIC_EEM -> GetParError(2)); - - g_AlphameanVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEM->GetMean()); - g_AlphameanVsLoop_BTCP_EEM -> SetPointError(iLoop, 0.,auxiliary_Alpha_BTCP_EEM->GetMeanError()); - - g_AlpharmsVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEM -> GetRMS()); - g_AlpharmsVsLoop_BTCP_EEM -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEM -> GetRMSError()); - - f_BTCP_EEM -> SetParameters (auxiliary_Alpha_BTCP_EEM->GetEntries(),auxiliary_Alpha_BTCP_EEM->GetMean(),auxiliary_Alpha_BTCP_EEM->GetRMS()); - f_BTCP_EEM -> SetRange (auxiliary_Alpha_BTCP_EEM->GetMean()-8*auxiliary_Alpha_BTCP_EEM->GetRMS(),auxiliary_Alpha_BTCP_EEM->GetMean()+ - 8*auxiliary_Alpha_BTCP_EEM->GetRMS()); - - auxiliary_Alpha_BTCP_EEM->Fit("f_BTCP_EEM","QR"); - - g_AlphaSigmaVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, f_BTCP_EEM -> GetParameter(2)); - g_AlphaSigmaVsLoop_BTCP_EEM -> SetPointError(iLoop, 0., f_BTCP_EEM -> GetParError(2)); - - //******************************* EE+ *************************** - - g_AlphameanVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEP -> GetMean()); - g_AlphameanVsLoop_SIC_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEP -> GetMeanError()); - - g_AlpharmsVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEP -> GetRMS()); - g_AlpharmsVsLoop_SIC_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEP -> GetRMSError()); - - f_SIC_EEP -> SetParameters (auxiliary_Alpha_SIC_EEP->GetEntries(),auxiliary_Alpha_SIC_EEP->GetMean(),auxiliary_Alpha_SIC_EEP->GetRMS()); - f_SIC_EEP -> SetRange (auxiliary_Alpha_SIC_EEP->GetMean()-8*auxiliary_Alpha_SIC_EEP->GetRMS(),auxiliary_Alpha_SIC_EEP->GetMean()+ - 8*auxiliary_Alpha_SIC_EEP->GetRMS()); - - auxiliary_Alpha_SIC_EEP->Fit("f_SIC_EEP","QR"); - - g_AlphaSigmaVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, f_SIC_EEP -> GetParameter(2)); - g_AlphaSigmaVsLoop_SIC_EEP -> SetPointError(iLoop, 0., f_SIC_EEP -> GetParError(2)); - - g_AlphameanVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEP -> GetMean()); - g_AlphameanVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEP -> GetMeanError()); - - g_AlpharmsVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEP -> GetRMS()); - g_AlpharmsVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEP -> GetRMSError()); - - f_BTCP_EEP -> SetParameters (auxiliary_Alpha_BTCP_EEP->GetEntries(),auxiliary_Alpha_BTCP_EEP->GetMean(),auxiliary_Alpha_BTCP_EEP->GetRMS()); - f_BTCP_EEP -> SetRange (auxiliary_Alpha_BTCP_EEP->GetMean()-8*auxiliary_Alpha_BTCP_EEP->GetRMS(),auxiliary_Alpha_BTCP_EEP->GetMean()+ - 8*auxiliary_Alpha_BTCP_EEP->GetRMS()); - - auxiliary_Alpha_BTCP_EEP->Fit("f_BTCP_EEP","QR"); - - g_AlphaSigmaVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, f_BTCP_EEP -> GetParameter(2)); - g_AlphaSigmaVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., f_BTCP_EEP -> GetParError(2)); - - delete auxiliary_Alpha_SIC_EEP ; - delete auxiliary_Alpha_SIC_EEM ; - delete auxiliary_Alpha_BTCP_EEP ; - delete auxiliary_Alpha_BTCP_EEM ; - delete f_SIC_EEP; - delete f_SIC_EEM; - delete f_BTCP_EEP; - delete f_BTCP_EEM; - - //Alpha spread in each ring - std::map *histoTemp_BTCP_EEP = new std::map (); - std::map *histoTemp_BTCP_EEM = new std::map (); - std::map *histoTemp_SIC_EEP = new std::map (); - std::map *histoTemp_SIC_EEM = new std::map (); - - TString Name ; - - for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - - if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) == 0) continue; - - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int thisIx = GetIxFromHashedIndex(iIndex); - int thisIy = GetIyFromHashedIndex(iIndex); - int thisIz = GetZsideFromHashedIndex(iIndex); - - int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); - - if(SicCrystal->isSic(thisIx,thisIy,thisIz)){ - if(!((*histoTemp_SIC_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histoTemp_SIC_EEP_%d",thisIr); - (*histoTemp_SIC_EEP)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - - if(!((*histoTemp_SIC_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histoTemp_SIC_EEM_%d",thisIr); - (*histoTemp_SIC_EEM)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - - float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Alpha value - - if(thisCaliBlock==0) (*histoTemp_SIC_EEM)[thisIr]->Fill(thisAlphaConstant); - else if(thisCaliBlock==1) (*histoTemp_SIC_EEP)[thisIr]->Fill(thisAlphaConstant); - } - - else{ - if(!((*histoTemp_BTCP_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histoTemp_BTCP_EEP_%d",thisIr); - (*histoTemp_BTCP_EEP)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - - if(!((*histoTemp_BTCP_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histoTemp_BTCP_EEM_%d",thisIr); - (*histoTemp_BTCP_EEM)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - - float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Alpha value - - if(thisCaliBlock==0) (*histoTemp_BTCP_EEM)[thisIr]->Fill(thisAlphaConstant); - else if(thisCaliBlock==1) (*histoTemp_BTCP_EEP)[thisIr]->Fill(thisAlphaConstant); - } - - } - - - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - - if(!(*histoTemp_SIC_EEP)[iRing]) continue; - - TF1* funz_SIC_EEP = new TF1("funz_SIC_EEP","gaus",0.,3.); - - funz_SIC_EEP->SetParameters((*histoTemp_SIC_EEP)[iRing]->GetEntries(),(*histoTemp_SIC_EEP)[iRing]->GetMean(),(*histoTemp_SIC_EEP)[iRing]->GetRMS()); - funz_SIC_EEP->SetRange((*histoTemp_SIC_EEP)[iRing]->GetMean()-8*(*histoTemp_SIC_EEP)[iRing]->GetRMS(),(*histoTemp_SIC_EEP)[iRing]->GetMean() - +8*(*histoTemp_SIC_EEP)[iRing]->GetRMS()); - - (*histoTemp_SIC_EEP)[iRing]->Fit("funz_SIC_EEP","QR"); - - hC_AlphaSpreadVsLoop_SIC_EEP->SetBinContent(iLoop,iRing,funz_SIC_EEP->GetParameter(2)); - hC_AlphaSpreadVsLoop_SIC_EEP->SetBinError(iLoop,iRing,funz_SIC_EEP->GetParError(2)); - - delete funz_SIC_EEP; - } - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - - if(!(*histoTemp_BTCP_EEP)[iRing]) continue; - - TF1* funz_BTCP_EEP = new TF1("funz_BTCP_EEP","gaus",0.,3.); - - funz_BTCP_EEP->SetParameters((*histoTemp_BTCP_EEP)[iRing]->GetEntries(),(*histoTemp_BTCP_EEP)[iRing]->GetMean(),(*histoTemp_BTCP_EEP)[iRing]->GetRMS()); - funz_BTCP_EEP->SetRange((*histoTemp_BTCP_EEP)[iRing]->GetMean()-8*(*histoTemp_BTCP_EEP)[iRing]->GetRMS(),(*histoTemp_BTCP_EEP)[iRing]->GetMean() - +8*(*histoTemp_BTCP_EEP)[iRing]->GetRMS()); - - (*histoTemp_BTCP_EEP)[iRing]->Fit("funz_BTCP_EEP","QR"); - - hC_AlphaSpreadVsLoop_BTCP_EEP->SetBinContent(iLoop,iRing,funz_BTCP_EEP->GetParameter(2)); - hC_AlphaSpreadVsLoop_BTCP_EEP->SetBinError(iLoop,iRing,funz_BTCP_EEP->GetParError(2)); - - delete funz_BTCP_EEP; - } - - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - - if(!(*histoTemp_SIC_EEM)[iRing]) continue; - - TF1* funz_SIC_EEM = new TF1("funz_SIC_EEM","gaus",0.,3.); - funz_SIC_EEM->SetParameters((*histoTemp_SIC_EEM)[iRing]->GetEntries(),(*histoTemp_SIC_EEM)[iRing]->GetMean(),(*histoTemp_SIC_EEM)[iRing]->GetRMS()); - funz_SIC_EEM->SetRange((*histoTemp_SIC_EEM)[iRing]->GetMean()-8*(*histoTemp_SIC_EEM)[iRing]->GetRMS(),(*histoTemp_SIC_EEM)[iRing]->GetMean() - +8*(*histoTemp_SIC_EEM)[iRing]->GetRMS()); - - (*histoTemp_SIC_EEM)[iRing]->Fit("funz_SIC_EEM","QR"); - - hC_AlphaSpreadVsLoop_SIC_EEM->SetBinContent(iLoop,iRing,funz_SIC_EEM->GetParameter(2)); - hC_AlphaSpreadVsLoop_SIC_EEM->SetBinError(iLoop,iRing,funz_SIC_EEM->GetParError(2)); - delete funz_SIC_EEM; - - } - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - - if(!(*histoTemp_SIC_EEM)[iRing]) continue; - - TF1* funz_BTCP_EEM = new TF1("funz_BTCP_EEM","gaus",0.,3.); - funz_BTCP_EEM->SetParameters((*histoTemp_BTCP_EEM)[iRing]->GetEntries(),(*histoTemp_BTCP_EEM)[iRing]->GetMean(),(*histoTemp_BTCP_EEM)[iRing]->GetRMS()); - funz_BTCP_EEM->SetRange((*histoTemp_BTCP_EEM)[iRing]->GetMean()-8*(*histoTemp_BTCP_EEM)[iRing]->GetRMS(),(*histoTemp_BTCP_EEM)[iRing]->GetMean() - +8*(*histoTemp_BTCP_EEM)[iRing]->GetRMS()); - - (*histoTemp_BTCP_EEM)[iRing]->Fit("funz_BTCP_EEM","QR"); - - hC_AlphaSpreadVsLoop_BTCP_EEM->SetBinContent(iLoop,iRing,funz_BTCP_EEM->GetParameter(2)); - hC_AlphaSpreadVsLoop_BTCP_EEM->SetBinError(iLoop,iRing,funz_BTCP_EEM->GetParError(2)); - delete funz_BTCP_EEM; - - } - - for( std::map::const_iterator itrechit = histoTemp_SIC_EEM->begin(); itrechit !=histoTemp_SIC_EEM->end(); itrechit++) delete itrechit->second; - for( std::map::const_iterator itrechit = histoTemp_SIC_EEP->begin(); itrechit !=histoTemp_SIC_EEP->end(); itrechit++) delete itrechit->second; - for( std::map::const_iterator itrechit = histoTemp_BTCP_EEM->begin(); itrechit !=histoTemp_BTCP_EEM->end(); itrechit++) delete itrechit->second; - for( std::map::const_iterator itrechit = histoTemp_BTCP_EEP->begin(); itrechit !=histoTemp_BTCP_EEP->end(); itrechit++) delete itrechit->second; - - delete histoTemp_BTCP_EEP; - delete histoTemp_BTCP_EEM; - delete histoTemp_SIC_EEP; - delete histoTemp_SIC_EEM; - - - } /// End of Calibration Loops - - std::map *histo_SIC_EEP = new std::map(); - std::map *histo_SIC_EEM = new std::map(); - std::map *histo_BTCP_EEP = new std::map(); - std::map *histo_BTCP_EEM = new std::map(); - - TString Name ; - - ///Fill the histo of IntercalibValues after the loops at last step - for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ - - if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) == 0 ) continue; - - int thisCaliBlock = -1; - if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; - else thisCaliBlock = 1; - - int thisIx = GetIxFromHashedIndex(iIndex); - int thisIy = GetIyFromHashedIndex(iIndex); - int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal - - int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to - - float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value - - if ( thisCaliBlock == 0 ) h_Alpha_EEM -> Fill (thisIx, thisIy, thisAlphaConstant); - else h_Alpha_EEP -> Fill (thisIx, thisIy, thisAlphaConstant); - - - if(SicCrystal->isSic(thisIx,thisIy,thisIz)){ - - if ( thisCaliBlock == 0 ) p_AlphaVsIeta_SIC_EEM -> Fill (thisIr,thisAlphaConstant); - else p_AlphaVsIeta_SIC_EEP -> Fill (thisIr,thisAlphaConstant); - - - if((!(*histo_SIC_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histo_SIC_EEP_%d",thisIr); - (*histo_SIC_EEP)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - if((!(*histo_SIC_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histo_SIC_EEM_%d",thisIr); - (*histo_SIC_EEM)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - - if(thisCaliBlock==0) (*histo_SIC_EEM)[thisIr]->Fill(thisAlphaConstant); - else if(thisCaliBlock==1) (*histo_SIC_EEP)[thisIr]->Fill(thisAlphaConstant); - } - else{ - - if ( thisCaliBlock == 0 ) p_AlphaVsIeta_BTCP_EEM -> Fill (thisIr,thisAlphaConstant); - else p_AlphaVsIeta_BTCP_EEP -> Fill (thisIr,thisAlphaConstant); - - if((!(*histo_BTCP_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histo_BTCP_EEP_%d",thisIr); - (*histo_BTCP_EEP)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - if((!(*histo_BTCP_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histo_BTCP_EEM_%d",thisIr); - (*histo_BTCP_EEM)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); - } - - if(thisCaliBlock==0) (*histo_BTCP_EEM)[thisIr]->Fill(thisAlphaConstant); - else if(thisCaliBlock==1) (*histo_BTCP_EEP)[thisIr]->Fill(thisAlphaConstant); - } - - } - - // spread and mean value vs iRing - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - if(!(*histo_SIC_EEP)[iRing]) continue; - - TF1* f_SIC_EEP = new TF1("f_SIC_EEP","gaus",0.,3.); - f_SIC_EEP->SetParameters((*histo_SIC_EEP)[iRing]->GetEntries(),(*histo_SIC_EEP)[iRing]->GetMean(),(*histo_SIC_EEP)[iRing]->GetRMS()); - f_SIC_EEP->SetRange((*histo_SIC_EEP)[iRing]->GetMean()-8*(*histo_SIC_EEP)[iRing]->GetRMS(),(*histo_SIC_EEP)[iRing]->GetMean() - +8*(*histo_SIC_EEP)[iRing]->GetRMS()); - - (*histo_SIC_EEP)[iRing]->Fit("f_SIC_EEP","QR"); - - AlphaSpreadVsIeta_SIC_EEP->SetBinContent(iRing,f_SIC_EEP->GetParameter(2)); - AlphaSpreadVsIeta_SIC_EEP->SetBinError(iRing,f_SIC_EEP->GetParError(2)); - - delete f_SIC_EEP; - - } - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - if(!(*histo_BTCP_EEP)[iRing]) continue; - - TF1* f_BTCP_EEP = new TF1("f_BTCP_EEP","gaus",0.,3.); - f_BTCP_EEP->SetParameters((*histo_BTCP_EEP)[iRing]->GetEntries(),(*histo_BTCP_EEP)[iRing]->GetMean(),(*histo_BTCP_EEP)[iRing]->GetRMS()); - f_BTCP_EEP->SetRange((*histo_BTCP_EEP)[iRing]->GetMean()-8*(*histo_BTCP_EEP)[iRing]->GetRMS(),(*histo_BTCP_EEP)[iRing]->GetMean() - +8*(*histo_BTCP_EEP)[iRing]->GetRMS()); - - (*histo_BTCP_EEP)[iRing]->Fit("f_BTCP_EEP","QR"); - - AlphaSpreadVsIeta_BTCP_EEP->SetBinContent(iRing,f_BTCP_EEP->GetParameter(2)); - AlphaSpreadVsIeta_BTCP_EEP->SetBinError(iRing,f_BTCP_EEP->GetParError(2)); - - delete f_BTCP_EEP; - - } - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - if(!(*histo_SIC_EEM)[iRing]) continue; - - TF1* f_SIC_EEM = new TF1("f_SIC_EEM","gaus",0.,3.); - f_SIC_EEM->SetParameters((*histo_SIC_EEM)[iRing]->GetEntries(),(*histo_SIC_EEM)[iRing]->GetMean(),(*histo_SIC_EEM)[iRing]->GetRMS()); - f_SIC_EEM->SetRange((*histo_SIC_EEM)[iRing]->GetMean()-8*(*histo_SIC_EEM)[iRing]->GetRMS(),(*histo_SIC_EEM)[iRing]->GetMean() - +8*(*histo_SIC_EEM)[iRing]->GetRMS()); - - (*histo_SIC_EEM)[iRing]->Fit("f_SIC_EEM","QR"); - - AlphaSpreadVsIeta_SIC_EEM->SetBinContent(iRing,f_SIC_EEM->GetParameter(2)); - AlphaSpreadVsIeta_SIC_EEM->SetBinError(iRing,f_SIC_EEM->GetParError(2)); - - delete f_SIC_EEM; - - } - - for( unsigned int iRing = 0; iRingsize(); iRing++){ - if(!(*histo_BTCP_EEM)[iRing]) continue; - - TF1* f_BTCP_EEM = new TF1("f_BTCP_EEM","gaus",0.,3.); - f_BTCP_EEM->SetParameters((*histo_BTCP_EEM)[iRing]->GetEntries(),(*histo_BTCP_EEM)[iRing]->GetMean(),(*histo_BTCP_EEM)[iRing]->GetRMS()); - f_BTCP_EEM->SetRange((*histo_BTCP_EEM)[iRing]->GetMean()-8*(*histo_BTCP_EEM)[iRing]->GetRMS(),(*histo_BTCP_EEM)[iRing]->GetMean() - +8*(*histo_BTCP_EEM)[iRing]->GetRMS()); - - (*histo_BTCP_EEM)[iRing]->Fit("f_BTCP_EEM","QR"); - - AlphaSpreadVsIeta_BTCP_EEM->SetBinContent(iRing,f_BTCP_EEM->GetParameter(2)); - AlphaSpreadVsIeta_BTCP_EEM->SetBinError(iRing,f_BTCP_EEM->GetParError(2)); - - delete f_BTCP_EEM; - - } - - - for( std::map::const_iterator itrechit = histo_SIC_EEP->begin(); itrechit !=histo_SIC_EEP->end(); itrechit++) delete itrechit->second; - for( std::map::const_iterator itrechit = histo_SIC_EEM->begin(); itrechit !=histo_SIC_EEM->end(); itrechit++) delete itrechit->second; - for( std::map::const_iterator itrechit = histo_BTCP_EEP->begin(); itrechit !=histo_BTCP_EEP->end(); itrechit++) delete itrechit->second; - for( std::map::const_iterator itrechit = histo_BTCP_EEM->begin(); itrechit !=histo_BTCP_EEM->end(); itrechit++) delete itrechit->second; - - delete histo_SIC_EEP; - delete histo_SIC_EEM; - delete histo_BTCP_EEP; - delete histo_BTCP_EEM; -} - - -/// Save in the output -void XtalAlphaEE::saveHistos(TFile * f1){ - - f1->cd(); - - ///service histos - h_Alpha_hashedIndex_EE ->Write(); - h_occupancy_hashedIndex_EE ->Write(); - hC_EoP ->Write(*f1); - - ///EE+ - - hC_AlphaValues_SIC_EEP ->Write(*f1); - hC_AlphaSpreadVsLoop_SIC_EEP ->Write(*f1); - hC_Alpha_SIC_EEP ->Write("",*f1); - hC_AlphaValues_BTCP_EEP ->Write(*f1); - hC_AlphaSpreadVsLoop_BTCP_EEP ->Write(*f1); - hC_Alpha_BTCP_EEP ->Write("",*f1); - - h_Alpha_EEP ->Write(); - h_scalib_EEP ->Write(); - - h_occupancy_EEP ->Write(); - h_map_Dead_Channels_EEP ->Write(); - - p_AlphaVsIeta_SIC_EEP ->Write(); - AlphaSpreadVsIeta_SIC_EEP ->Write(); - - g_AlphameanVsLoop_SIC_EEP ->Write("g_AlphameanVsLoop_SIC_EEP"); - g_AlpharmsVsLoop_SIC_EEP ->Write("g_AlpharmsVsLoop_SIC_EEP"); - g_AlphaSigmaVsLoop_SIC_EEP ->Write("g_AlphaSigmaVsLoop_SIC_EEP"); - - p_AlphaVsIeta_BTCP_EEP ->Write(); - AlphaSpreadVsIeta_BTCP_EEP ->Write(); - - g_AlphameanVsLoop_BTCP_EEP ->Write("g_AlphameanVsLoop_BTCP_EEP"); - g_AlpharmsVsLoop_BTCP_EEP ->Write("g_AlpharmsVsLoop_BTCP_EEP"); - g_AlphaSigmaVsLoop_BTCP_EEP ->Write("g_AlphaSigmaVsLoop_BTCP_EEP"); - - ///EE- - - hC_AlphaValues_SIC_EEM ->Write(*f1); - hC_AlphaSpreadVsLoop_SIC_EEM ->Write(*f1); - hC_Alpha_SIC_EEM ->Write("",*f1); - hC_AlphaValues_BTCP_EEM ->Write(*f1); - hC_AlphaSpreadVsLoop_BTCP_EEM ->Write(*f1); - hC_Alpha_BTCP_EEM ->Write("",*f1); - - h_Alpha_EEM ->Write(); - h_scalib_EEM ->Write(); - - h_occupancy_EEM ->Write(); - h_map_Dead_Channels_EEM ->Write(); - - p_AlphaVsIeta_SIC_EEM ->Write(); - AlphaSpreadVsIeta_SIC_EEM ->Write(); - - g_AlphameanVsLoop_SIC_EEM ->Write("g_AlphameanVsLoop_SIC_EEM"); - g_AlpharmsVsLoop_SIC_EEM ->Write("g_AlpharmsVsLoop_SIC_EEM"); - g_AlphaSigmaVsLoop_SIC_EEM ->Write("g_AlphaSigmaVsLoop_SIC_EEM"); - - p_AlphaVsIeta_BTCP_EEM ->Write(); - AlphaSpreadVsIeta_BTCP_EEM ->Write(); - - g_AlphameanVsLoop_BTCP_EEM ->Write("g_AlphameanVsLoop_BTCP_EEM"); - g_AlpharmsVsLoop_BTCP_EEM ->Write("g_AlpharmsVsLoop_BTCP_EEM"); - g_AlphaSigmaVsLoop_BTCP_EEM ->Write("g_AlphaSigmaVsLoop_BTCP_EEM"); - - f1->Close(); - - return; -} - -/// Save E/p distributions -void XtalAlphaEE::saveEoPeta(TFile * f2){ - - f2->cd(); - - hC_EoP_ir_ele ->Write(*f2); - - f2->Close(); -} - -/// Acquire fake Dead Xtal in order to study the effect of IC near them -void XtalAlphaEE::AcquireDeadXtal(TString inputDeadXtal){ - - if(inputDeadXtal!="NULL") - { - std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); - - std::string buffer; - int iX, iY ,iZ; - - while(!DeadXtal.eof()) - { - getline(DeadXtal,buffer); - std::stringstream line( buffer ); - line >> iX >> iY >>iZ ; - DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; - - } - - sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); - } - else{ - DeadXtal_HashedIndex.push_back(-9999); - } - -} -/// Check if the channel considered is in the list of dead or not -bool XtalAlphaEE::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ - - int hashed_Index; - hashed_Index = GetHashedIndexEE(iX,iY,iZ); - - std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); - - if(iter !=DeadXtal_HashedIndex.end()) - return true; - else return false; -} - diff --git a/EOverPCalibration/FastCalibrator/src/Zutils.cc b/EOverPCalibration/FastCalibrator/src/Zutils.cc deleted file mode 100644 index 8c7b0581ddb..00000000000 --- a/EOverPCalibration/FastCalibrator/src/Zutils.cc +++ /dev/null @@ -1,640 +0,0 @@ -#include "../interface/Zutils.h" -#include -#include "TMath.h" -#include "TRandom3.h" -#include "TStyle.h" - -int nPoint; -double mZ_min, mZ_max ; -std::string energySC ; - -/*** breit-wigner ***/ -double breitWigner(double* x, double* par){ - //[0] = N - //[1] = mass - //[2] = width - - double xx = x[0]; - double M = par[1]; - double G = par[2]; - - double gamma = sqrt(M*M*(M*M+G*G)); - double norm =(2.*sqrt(2)*M*G*gamma)/(TMath::Pi()*sqrt(M*M+gamma)); - - return par[0]*norm / ( pow((xx*xx-M*M),2) + M*M*G*G ); -} - -/*** crystall ball with low tail ***/ -double crystalBallLow(double* x, double* par){ - //[0] = N - //[1] = mean - //[2] = sigma - //[3] = alpha - //[4] = n - - double xx = x[0]; - double mean = par[1]; - double sigma = par[2]; - double alpha = par[3]; - double n = par[4]; - - if( (xx-mean)/sigma <= -1.*fabs(alpha) ) { - double A = pow(n/fabs(alpha), n) * exp(-0.5 * TMath::Power(fabs(alpha),2)); - double B = n/fabs(alpha) - fabs(alpha); - return par[0] * A * pow((B - (xx-mean)/sigma), -1.*n); - } - - else{ - return par[0] * exp(-1. * (xx-mean)*(xx-mean) / (2*sigma*sigma) ); - } - -} - -/*** double crystall ball ***/ -double crystalBallLowHigh(double* x, double* par) -{ - //[0] = N - //[1] = mean - //[2] = sigma - //[3] = alpha - //[4] = n - //[5] = alpha2 - //[6] = n2 - //[7] = scale - - double xx = x[0] * par[7]; - double mean = par[1]; - double sigma = par[2]; - double alpha = par[3]; - double n = par[4]; - double alpha2 = par[5]; - double n2 = par[6]; - - if( (xx-mean)/sigma > fabs(alpha) ) - { - double A = pow(n/fabs(alpha), n) * exp(-0.5 * alpha*alpha); - double B = n/fabs(alpha) - fabs(alpha); - - return par[0] * par[7] * A * pow(B + (xx-mean)/sigma, -1.*n); - } - - else if( (xx-mean)/sigma < -1.*fabs(alpha2) ) - { - double A = pow(n2/fabs(alpha2), n2) * exp(-0.5 * alpha2*alpha2); - double B = n2/fabs(alpha2) - fabs(alpha2); - - return par[0] * par[7] * A * pow(B - (xx-mean)/sigma, -1.*n2); - } - - else - { - return par[0] * par[7] * exp(-1. * (xx-mean)*(xx-mean) / (2*sigma*sigma) ); - } - -} - -/*** breit-wigner convoluted with crystalBall ***/ -double breitWigner_crystalBallLow(double* x, double* par){ - //[0] = N - //[1] = b.w. - mass - //[2] = b.w. - width - //[3] = c.b. - mean - //[4] = c.b. - sigma - //[5] = c.b. - alpha - //[6] = c.b. - n - - double xx = x[0]; - double N = par[0]; - double M = par[1]; - double G = par[2]; - double mean = par[3]; - double sigma = par[4]; - double alpha = par[5]; - double n = par[6]; - - TF1* bw = new TF1("temp_bw",breitWigner,mZ_min,mZ_max,3); - bw -> FixParameter(0,1.); - bw -> FixParameter(1,M); - bw -> FixParameter(2,G); - - TF1* cb = new TF1("temp_cb",crystalBallLow,mZ_min,mZ_max,5); - - cb -> FixParameter(0,N); - cb -> FixParameter(1,mean); - cb -> FixParameter(2,sigma); - cb -> FixParameter(3,alpha); - cb -> FixParameter(4,n); - - double stepWidth = (mZ_max-mZ_min)/nPoint; - double val = 0.; - - for(int ibin = 0; ibin < nPoint; ++ibin){ - double yy = mZ_min+ibin*stepWidth; - val += bw->Eval(yy) * cb->Eval(xx-yy); - } - - delete bw; - delete cb; - return val; -} - -/*** Visible BwCB FWH estimation assumption the function is monotonic in the interval***/ -std::pair breitWigner_crystalBallLowFWHM(TF1* bwcb, const double &min,const double &max, const double &Precision,const int & maxCycle){ - -std::pair extreme ; -extreme.first = -99. ; extreme.second=-99.; - -std::cout<<" Entering "<GetMaximumX(); - -std::cout<<" xMax = "<GetMaximum(); - -std::cout<<" MAX = "< IntervalUp ; -IntervalUp.first = xMAX ; IntervalUp.second=max; - -std::pair IntervalDown ; -IntervalDown.first = min ; IntervalDown.second=xMAX; - -bool EndUp=false, EndDown=false; - -for(int icycle=0; icycleEval(IntervalDown.second)-bwcb->Eval(IntervalDown.first))<=Precision) EndDown = true; - -if(fabs(bwcb->Eval(IntervalUp.second)-bwcb->Eval(IntervalUp.first))<=Precision) EndUp = true; - -if(EndUp && EndDown) break; - -} - -extreme.first=(IntervalDown.second -IntervalDown.first )/2 +IntervalDown.first; -extreme.second=(IntervalUp.second -IntervalUp.first )/2 +IntervalUp.first; - -std::cout<<" extreme first = "<>>Zutils::DrawZPeak::draw peaks" << std::endl; - std::string h_mZ_DATA_Name = h_mZ_DATA->GetName(); - std::string h_mZ_MC_Name = h_mZ_MC->GetName(); - - TCanvas* c = new TCanvas(("c_mZ_DATA"+h_mZ_DATA_Name).c_str(),("mZ - "+h_mZ_DATA_Name).c_str(),0,0,600,600); - c -> cd(); - c -> SetGridx(); - c -> SetGridy(); - - c -> SetLeftMargin(0.15); - c -> SetRightMargin(0.15); - - char axisTitle[50]; - sprintf(axisTitle,"events / %.2e GeV/c^{2}",h_mZ_DATA->GetBinWidth(1)); - h_mZ_DATA -> Rebin(rebin); - h_mZ_DATA -> GetXaxis() -> SetLabelSize(0.03); - h_mZ_DATA -> GetXaxis() -> SetLabelFont(42); - h_mZ_DATA -> GetXaxis() -> SetTitleSize(0.03); - h_mZ_DATA -> GetXaxis() -> SetTitleOffset(1.5); - h_mZ_DATA -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); - h_mZ_DATA -> GetYaxis() -> SetLabelSize(0.03); - h_mZ_DATA -> GetYaxis() -> SetTitle(axisTitle); - - h_mZ_DATA -> SetLineWidth(2); - h_mZ_DATA -> SetLineColor(kGreen+2); - h_mZ_DATA -> SetMarkerColor(kBlack); - h_mZ_DATA -> SetMarkerStyle(20); - h_mZ_DATA -> SetMarkerSize(0.5); - h_mZ_DATA -> GetYaxis() -> SetTitleOffset(1.5); - h_mZ_DATA -> Draw("P"); - gPad->Update(); - - h_mZ_DATA -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_DATA->GetMaximum()); - gPad->Update(); - - TCanvas* c1 = new TCanvas(("c_mZ_MC"+h_mZ_MC_Name).c_str(),("mZ - "+h_mZ_MC_Name).c_str(),0,0,600,600); - c1 -> cd(); - c1 -> SetGridx(); - c1 -> SetGridy(); - - c1 -> SetLeftMargin(0.15); - c1 -> SetRightMargin(0.15); - - h_mZ_MC -> Rebin(rebin); - h_mZ_MC -> Scale(1.*h_mZ_DATA->GetEntries()/h_mZ_MC->GetEntries()); - h_mZ_MC -> GetXaxis() -> SetLabelSize(0.03); - h_mZ_MC -> GetXaxis() -> SetLabelFont(42); - h_mZ_MC -> GetXaxis() -> SetTitleSize(0.03); - h_mZ_MC -> GetXaxis() -> SetTitleOffset(1.5); - h_mZ_MC -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); - h_mZ_MC -> GetYaxis() -> SetLabelSize(0.03); - h_mZ_MC -> GetYaxis() -> SetTitleOffset(1.5); - h_mZ_MC -> GetYaxis() -> SetTitle(axisTitle); - - h_mZ_MC -> SetLineWidth(2); - h_mZ_MC -> SetLineColor(kRed+1); - h_mZ_MC -> SetMarkerColor(kBlack); - h_mZ_MC -> SetMarkerStyle(20); - h_mZ_MC -> SetMarkerSize(0.5); - h_mZ_MC -> Draw("P"); - gPad->Update(); - - h_mZ_MC -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_MC->GetMaximum()); - gPad->Update(); - - //---------- - // fit peaks - - std::cout << ">>>Zutils::DrawZPeak::fit peaks" << std::endl; - std::string funcNameDATA = "bw_cb_DATA_" + category +"_"+energySC; - std::string funcNameMC = "bw_cb_MC_" + category +"_"+energySC; - - if(category == "EE-EE" || category == "EEp" || category == "EEm" || category=="EE_R9_g" || category=="EE_R9_l" || category=="EE_Eta_l" || category=="EE_Eta_g" ){ - - TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_DATA -> SetNpx(10000); - bw_cb_DATA -> SetLineColor(kGreen+2); - bw_cb_DATA -> SetLineWidth(2); - bw_cb_DATA -> SetLineStyle(1); - c->cd(); - - TFitResultPtr rpDATA; - int fStatusDATA; - do{ - SetParameterFunctionEE_EE(bw_cb_DATA, rand); - rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); - fStatusDATA = rpDATA; - } while(fStatusDATA!=0); - - bw_cb_DATA -> Draw("same"); - - - TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_MC -> SetNpx(10000); - bw_cb_MC -> SetLineWidth(2); - bw_cb_MC -> SetLineStyle(1); - bw_cb_MC -> SetLineColor(kRed+1); - c1->cd(); - - int fStatusMC; - TFitResultPtr rpMC; - do{ - - SetParameterFunctionEE_EE(bw_cb_MC, rand); - rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL"); - fStatusMC = rpMC; - std::cout<<" fStatus "< Draw("same"); - } - -if(category == "EB-EE" || category=="EB_R9_l"){ - - TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_DATA -> SetNpx(10000); - bw_cb_DATA -> SetLineColor(kGreen+2); - bw_cb_DATA -> SetLineWidth(2); - bw_cb_DATA -> SetLineStyle(1); - c->cd(); - TFitResultPtr rpDATA; - int fStatusDATA; - do{ - SetParameterFunctionEB_EE(bw_cb_DATA, rand); - rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); - fStatusDATA = rpDATA; - } while(fStatusDATA!=0); - - bw_cb_DATA -> Draw("same"); - - TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_MC -> SetNpx(10000); - bw_cb_MC -> SetLineWidth(2); - bw_cb_MC -> SetLineStyle(1); - bw_cb_MC -> SetLineColor(kRed+1); - c1->cd(); - - TFitResultPtr rpMC; - int fStatusMC; - do{ - SetParameterFunctionEB_EE(bw_cb_MC, rand); - rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL"); - fStatusMC = rpMC; - } while(fStatusMC!=0); - - bw_cb_MC -> Draw("same"); - } - -if(category == "EB-EB" || category == "EBp" || category == "EBm" || category=="EB_R9_g" || category=="EB_Eta_l"|| category=="EB_Eta_g"){ - - TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_DATA -> SetNpx(10000); - bw_cb_DATA -> SetLineColor(kGreen+2); - bw_cb_DATA -> SetLineWidth(2); - bw_cb_DATA -> SetLineStyle(1); - c->cd(); - - TFitResultPtr rpDATA; - int fStatusDATA; - do{ - SetParameterFunctionEB_EB(bw_cb_DATA, rand); - rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); - fStatusDATA = rpDATA; - } while(fStatusDATA!=0); - - bw_cb_DATA -> Draw("same"); - - TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_MC -> SetNpx(10000); - bw_cb_MC -> SetLineWidth(2); - bw_cb_MC -> SetLineStyle(1); - bw_cb_MC -> SetLineColor(kRed+1); - c1->cd(); - - TFitResultPtr rpMC; - int fStatusMC; - do{ - SetParameterFunctionEB_EB(bw_cb_MC, rand); - rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL+"); - fStatusMC = rpMC; - } while(fStatusMC!=0); - - bw_cb_MC -> Draw("same"); - - } - - // ------------------ - // get the statistics - - - TPaveStats* p_mZ_DATA = (TPaveStats*)(h_mZ_DATA->GetListOfFunctions()->FindObject("stats")); - p_mZ_DATA->SetX1NDC(0.69); - p_mZ_DATA->SetX2NDC(0.99); - p_mZ_DATA->SetY1NDC(0.69); - p_mZ_DATA->SetY2NDC(0.99); - p_mZ_DATA->SetTextColor(kGreen+2); - p_mZ_DATA->SetOptFit(0012); - p_mZ_DATA->Draw("same"); - - TPaveStats* p_mZ_MC = (TPaveStats*)(h_mZ_MC->GetListOfFunctions()->FindObject("stats")); - p_mZ_MC->SetX1NDC(0.69); - p_mZ_MC->SetX2NDC(0.99); - p_mZ_MC->SetY1NDC(0.69); - p_mZ_MC->SetY2NDC(0.99); - p_mZ_MC->SetTextColor(kRed+1); - p_mZ_MC->SetOptFit(0012); - p_mZ_MC->Draw("same"); - - - // --------------- - // print the plots - - c -> Print((h_mZ_DATA_Name+"_rerecoICHEP2012.png").c_str(),"png"); - c1 -> Print((h_mZ_MC_Name+"_MC_IC_v2.png").c_str(),"png"); - - delete c; - delete c1; -} - - -void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, - int nPoints, const double &min,const double &max,std::string energyType ){ - - nPoint = nPoints; - mZ_min = min; - mZ_max = max; - energySC = energyType ; - - TRandom3 * rand = new TRandom3(); - - //----------- - // draw peaks - std::cout << ">>>Zutils::DrawZPeak::draw peaks" << std::endl; - std::string h_mZ_DATA_Name = h_mZ_DATA->GetName(); - - TCanvas* c = new TCanvas(("c_mZ_DATA"+h_mZ_DATA_Name).c_str(),("mZ - "+h_mZ_DATA_Name).c_str(),0,0,600,600); - c -> cd(); - c -> SetGridx(); - c -> SetGridy(); - - c -> SetLeftMargin(0.15); - c -> SetRightMargin(0.15); - - char axisTitle[50]; - sprintf(axisTitle,"events / %.2e GeV/c^{2}",h_mZ_DATA->GetBinWidth(1)); - h_mZ_DATA -> Rebin(rebin); - h_mZ_DATA -> GetXaxis() -> SetLabelSize(0.03); - h_mZ_DATA -> GetXaxis() -> SetLabelFont(42); - h_mZ_DATA -> GetXaxis() -> SetTitleSize(0.03); - h_mZ_DATA -> GetXaxis() -> SetTitleOffset(1.5); - h_mZ_DATA -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); - h_mZ_DATA -> GetYaxis() -> SetLabelSize(0.03); - h_mZ_DATA -> GetYaxis() -> SetTitle(axisTitle); - - h_mZ_DATA -> SetLineWidth(2); - h_mZ_DATA -> SetLineColor(kGreen+2); - h_mZ_DATA -> SetMarkerColor(kBlack); - h_mZ_DATA -> SetMarkerStyle(20); - h_mZ_DATA -> SetMarkerSize(0.5); - h_mZ_DATA -> GetYaxis() -> SetTitleOffset(1.5); - h_mZ_DATA -> Draw("P"); - gPad->Update(); - - h_mZ_DATA -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_DATA->GetMaximum()); - gPad->Update(); - - //---------- - // fit peaks - - std::cout << ">>>Zutils::DrawZPeak::fit peaks" << std::endl; - std::string funcNameDATA = "bw_cb_DATA_" + category+"_"+energyType; - - - if(category == "EE-EE" || category == "EEp" || category == "EEm" || category=="EE_R9_g" || category=="EE_R9_l" || category=="EE_Eta_l" || category=="EE_Eta_g" ){ - TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_DATA -> SetNpx(10000); - bw_cb_DATA -> SetLineColor(kGreen+2); - bw_cb_DATA -> SetLineWidth(2); - bw_cb_DATA -> SetLineStyle(1); - c->cd(); - TFitResultPtr rp; - int fStatus; - do{ - SetParameterFunctionEE_EE(bw_cb_DATA, rand); - rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); - fStatus = rp; - }while(fStatus!=0); - - bw_cb_DATA -> Draw("same"); - - } - -if(category == "EB-EE" || category=="EB_R9_l" ){ - TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_DATA -> SetNpx(10000); - bw_cb_DATA -> SetLineColor(kGreen+2); - bw_cb_DATA -> SetLineWidth(2); - bw_cb_DATA -> SetLineStyle(1); - c->cd(); - TFitResultPtr rp; - int fStatus; - do{ - SetParameterFunctionEB_EE(bw_cb_DATA, rand); - rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); - fStatus = rp; - }while(fStatus!=0); - bw_cb_DATA -> Draw("same"); - } - -if(category == "EB-EB" || category == "EBp" || category == "EBm" || category=="EB_R9_g" || category=="EB_Eta_l" || category=="EB_Eta_g"){ - TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); - bw_cb_DATA -> SetNpx(10000); - bw_cb_DATA -> SetLineColor(kGreen+2); - bw_cb_DATA -> SetLineWidth(2); - bw_cb_DATA -> SetLineStyle(1); - c->cd(); - TFitResultPtr rp; - int fStatus; - do{ - SetParameterFunctionEB_EB(bw_cb_DATA, rand); - rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); - fStatus = rp; - }while(fStatus!=0); - bw_cb_DATA -> Draw("same"); - } - - - // ------------------ - // get the statistics - - - TPaveStats* p_mZ_DATA = (TPaveStats*)(h_mZ_DATA->GetListOfFunctions()->FindObject("stats")); - p_mZ_DATA->SetX1NDC(0.69); - p_mZ_DATA->SetX2NDC(0.99); - p_mZ_DATA->SetY1NDC(0.69); - p_mZ_DATA->SetY2NDC(0.99); - p_mZ_DATA->SetTextColor(kGreen+2); - p_mZ_DATA->SetOptFit(0012); - p_mZ_DATA->Draw("same"); - - // --------------- - // print the plots - - c -> Print((h_mZ_DATA_Name+"_DATA_DATA_rerecoICHEP2012_v2.png").c_str(),"png"); - - delete c; -} - -void SetParameterFunctionEE_EE(TF1* bw_cb, TRandom3 * rand){ - - // Z invariant Mass - bw_cb -> SetParName(1,"M_{Z}"); - bw_cb -> FixParameter(1,91.18); - // Z FWHM - bw_cb -> SetParName(2,"#Gamma_{Z}"); - bw_cb -> FixParameter(2,2.4952); - // Normalization - bw_cb -> SetParName(0,"N"); - bw_cb -> SetParameter(0,rand->Uniform(10.,20.)); - // Delta M - bw_cb -> SetParName(3,"#Deltam"); - bw_cb -> SetParameter(3,rand->Uniform(0.,1.5)); - // Sigma CB - bw_cb -> SetParName(4,"#sigma_{CB}"); - bw_cb -> SetParameter(4,rand->Uniform(2.,3.5)); - // Alpha CB - bw_cb -> SetParName(5,"#alpha"); - bw_cb -> SetParameter(5,rand->Uniform(1.,2.)); - // n parameter CB - bw_cb -> SetParName(6,"n"); - bw_cb -> SetParameter(6,rand->Uniform(1.5,4.)); -} - -void SetParameterFunctionEB_EE(TF1* bw_cb, TRandom3 * rand){ - - // Z invariant Mass - bw_cb -> SetParName(1,"M_{Z}"); - bw_cb -> FixParameter(1,91.18); - // Z FWHM - bw_cb -> SetParName(2,"#Gamma_{Z}"); - bw_cb -> FixParameter(2,2.4952); - // Normalization - bw_cb -> SetParName(0,"N"); - bw_cb -> SetParameter(0,rand->Uniform(300.,600.)); - // Delta M - bw_cb -> SetParName(3,"#Deltam"); - bw_cb -> SetParameter(3,rand->Uniform(0.9,1.5)); - // Sigma CB - bw_cb -> SetParName(4,"#sigma_{CB}"); - bw_cb -> SetParameter(4,rand->Uniform(2.,3.)); - // Alpha CB - bw_cb -> SetParName(5,"#alpha"); - bw_cb -> SetParameter(5,rand->Uniform(0.7,1.4)); - // n parameter CB - bw_cb -> SetParName(6,"n"); - bw_cb -> SetParameter(6,rand->Uniform(2.,4.)); -} - -void SetParameterFunctionEB_EB(TF1* bw_cb, TRandom3 * rand){ - - // Z invariant Mass - bw_cb -> SetParName(1,"M_{Z}"); - bw_cb -> FixParameter(1,91.18); - // Z FWHM - bw_cb -> SetParName(2,"#Gamma_{Z}"); - bw_cb -> FixParameter(2,2.4952); - // Normalization - bw_cb -> SetParName(0,"N"); - bw_cb -> SetParameter(0,rand->Uniform(300.,500.)); - // Delta M - bw_cb -> SetParName(3,"#Deltam"); - bw_cb -> SetParameter(3,rand->Uniform(-0.5,0.7)); - // Sigma CB - bw_cb -> SetParName(4,"#sigma_{CB}"); - bw_cb -> SetParameter(4,rand->Uniform(0.7,1.6)); - // Alpha CB - bw_cb -> SetParName(5,"#alpha"); - bw_cb -> SetParameter(5,rand->Uniform(1.,1.9)); - // n parameter CB - bw_cb -> SetParName(6,"n"); - bw_cb -> SetParameter(6,rand->Uniform(1.5,3.7)); -} diff --git a/EOverPCalibration/FastCalibrator/src/geometryUtils.cc b/EOverPCalibration/FastCalibrator/src/geometryUtils.cc deleted file mode 100644 index 155b76e722a..00000000000 --- a/EOverPCalibration/FastCalibrator/src/geometryUtils.cc +++ /dev/null @@ -1,256 +0,0 @@ -#include "../interface/geometryUtils.h" - -// --- EE --- -// default constructor, reading the map from file -TEndcapRegions::TEndcapRegions() -{ - //initializing the matrix - for(int ii=0; ii<100; ++ii) - for(int jj=0; jj<100; ++jj) - { - iEndcapRing[ii][jj][-1] = -1; - iEndcapRing[ii][jj][0] = -1; - iEndcapRing[ii][jj][+1] = -1; - iLMR[ii][jj][0] = -1; - iLMR[ii][jj][1] = -1; - } - FILE *fRing; - fRing = fopen("eeregions.dat","r"); - std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; - int ix,iy,iz,ir,lmr; - while(fscanf(fRing,"(%d,%d,%d) %d %d\n",&ix,&iy,&iz,&lmr,&ir) !=EOF ) { - iEndcapRing[ix-1][iy-1][iz] = ir; - iLMR[ix-1][iy-1][iz] = lmr; - } - return; -} - -//dtor -TEndcapRegions::~TEndcapRegions() { return;} - - - - -//methods -int TEndcapRegions::GetNRegions(const std::string& type, const int nRings) -{ - if( type == "LMR" ) return 38; - if( type == "RING" && nRings == 0 ) return 78; - if( type == "RING" ) return 2*nRings; - - return -1; -} - -int TEndcapRegions::GetRegionId(const int ix, const int iy, const int iz, const std::string& type) -{ - int iSide = iz; - if (iSide<0) iSide=0; - if( type == "LMR" ) - { - return iLMR[ix-1][iy-1][iSide] + 19*iSide; - } - if(type == "RING") - { - if(iSide == 0) - return -(iEndcapRing[ix-1][iy-1][iz]); - if(iSide > 0) - return iEndcapRing[ix-1][iy-1][iz]; - } - return -1; -} - -int TEndcapRegions::GetEndcapRing(const int ix, const int iy, const int iz, const int nRings ){ - int iSide = iz; - float ringWidth = int(39./nRings)+1; - if(nRings == 0) - { - if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; - else return iEndcapRing[ix-1][iy-1][iSide]; - } - else - { - if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; - else - { - if(iSide < 0) return -int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); - if(iSide > 0) return int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); - } - } - return -1; -} - -int TEndcapRegions::GetEndcapIeta(const int ix, const int iy, const int iz, const std::string& type, const int nRings){ - int iSide = iz; - int iEtaOffset = 86*iz; - int iEta = iEtaOffset + iz*iEndcapRing[ix-1][iy-1][iSide]; - float ringWidth = int(39./nRings); - if(type == "RING") - { - if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; - else - { - if(iSide < 0) return -int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); - if(iSide > 0) return int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); - } - } - return iEta; -} - - - - -// --- EB --- -// default constructor (NEEDED FOR INPUT REGIONS FROM EXTERNAL FILE) -TBarrelRegions::TBarrelRegions() { - //initializing the matrix - for(int ii=0; ii<171; ++ii) - for(int kk=0; kk<360; ++kk) - { - iBarrelRings[ii][kk] = -1; - iLMR[ii][kk] = -1; - iSM[ii][kk] = -1; - iTT[ii][kk] = -1; - } - - FILE *fRegion; - fRegion = fopen("ebregions.dat","r"); - std::cout << "Inizializing barrel geometry from: ebregions.dat" << std::endl; - - int ieta,iphi,sm,tt,lmr; - std::map dummyMap; - while(fscanf(fRegion,"(%d ,%d) %d %d %d\n",&ieta,&iphi,&sm,&tt,&lmr) !=EOF ) - { - iBarrelRings[ieta+85][iphi-1] = ieta+85; - iLMR[ieta+85][iphi-1] = lmr; - iSM[ieta+85][iphi-1] = sm; - iTT[ieta+85][iphi-1] = tt; - - //inverse map containing the ietaMin in that region - if(dummyMap.find(lmr) == dummyMap.end()) dummyMap[lmr] = abs(ieta); - else if(abs(ieta) < dummyMap[lmr]) dummyMap[lmr] = abs(ieta); - } - - int counter=0; - std::map dummyMapEtaCount; - for(std::map::const_iterator itr = dummyMap.begin(); itr != dummyMap.end(); ++itr) - { - if(dummyMapEtaCount.find(itr->second) == dummyMapEtaCount.end()) - { - dummyMapEtaCount[itr->second] = counter; - ++counter; - } - LmrEtaMap[itr->first] = dummyMapEtaCount[itr->second]; - } - - - return; -} - -//dtor -TBarrelRegions::~TBarrelRegions() -{ - return; -} - - - -//methods -int TBarrelRegions::GetNRegions(const std::string& type) -{ - if( type == "ALL" ) return 1; - if( type == "SM" ) return 36; - if( type == "LMR" ) return 324; - if( type == "TT" ) return 2448; - if( type == "RING" ) return 171; - - return -1; -} - -int TBarrelRegions::GetRegionId(const int iEta, const int iPhi, const std::string& type) -{ - if( (iEta < -85) || (iEta == 0) || (iEta > 85) ) return -1; - if( (iPhi < 1) || (iPhi > 360) ) return -1; - - if( type == "ALL" ) - { - return 0; - } - if( type == "SM" ) - { - return iSM[iEta+85][iPhi-1]; - } - if( type == "LMR" ) - { - return iLMR[iEta+85][iPhi-1]; - } - if( type == "TT" ) - { - return iTT[iEta+85][iPhi-1]; - } - if( type == "RING" ) - { - return iBarrelRings[iEta+85][iPhi-1]; - } - return -1; -} - - - -// ---- geometry functions ---- -int TBarrelRegions::GetNRegionsIeta(const std::string& type) -{ - if( type == "SM" ) return 36; - if( type == "LMR" ) return 5; - if( type == "TT" ) return 17; - if( type == "RING" ) return 171; - - - return -1; -} - - -int TBarrelRegions::GetRegionIdIeta(const int& regionId, const std::string& type) -{ - if( type == "LMR" ) - { - return ( LmrEtaMap[regionId] ); - } - if( type == "SM" ) - { - return regionId; - } - if( type == "RING" ) - { - return regionId; - } - - return -1; - - //-------------------------------- - - // int nPhiRegions; - // float regionEtaWidth; - // float regionPhiWidth; - - // if( type == "SM" ) - // { - // nPhiRegions = 18; - // regionEtaWidth = 85.; - // regionPhiWidth = 20.; - // } - // if( type == "TT" ) - // { - // nPhiRegions = 72; - // regionEtaWidth = 5.; - // regionPhiWidth = 5.; - // } - - // iPhi = regionPhiWidth/2. + regionPhiWidth * (regionId % nPhiRegions); - // iEta = regionEtaWidth/2. + regionPhiWidth * (regionId / nPhiRegions); - - // iPhi += 1.; - // if( iEta < 75 ) iEta = -1. * (iEta+1.); - // if( iEta >= 75 ) iEta -= 74.; -} - - diff --git a/EOverPCalibration/FastCalibrator/src/setTDRStyle.cc b/EOverPCalibration/FastCalibrator/src/setTDRStyle.cc deleted file mode 100755 index 5818b23dc26..00000000000 --- a/EOverPCalibration/FastCalibrator/src/setTDRStyle.cc +++ /dev/null @@ -1,168 +0,0 @@ -#include "../interface/setTDRStyle.h" - - - -void setTDRStyle() -{ - TStyle* tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); - - // For the canvas: - tdrStyle->SetCanvasBorderMode(0); - tdrStyle->SetCanvasColor(kWhite); - tdrStyle->SetCanvasDefH(600); //Height of canvas - tdrStyle->SetCanvasDefW(700); //Width of canvas - //tdrStyle->SetCanvasDefW(800); //Width of canvas - tdrStyle->SetCanvasDefX(0); //POsition on screen - tdrStyle->SetCanvasDefY(0); - - // For the Pad: - tdrStyle->SetPadBorderMode(0); - // tdrStyle->SetPadBorderSize(Width_t size = 1); - tdrStyle->SetPadColor(kWhite); - tdrStyle->SetPadGridX(false); - tdrStyle->SetPadGridY(false); - tdrStyle->SetGridColor(0); - tdrStyle->SetGridStyle(3); - tdrStyle->SetGridWidth(1); - - // For the frame: - tdrStyle->SetFrameBorderMode(0); - tdrStyle->SetFrameBorderSize(1); - tdrStyle->SetFrameFillColor(0); - tdrStyle->SetFrameFillStyle(0); - tdrStyle->SetFrameLineColor(1); - tdrStyle->SetFrameLineStyle(1); - tdrStyle->SetFrameLineWidth(1); - - // For the histo: - // tdrStyle->SetHistFillColor(1); - // tdrStyle->SetHistFillStyle(0); - tdrStyle->SetHistLineColor(1); - tdrStyle->SetHistLineStyle(0); - tdrStyle->SetHistLineWidth(1); - // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); - // tdrStyle->SetNumberContours(Int_t number = 20); - - tdrStyle->SetEndErrorSize(2); - // tdrStyle->SetErrorMarker(20); - //tdrStyle->SetErrorX(0.); - - tdrStyle->SetMarkerStyle(20); - - //For the fit/function: - tdrStyle->SetOptFit(0); - tdrStyle->SetFitFormat("5.4g"); - tdrStyle->SetFuncColor(2); - tdrStyle->SetFuncStyle(1); - tdrStyle->SetFuncWidth(1); - - //For the date: - tdrStyle->SetOptDate(0); - // tdrStyle->SetDateX(Float_t x = 0.01); - // tdrStyle->SetDateY(Float_t y = 0.01); - - // For the statistics box: - tdrStyle->SetOptFile(0); - tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); - tdrStyle->SetStatColor(kWhite); - tdrStyle->SetStatFont(42); - tdrStyle->SetStatFontSize(0.025); - tdrStyle->SetStatTextColor(1); - tdrStyle->SetStatFormat("6.4g"); - tdrStyle->SetStatBorderSize(1); - tdrStyle->SetStatH(0.1); - tdrStyle->SetStatW(0.15); - // tdrStyle->SetStatStyle(Style_t style = 1001); - // tdrStyle->SetStatX(Float_t x = 0); - // tdrStyle->SetStatY(Float_t y = 0); - - // Margins: - tdrStyle->SetPadTopMargin(0.05); - tdrStyle->SetPadBottomMargin(0.13); - tdrStyle->SetPadLeftMargin(0.13); - tdrStyle->SetPadRightMargin(0.17); - //tdrStyle->SetPadRightMargin(0.25); - - // For the Global title: - tdrStyle->SetOptTitle(0); - tdrStyle->SetTitleFont(42); - tdrStyle->SetTitleColor(1); - tdrStyle->SetTitleTextColor(1); - tdrStyle->SetTitleFillColor(10); - tdrStyle->SetTitleFontSize(0.05); - // tdrStyle->SetTitleH(0); // Set the height of the title box - // tdrStyle->SetTitleW(0); // Set the width of the title box - // tdrStyle->SetTitleX(0); // Set the position of the title box - // tdrStyle->SetTitleY(0.985); // Set the position of the title box - // tdrStyle->SetTitleStyle(Style_t style = 1001); - // tdrStyle->SetTitleBorderSize(2); - - // For the axis titles: - tdrStyle->SetTitleColor(1, "XYZ"); - tdrStyle->SetTitleFont(42, "XYZ"); - tdrStyle->SetTitleSize(0.05, "XYZ"); - // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? - // tdrStyle->SetTitleYSize(Float_t size = 0.02); - tdrStyle->SetTitleXOffset(1.20); - tdrStyle->SetTitleYOffset(1.40); - tdrStyle->SetTitleOffset(1.30, "Z"); - // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset - - // For the axis labels: - tdrStyle->SetLabelColor(1, "XYZ"); - tdrStyle->SetLabelFont(42, "XYZ"); - tdrStyle->SetLabelOffset(0.005, "XYZ"); - tdrStyle->SetLabelSize(0.04, "XYZ"); - - // For the axis: - tdrStyle->SetAxisColor(1, "XYZ"); - tdrStyle->SetStripDecimals(kTRUE); - tdrStyle->SetTickLength(0.03, "XYZ"); - tdrStyle->SetNdivisions(510, "XYZ"); - tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame - tdrStyle->SetPadTickY(1); - - // Change for log plots: - tdrStyle->SetOptLogx(0); - tdrStyle->SetOptLogy(0); - tdrStyle->SetOptLogz(0); - - // Postscript options: - tdrStyle->SetPaperSize(20.,20.); - // tdrStyle->SetLineScalePS(Float_t scale = 3); - // tdrStyle->SetLineStyleString(Int_t i, const char* text); - // tdrStyle->SetHeaderPS(const char* header); - // tdrStyle->SetTitlePS(const char* pstitle); - - //tdrStyle->SetBarOffset(Float_t baroff = 0.5); - //tdrStyle->SetBarWidth(Float_t barwidth = 0.5); - //tdrStyle->SetPaintTextFormat(const char* format = "g"); - tdrStyle->SetPalette(1); - //tdrStyle->SetTimeOffset(Double_t toffset); - //tdrStyle->SetHistMinimumZero(kTRUE); - - - - const Int_t NRGBs = 5; - const Int_t NCont = 255; - - Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; - Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; - Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; - Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; - TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); - TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); - tdrStyle->SetNumberContours(NCont); - - //TLatex *lab = new TLatex(0.70,0.85, "CMS 2008"); - //lab->SetNDC(); - //lab->SetTextFont(42); - //lab->SetTextSize(0.05); - //lab->Draw("same"); - - - - gROOT -> ForceStyle(); - - tdrStyle->cd(); -} diff --git a/EOverPCalibration/NtuplePackage/BuildFile.xml b/EOverPCalibration/NtuplePackage/BuildFile.xml deleted file mode 100644 index 39cdb79b8a2..00000000000 --- a/EOverPCalibration/NtuplePackage/BuildFile.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h b/EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h deleted file mode 100644 index 39b5b7733bf..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/ConfigFileLine.h +++ /dev/null @@ -1,77 +0,0 @@ -// H4ConfigFileLine.h -// -// A class representing a (continued) line in the configuration -// file, that is a pair of an option name and a (list of) value(s) -// -// last change : $Date: 2012/02/12 20:14:50 $ -// by : $Author: rgerosa $ -// - -#ifndef CONFIGFILELINE_H -#define CONFIGFILELINE_H - -#include -#include - -class ConfigFileLine { - public: - - //! Constructor with name of the option and a single option value (no list!) - ConfigFileLine(const std::string &option, const std::string &value=""); - - //! Destructor: Does currently nothing - virtual ~ConfigFileLine(); - - //! Append the option name of another ConfigFileLine as value - void append(const ConfigFileLine &other); - - //! Append the values of another ConfigFileLine - void appendList(const ConfigFileLine &other); - - //! Check whether name of option is "name" - bool isOption(const std::string &name) const{ - return name==option; - } - - //! Check whether the option line has a name, i.e. is defined - bool isDefined() const{ - return option.length(); - } - - //! Return the list of configuration values - std::list getValues() const{ - // This operation is somewhat time-consuming! - return values; - } - - //! Sets the list of configuration values - void setValues(const std::list &v){ - values=v; - } - - //! Get option name - const std::string &getOptionName() const{ - return option; - } - - //! Sets the scope by prepending "scope":: to the option name - void setScope(const std::string &scope); - - //! Print the contents of the rule to stdout - void print() const; - - //! stream operator - friend std::ostream & operator<< (std::ostream & out, const ConfigFileLine & line) ; - - private: - - std::string option; //!< The name of the option - std::list values; //!< The list of option values - - //! For convinience a ValueIterator type is defined which walks along - //! the list of option strings - typedef std::list::const_iterator ValueIterator; - -}; - -#endif // #ifndef CONFIGFILELINE diff --git a/EOverPCalibration/NtuplePackage/interface/ConfigParser.h b/EOverPCalibration/NtuplePackage/interface/ConfigParser.h deleted file mode 100644 index 02d25c089ee..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/ConfigParser.h +++ /dev/null @@ -1,95 +0,0 @@ -// ConfigParser.h -// -// A class representing the configuration of the analysis program, -// gathered from the configuration file and the command line -// -// last change : $Date: 2012/02/12 20:14:50 $ -// by : $Author: rgerosa $ -// - -#ifndef CONFIGPARSER_H -#define CONFIGPARSER_H - -#include "ConfigFileLine.h" -#include "TROOT.h" -#include "TObject.h" - -#include "stdio.h" -#include -#include - -class ConfigParser { - public: - - - FILE *config_file; - - // Constructor which does basically nothing - ConfigParser(); - - // Initialize configuration using the command line arguments - bool init(const char *fileName=0); - - // Destructor: Deletes the entries in the list of configuration file lines - virtual ~ConfigParser(); - - // Append the option name of another ConfigFileLine as value - void appendLine(ConfigFileLine *line); - - // Deletes a line from the already parsed configuration file lines - bool deleteLine(const char *name, const char *scope=0); - - // Override an option - bool overrideOption(const char *name, std::list &values, - const char *scope = 0); - - // Is this option defined? - bool isDefined(const char *name) const; - - // Read Integer Option - int readIntOption(const char *name) const throw(const char *); - - // Read Double Option - double readDoubleOption(const char *name) const throw(const char *); - - // Read Float Option - float readFloatOption(const char *name) const throw(const char *); - - // Read bool Option - const bool readBoolOption(const char *name) const throw(const char *); - - // Read Integer Option - const char *readStringOption(const char *name) const throw(const char *); - - // Read Integer List Option - std::vector readIntListOption(const char *name) const throw(const char *); - - // Read Double List Option - std::vector readDoubleListOption(const char *name) - const throw(const char *); - - // Read String List Option - std::vector readStringListOption(const char *name) - const throw(const char *); - - // Print all options - void print() const; - - //! stream operator - friend std::ostream & operator<< (std::ostream & out, const ConfigParser & conf) ; - - private: - - std::list configLines; //!< A list of configuration file lines - - //! For convinience a ValueIterator type is defined which walks along - //! the list of option strings - typedef std::list::const_iterator LineIterator; - -}; - -// Do not forget to define the global variables so that rootcint -// produces the necessary stub -R__EXTERN ConfigParser *gConfigParser; - -#endif // #ifndef CONFIGPARSER_H diff --git a/EOverPCalibration/NtuplePackage/interface/LHEReader.h b/EOverPCalibration/NtuplePackage/interface/LHEReader.h deleted file mode 100644 index 776fdb4975e..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/LHEReader.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef LHEReader_h -#define LHEReader_h - -#include -#include -#include -#include -#include - - - -class LHEReader -{ - public: - - //! ctor - LHEReader(const std::string& LHEFileName); - - //! dtor - ~LHEReader(); - - //! methods - bool GetNextEvent(); - void PrintEvent(); - - int GetNUP() { return NUP; }; - int GetIDPRUP() { return IDPRUP; }; - float GetXWGTUP() { return XWGTUP; }; - float GetSCALUP() { return SCALUP; }; - float GetAQEDUP() { return AQEDUP; }; - float GetAQCDUP() { return AQCDUP; }; - - std::vector GetIDUP() { return IDUP; }; - std::vector GetISTUP() { return ISTUP; }; - std::vector GetMOTH1UP() { return MOTH1UP; }; - std::vector GetMOTH2UP() { return MOTH2UP; }; - std::vector GetICOL1UP() { return ICOL1UP; }; - std::vector GetICOL2UP() { return ICOL2UP; }; - std::vector GetPXUP() { return PXUP; }; - std::vector GetPYUP() { return PYUP; }; - std::vector GetPZUP() { return PZUP; }; - std::vector GetPEUP() { return PEUP; }; - std::vector GetPMUP() { return PMUP; }; - std::vector GetVTIMUP() { return VTIMUP; }; - std::vector GetSPINUP() { return SPINUP; }; - - - - private: - - int NUP; - int IDPRUP; - float XWGTUP; - float SCALUP; - float AQEDUP; - float AQCDUP; - - std::ifstream* m_LHEFile; - std::vector IDUP; - std::vector ISTUP; - std::vector MOTH1UP; - std::vector MOTH2UP; - std::vector ICOL1UP; - std::vector ICOL2UP; - std::vector PXUP; - std::vector PYUP; - std::vector PZUP; - std::vector PEUP; - std::vector PMUP; - std::vector VTIMUP; - std::vector SPINUP; -}; - -#endif diff --git a/EOverPCalibration/NtuplePackage/interface/LinkDef.h b/EOverPCalibration/NtuplePackage/interface/LinkDef.h deleted file mode 100644 index f66d3f12402..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/LinkDef.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef ROOT_TREE_VECTOR_LINKDEF_H -#define ROOT_TREE_VECTOR_LINKDEF_H 1 - -#include "Math/Vector4D.h" - -#ifdef __CINT__ - -#pragma link off all classes; -#pragma link off all function; - -#pragma link C++ class std::vector; -#pragma link C++ function deltaEta (const double&, const double&); -#pragma link C++ function deltaPhi (const double&, const double&); -#pragma link C++ function deltaR (const double&, const double&, const double&, const double&); - -#endif - -#endif - diff --git a/EOverPCalibration/NtuplePackage/interface/h2Chain.h b/EOverPCalibration/NtuplePackage/interface/h2Chain.h deleted file mode 100644 index a12aaf41e3f..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/h2Chain.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef h2Chain_h -#define h2Chain_h - -#include "TROOT.h" -#include "TH1.h" -#include "TH2.h" -#include "TFile.h" -#include "THStack.h" -//#include "TCanvas.h" -#include "TPad.h" - -#include - - -struct h2Chain -{ - h2Chain (TString baseName, TString baseTitle, - int nbinsx, double minx, double maxx, - int nbinsy, double miny, double maxy, int NUM) ; - ~h2Chain () ; - - void SetColors (std::vector colors) ; - void Fill (int i, double valx, double valy) ; - void Fill (int i, double valx, double valy, double weight) ; - // void Print (bool isLog = false, int rebinx = 1, int rebiny = 1) ; - // void PrintEach () ; - void Scale (int index, double factor) ; - void Write (const std::string& dirName, TFile & outputFile) ; - - private : - - TString m_baseName ; - std::vector m_histos ; - -} ; - -#endif diff --git a/EOverPCalibration/NtuplePackage/interface/hChain.h b/EOverPCalibration/NtuplePackage/interface/hChain.h deleted file mode 100644 index 05baba5f1f3..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/hChain.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef hChain_h -#define hChain_h - -#include "TROOT.h" -#include "TH1.h" -#include "TH2.h" -#include "TFile.h" -#include "THStack.h" -#include "TCanvas.h" -#include "TNtuple.h" - -#include - - -struct hChain -{ - hChain (TString baseName, TString baseTitle, - int nbins, double min, double max, int NUM) ; - virtual ~hChain (); - - void SetColors (std::vector colors) ; - void Fill (int i, double val) ; - double GetEffectiveEntries(int index); - TH1F* GetHisto (int index); - void SetBinContent (int i, int bin, double val) ; - void SetBinError (int i, int bin, double val) ; - void Print (bool isLog = false, int rebin = 1, TString altName = "default") ; - void PrintEach (bool isLog = false, int rebin = 1) ; - void Normalize (int index) ; - void Scale (int index, double factor) ; - void Reset(); - void Write (TFile & outputFile) ; - void Write (const std::string& dirName, TFile & outputFile) ; - unsigned int Size() { return m_histos.size(); }; - - - private : - - TString m_baseName ; - std::vector m_histos ; - - double findNMin () ; - double findNMax () ; -} ; - -#endif diff --git a/EOverPCalibration/NtuplePackage/interface/ntpleUtils.h b/EOverPCalibration/NtuplePackage/interface/ntpleUtils.h deleted file mode 100644 index e5c14d844ad..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/ntpleUtils.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef ntpleUtils_h -#define ntpleUtils_h - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "TFile.h" -#include "TH1F.h" -#include "TChain.h" -#include "TVector3.h" -#include "Math/Vector3D.h" -#include "Math/Vector4D.h" -#include "Math/Boost.h" - - - -bool maggiore(double i, double j); - - - -/** get the number of events from a list of files */ -std::map GetTotalEvents(const std::string& histoName, const std::string& inputFileList); -TH1F* GetTotalHisto(const std::string& histoName, const std::string& inputFileList); -std::map GetBinLabels(const std::string& histoName, const std::string& inputFileList); - -/** fill a chain from a list of files */ -bool FillChain(TChain& chain, const std::string& inputFileList); - - -/** compute delta phi */ -double deltaPhi (const double& phi1, const double& phi2); - -/** compute delta eta */ -double deltaEta (const double& eta1, const double& eta2); - -/** compute delta R */ -double deltaR (const double& eta1, const double& phi1, - const double& eta2, const double& phi2); - - - -/** print 4-vector */ -void Print4V(const ROOT::Math::XYZTVector& p); - -#endif diff --git a/EOverPCalibration/NtuplePackage/interface/readJSONFile.h b/EOverPCalibration/NtuplePackage/interface/readJSONFile.h deleted file mode 100644 index 34e29f6f744..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/readJSONFile.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef readJSONFile_h -#define readJSONFile_h - -#include -#include -#include -#include -#include -#include -#include - - - - - -std::map > > - readJSONFile(const std::string& inFileName); - -bool AcceptEventByRunAndLumiSection(const int& runId, const int& lumiId, - std::map > >& jsonMap); - - -#endif diff --git a/EOverPCalibration/NtuplePackage/interface/setTDRStyle.h b/EOverPCalibration/NtuplePackage/interface/setTDRStyle.h deleted file mode 100755 index 3da88767dd1..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/setTDRStyle.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef setTDRStyle_h -#define setTDRStyle_h - -#include - -#include "TStyle.h" -#include "TColor.h" - - - -void setTDRStyle(); - -int getColor(const int& i); - -#endif diff --git a/EOverPCalibration/NtuplePackage/interface/treeReader.h b/EOverPCalibration/NtuplePackage/interface/treeReader.h deleted file mode 100644 index 3c4ea2b2f14..00000000000 --- a/EOverPCalibration/NtuplePackage/interface/treeReader.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef treeReader_h -#define treeReader_h - -#include -#include -#include -#include - -#include "TFile.h" -#include "TTree.h" -#include "TMath.h" -#include "Math/Vector4D.h" -#include "Math/Vector3D.h" -#include "TBranch.h" -#include "TBranchElement.h" -#include "TLeaf.h" - - -class treeReader -{ - public: - - treeReader (TTree *, bool verbosity = false) ; - ~treeReader () ; - - void GetEntry (int iEvent) {m_tree->GetEntry (iEvent) ; } ; - int GetEntries () {return m_tree->GetEntries () ; } ; - - std::vector* Get3V (const std::string &name); - std::vector* Get4V (const std::string &name); - std::vector* GetDouble(const std::string &name); - std::vector* GetFloat (const std::string &name); - std::vector* GetInt (const std::string &name); - std::vector* GetBool (const std::string &name); - std::vector* GetString(const std::string &name); - - ROOT::Math::XYZVector* get3V (const std::string &name); - ROOT::Math::XYZTVector* get4V (const std::string &name); - double* getDouble(const std::string &name); - float* getFloat (const std::string &name); - int* getInt (const std::string &name); - bool* getBool (const std::string &name); - std::string* getString(const std::string &name); - - private: - - std::map * > m_3Vvectors ; - std::map * > m_4Vvectors ; - std::map * > m_Dvectors ; - std::map * > m_Fvectors ; - std::map * > m_Ivectors ; - std::map * > m_Bvectors ; - std::map * > m_Svectors ; - - std::map k_3Vvectors ; - std::map k_4Vvectors ; - std::map k_Dvectors ; - std::map k_Fvectors ; - std::map k_Ivectors ; - std::map k_Bvectors ; - std::map k_Svectors ; - - - TTree * m_tree ; - bool m_verbosity ; - -} ; - -#endif - diff --git a/EOverPCalibration/NtuplePackage/obj/mydict.cc b/EOverPCalibration/NtuplePackage/obj/mydict.cc deleted file mode 100644 index bdb8aec6c9c..00000000000 --- a/EOverPCalibration/NtuplePackage/obj/mydict.cc +++ /dev/null @@ -1,858 +0,0 @@ -// -// File generated by rootcint at Wed Jun 5 10:42:56 2013 - -// Do NOT change. Changes will be lost next time file is generated -// - -#define R__DICTIONARY_FILENAME dOdOdIobjdImydict -#include "RConfig.h" //rootcint 4834 -#if !defined(R__ACCESS_IN_SYMBOL) -//Break the privacy of classes -- Disabled for the moment -#define private public -#define protected public -#endif - -// Since CINT ignores the std namespace, we need to do so in this file. -namespace std {} using namespace std; -#include "mydict.h" - -#include "TCollectionProxyInfo.h" -#include "TClass.h" -#include "TBuffer.h" -#include "TMemberInspector.h" -#include "TError.h" - -#ifndef G__ROOT -#define G__ROOT -#endif - -#include "RtypesImp.h" -#include "TIsAProxy.h" -#include "TFileMergeInfo.h" - -// START OF SHADOWS - -namespace ROOT { - namespace Shadow { - } // of namespace Shadow -} // of namespace ROOT -// END OF SHADOWS - -namespace ROOT { - void vectorlEfloatgR_ShowMembers(void *obj, TMemberInspector &R__insp); - static void vectorlEfloatgR_Dictionary(); - static void *new_vectorlEfloatgR(void *p = 0); - static void *newArray_vectorlEfloatgR(Long_t size, void *p); - static void delete_vectorlEfloatgR(void *p); - static void deleteArray_vectorlEfloatgR(void *p); - static void destruct_vectorlEfloatgR(void *p); - - // Function generating the singleton type initializer - static TGenericClassInfo *GenerateInitInstanceLocal(const vector*) - { - vector *ptr = 0; - static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector),0); - static ::ROOT::TGenericClassInfo - instance("vector", -2, "vector.dll", 0, - typeid(vector), DefineBehavior(ptr, ptr), - 0, &vectorlEfloatgR_Dictionary, isa_proxy, 0, - sizeof(vector) ); - instance.SetNew(&new_vectorlEfloatgR); - instance.SetNewArray(&newArray_vectorlEfloatgR); - instance.SetDelete(&delete_vectorlEfloatgR); - instance.SetDeleteArray(&deleteArray_vectorlEfloatgR); - instance.SetDestructor(&destruct_vectorlEfloatgR); - instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector >())); - return &instance; - } - // Static variable to force the class initialization - static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstanceLocal((const vector*)0x0); R__UseDummy(_R__UNIQUE_(Init)); - - // Dictionary for non-ClassDef classes - static void vectorlEfloatgR_Dictionary() { - ::ROOT::GenerateInitInstanceLocal((const vector*)0x0)->GetClass(); - } - -} // end of namespace ROOT - -namespace ROOT { - // Wrappers around operator new - static void *new_vectorlEfloatgR(void *p) { - return p ? ::new((::ROOT::TOperatorNewHelper*)p) vector : new vector; - } - static void *newArray_vectorlEfloatgR(Long_t nElements, void *p) { - return p ? ::new((::ROOT::TOperatorNewHelper*)p) vector[nElements] : new vector[nElements]; - } - // Wrapper around operator delete - static void delete_vectorlEfloatgR(void *p) { - delete ((vector*)p); - } - static void deleteArray_vectorlEfloatgR(void *p) { - delete [] ((vector*)p); - } - static void destruct_vectorlEfloatgR(void *p) { - typedef vector current_t; - ((current_t*)p)->~current_t(); - } -} // end of namespace ROOT for class vector - -/******************************************************** -* ../obj/mydict.cc -* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED -* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). -* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. -********************************************************/ - -#ifdef G__MEMTEST -#undef malloc -#undef free -#endif - -#if defined(__GNUC__) && __GNUC__ >= 4 && ((__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >= 1) || (__GNUC_MINOR__ >= 3)) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif - -extern "C" void G__cpp_reset_tagtablemydict(); - -extern "C" void G__set_cpp_environmentmydict() { - G__cpp_reset_tagtablemydict(); -} -#include -extern "C" int G__cpp_dllrevmydict() { return(30051515); } - -/********************************************************* -* Member function Interface Method -*********************************************************/ - -/* Setting up global function */ -static int G__mydict__0_2602(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) -{ - G__letdouble(result7, 100, (double) deltaPhi(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]))); - return(1 || funcname || hash || result7 || libp) ; -} - -static int G__mydict__0_2603(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) -{ - G__letdouble(result7, 100, (double) deltaEta(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]))); - return(1 || funcname || hash || result7 || libp) ; -} - -static int G__mydict__0_2604(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) -{ - G__letdouble(result7, 100, (double) deltaR(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]) -, *(double*) G__Doubleref(&libp->para[2]), *(double*) G__Doubleref(&libp->para[3]))); - return(1 || funcname || hash || result7 || libp) ; -} - - -/********************************************************* -* Member function Stub -*********************************************************/ - -/********************************************************* -* Global function Stub -*********************************************************/ - -/********************************************************* -* Get size of pointer to member function -*********************************************************/ -class G__Sizep2memfuncmydict { - public: - G__Sizep2memfuncmydict(): p(&G__Sizep2memfuncmydict::sizep2memfunc) {} - size_t sizep2memfunc() { return(sizeof(p)); } - private: - size_t (G__Sizep2memfuncmydict::*p)(); -}; - -size_t G__get_sizep2memfuncmydict() -{ - G__Sizep2memfuncmydict a; - G__setsizep2memfunc((int)a.sizep2memfunc()); - return((size_t)a.sizep2memfunc()); -} - - -/********************************************************* -* virtual base class offset calculation interface -*********************************************************/ - - /* Setting up class inheritance */ - -/********************************************************* -* Inheritance information setup/ -*********************************************************/ -extern "C" void G__cpp_setup_inheritancemydict() { - - /* Setting up class inheritance */ -} - -/********************************************************* -* typedef information setup/ -*********************************************************/ -extern "C" void G__cpp_setup_typetablemydict() { - - /* Setting up typedef entry */ - G__search_typename2("value_type",102,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("pointer",70,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("const_pointer",70,-1,256,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reference",102,-1,1,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("const_reference",102,-1,257,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("size_type",107,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("difference_type",108,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("const_iterator",117,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator),256,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("const_reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("list",117,G__get_linked_tagnum(&G__mydictLN_listlEstringcOallocatorlEstringgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("list",117,G__get_linked_tagnum(&G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TVectorT",117,G__get_linked_tagnum(&G__mydictLN_TVectorTlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TVectorT",117,G__get_linked_tagnum(&G__mydictLN_TVectorTlEdoublegR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTBase",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTBaselEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTBase",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTBaselEdoublegR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixT",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTRow_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTRow_constlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTColumn_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTColumn_constlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTDiag_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTDiag_constlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTFlat_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTFlat_constlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTSub_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSub_constlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTSparseRow_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseRow_constlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTSparseDiag_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseDiag_constlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTRow",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTRowlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTColumn",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTColumnlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTDiag",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTDiaglEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTFlat",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTFlatlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTSub",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSublEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTSparseRow",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseRowlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TMatrixTSparseDiag",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseDiaglEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TElementActionT",117,G__get_linked_tagnum(&G__mydictLN_TElementActionTlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("TElementPosActionT",117,G__get_linked_tagnum(&G__mydictLN_TElementPosActionTlEfloatgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map > >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map,allocator > > >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map,allocator > >,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector,ROOT::Math::DefaultCoordinateSystemTag> >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR)); - G__setnewtype(-1,NULL,0); - G__search_typename2("vector > >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >,allocator > > >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >,allocator > > >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); - G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); - G__setnewtype(-1,NULL,0); -} - -/********************************************************* -* Data Member information setup/ -*********************************************************/ - - /* Setting up class,struct,union tag member variable */ -extern "C" void G__cpp_setup_memvarmydict() { -} -/*********************************************************** -************************************************************ -************************************************************ -************************************************************ -************************************************************ -************************************************************ -************************************************************ -***********************************************************/ - -/********************************************************* -* Member function information setup for each class -*********************************************************/ - -/********************************************************* -* Member function information setup -*********************************************************/ -extern "C" void G__cpp_setup_memfuncmydict() { -} - -/********************************************************* -* Global variable information setup for each class -*********************************************************/ -static void G__cpp_setup_global0() { - - /* Setting up global variables */ - G__resetplocal(); - -} - -static void G__cpp_setup_global1() { -} - -static void G__cpp_setup_global2() { -} - -static void G__cpp_setup_global3() { -} - -static void G__cpp_setup_global4() { - - G__resetglobalenv(); -} -extern "C" void G__cpp_setup_globalmydict() { - G__cpp_setup_global0(); - G__cpp_setup_global1(); - G__cpp_setup_global2(); - G__cpp_setup_global3(); - G__cpp_setup_global4(); -} - -/********************************************************* -* Global function information setup for each class -*********************************************************/ -static void G__cpp_setup_func0() { - G__lastifuncposition(); - -} - -static void G__cpp_setup_func1() { -} - -static void G__cpp_setup_func2() { -} - -static void G__cpp_setup_func3() { -} - -static void G__cpp_setup_func4() { -} - -static void G__cpp_setup_func5() { -} - -static void G__cpp_setup_func6() { -} - -static void G__cpp_setup_func7() { -} - -static void G__cpp_setup_func8() { -} - -static void G__cpp_setup_func9() { -} - -static void G__cpp_setup_func10() { -} - -static void G__cpp_setup_func11() { -} - -static void G__cpp_setup_func12() { -} - -static void G__cpp_setup_func13() { -} - -static void G__cpp_setup_func14() { -} - -static void G__cpp_setup_func15() { -} - -static void G__cpp_setup_func16() { -} - -static void G__cpp_setup_func17() { -} - -static void G__cpp_setup_func18() { -} - -static void G__cpp_setup_func19() { -} - -static void G__cpp_setup_func20() { -} - -static void G__cpp_setup_func21() { -} - -static void G__cpp_setup_func22() { -} - -static void G__cpp_setup_func23() { -} - -static void G__cpp_setup_func24() { -} - -static void G__cpp_setup_func25() { - G__memfunc_setup("deltaPhi", 811, G__mydict__0_2602, 100, -1, -1, 0, 2, 1, 1, 0, -"d - - 11 - phi1 d - - 11 - phi2", (char*) NULL -, (void*) NULL, 0); - G__memfunc_setup("deltaEta", 804, G__mydict__0_2603, 100, -1, -1, 0, 2, 1, 1, 0, -"d - - 11 - eta1 d - - 11 - eta2", (char*) NULL -, (void*) NULL, 0); - G__memfunc_setup("deltaR", 604, G__mydict__0_2604, 100, -1, -1, 0, 4, 1, 1, 0, -"d - - 11 - eta1 d - - 11 - phi1 " -"d - - 11 - eta2 d - - 11 - phi2", (char*) NULL -, (void*) NULL, 0); -} - -static void G__cpp_setup_func26() { -} - -static void G__cpp_setup_func27() { -} - -static void G__cpp_setup_func28() { - - G__resetifuncposition(); -} - -extern "C" void G__cpp_setup_funcmydict() { - G__cpp_setup_func0(); - G__cpp_setup_func1(); - G__cpp_setup_func2(); - G__cpp_setup_func3(); - G__cpp_setup_func4(); - G__cpp_setup_func5(); - G__cpp_setup_func6(); - G__cpp_setup_func7(); - G__cpp_setup_func8(); - G__cpp_setup_func9(); - G__cpp_setup_func10(); - G__cpp_setup_func11(); - G__cpp_setup_func12(); - G__cpp_setup_func13(); - G__cpp_setup_func14(); - G__cpp_setup_func15(); - G__cpp_setup_func16(); - G__cpp_setup_func17(); - G__cpp_setup_func18(); - G__cpp_setup_func19(); - G__cpp_setup_func20(); - G__cpp_setup_func21(); - G__cpp_setup_func22(); - G__cpp_setup_func23(); - G__cpp_setup_func24(); - G__cpp_setup_func25(); - G__cpp_setup_func26(); - G__cpp_setup_func27(); - G__cpp_setup_func28(); -} - -/********************************************************* -* Class,struct,union,enum tag information setup -*********************************************************/ -/* Setup class/struct taginfo */ -G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR = { "vector >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator = { "vector >::iterator" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR = { "vector >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR = { "vector >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_listlEstringcOallocatorlEstringgRsPgR = { "list >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR = { "iterator" , 115 , -1 }; -G__linked_taginfo G__mydictLN_vectorlEintcOallocatorlEintgRsPgR = { "vector >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR = { "vector >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR = { "list >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TVectorTlEfloatgR = { "TVectorT" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TVectorTlEdoublegR = { "TVectorT" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTBaselEfloatgR = { "TMatrixTBase" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTBaselEdoublegR = { "TMatrixTBase" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR = { "vector >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR = { "vector >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TElementActionTlEfloatgR = { "TElementActionT" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TElementPosActionTlEfloatgR = { "TElementPosActionT" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTlEfloatgR = { "TMatrixT" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTRow_constlEfloatgR = { "TMatrixTRow_const" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTRowlEfloatgR = { "TMatrixTRow" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTDiag_constlEfloatgR = { "TMatrixTDiag_const" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTColumn_constlEfloatgR = { "TMatrixTColumn_const" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTFlat_constlEfloatgR = { "TMatrixTFlat_const" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTSub_constlEfloatgR = { "TMatrixTSub_const" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTSparseRow_constlEfloatgR = { "TMatrixTSparseRow_const" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTSparseDiag_constlEfloatgR = { "TMatrixTSparseDiag_const" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTColumnlEfloatgR = { "TMatrixTColumn" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTDiaglEfloatgR = { "TMatrixTDiag" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTFlatlEfloatgR = { "TMatrixTFlat" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTSublEfloatgR = { "TMatrixTSub" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTSparseRowlEfloatgR = { "TMatrixTSparseRow" , 99 , -1 }; -G__linked_taginfo G__mydictLN_TMatrixTSparseDiaglEfloatgR = { "TMatrixTSparseDiag" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR = { "vector,allocator > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR = { "reverse_iterator,allocator > >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR = { "map,allocator > >,less,allocator,allocator > > > > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR = { "vector,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR = { "reverse_iterator,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR = { "vector >,allocator > > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR = { "reverse_iterator >,allocator > > >::iterator>" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR = { "map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*,less,allocator,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR = { "map >,allocator > > >*,less,allocator >,allocator > > >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR = { "map,ROOT::Math::DefaultCoordinateSystemTag>*,less,allocator,ROOT::Math::DefaultCoordinateSystemTag>*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; -G__linked_taginfo G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; - -/* Reset class/struct taginfo */ -extern "C" void G__cpp_reset_tagtablemydict() { - G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR.tagnum = -1 ; - G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_listlEstringcOallocatorlEstringgRsPgR.tagnum = -1 ; - G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR.tagnum = -1 ; - G__mydictLN_vectorlEintcOallocatorlEintgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR.tagnum = -1 ; - G__mydictLN_TVectorTlEfloatgR.tagnum = -1 ; - G__mydictLN_TVectorTlEdoublegR.tagnum = -1 ; - G__mydictLN_TMatrixTBaselEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTBaselEdoublegR.tagnum = -1 ; - G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_TElementActionTlEfloatgR.tagnum = -1 ; - G__mydictLN_TElementPosActionTlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTRow_constlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTRowlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTDiag_constlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTColumn_constlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTFlat_constlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTSub_constlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTSparseRow_constlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTSparseDiag_constlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTColumnlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTDiaglEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTFlatlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTSublEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTSparseRowlEfloatgR.tagnum = -1 ; - G__mydictLN_TMatrixTSparseDiaglEfloatgR.tagnum = -1 ; - G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; - G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR.tagnum = -1 ; - G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR.tagnum = -1 ; -} - - -extern "C" void G__cpp_setup_tagtablemydict() { - - /* Setting up class,struct,union tag entry */ - G__tagtable_setup(G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR),0,-1,36608,(char*)NULL,NULL,NULL); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_listlEstringcOallocatorlEstringgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TVectorTlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TVectorTlEdoublegR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTBaselEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTBaselEdoublegR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TElementActionTlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TElementPosActionTlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTRow_constlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTRowlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTDiag_constlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTColumn_constlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTFlat_constlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSub_constlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseRow_constlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseDiag_constlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTColumnlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTDiaglEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTFlatlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSublEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseRowlEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseDiaglEfloatgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR); - G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR); -} -extern "C" void G__cpp_setupmydict(void) { - G__check_setup_version(30051515,"G__cpp_setupmydict()"); - G__set_cpp_environmentmydict(); - G__cpp_setup_tagtablemydict(); - - G__cpp_setup_inheritancemydict(); - - G__cpp_setup_typetablemydict(); - - G__cpp_setup_memvarmydict(); - - G__cpp_setup_memfuncmydict(); - G__cpp_setup_globalmydict(); - G__cpp_setup_funcmydict(); - - if(0==G__getsizep2memfunc()) G__get_sizep2memfuncmydict(); - return; -} -class G__cpp_setup_initmydict { - public: - G__cpp_setup_initmydict() { G__add_setup_func("mydict",(G__incsetup)(&G__cpp_setupmydict)); G__call_setup_funcs(); } - ~G__cpp_setup_initmydict() { G__remove_setup_func("mydict"); } -}; -G__cpp_setup_initmydict G__cpp_setup_initializermydict; - diff --git a/EOverPCalibration/NtuplePackage/obj/mydict.h b/EOverPCalibration/NtuplePackage/obj/mydict.h deleted file mode 100644 index 1690231977a..00000000000 --- a/EOverPCalibration/NtuplePackage/obj/mydict.h +++ /dev/null @@ -1,114 +0,0 @@ -/******************************************************************** -* ../obj/mydict.h -* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED -* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). -* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. -********************************************************************/ -#ifdef __CINT__ -#error ../obj/mydict.h/C is only for compilation. Abort cint. -#endif -#include -#include -#include -#include -#include -#define G__ANSIHEADER -#define G__DICTIONARY -#define G__PRIVATE_GVALUE -#include "G__ci.h" -#include "FastAllocString.h" -extern "C" { -extern void G__cpp_setup_tagtablemydict(); -extern void G__cpp_setup_inheritancemydict(); -extern void G__cpp_setup_typetablemydict(); -extern void G__cpp_setup_memvarmydict(); -extern void G__cpp_setup_globalmydict(); -extern void G__cpp_setup_memfuncmydict(); -extern void G__cpp_setup_funcmydict(); -extern void G__set_cpp_environmentmydict(); -} - - -#include "TObject.h" -#include "TMemberInspector.h" -#include "../interface/ConfigFileLine.h" -#include "../interface/ConfigParser.h" -#include "../interface/LHEReader.h" -#include "../interface/h2Chain.h" -#include "../interface/hChain.h" -#include "../interface/ntpleUtils.h" -#include "../interface/readJSONFile.h" -#include "../interface/setTDRStyle.h" -#include "../interface/treeReader.h" -#include -namespace std { } -using namespace std; - -#ifndef G__MEMFUNCBODY -#endif - -extern G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR; -extern G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_listlEstringcOallocatorlEstringgRsPgR; -extern G__linked_taginfo G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR; -extern G__linked_taginfo G__mydictLN_vectorlEintcOallocatorlEintgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR; -extern G__linked_taginfo G__mydictLN_TVectorTlEfloatgR; -extern G__linked_taginfo G__mydictLN_TVectorTlEdoublegR; -extern G__linked_taginfo G__mydictLN_TMatrixTBaselEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTBaselEdoublegR; -extern G__linked_taginfo G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_TElementActionTlEfloatgR; -extern G__linked_taginfo G__mydictLN_TElementPosActionTlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTRow_constlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTRowlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTDiag_constlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTColumn_constlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTFlat_constlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTSub_constlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTSparseRow_constlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTSparseDiag_constlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTColumnlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTDiaglEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTFlatlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTSublEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTSparseRowlEfloatgR; -extern G__linked_taginfo G__mydictLN_TMatrixTSparseDiaglEfloatgR; -extern G__linked_taginfo G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR; -extern G__linked_taginfo G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR; - -/* STUB derived class for protected member access */ -typedef vector > G__vectorlEfloatcOallocatorlEfloatgRsPgR; diff --git a/EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc b/EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc deleted file mode 100644 index 84d5f356a48..00000000000 --- a/EOverPCalibration/NtuplePackage/src/ConfigFileLine.cc +++ /dev/null @@ -1,106 +0,0 @@ -// -// File ConfigFileLine.C -// -/*! \class ConfigFileLine - * \brief A class representing a (continued) line in the configuration - * file, that is a pair of an option name and a (list of) value(s) - * - * - * $Date: 2012/02/12 20:16:10 $ - * $Author: rgerosa $ - * - * The class ConfigFileLine is used by the config_parser during - * parsing of the analyis configuration file. Every parsed line is put - * into a ConfigFile line object. Lines may be continued by the \ - * line continuation character. The name of the configuration option - * is stored as a string in the "values" class member, while options - * contains a list of configuration options. The latter field - * might also be empty if the option is boolean. As soon as the name - * field contains a non-zero string, the respective option is defined. - * - * The class is used during the parsing proceedure itself and must - * therefore also be able to contain the data during the parsing - * step. This includes ConfigFileLine objects which have no option - * name because they are on the right hand side of the '=' assignment - * operator. - * - * This class is not usable by root itself, no dictionary is generated - * for it. -*/ - -#include "../interface/ConfigFileLine.h" -#include - -using namespace std; - -ConfigFileLine::ConfigFileLine(const string &o, const string &v) -{ - option=o; - if( v.length()) - values.push_back(v); -} - - -ConfigFileLine::~ConfigFileLine() -{ - // The "option" string and the list are "self deleting" - // we do not need to do anything therefore, here. -} - -void ConfigFileLine::append(const ConfigFileLine &other){ - values.push_back(other.getOptionName()); -} - -void ConfigFileLine::appendList(const ConfigFileLine &other){ - ValueIterator I=other.values.begin(); - while (I != other.values.end()) { - values.push_back(*I); - I++; - } -} - -void ConfigFileLine::setScope(const string &scope){ - string s=scope; - s.append("::"); - s.append(option); - option=s; -} - -void ConfigFileLine::print() const{ - std::cout << "Option '" << option <<"' "; - if (!values.empty() ){ - ValueIterator I=values.begin(); - std::cout << "set to '"; - while (I != values.end()) { - std::cout << *I ; - I++; - if(I != values.end()) std::cout << ", "; - } - std::cout << "'" << std::endl; - } else { - std::cout << "is defined!" << std::endl; - } -} - - -//! stream operator -std::ostream & operator<< (std::ostream & out, const ConfigFileLine & line) -{ - out << "Option '" << line.option <<"' "; - if (!line.values.empty() ){ -// line.ValueIterator I=line.values.begin(); - std::list::const_iterator I=line.values.begin(); - out << "set to '"; - while (I != line.values.end()) { - out << *I ; - I++; - if(I != line.values.end()) out << ", "; - } - out << "'" << std::endl; - } else { - out << "is defined!" << std::endl; - } - return out ; -} - - diff --git a/EOverPCalibration/NtuplePackage/src/LHEReader.cc b/EOverPCalibration/NtuplePackage/src/LHEReader.cc deleted file mode 100644 index 735bdb349e2..00000000000 --- a/EOverPCalibration/NtuplePackage/src/LHEReader.cc +++ /dev/null @@ -1,135 +0,0 @@ -#include "../interface/LHEReader.h" - - - -LHEReader::LHEReader(const std::string& LHEFileName) -{ - m_LHEFile = new std::ifstream(LHEFileName.c_str(), std::ios::in); - - std::string buffer; - while(1) - { - getline(*m_LHEFile, buffer); - if( buffer == "" ) break; - } -} - -// ---------------------------------------------------------------- - - - - - -LHEReader::~LHEReader() -{} - -// ---------------------------------------------------------------- - - - - - - -bool LHEReader::GetNextEvent() -{ - IDUP.clear(); - ISTUP.clear(); - MOTH1UP.clear(); - MOTH2UP.clear(); - ICOL1UP.clear(); - ICOL2UP.clear(); - PXUP.clear(); - PYUP.clear(); - PZUP.clear(); - PEUP.clear(); - PMUP.clear(); - VTIMUP.clear(); - SPINUP.clear(); - - - - //common event information - (*m_LHEFile) >> NUP >> IDPRUP >> XWGTUP >> SCALUP >> AQEDUP >> AQCDUP; - - // NUP lines, one for each particle - int idup,istup,moth1up,moth2up,icol1up,icol2up; - float pxup,pyup,pzup,peup,pmup,vtimup,spinup; - - for(int i = 0; i < NUP; ++i) - { - (*m_LHEFile) >> idup >> istup >> moth1up >> moth2up >> icol1up >> icol2up >> pxup >> pyup >> pzup >> peup >> pmup >> vtimup >> spinup; - - IDUP.push_back(idup); - ISTUP.push_back(istup); - MOTH1UP.push_back(moth1up); - MOTH2UP.push_back(moth2up); - ICOL1UP.push_back(icol1up); - ICOL2UP.push_back(icol2up); - PXUP.push_back(pxup); - PYUP.push_back(pyup); - PZUP.push_back(pzup); - PEUP.push_back(peup); - PMUP.push_back(pmup); - VTIMUP.push_back(vtimup); - SPINUP.push_back(spinup); - } - - - // Goto next event - bool nextEventFound = false; - std::string buffer; - while( !(*m_LHEFile).eof() ) - { - getline(*m_LHEFile, buffer); - if( buffer == "" ) - { - nextEventFound = true; - break; - } - } - - - return nextEventFound; -} - -// ---------------------------------------------------------------- - - - - - - -void LHEReader::PrintEvent() -{ - std::cout << "" << std::endl; - - std::cout << " " << NUP - << " " << IDPRUP - << " " << std::scientific << std::setprecision(7) << std::setw(14) << XWGTUP - << " " << std::scientific << std::setprecision(7) << std::setw(14) << SCALUP - << " " << std::scientific << std::setprecision(7) << std::setw(14) << AQEDUP - << " " << std::scientific << std::setprecision(7) << std::setw(14) << AQCDUP - << std::endl; - - for(int i = 0; i < NUP; ++i) - { - std::cout << " " << std::fixed << std::setprecision(0) << std::setw(7) << IDUP.at(i) - << " " << std::fixed << std::setprecision(0) << std::setw(4) << ISTUP.at(i) - << " " << std::fixed << std::setprecision(0) << std::setw(4) << MOTH1UP.at(i) - << " " << std::fixed << std::setprecision(0) << std::setw(4) << MOTH2UP.at(i) - << " " << std::fixed << std::setprecision(0) << std::setw(4) << ICOL1UP.at(i) - << " " << std::fixed << std::setprecision(0) << std::setw(4) << ICOL2UP.at(i) - << " " << std::scientific << std::setprecision(11) << std::setw(18) << PXUP.at(i) - << " " << std::scientific << std::setprecision(11) << std::setw(18) << PYUP.at(i) - << " " << std::scientific << std::setprecision(11) << std::setw(18) << PZUP.at(i) - << " " << std::scientific << std::setprecision(11) << std::setw(18) << PEUP.at(i) - << " " << std::scientific << std::setprecision(11) << std::setw(18) << PMUP.at(i) - << " " << std::scientific << std::setprecision(5) << std::setw(10) << VTIMUP.at(i) - << " " << std::fixed << std::setprecision(1) << std::setw(4) << SPINUP.at(i) - << std::endl; - } - - std::cout << "" << std::endl; -} - -// ---------------------------------------------------------------- diff --git a/EOverPCalibration/NtuplePackage/src/Makefile b/EOverPCalibration/NtuplePackage/src/Makefile deleted file mode 100644 index 7c09385686b..00000000000 --- a/EOverPCalibration/NtuplePackage/src/Makefile +++ /dev/null @@ -1,127 +0,0 @@ -HDR = ../interface/ -OBJ = ../obj/ -LIB = ../lib/ -BIN = ../bin/ -PRG = ../test/ -SCRIPT = ../scripts/ - - -Shell = .sh -HdrSuf = .h -SrcSuf = .cc -ObjSuf = .o -PrgSuf = .cpp -BinSuf = .exe -LibSuf = .so - -HDRS = $(wildcard $(HDR)*$(HdrSuf)) -SRCS = $(wildcard *$(SrcSuf)) -_OBJS = $(patsubst %$(SrcSuf), %$(ObjSuf), $(SRCS)) -OBJS = $(addprefix $(OBJ),$(_OBJS)) -PRGS = $(wildcard $(PRG)*$(PrgSuf)) -_BINS = $(wildcard $(PRG)*$(PrgSuf)) -__BINS = $(_BINS:$(PrgSuf)=$(BinSuf)) -___BINS = $(notdir $(__BINS)) -BINS = $(addprefix $(BIN),${___BINS}) - -LINKDEF = $(wildcard ${HDR}*LinkDef.h) -DICTHDRS = $(patsubst $(LINKDEF),,$(HDRS)) $(LINKDEF) - - -ROOTCFLAGS = $(shell root-config --cflags) -ROOTGLIBS = $(shell root-config --glibs) - -ARCHL = -m64 - -CXX = c++ -CXXFLAGS = -Wall -O -fPIC -I$(HDR) $(ROOTCFLAGS) -CPP = c++ -CPPFLAGS = -Wall $(ARCHL) -I$(HDR) $(ROOTCFLAGS) - -LD = c++ -LDFLAGS = -rdynamic -shared $(ARCHL) -SONAME = libEvent.so -SOFLAGS = -Wl,-soname,$(SONAME) - -GLIBS = -lm -ldl -rdynamic $(ROOTGLIBS) -lGenVector - - -################################################# -#if mac -ARCH = $(shell root-config --arch) -ifeq ($(ARCH),macosx) -LibSuf = .dylib - -ARCHL = -m32 - -CPPFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) - -CXXFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) - -LDFLAGS = -dynamiclib -shared -single_module -undefined dynamic_lookup $(ARCHL) -SONAME = libEvent.dylib -SOFLAGS = -endif -################################################# - -################################################# -#if mac 64 -ARCH = $(shell root-config --arch) -ifeq ($(ARCH),macosx64) -LibSuf = .dylib - -ARCHL = -m64 - -CPPFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) - -CXXFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) - -LDFLAGS = -dynamiclib -shared -single_module -undefined dynamic_lookup $(ARCHL) -SONAME = libEvent.dylib -SOFLAGS = -endif -################################################# - - - - -.PHONY: all exe test clean - - -all: $(LIB)$(SONAME) - - -exe: $(BINS) - - -test: - @echo "HDRS = $(HDRS)" - @echo "DICTHDRS = $(DICTHDRS)" - @echo "SRCS = $(SRCS)" - @echo "OBJS = $(OBJS)" - @echo "PRGS = $(PRGS)" - @echo "BINS = $(BINS)" - - -$(OBJ)%$(ObjSuf): %$(SrcSuf) $(HDRS) - $(CXX) -c $(CXXFLAGS) -o $@ $< - - -$(OBJ)mydict.o: $(OBJ)mydict.cc $(OBJ)mydict.h - $(CXX) -c $(CXXFLAGS) -o $@ $< - - -$(OBJ)mydict.cc: $(DICTHDRS) - @echo "Generating dictionary for ..." - rootcint -f $(OBJ)mydict.cc -c -p ${CXXFLAGS} $(DICTHDRS) - -$(LIB)$(SONAME): $(OBJS) $(OBJ)mydict.o - @echo "Linking $(SONAME):" - $(LD) $(LDFLAGS) $(OBJS) $(OBJ)mydict.o $(SOFLAGS) -o $(LIB)$(SONAME) - -$(BIN)%$(BinSuf): $(PRG)%$(PrgSuf) $(HDRS) $(LIB)$(SONAME) - $(CPP) $(CPPFLAGS) -L$(LIB) $(GLIBS) -lEvent -o $@ $< - - -clean: - rm -f $(OBJ)*$(ObjSuf) $(LIB)*$(LibSuf) $(OBJ)mydict* diff --git a/EOverPCalibration/NtuplePackage/src/h2Chain.cc b/EOverPCalibration/NtuplePackage/src/h2Chain.cc deleted file mode 100644 index cd6ed7a465d..00000000000 --- a/EOverPCalibration/NtuplePackage/src/h2Chain.cc +++ /dev/null @@ -1,153 +0,0 @@ -#include "EOverPCalibration/NtuplePackage/interface/h2Chain.h" - - h2Chain::h2Chain (TString baseName, TString baseTitle, - int nbinsx, double minx, double maxx, - int nbinsy, double miny, double maxy, int NUM) : - m_baseName (baseName) - { - TString name ; - TString title ; - for (int i=0 ; iSetStats (0) ; - m_histos.push_back (dummy) ; - } - } - - -//PG -------------------------------------------------------- - - -h2Chain::~h2Chain () -{ - for (unsigned int i=0 ; i colors) - { - //PG this is weak, assumes correct number of elements - for (unsigned int i=0 ; iSetMarkerColor (colors.at (i)) ; - m_histos.at (i)->SetLineColor (colors.at (i)) ; - m_histos.at (i)->SetFillColor (colors.at (i)) ; - m_histos.at (i)->SetFillStyle (3001) ; - } - //PG this is a hack -// m_histos.back ()->SetLineColor (kBlack) ; -// m_histos.back ()->SetLineWidth (2) ; - } - - -//PG -------------------------------------------------------- - - -void -h2Chain::Fill (int i, double valx, double valy) - { - m_histos.at (i)->Fill (valx, valy) ; - return ; - } - - -//PG -------------------------------------------------------- - - -void -h2Chain::Fill (int i, double valx, double valy, double weight) - { - m_histos.at (i)->Fill (valx, valy, weight) ; - return ; - } - - - -//PG -------------------------------------------------------- - -/* -void -h2Chain::Print (bool isLog, int rebinx, int rebiny) - { - TCanvas *c1 = new TCanvas("c1", "c1", 52,180,500,500); - c1->cd () ; - if(isLog) c1->SetLogz(); - - m_histos.at (0)->Draw ("box") ; - for (unsigned int i=0 ; iSetStats (0) ; - m_histos.at (i)->Draw ("boxsame") ; - m_histos.at (i)->RebinX (rebinx) ; - m_histos.at (i)->RebinY (rebiny) ; - } - //PG this is a hack -// m_histos.back ()->Draw ("same") ; - TString name = m_baseName + TString ("_h2.gif") ; - c1->Print (name,"gif") ; - - m_histos.at (0)->DrawNormalized ("box") ; - for (unsigned int i=0 ; iDrawNormalized ("boxsame") ; - //PG this is a hack -// m_histos.back ()->DrawNormalized ("same") ; - name = TString ("N") + m_baseName + TString ("_h2.gif") ; - c1->Print (name,"gif") ; - } -*/ - -//PG -------------------------------------------------------- - -/* -void -h2Chain::PrintEach () - { - TCanvas *c1 = new TCanvas("c1","c1", 180, 52, 550, 550); - c1->cd () ; - for (unsigned int i=0 ; iSetStats (0) ; - m_histos.at (i)->Draw () ; - TString name = m_baseName ; - name += TString ("_") ; - name += i ; - name += TString ("_h2.gif") ; - c1->Print (name,"gif") ; - } - } -*/ - -//PG -------------------------------------------------------- - - -void -h2Chain::Write (const std::string& dirName, TFile & outputFile) - { - outputFile.cd () ; - outputFile.mkdir(dirName.c_str()); - outputFile.cd(dirName.c_str()); - for (unsigned int i=0 ; iWrite () ; - return ; - } - - -//PG -------------------------------------------------------- - - -void -h2Chain::Scale (int index, double factor) -{ - m_histos.at (index)->Scale (factor) ; -} diff --git a/EOverPCalibration/NtuplePackage/src/hChain.cc b/EOverPCalibration/NtuplePackage/src/hChain.cc deleted file mode 100644 index 5c0ba042080..00000000000 --- a/EOverPCalibration/NtuplePackage/src/hChain.cc +++ /dev/null @@ -1,282 +0,0 @@ -#include "../interface/hChain.h" -#include "TStyle.h" -#include "TROOT.h" -#include "TCanvas.h" - -hChain::hChain (TString baseName, TString baseTitle, - int nbins, double min, double max, int NUM) : - m_baseName (baseName) - { - for (int i=0 ; i colors) - { - //PG this is weak, assumes correct number of elements - for (unsigned int i=0 ; iSetLineColor (colors.at (i)) ; - m_histos.at (i)->SetLineWidth (2) ; - } - } - - -//PG -------------------------------------------------------- - - -void -hChain::Fill (int i, double val) - { - m_histos.at (i)->Fill (val) ; -// m_ntuples.at (i)->Fill (val) ; - return ; - } - - -//RG -------------------------------------------------------- - - - -void -hChain::SetBinContent (int i, int bin, double val) - { - m_histos.at (i)->SetBinContent (bin,val) ; -// m_ntuples.at (i)->Fill (val) ; - return ; - } - -//RG -------------------------------------------------------- - - - -void -hChain::SetBinError (int i, int bin, double val) - { - m_histos.at (i)->SetBinError (bin,val) ; -// m_ntuples.at (i)->Fill (val) ; - return ; - } - - - -//PG -------------------------------------------------------- - - -void -hChain::Print (bool isLog, int rebin, TString altName) - { - gROOT->SetStyle ("Plain") ; - - for (unsigned int i=0 ; iSetFillStyle (3001) ; - m_histos.at (i)->SetStats (0) ; - m_histos.at (i)->Rebin (rebin) ; - } - - TString name = "s_" ; - if (altName == "default") name += m_baseName ; - else name += altName ; - THStack hs (name,"stacked m_histos") ; - for (unsigned int i=0 ; iGetXaxis ()->GetXmin (), - m_histos.at (0)->GetXaxis ()->GetXmax (), - 10,min,max) ; - bkg.SetStats (0) ; - bkg.AddDirectory (0) ; - bkg.Draw () ; - for (unsigned int i=0 ; iDrawNormalized ("same") ; - name = TString ("N") + m_baseName + TString ("_h1.gif") ; - c1.Print (name,"gif") ; - } - - -//PG -------------------------------------------------------- - -/* -void -hChain::PrintEach (bool isLog, int rebin) - { - for (unsigned int i=0 ; iSetFillStyle (3001) ; - m_histos.at (i)->SetStats (0) ; - m_histos.at (i)->Rebin (rebin) ; - } - - TCanvas c1 ; - c1.cd () ; - if(isLog) c1.SetLogy(); - - for (unsigned int i=0 ; iSetStats (0) ; - m_histos.at (i)->Draw () ; - TString name = m_baseName ; - name += TString ("_") ; - name += i ; - name += TString ("_h1.gif") ; - c1.Print (name,"gif") ; - } - - } -*/ - -//PG -------------------------------------------------------- - - -void -hChain::Write (TFile & outputFile) - { - outputFile.cd () ; - for (unsigned int i=0 ; i GetEntries() > 0) - m_histos.at (i)->Write () ; -// for (unsigned int i=0 ; iWrite () ; - return ; - } - - -//PG -------------------------------------------------------- - - - - -void -hChain::Write (const std::string& dirName, TFile & outputFile) - { - outputFile.cd () ; - outputFile.mkdir(dirName.c_str()); - outputFile.cd(dirName.c_str()); - for (unsigned int i=0 ; i GetEntries() > 0) - m_histos.at (i)->Write () ; -// for (unsigned int i=0 ; iWrite () ; - return ; - } - - -//PG -------------------------------------------------------- - - - -double -hChain::findNMin () - { - double minVal = m_histos.at (0)->GetMinimum (0.0000001)/ - m_histos.at (0)->Integral () ; - for (unsigned int i = 0 ; i < m_histos.size () ; ++i) - { - double dummy = m_histos.at (i)->GetMinimum (0.0000001)/ - m_histos.at (i)->Integral () ; - if (minVal > dummy) minVal = dummy ; - } - return minVal ; - } - - -//PG -------------------------------------------------------- - - -double -hChain::findNMax () - { - double maxVal = m_histos.at (0)->GetMaximum ()/ - m_histos.at (0)->Integral () ; - for (unsigned int i = 0 ; i < m_histos.size () ; ++i) - { - double dummy = m_histos.at (i)->GetMaximum ()/ - m_histos.at (i)->Integral () ; - if (maxVal < dummy) maxVal = dummy ; - } - return maxVal ; - } - - -//PG -------------------------------------------------------- - - -void -hChain::Normalize (int index) -{ - if(m_histos.at (index) -> GetEntries() > 0) - m_histos.at (index)->Scale (1./m_histos.at(index)->GetEntries()) ; -} - - - -void -hChain::Scale (int index, double factor) -{ - m_histos.at (index)->Scale (factor) ; -} - -//RG ----------------------------------------------------- -double -hChain::GetEffectiveEntries(int index) -{ - return m_histos.at(index)->GetEffectiveEntries(); -} - -//RG ----------------------------------------------------- -void -hChain::Reset() -{ - for(unsigned int index=0; indexDelete(); -} - -//RG ------------------------------------------------------- -TH1F* -hChain::GetHisto(int index) -{ - return m_histos.at(index); -} diff --git a/EOverPCalibration/NtuplePackage/src/ntpleUtils.cc b/EOverPCalibration/NtuplePackage/src/ntpleUtils.cc deleted file mode 100644 index a0b79d30998..00000000000 --- a/EOverPCalibration/NtuplePackage/src/ntpleUtils.cc +++ /dev/null @@ -1,214 +0,0 @@ -#include "../interface/ntpleUtils.h" - - - -bool maggiore(double i, double j) -{ - return( i>j ); -} - - - -// ------------------------------------------------------------ - - - -std::map GetTotalEvents(const std::string& histoName, const std::string& inputFileList) -{ - std::ifstream inFile(inputFileList.c_str()); - std::string buffer; - std::map totalEvents; - - if(!inFile.is_open()) - { - std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; - return totalEvents; - } - - while(1) - { - inFile >> buffer; - if(!inFile.good()) break; - - TFile* f = TFile::Open(buffer.c_str()); - TH1F* histo = NULL; - f -> GetObject(histoName.c_str(), histo); - if(histo == NULL) - { - std::cout << ">>>ntpleUtils::Error in getting object " << histoName << std::endl; - exit(-1); - } - - - for(int bin = 1; bin <= histo -> GetNbinsX(); ++bin) - totalEvents[bin] += int(histo -> GetBinContent(bin)); - - f -> Close(); - delete f; - } - - return totalEvents; -} - - - -TH1F* GetTotalHisto(const std::string& histoName, const std::string& inputFileList) -{ - std::ifstream inFile(inputFileList.c_str()); - std::string buffer; - TH1F* totalHisto = NULL; - - if(!inFile.is_open()) - { - std::cerr << ">>>ntpleUtils::GetTotalHisto::can't open file " << inputFileList << " for input" << std::endl; - return totalHisto; - } - - bool isFirstFile = true; - while(1) - { - inFile >> buffer; - if(!inFile.good()) break; - - //std::cout << "ntpleUtils::GetTotalHisto::getting histogram " << histoName << " from file " << buffer << std::endl; - TFile* f = TFile::Open(buffer.c_str()); - TH1F* histo = NULL; - f -> GetObject(histoName.c_str(), histo); - if(histo == NULL) - { - std::cout << ">>>ntpleUtils::GetTotalHisto::Error in getting object " << histoName << std::endl; - exit(-1); - } - - if( isFirstFile ) - totalHisto = (TH1F*)(histo->Clone()); - else - totalHisto -> Add(histo); - - if( !isFirstFile ) - { - f -> Close(); - delete f; - isFirstFile = false; - } - } - - return totalHisto; -} - - - -std::map GetBinLabels(const std::string& histoName, const std::string& inputFileList) -{ - std::ifstream inFile(inputFileList.c_str()); - std::string buffer; - std::map binLabels; - - if(!inFile.is_open()) - { - std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; - return binLabels; - } - - while(1) - { - inFile >> buffer; - if(!inFile.good()) break; - - TFile* f = TFile::Open(buffer.c_str()); - TH1F* histo = NULL; - f -> GetObject(histoName.c_str(), histo); - if(histo == NULL) - { - std::cout << ">>>ntpleUtils::Error in getting object " << histoName << std::endl; - exit(-1); - } - - - for(int bin = 1; bin <= histo -> GetNbinsX(); ++bin) - binLabels[bin] = std::string(histo -> GetXaxis() -> GetBinLabel(bin)); - - f -> Close(); - delete f; - } - - return binLabels; -} - - - -bool FillChain(TChain& chain, const std::string& inputFileList) -{ - std::ifstream inFile(inputFileList.c_str()); - std::string buffer; - - if(!inFile.is_open()) - { - std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; - return false; - } - - while(1) - { - inFile >> buffer; - if(!inFile.good()) break; - if( buffer.at(0) == '#' ) continue; - chain.Add(buffer.c_str()); - std::cout << ">>> ntupleUtils::FillChain - treeName = " << chain.GetName() << " from file " << buffer << std::endl; - } - - return true; -} - - - -// ------------------------------------------------------------ - - - -double deltaPhi(const double& phi1, const double& phi2) -{ - double deltaphi = fabs(phi1 - phi2); - if (deltaphi > 6.283185308) deltaphi -= 6.283185308; - if (deltaphi > 3.141592654) deltaphi = 6.283185308 - deltaphi; - return deltaphi; -} - -double deltaEta(const double& eta1, const double& eta2) -{ - double deltaeta = fabs(eta1 - eta2); - return deltaeta; -} - -double deltaR(const double& eta1, const double& phi1, - const double& eta2, const double& phi2) -{ - double deltaphi = deltaPhi(phi1, phi2); - double deltaeta = deltaEta(eta1, eta2); - double deltar = sqrt(deltaphi*deltaphi + deltaeta*deltaeta); - return deltar; -} - - - -// ------------------------------------------------------------ - - - -void Print4V(const ROOT::Math::XYZTVector& p) -{ - std::cout << std::fixed << std::setprecision(2) - << "(E,px,py,pz) = " - << "(" << std::setw(8) << p.energy() - << "," << std::setw(8) << p.px() - << "," << std::setw(8) << p.py() - << "," << std::setw(8) << p.pz() - << ")" - << "\tpt = " - << std::setw(7) << p.pt() - << "\teta = " - << std::setw(6) << p.eta() - << "\tphi = " - << std::setw(5) << p.phi() - << std::endl; -} diff --git a/EOverPCalibration/NtuplePackage/src/readJSONFile.cc b/EOverPCalibration/NtuplePackage/src/readJSONFile.cc deleted file mode 100644 index 14052c644da..00000000000 --- a/EOverPCalibration/NtuplePackage/src/readJSONFile.cc +++ /dev/null @@ -1,111 +0,0 @@ -#include "../interface/readJSONFile.h" - - - - - -std::map > > - readJSONFile(const std::string& inFileName) -{ - std::ifstream inFile(inFileName.c_str(), std::ios::in); - - std::string line; - while(!inFile.eof()) - { - std::string buffer; - inFile >> buffer; - line += buffer; - } - - - - // define map with result - std::map > > jsonMap; - - - - // loop on JSON file - for(std::string::const_iterator it = line.begin(); it < line.end(); ++it) - { - // find run number - if( (*(it) == '"') && (*(it+7) == '"') ) - { - std::string run(it+1, it+7); - //std::cout << "found run " << run << std::endl; - - - - // find lumi sections - std::vector > lumisections; - for(std::string::const_iterator it2 = it+10; it2 < line.end(); ++it2) - { - if( (*(it2) == ']') && (*(it2-1) == ']') ) break; - if( *(it2) != '[' ) continue; - - std::string::const_iterator it_beg = it2; - std::string::const_iterator it_mid; - std::string::const_iterator it_end; - - for(std::string::const_iterator it3 = it_beg; it3 < line.end(); ++it3) - { - if( *(it3) == ',' ) it_mid = it3; - if( *(it3) == ']' ) - { - it_end = it3; - break; - } - } - - - - std::string lumi_beg(it_beg+1, it_mid); - std::string lumi_end(it_mid+1, it_end); - //std::cout << "[" << lumi_beg; - //std::cout << ","; - //std::cout << lumi_end << "]" << std::endl; - - std::pair tempLS(atoi(lumi_beg.c_str()), atoi(lumi_end.c_str())); - lumisections.push_back(tempLS); - - it2 = it_end; - } - - - jsonMap[atoi(run.c_str())] = lumisections; - } // find run number - - } // loop on JSON file - - - - return jsonMap; -} - - - - - - -bool AcceptEventByRunAndLumiSection(const int& runId, const int& lumiId, - std::map > >& jsonMap) -{ - // select by runId - if( jsonMap.find(runId) == jsonMap.end() ) return false; - - - - // select by lumiId - std::vector > lumisections = jsonMap[runId]; - - int skipEvent = true; - for(unsigned int i = 0; i < lumisections.size(); ++i) - if( (lumiId >= lumisections.at(i).first) && - (lumiId <= lumisections.at(i).second) ) - skipEvent = false; - - if( skipEvent == true ) return false; - - - return true; -} - diff --git a/EOverPCalibration/NtuplePackage/src/setTDRStyle.cc b/EOverPCalibration/NtuplePackage/src/setTDRStyle.cc deleted file mode 100755 index beb0a29a60d..00000000000 --- a/EOverPCalibration/NtuplePackage/src/setTDRStyle.cc +++ /dev/null @@ -1,203 +0,0 @@ -#include "../interface/setTDRStyle.h" - - - -void setTDRStyle() -{ - TStyle* tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); - - // For the canvas: - tdrStyle->SetCanvasBorderMode(0); - tdrStyle->SetCanvasColor(kWhite); - tdrStyle->SetCanvasDefH(600); //Height of canvas - tdrStyle->SetCanvasDefW(800); //Width of canvas - tdrStyle->SetCanvasDefX(0); //POsition on screen - tdrStyle->SetCanvasDefY(0); - - // For the Pad: - tdrStyle->SetPadBorderMode(0); - // tdrStyle->SetPadBorderSize(Width_t size = 1); - tdrStyle->SetPadColor(kWhite); - tdrStyle->SetPadGridX(false); - tdrStyle->SetPadGridY(false); - tdrStyle->SetGridColor(0); - tdrStyle->SetGridStyle(3); - tdrStyle->SetGridWidth(1); - - // For the frame: - tdrStyle->SetFrameBorderMode(0); - tdrStyle->SetFrameBorderSize(1); - tdrStyle->SetFrameFillColor(0); - tdrStyle->SetFrameFillStyle(0); - tdrStyle->SetFrameLineColor(1); - tdrStyle->SetFrameLineStyle(1); - tdrStyle->SetFrameLineWidth(1); - - // For the histo: - // tdrStyle->SetHistFillColor(1); - // tdrStyle->SetHistFillStyle(0); - tdrStyle->SetHistLineColor(1); - tdrStyle->SetHistLineStyle(0); - tdrStyle->SetHistLineWidth(1); - // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); - // tdrStyle->SetNumberContours(Int_t number = 20); - - tdrStyle->SetEndErrorSize(2); - // tdrStyle->SetErrorMarker(20); - //tdrStyle->SetErrorX(0.); - - tdrStyle->SetMarkerStyle(20); - - //For the fit/function: - tdrStyle->SetOptFit(1); - tdrStyle->SetFitFormat("5.4g"); - tdrStyle->SetFuncColor(2); - tdrStyle->SetFuncStyle(1); - tdrStyle->SetFuncWidth(1); - - //For the date: - tdrStyle->SetOptDate(0); - // tdrStyle->SetDateX(Float_t x = 0.01); - // tdrStyle->SetDateY(Float_t y = 0.01); - - // For the statistics box: - tdrStyle->SetOptFile(0); - tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); - tdrStyle->SetStatColor(kWhite); - tdrStyle->SetStatFont(42); - tdrStyle->SetStatFontSize(0.025); - tdrStyle->SetStatTextColor(1); - tdrStyle->SetStatFormat("6.4g"); - tdrStyle->SetStatBorderSize(1); - tdrStyle->SetStatH(0.1); - tdrStyle->SetStatW(0.15); - // tdrStyle->SetStatStyle(Style_t style = 1001); - // tdrStyle->SetStatX(Float_t x = 0); - // tdrStyle->SetStatY(Float_t y = 0); - - // Margins: - tdrStyle->SetPadTopMargin(0.05); - tdrStyle->SetPadBottomMargin(0.13); - tdrStyle->SetPadLeftMargin(0.13); - tdrStyle->SetPadRightMargin(0.25); - - // For the Global title: - tdrStyle->SetOptTitle(0); - tdrStyle->SetTitleFont(42); - tdrStyle->SetTitleColor(1); - tdrStyle->SetTitleTextColor(1); - tdrStyle->SetTitleFillColor(10); - tdrStyle->SetTitleFontSize(0.05); - // tdrStyle->SetTitleH(0); // Set the height of the title box - // tdrStyle->SetTitleW(0); // Set the width of the title box - // tdrStyle->SetTitleX(0); // Set the position of the title box - // tdrStyle->SetTitleY(0.985); // Set the position of the title box - // tdrStyle->SetTitleStyle(Style_t style = 1001); - // tdrStyle->SetTitleBorderSize(2); - - // For the axis titles: - tdrStyle->SetTitleColor(1, "XYZ"); - tdrStyle->SetTitleFont(42, "XYZ"); - tdrStyle->SetTitleSize(0.04, "XYZ"); - // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? - // tdrStyle->SetTitleYSize(Float_t size = 0.02); - tdrStyle->SetTitleXOffset(1.25); - tdrStyle->SetTitleYOffset(1.50); - // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset - - // For the axis labels: - tdrStyle->SetLabelColor(1, "XYZ"); - tdrStyle->SetLabelFont(42, "XYZ"); - tdrStyle->SetLabelOffset(0.007, "XYZ"); - tdrStyle->SetLabelSize(0.03, "XYZ"); - - // For the axis: - tdrStyle->SetAxisColor(1, "XYZ"); - tdrStyle->SetStripDecimals(kTRUE); - tdrStyle->SetTickLength(0.03, "XYZ"); - tdrStyle->SetNdivisions(510, "XYZ"); - tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame - tdrStyle->SetPadTickY(1); - - // Change for log plots: - tdrStyle->SetOptLogx(0); - tdrStyle->SetOptLogy(0); - tdrStyle->SetOptLogz(0); - - // Postscript options: - tdrStyle->SetPaperSize(20.,20.); - // tdrStyle->SetLineScalePS(Float_t scale = 3); - // tdrStyle->SetLineStyleString(Int_t i, const char* text); - // tdrStyle->SetHeaderPS(const char* header); - // tdrStyle->SetTitlePS(const char* pstitle); - - //tdrStyle->SetBarOffset(Float_t baroff = 0.5); - //tdrStyle->SetBarWidth(Float_t barwidth = 0.5); - //tdrStyle->SetPaintTextFormat(const char* format = "g"); - tdrStyle->SetPalette(1); - //tdrStyle->SetTimeOffset(Double_t toffset); - //tdrStyle->SetHistMinimumZero(kTRUE); - - - - - - - const Int_t NRGBs = 5; - const Int_t NCont = 255; - - Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; - Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; - Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; - Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; - TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); - TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); - tdrStyle->SetNumberContours(NCont); - - - //TLatex *lab = new TLatex(0.70,0.85, "CMS 2008"); - //lab->SetNDC(); - //lab->SetTextFont(42); - //lab->SetTextSize(0.05); - //lab->Draw("same"); - - - - - //gROOT -> ForceStyle(); - - tdrStyle->cd(); -} - - - -int getColor(const int& i) -{ - std::vector colors(19); - - colors[0] = kBlack; - - colors[1] = kBlue; - colors[2] = kRed; - colors[3] = kGreen; - colors[4] = kMagenta; - colors[5] = kCyan; - colors[6] = kOrange; - colors[7] = kGray; - - colors[8] = kCyan+2; - colors[9] = kOrange+2; - colors[10] = kMagenta+2; - colors[11] = kRed+2; - colors[12] = kBlue+2; - colors[13] = kOrange+2; - colors[14] = kGray+2; - - colors[15] = kRed+3; - colors[16] = kBlue+3; - colors[17] = kGreen+3; - colors[18] = kMagenta+3; - - if(i < 19) return colors.at(i); - else return i; -} diff --git a/EOverPCalibration/NtuplePackage/src/treeReader.cc b/EOverPCalibration/NtuplePackage/src/treeReader.cc deleted file mode 100644 index 00045319059..00000000000 --- a/EOverPCalibration/NtuplePackage/src/treeReader.cc +++ /dev/null @@ -1,691 +0,0 @@ -#include "../interface/treeReader.h" - -treeReader::treeReader (TTree * tree, bool verbosity) : -m_tree (tree), -m_verbosity (verbosity) -{ - - TObjArray * br_list = m_tree->GetListOfBranches () ; - TIter br_it (br_list) ; - - TBranch * iBranch ; - TBranchElement* bre ; - TLeaf* Leaf; - - while ((iBranch = (TBranch *) br_it.Next ())) { - bre = (TBranchElement*) iBranch ; - std::string bname = bre->GetClassName () ; - std::string branchTitle = iBranch->GetTitle(); - if(branchTitle.find("bsmReweight")!= std::string::npos) continue ; - if(bname!=""){ - - if (bname.find ("Event") != std::string::npos) continue ; - - if (!bname.find ("vector > >")){ - if (m_verbosity) - std::cout << "4V | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - m_4Vvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_4Vvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector,ROOT::Math::DefaultCoordinateSystemTag> >") ){ - if (m_verbosity) - std::cout << "3V | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - m_3Vvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_3Vvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - m_Bvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Bvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "IV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - m_Ivectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Ivectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "SV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - m_Svectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Svectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - m_Fvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Fvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "DV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - m_Dvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Dvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("ROOT::Math::LorentzVector > ")){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName() << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} - else{ k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector ;m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} - - } - - - else if (!bname.find ("ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>* ")){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} - else{ k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector ;m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} - - } - - - else if (!bname.find ("bool") || !bname.find ("Bool_t") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Bvectors[bre->GetName ()] = new bool [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} - else{ k_Bvectors[bre->GetName ()] = new bool ; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} - } - - - else if (!bname.find ("int") || !bname.find ("Int_t") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Ivectors[bre->GetName ()] = new int [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} - else{ k_Ivectors[bre->GetName ()] = new int ; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} - } - - - else if (!bname.find ("std::string") || !bname.find ("TString") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Svectors[bre->GetName ()] = new std::string [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} - else{ k_Svectors[bre->GetName ()] = new std::string ; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} - - } - - - else if (!bname.find ("float") || !bname.find ("Float_t") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Fvectors[bre->GetName ()] = new float [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } - else if(vectorx==0 && vectory==0){ k_Fvectors[bre->GetName ()] = new float ; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } - - } - - else if (!bname.find ("double") || !bname.find ("Double_t") ){ - if (m_verbosity) - std::cout << "DV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - if(vectorx!=0 && vectory==0){k_Dvectors[bre->GetName ()] = new double [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} - else{ k_Dvectors[bre->GetName ()] = new double ; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} - } - - } - - else{ - - Leaf = iBranch->GetLeaf(iBranch->GetName()); - if(Leaf==0) continue; - std::string bname = Leaf->GetTypeName(); - - if (!bname.find ("Event") ) continue ; - - else if (!bname.find ("vector > >") ){ - if (m_verbosity) - std::cout << "4V | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - m_4Vvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_4Vvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector,ROOT::Math::DefaultCoordinateSystemTag> >") ){ - if (m_verbosity) - std::cout << "3V | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - m_3Vvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_3Vvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "IV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - m_Bvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Bvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "IV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - m_Ivectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Ivectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "SV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - m_Svectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Svectors[bre->GetName ()]) ; - } - - else if (bname.find ("vector") != std::string::npos){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - m_Fvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (),&m_Fvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("vector") ){ - if (m_verbosity) - std::cout << "DV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - m_Dvectors[bre->GetName ()] = new std::vector ; - m_tree->SetBranchAddress (bre->GetName (), &m_Dvectors[bre->GetName ()]) ; - } - - else if (!bname.find ("ROOT::Math::LorentzVector >* ")){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} - else{ k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector ;m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} - - } - - - else if (!bname.find ("ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>* ")){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} - else{ k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector ;m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} - } - - else if (!bname.find ("bool") || !bname.find ("Bool_t") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Bvectors[bre->GetName ()] = new bool [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} - else{ k_Bvectors[bre->GetName ()] = new bool ; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} - } - - - - else if (!bname.find ("int") || !bname.find ("Int_t") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Ivectors[bre->GetName ()] = new int [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} - else{ k_Ivectors[bre->GetName ()] = new int ; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} - } - - - else if (!bname.find ("std::string") || !bname.find ("TString") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Svectors[bre->GetName ()] = new std::string [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} - else{ k_Svectors[bre->GetName ()] = new std::string ; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} - - } - - - else if (!bname.find ("float") || !bname.find ("Float_t") ){ - if (m_verbosity) - std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - - if(vectorx!=0 && vectory==0){k_Fvectors[bre->GetName ()] = new float [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } - else if(vectorx==0 && vectory==0){ k_Fvectors[bre->GetName ()] = new float ; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } - - } - - else if (!bname.find ("double") || !bname.find ("Double_t") ){ - if (m_verbosity) - std::cout << "DV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; - - int foundFirst = branchTitle.find("/"); - int vectorx = 0 ; - int vectory = 0 ; - - if(branchTitle.at(foundFirst-1)==']'){ - - size_t foundUp = branchTitle.find_first_of("["); - size_t foundDw = branchTitle.find_first_of("]"); - - std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - vectorx = atoi(npos.c_str()); - - branchTitle.replace(foundUp,foundDw-foundUp+1,""); - foundUp = branchTitle.find_first_of("["); - foundDw = branchTitle.find_first_of("]"); - npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); - - vectory = atoi(npos.c_str()); - - } - if(vectorx!=0 && vectory==0){k_Dvectors[bre->GetName ()] = new double [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} - else{ k_Dvectors[bre->GetName ()] = new double ; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} - } - - } - - } //PG loop over branches - - std::cout << " --> " << (m_3Vvectors.size () + m_4Vvectors.size () + m_Fvectors.size () + m_Dvectors.size () + m_Ivectors.size ()) + - (k_3Vvectors.size () + k_4Vvectors.size () + k_Fvectors.size () + k_Dvectors.size () + k_Ivectors.size ()) << " branches read\n" ; - -} - - -// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- - - -treeReader::~treeReader () { - - for (std::map * >::const_iterator iMap = m_Dvectors.begin () ; iMap != m_Dvectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - - for (std::map * >::const_iterator iMap = m_Fvectors.begin () ; iMap != m_Fvectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map * >::const_iterator iMap = m_Ivectors.begin () ; iMap != m_Ivectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map * >::const_iterator iMap = m_Svectors.begin () ; iMap != m_Svectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map * >::const_iterator iMap = m_4Vvectors.begin () ; iMap != m_4Vvectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map * >::const_iterator iMap = m_3Vvectors.begin () ; iMap != m_3Vvectors.end (); ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map ::const_iterator iMap = k_Dvectors.begin () ; iMap != k_Dvectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map ::const_iterator iMap = k_Fvectors.begin () ; iMap != k_Fvectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map ::const_iterator iMap = k_Ivectors.begin () ; iMap != k_Ivectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map ::const_iterator iMap = k_Svectors.begin () ; iMap != k_Svectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map ::const_iterator iMap = k_4Vvectors.begin () ; iMap != k_4Vvectors.end () ; ++iMap) - if(iMap->second) delete iMap->second ; - - for (std::map ::const_iterator iMap = k_3Vvectors.begin () ; iMap != k_3Vvectors.end (); ++iMap) - if(iMap->second) delete iMap->second ; - -} - - -std::vector* treeReader::Get3V(const std::string &name){ - std::map * >::const_iterator it_3V = m_3Vvectors.find(name); - if (it_3V != m_3Vvectors.end() ) return m_3Vvectors[name]; - else return new std::vector; -} - -ROOT::Math::XYZVector* treeReader::get3V(const std::string &name){ - std::map::const_iterator it_3V = k_3Vvectors.find(name); - if (it_3V != k_3Vvectors.end() ) return k_3Vvectors[name]; - else return new ROOT::Math::XYZVector; -} - -std::vector* treeReader::Get4V(const std::string &name){ - std::map * >::const_iterator it_4V = m_4Vvectors.find(name); - if (it_4V != m_4Vvectors.end() ) return m_4Vvectors[name]; - else return new std::vector; -} - -ROOT::Math::XYZTVector* treeReader::get4V(const std::string &name){ - std::map::const_iterator it_4V = k_4Vvectors.find(name); - if (it_4V != k_4Vvectors.end() ) return k_4Vvectors[name]; - else return new ROOT::Math::XYZTVector; -} - -std::vector* treeReader::GetDouble(const std::string &name){ - std::map * >::const_iterator it_D = m_Dvectors.find(name); - if (it_D != m_Dvectors.end() ) return m_Dvectors[name]; - else return new std::vector; -} - -double* treeReader::getDouble(const std::string &name){ - std::map::const_iterator it_D = k_Dvectors.find(name); - if (it_D != k_Dvectors.end() ) return k_Dvectors[name]; - else return new double; -} - -std::vector* treeReader::GetFloat(const std::string &name){ - std::map * >::const_iterator it_F = m_Fvectors.find(name); - if (it_F != m_Fvectors.end() ) return m_Fvectors[name]; - else return new std::vector; -} - -float* treeReader::getFloat(const std::string &name){ - std::map::const_iterator it_F = k_Fvectors.find(name); - if (it_F != k_Fvectors.end() ) return k_Fvectors[name]; - else return new float; -} - -std::vector* treeReader::GetInt(const std::string &name){ - std::map * >::const_iterator it_I = m_Ivectors.find(name); - if (it_I != m_Ivectors.end() ) return m_Ivectors[name]; - else return new std::vector; -} - -int* treeReader::getInt(const std::string &name){ - std::map::const_iterator it_I = k_Ivectors.find(name); - if (it_I != k_Ivectors.end() ) return k_Ivectors[name]; - else return new int; -} - - -std::vector* treeReader::GetBool(const std::string &name){ - std::map * >::const_iterator it_I = m_Bvectors.find(name); - if (it_I != m_Bvectors.end() ) return m_Bvectors[name]; - else return new std::vector; -} - -bool* treeReader::getBool(const std::string &name){ - std::map::const_iterator it_I = k_Bvectors.find(name); - if (it_I != k_Bvectors.end() ) return k_Bvectors[name]; - else return new bool; -} - -std::vector* treeReader::GetString(const std::string &name){ - std::map * >::const_iterator it_S = m_Svectors.find(name); - if (it_S != m_Svectors.end() ) return m_Svectors[name]; - else return new std::vector; -} - -std::string* treeReader::getString(const std::string &name){ - std::map::const_iterator it_S = k_Svectors.find(name); - if (it_S != k_Svectors.end() ) return k_Svectors[name]; - else return new std::string; -} diff --git a/EOverPCalibration/README.md b/EOverPCalibration/README.md deleted file mode 100644 index aef40c64d0b..00000000000 --- a/EOverPCalibration/README.md +++ /dev/null @@ -1,4 +0,0 @@ -EOverPCalibration -================= - -Package for Single Electron Calibration From 6b0e89f9c9f2bd6c415a96b0badf3ae0bbc6e26b Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 21 Sep 2014 18:36:12 +0200 Subject: [PATCH 451/475] E/P calibration area --- EOverPCalibration/BuildFile.xml | 8 + .../BasicClusterLocalContainementCorrection.C | 26 + ...asicClusterLocalContainmentCorrectionEta.C | 29 + ...asicClusterLocalContainmentCorrectionPhi.C | 24 + .../CommonTools/TMomentumCalibration.h | 46 + .../CommonTools/TPileupReweighting.h | 35 + EOverPCalibration/CommonTools/eerings.dat | 14648 ++++++++++++++++ EOverPCalibration/CommonTools/histoFunc.h | 92 + EOverPCalibration/README | 160 + EOverPCalibration/RMSFile.txt | 85 + EOverPCalibration/bin/AddRegressionWeight.cpp | 637 + EOverPCalibration/bin/BuildFile.xml | 25 + EOverPCalibration/bin/CalibrationMomentum.cpp | 1143 ++ EOverPCalibration/bin/CalibrationPlots.cpp | 854 + EOverPCalibration/bin/CompareICSet.cpp | 1087 ++ .../bin/CompareSCalibMCTruth_EB.cpp | 256 + .../bin/CompareSCalibMCTruth_EE.cpp | 612 + EOverPCalibration/bin/DeadXtalAnalysisEB.cpp | 2313 +++ .../bin/DrawPrecisionPlotsEB.cpp | 207 + .../bin/DrawPrecisionPlotsEE.cpp | 319 + EOverPCalibration/bin/FastCalibratorEB.cpp | 361 + .../bin/FastCalibratorEB_MVA.cpp | 203 + EOverPCalibration/bin/FastCalibratorEE.cpp | 365 + .../bin/FastCalibratorEE_MVA.cpp | 230 + EOverPCalibration/bin/MVARegression.cpp | 389 + EOverPCalibration/bin/MakeJobs.cpp | 584 + .../bin/MomentumCorrection_MC.cpp | 327 + EOverPCalibration/bin/NormalizeIC_EE.cpp | 572 + EOverPCalibration/bin/OccupancyPlot.cpp | 647 + EOverPCalibration/bin/PlotICMapsRatio.cpp | 269 + EOverPCalibration/bin/PlotICMapsRatioEE.cpp | 235 + EOverPCalibration/bin/RateHLTvsEta.cpp | 231 + EOverPCalibration/bin/XtalAlphaEB.cpp | 219 + EOverPCalibration/bin/XtalAlphaEE.cpp | 250 + EOverPCalibration/bin/Zlineshape.cpp | 945 + .../cfg/AddRegressionWeight_cfg.py | 17 + EOverPCalibration/cfg/Barrel.cfg | 50 + EOverPCalibration/cfg/DeadXtalAnalysisEB.cfg | 32 + EOverPCalibration/cfg/Endcap.cfg | 25 + .../cfg/FastCalibrator_EB_nosplit_cfg.py | 34 + .../cfg/FastCalibrator_EB_split_cfg.py | 34 + .../cfg/FastCalibrator_EE_nosplit_cfg.py | 35 + .../cfg/FastCalibrator_EE_split_cfg.py | 35 + .../cfg/FastCalibrator_Template.cfg | 37 + EOverPCalibration/cfg/MVARegression_cfg.cfg | 33 + EOverPCalibration/cfg/MakeJobs_cfg.cfg | 61 + EOverPCalibration/cfg/NormalizeEE_cfg.py | 16 + EOverPCalibration/cfg/XtalAlphaEB_noSplit.cfg | 33 + EOverPCalibration/cfg/XtalAlphaEB_split.cfg | 33 + EOverPCalibration/cfg/XtalAlphaEE_noSplit.cfg | 31 + EOverPCalibration/cfg/XtalAlphaEE_split.cfg | 34 + EOverPCalibration/cfg/Zlineshape_cfg.cfg | 49 + .../cfg/calibrationMomentum_cfg.py | 23 + .../cfg/calibrationPlots_EB_cfg.py | 22 + .../cfg/calibrationPlots_EE_cfg.py | 22 + EOverPCalibration/cfg/comparisonEB_cfg.py | 12 + EOverPCalibration/cfg/comparisonEE_cfg.py | 13 + EOverPCalibration/cfg/list.txt | 5 + .../cfg/listDATA_momentumCalibration.txt | 5 + .../cfg/listMC2012_momentumCalibration.txt | 6 + EOverPCalibration/cfg/test.cfg | 34 + .../interface/CalibrationUtils.h | 102 + EOverPCalibration/interface/DrawingUtils.h | 46 + .../interface/FastCalibratorEB.h | 219 + .../interface/FastCalibratorEB_MVA.h | 243 + .../interface/FastCalibratorEE.h | 258 + .../interface/FastCalibratorEE_MVA.h | 277 + .../interface/GetHashedIndexEB.h | 22 + .../interface/GetHashedIndexEE.h | 29 + EOverPCalibration/interface/LinkDef.h | 8 + EOverPCalibration/interface/SIC_ixiyiz.list | 1546 ++ EOverPCalibration/interface/TEndcapRings.h | 49 + EOverPCalibration/interface/TSicCrystals.h | 41 + EOverPCalibration/interface/XtalAlphaEB.h | 251 + EOverPCalibration/interface/XtalAlphaEE.h | 298 + EOverPCalibration/interface/Zutils.h | 60 + EOverPCalibration/interface/geometryUtils.h | 56 + EOverPCalibration/interface/setTDRStyle.h | 14 + ...V_13Jul2012ReReco_Collisions12_JSON_v2.txt | 1 + ...2_8TeV_PromptReco_Collisions12_JSON_v2.txt | 374 + ...2_8TeV_PromptReco_Collisions12_JSON_v2.txt | 1 + ...8686_8TeV_PromptReco_Collisions12_JSON.txt | 1 + .../macros/CombineMomentumCalibration.cxx | 339 + EOverPCalibration/macros/CompareCoeff.cxx | 144 + EOverPCalibration/macros/CompareL3Template.C | 136 + .../Correction_TrackerEffect_EE_DATA.cxx | 295 + .../macros/Correction_TrackerEffect_EE_MC.cxx | 384 + .../macros/DrawCalibrationPlotsEB.C | 442 + .../macros/DrawCalibrationPlotsEB_phiGroups.C | 406 + .../macros/DrawCalibrationPlotsEE.C | 763 + .../macros/DrawEPDistributions.cxx | 89 + .../macros/DrawMomentumCalibration.cxx | 227 + .../macros/DrawResidualPlotsEB.C | 330 + EOverPCalibration/macros/Normalize_IC_EE.cxx | 277 + EOverPCalibration/macros/ProduceScalibMap.C | 45 + EOverPCalibration/macros/ProduceScalibMapEE.C | 46 + EOverPCalibration/macros/README | 94 + EOverPCalibration/macros/eerings.dat | 14648 ++++++++++++++++ EOverPCalibration/src/CalibrationUtils.cc | 1069 ++ EOverPCalibration/src/DrawingUtils.cc | 318 + EOverPCalibration/src/FastCalibratorEB.cc | 974 + EOverPCalibration/src/FastCalibratorEB_MVA.cc | 1048 ++ EOverPCalibration/src/FastCalibratorEE.cc | 1085 ++ EOverPCalibration/src/FastCalibratorEE_MVA.cc | 1149 ++ EOverPCalibration/src/GetHashedIndexEB.cc | 32 + EOverPCalibration/src/GetHashedIndexEE.cc | 75 + EOverPCalibration/src/README | 29 + EOverPCalibration/src/TEndcapRings.cc | 71 + EOverPCalibration/src/TSicCrystals.cc | 28 + EOverPCalibration/src/XtalAlphaEB.cc | 998 ++ EOverPCalibration/src/XtalAlphaEE.cc | 1474 ++ EOverPCalibration/src/Zutils.cc | 640 + EOverPCalibration/src/geometryUtils.cc | 256 + EOverPCalibration/src/setTDRStyle.cc | 168 + 114 files changed, 61139 insertions(+) create mode 100644 EOverPCalibration/BuildFile.xml create mode 100644 EOverPCalibration/CommonTools/BasicClusterLocalContainementCorrection.C create mode 100644 EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionEta.C create mode 100644 EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C create mode 100644 EOverPCalibration/CommonTools/TMomentumCalibration.h create mode 100644 EOverPCalibration/CommonTools/TPileupReweighting.h create mode 100644 EOverPCalibration/CommonTools/eerings.dat create mode 100755 EOverPCalibration/CommonTools/histoFunc.h create mode 100644 EOverPCalibration/README create mode 100644 EOverPCalibration/RMSFile.txt create mode 100755 EOverPCalibration/bin/AddRegressionWeight.cpp create mode 100644 EOverPCalibration/bin/BuildFile.xml create mode 100644 EOverPCalibration/bin/CalibrationMomentum.cpp create mode 100644 EOverPCalibration/bin/CalibrationPlots.cpp create mode 100644 EOverPCalibration/bin/CompareICSet.cpp create mode 100644 EOverPCalibration/bin/CompareSCalibMCTruth_EB.cpp create mode 100644 EOverPCalibration/bin/CompareSCalibMCTruth_EE.cpp create mode 100644 EOverPCalibration/bin/DeadXtalAnalysisEB.cpp create mode 100644 EOverPCalibration/bin/DrawPrecisionPlotsEB.cpp create mode 100644 EOverPCalibration/bin/DrawPrecisionPlotsEE.cpp create mode 100644 EOverPCalibration/bin/FastCalibratorEB.cpp create mode 100644 EOverPCalibration/bin/FastCalibratorEB_MVA.cpp create mode 100644 EOverPCalibration/bin/FastCalibratorEE.cpp create mode 100644 EOverPCalibration/bin/FastCalibratorEE_MVA.cpp create mode 100644 EOverPCalibration/bin/MVARegression.cpp create mode 100644 EOverPCalibration/bin/MakeJobs.cpp create mode 100644 EOverPCalibration/bin/MomentumCorrection_MC.cpp create mode 100644 EOverPCalibration/bin/NormalizeIC_EE.cpp create mode 100644 EOverPCalibration/bin/OccupancyPlot.cpp create mode 100644 EOverPCalibration/bin/PlotICMapsRatio.cpp create mode 100644 EOverPCalibration/bin/PlotICMapsRatioEE.cpp create mode 100644 EOverPCalibration/bin/RateHLTvsEta.cpp create mode 100644 EOverPCalibration/bin/XtalAlphaEB.cpp create mode 100644 EOverPCalibration/bin/XtalAlphaEE.cpp create mode 100644 EOverPCalibration/bin/Zlineshape.cpp create mode 100644 EOverPCalibration/cfg/AddRegressionWeight_cfg.py create mode 100644 EOverPCalibration/cfg/Barrel.cfg create mode 100644 EOverPCalibration/cfg/DeadXtalAnalysisEB.cfg create mode 100644 EOverPCalibration/cfg/Endcap.cfg create mode 100644 EOverPCalibration/cfg/FastCalibrator_EB_nosplit_cfg.py create mode 100644 EOverPCalibration/cfg/FastCalibrator_EB_split_cfg.py create mode 100644 EOverPCalibration/cfg/FastCalibrator_EE_nosplit_cfg.py create mode 100644 EOverPCalibration/cfg/FastCalibrator_EE_split_cfg.py create mode 100644 EOverPCalibration/cfg/FastCalibrator_Template.cfg create mode 100644 EOverPCalibration/cfg/MVARegression_cfg.cfg create mode 100644 EOverPCalibration/cfg/MakeJobs_cfg.cfg create mode 100644 EOverPCalibration/cfg/NormalizeEE_cfg.py create mode 100644 EOverPCalibration/cfg/XtalAlphaEB_noSplit.cfg create mode 100644 EOverPCalibration/cfg/XtalAlphaEB_split.cfg create mode 100644 EOverPCalibration/cfg/XtalAlphaEE_noSplit.cfg create mode 100644 EOverPCalibration/cfg/XtalAlphaEE_split.cfg create mode 100644 EOverPCalibration/cfg/Zlineshape_cfg.cfg create mode 100644 EOverPCalibration/cfg/calibrationMomentum_cfg.py create mode 100644 EOverPCalibration/cfg/calibrationPlots_EB_cfg.py create mode 100644 EOverPCalibration/cfg/calibrationPlots_EE_cfg.py create mode 100644 EOverPCalibration/cfg/comparisonEB_cfg.py create mode 100644 EOverPCalibration/cfg/comparisonEE_cfg.py create mode 100644 EOverPCalibration/cfg/list.txt create mode 100644 EOverPCalibration/cfg/listDATA_momentumCalibration.txt create mode 100644 EOverPCalibration/cfg/listMC2012_momentumCalibration.txt create mode 100644 EOverPCalibration/cfg/test.cfg create mode 100644 EOverPCalibration/interface/CalibrationUtils.h create mode 100644 EOverPCalibration/interface/DrawingUtils.h create mode 100644 EOverPCalibration/interface/FastCalibratorEB.h create mode 100644 EOverPCalibration/interface/FastCalibratorEB_MVA.h create mode 100644 EOverPCalibration/interface/FastCalibratorEE.h create mode 100644 EOverPCalibration/interface/FastCalibratorEE_MVA.h create mode 100644 EOverPCalibration/interface/GetHashedIndexEB.h create mode 100644 EOverPCalibration/interface/GetHashedIndexEE.h create mode 100644 EOverPCalibration/interface/LinkDef.h create mode 100644 EOverPCalibration/interface/SIC_ixiyiz.list create mode 100644 EOverPCalibration/interface/TEndcapRings.h create mode 100644 EOverPCalibration/interface/TSicCrystals.h create mode 100644 EOverPCalibration/interface/XtalAlphaEB.h create mode 100644 EOverPCalibration/interface/XtalAlphaEE.h create mode 100644 EOverPCalibration/interface/Zutils.h create mode 100644 EOverPCalibration/interface/geometryUtils.h create mode 100644 EOverPCalibration/interface/setTDRStyle.h create mode 100644 EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt create mode 100644 EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt create mode 100644 EOverPCalibration/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt create mode 100644 EOverPCalibration/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt create mode 100644 EOverPCalibration/macros/CombineMomentumCalibration.cxx create mode 100644 EOverPCalibration/macros/CompareCoeff.cxx create mode 100644 EOverPCalibration/macros/CompareL3Template.C create mode 100644 EOverPCalibration/macros/Correction_TrackerEffect_EE_DATA.cxx create mode 100644 EOverPCalibration/macros/Correction_TrackerEffect_EE_MC.cxx create mode 100644 EOverPCalibration/macros/DrawCalibrationPlotsEB.C create mode 100644 EOverPCalibration/macros/DrawCalibrationPlotsEB_phiGroups.C create mode 100644 EOverPCalibration/macros/DrawCalibrationPlotsEE.C create mode 100644 EOverPCalibration/macros/DrawEPDistributions.cxx create mode 100644 EOverPCalibration/macros/DrawMomentumCalibration.cxx create mode 100644 EOverPCalibration/macros/DrawResidualPlotsEB.C create mode 100644 EOverPCalibration/macros/Normalize_IC_EE.cxx create mode 100644 EOverPCalibration/macros/ProduceScalibMap.C create mode 100644 EOverPCalibration/macros/ProduceScalibMapEE.C create mode 100644 EOverPCalibration/macros/README create mode 100644 EOverPCalibration/macros/eerings.dat create mode 100644 EOverPCalibration/src/CalibrationUtils.cc create mode 100644 EOverPCalibration/src/DrawingUtils.cc create mode 100644 EOverPCalibration/src/FastCalibratorEB.cc create mode 100644 EOverPCalibration/src/FastCalibratorEB_MVA.cc create mode 100644 EOverPCalibration/src/FastCalibratorEE.cc create mode 100644 EOverPCalibration/src/FastCalibratorEE_MVA.cc create mode 100644 EOverPCalibration/src/GetHashedIndexEB.cc create mode 100644 EOverPCalibration/src/GetHashedIndexEE.cc create mode 100644 EOverPCalibration/src/README create mode 100644 EOverPCalibration/src/TEndcapRings.cc create mode 100644 EOverPCalibration/src/TSicCrystals.cc create mode 100644 EOverPCalibration/src/XtalAlphaEB.cc create mode 100644 EOverPCalibration/src/XtalAlphaEE.cc create mode 100644 EOverPCalibration/src/Zutils.cc create mode 100644 EOverPCalibration/src/geometryUtils.cc create mode 100755 EOverPCalibration/src/setTDRStyle.cc diff --git a/EOverPCalibration/BuildFile.xml b/EOverPCalibration/BuildFile.xml new file mode 100644 index 00000000000..1e236e61990 --- /dev/null +++ b/EOverPCalibration/BuildFile.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/EOverPCalibration/CommonTools/BasicClusterLocalContainementCorrection.C b/EOverPCalibration/CommonTools/BasicClusterLocalContainementCorrection.C new file mode 100644 index 00000000000..0e3838269e3 --- /dev/null +++ b/EOverPCalibration/CommonTools/BasicClusterLocalContainementCorrection.C @@ -0,0 +1,26 @@ +#include "TF1.h" + +//TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2)-[3]*pow(x,3)-[4]*pow(x,4))",-1,1.); +TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); + +double BasicClusterLocalContainementCorrection (float localEta, int imod){ + + // --- correction function derived from E/p data + // pol4 + // if (imod==0) f->SetParameters(1.00613,0.0049502 , 0.0677101 , 0.0148299 , 0.00523093); + // if (imod==1) f->SetParameters(1.00633,0.00403076 , 0.0689901 , 0.00242213 , 0.0239275); + // if (imod==2) f->SetParameters(1.00648,0.0111289 , 0.0878569 , 0.0299266 , -0.0597349); + // if (imod==3) f->SetParameters(1.01058,0.0135225 , 0.16731 , 0.0208505 , -0.21014); + + // pol2 + if (imod==0) f->SetParameters(1.00603,0.00300789 , 0.0667232); + if (imod==1) f->SetParameters(1.00655,0.00386189 , 0.073931); + if (imod==2) f->SetParameters(1.00634,0.00631341 , 0.0764134); + if (imod==3) f->SetParameters(1.00957,0.0113306 , 0.123808); + + + double corr = f-> Eval(localEta); + return(1./corr); + +} + diff --git a/EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionEta.C b/EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionEta.C new file mode 100644 index 00000000000..5a188322f65 --- /dev/null +++ b/EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionEta.C @@ -0,0 +1,29 @@ +// Local containment correction vs local eta of basic clusters +// --- correction function derived from E/p data +// --- tested both pol2 and plo4 --> very similar results + +#include "TF1.h" + +//TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2)-[3]*pow(x,3)-[4]*pow(x,4))",-1,1.); +TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); + +double BasicClusterLocalContainmentCorrectionEta (float localEta, int imod){ + + // pol4 + // if (imod==0) f->SetParameters(1.00613,0.0049502 , 0.0677101 , 0.0148299 , 0.00523093); + // if (imod==1) f->SetParameters(1.00633,0.00403076 , 0.0689901 , 0.00242213 , 0.0239275); + // if (imod==2) f->SetParameters(1.00648,0.0111289 , 0.0878569 , 0.0299266 , -0.0597349); + // if (imod==3) f->SetParameters(1.01058,0.0135225 , 0.16731 , 0.0208505 , -0.21014); + + // pol2 + if (imod==0) f->SetParameters(1.00603,0.00300789 , 0.0667232); + if (imod==1) f->SetParameters(1.00655,0.00386189 , 0.073931); + if (imod==2) f->SetParameters(1.00634,0.00631341 , 0.0764134); + if (imod==3) f->SetParameters(1.00957,0.0113306 , 0.123808); + + + double corr = f-> Eval(localEta); + return(1./corr); + +} + diff --git a/EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C b/EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C new file mode 100644 index 00000000000..b487726c3e2 --- /dev/null +++ b/EOverPCalibration/CommonTools/BasicClusterLocalContainmentCorrectionPhi.C @@ -0,0 +1,24 @@ +// Local containment correction vs local eta of basic clusters +// --- correction function derived from E/p data +// --- caveat : E/p realtive scale vs local phi depends on (eta*charge). +// this is an average correction for all R9 and all (eta*charge) electrons + +#include "TF1.h" + +TF1 *f = new TF1("f","[0]+([1]*(x)-[2]*pow(x,2))",-1,1.); + +double BasicClusterLocalContainmentCorrectionPhi (float localPhi, int imod){ + + // --- correction function derived from E/p data + + // pol2 + if (imod==0) f->SetParameters(1.00403,-0.0012733 , 0.042925); + if (imod==1) f->SetParameters(1.00394,-0.00137567 , 0.0416698); + if (imod==2) f->SetParameters(1.00298,-0.00111589 , 0.0320377); + if (imod==3)f->SetParameters(1.00269,-0.00153347 , 0.0296769); + + double corr = f-> Eval(localPhi); + return(1./corr); + +} + diff --git a/EOverPCalibration/CommonTools/TMomentumCalibration.h b/EOverPCalibration/CommonTools/TMomentumCalibration.h new file mode 100644 index 00000000000..347691f68be --- /dev/null +++ b/EOverPCalibration/CommonTools/TMomentumCalibration.h @@ -0,0 +1,46 @@ +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TCanvas.h" +#include "TGraphErrors.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class TMomentumCalibration { + private: + TGraphErrors *gdata; + TGraphErrors *gmc; + public: + TMomentumCalibration(std::string); + ~TMomentumCalibration(); + double GetMomentumCalibration(int, int); + // ClassDef(TMomentumCalibration,1); +}; + +// default constructor, reading the corrections from file +TMomentumCalibration::TMomentumCalibration(std::string fname) { + TFile *fP = TFile::Open(fname.c_str(), "READ"); + std::cout << "Reading momentum calibration from :"<< fname.c_str() << std::endl; + gdata = (TGraphErrors*)fP->Get("g_EoC"); + gmc = (TGraphErrors*)fP->Get("g_EoP"); + return; +} + +TMomentumCalibration::~TMomentumCalibration() { return;} + +double TMomentumCalibration::GetMomentumCalibration(int ieta, int isData){ + double scale; + // NB: i graps contengono la scala di 1/p. + if ( isData) scale = gdata -> Eval(ieta); + if (!isData) scale = gmc -> Eval(ieta); + if (scale == 0) scale = 1.; + return (scale); +} diff --git a/EOverPCalibration/CommonTools/TPileupReweighting.h b/EOverPCalibration/CommonTools/TPileupReweighting.h new file mode 100644 index 00000000000..082b2a51e91 --- /dev/null +++ b/EOverPCalibration/CommonTools/TPileupReweighting.h @@ -0,0 +1,35 @@ +#include "TFile.h" +#include "TH1.h" + +#include +#include +#include +#include + + +class TPileupReweighting { + private: + float w[100]; + public: + TPileupReweighting(std::string,std::string); + ~TPileupReweighting(); + double GetWeight(int); + // ClassDef(TPileupReweighting,1); +}; + +// default constructor, reading the corrections from file +TPileupReweighting::TPileupReweighting(std::string fname, std::string hname) { + TFile weightsFile(fname.c_str(),"READ"); + TH1F* hweights = (TH1F*)weightsFile.Get(hname.c_str()); + for (int ibin = 1; ibin < hweights->GetNbinsX()+1; ibin++){ + w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 + } + weightsFile.Close(); + return; +} + +TPileupReweighting::~TPileupReweighting() { return;} + +double TPileupReweighting::GetWeight(int npu){ + return (w[npu]); +} diff --git a/EOverPCalibration/CommonTools/eerings.dat b/EOverPCalibration/CommonTools/eerings.dat new file mode 100644 index 00000000000..b1a1f13daae --- /dev/null +++ b/EOverPCalibration/CommonTools/eerings.dat @@ -0,0 +1,14648 @@ +(1, 41, -1) 0 +(1, 42, -1) 0 +(1, 43, -1) 0 +(1, 44, -1) 0 +(1, 45, -1) 0 +(1, 46, -1) 0 +(1, 47, -1) 0 +(1, 48, -1) 0 +(1, 49, -1) 0 +(1, 50, -1) 0 +(1, 51, -1) 0 +(1, 52, -1) 0 +(1, 53, -1) 0 +(1, 54, -1) 0 +(1, 55, -1) 0 +(1, 56, -1) 0 +(1, 57, -1) 0 +(1, 58, -1) 0 +(1, 59, -1) 0 +(1, 60, -1) 0 +(2, 41, -1) 0 +(2, 42, -1) 0 +(2, 43, -1) 0 +(2, 44, -1) 1 +(2, 45, -1) 1 +(2, 46, -1) 1 +(2, 47, -1) 1 +(2, 48, -1) 1 +(2, 49, -1) 1 +(2, 50, -1) 1 +(2, 51, -1) 1 +(2, 52, -1) 1 +(2, 53, -1) 1 +(2, 54, -1) 1 +(2, 55, -1) 1 +(2, 56, -1) 1 +(2, 57, -1) 1 +(2, 58, -1) 0 +(2, 59, -1) 0 +(2, 60, -1) 0 +(3, 41, -1) 1 +(3, 42, -1) 1 +(3, 43, -1) 1 +(3, 44, -1) 2 +(3, 45, -1) 2 +(3, 46, -1) 2 +(3, 47, -1) 2 +(3, 48, -1) 2 +(3, 49, -1) 2 +(3, 50, -1) 2 +(3, 51, -1) 2 +(3, 52, -1) 2 +(3, 53, -1) 2 +(3, 54, -1) 2 +(3, 55, -1) 2 +(3, 56, -1) 2 +(3, 57, -1) 2 +(3, 58, -1) 1 +(3, 59, -1) 1 +(3, 60, -1) 1 +(4, 36, -1) 1 +(4, 37, -1) 1 +(4, 38, -1) 2 +(4, 39, -1) 2 +(4, 40, -1) 2 +(4, 41, -1) 2 +(4, 42, -1) 2 +(4, 43, -1) 2 +(4, 44, -1) 3 +(4, 45, -1) 3 +(4, 46, -1) 3 +(4, 47, -1) 3 +(4, 48, -1) 3 +(4, 49, -1) 3 +(4, 50, -1) 3 +(4, 51, -1) 3 +(4, 52, -1) 3 +(4, 53, -1) 3 +(4, 54, -1) 3 +(4, 55, -1) 3 +(4, 56, -1) 3 +(4, 57, -1) 3 +(4, 58, -1) 2 +(4, 59, -1) 2 +(4, 60, -1) 2 +(4, 61, -1) 2 +(4, 62, -1) 2 +(4, 63, -1) 2 +(4, 64, -1) 1 +(4, 65, -1) 1 +(5, 36, -1) 2 +(5, 37, -1) 2 +(5, 38, -1) 2 +(5, 39, -1) 3 +(5, 40, -1) 3 +(5, 41, -1) 3 +(5, 42, -1) 3 +(5, 43, -1) 3 +(5, 44, -1) 4 +(5, 45, -1) 4 +(5, 46, -1) 4 +(5, 47, -1) 4 +(5, 48, -1) 4 +(5, 49, -1) 4 +(5, 50, -1) 4 +(5, 51, -1) 4 +(5, 52, -1) 4 +(5, 53, -1) 4 +(5, 54, -1) 4 +(5, 55, -1) 4 +(5, 56, -1) 4 +(5, 57, -1) 4 +(5, 58, -1) 3 +(5, 59, -1) 3 +(5, 60, -1) 3 +(5, 61, -1) 3 +(5, 62, -1) 3 +(5, 63, -1) 2 +(5, 64, -1) 2 +(5, 65, -1) 2 +(6, 26, -1) 0 +(6, 27, -1) 0 +(6, 28, -1) 0 +(6, 29, -1) 0 +(6, 30, -1) 1 +(6, 31, -1) 1 +(6, 32, -1) 1 +(6, 33, -1) 2 +(6, 34, -1) 2 +(6, 35, -1) 3 +(6, 36, -1) 3 +(6, 37, -1) 3 +(6, 38, -1) 3 +(6, 39, -1) 4 +(6, 40, -1) 4 +(6, 41, -1) 4 +(6, 42, -1) 4 +(6, 43, -1) 4 +(6, 44, -1) 5 +(6, 45, -1) 5 +(6, 46, -1) 5 +(6, 47, -1) 5 +(6, 48, -1) 5 +(6, 49, -1) 5 +(6, 50, -1) 5 +(6, 51, -1) 5 +(6, 52, -1) 5 +(6, 53, -1) 5 +(6, 54, -1) 5 +(6, 55, -1) 5 +(6, 56, -1) 5 +(6, 57, -1) 5 +(6, 58, -1) 4 +(6, 59, -1) 4 +(6, 60, -1) 4 +(6, 61, -1) 4 +(6, 62, -1) 4 +(6, 63, -1) 3 +(6, 64, -1) 3 +(6, 65, -1) 3 +(6, 66, -1) 3 +(6, 67, -1) 2 +(6, 68, -1) 2 +(6, 69, -1) 1 +(6, 70, -1) 1 +(6, 71, -1) 1 +(6, 72, -1) 0 +(6, 73, -1) 0 +(6, 74, -1) 0 +(6, 75, -1) 0 +(7, 26, -1) 0 +(7, 27, -1) 0 +(7, 28, -1) 1 +(7, 29, -1) 1 +(7, 30, -1) 2 +(7, 31, -1) 2 +(7, 32, -1) 2 +(7, 33, -1) 3 +(7, 34, -1) 3 +(7, 35, -1) 3 +(7, 36, -1) 4 +(7, 37, -1) 4 +(7, 38, -1) 4 +(7, 39, -1) 5 +(7, 40, -1) 5 +(7, 41, -1) 5 +(7, 42, -1) 5 +(7, 43, -1) 5 +(7, 44, -1) 6 +(7, 45, -1) 6 +(7, 46, -1) 6 +(7, 47, -1) 6 +(7, 48, -1) 6 +(7, 49, -1) 6 +(7, 50, -1) 6 +(7, 51, -1) 6 +(7, 52, -1) 6 +(7, 53, -1) 6 +(7, 54, -1) 6 +(7, 55, -1) 6 +(7, 56, -1) 6 +(7, 57, -1) 6 +(7, 58, -1) 5 +(7, 59, -1) 5 +(7, 60, -1) 5 +(7, 61, -1) 5 +(7, 62, -1) 5 +(7, 63, -1) 4 +(7, 64, -1) 4 +(7, 65, -1) 4 +(7, 66, -1) 3 +(7, 67, -1) 3 +(7, 68, -1) 3 +(7, 69, -1) 2 +(7, 70, -1) 2 +(7, 71, -1) 2 +(7, 72, -1) 1 +(7, 73, -1) 1 +(7, 74, -1) 0 +(7, 75, -1) 0 +(8, 26, -1) 1 +(8, 27, -1) 1 +(8, 28, -1) 2 +(8, 29, -1) 2 +(8, 30, -1) 3 +(8, 31, -1) 3 +(8, 32, -1) 3 +(8, 33, -1) 4 +(8, 34, -1) 4 +(8, 35, -1) 4 +(8, 36, -1) 5 +(8, 37, -1) 5 +(8, 38, -1) 5 +(8, 39, -1) 6 +(8, 40, -1) 6 +(8, 41, -1) 6 +(8, 42, -1) 6 +(8, 43, -1) 6 +(8, 44, -1) 7 +(8, 45, -1) 7 +(8, 46, -1) 7 +(8, 47, -1) 7 +(8, 48, -1) 7 +(8, 49, -1) 7 +(8, 50, -1) 7 +(8, 51, -1) 7 +(8, 52, -1) 7 +(8, 53, -1) 7 +(8, 54, -1) 7 +(8, 55, -1) 7 +(8, 56, -1) 7 +(8, 57, -1) 7 +(8, 58, -1) 6 +(8, 59, -1) 6 +(8, 60, -1) 6 +(8, 61, -1) 6 +(8, 62, -1) 6 +(8, 63, -1) 5 +(8, 64, -1) 5 +(8, 65, -1) 5 +(8, 66, -1) 4 +(8, 67, -1) 4 +(8, 68, -1) 4 +(8, 69, -1) 3 +(8, 70, -1) 3 +(8, 71, -1) 3 +(8, 72, -1) 2 +(8, 73, -1) 2 +(8, 74, -1) 1 +(8, 75, -1) 1 +(9, 21, -1) 0 +(9, 22, -1) 0 +(9, 23, -1) 0 +(9, 24, -1) 1 +(9, 25, -1) 1 +(9, 26, -1) 2 +(9, 27, -1) 2 +(9, 28, -1) 3 +(9, 29, -1) 3 +(9, 30, -1) 4 +(9, 31, -1) 4 +(9, 32, -1) 4 +(9, 33, -1) 5 +(9, 34, -1) 5 +(9, 35, -1) 5 +(9, 36, -1) 6 +(9, 37, -1) 6 +(9, 38, -1) 6 +(9, 39, -1) 7 +(9, 40, -1) 7 +(9, 41, -1) 7 +(9, 42, -1) 7 +(9, 43, -1) 7 +(9, 44, -1) 8 +(9, 45, -1) 8 +(9, 46, -1) 8 +(9, 47, -1) 8 +(9, 48, -1) 8 +(9, 49, -1) 8 +(9, 50, -1) 8 +(9, 51, -1) 8 +(9, 52, -1) 8 +(9, 53, -1) 8 +(9, 54, -1) 8 +(9, 55, -1) 8 +(9, 56, -1) 8 +(9, 57, -1) 8 +(9, 58, -1) 7 +(9, 59, -1) 7 +(9, 60, -1) 7 +(9, 61, -1) 7 +(9, 62, -1) 7 +(9, 63, -1) 6 +(9, 64, -1) 6 +(9, 65, -1) 6 +(9, 66, -1) 5 +(9, 67, -1) 5 +(9, 68, -1) 5 +(9, 69, -1) 4 +(9, 70, -1) 4 +(9, 71, -1) 4 +(9, 72, -1) 3 +(9, 73, -1) 3 +(9, 74, -1) 2 +(9, 75, -1) 2 +(9, 76, -1) 1 +(9, 77, -1) 1 +(9, 78, -1) 0 +(9, 79, -1) 0 +(9, 80, -1) 0 +(10, 21, -1) 0 +(10, 22, -1) 1 +(10, 23, -1) 1 +(10, 24, -1) 2 +(10, 25, -1) 2 +(10, 26, -1) 3 +(10, 27, -1) 3 +(10, 28, -1) 4 +(10, 29, -1) 4 +(10, 30, -1) 4 +(10, 31, -1) 5 +(10, 32, -1) 5 +(10, 33, -1) 6 +(10, 34, -1) 6 +(10, 35, -1) 6 +(10, 36, -1) 7 +(10, 37, -1) 7 +(10, 38, -1) 7 +(10, 39, -1) 8 +(10, 40, -1) 8 +(10, 41, -1) 8 +(10, 42, -1) 8 +(10, 43, -1) 8 +(10, 44, -1) 9 +(10, 45, -1) 9 +(10, 46, -1) 9 +(10, 47, -1) 9 +(10, 48, -1) 9 +(10, 49, -1) 9 +(10, 50, -1) 9 +(10, 51, -1) 9 +(10, 52, -1) 9 +(10, 53, -1) 9 +(10, 54, -1) 9 +(10, 55, -1) 9 +(10, 56, -1) 9 +(10, 57, -1) 9 +(10, 58, -1) 8 +(10, 59, -1) 8 +(10, 60, -1) 8 +(10, 61, -1) 8 +(10, 62, -1) 8 +(10, 63, -1) 7 +(10, 64, -1) 7 +(10, 65, -1) 7 +(10, 66, -1) 6 +(10, 67, -1) 6 +(10, 68, -1) 6 +(10, 69, -1) 5 +(10, 70, -1) 5 +(10, 71, -1) 4 +(10, 72, -1) 4 +(10, 73, -1) 4 +(10, 74, -1) 3 +(10, 75, -1) 3 +(10, 76, -1) 2 +(10, 77, -1) 2 +(10, 78, -1) 1 +(10, 79, -1) 1 +(10, 80, -1) 0 +(11, 21, -1) 1 +(11, 22, -1) 1 +(11, 23, -1) 2 +(11, 24, -1) 2 +(11, 25, -1) 3 +(11, 26, -1) 3 +(11, 27, -1) 4 +(11, 28, -1) 4 +(11, 29, -1) 5 +(11, 30, -1) 5 +(11, 31, -1) 6 +(11, 32, -1) 6 +(11, 33, -1) 6 +(11, 34, -1) 7 +(11, 35, -1) 7 +(11, 36, -1) 8 +(11, 37, -1) 8 +(11, 38, -1) 8 +(11, 39, -1) 8 +(11, 40, -1) 9 +(11, 41, -1) 9 +(11, 42, -1) 9 +(11, 43, -1) 9 +(11, 44, -1) 9 +(11, 45, -1) 10 +(11, 46, -1) 10 +(11, 47, -1) 10 +(11, 48, -1) 10 +(11, 49, -1) 10 +(11, 50, -1) 10 +(11, 51, -1) 10 +(11, 52, -1) 10 +(11, 53, -1) 10 +(11, 54, -1) 10 +(11, 55, -1) 10 +(11, 56, -1) 10 +(11, 57, -1) 9 +(11, 58, -1) 9 +(11, 59, -1) 9 +(11, 60, -1) 9 +(11, 61, -1) 9 +(11, 62, -1) 8 +(11, 63, -1) 8 +(11, 64, -1) 8 +(11, 65, -1) 8 +(11, 66, -1) 7 +(11, 67, -1) 7 +(11, 68, -1) 6 +(11, 69, -1) 6 +(11, 70, -1) 6 +(11, 71, -1) 5 +(11, 72, -1) 5 +(11, 73, -1) 4 +(11, 74, -1) 4 +(11, 75, -1) 3 +(11, 76, -1) 3 +(11, 77, -1) 2 +(11, 78, -1) 2 +(11, 79, -1) 1 +(11, 80, -1) 1 +(12, 21, -1) 1 +(12, 22, -1) 2 +(12, 23, -1) 3 +(12, 24, -1) 3 +(12, 25, -1) 4 +(12, 26, -1) 4 +(12, 27, -1) 5 +(12, 28, -1) 5 +(12, 29, -1) 6 +(12, 30, -1) 6 +(12, 31, -1) 7 +(12, 32, -1) 7 +(12, 33, -1) 7 +(12, 34, -1) 8 +(12, 35, -1) 8 +(12, 36, -1) 8 +(12, 37, -1) 9 +(12, 38, -1) 9 +(12, 39, -1) 9 +(12, 40, -1) 10 +(12, 41, -1) 10 +(12, 42, -1) 10 +(12, 43, -1) 10 +(12, 44, -1) 10 +(12, 45, -1) 11 +(12, 46, -1) 11 +(12, 47, -1) 11 +(12, 48, -1) 11 +(12, 49, -1) 11 +(12, 50, -1) 11 +(12, 51, -1) 11 +(12, 52, -1) 11 +(12, 53, -1) 11 +(12, 54, -1) 11 +(12, 55, -1) 11 +(12, 56, -1) 11 +(12, 57, -1) 10 +(12, 58, -1) 10 +(12, 59, -1) 10 +(12, 60, -1) 10 +(12, 61, -1) 10 +(12, 62, -1) 9 +(12, 63, -1) 9 +(12, 64, -1) 9 +(12, 65, -1) 8 +(12, 66, -1) 8 +(12, 67, -1) 8 +(12, 68, -1) 7 +(12, 69, -1) 7 +(12, 70, -1) 7 +(12, 71, -1) 6 +(12, 72, -1) 6 +(12, 73, -1) 5 +(12, 74, -1) 5 +(12, 75, -1) 4 +(12, 76, -1) 4 +(12, 77, -1) 3 +(12, 78, -1) 3 +(12, 79, -1) 2 +(12, 80, -1) 1 +(13, 21, -1) 2 +(13, 22, -1) 3 +(13, 23, -1) 3 +(13, 24, -1) 4 +(13, 25, -1) 5 +(13, 26, -1) 5 +(13, 27, -1) 6 +(13, 28, -1) 6 +(13, 29, -1) 7 +(13, 30, -1) 7 +(13, 31, -1) 7 +(13, 32, -1) 8 +(13, 33, -1) 8 +(13, 34, -1) 9 +(13, 35, -1) 9 +(13, 36, -1) 9 +(13, 37, -1) 10 +(13, 38, -1) 10 +(13, 39, -1) 10 +(13, 40, -1) 11 +(13, 41, -1) 11 +(13, 42, -1) 11 +(13, 43, -1) 11 +(13, 44, -1) 11 +(13, 45, -1) 12 +(13, 46, -1) 12 +(13, 47, -1) 12 +(13, 48, -1) 12 +(13, 49, -1) 12 +(13, 50, -1) 12 +(13, 51, -1) 12 +(13, 52, -1) 12 +(13, 53, -1) 12 +(13, 54, -1) 12 +(13, 55, -1) 12 +(13, 56, -1) 12 +(13, 57, -1) 11 +(13, 58, -1) 11 +(13, 59, -1) 11 +(13, 60, -1) 11 +(13, 61, -1) 11 +(13, 62, -1) 10 +(13, 63, -1) 10 +(13, 64, -1) 10 +(13, 65, -1) 9 +(13, 66, -1) 9 +(13, 67, -1) 9 +(13, 68, -1) 8 +(13, 69, -1) 8 +(13, 70, -1) 7 +(13, 71, -1) 7 +(13, 72, -1) 7 +(13, 73, -1) 6 +(13, 74, -1) 6 +(13, 75, -1) 5 +(13, 76, -1) 5 +(13, 77, -1) 4 +(13, 78, -1) 3 +(13, 79, -1) 3 +(13, 80, -1) 2 +(14, 16, -1) 0 +(14, 17, -1) 1 +(14, 18, -1) 1 +(14, 19, -1) 2 +(14, 20, -1) 2 +(14, 21, -1) 3 +(14, 22, -1) 4 +(14, 23, -1) 4 +(14, 24, -1) 5 +(14, 25, -1) 5 +(14, 26, -1) 6 +(14, 27, -1) 6 +(14, 28, -1) 7 +(14, 29, -1) 7 +(14, 30, -1) 8 +(14, 31, -1) 8 +(14, 32, -1) 9 +(14, 33, -1) 9 +(14, 34, -1) 10 +(14, 35, -1) 10 +(14, 36, -1) 10 +(14, 37, -1) 11 +(14, 38, -1) 11 +(14, 39, -1) 11 +(14, 40, -1) 12 +(14, 41, -1) 12 +(14, 42, -1) 12 +(14, 43, -1) 12 +(14, 44, -1) 12 +(14, 45, -1) 13 +(14, 46, -1) 13 +(14, 47, -1) 13 +(14, 48, -1) 13 +(14, 49, -1) 13 +(14, 50, -1) 13 +(14, 51, -1) 13 +(14, 52, -1) 13 +(14, 53, -1) 13 +(14, 54, -1) 13 +(14, 55, -1) 13 +(14, 56, -1) 13 +(14, 57, -1) 12 +(14, 58, -1) 12 +(14, 59, -1) 12 +(14, 60, -1) 12 +(14, 61, -1) 12 +(14, 62, -1) 11 +(14, 63, -1) 11 +(14, 64, -1) 11 +(14, 65, -1) 10 +(14, 66, -1) 10 +(14, 67, -1) 10 +(14, 68, -1) 9 +(14, 69, -1) 9 +(14, 70, -1) 8 +(14, 71, -1) 8 +(14, 72, -1) 7 +(14, 73, -1) 7 +(14, 74, -1) 6 +(14, 75, -1) 6 +(14, 76, -1) 5 +(14, 77, -1) 5 +(14, 78, -1) 4 +(14, 79, -1) 4 +(14, 80, -1) 3 +(14, 81, -1) 2 +(14, 82, -1) 2 +(14, 83, -1) 1 +(14, 84, -1) 1 +(14, 85, -1) 0 +(15, 16, -1) 1 +(15, 17, -1) 1 +(15, 18, -1) 2 +(15, 19, -1) 3 +(15, 20, -1) 3 +(15, 21, -1) 4 +(15, 22, -1) 4 +(15, 23, -1) 5 +(15, 24, -1) 6 +(15, 25, -1) 6 +(15, 26, -1) 7 +(15, 27, -1) 7 +(15, 28, -1) 8 +(15, 29, -1) 8 +(15, 30, -1) 9 +(15, 31, -1) 9 +(15, 32, -1) 10 +(15, 33, -1) 10 +(15, 34, -1) 11 +(15, 35, -1) 11 +(15, 36, -1) 11 +(15, 37, -1) 12 +(15, 38, -1) 12 +(15, 39, -1) 12 +(15, 40, -1) 13 +(15, 41, -1) 13 +(15, 42, -1) 13 +(15, 43, -1) 13 +(15, 44, -1) 13 +(15, 45, -1) 14 +(15, 46, -1) 14 +(15, 47, -1) 14 +(15, 48, -1) 14 +(15, 49, -1) 14 +(15, 50, -1) 14 +(15, 51, -1) 14 +(15, 52, -1) 14 +(15, 53, -1) 14 +(15, 54, -1) 14 +(15, 55, -1) 14 +(15, 56, -1) 14 +(15, 57, -1) 13 +(15, 58, -1) 13 +(15, 59, -1) 13 +(15, 60, -1) 13 +(15, 61, -1) 13 +(15, 62, -1) 12 +(15, 63, -1) 12 +(15, 64, -1) 12 +(15, 65, -1) 11 +(15, 66, -1) 11 +(15, 67, -1) 11 +(15, 68, -1) 10 +(15, 69, -1) 10 +(15, 70, -1) 9 +(15, 71, -1) 9 +(15, 72, -1) 8 +(15, 73, -1) 8 +(15, 74, -1) 7 +(15, 75, -1) 7 +(15, 76, -1) 6 +(15, 77, -1) 6 +(15, 78, -1) 5 +(15, 79, -1) 4 +(15, 80, -1) 4 +(15, 81, -1) 3 +(15, 82, -1) 3 +(15, 83, -1) 2 +(15, 84, -1) 1 +(15, 85, -1) 1 +(16, 14, -1) 0 +(16, 15, -1) 1 +(16, 16, -1) 1 +(16, 17, -1) 2 +(16, 18, -1) 2 +(16, 19, -1) 3 +(16, 20, -1) 4 +(16, 21, -1) 4 +(16, 22, -1) 5 +(16, 23, -1) 6 +(16, 24, -1) 6 +(16, 25, -1) 7 +(16, 26, -1) 7 +(16, 27, -1) 8 +(16, 28, -1) 9 +(16, 29, -1) 9 +(16, 30, -1) 10 +(16, 31, -1) 10 +(16, 32, -1) 11 +(16, 33, -1) 11 +(16, 34, -1) 11 +(16, 35, -1) 12 +(16, 36, -1) 12 +(16, 37, -1) 13 +(16, 38, -1) 13 +(16, 39, -1) 13 +(16, 40, -1) 13 +(16, 41, -1) 14 +(16, 42, -1) 14 +(16, 43, -1) 14 +(16, 44, -1) 14 +(16, 45, -1) 15 +(16, 46, -1) 15 +(16, 47, -1) 15 +(16, 48, -1) 15 +(16, 49, -1) 15 +(16, 50, -1) 15 +(16, 51, -1) 15 +(16, 52, -1) 15 +(16, 53, -1) 15 +(16, 54, -1) 15 +(16, 55, -1) 15 +(16, 56, -1) 15 +(16, 57, -1) 14 +(16, 58, -1) 14 +(16, 59, -1) 14 +(16, 60, -1) 14 +(16, 61, -1) 13 +(16, 62, -1) 13 +(16, 63, -1) 13 +(16, 64, -1) 13 +(16, 65, -1) 12 +(16, 66, -1) 12 +(16, 67, -1) 11 +(16, 68, -1) 11 +(16, 69, -1) 11 +(16, 70, -1) 10 +(16, 71, -1) 10 +(16, 72, -1) 9 +(16, 73, -1) 9 +(16, 74, -1) 8 +(16, 75, -1) 7 +(16, 76, -1) 7 +(16, 77, -1) 6 +(16, 78, -1) 6 +(16, 79, -1) 5 +(16, 80, -1) 4 +(16, 81, -1) 4 +(16, 82, -1) 3 +(16, 83, -1) 2 +(16, 84, -1) 2 +(16, 85, -1) 1 +(16, 86, -1) 1 +(16, 87, -1) 0 +(17, 14, -1) 1 +(17, 15, -1) 1 +(17, 16, -1) 2 +(17, 17, -1) 3 +(17, 18, -1) 3 +(17, 19, -1) 4 +(17, 20, -1) 5 +(17, 21, -1) 5 +(17, 22, -1) 6 +(17, 23, -1) 6 +(17, 24, -1) 7 +(17, 25, -1) 8 +(17, 26, -1) 8 +(17, 27, -1) 9 +(17, 28, -1) 9 +(17, 29, -1) 10 +(17, 30, -1) 10 +(17, 31, -1) 11 +(17, 32, -1) 11 +(17, 33, -1) 12 +(17, 34, -1) 12 +(17, 35, -1) 13 +(17, 36, -1) 13 +(17, 37, -1) 13 +(17, 38, -1) 14 +(17, 39, -1) 14 +(17, 40, -1) 14 +(17, 41, -1) 15 +(17, 42, -1) 15 +(17, 43, -1) 15 +(17, 44, -1) 15 +(17, 45, -1) 16 +(17, 46, -1) 16 +(17, 47, -1) 16 +(17, 48, -1) 16 +(17, 49, -1) 16 +(17, 50, -1) 16 +(17, 51, -1) 16 +(17, 52, -1) 16 +(17, 53, -1) 16 +(17, 54, -1) 16 +(17, 55, -1) 16 +(17, 56, -1) 16 +(17, 57, -1) 15 +(17, 58, -1) 15 +(17, 59, -1) 15 +(17, 60, -1) 15 +(17, 61, -1) 14 +(17, 62, -1) 14 +(17, 63, -1) 14 +(17, 64, -1) 13 +(17, 65, -1) 13 +(17, 66, -1) 13 +(17, 67, -1) 12 +(17, 68, -1) 12 +(17, 69, -1) 11 +(17, 70, -1) 11 +(17, 71, -1) 10 +(17, 72, -1) 10 +(17, 73, -1) 9 +(17, 74, -1) 9 +(17, 75, -1) 8 +(17, 76, -1) 8 +(17, 77, -1) 7 +(17, 78, -1) 6 +(17, 79, -1) 6 +(17, 80, -1) 5 +(17, 81, -1) 5 +(17, 82, -1) 4 +(17, 83, -1) 3 +(17, 84, -1) 3 +(17, 85, -1) 2 +(17, 86, -1) 1 +(17, 87, -1) 1 +(18, 14, -1) 1 +(18, 15, -1) 2 +(18, 16, -1) 3 +(18, 17, -1) 3 +(18, 18, -1) 4 +(18, 19, -1) 5 +(18, 20, -1) 5 +(18, 21, -1) 6 +(18, 22, -1) 7 +(18, 23, -1) 7 +(18, 24, -1) 8 +(18, 25, -1) 8 +(18, 26, -1) 9 +(18, 27, -1) 10 +(18, 28, -1) 10 +(18, 29, -1) 11 +(18, 30, -1) 11 +(18, 31, -1) 12 +(18, 32, -1) 12 +(18, 33, -1) 13 +(18, 34, -1) 13 +(18, 35, -1) 14 +(18, 36, -1) 14 +(18, 37, -1) 14 +(18, 38, -1) 15 +(18, 39, -1) 15 +(18, 40, -1) 15 +(18, 41, -1) 16 +(18, 42, -1) 16 +(18, 43, -1) 16 +(18, 44, -1) 16 +(18, 45, -1) 17 +(18, 46, -1) 17 +(18, 47, -1) 17 +(18, 48, -1) 17 +(18, 49, -1) 17 +(18, 50, -1) 17 +(18, 51, -1) 17 +(18, 52, -1) 17 +(18, 53, -1) 17 +(18, 54, -1) 17 +(18, 55, -1) 17 +(18, 56, -1) 17 +(18, 57, -1) 16 +(18, 58, -1) 16 +(18, 59, -1) 16 +(18, 60, -1) 16 +(18, 61, -1) 15 +(18, 62, -1) 15 +(18, 63, -1) 15 +(18, 64, -1) 14 +(18, 65, -1) 14 +(18, 66, -1) 14 +(18, 67, -1) 13 +(18, 68, -1) 13 +(18, 69, -1) 12 +(18, 70, -1) 12 +(18, 71, -1) 11 +(18, 72, -1) 11 +(18, 73, -1) 10 +(18, 74, -1) 10 +(18, 75, -1) 9 +(18, 76, -1) 8 +(18, 77, -1) 8 +(18, 78, -1) 7 +(18, 79, -1) 7 +(18, 80, -1) 6 +(18, 81, -1) 5 +(18, 82, -1) 5 +(18, 83, -1) 4 +(18, 84, -1) 3 +(18, 85, -1) 3 +(18, 86, -1) 2 +(18, 87, -1) 1 +(19, 14, -1) 2 +(19, 15, -1) 3 +(19, 16, -1) 3 +(19, 17, -1) 4 +(19, 18, -1) 5 +(19, 19, -1) 5 +(19, 20, -1) 6 +(19, 21, -1) 7 +(19, 22, -1) 7 +(19, 23, -1) 8 +(19, 24, -1) 9 +(19, 25, -1) 9 +(19, 26, -1) 10 +(19, 27, -1) 10 +(19, 28, -1) 11 +(19, 29, -1) 12 +(19, 30, -1) 12 +(19, 31, -1) 13 +(19, 32, -1) 13 +(19, 33, -1) 14 +(19, 34, -1) 14 +(19, 35, -1) 15 +(19, 36, -1) 15 +(19, 37, -1) 15 +(19, 38, -1) 16 +(19, 39, -1) 16 +(19, 40, -1) 16 +(19, 41, -1) 17 +(19, 42, -1) 17 +(19, 43, -1) 17 +(19, 44, -1) 17 +(19, 45, -1) 18 +(19, 46, -1) 18 +(19, 47, -1) 18 +(19, 48, -1) 18 +(19, 49, -1) 18 +(19, 50, -1) 18 +(19, 51, -1) 18 +(19, 52, -1) 18 +(19, 53, -1) 18 +(19, 54, -1) 18 +(19, 55, -1) 18 +(19, 56, -1) 18 +(19, 57, -1) 17 +(19, 58, -1) 17 +(19, 59, -1) 17 +(19, 60, -1) 17 +(19, 61, -1) 16 +(19, 62, -1) 16 +(19, 63, -1) 16 +(19, 64, -1) 15 +(19, 65, -1) 15 +(19, 66, -1) 15 +(19, 67, -1) 14 +(19, 68, -1) 14 +(19, 69, -1) 13 +(19, 70, -1) 13 +(19, 71, -1) 12 +(19, 72, -1) 12 +(19, 73, -1) 11 +(19, 74, -1) 10 +(19, 75, -1) 10 +(19, 76, -1) 9 +(19, 77, -1) 9 +(19, 78, -1) 8 +(19, 79, -1) 7 +(19, 80, -1) 7 +(19, 81, -1) 6 +(19, 82, -1) 5 +(19, 83, -1) 5 +(19, 84, -1) 4 +(19, 85, -1) 3 +(19, 86, -1) 3 +(19, 87, -1) 2 +(20, 14, -1) 3 +(20, 15, -1) 3 +(20, 16, -1) 4 +(20, 17, -1) 5 +(20, 18, -1) 5 +(20, 19, -1) 6 +(20, 20, -1) 7 +(20, 21, -1) 7 +(20, 22, -1) 8 +(20, 23, -1) 9 +(20, 24, -1) 9 +(20, 25, -1) 10 +(20, 26, -1) 11 +(20, 27, -1) 11 +(20, 28, -1) 12 +(20, 29, -1) 12 +(20, 30, -1) 13 +(20, 31, -1) 14 +(20, 32, -1) 14 +(20, 33, -1) 15 +(20, 34, -1) 15 +(20, 35, -1) 15 +(20, 36, -1) 16 +(20, 37, -1) 16 +(20, 38, -1) 17 +(20, 39, -1) 17 +(20, 40, -1) 17 +(20, 41, -1) 18 +(20, 42, -1) 18 +(20, 43, -1) 18 +(20, 44, -1) 18 +(20, 45, -1) 19 +(20, 46, -1) 19 +(20, 47, -1) 19 +(20, 48, -1) 19 +(20, 49, -1) 19 +(20, 50, -1) 19 +(20, 51, -1) 19 +(20, 52, -1) 19 +(20, 53, -1) 19 +(20, 54, -1) 19 +(20, 55, -1) 19 +(20, 56, -1) 19 +(20, 57, -1) 18 +(20, 58, -1) 18 +(20, 59, -1) 18 +(20, 60, -1) 18 +(20, 61, -1) 17 +(20, 62, -1) 17 +(20, 63, -1) 17 +(20, 64, -1) 16 +(20, 65, -1) 16 +(20, 66, -1) 15 +(20, 67, -1) 15 +(20, 68, -1) 15 +(20, 69, -1) 14 +(20, 70, -1) 14 +(20, 71, -1) 13 +(20, 72, -1) 12 +(20, 73, -1) 12 +(20, 74, -1) 11 +(20, 75, -1) 11 +(20, 76, -1) 10 +(20, 77, -1) 9 +(20, 78, -1) 9 +(20, 79, -1) 8 +(20, 80, -1) 7 +(20, 81, -1) 7 +(20, 82, -1) 6 +(20, 83, -1) 5 +(20, 84, -1) 5 +(20, 85, -1) 4 +(20, 86, -1) 3 +(20, 87, -1) 3 +(21, 9, -1) 0 +(21, 10, -1) 0 +(21, 11, -1) 1 +(21, 12, -1) 1 +(21, 13, -1) 2 +(21, 14, -1) 3 +(21, 15, -1) 4 +(21, 16, -1) 4 +(21, 17, -1) 5 +(21, 18, -1) 6 +(21, 19, -1) 7 +(21, 20, -1) 7 +(21, 21, -1) 8 +(21, 22, -1) 9 +(21, 23, -1) 9 +(21, 24, -1) 10 +(21, 25, -1) 11 +(21, 26, -1) 11 +(21, 27, -1) 12 +(21, 28, -1) 13 +(21, 29, -1) 13 +(21, 30, -1) 14 +(21, 31, -1) 14 +(21, 32, -1) 15 +(21, 33, -1) 15 +(21, 34, -1) 16 +(21, 35, -1) 16 +(21, 36, -1) 17 +(21, 37, -1) 17 +(21, 38, -1) 18 +(21, 39, -1) 18 +(21, 40, -1) 18 +(21, 41, -1) 19 +(21, 42, -1) 19 +(21, 43, -1) 19 +(21, 44, -1) 19 +(21, 45, -1) 20 +(21, 46, -1) 20 +(21, 47, -1) 20 +(21, 48, -1) 20 +(21, 49, -1) 20 +(21, 50, -1) 20 +(21, 51, -1) 20 +(21, 52, -1) 20 +(21, 53, -1) 20 +(21, 54, -1) 20 +(21, 55, -1) 20 +(21, 56, -1) 20 +(21, 57, -1) 19 +(21, 58, -1) 19 +(21, 59, -1) 19 +(21, 60, -1) 19 +(21, 61, -1) 18 +(21, 62, -1) 18 +(21, 63, -1) 18 +(21, 64, -1) 17 +(21, 65, -1) 17 +(21, 66, -1) 16 +(21, 67, -1) 16 +(21, 68, -1) 15 +(21, 69, -1) 15 +(21, 70, -1) 14 +(21, 71, -1) 14 +(21, 72, -1) 13 +(21, 73, -1) 13 +(21, 74, -1) 12 +(21, 75, -1) 11 +(21, 76, -1) 11 +(21, 77, -1) 10 +(21, 78, -1) 9 +(21, 79, -1) 9 +(21, 80, -1) 8 +(21, 81, -1) 7 +(21, 82, -1) 7 +(21, 83, -1) 6 +(21, 84, -1) 5 +(21, 85, -1) 4 +(21, 86, -1) 4 +(21, 87, -1) 3 +(21, 88, -1) 2 +(21, 89, -1) 1 +(21, 90, -1) 1 +(21, 91, -1) 0 +(21, 92, -1) 0 +(22, 9, -1) 0 +(22, 10, -1) 1 +(22, 11, -1) 1 +(22, 12, -1) 2 +(22, 13, -1) 3 +(22, 14, -1) 4 +(22, 15, -1) 4 +(22, 16, -1) 5 +(22, 17, -1) 6 +(22, 18, -1) 7 +(22, 19, -1) 7 +(22, 20, -1) 8 +(22, 21, -1) 9 +(22, 22, -1) 9 +(22, 23, -1) 10 +(22, 24, -1) 11 +(22, 25, -1) 12 +(22, 26, -1) 12 +(22, 27, -1) 13 +(22, 28, -1) 13 +(22, 29, -1) 14 +(22, 30, -1) 15 +(22, 31, -1) 15 +(22, 32, -1) 16 +(22, 33, -1) 16 +(22, 34, -1) 17 +(22, 35, -1) 17 +(22, 36, -1) 18 +(22, 37, -1) 18 +(22, 38, -1) 18 +(22, 39, -1) 19 +(22, 40, -1) 19 +(22, 41, -1) 20 +(22, 42, -1) 20 +(22, 43, -1) 20 +(22, 44, -1) 20 +(22, 45, -1) 20 +(22, 46, -1) 21 +(22, 47, -1) 21 +(22, 48, -1) 21 +(22, 49, -1) 21 +(22, 50, -1) 21 +(22, 51, -1) 21 +(22, 52, -1) 21 +(22, 53, -1) 21 +(22, 54, -1) 21 +(22, 55, -1) 21 +(22, 56, -1) 20 +(22, 57, -1) 20 +(22, 58, -1) 20 +(22, 59, -1) 20 +(22, 60, -1) 20 +(22, 61, -1) 19 +(22, 62, -1) 19 +(22, 63, -1) 18 +(22, 64, -1) 18 +(22, 65, -1) 18 +(22, 66, -1) 17 +(22, 67, -1) 17 +(22, 68, -1) 16 +(22, 69, -1) 16 +(22, 70, -1) 15 +(22, 71, -1) 15 +(22, 72, -1) 14 +(22, 73, -1) 13 +(22, 74, -1) 13 +(22, 75, -1) 12 +(22, 76, -1) 12 +(22, 77, -1) 11 +(22, 78, -1) 10 +(22, 79, -1) 9 +(22, 80, -1) 9 +(22, 81, -1) 8 +(22, 82, -1) 7 +(22, 83, -1) 7 +(22, 84, -1) 6 +(22, 85, -1) 5 +(22, 86, -1) 4 +(22, 87, -1) 4 +(22, 88, -1) 3 +(22, 89, -1) 2 +(22, 90, -1) 1 +(22, 91, -1) 1 +(22, 92, -1) 0 +(23, 9, -1) 0 +(23, 10, -1) 1 +(23, 11, -1) 2 +(23, 12, -1) 3 +(23, 13, -1) 3 +(23, 14, -1) 4 +(23, 15, -1) 5 +(23, 16, -1) 6 +(23, 17, -1) 7 +(23, 18, -1) 7 +(23, 19, -1) 8 +(23, 20, -1) 9 +(23, 21, -1) 9 +(23, 22, -1) 10 +(23, 23, -1) 11 +(23, 24, -1) 12 +(23, 25, -1) 12 +(23, 26, -1) 13 +(23, 27, -1) 14 +(23, 28, -1) 14 +(23, 29, -1) 15 +(23, 30, -1) 15 +(23, 31, -1) 16 +(23, 32, -1) 17 +(23, 33, -1) 17 +(23, 34, -1) 18 +(23, 35, -1) 18 +(23, 36, -1) 19 +(23, 37, -1) 19 +(23, 38, -1) 19 +(23, 39, -1) 20 +(23, 40, -1) 20 +(23, 41, -1) 20 +(23, 42, -1) 21 +(23, 43, -1) 21 +(23, 44, -1) 21 +(23, 45, -1) 21 +(23, 46, -1) 22 +(23, 47, -1) 22 +(23, 48, -1) 22 +(23, 49, -1) 22 +(23, 50, -1) 22 +(23, 51, -1) 22 +(23, 52, -1) 22 +(23, 53, -1) 22 +(23, 54, -1) 22 +(23, 55, -1) 22 +(23, 56, -1) 21 +(23, 57, -1) 21 +(23, 58, -1) 21 +(23, 59, -1) 21 +(23, 60, -1) 20 +(23, 61, -1) 20 +(23, 62, -1) 20 +(23, 63, -1) 19 +(23, 64, -1) 19 +(23, 65, -1) 19 +(23, 66, -1) 18 +(23, 67, -1) 18 +(23, 68, -1) 17 +(23, 69, -1) 17 +(23, 70, -1) 16 +(23, 71, -1) 15 +(23, 72, -1) 15 +(23, 73, -1) 14 +(23, 74, -1) 14 +(23, 75, -1) 13 +(23, 76, -1) 12 +(23, 77, -1) 12 +(23, 78, -1) 11 +(23, 79, -1) 10 +(23, 80, -1) 9 +(23, 81, -1) 9 +(23, 82, -1) 8 +(23, 83, -1) 7 +(23, 84, -1) 7 +(23, 85, -1) 6 +(23, 86, -1) 5 +(23, 87, -1) 4 +(23, 88, -1) 3 +(23, 89, -1) 3 +(23, 90, -1) 2 +(23, 91, -1) 1 +(23, 92, -1) 0 +(24, 9, -1) 1 +(24, 10, -1) 2 +(24, 11, -1) 2 +(24, 12, -1) 3 +(24, 13, -1) 4 +(24, 14, -1) 5 +(24, 15, -1) 6 +(24, 16, -1) 6 +(24, 17, -1) 7 +(24, 18, -1) 8 +(24, 19, -1) 9 +(24, 20, -1) 9 +(24, 21, -1) 10 +(24, 22, -1) 11 +(24, 23, -1) 12 +(24, 24, -1) 12 +(24, 25, -1) 13 +(24, 26, -1) 14 +(24, 27, -1) 14 +(24, 28, -1) 15 +(24, 29, -1) 16 +(24, 30, -1) 16 +(24, 31, -1) 17 +(24, 32, -1) 17 +(24, 33, -1) 18 +(24, 34, -1) 18 +(24, 35, -1) 19 +(24, 36, -1) 19 +(24, 37, -1) 20 +(24, 38, -1) 20 +(24, 39, -1) 21 +(24, 40, -1) 21 +(24, 41, -1) 21 +(24, 42, -1) 22 +(24, 43, -1) 22 +(24, 44, -1) 22 +(24, 45, -1) 22 +(24, 46, -1) 23 +(24, 47, -1) 23 +(24, 48, -1) 23 +(24, 49, -1) 23 +(24, 50, -1) 23 +(24, 51, -1) 23 +(24, 52, -1) 23 +(24, 53, -1) 23 +(24, 54, -1) 23 +(24, 55, -1) 23 +(24, 56, -1) 22 +(24, 57, -1) 22 +(24, 58, -1) 22 +(24, 59, -1) 22 +(24, 60, -1) 21 +(24, 61, -1) 21 +(24, 62, -1) 21 +(24, 63, -1) 20 +(24, 64, -1) 20 +(24, 65, -1) 19 +(24, 66, -1) 19 +(24, 67, -1) 18 +(24, 68, -1) 18 +(24, 69, -1) 17 +(24, 70, -1) 17 +(24, 71, -1) 16 +(24, 72, -1) 16 +(24, 73, -1) 15 +(24, 74, -1) 14 +(24, 75, -1) 14 +(24, 76, -1) 13 +(24, 77, -1) 12 +(24, 78, -1) 12 +(24, 79, -1) 11 +(24, 80, -1) 10 +(24, 81, -1) 9 +(24, 82, -1) 9 +(24, 83, -1) 8 +(24, 84, -1) 7 +(24, 85, -1) 6 +(24, 86, -1) 6 +(24, 87, -1) 5 +(24, 88, -1) 4 +(24, 89, -1) 3 +(24, 90, -1) 2 +(24, 91, -1) 2 +(24, 92, -1) 1 +(25, 9, -1) 1 +(25, 10, -1) 2 +(25, 11, -1) 3 +(25, 12, -1) 4 +(25, 13, -1) 5 +(25, 14, -1) 5 +(25, 15, -1) 6 +(25, 16, -1) 7 +(25, 17, -1) 8 +(25, 18, -1) 9 +(25, 19, -1) 9 +(25, 20, -1) 10 +(25, 21, -1) 11 +(25, 22, -1) 12 +(25, 23, -1) 12 +(25, 24, -1) 13 +(25, 25, -1) 14 +(25, 26, -1) 14 +(25, 27, -1) 15 +(25, 28, -1) 16 +(25, 29, -1) 16 +(25, 30, -1) 17 +(25, 31, -1) 18 +(25, 32, -1) 18 +(25, 33, -1) 19 +(25, 34, -1) 19 +(25, 35, -1) 20 +(25, 36, -1) 20 +(25, 37, -1) 21 +(25, 38, -1) 21 +(25, 39, -1) 22 +(25, 40, -1) 22 +(25, 41, -1) 22 +(25, 42, -1) 23 +(25, 43, -1) 23 +(25, 44, -1) 23 +(25, 45, -1) 23 +(25, 46, -1) 24 +(25, 47, -1) 24 +(25, 48, -1) 24 +(25, 49, -1) 24 +(25, 50, -1) 24 +(25, 51, -1) 24 +(25, 52, -1) 24 +(25, 53, -1) 24 +(25, 54, -1) 24 +(25, 55, -1) 24 +(25, 56, -1) 23 +(25, 57, -1) 23 +(25, 58, -1) 23 +(25, 59, -1) 23 +(25, 60, -1) 22 +(25, 61, -1) 22 +(25, 62, -1) 22 +(25, 63, -1) 21 +(25, 64, -1) 21 +(25, 65, -1) 20 +(25, 66, -1) 20 +(25, 67, -1) 19 +(25, 68, -1) 19 +(25, 69, -1) 18 +(25, 70, -1) 18 +(25, 71, -1) 17 +(25, 72, -1) 16 +(25, 73, -1) 16 +(25, 74, -1) 15 +(25, 75, -1) 14 +(25, 76, -1) 14 +(25, 77, -1) 13 +(25, 78, -1) 12 +(25, 79, -1) 12 +(25, 80, -1) 11 +(25, 81, -1) 10 +(25, 82, -1) 9 +(25, 83, -1) 9 +(25, 84, -1) 8 +(25, 85, -1) 7 +(25, 86, -1) 6 +(25, 87, -1) 5 +(25, 88, -1) 5 +(25, 89, -1) 4 +(25, 90, -1) 3 +(25, 91, -1) 2 +(25, 92, -1) 1 +(26, 6, -1) 0 +(26, 7, -1) 0 +(26, 8, -1) 1 +(26, 9, -1) 2 +(26, 10, -1) 3 +(26, 11, -1) 3 +(26, 12, -1) 4 +(26, 13, -1) 5 +(26, 14, -1) 6 +(26, 15, -1) 7 +(26, 16, -1) 7 +(26, 17, -1) 8 +(26, 18, -1) 9 +(26, 19, -1) 10 +(26, 20, -1) 11 +(26, 21, -1) 11 +(26, 22, -1) 12 +(26, 23, -1) 13 +(26, 24, -1) 14 +(26, 25, -1) 14 +(26, 26, -1) 15 +(26, 27, -1) 16 +(26, 28, -1) 16 +(26, 29, -1) 17 +(26, 30, -1) 18 +(26, 31, -1) 18 +(26, 32, -1) 19 +(26, 33, -1) 19 +(26, 34, -1) 20 +(26, 35, -1) 21 +(26, 36, -1) 21 +(26, 37, -1) 22 +(26, 38, -1) 22 +(26, 39, -1) 22 +(26, 40, -1) 23 +(26, 41, -1) 23 +(26, 42, -1) 24 +(26, 43, -1) 24 +(26, 44, -1) 24 +(26, 45, -1) 24 +(26, 46, -1) 25 +(26, 47, -1) 25 +(26, 48, -1) 25 +(26, 49, -1) 25 +(26, 50, -1) 25 +(26, 51, -1) 25 +(26, 52, -1) 25 +(26, 53, -1) 25 +(26, 54, -1) 25 +(26, 55, -1) 25 +(26, 56, -1) 24 +(26, 57, -1) 24 +(26, 58, -1) 24 +(26, 59, -1) 24 +(26, 60, -1) 23 +(26, 61, -1) 23 +(26, 62, -1) 22 +(26, 63, -1) 22 +(26, 64, -1) 22 +(26, 65, -1) 21 +(26, 66, -1) 21 +(26, 67, -1) 20 +(26, 68, -1) 19 +(26, 69, -1) 19 +(26, 70, -1) 18 +(26, 71, -1) 18 +(26, 72, -1) 17 +(26, 73, -1) 16 +(26, 74, -1) 16 +(26, 75, -1) 15 +(26, 76, -1) 14 +(26, 77, -1) 14 +(26, 78, -1) 13 +(26, 79, -1) 12 +(26, 80, -1) 11 +(26, 81, -1) 11 +(26, 82, -1) 10 +(26, 83, -1) 9 +(26, 84, -1) 8 +(26, 85, -1) 7 +(26, 86, -1) 7 +(26, 87, -1) 6 +(26, 88, -1) 5 +(26, 89, -1) 4 +(26, 90, -1) 3 +(26, 91, -1) 3 +(26, 92, -1) 2 +(26, 93, -1) 1 +(26, 94, -1) 0 +(26, 95, -1) 0 +(27, 6, -1) 0 +(27, 7, -1) 0 +(27, 8, -1) 1 +(27, 9, -1) 2 +(27, 10, -1) 3 +(27, 11, -1) 4 +(27, 12, -1) 5 +(27, 13, -1) 6 +(27, 14, -1) 6 +(27, 15, -1) 7 +(27, 16, -1) 8 +(27, 17, -1) 9 +(27, 18, -1) 10 +(27, 19, -1) 10 +(27, 20, -1) 11 +(27, 21, -1) 12 +(27, 22, -1) 13 +(27, 23, -1) 14 +(27, 24, -1) 14 +(27, 25, -1) 15 +(27, 26, -1) 16 +(27, 27, -1) 16 +(27, 28, -1) 17 +(27, 29, -1) 18 +(27, 30, -1) 18 +(27, 31, -1) 19 +(27, 32, -1) 20 +(27, 33, -1) 20 +(27, 34, -1) 21 +(27, 35, -1) 21 +(27, 36, -1) 22 +(27, 37, -1) 22 +(27, 38, -1) 23 +(27, 39, -1) 23 +(27, 40, -1) 24 +(27, 41, -1) 24 +(27, 42, -1) 25 +(27, 43, -1) 25 +(27, 44, -1) 25 +(27, 45, -1) 25 +(27, 46, -1) 26 +(27, 47, -1) 26 +(27, 48, -1) 26 +(27, 49, -1) 26 +(27, 50, -1) 26 +(27, 51, -1) 26 +(27, 52, -1) 26 +(27, 53, -1) 26 +(27, 54, -1) 26 +(27, 55, -1) 26 +(27, 56, -1) 25 +(27, 57, -1) 25 +(27, 58, -1) 25 +(27, 59, -1) 25 +(27, 60, -1) 24 +(27, 61, -1) 24 +(27, 62, -1) 23 +(27, 63, -1) 23 +(27, 64, -1) 22 +(27, 65, -1) 22 +(27, 66, -1) 21 +(27, 67, -1) 21 +(27, 68, -1) 20 +(27, 69, -1) 20 +(27, 70, -1) 19 +(27, 71, -1) 18 +(27, 72, -1) 18 +(27, 73, -1) 17 +(27, 74, -1) 16 +(27, 75, -1) 16 +(27, 76, -1) 15 +(27, 77, -1) 14 +(27, 78, -1) 14 +(27, 79, -1) 13 +(27, 80, -1) 12 +(27, 81, -1) 11 +(27, 82, -1) 10 +(27, 83, -1) 10 +(27, 84, -1) 9 +(27, 85, -1) 8 +(27, 86, -1) 7 +(27, 87, -1) 6 +(27, 88, -1) 6 +(27, 89, -1) 5 +(27, 90, -1) 4 +(27, 91, -1) 3 +(27, 92, -1) 2 +(27, 93, -1) 1 +(27, 94, -1) 0 +(27, 95, -1) 0 +(28, 6, -1) 0 +(28, 7, -1) 1 +(28, 8, -1) 2 +(28, 9, -1) 3 +(28, 10, -1) 4 +(28, 11, -1) 4 +(28, 12, -1) 5 +(28, 13, -1) 6 +(28, 14, -1) 7 +(28, 15, -1) 8 +(28, 16, -1) 9 +(28, 17, -1) 9 +(28, 18, -1) 10 +(28, 19, -1) 11 +(28, 20, -1) 12 +(28, 21, -1) 13 +(28, 22, -1) 13 +(28, 23, -1) 14 +(28, 24, -1) 15 +(28, 25, -1) 16 +(28, 26, -1) 16 +(28, 27, -1) 17 +(28, 28, -1) 18 +(28, 29, -1) 19 +(28, 30, -1) 19 +(28, 31, -1) 20 +(28, 32, -1) 20 +(28, 33, -1) 21 +(28, 34, -1) 22 +(28, 35, -1) 22 +(28, 36, -1) 23 +(28, 37, -1) 23 +(28, 38, -1) 24 +(28, 39, -1) 24 +(28, 40, -1) 25 +(28, 41, -1) 25 +(28, 42, -1) 25 +(28, 43, -1) 26 +(28, 44, -1) 26 +(28, 45, -1) 26 +(28, 46, -1) 27 +(28, 47, -1) 27 +(28, 48, -1) 27 +(28, 49, -1) 27 +(28, 50, -1) 27 +(28, 51, -1) 27 +(28, 52, -1) 27 +(28, 53, -1) 27 +(28, 54, -1) 27 +(28, 55, -1) 27 +(28, 56, -1) 26 +(28, 57, -1) 26 +(28, 58, -1) 26 +(28, 59, -1) 25 +(28, 60, -1) 25 +(28, 61, -1) 25 +(28, 62, -1) 24 +(28, 63, -1) 24 +(28, 64, -1) 23 +(28, 65, -1) 23 +(28, 66, -1) 22 +(28, 67, -1) 22 +(28, 68, -1) 21 +(28, 69, -1) 20 +(28, 70, -1) 20 +(28, 71, -1) 19 +(28, 72, -1) 19 +(28, 73, -1) 18 +(28, 74, -1) 17 +(28, 75, -1) 16 +(28, 76, -1) 16 +(28, 77, -1) 15 +(28, 78, -1) 14 +(28, 79, -1) 13 +(28, 80, -1) 13 +(28, 81, -1) 12 +(28, 82, -1) 11 +(28, 83, -1) 10 +(28, 84, -1) 9 +(28, 85, -1) 9 +(28, 86, -1) 8 +(28, 87, -1) 7 +(28, 88, -1) 6 +(28, 89, -1) 5 +(28, 90, -1) 4 +(28, 91, -1) 4 +(28, 92, -1) 3 +(28, 93, -1) 2 +(28, 94, -1) 1 +(28, 95, -1) 0 +(29, 6, -1) 1 +(29, 7, -1) 1 +(29, 8, -1) 2 +(29, 9, -1) 3 +(29, 10, -1) 4 +(29, 11, -1) 5 +(29, 12, -1) 6 +(29, 13, -1) 7 +(29, 14, -1) 7 +(29, 15, -1) 8 +(29, 16, -1) 9 +(29, 17, -1) 10 +(29, 18, -1) 11 +(29, 19, -1) 12 +(29, 20, -1) 12 +(29, 21, -1) 13 +(29, 22, -1) 14 +(29, 23, -1) 15 +(29, 24, -1) 16 +(29, 25, -1) 16 +(29, 26, -1) 17 +(29, 27, -1) 18 +(29, 28, -1) 19 +(29, 29, -1) 19 +(29, 30, -1) 20 +(29, 31, -1) 21 +(29, 32, -1) 21 +(29, 33, -1) 22 +(29, 34, -1) 23 +(29, 35, -1) 23 +(29, 36, -1) 24 +(29, 37, -1) 24 +(29, 38, -1) 25 +(29, 39, -1) 25 +(29, 40, -1) 26 +(29, 41, -1) 26 +(29, 42, -1) 26 +(29, 43, -1) 27 +(29, 44, -1) 27 +(29, 45, -1) 27 +(29, 46, -1) 28 +(29, 47, -1) 28 +(29, 48, -1) 28 +(29, 49, -1) 28 +(29, 50, -1) 28 +(29, 51, -1) 28 +(29, 52, -1) 28 +(29, 53, -1) 28 +(29, 54, -1) 28 +(29, 55, -1) 28 +(29, 56, -1) 27 +(29, 57, -1) 27 +(29, 58, -1) 27 +(29, 59, -1) 26 +(29, 60, -1) 26 +(29, 61, -1) 26 +(29, 62, -1) 25 +(29, 63, -1) 25 +(29, 64, -1) 24 +(29, 65, -1) 24 +(29, 66, -1) 23 +(29, 67, -1) 23 +(29, 68, -1) 22 +(29, 69, -1) 21 +(29, 70, -1) 21 +(29, 71, -1) 20 +(29, 72, -1) 19 +(29, 73, -1) 19 +(29, 74, -1) 18 +(29, 75, -1) 17 +(29, 76, -1) 16 +(29, 77, -1) 16 +(29, 78, -1) 15 +(29, 79, -1) 14 +(29, 80, -1) 13 +(29, 81, -1) 12 +(29, 82, -1) 12 +(29, 83, -1) 11 +(29, 84, -1) 10 +(29, 85, -1) 9 +(29, 86, -1) 8 +(29, 87, -1) 7 +(29, 88, -1) 7 +(29, 89, -1) 6 +(29, 90, -1) 5 +(29, 91, -1) 4 +(29, 92, -1) 3 +(29, 93, -1) 2 +(29, 94, -1) 1 +(29, 95, -1) 1 +(30, 6, -1) 1 +(30, 7, -1) 2 +(30, 8, -1) 3 +(30, 9, -1) 4 +(30, 10, -1) 5 +(30, 11, -1) 5 +(30, 12, -1) 6 +(30, 13, -1) 7 +(30, 14, -1) 8 +(30, 15, -1) 9 +(30, 16, -1) 10 +(30, 17, -1) 11 +(30, 18, -1) 11 +(30, 19, -1) 12 +(30, 20, -1) 13 +(30, 21, -1) 14 +(30, 22, -1) 15 +(30, 23, -1) 15 +(30, 24, -1) 16 +(30, 25, -1) 17 +(30, 26, -1) 18 +(30, 27, -1) 19 +(30, 28, -1) 19 +(30, 29, -1) 20 +(30, 30, -1) 21 +(30, 31, -1) 21 +(30, 32, -1) 22 +(30, 33, -1) 23 +(30, 34, -1) 23 +(30, 35, -1) 24 +(30, 36, -1) 24 +(30, 37, -1) 25 +(30, 38, -1) 26 +(30, 39, -1) 26 +(30, 40, -1) 27 +(30, 41, -1) 27 +(30, 42, -1) 27 +(30, 43, -1) 28 +(30, 44, -1) 28 +(30, 45, -1) 28 +(30, 46, -1) 29 +(30, 47, -1) 29 +(30, 48, -1) 29 +(30, 49, -1) 29 +(30, 50, -1) 29 +(30, 51, -1) 29 +(30, 52, -1) 29 +(30, 53, -1) 29 +(30, 54, -1) 29 +(30, 55, -1) 29 +(30, 56, -1) 28 +(30, 57, -1) 28 +(30, 58, -1) 28 +(30, 59, -1) 27 +(30, 60, -1) 27 +(30, 61, -1) 27 +(30, 62, -1) 26 +(30, 63, -1) 26 +(30, 64, -1) 25 +(30, 65, -1) 24 +(30, 66, -1) 24 +(30, 67, -1) 23 +(30, 68, -1) 23 +(30, 69, -1) 22 +(30, 70, -1) 21 +(30, 71, -1) 21 +(30, 72, -1) 20 +(30, 73, -1) 19 +(30, 74, -1) 19 +(30, 75, -1) 18 +(30, 76, -1) 17 +(30, 77, -1) 16 +(30, 78, -1) 15 +(30, 79, -1) 15 +(30, 80, -1) 14 +(30, 81, -1) 13 +(30, 82, -1) 12 +(30, 83, -1) 11 +(30, 84, -1) 11 +(30, 85, -1) 10 +(30, 86, -1) 9 +(30, 87, -1) 8 +(30, 88, -1) 7 +(30, 89, -1) 6 +(30, 90, -1) 5 +(30, 91, -1) 5 +(30, 92, -1) 4 +(30, 93, -1) 3 +(30, 94, -1) 2 +(30, 95, -1) 1 +(31, 6, -1) 1 +(31, 7, -1) 2 +(31, 8, -1) 3 +(31, 9, -1) 4 +(31, 10, -1) 5 +(31, 11, -1) 6 +(31, 12, -1) 7 +(31, 13, -1) 7 +(31, 14, -1) 8 +(31, 15, -1) 9 +(31, 16, -1) 10 +(31, 17, -1) 11 +(31, 18, -1) 12 +(31, 19, -1) 13 +(31, 20, -1) 13 +(31, 21, -1) 14 +(31, 22, -1) 15 +(31, 23, -1) 16 +(31, 24, -1) 17 +(31, 25, -1) 18 +(31, 26, -1) 18 +(31, 27, -1) 19 +(31, 28, -1) 20 +(31, 29, -1) 21 +(31, 30, -1) 21 +(31, 31, -1) 22 +(31, 32, -1) 23 +(31, 33, -1) 23 +(31, 34, -1) 24 +(31, 35, -1) 25 +(31, 36, -1) 25 +(31, 37, -1) 26 +(31, 38, -1) 26 +(31, 39, -1) 27 +(31, 40, -1) 27 +(31, 41, -1) 28 +(31, 42, -1) 28 +(31, 43, -1) 29 +(31, 44, -1) 29 +(31, 45, -1) 29 +(31, 46, -1) 30 +(31, 47, -1) 30 +(31, 48, -1) 30 +(31, 49, -1) 30 +(31, 50, -1) 30 +(31, 51, -1) 30 +(31, 52, -1) 30 +(31, 53, -1) 30 +(31, 54, -1) 30 +(31, 55, -1) 30 +(31, 56, -1) 29 +(31, 57, -1) 29 +(31, 58, -1) 29 +(31, 59, -1) 28 +(31, 60, -1) 28 +(31, 61, -1) 27 +(31, 62, -1) 27 +(31, 63, -1) 26 +(31, 64, -1) 26 +(31, 65, -1) 25 +(31, 66, -1) 25 +(31, 67, -1) 24 +(31, 68, -1) 23 +(31, 69, -1) 23 +(31, 70, -1) 22 +(31, 71, -1) 21 +(31, 72, -1) 21 +(31, 73, -1) 20 +(31, 74, -1) 19 +(31, 75, -1) 18 +(31, 76, -1) 18 +(31, 77, -1) 17 +(31, 78, -1) 16 +(31, 79, -1) 15 +(31, 80, -1) 14 +(31, 81, -1) 13 +(31, 82, -1) 13 +(31, 83, -1) 12 +(31, 84, -1) 11 +(31, 85, -1) 10 +(31, 86, -1) 9 +(31, 87, -1) 8 +(31, 88, -1) 7 +(31, 89, -1) 7 +(31, 90, -1) 6 +(31, 91, -1) 5 +(31, 92, -1) 4 +(31, 93, -1) 3 +(31, 94, -1) 2 +(31, 95, -1) 1 +(32, 6, -1) 2 +(32, 7, -1) 2 +(32, 8, -1) 3 +(32, 9, -1) 4 +(32, 10, -1) 5 +(32, 11, -1) 6 +(32, 12, -1) 7 +(32, 13, -1) 8 +(32, 14, -1) 9 +(32, 15, -1) 10 +(32, 16, -1) 11 +(32, 17, -1) 11 +(32, 18, -1) 12 +(32, 19, -1) 13 +(32, 20, -1) 14 +(32, 21, -1) 15 +(32, 22, -1) 16 +(32, 23, -1) 17 +(32, 24, -1) 17 +(32, 25, -1) 18 +(32, 26, -1) 19 +(32, 27, -1) 20 +(32, 28, -1) 20 +(32, 29, -1) 21 +(32, 30, -1) 22 +(32, 31, -1) 23 +(32, 32, -1) 23 +(32, 33, -1) 24 +(32, 34, -1) 25 +(32, 35, -1) 25 +(32, 36, -1) 26 +(32, 37, -1) 27 +(32, 38, -1) 27 +(32, 39, -1) 28 +(32, 40, -1) 28 +(32, 41, -1) 29 +(32, 42, -1) 29 +(32, 43, -1) 30 +(32, 44, -1) 30 +(32, 45, -1) 30 +(32, 46, -1) 30 +(32, 47, -1) 31 +(32, 48, -1) 31 +(32, 49, -1) 31 +(32, 50, -1) 31 +(32, 51, -1) 31 +(32, 52, -1) 31 +(32, 53, -1) 31 +(32, 54, -1) 31 +(32, 55, -1) 30 +(32, 56, -1) 30 +(32, 57, -1) 30 +(32, 58, -1) 30 +(32, 59, -1) 29 +(32, 60, -1) 29 +(32, 61, -1) 28 +(32, 62, -1) 28 +(32, 63, -1) 27 +(32, 64, -1) 27 +(32, 65, -1) 26 +(32, 66, -1) 25 +(32, 67, -1) 25 +(32, 68, -1) 24 +(32, 69, -1) 23 +(32, 70, -1) 23 +(32, 71, -1) 22 +(32, 72, -1) 21 +(32, 73, -1) 20 +(32, 74, -1) 20 +(32, 75, -1) 19 +(32, 76, -1) 18 +(32, 77, -1) 17 +(32, 78, -1) 17 +(32, 79, -1) 16 +(32, 80, -1) 15 +(32, 81, -1) 14 +(32, 82, -1) 13 +(32, 83, -1) 12 +(32, 84, -1) 11 +(32, 85, -1) 11 +(32, 86, -1) 10 +(32, 87, -1) 9 +(32, 88, -1) 8 +(32, 89, -1) 7 +(32, 90, -1) 6 +(32, 91, -1) 5 +(32, 92, -1) 4 +(32, 93, -1) 3 +(32, 94, -1) 2 +(32, 95, -1) 2 +(33, 6, -1) 2 +(33, 7, -1) 3 +(33, 8, -1) 4 +(33, 9, -1) 5 +(33, 10, -1) 6 +(33, 11, -1) 7 +(33, 12, -1) 7 +(33, 13, -1) 8 +(33, 14, -1) 9 +(33, 15, -1) 10 +(33, 16, -1) 11 +(33, 17, -1) 12 +(33, 18, -1) 13 +(33, 19, -1) 14 +(33, 20, -1) 15 +(33, 21, -1) 15 +(33, 22, -1) 16 +(33, 23, -1) 17 +(33, 24, -1) 18 +(33, 25, -1) 19 +(33, 26, -1) 20 +(33, 27, -1) 20 +(33, 28, -1) 21 +(33, 29, -1) 22 +(33, 30, -1) 23 +(33, 31, -1) 23 +(33, 32, -1) 24 +(33, 33, -1) 25 +(33, 34, -1) 26 +(33, 35, -1) 26 +(33, 36, -1) 27 +(33, 37, -1) 27 +(33, 38, -1) 28 +(33, 39, -1) 29 +(33, 40, -1) 29 +(33, 41, -1) 30 +(33, 42, -1) 30 +(33, 43, -1) 30 +(33, 44, -1) 31 +(33, 45, -1) 31 +(33, 46, -1) 31 +(33, 47, -1) 32 +(33, 48, -1) 32 +(33, 49, -1) 32 +(33, 50, -1) 32 +(33, 51, -1) 32 +(33, 52, -1) 32 +(33, 53, -1) 32 +(33, 54, -1) 32 +(33, 55, -1) 31 +(33, 56, -1) 31 +(33, 57, -1) 31 +(33, 58, -1) 30 +(33, 59, -1) 30 +(33, 60, -1) 30 +(33, 61, -1) 29 +(33, 62, -1) 29 +(33, 63, -1) 28 +(33, 64, -1) 27 +(33, 65, -1) 27 +(33, 66, -1) 26 +(33, 67, -1) 26 +(33, 68, -1) 25 +(33, 69, -1) 24 +(33, 70, -1) 23 +(33, 71, -1) 23 +(33, 72, -1) 22 +(33, 73, -1) 21 +(33, 74, -1) 20 +(33, 75, -1) 20 +(33, 76, -1) 19 +(33, 77, -1) 18 +(33, 78, -1) 17 +(33, 79, -1) 16 +(33, 80, -1) 15 +(33, 81, -1) 15 +(33, 82, -1) 14 +(33, 83, -1) 13 +(33, 84, -1) 12 +(33, 85, -1) 11 +(33, 86, -1) 10 +(33, 87, -1) 9 +(33, 88, -1) 8 +(33, 89, -1) 7 +(33, 90, -1) 7 +(33, 91, -1) 6 +(33, 92, -1) 5 +(33, 93, -1) 4 +(33, 94, -1) 3 +(33, 95, -1) 2 +(34, 6, -1) 2 +(34, 7, -1) 3 +(34, 8, -1) 4 +(34, 9, -1) 5 +(34, 10, -1) 6 +(34, 11, -1) 7 +(34, 12, -1) 8 +(34, 13, -1) 9 +(34, 14, -1) 10 +(34, 15, -1) 11 +(34, 16, -1) 11 +(34, 17, -1) 12 +(34, 18, -1) 13 +(34, 19, -1) 14 +(34, 20, -1) 15 +(34, 21, -1) 16 +(34, 22, -1) 17 +(34, 23, -1) 18 +(34, 24, -1) 18 +(34, 25, -1) 19 +(34, 26, -1) 20 +(34, 27, -1) 21 +(34, 28, -1) 22 +(34, 29, -1) 23 +(34, 30, -1) 23 +(34, 31, -1) 24 +(34, 32, -1) 25 +(34, 33, -1) 26 +(34, 34, -1) 26 +(34, 35, -1) 27 +(34, 36, -1) 28 +(34, 37, -1) 28 +(34, 38, -1) 29 +(34, 39, -1) 29 +(34, 40, -1) 30 +(34, 41, -1) 30 +(34, 42, -1) 31 +(34, 43, -1) 31 +(34, 44, -1) 32 +(34, 45, -1) 32 +(34, 46, -1) 32 +(34, 47, -1) 33 +(34, 48, -1) 33 +(34, 49, -1) 33 +(34, 50, -1) 33 +(34, 51, -1) 33 +(34, 52, -1) 33 +(34, 53, -1) 33 +(34, 54, -1) 33 +(34, 55, -1) 32 +(34, 56, -1) 32 +(34, 57, -1) 32 +(34, 58, -1) 31 +(34, 59, -1) 31 +(34, 60, -1) 30 +(34, 61, -1) 30 +(34, 62, -1) 29 +(34, 63, -1) 29 +(34, 64, -1) 28 +(34, 65, -1) 28 +(34, 66, -1) 27 +(34, 67, -1) 26 +(34, 68, -1) 26 +(34, 69, -1) 25 +(34, 70, -1) 24 +(34, 71, -1) 23 +(34, 72, -1) 23 +(34, 73, -1) 22 +(34, 74, -1) 21 +(34, 75, -1) 20 +(34, 76, -1) 19 +(34, 77, -1) 18 +(34, 78, -1) 18 +(34, 79, -1) 17 +(34, 80, -1) 16 +(34, 81, -1) 15 +(34, 82, -1) 14 +(34, 83, -1) 13 +(34, 84, -1) 12 +(34, 85, -1) 11 +(34, 86, -1) 11 +(34, 87, -1) 10 +(34, 88, -1) 9 +(34, 89, -1) 8 +(34, 90, -1) 7 +(34, 91, -1) 6 +(34, 92, -1) 5 +(34, 93, -1) 4 +(34, 94, -1) 3 +(34, 95, -1) 2 +(35, 6, -1) 3 +(35, 7, -1) 4 +(35, 8, -1) 5 +(35, 9, -1) 6 +(35, 10, -1) 6 +(35, 11, -1) 7 +(35, 12, -1) 8 +(35, 13, -1) 9 +(35, 14, -1) 10 +(35, 15, -1) 11 +(35, 16, -1) 12 +(35, 17, -1) 13 +(35, 18, -1) 14 +(35, 19, -1) 15 +(35, 20, -1) 16 +(35, 21, -1) 16 +(35, 22, -1) 17 +(35, 23, -1) 18 +(35, 24, -1) 19 +(35, 25, -1) 20 +(35, 26, -1) 21 +(35, 27, -1) 21 +(35, 28, -1) 22 +(35, 29, -1) 23 +(35, 30, -1) 24 +(35, 31, -1) 25 +(35, 32, -1) 25 +(35, 33, -1) 26 +(35, 34, -1) 27 +(35, 35, -1) 28 +(35, 36, -1) 28 +(35, 37, -1) 29 +(35, 38, -1) 30 +(35, 39, -1) 30 +(35, 40, -1) 31 +(35, 41, -1) 31 +(35, 42, -1) 32 +(35, 43, -1) 32 +(35, 44, -1) 33 +(35, 45, -1) 33 +(35, 46, -1) 33 +(35, 47, -1) 34 +(35, 48, -1) 34 +(35, 49, -1) 34 +(35, 50, -1) 34 +(35, 51, -1) 34 +(35, 52, -1) 34 +(35, 53, -1) 34 +(35, 54, -1) 34 +(35, 55, -1) 33 +(35, 56, -1) 33 +(35, 57, -1) 33 +(35, 58, -1) 32 +(35, 59, -1) 32 +(35, 60, -1) 31 +(35, 61, -1) 31 +(35, 62, -1) 30 +(35, 63, -1) 30 +(35, 64, -1) 29 +(35, 65, -1) 28 +(35, 66, -1) 28 +(35, 67, -1) 27 +(35, 68, -1) 26 +(35, 69, -1) 25 +(35, 70, -1) 25 +(35, 71, -1) 24 +(35, 72, -1) 23 +(35, 73, -1) 22 +(35, 74, -1) 21 +(35, 75, -1) 21 +(35, 76, -1) 20 +(35, 77, -1) 19 +(35, 78, -1) 18 +(35, 79, -1) 17 +(35, 80, -1) 16 +(35, 81, -1) 16 +(35, 82, -1) 15 +(35, 83, -1) 14 +(35, 84, -1) 13 +(35, 85, -1) 12 +(35, 86, -1) 11 +(35, 87, -1) 10 +(35, 88, -1) 9 +(35, 89, -1) 8 +(35, 90, -1) 7 +(35, 91, -1) 6 +(35, 92, -1) 6 +(35, 93, -1) 5 +(35, 94, -1) 4 +(35, 95, -1) 3 +(36, 4, -1) 1 +(36, 5, -1) 2 +(36, 6, -1) 3 +(36, 7, -1) 4 +(36, 8, -1) 5 +(36, 9, -1) 6 +(36, 10, -1) 7 +(36, 11, -1) 8 +(36, 12, -1) 8 +(36, 13, -1) 9 +(36, 14, -1) 10 +(36, 15, -1) 11 +(36, 16, -1) 12 +(36, 17, -1) 13 +(36, 18, -1) 14 +(36, 19, -1) 15 +(36, 20, -1) 16 +(36, 21, -1) 17 +(36, 22, -1) 18 +(36, 23, -1) 19 +(36, 24, -1) 19 +(36, 25, -1) 20 +(36, 26, -1) 21 +(36, 27, -1) 22 +(36, 28, -1) 23 +(36, 29, -1) 24 +(36, 30, -1) 24 +(36, 31, -1) 25 +(36, 32, -1) 26 +(36, 33, -1) 27 +(36, 34, -1) 28 +(36, 35, -1) 28 +(36, 36, -1) 29 +(36, 37, -1) 30 +(36, 38, -1) 30 +(36, 39, -1) 31 +(36, 40, -1) 32 +(36, 41, -1) 32 +(36, 42, -1) 33 +(36, 43, -1) 33 +(36, 44, -1) 34 +(36, 45, -1) 34 +(36, 46, -1) 34 +(36, 47, -1) 35 +(36, 48, -1) 35 +(36, 49, -1) 35 +(36, 50, -1) 35 +(36, 51, -1) 35 +(36, 52, -1) 35 +(36, 53, -1) 35 +(36, 54, -1) 35 +(36, 55, -1) 34 +(36, 56, -1) 34 +(36, 57, -1) 34 +(36, 58, -1) 33 +(36, 59, -1) 33 +(36, 60, -1) 32 +(36, 61, -1) 32 +(36, 62, -1) 31 +(36, 63, -1) 30 +(36, 64, -1) 30 +(36, 65, -1) 29 +(36, 66, -1) 28 +(36, 67, -1) 28 +(36, 68, -1) 27 +(36, 69, -1) 26 +(36, 70, -1) 25 +(36, 71, -1) 24 +(36, 72, -1) 24 +(36, 73, -1) 23 +(36, 74, -1) 22 +(36, 75, -1) 21 +(36, 76, -1) 20 +(36, 77, -1) 19 +(36, 78, -1) 19 +(36, 79, -1) 18 +(36, 80, -1) 17 +(36, 81, -1) 16 +(36, 82, -1) 15 +(36, 83, -1) 14 +(36, 84, -1) 13 +(36, 85, -1) 12 +(36, 86, -1) 11 +(36, 87, -1) 10 +(36, 88, -1) 9 +(36, 89, -1) 8 +(36, 90, -1) 8 +(36, 91, -1) 7 +(36, 92, -1) 6 +(36, 93, -1) 5 +(36, 94, -1) 4 +(36, 95, -1) 3 +(36, 96, -1) 2 +(36, 97, -1) 1 +(37, 4, -1) 1 +(37, 5, -1) 2 +(37, 6, -1) 3 +(37, 7, -1) 4 +(37, 8, -1) 5 +(37, 9, -1) 6 +(37, 10, -1) 7 +(37, 11, -1) 8 +(37, 12, -1) 9 +(37, 13, -1) 10 +(37, 14, -1) 11 +(37, 15, -1) 12 +(37, 16, -1) 13 +(37, 17, -1) 14 +(37, 18, -1) 14 +(37, 19, -1) 15 +(37, 20, -1) 16 +(37, 21, -1) 17 +(37, 22, -1) 18 +(37, 23, -1) 19 +(37, 24, -1) 20 +(37, 25, -1) 21 +(37, 26, -1) 22 +(37, 27, -1) 22 +(37, 28, -1) 23 +(37, 29, -1) 24 +(37, 30, -1) 25 +(37, 31, -1) 26 +(37, 32, -1) 27 +(37, 33, -1) 27 +(37, 34, -1) 28 +(37, 35, -1) 29 +(37, 36, -1) 30 +(37, 37, -1) 30 +(37, 38, -1) 31 +(37, 39, -1) 32 +(37, 40, -1) 32 +(37, 41, -1) 33 +(37, 42, -1) 34 +(37, 43, -1) 34 +(37, 44, -1) 35 +(37, 45, -1) 35 +(37, 46, -1) 35 +(37, 47, -1) 36 +(37, 48, -1) 36 +(37, 49, -1) 36 +(37, 50, -1) 36 +(37, 51, -1) 36 +(37, 52, -1) 36 +(37, 53, -1) 36 +(37, 54, -1) 36 +(37, 55, -1) 35 +(37, 56, -1) 35 +(37, 57, -1) 35 +(37, 58, -1) 34 +(37, 59, -1) 34 +(37, 60, -1) 33 +(37, 61, -1) 32 +(37, 62, -1) 32 +(37, 63, -1) 31 +(37, 64, -1) 30 +(37, 65, -1) 30 +(37, 66, -1) 29 +(37, 67, -1) 28 +(37, 68, -1) 27 +(37, 69, -1) 27 +(37, 70, -1) 26 +(37, 71, -1) 25 +(37, 72, -1) 24 +(37, 73, -1) 23 +(37, 74, -1) 22 +(37, 75, -1) 22 +(37, 76, -1) 21 +(37, 77, -1) 20 +(37, 78, -1) 19 +(37, 79, -1) 18 +(37, 80, -1) 17 +(37, 81, -1) 16 +(37, 82, -1) 15 +(37, 83, -1) 14 +(37, 84, -1) 14 +(37, 85, -1) 13 +(37, 86, -1) 12 +(37, 87, -1) 11 +(37, 88, -1) 10 +(37, 89, -1) 9 +(37, 90, -1) 8 +(37, 91, -1) 7 +(37, 92, -1) 6 +(37, 93, -1) 5 +(37, 94, -1) 4 +(37, 95, -1) 3 +(37, 96, -1) 2 +(37, 97, -1) 1 +(38, 4, -1) 2 +(38, 5, -1) 3 +(38, 6, -1) 3 +(38, 7, -1) 4 +(38, 8, -1) 5 +(38, 9, -1) 6 +(38, 10, -1) 7 +(38, 11, -1) 8 +(38, 12, -1) 9 +(38, 13, -1) 10 +(38, 14, -1) 11 +(38, 15, -1) 12 +(38, 16, -1) 13 +(38, 17, -1) 14 +(38, 18, -1) 15 +(38, 19, -1) 16 +(38, 20, -1) 17 +(38, 21, -1) 18 +(38, 22, -1) 18 +(38, 23, -1) 19 +(38, 24, -1) 20 +(38, 25, -1) 21 +(38, 26, -1) 22 +(38, 27, -1) 23 +(38, 28, -1) 24 +(38, 29, -1) 25 +(38, 30, -1) 26 +(38, 31, -1) 26 +(38, 32, -1) 27 +(38, 33, -1) 28 +(38, 34, -1) 29 +(38, 35, -1) 30 +(38, 36, -1) 30 +(38, 37, -1) 31 +(38, 38, -1) 32 +(38, 39, -1) 33 +(38, 40, -1) 33 +(38, 41, -1) 34 +(38, 42, -1) 34 +(38, 43, -1) 35 +(38, 44, -1) 35 +(38, 45, -1) 36 +(38, 46, -1) 36 +(38, 47, -1) 37 +(38, 48, -1) 37 +(38, 49, -1) 37 +(38, 50, -1) 37 +(38, 51, -1) 37 +(38, 52, -1) 37 +(38, 53, -1) 37 +(38, 54, -1) 37 +(38, 55, -1) 36 +(38, 56, -1) 36 +(38, 57, -1) 35 +(38, 58, -1) 35 +(38, 59, -1) 34 +(38, 60, -1) 34 +(38, 61, -1) 33 +(38, 62, -1) 33 +(38, 63, -1) 32 +(38, 64, -1) 31 +(38, 65, -1) 30 +(38, 66, -1) 30 +(38, 67, -1) 29 +(38, 68, -1) 28 +(38, 69, -1) 27 +(38, 70, -1) 26 +(38, 71, -1) 26 +(38, 72, -1) 25 +(38, 73, -1) 24 +(38, 74, -1) 23 +(38, 75, -1) 22 +(38, 76, -1) 21 +(38, 77, -1) 20 +(38, 78, -1) 19 +(38, 79, -1) 18 +(38, 80, -1) 18 +(38, 81, -1) 17 +(38, 82, -1) 16 +(38, 83, -1) 15 +(38, 84, -1) 14 +(38, 85, -1) 13 +(38, 86, -1) 12 +(38, 87, -1) 11 +(38, 88, -1) 10 +(38, 89, -1) 9 +(38, 90, -1) 8 +(38, 91, -1) 7 +(38, 92, -1) 6 +(38, 93, -1) 5 +(38, 94, -1) 4 +(38, 95, -1) 3 +(38, 96, -1) 3 +(38, 97, -1) 2 +(39, 4, -1) 2 +(39, 5, -1) 3 +(39, 6, -1) 4 +(39, 7, -1) 5 +(39, 8, -1) 6 +(39, 9, -1) 7 +(39, 10, -1) 8 +(39, 11, -1) 9 +(39, 12, -1) 9 +(39, 13, -1) 10 +(39, 14, -1) 11 +(39, 15, -1) 12 +(39, 16, -1) 13 +(39, 17, -1) 14 +(39, 18, -1) 15 +(39, 19, -1) 16 +(39, 20, -1) 17 +(39, 21, -1) 18 +(39, 22, -1) 19 +(39, 23, -1) 20 +(39, 24, -1) 21 +(39, 25, -1) 22 +(39, 26, -1) 23 +(39, 27, -1) 23 +(39, 28, -1) 24 +(39, 29, -1) 25 +(39, 30, -1) 26 +(39, 31, -1) 27 +(39, 32, -1) 28 +(39, 33, -1) 29 +(39, 34, -1) 29 +(39, 35, -1) 30 +(39, 36, -1) 31 +(39, 37, -1) 32 +(39, 38, -1) 33 +(39, 39, -1) 33 +(39, 40, -1) 34 +(39, 41, -1) 35 +(39, 42, -1) 35 +(39, 43, -1) 36 +(39, 44, -1) 36 +(39, 45, -1) 37 +(39, 46, -1) 37 +(39, 47, -1) 37 +(39, 48, -1) 38 +(39, 49, -1) 38 +(39, 50, -1) 38 +(39, 51, -1) 38 +(39, 52, -1) 38 +(39, 53, -1) 38 +(39, 54, -1) 37 +(39, 55, -1) 37 +(39, 56, -1) 37 +(39, 57, -1) 36 +(39, 58, -1) 36 +(39, 59, -1) 35 +(39, 60, -1) 35 +(39, 61, -1) 34 +(39, 62, -1) 33 +(39, 63, -1) 33 +(39, 64, -1) 32 +(39, 65, -1) 31 +(39, 66, -1) 30 +(39, 67, -1) 29 +(39, 68, -1) 29 +(39, 69, -1) 28 +(39, 70, -1) 27 +(39, 71, -1) 26 +(39, 72, -1) 25 +(39, 73, -1) 24 +(39, 74, -1) 23 +(39, 75, -1) 23 +(39, 76, -1) 22 +(39, 77, -1) 21 +(39, 78, -1) 20 +(39, 79, -1) 19 +(39, 80, -1) 18 +(39, 81, -1) 17 +(39, 82, -1) 16 +(39, 83, -1) 15 +(39, 84, -1) 14 +(39, 85, -1) 13 +(39, 86, -1) 12 +(39, 87, -1) 11 +(39, 88, -1) 10 +(39, 89, -1) 9 +(39, 90, -1) 9 +(39, 91, -1) 8 +(39, 92, -1) 7 +(39, 93, -1) 6 +(39, 94, -1) 5 +(39, 95, -1) 4 +(39, 96, -1) 3 +(39, 97, -1) 2 +(40, 4, -1) 2 +(40, 5, -1) 3 +(40, 6, -1) 4 +(40, 7, -1) 5 +(40, 8, -1) 6 +(40, 9, -1) 7 +(40, 10, -1) 8 +(40, 11, -1) 9 +(40, 12, -1) 10 +(40, 13, -1) 11 +(40, 14, -1) 12 +(40, 15, -1) 13 +(40, 16, -1) 14 +(40, 17, -1) 15 +(40, 18, -1) 16 +(40, 19, -1) 16 +(40, 20, -1) 17 +(40, 21, -1) 18 +(40, 22, -1) 19 +(40, 23, -1) 20 +(40, 24, -1) 21 +(40, 25, -1) 22 +(40, 26, -1) 23 +(40, 27, -1) 24 +(40, 28, -1) 25 +(40, 29, -1) 26 +(40, 30, -1) 27 +(40, 31, -1) 27 +(40, 32, -1) 28 +(40, 33, -1) 29 +(40, 34, -1) 30 +(40, 35, -1) 31 +(40, 36, -1) 32 +(40, 37, -1) 32 +(40, 38, -1) 33 +(40, 39, -1) 34 +(40, 40, -1) 35 +(40, 41, -1) 35 +(40, 42, -1) 36 +(40, 43, -1) 37 +(40, 44, -1) 37 +(40, 45, -1) 38 +(40, 56, -1) 38 +(40, 57, -1) 37 +(40, 58, -1) 37 +(40, 59, -1) 36 +(40, 60, -1) 35 +(40, 61, -1) 35 +(40, 62, -1) 34 +(40, 63, -1) 33 +(40, 64, -1) 32 +(40, 65, -1) 32 +(40, 66, -1) 31 +(40, 67, -1) 30 +(40, 68, -1) 29 +(40, 69, -1) 28 +(40, 70, -1) 27 +(40, 71, -1) 27 +(40, 72, -1) 26 +(40, 73, -1) 25 +(40, 74, -1) 24 +(40, 75, -1) 23 +(40, 76, -1) 22 +(40, 77, -1) 21 +(40, 78, -1) 20 +(40, 79, -1) 19 +(40, 80, -1) 18 +(40, 81, -1) 17 +(40, 82, -1) 16 +(40, 83, -1) 16 +(40, 84, -1) 15 +(40, 85, -1) 14 +(40, 86, -1) 13 +(40, 87, -1) 12 +(40, 88, -1) 11 +(40, 89, -1) 10 +(40, 90, -1) 9 +(40, 91, -1) 8 +(40, 92, -1) 7 +(40, 93, -1) 6 +(40, 94, -1) 5 +(40, 95, -1) 4 +(40, 96, -1) 3 +(40, 97, -1) 2 +(41, 1, -1) 0 +(41, 2, -1) 0 +(41, 3, -1) 1 +(41, 4, -1) 2 +(41, 5, -1) 3 +(41, 6, -1) 4 +(41, 7, -1) 5 +(41, 8, -1) 6 +(41, 9, -1) 7 +(41, 10, -1) 8 +(41, 11, -1) 9 +(41, 12, -1) 10 +(41, 13, -1) 11 +(41, 14, -1) 12 +(41, 15, -1) 13 +(41, 16, -1) 14 +(41, 17, -1) 15 +(41, 18, -1) 16 +(41, 19, -1) 17 +(41, 20, -1) 18 +(41, 21, -1) 19 +(41, 22, -1) 20 +(41, 23, -1) 20 +(41, 24, -1) 21 +(41, 25, -1) 22 +(41, 26, -1) 23 +(41, 27, -1) 24 +(41, 28, -1) 25 +(41, 29, -1) 26 +(41, 30, -1) 27 +(41, 31, -1) 28 +(41, 32, -1) 29 +(41, 33, -1) 30 +(41, 34, -1) 30 +(41, 35, -1) 31 +(41, 36, -1) 32 +(41, 37, -1) 33 +(41, 38, -1) 34 +(41, 39, -1) 35 +(41, 40, -1) 35 +(41, 41, -1) 36 +(41, 42, -1) 37 +(41, 43, -1) 37 +(41, 58, -1) 37 +(41, 59, -1) 37 +(41, 60, -1) 36 +(41, 61, -1) 35 +(41, 62, -1) 35 +(41, 63, -1) 34 +(41, 64, -1) 33 +(41, 65, -1) 32 +(41, 66, -1) 31 +(41, 67, -1) 30 +(41, 68, -1) 30 +(41, 69, -1) 29 +(41, 70, -1) 28 +(41, 71, -1) 27 +(41, 72, -1) 26 +(41, 73, -1) 25 +(41, 74, -1) 24 +(41, 75, -1) 23 +(41, 76, -1) 22 +(41, 77, -1) 21 +(41, 78, -1) 20 +(41, 79, -1) 20 +(41, 80, -1) 19 +(41, 81, -1) 18 +(41, 82, -1) 17 +(41, 83, -1) 16 +(41, 84, -1) 15 +(41, 85, -1) 14 +(41, 86, -1) 13 +(41, 87, -1) 12 +(41, 88, -1) 11 +(41, 89, -1) 10 +(41, 90, -1) 9 +(41, 91, -1) 8 +(41, 92, -1) 7 +(41, 93, -1) 6 +(41, 94, -1) 5 +(41, 95, -1) 4 +(41, 96, -1) 3 +(41, 97, -1) 2 +(41, 98, -1) 1 +(41, 99, -1) 0 +(41, 100, -1) 0 +(42, 1, -1) 0 +(42, 2, -1) 0 +(42, 3, -1) 1 +(42, 4, -1) 2 +(42, 5, -1) 3 +(42, 6, -1) 4 +(42, 7, -1) 5 +(42, 8, -1) 6 +(42, 9, -1) 7 +(42, 10, -1) 8 +(42, 11, -1) 9 +(42, 12, -1) 10 +(42, 13, -1) 11 +(42, 14, -1) 12 +(42, 15, -1) 13 +(42, 16, -1) 14 +(42, 17, -1) 15 +(42, 18, -1) 16 +(42, 19, -1) 17 +(42, 20, -1) 18 +(42, 21, -1) 19 +(42, 22, -1) 20 +(42, 23, -1) 21 +(42, 24, -1) 22 +(42, 25, -1) 23 +(42, 26, -1) 24 +(42, 27, -1) 25 +(42, 28, -1) 25 +(42, 29, -1) 26 +(42, 30, -1) 27 +(42, 31, -1) 28 +(42, 32, -1) 29 +(42, 33, -1) 30 +(42, 34, -1) 31 +(42, 35, -1) 32 +(42, 36, -1) 33 +(42, 37, -1) 34 +(42, 38, -1) 34 +(42, 39, -1) 35 +(42, 40, -1) 36 +(42, 41, -1) 37 +(42, 42, -1) 38 +(42, 59, -1) 38 +(42, 60, -1) 37 +(42, 61, -1) 36 +(42, 62, -1) 35 +(42, 63, -1) 34 +(42, 64, -1) 34 +(42, 65, -1) 33 +(42, 66, -1) 32 +(42, 67, -1) 31 +(42, 68, -1) 30 +(42, 69, -1) 29 +(42, 70, -1) 28 +(42, 71, -1) 27 +(42, 72, -1) 26 +(42, 73, -1) 25 +(42, 74, -1) 25 +(42, 75, -1) 24 +(42, 76, -1) 23 +(42, 77, -1) 22 +(42, 78, -1) 21 +(42, 79, -1) 20 +(42, 80, -1) 19 +(42, 81, -1) 18 +(42, 82, -1) 17 +(42, 83, -1) 16 +(42, 84, -1) 15 +(42, 85, -1) 14 +(42, 86, -1) 13 +(42, 87, -1) 12 +(42, 88, -1) 11 +(42, 89, -1) 10 +(42, 90, -1) 9 +(42, 91, -1) 8 +(42, 92, -1) 7 +(42, 93, -1) 6 +(42, 94, -1) 5 +(42, 95, -1) 4 +(42, 96, -1) 3 +(42, 97, -1) 2 +(42, 98, -1) 1 +(42, 99, -1) 0 +(42, 100, -1) 0 +(43, 1, -1) 0 +(43, 2, -1) 1 +(43, 3, -1) 2 +(43, 4, -1) 3 +(43, 5, -1) 4 +(43, 6, -1) 4 +(43, 7, -1) 5 +(43, 8, -1) 6 +(43, 9, -1) 7 +(43, 10, -1) 8 +(43, 11, -1) 9 +(43, 12, -1) 10 +(43, 13, -1) 11 +(43, 14, -1) 12 +(43, 15, -1) 13 +(43, 16, -1) 14 +(43, 17, -1) 15 +(43, 18, -1) 16 +(43, 19, -1) 17 +(43, 20, -1) 18 +(43, 21, -1) 19 +(43, 22, -1) 20 +(43, 23, -1) 21 +(43, 24, -1) 22 +(43, 25, -1) 23 +(43, 26, -1) 24 +(43, 27, -1) 25 +(43, 28, -1) 26 +(43, 29, -1) 27 +(43, 30, -1) 28 +(43, 31, -1) 29 +(43, 32, -1) 30 +(43, 33, -1) 30 +(43, 34, -1) 31 +(43, 35, -1) 32 +(43, 36, -1) 33 +(43, 37, -1) 34 +(43, 38, -1) 35 +(43, 39, -1) 36 +(43, 40, -1) 37 +(43, 41, -1) 37 +(43, 60, -1) 37 +(43, 61, -1) 37 +(43, 62, -1) 36 +(43, 63, -1) 35 +(43, 64, -1) 34 +(43, 65, -1) 33 +(43, 66, -1) 32 +(43, 67, -1) 31 +(43, 68, -1) 30 +(43, 69, -1) 30 +(43, 70, -1) 29 +(43, 71, -1) 28 +(43, 72, -1) 27 +(43, 73, -1) 26 +(43, 74, -1) 25 +(43, 75, -1) 24 +(43, 76, -1) 23 +(43, 77, -1) 22 +(43, 78, -1) 21 +(43, 79, -1) 20 +(43, 80, -1) 19 +(43, 81, -1) 18 +(43, 82, -1) 17 +(43, 83, -1) 16 +(43, 84, -1) 15 +(43, 85, -1) 14 +(43, 86, -1) 13 +(43, 87, -1) 12 +(43, 88, -1) 11 +(43, 89, -1) 10 +(43, 90, -1) 9 +(43, 91, -1) 8 +(43, 92, -1) 7 +(43, 93, -1) 6 +(43, 94, -1) 5 +(43, 95, -1) 4 +(43, 96, -1) 4 +(43, 97, -1) 3 +(43, 98, -1) 2 +(43, 99, -1) 1 +(43, 100, -1) 0 +(44, 1, -1) 0 +(44, 2, -1) 1 +(44, 3, -1) 2 +(44, 4, -1) 3 +(44, 5, -1) 4 +(44, 6, -1) 5 +(44, 7, -1) 6 +(44, 8, -1) 7 +(44, 9, -1) 8 +(44, 10, -1) 9 +(44, 11, -1) 10 +(44, 12, -1) 11 +(44, 13, -1) 12 +(44, 14, -1) 13 +(44, 15, -1) 14 +(44, 16, -1) 14 +(44, 17, -1) 15 +(44, 18, -1) 16 +(44, 19, -1) 17 +(44, 20, -1) 18 +(44, 21, -1) 19 +(44, 22, -1) 20 +(44, 23, -1) 21 +(44, 24, -1) 22 +(44, 25, -1) 23 +(44, 26, -1) 24 +(44, 27, -1) 25 +(44, 28, -1) 26 +(44, 29, -1) 27 +(44, 30, -1) 28 +(44, 31, -1) 29 +(44, 32, -1) 30 +(44, 33, -1) 31 +(44, 34, -1) 32 +(44, 35, -1) 33 +(44, 36, -1) 34 +(44, 37, -1) 35 +(44, 38, -1) 35 +(44, 39, -1) 36 +(44, 40, -1) 37 +(44, 61, -1) 37 +(44, 62, -1) 36 +(44, 63, -1) 35 +(44, 64, -1) 35 +(44, 65, -1) 34 +(44, 66, -1) 33 +(44, 67, -1) 32 +(44, 68, -1) 31 +(44, 69, -1) 30 +(44, 70, -1) 29 +(44, 71, -1) 28 +(44, 72, -1) 27 +(44, 73, -1) 26 +(44, 74, -1) 25 +(44, 75, -1) 24 +(44, 76, -1) 23 +(44, 77, -1) 22 +(44, 78, -1) 21 +(44, 79, -1) 20 +(44, 80, -1) 19 +(44, 81, -1) 18 +(44, 82, -1) 17 +(44, 83, -1) 16 +(44, 84, -1) 15 +(44, 85, -1) 14 +(44, 86, -1) 14 +(44, 87, -1) 13 +(44, 88, -1) 12 +(44, 89, -1) 11 +(44, 90, -1) 10 +(44, 91, -1) 9 +(44, 92, -1) 8 +(44, 93, -1) 7 +(44, 94, -1) 6 +(44, 95, -1) 5 +(44, 96, -1) 4 +(44, 97, -1) 3 +(44, 98, -1) 2 +(44, 99, -1) 1 +(44, 100, -1) 0 +(45, 1, -1) 0 +(45, 2, -1) 1 +(45, 3, -1) 2 +(45, 4, -1) 3 +(45, 5, -1) 4 +(45, 6, -1) 5 +(45, 7, -1) 6 +(45, 8, -1) 7 +(45, 9, -1) 8 +(45, 10, -1) 9 +(45, 11, -1) 10 +(45, 12, -1) 11 +(45, 13, -1) 12 +(45, 14, -1) 13 +(45, 15, -1) 14 +(45, 16, -1) 15 +(45, 17, -1) 16 +(45, 18, -1) 17 +(45, 19, -1) 18 +(45, 20, -1) 19 +(45, 21, -1) 20 +(45, 22, -1) 21 +(45, 23, -1) 22 +(45, 24, -1) 23 +(45, 25, -1) 23 +(45, 26, -1) 24 +(45, 27, -1) 25 +(45, 28, -1) 26 +(45, 29, -1) 27 +(45, 30, -1) 28 +(45, 31, -1) 29 +(45, 32, -1) 30 +(45, 33, -1) 31 +(45, 34, -1) 32 +(45, 35, -1) 33 +(45, 36, -1) 34 +(45, 37, -1) 35 +(45, 38, -1) 36 +(45, 39, -1) 37 +(45, 40, -1) 38 +(45, 61, -1) 38 +(45, 62, -1) 37 +(45, 63, -1) 36 +(45, 64, -1) 35 +(45, 65, -1) 34 +(45, 66, -1) 33 +(45, 67, -1) 32 +(45, 68, -1) 31 +(45, 69, -1) 30 +(45, 70, -1) 29 +(45, 71, -1) 28 +(45, 72, -1) 27 +(45, 73, -1) 26 +(45, 74, -1) 25 +(45, 75, -1) 24 +(45, 76, -1) 23 +(45, 77, -1) 23 +(45, 78, -1) 22 +(45, 79, -1) 21 +(45, 80, -1) 20 +(45, 81, -1) 19 +(45, 82, -1) 18 +(45, 83, -1) 17 +(45, 84, -1) 16 +(45, 85, -1) 15 +(45, 86, -1) 14 +(45, 87, -1) 13 +(45, 88, -1) 12 +(45, 89, -1) 11 +(45, 90, -1) 10 +(45, 91, -1) 9 +(45, 92, -1) 8 +(45, 93, -1) 7 +(45, 94, -1) 6 +(45, 95, -1) 5 +(45, 96, -1) 4 +(45, 97, -1) 3 +(45, 98, -1) 2 +(45, 99, -1) 1 +(45, 100, -1) 0 +(46, 1, -1) 0 +(46, 2, -1) 1 +(46, 3, -1) 2 +(46, 4, -1) 3 +(46, 5, -1) 4 +(46, 6, -1) 5 +(46, 7, -1) 6 +(46, 8, -1) 7 +(46, 9, -1) 8 +(46, 10, -1) 9 +(46, 11, -1) 10 +(46, 12, -1) 11 +(46, 13, -1) 12 +(46, 14, -1) 13 +(46, 15, -1) 14 +(46, 16, -1) 15 +(46, 17, -1) 16 +(46, 18, -1) 17 +(46, 19, -1) 18 +(46, 20, -1) 19 +(46, 21, -1) 20 +(46, 22, -1) 21 +(46, 23, -1) 22 +(46, 24, -1) 23 +(46, 25, -1) 24 +(46, 26, -1) 25 +(46, 27, -1) 26 +(46, 28, -1) 27 +(46, 29, -1) 28 +(46, 30, -1) 29 +(46, 31, -1) 30 +(46, 32, -1) 30 +(46, 33, -1) 31 +(46, 34, -1) 32 +(46, 35, -1) 33 +(46, 36, -1) 34 +(46, 37, -1) 35 +(46, 38, -1) 36 +(46, 39, -1) 37 +(46, 62, -1) 37 +(46, 63, -1) 36 +(46, 64, -1) 35 +(46, 65, -1) 34 +(46, 66, -1) 33 +(46, 67, -1) 32 +(46, 68, -1) 31 +(46, 69, -1) 30 +(46, 70, -1) 30 +(46, 71, -1) 29 +(46, 72, -1) 28 +(46, 73, -1) 27 +(46, 74, -1) 26 +(46, 75, -1) 25 +(46, 76, -1) 24 +(46, 77, -1) 23 +(46, 78, -1) 22 +(46, 79, -1) 21 +(46, 80, -1) 20 +(46, 81, -1) 19 +(46, 82, -1) 18 +(46, 83, -1) 17 +(46, 84, -1) 16 +(46, 85, -1) 15 +(46, 86, -1) 14 +(46, 87, -1) 13 +(46, 88, -1) 12 +(46, 89, -1) 11 +(46, 90, -1) 10 +(46, 91, -1) 9 +(46, 92, -1) 8 +(46, 93, -1) 7 +(46, 94, -1) 6 +(46, 95, -1) 5 +(46, 96, -1) 4 +(46, 97, -1) 3 +(46, 98, -1) 2 +(46, 99, -1) 1 +(46, 100, -1) 0 +(47, 1, -1) 0 +(47, 2, -1) 1 +(47, 3, -1) 2 +(47, 4, -1) 3 +(47, 5, -1) 4 +(47, 6, -1) 5 +(47, 7, -1) 6 +(47, 8, -1) 7 +(47, 9, -1) 8 +(47, 10, -1) 9 +(47, 11, -1) 10 +(47, 12, -1) 11 +(47, 13, -1) 12 +(47, 14, -1) 13 +(47, 15, -1) 14 +(47, 16, -1) 15 +(47, 17, -1) 16 +(47, 18, -1) 17 +(47, 19, -1) 18 +(47, 20, -1) 19 +(47, 21, -1) 20 +(47, 22, -1) 21 +(47, 23, -1) 22 +(47, 24, -1) 23 +(47, 25, -1) 24 +(47, 26, -1) 25 +(47, 27, -1) 26 +(47, 28, -1) 27 +(47, 29, -1) 28 +(47, 30, -1) 29 +(47, 31, -1) 30 +(47, 32, -1) 31 +(47, 33, -1) 32 +(47, 34, -1) 33 +(47, 35, -1) 34 +(47, 36, -1) 35 +(47, 37, -1) 36 +(47, 38, -1) 37 +(47, 39, -1) 38 +(47, 62, -1) 38 +(47, 63, -1) 37 +(47, 64, -1) 36 +(47, 65, -1) 35 +(47, 66, -1) 34 +(47, 67, -1) 33 +(47, 68, -1) 32 +(47, 69, -1) 31 +(47, 70, -1) 30 +(47, 71, -1) 29 +(47, 72, -1) 28 +(47, 73, -1) 27 +(47, 74, -1) 26 +(47, 75, -1) 25 +(47, 76, -1) 24 +(47, 77, -1) 23 +(47, 78, -1) 22 +(47, 79, -1) 21 +(47, 80, -1) 20 +(47, 81, -1) 19 +(47, 82, -1) 18 +(47, 83, -1) 17 +(47, 84, -1) 16 +(47, 85, -1) 15 +(47, 86, -1) 14 +(47, 87, -1) 13 +(47, 88, -1) 12 +(47, 89, -1) 11 +(47, 90, -1) 10 +(47, 91, -1) 9 +(47, 92, -1) 8 +(47, 93, -1) 7 +(47, 94, -1) 6 +(47, 95, -1) 5 +(47, 96, -1) 4 +(47, 97, -1) 3 +(47, 98, -1) 2 +(47, 99, -1) 1 +(47, 100, -1) 0 +(48, 1, -1) 0 +(48, 2, -1) 1 +(48, 3, -1) 2 +(48, 4, -1) 3 +(48, 5, -1) 4 +(48, 6, -1) 5 +(48, 7, -1) 6 +(48, 8, -1) 7 +(48, 9, -1) 8 +(48, 10, -1) 9 +(48, 11, -1) 10 +(48, 12, -1) 11 +(48, 13, -1) 12 +(48, 14, -1) 13 +(48, 15, -1) 14 +(48, 16, -1) 15 +(48, 17, -1) 16 +(48, 18, -1) 17 +(48, 19, -1) 18 +(48, 20, -1) 19 +(48, 21, -1) 20 +(48, 22, -1) 21 +(48, 23, -1) 22 +(48, 24, -1) 23 +(48, 25, -1) 24 +(48, 26, -1) 25 +(48, 27, -1) 26 +(48, 28, -1) 27 +(48, 29, -1) 28 +(48, 30, -1) 29 +(48, 31, -1) 30 +(48, 32, -1) 31 +(48, 33, -1) 32 +(48, 34, -1) 33 +(48, 35, -1) 34 +(48, 36, -1) 35 +(48, 37, -1) 36 +(48, 38, -1) 37 +(48, 39, -1) 38 +(48, 62, -1) 38 +(48, 63, -1) 37 +(48, 64, -1) 36 +(48, 65, -1) 35 +(48, 66, -1) 34 +(48, 67, -1) 33 +(48, 68, -1) 32 +(48, 69, -1) 31 +(48, 70, -1) 30 +(48, 71, -1) 29 +(48, 72, -1) 28 +(48, 73, -1) 27 +(48, 74, -1) 26 +(48, 75, -1) 25 +(48, 76, -1) 24 +(48, 77, -1) 23 +(48, 78, -1) 22 +(48, 79, -1) 21 +(48, 80, -1) 20 +(48, 81, -1) 19 +(48, 82, -1) 18 +(48, 83, -1) 17 +(48, 84, -1) 16 +(48, 85, -1) 15 +(48, 86, -1) 14 +(48, 87, -1) 13 +(48, 88, -1) 12 +(48, 89, -1) 11 +(48, 90, -1) 10 +(48, 91, -1) 9 +(48, 92, -1) 8 +(48, 93, -1) 7 +(48, 94, -1) 6 +(48, 95, -1) 5 +(48, 96, -1) 4 +(48, 97, -1) 3 +(48, 98, -1) 2 +(48, 99, -1) 1 +(48, 100, -1) 0 +(49, 1, -1) 0 +(49, 2, -1) 1 +(49, 3, -1) 2 +(49, 4, -1) 3 +(49, 5, -1) 4 +(49, 6, -1) 5 +(49, 7, -1) 6 +(49, 8, -1) 7 +(49, 9, -1) 8 +(49, 10, -1) 9 +(49, 11, -1) 10 +(49, 12, -1) 11 +(49, 13, -1) 12 +(49, 14, -1) 13 +(49, 15, -1) 14 +(49, 16, -1) 15 +(49, 17, -1) 16 +(49, 18, -1) 17 +(49, 19, -1) 18 +(49, 20, -1) 19 +(49, 21, -1) 20 +(49, 22, -1) 21 +(49, 23, -1) 22 +(49, 24, -1) 23 +(49, 25, -1) 24 +(49, 26, -1) 25 +(49, 27, -1) 26 +(49, 28, -1) 27 +(49, 29, -1) 28 +(49, 30, -1) 29 +(49, 31, -1) 30 +(49, 32, -1) 31 +(49, 33, -1) 32 +(49, 34, -1) 33 +(49, 35, -1) 34 +(49, 36, -1) 35 +(49, 37, -1) 36 +(49, 38, -1) 37 +(49, 39, -1) 38 +(49, 62, -1) 38 +(49, 63, -1) 37 +(49, 64, -1) 36 +(49, 65, -1) 35 +(49, 66, -1) 34 +(49, 67, -1) 33 +(49, 68, -1) 32 +(49, 69, -1) 31 +(49, 70, -1) 30 +(49, 71, -1) 29 +(49, 72, -1) 28 +(49, 73, -1) 27 +(49, 74, -1) 26 +(49, 75, -1) 25 +(49, 76, -1) 24 +(49, 77, -1) 23 +(49, 78, -1) 22 +(49, 79, -1) 21 +(49, 80, -1) 20 +(49, 81, -1) 19 +(49, 82, -1) 18 +(49, 83, -1) 17 +(49, 84, -1) 16 +(49, 85, -1) 15 +(49, 86, -1) 14 +(49, 87, -1) 13 +(49, 88, -1) 12 +(49, 89, -1) 11 +(49, 90, -1) 10 +(49, 91, -1) 9 +(49, 92, -1) 8 +(49, 93, -1) 7 +(49, 94, -1) 6 +(49, 95, -1) 5 +(49, 96, -1) 4 +(49, 97, -1) 3 +(49, 98, -1) 2 +(49, 99, -1) 1 +(49, 100, -1) 0 +(50, 1, -1) 0 +(50, 2, -1) 1 +(50, 3, -1) 2 +(50, 4, -1) 3 +(50, 5, -1) 4 +(50, 6, -1) 5 +(50, 7, -1) 6 +(50, 8, -1) 7 +(50, 9, -1) 8 +(50, 10, -1) 9 +(50, 11, -1) 10 +(50, 12, -1) 11 +(50, 13, -1) 12 +(50, 14, -1) 13 +(50, 15, -1) 14 +(50, 16, -1) 15 +(50, 17, -1) 16 +(50, 18, -1) 17 +(50, 19, -1) 18 +(50, 20, -1) 19 +(50, 21, -1) 20 +(50, 22, -1) 21 +(50, 23, -1) 22 +(50, 24, -1) 23 +(50, 25, -1) 24 +(50, 26, -1) 25 +(50, 27, -1) 26 +(50, 28, -1) 27 +(50, 29, -1) 28 +(50, 30, -1) 29 +(50, 31, -1) 30 +(50, 32, -1) 31 +(50, 33, -1) 32 +(50, 34, -1) 33 +(50, 35, -1) 34 +(50, 36, -1) 35 +(50, 37, -1) 36 +(50, 38, -1) 37 +(50, 39, -1) 38 +(50, 62, -1) 38 +(50, 63, -1) 37 +(50, 64, -1) 36 +(50, 65, -1) 35 +(50, 66, -1) 34 +(50, 67, -1) 33 +(50, 68, -1) 32 +(50, 69, -1) 31 +(50, 70, -1) 30 +(50, 71, -1) 29 +(50, 72, -1) 28 +(50, 73, -1) 27 +(50, 74, -1) 26 +(50, 75, -1) 25 +(50, 76, -1) 24 +(50, 77, -1) 23 +(50, 78, -1) 22 +(50, 79, -1) 21 +(50, 80, -1) 20 +(50, 81, -1) 19 +(50, 82, -1) 18 +(50, 83, -1) 17 +(50, 84, -1) 16 +(50, 85, -1) 15 +(50, 86, -1) 14 +(50, 87, -1) 13 +(50, 88, -1) 12 +(50, 89, -1) 11 +(50, 90, -1) 10 +(50, 91, -1) 9 +(50, 92, -1) 8 +(50, 93, -1) 7 +(50, 94, -1) 6 +(50, 95, -1) 5 +(50, 96, -1) 4 +(50, 97, -1) 3 +(50, 98, -1) 2 +(50, 99, -1) 1 +(50, 100, -1) 0 +(51, 1, -1) 0 +(51, 2, -1) 1 +(51, 3, -1) 2 +(51, 4, -1) 3 +(51, 5, -1) 4 +(51, 6, -1) 5 +(51, 7, -1) 6 +(51, 8, -1) 7 +(51, 9, -1) 8 +(51, 10, -1) 9 +(51, 11, -1) 10 +(51, 12, -1) 11 +(51, 13, -1) 12 +(51, 14, -1) 13 +(51, 15, -1) 14 +(51, 16, -1) 15 +(51, 17, -1) 16 +(51, 18, -1) 17 +(51, 19, -1) 18 +(51, 20, -1) 19 +(51, 21, -1) 20 +(51, 22, -1) 21 +(51, 23, -1) 22 +(51, 24, -1) 23 +(51, 25, -1) 24 +(51, 26, -1) 25 +(51, 27, -1) 26 +(51, 28, -1) 27 +(51, 29, -1) 28 +(51, 30, -1) 29 +(51, 31, -1) 30 +(51, 32, -1) 31 +(51, 33, -1) 32 +(51, 34, -1) 33 +(51, 35, -1) 34 +(51, 36, -1) 35 +(51, 37, -1) 36 +(51, 38, -1) 37 +(51, 39, -1) 38 +(51, 62, -1) 38 +(51, 63, -1) 37 +(51, 64, -1) 36 +(51, 65, -1) 35 +(51, 66, -1) 34 +(51, 67, -1) 33 +(51, 68, -1) 32 +(51, 69, -1) 31 +(51, 70, -1) 30 +(51, 71, -1) 29 +(51, 72, -1) 28 +(51, 73, -1) 27 +(51, 74, -1) 26 +(51, 75, -1) 25 +(51, 76, -1) 24 +(51, 77, -1) 23 +(51, 78, -1) 22 +(51, 79, -1) 21 +(51, 80, -1) 20 +(51, 81, -1) 19 +(51, 82, -1) 18 +(51, 83, -1) 17 +(51, 84, -1) 16 +(51, 85, -1) 15 +(51, 86, -1) 14 +(51, 87, -1) 13 +(51, 88, -1) 12 +(51, 89, -1) 11 +(51, 90, -1) 10 +(51, 91, -1) 9 +(51, 92, -1) 8 +(51, 93, -1) 7 +(51, 94, -1) 6 +(51, 95, -1) 5 +(51, 96, -1) 4 +(51, 97, -1) 3 +(51, 98, -1) 2 +(51, 99, -1) 1 +(51, 100, -1) 0 +(52, 1, -1) 0 +(52, 2, -1) 1 +(52, 3, -1) 2 +(52, 4, -1) 3 +(52, 5, -1) 4 +(52, 6, -1) 5 +(52, 7, -1) 6 +(52, 8, -1) 7 +(52, 9, -1) 8 +(52, 10, -1) 9 +(52, 11, -1) 10 +(52, 12, -1) 11 +(52, 13, -1) 12 +(52, 14, -1) 13 +(52, 15, -1) 14 +(52, 16, -1) 15 +(52, 17, -1) 16 +(52, 18, -1) 17 +(52, 19, -1) 18 +(52, 20, -1) 19 +(52, 21, -1) 20 +(52, 22, -1) 21 +(52, 23, -1) 22 +(52, 24, -1) 23 +(52, 25, -1) 24 +(52, 26, -1) 25 +(52, 27, -1) 26 +(52, 28, -1) 27 +(52, 29, -1) 28 +(52, 30, -1) 29 +(52, 31, -1) 30 +(52, 32, -1) 31 +(52, 33, -1) 32 +(52, 34, -1) 33 +(52, 35, -1) 34 +(52, 36, -1) 35 +(52, 37, -1) 36 +(52, 38, -1) 37 +(52, 39, -1) 38 +(52, 62, -1) 38 +(52, 63, -1) 37 +(52, 64, -1) 36 +(52, 65, -1) 35 +(52, 66, -1) 34 +(52, 67, -1) 33 +(52, 68, -1) 32 +(52, 69, -1) 31 +(52, 70, -1) 30 +(52, 71, -1) 29 +(52, 72, -1) 28 +(52, 73, -1) 27 +(52, 74, -1) 26 +(52, 75, -1) 25 +(52, 76, -1) 24 +(52, 77, -1) 23 +(52, 78, -1) 22 +(52, 79, -1) 21 +(52, 80, -1) 20 +(52, 81, -1) 19 +(52, 82, -1) 18 +(52, 83, -1) 17 +(52, 84, -1) 16 +(52, 85, -1) 15 +(52, 86, -1) 14 +(52, 87, -1) 13 +(52, 88, -1) 12 +(52, 89, -1) 11 +(52, 90, -1) 10 +(52, 91, -1) 9 +(52, 92, -1) 8 +(52, 93, -1) 7 +(52, 94, -1) 6 +(52, 95, -1) 5 +(52, 96, -1) 4 +(52, 97, -1) 3 +(52, 98, -1) 2 +(52, 99, -1) 1 +(52, 100, -1) 0 +(53, 1, -1) 0 +(53, 2, -1) 1 +(53, 3, -1) 2 +(53, 4, -1) 3 +(53, 5, -1) 4 +(53, 6, -1) 5 +(53, 7, -1) 6 +(53, 8, -1) 7 +(53, 9, -1) 8 +(53, 10, -1) 9 +(53, 11, -1) 10 +(53, 12, -1) 11 +(53, 13, -1) 12 +(53, 14, -1) 13 +(53, 15, -1) 14 +(53, 16, -1) 15 +(53, 17, -1) 16 +(53, 18, -1) 17 +(53, 19, -1) 18 +(53, 20, -1) 19 +(53, 21, -1) 20 +(53, 22, -1) 21 +(53, 23, -1) 22 +(53, 24, -1) 23 +(53, 25, -1) 24 +(53, 26, -1) 25 +(53, 27, -1) 26 +(53, 28, -1) 27 +(53, 29, -1) 28 +(53, 30, -1) 29 +(53, 31, -1) 30 +(53, 32, -1) 31 +(53, 33, -1) 32 +(53, 34, -1) 33 +(53, 35, -1) 34 +(53, 36, -1) 35 +(53, 37, -1) 36 +(53, 38, -1) 37 +(53, 39, -1) 38 +(53, 62, -1) 38 +(53, 63, -1) 37 +(53, 64, -1) 36 +(53, 65, -1) 35 +(53, 66, -1) 34 +(53, 67, -1) 33 +(53, 68, -1) 32 +(53, 69, -1) 31 +(53, 70, -1) 30 +(53, 71, -1) 29 +(53, 72, -1) 28 +(53, 73, -1) 27 +(53, 74, -1) 26 +(53, 75, -1) 25 +(53, 76, -1) 24 +(53, 77, -1) 23 +(53, 78, -1) 22 +(53, 79, -1) 21 +(53, 80, -1) 20 +(53, 81, -1) 19 +(53, 82, -1) 18 +(53, 83, -1) 17 +(53, 84, -1) 16 +(53, 85, -1) 15 +(53, 86, -1) 14 +(53, 87, -1) 13 +(53, 88, -1) 12 +(53, 89, -1) 11 +(53, 90, -1) 10 +(53, 91, -1) 9 +(53, 92, -1) 8 +(53, 93, -1) 7 +(53, 94, -1) 6 +(53, 95, -1) 5 +(53, 96, -1) 4 +(53, 97, -1) 3 +(53, 98, -1) 2 +(53, 99, -1) 1 +(53, 100, -1) 0 +(54, 1, -1) 0 +(54, 2, -1) 1 +(54, 3, -1) 2 +(54, 4, -1) 3 +(54, 5, -1) 4 +(54, 6, -1) 5 +(54, 7, -1) 6 +(54, 8, -1) 7 +(54, 9, -1) 8 +(54, 10, -1) 9 +(54, 11, -1) 10 +(54, 12, -1) 11 +(54, 13, -1) 12 +(54, 14, -1) 13 +(54, 15, -1) 14 +(54, 16, -1) 15 +(54, 17, -1) 16 +(54, 18, -1) 17 +(54, 19, -1) 18 +(54, 20, -1) 19 +(54, 21, -1) 20 +(54, 22, -1) 21 +(54, 23, -1) 22 +(54, 24, -1) 23 +(54, 25, -1) 24 +(54, 26, -1) 25 +(54, 27, -1) 26 +(54, 28, -1) 27 +(54, 29, -1) 28 +(54, 30, -1) 29 +(54, 31, -1) 30 +(54, 32, -1) 31 +(54, 33, -1) 32 +(54, 34, -1) 33 +(54, 35, -1) 34 +(54, 36, -1) 35 +(54, 37, -1) 36 +(54, 38, -1) 37 +(54, 39, -1) 38 +(54, 62, -1) 38 +(54, 63, -1) 37 +(54, 64, -1) 36 +(54, 65, -1) 35 +(54, 66, -1) 34 +(54, 67, -1) 33 +(54, 68, -1) 32 +(54, 69, -1) 31 +(54, 70, -1) 30 +(54, 71, -1) 29 +(54, 72, -1) 28 +(54, 73, -1) 27 +(54, 74, -1) 26 +(54, 75, -1) 25 +(54, 76, -1) 24 +(54, 77, -1) 23 +(54, 78, -1) 22 +(54, 79, -1) 21 +(54, 80, -1) 20 +(54, 81, -1) 19 +(54, 82, -1) 18 +(54, 83, -1) 17 +(54, 84, -1) 16 +(54, 85, -1) 15 +(54, 86, -1) 14 +(54, 87, -1) 13 +(54, 88, -1) 12 +(54, 89, -1) 11 +(54, 90, -1) 10 +(54, 91, -1) 9 +(54, 92, -1) 8 +(54, 93, -1) 7 +(54, 94, -1) 6 +(54, 95, -1) 5 +(54, 96, -1) 4 +(54, 97, -1) 3 +(54, 98, -1) 2 +(54, 99, -1) 1 +(54, 100, -1) 0 +(55, 1, -1) 0 +(55, 2, -1) 1 +(55, 3, -1) 2 +(55, 4, -1) 3 +(55, 5, -1) 4 +(55, 6, -1) 5 +(55, 7, -1) 6 +(55, 8, -1) 7 +(55, 9, -1) 8 +(55, 10, -1) 9 +(55, 11, -1) 10 +(55, 12, -1) 11 +(55, 13, -1) 12 +(55, 14, -1) 13 +(55, 15, -1) 14 +(55, 16, -1) 15 +(55, 17, -1) 16 +(55, 18, -1) 17 +(55, 19, -1) 18 +(55, 20, -1) 19 +(55, 21, -1) 20 +(55, 22, -1) 21 +(55, 23, -1) 22 +(55, 24, -1) 23 +(55, 25, -1) 24 +(55, 26, -1) 25 +(55, 27, -1) 26 +(55, 28, -1) 27 +(55, 29, -1) 28 +(55, 30, -1) 29 +(55, 31, -1) 30 +(55, 32, -1) 30 +(55, 33, -1) 31 +(55, 34, -1) 32 +(55, 35, -1) 33 +(55, 36, -1) 34 +(55, 37, -1) 35 +(55, 38, -1) 36 +(55, 39, -1) 37 +(55, 62, -1) 37 +(55, 63, -1) 36 +(55, 64, -1) 35 +(55, 65, -1) 34 +(55, 66, -1) 33 +(55, 67, -1) 32 +(55, 68, -1) 31 +(55, 69, -1) 30 +(55, 70, -1) 30 +(55, 71, -1) 29 +(55, 72, -1) 28 +(55, 73, -1) 27 +(55, 74, -1) 26 +(55, 75, -1) 25 +(55, 76, -1) 24 +(55, 77, -1) 23 +(55, 78, -1) 22 +(55, 79, -1) 21 +(55, 80, -1) 20 +(55, 81, -1) 19 +(55, 82, -1) 18 +(55, 83, -1) 17 +(55, 84, -1) 16 +(55, 85, -1) 15 +(55, 86, -1) 14 +(55, 87, -1) 13 +(55, 88, -1) 12 +(55, 89, -1) 11 +(55, 90, -1) 10 +(55, 91, -1) 9 +(55, 92, -1) 8 +(55, 93, -1) 7 +(55, 94, -1) 6 +(55, 95, -1) 5 +(55, 96, -1) 4 +(55, 97, -1) 3 +(55, 98, -1) 2 +(55, 99, -1) 1 +(55, 100, -1) 0 +(56, 1, -1) 0 +(56, 2, -1) 1 +(56, 3, -1) 2 +(56, 4, -1) 3 +(56, 5, -1) 4 +(56, 6, -1) 5 +(56, 7, -1) 6 +(56, 8, -1) 7 +(56, 9, -1) 8 +(56, 10, -1) 9 +(56, 11, -1) 10 +(56, 12, -1) 11 +(56, 13, -1) 12 +(56, 14, -1) 13 +(56, 15, -1) 14 +(56, 16, -1) 15 +(56, 17, -1) 16 +(56, 18, -1) 17 +(56, 19, -1) 18 +(56, 20, -1) 19 +(56, 21, -1) 20 +(56, 22, -1) 21 +(56, 23, -1) 22 +(56, 24, -1) 23 +(56, 25, -1) 23 +(56, 26, -1) 24 +(56, 27, -1) 25 +(56, 28, -1) 26 +(56, 29, -1) 27 +(56, 30, -1) 28 +(56, 31, -1) 29 +(56, 32, -1) 30 +(56, 33, -1) 31 +(56, 34, -1) 32 +(56, 35, -1) 33 +(56, 36, -1) 34 +(56, 37, -1) 35 +(56, 38, -1) 36 +(56, 39, -1) 37 +(56, 40, -1) 38 +(56, 61, -1) 38 +(56, 62, -1) 37 +(56, 63, -1) 36 +(56, 64, -1) 35 +(56, 65, -1) 34 +(56, 66, -1) 33 +(56, 67, -1) 32 +(56, 68, -1) 31 +(56, 69, -1) 30 +(56, 70, -1) 29 +(56, 71, -1) 28 +(56, 72, -1) 27 +(56, 73, -1) 26 +(56, 74, -1) 25 +(56, 75, -1) 24 +(56, 76, -1) 23 +(56, 77, -1) 23 +(56, 78, -1) 22 +(56, 79, -1) 21 +(56, 80, -1) 20 +(56, 81, -1) 19 +(56, 82, -1) 18 +(56, 83, -1) 17 +(56, 84, -1) 16 +(56, 85, -1) 15 +(56, 86, -1) 14 +(56, 87, -1) 13 +(56, 88, -1) 12 +(56, 89, -1) 11 +(56, 90, -1) 10 +(56, 91, -1) 9 +(56, 92, -1) 8 +(56, 93, -1) 7 +(56, 94, -1) 6 +(56, 95, -1) 5 +(56, 96, -1) 4 +(56, 97, -1) 3 +(56, 98, -1) 2 +(56, 99, -1) 1 +(56, 100, -1) 0 +(57, 1, -1) 0 +(57, 2, -1) 1 +(57, 3, -1) 2 +(57, 4, -1) 3 +(57, 5, -1) 4 +(57, 6, -1) 5 +(57, 7, -1) 6 +(57, 8, -1) 7 +(57, 9, -1) 8 +(57, 10, -1) 9 +(57, 11, -1) 10 +(57, 12, -1) 11 +(57, 13, -1) 12 +(57, 14, -1) 13 +(57, 15, -1) 14 +(57, 16, -1) 14 +(57, 17, -1) 15 +(57, 18, -1) 16 +(57, 19, -1) 17 +(57, 20, -1) 18 +(57, 21, -1) 19 +(57, 22, -1) 20 +(57, 23, -1) 21 +(57, 24, -1) 22 +(57, 25, -1) 23 +(57, 26, -1) 24 +(57, 27, -1) 25 +(57, 28, -1) 26 +(57, 29, -1) 27 +(57, 30, -1) 28 +(57, 31, -1) 29 +(57, 32, -1) 30 +(57, 33, -1) 31 +(57, 34, -1) 32 +(57, 35, -1) 33 +(57, 36, -1) 34 +(57, 37, -1) 35 +(57, 38, -1) 35 +(57, 39, -1) 36 +(57, 40, -1) 37 +(57, 61, -1) 37 +(57, 62, -1) 36 +(57, 63, -1) 35 +(57, 64, -1) 35 +(57, 65, -1) 34 +(57, 66, -1) 33 +(57, 67, -1) 32 +(57, 68, -1) 31 +(57, 69, -1) 30 +(57, 70, -1) 29 +(57, 71, -1) 28 +(57, 72, -1) 27 +(57, 73, -1) 26 +(57, 74, -1) 25 +(57, 75, -1) 24 +(57, 76, -1) 23 +(57, 77, -1) 22 +(57, 78, -1) 21 +(57, 79, -1) 20 +(57, 80, -1) 19 +(57, 81, -1) 18 +(57, 82, -1) 17 +(57, 83, -1) 16 +(57, 84, -1) 15 +(57, 85, -1) 14 +(57, 86, -1) 14 +(57, 87, -1) 13 +(57, 88, -1) 12 +(57, 89, -1) 11 +(57, 90, -1) 10 +(57, 91, -1) 9 +(57, 92, -1) 8 +(57, 93, -1) 7 +(57, 94, -1) 6 +(57, 95, -1) 5 +(57, 96, -1) 4 +(57, 97, -1) 3 +(57, 98, -1) 2 +(57, 99, -1) 1 +(57, 100, -1) 0 +(58, 1, -1) 0 +(58, 2, -1) 1 +(58, 3, -1) 2 +(58, 4, -1) 3 +(58, 5, -1) 4 +(58, 6, -1) 4 +(58, 7, -1) 5 +(58, 8, -1) 6 +(58, 9, -1) 7 +(58, 10, -1) 8 +(58, 11, -1) 9 +(58, 12, -1) 10 +(58, 13, -1) 11 +(58, 14, -1) 12 +(58, 15, -1) 13 +(58, 16, -1) 14 +(58, 17, -1) 15 +(58, 18, -1) 16 +(58, 19, -1) 17 +(58, 20, -1) 18 +(58, 21, -1) 19 +(58, 22, -1) 20 +(58, 23, -1) 21 +(58, 24, -1) 22 +(58, 25, -1) 23 +(58, 26, -1) 24 +(58, 27, -1) 25 +(58, 28, -1) 26 +(58, 29, -1) 27 +(58, 30, -1) 28 +(58, 31, -1) 29 +(58, 32, -1) 30 +(58, 33, -1) 30 +(58, 34, -1) 31 +(58, 35, -1) 32 +(58, 36, -1) 33 +(58, 37, -1) 34 +(58, 38, -1) 35 +(58, 39, -1) 36 +(58, 40, -1) 37 +(58, 41, -1) 37 +(58, 60, -1) 37 +(58, 61, -1) 37 +(58, 62, -1) 36 +(58, 63, -1) 35 +(58, 64, -1) 34 +(58, 65, -1) 33 +(58, 66, -1) 32 +(58, 67, -1) 31 +(58, 68, -1) 30 +(58, 69, -1) 30 +(58, 70, -1) 29 +(58, 71, -1) 28 +(58, 72, -1) 27 +(58, 73, -1) 26 +(58, 74, -1) 25 +(58, 75, -1) 24 +(58, 76, -1) 23 +(58, 77, -1) 22 +(58, 78, -1) 21 +(58, 79, -1) 20 +(58, 80, -1) 19 +(58, 81, -1) 18 +(58, 82, -1) 17 +(58, 83, -1) 16 +(58, 84, -1) 15 +(58, 85, -1) 14 +(58, 86, -1) 13 +(58, 87, -1) 12 +(58, 88, -1) 11 +(58, 89, -1) 10 +(58, 90, -1) 9 +(58, 91, -1) 8 +(58, 92, -1) 7 +(58, 93, -1) 6 +(58, 94, -1) 5 +(58, 95, -1) 4 +(58, 96, -1) 4 +(58, 97, -1) 3 +(58, 98, -1) 2 +(58, 99, -1) 1 +(58, 100, -1) 0 +(59, 1, -1) 0 +(59, 2, -1) 0 +(59, 3, -1) 1 +(59, 4, -1) 2 +(59, 5, -1) 3 +(59, 6, -1) 4 +(59, 7, -1) 5 +(59, 8, -1) 6 +(59, 9, -1) 7 +(59, 10, -1) 8 +(59, 11, -1) 9 +(59, 12, -1) 10 +(59, 13, -1) 11 +(59, 14, -1) 12 +(59, 15, -1) 13 +(59, 16, -1) 14 +(59, 17, -1) 15 +(59, 18, -1) 16 +(59, 19, -1) 17 +(59, 20, -1) 18 +(59, 21, -1) 19 +(59, 22, -1) 20 +(59, 23, -1) 21 +(59, 24, -1) 22 +(59, 25, -1) 23 +(59, 26, -1) 24 +(59, 27, -1) 25 +(59, 28, -1) 25 +(59, 29, -1) 26 +(59, 30, -1) 27 +(59, 31, -1) 28 +(59, 32, -1) 29 +(59, 33, -1) 30 +(59, 34, -1) 31 +(59, 35, -1) 32 +(59, 36, -1) 33 +(59, 37, -1) 34 +(59, 38, -1) 34 +(59, 39, -1) 35 +(59, 40, -1) 36 +(59, 41, -1) 37 +(59, 42, -1) 38 +(59, 59, -1) 38 +(59, 60, -1) 37 +(59, 61, -1) 36 +(59, 62, -1) 35 +(59, 63, -1) 34 +(59, 64, -1) 34 +(59, 65, -1) 33 +(59, 66, -1) 32 +(59, 67, -1) 31 +(59, 68, -1) 30 +(59, 69, -1) 29 +(59, 70, -1) 28 +(59, 71, -1) 27 +(59, 72, -1) 26 +(59, 73, -1) 25 +(59, 74, -1) 25 +(59, 75, -1) 24 +(59, 76, -1) 23 +(59, 77, -1) 22 +(59, 78, -1) 21 +(59, 79, -1) 20 +(59, 80, -1) 19 +(59, 81, -1) 18 +(59, 82, -1) 17 +(59, 83, -1) 16 +(59, 84, -1) 15 +(59, 85, -1) 14 +(59, 86, -1) 13 +(59, 87, -1) 12 +(59, 88, -1) 11 +(59, 89, -1) 10 +(59, 90, -1) 9 +(59, 91, -1) 8 +(59, 92, -1) 7 +(59, 93, -1) 6 +(59, 94, -1) 5 +(59, 95, -1) 4 +(59, 96, -1) 3 +(59, 97, -1) 2 +(59, 98, -1) 1 +(59, 99, -1) 0 +(59, 100, -1) 0 +(60, 1, -1) 0 +(60, 2, -1) 0 +(60, 3, -1) 1 +(60, 4, -1) 2 +(60, 5, -1) 3 +(60, 6, -1) 4 +(60, 7, -1) 5 +(60, 8, -1) 6 +(60, 9, -1) 7 +(60, 10, -1) 8 +(60, 11, -1) 9 +(60, 12, -1) 10 +(60, 13, -1) 11 +(60, 14, -1) 12 +(60, 15, -1) 13 +(60, 16, -1) 14 +(60, 17, -1) 15 +(60, 18, -1) 16 +(60, 19, -1) 17 +(60, 20, -1) 18 +(60, 21, -1) 19 +(60, 22, -1) 20 +(60, 23, -1) 20 +(60, 24, -1) 21 +(60, 25, -1) 22 +(60, 26, -1) 23 +(60, 27, -1) 24 +(60, 28, -1) 25 +(60, 29, -1) 26 +(60, 30, -1) 27 +(60, 31, -1) 28 +(60, 32, -1) 29 +(60, 33, -1) 30 +(60, 34, -1) 30 +(60, 35, -1) 31 +(60, 36, -1) 32 +(60, 37, -1) 33 +(60, 38, -1) 34 +(60, 39, -1) 35 +(60, 40, -1) 35 +(60, 41, -1) 36 +(60, 42, -1) 37 +(60, 43, -1) 37 +(60, 58, -1) 37 +(60, 59, -1) 37 +(60, 60, -1) 36 +(60, 61, -1) 35 +(60, 62, -1) 35 +(60, 63, -1) 34 +(60, 64, -1) 33 +(60, 65, -1) 32 +(60, 66, -1) 31 +(60, 67, -1) 30 +(60, 68, -1) 30 +(60, 69, -1) 29 +(60, 70, -1) 28 +(60, 71, -1) 27 +(60, 72, -1) 26 +(60, 73, -1) 25 +(60, 74, -1) 24 +(60, 75, -1) 23 +(60, 76, -1) 22 +(60, 77, -1) 21 +(60, 78, -1) 20 +(60, 79, -1) 20 +(60, 80, -1) 19 +(60, 81, -1) 18 +(60, 82, -1) 17 +(60, 83, -1) 16 +(60, 84, -1) 15 +(60, 85, -1) 14 +(60, 86, -1) 13 +(60, 87, -1) 12 +(60, 88, -1) 11 +(60, 89, -1) 10 +(60, 90, -1) 9 +(60, 91, -1) 8 +(60, 92, -1) 7 +(60, 93, -1) 6 +(60, 94, -1) 5 +(60, 95, -1) 4 +(60, 96, -1) 3 +(60, 97, -1) 2 +(60, 98, -1) 1 +(60, 99, -1) 0 +(60, 100, -1) 0 +(61, 4, -1) 2 +(61, 5, -1) 3 +(61, 6, -1) 4 +(61, 7, -1) 5 +(61, 8, -1) 6 +(61, 9, -1) 7 +(61, 10, -1) 8 +(61, 11, -1) 9 +(61, 12, -1) 10 +(61, 13, -1) 11 +(61, 14, -1) 12 +(61, 15, -1) 13 +(61, 16, -1) 14 +(61, 17, -1) 15 +(61, 18, -1) 16 +(61, 19, -1) 16 +(61, 20, -1) 17 +(61, 21, -1) 18 +(61, 22, -1) 19 +(61, 23, -1) 20 +(61, 24, -1) 21 +(61, 25, -1) 22 +(61, 26, -1) 23 +(61, 27, -1) 24 +(61, 28, -1) 25 +(61, 29, -1) 26 +(61, 30, -1) 27 +(61, 31, -1) 27 +(61, 32, -1) 28 +(61, 33, -1) 29 +(61, 34, -1) 30 +(61, 35, -1) 31 +(61, 36, -1) 32 +(61, 37, -1) 32 +(61, 38, -1) 33 +(61, 39, -1) 34 +(61, 40, -1) 35 +(61, 41, -1) 35 +(61, 42, -1) 36 +(61, 43, -1) 37 +(61, 44, -1) 37 +(61, 45, -1) 38 +(61, 56, -1) 38 +(61, 57, -1) 37 +(61, 58, -1) 37 +(61, 59, -1) 36 +(61, 60, -1) 35 +(61, 61, -1) 35 +(61, 62, -1) 34 +(61, 63, -1) 33 +(61, 64, -1) 32 +(61, 65, -1) 32 +(61, 66, -1) 31 +(61, 67, -1) 30 +(61, 68, -1) 29 +(61, 69, -1) 28 +(61, 70, -1) 27 +(61, 71, -1) 27 +(61, 72, -1) 26 +(61, 73, -1) 25 +(61, 74, -1) 24 +(61, 75, -1) 23 +(61, 76, -1) 22 +(61, 77, -1) 21 +(61, 78, -1) 20 +(61, 79, -1) 19 +(61, 80, -1) 18 +(61, 81, -1) 17 +(61, 82, -1) 16 +(61, 83, -1) 16 +(61, 84, -1) 15 +(61, 85, -1) 14 +(61, 86, -1) 13 +(61, 87, -1) 12 +(61, 88, -1) 11 +(61, 89, -1) 10 +(61, 90, -1) 9 +(61, 91, -1) 8 +(61, 92, -1) 7 +(61, 93, -1) 6 +(61, 94, -1) 5 +(61, 95, -1) 4 +(61, 96, -1) 3 +(61, 97, -1) 2 +(62, 4, -1) 2 +(62, 5, -1) 3 +(62, 6, -1) 4 +(62, 7, -1) 5 +(62, 8, -1) 6 +(62, 9, -1) 7 +(62, 10, -1) 8 +(62, 11, -1) 9 +(62, 12, -1) 9 +(62, 13, -1) 10 +(62, 14, -1) 11 +(62, 15, -1) 12 +(62, 16, -1) 13 +(62, 17, -1) 14 +(62, 18, -1) 15 +(62, 19, -1) 16 +(62, 20, -1) 17 +(62, 21, -1) 18 +(62, 22, -1) 19 +(62, 23, -1) 20 +(62, 24, -1) 21 +(62, 25, -1) 22 +(62, 26, -1) 23 +(62, 27, -1) 23 +(62, 28, -1) 24 +(62, 29, -1) 25 +(62, 30, -1) 26 +(62, 31, -1) 27 +(62, 32, -1) 28 +(62, 33, -1) 29 +(62, 34, -1) 29 +(62, 35, -1) 30 +(62, 36, -1) 31 +(62, 37, -1) 32 +(62, 38, -1) 33 +(62, 39, -1) 33 +(62, 40, -1) 34 +(62, 41, -1) 35 +(62, 42, -1) 35 +(62, 43, -1) 36 +(62, 44, -1) 36 +(62, 45, -1) 37 +(62, 46, -1) 37 +(62, 47, -1) 37 +(62, 48, -1) 38 +(62, 49, -1) 38 +(62, 50, -1) 38 +(62, 51, -1) 38 +(62, 52, -1) 38 +(62, 53, -1) 38 +(62, 54, -1) 37 +(62, 55, -1) 37 +(62, 56, -1) 37 +(62, 57, -1) 36 +(62, 58, -1) 36 +(62, 59, -1) 35 +(62, 60, -1) 35 +(62, 61, -1) 34 +(62, 62, -1) 33 +(62, 63, -1) 33 +(62, 64, -1) 32 +(62, 65, -1) 31 +(62, 66, -1) 30 +(62, 67, -1) 29 +(62, 68, -1) 29 +(62, 69, -1) 28 +(62, 70, -1) 27 +(62, 71, -1) 26 +(62, 72, -1) 25 +(62, 73, -1) 24 +(62, 74, -1) 23 +(62, 75, -1) 23 +(62, 76, -1) 22 +(62, 77, -1) 21 +(62, 78, -1) 20 +(62, 79, -1) 19 +(62, 80, -1) 18 +(62, 81, -1) 17 +(62, 82, -1) 16 +(62, 83, -1) 15 +(62, 84, -1) 14 +(62, 85, -1) 13 +(62, 86, -1) 12 +(62, 87, -1) 11 +(62, 88, -1) 10 +(62, 89, -1) 9 +(62, 90, -1) 9 +(62, 91, -1) 8 +(62, 92, -1) 7 +(62, 93, -1) 6 +(62, 94, -1) 5 +(62, 95, -1) 4 +(62, 96, -1) 3 +(62, 97, -1) 2 +(63, 4, -1) 2 +(63, 5, -1) 3 +(63, 6, -1) 3 +(63, 7, -1) 4 +(63, 8, -1) 5 +(63, 9, -1) 6 +(63, 10, -1) 7 +(63, 11, -1) 8 +(63, 12, -1) 9 +(63, 13, -1) 10 +(63, 14, -1) 11 +(63, 15, -1) 12 +(63, 16, -1) 13 +(63, 17, -1) 14 +(63, 18, -1) 15 +(63, 19, -1) 16 +(63, 20, -1) 17 +(63, 21, -1) 18 +(63, 22, -1) 18 +(63, 23, -1) 19 +(63, 24, -1) 20 +(63, 25, -1) 21 +(63, 26, -1) 22 +(63, 27, -1) 23 +(63, 28, -1) 24 +(63, 29, -1) 25 +(63, 30, -1) 26 +(63, 31, -1) 26 +(63, 32, -1) 27 +(63, 33, -1) 28 +(63, 34, -1) 29 +(63, 35, -1) 30 +(63, 36, -1) 30 +(63, 37, -1) 31 +(63, 38, -1) 32 +(63, 39, -1) 33 +(63, 40, -1) 33 +(63, 41, -1) 34 +(63, 42, -1) 34 +(63, 43, -1) 35 +(63, 44, -1) 35 +(63, 45, -1) 36 +(63, 46, -1) 36 +(63, 47, -1) 37 +(63, 48, -1) 37 +(63, 49, -1) 37 +(63, 50, -1) 37 +(63, 51, -1) 37 +(63, 52, -1) 37 +(63, 53, -1) 37 +(63, 54, -1) 37 +(63, 55, -1) 36 +(63, 56, -1) 36 +(63, 57, -1) 35 +(63, 58, -1) 35 +(63, 59, -1) 34 +(63, 60, -1) 34 +(63, 61, -1) 33 +(63, 62, -1) 33 +(63, 63, -1) 32 +(63, 64, -1) 31 +(63, 65, -1) 30 +(63, 66, -1) 30 +(63, 67, -1) 29 +(63, 68, -1) 28 +(63, 69, -1) 27 +(63, 70, -1) 26 +(63, 71, -1) 26 +(63, 72, -1) 25 +(63, 73, -1) 24 +(63, 74, -1) 23 +(63, 75, -1) 22 +(63, 76, -1) 21 +(63, 77, -1) 20 +(63, 78, -1) 19 +(63, 79, -1) 18 +(63, 80, -1) 18 +(63, 81, -1) 17 +(63, 82, -1) 16 +(63, 83, -1) 15 +(63, 84, -1) 14 +(63, 85, -1) 13 +(63, 86, -1) 12 +(63, 87, -1) 11 +(63, 88, -1) 10 +(63, 89, -1) 9 +(63, 90, -1) 8 +(63, 91, -1) 7 +(63, 92, -1) 6 +(63, 93, -1) 5 +(63, 94, -1) 4 +(63, 95, -1) 3 +(63, 96, -1) 3 +(63, 97, -1) 2 +(64, 4, -1) 1 +(64, 5, -1) 2 +(64, 6, -1) 3 +(64, 7, -1) 4 +(64, 8, -1) 5 +(64, 9, -1) 6 +(64, 10, -1) 7 +(64, 11, -1) 8 +(64, 12, -1) 9 +(64, 13, -1) 10 +(64, 14, -1) 11 +(64, 15, -1) 12 +(64, 16, -1) 13 +(64, 17, -1) 14 +(64, 18, -1) 14 +(64, 19, -1) 15 +(64, 20, -1) 16 +(64, 21, -1) 17 +(64, 22, -1) 18 +(64, 23, -1) 19 +(64, 24, -1) 20 +(64, 25, -1) 21 +(64, 26, -1) 22 +(64, 27, -1) 22 +(64, 28, -1) 23 +(64, 29, -1) 24 +(64, 30, -1) 25 +(64, 31, -1) 26 +(64, 32, -1) 27 +(64, 33, -1) 27 +(64, 34, -1) 28 +(64, 35, -1) 29 +(64, 36, -1) 30 +(64, 37, -1) 30 +(64, 38, -1) 31 +(64, 39, -1) 32 +(64, 40, -1) 32 +(64, 41, -1) 33 +(64, 42, -1) 34 +(64, 43, -1) 34 +(64, 44, -1) 35 +(64, 45, -1) 35 +(64, 46, -1) 35 +(64, 47, -1) 36 +(64, 48, -1) 36 +(64, 49, -1) 36 +(64, 50, -1) 36 +(64, 51, -1) 36 +(64, 52, -1) 36 +(64, 53, -1) 36 +(64, 54, -1) 36 +(64, 55, -1) 35 +(64, 56, -1) 35 +(64, 57, -1) 35 +(64, 58, -1) 34 +(64, 59, -1) 34 +(64, 60, -1) 33 +(64, 61, -1) 32 +(64, 62, -1) 32 +(64, 63, -1) 31 +(64, 64, -1) 30 +(64, 65, -1) 30 +(64, 66, -1) 29 +(64, 67, -1) 28 +(64, 68, -1) 27 +(64, 69, -1) 27 +(64, 70, -1) 26 +(64, 71, -1) 25 +(64, 72, -1) 24 +(64, 73, -1) 23 +(64, 74, -1) 22 +(64, 75, -1) 22 +(64, 76, -1) 21 +(64, 77, -1) 20 +(64, 78, -1) 19 +(64, 79, -1) 18 +(64, 80, -1) 17 +(64, 81, -1) 16 +(64, 82, -1) 15 +(64, 83, -1) 14 +(64, 84, -1) 14 +(64, 85, -1) 13 +(64, 86, -1) 12 +(64, 87, -1) 11 +(64, 88, -1) 10 +(64, 89, -1) 9 +(64, 90, -1) 8 +(64, 91, -1) 7 +(64, 92, -1) 6 +(64, 93, -1) 5 +(64, 94, -1) 4 +(64, 95, -1) 3 +(64, 96, -1) 2 +(64, 97, -1) 1 +(65, 4, -1) 1 +(65, 5, -1) 2 +(65, 6, -1) 3 +(65, 7, -1) 4 +(65, 8, -1) 5 +(65, 9, -1) 6 +(65, 10, -1) 7 +(65, 11, -1) 8 +(65, 12, -1) 8 +(65, 13, -1) 9 +(65, 14, -1) 10 +(65, 15, -1) 11 +(65, 16, -1) 12 +(65, 17, -1) 13 +(65, 18, -1) 14 +(65, 19, -1) 15 +(65, 20, -1) 16 +(65, 21, -1) 17 +(65, 22, -1) 18 +(65, 23, -1) 19 +(65, 24, -1) 19 +(65, 25, -1) 20 +(65, 26, -1) 21 +(65, 27, -1) 22 +(65, 28, -1) 23 +(65, 29, -1) 24 +(65, 30, -1) 24 +(65, 31, -1) 25 +(65, 32, -1) 26 +(65, 33, -1) 27 +(65, 34, -1) 28 +(65, 35, -1) 28 +(65, 36, -1) 29 +(65, 37, -1) 30 +(65, 38, -1) 30 +(65, 39, -1) 31 +(65, 40, -1) 32 +(65, 41, -1) 32 +(65, 42, -1) 33 +(65, 43, -1) 33 +(65, 44, -1) 34 +(65, 45, -1) 34 +(65, 46, -1) 34 +(65, 47, -1) 35 +(65, 48, -1) 35 +(65, 49, -1) 35 +(65, 50, -1) 35 +(65, 51, -1) 35 +(65, 52, -1) 35 +(65, 53, -1) 35 +(65, 54, -1) 35 +(65, 55, -1) 34 +(65, 56, -1) 34 +(65, 57, -1) 34 +(65, 58, -1) 33 +(65, 59, -1) 33 +(65, 60, -1) 32 +(65, 61, -1) 32 +(65, 62, -1) 31 +(65, 63, -1) 30 +(65, 64, -1) 30 +(65, 65, -1) 29 +(65, 66, -1) 28 +(65, 67, -1) 28 +(65, 68, -1) 27 +(65, 69, -1) 26 +(65, 70, -1) 25 +(65, 71, -1) 24 +(65, 72, -1) 24 +(65, 73, -1) 23 +(65, 74, -1) 22 +(65, 75, -1) 21 +(65, 76, -1) 20 +(65, 77, -1) 19 +(65, 78, -1) 19 +(65, 79, -1) 18 +(65, 80, -1) 17 +(65, 81, -1) 16 +(65, 82, -1) 15 +(65, 83, -1) 14 +(65, 84, -1) 13 +(65, 85, -1) 12 +(65, 86, -1) 11 +(65, 87, -1) 10 +(65, 88, -1) 9 +(65, 89, -1) 8 +(65, 90, -1) 8 +(65, 91, -1) 7 +(65, 92, -1) 6 +(65, 93, -1) 5 +(65, 94, -1) 4 +(65, 95, -1) 3 +(65, 96, -1) 2 +(65, 97, -1) 1 +(66, 6, -1) 3 +(66, 7, -1) 4 +(66, 8, -1) 5 +(66, 9, -1) 6 +(66, 10, -1) 6 +(66, 11, -1) 7 +(66, 12, -1) 8 +(66, 13, -1) 9 +(66, 14, -1) 10 +(66, 15, -1) 11 +(66, 16, -1) 12 +(66, 17, -1) 13 +(66, 18, -1) 14 +(66, 19, -1) 15 +(66, 20, -1) 16 +(66, 21, -1) 16 +(66, 22, -1) 17 +(66, 23, -1) 18 +(66, 24, -1) 19 +(66, 25, -1) 20 +(66, 26, -1) 21 +(66, 27, -1) 21 +(66, 28, -1) 22 +(66, 29, -1) 23 +(66, 30, -1) 24 +(66, 31, -1) 25 +(66, 32, -1) 25 +(66, 33, -1) 26 +(66, 34, -1) 27 +(66, 35, -1) 28 +(66, 36, -1) 28 +(66, 37, -1) 29 +(66, 38, -1) 30 +(66, 39, -1) 30 +(66, 40, -1) 31 +(66, 41, -1) 31 +(66, 42, -1) 32 +(66, 43, -1) 32 +(66, 44, -1) 33 +(66, 45, -1) 33 +(66, 46, -1) 33 +(66, 47, -1) 34 +(66, 48, -1) 34 +(66, 49, -1) 34 +(66, 50, -1) 34 +(66, 51, -1) 34 +(66, 52, -1) 34 +(66, 53, -1) 34 +(66, 54, -1) 34 +(66, 55, -1) 33 +(66, 56, -1) 33 +(66, 57, -1) 33 +(66, 58, -1) 32 +(66, 59, -1) 32 +(66, 60, -1) 31 +(66, 61, -1) 31 +(66, 62, -1) 30 +(66, 63, -1) 30 +(66, 64, -1) 29 +(66, 65, -1) 28 +(66, 66, -1) 28 +(66, 67, -1) 27 +(66, 68, -1) 26 +(66, 69, -1) 25 +(66, 70, -1) 25 +(66, 71, -1) 24 +(66, 72, -1) 23 +(66, 73, -1) 22 +(66, 74, -1) 21 +(66, 75, -1) 21 +(66, 76, -1) 20 +(66, 77, -1) 19 +(66, 78, -1) 18 +(66, 79, -1) 17 +(66, 80, -1) 16 +(66, 81, -1) 16 +(66, 82, -1) 15 +(66, 83, -1) 14 +(66, 84, -1) 13 +(66, 85, -1) 12 +(66, 86, -1) 11 +(66, 87, -1) 10 +(66, 88, -1) 9 +(66, 89, -1) 8 +(66, 90, -1) 7 +(66, 91, -1) 6 +(66, 92, -1) 6 +(66, 93, -1) 5 +(66, 94, -1) 4 +(66, 95, -1) 3 +(67, 6, -1) 2 +(67, 7, -1) 3 +(67, 8, -1) 4 +(67, 9, -1) 5 +(67, 10, -1) 6 +(67, 11, -1) 7 +(67, 12, -1) 8 +(67, 13, -1) 9 +(67, 14, -1) 10 +(67, 15, -1) 11 +(67, 16, -1) 11 +(67, 17, -1) 12 +(67, 18, -1) 13 +(67, 19, -1) 14 +(67, 20, -1) 15 +(67, 21, -1) 16 +(67, 22, -1) 17 +(67, 23, -1) 18 +(67, 24, -1) 18 +(67, 25, -1) 19 +(67, 26, -1) 20 +(67, 27, -1) 21 +(67, 28, -1) 22 +(67, 29, -1) 23 +(67, 30, -1) 23 +(67, 31, -1) 24 +(67, 32, -1) 25 +(67, 33, -1) 26 +(67, 34, -1) 26 +(67, 35, -1) 27 +(67, 36, -1) 28 +(67, 37, -1) 28 +(67, 38, -1) 29 +(67, 39, -1) 29 +(67, 40, -1) 30 +(67, 41, -1) 30 +(67, 42, -1) 31 +(67, 43, -1) 31 +(67, 44, -1) 32 +(67, 45, -1) 32 +(67, 46, -1) 32 +(67, 47, -1) 33 +(67, 48, -1) 33 +(67, 49, -1) 33 +(67, 50, -1) 33 +(67, 51, -1) 33 +(67, 52, -1) 33 +(67, 53, -1) 33 +(67, 54, -1) 33 +(67, 55, -1) 32 +(67, 56, -1) 32 +(67, 57, -1) 32 +(67, 58, -1) 31 +(67, 59, -1) 31 +(67, 60, -1) 30 +(67, 61, -1) 30 +(67, 62, -1) 29 +(67, 63, -1) 29 +(67, 64, -1) 28 +(67, 65, -1) 28 +(67, 66, -1) 27 +(67, 67, -1) 26 +(67, 68, -1) 26 +(67, 69, -1) 25 +(67, 70, -1) 24 +(67, 71, -1) 23 +(67, 72, -1) 23 +(67, 73, -1) 22 +(67, 74, -1) 21 +(67, 75, -1) 20 +(67, 76, -1) 19 +(67, 77, -1) 18 +(67, 78, -1) 18 +(67, 79, -1) 17 +(67, 80, -1) 16 +(67, 81, -1) 15 +(67, 82, -1) 14 +(67, 83, -1) 13 +(67, 84, -1) 12 +(67, 85, -1) 11 +(67, 86, -1) 11 +(67, 87, -1) 10 +(67, 88, -1) 9 +(67, 89, -1) 8 +(67, 90, -1) 7 +(67, 91, -1) 6 +(67, 92, -1) 5 +(67, 93, -1) 4 +(67, 94, -1) 3 +(67, 95, -1) 2 +(68, 6, -1) 2 +(68, 7, -1) 3 +(68, 8, -1) 4 +(68, 9, -1) 5 +(68, 10, -1) 6 +(68, 11, -1) 7 +(68, 12, -1) 7 +(68, 13, -1) 8 +(68, 14, -1) 9 +(68, 15, -1) 10 +(68, 16, -1) 11 +(68, 17, -1) 12 +(68, 18, -1) 13 +(68, 19, -1) 14 +(68, 20, -1) 15 +(68, 21, -1) 15 +(68, 22, -1) 16 +(68, 23, -1) 17 +(68, 24, -1) 18 +(68, 25, -1) 19 +(68, 26, -1) 20 +(68, 27, -1) 20 +(68, 28, -1) 21 +(68, 29, -1) 22 +(68, 30, -1) 23 +(68, 31, -1) 23 +(68, 32, -1) 24 +(68, 33, -1) 25 +(68, 34, -1) 26 +(68, 35, -1) 26 +(68, 36, -1) 27 +(68, 37, -1) 27 +(68, 38, -1) 28 +(68, 39, -1) 29 +(68, 40, -1) 29 +(68, 41, -1) 30 +(68, 42, -1) 30 +(68, 43, -1) 30 +(68, 44, -1) 31 +(68, 45, -1) 31 +(68, 46, -1) 31 +(68, 47, -1) 32 +(68, 48, -1) 32 +(68, 49, -1) 32 +(68, 50, -1) 32 +(68, 51, -1) 32 +(68, 52, -1) 32 +(68, 53, -1) 32 +(68, 54, -1) 32 +(68, 55, -1) 31 +(68, 56, -1) 31 +(68, 57, -1) 31 +(68, 58, -1) 30 +(68, 59, -1) 30 +(68, 60, -1) 30 +(68, 61, -1) 29 +(68, 62, -1) 29 +(68, 63, -1) 28 +(68, 64, -1) 27 +(68, 65, -1) 27 +(68, 66, -1) 26 +(68, 67, -1) 26 +(68, 68, -1) 25 +(68, 69, -1) 24 +(68, 70, -1) 23 +(68, 71, -1) 23 +(68, 72, -1) 22 +(68, 73, -1) 21 +(68, 74, -1) 20 +(68, 75, -1) 20 +(68, 76, -1) 19 +(68, 77, -1) 18 +(68, 78, -1) 17 +(68, 79, -1) 16 +(68, 80, -1) 15 +(68, 81, -1) 15 +(68, 82, -1) 14 +(68, 83, -1) 13 +(68, 84, -1) 12 +(68, 85, -1) 11 +(68, 86, -1) 10 +(68, 87, -1) 9 +(68, 88, -1) 8 +(68, 89, -1) 7 +(68, 90, -1) 7 +(68, 91, -1) 6 +(68, 92, -1) 5 +(68, 93, -1) 4 +(68, 94, -1) 3 +(68, 95, -1) 2 +(69, 6, -1) 2 +(69, 7, -1) 2 +(69, 8, -1) 3 +(69, 9, -1) 4 +(69, 10, -1) 5 +(69, 11, -1) 6 +(69, 12, -1) 7 +(69, 13, -1) 8 +(69, 14, -1) 9 +(69, 15, -1) 10 +(69, 16, -1) 11 +(69, 17, -1) 11 +(69, 18, -1) 12 +(69, 19, -1) 13 +(69, 20, -1) 14 +(69, 21, -1) 15 +(69, 22, -1) 16 +(69, 23, -1) 17 +(69, 24, -1) 17 +(69, 25, -1) 18 +(69, 26, -1) 19 +(69, 27, -1) 20 +(69, 28, -1) 20 +(69, 29, -1) 21 +(69, 30, -1) 22 +(69, 31, -1) 23 +(69, 32, -1) 23 +(69, 33, -1) 24 +(69, 34, -1) 25 +(69, 35, -1) 25 +(69, 36, -1) 26 +(69, 37, -1) 27 +(69, 38, -1) 27 +(69, 39, -1) 28 +(69, 40, -1) 28 +(69, 41, -1) 29 +(69, 42, -1) 29 +(69, 43, -1) 30 +(69, 44, -1) 30 +(69, 45, -1) 30 +(69, 46, -1) 30 +(69, 47, -1) 31 +(69, 48, -1) 31 +(69, 49, -1) 31 +(69, 50, -1) 31 +(69, 51, -1) 31 +(69, 52, -1) 31 +(69, 53, -1) 31 +(69, 54, -1) 31 +(69, 55, -1) 30 +(69, 56, -1) 30 +(69, 57, -1) 30 +(69, 58, -1) 30 +(69, 59, -1) 29 +(69, 60, -1) 29 +(69, 61, -1) 28 +(69, 62, -1) 28 +(69, 63, -1) 27 +(69, 64, -1) 27 +(69, 65, -1) 26 +(69, 66, -1) 25 +(69, 67, -1) 25 +(69, 68, -1) 24 +(69, 69, -1) 23 +(69, 70, -1) 23 +(69, 71, -1) 22 +(69, 72, -1) 21 +(69, 73, -1) 20 +(69, 74, -1) 20 +(69, 75, -1) 19 +(69, 76, -1) 18 +(69, 77, -1) 17 +(69, 78, -1) 17 +(69, 79, -1) 16 +(69, 80, -1) 15 +(69, 81, -1) 14 +(69, 82, -1) 13 +(69, 83, -1) 12 +(69, 84, -1) 11 +(69, 85, -1) 11 +(69, 86, -1) 10 +(69, 87, -1) 9 +(69, 88, -1) 8 +(69, 89, -1) 7 +(69, 90, -1) 6 +(69, 91, -1) 5 +(69, 92, -1) 4 +(69, 93, -1) 3 +(69, 94, -1) 2 +(69, 95, -1) 2 +(70, 6, -1) 1 +(70, 7, -1) 2 +(70, 8, -1) 3 +(70, 9, -1) 4 +(70, 10, -1) 5 +(70, 11, -1) 6 +(70, 12, -1) 7 +(70, 13, -1) 7 +(70, 14, -1) 8 +(70, 15, -1) 9 +(70, 16, -1) 10 +(70, 17, -1) 11 +(70, 18, -1) 12 +(70, 19, -1) 13 +(70, 20, -1) 13 +(70, 21, -1) 14 +(70, 22, -1) 15 +(70, 23, -1) 16 +(70, 24, -1) 17 +(70, 25, -1) 18 +(70, 26, -1) 18 +(70, 27, -1) 19 +(70, 28, -1) 20 +(70, 29, -1) 21 +(70, 30, -1) 21 +(70, 31, -1) 22 +(70, 32, -1) 23 +(70, 33, -1) 23 +(70, 34, -1) 24 +(70, 35, -1) 25 +(70, 36, -1) 25 +(70, 37, -1) 26 +(70, 38, -1) 26 +(70, 39, -1) 27 +(70, 40, -1) 27 +(70, 41, -1) 28 +(70, 42, -1) 28 +(70, 43, -1) 29 +(70, 44, -1) 29 +(70, 45, -1) 29 +(70, 46, -1) 30 +(70, 47, -1) 30 +(70, 48, -1) 30 +(70, 49, -1) 30 +(70, 50, -1) 30 +(70, 51, -1) 30 +(70, 52, -1) 30 +(70, 53, -1) 30 +(70, 54, -1) 30 +(70, 55, -1) 30 +(70, 56, -1) 29 +(70, 57, -1) 29 +(70, 58, -1) 29 +(70, 59, -1) 28 +(70, 60, -1) 28 +(70, 61, -1) 27 +(70, 62, -1) 27 +(70, 63, -1) 26 +(70, 64, -1) 26 +(70, 65, -1) 25 +(70, 66, -1) 25 +(70, 67, -1) 24 +(70, 68, -1) 23 +(70, 69, -1) 23 +(70, 70, -1) 22 +(70, 71, -1) 21 +(70, 72, -1) 21 +(70, 73, -1) 20 +(70, 74, -1) 19 +(70, 75, -1) 18 +(70, 76, -1) 18 +(70, 77, -1) 17 +(70, 78, -1) 16 +(70, 79, -1) 15 +(70, 80, -1) 14 +(70, 81, -1) 13 +(70, 82, -1) 13 +(70, 83, -1) 12 +(70, 84, -1) 11 +(70, 85, -1) 10 +(70, 86, -1) 9 +(70, 87, -1) 8 +(70, 88, -1) 7 +(70, 89, -1) 7 +(70, 90, -1) 6 +(70, 91, -1) 5 +(70, 92, -1) 4 +(70, 93, -1) 3 +(70, 94, -1) 2 +(70, 95, -1) 1 +(71, 6, -1) 1 +(71, 7, -1) 2 +(71, 8, -1) 3 +(71, 9, -1) 4 +(71, 10, -1) 5 +(71, 11, -1) 5 +(71, 12, -1) 6 +(71, 13, -1) 7 +(71, 14, -1) 8 +(71, 15, -1) 9 +(71, 16, -1) 10 +(71, 17, -1) 11 +(71, 18, -1) 11 +(71, 19, -1) 12 +(71, 20, -1) 13 +(71, 21, -1) 14 +(71, 22, -1) 15 +(71, 23, -1) 15 +(71, 24, -1) 16 +(71, 25, -1) 17 +(71, 26, -1) 18 +(71, 27, -1) 19 +(71, 28, -1) 19 +(71, 29, -1) 20 +(71, 30, -1) 21 +(71, 31, -1) 21 +(71, 32, -1) 22 +(71, 33, -1) 23 +(71, 34, -1) 23 +(71, 35, -1) 24 +(71, 36, -1) 24 +(71, 37, -1) 25 +(71, 38, -1) 26 +(71, 39, -1) 26 +(71, 40, -1) 27 +(71, 41, -1) 27 +(71, 42, -1) 27 +(71, 43, -1) 28 +(71, 44, -1) 28 +(71, 45, -1) 28 +(71, 46, -1) 29 +(71, 47, -1) 29 +(71, 48, -1) 29 +(71, 49, -1) 29 +(71, 50, -1) 29 +(71, 51, -1) 29 +(71, 52, -1) 29 +(71, 53, -1) 29 +(71, 54, -1) 29 +(71, 55, -1) 29 +(71, 56, -1) 28 +(71, 57, -1) 28 +(71, 58, -1) 28 +(71, 59, -1) 27 +(71, 60, -1) 27 +(71, 61, -1) 27 +(71, 62, -1) 26 +(71, 63, -1) 26 +(71, 64, -1) 25 +(71, 65, -1) 24 +(71, 66, -1) 24 +(71, 67, -1) 23 +(71, 68, -1) 23 +(71, 69, -1) 22 +(71, 70, -1) 21 +(71, 71, -1) 21 +(71, 72, -1) 20 +(71, 73, -1) 19 +(71, 74, -1) 19 +(71, 75, -1) 18 +(71, 76, -1) 17 +(71, 77, -1) 16 +(71, 78, -1) 15 +(71, 79, -1) 15 +(71, 80, -1) 14 +(71, 81, -1) 13 +(71, 82, -1) 12 +(71, 83, -1) 11 +(71, 84, -1) 11 +(71, 85, -1) 10 +(71, 86, -1) 9 +(71, 87, -1) 8 +(71, 88, -1) 7 +(71, 89, -1) 6 +(71, 90, -1) 5 +(71, 91, -1) 5 +(71, 92, -1) 4 +(71, 93, -1) 3 +(71, 94, -1) 2 +(71, 95, -1) 1 +(72, 6, -1) 1 +(72, 7, -1) 1 +(72, 8, -1) 2 +(72, 9, -1) 3 +(72, 10, -1) 4 +(72, 11, -1) 5 +(72, 12, -1) 6 +(72, 13, -1) 7 +(72, 14, -1) 7 +(72, 15, -1) 8 +(72, 16, -1) 9 +(72, 17, -1) 10 +(72, 18, -1) 11 +(72, 19, -1) 12 +(72, 20, -1) 12 +(72, 21, -1) 13 +(72, 22, -1) 14 +(72, 23, -1) 15 +(72, 24, -1) 16 +(72, 25, -1) 16 +(72, 26, -1) 17 +(72, 27, -1) 18 +(72, 28, -1) 19 +(72, 29, -1) 19 +(72, 30, -1) 20 +(72, 31, -1) 21 +(72, 32, -1) 21 +(72, 33, -1) 22 +(72, 34, -1) 23 +(72, 35, -1) 23 +(72, 36, -1) 24 +(72, 37, -1) 24 +(72, 38, -1) 25 +(72, 39, -1) 25 +(72, 40, -1) 26 +(72, 41, -1) 26 +(72, 42, -1) 26 +(72, 43, -1) 27 +(72, 44, -1) 27 +(72, 45, -1) 27 +(72, 46, -1) 28 +(72, 47, -1) 28 +(72, 48, -1) 28 +(72, 49, -1) 28 +(72, 50, -1) 28 +(72, 51, -1) 28 +(72, 52, -1) 28 +(72, 53, -1) 28 +(72, 54, -1) 28 +(72, 55, -1) 28 +(72, 56, -1) 27 +(72, 57, -1) 27 +(72, 58, -1) 27 +(72, 59, -1) 26 +(72, 60, -1) 26 +(72, 61, -1) 26 +(72, 62, -1) 25 +(72, 63, -1) 25 +(72, 64, -1) 24 +(72, 65, -1) 24 +(72, 66, -1) 23 +(72, 67, -1) 23 +(72, 68, -1) 22 +(72, 69, -1) 21 +(72, 70, -1) 21 +(72, 71, -1) 20 +(72, 72, -1) 19 +(72, 73, -1) 19 +(72, 74, -1) 18 +(72, 75, -1) 17 +(72, 76, -1) 16 +(72, 77, -1) 16 +(72, 78, -1) 15 +(72, 79, -1) 14 +(72, 80, -1) 13 +(72, 81, -1) 12 +(72, 82, -1) 12 +(72, 83, -1) 11 +(72, 84, -1) 10 +(72, 85, -1) 9 +(72, 86, -1) 8 +(72, 87, -1) 7 +(72, 88, -1) 7 +(72, 89, -1) 6 +(72, 90, -1) 5 +(72, 91, -1) 4 +(72, 92, -1) 3 +(72, 93, -1) 2 +(72, 94, -1) 1 +(72, 95, -1) 1 +(73, 6, -1) 0 +(73, 7, -1) 1 +(73, 8, -1) 2 +(73, 9, -1) 3 +(73, 10, -1) 4 +(73, 11, -1) 4 +(73, 12, -1) 5 +(73, 13, -1) 6 +(73, 14, -1) 7 +(73, 15, -1) 8 +(73, 16, -1) 9 +(73, 17, -1) 9 +(73, 18, -1) 10 +(73, 19, -1) 11 +(73, 20, -1) 12 +(73, 21, -1) 13 +(73, 22, -1) 13 +(73, 23, -1) 14 +(73, 24, -1) 15 +(73, 25, -1) 16 +(73, 26, -1) 16 +(73, 27, -1) 17 +(73, 28, -1) 18 +(73, 29, -1) 19 +(73, 30, -1) 19 +(73, 31, -1) 20 +(73, 32, -1) 20 +(73, 33, -1) 21 +(73, 34, -1) 22 +(73, 35, -1) 22 +(73, 36, -1) 23 +(73, 37, -1) 23 +(73, 38, -1) 24 +(73, 39, -1) 24 +(73, 40, -1) 25 +(73, 41, -1) 25 +(73, 42, -1) 25 +(73, 43, -1) 26 +(73, 44, -1) 26 +(73, 45, -1) 26 +(73, 46, -1) 27 +(73, 47, -1) 27 +(73, 48, -1) 27 +(73, 49, -1) 27 +(73, 50, -1) 27 +(73, 51, -1) 27 +(73, 52, -1) 27 +(73, 53, -1) 27 +(73, 54, -1) 27 +(73, 55, -1) 27 +(73, 56, -1) 26 +(73, 57, -1) 26 +(73, 58, -1) 26 +(73, 59, -1) 25 +(73, 60, -1) 25 +(73, 61, -1) 25 +(73, 62, -1) 24 +(73, 63, -1) 24 +(73, 64, -1) 23 +(73, 65, -1) 23 +(73, 66, -1) 22 +(73, 67, -1) 22 +(73, 68, -1) 21 +(73, 69, -1) 20 +(73, 70, -1) 20 +(73, 71, -1) 19 +(73, 72, -1) 19 +(73, 73, -1) 18 +(73, 74, -1) 17 +(73, 75, -1) 16 +(73, 76, -1) 16 +(73, 77, -1) 15 +(73, 78, -1) 14 +(73, 79, -1) 13 +(73, 80, -1) 13 +(73, 81, -1) 12 +(73, 82, -1) 11 +(73, 83, -1) 10 +(73, 84, -1) 9 +(73, 85, -1) 9 +(73, 86, -1) 8 +(73, 87, -1) 7 +(73, 88, -1) 6 +(73, 89, -1) 5 +(73, 90, -1) 4 +(73, 91, -1) 4 +(73, 92, -1) 3 +(73, 93, -1) 2 +(73, 94, -1) 1 +(73, 95, -1) 0 +(74, 6, -1) 0 +(74, 7, -1) 0 +(74, 8, -1) 1 +(74, 9, -1) 2 +(74, 10, -1) 3 +(74, 11, -1) 4 +(74, 12, -1) 5 +(74, 13, -1) 6 +(74, 14, -1) 6 +(74, 15, -1) 7 +(74, 16, -1) 8 +(74, 17, -1) 9 +(74, 18, -1) 10 +(74, 19, -1) 10 +(74, 20, -1) 11 +(74, 21, -1) 12 +(74, 22, -1) 13 +(74, 23, -1) 14 +(74, 24, -1) 14 +(74, 25, -1) 15 +(74, 26, -1) 16 +(74, 27, -1) 16 +(74, 28, -1) 17 +(74, 29, -1) 18 +(74, 30, -1) 18 +(74, 31, -1) 19 +(74, 32, -1) 20 +(74, 33, -1) 20 +(74, 34, -1) 21 +(74, 35, -1) 21 +(74, 36, -1) 22 +(74, 37, -1) 22 +(74, 38, -1) 23 +(74, 39, -1) 23 +(74, 40, -1) 24 +(74, 41, -1) 24 +(74, 42, -1) 25 +(74, 43, -1) 25 +(74, 44, -1) 25 +(74, 45, -1) 25 +(74, 46, -1) 26 +(74, 47, -1) 26 +(74, 48, -1) 26 +(74, 49, -1) 26 +(74, 50, -1) 26 +(74, 51, -1) 26 +(74, 52, -1) 26 +(74, 53, -1) 26 +(74, 54, -1) 26 +(74, 55, -1) 26 +(74, 56, -1) 25 +(74, 57, -1) 25 +(74, 58, -1) 25 +(74, 59, -1) 25 +(74, 60, -1) 24 +(74, 61, -1) 24 +(74, 62, -1) 23 +(74, 63, -1) 23 +(74, 64, -1) 22 +(74, 65, -1) 22 +(74, 66, -1) 21 +(74, 67, -1) 21 +(74, 68, -1) 20 +(74, 69, -1) 20 +(74, 70, -1) 19 +(74, 71, -1) 18 +(74, 72, -1) 18 +(74, 73, -1) 17 +(74, 74, -1) 16 +(74, 75, -1) 16 +(74, 76, -1) 15 +(74, 77, -1) 14 +(74, 78, -1) 14 +(74, 79, -1) 13 +(74, 80, -1) 12 +(74, 81, -1) 11 +(74, 82, -1) 10 +(74, 83, -1) 10 +(74, 84, -1) 9 +(74, 85, -1) 8 +(74, 86, -1) 7 +(74, 87, -1) 6 +(74, 88, -1) 6 +(74, 89, -1) 5 +(74, 90, -1) 4 +(74, 91, -1) 3 +(74, 92, -1) 2 +(74, 93, -1) 1 +(74, 94, -1) 0 +(74, 95, -1) 0 +(75, 6, -1) 0 +(75, 7, -1) 0 +(75, 8, -1) 1 +(75, 9, -1) 2 +(75, 10, -1) 3 +(75, 11, -1) 3 +(75, 12, -1) 4 +(75, 13, -1) 5 +(75, 14, -1) 6 +(75, 15, -1) 7 +(75, 16, -1) 7 +(75, 17, -1) 8 +(75, 18, -1) 9 +(75, 19, -1) 10 +(75, 20, -1) 11 +(75, 21, -1) 11 +(75, 22, -1) 12 +(75, 23, -1) 13 +(75, 24, -1) 14 +(75, 25, -1) 14 +(75, 26, -1) 15 +(75, 27, -1) 16 +(75, 28, -1) 16 +(75, 29, -1) 17 +(75, 30, -1) 18 +(75, 31, -1) 18 +(75, 32, -1) 19 +(75, 33, -1) 19 +(75, 34, -1) 20 +(75, 35, -1) 21 +(75, 36, -1) 21 +(75, 37, -1) 22 +(75, 38, -1) 22 +(75, 39, -1) 22 +(75, 40, -1) 23 +(75, 41, -1) 23 +(75, 42, -1) 24 +(75, 43, -1) 24 +(75, 44, -1) 24 +(75, 45, -1) 24 +(75, 46, -1) 25 +(75, 47, -1) 25 +(75, 48, -1) 25 +(75, 49, -1) 25 +(75, 50, -1) 25 +(75, 51, -1) 25 +(75, 52, -1) 25 +(75, 53, -1) 25 +(75, 54, -1) 25 +(75, 55, -1) 25 +(75, 56, -1) 24 +(75, 57, -1) 24 +(75, 58, -1) 24 +(75, 59, -1) 24 +(75, 60, -1) 23 +(75, 61, -1) 23 +(75, 62, -1) 22 +(75, 63, -1) 22 +(75, 64, -1) 22 +(75, 65, -1) 21 +(75, 66, -1) 21 +(75, 67, -1) 20 +(75, 68, -1) 19 +(75, 69, -1) 19 +(75, 70, -1) 18 +(75, 71, -1) 18 +(75, 72, -1) 17 +(75, 73, -1) 16 +(75, 74, -1) 16 +(75, 75, -1) 15 +(75, 76, -1) 14 +(75, 77, -1) 14 +(75, 78, -1) 13 +(75, 79, -1) 12 +(75, 80, -1) 11 +(75, 81, -1) 11 +(75, 82, -1) 10 +(75, 83, -1) 9 +(75, 84, -1) 8 +(75, 85, -1) 7 +(75, 86, -1) 7 +(75, 87, -1) 6 +(75, 88, -1) 5 +(75, 89, -1) 4 +(75, 90, -1) 3 +(75, 91, -1) 3 +(75, 92, -1) 2 +(75, 93, -1) 1 +(75, 94, -1) 0 +(75, 95, -1) 0 +(76, 9, -1) 1 +(76, 10, -1) 2 +(76, 11, -1) 3 +(76, 12, -1) 4 +(76, 13, -1) 5 +(76, 14, -1) 5 +(76, 15, -1) 6 +(76, 16, -1) 7 +(76, 17, -1) 8 +(76, 18, -1) 9 +(76, 19, -1) 9 +(76, 20, -1) 10 +(76, 21, -1) 11 +(76, 22, -1) 12 +(76, 23, -1) 12 +(76, 24, -1) 13 +(76, 25, -1) 14 +(76, 26, -1) 14 +(76, 27, -1) 15 +(76, 28, -1) 16 +(76, 29, -1) 16 +(76, 30, -1) 17 +(76, 31, -1) 18 +(76, 32, -1) 18 +(76, 33, -1) 19 +(76, 34, -1) 19 +(76, 35, -1) 20 +(76, 36, -1) 20 +(76, 37, -1) 21 +(76, 38, -1) 21 +(76, 39, -1) 22 +(76, 40, -1) 22 +(76, 41, -1) 22 +(76, 42, -1) 23 +(76, 43, -1) 23 +(76, 44, -1) 23 +(76, 45, -1) 23 +(76, 46, -1) 24 +(76, 47, -1) 24 +(76, 48, -1) 24 +(76, 49, -1) 24 +(76, 50, -1) 24 +(76, 51, -1) 24 +(76, 52, -1) 24 +(76, 53, -1) 24 +(76, 54, -1) 24 +(76, 55, -1) 24 +(76, 56, -1) 23 +(76, 57, -1) 23 +(76, 58, -1) 23 +(76, 59, -1) 23 +(76, 60, -1) 22 +(76, 61, -1) 22 +(76, 62, -1) 22 +(76, 63, -1) 21 +(76, 64, -1) 21 +(76, 65, -1) 20 +(76, 66, -1) 20 +(76, 67, -1) 19 +(76, 68, -1) 19 +(76, 69, -1) 18 +(76, 70, -1) 18 +(76, 71, -1) 17 +(76, 72, -1) 16 +(76, 73, -1) 16 +(76, 74, -1) 15 +(76, 75, -1) 14 +(76, 76, -1) 14 +(76, 77, -1) 13 +(76, 78, -1) 12 +(76, 79, -1) 12 +(76, 80, -1) 11 +(76, 81, -1) 10 +(76, 82, -1) 9 +(76, 83, -1) 9 +(76, 84, -1) 8 +(76, 85, -1) 7 +(76, 86, -1) 6 +(76, 87, -1) 5 +(76, 88, -1) 5 +(76, 89, -1) 4 +(76, 90, -1) 3 +(76, 91, -1) 2 +(76, 92, -1) 1 +(77, 9, -1) 1 +(77, 10, -1) 2 +(77, 11, -1) 2 +(77, 12, -1) 3 +(77, 13, -1) 4 +(77, 14, -1) 5 +(77, 15, -1) 6 +(77, 16, -1) 6 +(77, 17, -1) 7 +(77, 18, -1) 8 +(77, 19, -1) 9 +(77, 20, -1) 9 +(77, 21, -1) 10 +(77, 22, -1) 11 +(77, 23, -1) 12 +(77, 24, -1) 12 +(77, 25, -1) 13 +(77, 26, -1) 14 +(77, 27, -1) 14 +(77, 28, -1) 15 +(77, 29, -1) 16 +(77, 30, -1) 16 +(77, 31, -1) 17 +(77, 32, -1) 17 +(77, 33, -1) 18 +(77, 34, -1) 18 +(77, 35, -1) 19 +(77, 36, -1) 19 +(77, 37, -1) 20 +(77, 38, -1) 20 +(77, 39, -1) 21 +(77, 40, -1) 21 +(77, 41, -1) 21 +(77, 42, -1) 22 +(77, 43, -1) 22 +(77, 44, -1) 22 +(77, 45, -1) 22 +(77, 46, -1) 23 +(77, 47, -1) 23 +(77, 48, -1) 23 +(77, 49, -1) 23 +(77, 50, -1) 23 +(77, 51, -1) 23 +(77, 52, -1) 23 +(77, 53, -1) 23 +(77, 54, -1) 23 +(77, 55, -1) 23 +(77, 56, -1) 22 +(77, 57, -1) 22 +(77, 58, -1) 22 +(77, 59, -1) 22 +(77, 60, -1) 21 +(77, 61, -1) 21 +(77, 62, -1) 21 +(77, 63, -1) 20 +(77, 64, -1) 20 +(77, 65, -1) 19 +(77, 66, -1) 19 +(77, 67, -1) 18 +(77, 68, -1) 18 +(77, 69, -1) 17 +(77, 70, -1) 17 +(77, 71, -1) 16 +(77, 72, -1) 16 +(77, 73, -1) 15 +(77, 74, -1) 14 +(77, 75, -1) 14 +(77, 76, -1) 13 +(77, 77, -1) 12 +(77, 78, -1) 12 +(77, 79, -1) 11 +(77, 80, -1) 10 +(77, 81, -1) 9 +(77, 82, -1) 9 +(77, 83, -1) 8 +(77, 84, -1) 7 +(77, 85, -1) 6 +(77, 86, -1) 6 +(77, 87, -1) 5 +(77, 88, -1) 4 +(77, 89, -1) 3 +(77, 90, -1) 2 +(77, 91, -1) 2 +(77, 92, -1) 1 +(78, 9, -1) 0 +(78, 10, -1) 1 +(78, 11, -1) 2 +(78, 12, -1) 3 +(78, 13, -1) 3 +(78, 14, -1) 4 +(78, 15, -1) 5 +(78, 16, -1) 6 +(78, 17, -1) 7 +(78, 18, -1) 7 +(78, 19, -1) 8 +(78, 20, -1) 9 +(78, 21, -1) 9 +(78, 22, -1) 10 +(78, 23, -1) 11 +(78, 24, -1) 12 +(78, 25, -1) 12 +(78, 26, -1) 13 +(78, 27, -1) 14 +(78, 28, -1) 14 +(78, 29, -1) 15 +(78, 30, -1) 15 +(78, 31, -1) 16 +(78, 32, -1) 17 +(78, 33, -1) 17 +(78, 34, -1) 18 +(78, 35, -1) 18 +(78, 36, -1) 19 +(78, 37, -1) 19 +(78, 38, -1) 19 +(78, 39, -1) 20 +(78, 40, -1) 20 +(78, 41, -1) 20 +(78, 42, -1) 21 +(78, 43, -1) 21 +(78, 44, -1) 21 +(78, 45, -1) 21 +(78, 46, -1) 22 +(78, 47, -1) 22 +(78, 48, -1) 22 +(78, 49, -1) 22 +(78, 50, -1) 22 +(78, 51, -1) 22 +(78, 52, -1) 22 +(78, 53, -1) 22 +(78, 54, -1) 22 +(78, 55, -1) 22 +(78, 56, -1) 21 +(78, 57, -1) 21 +(78, 58, -1) 21 +(78, 59, -1) 21 +(78, 60, -1) 20 +(78, 61, -1) 20 +(78, 62, -1) 20 +(78, 63, -1) 19 +(78, 64, -1) 19 +(78, 65, -1) 19 +(78, 66, -1) 18 +(78, 67, -1) 18 +(78, 68, -1) 17 +(78, 69, -1) 17 +(78, 70, -1) 16 +(78, 71, -1) 15 +(78, 72, -1) 15 +(78, 73, -1) 14 +(78, 74, -1) 14 +(78, 75, -1) 13 +(78, 76, -1) 12 +(78, 77, -1) 12 +(78, 78, -1) 11 +(78, 79, -1) 10 +(78, 80, -1) 9 +(78, 81, -1) 9 +(78, 82, -1) 8 +(78, 83, -1) 7 +(78, 84, -1) 7 +(78, 85, -1) 6 +(78, 86, -1) 5 +(78, 87, -1) 4 +(78, 88, -1) 3 +(78, 89, -1) 3 +(78, 90, -1) 2 +(78, 91, -1) 1 +(78, 92, -1) 0 +(79, 9, -1) 0 +(79, 10, -1) 1 +(79, 11, -1) 1 +(79, 12, -1) 2 +(79, 13, -1) 3 +(79, 14, -1) 4 +(79, 15, -1) 4 +(79, 16, -1) 5 +(79, 17, -1) 6 +(79, 18, -1) 7 +(79, 19, -1) 7 +(79, 20, -1) 8 +(79, 21, -1) 9 +(79, 22, -1) 9 +(79, 23, -1) 10 +(79, 24, -1) 11 +(79, 25, -1) 12 +(79, 26, -1) 12 +(79, 27, -1) 13 +(79, 28, -1) 13 +(79, 29, -1) 14 +(79, 30, -1) 15 +(79, 31, -1) 15 +(79, 32, -1) 16 +(79, 33, -1) 16 +(79, 34, -1) 17 +(79, 35, -1) 17 +(79, 36, -1) 18 +(79, 37, -1) 18 +(79, 38, -1) 18 +(79, 39, -1) 19 +(79, 40, -1) 19 +(79, 41, -1) 20 +(79, 42, -1) 20 +(79, 43, -1) 20 +(79, 44, -1) 20 +(79, 45, -1) 20 +(79, 46, -1) 21 +(79, 47, -1) 21 +(79, 48, -1) 21 +(79, 49, -1) 21 +(79, 50, -1) 21 +(79, 51, -1) 21 +(79, 52, -1) 21 +(79, 53, -1) 21 +(79, 54, -1) 21 +(79, 55, -1) 21 +(79, 56, -1) 20 +(79, 57, -1) 20 +(79, 58, -1) 20 +(79, 59, -1) 20 +(79, 60, -1) 20 +(79, 61, -1) 19 +(79, 62, -1) 19 +(79, 63, -1) 18 +(79, 64, -1) 18 +(79, 65, -1) 18 +(79, 66, -1) 17 +(79, 67, -1) 17 +(79, 68, -1) 16 +(79, 69, -1) 16 +(79, 70, -1) 15 +(79, 71, -1) 15 +(79, 72, -1) 14 +(79, 73, -1) 13 +(79, 74, -1) 13 +(79, 75, -1) 12 +(79, 76, -1) 12 +(79, 77, -1) 11 +(79, 78, -1) 10 +(79, 79, -1) 9 +(79, 80, -1) 9 +(79, 81, -1) 8 +(79, 82, -1) 7 +(79, 83, -1) 7 +(79, 84, -1) 6 +(79, 85, -1) 5 +(79, 86, -1) 4 +(79, 87, -1) 4 +(79, 88, -1) 3 +(79, 89, -1) 2 +(79, 90, -1) 1 +(79, 91, -1) 1 +(79, 92, -1) 0 +(80, 9, -1) 0 +(80, 10, -1) 0 +(80, 11, -1) 1 +(80, 12, -1) 1 +(80, 13, -1) 2 +(80, 14, -1) 3 +(80, 15, -1) 4 +(80, 16, -1) 4 +(80, 17, -1) 5 +(80, 18, -1) 6 +(80, 19, -1) 7 +(80, 20, -1) 7 +(80, 21, -1) 8 +(80, 22, -1) 9 +(80, 23, -1) 9 +(80, 24, -1) 10 +(80, 25, -1) 11 +(80, 26, -1) 11 +(80, 27, -1) 12 +(80, 28, -1) 13 +(80, 29, -1) 13 +(80, 30, -1) 14 +(80, 31, -1) 14 +(80, 32, -1) 15 +(80, 33, -1) 15 +(80, 34, -1) 16 +(80, 35, -1) 16 +(80, 36, -1) 17 +(80, 37, -1) 17 +(80, 38, -1) 18 +(80, 39, -1) 18 +(80, 40, -1) 18 +(80, 41, -1) 19 +(80, 42, -1) 19 +(80, 43, -1) 19 +(80, 44, -1) 19 +(80, 45, -1) 20 +(80, 46, -1) 20 +(80, 47, -1) 20 +(80, 48, -1) 20 +(80, 49, -1) 20 +(80, 50, -1) 20 +(80, 51, -1) 20 +(80, 52, -1) 20 +(80, 53, -1) 20 +(80, 54, -1) 20 +(80, 55, -1) 20 +(80, 56, -1) 20 +(80, 57, -1) 19 +(80, 58, -1) 19 +(80, 59, -1) 19 +(80, 60, -1) 19 +(80, 61, -1) 18 +(80, 62, -1) 18 +(80, 63, -1) 18 +(80, 64, -1) 17 +(80, 65, -1) 17 +(80, 66, -1) 16 +(80, 67, -1) 16 +(80, 68, -1) 15 +(80, 69, -1) 15 +(80, 70, -1) 14 +(80, 71, -1) 14 +(80, 72, -1) 13 +(80, 73, -1) 13 +(80, 74, -1) 12 +(80, 75, -1) 11 +(80, 76, -1) 11 +(80, 77, -1) 10 +(80, 78, -1) 9 +(80, 79, -1) 9 +(80, 80, -1) 8 +(80, 81, -1) 7 +(80, 82, -1) 7 +(80, 83, -1) 6 +(80, 84, -1) 5 +(80, 85, -1) 4 +(80, 86, -1) 4 +(80, 87, -1) 3 +(80, 88, -1) 2 +(80, 89, -1) 1 +(80, 90, -1) 1 +(80, 91, -1) 0 +(80, 92, -1) 0 +(81, 14, -1) 3 +(81, 15, -1) 3 +(81, 16, -1) 4 +(81, 17, -1) 5 +(81, 18, -1) 5 +(81, 19, -1) 6 +(81, 20, -1) 7 +(81, 21, -1) 7 +(81, 22, -1) 8 +(81, 23, -1) 9 +(81, 24, -1) 9 +(81, 25, -1) 10 +(81, 26, -1) 11 +(81, 27, -1) 11 +(81, 28, -1) 12 +(81, 29, -1) 12 +(81, 30, -1) 13 +(81, 31, -1) 14 +(81, 32, -1) 14 +(81, 33, -1) 15 +(81, 34, -1) 15 +(81, 35, -1) 15 +(81, 36, -1) 16 +(81, 37, -1) 16 +(81, 38, -1) 17 +(81, 39, -1) 17 +(81, 40, -1) 17 +(81, 41, -1) 18 +(81, 42, -1) 18 +(81, 43, -1) 18 +(81, 44, -1) 18 +(81, 45, -1) 19 +(81, 46, -1) 19 +(81, 47, -1) 19 +(81, 48, -1) 19 +(81, 49, -1) 19 +(81, 50, -1) 19 +(81, 51, -1) 19 +(81, 52, -1) 19 +(81, 53, -1) 19 +(81, 54, -1) 19 +(81, 55, -1) 19 +(81, 56, -1) 19 +(81, 57, -1) 18 +(81, 58, -1) 18 +(81, 59, -1) 18 +(81, 60, -1) 18 +(81, 61, -1) 17 +(81, 62, -1) 17 +(81, 63, -1) 17 +(81, 64, -1) 16 +(81, 65, -1) 16 +(81, 66, -1) 15 +(81, 67, -1) 15 +(81, 68, -1) 15 +(81, 69, -1) 14 +(81, 70, -1) 14 +(81, 71, -1) 13 +(81, 72, -1) 12 +(81, 73, -1) 12 +(81, 74, -1) 11 +(81, 75, -1) 11 +(81, 76, -1) 10 +(81, 77, -1) 9 +(81, 78, -1) 9 +(81, 79, -1) 8 +(81, 80, -1) 7 +(81, 81, -1) 7 +(81, 82, -1) 6 +(81, 83, -1) 5 +(81, 84, -1) 5 +(81, 85, -1) 4 +(81, 86, -1) 3 +(81, 87, -1) 3 +(82, 14, -1) 2 +(82, 15, -1) 3 +(82, 16, -1) 3 +(82, 17, -1) 4 +(82, 18, -1) 5 +(82, 19, -1) 5 +(82, 20, -1) 6 +(82, 21, -1) 7 +(82, 22, -1) 7 +(82, 23, -1) 8 +(82, 24, -1) 9 +(82, 25, -1) 9 +(82, 26, -1) 10 +(82, 27, -1) 10 +(82, 28, -1) 11 +(82, 29, -1) 12 +(82, 30, -1) 12 +(82, 31, -1) 13 +(82, 32, -1) 13 +(82, 33, -1) 14 +(82, 34, -1) 14 +(82, 35, -1) 15 +(82, 36, -1) 15 +(82, 37, -1) 15 +(82, 38, -1) 16 +(82, 39, -1) 16 +(82, 40, -1) 16 +(82, 41, -1) 17 +(82, 42, -1) 17 +(82, 43, -1) 17 +(82, 44, -1) 17 +(82, 45, -1) 18 +(82, 46, -1) 18 +(82, 47, -1) 18 +(82, 48, -1) 18 +(82, 49, -1) 18 +(82, 50, -1) 18 +(82, 51, -1) 18 +(82, 52, -1) 18 +(82, 53, -1) 18 +(82, 54, -1) 18 +(82, 55, -1) 18 +(82, 56, -1) 18 +(82, 57, -1) 17 +(82, 58, -1) 17 +(82, 59, -1) 17 +(82, 60, -1) 17 +(82, 61, -1) 16 +(82, 62, -1) 16 +(82, 63, -1) 16 +(82, 64, -1) 15 +(82, 65, -1) 15 +(82, 66, -1) 15 +(82, 67, -1) 14 +(82, 68, -1) 14 +(82, 69, -1) 13 +(82, 70, -1) 13 +(82, 71, -1) 12 +(82, 72, -1) 12 +(82, 73, -1) 11 +(82, 74, -1) 10 +(82, 75, -1) 10 +(82, 76, -1) 9 +(82, 77, -1) 9 +(82, 78, -1) 8 +(82, 79, -1) 7 +(82, 80, -1) 7 +(82, 81, -1) 6 +(82, 82, -1) 5 +(82, 83, -1) 5 +(82, 84, -1) 4 +(82, 85, -1) 3 +(82, 86, -1) 3 +(82, 87, -1) 2 +(83, 14, -1) 1 +(83, 15, -1) 2 +(83, 16, -1) 3 +(83, 17, -1) 3 +(83, 18, -1) 4 +(83, 19, -1) 5 +(83, 20, -1) 5 +(83, 21, -1) 6 +(83, 22, -1) 7 +(83, 23, -1) 7 +(83, 24, -1) 8 +(83, 25, -1) 8 +(83, 26, -1) 9 +(83, 27, -1) 10 +(83, 28, -1) 10 +(83, 29, -1) 11 +(83, 30, -1) 11 +(83, 31, -1) 12 +(83, 32, -1) 12 +(83, 33, -1) 13 +(83, 34, -1) 13 +(83, 35, -1) 14 +(83, 36, -1) 14 +(83, 37, -1) 14 +(83, 38, -1) 15 +(83, 39, -1) 15 +(83, 40, -1) 15 +(83, 41, -1) 16 +(83, 42, -1) 16 +(83, 43, -1) 16 +(83, 44, -1) 16 +(83, 45, -1) 17 +(83, 46, -1) 17 +(83, 47, -1) 17 +(83, 48, -1) 17 +(83, 49, -1) 17 +(83, 50, -1) 17 +(83, 51, -1) 17 +(83, 52, -1) 17 +(83, 53, -1) 17 +(83, 54, -1) 17 +(83, 55, -1) 17 +(83, 56, -1) 17 +(83, 57, -1) 16 +(83, 58, -1) 16 +(83, 59, -1) 16 +(83, 60, -1) 16 +(83, 61, -1) 15 +(83, 62, -1) 15 +(83, 63, -1) 15 +(83, 64, -1) 14 +(83, 65, -1) 14 +(83, 66, -1) 14 +(83, 67, -1) 13 +(83, 68, -1) 13 +(83, 69, -1) 12 +(83, 70, -1) 12 +(83, 71, -1) 11 +(83, 72, -1) 11 +(83, 73, -1) 10 +(83, 74, -1) 10 +(83, 75, -1) 9 +(83, 76, -1) 8 +(83, 77, -1) 8 +(83, 78, -1) 7 +(83, 79, -1) 7 +(83, 80, -1) 6 +(83, 81, -1) 5 +(83, 82, -1) 5 +(83, 83, -1) 4 +(83, 84, -1) 3 +(83, 85, -1) 3 +(83, 86, -1) 2 +(83, 87, -1) 1 +(84, 14, -1) 1 +(84, 15, -1) 1 +(84, 16, -1) 2 +(84, 17, -1) 3 +(84, 18, -1) 3 +(84, 19, -1) 4 +(84, 20, -1) 5 +(84, 21, -1) 5 +(84, 22, -1) 6 +(84, 23, -1) 6 +(84, 24, -1) 7 +(84, 25, -1) 8 +(84, 26, -1) 8 +(84, 27, -1) 9 +(84, 28, -1) 9 +(84, 29, -1) 10 +(84, 30, -1) 10 +(84, 31, -1) 11 +(84, 32, -1) 11 +(84, 33, -1) 12 +(84, 34, -1) 12 +(84, 35, -1) 13 +(84, 36, -1) 13 +(84, 37, -1) 13 +(84, 38, -1) 14 +(84, 39, -1) 14 +(84, 40, -1) 14 +(84, 41, -1) 15 +(84, 42, -1) 15 +(84, 43, -1) 15 +(84, 44, -1) 15 +(84, 45, -1) 16 +(84, 46, -1) 16 +(84, 47, -1) 16 +(84, 48, -1) 16 +(84, 49, -1) 16 +(84, 50, -1) 16 +(84, 51, -1) 16 +(84, 52, -1) 16 +(84, 53, -1) 16 +(84, 54, -1) 16 +(84, 55, -1) 16 +(84, 56, -1) 16 +(84, 57, -1) 15 +(84, 58, -1) 15 +(84, 59, -1) 15 +(84, 60, -1) 15 +(84, 61, -1) 14 +(84, 62, -1) 14 +(84, 63, -1) 14 +(84, 64, -1) 13 +(84, 65, -1) 13 +(84, 66, -1) 13 +(84, 67, -1) 12 +(84, 68, -1) 12 +(84, 69, -1) 11 +(84, 70, -1) 11 +(84, 71, -1) 10 +(84, 72, -1) 10 +(84, 73, -1) 9 +(84, 74, -1) 9 +(84, 75, -1) 8 +(84, 76, -1) 8 +(84, 77, -1) 7 +(84, 78, -1) 6 +(84, 79, -1) 6 +(84, 80, -1) 5 +(84, 81, -1) 5 +(84, 82, -1) 4 +(84, 83, -1) 3 +(84, 84, -1) 3 +(84, 85, -1) 2 +(84, 86, -1) 1 +(84, 87, -1) 1 +(85, 14, -1) 0 +(85, 15, -1) 1 +(85, 16, -1) 1 +(85, 17, -1) 2 +(85, 18, -1) 2 +(85, 19, -1) 3 +(85, 20, -1) 4 +(85, 21, -1) 4 +(85, 22, -1) 5 +(85, 23, -1) 6 +(85, 24, -1) 6 +(85, 25, -1) 7 +(85, 26, -1) 7 +(85, 27, -1) 8 +(85, 28, -1) 9 +(85, 29, -1) 9 +(85, 30, -1) 10 +(85, 31, -1) 10 +(85, 32, -1) 11 +(85, 33, -1) 11 +(85, 34, -1) 11 +(85, 35, -1) 12 +(85, 36, -1) 12 +(85, 37, -1) 13 +(85, 38, -1) 13 +(85, 39, -1) 13 +(85, 40, -1) 13 +(85, 41, -1) 14 +(85, 42, -1) 14 +(85, 43, -1) 14 +(85, 44, -1) 14 +(85, 45, -1) 15 +(85, 46, -1) 15 +(85, 47, -1) 15 +(85, 48, -1) 15 +(85, 49, -1) 15 +(85, 50, -1) 15 +(85, 51, -1) 15 +(85, 52, -1) 15 +(85, 53, -1) 15 +(85, 54, -1) 15 +(85, 55, -1) 15 +(85, 56, -1) 15 +(85, 57, -1) 14 +(85, 58, -1) 14 +(85, 59, -1) 14 +(85, 60, -1) 14 +(85, 61, -1) 13 +(85, 62, -1) 13 +(85, 63, -1) 13 +(85, 64, -1) 13 +(85, 65, -1) 12 +(85, 66, -1) 12 +(85, 67, -1) 11 +(85, 68, -1) 11 +(85, 69, -1) 11 +(85, 70, -1) 10 +(85, 71, -1) 10 +(85, 72, -1) 9 +(85, 73, -1) 9 +(85, 74, -1) 8 +(85, 75, -1) 7 +(85, 76, -1) 7 +(85, 77, -1) 6 +(85, 78, -1) 6 +(85, 79, -1) 5 +(85, 80, -1) 4 +(85, 81, -1) 4 +(85, 82, -1) 3 +(85, 83, -1) 2 +(85, 84, -1) 2 +(85, 85, -1) 1 +(85, 86, -1) 1 +(85, 87, -1) 0 +(86, 16, -1) 1 +(86, 17, -1) 1 +(86, 18, -1) 2 +(86, 19, -1) 3 +(86, 20, -1) 3 +(86, 21, -1) 4 +(86, 22, -1) 4 +(86, 23, -1) 5 +(86, 24, -1) 6 +(86, 25, -1) 6 +(86, 26, -1) 7 +(86, 27, -1) 7 +(86, 28, -1) 8 +(86, 29, -1) 8 +(86, 30, -1) 9 +(86, 31, -1) 9 +(86, 32, -1) 10 +(86, 33, -1) 10 +(86, 34, -1) 11 +(86, 35, -1) 11 +(86, 36, -1) 11 +(86, 37, -1) 12 +(86, 38, -1) 12 +(86, 39, -1) 12 +(86, 40, -1) 13 +(86, 41, -1) 13 +(86, 42, -1) 13 +(86, 43, -1) 13 +(86, 44, -1) 13 +(86, 45, -1) 14 +(86, 46, -1) 14 +(86, 47, -1) 14 +(86, 48, -1) 14 +(86, 49, -1) 14 +(86, 50, -1) 14 +(86, 51, -1) 14 +(86, 52, -1) 14 +(86, 53, -1) 14 +(86, 54, -1) 14 +(86, 55, -1) 14 +(86, 56, -1) 14 +(86, 57, -1) 13 +(86, 58, -1) 13 +(86, 59, -1) 13 +(86, 60, -1) 13 +(86, 61, -1) 13 +(86, 62, -1) 12 +(86, 63, -1) 12 +(86, 64, -1) 12 +(86, 65, -1) 11 +(86, 66, -1) 11 +(86, 67, -1) 11 +(86, 68, -1) 10 +(86, 69, -1) 10 +(86, 70, -1) 9 +(86, 71, -1) 9 +(86, 72, -1) 8 +(86, 73, -1) 8 +(86, 74, -1) 7 +(86, 75, -1) 7 +(86, 76, -1) 6 +(86, 77, -1) 6 +(86, 78, -1) 5 +(86, 79, -1) 4 +(86, 80, -1) 4 +(86, 81, -1) 3 +(86, 82, -1) 3 +(86, 83, -1) 2 +(86, 84, -1) 1 +(86, 85, -1) 1 +(87, 16, -1) 0 +(87, 17, -1) 1 +(87, 18, -1) 1 +(87, 19, -1) 2 +(87, 20, -1) 2 +(87, 21, -1) 3 +(87, 22, -1) 4 +(87, 23, -1) 4 +(87, 24, -1) 5 +(87, 25, -1) 5 +(87, 26, -1) 6 +(87, 27, -1) 6 +(87, 28, -1) 7 +(87, 29, -1) 7 +(87, 30, -1) 8 +(87, 31, -1) 8 +(87, 32, -1) 9 +(87, 33, -1) 9 +(87, 34, -1) 10 +(87, 35, -1) 10 +(87, 36, -1) 10 +(87, 37, -1) 11 +(87, 38, -1) 11 +(87, 39, -1) 11 +(87, 40, -1) 12 +(87, 41, -1) 12 +(87, 42, -1) 12 +(87, 43, -1) 12 +(87, 44, -1) 12 +(87, 45, -1) 13 +(87, 46, -1) 13 +(87, 47, -1) 13 +(87, 48, -1) 13 +(87, 49, -1) 13 +(87, 50, -1) 13 +(87, 51, -1) 13 +(87, 52, -1) 13 +(87, 53, -1) 13 +(87, 54, -1) 13 +(87, 55, -1) 13 +(87, 56, -1) 13 +(87, 57, -1) 12 +(87, 58, -1) 12 +(87, 59, -1) 12 +(87, 60, -1) 12 +(87, 61, -1) 12 +(87, 62, -1) 11 +(87, 63, -1) 11 +(87, 64, -1) 11 +(87, 65, -1) 10 +(87, 66, -1) 10 +(87, 67, -1) 10 +(87, 68, -1) 9 +(87, 69, -1) 9 +(87, 70, -1) 8 +(87, 71, -1) 8 +(87, 72, -1) 7 +(87, 73, -1) 7 +(87, 74, -1) 6 +(87, 75, -1) 6 +(87, 76, -1) 5 +(87, 77, -1) 5 +(87, 78, -1) 4 +(87, 79, -1) 4 +(87, 80, -1) 3 +(87, 81, -1) 2 +(87, 82, -1) 2 +(87, 83, -1) 1 +(87, 84, -1) 1 +(87, 85, -1) 0 +(88, 21, -1) 2 +(88, 22, -1) 3 +(88, 23, -1) 3 +(88, 24, -1) 4 +(88, 25, -1) 5 +(88, 26, -1) 5 +(88, 27, -1) 6 +(88, 28, -1) 6 +(88, 29, -1) 7 +(88, 30, -1) 7 +(88, 31, -1) 7 +(88, 32, -1) 8 +(88, 33, -1) 8 +(88, 34, -1) 9 +(88, 35, -1) 9 +(88, 36, -1) 9 +(88, 37, -1) 10 +(88, 38, -1) 10 +(88, 39, -1) 10 +(88, 40, -1) 11 +(88, 41, -1) 11 +(88, 42, -1) 11 +(88, 43, -1) 11 +(88, 44, -1) 11 +(88, 45, -1) 12 +(88, 46, -1) 12 +(88, 47, -1) 12 +(88, 48, -1) 12 +(88, 49, -1) 12 +(88, 50, -1) 12 +(88, 51, -1) 12 +(88, 52, -1) 12 +(88, 53, -1) 12 +(88, 54, -1) 12 +(88, 55, -1) 12 +(88, 56, -1) 12 +(88, 57, -1) 11 +(88, 58, -1) 11 +(88, 59, -1) 11 +(88, 60, -1) 11 +(88, 61, -1) 11 +(88, 62, -1) 10 +(88, 63, -1) 10 +(88, 64, -1) 10 +(88, 65, -1) 9 +(88, 66, -1) 9 +(88, 67, -1) 9 +(88, 68, -1) 8 +(88, 69, -1) 8 +(88, 70, -1) 7 +(88, 71, -1) 7 +(88, 72, -1) 7 +(88, 73, -1) 6 +(88, 74, -1) 6 +(88, 75, -1) 5 +(88, 76, -1) 5 +(88, 77, -1) 4 +(88, 78, -1) 3 +(88, 79, -1) 3 +(88, 80, -1) 2 +(89, 21, -1) 1 +(89, 22, -1) 2 +(89, 23, -1) 3 +(89, 24, -1) 3 +(89, 25, -1) 4 +(89, 26, -1) 4 +(89, 27, -1) 5 +(89, 28, -1) 5 +(89, 29, -1) 6 +(89, 30, -1) 6 +(89, 31, -1) 7 +(89, 32, -1) 7 +(89, 33, -1) 7 +(89, 34, -1) 8 +(89, 35, -1) 8 +(89, 36, -1) 8 +(89, 37, -1) 9 +(89, 38, -1) 9 +(89, 39, -1) 9 +(89, 40, -1) 10 +(89, 41, -1) 10 +(89, 42, -1) 10 +(89, 43, -1) 10 +(89, 44, -1) 10 +(89, 45, -1) 11 +(89, 46, -1) 11 +(89, 47, -1) 11 +(89, 48, -1) 11 +(89, 49, -1) 11 +(89, 50, -1) 11 +(89, 51, -1) 11 +(89, 52, -1) 11 +(89, 53, -1) 11 +(89, 54, -1) 11 +(89, 55, -1) 11 +(89, 56, -1) 11 +(89, 57, -1) 10 +(89, 58, -1) 10 +(89, 59, -1) 10 +(89, 60, -1) 10 +(89, 61, -1) 10 +(89, 62, -1) 9 +(89, 63, -1) 9 +(89, 64, -1) 9 +(89, 65, -1) 8 +(89, 66, -1) 8 +(89, 67, -1) 8 +(89, 68, -1) 7 +(89, 69, -1) 7 +(89, 70, -1) 7 +(89, 71, -1) 6 +(89, 72, -1) 6 +(89, 73, -1) 5 +(89, 74, -1) 5 +(89, 75, -1) 4 +(89, 76, -1) 4 +(89, 77, -1) 3 +(89, 78, -1) 3 +(89, 79, -1) 2 +(89, 80, -1) 1 +(90, 21, -1) 1 +(90, 22, -1) 1 +(90, 23, -1) 2 +(90, 24, -1) 2 +(90, 25, -1) 3 +(90, 26, -1) 3 +(90, 27, -1) 4 +(90, 28, -1) 4 +(90, 29, -1) 5 +(90, 30, -1) 5 +(90, 31, -1) 6 +(90, 32, -1) 6 +(90, 33, -1) 6 +(90, 34, -1) 7 +(90, 35, -1) 7 +(90, 36, -1) 8 +(90, 37, -1) 8 +(90, 38, -1) 8 +(90, 39, -1) 8 +(90, 40, -1) 9 +(90, 41, -1) 9 +(90, 42, -1) 9 +(90, 43, -1) 9 +(90, 44, -1) 9 +(90, 45, -1) 10 +(90, 46, -1) 10 +(90, 47, -1) 10 +(90, 48, -1) 10 +(90, 49, -1) 10 +(90, 50, -1) 10 +(90, 51, -1) 10 +(90, 52, -1) 10 +(90, 53, -1) 10 +(90, 54, -1) 10 +(90, 55, -1) 10 +(90, 56, -1) 10 +(90, 57, -1) 9 +(90, 58, -1) 9 +(90, 59, -1) 9 +(90, 60, -1) 9 +(90, 61, -1) 9 +(90, 62, -1) 8 +(90, 63, -1) 8 +(90, 64, -1) 8 +(90, 65, -1) 8 +(90, 66, -1) 7 +(90, 67, -1) 7 +(90, 68, -1) 6 +(90, 69, -1) 6 +(90, 70, -1) 6 +(90, 71, -1) 5 +(90, 72, -1) 5 +(90, 73, -1) 4 +(90, 74, -1) 4 +(90, 75, -1) 3 +(90, 76, -1) 3 +(90, 77, -1) 2 +(90, 78, -1) 2 +(90, 79, -1) 1 +(90, 80, -1) 1 +(91, 21, -1) 0 +(91, 22, -1) 1 +(91, 23, -1) 1 +(91, 24, -1) 2 +(91, 25, -1) 2 +(91, 26, -1) 3 +(91, 27, -1) 3 +(91, 28, -1) 4 +(91, 29, -1) 4 +(91, 30, -1) 4 +(91, 31, -1) 5 +(91, 32, -1) 5 +(91, 33, -1) 6 +(91, 34, -1) 6 +(91, 35, -1) 6 +(91, 36, -1) 7 +(91, 37, -1) 7 +(91, 38, -1) 7 +(91, 39, -1) 8 +(91, 40, -1) 8 +(91, 41, -1) 8 +(91, 42, -1) 8 +(91, 43, -1) 8 +(91, 44, -1) 9 +(91, 45, -1) 9 +(91, 46, -1) 9 +(91, 47, -1) 9 +(91, 48, -1) 9 +(91, 49, -1) 9 +(91, 50, -1) 9 +(91, 51, -1) 9 +(91, 52, -1) 9 +(91, 53, -1) 9 +(91, 54, -1) 9 +(91, 55, -1) 9 +(91, 56, -1) 9 +(91, 57, -1) 9 +(91, 58, -1) 8 +(91, 59, -1) 8 +(91, 60, -1) 8 +(91, 61, -1) 8 +(91, 62, -1) 8 +(91, 63, -1) 7 +(91, 64, -1) 7 +(91, 65, -1) 7 +(91, 66, -1) 6 +(91, 67, -1) 6 +(91, 68, -1) 6 +(91, 69, -1) 5 +(91, 70, -1) 5 +(91, 71, -1) 4 +(91, 72, -1) 4 +(91, 73, -1) 4 +(91, 74, -1) 3 +(91, 75, -1) 3 +(91, 76, -1) 2 +(91, 77, -1) 2 +(91, 78, -1) 1 +(91, 79, -1) 1 +(91, 80, -1) 0 +(92, 21, -1) 0 +(92, 22, -1) 0 +(92, 23, -1) 0 +(92, 24, -1) 1 +(92, 25, -1) 1 +(92, 26, -1) 2 +(92, 27, -1) 2 +(92, 28, -1) 3 +(92, 29, -1) 3 +(92, 30, -1) 4 +(92, 31, -1) 4 +(92, 32, -1) 4 +(92, 33, -1) 5 +(92, 34, -1) 5 +(92, 35, -1) 5 +(92, 36, -1) 6 +(92, 37, -1) 6 +(92, 38, -1) 6 +(92, 39, -1) 7 +(92, 40, -1) 7 +(92, 41, -1) 7 +(92, 42, -1) 7 +(92, 43, -1) 7 +(92, 44, -1) 8 +(92, 45, -1) 8 +(92, 46, -1) 8 +(92, 47, -1) 8 +(92, 48, -1) 8 +(92, 49, -1) 8 +(92, 50, -1) 8 +(92, 51, -1) 8 +(92, 52, -1) 8 +(92, 53, -1) 8 +(92, 54, -1) 8 +(92, 55, -1) 8 +(92, 56, -1) 8 +(92, 57, -1) 8 +(92, 58, -1) 7 +(92, 59, -1) 7 +(92, 60, -1) 7 +(92, 61, -1) 7 +(92, 62, -1) 7 +(92, 63, -1) 6 +(92, 64, -1) 6 +(92, 65, -1) 6 +(92, 66, -1) 5 +(92, 67, -1) 5 +(92, 68, -1) 5 +(92, 69, -1) 4 +(92, 70, -1) 4 +(92, 71, -1) 4 +(92, 72, -1) 3 +(92, 73, -1) 3 +(92, 74, -1) 2 +(92, 75, -1) 2 +(92, 76, -1) 1 +(92, 77, -1) 1 +(92, 78, -1) 0 +(92, 79, -1) 0 +(92, 80, -1) 0 +(93, 26, -1) 1 +(93, 27, -1) 1 +(93, 28, -1) 2 +(93, 29, -1) 2 +(93, 30, -1) 3 +(93, 31, -1) 3 +(93, 32, -1) 3 +(93, 33, -1) 4 +(93, 34, -1) 4 +(93, 35, -1) 4 +(93, 36, -1) 5 +(93, 37, -1) 5 +(93, 38, -1) 5 +(93, 39, -1) 6 +(93, 40, -1) 6 +(93, 41, -1) 6 +(93, 42, -1) 6 +(93, 43, -1) 6 +(93, 44, -1) 7 +(93, 45, -1) 7 +(93, 46, -1) 7 +(93, 47, -1) 7 +(93, 48, -1) 7 +(93, 49, -1) 7 +(93, 50, -1) 7 +(93, 51, -1) 7 +(93, 52, -1) 7 +(93, 53, -1) 7 +(93, 54, -1) 7 +(93, 55, -1) 7 +(93, 56, -1) 7 +(93, 57, -1) 7 +(93, 58, -1) 6 +(93, 59, -1) 6 +(93, 60, -1) 6 +(93, 61, -1) 6 +(93, 62, -1) 6 +(93, 63, -1) 5 +(93, 64, -1) 5 +(93, 65, -1) 5 +(93, 66, -1) 4 +(93, 67, -1) 4 +(93, 68, -1) 4 +(93, 69, -1) 3 +(93, 70, -1) 3 +(93, 71, -1) 3 +(93, 72, -1) 2 +(93, 73, -1) 2 +(93, 74, -1) 1 +(93, 75, -1) 1 +(94, 26, -1) 0 +(94, 27, -1) 0 +(94, 28, -1) 1 +(94, 29, -1) 1 +(94, 30, -1) 2 +(94, 31, -1) 2 +(94, 32, -1) 2 +(94, 33, -1) 3 +(94, 34, -1) 3 +(94, 35, -1) 3 +(94, 36, -1) 4 +(94, 37, -1) 4 +(94, 38, -1) 4 +(94, 39, -1) 5 +(94, 40, -1) 5 +(94, 41, -1) 5 +(94, 42, -1) 5 +(94, 43, -1) 5 +(94, 44, -1) 6 +(94, 45, -1) 6 +(94, 46, -1) 6 +(94, 47, -1) 6 +(94, 48, -1) 6 +(94, 49, -1) 6 +(94, 50, -1) 6 +(94, 51, -1) 6 +(94, 52, -1) 6 +(94, 53, -1) 6 +(94, 54, -1) 6 +(94, 55, -1) 6 +(94, 56, -1) 6 +(94, 57, -1) 6 +(94, 58, -1) 5 +(94, 59, -1) 5 +(94, 60, -1) 5 +(94, 61, -1) 5 +(94, 62, -1) 5 +(94, 63, -1) 4 +(94, 64, -1) 4 +(94, 65, -1) 4 +(94, 66, -1) 3 +(94, 67, -1) 3 +(94, 68, -1) 3 +(94, 69, -1) 2 +(94, 70, -1) 2 +(94, 71, -1) 2 +(94, 72, -1) 1 +(94, 73, -1) 1 +(94, 74, -1) 0 +(94, 75, -1) 0 +(95, 26, -1) 0 +(95, 27, -1) 0 +(95, 28, -1) 0 +(95, 29, -1) 0 +(95, 30, -1) 1 +(95, 31, -1) 1 +(95, 32, -1) 1 +(95, 33, -1) 2 +(95, 34, -1) 2 +(95, 35, -1) 3 +(95, 36, -1) 3 +(95, 37, -1) 3 +(95, 38, -1) 3 +(95, 39, -1) 4 +(95, 40, -1) 4 +(95, 41, -1) 4 +(95, 42, -1) 4 +(95, 43, -1) 4 +(95, 44, -1) 5 +(95, 45, -1) 5 +(95, 46, -1) 5 +(95, 47, -1) 5 +(95, 48, -1) 5 +(95, 49, -1) 5 +(95, 50, -1) 5 +(95, 51, -1) 5 +(95, 52, -1) 5 +(95, 53, -1) 5 +(95, 54, -1) 5 +(95, 55, -1) 5 +(95, 56, -1) 5 +(95, 57, -1) 5 +(95, 58, -1) 4 +(95, 59, -1) 4 +(95, 60, -1) 4 +(95, 61, -1) 4 +(95, 62, -1) 4 +(95, 63, -1) 3 +(95, 64, -1) 3 +(95, 65, -1) 3 +(95, 66, -1) 3 +(95, 67, -1) 2 +(95, 68, -1) 2 +(95, 69, -1) 1 +(95, 70, -1) 1 +(95, 71, -1) 1 +(95, 72, -1) 0 +(95, 73, -1) 0 +(95, 74, -1) 0 +(95, 75, -1) 0 +(96, 36, -1) 2 +(96, 37, -1) 2 +(96, 38, -1) 2 +(96, 39, -1) 3 +(96, 40, -1) 3 +(96, 41, -1) 3 +(96, 42, -1) 3 +(96, 43, -1) 3 +(96, 44, -1) 4 +(96, 45, -1) 4 +(96, 46, -1) 4 +(96, 47, -1) 4 +(96, 48, -1) 4 +(96, 49, -1) 4 +(96, 50, -1) 4 +(96, 51, -1) 4 +(96, 52, -1) 4 +(96, 53, -1) 4 +(96, 54, -1) 4 +(96, 55, -1) 4 +(96, 56, -1) 4 +(96, 57, -1) 4 +(96, 58, -1) 3 +(96, 59, -1) 3 +(96, 60, -1) 3 +(96, 61, -1) 3 +(96, 62, -1) 3 +(96, 63, -1) 2 +(96, 64, -1) 2 +(96, 65, -1) 2 +(97, 36, -1) 1 +(97, 37, -1) 1 +(97, 38, -1) 2 +(97, 39, -1) 2 +(97, 40, -1) 2 +(97, 41, -1) 2 +(97, 42, -1) 2 +(97, 43, -1) 2 +(97, 44, -1) 3 +(97, 45, -1) 3 +(97, 46, -1) 3 +(97, 47, -1) 3 +(97, 48, -1) 3 +(97, 49, -1) 3 +(97, 50, -1) 3 +(97, 51, -1) 3 +(97, 52, -1) 3 +(97, 53, -1) 3 +(97, 54, -1) 3 +(97, 55, -1) 3 +(97, 56, -1) 3 +(97, 57, -1) 3 +(97, 58, -1) 2 +(97, 59, -1) 2 +(97, 60, -1) 2 +(97, 61, -1) 2 +(97, 62, -1) 2 +(97, 63, -1) 2 +(97, 64, -1) 1 +(97, 65, -1) 1 +(98, 41, -1) 1 +(98, 42, -1) 1 +(98, 43, -1) 1 +(98, 44, -1) 2 +(98, 45, -1) 2 +(98, 46, -1) 2 +(98, 47, -1) 2 +(98, 48, -1) 2 +(98, 49, -1) 2 +(98, 50, -1) 2 +(98, 51, -1) 2 +(98, 52, -1) 2 +(98, 53, -1) 2 +(98, 54, -1) 2 +(98, 55, -1) 2 +(98, 56, -1) 2 +(98, 57, -1) 2 +(98, 58, -1) 1 +(98, 59, -1) 1 +(98, 60, -1) 1 +(99, 41, -1) 0 +(99, 42, -1) 0 +(99, 43, -1) 0 +(99, 44, -1) 1 +(99, 45, -1) 1 +(99, 46, -1) 1 +(99, 47, -1) 1 +(99, 48, -1) 1 +(99, 49, -1) 1 +(99, 50, -1) 1 +(99, 51, -1) 1 +(99, 52, -1) 1 +(99, 53, -1) 1 +(99, 54, -1) 1 +(99, 55, -1) 1 +(99, 56, -1) 1 +(99, 57, -1) 1 +(99, 58, -1) 0 +(99, 59, -1) 0 +(99, 60, -1) 0 +(100, 41, -1) 0 +(100, 42, -1) 0 +(100, 43, -1) 0 +(100, 44, -1) 0 +(100, 45, -1) 0 +(100, 46, -1) 0 +(100, 47, -1) 0 +(100, 48, -1) 0 +(100, 49, -1) 0 +(100, 50, -1) 0 +(100, 51, -1) 0 +(100, 52, -1) 0 +(100, 53, -1) 0 +(100, 54, -1) 0 +(100, 55, -1) 0 +(100, 56, -1) 0 +(100, 57, -1) 0 +(100, 58, -1) 0 +(100, 59, -1) 0 +(100, 60, -1) 0 +(1, 41, 1) 0 +(1, 42, 1) 0 +(1, 43, 1) 0 +(1, 44, 1) 0 +(1, 45, 1) 0 +(1, 46, 1) 0 +(1, 47, 1) 0 +(1, 48, 1) 0 +(1, 49, 1) 0 +(1, 50, 1) 0 +(1, 51, 1) 0 +(1, 52, 1) 0 +(1, 53, 1) 0 +(1, 54, 1) 0 +(1, 55, 1) 0 +(1, 56, 1) 0 +(1, 57, 1) 0 +(1, 58, 1) 0 +(1, 59, 1) 0 +(1, 60, 1) 0 +(2, 41, 1) 0 +(2, 42, 1) 0 +(2, 43, 1) 0 +(2, 44, 1) 1 +(2, 45, 1) 1 +(2, 46, 1) 1 +(2, 47, 1) 1 +(2, 48, 1) 1 +(2, 49, 1) 1 +(2, 50, 1) 1 +(2, 51, 1) 1 +(2, 52, 1) 1 +(2, 53, 1) 1 +(2, 54, 1) 1 +(2, 55, 1) 1 +(2, 56, 1) 1 +(2, 57, 1) 1 +(2, 58, 1) 0 +(2, 59, 1) 0 +(2, 60, 1) 0 +(3, 41, 1) 1 +(3, 42, 1) 1 +(3, 43, 1) 1 +(3, 44, 1) 2 +(3, 45, 1) 2 +(3, 46, 1) 2 +(3, 47, 1) 2 +(3, 48, 1) 2 +(3, 49, 1) 2 +(3, 50, 1) 2 +(3, 51, 1) 2 +(3, 52, 1) 2 +(3, 53, 1) 2 +(3, 54, 1) 2 +(3, 55, 1) 2 +(3, 56, 1) 2 +(3, 57, 1) 2 +(3, 58, 1) 1 +(3, 59, 1) 1 +(3, 60, 1) 1 +(4, 36, 1) 1 +(4, 37, 1) 1 +(4, 38, 1) 2 +(4, 39, 1) 2 +(4, 40, 1) 2 +(4, 41, 1) 2 +(4, 42, 1) 2 +(4, 43, 1) 2 +(4, 44, 1) 3 +(4, 45, 1) 3 +(4, 46, 1) 3 +(4, 47, 1) 3 +(4, 48, 1) 3 +(4, 49, 1) 3 +(4, 50, 1) 3 +(4, 51, 1) 3 +(4, 52, 1) 3 +(4, 53, 1) 3 +(4, 54, 1) 3 +(4, 55, 1) 3 +(4, 56, 1) 3 +(4, 57, 1) 3 +(4, 58, 1) 2 +(4, 59, 1) 2 +(4, 60, 1) 2 +(4, 61, 1) 2 +(4, 62, 1) 2 +(4, 63, 1) 2 +(4, 64, 1) 1 +(4, 65, 1) 1 +(5, 36, 1) 2 +(5, 37, 1) 2 +(5, 38, 1) 2 +(5, 39, 1) 3 +(5, 40, 1) 3 +(5, 41, 1) 3 +(5, 42, 1) 3 +(5, 43, 1) 3 +(5, 44, 1) 4 +(5, 45, 1) 4 +(5, 46, 1) 4 +(5, 47, 1) 4 +(5, 48, 1) 4 +(5, 49, 1) 4 +(5, 50, 1) 4 +(5, 51, 1) 4 +(5, 52, 1) 4 +(5, 53, 1) 4 +(5, 54, 1) 4 +(5, 55, 1) 4 +(5, 56, 1) 4 +(5, 57, 1) 4 +(5, 58, 1) 3 +(5, 59, 1) 3 +(5, 60, 1) 3 +(5, 61, 1) 3 +(5, 62, 1) 3 +(5, 63, 1) 2 +(5, 64, 1) 2 +(5, 65, 1) 2 +(6, 26, 1) 0 +(6, 27, 1) 0 +(6, 28, 1) 0 +(6, 29, 1) 0 +(6, 30, 1) 1 +(6, 31, 1) 1 +(6, 32, 1) 1 +(6, 33, 1) 2 +(6, 34, 1) 2 +(6, 35, 1) 3 +(6, 36, 1) 3 +(6, 37, 1) 3 +(6, 38, 1) 3 +(6, 39, 1) 4 +(6, 40, 1) 4 +(6, 41, 1) 4 +(6, 42, 1) 4 +(6, 43, 1) 4 +(6, 44, 1) 5 +(6, 45, 1) 5 +(6, 46, 1) 5 +(6, 47, 1) 5 +(6, 48, 1) 5 +(6, 49, 1) 5 +(6, 50, 1) 5 +(6, 51, 1) 5 +(6, 52, 1) 5 +(6, 53, 1) 5 +(6, 54, 1) 5 +(6, 55, 1) 5 +(6, 56, 1) 5 +(6, 57, 1) 5 +(6, 58, 1) 4 +(6, 59, 1) 4 +(6, 60, 1) 4 +(6, 61, 1) 4 +(6, 62, 1) 4 +(6, 63, 1) 3 +(6, 64, 1) 3 +(6, 65, 1) 3 +(6, 66, 1) 3 +(6, 67, 1) 2 +(6, 68, 1) 2 +(6, 69, 1) 1 +(6, 70, 1) 1 +(6, 71, 1) 1 +(6, 72, 1) 0 +(6, 73, 1) 0 +(6, 74, 1) 0 +(6, 75, 1) 0 +(7, 26, 1) 0 +(7, 27, 1) 0 +(7, 28, 1) 1 +(7, 29, 1) 1 +(7, 30, 1) 2 +(7, 31, 1) 2 +(7, 32, 1) 2 +(7, 33, 1) 3 +(7, 34, 1) 3 +(7, 35, 1) 3 +(7, 36, 1) 4 +(7, 37, 1) 4 +(7, 38, 1) 4 +(7, 39, 1) 5 +(7, 40, 1) 5 +(7, 41, 1) 5 +(7, 42, 1) 5 +(7, 43, 1) 5 +(7, 44, 1) 6 +(7, 45, 1) 6 +(7, 46, 1) 6 +(7, 47, 1) 6 +(7, 48, 1) 6 +(7, 49, 1) 6 +(7, 50, 1) 6 +(7, 51, 1) 6 +(7, 52, 1) 6 +(7, 53, 1) 6 +(7, 54, 1) 6 +(7, 55, 1) 6 +(7, 56, 1) 6 +(7, 57, 1) 6 +(7, 58, 1) 5 +(7, 59, 1) 5 +(7, 60, 1) 5 +(7, 61, 1) 5 +(7, 62, 1) 5 +(7, 63, 1) 4 +(7, 64, 1) 4 +(7, 65, 1) 4 +(7, 66, 1) 3 +(7, 67, 1) 3 +(7, 68, 1) 3 +(7, 69, 1) 2 +(7, 70, 1) 2 +(7, 71, 1) 2 +(7, 72, 1) 1 +(7, 73, 1) 1 +(7, 74, 1) 0 +(7, 75, 1) 0 +(8, 26, 1) 1 +(8, 27, 1) 1 +(8, 28, 1) 2 +(8, 29, 1) 2 +(8, 30, 1) 3 +(8, 31, 1) 3 +(8, 32, 1) 3 +(8, 33, 1) 4 +(8, 34, 1) 4 +(8, 35, 1) 4 +(8, 36, 1) 5 +(8, 37, 1) 5 +(8, 38, 1) 5 +(8, 39, 1) 6 +(8, 40, 1) 6 +(8, 41, 1) 6 +(8, 42, 1) 6 +(8, 43, 1) 6 +(8, 44, 1) 7 +(8, 45, 1) 7 +(8, 46, 1) 7 +(8, 47, 1) 7 +(8, 48, 1) 7 +(8, 49, 1) 7 +(8, 50, 1) 7 +(8, 51, 1) 7 +(8, 52, 1) 7 +(8, 53, 1) 7 +(8, 54, 1) 7 +(8, 55, 1) 7 +(8, 56, 1) 7 +(8, 57, 1) 7 +(8, 58, 1) 6 +(8, 59, 1) 6 +(8, 60, 1) 6 +(8, 61, 1) 6 +(8, 62, 1) 6 +(8, 63, 1) 5 +(8, 64, 1) 5 +(8, 65, 1) 5 +(8, 66, 1) 4 +(8, 67, 1) 4 +(8, 68, 1) 4 +(8, 69, 1) 3 +(8, 70, 1) 3 +(8, 71, 1) 3 +(8, 72, 1) 2 +(8, 73, 1) 2 +(8, 74, 1) 1 +(8, 75, 1) 1 +(9, 21, 1) 0 +(9, 22, 1) 0 +(9, 23, 1) 0 +(9, 24, 1) 1 +(9, 25, 1) 1 +(9, 26, 1) 2 +(9, 27, 1) 2 +(9, 28, 1) 3 +(9, 29, 1) 3 +(9, 30, 1) 4 +(9, 31, 1) 4 +(9, 32, 1) 4 +(9, 33, 1) 5 +(9, 34, 1) 5 +(9, 35, 1) 5 +(9, 36, 1) 6 +(9, 37, 1) 6 +(9, 38, 1) 6 +(9, 39, 1) 7 +(9, 40, 1) 7 +(9, 41, 1) 7 +(9, 42, 1) 7 +(9, 43, 1) 7 +(9, 44, 1) 8 +(9, 45, 1) 8 +(9, 46, 1) 8 +(9, 47, 1) 8 +(9, 48, 1) 8 +(9, 49, 1) 8 +(9, 50, 1) 8 +(9, 51, 1) 8 +(9, 52, 1) 8 +(9, 53, 1) 8 +(9, 54, 1) 8 +(9, 55, 1) 8 +(9, 56, 1) 8 +(9, 57, 1) 8 +(9, 58, 1) 7 +(9, 59, 1) 7 +(9, 60, 1) 7 +(9, 61, 1) 7 +(9, 62, 1) 7 +(9, 63, 1) 6 +(9, 64, 1) 6 +(9, 65, 1) 6 +(9, 66, 1) 5 +(9, 67, 1) 5 +(9, 68, 1) 5 +(9, 69, 1) 4 +(9, 70, 1) 4 +(9, 71, 1) 4 +(9, 72, 1) 3 +(9, 73, 1) 3 +(9, 74, 1) 2 +(9, 75, 1) 2 +(9, 76, 1) 1 +(9, 77, 1) 1 +(9, 78, 1) 0 +(9, 79, 1) 0 +(9, 80, 1) 0 +(10, 21, 1) 0 +(10, 22, 1) 1 +(10, 23, 1) 1 +(10, 24, 1) 2 +(10, 25, 1) 2 +(10, 26, 1) 3 +(10, 27, 1) 3 +(10, 28, 1) 4 +(10, 29, 1) 4 +(10, 30, 1) 4 +(10, 31, 1) 5 +(10, 32, 1) 5 +(10, 33, 1) 6 +(10, 34, 1) 6 +(10, 35, 1) 6 +(10, 36, 1) 7 +(10, 37, 1) 7 +(10, 38, 1) 7 +(10, 39, 1) 8 +(10, 40, 1) 8 +(10, 41, 1) 8 +(10, 42, 1) 8 +(10, 43, 1) 8 +(10, 44, 1) 9 +(10, 45, 1) 9 +(10, 46, 1) 9 +(10, 47, 1) 9 +(10, 48, 1) 9 +(10, 49, 1) 9 +(10, 50, 1) 9 +(10, 51, 1) 9 +(10, 52, 1) 9 +(10, 53, 1) 9 +(10, 54, 1) 9 +(10, 55, 1) 9 +(10, 56, 1) 9 +(10, 57, 1) 9 +(10, 58, 1) 8 +(10, 59, 1) 8 +(10, 60, 1) 8 +(10, 61, 1) 8 +(10, 62, 1) 8 +(10, 63, 1) 7 +(10, 64, 1) 7 +(10, 65, 1) 7 +(10, 66, 1) 6 +(10, 67, 1) 6 +(10, 68, 1) 6 +(10, 69, 1) 5 +(10, 70, 1) 5 +(10, 71, 1) 4 +(10, 72, 1) 4 +(10, 73, 1) 4 +(10, 74, 1) 3 +(10, 75, 1) 3 +(10, 76, 1) 2 +(10, 77, 1) 2 +(10, 78, 1) 1 +(10, 79, 1) 1 +(10, 80, 1) 0 +(11, 21, 1) 1 +(11, 22, 1) 1 +(11, 23, 1) 2 +(11, 24, 1) 2 +(11, 25, 1) 3 +(11, 26, 1) 3 +(11, 27, 1) 4 +(11, 28, 1) 4 +(11, 29, 1) 5 +(11, 30, 1) 5 +(11, 31, 1) 6 +(11, 32, 1) 6 +(11, 33, 1) 6 +(11, 34, 1) 7 +(11, 35, 1) 7 +(11, 36, 1) 8 +(11, 37, 1) 8 +(11, 38, 1) 8 +(11, 39, 1) 8 +(11, 40, 1) 9 +(11, 41, 1) 9 +(11, 42, 1) 9 +(11, 43, 1) 9 +(11, 44, 1) 9 +(11, 45, 1) 10 +(11, 46, 1) 10 +(11, 47, 1) 10 +(11, 48, 1) 10 +(11, 49, 1) 10 +(11, 50, 1) 10 +(11, 51, 1) 10 +(11, 52, 1) 10 +(11, 53, 1) 10 +(11, 54, 1) 10 +(11, 55, 1) 10 +(11, 56, 1) 10 +(11, 57, 1) 9 +(11, 58, 1) 9 +(11, 59, 1) 9 +(11, 60, 1) 9 +(11, 61, 1) 9 +(11, 62, 1) 8 +(11, 63, 1) 8 +(11, 64, 1) 8 +(11, 65, 1) 8 +(11, 66, 1) 7 +(11, 67, 1) 7 +(11, 68, 1) 6 +(11, 69, 1) 6 +(11, 70, 1) 6 +(11, 71, 1) 5 +(11, 72, 1) 5 +(11, 73, 1) 4 +(11, 74, 1) 4 +(11, 75, 1) 3 +(11, 76, 1) 3 +(11, 77, 1) 2 +(11, 78, 1) 2 +(11, 79, 1) 1 +(11, 80, 1) 1 +(12, 21, 1) 1 +(12, 22, 1) 2 +(12, 23, 1) 3 +(12, 24, 1) 3 +(12, 25, 1) 4 +(12, 26, 1) 4 +(12, 27, 1) 5 +(12, 28, 1) 5 +(12, 29, 1) 6 +(12, 30, 1) 6 +(12, 31, 1) 7 +(12, 32, 1) 7 +(12, 33, 1) 7 +(12, 34, 1) 8 +(12, 35, 1) 8 +(12, 36, 1) 8 +(12, 37, 1) 9 +(12, 38, 1) 9 +(12, 39, 1) 9 +(12, 40, 1) 10 +(12, 41, 1) 10 +(12, 42, 1) 10 +(12, 43, 1) 10 +(12, 44, 1) 10 +(12, 45, 1) 11 +(12, 46, 1) 11 +(12, 47, 1) 11 +(12, 48, 1) 11 +(12, 49, 1) 11 +(12, 50, 1) 11 +(12, 51, 1) 11 +(12, 52, 1) 11 +(12, 53, 1) 11 +(12, 54, 1) 11 +(12, 55, 1) 11 +(12, 56, 1) 11 +(12, 57, 1) 10 +(12, 58, 1) 10 +(12, 59, 1) 10 +(12, 60, 1) 10 +(12, 61, 1) 10 +(12, 62, 1) 9 +(12, 63, 1) 9 +(12, 64, 1) 9 +(12, 65, 1) 8 +(12, 66, 1) 8 +(12, 67, 1) 8 +(12, 68, 1) 7 +(12, 69, 1) 7 +(12, 70, 1) 7 +(12, 71, 1) 6 +(12, 72, 1) 6 +(12, 73, 1) 5 +(12, 74, 1) 5 +(12, 75, 1) 4 +(12, 76, 1) 4 +(12, 77, 1) 3 +(12, 78, 1) 3 +(12, 79, 1) 2 +(12, 80, 1) 1 +(13, 21, 1) 2 +(13, 22, 1) 3 +(13, 23, 1) 3 +(13, 24, 1) 4 +(13, 25, 1) 5 +(13, 26, 1) 5 +(13, 27, 1) 6 +(13, 28, 1) 6 +(13, 29, 1) 7 +(13, 30, 1) 7 +(13, 31, 1) 7 +(13, 32, 1) 8 +(13, 33, 1) 8 +(13, 34, 1) 9 +(13, 35, 1) 9 +(13, 36, 1) 9 +(13, 37, 1) 10 +(13, 38, 1) 10 +(13, 39, 1) 10 +(13, 40, 1) 11 +(13, 41, 1) 11 +(13, 42, 1) 11 +(13, 43, 1) 11 +(13, 44, 1) 11 +(13, 45, 1) 12 +(13, 46, 1) 12 +(13, 47, 1) 12 +(13, 48, 1) 12 +(13, 49, 1) 12 +(13, 50, 1) 12 +(13, 51, 1) 12 +(13, 52, 1) 12 +(13, 53, 1) 12 +(13, 54, 1) 12 +(13, 55, 1) 12 +(13, 56, 1) 12 +(13, 57, 1) 11 +(13, 58, 1) 11 +(13, 59, 1) 11 +(13, 60, 1) 11 +(13, 61, 1) 11 +(13, 62, 1) 10 +(13, 63, 1) 10 +(13, 64, 1) 10 +(13, 65, 1) 9 +(13, 66, 1) 9 +(13, 67, 1) 9 +(13, 68, 1) 8 +(13, 69, 1) 8 +(13, 70, 1) 7 +(13, 71, 1) 7 +(13, 72, 1) 7 +(13, 73, 1) 6 +(13, 74, 1) 6 +(13, 75, 1) 5 +(13, 76, 1) 5 +(13, 77, 1) 4 +(13, 78, 1) 3 +(13, 79, 1) 3 +(13, 80, 1) 2 +(14, 16, 1) 0 +(14, 17, 1) 1 +(14, 18, 1) 1 +(14, 19, 1) 2 +(14, 20, 1) 2 +(14, 21, 1) 3 +(14, 22, 1) 4 +(14, 23, 1) 4 +(14, 24, 1) 5 +(14, 25, 1) 5 +(14, 26, 1) 6 +(14, 27, 1) 6 +(14, 28, 1) 7 +(14, 29, 1) 7 +(14, 30, 1) 8 +(14, 31, 1) 8 +(14, 32, 1) 9 +(14, 33, 1) 9 +(14, 34, 1) 10 +(14, 35, 1) 10 +(14, 36, 1) 10 +(14, 37, 1) 11 +(14, 38, 1) 11 +(14, 39, 1) 11 +(14, 40, 1) 12 +(14, 41, 1) 12 +(14, 42, 1) 12 +(14, 43, 1) 12 +(14, 44, 1) 12 +(14, 45, 1) 13 +(14, 46, 1) 13 +(14, 47, 1) 13 +(14, 48, 1) 13 +(14, 49, 1) 13 +(14, 50, 1) 13 +(14, 51, 1) 13 +(14, 52, 1) 13 +(14, 53, 1) 13 +(14, 54, 1) 13 +(14, 55, 1) 13 +(14, 56, 1) 13 +(14, 57, 1) 12 +(14, 58, 1) 12 +(14, 59, 1) 12 +(14, 60, 1) 12 +(14, 61, 1) 12 +(14, 62, 1) 11 +(14, 63, 1) 11 +(14, 64, 1) 11 +(14, 65, 1) 10 +(14, 66, 1) 10 +(14, 67, 1) 10 +(14, 68, 1) 9 +(14, 69, 1) 9 +(14, 70, 1) 8 +(14, 71, 1) 8 +(14, 72, 1) 7 +(14, 73, 1) 7 +(14, 74, 1) 6 +(14, 75, 1) 6 +(14, 76, 1) 5 +(14, 77, 1) 5 +(14, 78, 1) 4 +(14, 79, 1) 4 +(14, 80, 1) 3 +(14, 81, 1) 2 +(14, 82, 1) 2 +(14, 83, 1) 1 +(14, 84, 1) 1 +(14, 85, 1) 0 +(15, 16, 1) 1 +(15, 17, 1) 1 +(15, 18, 1) 2 +(15, 19, 1) 3 +(15, 20, 1) 3 +(15, 21, 1) 4 +(15, 22, 1) 4 +(15, 23, 1) 5 +(15, 24, 1) 6 +(15, 25, 1) 6 +(15, 26, 1) 7 +(15, 27, 1) 7 +(15, 28, 1) 8 +(15, 29, 1) 8 +(15, 30, 1) 9 +(15, 31, 1) 9 +(15, 32, 1) 10 +(15, 33, 1) 10 +(15, 34, 1) 11 +(15, 35, 1) 11 +(15, 36, 1) 11 +(15, 37, 1) 12 +(15, 38, 1) 12 +(15, 39, 1) 12 +(15, 40, 1) 13 +(15, 41, 1) 13 +(15, 42, 1) 13 +(15, 43, 1) 13 +(15, 44, 1) 13 +(15, 45, 1) 14 +(15, 46, 1) 14 +(15, 47, 1) 14 +(15, 48, 1) 14 +(15, 49, 1) 14 +(15, 50, 1) 14 +(15, 51, 1) 14 +(15, 52, 1) 14 +(15, 53, 1) 14 +(15, 54, 1) 14 +(15, 55, 1) 14 +(15, 56, 1) 14 +(15, 57, 1) 13 +(15, 58, 1) 13 +(15, 59, 1) 13 +(15, 60, 1) 13 +(15, 61, 1) 13 +(15, 62, 1) 12 +(15, 63, 1) 12 +(15, 64, 1) 12 +(15, 65, 1) 11 +(15, 66, 1) 11 +(15, 67, 1) 11 +(15, 68, 1) 10 +(15, 69, 1) 10 +(15, 70, 1) 9 +(15, 71, 1) 9 +(15, 72, 1) 8 +(15, 73, 1) 8 +(15, 74, 1) 7 +(15, 75, 1) 7 +(15, 76, 1) 6 +(15, 77, 1) 6 +(15, 78, 1) 5 +(15, 79, 1) 4 +(15, 80, 1) 4 +(15, 81, 1) 3 +(15, 82, 1) 3 +(15, 83, 1) 2 +(15, 84, 1) 1 +(15, 85, 1) 1 +(16, 14, 1) 0 +(16, 15, 1) 1 +(16, 16, 1) 1 +(16, 17, 1) 2 +(16, 18, 1) 2 +(16, 19, 1) 3 +(16, 20, 1) 4 +(16, 21, 1) 4 +(16, 22, 1) 5 +(16, 23, 1) 6 +(16, 24, 1) 6 +(16, 25, 1) 7 +(16, 26, 1) 7 +(16, 27, 1) 8 +(16, 28, 1) 9 +(16, 29, 1) 9 +(16, 30, 1) 10 +(16, 31, 1) 10 +(16, 32, 1) 11 +(16, 33, 1) 11 +(16, 34, 1) 11 +(16, 35, 1) 12 +(16, 36, 1) 12 +(16, 37, 1) 13 +(16, 38, 1) 13 +(16, 39, 1) 13 +(16, 40, 1) 13 +(16, 41, 1) 14 +(16, 42, 1) 14 +(16, 43, 1) 14 +(16, 44, 1) 14 +(16, 45, 1) 15 +(16, 46, 1) 15 +(16, 47, 1) 15 +(16, 48, 1) 15 +(16, 49, 1) 15 +(16, 50, 1) 15 +(16, 51, 1) 15 +(16, 52, 1) 15 +(16, 53, 1) 15 +(16, 54, 1) 15 +(16, 55, 1) 15 +(16, 56, 1) 15 +(16, 57, 1) 14 +(16, 58, 1) 14 +(16, 59, 1) 14 +(16, 60, 1) 14 +(16, 61, 1) 13 +(16, 62, 1) 13 +(16, 63, 1) 13 +(16, 64, 1) 13 +(16, 65, 1) 12 +(16, 66, 1) 12 +(16, 67, 1) 11 +(16, 68, 1) 11 +(16, 69, 1) 11 +(16, 70, 1) 10 +(16, 71, 1) 10 +(16, 72, 1) 9 +(16, 73, 1) 9 +(16, 74, 1) 8 +(16, 75, 1) 7 +(16, 76, 1) 7 +(16, 77, 1) 6 +(16, 78, 1) 6 +(16, 79, 1) 5 +(16, 80, 1) 4 +(16, 81, 1) 4 +(16, 82, 1) 3 +(16, 83, 1) 2 +(16, 84, 1) 2 +(16, 85, 1) 1 +(16, 86, 1) 1 +(16, 87, 1) 0 +(17, 14, 1) 1 +(17, 15, 1) 1 +(17, 16, 1) 2 +(17, 17, 1) 3 +(17, 18, 1) 3 +(17, 19, 1) 4 +(17, 20, 1) 5 +(17, 21, 1) 5 +(17, 22, 1) 6 +(17, 23, 1) 6 +(17, 24, 1) 7 +(17, 25, 1) 8 +(17, 26, 1) 8 +(17, 27, 1) 9 +(17, 28, 1) 9 +(17, 29, 1) 10 +(17, 30, 1) 10 +(17, 31, 1) 11 +(17, 32, 1) 11 +(17, 33, 1) 12 +(17, 34, 1) 12 +(17, 35, 1) 13 +(17, 36, 1) 13 +(17, 37, 1) 13 +(17, 38, 1) 14 +(17, 39, 1) 14 +(17, 40, 1) 14 +(17, 41, 1) 15 +(17, 42, 1) 15 +(17, 43, 1) 15 +(17, 44, 1) 15 +(17, 45, 1) 16 +(17, 46, 1) 16 +(17, 47, 1) 16 +(17, 48, 1) 16 +(17, 49, 1) 16 +(17, 50, 1) 16 +(17, 51, 1) 16 +(17, 52, 1) 16 +(17, 53, 1) 16 +(17, 54, 1) 16 +(17, 55, 1) 16 +(17, 56, 1) 16 +(17, 57, 1) 15 +(17, 58, 1) 15 +(17, 59, 1) 15 +(17, 60, 1) 15 +(17, 61, 1) 14 +(17, 62, 1) 14 +(17, 63, 1) 14 +(17, 64, 1) 13 +(17, 65, 1) 13 +(17, 66, 1) 13 +(17, 67, 1) 12 +(17, 68, 1) 12 +(17, 69, 1) 11 +(17, 70, 1) 11 +(17, 71, 1) 10 +(17, 72, 1) 10 +(17, 73, 1) 9 +(17, 74, 1) 9 +(17, 75, 1) 8 +(17, 76, 1) 8 +(17, 77, 1) 7 +(17, 78, 1) 6 +(17, 79, 1) 6 +(17, 80, 1) 5 +(17, 81, 1) 5 +(17, 82, 1) 4 +(17, 83, 1) 3 +(17, 84, 1) 3 +(17, 85, 1) 2 +(17, 86, 1) 1 +(17, 87, 1) 1 +(18, 14, 1) 1 +(18, 15, 1) 2 +(18, 16, 1) 3 +(18, 17, 1) 3 +(18, 18, 1) 4 +(18, 19, 1) 5 +(18, 20, 1) 5 +(18, 21, 1) 6 +(18, 22, 1) 7 +(18, 23, 1) 7 +(18, 24, 1) 8 +(18, 25, 1) 8 +(18, 26, 1) 9 +(18, 27, 1) 10 +(18, 28, 1) 10 +(18, 29, 1) 11 +(18, 30, 1) 11 +(18, 31, 1) 12 +(18, 32, 1) 12 +(18, 33, 1) 13 +(18, 34, 1) 13 +(18, 35, 1) 14 +(18, 36, 1) 14 +(18, 37, 1) 14 +(18, 38, 1) 15 +(18, 39, 1) 15 +(18, 40, 1) 15 +(18, 41, 1) 16 +(18, 42, 1) 16 +(18, 43, 1) 16 +(18, 44, 1) 16 +(18, 45, 1) 17 +(18, 46, 1) 17 +(18, 47, 1) 17 +(18, 48, 1) 17 +(18, 49, 1) 17 +(18, 50, 1) 17 +(18, 51, 1) 17 +(18, 52, 1) 17 +(18, 53, 1) 17 +(18, 54, 1) 17 +(18, 55, 1) 17 +(18, 56, 1) 17 +(18, 57, 1) 16 +(18, 58, 1) 16 +(18, 59, 1) 16 +(18, 60, 1) 16 +(18, 61, 1) 15 +(18, 62, 1) 15 +(18, 63, 1) 15 +(18, 64, 1) 14 +(18, 65, 1) 14 +(18, 66, 1) 14 +(18, 67, 1) 13 +(18, 68, 1) 13 +(18, 69, 1) 12 +(18, 70, 1) 12 +(18, 71, 1) 11 +(18, 72, 1) 11 +(18, 73, 1) 10 +(18, 74, 1) 10 +(18, 75, 1) 9 +(18, 76, 1) 8 +(18, 77, 1) 8 +(18, 78, 1) 7 +(18, 79, 1) 7 +(18, 80, 1) 6 +(18, 81, 1) 5 +(18, 82, 1) 5 +(18, 83, 1) 4 +(18, 84, 1) 3 +(18, 85, 1) 3 +(18, 86, 1) 2 +(18, 87, 1) 1 +(19, 14, 1) 2 +(19, 15, 1) 3 +(19, 16, 1) 3 +(19, 17, 1) 4 +(19, 18, 1) 5 +(19, 19, 1) 5 +(19, 20, 1) 6 +(19, 21, 1) 7 +(19, 22, 1) 7 +(19, 23, 1) 8 +(19, 24, 1) 9 +(19, 25, 1) 9 +(19, 26, 1) 10 +(19, 27, 1) 10 +(19, 28, 1) 11 +(19, 29, 1) 12 +(19, 30, 1) 12 +(19, 31, 1) 13 +(19, 32, 1) 13 +(19, 33, 1) 14 +(19, 34, 1) 14 +(19, 35, 1) 15 +(19, 36, 1) 15 +(19, 37, 1) 15 +(19, 38, 1) 16 +(19, 39, 1) 16 +(19, 40, 1) 16 +(19, 41, 1) 17 +(19, 42, 1) 17 +(19, 43, 1) 17 +(19, 44, 1) 17 +(19, 45, 1) 18 +(19, 46, 1) 18 +(19, 47, 1) 18 +(19, 48, 1) 18 +(19, 49, 1) 18 +(19, 50, 1) 18 +(19, 51, 1) 18 +(19, 52, 1) 18 +(19, 53, 1) 18 +(19, 54, 1) 18 +(19, 55, 1) 18 +(19, 56, 1) 18 +(19, 57, 1) 17 +(19, 58, 1) 17 +(19, 59, 1) 17 +(19, 60, 1) 17 +(19, 61, 1) 16 +(19, 62, 1) 16 +(19, 63, 1) 16 +(19, 64, 1) 15 +(19, 65, 1) 15 +(19, 66, 1) 15 +(19, 67, 1) 14 +(19, 68, 1) 14 +(19, 69, 1) 13 +(19, 70, 1) 13 +(19, 71, 1) 12 +(19, 72, 1) 12 +(19, 73, 1) 11 +(19, 74, 1) 10 +(19, 75, 1) 10 +(19, 76, 1) 9 +(19, 77, 1) 9 +(19, 78, 1) 8 +(19, 79, 1) 7 +(19, 80, 1) 7 +(19, 81, 1) 6 +(19, 82, 1) 5 +(19, 83, 1) 5 +(19, 84, 1) 4 +(19, 85, 1) 3 +(19, 86, 1) 3 +(19, 87, 1) 2 +(20, 14, 1) 3 +(20, 15, 1) 3 +(20, 16, 1) 4 +(20, 17, 1) 5 +(20, 18, 1) 5 +(20, 19, 1) 6 +(20, 20, 1) 7 +(20, 21, 1) 7 +(20, 22, 1) 8 +(20, 23, 1) 9 +(20, 24, 1) 9 +(20, 25, 1) 10 +(20, 26, 1) 11 +(20, 27, 1) 11 +(20, 28, 1) 12 +(20, 29, 1) 12 +(20, 30, 1) 13 +(20, 31, 1) 14 +(20, 32, 1) 14 +(20, 33, 1) 15 +(20, 34, 1) 15 +(20, 35, 1) 15 +(20, 36, 1) 16 +(20, 37, 1) 16 +(20, 38, 1) 17 +(20, 39, 1) 17 +(20, 40, 1) 17 +(20, 41, 1) 18 +(20, 42, 1) 18 +(20, 43, 1) 18 +(20, 44, 1) 18 +(20, 45, 1) 19 +(20, 46, 1) 19 +(20, 47, 1) 19 +(20, 48, 1) 19 +(20, 49, 1) 19 +(20, 50, 1) 19 +(20, 51, 1) 19 +(20, 52, 1) 19 +(20, 53, 1) 19 +(20, 54, 1) 19 +(20, 55, 1) 19 +(20, 56, 1) 19 +(20, 57, 1) 18 +(20, 58, 1) 18 +(20, 59, 1) 18 +(20, 60, 1) 18 +(20, 61, 1) 17 +(20, 62, 1) 17 +(20, 63, 1) 17 +(20, 64, 1) 16 +(20, 65, 1) 16 +(20, 66, 1) 15 +(20, 67, 1) 15 +(20, 68, 1) 15 +(20, 69, 1) 14 +(20, 70, 1) 14 +(20, 71, 1) 13 +(20, 72, 1) 12 +(20, 73, 1) 12 +(20, 74, 1) 11 +(20, 75, 1) 11 +(20, 76, 1) 10 +(20, 77, 1) 9 +(20, 78, 1) 9 +(20, 79, 1) 8 +(20, 80, 1) 7 +(20, 81, 1) 7 +(20, 82, 1) 6 +(20, 83, 1) 5 +(20, 84, 1) 5 +(20, 85, 1) 4 +(20, 86, 1) 3 +(20, 87, 1) 3 +(21, 9, 1) 0 +(21, 10, 1) 0 +(21, 11, 1) 1 +(21, 12, 1) 1 +(21, 13, 1) 2 +(21, 14, 1) 3 +(21, 15, 1) 4 +(21, 16, 1) 4 +(21, 17, 1) 5 +(21, 18, 1) 6 +(21, 19, 1) 7 +(21, 20, 1) 7 +(21, 21, 1) 8 +(21, 22, 1) 9 +(21, 23, 1) 9 +(21, 24, 1) 10 +(21, 25, 1) 11 +(21, 26, 1) 11 +(21, 27, 1) 12 +(21, 28, 1) 13 +(21, 29, 1) 13 +(21, 30, 1) 14 +(21, 31, 1) 14 +(21, 32, 1) 15 +(21, 33, 1) 15 +(21, 34, 1) 16 +(21, 35, 1) 16 +(21, 36, 1) 17 +(21, 37, 1) 17 +(21, 38, 1) 18 +(21, 39, 1) 18 +(21, 40, 1) 18 +(21, 41, 1) 19 +(21, 42, 1) 19 +(21, 43, 1) 19 +(21, 44, 1) 19 +(21, 45, 1) 20 +(21, 46, 1) 20 +(21, 47, 1) 20 +(21, 48, 1) 20 +(21, 49, 1) 20 +(21, 50, 1) 20 +(21, 51, 1) 20 +(21, 52, 1) 20 +(21, 53, 1) 20 +(21, 54, 1) 20 +(21, 55, 1) 20 +(21, 56, 1) 20 +(21, 57, 1) 19 +(21, 58, 1) 19 +(21, 59, 1) 19 +(21, 60, 1) 19 +(21, 61, 1) 18 +(21, 62, 1) 18 +(21, 63, 1) 18 +(21, 64, 1) 17 +(21, 65, 1) 17 +(21, 66, 1) 16 +(21, 67, 1) 16 +(21, 68, 1) 15 +(21, 69, 1) 15 +(21, 70, 1) 14 +(21, 71, 1) 14 +(21, 72, 1) 13 +(21, 73, 1) 13 +(21, 74, 1) 12 +(21, 75, 1) 11 +(21, 76, 1) 11 +(21, 77, 1) 10 +(21, 78, 1) 9 +(21, 79, 1) 9 +(21, 80, 1) 8 +(21, 81, 1) 7 +(21, 82, 1) 7 +(21, 83, 1) 6 +(21, 84, 1) 5 +(21, 85, 1) 4 +(21, 86, 1) 4 +(21, 87, 1) 3 +(21, 88, 1) 2 +(21, 89, 1) 1 +(21, 90, 1) 1 +(21, 91, 1) 0 +(21, 92, 1) 0 +(22, 9, 1) 0 +(22, 10, 1) 1 +(22, 11, 1) 1 +(22, 12, 1) 2 +(22, 13, 1) 3 +(22, 14, 1) 4 +(22, 15, 1) 4 +(22, 16, 1) 5 +(22, 17, 1) 6 +(22, 18, 1) 7 +(22, 19, 1) 7 +(22, 20, 1) 8 +(22, 21, 1) 9 +(22, 22, 1) 9 +(22, 23, 1) 10 +(22, 24, 1) 11 +(22, 25, 1) 12 +(22, 26, 1) 12 +(22, 27, 1) 13 +(22, 28, 1) 13 +(22, 29, 1) 14 +(22, 30, 1) 15 +(22, 31, 1) 15 +(22, 32, 1) 16 +(22, 33, 1) 16 +(22, 34, 1) 17 +(22, 35, 1) 17 +(22, 36, 1) 18 +(22, 37, 1) 18 +(22, 38, 1) 18 +(22, 39, 1) 19 +(22, 40, 1) 19 +(22, 41, 1) 20 +(22, 42, 1) 20 +(22, 43, 1) 20 +(22, 44, 1) 20 +(22, 45, 1) 20 +(22, 46, 1) 21 +(22, 47, 1) 21 +(22, 48, 1) 21 +(22, 49, 1) 21 +(22, 50, 1) 21 +(22, 51, 1) 21 +(22, 52, 1) 21 +(22, 53, 1) 21 +(22, 54, 1) 21 +(22, 55, 1) 21 +(22, 56, 1) 20 +(22, 57, 1) 20 +(22, 58, 1) 20 +(22, 59, 1) 20 +(22, 60, 1) 20 +(22, 61, 1) 19 +(22, 62, 1) 19 +(22, 63, 1) 18 +(22, 64, 1) 18 +(22, 65, 1) 18 +(22, 66, 1) 17 +(22, 67, 1) 17 +(22, 68, 1) 16 +(22, 69, 1) 16 +(22, 70, 1) 15 +(22, 71, 1) 15 +(22, 72, 1) 14 +(22, 73, 1) 13 +(22, 74, 1) 13 +(22, 75, 1) 12 +(22, 76, 1) 12 +(22, 77, 1) 11 +(22, 78, 1) 10 +(22, 79, 1) 9 +(22, 80, 1) 9 +(22, 81, 1) 8 +(22, 82, 1) 7 +(22, 83, 1) 7 +(22, 84, 1) 6 +(22, 85, 1) 5 +(22, 86, 1) 4 +(22, 87, 1) 4 +(22, 88, 1) 3 +(22, 89, 1) 2 +(22, 90, 1) 1 +(22, 91, 1) 1 +(22, 92, 1) 0 +(23, 9, 1) 0 +(23, 10, 1) 1 +(23, 11, 1) 2 +(23, 12, 1) 3 +(23, 13, 1) 3 +(23, 14, 1) 4 +(23, 15, 1) 5 +(23, 16, 1) 6 +(23, 17, 1) 7 +(23, 18, 1) 7 +(23, 19, 1) 8 +(23, 20, 1) 9 +(23, 21, 1) 9 +(23, 22, 1) 10 +(23, 23, 1) 11 +(23, 24, 1) 12 +(23, 25, 1) 12 +(23, 26, 1) 13 +(23, 27, 1) 14 +(23, 28, 1) 14 +(23, 29, 1) 15 +(23, 30, 1) 15 +(23, 31, 1) 16 +(23, 32, 1) 17 +(23, 33, 1) 17 +(23, 34, 1) 18 +(23, 35, 1) 18 +(23, 36, 1) 19 +(23, 37, 1) 19 +(23, 38, 1) 19 +(23, 39, 1) 20 +(23, 40, 1) 20 +(23, 41, 1) 20 +(23, 42, 1) 21 +(23, 43, 1) 21 +(23, 44, 1) 21 +(23, 45, 1) 21 +(23, 46, 1) 22 +(23, 47, 1) 22 +(23, 48, 1) 22 +(23, 49, 1) 22 +(23, 50, 1) 22 +(23, 51, 1) 22 +(23, 52, 1) 22 +(23, 53, 1) 22 +(23, 54, 1) 22 +(23, 55, 1) 22 +(23, 56, 1) 21 +(23, 57, 1) 21 +(23, 58, 1) 21 +(23, 59, 1) 21 +(23, 60, 1) 20 +(23, 61, 1) 20 +(23, 62, 1) 20 +(23, 63, 1) 19 +(23, 64, 1) 19 +(23, 65, 1) 19 +(23, 66, 1) 18 +(23, 67, 1) 18 +(23, 68, 1) 17 +(23, 69, 1) 17 +(23, 70, 1) 16 +(23, 71, 1) 15 +(23, 72, 1) 15 +(23, 73, 1) 14 +(23, 74, 1) 14 +(23, 75, 1) 13 +(23, 76, 1) 12 +(23, 77, 1) 12 +(23, 78, 1) 11 +(23, 79, 1) 10 +(23, 80, 1) 9 +(23, 81, 1) 9 +(23, 82, 1) 8 +(23, 83, 1) 7 +(23, 84, 1) 7 +(23, 85, 1) 6 +(23, 86, 1) 5 +(23, 87, 1) 4 +(23, 88, 1) 3 +(23, 89, 1) 3 +(23, 90, 1) 2 +(23, 91, 1) 1 +(23, 92, 1) 0 +(24, 9, 1) 1 +(24, 10, 1) 2 +(24, 11, 1) 2 +(24, 12, 1) 3 +(24, 13, 1) 4 +(24, 14, 1) 5 +(24, 15, 1) 6 +(24, 16, 1) 6 +(24, 17, 1) 7 +(24, 18, 1) 8 +(24, 19, 1) 9 +(24, 20, 1) 9 +(24, 21, 1) 10 +(24, 22, 1) 11 +(24, 23, 1) 12 +(24, 24, 1) 12 +(24, 25, 1) 13 +(24, 26, 1) 14 +(24, 27, 1) 14 +(24, 28, 1) 15 +(24, 29, 1) 16 +(24, 30, 1) 16 +(24, 31, 1) 17 +(24, 32, 1) 17 +(24, 33, 1) 18 +(24, 34, 1) 18 +(24, 35, 1) 19 +(24, 36, 1) 19 +(24, 37, 1) 20 +(24, 38, 1) 20 +(24, 39, 1) 21 +(24, 40, 1) 21 +(24, 41, 1) 21 +(24, 42, 1) 22 +(24, 43, 1) 22 +(24, 44, 1) 22 +(24, 45, 1) 22 +(24, 46, 1) 23 +(24, 47, 1) 23 +(24, 48, 1) 23 +(24, 49, 1) 23 +(24, 50, 1) 23 +(24, 51, 1) 23 +(24, 52, 1) 23 +(24, 53, 1) 23 +(24, 54, 1) 23 +(24, 55, 1) 23 +(24, 56, 1) 22 +(24, 57, 1) 22 +(24, 58, 1) 22 +(24, 59, 1) 22 +(24, 60, 1) 21 +(24, 61, 1) 21 +(24, 62, 1) 21 +(24, 63, 1) 20 +(24, 64, 1) 20 +(24, 65, 1) 19 +(24, 66, 1) 19 +(24, 67, 1) 18 +(24, 68, 1) 18 +(24, 69, 1) 17 +(24, 70, 1) 17 +(24, 71, 1) 16 +(24, 72, 1) 16 +(24, 73, 1) 15 +(24, 74, 1) 14 +(24, 75, 1) 14 +(24, 76, 1) 13 +(24, 77, 1) 12 +(24, 78, 1) 12 +(24, 79, 1) 11 +(24, 80, 1) 10 +(24, 81, 1) 9 +(24, 82, 1) 9 +(24, 83, 1) 8 +(24, 84, 1) 7 +(24, 85, 1) 6 +(24, 86, 1) 6 +(24, 87, 1) 5 +(24, 88, 1) 4 +(24, 89, 1) 3 +(24, 90, 1) 2 +(24, 91, 1) 2 +(24, 92, 1) 1 +(25, 9, 1) 1 +(25, 10, 1) 2 +(25, 11, 1) 3 +(25, 12, 1) 4 +(25, 13, 1) 5 +(25, 14, 1) 5 +(25, 15, 1) 6 +(25, 16, 1) 7 +(25, 17, 1) 8 +(25, 18, 1) 9 +(25, 19, 1) 9 +(25, 20, 1) 10 +(25, 21, 1) 11 +(25, 22, 1) 12 +(25, 23, 1) 12 +(25, 24, 1) 13 +(25, 25, 1) 14 +(25, 26, 1) 14 +(25, 27, 1) 15 +(25, 28, 1) 16 +(25, 29, 1) 16 +(25, 30, 1) 17 +(25, 31, 1) 18 +(25, 32, 1) 18 +(25, 33, 1) 19 +(25, 34, 1) 19 +(25, 35, 1) 20 +(25, 36, 1) 20 +(25, 37, 1) 21 +(25, 38, 1) 21 +(25, 39, 1) 22 +(25, 40, 1) 22 +(25, 41, 1) 22 +(25, 42, 1) 23 +(25, 43, 1) 23 +(25, 44, 1) 23 +(25, 45, 1) 23 +(25, 46, 1) 24 +(25, 47, 1) 24 +(25, 48, 1) 24 +(25, 49, 1) 24 +(25, 50, 1) 24 +(25, 51, 1) 24 +(25, 52, 1) 24 +(25, 53, 1) 24 +(25, 54, 1) 24 +(25, 55, 1) 24 +(25, 56, 1) 23 +(25, 57, 1) 23 +(25, 58, 1) 23 +(25, 59, 1) 23 +(25, 60, 1) 22 +(25, 61, 1) 22 +(25, 62, 1) 22 +(25, 63, 1) 21 +(25, 64, 1) 21 +(25, 65, 1) 20 +(25, 66, 1) 20 +(25, 67, 1) 19 +(25, 68, 1) 19 +(25, 69, 1) 18 +(25, 70, 1) 18 +(25, 71, 1) 17 +(25, 72, 1) 16 +(25, 73, 1) 16 +(25, 74, 1) 15 +(25, 75, 1) 14 +(25, 76, 1) 14 +(25, 77, 1) 13 +(25, 78, 1) 12 +(25, 79, 1) 12 +(25, 80, 1) 11 +(25, 81, 1) 10 +(25, 82, 1) 9 +(25, 83, 1) 9 +(25, 84, 1) 8 +(25, 85, 1) 7 +(25, 86, 1) 6 +(25, 87, 1) 5 +(25, 88, 1) 5 +(25, 89, 1) 4 +(25, 90, 1) 3 +(25, 91, 1) 2 +(25, 92, 1) 1 +(26, 6, 1) 0 +(26, 7, 1) 0 +(26, 8, 1) 1 +(26, 9, 1) 2 +(26, 10, 1) 3 +(26, 11, 1) 3 +(26, 12, 1) 4 +(26, 13, 1) 5 +(26, 14, 1) 6 +(26, 15, 1) 7 +(26, 16, 1) 7 +(26, 17, 1) 8 +(26, 18, 1) 9 +(26, 19, 1) 10 +(26, 20, 1) 11 +(26, 21, 1) 11 +(26, 22, 1) 12 +(26, 23, 1) 13 +(26, 24, 1) 14 +(26, 25, 1) 14 +(26, 26, 1) 15 +(26, 27, 1) 16 +(26, 28, 1) 16 +(26, 29, 1) 17 +(26, 30, 1) 18 +(26, 31, 1) 18 +(26, 32, 1) 19 +(26, 33, 1) 19 +(26, 34, 1) 20 +(26, 35, 1) 21 +(26, 36, 1) 21 +(26, 37, 1) 22 +(26, 38, 1) 22 +(26, 39, 1) 22 +(26, 40, 1) 23 +(26, 41, 1) 23 +(26, 42, 1) 24 +(26, 43, 1) 24 +(26, 44, 1) 24 +(26, 45, 1) 24 +(26, 46, 1) 25 +(26, 47, 1) 25 +(26, 48, 1) 25 +(26, 49, 1) 25 +(26, 50, 1) 25 +(26, 51, 1) 25 +(26, 52, 1) 25 +(26, 53, 1) 25 +(26, 54, 1) 25 +(26, 55, 1) 25 +(26, 56, 1) 24 +(26, 57, 1) 24 +(26, 58, 1) 24 +(26, 59, 1) 24 +(26, 60, 1) 23 +(26, 61, 1) 23 +(26, 62, 1) 22 +(26, 63, 1) 22 +(26, 64, 1) 22 +(26, 65, 1) 21 +(26, 66, 1) 21 +(26, 67, 1) 20 +(26, 68, 1) 19 +(26, 69, 1) 19 +(26, 70, 1) 18 +(26, 71, 1) 18 +(26, 72, 1) 17 +(26, 73, 1) 16 +(26, 74, 1) 16 +(26, 75, 1) 15 +(26, 76, 1) 14 +(26, 77, 1) 14 +(26, 78, 1) 13 +(26, 79, 1) 12 +(26, 80, 1) 11 +(26, 81, 1) 11 +(26, 82, 1) 10 +(26, 83, 1) 9 +(26, 84, 1) 8 +(26, 85, 1) 7 +(26, 86, 1) 7 +(26, 87, 1) 6 +(26, 88, 1) 5 +(26, 89, 1) 4 +(26, 90, 1) 3 +(26, 91, 1) 3 +(26, 92, 1) 2 +(26, 93, 1) 1 +(26, 94, 1) 0 +(26, 95, 1) 0 +(27, 6, 1) 0 +(27, 7, 1) 0 +(27, 8, 1) 1 +(27, 9, 1) 2 +(27, 10, 1) 3 +(27, 11, 1) 4 +(27, 12, 1) 5 +(27, 13, 1) 6 +(27, 14, 1) 6 +(27, 15, 1) 7 +(27, 16, 1) 8 +(27, 17, 1) 9 +(27, 18, 1) 10 +(27, 19, 1) 10 +(27, 20, 1) 11 +(27, 21, 1) 12 +(27, 22, 1) 13 +(27, 23, 1) 14 +(27, 24, 1) 14 +(27, 25, 1) 15 +(27, 26, 1) 16 +(27, 27, 1) 16 +(27, 28, 1) 17 +(27, 29, 1) 18 +(27, 30, 1) 18 +(27, 31, 1) 19 +(27, 32, 1) 20 +(27, 33, 1) 20 +(27, 34, 1) 21 +(27, 35, 1) 21 +(27, 36, 1) 22 +(27, 37, 1) 22 +(27, 38, 1) 23 +(27, 39, 1) 23 +(27, 40, 1) 24 +(27, 41, 1) 24 +(27, 42, 1) 25 +(27, 43, 1) 25 +(27, 44, 1) 25 +(27, 45, 1) 25 +(27, 46, 1) 26 +(27, 47, 1) 26 +(27, 48, 1) 26 +(27, 49, 1) 26 +(27, 50, 1) 26 +(27, 51, 1) 26 +(27, 52, 1) 26 +(27, 53, 1) 26 +(27, 54, 1) 26 +(27, 55, 1) 26 +(27, 56, 1) 25 +(27, 57, 1) 25 +(27, 58, 1) 25 +(27, 59, 1) 25 +(27, 60, 1) 24 +(27, 61, 1) 24 +(27, 62, 1) 23 +(27, 63, 1) 23 +(27, 64, 1) 22 +(27, 65, 1) 22 +(27, 66, 1) 21 +(27, 67, 1) 21 +(27, 68, 1) 20 +(27, 69, 1) 20 +(27, 70, 1) 19 +(27, 71, 1) 18 +(27, 72, 1) 18 +(27, 73, 1) 17 +(27, 74, 1) 16 +(27, 75, 1) 16 +(27, 76, 1) 15 +(27, 77, 1) 14 +(27, 78, 1) 14 +(27, 79, 1) 13 +(27, 80, 1) 12 +(27, 81, 1) 11 +(27, 82, 1) 10 +(27, 83, 1) 10 +(27, 84, 1) 9 +(27, 85, 1) 8 +(27, 86, 1) 7 +(27, 87, 1) 6 +(27, 88, 1) 6 +(27, 89, 1) 5 +(27, 90, 1) 4 +(27, 91, 1) 3 +(27, 92, 1) 2 +(27, 93, 1) 1 +(27, 94, 1) 0 +(27, 95, 1) 0 +(28, 6, 1) 0 +(28, 7, 1) 1 +(28, 8, 1) 2 +(28, 9, 1) 3 +(28, 10, 1) 4 +(28, 11, 1) 4 +(28, 12, 1) 5 +(28, 13, 1) 6 +(28, 14, 1) 7 +(28, 15, 1) 8 +(28, 16, 1) 9 +(28, 17, 1) 9 +(28, 18, 1) 10 +(28, 19, 1) 11 +(28, 20, 1) 12 +(28, 21, 1) 13 +(28, 22, 1) 13 +(28, 23, 1) 14 +(28, 24, 1) 15 +(28, 25, 1) 16 +(28, 26, 1) 16 +(28, 27, 1) 17 +(28, 28, 1) 18 +(28, 29, 1) 19 +(28, 30, 1) 19 +(28, 31, 1) 20 +(28, 32, 1) 20 +(28, 33, 1) 21 +(28, 34, 1) 22 +(28, 35, 1) 22 +(28, 36, 1) 23 +(28, 37, 1) 23 +(28, 38, 1) 24 +(28, 39, 1) 24 +(28, 40, 1) 25 +(28, 41, 1) 25 +(28, 42, 1) 25 +(28, 43, 1) 26 +(28, 44, 1) 26 +(28, 45, 1) 26 +(28, 46, 1) 27 +(28, 47, 1) 27 +(28, 48, 1) 27 +(28, 49, 1) 27 +(28, 50, 1) 27 +(28, 51, 1) 27 +(28, 52, 1) 27 +(28, 53, 1) 27 +(28, 54, 1) 27 +(28, 55, 1) 27 +(28, 56, 1) 26 +(28, 57, 1) 26 +(28, 58, 1) 26 +(28, 59, 1) 25 +(28, 60, 1) 25 +(28, 61, 1) 25 +(28, 62, 1) 24 +(28, 63, 1) 24 +(28, 64, 1) 23 +(28, 65, 1) 23 +(28, 66, 1) 22 +(28, 67, 1) 22 +(28, 68, 1) 21 +(28, 69, 1) 20 +(28, 70, 1) 20 +(28, 71, 1) 19 +(28, 72, 1) 19 +(28, 73, 1) 18 +(28, 74, 1) 17 +(28, 75, 1) 16 +(28, 76, 1) 16 +(28, 77, 1) 15 +(28, 78, 1) 14 +(28, 79, 1) 13 +(28, 80, 1) 13 +(28, 81, 1) 12 +(28, 82, 1) 11 +(28, 83, 1) 10 +(28, 84, 1) 9 +(28, 85, 1) 9 +(28, 86, 1) 8 +(28, 87, 1) 7 +(28, 88, 1) 6 +(28, 89, 1) 5 +(28, 90, 1) 4 +(28, 91, 1) 4 +(28, 92, 1) 3 +(28, 93, 1) 2 +(28, 94, 1) 1 +(28, 95, 1) 0 +(29, 6, 1) 1 +(29, 7, 1) 1 +(29, 8, 1) 2 +(29, 9, 1) 3 +(29, 10, 1) 4 +(29, 11, 1) 5 +(29, 12, 1) 6 +(29, 13, 1) 7 +(29, 14, 1) 7 +(29, 15, 1) 8 +(29, 16, 1) 9 +(29, 17, 1) 10 +(29, 18, 1) 11 +(29, 19, 1) 12 +(29, 20, 1) 12 +(29, 21, 1) 13 +(29, 22, 1) 14 +(29, 23, 1) 15 +(29, 24, 1) 16 +(29, 25, 1) 16 +(29, 26, 1) 17 +(29, 27, 1) 18 +(29, 28, 1) 19 +(29, 29, 1) 19 +(29, 30, 1) 20 +(29, 31, 1) 21 +(29, 32, 1) 21 +(29, 33, 1) 22 +(29, 34, 1) 23 +(29, 35, 1) 23 +(29, 36, 1) 24 +(29, 37, 1) 24 +(29, 38, 1) 25 +(29, 39, 1) 25 +(29, 40, 1) 26 +(29, 41, 1) 26 +(29, 42, 1) 26 +(29, 43, 1) 27 +(29, 44, 1) 27 +(29, 45, 1) 27 +(29, 46, 1) 28 +(29, 47, 1) 28 +(29, 48, 1) 28 +(29, 49, 1) 28 +(29, 50, 1) 28 +(29, 51, 1) 28 +(29, 52, 1) 28 +(29, 53, 1) 28 +(29, 54, 1) 28 +(29, 55, 1) 28 +(29, 56, 1) 27 +(29, 57, 1) 27 +(29, 58, 1) 27 +(29, 59, 1) 26 +(29, 60, 1) 26 +(29, 61, 1) 26 +(29, 62, 1) 25 +(29, 63, 1) 25 +(29, 64, 1) 24 +(29, 65, 1) 24 +(29, 66, 1) 23 +(29, 67, 1) 23 +(29, 68, 1) 22 +(29, 69, 1) 21 +(29, 70, 1) 21 +(29, 71, 1) 20 +(29, 72, 1) 19 +(29, 73, 1) 19 +(29, 74, 1) 18 +(29, 75, 1) 17 +(29, 76, 1) 16 +(29, 77, 1) 16 +(29, 78, 1) 15 +(29, 79, 1) 14 +(29, 80, 1) 13 +(29, 81, 1) 12 +(29, 82, 1) 12 +(29, 83, 1) 11 +(29, 84, 1) 10 +(29, 85, 1) 9 +(29, 86, 1) 8 +(29, 87, 1) 7 +(29, 88, 1) 7 +(29, 89, 1) 6 +(29, 90, 1) 5 +(29, 91, 1) 4 +(29, 92, 1) 3 +(29, 93, 1) 2 +(29, 94, 1) 1 +(29, 95, 1) 1 +(30, 6, 1) 1 +(30, 7, 1) 2 +(30, 8, 1) 3 +(30, 9, 1) 4 +(30, 10, 1) 5 +(30, 11, 1) 5 +(30, 12, 1) 6 +(30, 13, 1) 7 +(30, 14, 1) 8 +(30, 15, 1) 9 +(30, 16, 1) 10 +(30, 17, 1) 11 +(30, 18, 1) 11 +(30, 19, 1) 12 +(30, 20, 1) 13 +(30, 21, 1) 14 +(30, 22, 1) 15 +(30, 23, 1) 15 +(30, 24, 1) 16 +(30, 25, 1) 17 +(30, 26, 1) 18 +(30, 27, 1) 19 +(30, 28, 1) 19 +(30, 29, 1) 20 +(30, 30, 1) 21 +(30, 31, 1) 21 +(30, 32, 1) 22 +(30, 33, 1) 23 +(30, 34, 1) 23 +(30, 35, 1) 24 +(30, 36, 1) 24 +(30, 37, 1) 25 +(30, 38, 1) 26 +(30, 39, 1) 26 +(30, 40, 1) 27 +(30, 41, 1) 27 +(30, 42, 1) 27 +(30, 43, 1) 28 +(30, 44, 1) 28 +(30, 45, 1) 28 +(30, 46, 1) 29 +(30, 47, 1) 29 +(30, 48, 1) 29 +(30, 49, 1) 29 +(30, 50, 1) 29 +(30, 51, 1) 29 +(30, 52, 1) 29 +(30, 53, 1) 29 +(30, 54, 1) 29 +(30, 55, 1) 29 +(30, 56, 1) 28 +(30, 57, 1) 28 +(30, 58, 1) 28 +(30, 59, 1) 27 +(30, 60, 1) 27 +(30, 61, 1) 27 +(30, 62, 1) 26 +(30, 63, 1) 26 +(30, 64, 1) 25 +(30, 65, 1) 24 +(30, 66, 1) 24 +(30, 67, 1) 23 +(30, 68, 1) 23 +(30, 69, 1) 22 +(30, 70, 1) 21 +(30, 71, 1) 21 +(30, 72, 1) 20 +(30, 73, 1) 19 +(30, 74, 1) 19 +(30, 75, 1) 18 +(30, 76, 1) 17 +(30, 77, 1) 16 +(30, 78, 1) 15 +(30, 79, 1) 15 +(30, 80, 1) 14 +(30, 81, 1) 13 +(30, 82, 1) 12 +(30, 83, 1) 11 +(30, 84, 1) 11 +(30, 85, 1) 10 +(30, 86, 1) 9 +(30, 87, 1) 8 +(30, 88, 1) 7 +(30, 89, 1) 6 +(30, 90, 1) 5 +(30, 91, 1) 5 +(30, 92, 1) 4 +(30, 93, 1) 3 +(30, 94, 1) 2 +(30, 95, 1) 1 +(31, 6, 1) 1 +(31, 7, 1) 2 +(31, 8, 1) 3 +(31, 9, 1) 4 +(31, 10, 1) 5 +(31, 11, 1) 6 +(31, 12, 1) 7 +(31, 13, 1) 7 +(31, 14, 1) 8 +(31, 15, 1) 9 +(31, 16, 1) 10 +(31, 17, 1) 11 +(31, 18, 1) 12 +(31, 19, 1) 13 +(31, 20, 1) 13 +(31, 21, 1) 14 +(31, 22, 1) 15 +(31, 23, 1) 16 +(31, 24, 1) 17 +(31, 25, 1) 18 +(31, 26, 1) 18 +(31, 27, 1) 19 +(31, 28, 1) 20 +(31, 29, 1) 21 +(31, 30, 1) 21 +(31, 31, 1) 22 +(31, 32, 1) 23 +(31, 33, 1) 23 +(31, 34, 1) 24 +(31, 35, 1) 25 +(31, 36, 1) 25 +(31, 37, 1) 26 +(31, 38, 1) 26 +(31, 39, 1) 27 +(31, 40, 1) 27 +(31, 41, 1) 28 +(31, 42, 1) 28 +(31, 43, 1) 29 +(31, 44, 1) 29 +(31, 45, 1) 29 +(31, 46, 1) 30 +(31, 47, 1) 30 +(31, 48, 1) 30 +(31, 49, 1) 30 +(31, 50, 1) 30 +(31, 51, 1) 30 +(31, 52, 1) 30 +(31, 53, 1) 30 +(31, 54, 1) 30 +(31, 55, 1) 30 +(31, 56, 1) 29 +(31, 57, 1) 29 +(31, 58, 1) 29 +(31, 59, 1) 28 +(31, 60, 1) 28 +(31, 61, 1) 27 +(31, 62, 1) 27 +(31, 63, 1) 26 +(31, 64, 1) 26 +(31, 65, 1) 25 +(31, 66, 1) 25 +(31, 67, 1) 24 +(31, 68, 1) 23 +(31, 69, 1) 23 +(31, 70, 1) 22 +(31, 71, 1) 21 +(31, 72, 1) 21 +(31, 73, 1) 20 +(31, 74, 1) 19 +(31, 75, 1) 18 +(31, 76, 1) 18 +(31, 77, 1) 17 +(31, 78, 1) 16 +(31, 79, 1) 15 +(31, 80, 1) 14 +(31, 81, 1) 13 +(31, 82, 1) 13 +(31, 83, 1) 12 +(31, 84, 1) 11 +(31, 85, 1) 10 +(31, 86, 1) 9 +(31, 87, 1) 8 +(31, 88, 1) 7 +(31, 89, 1) 7 +(31, 90, 1) 6 +(31, 91, 1) 5 +(31, 92, 1) 4 +(31, 93, 1) 3 +(31, 94, 1) 2 +(31, 95, 1) 1 +(32, 6, 1) 2 +(32, 7, 1) 2 +(32, 8, 1) 3 +(32, 9, 1) 4 +(32, 10, 1) 5 +(32, 11, 1) 6 +(32, 12, 1) 7 +(32, 13, 1) 8 +(32, 14, 1) 9 +(32, 15, 1) 10 +(32, 16, 1) 11 +(32, 17, 1) 11 +(32, 18, 1) 12 +(32, 19, 1) 13 +(32, 20, 1) 14 +(32, 21, 1) 15 +(32, 22, 1) 16 +(32, 23, 1) 17 +(32, 24, 1) 17 +(32, 25, 1) 18 +(32, 26, 1) 19 +(32, 27, 1) 20 +(32, 28, 1) 20 +(32, 29, 1) 21 +(32, 30, 1) 22 +(32, 31, 1) 23 +(32, 32, 1) 23 +(32, 33, 1) 24 +(32, 34, 1) 25 +(32, 35, 1) 25 +(32, 36, 1) 26 +(32, 37, 1) 27 +(32, 38, 1) 27 +(32, 39, 1) 28 +(32, 40, 1) 28 +(32, 41, 1) 29 +(32, 42, 1) 29 +(32, 43, 1) 30 +(32, 44, 1) 30 +(32, 45, 1) 30 +(32, 46, 1) 30 +(32, 47, 1) 31 +(32, 48, 1) 31 +(32, 49, 1) 31 +(32, 50, 1) 31 +(32, 51, 1) 31 +(32, 52, 1) 31 +(32, 53, 1) 31 +(32, 54, 1) 31 +(32, 55, 1) 30 +(32, 56, 1) 30 +(32, 57, 1) 30 +(32, 58, 1) 30 +(32, 59, 1) 29 +(32, 60, 1) 29 +(32, 61, 1) 28 +(32, 62, 1) 28 +(32, 63, 1) 27 +(32, 64, 1) 27 +(32, 65, 1) 26 +(32, 66, 1) 25 +(32, 67, 1) 25 +(32, 68, 1) 24 +(32, 69, 1) 23 +(32, 70, 1) 23 +(32, 71, 1) 22 +(32, 72, 1) 21 +(32, 73, 1) 20 +(32, 74, 1) 20 +(32, 75, 1) 19 +(32, 76, 1) 18 +(32, 77, 1) 17 +(32, 78, 1) 17 +(32, 79, 1) 16 +(32, 80, 1) 15 +(32, 81, 1) 14 +(32, 82, 1) 13 +(32, 83, 1) 12 +(32, 84, 1) 11 +(32, 85, 1) 11 +(32, 86, 1) 10 +(32, 87, 1) 9 +(32, 88, 1) 8 +(32, 89, 1) 7 +(32, 90, 1) 6 +(32, 91, 1) 5 +(32, 92, 1) 4 +(32, 93, 1) 3 +(32, 94, 1) 2 +(32, 95, 1) 2 +(33, 6, 1) 2 +(33, 7, 1) 3 +(33, 8, 1) 4 +(33, 9, 1) 5 +(33, 10, 1) 6 +(33, 11, 1) 7 +(33, 12, 1) 7 +(33, 13, 1) 8 +(33, 14, 1) 9 +(33, 15, 1) 10 +(33, 16, 1) 11 +(33, 17, 1) 12 +(33, 18, 1) 13 +(33, 19, 1) 14 +(33, 20, 1) 15 +(33, 21, 1) 15 +(33, 22, 1) 16 +(33, 23, 1) 17 +(33, 24, 1) 18 +(33, 25, 1) 19 +(33, 26, 1) 20 +(33, 27, 1) 20 +(33, 28, 1) 21 +(33, 29, 1) 22 +(33, 30, 1) 23 +(33, 31, 1) 23 +(33, 32, 1) 24 +(33, 33, 1) 25 +(33, 34, 1) 26 +(33, 35, 1) 26 +(33, 36, 1) 27 +(33, 37, 1) 27 +(33, 38, 1) 28 +(33, 39, 1) 29 +(33, 40, 1) 29 +(33, 41, 1) 30 +(33, 42, 1) 30 +(33, 43, 1) 30 +(33, 44, 1) 31 +(33, 45, 1) 31 +(33, 46, 1) 31 +(33, 47, 1) 32 +(33, 48, 1) 32 +(33, 49, 1) 32 +(33, 50, 1) 32 +(33, 51, 1) 32 +(33, 52, 1) 32 +(33, 53, 1) 32 +(33, 54, 1) 32 +(33, 55, 1) 31 +(33, 56, 1) 31 +(33, 57, 1) 31 +(33, 58, 1) 30 +(33, 59, 1) 30 +(33, 60, 1) 30 +(33, 61, 1) 29 +(33, 62, 1) 29 +(33, 63, 1) 28 +(33, 64, 1) 27 +(33, 65, 1) 27 +(33, 66, 1) 26 +(33, 67, 1) 26 +(33, 68, 1) 25 +(33, 69, 1) 24 +(33, 70, 1) 23 +(33, 71, 1) 23 +(33, 72, 1) 22 +(33, 73, 1) 21 +(33, 74, 1) 20 +(33, 75, 1) 20 +(33, 76, 1) 19 +(33, 77, 1) 18 +(33, 78, 1) 17 +(33, 79, 1) 16 +(33, 80, 1) 15 +(33, 81, 1) 15 +(33, 82, 1) 14 +(33, 83, 1) 13 +(33, 84, 1) 12 +(33, 85, 1) 11 +(33, 86, 1) 10 +(33, 87, 1) 9 +(33, 88, 1) 8 +(33, 89, 1) 7 +(33, 90, 1) 7 +(33, 91, 1) 6 +(33, 92, 1) 5 +(33, 93, 1) 4 +(33, 94, 1) 3 +(33, 95, 1) 2 +(34, 6, 1) 2 +(34, 7, 1) 3 +(34, 8, 1) 4 +(34, 9, 1) 5 +(34, 10, 1) 6 +(34, 11, 1) 7 +(34, 12, 1) 8 +(34, 13, 1) 9 +(34, 14, 1) 10 +(34, 15, 1) 11 +(34, 16, 1) 11 +(34, 17, 1) 12 +(34, 18, 1) 13 +(34, 19, 1) 14 +(34, 20, 1) 15 +(34, 21, 1) 16 +(34, 22, 1) 17 +(34, 23, 1) 18 +(34, 24, 1) 18 +(34, 25, 1) 19 +(34, 26, 1) 20 +(34, 27, 1) 21 +(34, 28, 1) 22 +(34, 29, 1) 23 +(34, 30, 1) 23 +(34, 31, 1) 24 +(34, 32, 1) 25 +(34, 33, 1) 26 +(34, 34, 1) 26 +(34, 35, 1) 27 +(34, 36, 1) 28 +(34, 37, 1) 28 +(34, 38, 1) 29 +(34, 39, 1) 29 +(34, 40, 1) 30 +(34, 41, 1) 30 +(34, 42, 1) 31 +(34, 43, 1) 31 +(34, 44, 1) 32 +(34, 45, 1) 32 +(34, 46, 1) 32 +(34, 47, 1) 33 +(34, 48, 1) 33 +(34, 49, 1) 33 +(34, 50, 1) 33 +(34, 51, 1) 33 +(34, 52, 1) 33 +(34, 53, 1) 33 +(34, 54, 1) 33 +(34, 55, 1) 32 +(34, 56, 1) 32 +(34, 57, 1) 32 +(34, 58, 1) 31 +(34, 59, 1) 31 +(34, 60, 1) 30 +(34, 61, 1) 30 +(34, 62, 1) 29 +(34, 63, 1) 29 +(34, 64, 1) 28 +(34, 65, 1) 28 +(34, 66, 1) 27 +(34, 67, 1) 26 +(34, 68, 1) 26 +(34, 69, 1) 25 +(34, 70, 1) 24 +(34, 71, 1) 23 +(34, 72, 1) 23 +(34, 73, 1) 22 +(34, 74, 1) 21 +(34, 75, 1) 20 +(34, 76, 1) 19 +(34, 77, 1) 18 +(34, 78, 1) 18 +(34, 79, 1) 17 +(34, 80, 1) 16 +(34, 81, 1) 15 +(34, 82, 1) 14 +(34, 83, 1) 13 +(34, 84, 1) 12 +(34, 85, 1) 11 +(34, 86, 1) 11 +(34, 87, 1) 10 +(34, 88, 1) 9 +(34, 89, 1) 8 +(34, 90, 1) 7 +(34, 91, 1) 6 +(34, 92, 1) 5 +(34, 93, 1) 4 +(34, 94, 1) 3 +(34, 95, 1) 2 +(35, 6, 1) 3 +(35, 7, 1) 4 +(35, 8, 1) 5 +(35, 9, 1) 6 +(35, 10, 1) 6 +(35, 11, 1) 7 +(35, 12, 1) 8 +(35, 13, 1) 9 +(35, 14, 1) 10 +(35, 15, 1) 11 +(35, 16, 1) 12 +(35, 17, 1) 13 +(35, 18, 1) 14 +(35, 19, 1) 15 +(35, 20, 1) 16 +(35, 21, 1) 16 +(35, 22, 1) 17 +(35, 23, 1) 18 +(35, 24, 1) 19 +(35, 25, 1) 20 +(35, 26, 1) 21 +(35, 27, 1) 21 +(35, 28, 1) 22 +(35, 29, 1) 23 +(35, 30, 1) 24 +(35, 31, 1) 25 +(35, 32, 1) 25 +(35, 33, 1) 26 +(35, 34, 1) 27 +(35, 35, 1) 28 +(35, 36, 1) 28 +(35, 37, 1) 29 +(35, 38, 1) 30 +(35, 39, 1) 30 +(35, 40, 1) 31 +(35, 41, 1) 31 +(35, 42, 1) 32 +(35, 43, 1) 32 +(35, 44, 1) 33 +(35, 45, 1) 33 +(35, 46, 1) 33 +(35, 47, 1) 34 +(35, 48, 1) 34 +(35, 49, 1) 34 +(35, 50, 1) 34 +(35, 51, 1) 34 +(35, 52, 1) 34 +(35, 53, 1) 34 +(35, 54, 1) 34 +(35, 55, 1) 33 +(35, 56, 1) 33 +(35, 57, 1) 33 +(35, 58, 1) 32 +(35, 59, 1) 32 +(35, 60, 1) 31 +(35, 61, 1) 31 +(35, 62, 1) 30 +(35, 63, 1) 30 +(35, 64, 1) 29 +(35, 65, 1) 28 +(35, 66, 1) 28 +(35, 67, 1) 27 +(35, 68, 1) 26 +(35, 69, 1) 25 +(35, 70, 1) 25 +(35, 71, 1) 24 +(35, 72, 1) 23 +(35, 73, 1) 22 +(35, 74, 1) 21 +(35, 75, 1) 21 +(35, 76, 1) 20 +(35, 77, 1) 19 +(35, 78, 1) 18 +(35, 79, 1) 17 +(35, 80, 1) 16 +(35, 81, 1) 16 +(35, 82, 1) 15 +(35, 83, 1) 14 +(35, 84, 1) 13 +(35, 85, 1) 12 +(35, 86, 1) 11 +(35, 87, 1) 10 +(35, 88, 1) 9 +(35, 89, 1) 8 +(35, 90, 1) 7 +(35, 91, 1) 6 +(35, 92, 1) 6 +(35, 93, 1) 5 +(35, 94, 1) 4 +(35, 95, 1) 3 +(36, 4, 1) 1 +(36, 5, 1) 2 +(36, 6, 1) 3 +(36, 7, 1) 4 +(36, 8, 1) 5 +(36, 9, 1) 6 +(36, 10, 1) 7 +(36, 11, 1) 8 +(36, 12, 1) 8 +(36, 13, 1) 9 +(36, 14, 1) 10 +(36, 15, 1) 11 +(36, 16, 1) 12 +(36, 17, 1) 13 +(36, 18, 1) 14 +(36, 19, 1) 15 +(36, 20, 1) 16 +(36, 21, 1) 17 +(36, 22, 1) 18 +(36, 23, 1) 19 +(36, 24, 1) 19 +(36, 25, 1) 20 +(36, 26, 1) 21 +(36, 27, 1) 22 +(36, 28, 1) 23 +(36, 29, 1) 24 +(36, 30, 1) 24 +(36, 31, 1) 25 +(36, 32, 1) 26 +(36, 33, 1) 27 +(36, 34, 1) 28 +(36, 35, 1) 28 +(36, 36, 1) 29 +(36, 37, 1) 30 +(36, 38, 1) 30 +(36, 39, 1) 31 +(36, 40, 1) 32 +(36, 41, 1) 32 +(36, 42, 1) 33 +(36, 43, 1) 33 +(36, 44, 1) 34 +(36, 45, 1) 34 +(36, 46, 1) 34 +(36, 47, 1) 35 +(36, 48, 1) 35 +(36, 49, 1) 35 +(36, 50, 1) 35 +(36, 51, 1) 35 +(36, 52, 1) 35 +(36, 53, 1) 35 +(36, 54, 1) 35 +(36, 55, 1) 34 +(36, 56, 1) 34 +(36, 57, 1) 34 +(36, 58, 1) 33 +(36, 59, 1) 33 +(36, 60, 1) 32 +(36, 61, 1) 32 +(36, 62, 1) 31 +(36, 63, 1) 30 +(36, 64, 1) 30 +(36, 65, 1) 29 +(36, 66, 1) 28 +(36, 67, 1) 28 +(36, 68, 1) 27 +(36, 69, 1) 26 +(36, 70, 1) 25 +(36, 71, 1) 24 +(36, 72, 1) 24 +(36, 73, 1) 23 +(36, 74, 1) 22 +(36, 75, 1) 21 +(36, 76, 1) 20 +(36, 77, 1) 19 +(36, 78, 1) 19 +(36, 79, 1) 18 +(36, 80, 1) 17 +(36, 81, 1) 16 +(36, 82, 1) 15 +(36, 83, 1) 14 +(36, 84, 1) 13 +(36, 85, 1) 12 +(36, 86, 1) 11 +(36, 87, 1) 10 +(36, 88, 1) 9 +(36, 89, 1) 8 +(36, 90, 1) 8 +(36, 91, 1) 7 +(36, 92, 1) 6 +(36, 93, 1) 5 +(36, 94, 1) 4 +(36, 95, 1) 3 +(36, 96, 1) 2 +(36, 97, 1) 1 +(37, 4, 1) 1 +(37, 5, 1) 2 +(37, 6, 1) 3 +(37, 7, 1) 4 +(37, 8, 1) 5 +(37, 9, 1) 6 +(37, 10, 1) 7 +(37, 11, 1) 8 +(37, 12, 1) 9 +(37, 13, 1) 10 +(37, 14, 1) 11 +(37, 15, 1) 12 +(37, 16, 1) 13 +(37, 17, 1) 14 +(37, 18, 1) 14 +(37, 19, 1) 15 +(37, 20, 1) 16 +(37, 21, 1) 17 +(37, 22, 1) 18 +(37, 23, 1) 19 +(37, 24, 1) 20 +(37, 25, 1) 21 +(37, 26, 1) 22 +(37, 27, 1) 22 +(37, 28, 1) 23 +(37, 29, 1) 24 +(37, 30, 1) 25 +(37, 31, 1) 26 +(37, 32, 1) 27 +(37, 33, 1) 27 +(37, 34, 1) 28 +(37, 35, 1) 29 +(37, 36, 1) 30 +(37, 37, 1) 30 +(37, 38, 1) 31 +(37, 39, 1) 32 +(37, 40, 1) 32 +(37, 41, 1) 33 +(37, 42, 1) 34 +(37, 43, 1) 34 +(37, 44, 1) 35 +(37, 45, 1) 35 +(37, 46, 1) 35 +(37, 47, 1) 36 +(37, 48, 1) 36 +(37, 49, 1) 36 +(37, 50, 1) 36 +(37, 51, 1) 36 +(37, 52, 1) 36 +(37, 53, 1) 36 +(37, 54, 1) 36 +(37, 55, 1) 35 +(37, 56, 1) 35 +(37, 57, 1) 35 +(37, 58, 1) 34 +(37, 59, 1) 34 +(37, 60, 1) 33 +(37, 61, 1) 32 +(37, 62, 1) 32 +(37, 63, 1) 31 +(37, 64, 1) 30 +(37, 65, 1) 30 +(37, 66, 1) 29 +(37, 67, 1) 28 +(37, 68, 1) 27 +(37, 69, 1) 27 +(37, 70, 1) 26 +(37, 71, 1) 25 +(37, 72, 1) 24 +(37, 73, 1) 23 +(37, 74, 1) 22 +(37, 75, 1) 22 +(37, 76, 1) 21 +(37, 77, 1) 20 +(37, 78, 1) 19 +(37, 79, 1) 18 +(37, 80, 1) 17 +(37, 81, 1) 16 +(37, 82, 1) 15 +(37, 83, 1) 14 +(37, 84, 1) 14 +(37, 85, 1) 13 +(37, 86, 1) 12 +(37, 87, 1) 11 +(37, 88, 1) 10 +(37, 89, 1) 9 +(37, 90, 1) 8 +(37, 91, 1) 7 +(37, 92, 1) 6 +(37, 93, 1) 5 +(37, 94, 1) 4 +(37, 95, 1) 3 +(37, 96, 1) 2 +(37, 97, 1) 1 +(38, 4, 1) 2 +(38, 5, 1) 3 +(38, 6, 1) 3 +(38, 7, 1) 4 +(38, 8, 1) 5 +(38, 9, 1) 6 +(38, 10, 1) 7 +(38, 11, 1) 8 +(38, 12, 1) 9 +(38, 13, 1) 10 +(38, 14, 1) 11 +(38, 15, 1) 12 +(38, 16, 1) 13 +(38, 17, 1) 14 +(38, 18, 1) 15 +(38, 19, 1) 16 +(38, 20, 1) 17 +(38, 21, 1) 18 +(38, 22, 1) 18 +(38, 23, 1) 19 +(38, 24, 1) 20 +(38, 25, 1) 21 +(38, 26, 1) 22 +(38, 27, 1) 23 +(38, 28, 1) 24 +(38, 29, 1) 25 +(38, 30, 1) 26 +(38, 31, 1) 26 +(38, 32, 1) 27 +(38, 33, 1) 28 +(38, 34, 1) 29 +(38, 35, 1) 30 +(38, 36, 1) 30 +(38, 37, 1) 31 +(38, 38, 1) 32 +(38, 39, 1) 33 +(38, 40, 1) 33 +(38, 41, 1) 34 +(38, 42, 1) 34 +(38, 43, 1) 35 +(38, 44, 1) 35 +(38, 45, 1) 36 +(38, 46, 1) 36 +(38, 47, 1) 37 +(38, 48, 1) 37 +(38, 49, 1) 37 +(38, 50, 1) 37 +(38, 51, 1) 37 +(38, 52, 1) 37 +(38, 53, 1) 37 +(38, 54, 1) 37 +(38, 55, 1) 36 +(38, 56, 1) 36 +(38, 57, 1) 35 +(38, 58, 1) 35 +(38, 59, 1) 34 +(38, 60, 1) 34 +(38, 61, 1) 33 +(38, 62, 1) 33 +(38, 63, 1) 32 +(38, 64, 1) 31 +(38, 65, 1) 30 +(38, 66, 1) 30 +(38, 67, 1) 29 +(38, 68, 1) 28 +(38, 69, 1) 27 +(38, 70, 1) 26 +(38, 71, 1) 26 +(38, 72, 1) 25 +(38, 73, 1) 24 +(38, 74, 1) 23 +(38, 75, 1) 22 +(38, 76, 1) 21 +(38, 77, 1) 20 +(38, 78, 1) 19 +(38, 79, 1) 18 +(38, 80, 1) 18 +(38, 81, 1) 17 +(38, 82, 1) 16 +(38, 83, 1) 15 +(38, 84, 1) 14 +(38, 85, 1) 13 +(38, 86, 1) 12 +(38, 87, 1) 11 +(38, 88, 1) 10 +(38, 89, 1) 9 +(38, 90, 1) 8 +(38, 91, 1) 7 +(38, 92, 1) 6 +(38, 93, 1) 5 +(38, 94, 1) 4 +(38, 95, 1) 3 +(38, 96, 1) 3 +(38, 97, 1) 2 +(39, 4, 1) 2 +(39, 5, 1) 3 +(39, 6, 1) 4 +(39, 7, 1) 5 +(39, 8, 1) 6 +(39, 9, 1) 7 +(39, 10, 1) 8 +(39, 11, 1) 9 +(39, 12, 1) 9 +(39, 13, 1) 10 +(39, 14, 1) 11 +(39, 15, 1) 12 +(39, 16, 1) 13 +(39, 17, 1) 14 +(39, 18, 1) 15 +(39, 19, 1) 16 +(39, 20, 1) 17 +(39, 21, 1) 18 +(39, 22, 1) 19 +(39, 23, 1) 20 +(39, 24, 1) 21 +(39, 25, 1) 22 +(39, 26, 1) 23 +(39, 27, 1) 23 +(39, 28, 1) 24 +(39, 29, 1) 25 +(39, 30, 1) 26 +(39, 31, 1) 27 +(39, 32, 1) 28 +(39, 33, 1) 29 +(39, 34, 1) 29 +(39, 35, 1) 30 +(39, 36, 1) 31 +(39, 37, 1) 32 +(39, 38, 1) 33 +(39, 39, 1) 33 +(39, 40, 1) 34 +(39, 41, 1) 35 +(39, 42, 1) 35 +(39, 43, 1) 36 +(39, 44, 1) 36 +(39, 45, 1) 37 +(39, 46, 1) 37 +(39, 47, 1) 37 +(39, 48, 1) 38 +(39, 49, 1) 38 +(39, 50, 1) 38 +(39, 51, 1) 38 +(39, 52, 1) 38 +(39, 53, 1) 38 +(39, 54, 1) 37 +(39, 55, 1) 37 +(39, 56, 1) 37 +(39, 57, 1) 36 +(39, 58, 1) 36 +(39, 59, 1) 35 +(39, 60, 1) 35 +(39, 61, 1) 34 +(39, 62, 1) 33 +(39, 63, 1) 33 +(39, 64, 1) 32 +(39, 65, 1) 31 +(39, 66, 1) 30 +(39, 67, 1) 29 +(39, 68, 1) 29 +(39, 69, 1) 28 +(39, 70, 1) 27 +(39, 71, 1) 26 +(39, 72, 1) 25 +(39, 73, 1) 24 +(39, 74, 1) 23 +(39, 75, 1) 23 +(39, 76, 1) 22 +(39, 77, 1) 21 +(39, 78, 1) 20 +(39, 79, 1) 19 +(39, 80, 1) 18 +(39, 81, 1) 17 +(39, 82, 1) 16 +(39, 83, 1) 15 +(39, 84, 1) 14 +(39, 85, 1) 13 +(39, 86, 1) 12 +(39, 87, 1) 11 +(39, 88, 1) 10 +(39, 89, 1) 9 +(39, 90, 1) 9 +(39, 91, 1) 8 +(39, 92, 1) 7 +(39, 93, 1) 6 +(39, 94, 1) 5 +(39, 95, 1) 4 +(39, 96, 1) 3 +(39, 97, 1) 2 +(40, 4, 1) 2 +(40, 5, 1) 3 +(40, 6, 1) 4 +(40, 7, 1) 5 +(40, 8, 1) 6 +(40, 9, 1) 7 +(40, 10, 1) 8 +(40, 11, 1) 9 +(40, 12, 1) 10 +(40, 13, 1) 11 +(40, 14, 1) 12 +(40, 15, 1) 13 +(40, 16, 1) 14 +(40, 17, 1) 15 +(40, 18, 1) 16 +(40, 19, 1) 16 +(40, 20, 1) 17 +(40, 21, 1) 18 +(40, 22, 1) 19 +(40, 23, 1) 20 +(40, 24, 1) 21 +(40, 25, 1) 22 +(40, 26, 1) 23 +(40, 27, 1) 24 +(40, 28, 1) 25 +(40, 29, 1) 26 +(40, 30, 1) 27 +(40, 31, 1) 27 +(40, 32, 1) 28 +(40, 33, 1) 29 +(40, 34, 1) 30 +(40, 35, 1) 31 +(40, 36, 1) 32 +(40, 37, 1) 32 +(40, 38, 1) 33 +(40, 39, 1) 34 +(40, 40, 1) 35 +(40, 41, 1) 35 +(40, 42, 1) 36 +(40, 43, 1) 37 +(40, 44, 1) 37 +(40, 45, 1) 38 +(40, 56, 1) 38 +(40, 57, 1) 37 +(40, 58, 1) 37 +(40, 59, 1) 36 +(40, 60, 1) 35 +(40, 61, 1) 35 +(40, 62, 1) 34 +(40, 63, 1) 33 +(40, 64, 1) 32 +(40, 65, 1) 32 +(40, 66, 1) 31 +(40, 67, 1) 30 +(40, 68, 1) 29 +(40, 69, 1) 28 +(40, 70, 1) 27 +(40, 71, 1) 27 +(40, 72, 1) 26 +(40, 73, 1) 25 +(40, 74, 1) 24 +(40, 75, 1) 23 +(40, 76, 1) 22 +(40, 77, 1) 21 +(40, 78, 1) 20 +(40, 79, 1) 19 +(40, 80, 1) 18 +(40, 81, 1) 17 +(40, 82, 1) 16 +(40, 83, 1) 16 +(40, 84, 1) 15 +(40, 85, 1) 14 +(40, 86, 1) 13 +(40, 87, 1) 12 +(40, 88, 1) 11 +(40, 89, 1) 10 +(40, 90, 1) 9 +(40, 91, 1) 8 +(40, 92, 1) 7 +(40, 93, 1) 6 +(40, 94, 1) 5 +(40, 95, 1) 4 +(40, 96, 1) 3 +(40, 97, 1) 2 +(41, 1, 1) 0 +(41, 2, 1) 0 +(41, 3, 1) 1 +(41, 4, 1) 2 +(41, 5, 1) 3 +(41, 6, 1) 4 +(41, 7, 1) 5 +(41, 8, 1) 6 +(41, 9, 1) 7 +(41, 10, 1) 8 +(41, 11, 1) 9 +(41, 12, 1) 10 +(41, 13, 1) 11 +(41, 14, 1) 12 +(41, 15, 1) 13 +(41, 16, 1) 14 +(41, 17, 1) 15 +(41, 18, 1) 16 +(41, 19, 1) 17 +(41, 20, 1) 18 +(41, 21, 1) 19 +(41, 22, 1) 20 +(41, 23, 1) 20 +(41, 24, 1) 21 +(41, 25, 1) 22 +(41, 26, 1) 23 +(41, 27, 1) 24 +(41, 28, 1) 25 +(41, 29, 1) 26 +(41, 30, 1) 27 +(41, 31, 1) 28 +(41, 32, 1) 29 +(41, 33, 1) 30 +(41, 34, 1) 30 +(41, 35, 1) 31 +(41, 36, 1) 32 +(41, 37, 1) 33 +(41, 38, 1) 34 +(41, 39, 1) 35 +(41, 40, 1) 35 +(41, 41, 1) 36 +(41, 42, 1) 37 +(41, 43, 1) 37 +(41, 58, 1) 37 +(41, 59, 1) 37 +(41, 60, 1) 36 +(41, 61, 1) 35 +(41, 62, 1) 35 +(41, 63, 1) 34 +(41, 64, 1) 33 +(41, 65, 1) 32 +(41, 66, 1) 31 +(41, 67, 1) 30 +(41, 68, 1) 30 +(41, 69, 1) 29 +(41, 70, 1) 28 +(41, 71, 1) 27 +(41, 72, 1) 26 +(41, 73, 1) 25 +(41, 74, 1) 24 +(41, 75, 1) 23 +(41, 76, 1) 22 +(41, 77, 1) 21 +(41, 78, 1) 20 +(41, 79, 1) 20 +(41, 80, 1) 19 +(41, 81, 1) 18 +(41, 82, 1) 17 +(41, 83, 1) 16 +(41, 84, 1) 15 +(41, 85, 1) 14 +(41, 86, 1) 13 +(41, 87, 1) 12 +(41, 88, 1) 11 +(41, 89, 1) 10 +(41, 90, 1) 9 +(41, 91, 1) 8 +(41, 92, 1) 7 +(41, 93, 1) 6 +(41, 94, 1) 5 +(41, 95, 1) 4 +(41, 96, 1) 3 +(41, 97, 1) 2 +(41, 98, 1) 1 +(41, 99, 1) 0 +(41, 100, 1) 0 +(42, 1, 1) 0 +(42, 2, 1) 0 +(42, 3, 1) 1 +(42, 4, 1) 2 +(42, 5, 1) 3 +(42, 6, 1) 4 +(42, 7, 1) 5 +(42, 8, 1) 6 +(42, 9, 1) 7 +(42, 10, 1) 8 +(42, 11, 1) 9 +(42, 12, 1) 10 +(42, 13, 1) 11 +(42, 14, 1) 12 +(42, 15, 1) 13 +(42, 16, 1) 14 +(42, 17, 1) 15 +(42, 18, 1) 16 +(42, 19, 1) 17 +(42, 20, 1) 18 +(42, 21, 1) 19 +(42, 22, 1) 20 +(42, 23, 1) 21 +(42, 24, 1) 22 +(42, 25, 1) 23 +(42, 26, 1) 24 +(42, 27, 1) 25 +(42, 28, 1) 25 +(42, 29, 1) 26 +(42, 30, 1) 27 +(42, 31, 1) 28 +(42, 32, 1) 29 +(42, 33, 1) 30 +(42, 34, 1) 31 +(42, 35, 1) 32 +(42, 36, 1) 33 +(42, 37, 1) 34 +(42, 38, 1) 34 +(42, 39, 1) 35 +(42, 40, 1) 36 +(42, 41, 1) 37 +(42, 42, 1) 38 +(42, 59, 1) 38 +(42, 60, 1) 37 +(42, 61, 1) 36 +(42, 62, 1) 35 +(42, 63, 1) 34 +(42, 64, 1) 34 +(42, 65, 1) 33 +(42, 66, 1) 32 +(42, 67, 1) 31 +(42, 68, 1) 30 +(42, 69, 1) 29 +(42, 70, 1) 28 +(42, 71, 1) 27 +(42, 72, 1) 26 +(42, 73, 1) 25 +(42, 74, 1) 25 +(42, 75, 1) 24 +(42, 76, 1) 23 +(42, 77, 1) 22 +(42, 78, 1) 21 +(42, 79, 1) 20 +(42, 80, 1) 19 +(42, 81, 1) 18 +(42, 82, 1) 17 +(42, 83, 1) 16 +(42, 84, 1) 15 +(42, 85, 1) 14 +(42, 86, 1) 13 +(42, 87, 1) 12 +(42, 88, 1) 11 +(42, 89, 1) 10 +(42, 90, 1) 9 +(42, 91, 1) 8 +(42, 92, 1) 7 +(42, 93, 1) 6 +(42, 94, 1) 5 +(42, 95, 1) 4 +(42, 96, 1) 3 +(42, 97, 1) 2 +(42, 98, 1) 1 +(42, 99, 1) 0 +(42, 100, 1) 0 +(43, 1, 1) 0 +(43, 2, 1) 1 +(43, 3, 1) 2 +(43, 4, 1) 3 +(43, 5, 1) 4 +(43, 6, 1) 4 +(43, 7, 1) 5 +(43, 8, 1) 6 +(43, 9, 1) 7 +(43, 10, 1) 8 +(43, 11, 1) 9 +(43, 12, 1) 10 +(43, 13, 1) 11 +(43, 14, 1) 12 +(43, 15, 1) 13 +(43, 16, 1) 14 +(43, 17, 1) 15 +(43, 18, 1) 16 +(43, 19, 1) 17 +(43, 20, 1) 18 +(43, 21, 1) 19 +(43, 22, 1) 20 +(43, 23, 1) 21 +(43, 24, 1) 22 +(43, 25, 1) 23 +(43, 26, 1) 24 +(43, 27, 1) 25 +(43, 28, 1) 26 +(43, 29, 1) 27 +(43, 30, 1) 28 +(43, 31, 1) 29 +(43, 32, 1) 30 +(43, 33, 1) 30 +(43, 34, 1) 31 +(43, 35, 1) 32 +(43, 36, 1) 33 +(43, 37, 1) 34 +(43, 38, 1) 35 +(43, 39, 1) 36 +(43, 40, 1) 37 +(43, 41, 1) 37 +(43, 60, 1) 37 +(43, 61, 1) 37 +(43, 62, 1) 36 +(43, 63, 1) 35 +(43, 64, 1) 34 +(43, 65, 1) 33 +(43, 66, 1) 32 +(43, 67, 1) 31 +(43, 68, 1) 30 +(43, 69, 1) 30 +(43, 70, 1) 29 +(43, 71, 1) 28 +(43, 72, 1) 27 +(43, 73, 1) 26 +(43, 74, 1) 25 +(43, 75, 1) 24 +(43, 76, 1) 23 +(43, 77, 1) 22 +(43, 78, 1) 21 +(43, 79, 1) 20 +(43, 80, 1) 19 +(43, 81, 1) 18 +(43, 82, 1) 17 +(43, 83, 1) 16 +(43, 84, 1) 15 +(43, 85, 1) 14 +(43, 86, 1) 13 +(43, 87, 1) 12 +(43, 88, 1) 11 +(43, 89, 1) 10 +(43, 90, 1) 9 +(43, 91, 1) 8 +(43, 92, 1) 7 +(43, 93, 1) 6 +(43, 94, 1) 5 +(43, 95, 1) 4 +(43, 96, 1) 4 +(43, 97, 1) 3 +(43, 98, 1) 2 +(43, 99, 1) 1 +(43, 100, 1) 0 +(44, 1, 1) 0 +(44, 2, 1) 1 +(44, 3, 1) 2 +(44, 4, 1) 3 +(44, 5, 1) 4 +(44, 6, 1) 5 +(44, 7, 1) 6 +(44, 8, 1) 7 +(44, 9, 1) 8 +(44, 10, 1) 9 +(44, 11, 1) 10 +(44, 12, 1) 11 +(44, 13, 1) 12 +(44, 14, 1) 13 +(44, 15, 1) 14 +(44, 16, 1) 14 +(44, 17, 1) 15 +(44, 18, 1) 16 +(44, 19, 1) 17 +(44, 20, 1) 18 +(44, 21, 1) 19 +(44, 22, 1) 20 +(44, 23, 1) 21 +(44, 24, 1) 22 +(44, 25, 1) 23 +(44, 26, 1) 24 +(44, 27, 1) 25 +(44, 28, 1) 26 +(44, 29, 1) 27 +(44, 30, 1) 28 +(44, 31, 1) 29 +(44, 32, 1) 30 +(44, 33, 1) 31 +(44, 34, 1) 32 +(44, 35, 1) 33 +(44, 36, 1) 34 +(44, 37, 1) 35 +(44, 38, 1) 35 +(44, 39, 1) 36 +(44, 40, 1) 37 +(44, 61, 1) 37 +(44, 62, 1) 36 +(44, 63, 1) 35 +(44, 64, 1) 35 +(44, 65, 1) 34 +(44, 66, 1) 33 +(44, 67, 1) 32 +(44, 68, 1) 31 +(44, 69, 1) 30 +(44, 70, 1) 29 +(44, 71, 1) 28 +(44, 72, 1) 27 +(44, 73, 1) 26 +(44, 74, 1) 25 +(44, 75, 1) 24 +(44, 76, 1) 23 +(44, 77, 1) 22 +(44, 78, 1) 21 +(44, 79, 1) 20 +(44, 80, 1) 19 +(44, 81, 1) 18 +(44, 82, 1) 17 +(44, 83, 1) 16 +(44, 84, 1) 15 +(44, 85, 1) 14 +(44, 86, 1) 14 +(44, 87, 1) 13 +(44, 88, 1) 12 +(44, 89, 1) 11 +(44, 90, 1) 10 +(44, 91, 1) 9 +(44, 92, 1) 8 +(44, 93, 1) 7 +(44, 94, 1) 6 +(44, 95, 1) 5 +(44, 96, 1) 4 +(44, 97, 1) 3 +(44, 98, 1) 2 +(44, 99, 1) 1 +(44, 100, 1) 0 +(45, 1, 1) 0 +(45, 2, 1) 1 +(45, 3, 1) 2 +(45, 4, 1) 3 +(45, 5, 1) 4 +(45, 6, 1) 5 +(45, 7, 1) 6 +(45, 8, 1) 7 +(45, 9, 1) 8 +(45, 10, 1) 9 +(45, 11, 1) 10 +(45, 12, 1) 11 +(45, 13, 1) 12 +(45, 14, 1) 13 +(45, 15, 1) 14 +(45, 16, 1) 15 +(45, 17, 1) 16 +(45, 18, 1) 17 +(45, 19, 1) 18 +(45, 20, 1) 19 +(45, 21, 1) 20 +(45, 22, 1) 21 +(45, 23, 1) 22 +(45, 24, 1) 23 +(45, 25, 1) 23 +(45, 26, 1) 24 +(45, 27, 1) 25 +(45, 28, 1) 26 +(45, 29, 1) 27 +(45, 30, 1) 28 +(45, 31, 1) 29 +(45, 32, 1) 30 +(45, 33, 1) 31 +(45, 34, 1) 32 +(45, 35, 1) 33 +(45, 36, 1) 34 +(45, 37, 1) 35 +(45, 38, 1) 36 +(45, 39, 1) 37 +(45, 40, 1) 38 +(45, 61, 1) 38 +(45, 62, 1) 37 +(45, 63, 1) 36 +(45, 64, 1) 35 +(45, 65, 1) 34 +(45, 66, 1) 33 +(45, 67, 1) 32 +(45, 68, 1) 31 +(45, 69, 1) 30 +(45, 70, 1) 29 +(45, 71, 1) 28 +(45, 72, 1) 27 +(45, 73, 1) 26 +(45, 74, 1) 25 +(45, 75, 1) 24 +(45, 76, 1) 23 +(45, 77, 1) 23 +(45, 78, 1) 22 +(45, 79, 1) 21 +(45, 80, 1) 20 +(45, 81, 1) 19 +(45, 82, 1) 18 +(45, 83, 1) 17 +(45, 84, 1) 16 +(45, 85, 1) 15 +(45, 86, 1) 14 +(45, 87, 1) 13 +(45, 88, 1) 12 +(45, 89, 1) 11 +(45, 90, 1) 10 +(45, 91, 1) 9 +(45, 92, 1) 8 +(45, 93, 1) 7 +(45, 94, 1) 6 +(45, 95, 1) 5 +(45, 96, 1) 4 +(45, 97, 1) 3 +(45, 98, 1) 2 +(45, 99, 1) 1 +(45, 100, 1) 0 +(46, 1, 1) 0 +(46, 2, 1) 1 +(46, 3, 1) 2 +(46, 4, 1) 3 +(46, 5, 1) 4 +(46, 6, 1) 5 +(46, 7, 1) 6 +(46, 8, 1) 7 +(46, 9, 1) 8 +(46, 10, 1) 9 +(46, 11, 1) 10 +(46, 12, 1) 11 +(46, 13, 1) 12 +(46, 14, 1) 13 +(46, 15, 1) 14 +(46, 16, 1) 15 +(46, 17, 1) 16 +(46, 18, 1) 17 +(46, 19, 1) 18 +(46, 20, 1) 19 +(46, 21, 1) 20 +(46, 22, 1) 21 +(46, 23, 1) 22 +(46, 24, 1) 23 +(46, 25, 1) 24 +(46, 26, 1) 25 +(46, 27, 1) 26 +(46, 28, 1) 27 +(46, 29, 1) 28 +(46, 30, 1) 29 +(46, 31, 1) 30 +(46, 32, 1) 30 +(46, 33, 1) 31 +(46, 34, 1) 32 +(46, 35, 1) 33 +(46, 36, 1) 34 +(46, 37, 1) 35 +(46, 38, 1) 36 +(46, 39, 1) 37 +(46, 62, 1) 37 +(46, 63, 1) 36 +(46, 64, 1) 35 +(46, 65, 1) 34 +(46, 66, 1) 33 +(46, 67, 1) 32 +(46, 68, 1) 31 +(46, 69, 1) 30 +(46, 70, 1) 30 +(46, 71, 1) 29 +(46, 72, 1) 28 +(46, 73, 1) 27 +(46, 74, 1) 26 +(46, 75, 1) 25 +(46, 76, 1) 24 +(46, 77, 1) 23 +(46, 78, 1) 22 +(46, 79, 1) 21 +(46, 80, 1) 20 +(46, 81, 1) 19 +(46, 82, 1) 18 +(46, 83, 1) 17 +(46, 84, 1) 16 +(46, 85, 1) 15 +(46, 86, 1) 14 +(46, 87, 1) 13 +(46, 88, 1) 12 +(46, 89, 1) 11 +(46, 90, 1) 10 +(46, 91, 1) 9 +(46, 92, 1) 8 +(46, 93, 1) 7 +(46, 94, 1) 6 +(46, 95, 1) 5 +(46, 96, 1) 4 +(46, 97, 1) 3 +(46, 98, 1) 2 +(46, 99, 1) 1 +(46, 100, 1) 0 +(47, 1, 1) 0 +(47, 2, 1) 1 +(47, 3, 1) 2 +(47, 4, 1) 3 +(47, 5, 1) 4 +(47, 6, 1) 5 +(47, 7, 1) 6 +(47, 8, 1) 7 +(47, 9, 1) 8 +(47, 10, 1) 9 +(47, 11, 1) 10 +(47, 12, 1) 11 +(47, 13, 1) 12 +(47, 14, 1) 13 +(47, 15, 1) 14 +(47, 16, 1) 15 +(47, 17, 1) 16 +(47, 18, 1) 17 +(47, 19, 1) 18 +(47, 20, 1) 19 +(47, 21, 1) 20 +(47, 22, 1) 21 +(47, 23, 1) 22 +(47, 24, 1) 23 +(47, 25, 1) 24 +(47, 26, 1) 25 +(47, 27, 1) 26 +(47, 28, 1) 27 +(47, 29, 1) 28 +(47, 30, 1) 29 +(47, 31, 1) 30 +(47, 32, 1) 31 +(47, 33, 1) 32 +(47, 34, 1) 33 +(47, 35, 1) 34 +(47, 36, 1) 35 +(47, 37, 1) 36 +(47, 38, 1) 37 +(47, 39, 1) 38 +(47, 62, 1) 38 +(47, 63, 1) 37 +(47, 64, 1) 36 +(47, 65, 1) 35 +(47, 66, 1) 34 +(47, 67, 1) 33 +(47, 68, 1) 32 +(47, 69, 1) 31 +(47, 70, 1) 30 +(47, 71, 1) 29 +(47, 72, 1) 28 +(47, 73, 1) 27 +(47, 74, 1) 26 +(47, 75, 1) 25 +(47, 76, 1) 24 +(47, 77, 1) 23 +(47, 78, 1) 22 +(47, 79, 1) 21 +(47, 80, 1) 20 +(47, 81, 1) 19 +(47, 82, 1) 18 +(47, 83, 1) 17 +(47, 84, 1) 16 +(47, 85, 1) 15 +(47, 86, 1) 14 +(47, 87, 1) 13 +(47, 88, 1) 12 +(47, 89, 1) 11 +(47, 90, 1) 10 +(47, 91, 1) 9 +(47, 92, 1) 8 +(47, 93, 1) 7 +(47, 94, 1) 6 +(47, 95, 1) 5 +(47, 96, 1) 4 +(47, 97, 1) 3 +(47, 98, 1) 2 +(47, 99, 1) 1 +(47, 100, 1) 0 +(48, 1, 1) 0 +(48, 2, 1) 1 +(48, 3, 1) 2 +(48, 4, 1) 3 +(48, 5, 1) 4 +(48, 6, 1) 5 +(48, 7, 1) 6 +(48, 8, 1) 7 +(48, 9, 1) 8 +(48, 10, 1) 9 +(48, 11, 1) 10 +(48, 12, 1) 11 +(48, 13, 1) 12 +(48, 14, 1) 13 +(48, 15, 1) 14 +(48, 16, 1) 15 +(48, 17, 1) 16 +(48, 18, 1) 17 +(48, 19, 1) 18 +(48, 20, 1) 19 +(48, 21, 1) 20 +(48, 22, 1) 21 +(48, 23, 1) 22 +(48, 24, 1) 23 +(48, 25, 1) 24 +(48, 26, 1) 25 +(48, 27, 1) 26 +(48, 28, 1) 27 +(48, 29, 1) 28 +(48, 30, 1) 29 +(48, 31, 1) 30 +(48, 32, 1) 31 +(48, 33, 1) 32 +(48, 34, 1) 33 +(48, 35, 1) 34 +(48, 36, 1) 35 +(48, 37, 1) 36 +(48, 38, 1) 37 +(48, 39, 1) 38 +(48, 62, 1) 38 +(48, 63, 1) 37 +(48, 64, 1) 36 +(48, 65, 1) 35 +(48, 66, 1) 34 +(48, 67, 1) 33 +(48, 68, 1) 32 +(48, 69, 1) 31 +(48, 70, 1) 30 +(48, 71, 1) 29 +(48, 72, 1) 28 +(48, 73, 1) 27 +(48, 74, 1) 26 +(48, 75, 1) 25 +(48, 76, 1) 24 +(48, 77, 1) 23 +(48, 78, 1) 22 +(48, 79, 1) 21 +(48, 80, 1) 20 +(48, 81, 1) 19 +(48, 82, 1) 18 +(48, 83, 1) 17 +(48, 84, 1) 16 +(48, 85, 1) 15 +(48, 86, 1) 14 +(48, 87, 1) 13 +(48, 88, 1) 12 +(48, 89, 1) 11 +(48, 90, 1) 10 +(48, 91, 1) 9 +(48, 92, 1) 8 +(48, 93, 1) 7 +(48, 94, 1) 6 +(48, 95, 1) 5 +(48, 96, 1) 4 +(48, 97, 1) 3 +(48, 98, 1) 2 +(48, 99, 1) 1 +(48, 100, 1) 0 +(49, 1, 1) 0 +(49, 2, 1) 1 +(49, 3, 1) 2 +(49, 4, 1) 3 +(49, 5, 1) 4 +(49, 6, 1) 5 +(49, 7, 1) 6 +(49, 8, 1) 7 +(49, 9, 1) 8 +(49, 10, 1) 9 +(49, 11, 1) 10 +(49, 12, 1) 11 +(49, 13, 1) 12 +(49, 14, 1) 13 +(49, 15, 1) 14 +(49, 16, 1) 15 +(49, 17, 1) 16 +(49, 18, 1) 17 +(49, 19, 1) 18 +(49, 20, 1) 19 +(49, 21, 1) 20 +(49, 22, 1) 21 +(49, 23, 1) 22 +(49, 24, 1) 23 +(49, 25, 1) 24 +(49, 26, 1) 25 +(49, 27, 1) 26 +(49, 28, 1) 27 +(49, 29, 1) 28 +(49, 30, 1) 29 +(49, 31, 1) 30 +(49, 32, 1) 31 +(49, 33, 1) 32 +(49, 34, 1) 33 +(49, 35, 1) 34 +(49, 36, 1) 35 +(49, 37, 1) 36 +(49, 38, 1) 37 +(49, 39, 1) 38 +(49, 62, 1) 38 +(49, 63, 1) 37 +(49, 64, 1) 36 +(49, 65, 1) 35 +(49, 66, 1) 34 +(49, 67, 1) 33 +(49, 68, 1) 32 +(49, 69, 1) 31 +(49, 70, 1) 30 +(49, 71, 1) 29 +(49, 72, 1) 28 +(49, 73, 1) 27 +(49, 74, 1) 26 +(49, 75, 1) 25 +(49, 76, 1) 24 +(49, 77, 1) 23 +(49, 78, 1) 22 +(49, 79, 1) 21 +(49, 80, 1) 20 +(49, 81, 1) 19 +(49, 82, 1) 18 +(49, 83, 1) 17 +(49, 84, 1) 16 +(49, 85, 1) 15 +(49, 86, 1) 14 +(49, 87, 1) 13 +(49, 88, 1) 12 +(49, 89, 1) 11 +(49, 90, 1) 10 +(49, 91, 1) 9 +(49, 92, 1) 8 +(49, 93, 1) 7 +(49, 94, 1) 6 +(49, 95, 1) 5 +(49, 96, 1) 4 +(49, 97, 1) 3 +(49, 98, 1) 2 +(49, 99, 1) 1 +(49, 100, 1) 0 +(50, 1, 1) 0 +(50, 2, 1) 1 +(50, 3, 1) 2 +(50, 4, 1) 3 +(50, 5, 1) 4 +(50, 6, 1) 5 +(50, 7, 1) 6 +(50, 8, 1) 7 +(50, 9, 1) 8 +(50, 10, 1) 9 +(50, 11, 1) 10 +(50, 12, 1) 11 +(50, 13, 1) 12 +(50, 14, 1) 13 +(50, 15, 1) 14 +(50, 16, 1) 15 +(50, 17, 1) 16 +(50, 18, 1) 17 +(50, 19, 1) 18 +(50, 20, 1) 19 +(50, 21, 1) 20 +(50, 22, 1) 21 +(50, 23, 1) 22 +(50, 24, 1) 23 +(50, 25, 1) 24 +(50, 26, 1) 25 +(50, 27, 1) 26 +(50, 28, 1) 27 +(50, 29, 1) 28 +(50, 30, 1) 29 +(50, 31, 1) 30 +(50, 32, 1) 31 +(50, 33, 1) 32 +(50, 34, 1) 33 +(50, 35, 1) 34 +(50, 36, 1) 35 +(50, 37, 1) 36 +(50, 38, 1) 37 +(50, 39, 1) 38 +(50, 62, 1) 38 +(50, 63, 1) 37 +(50, 64, 1) 36 +(50, 65, 1) 35 +(50, 66, 1) 34 +(50, 67, 1) 33 +(50, 68, 1) 32 +(50, 69, 1) 31 +(50, 70, 1) 30 +(50, 71, 1) 29 +(50, 72, 1) 28 +(50, 73, 1) 27 +(50, 74, 1) 26 +(50, 75, 1) 25 +(50, 76, 1) 24 +(50, 77, 1) 23 +(50, 78, 1) 22 +(50, 79, 1) 21 +(50, 80, 1) 20 +(50, 81, 1) 19 +(50, 82, 1) 18 +(50, 83, 1) 17 +(50, 84, 1) 16 +(50, 85, 1) 15 +(50, 86, 1) 14 +(50, 87, 1) 13 +(50, 88, 1) 12 +(50, 89, 1) 11 +(50, 90, 1) 10 +(50, 91, 1) 9 +(50, 92, 1) 8 +(50, 93, 1) 7 +(50, 94, 1) 6 +(50, 95, 1) 5 +(50, 96, 1) 4 +(50, 97, 1) 3 +(50, 98, 1) 2 +(50, 99, 1) 1 +(50, 100, 1) 0 +(51, 1, 1) 0 +(51, 2, 1) 1 +(51, 3, 1) 2 +(51, 4, 1) 3 +(51, 5, 1) 4 +(51, 6, 1) 5 +(51, 7, 1) 6 +(51, 8, 1) 7 +(51, 9, 1) 8 +(51, 10, 1) 9 +(51, 11, 1) 10 +(51, 12, 1) 11 +(51, 13, 1) 12 +(51, 14, 1) 13 +(51, 15, 1) 14 +(51, 16, 1) 15 +(51, 17, 1) 16 +(51, 18, 1) 17 +(51, 19, 1) 18 +(51, 20, 1) 19 +(51, 21, 1) 20 +(51, 22, 1) 21 +(51, 23, 1) 22 +(51, 24, 1) 23 +(51, 25, 1) 24 +(51, 26, 1) 25 +(51, 27, 1) 26 +(51, 28, 1) 27 +(51, 29, 1) 28 +(51, 30, 1) 29 +(51, 31, 1) 30 +(51, 32, 1) 31 +(51, 33, 1) 32 +(51, 34, 1) 33 +(51, 35, 1) 34 +(51, 36, 1) 35 +(51, 37, 1) 36 +(51, 38, 1) 37 +(51, 39, 1) 38 +(51, 62, 1) 38 +(51, 63, 1) 37 +(51, 64, 1) 36 +(51, 65, 1) 35 +(51, 66, 1) 34 +(51, 67, 1) 33 +(51, 68, 1) 32 +(51, 69, 1) 31 +(51, 70, 1) 30 +(51, 71, 1) 29 +(51, 72, 1) 28 +(51, 73, 1) 27 +(51, 74, 1) 26 +(51, 75, 1) 25 +(51, 76, 1) 24 +(51, 77, 1) 23 +(51, 78, 1) 22 +(51, 79, 1) 21 +(51, 80, 1) 20 +(51, 81, 1) 19 +(51, 82, 1) 18 +(51, 83, 1) 17 +(51, 84, 1) 16 +(51, 85, 1) 15 +(51, 86, 1) 14 +(51, 87, 1) 13 +(51, 88, 1) 12 +(51, 89, 1) 11 +(51, 90, 1) 10 +(51, 91, 1) 9 +(51, 92, 1) 8 +(51, 93, 1) 7 +(51, 94, 1) 6 +(51, 95, 1) 5 +(51, 96, 1) 4 +(51, 97, 1) 3 +(51, 98, 1) 2 +(51, 99, 1) 1 +(51, 100, 1) 0 +(52, 1, 1) 0 +(52, 2, 1) 1 +(52, 3, 1) 2 +(52, 4, 1) 3 +(52, 5, 1) 4 +(52, 6, 1) 5 +(52, 7, 1) 6 +(52, 8, 1) 7 +(52, 9, 1) 8 +(52, 10, 1) 9 +(52, 11, 1) 10 +(52, 12, 1) 11 +(52, 13, 1) 12 +(52, 14, 1) 13 +(52, 15, 1) 14 +(52, 16, 1) 15 +(52, 17, 1) 16 +(52, 18, 1) 17 +(52, 19, 1) 18 +(52, 20, 1) 19 +(52, 21, 1) 20 +(52, 22, 1) 21 +(52, 23, 1) 22 +(52, 24, 1) 23 +(52, 25, 1) 24 +(52, 26, 1) 25 +(52, 27, 1) 26 +(52, 28, 1) 27 +(52, 29, 1) 28 +(52, 30, 1) 29 +(52, 31, 1) 30 +(52, 32, 1) 31 +(52, 33, 1) 32 +(52, 34, 1) 33 +(52, 35, 1) 34 +(52, 36, 1) 35 +(52, 37, 1) 36 +(52, 38, 1) 37 +(52, 39, 1) 38 +(52, 62, 1) 38 +(52, 63, 1) 37 +(52, 64, 1) 36 +(52, 65, 1) 35 +(52, 66, 1) 34 +(52, 67, 1) 33 +(52, 68, 1) 32 +(52, 69, 1) 31 +(52, 70, 1) 30 +(52, 71, 1) 29 +(52, 72, 1) 28 +(52, 73, 1) 27 +(52, 74, 1) 26 +(52, 75, 1) 25 +(52, 76, 1) 24 +(52, 77, 1) 23 +(52, 78, 1) 22 +(52, 79, 1) 21 +(52, 80, 1) 20 +(52, 81, 1) 19 +(52, 82, 1) 18 +(52, 83, 1) 17 +(52, 84, 1) 16 +(52, 85, 1) 15 +(52, 86, 1) 14 +(52, 87, 1) 13 +(52, 88, 1) 12 +(52, 89, 1) 11 +(52, 90, 1) 10 +(52, 91, 1) 9 +(52, 92, 1) 8 +(52, 93, 1) 7 +(52, 94, 1) 6 +(52, 95, 1) 5 +(52, 96, 1) 4 +(52, 97, 1) 3 +(52, 98, 1) 2 +(52, 99, 1) 1 +(52, 100, 1) 0 +(53, 1, 1) 0 +(53, 2, 1) 1 +(53, 3, 1) 2 +(53, 4, 1) 3 +(53, 5, 1) 4 +(53, 6, 1) 5 +(53, 7, 1) 6 +(53, 8, 1) 7 +(53, 9, 1) 8 +(53, 10, 1) 9 +(53, 11, 1) 10 +(53, 12, 1) 11 +(53, 13, 1) 12 +(53, 14, 1) 13 +(53, 15, 1) 14 +(53, 16, 1) 15 +(53, 17, 1) 16 +(53, 18, 1) 17 +(53, 19, 1) 18 +(53, 20, 1) 19 +(53, 21, 1) 20 +(53, 22, 1) 21 +(53, 23, 1) 22 +(53, 24, 1) 23 +(53, 25, 1) 24 +(53, 26, 1) 25 +(53, 27, 1) 26 +(53, 28, 1) 27 +(53, 29, 1) 28 +(53, 30, 1) 29 +(53, 31, 1) 30 +(53, 32, 1) 31 +(53, 33, 1) 32 +(53, 34, 1) 33 +(53, 35, 1) 34 +(53, 36, 1) 35 +(53, 37, 1) 36 +(53, 38, 1) 37 +(53, 39, 1) 38 +(53, 62, 1) 38 +(53, 63, 1) 37 +(53, 64, 1) 36 +(53, 65, 1) 35 +(53, 66, 1) 34 +(53, 67, 1) 33 +(53, 68, 1) 32 +(53, 69, 1) 31 +(53, 70, 1) 30 +(53, 71, 1) 29 +(53, 72, 1) 28 +(53, 73, 1) 27 +(53, 74, 1) 26 +(53, 75, 1) 25 +(53, 76, 1) 24 +(53, 77, 1) 23 +(53, 78, 1) 22 +(53, 79, 1) 21 +(53, 80, 1) 20 +(53, 81, 1) 19 +(53, 82, 1) 18 +(53, 83, 1) 17 +(53, 84, 1) 16 +(53, 85, 1) 15 +(53, 86, 1) 14 +(53, 87, 1) 13 +(53, 88, 1) 12 +(53, 89, 1) 11 +(53, 90, 1) 10 +(53, 91, 1) 9 +(53, 92, 1) 8 +(53, 93, 1) 7 +(53, 94, 1) 6 +(53, 95, 1) 5 +(53, 96, 1) 4 +(53, 97, 1) 3 +(53, 98, 1) 2 +(53, 99, 1) 1 +(53, 100, 1) 0 +(54, 1, 1) 0 +(54, 2, 1) 1 +(54, 3, 1) 2 +(54, 4, 1) 3 +(54, 5, 1) 4 +(54, 6, 1) 5 +(54, 7, 1) 6 +(54, 8, 1) 7 +(54, 9, 1) 8 +(54, 10, 1) 9 +(54, 11, 1) 10 +(54, 12, 1) 11 +(54, 13, 1) 12 +(54, 14, 1) 13 +(54, 15, 1) 14 +(54, 16, 1) 15 +(54, 17, 1) 16 +(54, 18, 1) 17 +(54, 19, 1) 18 +(54, 20, 1) 19 +(54, 21, 1) 20 +(54, 22, 1) 21 +(54, 23, 1) 22 +(54, 24, 1) 23 +(54, 25, 1) 24 +(54, 26, 1) 25 +(54, 27, 1) 26 +(54, 28, 1) 27 +(54, 29, 1) 28 +(54, 30, 1) 29 +(54, 31, 1) 30 +(54, 32, 1) 31 +(54, 33, 1) 32 +(54, 34, 1) 33 +(54, 35, 1) 34 +(54, 36, 1) 35 +(54, 37, 1) 36 +(54, 38, 1) 37 +(54, 39, 1) 38 +(54, 62, 1) 38 +(54, 63, 1) 37 +(54, 64, 1) 36 +(54, 65, 1) 35 +(54, 66, 1) 34 +(54, 67, 1) 33 +(54, 68, 1) 32 +(54, 69, 1) 31 +(54, 70, 1) 30 +(54, 71, 1) 29 +(54, 72, 1) 28 +(54, 73, 1) 27 +(54, 74, 1) 26 +(54, 75, 1) 25 +(54, 76, 1) 24 +(54, 77, 1) 23 +(54, 78, 1) 22 +(54, 79, 1) 21 +(54, 80, 1) 20 +(54, 81, 1) 19 +(54, 82, 1) 18 +(54, 83, 1) 17 +(54, 84, 1) 16 +(54, 85, 1) 15 +(54, 86, 1) 14 +(54, 87, 1) 13 +(54, 88, 1) 12 +(54, 89, 1) 11 +(54, 90, 1) 10 +(54, 91, 1) 9 +(54, 92, 1) 8 +(54, 93, 1) 7 +(54, 94, 1) 6 +(54, 95, 1) 5 +(54, 96, 1) 4 +(54, 97, 1) 3 +(54, 98, 1) 2 +(54, 99, 1) 1 +(54, 100, 1) 0 +(55, 1, 1) 0 +(55, 2, 1) 1 +(55, 3, 1) 2 +(55, 4, 1) 3 +(55, 5, 1) 4 +(55, 6, 1) 5 +(55, 7, 1) 6 +(55, 8, 1) 7 +(55, 9, 1) 8 +(55, 10, 1) 9 +(55, 11, 1) 10 +(55, 12, 1) 11 +(55, 13, 1) 12 +(55, 14, 1) 13 +(55, 15, 1) 14 +(55, 16, 1) 15 +(55, 17, 1) 16 +(55, 18, 1) 17 +(55, 19, 1) 18 +(55, 20, 1) 19 +(55, 21, 1) 20 +(55, 22, 1) 21 +(55, 23, 1) 22 +(55, 24, 1) 23 +(55, 25, 1) 24 +(55, 26, 1) 25 +(55, 27, 1) 26 +(55, 28, 1) 27 +(55, 29, 1) 28 +(55, 30, 1) 29 +(55, 31, 1) 30 +(55, 32, 1) 30 +(55, 33, 1) 31 +(55, 34, 1) 32 +(55, 35, 1) 33 +(55, 36, 1) 34 +(55, 37, 1) 35 +(55, 38, 1) 36 +(55, 39, 1) 37 +(55, 62, 1) 37 +(55, 63, 1) 36 +(55, 64, 1) 35 +(55, 65, 1) 34 +(55, 66, 1) 33 +(55, 67, 1) 32 +(55, 68, 1) 31 +(55, 69, 1) 30 +(55, 70, 1) 30 +(55, 71, 1) 29 +(55, 72, 1) 28 +(55, 73, 1) 27 +(55, 74, 1) 26 +(55, 75, 1) 25 +(55, 76, 1) 24 +(55, 77, 1) 23 +(55, 78, 1) 22 +(55, 79, 1) 21 +(55, 80, 1) 20 +(55, 81, 1) 19 +(55, 82, 1) 18 +(55, 83, 1) 17 +(55, 84, 1) 16 +(55, 85, 1) 15 +(55, 86, 1) 14 +(55, 87, 1) 13 +(55, 88, 1) 12 +(55, 89, 1) 11 +(55, 90, 1) 10 +(55, 91, 1) 9 +(55, 92, 1) 8 +(55, 93, 1) 7 +(55, 94, 1) 6 +(55, 95, 1) 5 +(55, 96, 1) 4 +(55, 97, 1) 3 +(55, 98, 1) 2 +(55, 99, 1) 1 +(55, 100, 1) 0 +(56, 1, 1) 0 +(56, 2, 1) 1 +(56, 3, 1) 2 +(56, 4, 1) 3 +(56, 5, 1) 4 +(56, 6, 1) 5 +(56, 7, 1) 6 +(56, 8, 1) 7 +(56, 9, 1) 8 +(56, 10, 1) 9 +(56, 11, 1) 10 +(56, 12, 1) 11 +(56, 13, 1) 12 +(56, 14, 1) 13 +(56, 15, 1) 14 +(56, 16, 1) 15 +(56, 17, 1) 16 +(56, 18, 1) 17 +(56, 19, 1) 18 +(56, 20, 1) 19 +(56, 21, 1) 20 +(56, 22, 1) 21 +(56, 23, 1) 22 +(56, 24, 1) 23 +(56, 25, 1) 23 +(56, 26, 1) 24 +(56, 27, 1) 25 +(56, 28, 1) 26 +(56, 29, 1) 27 +(56, 30, 1) 28 +(56, 31, 1) 29 +(56, 32, 1) 30 +(56, 33, 1) 31 +(56, 34, 1) 32 +(56, 35, 1) 33 +(56, 36, 1) 34 +(56, 37, 1) 35 +(56, 38, 1) 36 +(56, 39, 1) 37 +(56, 40, 1) 38 +(56, 61, 1) 38 +(56, 62, 1) 37 +(56, 63, 1) 36 +(56, 64, 1) 35 +(56, 65, 1) 34 +(56, 66, 1) 33 +(56, 67, 1) 32 +(56, 68, 1) 31 +(56, 69, 1) 30 +(56, 70, 1) 29 +(56, 71, 1) 28 +(56, 72, 1) 27 +(56, 73, 1) 26 +(56, 74, 1) 25 +(56, 75, 1) 24 +(56, 76, 1) 23 +(56, 77, 1) 23 +(56, 78, 1) 22 +(56, 79, 1) 21 +(56, 80, 1) 20 +(56, 81, 1) 19 +(56, 82, 1) 18 +(56, 83, 1) 17 +(56, 84, 1) 16 +(56, 85, 1) 15 +(56, 86, 1) 14 +(56, 87, 1) 13 +(56, 88, 1) 12 +(56, 89, 1) 11 +(56, 90, 1) 10 +(56, 91, 1) 9 +(56, 92, 1) 8 +(56, 93, 1) 7 +(56, 94, 1) 6 +(56, 95, 1) 5 +(56, 96, 1) 4 +(56, 97, 1) 3 +(56, 98, 1) 2 +(56, 99, 1) 1 +(56, 100, 1) 0 +(57, 1, 1) 0 +(57, 2, 1) 1 +(57, 3, 1) 2 +(57, 4, 1) 3 +(57, 5, 1) 4 +(57, 6, 1) 5 +(57, 7, 1) 6 +(57, 8, 1) 7 +(57, 9, 1) 8 +(57, 10, 1) 9 +(57, 11, 1) 10 +(57, 12, 1) 11 +(57, 13, 1) 12 +(57, 14, 1) 13 +(57, 15, 1) 14 +(57, 16, 1) 14 +(57, 17, 1) 15 +(57, 18, 1) 16 +(57, 19, 1) 17 +(57, 20, 1) 18 +(57, 21, 1) 19 +(57, 22, 1) 20 +(57, 23, 1) 21 +(57, 24, 1) 22 +(57, 25, 1) 23 +(57, 26, 1) 24 +(57, 27, 1) 25 +(57, 28, 1) 26 +(57, 29, 1) 27 +(57, 30, 1) 28 +(57, 31, 1) 29 +(57, 32, 1) 30 +(57, 33, 1) 31 +(57, 34, 1) 32 +(57, 35, 1) 33 +(57, 36, 1) 34 +(57, 37, 1) 35 +(57, 38, 1) 35 +(57, 39, 1) 36 +(57, 40, 1) 37 +(57, 61, 1) 37 +(57, 62, 1) 36 +(57, 63, 1) 35 +(57, 64, 1) 35 +(57, 65, 1) 34 +(57, 66, 1) 33 +(57, 67, 1) 32 +(57, 68, 1) 31 +(57, 69, 1) 30 +(57, 70, 1) 29 +(57, 71, 1) 28 +(57, 72, 1) 27 +(57, 73, 1) 26 +(57, 74, 1) 25 +(57, 75, 1) 24 +(57, 76, 1) 23 +(57, 77, 1) 22 +(57, 78, 1) 21 +(57, 79, 1) 20 +(57, 80, 1) 19 +(57, 81, 1) 18 +(57, 82, 1) 17 +(57, 83, 1) 16 +(57, 84, 1) 15 +(57, 85, 1) 14 +(57, 86, 1) 14 +(57, 87, 1) 13 +(57, 88, 1) 12 +(57, 89, 1) 11 +(57, 90, 1) 10 +(57, 91, 1) 9 +(57, 92, 1) 8 +(57, 93, 1) 7 +(57, 94, 1) 6 +(57, 95, 1) 5 +(57, 96, 1) 4 +(57, 97, 1) 3 +(57, 98, 1) 2 +(57, 99, 1) 1 +(57, 100, 1) 0 +(58, 1, 1) 0 +(58, 2, 1) 1 +(58, 3, 1) 2 +(58, 4, 1) 3 +(58, 5, 1) 4 +(58, 6, 1) 4 +(58, 7, 1) 5 +(58, 8, 1) 6 +(58, 9, 1) 7 +(58, 10, 1) 8 +(58, 11, 1) 9 +(58, 12, 1) 10 +(58, 13, 1) 11 +(58, 14, 1) 12 +(58, 15, 1) 13 +(58, 16, 1) 14 +(58, 17, 1) 15 +(58, 18, 1) 16 +(58, 19, 1) 17 +(58, 20, 1) 18 +(58, 21, 1) 19 +(58, 22, 1) 20 +(58, 23, 1) 21 +(58, 24, 1) 22 +(58, 25, 1) 23 +(58, 26, 1) 24 +(58, 27, 1) 25 +(58, 28, 1) 26 +(58, 29, 1) 27 +(58, 30, 1) 28 +(58, 31, 1) 29 +(58, 32, 1) 30 +(58, 33, 1) 30 +(58, 34, 1) 31 +(58, 35, 1) 32 +(58, 36, 1) 33 +(58, 37, 1) 34 +(58, 38, 1) 35 +(58, 39, 1) 36 +(58, 40, 1) 37 +(58, 41, 1) 37 +(58, 60, 1) 37 +(58, 61, 1) 37 +(58, 62, 1) 36 +(58, 63, 1) 35 +(58, 64, 1) 34 +(58, 65, 1) 33 +(58, 66, 1) 32 +(58, 67, 1) 31 +(58, 68, 1) 30 +(58, 69, 1) 30 +(58, 70, 1) 29 +(58, 71, 1) 28 +(58, 72, 1) 27 +(58, 73, 1) 26 +(58, 74, 1) 25 +(58, 75, 1) 24 +(58, 76, 1) 23 +(58, 77, 1) 22 +(58, 78, 1) 21 +(58, 79, 1) 20 +(58, 80, 1) 19 +(58, 81, 1) 18 +(58, 82, 1) 17 +(58, 83, 1) 16 +(58, 84, 1) 15 +(58, 85, 1) 14 +(58, 86, 1) 13 +(58, 87, 1) 12 +(58, 88, 1) 11 +(58, 89, 1) 10 +(58, 90, 1) 9 +(58, 91, 1) 8 +(58, 92, 1) 7 +(58, 93, 1) 6 +(58, 94, 1) 5 +(58, 95, 1) 4 +(58, 96, 1) 4 +(58, 97, 1) 3 +(58, 98, 1) 2 +(58, 99, 1) 1 +(58, 100, 1) 0 +(59, 1, 1) 0 +(59, 2, 1) 0 +(59, 3, 1) 1 +(59, 4, 1) 2 +(59, 5, 1) 3 +(59, 6, 1) 4 +(59, 7, 1) 5 +(59, 8, 1) 6 +(59, 9, 1) 7 +(59, 10, 1) 8 +(59, 11, 1) 9 +(59, 12, 1) 10 +(59, 13, 1) 11 +(59, 14, 1) 12 +(59, 15, 1) 13 +(59, 16, 1) 14 +(59, 17, 1) 15 +(59, 18, 1) 16 +(59, 19, 1) 17 +(59, 20, 1) 18 +(59, 21, 1) 19 +(59, 22, 1) 20 +(59, 23, 1) 21 +(59, 24, 1) 22 +(59, 25, 1) 23 +(59, 26, 1) 24 +(59, 27, 1) 25 +(59, 28, 1) 25 +(59, 29, 1) 26 +(59, 30, 1) 27 +(59, 31, 1) 28 +(59, 32, 1) 29 +(59, 33, 1) 30 +(59, 34, 1) 31 +(59, 35, 1) 32 +(59, 36, 1) 33 +(59, 37, 1) 34 +(59, 38, 1) 34 +(59, 39, 1) 35 +(59, 40, 1) 36 +(59, 41, 1) 37 +(59, 42, 1) 38 +(59, 59, 1) 38 +(59, 60, 1) 37 +(59, 61, 1) 36 +(59, 62, 1) 35 +(59, 63, 1) 34 +(59, 64, 1) 34 +(59, 65, 1) 33 +(59, 66, 1) 32 +(59, 67, 1) 31 +(59, 68, 1) 30 +(59, 69, 1) 29 +(59, 70, 1) 28 +(59, 71, 1) 27 +(59, 72, 1) 26 +(59, 73, 1) 25 +(59, 74, 1) 25 +(59, 75, 1) 24 +(59, 76, 1) 23 +(59, 77, 1) 22 +(59, 78, 1) 21 +(59, 79, 1) 20 +(59, 80, 1) 19 +(59, 81, 1) 18 +(59, 82, 1) 17 +(59, 83, 1) 16 +(59, 84, 1) 15 +(59, 85, 1) 14 +(59, 86, 1) 13 +(59, 87, 1) 12 +(59, 88, 1) 11 +(59, 89, 1) 10 +(59, 90, 1) 9 +(59, 91, 1) 8 +(59, 92, 1) 7 +(59, 93, 1) 6 +(59, 94, 1) 5 +(59, 95, 1) 4 +(59, 96, 1) 3 +(59, 97, 1) 2 +(59, 98, 1) 1 +(59, 99, 1) 0 +(59, 100, 1) 0 +(60, 1, 1) 0 +(60, 2, 1) 0 +(60, 3, 1) 1 +(60, 4, 1) 2 +(60, 5, 1) 3 +(60, 6, 1) 4 +(60, 7, 1) 5 +(60, 8, 1) 6 +(60, 9, 1) 7 +(60, 10, 1) 8 +(60, 11, 1) 9 +(60, 12, 1) 10 +(60, 13, 1) 11 +(60, 14, 1) 12 +(60, 15, 1) 13 +(60, 16, 1) 14 +(60, 17, 1) 15 +(60, 18, 1) 16 +(60, 19, 1) 17 +(60, 20, 1) 18 +(60, 21, 1) 19 +(60, 22, 1) 20 +(60, 23, 1) 20 +(60, 24, 1) 21 +(60, 25, 1) 22 +(60, 26, 1) 23 +(60, 27, 1) 24 +(60, 28, 1) 25 +(60, 29, 1) 26 +(60, 30, 1) 27 +(60, 31, 1) 28 +(60, 32, 1) 29 +(60, 33, 1) 30 +(60, 34, 1) 30 +(60, 35, 1) 31 +(60, 36, 1) 32 +(60, 37, 1) 33 +(60, 38, 1) 34 +(60, 39, 1) 35 +(60, 40, 1) 35 +(60, 41, 1) 36 +(60, 42, 1) 37 +(60, 43, 1) 37 +(60, 58, 1) 37 +(60, 59, 1) 37 +(60, 60, 1) 36 +(60, 61, 1) 35 +(60, 62, 1) 35 +(60, 63, 1) 34 +(60, 64, 1) 33 +(60, 65, 1) 32 +(60, 66, 1) 31 +(60, 67, 1) 30 +(60, 68, 1) 30 +(60, 69, 1) 29 +(60, 70, 1) 28 +(60, 71, 1) 27 +(60, 72, 1) 26 +(60, 73, 1) 25 +(60, 74, 1) 24 +(60, 75, 1) 23 +(60, 76, 1) 22 +(60, 77, 1) 21 +(60, 78, 1) 20 +(60, 79, 1) 20 +(60, 80, 1) 19 +(60, 81, 1) 18 +(60, 82, 1) 17 +(60, 83, 1) 16 +(60, 84, 1) 15 +(60, 85, 1) 14 +(60, 86, 1) 13 +(60, 87, 1) 12 +(60, 88, 1) 11 +(60, 89, 1) 10 +(60, 90, 1) 9 +(60, 91, 1) 8 +(60, 92, 1) 7 +(60, 93, 1) 6 +(60, 94, 1) 5 +(60, 95, 1) 4 +(60, 96, 1) 3 +(60, 97, 1) 2 +(60, 98, 1) 1 +(60, 99, 1) 0 +(60, 100, 1) 0 +(61, 4, 1) 2 +(61, 5, 1) 3 +(61, 6, 1) 4 +(61, 7, 1) 5 +(61, 8, 1) 6 +(61, 9, 1) 7 +(61, 10, 1) 8 +(61, 11, 1) 9 +(61, 12, 1) 10 +(61, 13, 1) 11 +(61, 14, 1) 12 +(61, 15, 1) 13 +(61, 16, 1) 14 +(61, 17, 1) 15 +(61, 18, 1) 16 +(61, 19, 1) 16 +(61, 20, 1) 17 +(61, 21, 1) 18 +(61, 22, 1) 19 +(61, 23, 1) 20 +(61, 24, 1) 21 +(61, 25, 1) 22 +(61, 26, 1) 23 +(61, 27, 1) 24 +(61, 28, 1) 25 +(61, 29, 1) 26 +(61, 30, 1) 27 +(61, 31, 1) 27 +(61, 32, 1) 28 +(61, 33, 1) 29 +(61, 34, 1) 30 +(61, 35, 1) 31 +(61, 36, 1) 32 +(61, 37, 1) 32 +(61, 38, 1) 33 +(61, 39, 1) 34 +(61, 40, 1) 35 +(61, 41, 1) 35 +(61, 42, 1) 36 +(61, 43, 1) 37 +(61, 44, 1) 37 +(61, 45, 1) 38 +(61, 56, 1) 38 +(61, 57, 1) 37 +(61, 58, 1) 37 +(61, 59, 1) 36 +(61, 60, 1) 35 +(61, 61, 1) 35 +(61, 62, 1) 34 +(61, 63, 1) 33 +(61, 64, 1) 32 +(61, 65, 1) 32 +(61, 66, 1) 31 +(61, 67, 1) 30 +(61, 68, 1) 29 +(61, 69, 1) 28 +(61, 70, 1) 27 +(61, 71, 1) 27 +(61, 72, 1) 26 +(61, 73, 1) 25 +(61, 74, 1) 24 +(61, 75, 1) 23 +(61, 76, 1) 22 +(61, 77, 1) 21 +(61, 78, 1) 20 +(61, 79, 1) 19 +(61, 80, 1) 18 +(61, 81, 1) 17 +(61, 82, 1) 16 +(61, 83, 1) 16 +(61, 84, 1) 15 +(61, 85, 1) 14 +(61, 86, 1) 13 +(61, 87, 1) 12 +(61, 88, 1) 11 +(61, 89, 1) 10 +(61, 90, 1) 9 +(61, 91, 1) 8 +(61, 92, 1) 7 +(61, 93, 1) 6 +(61, 94, 1) 5 +(61, 95, 1) 4 +(61, 96, 1) 3 +(61, 97, 1) 2 +(62, 4, 1) 2 +(62, 5, 1) 3 +(62, 6, 1) 4 +(62, 7, 1) 5 +(62, 8, 1) 6 +(62, 9, 1) 7 +(62, 10, 1) 8 +(62, 11, 1) 9 +(62, 12, 1) 9 +(62, 13, 1) 10 +(62, 14, 1) 11 +(62, 15, 1) 12 +(62, 16, 1) 13 +(62, 17, 1) 14 +(62, 18, 1) 15 +(62, 19, 1) 16 +(62, 20, 1) 17 +(62, 21, 1) 18 +(62, 22, 1) 19 +(62, 23, 1) 20 +(62, 24, 1) 21 +(62, 25, 1) 22 +(62, 26, 1) 23 +(62, 27, 1) 23 +(62, 28, 1) 24 +(62, 29, 1) 25 +(62, 30, 1) 26 +(62, 31, 1) 27 +(62, 32, 1) 28 +(62, 33, 1) 29 +(62, 34, 1) 29 +(62, 35, 1) 30 +(62, 36, 1) 31 +(62, 37, 1) 32 +(62, 38, 1) 33 +(62, 39, 1) 33 +(62, 40, 1) 34 +(62, 41, 1) 35 +(62, 42, 1) 35 +(62, 43, 1) 36 +(62, 44, 1) 36 +(62, 45, 1) 37 +(62, 46, 1) 37 +(62, 47, 1) 37 +(62, 48, 1) 38 +(62, 49, 1) 38 +(62, 50, 1) 38 +(62, 51, 1) 38 +(62, 52, 1) 38 +(62, 53, 1) 38 +(62, 54, 1) 37 +(62, 55, 1) 37 +(62, 56, 1) 37 +(62, 57, 1) 36 +(62, 58, 1) 36 +(62, 59, 1) 35 +(62, 60, 1) 35 +(62, 61, 1) 34 +(62, 62, 1) 33 +(62, 63, 1) 33 +(62, 64, 1) 32 +(62, 65, 1) 31 +(62, 66, 1) 30 +(62, 67, 1) 29 +(62, 68, 1) 29 +(62, 69, 1) 28 +(62, 70, 1) 27 +(62, 71, 1) 26 +(62, 72, 1) 25 +(62, 73, 1) 24 +(62, 74, 1) 23 +(62, 75, 1) 23 +(62, 76, 1) 22 +(62, 77, 1) 21 +(62, 78, 1) 20 +(62, 79, 1) 19 +(62, 80, 1) 18 +(62, 81, 1) 17 +(62, 82, 1) 16 +(62, 83, 1) 15 +(62, 84, 1) 14 +(62, 85, 1) 13 +(62, 86, 1) 12 +(62, 87, 1) 11 +(62, 88, 1) 10 +(62, 89, 1) 9 +(62, 90, 1) 9 +(62, 91, 1) 8 +(62, 92, 1) 7 +(62, 93, 1) 6 +(62, 94, 1) 5 +(62, 95, 1) 4 +(62, 96, 1) 3 +(62, 97, 1) 2 +(63, 4, 1) 2 +(63, 5, 1) 3 +(63, 6, 1) 3 +(63, 7, 1) 4 +(63, 8, 1) 5 +(63, 9, 1) 6 +(63, 10, 1) 7 +(63, 11, 1) 8 +(63, 12, 1) 9 +(63, 13, 1) 10 +(63, 14, 1) 11 +(63, 15, 1) 12 +(63, 16, 1) 13 +(63, 17, 1) 14 +(63, 18, 1) 15 +(63, 19, 1) 16 +(63, 20, 1) 17 +(63, 21, 1) 18 +(63, 22, 1) 18 +(63, 23, 1) 19 +(63, 24, 1) 20 +(63, 25, 1) 21 +(63, 26, 1) 22 +(63, 27, 1) 23 +(63, 28, 1) 24 +(63, 29, 1) 25 +(63, 30, 1) 26 +(63, 31, 1) 26 +(63, 32, 1) 27 +(63, 33, 1) 28 +(63, 34, 1) 29 +(63, 35, 1) 30 +(63, 36, 1) 30 +(63, 37, 1) 31 +(63, 38, 1) 32 +(63, 39, 1) 33 +(63, 40, 1) 33 +(63, 41, 1) 34 +(63, 42, 1) 34 +(63, 43, 1) 35 +(63, 44, 1) 35 +(63, 45, 1) 36 +(63, 46, 1) 36 +(63, 47, 1) 37 +(63, 48, 1) 37 +(63, 49, 1) 37 +(63, 50, 1) 37 +(63, 51, 1) 37 +(63, 52, 1) 37 +(63, 53, 1) 37 +(63, 54, 1) 37 +(63, 55, 1) 36 +(63, 56, 1) 36 +(63, 57, 1) 35 +(63, 58, 1) 35 +(63, 59, 1) 34 +(63, 60, 1) 34 +(63, 61, 1) 33 +(63, 62, 1) 33 +(63, 63, 1) 32 +(63, 64, 1) 31 +(63, 65, 1) 30 +(63, 66, 1) 30 +(63, 67, 1) 29 +(63, 68, 1) 28 +(63, 69, 1) 27 +(63, 70, 1) 26 +(63, 71, 1) 26 +(63, 72, 1) 25 +(63, 73, 1) 24 +(63, 74, 1) 23 +(63, 75, 1) 22 +(63, 76, 1) 21 +(63, 77, 1) 20 +(63, 78, 1) 19 +(63, 79, 1) 18 +(63, 80, 1) 18 +(63, 81, 1) 17 +(63, 82, 1) 16 +(63, 83, 1) 15 +(63, 84, 1) 14 +(63, 85, 1) 13 +(63, 86, 1) 12 +(63, 87, 1) 11 +(63, 88, 1) 10 +(63, 89, 1) 9 +(63, 90, 1) 8 +(63, 91, 1) 7 +(63, 92, 1) 6 +(63, 93, 1) 5 +(63, 94, 1) 4 +(63, 95, 1) 3 +(63, 96, 1) 3 +(63, 97, 1) 2 +(64, 4, 1) 1 +(64, 5, 1) 2 +(64, 6, 1) 3 +(64, 7, 1) 4 +(64, 8, 1) 5 +(64, 9, 1) 6 +(64, 10, 1) 7 +(64, 11, 1) 8 +(64, 12, 1) 9 +(64, 13, 1) 10 +(64, 14, 1) 11 +(64, 15, 1) 12 +(64, 16, 1) 13 +(64, 17, 1) 14 +(64, 18, 1) 14 +(64, 19, 1) 15 +(64, 20, 1) 16 +(64, 21, 1) 17 +(64, 22, 1) 18 +(64, 23, 1) 19 +(64, 24, 1) 20 +(64, 25, 1) 21 +(64, 26, 1) 22 +(64, 27, 1) 22 +(64, 28, 1) 23 +(64, 29, 1) 24 +(64, 30, 1) 25 +(64, 31, 1) 26 +(64, 32, 1) 27 +(64, 33, 1) 27 +(64, 34, 1) 28 +(64, 35, 1) 29 +(64, 36, 1) 30 +(64, 37, 1) 30 +(64, 38, 1) 31 +(64, 39, 1) 32 +(64, 40, 1) 32 +(64, 41, 1) 33 +(64, 42, 1) 34 +(64, 43, 1) 34 +(64, 44, 1) 35 +(64, 45, 1) 35 +(64, 46, 1) 35 +(64, 47, 1) 36 +(64, 48, 1) 36 +(64, 49, 1) 36 +(64, 50, 1) 36 +(64, 51, 1) 36 +(64, 52, 1) 36 +(64, 53, 1) 36 +(64, 54, 1) 36 +(64, 55, 1) 35 +(64, 56, 1) 35 +(64, 57, 1) 35 +(64, 58, 1) 34 +(64, 59, 1) 34 +(64, 60, 1) 33 +(64, 61, 1) 32 +(64, 62, 1) 32 +(64, 63, 1) 31 +(64, 64, 1) 30 +(64, 65, 1) 30 +(64, 66, 1) 29 +(64, 67, 1) 28 +(64, 68, 1) 27 +(64, 69, 1) 27 +(64, 70, 1) 26 +(64, 71, 1) 25 +(64, 72, 1) 24 +(64, 73, 1) 23 +(64, 74, 1) 22 +(64, 75, 1) 22 +(64, 76, 1) 21 +(64, 77, 1) 20 +(64, 78, 1) 19 +(64, 79, 1) 18 +(64, 80, 1) 17 +(64, 81, 1) 16 +(64, 82, 1) 15 +(64, 83, 1) 14 +(64, 84, 1) 14 +(64, 85, 1) 13 +(64, 86, 1) 12 +(64, 87, 1) 11 +(64, 88, 1) 10 +(64, 89, 1) 9 +(64, 90, 1) 8 +(64, 91, 1) 7 +(64, 92, 1) 6 +(64, 93, 1) 5 +(64, 94, 1) 4 +(64, 95, 1) 3 +(64, 96, 1) 2 +(64, 97, 1) 1 +(65, 4, 1) 1 +(65, 5, 1) 2 +(65, 6, 1) 3 +(65, 7, 1) 4 +(65, 8, 1) 5 +(65, 9, 1) 6 +(65, 10, 1) 7 +(65, 11, 1) 8 +(65, 12, 1) 8 +(65, 13, 1) 9 +(65, 14, 1) 10 +(65, 15, 1) 11 +(65, 16, 1) 12 +(65, 17, 1) 13 +(65, 18, 1) 14 +(65, 19, 1) 15 +(65, 20, 1) 16 +(65, 21, 1) 17 +(65, 22, 1) 18 +(65, 23, 1) 19 +(65, 24, 1) 19 +(65, 25, 1) 20 +(65, 26, 1) 21 +(65, 27, 1) 22 +(65, 28, 1) 23 +(65, 29, 1) 24 +(65, 30, 1) 24 +(65, 31, 1) 25 +(65, 32, 1) 26 +(65, 33, 1) 27 +(65, 34, 1) 28 +(65, 35, 1) 28 +(65, 36, 1) 29 +(65, 37, 1) 30 +(65, 38, 1) 30 +(65, 39, 1) 31 +(65, 40, 1) 32 +(65, 41, 1) 32 +(65, 42, 1) 33 +(65, 43, 1) 33 +(65, 44, 1) 34 +(65, 45, 1) 34 +(65, 46, 1) 34 +(65, 47, 1) 35 +(65, 48, 1) 35 +(65, 49, 1) 35 +(65, 50, 1) 35 +(65, 51, 1) 35 +(65, 52, 1) 35 +(65, 53, 1) 35 +(65, 54, 1) 35 +(65, 55, 1) 34 +(65, 56, 1) 34 +(65, 57, 1) 34 +(65, 58, 1) 33 +(65, 59, 1) 33 +(65, 60, 1) 32 +(65, 61, 1) 32 +(65, 62, 1) 31 +(65, 63, 1) 30 +(65, 64, 1) 30 +(65, 65, 1) 29 +(65, 66, 1) 28 +(65, 67, 1) 28 +(65, 68, 1) 27 +(65, 69, 1) 26 +(65, 70, 1) 25 +(65, 71, 1) 24 +(65, 72, 1) 24 +(65, 73, 1) 23 +(65, 74, 1) 22 +(65, 75, 1) 21 +(65, 76, 1) 20 +(65, 77, 1) 19 +(65, 78, 1) 19 +(65, 79, 1) 18 +(65, 80, 1) 17 +(65, 81, 1) 16 +(65, 82, 1) 15 +(65, 83, 1) 14 +(65, 84, 1) 13 +(65, 85, 1) 12 +(65, 86, 1) 11 +(65, 87, 1) 10 +(65, 88, 1) 9 +(65, 89, 1) 8 +(65, 90, 1) 8 +(65, 91, 1) 7 +(65, 92, 1) 6 +(65, 93, 1) 5 +(65, 94, 1) 4 +(65, 95, 1) 3 +(65, 96, 1) 2 +(65, 97, 1) 1 +(66, 6, 1) 3 +(66, 7, 1) 4 +(66, 8, 1) 5 +(66, 9, 1) 6 +(66, 10, 1) 6 +(66, 11, 1) 7 +(66, 12, 1) 8 +(66, 13, 1) 9 +(66, 14, 1) 10 +(66, 15, 1) 11 +(66, 16, 1) 12 +(66, 17, 1) 13 +(66, 18, 1) 14 +(66, 19, 1) 15 +(66, 20, 1) 16 +(66, 21, 1) 16 +(66, 22, 1) 17 +(66, 23, 1) 18 +(66, 24, 1) 19 +(66, 25, 1) 20 +(66, 26, 1) 21 +(66, 27, 1) 21 +(66, 28, 1) 22 +(66, 29, 1) 23 +(66, 30, 1) 24 +(66, 31, 1) 25 +(66, 32, 1) 25 +(66, 33, 1) 26 +(66, 34, 1) 27 +(66, 35, 1) 28 +(66, 36, 1) 28 +(66, 37, 1) 29 +(66, 38, 1) 30 +(66, 39, 1) 30 +(66, 40, 1) 31 +(66, 41, 1) 31 +(66, 42, 1) 32 +(66, 43, 1) 32 +(66, 44, 1) 33 +(66, 45, 1) 33 +(66, 46, 1) 33 +(66, 47, 1) 34 +(66, 48, 1) 34 +(66, 49, 1) 34 +(66, 50, 1) 34 +(66, 51, 1) 34 +(66, 52, 1) 34 +(66, 53, 1) 34 +(66, 54, 1) 34 +(66, 55, 1) 33 +(66, 56, 1) 33 +(66, 57, 1) 33 +(66, 58, 1) 32 +(66, 59, 1) 32 +(66, 60, 1) 31 +(66, 61, 1) 31 +(66, 62, 1) 30 +(66, 63, 1) 30 +(66, 64, 1) 29 +(66, 65, 1) 28 +(66, 66, 1) 28 +(66, 67, 1) 27 +(66, 68, 1) 26 +(66, 69, 1) 25 +(66, 70, 1) 25 +(66, 71, 1) 24 +(66, 72, 1) 23 +(66, 73, 1) 22 +(66, 74, 1) 21 +(66, 75, 1) 21 +(66, 76, 1) 20 +(66, 77, 1) 19 +(66, 78, 1) 18 +(66, 79, 1) 17 +(66, 80, 1) 16 +(66, 81, 1) 16 +(66, 82, 1) 15 +(66, 83, 1) 14 +(66, 84, 1) 13 +(66, 85, 1) 12 +(66, 86, 1) 11 +(66, 87, 1) 10 +(66, 88, 1) 9 +(66, 89, 1) 8 +(66, 90, 1) 7 +(66, 91, 1) 6 +(66, 92, 1) 6 +(66, 93, 1) 5 +(66, 94, 1) 4 +(66, 95, 1) 3 +(67, 6, 1) 2 +(67, 7, 1) 3 +(67, 8, 1) 4 +(67, 9, 1) 5 +(67, 10, 1) 6 +(67, 11, 1) 7 +(67, 12, 1) 8 +(67, 13, 1) 9 +(67, 14, 1) 10 +(67, 15, 1) 11 +(67, 16, 1) 11 +(67, 17, 1) 12 +(67, 18, 1) 13 +(67, 19, 1) 14 +(67, 20, 1) 15 +(67, 21, 1) 16 +(67, 22, 1) 17 +(67, 23, 1) 18 +(67, 24, 1) 18 +(67, 25, 1) 19 +(67, 26, 1) 20 +(67, 27, 1) 21 +(67, 28, 1) 22 +(67, 29, 1) 23 +(67, 30, 1) 23 +(67, 31, 1) 24 +(67, 32, 1) 25 +(67, 33, 1) 26 +(67, 34, 1) 26 +(67, 35, 1) 27 +(67, 36, 1) 28 +(67, 37, 1) 28 +(67, 38, 1) 29 +(67, 39, 1) 29 +(67, 40, 1) 30 +(67, 41, 1) 30 +(67, 42, 1) 31 +(67, 43, 1) 31 +(67, 44, 1) 32 +(67, 45, 1) 32 +(67, 46, 1) 32 +(67, 47, 1) 33 +(67, 48, 1) 33 +(67, 49, 1) 33 +(67, 50, 1) 33 +(67, 51, 1) 33 +(67, 52, 1) 33 +(67, 53, 1) 33 +(67, 54, 1) 33 +(67, 55, 1) 32 +(67, 56, 1) 32 +(67, 57, 1) 32 +(67, 58, 1) 31 +(67, 59, 1) 31 +(67, 60, 1) 30 +(67, 61, 1) 30 +(67, 62, 1) 29 +(67, 63, 1) 29 +(67, 64, 1) 28 +(67, 65, 1) 28 +(67, 66, 1) 27 +(67, 67, 1) 26 +(67, 68, 1) 26 +(67, 69, 1) 25 +(67, 70, 1) 24 +(67, 71, 1) 23 +(67, 72, 1) 23 +(67, 73, 1) 22 +(67, 74, 1) 21 +(67, 75, 1) 20 +(67, 76, 1) 19 +(67, 77, 1) 18 +(67, 78, 1) 18 +(67, 79, 1) 17 +(67, 80, 1) 16 +(67, 81, 1) 15 +(67, 82, 1) 14 +(67, 83, 1) 13 +(67, 84, 1) 12 +(67, 85, 1) 11 +(67, 86, 1) 11 +(67, 87, 1) 10 +(67, 88, 1) 9 +(67, 89, 1) 8 +(67, 90, 1) 7 +(67, 91, 1) 6 +(67, 92, 1) 5 +(67, 93, 1) 4 +(67, 94, 1) 3 +(67, 95, 1) 2 +(68, 6, 1) 2 +(68, 7, 1) 3 +(68, 8, 1) 4 +(68, 9, 1) 5 +(68, 10, 1) 6 +(68, 11, 1) 7 +(68, 12, 1) 7 +(68, 13, 1) 8 +(68, 14, 1) 9 +(68, 15, 1) 10 +(68, 16, 1) 11 +(68, 17, 1) 12 +(68, 18, 1) 13 +(68, 19, 1) 14 +(68, 20, 1) 15 +(68, 21, 1) 15 +(68, 22, 1) 16 +(68, 23, 1) 17 +(68, 24, 1) 18 +(68, 25, 1) 19 +(68, 26, 1) 20 +(68, 27, 1) 20 +(68, 28, 1) 21 +(68, 29, 1) 22 +(68, 30, 1) 23 +(68, 31, 1) 23 +(68, 32, 1) 24 +(68, 33, 1) 25 +(68, 34, 1) 26 +(68, 35, 1) 26 +(68, 36, 1) 27 +(68, 37, 1) 27 +(68, 38, 1) 28 +(68, 39, 1) 29 +(68, 40, 1) 29 +(68, 41, 1) 30 +(68, 42, 1) 30 +(68, 43, 1) 30 +(68, 44, 1) 31 +(68, 45, 1) 31 +(68, 46, 1) 31 +(68, 47, 1) 32 +(68, 48, 1) 32 +(68, 49, 1) 32 +(68, 50, 1) 32 +(68, 51, 1) 32 +(68, 52, 1) 32 +(68, 53, 1) 32 +(68, 54, 1) 32 +(68, 55, 1) 31 +(68, 56, 1) 31 +(68, 57, 1) 31 +(68, 58, 1) 30 +(68, 59, 1) 30 +(68, 60, 1) 30 +(68, 61, 1) 29 +(68, 62, 1) 29 +(68, 63, 1) 28 +(68, 64, 1) 27 +(68, 65, 1) 27 +(68, 66, 1) 26 +(68, 67, 1) 26 +(68, 68, 1) 25 +(68, 69, 1) 24 +(68, 70, 1) 23 +(68, 71, 1) 23 +(68, 72, 1) 22 +(68, 73, 1) 21 +(68, 74, 1) 20 +(68, 75, 1) 20 +(68, 76, 1) 19 +(68, 77, 1) 18 +(68, 78, 1) 17 +(68, 79, 1) 16 +(68, 80, 1) 15 +(68, 81, 1) 15 +(68, 82, 1) 14 +(68, 83, 1) 13 +(68, 84, 1) 12 +(68, 85, 1) 11 +(68, 86, 1) 10 +(68, 87, 1) 9 +(68, 88, 1) 8 +(68, 89, 1) 7 +(68, 90, 1) 7 +(68, 91, 1) 6 +(68, 92, 1) 5 +(68, 93, 1) 4 +(68, 94, 1) 3 +(68, 95, 1) 2 +(69, 6, 1) 2 +(69, 7, 1) 2 +(69, 8, 1) 3 +(69, 9, 1) 4 +(69, 10, 1) 5 +(69, 11, 1) 6 +(69, 12, 1) 7 +(69, 13, 1) 8 +(69, 14, 1) 9 +(69, 15, 1) 10 +(69, 16, 1) 11 +(69, 17, 1) 11 +(69, 18, 1) 12 +(69, 19, 1) 13 +(69, 20, 1) 14 +(69, 21, 1) 15 +(69, 22, 1) 16 +(69, 23, 1) 17 +(69, 24, 1) 17 +(69, 25, 1) 18 +(69, 26, 1) 19 +(69, 27, 1) 20 +(69, 28, 1) 20 +(69, 29, 1) 21 +(69, 30, 1) 22 +(69, 31, 1) 23 +(69, 32, 1) 23 +(69, 33, 1) 24 +(69, 34, 1) 25 +(69, 35, 1) 25 +(69, 36, 1) 26 +(69, 37, 1) 27 +(69, 38, 1) 27 +(69, 39, 1) 28 +(69, 40, 1) 28 +(69, 41, 1) 29 +(69, 42, 1) 29 +(69, 43, 1) 30 +(69, 44, 1) 30 +(69, 45, 1) 30 +(69, 46, 1) 30 +(69, 47, 1) 31 +(69, 48, 1) 31 +(69, 49, 1) 31 +(69, 50, 1) 31 +(69, 51, 1) 31 +(69, 52, 1) 31 +(69, 53, 1) 31 +(69, 54, 1) 31 +(69, 55, 1) 30 +(69, 56, 1) 30 +(69, 57, 1) 30 +(69, 58, 1) 30 +(69, 59, 1) 29 +(69, 60, 1) 29 +(69, 61, 1) 28 +(69, 62, 1) 28 +(69, 63, 1) 27 +(69, 64, 1) 27 +(69, 65, 1) 26 +(69, 66, 1) 25 +(69, 67, 1) 25 +(69, 68, 1) 24 +(69, 69, 1) 23 +(69, 70, 1) 23 +(69, 71, 1) 22 +(69, 72, 1) 21 +(69, 73, 1) 20 +(69, 74, 1) 20 +(69, 75, 1) 19 +(69, 76, 1) 18 +(69, 77, 1) 17 +(69, 78, 1) 17 +(69, 79, 1) 16 +(69, 80, 1) 15 +(69, 81, 1) 14 +(69, 82, 1) 13 +(69, 83, 1) 12 +(69, 84, 1) 11 +(69, 85, 1) 11 +(69, 86, 1) 10 +(69, 87, 1) 9 +(69, 88, 1) 8 +(69, 89, 1) 7 +(69, 90, 1) 6 +(69, 91, 1) 5 +(69, 92, 1) 4 +(69, 93, 1) 3 +(69, 94, 1) 2 +(69, 95, 1) 2 +(70, 6, 1) 1 +(70, 7, 1) 2 +(70, 8, 1) 3 +(70, 9, 1) 4 +(70, 10, 1) 5 +(70, 11, 1) 6 +(70, 12, 1) 7 +(70, 13, 1) 7 +(70, 14, 1) 8 +(70, 15, 1) 9 +(70, 16, 1) 10 +(70, 17, 1) 11 +(70, 18, 1) 12 +(70, 19, 1) 13 +(70, 20, 1) 13 +(70, 21, 1) 14 +(70, 22, 1) 15 +(70, 23, 1) 16 +(70, 24, 1) 17 +(70, 25, 1) 18 +(70, 26, 1) 18 +(70, 27, 1) 19 +(70, 28, 1) 20 +(70, 29, 1) 21 +(70, 30, 1) 21 +(70, 31, 1) 22 +(70, 32, 1) 23 +(70, 33, 1) 23 +(70, 34, 1) 24 +(70, 35, 1) 25 +(70, 36, 1) 25 +(70, 37, 1) 26 +(70, 38, 1) 26 +(70, 39, 1) 27 +(70, 40, 1) 27 +(70, 41, 1) 28 +(70, 42, 1) 28 +(70, 43, 1) 29 +(70, 44, 1) 29 +(70, 45, 1) 29 +(70, 46, 1) 30 +(70, 47, 1) 30 +(70, 48, 1) 30 +(70, 49, 1) 30 +(70, 50, 1) 30 +(70, 51, 1) 30 +(70, 52, 1) 30 +(70, 53, 1) 30 +(70, 54, 1) 30 +(70, 55, 1) 30 +(70, 56, 1) 29 +(70, 57, 1) 29 +(70, 58, 1) 29 +(70, 59, 1) 28 +(70, 60, 1) 28 +(70, 61, 1) 27 +(70, 62, 1) 27 +(70, 63, 1) 26 +(70, 64, 1) 26 +(70, 65, 1) 25 +(70, 66, 1) 25 +(70, 67, 1) 24 +(70, 68, 1) 23 +(70, 69, 1) 23 +(70, 70, 1) 22 +(70, 71, 1) 21 +(70, 72, 1) 21 +(70, 73, 1) 20 +(70, 74, 1) 19 +(70, 75, 1) 18 +(70, 76, 1) 18 +(70, 77, 1) 17 +(70, 78, 1) 16 +(70, 79, 1) 15 +(70, 80, 1) 14 +(70, 81, 1) 13 +(70, 82, 1) 13 +(70, 83, 1) 12 +(70, 84, 1) 11 +(70, 85, 1) 10 +(70, 86, 1) 9 +(70, 87, 1) 8 +(70, 88, 1) 7 +(70, 89, 1) 7 +(70, 90, 1) 6 +(70, 91, 1) 5 +(70, 92, 1) 4 +(70, 93, 1) 3 +(70, 94, 1) 2 +(70, 95, 1) 1 +(71, 6, 1) 1 +(71, 7, 1) 2 +(71, 8, 1) 3 +(71, 9, 1) 4 +(71, 10, 1) 5 +(71, 11, 1) 5 +(71, 12, 1) 6 +(71, 13, 1) 7 +(71, 14, 1) 8 +(71, 15, 1) 9 +(71, 16, 1) 10 +(71, 17, 1) 11 +(71, 18, 1) 11 +(71, 19, 1) 12 +(71, 20, 1) 13 +(71, 21, 1) 14 +(71, 22, 1) 15 +(71, 23, 1) 15 +(71, 24, 1) 16 +(71, 25, 1) 17 +(71, 26, 1) 18 +(71, 27, 1) 19 +(71, 28, 1) 19 +(71, 29, 1) 20 +(71, 30, 1) 21 +(71, 31, 1) 21 +(71, 32, 1) 22 +(71, 33, 1) 23 +(71, 34, 1) 23 +(71, 35, 1) 24 +(71, 36, 1) 24 +(71, 37, 1) 25 +(71, 38, 1) 26 +(71, 39, 1) 26 +(71, 40, 1) 27 +(71, 41, 1) 27 +(71, 42, 1) 27 +(71, 43, 1) 28 +(71, 44, 1) 28 +(71, 45, 1) 28 +(71, 46, 1) 29 +(71, 47, 1) 29 +(71, 48, 1) 29 +(71, 49, 1) 29 +(71, 50, 1) 29 +(71, 51, 1) 29 +(71, 52, 1) 29 +(71, 53, 1) 29 +(71, 54, 1) 29 +(71, 55, 1) 29 +(71, 56, 1) 28 +(71, 57, 1) 28 +(71, 58, 1) 28 +(71, 59, 1) 27 +(71, 60, 1) 27 +(71, 61, 1) 27 +(71, 62, 1) 26 +(71, 63, 1) 26 +(71, 64, 1) 25 +(71, 65, 1) 24 +(71, 66, 1) 24 +(71, 67, 1) 23 +(71, 68, 1) 23 +(71, 69, 1) 22 +(71, 70, 1) 21 +(71, 71, 1) 21 +(71, 72, 1) 20 +(71, 73, 1) 19 +(71, 74, 1) 19 +(71, 75, 1) 18 +(71, 76, 1) 17 +(71, 77, 1) 16 +(71, 78, 1) 15 +(71, 79, 1) 15 +(71, 80, 1) 14 +(71, 81, 1) 13 +(71, 82, 1) 12 +(71, 83, 1) 11 +(71, 84, 1) 11 +(71, 85, 1) 10 +(71, 86, 1) 9 +(71, 87, 1) 8 +(71, 88, 1) 7 +(71, 89, 1) 6 +(71, 90, 1) 5 +(71, 91, 1) 5 +(71, 92, 1) 4 +(71, 93, 1) 3 +(71, 94, 1) 2 +(71, 95, 1) 1 +(72, 6, 1) 1 +(72, 7, 1) 1 +(72, 8, 1) 2 +(72, 9, 1) 3 +(72, 10, 1) 4 +(72, 11, 1) 5 +(72, 12, 1) 6 +(72, 13, 1) 7 +(72, 14, 1) 7 +(72, 15, 1) 8 +(72, 16, 1) 9 +(72, 17, 1) 10 +(72, 18, 1) 11 +(72, 19, 1) 12 +(72, 20, 1) 12 +(72, 21, 1) 13 +(72, 22, 1) 14 +(72, 23, 1) 15 +(72, 24, 1) 16 +(72, 25, 1) 16 +(72, 26, 1) 17 +(72, 27, 1) 18 +(72, 28, 1) 19 +(72, 29, 1) 19 +(72, 30, 1) 20 +(72, 31, 1) 21 +(72, 32, 1) 21 +(72, 33, 1) 22 +(72, 34, 1) 23 +(72, 35, 1) 23 +(72, 36, 1) 24 +(72, 37, 1) 24 +(72, 38, 1) 25 +(72, 39, 1) 25 +(72, 40, 1) 26 +(72, 41, 1) 26 +(72, 42, 1) 26 +(72, 43, 1) 27 +(72, 44, 1) 27 +(72, 45, 1) 27 +(72, 46, 1) 28 +(72, 47, 1) 28 +(72, 48, 1) 28 +(72, 49, 1) 28 +(72, 50, 1) 28 +(72, 51, 1) 28 +(72, 52, 1) 28 +(72, 53, 1) 28 +(72, 54, 1) 28 +(72, 55, 1) 28 +(72, 56, 1) 27 +(72, 57, 1) 27 +(72, 58, 1) 27 +(72, 59, 1) 26 +(72, 60, 1) 26 +(72, 61, 1) 26 +(72, 62, 1) 25 +(72, 63, 1) 25 +(72, 64, 1) 24 +(72, 65, 1) 24 +(72, 66, 1) 23 +(72, 67, 1) 23 +(72, 68, 1) 22 +(72, 69, 1) 21 +(72, 70, 1) 21 +(72, 71, 1) 20 +(72, 72, 1) 19 +(72, 73, 1) 19 +(72, 74, 1) 18 +(72, 75, 1) 17 +(72, 76, 1) 16 +(72, 77, 1) 16 +(72, 78, 1) 15 +(72, 79, 1) 14 +(72, 80, 1) 13 +(72, 81, 1) 12 +(72, 82, 1) 12 +(72, 83, 1) 11 +(72, 84, 1) 10 +(72, 85, 1) 9 +(72, 86, 1) 8 +(72, 87, 1) 7 +(72, 88, 1) 7 +(72, 89, 1) 6 +(72, 90, 1) 5 +(72, 91, 1) 4 +(72, 92, 1) 3 +(72, 93, 1) 2 +(72, 94, 1) 1 +(72, 95, 1) 1 +(73, 6, 1) 0 +(73, 7, 1) 1 +(73, 8, 1) 2 +(73, 9, 1) 3 +(73, 10, 1) 4 +(73, 11, 1) 4 +(73, 12, 1) 5 +(73, 13, 1) 6 +(73, 14, 1) 7 +(73, 15, 1) 8 +(73, 16, 1) 9 +(73, 17, 1) 9 +(73, 18, 1) 10 +(73, 19, 1) 11 +(73, 20, 1) 12 +(73, 21, 1) 13 +(73, 22, 1) 13 +(73, 23, 1) 14 +(73, 24, 1) 15 +(73, 25, 1) 16 +(73, 26, 1) 16 +(73, 27, 1) 17 +(73, 28, 1) 18 +(73, 29, 1) 19 +(73, 30, 1) 19 +(73, 31, 1) 20 +(73, 32, 1) 20 +(73, 33, 1) 21 +(73, 34, 1) 22 +(73, 35, 1) 22 +(73, 36, 1) 23 +(73, 37, 1) 23 +(73, 38, 1) 24 +(73, 39, 1) 24 +(73, 40, 1) 25 +(73, 41, 1) 25 +(73, 42, 1) 25 +(73, 43, 1) 26 +(73, 44, 1) 26 +(73, 45, 1) 26 +(73, 46, 1) 27 +(73, 47, 1) 27 +(73, 48, 1) 27 +(73, 49, 1) 27 +(73, 50, 1) 27 +(73, 51, 1) 27 +(73, 52, 1) 27 +(73, 53, 1) 27 +(73, 54, 1) 27 +(73, 55, 1) 27 +(73, 56, 1) 26 +(73, 57, 1) 26 +(73, 58, 1) 26 +(73, 59, 1) 25 +(73, 60, 1) 25 +(73, 61, 1) 25 +(73, 62, 1) 24 +(73, 63, 1) 24 +(73, 64, 1) 23 +(73, 65, 1) 23 +(73, 66, 1) 22 +(73, 67, 1) 22 +(73, 68, 1) 21 +(73, 69, 1) 20 +(73, 70, 1) 20 +(73, 71, 1) 19 +(73, 72, 1) 19 +(73, 73, 1) 18 +(73, 74, 1) 17 +(73, 75, 1) 16 +(73, 76, 1) 16 +(73, 77, 1) 15 +(73, 78, 1) 14 +(73, 79, 1) 13 +(73, 80, 1) 13 +(73, 81, 1) 12 +(73, 82, 1) 11 +(73, 83, 1) 10 +(73, 84, 1) 9 +(73, 85, 1) 9 +(73, 86, 1) 8 +(73, 87, 1) 7 +(73, 88, 1) 6 +(73, 89, 1) 5 +(73, 90, 1) 4 +(73, 91, 1) 4 +(73, 92, 1) 3 +(73, 93, 1) 2 +(73, 94, 1) 1 +(73, 95, 1) 0 +(74, 6, 1) 0 +(74, 7, 1) 0 +(74, 8, 1) 1 +(74, 9, 1) 2 +(74, 10, 1) 3 +(74, 11, 1) 4 +(74, 12, 1) 5 +(74, 13, 1) 6 +(74, 14, 1) 6 +(74, 15, 1) 7 +(74, 16, 1) 8 +(74, 17, 1) 9 +(74, 18, 1) 10 +(74, 19, 1) 10 +(74, 20, 1) 11 +(74, 21, 1) 12 +(74, 22, 1) 13 +(74, 23, 1) 14 +(74, 24, 1) 14 +(74, 25, 1) 15 +(74, 26, 1) 16 +(74, 27, 1) 16 +(74, 28, 1) 17 +(74, 29, 1) 18 +(74, 30, 1) 18 +(74, 31, 1) 19 +(74, 32, 1) 20 +(74, 33, 1) 20 +(74, 34, 1) 21 +(74, 35, 1) 21 +(74, 36, 1) 22 +(74, 37, 1) 22 +(74, 38, 1) 23 +(74, 39, 1) 23 +(74, 40, 1) 24 +(74, 41, 1) 24 +(74, 42, 1) 25 +(74, 43, 1) 25 +(74, 44, 1) 25 +(74, 45, 1) 25 +(74, 46, 1) 26 +(74, 47, 1) 26 +(74, 48, 1) 26 +(74, 49, 1) 26 +(74, 50, 1) 26 +(74, 51, 1) 26 +(74, 52, 1) 26 +(74, 53, 1) 26 +(74, 54, 1) 26 +(74, 55, 1) 26 +(74, 56, 1) 25 +(74, 57, 1) 25 +(74, 58, 1) 25 +(74, 59, 1) 25 +(74, 60, 1) 24 +(74, 61, 1) 24 +(74, 62, 1) 23 +(74, 63, 1) 23 +(74, 64, 1) 22 +(74, 65, 1) 22 +(74, 66, 1) 21 +(74, 67, 1) 21 +(74, 68, 1) 20 +(74, 69, 1) 20 +(74, 70, 1) 19 +(74, 71, 1) 18 +(74, 72, 1) 18 +(74, 73, 1) 17 +(74, 74, 1) 16 +(74, 75, 1) 16 +(74, 76, 1) 15 +(74, 77, 1) 14 +(74, 78, 1) 14 +(74, 79, 1) 13 +(74, 80, 1) 12 +(74, 81, 1) 11 +(74, 82, 1) 10 +(74, 83, 1) 10 +(74, 84, 1) 9 +(74, 85, 1) 8 +(74, 86, 1) 7 +(74, 87, 1) 6 +(74, 88, 1) 6 +(74, 89, 1) 5 +(74, 90, 1) 4 +(74, 91, 1) 3 +(74, 92, 1) 2 +(74, 93, 1) 1 +(74, 94, 1) 0 +(74, 95, 1) 0 +(75, 6, 1) 0 +(75, 7, 1) 0 +(75, 8, 1) 1 +(75, 9, 1) 2 +(75, 10, 1) 3 +(75, 11, 1) 3 +(75, 12, 1) 4 +(75, 13, 1) 5 +(75, 14, 1) 6 +(75, 15, 1) 7 +(75, 16, 1) 7 +(75, 17, 1) 8 +(75, 18, 1) 9 +(75, 19, 1) 10 +(75, 20, 1) 11 +(75, 21, 1) 11 +(75, 22, 1) 12 +(75, 23, 1) 13 +(75, 24, 1) 14 +(75, 25, 1) 14 +(75, 26, 1) 15 +(75, 27, 1) 16 +(75, 28, 1) 16 +(75, 29, 1) 17 +(75, 30, 1) 18 +(75, 31, 1) 18 +(75, 32, 1) 19 +(75, 33, 1) 19 +(75, 34, 1) 20 +(75, 35, 1) 21 +(75, 36, 1) 21 +(75, 37, 1) 22 +(75, 38, 1) 22 +(75, 39, 1) 22 +(75, 40, 1) 23 +(75, 41, 1) 23 +(75, 42, 1) 24 +(75, 43, 1) 24 +(75, 44, 1) 24 +(75, 45, 1) 24 +(75, 46, 1) 25 +(75, 47, 1) 25 +(75, 48, 1) 25 +(75, 49, 1) 25 +(75, 50, 1) 25 +(75, 51, 1) 25 +(75, 52, 1) 25 +(75, 53, 1) 25 +(75, 54, 1) 25 +(75, 55, 1) 25 +(75, 56, 1) 24 +(75, 57, 1) 24 +(75, 58, 1) 24 +(75, 59, 1) 24 +(75, 60, 1) 23 +(75, 61, 1) 23 +(75, 62, 1) 22 +(75, 63, 1) 22 +(75, 64, 1) 22 +(75, 65, 1) 21 +(75, 66, 1) 21 +(75, 67, 1) 20 +(75, 68, 1) 19 +(75, 69, 1) 19 +(75, 70, 1) 18 +(75, 71, 1) 18 +(75, 72, 1) 17 +(75, 73, 1) 16 +(75, 74, 1) 16 +(75, 75, 1) 15 +(75, 76, 1) 14 +(75, 77, 1) 14 +(75, 78, 1) 13 +(75, 79, 1) 12 +(75, 80, 1) 11 +(75, 81, 1) 11 +(75, 82, 1) 10 +(75, 83, 1) 9 +(75, 84, 1) 8 +(75, 85, 1) 7 +(75, 86, 1) 7 +(75, 87, 1) 6 +(75, 88, 1) 5 +(75, 89, 1) 4 +(75, 90, 1) 3 +(75, 91, 1) 3 +(75, 92, 1) 2 +(75, 93, 1) 1 +(75, 94, 1) 0 +(75, 95, 1) 0 +(76, 9, 1) 1 +(76, 10, 1) 2 +(76, 11, 1) 3 +(76, 12, 1) 4 +(76, 13, 1) 5 +(76, 14, 1) 5 +(76, 15, 1) 6 +(76, 16, 1) 7 +(76, 17, 1) 8 +(76, 18, 1) 9 +(76, 19, 1) 9 +(76, 20, 1) 10 +(76, 21, 1) 11 +(76, 22, 1) 12 +(76, 23, 1) 12 +(76, 24, 1) 13 +(76, 25, 1) 14 +(76, 26, 1) 14 +(76, 27, 1) 15 +(76, 28, 1) 16 +(76, 29, 1) 16 +(76, 30, 1) 17 +(76, 31, 1) 18 +(76, 32, 1) 18 +(76, 33, 1) 19 +(76, 34, 1) 19 +(76, 35, 1) 20 +(76, 36, 1) 20 +(76, 37, 1) 21 +(76, 38, 1) 21 +(76, 39, 1) 22 +(76, 40, 1) 22 +(76, 41, 1) 22 +(76, 42, 1) 23 +(76, 43, 1) 23 +(76, 44, 1) 23 +(76, 45, 1) 23 +(76, 46, 1) 24 +(76, 47, 1) 24 +(76, 48, 1) 24 +(76, 49, 1) 24 +(76, 50, 1) 24 +(76, 51, 1) 24 +(76, 52, 1) 24 +(76, 53, 1) 24 +(76, 54, 1) 24 +(76, 55, 1) 24 +(76, 56, 1) 23 +(76, 57, 1) 23 +(76, 58, 1) 23 +(76, 59, 1) 23 +(76, 60, 1) 22 +(76, 61, 1) 22 +(76, 62, 1) 22 +(76, 63, 1) 21 +(76, 64, 1) 21 +(76, 65, 1) 20 +(76, 66, 1) 20 +(76, 67, 1) 19 +(76, 68, 1) 19 +(76, 69, 1) 18 +(76, 70, 1) 18 +(76, 71, 1) 17 +(76, 72, 1) 16 +(76, 73, 1) 16 +(76, 74, 1) 15 +(76, 75, 1) 14 +(76, 76, 1) 14 +(76, 77, 1) 13 +(76, 78, 1) 12 +(76, 79, 1) 12 +(76, 80, 1) 11 +(76, 81, 1) 10 +(76, 82, 1) 9 +(76, 83, 1) 9 +(76, 84, 1) 8 +(76, 85, 1) 7 +(76, 86, 1) 6 +(76, 87, 1) 5 +(76, 88, 1) 5 +(76, 89, 1) 4 +(76, 90, 1) 3 +(76, 91, 1) 2 +(76, 92, 1) 1 +(77, 9, 1) 1 +(77, 10, 1) 2 +(77, 11, 1) 2 +(77, 12, 1) 3 +(77, 13, 1) 4 +(77, 14, 1) 5 +(77, 15, 1) 6 +(77, 16, 1) 6 +(77, 17, 1) 7 +(77, 18, 1) 8 +(77, 19, 1) 9 +(77, 20, 1) 9 +(77, 21, 1) 10 +(77, 22, 1) 11 +(77, 23, 1) 12 +(77, 24, 1) 12 +(77, 25, 1) 13 +(77, 26, 1) 14 +(77, 27, 1) 14 +(77, 28, 1) 15 +(77, 29, 1) 16 +(77, 30, 1) 16 +(77, 31, 1) 17 +(77, 32, 1) 17 +(77, 33, 1) 18 +(77, 34, 1) 18 +(77, 35, 1) 19 +(77, 36, 1) 19 +(77, 37, 1) 20 +(77, 38, 1) 20 +(77, 39, 1) 21 +(77, 40, 1) 21 +(77, 41, 1) 21 +(77, 42, 1) 22 +(77, 43, 1) 22 +(77, 44, 1) 22 +(77, 45, 1) 22 +(77, 46, 1) 23 +(77, 47, 1) 23 +(77, 48, 1) 23 +(77, 49, 1) 23 +(77, 50, 1) 23 +(77, 51, 1) 23 +(77, 52, 1) 23 +(77, 53, 1) 23 +(77, 54, 1) 23 +(77, 55, 1) 23 +(77, 56, 1) 22 +(77, 57, 1) 22 +(77, 58, 1) 22 +(77, 59, 1) 22 +(77, 60, 1) 21 +(77, 61, 1) 21 +(77, 62, 1) 21 +(77, 63, 1) 20 +(77, 64, 1) 20 +(77, 65, 1) 19 +(77, 66, 1) 19 +(77, 67, 1) 18 +(77, 68, 1) 18 +(77, 69, 1) 17 +(77, 70, 1) 17 +(77, 71, 1) 16 +(77, 72, 1) 16 +(77, 73, 1) 15 +(77, 74, 1) 14 +(77, 75, 1) 14 +(77, 76, 1) 13 +(77, 77, 1) 12 +(77, 78, 1) 12 +(77, 79, 1) 11 +(77, 80, 1) 10 +(77, 81, 1) 9 +(77, 82, 1) 9 +(77, 83, 1) 8 +(77, 84, 1) 7 +(77, 85, 1) 6 +(77, 86, 1) 6 +(77, 87, 1) 5 +(77, 88, 1) 4 +(77, 89, 1) 3 +(77, 90, 1) 2 +(77, 91, 1) 2 +(77, 92, 1) 1 +(78, 9, 1) 0 +(78, 10, 1) 1 +(78, 11, 1) 2 +(78, 12, 1) 3 +(78, 13, 1) 3 +(78, 14, 1) 4 +(78, 15, 1) 5 +(78, 16, 1) 6 +(78, 17, 1) 7 +(78, 18, 1) 7 +(78, 19, 1) 8 +(78, 20, 1) 9 +(78, 21, 1) 9 +(78, 22, 1) 10 +(78, 23, 1) 11 +(78, 24, 1) 12 +(78, 25, 1) 12 +(78, 26, 1) 13 +(78, 27, 1) 14 +(78, 28, 1) 14 +(78, 29, 1) 15 +(78, 30, 1) 15 +(78, 31, 1) 16 +(78, 32, 1) 17 +(78, 33, 1) 17 +(78, 34, 1) 18 +(78, 35, 1) 18 +(78, 36, 1) 19 +(78, 37, 1) 19 +(78, 38, 1) 19 +(78, 39, 1) 20 +(78, 40, 1) 20 +(78, 41, 1) 20 +(78, 42, 1) 21 +(78, 43, 1) 21 +(78, 44, 1) 21 +(78, 45, 1) 21 +(78, 46, 1) 22 +(78, 47, 1) 22 +(78, 48, 1) 22 +(78, 49, 1) 22 +(78, 50, 1) 22 +(78, 51, 1) 22 +(78, 52, 1) 22 +(78, 53, 1) 22 +(78, 54, 1) 22 +(78, 55, 1) 22 +(78, 56, 1) 21 +(78, 57, 1) 21 +(78, 58, 1) 21 +(78, 59, 1) 21 +(78, 60, 1) 20 +(78, 61, 1) 20 +(78, 62, 1) 20 +(78, 63, 1) 19 +(78, 64, 1) 19 +(78, 65, 1) 19 +(78, 66, 1) 18 +(78, 67, 1) 18 +(78, 68, 1) 17 +(78, 69, 1) 17 +(78, 70, 1) 16 +(78, 71, 1) 15 +(78, 72, 1) 15 +(78, 73, 1) 14 +(78, 74, 1) 14 +(78, 75, 1) 13 +(78, 76, 1) 12 +(78, 77, 1) 12 +(78, 78, 1) 11 +(78, 79, 1) 10 +(78, 80, 1) 9 +(78, 81, 1) 9 +(78, 82, 1) 8 +(78, 83, 1) 7 +(78, 84, 1) 7 +(78, 85, 1) 6 +(78, 86, 1) 5 +(78, 87, 1) 4 +(78, 88, 1) 3 +(78, 89, 1) 3 +(78, 90, 1) 2 +(78, 91, 1) 1 +(78, 92, 1) 0 +(79, 9, 1) 0 +(79, 10, 1) 1 +(79, 11, 1) 1 +(79, 12, 1) 2 +(79, 13, 1) 3 +(79, 14, 1) 4 +(79, 15, 1) 4 +(79, 16, 1) 5 +(79, 17, 1) 6 +(79, 18, 1) 7 +(79, 19, 1) 7 +(79, 20, 1) 8 +(79, 21, 1) 9 +(79, 22, 1) 9 +(79, 23, 1) 10 +(79, 24, 1) 11 +(79, 25, 1) 12 +(79, 26, 1) 12 +(79, 27, 1) 13 +(79, 28, 1) 13 +(79, 29, 1) 14 +(79, 30, 1) 15 +(79, 31, 1) 15 +(79, 32, 1) 16 +(79, 33, 1) 16 +(79, 34, 1) 17 +(79, 35, 1) 17 +(79, 36, 1) 18 +(79, 37, 1) 18 +(79, 38, 1) 18 +(79, 39, 1) 19 +(79, 40, 1) 19 +(79, 41, 1) 20 +(79, 42, 1) 20 +(79, 43, 1) 20 +(79, 44, 1) 20 +(79, 45, 1) 20 +(79, 46, 1) 21 +(79, 47, 1) 21 +(79, 48, 1) 21 +(79, 49, 1) 21 +(79, 50, 1) 21 +(79, 51, 1) 21 +(79, 52, 1) 21 +(79, 53, 1) 21 +(79, 54, 1) 21 +(79, 55, 1) 21 +(79, 56, 1) 20 +(79, 57, 1) 20 +(79, 58, 1) 20 +(79, 59, 1) 20 +(79, 60, 1) 20 +(79, 61, 1) 19 +(79, 62, 1) 19 +(79, 63, 1) 18 +(79, 64, 1) 18 +(79, 65, 1) 18 +(79, 66, 1) 17 +(79, 67, 1) 17 +(79, 68, 1) 16 +(79, 69, 1) 16 +(79, 70, 1) 15 +(79, 71, 1) 15 +(79, 72, 1) 14 +(79, 73, 1) 13 +(79, 74, 1) 13 +(79, 75, 1) 12 +(79, 76, 1) 12 +(79, 77, 1) 11 +(79, 78, 1) 10 +(79, 79, 1) 9 +(79, 80, 1) 9 +(79, 81, 1) 8 +(79, 82, 1) 7 +(79, 83, 1) 7 +(79, 84, 1) 6 +(79, 85, 1) 5 +(79, 86, 1) 4 +(79, 87, 1) 4 +(79, 88, 1) 3 +(79, 89, 1) 2 +(79, 90, 1) 1 +(79, 91, 1) 1 +(79, 92, 1) 0 +(80, 9, 1) 0 +(80, 10, 1) 0 +(80, 11, 1) 1 +(80, 12, 1) 1 +(80, 13, 1) 2 +(80, 14, 1) 3 +(80, 15, 1) 4 +(80, 16, 1) 4 +(80, 17, 1) 5 +(80, 18, 1) 6 +(80, 19, 1) 7 +(80, 20, 1) 7 +(80, 21, 1) 8 +(80, 22, 1) 9 +(80, 23, 1) 9 +(80, 24, 1) 10 +(80, 25, 1) 11 +(80, 26, 1) 11 +(80, 27, 1) 12 +(80, 28, 1) 13 +(80, 29, 1) 13 +(80, 30, 1) 14 +(80, 31, 1) 14 +(80, 32, 1) 15 +(80, 33, 1) 15 +(80, 34, 1) 16 +(80, 35, 1) 16 +(80, 36, 1) 17 +(80, 37, 1) 17 +(80, 38, 1) 18 +(80, 39, 1) 18 +(80, 40, 1) 18 +(80, 41, 1) 19 +(80, 42, 1) 19 +(80, 43, 1) 19 +(80, 44, 1) 19 +(80, 45, 1) 20 +(80, 46, 1) 20 +(80, 47, 1) 20 +(80, 48, 1) 20 +(80, 49, 1) 20 +(80, 50, 1) 20 +(80, 51, 1) 20 +(80, 52, 1) 20 +(80, 53, 1) 20 +(80, 54, 1) 20 +(80, 55, 1) 20 +(80, 56, 1) 20 +(80, 57, 1) 19 +(80, 58, 1) 19 +(80, 59, 1) 19 +(80, 60, 1) 19 +(80, 61, 1) 18 +(80, 62, 1) 18 +(80, 63, 1) 18 +(80, 64, 1) 17 +(80, 65, 1) 17 +(80, 66, 1) 16 +(80, 67, 1) 16 +(80, 68, 1) 15 +(80, 69, 1) 15 +(80, 70, 1) 14 +(80, 71, 1) 14 +(80, 72, 1) 13 +(80, 73, 1) 13 +(80, 74, 1) 12 +(80, 75, 1) 11 +(80, 76, 1) 11 +(80, 77, 1) 10 +(80, 78, 1) 9 +(80, 79, 1) 9 +(80, 80, 1) 8 +(80, 81, 1) 7 +(80, 82, 1) 7 +(80, 83, 1) 6 +(80, 84, 1) 5 +(80, 85, 1) 4 +(80, 86, 1) 4 +(80, 87, 1) 3 +(80, 88, 1) 2 +(80, 89, 1) 1 +(80, 90, 1) 1 +(80, 91, 1) 0 +(80, 92, 1) 0 +(81, 14, 1) 3 +(81, 15, 1) 3 +(81, 16, 1) 4 +(81, 17, 1) 5 +(81, 18, 1) 5 +(81, 19, 1) 6 +(81, 20, 1) 7 +(81, 21, 1) 7 +(81, 22, 1) 8 +(81, 23, 1) 9 +(81, 24, 1) 9 +(81, 25, 1) 10 +(81, 26, 1) 11 +(81, 27, 1) 11 +(81, 28, 1) 12 +(81, 29, 1) 12 +(81, 30, 1) 13 +(81, 31, 1) 14 +(81, 32, 1) 14 +(81, 33, 1) 15 +(81, 34, 1) 15 +(81, 35, 1) 15 +(81, 36, 1) 16 +(81, 37, 1) 16 +(81, 38, 1) 17 +(81, 39, 1) 17 +(81, 40, 1) 17 +(81, 41, 1) 18 +(81, 42, 1) 18 +(81, 43, 1) 18 +(81, 44, 1) 18 +(81, 45, 1) 19 +(81, 46, 1) 19 +(81, 47, 1) 19 +(81, 48, 1) 19 +(81, 49, 1) 19 +(81, 50, 1) 19 +(81, 51, 1) 19 +(81, 52, 1) 19 +(81, 53, 1) 19 +(81, 54, 1) 19 +(81, 55, 1) 19 +(81, 56, 1) 19 +(81, 57, 1) 18 +(81, 58, 1) 18 +(81, 59, 1) 18 +(81, 60, 1) 18 +(81, 61, 1) 17 +(81, 62, 1) 17 +(81, 63, 1) 17 +(81, 64, 1) 16 +(81, 65, 1) 16 +(81, 66, 1) 15 +(81, 67, 1) 15 +(81, 68, 1) 15 +(81, 69, 1) 14 +(81, 70, 1) 14 +(81, 71, 1) 13 +(81, 72, 1) 12 +(81, 73, 1) 12 +(81, 74, 1) 11 +(81, 75, 1) 11 +(81, 76, 1) 10 +(81, 77, 1) 9 +(81, 78, 1) 9 +(81, 79, 1) 8 +(81, 80, 1) 7 +(81, 81, 1) 7 +(81, 82, 1) 6 +(81, 83, 1) 5 +(81, 84, 1) 5 +(81, 85, 1) 4 +(81, 86, 1) 3 +(81, 87, 1) 3 +(82, 14, 1) 2 +(82, 15, 1) 3 +(82, 16, 1) 3 +(82, 17, 1) 4 +(82, 18, 1) 5 +(82, 19, 1) 5 +(82, 20, 1) 6 +(82, 21, 1) 7 +(82, 22, 1) 7 +(82, 23, 1) 8 +(82, 24, 1) 9 +(82, 25, 1) 9 +(82, 26, 1) 10 +(82, 27, 1) 10 +(82, 28, 1) 11 +(82, 29, 1) 12 +(82, 30, 1) 12 +(82, 31, 1) 13 +(82, 32, 1) 13 +(82, 33, 1) 14 +(82, 34, 1) 14 +(82, 35, 1) 15 +(82, 36, 1) 15 +(82, 37, 1) 15 +(82, 38, 1) 16 +(82, 39, 1) 16 +(82, 40, 1) 16 +(82, 41, 1) 17 +(82, 42, 1) 17 +(82, 43, 1) 17 +(82, 44, 1) 17 +(82, 45, 1) 18 +(82, 46, 1) 18 +(82, 47, 1) 18 +(82, 48, 1) 18 +(82, 49, 1) 18 +(82, 50, 1) 18 +(82, 51, 1) 18 +(82, 52, 1) 18 +(82, 53, 1) 18 +(82, 54, 1) 18 +(82, 55, 1) 18 +(82, 56, 1) 18 +(82, 57, 1) 17 +(82, 58, 1) 17 +(82, 59, 1) 17 +(82, 60, 1) 17 +(82, 61, 1) 16 +(82, 62, 1) 16 +(82, 63, 1) 16 +(82, 64, 1) 15 +(82, 65, 1) 15 +(82, 66, 1) 15 +(82, 67, 1) 14 +(82, 68, 1) 14 +(82, 69, 1) 13 +(82, 70, 1) 13 +(82, 71, 1) 12 +(82, 72, 1) 12 +(82, 73, 1) 11 +(82, 74, 1) 10 +(82, 75, 1) 10 +(82, 76, 1) 9 +(82, 77, 1) 9 +(82, 78, 1) 8 +(82, 79, 1) 7 +(82, 80, 1) 7 +(82, 81, 1) 6 +(82, 82, 1) 5 +(82, 83, 1) 5 +(82, 84, 1) 4 +(82, 85, 1) 3 +(82, 86, 1) 3 +(82, 87, 1) 2 +(83, 14, 1) 1 +(83, 15, 1) 2 +(83, 16, 1) 3 +(83, 17, 1) 3 +(83, 18, 1) 4 +(83, 19, 1) 5 +(83, 20, 1) 5 +(83, 21, 1) 6 +(83, 22, 1) 7 +(83, 23, 1) 7 +(83, 24, 1) 8 +(83, 25, 1) 8 +(83, 26, 1) 9 +(83, 27, 1) 10 +(83, 28, 1) 10 +(83, 29, 1) 11 +(83, 30, 1) 11 +(83, 31, 1) 12 +(83, 32, 1) 12 +(83, 33, 1) 13 +(83, 34, 1) 13 +(83, 35, 1) 14 +(83, 36, 1) 14 +(83, 37, 1) 14 +(83, 38, 1) 15 +(83, 39, 1) 15 +(83, 40, 1) 15 +(83, 41, 1) 16 +(83, 42, 1) 16 +(83, 43, 1) 16 +(83, 44, 1) 16 +(83, 45, 1) 17 +(83, 46, 1) 17 +(83, 47, 1) 17 +(83, 48, 1) 17 +(83, 49, 1) 17 +(83, 50, 1) 17 +(83, 51, 1) 17 +(83, 52, 1) 17 +(83, 53, 1) 17 +(83, 54, 1) 17 +(83, 55, 1) 17 +(83, 56, 1) 17 +(83, 57, 1) 16 +(83, 58, 1) 16 +(83, 59, 1) 16 +(83, 60, 1) 16 +(83, 61, 1) 15 +(83, 62, 1) 15 +(83, 63, 1) 15 +(83, 64, 1) 14 +(83, 65, 1) 14 +(83, 66, 1) 14 +(83, 67, 1) 13 +(83, 68, 1) 13 +(83, 69, 1) 12 +(83, 70, 1) 12 +(83, 71, 1) 11 +(83, 72, 1) 11 +(83, 73, 1) 10 +(83, 74, 1) 10 +(83, 75, 1) 9 +(83, 76, 1) 8 +(83, 77, 1) 8 +(83, 78, 1) 7 +(83, 79, 1) 7 +(83, 80, 1) 6 +(83, 81, 1) 5 +(83, 82, 1) 5 +(83, 83, 1) 4 +(83, 84, 1) 3 +(83, 85, 1) 3 +(83, 86, 1) 2 +(83, 87, 1) 1 +(84, 14, 1) 1 +(84, 15, 1) 1 +(84, 16, 1) 2 +(84, 17, 1) 3 +(84, 18, 1) 3 +(84, 19, 1) 4 +(84, 20, 1) 5 +(84, 21, 1) 5 +(84, 22, 1) 6 +(84, 23, 1) 6 +(84, 24, 1) 7 +(84, 25, 1) 8 +(84, 26, 1) 8 +(84, 27, 1) 9 +(84, 28, 1) 9 +(84, 29, 1) 10 +(84, 30, 1) 10 +(84, 31, 1) 11 +(84, 32, 1) 11 +(84, 33, 1) 12 +(84, 34, 1) 12 +(84, 35, 1) 13 +(84, 36, 1) 13 +(84, 37, 1) 13 +(84, 38, 1) 14 +(84, 39, 1) 14 +(84, 40, 1) 14 +(84, 41, 1) 15 +(84, 42, 1) 15 +(84, 43, 1) 15 +(84, 44, 1) 15 +(84, 45, 1) 16 +(84, 46, 1) 16 +(84, 47, 1) 16 +(84, 48, 1) 16 +(84, 49, 1) 16 +(84, 50, 1) 16 +(84, 51, 1) 16 +(84, 52, 1) 16 +(84, 53, 1) 16 +(84, 54, 1) 16 +(84, 55, 1) 16 +(84, 56, 1) 16 +(84, 57, 1) 15 +(84, 58, 1) 15 +(84, 59, 1) 15 +(84, 60, 1) 15 +(84, 61, 1) 14 +(84, 62, 1) 14 +(84, 63, 1) 14 +(84, 64, 1) 13 +(84, 65, 1) 13 +(84, 66, 1) 13 +(84, 67, 1) 12 +(84, 68, 1) 12 +(84, 69, 1) 11 +(84, 70, 1) 11 +(84, 71, 1) 10 +(84, 72, 1) 10 +(84, 73, 1) 9 +(84, 74, 1) 9 +(84, 75, 1) 8 +(84, 76, 1) 8 +(84, 77, 1) 7 +(84, 78, 1) 6 +(84, 79, 1) 6 +(84, 80, 1) 5 +(84, 81, 1) 5 +(84, 82, 1) 4 +(84, 83, 1) 3 +(84, 84, 1) 3 +(84, 85, 1) 2 +(84, 86, 1) 1 +(84, 87, 1) 1 +(85, 14, 1) 0 +(85, 15, 1) 1 +(85, 16, 1) 1 +(85, 17, 1) 2 +(85, 18, 1) 2 +(85, 19, 1) 3 +(85, 20, 1) 4 +(85, 21, 1) 4 +(85, 22, 1) 5 +(85, 23, 1) 6 +(85, 24, 1) 6 +(85, 25, 1) 7 +(85, 26, 1) 7 +(85, 27, 1) 8 +(85, 28, 1) 9 +(85, 29, 1) 9 +(85, 30, 1) 10 +(85, 31, 1) 10 +(85, 32, 1) 11 +(85, 33, 1) 11 +(85, 34, 1) 11 +(85, 35, 1) 12 +(85, 36, 1) 12 +(85, 37, 1) 13 +(85, 38, 1) 13 +(85, 39, 1) 13 +(85, 40, 1) 13 +(85, 41, 1) 14 +(85, 42, 1) 14 +(85, 43, 1) 14 +(85, 44, 1) 14 +(85, 45, 1) 15 +(85, 46, 1) 15 +(85, 47, 1) 15 +(85, 48, 1) 15 +(85, 49, 1) 15 +(85, 50, 1) 15 +(85, 51, 1) 15 +(85, 52, 1) 15 +(85, 53, 1) 15 +(85, 54, 1) 15 +(85, 55, 1) 15 +(85, 56, 1) 15 +(85, 57, 1) 14 +(85, 58, 1) 14 +(85, 59, 1) 14 +(85, 60, 1) 14 +(85, 61, 1) 13 +(85, 62, 1) 13 +(85, 63, 1) 13 +(85, 64, 1) 13 +(85, 65, 1) 12 +(85, 66, 1) 12 +(85, 67, 1) 11 +(85, 68, 1) 11 +(85, 69, 1) 11 +(85, 70, 1) 10 +(85, 71, 1) 10 +(85, 72, 1) 9 +(85, 73, 1) 9 +(85, 74, 1) 8 +(85, 75, 1) 7 +(85, 76, 1) 7 +(85, 77, 1) 6 +(85, 78, 1) 6 +(85, 79, 1) 5 +(85, 80, 1) 4 +(85, 81, 1) 4 +(85, 82, 1) 3 +(85, 83, 1) 2 +(85, 84, 1) 2 +(85, 85, 1) 1 +(85, 86, 1) 1 +(85, 87, 1) 0 +(86, 16, 1) 1 +(86, 17, 1) 1 +(86, 18, 1) 2 +(86, 19, 1) 3 +(86, 20, 1) 3 +(86, 21, 1) 4 +(86, 22, 1) 4 +(86, 23, 1) 5 +(86, 24, 1) 6 +(86, 25, 1) 6 +(86, 26, 1) 7 +(86, 27, 1) 7 +(86, 28, 1) 8 +(86, 29, 1) 8 +(86, 30, 1) 9 +(86, 31, 1) 9 +(86, 32, 1) 10 +(86, 33, 1) 10 +(86, 34, 1) 11 +(86, 35, 1) 11 +(86, 36, 1) 11 +(86, 37, 1) 12 +(86, 38, 1) 12 +(86, 39, 1) 12 +(86, 40, 1) 13 +(86, 41, 1) 13 +(86, 42, 1) 13 +(86, 43, 1) 13 +(86, 44, 1) 13 +(86, 45, 1) 14 +(86, 46, 1) 14 +(86, 47, 1) 14 +(86, 48, 1) 14 +(86, 49, 1) 14 +(86, 50, 1) 14 +(86, 51, 1) 14 +(86, 52, 1) 14 +(86, 53, 1) 14 +(86, 54, 1) 14 +(86, 55, 1) 14 +(86, 56, 1) 14 +(86, 57, 1) 13 +(86, 58, 1) 13 +(86, 59, 1) 13 +(86, 60, 1) 13 +(86, 61, 1) 13 +(86, 62, 1) 12 +(86, 63, 1) 12 +(86, 64, 1) 12 +(86, 65, 1) 11 +(86, 66, 1) 11 +(86, 67, 1) 11 +(86, 68, 1) 10 +(86, 69, 1) 10 +(86, 70, 1) 9 +(86, 71, 1) 9 +(86, 72, 1) 8 +(86, 73, 1) 8 +(86, 74, 1) 7 +(86, 75, 1) 7 +(86, 76, 1) 6 +(86, 77, 1) 6 +(86, 78, 1) 5 +(86, 79, 1) 4 +(86, 80, 1) 4 +(86, 81, 1) 3 +(86, 82, 1) 3 +(86, 83, 1) 2 +(86, 84, 1) 1 +(86, 85, 1) 1 +(87, 16, 1) 0 +(87, 17, 1) 1 +(87, 18, 1) 1 +(87, 19, 1) 2 +(87, 20, 1) 2 +(87, 21, 1) 3 +(87, 22, 1) 4 +(87, 23, 1) 4 +(87, 24, 1) 5 +(87, 25, 1) 5 +(87, 26, 1) 6 +(87, 27, 1) 6 +(87, 28, 1) 7 +(87, 29, 1) 7 +(87, 30, 1) 8 +(87, 31, 1) 8 +(87, 32, 1) 9 +(87, 33, 1) 9 +(87, 34, 1) 10 +(87, 35, 1) 10 +(87, 36, 1) 10 +(87, 37, 1) 11 +(87, 38, 1) 11 +(87, 39, 1) 11 +(87, 40, 1) 12 +(87, 41, 1) 12 +(87, 42, 1) 12 +(87, 43, 1) 12 +(87, 44, 1) 12 +(87, 45, 1) 13 +(87, 46, 1) 13 +(87, 47, 1) 13 +(87, 48, 1) 13 +(87, 49, 1) 13 +(87, 50, 1) 13 +(87, 51, 1) 13 +(87, 52, 1) 13 +(87, 53, 1) 13 +(87, 54, 1) 13 +(87, 55, 1) 13 +(87, 56, 1) 13 +(87, 57, 1) 12 +(87, 58, 1) 12 +(87, 59, 1) 12 +(87, 60, 1) 12 +(87, 61, 1) 12 +(87, 62, 1) 11 +(87, 63, 1) 11 +(87, 64, 1) 11 +(87, 65, 1) 10 +(87, 66, 1) 10 +(87, 67, 1) 10 +(87, 68, 1) 9 +(87, 69, 1) 9 +(87, 70, 1) 8 +(87, 71, 1) 8 +(87, 72, 1) 7 +(87, 73, 1) 7 +(87, 74, 1) 6 +(87, 75, 1) 6 +(87, 76, 1) 5 +(87, 77, 1) 5 +(87, 78, 1) 4 +(87, 79, 1) 4 +(87, 80, 1) 3 +(87, 81, 1) 2 +(87, 82, 1) 2 +(87, 83, 1) 1 +(87, 84, 1) 1 +(87, 85, 1) 0 +(88, 21, 1) 2 +(88, 22, 1) 3 +(88, 23, 1) 3 +(88, 24, 1) 4 +(88, 25, 1) 5 +(88, 26, 1) 5 +(88, 27, 1) 6 +(88, 28, 1) 6 +(88, 29, 1) 7 +(88, 30, 1) 7 +(88, 31, 1) 7 +(88, 32, 1) 8 +(88, 33, 1) 8 +(88, 34, 1) 9 +(88, 35, 1) 9 +(88, 36, 1) 9 +(88, 37, 1) 10 +(88, 38, 1) 10 +(88, 39, 1) 10 +(88, 40, 1) 11 +(88, 41, 1) 11 +(88, 42, 1) 11 +(88, 43, 1) 11 +(88, 44, 1) 11 +(88, 45, 1) 12 +(88, 46, 1) 12 +(88, 47, 1) 12 +(88, 48, 1) 12 +(88, 49, 1) 12 +(88, 50, 1) 12 +(88, 51, 1) 12 +(88, 52, 1) 12 +(88, 53, 1) 12 +(88, 54, 1) 12 +(88, 55, 1) 12 +(88, 56, 1) 12 +(88, 57, 1) 11 +(88, 58, 1) 11 +(88, 59, 1) 11 +(88, 60, 1) 11 +(88, 61, 1) 11 +(88, 62, 1) 10 +(88, 63, 1) 10 +(88, 64, 1) 10 +(88, 65, 1) 9 +(88, 66, 1) 9 +(88, 67, 1) 9 +(88, 68, 1) 8 +(88, 69, 1) 8 +(88, 70, 1) 7 +(88, 71, 1) 7 +(88, 72, 1) 7 +(88, 73, 1) 6 +(88, 74, 1) 6 +(88, 75, 1) 5 +(88, 76, 1) 5 +(88, 77, 1) 4 +(88, 78, 1) 3 +(88, 79, 1) 3 +(88, 80, 1) 2 +(89, 21, 1) 1 +(89, 22, 1) 2 +(89, 23, 1) 3 +(89, 24, 1) 3 +(89, 25, 1) 4 +(89, 26, 1) 4 +(89, 27, 1) 5 +(89, 28, 1) 5 +(89, 29, 1) 6 +(89, 30, 1) 6 +(89, 31, 1) 7 +(89, 32, 1) 7 +(89, 33, 1) 7 +(89, 34, 1) 8 +(89, 35, 1) 8 +(89, 36, 1) 8 +(89, 37, 1) 9 +(89, 38, 1) 9 +(89, 39, 1) 9 +(89, 40, 1) 10 +(89, 41, 1) 10 +(89, 42, 1) 10 +(89, 43, 1) 10 +(89, 44, 1) 10 +(89, 45, 1) 11 +(89, 46, 1) 11 +(89, 47, 1) 11 +(89, 48, 1) 11 +(89, 49, 1) 11 +(89, 50, 1) 11 +(89, 51, 1) 11 +(89, 52, 1) 11 +(89, 53, 1) 11 +(89, 54, 1) 11 +(89, 55, 1) 11 +(89, 56, 1) 11 +(89, 57, 1) 10 +(89, 58, 1) 10 +(89, 59, 1) 10 +(89, 60, 1) 10 +(89, 61, 1) 10 +(89, 62, 1) 9 +(89, 63, 1) 9 +(89, 64, 1) 9 +(89, 65, 1) 8 +(89, 66, 1) 8 +(89, 67, 1) 8 +(89, 68, 1) 7 +(89, 69, 1) 7 +(89, 70, 1) 7 +(89, 71, 1) 6 +(89, 72, 1) 6 +(89, 73, 1) 5 +(89, 74, 1) 5 +(89, 75, 1) 4 +(89, 76, 1) 4 +(89, 77, 1) 3 +(89, 78, 1) 3 +(89, 79, 1) 2 +(89, 80, 1) 1 +(90, 21, 1) 1 +(90, 22, 1) 1 +(90, 23, 1) 2 +(90, 24, 1) 2 +(90, 25, 1) 3 +(90, 26, 1) 3 +(90, 27, 1) 4 +(90, 28, 1) 4 +(90, 29, 1) 5 +(90, 30, 1) 5 +(90, 31, 1) 6 +(90, 32, 1) 6 +(90, 33, 1) 6 +(90, 34, 1) 7 +(90, 35, 1) 7 +(90, 36, 1) 8 +(90, 37, 1) 8 +(90, 38, 1) 8 +(90, 39, 1) 8 +(90, 40, 1) 9 +(90, 41, 1) 9 +(90, 42, 1) 9 +(90, 43, 1) 9 +(90, 44, 1) 9 +(90, 45, 1) 10 +(90, 46, 1) 10 +(90, 47, 1) 10 +(90, 48, 1) 10 +(90, 49, 1) 10 +(90, 50, 1) 10 +(90, 51, 1) 10 +(90, 52, 1) 10 +(90, 53, 1) 10 +(90, 54, 1) 10 +(90, 55, 1) 10 +(90, 56, 1) 10 +(90, 57, 1) 9 +(90, 58, 1) 9 +(90, 59, 1) 9 +(90, 60, 1) 9 +(90, 61, 1) 9 +(90, 62, 1) 8 +(90, 63, 1) 8 +(90, 64, 1) 8 +(90, 65, 1) 8 +(90, 66, 1) 7 +(90, 67, 1) 7 +(90, 68, 1) 6 +(90, 69, 1) 6 +(90, 70, 1) 6 +(90, 71, 1) 5 +(90, 72, 1) 5 +(90, 73, 1) 4 +(90, 74, 1) 4 +(90, 75, 1) 3 +(90, 76, 1) 3 +(90, 77, 1) 2 +(90, 78, 1) 2 +(90, 79, 1) 1 +(90, 80, 1) 1 +(91, 21, 1) 0 +(91, 22, 1) 1 +(91, 23, 1) 1 +(91, 24, 1) 2 +(91, 25, 1) 2 +(91, 26, 1) 3 +(91, 27, 1) 3 +(91, 28, 1) 4 +(91, 29, 1) 4 +(91, 30, 1) 4 +(91, 31, 1) 5 +(91, 32, 1) 5 +(91, 33, 1) 6 +(91, 34, 1) 6 +(91, 35, 1) 6 +(91, 36, 1) 7 +(91, 37, 1) 7 +(91, 38, 1) 7 +(91, 39, 1) 8 +(91, 40, 1) 8 +(91, 41, 1) 8 +(91, 42, 1) 8 +(91, 43, 1) 8 +(91, 44, 1) 9 +(91, 45, 1) 9 +(91, 46, 1) 9 +(91, 47, 1) 9 +(91, 48, 1) 9 +(91, 49, 1) 9 +(91, 50, 1) 9 +(91, 51, 1) 9 +(91, 52, 1) 9 +(91, 53, 1) 9 +(91, 54, 1) 9 +(91, 55, 1) 9 +(91, 56, 1) 9 +(91, 57, 1) 9 +(91, 58, 1) 8 +(91, 59, 1) 8 +(91, 60, 1) 8 +(91, 61, 1) 8 +(91, 62, 1) 8 +(91, 63, 1) 7 +(91, 64, 1) 7 +(91, 65, 1) 7 +(91, 66, 1) 6 +(91, 67, 1) 6 +(91, 68, 1) 6 +(91, 69, 1) 5 +(91, 70, 1) 5 +(91, 71, 1) 4 +(91, 72, 1) 4 +(91, 73, 1) 4 +(91, 74, 1) 3 +(91, 75, 1) 3 +(91, 76, 1) 2 +(91, 77, 1) 2 +(91, 78, 1) 1 +(91, 79, 1) 1 +(91, 80, 1) 0 +(92, 21, 1) 0 +(92, 22, 1) 0 +(92, 23, 1) 0 +(92, 24, 1) 1 +(92, 25, 1) 1 +(92, 26, 1) 2 +(92, 27, 1) 2 +(92, 28, 1) 3 +(92, 29, 1) 3 +(92, 30, 1) 4 +(92, 31, 1) 4 +(92, 32, 1) 4 +(92, 33, 1) 5 +(92, 34, 1) 5 +(92, 35, 1) 5 +(92, 36, 1) 6 +(92, 37, 1) 6 +(92, 38, 1) 6 +(92, 39, 1) 7 +(92, 40, 1) 7 +(92, 41, 1) 7 +(92, 42, 1) 7 +(92, 43, 1) 7 +(92, 44, 1) 8 +(92, 45, 1) 8 +(92, 46, 1) 8 +(92, 47, 1) 8 +(92, 48, 1) 8 +(92, 49, 1) 8 +(92, 50, 1) 8 +(92, 51, 1) 8 +(92, 52, 1) 8 +(92, 53, 1) 8 +(92, 54, 1) 8 +(92, 55, 1) 8 +(92, 56, 1) 8 +(92, 57, 1) 8 +(92, 58, 1) 7 +(92, 59, 1) 7 +(92, 60, 1) 7 +(92, 61, 1) 7 +(92, 62, 1) 7 +(92, 63, 1) 6 +(92, 64, 1) 6 +(92, 65, 1) 6 +(92, 66, 1) 5 +(92, 67, 1) 5 +(92, 68, 1) 5 +(92, 69, 1) 4 +(92, 70, 1) 4 +(92, 71, 1) 4 +(92, 72, 1) 3 +(92, 73, 1) 3 +(92, 74, 1) 2 +(92, 75, 1) 2 +(92, 76, 1) 1 +(92, 77, 1) 1 +(92, 78, 1) 0 +(92, 79, 1) 0 +(92, 80, 1) 0 +(93, 26, 1) 1 +(93, 27, 1) 1 +(93, 28, 1) 2 +(93, 29, 1) 2 +(93, 30, 1) 3 +(93, 31, 1) 3 +(93, 32, 1) 3 +(93, 33, 1) 4 +(93, 34, 1) 4 +(93, 35, 1) 4 +(93, 36, 1) 5 +(93, 37, 1) 5 +(93, 38, 1) 5 +(93, 39, 1) 6 +(93, 40, 1) 6 +(93, 41, 1) 6 +(93, 42, 1) 6 +(93, 43, 1) 6 +(93, 44, 1) 7 +(93, 45, 1) 7 +(93, 46, 1) 7 +(93, 47, 1) 7 +(93, 48, 1) 7 +(93, 49, 1) 7 +(93, 50, 1) 7 +(93, 51, 1) 7 +(93, 52, 1) 7 +(93, 53, 1) 7 +(93, 54, 1) 7 +(93, 55, 1) 7 +(93, 56, 1) 7 +(93, 57, 1) 7 +(93, 58, 1) 6 +(93, 59, 1) 6 +(93, 60, 1) 6 +(93, 61, 1) 6 +(93, 62, 1) 6 +(93, 63, 1) 5 +(93, 64, 1) 5 +(93, 65, 1) 5 +(93, 66, 1) 4 +(93, 67, 1) 4 +(93, 68, 1) 4 +(93, 69, 1) 3 +(93, 70, 1) 3 +(93, 71, 1) 3 +(93, 72, 1) 2 +(93, 73, 1) 2 +(93, 74, 1) 1 +(93, 75, 1) 1 +(94, 26, 1) 0 +(94, 27, 1) 0 +(94, 28, 1) 1 +(94, 29, 1) 1 +(94, 30, 1) 2 +(94, 31, 1) 2 +(94, 32, 1) 2 +(94, 33, 1) 3 +(94, 34, 1) 3 +(94, 35, 1) 3 +(94, 36, 1) 4 +(94, 37, 1) 4 +(94, 38, 1) 4 +(94, 39, 1) 5 +(94, 40, 1) 5 +(94, 41, 1) 5 +(94, 42, 1) 5 +(94, 43, 1) 5 +(94, 44, 1) 6 +(94, 45, 1) 6 +(94, 46, 1) 6 +(94, 47, 1) 6 +(94, 48, 1) 6 +(94, 49, 1) 6 +(94, 50, 1) 6 +(94, 51, 1) 6 +(94, 52, 1) 6 +(94, 53, 1) 6 +(94, 54, 1) 6 +(94, 55, 1) 6 +(94, 56, 1) 6 +(94, 57, 1) 6 +(94, 58, 1) 5 +(94, 59, 1) 5 +(94, 60, 1) 5 +(94, 61, 1) 5 +(94, 62, 1) 5 +(94, 63, 1) 4 +(94, 64, 1) 4 +(94, 65, 1) 4 +(94, 66, 1) 3 +(94, 67, 1) 3 +(94, 68, 1) 3 +(94, 69, 1) 2 +(94, 70, 1) 2 +(94, 71, 1) 2 +(94, 72, 1) 1 +(94, 73, 1) 1 +(94, 74, 1) 0 +(94, 75, 1) 0 +(95, 26, 1) 0 +(95, 27, 1) 0 +(95, 28, 1) 0 +(95, 29, 1) 0 +(95, 30, 1) 1 +(95, 31, 1) 1 +(95, 32, 1) 1 +(95, 33, 1) 2 +(95, 34, 1) 2 +(95, 35, 1) 3 +(95, 36, 1) 3 +(95, 37, 1) 3 +(95, 38, 1) 3 +(95, 39, 1) 4 +(95, 40, 1) 4 +(95, 41, 1) 4 +(95, 42, 1) 4 +(95, 43, 1) 4 +(95, 44, 1) 5 +(95, 45, 1) 5 +(95, 46, 1) 5 +(95, 47, 1) 5 +(95, 48, 1) 5 +(95, 49, 1) 5 +(95, 50, 1) 5 +(95, 51, 1) 5 +(95, 52, 1) 5 +(95, 53, 1) 5 +(95, 54, 1) 5 +(95, 55, 1) 5 +(95, 56, 1) 5 +(95, 57, 1) 5 +(95, 58, 1) 4 +(95, 59, 1) 4 +(95, 60, 1) 4 +(95, 61, 1) 4 +(95, 62, 1) 4 +(95, 63, 1) 3 +(95, 64, 1) 3 +(95, 65, 1) 3 +(95, 66, 1) 3 +(95, 67, 1) 2 +(95, 68, 1) 2 +(95, 69, 1) 1 +(95, 70, 1) 1 +(95, 71, 1) 1 +(95, 72, 1) 0 +(95, 73, 1) 0 +(95, 74, 1) 0 +(95, 75, 1) 0 +(96, 36, 1) 2 +(96, 37, 1) 2 +(96, 38, 1) 2 +(96, 39, 1) 3 +(96, 40, 1) 3 +(96, 41, 1) 3 +(96, 42, 1) 3 +(96, 43, 1) 3 +(96, 44, 1) 4 +(96, 45, 1) 4 +(96, 46, 1) 4 +(96, 47, 1) 4 +(96, 48, 1) 4 +(96, 49, 1) 4 +(96, 50, 1) 4 +(96, 51, 1) 4 +(96, 52, 1) 4 +(96, 53, 1) 4 +(96, 54, 1) 4 +(96, 55, 1) 4 +(96, 56, 1) 4 +(96, 57, 1) 4 +(96, 58, 1) 3 +(96, 59, 1) 3 +(96, 60, 1) 3 +(96, 61, 1) 3 +(96, 62, 1) 3 +(96, 63, 1) 2 +(96, 64, 1) 2 +(96, 65, 1) 2 +(97, 36, 1) 1 +(97, 37, 1) 1 +(97, 38, 1) 2 +(97, 39, 1) 2 +(97, 40, 1) 2 +(97, 41, 1) 2 +(97, 42, 1) 2 +(97, 43, 1) 2 +(97, 44, 1) 3 +(97, 45, 1) 3 +(97, 46, 1) 3 +(97, 47, 1) 3 +(97, 48, 1) 3 +(97, 49, 1) 3 +(97, 50, 1) 3 +(97, 51, 1) 3 +(97, 52, 1) 3 +(97, 53, 1) 3 +(97, 54, 1) 3 +(97, 55, 1) 3 +(97, 56, 1) 3 +(97, 57, 1) 3 +(97, 58, 1) 2 +(97, 59, 1) 2 +(97, 60, 1) 2 +(97, 61, 1) 2 +(97, 62, 1) 2 +(97, 63, 1) 2 +(97, 64, 1) 1 +(97, 65, 1) 1 +(98, 41, 1) 1 +(98, 42, 1) 1 +(98, 43, 1) 1 +(98, 44, 1) 2 +(98, 45, 1) 2 +(98, 46, 1) 2 +(98, 47, 1) 2 +(98, 48, 1) 2 +(98, 49, 1) 2 +(98, 50, 1) 2 +(98, 51, 1) 2 +(98, 52, 1) 2 +(98, 53, 1) 2 +(98, 54, 1) 2 +(98, 55, 1) 2 +(98, 56, 1) 2 +(98, 57, 1) 2 +(98, 58, 1) 1 +(98, 59, 1) 1 +(98, 60, 1) 1 +(99, 41, 1) 0 +(99, 42, 1) 0 +(99, 43, 1) 0 +(99, 44, 1) 1 +(99, 45, 1) 1 +(99, 46, 1) 1 +(99, 47, 1) 1 +(99, 48, 1) 1 +(99, 49, 1) 1 +(99, 50, 1) 1 +(99, 51, 1) 1 +(99, 52, 1) 1 +(99, 53, 1) 1 +(99, 54, 1) 1 +(99, 55, 1) 1 +(99, 56, 1) 1 +(99, 57, 1) 1 +(99, 58, 1) 0 +(99, 59, 1) 0 +(99, 60, 1) 0 +(100, 41, 1) 0 +(100, 42, 1) 0 +(100, 43, 1) 0 +(100, 44, 1) 0 +(100, 45, 1) 0 +(100, 46, 1) 0 +(100, 47, 1) 0 +(100, 48, 1) 0 +(100, 49, 1) 0 +(100, 50, 1) 0 +(100, 51, 1) 0 +(100, 52, 1) 0 +(100, 53, 1) 0 +(100, 54, 1) 0 +(100, 55, 1) 0 +(100, 56, 1) 0 +(100, 57, 1) 0 +(100, 58, 1) 0 +(100, 59, 1) 0 +(100, 60, 1) 0 diff --git a/EOverPCalibration/CommonTools/histoFunc.h b/EOverPCalibration/CommonTools/histoFunc.h new file mode 100755 index 00000000000..7862ce130d4 --- /dev/null +++ b/EOverPCalibration/CommonTools/histoFunc.h @@ -0,0 +1,92 @@ +#ifndef histoFunc_h +#define histoFunc_h + +#include "TH1.h" + + + + + + +class histoFunc +{ + public: + + + //! ctor + histoFunc(TH1F* histo) + { + histo_p = histo; + }; + + + //! dtor + ~histoFunc() + {}; + + //norm histo + double GetIntegral(){ + double nn = histo_p -> Integral(); + return(nn); + } + + //! operator() + double operator()(double* x, double* par) + { + double xx = par[1] * (x[0] - par[2]); + + double xMin = histo_p -> GetBinCenter(1); + double xMax = histo_p -> GetBinCenter(histo_p -> GetNbinsX()); + + + + if( (xx < xMin) || (xx >= xMax) ) + return 1.e-10; + + else + { + int bin = histo_p -> FindBin(xx); + int bin1 = 0; + int bin2 = 0; + + if(xx >= histo_p -> GetBinCenter(bin)) + { + bin1 = bin; + bin2 = bin+1; + } + + else + { + bin1 = bin-1; + bin2 = bin; + } + + + double x1 = histo_p -> GetBinCenter(bin1); + double y1 = histo_p -> GetBinContent(bin1); + + double x2 = histo_p -> GetBinCenter(bin2); + double y2 = histo_p -> GetBinContent(bin2); + + double m = 1. * (y2 - y1) / (x2 - x1); + + + + if( (y1 + m * (xx - x1)) < 1.e-10) + return 1.e-10; + + + return par[0] * par[1] * (y1 + m * (xx - x1)); + } + + return 1.e-10; + } + + + + private: + + TH1F* histo_p; +}; + +#endif diff --git a/EOverPCalibration/README b/EOverPCalibration/README new file mode 100644 index 00000000000..5d2d7261371 --- /dev/null +++ b/EOverPCalibration/README @@ -0,0 +1,160 @@ +------------------------------------- +------- Intercalibration Tool ------- +------------------------------------- + +Compile the package : scramv1 b -j16 + +List of codes for intercalibration: + +1) Intercalibration on EB (Ecal Barrel) : + +Run the code: FastCalibratorEB cfg/FastCalibrator_EB_split_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu + -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC + -> inputTree = tree name + -> isMiscalib = Miscalibration 5% option + -> isSaveEPDistribution = save E/p pdf + -> isEPselection = apply E/p selection setted in the .cc + -> isR9selection = apply R9 selection > 0.9 + -> isMCTruth = use calibration E/E_{Truth} + -> outputFile = output file + -> numberOfEvents = -1 (all statistic) + -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) + -> useW = 1 (use W event) 0 (no W event in IC procedure) + -> splitStat = 1 (split odd and even event) 0 (no split) + -> nLoops = number of L3 iteration + +2) Intercalibration on EE (Ecal EndCaps) : + +Run the code: FastCalibratorEE cfg/FastCalibrator_EE_split_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu + -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC + -> inputTree = tree name + -> isMiscalib = Miscalibration 5% option + -> isSaveEPDistribution = save E/p pdf + -> isEPselection = apply E/p selection setted in the .cc + -> isR9selection = apply R9 selection > 0.9 + -> isfbrem = apply fbrem selection < 0.4 + -> isMCTruth = use calibration E/E_{Truth} + -> outputFile = output file + -> numberOfEvents = -1 (all statistic) + -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) + -> useW = 1 (use W event) 0 (no W event in IC procedure) + -> splitStat = 1 (split odd and even event) 0 (no split) + -> nLoops = number of L3 iteration + + +1b-2b) CalibrationPlots.cpp --> draw results of calibration (run it after FastCalibratorEB (EE)) + +Run the code: CalibrationPlots cfg/calibrationPlots_EB_cfg.py + + + +3) CompareSCalibMCTruth_EB.cpp --> Comaparison beetween scalib MC with the truth in EB + +Run the code: CompareSCalibMCTruth_EB.exe cfg/comparisonEB_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input MC scalib to analyse + -> fileMCTruth = MC truth IC map for EB + -> fileMCRecoIC = MC Reco IC map for EB + -> fileStatPrecision = stat precision on non scalib MC in EB + + + +4) CompareSCalibMCTruth_EE.cpp --> Comaparison beetween scalib MC with the truth in EE + +Run the code: CompareSCalibMCTruth_EE cfg/comparisonEE_cfg.py + +Paramters to set in the cfg file: -> inputFile = Root file input MC scalib to analyse + -> fileMCTruth = MC truth IC map for EE + -> fileMCRecoIC = MC Reco IC map for EE + -> fileStatPrecision = stat precision on non scalib MC in EE + -> outputFile = output file for residual systematic + + + +5) CompareICSet.cpp --> compare two set of ICs taken by repository + +Run the code: CompareICSet.exe file1_IC_Set.txt file2_IC_Set.txt + + + +6) CalibrationMomentum.cpp --> study momentum scale vs phi in EB and EE + +Run the code: CalibrationMomentum cfg/calibrationMomentum_cfg.py + +Paramters to set in the cfg file: -> TreeName = name of the tree contained in each root file input + -> infileDATA = txt file with the list of .root data files + -> infileMC = txt file with the list of .root MC files + -> WeightforMC = .root file for weight MC events + -> nPhiBinsEB = number of phi bin in EB -> for data and MC dist + -> nPhiBinsEE = number of phi bin in EE -> for data and MC dist + -> nEtaBinsEB = number of eta bin in EB -> for template, data and MC dist + -> nEtaBinsEB = number of eta bin in EE -> for template, data and MC dist + -> nPhiBinsTempEB = number of phi bin in EB -> for template + -> nPhiBinsTempEE = number of phi bin in EB -> for template + -> rebinEB = rebin Template, MC and Data in EB + -> rebinEE = rebin Template, MC and Data in EE + -> outputFile = path of .root output file + + + +7) test/NormalizeIC_EE.cpp --> make normalization eta ring EE+ and EE- + +Run the code: ./bin/NormalizeIC_EE.exe cfg/NormalizeEE_cfg.cfg + +Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat + -> Inputfile2 = L3 calib output on half stat (even or odd) + -> Inputfile3 = L3 calib output on half stat (even or odd) + -> evalStat = 0 -> normalize only file1 1 -> normalize all files 1,2 and 3 + -> isMC = true -> calib mC false -> calib data + -> fileType = for plot image production + -> dirName = dir for output plots + -> printPlots = true -> print false -> no print + +Normalized map are insert in the input root file with the name h_scale_map_EEP h_scale_map_EEM + + + +##################### OBSOLETE ########## + +8) test/CalibrationBarrel.cpp --> make precision plot + normalization + momentum and crack correction in EB + make .txt IC output file + +Run the code: ./bin/CalibrationBarrel.exe cfg/calibrationEB_cfg.cfg + +Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat + -> Inputfile2 = L3 calib output on half stat (even or odd) + -> Inputfile3 = L3 calib output on half stat (even or odd) + -> inputMomentumScale = momentum scale correction + -> evalStat = 0 -> no statistical precision 1 -> stat prec + -> isMC = true -> calib mC false -> calib data + -> fileType = for plot image production + -> dirName = dir for output plots + -> printPlots = true -> print false -> no print + -> outputTxt = output IC txt file + + + + +8) test/CalibrationEndcap.cpp --> make precision plot + momentum correction + sys add in EE + make .txt IC output file + +Run the code: ./bin/CalibrationEndcap.exe cfg/calibrationEE_cfg.cfg + +Paramters to set in the cfg file: -> Inputfile1 = L3 calib output on full stat + -> Inputfile2 = L3 calib output on half stat (even or odd) + -> Inputfile3 = L3 calib output on half stat (even or odd) + -> inputMomentumScale = momentum scale correction + -> SystematicToAdd = file from scalib MC of the residual sys to Add + -> evalStat = 0 -> no statistical precision 1 -> stat prec + -> isMC = true -> calib mC false -> calib data + -> fileType = for plot image production + -> dirName = dir for output plots + -> printPlots = true -> print false -> no print + -> outputTxt = output IC txt file + + + \ No newline at end of file diff --git a/EOverPCalibration/RMSFile.txt b/EOverPCalibration/RMSFile.txt new file mode 100644 index 00000000000..796de9b3a31 --- /dev/null +++ b/EOverPCalibration/RMSFile.txt @@ -0,0 +1,85 @@ +1 0.00480365 +2 0.0040155 +3 0.00393103 +4 0.00397678 +5 0.00408274 +6 0.00445059 +7 0.00480351 +8 0.00478856 +9 0.00451166 +10 0.00488884 +11 0.00473805 +12 0.00433899 +13 0.0044261 +14 0.00463762 +15 0.00457602 +16 0.00489055 +17 0.00492733 +18 0.00460034 +19 0.00504573 +20 0.00496545 +21 0.00487833 +22 0.00503167 +23 0.00481444 +24 0.00478102 +25 0.00496812 +26 0.0049009 +27 0.00486267 +28 0.00470549 +29 0.00485762 +30 0.00467856 +31 0.00480772 +32 0.00507802 +33 0.00490454 +34 0.00513913 +35 0.00497808 +36 0.00517048 +37 0.00516998 +38 0.0051385 +39 0.00557952 +40 0.00587326 +41 0.00564539 +42 0.00536694 +43 0.00533608 +44 0.00588372 +45 0.00548201 +46 0.00552564 +47 0.00540657 +48 0.00507765 +49 0.00525103 +50 0.00539545 +51 0.00540359 +52 0.00590778 +53 0.00559148 +54 0.00589544 +55 0.00576401 +56 0.00568239 +57 0.00611321 +58 0.00603015 +59 0.00604824 +60 0.00587608 +61 0.0061889 +62 0.00635032 +63 0.00694852 +64 0.00695395 +65 0.00726495 +66 0.00801555 +67 0.00748724 +68 0.00731111 +69 0.00857006 +70 0.00757396 +71 0.00837833 +72 0.00816152 +73 0.00897918 +74 0.00934053 +75 0.0084456 +76 0.00907767 +77 0.00970266 +78 0.00998469 +79 0.0106416 +80 0.0116338 +81 0.0112471 +82 0.0112015 +83 0.011917 +84 0.0124452 +85 0.0189653 diff --git a/EOverPCalibration/bin/AddRegressionWeight.cpp b/EOverPCalibration/bin/AddRegressionWeight.cpp new file mode 100755 index 00000000000..64383ab9a79 --- /dev/null +++ b/EOverPCalibration/bin/AddRegressionWeight.cpp @@ -0,0 +1,637 @@ +#include +#include +#include +#include + +#include "TChain.h" +#include "TFile.h" +#include "TTree.h" +#include "TString.h" +#include "TObjString.h" +#include "TSystem.h" +#include "TROOT.h" +#include "TApplication.h" + +#include "../../NtuplePackage/interface/ntpleUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +//#if not defined(__CINT__) || defined(__MAKECINT__) +#include "TMVA/Tools.h" +#include "TMVA/Factory.h" +#include "TMVA/Reader.h" +//#endif + +#include "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.00/x86_64-slc5-gcc46-opt/root/tmva/test/TMVARegGui.C" + + +int main(int argc, char**argv){ + + if(argc != 2){ + std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("AddRegressionWeight"); + parameterSet.reset(); + + std::string treeNameDATA = Options.getParameter("treeNameDATA"); + std::string UseMethodFlag = Options.getParameter("UseMethodFlag"); + + std::string FilemethodXML_EB_E = Options.getParameter("FilemethodXML_EB_E"); + std::string FilemethodXML_EB_P = Options.getParameter("FilemethodXML_EB_P"); + + std::string FilemethodXML_EE_E = Options.getParameter("FilemethodXML_EE_E"); + std::string FilemethodXML_EE_P = Options.getParameter("FilemethodXML_EE_P"); + + std::string RegionOfTraining = Options.getParameter("RegionOfTraining"); + std::string inputFile = Options.getParameter("inputFile"); + + bool useW = Options.getParameter("useW"); + bool isMC = Options.getParameter("isMC"); + + + TFile *File = new TFile(inputFile.c_str(),"UPDATE"); + + TTree* treeDATA = (TTree*) File->Get(treeNameDATA.c_str()); + + + float input_variables_1[1000]; + float input_variables_2[1000]; + + + double MVA_ValueZ_1,MVA_ValueZ_2, MVA_ValueW_1,MVA_ValueW_2; + + float targetW_1,targetZ_1,targetW_2,targetZ_2; + + TBranch *weightBranchW_1 = new TBranch(); + TBranch *weightBranchW_2 = new TBranch(); + TBranch *weightBranchZ_1 = new TBranch(); + TBranch *weightBranchZ_2 = new TBranch(); + TBranch *btargetW_1 = new TBranch(); + TBranch *btargetZ_1 = new TBranch(); + TBranch *btargetW_2 = new TBranch(); + TBranch *btargetZ_2 = new TBranch(); + + + + if(RegionOfTraining=="EB"){ + + + TMVA::Reader *TMVAreader_1 = new TMVA::Reader( "!Color:!Silent" ); + TMVA::Reader *TMVAreader_2 = new TMVA::Reader( "!Color:!Silent" ); + + int ele1_isEB,isW; + float ele1_eRegrInput_nPV,ele1_eRegrInput_r9,ele1_fbrem,ele1_eta,ele1_DphiIn,ele1_DetaIn,ele1_sigmaIetaIeta, ele1_E_true, ele1_scE, ele1_tkP,ele1_eRegrInput_etaW,ele1_eRegrInput_phiW,ele1_scERaw; + + + TMVAreader_1->AddVariable("ele1_scE/ele1_scERaw",&input_variables_1[0]); + TMVAreader_1->AddVariable("ele1_eRegrInput_nPV",&input_variables_1[1]); + TMVAreader_1->AddVariable("ele1_eRegrInput_r9",&input_variables_1[2]); + TMVAreader_1->AddVariable("ele1_fbrem",&input_variables_1[3]); + TMVAreader_1->AddVariable("ele1_eta",&input_variables_1[4]); + TMVAreader_1->AddVariable("ele1_DphiIn",&input_variables_1[5]); + TMVAreader_1->AddVariable("ele1_DetaIn",&input_variables_1[6]); + TMVAreader_1->AddVariable("ele1_sigmaIetaIeta", &input_variables_1[7]); + TMVAreader_1->AddVariable("ele1_eRegrInput_etaW",&input_variables_1[8]); + TMVAreader_1->AddVariable("ele1_eRegrInput_phiW", &input_variables_1[9]); + + TMVAreader_2->AddVariable("ele1_scE/ele1_scERaw",&input_variables_2[0]); + TMVAreader_2->AddVariable("ele1_eRegrInput_nPV",&input_variables_2[1]); + TMVAreader_2->AddVariable("ele1_eRegrInput_r9",&input_variables_2[2]); + TMVAreader_2->AddVariable("ele1_fbrem",&input_variables_2[3]); + TMVAreader_2->AddVariable("ele1_eta",&input_variables_2[4]); + TMVAreader_2->AddVariable("ele1_DphiIn",&input_variables_2[5]); + TMVAreader_2->AddVariable("ele1_DetaIn",&input_variables_2[6]); + TMVAreader_2->AddVariable("ele1_sigmaIetaIeta", &input_variables_2[7]); + TMVAreader_2->AddVariable("ele1_eRegrInput_etaW",&input_variables_2[8]); + TMVAreader_2->AddVariable("ele1_eRegrInput_phiW", &input_variables_2[9]); + + + treeDATA -> SetBranchAddress("ele1_isEB", &ele1_isEB); + treeDATA -> SetBranchAddress("isW", &isW); + treeDATA -> SetBranchAddress("ele1_scE", &ele1_scE); + treeDATA -> SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeDATA -> SetBranchAddress("ele1_tkP", &ele1_tkP); + treeDATA -> SetBranchAddress("ele1_eRegrInput_nPV", &ele1_eRegrInput_nPV); + treeDATA -> SetBranchAddress("ele1_eRegrInput_r9", &ele1_eRegrInput_r9); + treeDATA -> SetBranchAddress("ele1_fbrem", &ele1_fbrem); + treeDATA -> SetBranchAddress("ele1_eta", &ele1_eta); + treeDATA -> SetBranchAddress("ele1_DphiIn", &ele1_DphiIn); + treeDATA -> SetBranchAddress("ele1_DetaIn", &ele1_DetaIn); + treeDATA -> SetBranchAddress("ele1_sigmaIetaIeta", &ele1_sigmaIetaIeta); + treeDATA -> SetBranchAddress("ele1_eRegrInput_etaW", &ele1_eRegrInput_etaW); + treeDATA -> SetBranchAddress("ele1_eRegrInput_phiW", &ele1_eRegrInput_phiW); + + if(isMC == true) treeDATA -> SetBranchAddress("ele1_E_true", &ele1_E_true); + + + float ele1_eRegrInput_bCE_Over_sCE,ele1_eRegrInput_sigietaieta_bC1,ele1_eRegrInput_sigiphiiphi_bC1,ele1_eRegrInput_sigietaiphi_bC1,ele1_eRegrInput_e3x3_Over_bCE,ele1_eRegrInput_Deta_bC_sC,ele1_eRegrInput_Dphi_bC_sC,ele1_eRegrInput_bEMax_Over_bCE; + + + TMVAreader_1->AddVariable("ele1_eRegrInput_bCE_Over_sCE",&input_variables_1[10]); + TMVAreader_1->AddVariable("ele1_eRegrInput_sigietaieta_bC1",&input_variables_1[11]); + TMVAreader_1->AddVariable("ele1_eRegrInput_sigiphiiphi_bC1",&input_variables_1[12]); + TMVAreader_1->AddVariable("ele1_eRegrInput_sigietaiphi_bC1",&input_variables_1[13]); + TMVAreader_1->AddVariable("ele1_eRegrInput_e3x3_Over_bCE", &input_variables_1[14]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Deta_bC_sC", &input_variables_1[15]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Dphi_bC_sC", &input_variables_1[16]); + TMVAreader_1->AddVariable("ele1_eRegrInput_bEMax_Over_bCE", &input_variables_1[17]); + + TMVAreader_2->AddVariable("ele1_eRegrInput_bCE_Over_sCE",&input_variables_2[10]); + TMVAreader_2->AddVariable("ele1_eRegrInput_sigietaieta_bC1",&input_variables_2[11]); + TMVAreader_2->AddVariable("ele1_eRegrInput_sigiphiiphi_bC1",&input_variables_2[12]); + TMVAreader_2->AddVariable("ele1_eRegrInput_sigietaiphi_bC1",&input_variables_2[13]); + TMVAreader_2->AddVariable("ele1_eRegrInput_e3x3_Over_bCE", &input_variables_2[14]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Deta_bC_sC", &input_variables_2[15]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Dphi_bC_sC", &input_variables_2[16]); + TMVAreader_2->AddVariable("ele1_eRegrInput_bEMax_Over_bCE", &input_variables_2[17]); + + + treeDATA -> SetBranchAddress("ele1_eRegrInput_bCE_Over_sCE", &ele1_eRegrInput_bCE_Over_sCE); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaieta_bC1", &ele1_eRegrInput_sigietaieta_bC1); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigiphiiphi_bC1", &ele1_eRegrInput_sigiphiiphi_bC1); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaiphi_bC1", &ele1_eRegrInput_sigietaiphi_bC1); + treeDATA -> SetBranchAddress("ele1_eRegrInput_e3x3_Over_bCE", &ele1_eRegrInput_e3x3_Over_bCE); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Deta_bC_sC", &ele1_eRegrInput_Deta_bC_sC); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Dphi_bC_sC", &ele1_eRegrInput_Dphi_bC_sC); + treeDATA -> SetBranchAddress("ele1_eRegrInput_bEMax_Over_bCE", &ele1_eRegrInput_bEMax_Over_bCE); + + + float ele1_dxy_PV,ele1_dz_PV,ele1_sigmaP; + + TMVAreader_1->AddVariable( "ele1_dxy_PV" , &input_variables_1[18]); + TMVAreader_1->AddVariable( "ele1_dz_PV" , &input_variables_1[19]); + TMVAreader_1->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_1[20]); + + TMVAreader_2->AddVariable( "ele1_dxy_PV" , &input_variables_2[18]); + TMVAreader_2->AddVariable( "ele1_dz_PV" , &input_variables_2[19]); + TMVAreader_2->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_2[20]); + + + treeDATA -> SetBranchAddress("ele1_dxy_PV", &ele1_dxy_PV); + treeDATA -> SetBranchAddress("ele1_dz_PV", &ele1_dz_PV); + treeDATA -> SetBranchAddress("ele1_sigmaP", &ele1_sigmaP); + + float ele1_eRegrInput_bCELow_Over_sCE,ele1_eRegrInput_sigietaieta_bCLow,ele1_eRegrInput_sigiphiiphi_bCLow,ele1_eRegrInput_sigietaiphi_bCLow,ele1_eRegrInput_e3x3_Over_bCELow,ele1_eRegrInput_Deta_bCLow_sC,ele1_eRegrInput_Dphi_bCLow_sC; + + TMVAreader_1->AddVariable("ele1_eRegrInput_bCELow_Over_sCE",&input_variables_1[21]); + TMVAreader_1->AddVariable("ele1_eRegrInput_e3x3_Over_bCELow", &input_variables_1[22]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Deta_bCLow_sC", &input_variables_1[23]); + TMVAreader_1->AddVariable("ele1_eRegrInput_Dphi_bCLow_sC", &input_variables_1[24]); + + + TMVAreader_2->AddVariable("ele1_eRegrInput_bCELow_Over_sCE",&input_variables_2[21]); + TMVAreader_2->AddVariable("ele1_eRegrInput_e3x3_Over_bCELow", &input_variables_2[22]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Deta_bCLow_sC", &input_variables_2[23]); + TMVAreader_2->AddVariable("ele1_eRegrInput_Dphi_bCLow_sC", &input_variables_2[24]); + + treeDATA -> SetBranchAddress("ele1_eRegrInput_bCELow_Over_sCE", &ele1_eRegrInput_bCELow_Over_sCE); + treeDATA -> SetBranchAddress("ele1_eRegrInput_e3x3_Over_bCELow", &ele1_eRegrInput_e3x3_Over_bCELow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaieta_bCLow", &ele1_eRegrInput_sigietaieta_bCLow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigiphiiphi_bCLow", &ele1_eRegrInput_sigiphiiphi_bCLow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_sigietaiphi_bCLow", &ele1_eRegrInput_sigietaiphi_bCLow); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Deta_bCLow_sC", &ele1_eRegrInput_Deta_bCLow_sC); + treeDATA -> SetBranchAddress("ele1_eRegrInput_Dphi_bCLow_sC", &ele1_eRegrInput_Dphi_bCLow_sC); + + float ele1_eRegrInput_seedbC_etacry,ele1_eRegrInput_seedbC_phicry; + + TMVAreader_1->AddVariable("ele1_eRegrInput_seedbC_etacry", &input_variables_1[25]); + TMVAreader_1->AddVariable("ele1_eRegrInput_seedbC_phicry", &input_variables_1[26]); + TMVAreader_2->AddVariable("ele1_eRegrInput_seedbC_etacry", &input_variables_2[25]); + TMVAreader_2->AddVariable("ele1_eRegrInput_seedbC_phicry", &input_variables_2[26]); + + + treeDATA -> SetBranchAddress("ele1_eRegrInput_seedbC_etacry", &ele1_eRegrInput_seedbC_etacry); + treeDATA -> SetBranchAddress("ele1_eRegrInput_seedbC_phicry", &ele1_eRegrInput_seedbC_phicry); + + + ///==== add new branches ==== + TString weightfile_1 = FilemethodXML_EB_E; + TString weightfile_2 = FilemethodXML_EB_P; + + std::cout<<" UseMethodFlag "<BookMVA( UseMethodFlag, weightfile_1 ); + TMVAreader_2->BookMVA( UseMethodFlag, weightfile_2 ); + + TString methodName4TreeW_1 = Form ("%s_weightEB_W_1",UseMethodFlag.c_str()); + TString methodName4TreeZ_1 = Form ("%s_weightEB_Z_1",UseMethodFlag.c_str()); + TString methodName4TreeW_1_ = Form ("%s_weightEB_W_1/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_1_ = Form ("%s_weightEB_Z_1/D",UseMethodFlag.c_str()); + + TString methodName4TreeW_2 = Form ("%s_weightEB_W_2",UseMethodFlag.c_str()); + TString methodName4TreeZ_2 = Form ("%s_weightEB_Z_2",UseMethodFlag.c_str()); + TString methodName4TreeW_2_ = Form ("%s_weightEB_W_2/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_2_ = Form ("%s_weightEB_Z_2/D",UseMethodFlag.c_str()); + + TString methodtargetW_1; + TString methodtargetZ_1; + TString methodtargetW_1_; + TString methodtargetZ_1_; + TString methodtargetW_2; + TString methodtargetZ_2; + TString methodtargetW_2_; + TString methodtargetZ_2_; + + if(isMC == true){ + + methodtargetW_1 = Form ("%s_targetEB_W_1",UseMethodFlag.c_str()); + methodtargetZ_1 = Form ("%s_targetEB_Z_1",UseMethodFlag.c_str()); + methodtargetW_1_= Form ("%s_targetEB_W_1/F",UseMethodFlag.c_str()); + methodtargetZ_1_= Form ("%s_targetEB_Z_1/F",UseMethodFlag.c_str()); + + methodtargetW_2 = Form ("%s_targetEB_W_2",UseMethodFlag.c_str()); + methodtargetZ_2 = Form ("%s_targetEB_Z_2",UseMethodFlag.c_str()); + methodtargetW_2_= Form ("%s_targetEB_W_2/F",UseMethodFlag.c_str()); + methodtargetZ_2_= Form ("%s_targetEB_Z_2/F",UseMethodFlag.c_str()); + + } + + if(useW) { + weightBranchW_1 = treeDATA->Branch(methodName4TreeW_1,&MVA_ValueW_1,methodName4TreeW_1_); + weightBranchW_2 = treeDATA->Branch(methodName4TreeW_2,&MVA_ValueW_2,methodName4TreeW_2_); + if(isMC == true){ + btargetW_1 = treeDATA->Branch(methodtargetW_1,&targetW_1,methodtargetW_1); + btargetW_2 = treeDATA->Branch(methodtargetW_2,&targetW_2,methodtargetW_2); } + } + + if(!useW){ + weightBranchZ_1 = treeDATA->Branch(methodName4TreeZ_1,&MVA_ValueZ_1,methodName4TreeZ_1); + weightBranchZ_2 = treeDATA->Branch(methodName4TreeZ_2,&MVA_ValueZ_2,methodName4TreeZ_2); + + if(isMC == true){ btargetZ_1 = treeDATA->Branch(methodtargetZ_1,&targetZ_1,methodtargetZ_1); + btargetZ_2 = treeDATA->Branch(methodtargetZ_2,&targetZ_2,methodtargetZ_2); } + } + + ///==== loop ==== + Long64_t nentries = treeDATA->GetEntries(); + + for (Long64_t iEntry = 0; iEntry < nentries; iEntry++){ + if((iEntry%100000) == 0) std::cout << ">>>>> analysis::GetEntry " << iEntry << " : " << nentries << std::endl; + + treeDATA->GetEntry(iEntry); + + if(ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0. && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && + ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && + abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2){ + + input_variables_1[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_1[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_1[2] = static_cast(ele1_eRegrInput_r9); + input_variables_1[3] = static_cast(ele1_fbrem); + input_variables_1[4] = static_cast(ele1_eta); + input_variables_1[5] = static_cast(ele1_DphiIn); + input_variables_1[6] = static_cast(ele1_DetaIn); + input_variables_1[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_1[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_1[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_1[10] = static_cast(ele1_eRegrInput_bCE_Over_sCE); + input_variables_1[11] = static_cast(ele1_eRegrInput_sigietaieta_bC1); + input_variables_1[12] = static_cast(ele1_eRegrInput_sigiphiiphi_bC1); + input_variables_1[13] = static_cast(ele1_eRegrInput_sigietaiphi_bC1); + input_variables_1[14] = static_cast(ele1_eRegrInput_e3x3_Over_bCE); + input_variables_1[15] = static_cast(ele1_eRegrInput_Deta_bC_sC); + input_variables_1[16] = static_cast(ele1_eRegrInput_Dphi_bC_sC); + input_variables_1[17] = static_cast(ele1_eRegrInput_bEMax_Over_bCE); + input_variables_1[18] = static_cast(ele1_dxy_PV); + input_variables_1[19] = static_cast(ele1_dz_PV); + input_variables_1[29] = static_cast(ele1_sigmaP/ele1_tkP); + input_variables_1[21] = static_cast(ele1_eRegrInput_bCELow_Over_sCE); + input_variables_1[22] = static_cast(ele1_eRegrInput_e3x3_Over_bCELow); + input_variables_1[23] = static_cast(ele1_eRegrInput_Deta_bCLow_sC); + input_variables_1[24] = static_cast(ele1_eRegrInput_Dphi_bCLow_sC); + input_variables_1[25] = static_cast(ele1_eRegrInput_seedbC_etacry); + input_variables_1[26] = static_cast(ele1_eRegrInput_seedbC_phicry); + + + input_variables_2[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_2[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_2[2] = static_cast(ele1_eRegrInput_r9); + input_variables_2[3] = static_cast(ele1_fbrem); + input_variables_2[4] = static_cast(ele1_eta); + input_variables_2[5] = static_cast(ele1_DphiIn); + input_variables_2[6] = static_cast(ele1_DetaIn); + input_variables_2[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_2[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_2[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_2[10] = static_cast(ele1_eRegrInput_bCE_Over_sCE); + input_variables_2[11] = static_cast(ele1_eRegrInput_sigietaieta_bC1); + input_variables_2[12] = static_cast(ele1_eRegrInput_sigiphiiphi_bC1); + input_variables_2[13] = static_cast(ele1_eRegrInput_sigietaiphi_bC1); + input_variables_2[14] = static_cast(ele1_eRegrInput_e3x3_Over_bCE); + input_variables_2[15] = static_cast(ele1_eRegrInput_Deta_bC_sC); + input_variables_2[16] = static_cast(ele1_eRegrInput_Dphi_bC_sC); + input_variables_2[17] = static_cast(ele1_eRegrInput_bEMax_Over_bCE); + input_variables_2[18] = static_cast(ele1_dxy_PV); + input_variables_2[19] = static_cast(ele1_dz_PV); + input_variables_2[29] = static_cast(ele1_sigmaP/ele1_tkP); + input_variables_2[21] = static_cast(ele1_eRegrInput_bCELow_Over_sCE); + input_variables_2[22] = static_cast(ele1_eRegrInput_e3x3_Over_bCELow); + input_variables_2[23] = static_cast(ele1_eRegrInput_Deta_bCLow_sC); + input_variables_2[24] = static_cast(ele1_eRegrInput_Dphi_bCLow_sC); + input_variables_2[25] = static_cast(ele1_eRegrInput_seedbC_etacry); + input_variables_2[26] = static_cast(ele1_eRegrInput_seedbC_phicry); + + + if(useW){ + + MVA_ValueW_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag); + MVA_ValueW_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag); + + + if(isMC == true) { + targetW_1 = ele1_scE/ele1_E_true; + targetW_2 = ele1_tkP/ele1_E_true; + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); + + } + + if(!useW){ + + MVA_ValueZ_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag); + MVA_ValueZ_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag); + + if(isMC == true) { + targetZ_1 = ele1_scE/ele1_E_true; + targetZ_2 = ele1_tkP/ele1_E_true; + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + else{ + if( useW == true){ + MVA_ValueW_1 = -99. ; MVA_ValueW_2 = -99.; + if(isMC == true) { + targetW_1 = -99. ; targetW_2=-99. ; + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); + } + + if( useW == false){ + MVA_ValueZ_1 = -99.; MVA_ValueZ_2 = -99.; + if(isMC == true) { + targetZ_1 = -99. ; targetZ_2=-99. ; + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + } + } + +if(RegionOfTraining=="EE"){ + + TMVA::Reader *TMVAreader_1 = new TMVA::Reader( "!Color:!Silent" ); + TMVA::Reader *TMVAreader_2 = new TMVA::Reader( "!Color:!Silent" ); + + + int ele1_isEB,isW; + float ele1_eRegrInput_nPV,ele1_eRegrInput_r9,ele1_fbrem,ele1_eta,ele1_DphiIn,ele1_DetaIn,ele1_sigmaIetaIeta, ele1_E_true, ele1_scE, ele1_tkP,ele1_eRegrInput_etaW,ele1_eRegrInput_phiW,ele1_scERaw; + + + TMVAreader_1->AddVariable("ele1_scE/ele1_scERaw",&input_variables_1[0]); + TMVAreader_1->AddVariable("ele1_eRegrInput_nPV",&input_variables_1[1]); + TMVAreader_1->AddVariable("ele1_eRegrInput_r9",&input_variables_1[2]); + TMVAreader_1->AddVariable("ele1_fbrem",&input_variables_1[3]); + TMVAreader_1->AddVariable("ele1_eta",&input_variables_1[4]); + TMVAreader_1->AddVariable("ele1_DphiIn",&input_variables_1[5]); + TMVAreader_1->AddVariable("ele1_DetaIn",&input_variables_1[6]); + TMVAreader_1->AddVariable("ele1_sigmaIetaIeta", &input_variables_1[7]); + TMVAreader_1->AddVariable("ele1_eRegrInput_etaW",&input_variables_1[8]); + TMVAreader_1->AddVariable("ele1_eRegrInput_phiW", &input_variables_1[9]); + + + TMVAreader_2->AddVariable("ele1_scE/ele1_scERaw",&input_variables_2[0]); + TMVAreader_2->AddVariable("ele1_eRegrInput_nPV",&input_variables_2[1]); + TMVAreader_2->AddVariable("ele1_eRegrInput_r9",&input_variables_2[2]); + TMVAreader_2->AddVariable("ele1_fbrem",&input_variables_2[3]); + TMVAreader_2->AddVariable("ele1_eta",&input_variables_2[4]); + TMVAreader_2->AddVariable("ele1_DphiIn",&input_variables_2[5]); + TMVAreader_2->AddVariable("ele1_DetaIn",&input_variables_2[6]); + TMVAreader_2->AddVariable("ele1_sigmaIetaIeta", &input_variables_2[7]); + TMVAreader_2->AddVariable("ele1_eRegrInput_etaW",&input_variables_2[8]); + TMVAreader_2->AddVariable("ele1_eRegrInput_phiW", &input_variables_2[9]); + + + treeDATA -> SetBranchAddress("ele1_isEB", &ele1_isEB); + treeDATA -> SetBranchAddress("isW", &isW); + + if(isMC == true) treeDATA -> SetBranchAddress("ele1_E_true", &ele1_E_true); + treeDATA -> SetBranchAddress("ele1_scE", &ele1_scE); + treeDATA -> SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeDATA -> SetBranchAddress("ele1_tkP", &ele1_tkP); + treeDATA -> SetBranchAddress("ele1_eRegrInput_nPV", &ele1_eRegrInput_nPV); + treeDATA -> SetBranchAddress("ele1_eRegrInput_r9", &ele1_eRegrInput_r9); + treeDATA -> SetBranchAddress("ele1_fbrem", &ele1_fbrem); + treeDATA -> SetBranchAddress("ele1_eta", &ele1_eta); + treeDATA -> SetBranchAddress("ele1_DphiIn", &ele1_DphiIn); + treeDATA -> SetBranchAddress("ele1_DetaIn", &ele1_DetaIn); + treeDATA -> SetBranchAddress("ele1_sigmaIetaIeta", &ele1_sigmaIetaIeta); + treeDATA -> SetBranchAddress("ele1_eRegrInput_etaW", &ele1_eRegrInput_etaW); + treeDATA -> SetBranchAddress("ele1_eRegrInput_phiW", &ele1_eRegrInput_phiW); + + + float ele1_dxy_PV,ele1_dz_PV,ele1_sigmaP; + + TMVAreader_1->AddVariable( "ele1_dxy_PV" , &input_variables_1[18]); + TMVAreader_1->AddVariable( "ele1_dz_PV" , &input_variables_1[19]); + TMVAreader_1->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_1[20]); + + TMVAreader_2->AddVariable( "ele1_dxy_PV" , &input_variables_2[18]); + TMVAreader_2->AddVariable( "ele1_dz_PV" , &input_variables_2[19]); + TMVAreader_2->AddVariable( "ele1_sigmaP/ele1_tkP" , &input_variables_2[20]); + + treeDATA -> SetBranchAddress("ele1_dxy_PV", &ele1_dxy_PV); + treeDATA -> SetBranchAddress("ele1_dz_PV", &ele1_dz_PV); + treeDATA -> SetBranchAddress("ele1_sigmaP", &ele1_sigmaP); + + + ///==== add new branches ==== + TString weightfile_1 = FilemethodXML_EE_E; + TString weightfile_2 = FilemethodXML_EE_P; + + std::cout<<" UseMethodFlag "<BookMVA( UseMethodFlag, weightfile_1 ); + TMVAreader_2->BookMVA( UseMethodFlag, weightfile_2 ); + + TString methodName4TreeW_1 = Form ("%s_weightEE_W_1",UseMethodFlag.c_str()); + TString methodName4TreeZ_1 = Form ("%s_weightEE_Z_1",UseMethodFlag.c_str()); + TString methodName4TreeW_1_ = Form ("%s_weightEE_W_1/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_1_ = Form ("%s_weightEE_Z_1/D",UseMethodFlag.c_str()); + + TString methodName4TreeW_2 = Form ("%s_weightEE_W_2",UseMethodFlag.c_str()); + TString methodName4TreeZ_2 = Form ("%s_weightEE_Z_2",UseMethodFlag.c_str()); + TString methodName4TreeW_2_ = Form ("%s_weightEE_W_2/D",UseMethodFlag.c_str()); + TString methodName4TreeZ_2_ = Form ("%s_weightEE_Z_2/D",UseMethodFlag.c_str()); + + TString methodtargetW_1; + TString methodtargetZ_1; + TString methodtargetW_1_; + TString methodtargetZ_1_; + TString methodtargetW_2; + TString methodtargetZ_2; + TString methodtargetW_2_; + TString methodtargetZ_2_; + + if(isMC == true){ + methodtargetW_1 = Form ("%s_targetEE_W_1",UseMethodFlag.c_str()); + methodtargetZ_1 = Form ("%s_targetEE_Z_1",UseMethodFlag.c_str()); + methodtargetW_1_= Form ("%s_targetEE_W_1/F",UseMethodFlag.c_str()); + methodtargetZ_1_= Form ("%s_targetEE_Z_1/F",UseMethodFlag.c_str()); + + methodtargetW_2 = Form ("%s_targetEE_W_2",UseMethodFlag.c_str()); + methodtargetZ_2 = Form ("%s_targetEE_Z_2",UseMethodFlag.c_str()); + methodtargetW_2_= Form ("%s_targetEE_W_2/F",UseMethodFlag.c_str()); + methodtargetZ_2_= Form ("%s_targetEE_Z_2/F",UseMethodFlag.c_str()); + } + + if(useW) { + weightBranchW_1 = treeDATA->Branch(methodName4TreeW_1,&MVA_ValueW_1,methodName4TreeW_1_); + weightBranchW_2 = treeDATA->Branch(methodName4TreeW_2,&MVA_ValueW_2,methodName4TreeW_2_); + if(isMC==true){ + btargetW_1 = treeDATA->Branch(methodtargetW_1,&targetW_1,methodtargetW_1); + btargetW_2 = treeDATA->Branch(methodtargetW_2,&targetW_2,methodtargetW_2);} + } + + if(!useW){ + weightBranchZ_1 = treeDATA->Branch(methodName4TreeZ_1,&MVA_ValueZ_1,methodName4TreeZ_1); + weightBranchZ_2 = treeDATA->Branch(methodName4TreeZ_2,&MVA_ValueZ_2,methodName4TreeZ_2); + if(isMC==true){ + btargetZ_1 = treeDATA->Branch(methodtargetZ_1,&targetZ_1,methodtargetZ_1); + btargetZ_2 = treeDATA->Branch(methodtargetZ_2,&targetZ_2,methodtargetZ_2);} + } + + ///==== loop ==== + Long64_t nentries = treeDATA->GetEntries(); + + for (Long64_t iEntry = 0; iEntry < nentries; iEntry++){ + if((iEntry%100000) == 0) std::cout << ">>>>> analysis::GetEntry " << iEntry << " : " << nentries << std::endl; + + treeDATA->GetEntry(iEntry); + + if(ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05){ + + input_variables_1[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_1[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_1[2] = static_cast(ele1_eRegrInput_r9); + input_variables_1[3] = static_cast(ele1_fbrem); + input_variables_1[4] = static_cast(ele1_eta); + input_variables_1[5] = static_cast(ele1_DphiIn); + input_variables_1[6] = static_cast(ele1_DetaIn); + input_variables_1[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_1[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_1[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_1[10] = static_cast(ele1_dxy_PV); + input_variables_1[11] = static_cast(ele1_dz_PV); + input_variables_1[12] = static_cast(ele1_sigmaP/ele1_tkP); + + input_variables_2[0] = static_cast(ele1_scE/ele1_scERaw); + input_variables_2[1] = static_cast(ele1_eRegrInput_nPV); + input_variables_2[2] = static_cast(ele1_eRegrInput_r9); + input_variables_2[3] = static_cast(ele1_fbrem); + input_variables_2[4] = static_cast(ele1_eta); + input_variables_2[5] = static_cast(ele1_DphiIn); + input_variables_2[6] = static_cast(ele1_DetaIn); + input_variables_2[7] = static_cast(ele1_sigmaIetaIeta); + input_variables_2[8] = static_cast(ele1_eRegrInput_etaW); + input_variables_2[9] = static_cast(ele1_eRegrInput_phiW); + input_variables_2[10] = static_cast(ele1_dxy_PV); + input_variables_2[11] = static_cast(ele1_dz_PV); + input_variables_2[12] = static_cast(ele1_sigmaP/ele1_tkP); + + + if(useW){ + + MVA_ValueW_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag) ; + MVA_ValueW_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag) ; + + if(isMC== true){ + targetW_1 = ele1_scE/ele1_E_true; + targetW_2 = ele1_tkP/ele1_E_true; + + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); + + } + + if(!useW){ + + MVA_ValueZ_1 = TMVAreader_1->EvaluateRegression(0,UseMethodFlag) ; + MVA_ValueZ_2 = TMVAreader_2->EvaluateRegression(0,UseMethodFlag) ; + + if(isMC== true){ + targetZ_1 = ele1_scE/ele1_E_true; + targetZ_2 = ele1_tkP/ele1_E_true; + + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + else{ + if( useW == true){ + MVA_ValueW_1 = -99. ; MVA_ValueW_2 = -99.; + if(isMC== true){ + targetW_1 = -99. ; targetW_2=-99. ; + btargetW_1 -> Fill(); + btargetW_2 -> Fill(); + } + weightBranchW_1 -> Fill(); + weightBranchW_2 -> Fill(); } + + if( useW == false){ + MVA_ValueZ_1 = -99.; MVA_ValueZ_2 = -99.; + if(isMC == true){ + targetZ_1 = -99. ; targetZ_2=-99. ; + btargetZ_1 -> Fill(); + btargetZ_2 -> Fill(); + } + weightBranchZ_1 -> Fill(); + weightBranchZ_2 -> Fill(); + } + + } + } + +} + + // save only the new version of the tree + treeDATA->Write("", TObject::kOverwrite); + + return 0; + +} + + + + diff --git a/EOverPCalibration/bin/BuildFile.xml b/EOverPCalibration/bin/BuildFile.xml new file mode 100644 index 00000000000..d9299479d8e --- /dev/null +++ b/EOverPCalibration/bin/BuildFile.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/EOverPCalibration/bin/CalibrationMomentum.cpp b/EOverPCalibration/bin/CalibrationMomentum.cpp new file mode 100644 index 00000000000..7a51e37e326 --- /dev/null +++ b/EOverPCalibration/bin/CalibrationMomentum.cpp @@ -0,0 +1,1143 @@ +#include "../interface/TEndcapRings.h" +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../../NtuplePackage/interface/treeReader.h" +#include "../interface/CalibrationUtils.h" +#include "../CommonTools/histoFunc.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TH2.h" +#include "TCanvas.h" +#include "TProfile.h" +#include "TGraphErrors.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TChain.h" +#include "TVirtualFitter.h" +#include "TMath.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + + +bool IsEtaGap(float eta) +{ + float feta = fabs(eta); + if( fabs(feta - 0 ) < 3 ) return true; + if( fabs(feta - 25) < 3 ) return true; + if( fabs(feta - 45) < 3 ) return true; + if( fabs(feta - 65) < 3 ) return true; + if( fabs(feta - 85) < 3 ) return true; + return false; +} + + + + + + +//************** MAIN PROGRAM ************************************************************** +int main(int argc, char** argv) +{ + // Acquisition from cfg file + if(argc != 2) + { + std::cerr << ">>>>> CalibrationMomentum.cpp::usage: " << argv[0] << " configFileName" << std::endl; + return 1; + } + + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + // parameterSet.reset(); + + std::string TreeName = "NULL"; + if(Options.existsAs("TreeName")) + TreeName = Options.getParameter("TreeName"); + + std::string infileDATA = "NULL"; + if(Options.existsAs("infileDATA")) + infileDATA = Options.getParameter("infileDATA"); + + std::string infileMC = "NULL"; + if(Options.existsAs("infileMC")) + infileMC = Options.getParameter("infileMC"); + + std::string WeightforMC = "NULL"; + if(Options.existsAs("WeightforMC")) + WeightforMC = Options.getParameter("WeightforMC"); + + std::string typeEB = "NULL"; + if(Options.existsAs("typeEB")) + typeEB = Options.getParameter("typeEB"); + + std::string typeEE = "NULL"; + if(Options.existsAs("typeEE")) + typeEE = Options.getParameter("typeEE"); + + int nPhiBinsEB = 1; + if(Options.existsAs("nPhiBinsEB")) + nPhiBinsEB = Options.getParameter("nPhiBinsEB"); + + int nPhiBinsEE = 1; + if(Options.existsAs("nPhiBinsEE")) + nPhiBinsEE = Options.getParameter("nPhiBinsEE"); + + int nPhiBinsTempEB = 1; + if(Options.existsAs("nPhiBinsTempEB")) + nPhiBinsTempEB = Options.getParameter("nPhiBinsTempEB"); + + int nPhiBinsTempEE = 1; + if(Options.existsAs("nPhiBinsTempEE")) + nPhiBinsTempEE = Options.getParameter("nPhiBinsTempEE"); + + int rebinEB = 1; + if(Options.existsAs("rebinEB")) + rebinEB = Options.getParameter("rebinEB"); + + int rebinEE = 1; + if(Options.existsAs("rebinEE")) + rebinEE = Options.getParameter("rebinEE"); + + int nRegionsEB = 1; + if(Options.existsAs("nRegionsEB")) + nRegionsEB = Options.getParameter("nRegionsEB"); + + int nRegionsEE = 1; + if(Options.existsAs("nRegionsEE")) + nRegionsEE = Options.getParameter("nRegionsEE"); + + std::string outputFile = "NULL"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + bool usePUweights = false; + if(Options.existsAs("usePUweights")) + usePUweights = Options.getParameter("usePUweights"); + + cout <<" Basic Configuration " <GetNbinsX()+1; ibin++){ + w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 + } + weightsFile.Close(); + + //histos to get the bin in phi given the electron phi + TH1F* hPhiBinEB = new TH1F("hphiEB","hphiEB",nPhiBinsEB, -1.*TMath::Pi(),1.*TMath::Pi()); + TH1F* hPhiBinEE = new TH1F("hphiEE","hphiEE",nPhiBinsEE, -1.*TMath::Pi(),1.*TMath::Pi()); + + //----- NTUPLES-------------------- + TChain *ntu_DA = new TChain(TreeName.c_str()); + TChain *ntu_MC = new TChain(TreeName.c_str()); + + if(!FillChain(*ntu_DA, infileDATA.c_str())) return 1; + if(!FillChain(*ntu_MC, infileMC.c_str())) return 1; + + std::cout << " DATA: " << ntu_DA->GetEntries() << " entries in Data sample" << std::endl; + std::cout << " MC : " << ntu_MC->GetEntries() << " entries in MC sample" << std::endl; + + // observables + int isW; + float mZ; + float scEta, scPhi; + float scEta2, scPhi2; + float eleEta, elePhi; + float eleEta2, elePhi2; + float scEne, scEneReg, scEt, scERaw, e3x3, R9; + float scEne2, scEneReg2, scEt2, scERaw2, e3x32, R92; + float charge, charge2; + float pTK,pTK2; + int iphiSeed, ele1_ix, ele1_iy, ele1_iz; + int iphiSeed2, ele2_ix, ele2_iy, ele2_iz; + int npu; + + // Set branch addresses for Data + ntu_DA->SetBranchStatus("*",0); + ntu_DA->SetBranchStatus("isW", 1); ntu_DA->SetBranchAddress("isW", &isW); + ntu_DA->SetBranchStatus("ele1_eta", 1); ntu_DA->SetBranchAddress("ele1_eta", &eleEta); + ntu_DA->SetBranchStatus("ele2_eta", 1); ntu_DA->SetBranchAddress("ele2_eta", &eleEta2); + ntu_DA->SetBranchStatus("ele1_phi", 1); ntu_DA->SetBranchAddress("ele1_phi", &elePhi); + ntu_DA->SetBranchStatus("ele2_phi", 1); ntu_DA->SetBranchAddress("ele2_phi", &elePhi2); + ntu_DA->SetBranchStatus("ele1_scEta", 1); ntu_DA->SetBranchAddress("ele1_scEta", &scEta); + ntu_DA->SetBranchStatus("ele2_scEta", 1); ntu_DA->SetBranchAddress("ele2_scEta", &scEta2); + ntu_DA->SetBranchStatus("ele1_scPhi", 1); ntu_DA->SetBranchAddress("ele1_scPhi", &scPhi); + ntu_DA->SetBranchStatus("ele2_scPhi", 1); ntu_DA->SetBranchAddress("ele2_scPhi", &scPhi2); + ntu_DA->SetBranchStatus("ele1_scE", 1); ntu_DA->SetBranchAddress("ele1_scE", &scEne); + ntu_DA->SetBranchStatus("ele2_scE", 1); ntu_DA->SetBranchAddress("ele2_scE", &scEne2); + ntu_DA->SetBranchStatus("ele1_scE_regression", 1); ntu_DA->SetBranchAddress("ele1_scE_regression", &scEneReg); + ntu_DA->SetBranchStatus("ele2_scE_regression", 1); ntu_DA->SetBranchAddress("ele2_scE_regression", &scEneReg2); + ntu_DA->SetBranchStatus("ele1_scEt", 1); ntu_DA->SetBranchAddress("ele1_scEt",&scEt); + ntu_DA->SetBranchStatus("ele2_scEt", 1); ntu_DA->SetBranchAddress("ele2_scEt",&scEt2); + ntu_DA->SetBranchStatus("ele1_scERaw", 1); ntu_DA->SetBranchAddress("ele1_scERaw", &scERaw); + ntu_DA->SetBranchStatus("ele2_scERaw", 1); ntu_DA->SetBranchAddress("ele2_scERaw", &scERaw2); + ntu_DA->SetBranchStatus("ele1_e3x3", 1); ntu_DA->SetBranchAddress("ele1_e3x3", &e3x3); + ntu_DA->SetBranchStatus("ele2_e3x3", 1); ntu_DA->SetBranchAddress("ele2_e3x3", &e3x32); + ntu_DA->SetBranchStatus("ele1ele2_scM", 1); ntu_DA->SetBranchAddress("ele1ele2_scM", &mZ); + ntu_DA->SetBranchStatus("ele1_charge", 1); ntu_DA->SetBranchAddress("ele1_charge", &charge); + ntu_DA->SetBranchStatus("ele2_charge", 1); ntu_DA->SetBranchAddress("ele2_charge", &charge2); + ntu_DA->SetBranchStatus("ele1_tkP", 1); ntu_DA->SetBranchAddress("ele1_tkP", &pTK); + ntu_DA->SetBranchStatus("ele2_tkP", 1); ntu_DA->SetBranchAddress("ele2_tkP", &pTK2); + ntu_DA->SetBranchStatus("ele1_seedIphi", 1); ntu_DA->SetBranchAddress("ele1_seedIphi", &iphiSeed); + ntu_DA->SetBranchStatus("ele2_seedIphi", 1); ntu_DA->SetBranchAddress("ele2_seedIphi", &iphiSeed2); + ntu_DA->SetBranchStatus("ele1_seedIx", 1); ntu_DA->SetBranchAddress("ele1_seedIx", &ele1_ix); + ntu_DA->SetBranchStatus("ele2_seedIx", 1); ntu_DA->SetBranchAddress("ele2_seedIx", &ele2_ix); + ntu_DA->SetBranchStatus("ele1_seedIy", 1); ntu_DA->SetBranchAddress("ele1_seedIy", &ele1_iy); + ntu_DA->SetBranchStatus("ele2_seedIy", 1); ntu_DA->SetBranchAddress("ele2_seedIy", &ele2_iy); + ntu_DA->SetBranchStatus("ele1_seedZside", 1); ntu_DA->SetBranchAddress("ele1_seedZside", &ele1_iz); + ntu_DA->SetBranchStatus("ele2_seedZside", 1); ntu_DA->SetBranchAddress("ele2_seedZside", &ele2_iz); + + + // Set branch addresses for MC + ntu_MC->SetBranchStatus("*",0); + ntu_MC->SetBranchStatus("isW", 1); ntu_MC->SetBranchAddress("isW", &isW); + ntu_MC->SetBranchStatus("ele1_eta", 1); ntu_MC->SetBranchAddress("ele1_eta", &eleEta); + ntu_MC->SetBranchStatus("ele2_eta", 1); ntu_MC->SetBranchAddress("ele2_eta", &eleEta2); + ntu_MC->SetBranchStatus("ele1_phi", 1); ntu_MC->SetBranchAddress("ele1_phi", &elePhi); + ntu_MC->SetBranchStatus("ele2_phi", 1); ntu_MC->SetBranchAddress("ele2_phi", &elePhi2); + ntu_MC->SetBranchStatus("ele1_scEta", 1); ntu_MC->SetBranchAddress("ele1_scEta", &scEta); + ntu_MC->SetBranchStatus("ele2_scEta", 1); ntu_MC->SetBranchAddress("ele2_scEta", &scEta2); + ntu_MC->SetBranchStatus("ele1_scPhi", 1); ntu_MC->SetBranchAddress("ele1_scPhi", &scPhi); + ntu_MC->SetBranchStatus("ele2_scPhi", 1); ntu_MC->SetBranchAddress("ele2_scPhi", &scPhi2); + ntu_MC->SetBranchStatus("ele1_scE", 1); ntu_MC->SetBranchAddress("ele1_scE", &scEne); + ntu_MC->SetBranchStatus("ele2_scE", 1); ntu_MC->SetBranchAddress("ele2_scE", &scEne2); + ntu_MC->SetBranchStatus("ele1_scE_regression", 1); ntu_MC->SetBranchAddress("ele1_scE_regression", &scEneReg); + ntu_MC->SetBranchStatus("ele2_scE_regression", 1); ntu_MC->SetBranchAddress("ele2_scE_regression", &scEneReg2); + ntu_MC->SetBranchStatus("ele1_scEt", 1); ntu_MC->SetBranchAddress("ele1_scEt",&scEt); + ntu_MC->SetBranchStatus("ele2_scEt", 1); ntu_MC->SetBranchAddress("ele2_scEt",&scEt2); + ntu_MC->SetBranchStatus("ele1_scERaw", 1); ntu_MC->SetBranchAddress("ele1_scERaw", &scERaw); + ntu_MC->SetBranchStatus("ele2_scERaw", 1); ntu_MC->SetBranchAddress("ele2_scERaw", &scERaw2); + ntu_MC->SetBranchStatus("ele1_e3x3", 1); ntu_MC->SetBranchAddress("ele1_e3x3", &e3x3); + ntu_MC->SetBranchStatus("ele2_e3x3", 1); ntu_MC->SetBranchAddress("ele2_e3x3", &e3x32); + ntu_MC->SetBranchStatus("ele1ele2_scM", 1); ntu_MC->SetBranchAddress("ele1ele2_scM", &mZ); + ntu_MC->SetBranchStatus("ele1_charge", 1); ntu_MC->SetBranchAddress("ele1_charge", &charge); + ntu_MC->SetBranchStatus("ele2_charge", 1); ntu_MC->SetBranchAddress("ele2_charge", &charge2); + ntu_MC->SetBranchStatus("ele1_tkP", 1); ntu_MC->SetBranchAddress("ele1_tkP", &pTK); + ntu_MC->SetBranchStatus("ele2_tkP", 1); ntu_MC->SetBranchAddress("ele2_tkP", &pTK2); + ntu_MC->SetBranchStatus("ele1_seedIphi", 1); ntu_MC->SetBranchAddress("ele1_seedIphi", &iphiSeed); + ntu_MC->SetBranchStatus("ele2_seedIphi", 1); ntu_MC->SetBranchAddress("ele2_seedIphi", &iphiSeed2); + ntu_MC->SetBranchStatus("ele1_seedIx", 1); ntu_MC->SetBranchAddress("ele1_seedIx", &ele1_ix); + ntu_MC->SetBranchStatus("ele2_seedIx", 1); ntu_MC->SetBranchAddress("ele2_seedIx", &ele2_ix); + ntu_MC->SetBranchStatus("ele1_seedIy", 1); ntu_MC->SetBranchAddress("ele1_seedIy", &ele1_iy); + ntu_MC->SetBranchStatus("ele2_seedIy", 1); ntu_MC->SetBranchAddress("ele2_seedIy", &ele2_iy); + ntu_MC->SetBranchStatus("ele1_seedZside", 1); ntu_MC->SetBranchAddress("ele1_seedZside", &ele1_iz); + ntu_MC->SetBranchStatus("ele2_seedZside", 1); ntu_MC->SetBranchAddress("ele2_seedZside", &ele2_iz); + if(usePUweights) + { + ntu_MC->SetBranchStatus("PUit_NumInteractions", 1); ntu_MC->SetBranchAddress("PUit_NumInteractions", &npu); + } + + + + // histogram definition in EB and fit functions + std::vector > h_Phi_EB(nPhiBinsEB); // used to map iEta (as defined for Barrel and Endcap geom) into eta + std::vector > h_EoP_EB(nPhiBinsEB); + std::vector > h_EoC_EB(nPhiBinsEB); + std::vector > f_EoP_EB(nPhiBinsEB); + std::vector > f_EoC_EB(nPhiBinsEB); + + // histogram definition in EE and fit functions + std::vector > h_Phi_EE(nPhiBinsEE); // used to map iEta (as defined for Barrel and Endcap geom) into eta + std::vector > h_EoP_EE(nPhiBinsEE); + std::vector > h_EoC_EE(nPhiBinsEE); + std::vector > f_EoP_EE(nPhiBinsEE); + std::vector > f_EoC_EE(nPhiBinsEE); + + + + // Initializate histos in EB + std::cout << ">>> Initialize EB histos" << std::endl; + for(int i = 0; i < nPhiBinsEB; ++i) + { + for(int j = 0; j < nRegionsEB; ++j) + { + TString histoName; + histoName= Form("EB_EoP_%d_%d", i,j); + TH1F* temp = new TH1F (histoName, histoName, 2200, 0.2, 1.6); + temp->Sumw2(); + temp->SetFillColor(kRed+2); + temp->SetLineColor(kRed+2); + temp->SetFillStyle(3004); + (h_EoP_EB.at(i)).push_back(temp); + + histoName=Form("EB_EoC_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 2200, 0.2, 1.6); + temp->Sumw2(); + temp->SetFillColor(kGreen+2); + temp->SetLineColor(kGreen+2); + temp->SetFillStyle(3004); + (h_EoC_EB.at(i)).push_back(temp); + + histoName=Form("EB_Phi_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 360, 0., 360.); + (h_Phi_EB.at(i)).push_back(temp); + } + } + + // Initializate histos in EE + std::cout << ">>> Initialize EE histos" << std::endl; + for(int i = 0; i < nPhiBinsEE; ++i) + { + for(int j = 0; j < nRegionsEE; ++j) + { + TString histoName; + histoName= Form("EE_EoP_%d_%d", i,j); + TH1F* temp = new TH1F (histoName, histoName, 2200, 0., 2.); + temp->Sumw2(); + temp->SetFillColor(kRed+2); + temp->SetLineColor(kRed+2); + temp->SetFillStyle(3004); + (h_EoP_EE.at(i)).push_back(temp); + + histoName=Form("EE_EoC_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 2200, 0., 2.); + temp->Sumw2(); + temp->SetFillColor(kGreen+2); + temp->SetLineColor(kGreen+2); + temp->SetFillStyle(3004); + (h_EoC_EE.at(i)).push_back(temp); + + histoName=Form("EE_Phi_%d_%d", i,j); + temp = new TH1F(histoName, histoName, 360, 0., 360.); + (h_Phi_EE.at(i)).push_back(temp); + } + } + + + + // Template in EE and EB + std::vector > h_template_EB(nPhiBinsTempEB); + std::vector > h_template_EE(nPhiBinsTempEE); + + std::cout << ">>> Initialize EB template" << std::endl; + for(int mod = 0; mod < nPhiBinsTempEB; ++mod) + { + for(int j = 0; j < nRegionsEB; ++j) + { + TString histoName; + histoName=Form("EB_template_%d_%d",mod,j); + TH1F* temp = new TH1F(histoName,"",2200,0.2,1.6); + (h_template_EB.at(mod)).push_back(temp); + } + } + + std::cout << ">>> Initialize EE template" << std::endl; + for(int mod = 0; mod < nPhiBinsTempEE; ++mod) + { + for(int j = 0; j < nRegionsEE; ++j) + { + TString histoName; + histoName=Form("EE_template_%d_%d",mod,j); + TH1F* temp = new TH1F(histoName,"",2200,0.,2.); + (h_template_EE.at(mod)).push_back(temp); + } + } + + + TH1F** h_phi_data_EB = new TH1F*[nRegionsEB]; + TH1F** h_phi_mc_EB = new TH1F*[nRegionsEB]; + TH1F** h_phi_data_EE = new TH1F*[nRegionsEE]; + TH1F** h_phi_mc_EE = new TH1F*[nRegionsEE]; + + for(int index = 0; index < nRegionsEB; ++index) + { + TString name; + name=Form("EB_h_phi_data_%d",index); + h_phi_data_EB[index]= new TH1F(name,"h_phi_data",100,-TMath::Pi(),TMath::Pi()); + name=Form("EB_h_phi_mc_%d",index); + h_phi_mc_EB[index]= new TH1F(name,"h_phi_mc",100,-TMath::Pi(),TMath::Pi()); + } + + for(int index = 0; index < nRegionsEE; ++index) + { + TString name; + name=Form("EE_h_phi_data_%d",index); + h_phi_data_EE[index] = new TH1F(name,"h_phi_data",100,-TMath::Pi(),TMath::Pi()); + name=Form("EE_h_phi_mc_%d",index); + h_phi_mc_EE[index] = new TH1F(name,"h_phi_mc",100,-TMath::Pi(),TMath::Pi()); + } + + TH1F* h_et_data = new TH1F("h_et_data","h_et_data",100,0.,100.); + TH1F* h_et_mc = new TH1F("h_et_mc", "h_et_mc", 100,0.,100.); + + + + // Initialize endcap geometry + TEndcapRings *eRings = new TEndcapRings(); + + // Map for conversion (ix,iy) into Eta for EE + TH2F * mapConversionEEp = new TH2F ("mapConversionEEp","mapConversionEEp",101,1,101,101,1,101); + TH2F * mapConversionEEm = new TH2F ("mapConversionEEm","mapConversionEEm",101,1,101,101,1,101); + + for(int ix =0; ixGetNbinsX(); ix++) + for(int iy =0; iyGetNbinsY(); iy++) + { + mapConversionEEp->SetBinContent(ix+1,iy+1,0); + mapConversionEEm->SetBinContent(ix+1,iy+1,0); + } + + + + // fill MC templates + std::vector refIdEB; + refIdEB.assign(nPhiBinsEB,0); + + std::vector refIdEE; + refIdEE.assign(nPhiBinsEE,0); + + for(int iphi = 0; iphi < nPhiBinsEB; ++iphi) + { + float phi = hPhiBinEB->GetBinCenter(iphi+1); + + phi = 2.*TMath::Pi() + phi + TMath::Pi()*10./180.; + phi -= int(phi/2./TMath::Pi()) * 2.*TMath::Pi(); + + int modPhi = int(phi/(2.*TMath::Pi()/nPhiBinsTempEB)); + if( modPhi == nPhiBinsTempEB ) modPhi = 0; + refIdEB.at(iphi) = modPhi; + } + + for(int iphi = 0; iphi < nPhiBinsEE; ++iphi) + { + float phi = hPhiBinEE->GetBinCenter(iphi+1); + + phi = 2.*TMath::Pi() + phi + TMath::Pi()*10./180.; + phi -= int(phi/2./TMath::Pi()) * 2.*TMath::Pi(); + + int modPhi = int(phi/(2.*TMath::Pi()/nPhiBinsTempEE)); + if( modPhi == nPhiBinsTempEE ) modPhi = 0; + refIdEE.at(iphi) = modPhi; + } + + + + + + + //**************************** loop on MC, make refernce and fit dist + + float var = 0.; + std::cout << "Loop in MC events " << endl; + for(int entry = 0; entry < ntu_MC->GetEntries(); ++entry) + { + if( entry%10000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + //if( entry > 1000 ) break; + + ntu_MC->GetEntry(entry); + + if( isW == 1 ) continue; + if( fabs(scEta) > etaMax ) continue; + if( fabs(scEta2) > eta2Max ) continue; + if( scEt < 20. ) continue; + if( scEt2 < 20. ) continue; + + R9 = e3x3 / scERaw; + R92 = e3x32 / scERaw2; + + + //--- PU weights + float ww = 1.; + if( usePUweights ) ww *= w[npu]; + + + + //--- set the mass for ele1 + var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // MC - BARREL - ele1 + if( ele1_iz == 0 ) + { + // fill MC templates + int modPhi = int(iphiSeed/(360./nPhiBinsTempEB)); + if( modPhi == nPhiBinsTempEB ) modPhi = 0; + + int regionId = templIndexEB(typeEB,eleEta,charge,R9); + if( regionId == -1 ) continue; + + (h_template_EB.at(modPhi)).at(regionId) -> Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1; + if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; + + (h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EB[regionId] -> Fill(scPhi,ww); + } + + // MC - ENDCAP - ele1 + else + { + int iphi = eRings->GetEndcapIphi(ele1_ix,ele1_iy,ele1_iz); + + if( ele1_iz == 1 )mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta); + if( ele1_iz == -1 )mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta); + + + // fill MC templates + int modPhi = int (iphi/(360./nPhiBinsTempEE)); + if( modPhi == nPhiBinsTempEE ) modPhi = 0; + + int regionId = templIndexEE(typeEE,eleEta,charge,R9); + if( regionId == -1 ) continue; + + (h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1; + if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; + + (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EE[regionId] -> Fill(scPhi,ww); + } + + + + //--- set the mass for ele2 + var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // MC - BARREL - ele2 + if( ele2_iz == 0) + { + // fill MC templates + int modPhi = int (iphiSeed2/(360./nPhiBinsTempEB)); + if( modPhi == nPhiBinsTempEB ) modPhi = 0; + + int regionId = templIndexEB(typeEB,eleEta2,charge2,R92); + if(regionId == -1) continue; + + (h_template_EB.at(modPhi)).at(regionId)->Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1; + if( PhibinEB==nPhiBinsEB ) PhibinEB = 0; + + (h_EoP_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EB[regionId]->Fill(scPhi2,ww); + } + + // MC - ENDCAP - ele2 + else + { + if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2); + if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2); + + int iphi = eRings->GetEndcapIphi(ele2_ix,ele2_iy,ele2_iz); + + + // fill MC templates + int modPhi = int (iphi/(360./nPhiBinsTempEE)); + if( modPhi == nPhiBinsTempEE ) modPhi = 0; + + int regionId = templIndexEE(typeEE,eleEta2,charge2,R92); + if(regionId == -1) continue; + + (h_template_EE.at(modPhi)).at(regionId) -> Fill(var*var,ww); + + + // fill MC histos in eta bins + int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1; + if(PhibinEE==nPhiBinsEE) PhibinEE = 0; + + (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is MC + h_phi_mc_EE[regionId]->Fill(scPhi2,ww); + } + + h_et_mc ->Fill(scEt, ww); + h_et_mc ->Fill(scEt2,ww); + } + + + + + + + //**************************** loop on DATA + + std::cout << "Loop in Data events " << endl; + + for(int entry = 0; entry < ntu_DA->GetEntries(); ++entry) + { + if( entry%10000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + + ntu_DA->GetEntry(entry); + + if( isW == 1 ) continue; + if( fabs(scEta) > etaMax ) continue; + if( fabs(scEta2) > eta2Max ) continue; + if( scEt < 20. ) continue; + if( scEt2 < 20. ) continue; + + R9 = e3x3 / scERaw; + R92 = e3x32 / scERaw2; + + float ww = 1.; + + + + //--- set the mass for ele1 + if( ele1_iz == 0 ) var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; + else var = ( mZ * sqrt(pTK/scEne) * sqrt(scEneReg2/scEne2) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // DATA - BARREL - ele1 + if( ele1_iz == 0 ) + { + int PhibinEB = hPhiBinEB->FindBin(elePhi) - 1; + if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; + + int regionId = templIndexEB(typeEB,eleEta,charge,R9); + if(regionId == -1) continue; + + (h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi); + h_phi_data_EB[regionId]->Fill(elePhi); + } + + // DATA - ENDCAP - ele1 + else + { + if( ele1_iz == 1 ) mapConversionEEp -> SetBinContent(ele1_ix,ele1_iy,scEta); + if( ele1_iz == -1 ) mapConversionEEm -> SetBinContent(ele1_ix,ele1_iy,scEta); + + int PhibinEE = hPhiBinEE->FindBin(elePhi) - 1; + if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; + + int regionId = templIndexEE(typeEE,eleEta,charge,R9); + if( regionId == -1 ) continue; + + (h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi); + h_phi_data_EE[regionId] -> Fill(elePhi); + } + + + + //--- set the mass for ele2 + if( ele2_iz == 0 ) var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; + else var = ( mZ * sqrt(pTK2/scEne2) * sqrt(scEneReg/scEne) ) / 91.19; + // simulate e+/e- asymmetry + //if( charge2 > 0 ) ww *= 1.*(6/5); + //else ww *= 1.*(4/5); + + // DATA - BARREL - ele2 + if( ele2_iz == 0 ) + { + int PhibinEB = hPhiBinEB->FindBin(elePhi2) - 1; + if( PhibinEB == nPhiBinsEB ) PhibinEB = 0; + + int regionId = templIndexEB(typeEB,eleEta2,charge2,R92); + if( regionId == -1 ) continue; + + (h_EoC_EB.at(PhibinEB)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(elePhi2); + h_phi_data_EB[regionId] -> Fill(elePhi2); + } + else + { + if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(ele2_ix,ele2_iy,scEta2); + if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(ele2_ix,ele2_iy,scEta2); + + int PhibinEE = hPhiBinEE->FindBin(elePhi2) - 1; + if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; + + int regionId = templIndexEE(typeEE,eleEta2,charge2,R92); + if( regionId == -1 ) continue; + + (h_EoC_EE.at(PhibinEE)).at(regionId) -> Fill(var*var,ww); // This is DATA + (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(elePhi2); + h_phi_data_EE[regionId] ->Fill(elePhi2); + } + + h_et_data ->Fill(scEt); + h_et_data ->Fill(scEt2); + } + + std::cout << "End loop: Analyze events " << endl; + + + + + + + //---------------- + // Initializations + + // initialize TGraphs + TFile* o = new TFile((outputFile+"_"+typeEB+"_"+typeEE+".root").c_str(),"RECREATE"); + + TGraphErrors** g_EoP_EB = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_EoC_EB = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_Rat_EB = new TGraphErrors*[nRegionsEB]; + + for(int j = 0; j < nRegionsEB; ++j) + { + g_EoP_EB[j] = new TGraphErrors(); + g_EoC_EB[j] = new TGraphErrors(); + g_Rat_EB[j] = new TGraphErrors(); + } + + TGraphErrors** g_EoP_EE = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_EoC_EE = new TGraphErrors*[nRegionsEB]; + TGraphErrors** g_Rat_EE = new TGraphErrors*[nRegionsEB]; + + for(int j = 0; j < nRegionsEE; ++j) + { + g_EoP_EE[j]= new TGraphErrors(); + g_EoC_EE[j]= new TGraphErrors(); + g_Rat_EE[j]= new TGraphErrors(); + } + + // initialize template functions + std::vector > templateHistoFuncEB(nPhiBinsTempEB); + std::vector > templateHistoFuncEE(nPhiBinsTempEE); + + for(int mod = 0; mod < nPhiBinsTempEB; ++mod) + { + for(int j = 0; j < nRegionsEB; ++j) + { + (h_template_EB.at(mod)).at(j) -> Rebin(rebinEB); + (templateHistoFuncEB.at(mod)).push_back( new histoFunc((h_template_EB.at(mod)).at(j)) ); + } + } + + for(int mod = 0; mod < nPhiBinsTempEE; ++mod) + { + for(int j = 0; j < nRegionsEE; ++j) + { + (h_template_EE.at(mod)).at(j) -> Rebin(rebinEE); + (templateHistoFuncEE.at(mod)).push_back( new histoFunc((h_template_EE.at(mod)).at(j)) ); + } + } + + + + + + + //------------------- + // Template Fit in EB + + if( typeEB != "none" ) + { + for(int i = 0; i < nPhiBinsEB; ++i) + { + for(int j = 0; j < nRegionsEB; ++j) + { + float flPhi = hPhiBinEB->GetXaxis()->GetBinCenter(i+1); + + (h_EoP_EB.at(i)).at(j) -> Rebin(rebinEB); + (h_EoC_EB.at(i)).at(j) -> Rebin(rebinEB); + + + // define the fitting function + // N.B. [0] * ( [1] * f( [1]*(x-[2]) ) ) + char funcName[50]; + sprintf(funcName,"f_EoP_%d_%d_Ref_%d_%d_EB",i,j,refIdEB.at(i),j); + (f_EoP_EB.at(i)).push_back( new TF1(funcName, (templateHistoFuncEB.at(refIdEB.at(i))).at(j), 0.85, 1.1, 3, "histoFunc") ); + + (f_EoP_EB.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoP_EB.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoP_EB.at(i)).at(j) -> SetLineWidth(1); + (f_EoP_EB.at(i)).at(j) -> SetLineColor(kRed+2); + (f_EoP_EB.at(i)).at(j) -> SetNpx(10000); + + (h_EoP_EB.at(i)).at(j) -> Scale(1*(h_EoC_EB.at(i)).at(j)->GetEntries()/(h_EoP_EB.at(i)).at(j)->GetEntries()); + + // uncorrected + double xNorm = (h_EoP_EB.at(i)).at(j)->Integral()/(h_template_EB.at(refIdEB.at(i))).at(j)->Integral() * + (h_EoP_EB.at(i)).at(j)->GetBinWidth(1)/(h_template_EB.at(refIdEB.at(i))).at(j)->GetBinWidth(1); + + + (f_EoP_EB.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoP_EB.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting MC EB " << flPhi << " (" << i << "," << j << "): "; + TFitResultPtr rp; + int fStatus; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoP_EB.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoP_EB.at(i)).at(j) -> Fit(funcName, "QRWL+"); + fStatus = rp; + if(fStatus !=4 && (f_EoP_EB.at(i)).at(j)->GetParError(1) != 0. ) + { + std::cout << "fit OK "; + + double k = (f_EoP_EB.at(i)).at(j)->GetParameter(1); + double eee = (f_EoP_EB.at(i)).at(j)->GetParError(1); + g_EoP_EB[j] -> SetPoint(i, flPhi, 1./k); + g_EoP_EB[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + std::cout << "fit BAD "; + + g_EoP_EB[j] -> SetPoint(i, flPhi, 1.); + g_EoP_EB[j] -> SetPointError(i, 0., 0.01); + } + } + + + //ratio preparation + float rat = (f_EoP_EB.at(i)).at(j)->GetParameter(1); + float era = (f_EoP_EB.at(i)).at(j)->GetParError(1); + + xNorm = (h_EoC_EB.at(i)).at(j)->Integral()/(h_template_EB.at(refIdEB.at(i))).at(j)->Integral() * + (h_EoC_EB.at(i)).at(j)->GetBinWidth(1)/(h_template_EB.at(refIdEB.at(i))).at(j)->GetBinWidth(1); + + sprintf(funcName,"f_EoC_%d_%d_Ref_%d_%d_EB",i,j,refIdEB.at(i),i); + + (f_EoC_EB.at(i)).push_back( new TF1(funcName, (templateHistoFuncEB.at(refIdEB.at(i))).at(j), 0.85, 1.1, 3, "histoFunc") ); + + (f_EoC_EB.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoC_EB.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoC_EB.at(i)).at(j) -> SetLineWidth(1); + (f_EoC_EB.at(i)).at(j) -> SetLineColor(kGreen+2); + (f_EoC_EB.at(i)).at(j) -> SetNpx(10000); + + (f_EoC_EB.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoC_EB.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting DATA EB (" << i << "," << j << "): "; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoC_EB.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoC_EB.at(i)).at(j) -> Fit(funcName, "QR+"); + fStatus = rp; + if( fStatus !=4 && (f_EoC_EB.at(i)).at(j)->GetParError(1) != 0 ) + { + std::cout << "fit OK "; + + double k = (f_EoC_EB.at(i)).at(j)->GetParameter(1); + double eee = (f_EoC_EB.at(i)).at(j)->GetParError(1); + g_EoC_EB[j] -> SetPoint(i, flPhi, 1./k); + g_EoC_EB[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + std::cout << "fit BAD "; + + g_EoC_EB[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EB[j] -> SetPointError(i, 0., 0.01); + } + } + + + //ratio finalization + rat /= (f_EoC_EB.at(i)).at(j)->GetParameter(1); + era = rat*sqrt(era*era+(f_EoC_EB.at(i)).at(j)->GetParError(1)*(f_EoC_EB.at(i)).at(j)->GetParError(1)); + + if(i==0) g_Rat_EB[j] -> SetPoint(i, 0., rat); + else g_Rat_EB[j] -> SetPoint(i, flPhi, rat); + + g_Rat_EB[j] -> SetPointError(i, 0. , era); + g_Rat_EB[j]->SetLineColor(kBlue+2); + + std::cout << std::endl; + } + } + } + else + { + for(int i = 0; i < nPhiBinsEB; ++i) + { + for(int j = 0; j < nRegionsEB; ++j) + { + float flPhi = hPhiBinEB->GetXaxis()->GetBinCenter(i+1); + g_EoP_EB[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EB[j] -> SetPoint(i, flPhi, 1.); + g_Rat_EB[j] -> SetPoint(i, flPhi, 1.); + } + } + } + + + + + + + //------------------- + // Template Fit in EE + + if( typeEE != "none" ) + { + for(int i = 0; i < nPhiBinsEE; ++i) + { + for(int j = 0; j < nRegionsEE; ++j) + { + float flPhi = hPhiBinEE->GetXaxis()->GetBinCenter(i); + + (h_EoP_EE.at(i)).at(j) -> Rebin(rebinEE); + (h_EoC_EE.at(i)).at(j) -> Rebin(rebinEE); + + + // define the fitting function + // N.B. [0] * ( [1] * f( [1]*(x-[2]) ) ) + + char funcName[50]; + sprintf(funcName,"f_EoP_%d_%d_Ref_%d_%d_EE",i,j,refIdEE.at(i),j); + (f_EoP_EE.at(i)).push_back( new TF1(funcName, (templateHistoFuncEE.at(refIdEE.at(i))).at(j), 0.7, 1.1, 3, "histoFunc") ); + + (f_EoP_EE.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoP_EE.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoP_EE.at(i)).at(j) -> SetLineWidth(1); + (f_EoP_EE.at(i)).at(j) -> SetLineColor(kRed+2); + (f_EoP_EE.at(i)).at(j) -> SetNpx(10000); + (f_EoP_EE.at(i)).at(j) -> SetNpx(10000); + + (h_EoP_EE.at(i)).at(j) -> Scale(1*(h_EoC_EE.at(i)).at(j)->GetEntries()/(h_EoP_EE.at(i)).at(j)->GetEntries()); + + // uncorrected + double xNorm = (h_EoP_EE.at(i)).at(j)->Integral()/(h_template_EE.at(refIdEE.at(i))).at(j)->Integral() * + (h_EoP_EE.at(i)).at(j)->GetBinWidth(1)/(h_template_EE.at(refIdEE.at(i))).at(j)->GetBinWidth(1); + + (f_EoP_EE.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoP_EE.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting MC EE " << flPhi << " (" << i << "," << j << "): "; + TFitResultPtr rp; + int fStatus; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoP_EE.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoP_EE.at(i)).at(j) -> Fit(funcName, "QRWL+"); + fStatus = rp; + + if( fStatus !=4 && (f_EoP_EE.at(i)).at(j)->GetParError(1) != 0. ) + { + std::cout << "fit OK "; + + double k = (f_EoP_EE.at(i)).at(j)->GetParameter(1); + double eee = (f_EoP_EE.at(i)).at(j)->GetParError(1); + g_EoP_EE[j] -> SetPoint(i, flPhi, 1./k); + g_EoP_EE[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + std::cout << "fit BAD "; + + g_EoP_EE[j] -> SetPoint(i, flPhi, 1.); + g_EoP_EE[j] -> SetPointError(i, 0., 0.03); + } + } + + //ratio preparation + float rat = (f_EoP_EE.at(i)).at(j)->GetParameter(1); + float era = (f_EoP_EE.at(i)).at(j)->GetParError(1); + + // corrected + xNorm = (h_EoC_EE.at(i)).at(j)->Integral()/(h_template_EE.at(refIdEE.at(i))).at(j)->Integral() * + (h_EoC_EE.at(i)).at(j)->GetBinWidth(1)/(h_template_EE.at(refIdEE.at(i))).at(j)->GetBinWidth(1); + + sprintf(funcName,"f_EoC_%d_%d_Ref_%d_%d_EE",i,j,refIdEE.at(i),j); + (f_EoC_EE.at(i)).push_back( new TF1(funcName, (templateHistoFuncEE.at(refIdEE.at(i))).at(j), 0.7, 1.1, 3, "histoFunc") ); + + (f_EoC_EE.at(i)).at(j) -> SetParName(0,"Norm"); + (f_EoC_EE.at(i)).at(j) -> SetParName(1,"Scale factor"); + + (f_EoC_EE.at(i)).at(j) -> SetLineWidth(1); + (f_EoC_EE.at(i)).at(j) -> SetLineColor(kGreen+2); + (f_EoC_EE.at(i)).at(j) -> SetNpx(10000); + + (f_EoC_EE.at(i)).at(j) -> FixParameter(0, xNorm); + (f_EoC_EE.at(i)).at(j) -> FixParameter(2, 0.); + + + std::cout << "***** Fitting DATA EE " << flPhi << " (" << i << "," << j << "): "; + for(int trial = 0; trial < 10; ++trial) + { + (f_EoC_EE.at(i)).at(j) -> SetParameter(1, 0.99); + rp = (h_EoC_EE.at(i)).at(j) -> Fit(funcName, "QR+"); + if( fStatus !=4 && (f_EoC_EE.at(i)).at(j)->GetParError(1) != 0. ) + { + std::cout << "fit OK "; + + double k = (f_EoC_EE.at(i)).at(j)->GetParameter(1); + double eee = (f_EoC_EE.at(i)).at(j)->GetParError(1); + g_EoC_EE[j] -> SetPoint(i, flPhi, 1./k); + g_EoC_EE[j] -> SetPointError(i, 0., eee/k/k); + + break; + } + else if( trial == 9 ) + { + g_EoC_EE[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EE[j] -> SetPointError(i, 0., 0.03); + } + } + + + //ratio finalization + rat /= (f_EoC_EE.at(i)).at(j)->GetParameter(1); + era = rat*sqrt(era*era+(f_EoC_EE.at(i)).at(j)->GetParError(1)*(f_EoC_EE.at(i)).at(j)->GetParError(1)); + + g_Rat_EE[j] -> SetPoint(i, flPhi, rat); + g_Rat_EE[j] -> SetPointError(i, 0. , era); + + g_Rat_EE[j]->SetLineColor(kBlue+2); + } + + std::cout << std::endl; + } + } + else + { + for(int i = 0; i < nPhiBinsEE; ++i) + { + for(int j = 0; j < nRegionsEE; ++j) + { + float flPhi = hPhiBinEE->GetXaxis()->GetBinCenter(i+1); + g_EoP_EE[j] -> SetPoint(i, flPhi, 1.); + g_EoC_EE[j] -> SetPoint(i, flPhi, 1.); + g_Rat_EE[j] -> SetPoint(i, flPhi, 1.); + } + } + } + + + + + + + //------- + // Output + + o -> cd(); + + for(int j = 0; j < nRegionsEB; ++j) + { + TString Name; + //Name = Form("g_EoP_EB_%d",j); + //if(g_EoP_EB[j]->GetN()!=0) g_EoP_EB[j] -> Write(Name); + Name = Form("g_EoC_EB_%d",j); + if(g_EoC_EB[j]->GetN()!=0) g_EoC_EB[j] -> Write(Name); + //Name = Form("g_Rat_EB_%d",j); + //if(g_Rat_EB[j]->GetN()!=0) g_Rat_EB[j] -> Write(Name); + } + + for(int j = 0; j < nRegionsEE; ++j) + { + TString Name; + //Name = Form("g_EoP_EE_%d",j); + //if(g_EoP_EE[j]->GetN()!=0) g_EoP_EE[j] -> Write(Name); + Name = Form("g_EoC_EE_%d",j); + if(g_EoC_EE[j]->GetN()!=0) g_EoC_EE[j] -> Write(Name); + //Name = Form("g_Rat_EE_%d",j); + //if(g_Rat_EE[j]->GetN()!=0) g_Rat_EE[j] -> Write(Name); + } + + for(int mod = 0; mod GetEntries() != 0 ) h_template_EB[mod][j] -> Write(); + } + + for(int mod = 0; mod GetEntries() != 0 ) h_template_EE[mod][j] -> Write(); + } + + for(int i = 0; i GetEntries() != 0 ) (h_EoP_EB.at(i)).at(j) -> Write(); + //if( (h_EoC_EB.at(i)).at(j) -> GetEntries() != 0 ) (h_EoC_EB.at(i)).at(j) -> Write(); + } + + for(int i = 0; i GetEntries() != 0 ) (h_EoP_EE.at(i)).at(j) -> Write(); + //if( (h_EoC_EE.at(i)).at(j) -> GetEntries() != 0 ) (h_EoC_EE.at(i)).at(j) -> Write(); + } + + for(int j =0; j< nRegionsEB; ++j) + { + if( h_phi_mc_EB[j] -> GetEntries() !=0 ) h_phi_mc_EB[j] -> Write(); + if( h_phi_data_EB[j] -> GetEntries() !=0 ) h_phi_data_EB[j] -> Write(); + } + + for(int j =0; j< nRegionsEE; ++j) + { + if( h_phi_mc_EE[j] -> GetEntries() !=0 ) h_phi_mc_EE[j] -> Write(); + if( h_phi_data_EE[j] -> GetEntries() !=0 ) h_phi_data_EE[j] -> Write(); + } + + h_et_mc->Write(); + h_et_data->Write(); + + mapConversionEEp -> Write(); + mapConversionEEm -> Write(); + + o -> Close(); + + + + return 0; +} diff --git a/EOverPCalibration/bin/CalibrationPlots.cpp b/EOverPCalibration/bin/CalibrationPlots.cpp new file mode 100644 index 00000000000..683202442d8 --- /dev/null +++ b/EOverPCalibration/bin/CalibrationPlots.cpp @@ -0,0 +1,854 @@ +/// Standalone program to mormalize IC EB by the mean on a eta ring + skipping xtal near dead channels and TT +/// in the normalization procedure +/// Folded Plots for Spread IC, Statistical Precision and spread +/// Correct IC near cracks and for momentum scale and produce txt IC values + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" + +#include "../interface/TEndcapRings.h" +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/CalibrationUtils.h" +#include "../interface/DrawingUtils.h" +#include "../interface/setTDRStyle.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + + +int main(int argc, char **argv) +{ + //------------------ + // Set style options + + setTDRStyle(); + gStyle->SetPadTopMargin(0.05); + gStyle->SetPadBottomMargin(0.13); + gStyle->SetPadLeftMargin(0.13); + gStyle->SetPadRightMargin(0.17); + gStyle->SetLabelSize(0.04,"XYZ"); + gStyle->SetTitleSize(0.05,"XYZ"); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + + + + //---------------- + // parse cfg file + + if( argc != 2 ) + { + std::cerr << ">>>>> Calibration.cpp::usage: " << argv[0] << " configFileName" << std::endl; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + + + std::string inFileName = "NULL"; + if(Options.existsAs("inFileName")) + inFileName = Options.getParameter("inFileName"); + else{ std::cout<<" Exit from code, no input file"<("is2012Calib")) + is2012Calib = Options.getParameter("is2012Calib"); + + bool isEB = true; + if(Options.existsAs("isEB")) + isEB = Options.getParameter("isEB"); + + std::string outputFolder = "output/"; + if(Options.existsAs("outputFolder")) + outputFolder = Options.getParameter("outputFolder"); + + std::string outputTxt = "IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"; + if(Options.existsAs("outputTxt")) + outputTxt = Options.getParameter("outputTxt"); + + std::string outFileName = "calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"; + if(Options.existsAs("outFileName")) + outFileName = Options.getParameter("outFileName"); + + std::string fileType = "cxx"; + if(Options.existsAs("fileType")) + fileType = Options.getParameter("fileType"); + + int evalStat = true; + if(Options.existsAs("evalStat")) + evalStat = Options.getParameter("evalStat"); + + std::string inFileNameEven="NULL", inFileNameOdd="NULL"; + if( evalStat ) + { + if(Options.existsAs("inFileNameEven")) + inFileNameEven = Options.getParameter("inFileNameEven"); + else{ std::cout<<" Exit from code, no even input file"<("inFileNameOdd")) + inFileNameOdd = Options.getParameter("inFileNameOdd"); + else{ std::cout<<" Exit from code, no odd input file"<>> No input file specified!" << std::endl; + return 1; + } + std::cout << ">>> Making calibration plots for: " << inFileName << std::endl; + + if( evalStat ) + { + if( inFileNameEven.empty() || inFileNameOdd.empty() ) + { + std::cout << ">>> No input files to evaluate statistical precision specified!" << std::endl; + return 1; + } + std::cout << ">>> Evaluating statistical precision from: " << inFileNameEven << std::endl; + std::cout << ">>> Evaluating statistical precision from: " << inFileNameOdd << std::endl; + } + + + + //--------------------- + // endcap ring geometry + + TEndcapRings* eRings = new TEndcapRings(); + TFile* exisistingEEFile = new TFile("CommonTools/existingEE.root","READ"); + TH2F* existingEE = (TH2F*)( exisistingEEFile->Get("endcap") ); + + TFile* MCSystematicFile = new TFile("CommonTools/ResidualForSystematic_EE_MC.root","READ"); + //TGraphErrors* MCSystematic_EEM = (TGraphErrors*)( MCSystematicFile->Get("residual_EEM") ); + TGraphErrors* MCSystematic_EE = (TGraphErrors*)( MCSystematicFile->Get("residual_All") ); + //TGraphErrors* MCSystematic_EEP = (TGraphErrors*)( MCSystematicFile->Get("residual_EEP") ); + + + + //----------------------- + // map for dead TT centre + + std::map > > TT_centre; + if( isEB == true ) + { + std::vector< std::pair > TT_centre_EB; + + if( !is2012Calib ) InitializeDeadTT_EB(TT_centre_EB); + if( is2012Calib ) InitializeDeadTT_EB2012(TT_centre_EB); + + TT_centre[0] = TT_centre_EB; + } + else + { + std::vector< std::pair > TT_centre_EEM; + std::vector< std::pair > TT_centre_EEP; + + if( !is2012Calib ) InitializeDeadTTEEM(TT_centre_EEM); + if( is2012Calib ) InitializeDeadTTEEM2012(TT_centre_EEM); + + if( !is2012Calib ) InitializeDeadTTEEP(TT_centre_EEP); + if( is2012Calib ) InitializeDeadTTEEP2012(TT_centre_EEP); + + TT_centre[-1] = TT_centre_EEM; + TT_centre[1] = TT_centre_EEP; + } + + + + //--------------- + // define outfile + + TCanvas* c1 = new TCanvas(); + c1 -> cd(); + + TFile* outFile = new TFile((outputFolder+"/"+outFileName).c_str(),"RECREATE"); + + + + + + + //-------------------------------------------------------------- + // Build the precision vs ieta plot starting from the TH2F of IC + //-------------------------------------------------------------- + + + + // open files + TFile* inFile = new TFile(inFileName.c_str(),"READ"); + TFile* inFileEven = new TFile(); + TFile* inFileOdd = new TFile(); + if( evalStat ) + { + inFileEven = new TFile(inFileNameEven.c_str(),"READ"); + inFileOdd = new TFile(inFileNameOdd.c_str(),"READ"); + } + + + + // get the IC maps as they come from the algorithm + std::map h2_IC_raw; + std::map h2_IC_raw_phiNorm; + std::map h2_IC_crackCorr; + std::map h2_IC_crackCorr_phiNorm; + + std::map h2_ICEven_raw; + std::map h2_IC_raw_phiNorm_even; + std::map h2_IC_crackCorr_phiNorm_even; + + std::map h2_ICOdd_raw; + std::map h2_IC_raw_phiNorm_odd; + std::map h2_IC_crackCorr_phiNorm_odd; + + if( isEB == true ) + { + h2_IC_raw[0] = (TH2F*)( inFile->Get("h_scale_EB") ); + + h2_IC_raw_phiNorm[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_raw_phiNorm_EB") ); + h2_IC_raw_phiNorm[0] -> Reset("ICEMS"); + h2_IC_raw_phiNorm[0] -> ResetStats(); + + h2_IC_crackCorr[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_crackCorr_EB") ); + h2_IC_crackCorr[0] -> Reset("ICEMS"); + h2_IC_crackCorr[0] -> ResetStats(); + + h2_IC_crackCorr_phiNorm[0] = (TH2F*)( h2_IC_raw[0]->Clone("h2_IC_crackCorr_phiNorm_EB") ); + h2_IC_crackCorr_phiNorm[0] -> Reset("ICEMS"); + h2_IC_crackCorr_phiNorm[0] -> ResetStats(); + + if( evalStat ) + { + h2_ICEven_raw[0] = (TH2F*)( inFileEven->Get("h_scale_EB") ); + h2_ICOdd_raw[0] = (TH2F*)( inFileOdd ->Get("h_scale_EB") ); + + h2_IC_raw_phiNorm_even[0] = (TH2F*)( h2_ICEven_raw[0]->Clone("h2_IC_raw_phiNorm_even_EB") ); + h2_IC_raw_phiNorm_even[0] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_even[0] -> ResetStats(); + + h2_IC_raw_phiNorm_odd[0] = (TH2F*)( h2_ICOdd_raw[0]->Clone("h2_IC_raw_phiNorm_odd_EB") ); + h2_IC_raw_phiNorm_odd[0] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_odd[0] -> ResetStats(); + + h2_IC_crackCorr_phiNorm_even[0] = (TH2F*)( h2_ICEven_raw[0]->Clone("h2_IC_crackCorr_phiNorm_even_EB") ); + h2_IC_crackCorr_phiNorm_even[0] -> Reset("ICEMS"); + h2_IC_crackCorr_phiNorm_even[0] -> ResetStats(); + + h2_IC_crackCorr_phiNorm_odd[0] = (TH2F*)( h2_ICOdd_raw[0]->Clone("h2_IC_crackCorr_phiNorm_odd_EB") ); + h2_IC_crackCorr_phiNorm_odd[0] -> Reset("ICEMS"); + h2_IC_crackCorr_phiNorm_odd[0] -> ResetStats(); + } + } + else + { + h2_IC_raw[-1] = (TH2F*)( inFile->Get("h_scale_EEM") ); + h2_IC_raw[1] = (TH2F*)( inFile->Get("h_scale_EEP") ); + + h2_IC_raw_phiNorm[-1] = (TH2F*)( h2_IC_raw[-1]->Clone("h2_IC_raw_phiNorm_EEM") ); + h2_IC_raw_phiNorm[1] = (TH2F*)( h2_IC_raw[1] ->Clone("h2_IC_raw_phiNorm_EEP") ); + h2_IC_raw_phiNorm[-1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm[1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm[-1] -> ResetStats(); + h2_IC_raw_phiNorm[1] -> ResetStats(); + + if( evalStat ) + { + h2_ICEven_raw[-1] = (TH2F*)( inFileEven->Get("h_scale_EEM") ); + h2_ICEven_raw[1] = (TH2F*)( inFileEven->Get("h_scale_EEP") ); + h2_ICOdd_raw[-1 ] = (TH2F*)( inFileOdd ->Get("h_scale_EEM") ); + h2_ICOdd_raw[1] = (TH2F*)( inFileOdd ->Get("h_scale_EEP") ); + + h2_IC_raw_phiNorm_even[-1] = (TH2F*)( h2_ICEven_raw[-1]->Clone("h2_IC_raw_phiNorm_even_EEM") ); + h2_IC_raw_phiNorm_even[1] = (TH2F*)( h2_ICEven_raw[1] ->Clone("h2_IC_raw_phiNorm_even_EEP") ); + h2_IC_raw_phiNorm_even[-1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_even[1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_even[-1] -> ResetStats(); + h2_IC_raw_phiNorm_even[1] -> ResetStats(); + + h2_IC_raw_phiNorm_odd[-1] = (TH2F*)( h2_ICOdd_raw[-1]->Clone("h2_IC_raw_phiNorm_odd_EEM") ); + h2_IC_raw_phiNorm_odd[1] = (TH2F*)( h2_ICOdd_raw[1] ->Clone("h2_IC_raw_phiNorm_odd_EEP") ); + h2_IC_raw_phiNorm_odd[-1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_odd[1] -> Reset("ICEMS"); + h2_IC_raw_phiNorm_odd[-1] -> ResetStats(); + h2_IC_raw_phiNorm_odd[1] -> ResetStats(); + } + } + + + + // normalize each ring to the average IC of that eta ring + if( isEB == true ) + { + NormalizeIC_EB(h2_IC_raw[0],h2_IC_raw_phiNorm[0],TT_centre[0]); + if( evalStat ) + { + NormalizeIC_EB(h2_ICEven_raw[0],h2_IC_raw_phiNorm_even[0],TT_centre[0]); + NormalizeIC_EB(h2_ICOdd_raw[0], h2_IC_raw_phiNorm_odd[0], TT_centre[0]); + } + } + else + { + NormalizeIC_EE(h2_IC_raw[-1],h2_IC_raw[1],h2_IC_raw_phiNorm[-1],h2_IC_raw_phiNorm[1],TT_centre[-1],TT_centre[1],eRings); + if( evalStat ) + { + NormalizeIC_EE(h2_ICEven_raw[-1],h2_ICEven_raw[1],h2_IC_raw_phiNorm_even[-1],h2_IC_raw_phiNorm_even[1],TT_centre[-1],TT_centre[1],eRings); + NormalizeIC_EE(h2_ICOdd_raw[-1], h2_ICOdd_raw[1], h2_IC_raw_phiNorm_odd[-1], h2_IC_raw_phiNorm_odd[1], TT_centre[-1],TT_centre[1],eRings); + } + } + + + + + + + ///////////////////////////////////////////////////////////// + // plots for raw IC (only ring normalization) + ///////////////////////////////////////////////////////////// + std::cout << ">>> Draw plots for raw IC" << std::endl; + + int etaRingWidth = 1; + int phiRegionWidth = 1; + + int nBins_spread = 2000; + float spreadMin = 0.; + float spreadMax = 2.; + + int nBins_stat = 1000; + float statMin = -1.; + float statMax = 1.; + + outFile -> mkdir("raw"); + outFile -> cd("raw"); + + + + //-------------- + // spread histos + std::cout << ">>>>>> spread histos" << std::endl; + + std::map h_spread; + std::map > h_spread_vsEta; + std::map g_spread_vsEta; + + if( isEB == true ) + { + h_spread[0] = new TH1F("h_spread_EB","",nBins_spread,spreadMin,spreadMax); + g_spread_vsEta[0] = new TGraphErrors(); + + BookSpreadHistos_EB(h_spread[0], h_spread_vsEta[0], g_spread_vsEta[0], etaRingWidth, + "EB_spread_vsEta",nBins_spread,spreadMin,spreadMax, + h2_IC_raw_phiNorm[0]); + + h_spread[0] -> Write(); + //for(unsigned int i = 0; i < h_spread_vsEta[0].size(); ++i) + // h_spread_vsEta[0].at(i) -> Write(); + g_spread_vsEta[0] -> Write("g_spread_vsEta_EB"); + } + else + { + h_spread[-1] = new TH1F("h_spread_EEM","",nBins_spread,spreadMin,spreadMax); + h_spread[0] = new TH1F("h_spread_EE", "",nBins_spread,spreadMin,spreadMax); + h_spread[+1] = new TH1F("h_spread_EEP","",nBins_spread,spreadMin,spreadMax); + g_spread_vsEta[-1] = new TGraphErrors(); + g_spread_vsEta[0] = new TGraphErrors(); + g_spread_vsEta[+1] = new TGraphErrors(); + + std::map dummy; + BookSpreadHistos_EE(h_spread, h_spread_vsEta, g_spread_vsEta, + eRings,etaRingWidth, + "EE_spread_vsEta",nBins_spread,spreadMin,spreadMax, + h2_IC_raw_phiNorm,dummy); + + h_spread[-1] -> Write(); + h_spread[0] -> Write(); + h_spread[+1] -> Write(); + //for(unsigned int i = 0; i < h_spread_vsEta[0].size(); ++i) + //{ + // h_spread_vsEta[-1].at(i) -> Write(); + // h_spread_vsEta[0].at(i) -> Write(); + // h_spread_vsEta[+1].at(i) -> Write(); + //} + g_spread_vsEta[-1] -> Write("g_spread_vsEta_EEM"); + g_spread_vsEta[0] -> Write("g_spread_vsEta_EE"); + g_spread_vsEta[+1] -> Write("g_spread_vsEta_EEP"); + } + + + + //------------------- + // phi profile histos + std::cout << ">>>>>> phi profile histos" << std::endl; + + std::map h_phiAvgICSpread; + std::map g_avgIC_vsPhi; + + if( isEB == true ) + { + h_phiAvgICSpread[0] = new TH1F("h_phiAvgICSpread_EB","",nBins_spread,spreadMin,spreadMax); + g_avgIC_vsPhi[0] = new TGraphErrors(); + + PhiProfile(h_phiAvgICSpread[0], g_avgIC_vsPhi[0], phiRegionWidth, h2_IC_raw_phiNorm[0]); + + h_phiAvgICSpread[0] -> Write(); + g_avgIC_vsPhi[0] -> Write("g_avgIC_vsPhi_EB"); + } + else + { + h_phiAvgICSpread[-1] = new TH1F("h_phiAvgICSpread_EEM","",nBins_spread,spreadMin,spreadMax); + h_phiAvgICSpread[+1] = new TH1F("h_phiAvgICSpread_EEP","",nBins_spread,spreadMin,spreadMax); + g_avgIC_vsPhi[-1] = new TGraphErrors(); + g_avgIC_vsPhi[+1] = new TGraphErrors(); + + PhiProfile(h_phiAvgICSpread[-1],g_avgIC_vsPhi[-1],phiRegionWidth,h2_IC_raw_phiNorm[-1],eRings); + PhiProfile(h_phiAvgICSpread[+1],g_avgIC_vsPhi[+1],phiRegionWidth,h2_IC_raw_phiNorm[+1],eRings); + + h_phiAvgICSpread[-1] -> Write(); + h_phiAvgICSpread[+1] -> Write(); + g_avgIC_vsPhi[-1] -> Write("g_avgIC_vsPhi_EEM"); + g_avgIC_vsPhi[+1] -> Write("g_avgIC_vsPhi_EEP"); + } + + + + //---------------------------------- + // phi-fold profile histos (EB only) + std::cout << ">>>>>> phi-fold profile histos" << std::endl; + + TGraphErrors* g_avgIC_vsPhiFold_EBM = new TGraphErrors(); + TGraphErrors* g_avgIC_vsPhiFold_EBP = new TGraphErrors(); + + if( isEB == true ) + { + PhiFoldProfile_EB(g_avgIC_vsPhiFold_EBM, g_avgIC_vsPhiFold_EBP, phiRegionWidth, h2_IC_raw_phiNorm[0]); + + g_avgIC_vsPhiFold_EBM -> Write("g_avgIC_vsPhiFold_EBM"); + g_avgIC_vsPhiFold_EBP -> Write("g_avgIC_vsPhiFold_EBP"); + } + + + + //----------------------------- + // statistical precision histos + std::cout << ">>>>>> stat histos" << std::endl; + + std::map h_stat; + std::map > h_stat_vsEta; + std::map g_stat_vsEta; + std::map g_residual_vsEta; + + if( isEB == true ) + { + h_stat[0] = new TH1F("h_stat_EB","",nBins_stat,statMin,statMax); + g_stat_vsEta[0] = new TGraphErrors(); + g_residual_vsEta[0] = new TGraphErrors(); + + if( evalStat ) + { + BookSpreadHistos_EB(h_stat[0], h_stat_vsEta[0], g_stat_vsEta[0], etaRingWidth, + "EB_stat_vsEta",nBins_stat,statMin,statMax, + h2_IC_raw_phiNorm_even[0],h2_IC_raw_phiNorm_odd[0]); + + h_stat[0] -> Write(); + //for(unsigned int i = 0; i < h_stat_vsEta[0].size(); ++i) + // h_stat_vsEta[0].at(i) -> Write(); + g_stat_vsEta[0] -> Write("g_stat_vsEta_EB"); + + ResidualSpread(g_stat_vsEta[0],g_spread_vsEta[0],g_residual_vsEta[0]); + } + } + else + { + h_stat[-1] = new TH1F("h_stat_EEM","",nBins_stat,statMin,statMax); + h_stat[0] = new TH1F("h_stat_EE", "",nBins_stat,statMin,statMax); + h_stat[+1] = new TH1F("h_stat_EEP","",nBins_stat,statMin,statMax); + g_stat_vsEta[-1] = new TGraphErrors(); + g_stat_vsEta[0] = new TGraphErrors(); + g_stat_vsEta[+1] = new TGraphErrors(); + g_residual_vsEta[-1] = new TGraphErrors(); + g_residual_vsEta[0] = new TGraphErrors(); + g_residual_vsEta[+1] = new TGraphErrors(); + + if( evalStat ) + { + BookSpreadHistos_EE(h_stat, h_stat_vsEta, g_stat_vsEta, + eRings,etaRingWidth, + "EE_stat_vsEta",nBins_stat,statMin,statMax, + h2_IC_raw_phiNorm_even,h2_IC_raw_phiNorm_odd); + + h_stat[-1] -> Write(); + h_stat[0] -> Write(); + h_stat[+1] -> Write(); + //for(unsigned int i = 0; i < h_stat_vsEta[0].size(); ++i) + //{ + // h_stat_vsEta[-1].at(i) -> Write(); + // h_stat_vsEta[0].at(i) -> Write(); + // h_stat_vsEta[+1].at(i) -> Write(); + //} + g_stat_vsEta[-1] -> Write("g_stat_vsEta_EEM"); + g_stat_vsEta[0] -> Write("g_stat_vsEta_EE"); + g_stat_vsEta[+1] -> Write("g_stat_vsEta_EEP"); + + ResidualSpread(g_stat_vsEta[-1],g_spread_vsEta[-1],g_residual_vsEta[-1]); + ResidualSpread(g_stat_vsEta[0], g_spread_vsEta[0], g_residual_vsEta[0]); + ResidualSpread(g_stat_vsEta[+1],g_spread_vsEta[+1],g_residual_vsEta[+1]); + } + } + + outFile -> cd(); + + + + + + + //////////////////////////////////////// + // apply corrections for crack structure + //////////////////////////////////////// + std::cout << ">>> Draw plots for crack-corrected IC" << std::endl; + + TF1* pol0_EBM = new TF1("pol0_EBM","pol0",4.,16.); + TF1* pol0_EBP = new TF1("pol0_EBP","pol0",4.,16.); + + if( isEB == true ) + { + pol0_EBP -> SetLineColor(kRed+2); + pol0_EBM -> SetLineColor(kRed+2); + pol0_EBP -> SetLineStyle(7); + pol0_EBM -> SetLineStyle(7); + + g_avgIC_vsPhiFold_EBM -> Fit("pol0_EBM","QRS+"); + g_avgIC_vsPhiFold_EBP -> Fit("pol0_EBP","QRS+"); + + outFile -> cd("raw"); + + pol0_EBM -> Write(); + pol0_EBP -> Write(); + } + + outFile -> cd(); + + + + if( isEB == true ) + { + for(int ibin = 1; ibin <= h2_IC_crackCorr[0]->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= h2_IC_crackCorr[0]->GetNbinsY(); ++jbin) + { + float IC = h2_IC_raw_phiNorm[0] -> GetBinContent(ibin,jbin); + + float phiRegionMin = h2_IC_crackCorr[0]->GetXaxis()->GetBinLowEdge(ibin); + int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ) % 20; + + float etaBinCenter = h2_IC_crackCorr[0]->GetYaxis()->GetBinCenter(jbin); + + double phiFold,ICPhiFoldAvg; + if( etaBinCenter < 0. ) + { + g_avgIC_vsPhiFold_EBM -> GetPoint(phiRegion,phiFold,ICPhiFoldAvg); + h2_IC_crackCorr[0] -> SetBinContent(ibin,jbin,IC*pol0_EBM->GetParameter(0)/ICPhiFoldAvg); + } + if( etaBinCenter > 0. ) + { + g_avgIC_vsPhiFold_EBP -> GetPoint(phiRegion,phiFold,ICPhiFoldAvg); + h2_IC_crackCorr[0] -> SetBinContent(ibin,jbin,IC*pol0_EBM->GetParameter(0)/ICPhiFoldAvg); + } + } + + NormalizeIC_EB(h2_IC_crackCorr[0],h2_IC_crackCorr_phiNorm[0],TT_centre[0]); + + outFile -> mkdir("crackCorr"); + outFile -> cd("crackCorr"); + } + + + + //-------------- + // spread histos + std::cout << ">>>>>> spread histos" << std::endl; + + TH1F* h_spread_crackCorr = new TH1F("h_spread_crackCorr","",nBins_spread,spreadMin,spreadMax); + std::vector h_spread_vsEta_crackCorr; + TGraphErrors* g_spread_vsEta_crackCorr = new TGraphErrors(); + + if( isEB == true ) + { + BookSpreadHistos_EB(h_spread_crackCorr, h_spread_vsEta_crackCorr, g_spread_vsEta_crackCorr, etaRingWidth, + "EB_spread_vsEta_crackCorr",nBins_spread,spreadMin,spreadMax, + h2_IC_crackCorr_phiNorm[0]); + + h_spread_crackCorr -> Write(); + //for(unsigned int i = 0; i < h_spread_vsEta_crackCorr.size(); ++i) + // h_spread_vsEta_crackCorr.at(i) -> Write(); + g_spread_vsEta_crackCorr -> Write("g_spread_vsEta_crackCorr"); + } + + + + //------------------- + // phi profile histos + std::cout << ">>>>>> phi profile histos" << std::endl; + + TH1F* h_phiAvgICSpread_crackCorr = new TH1F("h_phiAvgICSpread_crackCorr","",nBins_spread,spreadMin,spreadMax); + TGraphErrors* g_avgIC_vsPhi_crackCorr = new TGraphErrors(); + + if( isEB == true ) + { + PhiProfile(h_phiAvgICSpread_crackCorr, g_avgIC_vsPhi_crackCorr, phiRegionWidth, h2_IC_crackCorr_phiNorm[0]); + + h_phiAvgICSpread_crackCorr -> Write(); + g_avgIC_vsPhi_crackCorr -> Write("g_avgIC_vsPhi_crackCorr"); + } + + + + //------------------------ + // phi-fold profile histos + std::cout << ">>>>>> phi-fold profile histos" << std::endl; + + TGraphErrors* g_avgIC_vsPhiFold_crackCorr_EBM = new TGraphErrors(); + TGraphErrors* g_avgIC_vsPhiFold_crackCorr_EBP = new TGraphErrors(); + + if( isEB == true ) + { + PhiFoldProfile_EB(g_avgIC_vsPhiFold_crackCorr_EBM, g_avgIC_vsPhiFold_crackCorr_EBP, phiRegionWidth, h2_IC_crackCorr_phiNorm[0]); + + g_avgIC_vsPhiFold_crackCorr_EBM -> Write("g_avgIC_vsPhiFold_crackCorr_EBM"); + g_avgIC_vsPhiFold_crackCorr_EBP -> Write("g_avgIC_vsPhiFold_crackCorr_EBP"); + } + + + + //----------------------------- + // statistical precision histos + std::cout << ">>>>>> stat histos" << std::endl; + + std::vector h_stat_vsEta_crackCorr; + + TH1F* h_stat_crackCorr = new TH1F("h_stat_crackCorr","",nBins_stat,statMin,statMax); + TGraphErrors* g_stat_vsEta_crackCorr = new TGraphErrors(); + TGraphErrors* g_residual_vsEta_crackCorr = new TGraphErrors(); + + if( isEB == true) + { + + if( evalStat ) + { + BookSpreadHistos_EB(h_stat_crackCorr, h_stat_vsEta_crackCorr, g_stat_vsEta_crackCorr, etaRingWidth, + "EB_stat_vsEta_crackCorr",nBins_stat,statMin,statMax, + h2_IC_raw_phiNorm_even[0],h2_IC_raw_phiNorm_odd[0]); + + h_stat_crackCorr -> Write(); + //for(unsigned int i = 0; i < h_stat_vsEta_crackCorr.size(); ++i) + // h_stat_vsEta_crackCorr.at(i) -> Write(); + g_stat_vsEta_crackCorr -> Write("g_stat_vsEta_crackCorr"); + + + ResidualSpread(g_stat_vsEta_crackCorr, g_spread_vsEta_crackCorr,g_residual_vsEta_crackCorr); + g_residual_vsEta_crackCorr -> Write("g_residual_vsEta_crackCorr"); + } + } + outFile -> cd(); + + + + + + + ///////////////////////////////////////////////////////////// + // draw plots + ///////////////////////////////////////////////////////////// + + if( isEB == true ) + { + DrawICMap(h2_IC_raw_phiNorm[0], outputFolder+"/EB_h2_IC_raw_phiNorm", "png",isEB); + DrawICMap(h2_IC_crackCorr_phiNorm[0],outputFolder+"/EB_h2_IC_crackCorr_phiNorm","png",isEB); + + DrawSpreadHisto(h_spread[0], outputFolder+"/EB_h_spread", "f_EB_spread_vsEta", "png",isEB); + DrawSpreadHisto(h_spread_crackCorr,outputFolder+"/EB_h_spread_crackCorr","f_EB_spread_vsEta_crackCorr","png",isEB); + + DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EB_g_spread_vsEta", "png",isEB,g_stat_vsEta[0]); + DrawSpreadGraph(g_spread_vsEta_crackCorr,outputFolder+"/EB_g_spread_vsEta_crackCorr","png",isEB,g_stat_vsEta_crackCorr); + + DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EB_g_residual_vsEta", "png",isEB); + DrawResidualGraph(g_residual_vsEta_crackCorr,outputFolder+"/EB_g_residual_vsEta_crackCorr","png",isEB); + + DrawPhiAvgICSpread(h_phiAvgICSpread[0], outputFolder+"/EB_h_phiAvgICSpread", "png",isEB); + DrawPhiAvgICSpread(h_phiAvgICSpread_crackCorr,outputFolder+"/EB_h_phiAvgICSpread_crackCorr","png",isEB); + + DrawAvgICVsPhiGraph(g_avgIC_vsPhi[0], outputFolder+"/EB_g_avgIC_vsPhi", "png",kRed+2, isEB); + DrawAvgICVsPhiGraph(g_avgIC_vsPhi_crackCorr,outputFolder+"/EB_g_avgIC_vsPhi_crackCorr","png",kGreen+2,isEB); + + DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBM,g_avgIC_vsPhiFold_crackCorr_EBM,outputFolder+"/EBM_g_avgIC_vsPhiFold","png",isEB); + DrawAvgICVsPhiFoldGraph(g_avgIC_vsPhiFold_EBP,g_avgIC_vsPhiFold_crackCorr_EBP,outputFolder+"/EBP_g_avgIC_vsPhiFold","png",isEB); + } + else + { + DrawICMap(h2_IC_raw_phiNorm[-1],outputFolder+"/EEM_h2_IC_raw_phiNorm","png",isEB); + DrawICMap(h2_IC_raw_phiNorm[+1],outputFolder+"/EEP_h2_IC_raw_phiNorm","png",isEB); + + DrawSpreadHisto(h_spread[-1],outputFolder+"/EEM_h_spread","f_EE_spread_vsEta_EEM","png",isEB); + DrawSpreadHisto(h_spread[0], outputFolder+"/EE_h_spread","f_EE_spread_vsEta_EE", "png",isEB); + DrawSpreadHisto(h_spread[+1],outputFolder+"/EEP_h_spread","f_EE_spread_vsEta_EEP","png",isEB); + + DrawSpreadGraph(g_spread_vsEta[-1],outputFolder+"/EEM_g_spread_vsEta","png",isEB,g_stat_vsEta[-1]); + DrawSpreadGraph(g_spread_vsEta[0], outputFolder+"/EE_g_spread_vsEta","png",isEB,g_stat_vsEta[0]); + DrawSpreadGraph(g_spread_vsEta[+1],outputFolder+"/EEP_g_spread_vsEta","png",isEB,g_stat_vsEta[+1]); + + DrawResidualGraph(g_residual_vsEta[-1],outputFolder+"/EEM_g_residual_vsEta","png",isEB); + DrawResidualGraph(g_residual_vsEta[0], outputFolder+"/EE_g_residual_vsEta","png",isEB); + DrawResidualGraph(g_residual_vsEta[+1],outputFolder+"/EEP_g_residual_vsEta","png",isEB); + + DrawPhiAvgICSpread(h_phiAvgICSpread[-1],outputFolder+"/EEM_h_phiAvgICSpread","png",isEB); + DrawPhiAvgICSpread(h_phiAvgICSpread[+1],outputFolder+"/EEP_h_phiAvgICSpread","png",isEB); + + DrawAvgICVsPhiGraph(g_avgIC_vsPhi[-1],outputFolder+"/EEM_g_avgIC_vsPhi","png",kRed+2,isEB); + DrawAvgICVsPhiGraph(g_avgIC_vsPhi[+1],outputFolder+"/EEP_g_avgIC_vsPhi","png",kRed+2,isEB); + } + + outFile -> Close(); + + + + + + + //------------------------------------------------------ + // Dump IC in a txt file ---> IC from isolated electrons + + std::ofstream outTxt((outputFolder+"/"+outputTxt+"_relative.txt").c_str(),std::ios::out); + + //outTxt << "---------------------------------------------------------------" << std::endl; + //if( isEB == true ) + // outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iEta" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iPhi" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" + // << std::fixed << std::setprecision(6) << std::setw(15) << "IC" + // << std::fixed << std::setprecision(6) << std::setw(15) << "error" + // << std::endl; + //else + // outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iX" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iY" + // << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" + // << std::fixed << std::setprecision(6) << std::setw(15) << "IC" + // << std::fixed << std::setprecision(6) << std::setw(15) << "error" + // << std::endl; + //outTxt << "---------------------------------------------------------------" << std::endl; + + + std::map h2_final; + + if( isEB == true) + { + h2_final[0] = h2_IC_crackCorr_phiNorm[0]; + } + else + { + h2_final[-1] = h2_IC_raw_phiNorm[-1]; + h2_final[+1] = h2_IC_raw_phiNorm[+1]; + } + + + if( isEB == true ) + { + for(int jbin = 1; jbin < h2_final[0]->GetNbinsY()+1; ++jbin) + { + float iEta = h2_final[0] -> GetYaxis() -> GetBinLowEdge(jbin); + + if( iEta == 0. ) continue; // skip ieta=0 + + double x, statPrec; + if( iEta < 0 ) + g_stat_vsEta[0] -> GetPoint(int(fabs(iEta+1)),x,statPrec); //mirroring of the folded precision + else + g_stat_vsEta[0] -> GetPoint(int(fabs(iEta-1)),x,statPrec); //mirroring of the folded precision + + for(int ibin = 1; ibin < h2_final[0]->GetNbinsX()+1; ++ibin) + { + float IC = h2_final[0] -> GetBinContent(ibin,jbin); + + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[0]->GetYaxis()->GetBinLowEdge(jbin) + << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[0]->GetXaxis()->GetBinLowEdge(ibin) + << std::fixed << std::setprecision(0) << std::setw(10) << "0"; //iz for the barrel + + if( IC == 0. ) + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << IC + << std::fixed << std::setprecision(6) << std::setw(15) << statPrec + << std::endl; + } + } + } + } + else + { + for(int iz = -1; iz <= 1; ++iz) + { + if( iz == 0 ) continue; + + for(int ix = 1; ix < h2_final[iz]->GetNbinsX()+1; ++ix) + { + for (int iy = 1; iy < h2_final[iz] -> GetNbinsY()+1; ++iy) + { + if( existingEE->GetBinContent(ix,iy) != 1 ) continue; + + float IC = h2_final[iz]->GetBinContent(ix,iy); + + double x,statPrec,y,sysPrec; + g_stat_vsEta[iz] -> GetPoint(int(eRings->GetEndcapRing(ix,iy,iz)),x,statPrec); + MCSystematic_EE -> GetPoint(int(eRings->GetEndcapRing(ix,iy,iz)),y,sysPrec); + + if( IC > 0. && IC < 2. ) + { + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << iz + << std::fixed << std::setprecision(6) << std::setw(15) << IC + << std::fixed << std::setprecision(6) << std::setw(15) << sqrt( statPrec*statPrec + sysPrec*sysPrec ) + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << h2_final[iz]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << iz + << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + } + } + } + } + + + + return 0; +} diff --git a/EOverPCalibration/bin/CompareICSet.cpp b/EOverPCalibration/bin/CompareICSet.cpp new file mode 100644 index 00000000000..d993f4f5490 --- /dev/null +++ b/EOverPCalibration/bin/CompareICSet.cpp @@ -0,0 +1,1087 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "TStyle.h" +#include "TROOT.h" +#include "TH1F.h" +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TString.h" +#include "TGraphErrors.h" +#include "../interface/TEndcapRings.h" +#include "TLegend.h" +#include "TApplication.h" + +using namespace std; + +int main (int argc, char**argv){ + +if(argc!=3){ + std::cerr<<" Wrongs input "<Reset(); +gROOT->SetStyle("Plain"); + +gStyle->SetPadTickX(1); +gStyle->SetPadTickY(1); +gStyle->SetOptTitle(1); +gStyle->SetOptStat(0); +gStyle->SetFitFormat("6.3g"); +gStyle->SetPalette(1); +gStyle->SetOptTitle(0); + +gStyle->SetTextFont(42); +gStyle->SetTextSize(0.05); +gStyle->SetTitleFont(42,"xyz"); +gStyle->SetTitleSize(0.05); +gStyle->SetLabelFont(42,"xyz"); +gStyle->SetLabelSize(0.05); +gStyle->SetTitleXOffset(0.8); +gStyle->SetTitleYOffset(1.1); +gROOT->ForceStyle(); + + + +int iPhi, iEta, iz; +double ic, eic; + +/// Histo for first ic set +TString Name = Form("mapEB_%s",inputFile1.c_str()); +TH2F * map1_EB = new TH2F(Name,Name,360,1, 361, 171, -85, 86); +Name = Form("mapEEp_%s",inputFile1.c_str()); +TH2F * map1_EEp = new TH2F(Name,Name,100,1, 101, 100, 1, 101); +Name = Form("mapEEm_%s",inputFile1.c_str()); +TH2F * map1_EEm = new TH2F(Name,Name,100,1, 101, 100, 1, 101); + +std::cout<<" Opening first file ..... reading "<> iEta >> iPhi >> iz >> ic >> eic ; +if(iz==0) map1_EB->Fill(iPhi,iEta,ic); +if(iz==1) map1_EEp->Fill(iEta,iPhi,ic); +if(iz==-1)map1_EEm->Fill(iEta,iPhi,ic); +} +std::cout<<" End first file "<> iEta >> iPhi >> iz >> ic >> eic ; +if(iz==0) map2_EB->Fill(iPhi,iEta,ic); +if(iz==1) map2_EEp->Fill(iEta,iPhi,ic); +if(iz==-1) map2_EEm->Fill(iEta,iPhi,ic); +} +std::cout<<" End second file "<Clone("diffmapEB"); +diffmap_EB->Reset(); + +Name = Form("diffmapEEp"); +TH2F * diffmap_EEp = (TH2F*) map1_EEp->Clone("diffmapEEp"); +diffmap_EEp->Reset(); + +Name = Form("diffmapEEm"); +TH2F * diffmap_EEm = (TH2F*) map1_EEm->Clone("diffmapEEm"); +diffmap_EEm->Reset(); + +Name = Form("ratiomapEB"); +TH2F * ratiomap_EB = (TH2F*) map1_EB->Clone("ratiomapEB"); +ratiomap_EB->Reset(); + +Name = Form("ratiomapEEp"); +TH2F * ratiomap_EEp = (TH2F*) map1_EEp->Clone("ratiomapEEp"); +ratiomap_EEp->Reset(); + +Name = Form("ratiomapEEm"); +TH2F * ratiomap_EEm = (TH2F*) map1_EEm->Clone("ratiomapEEm"); +ratiomap_EEm->Reset(); + +Name = Form("diffHistEB"); +TH1F * diffHistEB = new TH1F(Name,Name,100,-0.6,0.6); +diffHistEB->SetLineWidth(2); + +Name = Form("diffHistEEp"); +TH1F * diffHistEEp = new TH1F(Name,Name,100,-0.6,0.6); +diffHistEEp->SetLineWidth(2); + +Name = Form("diffHistEEm"); +TH1F * diffHistEEm = new TH1F(Name,Name,100,-0.6,0.6); +diffHistEEm->SetLineWidth(2); + +Name = Form("correlationEB"); +TH2F * correlationEB = new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); + +Name = Form("correlationEEp"); +TH2F * correlationEEp= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); + +Name = Form("correlationEEm"); +TH2F * correlationEEm= new TH2F(Name,Name,100,0.2,2.,100,0.2,2.); + + + + + +for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + for(int iEta=1; iEtaGetNbinsY()+1; iEta++){ + + if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map2_EB->GetBinContent(iPhi,iEta)==-1.){ + diffmap_EB->SetBinContent(iPhi,iEta,-1.); + ratiomap_EB->SetBinContent(iPhi,iEta,-1.); + continue;} + + diffmap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta)); + diffHistEB->Fill(map1_EB->GetBinContent(iPhi,iEta)-map2_EB->GetBinContent(iPhi,iEta)); + ratiomap_EB->SetBinContent(iPhi,iEta,map1_EB->GetBinContent(iPhi,iEta)/map2_EB->GetBinContent(iPhi,iEta)); + correlationEB->Fill(map1_EB->GetBinContent(iPhi,iEta),map2_EB->GetBinContent(iPhi,iEta)); + + } +} + +for(int ix =1; ixGetNbinsX()+1; ix++){ + for(int iy=1; iyGetNbinsY()+1; iy++){ + + if(map1_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==-1.){ + diffmap_EEp->SetBinContent(ix,iy,-1.); + ratiomap_EEp->SetBinContent(ix,iy,-1.); + continue;} + + diffmap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy)); + diffHistEEp->Fill(map1_EEp->GetBinContent(ix,iy)-map2_EEp->GetBinContent(ix,iy)); + ratiomap_EEp->SetBinContent(ix,iy,map1_EEp->GetBinContent(ix,iy)/map2_EEp->GetBinContent(ix,iy)); + correlationEEp->Fill(map1_EEp->GetBinContent(ix,iy),map2_EEp->GetBinContent(ix,iy)); + + } +} + +for(int ix =1; ixGetNbinsX()+1; ix++){ + for(int iy=1; iyGetNbinsY()+1; iy++){ + + if(map1_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==-1.){ + diffmap_EEm->SetBinContent(ix,iy,-1.); + ratiomap_EEm->SetBinContent(ix,iy,-1.); + continue;} + + diffmap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy)); + diffHistEEm->Fill(map1_EEm->GetBinContent(ix,iy)-map2_EEm->GetBinContent(ix,iy)); + ratiomap_EEm->SetBinContent(ix,iy,map1_EEm->GetBinContent(ix,iy)/map2_EEm->GetBinContent(ix,iy)); + correlationEEm->Fill(map1_EEm->GetBinContent(ix,iy),map2_EEm->GetBinContent(ix,iy)); + + } +} + + + +/// Profile along phi for EB: + +TGraphErrors *phiProjectionEB1 = new TGraphErrors(); +phiProjectionEB1->SetMarkerStyle(20); +phiProjectionEB1->SetMarkerSize(1); +phiProjectionEB1->SetMarkerColor(kBlue); + +TGraphErrors *phiProjectionEB2 = new TGraphErrors(); +phiProjectionEB2->SetMarkerStyle(20); +phiProjectionEB2->SetMarkerSize(1); +phiProjectionEB2->SetMarkerColor(kRed); + + +for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + double sumEta=0, nEta=0; + + for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + if(map1_EB->GetBinContent(iPhi,iEta)==-1. || map1_EB->GetBinContent(iPhi,iEta)==0.) continue; + sumEta=sumEta+map1_EB->GetBinContent(iPhi,iEta); + nEta++; + } + phiProjectionEB1->SetPoint(iPhi-1,iPhi-1,sumEta/nEta); + phiProjectionEB1->SetPointError(iPhi-1,0.,0.002); + } + +for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + double sumEta=0, nEta=0; + + for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + if(map2_EB->GetBinContent(iPhi,iEta)==-1.||map2_EB->GetBinContent(iPhi,iEta)==0. ) continue; + sumEta=sumEta+map2_EB->GetBinContent(iPhi,iEta); + nEta++; + } + phiProjectionEB2->SetPoint(iPhi-1,iPhi-1,sumEta/nEta); + phiProjectionEB2->SetPointError(iPhi-1,0.,0.002); + } + +/// Profile along phi for EE+: + +TEndcapRings *eRings = new TEndcapRings(); +std::vector vectSum; +std::vector vectCounter; + +vectCounter.assign(360,0.); +vectSum.assign(360,0.); + + +TGraphErrors *phiProjectionEEp1 = new TGraphErrors(); +phiProjectionEEp1->SetMarkerStyle(20); +phiProjectionEEp1->SetMarkerSize(1); +phiProjectionEEp1->SetMarkerColor(kBlue); + +TGraphErrors *phiProjectionEEp2 = new TGraphErrors(); +phiProjectionEEp2->SetMarkerStyle(20); +phiProjectionEEp2->SetMarkerSize(1); +phiProjectionEEp2->SetMarkerColor(kRed); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEp->GetBinContent(ix,iy)==-1. || map1_EEp->GetBinContent(ix,iy)==0. ) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map1_EEp->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + int j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEp->GetBinContent(ix,iy)==-1. ||map2_EEp->GetBinContent(ix,iy)==0.) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map2_EEp->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iSetMarkerStyle(20); +phiProjectionEEm1->SetMarkerSize(1); +phiProjectionEEm1->SetMarkerColor(kBlue); + +TGraphErrors *phiProjectionEEm2 = new TGraphErrors(); +phiProjectionEEm2->SetMarkerStyle(20); +phiProjectionEEm2->SetMarkerSize(1); +phiProjectionEEm2->SetMarkerColor(kRed); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEm->GetBinContent(ix,iy)==-1. || map1_EEm->GetBinContent(ix,iy)==0. ) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map1_EEm->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==0.) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); + vectSum.at(iPhi)=vectSum.at(iPhi)+map2_EEm->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; +} + + for(unsigned int i=0; iSetMarkerStyle(20); +etaProjectionEB1->SetMarkerSize(1); +etaProjectionEB1->SetMarkerColor(kBlue); + +TGraphErrors *etaProjectionEB2 = new TGraphErrors(); +etaProjectionEB2->SetMarkerStyle(20); +etaProjectionEB2->SetMarkerSize(1); +etaProjectionEB2->SetMarkerColor(kRed); + + +for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + double sumPhi=0, nPhi=0; + + for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + if(map1_EB->GetBinContent(iPhi,iEta)==-1.) continue; + sumPhi=sumPhi+map1_EB->GetBinContent(iPhi,iEta); + nPhi++; + } + etaProjectionEB1->SetPoint(iEta-1,iEta-1,sumPhi/nPhi); + etaProjectionEB1->SetPointError(iEta-1,0.,0.002); + } + +for(int iEta =1; iEtaGetNbinsY()+1; iEta++){ + double sumPhi=0, nPhi=0; + + for(int iPhi =1; iPhiGetNbinsX()+1; iPhi++){ + if(map2_EB->GetBinContent(iPhi,iEta)==-1.) continue; + sumPhi=sumPhi+map2_EB->GetBinContent(iPhi,iEta); + nPhi++; + } + etaProjectionEB2->SetPoint(iEta-1,iEta-1,sumPhi/nPhi); + etaProjectionEB2->SetPointError(iEta-1,0.,0.002); + } + + +/// projection along eta for EE+: + +TGraphErrors *etaProjectionEEp1 = new TGraphErrors(); +etaProjectionEEp1->SetMarkerStyle(20); +etaProjectionEEp1->SetMarkerSize(1); +etaProjectionEEp1->SetMarkerColor(kBlue); + +TGraphErrors *etaProjectionEEp2 = new TGraphErrors(); +etaProjectionEEp2->SetMarkerStyle(20); +etaProjectionEEp2->SetMarkerSize(1); +etaProjectionEEp2->SetMarkerColor(kRed); + +vectCounter.clear(); +vectSum.clear(); +vectCounter.assign(360,0.); +vectSum.assign(360,0.); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEp->GetBinContent(ix,iy)==-1. || map1_EEp->GetBinContent(ix,iy)==0.) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>360)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map1_EEp->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEp->GetBinContent(ix,iy)==-1. || map2_EEp->GetBinContent(ix,iy)==0. ) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>360)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map2_EEp->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iSetMarkerStyle(20); +etaProjectionEEm1->SetMarkerSize(1); +etaProjectionEEm1->SetMarkerColor(kBlue); + +TGraphErrors *etaProjectionEEm2 = new TGraphErrors(); +etaProjectionEEm2->SetMarkerStyle(20); +etaProjectionEEm2->SetMarkerSize(1); +etaProjectionEEm2->SetMarkerColor(kRed); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map1_EEm->GetBinContent(ix,iy)==-1.||map1_EEm->GetBinContent(ix,iy)==0.) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>360)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map1_EEm->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(map2_EEm->GetBinContent(ix,iy)==-1. || map2_EEm->GetBinContent(ix,iy)==0.) continue; + int iEta = int(eRings->GetEndcapIeta(ix,iy,1)); + if(iEta<0 || iEta>171)continue; + vectSum.at(iEta)=vectSum.at(iEta)+map2_EEm->GetBinContent(ix,iy); + vectCounter.at(iEta)=vectCounter.at(iEta)+1; + } + } + + j=0; + for(unsigned int i=0; iSetPoint(j,i,vectSum.at(i)/vectCounter.at(i)); + j++; + } + + for(unsigned int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEB1->GetPoint(i,x,y); + phiProfileEB1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEB2->GetPoint(i,x,y); + phiProfileEB2->Fill(y); + } + +TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEB1->GetRMS()); +fgaus->SetRange(1-5*phiProfileEB1->GetRMS(),1+5*phiProfileEB1->GetRMS()); +fgaus->SetLineColor(kBlue); +phiProfileEB1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEB2->GetRMS()); +fgaus->SetRange(1-5*phiProfileEB2->GetRMS(),1+5*phiProfileEB2->GetRMS()); +fgaus->SetLineColor(kRed); +phiProfileEB2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + phiProjectionEEp1->GetPoint(i,x,y); + phiProfileEEp1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEEp2->GetPoint(i,x,y); + phiProfileEEp2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEp1->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEp1->GetRMS(),1+5*phiProfileEEp1->GetRMS()); +fgaus->SetLineColor(kBlue); +phiProfileEEp1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEp2->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEp2->GetRMS(),1+5*phiProfileEEp2->GetRMS()); +fgaus->SetLineColor(kRed); +phiProfileEEp2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + phiProjectionEEm1->GetPoint(i,x,y); + phiProfileEEm1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + phiProjectionEEm2->GetPoint(i,x,y); + phiProfileEEm2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEm1->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEm1->GetRMS(),1+5*phiProfileEEm1->GetRMS()); +fgaus->SetLineColor(kBlue); +phiProfileEEm1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,phiProfileEEm2->GetRMS()); +fgaus->SetRange(1-5*phiProfileEEm2->GetRMS(),1+5*phiProfileEEm2->GetRMS()); +fgaus->SetLineColor(kRed); +phiProfileEEm2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + etaProjectionEB1->GetPoint(i,x,y); + etaProfileEB1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + etaProjectionEB2->GetPoint(i,x,y); + etaProfileEB2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEB1->GetRMS()); +fgaus->SetRange(1-5*etaProfileEB1->GetRMS(),1+5*etaProfileEB1->GetRMS()); +fgaus->SetLineColor(kBlue); +etaProfileEB1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEB2->GetRMS()); +fgaus->SetRange(1-5*etaProfileEB2->GetRMS(),1+5*etaProfileEB2->GetRMS()); +fgaus->SetLineColor(kRed); +etaProfileEB2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + etaProjectionEEp1->GetPoint(i,x,y); + etaProfileEEp1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + etaProjectionEEp2->GetPoint(i,x,y); + etaProfileEEp2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEp1->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEp1->GetRMS(),1+5*etaProfileEEp1->GetRMS()); +fgaus->SetLineColor(kBlue); +etaProfileEEp1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEp2->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEp2->GetRMS(),1+5*etaProfileEEp2->GetRMS()); +fgaus->SetLineColor(kRed); +etaProfileEEp2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<GetN() ; i++){ + double x=0,y=0; + etaProjectionEEm1->GetPoint(i,x,y); + etaProfileEEm1->Fill(y); + } + +for(int i=0; iGetN() ; i++){ + double x=0,y=0; + etaProjectionEEm2->GetPoint(i,x,y); + etaProfileEEm2->Fill(y); + } + +fgaus->SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEm1->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEm1->GetRMS(),1+5*etaProfileEEm1->GetRMS()); +fgaus->SetLineColor(kBlue); +etaProfileEEm1->Fit("fgaus","QRME"); +cout<<" First Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetParameter(1,1); +fgaus->SetParameter(2,etaProfileEEm2->GetRMS()); +fgaus->SetRange(1-5*etaProfileEEm2->GetRMS(),1+5*etaProfileEEm2->GetRMS()); +fgaus->SetLineColor(kRed); +etaProfileEEm2->Fit("fgaus","QRME"); +cout<<" Second Set : Mean Fit = "<GetParameter(1)<<" RMS Fit = "<GetParameter(2)<<" chi2/ndf = "<GetChisquare()/fgaus->GetNDF()<GetRMS()<SetLeftMargin(0.1); + c[0]->SetRightMargin(0.13); + c[0]->SetGridx(); + + diffmap_EB->GetXaxis()->SetNdivisions(1020); + diffmap_EB->GetXaxis() -> SetLabelSize(0.03); + diffmap_EB->GetXaxis() ->SetTitle("i#phi"); + diffmap_EB->GetYaxis() ->SetTitle("i#eta"); + diffmap_EB->GetZaxis() ->SetRangeUser(-0.1,0.1); + diffmap_EB->Draw("COLZ"); + + c[1] = new TCanvas("histdiffEB","histdiffEB"); + c[1]->SetLeftMargin(0.1); + c[1]->SetRightMargin(0.13); + c[1]->SetLogy(); + + diffHistEB->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); + diffHistEB->Draw(); + + + c[2] = new TCanvas("hratioEB","hratioEB"); + c[2]->SetLeftMargin(0.1); + c[2]->SetRightMargin(0.13); + c[2]->SetGridx(); + + ratiomap_EB->GetXaxis()->SetNdivisions(1020); + ratiomap_EB->GetXaxis() -> SetLabelSize(0.03); + ratiomap_EB->GetXaxis() ->SetTitle("i#phi"); + ratiomap_EB->GetYaxis() ->SetTitle("i#eta"); + ratiomap_EB->GetZaxis() ->SetRangeUser(0.95,1.05); + ratiomap_EB->Draw("COLZ"); + + c[3] = new TCanvas("correlationEB","correlationEB"); + c[3]->SetLeftMargin(0.1); + c[3]->SetRightMargin(0.13); + c[3]->SetGridx(); + c[3]->SetGridy(); + + correlationEB->GetXaxis()->SetNdivisions(1020); + correlationEB->GetXaxis() -> SetLabelSize(0.03); + correlationEB->GetXaxis() ->SetTitle("c_{#pi}"); + correlationEB->GetYaxis() ->SetTitle("c_{ele}"); + correlationEB->Draw("COLZ"); + + + c[4] = new TCanvas("hdiffEEp","hdiffEEp"); + c[4]->SetLeftMargin(0.1); + c[4]->SetRightMargin(0.13); + c[4]->SetGridx(); + + diffmap_EEp->GetXaxis()->SetNdivisions(1020); + diffmap_EEp->GetXaxis() -> SetLabelSize(0.03); + diffmap_EEp->GetXaxis() ->SetTitle("ix"); + diffmap_EEp->GetYaxis() ->SetTitle("iy"); + diffmap_EEp->GetZaxis() ->SetRangeUser(-0.15,0.15); + diffmap_EEp->Draw("COLZ"); + + c[5] = new TCanvas("histdiffEEp","histdiffEEp"); + c[5]->SetLeftMargin(0.1); + c[5]->SetRightMargin(0.13); + c[5]->SetLogy(); + + diffHistEEp->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); + diffHistEEp->Draw(); + + c[6] = new TCanvas("hratioEEp","hratioEEp"); + c[6]->SetLeftMargin(0.1); + c[6]->SetRightMargin(0.13); + c[6]->SetGridx(); + + ratiomap_EEp->GetXaxis()->SetNdivisions(1020); + ratiomap_EEp->GetXaxis() -> SetLabelSize(0.03); + ratiomap_EEp->GetXaxis() ->SetTitle("ix"); + ratiomap_EEp->GetYaxis() ->SetTitle("iy"); + ratiomap_EEp->GetZaxis() ->SetRangeUser(0.9,1.1); + ratiomap_EEp->Draw("COLZ"); + + c[7] = new TCanvas("correlationEEp","correlationEEp"); + c[7]->SetLeftMargin(0.1); + c[7]->SetRightMargin(0.13); + c[7]->SetGridx(); + c[7]->SetGridy(); + + correlationEEp->GetXaxis()->SetNdivisions(1020); + correlationEEp->GetXaxis() -> SetLabelSize(0.03); + correlationEEp->GetXaxis() ->SetTitle("c_{#pi}"); + correlationEEp->GetYaxis() ->SetTitle("c_{ele}"); + correlationEEp->Draw("COLZ"); + + c[8] = new TCanvas("hdiffEEm","hdiffEEm"); + c[8]->SetLeftMargin(0.1); + c[8]->SetRightMargin(0.13); + c[8]->SetGridx(); + + diffmap_EEm->GetXaxis()->SetNdivisions(1020); + diffmap_EEm->GetXaxis() -> SetLabelSize(0.03); + diffmap_EEm->GetXaxis() ->SetTitle("ix"); + diffmap_EEm->GetYaxis() ->SetTitle("iy"); + diffmap_EEm->GetZaxis() ->SetRangeUser(-0.15,0.15); + diffmap_EEm->Draw("COLZ"); + + c[9] = new TCanvas("histdiffEEm","histdiffEEm"); + c[9]->SetLeftMargin(0.1); + c[9]->SetRightMargin(0.13); + c[9]->SetLogy(); + + diffHistEEm->GetXaxis()->SetTitle("c_{#pi}-c_{ele}"); + diffHistEEm->Draw(); + + + + c[10] = new TCanvas("hratioEEm","hratioEEm"); + c[10]->SetLeftMargin(0.1); + c[10]->SetRightMargin(0.13); + c[10]->SetGridx(); + + ratiomap_EEm->GetXaxis()->SetNdivisions(1020); + ratiomap_EEm->GetXaxis() -> SetLabelSize(0.03); + ratiomap_EEm->GetXaxis() ->SetTitle("ix"); + ratiomap_EEm->GetYaxis() ->SetTitle("iy"); + ratiomap_EEm->GetZaxis() ->SetRangeUser(0.9,1.1); + ratiomap_EEm->Draw("COLZ"); + + c[11] = new TCanvas("correlationEEm","correlationEEm"); + c[11]->SetLeftMargin(0.1); + c[11]->SetRightMargin(0.13); + c[11]->SetGridx(); + c[11]->SetGridy(); + + correlationEEm->GetXaxis()->SetNdivisions(1020); + correlationEEm->GetXaxis() -> SetLabelSize(0.03); + correlationEEm->GetXaxis() ->SetTitle("c_{#pi}"); + correlationEEm->GetYaxis() ->SetTitle("c_{ele}"); + correlationEEm->Draw("COLZ"); + + + c[12] = new TCanvas("phiProjectionEB","phiProjectionEB"); + c[12]->SetGridx(); + c[12]->SetGridy(); + phiProjectionEB1->GetHistogram()->GetYaxis()-> SetRangeUser(0.85,1.1); + phiProjectionEB1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); + phiProjectionEB1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + phiProjectionEB1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); + phiProjectionEB1->Draw("apl"); + phiProjectionEB2->Draw("plsame"); + + TLegend * leg1 = new TLegend(0.75,0.75,0.89, 0.89); + leg1->AddEntry(phiProjectionEB1,"IC set 1","LP"); + leg1->AddEntry(phiProjectionEB2,"IC set 2","LP"); + leg1->SetFillColor(0); + leg1->Draw("same"); + + c[13] = new TCanvas("phiProjectionEEp","phiProjectionEEp"); + c[13]->SetGridx(); + c[13]->SetGridy(); + phiProjectionEEp1->GetHistogram()->GetYaxis()-> SetRangeUser(0.7,1.4); + phiProjectionEEp1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); + phiProjectionEEp1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + phiProjectionEEp1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); + phiProjectionEEp1->Draw("apl"); + phiProjectionEEp2->Draw("plsame"); + + TLegend * leg2 = new TLegend(0.75,0.75,0.89, 0.89); + leg2->AddEntry(phiProjectionEEp1,"IC set 1","LP"); + leg2->AddEntry(phiProjectionEEp2,"IC set 2","LP"); + leg2->SetFillColor(0); + leg2->Draw("same"); + + + c[14] = new TCanvas("phiProjectionEEm","phiProjectionEEm"); + c[14]->SetGridx(); + c[14]->SetGridy(); + phiProjectionEEm1->GetHistogram()->GetYaxis()-> SetRangeUser(0.7,1.4); + phiProjectionEEm1->GetHistogram()->GetXaxis()-> SetRangeUser(1,361); + phiProjectionEEm1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + phiProjectionEEm1->GetHistogram()->GetXaxis()-> SetTitle("i#phi"); + phiProjectionEEm1->Draw("apl"); + phiProjectionEEm2->Draw("plsame"); + + TLegend * leg3 = new TLegend(0.75,0.75,0.89, 0.89); + leg3->AddEntry(phiProjectionEEm1,"IC set 1","LP"); + leg3->AddEntry(phiProjectionEEm2,"IC set 2","LP"); + leg3->SetFillColor(0); + leg3->Draw("same"); + + c[15] = new TCanvas("etaProjectionEB","etaProjectionEB"); + c[15]->SetGridx(); + c[15]->SetGridy(); + etaProjectionEB1->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); + etaProjectionEB1->GetHistogram()->GetXaxis()-> SetRangeUser(0,171); + etaProjectionEB1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + etaProjectionEB1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + etaProjectionEB1->Draw("apl"); + etaProjectionEB2->Draw("plsame"); + + TLegend * leg4 = new TLegend(0.75,0.75,0.89, 0.89); + leg4->AddEntry(etaProjectionEB1,"IC set 1","LP"); + leg4->AddEntry(etaProjectionEB2,"IC set 2","LP"); + leg4->SetFillColor(0); + leg1->Draw("same"); + + c[16] = new TCanvas("etaProjectionEEp","etaProjectionEEp"); + c[16]->SetGridx(); + c[16]->SetGridy(); + etaProjectionEEp1->GetHistogram()->GetYaxis()-> SetRangeUser(0.55,1.5); + etaProjectionEEp1->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); + etaProjectionEEp1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + etaProjectionEEp1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + etaProjectionEEp1->Draw("apl"); + etaProjectionEEp2->Draw("plsame"); + + TLegend * leg5 = new TLegend(0.75,0.75,0.89, 0.89); + leg5->AddEntry(etaProjectionEEp1,"IC set 1","LP"); + leg5->AddEntry(etaProjectionEEp2,"IC set 2","LP"); + leg5->SetFillColor(0); + leg5->Draw("same"); + + + c[17] = new TCanvas("etaProjectionEEm","etaProjectionEEm"); + c[17]->SetGridx(); + c[17]->SetGridy(); + etaProjectionEEm1->GetHistogram()->GetYaxis()-> SetRangeUser(0.55,1.5); + etaProjectionEEm1->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); + etaProjectionEEm1->GetHistogram()->GetYaxis()-> SetTitle("Mean IC"); + etaProjectionEEm1->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + etaProjectionEEm1->Draw("apl"); + etaProjectionEEm2->Draw("plsame"); + + TLegend * leg6 = new TLegend(0.75,0.75,0.89, 0.89); + leg6->AddEntry(etaProjectionEEm1,"IC set 1","LP"); + leg6->AddEntry(etaProjectionEEm2,"IC set 2","LP"); + leg6->SetFillColor(0); + leg6->Draw("same"); + + c[18] = new TCanvas("phiProfileEB","phiProfileEB"); + c[18]->SetGridx(); + c[18]->SetGridy(); + phiProfileEB1->GetXaxis()->SetTitle("#bar{IC}"); + phiProfileEB1->SetLineColor(kBlue); + phiProfileEB1->SetMarkerSize(0.8); + phiProfileEB1->SetLineWidth(2); + phiProfileEB2->SetLineColor(kRed); + phiProfileEB2->SetMarkerSize(0.8); + phiProfileEB2->SetLineWidth(2); + phiProfileEB1->Draw(); + phiProfileEB2->Draw("same"); + + TLegend * leg7 = new TLegend(0.6,0.7,0.89, 0.89); + leg7->SetFillColor(0); + leg7->AddEntry(phiProfileEB1,"EB Projection I set ", "LP"); + leg7->AddEntry(phiProfileEB2,"EB Projection II set ", "LP"); + leg7->Draw("same"); + + c[19] = new TCanvas("phiProfileEEp","phiProfileEEp"); + c[19]->SetGridx(); + c[19]->SetGridy(); + phiProfileEEp1->GetXaxis()->SetTitle("#bar{IC}"); + phiProfileEEp1->SetLineColor(kBlue); + phiProfileEEp1->SetMarkerSize(0.8); + phiProfileEEp1->SetLineWidth(2); + phiProfileEEp2->SetLineColor(kRed); + phiProfileEEp2->SetMarkerSize(0.8); + phiProfileEEp2->SetLineWidth(2); + phiProfileEEp1->Draw(); + phiProfileEEp2->Draw("same"); + + TLegend * leg8 = new TLegend(0.6,0.7,0.89, 0.89); + leg8->SetFillColor(0); + leg8->AddEntry(phiProfileEEp1,"EE+ Projection I set ", "LP"); + leg8->AddEntry(phiProfileEEp2,"EE+ Projection II set ", "LP"); + leg8->Draw("same"); + + c[20] = new TCanvas("phiProfileEEm","phiProfileEEm"); + c[20]->SetGridx(); + c[20]->SetGridy(); + phiProfileEEm1->GetXaxis()->SetTitle("#bar{IC}"); + phiProfileEEm1->SetLineColor(kBlue); + phiProfileEEm1->SetMarkerSize(0.8); + phiProfileEEm1->SetLineWidth(2); + phiProfileEEm2->SetLineColor(kRed); + phiProfileEEm2->SetMarkerSize(0.8); + phiProfileEEm2->SetLineWidth(2); + phiProfileEEm1->Draw(); + phiProfileEEm2->Draw("same"); + + TLegend * leg9 = new TLegend(0.6,0.7,0.89, 0.89); + leg9->SetFillColor(0); + leg9->AddEntry(phiProfileEEm1,"EE- Projection I set ", "LP"); + leg9->AddEntry(phiProfileEEm2,"EE- Projection II set ", "LP"); + leg9->Draw("same"); + + c[21] = new TCanvas("etaProfileEB","etaProfileEB"); + c[21]->SetGridx(); + c[21]->SetGridy(); + etaProfileEB1->GetXaxis()->SetTitle("#bar{IC}"); + etaProfileEB1->SetLineColor(kBlue); + etaProfileEB1->SetMarkerSize(0.8); + etaProfileEB1->SetLineWidth(2); + etaProfileEB2->SetLineColor(kRed); + etaProfileEB2->SetMarkerSize(0.8); + etaProfileEB2->SetLineWidth(2); + etaProfileEB1->Draw(); + etaProfileEB2->Draw("same"); + + TLegend * leg10 = new TLegend(0.6,0.7,0.89, 0.89); + leg10->SetFillColor(0); + leg10->AddEntry(etaProfileEB1,"EB Projection I set ", "LP"); + leg10->AddEntry(etaProfileEB2,"EB Projection II set ", "LP"); + leg10->Draw("same"); + + c[22] = new TCanvas("etaProfileEEp","etaProfileEEp"); + c[22]->SetGridx(); + c[22]->SetGridy(); + etaProfileEEp1->GetXaxis()->SetTitle("#bar{IC}"); + etaProfileEEp1->SetLineColor(kBlue); + etaProfileEEp1->SetMarkerSize(0.8); + etaProfileEEp1->SetLineWidth(2); + etaProfileEEp2->SetLineColor(kRed); + etaProfileEEp2->SetMarkerSize(0.8); + etaProfileEEp2->SetLineWidth(2); + etaProfileEEp1->Draw(); + etaProfileEEp2->Draw("same"); + + TLegend * leg11 = new TLegend(0.6,0.7,0.89, 0.89); + leg11->SetFillColor(0); + leg11->AddEntry(phiProfileEEp1,"EE+ Projection I set ", "LP"); + leg11->AddEntry(phiProfileEEp2,"EE+ Projection II set ", "LP"); + leg11->Draw("same"); + + c[23] = new TCanvas("etaProfileEEm","etaProfileEEm"); + c[23]->SetGridx(); + c[23]->SetGridy(); + etaProfileEEm1->GetXaxis()->SetTitle("#bar{IC}"); + etaProfileEEm1->SetLineColor(kBlue); + etaProfileEEm1->SetMarkerSize(0.8); + etaProfileEEm1->SetLineWidth(2); + etaProfileEEm2->SetLineColor(kRed); + etaProfileEEm2->SetMarkerSize(0.8); + etaProfileEEm2->SetLineWidth(2); + etaProfileEEm1->Draw(); + etaProfileEEm2->Draw("same"); + + TLegend * leg12 = new TLegend(0.6,0.7,0.89, 0.89); + leg12->SetFillColor(0); + leg12->AddEntry(phiProfileEEm1,"EE- Projection I set ", "LP"); + leg12->AddEntry(phiProfileEEm2,"EE- Projection II set ", "LP"); + leg12->Draw("same"); + +theApp->Run(); + +return 0; + +} + + diff --git a/EOverPCalibration/bin/CompareSCalibMCTruth_EB.cpp b/EOverPCalibration/bin/CompareSCalibMCTruth_EB.cpp new file mode 100644 index 00000000000..881e2e8d9d8 --- /dev/null +++ b/EOverPCalibration/bin/CompareSCalibMCTruth_EB.cpp @@ -0,0 +1,256 @@ +/// Stand-alone program for compare calibration result obtained on MC with +/// the original configuration for EB Input: IC 2D map after L3 calib + +#include +#include "TH2F.h" +#include "TH1F.h" +#include "TCanvas.h" +#include "TFile.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TGraphErrors.h" +#include "TF1.h" +#include "TApplication.h" + +#include "../../NtuplePackage/interface/ntpleUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + + +int main(int argc, char**argv){ + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + + /// Input File MCTruth IC Map , RECO IC map, MC IC set after calibration (Usually set with miscalibration 5%) + /// and StatPrecision IC coefficient obtained from CalibrationBarrel.cpp + + if(argc != 2){ + std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + + std::string inputFile = "NULL"; + if(Options.existsAs("inputFile")) + inputFile = Options.getParameter("inputFile"); + + std::string fileMCTruth = "NULL"; + if(Options.existsAs("fileMCTruth")) + fileMCTruth = Options.getParameter("fileMCTruth"); + + std::string fileMCRecoIC = "NULL"; + if(Options.existsAs("fileMCRecoIC")) + fileMCRecoIC = Options.getParameter("fileMCRecoIC"); + + std::string fileStatPrecision = "NULL"; + if(Options.existsAs("fileStatPrecision")) + fileStatPrecision = Options.getParameter("fileStatPrecision"); + + TApplication* theApp = new TApplication("Application",&argc, argv); + + + TFile *f1 = TFile::Open(fileMCTruth.c_str()); + TFile *f2 = TFile::Open(fileMCRecoIC.c_str()); + TFile *f3 = TFile::Open(inputFile.c_str()); + TFile *f4 = TFile::Open(fileStatPrecision.c_str()); + + if( f1 ==0 || f2 == 0 || f3 == 0 || f4 == 0) return -1; + + TH2F *hcmapMcT = (TH2F*)f1->Get("h_scale_map"); + TH2F *hcmapMcR = (TH2F*)f2->Get("h_scale_map"); + + TH2F * hcmap1 = (TH2F*)hcmapMcT->Clone("hcmap1"); + hcmap1->Reset(); + TH1F * hringdiff = new TH1F("hringdiff","difference of ring average",100,-0.1,0.1); + + for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ + for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ + hcmap1->SetBinContent(ibin,jbin,hcmapMcT->GetBinContent(ibin,jbin)/hcmapMcR->GetBinContent(ibin,jbin)); + } + } + + + TH2F * miscalib_map = (TH2F*) f3 -> Get("h_scalib_EB"); + TH2F *hcL3 = (TH2F*)f3->Get("h_scale_map"); + + TH2F *hcmap2 = (TH2F*)hcL3 ->Clone("hcmap2"); + hcmap2->Reset(); + + for (int jbin = 1; jbin < hcmap2-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ + hcmap2->SetBinContent(ibin,jbin,miscalib_map->GetBinContent(ibin,jbin)*hcL3->GetBinContent(ibin,jbin)); + } + } + + /// IC Histogramm in Eta ring and 2D map difference + TH2F * h2 = new TH2F("h2","h2",400,0.5,1.5,400,0.5,1.5); + TH2F * h2diff = (TH2F*)hcmap1->Clone("h2diff"); + h2diff->Reset(); + TH1F *hdiff = new TH1F("hdiff", "hdiff", 400,-0.5,0.5); + + char hname[100]; + + TH1F *hspread[172]; + for (int jbin = 1; jbin < hcmap1-> GetNbinsY()+1; jbin++){ + int etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hspread_ring_ieta%02d",etaring); + hspread[jbin-1]= new TH1F(hname, hname, 400,-0.5,0.5); + } + + for (int jbin = 1; jbin < hcmap1-> GetNbinsY()+1; jbin++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ + float c1 = hcmap1->GetBinContent(ibin,jbin); + float c2 = hcmap2->GetBinContent(ibin,jbin); + if (c1!=0 && c2!=0 ){ + hspread[jbin-1]->Fill( c1-c2 ); + h2->Fill(c1,c2); + h2diff->SetBinContent(ibin,jbin,c1-c2); + if (fabs(etaring) < 40) hdiff->Fill(c1-c2); + + } + } + } + + /// Final Plot in eta ring (stat prescision and scale) + TGraphErrors *sigma_vs_ieta = new TGraphErrors(); + sigma_vs_ieta->SetMarkerStyle(20); + sigma_vs_ieta->SetMarkerSize(1); + sigma_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *rms_vs_ieta = new TGraphErrors(); + rms_vs_ieta->SetMarkerStyle(24); + rms_vs_ieta->SetMarkerSize(1); + rms_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_ieta = new TGraphErrors(); + scale_vs_ieta->SetMarkerStyle(20); + scale_vs_ieta->SetMarkerSize(1); + scale_vs_ieta->SetMarkerColor(kBlue+2); + + /// Gaussian Fit of spread coefficient dstribution + TF1 *fgaus = new TF1("fgaus","gaus",-1,1); + int np = 0; + for (int i = 1; i < hcmap1-> GetNbinsY()+1; i++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(i); + if (etaring==0.5) continue; + if ( hspread[i-1]->GetEntries() == 0) {sigma_vs_ieta-> SetPoint(np,etaring,-100);np++;continue;} + hspread[i-1]->Fit("fgaus","Q"); + sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + sigma_vs_ieta-> SetPointError(np,0,fgaus->GetParError(2)); + rms_vs_ieta -> SetPoint(np,etaring, hspread[i-1]->GetRMS()); + rms_vs_ieta -> SetPointError(np,0,hspread[i-1]->GetRMSError() ); + scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); + scale_vs_ieta-> SetPointError(np,0,fgaus->GetParError(1)); + if( fabs(etaring) < 20 ){hringdiff->Fill( fgaus->GetParameter(1) );} + np++; + } + + /// Final Plot + TGraphErrors* gr_stat_prec = (TGraphErrors*) f4->Get("gr_stat_prec"); + TCanvas *csigma = new TCanvas("csigma","csigma"); + csigma->SetGridx(); + csigma->SetGridy(); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + sigma_vs_ieta->Draw("ap"); + rms_vs_ieta->Draw("psame"); + gr_stat_prec->Draw("psame"); + + + /// Residual Plot (spread - statistical precision) + TGraphErrors* residual = new TGraphErrors(); + + for(int pp=0; pp< gr_stat_prec->GetN(); pp++){ + double eta1, eta2,tot, stat; + gr_stat_prec->GetPoint(pp, eta1, stat); + sigma_vs_ieta->GetPoint(pp, eta2, tot); + if(eta1 != eta2){cout<<"error different ring "< 0) res = sqrt(res); + else res = -sqrt(fabs(res)); + double errres = sqrt( pow(tot*sigma_vs_ieta->GetErrorY(pp),2) +pow(stat*gr_stat_prec->GetErrorY(pp),2))/fabs(res); + residual->SetPoint(pp,eta1,res); + residual->SetPointError(pp,0,errres); + } + + /// Residual spread plot + TCanvas *cres = new TCanvas("cres","cresidual"); + cres->SetGridx(); + cres->SetGridy(); + residual->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual->GetHistogram()->GetYaxis()-> SetTitle("residual"); + residual->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + residual ->SetMarkerStyle(20); + residual->SetMarkerSize(1); + residual->SetMarkerColor(kGreen+2); + residual->GetYaxis()->SetTitle("residual"); + residual->GetXaxis()->SetTitle("i#eta"); + residual->Draw("ap"); + + /// scale vs eta plot + TCanvas *cscale = new TCanvas("cscale","cscale"); + cscale->SetGridx(); + cscale->SetGridy(); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + scale_vs_ieta->Draw("ap"); + + /// IC Diff map + TCanvas *cmap2 = new TCanvas("cmap2","cmap2",500,500); + cmap2->SetGridx(); + cmap2->SetGridy(); + cmap2 -> cd(); + cmap2->SetLeftMargin(0.1); + cmap2->SetRightMargin(0.15); + h2->GetXaxis()->SetRangeUser(0.85,1.15); + h2->GetYaxis()->SetRangeUser(0.85,1.15); + h2->GetXaxis()->SetTitle("C_{1}"); + h2->GetYaxis()->SetTitle("C_{2}"); + h2->Draw("colz"); + + TCanvas *cdiff = new TCanvas("cdiff","cdiff",700,500); + cdiff->SetGridx(); + cdiff->SetGridy(); + cdiff -> cd(); + cdiff->SetLeftMargin(0.1); + cdiff->SetRightMargin(0.15); + h2diff->GetZaxis()->SetRangeUser(-0.05,0.05); + h2diff->GetXaxis()->SetTitle("i#phi"); + h2diff->GetYaxis()->SetTitle("i#eta"); + h2diff->Draw("colz"); + + theApp->Run(); + + return 0; +} diff --git a/EOverPCalibration/bin/CompareSCalibMCTruth_EE.cpp b/EOverPCalibration/bin/CompareSCalibMCTruth_EE.cpp new file mode 100644 index 00000000000..25c0d76a8bf --- /dev/null +++ b/EOverPCalibration/bin/CompareSCalibMCTruth_EE.cpp @@ -0,0 +1,612 @@ +/// Stand-alone program for compare calibration result obtained on MC with +/// the original configuration for EE Input: IC 2D map after L3 calib + +#include +#include +#include +#include "TH2F.h" +#include "TH1F.h" +#include "TCanvas.h" +#include "TFile.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TGraphErrors.h" +#include "TF1.h" +#include "TApplication.h" +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/TEndcapRings.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + +int main (int argc, char **argv) { + + /// Input File MCTruth IC Map , RECO IC map, MC IC set after calibration (Usually set with miscalibration 5%) + /// and StatPrecision IC coefficient obtained from DrawCalibrationPlotsEE.C + + if(argc != 2){ + std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + + std::string inputFile = "NULL"; + if(Options.existsAs("inputFile")) + inputFile = Options.getParameter("inputFile"); + + std::string inputMomentumScale = "NULL"; + if(Options.existsAs("inputMomentumScale")) + inputMomentumScale = Options.getParameter("inputMomentumScale"); + + std::string fileMCTruth = "NULL"; + if(Options.existsAs("fileMCTruth")) + fileMCTruth = Options.getParameter("fileMCTruth"); + + std::string fileMCRecoIC = "NULL"; + if(Options.existsAs("fileMCRecoIC")) + fileMCRecoIC = Options.getParameter("fileMCRecoIC"); + + std::string fileStatPrecision = "NULL"; + if(Options.existsAs("fileStatPrecision")) + fileStatPrecision = Options.getParameter("fileStatPrecision"); + + std::string outputFile = "NULL"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + TApplication* theApp = new TApplication("Application",&argc, argv); + + TFile *f1 = TFile::Open(fileMCTruth.c_str()); + TFile *f2 = TFile::Open(fileMCRecoIC.c_str()); + /// L3 result MC endcap + TFile *f3 = TFile::Open(inputFile.c_str()); + /// File form momentum scale correction + TFile* input = new TFile(inputMomentumScale.c_str()); + /// Statistical Precision map + TFile *f4 = TFile::Open(fileStatPrecision.c_str()); + + if(f1==0 || f2==0 || f3==0 || f4==0) return -1; + + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + + + /// input coeff map for EEP and EEM + + TH2F *hcmapMcT_EEP = (TH2F*)f1->Get("h_scale_EEP"); + TH2F *hcmapMcT_EEM = (TH2F*)f1->Get("h_scale_EEM"); + TH2F *hcmapMcR_EEP = (TH2F*)f2->Get("h_scale_EEP"); + TH2F *hcmapMcR_EEM = (TH2F*)f2->Get("h_scale_EEM"); + + TH2F * hcmap_EEP = (TH2F*)hcmapMcT_EEP->Clone("hcmap_EEP"); + TH2F * hcmap_EEM = (TH2F*)hcmapMcT_EEM->Clone("hcmap_EEM"); + + hcmap_EEP->Reset(); + hcmap_EEM->Reset(); + + for (int jbin = 1; jbin < hcmap_EEP-> GetNbinsY(); jbin++){ + for (int ibin = 1; ibin < hcmap_EEM-> GetNbinsX()+1; ibin++){ + + if(hcmapMcT_EEP->GetBinContent(ibin,jbin)!=0 && hcmapMcR_EEP->GetBinContent(ibin,jbin)!=0) + hcmap_EEP->SetBinContent(ibin,jbin,hcmapMcT_EEP->GetBinContent(ibin,jbin)/hcmapMcR_EEP->GetBinContent(ibin,jbin)); + if(hcmapMcT_EEM->GetBinContent(ibin,jbin)!=0 && hcmapMcR_EEM->GetBinContent(ibin,jbin)!=0) + hcmap_EEM->SetBinContent(ibin,jbin,hcmapMcT_EEM->GetBinContent(ibin,jbin)/hcmapMcR_EEM->GetBinContent(ibin,jbin)); + } + } + + /// Scalib and L3 map Normalized for EE+ and EE- + + TH2F * miscalib_map_EEP = (TH2F*) f3 -> Get("h_scalib_EEP"); + TH2F * miscalib_map_EEM = (TH2F*) f3 -> Get("h_scalib_EEM"); + + TH2F *hcL3_EEP = (TH2F*)f3->Get("h_scale_map_EEP"); + TH2F *hcL3_EEM = (TH2F*)f3->Get("h_scale_map_EEM"); + + TH2F *hcmap2_EEP = (TH2F*)hcL3_EEP ->Clone("hcmap2_EEP"); + TH2F *hcmap2_EEM = (TH2F*)hcL3_EEM ->Clone("hcmap2_EEM"); + + hcmap2_EEP->Reset(); + hcmap2_EEM->Reset(); + + + /// Momentum scale correction + + TGraphErrors* g_EoP_EE = (TGraphErrors*) input->Get("g_EoP_EE_0"); + TGraphErrors* PhiProjectionEEp = new TGraphErrors(); + TGraphErrors* PhiProjectionEEm = new TGraphErrors(); + + PhiProjectionEEp->SetMarkerStyle(20); + PhiProjectionEEp->SetMarkerSize(1); + PhiProjectionEEp->SetMarkerColor(kRed); + + PhiProjectionEEm->SetMarkerStyle(20); + PhiProjectionEEm->SetMarkerSize(1); + PhiProjectionEEm->SetMarkerColor(kBlue); + + + TEndcapRings *eRings = new TEndcapRings(); + std::vector vectSum; + std::vector vectCounter; + + vectCounter.assign(g_EoP_EE->GetN(),0.); + vectSum.assign(g_EoP_EE->GetN(),0.); + + /// EE+ and EE- projection + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEM->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)/(360./g_EoP_EE->GetN())); + vectSum.at(iPhi)=vectSum.at(iPhi)+hcL3_EEM->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + + for(unsigned int i=0; iSetPoint(i,int(i*(360./g_EoP_EE->GetN())),vectSum.at(i)/vectCounter.at(i)); + + for(unsigned int i=0; iGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEP->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)/(360./g_EoP_EE->GetN())); + vectSum.at(iPhi)=vectSum.at(iPhi)+hcL3_EEP->GetBinContent(ix,iy); + vectCounter.at(iPhi)=vectCounter.at(iPhi)+1; + } + } + + + for(unsigned int i=0; iSetPoint(i,int(i*(360./g_EoP_EE->GetN())),vectSum.at(i)/vectCounter.at(i)); + + for(unsigned int i=0; iClone("mapMomentumCorrected_EEM"); + mapMomentumCorrected[1] = (TH2F*) hcL3_EEP->Clone("mapMomentumCorrected_EEP"); + mapMomentumCorrected[0]->Reset(); + mapMomentumCorrected[1]->Reset(); + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEM->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,-1)); + double xphi,yphi; + g_EoP_EE->GetPoint(int(iPhi/(360./PhiProjectionEEm->GetN())),xphi,yphi); + mapMomentumCorrected[0]->SetBinContent(ix,iy,hcL3_EEM->GetBinContent(ix,iy)*yphi); + } + } + + for(int ix=1; ixGetNbinsX()+1;ix++){ + for(int iy=1; iyGetNbinsY()+1;iy++){ + if(hcL3_EEP->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,1)); + double xphi,yphi; + g_EoP_EE->GetPoint(int(iPhi/(360./PhiProjectionEEp->GetN())),xphi,yphi); + mapMomentumCorrected[1]->SetBinContent(ix,iy,hcL3_EEP->GetBinContent(ix,iy)*yphi); + } + } + +/// Use momentum map corrected + + for (int jbin = 1; jbin < mapMomentumCorrected[1]-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < mapMomentumCorrected[1]-> GetNbinsX()+1; ibin++){ + if(miscalib_map_EEP->GetBinContent(ibin,jbin)!=0 && mapMomentumCorrected[1]->GetBinContent(ibin,jbin)!=0) + hcmap2_EEP->SetBinContent(ibin,jbin,miscalib_map_EEP->GetBinContent(ibin,jbin)*mapMomentumCorrected[1]->GetBinContent(ibin,jbin)); + if(miscalib_map_EEM->GetBinContent(ibin,jbin)!=0 && mapMomentumCorrected[0]->GetBinContent(ibin,jbin)!=0) + hcmap2_EEM->SetBinContent(ibin,jbin,miscalib_map_EEM->GetBinContent(ibin,jbin)*mapMomentumCorrected[0]->GetBinContent(ibin,jbin)); + } + } + + + /// output histos + + TH2F * h2_EEP = new TH2F("h2_EEP","h2_EEP",400,0.5,1.5,400,0.5,1.5); + TH2F * h2_EEM = new TH2F("h2_EEM","h2_EEM",400,0.5,1.5,400,0.5,1.5); + + TH2F * h2diff_EEP = (TH2F*)hcmap_EEP->Clone("h2diff_EEP"); + TH2F * h2diff_EEM = (TH2F*)hcmap_EEM->Clone("h2diff_EEM"); + + h2diff_EEP->Reset(); + h2diff_EEM->Reset(); + + char hname[100]; + + TH1F *hspread_EEP[40]; + TH1F *hspread_EEM[40]; + TH1F *hspread_All[40]; + + /// ring geometry for the endcap + + TH2F *hrings_EEP; + TH2F *hrings_EEM; + + hrings_EEP = (TH2F*)hcmap2_EEP->Clone("hringsEEP"); + hrings_EEM = (TH2F*)hcmap2_EEM->Clone("hringsEEM"); + hrings_EEP ->Reset(); + hrings_EEM ->Reset(); + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings_EEP->Fill(x,y,ir); + if(z<0) hrings_EEM->Fill(x,y,ir); + } + + /// spread IC histos + for (int jbin = 0; jbin < 40; jbin++){ + sprintf(hname,"hspread_ring_EEP_%02d",jbin); + hspread_EEP[jbin]= new TH1F(hname, hname, 75,0.5,1.5); + sprintf(hname,"hspread_ring_EEM_%02d",jbin); + hspread_EEM[jbin]= new TH1F(hname, hname, 75,0.5,1.5); + sprintf(hname,"hspread_ring_All_%02d",jbin); + hspread_All[jbin]= new TH1F(hname, hname, 75,0.5,1.5); + + } + + for (int jbin = 1; jbin < hcmap_EEP-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < hcmap_EEP-> GetNbinsX()+1; ibin++){ + + int mybin_EEP = hcmap_EEP -> FindBin(ibin,jbin); + int ring_EEP = int(hrings_EEP-> GetBinContent(mybin_EEP)); + float c1_EEP = hcmap_EEP->GetBinContent(mybin_EEP); + float c2_EEP = hcmap2_EEP->GetBinContent(mybin_EEP); + + int mybin_EEM = hcmap_EEM -> FindBin(ibin,jbin); + int ring_EEM = int(hrings_EEM-> GetBinContent(mybin_EEM)); + float c1_EEM = hcmap_EEM->GetBinContent(mybin_EEM); + float c2_EEM = hcmap2_EEM->GetBinContent(mybin_EEM); + + if (c1_EEP!=0 && c2_EEP!=0 ){ + ///Ratio betweem IC and not the difference + hspread_EEP[ring_EEP]->Fill(c1_EEP/c2_EEP); + hspread_All[ring_EEP]->Fill(c1_EEP/c2_EEP); + + h2_EEP->Fill(c1_EEP,c2_EEP); + h2diff_EEP->SetBinContent(ibin,jbin,c1_EEP/c2_EEP); + } + else h2diff_EEP->SetBinContent(ibin,jbin,0); + + if (c1_EEM!=0 && c2_EEM!=0 ){ + hspread_EEM[ring_EEM]->Fill(c1_EEM/c2_EEM); + hspread_All[ring_EEM]->Fill(c1_EEM/c2_EEM); + + h2_EEM->Fill(c1_EEM,c2_EEM); + h2diff_EEM->SetBinContent(ibin,jbin,c1_EEM/c2_EEM); + } + else h2diff_EEM->SetBinContent(ibin,jbin,0); + } + } + + /// TGraphErrors for final plot + TGraphErrors *sigma_vs_iring_EEP = new TGraphErrors(); + sigma_vs_iring_EEP->SetMarkerStyle(20); + sigma_vs_iring_EEP->SetMarkerSize(1); + sigma_vs_iring_EEP->SetMarkerColor(kBlue+2); + + TGraphErrors *sigma_vs_iring_EEM = new TGraphErrors(); + sigma_vs_iring_EEM->SetMarkerStyle(20); + sigma_vs_iring_EEM->SetMarkerSize(1); + sigma_vs_iring_EEM->SetMarkerColor(kBlue+2); + + TGraphErrors *sigma_vs_iring_All = new TGraphErrors(); + sigma_vs_iring_All->SetMarkerStyle(20); + sigma_vs_iring_All->SetMarkerSize(1); + sigma_vs_iring_All->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_iring_EEP = new TGraphErrors(); + scale_vs_iring_EEP->SetMarkerStyle(20); + scale_vs_iring_EEP->SetMarkerSize(1); + scale_vs_iring_EEP->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_iring_EEM = new TGraphErrors(); + scale_vs_iring_EEM->SetMarkerStyle(20); + scale_vs_iring_EEM->SetMarkerSize(1); + scale_vs_iring_EEM->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_iring_All = new TGraphErrors(); + scale_vs_iring_All->SetMarkerStyle(20); + scale_vs_iring_All->SetMarkerSize(1); + scale_vs_iring_All->SetMarkerColor(kBlue+2); + + /// Gauss function for fit + TF1 *fgaus_EEP = new TF1("fgaus_EEP","gaus",0.,2.); + TF1 *fgaus_EEM = new TF1("fgaus_EEM","gaus",0.,2.); + TF1 *fgaus_All = new TF1("fgaus_All","gaus",0.,2.); + + int np_EEP = 0; + int np_EEM = 0; + int np_All = 0; + for (int i = 0; i < 40; i++){ + if ( hspread_EEP[i]->GetEntries() == 0) {sigma_vs_iring_EEP-> SetPoint(np_EEP,i,-100);np_EEP++;continue;} + if ( hspread_EEM[i]->GetEntries() == 0) {sigma_vs_iring_EEM-> SetPoint(np_EEM,i,-100);np_EEM++;continue;} + if ( hspread_All[i]->GetEntries() == 0) {sigma_vs_iring_All-> SetPoint(np_All,i,-100);np_All++;continue;} + + hspread_EEP[i]->Fit("fgaus_EEP","QRME"); + hspread_EEM[i]->Fit("fgaus_EEM","QRME"); + hspread_All[i]->Fit("fgaus_All","QRME"); + TString Name = Form("c_%d",i); + + sigma_vs_iring_EEP-> SetPoint(np_EEP,i,fgaus_EEP->GetParameter(2)); + sigma_vs_iring_EEP-> SetPointError(np_EEP,0,fgaus_EEP->GetParError(2)); + + scale_vs_iring_EEP-> SetPoint(np_EEP,i,fgaus_EEP->GetParameter(1)); + scale_vs_iring_EEP-> SetPointError(np_EEP,0,fgaus_EEP->GetParError(1)); + + np_EEP++; + + sigma_vs_iring_EEM-> SetPoint(np_EEM,i,fgaus_EEM->GetParameter(2)); + sigma_vs_iring_EEM-> SetPointError(np_EEM,0,fgaus_EEM->GetParError(2)); + + scale_vs_iring_EEM-> SetPoint(np_EEM,i,fgaus_EEM->GetParameter(1)); + scale_vs_iring_EEM-> SetPointError(np_EEM,0,fgaus_EEM->GetParError(1)); + + np_EEM++; + + sigma_vs_iring_All-> SetPoint(np_All,i,fgaus_All->GetParameter(2)); + sigma_vs_iring_All-> SetPointError(np_All,0,fgaus_All->GetParError(2)); + + scale_vs_iring_All-> SetPoint(np_All,i,fgaus_All->GetParameter(1)); + scale_vs_iring_All-> SetPointError(np_All,0,fgaus_All->GetParError(1)); + + np_All++; + } + + /// For from statistical precision analysis + + TGraphErrors* gr_stat_prec_EEP = (TGraphErrors*) f4->Get("gr_stat_prec_EEP"); + TGraphErrors* gr_stat_prec_EEM = (TGraphErrors*) f4->Get("gr_stat_prec_EEM"); + TGraphErrors* gr_stat_prec_All = (TGraphErrors*) f4->Get("gr_stat_prec"); + + /// Residual Plot + TGraphErrors* residual_EEP = new TGraphErrors(); + TGraphErrors* residual_EEM = new TGraphErrors(); + TGraphErrors* residual_All = new TGraphErrors(); + + for(int pp=0; pp< gr_stat_prec_EEP->GetN(); pp++){ + double ring1, ring2,tot, stat, espread, estat,ex,res,eres; + + sigma_vs_iring_EEP->GetPoint(pp, ring2, tot); + espread = sigma_vs_iring_EEP-> GetErrorY(pp); + + gr_stat_prec_EEP->GetPoint(pp,ring1, stat); + estat = gr_stat_prec_EEP-> GetErrorY(pp); + + ex = gr_stat_prec_EEP-> GetErrorX(pp); + + if (tot > stat ){res = sqrt( tot*tot - stat*stat ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; + } + else {res = -sqrt( fabs(tot*tot - stat*stat) ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); + } + + residual_EEP->SetPoint(pp,ring1,res); + if(eres<0.01) residual_EEP->SetPointError(pp,ex,eres); + else residual_EEP->SetPointError(pp,ex,0.01); + } + + for(int pp=0; pp< gr_stat_prec_EEM->GetN(); pp++){ + double ring1, ring2,tot, stat, espread, estat,ex,res,eres; + + sigma_vs_iring_EEM->GetPoint(pp, ring2, tot); + espread = sigma_vs_iring_EEM-> GetErrorY(pp); + + gr_stat_prec_EEM->GetPoint(pp,ring1, stat); + estat = gr_stat_prec_EEM-> GetErrorY(pp); + + ex = gr_stat_prec_EEM-> GetErrorX(pp); + if (tot > stat ){res = sqrt( tot*tot - stat*stat ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; + } + else {res = -sqrt( fabs(tot*tot - stat*stat) ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); + } + residual_EEM->SetPoint(pp,ring1,res); + if(eres<0.01) residual_EEM->SetPointError(pp,ex,eres); + else residual_EEM->SetPointError(pp,ex,0.01); + } + + for(int pp=0; pp< gr_stat_prec_All->GetN(); pp++){ + double ring1, ring2,tot, stat, espread, estat,ex,res,eres; + + sigma_vs_iring_All->GetPoint(pp, ring2, tot); + espread = sigma_vs_iring_All-> GetErrorY(pp); + + gr_stat_prec_All->GetPoint(pp,ring1, stat); + estat = gr_stat_prec_All-> GetErrorY(pp); + + ex = gr_stat_prec_All-> GetErrorX(pp); + if (tot > stat ){ res = sqrt( tot*tot - stat*stat ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/res; + } + else {res = -sqrt( fabs(tot*tot - stat*stat) ); + eres = sqrt( pow(tot*espread,2) + pow(stat*estat,2))/fabs(res); + } + + residual_All->SetPoint(pp,ring1,res); + if(eres<0.01) residual_All->SetPointError(pp,ex,eres); + else residual_All->SetPointError(pp,ex,0.01); + + } + + /// Final Plot + TCanvas *cscale_EEP = new TCanvas("cscale_EEP","cscale_EEP"); + cscale_EEP->SetGridx(); + cscale_EEP->SetGridy(); + scale_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); + scale_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + scale_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetTitle("iring"); + scale_vs_iring_EEP->Draw("ap"); + + TCanvas *cscale_EEM = new TCanvas("cscale_EEM","cscale_EEM"); + cscale_EEM->SetGridx(); + cscale_EEM->SetGridy(); + scale_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(0.9,1.1); + scale_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + scale_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); + scale_vs_iring_EEM->Draw("ap"); + + TCanvas *cmap2_EEP = new TCanvas("cmap2_EEP","cmap2_EEP",500,500); + cmap2_EEP->SetGridx(); + cmap2_EEP->SetGridy(); + cmap2_EEP -> cd(); + cmap2_EEP->SetLeftMargin(0.1); + cmap2_EEP->SetRightMargin(0.15); + h2_EEP->GetXaxis()->SetRangeUser(0.85,1.15); + h2_EEP->GetYaxis()->SetRangeUser(0.85,1.15); + h2_EEP->GetXaxis()->SetTitle("C_{1}"); + h2_EEP->GetYaxis()->SetTitle("C_{2}"); + h2_EEP->Draw("colz"); + + TCanvas *cmap2_EEM = new TCanvas("cmap2_EEM","cmap2_EEM",500,500); + cmap2_EEM->SetGridx(); + cmap2_EEM->SetGridy(); + cmap2_EEM -> cd(); + cmap2_EEM->SetLeftMargin(0.1); + cmap2_EEM->SetRightMargin(0.15); + h2_EEM->GetXaxis()->SetRangeUser(0.85,1.15); + h2_EEM->GetYaxis()->SetRangeUser(0.85,1.15); + h2_EEM->GetXaxis()->SetTitle("C_{1}"); + h2_EEM->GetYaxis()->SetTitle("C_{2}"); + h2_EEM->Draw("colz"); + + TCanvas *cdiff_EEP = new TCanvas("cdiff_EEP","cdiff_EEP",700,500); + cdiff_EEP->SetGridx(); + cdiff_EEP->SetGridy(); + cdiff_EEP -> cd(); + cdiff_EEP->SetLeftMargin(0.1); + cdiff_EEP->SetRightMargin(0.15); + h2diff_EEP->GetZaxis()->SetRangeUser(0.5,1.6); + h2diff_EEP->GetXaxis()->SetTitle("ix"); + h2diff_EEP->GetYaxis()->SetTitle("iy"); + h2diff_EEP->Draw("colz"); + + TCanvas *cdiff_EEM = new TCanvas("cdiff_EEM","cdiff_EEM",700,500); + cdiff_EEM->SetGridx(); + cdiff_EEM->SetGridy(); + cdiff_EEM -> cd(); + cdiff_EEM->SetLeftMargin(0.1); + cdiff_EEM->SetRightMargin(0.15); + h2diff_EEM->GetZaxis()->SetRangeUser(0.5,1.6); + h2diff_EEM->GetXaxis()->SetTitle("ix"); + h2diff_EEM->GetYaxis()->SetTitle("iy"); + h2diff_EEM->Draw("colz"); + + TCanvas *csigma_EEP = new TCanvas("csigma_EEP","csigma_EEP"); + csigma_EEP->SetGridx(); + csigma_EEP->SetGridy(); + sigma_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + sigma_vs_iring_EEP->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_iring_EEP->GetHistogram()->GetXaxis()-> SetTitle("iring"); + sigma_vs_iring_EEP->Draw("ap"); + gr_stat_prec_EEP->Draw("psame"); + + TCanvas *csigma_EEM = new TCanvas("csigma_EEM","csigma_EEM"); + csigma_EEM->SetGridx(); + csigma_EEM->SetGridy(); + sigma_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + sigma_vs_iring_EEM->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_iring_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); + sigma_vs_iring_EEM->Draw("ap"); + gr_stat_prec_EEM->Draw("psame"); + + TCanvas *csigma_All= new TCanvas("csigma_All","csigma_Folded"); + csigma_All->SetGridx(); + csigma_All->SetGridy(); + sigma_vs_iring_All->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_iring_All->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + sigma_vs_iring_All->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_iring_All->GetHistogram()->GetXaxis()-> SetTitle("iring"); + sigma_vs_iring_All->Draw("ap"); + gr_stat_prec_All->Draw("psame"); + + TCanvas *cres_EEP = new TCanvas("cres_EEP","cresidual_EEP"); + cres_EEP->SetGridx(); + cres_EEP->SetGridy(); + residual_EEP->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual_EEP->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + residual_EEP-> SetTitle("residual EE+"); + residual_EEP-> SetTitle("iring"); + residual_EEP->SetMarkerStyle(20); + residual_EEP->SetMarkerSize(1); + residual_EEP->SetMarkerColor(kGreen+2); + residual_EEP->Draw("ap"); + + TCanvas *cres_EEM = new TCanvas("cres_EEM","cresidual_EEM"); + cres_EEM->SetGridx(); + cres_EEM->SetGridy(); + residual_EEM->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual_EEM->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + residual_EEM->GetHistogram()->GetYaxis()-> SetTitle("residual EE-"); + residual_EEM->GetHistogram()->GetXaxis()-> SetTitle("iring"); + residual_EEM ->SetMarkerStyle(20); + residual_EEM->SetMarkerSize(1); + residual_EEM->SetMarkerColor(kGreen+2); + residual_EEM->Draw("ap"); + + TCanvas *cres_All = new TCanvas("cres_All","cresidual_Folded"); + cres_All->SetGridx(); + cres_All->SetGridy(); + residual_All->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + residual_All->GetHistogram()->GetXaxis()-> SetRangeUser(0,40); + residual_All->GetYaxis()->SetTitle("residual EE Folded"); + residual_All->GetXaxis()->SetTitle("iring"); + residual_All->SetMarkerStyle(20); + residual_All->SetMarkerSize(1); + residual_All->SetMarkerColor(kGreen+2); + residual_All->Draw("ap"); + + /// save output result: + + TFile* output = new TFile(outputFile.c_str(),"RECREATE"); + output->cd(); + residual_EEM->Write("residual_EEM"); + residual_EEP->Write("residual_EEP"); + residual_All->Write("residual_All"); + + output->Close(); + + theApp->Run(); + + return 0; + +} diff --git a/EOverPCalibration/bin/DeadXtalAnalysisEB.cpp b/EOverPCalibration/bin/DeadXtalAnalysisEB.cpp new file mode 100644 index 00000000000..5c26987ec53 --- /dev/null +++ b/EOverPCalibration/bin/DeadXtalAnalysisEB.cpp @@ -0,0 +1,2313 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "TFile.h" +#include "TStyle.h" +#include "TMath.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TApplication.h" +#include "TEndcapRings.h" + +#include "ConfigParser.h" +#include "ntpleUtils.h" + + +int main (int argc, char** argv){ + + /* std::string ROOTStyle = getenv ("ROOTStyle"); + + gROOT->ProcessLine((".x "+ROOTStyle+"/rootLogon.C").c_str()); + gROOT->ProcessLine((".x "+ROOTStyle+"/rootPalette.C").c_str()); + gROOT->ProcessLine((".x "+ROOTStyle+"/rootColors.C").c_str()); + gROOT->ProcessLine((".x "+ROOTStyle+"/setTDRStyle.C").c_str()); + */ + + if(argc<2){ std::cout<<" Not correct number of input parameter --> Need Just one cfg file exit "< readStringOption("Input::inputList"); + std::string inputStandardMap = gConfigParser -> readStringOption("Input::inputStandardMap"); + + std::string DeadChannelMapName ; + try{ DeadChannelMapName = gConfigParser -> readStringOption("Input::DeadChannelMapName"); } + catch(char const* exceptionString ){ DeadChannelMapName = "h_map_Dead_Channels";} + + std::string ICMapName ; + try{ ICMapName = gConfigParser -> readStringOption("Input::ICMapName"); } + catch(char const* exceptionString ){ ICMapName = "h_scale_EB";} + + bool isDeadTriggerTower ; + try{ isDeadTriggerTower = gConfigParser -> readBoolOption("Input::isDeadTriggerTower"); } + catch(char const* exceptionString ){ isDeadTriggerTower = false;} + + std::vector EtaBinCenterDeadTT ; + try{ EtaBinCenterDeadTT = gConfigParser -> readDoubleListOption("Input::EtaBinCenterDeadTT"); } + catch(char const* exceptionString ){ EtaBinCenterDeadTT.push_back(-999);} + + int NPhiShift ; + try{ NPhiShift = gConfigParser -> readIntOption("Input::NPhiShift"); } + catch(char const* exceptionString ){ NPhiShift=14; } + + int PhiOffset ; + try{ PhiOffset = gConfigParser -> readIntOption("Input::PhiOffset"); } + catch(char const* exceptionString ){ PhiOffset=4; } + + bool icMapRatio ; + try{ icMapRatio = gConfigParser -> readBoolOption("Input::icMapRatio"); } + catch(char const* exceptionString ){ icMapRatio = true;} + + std::vector iEtaBinDivision ; + try{ iEtaBinDivision = gConfigParser -> readDoubleListOption("Input::iEtaBinDivision"); } + catch(char const* exceptionString ){ iEtaBinDivision.push_back(0); + iEtaBinDivision.push_back(20); + iEtaBinDivision.push_back(40); + iEtaBinDivision.push_back(60); + iEtaBinDivision.push_back(85); + } + + std::vector iPhiBinDivision ; + try{ iPhiBinDivision = gConfigParser -> readDoubleListOption("Input::iPhiBinDivision"); } + catch(char const* exceptionString ){ iPhiBinDivision.push_back(0); + iPhiBinDivision.push_back(90); + iPhiBinDivision.push_back(180); + iPhiBinDivision.push_back(270); + iPhiBinDivision.push_back(360); + } + + int NPhiSMBinDivision ; + try{ NPhiSMBinDivision = gConfigParser -> readIntOption("Input::NPhiSMBinDivision"); } + catch(char const* exceptionString ){ NPhiSMBinDivision = 5 ; } + + + int IPhiWindow ; + try{ IPhiWindow = gConfigParser -> readIntOption("Input::IPhiWindow"); } + catch(char const* exceptionString ){ IPhiWindow = 3;} + + int IEtaWindow ; + try{ IEtaWindow = gConfigParser -> readIntOption("Input::IEtaWindow"); } + catch(char const* exceptionString ){ IEtaWindow = 3;} + + std::string outputCanvasPlot ; + try{ outputCanvasPlot = gConfigParser -> readStringOption("Output::outputCanvasPlot"); } + catch(char const* exceptionString ){ outputCanvasPlot = "output/outDeadXtalPlots/";} + + std::cout<<"inputList : "<SetOptFit(111); + if(isDeadTriggerTower)gStyle->SetOptStat(111110); + else gStyle->SetOptStat(11110); + + + // ic map running a standard calibration without any dead channel + + TFile* inputFileStandardMap = new TFile(inputStandardMap.c_str(),"READ"); + inputFileStandardMap->cd(); + TH2F* ICMapEBStandard = (TH2F*) inputFileStandardMap->Get(ICMapName.c_str()) ; + + + std::ifstream inFile(inputList.c_str()); + std::string buffer; + + std::vector inputFileList ; + + if(!inFile.is_open()){ std::cout << "** ERROR: Can't open '" << inputList << "' for input" << std::endl; return -1;} + + std::cout<<"Input Files : "<> buffer; + if( buffer.at(0) == '#' ) continue; + std::cout< > ICCrystalEB (IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis + std::vector > ICCrystalEBP(IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis in EB+ + std::vector > ICCrystalEBM(IPhiWindow, std::vector (IEtaWindow) ); // for inclusive analysis in EB- + + // for differential eta and phi analysis + std::vector > > ICCrystalEB_EtaBinned(iEtaBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > ICCrystalEB_PhiBinned(iPhiBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > ICCrystalEB_SMBinned(int(20/NPhiSMBinDivision), std::vector >(IPhiWindow, std::vector (IEtaWindow))); + + + std::vector DeadCrystalEB(inputFileList.size()); + std::vector ICMapEB(inputFileList.size()); + + for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ + + for( int iEta = 0 ; iEta < IEtaWindow ; iEta ++) { + + if(isDeadTriggerTower) (ICCrystalEB.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_%d_%d",iPhi,iEta)).c_str(),"",10000,0,100); + else (ICCrystalEB.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); + (ICCrystalEB.at(iPhi)).at(iEta)->Sumw2(); + if(isDeadTriggerTower) (ICCrystalEBP.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBP_%d_%d",iPhi,iEta)).c_str(),"",500,0,5); + else (ICCrystalEBP.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBP_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); + (ICCrystalEBP.at(iPhi)).at(iEta)->Sumw2(); + if(isDeadTriggerTower) (ICCrystalEBM.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBM_%d_%d",iPhi,iEta)).c_str(),"",10000,0,100); + else (ICCrystalEBM.at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEBM_%d_%d",iPhi,iEta)).c_str(),"",100,0.95,1.4); + (ICCrystalEBM.at(iPhi)).at(iEta)->Sumw2(); + + for( int iEtaBin = 0; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + + if(isDeadTriggerTower) ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_EtaBin_%f_%f_iEta_%d_iPhi_%d",iEtaBinDivision.at(iEtaBin), + iEtaBinDivision.at(iEtaBin+1),iPhi,iEta)).c_str(),"",10000,0,100); + else ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_EtaBin_%f_%f_iEta_%d_iPhi_%d",iEtaBinDivision.at(iEtaBin), + iEtaBinDivision.at(iEtaBin+1),iPhi,iEta)).c_str(),"",100,0.95,1.4); + ((ICCrystalEB_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Sumw2(); + } + + for( int iPhiBin = 0; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + + if(isDeadTriggerTower) ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_PhiBin_%f_%f_iEta_%d_iPhi_%d",iPhiBinDivision.at(iPhiBin), + iPhiBinDivision.at(iPhiBin+1),iPhi,iEta)).c_str(),"",10000,0,100); + else ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)= new TH1F(std::string(Form("ICCrystalEB_PhiBin_%f_%f_iEta_%d_iPhi_%d",iPhiBinDivision.at(iPhiBin), + iPhiBinDivision.at(iPhiBin+1),iPhi,iEta)).c_str(),"",100,0.95,1.4); + ((ICCrystalEB_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Sumw2(); + + } + + for( int iSMBin = 0; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + + if(isDeadTriggerTower) ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_SMBin_%d_%d_iEta_%d_iPhi_%d",iSMBin*NPhiSMBinDivision, + (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",10000,0,100); + else ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TH1F(std::string(Form("ICCrystalEB_SMBin_%d_%d_iEta_%d_iPhi_%d",iSMBin*NPhiSMBinDivision, + (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",100,0.95,1.4); + ((ICCrystalEB_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Sumw2(); + + } + } + } + + for( unsigned int iFile = 0 ; iFile < inputFileList.size() ; iFile ++){ + + DeadCrystalEB.push_back((TH2F*) inputFileList.at(iFile)->Get(DeadChannelMapName.c_str())); + ICMapEB.push_back((TH2F*) inputFileList.at(iFile)->Get(ICMapName.c_str())); + + if(isDeadTriggerTower){ + + int PhiShift = 0 ; + if(TString(inputFileList.at(iFile)->GetName()).Contains("p1")) PhiShift = 1 ; + else if(TString(inputFileList.at(iFile)->GetName()).Contains("m1")) PhiShift = -1 ; + else if(TString(inputFileList.at(iFile)->GetName()).Contains("p2")) PhiShift = 2 ; + else if(TString(inputFileList.at(iFile)->GetName()).Contains("m2")) PhiShift = -2 ; + + for(int iEta = 0 ; iEta < int(EtaBinCenterDeadTT.size()) ; iEta ++ ){ + for( int iPhi = PhiOffset + PhiShift ; iPhi < 360 ; iPhi = iPhi + NPhiShift) { + + if(DeadCrystalEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)!=0 && EtaBinCenterDeadTT.at(iEta)!=0){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)<=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + } + else{ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)<=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + } + + int iEtaBin = 0 ; + int iPhiBin = 0 ; + + for( ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++){ + if(fabs(EtaBinCenterDeadTT.at(iEta)) > iEtaBinDivision.at(iEtaBin) && fabs(EtaBinCenterDeadTT.at(iEta)) <= iEtaBinDivision.at(iEtaBin+1)) break ; + } + + for( ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++){ + if(iPhi == 0) { iPhiBin = 0 ; break ; } + else if (iPhi == 360){ iPhiBin = int(iPhiBinDivision.size()-1) -1 ; break;} + else if(iPhi > iPhiBinDivision.at(iPhiBin) && iPhi <= iPhiBinDivision.at(iPhiBin+1)) break ; + } + + if(icMapRatio){ + if(ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)!=0){ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86) / + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86) / + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)/ + ICMapEBStandard->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); } + } + else{ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,EtaBinCenterDeadTT.at(iEta)+86)); + } + + for( int IPHI = iPhi - int((IPhiWindow-1)/2) ; IPHI <= iPhi + int((IPhiWindow-1)/2) ; IPHI ++){ + for( int IETA = EtaBinCenterDeadTT.at(iEta)+85 - int((IEtaWindow-1)/2) ; IETA <= EtaBinCenterDeadTT.at(iEta)+85 + int((IEtaWindow-1)/2) ; IETA ++){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + } + else{ + + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + if(fabs(EtaBinCenterDeadTT.at(iEta)+85)>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-(EtaBinCenterDeadTT.at(iEta)+85))]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + } + } + } + } + } + } + } + + else{ + for( int iPhi = 0 ; iPhi < 360 ; iPhi ++){ + for( int iEta = 0 ; iEta < 170 ; iEta ++){ + + if(DeadCrystalEB.back()->GetBinContent(iPhi+1,iEta+1)!=0 && iEta!=0){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + if(iEta <=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + } + else{ + ICCrystalEB[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + if(iEta <=85) ICCrystalEBM[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + else ICCrystalEBP[int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + } + + int iEtaBin = 0 ; + int iPhiBin = 0 ; + + for( ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++){ + if(fabs(iEta-85) > iEtaBinDivision.at(iEtaBin) && fabs(iEta-85) <= iEtaBinDivision.at(iEtaBin+1)) break ; + } + + for( ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++){ + if(iPhi == 0) { iPhiBin = 0 ; break ; } + else if (iPhi == 360){ iPhiBin = int(iPhiBinDivision.size()-1) -1 ; break;} + else if(iPhi > iPhiBinDivision.at(iPhiBin) && iPhi <= iPhiBinDivision.at(iPhiBin+1)) break ; + } + + if(icMapRatio){ + if(ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)!=0){ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1) / ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1) / ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)/ + ICMapEBStandard->GetBinContent(iPhi+1,iEta+1)); } + } + else{ + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill( ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)][int(IEtaWindow/2)]->Fill(ICMapEB.back()->GetBinContent(iPhi+1,iEta+1)); + } + + for( int IPHI = iPhi - int((IPhiWindow-1)/2) ; IPHI <= iPhi + int((IPhiWindow-1)/2) ; IPHI ++){ + for( int IETA = iEta - int((IEtaWindow-1)/2) ; IETA <= iEta + int((IEtaWindow-1)/2) ; IETA ++){ + + if(icMapRatio){ + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + if(iEta>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)/ + ICMapEBStandard->GetBinContent(IPHI+1,IETA+1)); + } + else{ + + ICCrystalEB[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + if(iEta>85) ICCrystalEBP[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + else ICCrystalEBM[int(IPhiWindow/2)+(IPHI-iPhi)][int((IEtaWindow)/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_EtaBinned[iEtaBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_PhiBinned[iPhiBin][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill( ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + + ICCrystalEB_SMBinned[int((iPhi%20)/NPhiSMBinDivision)][int(IPhiWindow/2)+(IPHI-iPhi)][int(IEtaWindow/2)+(IETA-iEta)]->Fill(ICMapEB.back()->GetBinContent(IPHI+1,IETA+1)); + } + } + } + } + } + } + } + } + + std::vector > Can (IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_EBP (IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_EBM (IPhiWindow,std::vector (IEtaWindow)); + std::vector > > Can_EtaBinned (iEtaBinDivision.size()-1,std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > Can_PhiBinned (iPhiBinDivision.size()-1,std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > Can_SMBinned (int(20/NPhiSMBinDivision) ,std::vector >(IPhiWindow, std::vector (IEtaWindow))); + + for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ + + for(int iEta = 0 ; iEta < IPhiWindow ; iEta ++){ + (Can.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_%d_%d",iPhi,iEta)).c_str(),"",500,500); + (Can_EBP.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EBP_%d_%d",iPhi,iEta)).c_str(),"",500,500); + (Can_EBM.at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EBM_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + for( int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin ++) + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_EtaBin_%d_%d_iPhi_%d_iEta_%d",int(iEtaBinDivision.at(iEtaBin)), + int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"",500,500); + + for( int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin ++) + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_PhiBin_%d_%d_iPhi_%d_iEta_%d",int(iPhiBinDivision.at(iPhiBin)), + int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"",500,500); + for( int iSMBin = 0 ; iSMBin < int(NPhiSMBinDivision-1) ; iSMBin ++) + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta) = new TCanvas(std::string(Form("Can_SMBin_%d_%d_iPhi_%d_iEta_%d",iSMBin*NPhiSMBinDivision, + (iSMBin+1)*NPhiSMBinDivision,iPhi,iEta)).c_str(),"",500,500); + } + } + + std::vector > GaussianFits (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits + std::vector > GaussianFits_EBP (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits + std::vector > GaussianFits_EBM (IPhiWindow, std::vector (IEtaWindow)); // inclusive fits + std::vector > > GaussianFits_EtaBinned (iEtaBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > GaussianFits_PhiBinned (iPhiBinDivision.size()-1, std::vector >(IPhiWindow, std::vector (IEtaWindow))); + std::vector > > GaussianFits_SMBinned (int(20/NPhiSMBinDivision), std::vector >(IPhiWindow, std::vector (IEtaWindow))); + + std::vector > MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_MeanIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_RMSIC_EtaBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_MeanIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_RMSIC_PhiBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + std::vector > Pol0_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_MeanIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol0_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol1_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + std::vector > Pol2_Gaus_RMSIC_SMBinned (IPhiWindow, std::vector (IEtaWindow)); + + + std::vector > Can_MeanIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_MeanIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_RMSIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_RMSIC_EtaBinned(IPhiWindow,std::vector (IEtaWindow)); + + std::vector > Can_MeanIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_MeanIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_RMSIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_RMSIC_PhiBinned(IPhiWindow,std::vector (IEtaWindow)); + + std::vector > Can_MeanIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_MeanIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_RMSIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + std::vector > Can_Gaus_RMSIC_SMBinned(IPhiWindow,std::vector (IEtaWindow)); + + TH1F* htemp1; + TH1F* htemp2; + TPaveStats* pave1, *pave2, *pave3; + + for( int iPhi = 0 ; iPhi < IPhiWindow ; iPhi ++){ + for( int iEta = 0 ; iEta < IEtaWindow ; iEta ++){ + + if(iPhi == int(IPhiWindow/2) && iEta == int(IEtaWindow/2)) continue ; + if(isDeadTriggerTower && ( int(fabs(iPhi-IPhiWindow/2)) < int(IPhiWindow/2-1) && int(fabs(iEta-IEtaWindow/2)) < int(IPhiWindow/2-1))) continue ; + + if(isDeadTriggerTower) GaussianFits[iPhi][iEta] = new TF1(std::string(Form("Gaus_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); + else GaussianFits[iPhi][iEta] = new TF1(std::string(Form("Gaus_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); + if(isDeadTriggerTower) GaussianFits_EBP[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBP_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); + else GaussianFits_EBP[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBP_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); + if(isDeadTriggerTower) GaussianFits_EBM[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBM_%d_%d",iPhi,iEta)).c_str(),"gaus",0.,5); + else GaussianFits_EBM[iPhi][iEta] = new TF1(std::string(Form("Gaus_EBM_%d_%d",iPhi,iEta)).c_str(),"gaus",0.9,1.5); + + for(int iEtaBin =0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + if(isDeadTriggerTower) GaussianFits_EtaBinned[iEtaBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_EtaBin_%d_%d_iPhi_%d_iEta_%d", + int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"gaus",0.,100); + else GaussianFits_EtaBinned[iEtaBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_EtaBin_%d_%d_iPhi_%d_iEta_%d", + int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)),iPhi,iEta)).c_str(),"gaus",0.9,1.4); + } + + for(int iPhiBin =0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + + if(isDeadTriggerTower) GaussianFits_PhiBinned[iPhiBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_PhiBin_%d_%d_iPhi_%d_iEta_%d", + int(iPhiBinDivision.at(iPhiBin)),int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"gaus",0.,100); + else GaussianFits_PhiBinned[iPhiBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_PhiBin_%d_%d_iPhi_%d_iEta_%d", + int(iPhiBinDivision.at(iPhiBin)),int(iPhiBinDivision.at(iPhiBin+1)),iPhi,iEta)).c_str(),"gaus",0.9,1.5); + } + + for(int iSMBin =0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + + if(isDeadTriggerTower) GaussianFits_SMBinned[iSMBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_SMBin_%d_%d_iPhi_%d_iEta_%d", + iSMBin*NPhiSMBinDivision,NPhiSMBinDivision*(iSMBin+1),iPhi,iEta)).c_str(),"gaus",0.,100); + else GaussianFits_SMBinned[iSMBin][iPhi][iEta] = new TF1(std::string(Form("Gaus_SMBin_%d_%d_iPhi_%d_iEta_%d", + iSMBin*NPhiSMBinDivision,NPhiSMBinDivision*(iSMBin+1),iPhi,iEta)).c_str(),"gaus",0.9,1.5); + } + + MeanIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_MeanIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + RMSIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_RMSIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + MeanIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_MeanIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + RMSIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_RMSIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + MeanIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_MeanIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + RMSIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_RMSIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iEtaBinDivision.size()-1),EtaBin); + Can_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",int(iPhiBinDivision.size()-1),PhiBin); + Can_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_MeanIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Gaus_RMSIC_SMBinned[iPhi][iEta] = new TH1F(std::string(Form("Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",int(20/NPhiSMBinDivision),0,int(20/NPhiSMBinDivision)); + Can_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TCanvas(std::string(Form("Can_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"",500,500); + + Pol0_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iEtaBinDivision.front(),iEtaBinDivision.back()); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_EtaBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iEtaBinDivision.front(),iEtaBinDivision.back()); + + Pol0_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",iPhiBinDivision.front(),iPhiBinDivision.back()); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_PhiBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",iPhiBinDivision.front(),iPhiBinDivision.back()); + + Pol0_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + Pol0_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_MeanIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol0_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol0",0,int(20/NPhiSMBinDivision)); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol1_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol1",0,int(20/NPhiSMBinDivision)); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] = new TF1(std::string(Form("Pol2_Gaus_RMSIC_SMBinned_%d_%d",iPhi,iEta)).c_str(),"pol2",0,int(20/NPhiSMBinDivision)); + + /// Original IC distribution + (Can.at(iPhi)).at(iEta)->cd(); + (Can.at(iPhi)).at(iEta)->SetGridx(); + (Can.at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB[iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB[iPhi][iEta]->SetLineWidth(2); + ICCrystalEB[iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB[iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB[iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){ + GaussianFits[iPhi][iEta]->SetLineColor(kBlue); + GaussianFits[iPhi][iEta]->SetLineWidth(2); + ICCrystalEB[iPhi][iEta]->Fit(GaussianFits[iPhi][iEta],"RMEQ"); + } + ICCrystalEB[iPhi][iEta]->Draw("E"); + ICCrystalEB[iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + (Can.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + (Can_EBP.at(iPhi)).at(iEta)->cd(); + (Can_EBP.at(iPhi)).at(iEta)->SetGridx(); + (Can_EBP.at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEBP[iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEBP[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBP[iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEBP[iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEBP[iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){ + GaussianFits_EBP[iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_EBP[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBP[iPhi][iEta]->Fit(GaussianFits_EBP[iPhi][iEta],"RMEQ"); + } + ICCrystalEBP[iPhi][iEta]->Draw("E"); + ICCrystalEBP[iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEBP[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + (Can_EBP.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBP.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_EBP.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBP.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + (Can_EBM.at(iPhi)).at(iEta)->cd(); + (Can_EBM.at(iPhi)).at(iEta)->SetGridx(); + (Can_EBM.at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEBM[iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEBM[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBM[iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEBM[iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEBM[iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){ + GaussianFits_EBM[iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_EBM[iPhi][iEta]->SetLineWidth(2); + ICCrystalEBM[iPhi][iEta]->Fit(GaussianFits_EBM[iPhi][iEta],"RMEQ"); + } + ICCrystalEBM[iPhi][iEta]->Draw("E"); + ICCrystalEBM[iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEBM[iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + (Can_EBM.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBM.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_EBM.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_EBM.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + /// Original IC distribution vs the chosen eta binning + for(int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->cd(); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->SetGridx(); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->Fit(GaussianFits_EtaBinned[iEtaBin][iPhi][iEta],"RMEQ"); + } + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->Draw("E"); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + ((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_EtaBinned.at(iEtaBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + } + + /// Mean IC vs Eta + + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + MeanIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + MeanIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + MeanIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + MeanIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < MeanIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + MeanIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetMean()); + MeanIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetMeanError()); + } + + + Pol0_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + MeanIC_EtaBinned[iPhi][iEta]->Fit(Pol2_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + MeanIC_EtaBinned[iPhi][iEta]->Draw("E"); + MeanIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); + MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.95,MeanIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.15); + + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(MeanIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// RMS IC vs Eta + + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + RMSIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + RMSIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + RMSIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + RMSIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < RMSIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + RMSIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetRMS()); + RMSIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_EtaBinned[iBin][iPhi][iEta]->GetRMSError()); + } + + + Pol0_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + RMSIC_EtaBinned[iPhi][iEta]->Fit(Pol2_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + RMSIC_EtaBinned[iPhi][iEta]->Draw("E"); + RMSIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); + RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(RMSIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// Gauss Mean vs Eta + if(!isDeadTriggerTower){ + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParameter(1)); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParError(1)); + } + + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_MeanIC_EtaBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_MeanIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + Gaus_MeanIC_EtaBinned[iPhi][iEta]->Draw("E"); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); + Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.95,Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.15); + + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_MeanIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_MeanIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_MeanIC_EtaBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + + /// Gauss Sigma vs Eta + + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParameter(2)); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_EtaBinned[iBin][iPhi][iEta]->GetParError(2)); + } + + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_RMSIC_EtaBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_RMSIC_EtaBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta],"RMEQ0"); + + Gaus_RMSIC_EtaBinned[iPhi][iEta]->Draw("E"); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); + Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_RMSIC_EtaBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_RMSIC_EtaBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_RMSIC_EtaBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + } + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + /// Original IC distribution vs the chosen eta binning + + for(int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->cd(); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->SetGridx(); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->Fit(GaussianFits_PhiBinned[iPhiBin][iPhi][iEta],"RMEQ"); + } + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->Draw("E"); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + ((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_PhiBinned.at(iPhiBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + } + + + /// Mean IC vs Phi + + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + MeanIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + MeanIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + MeanIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + MeanIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < MeanIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + MeanIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetMean()); + MeanIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetMeanError()); + } + + + Pol0_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + MeanIC_PhiBinned[iPhi][iEta]->Fit(Pol2_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + MeanIC_PhiBinned[iPhi][iEta]->Draw("E"); + MeanIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); + MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.98,MeanIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.05); + + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(MeanIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// RMS IC vs Phi + + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + RMSIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + RMSIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + RMSIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + RMSIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < RMSIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + RMSIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetRMS()); + RMSIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_PhiBinned[iBin][iPhi][iEta]->GetRMSError()); + } + + + Pol0_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + RMSIC_PhiBinned[iPhi][iEta]->Fit(Pol2_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + RMSIC_PhiBinned[iPhi][iEta]->Draw("E"); + RMSIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); + RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(RMSIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// Gauss Mean vs Phi + if(!isDeadTriggerTower){ + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParameter(1)); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParError(1)); + } + + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_MeanIC_PhiBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_MeanIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + Gaus_MeanIC_PhiBinned[iPhi][iEta]->Draw("E"); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); + Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.98,Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.05); + + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_MeanIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_MeanIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_MeanIC_PhiBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + + /// Gauss Sigma vs Eta + + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParameter(2)); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_PhiBinned[iBin][iPhi][iEta]->GetParError(2)); + } + + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_RMSIC_PhiBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_RMSIC_PhiBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta],"RMEQ0"); + + Gaus_RMSIC_PhiBinned[iPhi][iEta]->Draw("E"); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); + Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetMaximum()*1.3); + + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_RMSIC_PhiBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_RMSIC_PhiBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_RMSIC_PhiBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + /// Original IC distribution vs SM folding + + for(int iSMBin = 0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->cd(); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->SetGridx(); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->SetGridy(); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetLineColor(kBlack); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerStyle(20); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerSize(1.); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->SetMarkerColor(kRed); + if(!isDeadTriggerTower){GaussianFits_SMBinned[iSMBin][iPhi][iEta]->SetLineColor(kBlue); + GaussianFits_SMBinned[iSMBin][iPhi][iEta]->SetLineWidth(2); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->Fit(GaussianFits_SMBinned[iSMBin][iPhi][iEta],"RMEQ"); + } + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->Draw("E"); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetXaxis()->SetTitle("IC"); + ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetYaxis()->SetTitle("Entries"); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + ((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string(((Can_SMBinned.at(iSMBin)).at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + } + + /// Mean IC vs Eta + + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + MeanIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + MeanIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + MeanIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + MeanIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < MeanIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + MeanIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetMean()); + MeanIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetMeanError()); + } + + + Pol0_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + MeanIC_SMBinned[iPhi][iEta]->Fit(Pol2_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) MeanIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) MeanIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + + MeanIC_SMBinned[iPhi][iEta]->Draw("E"); + MeanIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Mean"); + MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(MeanIC_SMBinned[iPhi][iEta]->GetMinimum()*0.95,MeanIC_SMBinned[iPhi][iEta]->GetMaximum()*1.15); + + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(MeanIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// RMS IC vs SM + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + RMSIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + RMSIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + RMSIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + RMSIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < RMSIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + RMSIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetRMS()); + RMSIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,ICCrystalEB_SMBinned[iBin][iPhi][iEta]->GetRMSError()); + } + + + Pol0_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + RMSIC_SMBinned[iPhi][iEta]->Fit(Pol2_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) RMSIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) RMSIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + + RMSIC_SMBinned[iPhi][iEta]->Draw("E"); + RMSIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta "); + RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC RMS"); + RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(RMSIC_SMBinned[iPhi][iEta]->GetMinimum()*0.85,RMSIC_SMBinned[iPhi][iEta]->GetMaximum()*1.30); + + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(RMSIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + + if(htemp1!=0) delete htemp1 ; + if(htemp2!=0) delete htemp2 ; + + /// Gauss Mean vs SM + if(isDeadTriggerTower){ + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_MeanIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParameter(1)); + Gaus_MeanIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParError(1)); + } + + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_MeanIC_SMBinned[iPhi][iEta]->Fit(Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_MeanIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_MeanIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta],"RMEQ0"); + + Gaus_MeanIC_SMBinned[iPhi][iEta]->Draw("E"); + Gaus_MeanIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian Mean"); + Gaus_MeanIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_MeanIC_SMBinned[iPhi][iEta]->GetMinimum()*0.95,Gaus_MeanIC_SMBinned[iPhi][iEta]->GetMaximum()*1.10); + + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_MeanIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_MeanIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_MeanIC_SMBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + + /// Gauss Sigma vs SM + + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->cd(); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridx(); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->SetGridy(); + + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetLineColor(kBlack); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetLineWidth(2); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetMarkerStyle(20); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetMarkerSize(1.); + + for(int iBin =0; iBin < Gaus_RMSIC_SMBinned[iPhi][iEta]->GetNbinsX() ; iBin++){ + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetBinContent(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParameter(2)); + Gaus_RMSIC_SMBinned[iPhi][iEta]->SetBinError(iBin+1,GaussianFits_SMBinned[iBin][iPhi][iEta]->GetParError(2)); + } + + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kBlue); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kGreen+1); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineColor(kRed); + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> SetLineWidth(2); + + Gaus_RMSIC_SMBinned[iPhi][iEta]->Fit(Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp1 = (TH1F*) Gaus_RMSIC_SMBinned[iPhi][iEta]->Clone("htemp1"); + htemp1->Fit(Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + htemp2 = (TH1F*) Gaus_RMSIC_SMBinned[iPhi][iEta]->Clone("htemp2"); + htemp2->Fit(Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta],"RMEQ0"); + + Gaus_RMSIC_SMBinned[iPhi][iEta]->Draw("E"); + Gaus_RMSIC_SMBinned[iPhi][iEta]->GetXaxis()->SetTitle("i#eta"); + Gaus_RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetTitle("IC Gaussian RMS"); + Gaus_RMSIC_SMBinned[iPhi][iEta]->GetYaxis()->SetRangeUser(Gaus_RMSIC_SMBinned[iPhi][iEta]->GetMinimum()*0.85,Gaus_RMSIC_SMBinned[iPhi][iEta]->GetMaximum()*1.30); + + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave1=(TPaveStats*)(Gaus_RMSIC_SMBinned[iPhi][iEta]->GetListOfFunctions()->FindObject("stats")); + pave1->SetTextColor(kRed); + pave1->SetBorderSize(2); + pave1->SetLineColor(kRed); + pave1->SetFillStyle(0); + pave1->SetY1NDC(0.6); + pave1->SetY2NDC(0.9); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp1->Draw("Esames"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave2=(TPaveStats*)(htemp1->GetListOfFunctions()->FindObject("stats")); + pave2->SetOptStat(000); + pave2->SetBorderSize(2); + pave2->SetLineColor(kGreen+1); + pave2->SetFillStyle(0); + pave2->SetTextSize(pave2->GetTextSize()*1.7); + pave2->SetTextColor(kGreen+1); + pave2->SetX1NDC(0.35); + pave2->SetX2NDC(0.6); + pave2->SetY1NDC(0.6); + pave2->SetY2NDC(0.9); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + htemp2->Draw("Esames"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Update(); + pave3=(TPaveStats*)(htemp2->GetListOfFunctions()->FindObject("stats")); + pave3->SetOptStat(000); + pave3->SetBorderSize(2); + pave3->SetLineColor(kBlue); + pave3->SetFillStyle(0); + pave3->SetTextSize(pave3->GetTextSize()*1.7); + pave3->SetTextColor(kBlue); + pave3->SetX1NDC(0.11); + pave3->SetX2NDC(0.33); + pave3->SetY1NDC(0.6); + pave3->SetY2NDC(0.9); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Modified(); + + Pol0_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol1_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + Pol2_Gaus_RMSIC_SMBinned[iPhi][iEta] -> Draw("Lsame"); + + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".pdf").c_str(),"pdf"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Print((outputCanvasPlot+std::string((Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->GetName())+".png").c_str(),"png"); + (Can_Gaus_RMSIC_SMBinned.at(iPhi)).at(iEta)->Close(); + + delete htemp1 ; + delete htemp2 ; + } + } + + } + + // Final way to represent the results + + TH2F* inclusiveMeanIC = new TH2F("inclusiveMeanIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveRMSIC = new TH2F("inclusiveRMSIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveGausMeanIC = new TH2F("inclusiveGausMeanIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveGausRMSIC = new TH2F("inclusiveGausRMSIC","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveMeanIC_EBP = new TH2F("inclusiveMeanIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveRMSIC_EBP = new TH2F("inclusiveRMSIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveGausMeanIC_EBP = new TH2F("inclusiveGausMeanIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveGausRMSIC_EBP = new TH2F("inclusiveGausRMSIC_EBP","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveMeanIC_EBM = new TH2F("inclusiveMeanIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveRMSIC_EBM = new TH2F("inclusiveRMSIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + TH2F* inclusiveGausMeanIC_EBM = new TH2F("inclusiveGausMeanIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + TH2F* inclusiveGausRMSIC_EBM = new TH2F("inclusiveGausRMSIC_EBM","",IPhiWindow,0,IPhiWindow,IEtaWindow,0,IEtaWindow) ; + + std::vector EtaBinned_MeanIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_MeanIC (iPhiBinDivision.size()-1); + std::vector SMBinned_MeanIC (int(20/NPhiSMBinDivision)); + + std::vector EtaBinned_GausMeanIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_GausMeanIC (iPhiBinDivision.size()-1); + std::vector SMBinned_GausMeanIC (int(20/NPhiSMBinDivision)); + + std::vector EtaBinned_RMSIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_RMSIC (iPhiBinDivision.size()-1); + std::vector SMBinned_RMSIC (int(20/NPhiSMBinDivision)); + + std::vector EtaBinned_GausRMSIC (iEtaBinDivision.size()-1); + std::vector PhiBinned_GausRMSIC (iPhiBinDivision.size()-1); + std::vector SMBinned_GausRMSIC (int(20/NPhiSMBinDivision)); + + for(int iEtaBin = 0; iEtaBinSetBinContent(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetMean()); + inclusiveMeanIC->SetBinError(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetMeanError()); + + if(!isDeadTriggerTower){ inclusiveGausMeanIC->SetBinContent(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParameter(1)); + inclusiveGausMeanIC->SetBinError(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParError(1)); + } + + inclusiveRMSIC->SetBinContent(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetRMS()); + inclusiveRMSIC->SetBinError(iPhi+1,iEta+1,ICCrystalEB[iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ inclusiveGausRMSIC->SetBinContent(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParameter(2)); + inclusiveGausRMSIC->SetBinError(iPhi+1,iEta+1,GaussianFits[iPhi][iEta]->GetParError(2)); + } + + inclusiveMeanIC_EBP->SetBinContent(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetMean()); + inclusiveMeanIC_EBP->SetBinError(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetMeanError()); + + if(!isDeadTriggerTower){ inclusiveGausMeanIC_EBP->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParameter(1)); + inclusiveGausMeanIC_EBP->SetBinError(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParError(1)); + } + + inclusiveRMSIC_EBP->SetBinContent(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetRMS()); + inclusiveRMSIC_EBP->SetBinError(iPhi+1,iEta+1,ICCrystalEBP[iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ inclusiveGausRMSIC_EBP->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParameter(2)); + inclusiveGausRMSIC_EBP->SetBinError(iPhi+1,iEta+1,GaussianFits_EBP[iPhi][iEta]->GetParError(2)); + } + + inclusiveMeanIC_EBM->SetBinContent(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetMean()); + inclusiveMeanIC_EBM->SetBinError(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetMeanError()); + + if(!isDeadTriggerTower){ inclusiveGausMeanIC_EBM->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParameter(1)); + inclusiveGausMeanIC_EBM->SetBinError(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParError(1)); + } + + inclusiveRMSIC_EBM->SetBinContent(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetRMS()); + inclusiveRMSIC_EBM->SetBinError(iPhi+1,iEta+1,ICCrystalEBM[iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ inclusiveGausRMSIC_EBM->SetBinContent(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParameter(2)); + inclusiveGausRMSIC_EBM->SetBinError(iPhi+1,iEta+1,GaussianFits_EBM[iPhi][iEta]->GetParError(2)); + } + + for(int iEtaBin = 0 ; iEtaBin < int(iEtaBinDivision.size()-1) ; iEtaBin++){ + + EtaBinned_MeanIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetMean()); + EtaBinned_MeanIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetMeanError()); + + EtaBinned_RMSIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetRMS()); + EtaBinned_RMSIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_EtaBinned[iEtaBin][iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ EtaBinned_GausMeanIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParameter(1)); + EtaBinned_GausMeanIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParError(1)); + + EtaBinned_GausRMSIC[iEtaBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParameter(2)); + EtaBinned_GausRMSIC[iEtaBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_EtaBinned[iEtaBin][iPhi][iEta]->GetParError(2)); + } + } + + for(int iPhiBin = 0 ; iPhiBin < int(iPhiBinDivision.size()-1) ; iPhiBin++){ + + PhiBinned_MeanIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetMean()); + PhiBinned_MeanIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetMeanError()); + + PhiBinned_RMSIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetRMS()); + PhiBinned_RMSIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_PhiBinned[iPhiBin][iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ PhiBinned_GausMeanIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParameter(1)); + PhiBinned_GausMeanIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParError(1)); + + PhiBinned_GausRMSIC[iPhiBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParameter(2)); + PhiBinned_GausRMSIC[iPhiBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_PhiBinned[iPhiBin][iPhi][iEta]->GetParError(2)); + } + } + + for(int iSMBin = 0 ; iSMBin < int(20/NPhiSMBinDivision) ; iSMBin++){ + + SMBinned_MeanIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetMean()); + SMBinned_MeanIC[iSMBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetMeanError()); + + SMBinned_RMSIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetRMS()); + SMBinned_RMSIC[iSMBin]->SetBinError(iPhi+1,iEta+1,ICCrystalEB_SMBinned[iSMBin][iPhi][iEta]->GetRMSError()); + + if(!isDeadTriggerTower){ SMBinned_GausMeanIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParameter(1)); + SMBinned_GausMeanIC[iSMBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParError(1)); + + SMBinned_GausRMSIC[iSMBin]->SetBinContent(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParameter(2)); + SMBinned_GausRMSIC[iSMBin]->SetBinError(iPhi+1,iEta+1,GaussianFits_SMBinned[iSMBin][iPhi][iEta]->GetParError(2)); + } + } + } + } + + TCanvas* Can_inclusiveMeanIC = new TCanvas("Can_inclusiveMeanIC","",600,500); + TCanvas* Can_inclusiveRMSIC = new TCanvas("Can_inclusiveRMSIC","",600,500); + + TCanvas* Can_inclusiveGausMeanIC = new TCanvas("Can_inclusiveGausMeanIC","",600,500); + TCanvas* Can_inclusiveGausRMSIC = new TCanvas("Can_inclusiveGausRMSIC","",600,500); + + TCanvas* Can_inclusiveMeanIC_EBP = new TCanvas("Can_inclusiveMeanIC_EBP","",600,500); + TCanvas* Can_inclusiveRMSIC_EBP = new TCanvas("Can_inclusiveRMSIC_EBP","",600,500); + + TCanvas* Can_inclusiveGausMeanIC_EBP = new TCanvas("Can_inclusiveGausMeanIC_EBP","",600,500); + TCanvas* Can_inclusiveGausRMSIC_EBP = new TCanvas("Can_inclusiveGausRMSIC_EBP","",600,500); + + TCanvas* Can_inclusiveMeanIC_EBM = new TCanvas("Can_inclusiveMeanIC_EBM","",600,500); + TCanvas* Can_inclusiveRMSIC_EBM = new TCanvas("Can_inclusiveRMSIC_EBM","",600,500); + + TCanvas* Can_inclusiveGausMeanIC_EBM = new TCanvas("Can_inclusiveGausMeanIC_EBM","",600,500); + TCanvas* Can_inclusiveGausRMSIC_EBM = new TCanvas("Can_inclusiveGausRMSIC_EBM","",600,500); + + std::vector Can_EtaBinned_MeanIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_MeanIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_MeanIC (int(20/NPhiSMBinDivision)); + + std::vector Can_EtaBinned_GausMeanIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_GausMeanIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_GausMeanIC (int(20/NPhiSMBinDivision)); + + std::vector Can_EtaBinned_RMSIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_RMSIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_RMSIC (int(20/NPhiSMBinDivision)); + + std::vector Can_EtaBinned_GausRMSIC (iEtaBinDivision.size()-1); + std::vector Can_PhiBinned_GausRMSIC (iPhiBinDivision.size()-1); + std::vector Can_SMBinned_GausRMSIC (int(20/NPhiSMBinDivision)); + + gStyle->SetOptStat(00000); + + + Can_inclusiveMeanIC->cd(); + Can_inclusiveMeanIC->SetGridx(); + Can_inclusiveMeanIC->SetGridy(); + inclusiveMeanIC->GetXaxis()->SetTitle("i#phi"); + inclusiveMeanIC->GetYaxis()->SetTitle("i#eta"); + inclusiveMeanIC->Draw("colz"); + if(!isDeadTriggerTower) inclusiveMeanIC->SetMinimum(inclusiveMeanIC->GetMinimum()+0.9); + else inclusiveMeanIC->SetMinimum(inclusiveMeanIC->GetMinimum()+0.75); + inclusiveMeanIC->Draw("textSAME"); + Can_inclusiveMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC->GetName())+".png").c_str(),"png"); + + Can_inclusiveRMSIC->cd(); + Can_inclusiveRMSIC->SetGridx(); + Can_inclusiveRMSIC->SetGridy(); + inclusiveRMSIC->GetXaxis()->SetTitle("i#phi"); + inclusiveRMSIC->GetYaxis()->SetTitle("i#eta"); + inclusiveRMSIC->Draw("colz"); + inclusiveRMSIC->Draw("textSAME"); + Can_inclusiveRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_inclusiveGausMeanIC->cd(); + Can_inclusiveGausMeanIC->SetGridx(); + Can_inclusiveGausMeanIC->SetGridy(); + inclusiveGausMeanIC->SetMinimum(inclusiveGausMeanIC->GetMinimum()+0.9); + inclusiveGausMeanIC->GetXaxis()->SetTitle("i#phi"); + inclusiveGausMeanIC->GetYaxis()->SetTitle("i#eta"); + inclusiveGausMeanIC->Draw("colz"); + inclusiveGausMeanIC->Draw("textSAME"); + Can_inclusiveGausMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausMeanIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC->GetName())+".png").c_str(),"png"); + + Can_inclusiveGausRMSIC->cd(); + Can_inclusiveGausRMSIC->SetGridx(); + Can_inclusiveGausRMSIC->SetGridy(); + inclusiveGausRMSIC->GetXaxis()->SetTitle("i#phi"); + inclusiveGausRMSIC->GetYaxis()->SetTitle("i#eta"); + inclusiveGausRMSIC->Draw("colz"); + inclusiveGausRMSIC->Draw("textSAME"); + Can_inclusiveGausRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausRMSIC->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC->GetName())+".png").c_str(),"png"); + } + + Can_inclusiveMeanIC_EBP->cd(); + Can_inclusiveMeanIC_EBP->SetGridx(); + Can_inclusiveMeanIC_EBP->SetGridy(); + inclusiveMeanIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveMeanIC_EBP->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) inclusiveMeanIC_EBP->SetMinimum(inclusiveMeanIC_EBP->GetMinimum()+0.9); + else inclusiveMeanIC_EBP->SetMinimum(inclusiveMeanIC_EBP->GetMinimum()+0.75); + inclusiveMeanIC_EBP->Draw("colz"); + inclusiveMeanIC_EBP->Draw("textSAME"); + Can_inclusiveMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBP->GetName())+".png").c_str(),"png"); + + Can_inclusiveRMSIC_EBP->cd(); + Can_inclusiveRMSIC_EBP->SetGridx(); + Can_inclusiveRMSIC_EBP->SetGridy(); + inclusiveRMSIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveRMSIC_EBP->GetYaxis()->SetTitle("i#eta"); + inclusiveRMSIC_EBP->Draw("colz"); + inclusiveRMSIC_EBP->Draw("textSAME"); + Can_inclusiveRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBP->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_inclusiveGausMeanIC_EBP->cd(); + Can_inclusiveGausMeanIC_EBP->SetGridx(); + Can_inclusiveGausMeanIC_EBP->SetGridy(); + inclusiveGausMeanIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveGausMeanIC_EBP->GetYaxis()->SetTitle("i#eta"); + inclusiveGausMeanIC_EBP->SetMinimum(inclusiveGausMeanIC_EBP->GetMinimum()+0.9); + inclusiveGausMeanIC_EBP->Draw("colz"); + inclusiveGausMeanIC_EBP->Draw("textSAME"); + Can_inclusiveGausMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausMeanIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBP->GetName())+".png").c_str(),"png"); + + Can_inclusiveGausRMSIC_EBP->cd(); + Can_inclusiveGausRMSIC_EBP->SetGridx(); + Can_inclusiveGausRMSIC_EBP->SetGridy(); + inclusiveGausRMSIC_EBP->GetXaxis()->SetTitle("i#phi"); + inclusiveGausRMSIC_EBP->GetYaxis()->SetTitle("i#eta"); + inclusiveGausRMSIC_EBP->Draw("colz"); + inclusiveGausRMSIC_EBP->Draw("textSAME"); + Can_inclusiveGausRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBP->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausRMSIC_EBP->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBP->GetName())+".png").c_str(),"png"); + } + + Can_inclusiveMeanIC_EBM->cd(); + Can_inclusiveMeanIC_EBM->SetGridx(); + Can_inclusiveMeanIC_EBM->SetGridy(); + inclusiveMeanIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveMeanIC_EBM->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) inclusiveMeanIC_EBM->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.9); + else inclusiveMeanIC_EBM->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.75); + inclusiveMeanIC_EBM->Draw("colz"); + inclusiveMeanIC_EBM->Draw("textSAME"); + Can_inclusiveMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveMeanIC_EBM->GetName())+".png").c_str(),"png"); + + Can_inclusiveRMSIC_EBM->cd(); + Can_inclusiveRMSIC_EBM->SetGridx(); + Can_inclusiveRMSIC_EBM->SetGridy(); + inclusiveRMSIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveRMSIC_EBM->GetYaxis()->SetTitle("i#eta"); + inclusiveRMSIC_EBM->Draw("colz"); + inclusiveRMSIC_EBM->Draw("textSAME"); + Can_inclusiveRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveRMSIC_EBM->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_inclusiveGausMeanIC_EBM->cd(); + Can_inclusiveGausMeanIC_EBM->SetGridx(); + Can_inclusiveGausMeanIC_EBM->SetGridy(); + inclusiveGausMeanIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveGausMeanIC_EBM->GetYaxis()->SetTitle("i#eta"); + inclusiveGausMeanIC_EBM->SetMinimum(inclusiveGausMeanIC_EBM->GetMinimum()+0.9); + inclusiveGausMeanIC_EBM->Draw("colz"); + inclusiveGausMeanIC_EBM->Draw("textSAME"); + Can_inclusiveGausMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausMeanIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausMeanIC_EBM->GetName())+".png").c_str(),"png"); + + Can_inclusiveGausRMSIC_EBM->cd(); + Can_inclusiveGausRMSIC_EBM->SetGridx(); + Can_inclusiveGausRMSIC_EBM->SetGridy(); + inclusiveGausRMSIC_EBM->GetXaxis()->SetTitle("i#phi"); + inclusiveGausRMSIC_EBM->GetYaxis()->SetTitle("i#eta"); + inclusiveGausRMSIC_EBM->Draw("colz"); + inclusiveGausRMSIC_EBM->Draw("textSAME"); + Can_inclusiveGausRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBM->GetName())+".pdf").c_str(),"pdf"); + Can_inclusiveGausRMSIC_EBM->Print((outputCanvasPlot+std::string(Can_inclusiveGausRMSIC_EBM->GetName())+".png").c_str(),"png"); + } + + for(int iEtaBin = 0; iEtaBin< int(EtaBinned_MeanIC.size()) ; iEtaBin++){ + + Can_EtaBinned_MeanIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_MeanIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + Can_EtaBinned_RMSIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_RMSIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)),int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + Can_EtaBinned_GausMeanIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_GausMeanIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)), + int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + Can_EtaBinned_GausRMSIC[iEtaBin] = new TCanvas(std::string(Form("Can_EtaBinned_GausRMSIC_%d_%d",int(iEtaBinDivision.at(iEtaBin)), + int(iEtaBinDivision.at(iEtaBin+1)))).c_str(),"",600,500); + + Can_EtaBinned_MeanIC[iEtaBin]->cd(); + Can_EtaBinned_MeanIC[iEtaBin]->SetGridx(); + Can_EtaBinned_MeanIC[iEtaBin]->SetGridy(); + EtaBinned_MeanIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_MeanIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) EtaBinned_MeanIC[iEtaBin]->SetMinimum(EtaBinned_MeanIC[iEtaBin]->GetMinimum()+0.9); + else EtaBinned_MeanIC[iEtaBin]->SetMinimum(EtaBinned_MeanIC[iEtaBin]->GetMinimum()+0.75); + EtaBinned_MeanIC[iEtaBin]->Draw("colz"); + EtaBinned_MeanIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_MeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_MeanIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_MeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_MeanIC[iEtaBin]->GetName())+".png").c_str(),"png"); + + Can_EtaBinned_RMSIC[iEtaBin]->cd(); + Can_EtaBinned_RMSIC[iEtaBin]->SetGridx(); + Can_EtaBinned_RMSIC[iEtaBin]->SetGridy(); + EtaBinned_RMSIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_RMSIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + EtaBinned_RMSIC[iEtaBin]->Draw("colz"); + EtaBinned_RMSIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_RMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_RMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_EtaBinned_GausMeanIC[iEtaBin]->cd(); + Can_EtaBinned_GausMeanIC[iEtaBin]->SetGridx(); + Can_EtaBinned_GausMeanIC[iEtaBin]->SetGridy(); + EtaBinned_GausMeanIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_GausMeanIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + EtaBinned_GausMeanIC[iEtaBin]->SetMinimum(EtaBinned_GausMeanIC[iEtaBin]->GetMinimum()+0.9); + EtaBinned_GausMeanIC[iEtaBin]->Draw("colz"); + EtaBinned_GausMeanIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_GausMeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_GausMeanIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_GausMeanIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_GausMeanIC[iEtaBin]->GetName())+".png").c_str(),"png"); + Can_EtaBinned_GausRMSIC[iEtaBin]->cd(); + Can_EtaBinned_GausRMSIC[iEtaBin]->SetGridx(); + Can_EtaBinned_GausRMSIC[iEtaBin]->SetGridy(); + EtaBinned_GausRMSIC[iEtaBin]->GetXaxis()->SetTitle("i#phi"); + EtaBinned_GausRMSIC[iEtaBin]->GetYaxis()->SetTitle("i#eta"); + EtaBinned_GausRMSIC[iEtaBin]->Draw("colz"); + EtaBinned_GausRMSIC[iEtaBin]->Draw("textSAME"); + Can_EtaBinned_GausRMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".pdf").c_str(),"pdf"); + Can_EtaBinned_GausRMSIC[iEtaBin]->Print((outputCanvasPlot+std::string(Can_EtaBinned_RMSIC[iEtaBin]->GetName())+".png").c_str(),"png"); + } + } + + for(int iPhiBin = 0; iPhiBincd(); + Can_PhiBinned_MeanIC[iPhiBin]->SetGridx(); + Can_PhiBinned_MeanIC[iPhiBin]->SetGridy(); + PhiBinned_MeanIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_MeanIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) PhiBinned_MeanIC[iPhiBin]->SetMinimum(inclusiveMeanIC_EBM->GetMinimum()+0.9); + else PhiBinned_MeanIC[iPhiBin]->SetMinimum(PhiBinned_MeanIC[iPhiBin]->GetMinimum()+0.75); + PhiBinned_MeanIC[iPhiBin]->Draw("colz"); + PhiBinned_MeanIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_MeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_MeanIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_MeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_MeanIC[iPhiBin]->GetName())+".png").c_str(),"png"); + + Can_PhiBinned_RMSIC[iPhiBin]->cd(); + Can_PhiBinned_RMSIC[iPhiBin]->SetGridx(); + Can_PhiBinned_RMSIC[iPhiBin]->SetGridy(); + PhiBinned_RMSIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_RMSIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + PhiBinned_RMSIC[iPhiBin]->Draw("colz"); + PhiBinned_RMSIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_RMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_RMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".png").c_str(),"png"); + + + if(!isDeadTriggerTower){ + Can_PhiBinned_GausMeanIC[iPhiBin]->cd(); + Can_PhiBinned_GausMeanIC[iPhiBin]->SetGridx(); + Can_PhiBinned_GausMeanIC[iPhiBin]->SetGridy(); + PhiBinned_GausMeanIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_GausMeanIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + PhiBinned_GausMeanIC[iPhiBin]->SetMinimum(PhiBinned_GausMeanIC[iPhiBin]->GetMinimum()+0.9); + PhiBinned_GausMeanIC[iPhiBin]->Draw("colz"); + PhiBinned_GausMeanIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_GausMeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_GausMeanIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_GausMeanIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_GausMeanIC[iPhiBin]->GetName())+".png").c_str(),"png"); + + Can_PhiBinned_GausRMSIC[iPhiBin]->cd(); + Can_PhiBinned_GausRMSIC[iPhiBin]->SetGridx(); + Can_PhiBinned_GausRMSIC[iPhiBin]->SetGridy(); + PhiBinned_GausRMSIC[iPhiBin]->GetXaxis()->SetTitle("i#phi"); + PhiBinned_GausRMSIC[iPhiBin]->GetYaxis()->SetTitle("i#eta"); + PhiBinned_GausRMSIC[iPhiBin]->Draw("colz"); + PhiBinned_GausRMSIC[iPhiBin]->Draw("textSAME"); + Can_PhiBinned_GausRMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".pdf").c_str(),"pdf"); + Can_PhiBinned_GausRMSIC[iPhiBin]->Print((outputCanvasPlot+std::string(Can_PhiBinned_RMSIC[iPhiBin]->GetName())+".png").c_str(),"png"); + } + } + + for(int iSMBin = 0; iSMBincd(); + Can_SMBinned_MeanIC[iSMBin]->SetGridx(); + Can_SMBinned_MeanIC[iSMBin]->SetGridy(); + SMBinned_MeanIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_MeanIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + if(!isDeadTriggerTower) SMBinned_MeanIC[iSMBin]->SetMinimum(SMBinned_MeanIC[iSMBin]->GetMinimum()+0.9); + else SMBinned_MeanIC[iSMBin]->SetMinimum(SMBinned_MeanIC[iSMBin]->GetMinimum()+0.75); + SMBinned_MeanIC[iSMBin]->Draw("colz"); + SMBinned_MeanIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_MeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_MeanIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_MeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_MeanIC[iSMBin]->GetName())+".png").c_str(),"png"); + + Can_SMBinned_RMSIC[iSMBin]->cd(); + Can_SMBinned_RMSIC[iSMBin]->SetGridx(); + Can_SMBinned_RMSIC[iSMBin]->SetGridy(); + SMBinned_RMSIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_RMSIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + SMBinned_RMSIC[iSMBin]->Draw("colz"); + SMBinned_RMSIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_RMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_RMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".png").c_str(),"png"); + + if(!isDeadTriggerTower){ + Can_SMBinned_GausMeanIC[iSMBin]->cd(); + Can_SMBinned_GausMeanIC[iSMBin]->SetGridx(); + Can_SMBinned_GausMeanIC[iSMBin]->SetGridy(); + SMBinned_GausMeanIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_GausMeanIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + SMBinned_GausMeanIC[iSMBin]->SetMinimum(SMBinned_GausMeanIC[iSMBin]->GetMinimum()+0.9); + SMBinned_GausMeanIC[iSMBin]->Draw("colz"); + SMBinned_GausMeanIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_GausMeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_GausMeanIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_GausMeanIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_GausMeanIC[iSMBin]->GetName())+".png").c_str(),"png"); + + Can_SMBinned_GausRMSIC[iSMBin]->cd(); + Can_SMBinned_GausRMSIC[iSMBin]->SetGridx(); + Can_SMBinned_GausRMSIC[iSMBin]->SetGridy(); + SMBinned_GausRMSIC[iSMBin]->GetXaxis()->SetTitle("i#phi"); + SMBinned_GausRMSIC[iSMBin]->GetYaxis()->SetTitle("i#eta"); + SMBinned_GausRMSIC[iSMBin]->Draw("colz"); + SMBinned_GausRMSIC[iSMBin]->Draw("textSAME"); + Can_SMBinned_GausRMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".pdf").c_str(),"pdf"); + Can_SMBinned_GausRMSIC[iSMBin]->Print((outputCanvasPlot+std::string(Can_SMBinned_RMSIC[iSMBin]->GetName())+".png").c_str(),"png"); + } + } + + return 0; + +} + + +// LocalWords: ieta diff --git a/EOverPCalibration/bin/DrawPrecisionPlotsEB.cpp b/EOverPCalibration/bin/DrawPrecisionPlotsEB.cpp new file mode 100644 index 00000000000..99a572a1973 --- /dev/null +++ b/EOverPCalibration/bin/DrawPrecisionPlotsEB.cpp @@ -0,0 +1,207 @@ +#include +#include +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TMath.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TApplication.h" +#include "../interface/TEndcapRings.h" + +using namespace std ; + +int main(int argc, char**argv){ + + + const char* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root"; + const char* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root"; + int evalStat = 1; + int inputLoops = 25; + + const int nLoops = inputLoops; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return -1; + } + + cout << "Making calibration plots for: " << infile2 << endl; + + TApplication* theApp = new TApplication("Application",&argc, argv); + + char hname[100]; + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + + TF1 *pol0_0 = new TF1("pol0_0","pol1",0,20); + TF1 *pol0_1 = new TF1("pol0_1","pol1",20,40); + TF1 *pol0_2 = new TF1("pol0_2","pol1",40,60); + TF1 *pol0_3 = new TF1("pol0_3","pol1",60,85); + + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap2[nLoops]; + TH2F *hcmap3[nLoops]; + + TGraphErrors *statprecision_vs_ieta[nLoops]; + TGraphErrors *statprecision_vs_loop[4]; + + int ipoint = 0; + + for ( int ietaregion=0; ietaregion<4; ietaregion++){ + + statprecision_vs_loop[ietaregion] = new TGraphErrors(); + statprecision_vs_loop[ietaregion]->SetMarkerStyle(20); + statprecision_vs_loop[ietaregion]->SetMarkerSize(1); + statprecision_vs_loop[ietaregion]->SetMarkerColor(kBlue+2); + if (ietaregion == 0) statprecision_vs_loop[ietaregion]->SetTitle("i#eta < 20"); + if (ietaregion == 1) statprecision_vs_loop[ietaregion]->SetTitle("20 < i#eta < 40"); + if (ietaregion == 2) statprecision_vs_loop[ietaregion]->SetTitle("40 < i#eta < 60"); + if (ietaregion == 3) statprecision_vs_loop[ietaregion]->SetTitle("60 < i#eta < 85"); + } + + + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"h2_%d_hC_scale_EB",iLoop); + hcmap2[iLoop] = (TH2F*)f2->Get(hname); + hcmap3[iLoop] = (TH2F*)f3->Get(hname); + + TH1F *hstatprecision[171]; + + for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ + + float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hstatprecision_ring_ieta%02f_%d",etaring,iLoop); + hstatprecision[jbin-1] = new TH1F(hname, hname, 150,-0.5,0.5); + for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ + + float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecision[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample + + } + } + } + + + statprecision_vs_ieta[iLoop] = new TGraphErrors(); + statprecision_vs_ieta[iLoop]->SetMarkerStyle(20); + statprecision_vs_ieta[iLoop]->SetMarkerSize(1); + statprecision_vs_ieta[iLoop]->SetMarkerColor(kRed+2); + + int n = 0; + + for (int i = 1; i < hcmap2[iLoop]-> GetNbinsY()+1; i++){ + float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(i); + if (int(etaring)==0) continue; + if ( hstatprecision[i-1]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[iLoop]-> GetYaxis()->GetBinWidth(i); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecision[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecision[i-1]->GetRMS(),5*hstatprecision[i-1]->GetRMS()); + hstatprecision[i-1]->Fit("fgaus","QR"); + statprecision_vs_ieta[iLoop]-> SetPoint(n,etaring,fgaus->GetParameter(2)); + statprecision_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + statprecision_vs_ieta[iLoop]->Fit("pol0_0","QR"); + statprecision_vs_ieta[iLoop]->Fit("pol0_1","QR"); + statprecision_vs_ieta[iLoop]->Fit("pol0_2","QR"); + statprecision_vs_ieta[iLoop]->Fit("pol0_3","QR"); + + statprecision_vs_loop[0]->SetPoint(ipoint,iLoop+1,pol0_0->GetParameter(0)+pol0_0->GetParameter(1)*10); + statprecision_vs_loop[0]->SetPointError(ipoint,0.5,sqrt(pol0_0->GetParError(0)*pol0_0->GetParError(0)+pol0_0->GetParError(1)*pol0_0->GetParError(1))); + statprecision_vs_loop[1]->SetPoint(ipoint,iLoop+1,pol0_1->GetParameter(0)+pol0_1->GetParameter(1)*30); + statprecision_vs_loop[1]->SetPointError(ipoint,0.5,sqrt(pol0_1->GetParError(0)*pol0_1->GetParError(0)+pol0_1->GetParError(1)*pol0_1->GetParError(1))); + statprecision_vs_loop[2]->SetPoint(ipoint,iLoop+1,pol0_2->GetParameter(0)+pol0_2->GetParameter(1)*50); + statprecision_vs_loop[2]->SetPointError(ipoint,0.5,sqrt(pol0_0->GetParError(0)*pol0_2->GetParError(0)+pol0_2->GetParError(1)*pol0_2->GetParError(1))); + statprecision_vs_loop[3]->SetPoint(ipoint,iLoop+1,pol0_3->GetParameter(0)+pol0_3->GetParameter(1)*72.5); + statprecision_vs_loop[3]->SetPointError(ipoint,0.5,sqrt(pol0_3->GetParError(0)*pol0_3->GetParError(0)+pol0_3->GetParError(1)*pol0_3->GetParError(1))); + ipoint++; + + } + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[nLoops]; + TCanvas *c2[4]; + + TFile * out = new TFile ("StatPrecEB.root","RECREATE"); + // --- plot 5 : statistical precision vs ieta + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"cstat_%d",iLoop); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.07); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ieta[iLoop]->Draw("ap"); + + if(iLoop == nLoops -1){ + out->cd(); + statprecision_vs_ieta[iLoop]->SetName("gr_stat_prec"); + statprecision_vs_ieta[iLoop]->Write(); + } + + } + + + for ( int ietaregion = 0; ietaregion < 4; ietaregion++ ) { + + sprintf(hname,"ietaregion_%d",ietaregion); + c2[ietaregion] = new TCanvas(hname,hname); + c2[ietaregion]->SetGridx(); + c2[ietaregion]->SetGridy(); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.04); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); + statprecision_vs_loop[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); + statprecision_vs_loop[ietaregion]->Draw("ap"); + } + + theApp->Run(); + return 0; +} diff --git a/EOverPCalibration/bin/DrawPrecisionPlotsEE.cpp b/EOverPCalibration/bin/DrawPrecisionPlotsEE.cpp new file mode 100644 index 00000000000..b3bd09dca17 --- /dev/null +++ b/EOverPCalibration/bin/DrawPrecisionPlotsEE.cpp @@ -0,0 +1,319 @@ +#include +#include +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TMath.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TApplication.h" +#include "../interface/TEndcapRings.h" + +using namespace std ; + +int main(int argc, char**argv){ + + // Foundamental parameters + const char* infile2 = "/data1/rgerosa/L3_Weight/16Jan_LC_20120131_FT_R_42_V24/Even_WZAnalysis_WElectron_ZElectron_42XReReco_16Jan_LC_20120131_FT_R_42_V24_Z_R9_EE.root "; + const char* infile3 = "/data1/rgerosa/L3_Weight/16Jan_LC_20120131_FT_R_42_V24/Odd_WZAnalysis_WElectron_ZElectron_42XReReco_16Jan_LC_20120131_FT_R_42_V24_Z_R9_EE.root"; + int evalStat = 1; + int inputLoops = 25; + + const int nLoops = inputLoops; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + TApplication* theApp = new TApplication("Application",&argc, argv); + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return -1; + } + + cout << "Making calibration plots for: " << infile2 << endl; + + char hname[100]; + + // Functions for fit + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + + TF1 *pol0_0EEP = new TF1("pol0_0EEP","pol1",85,95); + TF1 *pol0_1EEP= new TF1("pol0_1EEP","pol1",95,105); + TF1 *pol0_2EEP = new TF1("pol0_2EEP","pol1",105,125); + TF1 *pol0_0EEM = new TF1("pol0_0EEM","pol1",85,95); + TF1 *pol0_1EEM= new TF1("pol0_1EEM","pol1",95,105); + TF1 *pol0_2EEM = new TF1("pol0_2EEM","pol1",105,125); + + TGraphErrors *statprecision_vs_ietaEEP[nLoops]; + TGraphErrors *statprecision_vs_ietaEEM[nLoops]; + + TGraphErrors *statprecision_vs_loopEEP[3]; + TGraphErrors *statprecision_vs_loopEEM[3]; + + + int ipointEEP = 0; + int ipointEEM = 0; + + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap1EEP[nLoops]; + TH2F *hcmap1EEM[nLoops]; + TH2F *hcmap2EEP[nLoops]; + TH2F *hcmap2EEM[nLoops]; + + + for ( int ietaregion=0; ietaregion<3; ietaregion++){ + + statprecision_vs_loopEEP[ietaregion] = new TGraphErrors(); + statprecision_vs_loopEEP[ietaregion]->SetMarkerStyle(20); + statprecision_vs_loopEEP[ietaregion]->SetMarkerColor(kBlue+2); + + statprecision_vs_loopEEM[ietaregion] = new TGraphErrors(); + statprecision_vs_loopEEM[ietaregion]->SetMarkerStyle(20); + statprecision_vs_loopEEM[ietaregion]->SetMarkerColor(kBlue+2); + + if (ietaregion == 0) statprecision_vs_loopEEP[ietaregion]->SetTitle("85SetTitle("100 < i#eta < 110"); + if (ietaregion == 2) statprecision_vs_loopEEP[ietaregion]->SetTitle("110 < i#eta < 125"); + + if (ietaregion == 0) statprecision_vs_loopEEM[ietaregion]->SetTitle("85SetTitle("100 < i#eta < 110"); + if (ietaregion == 2) statprecision_vs_loopEEM[ietaregion]->SetTitle("110 < i#eta < 125"); + + } + + // analyze each iteration loop step + + TEndcapRings *eRings = new TEndcapRings(); + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"h2_%d_hC_scale_EEP",iLoop); + hcmap1EEP[iLoop] = (TH2F*)f2->Get(hname); + hcmap2EEP[iLoop] = (TH2F*)f3->Get(hname); + + sprintf(hname,"h2_%d_hC_scale_EEM",iLoop); + hcmap1EEM[iLoop] = (TH2F*)f2->Get(hname); + hcmap2EEM[iLoop] = (TH2F*)f3->Get(hname); + + // compute statistical precision + TH1F *hstatprecisionEEP[40]; + TH1F *hstatprecisionEEM[40]; + + for(int i =0;i<40; i++){ + + sprintf(hname,"hstatprecision_ring_ieta_EEP%02d_iLoop%02d",i,iLoop); + hstatprecisionEEP[i] = new TH1F(hname, hname, 100,-0.4,0.4); + sprintf(hname,"hstatprecision_ring_ieta_EEM%02d_iLoop%02d",i,iLoop); + hstatprecisionEEM[i] = new TH1F(hname, hname, 100,-0.4,0.4); + } + + for (int ix = 1; ix < hcmap1EEP[iLoop]-> GetNbinsX()+1; ix++){ + for (int iy = 1; iy < hcmap1EEP[iLoop]-> GetNbinsY()+1; iy++){ + + if( hcmap1EEP[iLoop]->GetBinContent(ix,iy) ==0 || hcmap2EEP[iLoop]->GetBinContent(ix,iy) ==0 ) continue; + int etaring = int(fabs(eRings->GetEndcapIeta(ix,iy,1))); + if(etaring<0) continue; + float ic1 = hcmap1EEP[iLoop]->GetBinContent(ix,iy); + float ic2 = hcmap2EEP[iLoop]->GetBinContent(ix,iy); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecisionEEP[etaring-86]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire + + } + } + } + + for (int ix = 1; ix < hcmap1EEM[iLoop]-> GetNbinsX()+1; ix++){ + for (int iy = 1; iy < hcmap1EEM[iLoop]-> GetNbinsY()+1; iy++){ + + if( hcmap1EEM[iLoop]->GetBinContent(ix,iy) ==0 || hcmap2EEM[iLoop]->GetBinContent(ix,iy) ==0 ) continue; + int etaring = int(fabs(eRings->GetEndcapIeta(ix,iy,-1))); + if(etaring<0) continue; + float ic1 = hcmap1EEM[iLoop]->GetBinContent(ix,iy); + float ic2 = hcmap2EEM[iLoop]->GetBinContent(ix,iy); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecisionEEM[etaring-86]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample + + } + } + } + + + statprecision_vs_ietaEEP[iLoop] = new TGraphErrors(); + statprecision_vs_ietaEEP[iLoop]->SetMarkerStyle(20); + statprecision_vs_ietaEEP[iLoop]->SetMarkerSize(1); + statprecision_vs_ietaEEP[iLoop]->SetMarkerColor(kRed+2); + + int nEEP = 0; + int nEEM = 0; + for (int i = 0 ; i<33 ; i++){ + if ( hstatprecisionEEP[i]->GetEntries() <= 25) continue; + fgaus->SetParameter(1,hstatprecisionEEP[i]->GetMean()); + fgaus->SetParameter(2,hstatprecisionEEP[i]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionEEP[i]->GetRMS(),5*hstatprecisionEEP[i]->GetRMS()); + hstatprecisionEEP[i]->Fit("fgaus","QRM"); + statprecision_vs_ietaEEP[iLoop]-> SetPoint(nEEP,86+i,fgaus->GetParameter(2)); + statprecision_vs_ietaEEP[iLoop]-> SetPointError(nEEP,0,fgaus->GetParError(2)); + nEEP++; + } + statprecision_vs_ietaEEP[iLoop]->Fit("pol0_0EEP","QMER"); + statprecision_vs_ietaEEP[iLoop]->Fit("pol0_1EEP","QMER"); + statprecision_vs_ietaEEP[iLoop]->Fit("pol0_2EEP","QMER"); + + statprecision_vs_loopEEP[0]->SetPoint(ipointEEP,iLoop+1,pol0_0EEP->GetParameter(0)+pol0_0EEP->GetParameter(1)*90); + statprecision_vs_loopEEP[0]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_0EEP->GetParError(0)*pol0_0EEP->GetParError(0)+pol0_0EEP->GetParError(1)*pol0_0EEP->GetParError(1))); + + + statprecision_vs_loopEEP[1]->SetPoint(ipointEEP,iLoop+1,pol0_1EEP->GetParameter(0)+pol0_1EEP->GetParameter(1)*100); + statprecision_vs_loopEEP[1]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_1EEP->GetParError(0)*pol0_1EEP->GetParError(0)+pol0_1EEP->GetParError(1)*pol0_1EEP->GetParError(1))); + + + statprecision_vs_loopEEP[2]->SetPoint(ipointEEP,iLoop+1,pol0_2EEP->GetParameter(0)+pol0_2EEP->GetParameter(1)*110); + statprecision_vs_loopEEP[2]->SetPointError(ipointEEP,0.5,0.5*sqrt(pol0_2EEP->GetParError(0)*pol0_2EEP->GetParError(0)+pol0_2EEP->GetParError(1)*pol0_2EEP->GetParError(1))); + + + ipointEEP++; + + statprecision_vs_ietaEEM[iLoop] = new TGraphErrors(); + statprecision_vs_ietaEEM[iLoop]->SetMarkerStyle(20); + statprecision_vs_ietaEEM[iLoop]->SetMarkerSize(1); + statprecision_vs_ietaEEM[iLoop]->SetMarkerColor(kRed+2); + + for (int i = 0 ; i<33 ; i++){ + + if ( hstatprecisionEEM[i]->GetEntries() <= 25) continue; + fgaus->SetParameter(1,hstatprecisionEEM[i]->GetMean()); + fgaus->SetParameter(2,hstatprecisionEEM[i]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionEEM[i]->GetRMS(),5*hstatprecisionEEM[i]->GetRMS()); + hstatprecisionEEM[i]->Fit("fgaus","QRM"); + statprecision_vs_ietaEEM[iLoop]-> SetPoint(nEEM,86+i,fgaus->GetParameter(2)); + statprecision_vs_ietaEEM[iLoop]-> SetPointError(nEEM,0,fgaus->GetParError(2)); + nEEM++; + } + + statprecision_vs_ietaEEM[iLoop]->Fit("pol0_0EEM","QRME"); + statprecision_vs_ietaEEM[iLoop]->Fit("pol0_1EEM","QRME"); + statprecision_vs_ietaEEM[iLoop]->Fit("pol0_2EEM","QRME"); + + statprecision_vs_loopEEM[0]->SetPoint(ipointEEM,iLoop+1,pol0_0EEM->GetParameter(0)+pol0_0EEM->GetParameter(1)*90); + statprecision_vs_loopEEM[0]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_0EEM->GetParError(0)*pol0_0EEM->GetParError(0)+pol0_0EEM->GetParError(1)*pol0_0EEM->GetParError(1))); + statprecision_vs_loopEEM[1]->SetPoint(ipointEEM,iLoop+1,pol0_1EEM->GetParameter(0)+pol0_1EEM->GetParameter(1)*100); + statprecision_vs_loopEEM[1]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_1EEM->GetParError(0)*pol0_1EEM->GetParError(0)+pol0_1EEM->GetParError(1)*pol0_1EEM->GetParError(1))); + statprecision_vs_loopEEM[2]->SetPoint(ipointEEM,iLoop+1,pol0_2EEM->GetParameter(0)+pol0_2EEM->GetParameter(1)*110); + statprecision_vs_loopEEM[2]->SetPointError(ipointEEM,0.5,0.5*sqrt(pol0_2EEM->GetParError(0)*pol0_2EEM->GetParError(0)+pol0_2EEM->GetParError(1)*pol0_2EEM->GetParError(1))); + + + ipointEEM++; + + } + + + // DrawPlots + + TCanvas *cEEP[4]; + TCanvas *cEEM[4]; + + + // TFile * out = new TFile ("StatPrecEE.root","RECREATE"); + // --- plot 5 : statistical precision vs ieta + + /* for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + sprintf(hname,"cstat_EEP%d",iLoop); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.001,0.15); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(85,125); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ietaEEP[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ietaEEP[iLoop]->Draw("ap"); + if(iLoop == nLoops -1) + { + out->cd(); + statprecision_vs_ietaEEP[iLoop]->SetName("gr_stat_precEEP"); + statprecision_vs_ietaEEP[iLoop]->Write(); + } + + }*/ + + + /* for ( int iLoop = nLoops; iLoop < nLoops*2; iLoop++ ) { + sprintf(hname,"cstat_EEM%d",iLoop-nLoops); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetYaxis()-> SetRangeUser(0.001,0.15); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetXaxis()-> SetRangeUser(-125,-85); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ietaEEM[iLoop-nLoops]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ietaEEM[iLoop-nLoops]->Draw("ap"); + if(iLoop == 2*nLoops -1) + { + out->cd(); + statprecision_vs_ietaEEM[iLoop-nLoops]->SetName("gr_stat_precEEM"); + statprecision_vs_ietaEEM[iLoop-nLoops]->Write(); + } + + }*/ + + // --- plot 6 : statistical precision vs loop + + for ( int ietaregion = 0; ietaregion < 3; ietaregion++ ) { + sprintf(hname,"ietaregion_EEP%d",ietaregion); + cEEP[ietaregion] = new TCanvas(hname,hname); + cEEP[ietaregion]->SetGridx(); + cEEP[ietaregion]->SetGridy(); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.1); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); + statprecision_vs_loopEEP[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); + statprecision_vs_loopEEP[ietaregion]->Draw("ap"); + } + + for ( int ietaregion = 0; ietaregion < 3; ietaregion++ ) { + sprintf(hname,"ietaregion_EEM%d",ietaregion); + cEEM[ietaregion] = new TCanvas(hname,hname); + cEEM[ietaregion]->SetGridx(); + cEEM[ietaregion]->SetGridy(); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetYaxis()-> SetRangeUser(0.,0.1); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetXaxis()-> SetRangeUser(0,nLoops+1); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetYaxis()-> SetTitle("Statistical precision"); + statprecision_vs_loopEEM[ietaregion]->GetHistogram()->GetXaxis()-> SetTitle("n#circ iteration"); + statprecision_vs_loopEEM[ietaregion]->Draw("ap"); + } + + theApp->Run(); + return 0; +} diff --git a/EOverPCalibration/bin/FastCalibratorEB.cpp b/EOverPCalibration/bin/FastCalibratorEB.cpp new file mode 100644 index 00000000000..a5004905e52 --- /dev/null +++ b/EOverPCalibration/bin/FastCalibratorEB.cpp @@ -0,0 +1,361 @@ +#include "../interface/FastCalibratorEB.h" +#include +#include +#include + +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/CalibrationUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +int main (int argc, char ** argv) { + + ///Check if all nedeed arguments to parse are there + if(argc != 2){ + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + // parameterSet.reset(); + + std::string inputList = "NULL"; + if(Options.existsAs("inputList")) + inputList = Options.getParameter("inputList"); + else{ std::cout<<" Exit from code, no input list found"<("inputFileDeadXtal")) + inputFileDeadXtal = Options.getParameter("inputFileDeadXtal"); + else{ std::cout<<" No input File Dead Xtal found! "<("inputTree")) + inputTree = Options.getParameter("inputTree"); + else{ std::cout<<" Exit from code, no input tree found"<("jsonFileName")) + jsonFileName = Options.getParameter("jsonFileName"); + else{ std::cout<<" Exit from code, no jsonFile found"< > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + std::string miscalibMap = "NULL"; + if(Options.existsAs("miscalibMap")) + miscalibMap = Options.getParameter("miscalibMap"); + else{ std::cout<<" no miscalib map found"<("isMiscalib")) + isMiscalib = Options.getParameter("isMiscalib"); + + bool isSaveEPDistribution = false; + if(Options.existsAs("isSaveEPDistribution")) + isSaveEPDistribution = Options.getParameter("isSaveEPDistribution"); + + bool isMCTruth = false; + if(Options.existsAs("isMCTruth")) + isMCTruth = Options.getParameter("isMCTruth"); + + bool isEPselection = false; + if(Options.existsAs("isEPselection")) + isEPselection = Options.getParameter("isEPselection"); + + bool isPtCut = false; + if(Options.existsAs("isPtCut")) + isPtCut = Options.getParameter("isPtCut"); + + double PtMin = 0.; + if(Options.existsAs("PtMin")) + PtMin = Options.getParameter("PtMin"); + + bool isfbrem = false; + if(Options.existsAs("isfbrem")) + isfbrem = Options.getParameter("isfbrem"); + + double fbremMax = 100.; + if(Options.existsAs("fbremMax")) + fbremMax = Options.getParameter("fbremMax"); + + bool isR9selection = false; + if(Options.existsAs("isR9selection")) + isR9selection = Options.getParameter("isR9selection"); + + double R9Min = -1.; + if(Options.existsAs("R9Min")) + R9Min = Options.getParameter("R9Min"); + + int miscalibMethod = 1; + if(Options.existsAs("miscalibMethod")) + miscalibMethod = Options.getParameter("miscalibMethod"); + + std::string inputMomentumScale = "NULL"; + if(Options.existsAs("inputMomentumScale")) + inputMomentumScale = Options.getParameter("inputMomentumScale"); + + std::string typeEB = "NULL"; + if(Options.existsAs("typeEB")) + typeEB = Options.getParameter("typeEB"); + int nRegionsEB = GetNRegionsEB(typeEB); + + std::string typeEE = "NULL"; + if(Options.existsAs("typeEE")) + typeEE = Options.getParameter("typeEE"); + + std::string outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; + if(Options.existsAs("outputPath")) + outputPath = Options.getParameter("outputPath"); + system(("mkdir -p "+outputPath).c_str()); + + std::string outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + int numberOfEvents = -1; + if(Options.existsAs("numberOfEvents")) + numberOfEvents = Options.getParameter("numberOfEvents"); + + int useZ = 1; + if(Options.existsAs("useZ")) + useZ = Options.getParameter("useZ"); + + int useW = 1; + if(Options.existsAs("useW")) + useW = Options.getParameter("useW"); + + int splitStat = 0; + if(Options.existsAs("splitStat")) + splitStat = Options.getParameter("splitStat"); + + int nLoops = 20; + if(Options.existsAs("nLoops")) + nLoops = Options.getParameter("nLoops"); + + bool isDeadTriggerTower = false; + if(Options.existsAs("isDeadTriggerTower")) + isDeadTriggerTower = Options.getParameter("isDeadTriggerTower"); + + + /// open ntupla of data or MC + TChain * tree = new TChain (inputTree.c_str()); + FillChain(*tree,inputList); + + /// open calibration momentum graph + TFile* momentumscale = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EB; + + for(int i = 0; i < nRegionsEB; ++i){ + TString Name = Form("g_EoC_EB_%d",i); + g_EoC_EB.push_back( (TGraphErrors*)(momentumscale->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = tree->GetEntries(); + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + + if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_miscalib_EB",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_EB",outputFile.c_str()); + + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_R9_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_miscalib_EB",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_EB",outputFile.c_str()); + else { std::cout<<" Option not considered --> exit "< exit "< +#include +#include +#include +#include "ConfigParser.h" +#include "ntpleUtils.h" + +/// Code used for Run IC procedure on EB/ + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + +// std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + + std::string inputFileDeadXtal ="NULL" ; + try { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch ( char const* exceptionString ){ + std::cerr << " exception = " << exceptionString << std::endl; + + } + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// open ntupla of data or MC + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_Z_noEP_miscalib",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_Z_noEP",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_miscalib",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_noEP_miscalib",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_noEP",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + if(isSaveEPDistribution == true) + { + FastCalibratorEB_MVA analyzer(albero,outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer.saveHistos(f1); + } + else + { + FastCalibratorEB_MVA analyzer(albero); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + std::string evenFile = "Even_" + outputFile; + std::string oddFile = "Odd_" + outputFile; + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9_miscalib.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP_miscalib.root",oddFile.c_str()); + } + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_Z_noEP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP_miscalib.root",oddFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP.root",oddFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_Z_noEP.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP.root",oddFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_R9_miscalib.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_EP_miscalib.root",oddFile.c_str()); + } + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_noEP_miscalib.root",evenFile.c_str()); + name2 = Form ("%s_noEP_miscalib.root",oddFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9.root",evenFile.c_str()); + name2 = Form ("%s_R9.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP.root",evenFile.c_str()); + name2 = Form ("%s_EP.root",oddFile.c_str()); + } + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_noEP.root",evenFile.c_str()); + name2 = Form ("%s_noEP.root",oddFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + /// Run on odd + FastCalibratorEB_MVA analyzer_even(albero); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer_even.saveHistos(f1); + + /// Run on even + FastCalibratorEB_MVA analyzer_odd(albero); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth); + analyzer_odd.saveHistos(f2); + + } + + delete albero; + return 0; +} diff --git a/EOverPCalibration/bin/FastCalibratorEE.cpp b/EOverPCalibration/bin/FastCalibratorEE.cpp new file mode 100644 index 00000000000..86733ae6139 --- /dev/null +++ b/EOverPCalibration/bin/FastCalibratorEE.cpp @@ -0,0 +1,365 @@ +#include "../interface/FastCalibratorEE.h" +#include +#include +#include + +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../interface/CalibrationUtils.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + + +int main (int argc, char ** argv) { + + ///Check if all nedeed arguments to parse are there + if(argc != 2){ + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + parameterSet.reset(); + + std::string inputList = "NULL"; + if(Options.existsAs("inputList")) + inputList = Options.getParameter("inputList"); + else{ std::cout<<" Exit from code, no input list found"<("inputFileDeadXtal")) + inputFileDeadXtal = Options.getParameter("inputFileDeadXtal"); + else{ std::cout<<" No input File Dead Xtal found! "<("inputTree")) + inputTree = Options.getParameter("inputTree"); + else{ std::cout<<" Exit from code, no input tree found"<("jsonFileName")) + jsonFileName = Options.getParameter("jsonFileName"); + else{ std::cout<<" Exit from code, no jsonFile found"< > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + std::string miscalibMap = "NULL"; + if(Options.existsAs("miscalibMap")) + miscalibMap = Options.getParameter("miscalibMap"); + else{ std::cout<<" no miscalib map found"<("isMiscalib")) + isMiscalib = Options.getParameter("isMiscalib"); + + bool isSaveEPDistribution = false; + if(Options.existsAs("isSaveEPDistribution")) + isSaveEPDistribution = Options.getParameter("isSaveEPDistribution"); + + bool isMCTruth = false; + if(Options.existsAs("isMCTruth")) + isMCTruth = Options.getParameter("isMCTruth"); + + bool isEPselection = false; + if(Options.existsAs("isEPselection")) + isEPselection = Options.getParameter("isEPselection"); + + bool isPtCut = false; + if(Options.existsAs("isPtCut")) + isPtCut = Options.getParameter("isPtCut"); + + double PtMin = 0.; + if(Options.existsAs("PtMin")) + PtMin = Options.getParameter("PtMin"); + + bool isfbrem = false; + if(Options.existsAs("isfbrem")) + isfbrem = Options.getParameter("isfbrem"); + + double fbremMax = 100.; + if(Options.existsAs("fbremMax")) + fbremMax = Options.getParameter("fbremMax"); + + bool isR9selection = false; + if(Options.existsAs("isR9selection")) + isR9selection = Options.getParameter("isR9selection"); + + double R9Min = -1.; + if(Options.existsAs("R9Min")) + R9Min = Options.getParameter("R9Min"); + + int miscalibMethod = 1; + if(Options.existsAs("miscalibMethod")) + miscalibMethod = Options.getParameter("miscalibMethod"); + + std::string inputMomentumScale = "NULL"; + if(Options.existsAs("inputMomentumScale")) + inputMomentumScale = Options.getParameter("inputMomentumScale"); + + std::string typeEB = "NULL"; + if(Options.existsAs("typeEB")) + typeEB = Options.getParameter("typeEB"); + + std::string typeEE = "NULL"; + if(Options.existsAs("typeEE")) + typeEE = Options.getParameter("typeEE"); + int nRegionsEE = GetNRegionsEE(typeEE); + + std::string outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; + if(Options.existsAs("outputPath")) + outputPath = Options.getParameter("outputPath"); + system(("mkdir -p "+outputPath).c_str()); + + std::string outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"; + if(Options.existsAs("outputFile")) + outputFile = Options.getParameter("outputFile"); + + int numberOfEvents = -1; + if(Options.existsAs("numberOfEvents")) + numberOfEvents = Options.getParameter("numberOfEvents"); + + int useZ = 1; + if(Options.existsAs("useZ")) + useZ = Options.getParameter("useZ"); + + int useW = 1; + if(Options.existsAs("useW")) + useW = Options.getParameter("useW"); + + int splitStat = 0; + if(Options.existsAs("splitStat")) + splitStat = Options.getParameter("splitStat"); + + int nLoops = 20; + if(Options.existsAs("nLoops")) + nLoops = Options.getParameter("nLoops"); + + bool isDeadTriggerTower = false; + if(Options.existsAs("isDeadTriggerTower")) + isDeadTriggerTower = Options.getParameter("isDeadTriggerTower"); + + + /// Acquistion input ntuples + TChain * tree = new TChain (inputTree.c_str()); + FillChain(*tree,inputList); + + /// open calibration momentum graph + TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EE; + + for(int i = 0; i < nRegionsEE; ++i){ + TString Name = Form("g_EoC_EE_%d",i); + g_EoC_EE.push_back( (TGraphErrors*)(f4->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = tree->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + + if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_miscalib_EE",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_EE",outputFile.c_str()); + + + + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_R9_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_miscalib_EE",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_EE",outputFile.c_str()); + else { std::cout<<" Option not considered --> exit "< exit "< +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" + +/// Code for Run the IC procedure on EE + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + +// std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + std::string inputFileDeadXtal ="NULL" ; + try { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch ( char const* exceptionString ){ + std::cerr << " exception = " << exceptionString << std::endl; + + } + + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + bool isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// Acquistion input ntuplas + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString outputTxtFile ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_Z_noEP_miscalib_EE",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_Z_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_Z_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_Z_noEP_EE",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isfbrem == true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_noEP_miscalib_EE",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isfbrem ==true ) name_tmp = Form ("%s_Z_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_noEP_EE",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + if(isSaveEPDistribution == true) + { + FastCalibratorEE_MVA analyzer(albero,outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer.saveHistos(f1); + } + else + { + FastCalibratorEE_MVA analyzer(albero); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + std::string evenFile = "Even_" + outputFile; + std::string oddFile = "Odd_" + outputFile; + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isfbrem==true) + { name = Form ("%s_Z_fbrem_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_fbrem_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_Z_noEP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP_miscalib_EE.root",oddFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_Z_R9_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_R9_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_Z_EP_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_EP_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isfbrem==true) + { name = Form ("%s_Z_fbrem_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_fbrem_EE.root",oddFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_Z_noEP_EE.root",evenFile.c_str()); + name2 = Form ("%s_Z_noEP_EE.root",oddFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_R9_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_EP_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isfbrem==true) + { name = Form ("%s_fbrem_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_fbrem_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_noEP_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_noEP_miscalib_EE.root",oddFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_R9_EE.root",evenFile.c_str()); + name2 = Form ("%s_R9_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_EE.root",evenFile.c_str()); + name2 = Form ("%s_EP_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isfbrem==true) + { name = Form ("%s_fbrem_miscalib_EE.root",evenFile.c_str()); + name2 = Form ("%s_fbrem_miscalib_EE.root",oddFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_noEP_EE.root",evenFile.c_str()); + name2 = Form ("%s_noEP_EE.root",oddFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + /// Run on odd + FastCalibratorEE_MVA analyzer_even(albero); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer_even.saveHistos(f1); + + /// Run on even + FastCalibratorEE_MVA analyzer_odd(albero); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,isMCTruth,isfbrem); + analyzer_odd.saveHistos(f2); + + } + + delete albero; + return 0; +} diff --git a/EOverPCalibration/bin/MVARegression.cpp b/EOverPCalibration/bin/MVARegression.cpp new file mode 100644 index 00000000000..a93b1078e52 --- /dev/null +++ b/EOverPCalibration/bin/MVARegression.cpp @@ -0,0 +1,389 @@ +// @(#)root/tmva $Id: MVARegression.cpp,v 1.3 2012/07/17 08:31:45 rgerosa Exp $ +/********************************************************************************** + * Project : TMVA - a Root-integrated toolkit for multivariate data analysis * + * Package : TMVA * + * Root Macro: TMVARegression * + * * + * This macro provides examples for the training and testing of the * + * TMVA classifiers. * + * * + * As input data is used a toy-MC sample consisting of four Gaussian-distributed * + * and linearly correlated input variables. * + * * + * The methods to be used can be switched on and off by means of booleans, or * + * via the prompt command, for example: * + * * + * root -l TMVARegression.C\(\"LD,MLP\"\) * + * * + * (note that the backslashes are mandatory) * + * If no method given, a default set is used. * + * * + * The output file "TMVAReg.root" can be analysed with the use of dedicated * + * macros (simply say: root -l ), which can be conveniently * + * invoked through a GUI that will appear at the end of the run of this macro. * + **********************************************************************************/ + +#include +#include +#include +#include + +#include "TChain.h" +#include "TFile.h" +#include "TTree.h" +#include "TString.h" +#include "TObjString.h" +#include "TSystem.h" +#include "TROOT.h" +#include "TApplication.h" +#include "TMVA/MsgLogger.h" +#include "TMVA/Config.h" + +#include "ConfigParser.h" +#include "ntpleUtils.h" + +#if not defined(__CINT__) || defined(__MAKECINT__) +#include "TMVA/Tools.h" +#include "TMVA/Factory.h" +#endif + +#include "/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.00/x86_64-slc5-gcc46-opt/root/tmva/test/TMVARegGui.C" + +using namespace TMVA; + +int main(int argc, char**argv){ + + if(argc != 2){ + std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + parseConfigFile (argv[1]) ; + + // The explicit loading of the shared libTMVA is done in TMVAlogon.C, defined in .rootrc + // if you use your private .rootrc, or run from a different directory, please copy the + // corresponding lines from .rootrc + // methods to be processed can be given as an argument; use format: + // + // mylinux~> root -l TMVARegression.C\(\"myMethod1,myMethod2,myMethod3\"\) + // + //--------------------------------------------------------------- + // This loads the library + TMVA::Tools::Instance(); + + std::vector UseMethodName; + UseMethodName = gConfigParser -> readStringListOption("Input::UseMethodName"); + + std::cout << " >>>>> Input::UseMethodName size = " << UseMethodName.size() << std::endl; + std::cout << " >>>>> >>>>> "; + for (unsigned int iCat = 0; iCat < UseMethodName.size(); iCat++){ + std::cout << " " << UseMethodName.at(iCat) << ", "; + } + std::cout << std::endl; + + + + // --------------------------------------------------------------- + + std::cout << std::endl; + std::cout << "==> Start TMVARegression" << std::endl; + + std::map Use; + + for(std::vector::iterator it=UseMethodName.begin(); it!=UseMethodName.end(); ++it) Use[*it]=0; + + std::string UseMethodFlag; + try{ UseMethodFlag = gConfigParser -> readStringOption("Input::UseMethodFlag"); + std::cout<< UseMethodFlag< mlist = gTools().SplitString( UseMethodFlag, '/' ); + for (UInt_t i=0; i::iterator it = Use.begin(); it != Use.end(); it++) std::cout << it->first << " "; + std::cout << std::endl; + return -1; + } + Use[regMethod] = 1; + std::cout << "regMethod= " << regMethod<< " 1 "<::iterator it=UseMethodName.begin() ;it!=UseMethodName.end(); it++) Use[*it]=1; + + } + + + // -------------------------------------------------------------------------------------------------- + // --- Here the preparation phase begins + // Create a new root output file + + std::string outputFileName = gConfigParser -> readStringOption("Output::outputFileName"); + std::cout<<" Output Data File = "< readStringOption("Input::inputFileList"); + std::string treeNameDATA = gConfigParser -> readStringOption("Input::treeNameDATA"); + + std::cout<<" Input Data List = "< readStringOption("Input::RegionOfTraining"); + std::cout<<" RegionOfTraining = "<AddVariable( "ele1_scE/ele1_scERaw" , 'F'); + factory->AddVariable( "ele1_eRegrInput_nPV" , 'F'); + factory->AddVariable( "ele1_eRegrInput_r9" , 'F'); + factory->AddVariable( "ele1_fbrem" , 'F'); + factory->AddVariable( "ele1_eta" , 'F'); + factory->AddVariable( "ele1_DphiIn" , 'F'); + factory->AddVariable( "ele1_DetaIn" , 'F'); + factory->AddVariable( "ele1_sigmaIetaIeta" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_etaW" , 'F'); + factory->AddVariable( "ele1_eRegrInput_phiW" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_bCE_Over_sCE", 'F'); + factory->AddVariable( "ele1_eRegrInput_sigietaieta_bC1" , 'F'); + factory->AddVariable( "ele1_eRegrInput_sigiphiiphi_bC1" , 'F'); + factory->AddVariable( "ele1_eRegrInput_sigietaiphi_bC1" , 'F'); + factory->AddVariable( "ele1_eRegrInput_e3x3_Over_bCE" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Deta_bC_sC" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Dphi_bC_sC" , 'F'); + factory->AddVariable( "ele1_eRegrInput_bEMax_Over_bCE" , 'F'); + + + factory->AddVariable( "ele1_dxy_PV" , 'F'); + factory->AddVariable( "ele1_dz_PV" , 'F'); + factory->AddVariable( "ele1_sigmaP/ele1_tkP" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_bCELow_Over_sCE", 'F'); + factory->AddVariable( "ele1_eRegrInput_e3x3_Over_bCELow" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Deta_bCLow_sC" , 'F'); + factory->AddVariable( "ele1_eRegrInput_Dphi_bCLow_sC" , 'F'); + + factory->AddVariable( "ele1_eRegrInput_seedbC_etacry" , 'F'); + factory->AddVariable( "ele1_eRegrInput_seedbC_phicry" , 'F'); + + // You can add so-called "Spectator variables", which are not used in the MVA training, + // but will appear in the final "TestTree" produced by TMVA. This TestTree will contain the + // input variables, the response values of all trained MVAs, and the spectator variables + // factory->AddSpectator( "spec1:=var1*2", "Spectator 1", "units", 'F' ); + // factory->AddSpectator( "spec2:=var1*3", "Spectator 2", "units", 'F' ); + // Add the variable carrying the regression target +// factory->AddTarget("ele1_scE/ele1_E_true" ); + factory->AddTarget("ele1_tkP/ele1_E_true" ); + + + // It is also possible to declare additional targets for multi-dimensional regression, ie: + // -- factory->AddTarget( "fvalue2" ); + // BUT: this is currently ONLY implemented for MLP + + // global event weights per tree (see below for setting event-wise weights) + Double_t regWeight = 1.0; + + // You can add an arbitrary number of regression trees + factory->AddRegressionTree( treeDATA, regWeight ); + + // This would set individual event weights (the variables defined in the + // expression need to exist in the original TTree) + // factory->SetWeightExpression( "var1", "Regression" ); + +// TCut mycut = "ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2 && (ele1_scE/ele1_E_true)<1.4 && (ele1_scE/ele1_E_true)>0.3"; // for example: TCut mycut = "abs(var1)<0.5 && abs(var2-0.5)<1"; + + TCut mycut = "ele1_isEB==1 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && ele1_eRegrInput_etaW > 0.006 && ele1_eRegrInput_phiW<0.08 && ele1_eRegrInput_sigietaieta_bC1>0.006 && ele1_eRegrInput_sigiphiiphi_bC1>0.008 && abs(ele1_eRegrInput_Deta_bC_sC)<0.004 && abs(ele1_eRegrInput_Dphi_bC_sC)<0.04 && abs(ele1_eRegrInput_seedbC_etacry)<0.6 && abs(ele1_eRegrInput_seedbC_phicry)<0.6 && ele1_scE/ele1_scERaw<1.2 && ele1_tkP/ele1_E_true<1.8 && ele1_tkP/ele1_E_true>0.2"; // for example: TCut mycut = "abs(var1)<0.5 && abs(var2-0.5)<1"; + + + // tell the factory to use all remaining events in the trees after training for testing: + factory->PrepareTrainingAndTestTree( mycut, + "nTrain_Regression=2500000:nTest_Regression=2500000:SplitMode=Random:NormMode=NumEvents:!V" ); + + TString Name = Form("weight_%s_%s_P_W",RegionOfTraining.c_str(),UseMethodFlag.c_str()); + (TMVA::gConfig().GetIONames()).fWeightFileDir = Name; + } + + if(RegionOfTraining=="EE"){ + + factory->AddVariable( "ele1_scE/ele1_scERaw" , 'F'); + factory->AddVariable( "ele1_eRegrInput_nPV",'F'); + factory->AddVariable( "ele1_eRegrInput_r9",'F'); + factory->AddVariable( "ele1_fbrem",'F'); + factory->AddVariable( "ele1_eta",'F'); + factory->AddVariable( "ele1_DphiIn",'F'); + factory->AddVariable( "ele1_DetaIn",'F'); + factory->AddVariable( "ele1_sigmaIetaIeta",'F'); + + factory->AddVariable( "ele1_eRegrInput_etaW",'F'); + factory->AddVariable( "ele1_eRegrInput_phiW",'F'); + + factory->AddVariable( "ele1_dxy_PV",'F'); + factory->AddVariable( "ele1_dz_PV",'F'); + factory->AddVariable( "ele1_sigmaP/ele1_tkP",'F'); + + + // You can add so-called "Spectator variables", which are not used in the MVA training, + // but will appear in the final "TestTree" produced by TMVA. This TestTree will contain the + // input variables, the response values of all trained MVAs, and the spectator variables + // factory->AddSpectator( "spec1:=var1*2", "Spectator 1", "units", 'F' ); + // factory->AddSpectator( "spec2:=var1*3", "Spectator 2", "units", 'F' ); + // Add the variable carrying the regression target + +// factory->AddTarget("ele1_scE/ele1_E_true" ); + factory->AddTarget("ele1_tkP/ele1_E_true" ); + + // It is also possible to declare additional targets for multi-dimensional regression, ie: + // -- factory->AddTarget( "fvalue2" ); + // BUT: this is currently ONLY implemented for MLP + + // global event weights per tree (see below for setting event-wise weights) + Double_t regWeight = 1.0; + + // You can add an arbitrary number of regression trees + factory->AddRegressionTree( treeDATA, regWeight ); + + // This would set individual event weights (the variables defined in the + // expression need to exist in the original TTree) + // factory->SetWeightExpression( "var1", "Regression" ); +// TCut mycut = "ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 &&(ele1_scE/ele1_E_true)<1.4 && (ele1_scE/ele1_E_true)>0.3"; + TCut mycut = "ele1_isEB==0 && ele1_sigmaP/ele1_tkP<0.4 && ele1_fbrem>0 && abs(ele1_dxy_PV)<0.05 && abs(ele1_dz_PV)<0.05 && (ele1_tkP/ele1_E_true)<1.6"; + + // for example: TCut mycut = "abs(var1)<0.5 && + // tell the factory to use all remaining events in the trees after training for testing: + factory->PrepareTrainingAndTestTree( mycut, + "nTrain_Regression=3000000:nTest_Regression=3000000:SplitMode=Random:NormMode=NumEvents:!V" ); + + TString Name = Form("weight_%s_%s_P_W",RegionOfTraining.c_str(),UseMethodFlag.c_str()); + (TMVA::gConfig().GetIONames()).fWeightFileDir = Name; + + } + // Apply additional cuts on the signal and background samples (can be different) + +// // If no numbers of events are given, half of the events in the tree are used + // for training, and the other half for testing: + // factory->PrepareTrainingAndTestTree( mycut, "SplitMode=random:!V" ); + + // ---- Book MVA methods + // + // please lookup the various method configuration options in the corresponding cxx files, eg: + // src/MethoCuts.cxx, etc, or here: http://tmva.sourceforge.net/optionRef.html + // it is possible to preset ranges in the option string in which the cut optimisation should be done: + // "...:CutRangeMin[2]=-1:CutRangeMax[2]=1"...", where [2] is the third input variable + + // PDE - RS method + if (Use["PDERS"]) + factory->BookMethod( TMVA::Types::kPDERS, "PDERS", "!H:!V:Normthree=T:VolumeRangeMode=Adaptive:KernelEstimator=Gauss:GaussSigma=0.3:NEventsMin=40:NEventsMax=60:VarTransform=None" ); + // And the options strings for the MinMax and RMS methods, respectively: + // "!H:!V:VolumeRangeMode=MinMax:DeltaFrac=0.2:KernelEstimator=Gauss:GaussSigma=0.3" ); + // "!H:!V:VolumeRangeMode=RMS:DeltaFrac=3:KernelEstimator=Gauss:GaussSigma=0.3" ); + + if (Use["PDEFoam"]) + factory->BookMethod( TMVA::Types::kPDEFoam, "PDEFoam", "!H:!V:MultiTargetRegression=F:TargetSelection=Mpv:TailCut=0.001:VolFrac=0.3:nActiveCells=500:nSampl=2000:nBin=5:Compress=T:Kernel=None:Nmin=10:VarTransform=None" ); + + // K-Nearest Neighbour classifier (KNN) + if (Use["KNN"]) + factory->BookMethod( TMVA::Types::kKNN, "KNN", "nkNN=20:ScaleFrac=0.8:SigmaFact=1.0:Kernel=Gaus:UseKernel=F:UseWeight=T:!Trim" ); + + // Linear discriminant + if (Use["LD"]) factory->BookMethod( TMVA::Types::kLD, "LD","!H:!V:VarTransform=G,U,D" ); + + // Function discrimination analysis (FDA) -- test of various fitters - the recommended one is Minuit (or GA or SA) + if (Use["FDA_MC"]) + factory->BookMethod( TMVA::Types::kFDA, "FDA_MC", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=MC:SampleSize=100000:Sigma=0.1:VarTransform=D" ); + + if (Use["FDA_GA"]) // can also use Simulated Annealing (SA) algorithm (see Cuts_SA options) .. the formula of this example is good for parabolas + factory->BookMethod( TMVA::Types::kFDA, "FDA_GA", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=GA:PopSize=100:Cycles=3:Steps=30:Trim=True:SaveBestGen=1:VarTransform=Norm" ); + + if (Use["FDA_MT"]) + factory->BookMethod( TMVA::Types::kFDA, "FDA_MT", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100);(-10,10):FitMethod=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=2:UseImprove:UseMinos:SetBatch" ); + + if (Use["FDA_GAMT"]) + factory->BookMethod( TMVA::Types::kFDA, "FDA_GAMT", + "!H:!V:Formula=(0)+(1)*x0+(2)*x1:ParRanges=(-100,100);(-100,100);(-100,100):FitMethod=GA:Converger=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=0:!UseImprove:!UseMinos:SetBatch:Cycles=1:PopSize=5:Steps=5:Trim" ); + + // Neural network (MLP) + if (Use["MLP"]) +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=20000:HiddenLayers=N+20:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=200:HiddenLayers=N+20:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=400:HiddenLayers=N+10:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=N:NeuronType=tanh:NCycles=200:HiddenLayers=N+10:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); +// factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:VarTransform=G,N:NeuronType=tanh:NCycles=200:HiddenLayers=N+5:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15" ); + factory->BookMethod( TMVA::Types::kMLP, "MLP", "!H:!V:NeuronType=tanh:NCycles=250:HiddenLayers=N+5:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:TestRate=10"); + + // Support Vector Machine + if (Use["SVM"]) + factory->BookMethod( TMVA::Types::kSVM, "SVM", "Gamma=0.25:Tol=0.001:VarTransform=N" ); +// factory->BookMethod( TMVA::Types::kSVM, "SVM", "Gamma=0.25:Tol=0.001:VarTransform=N,G" ); + + // Boosted Decision Trees + if (Use["BDT"]) +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:nCuts=20:PruneMethod=CostComplexity:PruneStrength=30" ); +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=200:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=300:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); +// factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=5:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30" ); + factory->BookMethod( TMVA::Types::kBDT, "BDT","!H:!V:NTrees=100:nEventsMin=20:BoostType=AdaBoostR2:SeparationType=RegressionVariance:PruneMethod=CostComplexity:PruneStrength=30"); + + if (Use["BDTG"]) +// factory->BookMethod( TMVA::Types::kBDT, "BDTG","!H:!V:NTrees=2000::BoostType=Grad:Shrinkage=0.1:UseBaggedGrad:GradBaggingFraction=0.5:nCuts=20:MaxDepth=3:NNodesMax=15" ); + factory->BookMethod( TMVA::Types::kBDT, "BDTG","!H:!V:NTrees=1000::BoostType=Grad:Shrinkage=0.1:UseBaggedGrad:GradBaggingFraction=0.5:MaxDepth=5:NNodesMax=25:PruneMethod=CostComplexity:PruneStrength=30"); + // -------------------------------------------------------------------------------------------------- + // ---- Now you can tell the factory to train, test, and evaluate the MVAs + + // Train MVAs using the set of training events + factory->TrainAllMethods(); + + // ---- Evaluate all MVAs using the set of test events + factory->TestAllMethods(); + + // ----- Evaluate and compare performance of all configured MVAs + factory->EvaluateAllMethods(); + + // -------------------------------------------------------------- + + // Save the output + outputFile->Close(); + + std::cout << "==> Wrote root file: " << outputFile->GetName() << std::endl; + std::cout << "==> TMVARegression is done!" << std::endl; + + delete factory; + + // Launch the GUI for the root macros +// if (!gROOT->IsBatch()) TMVARegGui( outputFileName.c_str() ); + + return 0; +} diff --git a/EOverPCalibration/bin/MakeJobs.cpp b/EOverPCalibration/bin/MakeJobs.cpp new file mode 100644 index 00000000000..074e1e87e6f --- /dev/null +++ b/EOverPCalibration/bin/MakeJobs.cpp @@ -0,0 +1,584 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" + + +int main (int argc, char** argv){ + + if(argc<2){ std::cout<<" Not correct number of input parameter --> Need Just one cfg file exit "< readIntOption("Input::PhiStartDeadXtal"); } + catch(char const* exceptionString ){ PhiStartDeadXtal=-999.; } + + int PhiStepDeadXtal ; + try{ PhiStepDeadXtal = gConfigParser -> readIntOption("Input::PhiStepDeadXtal");} + catch(char const* exceptionString ){ PhiStepDeadXtal=-999.; } + + int PhiNShiftDeadXtal ; + try{ PhiNShiftDeadXtal = gConfigParser -> readIntOption("Input::PhiNShiftDeadXtal");} + catch(char const* exceptionString ){ PhiNShiftDeadXtal = -999.;} + + std::vector EtaBinCenterDeadXtal ; + try{ EtaBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::EtaBinCenterDeadXtal"); } + catch(char const* exceptionString ){ EtaBinCenterDeadXtal.push_back(-999.); } + + + bool isDeadTriggerTower ; + try{ isDeadTriggerTower = gConfigParser -> readBoolOption("Input::isDeadTriggerTower");} + catch(char const* exceptionString ){ isDeadTriggerTower = false ;} + + // Dead xtal in EE + + std::vector IxEEPBinCenterDeadXtal ; + try{ IxEEPBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IxEEPBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IxEEPBinCenterDeadXtal.push_back(-999.); } + + std::vector IxEEMBinCenterDeadXtal ; + try{ IxEEMBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IxEEMBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IxEEMBinCenterDeadXtal.push_back(-999.); } + + std::vector IyEEPBinCenterDeadXtal ; + try{ IyEEPBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IyEEPBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IyEEPBinCenterDeadXtal.push_back(-999.); } + + std::vector IyEEMBinCenterDeadXtal ; + try{ IyEEMBinCenterDeadXtal = gConfigParser -> readIntListOption("Input::IyEEMBinCenterDeadXtal"); } + catch(char const* exceptionString ){ IyEEMBinCenterDeadXtal.push_back(-999.); } + + int iXNShiftDeadXtal ; + try{ iXNShiftDeadXtal = gConfigParser -> readIntOption("Input::iXNShiftDeadXtal");} + catch(char const* exceptionString ){ iXNShiftDeadXtal = -999.;} + + int iYNShiftDeadXtal ; + try{ iYNShiftDeadXtal = gConfigParser -> readIntOption("Input::iYNShiftDeadXtal");} + catch(char const* exceptionString ){ iYNShiftDeadXtal = -999.;} + + std::string OutputDeadXtalPath ; + try{ OutputDeadXtalPath = gConfigParser -> readStringOption("Input::OutputDeadXtalPath"); + system(("mkdir -p "+OutputDeadXtalPath).c_str());} + catch(char const* exceptionString ){ OutputDeadXtalPath = "cfg/InputDeadXtal/" ; + system(("mkdir -p "+OutputDeadXtalPath).c_str()); + } + + std::string OutputDeadXtalFile ; + try{ OutputDeadXtalFile = gConfigParser -> readStringOption("Input::OutputDeadXtalFile");} + catch(char const* exceptionString ){ OutputDeadXtalFile = "DeadXtalFile"; } + + + std::string inputCfgTemplate ; + try{ inputCfgTemplate = gConfigParser -> readStringOption("Input::inputCfgTemplate");} + catch(char const* exceptionString ){ inputCfgTemplate = "cfg/FastCalibrator_Template.cfg"; } + + + ///// Common cfg setup + + // txt file with the list of input root files + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + + // input tree name + std::string inputTree = "NULL"; + try{ inputTree = gConfigParser -> readStringOption("Input::inputTree");} + catch(char const* exceptionString ){ inputTree = "simpleNtupleEoverP/SimpleNtupleEoverP";} + + // jsonFileName + std::string jsonFileName ="NULL"; + try{ jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName");} + catch( char const* exceptionString ){ jsonFileName = "json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt";} + + // Miscalibration --> scalib 5% + bool isMiscalib ; + try{isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib");} + catch( char const* exceptionString ){ isMiscalib = false;} + + // Save EoverP distribution + bool isSaveEPDistribution ; + try{ isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution");} + catch( char const* exceptionString ){ isSaveEPDistribution = false; } + + // Do the E/P selection + bool isEPselection ; + try{ isEPselection = gConfigParser -> readBoolOption("Input::isEPselection");} + catch( char const* exceptionString ){ isEPselection = false;} + + + // Pt treshold bool and cut + bool isPtCut ; + try{ isPtCut = gConfigParser -> readBoolOption("Input::isPtCut"); } + catch( char const* exceptionString ){ isPtCut = false;} + + float PtMin ; + try{ PtMin = gConfigParser -> readFloatOption("Input::PtMin"); } + catch( char const* exceptionString ){ PtMin = 0.;} + + // fbrem treshold bool and cut + bool isfbrem ; + try { isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); } + catch( char const* exceptionString ){ isfbrem = false;} + + float fbremMax ; + try { fbremMax = gConfigParser -> readFloatOption("Input::fbremMax"); } + catch( char const* exceptionString ){ fbremMax = 100.;} + + // R9 treshold bool and cut + bool isR9selection ; + try{ isR9selection = gConfigParser -> readBoolOption("Input::isR9selection");} + catch( char const* exceptionString ){ isR9selection = false; } + + float R9Min ; + try{ R9Min = gConfigParser -> readFloatOption("Input::R9Min");} + catch( char const* exceptionString ){ R9Min = 0.; } + + // Run Calibration on E/Etrue instead of E/P --> MC only + bool isMCTruth ; + try { isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); } + catch( char const* exceptionString ){ isMCTruth = false; } + + // Momentum scale file + std::string inputMomentumScale ; + try{ inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); } + catch( char const* exceptionString ) { inputMomentumScale = "output/MomentumCalibrationCombined_2011AB-2012ABC.root";} + + std::string typeEB ; + try{ typeEB = gConfigParser -> readStringOption("Input::typeEB"); } + catch( char const* exceptionString ) { typeEB = "none" ; } + + + std::string typeEE ; + try{ typeEE = gConfigParser -> readStringOption("Input::typeEE"); } + catch( char const* exceptionString ) { typeEE = "none" ; } + + // Name of the output calib file + std::string outputPath; + try{ outputPath = gConfigParser -> readStringOption("Output::outputPath"); + system(("mkdir -p "+outputPath).c_str());} + catch( char const* exceptionString ) { outputPath = "output/Oct22_Run2012ABC_Cal_Dic2012/"; + system(("mkdir -p "+outputPath).c_str()); + } + + std::string outputFile ; + try{ outputFile = gConfigParser -> readStringOption("Output::outputFile"); } + catch( char const* exceptionString ) { outputFile = "FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012" ; + } + + std::string OutputCfgPath ; + try{ OutputCfgPath = gConfigParser -> readStringOption("Output::OutputCfgPath"); + system(("mkdir -p "+OutputCfgPath).c_str()); } + catch(char const* exceptionString ){ OutputCfgPath = "cfg/JOB/"; + system(("mkdir -p "+OutputCfgPath).c_str()); + } + + // Other options for the L3 algo + int numberOfEvents ; + try { numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); } + catch( char const* exceptionString ) { numberOfEvents = -1 ; } + + int useZ ; + try { useZ = gConfigParser -> readIntOption("Options::useZ"); } + catch( char const* exceptionString ) { useZ = 1 ; } + + int useW ; + try{ useW = gConfigParser -> readIntOption("Options::useW"); } + catch( char const* exceptionString ) { useW = 1 ; } + + int splitStat ; + try{ splitStat = gConfigParser -> readIntOption("Options::splitStat"); } + catch( char const* exceptionString ) { splitStat = 0 ; } + + int nLoops ; + try{ nLoops = gConfigParser -> readIntOption("Options::nLoops"); } + catch( char const* exceptionString ) { nLoops = 20 ; } + + // prepare the general cfg: + std::string inputTemp1 = inputCfgTemplate+"_tmp1" ; + std::string inputTemp2 = inputCfgTemplate+"_tmp2" ; + + system(("rm "+OutputCfgPath+"/*").c_str()); + + system (("cat "+inputCfgTemplate+" | sed -e s%INPUTLIST%"+inputList+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%INPUTTREE%"+inputTree+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%JSONFILENAME%"+jsonFileName+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%MISCALIB%"+std::string(Form("%o",isMiscalib))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%EOVERP%"+std::string(Form("%o",isSaveEPDistribution))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%EPSELECTION%"+std::string(Form("%o",isEPselection))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%MCTRUTH%"+std::string(Form("%o",isMCTruth))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%PTCUT%"+std::string(Form("%o",isPtCut))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%PTMIN%"+std::string(Form("%0.2f",PtMin))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%ISFBREM%"+std::string(Form("%o",isfbrem))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%FBREMMAX%"+std::string(Form("%0.2f",fbremMax))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%R9CUT%"+std::string(Form("%o",isR9selection))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%R9MIN%"+std::string(Form("%0.2f",R9Min))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%INPUTMOMENTUMSCALE%"+std::string(inputMomentumScale)+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%TYPEEB%"+std::string(typeEB)+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%TYPEEE%"+std::string(typeEE)+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%OUTPUTPATH%"+std::string(outputPath)+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%NUMEVENTS%"+std::string(Form("%d",numberOfEvents))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%USEZ%"+std::string(Form("%d",useZ))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%USEW%"+std::string(Form("%d",useW))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%SPLIT%"+std::string(Form("%d",splitStat))+"%g > "+inputTemp1).c_str()) ; + system (("cat "+inputTemp1+" | sed -e s%LOOPS%"+std::string(Form("%d",nLoops))+"%g > "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%DEADTRIGGERTOWER%"+std::string(Form("%o",isDeadTriggerTower))+"%g > "+inputTemp1).c_str()) ; + + + system(std::string(Form("touch %slancia_EB.sh",OutputCfgPath.c_str())).c_str()); + system(std::string(Form("touch %slancia_EE.sh",OutputCfgPath.c_str())).c_str()); + + std::ofstream JobStringEB(std::string(OutputCfgPath+"lancia_EB.sh").c_str(),std::ios::out); + std::ofstream JobStringEE(std::string(OutputCfgPath+"lancia_EE.sh").c_str(),std::ios::out); + + std::cout<<" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< "< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+"%g > "+std::string(NameCfg_EB)).c_str()) ; + + TString NameJobFile_EB = Form("%sbjob_FastCalibrator_EB.sh",OutputCfgPath.c_str()); + TString NameOut_EB = Form("%sout_EB.txt",OutputCfgPath.c_str()); + + system(("touch "+std::string(NameJobFile_EB)).c_str()); + + std::ofstream outJobEB(std::string(NameJobFile_EB).c_str(),std::ios::out); + outJobEB<< "#!/bin/sh"<> "+std::string(NameOut_EB)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EB_1)).c_str()) ; + + TString NameJobFile_EB_1 = Form("%sbjob_FastCalibrator_EB_p%d.sh",OutputCfgPath.c_str(),nShift); + TString NameOut_EB_1 = Form("%sout_EB_p%d.txt",OutputCfgPath.c_str(),nShift); + system(("touch "+std::string(NameJobFile_EB_1)).c_str()); + + std::ofstream outJobEB_1(std::string(NameJobFile_EB_1).c_str(),std::ios::out); + outJobEB_1<< "#!/bin/sh"<> "+std::string(NameOut_EB_1)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EB_2)).c_str()) ; + + TString NameJobFile_EB_2 = Form("%sbjob_FastCalibrator_EB_m%d.sh",OutputCfgPath.c_str(),nShift); + TString NameOut_EB_2 = Form("%sout_EB_m%d.txt",OutputCfgPath.c_str(),nShift); + system(("touch "+std::string(NameJobFile_EB_2)).c_str()); + + + std::ofstream outJobEB_2(std::string(NameJobFile_EB_2).c_str(),std::ios::out); + outJobEB_2<< "#!/bin/sh"<> "+std::string(NameOut_EB_2)< temp2.cfg").c_str()) ; + system (("cat temp2.cfg | sed -e s%"+std::string(Name1)+"%"+std::string(Name)+"%g > "+std::string(NameCfg_EB)).c_str()) ; + system(std::string("rm temp.cfg temp2.cfg").c_str()); + + + system (std::string(" cp "+NameJobFile_EB+" "+" temp.sh").c_str()); + system (("cat temp.sh | sed -e s%"+std::string(NameCfg_EB_1)+"%"+std::string(NameCfg_EB)+"%g > temp2.sh").c_str()) ; + system (("cat temp2.sh | sed -e s%"+std::string(NameOut_EB_1)+"%"+std::string(NameOut_EB)+"%g > "+std::string(NameJobFile_EB)).c_str()) ; + system(std::string("rm temp.sh temp2.sh").c_str()); + + JobStringEB.close(); + system(("sed '$d' < "+std::string(OutputCfgPath+"lancia_EB.sh")+" > tmp.txt ; sed '$d' < tmp.txt > "+std::string(OutputCfgPath+"lancia_EB.sh")).c_str()); + system(std::string(" rm tmp.txt ").c_str()); + JobStringEB.open(std::string(OutputCfgPath+"lancia_EB.sh").c_str(),std::ios::out); + JobStringEB<<"qsub -V -d "+std::string(getenv("PWD"))+"/"+OutputCfgPath+" -q longcms "+std::string(getenv("PWD"))+"/"+NameJobFile_EB< exit "< exit "< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+"%g > "+std::string(NameCfg_EE)).c_str()) ; + + TString NameJobFile_EE = Form("%sbjob_FastCalibrator_EE.sh",OutputCfgPath.c_str()); + TString NameOut_EE = Form("%sout_EE.txt",OutputCfgPath.c_str()); + system(("touch "+std::string(NameJobFile_EE)).c_str()); + + std::ofstream outJobEE(std::string(NameJobFile_EE).c_str(),std::ios::out); + outJobEE<< "#!/bin/sh"<> "+std::string(NameOut_EE)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EE_1)).c_str()) ; + + TString NameJobFile_EE_1 = Form("%sbjob_FastCalibrator_EE_pX%d.sh",OutputCfgPath.c_str(),xShift); + TString NameOut_EE_1 = Form("%sout_EE_pX%d.txt",OutputCfgPath.c_str(),xShift); + system(("touch "+std::string(NameJobFile_EE_1)).c_str()); + + std::ofstream outJobEE_1(std::string(NameJobFile_EE_1).c_str(),std::ios::out); + outJobEE_1<< "#!/bin/sh"<> "+std::string(NameOut_EE_1)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EE_2)).c_str()) ; + + TString NameJobFile_EE_2 = Form("%sbjob_FastCalibrator_EE_mX%d.sh",OutputCfgPath.c_str(),xShift); + TString NameOut_EE_2 = Form("%sout_EE_mX%d.txt",OutputCfgPath.c_str(),xShift); + system(("touch "+std::string(NameJobFile_EE_2)).c_str()); + + std::ofstream outJobEE_2(std::string(NameJobFile_EE_2).c_str(),std::ios::out); + outJobEE_2<< "#!/bin/sh"<> "+std::string(NameOut_EE_2)< temp2.cfg").c_str()) ; + system (("cat temp2.cfg | sed -e s%"+std::string(Name1)+"%"+std::string(Name)+"%g > "+std::string(NameCfg_EE)).c_str()) ; + system(std::string("rm temp.cfg temp2.cfg").c_str()); + + + system (std::string(" cp "+NameJobFile_EE+" "+" temp.sh").c_str()); + system (("cat temp.sh | sed -e s%"+std::string(NameCfg_EE_1)+"%"+std::string(NameCfg_EE)+"%g > temp2.sh").c_str()) ; + system (("cat temp2.sh | sed -e s%"+std::string(NameOut_EE_1)+"%"+std::string(NameOut_EE)+"%g > "+std::string(NameJobFile_EE)).c_str()) ; + system(std::string("rm temp.sh temp2.sh").c_str()); + + JobStringEE.close(); + system(("sed '$d' < "+std::string(OutputCfgPath+"lancia_EE.sh")+" > tmp.txt ; sed '$d' < tmp.txt > "+std::string(OutputCfgPath+"lancia_EE.sh")).c_str()); + system(std::string(" rm tmp.txt ").c_str()); + JobStringEE.open(std::string(OutputCfgPath+"lancia_EE.sh").c_str(),std::ios::out); + JobStringEE<<"qsub -V -d "+std::string(getenv("PWD"))+"/"+OutputCfgPath+" -q longcms "+std::string(getenv("PWD"))+"/"+NameJobFile_EE< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name1)+"%g > "+std::string(NameCfg_EE_1)).c_str()) ; + + TString NameJobFile_EE_1 = Form("%sbjob_FastCalibrator_EE_pY%d.sh",OutputCfgPath.c_str(),yShift); + TString NameOut_EE_1 = Form("%sout_EE_pY%d.txt",OutputCfgPath.c_str(),yShift); + system(("touch "+std::string(NameJobFile_EE_1)).c_str()); + + std::ofstream outJobEE_1(std::string(NameJobFile_EE_1).c_str(),std::ios::out); + outJobEE_1<< "#!/bin/sh"<> "+std::string(NameOut_EE_1)< "+inputTemp2).c_str()) ; + system (("cat "+inputTemp2+" | sed -e s%INPUTFILEDEADXTAL%"+std::string(Name2)+"%g > "+std::string(NameCfg_EE_2)).c_str()) ; + + TString NameJobFile_EE_2 = Form("%sbjob_FastCalibrator_EE_mY%d.sh",OutputCfgPath.c_str(),yShift); + TString NameOut_EE_2 = Form("%sout_EE_mY%d.txt",OutputCfgPath.c_str(),yShift); + system(("touch "+std::string(NameJobFile_EE_2)).c_str()); + + std::ofstream outJobEE_2(std::string(NameJobFile_EE_2).c_str(),std::ios::out); + outJobEE_2<< "#!/bin/sh"<> "+std::string(NameOut_EE_2)< +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TProfile2D.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TTree.h" +#include "TApplication.h" +using namespace std; +/// Check if the crystal is near to a dead one + +bool CheckxtalIC (TH2F* h_scale_EB,int iPhi, int iEta ) +{ + if(h_scale_EB->GetBinContent(iPhi,iEta) ==0) return false; + + int bx= h_scale_EB->GetNbinsX(); + int by= h_scale_EB->GetNbinsY(); + + if((iPhiGetBinContent(iPhi+1,iEta) ==0) || (h_scale_EB->GetBinContent(iPhi-1,iEta)==0 && iPhi>1)) return false; + + if((iEtaGetBinContent(iPhi,iEta+1) ==0 && iEta!=85 ) || (h_scale_EB->GetBinContent(iPhi,iEta-1)==0 && iEta>1 && iEta!=87)) return false; + + if((iPhiGetBinContent(iPhi+1,iEta+1) ==0 && iEta!=85 && iEtaGetBinContent(iPhi-1,iEta-1)==0 && iEta>1 && iEta!=87 && iPhi>1)) return false; + + if((h_scale_EB->GetBinContent(iPhi+1,iEta-1) ==0 && iEta>1 && iEta!=87 && iPhiGetBinContent(iPhi-1,iEta+1)==0 && iPhi>1 && iEta!=85 && iEta >& TT_centre ) +{ + for(unsigned int k =0; kGet("ntu"); + + TFile *f2 = new TFile(input2,""); + TH2F *h_scale_EB = (TH2F*)f2->Get("h_scale_EB"); + TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); + + hcmap -> Reset("ICEMS"); + hcmap -> ResetStats(); + + /// Taking infos + + std::vector* ele1_recHit_E=0; + std::vector* ele2_recHit_E=0; + std::vector* ele1_recHit_hashedIndex=0; + std::vector* ele2_recHit_hashedIndex=0; + std::vector* ele1_recHit_flag=0; + std::vector* ele2_recHit_flag=0; + float ele1_E_true,ele2_E_true; + float ele1_tkP,ele2_tkP; + int ele1_isEB, ele2_isEB; + float ele1_fbrem,ele2_fbrem; + int isW, isZ; + + inputTree->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E); + inputTree->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E); + inputTree->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex); + inputTree->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex); + inputTree->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag); + inputTree->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag); + inputTree->SetBranchAddress("ele1_E_true", &ele1_E_true); + inputTree->SetBranchAddress("ele2_E_true", &ele2_E_true); + inputTree->SetBranchAddress("ele1_tkP", &ele1_tkP); + inputTree->SetBranchAddress("ele2_tkP", &ele2_tkP); + inputTree->SetBranchAddress("ele1_isEB", &ele1_isEB); + inputTree->SetBranchAddress("ele2_isEB", &ele2_isEB); + inputTree->SetBranchAddress("ele1_fbrem", &ele1_fbrem); + inputTree->SetBranchAddress("ele2_fbrem", &ele2_fbrem); + inputTree->SetBranchAddress("isW", &isW); + inputTree->SetBranchAddress("isZ", &isZ); + + TProfile2D* mapMomentum = new TProfile2D("mapMomentum","mapMomentum",360,0,360,170,-85,85); + TProfile2D* mapfbrem = new TProfile2D("mapfbrem","mapfbrem",360,0,360,170,-85,85); + + /// Make fbrem and p/ptrue map cycling on MC --> all the events + + for(Long64_t i=0; i< inputTree->GetEntries(); i++) + { + inputTree->GetEntry(i); + if (!(i%100000))std::cerr<size(); iRecHit++ ) { + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_flag->at(iRecHit) < 4 ) /// control if this recHit is good + { + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + // iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + + } + } + + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + int phi_seed = GetIphiFromHashedIndex(seed_hashedIndex); + if(ele1_tkP>0 && ele1_E_true>0 && abs(ele1_tkP/ele1_E_true)<2. && abs(ele1_tkP/ele1_E_true)>0.5) mapMomentum->Fill(phi_seed,eta_seed,abs(ele1_tkP/ele1_E_true)); + mapfbrem->Fill(phi_seed,eta_seed,abs(ele1_fbrem)); + } + + if (ele2_isEB == 1 && isZ==1) { + + double E_seed=0; + int seed_hashedIndex=-1;// iseed; + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_flag->at(iRecHit) < 4 ) /// control if this recHit is good + { + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + // iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); ///! Seed search + + } + } + + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + int phi_seed = GetIphiFromHashedIndex(seed_hashedIndex); + if(ele2_tkP>0 && ele2_E_true>0 && abs(ele2_tkP/ele2_E_true)<2. && abs(ele2_tkP/ele2_E_true)>0.5) mapMomentum->Fill(phi_seed,eta_seed,abs(ele2_tkP/ele2_E_true)); + mapfbrem->Fill(phi_seed,eta_seed,abs(ele2_fbrem)); + + } + } + + /// Map of IC normalized in eta rings + + std::vector< std::pair > TT_centre ; + + TT_centre.push_back(std::pair (58,49)); + TT_centre.push_back(std::pair (53,109)); + TT_centre.push_back(std::pair (8,114)); + TT_centre.push_back(std::pair (83,169)); + TT_centre.push_back(std::pair (53,174)); + TT_centre.push_back(std::pair (63,194)); + TT_centre.push_back(std::pair (83,224)); + TT_centre.push_back(std::pair (73,344)); + TT_centre.push_back(std::pair (83,358)); + TT_centre.push_back(std::pair (-13,18)); + TT_centre.push_back(std::pair (-18,23)); + TT_centre.push_back(std::pair (-8,53)); + TT_centre.push_back(std::pair (-3,63)); + TT_centre.push_back(std::pair (-53,128)); + TT_centre.push_back(std::pair (-53,183)); + TT_centre.push_back(std::pair (-83,193)); + TT_centre.push_back(std::pair (-74,218)); + TT_centre.push_back(std::pair (-8,223)); + TT_centre.push_back(std::pair (-68,303)); + TT_centre.push_back(std::pair (-43,328)); + + /// Mean over phi corrected skipping dead channel + + for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + bool isGood = CheckxtalIC(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT(iPhi,iEta,TT_centre); + + if(isGood && isGoodTT) + { + SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + //fede: skip bad channels and bad TTs + for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if(numIC==0 || SumIC==0) continue; + + bool isGood = CheckxtalIC(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT(iPhi,iEta,TT_centre); + if (!isGood || !isGoodTT) continue; + + hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + /// ratio map + + TH2F* ratioMap = (TH2F*) hcmap -> Clone("ratioMap"); + ratioMap->Reset(); + + for( int i =0 ; iGetNbinsX() ; i++){ + for( int j=0; jGetNbinsY() ; j++){ + if(hcmap->GetBinContent(i,j)!=0 && mapMomentum->GetBinContent(i,j)!=0) + ratioMap->SetBinContent(i+1,j+1,mapMomentum->GetBinContent(i,j)/hcmap->GetBinContent(i,j)); + } + } + + /// Profile along phi taking into account dead channels + TGraphErrors *coeffEBp = new TGraphErrors(); + TGraphErrors *coeffEBm = new TGraphErrors(); + + for (int iPhi =1; iPhi< hcmap->GetNbinsX()+1 ; iPhi++){ + double SumEBp =0, SumEBm=0; + double iEBp=0, iEBm=0; + for(int iEta = 1; iEtaGetNbinsY()+1 ; iEta++){ + if(hcmap->GetBinContent(iPhi,iEta)==0)continue; + if(iEta>85) {SumEBp=SumEBp+mapMomentum->GetBinContent(iPhi,iEta)/hcmap->GetBinContent(iPhi,iEta); + iEBp++;} + else{ SumEBm=SumEBm+mapMomentum->GetBinContent(iPhi,iEta)/hcmap->GetBinContent(iPhi,iEta); + iEBm++;} + } + coeffEBp->SetPoint(iPhi-1,iPhi-1,SumEBp/iEBp); + coeffEBm->SetPoint(iPhi-1,iPhi-1,SumEBm/iEBm); + + } + + TFile* outputGraph = new TFile("output/GraphFor_P_Correction.root","RECREATE"); + outputGraph->cd(); + + coeffEBp->Write("coeffEBp"); + coeffEBm->Write("coeffEBm"); + outputGraph->Close(); + + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + TCanvas* c1 = new TCanvas("mapMomentum","mapMomentum",1); + c1->cd(); + mapMomentum->GetXaxis()->SetTitle("#phi"); + mapMomentum->GetXaxis()->SetNdivisions(20); + c1->SetGridx(); + mapMomentum->GetYaxis()->SetTitle("#eta"); + mapMomentum->GetZaxis()->SetRangeUser(0.7,1.3); + mapMomentum->Draw("colz"); + + TCanvas* c2 = new TCanvas("mapfbrem","mapfbrem",1); + c2->cd(); + mapfbrem->GetXaxis()->SetTitle("#phi"); + mapfbrem->GetYaxis()->SetTitle("#eta"); + mapfbrem->GetXaxis()->SetNdivisions(20); + c2->SetGridx(); + mapfbrem->GetZaxis()->SetRangeUser(0.,0.7); + mapfbrem->Draw("colz"); + + TCanvas* c3 = new TCanvas("ratioMap","ratioMap",1); + c3->cd(); + ratioMap->GetXaxis()->SetTitle("#phi"); + ratioMap->GetYaxis()->SetTitle("#eta"); + ratioMap->GetXaxis()->SetNdivisions(20); + c3->SetGridx(); + ratioMap->GetZaxis()->SetRangeUser(0.7,1.3); + ratioMap->Draw("colz"); + + TCanvas* c4 = new TCanvas("coeffEB","coeffEB",1); + c4->cd(); + coeffEBp->GetXaxis()->SetTitle("#phi"); + coeffEBp->GetYaxis()->SetTitle("p/p_{true}"); + coeffEBp -> SetMarkerStyle(20); + coeffEBp -> SetMarkerSize(1); + coeffEBp -> SetMarkerColor(kRed+1); + coeffEBp -> SetLineColor(kRed+1); + c4->SetGridx(); + c4->SetGridy(); + ratioMap->Draw("ap"); + + coeffEBm->GetXaxis()->SetTitle("#phi"); + coeffEBm->GetYaxis()->SetTitle("p/p_{true}"); + coeffEBm -> SetMarkerStyle(20); + coeffEBm -> SetMarkerSize(1); + coeffEBm -> SetMarkerColor(kBlue+1); + coeffEBm -> SetLineColor(kBlue+1); + coeffEBm->Draw("ap same"); + + + theApp->Run(); + return 0; +} diff --git a/EOverPCalibration/bin/NormalizeIC_EE.cpp b/EOverPCalibration/bin/NormalizeIC_EE.cpp new file mode 100644 index 00000000000..8a19e32250f --- /dev/null +++ b/EOverPCalibration/bin/NormalizeIC_EE.cpp @@ -0,0 +1,572 @@ +/// +/// Stand-alone to Normalize DATA/MC IC Coefficient along one ring skipping dead channels and TT EE +/// Input File Scale Map of a data sample (can be used also on MC) an this is saved in the same +/// file updating the old scale_map normalized by rings without skip dead channels + +#include +#include +#include +#include +#include +#include +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "TApplication.h" + +#include "FWCore/ParameterSet/interface/ProcessDesc.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" + +using namespace std; + +/// Check if the crystal is near to a dead one +bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir); +/// Check if the crystal is near to a dead TT +bool CheckxtalTT (int ix, int iy, int ir, std::vector >& TT_centre ); + +int main( int argc, char **argv){ + + /// map for dead TT centre + + std::vector< std::pair > TT_centre_EEP; + std::vector< std::pair > TT_centre_EEM; + + TT_centre_EEP.push_back(std::pair (78,78)); + TT_centre_EEP.push_back(std::pair (83,28)); + TT_centre_EEP.push_back(std::pair (83,23)); + TT_centre_EEM.push_back(std::pair (53,28)); + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + /// Acquisition from cfg file + + if(argc != 2){ + std::cerr << ">>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + + std::string configFileName = argv[1]; + boost::shared_ptr parameterSet = edm::readConfig(configFileName); + edm::ParameterSet Options = parameterSet -> getParameter("Options"); + // parameterSet.reset(); + + std::string infile1 = "NULL"; + if(Options.existsAs("infile1")) + infile1 = Options.getParameter("infile1"); + + std::string infile2 = "NULL"; + if(Options.existsAs("infile2")) + infile2 = Options.getParameter("infile2"); + + std::string infile3 = "NULL"; + if(Options.existsAs("infile3")) + infile3 = Options.getParameter("infile3"); + + int evalStat = 1; + if(Options.existsAs("evalStat")) + evalStat = Options.getParameter("evalStat"); + + if ( infile1.empty()) { + cout << " No input file specified !" << endl; + return 1; + } + + if ( evalStat && (infile2.empty() || infile3.empty() )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return 1; + } + + std::string fileType = "NULL"; + if(Options.existsAs("fileType")) + fileType = Options.getParameter("fileType"); + + std::string dirName = "NULL"; + if(Options.existsAs("dirName")) + dirName = Options.getParameter("dirName"); + + cout << "Making Eta ring Normalization for: " << infile1 << endl; + + + TApplication* theApp = new TApplication("Application",&argc, argv); + + /// Input file with full statistic + + TFile *f = new TFile(infile1.c_str(),"UPDATE"); + TH2F* h_scale_EE[2],*hcmap_EE[2]; + + h_scale_EE[1] = (TH2F*)f->Get("h_scale_EEP"); + h_scale_EE[0] = (TH2F*)f->Get("h_scale_EEM"); + + hcmap_EE[1] = (TH2F*) h_scale_EE[1]->Clone("hcmap_EEP"); + hcmap_EE[0] = (TH2F*) h_scale_EE[0]->Clone("hcmap_EEM"); + + hcmap_EE[0] -> Reset("ICEMS"); + hcmap_EE[1] -> Reset("ICEMS"); + hcmap_EE[0] -> ResetStats(); + hcmap_EE[1] -> ResetStats(); + + /// ring structure from eerings.dat + TH2F *hrings[2]; + hrings[0] = (TH2F*)h_scale_EE[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)h_scale_EE[1]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICMES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); + } + + std::vector SumIC_Ring_EEP,SumIC_Ring_EEM,Sumxtal_Ring_EEP,Sumxtal_Ring_EEM; + + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + /// Mean over phi corrected skipping dead channel + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); + bool isGoodTT; + + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ){ + SumIC_Ring_EEP.at(ir) = SumIC_Ring_EEP.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP.at(ir) = Sumxtal_Ring_EEP.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood){ + SumIC_Ring_EEM.at(ir) = SumIC_Ring_EEM.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM.at(ir) = Sumxtal_Ring_EEM.at(ir) + 1.; + } + } + } + } + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + if(k!=0){ + if(ir>33){ hcmap_EE[k]->Fill(ix,iy,0.); + continue;} + if(Sumxtal_Ring_EEP.at(ir) != 0 && SumIC_Ring_EEP.at(ir)!= 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP.at(ir)/Sumxtal_Ring_EEP.at(ir))); + } + else{ + if(ir>33){hcmap_EE[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM.at(ir) != 0 && SumIC_Ring_EEM.at(ir) != 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM.at(ir)/Sumxtal_Ring_EEM.at(ir))); + } + } + } + } + + TH2F* h_scale_EE_Even[2],*hcmap_EE_Even[2]; + TH2F* h_scale_EE_Odd[2],*hcmap_EE_Odd[2]; + + h_scale_EE_Even[1] = new TH2F(); + h_scale_EE_Even[0] = new TH2F(); + + h_scale_EE_Odd[1] = new TH2F(); + h_scale_EE_Odd[0] = new TH2F(); + + hcmap_EE_Even[1] = new TH2F(); + hcmap_EE_Even[0] = new TH2F(); + + hcmap_EE_Odd[1] = new TH2F(); + hcmap_EE_Odd[0] = new TH2F(); + + TFile *f2 = new TFile(); + TFile *f3 = new TFile(); + + /// if evalstat --> apply also to the other file Odd and Even + if(evalStat){ + + f2 = new TFile(infile2.c_str(),"UPDATE"); + f3 = new TFile(infile3.c_str(),"UPDATE"); + + h_scale_EE_Even[1] = (TH2F*)f2->Get("h_scale_EEP"); + h_scale_EE_Even[0] = (TH2F*)f2->Get("h_scale_EEM"); + + h_scale_EE_Odd[1] = (TH2F*)f3->Get("h_scale_EEP"); + h_scale_EE_Odd[0] = (TH2F*)f3->Get("h_scale_EEM"); + + hcmap_EE_Even[1] = (TH2F*) h_scale_EE_Even[1]->Clone("hcmap_EEP"); + hcmap_EE_Even[0] = (TH2F*) h_scale_EE_Even[0]->Clone("hcmap_EEM"); + + hcmap_EE_Odd[1] = (TH2F*) h_scale_EE_Odd[1]->Clone("hcmap_EEP"); + hcmap_EE_Odd[0] = (TH2F*) h_scale_EE_Odd[0]->Clone("hcmap_EEM"); + + hcmap_EE_Even[0] -> Reset("ICEMS"); + hcmap_EE_Even[1] -> Reset("ICEMS"); + hcmap_EE_Even[0] -> ResetStats(); + hcmap_EE_Even[1] -> ResetStats(); + + hcmap_EE_Odd[0] -> Reset("ICEMS"); + hcmap_EE_Odd[1] -> Reset("ICEMS"); + hcmap_EE_Odd[0] -> ResetStats(); + hcmap_EE_Odd[1] -> ResetStats(); + + std::vector SumIC_Ring_EEP_Even,SumIC_Ring_EEM_Even,Sumxtal_Ring_EEP_Even,Sumxtal_Ring_EEM_Even; + std::vector SumIC_Ring_EEP_Odd,SumIC_Ring_EEM_Odd,Sumxtal_Ring_EEP_Odd,Sumxtal_Ring_EEM_Odd; + + SumIC_Ring_EEP_Even.assign(40,0); + SumIC_Ring_EEM_Even.assign(40,0); + Sumxtal_Ring_EEP_Even.assign(40,0); + Sumxtal_Ring_EEM_Even.assign(40,0); + SumIC_Ring_EEP_Odd.assign(40,0); + SumIC_Ring_EEM_Odd.assign(40,0); + Sumxtal_Ring_EEP_Odd.assign(40,0); + Sumxtal_Ring_EEM_Odd.assign(40,0); + + /// Mean over phi corrected skipping dead channel: Even sample + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Even[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Even[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + bool isGood = CheckxtalIC(h_scale_EE_Even[k],ix,iy,ir); + bool isGoodTT; + + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ){ + SumIC_Ring_EEP_Even.at(ir) = SumIC_Ring_EEP_Even.at(ir) + h_scale_EE_Even[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP_Even.at(ir) = Sumxtal_Ring_EEP_Even.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood){ + SumIC_Ring_EEM_Even.at(ir) = SumIC_Ring_EEM_Even.at(ir) + h_scale_EE_Even[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM_Even.at(ir) = Sumxtal_Ring_EEM_Even.at(ir) + 1.; + } + } + } + } + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Even[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Even[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + if(k!=0){ + if(ir>33){ hcmap_EE_Even[k]->Fill(ix,iy,0.); + continue;} + if(Sumxtal_Ring_EEP_Even.at(ir) != 0 && SumIC_Ring_EEP_Even.at(ir)!= 0) + hcmap_EE_Even[k]->Fill(ix,iy,h_scale_EE_Even[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP_Even.at(ir)/Sumxtal_Ring_EEP_Even.at(ir))); + } + else{ + if(ir>33){hcmap_EE_Even[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM_Even.at(ir) != 0 && SumIC_Ring_EEM_Even.at(ir) != 0) + hcmap_EE_Even[k]->Fill(ix,iy,h_scale_EE_Even[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM_Even.at(ir)/Sumxtal_Ring_EEM_Even.at(ir))); + } + } + } + } + + + /// Mean over phi corrected skipping dead channel: Odd sample + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Odd[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Odd[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + bool isGood = CheckxtalIC(h_scale_EE_Odd[k],ix,iy,ir); + bool isGoodTT; + + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ){ + SumIC_Ring_EEP_Odd.at(ir) = SumIC_Ring_EEP_Odd.at(ir) + h_scale_EE_Odd[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP_Odd.at(ir) = Sumxtal_Ring_EEP_Odd.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood){ + SumIC_Ring_EEM_Odd.at(ir) = SumIC_Ring_EEM_Odd.at(ir) + h_scale_EE_Odd[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM_Odd.at(ir) = Sumxtal_Ring_EEM_Odd.at(ir) + 1.; + } + } + } + } + + for(int k=0; k<2 ; k++){ + for( int ix = 0; ix < h_scale_EE_Odd[k]->GetNbinsX()+1 ; ix++ ){ + for(int iy = 0; iy < h_scale_EE_Odd[k]->GetNbinsY()+1 ; iy++ ){ + + ir = int(hrings[k]->GetBinContent(ix,iy)); + + if(k!=0){ + if(ir>33){ hcmap_EE_Odd[k]->Fill(ix,iy,0.); + continue;} + if(Sumxtal_Ring_EEP_Odd.at(ir) != 0 && SumIC_Ring_EEP_Odd.at(ir)!= 0) + hcmap_EE_Odd[k]->Fill(ix,iy,h_scale_EE_Odd[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP_Odd.at(ir)/Sumxtal_Ring_EEP_Odd.at(ir))); + } + else{ + if(ir>33){hcmap_EE_Odd[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM_Odd.at(ir) != 0 && SumIC_Ring_EEM_Odd.at(ir) != 0) + hcmap_EE_Odd[k]->Fill(ix,iy,h_scale_EE_Odd[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM_Odd.at(ir)/Sumxtal_Ring_EEM_Odd.at(ir))); + } + } + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP not normalized"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + h_scale_EE[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[1]->Draw("COLZ"); + h_scale_EE[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[0] = new TCanvas("cEEM","cmapEEM not normalized"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + + h_scale_EE[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[0]->Draw("COLZ"); + h_scale_EE[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[1] = new TCanvas("cmapEEP Normalized","cmapEEP Normalized"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + + hcmap_EE[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[1]->Draw("COLZ"); + hcmap_EE[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[1] = new TCanvas("cmapEEM Normalized","cmapEEM Normalized"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + hcmap_EE[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[0]->Draw("COLZ"); + hcmap_EE[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + f->cd(); + hcmap_EE[0]->Write("h_scale_map_EEP"); + hcmap_EE[1]->Write("h_scale_map_EEP"); + + if(evalStat){ + /// --- plot 0 : map of coefficients + cEEP[2] = new TCanvas("cEEP_Even","cmapEEP not normalized Even"); + cEEP[2] -> cd(); + cEEP[2]->SetLeftMargin(0.1); + cEEP[2]->SetRightMargin(0.13); + cEEP[2]->SetGridx(); + cEEP[2]->SetGridy(); + h_scale_EE_Even[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Even[1]->Draw("COLZ"); + h_scale_EE_Even[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Even[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Even[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[2] = new TCanvas("cEEM_Even","cmapEEM not normalized Even"); + cEEM[2] -> cd(); + cEEM[2]->SetLeftMargin(0.1); + cEEM[2]->SetRightMargin(0.13); + cEEM[2]->SetGridx(); + cEEM[2]->SetGridy(); + + h_scale_EE_Even[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Even[0]->Draw("COLZ"); + h_scale_EE_Even[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Even[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Even[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[3] = new TCanvas("cmapEEP Normalized Even","cmapEEP Normalized Even"); + cEEP[3] -> cd(); + cEEP[3]->SetLeftMargin(0.1); + cEEP[3]->SetRightMargin(0.13); + cEEP[3]->SetGridx(); + cEEP[3]->SetGridy(); + + hcmap_EE_Even[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Even[1]->Draw("COLZ"); + hcmap_EE_Even[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Even[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Even[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[3] = new TCanvas("cmapEEM Normalized Even","cmapEEM Normalized Even"); + cEEM[3] -> cd(); + cEEM[3]->SetLeftMargin(0.1); + cEEM[3]->SetRightMargin(0.13); + cEEM[3]->SetGridx(); + cEEM[3]->SetGridy(); + hcmap_EE_Even[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Even[0]->Draw("COLZ"); + hcmap_EE_Even[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Even[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Even[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + f2->cd(); + hcmap_EE_Even[0]->Write("h_scale_map_EEP"); + hcmap_EE_Even[1]->Write("h_scale_map_EEP"); + + /// --- plot 0 : map of coefficients + cEEP[4] = new TCanvas("cEEP_Odd","cmapEEP not normalized Odd"); + cEEP[4] -> cd(); + cEEP[4]->SetLeftMargin(0.1); + cEEP[4]->SetRightMargin(0.13); + cEEP[4]->SetGridx(); + cEEP[4]->SetGridy(); + h_scale_EE_Odd[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Odd[1]->Draw("COLZ"); + h_scale_EE_Odd[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Odd[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Odd[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[4] = new TCanvas("cEEM_Odd","cmapEEM not normalized Odd"); + cEEM[4] -> cd(); + cEEM[4]->SetLeftMargin(0.1); + cEEM[4]->SetRightMargin(0.13); + cEEM[4]->SetGridx(); + cEEM[4]->SetGridy(); + + h_scale_EE_Odd[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE_Odd[0]->Draw("COLZ"); + h_scale_EE_Odd[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE_Odd[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE_Odd[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[5] = new TCanvas("cmapEEP Normalized Odd","cmapEEP Normalized Odd"); + cEEP[5] -> cd(); + cEEP[5]->SetLeftMargin(0.1); + cEEP[5]->SetRightMargin(0.13); + cEEP[5]->SetGridx(); + cEEP[5]->SetGridy(); + + hcmap_EE_Odd[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Odd[1]->Draw("COLZ"); + hcmap_EE_Odd[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Odd[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Odd[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[5] = new TCanvas("cmapEEM Normalized Odd","cmapEEM Normalized Odd"); + cEEM[5] -> cd(); + cEEM[5]->SetLeftMargin(0.1); + cEEM[5]->SetRightMargin(0.13); + cEEM[5]->SetGridx(); + cEEM[5]->SetGridy(); + hcmap_EE_Odd[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE_Odd[0]->Draw("COLZ"); + hcmap_EE_Odd[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE_Odd[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE_Odd[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + f3->cd(); + hcmap_EE_Odd[0]->Write("h_scale_map_EEP"); + hcmap_EE_Odd[1]->Write("h_scale_map_EEP"); + } + + theApp->Run(); + return 0; + + } + +////////////////////////////////////////////////////////////// + +bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir) +{ + if(h_scale_EE->GetBinContent(ix,iy) ==0) return false; + + int bx= h_scale_EE->GetNbinsX(); + int by= h_scale_EE->GetNbinsY(); + + if((ixGetBinContent(ix+1,iy) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix-1,iy)==0 && ix>1 && (ir!=0 || ir<33))) return false; + + if((iyGetBinContent(ix,iy+1) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix,iy-1)==0 && iy>1 && (ir!=0 || ir<33))) return false; + + if((ixGetBinContent(ix+1,iy+1) ==0 && iyGetBinContent(ix-1,iy-1)==0 && iy>1 && ix>1 && (ir!=0 || ir<33))) return false; + + if((h_scale_EE->GetBinContent(ix+1,iy-1) ==0 && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && ix>1 && iy >& TT_centre ) +{ + for( unsigned int k =0; k +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TCanvas.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TLatex.h" +#include "TTree.h" +#include "TChain.h" + +#include +#include +#include "../../NtuplePackage/interface/treeReader.h" + + +void SetWHLTPathNames(std::vector > > & WHLTPathNames) ; + + +int main (int argc, char ** argv){ + +std::string category = std::string(argv[1]); + +double xtalWidth=0.01745329; +double luminosity=11.35; +double etaringEE=0.0325; + +// Acquisition of input file +TChain* treeDATA = new TChain("simpleNtupleEoverP/SimpleNtupleEoverP"); + +treeDATA->Add("/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012D_22Jan2013-v1.root"); + + +treeReader *fReader = new treeReader((TTree*)(treeDATA), false); +treeDATA->SetBranchStatus("*",0); +treeDATA->SetBranchStatus("isW",1); +treeDATA->SetBranchStatus("isZ",1); +treeDATA->SetBranchStatus("ele1_seedZside",1); +treeDATA->SetBranchStatus("ele1_seedIx",1); +treeDATA->SetBranchStatus("ele1_seedIy",1); +treeDATA->SetBranchStatus("ele1_seedIphi",1); +treeDATA->SetBranchStatus("ele1_seedIeta",1); +treeDATA->SetBranchStatus("ele1_e3x3",1); +treeDATA->SetBranchStatus("ele1_scEta",1); +treeDATA->SetBranchStatus("ele1_scERaw",1); + +treeDATA->SetBranchStatus("ele2_seedZside",1); +treeDATA->SetBranchStatus("ele2_seedIx",1); +treeDATA->SetBranchStatus("ele2_seedIy",1); +treeDATA->SetBranchStatus("ele2_seedIphi",1); +treeDATA->SetBranchStatus("ele2_seedIeta",1); +treeDATA->SetBranchStatus("ele2_e3x3",1); +treeDATA->SetBranchStatus("ele2_scEta",1); +treeDATA->SetBranchStatus("ele2_scERaw",1); + +// Set Single Electron Trigger Names + +std::vector > > WHLTPathNames; +SetWHLTPathNames(WHLTPathNames); + +TH2F* h_OccupancyEB = new TH2F("h_OccupancyEB","h_OccupancyEB",360,1,361,171,-85,86); +TH2F* h_OccupancyEB2 = new TH2F("h_OccupancyEB2","h_OccupancyEB",360,1,361,171,-85,86); + +TH2F* h_OccupancyEE[2]; +h_OccupancyEE[0] = new TH2F("h_OccupancyEEM","h_OccupancyEEP",100,1,101,100,1,101); +h_OccupancyEE[1] = new TH2F("h_OccupancyEEP","h_OccupancyEEM",100,1,101,100,1,101); + +TH2F* h_OccupancyEE2[2]; +h_OccupancyEE2[1] = new TH2F("h_OccupancyEEP2","h_OccupancyEEP2",100,1,101,100,1,101); +h_OccupancyEE2[0] = new TH2F("h_OccupancyEEM2","h_OccupancyEEM2",100,1,101,100,1,101); + + +std::cout<<" DATA Entries = "<GetEntries()<GetEntries(); ++entry) { + + if( entry%100000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + treeDATA->GetEntry(entry); + + //if(fReader->getInt("isHLTEle27")[0] != 1 || fReader->getInt("isGood")[0] !=1 ) continue; + + bool skipEvent = true; + bool isWHLT = false; + + // W triggers + for(unsigned int HLTIt = 0; HLTIt < WHLTPathNames.size(); ++HLTIt){ + + if( fReader->getInt("runId")[0] < ((WHLTPathNames.at(HLTIt)).second).first ) continue; + if( fReader->getInt("runId")[0] > ((WHLTPathNames.at(HLTIt)).second).second ) continue; + + for(unsigned int iHLTIt = 0; iHLTIt < fReader->GetString("HLT_Names")->size(); ++iHLTIt){ + if( (fReader->GetString("HLT_Names")->at(iHLTIt) == WHLTPathNames.at(HLTIt).first) && (fReader->GetInt("HLT_Accept")->at(iHLTIt) == 1) ) isWHLT = true; + } + + if( isWHLT == true ) skipEvent = false; + } + + + if(skipEvent == true) continue ; + + + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(category == "Default"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// } + +// if(category == "R9"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } + +// if(category == "fbrem") { +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fabs(fReader->getFloat("ele1_fbrem")[0])<0.5) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } + +// if(category == "Pt"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) +// h_OccupancyEB2->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0 && fReader->getFloat("ele1_pt")[0]>50) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } + + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 ){ + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + } + + +// if(category=="Default"){ +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1 && fReader->getInt("isZ")[0] ==0){ +// if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_r9")[0]>0.8) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_r9")[0]>0.88) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_r9")[0]>0.92) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } +// } + + + if(fReader->getInt("isW")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1){ + + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + } + + +// if(category == "Default"){ + +// if(fReader->getInt("isGood")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1 && fReader->getInt("isZ")[0] ==0){ + +// if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_r9")[0]>0.8) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_r9")[0]>0.88) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_r9")[0]>0.92) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + +// if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_r9")[0]>0.94) +// h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); +// } +// } + + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==0) h_OccupancyEB->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==1) h_OccupancyEE[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==-1) h_OccupancyEE[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==1){ + + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + } + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==1){ + + if(fabs(fReader->getFloat("ele2_scEta")[0])<1.75 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.8) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele2_scEta")[0])<2. && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.88) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2. && fabs(fReader->getFloat("ele2_scEta")[0])<2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.92) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.94) + h_OccupancyEE2[1]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + } + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele1_seedZside")[0]==-1){ + + if(fabs(fReader->getFloat("ele1_scEta")[0])<1.75 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.8) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIphi")[0],fReader->getInt("ele1_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele1_scEta")[0])<2. && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.88) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2. && fabs(fReader->getFloat("ele1_scEta")[0])<2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.92) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + if(fabs(fReader->getFloat("ele1_scEta")[0])>=2.15 && fReader->getFloat("ele1_e3x3")[0]/fReader->getFloat("ele1_scERaw")[0]>0.94) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele1_seedIx")[0],fReader->getInt("ele1_seedIy")[0]); + + } + + if(fReader->getInt("isZ")[0] ==1 && fReader->getInt("ele2_seedZside")[0]==-1){ + + if(fabs(fReader->getFloat("ele2_scEta")[0])<1.75 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.8) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIphi")[0],fReader->getInt("ele2_seedIeta")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=1.75 && fabs(fReader->getFloat("ele2_scEta")[0])<2. && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.88) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2. && fabs(fReader->getFloat("ele2_scEta")[0])<2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.92) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + if(fabs(fReader->getFloat("ele2_scEta")[0])>=2.15 && fReader->getFloat("ele2_e3x3")[0]/fReader->getFloat("ele2_scERaw")[0]>0.94) + h_OccupancyEE2[0]->Fill(fReader->getInt("ele2_seedIx")[0],fReader->getInt("ele2_seedIy")[0]); + + } + + +} + +// Graph ocuppancy for single xtal + +TGraphErrors *OccupancyEB_vs_Eta = new TGraphErrors(); +TGraphErrors *OccupancyEEP_vs_Eta = new TGraphErrors(); +TGraphErrors *OccupancyEEM_vs_Eta = new TGraphErrors(); + +TGraphErrors *OccupancyAll = new TGraphErrors(); +TGraphErrors *OccupancyAll2 = new TGraphErrors(); + + +// Graph for EB +int nPoint=0, nPointAll =0, nPointAll2 =0; + + +for(int iEta =0; iEtaGetNbinsY() ;iEta++){ + double sumHit =0, nHit=0; + for(int iPhi =0; iPhiGetNbinsX() ;iPhi++){ + if(h_OccupancyEB->GetBinContent(iPhi+1,iEta+1)==0) continue; + sumHit=sumHit+h_OccupancyEB->GetBinContent(iPhi+1,iEta+1); + nHit++; + } + if(iEta<85 && sumHit!=0 && nHit!=0 ){ OccupancyEB_vs_Eta->SetPoint(nPoint,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + + OccupancyAll->SetPoint(nPointAll,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + } + + if(iEta<85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,-(85-iEta)*xtalWidth,0.); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,-(85-iEta)*xtalWidth,0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); +} + + if(iEta==85 && sumHit!=0 && nHit!=0){ OccupancyEB_vs_Eta->SetPoint(nPoint,0.,sumHit/(nHit*luminosity)); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + OccupancyAll->SetPoint(nPointAll,0.,sumHit/(nHit*luminosity)); + OccupancyAll->SetPoint(nPointAll,0.,sumHit/(nHit*luminosity)); + } + + if(iEta==85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,0.,0.); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,0.,0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); +} + + if(iEta>85 && sumHit!=0 && nHit!=0){ OccupancyEB_vs_Eta->SetPoint(nPoint,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + OccupancyAll->SetPoint(nPointAll,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + } + + if(iEta<85 && sumHit==0 && nHit==0 ){OccupancyEB_vs_Eta->SetPoint(nPoint,(iEta-85)*xtalWidth,0.); + OccupancyEB_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,(iEta-85)*xtalWidth,0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); +} + + nPoint++;nPointAll++;nPointAll2++; +} + +// Graph for EB +nPoint=0; nPointAll =0; nPointAll2 =0; + +for(int iEta =0; iEtaGetNbinsY() ;iEta++){ + double sumHit =0, nHit=0; + for(int iPhi =0; iPhiGetNbinsX() ;iPhi++){ + if(h_OccupancyEB2->GetBinContent(iPhi+1,iEta+1)==0) continue; + sumHit=sumHit+h_OccupancyEB2->GetBinContent(iPhi+1,iEta+1); + nHit++; + } + if(iEta<85 && sumHit!=0 && nHit!=0 ){ + OccupancyAll2->SetPoint(nPointAll2,-(85-iEta)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + } + + if(iEta<85 && sumHit==0 && nHit==0 ){ + OccupancyAll2->SetPoint(nPointAll2,-(85-iEta)*xtalWidth,0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); +} + + if(iEta==85 && sumHit!=0 && nHit!=0){ + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + + } + + if(iEta==85 && sumHit==0 && nHit==0 ){ + OccupancyAll2->SetPoint(nPointAll2,0.,0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); +} + + if(iEta>85 && sumHit!=0 && nHit!=0){ + OccupancyAll2->SetPoint(nPointAll2,(iEta-85)*xtalWidth,sumHit/(nHit*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHit/(nHit*luminosity))/sqrt(nHit*luminosity)); + + } + + if(iEta<85 && sumHit==0 && nHit==0 ){ + OccupancyAll2->SetPoint(nPointAll2,(iEta-85)*xtalWidth,0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); +} + + nPoint++;nPointAll++;nPointAll2++; +} + + + +// Plot for EE : EEP and EEM +/// ring geometry for the endcap +TH2F *hrings[2]; +hrings[0] = (TH2F*) h_OccupancyEE[0]->Clone("hringsEEM"); +hrings[1] = (TH2F*) h_OccupancyEE[1]->Clone("hringsEEP"); +hrings[0] ->Reset("ICMES"); +hrings[1] ->Reset("ICMES"); +hrings[0] ->ResetStats(); +hrings[1] ->ResetStats(); + +FILE *fRing; +fRing = fopen("macros/eerings.dat","r"); +int x,y,z,ir; +while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); +} + +std::vector sumHitEEM ; +std::vector nHitEEM ; +sumHitEEM.assign(40,0.); nHitEEM.assign(40,0); +std::vector sumHitEEP ; +std::vector nHitEEP ; +sumHitEEP.assign(40,0.); nHitEEP.assign(40,0); + +for(int k =0; k<2 ; k++){ + for(int ix =0; ixGetNbinsX() ;ix++){ + for(int iy =0; iyGetNbinsY() ;iy++){ + if(h_OccupancyEE[k]->GetBinContent(ix+1,iy+1)==0) continue; + int mybin = h_OccupancyEE[k] -> FindBin(ix,iy); + int ring = int(hrings[k]-> GetBinContent(mybin)); + float occ = h_OccupancyEE[k]->GetBinContent(mybin); + if(k==0){ sumHitEEM.at(ring)=sumHitEEM.at(ring)+occ; nHitEEM.at(ring)=nHitEEM.at(ring)+1;} + if(k==1){ sumHitEEP.at(ring)=sumHitEEP.at(ring)+occ; nHitEEP.at(ring)=nHitEEP.at(ring)+1;} + } + } +} + +for(int k=0; k<2 ; k++){ +nPoint=0; +if(k==0){ + + for(unsigned int iring = 0; iringSetPoint(nPoint,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); + OccupancyEEM_vs_Eta->SetPointError(nPoint,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); + OccupancyAll->SetPoint(nPointAll,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); + nPoint++;nPointAll++;} + if(sumHitEEM.at(iring)==0 || nHitEEM.at(iring)==0){ + OccupancyEEM_vs_Eta->SetPoint(nPoint,-1.*(85*xtalWidth+iring*etaringEE),0.); + OccupancyEEM_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,-1.*(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); + nPoint++;nPointAll++;} + + } + } + +if(k==1) { + for(unsigned int iring = 0; iringSetPoint(nPoint,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); + OccupancyEEP_vs_Eta->SetPointError(nPoint,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); + OccupancyAll->SetPoint(nPointAll,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); + OccupancyAll->SetPointError(nPointAll,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); + nPoint++; nPointAll++;} + + if(sumHitEEP.at(iring)==0 || nHitEEP.at(iring)==0){ + OccupancyEEP_vs_Eta->SetPoint(nPoint,(85*xtalWidth+iring*etaringEE),0.); + OccupancyEEP_vs_Eta->SetPointError(nPoint,0.,0.); + OccupancyAll->SetPoint(nPointAll,(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll->SetPointError(nPointAll,0.,0.); + nPoint++; nPointAll++;} + } + } +} + + +sumHitEEM.clear() ; +nHitEEM.clear() ; +sumHitEEM.assign(40,0.); nHitEEM.assign(40,0); +sumHitEEP.clear() ; +nHitEEP.clear() ; +sumHitEEP.assign(40,0.); nHitEEP.assign(40,0); + +for(int k =0; k<2 ; k++){ + for(int ix =0; ixGetNbinsX() ;ix++){ + for(int iy =0; iyGetNbinsY() ;iy++){ + if(h_OccupancyEE2[k]->GetBinContent(ix+1,iy+1)==0) continue; + int mybin = h_OccupancyEE2[k] -> FindBin(ix,iy); + int ring = int(hrings[k]-> GetBinContent(mybin)); + float occ = h_OccupancyEE2[k]->GetBinContent(mybin); + if(k==0){ sumHitEEM.at(ring)=sumHitEEM.at(ring)+occ; nHitEEM.at(ring)=nHitEEM.at(ring)+1;} + if(k==1){ sumHitEEP.at(ring)=sumHitEEP.at(ring)+occ; nHitEEP.at(ring)=nHitEEP.at(ring)+1;} + } + } +} + +for(int k=0; k<2 ; k++){ +nPoint=0; +if(k==0){ + for(unsigned int iring = 0; iringSetPoint(nPointAll2,-1.*(85*xtalWidth+iring*etaringEE),sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHitEEM.at(iring)/(nHitEEM.at(iring)*luminosity))/sqrt(nHitEEM.at(iring)*luminosity)); + nPoint++;nPointAll2++;} + if(sumHitEEM.at(iring)==0 || nHitEEM.at(iring)==0){ + OccupancyAll2->SetPoint(nPointAll2,-1.*(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); + nPoint++;nPointAll2++;} + } + + } +if(k==1) { + for(unsigned int iring = 0; iringSetPoint(nPointAll2,(85*xtalWidth+iring*etaringEE),sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity)); + OccupancyAll2->SetPointError(nPointAll2,0.,(sumHitEEP.at(iring)/(nHitEEP.at(iring)*luminosity))/sqrt(nHitEEP.at(iring)*luminosity)); + nPoint++; nPointAll2++;} + if(sumHitEEP.at(iring)==0 && nHitEEP.at(iring)==0){ + OccupancyAll2->SetPoint(nPointAll2,(85*xtalWidth+iring*etaringEE),0.); + OccupancyAll2->SetPointError(nPointAll2,0.,0.); + nPoint++; nPointAll2++;} + + } + } +} + +gROOT->Reset(); +gROOT->SetStyle("Plain"); + +gStyle->SetPadTickX(1); +gStyle->SetPadTickY(1); +gStyle->SetOptTitle(0); +gStyle->SetOptStat(0); +gStyle->SetFitFormat("6.3g"); +gStyle->SetPalette(1); + +gStyle->SetTextFont(42); +gStyle->SetTextSize(0.05); +gStyle->SetTitleFont(42,"xyz"); +gStyle->SetTitleSize(0.05); +gStyle->SetLabelFont(42,"xyz"); +gStyle->SetLabelSize(0.05); +gStyle->SetTitleXOffset(0.8); +gStyle->SetTitleYOffset(1.1); +gROOT->ForceStyle(); + +TFile *th = new TFile("output/Occupancy.root","RECREATE"); +th->cd(); + +// Final plots +TCanvas *cEB = new TCanvas ("EB occupancy","EB occupancy"); +cEB->cd(); +cEB->SetGridx(); +cEB->SetGridy(); +h_OccupancyEB->Write(); +th->Close(); + + +// Final plots +TCanvas *cEEp = new TCanvas ("EE+ occupancy","EE+ occupancy"); +cEEp->cd(); +cEEp->SetGridx(); +cEEp->SetGridy(); +OccupancyEEP_vs_Eta->SetMarkerStyle(20); +OccupancyEEP_vs_Eta->SetMarkerColor(kGreen+2); +OccupancyEEP_vs_Eta->GetHistogram()->GetXaxis()-> SetRangeUser(1.5,2.5); +OccupancyEEP_vs_Eta->GetHistogram()->GetYaxis()-> SetTitle("Single xtal Event / fb^{-1}"); +OccupancyEEP_vs_Eta->GetHistogram()->GetXaxis()-> SetTitle("#eta"); +OccupancyEEP_vs_Eta->Draw("ap"); + + +// Final plots +TCanvas *cEEm = new TCanvas ("EE- occupancy","EE- occupancy"); +cEEm->cd(); +cEEm->SetGridx(); +cEEm->SetGridy(); +OccupancyEEM_vs_Eta->SetMarkerStyle(20); +OccupancyEEM_vs_Eta->SetMarkerColor(kGreen+2); +OccupancyEEM_vs_Eta->GetHistogram()->GetXaxis()-> SetRangeUser(-2.5,-1.5); +OccupancyEEM_vs_Eta->GetHistogram()->GetYaxis()-> SetTitle("Single xtal Event / fb^{-1}"); +OccupancyEEM_vs_Eta->GetHistogram()->GetXaxis()-> SetTitle("#eta"); +OccupancyEEM_vs_Eta->Draw("ap"); + + +TCanvas* cAll = new TCanvas("cAll", "history plot vs date",1); +cAll ->cd(); +cAll ->SetGridx(); +cAll ->SetGridy(); +OccupancyAll->SetMarkerStyle(20); +OccupancyAll->SetMarkerColor(kRed+2); +OccupancyAll->GetHistogram()->GetXaxis()-> SetRangeUser(-2.55,2.55); +OccupancyAll->GetHistogram()->GetYaxis()-> SetTitle("Number of Electrons / Crystal / fb^{-1}"); +OccupancyAll->GetHistogram()->GetXaxis()-> SetTitle("#eta_{seed}"); +OccupancyAll->Draw("ap"); +OccupancyAll2->SetMarkerStyle(20); +OccupancyAll2->SetMarkerColor(kGreen+2); +OccupancyAll2->Draw("psame"); +TLegend * leg = new TLegend(0.5,0.7,0.6,0.87); +leg->SetFillColor(0); +leg->AddEntry(OccupancyAll,"Preselected Events", "LP"); +leg->AddEntry(OccupancyAll2,"Events Used For Calibration", "LP"); +leg->Draw("same"); + + +char latexBuffer[250]; + +sprintf(latexBuffer,"CMS 2012 Preliminary"); +TLatex* latex = new TLatex(0.18,0.92,latexBuffer); +latex -> SetNDC(); +latex -> SetTextFont(62); +latex -> SetTextSize(0.035); +latex -> Draw("same"); + +sprintf(latexBuffer,"#sqrt{s} = 8 TeV L = 11.35 fb^{-1}"); +TLatex* latex2 = new TLatex(0.6,0.92,latexBuffer); +latex2 -> SetNDC(); +latex2 -> SetTextFont(42); +latex2 -> SetTextSize(0.035); +latex2 -> Draw("same"); + +cAll -> Print(("EleOccupancy_W_"+category+".C").c_str(),"cxx"); + +return 0; +} + + + +void SetWHLTPathNames(std::vector > > & WHLTPathNames){ + + std::pair WRunRanges1(190456,190738); + std::pair > WHLTPathName1("HLT_Ele27_WP80_v8",WRunRanges1); + std::pair WRunRanges2(190782,191411); + std::pair > WHLTPathName2("HLT_Ele27_WP80_v9",WRunRanges2); + std::pair WRunRanges3(191691,196531); + std::pair > WHLTPathName3("HLT_Ele27_WP80_v10",WRunRanges3); + std::pair WRunRanges4(198022,209151); + std::pair > WHLTPathName4("HLT_Ele27_WP80_v11",WRunRanges4); + + WHLTPathNames.push_back(WHLTPathName1); + WHLTPathNames.push_back(WHLTPathName2); + WHLTPathNames.push_back(WHLTPathName3); + WHLTPathNames.push_back(WHLTPathName4); +} + diff --git a/EOverPCalibration/bin/PlotICMapsRatio.cpp b/EOverPCalibration/bin/PlotICMapsRatio.cpp new file mode 100644 index 00000000000..53ddbca748f --- /dev/null +++ b/EOverPCalibration/bin/PlotICMapsRatio.cpp @@ -0,0 +1,269 @@ +//Plot map ratio between two IC sets (used in miscalib studies) + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TGraph.h" + +int main(int argc, char **argv) +{ + + std::ifstream io1, io2, rms1, rms2; + + // std::ifstream io3, io4, io6; + io1.open ("output_runD_10ITER_SISCALIB_ETABIN2/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + io2.open ("output_runD_10ITER_NOSCALIB/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + + // io3.open ("output_runD_10ITER_SISCALIB_ETABIN3/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + // io4.open ("output_runD_10ITER_SISCALIB_ETABIN4/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + // io6.open ("output_runD_10ITER_SISCALIB_ETABIN6/IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB_SISCALIB_relative.txt"); + // rms1.open ("output_runD_10ITER_SISCALIB_ETALINEAR/RMSFile.txt"); + // rms2.open ("output_runD_10ITER_NOSCALIB/RMSFile.txt"); + + float status, IC, err; + float status2, IC2, err2; + + // float IC3,IC4,IC6; + float etaCount = 0., etaCount2 = 0.; + + int eta, phi, eta2, phi2; + + TH2F *mapRatio = new TH2F ("map", "map", 360, 0.5, 360.5, 171, -85, +85); + TH1F *histo = new TH1F ("histo", "histo", 100, 0.995, 1.005); + // TH1F *histoSpreadRatio = new TH1F ("histoSpreadRatio", "histoSpreadRatio", 100, 0.9, 1.1); + TH1F *histoMeanEta = new TH1F ("histoMeanEta", "histoMeanEta", 100, 0.995, 1.005); + TH1F *histoMeanPhi = new TH1F ("histoMeanPhi", "histoMeanPhi", 100, 0.995, 1.005); + + TH2F *ICmap1 = new TH2F ("map1", "map1", 360, 0.5, 360.5, 171, -85, +85); + TH2F *ICmap2 = new TH2F ("map2", "map2", 360, 0.5, 360.5, 171, -85, +85); + TH1F *hIC1 = new TH1F ("hIC1", "hIC1", 100, 0.7, 1.3); + TH1F *hIC2 = new TH1F ("hIC2", "hIC2", 100, 0.7, 1.3); + + // TH1F *hprova = new TH1F ("g_RMS", "g_RMS", 91,0,91); + TGraph *g_RMS = new TGraph(); + + // TGraph *g_RMS3 = new TGraph(); + // TGraph *g_RMS4 = new TGraph(); + // TGraph *g_RMS6 = new TGraph(); + + TH1F *histoEtaRing[86]; + char histoName[100]; + char funcName[100]; + + /* TH1F *histoEtaRing4[86]; + char histoName4[100]; + TH1F *histoEtaRing3[86]; + char histoName3[100]; + TH1F *histoEtaRing6[86]; + char histoName6[100]; + */ + float map[171][360]; + float map2[171][360]; + + for (int e=0; e<86; e++) { + sprintf(histoName,"h_ratio_%d",e); + histoEtaRing[e] = new TH1F(histoName,"",50,0.9,1.1); + + /* sprintf(histoName4,"h_ratio4_%d",e); + histoEtaRing4[e] = new TH1F(histoName4,"",50,0.99,1.01); + sprintf(histoName3,"h_ratio3_%d",e); + histoEtaRing3[e] = new TH1F(histoName3,"",50,0.99,1.01); + sprintf(histoName6,"h_ratio6_%d",e); + histoEtaRing6[e] = new TH1F(histoName6,"",50,0.99,1.01); + */ } + + for (int e=0; e<171; e++) { + for (int p=0; p<360; p++) { + map[e][p]=0.; + map2[e][p]=0.; + } + } + + + // mapRatio->SetDrawOption ("colz"); + + eta=0; + + + while (!io1.eof()) + { + io1>>eta>>phi>>status>>IC>>err; + io2>>eta2>>phi2>>status2>>IC2>>err2; + + // io3>>eta>>phi>>status>>IC3>>err; + // io4>>eta>>phi>>status>>IC4>>err; + // io6>>eta>>phi>>status>>IC6>>err; + map[eta+85][phi-1]=IC; + map2[eta2+85][phi2-1]=IC2; + + if ((status==0) && (IC!=-1) && (status2==0) && (IC2!=-1)) { + histoEtaRing[int(fabs(eta))]->Fill(IC/IC2); + + // histoEtaRing3[int(fabs(eta))]->Fill(IC3/IC2); + // histoEtaRing4[int(fabs(eta))]->Fill(IC4/IC2); + // histoEtaRing6[int(fabs(eta))]->Fill(IC6/IC2); + } + + // if (fabs(eta)==46) std::cout<Fill(etaCount/etaCount2); + + etaCount=0.; + etaCount2=0.; + + } + + + if ((status==0) && (IC!=-1) && (status2==0) && (IC2!=-1) && (IC<1.5)) { + if ((eta==eta2) && (phi==phi2)) { + mapRatio->SetBinContent (phi,eta+85,IC/IC2); + histo->Fill(IC/IC2); + // std::cout<SetBinContent (phi,eta+85,IC); + ICmap2->SetBinContent (phi,eta+85,IC2); + // std::cout<Fill(IC); + hIC2->Fill(IC2); + + etaCount+=IC; + etaCount2+=IC2; + // std::cout<> e1 >> r1; + rms2 >> e2 >> r2; + histoSpreadRatio->Fill(r1/r2); + } + */ + float phiCount=0., phiCount2=0.; + for (int p=0; p<360; p++) { + for (int e=0; e<171; e++) { + phiCount+=map[e][p]; + phiCount2+=map2[e][p]; + } + histoMeanPhi->Fill(phiCount/phiCount2); + phiCount=0.; + phiCount2=0.; + } + + TFile f1 ("confronti_etabin2.root", "RECREATE"); + f1.cd(); + + for (int e=1; e<86; e++) { + + sprintf(funcName,"f_%d",e); + TF1* fgaus = new TF1(funcName,"gaus",0.99,1.01); + fgaus -> SetParameter(1,histoEtaRing[e]->GetMean()); + fgaus -> SetParameter(2,histoEtaRing[e]->GetRMS()); + // histoEtaRing[e] -> Fit(funcName,"QS+","",1-histoEtaRing[e]->GetRMS(),1+histoEtaRing[e]->GetRMS()); + g_RMS->SetPoint (e-1, float(e), histoEtaRing[e]->GetRMS()); + + // g_RMS3->SetPoint (e-1, float(e), histoEtaRing3[e]->GetRMS()); + // g_RMS4->SetPoint (e-1, float(e), histoEtaRing4[e]->GetRMS()); + // g_RMS6->SetPoint (e-1, float(e), histoEtaRing6[e]->GetRMS()); + // g_RMS->SetPointError (e-1, 0, 0); + if (e==20 || e==40 || e==60 || e==75 || e==85 || e==45 || e==46 || e==47) { + histoEtaRing[e]->Draw(); + // fgaus->Draw("same"); + histoEtaRing[e]->Write(); + } + } + + TCanvas *c1 = new TCanvas("c1"); + c1->cd(); + g_RMS -> GetXaxis() -> SetTitle("|i#eta|"); + g_RMS -> GetYaxis() -> SetTitle("RMS"); + g_RMS -> SetMinimum(0.00000); + // g_RMS -> SetMaximum(0.0025); + g_RMS -> SetMarkerStyle(20); + g_RMS -> SetMarkerSize(1.0); + g_RMS -> SetMarkerColor(kBlue+1); + c1->SetGrid(); + g_RMS -> Draw("APL"); + + g_RMS -> GetXaxis() -> SetRangeUser (0,86); + + /* g_RMS3 -> SetMarkerStyle(20); + g_RMS3 -> SetMarkerSize(1.0); + g_RMS3 -> SetMarkerColor(51+1); + g_RMS4 -> SetMarkerStyle(20); + g_RMS4 -> SetMarkerSize(1.0); + g_RMS4 -> SetMarkerColor(kRed+1); + g_RMS6 -> SetMarkerStyle(20); + g_RMS6 -> SetMarkerSize(1.0); + g_RMS6 -> SetMarkerColor(kOrange+1); + + g_RMS3 -> Draw("PLsame"); + g_RMS4 -> Draw("PLsame"); + g_RMS6 -> Draw("PLsame"); + + TLegend* leg = new TLegend(0.15,0.72,0.43,0.89); + leg -> SetFillColor(0); + leg -> SetTextFont(42); + leg -> SetTextSize(0.05); + leg -> AddEntry(g_RMS,"Miscalib. 2%","P"); + leg -> AddEntry(g_RMS3,"Miscalib. 3%","P"); + leg -> AddEntry(g_RMS4,"Miscalib. 4%","P"); + leg -> AddEntry(g_RMS6,"Miscalib. 6%","P"); + leg -> Draw("same"); + */ + c1->Print("g_RMS.png","png"); + + mapRatio -> GetXaxis() -> SetTitle("i#phi"); + mapRatio -> GetYaxis() -> SetRangeUser(-85,85); + + mapRatio -> GetYaxis() -> SetTitle("i#eta"); + + histo -> GetXaxis() -> SetTitle("IC1/IC2"); + histo -> GetYaxis() -> SetTitle("N"); + + histo->SetStats(1); + + mapRatio->GetZaxis()->SetRangeUser(0.99, 1.01); + // mapRatio->Draw("COLZ"); + // mapRatio->SaveAs("map.root","root"); + mapRatio->Write(); + // histo->Draw(); + histo->Write(); + histoMeanEta->Write(); + histoMeanPhi->Write(); + hIC1->Write(); + hIC2->Write(); + ICmap1->Write(); + ICmap2->Write(); + // histoSpreadRatio->Write(); + g_RMS->Write("g_RMS"); + f1.Close(); + + return 0; +} diff --git a/EOverPCalibration/bin/PlotICMapsRatioEE.cpp b/EOverPCalibration/bin/PlotICMapsRatioEE.cpp new file mode 100644 index 00000000000..61e7f9b52c1 --- /dev/null +++ b/EOverPCalibration/bin/PlotICMapsRatioEE.cpp @@ -0,0 +1,235 @@ +//Plot map ratio between two IC sets (used in miscalib studies) + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TGraph.h" + +#include "../interface/TEndcapRings.h" + +int main(int argc, char **argv) +{ + + std::ifstream io1, io2, rms1, rms2; + + io1.open ("output_EE_runD_SISCALIB_GAUSS_NOETA_STRAWEAK/IC_Run2012ABC_22JanuaryRereco_WZ_R9_EE_relative.txt"); + io2.open ("output_EE_runD_NOSCALIB/IC_Run2012ABC_22JanuaryRereco_WZ_R9_EE_relative.txt"); + + TEndcapRings *eRings = new TEndcapRings(); + + + float status, IC, err; + float status2, IC2, err2; + + int x, y, x2, y2; + + TH2F *mapRatioEEp = new TH2F ("mapEEp", "mapEEp", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *mapRatioEEm = new TH2F ("mapEEm", "mapEEm", 100, 0.5, 100.5, 100, 0.5, 100.5); + + TH1F *histoEEp = new TH1F ("histoEEp", "histoEEp", 100, 0.97, 1.03); + TH1F *histoEEm = new TH1F ("histoEEm", "histoEEm", 100, 0.97, 1.03); + + TH2F *ICmap1EEp = new TH2F ("map1EEp", "map1EEp", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *ICmap2EEp = new TH2F ("map2EEp", "map2EEp", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *ICmap1EEm = new TH2F ("map1EEm", "map1EEm", 100, 0.5, 100.5, 100, 0.5, 100.5); + TH2F *ICmap2EEm = new TH2F ("map2EEm", "map2EEm", 100, 0.5, 100.5, 100, 0.5, 100.5); + + TH1F *hIC1EEp = new TH1F ("hIC1EEp", "hIC1EEp", 100, 0.7, 1.3); + TH1F *hIC2EEp = new TH1F ("hIC2EEp", "hIC2EEp", 100, 0.7, 1.3); + TH1F *hIC1EEm = new TH1F ("hIC1EEm", "hIC1EEm", 100, 0.7, 1.3); + TH1F *hIC2EEm = new TH1F ("hIC2EEm", "hIC2EEm", 100, 0.7, 1.3); + + TGraph *g_RMSEEp = new TGraph(); + TGraph *g_RMSEEm = new TGraph(); + + + TH1F *histoEtaRingEEp[40]; + char histoNameEEp[100]; + char funcNameEEp[100]; + TH1F *histoEtaRingEEm[40]; + char histoNameEEm[100]; + char funcNameEEm[100]; + + for (int e=0; e<40; e++) { + sprintf(histoNameEEp,"h_ratio_EEp_%d",e); + histoEtaRingEEp[e] = new TH1F(histoNameEEp,"",150,0.0,2.0); + sprintf(histoNameEEm,"h_ratio_EEm_%d",e); + histoEtaRingEEm[e] = new TH1F(histoNameEEm,"",150,0.0,2.0); + } + + + + + x=0; + + while (!io1.eof()) + { + io1>>x>>y>>status>>IC>>err; + io2>>x2>>y2>>status2>>IC2>>err2; + + if ( (status==-1) && (IC!=-1) && (status2==-1) && (IC2!=-1)) { + if ((x==x2) && (y==y2)) { + + histoEtaRingEEm[int(eRings->GetEndcapRing(x,y,0))]->Fill(IC/IC2); + // if (x==34 && y==47) std::cout<<"anello: "<GetEndcapRing(x,y,status)<GetEndcapRing(x,y,0)==16) + std::cout<SetBinContent (x-1,y-1,IC/IC2); + histoEEm->Fill(IC/IC2); + // std::cout<SetBinContent (x-1,y-1,IC); + ICmap2EEm->SetBinContent (x2-1,y2-1,IC2); + // std::cout<Fill(IC); + hIC2EEm->Fill(IC2); + + } + else + std::cout<<"Problem: incoherent x or y "<GetEndcapRing(x,y,status))]->Fill(IC/IC2); + + mapRatioEEp->SetBinContent (x-1,y-1,IC/IC2); + histoEEp->Fill(IC/IC2); + // std::cout<SetBinContent (x-1,y-1,IC); + ICmap2EEp->SetBinContent (x2-1,y2-1,IC2); + // std::cout<Fill(IC); + hIC2EEp->Fill(IC2); + + } + else + std::cout<<"Problem: incoherent x or y "< SetParameter(1,histoEtaRingEEp[e]->GetMean()); + fgausEEp -> SetParameter(2,histoEtaRingEEp[e]->GetRMS()); + // histoEtaRingEEp[e] -> Fit(funcNameEEp,"QS+","",1-histoEtaRingEEp[e]->GetRMS(),1+histoEtaRingEEp[e]->GetRMS()); + // g_RMSEEp->SetPoint (e, float(e), fgausEEp->GetParameter(2)); + + sprintf(funcNameEEm,"f_EEm_%d",e); + TF1* fgausEEm = new TF1(funcNameEEm,"gaus",0.1,1.9); + fgausEEm -> SetParameter(1,histoEtaRingEEm[e]->GetMean()); + fgausEEm -> SetParameter(2,histoEtaRingEEm[e]->GetRMS()); + // histoEtaRingEEm[e] -> Fit(funcNameEEm,"QS+","",1-histoEtaRingEEm[e]->GetRMS(),1+histoEtaRingEEm[e]->GetRMS()); + // g_RMSEEm->SetPoint (e, float(e), fgausEEm->GetParameter(2)); + + g_RMSEEp->SetPoint (e, float(e), histoEtaRingEEp[e]->GetRMS()); + g_RMSEEm->SetPoint (e, float(e), histoEtaRingEEm[e]->GetRMS()); + + if (e==1 || e==2 || e==4 || e==19 || e==26 || e==30 || e==31 || e==32 || e==33 ) { + histoEtaRingEEp[e]->Draw(); + // fgausEEp->Draw("same"); + + histoEtaRingEEm[e]->Draw(); + // fgausEEm->Draw("same"); + + histoEtaRingEEp[e]->Write(); + histoEtaRingEEm[e]->Write(); + } + } + + TCanvas *c1 = new TCanvas("c1"); + c1->cd(); + g_RMSEEp -> GetXaxis() -> SetTitle("i|#eta|"); + g_RMSEEp -> GetYaxis() -> SetTitle("RMS"); + g_RMSEEp -> SetMinimum(0.00000); + // g_RMSEEp -> SetMaximum(0.015); + // g_RMSEEm -> SetMaximum(0.015); + g_RMSEEp -> SetMarkerStyle(20); + g_RMSEEp -> SetMarkerSize(1.0); + g_RMSEEp -> SetMarkerColor(kBlue+1); + c1->SetGrid(); + g_RMSEEp -> Draw("AP"); + + g_RMSEEp -> GetXaxis() -> SetRangeUser (0,32.5); + + c1->Print("g_RMS_EE+.png","png"); + + + TCanvas *c2 = new TCanvas("c2"); + c2->cd(); + g_RMSEEm -> GetXaxis() -> SetTitle("i|#eta|"); + g_RMSEEm -> GetYaxis() -> SetTitle("RMS"); + g_RMSEEm -> SetMinimum(0.00000); + // g_RMS -> SetMaximum(0.0025); + g_RMSEEm -> SetMarkerStyle(20); + g_RMSEEm -> SetMarkerSize(1.0); + g_RMSEEm -> SetMarkerColor(kBlue+1); + c2->SetGrid(); + g_RMSEEm -> Draw("AP"); + g_RMSEEm -> GetXaxis() -> SetRangeUser (0,33.5); + c2->Print("g_RMS_EE-.png","png"); + + mapRatioEEp -> GetXaxis() -> SetTitle("ix"); + mapRatioEEp -> GetYaxis() -> SetRangeUser(-100.5,100.5); + mapRatioEEp -> GetYaxis() -> SetTitle("iy"); + histoEEp -> GetXaxis() -> SetTitle("IC1/IC2"); + histoEEp -> GetYaxis() -> SetTitle("N"); + histoEEp->SetStats(1); + mapRatioEEp->GetZaxis()->SetRangeUser(0.98, 1.02); + + mapRatioEEm -> GetXaxis() -> SetTitle("ix"); + mapRatioEEm -> GetYaxis() -> SetRangeUser(-100.5,100.5); + mapRatioEEm -> GetYaxis() -> SetTitle("iy"); + histoEEm -> GetXaxis() -> SetTitle("IC1/IC2"); + histoEEm -> GetYaxis() -> SetTitle("N"); + histoEEm->SetStats(1); + mapRatioEEm->GetZaxis()->SetRangeUser(0.98, 1.02); + + mapRatioEEp->Write(); + histoEEp->Write(); + hIC1EEp->Write(); + hIC2EEp->Write(); + ICmap1EEp->Write(); + ICmap2EEp->Write(); + g_RMSEEp->Write("g_RMSEEp"); + g_RMSEEm->Write("g_RMSEEm"); + mapRatioEEm->Write(); + histoEEm->Write(); + hIC1EEm->Write(); + hIC2EEm->Write(); + ICmap1EEm->Write(); + ICmap2EEm->Write(); + + f1.Close(); + + return 0; +} diff --git a/EOverPCalibration/bin/RateHLTvsEta.cpp b/EOverPCalibration/bin/RateHLTvsEta.cpp new file mode 100644 index 00000000000..92e78e07ef9 --- /dev/null +++ b/EOverPCalibration/bin/RateHLTvsEta.cpp @@ -0,0 +1,231 @@ +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TCanvas.h" +#include "TLegend.h" +#include "TPaveStats.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TLatex.h" +#include "TTree.h" +#include "TChain.h" +#include "TGraphAsymmErrors.h" + +#include +#include +#include "../../NtuplePackage/interface/treeReader.h" + + +int main (int argc, char ** argv){ + + // double xtalWidth=0.01745329; + // double luminosity=11.53; + // double etaringEE=0.0325; + + + // Acquisition of input file + TChain* treeDATA_HLT = new TChain("simpleNtupleEoverP/SimpleNtupleEoverP"); + treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012A-22Jan2013-v1_HLT.root"); + treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012B-22Jan2013-v1_HLT.root"); + // treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012C-22Jan2013-v1_HLT.root"); + treeDATA_HLT->Add("/gwteray/users/gerosa/ECALNTUPLES/22Jan2013_HLT_Rate_Study/SingleElectron_Run2012D-22Jan2013-v1_HLT.root"); + + treeReader *fReader_HLT = new treeReader((TTree*)(treeDATA_HLT), false); + + TH1F* Denominator = new TH1F ("Denominator","",100,-2.5,2.5); + TH1F* HLTEle27_RateVsEta = new TH1F ("HLTEle27_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_PFMET_RateVsEta = new TH1F ("HLTEle27_PFMET_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_RateVsEta = new TH1F ("HLTEle27_Offline_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_R9_RateVsEta = new TH1F ("HLTEle27_R9_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_fbrem_RateVsEta = new TH1F ("HLTEle27_fbrem_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_Pt_RateVsEta = new TH1F ("HLTEle27_Pt_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_Offline_PFMET_RateVsEta = new TH1F ("HLTEle27_Offline_PFMET_RateVsEta","",100,-2.5,2.5); + TH1F* HLTEle27_PFMET_VsEle27Offline = new TH1F ("HLTEle27_PFMET_VsEle27Offline","",100,-2.5,2.5); + + std::cout<<" DATA Entries = "<GetEntries()<GetEntries(); ++entry) { + + if( entry%100000 == 0 ) std::cout << "reading saved entry " << entry << "\r" << std::flush; + treeDATA_HLT->GetEntry(entry); + + Denominator->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isHLTEle27")[0] == 1 ) HLTEle27_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 ) HLTEle27_PFMET_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0) + HLTEle27_Offline_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fReader_HLT->getFloat("ele1_r9")[0] >0.94) + HLTEle27_Offline_R9_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fabs(fReader_HLT->getFloat("ele1_fbrem")[0]) <0.5) + HLTEle27_Offline_fbrem_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTEle27")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fabs(fReader_HLT->getFloat("ele1_pt")[0]) >50) + HLTEle27_Offline_Pt_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if(fReader_HLT->getInt("isGood")[0] == 1 && fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 ) + HLTEle27_Offline_PFMET_RateVsEta->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + if( fReader_HLT->getInt("isHLTELe27PFMET")[0] == 1 && fReader_HLT->getInt("isZ")[0] == 0 && fReader_HLT->getInt("isGood")[0] == 1) + HLTEle27_PFMET_VsEle27Offline->Fill(fReader_HLT->getFloat("ele1_scEta")[0]); + + + + } + + + TGraphAsymmErrors* HLTEle27_Efficiency = new TGraphAsymmErrors(HLTEle27_RateVsEta,Denominator); + TGraphAsymmErrors* HLTEle27_PFMET_Efficiency = new TGraphAsymmErrors(HLTEle27_PFMET_RateVsEta,Denominator); + TGraphAsymmErrors* HLTEle27_Offline_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_R9_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_R9_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_fbrem_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_fbrem_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_Pt_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_Pt_RateVsEta,HLTEle27_RateVsEta); + TGraphAsymmErrors* HLTEle27_Offline_PFMET_Efficiency = new TGraphAsymmErrors(HLTEle27_Offline_PFMET_RateVsEta,HLTEle27_PFMET_RateVsEta); + TGraphAsymmErrors* HLTEle27_PFMET_VsEle27Offline_Efficiency = new TGraphAsymmErrors(HLTEle27_PFMET_VsEle27Offline,HLTEle27_Offline_RateVsEta); + + HLTEle27_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_PFMET_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_R9_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_fbrem_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_Pt_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_Offline_PFMET_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + HLTEle27_PFMET_VsEle27Offline_Efficiency->GetXaxis()->SetRangeUser(-2.4,2.4); + + + HLTEle27_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_PFMET_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_R9_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_fbrem_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_Pt_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_Offline_PFMET_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + HLTEle27_PFMET_VsEle27Offline_Efficiency->GetXaxis()->SetTitle("#eta_{SC}"); + + HLTEle27_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Ele27}}{N^{all}}"); + HLTEle27_PFMET_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Ele27PFMET}}{N^{all}}"); + HLTEle27_Offline_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Offline}}{N^{Ele27}}"); + HLTEle27_Offline_R9_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{R9}}{N^{Ele27}}"); + HLTEle27_Offline_fbrem_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{fbrem}}{N^{Ele27}}"); + HLTEle27_Offline_Pt_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{pT}}{N^{Ele27}}"); + HLTEle27_Offline_PFMET_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Offline}}{N^{Ele27PFMET}}"); + HLTEle27_PFMET_VsEle27Offline_Efficiency->GetYaxis()->SetTitle("#varepsilon = #frac{N^{Off+Ele27PFMET}}{N^{Off+Ele27}}"); + + HLTEle27_Efficiency->SetMarkerStyle(20); + HLTEle27_PFMET_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_R9_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_fbrem_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_Pt_Efficiency->SetMarkerStyle(20); + HLTEle27_Offline_PFMET_Efficiency->SetMarkerStyle(20); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerStyle(20); + + HLTEle27_Efficiency->SetMarkerSize(1.2); + HLTEle27_PFMET_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_R9_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_fbrem_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_Pt_Efficiency->SetMarkerSize(1.2); + HLTEle27_Offline_PFMET_Efficiency->SetMarkerSize(1.2); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerSize(1.2); + + HLTEle27_Efficiency->SetMarkerColor(kBlue); + HLTEle27_PFMET_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_R9_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_fbrem_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_Pt_Efficiency->SetMarkerColor(kBlue); + HLTEle27_Offline_PFMET_Efficiency->SetMarkerColor(kBlue); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetMarkerColor(kBlue); + + HLTEle27_Efficiency->SetLineColor(kBlack); + HLTEle27_PFMET_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_R9_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_fbrem_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_Pt_Efficiency->SetLineColor(kBlack); + HLTEle27_Offline_PFMET_Efficiency->SetLineColor(kBlack); + HLTEle27_PFMET_VsEle27Offline_Efficiency->SetLineColor(kBlack); + + TCanvas* cHLTEle27_Efficiency = new TCanvas("cHLTEle27_Efficiency","",1); + cHLTEle27_Efficiency->cd(); + cHLTEle27_Efficiency->SetGridx(); + cHLTEle27_Efficiency->SetGridy(); + HLTEle27_Efficiency->Draw("ap"); + + TCanvas* cHLTEle27_PFMET_Efficiency = new TCanvas("cHLTEle27_PFMET_Efficiency","",1); + cHLTEle27_PFMET_Efficiency ->cd(); + cHLTEle27_PFMET_Efficiency ->SetGridx(); + cHLTEle27_PFMET_Efficiency ->SetGridy(); + HLTEle27_PFMET_Efficiency->Draw("ap"); + + TCanvas* cHLTEle27_Offline_Efficiency = new TCanvas("cHLTEle27_Offline_Efficiency","",1); + cHLTEle27_Offline_Efficiency ->cd(); + cHLTEle27_Offline_Efficiency ->SetGridx(); + cHLTEle27_Offline_Efficiency ->SetGridy(); + HLTEle27_Offline_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_R9_Efficiency = new TCanvas("cHLTEle27_Offline_R9_Efficiency","",1); + cHLTEle27_Offline_R9_Efficiency ->cd(); + cHLTEle27_Offline_R9_Efficiency ->SetGridx(); + cHLTEle27_Offline_R9_Efficiency ->SetGridy(); + HLTEle27_Offline_R9_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_fbrem_Efficiency = new TCanvas("cHLTEle27_Offline_fbrem_Efficiency","",1); + cHLTEle27_Offline_fbrem_Efficiency ->cd(); + cHLTEle27_Offline_fbrem_Efficiency ->SetGridx(); + cHLTEle27_Offline_fbrem_Efficiency ->SetGridy(); + HLTEle27_Offline_fbrem_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_Pt_Efficiency = new TCanvas("cHLTEle27_Offline_Pt_Efficiency","",1); + cHLTEle27_Offline_Pt_Efficiency ->cd(); + cHLTEle27_Offline_Pt_Efficiency ->SetGridx(); + cHLTEle27_Offline_Pt_Efficiency ->SetGridy(); + HLTEle27_Offline_Pt_Efficiency ->Draw("ap"); + + TCanvas* cHLTEle27_Offline_PFMET_Efficiency = new TCanvas("cHLTEle27_Offline_PFMET_Efficiency","",1); + cHLTEle27_Offline_PFMET_Efficiency ->cd(); + cHLTEle27_Offline_PFMET_Efficiency ->SetGridx(); + cHLTEle27_Offline_PFMET_Efficiency ->SetGridy(); + HLTEle27_Offline_PFMET_Efficiency ->Draw("ap"); + + + TCanvas* cHLTEle27_PFMET_VsEle27Offline_Efficiency = new TCanvas("HLTEle27_PFMET_VsEle27Offline_Efficiency","",1); + cHLTEle27_PFMET_VsEle27Offline_Efficiency ->cd(); + cHLTEle27_PFMET_VsEle27Offline_Efficiency ->SetGridx(); + cHLTEle27_PFMET_VsEle27Offline_Efficiency ->SetGridy(); + HLTEle27_PFMET_VsEle27Offline_Efficiency ->Draw("ap"); + + + TFile *output = new TFile("output/outputTriggerRate.root","RECREATE"); + output->cd(); + cHLTEle27_Efficiency->Write(); + cHLTEle27_PFMET_Efficiency->Write(); + cHLTEle27_Offline_Efficiency->Write(); + cHLTEle27_Offline_R9_Efficiency->Write(); + cHLTEle27_Offline_fbrem_Efficiency->Write(); + cHLTEle27_Offline_Pt_Efficiency->Write(); + cHLTEle27_Offline_PFMET_Efficiency->Write(); + cHLTEle27_PFMET_VsEle27Offline_Efficiency->Write(); + + Denominator->Write(); + HLTEle27_RateVsEta->Write(); + HLTEle27_PFMET_RateVsEta->Write(); + HLTEle27_Offline_RateVsEta->Write(); + HLTEle27_Offline_R9_RateVsEta->Write(); + HLTEle27_Offline_fbrem_RateVsEta->Write(); + HLTEle27_Offline_Pt_RateVsEta->Write(); + HLTEle27_Offline_PFMET_RateVsEta->Write(); + HLTEle27_PFMET_VsEle27Offline->Write(); + output->Close(); + + return 0 ; + +} diff --git a/EOverPCalibration/bin/XtalAlphaEB.cpp b/EOverPCalibration/bin/XtalAlphaEB.cpp new file mode 100644 index 00000000000..a8a59919280 --- /dev/null +++ b/EOverPCalibration/bin/XtalAlphaEB.cpp @@ -0,0 +1,219 @@ +#include "XtalAlphaEB.h" +#include +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" +#include "CalibrationUtils.h" + + + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + + //std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + + std::string inputFileDeadXtal = "NULL"; + try + { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch( char const* exceptionString ) + { + std::cerr << " exception = " << exceptionString << std::endl; + } + + std::string jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName"); + std::map > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + float R9Min = gConfigParser -> readFloatOption("Input::R9Min"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + std::string inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); + + std::string typeEB = gConfigParser -> readStringOption("Input::typeEB"); + std::string typeEE = gConfigParser -> readStringOption("Input::typeEE"); + int nRegionsEB = GetNRegionsEB(typeEB); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// open ntupla of data or MC + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + /// open calibration momentum graph + TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EB; + + for(int i = 0; i < nRegionsEB; ++i) + { + TString Name = Form("g_EoC_EB_%d",i); + g_EoC_EB.push_back( (TGraphErrors*)(f4->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_WZ_noEP_miscalib_EB",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_WZ_noEP_EB",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_miscalib_EB",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_W_noEP_miscalib_EB",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_EB",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false ) name_tmp =Form ("%s_W_noEP_EB",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + if(isSaveEPDistribution == true) + { + XtalAlphaEB analyzer(albero, g_EoC_EB, typeEB, outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer.saveHistos(f1); + } + else + { + XtalAlphaEB analyzer(albero, g_EoC_EB, typeEB); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_miscalib_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_miscalib_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_WZ_noEP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_miscalib_EB_odd.root", outputFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false) + { name = Form ("%s_WZ_noEP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_EB_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_miscalib_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_W_EP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_EP_miscalib_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_W_noEP_miscalib_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_miscalib_EB_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_EB_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_EP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_EP_EB_odd.root", outputFile.c_str()); + } + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false) + { name = Form ("%s_W_noEP_EB_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_EB_odd.root", outputFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + /// Run on odd + XtalAlphaEB analyzer_even(albero, g_EoC_EB, typeEB); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer_even.saveHistos(f1); + + /// Run on even + XtalAlphaEB analyzer_odd(albero, g_EoC_EB, typeEB); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,jsonMap); + analyzer_odd.saveHistos(f2);} + + + delete albero; + return 0; +} diff --git a/EOverPCalibration/bin/XtalAlphaEE.cpp b/EOverPCalibration/bin/XtalAlphaEE.cpp new file mode 100644 index 00000000000..3a829684ff5 --- /dev/null +++ b/EOverPCalibration/bin/XtalAlphaEE.cpp @@ -0,0 +1,250 @@ +#include "XtalAlphaEE.h" +#include +#include +#include + +#include "ConfigParser.h" +#include "ntpleUtils.h" +#include "CalibrationUtils.h" + + + +int main (int argc, char ** argv) +{ + + ///Check if all nedeed arguments to parse are there + if(argc != 2) + { + std::cerr << ">>>>> FastCalibrator::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + /// Parse the config file + parseConfigFile (argv[1]) ; + + //std::string inputFile = gConfigParser -> readStringOption("Input::inputFile"); + std::string inputList = gConfigParser -> readStringOption("Input::inputList"); + std::string inputTree = gConfigParser -> readStringOption("Input::inputTree"); + + std::string inputFileDeadXtal = "NULL"; + try + { + inputFileDeadXtal = gConfigParser -> readStringOption("Input::inputFileDeadXtal"); + } + catch( char const* exceptionString ) + { + std::cerr << " exception = " << exceptionString << std::endl; + } + + std::string jsonFileName = gConfigParser -> readStringOption("Input::jsonFileName"); + std::map > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + + bool isMiscalib = gConfigParser -> readBoolOption("Input::isMiscalib"); + bool isSaveEPDistribution = gConfigParser -> readBoolOption("Input::isSaveEPDistribution"); + bool isEPselection = gConfigParser -> readBoolOption("Input::isEPselection"); + bool isR9selection = gConfigParser -> readBoolOption("Input::isR9selection"); + float R9Min = gConfigParser -> readFloatOption("Input::R9Min"); + bool isMCTruth = gConfigParser -> readBoolOption("Input::isMCTruth"); + bool isfbrem = gConfigParser -> readBoolOption("Input::isfbrem"); + std::string inputMomentumScale = gConfigParser -> readStringOption("Input::inputMomentumScale"); + + std::string typeEB = gConfigParser -> readStringOption("Input::typeEB"); + std::string typeEE = gConfigParser -> readStringOption("Input::typeEE"); + + int nRegionsEE = GetNRegionsEE(typeEE); + + std::string outputFile = gConfigParser -> readStringOption("Output::outputFile"); + + int numberOfEvents = gConfigParser -> readIntOption("Options::numberOfEvents"); + int useZ = gConfigParser -> readIntOption("Options::useZ"); + int useW = gConfigParser -> readIntOption("Options::useW"); + int splitStat = gConfigParser -> readIntOption("Options::splitStat"); + int nLoops = gConfigParser -> readIntOption("Options::nLoops"); + + /// Acquistion input ntuples + TChain * albero = new TChain (inputTree.c_str()); + FillChain(*albero,inputList); + + /// open calibration momentum graph + TFile* f4 = new TFile((inputMomentumScale+"_"+typeEB+"_"+typeEE+".root").c_str()); + std::vector g_EoC_EE; + + for(int i = 0; i < nRegionsEE; ++i){ + + TString Name = Form("g_EoC_EE_%d",i); + g_EoC_EE.push_back( (TGraphErrors*)(f4->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = albero->GetEntries(); + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString outputTxtFile ; + TString name_tmp; + if(isMiscalib == true && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_WZ_fbrem_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_WZ_noEP_miscalib_EE",outputFile.c_str()); + + if(isMiscalib == false && useZ == 1 && isR9selection ==true ) name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==true ) name_tmp = Form ("%s_WZ_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isfbrem ==true ) name_tmp = Form ("%s_WZ_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_WZ_noEP_EE",outputFile.c_str()); + + + if(isMiscalib == true && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_miscalib_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isfbrem == true ) name_tmp = Form ("%s_W_fbrem_EE",outputFile.c_str()); + if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_W_noEP_miscalib_EE",outputFile.c_str()); + + + if(isMiscalib == false && useZ == 0 && isR9selection ==true ) name_tmp = Form ("%s_W_R9_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==true ) name_tmp = Form ("%s_W_EP_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isfbrem ==true ) name_tmp = Form ("%s_W_fbrem_EE",outputFile.c_str()); + if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isfbrem==false ) name_tmp =Form ("%s_W_noEP_EE",outputFile.c_str()); + + name = Form("%s.root",name_tmp.Data()); + TFile *f1 = new TFile(name,"RECREATE"); + + TString outEPDistribution = "Weight_"+name; + + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + if(isSaveEPDistribution == true){ + + XtalAlphaEE analyzer(albero, g_EoC_EE, typeEE, outEPDistribution); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer.saveHistos(f1); + } + else + { + XtalAlphaEE analyzer(albero, g_EoC_EE, typeEE); + analyzer.bookHistos(nLoops); + analyzer.AcquireDeadXtal(DeadXtal); + analyzer.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer.saveHistos(f1); + } + + } + + /// run in even-odd mode: half statistics + else if ( splitStat == 1 ) { + + /// Prepare the outputs + TString name; + TString name2; + + if(isMiscalib == true && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_miscalib_EE.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isfbrem==true) + { name = Form ("%s_WZ_fbrem_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_fbrem_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_WZ_noEP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_miscalib_EE_odd.root", outputFile.c_str()); + } + + + + if(isMiscalib == false && useZ == 1 && isR9selection==true) + { name = Form ("%s_WZ_R9_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_R9_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isEPselection==true) + { name = Form ("%s_WZ_EP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_EP_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 1 && isfbrem==true) + { name = Form ("%s_WZ_fbrem_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_fbrem_EE_odd.root", outputFile.c_str()); + } + if(isMiscalib == false && useZ == 1 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_WZ_noEP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_WZ_noEP_EE_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == true && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isEPselection==true) + { name = Form ("%s_W_EP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_EP_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isfbrem==true) + { name = Form ("%s_W_fbrem_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_fbrem_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == true && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_W_noEP_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_miscalib_EE_odd.root", outputFile.c_str()); + } + + + if(isMiscalib == false && useZ == 0 && isR9selection==true) + { name = Form ("%s_W_R9_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_R9_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isEPselection==true) + { name = Form ("%s_W_EP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_EP_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isfbrem==true) + { name = Form ("%s_W_fbrem_miscalib_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_fbrem_miscalib_EE_odd.root", outputFile.c_str()); + } + + if(isMiscalib == false && useZ == 0 && isR9selection==false && isEPselection==false && isfbrem==false) + { name = Form ("%s_W_noEP_EE_even.root",outputFile.c_str()); + name2 = Form ("%s_W_noEP_EE_odd.root", outputFile.c_str()); + } + + TFile *f1 = new TFile(name,"RECREATE"); + TFile *f2 = new TFile(name2,"RECREATE"); + TString DeadXtal = Form("%s",inputFileDeadXtal.c_str()); + + + /// Run on odd + XtalAlphaEE analyzer_even(albero, g_EoC_EE, typeEE); + analyzer_even.bookHistos(nLoops); + analyzer_even.AcquireDeadXtal(DeadXtal); + analyzer_even.Loop(numberOfEvents, useZ, useW, splitStat, nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer_even.saveHistos(f1); + + /// Run on even + XtalAlphaEE analyzer_odd(albero, g_EoC_EE, typeEE); + analyzer_odd.bookHistos(nLoops); + analyzer_odd.AcquireDeadXtal(DeadXtal); + analyzer_odd.Loop(numberOfEvents, useZ, useW, splitStat*(-1), nLoops,isMiscalib,isSaveEPDistribution,isEPselection,isR9selection,R9Min,isMCTruth,isfbrem,jsonMap); + analyzer_odd.saveHistos(f2); + + } + + delete albero; + return 0; +} diff --git a/EOverPCalibration/bin/Zlineshape.cpp b/EOverPCalibration/bin/Zlineshape.cpp new file mode 100644 index 00000000000..5e8d16b692d --- /dev/null +++ b/EOverPCalibration/bin/Zlineshape.cpp @@ -0,0 +1,945 @@ +#include "Zutils.h" +#include "setTDRStyle.h" +#include "ConfigParser.h" +#include "ntpleUtils.h" + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TH2.h" +#include "TChain.h" +#include "TCanvas.h" +#include "TGraphAsymmErrors.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TTree.h" +#include "TVirtualFitter.h" +#include "TMath.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define a 0.5346 +#define b 0.2166 +#define FWHMZ 2.4952 + + +int main(int argc, char **argv){ + + //set the style + setTDRStyle(); + gROOT->Reset(); + gROOT->SetStyle("Plain"); + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + + + /// Acquisition from cfg file + + if(argc != 2){ + std::cerr << " >>>>> analysis.cpp::usage: " << argv[0] << " configFileName" << std::endl ; + return 1; + } + + parseConfigFile (argv[1]) ; + + std::string treeNameDATA = gConfigParser -> readStringOption("Input::treeNameDATA"); + std::cout<<" Input Tree Name DATA = "< readStringOption("Input::treeNameMC"); + std::cout<<" Input Tree Name MC = "< readStringOption("Input::inputDataFile"); + std::cout<<" Input Data File = "< readStringOption("Input::inputMCFile"); + std::cout<<" Input MC File = "< readStringOption("Input::WeightforMC"); + std::cout<<" Weights for MC = "< readBoolOption("Input::useMC"); + std::cout<<" Fit also MC = "< readStringOption("Output::outputFile"); + std::cout<<" Output Data File = "< readStringOption("Output::outputFileTable"); + std::cout<<" Output Table File = "<GetEntries() << " entries" << std::endl; + std::cout << " DATA: " << std::setw(8) << treeDATA->GetEntries() << " entries" << std::endl; + + if (treeDATA->GetEntries() == 0 || treeMC->GetEntries() == 0 ){ + std::cout << ">>>recalibZ::Error: at least one file is empty" << std::endl; + return -1; + } + + std::vector FitCategories; + FitCategories = gConfigParser -> readStringListOption("Input::FitCategories"); + + std::cout << " >>>>> Input::FitCategories size = " << FitCategories.size() << std::endl; + std::cout << " >>>>> >>>>> "; + for (unsigned int iCat = 0; iCat < FitCategories.size(); iCat++){ + std::cout << " " << FitCategories.at(iCat) << ", "; + } + std::cout << std::endl; + + //--- weights for MC + TFile weightsFile (WeightforMC.c_str(),"READ"); + TH1F* hweights = (TH1F*)weightsFile.Get("hweights"); + float w[100]; + for (int ibin = 1; ibin < hweights->GetNbinsX()+1; ibin++){ + w[ibin-1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 + } + weightsFile.Close(); + + /// Output infos + TFile* outputTFile = new TFile(outputFile.c_str(),"RECREATE"); + + /// option Infos + int nbinZ = gConfigParser -> readIntOption("Option::nbinZ"); + std::cout<<" nbinZ = "< readDoubleOption("Option::mZMax"); + std::cout<<" mZ_Max = "< readDoubleOption("Option::mZMin"); + std::cout<<" mZ_Min = "< readDoubleOption("Option::scaleEB"); + std::cout<<" scaleEB = "< readDoubleOption("Option::scaleEE"); + std::cout<<" scaleEE = "< readIntOption("Option::nPoints"); + std::cout<<" nPoints = "< ZmassDATA; + std::map ZmassDATA_regression; + std::map ZmassMC; + std::map ZmassMC_regression; + + + for(unsigned int i = 0; i < FitCategories.size(); ++i){ + std::string category = FitCategories.at(i); + std::string histoName1 = "h_ZmassDATA_"+category; + ZmassDATA[category] = new TH1F(histoName1.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassDATA[category] -> Sumw2(); + + std::string histoName2 = "h_ZmassDATA_regression_"+category; + ZmassDATA_regression[category] = new TH1F(histoName2.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassDATA_regression[category] -> Sumw2(); + + std::string histoName3 = "h_ZmassMC_"+category; + ZmassMC[category] = new TH1F(histoName3.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassMC[category] -> Sumw2(); + + std::string histoName4 = "h_ZmassMC_regression_"+category; + ZmassMC_regression[category] = new TH1F(histoName4.c_str(),"",nbinZ,mZ_Min,mZ_Max); + ZmassMC_regression[category] -> Sumw2(); + + } + + /// Set branch addresses + int isZ; + float ele1ele2_scM,ele1ele2_scM_regression; + int ele1_isEB,ele2_isEB; + float ele1_scEta,ele2_scEta,ele1_scE,ele2_scE,ele1_es,ele2_es,ele1_scERaw,ele2_scERaw, ele1_scE_regression, + ele2_scE_regression,ele1_e3x3,ele2_e3x3; + int ele1_seedIeta,ele1_seedIphi,ele2_seedIeta,ele2_seedIphi,ele1_seedIx,ele2_seedIx,ele1_seedIy,ele2_seedIy,ele1_seedZside,ele2_seedZside; + int PUit_NumInteractions; + + treeDATA->SetBranchAddress("isZ", &isZ); + treeDATA->SetBranchAddress("ele1ele2_scM", &ele1ele2_scM); + treeDATA->SetBranchAddress("ele1ele2_scM_regression", &ele1ele2_scM_regression); + treeDATA->SetBranchAddress("ele1_isEB", &ele1_isEB); + treeDATA->SetBranchAddress("ele2_isEB", &ele2_isEB); + + treeMC->SetBranchAddress("isZ", &isZ); + treeMC->SetBranchAddress("ele1ele2_scM", &ele1ele2_scM); + treeMC->SetBranchAddress("ele1_isEB", &ele1_isEB); + treeMC->SetBranchAddress("ele2_isEB", &ele2_isEB); + treeMC->SetBranchAddress("PUit_NumInteractions", &PUit_NumInteractions); + + treeDATA->SetBranchAddress("ele1_scEta", &ele1_scEta); + treeDATA->SetBranchAddress("ele2_scEta", &ele2_scEta); + + treeMC->SetBranchAddress("ele1_scEta", &ele1_scEta); + treeMC->SetBranchAddress("ele2_scEta", &ele2_scEta); + + treeDATA->SetBranchAddress("ele1_seedIeta", &ele1_seedIeta); + treeDATA->SetBranchAddress("ele1_seedIphi", &ele1_seedIphi); + treeDATA->SetBranchAddress("ele2_seedIeta", &ele2_seedIeta); + treeDATA->SetBranchAddress("ele2_seedIphi", &ele2_seedIphi); + treeDATA->SetBranchAddress("ele1_seedIx", &ele1_seedIx); + treeDATA->SetBranchAddress("ele2_seedIx", &ele2_seedIx); + treeDATA->SetBranchAddress("ele1_seedIy", &ele1_seedIy); + treeDATA->SetBranchAddress("ele2_seedIy", &ele2_seedIy); + treeDATA->SetBranchAddress("ele1_seedZside", &ele1_seedZside); + treeDATA->SetBranchAddress("ele2_seedZside", &ele2_seedZside); + + treeMC->SetBranchAddress("ele1_seedIeta", &ele1_seedIeta); + treeMC->SetBranchAddress("ele1_seedIphi", &ele1_seedIphi); + treeMC->SetBranchAddress("ele2_seedIeta", &ele2_seedIeta); + treeMC->SetBranchAddress("ele2_seedIphi", &ele2_seedIphi); + treeMC->SetBranchAddress("ele1_seedIx", &ele1_seedIx); + treeMC->SetBranchAddress("ele2_seedIx", &ele2_seedIx); + treeMC->SetBranchAddress("ele1_seedIy", &ele1_seedIy); + treeMC->SetBranchAddress("ele2_seedIy", &ele2_seedIy); + treeMC->SetBranchAddress("ele1_seedZside", &ele1_seedZside); + treeMC->SetBranchAddress("ele2_seedZside", &ele2_seedZside); + + + treeDATA->SetBranchAddress("ele1_scE", &ele1_scE); + treeDATA->SetBranchAddress("ele1_e3x3", &ele1_e3x3); + treeDATA->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression); + treeDATA->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression); + treeDATA->SetBranchAddress("ele2_scE", &ele2_scE); + treeDATA->SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeDATA->SetBranchAddress("ele2_e3x3", &ele2_e3x3); + treeDATA->SetBranchAddress("ele1_es", &ele1_es); + treeDATA->SetBranchAddress("ele2_scERaw", &ele2_scERaw); + treeDATA->SetBranchAddress("ele2_es", &ele2_es); + + treeMC->SetBranchAddress("ele1_scE", &ele1_scE); + treeMC->SetBranchAddress("ele1_e3x3", &ele1_e3x3); + treeMC->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression); + treeMC->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression); + treeMC->SetBranchAddress("ele1_scERaw", &ele1_scERaw); + treeMC->SetBranchAddress("ele1_es", &ele1_es); + treeMC->SetBranchAddress("ele2_scE", &ele2_scE); + treeMC->SetBranchAddress("ele2_e3x3", &ele2_e3x3); + treeMC->SetBranchAddress("ele2_scERaw", &ele2_scERaw); + treeMC->SetBranchAddress("ele2_es", &ele2_es); + + //*** Loop on MC **// + std::cout <<" Fill with MC Events "< GetEntries(); + std::cout <<" MC Events = "< GetEntry(iEntry); + double weight = w[PUit_NumInteractions]; + //only the Z + if (isZ != 1) continue; + if( (ele1_seedZside== 0) && (ele2_seedZside == 0) ){ + ZmassMC["EB-EB"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB-EB"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + else if( fabs(ele1_seedZside)== 1 && fabs(ele2_seedZside)== 1 ){ + ZmassMC["EE-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE-EE"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight ); + + } + else{ + ZmassMC["EB-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEE),weight ); + ZmassMC_regression["EB-EE"] -> Fill( ele1ele2_scM* sqrt(scaleEB*scaleEE)* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)),weight ); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta>0. && ele2_scEta>0. ){ + ZmassMC["EBp"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EBp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta<0. && ele2_scEta<0. ){ + ZmassMC["EBm"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EBm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + if((ele1_seedZside== 1) && (ele2_seedZside == 1)){ + ZmassMC["EEp"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EEp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + else if((ele1_seedZside== -1) && (ele2_seedZside == -1)){ + ZmassMC["EEm"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EEm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + if((ele1_seedZside!=0) && (ele2_seedZside !=0) && ele1_e3x3/ele1_scERaw>0.94 && ele2_e3x3/ele2_scERaw>0.94){ + ZmassMC["EE_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + else if((ele1_seedZside!=0) && (ele2_seedZside !=0) && ele1_e3x3/ele1_scERaw<0.94 && ele2_e3x3/ele2_scERaw<0.94){ + ZmassMC["EE_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + if((ele1_seedZside==0) && (ele2_seedZside ==0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ + ZmassMC["EB_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + else if((ele1_seedZside==0) && (ele2_seedZside==0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ + ZmassMC["EB_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)<1. && fabs(ele2_scEta)<1. ){ + ZmassMC["EB_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EB_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)>1. && fabs(ele2_scEta)>1. ){ + ZmassMC["EB_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EB_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + + if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)<2. && fabs(ele2_scEta)<2. ){ + ZmassMC["EE_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE),weight ); + ZmassMC_regression["EE_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE),weight); + } + else if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)>2. && fabs(ele2_scEta)>2. ){ + ZmassMC["EE_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB),weight ); + ZmassMC_regression["EE_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB),weight); + } + + + } + + //*** Loop over Data **// + int nEntriesDATA = treeDATA -> GetEntries(); + std::cout <<" Fill with DATA Events "< GetEntry(iEntry); + //only the Z + if (isZ != 1) continue; + + if( (ele1_seedZside== 0) && (ele2_seedZside== 0) ){ + ZmassDATA["EB-EB"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB) ); + ZmassDATA_regression["EB-EB"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE))* sqrt(scaleEB*scaleEB)); + } + else if( fabs(ele1_seedZside)== 1 && fabs(ele2_seedZside)== 1 ){ + ZmassDATA["EE-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE) ); + ZmassDATA_regression["EE-EE"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE) ); + + } + else{ + ZmassDATA["EB-EE"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEE) ); + ZmassDATA_regression["EB-EE"] -> Fill( ele1ele2_scM* sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEE) ); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta>0. && ele2_scEta>0. ){ + ZmassDATA["EBp"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EBp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && ele1_scEta<0. && ele2_scEta<0. ){ + ZmassDATA["EBm"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EBm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + if((ele1_seedZside== 1) && (ele2_seedZside == 1)){ + ZmassDATA["EEp"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EEp"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + +else if((ele1_seedZside== -1) && (ele2_seedZside == -1)){ + ZmassDATA["EEm"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EEm"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); +} + + + if((ele1_seedZside!=0) && (ele2_seedZside !=0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ + ZmassDATA["EE_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + + else if((ele1_seedZside!=0) && (ele2_seedZside !=0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ + ZmassDATA["EE_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + + if((ele1_seedZside==0) && (ele2_seedZside ==0) && (ele1_e3x3/ele1_scERaw)>0.94 && (ele2_e3x3/ele2_scERaw)>0.94){ + ZmassDATA["EB_R9_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EB_R9_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + else if((ele1_seedZside==0) && (ele2_seedZside==0) && (ele1_e3x3/ele1_scERaw)<0.94 && (ele2_e3x3/ele2_scERaw)<0.94){ + ZmassDATA["EB_R9_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EB_R9_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)<1. && fabs(ele2_scEta)<1. ){ + ZmassDATA["EB_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB) ); + ZmassDATA_regression["EB_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + else if((ele1_seedZside== 0) && (ele2_seedZside == 0) && fabs(ele1_scEta)>1. && fabs(ele2_scEta)>1. ){ + ZmassDATA["EB_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEB*scaleEB)); + ZmassDATA_regression["EB_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEB*scaleEB)); + } + + if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)<2. && fabs(ele2_scEta)<2. ){ + ZmassDATA["EE_Eta_l"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_Eta_l"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + else if((fabs(ele1_seedZside)== 1) && (fabs(ele2_seedZside) == 1) && fabs(ele1_scEta)>2. && fabs(ele2_scEta)>2. ){ + ZmassDATA["EE_Eta_g"] -> Fill( ele1ele2_scM * sqrt(scaleEE*scaleEE)); + ZmassDATA_regression["EE_Eta_g"] -> Fill( ele1ele2_scM*sqrt((ele1_scE_regression/ele1_scE)*(ele2_scE_regression/ele2_scE)) * sqrt(scaleEE*scaleEE)); + } + + + } + + /// Z Lineshape Tool +if(useMC){ + + std::string energyType = "NoReg"; + + std::ofstream outTableFile (outputTable.c_str(),std::ios::out); + + outTableFile<<"\\begin{table}[!htb]"< extremeDATA = breitWigner_crystalBallLowFWHM(ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg"), mZ_Min,mZ_Max); + + double sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + std::pair extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg"),mZ_Min,mZ_Max); + + double sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB-EB_Reg")->GetParError(3)<<" &"<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB-EB"]->GetFunction("bw_cb_MC_EB-EB_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EBp_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EBp_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EBp"]->GetFunction("bw_cb_MC_EBp_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EBm_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EBm_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EBm"]->GetFunction("bw_cb_MC_EBm_Reg")->GetParameter(3)) <<" \\\\ "< DATA and MC Regression"<GetFunction("bw_cb_DATA_EB_R9_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_R9_g"]->GetFunction("bw_cb_MC_EB_R9_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EB_R9_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_R9_l"]->GetFunction("bw_cb_MC_EB_R9_l_Reg")->GetParameter(3)) <<" \\\\ "< 1 DATA and MC Regression "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_Eta_g"]->GetFunction("bw_cb_MC_EB_Eta_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EB_Eta_l"]->GetFunction("bw_cb_MC_EB_Eta_l_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE-EE_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE-EE_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE-EE"]->GetFunction("bw_cb_MC_EE-EE_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EEp_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EEp_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EEp"]->GetFunction("bw_cb_MC_EEp_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EEm_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EEm_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EEm"]->GetFunction("bw_cb_MC_EEm_Reg")->GetParameter(3)) <<" \\\\ "< DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_R9_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_R9_g"]->GetFunction("bw_cb_MC_EE_R9_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE_R9_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_R9_l"]->GetFunction("bw_cb_MC_EE_R9_l_Reg")->GetParameter(3)) <<" \\\\ "< 2 DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_Eta_g"]->GetFunction("bw_cb_MC_EE_Eta_g_Reg")->GetParameter(3)) <<" \\\\ "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg"), mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power(((extremeDATA.second-extremeDATA.first)-a*FWHMZ),2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + + extremeMC = breitWigner_crystalBallLowFWHM(ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaMC = sqrt(TMath::Power((extremeMC.second-extremeMC.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" & "<< " & "<<" &"<<" \\\\ "<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParError(3) <<" & "<< ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3) <<" #pm "<GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParError(3)<<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< sigmaMC/(91.18+ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3)) <<" & "<< + ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassMC_regression["EE_Eta_l"]->GetFunction("bw_cb_MC_EE_Eta_l_Reg")->GetParameter(3)) <<" \\\\ "< extremeDATA = breitWigner_crystalBallLowFWHM(ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg"),mZ_Min,mZ_Max); + + double sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB-EB"]->GetFunction("bw_cb_DATA_EB-EB_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EBp_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBp_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBp"]->GetFunction("bw_cb_DATA_EBp_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EBm_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EBm_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EBm"]->GetFunction("bw_cb_DATA_EBm_Reg")->GetParameter(3))<<" \\\\ "< DATA and MC Regression"<GetFunction("bw_cb_DATA_EB_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_g"]->GetFunction("bw_cb_DATA_EB_R9_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EB_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_R9_l"]->GetFunction("bw_cb_DATA_EB_R9_l_Reg")->GetParameter(3))<<" \\\\ "< 1 DATA Regression "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_g"]->GetFunction("bw_cb_DATA_EB_Eta_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EB_Eta_l"]->GetFunction("bw_cb_DATA_EB_Eta_l_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE-EE_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE-EE"]->GetFunction("bw_cb_DATA_EE-EE_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EEp_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEp_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEp"]->GetFunction("bw_cb_DATA_EEp_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EEm_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EEm_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EEm"]->GetFunction("bw_cb_DATA_EEm_Reg")->GetParameter(3))<<" \\\\ "< DATA and MC Regression "<GetFunction("bw_cb_DATA_EE_R9_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_g"]->GetFunction("bw_cb_DATA_EE_R9_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE_R9_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_R9_l"]->GetFunction("bw_cb_DATA_EE_R9_l_Reg")->GetParameter(3))<<" \\\\ "< 2 DATA Regression "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_g"]->GetFunction("bw_cb_DATA_EE_Eta_g_Reg")->GetParameter(3))<<" \\\\ "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg"),mZ_Min,mZ_Max); + + sigmaDATA = sqrt(TMath::Power((extremeDATA.second-extremeDATA.first)-a*FWHMZ,2)-b*FWHMZ*FWHMZ)/(2.*sqrt(2.*log(2.))); + + outTableFile<< " & " <<" & "<<" & "<<" & "<<" \\\\"<GetEntries() <<" & "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3)<<" #pm "<GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParError(3) <<" & "<< sigmaDATA/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" & "<< ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(4)/(91.18+ZmassDATA_regression["EE_Eta_l"]->GetFunction("bw_cb_DATA_EE_Eta_l_Reg")->GetParameter(3))<<" \\\\ "<Write(); + ZmassDATA["EB-EE"]->Write(); + ZmassDATA["EE-EE"]->Write(); + ZmassDATA["EBp"]->Write(); + ZmassDATA["EB_R9_g"]->Write(); + ZmassDATA["EB_R9_l"]->Write(); + ZmassDATA["EEp"]->Write(); + ZmassDATA["EEm"]->Write(); + ZmassDATA["EE_R9_g"]->Write(); + ZmassDATA["EE_R9_l"]->Write(); + ZmassDATA["EB-EE"]->Write(); + + ZmassMC["EB-EB"]->Write(); + ZmassMC["EB-EE"]->Write(); + ZmassMC["EE-EE"]->Write(); + ZmassMC["EBp"]->Write(); + ZmassMC["EB_R9_g"]->Write(); + ZmassMC["EB_R9_l"]->Write(); + ZmassMC["EEp"]->Write(); + ZmassMC["EEm"]->Write(); + ZmassMC["EE_R9_g"]->Write(); + ZmassMC["EE_R9_l"]->Write(); + ZmassMC["EB-EE"]->Write(); + + ZmassDATA_regression["EB-EB"]->Write(); + ZmassDATA_regression["EB-EE"]->Write(); + ZmassDATA_regression["EE-EE"]->Write(); + + ZmassMC_regression["EB-EB"]->Write(); + ZmassMC_regression["EB-EE"]->Write(); + ZmassMC_regression["EE-EE"]->Write(); + + outputTFile -> Close(); + + return 0; +} diff --git a/EOverPCalibration/cfg/AddRegressionWeight_cfg.py b/EOverPCalibration/cfg/AddRegressionWeight_cfg.py new file mode 100644 index 00000000000..a992cae30db --- /dev/null +++ b/EOverPCalibration/cfg/AddRegressionWeight_cfg.py @@ -0,0 +1,17 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("AddRegressionWeight") + +process.Options = cms.PSet( + + inputFile = cms.string("../WZAnalysis_DATA.root"), + treeNameDATA = cms.string("simpleNtupleEoverP/ntu"), + UseMethodFlag = cms.string("BDTG"), + FilemethodXMLEBE = cms.string("weight_EB_BDTG_E_W/TMVARegression_BDTG.weights.xml"), + FilemethodXMLEBP = cms.string("weight_EB_BDTG_P_W/TMVARegression_BDTG.weights.xml"), + FilemethodXMLEEE = cms.string("weight_EE_BDTG_E_W/TMVARegression_BDTG.weights.xml"), + FilemethodXMLEEP = cms.string("weight_EE_BDTG_P_W/TMVARegression_BDTG.weights.xml"), + RegionOfTraining = cms.string("EE"), + useW = cms.bool(True), + isMC = cms.bool(False) +) \ No newline at end of file diff --git a/EOverPCalibration/cfg/Barrel.cfg b/EOverPCalibration/cfg/Barrel.cfg new file mode 100644 index 00000000000..3e88c2343ca --- /dev/null +++ b/EOverPCalibration/cfg/Barrel.cfg @@ -0,0 +1,50 @@ +#@@@@@@@@@@ ON LSF FOR ECAL EB @@@@@@@@@ +##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ +#ls -lrth cfg/cfg_lunch/ | grep -v ~ | grep -v EE | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorWeight.exe cfg/job_sh/"$9}' +##### Generate .sh on LSF +# cd CMSSW_4_2.... +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | grep -v EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh +##### Run Job on LSF +#ls -lrth cfg/job_sh/ | grep DATA | grep -v EE | awk '{print "bsub -cwd ./LSF -q 1nd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' +#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' + + +#@@@@@@@@@@ ON LSF FOR ECAL EE @@@@@@@@@ +##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ +#ls -lrth cfg/cfg_lunch/ | grep -v ~ | grep EE | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorEE.exe cfg/job_sh/"$9}' +##### Generate .sh on LSF +# cd CMSSW_4_2.... +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | grep EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorEE.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | grep EE | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorEE.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh +##### Run Job on LSF +#ls -lrth cfg/job_sh/ | grep DATA | grep EE | awk '{print "bsub -cwd ./LSF -q 1nd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' +#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' + + +[Input] +#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root +#inputFile= /data1/rgerosa/NTUPLES_FINAL_CALIB/MC/WJetsToLNu_DYJetsToLL_7TeV-madgraph-tauola_Fall11_All.root + +inputList = cfg/list.txt + +inputFileDeadXtal= + +inputTree = ntu +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = false +isMCTruth = true + +[Output] +outputFile = WJetsToLNu_DYJetsToLL_7TeV-madgraph-tauola_Fall11_Etrue + +[Options] +numberOfEvents = 100 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 2 \ No newline at end of file diff --git a/EOverPCalibration/cfg/DeadXtalAnalysisEB.cfg b/EOverPCalibration/cfg/DeadXtalAnalysisEB.cfg new file mode 100644 index 00000000000..87a53d10c32 --- /dev/null +++ b/EOverPCalibration/cfg/DeadXtalAnalysisEB.cfg @@ -0,0 +1,32 @@ +[Input] + +inputList = cfg/DeadXtalEBFile_noSkip_split.txt +inputStandardMap = output/Aug28_22JanReReco_RunABCD_standard/FastCalibrator_Aug28_22JanReReco_RunABCD_0_WZ_noEP_EB.root + +DeadChannelMapName = h_map_Dead_Channels +ICMapName = h_scale_EB + +isDeadTriggerTower = false + +EtaBinCenterDeadTT = 78, 46, 18, -12, -34, -60, -72 +NPhiShift = 14 +PhiOffset = 4 + + +IPhiWindow = 3 +IEtaWindow = 3 + +icMapRatio = false + +iEtaBinDivision = 0, 12, 24, 36, 45, 55, 65, 75, 85 +#iEtaBinDivision = 0, 20, 40, 60, 85 +iPhiBinDivision = 0, 45, 90, 135, 180, 225, 270, 315, 360 +#iPhiBinDivision = 0, 180, 360 +NPhiSMBinDivision = 5 + + +[Output] + +outputCanvasPlot = output/outDeadXtalPlots/ + + diff --git a/EOverPCalibration/cfg/Endcap.cfg b/EOverPCalibration/cfg/Endcap.cfg new file mode 100644 index 00000000000..c58b9d32cc7 --- /dev/null +++ b/EOverPCalibration/cfg/Endcap.cfg @@ -0,0 +1,25 @@ +[Input] +#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root +#inputFile=/data1/rgerosa/NTUPLES_FINAL_CALIB/MC/WJetsToLNu_TuneZ2_7TeV-madgraph-tauola_Fall11_All.root + +inputList = cfg/list.txt + +inputFileDeadXtal= + +inputTree = ntu +isMiscalib = true +isSaveEPDistribution = false +isEPselection = false +isR9selection = true +isfbrem = false +isMCTruth = false + +[Output] +outputFile = WJetsToLNu_7TeV-madgraph-tauola_Fall11 + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 1 +nLoops = 25 diff --git a/EOverPCalibration/cfg/FastCalibrator_EB_nosplit_cfg.py b/EOverPCalibration/cfg/FastCalibrator_EB_nosplit_cfg.py new file mode 100644 index 00000000000..01bd9a57822 --- /dev/null +++ b/EOverPCalibration/cfg/FastCalibrator_EB_nosplit_cfg.py @@ -0,0 +1,34 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEBparameters") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), + # inputFileDeadXtal = cms.string() + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("/gwteray/users/brianza/scalibMap2.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(0), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) diff --git a/EOverPCalibration/cfg/FastCalibrator_EB_split_cfg.py b/EOverPCalibration/cfg/FastCalibrator_EB_split_cfg.py new file mode 100644 index 00000000000..c44930860ae --- /dev/null +++ b/EOverPCalibration/cfg/FastCalibrator_EB_split_cfg.py @@ -0,0 +1,34 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEBparameters") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), + # inputFileDeadXtal = cms.string() + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("/gwteray/users/brianza/scalibMap2.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(1), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) diff --git a/EOverPCalibration/cfg/FastCalibrator_EE_nosplit_cfg.py b/EOverPCalibration/cfg/FastCalibrator_EE_nosplit_cfg.py new file mode 100644 index 00000000000..f41cde327a9 --- /dev/null +++ b/EOverPCalibration/cfg/FastCalibrator_EE_nosplit_cfg.py @@ -0,0 +1,35 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEEoptimization") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), +# inputFileDeadXtal = cms.string(), + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("scalibMapEE_eta_straweak.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD_EE"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(0), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) + diff --git a/EOverPCalibration/cfg/FastCalibrator_EE_split_cfg.py b/EOverPCalibration/cfg/FastCalibrator_EE_split_cfg.py new file mode 100644 index 00000000000..1ed47d11848 --- /dev/null +++ b/EOverPCalibration/cfg/FastCalibrator_EE_split_cfg.py @@ -0,0 +1,35 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEEparameters") + +process.Options = cms.PSet( + + inputList = cms.string("cfg/list.txt"), +# inputFileDeadXtal = cms.string(), + inputTree = cms.string("selected"), + jsonFileName = cms.string("json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), + miscalibMap = cms.string("scalibMapEE_eta_straweak.txt"), + isMiscalib = cms.bool(False), + isSaveEPDistribution = cms.bool(False), + isMCTruth = cms.bool(False), + isEPselection = cms.bool(False), + isPtCut = cms.bool(False), + PtMin = cms.double(0.), + isfbrem = cms.bool(False), + fbremMax = cms.double(100.), + isR9selection = cms.bool(False), + R9Min = cms.double(-1.), + miscalibMethod = cms.int32(1), + inputMomentumScale = cms.string("output/MomentumCalibration2012"), + typeEB = cms.string("eta1"), + typeEE = cms.string("eta1"), + outputPath = cms.string("output/output_runD_EE"), + outputFile = cms.string("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"), + numberOfEvents = cms.int32(-1), + useZ = cms.int32(1), + useW = cms.int32(1), + splitStat = cms.int32(1), + nLoops = cms.int32(20), + isDeadTriggerTower = cms.bool(False) +) + diff --git a/EOverPCalibration/cfg/FastCalibrator_Template.cfg b/EOverPCalibration/cfg/FastCalibrator_Template.cfg new file mode 100644 index 00000000000..f3ab2846c3f --- /dev/null +++ b/EOverPCalibration/cfg/FastCalibrator_Template.cfg @@ -0,0 +1,37 @@ +[Input] + +inputList = INPUTLIST +inputTree = INPUTTREE +jsonFileName = JSONFILENAME +inputFileDeadXtal = INPUTFILEDEADXTAL + +isMiscalib = MISCALIB +isSaveEPDistribution = EOVERP +isMCTruth = MCTRUTH +isEPselection = EPSELECTION +isPtCut = PTCUT +PtMin = PTMIN +isfbrem = ISFBREM +fbremMax = FBREMMAX +isR9selection = R9CUT +R9Min = R9MIN + +inputMomentumScale = INPUTMOMENTUMSCALE + +typeEB = TYPEEB +typeEE = TYPEEE + + +[Output] + +outputPath = OUTPUTPATH +outputFile = OUTPUTFILE + + +[Options] + +numberOfEvents = NUMEVENTS +useZ = USEZ +useW = USEW +splitStat = SPLIT +nLoops = LOOPS diff --git a/EOverPCalibration/cfg/MVARegression_cfg.cfg b/EOverPCalibration/cfg/MVARegression_cfg.cfg new file mode 100644 index 00000000000..1b140ebca73 --- /dev/null +++ b/EOverPCalibration/cfg/MVARegression_cfg.cfg @@ -0,0 +1,33 @@ +[Input] + +inputFileList = cfg/MVATraining.txt + +treeNameDATA = ntu + +UseMethodName = PDERS ,\ + PDEFoam ,\ + KNN ,\ + LD ,\ + FDA_GA ,\ + FDA_MC ,\ + FDA_MT ,\ + FDA_GAMT ,\ + MLP ,\ + SVM ,\ + BDT ,\ + BDTG + + +#UseMethodFlag = LD +#UseMethodFlag = MLP +UseMethodFlag = BDT +#UseMethodFlag = BDTG + + +RegionOfTraining = EB + +[Output] + +#outputFileName = TMVA/TMVARegEB_LD_Z.root +#outputFileName = TMVA/TMVARegEB_MLP_multitarget.root +outputFileName = TMVA/TMVAReg_BDT_EB_P_W.root \ No newline at end of file diff --git a/EOverPCalibration/cfg/MakeJobs_cfg.cfg b/EOverPCalibration/cfg/MakeJobs_cfg.cfg new file mode 100644 index 00000000000..cf5b10d8565 --- /dev/null +++ b/EOverPCalibration/cfg/MakeJobs_cfg.cfg @@ -0,0 +1,61 @@ +[Input] + +EtaBinCenterDeadXtal = 78, 46, 18, -12, -34, -60, -72 +PhiStartDeadXtal = 4 +PhiStepDeadXtal = 15 +PhiNShiftDeadXtal = 3 + +isDeadTriggerTower = true + +IxEEPBinCenterDeadXtal = 10, 20, 30, 40 +IyEEPBinCenterDeadXtal = 10, 20, 30, 40 +IxEEMBinCenterDeadXtal = 10, 20, 30, 40 +IyEEMBinCenterDeadXtal = 10, 20, 30, 40 + +iXStepDeadXtal = 1 +iXNShiftDeadXtal = 3 +iYStepDeadXtal = 1 +iYNShiftDeadXtal = 3 + + +OutputDeadXtalPath = cfg/DeadXTalList/ +OutputDeadXtalFile = DeadXtalFile +inputCfgTemplate = cfg/FastCalibrator_Template.cfg + +inputList = cfg/list.txt +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +jsonFileName = json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt + + +isMiscalib = false +isSaveEPDistribution = false +isMCTruth = false +isEPselection = false +isPtCut = false +PtMin = 0. +isfbrem = false +fbremMax = 100. +isR9selection = false +R9Min = -1. + +inputMomentumScale = output/MomentumCalibration2012 + +typeEB = eta1 +typeEE = eta1 + + + + +[Output] + +outputPath = output/Aug28_22JanReReco_RunABCD_DeadTT/ +outputFile = FastCalibrator_Aug28_22JanReReco_RunABCD +OutputCfgPath = cfg/JOB/ + +[Options] + +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 18 diff --git a/EOverPCalibration/cfg/NormalizeEE_cfg.py b/EOverPCalibration/cfg/NormalizeEE_cfg.py new file mode 100644 index 00000000000..baca0629328 --- /dev/null +++ b/EOverPCalibration/cfg/NormalizeEE_cfg.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("FastCalibratorEBparameters") + +process.Options = cms.PSet( + + Inputfile1 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), + Inputfile2 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), + Inputfile3 = cms.string("/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE_regression/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_R9_EE.root"), + evalStat = cms.int32(1), + isMC = cms.bool(false), + fileType = cms.string("png"), + dirName = cms.string("."), + printPlots = cms.bool(false) + +) diff --git a/EOverPCalibration/cfg/XtalAlphaEB_noSplit.cfg b/EOverPCalibration/cfg/XtalAlphaEB_noSplit.cfg new file mode 100644 index 00000000000..d5e79b76fae --- /dev/null +++ b/EOverPCalibration/cfg/XtalAlphaEB_noSplit.cfg @@ -0,0 +1,33 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = false +R9Min = -1. +isMCTruth = false + + + +[Output] +outputFile = output/Test + + + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 50 diff --git a/EOverPCalibration/cfg/XtalAlphaEB_split.cfg b/EOverPCalibration/cfg/XtalAlphaEB_split.cfg new file mode 100644 index 00000000000..46d6d2e15da --- /dev/null +++ b/EOverPCalibration/cfg/XtalAlphaEB_split.cfg @@ -0,0 +1,33 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = false +R9Min = -1. +isMCTruth = false + + + +[Output] +outputFile = output/AlphaEB_CalDic_2012 + + + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 1 +nLoops = 50 diff --git a/EOverPCalibration/cfg/XtalAlphaEE_noSplit.cfg b/EOverPCalibration/cfg/XtalAlphaEE_noSplit.cfg new file mode 100644 index 00000000000..e568e7e08b7 --- /dev/null +++ b/EOverPCalibration/cfg/XtalAlphaEE_noSplit.cfg @@ -0,0 +1,31 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = true +R9Min = -1. +isMCTruth = false +isfbrem = false + + +[Output] +outputFile = output/AlphaEE_CalDic_2012 + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 0 +nLoops = 50 diff --git a/EOverPCalibration/cfg/XtalAlphaEE_split.cfg b/EOverPCalibration/cfg/XtalAlphaEE_split.cfg new file mode 100644 index 00000000000..0162f755076 --- /dev/null +++ b/EOverPCalibration/cfg/XtalAlphaEE_split.cfg @@ -0,0 +1,34 @@ +[Input] +inputList = cfg/list.txt + +inputFileDeadXtal= + +jsonFileName = /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/Cert_190456-207469_8TeV_PromptReco_Collisions12_JSON.txt + +typeEB = eta1 +typeEE = absEta2 +inputMomentumScale = output/MomentumCalibration2012 + +inputTree = simpleNtupleEoverP/SimpleNtupleEoverP +isMiscalib = false +isSaveEPDistribution = false +isEPselection = false +isR9selection = true +isfbrem = false +R9Min = -1. +isMCTruth = false + + + +[Output] +outputFile = output/AlphaEE_CalDic_2012 + + + + +[Options] +numberOfEvents = -1 +useZ = 1 +useW = 1 +splitStat = 1 +nLoops = 50 diff --git a/EOverPCalibration/cfg/Zlineshape_cfg.cfg b/EOverPCalibration/cfg/Zlineshape_cfg.cfg new file mode 100644 index 00000000000..4591570a722 --- /dev/null +++ b/EOverPCalibration/cfg/Zlineshape_cfg.cfg @@ -0,0 +1,49 @@ +[Input] + +treeNameDATA = simpleNtupleEoverP/SimpleNtupleEoverP + +treeNameMC = simpleNtupleEoverP/SimpleNtupleEoverP + +inputDataFile = cfg/ZFitInputDATA/rerecoICHEP2012.txt + +inputMCFile = cfg/listMC2012.txt + +WeightforMC = CommonTools/weights/PUweights_DYJetsToLL_Summer12_S6_new.root + +useMC = true + +FitCategories = EB-EB, \ + EB-EE, \ + EE-EE, \ + EBp, \ + EBm, \ + EB_R9_g, \ + EB_R9_l, \ + EB_Eta_g, \ + EB_Eta_l, \ + EEp, \ + EEm, \ + EE_R9_g, \ + EE_R9_l, \ + EE_Eta_g, \ + EE_Eta_l + +[Option] + +nbinZ = 150 + +mZMax = 115 + +mZMin = 65 + +scaleEB = 1 + +scaleEE = 1 + +nPoints = 4000 + +[Output] + +outputFile = output/outputZLineshape.root + +outputFileTable = output/1.txt \ No newline at end of file diff --git a/EOverPCalibration/cfg/calibrationMomentum_cfg.py b/EOverPCalibration/cfg/calibrationMomentum_cfg.py new file mode 100644 index 00000000000..710e5f6f530 --- /dev/null +++ b/EOverPCalibration/cfg/calibrationMomentum_cfg.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("calibrationMomentumparameters") + +process.Options = cms.PSet( + + TreeName = cms.string("selected"), + infileDATA = cms.string("cfg/listDATA_momentumCalibration.txt"), + infileMC = cms.string("cfg/listMC2012_momentumCalibration.txt"), + WeightforMC = cms.string("CommonTools/PUweights_DYJetsToLL_Summer12_Prompt_TrueNumInteractions.root"), + usePUweights = cms.bool(false), + nPhiBinsEB = cms.int32(360), + nPhiBinsEE = cms.int32(360), + nEtaBinsEB = cms.int32(1), + nEtaBinsEE = cms.int32(1), + nPhiBinsTempEB = cms.int32(1), + nPhiBinsTempEE = cms.int32(1), + rebinEB = cms.int32(10), + rebinEE = cms.int32(20), + outputFile = cms.string("output/MomentumCalibration2012.root") + +) + diff --git a/EOverPCalibration/cfg/calibrationPlots_EB_cfg.py b/EOverPCalibration/cfg/calibrationPlots_EB_cfg.py new file mode 100644 index 00000000000..2c0c02cecce --- /dev/null +++ b/EOverPCalibration/cfg/calibrationPlots_EB_cfg.py @@ -0,0 +1,22 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("calibrationPlotsEBparameters") + +process.Options = cms.PSet( + + inFileName = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameEven = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameOdd = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_odd.root"), + nEtaBinsEB = cms.int32(1), + nEtaBinsEE = cms.int32(1), + is2012Calib = cms.bool(True), + isEB = cms.bool(True), + evalStat = cms.int32(1), + outputFolder = cms.string("output/"), + outFileName = cms.string("calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"), + outputTxt = cms.string("IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"), + fileType = cms.string("cxx") + +) + + diff --git a/EOverPCalibration/cfg/calibrationPlots_EE_cfg.py b/EOverPCalibration/cfg/calibrationPlots_EE_cfg.py new file mode 100644 index 00000000000..f1bc13a2ad2 --- /dev/null +++ b/EOverPCalibration/cfg/calibrationPlots_EE_cfg.py @@ -0,0 +1,22 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("calibrationPlotsEEparameters") + +process.Options = cms.PSet( + + inFileName = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameEven = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_even.root"), + inFileNameOdd = cms.string("output/output_runDFastCalibrator_Oct22_Run2012ABC_Cal_Dic2012_WZ_noEP_EB_odd.root"), + nEtaBinsEB = cms.int32(1), + nEtaBinsEE = cms.int32(1), + is2012Calib = cms.bool(True), + isEB = cms.bool(False), + evalStat = cms.int32(1), + outputFolder = cms.string("output/"), + outFileName = cms.string("calibrationEB_Run2012ABC_22JanuaryRereco_WZ_Fbrem.root"), + outputTxt = cms.string("IC_Run2012ABC_22JanuaryRereco_WZ_Fbrem_EB"), + fileType = cms.string("cxx") + +) + + diff --git a/EOverPCalibration/cfg/comparisonEB_cfg.py b/EOverPCalibration/cfg/comparisonEB_cfg.py new file mode 100644 index 00000000000..354a973034b --- /dev/null +++ b/EOverPCalibration/cfg/comparisonEB_cfg.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("comparisonEBparameters") + +process.Options = cms.PSet( + + inputFile = cms.string("/data1/rgerosa/L3_Weight/MC_WJets/noEP_Z/WZAnalysis_SingleEle_WJetsToLNu_Z_noEP_miscalib.root"), + fileMCTruth = cms.string("output/MCtruthIC.root"), + fileMCRecoIC = cms.string("output/MCRecoIC.root"), + fileStatPrecision = cms.string("output/StatPrec.root") +) + diff --git a/EOverPCalibration/cfg/comparisonEE_cfg.py b/EOverPCalibration/cfg/comparisonEE_cfg.py new file mode 100644 index 00000000000..089fa2c1300 --- /dev/null +++ b/EOverPCalibration/cfg/comparisonEE_cfg.py @@ -0,0 +1,13 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process("comparisonEEparameters") + +process.Options = cms.PSet( + + inputFile = cms.string("/data1/rgerosa/L3_Weight/MC_WJets/EE_recoFlag/WJetsToLNu_7TeV-madgraph-tauola_Fall11_Z_R9_miscalib_EE.root"), + fileMCTruth = cms.string("output/MCtruthIC_EE.root"), + fileMCRecoIC = cms.string("output/MCRecoIC_EE.root"), + fileStatPrecision = cms.string("output/StatPrec_MC_R9.root"), + outputFile = cms.string("output/ResidualForSystematic_EE_MC.root") + ) + diff --git a/EOverPCalibration/cfg/list.txt b/EOverPCalibration/cfg/list.txt new file mode 100644 index 00000000000..ae80f89101b --- /dev/null +++ b/EOverPCalibration/cfg/list.txt @@ -0,0 +1,5 @@ +/afs/cern.ch/user/l/lbrianza/work/public/RUND_DoubleElectron.root +#/gwteray/users/brianza/ntuple.root +#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012A_22Jan2013-v1.root +#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012B_22Jan2013-v1.root +#/gwteray/users/gerosa/ECALNTUPLES/22JanReReco/SingleElectron_RUN2012D_22Jan2013-v1.root diff --git a/EOverPCalibration/cfg/listDATA_momentumCalibration.txt b/EOverPCalibration/cfg/listDATA_momentumCalibration.txt new file mode 100644 index 00000000000..134a62475a9 --- /dev/null +++ b/EOverPCalibration/cfg/listDATA_momentumCalibration.txt @@ -0,0 +1,5 @@ +##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/DoubleElectron_Run2011AB-29Jun2012.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012A-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012B-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v2.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v3.root diff --git a/EOverPCalibration/cfg/listMC2012_momentumCalibration.txt b/EOverPCalibration/cfg/listMC2012_momentumCalibration.txt new file mode 100644 index 00000000000..485a82a821d --- /dev/null +++ b/EOverPCalibration/cfg/listMC2012_momentumCalibration.txt @@ -0,0 +1,6 @@ +##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/MC/DYJets-Summer12.root +##/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/DoubleElectron_Run2011AB-29Jun2012.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012A-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012B-13Jul-v1.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v2.root +/gwteray/users/benaglia/CALIBRATION/NTUPLES_EOverP/ReReco/Cal_Dic2012/DoubleElectron-ZSkim-RUN2012C-v3.root diff --git a/EOverPCalibration/cfg/test.cfg b/EOverPCalibration/cfg/test.cfg new file mode 100644 index 00000000000..34d9ace23e7 --- /dev/null +++ b/EOverPCalibration/cfg/test.cfg @@ -0,0 +1,34 @@ +#@@@@@@@@@@ ON LSF @@@@@@@@@ +##### Create job directoy and exe compile DATA with CMSSW_4_2_8 after cmsenv, compile MC with CMSSW_4_2_8_patch3/ +#ls -lrth cfg/cfg_lunch/ | grep -v ~ | tr "." " " | awk '{print "mkdir cfg/job_sh/"$9" ; cp bin/FastCalibratorWeight.exe cfg/job_sh/"$9}' +##### Generate .sh on LSF +# cd CMSSW_4_2.... +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep DATA | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth ~/scratch0/FastCalibrator/cfg/cfg_lunch/ | tr "." " " | grep MC | grep -v .cfg~ | awk '{print "echo @cd /afs/cern.ch/user/r/rgerosa/scratch0/CMSSW_4_2_8_patch3/src ; eval \\`scramv1 runtime -sh\\` ; cd /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator ; ./cfg/job_sh/"$9"/FastCalibratorWeight.exe cfg/cfg_lunch/"$9"."$10 "@ > ~/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' | tr "@" "\"" | /bin/sh +#ls -lrth cfg/job_sh/ | grep Z | awk '{print " chmod +x cfg/job_sh/"$9"/"$9".sh" }' | /bin/sh +##### Run Job on LSF +#ls -lrth cfg/job_sh/ | grep DATA | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' +#ls -lrth cfg/job_sh/ | grep MC | awk '{print "bsub -cwd ./LSF -q 8nh /afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/cfg/job_sh/"$9"/"$9".sh"}' + + +[Input] +#inputFile = /castor/cern.ch/user/r/rgerosa/WZAnalysisSingleXtal/DATA/WZAnalysis_SingleEle_Run2011AB.root +#inputFile = /gwteraz/users/govoni/WJetsToLNu_TuneZ2_tTeV_madgraph-tauola_Fall11.root +inputFile = /data2/calibrator/NTUPLES/Run2011B/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011B-WElectron-PromptSkim_recHitFlag/WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim.root +inputFileDeadXtal= + +inputTree = ntu +isMiscalib = false +isSaveEPDistribution = true +isEPselection = false +isR9selection = false + +[Output] +outputFile = WZAnalysis_Occupancy_recoFlag + +[Options] +numberOfEvents = -1 +useZ = 0 +useW = 1 +splitStat = 0 +nLoops = 2 diff --git a/EOverPCalibration/interface/CalibrationUtils.h b/EOverPCalibration/interface/CalibrationUtils.h new file mode 100644 index 00000000000..cdf3860bb16 --- /dev/null +++ b/EOverPCalibration/interface/CalibrationUtils.h @@ -0,0 +1,102 @@ +#ifndef CalibrationUtils_h +#define CalibrationUtils_h + +#include +#include +#include +#include + +#include "TFile.h" +#include "TChain.h" +#include "TCanvas.h" +#include "TPaveStats.h" +#include "TH1F.h" +#include "TF1.h" +#include "TRandom3.h" +#include "TGraphErrors.h" +#include "TH2F.h" +#include "TEndcapRings.h" +#include "geometryUtils.h" + + +//############## ECAL BARREL #################### + +/// Check if the crystal is near to a dead one +bool CheckxtalIC_EB (TH2F* h_scale_EB,int iPhi, int iEta ); + +/// Check if the crystal is near to a dead TT +bool CheckxtalTT_EB (int iPhi, int iEta, const std::vector >& TT_centre ); + +/// Initialize TT dead map +void InitializeDeadTT_EB(std::vector >& TT_centre); + +void InitializeDeadTT_EB2012(std::vector >& TT_centre); + + +/// Normalize IC vs ring EB +void NormalizeIC_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); + +/// Normalize IC vs LMR EB +void NormalizeIC_LMR_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); + +/// Normalize IC vs SM EB +void NormalizeIC_SM_EB(TH2F* h_scale_EB, TH2F* hcmap,const std::vector< std::pair > & TT_centre, bool skip = true); + +/// Book spread Histos +void BookSpreadHistos_EB(TH1F* h_spread, std::vector& h_spread_vsEtaFold, TGraphErrors* g_spread_vsEtaFold, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + TH2F* hcmap, TH2F* hcmap2 = NULL); + +/// Phi Projection EB +void PhiProfile(TH1F* h_phiAvgICSpread, TGraphErrors* g_avgIC_vsPhi, const int& phiRegionWidth, + TH2F* hcmap, TEndcapRings* eRings = NULL); + +void PhiFoldProfile_EB(TGraphErrors* g_avgIC_vsPhiFold_EBM, TGraphErrors* g_avgIC_vsPhiFold_EBP, const int& phiRegionWidth, + TH2F* hcmap); + +/// Residual Spread +void ResidualSpread (TGraphErrors *statprecision, TGraphErrors *Spread, TGraphErrors *Residual); + +//################# ECAL ENDCAPS ##################### + +/// check if the xtal is near to a dead one +bool CheckxtalIC_EE(TH2F* h_scale_EE,int ix, int iy, int ir); + +/// check if the xtal is neat to a dead TT +bool CheckxtalTT_EE(int ix, int iy, int ir,const std::vector >& TT_centre ); + +/// Map dead TT EE+ +void InitializeDeadTTEEP(std::vector >& TT_centre); + +void InitializeDeadTTEEP2012(std::vector >& TT_centre); + +/// Map dead TT EE- +void InitializeDeadTTEEM(std::vector >& TT_centre); + +void InitializeDeadTTEEM2012(std::vector >& TT_centre); + +/// Normalize in function of ring +void NormalizeIC_EE(TH2F* h_scale_EEM, TH2F* h_scale_EEP, TH2F* hcmap_EEM, TH2F* hcmap_EEP, const std::vector< std::pair > & TT_centre_EEM, const std::vector< std::pair > & TT_centre_EEP, TEndcapRings *eRings, bool skip = true); + +/// Book spread Histos +void BookSpreadHistos_EE(std::map& h_spread, std::map >& h_spread_vsEtaFold, std::map& g_spread_vsEtaFold, + TEndcapRings* eRings, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + std::map& hcmap, std::map& hcmap2); + +/// Book spread stat Histos +void BookSpreadStatHistos_EE(TH2F** hcmap2,TH2F** hcmap3, TH1F ***hstatprecision, TH1F **hstatprecisionAll, TEndcapRings *eRings); + +/// Phi Projection EB +void PhiProfileEE(TGraphErrors *phiProjection, TGraphErrors **MomentumScale, TH2F* hcmap,TEndcapRings *eRings, const int & iz); + + + + +int GetNRegionsEB(const std::string& type); +int templIndexEB(const std::string& type, const float& eta, const float& charge, const float& R9); + +int GetNRegionsEE(const std::string& type); +int templIndexEE(const std::string& type, const float& eta, const float& charge, const float& R9); + +#endif diff --git a/EOverPCalibration/interface/DrawingUtils.h b/EOverPCalibration/interface/DrawingUtils.h new file mode 100644 index 00000000000..5427509027c --- /dev/null +++ b/EOverPCalibration/interface/DrawingUtils.h @@ -0,0 +1,46 @@ +#ifndef DrawingUtils_h +#define DrawingUtils_h + +#include +#include + +#include "TFile.h" +#include "TCanvas.h" +#include "TH1F.h" +#include "TH2F.h" +#include "TGraphErrors.h" +#include "TF1.h" +#include "TLegend.h" +#include "TLatex.h" +#include "TColor.h" + + + +void SetLabelAndTitle(TGraphErrors* h); +void SetLabelAndTitle(TH1F* h); +void SetLabelAndTitle(TH2F* h2); + + + +void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileType, const bool& isEB = true); + + + +void DrawSpreadHisto(TH1F* h, const std::string& fileName, const std::string& funcName, const std::string& fileType, const bool& isEB); + +void DrawSpreadGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB, + TGraphErrors* g_stat); + + + +void DrawPhiAvgICSpread(TH1F* h, const std::string& fileName, const std::string& fileType, const bool& isEB); + +void DrawAvgICVsPhiGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const Color_t& color, const bool& isEB); + +void DrawAvgICVsPhiFoldGraph(TGraphErrors* g, TGraphErrors* g2, const std::string& fileName, const std::string& fileType, const bool& isEB); + + + +void DrawResidualGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB); + +#endif diff --git a/EOverPCalibration/interface/FastCalibratorEB.h b/EOverPCalibration/interface/FastCalibratorEB.h new file mode 100644 index 00000000000..5e977f90651 --- /dev/null +++ b/EOverPCalibration/interface/FastCalibratorEB.h @@ -0,0 +1,219 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEB_h +#define FastCalibratorEB_h + +#include +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "../../NtuplePackage/interface/readJSONFile.h" + +class FastCalibratorEB { + + public : + + ///! List of class methods + + FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution="NULL"); + + virtual ~FastCalibratorEB(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void FillScalibMap (TString miscalibMap); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,float,bool,float,bool,std::map > >, float, TString); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool,float,bool,float,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal, const bool & isDeadTriggerTower = false); + + virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); + + + // Public Variables + + std::vector myMomentumScale; + std::string myTypeEB; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + + Int_t runNumber; + Int_t lumiBlock; + Int_t eventNumber; + Int_t isW; + Int_t isZ; + + Int_t chargeEle[2]; + Float_t etaEle[2]; + Float_t PtEle[2]; + Float_t phiEle[2]; + Float_t rawEnergySCEle[2]; + Float_t energySCEle[2]; + Float_t etaSCEle[2]; + Float_t esEnergySCEle[2]; + Float_t e3x3SCEle[2]; + Float_t pAtVtxGsfEle[2]; + Float_t fbremEle[2]; + Int_t isEBEle[2]; + Float_t energyMCEle[2]; + Float_t etaMCEle[2]; + Float_t phiMCEle[2]; + + + ///! Ele 1 variables + + std::vector *energyRecHitSCEle1; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle1; //ETA + std::vector *YRecHitSCEle1; //PHI + std::vector *ZRecHitSCEle1; + std::vector *recoFlagRecHitSCEle1; + + Int_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_pt; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Int_t ele1_isEB; + Float_t ele1_E_true; + Float_t ele1_DR; + + ///! Ele 2 variables + + std::vector *energyRecHitSCEle2; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle2; //ETA + std::vector *YRecHitSCEle2; //PHI + std::vector *ZRecHitSCEle2; + std::vector *recoFlagRecHitSCEle2; + + Int_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_pt; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Int_t ele2_isEB; + Float_t ele2_E_true; + Float_t ele2_DR; + + ///! List of input branches from ntu + + TBranch *b_runNumber; //! + TBranch *b_lumiBlock; //! + TBranch *b_eventNumber; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_chargeEle; + TBranch *b_etaEle; + TBranch *b_PtEle; + TBranch *b_phiEle; + TBranch *b_rawEnergySCEle; + TBranch *b_energySCEle; + TBranch *b_etaSCEle; + TBranch *b_esEnergySCEle; + TBranch *b_e3x3SCEle; + TBranch *b_pAtVtxGsfEle; + TBranch *b_fbremEle; + TBranch *b_isEBEle; + TBranch *b_energyMCEle; + TBranch *b_etaMCEle; + TBranch *b_phiMCEle; + + TBranch *b_energyRecHitSCEle1; //! + TBranch *b_XRecHitSCEle1; + TBranch *b_YRecHitSCEle1; + TBranch *b_ZRecHitSCEle1; + TBranch *b_recoFlagRecHitSCEle1; + + TBranch *b_energyRecHitSCEle2; //! + TBranch *b_XRecHitSCEle2; + TBranch *b_YRecHitSCEle2; + TBranch *b_ZRecHitSCEle2; + TBranch *b_recoFlagRecHitSCEle2; + + + + ///! Output information + + std::vector IetaValues; + std::vector IphiValues; + std::vector ICValues; + std::vector meanICforPhiRingValues; + std::vector DeadXtal_HashedIndex; + + + hChain *hC_EoP_eta_ele; + hChain *hC_IntercalibValues; + hChain *hC_EoP; + hChain *hC_PullFromScalib; + h2Chain *hC_scale_EB; + TH1F *h_Occupancy_hashedIndex; + TH2F *h_occupancy; + TProfile *p_IntercalibValues_iEta; + TH2F *h_scalib_EB; + TH2F *h_scale_EB; + TH2F *h_scale_EB_meanOnPhi; + TH1F *h_scale_EB_hashedIndex; + TH1F *h_IntercalibSpread_iEta; + TH1F *h_IntercalibValues_test; + TH1F *h_Init_IntercalibValues; + + + TH2F *h_map_Dead_Channels ; + + TGraphErrors *g_ICmeanVsLoop; + TGraphErrors *g_ICrmsVsLoop; + + std::map scalibMap; + + private: + + TString outEPDistribution_p; + +}; + +#endif diff --git a/EOverPCalibration/interface/FastCalibratorEB_MVA.h b/EOverPCalibration/interface/FastCalibratorEB_MVA.h new file mode 100644 index 00000000000..288a243d875 --- /dev/null +++ b/EOverPCalibration/interface/FastCalibratorEB_MVA.h @@ -0,0 +1,243 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEB_MVA_h +#define FastCalibratorEB_MVA_h + +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + + +class FastCalibratorEB_MVA { + public : + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + + Int_t runId; + Int_t lumiId; + Int_t isW; + Int_t isZ; + + //! Declaration of regression weights + + Double_t BDTG_weightEB_W_1 ; + Double_t BDTG_weightEB_W_2 ; + Double_t BDTG_weightEB_Z_1 ; + Double_t BDTG_weightEB_Z_2 ; + + TBranch *b_BDTG_weightEB_W_1; + TBranch *b_BDTG_weightEB_W_2; + TBranch *b_BDTG_weightEB_Z_1; + TBranch *b_BDTG_weightEB_Z_2; + + ///! Ele 1 variables + + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_flag; + + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + +// Float_t ele1_charge; + + ///! Ele 2 variables + + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_flag; + + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + +// Float_t ele2_charge; + + ///! List of input branches from ntu + + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_hashedIndex; + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_flag; + TBranch *b_ele1_scERaw_PUcleaned; + TBranch *b_ele1_scE_regression; + + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_scEta; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_charge; //! + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_flag; + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_scEta; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + TBranch *b_ele2_charge; //! + + TBranch *b_ele2_scERaw_PUcleaned; + TBranch *b_ele2_scE_regression; + + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + + ///! List of class methods + + FastCalibratorEB_MVA(TTree *tree=0, TString outEPDistribution="NULL"); + + virtual ~FastCalibratorEB_MVA(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t Cut(Long64_t entry); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,bool); + + virtual Bool_t Notify(); + + virtual void Show(Long64_t entry = -1); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,bool); + + virtual void BuildWeightDistribution_ele(int,int,int,int,std::vector,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); + + ///! Output information + + std::vector IetaValues; + std::vector IphiValues; + std::vector ICValues; + std::vector meanICforPhiRingValues; + std::vector DeadXtal_HashedIndex; + + + hChain *hC_EoP_eta_ele; + hChain *hC_IntercalibValues; + hChain *hC_EoP; + hChain *hC_PullFromScalib; + h2Chain *hC_scale_EB; + TH1F *h_Occupancy_hashedIndex; + TH2F *h_occupancy; + TProfile *p_IntercalibValues_iEta; + TH2F *h_scalib_EB; + TH2F *h_scale_EB; + TH2F *h_scale_EB_meanOnPhi; + TH1F *h_scale_EB_hashedIndex; + TH1F *h_IntercalibSpread_iEta; + TH1F *h_IntercalibValues_test; + TH1F *h_Init_IntercalibValues; + TH1F *h_WeigthEB_W_1; + TH1F *h_WeigthEB_W_2; + + + TH2F *h_map_Dead_Channels ; + + TGraphErrors *g_ICmeanVsLoop; + TGraphErrors *g_ICrmsVsLoop; + + private: + + TString outEPDistribution_p; + +}; + +#endif diff --git a/EOverPCalibration/interface/FastCalibratorEE.h b/EOverPCalibration/interface/FastCalibratorEE.h new file mode 100644 index 00000000000..152c371fcd5 --- /dev/null +++ b/EOverPCalibration/interface/FastCalibratorEE.h @@ -0,0 +1,258 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEE_h +#define FastCalibratorEE_h + +#include +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "../../NtuplePackage/interface/readJSONFile.h" +#include "../interface/TEndcapRings.h" + +class FastCalibratorEE{ + + public : + + ///! Class methods + FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution="NULL"); + + virtual ~FastCalibratorEE(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void FillScalibMap (TString miscalibMap); + + virtual void Loop(int, int, int, int, int, bool,bool,bool,bool,float,bool,float,bool,float,bool,std::map > >, float, TString); + virtual void BuildEoPeta_ele(int,int,int,int,std::vector ,bool,bool,float,bool,float,bool,float,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal, const bool & isDeadTriggerTower = false); + + virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); + + + std::vector myMomentumScale; + std::string myTypeEE; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + + ///! Declaration of leaf types + + Int_t runNumber; + Int_t lumiBlock; + Int_t eventNumber; + Int_t isW; + Int_t isZ; + + Int_t chargeEle[2]; + Float_t etaEle[2]; + Float_t PtEle[2]; + Float_t phiEle[2]; + Float_t rawEnergySCEle[2]; + Float_t energySCEle[2]; + Float_t etaSCEle[2]; + Float_t esEnergySCEle[2]; + Float_t e3x3SCEle[2]; + Float_t pAtVtxGsfEle[2]; + Float_t fbremEle[2]; + Int_t isEBEle[2]; + Float_t energyMCEle[2]; + Float_t etaMCEle[2]; + Float_t phiMCEle[2]; + + + ///! Ele 1 variables + + std::vector *energyRecHitSCEle1; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle1; + std::vector *YRecHitSCEle1; + std::vector *ZRecHitSCEle1; + std::vector *recoFlagRecHitSCEle1; + + Int_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_pt; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Int_t ele1_isEB; + Float_t ele1_E_true; + Float_t ele1_DR; + + ///! Ele 2 variables + + std::vector *energyRecHitSCEle2; + // std::vector *ele1_recHit_hashedIndex; + std::vector *XRecHitSCEle2; + std::vector *YRecHitSCEle2; + std::vector *ZRecHitSCEle2; + std::vector *recoFlagRecHitSCEle2; + + Int_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_pt; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Int_t ele2_isEB; + Float_t ele2_E_true; + Float_t ele2_DR; + + + + + ///! List of input branches from ntu + + TBranch *b_runNumber; //! + TBranch *b_lumiBlock; //! + TBranch *b_eventNumber; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_chargeEle; + TBranch *b_etaEle; + TBranch *b_PtEle; + TBranch *b_phiEle; + TBranch *b_rawEnergySCEle; + TBranch *b_energySCEle; + TBranch *b_etaSCEle; + TBranch *b_esEnergySCEle; + TBranch *b_e3x3SCEle; + TBranch *b_pAtVtxGsfEle; + TBranch *b_fbremEle; + TBranch *b_isEBEle; + TBranch *b_energyMCEle; + TBranch *b_etaMCEle; + TBranch *b_phiMCEle; + + TBranch *b_energyRecHitSCEle1; //! + TBranch *b_XRecHitSCEle1; + TBranch *b_YRecHitSCEle1; + TBranch *b_ZRecHitSCEle1; + TBranch *b_recoFlagRecHitSCEle1; + + TBranch *b_energyRecHitSCEle2; //! + TBranch *b_XRecHitSCEle2; + TBranch *b_YRecHitSCEle2; + TBranch *b_ZRecHitSCEle2; + TBranch *b_recoFlagRecHitSCEle2; + + + /// Output informations + hChain *hC_EoP_ir_ele; + + TH1F *h_scale_hashedIndex_EE; + TH1F *h_occupancy_hashedIndex_EE; + hChain *hC_EoP; + + /// EE+ + hChain *hC_IntercalibValues_EEP; + hChain *hC_PullFromScalib_EEP; + h2Chain *hC_scale_EEP; + + + TH2F *h_occupancy_EEP; + TH2F *h_scale_EEP; + TH2F *h_scalib_EEP; + TH2F *h_scale_meanOnring_EEP; + + TGraphErrors *g_ICmeanVsLoop_EEP; + TGraphErrors *g_ICrmsVsLoop_EEP; + + std::vector IxValues_EEP; + std::vector IyValues_EEP; + std::vector ICValues_EEP; + + std::vector SumIC_Ring_EEP; + std::vector Sumxtal_Ring_EEP; + + + /// EE- + hChain *hC_IntercalibValues_EEM; + hChain *hC_PullFromScalib_EEM; + h2Chain *hC_scale_EEM; + + TH2F *h_occupancy_EEM; + TH2F *h_scale_EEM; + TH2F *h_scalib_EEM; + TH2F *h_scale_meanOnring_EEM; + + TGraphErrors *g_ICmeanVsLoop_EEM; + TGraphErrors *g_ICrmsVsLoop_EEM; + + std::vector IxValues_EEM; + std::vector IyValues_EEM; + std::vector ICValues_EEM; + + std::vector SumIC_Ring_EEM; + std::vector Sumxtal_Ring_EEM; + + /// Dead Channel infos + std::vector DeadXtal_HashedIndex; + + TH2F *h_map_Dead_Channels_EEP ; + TH2F *h_map_Dead_Channels_EEM ; + + std::map scalibMap; + + + private : + + TString outEPDistribution_p; + + /// Essential values to get EE geometry + TEndcapRings* eRings; + + static const int IX_MIN = 1; + static const int IY_MIN = 1; + static const int IX_MAX = 100; + static const int IY_MAX = 100; + static const int kEEhalf = 7324; + + static const int kxf[200]; + + static const int kdi[200]; +}; + +#endif diff --git a/EOverPCalibration/interface/FastCalibratorEE_MVA.h b/EOverPCalibration/interface/FastCalibratorEE_MVA.h new file mode 100644 index 00000000000..0642d321349 --- /dev/null +++ b/EOverPCalibration/interface/FastCalibratorEE_MVA.h @@ -0,0 +1,277 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef FastCalibratorEE_h +#define FastCalibratorEE_h + +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/TEndcapRings.h" + +class FastCalibratorEE_MVA { + public : + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + Int_t runId; + Int_t lumiId; + Int_t isW; + Int_t isZ; + + //! Declaration of regression weights + + Double_t BDTG_weightEE_W_1 ; + Double_t BDTG_weightEE_W_2 ; + Double_t BDTG_weightEE_Z_1 ; + Double_t BDTG_weightEE_Z_2 ; + + TBranch *b_BDTG_weightEE_W_1; + TBranch *b_BDTG_weightEE_W_2; + TBranch *b_BDTG_weightEE_Z_1; + TBranch *b_BDTG_weightEE_Z_2; + + ///! Ele1 Variables + + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_flag; + + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + + ///! Ele1 Variables + + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_flag; + + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + + + ///! List of input branches from ntu + + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_hashedIndex; //! + TBranch *b_ele1_recHit_flag; + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_scEta; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_scE_regression; + TBranch *b_ele1_scERaw_PUcleaned; + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; //! + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_flag; + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_scEta; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + TBranch *b_ele2_scE_regression; + TBranch *b_ele2_scERaw_PUcleaned; + + ///! Class methods + + FastCalibratorEE_MVA(TTree *tree=0, TString outEPDistribution="NULL"); + virtual ~FastCalibratorEE_MVA(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Int_t Cut(Long64_t entry); + + virtual Int_t GetEntry(Long64_t entry); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,bool,bool); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,bool,bool); + + virtual void BuildWeightDistribution_ele(int,int,int,int,std::vector,bool,bool); + + virtual Bool_t Notify(); + + virtual void Show(Long64_t entry = -1); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); + + /// Output informations + + hChain *hC_EoP_ir_ele; + + TH1F *h_scale_hashedIndex_EE; + TH1F *h_occupancy_hashedIndex_EE; + hChain *hC_EoP; + + TH1F *h_WeightEE_W_1; + TH1F *h_WeightEE_W_2; + + /// EE+ + + hChain *hC_IntercalibValues_EEP; + hChain *hC_PullFromScalib_EEP; + h2Chain *hC_scale_EEP; + + + TH2F *h_occupancy_EEP; + TH2F *h_scale_EEP; + TH2F *h_scalib_EEP; + TH2F *h_scale_meanOnring_EEP; + + TGraphErrors *g_ICmeanVsLoop_EEP; + TGraphErrors *g_ICrmsVsLoop_EEP; + + std::vector IxValues_EEP; + std::vector IyValues_EEP; + std::vector ICValues_EEP; + + std::vector SumIC_Ring_EEP; + std::vector Sumxtal_Ring_EEP; + + + /// EE- + + hChain *hC_IntercalibValues_EEM; + hChain *hC_PullFromScalib_EEM; + h2Chain *hC_scale_EEM; + + TH2F *h_occupancy_EEM; + TH2F *h_scale_EEM; + TH2F *h_scalib_EEM; + TH2F *h_scale_meanOnring_EEM; + + TGraphErrors *g_ICmeanVsLoop_EEM; + TGraphErrors *g_ICrmsVsLoop_EEM; + + std::vector IxValues_EEM; + std::vector IyValues_EEM; + std::vector ICValues_EEM; + + std::vector SumIC_Ring_EEM; + std::vector Sumxtal_Ring_EEM; + + /// Dead Channel infos + + std::vector DeadXtal_HashedIndex; + + TH2F *h_map_Dead_Channels_EEP ; + TH2F *h_map_Dead_Channels_EEM ; + + + + + + private : + + TString outEPDistribution_p; + + /// Essential values to get EE geometry + TEndcapRings* eRings; + static const int IX_MIN = 1; + static const int IY_MIN = 1; + static const int IX_MAX = 100; + static const int IY_MAX = 100; + static const int kEEhalf = 7324; + + static const int kxf[200]; + + static const int kdi[200]; +}; + +#endif diff --git a/EOverPCalibration/interface/GetHashedIndexEB.h b/EOverPCalibration/interface/GetHashedIndexEB.h new file mode 100644 index 00000000000..a27733343f7 --- /dev/null +++ b/EOverPCalibration/interface/GetHashedIndexEB.h @@ -0,0 +1,22 @@ +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + + + +int GetHashedIndexEB(int iEta, int iPhi, int Zside); + +int GetIetaFromHashedIndex(int Index); + +int GetIphiFromHashedIndex(int Index); diff --git a/EOverPCalibration/interface/GetHashedIndexEE.h b/EOverPCalibration/interface/GetHashedIndexEE.h new file mode 100644 index 00000000000..94edb63c4d4 --- /dev/null +++ b/EOverPCalibration/interface/GetHashedIndexEE.h @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +int GetHashedIndexEE(int, int, int); + +int GetIxFromHashedIndex(int); + +int GetIyFromHashedIndex(int); + +int GetZsideFromHashedIndex(int); + +// Essential values to get EE geometry +static const int IX_MIN = 1; +static const int IY_MIN = 1; +static const int IX_MAX = 100; +static const int IY_MAX = 100; +static const int kEEhalf = 7324; diff --git a/EOverPCalibration/interface/LinkDef.h b/EOverPCalibration/interface/LinkDef.h new file mode 100644 index 00000000000..93670cf4402 --- /dev/null +++ b/EOverPCalibration/interface/LinkDef.h @@ -0,0 +1,8 @@ +#ifndef ROOT_TREE_VECTOR_LINKDEFF_H +#define ROOT_TREE_VECTOR_LINKDEFF_H 1 + +#ifdef __CINT__ + +#endif + +#endif diff --git a/EOverPCalibration/interface/SIC_ixiyiz.list b/EOverPCalibration/interface/SIC_ixiyiz.list new file mode 100644 index 00000000000..871eebe25a0 --- /dev/null +++ b/EOverPCalibration/interface/SIC_ixiyiz.list @@ -0,0 +1,1546 @@ +4 36 -1 +4 37 -1 +4 38 -1 +4 39 -1 +4 40 -1 +4 61 -1 +4 62 -1 +4 63 -1 +4 64 -1 +4 65 -1 +5 36 -1 +5 37 -1 +5 38 -1 +5 39 -1 +5 40 -1 +5 61 -1 +5 62 -1 +5 63 -1 +5 64 -1 +5 65 -1 +6 26 -1 +6 27 -1 +6 28 -1 +6 29 -1 +6 30 -1 +7 27 -1 +7 28 -1 +7 29 -1 +7 30 -1 +8 26 -1 +8 27 -1 +8 28 -1 +8 29 -1 +8 30 -1 +9 21 -1 +9 22 -1 +9 23 -1 +9 24 -1 +9 25 -1 +9 26 -1 +9 27 -1 +9 28 -1 +9 29 -1 +9 30 -1 +9 76 -1 +9 77 -1 +9 78 -1 +9 79 -1 +10 21 -1 +10 22 -1 +10 23 -1 +10 24 -1 +10 25 -1 +10 26 -1 +10 27 -1 +10 28 -1 +10 29 -1 +10 30 -1 +10 76 -1 +10 77 -1 +10 78 -1 +10 79 -1 +10 80 -1 +11 21 -1 +11 22 -1 +11 23 -1 +11 24 -1 +11 25 -1 +12 21 -1 +12 22 -1 +12 23 -1 +12 24 -1 +12 25 -1 +13 21 -1 +13 22 -1 +13 23 -1 +13 24 -1 +13 25 -1 +14 16 -1 +14 17 -1 +14 18 -1 +14 19 -1 +14 20 -1 +14 21 -1 +14 22 -1 +14 23 -1 +14 24 -1 +14 25 -1 +14 81 -1 +14 82 -1 +14 83 -1 +14 84 -1 +14 85 -1 +15 16 -1 +15 17 -1 +15 18 -1 +15 19 -1 +15 20 -1 +15 21 -1 +15 22 -1 +15 23 -1 +15 24 -1 +15 25 -1 +15 81 -1 +15 82 -1 +15 83 -1 +15 84 -1 +15 85 -1 +16 14 -1 +16 15 -1 +16 51 -1 +16 52 -1 +16 53 -1 +16 54 -1 +16 55 -1 +16 56 -1 +16 57 -1 +16 58 -1 +16 59 -1 +16 60 -1 +16 61 -1 +16 62 -1 +16 63 -1 +16 64 -1 +16 65 -1 +16 66 -1 +16 67 -1 +16 68 -1 +16 69 -1 +16 70 -1 +16 86 -1 +16 87 -1 +17 14 -1 +17 15 -1 +17 51 -1 +17 52 -1 +17 53 -1 +17 54 -1 +17 55 -1 +17 56 -1 +17 57 -1 +17 58 -1 +17 59 -1 +17 60 -1 +17 61 -1 +17 62 -1 +17 63 -1 +17 64 -1 +17 65 -1 +17 66 -1 +17 67 -1 +17 68 -1 +17 69 -1 +17 70 -1 +17 86 -1 +17 87 -1 +18 14 -1 +18 15 -1 +18 51 -1 +18 52 -1 +18 53 -1 +18 54 -1 +18 55 -1 +18 56 -1 +18 57 -1 +18 58 -1 +18 59 -1 +18 60 -1 +18 61 -1 +18 62 -1 +18 63 -1 +18 64 -1 +18 65 -1 +18 86 -1 +18 87 -1 +19 14 -1 +19 15 -1 +19 51 -1 +19 52 -1 +19 53 -1 +19 54 -1 +19 55 -1 +19 56 -1 +19 57 -1 +19 58 -1 +19 59 -1 +19 60 -1 +19 61 -1 +19 62 -1 +19 63 -1 +19 64 -1 +19 65 -1 +19 66 -1 +19 67 -1 +19 68 -1 +19 69 -1 +19 70 -1 +19 86 -1 +19 87 -1 +20 14 -1 +20 15 -1 +20 51 -1 +20 52 -1 +20 53 -1 +20 54 -1 +20 55 -1 +20 56 -1 +20 57 -1 +20 58 -1 +20 59 -1 +20 60 -1 +20 61 -1 +20 62 -1 +20 63 -1 +20 64 -1 +20 65 -1 +20 66 -1 +20 67 -1 +20 68 -1 +20 69 -1 +20 70 -1 +20 86 -1 +20 87 -1 +21 10 -1 +21 51 -1 +21 52 -1 +21 53 -1 +21 54 -1 +21 55 -1 +21 56 -1 +21 57 -1 +21 58 -1 +21 59 -1 +21 60 -1 +21 61 -1 +21 62 -1 +21 63 -1 +21 64 -1 +21 65 -1 +22 9 -1 +22 10 -1 +22 51 -1 +22 52 -1 +22 53 -1 +22 54 -1 +22 55 -1 +22 56 -1 +22 57 -1 +22 58 -1 +22 59 -1 +22 60 -1 +22 61 -1 +22 62 -1 +22 63 -1 +22 64 -1 +22 65 -1 +23 9 -1 +23 10 -1 +23 51 -1 +23 52 -1 +23 53 -1 +23 54 -1 +23 55 -1 +23 56 -1 +23 57 -1 +23 58 -1 +23 59 -1 +23 60 -1 +23 61 -1 +23 62 -1 +23 63 -1 +23 64 -1 +23 65 -1 +23 66 -1 +23 67 -1 +23 68 -1 +23 69 -1 +23 70 -1 +24 9 -1 +24 10 -1 +24 51 -1 +24 52 -1 +24 53 -1 +24 54 -1 +24 55 -1 +24 56 -1 +24 57 -1 +24 58 -1 +24 59 -1 +24 60 -1 +24 61 -1 +24 62 -1 +24 63 -1 +24 64 -1 +24 65 -1 +24 66 -1 +24 67 -1 +24 68 -1 +24 69 -1 +24 70 -1 +25 9 -1 +25 10 -1 +25 51 -1 +25 52 -1 +25 53 -1 +25 54 -1 +25 55 -1 +25 56 -1 +25 57 -1 +25 58 -1 +25 59 -1 +25 60 -1 +25 61 -1 +25 62 -1 +25 63 -1 +25 64 -1 +25 65 -1 +25 66 -1 +25 67 -1 +25 68 -1 +25 69 -1 +25 70 -1 +26 7 -1 +26 8 -1 +26 9 -1 +26 10 -1 +26 71 -1 +26 72 -1 +26 73 -1 +26 74 -1 +26 75 -1 +27 6 -1 +27 7 -1 +27 8 -1 +27 9 -1 +27 10 -1 +27 71 -1 +27 72 -1 +28 6 -1 +28 7 -1 +28 8 -1 +28 9 -1 +28 10 -1 +28 71 -1 +28 72 -1 +28 73 -1 +28 74 -1 +28 75 -1 +29 6 -1 +29 7 -1 +29 8 -1 +29 9 -1 +29 10 -1 +29 71 -1 +29 72 -1 +29 73 -1 +29 74 -1 +29 75 -1 +30 6 -1 +30 7 -1 +30 8 -1 +30 9 -1 +30 10 -1 +30 71 -1 +30 72 -1 +30 73 -1 +30 74 -1 +30 75 -1 +31 46 -1 +31 47 -1 +31 48 -1 +31 49 -1 +31 50 -1 +32 46 -1 +32 47 -1 +32 48 -1 +32 49 -1 +32 50 -1 +33 46 -1 +33 47 -1 +33 48 -1 +33 49 -1 +33 50 -1 +34 46 -1 +36 36 -1 +36 37 -1 +36 38 -1 +36 39 -1 +36 40 -1 +36 61 -1 +36 62 -1 +36 63 -1 +36 64 -1 +36 65 -1 +37 36 -1 +37 37 -1 +37 38 -1 +37 39 -1 +37 62 -1 +37 63 -1 +37 64 -1 +37 65 -1 +38 36 -1 +38 37 -1 +38 38 -1 +38 63 -1 +38 64 -1 +38 65 -1 +39 36 -1 +39 37 -1 +39 64 -1 +39 65 -1 +40 36 -1 +40 65 -1 +41 36 -1 +51 1 -1 +51 3 -1 +51 4 -1 +51 5 -1 +51 31 -1 +51 32 -1 +51 33 -1 +51 69 -1 +51 70 -1 +52 1 -1 +52 2 -1 +52 3 -1 +52 4 -1 +52 5 -1 +52 31 -1 +52 32 -1 +52 33 -1 +52 69 -1 +52 70 -1 +53 1 -1 +53 2 -1 +53 3 -1 +53 4 -1 +53 5 -1 +53 31 -1 +53 32 -1 +53 33 -1 +53 68 -1 +53 69 -1 +53 70 -1 +54 1 -1 +54 2 -1 +54 3 -1 +54 4 -1 +54 5 -1 +54 31 -1 +54 32 -1 +54 33 -1 +54 68 -1 +54 69 -1 +54 70 -1 +55 1 -1 +55 2 -1 +55 3 -1 +55 4 -1 +55 5 -1 +55 31 -1 +55 32 -1 +55 33 -1 +55 34 -1 +55 68 -1 +55 69 -1 +55 70 -1 +60 36 -1 +61 4 -1 +61 5 -1 +61 36 -1 +61 65 -1 +61 96 -1 +61 97 -1 +62 4 -1 +62 5 -1 +62 36 -1 +62 37 -1 +62 64 -1 +62 65 -1 +62 96 -1 +62 97 -1 +63 4 -1 +63 5 -1 +63 36 -1 +63 37 -1 +63 38 -1 +63 64 -1 +63 65 -1 +63 96 -1 +63 97 -1 +64 4 -1 +64 5 -1 +64 36 -1 +64 37 -1 +64 38 -1 +64 39 -1 +64 63 -1 +64 64 -1 +64 65 -1 +64 96 -1 +64 97 -1 +65 4 -1 +65 5 -1 +65 36 -1 +65 37 -1 +65 38 -1 +65 39 -1 +65 40 -1 +65 61 -1 +65 62 -1 +65 63 -1 +65 64 -1 +65 65 -1 +65 96 -1 +65 97 -1 +66 91 -1 +66 92 -1 +66 93 -1 +66 94 -1 +66 95 -1 +67 91 -1 +67 92 -1 +67 93 -1 +67 94 -1 +67 95 -1 +68 46 -1 +68 47 -1 +68 48 -1 +68 49 -1 +68 53 -1 +68 54 -1 +68 55 -1 +68 91 -1 +68 92 -1 +68 93 -1 +68 94 -1 +68 95 -1 +69 46 -1 +69 47 -1 +69 48 -1 +69 49 -1 +69 50 -1 +69 51 -1 +69 52 -1 +69 53 -1 +69 54 -1 +69 55 -1 +69 91 -1 +69 92 -1 +69 93 -1 +69 94 -1 +69 95 -1 +70 46 -1 +70 47 -1 +70 48 -1 +70 49 -1 +70 50 -1 +70 51 -1 +70 52 -1 +70 53 -1 +70 54 -1 +70 55 -1 +70 91 -1 +70 92 -1 +70 93 -1 +70 94 -1 +70 95 -1 +71 6 -1 +71 7 -1 +71 8 -1 +71 9 -1 +71 10 -1 +71 91 -1 +71 92 -1 +71 93 -1 +71 94 -1 +71 95 -1 +72 6 -1 +72 7 -1 +72 8 -1 +72 9 -1 +72 10 -1 +72 91 -1 +72 92 -1 +72 93 -1 +72 94 -1 +72 95 -1 +73 6 -1 +73 7 -1 +73 8 -1 +73 9 -1 +73 10 -1 +73 91 -1 +73 92 -1 +73 93 -1 +73 94 -1 +73 95 -1 +74 6 -1 +74 7 -1 +74 8 -1 +74 9 -1 +74 10 -1 +74 91 -1 +74 92 -1 +74 93 -1 +74 94 -1 +74 95 -1 +75 6 -1 +75 7 -1 +75 8 -1 +75 9 -1 +75 10 -1 +75 91 -1 +75 92 -1 +75 93 -1 +75 94 -1 +76 9 -1 +76 10 -1 +76 11 -1 +76 12 -1 +76 13 -1 +76 14 -1 +76 15 -1 +76 91 -1 +76 92 -1 +77 9 -1 +77 10 -1 +77 11 -1 +77 12 -1 +77 13 -1 +77 14 -1 +77 15 -1 +77 91 -1 +77 92 -1 +78 9 -1 +78 10 -1 +78 11 -1 +78 12 -1 +78 13 -1 +78 14 -1 +78 15 -1 +78 91 -1 +78 92 -1 +79 9 -1 +79 10 -1 +79 11 -1 +79 12 -1 +79 13 -1 +79 14 -1 +79 15 -1 +79 91 -1 +79 92 -1 +80 9 -1 +80 10 -1 +80 11 -1 +80 12 -1 +80 13 -1 +80 14 -1 +80 15 -1 +80 91 -1 +81 14 -1 +81 15 -1 +81 86 -1 +81 87 -1 +82 14 -1 +82 15 -1 +82 86 -1 +82 87 -1 +83 14 -1 +83 15 -1 +83 86 -1 +83 87 -1 +84 14 -1 +84 15 -1 +84 86 -1 +84 87 -1 +85 14 -1 +85 15 -1 +85 86 -1 +86 16 -1 +86 17 -1 +86 18 -1 +86 19 -1 +86 20 -1 +86 21 -1 +86 22 -1 +86 23 -1 +86 24 -1 +86 25 -1 +86 81 -1 +86 82 -1 +86 83 -1 +86 84 -1 +86 85 -1 +87 17 -1 +87 18 -1 +87 19 -1 +87 20 -1 +87 21 -1 +87 22 -1 +87 23 -1 +87 24 -1 +87 25 -1 +87 81 -1 +87 82 -1 +87 83 -1 +87 84 -1 +87 85 -1 +88 21 -1 +88 22 -1 +88 23 -1 +88 24 -1 +88 25 -1 +89 21 -1 +89 22 -1 +89 23 -1 +89 24 -1 +89 25 -1 +90 21 -1 +90 22 -1 +90 23 -1 +90 24 -1 +90 25 -1 +91 21 -1 +91 22 -1 +91 23 -1 +91 24 -1 +91 25 -1 +91 26 -1 +91 27 -1 +91 28 -1 +91 29 -1 +91 30 -1 +91 66 -1 +91 67 -1 +91 68 -1 +91 69 -1 +91 70 -1 +91 71 -1 +91 72 -1 +91 73 -1 +91 74 -1 +91 75 -1 +91 76 -1 +91 77 -1 +91 78 -1 +91 79 -1 +91 80 -1 +92 22 -1 +92 23 -1 +92 24 -1 +92 25 -1 +92 26 -1 +92 27 -1 +92 28 -1 +92 29 -1 +92 30 -1 +92 66 -1 +92 67 -1 +92 68 -1 +92 69 -1 +92 70 -1 +92 71 -1 +92 72 -1 +92 73 -1 +92 74 -1 +92 75 -1 +92 76 -1 +92 77 -1 +92 78 -1 +92 79 -1 +93 26 -1 +93 27 -1 +93 28 -1 +93 29 -1 +93 30 -1 +93 66 -1 +93 67 -1 +93 68 -1 +93 69 -1 +93 70 -1 +93 71 -1 +93 72 -1 +93 73 -1 +93 74 -1 +93 75 -1 +94 27 -1 +94 28 -1 +94 29 -1 +94 30 -1 +94 66 -1 +94 67 -1 +94 68 -1 +94 69 -1 +94 70 -1 +94 71 -1 +94 72 -1 +94 73 -1 +94 74 -1 +95 27 -1 +95 28 -1 +95 29 -1 +95 30 -1 +95 66 -1 +95 67 -1 +95 68 -1 +95 69 -1 +95 70 -1 +95 71 -1 +95 72 -1 +95 73 -1 +95 74 -1 +96 36 -1 +96 37 -1 +96 38 -1 +96 39 -1 +96 40 -1 +96 41 -1 +96 42 -1 +96 43 -1 +96 44 -1 +96 45 -1 +96 56 -1 +96 57 -1 +96 58 -1 +96 59 -1 +96 60 -1 +96 61 -1 +96 62 -1 +96 63 -1 +96 64 -1 +96 65 -1 +97 36 -1 +97 37 -1 +97 38 -1 +97 39 -1 +97 40 -1 +97 41 -1 +97 42 -1 +97 43 -1 +97 44 -1 +97 45 -1 +97 56 -1 +97 57 -1 +97 58 -1 +97 59 -1 +97 60 -1 +97 61 -1 +97 62 -1 +97 63 -1 +97 64 -1 +97 65 -1 +98 41 -1 +98 42 -1 +98 43 -1 +98 44 -1 +98 45 -1 +98 56 -1 +98 57 -1 +98 58 -1 +98 59 -1 +98 60 -1 +99 41 -1 +99 42 -1 +99 43 -1 +99 44 -1 +99 45 -1 +99 54 -1 +99 57 -1 +99 58 -1 +99 59 -1 +99 60 -1 +100 41 -1 +100 42 -1 +100 43 -1 +100 44 -1 +100 45 -1 +100 56 -1 +100 57 -1 +100 58 -1 +100 59 -1 +100 60 -1 +4 37 1 +4 38 1 +4 39 1 +4 40 1 +4 61 1 +4 62 1 +4 63 1 +4 64 1 +4 65 1 +5 36 1 +5 37 1 +5 38 1 +5 39 1 +5 40 1 +5 61 1 +5 62 1 +5 63 1 +5 64 1 +5 65 1 +6 28 1 +6 29 1 +6 30 1 +6 71 1 +6 72 1 +6 74 1 +7 26 1 +7 27 1 +7 28 1 +7 29 1 +7 30 1 +7 71 1 +7 72 1 +7 73 1 +7 74 1 +7 75 1 +8 26 1 +8 27 1 +8 28 1 +8 29 1 +8 30 1 +8 71 1 +8 72 1 +8 73 1 +8 74 1 +8 75 1 +9 22 1 +9 23 1 +9 24 1 +9 25 1 +9 26 1 +9 27 1 +9 28 1 +9 29 1 +9 30 1 +9 71 1 +9 72 1 +9 73 1 +9 74 1 +9 75 1 +10 26 1 +10 27 1 +10 28 1 +10 29 1 +10 30 1 +10 73 1 +10 74 1 +10 75 1 +14 17 1 +14 18 1 +14 19 1 +14 20 1 +14 81 1 +14 82 1 +14 83 1 +14 84 1 +15 81 1 +15 82 1 +15 83 1 +15 84 1 +15 85 1 +16 81 1 +16 82 1 +16 83 1 +16 84 1 +16 85 1 +16 86 1 +16 87 1 +17 81 1 +17 82 1 +17 83 1 +17 84 1 +17 85 1 +17 86 1 +17 87 1 +18 81 1 +18 82 1 +18 83 1 +18 84 1 +18 85 1 +18 86 1 +18 87 1 +19 81 1 +19 82 1 +19 83 1 +19 84 1 +19 85 1 +19 86 1 +19 87 1 +20 81 1 +20 82 1 +20 83 1 +20 84 1 +20 85 1 +20 86 1 +20 87 1 +21 91 1 +22 91 1 +22 92 1 +23 91 1 +23 92 1 +24 91 1 +24 92 1 +25 91 1 +25 92 1 +26 7 1 +26 8 1 +26 9 1 +26 10 1 +26 91 1 +26 92 1 +26 93 1 +26 94 1 +27 6 1 +27 7 1 +27 8 1 +27 9 1 +27 10 1 +27 91 1 +27 92 1 +27 93 1 +27 94 1 +27 95 1 +28 6 1 +28 7 1 +28 8 1 +28 9 1 +28 10 1 +28 91 1 +28 92 1 +28 93 1 +28 94 1 +28 95 1 +29 6 1 +29 7 1 +29 8 1 +29 9 1 +29 10 1 +29 91 1 +29 92 1 +29 93 1 +29 94 1 +29 95 1 +30 6 1 +30 7 1 +30 8 1 +30 9 1 +30 10 1 +30 91 1 +30 92 1 +30 94 1 +30 95 1 +31 46 1 +31 47 1 +31 48 1 +31 49 1 +31 50 1 +31 51 1 +31 52 1 +31 53 1 +31 54 1 +31 55 1 +32 46 1 +32 47 1 +32 48 1 +32 49 1 +32 50 1 +32 51 1 +32 52 1 +32 53 1 +32 54 1 +32 55 1 +33 46 1 +33 47 1 +33 53 1 +33 54 1 +33 55 1 +36 36 1 +36 37 1 +36 38 1 +36 39 1 +36 40 1 +36 61 1 +36 62 1 +36 63 1 +36 64 1 +36 65 1 +36 96 1 +37 36 1 +37 37 1 +37 38 1 +37 39 1 +37 62 1 +37 63 1 +37 64 1 +37 65 1 +37 96 1 +37 97 1 +38 36 1 +38 37 1 +38 38 1 +38 63 1 +38 64 1 +38 65 1 +38 96 1 +38 97 1 +39 36 1 +39 37 1 +39 64 1 +39 65 1 +39 96 1 +39 97 1 +40 36 1 +40 65 1 +40 96 1 +40 97 1 +46 31 1 +46 32 1 +46 33 1 +46 68 1 +46 69 1 +46 70 1 +47 31 1 +47 32 1 +47 33 1 +47 68 1 +47 69 1 +47 70 1 +48 31 1 +48 32 1 +48 33 1 +48 68 1 +48 69 1 +48 70 1 +49 31 1 +49 32 1 +49 33 1 +49 69 1 +49 70 1 +50 31 1 +50 32 1 +50 33 1 +50 69 1 +50 70 1 +51 31 1 +51 32 1 +51 33 1 +51 69 1 +51 70 1 +51 96 1 +51 97 1 +51 98 1 +51 99 1 +51 100 1 +52 31 1 +52 32 1 +52 33 1 +52 69 1 +52 70 1 +52 96 1 +52 97 1 +52 98 1 +52 99 1 +52 100 1 +53 31 1 +53 32 1 +53 33 1 +53 68 1 +53 69 1 +53 70 1 +53 96 1 +53 97 1 +53 98 1 +53 99 1 +53 100 1 +54 31 1 +54 32 1 +54 33 1 +54 68 1 +54 69 1 +54 70 1 +54 96 1 +54 97 1 +54 98 1 +54 99 1 +54 100 1 +55 31 1 +55 32 1 +55 33 1 +55 34 1 +55 68 1 +55 69 1 +55 70 1 +55 96 1 +55 97 1 +55 98 1 +55 99 1 +55 100 1 +60 36 1 +61 4 1 +61 5 1 +61 36 1 +61 65 1 +61 96 1 +61 97 1 +62 4 1 +62 5 1 +62 36 1 +62 37 1 +62 64 1 +62 65 1 +62 96 1 +62 97 1 +63 4 1 +63 5 1 +63 36 1 +63 37 1 +63 38 1 +63 63 1 +63 64 1 +63 65 1 +63 96 1 +63 97 1 +64 4 1 +64 5 1 +64 36 1 +64 37 1 +64 38 1 +64 39 1 +64 62 1 +64 63 1 +64 64 1 +64 65 1 +64 96 1 +65 4 1 +65 5 1 +65 36 1 +65 37 1 +65 38 1 +65 39 1 +65 40 1 +65 61 1 +65 62 1 +65 63 1 +65 64 1 +65 65 1 +65 96 1 +66 91 1 +66 92 1 +66 93 1 +66 94 1 +66 95 1 +67 46 1 +67 91 1 +67 92 1 +67 93 1 +67 94 1 +67 95 1 +68 46 1 +68 47 1 +68 48 1 +68 49 1 +68 50 1 +68 51 1 +68 52 1 +68 53 1 +68 54 1 +68 55 1 +68 91 1 +68 92 1 +68 93 1 +68 94 1 +68 95 1 +69 46 1 +69 47 1 +69 48 1 +69 49 1 +69 50 1 +69 51 1 +69 52 1 +69 53 1 +69 54 1 +69 55 1 +69 91 1 +69 92 1 +69 93 1 +69 94 1 +69 95 1 +70 46 1 +70 47 1 +70 48 1 +70 49 1 +70 50 1 +70 51 1 +70 52 1 +70 53 1 +70 54 1 +70 55 1 +70 91 1 +70 92 1 +70 93 1 +70 94 1 +70 95 1 +71 6 1 +71 7 1 +71 8 1 +71 9 1 +71 10 1 +71 91 1 +71 92 1 +71 93 1 +71 94 1 +71 95 1 +72 6 1 +72 7 1 +72 8 1 +72 9 1 +72 10 1 +72 91 1 +72 92 1 +72 93 1 +72 94 1 +72 95 1 +73 7 1 +73 8 1 +73 9 1 +73 10 1 +73 91 1 +73 92 1 +73 93 1 +73 94 1 +73 95 1 +74 6 1 +74 7 1 +74 8 1 +74 9 1 +74 10 1 +74 91 1 +74 92 1 +74 93 1 +74 94 1 +74 95 1 +75 7 1 +75 8 1 +75 9 1 +75 10 1 +75 91 1 +75 92 1 +75 93 1 +75 94 1 +75 95 1 +76 9 1 +76 10 1 +76 91 1 +76 92 1 +77 9 1 +77 10 1 +77 91 1 +77 92 1 +78 9 1 +78 10 1 +78 91 1 +78 92 1 +79 9 1 +79 10 1 +79 91 1 +79 92 1 +80 10 1 +80 91 1 +81 14 1 +81 15 1 +81 16 1 +81 17 1 +81 18 1 +81 19 1 +81 20 1 +81 81 1 +81 82 1 +81 83 1 +81 84 1 +81 85 1 +81 86 1 +81 87 1 +82 14 1 +82 15 1 +82 16 1 +82 17 1 +82 18 1 +82 19 1 +82 20 1 +82 81 1 +82 82 1 +82 83 1 +82 84 1 +82 85 1 +82 86 1 +82 87 1 +83 14 1 +83 15 1 +83 16 1 +83 17 1 +83 18 1 +83 19 1 +83 20 1 +83 81 1 +83 82 1 +83 83 1 +83 84 1 +83 85 1 +83 86 1 +83 87 1 +84 14 1 +84 15 1 +84 16 1 +84 17 1 +84 18 1 +84 19 1 +84 20 1 +84 81 1 +84 82 1 +84 83 1 +84 84 1 +84 85 1 +84 86 1 +84 87 1 +85 14 1 +85 15 1 +85 16 1 +85 17 1 +85 18 1 +85 19 1 +85 20 1 +85 81 1 +85 82 1 +85 83 1 +85 84 1 +85 85 1 +85 86 1 +85 87 1 +86 81 1 +86 82 1 +86 83 1 +86 84 1 +86 85 1 +87 81 1 +87 82 1 +87 83 1 +87 84 1 +91 26 1 +91 27 1 +91 28 1 +91 29 1 +91 30 1 +91 32 1 +91 33 1 +91 34 1 +91 35 1 +91 66 1 +91 67 1 +91 68 1 +91 69 1 +91 70 1 +91 71 1 +91 72 1 +91 73 1 +91 74 1 +91 75 1 +92 26 1 +92 27 1 +92 28 1 +92 29 1 +92 30 1 +92 31 1 +92 32 1 +92 33 1 +92 34 1 +92 35 1 +92 68 1 +92 69 1 +92 70 1 +92 71 1 +92 72 1 +92 73 1 +92 74 1 +92 75 1 +93 26 1 +93 27 1 +93 28 1 +93 29 1 +93 30 1 +93 31 1 +93 32 1 +93 33 1 +93 34 1 +93 35 1 +93 66 1 +93 67 1 +93 68 1 +93 69 1 +93 70 1 +93 71 1 +93 72 1 +93 73 1 +93 74 1 +93 75 1 +94 26 1 +94 27 1 +94 28 1 +94 29 1 +94 30 1 +94 31 1 +94 32 1 +94 33 1 +94 34 1 +94 35 1 +94 66 1 +94 67 1 +94 68 1 +94 69 1 +94 70 1 +94 71 1 +94 72 1 +94 73 1 +94 74 1 +94 75 1 +95 28 1 +95 29 1 +95 30 1 +95 31 1 +95 32 1 +95 33 1 +95 34 1 +95 35 1 +95 66 1 +95 67 1 +95 68 1 +95 69 1 +95 70 1 +95 71 1 +95 72 1 +95 73 1 +95 74 1 +96 38 1 diff --git a/EOverPCalibration/interface/TEndcapRings.h b/EOverPCalibration/interface/TEndcapRings.h new file mode 100644 index 00000000000..1c3915d8fb8 --- /dev/null +++ b/EOverPCalibration/interface/TEndcapRings.h @@ -0,0 +1,49 @@ +#ifndef TEndcapRings_h +#define TEndcapRings_h + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TCanvas.h" +#include "TGraphErrors.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TTree.h" +#include "TVirtualFitter.h" +#include "TFitResultPtr.h" +#include "TFitResult.h" +#include "TChain.h" +#include "TMath.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class TEndcapRings +{ + private: + int iEndcapRing[101][101][2]; + + public: + + // ctor + TEndcapRings(); + + // dtor + ~TEndcapRings(); + + int GetEndcapRing(int,int,int); + int GetEndcapIeta(int,int,int); + int GetEndcapIphi(int,int,int); + // ClassDef(TEndcapRings,1); //ring class +}; + +#endif diff --git a/EOverPCalibration/interface/TSicCrystals.h b/EOverPCalibration/interface/TSicCrystals.h new file mode 100644 index 00000000000..a37e7a26fe2 --- /dev/null +++ b/EOverPCalibration/interface/TSicCrystals.h @@ -0,0 +1,41 @@ +#ifndef TSicCrystals_h +#define TSicCrystals_h + +#include "TROOT.h" +#include "TStyle.h" +#include "TFile.h" +#include "TF1.h" +#include "TH1.h" +#include "TH2.h" +#include "TCanvas.h" +#include "TGraphAsymmErrors.h" +#include "TMultiGraph.h" +#include "TPaveStats.h" +#include "TLegend.h" +#include "TTree.h" +#include "TVirtualFitter.h" +#include "TStyle.h" +#include "TApplication.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/// SIC Crystals MAP /// +class TSicCrystals { + private: + int sicMap[100][100][3]; + public: + TSicCrystals(); + virtual ~TSicCrystals(); + int isSic(Int_t,Int_t,Int_t); +}; + +#endif diff --git a/EOverPCalibration/interface/XtalAlphaEB.h b/EOverPCalibration/interface/XtalAlphaEB.h new file mode 100644 index 00000000000..3a2f5b3dcef --- /dev/null +++ b/EOverPCalibration/interface/XtalAlphaEB.h @@ -0,0 +1,251 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef XtalAlphaEB_h +#define XtalAlphaEB_h + +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "../../NtuplePackage/interface/readJSONFile.h" + +class XtalAlphaEB { + + public : + + std::vector myMomentumScale; + std::string myTypeEB; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + ///! Declaration of leaf types + + Int_t runId; + Int_t lumiId; + Int_t eventId; + Int_t isW; + Int_t isZ; + + ///! Ele 1 variables + + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_flag; + std::vector *ele1_recHit_LaserCorr; + std::vector *ele1_recHit_Alpha; + + Float_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + Float_t ele1_seedLaserAlpha; + Float_t ele1_seedLaserCorr; + + ///! Ele 2 variables + + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_flag; + std::vector *ele2_recHit_LaserCorr; + std::vector *ele2_recHit_Alpha; + + Float_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + Float_t ele2_seedLaserAlpha; + Float_t ele2_seedLaserCorr; + + ///! List of input branches from ntu + + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_eventId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_hashedIndex; + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_flag; + TBranch *b_ele1_recHit_LaserCorr; + TBranch *b_ele1_recHit_Alpha; + + TBranch *b_ele1_scERaw_PUcleaned; + TBranch *b_ele1_scE_regression; + + TBranch *b_ele1_eta; //! + TBranch *b_ele1_phi; //! + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_seedLaserAlpha; + TBranch *b_ele1_seedLaserCorr; + TBranch *b_ele1_charge; + + + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_flag; + TBranch *b_ele2_recHit_LaserCorr; + TBranch *b_ele2_recHit_Alpha; + + TBranch *b_ele2_eta; //! + TBranch *b_ele2_phi; //! + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + + TBranch *b_ele2_scERaw_PUcleaned; + TBranch *b_ele2_scE_regression; + + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + TBranch *b_ele2_seedLaserAlpha; + TBranch *b_ele2_seedLaserCorr; + TBranch *b_ele2_charge; + + ///! List of class methods + + XtalAlphaEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution="NULL"); + + virtual ~XtalAlphaEB(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Init(TTree *tree); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,std::map > >); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iEta, const int & iPhi); + + ///! Output information + + std::vector IetaValues; + std::vector IphiValues; + std::vector AlphaValues; + std::vector meanAlphaforPhiRingValues; + std::vector DeadXtal_HashedIndex; + + + hChain *hC_EoP_eta_ele; + hChain *hC_AlphaValues; + hChain *hC_EoP; + hChain *hC_AlphaSpreadVsLoop; + + h2Chain *hC_Alpha_EB; + + TH1F *h_Occupancy_hashedIndex; + TH2F *h_occupancy; + TProfile *p_AlphaValues_iEta; + TH2F *h_Alpha_scalib_EB; + TH2F *h_Alpha_EB; + TH2F *h_Alpha_EB_meanOnPhi; + TH1F *h_Alpha_EB_hashedIndex; + TH1F *h_AlphaSpread_iEta; + TH2F *h_Intial_AlphaValues; + + TH2F *h_map_Dead_Channels ; + + TGraphErrors *g_AlphameanVsLoop; + TGraphErrors *g_AlpharmsVsLoop; + TGraphErrors *g_AlphaSigmaVsLoop; + + private: + + TString outEPDistribution_p; + +}; + +#endif diff --git a/EOverPCalibration/interface/XtalAlphaEE.h b/EOverPCalibration/interface/XtalAlphaEE.h new file mode 100644 index 00000000000..a9b51998cb8 --- /dev/null +++ b/EOverPCalibration/interface/XtalAlphaEE.h @@ -0,0 +1,298 @@ +////////////////////////////////////////////////////////// +// This class has been automatically generated on +// Sat Jul 2 02:30:39 2011 by ROOT version 5.27/06b +// from TTree ntu/ntu +// found on file: /data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root +////////////////////////////////////////////////////////// + +#ifndef XtalAlphaEE_h +#define XtalAlphaEE_h + +#include +#include +#include +#include +#include +#include +#include "../../NtuplePackage/interface/hChain.h" +#include "../../NtuplePackage/interface/h2Chain.h" +#include + +#include +#include "Math/PtEtaPhiE4D.h" +#include "Math/PtEtaPhiM4D.h" +#include "Math/LorentzVector.h" + +#include "../interface/CalibrationUtils.h" +#include "../../NtuplePackage/interface/readJSONFile.h" +#include "../interface/TEndcapRings.h" +#include "../interface/TSicCrystals.h" + +class XtalAlphaEE{ + + public : + + std::vector myMomentumScale; + std::string myTypeEE; + + TTree *fChain; //!pointer to the analyzed TTree or TChain + Int_t fCurrent; //!current Tree number in a TChain + + + ///! Declaration of leaf types + Int_t runId; + Int_t lumiId; + Int_t eventId; + Int_t isW; + Int_t isZ; + + ///! Ele1 Variables + std::vector *ele1_recHit_E; + std::vector *ele1_recHit_hashedIndex; + std::vector *ele1_recHit_ietaORix; + std::vector *ele1_recHit_iphiORiy; + std::vector *ele1_recHit_laserCorr; + std::vector *ele1_recHit_Alpha; + + Float_t ele1_charge; + Float_t ele1_eta; + Float_t ele1_phi; + Float_t ele1_scERaw; + Float_t ele1_scE; + Float_t ele1_scEta; + Float_t ele1_es; + Float_t ele1_e3x3; + Float_t ele1_tkP; + Float_t ele1_fbrem; + Float_t ele1_EOverP; + Int_t ele1_isEB; + Int_t ele1_isEBEEGap; + Int_t ele1_isEBEtaGap; + Int_t ele1_isEBPhiGap; + Int_t ele1_isEEDeeGap; + Int_t ele1_isEERingGap; + Float_t ele1_E_true; + Float_t ele1_DR; + Float_t ele1_scE_regression; + Float_t ele1_scERaw_PUcleaned; + Float_t ele1_seedLaserAlpha; + Float_t ele1_seedLaserCorr; + + ///! Ele Variables + std::vector *ele2_recHit_E; + std::vector *ele2_recHit_hashedIndex; + std::vector *ele2_recHit_iphiORiy; + std::vector *ele2_recHit_ietaORix; + std::vector *ele2_recHit_laserCorr; + std::vector *ele2_recHit_Alpha; + + Float_t ele2_charge; + Float_t ele2_eta; + Float_t ele2_phi; + Float_t ele2_scERaw; + Float_t ele2_scE; + Float_t ele2_scEta; + Float_t ele2_es; + Float_t ele2_e3x3; + Float_t ele2_tkP; + Float_t ele2_fbrem; + Float_t ele2_EOverP; + Int_t ele2_isEB; + Int_t ele2_isEBEEGap; + Int_t ele2_isEBEtaGap; + Int_t ele2_isEBPhiGap; + Int_t ele2_isEEDeeGap; + Int_t ele2_isEERingGap; + Float_t ele2_E_true; + Float_t ele2_DR; + Float_t ele2_scE_regression; + Float_t ele2_scERaw_PUcleaned; + Float_t ele2_seedLaserAlpha; + Float_t ele2_seedLaserCorr; + + + ///! List of input branches from ntu + TBranch *b_runId; //! + TBranch *b_lumiId; //! + TBranch *b_eventId; //! + TBranch *b_isW; //! + TBranch *b_isZ; //! + TBranch *b_ele1_recHit_E; //! + TBranch *b_ele1_recHit_iphiORiy; + TBranch *b_ele1_recHit_ietaORix; + TBranch *b_ele1_recHit_hashedIndex; //! + TBranch *b_ele1_recHit_laserCorr; //! + TBranch *b_ele1_recHit_Alpha; + + TBranch *b_ele1_charge; //! + TBranch *b_ele1_eta; //! + TBranch *b_ele1_phi; //! + TBranch *b_ele1_scERaw; //! + TBranch *b_ele1_scE; //! + TBranch *b_ele1_scEta; //! + TBranch *b_ele1_es; //! + TBranch *b_ele1_E_true; //! + TBranch *b_ele1_DR; //! + TBranch *b_ele1_e3x3; //! + TBranch *b_ele1_tkP; //! + TBranch *b_ele1_fbrem; //! + TBranch *b_ele1_EOverP; //! + TBranch *b_ele1_isEB; //! + TBranch *b_ele1_scE_regression; + TBranch *b_ele1_scERaw_PUcleaned; + + TBranch *b_ele1_seedLaserAlpha; + TBranch *b_ele1_seedLaserCorr; + + TBranch *b_ele1_isEBEEGap; //! + TBranch *b_ele1_isEBEtaGap; //! + TBranch *b_ele1_isEBPhiGap; //! + TBranch *b_ele1_isEEDeeGap; //! + TBranch *b_ele1_isEERingGap; //! + + TBranch *b_ele2_recHit_E; //! + TBranch *b_ele2_recHit_hashedIndex; //! + TBranch *b_ele2_recHit_iphiORiy; + TBranch *b_ele2_recHit_ietaORix; //! + TBranch *b_ele2_recHit_laserCorr; //! + TBranch *b_ele2_recHit_Alpha; + + TBranch *b_ele2_charge; //! + TBranch *b_ele2_eta; //! + TBranch *b_ele2_phi; //! + TBranch *b_ele2_scERaw; //! + TBranch *b_ele2_scE; //! + TBranch *b_ele2_scEta; //! + TBranch *b_ele2_es; //! + TBranch *b_ele2_E_true; //! + TBranch *b_ele2_DR; //! + TBranch *b_ele2_e3x3; //! + TBranch *b_ele2_tkP; //! + TBranch *b_ele2_fbrem; //! + TBranch *b_ele2_EOverP; //! + TBranch *b_ele2_isEB; //! + TBranch *b_ele2_isEBEEGap; //! + TBranch *b_ele2_isEBEtaGap; //! + TBranch *b_ele2_isEBPhiGap; //! + TBranch *b_ele2_isEEDeeGap; //! + TBranch *b_ele2_isEERingGap; //! + TBranch *b_ele2_scE_regression; + TBranch *b_ele2_scERaw_PUcleaned; + + TBranch *b_ele2_seedLaserAlpha; + TBranch *b_ele2_seedLaserCorr; + + ///! Class methods + XtalAlphaEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution="NULL"); + + virtual ~XtalAlphaEE(); + + virtual void bookHistos(int); + + virtual void saveHistos(TFile *f1); + + virtual void Init(TTree *tree); + + virtual Long64_t LoadTree(Long64_t entry); + + virtual void Loop(int, int, int, int, int,bool,bool,bool,bool,float,bool,bool,std::map > >); + + virtual void BuildEoPeta_ele(int,int,int,int,std::vector,bool,bool,float,bool,bool); + + virtual void saveEoPeta(TFile * f2); + + virtual void AcquireDeadXtal(TString imputDeadXtal); + + virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); + + /// Output informations + TH1F *h_occupancy_hashedIndex_EE; + TH1F *h_Alpha_hashedIndex_EE; + + hChain *hC_EoP_ir_ele; + hChain *hC_EoP; + + /// EE+ + hChain *hC_AlphaValues_BTCP_EEP; + h2Chain *hC_Alpha_BTCP_EEP; + hChain *hC_AlphaSpreadVsLoop_BTCP_EEP; + + hChain *hC_AlphaValues_SIC_EEP; + h2Chain *hC_Alpha_SIC_EEP; + hChain *hC_AlphaSpreadVsLoop_SIC_EEP; + + TProfile *p_AlphaVsIeta_BTCP_EEP; + TH1F *AlphaSpreadVsIeta_BTCP_EEP; + TProfile *p_AlphaVsIeta_SIC_EEP; + TH1F *AlphaSpreadVsIeta_SIC_EEP; + + TH2F *h_occupancy_EEP; + + TH2F *h_Alpha_EEP; + TH2F *h_scalib_EEP; + TH2F *h_Alpha_Original_EEP; + + + TGraphErrors *g_AlphameanVsLoop_BTCP_EEP; + TGraphErrors *g_AlpharmsVsLoop_BTCP_EEP; + TGraphErrors *g_AlphaSigmaVsLoop_BTCP_EEP; + TGraphErrors *g_AlphameanVsLoop_SIC_EEP; + TGraphErrors *g_AlpharmsVsLoop_SIC_EEP; + TGraphErrors *g_AlphaSigmaVsLoop_SIC_EEP; + + /// EE- + hChain *hC_AlphaValues_BTCP_EEM; + h2Chain *hC_Alpha_BTCP_EEM; + hChain *hC_AlphaSpreadVsLoop_BTCP_EEM; + + hChain *hC_AlphaValues_SIC_EEM; + h2Chain *hC_Alpha_SIC_EEM; + hChain *hC_AlphaSpreadVsLoop_SIC_EEM; + + TProfile *p_AlphaVsIeta_BTCP_EEM; + TH1F *AlphaSpreadVsIeta_BTCP_EEM; + TProfile *p_AlphaVsIeta_SIC_EEM; + TH1F *AlphaSpreadVsIeta_SIC_EEM; + + TH2F *h_occupancy_EEM; + + TH2F *h_Alpha_EEM; + TH2F *h_scalib_EEM; + TH2F *h_Alpha_Original_EEM; + + + TGraphErrors *g_AlphameanVsLoop_BTCP_EEM; + TGraphErrors *g_AlpharmsVsLoop_BTCP_EEM; + TGraphErrors *g_AlphaSigmaVsLoop_BTCP_EEM; + TGraphErrors *g_AlphameanVsLoop_SIC_EEM; + TGraphErrors *g_AlpharmsVsLoop_SIC_EEM; + TGraphErrors *g_AlphaSigmaVsLoop_SIC_EEM; + + + /// Dead Channel infos + std::vector DeadXtal_HashedIndex; + + TH2F *h_map_Dead_Channels_EEP ; + TH2F *h_map_Dead_Channels_EEM ; + + + private : + + TString outEPDistribution_p; + + /// Essential values to get EE geometry + TEndcapRings* eRings; + TSicCrystals* SicCrystal; + + static const int IX_MIN = 1; + static const int IY_MIN = 1; + static const int IX_MAX = 100; + static const int IY_MAX = 100; + static const int kEEhalf = 7324; + + static const int kxf[200]; + + static const int kdi[200]; +}; + +#endif diff --git a/EOverPCalibration/interface/Zutils.h b/EOverPCalibration/interface/Zutils.h new file mode 100644 index 00000000000..9e613b31009 --- /dev/null +++ b/EOverPCalibration/interface/Zutils.h @@ -0,0 +1,60 @@ +#ifndef ntupleUtils_h +#define ntupleUtils_h + +#include +#include +#include +#include + + +#include "TFile.h" +#include "TChain.h" +#include "TCanvas.h" +#include "TPaveStats.h" +#include "TH1F.h" +#include "TF1.h" +#include "TRandom3.h" +#include "TMath.h" + + +#ifdef _MAKECINT_ +#pragma link C++ class map+; +#pragma link C++ class map+; +#pragma link C++ class map+; +#endif + + + +/*** breit-wigner ***/ +double breitWigner(double* x, double* par); + +/*** crystall ball with low tail ***/ +double crystalBallLow(double* x, double* par); + +/*** double crystall ball ***/ +double crystalBallLowHigh(double* x, double* par); + +/*** breit-wigner convoluted with crystalBall ***/ + +double breitWigner_crystalBallLow(double* x, double* par,const int nPoints); + + +std::pair breitWigner_crystalBallLowFWHM(TF1* bwcb, const double &min, const double &max, const double &Precision = 0.001, const int & maxCycle=100000); + +void MoveInterval(TF1* bwcb,const double & xCenter,std::pair & Interval, const double & MAX); + + +/*** Method for binned and ubinned lineshape fit ***/ + +void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, TH1F* h_mZ_MC, + int nPoints, const double &min,const double &max, std::string energyType = "Reg"); + +void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, + int nPoints, const double &min,const double &max, std::string energyType ="Reg"); + + +void SetParameterFunctionEE_EE(TF1* bw_cb, TRandom3 * rand); +void SetParameterFunctionEB_EE(TF1* bw_cb, TRandom3 * rand); +void SetParameterFunctionEB_EB(TF1* bw_cb, TRandom3 * rand); + +#endif diff --git a/EOverPCalibration/interface/geometryUtils.h b/EOverPCalibration/interface/geometryUtils.h new file mode 100644 index 00000000000..19e22de771b --- /dev/null +++ b/EOverPCalibration/interface/geometryUtils.h @@ -0,0 +1,56 @@ +#ifndef geometryUtils_h +#define geometryUtils_h + +//ECAL GEOMETRY + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "TSicCrystals.h" + +/// EE Geometry /// +class TEndcapRegions { + private: + int iEndcapRing[100][100][3]; + int iLMR[100][100][2]; + public: + TEndcapRegions(); + virtual ~TEndcapRegions(); + int GetNRegions(const std::string& , const int ); + int GetRegionId(const int,const int,const int,const std::string&); + int GetEndcapRing(const int,const int,const int,const int); + int GetEndcapIeta(const int,const int,const int, const std::string&, const int); + +}; + +/// EB Geometry +class TBarrelRegions { + + private: + std::map LmrEtaMap; + int iBarrelRings[171][360]; + int iLMR[171][360]; + int iTT[171][360]; + int iSM[171][360]; + + public: + TBarrelRegions(); + virtual ~TBarrelRegions(); + int GetNRegions(const std::string& type); + int GetNRegionsIeta(const std::string& type); + int GetRegionId(const int,const int,const std::string&); + int GetRegionIdIeta(const int& regionId, const std::string& type); + + +}; + + + +#endif diff --git a/EOverPCalibration/interface/setTDRStyle.h b/EOverPCalibration/interface/setTDRStyle.h new file mode 100644 index 00000000000..706f02026e1 --- /dev/null +++ b/EOverPCalibration/interface/setTDRStyle.h @@ -0,0 +1,14 @@ +#ifndef setTDRStyle_h +#define setTDRStyle_h + +#include "TStyle.h" +#include "TColor.h" +#include "TROOT.h" + + + +void setTDRStyle(); + +int getColor(const int& i); + +#endif diff --git a/EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt b/EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt new file mode 100644 index 00000000000..12c3db78ac7 --- /dev/null +++ b/EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2.txt @@ -0,0 +1 @@ +{"190645": [[10, 110]], "190646": [[1, 111]], "190659": [[33, 167]], "190679": [[1, 55]], "190688": [[69, 249]], "190702": [[51, 53], [55, 122], [124, 169]], "190703": [[1, 252]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190706": [[1, 126]], "190707": [[1, 237], [239, 257]], "190708": [[1, 189]], "190733": [[71, 96], [99, 389], [392, 460]], "190736": [[1, 80], [83, 185]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 55], [58, 65]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 223], [225, 363]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193192": [[58, 86]], "193193": [[1, 6], [8, 8], [11, 83], [86, 120], [122, 160], [162, 274], [276, 495], [497, 506]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]]} \ No newline at end of file diff --git a/EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt b/EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt new file mode 100644 index 00000000000..7f74ddd0a9c --- /dev/null +++ b/EOverPCalibration/json/Cert_190456-196531_8TeV_13Jul2012ReReco_Collisions12_JSON_v2__Cert_196532-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt @@ -0,0 +1,374 @@ +{"190645": [[10, 110]], + "190646": [[1, 111]], + "190659": [[33, 167]], + "190679": [[1, 55]], + "190688": [[69, 249]], + "190702": [[51, 53], [55, 122], [124, 169]], + "190703": [[1, 252]], + "190704": [[1, 3]], + "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], + "190706": [[1, 126]], + "190707": [[1, 237], [239, 257]], + "190708": [[1, 189]], + "190733": [[71, 96], [99, 389], [392, 460]], + "190736": [[1, 80], [83, 185]], + "190738": [[1, 130], [133, 226], [229, 355]], + "191043": [[45, 47]], + "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], + "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], + "191057": [[1, 1], [4, 55], [58, 65]], + "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], + "191090": [[1, 55]], + "191201": [[38, 49], [52, 79]], + "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], + "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], + "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], + "191248": [[1, 103]], + "191264": [[59, 79], [82, 152], [155, 189]], + "191271": [[56, 223], [225, 363]], + "191276": [[1, 16]], + "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], + "191367": [[1, 2]], + "191411": [[1, 23]], + "191695": [[1, 1]], + "191718": [[43, 95], [98, 207]], + "191720": [[1, 1], [3, 15], [17, 181]], + "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], + "191726": [[1, 13]], + "191810": [[15, 15], [22, 49], [52, 92]], + "191830": [[54, 242], [245, 301], [304, 393]], + "191833": [[1, 1], [3, 103]], + "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], + "191837": [[1, 44], [47, 53], [56, 65]], + "191856": [[1, 133]], + "191859": [[1, 28], [31, 126]], + "193093": [[1, 33]], + "193123": [[1, 27]], + "193124": [[1, 52]], + "193192": [[58, 86]], + "193193": [[1, 6], [8, 8], [11, 83], [86, 120], [122, 160], [162, 274], [276, 495], [497, 506]], + "193207": [[54, 182]], + "193334": [[29, 172]], + "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], + "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], + "193556": [[41, 83]], + "193557": [[1, 84]], + "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], + "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], + "193834": [[1, 35]], + "193835": [[1, 20], [22, 26]], + "193836": [[1, 2]], + "193998": [[66, 113], [115, 278]], + "193999": [[1, 50]], + "194027": [[53, 115]], + "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], + "194051": [[1, 12]], + "194052": [[1, 99], [102, 166]], + "194075": [[48, 101], [103, 111]], + "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], + "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], + "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], + "194117": [[1, 38]], + "194119": [[1, 229], [232, 261]], + "194120": [[1, 162], [165, 406]], + "194150": [[42, 127], [129, 261], [264, 311]], + "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], + "194153": [[1, 119]], + "194199": [[92, 227], [229, 336], [339, 402]], + "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], + "194223": [[61, 112]], + "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], + "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], + "194270": [[56, 73]], + "194303": [[56, 66], [69, 102]], + "194304": [[1, 43], [46, 46]], + "194305": [[1, 86]], + "194314": [[52, 130], [133, 301]], + "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], + "194317": [[1, 33]], + "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], + "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], + "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], + "194439": [[46, 77], [79, 106]], + "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], + "194464": [[1, 127], [130, 142], [145, 210]], + "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], + "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], + "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], + "194619": [[31, 110]], + "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], + "194643": [[1, 287]], + "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], + "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], + "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], + "194702": [[1, 138], [141, 191]], + "194704": [[1, 41], [44, 545], [548, 592]], + "194711": [[1, 7], [9, 619]], + "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], + "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], + "194778": [[60, 118], [120, 219]], + "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], + "194790": [[1, 45]], + "194825": [[72, 117], [120, 221]], + "194896": [[34, 55], [58, 79], [82, 103]], + "194897": [[1, 6], [8, 78], [80, 107]], + "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], + "194914": [[1, 38]], + "194915": [[1, 74]], + "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], + "195014": [[1, 6], [9, 119], [121, 148]], + "195015": [[1, 13]], + "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], + "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], + "195109": [[98, 241]], + "195112": [[1, 12], [15, 26]], + "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], + "195114": [[1, 69], [72, 103]], + "195115": [[1, 7], [10, 36]], + "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], + "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], + "195164": [[1, 64]], + "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], + "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], + "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], + "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], + "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], + "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], + "195396": [[49, 55], [58, 63], [66, 131]], + "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], + "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], + "195399": [[1, 192], [194, 382], [384, 394]], + "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], + "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], + "195551": [[91, 106]], + "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], + "195633": [[40, 42]], + "195647": [[1, 41]], + "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], + "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], + "195656": [[1, 362]], + "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], + "195749": [[1, 8], [10, 33], [36, 131]], + "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], + "195758": [[1, 18]], + "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], + "195775": [[1, 57], [60, 100], [103, 170]], + "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], + "195841": [[74, 90]], + "195868": [[1, 88], [90, 107], [110, 205]], + "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], + "195916": [[1, 16], [19, 68], [71, 212]], + "195917": [[1, 4]], + "195918": [[1, 44], [46, 46], [49, 64]], + "195919": [[1, 15]], + "195923": [[1, 14]], + "195925": [[1, 12]], + "195926": [[1, 1], [3, 19], [21, 34]], + "195929": [[1, 29]], + "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], + "195937": [[1, 28], [31, 186], [188, 400]], + "195947": [[23, 62], [64, 88]], + "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], + "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], + "195963": [[54, 61]], + "195970": [[44, 49], [51, 85]], + "196019": [[54, 68]], + "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], + "196046": [[12, 40]], + "196047": [[1, 64], [70, 75]], + "196048": [[1, 44], [46, 48], [51, 52]], + "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], + "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], + "196200": [[1, 68]], + "196202": [[3, 61], [64, 108]], + "196203": [[1, 102], [107, 135]], + "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], + "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], + "196249": [[63, 77], [80, 99]], + "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], + "196252": [[1, 38]], + "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], + "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], + "196357": [[1, 4]], + "196359": [[1, 2]], + "196362": [[1, 88]], + "196363": [[1, 8], [11, 34]], + "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], + "196437": [[1, 1], [3, 74], [77, 169]], + "196438": [[1, 181], [184, 699], [701, 1269]], + "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], + "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], + "196495": [[114, 180], [182, 272]], + "196509": [[1, 68]], + "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], + "198049": [[1, 11], [14, 57]], + "198050": [[2, 155]], + "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], + "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], + "198207": [[1, 97]], + "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], + "198210": [[1, 221]], + "198212": [[1, 574]], + "198213": [[1, 107]], + "198215": [[1, 12]], + "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], + "198249": [[1, 7]], + "198269": [[3, 199], [201, 201], [203, 203]], + "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], + "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], + "198346": [[44, 57]], + "198372": [[57, 114]], + "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], + "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], + "198522": [[65, 144], [147, 208]], + "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], + "198954": [[108, 156], [159, 277]], + "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], + "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], + "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], + "199011": [[1, 11], [13, 27]], + "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], + "199318": [[65, 138]], + "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], + "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], + "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], + "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], + "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], + "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], + "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], + "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], + "199564": [[1, 3]], + "199569": [[1, 2], [5, 136], [139, 367]], + "199570": [[1, 17]], + "199571": [[1, 184], [186, 360], [363, 561]], + "199572": [[1, 317]], + "199573": [[1, 22]], + "199574": [[1, 53], [56, 153], [156, 246]], + "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], + "199698": [[72, 94], [96, 127]], + "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], + "199703": [[1, 94], [97, 482], [485, 539]], + "199739": [[66, 174]], + "199745": [[137, 143]], + "199751": [[103, 119], [121, 127]], + "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], + "199753": [[1, 59]], + "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], + "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], + "199812": [[70, 141], [144, 163], [187, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], + "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], + "199862": [[59, 142]], + "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], + "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], + "199868": [[1, 26]], + "199875": [[70, 150], [152, 334]], + "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], + "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], + "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], + "199961": [[1, 211], [213, 292]], + "199973": [[73, 96]], + "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], + "200042": [[1, 110], [112, 536]], + "200049": [[1, 177]], + "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], + "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], + "200152": [[74, 152]], + "200180": [[1, 18]], + "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], + "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], + "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 531], [534, 624], [627, 629]], + "200243": [[69, 103], [106, 139]], + "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], + "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], + "200368": [[72, 180]], + "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], + "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], + "200466": [[134, 274]], + "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], + "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], + "200515": [[97, 183]], + "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], + "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], + "200532": [[1, 59]], + "200599": [[75, 129], [132, 137]], + "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], + "200990": [[75, 143]], + "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], + "200992": [[1, 405], [408, 434], [436, 581]], + "201062": [[78, 270]], + "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], + "201114": [[1, 14]], + "201115": [[1, 75]], + "201159": [[70, 211]], + "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], + "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], + "201173": [[1, 194], [197, 586]], + "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], + "201193": [[1, 19]], + "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], + "201197": [[1, 23]], + "201202": [[1, 437]], + "201229": [[1, 5], [8, 26], [29, 77]], + "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], + "201554": [[70, 86], [88, 114], [116, 127]], + "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], + "201611": [[87, 145], [149, 182], [184, 186]], + "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], + "201624": [[83, 92], [95, 240], [270, 270]], + "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], + "201657": [[77, 93], [95, 108], [110, 118]], + "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], + "201668": [[78, 157]], + "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], + "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], + "201678": [[1, 120]], + "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], + "201692": [[78, 81], [83, 180]], + "201705": [[65, 73], [75, 109], [111, 187]], + "201706": [[1, 62]], + "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], + "201708": [[1, 87]], + "201718": [[58, 113]], + "201727": [[67, 185]], + "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], + "201794": [[58, 100]], + "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], + "201816": [[1, 72], [74, 105], [107, 157]], + "201817": [[1, 274]], + "201818": [[1, 1]], + "201819": [[1, 94], [96, 241]], + "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], + "202012": [[98, 121], [126, 131]], + "202013": [[1, 2], [5, 35], [38, 57]], + "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], + "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], + "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], + "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], + "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], + "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], + "202074": [[66, 174]], + "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], + "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], + "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], + "202088": [[1, 286]], + "202093": [[1, 104], [107, 320], [322, 360]], + "202116": [[59, 64]], + "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], + "202205": [[94, 114]], + "202209": [[1, 48], [51, 159]], + "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], + "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], + "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], + "202305": [[1, 89], [92, 130], [133, 323]], + "202314": [[67, 104], [107, 265], [268, 284]], + "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], + "202333": [[1, 251]], + "202389": [[81, 182], [185, 190], [192, 203]], + "202469": [[87, 158], [160, 174], [177, 352]], + "202472": [[1, 96], [99, 112]], + "202477": [[1, 129], [131, 150]], + "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], + "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], + "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], + "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 909], [913, 1408]], + "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]]} diff --git a/EOverPCalibration/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt b/EOverPCalibration/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt new file mode 100644 index 00000000000..aece012650f --- /dev/null +++ b/EOverPCalibration/json/Cert_190456-203002_8TeV_PromptReco_Collisions12_JSON_v2.txt @@ -0,0 +1 @@ +{"190645": [[10, 110]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 55], [58, 65]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 158]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 8], [17, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1391], [1394, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 737], [739, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 497], [503, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], "198049": [[1, 11], [14, 57]], "198050": [[2, 155]], "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], "198207": [[1, 97]], "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], "198210": [[1, 221]], "198212": [[1, 574]], "198213": [[1, 107]], "198215": [[1, 12]], "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], "198249": [[1, 7]], "198269": [[3, 199], [201, 201], [203, 203]], "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], "198346": [[44, 57]], "198372": [[57, 114]], "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], "198522": [[65, 144], [147, 208]], "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], "198954": [[108, 156], [159, 277]], "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], "199011": [[1, 11], [13, 27]], "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], "199318": [[65, 138]], "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], "199564": [[1, 3]], "199569": [[1, 2], [5, 136], [139, 367]], "199570": [[1, 17]], "199571": [[1, 184], [186, 360], [363, 561]], "199572": [[1, 317]], "199573": [[1, 22]], "199574": [[1, 53], [56, 153], [156, 246]], "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], "199698": [[72, 94], [96, 127]], "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], "199703": [[1, 94], [97, 482], [485, 539]], "199739": [[66, 174]], "199745": [[137, 143]], "199751": [[103, 119], [121, 127]], "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], "199753": [[1, 59]], "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], "199812": [[70, 141], [144, 163], [187, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], "199862": [[59, 142]], "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], "199868": [[1, 26]], "199875": [[70, 150], [152, 334]], "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], "199961": [[1, 211], [213, 292]], "199973": [[73, 96]], "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], "200042": [[1, 110], [112, 536]], "200049": [[1, 177]], "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], "200152": [[74, 152]], "200180": [[1, 18]], "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 531], [534, 624], [627, 629]], "200243": [[69, 103], [106, 139]], "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], "200368": [[72, 180]], "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], "200466": [[134, 274]], "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], "200515": [[97, 183]], "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], "200532": [[1, 59]], "200599": [[75, 129], [132, 137]], "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], "200990": [[75, 143]], "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], "200992": [[1, 405], [408, 434], [436, 581]], "201062": [[78, 270]], "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], "201114": [[1, 14]], "201115": [[1, 75]], "201159": [[70, 211]], "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], "201173": [[1, 194], [197, 586]], "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], "201193": [[1, 19]], "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], "201197": [[1, 23]], "201202": [[1, 437]], "201229": [[1, 5], [8, 26], [29, 77]], "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], "201554": [[70, 86], [88, 114], [116, 127]], "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], "201611": [[87, 145], [149, 182], [184, 186]], "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], "201624": [[83, 92], [95, 240], [270, 270]], "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], "201657": [[77, 93], [95, 108], [110, 118]], "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], "201668": [[78, 157]], "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], "201678": [[1, 120]], "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], "201692": [[78, 81], [83, 180]], "201705": [[65, 73], [75, 109], [111, 187]], "201706": [[1, 62]], "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], "201708": [[1, 87]], "201718": [[58, 113]], "201727": [[67, 185]], "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], "201794": [[58, 100]], "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], "201816": [[1, 72], [74, 105], [107, 157]], "201817": [[1, 274]], "201818": [[1, 1]], "201819": [[1, 94], [96, 241]], "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], "202012": [[98, 121], [126, 131]], "202013": [[1, 2], [5, 35], [38, 57]], "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], "202074": [[66, 174]], "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], "202088": [[1, 286]], "202093": [[1, 104], [107, 320], [322, 360]], "202116": [[59, 64]], "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], "202205": [[94, 114]], "202209": [[1, 48], [51, 159]], "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], "202305": [[1, 89], [92, 130], [133, 323]], "202314": [[67, 104], [107, 265], [268, 284]], "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], "202333": [[1, 251]], "202389": [[81, 182], [185, 190], [192, 203]], "202469": [[87, 158], [160, 174], [177, 352]], "202472": [[1, 96], [99, 112]], "202477": [[1, 129], [131, 150]], "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 909], [913, 1408]], "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]]} \ No newline at end of file diff --git a/EOverPCalibration/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt b/EOverPCalibration/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt new file mode 100644 index 00000000000..a6bb7018583 --- /dev/null +++ b/EOverPCalibration/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt @@ -0,0 +1 @@ +{"190645": [[10, 110]], "190704": [[1, 3]], "190705": [[1, 5], [7, 65], [81, 336], [338, 350], [353, 383]], "190738": [[1, 130], [133, 226], [229, 355]], "191043": [[45, 47]], "191046": [[1, 21], [24, 82], [84, 88], [92, 116], [119, 180], [183, 183], [185, 239]], "191056": [[1, 1], [4, 9], [16, 17], [19, 19]], "191057": [[1, 1], [4, 40]], "191062": [[1, 1], [3, 3], [5, 214], [216, 549]], "191090": [[1, 55]], "191201": [[38, 49], [52, 79]], "191202": [[1, 64], [66, 68], [87, 105], [108, 118]], "191226": [[77, 78], [81, 831], [833, 1454], [1456, 1466], [1469, 1507], [1510, 1686]], "191247": [[1, 153], [156, 280], [283, 606], [608, 620], [622, 818], [821, 834], [837, 1031], [1034, 1046], [1049, 1140], [1143, 1187], [1190, 1214], [1217, 1224]], "191248": [[1, 103]], "191264": [[59, 79], [82, 152], [155, 189]], "191271": [[56, 158]], "191276": [[1, 16]], "191277": [[1, 28], [30, 164], [167, 253], [255, 457], [460, 535], [537, 576], [579, 775], [778, 811], [813, 849]], "191367": [[1, 2]], "191411": [[1, 23]], "191695": [[1, 1]], "191718": [[43, 95], [98, 207]], "191720": [[1, 1], [3, 15], [17, 181]], "191721": [[1, 1], [3, 34], [36, 183], [186, 189]], "191726": [[1, 13]], "191810": [[15, 15], [22, 49], [52, 92]], "191830": [[54, 242], [245, 301], [304, 393]], "191833": [[1, 1], [3, 103]], "191834": [[1, 30], [33, 74], [77, 299], [302, 352]], "191837": [[1, 44], [47, 53], [56, 65]], "191856": [[1, 133]], "191859": [[1, 28], [31, 126]], "193093": [[1, 33]], "193123": [[1, 27]], "193124": [[1, 52]], "193207": [[54, 182]], "193334": [[29, 172]], "193336": [[1, 264], [267, 492], [495, 684], [687, 729], [732, 951]], "193541": [[77, 101], [103, 413], [416, 575], [578, 619]], "193556": [[41, 83]], "193557": [[1, 84]], "193575": [[48, 173], [176, 349], [351, 394], [397, 415], [417, 658], [660, 752]], "193621": [[60, 570], [573, 769], [772, 976], [979, 1053], [1056, 1137], [1139, 1193], [1195, 1371], [1373, 1654]], "193834": [[1, 35]], "193835": [[1, 20], [22, 26]], "193836": [[1, 2]], "193998": [[66, 113], [115, 278]], "193999": [[1, 50]], "194027": [[53, 115]], "194050": [[53, 113], [116, 273], [275, 355], [357, 369], [372, 391], [394, 490], [492, 814], [816, 1435], [1437, 1735], [1760, 1888]], "194051": [[1, 12]], "194052": [[1, 99], [102, 166]], "194075": [[48, 101], [103, 111]], "194076": [[1, 9], [11, 55], [58, 163], [165, 228], [230, 264], [267, 507], [509, 527], [530, 538], [541, 562], [565, 748]], "194108": [[81, 161], [164, 264], [266, 373], [376, 396], [398, 433], [436, 452], [454, 577], [579, 590], [593, 668], [671, 875]], "194115": [[66, 184], [186, 338], [340, 346], [348, 493], [496, 731], [819, 857]], "194117": [[1, 38]], "194119": [[1, 229], [232, 261]], "194120": [[1, 162], [165, 406]], "194150": [[42, 127], [129, 261], [264, 311]], "194151": [[47, 72], [75, 191], [193, 238], [240, 619], [621, 624], [627, 627]], "194153": [[1, 119]], "194199": [[92, 227], [229, 336], [339, 402]], "194210": [[3, 195], [198, 217], [220, 359], [361, 555]], "194223": [[61, 112]], "194224": [[1, 126], [129, 206], [208, 250], [253, 309], [312, 386], [389, 412]], "194225": [[1, 23], [26, 47], [49, 85], [88, 156], [177, 178]], "194270": [[56, 73]], "194303": [[56, 66], [69, 102]], "194304": [[1, 43], [46, 46]], "194305": [[1, 86]], "194314": [[52, 130], [133, 301]], "194315": [[1, 10], [13, 314], [317, 428], [431, 452], [455, 467]], "194317": [[1, 33]], "194424": [[63, 141], [144, 195], [198, 266], [268, 421], [424, 478], [481, 531], [534, 553], [556, 708]], "194428": [[1, 85], [87, 122], [125, 294], [296, 465]], "194429": [[1, 4], [7, 54], [57, 147], [150, 411], [413, 742], [745, 986], [988, 1023]], "194439": [[46, 77], [79, 106]], "194455": [[45, 64], [67, 140], [142, 255], [293, 303]], "194464": [[1, 127], [130, 142], [145, 210]], "194479": [[1, 44], [165, 232], [235, 262], [265, 374], [377, 431], [434, 489], [492, 529], [531, 566]], "194480": [[1, 32], [34, 205], [207, 375], [377, 387], [389, 759], [762, 956], [959, 1402]], "194533": [[46, 379], [382, 415], [417, 618], [620, 872]], "194619": [[31, 110]], "194631": [[1, 42], [44, 100], [102, 169], [171, 222]], "194643": [[1, 287]], "194644": [[1, 168], [171, 181], [184, 185], [187, 319], [321, 424]], "194691": [[61, 104], [107, 155], [158, 251], [254, 268], [271, 272], [275, 289], [292, 313]], "194699": [[1, 30], [32, 52], [55, 64], [67, 71], [73, 154], [157, 215], [218, 238], [241, 259]], "194702": [[1, 138], [141, 191]], "194704": [[1, 41], [44, 545], [548, 592]], "194711": [[1, 7], [9, 619]], "194712": [[1, 56], [61, 418], [420, 625], [627, 759]], "194735": [[44, 71], [74, 101], [104, 130], [133, 136]], "194778": [[60, 118], [120, 219]], "194789": [[1, 18], [21, 32], [34, 80], [82, 166], [168, 269], [272, 405], [409, 414], [417, 427], [430, 566]], "194790": [[1, 45]], "194825": [[72, 117], [120, 221]], "194896": [[34, 55], [58, 79], [82, 103]], "194897": [[1, 6], [8, 78], [80, 107]], "194912": [[53, 70], [72, 96], [98, 444], [446, 450], [453, 467], [470, 561], [564, 660], [663, 813], [815, 840], [843, 864], [866, 1004], [1007, 1025], [1027, 1067], [1069, 1137], [1140, 1166], [1168, 1249], [1251, 1304], [1307, 1444], [1447, 1487], [1489, 1503], [1506, 1662]], "194914": [[1, 38]], "194915": [[1, 74]], "195013": [[94, 144], [146, 185], [187, 206], [208, 299], [302, 324], [326, 366], [369, 447], [450, 526], [528, 541]], "195014": [[1, 6], [9, 119], [121, 148]], "195015": [[1, 13]], "195016": [[1, 21], [23, 55], [58, 63], [65, 174], [177, 184], [186, 241], [243, 246], [248, 251], [254, 367], [370, 422], [425, 560], [563, 569]], "195099": [[70, 144], [147, 186], [189, 208], [211, 224], [227, 265]], "195109": [[98, 241]], "195112": [[1, 12], [15, 26]], "195113": [[1, 209], [212, 388], [391, 403], [406, 419], [422, 492], [495, 579]], "195114": [[1, 69], [72, 103]], "195115": [[1, 7], [10, 36]], "195147": [[132, 282], [285, 294], [297, 331], [334, 363], [366, 442], [445, 536], [539, 562]], "195163": [[72, 138], [140, 224], [227, 240], [243, 243], [246, 347]], "195164": [[1, 64]], "195165": [[1, 4], [7, 41], [44, 54], [56, 153], [156, 260], [263, 277]], "195251": [[1, 131], [134, 137], [140, 152], [154, 165], [167, 249]], "195303": [[109, 191], [194, 277], [280, 310], [312, 316], [318, 409]], "195304": [[1, 3], [6, 22], [27, 80], [83, 100], [103, 154], [157, 341], [344, 588], [590, 727], [729, 1003], [1006, 1079], [1083, 1140], [1143, 1229]], "195378": [[90, 117], [120, 127], [130, 185], [187, 204], [206, 302], [305, 542], [544, 565], [567, 645], [647, 701], [703, 734], [737, 1120], [1122, 1133]], "195390": [[1, 1], [4, 27], [30, 145], [147, 183], [186, 187], [190, 208], [210, 213], [215, 410]], "195396": [[49, 55], [58, 63], [66, 131]], "195397": [[1, 10], [12, 89], [92, 120], [123, 141], [143, 251], [253, 253], [256, 475], [478, 525], [527, 608], [611, 776], [779, 970], [972, 1121], [1123, 1181], [1184, 1198], [1200, 1209]], "195398": [[3, 137], [139, 494], [497, 585], [587, 817], [820, 824], [827, 1225], [1228, 1307], [1309, 1712], [1721, 1736], [1741, 1752], [1767, 1795]], "195399": [[1, 192], [194, 382], [384, 394]], "195530": [[1, 80], [82, 104], [107, 156], [159, 300], [302, 405]], "195540": [[68, 123], [126, 137], [140, 283], [286, 323]], "195551": [[91, 106]], "195552": [[1, 21], [23, 27], [30, 147], [149, 155], [158, 182], [185, 287], [290, 349], [352, 469], [472, 815], [818, 823], [825, 883], [885, 1152], [1154, 1300], [1303, 1789]], "195633": [[40, 42]], "195647": [[1, 41]], "195649": [[1, 69], [72, 151], [154, 181], [183, 247]], "195655": [[1, 129], [131, 184], [186, 260], [263, 350], [353, 446], [448, 483], [485, 498]], "195656": [[1, 362]], "195658": [[1, 37], [40, 362], [364, 382], [384, 386]], "195749": [[1, 8], [10, 33], [36, 131]], "195757": [[1, 82], [85, 115], [118, 161], [163, 206]], "195758": [[1, 18]], "195774": [[1, 13], [16, 137], [139, 151], [154, 162], [164, 256], [258, 276], [279, 362], [365, 466], [469, 618], [620, 649], [651, 830]], "195775": [[1, 57], [60, 100], [103, 170]], "195776": [[1, 63], [66, 283], [286, 337], [340, 399], [401, 409], [411, 477]], "195841": [[74, 90]], "195868": [[1, 88], [90, 107], [110, 205]], "195915": [[1, 109], [111, 275], [278, 390], [393, 417], [419, 429], [432, 505], [507, 747], [749, 785], [787, 828], [830, 850]], "195916": [[1, 16], [19, 68], [71, 212]], "195917": [[1, 4]], "195918": [[1, 44], [46, 46], [49, 64]], "195919": [[1, 15]], "195923": [[1, 14]], "195925": [[1, 12]], "195926": [[1, 1], [3, 19], [21, 34]], "195929": [[1, 29]], "195930": [[1, 77], [80, 176], [179, 526], [529, 596]], "195937": [[1, 28], [31, 186], [188, 400]], "195947": [[23, 62], [64, 88]], "195948": [[51, 116], [119, 144], [147, 147], [150, 352], [355, 369], [372, 402], [404, 500], [503, 540], [543, 565], [567, 602], [605, 615]], "195950": [[1, 71], [73, 138], [141, 169], [172, 332], [335, 350], [353, 382], [385, 421], [424, 450], [453, 483], [485, 616], [619, 715], [718, 787], [789, 800], [803, 829], [831, 831], [833, 1587]], "195963": [[54, 61]], "195970": [[44, 49], [51, 85]], "196019": [[54, 68]], "196027": [[1, 55], [58, 119], [121, 155], [158, 190]], "196046": [[12, 40]], "196047": [[1, 64], [70, 75]], "196048": [[1, 44], [46, 48], [51, 52]], "196197": [[58, 122], [125, 179], [181, 311], [313, 516], [519, 562]], "196199": [[1, 33], [36, 83], [86, 118], [121, 147], [150, 237], [239, 285], [287, 534]], "196200": [[1, 68]], "196202": [[3, 61], [64, 108]], "196203": [[1, 102], [107, 135]], "196218": [[55, 199], [201, 224], [226, 393], [396, 494], [496, 741], [744, 752], [754, 757], [759, 820]], "196239": [[1, 59], [62, 154], [157, 272], [274, 373], [375, 432], [435, 465], [468, 647], [650, 706], [709, 1025]], "196249": [[63, 77], [80, 99]], "196250": [[1, 2], [5, 265], [267, 426], [430, 430]], "196252": [[1, 38]], "196334": [[59, 111], [113, 123], [126, 132], [135, 167], [170, 193], [196, 257], [259, 267], [270, 289], [292, 348]], "196349": [[65, 84], [86, 154], [157, 244], [246, 258]], "196357": [[1, 4]], "196359": [[1, 2]], "196362": [[1, 88]], "196363": [[1, 8], [11, 34]], "196364": [[1, 93], [96, 136], [139, 365], [368, 380], [382, 601], [603, 795], [798, 884], [887, 1196], [1199, 1200], [1203, 1302]], "196437": [[1, 1], [3, 74], [77, 169]], "196438": [[1, 181], [184, 699], [701, 1269]], "196452": [[82, 112], [114, 490], [493, 586], [589, 618], [622, 668], [671, 716], [718, 726], [728, 956], [958, 1004], [1007, 1091]], "196453": [[1, 74], [77, 145], [147, 669], [673, 714], [717, 799], [802, 988], [991, 1178], [1180, 1180], [1182, 1248], [1250, 1528], [1531, 1647]], "196495": [[114, 180], [182, 272]], "196509": [[1, 68]], "196531": [[62, 150], [152, 253], [256, 285], [288, 302], [305, 422], [425, 440]], "198049": [[1, 11], [14, 57]], "198050": [[2, 155]], "198063": [[1, 37], [40, 72], [74, 124], [127, 294]], "198116": [[36, 52], [54, 55], [58, 96], [98, 112]], "198207": [[1, 97]], "198208": [[1, 92], [94, 134], [137, 147], [150, 209]], "198210": [[1, 221]], "198212": [[1, 574]], "198213": [[1, 107]], "198215": [[1, 12]], "198230": [[1, 33], [36, 57], [60, 235], [237, 324], [326, 388], [390, 459], [462, 625], [627, 651], [653, 805], [808, 811], [814, 948], [950, 1090], [1093, 1103], [1106, 1332], [1335, 1380]], "198249": [[1, 7]], "198269": [[3, 199], [201, 201], [203, 203]], "198271": [[1, 91], [93, 170], [173, 299], [301, 450], [453, 513], [516, 616], [619, 628], [631, 791], [793, 797]], "198272": [[1, 185], [188, 245], [248, 314], [317, 433], [436, 444], [454, 625]], "198346": [[44, 57]], "198372": [[57, 114]], "198485": [[68, 109], [112, 134], [136, 181], [184, 239]], "198487": [[1, 145], [147, 514], [517, 668], [671, 733], [736, 757], [760, 852], [854, 994], [997, 1434], [1437, 1612]], "198522": [[65, 144], [147, 208]], "198941": [[102, 189], [191, 220], [222, 241], [243, 249], [252, 291]], "198954": [[108, 156], [159, 277]], "198955": [[1, 45], [47, 50], [53, 220], [223, 269], [271, 284], [286, 338], [340, 580], [583, 742], [744, 910], [913, 946], [949, 1162], [1165, 1169], [1172, 1182], [1185, 1188], [1190, 1246], [1249, 1304], [1306, 1467], [1470, 1485], [1487, 1552]], "198969": [[58, 81], [84, 247], [249, 323], [325, 365], [367, 413], [416, 466], [468, 643], [646, 918], [920, 1011], [1013, 1175], [1178, 1236], [1239, 1277]], "199008": [[75, 93], [95, 121], [124, 208], [211, 331], [333, 373], [376, 482], [485, 605], [608, 644]], "199011": [[1, 11], [13, 27]], "199021": [[59, 88], [91, 128], [130, 133], [136, 309], [311, 333], [335, 410], [414, 469], [471, 533], [535, 563], [565, 1223], [1226, 1479], [1481, 1494]], "199318": [[65, 138]], "199319": [[1, 7], [9, 223], [226, 277], [280, 348], [351, 358], [360, 422], [424, 490], [492, 493], [496, 612], [615, 642], [645, 720], [723, 728], [730, 731], [734, 741], [744, 943], [945, 997]], "199336": [[1, 33], [36, 122], [125, 231], [234, 614], [617, 789], [791, 977]], "199356": [[95, 121], [123, 168], [171, 205], [208, 233]], "199409": [[25, 54], [56, 89], [91, 204], [206, 290], [293, 583], [586, 602], [604, 1014], [1016, 1300]], "199428": [[61, 197], [200, 210], [212, 382], [387, 414], [417, 436], [439, 530], [533, 648]], "199429": [[1, 28], [30, 36], [39, 55], [58, 101], [103, 148], [151, 156]], "199435": [[63, 106], [109, 261], [263, 579], [582, 654], [656, 696], [699, 1034], [1037, 1144], [1147, 1327], [1330, 1411], [1414, 1431], [1434, 1441], [1444, 1487], [1489, 1610]], "199436": [[1, 113], [116, 254], [257, 675], [678, 748]], "199564": [[1, 3]], "199569": [[1, 2], [5, 136], [139, 367]], "199570": [[1, 17]], "199571": [[1, 184], [186, 360], [363, 561]], "199572": [[1, 317]], "199573": [[1, 22]], "199574": [[1, 53], [56, 153], [156, 246]], "199608": [[60, 157], [159, 209], [211, 341], [344, 390], [392, 461], [464, 800], [802, 1064], [1067, 1392], [1395, 1630], [1633, 1904], [1907, 1962], [1965, 2252], [2255, 2422]], "199698": [[72, 94], [96, 127]], "199699": [[1, 154], [157, 169], [172, 410], [412, 756]], "199703": [[1, 94], [97, 482], [485, 539]], "199739": [[66, 174]], "199745": [[137, 143]], "199751": [[103, 119], [121, 127]], "199752": [[1, 141], [144, 180], [182, 186], [188, 211], [214, 322]], "199753": [[1, 59]], "199754": [[1, 203], [205, 325], [328, 457], [459, 607], [610, 613], [615, 806], [808, 998]], "199804": [[78, 88], [90, 181], [183, 235], [238, 278], [281, 290], [292, 519], [522, 575], [577, 628], [631, 638]], "199812": [[70, 141], [144, 163], [182, 211], [214, 471], [474, 505], [508, 557], [560, 571], [574, 623], [626, 751], [754, 802]], "199833": [[1, 13], [16, 103], [105, 250], [253, 493], [496, 794], [797, 1032], [1034, 1185], [1188, 1239]], "199862": [[59, 142]], "199864": [[1, 87], [89, 89], [92, 103], [106, 372], [374, 385], [388, 486]], "199867": [[1, 134], [136, 172], [174, 218], [221, 320]], "199868": [[1, 26]], "199875": [[70, 150], [152, 334]], "199876": [[1, 19], [22, 95], [97, 249], [252, 272], [274, 340], [343, 362], [365, 376]], "199877": [[1, 173], [175, 605], [607, 701], [703, 873]], "199960": [[72, 139], [141, 197], [204, 232], [235, 363], [365, 367], [370, 380], [383, 459], [461, 466], [469, 485]], "199961": [[1, 211], [213, 292]], "199973": [[73, 96]], "200041": [[62, 83], [85, 157], [162, 274], [277, 318], [321, 335], [337, 386], [388, 389], [392, 400], [402, 568], [571, 593], [595, 646], [649, 728], [731, 860], [862, 930], [932, 1096]], "200042": [[1, 110], [112, 536]], "200049": [[1, 177]], "200075": [[76, 139], [142, 232], [256, 326], [329, 422], [425, 431], [434, 500], [502, 605]], "200091": [[67, 67], [70, 151], [154, 172], [174, 187], [190, 196], [199, 201], [204, 425], [428, 535], [537, 607], [610, 879], [881, 943], [946, 999], [1001, 1025], [1027, 1132], [1135, 1339], [1341, 1433], [1435, 1450], [1453, 1523], [1526, 1664], [1667, 1680], [1683, 1710]], "200152": [[74, 152]], "200180": [[1, 18]], "200188": [[1, 24], [27, 28], [31, 76], [79, 271], [274, 352]], "200190": [[1, 4], [6, 76], [79, 143], [146, 159], [162, 256], [258, 321], [324, 401], [403, 453], [456, 457], [460, 565], [567, 588], [591, 591], [593, 595], [597, 646], [649, 880]], "200229": [[1, 33], [41, 219], [222, 244], [247, 290], [293, 624], [627, 629]], "200243": [[69, 103], [106, 139]], "200244": [[3, 304], [307, 442], [445, 507], [510, 619]], "200245": [[1, 103], [105, 128], [131, 248], [251, 357]], "200368": [[72, 180]], "200369": [[1, 5], [8, 61], [64, 360], [363, 439], [441, 578], [580, 603], [606, 684], [686, 686]], "200381": [[8, 15], [18, 36], [38, 89], [91, 198]], "200466": [[134, 274]], "200473": [[96, 157], [159, 224], [226, 304], [306, 469], [472, 524], [527, 542], [545, 619], [622, 688], [691, 730], [733, 738], [740, 1324]], "200491": [[87, 107], [110, 149], [152, 157], [160, 197], [199, 237], [240, 270], [273, 273], [276, 334], [336, 360], [363, 448]], "200515": [[97, 183]], "200519": [[1, 111], [114, 126], [129, 136], [138, 224], [227, 258], [261, 350], [353, 611], [613, 757]], "200525": [[77, 149], [151, 164], [166, 190], [193, 276], [278, 311], [314, 464], [467, 488], [491, 674], [676, 704], [707, 755], [757, 895], [898, 937], [939, 990]], "200532": [[1, 59]], "200599": [[75, 129], [132, 137]], "200600": [[1, 183], [186, 299], [302, 313], [316, 324], [327, 334], [336, 397], [399, 417], [420, 526], [529, 591], [594, 609], [611, 660], [663, 823], [826, 900], [902, 943], [945, 1139], [1141, 1142]], "200961": [[1, 115]], "200976": [[94, 164]], "200990": [[75, 143]], "200991": [[1, 42], [44, 44], [47, 80], [83, 175], [178, 181], [184, 252], [255, 632], [635, 916], [918, 1017], [1019, 1049]], "200992": [[1, 405], [408, 434], [436, 581]], "201062": [[78, 270]], "201097": [[83, 136], [138, 245], [248, 300], [303, 370], [372, 429], [432, 502]], "201114": [[1, 14]], "201115": [[1, 75]], "201159": [[70, 211]], "201164": [[1, 8], [10, 94], [96, 125], [128, 178], [180, 198], [200, 271], [274, 416], [418, 418]], "201168": [[1, 37], [39, 275], [278, 481], [483, 558], [560, 730]], "201173": [[1, 194], [197, 586]], "201174": [[1, 214], [216, 263], [265, 339], [342, 451]], "201193": [[1, 19]], "201196": [[1, 238], [241, 278], [286, 299], [302, 338], [341, 515], [518, 720], [723, 789], [803, 841]], "201197": [[1, 23]], "201202": [[1, 437]], "201229": [[1, 5], [8, 26], [29, 77]], "201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]], "201554": [[70, 86], [88, 114], [116, 127]], "201602": [[76, 81], [83, 194], [196, 494], [496, 614], [617, 639]], "201611": [[87, 145], [149, 182], [184, 186]], "201613": [[1, 42], [44, 49], [53, 210], [213, 215], [218, 225], [228, 659]], "201624": [[83, 92], [95, 240], [270, 270]], "201625": [[211, 312], [315, 348], [351, 416], [418, 588], [591, 671], [673, 758], [760, 791], [793, 952]], "201657": [[77, 93], [95, 108], [110, 118]], "201658": [[1, 19], [21, 118], [121, 136], [139, 292]], "201668": [[78, 157]], "201669": [[1, 9], [12, 136], [139, 141], [143, 165]], "201671": [[1, 120], [122, 174], [177, 462], [464, 482], [485, 499], [501, 545], [547, 571], [574, 614], [617, 766], [768, 896], [899, 911], [914, 1007]], "201678": [[1, 120]], "201679": [[1, 110], [112, 241], [244, 298], [302, 321], [324, 461], [463, 493]], "201692": [[78, 81], [83, 180]], "201705": [[65, 73], [75, 109], [111, 187]], "201706": [[1, 62]], "201707": [[1, 23], [26, 42], [45, 115], [118, 130], [133, 160], [163, 276], [279, 471], [473, 511], [514, 545], [547, 570], [572, 622], [625, 735], [738, 806], [809, 876], [879, 964]], "201708": [[1, 87]], "201718": [[58, 113]], "201727": [[67, 185]], "201729": [[6, 20], [22, 75], [77, 126], [129, 154], [156, 216], [219, 244]], "201794": [[58, 100]], "201802": [[68, 209], [211, 214], [216, 220], [223, 288], [290, 296]], "201816": [[1, 72], [74, 105], [107, 157]], "201817": [[1, 274]], "201818": [[1, 1]], "201819": [[1, 94], [96, 241]], "201824": [[1, 139], [141, 176], [179, 286], [289, 492]], "202012": [[98, 121], [126, 131]], "202013": [[1, 2], [5, 35], [38, 57]], "202014": [[1, 5], [8, 14], [16, 18], [20, 77], [79, 102], [104, 174], [177, 190], [192, 196]], "202016": [[1, 48], [51, 134], [137, 177], [179, 743], [745, 831], [834, 890], [893, 896], [898, 932], [934, 1016]], "202044": [[84, 101], [104, 266], [268, 461], [463, 466]], "202045": [[1, 30], [33, 72], [75, 528], [531, 601], [603, 785], [788, 809], [822, 825]], "202054": [[6, 266], [268, 489], [492, 605], [608, 631]], "202060": [[76, 142], [144, 154], [156, 244], [246, 497], [499, 642], [644, 682], [684, 743], [746, 941]], "202074": [[66, 174]], "202075": [[1, 18], [21, 187], [189, 214], [217, 247], [250, 342], [345, 406], [409, 497], [500, 537], [539, 539], [542, 560], [562, 615], [618, 630]], "202084": [[83, 156], [159, 177], [179, 180], [182, 239]], "202087": [[1, 25], [28, 208], [210, 357], [359, 652], [655, 853], [856, 1093]], "202088": [[1, 286]], "202093": [[1, 104], [107, 320], [322, 360]], "202116": [[59, 64]], "202178": [[67, 78], [80, 88], [91, 177], [180, 186], [188, 337], [340, 377], [379, 425], [428, 475], [478, 548], [551, 717], [720, 965], [967, 1444], [1447, 1505], [1508, 1519], [1522, 1558]], "202205": [[94, 114]], "202209": [[1, 48], [51, 159]], "202237": [[39, 128], [131, 131], [134, 219], [222, 235], [238, 275], [277, 289], [291, 316], [319, 419], [422, 538], [540, 936], [939, 950], [952, 976], [979, 1081]], "202272": [[76, 112], [115, 141], [144, 185], [188, 205], [208, 305], [307, 313], [315, 371], [436, 480], [483, 555], [558, 577], [579, 683], [686, 705], [707, 740], [742, 890], [937, 1295], [1299, 1481]], "202299": [[68, 84], [87, 141], [143, 193], [196, 358], [361, 379], [382, 414], [416, 452], [455, 555]], "202305": [[1, 89], [92, 130], [133, 323]], "202314": [[67, 104], [107, 265], [268, 284]], "202328": [[46, 89], [92, 156], [158, 276], [278, 291], [294, 434], [437, 460], [463, 586], [588, 610], [612, 614]], "202333": [[1, 251]], "202389": [[81, 182], [185, 190], [192, 203]], "202469": [[87, 158], [160, 174], [177, 352]], "202472": [[1, 96], [99, 112]], "202477": [[1, 129], [131, 150]], "202478": [[1, 177], [180, 183], [186, 219], [222, 360], [362, 506], [509, 531], [534, 718], [720, 927], [929, 973], [975, 1029], [1031, 1186], [1189, 1212], [1215, 1248]], "202504": [[77, 96], [99, 133], [135, 182], [184, 211], [213, 241], [243, 392], [395, 527], [529, 617], [620, 715], [718, 763], [766, 1172], [1174, 1247], [1250, 1471], [1474, 1679], [1682, 1704]], "202972": [[1, 30], [33, 184], [186, 290], [292, 295], [298, 371], [374, 429], [431, 544]], "202973": [[1, 234], [237, 305], [308, 437], [439, 530], [532, 541], [544, 552], [555, 851], [853, 1408]], "203002": [[77, 128], [130, 141], [144, 207], [209, 267], [270, 360], [362, 501], [504, 641], [643, 669], [671, 671], [674, 717], [720, 1034], [1037, 1070], [1073, 1370], [1372, 1392], [1395, 1410], [1413, 1596]], "203894": [[82, 272], [275, 477], [480, 902], [905, 1322]], "203909": [[79, 113], [116, 117], [120, 140], [143, 382]], "203912": [[1, 306], [308, 566], [569, 609], [611, 698], [701, 820], [823, 865], [867, 1033], [1035, 1321]], "203985": [[1, 10]], "203986": [[1, 45]], "203987": [[1, 9], [12, 241], [243, 339], [342, 781], [784, 1014]], "203991": [[1, 3]], "203992": [[1, 15]], "203994": [[1, 56], [59, 136], [139, 304], [306, 342], [344, 425]], "204100": [[117, 139]], "204101": [[1, 83]], "204113": [[82, 96], [98, 102], [105, 127], [129, 191], [194, 258], [261, 327], [329, 388], [390, 400], [402, 583], [585, 690], [693, 693], [696, 696]], "204114": [[1, 364]], "204238": [[23, 52], [55, 60]], "204250": [[92, 118], [121, 177], [179, 285], [287, 336], [339, 400], [403, 521], [524, 543], [546, 682], [684, 803]], "204511": [[1, 60]], "204541": [[5, 39], [42, 42], [44, 139], [142, 149], [151, 204]], "204544": [[1, 11], [13, 93], [96, 195], [197, 224], [226, 334], [337, 426]], "204552": [[1, 9]], "204553": [[1, 51], [53, 60], [63, 101], [103, 104]], "204554": [[1, 5], [7, 221], [224, 455], [458, 470], [472, 481], [483, 514]], "204555": [[1, 329], [331, 334]], "204563": [[91, 99], [102, 178], [180, 219], [222, 229], [231, 364], [366, 366], [369, 470], [473, 524], [527, 571]], "204564": [[1, 84], [87, 89], [92, 159], [161, 187], [190, 191], [193, 293], [296, 315], [317, 340], [343, 427], [429, 434], [437, 735], [737, 855], [858, 1206], [1209, 1248], [1251, 1284]], "204565": [[1, 48]], "204566": [[1, 12]], "204567": [[1, 38]], "204576": [[49, 192], [195, 301]], "204577": [[1, 46], [49, 64], [67, 105], [107, 170], [173, 181], [183, 193], [196, 653], [656, 669], [671, 740], [742, 913], [915, 1057], [1059, 1115], [1117, 1287]], "204599": [[73, 83], [85, 94], [97, 121], [124, 125], [128, 173], [175, 240], [243, 245], [248, 264], [266, 292], [294, 335]], "204601": [[1, 25], [28, 62], [65, 80], [83, 89], [92, 290], [292, 563], [565, 591], [593, 652], [655, 780], [783, 812], [814, 892], [894, 984], [986, 1003], [1006, 1038], [1040, 1088], [1091, 1102], [1105, 1161], [1164, 1255]], "205086": [[95, 149]], "205111": [[88, 390], [392, 441], [444, 449]], "205158": [[81, 289], [292, 313], [315, 473], [476, 591], [594, 595], [597, 612], [615, 663], [665, 667], [672, 685], [687, 733], [736, 741]], "205193": [[80, 109], [111, 349], [352, 486], [488, 650], [652, 712], [714, 902]], "205217": [[1, 12], [16, 111], [113, 171], [174, 250], [253, 322]], "205233": [[94, 153]], "205236": [[1, 190], [193, 207], [209, 260], [263, 331], [334, 352]], "205238": [[1, 6], [9, 199], [202, 254], [256, 304], [306, 355], [358, 381], [384, 596], [598, 621]], "205303": [[35, 54], [90, 132], [135, 153]], "205310": [[76, 306], [309, 313], [316, 316], [319, 321], [324, 457], [460, 559]], "205311": [[1, 85], [88, 92], [95, 183], [186, 395], [397, 592], [595, 910], [913, 1260]], "205339": [[71, 175], [178, 213], [216, 230], [233, 262], [265, 404]], "205344": [[1, 83], [86, 104], [106, 359], [362, 431], [433, 949], [951, 967], [969, 1127], [1129, 1346], [1348, 1586]], "205515": [[82, 201], [203, 216]], "205519": [[1, 47], [50, 172], [175, 367], [370, 386], [389, 472]], "205526": [[1, 269], [272, 277], [280, 332]], "205614": [[1, 4], [7, 40]], "205617": [[1, 29], [32, 102], [105, 123], [125, 140], [143, 264], [266, 448], [451, 532], [534, 547]], "205618": [[1, 12]], "205620": [[1, 175]], "205666": [[60, 119], [122, 165], [168, 259], [261, 322], [325, 578], [580, 594], [597, 721], [724, 739]], "205667": [[1, 165], [168, 282], [285, 318], [321, 412], [415, 689], [692, 751], [754, 774], [777, 1109]], "205683": [[76, 82], [85, 178], [181, 198], [201, 305]], "205690": [[1, 40]], "205694": [[1, 205], [208, 230], [233, 347], [350, 452], [455, 593], [595, 890]], "205718": [[49, 75], [78, 97], [100, 103], [105, 176], [178, 338], [341, 361], [363, 524], [527, 531], [534, 589], [591, 734]], "205774": [[1, 80]], "205777": [[1, 9]], "205781": [[1, 89], [91, 197], [200, 509]], "205826": [[80, 232], [235, 303], [306, 469]], "205833": [[84, 86], [89, 121], [123, 155], [157, 165], [167, 173], [176, 219], [221, 267], [270, 312], [315, 346], [350, 355], [360, 366]], "205834": [[1, 12], [14, 202]], "205908": [[68, 200], [202, 214]], "205921": [[22, 73], [76, 268], [271, 394], [397, 401], [410, 428], [431, 498], [500, 571], [574, 779], [782, 853]], "206066": [[89, 155]], "206088": [[86, 159], [161, 178], [181, 199], [202, 286]], "206102": [[83, 116], [120, 130], [133, 208], [211, 235], [238, 246], [249, 278], [281, 349]], "206187": [[107, 169], [172, 242], [245, 288], [290, 340], [343, 427], [429, 435], [437, 486], [489, 569], [571, 647], [649, 662], [664, 708]], "206188": [[1, 40], [42, 58]], "206199": [[1, 75], [77, 82], [85, 117]], "206207": [[82, 130], [132, 176], [179, 194], [196, 388], [390, 419], [422, 447], [450, 569], [572, 690]], "206208": [[1, 470], [472, 518]], "206210": [[11, 25], [28, 275], [277, 298], [300, 383], [386, 469]], "206243": [[62, 169], [172, 196], [199, 354], [357, 433], [435, 448], [451, 533], [536, 554], [557, 723], [726, 905]], "206245": [[1, 62]], "206246": [[1, 14], [16, 237], [240, 285], [288, 407], [412, 676], [678, 704], [706, 785], [787, 962], [965, 997], [1000, 1198], [1201, 1290]], "206257": [[1, 29]], "206258": [[1, 36], [39, 223], [226, 249]], "206302": [[1, 8], [11, 33], [36, 44], [47, 82], [84, 108], [110, 149], [151, 186], [189, 229], [231, 232], [234, 241], [243, 276]], "206303": [[1, 19], [23, 286]], "206304": [[1, 4], [6, 70]], "206331": [[91, 222], [225, 314]], "206389": [[88, 185], [187, 249], [252, 272], [275, 392]], "206391": [[1, 55], [57, 98]], "206401": [[69, 90], [92, 194], [197, 210], [212, 249], [251, 265], [267, 411]], "206446": [[92, 141], [143, 159], [162, 205], [208, 301], [304, 442], [445, 445], [448, 474], [476, 616], [619, 872], [874, 910], [912, 948], [950, 989], [992, 1030], [1033, 1075], [1109, 1149]], "206448": [[1, 143], [145, 559], [561, 1170], [1173, 1231], [1235, 1237]], "206466": [[24, 137], [140, 277], [280, 296], [299, 303], [306, 405], [407, 419], [422, 477], [480, 511], [514, 682]], "206476": [[73, 129], [133, 137], [140, 141], [143, 219]], "206477": [[1, 14], [16, 31], [33, 41], [44, 51], [53, 70], [73, 75], [77, 89], [91, 94], [97, 115], [118, 184]], "206478": [[1, 27], [29, 136], [139, 147]], "206484": [[73, 95], [98, 133], [136, 163], [166, 186], [189, 384], [387, 463], [465, 551], [554, 554], [556, 673]], "206512": [[91, 123], [125, 133], [136, 161], [163, 190], [193, 201], [203, 212], [214, 332], [334, 584], [587, 604], [607, 1005], [1008, 1123], [1126, 1163], [1165, 1211]], "206513": [[3, 39], [42, 188], [191, 234], [237, 238], [241, 329]], "206542": [[1, 115], [117, 165], [168, 511], [514, 547], [550, 603], [606, 668], [671, 727], [730, 739], [741, 836]], "206550": [[77, 132], [135, 155]], "206572": [[37, 47]], "206573": [[2, 14]], "206574": [[1, 87]], "206575": [[1, 7], [10, 10], [12, 75]], "206594": [[72, 107], [110, 246], [249, 281]], "206595": [[1, 34], [37, 42], [45, 193]], "206596": [[1, 13], [15, 220], [222, 228], [231, 236], [239, 292], [295, 695], [697, 728], [730, 810]], "206598": [[1, 81], [83, 103], [105, 588], [591, 657], [659, 719]], "206605": [[1, 36], [39, 82]], "206744": [[49, 157], [160, 192], [195, 395], [398, 452]], "206745": [[1, 81], [84, 199], [202, 224], [227, 237], [240, 304], [306, 318], [321, 720], [723, 796], [799, 894], [897, 944], [946, 1106], [1108, 1524], [1527, 1862], [1988, 1996]], "206859": [[79, 210], [212, 258], [260, 323], [325, 356], [359, 609], [612, 681], [684, 732], [734, 768], [771, 808], [811, 827], [830, 848]], "206866": [[1, 30], [33, 113], [115, 274]], "206868": [[1, 3], [10, 16]], "206869": [[1, 251], [253, 271], [274, 502], [507, 520], [522, 566], [568, 752]], "206897": [[1, 34], [38, 61], [63, 102], [109, 109], [111, 112], [114, 131], [133, 137]], "206901": [[1, 98]], "206906": [[1, 31], [38, 94], [96, 136], [138, 139], [142, 149], [151, 175], [177, 218]], "206940": [[1, 151], [153, 153], [155, 298], [301, 382], [384, 712], [715, 803], [805, 960], [963, 1027]], "207099": [[83, 134], [137, 172], [175, 213], [216, 314], [316, 320], [323, 330], [333, 367], [370, 481], [484, 602], [605, 755], [757, 1046], [1048, 1171]], "207100": [[1, 91], [94, 98]], "207214": [[57, 112], [114, 177], [179, 181], [184, 196], [199, 220], [223, 262], [265, 405], [408, 482], [485, 640], [643, 708], [718, 757], [759, 808], [811, 829]], "207217": [[1, 32]], "207219": [[1, 112]], "207220": [[1, 160]], "207221": [[1, 102]], "207222": [[1, 17], [20, 289]], "207231": [[70, 84], [86, 121], [123, 184], [187, 189], [192, 303], [306, 354], [357, 481], [484, 504], [508, 549], [552, 626], [628, 690], [693, 875], [878, 1000], [1003, 1170], [1173, 1187], [1189, 1227], [1229, 1415], [1418, 1445], [1447, 1505]], "207233": [[1, 119], [121, 155]], "207269": [[80, 394], [397, 436], [439, 463], [466, 551], [568, 577]], "207273": [[3, 877]], "207279": [[68, 138], [141, 149], [151, 237], [240, 266], [269, 307], [309, 416], [498, 551], [554, 640], [643, 961], [963, 1095], [1098, 1160]], "207320": [[1, 110], [112, 350]], "207371": [[72, 117], [120, 124]], "207372": [[1, 27], [30, 113], [116, 154], [156, 174], [176, 478], [480, 501]], "207397": [[32, 77], [80, 140], [143, 179]], "207398": [[1, 14], [16, 35]], "207454": [[79, 95], [98, 123], [126, 259], [261, 363], [365, 458], [461, 498], [501, 609], [612, 632], [635, 781], [784, 866], [869, 974], [977, 1064], [1067, 1079], [1081, 1321], [1323, 1464], [1467, 1569], [1571, 1604], [1607, 1712], [1714, 1988]], "207469": [[1, 31], [34, 51]], "207477": [[76, 104], [107, 111], [114, 147], [150, 295], [298, 483], [486, 494], [497, 527], [530, 563], [565, 570]], "207487": [[50, 98], [101, 311], [313, 359], [363, 468], [471, 472]], "207488": [[1, 63], [66, 92], [95, 113], [116, 198], [200, 250], [252, 288], [291, 365], [368, 377], [379, 440]], "207490": [[1, 48], [51, 111]], "207491": [[1, 176], [179, 458]], "207492": [[1, 20], [23, 298]], "207515": [[79, 109], [112, 132], [134, 208], [211, 225], [228, 320], [322, 381], [383, 498], [500, 730], [733, 849], [851, 954], [957, 994], [997, 1052], [1055, 1143], [1145, 1211]], "207517": [[1, 12], [15, 57]], "207518": [[1, 59], [61, 83]], "207882": [[22, 45]], "207883": [[1, 1], [3, 4], [7, 75]], "207884": [[1, 106], [108, 183]], "207885": [[1, 90]], "207886": [[1, 30], [32, 90], [92, 156], [158, 166], [168, 171]], "207889": [[1, 43], [47, 57], [60, 303], [306, 442], [445, 445], [447, 551], [553, 731], [733, 907], [910, 945]], "207898": [[1, 33], [36, 57], [60, 235], [239, 257], [260, 288]], "207905": [[75, 196], [198, 281], [284, 329], [331, 402], [404, 565], [568, 672], [675, 805], [807, 850], [852, 861], [864, 884], [886, 1180], [1183, 1283], [1285, 1331], [1333, 1515], [1518, 1734], [1737, 1796]], "207920": [[84, 146], [149, 241], [243, 261], [264, 291], [294, 486], [489, 518], [520, 598], [600, 708], [710, 826]], "207921": [[1, 37], [40, 58]], "207922": [[1, 69], [71, 100], [103, 126], [129, 242], [274, 291]], "207924": [[1, 52], [54, 171], [173, 178], [181, 339]], "208307": [[2, 42], [45, 45], [47, 70], [72, 147], [150, 252], [256, 259], [262, 275], [278, 342], [345, 450], [453, 527], [530, 583], [586, 605], [608, 616], [618, 667], [670, 761], [763, 798], [800, 889], [891, 893], [896, 1055], [1057, 1205], [1208, 1294], [1297, 1328]], "208339": [[77, 89], [91, 122], [125, 208], [211, 346], [349, 363]], "208341": [[1, 84], [86, 117], [120, 513], [515, 685], [688, 693], [695, 775], [777, 824]], "208351": [[83, 97], [100, 356], [359, 369]], "208353": [[1, 76], [78, 269], [271, 348]], "208357": [[1, 70], [73, 507]], "208390": [[72, 128], [130, 169]], "208391": [[52, 82], [84, 162], [164, 216], [219, 493], [495, 498], [500, 523], [526, 533], [535, 588], [591, 660], [663, 869]], "208427": [[49, 89], [92, 161], [164, 164], [166, 173], [175, 268], [271, 312], [315, 315], [317, 335], [337, 361], [364, 402], [404, 422], [425, 577], [580, 647]], "208428": [[1, 58], [61, 68], [70, 156], [159, 227]], "208429": [[1, 56], [59, 139], [141, 159], [162, 237], [240, 440], [442, 452], [455, 589], [592, 712], [715, 922]], "208487": [[2, 26], [29, 159], [161, 307], [309, 459], [462, 476], [479, 632]], "208509": [[71, 232]], "208538": [[2, 43]], "208540": [[1, 26], [29, 98]], "208541": [[1, 57], [59, 173], [175, 376], [378, 417]], "208551": [[119, 193], [195, 212], [215, 300], [303, 354], [356, 554], [557, 580]], "208686": [[73, 79], [82, 181], [183, 224], [227, 243], [246, 311], [313, 463]]} \ No newline at end of file diff --git a/EOverPCalibration/macros/CombineMomentumCalibration.cxx b/EOverPCalibration/macros/CombineMomentumCalibration.cxx new file mode 100644 index 00000000000..c68d6cc415f --- /dev/null +++ b/EOverPCalibration/macros/CombineMomentumCalibration.cxx @@ -0,0 +1,339 @@ +#include +#include "TFile.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TString.h" +#include "TCanvas.h" +#include "TPad.h" +#include "TLegend.h" +#include "TStyle.h" +#include "TH2F.h" +#include "TMath.h" + + + +int nEtaBinsEB = 1; +int nEtaBinsEE = 1; + +void CombineMomentumCalibration() +{ + gROOT->SetStyle("Plain"); + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetStatFont(42); + gStyle->SetStatFontSize(0.05); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(10111); + gStyle->SetOptFit(1); + gStyle->SetPalette(1); + gROOT->ForceStyle(); + + TFile *f1 = TFile::Open("output/MomentumCalibration2011_fede_eta1_eta1.root"); + TFile *f2 = TFile::Open("output/MomentumCalibration2012_fede_eta1_eta1.root"); + TFile *f3 = new TFile("output/MomentumCalibrationCombined_2011AB-2012ABC_fede_eta1_eta1.root","RECREATE"); + f3->cd(); + + double x,y; + + + + //------- + // Barrel + + for(int etaBin = 0; etaBin < nEtaBinsEB; ++etaBin) + { + TString Name = Form("g_EoC_EB_%d",etaBin); + TGraphErrors* g_EoC_EB_1 = (TGraphErrors*)f1->Get(Name); + double yAvg_EB_1 = 0.; + int nGoodPoints_EB_1 = 0; + for(int point = 0; point < g_EoC_EB_1->GetN(); ++point) + { + g_EoC_EB_1 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EB_1 += y; + ++nGoodPoints_EB_1; + } + } + yAvg_EB_1 /= nGoodPoints_EB_1; + std::cout << "*** EB_" << etaBin << "_1 yScale: " << yAvg_EB_1 << std::endl; + + + TString Name = Form("g_EoC_EB_%d",etaBin); + TGraphErrors* g_EoC_EB_2 = (TGraphErrors*)f2->Get(Name); + double yAvg_EB_2 = 0.; + int nGoodPoints_EB_2 = 0; + for(int point = 0; point < g_EoC_EB_2->GetN(); ++point) + { + g_EoC_EB_2 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EB_2 += y; + ++nGoodPoints_EB_2; + } + } + yAvg_EB_2 /= nGoodPoints_EB_2; + std::cout << "*** EB_" << etaBin << "_2 yScale: " << yAvg_EB_2 << std::endl; + + + + g_EoC_EB_1 -> SetMarkerStyle(20); + g_EoC_EB_1 -> SetMarkerSize(1); + g_EoC_EB_1 -> SetMarkerColor(kGreen+1); + g_EoC_EB_1 -> SetLineColor(kGreen+1); + + g_EoC_EB_2 -> SetMarkerStyle(20); + g_EoC_EB_2 -> SetMarkerSize(1); + g_EoC_EB_2 -> SetMarkerColor(kRed+1); + g_EoC_EB_2 -> SetLineColor(kRed+1); + + TGraphErrors* g_Diff_EB = (TGraphErrors*)g_EoC_EB_1->Clone(0); + TGraphErrors* g_Corr_EB = (TGraphErrors*)g_EoC_EB_1->Clone(0); + + g_Diff_EB -> SetMarkerStyle(20); + g_Diff_EB -> SetMarkerSize(1); + g_Diff_EB -> SetMarkerColor(kBlue+2); + g_Diff_EB -> SetLineColor(kBlue+2); + + g_Corr_EB -> SetMarkerStyle(20); + g_Corr_EB -> SetMarkerSize(1); + g_Corr_EB -> SetMarkerColor(kBlack); + g_Corr_EB -> SetLineColor(kBlack); + + + for(int jPoint = 0; jPoint < g_EoC_EB_1->GetN(); jPoint++) + { + double x1,y1,ex1,ey1; + double x2,y2,ex2,ey2; + g_EoC_EB_1->GetPoint(jPoint,x1,y1); + ex1= g_EoC_EB_1->GetErrorX(jPoint); + ey1= g_EoC_EB_1->GetErrorY(jPoint); + + g_EoC_EB_2->GetPoint(jPoint,x2,y2); + ex2= g_EoC_EB_2->GetErrorX(jPoint); + ey2= g_EoC_EB_2->GetErrorY(jPoint); + + g_Corr_EB ->SetPoint(jPoint,x1,(y2+y1)/2); + g_Corr_EB ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + + g_Diff_EB ->SetPoint(jPoint,x1,(y2-y1)/2); + g_Diff_EB ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + } + + + float phiLim = 360; + Name = Form("g_fit_EB_%d",etaBin); + TCanvas* c_g_fit_EB = new TCanvas(Name, Name,100,100,800,600); + Name = Form("pad_0_EB_%d",etaBin); + TPad *cLower_EB = new TPad(Name,Name,0.01,0.00,0.99,0.30); + Name = Form("pad_1_EB_%d",etaBin); + TPad *cUpper_EB = new TPad(Name,Name,0.01,0.30,0.99,0.99); + + cLower_EB->SetBottomMargin(0.25); cUpper_EB->SetTopMargin(0.01); + cUpper_EB->SetBottomMargin(0.01); + + cLower_EB->Draw(); + cUpper_EB->Draw(); + + float FontSCF = cUpper_EB->GetHNDC()/cLower_EB->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + cUpper_EB -> cd(); + gPad->SetGrid(); + + TH1F *hPad_EB = (TH1F*)gPad->DrawFrame(-3.15,0.95,3.15,1.05); + hPad_EB->GetXaxis()->SetLabelSize(labSize); + hPad_EB->GetXaxis()->SetTitleSize(labSize); + hPad_EB->GetYaxis()->SetLabelSize(labSize); + hPad_EB->GetYaxis()->SetTitleSize(labSize); + hPad_EB->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EB->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto p"); + + g_EoC_EB_1 -> Draw("PL"); + g_EoC_EB_2 -> Draw("PL"); + //g_Corr_EB -> Draw("PL"); + + + TLegend *tl_EB = new TLegend(0.80,0.80,0.90,0.95); + tl_EB -> SetTextFont(40); + tl_EB -> SetFillColor(0); + //tl -> SetBorderSize(0); + tl_EB -> AddEntry(g_EoC_EB_1,"Data 2011 EB","PL"); + tl_EB -> AddEntry(g_EoC_EB_2,"Data 2012 EB","PL"); + //tl_EB -> AddEntry(g_Corr_EB,"2011-2012 Combined","PL"); + + tl_EB -> Draw(); + + cLower_EB -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EB = (TH1F*)gPad->DrawFrame(-3.15,-0.01,3.15,0.01); + hRat_EB->GetYaxis()->SetNdivisions(505); + hRat_EB->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EB->GetXaxis()->SetTitleOffset(0.6); + hRat_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EB->GetYaxis()->SetTitle("Spread/2"); + g_Diff_EB->Draw("PL"); + + Name = Form("g_EoC_EB_%d",etaBin); + g_Corr_EB->Write(Name); + } + + + + //-------- + // Endcaps + + for(int etaBin = 0; etaBin < nEtaBinsEE; ++etaBin) + { + TString Name = Form("g_EoC_EE_%d",etaBin); + TGraphErrors* g_EoC_EE_1 = (TGraphErrors*)f1->Get(Name); + double yAvg_EE_1 = 0.; + int nGoodPoints_EE_1 = 0; + for(int point = 0; point < g_EoC_EE_1->GetN(); ++point) + { + g_EoC_EE_1 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EE_1 += y; + ++nGoodPoints_EE_1; + } + } + yAvg_EE_1 /= nGoodPoints_EE_1; + std::cout << "*** EE_" << etaBin << "_1 yScale: " << yAvg_EE_1 << std::endl; + + Name= Form("g_EoC_EE_%d",etaBin); + TGraphErrors* g_EoC_EE_2 = (TGraphErrors*)f2->Get(Name); + double yAvg_EE_2 = 0.; + int nGoodPoints_EE_2 = 0; + for(int point = 0; point < g_EoC_EE_2->GetN(); ++point) + { + g_EoC_EE_2 -> GetPoint(point,x,y); + if( (y > 0.9) && (y < 1.1) ) + { + yAvg_EE_2 += y; + ++nGoodPoints_EE_2; + } + } + yAvg_EE_2 /= nGoodPoints_EE_2; + std::cout << "*** EE_" << etaBin << "_2 yScale: " << yAvg_EE_2 << std::endl; + + + g_EoC_EE_1 -> SetMarkerStyle(20); + g_EoC_EE_1 -> SetMarkerSize(1); + g_EoC_EE_1 -> SetMarkerColor(kGreen+1); + g_EoC_EE_1 -> SetLineColor(kGreen+1); + + g_EoC_EE_2 -> SetMarkerStyle(20); + g_EoC_EE_2 -> SetMarkerSize(1); + g_EoC_EE_2 -> SetMarkerColor(kRed+1); + g_EoC_EE_2 -> SetLineColor(kRed+1); + + TGraphErrors* g_Diff_EE = (TGraphErrors*)g_EoC_EE_1->Clone(0); + TGraphErrors* g_Corr_EE = (TGraphErrors*)g_EoC_EE_1->Clone(0); + + g_Diff_EE -> SetMarkerStyle(20); + g_Diff_EE -> SetMarkerSize(1); + g_Diff_EE -> SetMarkerColor(kBlue+2); + g_Diff_EE -> SetLineColor(kBlue+2); + + g_Corr_EE -> SetMarkerStyle(20); + g_Corr_EE -> SetMarkerSize(1); + g_Corr_EE -> SetMarkerColor(kBlack); + g_Corr_EE -> SetLineColor(kBlack); + + + for(int jPoint = 0; jPoint < g_EoC_EE_1->GetN() ; jPoint++) + { + double x1,y1,ex1,ey1; + double x2,y2,ex2,ey2; + g_EoC_EE_1->GetPoint(jPoint,x1,y1); + ex1= g_EoC_EE_1->GetErrorX(jPoint); + ey1= g_EoC_EE_1->GetErrorY(jPoint); + + g_EoC_EE_2->GetPoint(jPoint,x2,y2); + ex2= g_EoC_EE_2->GetErrorX(jPoint); + ey2= g_EoC_EE_2->GetErrorY(jPoint); + + g_Diff_EE ->SetPoint(jPoint,x1,(y2-y1)/2); + g_Diff_EE ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + + g_Corr_EE ->SetPoint(jPoint,x1,(y2+y1)/2); + g_Corr_EE ->SetPointError(jPoint,ex1,0.5*sqrt(ey2*ey2+ey1*ey2)); + } + + + Name = Form("g_fit_EE_%d",etaBin); + + TCanvas* c_g_fit_EE = new TCanvas(Name, Name,100,100,800,600); + TPad *cLower_EE = new TPad("pad_0_EE","pad_0_EE",0.01,0.00,0.99,0.30); + TPad *cUpper_EE = new TPad("pad_1_EE","pad_1_EE",0.01,0.30,0.99,0.99); + + cLower_EE->SetBottomMargin(0.25); cUpper_EE->SetTopMargin(0.01); + cUpper_EE->SetBottomMargin(0.01); + + cLower_EE->Draw(); + cUpper_EE->Draw(); + + float FontSCF = cUpper_EE->GetHNDC()/cLower_EE->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + float phiLim = 360.; + cUpper_EE -> cd(); + gPad->SetGrid(); + TH1F *hPad_EE = (TH1F*)gPad->DrawFrame(-3.15,0.90,3.15,1.10); + hPad_EE->GetXaxis()->SetLabelSize(labSize); + hPad_EE->GetXaxis()->SetTitleSize(labSize); + hPad_EE->GetYaxis()->SetLabelSize(labSize); + hPad_EE->GetYaxis()->SetTitleSize(labSize); + hPad_EE->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EE->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto 1/p"); + + g_EoC_EE_1 -> Draw("PL"); + g_EoC_EE_2 -> Draw("PL"); + //g_Corr_EE -> Draw("PL"); + + TLegend *tl_EE = new TLegend(0.80,0.80,0.90,0.95); + tl_EE -> SetTextFont(40); + tl_EE -> SetFillColor(0); + //tl -> SetBorderSize(0); + tl_EE -> AddEntry(g_EoC_EE_1,"Data 2011 EE","PL"); + tl_EE -> AddEntry(g_EoC_EE_2,"Data 2012 EE","PL"); + //tl_EE -> AddEntry(g_Corr_EE,"2011-2012 Combination EE","PL"); + + tl_EE -> Draw(); + + cLower_EE -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EE = (TH1F*)gPad->DrawFrame(-3.15,-0.03,3.15,0.03); + hRat_EE->GetYaxis()->SetNdivisions(505); + hRat_EE->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EE->GetXaxis()->SetTitleOffset(0.6); + hRat_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EE->GetYaxis()->SetTitle("Spread/2"); + g_Diff_EE->Draw("PL"); + + Name = Form("g_EoC_EE_%d",etaBin); + g_Corr_EE->Write(Name); + } + + + f3->Close(); +} diff --git a/EOverPCalibration/macros/CompareCoeff.cxx b/EOverPCalibration/macros/CompareCoeff.cxx new file mode 100644 index 00000000000..a261f1522e9 --- /dev/null +++ b/EOverPCalibration/macros/CompareCoeff.cxx @@ -0,0 +1,144 @@ +// To compare two sets of IC +// Input needed: two set of IC (2D maps) +{ + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + + TFile *f1 = TFile::Open("calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B.root"); + TFile *f2 = TFile::Open("calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B_new.root"); + + // input coeff + TH2F *hcmap1 = (TH2F*)f1->Get("h_scale_map"); + TH2F *hcmap2 = (TH2F*)f2->Get("h_scale_map"); + TH2F *hemap1 = (TH2F*)f1->Get("h_error_map"); + TH2F *hemap2 = (TH2F*)f2->Get("h_error_map"); + + // output histos + TH2F * h2 = new TH2F("h2","h2",400,0.5,1.5,400,0.5,1.5); + TH2F * h2diff = (TH2F*)hcmap1->Clone("h2diff"); + h2diff->Reset(); + + TH1F *hdiff = new TH1F("hdiff", "hdiff", 400,-0.5,0.5); + + char hname[100]; + + TH1F *hspread[172]; + for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hspread_ring_ieta%02d",etaring); + hspread[jbin-1]= new TH1F(hname, hname, 400,-0.5,0.5); + } + + for (int jbin = 1; jbin < hcmap1-> GetNbinsY(); jbin++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(jbin); + for (int ibin = 1; ibin < hcmap1-> GetNbinsX()+1; ibin++){ + float c1 = hcmap1->GetBinContent(ibin,jbin); + float c2 = hcmap2->GetBinContent(ibin,jbin); + float e1 = hemap1->GetBinContent(ibin,jbin); + float e2 = hemap2->GetBinContent(ibin,jbin); + if (c1!=0 && c2!=0 && e1!=-1 && e2!=-1){ + hspread[jbin-1]->Fill( c1-c2 ); + h2->Fill(c1,c2); + h2diff->SetBinContent(ibin,jbin,c1-c2); + if (fabs(etaring) < 40) hdiff->Fill(c1-c2); + + } + } + } + + + TGraphErrors *sigma_vs_ieta = new TGraphErrors(); + sigma_vs_ieta->SetMarkerStyle(20); + sigma_vs_ieta->SetMarkerSize(1); + sigma_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *rms_vs_ieta = new TGraphErrors(); + rms_vs_ieta->SetMarkerStyle(24); + rms_vs_ieta->SetMarkerSize(1); + rms_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_ieta = new TGraphErrors(); + scale_vs_ieta->SetMarkerStyle(20); + scale_vs_ieta->SetMarkerSize(1); + scale_vs_ieta->SetMarkerColor(kBlue+2); + + TF1 *fgaus = new TF1("fgaus","gaus",-1,1); + int np = 0; + for (int i = 1; i < hcmap1-> GetNbinsY(); i++){ + float etaring = hcmap1-> GetYaxis()->GetBinCenter(i); + if (int(etaring)==0) continue; + if ( hspread[i-1]->GetEntries() == 0) continue; + hspread[i-1]->Fit("fgaus","Q"); + np++; + sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + sigma_vs_ieta-> SetPointError(np,0,fgaus->GetParError(2)); + rms_vs_ieta -> SetPoint(np,etaring, hspread[i-1]->GetRMS()); + rms_vs_ieta -> SetPointError(np,0,hspread[i-1]->GetRMSError() ); + scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); + scale_vs_ieta-> SetPointError(np,0,fgaus->GetParError(1)); + } + + // plot + + TCanvas *csigma = new TCanvas("csigma","csigma"); + csigma->SetGridx(); + csigma->SetGridy(); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.2); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma"); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + sigma_vs_ieta->Draw("ap"); + //rms_vs_ieta->Draw("psame"); + + TCanvas *cscale = new TCanvas("cscale","cscale"); + cscale->SetGridx(); + cscale->SetGridy(); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(-0.1,0.1); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("c_{1}-c_{2}"); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("ieta"); + scale_vs_ieta->Draw("ap"); + + TCanvas *cmap2 = new TCanvas("cmap2","cmap2",500,500); + cmap2->SetGridx(); + cmap2->SetGridy(); + cmap2 -> cd(); + cmap2->SetLeftMargin(0.1); + cmap2->SetRightMargin(0.15); + h2->GetXaxis()->SetRangeUser(0.85,1.15); + h2->GetYaxis()->SetRangeUser(0.85,1.15); + h2->GetXaxis()->SetTitle("C_{1}"); + h2->GetYaxis()->SetTitle("C_{2}"); + h2->Draw("colz"); + + + TCanvas *cdiff = new TCanvas("cdiff","cdiff",700,500); + cdiff->SetGridx(); + cdiff->SetGridy(); + cdiff -> cd(); + cdiff->SetLeftMargin(0.1); + cdiff->SetRightMargin(0.15); + h2diff->GetZaxis()->SetRangeUser(-0.05,0.05); + h2diff->GetXaxis()->SetTitle("i#phi"); + h2diff->GetYaxis()->SetTitle("i#eta"); + h2diff->Draw("colz"); + + +} diff --git a/EOverPCalibration/macros/CompareL3Template.C b/EOverPCalibration/macros/CompareL3Template.C new file mode 100644 index 00000000000..1df70b5312c --- /dev/null +++ b/EOverPCalibration/macros/CompareL3Template.C @@ -0,0 +1,136 @@ +// +// Compare L3 and Template starting from .txt files (IC mediated on phi ring) +// + +{ + // Set style options + + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + + char TxtFile1[1000] = "/afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/WZAnalysis_SingleEle_Run2011AB.txt"; + char TxtFile2[1000] = "/data2/malberti/Calibration/calibrationTemplate_XTAL_allEvents_Jul05_Aug05_Oct03_Run2011B_new.txt"; + + char buffer[80]; + int Ieta,Iphi; + float IC; + + ifstream file1 (TxtFile1); + ifstream file2 (TxtFile2); + + for (int i=0;i<3;i++) file1.getline (&buffer[0],1000); //skip 3 lines + + TH1F *hL3 = new TH1F("L3","L3",300,0.5,1.5); + TH1F *hTemplate = new TH1F("Template","Template",300,0.5,1.5); + TH1F *hDiff = new TH1F("Diff","Diff",300,-0.5,0.5); + + TH2F *IC_L3 = new TH2F("IC_L3","L3",360,1, 361, 171, -85, 86); + TH2F *IC_Template = new TH2F("IC_Template","Template",360,1, 361, 171, -85, 86); + + TH2F* corr = new TH2F("IC_L3_vs_IC_Template","IC_L3_vs_IC_Template",100,0.8,1.2,100,0.8,1.2); + + while (!file1.eof()){ + + file1.getline (&buffer[0],1000); // read channels + istrstream line (buffer); + line >> Ieta; + line >> Iphi; + line >> IC; + + hL3 -> Fill(IC); + IC_L3 -> Fill(Iphi,Ieta,IC); + + } + + + while (!file2.eof()){ + file2.getline (&buffer[0],1000); // read channels + istrstream line (buffer); + line >> Ieta; + line >> Iphi; + line >> IC; + + if (IC > 1.5 || IC < 0.5) continue; + + hTemplate -> Fill(IC); + IC_Template-> Fill(Iphi,Ieta,IC); + + } + + + for (int iphi=1; iphi<=360; iphi++) + { + for (int ieta=1; ieta<=171; ieta++) + { + if (IC_L3->GetBinContent(iphi,ieta) != 0 && IC_Template->GetBinContent(iphi,ieta) != 0){ + hDiff->Fill( IC_L3->GetBinContent(iphi,ieta) - IC_Template->GetBinContent(iphi,ieta) ); + corr -> Fill(IC_L3->GetBinContent(iphi,ieta),IC_Template->GetBinContent(iphi,ieta)); + + } + } + } + + + TCanvas *c1 = new TCanvas(); + hL3->Draw(); + + TCanvas *c2 = new TCanvas(); + hTemplate->Draw(); + + TCanvas *c3 = new TCanvas(); + IC_L3 -> GetZaxis() -> SetRangeUser(0.93,1.07); + IC_L3->Draw("colz"); + + TCanvas *c4 = new TCanvas(); + IC_Template -> GetZaxis() -> SetRangeUser(0.85,1.15); + IC_Template->Draw("colz"); + + TCanvas *c5 = new TCanvas(); + hDiff->Draw(); + + TCanvas *c6 = new TCanvas(); + corr->GetXaxis()->SetRangeUser(0.8,1.2); + corr->GetYaxis()->SetRangeUser(0.8,1.2); + corr->Draw(); + + double correlation_coeffcient=corr->GetCorrelationFactor(); + double N=corr->GetEntries(); + double t=(fabs(correlation_coeffcient)*sqrt(N-2))/(sqrt(1-pow(fabs(correlation_coeffcient),2))); + double Probability=2*(1-TMath::StudentI(t,N-2)); + + + std::cout<<" Correlation Value = "<GetCorrelationFactor()<<" Probability = "<Print("hL3.png","png"); + c2->Print("hTemplate.png","png"); + c3->Print("IC_L3.png","png"); + c4->Print("IC_Template.png","png"); + c5->Print("hDiff.png","png"); + c6->Print("corr.png","png"); + } + +} \ No newline at end of file diff --git a/EOverPCalibration/macros/Correction_TrackerEffect_EE_DATA.cxx b/EOverPCalibration/macros/Correction_TrackerEffect_EE_DATA.cxx new file mode 100644 index 00000000000..e74e6966764 --- /dev/null +++ b/EOverPCalibration/macros/Correction_TrackerEffect_EE_DATA.cxx @@ -0,0 +1,295 @@ +#include +#include +#include +#include +#include +#include +#include "TStyle.h" +#include "TROOT.h" +#include "TH1F.h" +#include "TH2F.h" +#include +#include "TFile.h" +#include "TCanvas.h" +// +/// Macro to Correct DATA dinamic alpha with MC/MCTruth for phi lines due to the tracker +// + + +void Correction_TrackerEffect_EE_DATA_dinamic_alpha (Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EE/fbrem/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_regression_Z_fbrem_EE.root", + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + /// by xtal + int nbins = 250; + + /// Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(0); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + cout << "Making calibration plots for: " << infile1 << endl; + + + /// imput file with full statistic normlized to the mean in a ring + + TFile *f = new TFile(infile1,"UPDATE"); + TH2F *hcmap[2]; + hcmap[0] = (TH2F*)f->Get("h_scale_map_EEM"); + hcmap[1] = (TH2F*)f->Get("h_scale_map_EEP"); + + + /// ring geometry for the endcap + TH2F *hrings[2]; + hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)hcmap[1]->Clone("hringsEEP"); + hrings[0] ->Reset("IMCES"); + hrings[1] ->Reset("IMCES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + std::vector number_of_Rings_EEP(40,0); + std::vector number_of_Rings_EEM(40,0); + + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) { hrings[1]->Fill(x,y,ir); + number_of_Rings_EEP.at(ir)++; + } + if(z<0) {hrings[0]->Fill(x,y,ir); + number_of_Rings_EEM.at(ir)++; + } + } + + /// noEp Selections +/* std::vector< std::pair > phi_line_EEM; + phi_line_EEM.push_back(std::pair (16.,1.025)); + phi_line_EEM.push_back(std::pair (59.5,1.047)); + phi_line_EEM.push_back(std::pair (71.5,1.028)); + phi_line_EEM.push_back(std::pair (86.,1.042)); + phi_line_EEM.push_back(std::pair (103.,1.034)); + phi_line_EEM.push_back(std::pair (122.5,1.024)); + phi_line_EEM.push_back(std::pair (145.5,1.016)); + phi_line_EEM.push_back(std::pair (164.,1.034)); + phi_line_EEM.push_back(std::pair (183.5,1.043)); + phi_line_EEM.push_back(std::pair (203.5,1.026)); + phi_line_EEM.push_back(std::pair (240.,1.043)); + phi_line_EEM.push_back(std::pair (296.5,1.031)); + phi_line_EEM.push_back(std::pair (315.5,1.029)); + phi_line_EEM.push_back(std::pair (356.,1.038)); + + std::vector > phi_line_EEP; + phi_line_EEP.push_back(std::pair (16.5,1.042)); + phi_line_EEP.push_back(std::pair (60.,1.043)); + phi_line_EEP.push_back(std::pair (72.,1.016)); + phi_line_EEP.push_back(std::pair (85.5,1.042)); + phi_line_EEP.push_back(std::pair (103.,1.024)); + phi_line_EEP.push_back(std::pair (122.5,1.025)); + phi_line_EEP.push_back(std::pair (135.,1.035)); + phi_line_EEP.push_back(std::pair (145.,1.016)); + phi_line_EEP.push_back(std::pair (163.,1.034)); + phi_line_EEP.push_back(std::pair (184.,1.033)); + phi_line_EEP.push_back(std::pair (240.,1.054)); + phi_line_EEP.push_back(std::pair (276.,1.026)); + phi_line_EEP.push_back(std::pair (297.,1.043)); + phi_line_EEP.push_back(std::pair (314.,1.024)); + phi_line_EEP.push_back(std::pair (357.,1.055)); +*/ + +/// R9 Selections + + std::vector< std::pair > phi_line_EEM; + phi_line_EEM.push_back(std::pair (16.,1.02244)); + phi_line_EEM.push_back(std::pair (59.5, 1.03235)); + phi_line_EEM.push_back(std::pair (71.5,1.02545)); + phi_line_EEM.push_back(std::pair (86.,1.04242)); + phi_line_EEM.push_back(std::pair (103.,1.02082)); + phi_line_EEM.push_back(std::pair (122.5,1.01224)); + phi_line_EEM.push_back(std::pair (145.5, 1.01207)); + phi_line_EEM.push_back(std::pair (164.,1.02766)); + phi_line_EEM.push_back(std::pair (183.5,1.03397)); + phi_line_EEM.push_back(std::pair (203.5,1.01597)); + phi_line_EEM.push_back(std::pair (240.,1.03305)); + phi_line_EEM.push_back(std::pair (296.5,1.02419)); + phi_line_EEM.push_back(std::pair (315.5,1.02211)); + phi_line_EEM.push_back(std::pair (356.,1.03243)); + + std::vector > phi_line_EEP; + phi_line_EEP.push_back(std::pair (16.5,1.02514)); + phi_line_EEP.push_back(std::pair (60.,1.02929)); + phi_line_EEP.push_back(std::pair (72.,1.01563)); + phi_line_EEP.push_back(std::pair (85.5,1.02029)); + phi_line_EEP.push_back(std::pair (103.,1.02159)); + phi_line_EEP.push_back(std::pair (122.5,1.02598)); + phi_line_EEP.push_back(std::pair (135.,1.0163)); + phi_line_EEP.push_back(std::pair (145.,1.03654)); + phi_line_EEP.push_back(std::pair (163.,1.02249)); + phi_line_EEP.push_back(std::pair (184.,1.04225)); + phi_line_EEP.push_back(std::pair (240.,1.03254)); + phi_line_EEP.push_back(std::pair (276.,1.01565)); + phi_line_EEP.push_back(std::pair (297.,1.03486)); + phi_line_EEP.push_back(std::pair (314.,1.01318)); + phi_line_EEP.push_back(std::pair (357.,1.03728)); + + TH2F *hcmap_corrected[2]; + hcmap_corrected[0] = (TH2F*)hcmap[0]->Clone("h_scale_map_EEM"); + hcmap_corrected[1] = (TH2F*)hcmap[1]->Clone("h_scale_map_EEP"); + hcmap_corrected[0] ->Reset("ICMES"); + hcmap_corrected[1] ->Reset("ICMES"); + hcmap_corrected[0] ->ResetStats(); + hcmap_corrected[1] ->ResetStats(); + + /// Correction of IC map data + + for(int k=0 ; k<2 ; k++) + { + for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) + { + for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) + { + if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; + float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); + if(phi_xtal<0.) phi_xtal=360.+phi_xtal; + if(k==0) + { int flag=0; + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) + { int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEM.at(ivect).first)<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect).first); + else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect).first); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*phi_line_EEM.at(ivect).second); + } + else if(flag==0) {hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1;} + } + } + + else{ int flag=0; + for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) + { + int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEP.at(ivect).first)<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect).first); + else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect).first); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*phi_line_EEP.at(ivect).second); + } + else if(flag==0) + { + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1; + } + } + } + + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP Uncorrected"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap[1]->Draw("COLZ"); + hcmap[1]->GetXaxis() ->SetTitle("ix"); + hcmap[1]->GetYaxis() ->SetTitle("iy"); + hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[0] = new TCanvas("cEEM","cmapEEM Uncorrected"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap[0]->Draw("COLZ"); + hcmap[0]->GetXaxis() ->SetTitle("ix"); + hcmap[0]->GetYaxis() ->SetTitle("iy"); + hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + /// --- plot 0 : map of coefficients + cEEP[1] = new TCanvas("cmapEEP Corrected","cmapEEP Corrected"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[1]->Draw("COLZ"); + hcmap_corrected[1]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[1]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[1] = new TCanvas("cmapEEM Corrected","cmapEEM Corrected"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[0]->Draw("COLZ"); + hcmap_corrected[0]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[0]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + f->cd(); + hcmap_corrected[0]->Write("h_scale_map_corrected_EEM"); + hcmap_corrected[1]->Write("h_scale_map_corrected_EEP"); + + + +} \ No newline at end of file diff --git a/EOverPCalibration/macros/Correction_TrackerEffect_EE_MC.cxx b/EOverPCalibration/macros/Correction_TrackerEffect_EE_MC.cxx new file mode 100644 index 00000000000..4b3ff1f1c63 --- /dev/null +++ b/EOverPCalibration/macros/Correction_TrackerEffect_EE_MC.cxx @@ -0,0 +1,384 @@ +#include +#include +#include +#include +#include +#include +#include "TStyle.h" +#include "TROOT.h" +#include "TH1F.h" +#include "TH2F.h" +#include +#include "TFile.h" +#include "TCanvas.h" +// +/// Macro to produce correction taking MC and MCTruth to apply on data for phi structure due to the tracker +// + + +void Correction_TrackerEffect_EE_MC (Char_t* infile1 = "/afs/cern.ch/user/r/rgerosa/scratch0/FastCalibrator/output/IC_MC_4Correction.root", + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + /// by xtal + int nbins = 250; + + /// Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + cout << "Making calibration plots for: " << infile1 << endl; + + + /// imput file with full statistic normlized to the mean in a ring + + TFile *f = new TFile(infile1); + TH2F *hcmap[2]; + hcmap[0] = (TH2F*)f->Get("ICComparison_EEM"); + hcmap[1] = (TH2F*)f->Get("ICComparison_EEP"); + + + /// ring geometry for the endcap + TH2F *hrings[2]; + hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)hcmap[0]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICEMS"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + std::vector number_of_Rings_EEP(40,0); + std::vector number_of_Rings_EEM(40,0); + + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) { hrings[1]->Fill(x,y,ir); + number_of_Rings_EEP.at(ir)++; + } + if(z<0) {hrings[0]->Fill(x,y,ir); + number_of_Rings_EEM.at(ir)++; + } + } + /// Declaration of phi structure coordinate + std::vector phi_line_EEM; + phi_line_EEM.push_back(16.); + phi_line_EEM.push_back(59.5); + phi_line_EEM.push_back(71.5); + phi_line_EEM.push_back(83.5); + phi_line_EEM.push_back(105.); + phi_line_EEM.push_back(123.5); + phi_line_EEM.push_back(145.); + phi_line_EEM.push_back(164.); + phi_line_EEM.push_back(183.5); + phi_line_EEM.push_back(203.5); + phi_line_EEM.push_back(240.); + phi_line_EEM.push_back(297.); + phi_line_EEM.push_back(314.5); + phi_line_EEM.push_back(356.5); + + std::vector phi_line_EEP; + phi_line_EEP.push_back(16.5); + phi_line_EEP.push_back(60.); + phi_line_EEP.push_back(72.); + phi_line_EEP.push_back(85.); + phi_line_EEP.push_back(105.); + phi_line_EEP.push_back(123.); + phi_line_EEP.push_back(135.); + phi_line_EEP.push_back(145.); + phi_line_EEP.push_back(163.); + phi_line_EEP.push_back(184.); + phi_line_EEP.push_back(240.); + phi_line_EEP.push_back(287.); + phi_line_EEP.push_back(296.); + phi_line_EEP.push_back(314.); + phi_line_EEP.push_back(356.); + + /// Calcolation of correction factors + std::vector Bad_IC_EEP(phi_line_EEP.size(),0); + std::vector Good_IC_EEP(phi_line_EEP.size(),0); + std::vector Bad_IC_EEM(phi_line_EEM.size(),0); + std::vector Good_IC_EEM(phi_line_EEM.size(),0); + std::vector sum_Bad_IC_EEP(phi_line_EEP.size(),0),sum_Good_IC_EEP(phi_line_EEP.size(),0),sum_Good_IC_EEM(phi_line_EEM.size(),0),sum_Bad_IC_EEM(phi_line_EEM.size(),0); + std::vector num_Bad_IC_EEP(phi_line_EEP.size(),0),num_Good_IC_EEP(phi_line_EEP.size(),0),num_Good_IC_EEM(phi_line_EEM.size(),0),num_Bad_IC_EEM(phi_line_EEM.size(),0); + + TH2F *Bad_EEP = (TH2F*) hcmap[0]->Clone("Bad_EEP"); + TH2F *Bad_EEM = (TH2F*) hcmap[1]->Clone("Bad_EEM"); + Bad_EEP->Reset(); + Bad_EEM->Reset(); + Bad_EEP->ResetStats(); + Bad_EEM->ResetStats(); + + + for(int k=0 ; k<2 ; k++) + { + for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) + { + for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) + { + if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; + float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); + if(phi_xtal<0.) phi_xtal=360.+phi_xtal; + if(k==0) + { + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) + { + float deltaphi=0; + int ir = hrings[0]->GetBinContent(ix,iy); + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; + if(ir>=32) continue; + float dphi=0; + if(fabs(phi_xtal-phi_line_EEM.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect)); + if(dphiGetBinContent(ix,iy)>1.05) continue; + sum_Bad_IC_EEM[ivect]=sum_Bad_IC_EEM[ivect]+hcmap[k]->GetBinContent(ix,iy); + num_Bad_IC_EEM[ivect]++; + Bad_EEM->Fill(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + } + else{ + sum_Good_IC_EEM[ivect] = sum_Good_IC_EEM[ivect] +hcmap[k]->GetBinContent(ix,iy); + num_Good_IC_EEM[ivect]++; + } + } + } + + else{ + for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) + { + int ir = hrings[1]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; + if(ir>=33) continue; + float dphi; + if(fabs(phi_xtal-phi_line_EEP.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect)); + + if(dphiGetBinContent(ix,iy)>1.05) continue; + sum_Bad_IC_EEP[ivect]=sum_Bad_IC_EEP[ivect]+hcmap[k]->GetBinContent(ix,iy); + num_Bad_IC_EEP[ivect]++; + Bad_EEP->Fill(ix,iy,hcmap[k]->GetBinContent(ix,iy));} + else{ + sum_Good_IC_EEP[ivect] = sum_Good_IC_EEP[ivect] +hcmap[k]->GetBinContent(ix,iy); + num_Good_IC_EEP[ivect]++;} + } + + } + } + } + } + /// Vectors of empiric correction factors + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++){ + if(num_Bad_IC_EEM[ivect]!=0) + Bad_IC_EEM.at(ivect)=sum_Bad_IC_EEM[ivect]/num_Bad_IC_EEM[ivect]; + if(num_Good_IC_EEM[ivect]!=0) + Good_IC_EEM.at(ivect)= sum_Good_IC_EEM[ivect]/num_Good_IC_EEM[ivect]; + cout<<" Good/Bad - "<< Good_IC_EEM.at(ivect)/Bad_IC_EEM.at(ivect)<Clone("h_scale_map_EEM"); + hcmap_corrected[1] = (TH2F*)hcmap[1]->Clone("h_scale_map_EEP"); + hcmap_corrected[0] ->Reset("ICMES"); + hcmap_corrected[1] ->Reset("ICMES"); + hcmap_corrected[0] ->ResetStats(); + hcmap_corrected[1] ->ResetStats(); + + for(int k=0 ; k<2 ; k++) + { + for(int ix =0; ix < hcmap[k]->GetNbinsX(); ix++) + { + for(int iy =0; iy< hcmap[k]->GetNbinsY() ; iy++) + { + if(hcmap[k]->GetBinContent(ix,iy)==0 ) continue; + float phi_xtal = atan2(iy-50.5,ix-50.5)*360./(2.*3.14159); + if(phi_xtal<0.) phi_xtal=360.+phi_xtal; + if(k==0) + { int flag=0; + for(int ivect =0 ; ivect < phi_line_EEM.size() ; ivect++) + { + int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEM.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEM.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEM.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEM.at(ivect)); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*Good_IC_EEM.at(ivect)/Bad_IC_EEM.at(ivect)); +// cout<<"original "<GetBinContent(ix,iy)<<" Corrected "<GetBinContent(ix,iy)<SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1;} + } + } + + else{ int flag=0; + for(int ivect =0 ; ivect < phi_line_EEP.size() ; ivect++) + { + int ir = hrings[0]->GetBinContent(ix,iy); + float deltaphi; + if(ir<10 && ir>=1) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.7; + if(ir>=10 && ir<20) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.4; + if(ir>=20 && ir<33) deltaphi = (360./number_of_Rings_EEP.at(ir))*1.; + if(ir>=33) hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + float dphi; + if(fabs(phi_xtal-phi_line_EEP.at(ivect))<180.) dphi=fabs(phi_xtal-phi_line_EEP.at(ivect)); + else dphi=360.-fabs(phi_xtal-phi_line_EEP.at(ivect)); + if(dphiGetBinContent(ix,iy)>1.05) continue; + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)*Good_IC_EEP.at(ivect)/Bad_IC_EEP.at(ivect)); + } + else if(flag==0) + { + hcmap_corrected[k]->SetBinContent(ix,iy,hcmap[k]->GetBinContent(ix,iy)); + flag=1; + } + } + } + + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP Uncorrected"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap[1]->Draw("COLZ"); + hcmap[1]->GetXaxis() ->SetTitle("ix"); + hcmap[1]->GetYaxis() ->SetTitle("iy"); + hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[0] = new TCanvas("cEEM","cmapEEM Uncorrected"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap[0]->Draw("COLZ"); + hcmap[0]->GetXaxis() ->SetTitle("ix"); + hcmap[0]->GetYaxis() ->SetTitle("iy"); + hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + // --- plot 0 : map of coefficients + cEEP[1] = new TCanvas("cmapEEP","cmapEEP"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + Bad_EEP->GetXaxis() -> SetLabelSize(0.03); + Bad_EEP->Draw("COLZ"); + Bad_EEP->GetXaxis() ->SetTitle("ix"); + Bad_EEP->GetYaxis() ->SetTitle("iy"); + Bad_EEP->GetZaxis() ->SetRangeUser(0.85,1.15); + + cEEM[1] = new TCanvas("cmapEEM","cmapEEM"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + Bad_EEM->GetXaxis() -> SetLabelSize(0.03); + Bad_EEM->Draw("COLZ"); + Bad_EEM->GetXaxis() ->SetTitle("ix"); + Bad_EEM->GetYaxis() ->SetTitle("iy"); + Bad_EEM->GetZaxis() ->SetRangeUser(0.85,1.15); + + // --- plot 0 : map of coefficients + cEEP[2] = new TCanvas("cmapEEP Corrected","cmapEEP Corrected"); + cEEP[2] -> cd(); + cEEP[2]->SetLeftMargin(0.1); + cEEP[2]->SetRightMargin(0.13); + cEEP[2]->SetGridx(); + cEEP[2]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[1]->Draw("COLZ"); + hcmap_corrected[1]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[1]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[2] = new TCanvas("cmapEEM Corrected","cmapEEM Corrected"); + cEEM[2] -> cd(); + cEEM[2]->SetLeftMargin(0.1); + cEEM[2]->SetRightMargin(0.13); + cEEM[2]->SetGridx(); + cEEM[2]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap_corrected[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_corrected[0]->Draw("COLZ"); + hcmap_corrected[0]->GetXaxis() ->SetTitle("ix"); + hcmap_corrected[0]->GetYaxis() ->SetTitle("iy"); + hcmap_corrected[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + + + + +} \ No newline at end of file diff --git a/EOverPCalibration/macros/DrawCalibrationPlotsEB.C b/EOverPCalibration/macros/DrawCalibrationPlotsEB.C new file mode 100644 index 00000000000..94fcdd1a8ca --- /dev/null +++ b/EOverPCalibration/macros/DrawCalibrationPlotsEB.C @@ -0,0 +1,442 @@ + +// +// Macro to produce ECAL single electron calibration plots +// + +void DrawCalibrationPlotsEB( Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", + Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", + Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_Single_Double_Electron_recoFlag/EB/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_noEP.root", + int evalStat = 0, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + // by TT + int nbins = 500; + + // by xtal + //int nbins = 500; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile1 << endl; + + TFile *f = new TFile(infile1); + TH2F *h_scale_EB = (TH2F*)f->Get("h_scale_EB"); + TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); + hcmap -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + + //----------------------------------------------------------------- + //--- Build the precision vs ieta plot starting from the TH2F of IC + //----------------------------------------------------------------- + TH1F *hoccall = new TH1F("hoccall", "hoccall", 1000,0.,1000.); + for (int jbin = 1; jbin < h_occupancy-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < h_occupancy-> GetNbinsX()+1; ibin++){ + float ic = h_occupancy->GetBinContent(ibin,jbin); + hoccall->Fill(ic); + } + } + + TH1F *hspreadall = new TH1F("hspreadall", "hspreadall", 800,0.,2.); + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ + float ic = hcmap->GetBinContent(ibin,jbin); + if (ic>0 && ic<2 && ic !=1) { + hspreadall->Fill(ic); + } + } + } + + + TH1F *hspread[172]; + char hname[100]; + char htitle[100]; + + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + //float etaring = hcmap-> GetYaxis()->GetBinLowEdge(jbin); + float etaring = hcmap-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hspread_ring_ieta%02d",etaring); + hspread[jbin-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ + float ic = hcmap->GetBinContent(ibin,jbin); + if (ic>0 && ic<2 && ic!=1) { + hspread[jbin-1]->Fill(ic); + } + } + } + + TGraphErrors *sigma_vs_ieta = new TGraphErrors(); + sigma_vs_ieta->SetMarkerStyle(20); + sigma_vs_ieta->SetMarkerSize(1); + sigma_vs_ieta->SetMarkerColor(kBlue+2); + + TGraphErrors *scale_vs_ieta = new TGraphErrors(); + scale_vs_ieta->SetMarkerStyle(20); + scale_vs_ieta->SetMarkerSize(1); + scale_vs_ieta->SetMarkerColor(kBlue+2); + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + int np = 0; + for (int i = 1; i < hcmap-> GetNbinsY()+1; i++){ + float etaring = hcmap-> GetYaxis()->GetBinCenter(i); + //float etaring = hcmap-> GetYaxis()->GetBinLowEdge(i); + if (int(etaring)==0) continue; + if (hspread[i-1]-> GetEntries() == 0) continue; + if (fabs(etaring) > 60) hspread[i-1]->Rebin(2); + float e = 0.5*hcmap-> GetYaxis()->GetBinWidth(i); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspread[i-1]->GetRMS()); + fgaus->SetRange(1-5*hspread[i-1]->GetRMS(),1+5*hspread[i-1]->GetRMS()); + hspread[i-1]->Fit("fgaus","QR"); + sigma_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(2)/fgaus->GetParameter(1)); + //cout << etaring << " " << fgaus->GetParameter(2)/fgaus->GetParameter(1) << endl; + sigma_vs_ieta-> SetPointError(np, e ,fgaus->GetParError(2)/fgaus->GetParameter(1)); + scale_vs_ieta-> SetPoint(np,etaring,fgaus->GetParameter(1)); + scale_vs_ieta-> SetPointError(np,e,fgaus->GetParError(1)); + np++; + + } + + + if (evalStat){ + TFile *f2 = new TFile(infile2); + TH2F *h_scale_EB_2 = (TH2F*)f2->Get("h_scale_EB"); + TH2F *hcmap2 = (TH2F*) h_scale_EB->Clone("hcmap2"); + hcmap2 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_2->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_2->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_2->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap2->SetBinContent(iPhi,iEta,h_scale_EB_2->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + TFile *f3 = new TFile(infile3); + TH2F *h_scale_EB_3 = (TH2F*)f3->Get("h_scale_EB"); + TH2F *hcmap3 = (TH2F*) h_scale_EB->Clone("hcmap3"); + hcmap3 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_3->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_3->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_3->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap3->SetBinContent(iPhi,iEta,h_scale_EB_3->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + TH1F *hstatprecision[171]; + + for (int jbin = 1; jbin < hcmap2-> GetNbinsY()+1; jbin++){ + //int etaring = -85+(jbin-1); + float etaring = hcmap2-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hstatprecision_ring_ieta%02d",etaring); + hstatprecision[jbin-1] = new TH1F(hname, hname, nbins,-0.5,0.5); + for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ + float ic1 = hcmap2->GetBinContent(ibin,jbin); + float ic2 = hcmap3->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hstatprecision[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); // sigma (diff/sum) gives the stat. precision on teh entire sample + } + } + + + } + + TGraphErrors *statprecision_vs_ieta = new TGraphErrors(); + statprecision_vs_ieta->SetMarkerStyle(20); + statprecision_vs_ieta->SetMarkerSize(1); + statprecision_vs_ieta->SetMarkerColor(kRed+2); + + int n = 0; + for (int i = 1; i < hcmap2-> GetNbinsY()+1; i++){ + etaring = hcmap2-> GetYaxis()->GetBinCenter(i); + //etaring = hcmap2-> GetYaxis()->GetBinLowEdge(i); + if (etaring==0) continue; + if ( hstatprecision[i-1]->GetEntries() == 0) continue; + if (fabs(etaring) > 60)hstatprecision[i-1]->Rebin(2); + float e = 0.5*hcmap2-> GetYaxis()->GetBinWidth(i); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecision[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecision[i-1]->GetRMS(),5*hstatprecision[i-1]->GetRMS()); + hstatprecision[i-1]->Fit("fgaus","QR"); + statprecision_vs_ieta-> SetPoint(n,etaring,fgaus->GetParameter(2)); + statprecision_vs_ieta-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + TGraphErrors *residual_vs_ieta = new TGraphErrors(); + residual_vs_ieta->SetMarkerStyle(20); + residual_vs_ieta->SetMarkerSize(1); + residual_vs_ieta->SetMarkerColor(kGreen+2); + + + + for (int i= 0; i < statprecision_vs_ieta-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_ieta-> GetPoint(i, xdummy, spread ); + espread = sigma_vs_ieta-> GetErrorY(i); + statprecision_vs_ieta-> GetPoint(i, xdummy, stat ); + estat = statprecision_vs_ieta-> GetErrorY(i); + ex = statprecision_vs_ieta-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + cout << residual << " " << eresidual << endl; + residual_vs_ieta->SetPoint(i,xdummy, residual); + residual_vs_ieta->SetPointError(i,ex,eresidual); + + + } + + } + + + + //------------------------------------------------------------------------ + + + + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[10]; + + // --- plot 0 : map of coefficients + c[0] = new TCanvas("cmap","cmap"); + c[0] -> cd(); + c[0]->SetLeftMargin(0.1); + c[0]->SetRightMargin(0.13); + c[0]->SetGridx(); + hcmap->GetXaxis()->SetNdivisions(1020); + hcmap->GetXaxis() -> SetLabelSize(0.03); + hcmap->Draw("COLZ"); + hcmap->GetXaxis() ->SetTitle("i#phi"); + hcmap->GetYaxis() ->SetTitle("i#eta"); + hcmap->GetZaxis() ->SetRangeUser(0.9,1.1); + + c[7] = new TCanvas("cmap2","cmap2"); + c[7] -> cd(); + c[7]->SetLeftMargin(0.1); + c[7]->SetRightMargin(0.13); + c[7]->SetGridx(); + h_scale_EB->GetXaxis()->SetNdivisions(1020); + h_scale_EB->GetXaxis() -> SetLabelSize(0.03); + h_scale_EB->Draw("COLZ"); + h_scale_EB->GetXaxis() ->SetTitle("i#phi"); + h_scale_EB->GetYaxis() ->SetTitle("i#eta"); + h_scale_EB->GetZaxis() ->SetRangeUser(0.9,1.1); + + + + + // --- plot 1 : ring precision vs ieta + c[1] = new TCanvas("csigma","csigma"); + c[1]->SetGridx(); + c[1]->SetGridy(); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + sigma_vs_ieta->Draw("ap"); + if (evalStat){ + statprecision_vs_ieta->Draw("psame"); + sigma_vs_ieta->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ieta,"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ieta,"spread", "LP"); + leg->Draw("same"); + } + + // --- plot 2 : scale vs ieta + c[2] = new TCanvas("c_scale_vs_ieta","c_scale_vs_ieta"); + c[2]->SetGridx(); + c[2]->SetGridy(); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.95,1.05); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + scale_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("scale"); + scale_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + scale_vs_ieta->Draw("ap"); + + // --- plot 3 : spread all coefficients + c[3] = new TCanvas("cspread","cspread",500,500); + hspreadall->SetFillStyle(3004); + hspreadall->SetFillColor(kGreen+2); + hspreadall->GetXaxis()-> SetRangeUser(0.8,1.2); + hspreadall->GetXaxis()-> SetTitle("c"); + hspreadall->Draw("hs"); + gPad->Update(); + + TPaveStats *s_spread = (TPaveStats*)(hspreadall->GetListOfFunctions()->FindObject("stats")); + s_spread -> SetX1NDC(0.55); //new x start position + s_spread -> SetX2NDC(0.85); //new x end position + s_spread -> SetY1NDC(0.750); //new x start position + s_spread -> SetY2NDC(0.85); //new x end position + s_spread -> SetOptStat(1110); + s_spread -> SetTextColor(kGreen+2); + s_spread -> SetTextSize(0.03); + s_spread -> Draw("sames"); + + //--- plot 4 : occupancy map + c[4] = new TCanvas("cOcc","cOcc"); + c[4]->SetLeftMargin(0.1); + c[4]->SetRightMargin(0.13); + c[4]-> cd(); + c[4]->SetGridx(); + h_occupancy->GetXaxis()->SetNdivisions(1020); + h_occupancy->GetXaxis() -> SetLabelSize(0.03); + h_occupancy->Draw("COLZ"); + h_occupancy->GetXaxis() ->SetTitle("i#phi"); + h_occupancy->GetYaxis() ->SetTitle("i#eta"); + + + // --- plot 5 : statistical precision vs ieta + if (evalStat){ + c[5] = new TCanvas("cstat","cstat"); + c[5]->SetGridx(); + c[5]->SetGridy(); + statprecision_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + statprecision_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ieta->Draw("ap"); + +// TF1 *fp = new TF1("fp","pol0"); +// fp->SetRange(-40,40); +// statprecision_vs_ieta->Fit("fp","QRN"); +// float stat = fp->GetParameter(0); +// float estat = fp->GetParError(0); +// cout << "Statistical precision in |ieta| < 40 --> " << stat << " +/- " << estat << endl; +// sigma_vs_ieta->Fit("fp","QRN"); +// float spread = fp->GetParameter(0); +// float espread = fp->GetParError(0); +// cout << "Spread in |ieta| < 40 --> " << spread << " +/- " << espread << endl; +// float residual = sqrt( spread*spread - stat*stat ); +// float eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; +// cout << "Residual miscalibration : " << residual << " +/- " << eresidual << endl; + + c[6] = new TCanvas("cresidual","cresidual"); + c[6]->SetGridx(); + c[6]->SetGridy(); + residual_vs_ieta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); + residual_vs_ieta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ieta->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ieta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ieta->Draw("ap"); + + + } + + //----------------------------------------------------------------- + //--- Print plots + //----------------------------------------------------------------- + + if (printPlots){ + + //gStyle->SetOptStat(1110); + c[0]->Print("IC_map.png",fileType); + c[1]->Print("IC_precision_vs_ieta.png",fileType); + c[2]->Print("IC_scale_vs_ieta.png",fileType); + c[3]->Print("IC_spread.png",fileType); + c[4]->Print("occupancy_map.png",fileType); + } +} diff --git a/EOverPCalibration/macros/DrawCalibrationPlotsEB_phiGroups.C b/EOverPCalibration/macros/DrawCalibrationPlotsEB_phiGroups.C new file mode 100644 index 00000000000..10534cc792b --- /dev/null +++ b/EOverPCalibration/macros/DrawCalibrationPlotsEB_phiGroups.C @@ -0,0 +1,406 @@ +// +// Macro to produce ECAL single electron calibration plots +// + +void DrawCalibrationPlotsEB_phiGroups(Char_t* infile1 = +"/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", + Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/Even_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", + Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EB/Odd_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_noEP.root", + int evalStat = 1, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + + // by xtal + int nbins = 500; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile1 << endl; + + TFile *f = new TFile(infile1); + TH2F *h_scale_EB = (TH2F*)f->Get("h_scale_EB"); + TH2F *hcmap = (TH2F*) h_scale_EB->Clone("hcmap"); + hcmap -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap->SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + + //----------------------------------------------------------------- + //--- Build the precision vs ieta plot starting from the TH2F of IC + //----------------------------------------------------------------- + + TH1F *hspreadGroupEta[34]; + TH1F *hspreadGroupEtaFold[17]; + + char hname[100]; + char htitle[100]; + + int ringGroupSize = 5; + int nStep = 0; + + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + if (jbin < 86 && (jbin-1)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); + hspreadGroupEta[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + sprintf(hname,"hspread_ringGroup_ietaFolded%02d",nStep); + hspreadGroupEtaFold[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + } + if (jbin > 86 && (jbin-2)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); + hspreadGroupEta[nStep-1]= new TH1F(hname, hname, nbins/2,0.5,1.5); + } + + for (int ibin = 1; ibin < hcmap-> GetNbinsX()+1; ibin++){ + float ic = hcmap->GetBinContent(ibin,jbin); + if (ic>0 && ic<2 && ic!=1) { + hspreadGroupEta[nStep-1]->Fill(ic); + if (nStep <= 17) hspreadGroupEtaFold[nStep-1]->Fill(ic); + else hspreadGroupEtaFold[34-nStep]->Fill(ic); + } + } + } + + + TGraphErrors *sigma_vs_GroupEta = new TGraphErrors(); + sigma_vs_GroupEta->SetMarkerStyle(20); + sigma_vs_GroupEta->SetMarkerSize(1); + sigma_vs_GroupEta->SetMarkerColor(kBlue+2); + + TGraphErrors *sigma_vs_GroupEtaFold = new TGraphErrors(); + sigma_vs_GroupEtaFold->SetMarkerStyle(20); + sigma_vs_GroupEtaFold->SetMarkerSize(1); + sigma_vs_GroupEtaFold->SetMarkerColor(kBlue+2); + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + int np = 0; + for (int i = 1; i < 35; i++){ + float etaring = hcmap->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspreadGroupEta[i-1]->GetRMS()); + fgaus->SetRange(1-5*hspreadGroupEta[i-1]->GetRMS(),1+5*hspreadGroupEta[i-1]->GetRMS()); + hspreadGroupEta[i-1]->Fit("fgaus","QR"); + + sigma_vs_GroupEta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + sigma_vs_GroupEta-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + np = 0; + for (int i = 1; i < 18; i++){ + float etaring = hcmap->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspreadGroupEtaFold[i-1]->GetRMS()); + fgaus->SetRange(1-5*hspreadGroupEtaFold[i-1]->GetRMS(),1+5*hspreadGroupEtaFold[i-1]->GetRMS()); + hspreadGroupEtaFold[i-1]->Fit("fgaus","QR"); + + sigma_vs_GroupEtaFold-> SetPoint(np,fabs(etaring),fgaus->GetParameter(2)); + sigma_vs_GroupEtaFold-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + + if (evalStat){ + TFile *f2 = new TFile(infile2); + TH2F *h_scale_EB_2 = (TH2F*)f2->Get("h_scale_EB"); + TH2F *hcmap2 = (TH2F*) h_scale_EB->Clone("hcmap2"); + hcmap2 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_2->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_2->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_2->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_2->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap2->SetBinContent(iPhi,iEta,h_scale_EB_2->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + + + TFile *f3 = new TFile(infile3); + TH2F *h_scale_EB_3 = (TH2F*)f3->Get("h_scale_EB"); + TH2F *hcmap3 = (TH2F*) h_scale_EB_3->Clone("hcmap3"); + hcmap3 -> Reset("ICEMS"); + + // Mean over phi + + for (int iEta = 1 ; iEta < h_scale_EB_3->GetNbinsY()+1 ; iEta ++) + { + float SumIC = 0; + int numIC = 0; + + for(int iPhi = 1 ; iPhi < h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if( h_scale_EB_3->GetBinContent(iPhi,iEta) !=0) + { + SumIC = SumIC + h_scale_EB_3->GetBinContent(iPhi,iEta); + numIC ++ ; + } + } + + for (int iPhi = 1; iPhi< h_scale_EB_3->GetNbinsX()+1 ; iPhi++) + { + if(numIC!=0 && SumIC!=0) + hcmap3->SetBinContent(iPhi,iEta,h_scale_EB_3->GetBinContent(iPhi,iEta)/(SumIC/numIC)); + } + } + TH1F *hstatprecisionGroupEta[34]; + TH1F *hstatprecisionGroupEtaFold[17]; + + nStep = 0; + for (int jbin = 1; jbin < hcmap-> GetNbinsY()+1; jbin++){ + if (jbin < 86 && (jbin-1)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hstatprecision_ringGroup_ieta%02d",nStep); + hstatprecisionGroupEta[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); + sprintf(hname,"hstatprecision_ringGroup_ietaFolded%02d",nStep); + hstatprecisionGroupEtaFold[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); + } + if (jbin > 86 && (jbin-2)%ringGroupSize == 0 ) { + nStep++; + sprintf(hname,"hspread_ringGroup_ieta%02d",nStep); + hstatprecisionGroupEta[nStep-1]= new TH1F(hname, hname, nbins,-0.5,0.5); + } + + for (int ibin = 1; ibin < hcmap2-> GetNbinsX()+1; ibin++){ + float ic1 = hcmap2->GetBinContent(ibin,jbin); + float ic2 = hcmap3->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1) { + hstatprecisionGroupEta[nStep-1]->Fill((ic1-ic2)/(ic1+ic2)); + if (nStep <= 17) hstatprecisionGroupEtaFold[nStep-1]->Fill((ic1-ic2)/(ic1+ic2)); + else hstatprecisionGroupEtaFold[34-nStep]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + + + TGraphErrors *statprecision_vs_GroupEta = new TGraphErrors(); + statprecision_vs_GroupEta->SetMarkerStyle(20); + statprecision_vs_GroupEta->SetMarkerSize(1); + statprecision_vs_GroupEta->SetMarkerColor(kRed+2); + + TGraphErrors *statprecision_vs_GroupEtaFold = new TGraphErrors(); + statprecision_vs_GroupEtaFold->SetMarkerStyle(20); + statprecision_vs_GroupEtaFold->SetMarkerSize(1); + statprecision_vs_GroupEtaFold->SetMarkerColor(kRed+2); + + np = 0; + for (int i = 1; i < 35; i++){ + float etaring = hcmap2->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecisionGroupEta[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionGroupEta[i-1]->GetRMS(),5*hstatprecisionGroupEta[i-1]->GetRMS()); + hstatprecisionGroupEta[i-1]->Fit("fgaus","QR"); + + statprecision_vs_GroupEta-> SetPoint(np,etaring,fgaus->GetParameter(2)); + statprecision_vs_GroupEta-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + np = 0; + for (int i = 1; i < 18; i++){ + float etaring = hcmap2->GetYaxis()->GetBinCenter((ringGroupSize*i + ringGroupSize*(i-1))/2 + 1); + float e = 0.5*ringGroupSize; + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecisionGroupEtaFold[i-1]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionGroupEtaFold[i-1]->GetRMS(),5*hstatprecisionGroupEtaFold[i-1]->GetRMS()); + hstatprecisionGroupEtaFold[i-1]->Fit("fgaus","QR"); + + statprecision_vs_GroupEtaFold-> SetPoint(np,fabs(etaring),fgaus->GetParameter(2)); + statprecision_vs_GroupEtaFold-> SetPointError(np,e,fgaus->GetParError(2)); + np++; + } + + + TGraphErrors *residual_vs_GroupEta = new TGraphErrors(); + residual_vs_GroupEta->SetMarkerStyle(20); + residual_vs_GroupEta->SetMarkerSize(1); + residual_vs_GroupEta->SetMarkerColor(kGreen+2); + + TGraphErrors *residual_vs_GroupEtaFold = new TGraphErrors(); + residual_vs_GroupEtaFold->SetMarkerStyle(20); + residual_vs_GroupEtaFold->SetMarkerSize(1); + residual_vs_GroupEtaFold->SetMarkerColor(kGreen+2); + + for (int i= 0; i < statprecision_vs_GroupEta-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_GroupEta-> GetPoint(i, xdummy, spread); + espread = sigma_vs_GroupEta-> GetErrorY(i); + statprecision_vs_GroupEta-> GetPoint(i, xdummy, stat); + estat = statprecision_vs_GroupEta-> GetErrorY(i); + ex = statprecision_vs_GroupEta-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + residual_vs_GroupEta->SetPoint(i,xdummy, residual); + residual_vs_GroupEta->SetPointError(i,ex,eresidual); + } + + for (int i= 0; i < statprecision_vs_GroupEtaFold-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_GroupEtaFold-> GetPoint(i, xdummy, spread); + espread = sigma_vs_GroupEtaFold-> GetErrorY(i); + statprecision_vs_GroupEtaFold-> GetPoint(i, xdummy, stat); + estat = statprecision_vs_GroupEtaFold-> GetErrorY(i); + ex = statprecision_vs_GroupEtaFold-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + residual_vs_GroupEtaFold->SetPoint(i,xdummy, residual); + residual_vs_GroupEtaFold->SetPointError(i,ex,eresidual); + } + +} + + //------------------------------------------------------------------------ + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[4]; + + c[0] = new TCanvas("csigma","csigma"); + c[0]->SetGridx(); + c[0]->SetGridy(); + sigma_vs_GroupEta->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); + sigma_vs_GroupEta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_GroupEta->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_GroupEta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + sigma_vs_GroupEta->Draw("ap"); + if (evalStat){ + statprecision_vs_GroupEta->Draw("psame"); + sigma_vs_GroupEta->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_GroupEta,"statistical precision", "LP"); + leg->AddEntry(sigma_vs_GroupEta,"spread", "LP"); + leg->Draw("same"); + } + + c[1] = new TCanvas("csigmaFold","csigmaFold"); + c[1]->SetGridx(); + c[1]->SetGridy(); + sigma_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.10); + sigma_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetRangeUser(0,85); + sigma_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetTitle("|i#eta|"); + sigma_vs_GroupEtaFold->Draw("ap"); + if (evalStat){ + statprecision_vs_GroupEtaFold->Draw("psame"); + sigma_vs_GroupEtaFold->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_GroupEtaFold,"statistical precision", "LP"); + leg->AddEntry(sigma_vs_GroupEtaFold,"spread", "LP"); + leg->Draw("same"); + } + + + c[2] = new TCanvas("cresidual","cresidual"); + c[2]->SetGridx(); + c[2]->SetGridy(); + residual_vs_GroupEta->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); + residual_vs_GroupEta->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_GroupEta->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_GroupEta->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_GroupEta->Draw("ap"); + + c[3] = new TCanvas("cresidualFold","cresidualFold"); + c[3]->SetGridx(); + c[3]->SetGridy(); + residual_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.05); + residual_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetRangeUser(0,85); + residual_vs_GroupEtaFold->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_GroupEtaFold->GetHistogram()->GetXaxis()-> SetTitle("|i#eta|"); + residual_vs_GroupEtaFold->Draw("ap"); + + +} diff --git a/EOverPCalibration/macros/DrawCalibrationPlotsEE.C b/EOverPCalibration/macros/DrawCalibrationPlotsEE.C new file mode 100644 index 00000000000..aa096a86431 --- /dev/null +++ b/EOverPCalibration/macros/DrawCalibrationPlotsEE.C @@ -0,0 +1,763 @@ +#include +#include +#include +#include +#include +#include +#include "TFile.h" +#include "TStyle.h" +#include "TH2F.h" +#include "TH1F.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TF1.h" +#include "TROOT.h" +#include "TLegend.h" +#include "TPaveStats.h" +// +/// Macro to produce ECAL single electron calibration plots for EE +/// Input Files : MC or Data splistat and no splitstat, MCTruth and MCReco IC maps EE +/// Output Files : StatPrec_MC_EE.root --> stat precision MC usefull for CompareCalibMCTruth_EE.C only MC +/// IC_MC_4Correction.root --> Map IC for radial correction only MC +// +using namespace std; + +void DrawCalibrationPlotsEE ( + Char_t* infile1 = "data_LC_20120131_ALPHA_test_prompt/SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", + Char_t* infile2 = "data_LC_20120131_ALPHA_test_prompt/Even_SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", + Char_t* infile3 = "data_LC_20120131_ALPHA_test_prompt/Odd_SingleElectron_Run2011AB-WElectron-data_LC_20120131_ALPHA_test_prompt_EoPcaibEE_11032011_Z_R9_EE.root", + //Char_t* infile1 = "FT_R_42_V21B/WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", + //Char_t* infile2 = "FT_R_42_V21B/Even_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", + //Char_t* infile3 = "FT_R_42_V21B/Odd_WZAnalysis_PromptSkim_W-DoubleElectron_FT_R_42_V21B_Z_R9_EE.root", + int evalStat = 1, + bool isMC=false, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + bool printPlots = false; + + /// by xtal + + int nbins = 250; + + /// Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(11110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile1 << endl; + + + /// imput file with full statistic normlized to the mean in a ring + + TFile *f = new TFile(infile1); + TH2F *hcmap[2]; + hcmap[0] = (TH2F*)f->Get("h_scale_map_EEM"); + hcmap[1] = (TH2F*)f->Get("h_scale_map_EEP"); + + + /// ring geometry for the endcap + TH2F *hrings[2]; + hrings[0] = (TH2F*)hcmap[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)hcmap[0]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICMES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); + } + + TFile *f4 = TFile::Open("MCtruthIC_EE.root"); + TFile *f5 = TFile::Open("MCRecoIC_EE.root"); + + TH2F *hcmapMcT_EEP = (TH2F*)f4->Get("h_scale_EEP"); + TH2F *hcmapMcT_EEM = (TH2F*)f4->Get("h_scale_EEM"); + TH2F *hcmapMcR_EEP = (TH2F*)f5->Get("h_scale_EEP"); + TH2F *hcmapMcR_EEM = (TH2F*)f5->Get("h_scale_EEM"); + + + ///-------------------------------------------------------------------------------- + ///--- Build the precision vs ring plot starting from the TH2F of IC folded and not + ///-------------------------------------------------------------------------------- + + char hname[100]; + char htitle[100]; + TH1F *hspread[2][50]; + TH1F* hspreadAll [40]; + + TH2F* ICComparison [2]; + ICComparison[0] = (TH2F*) hcmapMcT_EEP->Clone("ICComparison_EEM"); + ICComparison[1] = (TH2F*) hcmapMcT_EEM->Clone("ICComparison_EEP"); + ICComparison[0]->Reset("ICMES"); + ICComparison[1]->Reset("ICMES"); + ICComparison[0]->ResetStats(); + ICComparison[1]->ResetStats(); + + + for (int k = 0; k < 2; k++){ + + for (int iring = 0; iring < 40 ; iring++){ + if (k==0) + { + sprintf(hname,"hspreadAll_ring%02d",iring); + hspreadAll[iring] = new TH1F(hname, hname, nbins,0.,2.); + sprintf(hname,"hspreadEEM_MCTruth_ring%02d",iring); + hspread[k][iring] = new TH1F(hname, hname, nbins,0.,2.); + + } + else{ + + sprintf(hname,"hspreadEEP_ring%02d",iring); + hspread[k][iring] = new TH1F(hname, hname, nbins,0.,2.); + + } + } + } + + /// spread all distribution, spread for EE+ and EE- and comparison with the MC truth + for (int k = 0; k < 2 ; k++){ + for (int ix = 1; ix < 101; ix++){ + for (int iy = 1; iy < 101; iy++){ + int iz = k; + if (k==0) iz = -1; + int mybin = hcmap[k] -> FindBin(ix,iy); + int ring = hrings[1]-> GetBinContent(mybin); + float ic = hcmap[k]->GetBinContent(mybin); + float ic2=0; + if(k==0 && hcmapMcT_EEM->GetBinContent(mybin)!=0 && hcmapMcR_EEM->GetBinContent(mybin)!=0 ) ic2 = hcmapMcT_EEM->GetBinContent(mybin)/hcmapMcR_EEM->GetBinContent(mybin); + else if(hcmapMcT_EEP->GetBinContent(mybin)!=0 && hcmapMcR_EEP->GetBinContent(mybin)!=0 ) ic2 = hcmapMcT_EEP->GetBinContent(mybin)/hcmapMcR_EEP->GetBinContent(mybin); + + if ( ic>0 && ic2>0 ) { + hspread[k][ring]->Fill(ic); + hspreadAll[ring]->Fill(ic); + ICComparison[k]->Fill(ix,iy,ic/ic2); + } + } + } + } + + /// Graph Error for spread EE+ and EE- + + TGraphErrors *sigma_vs_ring[3]; + sigma_vs_ring[0] = new TGraphErrors(); + sigma_vs_ring[0]->SetMarkerStyle(20); + sigma_vs_ring[0]->SetMarkerSize(1); + sigma_vs_ring[0]->SetMarkerColor(kBlue+2); + + sigma_vs_ring[1] = new TGraphErrors(); + sigma_vs_ring[1]->SetMarkerStyle(20); + sigma_vs_ring[1]->SetMarkerSize(1); + sigma_vs_ring[1]->SetMarkerColor(kBlue+2); + + sigma_vs_ring[2] = new TGraphErrors(); + sigma_vs_ring[2]->SetMarkerStyle(20); + sigma_vs_ring[2]->SetMarkerSize(1); + sigma_vs_ring[2]->SetMarkerColor(kBlue+2); + + /// Graph for scale vs ring EE+, EE- and folded + + TGraphErrors *scale_vs_ring[3]; + scale_vs_ring[0] = new TGraphErrors(); + scale_vs_ring[0]->SetMarkerStyle(20); + scale_vs_ring[0]->SetMarkerSize(1); + scale_vs_ring[0]->SetMarkerColor(kBlue+2); + + scale_vs_ring[1] = new TGraphErrors(); + scale_vs_ring[1]->SetMarkerStyle(20); + scale_vs_ring[1]->SetMarkerSize(1); + scale_vs_ring[1]->SetMarkerColor(kBlue+2); + + scale_vs_ring[2] = new TGraphErrors(); + scale_vs_ring[2]->SetMarkerStyle(20); + scale_vs_ring[2]->SetMarkerSize(1); + scale_vs_ring[2]->SetMarkerColor(kBlue+2); + + + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + int np[3] = {0}; + + /// Gaussian fit for EE+ and EE- + + for (int k = 0; k < 2 ; k++){ + for (int iring = 0; iring < 40; iring++){ + if (hspread[k][iring]-> GetEntries() == 0) continue; + float e = 0.5*hcmap[k]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspread[k][iring]->GetRMS()); + fgaus->SetRange(1-5*hspread[k][iring]->GetRMS(),1+5*hspread[k][iring]->GetRMS()); + hspread[k][iring]->Fit("fgaus","QR"); + sigma_vs_ring[k]-> SetPoint(np[k],iring,fgaus->GetParameter(2)); + sigma_vs_ring[k]-> SetPointError(np[k], e ,fgaus->GetParError(2)); + scale_vs_ring[k]-> SetPoint(np[k],iring,fgaus->GetParameter(1)); + scale_vs_ring[k]-> SetPointError(np[k],e,fgaus->GetParError(1)); + np[k]++; + } + } + + for (int iring = 0; iring < 40; iring++){ + if (hspreadAll[iring]-> GetEntries() == 0) continue; + float e = 0.5*hcmap[0]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hspreadAll[iring]->GetRMS()); + fgaus->SetRange(1-5*hspreadAll[iring]->GetRMS(),1+5*hspreadAll[iring]->GetRMS()); + hspreadAll[iring]->Fit("fgaus","QR"); + sigma_vs_ring[2]-> SetPoint(np[2],iring,fgaus->GetParameter(2)); + sigma_vs_ring[2]-> SetPointError(np[2], e ,fgaus->GetParError(2)); + scale_vs_ring[2]-> SetPoint(np[2],iring,fgaus->GetParameter(1)); + scale_vs_ring[2]-> SetPointError(np[2],e,fgaus->GetParError(1)); + np[2]++; + } + + /// Intercalibration constant vs phi + + /* TGraphErrors *IC_vs_phi[2]; + IC_vs_phi[0] = new TGraphErrors(); + IC_vs_phi[0]->SetMarkerStyle(20); + IC_vs_phi[0]->SetMarkerSize(1); + IC_vs_phi[0]->SetMarkerColor(kBlue+2); + + IC_vs_phi[1] = new TGraphErrors(); + IC_vs_phi[1]->SetMarkerStyle(20); + IC_vs_phi[1]->SetMarkerSize(1); + IC_vs_phi[1]->SetMarkerColor(kBlue+2); + + TH1F* Spread_vs_phi[2][360]; + + for (int k = 0; k < 2; k++){ + for (int iphi = 0; iphi < 360 ; iphi++){ + if (k==0) + { + sprintf(hname,"hspread_vs_phi%02d_EEP",iphi); + Spread_vs_phi[k][iphi] = new TH1F(hname, hname, nbins,0.,2.); + + } + else{ + sprintf(hname,"hspread_vs_ring%02d_EEM",iphi); + Spread_vs_phi[k][iphi] = new TH1F(hname, hname, nbins,0.,2.);} + } + } + + + for (int k = 0; k < 2 ; k++){ + for (int ix = 1; ix < 101; ix++){ + for (int iy = 1; iy < 101; iy++){ + float iphibin; + if((atan2(iy-50.,ix-50.)-int(atan2(iy-50.,ix-50.)))*(360./(2.*3.14159)) <0.5) iphibin=floor(180.+atan2(iy-50.,ix-50.)*(360./(2.*3.14159))); + else iphibin=ceil(180.+atan2(iy-50.,ix-50.)*(360./(2.*3.14159))); + + if(iphibin>359) iphibin=359; + int mybin = hcmap[k] -> FindBin(ix,iy); + float ic = hcmap[k]->GetBinContent(mybin); + if ( ic>0 ) { + Spread_vs_phi[k][iphibin] ->Fill(ic); + } + } + } + } + + int N[2]={0}; + for (int k = 0; k < 2 ; k++){ + for (int iphi = 0; iphi < 360; iphi++){ + if (Spread_vs_phi[k][iphi]-> GetEntries() == 0) continue; + IC_vs_phi[k]-> SetPoint(N[k],iphi,Spread_vs_phi[k][iphi]->GetMean()); + IC_vs_phi[k]-> SetPointError(N[k],0,Spread_vs_phi[k][iphi]->GetRMS()/sqrt(Spread_vs_phi[k][iphi]->GetEntries())); + + N[k]++; + } + } + */ + + ///----------------- Statistical Precision and Residual -------------------- + + TGraphErrors *statprecision_vs_ring[3]; + statprecision_vs_ring[0] = new TGraphErrors(); + statprecision_vs_ring[0]->SetMarkerStyle(20); + statprecision_vs_ring[0]->SetMarkerSize(1); + statprecision_vs_ring[0]->SetMarkerColor(kRed+2); + + statprecision_vs_ring[1] = new TGraphErrors(); + statprecision_vs_ring[1]->SetMarkerStyle(20); + statprecision_vs_ring[1]->SetMarkerSize(1); + statprecision_vs_ring[1]->SetMarkerColor(kRed+2); + + statprecision_vs_ring[2] = new TGraphErrors(); + statprecision_vs_ring[2]->SetMarkerStyle(20); + statprecision_vs_ring[2]->SetMarkerSize(1); + statprecision_vs_ring[2]->SetMarkerColor(kRed+2); + + TGraphErrors *residual_vs_ring[3]; + residual_vs_ring[0] = new TGraphErrors(); + residual_vs_ring[0]->SetMarkerStyle(20); + residual_vs_ring[0]->SetMarkerSize(1); + residual_vs_ring[0]->SetMarkerColor(kGreen+2); + + residual_vs_ring[1] = new TGraphErrors(); + residual_vs_ring[1]->SetMarkerStyle(20); + residual_vs_ring[1]->SetMarkerSize(1); + residual_vs_ring[1]->SetMarkerColor(kGreen+2); + + residual_vs_ring[2] = new TGraphErrors(); + residual_vs_ring[2]->SetMarkerStyle(20); + residual_vs_ring[2]->SetMarkerSize(1); + residual_vs_ring[2]->SetMarkerColor(kGreen+2); + + + if (evalStat){ + + /// acquisition file for statistical precision + + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap2[2]; + hcmap2[0] = (TH2F*)f2->Get("h_scale_map_EEM"); + hcmap2[1] = (TH2F*)f2->Get("h_scale_map_EEP"); + + TH2F *hcmap3[2]; + hcmap3[0] = (TH2F*)f3->Get("h_scale_map_EEM"); + hcmap3[1] = (TH2F*)f3->Get("h_scale_map_EEP"); + + TH1F *hstatprecision[2][40]; + TH1F *hstatprecisionAll[40]; + + /// stat precision histos for each EE ring + for (int k = 0; k < 2; k++){ + for (int iring = 0; iring < 40 ; iring ++){ + + if (k==0) + { sprintf(hname,"hstatprecisionAll_ring%02d",iring); + hstatprecisionAll[iring] = new TH1F(hname, hname, nbins,-2.,2.); + sprintf(hname,"hstatprecisionEEM_ring%02d",iring); + hstatprecision[k][iring] = new TH1F(hname, hname, nbins,-2.,2.); + } + else { + sprintf(hname,"hstatprecisionEEP_ring%02d",iring); + hstatprecision[k][iring] = new TH1F(hname, hname, nbins,-2.,2.); + } + + } + } + + for (int k = 0; k < 2 ; k++){ + for (int ix = 1; ix < 102; ix++){ + for (int iy = 1; iy < 102; iy++){ + int iz = k; + if (k==0) iz = -1; + int mybin = hcmap2[k] -> FindBin(ix,iy); + int ring = hrings[1]-> GetBinContent(mybin); + float ic1 = hcmap2[k]->GetBinContent(mybin); + float ic2 = hcmap3[k]->GetBinContent(mybin); + if (ic1>0 && ic2 >0){ + hstatprecision[k][ring]->Fill((ic1-ic2)/(ic1+ic2)); /// sigma (diff/sum) gives the stat. precision on teh entire sample + hstatprecisionAll[ring]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + } + + + TCanvas* c44 [120]; + /// Gaussian fit of the even/odd distribution (rms of the distribution can be also used) + int n[3] = {0}; + for (int k = 0; k < 2; k++){ + for (int iring = 0; iring < 40 ; iring++){ + if ( hstatprecision[k][iring]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[k]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecision[k][iring]->GetRMS()); + fgaus->SetRange(-5*hstatprecision[k][iring]->GetRMS(),5*hstatprecision[k][iring]->GetRMS()); + TString name = Form("ff%d_%d",iring,k); + + hstatprecision[k][iring]->Fit("fgaus","QR"); + + statprecision_vs_ring[k]-> SetPoint(n[k],iring,fgaus->GetParameter(2)); + statprecision_vs_ring[k]-> SetPointError(n[k],e,fgaus->GetParError(2)); + n[k]++; + } + } + + for (int iring = 0; iring < 40 ; iring++){ + if ( hstatprecisionAll[iring]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[0]-> GetYaxis()->GetBinWidth(1); + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hstatprecisionAll[iring]->GetRMS()); + fgaus->SetRange(-5*hstatprecisionAll[iring]->GetRMS(),5*hstatprecisionAll[iring]->GetRMS()); + TString name = Form("ffAll%d",iring); + hstatprecisionAll[iring]->Fit("fgaus","QR"); + + statprecision_vs_ring[2]-> SetPoint(n[2],iring,fgaus->GetParameter(2)); + statprecision_vs_ring[2]-> SetPointError(n[2],e,fgaus->GetParError(2)); + n[2]++; + } + + + TH1F *hresidual[3]; + hresidual[0] = new TH1F("hresidualEEM","hresidualEEM",1000,0,1); + hresidual[1] = new TH1F("hresidualEEP","hresidualEEP",1000,0,1); + hresidual[2] = new TH1F("hresidualAll","hresidualAll",1000,0,1); + + TH1F *hstat[3]; + hstat[0] = new TH1F("hstatEEM","hstatEEM",1000,0,0.5); + hstat[1] = new TH1F("hstatEEP","hstatEEP",1000,0,0.5); + hstat[2] = new TH1F("hstatAll","hstatAll",1000,0,0.5); + + TH1F *hspre[3]; + hspre[0] = new TH1F("hspreEEM","hspreEEM",1000,0,0.5); + hspre[1] = new TH1F("hspreEEP","hspreEEP",1000,0,0.5); + hspre[2] = new TH1F("hspreAll","hspreAll",1000,0,0.5); + + /// Residual spread plot + + for (int k = 0; k < 3 ; k++){ + for (int i= 0; i < statprecision_vs_ring[k]-> GetN(); i++){ + double spread, espread; + double stat, estat; + double residual, eresidual; + double xdummy,ex; + sigma_vs_ring[k]-> GetPoint(i, xdummy, spread ); + espread = sigma_vs_ring[k]-> GetErrorY(i); + statprecision_vs_ring[k]-> GetPoint(i, xdummy, stat ); + estat = statprecision_vs_ring[k]-> GetErrorY(i); + ex = statprecision_vs_ring[k]-> GetErrorX(i); + if (spread > stat ){ + residual = sqrt( spread*spread - stat*stat ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2))/residual; + } + else { + residual = 0; + eresidual = 0; + } + residual_vs_ring[k]->SetPoint(i,xdummy, residual); + residual_vs_ring[k]->SetPointError(i,ex,eresidual); + } + } + + } + + ///----------------------------------------------------------------- + ///--- Draw plots + ///----------------------------------------------------------------- + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + /// --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cmapEEP","cmapEEP"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap[1]->Draw("COLZ"); + hcmap[1]->GetXaxis() ->SetTitle("ix"); + hcmap[1]->GetYaxis() ->SetTitle("iy"); + hcmap[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[0] = new TCanvas("cmapEEM","cmapEEM"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap[0]->Draw("COLZ"); + hcmap[0]->GetXaxis() ->SetTitle("ix"); + hcmap[0]->GetYaxis() ->SetTitle("iy"); + hcmap[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + /// --- plot 1 : ring precision vs ieta + cEEP[1] = new TCanvas("csigmaEEP","csigmaEEP"); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + sigma_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); + sigma_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("ring"); + sigma_vs_ring[1]->Draw("ap"); + if (evalStat){ + statprecision_vs_ring[1]->Draw("psame"); + sigma_vs_ring[1]->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ring[1],"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ring[1],"spread", "LP"); + leg->Draw("same"); + } + + cEEM[1] = new TCanvas("csigmaEEM","csigmaEEM"); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + sigma_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); + sigma_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("ring"); + sigma_vs_ring[0]->Draw("ap"); + if (evalStat){ + statprecision_vs_ring[0]->Draw("psame"); + sigma_vs_ring[0]->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ring[0],"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ring[0],"spread", "LP"); + leg->Draw("same"); + } + + + /// --- plot 5 : statistical precision vs ieta + if (evalStat){ + cEEP[5] = new TCanvas("cstat","cstat"); + cEEP[5]->SetGridx(); + cEEP[5]->SetGridy(); + statprecision_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + statprecision_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ring[1]->Draw("ap"); + + cEEP[6] = new TCanvas("cresidualP","cresidualP"); + cEEP[6]->SetGridx(); + cEEP[6]->SetGridy(); + residual_vs_ring[1]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + residual_vs_ring[1]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ring[1]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ring[1]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ring[1]->Draw("ap"); + + cEEM[5] = new TCanvas("cstatM","cstatM"); + cEEM[5]->SetGridx(); + cEEM[5]->SetGridy(); + statprecision_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + statprecision_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + statprecision_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("#sigma((c_{P}-c_{D})/(c_{P}+c_{D}))"); + statprecision_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + statprecision_vs_ring[0]->Draw("ap"); + + cEEM[6] = new TCanvas("cresidualM","cresidualM"); + cEEM[6]->SetGridx(); + cEEM[6]->SetGridy(); + residual_vs_ring[0]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + residual_vs_ring[0]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ring[0]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ring[0]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ring[0]->Draw("ap"); + + cEEP[8] = new TCanvas("csigmaFolded","csigmaFolded"); + cEEP[8]->SetGridx(); + cEEP[8]->SetGridy(); + sigma_vs_ring[2]->GetHistogram()->GetYaxis()-> SetRangeUser(0.00,0.20); + sigma_vs_ring[2]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + sigma_vs_ring[2]->GetHistogram()->GetYaxis()-> SetTitle("#sigma_{c}"); + sigma_vs_ring[2]->GetHistogram()->GetXaxis()-> SetTitle("ring"); + sigma_vs_ring[2]->Draw("ap"); + if (evalStat){ + statprecision_vs_ring[2]->Draw("psame"); + sigma_vs_ring[2]->Draw("psame"); + TLegend * leg = new TLegend(0.6,0.7,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(statprecision_vs_ring[2],"statistical precision", "LP"); + leg->AddEntry(sigma_vs_ring[2],"spread", "LP"); + leg->Draw("same"); + } + + cEEP[9] = new TCanvas("cresidualFolded","cresidualFolded"); + cEEP[9]->SetGridx(); + cEEP[9]->SetGridy(); + residual_vs_ring[2]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.10); + residual_vs_ring[2]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ring[2]->GetHistogram()->GetYaxis()-> SetTitle("residual spread"); + residual_vs_ring[2]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + residual_vs_ring[2]->Draw("ap"); + + /// save precision for MC comparison + + if(isMC==true) + { + TFile * output = new TFile ("StatPrec_MC_EE.root","RECREATE"); + output->cd(); + statprecision_vs_ring[0]->SetName("gr_stat_prec_EEP"); + statprecision_vs_ring[1]->SetName("gr_stat_prec_EEM"); + statprecision_vs_ring[2]->SetName("gr_stat_prec"); + + statprecision_vs_ring[0]->Write(); + statprecision_vs_ring[1]->Write(); + statprecision_vs_ring[2]->Write(); + } + } + + /// Comparison Plot MC - Data + TCanvas* canEEP[10], *canEEM[10]; + if(isMC == true) + { + + canEEM[0] = new TCanvas("ICComparison MC EEM","ICComparison MC EEM"); + canEEM[0]->SetGridx(); + canEEM[0]->SetGridy(); + ICComparison[0]->GetXaxis() -> SetLabelSize(0.03); + ICComparison[0]->Draw("COLZ"); + ICComparison[0]->GetXaxis() ->SetTitle("ix"); + ICComparison[0]->GetYaxis() ->SetTitle("iy"); + ICComparison[0]->GetZaxis() ->SetRangeUser(0.85,1.15); + + canEEP[0] = new TCanvas("ICComparison MC EEP","ICComparison MC EEP"); + canEEP[0]->SetGridx(); + canEEP[0]->SetGridy(); + ICComparison[1]->GetXaxis() -> SetLabelSize(0.03); + ICComparison[1]->Draw("COLZ"); + ICComparison[1]->GetXaxis() ->SetTitle("ix"); + ICComparison[1]->GetYaxis() ->SetTitle("iy"); + ICComparison[1]->GetZaxis() ->SetRangeUser(0.85,1.15); + + TFile* output = new TFile ("IC_MC_4Correction.root","RECREATE"); + output->cd(); + ICComparison[0]->Write(); + ICComparison[1]->Write(); + output->Close(); + } + + TFile *exisistingEE = new TFile ("existingEE.root","READ"); + TH2F* exmap = (TH2F*) exisistingEE->Get("endcap"); + + TH2F* warning_Map_EEP = (TH2F*) exmap->Clone("warning_Map_EEP"); + warning_Map_EEP->Reset("ICMES"); + warning_Map_EEP->Reset(); + + TH2F* warning_Map_EEM = (TH2F*) exmap->Clone("warning_Map_EEM"); + warning_Map_EEM->Reset("ICMES"); + warning_Map_EEM->Reset(); + + + if(isMC == false) + { + std::ofstream outTxt ("Calibration_Coefficient_EE_dinamic_alpha.txt",std::ios::out); + + outTxt << "---------------------------------------------------------------" << std::endl; + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << "iX" + << std::fixed << std::setprecision(0) << std::setw(10) << "iY" + << std::fixed << std::setprecision(0) << std::setw(10) << "iZ" + << std::fixed << std::setprecision(6) << std::setw(15) << "IC" + << std::fixed << std::setprecision(6) << std::setw(15) << "error" + << std::endl; + outTxt << "---------------------------------------------------------------" << std::endl; + + for (int ix = 1; ix < hcmap[0]->GetNbinsX()+1 ; ix ++) + { + for (int iy = 1; iy < hcmap[0] -> GetNbinsY()+1; iy++) + { + if( exmap->GetBinContent(ix,iy) !=1) continue; + + double x,statPrec; + statprecision_vs_ring[0]->GetPoint(hrings[0]->GetBinContent(ix,iy),x,statPrec); + + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[0]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[0]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << "-1"; + + if( hcmap[0]->GetBinContent(ix,iy) == 0. ) + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << hcmap[0]->GetBinContent(ix,iy) + << std::fixed << std::setprecision(6) << std::setw(15) << statPrec + << std::endl; + + //warning_Map_EEM->Fill(ix,iy); + } + + } + } + + for (int ix = 1; ix < hcmap[1]->GetNbinsX()+1 ; ix ++) + { + for (int iy = 1; iy < hcmap[1] -> GetNbinsY()+1; iy++) + { + if( exmap->GetBinContent(ix,iy) !=1) continue; + + double x,statPrec; + statprecision_vs_ring[1]->GetPoint(hrings[1]->GetBinContent(ix,iy),x,statPrec); + + outTxt << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[1]->GetXaxis()->GetBinLowEdge(ix) + << std::fixed << std::setprecision(0) << std::setw(10) << hcmap[1]->GetYaxis()->GetBinLowEdge(iy) + << std::fixed << std::setprecision(0) << std::setw(10) << "1"; + + if( hcmap[1]->GetBinContent(ix,iy) == 0. ) + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << "-1." + << std::fixed << std::setprecision(6) << std::setw(15) << "999." + << std::endl; + } + else + { + outTxt << std::fixed << std::setprecision(6) << std::setw(15) << hcmap[1]->GetBinContent(ix,iy) + << std::fixed << std::setprecision(6) << std::setw(15) << statPrec + << std::endl; + + //warning_Map_EEM->Fill(ix,iy); + } + + } + } + } + + + canEEP[1] = new TCanvas("Warning_EEP","Warning_EEP"); + canEEP[1]->SetGridx(); + canEEP[1]->SetGridy(); + warning_Map_EEP->GetXaxis() -> SetLabelSize(0.03); + warning_Map_EEP->Draw("COLZ"); + warning_Map_EEP->GetXaxis() ->SetTitle("ix"); + warning_Map_EEP->GetYaxis() ->SetTitle("iy"); + warning_Map_EEP->GetZaxis() ->SetRangeUser(0.85,1.15); + + canEEM[1] = new TCanvas("Warning_EEM","Warning_EEM"); + canEEM[1]->SetGridx(); + canEEM[1]->SetGridy(); + warning_Map_EEM->GetXaxis() -> SetLabelSize(0.03); + warning_Map_EEM->Draw("COLZ"); + warning_Map_EEM->GetXaxis() ->SetTitle("ix"); + warning_Map_EEM->GetYaxis() ->SetTitle("iy"); + warning_Map_EEM->GetZaxis() ->SetRangeUser(0.85,1.15); + + + +} + diff --git a/EOverPCalibration/macros/DrawEPDistributions.cxx b/EOverPCalibration/macros/DrawEPDistributions.cxx new file mode 100644 index 00000000000..eddd7b97cbb --- /dev/null +++ b/EOverPCalibration/macros/DrawEPDistributions.cxx @@ -0,0 +1,89 @@ +// To Plot E/p distributions for endcap or barrel at different iteration +#include "TH2F.h" +#include "TCanvas.h" +#include +#include "TH1F.h" +#include "TFile.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TLegend.h" +// Input needed: E/p distributions file +void DrawEPDistributions (){ + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gROOT->ForceStyle(); + gStyle->SetOptStat(0); + + + TFile *f1 = TFile::Open("/data1/rgerosa/L3_Weight/PromptSkim_recoFlag/EE/Weight_WZAnalysis_SingleElectron_Run2011AB_WElectron-PromptSkim_Z_R9_EE.root"); + TH1F *EoP_eta_2_iter_0 = (TH1F*)f1->Get("h_24_hC_EoP_eta_0"); + TH1F *EoP_eta_2_iter_4 = (TH1F*)f1->Get("h_24_hC_EoP_eta_10"); + TH1F *EoP_eta_2_iter_14 = (TH1F*)f1->Get("h_24_hC_EoP_eta_24"); + + TH1F *EoP_eta_70_iter_0 = (TH1F*)f1->Get("h_31_hC_EoP_eta_0"); + TH1F *EoP_eta_70_iter_4 = (TH1F*)f1->Get("h_31_hC_EoP_eta_10"); + TH1F *EoP_eta_70_iter_14 = (TH1F*)f1->Get("h_31_hC_EoP_eta_24"); + + + + TCanvas *cEoP2 = new TCanvas("cEoP2","cEoP2"); + cEoP2->SetGridx(); + cEoP2->SetGridy(); + EoP_eta_2_iter_0->GetXaxis()-> SetTitle("E/p"); + EoP_eta_2_iter_0->SetTitle("E/p ring n#circ24"); + EoP_eta_2_iter_0->SetLineColor(kGreen); + EoP_eta_2_iter_0->SetLineWidth(2); + EoP_eta_2_iter_0->SetLineStyle(1); + EoP_eta_2_iter_0->Draw(); + EoP_eta_2_iter_4->SetLineColor(kBlue); + EoP_eta_2_iter_4->SetLineWidth(3); + EoP_eta_2_iter_4->SetLineStyle(7); + EoP_eta_2_iter_4->Draw("same"); + EoP_eta_2_iter_14->SetLineColor(kRed); + EoP_eta_2_iter_14->SetLineWidth(2); + EoP_eta_2_iter_14->SetLineStyle(2); + EoP_eta_2_iter_14->Draw("same"); + TLegend * leg = new TLegend(0.6,0.6,0.89, 0.89); + leg->SetFillColor(0); + leg->AddEntry(EoP_eta_2_iter_0,"EoP at iteration 1", "LP"); + leg->AddEntry(EoP_eta_2_iter_4,"EoP at iteration 10", "LP"); + leg->AddEntry(EoP_eta_2_iter_14,"EoP at iteration 25", "LP"); + + leg->Draw(); + + + TCanvas *cEoP70 = new TCanvas("cEoP70","cEoP70"); + cEoP70->SetGridx(); + cEoP70->SetGridy(); + EoP_eta_70_iter_0->GetXaxis()-> SetTitle("E/p"); + EoP_eta_70_iter_0->SetTitle("E/p ring n#circ31"); + EoP_eta_70_iter_0->SetLineColor(kGreen); + EoP_eta_70_iter_0->SetLineWidth(2); + EoP_eta_70_iter_0->SetLineStyle(1); + EoP_eta_70_iter_0->Draw(); + EoP_eta_70_iter_4->SetLineColor(kBlue); + EoP_eta_70_iter_4->SetLineWidth(3); + EoP_eta_70_iter_4->SetLineStyle(7); + EoP_eta_70_iter_4->Draw("same"); + EoP_eta_70_iter_14->SetLineColor(kRed); + EoP_eta_70_iter_14->SetLineWidth(2); + EoP_eta_70_iter_14->SetLineStyle(2); + EoP_eta_70_iter_14->Draw("same"); + leg->Draw(); + +} \ No newline at end of file diff --git a/EOverPCalibration/macros/DrawMomentumCalibration.cxx b/EOverPCalibration/macros/DrawMomentumCalibration.cxx new file mode 100644 index 00000000000..cd9ed85d38a --- /dev/null +++ b/EOverPCalibration/macros/DrawMomentumCalibration.cxx @@ -0,0 +1,227 @@ +#include +#include "TFile.h" +#include "TGraphErrors.h" +#include "TROOT.h" +#include "TString.h" +#include "TCanvas.h" +#include "TPad.h" +#include "TLegend.h" +#include "TStyle.h" +#include "TH2F.h" + +void DrawMomentumCalibration() +{ + gROOT->SetStyle("Plain"); + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetStatFont(42); + gStyle->SetStatFontSize(0.05); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(10111); + gStyle->SetOptFit(1); + gStyle->SetPalette(1); + gROOT->ForceStyle(); + + TFile *f = TFile::Open("output/MomentumCalibration.root"); + int i=0; + + while(f!=0) + { + + TString Name = Form("g_EoP_EB_%d",i); + TGraphErrors* g_EoP_EB = (TGraphErrors*)f->Get(Name); + Name= Form("g_EoC_EB_%d",i); + TGraphErrors* g_EoC_EB = (TGraphErrors*)f->Get(Name); + Name= Form("g_EoC_EB_%d",i+1); + TGraphErrors* g_EoC_EB2 = (TGraphErrors*)f->Get(Name); + + Name= Form("g_Rat_EB_%d",i); + TGraphErrors* g_Rat_EB = (TGraphErrors*)f->Get(Name); + + if(g_EoP_EB==0 && g_EoC_EB==0 && g_Rat_EB==0) break; + + g_EoP_EB -> SetMarkerStyle(20); + g_EoP_EB -> SetMarkerSize(1); + g_EoP_EB -> SetMarkerColor(kRed+1); + g_EoP_EB -> SetLineColor(kRed+1); + + + g_EoC_EB -> SetMarkerStyle(20); + g_EoC_EB -> SetMarkerSize(1); + g_EoC_EB -> SetMarkerColor(kGreen+1); + g_EoC_EB -> SetLineColor(kGreen+1); + + if(g_EoC_EB2!=0) + { + + g_EoC_EB2 -> SetMarkerStyle(20); + g_EoC_EB2 -> SetMarkerSize(1); + g_EoC_EB2 -> SetMarkerColor(kGreen+1); + g_EoC_EB2 -> SetLineColor(kGreen+1); + + TH2F* correlation = new TH2F("correlation","correlation",50,0.98,1.02,50,0.97,1.03); + for(int i=0; iGetN() && iGetN() ; i++) + { double x,y,z,k; + g_EoC_EB->GetPoint(i,x,y); + g_EoC_EB2->GetPoint(i,z,k); + + correlation->Fill(y,k); + } + correlation->GetXaxis()->SetTitle("mod1-2"); + correlation->GetYaxis()->SetTitle("mod3-4"); + cout<<" correlation "<GetCorrelationFactor()<Draw("colz"); + } +// correlation->Draw("colz"); + g_Rat_EB -> SetMarkerStyle(20); + g_Rat_EB -> SetMarkerSize(1); + g_Rat_EB -> SetMarkerColor(kBlue+2); + g_Rat_EB -> SetLineColor(kBlue+2); + + float phiLim = 360; + Name = Form("g_fit_EB_%d",i); + TCanvas* c_g_fit_EB = new TCanvas(Name, Name,100,100,800,600); + Name = Form("pad_0_EB_%d",i); + TPad *cLower_EB = new TPad(Name,Name,0.00,0.00,1.00,0.30); + Name = Form("pad_1_EB_%d",i); + TPad *cUpper_EB = new TPad(Name,Name,0.00,0.30,1.00,1.00); + + cLower_EB->SetBottomMargin(0.25); cUpper_EB->SetTopMargin(0.01); + cUpper_EB->SetBottomMargin(0.01); + + cLower_EB->Draw(); + cUpper_EB->Draw(); + + float FontSCF = cUpper_EB->GetHNDC()/cLower_EB->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + + cUpper_EB -> cd(); + gPad->SetGrid(); + + TH1F *hPad_EB = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hPad_EB->GetXaxis()->SetLabelSize(labSize); + hPad_EB->GetXaxis()->SetTitleSize(labSize); + hPad_EB->GetYaxis()->SetLabelSize(labSize); + hPad_EB->GetYaxis()->SetTitleSize(labSize); + hPad_EB->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EB->GetYaxis()->SetTitle("M_{Z}^{2}/M_{ee}^{2} #propto p"); + + g_EoP_EB -> Draw("PL"); + g_EoC_EB -> Draw("PL"); + + TLegend *tl_EB = new TLegend(0.80,0.80,0.90,0.95); + tl_EB -> SetTextFont(40); + tl_EB -> SetFillColor(0); + // tl -> SetBorderSize(0); + tl_EB -> AddEntry(g_EoP_EB,"MC EB","PL"); + tl_EB -> AddEntry(g_EoC_EB,"Data EB","PL"); + tl_EB -> Draw(); + + cLower_EB -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EB = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hRat_EB->GetYaxis()->SetNdivisions(505); + hRat_EB->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EB->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EB->GetXaxis()->SetTitleOffset(0.6); + hRat_EB->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EB->GetYaxis()->SetTitle("Data / MC"); + g_Rat_EB->Draw("PL"); + i++; + } + + i=0; + + while (f!=0) { + + TString Name = Form("g_EoP_EE_%d",i); + TGraphErrors* g_EoP_EE = (TGraphErrors*)f->Get(Name); + Name= Form("g_EoC_EE_%d",i); + TGraphErrors* g_EoC_EE = (TGraphErrors*)f->Get(Name); + Name= Form("g_Rat_EE_%d",i); + TGraphErrors* g_Rat_EE = (TGraphErrors*)f->Get(Name); + if(g_EoP_EE==0 && g_EoC_EE==0 && g_Rat_EE==0) break; + + g_EoP_EE -> SetMarkerStyle(20); + g_EoP_EE -> SetMarkerSize(1); + g_EoP_EE -> SetMarkerColor(kRed+1); + g_EoP_EE -> SetLineColor(kRed+1); + + g_EoC_EE -> SetMarkerStyle(20); + g_EoC_EE -> SetMarkerSize(1); + g_EoC_EE -> SetMarkerColor(kGreen+1); + g_EoC_EE -> SetLineColor(kGreen+1); + + g_Rat_EE -> SetMarkerStyle(20); + g_Rat_EE -> SetMarkerSize(1); + g_Rat_EE -> SetMarkerColor(kBlue+2); + g_Rat_EE -> SetLineColor(kBlue+2); + + Name = Form("g_fit_EE_%d",i); + TCanvas* c_g_fit_EE = new TCanvas(Name, Name,100,100,800,600); + TPad *cLower_EE = new TPad("pad_0_EE","pad_0_EE",0.00,0.00,1.00,0.30); + TPad *cUpper_EE = new TPad("pad_1_EE","pad_1_EE",0.00,0.30,1.00,1.00); + + cLower_EE->SetBottomMargin(0.25); cUpper_EE->SetTopMargin(0.01); + cUpper_EE->SetBottomMargin(0.01); + + cLower_EE->Draw(); + cUpper_EE->Draw(); + + float FontSCF = cUpper_EE->GetHNDC()/cLower_EE->GetHNDC(); + float tYoffset = 0.8; + float labSize = 0.06; + float phiLim = 360.; + cUpper_EE -> cd(); + gPad->SetGrid(); + TH1F *hPad_EE = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hPad_EE->GetXaxis()->SetLabelSize(labSize); + hPad_EE->GetXaxis()->SetTitleSize(labSize); + hPad_EE->GetYaxis()->SetLabelSize(labSize); + hPad_EE->GetYaxis()->SetTitleSize(labSize); + hPad_EE->GetXaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetYaxis()->SetTitleOffset(tYoffset); + hPad_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hPad_EE->GetYaxis()->SetTitle("M_{ee}^{2}/M_{Z}^{2} #propto 1/p"); + + g_EoP_EE -> Draw("PL"); + g_EoC_EE -> Draw("PL"); + + TLegend *tl_EE = new TLegend(0.80,0.80,0.90,0.95); + tl_EE -> SetTextFont(40); + tl_EE -> SetFillColor(0); + // tl -> SetBorderSize(0); + tl_EE -> AddEntry(g_EoP_EE,"MC EE","PL"); + tl_EE -> AddEntry(g_EoC_EE,"Data EE","PL"); + tl_EE -> Draw(); + + cLower_EE -> cd(); + gPad->SetGrid(); + + TH1F *hRat_EE = (TH1F*)gPad->DrawFrame(0.,0.95,phiLim,1.05); + hRat_EE->GetYaxis()->SetNdivisions(505); + hRat_EE->GetXaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetXaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetLabelSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleSize(labSize*FontSCF); + hRat_EE->GetYaxis()->SetTitleOffset(tYoffset/FontSCF); + hRat_EE->GetXaxis()->SetTitleOffset(0.6); + hRat_EE->GetXaxis()->SetTitle("#phi_{SC}"); + hRat_EE->GetYaxis()->SetTitle("Data / MC"); + g_Rat_EE->Draw("PL"); + i++; + + } + +} \ No newline at end of file diff --git a/EOverPCalibration/macros/DrawResidualPlotsEB.C b/EOverPCalibration/macros/DrawResidualPlotsEB.C new file mode 100644 index 00000000000..e92f2c23983 --- /dev/null +++ b/EOverPCalibration/macros/DrawResidualPlotsEB.C @@ -0,0 +1,330 @@ +// +// Macro to produce ECAL single electron calibration plots +// + +void DrawResidualPlotsEB( + Char_t* infile1 = "/data1/rgerosa/L3_Weight/PromptSkim/WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", + Char_t* infile2 = "/data1/rgerosa/L3_Weight/PromptSkim/Odd_WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", + Char_t* infile3 = "/data1/rgerosa/L3_Weight/PromptSkim/Even_WZAnalysis_SingleEle_Run2011AB-PromptSkim_Z_noEP.root", + int evalStat = 1, + int inputLoops = 25, + Char_t* fileType = "png", + Char_t* dirName = ".") +{ + + // Draw plots in different modality : xtal, TT, SM + TString modality = "xtal"; + bool printPlots = false; + const int nLoops = inputLoops; + + // Set style options + gROOT->Reset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + + if ( evalStat && (!infile2 || !infile3 )){ + cout << " No input files to evaluate statistical precision specified !" << endl; + return; + } + + cout << "Making calibration plots for: " << infile2 << endl; + + char hname[100]; + char htitle[100]; + TF1 *fgaus = new TF1("fgaus","gaus",-10,10); + + TFile *f1 = new TFile(infile1); + TFile *f2 = new TFile(infile2); + TFile *f3 = new TFile(infile3); + TH2F *hcmap1[nLoops]; + TH2F *hcmap2[nLoops]; + TH2F *hcmap3[nLoops]; + TGraphErrors *residual_vs_ieta[nLoops]; + + TH2F *hcmap1_TT[nLoops]; + TH2F *hcmap2_TT[nLoops]; + TH2F *hcmap3_TT[nLoops]; + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + sprintf(hname,"h2_%d_hC_scale_EB",iLoop); + hcmap1[iLoop] = (TH2F*)f1->Get(hname); + hcmap2[iLoop] = (TH2F*)f2->Get(hname); + hcmap3[iLoop] = (TH2F*)f3->Get(hname); + + if ( modality == "TT" ) { + sprintf(hname,"h1_%d_hC_scale_EB_TT",iLoop); + hcmap1_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); + sprintf(hname,"h2_%d_hC_scale_EB_TT",iLoop); + hcmap2_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); + sprintf(hname,"h3_%d_hC_scale_EB_TT",iLoop); + hcmap3_TT[iLoop] = new TH2F(hname, hname, 72,1, 72, 35, -17, 18); + + for ( int iTTphi = 1; iTTphi < 72; iTTphi++ ) { + + for ( int iTTeta = -17; iTTeta < 18; iTTeta++ ) { + if ( iTTeta == 0 ) continue; + float theICsum = hcmap1[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; + hcmap1_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); + theICsum = hcmap2[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; + hcmap2_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); + theICsum = hcmap3[iLoop] -> Integral(iTTphi*5, iTTphi*5+4, (iTTeta+18)*5, (iTTeta+18)*5+4)/25.; + hcmap3_TT[iLoop] -> SetBinContent (iTTphi, iTTeta+18, theICsum); + + } + + } + + } + + TH1F *hscale[171]; + TH1F *hsigma[171]; + TH1F *hresidual[171]; + + if ( modality == "xtal" ) { + + for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ + //int etaring = -85+(jbin-1); + float etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hscale_ring_ieta%02d",etaring); + hscale[jbin-1] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hsigma_ring_ieta%02d",etaring); + hsigma[jbin-1] = new TH1F(hname, hname, 250,-0.1,0.1); + for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ + float ic = hcmap1[iLoop]->GetBinContent(ibin,jbin); + hscale[jbin-1] -> Fill (ic); + float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hsigma[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + + } + + else if ( modality == "TT" ) { + + for (int jbin = 1; jbin < hcmap2_TT[iLoop]-> GetNbinsY()+1; jbin++){ + //int etaring = -85+(jbin-1); + float etaring = hcmap2_TT[iLoop]-> GetYaxis()->GetBinCenter(jbin); + sprintf(hname,"hscale_ring_ieta%02d",etaring); + hscale[jbin-1] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hsigma_ring_ieta%02d",etaring); + hsigma[jbin-1] = new TH1F(hname, hname, 250,-0.1,0.1); + for (int ibin = 1; ibin < hcmap2_TT[iLoop]-> GetNbinsX()+1; ibin++){ + float ic = hcmap1_TT[iLoop]->GetBinContent(ibin,jbin); + hscale[jbin-1] -> Fill (ic); + float ic1 = hcmap2_TT[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3_TT[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + hsigma[jbin-1]->Fill((ic1-ic2)/(ic1+ic2)); + } + } + } + + } + else if ( modality == "SM" ) { + + for (int ibin = 1; ibin < hcmap2[iLoop]-> GetNbinsX()+1; ibin++){ + // Get the SM number + int iSM = (ibin-1)/20 + 1; + if ( (ibin-1)%20 == 0 ) { + sprintf(hname,"hscale_ring_ieta%02d",iSM); + hscale[iSM-1] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hscale_ring_ieta%02d",iSM+18); + hscale[iSM-1+18] = new TH1F(hname, hname, 250,0.9,1.1); + sprintf(hname,"hsigma_ring_ieta%02d",iSM); + hsigma[iSM-1] = new TH1F(hname, hname, 250,-0.1,0.1); + sprintf(hname,"hsigma_ring_ieta%02d",iSM+18); + hsigma[iSM-1+18] = new TH1F(hname, hname, 250,-0.1,0.1); + } + for (int jbin = 1; jbin < hcmap2[iLoop]-> GetNbinsY()+1; jbin++){ + float ic = hcmap1[iLoop]->GetBinContent(ibin,jbin); + float ic1 = hcmap2[iLoop]->GetBinContent(ibin,jbin); + float ic2 = hcmap3[iLoop]->GetBinContent(ibin,jbin); + if (ic1>0 && ic1<2 && ic1!=1 && ic2>0 && ic2 <2 && ic2!=1){ + float sigma = (ic1-ic2)/(ic1+ic2); // sigma (diff/sum) gives the stat. precision on teh entire sample + if ( jbin < 86 ) { //EE- + hscale[iSM-1+18]->Fill(ic); + hsigma[iSM-1+18]->Fill(sigma); // sigma (diff/sum) gives the stat. precision on teh entire sample + } + else { //EE+ + hscale[iSM-1]->Fill(ic); + hsigma[iSM-1]->Fill(sigma); // sigma (diff/sum) gives the stat. precision on teh entire sample + } + } + } + } + + } + + + residual_vs_ieta[iLoop] = new TGraphErrors(); + residual_vs_ieta[iLoop]->SetMarkerStyle(20); + residual_vs_ieta[iLoop]->SetMarkerSize(1); + residual_vs_ieta[iLoop]->SetMarkerColor(kRed+2); + + int n = 0; + + if ( modality == "xtal" ) { + + for (int i = 1; i < hcmap2[iLoop]-> GetNbinsY()+1; i++){ + etaring = hcmap2[iLoop]-> GetYaxis()->GetBinCenter(i); + if (etaring==0) continue; + if ( hsigma[i-1]->GetEntries() == 0) continue; + float e = 0.5*hcmap2[iLoop]-> GetYaxis()->GetBinWidth(i); + // Get the sigma + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); + fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); + hsigma[i-1] -> Fit("fgaus","QR"); + float sigma = fgaus -> GetParameter(2); + // Get the scale + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hscale[i-1]->GetRMS()); + fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); + hscale[i-1] -> Fit("fgaus","QR"); + float scale = fgaus -> GetParameter(2); + float residual = scale*scale - sigma*sigma; + if ( residual < 0 ) residual = -sqrt(-residual); + else residual = sqrt(residual); + residual_vs_ieta[iLoop]-> SetPoint(n,etaring,residual); + residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + } + + else if ( modality == "TT" ) { + + for (int i = 1; i < hcmap2_TT[iLoop]-> GetNbinsY()+1; i++){ + etaring = hcmap2_TT[iLoop]-> GetYaxis()->GetBinCenter(i); + if (etaring==0) continue; + if ( hsigma[i-1]->GetEntries() == 0) continue; + float e = 0.5*hcmap2_TT[iLoop]-> GetYaxis()->GetBinWidth(i); + // Get the sigma + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); + fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); + hsigma[i-1] -> Fit("fgaus","QR"); + float sigma = fgaus -> GetParameter(2); + // Get the scale + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hscale[i-1]->GetRMS()); + fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); + hscale[i-1] -> Fit("fgaus","QR"); + float scale = fgaus -> GetParameter(2); + float residual = scale*scale - sigma*sigma; + if ( residual < 0 ) residual = -sqrt(-residual); + else residual = sqrt(residual); + residual_vs_ieta[iLoop]-> SetPoint(n,etaring,residual); + residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + } + + } + + else if ( modality == "SM" ) { + + for (int i = 1; i < 36+1; i++){ + + if ( hsigma[i-1]->GetEntries() == 0) continue; + float e = 0.5; + // Get the sigma + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hsigma[i-1]->GetRMS()); + fgaus->SetRange(-5*hsigma[i-1]->GetRMS(),5*hsigma[i-1]->GetRMS()); + hsigma[i-1] -> Fit("fgaus","QR"); + float sigma = fgaus -> GetParameter(2); + // Get the scale + fgaus->SetParameter(1,1); + fgaus->SetParameter(2,hscale[i-1]->GetRMS()); + fgaus->SetRange(-5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean(),5*hscale[i-1]->GetRMS()+hscale[i-1]->GetMean()); + hscale[i-1] -> Fit("fgaus","QR"); + float scale = fgaus -> GetParameter(2); + float residual = scale*scale - sigma*sigma; + if ( residual < 0 ) residual = -sqrt(-residual); + else residual = sqrt(residual); + residual_vs_ieta[iLoop]-> SetPoint(n,i,residual); + residual_vs_ieta[iLoop]-> SetPointError(n,e,fgaus->GetParError(2)); + n++; + + + } + + + } + +// delete hresidual; + + } + + + + //------------------------------------------------------------------------ + + + + + //----------------------------------------------------------------- + //--- Draw plots + //----------------------------------------------------------------- + TCanvas *c[nLoops]; + + // --- plot 5 : statistical precision vs ieta + if (evalStat){ + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + sprintf(hname,"cstat_%d",iLoop); + c[iLoop] = new TCanvas(hname,hname); + c[iLoop]->SetGridx(); + c[iLoop]->SetGridy(); + residual_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetRangeUser(0.0001,0.07); + residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetRangeUser(-85,85); + residual_vs_ieta[iLoop]->GetHistogram()->GetYaxis()-> SetTitle("residual miscalibration"); + residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("i#eta"); + if ( modality = "SM" ) residual_vs_ieta[iLoop]->GetHistogram()->GetXaxis()-> SetTitle("iSM"); + residual_vs_ieta[iLoop]->Draw("ap"); + } + } + + //----------------------------------------------------------------- + //--- Print plots + //----------------------------------------------------------------- + + if (printPlots){ + + //gStyle->SetOptStat(1110); + c[0]->Print("IC_map.png",fileType); + c[1]->Print("IC_precision_vs_ieta.png",fileType); + c[2]->Print("IC_scale_vs_ieta.png",fileType); + c[3]->Print("IC_spread.png",fileType); + c[4]->Print("occupancy_map.png",fileType); + } +} + + diff --git a/EOverPCalibration/macros/Normalize_IC_EE.cxx b/EOverPCalibration/macros/Normalize_IC_EE.cxx new file mode 100644 index 00000000000..bbed2c46e03 --- /dev/null +++ b/EOverPCalibration/macros/Normalize_IC_EE.cxx @@ -0,0 +1,277 @@ +// +// Macro to Normalize DATA IC Coefficient along one ring skipping dead channels and TT +// Input File Scale Map of a data sample (can be used also on MC) an this is saved in the same +// file updating the old scale_map normalized by rings without skip dead channels +#include +#include +#include +#include +#include +#include +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include + +using namespace std; + +// Check if the crystal is near to a dead one + +bool CheckxtalIC (TH2F* h_scale_EE,int ix, int iy, int ir) +{ + if(h_scale_EE->GetBinContent(ix,iy) ==0) return false; + + int bx= h_scale_EE->GetNbinsX(); + int by= h_scale_EE->GetNbinsY(); + + if((ixGetBinContent(ix+1,iy) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix-1,iy)==0 && ix>1 && (ir!=0 || ir<33))) return false; + + if((iyGetBinContent(ix,iy+1) ==0 && (ir!=0 || ir<33)) || (h_scale_EE->GetBinContent(ix,iy-1)==0 && iy>1 && (ir!=0 || ir<33))) return false; + + if((ixGetBinContent(ix+1,iy+1) ==0 && iyGetBinContent(ix-1,iy-1)==0 && iy>1 && ix>1 && (ir!=0 || ir<33))) return false; + + if((h_scale_EE->GetBinContent(ix+1,iy-1) ==0 && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && ix>1 && iy >& TT_centre ) +{ + for( int k =0; kReset(); + gROOT->SetStyle("Plain"); + + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetOptTitle(0); + gStyle->SetOptStat(1110); + gStyle->SetOptFit(0); + gStyle->SetFitFormat("6.3g"); + gStyle->SetPalette(1); + + gStyle->SetTextFont(42); + gStyle->SetTextSize(0.05); + gStyle->SetTitleFont(42,"xyz"); + gStyle->SetTitleSize(0.05); + gStyle->SetLabelFont(42,"xyz"); + gStyle->SetLabelSize(0.05); + gStyle->SetTitleXOffset(0.8); + gStyle->SetTitleYOffset(1.1); + gROOT->ForceStyle(); + + if ( !infile1 ) { + cout << " No input file specified !" << endl; + return; + } + + // map for dead TT centre + + std::vector< std::pair > TT_centre_EEP ; + std::vector< std::pair > TT_centre_EEM ; + + TT_centre_EEP.push_back(std::pair (78,78)); + TT_centre_EEP.push_back(std::pair (83,28)); + TT_centre_EEP.push_back(std::pair (83,23)); + TT_centre_EEM.push_back(std::pair (53,28)); + + // Input file with full statistic + + TFile *f = new TFile(infile1,"UPDATE"); + TH2F* h_scale_EE[2],*hcmap_EE[2]; + + h_scale_EE[1] = (TH2F*)f->Get("h_scale_EEP"); + h_scale_EE[0] = (TH2F*)f->Get("h_scale_EEM"); + + hcmap_EE[1] = (TH2F*) h_scale_EE[1]->Clone("hcmap_EEP"); + hcmap_EE[0] = (TH2F*) h_scale_EE[0]->Clone("hcmap_EEM"); + + hcmap_EE[0] -> Reset("ICEMS"); + hcmap_EE[1] -> Reset("ICEMS"); + hcmap_EE[0] -> ResetStats(); + hcmap_EE[1] -> ResetStats(); + + + TH2F *hrings[2]; + hrings[0] = (TH2F*)h_scale_EE[0]->Clone("hringsEEM"); + hrings[1] = (TH2F*)h_scale_EE[1]->Clone("hringsEEP"); + hrings[0] ->Reset("ICMES"); + hrings[1] ->Reset("ICMES"); + hrings[0] ->ResetStats(); + hrings[1] ->ResetStats(); + + + FILE *fRing; + fRing = fopen("macros/eerings.dat","r"); + int x,y,z,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&x,&y,&z,&ir) !=EOF ) { + if(z>0) hrings[1]->Fill(x,y,ir); + if(z<0) hrings[0]->Fill(x,y,ir); + } + + std::vector SumIC_Ring_EEP,SumIC_Ring_EEM,Sumxtal_Ring_EEP,Sumxtal_Ring_EEM; + + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + // Mean over phi corrected skipping dead channel + for(int k=0; k<2 ; k++) + { + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ){ + + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ){ + + ir = hrings[k]->GetBinContent(ix,iy); + + bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); + bool isGoodTT; + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + + if(k!=0 && isGoodTT && isGood ) + { + SumIC_Ring_EEP.at(ir) = SumIC_Ring_EEP.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEP.at(ir) = Sumxtal_Ring_EEP.at(ir) + 1.; + } + if(k==0 && isGoodTT && isGood) + { + SumIC_Ring_EEM.at(ir) = SumIC_Ring_EEM.at(ir) + h_scale_EE[k]->GetBinContent(ix,iy); + Sumxtal_Ring_EEM.at(ir) = Sumxtal_Ring_EEM.at(ir) + 1.; + } + + } + } + } + + for(int k=0; k<2 ; k++) + { + for( int ix = 0; ix < h_scale_EE[k]->GetNbinsX()+1 ; ix++ ) + { + for(int iy = 0; iy < h_scale_EE[k]->GetNbinsY()+1 ; iy++ ) + { + ir = hrings[k]->GetBinContent(ix,iy); + + //fede: skip bad channels and bad TTs + bool isGood = CheckxtalIC(h_scale_EE[k],ix,iy,ir); + bool isGoodTT; + if(k==0) isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEM); + else isGoodTT = CheckxtalTT(ix,iy,ir,TT_centre_EEP); + if (!isGood || !isGoodTT) continue; + + if(k!=0) + { + if(ir>33){ + hcmap_EE[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEP.at(ir) != 0 && SumIC_Ring_EEP.at(ir)!= 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEP.at(ir)/Sumxtal_Ring_EEP.at(ir))); + } + else + { + if(ir>33){ + hcmap_EE[k]->Fill(ix,iy,0.); + continue; + } + if(Sumxtal_Ring_EEM.at(ir) != 0 && SumIC_Ring_EEM.at(ir) != 0) + hcmap_EE[k]->Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/(SumIC_Ring_EEM.at(ir)/Sumxtal_Ring_EEM.at(ir))); + } + } + } + } + + TCanvas *cEEP[12]; + TCanvas *cEEM[12]; + + // --- plot 0 : map of coefficients + cEEP[0] = new TCanvas("cEEP","cmapEEP not normalized"); + cEEP[0] -> cd(); + cEEP[0]->SetLeftMargin(0.1); + cEEP[0]->SetRightMargin(0.13); + cEEP[0]->SetGridx(); + cEEP[0]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + h_scale_EE[1]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[1]->Draw("COLZ"); + h_scale_EE[1]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[1]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[1]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEM[0] = new TCanvas("cEEM","cmapEEM not normalized"); + cEEM[0] -> cd(); + cEEM[0]->SetLeftMargin(0.1); + cEEM[0]->SetRightMargin(0.13); + cEEM[0]->SetGridx(); + cEEM[0]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + h_scale_EE[0]->GetXaxis() -> SetLabelSize(0.03); + h_scale_EE[0]->Draw("COLZ"); + h_scale_EE[0]->GetXaxis() ->SetTitle("ix"); + h_scale_EE[0]->GetYaxis() ->SetTitle("iy"); + h_scale_EE[0]->GetZaxis() ->SetRangeUser(0.5,2.); + + cEEP[1] = new TCanvas("cmapEEP Normalized","cmapEEP Normalized"); + cEEP[1] -> cd(); + cEEP[1]->SetLeftMargin(0.1); + cEEP[1]->SetRightMargin(0.13); + cEEP[1]->SetGridx(); + cEEP[1]->SetGridy(); + // hcmap[1]->GetXaxis()->SetNdivisions(1020); + hcmap_EE[1]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[1]->Draw("COLZ"); + hcmap_EE[1]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[1]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[1]->GetZaxis() ->SetRangeUser(0.8,1.2); + + cEEM[1] = new TCanvas("cmapEEM Normalized","cmapEEM Normalized"); + cEEM[1] -> cd(); + cEEM[1]->SetLeftMargin(0.1); + cEEM[1]->SetRightMargin(0.13); + cEEM[1]->SetGridx(); + cEEM[1]->SetGridy(); + //hcmap[0]->GetXaxis()->SetNdivisions(1020); + hcmap_EE[0]->GetXaxis() -> SetLabelSize(0.03); + hcmap_EE[0]->Draw("COLZ"); + hcmap_EE[0]->GetXaxis() ->SetTitle("ix"); + hcmap_EE[0]->GetYaxis() ->SetTitle("iy"); + hcmap_EE[0]->GetZaxis() ->SetRangeUser(0.8,1.2); + + + f->cd(); + hcmap_EE[0]->Write("h_scale_map_EEM"); + hcmap_EE[1]->Write("h_scale_map_EEP"); + + + } diff --git a/EOverPCalibration/macros/ProduceScalibMap.C b/EOverPCalibration/macros/ProduceScalibMap.C new file mode 100644 index 00000000000..8be08eaa6df --- /dev/null +++ b/EOverPCalibration/macros/ProduceScalibMap.C @@ -0,0 +1,45 @@ +/// Produce miscalibration map for EB + +#include +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TRandom.h" +#include "TRandom3.h" + +void main(int argc, char **argv) +{ + + TRandom3 genRand; + + std::ofstream io1; + io1.open ("scalibMap6.txt"); + + float eta, scalib; + + for (eta=-85; eta<86; eta++) { + + if (fabs(eta)<30) scalib = genRand.Gaus(1,0.06); + else if (fabs(eta)<60) scalib = genRand.Gaus(1,0.07); + else if (fabs(eta)<70) scalib = genRand.Gaus(1,0.08); + else scalib = genRand.Gaus(1,0.09); + + io1< +#include +#include +#include +#include +#include +#include + +#include "TH2F.h" +#include "TFile.h" +#include "TCanvas.h" +#include "TROOT.h" +#include "TStyle.h" +#include "TF1.h" +#include "TLegend.h" +#include "TGraphErrors.h" +#include "TApplication.h" +#include "TLatex.h" +#include "TFile.h" +#include "TRandom.h" +#include "TRandom3.h" + +void main(int argc, char **argv) +{ + + TRandom3 genRand; + + std::ofstream io1; + io1.open ("scalibMapEE.txt"); + + float r, scalib; + + for (r=0; r<40; r++) { + + if (fabs(r)<5) scalib = genRand.Gaus(1,0.01); + else if (fabs(r)<15) scalib = genRand.Gaus(1,0.005); + else if (fabs(r)<30) scalib = genRand.Gaus(1,0.005); + else if (fabs(r)<40) scalib = genRand.Gaus(1,0.01); + else scalib = genRand.Gaus(1,0.015); + + io1< 2 File for Even and Odd L3 output for a defined data sample + -> evalStat = 1 for statistical precision analysis + -> inputLoops = number of L3 loops + + Run : root -l macros/DrawPrecisionPlot.C + + Output: -> Plots = stat precision in eta ring no Folded, convergence Plots in 4 eta region + evaluate through linear fit + -> StatPrec.root = has to be used in the comparision with miscalibrated MC in CompareCalibToMCTruth.C + + +########################################## +----- Macros for EE Calibration ---------- +########################################## + + +1) macros/Correction_TrackerEffect_EE_MC.cxx + + input : -> Calibration Maps of (Normalized MC IC * IC_RECO)/(IC_Truth) used to extract empiric correction for data + -> macros/eerings.dat is used to built EE ring geometry + -> List of phi structure coordinates (iphi calcolated from ix and iy) for EE+ and EE- + + Run : root -l macros/Correction_TrackerEffect_EE_MC.cxx+ + + Output : k(correction_factor) = (inside a given phi structure)/(outside, in the all endcap) + The analysis is independent between EE+ and EE-. + -> Map IC are plotted before and after correction + -> Empiric coefficient are printed and used in Correction_TrackerEffect_EE_DATA_dinamic_alpha.cxx + + Note : these coefficient are strictly dependent on the MC production used (WJetsToLnu and DYToLL Fall1 are considered) + +2) macros/Correction_TrackerEffect_EE_DATA.cxx + + input : -> Ntupla of data on which apply correction + -> macros/eerings.dat is used to built EE ring geometry + -> List of phi structure coordinates (iphi calcolated from ix and iy) for EE+ and EE- and + empiric coefficient for correction that are different + between noEP and R9 selection applied in the calibration procedure. + + Run : root -l macros/Correction_TrackerEffect_EE_DATA.cxx+ + + Output : -> maps of IC corrected are added in the original input file under the name + h_scale_map_corrected_EEM and h_scale_map_corrected_EEP + +3) macros/DrawCalibrationPlotsEE.C + + input : -> Files for full, even and odd calibration analysis on data or MC + -> evalstat=1 in order to evaluate statistic spread IC + -> isMC = true stands for MC EE analysis + -> MCtruthIC_EE.root and MCRecoIC_EE.root are used for MC Analysis + -> existingEE.root -> contains problematic channel in the Endcap + + Run : root -l macros/DrawCalibrationPlotsEE.C+ + + Output: -> Plot for spread, statistical precision and residual spred for EE+, EE- and folding EE+ over EE- + -> If isMC=true Plots of statistic precision for EE+, EE- and folded are saved in StatPrec_MC_EE.root + You have to run this code before run CompareCalibToMCTruth_EE.C + -> if isMC=true comparison plot MC(Truth/RECO)/MC IC that are saved in IC_MC_4Correction.root + This file is used as input in macros/Correction_TrackerEffect_EE_MC.cxx + -> ifMC=false Calibration_Coefficient_EE_dinamic_alpha.txt that is the txt file of EE IC + -> Map of warning channel after InterCalibration + + +############################### +-------- Other macros --------- +############################### + + +1) macros/DrawEPDistributions.cxx + + input : -> file from FastCalibratorWeight or FastCalibratorEE with the EoP distributions for each eta ring at + different iteration step + + Run : root -l macros/DrawEPDistributions.cxx+ + + Output : Plots in different eta ring + + +2) macros/DrawMomentumCalibration.cxx + + input : -> output from test/CalibrationMomentum.cpp + + Run : root -l macros/DrawMomentumCalibration.cxx+ + + Output : Plots of the scale, correlation and ratios in different eta region for EB and EE + + + \ No newline at end of file diff --git a/EOverPCalibration/macros/eerings.dat b/EOverPCalibration/macros/eerings.dat new file mode 100644 index 00000000000..4d581446724 --- /dev/null +++ b/EOverPCalibration/macros/eerings.dat @@ -0,0 +1,14648 @@ +(1, 41, -1) 0 +(1, 42, -1) 0 +(1, 43, -1) 0 +(1, 44, -1) 0 +(1, 45, -1) 0 +(1, 46, -1) 0 +(1, 47, -1) 0 +(1, 48, -1) 0 +(1, 49, -1) 0 +(1, 50, -1) 0 +(1, 51, -1) 0 +(1, 52, -1) 0 +(1, 53, -1) 0 +(1, 54, -1) 0 +(1, 55, -1) 0 +(1, 56, -1) 0 +(1, 57, -1) 0 +(1, 58, -1) 0 +(1, 59, -1) 0 +(1, 60, -1) 0 +(2, 41, -1) 0 +(2, 42, -1) 0 +(2, 43, -1) 0 +(2, 44, -1) 1 +(2, 45, -1) 1 +(2, 46, -1) 1 +(2, 47, -1) 1 +(2, 48, -1) 1 +(2, 49, -1) 1 +(2, 50, -1) 1 +(2, 51, -1) 1 +(2, 52, -1) 1 +(2, 53, -1) 1 +(2, 54, -1) 1 +(2, 55, -1) 1 +(2, 56, -1) 1 +(2, 57, -1) 1 +(2, 58, -1) 0 +(2, 59, -1) 0 +(2, 60, -1) 0 +(3, 41, -1) 1 +(3, 42, -1) 1 +(3, 43, -1) 1 +(3, 44, -1) 2 +(3, 45, -1) 2 +(3, 46, -1) 2 +(3, 47, -1) 2 +(3, 48, -1) 2 +(3, 49, -1) 2 +(3, 50, -1) 2 +(3, 51, -1) 2 +(3, 52, -1) 2 +(3, 53, -1) 2 +(3, 54, -1) 2 +(3, 55, -1) 2 +(3, 56, -1) 2 +(3, 57, -1) 2 +(3, 58, -1) 1 +(3, 59, -1) 1 +(3, 60, -1) 1 +(4, 36, -1) 1 +(4, 37, -1) 1 +(4, 38, -1) 2 +(4, 39, -1) 2 +(4, 40, -1) 2 +(4, 41, -1) 2 +(4, 42, -1) 2 +(4, 43, -1) 2 +(4, 44, -1) 3 +(4, 45, -1) 3 +(4, 46, -1) 3 +(4, 47, -1) 3 +(4, 48, -1) 3 +(4, 49, -1) 3 +(4, 50, -1) 3 +(4, 51, -1) 3 +(4, 52, -1) 3 +(4, 53, -1) 3 +(4, 54, -1) 3 +(4, 55, -1) 3 +(4, 56, -1) 3 +(4, 57, -1) 3 +(4, 58, -1) 2 +(4, 59, -1) 2 +(4, 60, -1) 2 +(4, 61, -1) 2 +(4, 62, -1) 2 +(4, 63, -1) 2 +(4, 64, -1) 1 +(4, 65, -1) 1 +(5, 36, -1) 2 +(5, 37, -1) 2 +(5, 38, -1) 2 +(5, 39, -1) 3 +(5, 40, -1) 3 +(5, 41, -1) 3 +(5, 42, -1) 3 +(5, 43, -1) 3 +(5, 44, -1) 4 +(5, 45, -1) 4 +(5, 46, -1) 4 +(5, 47, -1) 4 +(5, 48, -1) 4 +(5, 49, -1) 4 +(5, 50, -1) 4 +(5, 51, -1) 4 +(5, 52, -1) 4 +(5, 53, -1) 4 +(5, 54, -1) 4 +(5, 55, -1) 4 +(5, 56, -1) 4 +(5, 57, -1) 4 +(5, 58, -1) 3 +(5, 59, -1) 3 +(5, 60, -1) 3 +(5, 61, -1) 3 +(5, 62, -1) 3 +(5, 63, -1) 2 +(5, 64, -1) 2 +(5, 65, -1) 2 +(6, 26, -1) 0 +(6, 27, -1) 0 +(6, 28, -1) 0 +(6, 29, -1) 0 +(6, 30, -1) 1 +(6, 31, -1) 1 +(6, 32, -1) 1 +(6, 33, -1) 2 +(6, 34, -1) 2 +(6, 35, -1) 3 +(6, 36, -1) 3 +(6, 37, -1) 3 +(6, 38, -1) 3 +(6, 39, -1) 4 +(6, 40, -1) 4 +(6, 41, -1) 4 +(6, 42, -1) 4 +(6, 43, -1) 4 +(6, 44, -1) 5 +(6, 45, -1) 5 +(6, 46, -1) 5 +(6, 47, -1) 5 +(6, 48, -1) 5 +(6, 49, -1) 5 +(6, 50, -1) 5 +(6, 51, -1) 5 +(6, 52, -1) 5 +(6, 53, -1) 5 +(6, 54, -1) 5 +(6, 55, -1) 5 +(6, 56, -1) 5 +(6, 57, -1) 5 +(6, 58, -1) 4 +(6, 59, -1) 4 +(6, 60, -1) 4 +(6, 61, -1) 4 +(6, 62, -1) 4 +(6, 63, -1) 3 +(6, 64, -1) 3 +(6, 65, -1) 3 +(6, 66, -1) 3 +(6, 67, -1) 2 +(6, 68, -1) 2 +(6, 69, -1) 1 +(6, 70, -1) 1 +(6, 71, -1) 1 +(6, 72, -1) 0 +(6, 73, -1) 0 +(6, 74, -1) 0 +(6, 75, -1) 0 +(7, 26, -1) 0 +(7, 27, -1) 0 +(7, 28, -1) 1 +(7, 29, -1) 1 +(7, 30, -1) 2 +(7, 31, -1) 2 +(7, 32, -1) 2 +(7, 33, -1) 3 +(7, 34, -1) 3 +(7, 35, -1) 3 +(7, 36, -1) 4 +(7, 37, -1) 4 +(7, 38, -1) 4 +(7, 39, -1) 5 +(7, 40, -1) 5 +(7, 41, -1) 5 +(7, 42, -1) 5 +(7, 43, -1) 5 +(7, 44, -1) 6 +(7, 45, -1) 6 +(7, 46, -1) 6 +(7, 47, -1) 6 +(7, 48, -1) 6 +(7, 49, -1) 6 +(7, 50, -1) 6 +(7, 51, -1) 6 +(7, 52, -1) 6 +(7, 53, -1) 6 +(7, 54, -1) 6 +(7, 55, -1) 6 +(7, 56, -1) 6 +(7, 57, -1) 6 +(7, 58, -1) 5 +(7, 59, -1) 5 +(7, 60, -1) 5 +(7, 61, -1) 5 +(7, 62, -1) 5 +(7, 63, -1) 4 +(7, 64, -1) 4 +(7, 65, -1) 4 +(7, 66, -1) 3 +(7, 67, -1) 3 +(7, 68, -1) 3 +(7, 69, -1) 2 +(7, 70, -1) 2 +(7, 71, -1) 2 +(7, 72, -1) 1 +(7, 73, -1) 1 +(7, 74, -1) 0 +(7, 75, -1) 0 +(8, 26, -1) 1 +(8, 27, -1) 1 +(8, 28, -1) 2 +(8, 29, -1) 2 +(8, 30, -1) 3 +(8, 31, -1) 3 +(8, 32, -1) 3 +(8, 33, -1) 4 +(8, 34, -1) 4 +(8, 35, -1) 4 +(8, 36, -1) 5 +(8, 37, -1) 5 +(8, 38, -1) 5 +(8, 39, -1) 6 +(8, 40, -1) 6 +(8, 41, -1) 6 +(8, 42, -1) 6 +(8, 43, -1) 6 +(8, 44, -1) 7 +(8, 45, -1) 7 +(8, 46, -1) 7 +(8, 47, -1) 7 +(8, 48, -1) 7 +(8, 49, -1) 7 +(8, 50, -1) 7 +(8, 51, -1) 7 +(8, 52, -1) 7 +(8, 53, -1) 7 +(8, 54, -1) 7 +(8, 55, -1) 7 +(8, 56, -1) 7 +(8, 57, -1) 7 +(8, 58, -1) 6 +(8, 59, -1) 6 +(8, 60, -1) 6 +(8, 61, -1) 6 +(8, 62, -1) 6 +(8, 63, -1) 5 +(8, 64, -1) 5 +(8, 65, -1) 5 +(8, 66, -1) 4 +(8, 67, -1) 4 +(8, 68, -1) 4 +(8, 69, -1) 3 +(8, 70, -1) 3 +(8, 71, -1) 3 +(8, 72, -1) 2 +(8, 73, -1) 2 +(8, 74, -1) 1 +(8, 75, -1) 1 +(9, 21, -1) 0 +(9, 22, -1) 0 +(9, 23, -1) 0 +(9, 24, -1) 1 +(9, 25, -1) 1 +(9, 26, -1) 2 +(9, 27, -1) 2 +(9, 28, -1) 3 +(9, 29, -1) 3 +(9, 30, -1) 4 +(9, 31, -1) 4 +(9, 32, -1) 4 +(9, 33, -1) 5 +(9, 34, -1) 5 +(9, 35, -1) 5 +(9, 36, -1) 6 +(9, 37, -1) 6 +(9, 38, -1) 6 +(9, 39, -1) 7 +(9, 40, -1) 7 +(9, 41, -1) 7 +(9, 42, -1) 7 +(9, 43, -1) 7 +(9, 44, -1) 8 +(9, 45, -1) 8 +(9, 46, -1) 8 +(9, 47, -1) 8 +(9, 48, -1) 8 +(9, 49, -1) 8 +(9, 50, -1) 8 +(9, 51, -1) 8 +(9, 52, -1) 8 +(9, 53, -1) 8 +(9, 54, -1) 8 +(9, 55, -1) 8 +(9, 56, -1) 8 +(9, 57, -1) 8 +(9, 58, -1) 7 +(9, 59, -1) 7 +(9, 60, -1) 7 +(9, 61, -1) 7 +(9, 62, -1) 7 +(9, 63, -1) 6 +(9, 64, -1) 6 +(9, 65, -1) 6 +(9, 66, -1) 5 +(9, 67, -1) 5 +(9, 68, -1) 5 +(9, 69, -1) 4 +(9, 70, -1) 4 +(9, 71, -1) 4 +(9, 72, -1) 3 +(9, 73, -1) 3 +(9, 74, -1) 2 +(9, 75, -1) 2 +(9, 76, -1) 1 +(9, 77, -1) 1 +(9, 78, -1) 0 +(9, 79, -1) 0 +(9, 80, -1) 0 +(10, 21, -1) 0 +(10, 22, -1) 1 +(10, 23, -1) 1 +(10, 24, -1) 2 +(10, 25, -1) 2 +(10, 26, -1) 3 +(10, 27, -1) 3 +(10, 28, -1) 4 +(10, 29, -1) 4 +(10, 30, -1) 4 +(10, 31, -1) 5 +(10, 32, -1) 5 +(10, 33, -1) 6 +(10, 34, -1) 6 +(10, 35, -1) 6 +(10, 36, -1) 7 +(10, 37, -1) 7 +(10, 38, -1) 7 +(10, 39, -1) 8 +(10, 40, -1) 8 +(10, 41, -1) 8 +(10, 42, -1) 8 +(10, 43, -1) 8 +(10, 44, -1) 9 +(10, 45, -1) 9 +(10, 46, -1) 9 +(10, 47, -1) 9 +(10, 48, -1) 9 +(10, 49, -1) 9 +(10, 50, -1) 9 +(10, 51, -1) 9 +(10, 52, -1) 9 +(10, 53, -1) 9 +(10, 54, -1) 9 +(10, 55, -1) 9 +(10, 56, -1) 9 +(10, 57, -1) 9 +(10, 58, -1) 8 +(10, 59, -1) 8 +(10, 60, -1) 8 +(10, 61, -1) 8 +(10, 62, -1) 8 +(10, 63, -1) 7 +(10, 64, -1) 7 +(10, 65, -1) 7 +(10, 66, -1) 6 +(10, 67, -1) 6 +(10, 68, -1) 6 +(10, 69, -1) 5 +(10, 70, -1) 5 +(10, 71, -1) 4 +(10, 72, -1) 4 +(10, 73, -1) 4 +(10, 74, -1) 3 +(10, 75, -1) 3 +(10, 76, -1) 2 +(10, 77, -1) 2 +(10, 78, -1) 1 +(10, 79, -1) 1 +(10, 80, -1) 0 +(11, 21, -1) 1 +(11, 22, -1) 1 +(11, 23, -1) 2 +(11, 24, -1) 2 +(11, 25, -1) 3 +(11, 26, -1) 3 +(11, 27, -1) 4 +(11, 28, -1) 4 +(11, 29, -1) 5 +(11, 30, -1) 5 +(11, 31, -1) 6 +(11, 32, -1) 6 +(11, 33, -1) 6 +(11, 34, -1) 7 +(11, 35, -1) 7 +(11, 36, -1) 8 +(11, 37, -1) 8 +(11, 38, -1) 8 +(11, 39, -1) 8 +(11, 40, -1) 9 +(11, 41, -1) 9 +(11, 42, -1) 9 +(11, 43, -1) 9 +(11, 44, -1) 9 +(11, 45, -1) 10 +(11, 46, -1) 10 +(11, 47, -1) 10 +(11, 48, -1) 10 +(11, 49, -1) 10 +(11, 50, -1) 10 +(11, 51, -1) 10 +(11, 52, -1) 10 +(11, 53, -1) 10 +(11, 54, -1) 10 +(11, 55, -1) 10 +(11, 56, -1) 10 +(11, 57, -1) 9 +(11, 58, -1) 9 +(11, 59, -1) 9 +(11, 60, -1) 9 +(11, 61, -1) 9 +(11, 62, -1) 8 +(11, 63, -1) 8 +(11, 64, -1) 8 +(11, 65, -1) 8 +(11, 66, -1) 7 +(11, 67, -1) 7 +(11, 68, -1) 6 +(11, 69, -1) 6 +(11, 70, -1) 6 +(11, 71, -1) 5 +(11, 72, -1) 5 +(11, 73, -1) 4 +(11, 74, -1) 4 +(11, 75, -1) 3 +(11, 76, -1) 3 +(11, 77, -1) 2 +(11, 78, -1) 2 +(11, 79, -1) 1 +(11, 80, -1) 1 +(12, 21, -1) 1 +(12, 22, -1) 2 +(12, 23, -1) 3 +(12, 24, -1) 3 +(12, 25, -1) 4 +(12, 26, -1) 4 +(12, 27, -1) 5 +(12, 28, -1) 5 +(12, 29, -1) 6 +(12, 30, -1) 6 +(12, 31, -1) 7 +(12, 32, -1) 7 +(12, 33, -1) 7 +(12, 34, -1) 8 +(12, 35, -1) 8 +(12, 36, -1) 8 +(12, 37, -1) 9 +(12, 38, -1) 9 +(12, 39, -1) 9 +(12, 40, -1) 10 +(12, 41, -1) 10 +(12, 42, -1) 10 +(12, 43, -1) 10 +(12, 44, -1) 10 +(12, 45, -1) 11 +(12, 46, -1) 11 +(12, 47, -1) 11 +(12, 48, -1) 11 +(12, 49, -1) 11 +(12, 50, -1) 11 +(12, 51, -1) 11 +(12, 52, -1) 11 +(12, 53, -1) 11 +(12, 54, -1) 11 +(12, 55, -1) 11 +(12, 56, -1) 11 +(12, 57, -1) 10 +(12, 58, -1) 10 +(12, 59, -1) 10 +(12, 60, -1) 10 +(12, 61, -1) 10 +(12, 62, -1) 9 +(12, 63, -1) 9 +(12, 64, -1) 9 +(12, 65, -1) 8 +(12, 66, -1) 8 +(12, 67, -1) 8 +(12, 68, -1) 7 +(12, 69, -1) 7 +(12, 70, -1) 7 +(12, 71, -1) 6 +(12, 72, -1) 6 +(12, 73, -1) 5 +(12, 74, -1) 5 +(12, 75, -1) 4 +(12, 76, -1) 4 +(12, 77, -1) 3 +(12, 78, -1) 3 +(12, 79, -1) 2 +(12, 80, -1) 1 +(13, 21, -1) 2 +(13, 22, -1) 3 +(13, 23, -1) 3 +(13, 24, -1) 4 +(13, 25, -1) 5 +(13, 26, -1) 5 +(13, 27, -1) 6 +(13, 28, -1) 6 +(13, 29, -1) 7 +(13, 30, -1) 7 +(13, 31, -1) 7 +(13, 32, -1) 8 +(13, 33, -1) 8 +(13, 34, -1) 9 +(13, 35, -1) 9 +(13, 36, -1) 9 +(13, 37, -1) 10 +(13, 38, -1) 10 +(13, 39, -1) 10 +(13, 40, -1) 11 +(13, 41, -1) 11 +(13, 42, -1) 11 +(13, 43, -1) 11 +(13, 44, -1) 11 +(13, 45, -1) 12 +(13, 46, -1) 12 +(13, 47, -1) 12 +(13, 48, -1) 12 +(13, 49, -1) 12 +(13, 50, -1) 12 +(13, 51, -1) 12 +(13, 52, -1) 12 +(13, 53, -1) 12 +(13, 54, -1) 12 +(13, 55, -1) 12 +(13, 56, -1) 12 +(13, 57, -1) 11 +(13, 58, -1) 11 +(13, 59, -1) 11 +(13, 60, -1) 11 +(13, 61, -1) 11 +(13, 62, -1) 10 +(13, 63, -1) 10 +(13, 64, -1) 10 +(13, 65, -1) 9 +(13, 66, -1) 9 +(13, 67, -1) 9 +(13, 68, -1) 8 +(13, 69, -1) 8 +(13, 70, -1) 7 +(13, 71, -1) 7 +(13, 72, -1) 7 +(13, 73, -1) 6 +(13, 74, -1) 6 +(13, 75, -1) 5 +(13, 76, -1) 5 +(13, 77, -1) 4 +(13, 78, -1) 3 +(13, 79, -1) 3 +(13, 80, -1) 2 +(14, 16, -1) 0 +(14, 17, -1) 1 +(14, 18, -1) 1 +(14, 19, -1) 2 +(14, 20, -1) 2 +(14, 21, -1) 3 +(14, 22, -1) 4 +(14, 23, -1) 4 +(14, 24, -1) 5 +(14, 25, -1) 5 +(14, 26, -1) 6 +(14, 27, -1) 6 +(14, 28, -1) 7 +(14, 29, -1) 7 +(14, 30, -1) 8 +(14, 31, -1) 8 +(14, 32, -1) 9 +(14, 33, -1) 9 +(14, 34, -1) 10 +(14, 35, -1) 10 +(14, 36, -1) 10 +(14, 37, -1) 11 +(14, 38, -1) 11 +(14, 39, -1) 11 +(14, 40, -1) 12 +(14, 41, -1) 12 +(14, 42, -1) 12 +(14, 43, -1) 12 +(14, 44, -1) 12 +(14, 45, -1) 13 +(14, 46, -1) 13 +(14, 47, -1) 13 +(14, 48, -1) 13 +(14, 49, -1) 13 +(14, 50, -1) 13 +(14, 51, -1) 13 +(14, 52, -1) 13 +(14, 53, -1) 13 +(14, 54, -1) 13 +(14, 55, -1) 13 +(14, 56, -1) 13 +(14, 57, -1) 12 +(14, 58, -1) 12 +(14, 59, -1) 12 +(14, 60, -1) 12 +(14, 61, -1) 12 +(14, 62, -1) 11 +(14, 63, -1) 11 +(14, 64, -1) 11 +(14, 65, -1) 10 +(14, 66, -1) 10 +(14, 67, -1) 10 +(14, 68, -1) 9 +(14, 69, -1) 9 +(14, 70, -1) 8 +(14, 71, -1) 8 +(14, 72, -1) 7 +(14, 73, -1) 7 +(14, 74, -1) 6 +(14, 75, -1) 6 +(14, 76, -1) 5 +(14, 77, -1) 5 +(14, 78, -1) 4 +(14, 79, -1) 4 +(14, 80, -1) 3 +(14, 81, -1) 2 +(14, 82, -1) 2 +(14, 83, -1) 1 +(14, 84, -1) 1 +(14, 85, -1) 0 +(15, 16, -1) 1 +(15, 17, -1) 1 +(15, 18, -1) 2 +(15, 19, -1) 3 +(15, 20, -1) 3 +(15, 21, -1) 4 +(15, 22, -1) 4 +(15, 23, -1) 5 +(15, 24, -1) 6 +(15, 25, -1) 6 +(15, 26, -1) 7 +(15, 27, -1) 7 +(15, 28, -1) 8 +(15, 29, -1) 8 +(15, 30, -1) 9 +(15, 31, -1) 9 +(15, 32, -1) 10 +(15, 33, -1) 10 +(15, 34, -1) 11 +(15, 35, -1) 11 +(15, 36, -1) 11 +(15, 37, -1) 12 +(15, 38, -1) 12 +(15, 39, -1) 12 +(15, 40, -1) 13 +(15, 41, -1) 13 +(15, 42, -1) 13 +(15, 43, -1) 13 +(15, 44, -1) 13 +(15, 45, -1) 14 +(15, 46, -1) 14 +(15, 47, -1) 14 +(15, 48, -1) 14 +(15, 49, -1) 14 +(15, 50, -1) 14 +(15, 51, -1) 14 +(15, 52, -1) 14 +(15, 53, -1) 14 +(15, 54, -1) 14 +(15, 55, -1) 14 +(15, 56, -1) 14 +(15, 57, -1) 13 +(15, 58, -1) 13 +(15, 59, -1) 13 +(15, 60, -1) 13 +(15, 61, -1) 13 +(15, 62, -1) 12 +(15, 63, -1) 12 +(15, 64, -1) 12 +(15, 65, -1) 11 +(15, 66, -1) 11 +(15, 67, -1) 11 +(15, 68, -1) 10 +(15, 69, -1) 10 +(15, 70, -1) 9 +(15, 71, -1) 9 +(15, 72, -1) 8 +(15, 73, -1) 8 +(15, 74, -1) 7 +(15, 75, -1) 7 +(15, 76, -1) 6 +(15, 77, -1) 6 +(15, 78, -1) 5 +(15, 79, -1) 4 +(15, 80, -1) 4 +(15, 81, -1) 3 +(15, 82, -1) 3 +(15, 83, -1) 2 +(15, 84, -1) 1 +(15, 85, -1) 1 +(16, 14, -1) 0 +(16, 15, -1) 1 +(16, 16, -1) 1 +(16, 17, -1) 2 +(16, 18, -1) 2 +(16, 19, -1) 3 +(16, 20, -1) 4 +(16, 21, -1) 4 +(16, 22, -1) 5 +(16, 23, -1) 6 +(16, 24, -1) 6 +(16, 25, -1) 7 +(16, 26, -1) 7 +(16, 27, -1) 8 +(16, 28, -1) 9 +(16, 29, -1) 9 +(16, 30, -1) 10 +(16, 31, -1) 10 +(16, 32, -1) 11 +(16, 33, -1) 11 +(16, 34, -1) 11 +(16, 35, -1) 12 +(16, 36, -1) 12 +(16, 37, -1) 13 +(16, 38, -1) 13 +(16, 39, -1) 13 +(16, 40, -1) 13 +(16, 41, -1) 14 +(16, 42, -1) 14 +(16, 43, -1) 14 +(16, 44, -1) 14 +(16, 45, -1) 15 +(16, 46, -1) 15 +(16, 47, -1) 15 +(16, 48, -1) 15 +(16, 49, -1) 15 +(16, 50, -1) 15 +(16, 51, -1) 15 +(16, 52, -1) 15 +(16, 53, -1) 15 +(16, 54, -1) 15 +(16, 55, -1) 15 +(16, 56, -1) 15 +(16, 57, -1) 14 +(16, 58, -1) 14 +(16, 59, -1) 14 +(16, 60, -1) 14 +(16, 61, -1) 13 +(16, 62, -1) 13 +(16, 63, -1) 13 +(16, 64, -1) 13 +(16, 65, -1) 12 +(16, 66, -1) 12 +(16, 67, -1) 11 +(16, 68, -1) 11 +(16, 69, -1) 11 +(16, 70, -1) 10 +(16, 71, -1) 10 +(16, 72, -1) 9 +(16, 73, -1) 9 +(16, 74, -1) 8 +(16, 75, -1) 7 +(16, 76, -1) 7 +(16, 77, -1) 6 +(16, 78, -1) 6 +(16, 79, -1) 5 +(16, 80, -1) 4 +(16, 81, -1) 4 +(16, 82, -1) 3 +(16, 83, -1) 2 +(16, 84, -1) 2 +(16, 85, -1) 1 +(16, 86, -1) 1 +(16, 87, -1) 0 +(17, 14, -1) 1 +(17, 15, -1) 1 +(17, 16, -1) 2 +(17, 17, -1) 3 +(17, 18, -1) 3 +(17, 19, -1) 4 +(17, 20, -1) 5 +(17, 21, -1) 5 +(17, 22, -1) 6 +(17, 23, -1) 6 +(17, 24, -1) 7 +(17, 25, -1) 8 +(17, 26, -1) 8 +(17, 27, -1) 9 +(17, 28, -1) 9 +(17, 29, -1) 10 +(17, 30, -1) 10 +(17, 31, -1) 11 +(17, 32, -1) 11 +(17, 33, -1) 12 +(17, 34, -1) 12 +(17, 35, -1) 13 +(17, 36, -1) 13 +(17, 37, -1) 13 +(17, 38, -1) 14 +(17, 39, -1) 14 +(17, 40, -1) 14 +(17, 41, -1) 15 +(17, 42, -1) 15 +(17, 43, -1) 15 +(17, 44, -1) 15 +(17, 45, -1) 16 +(17, 46, -1) 16 +(17, 47, -1) 16 +(17, 48, -1) 16 +(17, 49, -1) 16 +(17, 50, -1) 16 +(17, 51, -1) 16 +(17, 52, -1) 16 +(17, 53, -1) 16 +(17, 54, -1) 16 +(17, 55, -1) 16 +(17, 56, -1) 16 +(17, 57, -1) 15 +(17, 58, -1) 15 +(17, 59, -1) 15 +(17, 60, -1) 15 +(17, 61, -1) 14 +(17, 62, -1) 14 +(17, 63, -1) 14 +(17, 64, -1) 13 +(17, 65, -1) 13 +(17, 66, -1) 13 +(17, 67, -1) 12 +(17, 68, -1) 12 +(17, 69, -1) 11 +(17, 70, -1) 11 +(17, 71, -1) 10 +(17, 72, -1) 10 +(17, 73, -1) 9 +(17, 74, -1) 9 +(17, 75, -1) 8 +(17, 76, -1) 8 +(17, 77, -1) 7 +(17, 78, -1) 6 +(17, 79, -1) 6 +(17, 80, -1) 5 +(17, 81, -1) 5 +(17, 82, -1) 4 +(17, 83, -1) 3 +(17, 84, -1) 3 +(17, 85, -1) 2 +(17, 86, -1) 1 +(17, 87, -1) 1 +(18, 14, -1) 1 +(18, 15, -1) 2 +(18, 16, -1) 3 +(18, 17, -1) 3 +(18, 18, -1) 4 +(18, 19, -1) 5 +(18, 20, -1) 5 +(18, 21, -1) 6 +(18, 22, -1) 7 +(18, 23, -1) 7 +(18, 24, -1) 8 +(18, 25, -1) 8 +(18, 26, -1) 9 +(18, 27, -1) 10 +(18, 28, -1) 10 +(18, 29, -1) 11 +(18, 30, -1) 11 +(18, 31, -1) 12 +(18, 32, -1) 12 +(18, 33, -1) 13 +(18, 34, -1) 13 +(18, 35, -1) 14 +(18, 36, -1) 14 +(18, 37, -1) 14 +(18, 38, -1) 15 +(18, 39, -1) 15 +(18, 40, -1) 15 +(18, 41, -1) 16 +(18, 42, -1) 16 +(18, 43, -1) 16 +(18, 44, -1) 16 +(18, 45, -1) 17 +(18, 46, -1) 17 +(18, 47, -1) 17 +(18, 48, -1) 17 +(18, 49, -1) 17 +(18, 50, -1) 17 +(18, 51, -1) 17 +(18, 52, -1) 17 +(18, 53, -1) 17 +(18, 54, -1) 17 +(18, 55, -1) 17 +(18, 56, -1) 17 +(18, 57, -1) 16 +(18, 58, -1) 16 +(18, 59, -1) 16 +(18, 60, -1) 16 +(18, 61, -1) 15 +(18, 62, -1) 15 +(18, 63, -1) 15 +(18, 64, -1) 14 +(18, 65, -1) 14 +(18, 66, -1) 14 +(18, 67, -1) 13 +(18, 68, -1) 13 +(18, 69, -1) 12 +(18, 70, -1) 12 +(18, 71, -1) 11 +(18, 72, -1) 11 +(18, 73, -1) 10 +(18, 74, -1) 10 +(18, 75, -1) 9 +(18, 76, -1) 8 +(18, 77, -1) 8 +(18, 78, -1) 7 +(18, 79, -1) 7 +(18, 80, -1) 6 +(18, 81, -1) 5 +(18, 82, -1) 5 +(18, 83, -1) 4 +(18, 84, -1) 3 +(18, 85, -1) 3 +(18, 86, -1) 2 +(18, 87, -1) 1 +(19, 14, -1) 2 +(19, 15, -1) 3 +(19, 16, -1) 3 +(19, 17, -1) 4 +(19, 18, -1) 5 +(19, 19, -1) 5 +(19, 20, -1) 6 +(19, 21, -1) 7 +(19, 22, -1) 7 +(19, 23, -1) 8 +(19, 24, -1) 9 +(19, 25, -1) 9 +(19, 26, -1) 10 +(19, 27, -1) 10 +(19, 28, -1) 11 +(19, 29, -1) 12 +(19, 30, -1) 12 +(19, 31, -1) 13 +(19, 32, -1) 13 +(19, 33, -1) 14 +(19, 34, -1) 14 +(19, 35, -1) 15 +(19, 36, -1) 15 +(19, 37, -1) 15 +(19, 38, -1) 16 +(19, 39, -1) 16 +(19, 40, -1) 16 +(19, 41, -1) 17 +(19, 42, -1) 17 +(19, 43, -1) 17 +(19, 44, -1) 17 +(19, 45, -1) 18 +(19, 46, -1) 18 +(19, 47, -1) 18 +(19, 48, -1) 18 +(19, 49, -1) 18 +(19, 50, -1) 18 +(19, 51, -1) 18 +(19, 52, -1) 18 +(19, 53, -1) 18 +(19, 54, -1) 18 +(19, 55, -1) 18 +(19, 56, -1) 18 +(19, 57, -1) 17 +(19, 58, -1) 17 +(19, 59, -1) 17 +(19, 60, -1) 17 +(19, 61, -1) 16 +(19, 62, -1) 16 +(19, 63, -1) 16 +(19, 64, -1) 15 +(19, 65, -1) 15 +(19, 66, -1) 15 +(19, 67, -1) 14 +(19, 68, -1) 14 +(19, 69, -1) 13 +(19, 70, -1) 13 +(19, 71, -1) 12 +(19, 72, -1) 12 +(19, 73, -1) 11 +(19, 74, -1) 10 +(19, 75, -1) 10 +(19, 76, -1) 9 +(19, 77, -1) 9 +(19, 78, -1) 8 +(19, 79, -1) 7 +(19, 80, -1) 7 +(19, 81, -1) 6 +(19, 82, -1) 5 +(19, 83, -1) 5 +(19, 84, -1) 4 +(19, 85, -1) 3 +(19, 86, -1) 3 +(19, 87, -1) 2 +(20, 14, -1) 3 +(20, 15, -1) 3 +(20, 16, -1) 4 +(20, 17, -1) 5 +(20, 18, -1) 5 +(20, 19, -1) 6 +(20, 20, -1) 7 +(20, 21, -1) 7 +(20, 22, -1) 8 +(20, 23, -1) 9 +(20, 24, -1) 9 +(20, 25, -1) 10 +(20, 26, -1) 11 +(20, 27, -1) 11 +(20, 28, -1) 12 +(20, 29, -1) 12 +(20, 30, -1) 13 +(20, 31, -1) 14 +(20, 32, -1) 14 +(20, 33, -1) 15 +(20, 34, -1) 15 +(20, 35, -1) 15 +(20, 36, -1) 16 +(20, 37, -1) 16 +(20, 38, -1) 17 +(20, 39, -1) 17 +(20, 40, -1) 17 +(20, 41, -1) 18 +(20, 42, -1) 18 +(20, 43, -1) 18 +(20, 44, -1) 18 +(20, 45, -1) 19 +(20, 46, -1) 19 +(20, 47, -1) 19 +(20, 48, -1) 19 +(20, 49, -1) 19 +(20, 50, -1) 19 +(20, 51, -1) 19 +(20, 52, -1) 19 +(20, 53, -1) 19 +(20, 54, -1) 19 +(20, 55, -1) 19 +(20, 56, -1) 19 +(20, 57, -1) 18 +(20, 58, -1) 18 +(20, 59, -1) 18 +(20, 60, -1) 18 +(20, 61, -1) 17 +(20, 62, -1) 17 +(20, 63, -1) 17 +(20, 64, -1) 16 +(20, 65, -1) 16 +(20, 66, -1) 15 +(20, 67, -1) 15 +(20, 68, -1) 15 +(20, 69, -1) 14 +(20, 70, -1) 14 +(20, 71, -1) 13 +(20, 72, -1) 12 +(20, 73, -1) 12 +(20, 74, -1) 11 +(20, 75, -1) 11 +(20, 76, -1) 10 +(20, 77, -1) 9 +(20, 78, -1) 9 +(20, 79, -1) 8 +(20, 80, -1) 7 +(20, 81, -1) 7 +(20, 82, -1) 6 +(20, 83, -1) 5 +(20, 84, -1) 5 +(20, 85, -1) 4 +(20, 86, -1) 3 +(20, 87, -1) 3 +(21, 9, -1) 0 +(21, 10, -1) 0 +(21, 11, -1) 1 +(21, 12, -1) 1 +(21, 13, -1) 2 +(21, 14, -1) 3 +(21, 15, -1) 4 +(21, 16, -1) 4 +(21, 17, -1) 5 +(21, 18, -1) 6 +(21, 19, -1) 7 +(21, 20, -1) 7 +(21, 21, -1) 8 +(21, 22, -1) 9 +(21, 23, -1) 9 +(21, 24, -1) 10 +(21, 25, -1) 11 +(21, 26, -1) 11 +(21, 27, -1) 12 +(21, 28, -1) 13 +(21, 29, -1) 13 +(21, 30, -1) 14 +(21, 31, -1) 14 +(21, 32, -1) 15 +(21, 33, -1) 15 +(21, 34, -1) 16 +(21, 35, -1) 16 +(21, 36, -1) 17 +(21, 37, -1) 17 +(21, 38, -1) 18 +(21, 39, -1) 18 +(21, 40, -1) 18 +(21, 41, -1) 19 +(21, 42, -1) 19 +(21, 43, -1) 19 +(21, 44, -1) 19 +(21, 45, -1) 20 +(21, 46, -1) 20 +(21, 47, -1) 20 +(21, 48, -1) 20 +(21, 49, -1) 20 +(21, 50, -1) 20 +(21, 51, -1) 20 +(21, 52, -1) 20 +(21, 53, -1) 20 +(21, 54, -1) 20 +(21, 55, -1) 20 +(21, 56, -1) 20 +(21, 57, -1) 19 +(21, 58, -1) 19 +(21, 59, -1) 19 +(21, 60, -1) 19 +(21, 61, -1) 18 +(21, 62, -1) 18 +(21, 63, -1) 18 +(21, 64, -1) 17 +(21, 65, -1) 17 +(21, 66, -1) 16 +(21, 67, -1) 16 +(21, 68, -1) 15 +(21, 69, -1) 15 +(21, 70, -1) 14 +(21, 71, -1) 14 +(21, 72, -1) 13 +(21, 73, -1) 13 +(21, 74, -1) 12 +(21, 75, -1) 11 +(21, 76, -1) 11 +(21, 77, -1) 10 +(21, 78, -1) 9 +(21, 79, -1) 9 +(21, 80, -1) 8 +(21, 81, -1) 7 +(21, 82, -1) 7 +(21, 83, -1) 6 +(21, 84, -1) 5 +(21, 85, -1) 4 +(21, 86, -1) 4 +(21, 87, -1) 3 +(21, 88, -1) 2 +(21, 89, -1) 1 +(21, 90, -1) 1 +(21, 91, -1) 0 +(21, 92, -1) 0 +(22, 9, -1) 0 +(22, 10, -1) 1 +(22, 11, -1) 1 +(22, 12, -1) 2 +(22, 13, -1) 3 +(22, 14, -1) 4 +(22, 15, -1) 4 +(22, 16, -1) 5 +(22, 17, -1) 6 +(22, 18, -1) 7 +(22, 19, -1) 7 +(22, 20, -1) 8 +(22, 21, -1) 9 +(22, 22, -1) 9 +(22, 23, -1) 10 +(22, 24, -1) 11 +(22, 25, -1) 12 +(22, 26, -1) 12 +(22, 27, -1) 13 +(22, 28, -1) 13 +(22, 29, -1) 14 +(22, 30, -1) 15 +(22, 31, -1) 15 +(22, 32, -1) 16 +(22, 33, -1) 16 +(22, 34, -1) 17 +(22, 35, -1) 17 +(22, 36, -1) 18 +(22, 37, -1) 18 +(22, 38, -1) 18 +(22, 39, -1) 19 +(22, 40, -1) 19 +(22, 41, -1) 20 +(22, 42, -1) 20 +(22, 43, -1) 20 +(22, 44, -1) 20 +(22, 45, -1) 20 +(22, 46, -1) 21 +(22, 47, -1) 21 +(22, 48, -1) 21 +(22, 49, -1) 21 +(22, 50, -1) 21 +(22, 51, -1) 21 +(22, 52, -1) 21 +(22, 53, -1) 21 +(22, 54, -1) 21 +(22, 55, -1) 21 +(22, 56, -1) 20 +(22, 57, -1) 20 +(22, 58, -1) 20 +(22, 59, -1) 20 +(22, 60, -1) 20 +(22, 61, -1) 19 +(22, 62, -1) 19 +(22, 63, -1) 18 +(22, 64, -1) 18 +(22, 65, -1) 18 +(22, 66, -1) 17 +(22, 67, -1) 17 +(22, 68, -1) 16 +(22, 69, -1) 16 +(22, 70, -1) 15 +(22, 71, -1) 15 +(22, 72, -1) 14 +(22, 73, -1) 13 +(22, 74, -1) 13 +(22, 75, -1) 12 +(22, 76, -1) 12 +(22, 77, -1) 11 +(22, 78, -1) 10 +(22, 79, -1) 9 +(22, 80, -1) 9 +(22, 81, -1) 8 +(22, 82, -1) 7 +(22, 83, -1) 7 +(22, 84, -1) 6 +(22, 85, -1) 5 +(22, 86, -1) 4 +(22, 87, -1) 4 +(22, 88, -1) 3 +(22, 89, -1) 2 +(22, 90, -1) 1 +(22, 91, -1) 1 +(22, 92, -1) 0 +(23, 9, -1) 0 +(23, 10, -1) 1 +(23, 11, -1) 2 +(23, 12, -1) 3 +(23, 13, -1) 3 +(23, 14, -1) 4 +(23, 15, -1) 5 +(23, 16, -1) 6 +(23, 17, -1) 7 +(23, 18, -1) 7 +(23, 19, -1) 8 +(23, 20, -1) 9 +(23, 21, -1) 9 +(23, 22, -1) 10 +(23, 23, -1) 11 +(23, 24, -1) 12 +(23, 25, -1) 12 +(23, 26, -1) 13 +(23, 27, -1) 14 +(23, 28, -1) 14 +(23, 29, -1) 15 +(23, 30, -1) 15 +(23, 31, -1) 16 +(23, 32, -1) 17 +(23, 33, -1) 17 +(23, 34, -1) 18 +(23, 35, -1) 18 +(23, 36, -1) 19 +(23, 37, -1) 19 +(23, 38, -1) 19 +(23, 39, -1) 20 +(23, 40, -1) 20 +(23, 41, -1) 20 +(23, 42, -1) 21 +(23, 43, -1) 21 +(23, 44, -1) 21 +(23, 45, -1) 21 +(23, 46, -1) 22 +(23, 47, -1) 22 +(23, 48, -1) 22 +(23, 49, -1) 22 +(23, 50, -1) 22 +(23, 51, -1) 22 +(23, 52, -1) 22 +(23, 53, -1) 22 +(23, 54, -1) 22 +(23, 55, -1) 22 +(23, 56, -1) 21 +(23, 57, -1) 21 +(23, 58, -1) 21 +(23, 59, -1) 21 +(23, 60, -1) 20 +(23, 61, -1) 20 +(23, 62, -1) 20 +(23, 63, -1) 19 +(23, 64, -1) 19 +(23, 65, -1) 19 +(23, 66, -1) 18 +(23, 67, -1) 18 +(23, 68, -1) 17 +(23, 69, -1) 17 +(23, 70, -1) 16 +(23, 71, -1) 15 +(23, 72, -1) 15 +(23, 73, -1) 14 +(23, 74, -1) 14 +(23, 75, -1) 13 +(23, 76, -1) 12 +(23, 77, -1) 12 +(23, 78, -1) 11 +(23, 79, -1) 10 +(23, 80, -1) 9 +(23, 81, -1) 9 +(23, 82, -1) 8 +(23, 83, -1) 7 +(23, 84, -1) 7 +(23, 85, -1) 6 +(23, 86, -1) 5 +(23, 87, -1) 4 +(23, 88, -1) 3 +(23, 89, -1) 3 +(23, 90, -1) 2 +(23, 91, -1) 1 +(23, 92, -1) 0 +(24, 9, -1) 1 +(24, 10, -1) 2 +(24, 11, -1) 2 +(24, 12, -1) 3 +(24, 13, -1) 4 +(24, 14, -1) 5 +(24, 15, -1) 6 +(24, 16, -1) 6 +(24, 17, -1) 7 +(24, 18, -1) 8 +(24, 19, -1) 9 +(24, 20, -1) 9 +(24, 21, -1) 10 +(24, 22, -1) 11 +(24, 23, -1) 12 +(24, 24, -1) 12 +(24, 25, -1) 13 +(24, 26, -1) 14 +(24, 27, -1) 14 +(24, 28, -1) 15 +(24, 29, -1) 16 +(24, 30, -1) 16 +(24, 31, -1) 17 +(24, 32, -1) 17 +(24, 33, -1) 18 +(24, 34, -1) 18 +(24, 35, -1) 19 +(24, 36, -1) 19 +(24, 37, -1) 20 +(24, 38, -1) 20 +(24, 39, -1) 21 +(24, 40, -1) 21 +(24, 41, -1) 21 +(24, 42, -1) 22 +(24, 43, -1) 22 +(24, 44, -1) 22 +(24, 45, -1) 22 +(24, 46, -1) 23 +(24, 47, -1) 23 +(24, 48, -1) 23 +(24, 49, -1) 23 +(24, 50, -1) 23 +(24, 51, -1) 23 +(24, 52, -1) 23 +(24, 53, -1) 23 +(24, 54, -1) 23 +(24, 55, -1) 23 +(24, 56, -1) 22 +(24, 57, -1) 22 +(24, 58, -1) 22 +(24, 59, -1) 22 +(24, 60, -1) 21 +(24, 61, -1) 21 +(24, 62, -1) 21 +(24, 63, -1) 20 +(24, 64, -1) 20 +(24, 65, -1) 19 +(24, 66, -1) 19 +(24, 67, -1) 18 +(24, 68, -1) 18 +(24, 69, -1) 17 +(24, 70, -1) 17 +(24, 71, -1) 16 +(24, 72, -1) 16 +(24, 73, -1) 15 +(24, 74, -1) 14 +(24, 75, -1) 14 +(24, 76, -1) 13 +(24, 77, -1) 12 +(24, 78, -1) 12 +(24, 79, -1) 11 +(24, 80, -1) 10 +(24, 81, -1) 9 +(24, 82, -1) 9 +(24, 83, -1) 8 +(24, 84, -1) 7 +(24, 85, -1) 6 +(24, 86, -1) 6 +(24, 87, -1) 5 +(24, 88, -1) 4 +(24, 89, -1) 3 +(24, 90, -1) 2 +(24, 91, -1) 2 +(24, 92, -1) 1 +(25, 9, -1) 1 +(25, 10, -1) 2 +(25, 11, -1) 3 +(25, 12, -1) 4 +(25, 13, -1) 5 +(25, 14, -1) 5 +(25, 15, -1) 6 +(25, 16, -1) 7 +(25, 17, -1) 8 +(25, 18, -1) 9 +(25, 19, -1) 9 +(25, 20, -1) 10 +(25, 21, -1) 11 +(25, 22, -1) 12 +(25, 23, -1) 12 +(25, 24, -1) 13 +(25, 25, -1) 14 +(25, 26, -1) 14 +(25, 27, -1) 15 +(25, 28, -1) 16 +(25, 29, -1) 16 +(25, 30, -1) 17 +(25, 31, -1) 18 +(25, 32, -1) 18 +(25, 33, -1) 19 +(25, 34, -1) 19 +(25, 35, -1) 20 +(25, 36, -1) 20 +(25, 37, -1) 21 +(25, 38, -1) 21 +(25, 39, -1) 22 +(25, 40, -1) 22 +(25, 41, -1) 22 +(25, 42, -1) 23 +(25, 43, -1) 23 +(25, 44, -1) 23 +(25, 45, -1) 23 +(25, 46, -1) 24 +(25, 47, -1) 24 +(25, 48, -1) 24 +(25, 49, -1) 24 +(25, 50, -1) 24 +(25, 51, -1) 24 +(25, 52, -1) 24 +(25, 53, -1) 24 +(25, 54, -1) 24 +(25, 55, -1) 24 +(25, 56, -1) 23 +(25, 57, -1) 23 +(25, 58, -1) 23 +(25, 59, -1) 23 +(25, 60, -1) 22 +(25, 61, -1) 22 +(25, 62, -1) 22 +(25, 63, -1) 21 +(25, 64, -1) 21 +(25, 65, -1) 20 +(25, 66, -1) 20 +(25, 67, -1) 19 +(25, 68, -1) 19 +(25, 69, -1) 18 +(25, 70, -1) 18 +(25, 71, -1) 17 +(25, 72, -1) 16 +(25, 73, -1) 16 +(25, 74, -1) 15 +(25, 75, -1) 14 +(25, 76, -1) 14 +(25, 77, -1) 13 +(25, 78, -1) 12 +(25, 79, -1) 12 +(25, 80, -1) 11 +(25, 81, -1) 10 +(25, 82, -1) 9 +(25, 83, -1) 9 +(25, 84, -1) 8 +(25, 85, -1) 7 +(25, 86, -1) 6 +(25, 87, -1) 5 +(25, 88, -1) 5 +(25, 89, -1) 4 +(25, 90, -1) 3 +(25, 91, -1) 2 +(25, 92, -1) 1 +(26, 6, -1) 0 +(26, 7, -1) 0 +(26, 8, -1) 1 +(26, 9, -1) 2 +(26, 10, -1) 3 +(26, 11, -1) 3 +(26, 12, -1) 4 +(26, 13, -1) 5 +(26, 14, -1) 6 +(26, 15, -1) 7 +(26, 16, -1) 7 +(26, 17, -1) 8 +(26, 18, -1) 9 +(26, 19, -1) 10 +(26, 20, -1) 11 +(26, 21, -1) 11 +(26, 22, -1) 12 +(26, 23, -1) 13 +(26, 24, -1) 14 +(26, 25, -1) 14 +(26, 26, -1) 15 +(26, 27, -1) 16 +(26, 28, -1) 16 +(26, 29, -1) 17 +(26, 30, -1) 18 +(26, 31, -1) 18 +(26, 32, -1) 19 +(26, 33, -1) 19 +(26, 34, -1) 20 +(26, 35, -1) 21 +(26, 36, -1) 21 +(26, 37, -1) 22 +(26, 38, -1) 22 +(26, 39, -1) 22 +(26, 40, -1) 23 +(26, 41, -1) 23 +(26, 42, -1) 24 +(26, 43, -1) 24 +(26, 44, -1) 24 +(26, 45, -1) 24 +(26, 46, -1) 25 +(26, 47, -1) 25 +(26, 48, -1) 25 +(26, 49, -1) 25 +(26, 50, -1) 25 +(26, 51, -1) 25 +(26, 52, -1) 25 +(26, 53, -1) 25 +(26, 54, -1) 25 +(26, 55, -1) 25 +(26, 56, -1) 24 +(26, 57, -1) 24 +(26, 58, -1) 24 +(26, 59, -1) 24 +(26, 60, -1) 23 +(26, 61, -1) 23 +(26, 62, -1) 22 +(26, 63, -1) 22 +(26, 64, -1) 22 +(26, 65, -1) 21 +(26, 66, -1) 21 +(26, 67, -1) 20 +(26, 68, -1) 19 +(26, 69, -1) 19 +(26, 70, -1) 18 +(26, 71, -1) 18 +(26, 72, -1) 17 +(26, 73, -1) 16 +(26, 74, -1) 16 +(26, 75, -1) 15 +(26, 76, -1) 14 +(26, 77, -1) 14 +(26, 78, -1) 13 +(26, 79, -1) 12 +(26, 80, -1) 11 +(26, 81, -1) 11 +(26, 82, -1) 10 +(26, 83, -1) 9 +(26, 84, -1) 8 +(26, 85, -1) 7 +(26, 86, -1) 7 +(26, 87, -1) 6 +(26, 88, -1) 5 +(26, 89, -1) 4 +(26, 90, -1) 3 +(26, 91, -1) 3 +(26, 92, -1) 2 +(26, 93, -1) 1 +(26, 94, -1) 0 +(26, 95, -1) 0 +(27, 6, -1) 0 +(27, 7, -1) 0 +(27, 8, -1) 1 +(27, 9, -1) 2 +(27, 10, -1) 3 +(27, 11, -1) 4 +(27, 12, -1) 5 +(27, 13, -1) 6 +(27, 14, -1) 6 +(27, 15, -1) 7 +(27, 16, -1) 8 +(27, 17, -1) 9 +(27, 18, -1) 10 +(27, 19, -1) 10 +(27, 20, -1) 11 +(27, 21, -1) 12 +(27, 22, -1) 13 +(27, 23, -1) 14 +(27, 24, -1) 14 +(27, 25, -1) 15 +(27, 26, -1) 16 +(27, 27, -1) 16 +(27, 28, -1) 17 +(27, 29, -1) 18 +(27, 30, -1) 18 +(27, 31, -1) 19 +(27, 32, -1) 20 +(27, 33, -1) 20 +(27, 34, -1) 21 +(27, 35, -1) 21 +(27, 36, -1) 22 +(27, 37, -1) 22 +(27, 38, -1) 23 +(27, 39, -1) 23 +(27, 40, -1) 24 +(27, 41, -1) 24 +(27, 42, -1) 25 +(27, 43, -1) 25 +(27, 44, -1) 25 +(27, 45, -1) 25 +(27, 46, -1) 26 +(27, 47, -1) 26 +(27, 48, -1) 26 +(27, 49, -1) 26 +(27, 50, -1) 26 +(27, 51, -1) 26 +(27, 52, -1) 26 +(27, 53, -1) 26 +(27, 54, -1) 26 +(27, 55, -1) 26 +(27, 56, -1) 25 +(27, 57, -1) 25 +(27, 58, -1) 25 +(27, 59, -1) 25 +(27, 60, -1) 24 +(27, 61, -1) 24 +(27, 62, -1) 23 +(27, 63, -1) 23 +(27, 64, -1) 22 +(27, 65, -1) 22 +(27, 66, -1) 21 +(27, 67, -1) 21 +(27, 68, -1) 20 +(27, 69, -1) 20 +(27, 70, -1) 19 +(27, 71, -1) 18 +(27, 72, -1) 18 +(27, 73, -1) 17 +(27, 74, -1) 16 +(27, 75, -1) 16 +(27, 76, -1) 15 +(27, 77, -1) 14 +(27, 78, -1) 14 +(27, 79, -1) 13 +(27, 80, -1) 12 +(27, 81, -1) 11 +(27, 82, -1) 10 +(27, 83, -1) 10 +(27, 84, -1) 9 +(27, 85, -1) 8 +(27, 86, -1) 7 +(27, 87, -1) 6 +(27, 88, -1) 6 +(27, 89, -1) 5 +(27, 90, -1) 4 +(27, 91, -1) 3 +(27, 92, -1) 2 +(27, 93, -1) 1 +(27, 94, -1) 0 +(27, 95, -1) 0 +(28, 6, -1) 0 +(28, 7, -1) 1 +(28, 8, -1) 2 +(28, 9, -1) 3 +(28, 10, -1) 4 +(28, 11, -1) 4 +(28, 12, -1) 5 +(28, 13, -1) 6 +(28, 14, -1) 7 +(28, 15, -1) 8 +(28, 16, -1) 9 +(28, 17, -1) 9 +(28, 18, -1) 10 +(28, 19, -1) 11 +(28, 20, -1) 12 +(28, 21, -1) 13 +(28, 22, -1) 13 +(28, 23, -1) 14 +(28, 24, -1) 15 +(28, 25, -1) 16 +(28, 26, -1) 16 +(28, 27, -1) 17 +(28, 28, -1) 18 +(28, 29, -1) 19 +(28, 30, -1) 19 +(28, 31, -1) 20 +(28, 32, -1) 20 +(28, 33, -1) 21 +(28, 34, -1) 22 +(28, 35, -1) 22 +(28, 36, -1) 23 +(28, 37, -1) 23 +(28, 38, -1) 24 +(28, 39, -1) 24 +(28, 40, -1) 25 +(28, 41, -1) 25 +(28, 42, -1) 25 +(28, 43, -1) 26 +(28, 44, -1) 26 +(28, 45, -1) 26 +(28, 46, -1) 27 +(28, 47, -1) 27 +(28, 48, -1) 27 +(28, 49, -1) 27 +(28, 50, -1) 27 +(28, 51, -1) 27 +(28, 52, -1) 27 +(28, 53, -1) 27 +(28, 54, -1) 27 +(28, 55, -1) 27 +(28, 56, -1) 26 +(28, 57, -1) 26 +(28, 58, -1) 26 +(28, 59, -1) 25 +(28, 60, -1) 25 +(28, 61, -1) 25 +(28, 62, -1) 24 +(28, 63, -1) 24 +(28, 64, -1) 23 +(28, 65, -1) 23 +(28, 66, -1) 22 +(28, 67, -1) 22 +(28, 68, -1) 21 +(28, 69, -1) 20 +(28, 70, -1) 20 +(28, 71, -1) 19 +(28, 72, -1) 19 +(28, 73, -1) 18 +(28, 74, -1) 17 +(28, 75, -1) 16 +(28, 76, -1) 16 +(28, 77, -1) 15 +(28, 78, -1) 14 +(28, 79, -1) 13 +(28, 80, -1) 13 +(28, 81, -1) 12 +(28, 82, -1) 11 +(28, 83, -1) 10 +(28, 84, -1) 9 +(28, 85, -1) 9 +(28, 86, -1) 8 +(28, 87, -1) 7 +(28, 88, -1) 6 +(28, 89, -1) 5 +(28, 90, -1) 4 +(28, 91, -1) 4 +(28, 92, -1) 3 +(28, 93, -1) 2 +(28, 94, -1) 1 +(28, 95, -1) 0 +(29, 6, -1) 1 +(29, 7, -1) 1 +(29, 8, -1) 2 +(29, 9, -1) 3 +(29, 10, -1) 4 +(29, 11, -1) 5 +(29, 12, -1) 6 +(29, 13, -1) 7 +(29, 14, -1) 7 +(29, 15, -1) 8 +(29, 16, -1) 9 +(29, 17, -1) 10 +(29, 18, -1) 11 +(29, 19, -1) 12 +(29, 20, -1) 12 +(29, 21, -1) 13 +(29, 22, -1) 14 +(29, 23, -1) 15 +(29, 24, -1) 16 +(29, 25, -1) 16 +(29, 26, -1) 17 +(29, 27, -1) 18 +(29, 28, -1) 19 +(29, 29, -1) 19 +(29, 30, -1) 20 +(29, 31, -1) 21 +(29, 32, -1) 21 +(29, 33, -1) 22 +(29, 34, -1) 23 +(29, 35, -1) 23 +(29, 36, -1) 24 +(29, 37, -1) 24 +(29, 38, -1) 25 +(29, 39, -1) 25 +(29, 40, -1) 26 +(29, 41, -1) 26 +(29, 42, -1) 26 +(29, 43, -1) 27 +(29, 44, -1) 27 +(29, 45, -1) 27 +(29, 46, -1) 28 +(29, 47, -1) 28 +(29, 48, -1) 28 +(29, 49, -1) 28 +(29, 50, -1) 28 +(29, 51, -1) 28 +(29, 52, -1) 28 +(29, 53, -1) 28 +(29, 54, -1) 28 +(29, 55, -1) 28 +(29, 56, -1) 27 +(29, 57, -1) 27 +(29, 58, -1) 27 +(29, 59, -1) 26 +(29, 60, -1) 26 +(29, 61, -1) 26 +(29, 62, -1) 25 +(29, 63, -1) 25 +(29, 64, -1) 24 +(29, 65, -1) 24 +(29, 66, -1) 23 +(29, 67, -1) 23 +(29, 68, -1) 22 +(29, 69, -1) 21 +(29, 70, -1) 21 +(29, 71, -1) 20 +(29, 72, -1) 19 +(29, 73, -1) 19 +(29, 74, -1) 18 +(29, 75, -1) 17 +(29, 76, -1) 16 +(29, 77, -1) 16 +(29, 78, -1) 15 +(29, 79, -1) 14 +(29, 80, -1) 13 +(29, 81, -1) 12 +(29, 82, -1) 12 +(29, 83, -1) 11 +(29, 84, -1) 10 +(29, 85, -1) 9 +(29, 86, -1) 8 +(29, 87, -1) 7 +(29, 88, -1) 7 +(29, 89, -1) 6 +(29, 90, -1) 5 +(29, 91, -1) 4 +(29, 92, -1) 3 +(29, 93, -1) 2 +(29, 94, -1) 1 +(29, 95, -1) 1 +(30, 6, -1) 1 +(30, 7, -1) 2 +(30, 8, -1) 3 +(30, 9, -1) 4 +(30, 10, -1) 5 +(30, 11, -1) 5 +(30, 12, -1) 6 +(30, 13, -1) 7 +(30, 14, -1) 8 +(30, 15, -1) 9 +(30, 16, -1) 10 +(30, 17, -1) 11 +(30, 18, -1) 11 +(30, 19, -1) 12 +(30, 20, -1) 13 +(30, 21, -1) 14 +(30, 22, -1) 15 +(30, 23, -1) 15 +(30, 24, -1) 16 +(30, 25, -1) 17 +(30, 26, -1) 18 +(30, 27, -1) 19 +(30, 28, -1) 19 +(30, 29, -1) 20 +(30, 30, -1) 21 +(30, 31, -1) 21 +(30, 32, -1) 22 +(30, 33, -1) 23 +(30, 34, -1) 23 +(30, 35, -1) 24 +(30, 36, -1) 24 +(30, 37, -1) 25 +(30, 38, -1) 26 +(30, 39, -1) 26 +(30, 40, -1) 27 +(30, 41, -1) 27 +(30, 42, -1) 27 +(30, 43, -1) 28 +(30, 44, -1) 28 +(30, 45, -1) 28 +(30, 46, -1) 29 +(30, 47, -1) 29 +(30, 48, -1) 29 +(30, 49, -1) 29 +(30, 50, -1) 29 +(30, 51, -1) 29 +(30, 52, -1) 29 +(30, 53, -1) 29 +(30, 54, -1) 29 +(30, 55, -1) 29 +(30, 56, -1) 28 +(30, 57, -1) 28 +(30, 58, -1) 28 +(30, 59, -1) 27 +(30, 60, -1) 27 +(30, 61, -1) 27 +(30, 62, -1) 26 +(30, 63, -1) 26 +(30, 64, -1) 25 +(30, 65, -1) 24 +(30, 66, -1) 24 +(30, 67, -1) 23 +(30, 68, -1) 23 +(30, 69, -1) 22 +(30, 70, -1) 21 +(30, 71, -1) 21 +(30, 72, -1) 20 +(30, 73, -1) 19 +(30, 74, -1) 19 +(30, 75, -1) 18 +(30, 76, -1) 17 +(30, 77, -1) 16 +(30, 78, -1) 15 +(30, 79, -1) 15 +(30, 80, -1) 14 +(30, 81, -1) 13 +(30, 82, -1) 12 +(30, 83, -1) 11 +(30, 84, -1) 11 +(30, 85, -1) 10 +(30, 86, -1) 9 +(30, 87, -1) 8 +(30, 88, -1) 7 +(30, 89, -1) 6 +(30, 90, -1) 5 +(30, 91, -1) 5 +(30, 92, -1) 4 +(30, 93, -1) 3 +(30, 94, -1) 2 +(30, 95, -1) 1 +(31, 6, -1) 1 +(31, 7, -1) 2 +(31, 8, -1) 3 +(31, 9, -1) 4 +(31, 10, -1) 5 +(31, 11, -1) 6 +(31, 12, -1) 7 +(31, 13, -1) 7 +(31, 14, -1) 8 +(31, 15, -1) 9 +(31, 16, -1) 10 +(31, 17, -1) 11 +(31, 18, -1) 12 +(31, 19, -1) 13 +(31, 20, -1) 13 +(31, 21, -1) 14 +(31, 22, -1) 15 +(31, 23, -1) 16 +(31, 24, -1) 17 +(31, 25, -1) 18 +(31, 26, -1) 18 +(31, 27, -1) 19 +(31, 28, -1) 20 +(31, 29, -1) 21 +(31, 30, -1) 21 +(31, 31, -1) 22 +(31, 32, -1) 23 +(31, 33, -1) 23 +(31, 34, -1) 24 +(31, 35, -1) 25 +(31, 36, -1) 25 +(31, 37, -1) 26 +(31, 38, -1) 26 +(31, 39, -1) 27 +(31, 40, -1) 27 +(31, 41, -1) 28 +(31, 42, -1) 28 +(31, 43, -1) 29 +(31, 44, -1) 29 +(31, 45, -1) 29 +(31, 46, -1) 30 +(31, 47, -1) 30 +(31, 48, -1) 30 +(31, 49, -1) 30 +(31, 50, -1) 30 +(31, 51, -1) 30 +(31, 52, -1) 30 +(31, 53, -1) 30 +(31, 54, -1) 30 +(31, 55, -1) 30 +(31, 56, -1) 29 +(31, 57, -1) 29 +(31, 58, -1) 29 +(31, 59, -1) 28 +(31, 60, -1) 28 +(31, 61, -1) 27 +(31, 62, -1) 27 +(31, 63, -1) 26 +(31, 64, -1) 26 +(31, 65, -1) 25 +(31, 66, -1) 25 +(31, 67, -1) 24 +(31, 68, -1) 23 +(31, 69, -1) 23 +(31, 70, -1) 22 +(31, 71, -1) 21 +(31, 72, -1) 21 +(31, 73, -1) 20 +(31, 74, -1) 19 +(31, 75, -1) 18 +(31, 76, -1) 18 +(31, 77, -1) 17 +(31, 78, -1) 16 +(31, 79, -1) 15 +(31, 80, -1) 14 +(31, 81, -1) 13 +(31, 82, -1) 13 +(31, 83, -1) 12 +(31, 84, -1) 11 +(31, 85, -1) 10 +(31, 86, -1) 9 +(31, 87, -1) 8 +(31, 88, -1) 7 +(31, 89, -1) 7 +(31, 90, -1) 6 +(31, 91, -1) 5 +(31, 92, -1) 4 +(31, 93, -1) 3 +(31, 94, -1) 2 +(31, 95, -1) 1 +(32, 6, -1) 2 +(32, 7, -1) 2 +(32, 8, -1) 3 +(32, 9, -1) 4 +(32, 10, -1) 5 +(32, 11, -1) 6 +(32, 12, -1) 7 +(32, 13, -1) 8 +(32, 14, -1) 9 +(32, 15, -1) 10 +(32, 16, -1) 11 +(32, 17, -1) 11 +(32, 18, -1) 12 +(32, 19, -1) 13 +(32, 20, -1) 14 +(32, 21, -1) 15 +(32, 22, -1) 16 +(32, 23, -1) 17 +(32, 24, -1) 17 +(32, 25, -1) 18 +(32, 26, -1) 19 +(32, 27, -1) 20 +(32, 28, -1) 20 +(32, 29, -1) 21 +(32, 30, -1) 22 +(32, 31, -1) 23 +(32, 32, -1) 23 +(32, 33, -1) 24 +(32, 34, -1) 25 +(32, 35, -1) 25 +(32, 36, -1) 26 +(32, 37, -1) 27 +(32, 38, -1) 27 +(32, 39, -1) 28 +(32, 40, -1) 28 +(32, 41, -1) 29 +(32, 42, -1) 29 +(32, 43, -1) 30 +(32, 44, -1) 30 +(32, 45, -1) 30 +(32, 46, -1) 30 +(32, 47, -1) 31 +(32, 48, -1) 31 +(32, 49, -1) 31 +(32, 50, -1) 31 +(32, 51, -1) 31 +(32, 52, -1) 31 +(32, 53, -1) 31 +(32, 54, -1) 31 +(32, 55, -1) 30 +(32, 56, -1) 30 +(32, 57, -1) 30 +(32, 58, -1) 30 +(32, 59, -1) 29 +(32, 60, -1) 29 +(32, 61, -1) 28 +(32, 62, -1) 28 +(32, 63, -1) 27 +(32, 64, -1) 27 +(32, 65, -1) 26 +(32, 66, -1) 25 +(32, 67, -1) 25 +(32, 68, -1) 24 +(32, 69, -1) 23 +(32, 70, -1) 23 +(32, 71, -1) 22 +(32, 72, -1) 21 +(32, 73, -1) 20 +(32, 74, -1) 20 +(32, 75, -1) 19 +(32, 76, -1) 18 +(32, 77, -1) 17 +(32, 78, -1) 17 +(32, 79, -1) 16 +(32, 80, -1) 15 +(32, 81, -1) 14 +(32, 82, -1) 13 +(32, 83, -1) 12 +(32, 84, -1) 11 +(32, 85, -1) 11 +(32, 86, -1) 10 +(32, 87, -1) 9 +(32, 88, -1) 8 +(32, 89, -1) 7 +(32, 90, -1) 6 +(32, 91, -1) 5 +(32, 92, -1) 4 +(32, 93, -1) 3 +(32, 94, -1) 2 +(32, 95, -1) 2 +(33, 6, -1) 2 +(33, 7, -1) 3 +(33, 8, -1) 4 +(33, 9, -1) 5 +(33, 10, -1) 6 +(33, 11, -1) 7 +(33, 12, -1) 7 +(33, 13, -1) 8 +(33, 14, -1) 9 +(33, 15, -1) 10 +(33, 16, -1) 11 +(33, 17, -1) 12 +(33, 18, -1) 13 +(33, 19, -1) 14 +(33, 20, -1) 15 +(33, 21, -1) 15 +(33, 22, -1) 16 +(33, 23, -1) 17 +(33, 24, -1) 18 +(33, 25, -1) 19 +(33, 26, -1) 20 +(33, 27, -1) 20 +(33, 28, -1) 21 +(33, 29, -1) 22 +(33, 30, -1) 23 +(33, 31, -1) 23 +(33, 32, -1) 24 +(33, 33, -1) 25 +(33, 34, -1) 26 +(33, 35, -1) 26 +(33, 36, -1) 27 +(33, 37, -1) 27 +(33, 38, -1) 28 +(33, 39, -1) 29 +(33, 40, -1) 29 +(33, 41, -1) 30 +(33, 42, -1) 30 +(33, 43, -1) 30 +(33, 44, -1) 31 +(33, 45, -1) 31 +(33, 46, -1) 31 +(33, 47, -1) 32 +(33, 48, -1) 32 +(33, 49, -1) 32 +(33, 50, -1) 32 +(33, 51, -1) 32 +(33, 52, -1) 32 +(33, 53, -1) 32 +(33, 54, -1) 32 +(33, 55, -1) 31 +(33, 56, -1) 31 +(33, 57, -1) 31 +(33, 58, -1) 30 +(33, 59, -1) 30 +(33, 60, -1) 30 +(33, 61, -1) 29 +(33, 62, -1) 29 +(33, 63, -1) 28 +(33, 64, -1) 27 +(33, 65, -1) 27 +(33, 66, -1) 26 +(33, 67, -1) 26 +(33, 68, -1) 25 +(33, 69, -1) 24 +(33, 70, -1) 23 +(33, 71, -1) 23 +(33, 72, -1) 22 +(33, 73, -1) 21 +(33, 74, -1) 20 +(33, 75, -1) 20 +(33, 76, -1) 19 +(33, 77, -1) 18 +(33, 78, -1) 17 +(33, 79, -1) 16 +(33, 80, -1) 15 +(33, 81, -1) 15 +(33, 82, -1) 14 +(33, 83, -1) 13 +(33, 84, -1) 12 +(33, 85, -1) 11 +(33, 86, -1) 10 +(33, 87, -1) 9 +(33, 88, -1) 8 +(33, 89, -1) 7 +(33, 90, -1) 7 +(33, 91, -1) 6 +(33, 92, -1) 5 +(33, 93, -1) 4 +(33, 94, -1) 3 +(33, 95, -1) 2 +(34, 6, -1) 2 +(34, 7, -1) 3 +(34, 8, -1) 4 +(34, 9, -1) 5 +(34, 10, -1) 6 +(34, 11, -1) 7 +(34, 12, -1) 8 +(34, 13, -1) 9 +(34, 14, -1) 10 +(34, 15, -1) 11 +(34, 16, -1) 11 +(34, 17, -1) 12 +(34, 18, -1) 13 +(34, 19, -1) 14 +(34, 20, -1) 15 +(34, 21, -1) 16 +(34, 22, -1) 17 +(34, 23, -1) 18 +(34, 24, -1) 18 +(34, 25, -1) 19 +(34, 26, -1) 20 +(34, 27, -1) 21 +(34, 28, -1) 22 +(34, 29, -1) 23 +(34, 30, -1) 23 +(34, 31, -1) 24 +(34, 32, -1) 25 +(34, 33, -1) 26 +(34, 34, -1) 26 +(34, 35, -1) 27 +(34, 36, -1) 28 +(34, 37, -1) 28 +(34, 38, -1) 29 +(34, 39, -1) 29 +(34, 40, -1) 30 +(34, 41, -1) 30 +(34, 42, -1) 31 +(34, 43, -1) 31 +(34, 44, -1) 32 +(34, 45, -1) 32 +(34, 46, -1) 32 +(34, 47, -1) 33 +(34, 48, -1) 33 +(34, 49, -1) 33 +(34, 50, -1) 33 +(34, 51, -1) 33 +(34, 52, -1) 33 +(34, 53, -1) 33 +(34, 54, -1) 33 +(34, 55, -1) 32 +(34, 56, -1) 32 +(34, 57, -1) 32 +(34, 58, -1) 31 +(34, 59, -1) 31 +(34, 60, -1) 30 +(34, 61, -1) 30 +(34, 62, -1) 29 +(34, 63, -1) 29 +(34, 64, -1) 28 +(34, 65, -1) 28 +(34, 66, -1) 27 +(34, 67, -1) 26 +(34, 68, -1) 26 +(34, 69, -1) 25 +(34, 70, -1) 24 +(34, 71, -1) 23 +(34, 72, -1) 23 +(34, 73, -1) 22 +(34, 74, -1) 21 +(34, 75, -1) 20 +(34, 76, -1) 19 +(34, 77, -1) 18 +(34, 78, -1) 18 +(34, 79, -1) 17 +(34, 80, -1) 16 +(34, 81, -1) 15 +(34, 82, -1) 14 +(34, 83, -1) 13 +(34, 84, -1) 12 +(34, 85, -1) 11 +(34, 86, -1) 11 +(34, 87, -1) 10 +(34, 88, -1) 9 +(34, 89, -1) 8 +(34, 90, -1) 7 +(34, 91, -1) 6 +(34, 92, -1) 5 +(34, 93, -1) 4 +(34, 94, -1) 3 +(34, 95, -1) 2 +(35, 6, -1) 3 +(35, 7, -1) 4 +(35, 8, -1) 5 +(35, 9, -1) 6 +(35, 10, -1) 6 +(35, 11, -1) 7 +(35, 12, -1) 8 +(35, 13, -1) 9 +(35, 14, -1) 10 +(35, 15, -1) 11 +(35, 16, -1) 12 +(35, 17, -1) 13 +(35, 18, -1) 14 +(35, 19, -1) 15 +(35, 20, -1) 16 +(35, 21, -1) 16 +(35, 22, -1) 17 +(35, 23, -1) 18 +(35, 24, -1) 19 +(35, 25, -1) 20 +(35, 26, -1) 21 +(35, 27, -1) 21 +(35, 28, -1) 22 +(35, 29, -1) 23 +(35, 30, -1) 24 +(35, 31, -1) 25 +(35, 32, -1) 25 +(35, 33, -1) 26 +(35, 34, -1) 27 +(35, 35, -1) 28 +(35, 36, -1) 28 +(35, 37, -1) 29 +(35, 38, -1) 30 +(35, 39, -1) 30 +(35, 40, -1) 31 +(35, 41, -1) 31 +(35, 42, -1) 32 +(35, 43, -1) 32 +(35, 44, -1) 33 +(35, 45, -1) 33 +(35, 46, -1) 33 +(35, 47, -1) 34 +(35, 48, -1) 34 +(35, 49, -1) 34 +(35, 50, -1) 34 +(35, 51, -1) 34 +(35, 52, -1) 34 +(35, 53, -1) 34 +(35, 54, -1) 34 +(35, 55, -1) 33 +(35, 56, -1) 33 +(35, 57, -1) 33 +(35, 58, -1) 32 +(35, 59, -1) 32 +(35, 60, -1) 31 +(35, 61, -1) 31 +(35, 62, -1) 30 +(35, 63, -1) 30 +(35, 64, -1) 29 +(35, 65, -1) 28 +(35, 66, -1) 28 +(35, 67, -1) 27 +(35, 68, -1) 26 +(35, 69, -1) 25 +(35, 70, -1) 25 +(35, 71, -1) 24 +(35, 72, -1) 23 +(35, 73, -1) 22 +(35, 74, -1) 21 +(35, 75, -1) 21 +(35, 76, -1) 20 +(35, 77, -1) 19 +(35, 78, -1) 18 +(35, 79, -1) 17 +(35, 80, -1) 16 +(35, 81, -1) 16 +(35, 82, -1) 15 +(35, 83, -1) 14 +(35, 84, -1) 13 +(35, 85, -1) 12 +(35, 86, -1) 11 +(35, 87, -1) 10 +(35, 88, -1) 9 +(35, 89, -1) 8 +(35, 90, -1) 7 +(35, 91, -1) 6 +(35, 92, -1) 6 +(35, 93, -1) 5 +(35, 94, -1) 4 +(35, 95, -1) 3 +(36, 4, -1) 1 +(36, 5, -1) 2 +(36, 6, -1) 3 +(36, 7, -1) 4 +(36, 8, -1) 5 +(36, 9, -1) 6 +(36, 10, -1) 7 +(36, 11, -1) 8 +(36, 12, -1) 8 +(36, 13, -1) 9 +(36, 14, -1) 10 +(36, 15, -1) 11 +(36, 16, -1) 12 +(36, 17, -1) 13 +(36, 18, -1) 14 +(36, 19, -1) 15 +(36, 20, -1) 16 +(36, 21, -1) 17 +(36, 22, -1) 18 +(36, 23, -1) 19 +(36, 24, -1) 19 +(36, 25, -1) 20 +(36, 26, -1) 21 +(36, 27, -1) 22 +(36, 28, -1) 23 +(36, 29, -1) 24 +(36, 30, -1) 24 +(36, 31, -1) 25 +(36, 32, -1) 26 +(36, 33, -1) 27 +(36, 34, -1) 28 +(36, 35, -1) 28 +(36, 36, -1) 29 +(36, 37, -1) 30 +(36, 38, -1) 30 +(36, 39, -1) 31 +(36, 40, -1) 32 +(36, 41, -1) 32 +(36, 42, -1) 33 +(36, 43, -1) 33 +(36, 44, -1) 34 +(36, 45, -1) 34 +(36, 46, -1) 34 +(36, 47, -1) 35 +(36, 48, -1) 35 +(36, 49, -1) 35 +(36, 50, -1) 35 +(36, 51, -1) 35 +(36, 52, -1) 35 +(36, 53, -1) 35 +(36, 54, -1) 35 +(36, 55, -1) 34 +(36, 56, -1) 34 +(36, 57, -1) 34 +(36, 58, -1) 33 +(36, 59, -1) 33 +(36, 60, -1) 32 +(36, 61, -1) 32 +(36, 62, -1) 31 +(36, 63, -1) 30 +(36, 64, -1) 30 +(36, 65, -1) 29 +(36, 66, -1) 28 +(36, 67, -1) 28 +(36, 68, -1) 27 +(36, 69, -1) 26 +(36, 70, -1) 25 +(36, 71, -1) 24 +(36, 72, -1) 24 +(36, 73, -1) 23 +(36, 74, -1) 22 +(36, 75, -1) 21 +(36, 76, -1) 20 +(36, 77, -1) 19 +(36, 78, -1) 19 +(36, 79, -1) 18 +(36, 80, -1) 17 +(36, 81, -1) 16 +(36, 82, -1) 15 +(36, 83, -1) 14 +(36, 84, -1) 13 +(36, 85, -1) 12 +(36, 86, -1) 11 +(36, 87, -1) 10 +(36, 88, -1) 9 +(36, 89, -1) 8 +(36, 90, -1) 8 +(36, 91, -1) 7 +(36, 92, -1) 6 +(36, 93, -1) 5 +(36, 94, -1) 4 +(36, 95, -1) 3 +(36, 96, -1) 2 +(36, 97, -1) 1 +(37, 4, -1) 1 +(37, 5, -1) 2 +(37, 6, -1) 3 +(37, 7, -1) 4 +(37, 8, -1) 5 +(37, 9, -1) 6 +(37, 10, -1) 7 +(37, 11, -1) 8 +(37, 12, -1) 9 +(37, 13, -1) 10 +(37, 14, -1) 11 +(37, 15, -1) 12 +(37, 16, -1) 13 +(37, 17, -1) 14 +(37, 18, -1) 14 +(37, 19, -1) 15 +(37, 20, -1) 16 +(37, 21, -1) 17 +(37, 22, -1) 18 +(37, 23, -1) 19 +(37, 24, -1) 20 +(37, 25, -1) 21 +(37, 26, -1) 22 +(37, 27, -1) 22 +(37, 28, -1) 23 +(37, 29, -1) 24 +(37, 30, -1) 25 +(37, 31, -1) 26 +(37, 32, -1) 27 +(37, 33, -1) 27 +(37, 34, -1) 28 +(37, 35, -1) 29 +(37, 36, -1) 30 +(37, 37, -1) 30 +(37, 38, -1) 31 +(37, 39, -1) 32 +(37, 40, -1) 32 +(37, 41, -1) 33 +(37, 42, -1) 34 +(37, 43, -1) 34 +(37, 44, -1) 35 +(37, 45, -1) 35 +(37, 46, -1) 35 +(37, 47, -1) 36 +(37, 48, -1) 36 +(37, 49, -1) 36 +(37, 50, -1) 36 +(37, 51, -1) 36 +(37, 52, -1) 36 +(37, 53, -1) 36 +(37, 54, -1) 36 +(37, 55, -1) 35 +(37, 56, -1) 35 +(37, 57, -1) 35 +(37, 58, -1) 34 +(37, 59, -1) 34 +(37, 60, -1) 33 +(37, 61, -1) 32 +(37, 62, -1) 32 +(37, 63, -1) 31 +(37, 64, -1) 30 +(37, 65, -1) 30 +(37, 66, -1) 29 +(37, 67, -1) 28 +(37, 68, -1) 27 +(37, 69, -1) 27 +(37, 70, -1) 26 +(37, 71, -1) 25 +(37, 72, -1) 24 +(37, 73, -1) 23 +(37, 74, -1) 22 +(37, 75, -1) 22 +(37, 76, -1) 21 +(37, 77, -1) 20 +(37, 78, -1) 19 +(37, 79, -1) 18 +(37, 80, -1) 17 +(37, 81, -1) 16 +(37, 82, -1) 15 +(37, 83, -1) 14 +(37, 84, -1) 14 +(37, 85, -1) 13 +(37, 86, -1) 12 +(37, 87, -1) 11 +(37, 88, -1) 10 +(37, 89, -1) 9 +(37, 90, -1) 8 +(37, 91, -1) 7 +(37, 92, -1) 6 +(37, 93, -1) 5 +(37, 94, -1) 4 +(37, 95, -1) 3 +(37, 96, -1) 2 +(37, 97, -1) 1 +(38, 4, -1) 2 +(38, 5, -1) 3 +(38, 6, -1) 3 +(38, 7, -1) 4 +(38, 8, -1) 5 +(38, 9, -1) 6 +(38, 10, -1) 7 +(38, 11, -1) 8 +(38, 12, -1) 9 +(38, 13, -1) 10 +(38, 14, -1) 11 +(38, 15, -1) 12 +(38, 16, -1) 13 +(38, 17, -1) 14 +(38, 18, -1) 15 +(38, 19, -1) 16 +(38, 20, -1) 17 +(38, 21, -1) 18 +(38, 22, -1) 18 +(38, 23, -1) 19 +(38, 24, -1) 20 +(38, 25, -1) 21 +(38, 26, -1) 22 +(38, 27, -1) 23 +(38, 28, -1) 24 +(38, 29, -1) 25 +(38, 30, -1) 26 +(38, 31, -1) 26 +(38, 32, -1) 27 +(38, 33, -1) 28 +(38, 34, -1) 29 +(38, 35, -1) 30 +(38, 36, -1) 30 +(38, 37, -1) 31 +(38, 38, -1) 32 +(38, 39, -1) 33 +(38, 40, -1) 33 +(38, 41, -1) 34 +(38, 42, -1) 34 +(38, 43, -1) 35 +(38, 44, -1) 35 +(38, 45, -1) 36 +(38, 46, -1) 36 +(38, 47, -1) 37 +(38, 48, -1) 37 +(38, 49, -1) 37 +(38, 50, -1) 37 +(38, 51, -1) 37 +(38, 52, -1) 37 +(38, 53, -1) 37 +(38, 54, -1) 37 +(38, 55, -1) 36 +(38, 56, -1) 36 +(38, 57, -1) 35 +(38, 58, -1) 35 +(38, 59, -1) 34 +(38, 60, -1) 34 +(38, 61, -1) 33 +(38, 62, -1) 33 +(38, 63, -1) 32 +(38, 64, -1) 31 +(38, 65, -1) 30 +(38, 66, -1) 30 +(38, 67, -1) 29 +(38, 68, -1) 28 +(38, 69, -1) 27 +(38, 70, -1) 26 +(38, 71, -1) 26 +(38, 72, -1) 25 +(38, 73, -1) 24 +(38, 74, -1) 23 +(38, 75, -1) 22 +(38, 76, -1) 21 +(38, 77, -1) 20 +(38, 78, -1) 19 +(38, 79, -1) 18 +(38, 80, -1) 18 +(38, 81, -1) 17 +(38, 82, -1) 16 +(38, 83, -1) 15 +(38, 84, -1) 14 +(38, 85, -1) 13 +(38, 86, -1) 12 +(38, 87, -1) 11 +(38, 88, -1) 10 +(38, 89, -1) 9 +(38, 90, -1) 8 +(38, 91, -1) 7 +(38, 92, -1) 6 +(38, 93, -1) 5 +(38, 94, -1) 4 +(38, 95, -1) 3 +(38, 96, -1) 3 +(38, 97, -1) 2 +(39, 4, -1) 2 +(39, 5, -1) 3 +(39, 6, -1) 4 +(39, 7, -1) 5 +(39, 8, -1) 6 +(39, 9, -1) 7 +(39, 10, -1) 8 +(39, 11, -1) 9 +(39, 12, -1) 9 +(39, 13, -1) 10 +(39, 14, -1) 11 +(39, 15, -1) 12 +(39, 16, -1) 13 +(39, 17, -1) 14 +(39, 18, -1) 15 +(39, 19, -1) 16 +(39, 20, -1) 17 +(39, 21, -1) 18 +(39, 22, -1) 19 +(39, 23, -1) 20 +(39, 24, -1) 21 +(39, 25, -1) 22 +(39, 26, -1) 23 +(39, 27, -1) 23 +(39, 28, -1) 24 +(39, 29, -1) 25 +(39, 30, -1) 26 +(39, 31, -1) 27 +(39, 32, -1) 28 +(39, 33, -1) 29 +(39, 34, -1) 29 +(39, 35, -1) 30 +(39, 36, -1) 31 +(39, 37, -1) 32 +(39, 38, -1) 33 +(39, 39, -1) 33 +(39, 40, -1) 34 +(39, 41, -1) 35 +(39, 42, -1) 35 +(39, 43, -1) 36 +(39, 44, -1) 36 +(39, 45, -1) 37 +(39, 46, -1) 37 +(39, 47, -1) 37 +(39, 48, -1) 38 +(39, 49, -1) 38 +(39, 50, -1) 38 +(39, 51, -1) 38 +(39, 52, -1) 38 +(39, 53, -1) 38 +(39, 54, -1) 37 +(39, 55, -1) 37 +(39, 56, -1) 37 +(39, 57, -1) 36 +(39, 58, -1) 36 +(39, 59, -1) 35 +(39, 60, -1) 35 +(39, 61, -1) 34 +(39, 62, -1) 33 +(39, 63, -1) 33 +(39, 64, -1) 32 +(39, 65, -1) 31 +(39, 66, -1) 30 +(39, 67, -1) 29 +(39, 68, -1) 29 +(39, 69, -1) 28 +(39, 70, -1) 27 +(39, 71, -1) 26 +(39, 72, -1) 25 +(39, 73, -1) 24 +(39, 74, -1) 23 +(39, 75, -1) 23 +(39, 76, -1) 22 +(39, 77, -1) 21 +(39, 78, -1) 20 +(39, 79, -1) 19 +(39, 80, -1) 18 +(39, 81, -1) 17 +(39, 82, -1) 16 +(39, 83, -1) 15 +(39, 84, -1) 14 +(39, 85, -1) 13 +(39, 86, -1) 12 +(39, 87, -1) 11 +(39, 88, -1) 10 +(39, 89, -1) 9 +(39, 90, -1) 9 +(39, 91, -1) 8 +(39, 92, -1) 7 +(39, 93, -1) 6 +(39, 94, -1) 5 +(39, 95, -1) 4 +(39, 96, -1) 3 +(39, 97, -1) 2 +(40, 4, -1) 2 +(40, 5, -1) 3 +(40, 6, -1) 4 +(40, 7, -1) 5 +(40, 8, -1) 6 +(40, 9, -1) 7 +(40, 10, -1) 8 +(40, 11, -1) 9 +(40, 12, -1) 10 +(40, 13, -1) 11 +(40, 14, -1) 12 +(40, 15, -1) 13 +(40, 16, -1) 14 +(40, 17, -1) 15 +(40, 18, -1) 16 +(40, 19, -1) 16 +(40, 20, -1) 17 +(40, 21, -1) 18 +(40, 22, -1) 19 +(40, 23, -1) 20 +(40, 24, -1) 21 +(40, 25, -1) 22 +(40, 26, -1) 23 +(40, 27, -1) 24 +(40, 28, -1) 25 +(40, 29, -1) 26 +(40, 30, -1) 27 +(40, 31, -1) 27 +(40, 32, -1) 28 +(40, 33, -1) 29 +(40, 34, -1) 30 +(40, 35, -1) 31 +(40, 36, -1) 32 +(40, 37, -1) 32 +(40, 38, -1) 33 +(40, 39, -1) 34 +(40, 40, -1) 35 +(40, 41, -1) 35 +(40, 42, -1) 36 +(40, 43, -1) 37 +(40, 44, -1) 37 +(40, 45, -1) 38 +(40, 56, -1) 38 +(40, 57, -1) 37 +(40, 58, -1) 37 +(40, 59, -1) 36 +(40, 60, -1) 35 +(40, 61, -1) 35 +(40, 62, -1) 34 +(40, 63, -1) 33 +(40, 64, -1) 32 +(40, 65, -1) 32 +(40, 66, -1) 31 +(40, 67, -1) 30 +(40, 68, -1) 29 +(40, 69, -1) 28 +(40, 70, -1) 27 +(40, 71, -1) 27 +(40, 72, -1) 26 +(40, 73, -1) 25 +(40, 74, -1) 24 +(40, 75, -1) 23 +(40, 76, -1) 22 +(40, 77, -1) 21 +(40, 78, -1) 20 +(40, 79, -1) 19 +(40, 80, -1) 18 +(40, 81, -1) 17 +(40, 82, -1) 16 +(40, 83, -1) 16 +(40, 84, -1) 15 +(40, 85, -1) 14 +(40, 86, -1) 13 +(40, 87, -1) 12 +(40, 88, -1) 11 +(40, 89, -1) 10 +(40, 90, -1) 9 +(40, 91, -1) 8 +(40, 92, -1) 7 +(40, 93, -1) 6 +(40, 94, -1) 5 +(40, 95, -1) 4 +(40, 96, -1) 3 +(40, 97, -1) 2 +(41, 1, -1) 0 +(41, 2, -1) 0 +(41, 3, -1) 1 +(41, 4, -1) 2 +(41, 5, -1) 3 +(41, 6, -1) 4 +(41, 7, -1) 5 +(41, 8, -1) 6 +(41, 9, -1) 7 +(41, 10, -1) 8 +(41, 11, -1) 9 +(41, 12, -1) 10 +(41, 13, -1) 11 +(41, 14, -1) 12 +(41, 15, -1) 13 +(41, 16, -1) 14 +(41, 17, -1) 15 +(41, 18, -1) 16 +(41, 19, -1) 17 +(41, 20, -1) 18 +(41, 21, -1) 19 +(41, 22, -1) 20 +(41, 23, -1) 20 +(41, 24, -1) 21 +(41, 25, -1) 22 +(41, 26, -1) 23 +(41, 27, -1) 24 +(41, 28, -1) 25 +(41, 29, -1) 26 +(41, 30, -1) 27 +(41, 31, -1) 28 +(41, 32, -1) 29 +(41, 33, -1) 30 +(41, 34, -1) 30 +(41, 35, -1) 31 +(41, 36, -1) 32 +(41, 37, -1) 33 +(41, 38, -1) 34 +(41, 39, -1) 35 +(41, 40, -1) 35 +(41, 41, -1) 36 +(41, 42, -1) 37 +(41, 43, -1) 37 +(41, 58, -1) 37 +(41, 59, -1) 37 +(41, 60, -1) 36 +(41, 61, -1) 35 +(41, 62, -1) 35 +(41, 63, -1) 34 +(41, 64, -1) 33 +(41, 65, -1) 32 +(41, 66, -1) 31 +(41, 67, -1) 30 +(41, 68, -1) 30 +(41, 69, -1) 29 +(41, 70, -1) 28 +(41, 71, -1) 27 +(41, 72, -1) 26 +(41, 73, -1) 25 +(41, 74, -1) 24 +(41, 75, -1) 23 +(41, 76, -1) 22 +(41, 77, -1) 21 +(41, 78, -1) 20 +(41, 79, -1) 20 +(41, 80, -1) 19 +(41, 81, -1) 18 +(41, 82, -1) 17 +(41, 83, -1) 16 +(41, 84, -1) 15 +(41, 85, -1) 14 +(41, 86, -1) 13 +(41, 87, -1) 12 +(41, 88, -1) 11 +(41, 89, -1) 10 +(41, 90, -1) 9 +(41, 91, -1) 8 +(41, 92, -1) 7 +(41, 93, -1) 6 +(41, 94, -1) 5 +(41, 95, -1) 4 +(41, 96, -1) 3 +(41, 97, -1) 2 +(41, 98, -1) 1 +(41, 99, -1) 0 +(41, 100, -1) 0 +(42, 1, -1) 0 +(42, 2, -1) 0 +(42, 3, -1) 1 +(42, 4, -1) 2 +(42, 5, -1) 3 +(42, 6, -1) 4 +(42, 7, -1) 5 +(42, 8, -1) 6 +(42, 9, -1) 7 +(42, 10, -1) 8 +(42, 11, -1) 9 +(42, 12, -1) 10 +(42, 13, -1) 11 +(42, 14, -1) 12 +(42, 15, -1) 13 +(42, 16, -1) 14 +(42, 17, -1) 15 +(42, 18, -1) 16 +(42, 19, -1) 17 +(42, 20, -1) 18 +(42, 21, -1) 19 +(42, 22, -1) 20 +(42, 23, -1) 21 +(42, 24, -1) 22 +(42, 25, -1) 23 +(42, 26, -1) 24 +(42, 27, -1) 25 +(42, 28, -1) 25 +(42, 29, -1) 26 +(42, 30, -1) 27 +(42, 31, -1) 28 +(42, 32, -1) 29 +(42, 33, -1) 30 +(42, 34, -1) 31 +(42, 35, -1) 32 +(42, 36, -1) 33 +(42, 37, -1) 34 +(42, 38, -1) 34 +(42, 39, -1) 35 +(42, 40, -1) 36 +(42, 41, -1) 37 +(42, 42, -1) 38 +(42, 59, -1) 38 +(42, 60, -1) 37 +(42, 61, -1) 36 +(42, 62, -1) 35 +(42, 63, -1) 34 +(42, 64, -1) 34 +(42, 65, -1) 33 +(42, 66, -1) 32 +(42, 67, -1) 31 +(42, 68, -1) 30 +(42, 69, -1) 29 +(42, 70, -1) 28 +(42, 71, -1) 27 +(42, 72, -1) 26 +(42, 73, -1) 25 +(42, 74, -1) 25 +(42, 75, -1) 24 +(42, 76, -1) 23 +(42, 77, -1) 22 +(42, 78, -1) 21 +(42, 79, -1) 20 +(42, 80, -1) 19 +(42, 81, -1) 18 +(42, 82, -1) 17 +(42, 83, -1) 16 +(42, 84, -1) 15 +(42, 85, -1) 14 +(42, 86, -1) 13 +(42, 87, -1) 12 +(42, 88, -1) 11 +(42, 89, -1) 10 +(42, 90, -1) 9 +(42, 91, -1) 8 +(42, 92, -1) 7 +(42, 93, -1) 6 +(42, 94, -1) 5 +(42, 95, -1) 4 +(42, 96, -1) 3 +(42, 97, -1) 2 +(42, 98, -1) 1 +(42, 99, -1) 0 +(42, 100, -1) 0 +(43, 1, -1) 0 +(43, 2, -1) 1 +(43, 3, -1) 2 +(43, 4, -1) 3 +(43, 5, -1) 4 +(43, 6, -1) 4 +(43, 7, -1) 5 +(43, 8, -1) 6 +(43, 9, -1) 7 +(43, 10, -1) 8 +(43, 11, -1) 9 +(43, 12, -1) 10 +(43, 13, -1) 11 +(43, 14, -1) 12 +(43, 15, -1) 13 +(43, 16, -1) 14 +(43, 17, -1) 15 +(43, 18, -1) 16 +(43, 19, -1) 17 +(43, 20, -1) 18 +(43, 21, -1) 19 +(43, 22, -1) 20 +(43, 23, -1) 21 +(43, 24, -1) 22 +(43, 25, -1) 23 +(43, 26, -1) 24 +(43, 27, -1) 25 +(43, 28, -1) 26 +(43, 29, -1) 27 +(43, 30, -1) 28 +(43, 31, -1) 29 +(43, 32, -1) 30 +(43, 33, -1) 30 +(43, 34, -1) 31 +(43, 35, -1) 32 +(43, 36, -1) 33 +(43, 37, -1) 34 +(43, 38, -1) 35 +(43, 39, -1) 36 +(43, 40, -1) 37 +(43, 41, -1) 37 +(43, 60, -1) 37 +(43, 61, -1) 37 +(43, 62, -1) 36 +(43, 63, -1) 35 +(43, 64, -1) 34 +(43, 65, -1) 33 +(43, 66, -1) 32 +(43, 67, -1) 31 +(43, 68, -1) 30 +(43, 69, -1) 30 +(43, 70, -1) 29 +(43, 71, -1) 28 +(43, 72, -1) 27 +(43, 73, -1) 26 +(43, 74, -1) 25 +(43, 75, -1) 24 +(43, 76, -1) 23 +(43, 77, -1) 22 +(43, 78, -1) 21 +(43, 79, -1) 20 +(43, 80, -1) 19 +(43, 81, -1) 18 +(43, 82, -1) 17 +(43, 83, -1) 16 +(43, 84, -1) 15 +(43, 85, -1) 14 +(43, 86, -1) 13 +(43, 87, -1) 12 +(43, 88, -1) 11 +(43, 89, -1) 10 +(43, 90, -1) 9 +(43, 91, -1) 8 +(43, 92, -1) 7 +(43, 93, -1) 6 +(43, 94, -1) 5 +(43, 95, -1) 4 +(43, 96, -1) 4 +(43, 97, -1) 3 +(43, 98, -1) 2 +(43, 99, -1) 1 +(43, 100, -1) 0 +(44, 1, -1) 0 +(44, 2, -1) 1 +(44, 3, -1) 2 +(44, 4, -1) 3 +(44, 5, -1) 4 +(44, 6, -1) 5 +(44, 7, -1) 6 +(44, 8, -1) 7 +(44, 9, -1) 8 +(44, 10, -1) 9 +(44, 11, -1) 10 +(44, 12, -1) 11 +(44, 13, -1) 12 +(44, 14, -1) 13 +(44, 15, -1) 14 +(44, 16, -1) 14 +(44, 17, -1) 15 +(44, 18, -1) 16 +(44, 19, -1) 17 +(44, 20, -1) 18 +(44, 21, -1) 19 +(44, 22, -1) 20 +(44, 23, -1) 21 +(44, 24, -1) 22 +(44, 25, -1) 23 +(44, 26, -1) 24 +(44, 27, -1) 25 +(44, 28, -1) 26 +(44, 29, -1) 27 +(44, 30, -1) 28 +(44, 31, -1) 29 +(44, 32, -1) 30 +(44, 33, -1) 31 +(44, 34, -1) 32 +(44, 35, -1) 33 +(44, 36, -1) 34 +(44, 37, -1) 35 +(44, 38, -1) 35 +(44, 39, -1) 36 +(44, 40, -1) 37 +(44, 61, -1) 37 +(44, 62, -1) 36 +(44, 63, -1) 35 +(44, 64, -1) 35 +(44, 65, -1) 34 +(44, 66, -1) 33 +(44, 67, -1) 32 +(44, 68, -1) 31 +(44, 69, -1) 30 +(44, 70, -1) 29 +(44, 71, -1) 28 +(44, 72, -1) 27 +(44, 73, -1) 26 +(44, 74, -1) 25 +(44, 75, -1) 24 +(44, 76, -1) 23 +(44, 77, -1) 22 +(44, 78, -1) 21 +(44, 79, -1) 20 +(44, 80, -1) 19 +(44, 81, -1) 18 +(44, 82, -1) 17 +(44, 83, -1) 16 +(44, 84, -1) 15 +(44, 85, -1) 14 +(44, 86, -1) 14 +(44, 87, -1) 13 +(44, 88, -1) 12 +(44, 89, -1) 11 +(44, 90, -1) 10 +(44, 91, -1) 9 +(44, 92, -1) 8 +(44, 93, -1) 7 +(44, 94, -1) 6 +(44, 95, -1) 5 +(44, 96, -1) 4 +(44, 97, -1) 3 +(44, 98, -1) 2 +(44, 99, -1) 1 +(44, 100, -1) 0 +(45, 1, -1) 0 +(45, 2, -1) 1 +(45, 3, -1) 2 +(45, 4, -1) 3 +(45, 5, -1) 4 +(45, 6, -1) 5 +(45, 7, -1) 6 +(45, 8, -1) 7 +(45, 9, -1) 8 +(45, 10, -1) 9 +(45, 11, -1) 10 +(45, 12, -1) 11 +(45, 13, -1) 12 +(45, 14, -1) 13 +(45, 15, -1) 14 +(45, 16, -1) 15 +(45, 17, -1) 16 +(45, 18, -1) 17 +(45, 19, -1) 18 +(45, 20, -1) 19 +(45, 21, -1) 20 +(45, 22, -1) 21 +(45, 23, -1) 22 +(45, 24, -1) 23 +(45, 25, -1) 23 +(45, 26, -1) 24 +(45, 27, -1) 25 +(45, 28, -1) 26 +(45, 29, -1) 27 +(45, 30, -1) 28 +(45, 31, -1) 29 +(45, 32, -1) 30 +(45, 33, -1) 31 +(45, 34, -1) 32 +(45, 35, -1) 33 +(45, 36, -1) 34 +(45, 37, -1) 35 +(45, 38, -1) 36 +(45, 39, -1) 37 +(45, 40, -1) 38 +(45, 61, -1) 38 +(45, 62, -1) 37 +(45, 63, -1) 36 +(45, 64, -1) 35 +(45, 65, -1) 34 +(45, 66, -1) 33 +(45, 67, -1) 32 +(45, 68, -1) 31 +(45, 69, -1) 30 +(45, 70, -1) 29 +(45, 71, -1) 28 +(45, 72, -1) 27 +(45, 73, -1) 26 +(45, 74, -1) 25 +(45, 75, -1) 24 +(45, 76, -1) 23 +(45, 77, -1) 23 +(45, 78, -1) 22 +(45, 79, -1) 21 +(45, 80, -1) 20 +(45, 81, -1) 19 +(45, 82, -1) 18 +(45, 83, -1) 17 +(45, 84, -1) 16 +(45, 85, -1) 15 +(45, 86, -1) 14 +(45, 87, -1) 13 +(45, 88, -1) 12 +(45, 89, -1) 11 +(45, 90, -1) 10 +(45, 91, -1) 9 +(45, 92, -1) 8 +(45, 93, -1) 7 +(45, 94, -1) 6 +(45, 95, -1) 5 +(45, 96, -1) 4 +(45, 97, -1) 3 +(45, 98, -1) 2 +(45, 99, -1) 1 +(45, 100, -1) 0 +(46, 1, -1) 0 +(46, 2, -1) 1 +(46, 3, -1) 2 +(46, 4, -1) 3 +(46, 5, -1) 4 +(46, 6, -1) 5 +(46, 7, -1) 6 +(46, 8, -1) 7 +(46, 9, -1) 8 +(46, 10, -1) 9 +(46, 11, -1) 10 +(46, 12, -1) 11 +(46, 13, -1) 12 +(46, 14, -1) 13 +(46, 15, -1) 14 +(46, 16, -1) 15 +(46, 17, -1) 16 +(46, 18, -1) 17 +(46, 19, -1) 18 +(46, 20, -1) 19 +(46, 21, -1) 20 +(46, 22, -1) 21 +(46, 23, -1) 22 +(46, 24, -1) 23 +(46, 25, -1) 24 +(46, 26, -1) 25 +(46, 27, -1) 26 +(46, 28, -1) 27 +(46, 29, -1) 28 +(46, 30, -1) 29 +(46, 31, -1) 30 +(46, 32, -1) 30 +(46, 33, -1) 31 +(46, 34, -1) 32 +(46, 35, -1) 33 +(46, 36, -1) 34 +(46, 37, -1) 35 +(46, 38, -1) 36 +(46, 39, -1) 37 +(46, 62, -1) 37 +(46, 63, -1) 36 +(46, 64, -1) 35 +(46, 65, -1) 34 +(46, 66, -1) 33 +(46, 67, -1) 32 +(46, 68, -1) 31 +(46, 69, -1) 30 +(46, 70, -1) 30 +(46, 71, -1) 29 +(46, 72, -1) 28 +(46, 73, -1) 27 +(46, 74, -1) 26 +(46, 75, -1) 25 +(46, 76, -1) 24 +(46, 77, -1) 23 +(46, 78, -1) 22 +(46, 79, -1) 21 +(46, 80, -1) 20 +(46, 81, -1) 19 +(46, 82, -1) 18 +(46, 83, -1) 17 +(46, 84, -1) 16 +(46, 85, -1) 15 +(46, 86, -1) 14 +(46, 87, -1) 13 +(46, 88, -1) 12 +(46, 89, -1) 11 +(46, 90, -1) 10 +(46, 91, -1) 9 +(46, 92, -1) 8 +(46, 93, -1) 7 +(46, 94, -1) 6 +(46, 95, -1) 5 +(46, 96, -1) 4 +(46, 97, -1) 3 +(46, 98, -1) 2 +(46, 99, -1) 1 +(46, 100, -1) 0 +(47, 1, -1) 0 +(47, 2, -1) 1 +(47, 3, -1) 2 +(47, 4, -1) 3 +(47, 5, -1) 4 +(47, 6, -1) 5 +(47, 7, -1) 6 +(47, 8, -1) 7 +(47, 9, -1) 8 +(47, 10, -1) 9 +(47, 11, -1) 10 +(47, 12, -1) 11 +(47, 13, -1) 12 +(47, 14, -1) 13 +(47, 15, -1) 14 +(47, 16, -1) 15 +(47, 17, -1) 16 +(47, 18, -1) 17 +(47, 19, -1) 18 +(47, 20, -1) 19 +(47, 21, -1) 20 +(47, 22, -1) 21 +(47, 23, -1) 22 +(47, 24, -1) 23 +(47, 25, -1) 24 +(47, 26, -1) 25 +(47, 27, -1) 26 +(47, 28, -1) 27 +(47, 29, -1) 28 +(47, 30, -1) 29 +(47, 31, -1) 30 +(47, 32, -1) 31 +(47, 33, -1) 32 +(47, 34, -1) 33 +(47, 35, -1) 34 +(47, 36, -1) 35 +(47, 37, -1) 36 +(47, 38, -1) 37 +(47, 39, -1) 38 +(47, 62, -1) 38 +(47, 63, -1) 37 +(47, 64, -1) 36 +(47, 65, -1) 35 +(47, 66, -1) 34 +(47, 67, -1) 33 +(47, 68, -1) 32 +(47, 69, -1) 31 +(47, 70, -1) 30 +(47, 71, -1) 29 +(47, 72, -1) 28 +(47, 73, -1) 27 +(47, 74, -1) 26 +(47, 75, -1) 25 +(47, 76, -1) 24 +(47, 77, -1) 23 +(47, 78, -1) 22 +(47, 79, -1) 21 +(47, 80, -1) 20 +(47, 81, -1) 19 +(47, 82, -1) 18 +(47, 83, -1) 17 +(47, 84, -1) 16 +(47, 85, -1) 15 +(47, 86, -1) 14 +(47, 87, -1) 13 +(47, 88, -1) 12 +(47, 89, -1) 11 +(47, 90, -1) 10 +(47, 91, -1) 9 +(47, 92, -1) 8 +(47, 93, -1) 7 +(47, 94, -1) 6 +(47, 95, -1) 5 +(47, 96, -1) 4 +(47, 97, -1) 3 +(47, 98, -1) 2 +(47, 99, -1) 1 +(47, 100, -1) 0 +(48, 1, -1) 0 +(48, 2, -1) 1 +(48, 3, -1) 2 +(48, 4, -1) 3 +(48, 5, -1) 4 +(48, 6, -1) 5 +(48, 7, -1) 6 +(48, 8, -1) 7 +(48, 9, -1) 8 +(48, 10, -1) 9 +(48, 11, -1) 10 +(48, 12, -1) 11 +(48, 13, -1) 12 +(48, 14, -1) 13 +(48, 15, -1) 14 +(48, 16, -1) 15 +(48, 17, -1) 16 +(48, 18, -1) 17 +(48, 19, -1) 18 +(48, 20, -1) 19 +(48, 21, -1) 20 +(48, 22, -1) 21 +(48, 23, -1) 22 +(48, 24, -1) 23 +(48, 25, -1) 24 +(48, 26, -1) 25 +(48, 27, -1) 26 +(48, 28, -1) 27 +(48, 29, -1) 28 +(48, 30, -1) 29 +(48, 31, -1) 30 +(48, 32, -1) 31 +(48, 33, -1) 32 +(48, 34, -1) 33 +(48, 35, -1) 34 +(48, 36, -1) 35 +(48, 37, -1) 36 +(48, 38, -1) 37 +(48, 39, -1) 38 +(48, 62, -1) 38 +(48, 63, -1) 37 +(48, 64, -1) 36 +(48, 65, -1) 35 +(48, 66, -1) 34 +(48, 67, -1) 33 +(48, 68, -1) 32 +(48, 69, -1) 31 +(48, 70, -1) 30 +(48, 71, -1) 29 +(48, 72, -1) 28 +(48, 73, -1) 27 +(48, 74, -1) 26 +(48, 75, -1) 25 +(48, 76, -1) 24 +(48, 77, -1) 23 +(48, 78, -1) 22 +(48, 79, -1) 21 +(48, 80, -1) 20 +(48, 81, -1) 19 +(48, 82, -1) 18 +(48, 83, -1) 17 +(48, 84, -1) 16 +(48, 85, -1) 15 +(48, 86, -1) 14 +(48, 87, -1) 13 +(48, 88, -1) 12 +(48, 89, -1) 11 +(48, 90, -1) 10 +(48, 91, -1) 9 +(48, 92, -1) 8 +(48, 93, -1) 7 +(48, 94, -1) 6 +(48, 95, -1) 5 +(48, 96, -1) 4 +(48, 97, -1) 3 +(48, 98, -1) 2 +(48, 99, -1) 1 +(48, 100, -1) 0 +(49, 1, -1) 0 +(49, 2, -1) 1 +(49, 3, -1) 2 +(49, 4, -1) 3 +(49, 5, -1) 4 +(49, 6, -1) 5 +(49, 7, -1) 6 +(49, 8, -1) 7 +(49, 9, -1) 8 +(49, 10, -1) 9 +(49, 11, -1) 10 +(49, 12, -1) 11 +(49, 13, -1) 12 +(49, 14, -1) 13 +(49, 15, -1) 14 +(49, 16, -1) 15 +(49, 17, -1) 16 +(49, 18, -1) 17 +(49, 19, -1) 18 +(49, 20, -1) 19 +(49, 21, -1) 20 +(49, 22, -1) 21 +(49, 23, -1) 22 +(49, 24, -1) 23 +(49, 25, -1) 24 +(49, 26, -1) 25 +(49, 27, -1) 26 +(49, 28, -1) 27 +(49, 29, -1) 28 +(49, 30, -1) 29 +(49, 31, -1) 30 +(49, 32, -1) 31 +(49, 33, -1) 32 +(49, 34, -1) 33 +(49, 35, -1) 34 +(49, 36, -1) 35 +(49, 37, -1) 36 +(49, 38, -1) 37 +(49, 39, -1) 38 +(49, 62, -1) 38 +(49, 63, -1) 37 +(49, 64, -1) 36 +(49, 65, -1) 35 +(49, 66, -1) 34 +(49, 67, -1) 33 +(49, 68, -1) 32 +(49, 69, -1) 31 +(49, 70, -1) 30 +(49, 71, -1) 29 +(49, 72, -1) 28 +(49, 73, -1) 27 +(49, 74, -1) 26 +(49, 75, -1) 25 +(49, 76, -1) 24 +(49, 77, -1) 23 +(49, 78, -1) 22 +(49, 79, -1) 21 +(49, 80, -1) 20 +(49, 81, -1) 19 +(49, 82, -1) 18 +(49, 83, -1) 17 +(49, 84, -1) 16 +(49, 85, -1) 15 +(49, 86, -1) 14 +(49, 87, -1) 13 +(49, 88, -1) 12 +(49, 89, -1) 11 +(49, 90, -1) 10 +(49, 91, -1) 9 +(49, 92, -1) 8 +(49, 93, -1) 7 +(49, 94, -1) 6 +(49, 95, -1) 5 +(49, 96, -1) 4 +(49, 97, -1) 3 +(49, 98, -1) 2 +(49, 99, -1) 1 +(49, 100, -1) 0 +(50, 1, -1) 0 +(50, 2, -1) 1 +(50, 3, -1) 2 +(50, 4, -1) 3 +(50, 5, -1) 4 +(50, 6, -1) 5 +(50, 7, -1) 6 +(50, 8, -1) 7 +(50, 9, -1) 8 +(50, 10, -1) 9 +(50, 11, -1) 10 +(50, 12, -1) 11 +(50, 13, -1) 12 +(50, 14, -1) 13 +(50, 15, -1) 14 +(50, 16, -1) 15 +(50, 17, -1) 16 +(50, 18, -1) 17 +(50, 19, -1) 18 +(50, 20, -1) 19 +(50, 21, -1) 20 +(50, 22, -1) 21 +(50, 23, -1) 22 +(50, 24, -1) 23 +(50, 25, -1) 24 +(50, 26, -1) 25 +(50, 27, -1) 26 +(50, 28, -1) 27 +(50, 29, -1) 28 +(50, 30, -1) 29 +(50, 31, -1) 30 +(50, 32, -1) 31 +(50, 33, -1) 32 +(50, 34, -1) 33 +(50, 35, -1) 34 +(50, 36, -1) 35 +(50, 37, -1) 36 +(50, 38, -1) 37 +(50, 39, -1) 38 +(50, 62, -1) 38 +(50, 63, -1) 37 +(50, 64, -1) 36 +(50, 65, -1) 35 +(50, 66, -1) 34 +(50, 67, -1) 33 +(50, 68, -1) 32 +(50, 69, -1) 31 +(50, 70, -1) 30 +(50, 71, -1) 29 +(50, 72, -1) 28 +(50, 73, -1) 27 +(50, 74, -1) 26 +(50, 75, -1) 25 +(50, 76, -1) 24 +(50, 77, -1) 23 +(50, 78, -1) 22 +(50, 79, -1) 21 +(50, 80, -1) 20 +(50, 81, -1) 19 +(50, 82, -1) 18 +(50, 83, -1) 17 +(50, 84, -1) 16 +(50, 85, -1) 15 +(50, 86, -1) 14 +(50, 87, -1) 13 +(50, 88, -1) 12 +(50, 89, -1) 11 +(50, 90, -1) 10 +(50, 91, -1) 9 +(50, 92, -1) 8 +(50, 93, -1) 7 +(50, 94, -1) 6 +(50, 95, -1) 5 +(50, 96, -1) 4 +(50, 97, -1) 3 +(50, 98, -1) 2 +(50, 99, -1) 1 +(50, 100, -1) 0 +(51, 1, -1) 0 +(51, 2, -1) 1 +(51, 3, -1) 2 +(51, 4, -1) 3 +(51, 5, -1) 4 +(51, 6, -1) 5 +(51, 7, -1) 6 +(51, 8, -1) 7 +(51, 9, -1) 8 +(51, 10, -1) 9 +(51, 11, -1) 10 +(51, 12, -1) 11 +(51, 13, -1) 12 +(51, 14, -1) 13 +(51, 15, -1) 14 +(51, 16, -1) 15 +(51, 17, -1) 16 +(51, 18, -1) 17 +(51, 19, -1) 18 +(51, 20, -1) 19 +(51, 21, -1) 20 +(51, 22, -1) 21 +(51, 23, -1) 22 +(51, 24, -1) 23 +(51, 25, -1) 24 +(51, 26, -1) 25 +(51, 27, -1) 26 +(51, 28, -1) 27 +(51, 29, -1) 28 +(51, 30, -1) 29 +(51, 31, -1) 30 +(51, 32, -1) 31 +(51, 33, -1) 32 +(51, 34, -1) 33 +(51, 35, -1) 34 +(51, 36, -1) 35 +(51, 37, -1) 36 +(51, 38, -1) 37 +(51, 39, -1) 38 +(51, 62, -1) 38 +(51, 63, -1) 37 +(51, 64, -1) 36 +(51, 65, -1) 35 +(51, 66, -1) 34 +(51, 67, -1) 33 +(51, 68, -1) 32 +(51, 69, -1) 31 +(51, 70, -1) 30 +(51, 71, -1) 29 +(51, 72, -1) 28 +(51, 73, -1) 27 +(51, 74, -1) 26 +(51, 75, -1) 25 +(51, 76, -1) 24 +(51, 77, -1) 23 +(51, 78, -1) 22 +(51, 79, -1) 21 +(51, 80, -1) 20 +(51, 81, -1) 19 +(51, 82, -1) 18 +(51, 83, -1) 17 +(51, 84, -1) 16 +(51, 85, -1) 15 +(51, 86, -1) 14 +(51, 87, -1) 13 +(51, 88, -1) 12 +(51, 89, -1) 11 +(51, 90, -1) 10 +(51, 91, -1) 9 +(51, 92, -1) 8 +(51, 93, -1) 7 +(51, 94, -1) 6 +(51, 95, -1) 5 +(51, 96, -1) 4 +(51, 97, -1) 3 +(51, 98, -1) 2 +(51, 99, -1) 1 +(51, 100, -1) 0 +(52, 1, -1) 0 +(52, 2, -1) 1 +(52, 3, -1) 2 +(52, 4, -1) 3 +(52, 5, -1) 4 +(52, 6, -1) 5 +(52, 7, -1) 6 +(52, 8, -1) 7 +(52, 9, -1) 8 +(52, 10, -1) 9 +(52, 11, -1) 10 +(52, 12, -1) 11 +(52, 13, -1) 12 +(52, 14, -1) 13 +(52, 15, -1) 14 +(52, 16, -1) 15 +(52, 17, -1) 16 +(52, 18, -1) 17 +(52, 19, -1) 18 +(52, 20, -1) 19 +(52, 21, -1) 20 +(52, 22, -1) 21 +(52, 23, -1) 22 +(52, 24, -1) 23 +(52, 25, -1) 24 +(52, 26, -1) 25 +(52, 27, -1) 26 +(52, 28, -1) 27 +(52, 29, -1) 28 +(52, 30, -1) 29 +(52, 31, -1) 30 +(52, 32, -1) 31 +(52, 33, -1) 32 +(52, 34, -1) 33 +(52, 35, -1) 34 +(52, 36, -1) 35 +(52, 37, -1) 36 +(52, 38, -1) 37 +(52, 39, -1) 38 +(52, 62, -1) 38 +(52, 63, -1) 37 +(52, 64, -1) 36 +(52, 65, -1) 35 +(52, 66, -1) 34 +(52, 67, -1) 33 +(52, 68, -1) 32 +(52, 69, -1) 31 +(52, 70, -1) 30 +(52, 71, -1) 29 +(52, 72, -1) 28 +(52, 73, -1) 27 +(52, 74, -1) 26 +(52, 75, -1) 25 +(52, 76, -1) 24 +(52, 77, -1) 23 +(52, 78, -1) 22 +(52, 79, -1) 21 +(52, 80, -1) 20 +(52, 81, -1) 19 +(52, 82, -1) 18 +(52, 83, -1) 17 +(52, 84, -1) 16 +(52, 85, -1) 15 +(52, 86, -1) 14 +(52, 87, -1) 13 +(52, 88, -1) 12 +(52, 89, -1) 11 +(52, 90, -1) 10 +(52, 91, -1) 9 +(52, 92, -1) 8 +(52, 93, -1) 7 +(52, 94, -1) 6 +(52, 95, -1) 5 +(52, 96, -1) 4 +(52, 97, -1) 3 +(52, 98, -1) 2 +(52, 99, -1) 1 +(52, 100, -1) 0 +(53, 1, -1) 0 +(53, 2, -1) 1 +(53, 3, -1) 2 +(53, 4, -1) 3 +(53, 5, -1) 4 +(53, 6, -1) 5 +(53, 7, -1) 6 +(53, 8, -1) 7 +(53, 9, -1) 8 +(53, 10, -1) 9 +(53, 11, -1) 10 +(53, 12, -1) 11 +(53, 13, -1) 12 +(53, 14, -1) 13 +(53, 15, -1) 14 +(53, 16, -1) 15 +(53, 17, -1) 16 +(53, 18, -1) 17 +(53, 19, -1) 18 +(53, 20, -1) 19 +(53, 21, -1) 20 +(53, 22, -1) 21 +(53, 23, -1) 22 +(53, 24, -1) 23 +(53, 25, -1) 24 +(53, 26, -1) 25 +(53, 27, -1) 26 +(53, 28, -1) 27 +(53, 29, -1) 28 +(53, 30, -1) 29 +(53, 31, -1) 30 +(53, 32, -1) 31 +(53, 33, -1) 32 +(53, 34, -1) 33 +(53, 35, -1) 34 +(53, 36, -1) 35 +(53, 37, -1) 36 +(53, 38, -1) 37 +(53, 39, -1) 38 +(53, 62, -1) 38 +(53, 63, -1) 37 +(53, 64, -1) 36 +(53, 65, -1) 35 +(53, 66, -1) 34 +(53, 67, -1) 33 +(53, 68, -1) 32 +(53, 69, -1) 31 +(53, 70, -1) 30 +(53, 71, -1) 29 +(53, 72, -1) 28 +(53, 73, -1) 27 +(53, 74, -1) 26 +(53, 75, -1) 25 +(53, 76, -1) 24 +(53, 77, -1) 23 +(53, 78, -1) 22 +(53, 79, -1) 21 +(53, 80, -1) 20 +(53, 81, -1) 19 +(53, 82, -1) 18 +(53, 83, -1) 17 +(53, 84, -1) 16 +(53, 85, -1) 15 +(53, 86, -1) 14 +(53, 87, -1) 13 +(53, 88, -1) 12 +(53, 89, -1) 11 +(53, 90, -1) 10 +(53, 91, -1) 9 +(53, 92, -1) 8 +(53, 93, -1) 7 +(53, 94, -1) 6 +(53, 95, -1) 5 +(53, 96, -1) 4 +(53, 97, -1) 3 +(53, 98, -1) 2 +(53, 99, -1) 1 +(53, 100, -1) 0 +(54, 1, -1) 0 +(54, 2, -1) 1 +(54, 3, -1) 2 +(54, 4, -1) 3 +(54, 5, -1) 4 +(54, 6, -1) 5 +(54, 7, -1) 6 +(54, 8, -1) 7 +(54, 9, -1) 8 +(54, 10, -1) 9 +(54, 11, -1) 10 +(54, 12, -1) 11 +(54, 13, -1) 12 +(54, 14, -1) 13 +(54, 15, -1) 14 +(54, 16, -1) 15 +(54, 17, -1) 16 +(54, 18, -1) 17 +(54, 19, -1) 18 +(54, 20, -1) 19 +(54, 21, -1) 20 +(54, 22, -1) 21 +(54, 23, -1) 22 +(54, 24, -1) 23 +(54, 25, -1) 24 +(54, 26, -1) 25 +(54, 27, -1) 26 +(54, 28, -1) 27 +(54, 29, -1) 28 +(54, 30, -1) 29 +(54, 31, -1) 30 +(54, 32, -1) 31 +(54, 33, -1) 32 +(54, 34, -1) 33 +(54, 35, -1) 34 +(54, 36, -1) 35 +(54, 37, -1) 36 +(54, 38, -1) 37 +(54, 39, -1) 38 +(54, 62, -1) 38 +(54, 63, -1) 37 +(54, 64, -1) 36 +(54, 65, -1) 35 +(54, 66, -1) 34 +(54, 67, -1) 33 +(54, 68, -1) 32 +(54, 69, -1) 31 +(54, 70, -1) 30 +(54, 71, -1) 29 +(54, 72, -1) 28 +(54, 73, -1) 27 +(54, 74, -1) 26 +(54, 75, -1) 25 +(54, 76, -1) 24 +(54, 77, -1) 23 +(54, 78, -1) 22 +(54, 79, -1) 21 +(54, 80, -1) 20 +(54, 81, -1) 19 +(54, 82, -1) 18 +(54, 83, -1) 17 +(54, 84, -1) 16 +(54, 85, -1) 15 +(54, 86, -1) 14 +(54, 87, -1) 13 +(54, 88, -1) 12 +(54, 89, -1) 11 +(54, 90, -1) 10 +(54, 91, -1) 9 +(54, 92, -1) 8 +(54, 93, -1) 7 +(54, 94, -1) 6 +(54, 95, -1) 5 +(54, 96, -1) 4 +(54, 97, -1) 3 +(54, 98, -1) 2 +(54, 99, -1) 1 +(54, 100, -1) 0 +(55, 1, -1) 0 +(55, 2, -1) 1 +(55, 3, -1) 2 +(55, 4, -1) 3 +(55, 5, -1) 4 +(55, 6, -1) 5 +(55, 7, -1) 6 +(55, 8, -1) 7 +(55, 9, -1) 8 +(55, 10, -1) 9 +(55, 11, -1) 10 +(55, 12, -1) 11 +(55, 13, -1) 12 +(55, 14, -1) 13 +(55, 15, -1) 14 +(55, 16, -1) 15 +(55, 17, -1) 16 +(55, 18, -1) 17 +(55, 19, -1) 18 +(55, 20, -1) 19 +(55, 21, -1) 20 +(55, 22, -1) 21 +(55, 23, -1) 22 +(55, 24, -1) 23 +(55, 25, -1) 24 +(55, 26, -1) 25 +(55, 27, -1) 26 +(55, 28, -1) 27 +(55, 29, -1) 28 +(55, 30, -1) 29 +(55, 31, -1) 30 +(55, 32, -1) 30 +(55, 33, -1) 31 +(55, 34, -1) 32 +(55, 35, -1) 33 +(55, 36, -1) 34 +(55, 37, -1) 35 +(55, 38, -1) 36 +(55, 39, -1) 37 +(55, 62, -1) 37 +(55, 63, -1) 36 +(55, 64, -1) 35 +(55, 65, -1) 34 +(55, 66, -1) 33 +(55, 67, -1) 32 +(55, 68, -1) 31 +(55, 69, -1) 30 +(55, 70, -1) 30 +(55, 71, -1) 29 +(55, 72, -1) 28 +(55, 73, -1) 27 +(55, 74, -1) 26 +(55, 75, -1) 25 +(55, 76, -1) 24 +(55, 77, -1) 23 +(55, 78, -1) 22 +(55, 79, -1) 21 +(55, 80, -1) 20 +(55, 81, -1) 19 +(55, 82, -1) 18 +(55, 83, -1) 17 +(55, 84, -1) 16 +(55, 85, -1) 15 +(55, 86, -1) 14 +(55, 87, -1) 13 +(55, 88, -1) 12 +(55, 89, -1) 11 +(55, 90, -1) 10 +(55, 91, -1) 9 +(55, 92, -1) 8 +(55, 93, -1) 7 +(55, 94, -1) 6 +(55, 95, -1) 5 +(55, 96, -1) 4 +(55, 97, -1) 3 +(55, 98, -1) 2 +(55, 99, -1) 1 +(55, 100, -1) 0 +(56, 1, -1) 0 +(56, 2, -1) 1 +(56, 3, -1) 2 +(56, 4, -1) 3 +(56, 5, -1) 4 +(56, 6, -1) 5 +(56, 7, -1) 6 +(56, 8, -1) 7 +(56, 9, -1) 8 +(56, 10, -1) 9 +(56, 11, -1) 10 +(56, 12, -1) 11 +(56, 13, -1) 12 +(56, 14, -1) 13 +(56, 15, -1) 14 +(56, 16, -1) 15 +(56, 17, -1) 16 +(56, 18, -1) 17 +(56, 19, -1) 18 +(56, 20, -1) 19 +(56, 21, -1) 20 +(56, 22, -1) 21 +(56, 23, -1) 22 +(56, 24, -1) 23 +(56, 25, -1) 23 +(56, 26, -1) 24 +(56, 27, -1) 25 +(56, 28, -1) 26 +(56, 29, -1) 27 +(56, 30, -1) 28 +(56, 31, -1) 29 +(56, 32, -1) 30 +(56, 33, -1) 31 +(56, 34, -1) 32 +(56, 35, -1) 33 +(56, 36, -1) 34 +(56, 37, -1) 35 +(56, 38, -1) 36 +(56, 39, -1) 37 +(56, 40, -1) 38 +(56, 61, -1) 38 +(56, 62, -1) 37 +(56, 63, -1) 36 +(56, 64, -1) 35 +(56, 65, -1) 34 +(56, 66, -1) 33 +(56, 67, -1) 32 +(56, 68, -1) 31 +(56, 69, -1) 30 +(56, 70, -1) 29 +(56, 71, -1) 28 +(56, 72, -1) 27 +(56, 73, -1) 26 +(56, 74, -1) 25 +(56, 75, -1) 24 +(56, 76, -1) 23 +(56, 77, -1) 23 +(56, 78, -1) 22 +(56, 79, -1) 21 +(56, 80, -1) 20 +(56, 81, -1) 19 +(56, 82, -1) 18 +(56, 83, -1) 17 +(56, 84, -1) 16 +(56, 85, -1) 15 +(56, 86, -1) 14 +(56, 87, -1) 13 +(56, 88, -1) 12 +(56, 89, -1) 11 +(56, 90, -1) 10 +(56, 91, -1) 9 +(56, 92, -1) 8 +(56, 93, -1) 7 +(56, 94, -1) 6 +(56, 95, -1) 5 +(56, 96, -1) 4 +(56, 97, -1) 3 +(56, 98, -1) 2 +(56, 99, -1) 1 +(56, 100, -1) 0 +(57, 1, -1) 0 +(57, 2, -1) 1 +(57, 3, -1) 2 +(57, 4, -1) 3 +(57, 5, -1) 4 +(57, 6, -1) 5 +(57, 7, -1) 6 +(57, 8, -1) 7 +(57, 9, -1) 8 +(57, 10, -1) 9 +(57, 11, -1) 10 +(57, 12, -1) 11 +(57, 13, -1) 12 +(57, 14, -1) 13 +(57, 15, -1) 14 +(57, 16, -1) 14 +(57, 17, -1) 15 +(57, 18, -1) 16 +(57, 19, -1) 17 +(57, 20, -1) 18 +(57, 21, -1) 19 +(57, 22, -1) 20 +(57, 23, -1) 21 +(57, 24, -1) 22 +(57, 25, -1) 23 +(57, 26, -1) 24 +(57, 27, -1) 25 +(57, 28, -1) 26 +(57, 29, -1) 27 +(57, 30, -1) 28 +(57, 31, -1) 29 +(57, 32, -1) 30 +(57, 33, -1) 31 +(57, 34, -1) 32 +(57, 35, -1) 33 +(57, 36, -1) 34 +(57, 37, -1) 35 +(57, 38, -1) 35 +(57, 39, -1) 36 +(57, 40, -1) 37 +(57, 61, -1) 37 +(57, 62, -1) 36 +(57, 63, -1) 35 +(57, 64, -1) 35 +(57, 65, -1) 34 +(57, 66, -1) 33 +(57, 67, -1) 32 +(57, 68, -1) 31 +(57, 69, -1) 30 +(57, 70, -1) 29 +(57, 71, -1) 28 +(57, 72, -1) 27 +(57, 73, -1) 26 +(57, 74, -1) 25 +(57, 75, -1) 24 +(57, 76, -1) 23 +(57, 77, -1) 22 +(57, 78, -1) 21 +(57, 79, -1) 20 +(57, 80, -1) 19 +(57, 81, -1) 18 +(57, 82, -1) 17 +(57, 83, -1) 16 +(57, 84, -1) 15 +(57, 85, -1) 14 +(57, 86, -1) 14 +(57, 87, -1) 13 +(57, 88, -1) 12 +(57, 89, -1) 11 +(57, 90, -1) 10 +(57, 91, -1) 9 +(57, 92, -1) 8 +(57, 93, -1) 7 +(57, 94, -1) 6 +(57, 95, -1) 5 +(57, 96, -1) 4 +(57, 97, -1) 3 +(57, 98, -1) 2 +(57, 99, -1) 1 +(57, 100, -1) 0 +(58, 1, -1) 0 +(58, 2, -1) 1 +(58, 3, -1) 2 +(58, 4, -1) 3 +(58, 5, -1) 4 +(58, 6, -1) 4 +(58, 7, -1) 5 +(58, 8, -1) 6 +(58, 9, -1) 7 +(58, 10, -1) 8 +(58, 11, -1) 9 +(58, 12, -1) 10 +(58, 13, -1) 11 +(58, 14, -1) 12 +(58, 15, -1) 13 +(58, 16, -1) 14 +(58, 17, -1) 15 +(58, 18, -1) 16 +(58, 19, -1) 17 +(58, 20, -1) 18 +(58, 21, -1) 19 +(58, 22, -1) 20 +(58, 23, -1) 21 +(58, 24, -1) 22 +(58, 25, -1) 23 +(58, 26, -1) 24 +(58, 27, -1) 25 +(58, 28, -1) 26 +(58, 29, -1) 27 +(58, 30, -1) 28 +(58, 31, -1) 29 +(58, 32, -1) 30 +(58, 33, -1) 30 +(58, 34, -1) 31 +(58, 35, -1) 32 +(58, 36, -1) 33 +(58, 37, -1) 34 +(58, 38, -1) 35 +(58, 39, -1) 36 +(58, 40, -1) 37 +(58, 41, -1) 37 +(58, 60, -1) 37 +(58, 61, -1) 37 +(58, 62, -1) 36 +(58, 63, -1) 35 +(58, 64, -1) 34 +(58, 65, -1) 33 +(58, 66, -1) 32 +(58, 67, -1) 31 +(58, 68, -1) 30 +(58, 69, -1) 30 +(58, 70, -1) 29 +(58, 71, -1) 28 +(58, 72, -1) 27 +(58, 73, -1) 26 +(58, 74, -1) 25 +(58, 75, -1) 24 +(58, 76, -1) 23 +(58, 77, -1) 22 +(58, 78, -1) 21 +(58, 79, -1) 20 +(58, 80, -1) 19 +(58, 81, -1) 18 +(58, 82, -1) 17 +(58, 83, -1) 16 +(58, 84, -1) 15 +(58, 85, -1) 14 +(58, 86, -1) 13 +(58, 87, -1) 12 +(58, 88, -1) 11 +(58, 89, -1) 10 +(58, 90, -1) 9 +(58, 91, -1) 8 +(58, 92, -1) 7 +(58, 93, -1) 6 +(58, 94, -1) 5 +(58, 95, -1) 4 +(58, 96, -1) 4 +(58, 97, -1) 3 +(58, 98, -1) 2 +(58, 99, -1) 1 +(58, 100, -1) 0 +(59, 1, -1) 0 +(59, 2, -1) 0 +(59, 3, -1) 1 +(59, 4, -1) 2 +(59, 5, -1) 3 +(59, 6, -1) 4 +(59, 7, -1) 5 +(59, 8, -1) 6 +(59, 9, -1) 7 +(59, 10, -1) 8 +(59, 11, -1) 9 +(59, 12, -1) 10 +(59, 13, -1) 11 +(59, 14, -1) 12 +(59, 15, -1) 13 +(59, 16, -1) 14 +(59, 17, -1) 15 +(59, 18, -1) 16 +(59, 19, -1) 17 +(59, 20, -1) 18 +(59, 21, -1) 19 +(59, 22, -1) 20 +(59, 23, -1) 21 +(59, 24, -1) 22 +(59, 25, -1) 23 +(59, 26, -1) 24 +(59, 27, -1) 25 +(59, 28, -1) 25 +(59, 29, -1) 26 +(59, 30, -1) 27 +(59, 31, -1) 28 +(59, 32, -1) 29 +(59, 33, -1) 30 +(59, 34, -1) 31 +(59, 35, -1) 32 +(59, 36, -1) 33 +(59, 37, -1) 34 +(59, 38, -1) 34 +(59, 39, -1) 35 +(59, 40, -1) 36 +(59, 41, -1) 37 +(59, 42, -1) 38 +(59, 59, -1) 38 +(59, 60, -1) 37 +(59, 61, -1) 36 +(59, 62, -1) 35 +(59, 63, -1) 34 +(59, 64, -1) 34 +(59, 65, -1) 33 +(59, 66, -1) 32 +(59, 67, -1) 31 +(59, 68, -1) 30 +(59, 69, -1) 29 +(59, 70, -1) 28 +(59, 71, -1) 27 +(59, 72, -1) 26 +(59, 73, -1) 25 +(59, 74, -1) 25 +(59, 75, -1) 24 +(59, 76, -1) 23 +(59, 77, -1) 22 +(59, 78, -1) 21 +(59, 79, -1) 20 +(59, 80, -1) 19 +(59, 81, -1) 18 +(59, 82, -1) 17 +(59, 83, -1) 16 +(59, 84, -1) 15 +(59, 85, -1) 14 +(59, 86, -1) 13 +(59, 87, -1) 12 +(59, 88, -1) 11 +(59, 89, -1) 10 +(59, 90, -1) 9 +(59, 91, -1) 8 +(59, 92, -1) 7 +(59, 93, -1) 6 +(59, 94, -1) 5 +(59, 95, -1) 4 +(59, 96, -1) 3 +(59, 97, -1) 2 +(59, 98, -1) 1 +(59, 99, -1) 0 +(59, 100, -1) 0 +(60, 1, -1) 0 +(60, 2, -1) 0 +(60, 3, -1) 1 +(60, 4, -1) 2 +(60, 5, -1) 3 +(60, 6, -1) 4 +(60, 7, -1) 5 +(60, 8, -1) 6 +(60, 9, -1) 7 +(60, 10, -1) 8 +(60, 11, -1) 9 +(60, 12, -1) 10 +(60, 13, -1) 11 +(60, 14, -1) 12 +(60, 15, -1) 13 +(60, 16, -1) 14 +(60, 17, -1) 15 +(60, 18, -1) 16 +(60, 19, -1) 17 +(60, 20, -1) 18 +(60, 21, -1) 19 +(60, 22, -1) 20 +(60, 23, -1) 20 +(60, 24, -1) 21 +(60, 25, -1) 22 +(60, 26, -1) 23 +(60, 27, -1) 24 +(60, 28, -1) 25 +(60, 29, -1) 26 +(60, 30, -1) 27 +(60, 31, -1) 28 +(60, 32, -1) 29 +(60, 33, -1) 30 +(60, 34, -1) 30 +(60, 35, -1) 31 +(60, 36, -1) 32 +(60, 37, -1) 33 +(60, 38, -1) 34 +(60, 39, -1) 35 +(60, 40, -1) 35 +(60, 41, -1) 36 +(60, 42, -1) 37 +(60, 43, -1) 37 +(60, 58, -1) 37 +(60, 59, -1) 37 +(60, 60, -1) 36 +(60, 61, -1) 35 +(60, 62, -1) 35 +(60, 63, -1) 34 +(60, 64, -1) 33 +(60, 65, -1) 32 +(60, 66, -1) 31 +(60, 67, -1) 30 +(60, 68, -1) 30 +(60, 69, -1) 29 +(60, 70, -1) 28 +(60, 71, -1) 27 +(60, 72, -1) 26 +(60, 73, -1) 25 +(60, 74, -1) 24 +(60, 75, -1) 23 +(60, 76, -1) 22 +(60, 77, -1) 21 +(60, 78, -1) 20 +(60, 79, -1) 20 +(60, 80, -1) 19 +(60, 81, -1) 18 +(60, 82, -1) 17 +(60, 83, -1) 16 +(60, 84, -1) 15 +(60, 85, -1) 14 +(60, 86, -1) 13 +(60, 87, -1) 12 +(60, 88, -1) 11 +(60, 89, -1) 10 +(60, 90, -1) 9 +(60, 91, -1) 8 +(60, 92, -1) 7 +(60, 93, -1) 6 +(60, 94, -1) 5 +(60, 95, -1) 4 +(60, 96, -1) 3 +(60, 97, -1) 2 +(60, 98, -1) 1 +(60, 99, -1) 0 +(60, 100, -1) 0 +(61, 4, -1) 2 +(61, 5, -1) 3 +(61, 6, -1) 4 +(61, 7, -1) 5 +(61, 8, -1) 6 +(61, 9, -1) 7 +(61, 10, -1) 8 +(61, 11, -1) 9 +(61, 12, -1) 10 +(61, 13, -1) 11 +(61, 14, -1) 12 +(61, 15, -1) 13 +(61, 16, -1) 14 +(61, 17, -1) 15 +(61, 18, -1) 16 +(61, 19, -1) 16 +(61, 20, -1) 17 +(61, 21, -1) 18 +(61, 22, -1) 19 +(61, 23, -1) 20 +(61, 24, -1) 21 +(61, 25, -1) 22 +(61, 26, -1) 23 +(61, 27, -1) 24 +(61, 28, -1) 25 +(61, 29, -1) 26 +(61, 30, -1) 27 +(61, 31, -1) 27 +(61, 32, -1) 28 +(61, 33, -1) 29 +(61, 34, -1) 30 +(61, 35, -1) 31 +(61, 36, -1) 32 +(61, 37, -1) 32 +(61, 38, -1) 33 +(61, 39, -1) 34 +(61, 40, -1) 35 +(61, 41, -1) 35 +(61, 42, -1) 36 +(61, 43, -1) 37 +(61, 44, -1) 37 +(61, 45, -1) 38 +(61, 56, -1) 38 +(61, 57, -1) 37 +(61, 58, -1) 37 +(61, 59, -1) 36 +(61, 60, -1) 35 +(61, 61, -1) 35 +(61, 62, -1) 34 +(61, 63, -1) 33 +(61, 64, -1) 32 +(61, 65, -1) 32 +(61, 66, -1) 31 +(61, 67, -1) 30 +(61, 68, -1) 29 +(61, 69, -1) 28 +(61, 70, -1) 27 +(61, 71, -1) 27 +(61, 72, -1) 26 +(61, 73, -1) 25 +(61, 74, -1) 24 +(61, 75, -1) 23 +(61, 76, -1) 22 +(61, 77, -1) 21 +(61, 78, -1) 20 +(61, 79, -1) 19 +(61, 80, -1) 18 +(61, 81, -1) 17 +(61, 82, -1) 16 +(61, 83, -1) 16 +(61, 84, -1) 15 +(61, 85, -1) 14 +(61, 86, -1) 13 +(61, 87, -1) 12 +(61, 88, -1) 11 +(61, 89, -1) 10 +(61, 90, -1) 9 +(61, 91, -1) 8 +(61, 92, -1) 7 +(61, 93, -1) 6 +(61, 94, -1) 5 +(61, 95, -1) 4 +(61, 96, -1) 3 +(61, 97, -1) 2 +(62, 4, -1) 2 +(62, 5, -1) 3 +(62, 6, -1) 4 +(62, 7, -1) 5 +(62, 8, -1) 6 +(62, 9, -1) 7 +(62, 10, -1) 8 +(62, 11, -1) 9 +(62, 12, -1) 9 +(62, 13, -1) 10 +(62, 14, -1) 11 +(62, 15, -1) 12 +(62, 16, -1) 13 +(62, 17, -1) 14 +(62, 18, -1) 15 +(62, 19, -1) 16 +(62, 20, -1) 17 +(62, 21, -1) 18 +(62, 22, -1) 19 +(62, 23, -1) 20 +(62, 24, -1) 21 +(62, 25, -1) 22 +(62, 26, -1) 23 +(62, 27, -1) 23 +(62, 28, -1) 24 +(62, 29, -1) 25 +(62, 30, -1) 26 +(62, 31, -1) 27 +(62, 32, -1) 28 +(62, 33, -1) 29 +(62, 34, -1) 29 +(62, 35, -1) 30 +(62, 36, -1) 31 +(62, 37, -1) 32 +(62, 38, -1) 33 +(62, 39, -1) 33 +(62, 40, -1) 34 +(62, 41, -1) 35 +(62, 42, -1) 35 +(62, 43, -1) 36 +(62, 44, -1) 36 +(62, 45, -1) 37 +(62, 46, -1) 37 +(62, 47, -1) 37 +(62, 48, -1) 38 +(62, 49, -1) 38 +(62, 50, -1) 38 +(62, 51, -1) 38 +(62, 52, -1) 38 +(62, 53, -1) 38 +(62, 54, -1) 37 +(62, 55, -1) 37 +(62, 56, -1) 37 +(62, 57, -1) 36 +(62, 58, -1) 36 +(62, 59, -1) 35 +(62, 60, -1) 35 +(62, 61, -1) 34 +(62, 62, -1) 33 +(62, 63, -1) 33 +(62, 64, -1) 32 +(62, 65, -1) 31 +(62, 66, -1) 30 +(62, 67, -1) 29 +(62, 68, -1) 29 +(62, 69, -1) 28 +(62, 70, -1) 27 +(62, 71, -1) 26 +(62, 72, -1) 25 +(62, 73, -1) 24 +(62, 74, -1) 23 +(62, 75, -1) 23 +(62, 76, -1) 22 +(62, 77, -1) 21 +(62, 78, -1) 20 +(62, 79, -1) 19 +(62, 80, -1) 18 +(62, 81, -1) 17 +(62, 82, -1) 16 +(62, 83, -1) 15 +(62, 84, -1) 14 +(62, 85, -1) 13 +(62, 86, -1) 12 +(62, 87, -1) 11 +(62, 88, -1) 10 +(62, 89, -1) 9 +(62, 90, -1) 9 +(62, 91, -1) 8 +(62, 92, -1) 7 +(62, 93, -1) 6 +(62, 94, -1) 5 +(62, 95, -1) 4 +(62, 96, -1) 3 +(62, 97, -1) 2 +(63, 4, -1) 2 +(63, 5, -1) 3 +(63, 6, -1) 3 +(63, 7, -1) 4 +(63, 8, -1) 5 +(63, 9, -1) 6 +(63, 10, -1) 7 +(63, 11, -1) 8 +(63, 12, -1) 9 +(63, 13, -1) 10 +(63, 14, -1) 11 +(63, 15, -1) 12 +(63, 16, -1) 13 +(63, 17, -1) 14 +(63, 18, -1) 15 +(63, 19, -1) 16 +(63, 20, -1) 17 +(63, 21, -1) 18 +(63, 22, -1) 18 +(63, 23, -1) 19 +(63, 24, -1) 20 +(63, 25, -1) 21 +(63, 26, -1) 22 +(63, 27, -1) 23 +(63, 28, -1) 24 +(63, 29, -1) 25 +(63, 30, -1) 26 +(63, 31, -1) 26 +(63, 32, -1) 27 +(63, 33, -1) 28 +(63, 34, -1) 29 +(63, 35, -1) 30 +(63, 36, -1) 30 +(63, 37, -1) 31 +(63, 38, -1) 32 +(63, 39, -1) 33 +(63, 40, -1) 33 +(63, 41, -1) 34 +(63, 42, -1) 34 +(63, 43, -1) 35 +(63, 44, -1) 35 +(63, 45, -1) 36 +(63, 46, -1) 36 +(63, 47, -1) 37 +(63, 48, -1) 37 +(63, 49, -1) 37 +(63, 50, -1) 37 +(63, 51, -1) 37 +(63, 52, -1) 37 +(63, 53, -1) 37 +(63, 54, -1) 37 +(63, 55, -1) 36 +(63, 56, -1) 36 +(63, 57, -1) 35 +(63, 58, -1) 35 +(63, 59, -1) 34 +(63, 60, -1) 34 +(63, 61, -1) 33 +(63, 62, -1) 33 +(63, 63, -1) 32 +(63, 64, -1) 31 +(63, 65, -1) 30 +(63, 66, -1) 30 +(63, 67, -1) 29 +(63, 68, -1) 28 +(63, 69, -1) 27 +(63, 70, -1) 26 +(63, 71, -1) 26 +(63, 72, -1) 25 +(63, 73, -1) 24 +(63, 74, -1) 23 +(63, 75, -1) 22 +(63, 76, -1) 21 +(63, 77, -1) 20 +(63, 78, -1) 19 +(63, 79, -1) 18 +(63, 80, -1) 18 +(63, 81, -1) 17 +(63, 82, -1) 16 +(63, 83, -1) 15 +(63, 84, -1) 14 +(63, 85, -1) 13 +(63, 86, -1) 12 +(63, 87, -1) 11 +(63, 88, -1) 10 +(63, 89, -1) 9 +(63, 90, -1) 8 +(63, 91, -1) 7 +(63, 92, -1) 6 +(63, 93, -1) 5 +(63, 94, -1) 4 +(63, 95, -1) 3 +(63, 96, -1) 3 +(63, 97, -1) 2 +(64, 4, -1) 1 +(64, 5, -1) 2 +(64, 6, -1) 3 +(64, 7, -1) 4 +(64, 8, -1) 5 +(64, 9, -1) 6 +(64, 10, -1) 7 +(64, 11, -1) 8 +(64, 12, -1) 9 +(64, 13, -1) 10 +(64, 14, -1) 11 +(64, 15, -1) 12 +(64, 16, -1) 13 +(64, 17, -1) 14 +(64, 18, -1) 14 +(64, 19, -1) 15 +(64, 20, -1) 16 +(64, 21, -1) 17 +(64, 22, -1) 18 +(64, 23, -1) 19 +(64, 24, -1) 20 +(64, 25, -1) 21 +(64, 26, -1) 22 +(64, 27, -1) 22 +(64, 28, -1) 23 +(64, 29, -1) 24 +(64, 30, -1) 25 +(64, 31, -1) 26 +(64, 32, -1) 27 +(64, 33, -1) 27 +(64, 34, -1) 28 +(64, 35, -1) 29 +(64, 36, -1) 30 +(64, 37, -1) 30 +(64, 38, -1) 31 +(64, 39, -1) 32 +(64, 40, -1) 32 +(64, 41, -1) 33 +(64, 42, -1) 34 +(64, 43, -1) 34 +(64, 44, -1) 35 +(64, 45, -1) 35 +(64, 46, -1) 35 +(64, 47, -1) 36 +(64, 48, -1) 36 +(64, 49, -1) 36 +(64, 50, -1) 36 +(64, 51, -1) 36 +(64, 52, -1) 36 +(64, 53, -1) 36 +(64, 54, -1) 36 +(64, 55, -1) 35 +(64, 56, -1) 35 +(64, 57, -1) 35 +(64, 58, -1) 34 +(64, 59, -1) 34 +(64, 60, -1) 33 +(64, 61, -1) 32 +(64, 62, -1) 32 +(64, 63, -1) 31 +(64, 64, -1) 30 +(64, 65, -1) 30 +(64, 66, -1) 29 +(64, 67, -1) 28 +(64, 68, -1) 27 +(64, 69, -1) 27 +(64, 70, -1) 26 +(64, 71, -1) 25 +(64, 72, -1) 24 +(64, 73, -1) 23 +(64, 74, -1) 22 +(64, 75, -1) 22 +(64, 76, -1) 21 +(64, 77, -1) 20 +(64, 78, -1) 19 +(64, 79, -1) 18 +(64, 80, -1) 17 +(64, 81, -1) 16 +(64, 82, -1) 15 +(64, 83, -1) 14 +(64, 84, -1) 14 +(64, 85, -1) 13 +(64, 86, -1) 12 +(64, 87, -1) 11 +(64, 88, -1) 10 +(64, 89, -1) 9 +(64, 90, -1) 8 +(64, 91, -1) 7 +(64, 92, -1) 6 +(64, 93, -1) 5 +(64, 94, -1) 4 +(64, 95, -1) 3 +(64, 96, -1) 2 +(64, 97, -1) 1 +(65, 4, -1) 1 +(65, 5, -1) 2 +(65, 6, -1) 3 +(65, 7, -1) 4 +(65, 8, -1) 5 +(65, 9, -1) 6 +(65, 10, -1) 7 +(65, 11, -1) 8 +(65, 12, -1) 8 +(65, 13, -1) 9 +(65, 14, -1) 10 +(65, 15, -1) 11 +(65, 16, -1) 12 +(65, 17, -1) 13 +(65, 18, -1) 14 +(65, 19, -1) 15 +(65, 20, -1) 16 +(65, 21, -1) 17 +(65, 22, -1) 18 +(65, 23, -1) 19 +(65, 24, -1) 19 +(65, 25, -1) 20 +(65, 26, -1) 21 +(65, 27, -1) 22 +(65, 28, -1) 23 +(65, 29, -1) 24 +(65, 30, -1) 24 +(65, 31, -1) 25 +(65, 32, -1) 26 +(65, 33, -1) 27 +(65, 34, -1) 28 +(65, 35, -1) 28 +(65, 36, -1) 29 +(65, 37, -1) 30 +(65, 38, -1) 30 +(65, 39, -1) 31 +(65, 40, -1) 32 +(65, 41, -1) 32 +(65, 42, -1) 33 +(65, 43, -1) 33 +(65, 44, -1) 34 +(65, 45, -1) 34 +(65, 46, -1) 34 +(65, 47, -1) 35 +(65, 48, -1) 35 +(65, 49, -1) 35 +(65, 50, -1) 35 +(65, 51, -1) 35 +(65, 52, -1) 35 +(65, 53, -1) 35 +(65, 54, -1) 35 +(65, 55, -1) 34 +(65, 56, -1) 34 +(65, 57, -1) 34 +(65, 58, -1) 33 +(65, 59, -1) 33 +(65, 60, -1) 32 +(65, 61, -1) 32 +(65, 62, -1) 31 +(65, 63, -1) 30 +(65, 64, -1) 30 +(65, 65, -1) 29 +(65, 66, -1) 28 +(65, 67, -1) 28 +(65, 68, -1) 27 +(65, 69, -1) 26 +(65, 70, -1) 25 +(65, 71, -1) 24 +(65, 72, -1) 24 +(65, 73, -1) 23 +(65, 74, -1) 22 +(65, 75, -1) 21 +(65, 76, -1) 20 +(65, 77, -1) 19 +(65, 78, -1) 19 +(65, 79, -1) 18 +(65, 80, -1) 17 +(65, 81, -1) 16 +(65, 82, -1) 15 +(65, 83, -1) 14 +(65, 84, -1) 13 +(65, 85, -1) 12 +(65, 86, -1) 11 +(65, 87, -1) 10 +(65, 88, -1) 9 +(65, 89, -1) 8 +(65, 90, -1) 8 +(65, 91, -1) 7 +(65, 92, -1) 6 +(65, 93, -1) 5 +(65, 94, -1) 4 +(65, 95, -1) 3 +(65, 96, -1) 2 +(65, 97, -1) 1 +(66, 6, -1) 3 +(66, 7, -1) 4 +(66, 8, -1) 5 +(66, 9, -1) 6 +(66, 10, -1) 6 +(66, 11, -1) 7 +(66, 12, -1) 8 +(66, 13, -1) 9 +(66, 14, -1) 10 +(66, 15, -1) 11 +(66, 16, -1) 12 +(66, 17, -1) 13 +(66, 18, -1) 14 +(66, 19, -1) 15 +(66, 20, -1) 16 +(66, 21, -1) 16 +(66, 22, -1) 17 +(66, 23, -1) 18 +(66, 24, -1) 19 +(66, 25, -1) 20 +(66, 26, -1) 21 +(66, 27, -1) 21 +(66, 28, -1) 22 +(66, 29, -1) 23 +(66, 30, -1) 24 +(66, 31, -1) 25 +(66, 32, -1) 25 +(66, 33, -1) 26 +(66, 34, -1) 27 +(66, 35, -1) 28 +(66, 36, -1) 28 +(66, 37, -1) 29 +(66, 38, -1) 30 +(66, 39, -1) 30 +(66, 40, -1) 31 +(66, 41, -1) 31 +(66, 42, -1) 32 +(66, 43, -1) 32 +(66, 44, -1) 33 +(66, 45, -1) 33 +(66, 46, -1) 33 +(66, 47, -1) 34 +(66, 48, -1) 34 +(66, 49, -1) 34 +(66, 50, -1) 34 +(66, 51, -1) 34 +(66, 52, -1) 34 +(66, 53, -1) 34 +(66, 54, -1) 34 +(66, 55, -1) 33 +(66, 56, -1) 33 +(66, 57, -1) 33 +(66, 58, -1) 32 +(66, 59, -1) 32 +(66, 60, -1) 31 +(66, 61, -1) 31 +(66, 62, -1) 30 +(66, 63, -1) 30 +(66, 64, -1) 29 +(66, 65, -1) 28 +(66, 66, -1) 28 +(66, 67, -1) 27 +(66, 68, -1) 26 +(66, 69, -1) 25 +(66, 70, -1) 25 +(66, 71, -1) 24 +(66, 72, -1) 23 +(66, 73, -1) 22 +(66, 74, -1) 21 +(66, 75, -1) 21 +(66, 76, -1) 20 +(66, 77, -1) 19 +(66, 78, -1) 18 +(66, 79, -1) 17 +(66, 80, -1) 16 +(66, 81, -1) 16 +(66, 82, -1) 15 +(66, 83, -1) 14 +(66, 84, -1) 13 +(66, 85, -1) 12 +(66, 86, -1) 11 +(66, 87, -1) 10 +(66, 88, -1) 9 +(66, 89, -1) 8 +(66, 90, -1) 7 +(66, 91, -1) 6 +(66, 92, -1) 6 +(66, 93, -1) 5 +(66, 94, -1) 4 +(66, 95, -1) 3 +(67, 6, -1) 2 +(67, 7, -1) 3 +(67, 8, -1) 4 +(67, 9, -1) 5 +(67, 10, -1) 6 +(67, 11, -1) 7 +(67, 12, -1) 8 +(67, 13, -1) 9 +(67, 14, -1) 10 +(67, 15, -1) 11 +(67, 16, -1) 11 +(67, 17, -1) 12 +(67, 18, -1) 13 +(67, 19, -1) 14 +(67, 20, -1) 15 +(67, 21, -1) 16 +(67, 22, -1) 17 +(67, 23, -1) 18 +(67, 24, -1) 18 +(67, 25, -1) 19 +(67, 26, -1) 20 +(67, 27, -1) 21 +(67, 28, -1) 22 +(67, 29, -1) 23 +(67, 30, -1) 23 +(67, 31, -1) 24 +(67, 32, -1) 25 +(67, 33, -1) 26 +(67, 34, -1) 26 +(67, 35, -1) 27 +(67, 36, -1) 28 +(67, 37, -1) 28 +(67, 38, -1) 29 +(67, 39, -1) 29 +(67, 40, -1) 30 +(67, 41, -1) 30 +(67, 42, -1) 31 +(67, 43, -1) 31 +(67, 44, -1) 32 +(67, 45, -1) 32 +(67, 46, -1) 32 +(67, 47, -1) 33 +(67, 48, -1) 33 +(67, 49, -1) 33 +(67, 50, -1) 33 +(67, 51, -1) 33 +(67, 52, -1) 33 +(67, 53, -1) 33 +(67, 54, -1) 33 +(67, 55, -1) 32 +(67, 56, -1) 32 +(67, 57, -1) 32 +(67, 58, -1) 31 +(67, 59, -1) 31 +(67, 60, -1) 30 +(67, 61, -1) 30 +(67, 62, -1) 29 +(67, 63, -1) 29 +(67, 64, -1) 28 +(67, 65, -1) 28 +(67, 66, -1) 27 +(67, 67, -1) 26 +(67, 68, -1) 26 +(67, 69, -1) 25 +(67, 70, -1) 24 +(67, 71, -1) 23 +(67, 72, -1) 23 +(67, 73, -1) 22 +(67, 74, -1) 21 +(67, 75, -1) 20 +(67, 76, -1) 19 +(67, 77, -1) 18 +(67, 78, -1) 18 +(67, 79, -1) 17 +(67, 80, -1) 16 +(67, 81, -1) 15 +(67, 82, -1) 14 +(67, 83, -1) 13 +(67, 84, -1) 12 +(67, 85, -1) 11 +(67, 86, -1) 11 +(67, 87, -1) 10 +(67, 88, -1) 9 +(67, 89, -1) 8 +(67, 90, -1) 7 +(67, 91, -1) 6 +(67, 92, -1) 5 +(67, 93, -1) 4 +(67, 94, -1) 3 +(67, 95, -1) 2 +(68, 6, -1) 2 +(68, 7, -1) 3 +(68, 8, -1) 4 +(68, 9, -1) 5 +(68, 10, -1) 6 +(68, 11, -1) 7 +(68, 12, -1) 7 +(68, 13, -1) 8 +(68, 14, -1) 9 +(68, 15, -1) 10 +(68, 16, -1) 11 +(68, 17, -1) 12 +(68, 18, -1) 13 +(68, 19, -1) 14 +(68, 20, -1) 15 +(68, 21, -1) 15 +(68, 22, -1) 16 +(68, 23, -1) 17 +(68, 24, -1) 18 +(68, 25, -1) 19 +(68, 26, -1) 20 +(68, 27, -1) 20 +(68, 28, -1) 21 +(68, 29, -1) 22 +(68, 30, -1) 23 +(68, 31, -1) 23 +(68, 32, -1) 24 +(68, 33, -1) 25 +(68, 34, -1) 26 +(68, 35, -1) 26 +(68, 36, -1) 27 +(68, 37, -1) 27 +(68, 38, -1) 28 +(68, 39, -1) 29 +(68, 40, -1) 29 +(68, 41, -1) 30 +(68, 42, -1) 30 +(68, 43, -1) 30 +(68, 44, -1) 31 +(68, 45, -1) 31 +(68, 46, -1) 31 +(68, 47, -1) 32 +(68, 48, -1) 32 +(68, 49, -1) 32 +(68, 50, -1) 32 +(68, 51, -1) 32 +(68, 52, -1) 32 +(68, 53, -1) 32 +(68, 54, -1) 32 +(68, 55, -1) 31 +(68, 56, -1) 31 +(68, 57, -1) 31 +(68, 58, -1) 30 +(68, 59, -1) 30 +(68, 60, -1) 30 +(68, 61, -1) 29 +(68, 62, -1) 29 +(68, 63, -1) 28 +(68, 64, -1) 27 +(68, 65, -1) 27 +(68, 66, -1) 26 +(68, 67, -1) 26 +(68, 68, -1) 25 +(68, 69, -1) 24 +(68, 70, -1) 23 +(68, 71, -1) 23 +(68, 72, -1) 22 +(68, 73, -1) 21 +(68, 74, -1) 20 +(68, 75, -1) 20 +(68, 76, -1) 19 +(68, 77, -1) 18 +(68, 78, -1) 17 +(68, 79, -1) 16 +(68, 80, -1) 15 +(68, 81, -1) 15 +(68, 82, -1) 14 +(68, 83, -1) 13 +(68, 84, -1) 12 +(68, 85, -1) 11 +(68, 86, -1) 10 +(68, 87, -1) 9 +(68, 88, -1) 8 +(68, 89, -1) 7 +(68, 90, -1) 7 +(68, 91, -1) 6 +(68, 92, -1) 5 +(68, 93, -1) 4 +(68, 94, -1) 3 +(68, 95, -1) 2 +(69, 6, -1) 2 +(69, 7, -1) 2 +(69, 8, -1) 3 +(69, 9, -1) 4 +(69, 10, -1) 5 +(69, 11, -1) 6 +(69, 12, -1) 7 +(69, 13, -1) 8 +(69, 14, -1) 9 +(69, 15, -1) 10 +(69, 16, -1) 11 +(69, 17, -1) 11 +(69, 18, -1) 12 +(69, 19, -1) 13 +(69, 20, -1) 14 +(69, 21, -1) 15 +(69, 22, -1) 16 +(69, 23, -1) 17 +(69, 24, -1) 17 +(69, 25, -1) 18 +(69, 26, -1) 19 +(69, 27, -1) 20 +(69, 28, -1) 20 +(69, 29, -1) 21 +(69, 30, -1) 22 +(69, 31, -1) 23 +(69, 32, -1) 23 +(69, 33, -1) 24 +(69, 34, -1) 25 +(69, 35, -1) 25 +(69, 36, -1) 26 +(69, 37, -1) 27 +(69, 38, -1) 27 +(69, 39, -1) 28 +(69, 40, -1) 28 +(69, 41, -1) 29 +(69, 42, -1) 29 +(69, 43, -1) 30 +(69, 44, -1) 30 +(69, 45, -1) 30 +(69, 46, -1) 30 +(69, 47, -1) 31 +(69, 48, -1) 31 +(69, 49, -1) 31 +(69, 50, -1) 31 +(69, 51, -1) 31 +(69, 52, -1) 31 +(69, 53, -1) 31 +(69, 54, -1) 31 +(69, 55, -1) 30 +(69, 56, -1) 30 +(69, 57, -1) 30 +(69, 58, -1) 30 +(69, 59, -1) 29 +(69, 60, -1) 29 +(69, 61, -1) 28 +(69, 62, -1) 28 +(69, 63, -1) 27 +(69, 64, -1) 27 +(69, 65, -1) 26 +(69, 66, -1) 25 +(69, 67, -1) 25 +(69, 68, -1) 24 +(69, 69, -1) 23 +(69, 70, -1) 23 +(69, 71, -1) 22 +(69, 72, -1) 21 +(69, 73, -1) 20 +(69, 74, -1) 20 +(69, 75, -1) 19 +(69, 76, -1) 18 +(69, 77, -1) 17 +(69, 78, -1) 17 +(69, 79, -1) 16 +(69, 80, -1) 15 +(69, 81, -1) 14 +(69, 82, -1) 13 +(69, 83, -1) 12 +(69, 84, -1) 11 +(69, 85, -1) 11 +(69, 86, -1) 10 +(69, 87, -1) 9 +(69, 88, -1) 8 +(69, 89, -1) 7 +(69, 90, -1) 6 +(69, 91, -1) 5 +(69, 92, -1) 4 +(69, 93, -1) 3 +(69, 94, -1) 2 +(69, 95, -1) 2 +(70, 6, -1) 1 +(70, 7, -1) 2 +(70, 8, -1) 3 +(70, 9, -1) 4 +(70, 10, -1) 5 +(70, 11, -1) 6 +(70, 12, -1) 7 +(70, 13, -1) 7 +(70, 14, -1) 8 +(70, 15, -1) 9 +(70, 16, -1) 10 +(70, 17, -1) 11 +(70, 18, -1) 12 +(70, 19, -1) 13 +(70, 20, -1) 13 +(70, 21, -1) 14 +(70, 22, -1) 15 +(70, 23, -1) 16 +(70, 24, -1) 17 +(70, 25, -1) 18 +(70, 26, -1) 18 +(70, 27, -1) 19 +(70, 28, -1) 20 +(70, 29, -1) 21 +(70, 30, -1) 21 +(70, 31, -1) 22 +(70, 32, -1) 23 +(70, 33, -1) 23 +(70, 34, -1) 24 +(70, 35, -1) 25 +(70, 36, -1) 25 +(70, 37, -1) 26 +(70, 38, -1) 26 +(70, 39, -1) 27 +(70, 40, -1) 27 +(70, 41, -1) 28 +(70, 42, -1) 28 +(70, 43, -1) 29 +(70, 44, -1) 29 +(70, 45, -1) 29 +(70, 46, -1) 30 +(70, 47, -1) 30 +(70, 48, -1) 30 +(70, 49, -1) 30 +(70, 50, -1) 30 +(70, 51, -1) 30 +(70, 52, -1) 30 +(70, 53, -1) 30 +(70, 54, -1) 30 +(70, 55, -1) 30 +(70, 56, -1) 29 +(70, 57, -1) 29 +(70, 58, -1) 29 +(70, 59, -1) 28 +(70, 60, -1) 28 +(70, 61, -1) 27 +(70, 62, -1) 27 +(70, 63, -1) 26 +(70, 64, -1) 26 +(70, 65, -1) 25 +(70, 66, -1) 25 +(70, 67, -1) 24 +(70, 68, -1) 23 +(70, 69, -1) 23 +(70, 70, -1) 22 +(70, 71, -1) 21 +(70, 72, -1) 21 +(70, 73, -1) 20 +(70, 74, -1) 19 +(70, 75, -1) 18 +(70, 76, -1) 18 +(70, 77, -1) 17 +(70, 78, -1) 16 +(70, 79, -1) 15 +(70, 80, -1) 14 +(70, 81, -1) 13 +(70, 82, -1) 13 +(70, 83, -1) 12 +(70, 84, -1) 11 +(70, 85, -1) 10 +(70, 86, -1) 9 +(70, 87, -1) 8 +(70, 88, -1) 7 +(70, 89, -1) 7 +(70, 90, -1) 6 +(70, 91, -1) 5 +(70, 92, -1) 4 +(70, 93, -1) 3 +(70, 94, -1) 2 +(70, 95, -1) 1 +(71, 6, -1) 1 +(71, 7, -1) 2 +(71, 8, -1) 3 +(71, 9, -1) 4 +(71, 10, -1) 5 +(71, 11, -1) 5 +(71, 12, -1) 6 +(71, 13, -1) 7 +(71, 14, -1) 8 +(71, 15, -1) 9 +(71, 16, -1) 10 +(71, 17, -1) 11 +(71, 18, -1) 11 +(71, 19, -1) 12 +(71, 20, -1) 13 +(71, 21, -1) 14 +(71, 22, -1) 15 +(71, 23, -1) 15 +(71, 24, -1) 16 +(71, 25, -1) 17 +(71, 26, -1) 18 +(71, 27, -1) 19 +(71, 28, -1) 19 +(71, 29, -1) 20 +(71, 30, -1) 21 +(71, 31, -1) 21 +(71, 32, -1) 22 +(71, 33, -1) 23 +(71, 34, -1) 23 +(71, 35, -1) 24 +(71, 36, -1) 24 +(71, 37, -1) 25 +(71, 38, -1) 26 +(71, 39, -1) 26 +(71, 40, -1) 27 +(71, 41, -1) 27 +(71, 42, -1) 27 +(71, 43, -1) 28 +(71, 44, -1) 28 +(71, 45, -1) 28 +(71, 46, -1) 29 +(71, 47, -1) 29 +(71, 48, -1) 29 +(71, 49, -1) 29 +(71, 50, -1) 29 +(71, 51, -1) 29 +(71, 52, -1) 29 +(71, 53, -1) 29 +(71, 54, -1) 29 +(71, 55, -1) 29 +(71, 56, -1) 28 +(71, 57, -1) 28 +(71, 58, -1) 28 +(71, 59, -1) 27 +(71, 60, -1) 27 +(71, 61, -1) 27 +(71, 62, -1) 26 +(71, 63, -1) 26 +(71, 64, -1) 25 +(71, 65, -1) 24 +(71, 66, -1) 24 +(71, 67, -1) 23 +(71, 68, -1) 23 +(71, 69, -1) 22 +(71, 70, -1) 21 +(71, 71, -1) 21 +(71, 72, -1) 20 +(71, 73, -1) 19 +(71, 74, -1) 19 +(71, 75, -1) 18 +(71, 76, -1) 17 +(71, 77, -1) 16 +(71, 78, -1) 15 +(71, 79, -1) 15 +(71, 80, -1) 14 +(71, 81, -1) 13 +(71, 82, -1) 12 +(71, 83, -1) 11 +(71, 84, -1) 11 +(71, 85, -1) 10 +(71, 86, -1) 9 +(71, 87, -1) 8 +(71, 88, -1) 7 +(71, 89, -1) 6 +(71, 90, -1) 5 +(71, 91, -1) 5 +(71, 92, -1) 4 +(71, 93, -1) 3 +(71, 94, -1) 2 +(71, 95, -1) 1 +(72, 6, -1) 1 +(72, 7, -1) 1 +(72, 8, -1) 2 +(72, 9, -1) 3 +(72, 10, -1) 4 +(72, 11, -1) 5 +(72, 12, -1) 6 +(72, 13, -1) 7 +(72, 14, -1) 7 +(72, 15, -1) 8 +(72, 16, -1) 9 +(72, 17, -1) 10 +(72, 18, -1) 11 +(72, 19, -1) 12 +(72, 20, -1) 12 +(72, 21, -1) 13 +(72, 22, -1) 14 +(72, 23, -1) 15 +(72, 24, -1) 16 +(72, 25, -1) 16 +(72, 26, -1) 17 +(72, 27, -1) 18 +(72, 28, -1) 19 +(72, 29, -1) 19 +(72, 30, -1) 20 +(72, 31, -1) 21 +(72, 32, -1) 21 +(72, 33, -1) 22 +(72, 34, -1) 23 +(72, 35, -1) 23 +(72, 36, -1) 24 +(72, 37, -1) 24 +(72, 38, -1) 25 +(72, 39, -1) 25 +(72, 40, -1) 26 +(72, 41, -1) 26 +(72, 42, -1) 26 +(72, 43, -1) 27 +(72, 44, -1) 27 +(72, 45, -1) 27 +(72, 46, -1) 28 +(72, 47, -1) 28 +(72, 48, -1) 28 +(72, 49, -1) 28 +(72, 50, -1) 28 +(72, 51, -1) 28 +(72, 52, -1) 28 +(72, 53, -1) 28 +(72, 54, -1) 28 +(72, 55, -1) 28 +(72, 56, -1) 27 +(72, 57, -1) 27 +(72, 58, -1) 27 +(72, 59, -1) 26 +(72, 60, -1) 26 +(72, 61, -1) 26 +(72, 62, -1) 25 +(72, 63, -1) 25 +(72, 64, -1) 24 +(72, 65, -1) 24 +(72, 66, -1) 23 +(72, 67, -1) 23 +(72, 68, -1) 22 +(72, 69, -1) 21 +(72, 70, -1) 21 +(72, 71, -1) 20 +(72, 72, -1) 19 +(72, 73, -1) 19 +(72, 74, -1) 18 +(72, 75, -1) 17 +(72, 76, -1) 16 +(72, 77, -1) 16 +(72, 78, -1) 15 +(72, 79, -1) 14 +(72, 80, -1) 13 +(72, 81, -1) 12 +(72, 82, -1) 12 +(72, 83, -1) 11 +(72, 84, -1) 10 +(72, 85, -1) 9 +(72, 86, -1) 8 +(72, 87, -1) 7 +(72, 88, -1) 7 +(72, 89, -1) 6 +(72, 90, -1) 5 +(72, 91, -1) 4 +(72, 92, -1) 3 +(72, 93, -1) 2 +(72, 94, -1) 1 +(72, 95, -1) 1 +(73, 6, -1) 0 +(73, 7, -1) 1 +(73, 8, -1) 2 +(73, 9, -1) 3 +(73, 10, -1) 4 +(73, 11, -1) 4 +(73, 12, -1) 5 +(73, 13, -1) 6 +(73, 14, -1) 7 +(73, 15, -1) 8 +(73, 16, -1) 9 +(73, 17, -1) 9 +(73, 18, -1) 10 +(73, 19, -1) 11 +(73, 20, -1) 12 +(73, 21, -1) 13 +(73, 22, -1) 13 +(73, 23, -1) 14 +(73, 24, -1) 15 +(73, 25, -1) 16 +(73, 26, -1) 16 +(73, 27, -1) 17 +(73, 28, -1) 18 +(73, 29, -1) 19 +(73, 30, -1) 19 +(73, 31, -1) 20 +(73, 32, -1) 20 +(73, 33, -1) 21 +(73, 34, -1) 22 +(73, 35, -1) 22 +(73, 36, -1) 23 +(73, 37, -1) 23 +(73, 38, -1) 24 +(73, 39, -1) 24 +(73, 40, -1) 25 +(73, 41, -1) 25 +(73, 42, -1) 25 +(73, 43, -1) 26 +(73, 44, -1) 26 +(73, 45, -1) 26 +(73, 46, -1) 27 +(73, 47, -1) 27 +(73, 48, -1) 27 +(73, 49, -1) 27 +(73, 50, -1) 27 +(73, 51, -1) 27 +(73, 52, -1) 27 +(73, 53, -1) 27 +(73, 54, -1) 27 +(73, 55, -1) 27 +(73, 56, -1) 26 +(73, 57, -1) 26 +(73, 58, -1) 26 +(73, 59, -1) 25 +(73, 60, -1) 25 +(73, 61, -1) 25 +(73, 62, -1) 24 +(73, 63, -1) 24 +(73, 64, -1) 23 +(73, 65, -1) 23 +(73, 66, -1) 22 +(73, 67, -1) 22 +(73, 68, -1) 21 +(73, 69, -1) 20 +(73, 70, -1) 20 +(73, 71, -1) 19 +(73, 72, -1) 19 +(73, 73, -1) 18 +(73, 74, -1) 17 +(73, 75, -1) 16 +(73, 76, -1) 16 +(73, 77, -1) 15 +(73, 78, -1) 14 +(73, 79, -1) 13 +(73, 80, -1) 13 +(73, 81, -1) 12 +(73, 82, -1) 11 +(73, 83, -1) 10 +(73, 84, -1) 9 +(73, 85, -1) 9 +(73, 86, -1) 8 +(73, 87, -1) 7 +(73, 88, -1) 6 +(73, 89, -1) 5 +(73, 90, -1) 4 +(73, 91, -1) 4 +(73, 92, -1) 3 +(73, 93, -1) 2 +(73, 94, -1) 1 +(73, 95, -1) 0 +(74, 6, -1) 0 +(74, 7, -1) 0 +(74, 8, -1) 1 +(74, 9, -1) 2 +(74, 10, -1) 3 +(74, 11, -1) 4 +(74, 12, -1) 5 +(74, 13, -1) 6 +(74, 14, -1) 6 +(74, 15, -1) 7 +(74, 16, -1) 8 +(74, 17, -1) 9 +(74, 18, -1) 10 +(74, 19, -1) 10 +(74, 20, -1) 11 +(74, 21, -1) 12 +(74, 22, -1) 13 +(74, 23, -1) 14 +(74, 24, -1) 14 +(74, 25, -1) 15 +(74, 26, -1) 16 +(74, 27, -1) 16 +(74, 28, -1) 17 +(74, 29, -1) 18 +(74, 30, -1) 18 +(74, 31, -1) 19 +(74, 32, -1) 20 +(74, 33, -1) 20 +(74, 34, -1) 21 +(74, 35, -1) 21 +(74, 36, -1) 22 +(74, 37, -1) 22 +(74, 38, -1) 23 +(74, 39, -1) 23 +(74, 40, -1) 24 +(74, 41, -1) 24 +(74, 42, -1) 25 +(74, 43, -1) 25 +(74, 44, -1) 25 +(74, 45, -1) 25 +(74, 46, -1) 26 +(74, 47, -1) 26 +(74, 48, -1) 26 +(74, 49, -1) 26 +(74, 50, -1) 26 +(74, 51, -1) 26 +(74, 52, -1) 26 +(74, 53, -1) 26 +(74, 54, -1) 26 +(74, 55, -1) 26 +(74, 56, -1) 25 +(74, 57, -1) 25 +(74, 58, -1) 25 +(74, 59, -1) 25 +(74, 60, -1) 24 +(74, 61, -1) 24 +(74, 62, -1) 23 +(74, 63, -1) 23 +(74, 64, -1) 22 +(74, 65, -1) 22 +(74, 66, -1) 21 +(74, 67, -1) 21 +(74, 68, -1) 20 +(74, 69, -1) 20 +(74, 70, -1) 19 +(74, 71, -1) 18 +(74, 72, -1) 18 +(74, 73, -1) 17 +(74, 74, -1) 16 +(74, 75, -1) 16 +(74, 76, -1) 15 +(74, 77, -1) 14 +(74, 78, -1) 14 +(74, 79, -1) 13 +(74, 80, -1) 12 +(74, 81, -1) 11 +(74, 82, -1) 10 +(74, 83, -1) 10 +(74, 84, -1) 9 +(74, 85, -1) 8 +(74, 86, -1) 7 +(74, 87, -1) 6 +(74, 88, -1) 6 +(74, 89, -1) 5 +(74, 90, -1) 4 +(74, 91, -1) 3 +(74, 92, -1) 2 +(74, 93, -1) 1 +(74, 94, -1) 0 +(74, 95, -1) 0 +(75, 6, -1) 0 +(75, 7, -1) 0 +(75, 8, -1) 1 +(75, 9, -1) 2 +(75, 10, -1) 3 +(75, 11, -1) 3 +(75, 12, -1) 4 +(75, 13, -1) 5 +(75, 14, -1) 6 +(75, 15, -1) 7 +(75, 16, -1) 7 +(75, 17, -1) 8 +(75, 18, -1) 9 +(75, 19, -1) 10 +(75, 20, -1) 11 +(75, 21, -1) 11 +(75, 22, -1) 12 +(75, 23, -1) 13 +(75, 24, -1) 14 +(75, 25, -1) 14 +(75, 26, -1) 15 +(75, 27, -1) 16 +(75, 28, -1) 16 +(75, 29, -1) 17 +(75, 30, -1) 18 +(75, 31, -1) 18 +(75, 32, -1) 19 +(75, 33, -1) 19 +(75, 34, -1) 20 +(75, 35, -1) 21 +(75, 36, -1) 21 +(75, 37, -1) 22 +(75, 38, -1) 22 +(75, 39, -1) 22 +(75, 40, -1) 23 +(75, 41, -1) 23 +(75, 42, -1) 24 +(75, 43, -1) 24 +(75, 44, -1) 24 +(75, 45, -1) 24 +(75, 46, -1) 25 +(75, 47, -1) 25 +(75, 48, -1) 25 +(75, 49, -1) 25 +(75, 50, -1) 25 +(75, 51, -1) 25 +(75, 52, -1) 25 +(75, 53, -1) 25 +(75, 54, -1) 25 +(75, 55, -1) 25 +(75, 56, -1) 24 +(75, 57, -1) 24 +(75, 58, -1) 24 +(75, 59, -1) 24 +(75, 60, -1) 23 +(75, 61, -1) 23 +(75, 62, -1) 22 +(75, 63, -1) 22 +(75, 64, -1) 22 +(75, 65, -1) 21 +(75, 66, -1) 21 +(75, 67, -1) 20 +(75, 68, -1) 19 +(75, 69, -1) 19 +(75, 70, -1) 18 +(75, 71, -1) 18 +(75, 72, -1) 17 +(75, 73, -1) 16 +(75, 74, -1) 16 +(75, 75, -1) 15 +(75, 76, -1) 14 +(75, 77, -1) 14 +(75, 78, -1) 13 +(75, 79, -1) 12 +(75, 80, -1) 11 +(75, 81, -1) 11 +(75, 82, -1) 10 +(75, 83, -1) 9 +(75, 84, -1) 8 +(75, 85, -1) 7 +(75, 86, -1) 7 +(75, 87, -1) 6 +(75, 88, -1) 5 +(75, 89, -1) 4 +(75, 90, -1) 3 +(75, 91, -1) 3 +(75, 92, -1) 2 +(75, 93, -1) 1 +(75, 94, -1) 0 +(75, 95, -1) 0 +(76, 9, -1) 1 +(76, 10, -1) 2 +(76, 11, -1) 3 +(76, 12, -1) 4 +(76, 13, -1) 5 +(76, 14, -1) 5 +(76, 15, -1) 6 +(76, 16, -1) 7 +(76, 17, -1) 8 +(76, 18, -1) 9 +(76, 19, -1) 9 +(76, 20, -1) 10 +(76, 21, -1) 11 +(76, 22, -1) 12 +(76, 23, -1) 12 +(76, 24, -1) 13 +(76, 25, -1) 14 +(76, 26, -1) 14 +(76, 27, -1) 15 +(76, 28, -1) 16 +(76, 29, -1) 16 +(76, 30, -1) 17 +(76, 31, -1) 18 +(76, 32, -1) 18 +(76, 33, -1) 19 +(76, 34, -1) 19 +(76, 35, -1) 20 +(76, 36, -1) 20 +(76, 37, -1) 21 +(76, 38, -1) 21 +(76, 39, -1) 22 +(76, 40, -1) 22 +(76, 41, -1) 22 +(76, 42, -1) 23 +(76, 43, -1) 23 +(76, 44, -1) 23 +(76, 45, -1) 23 +(76, 46, -1) 24 +(76, 47, -1) 24 +(76, 48, -1) 24 +(76, 49, -1) 24 +(76, 50, -1) 24 +(76, 51, -1) 24 +(76, 52, -1) 24 +(76, 53, -1) 24 +(76, 54, -1) 24 +(76, 55, -1) 24 +(76, 56, -1) 23 +(76, 57, -1) 23 +(76, 58, -1) 23 +(76, 59, -1) 23 +(76, 60, -1) 22 +(76, 61, -1) 22 +(76, 62, -1) 22 +(76, 63, -1) 21 +(76, 64, -1) 21 +(76, 65, -1) 20 +(76, 66, -1) 20 +(76, 67, -1) 19 +(76, 68, -1) 19 +(76, 69, -1) 18 +(76, 70, -1) 18 +(76, 71, -1) 17 +(76, 72, -1) 16 +(76, 73, -1) 16 +(76, 74, -1) 15 +(76, 75, -1) 14 +(76, 76, -1) 14 +(76, 77, -1) 13 +(76, 78, -1) 12 +(76, 79, -1) 12 +(76, 80, -1) 11 +(76, 81, -1) 10 +(76, 82, -1) 9 +(76, 83, -1) 9 +(76, 84, -1) 8 +(76, 85, -1) 7 +(76, 86, -1) 6 +(76, 87, -1) 5 +(76, 88, -1) 5 +(76, 89, -1) 4 +(76, 90, -1) 3 +(76, 91, -1) 2 +(76, 92, -1) 1 +(77, 9, -1) 1 +(77, 10, -1) 2 +(77, 11, -1) 2 +(77, 12, -1) 3 +(77, 13, -1) 4 +(77, 14, -1) 5 +(77, 15, -1) 6 +(77, 16, -1) 6 +(77, 17, -1) 7 +(77, 18, -1) 8 +(77, 19, -1) 9 +(77, 20, -1) 9 +(77, 21, -1) 10 +(77, 22, -1) 11 +(77, 23, -1) 12 +(77, 24, -1) 12 +(77, 25, -1) 13 +(77, 26, -1) 14 +(77, 27, -1) 14 +(77, 28, -1) 15 +(77, 29, -1) 16 +(77, 30, -1) 16 +(77, 31, -1) 17 +(77, 32, -1) 17 +(77, 33, -1) 18 +(77, 34, -1) 18 +(77, 35, -1) 19 +(77, 36, -1) 19 +(77, 37, -1) 20 +(77, 38, -1) 20 +(77, 39, -1) 21 +(77, 40, -1) 21 +(77, 41, -1) 21 +(77, 42, -1) 22 +(77, 43, -1) 22 +(77, 44, -1) 22 +(77, 45, -1) 22 +(77, 46, -1) 23 +(77, 47, -1) 23 +(77, 48, -1) 23 +(77, 49, -1) 23 +(77, 50, -1) 23 +(77, 51, -1) 23 +(77, 52, -1) 23 +(77, 53, -1) 23 +(77, 54, -1) 23 +(77, 55, -1) 23 +(77, 56, -1) 22 +(77, 57, -1) 22 +(77, 58, -1) 22 +(77, 59, -1) 22 +(77, 60, -1) 21 +(77, 61, -1) 21 +(77, 62, -1) 21 +(77, 63, -1) 20 +(77, 64, -1) 20 +(77, 65, -1) 19 +(77, 66, -1) 19 +(77, 67, -1) 18 +(77, 68, -1) 18 +(77, 69, -1) 17 +(77, 70, -1) 17 +(77, 71, -1) 16 +(77, 72, -1) 16 +(77, 73, -1) 15 +(77, 74, -1) 14 +(77, 75, -1) 14 +(77, 76, -1) 13 +(77, 77, -1) 12 +(77, 78, -1) 12 +(77, 79, -1) 11 +(77, 80, -1) 10 +(77, 81, -1) 9 +(77, 82, -1) 9 +(77, 83, -1) 8 +(77, 84, -1) 7 +(77, 85, -1) 6 +(77, 86, -1) 6 +(77, 87, -1) 5 +(77, 88, -1) 4 +(77, 89, -1) 3 +(77, 90, -1) 2 +(77, 91, -1) 2 +(77, 92, -1) 1 +(78, 9, -1) 0 +(78, 10, -1) 1 +(78, 11, -1) 2 +(78, 12, -1) 3 +(78, 13, -1) 3 +(78, 14, -1) 4 +(78, 15, -1) 5 +(78, 16, -1) 6 +(78, 17, -1) 7 +(78, 18, -1) 7 +(78, 19, -1) 8 +(78, 20, -1) 9 +(78, 21, -1) 9 +(78, 22, -1) 10 +(78, 23, -1) 11 +(78, 24, -1) 12 +(78, 25, -1) 12 +(78, 26, -1) 13 +(78, 27, -1) 14 +(78, 28, -1) 14 +(78, 29, -1) 15 +(78, 30, -1) 15 +(78, 31, -1) 16 +(78, 32, -1) 17 +(78, 33, -1) 17 +(78, 34, -1) 18 +(78, 35, -1) 18 +(78, 36, -1) 19 +(78, 37, -1) 19 +(78, 38, -1) 19 +(78, 39, -1) 20 +(78, 40, -1) 20 +(78, 41, -1) 20 +(78, 42, -1) 21 +(78, 43, -1) 21 +(78, 44, -1) 21 +(78, 45, -1) 21 +(78, 46, -1) 22 +(78, 47, -1) 22 +(78, 48, -1) 22 +(78, 49, -1) 22 +(78, 50, -1) 22 +(78, 51, -1) 22 +(78, 52, -1) 22 +(78, 53, -1) 22 +(78, 54, -1) 22 +(78, 55, -1) 22 +(78, 56, -1) 21 +(78, 57, -1) 21 +(78, 58, -1) 21 +(78, 59, -1) 21 +(78, 60, -1) 20 +(78, 61, -1) 20 +(78, 62, -1) 20 +(78, 63, -1) 19 +(78, 64, -1) 19 +(78, 65, -1) 19 +(78, 66, -1) 18 +(78, 67, -1) 18 +(78, 68, -1) 17 +(78, 69, -1) 17 +(78, 70, -1) 16 +(78, 71, -1) 15 +(78, 72, -1) 15 +(78, 73, -1) 14 +(78, 74, -1) 14 +(78, 75, -1) 13 +(78, 76, -1) 12 +(78, 77, -1) 12 +(78, 78, -1) 11 +(78, 79, -1) 10 +(78, 80, -1) 9 +(78, 81, -1) 9 +(78, 82, -1) 8 +(78, 83, -1) 7 +(78, 84, -1) 7 +(78, 85, -1) 6 +(78, 86, -1) 5 +(78, 87, -1) 4 +(78, 88, -1) 3 +(78, 89, -1) 3 +(78, 90, -1) 2 +(78, 91, -1) 1 +(78, 92, -1) 0 +(79, 9, -1) 0 +(79, 10, -1) 1 +(79, 11, -1) 1 +(79, 12, -1) 2 +(79, 13, -1) 3 +(79, 14, -1) 4 +(79, 15, -1) 4 +(79, 16, -1) 5 +(79, 17, -1) 6 +(79, 18, -1) 7 +(79, 19, -1) 7 +(79, 20, -1) 8 +(79, 21, -1) 9 +(79, 22, -1) 9 +(79, 23, -1) 10 +(79, 24, -1) 11 +(79, 25, -1) 12 +(79, 26, -1) 12 +(79, 27, -1) 13 +(79, 28, -1) 13 +(79, 29, -1) 14 +(79, 30, -1) 15 +(79, 31, -1) 15 +(79, 32, -1) 16 +(79, 33, -1) 16 +(79, 34, -1) 17 +(79, 35, -1) 17 +(79, 36, -1) 18 +(79, 37, -1) 18 +(79, 38, -1) 18 +(79, 39, -1) 19 +(79, 40, -1) 19 +(79, 41, -1) 20 +(79, 42, -1) 20 +(79, 43, -1) 20 +(79, 44, -1) 20 +(79, 45, -1) 20 +(79, 46, -1) 21 +(79, 47, -1) 21 +(79, 48, -1) 21 +(79, 49, -1) 21 +(79, 50, -1) 21 +(79, 51, -1) 21 +(79, 52, -1) 21 +(79, 53, -1) 21 +(79, 54, -1) 21 +(79, 55, -1) 21 +(79, 56, -1) 20 +(79, 57, -1) 20 +(79, 58, -1) 20 +(79, 59, -1) 20 +(79, 60, -1) 20 +(79, 61, -1) 19 +(79, 62, -1) 19 +(79, 63, -1) 18 +(79, 64, -1) 18 +(79, 65, -1) 18 +(79, 66, -1) 17 +(79, 67, -1) 17 +(79, 68, -1) 16 +(79, 69, -1) 16 +(79, 70, -1) 15 +(79, 71, -1) 15 +(79, 72, -1) 14 +(79, 73, -1) 13 +(79, 74, -1) 13 +(79, 75, -1) 12 +(79, 76, -1) 12 +(79, 77, -1) 11 +(79, 78, -1) 10 +(79, 79, -1) 9 +(79, 80, -1) 9 +(79, 81, -1) 8 +(79, 82, -1) 7 +(79, 83, -1) 7 +(79, 84, -1) 6 +(79, 85, -1) 5 +(79, 86, -1) 4 +(79, 87, -1) 4 +(79, 88, -1) 3 +(79, 89, -1) 2 +(79, 90, -1) 1 +(79, 91, -1) 1 +(79, 92, -1) 0 +(80, 9, -1) 0 +(80, 10, -1) 0 +(80, 11, -1) 1 +(80, 12, -1) 1 +(80, 13, -1) 2 +(80, 14, -1) 3 +(80, 15, -1) 4 +(80, 16, -1) 4 +(80, 17, -1) 5 +(80, 18, -1) 6 +(80, 19, -1) 7 +(80, 20, -1) 7 +(80, 21, -1) 8 +(80, 22, -1) 9 +(80, 23, -1) 9 +(80, 24, -1) 10 +(80, 25, -1) 11 +(80, 26, -1) 11 +(80, 27, -1) 12 +(80, 28, -1) 13 +(80, 29, -1) 13 +(80, 30, -1) 14 +(80, 31, -1) 14 +(80, 32, -1) 15 +(80, 33, -1) 15 +(80, 34, -1) 16 +(80, 35, -1) 16 +(80, 36, -1) 17 +(80, 37, -1) 17 +(80, 38, -1) 18 +(80, 39, -1) 18 +(80, 40, -1) 18 +(80, 41, -1) 19 +(80, 42, -1) 19 +(80, 43, -1) 19 +(80, 44, -1) 19 +(80, 45, -1) 20 +(80, 46, -1) 20 +(80, 47, -1) 20 +(80, 48, -1) 20 +(80, 49, -1) 20 +(80, 50, -1) 20 +(80, 51, -1) 20 +(80, 52, -1) 20 +(80, 53, -1) 20 +(80, 54, -1) 20 +(80, 55, -1) 20 +(80, 56, -1) 20 +(80, 57, -1) 19 +(80, 58, -1) 19 +(80, 59, -1) 19 +(80, 60, -1) 19 +(80, 61, -1) 18 +(80, 62, -1) 18 +(80, 63, -1) 18 +(80, 64, -1) 17 +(80, 65, -1) 17 +(80, 66, -1) 16 +(80, 67, -1) 16 +(80, 68, -1) 15 +(80, 69, -1) 15 +(80, 70, -1) 14 +(80, 71, -1) 14 +(80, 72, -1) 13 +(80, 73, -1) 13 +(80, 74, -1) 12 +(80, 75, -1) 11 +(80, 76, -1) 11 +(80, 77, -1) 10 +(80, 78, -1) 9 +(80, 79, -1) 9 +(80, 80, -1) 8 +(80, 81, -1) 7 +(80, 82, -1) 7 +(80, 83, -1) 6 +(80, 84, -1) 5 +(80, 85, -1) 4 +(80, 86, -1) 4 +(80, 87, -1) 3 +(80, 88, -1) 2 +(80, 89, -1) 1 +(80, 90, -1) 1 +(80, 91, -1) 0 +(80, 92, -1) 0 +(81, 14, -1) 3 +(81, 15, -1) 3 +(81, 16, -1) 4 +(81, 17, -1) 5 +(81, 18, -1) 5 +(81, 19, -1) 6 +(81, 20, -1) 7 +(81, 21, -1) 7 +(81, 22, -1) 8 +(81, 23, -1) 9 +(81, 24, -1) 9 +(81, 25, -1) 10 +(81, 26, -1) 11 +(81, 27, -1) 11 +(81, 28, -1) 12 +(81, 29, -1) 12 +(81, 30, -1) 13 +(81, 31, -1) 14 +(81, 32, -1) 14 +(81, 33, -1) 15 +(81, 34, -1) 15 +(81, 35, -1) 15 +(81, 36, -1) 16 +(81, 37, -1) 16 +(81, 38, -1) 17 +(81, 39, -1) 17 +(81, 40, -1) 17 +(81, 41, -1) 18 +(81, 42, -1) 18 +(81, 43, -1) 18 +(81, 44, -1) 18 +(81, 45, -1) 19 +(81, 46, -1) 19 +(81, 47, -1) 19 +(81, 48, -1) 19 +(81, 49, -1) 19 +(81, 50, -1) 19 +(81, 51, -1) 19 +(81, 52, -1) 19 +(81, 53, -1) 19 +(81, 54, -1) 19 +(81, 55, -1) 19 +(81, 56, -1) 19 +(81, 57, -1) 18 +(81, 58, -1) 18 +(81, 59, -1) 18 +(81, 60, -1) 18 +(81, 61, -1) 17 +(81, 62, -1) 17 +(81, 63, -1) 17 +(81, 64, -1) 16 +(81, 65, -1) 16 +(81, 66, -1) 15 +(81, 67, -1) 15 +(81, 68, -1) 15 +(81, 69, -1) 14 +(81, 70, -1) 14 +(81, 71, -1) 13 +(81, 72, -1) 12 +(81, 73, -1) 12 +(81, 74, -1) 11 +(81, 75, -1) 11 +(81, 76, -1) 10 +(81, 77, -1) 9 +(81, 78, -1) 9 +(81, 79, -1) 8 +(81, 80, -1) 7 +(81, 81, -1) 7 +(81, 82, -1) 6 +(81, 83, -1) 5 +(81, 84, -1) 5 +(81, 85, -1) 4 +(81, 86, -1) 3 +(81, 87, -1) 3 +(82, 14, -1) 2 +(82, 15, -1) 3 +(82, 16, -1) 3 +(82, 17, -1) 4 +(82, 18, -1) 5 +(82, 19, -1) 5 +(82, 20, -1) 6 +(82, 21, -1) 7 +(82, 22, -1) 7 +(82, 23, -1) 8 +(82, 24, -1) 9 +(82, 25, -1) 9 +(82, 26, -1) 10 +(82, 27, -1) 10 +(82, 28, -1) 11 +(82, 29, -1) 12 +(82, 30, -1) 12 +(82, 31, -1) 13 +(82, 32, -1) 13 +(82, 33, -1) 14 +(82, 34, -1) 14 +(82, 35, -1) 15 +(82, 36, -1) 15 +(82, 37, -1) 15 +(82, 38, -1) 16 +(82, 39, -1) 16 +(82, 40, -1) 16 +(82, 41, -1) 17 +(82, 42, -1) 17 +(82, 43, -1) 17 +(82, 44, -1) 17 +(82, 45, -1) 18 +(82, 46, -1) 18 +(82, 47, -1) 18 +(82, 48, -1) 18 +(82, 49, -1) 18 +(82, 50, -1) 18 +(82, 51, -1) 18 +(82, 52, -1) 18 +(82, 53, -1) 18 +(82, 54, -1) 18 +(82, 55, -1) 18 +(82, 56, -1) 18 +(82, 57, -1) 17 +(82, 58, -1) 17 +(82, 59, -1) 17 +(82, 60, -1) 17 +(82, 61, -1) 16 +(82, 62, -1) 16 +(82, 63, -1) 16 +(82, 64, -1) 15 +(82, 65, -1) 15 +(82, 66, -1) 15 +(82, 67, -1) 14 +(82, 68, -1) 14 +(82, 69, -1) 13 +(82, 70, -1) 13 +(82, 71, -1) 12 +(82, 72, -1) 12 +(82, 73, -1) 11 +(82, 74, -1) 10 +(82, 75, -1) 10 +(82, 76, -1) 9 +(82, 77, -1) 9 +(82, 78, -1) 8 +(82, 79, -1) 7 +(82, 80, -1) 7 +(82, 81, -1) 6 +(82, 82, -1) 5 +(82, 83, -1) 5 +(82, 84, -1) 4 +(82, 85, -1) 3 +(82, 86, -1) 3 +(82, 87, -1) 2 +(83, 14, -1) 1 +(83, 15, -1) 2 +(83, 16, -1) 3 +(83, 17, -1) 3 +(83, 18, -1) 4 +(83, 19, -1) 5 +(83, 20, -1) 5 +(83, 21, -1) 6 +(83, 22, -1) 7 +(83, 23, -1) 7 +(83, 24, -1) 8 +(83, 25, -1) 8 +(83, 26, -1) 9 +(83, 27, -1) 10 +(83, 28, -1) 10 +(83, 29, -1) 11 +(83, 30, -1) 11 +(83, 31, -1) 12 +(83, 32, -1) 12 +(83, 33, -1) 13 +(83, 34, -1) 13 +(83, 35, -1) 14 +(83, 36, -1) 14 +(83, 37, -1) 14 +(83, 38, -1) 15 +(83, 39, -1) 15 +(83, 40, -1) 15 +(83, 41, -1) 16 +(83, 42, -1) 16 +(83, 43, -1) 16 +(83, 44, -1) 16 +(83, 45, -1) 17 +(83, 46, -1) 17 +(83, 47, -1) 17 +(83, 48, -1) 17 +(83, 49, -1) 17 +(83, 50, -1) 17 +(83, 51, -1) 17 +(83, 52, -1) 17 +(83, 53, -1) 17 +(83, 54, -1) 17 +(83, 55, -1) 17 +(83, 56, -1) 17 +(83, 57, -1) 16 +(83, 58, -1) 16 +(83, 59, -1) 16 +(83, 60, -1) 16 +(83, 61, -1) 15 +(83, 62, -1) 15 +(83, 63, -1) 15 +(83, 64, -1) 14 +(83, 65, -1) 14 +(83, 66, -1) 14 +(83, 67, -1) 13 +(83, 68, -1) 13 +(83, 69, -1) 12 +(83, 70, -1) 12 +(83, 71, -1) 11 +(83, 72, -1) 11 +(83, 73, -1) 10 +(83, 74, -1) 10 +(83, 75, -1) 9 +(83, 76, -1) 8 +(83, 77, -1) 8 +(83, 78, -1) 7 +(83, 79, -1) 7 +(83, 80, -1) 6 +(83, 81, -1) 5 +(83, 82, -1) 5 +(83, 83, -1) 4 +(83, 84, -1) 3 +(83, 85, -1) 3 +(83, 86, -1) 2 +(83, 87, -1) 1 +(84, 14, -1) 1 +(84, 15, -1) 1 +(84, 16, -1) 2 +(84, 17, -1) 3 +(84, 18, -1) 3 +(84, 19, -1) 4 +(84, 20, -1) 5 +(84, 21, -1) 5 +(84, 22, -1) 6 +(84, 23, -1) 6 +(84, 24, -1) 7 +(84, 25, -1) 8 +(84, 26, -1) 8 +(84, 27, -1) 9 +(84, 28, -1) 9 +(84, 29, -1) 10 +(84, 30, -1) 10 +(84, 31, -1) 11 +(84, 32, -1) 11 +(84, 33, -1) 12 +(84, 34, -1) 12 +(84, 35, -1) 13 +(84, 36, -1) 13 +(84, 37, -1) 13 +(84, 38, -1) 14 +(84, 39, -1) 14 +(84, 40, -1) 14 +(84, 41, -1) 15 +(84, 42, -1) 15 +(84, 43, -1) 15 +(84, 44, -1) 15 +(84, 45, -1) 16 +(84, 46, -1) 16 +(84, 47, -1) 16 +(84, 48, -1) 16 +(84, 49, -1) 16 +(84, 50, -1) 16 +(84, 51, -1) 16 +(84, 52, -1) 16 +(84, 53, -1) 16 +(84, 54, -1) 16 +(84, 55, -1) 16 +(84, 56, -1) 16 +(84, 57, -1) 15 +(84, 58, -1) 15 +(84, 59, -1) 15 +(84, 60, -1) 15 +(84, 61, -1) 14 +(84, 62, -1) 14 +(84, 63, -1) 14 +(84, 64, -1) 13 +(84, 65, -1) 13 +(84, 66, -1) 13 +(84, 67, -1) 12 +(84, 68, -1) 12 +(84, 69, -1) 11 +(84, 70, -1) 11 +(84, 71, -1) 10 +(84, 72, -1) 10 +(84, 73, -1) 9 +(84, 74, -1) 9 +(84, 75, -1) 8 +(84, 76, -1) 8 +(84, 77, -1) 7 +(84, 78, -1) 6 +(84, 79, -1) 6 +(84, 80, -1) 5 +(84, 81, -1) 5 +(84, 82, -1) 4 +(84, 83, -1) 3 +(84, 84, -1) 3 +(84, 85, -1) 2 +(84, 86, -1) 1 +(84, 87, -1) 1 +(85, 14, -1) 0 +(85, 15, -1) 1 +(85, 16, -1) 1 +(85, 17, -1) 2 +(85, 18, -1) 2 +(85, 19, -1) 3 +(85, 20, -1) 4 +(85, 21, -1) 4 +(85, 22, -1) 5 +(85, 23, -1) 6 +(85, 24, -1) 6 +(85, 25, -1) 7 +(85, 26, -1) 7 +(85, 27, -1) 8 +(85, 28, -1) 9 +(85, 29, -1) 9 +(85, 30, -1) 10 +(85, 31, -1) 10 +(85, 32, -1) 11 +(85, 33, -1) 11 +(85, 34, -1) 11 +(85, 35, -1) 12 +(85, 36, -1) 12 +(85, 37, -1) 13 +(85, 38, -1) 13 +(85, 39, -1) 13 +(85, 40, -1) 13 +(85, 41, -1) 14 +(85, 42, -1) 14 +(85, 43, -1) 14 +(85, 44, -1) 14 +(85, 45, -1) 15 +(85, 46, -1) 15 +(85, 47, -1) 15 +(85, 48, -1) 15 +(85, 49, -1) 15 +(85, 50, -1) 15 +(85, 51, -1) 15 +(85, 52, -1) 15 +(85, 53, -1) 15 +(85, 54, -1) 15 +(85, 55, -1) 15 +(85, 56, -1) 15 +(85, 57, -1) 14 +(85, 58, -1) 14 +(85, 59, -1) 14 +(85, 60, -1) 14 +(85, 61, -1) 13 +(85, 62, -1) 13 +(85, 63, -1) 13 +(85, 64, -1) 13 +(85, 65, -1) 12 +(85, 66, -1) 12 +(85, 67, -1) 11 +(85, 68, -1) 11 +(85, 69, -1) 11 +(85, 70, -1) 10 +(85, 71, -1) 10 +(85, 72, -1) 9 +(85, 73, -1) 9 +(85, 74, -1) 8 +(85, 75, -1) 7 +(85, 76, -1) 7 +(85, 77, -1) 6 +(85, 78, -1) 6 +(85, 79, -1) 5 +(85, 80, -1) 4 +(85, 81, -1) 4 +(85, 82, -1) 3 +(85, 83, -1) 2 +(85, 84, -1) 2 +(85, 85, -1) 1 +(85, 86, -1) 1 +(85, 87, -1) 0 +(86, 16, -1) 1 +(86, 17, -1) 1 +(86, 18, -1) 2 +(86, 19, -1) 3 +(86, 20, -1) 3 +(86, 21, -1) 4 +(86, 22, -1) 4 +(86, 23, -1) 5 +(86, 24, -1) 6 +(86, 25, -1) 6 +(86, 26, -1) 7 +(86, 27, -1) 7 +(86, 28, -1) 8 +(86, 29, -1) 8 +(86, 30, -1) 9 +(86, 31, -1) 9 +(86, 32, -1) 10 +(86, 33, -1) 10 +(86, 34, -1) 11 +(86, 35, -1) 11 +(86, 36, -1) 11 +(86, 37, -1) 12 +(86, 38, -1) 12 +(86, 39, -1) 12 +(86, 40, -1) 13 +(86, 41, -1) 13 +(86, 42, -1) 13 +(86, 43, -1) 13 +(86, 44, -1) 13 +(86, 45, -1) 14 +(86, 46, -1) 14 +(86, 47, -1) 14 +(86, 48, -1) 14 +(86, 49, -1) 14 +(86, 50, -1) 14 +(86, 51, -1) 14 +(86, 52, -1) 14 +(86, 53, -1) 14 +(86, 54, -1) 14 +(86, 55, -1) 14 +(86, 56, -1) 14 +(86, 57, -1) 13 +(86, 58, -1) 13 +(86, 59, -1) 13 +(86, 60, -1) 13 +(86, 61, -1) 13 +(86, 62, -1) 12 +(86, 63, -1) 12 +(86, 64, -1) 12 +(86, 65, -1) 11 +(86, 66, -1) 11 +(86, 67, -1) 11 +(86, 68, -1) 10 +(86, 69, -1) 10 +(86, 70, -1) 9 +(86, 71, -1) 9 +(86, 72, -1) 8 +(86, 73, -1) 8 +(86, 74, -1) 7 +(86, 75, -1) 7 +(86, 76, -1) 6 +(86, 77, -1) 6 +(86, 78, -1) 5 +(86, 79, -1) 4 +(86, 80, -1) 4 +(86, 81, -1) 3 +(86, 82, -1) 3 +(86, 83, -1) 2 +(86, 84, -1) 1 +(86, 85, -1) 1 +(87, 16, -1) 0 +(87, 17, -1) 1 +(87, 18, -1) 1 +(87, 19, -1) 2 +(87, 20, -1) 2 +(87, 21, -1) 3 +(87, 22, -1) 4 +(87, 23, -1) 4 +(87, 24, -1) 5 +(87, 25, -1) 5 +(87, 26, -1) 6 +(87, 27, -1) 6 +(87, 28, -1) 7 +(87, 29, -1) 7 +(87, 30, -1) 8 +(87, 31, -1) 8 +(87, 32, -1) 9 +(87, 33, -1) 9 +(87, 34, -1) 10 +(87, 35, -1) 10 +(87, 36, -1) 10 +(87, 37, -1) 11 +(87, 38, -1) 11 +(87, 39, -1) 11 +(87, 40, -1) 12 +(87, 41, -1) 12 +(87, 42, -1) 12 +(87, 43, -1) 12 +(87, 44, -1) 12 +(87, 45, -1) 13 +(87, 46, -1) 13 +(87, 47, -1) 13 +(87, 48, -1) 13 +(87, 49, -1) 13 +(87, 50, -1) 13 +(87, 51, -1) 13 +(87, 52, -1) 13 +(87, 53, -1) 13 +(87, 54, -1) 13 +(87, 55, -1) 13 +(87, 56, -1) 13 +(87, 57, -1) 12 +(87, 58, -1) 12 +(87, 59, -1) 12 +(87, 60, -1) 12 +(87, 61, -1) 12 +(87, 62, -1) 11 +(87, 63, -1) 11 +(87, 64, -1) 11 +(87, 65, -1) 10 +(87, 66, -1) 10 +(87, 67, -1) 10 +(87, 68, -1) 9 +(87, 69, -1) 9 +(87, 70, -1) 8 +(87, 71, -1) 8 +(87, 72, -1) 7 +(87, 73, -1) 7 +(87, 74, -1) 6 +(87, 75, -1) 6 +(87, 76, -1) 5 +(87, 77, -1) 5 +(87, 78, -1) 4 +(87, 79, -1) 4 +(87, 80, -1) 3 +(87, 81, -1) 2 +(87, 82, -1) 2 +(87, 83, -1) 1 +(87, 84, -1) 1 +(87, 85, -1) 0 +(88, 21, -1) 2 +(88, 22, -1) 3 +(88, 23, -1) 3 +(88, 24, -1) 4 +(88, 25, -1) 5 +(88, 26, -1) 5 +(88, 27, -1) 6 +(88, 28, -1) 6 +(88, 29, -1) 7 +(88, 30, -1) 7 +(88, 31, -1) 7 +(88, 32, -1) 8 +(88, 33, -1) 8 +(88, 34, -1) 9 +(88, 35, -1) 9 +(88, 36, -1) 9 +(88, 37, -1) 10 +(88, 38, -1) 10 +(88, 39, -1) 10 +(88, 40, -1) 11 +(88, 41, -1) 11 +(88, 42, -1) 11 +(88, 43, -1) 11 +(88, 44, -1) 11 +(88, 45, -1) 12 +(88, 46, -1) 12 +(88, 47, -1) 12 +(88, 48, -1) 12 +(88, 49, -1) 12 +(88, 50, -1) 12 +(88, 51, -1) 12 +(88, 52, -1) 12 +(88, 53, -1) 12 +(88, 54, -1) 12 +(88, 55, -1) 12 +(88, 56, -1) 12 +(88, 57, -1) 11 +(88, 58, -1) 11 +(88, 59, -1) 11 +(88, 60, -1) 11 +(88, 61, -1) 11 +(88, 62, -1) 10 +(88, 63, -1) 10 +(88, 64, -1) 10 +(88, 65, -1) 9 +(88, 66, -1) 9 +(88, 67, -1) 9 +(88, 68, -1) 8 +(88, 69, -1) 8 +(88, 70, -1) 7 +(88, 71, -1) 7 +(88, 72, -1) 7 +(88, 73, -1) 6 +(88, 74, -1) 6 +(88, 75, -1) 5 +(88, 76, -1) 5 +(88, 77, -1) 4 +(88, 78, -1) 3 +(88, 79, -1) 3 +(88, 80, -1) 2 +(89, 21, -1) 1 +(89, 22, -1) 2 +(89, 23, -1) 3 +(89, 24, -1) 3 +(89, 25, -1) 4 +(89, 26, -1) 4 +(89, 27, -1) 5 +(89, 28, -1) 5 +(89, 29, -1) 6 +(89, 30, -1) 6 +(89, 31, -1) 7 +(89, 32, -1) 7 +(89, 33, -1) 7 +(89, 34, -1) 8 +(89, 35, -1) 8 +(89, 36, -1) 8 +(89, 37, -1) 9 +(89, 38, -1) 9 +(89, 39, -1) 9 +(89, 40, -1) 10 +(89, 41, -1) 10 +(89, 42, -1) 10 +(89, 43, -1) 10 +(89, 44, -1) 10 +(89, 45, -1) 11 +(89, 46, -1) 11 +(89, 47, -1) 11 +(89, 48, -1) 11 +(89, 49, -1) 11 +(89, 50, -1) 11 +(89, 51, -1) 11 +(89, 52, -1) 11 +(89, 53, -1) 11 +(89, 54, -1) 11 +(89, 55, -1) 11 +(89, 56, -1) 11 +(89, 57, -1) 10 +(89, 58, -1) 10 +(89, 59, -1) 10 +(89, 60, -1) 10 +(89, 61, -1) 10 +(89, 62, -1) 9 +(89, 63, -1) 9 +(89, 64, -1) 9 +(89, 65, -1) 8 +(89, 66, -1) 8 +(89, 67, -1) 8 +(89, 68, -1) 7 +(89, 69, -1) 7 +(89, 70, -1) 7 +(89, 71, -1) 6 +(89, 72, -1) 6 +(89, 73, -1) 5 +(89, 74, -1) 5 +(89, 75, -1) 4 +(89, 76, -1) 4 +(89, 77, -1) 3 +(89, 78, -1) 3 +(89, 79, -1) 2 +(89, 80, -1) 1 +(90, 21, -1) 1 +(90, 22, -1) 1 +(90, 23, -1) 2 +(90, 24, -1) 2 +(90, 25, -1) 3 +(90, 26, -1) 3 +(90, 27, -1) 4 +(90, 28, -1) 4 +(90, 29, -1) 5 +(90, 30, -1) 5 +(90, 31, -1) 6 +(90, 32, -1) 6 +(90, 33, -1) 6 +(90, 34, -1) 7 +(90, 35, -1) 7 +(90, 36, -1) 8 +(90, 37, -1) 8 +(90, 38, -1) 8 +(90, 39, -1) 8 +(90, 40, -1) 9 +(90, 41, -1) 9 +(90, 42, -1) 9 +(90, 43, -1) 9 +(90, 44, -1) 9 +(90, 45, -1) 10 +(90, 46, -1) 10 +(90, 47, -1) 10 +(90, 48, -1) 10 +(90, 49, -1) 10 +(90, 50, -1) 10 +(90, 51, -1) 10 +(90, 52, -1) 10 +(90, 53, -1) 10 +(90, 54, -1) 10 +(90, 55, -1) 10 +(90, 56, -1) 10 +(90, 57, -1) 9 +(90, 58, -1) 9 +(90, 59, -1) 9 +(90, 60, -1) 9 +(90, 61, -1) 9 +(90, 62, -1) 8 +(90, 63, -1) 8 +(90, 64, -1) 8 +(90, 65, -1) 8 +(90, 66, -1) 7 +(90, 67, -1) 7 +(90, 68, -1) 6 +(90, 69, -1) 6 +(90, 70, -1) 6 +(90, 71, -1) 5 +(90, 72, -1) 5 +(90, 73, -1) 4 +(90, 74, -1) 4 +(90, 75, -1) 3 +(90, 76, -1) 3 +(90, 77, -1) 2 +(90, 78, -1) 2 +(90, 79, -1) 1 +(90, 80, -1) 1 +(91, 21, -1) 0 +(91, 22, -1) 1 +(91, 23, -1) 1 +(91, 24, -1) 2 +(91, 25, -1) 2 +(91, 26, -1) 3 +(91, 27, -1) 3 +(91, 28, -1) 4 +(91, 29, -1) 4 +(91, 30, -1) 4 +(91, 31, -1) 5 +(91, 32, -1) 5 +(91, 33, -1) 6 +(91, 34, -1) 6 +(91, 35, -1) 6 +(91, 36, -1) 7 +(91, 37, -1) 7 +(91, 38, -1) 7 +(91, 39, -1) 8 +(91, 40, -1) 8 +(91, 41, -1) 8 +(91, 42, -1) 8 +(91, 43, -1) 8 +(91, 44, -1) 9 +(91, 45, -1) 9 +(91, 46, -1) 9 +(91, 47, -1) 9 +(91, 48, -1) 9 +(91, 49, -1) 9 +(91, 50, -1) 9 +(91, 51, -1) 9 +(91, 52, -1) 9 +(91, 53, -1) 9 +(91, 54, -1) 9 +(91, 55, -1) 9 +(91, 56, -1) 9 +(91, 57, -1) 9 +(91, 58, -1) 8 +(91, 59, -1) 8 +(91, 60, -1) 8 +(91, 61, -1) 8 +(91, 62, -1) 8 +(91, 63, -1) 7 +(91, 64, -1) 7 +(91, 65, -1) 7 +(91, 66, -1) 6 +(91, 67, -1) 6 +(91, 68, -1) 6 +(91, 69, -1) 5 +(91, 70, -1) 5 +(91, 71, -1) 4 +(91, 72, -1) 4 +(91, 73, -1) 4 +(91, 74, -1) 3 +(91, 75, -1) 3 +(91, 76, -1) 2 +(91, 77, -1) 2 +(91, 78, -1) 1 +(91, 79, -1) 1 +(91, 80, -1) 0 +(92, 21, -1) 0 +(92, 22, -1) 0 +(92, 23, -1) 0 +(92, 24, -1) 1 +(92, 25, -1) 1 +(92, 26, -1) 2 +(92, 27, -1) 2 +(92, 28, -1) 3 +(92, 29, -1) 3 +(92, 30, -1) 4 +(92, 31, -1) 4 +(92, 32, -1) 4 +(92, 33, -1) 5 +(92, 34, -1) 5 +(92, 35, -1) 5 +(92, 36, -1) 6 +(92, 37, -1) 6 +(92, 38, -1) 6 +(92, 39, -1) 7 +(92, 40, -1) 7 +(92, 41, -1) 7 +(92, 42, -1) 7 +(92, 43, -1) 7 +(92, 44, -1) 8 +(92, 45, -1) 8 +(92, 46, -1) 8 +(92, 47, -1) 8 +(92, 48, -1) 8 +(92, 49, -1) 8 +(92, 50, -1) 8 +(92, 51, -1) 8 +(92, 52, -1) 8 +(92, 53, -1) 8 +(92, 54, -1) 8 +(92, 55, -1) 8 +(92, 56, -1) 8 +(92, 57, -1) 8 +(92, 58, -1) 7 +(92, 59, -1) 7 +(92, 60, -1) 7 +(92, 61, -1) 7 +(92, 62, -1) 7 +(92, 63, -1) 6 +(92, 64, -1) 6 +(92, 65, -1) 6 +(92, 66, -1) 5 +(92, 67, -1) 5 +(92, 68, -1) 5 +(92, 69, -1) 4 +(92, 70, -1) 4 +(92, 71, -1) 4 +(92, 72, -1) 3 +(92, 73, -1) 3 +(92, 74, -1) 2 +(92, 75, -1) 2 +(92, 76, -1) 1 +(92, 77, -1) 1 +(92, 78, -1) 0 +(92, 79, -1) 0 +(92, 80, -1) 0 +(93, 26, -1) 1 +(93, 27, -1) 1 +(93, 28, -1) 2 +(93, 29, -1) 2 +(93, 30, -1) 3 +(93, 31, -1) 3 +(93, 32, -1) 3 +(93, 33, -1) 4 +(93, 34, -1) 4 +(93, 35, -1) 4 +(93, 36, -1) 5 +(93, 37, -1) 5 +(93, 38, -1) 5 +(93, 39, -1) 6 +(93, 40, -1) 6 +(93, 41, -1) 6 +(93, 42, -1) 6 +(93, 43, -1) 6 +(93, 44, -1) 7 +(93, 45, -1) 7 +(93, 46, -1) 7 +(93, 47, -1) 7 +(93, 48, -1) 7 +(93, 49, -1) 7 +(93, 50, -1) 7 +(93, 51, -1) 7 +(93, 52, -1) 7 +(93, 53, -1) 7 +(93, 54, -1) 7 +(93, 55, -1) 7 +(93, 56, -1) 7 +(93, 57, -1) 7 +(93, 58, -1) 6 +(93, 59, -1) 6 +(93, 60, -1) 6 +(93, 61, -1) 6 +(93, 62, -1) 6 +(93, 63, -1) 5 +(93, 64, -1) 5 +(93, 65, -1) 5 +(93, 66, -1) 4 +(93, 67, -1) 4 +(93, 68, -1) 4 +(93, 69, -1) 3 +(93, 70, -1) 3 +(93, 71, -1) 3 +(93, 72, -1) 2 +(93, 73, -1) 2 +(93, 74, -1) 1 +(93, 75, -1) 1 +(94, 26, -1) 0 +(94, 27, -1) 0 +(94, 28, -1) 1 +(94, 29, -1) 1 +(94, 30, -1) 2 +(94, 31, -1) 2 +(94, 32, -1) 2 +(94, 33, -1) 3 +(94, 34, -1) 3 +(94, 35, -1) 3 +(94, 36, -1) 4 +(94, 37, -1) 4 +(94, 38, -1) 4 +(94, 39, -1) 5 +(94, 40, -1) 5 +(94, 41, -1) 5 +(94, 42, -1) 5 +(94, 43, -1) 5 +(94, 44, -1) 6 +(94, 45, -1) 6 +(94, 46, -1) 6 +(94, 47, -1) 6 +(94, 48, -1) 6 +(94, 49, -1) 6 +(94, 50, -1) 6 +(94, 51, -1) 6 +(94, 52, -1) 6 +(94, 53, -1) 6 +(94, 54, -1) 6 +(94, 55, -1) 6 +(94, 56, -1) 6 +(94, 57, -1) 6 +(94, 58, -1) 5 +(94, 59, -1) 5 +(94, 60, -1) 5 +(94, 61, -1) 5 +(94, 62, -1) 5 +(94, 63, -1) 4 +(94, 64, -1) 4 +(94, 65, -1) 4 +(94, 66, -1) 3 +(94, 67, -1) 3 +(94, 68, -1) 3 +(94, 69, -1) 2 +(94, 70, -1) 2 +(94, 71, -1) 2 +(94, 72, -1) 1 +(94, 73, -1) 1 +(94, 74, -1) 0 +(94, 75, -1) 0 +(95, 26, -1) 0 +(95, 27, -1) 0 +(95, 28, -1) 0 +(95, 29, -1) 0 +(95, 30, -1) 1 +(95, 31, -1) 1 +(95, 32, -1) 1 +(95, 33, -1) 2 +(95, 34, -1) 2 +(95, 35, -1) 3 +(95, 36, -1) 3 +(95, 37, -1) 3 +(95, 38, -1) 3 +(95, 39, -1) 4 +(95, 40, -1) 4 +(95, 41, -1) 4 +(95, 42, -1) 4 +(95, 43, -1) 4 +(95, 44, -1) 5 +(95, 45, -1) 5 +(95, 46, -1) 5 +(95, 47, -1) 5 +(95, 48, -1) 5 +(95, 49, -1) 5 +(95, 50, -1) 5 +(95, 51, -1) 5 +(95, 52, -1) 5 +(95, 53, -1) 5 +(95, 54, -1) 5 +(95, 55, -1) 5 +(95, 56, -1) 5 +(95, 57, -1) 5 +(95, 58, -1) 4 +(95, 59, -1) 4 +(95, 60, -1) 4 +(95, 61, -1) 4 +(95, 62, -1) 4 +(95, 63, -1) 3 +(95, 64, -1) 3 +(95, 65, -1) 3 +(95, 66, -1) 3 +(95, 67, -1) 2 +(95, 68, -1) 2 +(95, 69, -1) 1 +(95, 70, -1) 1 +(95, 71, -1) 1 +(95, 72, -1) 0 +(95, 73, -1) 0 +(95, 74, -1) 0 +(95, 75, -1) 0 +(96, 36, -1) 2 +(96, 37, -1) 2 +(96, 38, -1) 2 +(96, 39, -1) 3 +(96, 40, -1) 3 +(96, 41, -1) 3 +(96, 42, -1) 3 +(96, 43, -1) 3 +(96, 44, -1) 4 +(96, 45, -1) 4 +(96, 46, -1) 4 +(96, 47, -1) 4 +(96, 48, -1) 4 +(96, 49, -1) 4 +(96, 50, -1) 4 +(96, 51, -1) 4 +(96, 52, -1) 4 +(96, 53, -1) 4 +(96, 54, -1) 4 +(96, 55, -1) 4 +(96, 56, -1) 4 +(96, 57, -1) 4 +(96, 58, -1) 3 +(96, 59, -1) 3 +(96, 60, -1) 3 +(96, 61, -1) 3 +(96, 62, -1) 3 +(96, 63, -1) 2 +(96, 64, -1) 2 +(96, 65, -1) 2 +(97, 36, -1) 1 +(97, 37, -1) 1 +(97, 38, -1) 2 +(97, 39, -1) 2 +(97, 40, -1) 2 +(97, 41, -1) 2 +(97, 42, -1) 2 +(97, 43, -1) 2 +(97, 44, -1) 3 +(97, 45, -1) 3 +(97, 46, -1) 3 +(97, 47, -1) 3 +(97, 48, -1) 3 +(97, 49, -1) 3 +(97, 50, -1) 3 +(97, 51, -1) 3 +(97, 52, -1) 3 +(97, 53, -1) 3 +(97, 54, -1) 3 +(97, 55, -1) 3 +(97, 56, -1) 3 +(97, 57, -1) 3 +(97, 58, -1) 2 +(97, 59, -1) 2 +(97, 60, -1) 2 +(97, 61, -1) 2 +(97, 62, -1) 2 +(97, 63, -1) 2 +(97, 64, -1) 1 +(97, 65, -1) 1 +(98, 41, -1) 1 +(98, 42, -1) 1 +(98, 43, -1) 1 +(98, 44, -1) 2 +(98, 45, -1) 2 +(98, 46, -1) 2 +(98, 47, -1) 2 +(98, 48, -1) 2 +(98, 49, -1) 2 +(98, 50, -1) 2 +(98, 51, -1) 2 +(98, 52, -1) 2 +(98, 53, -1) 2 +(98, 54, -1) 2 +(98, 55, -1) 2 +(98, 56, -1) 2 +(98, 57, -1) 2 +(98, 58, -1) 1 +(98, 59, -1) 1 +(98, 60, -1) 1 +(99, 41, -1) 0 +(99, 42, -1) 0 +(99, 43, -1) 0 +(99, 44, -1) 1 +(99, 45, -1) 1 +(99, 46, -1) 1 +(99, 47, -1) 1 +(99, 48, -1) 1 +(99, 49, -1) 1 +(99, 50, -1) 1 +(99, 51, -1) 1 +(99, 52, -1) 1 +(99, 53, -1) 1 +(99, 54, -1) 1 +(99, 55, -1) 1 +(99, 56, -1) 1 +(99, 57, -1) 1 +(99, 58, -1) 0 +(99, 59, -1) 0 +(99, 60, -1) 0 +(100, 41, -1) 0 +(100, 42, -1) 0 +(100, 43, -1) 0 +(100, 44, -1) 0 +(100, 45, -1) 0 +(100, 46, -1) 0 +(100, 47, -1) 0 +(100, 48, -1) 0 +(100, 49, -1) 0 +(100, 50, -1) 0 +(100, 51, -1) 0 +(100, 52, -1) 0 +(100, 53, -1) 0 +(100, 54, -1) 0 +(100, 55, -1) 0 +(100, 56, -1) 0 +(100, 57, -1) 0 +(100, 58, -1) 0 +(100, 59, -1) 0 +(100, 60, -1) 0 +(1, 41, 1) 0 +(1, 42, 1) 0 +(1, 43, 1) 0 +(1, 44, 1) 0 +(1, 45, 1) 0 +(1, 46, 1) 0 +(1, 47, 1) 0 +(1, 48, 1) 0 +(1, 49, 1) 0 +(1, 50, 1) 0 +(1, 51, 1) 0 +(1, 52, 1) 0 +(1, 53, 1) 0 +(1, 54, 1) 0 +(1, 55, 1) 0 +(1, 56, 1) 0 +(1, 57, 1) 0 +(1, 58, 1) 0 +(1, 59, 1) 0 +(1, 60, 1) 0 +(2, 41, 1) 0 +(2, 42, 1) 0 +(2, 43, 1) 0 +(2, 44, 1) 1 +(2, 45, 1) 1 +(2, 46, 1) 1 +(2, 47, 1) 1 +(2, 48, 1) 1 +(2, 49, 1) 1 +(2, 50, 1) 1 +(2, 51, 1) 1 +(2, 52, 1) 1 +(2, 53, 1) 1 +(2, 54, 1) 1 +(2, 55, 1) 1 +(2, 56, 1) 1 +(2, 57, 1) 1 +(2, 58, 1) 0 +(2, 59, 1) 0 +(2, 60, 1) 0 +(3, 41, 1) 1 +(3, 42, 1) 1 +(3, 43, 1) 1 +(3, 44, 1) 2 +(3, 45, 1) 2 +(3, 46, 1) 2 +(3, 47, 1) 2 +(3, 48, 1) 2 +(3, 49, 1) 2 +(3, 50, 1) 2 +(3, 51, 1) 2 +(3, 52, 1) 2 +(3, 53, 1) 2 +(3, 54, 1) 2 +(3, 55, 1) 2 +(3, 56, 1) 2 +(3, 57, 1) 2 +(3, 58, 1) 1 +(3, 59, 1) 1 +(3, 60, 1) 1 +(4, 36, 1) 1 +(4, 37, 1) 1 +(4, 38, 1) 2 +(4, 39, 1) 2 +(4, 40, 1) 2 +(4, 41, 1) 2 +(4, 42, 1) 2 +(4, 43, 1) 2 +(4, 44, 1) 3 +(4, 45, 1) 3 +(4, 46, 1) 3 +(4, 47, 1) 3 +(4, 48, 1) 3 +(4, 49, 1) 3 +(4, 50, 1) 3 +(4, 51, 1) 3 +(4, 52, 1) 3 +(4, 53, 1) 3 +(4, 54, 1) 3 +(4, 55, 1) 3 +(4, 56, 1) 3 +(4, 57, 1) 3 +(4, 58, 1) 2 +(4, 59, 1) 2 +(4, 60, 1) 2 +(4, 61, 1) 2 +(4, 62, 1) 2 +(4, 63, 1) 2 +(4, 64, 1) 1 +(4, 65, 1) 1 +(5, 36, 1) 2 +(5, 37, 1) 2 +(5, 38, 1) 2 +(5, 39, 1) 3 +(5, 40, 1) 3 +(5, 41, 1) 3 +(5, 42, 1) 3 +(5, 43, 1) 3 +(5, 44, 1) 4 +(5, 45, 1) 4 +(5, 46, 1) 4 +(5, 47, 1) 4 +(5, 48, 1) 4 +(5, 49, 1) 4 +(5, 50, 1) 4 +(5, 51, 1) 4 +(5, 52, 1) 4 +(5, 53, 1) 4 +(5, 54, 1) 4 +(5, 55, 1) 4 +(5, 56, 1) 4 +(5, 57, 1) 4 +(5, 58, 1) 3 +(5, 59, 1) 3 +(5, 60, 1) 3 +(5, 61, 1) 3 +(5, 62, 1) 3 +(5, 63, 1) 2 +(5, 64, 1) 2 +(5, 65, 1) 2 +(6, 26, 1) 0 +(6, 27, 1) 0 +(6, 28, 1) 0 +(6, 29, 1) 0 +(6, 30, 1) 1 +(6, 31, 1) 1 +(6, 32, 1) 1 +(6, 33, 1) 2 +(6, 34, 1) 2 +(6, 35, 1) 3 +(6, 36, 1) 3 +(6, 37, 1) 3 +(6, 38, 1) 3 +(6, 39, 1) 4 +(6, 40, 1) 4 +(6, 41, 1) 4 +(6, 42, 1) 4 +(6, 43, 1) 4 +(6, 44, 1) 5 +(6, 45, 1) 5 +(6, 46, 1) 5 +(6, 47, 1) 5 +(6, 48, 1) 5 +(6, 49, 1) 5 +(6, 50, 1) 5 +(6, 51, 1) 5 +(6, 52, 1) 5 +(6, 53, 1) 5 +(6, 54, 1) 5 +(6, 55, 1) 5 +(6, 56, 1) 5 +(6, 57, 1) 5 +(6, 58, 1) 4 +(6, 59, 1) 4 +(6, 60, 1) 4 +(6, 61, 1) 4 +(6, 62, 1) 4 +(6, 63, 1) 3 +(6, 64, 1) 3 +(6, 65, 1) 3 +(6, 66, 1) 3 +(6, 67, 1) 2 +(6, 68, 1) 2 +(6, 69, 1) 1 +(6, 70, 1) 1 +(6, 71, 1) 1 +(6, 72, 1) 0 +(6, 73, 1) 0 +(6, 74, 1) 0 +(6, 75, 1) 0 +(7, 26, 1) 0 +(7, 27, 1) 0 +(7, 28, 1) 1 +(7, 29, 1) 1 +(7, 30, 1) 2 +(7, 31, 1) 2 +(7, 32, 1) 2 +(7, 33, 1) 3 +(7, 34, 1) 3 +(7, 35, 1) 3 +(7, 36, 1) 4 +(7, 37, 1) 4 +(7, 38, 1) 4 +(7, 39, 1) 5 +(7, 40, 1) 5 +(7, 41, 1) 5 +(7, 42, 1) 5 +(7, 43, 1) 5 +(7, 44, 1) 6 +(7, 45, 1) 6 +(7, 46, 1) 6 +(7, 47, 1) 6 +(7, 48, 1) 6 +(7, 49, 1) 6 +(7, 50, 1) 6 +(7, 51, 1) 6 +(7, 52, 1) 6 +(7, 53, 1) 6 +(7, 54, 1) 6 +(7, 55, 1) 6 +(7, 56, 1) 6 +(7, 57, 1) 6 +(7, 58, 1) 5 +(7, 59, 1) 5 +(7, 60, 1) 5 +(7, 61, 1) 5 +(7, 62, 1) 5 +(7, 63, 1) 4 +(7, 64, 1) 4 +(7, 65, 1) 4 +(7, 66, 1) 3 +(7, 67, 1) 3 +(7, 68, 1) 3 +(7, 69, 1) 2 +(7, 70, 1) 2 +(7, 71, 1) 2 +(7, 72, 1) 1 +(7, 73, 1) 1 +(7, 74, 1) 0 +(7, 75, 1) 0 +(8, 26, 1) 1 +(8, 27, 1) 1 +(8, 28, 1) 2 +(8, 29, 1) 2 +(8, 30, 1) 3 +(8, 31, 1) 3 +(8, 32, 1) 3 +(8, 33, 1) 4 +(8, 34, 1) 4 +(8, 35, 1) 4 +(8, 36, 1) 5 +(8, 37, 1) 5 +(8, 38, 1) 5 +(8, 39, 1) 6 +(8, 40, 1) 6 +(8, 41, 1) 6 +(8, 42, 1) 6 +(8, 43, 1) 6 +(8, 44, 1) 7 +(8, 45, 1) 7 +(8, 46, 1) 7 +(8, 47, 1) 7 +(8, 48, 1) 7 +(8, 49, 1) 7 +(8, 50, 1) 7 +(8, 51, 1) 7 +(8, 52, 1) 7 +(8, 53, 1) 7 +(8, 54, 1) 7 +(8, 55, 1) 7 +(8, 56, 1) 7 +(8, 57, 1) 7 +(8, 58, 1) 6 +(8, 59, 1) 6 +(8, 60, 1) 6 +(8, 61, 1) 6 +(8, 62, 1) 6 +(8, 63, 1) 5 +(8, 64, 1) 5 +(8, 65, 1) 5 +(8, 66, 1) 4 +(8, 67, 1) 4 +(8, 68, 1) 4 +(8, 69, 1) 3 +(8, 70, 1) 3 +(8, 71, 1) 3 +(8, 72, 1) 2 +(8, 73, 1) 2 +(8, 74, 1) 1 +(8, 75, 1) 1 +(9, 21, 1) 0 +(9, 22, 1) 0 +(9, 23, 1) 0 +(9, 24, 1) 1 +(9, 25, 1) 1 +(9, 26, 1) 2 +(9, 27, 1) 2 +(9, 28, 1) 3 +(9, 29, 1) 3 +(9, 30, 1) 4 +(9, 31, 1) 4 +(9, 32, 1) 4 +(9, 33, 1) 5 +(9, 34, 1) 5 +(9, 35, 1) 5 +(9, 36, 1) 6 +(9, 37, 1) 6 +(9, 38, 1) 6 +(9, 39, 1) 7 +(9, 40, 1) 7 +(9, 41, 1) 7 +(9, 42, 1) 7 +(9, 43, 1) 7 +(9, 44, 1) 8 +(9, 45, 1) 8 +(9, 46, 1) 8 +(9, 47, 1) 8 +(9, 48, 1) 8 +(9, 49, 1) 8 +(9, 50, 1) 8 +(9, 51, 1) 8 +(9, 52, 1) 8 +(9, 53, 1) 8 +(9, 54, 1) 8 +(9, 55, 1) 8 +(9, 56, 1) 8 +(9, 57, 1) 8 +(9, 58, 1) 7 +(9, 59, 1) 7 +(9, 60, 1) 7 +(9, 61, 1) 7 +(9, 62, 1) 7 +(9, 63, 1) 6 +(9, 64, 1) 6 +(9, 65, 1) 6 +(9, 66, 1) 5 +(9, 67, 1) 5 +(9, 68, 1) 5 +(9, 69, 1) 4 +(9, 70, 1) 4 +(9, 71, 1) 4 +(9, 72, 1) 3 +(9, 73, 1) 3 +(9, 74, 1) 2 +(9, 75, 1) 2 +(9, 76, 1) 1 +(9, 77, 1) 1 +(9, 78, 1) 0 +(9, 79, 1) 0 +(9, 80, 1) 0 +(10, 21, 1) 0 +(10, 22, 1) 1 +(10, 23, 1) 1 +(10, 24, 1) 2 +(10, 25, 1) 2 +(10, 26, 1) 3 +(10, 27, 1) 3 +(10, 28, 1) 4 +(10, 29, 1) 4 +(10, 30, 1) 4 +(10, 31, 1) 5 +(10, 32, 1) 5 +(10, 33, 1) 6 +(10, 34, 1) 6 +(10, 35, 1) 6 +(10, 36, 1) 7 +(10, 37, 1) 7 +(10, 38, 1) 7 +(10, 39, 1) 8 +(10, 40, 1) 8 +(10, 41, 1) 8 +(10, 42, 1) 8 +(10, 43, 1) 8 +(10, 44, 1) 9 +(10, 45, 1) 9 +(10, 46, 1) 9 +(10, 47, 1) 9 +(10, 48, 1) 9 +(10, 49, 1) 9 +(10, 50, 1) 9 +(10, 51, 1) 9 +(10, 52, 1) 9 +(10, 53, 1) 9 +(10, 54, 1) 9 +(10, 55, 1) 9 +(10, 56, 1) 9 +(10, 57, 1) 9 +(10, 58, 1) 8 +(10, 59, 1) 8 +(10, 60, 1) 8 +(10, 61, 1) 8 +(10, 62, 1) 8 +(10, 63, 1) 7 +(10, 64, 1) 7 +(10, 65, 1) 7 +(10, 66, 1) 6 +(10, 67, 1) 6 +(10, 68, 1) 6 +(10, 69, 1) 5 +(10, 70, 1) 5 +(10, 71, 1) 4 +(10, 72, 1) 4 +(10, 73, 1) 4 +(10, 74, 1) 3 +(10, 75, 1) 3 +(10, 76, 1) 2 +(10, 77, 1) 2 +(10, 78, 1) 1 +(10, 79, 1) 1 +(10, 80, 1) 0 +(11, 21, 1) 1 +(11, 22, 1) 1 +(11, 23, 1) 2 +(11, 24, 1) 2 +(11, 25, 1) 3 +(11, 26, 1) 3 +(11, 27, 1) 4 +(11, 28, 1) 4 +(11, 29, 1) 5 +(11, 30, 1) 5 +(11, 31, 1) 6 +(11, 32, 1) 6 +(11, 33, 1) 6 +(11, 34, 1) 7 +(11, 35, 1) 7 +(11, 36, 1) 8 +(11, 37, 1) 8 +(11, 38, 1) 8 +(11, 39, 1) 8 +(11, 40, 1) 9 +(11, 41, 1) 9 +(11, 42, 1) 9 +(11, 43, 1) 9 +(11, 44, 1) 9 +(11, 45, 1) 10 +(11, 46, 1) 10 +(11, 47, 1) 10 +(11, 48, 1) 10 +(11, 49, 1) 10 +(11, 50, 1) 10 +(11, 51, 1) 10 +(11, 52, 1) 10 +(11, 53, 1) 10 +(11, 54, 1) 10 +(11, 55, 1) 10 +(11, 56, 1) 10 +(11, 57, 1) 9 +(11, 58, 1) 9 +(11, 59, 1) 9 +(11, 60, 1) 9 +(11, 61, 1) 9 +(11, 62, 1) 8 +(11, 63, 1) 8 +(11, 64, 1) 8 +(11, 65, 1) 8 +(11, 66, 1) 7 +(11, 67, 1) 7 +(11, 68, 1) 6 +(11, 69, 1) 6 +(11, 70, 1) 6 +(11, 71, 1) 5 +(11, 72, 1) 5 +(11, 73, 1) 4 +(11, 74, 1) 4 +(11, 75, 1) 3 +(11, 76, 1) 3 +(11, 77, 1) 2 +(11, 78, 1) 2 +(11, 79, 1) 1 +(11, 80, 1) 1 +(12, 21, 1) 1 +(12, 22, 1) 2 +(12, 23, 1) 3 +(12, 24, 1) 3 +(12, 25, 1) 4 +(12, 26, 1) 4 +(12, 27, 1) 5 +(12, 28, 1) 5 +(12, 29, 1) 6 +(12, 30, 1) 6 +(12, 31, 1) 7 +(12, 32, 1) 7 +(12, 33, 1) 7 +(12, 34, 1) 8 +(12, 35, 1) 8 +(12, 36, 1) 8 +(12, 37, 1) 9 +(12, 38, 1) 9 +(12, 39, 1) 9 +(12, 40, 1) 10 +(12, 41, 1) 10 +(12, 42, 1) 10 +(12, 43, 1) 10 +(12, 44, 1) 10 +(12, 45, 1) 11 +(12, 46, 1) 11 +(12, 47, 1) 11 +(12, 48, 1) 11 +(12, 49, 1) 11 +(12, 50, 1) 11 +(12, 51, 1) 11 +(12, 52, 1) 11 +(12, 53, 1) 11 +(12, 54, 1) 11 +(12, 55, 1) 11 +(12, 56, 1) 11 +(12, 57, 1) 10 +(12, 58, 1) 10 +(12, 59, 1) 10 +(12, 60, 1) 10 +(12, 61, 1) 10 +(12, 62, 1) 9 +(12, 63, 1) 9 +(12, 64, 1) 9 +(12, 65, 1) 8 +(12, 66, 1) 8 +(12, 67, 1) 8 +(12, 68, 1) 7 +(12, 69, 1) 7 +(12, 70, 1) 7 +(12, 71, 1) 6 +(12, 72, 1) 6 +(12, 73, 1) 5 +(12, 74, 1) 5 +(12, 75, 1) 4 +(12, 76, 1) 4 +(12, 77, 1) 3 +(12, 78, 1) 3 +(12, 79, 1) 2 +(12, 80, 1) 1 +(13, 21, 1) 2 +(13, 22, 1) 3 +(13, 23, 1) 3 +(13, 24, 1) 4 +(13, 25, 1) 5 +(13, 26, 1) 5 +(13, 27, 1) 6 +(13, 28, 1) 6 +(13, 29, 1) 7 +(13, 30, 1) 7 +(13, 31, 1) 7 +(13, 32, 1) 8 +(13, 33, 1) 8 +(13, 34, 1) 9 +(13, 35, 1) 9 +(13, 36, 1) 9 +(13, 37, 1) 10 +(13, 38, 1) 10 +(13, 39, 1) 10 +(13, 40, 1) 11 +(13, 41, 1) 11 +(13, 42, 1) 11 +(13, 43, 1) 11 +(13, 44, 1) 11 +(13, 45, 1) 12 +(13, 46, 1) 12 +(13, 47, 1) 12 +(13, 48, 1) 12 +(13, 49, 1) 12 +(13, 50, 1) 12 +(13, 51, 1) 12 +(13, 52, 1) 12 +(13, 53, 1) 12 +(13, 54, 1) 12 +(13, 55, 1) 12 +(13, 56, 1) 12 +(13, 57, 1) 11 +(13, 58, 1) 11 +(13, 59, 1) 11 +(13, 60, 1) 11 +(13, 61, 1) 11 +(13, 62, 1) 10 +(13, 63, 1) 10 +(13, 64, 1) 10 +(13, 65, 1) 9 +(13, 66, 1) 9 +(13, 67, 1) 9 +(13, 68, 1) 8 +(13, 69, 1) 8 +(13, 70, 1) 7 +(13, 71, 1) 7 +(13, 72, 1) 7 +(13, 73, 1) 6 +(13, 74, 1) 6 +(13, 75, 1) 5 +(13, 76, 1) 5 +(13, 77, 1) 4 +(13, 78, 1) 3 +(13, 79, 1) 3 +(13, 80, 1) 2 +(14, 16, 1) 0 +(14, 17, 1) 1 +(14, 18, 1) 1 +(14, 19, 1) 2 +(14, 20, 1) 2 +(14, 21, 1) 3 +(14, 22, 1) 4 +(14, 23, 1) 4 +(14, 24, 1) 5 +(14, 25, 1) 5 +(14, 26, 1) 6 +(14, 27, 1) 6 +(14, 28, 1) 7 +(14, 29, 1) 7 +(14, 30, 1) 8 +(14, 31, 1) 8 +(14, 32, 1) 9 +(14, 33, 1) 9 +(14, 34, 1) 10 +(14, 35, 1) 10 +(14, 36, 1) 10 +(14, 37, 1) 11 +(14, 38, 1) 11 +(14, 39, 1) 11 +(14, 40, 1) 12 +(14, 41, 1) 12 +(14, 42, 1) 12 +(14, 43, 1) 12 +(14, 44, 1) 12 +(14, 45, 1) 13 +(14, 46, 1) 13 +(14, 47, 1) 13 +(14, 48, 1) 13 +(14, 49, 1) 13 +(14, 50, 1) 13 +(14, 51, 1) 13 +(14, 52, 1) 13 +(14, 53, 1) 13 +(14, 54, 1) 13 +(14, 55, 1) 13 +(14, 56, 1) 13 +(14, 57, 1) 12 +(14, 58, 1) 12 +(14, 59, 1) 12 +(14, 60, 1) 12 +(14, 61, 1) 12 +(14, 62, 1) 11 +(14, 63, 1) 11 +(14, 64, 1) 11 +(14, 65, 1) 10 +(14, 66, 1) 10 +(14, 67, 1) 10 +(14, 68, 1) 9 +(14, 69, 1) 9 +(14, 70, 1) 8 +(14, 71, 1) 8 +(14, 72, 1) 7 +(14, 73, 1) 7 +(14, 74, 1) 6 +(14, 75, 1) 6 +(14, 76, 1) 5 +(14, 77, 1) 5 +(14, 78, 1) 4 +(14, 79, 1) 4 +(14, 80, 1) 3 +(14, 81, 1) 2 +(14, 82, 1) 2 +(14, 83, 1) 1 +(14, 84, 1) 1 +(14, 85, 1) 0 +(15, 16, 1) 1 +(15, 17, 1) 1 +(15, 18, 1) 2 +(15, 19, 1) 3 +(15, 20, 1) 3 +(15, 21, 1) 4 +(15, 22, 1) 4 +(15, 23, 1) 5 +(15, 24, 1) 6 +(15, 25, 1) 6 +(15, 26, 1) 7 +(15, 27, 1) 7 +(15, 28, 1) 8 +(15, 29, 1) 8 +(15, 30, 1) 9 +(15, 31, 1) 9 +(15, 32, 1) 10 +(15, 33, 1) 10 +(15, 34, 1) 11 +(15, 35, 1) 11 +(15, 36, 1) 11 +(15, 37, 1) 12 +(15, 38, 1) 12 +(15, 39, 1) 12 +(15, 40, 1) 13 +(15, 41, 1) 13 +(15, 42, 1) 13 +(15, 43, 1) 13 +(15, 44, 1) 13 +(15, 45, 1) 14 +(15, 46, 1) 14 +(15, 47, 1) 14 +(15, 48, 1) 14 +(15, 49, 1) 14 +(15, 50, 1) 14 +(15, 51, 1) 14 +(15, 52, 1) 14 +(15, 53, 1) 14 +(15, 54, 1) 14 +(15, 55, 1) 14 +(15, 56, 1) 14 +(15, 57, 1) 13 +(15, 58, 1) 13 +(15, 59, 1) 13 +(15, 60, 1) 13 +(15, 61, 1) 13 +(15, 62, 1) 12 +(15, 63, 1) 12 +(15, 64, 1) 12 +(15, 65, 1) 11 +(15, 66, 1) 11 +(15, 67, 1) 11 +(15, 68, 1) 10 +(15, 69, 1) 10 +(15, 70, 1) 9 +(15, 71, 1) 9 +(15, 72, 1) 8 +(15, 73, 1) 8 +(15, 74, 1) 7 +(15, 75, 1) 7 +(15, 76, 1) 6 +(15, 77, 1) 6 +(15, 78, 1) 5 +(15, 79, 1) 4 +(15, 80, 1) 4 +(15, 81, 1) 3 +(15, 82, 1) 3 +(15, 83, 1) 2 +(15, 84, 1) 1 +(15, 85, 1) 1 +(16, 14, 1) 0 +(16, 15, 1) 1 +(16, 16, 1) 1 +(16, 17, 1) 2 +(16, 18, 1) 2 +(16, 19, 1) 3 +(16, 20, 1) 4 +(16, 21, 1) 4 +(16, 22, 1) 5 +(16, 23, 1) 6 +(16, 24, 1) 6 +(16, 25, 1) 7 +(16, 26, 1) 7 +(16, 27, 1) 8 +(16, 28, 1) 9 +(16, 29, 1) 9 +(16, 30, 1) 10 +(16, 31, 1) 10 +(16, 32, 1) 11 +(16, 33, 1) 11 +(16, 34, 1) 11 +(16, 35, 1) 12 +(16, 36, 1) 12 +(16, 37, 1) 13 +(16, 38, 1) 13 +(16, 39, 1) 13 +(16, 40, 1) 13 +(16, 41, 1) 14 +(16, 42, 1) 14 +(16, 43, 1) 14 +(16, 44, 1) 14 +(16, 45, 1) 15 +(16, 46, 1) 15 +(16, 47, 1) 15 +(16, 48, 1) 15 +(16, 49, 1) 15 +(16, 50, 1) 15 +(16, 51, 1) 15 +(16, 52, 1) 15 +(16, 53, 1) 15 +(16, 54, 1) 15 +(16, 55, 1) 15 +(16, 56, 1) 15 +(16, 57, 1) 14 +(16, 58, 1) 14 +(16, 59, 1) 14 +(16, 60, 1) 14 +(16, 61, 1) 13 +(16, 62, 1) 13 +(16, 63, 1) 13 +(16, 64, 1) 13 +(16, 65, 1) 12 +(16, 66, 1) 12 +(16, 67, 1) 11 +(16, 68, 1) 11 +(16, 69, 1) 11 +(16, 70, 1) 10 +(16, 71, 1) 10 +(16, 72, 1) 9 +(16, 73, 1) 9 +(16, 74, 1) 8 +(16, 75, 1) 7 +(16, 76, 1) 7 +(16, 77, 1) 6 +(16, 78, 1) 6 +(16, 79, 1) 5 +(16, 80, 1) 4 +(16, 81, 1) 4 +(16, 82, 1) 3 +(16, 83, 1) 2 +(16, 84, 1) 2 +(16, 85, 1) 1 +(16, 86, 1) 1 +(16, 87, 1) 0 +(17, 14, 1) 1 +(17, 15, 1) 1 +(17, 16, 1) 2 +(17, 17, 1) 3 +(17, 18, 1) 3 +(17, 19, 1) 4 +(17, 20, 1) 5 +(17, 21, 1) 5 +(17, 22, 1) 6 +(17, 23, 1) 6 +(17, 24, 1) 7 +(17, 25, 1) 8 +(17, 26, 1) 8 +(17, 27, 1) 9 +(17, 28, 1) 9 +(17, 29, 1) 10 +(17, 30, 1) 10 +(17, 31, 1) 11 +(17, 32, 1) 11 +(17, 33, 1) 12 +(17, 34, 1) 12 +(17, 35, 1) 13 +(17, 36, 1) 13 +(17, 37, 1) 13 +(17, 38, 1) 14 +(17, 39, 1) 14 +(17, 40, 1) 14 +(17, 41, 1) 15 +(17, 42, 1) 15 +(17, 43, 1) 15 +(17, 44, 1) 15 +(17, 45, 1) 16 +(17, 46, 1) 16 +(17, 47, 1) 16 +(17, 48, 1) 16 +(17, 49, 1) 16 +(17, 50, 1) 16 +(17, 51, 1) 16 +(17, 52, 1) 16 +(17, 53, 1) 16 +(17, 54, 1) 16 +(17, 55, 1) 16 +(17, 56, 1) 16 +(17, 57, 1) 15 +(17, 58, 1) 15 +(17, 59, 1) 15 +(17, 60, 1) 15 +(17, 61, 1) 14 +(17, 62, 1) 14 +(17, 63, 1) 14 +(17, 64, 1) 13 +(17, 65, 1) 13 +(17, 66, 1) 13 +(17, 67, 1) 12 +(17, 68, 1) 12 +(17, 69, 1) 11 +(17, 70, 1) 11 +(17, 71, 1) 10 +(17, 72, 1) 10 +(17, 73, 1) 9 +(17, 74, 1) 9 +(17, 75, 1) 8 +(17, 76, 1) 8 +(17, 77, 1) 7 +(17, 78, 1) 6 +(17, 79, 1) 6 +(17, 80, 1) 5 +(17, 81, 1) 5 +(17, 82, 1) 4 +(17, 83, 1) 3 +(17, 84, 1) 3 +(17, 85, 1) 2 +(17, 86, 1) 1 +(17, 87, 1) 1 +(18, 14, 1) 1 +(18, 15, 1) 2 +(18, 16, 1) 3 +(18, 17, 1) 3 +(18, 18, 1) 4 +(18, 19, 1) 5 +(18, 20, 1) 5 +(18, 21, 1) 6 +(18, 22, 1) 7 +(18, 23, 1) 7 +(18, 24, 1) 8 +(18, 25, 1) 8 +(18, 26, 1) 9 +(18, 27, 1) 10 +(18, 28, 1) 10 +(18, 29, 1) 11 +(18, 30, 1) 11 +(18, 31, 1) 12 +(18, 32, 1) 12 +(18, 33, 1) 13 +(18, 34, 1) 13 +(18, 35, 1) 14 +(18, 36, 1) 14 +(18, 37, 1) 14 +(18, 38, 1) 15 +(18, 39, 1) 15 +(18, 40, 1) 15 +(18, 41, 1) 16 +(18, 42, 1) 16 +(18, 43, 1) 16 +(18, 44, 1) 16 +(18, 45, 1) 17 +(18, 46, 1) 17 +(18, 47, 1) 17 +(18, 48, 1) 17 +(18, 49, 1) 17 +(18, 50, 1) 17 +(18, 51, 1) 17 +(18, 52, 1) 17 +(18, 53, 1) 17 +(18, 54, 1) 17 +(18, 55, 1) 17 +(18, 56, 1) 17 +(18, 57, 1) 16 +(18, 58, 1) 16 +(18, 59, 1) 16 +(18, 60, 1) 16 +(18, 61, 1) 15 +(18, 62, 1) 15 +(18, 63, 1) 15 +(18, 64, 1) 14 +(18, 65, 1) 14 +(18, 66, 1) 14 +(18, 67, 1) 13 +(18, 68, 1) 13 +(18, 69, 1) 12 +(18, 70, 1) 12 +(18, 71, 1) 11 +(18, 72, 1) 11 +(18, 73, 1) 10 +(18, 74, 1) 10 +(18, 75, 1) 9 +(18, 76, 1) 8 +(18, 77, 1) 8 +(18, 78, 1) 7 +(18, 79, 1) 7 +(18, 80, 1) 6 +(18, 81, 1) 5 +(18, 82, 1) 5 +(18, 83, 1) 4 +(18, 84, 1) 3 +(18, 85, 1) 3 +(18, 86, 1) 2 +(18, 87, 1) 1 +(19, 14, 1) 2 +(19, 15, 1) 3 +(19, 16, 1) 3 +(19, 17, 1) 4 +(19, 18, 1) 5 +(19, 19, 1) 5 +(19, 20, 1) 6 +(19, 21, 1) 7 +(19, 22, 1) 7 +(19, 23, 1) 8 +(19, 24, 1) 9 +(19, 25, 1) 9 +(19, 26, 1) 10 +(19, 27, 1) 10 +(19, 28, 1) 11 +(19, 29, 1) 12 +(19, 30, 1) 12 +(19, 31, 1) 13 +(19, 32, 1) 13 +(19, 33, 1) 14 +(19, 34, 1) 14 +(19, 35, 1) 15 +(19, 36, 1) 15 +(19, 37, 1) 15 +(19, 38, 1) 16 +(19, 39, 1) 16 +(19, 40, 1) 16 +(19, 41, 1) 17 +(19, 42, 1) 17 +(19, 43, 1) 17 +(19, 44, 1) 17 +(19, 45, 1) 18 +(19, 46, 1) 18 +(19, 47, 1) 18 +(19, 48, 1) 18 +(19, 49, 1) 18 +(19, 50, 1) 18 +(19, 51, 1) 18 +(19, 52, 1) 18 +(19, 53, 1) 18 +(19, 54, 1) 18 +(19, 55, 1) 18 +(19, 56, 1) 18 +(19, 57, 1) 17 +(19, 58, 1) 17 +(19, 59, 1) 17 +(19, 60, 1) 17 +(19, 61, 1) 16 +(19, 62, 1) 16 +(19, 63, 1) 16 +(19, 64, 1) 15 +(19, 65, 1) 15 +(19, 66, 1) 15 +(19, 67, 1) 14 +(19, 68, 1) 14 +(19, 69, 1) 13 +(19, 70, 1) 13 +(19, 71, 1) 12 +(19, 72, 1) 12 +(19, 73, 1) 11 +(19, 74, 1) 10 +(19, 75, 1) 10 +(19, 76, 1) 9 +(19, 77, 1) 9 +(19, 78, 1) 8 +(19, 79, 1) 7 +(19, 80, 1) 7 +(19, 81, 1) 6 +(19, 82, 1) 5 +(19, 83, 1) 5 +(19, 84, 1) 4 +(19, 85, 1) 3 +(19, 86, 1) 3 +(19, 87, 1) 2 +(20, 14, 1) 3 +(20, 15, 1) 3 +(20, 16, 1) 4 +(20, 17, 1) 5 +(20, 18, 1) 5 +(20, 19, 1) 6 +(20, 20, 1) 7 +(20, 21, 1) 7 +(20, 22, 1) 8 +(20, 23, 1) 9 +(20, 24, 1) 9 +(20, 25, 1) 10 +(20, 26, 1) 11 +(20, 27, 1) 11 +(20, 28, 1) 12 +(20, 29, 1) 12 +(20, 30, 1) 13 +(20, 31, 1) 14 +(20, 32, 1) 14 +(20, 33, 1) 15 +(20, 34, 1) 15 +(20, 35, 1) 15 +(20, 36, 1) 16 +(20, 37, 1) 16 +(20, 38, 1) 17 +(20, 39, 1) 17 +(20, 40, 1) 17 +(20, 41, 1) 18 +(20, 42, 1) 18 +(20, 43, 1) 18 +(20, 44, 1) 18 +(20, 45, 1) 19 +(20, 46, 1) 19 +(20, 47, 1) 19 +(20, 48, 1) 19 +(20, 49, 1) 19 +(20, 50, 1) 19 +(20, 51, 1) 19 +(20, 52, 1) 19 +(20, 53, 1) 19 +(20, 54, 1) 19 +(20, 55, 1) 19 +(20, 56, 1) 19 +(20, 57, 1) 18 +(20, 58, 1) 18 +(20, 59, 1) 18 +(20, 60, 1) 18 +(20, 61, 1) 17 +(20, 62, 1) 17 +(20, 63, 1) 17 +(20, 64, 1) 16 +(20, 65, 1) 16 +(20, 66, 1) 15 +(20, 67, 1) 15 +(20, 68, 1) 15 +(20, 69, 1) 14 +(20, 70, 1) 14 +(20, 71, 1) 13 +(20, 72, 1) 12 +(20, 73, 1) 12 +(20, 74, 1) 11 +(20, 75, 1) 11 +(20, 76, 1) 10 +(20, 77, 1) 9 +(20, 78, 1) 9 +(20, 79, 1) 8 +(20, 80, 1) 7 +(20, 81, 1) 7 +(20, 82, 1) 6 +(20, 83, 1) 5 +(20, 84, 1) 5 +(20, 85, 1) 4 +(20, 86, 1) 3 +(20, 87, 1) 3 +(21, 9, 1) 0 +(21, 10, 1) 0 +(21, 11, 1) 1 +(21, 12, 1) 1 +(21, 13, 1) 2 +(21, 14, 1) 3 +(21, 15, 1) 4 +(21, 16, 1) 4 +(21, 17, 1) 5 +(21, 18, 1) 6 +(21, 19, 1) 7 +(21, 20, 1) 7 +(21, 21, 1) 8 +(21, 22, 1) 9 +(21, 23, 1) 9 +(21, 24, 1) 10 +(21, 25, 1) 11 +(21, 26, 1) 11 +(21, 27, 1) 12 +(21, 28, 1) 13 +(21, 29, 1) 13 +(21, 30, 1) 14 +(21, 31, 1) 14 +(21, 32, 1) 15 +(21, 33, 1) 15 +(21, 34, 1) 16 +(21, 35, 1) 16 +(21, 36, 1) 17 +(21, 37, 1) 17 +(21, 38, 1) 18 +(21, 39, 1) 18 +(21, 40, 1) 18 +(21, 41, 1) 19 +(21, 42, 1) 19 +(21, 43, 1) 19 +(21, 44, 1) 19 +(21, 45, 1) 20 +(21, 46, 1) 20 +(21, 47, 1) 20 +(21, 48, 1) 20 +(21, 49, 1) 20 +(21, 50, 1) 20 +(21, 51, 1) 20 +(21, 52, 1) 20 +(21, 53, 1) 20 +(21, 54, 1) 20 +(21, 55, 1) 20 +(21, 56, 1) 20 +(21, 57, 1) 19 +(21, 58, 1) 19 +(21, 59, 1) 19 +(21, 60, 1) 19 +(21, 61, 1) 18 +(21, 62, 1) 18 +(21, 63, 1) 18 +(21, 64, 1) 17 +(21, 65, 1) 17 +(21, 66, 1) 16 +(21, 67, 1) 16 +(21, 68, 1) 15 +(21, 69, 1) 15 +(21, 70, 1) 14 +(21, 71, 1) 14 +(21, 72, 1) 13 +(21, 73, 1) 13 +(21, 74, 1) 12 +(21, 75, 1) 11 +(21, 76, 1) 11 +(21, 77, 1) 10 +(21, 78, 1) 9 +(21, 79, 1) 9 +(21, 80, 1) 8 +(21, 81, 1) 7 +(21, 82, 1) 7 +(21, 83, 1) 6 +(21, 84, 1) 5 +(21, 85, 1) 4 +(21, 86, 1) 4 +(21, 87, 1) 3 +(21, 88, 1) 2 +(21, 89, 1) 1 +(21, 90, 1) 1 +(21, 91, 1) 0 +(21, 92, 1) 0 +(22, 9, 1) 0 +(22, 10, 1) 1 +(22, 11, 1) 1 +(22, 12, 1) 2 +(22, 13, 1) 3 +(22, 14, 1) 4 +(22, 15, 1) 4 +(22, 16, 1) 5 +(22, 17, 1) 6 +(22, 18, 1) 7 +(22, 19, 1) 7 +(22, 20, 1) 8 +(22, 21, 1) 9 +(22, 22, 1) 9 +(22, 23, 1) 10 +(22, 24, 1) 11 +(22, 25, 1) 12 +(22, 26, 1) 12 +(22, 27, 1) 13 +(22, 28, 1) 13 +(22, 29, 1) 14 +(22, 30, 1) 15 +(22, 31, 1) 15 +(22, 32, 1) 16 +(22, 33, 1) 16 +(22, 34, 1) 17 +(22, 35, 1) 17 +(22, 36, 1) 18 +(22, 37, 1) 18 +(22, 38, 1) 18 +(22, 39, 1) 19 +(22, 40, 1) 19 +(22, 41, 1) 20 +(22, 42, 1) 20 +(22, 43, 1) 20 +(22, 44, 1) 20 +(22, 45, 1) 20 +(22, 46, 1) 21 +(22, 47, 1) 21 +(22, 48, 1) 21 +(22, 49, 1) 21 +(22, 50, 1) 21 +(22, 51, 1) 21 +(22, 52, 1) 21 +(22, 53, 1) 21 +(22, 54, 1) 21 +(22, 55, 1) 21 +(22, 56, 1) 20 +(22, 57, 1) 20 +(22, 58, 1) 20 +(22, 59, 1) 20 +(22, 60, 1) 20 +(22, 61, 1) 19 +(22, 62, 1) 19 +(22, 63, 1) 18 +(22, 64, 1) 18 +(22, 65, 1) 18 +(22, 66, 1) 17 +(22, 67, 1) 17 +(22, 68, 1) 16 +(22, 69, 1) 16 +(22, 70, 1) 15 +(22, 71, 1) 15 +(22, 72, 1) 14 +(22, 73, 1) 13 +(22, 74, 1) 13 +(22, 75, 1) 12 +(22, 76, 1) 12 +(22, 77, 1) 11 +(22, 78, 1) 10 +(22, 79, 1) 9 +(22, 80, 1) 9 +(22, 81, 1) 8 +(22, 82, 1) 7 +(22, 83, 1) 7 +(22, 84, 1) 6 +(22, 85, 1) 5 +(22, 86, 1) 4 +(22, 87, 1) 4 +(22, 88, 1) 3 +(22, 89, 1) 2 +(22, 90, 1) 1 +(22, 91, 1) 1 +(22, 92, 1) 0 +(23, 9, 1) 0 +(23, 10, 1) 1 +(23, 11, 1) 2 +(23, 12, 1) 3 +(23, 13, 1) 3 +(23, 14, 1) 4 +(23, 15, 1) 5 +(23, 16, 1) 6 +(23, 17, 1) 7 +(23, 18, 1) 7 +(23, 19, 1) 8 +(23, 20, 1) 9 +(23, 21, 1) 9 +(23, 22, 1) 10 +(23, 23, 1) 11 +(23, 24, 1) 12 +(23, 25, 1) 12 +(23, 26, 1) 13 +(23, 27, 1) 14 +(23, 28, 1) 14 +(23, 29, 1) 15 +(23, 30, 1) 15 +(23, 31, 1) 16 +(23, 32, 1) 17 +(23, 33, 1) 17 +(23, 34, 1) 18 +(23, 35, 1) 18 +(23, 36, 1) 19 +(23, 37, 1) 19 +(23, 38, 1) 19 +(23, 39, 1) 20 +(23, 40, 1) 20 +(23, 41, 1) 20 +(23, 42, 1) 21 +(23, 43, 1) 21 +(23, 44, 1) 21 +(23, 45, 1) 21 +(23, 46, 1) 22 +(23, 47, 1) 22 +(23, 48, 1) 22 +(23, 49, 1) 22 +(23, 50, 1) 22 +(23, 51, 1) 22 +(23, 52, 1) 22 +(23, 53, 1) 22 +(23, 54, 1) 22 +(23, 55, 1) 22 +(23, 56, 1) 21 +(23, 57, 1) 21 +(23, 58, 1) 21 +(23, 59, 1) 21 +(23, 60, 1) 20 +(23, 61, 1) 20 +(23, 62, 1) 20 +(23, 63, 1) 19 +(23, 64, 1) 19 +(23, 65, 1) 19 +(23, 66, 1) 18 +(23, 67, 1) 18 +(23, 68, 1) 17 +(23, 69, 1) 17 +(23, 70, 1) 16 +(23, 71, 1) 15 +(23, 72, 1) 15 +(23, 73, 1) 14 +(23, 74, 1) 14 +(23, 75, 1) 13 +(23, 76, 1) 12 +(23, 77, 1) 12 +(23, 78, 1) 11 +(23, 79, 1) 10 +(23, 80, 1) 9 +(23, 81, 1) 9 +(23, 82, 1) 8 +(23, 83, 1) 7 +(23, 84, 1) 7 +(23, 85, 1) 6 +(23, 86, 1) 5 +(23, 87, 1) 4 +(23, 88, 1) 3 +(23, 89, 1) 3 +(23, 90, 1) 2 +(23, 91, 1) 1 +(23, 92, 1) 0 +(24, 9, 1) 1 +(24, 10, 1) 2 +(24, 11, 1) 2 +(24, 12, 1) 3 +(24, 13, 1) 4 +(24, 14, 1) 5 +(24, 15, 1) 6 +(24, 16, 1) 6 +(24, 17, 1) 7 +(24, 18, 1) 8 +(24, 19, 1) 9 +(24, 20, 1) 9 +(24, 21, 1) 10 +(24, 22, 1) 11 +(24, 23, 1) 12 +(24, 24, 1) 12 +(24, 25, 1) 13 +(24, 26, 1) 14 +(24, 27, 1) 14 +(24, 28, 1) 15 +(24, 29, 1) 16 +(24, 30, 1) 16 +(24, 31, 1) 17 +(24, 32, 1) 17 +(24, 33, 1) 18 +(24, 34, 1) 18 +(24, 35, 1) 19 +(24, 36, 1) 19 +(24, 37, 1) 20 +(24, 38, 1) 20 +(24, 39, 1) 21 +(24, 40, 1) 21 +(24, 41, 1) 21 +(24, 42, 1) 22 +(24, 43, 1) 22 +(24, 44, 1) 22 +(24, 45, 1) 22 +(24, 46, 1) 23 +(24, 47, 1) 23 +(24, 48, 1) 23 +(24, 49, 1) 23 +(24, 50, 1) 23 +(24, 51, 1) 23 +(24, 52, 1) 23 +(24, 53, 1) 23 +(24, 54, 1) 23 +(24, 55, 1) 23 +(24, 56, 1) 22 +(24, 57, 1) 22 +(24, 58, 1) 22 +(24, 59, 1) 22 +(24, 60, 1) 21 +(24, 61, 1) 21 +(24, 62, 1) 21 +(24, 63, 1) 20 +(24, 64, 1) 20 +(24, 65, 1) 19 +(24, 66, 1) 19 +(24, 67, 1) 18 +(24, 68, 1) 18 +(24, 69, 1) 17 +(24, 70, 1) 17 +(24, 71, 1) 16 +(24, 72, 1) 16 +(24, 73, 1) 15 +(24, 74, 1) 14 +(24, 75, 1) 14 +(24, 76, 1) 13 +(24, 77, 1) 12 +(24, 78, 1) 12 +(24, 79, 1) 11 +(24, 80, 1) 10 +(24, 81, 1) 9 +(24, 82, 1) 9 +(24, 83, 1) 8 +(24, 84, 1) 7 +(24, 85, 1) 6 +(24, 86, 1) 6 +(24, 87, 1) 5 +(24, 88, 1) 4 +(24, 89, 1) 3 +(24, 90, 1) 2 +(24, 91, 1) 2 +(24, 92, 1) 1 +(25, 9, 1) 1 +(25, 10, 1) 2 +(25, 11, 1) 3 +(25, 12, 1) 4 +(25, 13, 1) 5 +(25, 14, 1) 5 +(25, 15, 1) 6 +(25, 16, 1) 7 +(25, 17, 1) 8 +(25, 18, 1) 9 +(25, 19, 1) 9 +(25, 20, 1) 10 +(25, 21, 1) 11 +(25, 22, 1) 12 +(25, 23, 1) 12 +(25, 24, 1) 13 +(25, 25, 1) 14 +(25, 26, 1) 14 +(25, 27, 1) 15 +(25, 28, 1) 16 +(25, 29, 1) 16 +(25, 30, 1) 17 +(25, 31, 1) 18 +(25, 32, 1) 18 +(25, 33, 1) 19 +(25, 34, 1) 19 +(25, 35, 1) 20 +(25, 36, 1) 20 +(25, 37, 1) 21 +(25, 38, 1) 21 +(25, 39, 1) 22 +(25, 40, 1) 22 +(25, 41, 1) 22 +(25, 42, 1) 23 +(25, 43, 1) 23 +(25, 44, 1) 23 +(25, 45, 1) 23 +(25, 46, 1) 24 +(25, 47, 1) 24 +(25, 48, 1) 24 +(25, 49, 1) 24 +(25, 50, 1) 24 +(25, 51, 1) 24 +(25, 52, 1) 24 +(25, 53, 1) 24 +(25, 54, 1) 24 +(25, 55, 1) 24 +(25, 56, 1) 23 +(25, 57, 1) 23 +(25, 58, 1) 23 +(25, 59, 1) 23 +(25, 60, 1) 22 +(25, 61, 1) 22 +(25, 62, 1) 22 +(25, 63, 1) 21 +(25, 64, 1) 21 +(25, 65, 1) 20 +(25, 66, 1) 20 +(25, 67, 1) 19 +(25, 68, 1) 19 +(25, 69, 1) 18 +(25, 70, 1) 18 +(25, 71, 1) 17 +(25, 72, 1) 16 +(25, 73, 1) 16 +(25, 74, 1) 15 +(25, 75, 1) 14 +(25, 76, 1) 14 +(25, 77, 1) 13 +(25, 78, 1) 12 +(25, 79, 1) 12 +(25, 80, 1) 11 +(25, 81, 1) 10 +(25, 82, 1) 9 +(25, 83, 1) 9 +(25, 84, 1) 8 +(25, 85, 1) 7 +(25, 86, 1) 6 +(25, 87, 1) 5 +(25, 88, 1) 5 +(25, 89, 1) 4 +(25, 90, 1) 3 +(25, 91, 1) 2 +(25, 92, 1) 1 +(26, 6, 1) 0 +(26, 7, 1) 0 +(26, 8, 1) 1 +(26, 9, 1) 2 +(26, 10, 1) 3 +(26, 11, 1) 3 +(26, 12, 1) 4 +(26, 13, 1) 5 +(26, 14, 1) 6 +(26, 15, 1) 7 +(26, 16, 1) 7 +(26, 17, 1) 8 +(26, 18, 1) 9 +(26, 19, 1) 10 +(26, 20, 1) 11 +(26, 21, 1) 11 +(26, 22, 1) 12 +(26, 23, 1) 13 +(26, 24, 1) 14 +(26, 25, 1) 14 +(26, 26, 1) 15 +(26, 27, 1) 16 +(26, 28, 1) 16 +(26, 29, 1) 17 +(26, 30, 1) 18 +(26, 31, 1) 18 +(26, 32, 1) 19 +(26, 33, 1) 19 +(26, 34, 1) 20 +(26, 35, 1) 21 +(26, 36, 1) 21 +(26, 37, 1) 22 +(26, 38, 1) 22 +(26, 39, 1) 22 +(26, 40, 1) 23 +(26, 41, 1) 23 +(26, 42, 1) 24 +(26, 43, 1) 24 +(26, 44, 1) 24 +(26, 45, 1) 24 +(26, 46, 1) 25 +(26, 47, 1) 25 +(26, 48, 1) 25 +(26, 49, 1) 25 +(26, 50, 1) 25 +(26, 51, 1) 25 +(26, 52, 1) 25 +(26, 53, 1) 25 +(26, 54, 1) 25 +(26, 55, 1) 25 +(26, 56, 1) 24 +(26, 57, 1) 24 +(26, 58, 1) 24 +(26, 59, 1) 24 +(26, 60, 1) 23 +(26, 61, 1) 23 +(26, 62, 1) 22 +(26, 63, 1) 22 +(26, 64, 1) 22 +(26, 65, 1) 21 +(26, 66, 1) 21 +(26, 67, 1) 20 +(26, 68, 1) 19 +(26, 69, 1) 19 +(26, 70, 1) 18 +(26, 71, 1) 18 +(26, 72, 1) 17 +(26, 73, 1) 16 +(26, 74, 1) 16 +(26, 75, 1) 15 +(26, 76, 1) 14 +(26, 77, 1) 14 +(26, 78, 1) 13 +(26, 79, 1) 12 +(26, 80, 1) 11 +(26, 81, 1) 11 +(26, 82, 1) 10 +(26, 83, 1) 9 +(26, 84, 1) 8 +(26, 85, 1) 7 +(26, 86, 1) 7 +(26, 87, 1) 6 +(26, 88, 1) 5 +(26, 89, 1) 4 +(26, 90, 1) 3 +(26, 91, 1) 3 +(26, 92, 1) 2 +(26, 93, 1) 1 +(26, 94, 1) 0 +(26, 95, 1) 0 +(27, 6, 1) 0 +(27, 7, 1) 0 +(27, 8, 1) 1 +(27, 9, 1) 2 +(27, 10, 1) 3 +(27, 11, 1) 4 +(27, 12, 1) 5 +(27, 13, 1) 6 +(27, 14, 1) 6 +(27, 15, 1) 7 +(27, 16, 1) 8 +(27, 17, 1) 9 +(27, 18, 1) 10 +(27, 19, 1) 10 +(27, 20, 1) 11 +(27, 21, 1) 12 +(27, 22, 1) 13 +(27, 23, 1) 14 +(27, 24, 1) 14 +(27, 25, 1) 15 +(27, 26, 1) 16 +(27, 27, 1) 16 +(27, 28, 1) 17 +(27, 29, 1) 18 +(27, 30, 1) 18 +(27, 31, 1) 19 +(27, 32, 1) 20 +(27, 33, 1) 20 +(27, 34, 1) 21 +(27, 35, 1) 21 +(27, 36, 1) 22 +(27, 37, 1) 22 +(27, 38, 1) 23 +(27, 39, 1) 23 +(27, 40, 1) 24 +(27, 41, 1) 24 +(27, 42, 1) 25 +(27, 43, 1) 25 +(27, 44, 1) 25 +(27, 45, 1) 25 +(27, 46, 1) 26 +(27, 47, 1) 26 +(27, 48, 1) 26 +(27, 49, 1) 26 +(27, 50, 1) 26 +(27, 51, 1) 26 +(27, 52, 1) 26 +(27, 53, 1) 26 +(27, 54, 1) 26 +(27, 55, 1) 26 +(27, 56, 1) 25 +(27, 57, 1) 25 +(27, 58, 1) 25 +(27, 59, 1) 25 +(27, 60, 1) 24 +(27, 61, 1) 24 +(27, 62, 1) 23 +(27, 63, 1) 23 +(27, 64, 1) 22 +(27, 65, 1) 22 +(27, 66, 1) 21 +(27, 67, 1) 21 +(27, 68, 1) 20 +(27, 69, 1) 20 +(27, 70, 1) 19 +(27, 71, 1) 18 +(27, 72, 1) 18 +(27, 73, 1) 17 +(27, 74, 1) 16 +(27, 75, 1) 16 +(27, 76, 1) 15 +(27, 77, 1) 14 +(27, 78, 1) 14 +(27, 79, 1) 13 +(27, 80, 1) 12 +(27, 81, 1) 11 +(27, 82, 1) 10 +(27, 83, 1) 10 +(27, 84, 1) 9 +(27, 85, 1) 8 +(27, 86, 1) 7 +(27, 87, 1) 6 +(27, 88, 1) 6 +(27, 89, 1) 5 +(27, 90, 1) 4 +(27, 91, 1) 3 +(27, 92, 1) 2 +(27, 93, 1) 1 +(27, 94, 1) 0 +(27, 95, 1) 0 +(28, 6, 1) 0 +(28, 7, 1) 1 +(28, 8, 1) 2 +(28, 9, 1) 3 +(28, 10, 1) 4 +(28, 11, 1) 4 +(28, 12, 1) 5 +(28, 13, 1) 6 +(28, 14, 1) 7 +(28, 15, 1) 8 +(28, 16, 1) 9 +(28, 17, 1) 9 +(28, 18, 1) 10 +(28, 19, 1) 11 +(28, 20, 1) 12 +(28, 21, 1) 13 +(28, 22, 1) 13 +(28, 23, 1) 14 +(28, 24, 1) 15 +(28, 25, 1) 16 +(28, 26, 1) 16 +(28, 27, 1) 17 +(28, 28, 1) 18 +(28, 29, 1) 19 +(28, 30, 1) 19 +(28, 31, 1) 20 +(28, 32, 1) 20 +(28, 33, 1) 21 +(28, 34, 1) 22 +(28, 35, 1) 22 +(28, 36, 1) 23 +(28, 37, 1) 23 +(28, 38, 1) 24 +(28, 39, 1) 24 +(28, 40, 1) 25 +(28, 41, 1) 25 +(28, 42, 1) 25 +(28, 43, 1) 26 +(28, 44, 1) 26 +(28, 45, 1) 26 +(28, 46, 1) 27 +(28, 47, 1) 27 +(28, 48, 1) 27 +(28, 49, 1) 27 +(28, 50, 1) 27 +(28, 51, 1) 27 +(28, 52, 1) 27 +(28, 53, 1) 27 +(28, 54, 1) 27 +(28, 55, 1) 27 +(28, 56, 1) 26 +(28, 57, 1) 26 +(28, 58, 1) 26 +(28, 59, 1) 25 +(28, 60, 1) 25 +(28, 61, 1) 25 +(28, 62, 1) 24 +(28, 63, 1) 24 +(28, 64, 1) 23 +(28, 65, 1) 23 +(28, 66, 1) 22 +(28, 67, 1) 22 +(28, 68, 1) 21 +(28, 69, 1) 20 +(28, 70, 1) 20 +(28, 71, 1) 19 +(28, 72, 1) 19 +(28, 73, 1) 18 +(28, 74, 1) 17 +(28, 75, 1) 16 +(28, 76, 1) 16 +(28, 77, 1) 15 +(28, 78, 1) 14 +(28, 79, 1) 13 +(28, 80, 1) 13 +(28, 81, 1) 12 +(28, 82, 1) 11 +(28, 83, 1) 10 +(28, 84, 1) 9 +(28, 85, 1) 9 +(28, 86, 1) 8 +(28, 87, 1) 7 +(28, 88, 1) 6 +(28, 89, 1) 5 +(28, 90, 1) 4 +(28, 91, 1) 4 +(28, 92, 1) 3 +(28, 93, 1) 2 +(28, 94, 1) 1 +(28, 95, 1) 0 +(29, 6, 1) 1 +(29, 7, 1) 1 +(29, 8, 1) 2 +(29, 9, 1) 3 +(29, 10, 1) 4 +(29, 11, 1) 5 +(29, 12, 1) 6 +(29, 13, 1) 7 +(29, 14, 1) 7 +(29, 15, 1) 8 +(29, 16, 1) 9 +(29, 17, 1) 10 +(29, 18, 1) 11 +(29, 19, 1) 12 +(29, 20, 1) 12 +(29, 21, 1) 13 +(29, 22, 1) 14 +(29, 23, 1) 15 +(29, 24, 1) 16 +(29, 25, 1) 16 +(29, 26, 1) 17 +(29, 27, 1) 18 +(29, 28, 1) 19 +(29, 29, 1) 19 +(29, 30, 1) 20 +(29, 31, 1) 21 +(29, 32, 1) 21 +(29, 33, 1) 22 +(29, 34, 1) 23 +(29, 35, 1) 23 +(29, 36, 1) 24 +(29, 37, 1) 24 +(29, 38, 1) 25 +(29, 39, 1) 25 +(29, 40, 1) 26 +(29, 41, 1) 26 +(29, 42, 1) 26 +(29, 43, 1) 27 +(29, 44, 1) 27 +(29, 45, 1) 27 +(29, 46, 1) 28 +(29, 47, 1) 28 +(29, 48, 1) 28 +(29, 49, 1) 28 +(29, 50, 1) 28 +(29, 51, 1) 28 +(29, 52, 1) 28 +(29, 53, 1) 28 +(29, 54, 1) 28 +(29, 55, 1) 28 +(29, 56, 1) 27 +(29, 57, 1) 27 +(29, 58, 1) 27 +(29, 59, 1) 26 +(29, 60, 1) 26 +(29, 61, 1) 26 +(29, 62, 1) 25 +(29, 63, 1) 25 +(29, 64, 1) 24 +(29, 65, 1) 24 +(29, 66, 1) 23 +(29, 67, 1) 23 +(29, 68, 1) 22 +(29, 69, 1) 21 +(29, 70, 1) 21 +(29, 71, 1) 20 +(29, 72, 1) 19 +(29, 73, 1) 19 +(29, 74, 1) 18 +(29, 75, 1) 17 +(29, 76, 1) 16 +(29, 77, 1) 16 +(29, 78, 1) 15 +(29, 79, 1) 14 +(29, 80, 1) 13 +(29, 81, 1) 12 +(29, 82, 1) 12 +(29, 83, 1) 11 +(29, 84, 1) 10 +(29, 85, 1) 9 +(29, 86, 1) 8 +(29, 87, 1) 7 +(29, 88, 1) 7 +(29, 89, 1) 6 +(29, 90, 1) 5 +(29, 91, 1) 4 +(29, 92, 1) 3 +(29, 93, 1) 2 +(29, 94, 1) 1 +(29, 95, 1) 1 +(30, 6, 1) 1 +(30, 7, 1) 2 +(30, 8, 1) 3 +(30, 9, 1) 4 +(30, 10, 1) 5 +(30, 11, 1) 5 +(30, 12, 1) 6 +(30, 13, 1) 7 +(30, 14, 1) 8 +(30, 15, 1) 9 +(30, 16, 1) 10 +(30, 17, 1) 11 +(30, 18, 1) 11 +(30, 19, 1) 12 +(30, 20, 1) 13 +(30, 21, 1) 14 +(30, 22, 1) 15 +(30, 23, 1) 15 +(30, 24, 1) 16 +(30, 25, 1) 17 +(30, 26, 1) 18 +(30, 27, 1) 19 +(30, 28, 1) 19 +(30, 29, 1) 20 +(30, 30, 1) 21 +(30, 31, 1) 21 +(30, 32, 1) 22 +(30, 33, 1) 23 +(30, 34, 1) 23 +(30, 35, 1) 24 +(30, 36, 1) 24 +(30, 37, 1) 25 +(30, 38, 1) 26 +(30, 39, 1) 26 +(30, 40, 1) 27 +(30, 41, 1) 27 +(30, 42, 1) 27 +(30, 43, 1) 28 +(30, 44, 1) 28 +(30, 45, 1) 28 +(30, 46, 1) 29 +(30, 47, 1) 29 +(30, 48, 1) 29 +(30, 49, 1) 29 +(30, 50, 1) 29 +(30, 51, 1) 29 +(30, 52, 1) 29 +(30, 53, 1) 29 +(30, 54, 1) 29 +(30, 55, 1) 29 +(30, 56, 1) 28 +(30, 57, 1) 28 +(30, 58, 1) 28 +(30, 59, 1) 27 +(30, 60, 1) 27 +(30, 61, 1) 27 +(30, 62, 1) 26 +(30, 63, 1) 26 +(30, 64, 1) 25 +(30, 65, 1) 24 +(30, 66, 1) 24 +(30, 67, 1) 23 +(30, 68, 1) 23 +(30, 69, 1) 22 +(30, 70, 1) 21 +(30, 71, 1) 21 +(30, 72, 1) 20 +(30, 73, 1) 19 +(30, 74, 1) 19 +(30, 75, 1) 18 +(30, 76, 1) 17 +(30, 77, 1) 16 +(30, 78, 1) 15 +(30, 79, 1) 15 +(30, 80, 1) 14 +(30, 81, 1) 13 +(30, 82, 1) 12 +(30, 83, 1) 11 +(30, 84, 1) 11 +(30, 85, 1) 10 +(30, 86, 1) 9 +(30, 87, 1) 8 +(30, 88, 1) 7 +(30, 89, 1) 6 +(30, 90, 1) 5 +(30, 91, 1) 5 +(30, 92, 1) 4 +(30, 93, 1) 3 +(30, 94, 1) 2 +(30, 95, 1) 1 +(31, 6, 1) 1 +(31, 7, 1) 2 +(31, 8, 1) 3 +(31, 9, 1) 4 +(31, 10, 1) 5 +(31, 11, 1) 6 +(31, 12, 1) 7 +(31, 13, 1) 7 +(31, 14, 1) 8 +(31, 15, 1) 9 +(31, 16, 1) 10 +(31, 17, 1) 11 +(31, 18, 1) 12 +(31, 19, 1) 13 +(31, 20, 1) 13 +(31, 21, 1) 14 +(31, 22, 1) 15 +(31, 23, 1) 16 +(31, 24, 1) 17 +(31, 25, 1) 18 +(31, 26, 1) 18 +(31, 27, 1) 19 +(31, 28, 1) 20 +(31, 29, 1) 21 +(31, 30, 1) 21 +(31, 31, 1) 22 +(31, 32, 1) 23 +(31, 33, 1) 23 +(31, 34, 1) 24 +(31, 35, 1) 25 +(31, 36, 1) 25 +(31, 37, 1) 26 +(31, 38, 1) 26 +(31, 39, 1) 27 +(31, 40, 1) 27 +(31, 41, 1) 28 +(31, 42, 1) 28 +(31, 43, 1) 29 +(31, 44, 1) 29 +(31, 45, 1) 29 +(31, 46, 1) 30 +(31, 47, 1) 30 +(31, 48, 1) 30 +(31, 49, 1) 30 +(31, 50, 1) 30 +(31, 51, 1) 30 +(31, 52, 1) 30 +(31, 53, 1) 30 +(31, 54, 1) 30 +(31, 55, 1) 30 +(31, 56, 1) 29 +(31, 57, 1) 29 +(31, 58, 1) 29 +(31, 59, 1) 28 +(31, 60, 1) 28 +(31, 61, 1) 27 +(31, 62, 1) 27 +(31, 63, 1) 26 +(31, 64, 1) 26 +(31, 65, 1) 25 +(31, 66, 1) 25 +(31, 67, 1) 24 +(31, 68, 1) 23 +(31, 69, 1) 23 +(31, 70, 1) 22 +(31, 71, 1) 21 +(31, 72, 1) 21 +(31, 73, 1) 20 +(31, 74, 1) 19 +(31, 75, 1) 18 +(31, 76, 1) 18 +(31, 77, 1) 17 +(31, 78, 1) 16 +(31, 79, 1) 15 +(31, 80, 1) 14 +(31, 81, 1) 13 +(31, 82, 1) 13 +(31, 83, 1) 12 +(31, 84, 1) 11 +(31, 85, 1) 10 +(31, 86, 1) 9 +(31, 87, 1) 8 +(31, 88, 1) 7 +(31, 89, 1) 7 +(31, 90, 1) 6 +(31, 91, 1) 5 +(31, 92, 1) 4 +(31, 93, 1) 3 +(31, 94, 1) 2 +(31, 95, 1) 1 +(32, 6, 1) 2 +(32, 7, 1) 2 +(32, 8, 1) 3 +(32, 9, 1) 4 +(32, 10, 1) 5 +(32, 11, 1) 6 +(32, 12, 1) 7 +(32, 13, 1) 8 +(32, 14, 1) 9 +(32, 15, 1) 10 +(32, 16, 1) 11 +(32, 17, 1) 11 +(32, 18, 1) 12 +(32, 19, 1) 13 +(32, 20, 1) 14 +(32, 21, 1) 15 +(32, 22, 1) 16 +(32, 23, 1) 17 +(32, 24, 1) 17 +(32, 25, 1) 18 +(32, 26, 1) 19 +(32, 27, 1) 20 +(32, 28, 1) 20 +(32, 29, 1) 21 +(32, 30, 1) 22 +(32, 31, 1) 23 +(32, 32, 1) 23 +(32, 33, 1) 24 +(32, 34, 1) 25 +(32, 35, 1) 25 +(32, 36, 1) 26 +(32, 37, 1) 27 +(32, 38, 1) 27 +(32, 39, 1) 28 +(32, 40, 1) 28 +(32, 41, 1) 29 +(32, 42, 1) 29 +(32, 43, 1) 30 +(32, 44, 1) 30 +(32, 45, 1) 30 +(32, 46, 1) 30 +(32, 47, 1) 31 +(32, 48, 1) 31 +(32, 49, 1) 31 +(32, 50, 1) 31 +(32, 51, 1) 31 +(32, 52, 1) 31 +(32, 53, 1) 31 +(32, 54, 1) 31 +(32, 55, 1) 30 +(32, 56, 1) 30 +(32, 57, 1) 30 +(32, 58, 1) 30 +(32, 59, 1) 29 +(32, 60, 1) 29 +(32, 61, 1) 28 +(32, 62, 1) 28 +(32, 63, 1) 27 +(32, 64, 1) 27 +(32, 65, 1) 26 +(32, 66, 1) 25 +(32, 67, 1) 25 +(32, 68, 1) 24 +(32, 69, 1) 23 +(32, 70, 1) 23 +(32, 71, 1) 22 +(32, 72, 1) 21 +(32, 73, 1) 20 +(32, 74, 1) 20 +(32, 75, 1) 19 +(32, 76, 1) 18 +(32, 77, 1) 17 +(32, 78, 1) 17 +(32, 79, 1) 16 +(32, 80, 1) 15 +(32, 81, 1) 14 +(32, 82, 1) 13 +(32, 83, 1) 12 +(32, 84, 1) 11 +(32, 85, 1) 11 +(32, 86, 1) 10 +(32, 87, 1) 9 +(32, 88, 1) 8 +(32, 89, 1) 7 +(32, 90, 1) 6 +(32, 91, 1) 5 +(32, 92, 1) 4 +(32, 93, 1) 3 +(32, 94, 1) 2 +(32, 95, 1) 2 +(33, 6, 1) 2 +(33, 7, 1) 3 +(33, 8, 1) 4 +(33, 9, 1) 5 +(33, 10, 1) 6 +(33, 11, 1) 7 +(33, 12, 1) 7 +(33, 13, 1) 8 +(33, 14, 1) 9 +(33, 15, 1) 10 +(33, 16, 1) 11 +(33, 17, 1) 12 +(33, 18, 1) 13 +(33, 19, 1) 14 +(33, 20, 1) 15 +(33, 21, 1) 15 +(33, 22, 1) 16 +(33, 23, 1) 17 +(33, 24, 1) 18 +(33, 25, 1) 19 +(33, 26, 1) 20 +(33, 27, 1) 20 +(33, 28, 1) 21 +(33, 29, 1) 22 +(33, 30, 1) 23 +(33, 31, 1) 23 +(33, 32, 1) 24 +(33, 33, 1) 25 +(33, 34, 1) 26 +(33, 35, 1) 26 +(33, 36, 1) 27 +(33, 37, 1) 27 +(33, 38, 1) 28 +(33, 39, 1) 29 +(33, 40, 1) 29 +(33, 41, 1) 30 +(33, 42, 1) 30 +(33, 43, 1) 30 +(33, 44, 1) 31 +(33, 45, 1) 31 +(33, 46, 1) 31 +(33, 47, 1) 32 +(33, 48, 1) 32 +(33, 49, 1) 32 +(33, 50, 1) 32 +(33, 51, 1) 32 +(33, 52, 1) 32 +(33, 53, 1) 32 +(33, 54, 1) 32 +(33, 55, 1) 31 +(33, 56, 1) 31 +(33, 57, 1) 31 +(33, 58, 1) 30 +(33, 59, 1) 30 +(33, 60, 1) 30 +(33, 61, 1) 29 +(33, 62, 1) 29 +(33, 63, 1) 28 +(33, 64, 1) 27 +(33, 65, 1) 27 +(33, 66, 1) 26 +(33, 67, 1) 26 +(33, 68, 1) 25 +(33, 69, 1) 24 +(33, 70, 1) 23 +(33, 71, 1) 23 +(33, 72, 1) 22 +(33, 73, 1) 21 +(33, 74, 1) 20 +(33, 75, 1) 20 +(33, 76, 1) 19 +(33, 77, 1) 18 +(33, 78, 1) 17 +(33, 79, 1) 16 +(33, 80, 1) 15 +(33, 81, 1) 15 +(33, 82, 1) 14 +(33, 83, 1) 13 +(33, 84, 1) 12 +(33, 85, 1) 11 +(33, 86, 1) 10 +(33, 87, 1) 9 +(33, 88, 1) 8 +(33, 89, 1) 7 +(33, 90, 1) 7 +(33, 91, 1) 6 +(33, 92, 1) 5 +(33, 93, 1) 4 +(33, 94, 1) 3 +(33, 95, 1) 2 +(34, 6, 1) 2 +(34, 7, 1) 3 +(34, 8, 1) 4 +(34, 9, 1) 5 +(34, 10, 1) 6 +(34, 11, 1) 7 +(34, 12, 1) 8 +(34, 13, 1) 9 +(34, 14, 1) 10 +(34, 15, 1) 11 +(34, 16, 1) 11 +(34, 17, 1) 12 +(34, 18, 1) 13 +(34, 19, 1) 14 +(34, 20, 1) 15 +(34, 21, 1) 16 +(34, 22, 1) 17 +(34, 23, 1) 18 +(34, 24, 1) 18 +(34, 25, 1) 19 +(34, 26, 1) 20 +(34, 27, 1) 21 +(34, 28, 1) 22 +(34, 29, 1) 23 +(34, 30, 1) 23 +(34, 31, 1) 24 +(34, 32, 1) 25 +(34, 33, 1) 26 +(34, 34, 1) 26 +(34, 35, 1) 27 +(34, 36, 1) 28 +(34, 37, 1) 28 +(34, 38, 1) 29 +(34, 39, 1) 29 +(34, 40, 1) 30 +(34, 41, 1) 30 +(34, 42, 1) 31 +(34, 43, 1) 31 +(34, 44, 1) 32 +(34, 45, 1) 32 +(34, 46, 1) 32 +(34, 47, 1) 33 +(34, 48, 1) 33 +(34, 49, 1) 33 +(34, 50, 1) 33 +(34, 51, 1) 33 +(34, 52, 1) 33 +(34, 53, 1) 33 +(34, 54, 1) 33 +(34, 55, 1) 32 +(34, 56, 1) 32 +(34, 57, 1) 32 +(34, 58, 1) 31 +(34, 59, 1) 31 +(34, 60, 1) 30 +(34, 61, 1) 30 +(34, 62, 1) 29 +(34, 63, 1) 29 +(34, 64, 1) 28 +(34, 65, 1) 28 +(34, 66, 1) 27 +(34, 67, 1) 26 +(34, 68, 1) 26 +(34, 69, 1) 25 +(34, 70, 1) 24 +(34, 71, 1) 23 +(34, 72, 1) 23 +(34, 73, 1) 22 +(34, 74, 1) 21 +(34, 75, 1) 20 +(34, 76, 1) 19 +(34, 77, 1) 18 +(34, 78, 1) 18 +(34, 79, 1) 17 +(34, 80, 1) 16 +(34, 81, 1) 15 +(34, 82, 1) 14 +(34, 83, 1) 13 +(34, 84, 1) 12 +(34, 85, 1) 11 +(34, 86, 1) 11 +(34, 87, 1) 10 +(34, 88, 1) 9 +(34, 89, 1) 8 +(34, 90, 1) 7 +(34, 91, 1) 6 +(34, 92, 1) 5 +(34, 93, 1) 4 +(34, 94, 1) 3 +(34, 95, 1) 2 +(35, 6, 1) 3 +(35, 7, 1) 4 +(35, 8, 1) 5 +(35, 9, 1) 6 +(35, 10, 1) 6 +(35, 11, 1) 7 +(35, 12, 1) 8 +(35, 13, 1) 9 +(35, 14, 1) 10 +(35, 15, 1) 11 +(35, 16, 1) 12 +(35, 17, 1) 13 +(35, 18, 1) 14 +(35, 19, 1) 15 +(35, 20, 1) 16 +(35, 21, 1) 16 +(35, 22, 1) 17 +(35, 23, 1) 18 +(35, 24, 1) 19 +(35, 25, 1) 20 +(35, 26, 1) 21 +(35, 27, 1) 21 +(35, 28, 1) 22 +(35, 29, 1) 23 +(35, 30, 1) 24 +(35, 31, 1) 25 +(35, 32, 1) 25 +(35, 33, 1) 26 +(35, 34, 1) 27 +(35, 35, 1) 28 +(35, 36, 1) 28 +(35, 37, 1) 29 +(35, 38, 1) 30 +(35, 39, 1) 30 +(35, 40, 1) 31 +(35, 41, 1) 31 +(35, 42, 1) 32 +(35, 43, 1) 32 +(35, 44, 1) 33 +(35, 45, 1) 33 +(35, 46, 1) 33 +(35, 47, 1) 34 +(35, 48, 1) 34 +(35, 49, 1) 34 +(35, 50, 1) 34 +(35, 51, 1) 34 +(35, 52, 1) 34 +(35, 53, 1) 34 +(35, 54, 1) 34 +(35, 55, 1) 33 +(35, 56, 1) 33 +(35, 57, 1) 33 +(35, 58, 1) 32 +(35, 59, 1) 32 +(35, 60, 1) 31 +(35, 61, 1) 31 +(35, 62, 1) 30 +(35, 63, 1) 30 +(35, 64, 1) 29 +(35, 65, 1) 28 +(35, 66, 1) 28 +(35, 67, 1) 27 +(35, 68, 1) 26 +(35, 69, 1) 25 +(35, 70, 1) 25 +(35, 71, 1) 24 +(35, 72, 1) 23 +(35, 73, 1) 22 +(35, 74, 1) 21 +(35, 75, 1) 21 +(35, 76, 1) 20 +(35, 77, 1) 19 +(35, 78, 1) 18 +(35, 79, 1) 17 +(35, 80, 1) 16 +(35, 81, 1) 16 +(35, 82, 1) 15 +(35, 83, 1) 14 +(35, 84, 1) 13 +(35, 85, 1) 12 +(35, 86, 1) 11 +(35, 87, 1) 10 +(35, 88, 1) 9 +(35, 89, 1) 8 +(35, 90, 1) 7 +(35, 91, 1) 6 +(35, 92, 1) 6 +(35, 93, 1) 5 +(35, 94, 1) 4 +(35, 95, 1) 3 +(36, 4, 1) 1 +(36, 5, 1) 2 +(36, 6, 1) 3 +(36, 7, 1) 4 +(36, 8, 1) 5 +(36, 9, 1) 6 +(36, 10, 1) 7 +(36, 11, 1) 8 +(36, 12, 1) 8 +(36, 13, 1) 9 +(36, 14, 1) 10 +(36, 15, 1) 11 +(36, 16, 1) 12 +(36, 17, 1) 13 +(36, 18, 1) 14 +(36, 19, 1) 15 +(36, 20, 1) 16 +(36, 21, 1) 17 +(36, 22, 1) 18 +(36, 23, 1) 19 +(36, 24, 1) 19 +(36, 25, 1) 20 +(36, 26, 1) 21 +(36, 27, 1) 22 +(36, 28, 1) 23 +(36, 29, 1) 24 +(36, 30, 1) 24 +(36, 31, 1) 25 +(36, 32, 1) 26 +(36, 33, 1) 27 +(36, 34, 1) 28 +(36, 35, 1) 28 +(36, 36, 1) 29 +(36, 37, 1) 30 +(36, 38, 1) 30 +(36, 39, 1) 31 +(36, 40, 1) 32 +(36, 41, 1) 32 +(36, 42, 1) 33 +(36, 43, 1) 33 +(36, 44, 1) 34 +(36, 45, 1) 34 +(36, 46, 1) 34 +(36, 47, 1) 35 +(36, 48, 1) 35 +(36, 49, 1) 35 +(36, 50, 1) 35 +(36, 51, 1) 35 +(36, 52, 1) 35 +(36, 53, 1) 35 +(36, 54, 1) 35 +(36, 55, 1) 34 +(36, 56, 1) 34 +(36, 57, 1) 34 +(36, 58, 1) 33 +(36, 59, 1) 33 +(36, 60, 1) 32 +(36, 61, 1) 32 +(36, 62, 1) 31 +(36, 63, 1) 30 +(36, 64, 1) 30 +(36, 65, 1) 29 +(36, 66, 1) 28 +(36, 67, 1) 28 +(36, 68, 1) 27 +(36, 69, 1) 26 +(36, 70, 1) 25 +(36, 71, 1) 24 +(36, 72, 1) 24 +(36, 73, 1) 23 +(36, 74, 1) 22 +(36, 75, 1) 21 +(36, 76, 1) 20 +(36, 77, 1) 19 +(36, 78, 1) 19 +(36, 79, 1) 18 +(36, 80, 1) 17 +(36, 81, 1) 16 +(36, 82, 1) 15 +(36, 83, 1) 14 +(36, 84, 1) 13 +(36, 85, 1) 12 +(36, 86, 1) 11 +(36, 87, 1) 10 +(36, 88, 1) 9 +(36, 89, 1) 8 +(36, 90, 1) 8 +(36, 91, 1) 7 +(36, 92, 1) 6 +(36, 93, 1) 5 +(36, 94, 1) 4 +(36, 95, 1) 3 +(36, 96, 1) 2 +(36, 97, 1) 1 +(37, 4, 1) 1 +(37, 5, 1) 2 +(37, 6, 1) 3 +(37, 7, 1) 4 +(37, 8, 1) 5 +(37, 9, 1) 6 +(37, 10, 1) 7 +(37, 11, 1) 8 +(37, 12, 1) 9 +(37, 13, 1) 10 +(37, 14, 1) 11 +(37, 15, 1) 12 +(37, 16, 1) 13 +(37, 17, 1) 14 +(37, 18, 1) 14 +(37, 19, 1) 15 +(37, 20, 1) 16 +(37, 21, 1) 17 +(37, 22, 1) 18 +(37, 23, 1) 19 +(37, 24, 1) 20 +(37, 25, 1) 21 +(37, 26, 1) 22 +(37, 27, 1) 22 +(37, 28, 1) 23 +(37, 29, 1) 24 +(37, 30, 1) 25 +(37, 31, 1) 26 +(37, 32, 1) 27 +(37, 33, 1) 27 +(37, 34, 1) 28 +(37, 35, 1) 29 +(37, 36, 1) 30 +(37, 37, 1) 30 +(37, 38, 1) 31 +(37, 39, 1) 32 +(37, 40, 1) 32 +(37, 41, 1) 33 +(37, 42, 1) 34 +(37, 43, 1) 34 +(37, 44, 1) 35 +(37, 45, 1) 35 +(37, 46, 1) 35 +(37, 47, 1) 36 +(37, 48, 1) 36 +(37, 49, 1) 36 +(37, 50, 1) 36 +(37, 51, 1) 36 +(37, 52, 1) 36 +(37, 53, 1) 36 +(37, 54, 1) 36 +(37, 55, 1) 35 +(37, 56, 1) 35 +(37, 57, 1) 35 +(37, 58, 1) 34 +(37, 59, 1) 34 +(37, 60, 1) 33 +(37, 61, 1) 32 +(37, 62, 1) 32 +(37, 63, 1) 31 +(37, 64, 1) 30 +(37, 65, 1) 30 +(37, 66, 1) 29 +(37, 67, 1) 28 +(37, 68, 1) 27 +(37, 69, 1) 27 +(37, 70, 1) 26 +(37, 71, 1) 25 +(37, 72, 1) 24 +(37, 73, 1) 23 +(37, 74, 1) 22 +(37, 75, 1) 22 +(37, 76, 1) 21 +(37, 77, 1) 20 +(37, 78, 1) 19 +(37, 79, 1) 18 +(37, 80, 1) 17 +(37, 81, 1) 16 +(37, 82, 1) 15 +(37, 83, 1) 14 +(37, 84, 1) 14 +(37, 85, 1) 13 +(37, 86, 1) 12 +(37, 87, 1) 11 +(37, 88, 1) 10 +(37, 89, 1) 9 +(37, 90, 1) 8 +(37, 91, 1) 7 +(37, 92, 1) 6 +(37, 93, 1) 5 +(37, 94, 1) 4 +(37, 95, 1) 3 +(37, 96, 1) 2 +(37, 97, 1) 1 +(38, 4, 1) 2 +(38, 5, 1) 3 +(38, 6, 1) 3 +(38, 7, 1) 4 +(38, 8, 1) 5 +(38, 9, 1) 6 +(38, 10, 1) 7 +(38, 11, 1) 8 +(38, 12, 1) 9 +(38, 13, 1) 10 +(38, 14, 1) 11 +(38, 15, 1) 12 +(38, 16, 1) 13 +(38, 17, 1) 14 +(38, 18, 1) 15 +(38, 19, 1) 16 +(38, 20, 1) 17 +(38, 21, 1) 18 +(38, 22, 1) 18 +(38, 23, 1) 19 +(38, 24, 1) 20 +(38, 25, 1) 21 +(38, 26, 1) 22 +(38, 27, 1) 23 +(38, 28, 1) 24 +(38, 29, 1) 25 +(38, 30, 1) 26 +(38, 31, 1) 26 +(38, 32, 1) 27 +(38, 33, 1) 28 +(38, 34, 1) 29 +(38, 35, 1) 30 +(38, 36, 1) 30 +(38, 37, 1) 31 +(38, 38, 1) 32 +(38, 39, 1) 33 +(38, 40, 1) 33 +(38, 41, 1) 34 +(38, 42, 1) 34 +(38, 43, 1) 35 +(38, 44, 1) 35 +(38, 45, 1) 36 +(38, 46, 1) 36 +(38, 47, 1) 37 +(38, 48, 1) 37 +(38, 49, 1) 37 +(38, 50, 1) 37 +(38, 51, 1) 37 +(38, 52, 1) 37 +(38, 53, 1) 37 +(38, 54, 1) 37 +(38, 55, 1) 36 +(38, 56, 1) 36 +(38, 57, 1) 35 +(38, 58, 1) 35 +(38, 59, 1) 34 +(38, 60, 1) 34 +(38, 61, 1) 33 +(38, 62, 1) 33 +(38, 63, 1) 32 +(38, 64, 1) 31 +(38, 65, 1) 30 +(38, 66, 1) 30 +(38, 67, 1) 29 +(38, 68, 1) 28 +(38, 69, 1) 27 +(38, 70, 1) 26 +(38, 71, 1) 26 +(38, 72, 1) 25 +(38, 73, 1) 24 +(38, 74, 1) 23 +(38, 75, 1) 22 +(38, 76, 1) 21 +(38, 77, 1) 20 +(38, 78, 1) 19 +(38, 79, 1) 18 +(38, 80, 1) 18 +(38, 81, 1) 17 +(38, 82, 1) 16 +(38, 83, 1) 15 +(38, 84, 1) 14 +(38, 85, 1) 13 +(38, 86, 1) 12 +(38, 87, 1) 11 +(38, 88, 1) 10 +(38, 89, 1) 9 +(38, 90, 1) 8 +(38, 91, 1) 7 +(38, 92, 1) 6 +(38, 93, 1) 5 +(38, 94, 1) 4 +(38, 95, 1) 3 +(38, 96, 1) 3 +(38, 97, 1) 2 +(39, 4, 1) 2 +(39, 5, 1) 3 +(39, 6, 1) 4 +(39, 7, 1) 5 +(39, 8, 1) 6 +(39, 9, 1) 7 +(39, 10, 1) 8 +(39, 11, 1) 9 +(39, 12, 1) 9 +(39, 13, 1) 10 +(39, 14, 1) 11 +(39, 15, 1) 12 +(39, 16, 1) 13 +(39, 17, 1) 14 +(39, 18, 1) 15 +(39, 19, 1) 16 +(39, 20, 1) 17 +(39, 21, 1) 18 +(39, 22, 1) 19 +(39, 23, 1) 20 +(39, 24, 1) 21 +(39, 25, 1) 22 +(39, 26, 1) 23 +(39, 27, 1) 23 +(39, 28, 1) 24 +(39, 29, 1) 25 +(39, 30, 1) 26 +(39, 31, 1) 27 +(39, 32, 1) 28 +(39, 33, 1) 29 +(39, 34, 1) 29 +(39, 35, 1) 30 +(39, 36, 1) 31 +(39, 37, 1) 32 +(39, 38, 1) 33 +(39, 39, 1) 33 +(39, 40, 1) 34 +(39, 41, 1) 35 +(39, 42, 1) 35 +(39, 43, 1) 36 +(39, 44, 1) 36 +(39, 45, 1) 37 +(39, 46, 1) 37 +(39, 47, 1) 37 +(39, 48, 1) 38 +(39, 49, 1) 38 +(39, 50, 1) 38 +(39, 51, 1) 38 +(39, 52, 1) 38 +(39, 53, 1) 38 +(39, 54, 1) 37 +(39, 55, 1) 37 +(39, 56, 1) 37 +(39, 57, 1) 36 +(39, 58, 1) 36 +(39, 59, 1) 35 +(39, 60, 1) 35 +(39, 61, 1) 34 +(39, 62, 1) 33 +(39, 63, 1) 33 +(39, 64, 1) 32 +(39, 65, 1) 31 +(39, 66, 1) 30 +(39, 67, 1) 29 +(39, 68, 1) 29 +(39, 69, 1) 28 +(39, 70, 1) 27 +(39, 71, 1) 26 +(39, 72, 1) 25 +(39, 73, 1) 24 +(39, 74, 1) 23 +(39, 75, 1) 23 +(39, 76, 1) 22 +(39, 77, 1) 21 +(39, 78, 1) 20 +(39, 79, 1) 19 +(39, 80, 1) 18 +(39, 81, 1) 17 +(39, 82, 1) 16 +(39, 83, 1) 15 +(39, 84, 1) 14 +(39, 85, 1) 13 +(39, 86, 1) 12 +(39, 87, 1) 11 +(39, 88, 1) 10 +(39, 89, 1) 9 +(39, 90, 1) 9 +(39, 91, 1) 8 +(39, 92, 1) 7 +(39, 93, 1) 6 +(39, 94, 1) 5 +(39, 95, 1) 4 +(39, 96, 1) 3 +(39, 97, 1) 2 +(40, 4, 1) 2 +(40, 5, 1) 3 +(40, 6, 1) 4 +(40, 7, 1) 5 +(40, 8, 1) 6 +(40, 9, 1) 7 +(40, 10, 1) 8 +(40, 11, 1) 9 +(40, 12, 1) 10 +(40, 13, 1) 11 +(40, 14, 1) 12 +(40, 15, 1) 13 +(40, 16, 1) 14 +(40, 17, 1) 15 +(40, 18, 1) 16 +(40, 19, 1) 16 +(40, 20, 1) 17 +(40, 21, 1) 18 +(40, 22, 1) 19 +(40, 23, 1) 20 +(40, 24, 1) 21 +(40, 25, 1) 22 +(40, 26, 1) 23 +(40, 27, 1) 24 +(40, 28, 1) 25 +(40, 29, 1) 26 +(40, 30, 1) 27 +(40, 31, 1) 27 +(40, 32, 1) 28 +(40, 33, 1) 29 +(40, 34, 1) 30 +(40, 35, 1) 31 +(40, 36, 1) 32 +(40, 37, 1) 32 +(40, 38, 1) 33 +(40, 39, 1) 34 +(40, 40, 1) 35 +(40, 41, 1) 35 +(40, 42, 1) 36 +(40, 43, 1) 37 +(40, 44, 1) 37 +(40, 45, 1) 38 +(40, 56, 1) 38 +(40, 57, 1) 37 +(40, 58, 1) 37 +(40, 59, 1) 36 +(40, 60, 1) 35 +(40, 61, 1) 35 +(40, 62, 1) 34 +(40, 63, 1) 33 +(40, 64, 1) 32 +(40, 65, 1) 32 +(40, 66, 1) 31 +(40, 67, 1) 30 +(40, 68, 1) 29 +(40, 69, 1) 28 +(40, 70, 1) 27 +(40, 71, 1) 27 +(40, 72, 1) 26 +(40, 73, 1) 25 +(40, 74, 1) 24 +(40, 75, 1) 23 +(40, 76, 1) 22 +(40, 77, 1) 21 +(40, 78, 1) 20 +(40, 79, 1) 19 +(40, 80, 1) 18 +(40, 81, 1) 17 +(40, 82, 1) 16 +(40, 83, 1) 16 +(40, 84, 1) 15 +(40, 85, 1) 14 +(40, 86, 1) 13 +(40, 87, 1) 12 +(40, 88, 1) 11 +(40, 89, 1) 10 +(40, 90, 1) 9 +(40, 91, 1) 8 +(40, 92, 1) 7 +(40, 93, 1) 6 +(40, 94, 1) 5 +(40, 95, 1) 4 +(40, 96, 1) 3 +(40, 97, 1) 2 +(41, 1, 1) 0 +(41, 2, 1) 0 +(41, 3, 1) 1 +(41, 4, 1) 2 +(41, 5, 1) 3 +(41, 6, 1) 4 +(41, 7, 1) 5 +(41, 8, 1) 6 +(41, 9, 1) 7 +(41, 10, 1) 8 +(41, 11, 1) 9 +(41, 12, 1) 10 +(41, 13, 1) 11 +(41, 14, 1) 12 +(41, 15, 1) 13 +(41, 16, 1) 14 +(41, 17, 1) 15 +(41, 18, 1) 16 +(41, 19, 1) 17 +(41, 20, 1) 18 +(41, 21, 1) 19 +(41, 22, 1) 20 +(41, 23, 1) 20 +(41, 24, 1) 21 +(41, 25, 1) 22 +(41, 26, 1) 23 +(41, 27, 1) 24 +(41, 28, 1) 25 +(41, 29, 1) 26 +(41, 30, 1) 27 +(41, 31, 1) 28 +(41, 32, 1) 29 +(41, 33, 1) 30 +(41, 34, 1) 30 +(41, 35, 1) 31 +(41, 36, 1) 32 +(41, 37, 1) 33 +(41, 38, 1) 34 +(41, 39, 1) 35 +(41, 40, 1) 35 +(41, 41, 1) 36 +(41, 42, 1) 37 +(41, 43, 1) 37 +(41, 58, 1) 37 +(41, 59, 1) 37 +(41, 60, 1) 36 +(41, 61, 1) 35 +(41, 62, 1) 35 +(41, 63, 1) 34 +(41, 64, 1) 33 +(41, 65, 1) 32 +(41, 66, 1) 31 +(41, 67, 1) 30 +(41, 68, 1) 30 +(41, 69, 1) 29 +(41, 70, 1) 28 +(41, 71, 1) 27 +(41, 72, 1) 26 +(41, 73, 1) 25 +(41, 74, 1) 24 +(41, 75, 1) 23 +(41, 76, 1) 22 +(41, 77, 1) 21 +(41, 78, 1) 20 +(41, 79, 1) 20 +(41, 80, 1) 19 +(41, 81, 1) 18 +(41, 82, 1) 17 +(41, 83, 1) 16 +(41, 84, 1) 15 +(41, 85, 1) 14 +(41, 86, 1) 13 +(41, 87, 1) 12 +(41, 88, 1) 11 +(41, 89, 1) 10 +(41, 90, 1) 9 +(41, 91, 1) 8 +(41, 92, 1) 7 +(41, 93, 1) 6 +(41, 94, 1) 5 +(41, 95, 1) 4 +(41, 96, 1) 3 +(41, 97, 1) 2 +(41, 98, 1) 1 +(41, 99, 1) 0 +(41, 100, 1) 0 +(42, 1, 1) 0 +(42, 2, 1) 0 +(42, 3, 1) 1 +(42, 4, 1) 2 +(42, 5, 1) 3 +(42, 6, 1) 4 +(42, 7, 1) 5 +(42, 8, 1) 6 +(42, 9, 1) 7 +(42, 10, 1) 8 +(42, 11, 1) 9 +(42, 12, 1) 10 +(42, 13, 1) 11 +(42, 14, 1) 12 +(42, 15, 1) 13 +(42, 16, 1) 14 +(42, 17, 1) 15 +(42, 18, 1) 16 +(42, 19, 1) 17 +(42, 20, 1) 18 +(42, 21, 1) 19 +(42, 22, 1) 20 +(42, 23, 1) 21 +(42, 24, 1) 22 +(42, 25, 1) 23 +(42, 26, 1) 24 +(42, 27, 1) 25 +(42, 28, 1) 25 +(42, 29, 1) 26 +(42, 30, 1) 27 +(42, 31, 1) 28 +(42, 32, 1) 29 +(42, 33, 1) 30 +(42, 34, 1) 31 +(42, 35, 1) 32 +(42, 36, 1) 33 +(42, 37, 1) 34 +(42, 38, 1) 34 +(42, 39, 1) 35 +(42, 40, 1) 36 +(42, 41, 1) 37 +(42, 42, 1) 38 +(42, 59, 1) 38 +(42, 60, 1) 37 +(42, 61, 1) 36 +(42, 62, 1) 35 +(42, 63, 1) 34 +(42, 64, 1) 34 +(42, 65, 1) 33 +(42, 66, 1) 32 +(42, 67, 1) 31 +(42, 68, 1) 30 +(42, 69, 1) 29 +(42, 70, 1) 28 +(42, 71, 1) 27 +(42, 72, 1) 26 +(42, 73, 1) 25 +(42, 74, 1) 25 +(42, 75, 1) 24 +(42, 76, 1) 23 +(42, 77, 1) 22 +(42, 78, 1) 21 +(42, 79, 1) 20 +(42, 80, 1) 19 +(42, 81, 1) 18 +(42, 82, 1) 17 +(42, 83, 1) 16 +(42, 84, 1) 15 +(42, 85, 1) 14 +(42, 86, 1) 13 +(42, 87, 1) 12 +(42, 88, 1) 11 +(42, 89, 1) 10 +(42, 90, 1) 9 +(42, 91, 1) 8 +(42, 92, 1) 7 +(42, 93, 1) 6 +(42, 94, 1) 5 +(42, 95, 1) 4 +(42, 96, 1) 3 +(42, 97, 1) 2 +(42, 98, 1) 1 +(42, 99, 1) 0 +(42, 100, 1) 0 +(43, 1, 1) 0 +(43, 2, 1) 1 +(43, 3, 1) 2 +(43, 4, 1) 3 +(43, 5, 1) 4 +(43, 6, 1) 4 +(43, 7, 1) 5 +(43, 8, 1) 6 +(43, 9, 1) 7 +(43, 10, 1) 8 +(43, 11, 1) 9 +(43, 12, 1) 10 +(43, 13, 1) 11 +(43, 14, 1) 12 +(43, 15, 1) 13 +(43, 16, 1) 14 +(43, 17, 1) 15 +(43, 18, 1) 16 +(43, 19, 1) 17 +(43, 20, 1) 18 +(43, 21, 1) 19 +(43, 22, 1) 20 +(43, 23, 1) 21 +(43, 24, 1) 22 +(43, 25, 1) 23 +(43, 26, 1) 24 +(43, 27, 1) 25 +(43, 28, 1) 26 +(43, 29, 1) 27 +(43, 30, 1) 28 +(43, 31, 1) 29 +(43, 32, 1) 30 +(43, 33, 1) 30 +(43, 34, 1) 31 +(43, 35, 1) 32 +(43, 36, 1) 33 +(43, 37, 1) 34 +(43, 38, 1) 35 +(43, 39, 1) 36 +(43, 40, 1) 37 +(43, 41, 1) 37 +(43, 60, 1) 37 +(43, 61, 1) 37 +(43, 62, 1) 36 +(43, 63, 1) 35 +(43, 64, 1) 34 +(43, 65, 1) 33 +(43, 66, 1) 32 +(43, 67, 1) 31 +(43, 68, 1) 30 +(43, 69, 1) 30 +(43, 70, 1) 29 +(43, 71, 1) 28 +(43, 72, 1) 27 +(43, 73, 1) 26 +(43, 74, 1) 25 +(43, 75, 1) 24 +(43, 76, 1) 23 +(43, 77, 1) 22 +(43, 78, 1) 21 +(43, 79, 1) 20 +(43, 80, 1) 19 +(43, 81, 1) 18 +(43, 82, 1) 17 +(43, 83, 1) 16 +(43, 84, 1) 15 +(43, 85, 1) 14 +(43, 86, 1) 13 +(43, 87, 1) 12 +(43, 88, 1) 11 +(43, 89, 1) 10 +(43, 90, 1) 9 +(43, 91, 1) 8 +(43, 92, 1) 7 +(43, 93, 1) 6 +(43, 94, 1) 5 +(43, 95, 1) 4 +(43, 96, 1) 4 +(43, 97, 1) 3 +(43, 98, 1) 2 +(43, 99, 1) 1 +(43, 100, 1) 0 +(44, 1, 1) 0 +(44, 2, 1) 1 +(44, 3, 1) 2 +(44, 4, 1) 3 +(44, 5, 1) 4 +(44, 6, 1) 5 +(44, 7, 1) 6 +(44, 8, 1) 7 +(44, 9, 1) 8 +(44, 10, 1) 9 +(44, 11, 1) 10 +(44, 12, 1) 11 +(44, 13, 1) 12 +(44, 14, 1) 13 +(44, 15, 1) 14 +(44, 16, 1) 14 +(44, 17, 1) 15 +(44, 18, 1) 16 +(44, 19, 1) 17 +(44, 20, 1) 18 +(44, 21, 1) 19 +(44, 22, 1) 20 +(44, 23, 1) 21 +(44, 24, 1) 22 +(44, 25, 1) 23 +(44, 26, 1) 24 +(44, 27, 1) 25 +(44, 28, 1) 26 +(44, 29, 1) 27 +(44, 30, 1) 28 +(44, 31, 1) 29 +(44, 32, 1) 30 +(44, 33, 1) 31 +(44, 34, 1) 32 +(44, 35, 1) 33 +(44, 36, 1) 34 +(44, 37, 1) 35 +(44, 38, 1) 35 +(44, 39, 1) 36 +(44, 40, 1) 37 +(44, 61, 1) 37 +(44, 62, 1) 36 +(44, 63, 1) 35 +(44, 64, 1) 35 +(44, 65, 1) 34 +(44, 66, 1) 33 +(44, 67, 1) 32 +(44, 68, 1) 31 +(44, 69, 1) 30 +(44, 70, 1) 29 +(44, 71, 1) 28 +(44, 72, 1) 27 +(44, 73, 1) 26 +(44, 74, 1) 25 +(44, 75, 1) 24 +(44, 76, 1) 23 +(44, 77, 1) 22 +(44, 78, 1) 21 +(44, 79, 1) 20 +(44, 80, 1) 19 +(44, 81, 1) 18 +(44, 82, 1) 17 +(44, 83, 1) 16 +(44, 84, 1) 15 +(44, 85, 1) 14 +(44, 86, 1) 14 +(44, 87, 1) 13 +(44, 88, 1) 12 +(44, 89, 1) 11 +(44, 90, 1) 10 +(44, 91, 1) 9 +(44, 92, 1) 8 +(44, 93, 1) 7 +(44, 94, 1) 6 +(44, 95, 1) 5 +(44, 96, 1) 4 +(44, 97, 1) 3 +(44, 98, 1) 2 +(44, 99, 1) 1 +(44, 100, 1) 0 +(45, 1, 1) 0 +(45, 2, 1) 1 +(45, 3, 1) 2 +(45, 4, 1) 3 +(45, 5, 1) 4 +(45, 6, 1) 5 +(45, 7, 1) 6 +(45, 8, 1) 7 +(45, 9, 1) 8 +(45, 10, 1) 9 +(45, 11, 1) 10 +(45, 12, 1) 11 +(45, 13, 1) 12 +(45, 14, 1) 13 +(45, 15, 1) 14 +(45, 16, 1) 15 +(45, 17, 1) 16 +(45, 18, 1) 17 +(45, 19, 1) 18 +(45, 20, 1) 19 +(45, 21, 1) 20 +(45, 22, 1) 21 +(45, 23, 1) 22 +(45, 24, 1) 23 +(45, 25, 1) 23 +(45, 26, 1) 24 +(45, 27, 1) 25 +(45, 28, 1) 26 +(45, 29, 1) 27 +(45, 30, 1) 28 +(45, 31, 1) 29 +(45, 32, 1) 30 +(45, 33, 1) 31 +(45, 34, 1) 32 +(45, 35, 1) 33 +(45, 36, 1) 34 +(45, 37, 1) 35 +(45, 38, 1) 36 +(45, 39, 1) 37 +(45, 40, 1) 38 +(45, 61, 1) 38 +(45, 62, 1) 37 +(45, 63, 1) 36 +(45, 64, 1) 35 +(45, 65, 1) 34 +(45, 66, 1) 33 +(45, 67, 1) 32 +(45, 68, 1) 31 +(45, 69, 1) 30 +(45, 70, 1) 29 +(45, 71, 1) 28 +(45, 72, 1) 27 +(45, 73, 1) 26 +(45, 74, 1) 25 +(45, 75, 1) 24 +(45, 76, 1) 23 +(45, 77, 1) 23 +(45, 78, 1) 22 +(45, 79, 1) 21 +(45, 80, 1) 20 +(45, 81, 1) 19 +(45, 82, 1) 18 +(45, 83, 1) 17 +(45, 84, 1) 16 +(45, 85, 1) 15 +(45, 86, 1) 14 +(45, 87, 1) 13 +(45, 88, 1) 12 +(45, 89, 1) 11 +(45, 90, 1) 10 +(45, 91, 1) 9 +(45, 92, 1) 8 +(45, 93, 1) 7 +(45, 94, 1) 6 +(45, 95, 1) 5 +(45, 96, 1) 4 +(45, 97, 1) 3 +(45, 98, 1) 2 +(45, 99, 1) 1 +(45, 100, 1) 0 +(46, 1, 1) 0 +(46, 2, 1) 1 +(46, 3, 1) 2 +(46, 4, 1) 3 +(46, 5, 1) 4 +(46, 6, 1) 5 +(46, 7, 1) 6 +(46, 8, 1) 7 +(46, 9, 1) 8 +(46, 10, 1) 9 +(46, 11, 1) 10 +(46, 12, 1) 11 +(46, 13, 1) 12 +(46, 14, 1) 13 +(46, 15, 1) 14 +(46, 16, 1) 15 +(46, 17, 1) 16 +(46, 18, 1) 17 +(46, 19, 1) 18 +(46, 20, 1) 19 +(46, 21, 1) 20 +(46, 22, 1) 21 +(46, 23, 1) 22 +(46, 24, 1) 23 +(46, 25, 1) 24 +(46, 26, 1) 25 +(46, 27, 1) 26 +(46, 28, 1) 27 +(46, 29, 1) 28 +(46, 30, 1) 29 +(46, 31, 1) 30 +(46, 32, 1) 30 +(46, 33, 1) 31 +(46, 34, 1) 32 +(46, 35, 1) 33 +(46, 36, 1) 34 +(46, 37, 1) 35 +(46, 38, 1) 36 +(46, 39, 1) 37 +(46, 62, 1) 37 +(46, 63, 1) 36 +(46, 64, 1) 35 +(46, 65, 1) 34 +(46, 66, 1) 33 +(46, 67, 1) 32 +(46, 68, 1) 31 +(46, 69, 1) 30 +(46, 70, 1) 30 +(46, 71, 1) 29 +(46, 72, 1) 28 +(46, 73, 1) 27 +(46, 74, 1) 26 +(46, 75, 1) 25 +(46, 76, 1) 24 +(46, 77, 1) 23 +(46, 78, 1) 22 +(46, 79, 1) 21 +(46, 80, 1) 20 +(46, 81, 1) 19 +(46, 82, 1) 18 +(46, 83, 1) 17 +(46, 84, 1) 16 +(46, 85, 1) 15 +(46, 86, 1) 14 +(46, 87, 1) 13 +(46, 88, 1) 12 +(46, 89, 1) 11 +(46, 90, 1) 10 +(46, 91, 1) 9 +(46, 92, 1) 8 +(46, 93, 1) 7 +(46, 94, 1) 6 +(46, 95, 1) 5 +(46, 96, 1) 4 +(46, 97, 1) 3 +(46, 98, 1) 2 +(46, 99, 1) 1 +(46, 100, 1) 0 +(47, 1, 1) 0 +(47, 2, 1) 1 +(47, 3, 1) 2 +(47, 4, 1) 3 +(47, 5, 1) 4 +(47, 6, 1) 5 +(47, 7, 1) 6 +(47, 8, 1) 7 +(47, 9, 1) 8 +(47, 10, 1) 9 +(47, 11, 1) 10 +(47, 12, 1) 11 +(47, 13, 1) 12 +(47, 14, 1) 13 +(47, 15, 1) 14 +(47, 16, 1) 15 +(47, 17, 1) 16 +(47, 18, 1) 17 +(47, 19, 1) 18 +(47, 20, 1) 19 +(47, 21, 1) 20 +(47, 22, 1) 21 +(47, 23, 1) 22 +(47, 24, 1) 23 +(47, 25, 1) 24 +(47, 26, 1) 25 +(47, 27, 1) 26 +(47, 28, 1) 27 +(47, 29, 1) 28 +(47, 30, 1) 29 +(47, 31, 1) 30 +(47, 32, 1) 31 +(47, 33, 1) 32 +(47, 34, 1) 33 +(47, 35, 1) 34 +(47, 36, 1) 35 +(47, 37, 1) 36 +(47, 38, 1) 37 +(47, 39, 1) 38 +(47, 62, 1) 38 +(47, 63, 1) 37 +(47, 64, 1) 36 +(47, 65, 1) 35 +(47, 66, 1) 34 +(47, 67, 1) 33 +(47, 68, 1) 32 +(47, 69, 1) 31 +(47, 70, 1) 30 +(47, 71, 1) 29 +(47, 72, 1) 28 +(47, 73, 1) 27 +(47, 74, 1) 26 +(47, 75, 1) 25 +(47, 76, 1) 24 +(47, 77, 1) 23 +(47, 78, 1) 22 +(47, 79, 1) 21 +(47, 80, 1) 20 +(47, 81, 1) 19 +(47, 82, 1) 18 +(47, 83, 1) 17 +(47, 84, 1) 16 +(47, 85, 1) 15 +(47, 86, 1) 14 +(47, 87, 1) 13 +(47, 88, 1) 12 +(47, 89, 1) 11 +(47, 90, 1) 10 +(47, 91, 1) 9 +(47, 92, 1) 8 +(47, 93, 1) 7 +(47, 94, 1) 6 +(47, 95, 1) 5 +(47, 96, 1) 4 +(47, 97, 1) 3 +(47, 98, 1) 2 +(47, 99, 1) 1 +(47, 100, 1) 0 +(48, 1, 1) 0 +(48, 2, 1) 1 +(48, 3, 1) 2 +(48, 4, 1) 3 +(48, 5, 1) 4 +(48, 6, 1) 5 +(48, 7, 1) 6 +(48, 8, 1) 7 +(48, 9, 1) 8 +(48, 10, 1) 9 +(48, 11, 1) 10 +(48, 12, 1) 11 +(48, 13, 1) 12 +(48, 14, 1) 13 +(48, 15, 1) 14 +(48, 16, 1) 15 +(48, 17, 1) 16 +(48, 18, 1) 17 +(48, 19, 1) 18 +(48, 20, 1) 19 +(48, 21, 1) 20 +(48, 22, 1) 21 +(48, 23, 1) 22 +(48, 24, 1) 23 +(48, 25, 1) 24 +(48, 26, 1) 25 +(48, 27, 1) 26 +(48, 28, 1) 27 +(48, 29, 1) 28 +(48, 30, 1) 29 +(48, 31, 1) 30 +(48, 32, 1) 31 +(48, 33, 1) 32 +(48, 34, 1) 33 +(48, 35, 1) 34 +(48, 36, 1) 35 +(48, 37, 1) 36 +(48, 38, 1) 37 +(48, 39, 1) 38 +(48, 62, 1) 38 +(48, 63, 1) 37 +(48, 64, 1) 36 +(48, 65, 1) 35 +(48, 66, 1) 34 +(48, 67, 1) 33 +(48, 68, 1) 32 +(48, 69, 1) 31 +(48, 70, 1) 30 +(48, 71, 1) 29 +(48, 72, 1) 28 +(48, 73, 1) 27 +(48, 74, 1) 26 +(48, 75, 1) 25 +(48, 76, 1) 24 +(48, 77, 1) 23 +(48, 78, 1) 22 +(48, 79, 1) 21 +(48, 80, 1) 20 +(48, 81, 1) 19 +(48, 82, 1) 18 +(48, 83, 1) 17 +(48, 84, 1) 16 +(48, 85, 1) 15 +(48, 86, 1) 14 +(48, 87, 1) 13 +(48, 88, 1) 12 +(48, 89, 1) 11 +(48, 90, 1) 10 +(48, 91, 1) 9 +(48, 92, 1) 8 +(48, 93, 1) 7 +(48, 94, 1) 6 +(48, 95, 1) 5 +(48, 96, 1) 4 +(48, 97, 1) 3 +(48, 98, 1) 2 +(48, 99, 1) 1 +(48, 100, 1) 0 +(49, 1, 1) 0 +(49, 2, 1) 1 +(49, 3, 1) 2 +(49, 4, 1) 3 +(49, 5, 1) 4 +(49, 6, 1) 5 +(49, 7, 1) 6 +(49, 8, 1) 7 +(49, 9, 1) 8 +(49, 10, 1) 9 +(49, 11, 1) 10 +(49, 12, 1) 11 +(49, 13, 1) 12 +(49, 14, 1) 13 +(49, 15, 1) 14 +(49, 16, 1) 15 +(49, 17, 1) 16 +(49, 18, 1) 17 +(49, 19, 1) 18 +(49, 20, 1) 19 +(49, 21, 1) 20 +(49, 22, 1) 21 +(49, 23, 1) 22 +(49, 24, 1) 23 +(49, 25, 1) 24 +(49, 26, 1) 25 +(49, 27, 1) 26 +(49, 28, 1) 27 +(49, 29, 1) 28 +(49, 30, 1) 29 +(49, 31, 1) 30 +(49, 32, 1) 31 +(49, 33, 1) 32 +(49, 34, 1) 33 +(49, 35, 1) 34 +(49, 36, 1) 35 +(49, 37, 1) 36 +(49, 38, 1) 37 +(49, 39, 1) 38 +(49, 62, 1) 38 +(49, 63, 1) 37 +(49, 64, 1) 36 +(49, 65, 1) 35 +(49, 66, 1) 34 +(49, 67, 1) 33 +(49, 68, 1) 32 +(49, 69, 1) 31 +(49, 70, 1) 30 +(49, 71, 1) 29 +(49, 72, 1) 28 +(49, 73, 1) 27 +(49, 74, 1) 26 +(49, 75, 1) 25 +(49, 76, 1) 24 +(49, 77, 1) 23 +(49, 78, 1) 22 +(49, 79, 1) 21 +(49, 80, 1) 20 +(49, 81, 1) 19 +(49, 82, 1) 18 +(49, 83, 1) 17 +(49, 84, 1) 16 +(49, 85, 1) 15 +(49, 86, 1) 14 +(49, 87, 1) 13 +(49, 88, 1) 12 +(49, 89, 1) 11 +(49, 90, 1) 10 +(49, 91, 1) 9 +(49, 92, 1) 8 +(49, 93, 1) 7 +(49, 94, 1) 6 +(49, 95, 1) 5 +(49, 96, 1) 4 +(49, 97, 1) 3 +(49, 98, 1) 2 +(49, 99, 1) 1 +(49, 100, 1) 0 +(50, 1, 1) 0 +(50, 2, 1) 1 +(50, 3, 1) 2 +(50, 4, 1) 3 +(50, 5, 1) 4 +(50, 6, 1) 5 +(50, 7, 1) 6 +(50, 8, 1) 7 +(50, 9, 1) 8 +(50, 10, 1) 9 +(50, 11, 1) 10 +(50, 12, 1) 11 +(50, 13, 1) 12 +(50, 14, 1) 13 +(50, 15, 1) 14 +(50, 16, 1) 15 +(50, 17, 1) 16 +(50, 18, 1) 17 +(50, 19, 1) 18 +(50, 20, 1) 19 +(50, 21, 1) 20 +(50, 22, 1) 21 +(50, 23, 1) 22 +(50, 24, 1) 23 +(50, 25, 1) 24 +(50, 26, 1) 25 +(50, 27, 1) 26 +(50, 28, 1) 27 +(50, 29, 1) 28 +(50, 30, 1) 29 +(50, 31, 1) 30 +(50, 32, 1) 31 +(50, 33, 1) 32 +(50, 34, 1) 33 +(50, 35, 1) 34 +(50, 36, 1) 35 +(50, 37, 1) 36 +(50, 38, 1) 37 +(50, 39, 1) 38 +(50, 62, 1) 38 +(50, 63, 1) 37 +(50, 64, 1) 36 +(50, 65, 1) 35 +(50, 66, 1) 34 +(50, 67, 1) 33 +(50, 68, 1) 32 +(50, 69, 1) 31 +(50, 70, 1) 30 +(50, 71, 1) 29 +(50, 72, 1) 28 +(50, 73, 1) 27 +(50, 74, 1) 26 +(50, 75, 1) 25 +(50, 76, 1) 24 +(50, 77, 1) 23 +(50, 78, 1) 22 +(50, 79, 1) 21 +(50, 80, 1) 20 +(50, 81, 1) 19 +(50, 82, 1) 18 +(50, 83, 1) 17 +(50, 84, 1) 16 +(50, 85, 1) 15 +(50, 86, 1) 14 +(50, 87, 1) 13 +(50, 88, 1) 12 +(50, 89, 1) 11 +(50, 90, 1) 10 +(50, 91, 1) 9 +(50, 92, 1) 8 +(50, 93, 1) 7 +(50, 94, 1) 6 +(50, 95, 1) 5 +(50, 96, 1) 4 +(50, 97, 1) 3 +(50, 98, 1) 2 +(50, 99, 1) 1 +(50, 100, 1) 0 +(51, 1, 1) 0 +(51, 2, 1) 1 +(51, 3, 1) 2 +(51, 4, 1) 3 +(51, 5, 1) 4 +(51, 6, 1) 5 +(51, 7, 1) 6 +(51, 8, 1) 7 +(51, 9, 1) 8 +(51, 10, 1) 9 +(51, 11, 1) 10 +(51, 12, 1) 11 +(51, 13, 1) 12 +(51, 14, 1) 13 +(51, 15, 1) 14 +(51, 16, 1) 15 +(51, 17, 1) 16 +(51, 18, 1) 17 +(51, 19, 1) 18 +(51, 20, 1) 19 +(51, 21, 1) 20 +(51, 22, 1) 21 +(51, 23, 1) 22 +(51, 24, 1) 23 +(51, 25, 1) 24 +(51, 26, 1) 25 +(51, 27, 1) 26 +(51, 28, 1) 27 +(51, 29, 1) 28 +(51, 30, 1) 29 +(51, 31, 1) 30 +(51, 32, 1) 31 +(51, 33, 1) 32 +(51, 34, 1) 33 +(51, 35, 1) 34 +(51, 36, 1) 35 +(51, 37, 1) 36 +(51, 38, 1) 37 +(51, 39, 1) 38 +(51, 62, 1) 38 +(51, 63, 1) 37 +(51, 64, 1) 36 +(51, 65, 1) 35 +(51, 66, 1) 34 +(51, 67, 1) 33 +(51, 68, 1) 32 +(51, 69, 1) 31 +(51, 70, 1) 30 +(51, 71, 1) 29 +(51, 72, 1) 28 +(51, 73, 1) 27 +(51, 74, 1) 26 +(51, 75, 1) 25 +(51, 76, 1) 24 +(51, 77, 1) 23 +(51, 78, 1) 22 +(51, 79, 1) 21 +(51, 80, 1) 20 +(51, 81, 1) 19 +(51, 82, 1) 18 +(51, 83, 1) 17 +(51, 84, 1) 16 +(51, 85, 1) 15 +(51, 86, 1) 14 +(51, 87, 1) 13 +(51, 88, 1) 12 +(51, 89, 1) 11 +(51, 90, 1) 10 +(51, 91, 1) 9 +(51, 92, 1) 8 +(51, 93, 1) 7 +(51, 94, 1) 6 +(51, 95, 1) 5 +(51, 96, 1) 4 +(51, 97, 1) 3 +(51, 98, 1) 2 +(51, 99, 1) 1 +(51, 100, 1) 0 +(52, 1, 1) 0 +(52, 2, 1) 1 +(52, 3, 1) 2 +(52, 4, 1) 3 +(52, 5, 1) 4 +(52, 6, 1) 5 +(52, 7, 1) 6 +(52, 8, 1) 7 +(52, 9, 1) 8 +(52, 10, 1) 9 +(52, 11, 1) 10 +(52, 12, 1) 11 +(52, 13, 1) 12 +(52, 14, 1) 13 +(52, 15, 1) 14 +(52, 16, 1) 15 +(52, 17, 1) 16 +(52, 18, 1) 17 +(52, 19, 1) 18 +(52, 20, 1) 19 +(52, 21, 1) 20 +(52, 22, 1) 21 +(52, 23, 1) 22 +(52, 24, 1) 23 +(52, 25, 1) 24 +(52, 26, 1) 25 +(52, 27, 1) 26 +(52, 28, 1) 27 +(52, 29, 1) 28 +(52, 30, 1) 29 +(52, 31, 1) 30 +(52, 32, 1) 31 +(52, 33, 1) 32 +(52, 34, 1) 33 +(52, 35, 1) 34 +(52, 36, 1) 35 +(52, 37, 1) 36 +(52, 38, 1) 37 +(52, 39, 1) 38 +(52, 62, 1) 38 +(52, 63, 1) 37 +(52, 64, 1) 36 +(52, 65, 1) 35 +(52, 66, 1) 34 +(52, 67, 1) 33 +(52, 68, 1) 32 +(52, 69, 1) 31 +(52, 70, 1) 30 +(52, 71, 1) 29 +(52, 72, 1) 28 +(52, 73, 1) 27 +(52, 74, 1) 26 +(52, 75, 1) 25 +(52, 76, 1) 24 +(52, 77, 1) 23 +(52, 78, 1) 22 +(52, 79, 1) 21 +(52, 80, 1) 20 +(52, 81, 1) 19 +(52, 82, 1) 18 +(52, 83, 1) 17 +(52, 84, 1) 16 +(52, 85, 1) 15 +(52, 86, 1) 14 +(52, 87, 1) 13 +(52, 88, 1) 12 +(52, 89, 1) 11 +(52, 90, 1) 10 +(52, 91, 1) 9 +(52, 92, 1) 8 +(52, 93, 1) 7 +(52, 94, 1) 6 +(52, 95, 1) 5 +(52, 96, 1) 4 +(52, 97, 1) 3 +(52, 98, 1) 2 +(52, 99, 1) 1 +(52, 100, 1) 0 +(53, 1, 1) 0 +(53, 2, 1) 1 +(53, 3, 1) 2 +(53, 4, 1) 3 +(53, 5, 1) 4 +(53, 6, 1) 5 +(53, 7, 1) 6 +(53, 8, 1) 7 +(53, 9, 1) 8 +(53, 10, 1) 9 +(53, 11, 1) 10 +(53, 12, 1) 11 +(53, 13, 1) 12 +(53, 14, 1) 13 +(53, 15, 1) 14 +(53, 16, 1) 15 +(53, 17, 1) 16 +(53, 18, 1) 17 +(53, 19, 1) 18 +(53, 20, 1) 19 +(53, 21, 1) 20 +(53, 22, 1) 21 +(53, 23, 1) 22 +(53, 24, 1) 23 +(53, 25, 1) 24 +(53, 26, 1) 25 +(53, 27, 1) 26 +(53, 28, 1) 27 +(53, 29, 1) 28 +(53, 30, 1) 29 +(53, 31, 1) 30 +(53, 32, 1) 31 +(53, 33, 1) 32 +(53, 34, 1) 33 +(53, 35, 1) 34 +(53, 36, 1) 35 +(53, 37, 1) 36 +(53, 38, 1) 37 +(53, 39, 1) 38 +(53, 62, 1) 38 +(53, 63, 1) 37 +(53, 64, 1) 36 +(53, 65, 1) 35 +(53, 66, 1) 34 +(53, 67, 1) 33 +(53, 68, 1) 32 +(53, 69, 1) 31 +(53, 70, 1) 30 +(53, 71, 1) 29 +(53, 72, 1) 28 +(53, 73, 1) 27 +(53, 74, 1) 26 +(53, 75, 1) 25 +(53, 76, 1) 24 +(53, 77, 1) 23 +(53, 78, 1) 22 +(53, 79, 1) 21 +(53, 80, 1) 20 +(53, 81, 1) 19 +(53, 82, 1) 18 +(53, 83, 1) 17 +(53, 84, 1) 16 +(53, 85, 1) 15 +(53, 86, 1) 14 +(53, 87, 1) 13 +(53, 88, 1) 12 +(53, 89, 1) 11 +(53, 90, 1) 10 +(53, 91, 1) 9 +(53, 92, 1) 8 +(53, 93, 1) 7 +(53, 94, 1) 6 +(53, 95, 1) 5 +(53, 96, 1) 4 +(53, 97, 1) 3 +(53, 98, 1) 2 +(53, 99, 1) 1 +(53, 100, 1) 0 +(54, 1, 1) 0 +(54, 2, 1) 1 +(54, 3, 1) 2 +(54, 4, 1) 3 +(54, 5, 1) 4 +(54, 6, 1) 5 +(54, 7, 1) 6 +(54, 8, 1) 7 +(54, 9, 1) 8 +(54, 10, 1) 9 +(54, 11, 1) 10 +(54, 12, 1) 11 +(54, 13, 1) 12 +(54, 14, 1) 13 +(54, 15, 1) 14 +(54, 16, 1) 15 +(54, 17, 1) 16 +(54, 18, 1) 17 +(54, 19, 1) 18 +(54, 20, 1) 19 +(54, 21, 1) 20 +(54, 22, 1) 21 +(54, 23, 1) 22 +(54, 24, 1) 23 +(54, 25, 1) 24 +(54, 26, 1) 25 +(54, 27, 1) 26 +(54, 28, 1) 27 +(54, 29, 1) 28 +(54, 30, 1) 29 +(54, 31, 1) 30 +(54, 32, 1) 31 +(54, 33, 1) 32 +(54, 34, 1) 33 +(54, 35, 1) 34 +(54, 36, 1) 35 +(54, 37, 1) 36 +(54, 38, 1) 37 +(54, 39, 1) 38 +(54, 62, 1) 38 +(54, 63, 1) 37 +(54, 64, 1) 36 +(54, 65, 1) 35 +(54, 66, 1) 34 +(54, 67, 1) 33 +(54, 68, 1) 32 +(54, 69, 1) 31 +(54, 70, 1) 30 +(54, 71, 1) 29 +(54, 72, 1) 28 +(54, 73, 1) 27 +(54, 74, 1) 26 +(54, 75, 1) 25 +(54, 76, 1) 24 +(54, 77, 1) 23 +(54, 78, 1) 22 +(54, 79, 1) 21 +(54, 80, 1) 20 +(54, 81, 1) 19 +(54, 82, 1) 18 +(54, 83, 1) 17 +(54, 84, 1) 16 +(54, 85, 1) 15 +(54, 86, 1) 14 +(54, 87, 1) 13 +(54, 88, 1) 12 +(54, 89, 1) 11 +(54, 90, 1) 10 +(54, 91, 1) 9 +(54, 92, 1) 8 +(54, 93, 1) 7 +(54, 94, 1) 6 +(54, 95, 1) 5 +(54, 96, 1) 4 +(54, 97, 1) 3 +(54, 98, 1) 2 +(54, 99, 1) 1 +(54, 100, 1) 0 +(55, 1, 1) 0 +(55, 2, 1) 1 +(55, 3, 1) 2 +(55, 4, 1) 3 +(55, 5, 1) 4 +(55, 6, 1) 5 +(55, 7, 1) 6 +(55, 8, 1) 7 +(55, 9, 1) 8 +(55, 10, 1) 9 +(55, 11, 1) 10 +(55, 12, 1) 11 +(55, 13, 1) 12 +(55, 14, 1) 13 +(55, 15, 1) 14 +(55, 16, 1) 15 +(55, 17, 1) 16 +(55, 18, 1) 17 +(55, 19, 1) 18 +(55, 20, 1) 19 +(55, 21, 1) 20 +(55, 22, 1) 21 +(55, 23, 1) 22 +(55, 24, 1) 23 +(55, 25, 1) 24 +(55, 26, 1) 25 +(55, 27, 1) 26 +(55, 28, 1) 27 +(55, 29, 1) 28 +(55, 30, 1) 29 +(55, 31, 1) 30 +(55, 32, 1) 30 +(55, 33, 1) 31 +(55, 34, 1) 32 +(55, 35, 1) 33 +(55, 36, 1) 34 +(55, 37, 1) 35 +(55, 38, 1) 36 +(55, 39, 1) 37 +(55, 62, 1) 37 +(55, 63, 1) 36 +(55, 64, 1) 35 +(55, 65, 1) 34 +(55, 66, 1) 33 +(55, 67, 1) 32 +(55, 68, 1) 31 +(55, 69, 1) 30 +(55, 70, 1) 30 +(55, 71, 1) 29 +(55, 72, 1) 28 +(55, 73, 1) 27 +(55, 74, 1) 26 +(55, 75, 1) 25 +(55, 76, 1) 24 +(55, 77, 1) 23 +(55, 78, 1) 22 +(55, 79, 1) 21 +(55, 80, 1) 20 +(55, 81, 1) 19 +(55, 82, 1) 18 +(55, 83, 1) 17 +(55, 84, 1) 16 +(55, 85, 1) 15 +(55, 86, 1) 14 +(55, 87, 1) 13 +(55, 88, 1) 12 +(55, 89, 1) 11 +(55, 90, 1) 10 +(55, 91, 1) 9 +(55, 92, 1) 8 +(55, 93, 1) 7 +(55, 94, 1) 6 +(55, 95, 1) 5 +(55, 96, 1) 4 +(55, 97, 1) 3 +(55, 98, 1) 2 +(55, 99, 1) 1 +(55, 100, 1) 0 +(56, 1, 1) 0 +(56, 2, 1) 1 +(56, 3, 1) 2 +(56, 4, 1) 3 +(56, 5, 1) 4 +(56, 6, 1) 5 +(56, 7, 1) 6 +(56, 8, 1) 7 +(56, 9, 1) 8 +(56, 10, 1) 9 +(56, 11, 1) 10 +(56, 12, 1) 11 +(56, 13, 1) 12 +(56, 14, 1) 13 +(56, 15, 1) 14 +(56, 16, 1) 15 +(56, 17, 1) 16 +(56, 18, 1) 17 +(56, 19, 1) 18 +(56, 20, 1) 19 +(56, 21, 1) 20 +(56, 22, 1) 21 +(56, 23, 1) 22 +(56, 24, 1) 23 +(56, 25, 1) 23 +(56, 26, 1) 24 +(56, 27, 1) 25 +(56, 28, 1) 26 +(56, 29, 1) 27 +(56, 30, 1) 28 +(56, 31, 1) 29 +(56, 32, 1) 30 +(56, 33, 1) 31 +(56, 34, 1) 32 +(56, 35, 1) 33 +(56, 36, 1) 34 +(56, 37, 1) 35 +(56, 38, 1) 36 +(56, 39, 1) 37 +(56, 40, 1) 38 +(56, 61, 1) 38 +(56, 62, 1) 37 +(56, 63, 1) 36 +(56, 64, 1) 35 +(56, 65, 1) 34 +(56, 66, 1) 33 +(56, 67, 1) 32 +(56, 68, 1) 31 +(56, 69, 1) 30 +(56, 70, 1) 29 +(56, 71, 1) 28 +(56, 72, 1) 27 +(56, 73, 1) 26 +(56, 74, 1) 25 +(56, 75, 1) 24 +(56, 76, 1) 23 +(56, 77, 1) 23 +(56, 78, 1) 22 +(56, 79, 1) 21 +(56, 80, 1) 20 +(56, 81, 1) 19 +(56, 82, 1) 18 +(56, 83, 1) 17 +(56, 84, 1) 16 +(56, 85, 1) 15 +(56, 86, 1) 14 +(56, 87, 1) 13 +(56, 88, 1) 12 +(56, 89, 1) 11 +(56, 90, 1) 10 +(56, 91, 1) 9 +(56, 92, 1) 8 +(56, 93, 1) 7 +(56, 94, 1) 6 +(56, 95, 1) 5 +(56, 96, 1) 4 +(56, 97, 1) 3 +(56, 98, 1) 2 +(56, 99, 1) 1 +(56, 100, 1) 0 +(57, 1, 1) 0 +(57, 2, 1) 1 +(57, 3, 1) 2 +(57, 4, 1) 3 +(57, 5, 1) 4 +(57, 6, 1) 5 +(57, 7, 1) 6 +(57, 8, 1) 7 +(57, 9, 1) 8 +(57, 10, 1) 9 +(57, 11, 1) 10 +(57, 12, 1) 11 +(57, 13, 1) 12 +(57, 14, 1) 13 +(57, 15, 1) 14 +(57, 16, 1) 14 +(57, 17, 1) 15 +(57, 18, 1) 16 +(57, 19, 1) 17 +(57, 20, 1) 18 +(57, 21, 1) 19 +(57, 22, 1) 20 +(57, 23, 1) 21 +(57, 24, 1) 22 +(57, 25, 1) 23 +(57, 26, 1) 24 +(57, 27, 1) 25 +(57, 28, 1) 26 +(57, 29, 1) 27 +(57, 30, 1) 28 +(57, 31, 1) 29 +(57, 32, 1) 30 +(57, 33, 1) 31 +(57, 34, 1) 32 +(57, 35, 1) 33 +(57, 36, 1) 34 +(57, 37, 1) 35 +(57, 38, 1) 35 +(57, 39, 1) 36 +(57, 40, 1) 37 +(57, 61, 1) 37 +(57, 62, 1) 36 +(57, 63, 1) 35 +(57, 64, 1) 35 +(57, 65, 1) 34 +(57, 66, 1) 33 +(57, 67, 1) 32 +(57, 68, 1) 31 +(57, 69, 1) 30 +(57, 70, 1) 29 +(57, 71, 1) 28 +(57, 72, 1) 27 +(57, 73, 1) 26 +(57, 74, 1) 25 +(57, 75, 1) 24 +(57, 76, 1) 23 +(57, 77, 1) 22 +(57, 78, 1) 21 +(57, 79, 1) 20 +(57, 80, 1) 19 +(57, 81, 1) 18 +(57, 82, 1) 17 +(57, 83, 1) 16 +(57, 84, 1) 15 +(57, 85, 1) 14 +(57, 86, 1) 14 +(57, 87, 1) 13 +(57, 88, 1) 12 +(57, 89, 1) 11 +(57, 90, 1) 10 +(57, 91, 1) 9 +(57, 92, 1) 8 +(57, 93, 1) 7 +(57, 94, 1) 6 +(57, 95, 1) 5 +(57, 96, 1) 4 +(57, 97, 1) 3 +(57, 98, 1) 2 +(57, 99, 1) 1 +(57, 100, 1) 0 +(58, 1, 1) 0 +(58, 2, 1) 1 +(58, 3, 1) 2 +(58, 4, 1) 3 +(58, 5, 1) 4 +(58, 6, 1) 4 +(58, 7, 1) 5 +(58, 8, 1) 6 +(58, 9, 1) 7 +(58, 10, 1) 8 +(58, 11, 1) 9 +(58, 12, 1) 10 +(58, 13, 1) 11 +(58, 14, 1) 12 +(58, 15, 1) 13 +(58, 16, 1) 14 +(58, 17, 1) 15 +(58, 18, 1) 16 +(58, 19, 1) 17 +(58, 20, 1) 18 +(58, 21, 1) 19 +(58, 22, 1) 20 +(58, 23, 1) 21 +(58, 24, 1) 22 +(58, 25, 1) 23 +(58, 26, 1) 24 +(58, 27, 1) 25 +(58, 28, 1) 26 +(58, 29, 1) 27 +(58, 30, 1) 28 +(58, 31, 1) 29 +(58, 32, 1) 30 +(58, 33, 1) 30 +(58, 34, 1) 31 +(58, 35, 1) 32 +(58, 36, 1) 33 +(58, 37, 1) 34 +(58, 38, 1) 35 +(58, 39, 1) 36 +(58, 40, 1) 37 +(58, 41, 1) 37 +(58, 60, 1) 37 +(58, 61, 1) 37 +(58, 62, 1) 36 +(58, 63, 1) 35 +(58, 64, 1) 34 +(58, 65, 1) 33 +(58, 66, 1) 32 +(58, 67, 1) 31 +(58, 68, 1) 30 +(58, 69, 1) 30 +(58, 70, 1) 29 +(58, 71, 1) 28 +(58, 72, 1) 27 +(58, 73, 1) 26 +(58, 74, 1) 25 +(58, 75, 1) 24 +(58, 76, 1) 23 +(58, 77, 1) 22 +(58, 78, 1) 21 +(58, 79, 1) 20 +(58, 80, 1) 19 +(58, 81, 1) 18 +(58, 82, 1) 17 +(58, 83, 1) 16 +(58, 84, 1) 15 +(58, 85, 1) 14 +(58, 86, 1) 13 +(58, 87, 1) 12 +(58, 88, 1) 11 +(58, 89, 1) 10 +(58, 90, 1) 9 +(58, 91, 1) 8 +(58, 92, 1) 7 +(58, 93, 1) 6 +(58, 94, 1) 5 +(58, 95, 1) 4 +(58, 96, 1) 4 +(58, 97, 1) 3 +(58, 98, 1) 2 +(58, 99, 1) 1 +(58, 100, 1) 0 +(59, 1, 1) 0 +(59, 2, 1) 0 +(59, 3, 1) 1 +(59, 4, 1) 2 +(59, 5, 1) 3 +(59, 6, 1) 4 +(59, 7, 1) 5 +(59, 8, 1) 6 +(59, 9, 1) 7 +(59, 10, 1) 8 +(59, 11, 1) 9 +(59, 12, 1) 10 +(59, 13, 1) 11 +(59, 14, 1) 12 +(59, 15, 1) 13 +(59, 16, 1) 14 +(59, 17, 1) 15 +(59, 18, 1) 16 +(59, 19, 1) 17 +(59, 20, 1) 18 +(59, 21, 1) 19 +(59, 22, 1) 20 +(59, 23, 1) 21 +(59, 24, 1) 22 +(59, 25, 1) 23 +(59, 26, 1) 24 +(59, 27, 1) 25 +(59, 28, 1) 25 +(59, 29, 1) 26 +(59, 30, 1) 27 +(59, 31, 1) 28 +(59, 32, 1) 29 +(59, 33, 1) 30 +(59, 34, 1) 31 +(59, 35, 1) 32 +(59, 36, 1) 33 +(59, 37, 1) 34 +(59, 38, 1) 34 +(59, 39, 1) 35 +(59, 40, 1) 36 +(59, 41, 1) 37 +(59, 42, 1) 38 +(59, 59, 1) 38 +(59, 60, 1) 37 +(59, 61, 1) 36 +(59, 62, 1) 35 +(59, 63, 1) 34 +(59, 64, 1) 34 +(59, 65, 1) 33 +(59, 66, 1) 32 +(59, 67, 1) 31 +(59, 68, 1) 30 +(59, 69, 1) 29 +(59, 70, 1) 28 +(59, 71, 1) 27 +(59, 72, 1) 26 +(59, 73, 1) 25 +(59, 74, 1) 25 +(59, 75, 1) 24 +(59, 76, 1) 23 +(59, 77, 1) 22 +(59, 78, 1) 21 +(59, 79, 1) 20 +(59, 80, 1) 19 +(59, 81, 1) 18 +(59, 82, 1) 17 +(59, 83, 1) 16 +(59, 84, 1) 15 +(59, 85, 1) 14 +(59, 86, 1) 13 +(59, 87, 1) 12 +(59, 88, 1) 11 +(59, 89, 1) 10 +(59, 90, 1) 9 +(59, 91, 1) 8 +(59, 92, 1) 7 +(59, 93, 1) 6 +(59, 94, 1) 5 +(59, 95, 1) 4 +(59, 96, 1) 3 +(59, 97, 1) 2 +(59, 98, 1) 1 +(59, 99, 1) 0 +(59, 100, 1) 0 +(60, 1, 1) 0 +(60, 2, 1) 0 +(60, 3, 1) 1 +(60, 4, 1) 2 +(60, 5, 1) 3 +(60, 6, 1) 4 +(60, 7, 1) 5 +(60, 8, 1) 6 +(60, 9, 1) 7 +(60, 10, 1) 8 +(60, 11, 1) 9 +(60, 12, 1) 10 +(60, 13, 1) 11 +(60, 14, 1) 12 +(60, 15, 1) 13 +(60, 16, 1) 14 +(60, 17, 1) 15 +(60, 18, 1) 16 +(60, 19, 1) 17 +(60, 20, 1) 18 +(60, 21, 1) 19 +(60, 22, 1) 20 +(60, 23, 1) 20 +(60, 24, 1) 21 +(60, 25, 1) 22 +(60, 26, 1) 23 +(60, 27, 1) 24 +(60, 28, 1) 25 +(60, 29, 1) 26 +(60, 30, 1) 27 +(60, 31, 1) 28 +(60, 32, 1) 29 +(60, 33, 1) 30 +(60, 34, 1) 30 +(60, 35, 1) 31 +(60, 36, 1) 32 +(60, 37, 1) 33 +(60, 38, 1) 34 +(60, 39, 1) 35 +(60, 40, 1) 35 +(60, 41, 1) 36 +(60, 42, 1) 37 +(60, 43, 1) 37 +(60, 58, 1) 37 +(60, 59, 1) 37 +(60, 60, 1) 36 +(60, 61, 1) 35 +(60, 62, 1) 35 +(60, 63, 1) 34 +(60, 64, 1) 33 +(60, 65, 1) 32 +(60, 66, 1) 31 +(60, 67, 1) 30 +(60, 68, 1) 30 +(60, 69, 1) 29 +(60, 70, 1) 28 +(60, 71, 1) 27 +(60, 72, 1) 26 +(60, 73, 1) 25 +(60, 74, 1) 24 +(60, 75, 1) 23 +(60, 76, 1) 22 +(60, 77, 1) 21 +(60, 78, 1) 20 +(60, 79, 1) 20 +(60, 80, 1) 19 +(60, 81, 1) 18 +(60, 82, 1) 17 +(60, 83, 1) 16 +(60, 84, 1) 15 +(60, 85, 1) 14 +(60, 86, 1) 13 +(60, 87, 1) 12 +(60, 88, 1) 11 +(60, 89, 1) 10 +(60, 90, 1) 9 +(60, 91, 1) 8 +(60, 92, 1) 7 +(60, 93, 1) 6 +(60, 94, 1) 5 +(60, 95, 1) 4 +(60, 96, 1) 3 +(60, 97, 1) 2 +(60, 98, 1) 1 +(60, 99, 1) 0 +(60, 100, 1) 0 +(61, 4, 1) 2 +(61, 5, 1) 3 +(61, 6, 1) 4 +(61, 7, 1) 5 +(61, 8, 1) 6 +(61, 9, 1) 7 +(61, 10, 1) 8 +(61, 11, 1) 9 +(61, 12, 1) 10 +(61, 13, 1) 11 +(61, 14, 1) 12 +(61, 15, 1) 13 +(61, 16, 1) 14 +(61, 17, 1) 15 +(61, 18, 1) 16 +(61, 19, 1) 16 +(61, 20, 1) 17 +(61, 21, 1) 18 +(61, 22, 1) 19 +(61, 23, 1) 20 +(61, 24, 1) 21 +(61, 25, 1) 22 +(61, 26, 1) 23 +(61, 27, 1) 24 +(61, 28, 1) 25 +(61, 29, 1) 26 +(61, 30, 1) 27 +(61, 31, 1) 27 +(61, 32, 1) 28 +(61, 33, 1) 29 +(61, 34, 1) 30 +(61, 35, 1) 31 +(61, 36, 1) 32 +(61, 37, 1) 32 +(61, 38, 1) 33 +(61, 39, 1) 34 +(61, 40, 1) 35 +(61, 41, 1) 35 +(61, 42, 1) 36 +(61, 43, 1) 37 +(61, 44, 1) 37 +(61, 45, 1) 38 +(61, 56, 1) 38 +(61, 57, 1) 37 +(61, 58, 1) 37 +(61, 59, 1) 36 +(61, 60, 1) 35 +(61, 61, 1) 35 +(61, 62, 1) 34 +(61, 63, 1) 33 +(61, 64, 1) 32 +(61, 65, 1) 32 +(61, 66, 1) 31 +(61, 67, 1) 30 +(61, 68, 1) 29 +(61, 69, 1) 28 +(61, 70, 1) 27 +(61, 71, 1) 27 +(61, 72, 1) 26 +(61, 73, 1) 25 +(61, 74, 1) 24 +(61, 75, 1) 23 +(61, 76, 1) 22 +(61, 77, 1) 21 +(61, 78, 1) 20 +(61, 79, 1) 19 +(61, 80, 1) 18 +(61, 81, 1) 17 +(61, 82, 1) 16 +(61, 83, 1) 16 +(61, 84, 1) 15 +(61, 85, 1) 14 +(61, 86, 1) 13 +(61, 87, 1) 12 +(61, 88, 1) 11 +(61, 89, 1) 10 +(61, 90, 1) 9 +(61, 91, 1) 8 +(61, 92, 1) 7 +(61, 93, 1) 6 +(61, 94, 1) 5 +(61, 95, 1) 4 +(61, 96, 1) 3 +(61, 97, 1) 2 +(62, 4, 1) 2 +(62, 5, 1) 3 +(62, 6, 1) 4 +(62, 7, 1) 5 +(62, 8, 1) 6 +(62, 9, 1) 7 +(62, 10, 1) 8 +(62, 11, 1) 9 +(62, 12, 1) 9 +(62, 13, 1) 10 +(62, 14, 1) 11 +(62, 15, 1) 12 +(62, 16, 1) 13 +(62, 17, 1) 14 +(62, 18, 1) 15 +(62, 19, 1) 16 +(62, 20, 1) 17 +(62, 21, 1) 18 +(62, 22, 1) 19 +(62, 23, 1) 20 +(62, 24, 1) 21 +(62, 25, 1) 22 +(62, 26, 1) 23 +(62, 27, 1) 23 +(62, 28, 1) 24 +(62, 29, 1) 25 +(62, 30, 1) 26 +(62, 31, 1) 27 +(62, 32, 1) 28 +(62, 33, 1) 29 +(62, 34, 1) 29 +(62, 35, 1) 30 +(62, 36, 1) 31 +(62, 37, 1) 32 +(62, 38, 1) 33 +(62, 39, 1) 33 +(62, 40, 1) 34 +(62, 41, 1) 35 +(62, 42, 1) 35 +(62, 43, 1) 36 +(62, 44, 1) 36 +(62, 45, 1) 37 +(62, 46, 1) 37 +(62, 47, 1) 37 +(62, 48, 1) 38 +(62, 49, 1) 38 +(62, 50, 1) 38 +(62, 51, 1) 38 +(62, 52, 1) 38 +(62, 53, 1) 38 +(62, 54, 1) 37 +(62, 55, 1) 37 +(62, 56, 1) 37 +(62, 57, 1) 36 +(62, 58, 1) 36 +(62, 59, 1) 35 +(62, 60, 1) 35 +(62, 61, 1) 34 +(62, 62, 1) 33 +(62, 63, 1) 33 +(62, 64, 1) 32 +(62, 65, 1) 31 +(62, 66, 1) 30 +(62, 67, 1) 29 +(62, 68, 1) 29 +(62, 69, 1) 28 +(62, 70, 1) 27 +(62, 71, 1) 26 +(62, 72, 1) 25 +(62, 73, 1) 24 +(62, 74, 1) 23 +(62, 75, 1) 23 +(62, 76, 1) 22 +(62, 77, 1) 21 +(62, 78, 1) 20 +(62, 79, 1) 19 +(62, 80, 1) 18 +(62, 81, 1) 17 +(62, 82, 1) 16 +(62, 83, 1) 15 +(62, 84, 1) 14 +(62, 85, 1) 13 +(62, 86, 1) 12 +(62, 87, 1) 11 +(62, 88, 1) 10 +(62, 89, 1) 9 +(62, 90, 1) 9 +(62, 91, 1) 8 +(62, 92, 1) 7 +(62, 93, 1) 6 +(62, 94, 1) 5 +(62, 95, 1) 4 +(62, 96, 1) 3 +(62, 97, 1) 2 +(63, 4, 1) 2 +(63, 5, 1) 3 +(63, 6, 1) 3 +(63, 7, 1) 4 +(63, 8, 1) 5 +(63, 9, 1) 6 +(63, 10, 1) 7 +(63, 11, 1) 8 +(63, 12, 1) 9 +(63, 13, 1) 10 +(63, 14, 1) 11 +(63, 15, 1) 12 +(63, 16, 1) 13 +(63, 17, 1) 14 +(63, 18, 1) 15 +(63, 19, 1) 16 +(63, 20, 1) 17 +(63, 21, 1) 18 +(63, 22, 1) 18 +(63, 23, 1) 19 +(63, 24, 1) 20 +(63, 25, 1) 21 +(63, 26, 1) 22 +(63, 27, 1) 23 +(63, 28, 1) 24 +(63, 29, 1) 25 +(63, 30, 1) 26 +(63, 31, 1) 26 +(63, 32, 1) 27 +(63, 33, 1) 28 +(63, 34, 1) 29 +(63, 35, 1) 30 +(63, 36, 1) 30 +(63, 37, 1) 31 +(63, 38, 1) 32 +(63, 39, 1) 33 +(63, 40, 1) 33 +(63, 41, 1) 34 +(63, 42, 1) 34 +(63, 43, 1) 35 +(63, 44, 1) 35 +(63, 45, 1) 36 +(63, 46, 1) 36 +(63, 47, 1) 37 +(63, 48, 1) 37 +(63, 49, 1) 37 +(63, 50, 1) 37 +(63, 51, 1) 37 +(63, 52, 1) 37 +(63, 53, 1) 37 +(63, 54, 1) 37 +(63, 55, 1) 36 +(63, 56, 1) 36 +(63, 57, 1) 35 +(63, 58, 1) 35 +(63, 59, 1) 34 +(63, 60, 1) 34 +(63, 61, 1) 33 +(63, 62, 1) 33 +(63, 63, 1) 32 +(63, 64, 1) 31 +(63, 65, 1) 30 +(63, 66, 1) 30 +(63, 67, 1) 29 +(63, 68, 1) 28 +(63, 69, 1) 27 +(63, 70, 1) 26 +(63, 71, 1) 26 +(63, 72, 1) 25 +(63, 73, 1) 24 +(63, 74, 1) 23 +(63, 75, 1) 22 +(63, 76, 1) 21 +(63, 77, 1) 20 +(63, 78, 1) 19 +(63, 79, 1) 18 +(63, 80, 1) 18 +(63, 81, 1) 17 +(63, 82, 1) 16 +(63, 83, 1) 15 +(63, 84, 1) 14 +(63, 85, 1) 13 +(63, 86, 1) 12 +(63, 87, 1) 11 +(63, 88, 1) 10 +(63, 89, 1) 9 +(63, 90, 1) 8 +(63, 91, 1) 7 +(63, 92, 1) 6 +(63, 93, 1) 5 +(63, 94, 1) 4 +(63, 95, 1) 3 +(63, 96, 1) 3 +(63, 97, 1) 2 +(64, 4, 1) 1 +(64, 5, 1) 2 +(64, 6, 1) 3 +(64, 7, 1) 4 +(64, 8, 1) 5 +(64, 9, 1) 6 +(64, 10, 1) 7 +(64, 11, 1) 8 +(64, 12, 1) 9 +(64, 13, 1) 10 +(64, 14, 1) 11 +(64, 15, 1) 12 +(64, 16, 1) 13 +(64, 17, 1) 14 +(64, 18, 1) 14 +(64, 19, 1) 15 +(64, 20, 1) 16 +(64, 21, 1) 17 +(64, 22, 1) 18 +(64, 23, 1) 19 +(64, 24, 1) 20 +(64, 25, 1) 21 +(64, 26, 1) 22 +(64, 27, 1) 22 +(64, 28, 1) 23 +(64, 29, 1) 24 +(64, 30, 1) 25 +(64, 31, 1) 26 +(64, 32, 1) 27 +(64, 33, 1) 27 +(64, 34, 1) 28 +(64, 35, 1) 29 +(64, 36, 1) 30 +(64, 37, 1) 30 +(64, 38, 1) 31 +(64, 39, 1) 32 +(64, 40, 1) 32 +(64, 41, 1) 33 +(64, 42, 1) 34 +(64, 43, 1) 34 +(64, 44, 1) 35 +(64, 45, 1) 35 +(64, 46, 1) 35 +(64, 47, 1) 36 +(64, 48, 1) 36 +(64, 49, 1) 36 +(64, 50, 1) 36 +(64, 51, 1) 36 +(64, 52, 1) 36 +(64, 53, 1) 36 +(64, 54, 1) 36 +(64, 55, 1) 35 +(64, 56, 1) 35 +(64, 57, 1) 35 +(64, 58, 1) 34 +(64, 59, 1) 34 +(64, 60, 1) 33 +(64, 61, 1) 32 +(64, 62, 1) 32 +(64, 63, 1) 31 +(64, 64, 1) 30 +(64, 65, 1) 30 +(64, 66, 1) 29 +(64, 67, 1) 28 +(64, 68, 1) 27 +(64, 69, 1) 27 +(64, 70, 1) 26 +(64, 71, 1) 25 +(64, 72, 1) 24 +(64, 73, 1) 23 +(64, 74, 1) 22 +(64, 75, 1) 22 +(64, 76, 1) 21 +(64, 77, 1) 20 +(64, 78, 1) 19 +(64, 79, 1) 18 +(64, 80, 1) 17 +(64, 81, 1) 16 +(64, 82, 1) 15 +(64, 83, 1) 14 +(64, 84, 1) 14 +(64, 85, 1) 13 +(64, 86, 1) 12 +(64, 87, 1) 11 +(64, 88, 1) 10 +(64, 89, 1) 9 +(64, 90, 1) 8 +(64, 91, 1) 7 +(64, 92, 1) 6 +(64, 93, 1) 5 +(64, 94, 1) 4 +(64, 95, 1) 3 +(64, 96, 1) 2 +(64, 97, 1) 1 +(65, 4, 1) 1 +(65, 5, 1) 2 +(65, 6, 1) 3 +(65, 7, 1) 4 +(65, 8, 1) 5 +(65, 9, 1) 6 +(65, 10, 1) 7 +(65, 11, 1) 8 +(65, 12, 1) 8 +(65, 13, 1) 9 +(65, 14, 1) 10 +(65, 15, 1) 11 +(65, 16, 1) 12 +(65, 17, 1) 13 +(65, 18, 1) 14 +(65, 19, 1) 15 +(65, 20, 1) 16 +(65, 21, 1) 17 +(65, 22, 1) 18 +(65, 23, 1) 19 +(65, 24, 1) 19 +(65, 25, 1) 20 +(65, 26, 1) 21 +(65, 27, 1) 22 +(65, 28, 1) 23 +(65, 29, 1) 24 +(65, 30, 1) 24 +(65, 31, 1) 25 +(65, 32, 1) 26 +(65, 33, 1) 27 +(65, 34, 1) 28 +(65, 35, 1) 28 +(65, 36, 1) 29 +(65, 37, 1) 30 +(65, 38, 1) 30 +(65, 39, 1) 31 +(65, 40, 1) 32 +(65, 41, 1) 32 +(65, 42, 1) 33 +(65, 43, 1) 33 +(65, 44, 1) 34 +(65, 45, 1) 34 +(65, 46, 1) 34 +(65, 47, 1) 35 +(65, 48, 1) 35 +(65, 49, 1) 35 +(65, 50, 1) 35 +(65, 51, 1) 35 +(65, 52, 1) 35 +(65, 53, 1) 35 +(65, 54, 1) 35 +(65, 55, 1) 34 +(65, 56, 1) 34 +(65, 57, 1) 34 +(65, 58, 1) 33 +(65, 59, 1) 33 +(65, 60, 1) 32 +(65, 61, 1) 32 +(65, 62, 1) 31 +(65, 63, 1) 30 +(65, 64, 1) 30 +(65, 65, 1) 29 +(65, 66, 1) 28 +(65, 67, 1) 28 +(65, 68, 1) 27 +(65, 69, 1) 26 +(65, 70, 1) 25 +(65, 71, 1) 24 +(65, 72, 1) 24 +(65, 73, 1) 23 +(65, 74, 1) 22 +(65, 75, 1) 21 +(65, 76, 1) 20 +(65, 77, 1) 19 +(65, 78, 1) 19 +(65, 79, 1) 18 +(65, 80, 1) 17 +(65, 81, 1) 16 +(65, 82, 1) 15 +(65, 83, 1) 14 +(65, 84, 1) 13 +(65, 85, 1) 12 +(65, 86, 1) 11 +(65, 87, 1) 10 +(65, 88, 1) 9 +(65, 89, 1) 8 +(65, 90, 1) 8 +(65, 91, 1) 7 +(65, 92, 1) 6 +(65, 93, 1) 5 +(65, 94, 1) 4 +(65, 95, 1) 3 +(65, 96, 1) 2 +(65, 97, 1) 1 +(66, 6, 1) 3 +(66, 7, 1) 4 +(66, 8, 1) 5 +(66, 9, 1) 6 +(66, 10, 1) 6 +(66, 11, 1) 7 +(66, 12, 1) 8 +(66, 13, 1) 9 +(66, 14, 1) 10 +(66, 15, 1) 11 +(66, 16, 1) 12 +(66, 17, 1) 13 +(66, 18, 1) 14 +(66, 19, 1) 15 +(66, 20, 1) 16 +(66, 21, 1) 16 +(66, 22, 1) 17 +(66, 23, 1) 18 +(66, 24, 1) 19 +(66, 25, 1) 20 +(66, 26, 1) 21 +(66, 27, 1) 21 +(66, 28, 1) 22 +(66, 29, 1) 23 +(66, 30, 1) 24 +(66, 31, 1) 25 +(66, 32, 1) 25 +(66, 33, 1) 26 +(66, 34, 1) 27 +(66, 35, 1) 28 +(66, 36, 1) 28 +(66, 37, 1) 29 +(66, 38, 1) 30 +(66, 39, 1) 30 +(66, 40, 1) 31 +(66, 41, 1) 31 +(66, 42, 1) 32 +(66, 43, 1) 32 +(66, 44, 1) 33 +(66, 45, 1) 33 +(66, 46, 1) 33 +(66, 47, 1) 34 +(66, 48, 1) 34 +(66, 49, 1) 34 +(66, 50, 1) 34 +(66, 51, 1) 34 +(66, 52, 1) 34 +(66, 53, 1) 34 +(66, 54, 1) 34 +(66, 55, 1) 33 +(66, 56, 1) 33 +(66, 57, 1) 33 +(66, 58, 1) 32 +(66, 59, 1) 32 +(66, 60, 1) 31 +(66, 61, 1) 31 +(66, 62, 1) 30 +(66, 63, 1) 30 +(66, 64, 1) 29 +(66, 65, 1) 28 +(66, 66, 1) 28 +(66, 67, 1) 27 +(66, 68, 1) 26 +(66, 69, 1) 25 +(66, 70, 1) 25 +(66, 71, 1) 24 +(66, 72, 1) 23 +(66, 73, 1) 22 +(66, 74, 1) 21 +(66, 75, 1) 21 +(66, 76, 1) 20 +(66, 77, 1) 19 +(66, 78, 1) 18 +(66, 79, 1) 17 +(66, 80, 1) 16 +(66, 81, 1) 16 +(66, 82, 1) 15 +(66, 83, 1) 14 +(66, 84, 1) 13 +(66, 85, 1) 12 +(66, 86, 1) 11 +(66, 87, 1) 10 +(66, 88, 1) 9 +(66, 89, 1) 8 +(66, 90, 1) 7 +(66, 91, 1) 6 +(66, 92, 1) 6 +(66, 93, 1) 5 +(66, 94, 1) 4 +(66, 95, 1) 3 +(67, 6, 1) 2 +(67, 7, 1) 3 +(67, 8, 1) 4 +(67, 9, 1) 5 +(67, 10, 1) 6 +(67, 11, 1) 7 +(67, 12, 1) 8 +(67, 13, 1) 9 +(67, 14, 1) 10 +(67, 15, 1) 11 +(67, 16, 1) 11 +(67, 17, 1) 12 +(67, 18, 1) 13 +(67, 19, 1) 14 +(67, 20, 1) 15 +(67, 21, 1) 16 +(67, 22, 1) 17 +(67, 23, 1) 18 +(67, 24, 1) 18 +(67, 25, 1) 19 +(67, 26, 1) 20 +(67, 27, 1) 21 +(67, 28, 1) 22 +(67, 29, 1) 23 +(67, 30, 1) 23 +(67, 31, 1) 24 +(67, 32, 1) 25 +(67, 33, 1) 26 +(67, 34, 1) 26 +(67, 35, 1) 27 +(67, 36, 1) 28 +(67, 37, 1) 28 +(67, 38, 1) 29 +(67, 39, 1) 29 +(67, 40, 1) 30 +(67, 41, 1) 30 +(67, 42, 1) 31 +(67, 43, 1) 31 +(67, 44, 1) 32 +(67, 45, 1) 32 +(67, 46, 1) 32 +(67, 47, 1) 33 +(67, 48, 1) 33 +(67, 49, 1) 33 +(67, 50, 1) 33 +(67, 51, 1) 33 +(67, 52, 1) 33 +(67, 53, 1) 33 +(67, 54, 1) 33 +(67, 55, 1) 32 +(67, 56, 1) 32 +(67, 57, 1) 32 +(67, 58, 1) 31 +(67, 59, 1) 31 +(67, 60, 1) 30 +(67, 61, 1) 30 +(67, 62, 1) 29 +(67, 63, 1) 29 +(67, 64, 1) 28 +(67, 65, 1) 28 +(67, 66, 1) 27 +(67, 67, 1) 26 +(67, 68, 1) 26 +(67, 69, 1) 25 +(67, 70, 1) 24 +(67, 71, 1) 23 +(67, 72, 1) 23 +(67, 73, 1) 22 +(67, 74, 1) 21 +(67, 75, 1) 20 +(67, 76, 1) 19 +(67, 77, 1) 18 +(67, 78, 1) 18 +(67, 79, 1) 17 +(67, 80, 1) 16 +(67, 81, 1) 15 +(67, 82, 1) 14 +(67, 83, 1) 13 +(67, 84, 1) 12 +(67, 85, 1) 11 +(67, 86, 1) 11 +(67, 87, 1) 10 +(67, 88, 1) 9 +(67, 89, 1) 8 +(67, 90, 1) 7 +(67, 91, 1) 6 +(67, 92, 1) 5 +(67, 93, 1) 4 +(67, 94, 1) 3 +(67, 95, 1) 2 +(68, 6, 1) 2 +(68, 7, 1) 3 +(68, 8, 1) 4 +(68, 9, 1) 5 +(68, 10, 1) 6 +(68, 11, 1) 7 +(68, 12, 1) 7 +(68, 13, 1) 8 +(68, 14, 1) 9 +(68, 15, 1) 10 +(68, 16, 1) 11 +(68, 17, 1) 12 +(68, 18, 1) 13 +(68, 19, 1) 14 +(68, 20, 1) 15 +(68, 21, 1) 15 +(68, 22, 1) 16 +(68, 23, 1) 17 +(68, 24, 1) 18 +(68, 25, 1) 19 +(68, 26, 1) 20 +(68, 27, 1) 20 +(68, 28, 1) 21 +(68, 29, 1) 22 +(68, 30, 1) 23 +(68, 31, 1) 23 +(68, 32, 1) 24 +(68, 33, 1) 25 +(68, 34, 1) 26 +(68, 35, 1) 26 +(68, 36, 1) 27 +(68, 37, 1) 27 +(68, 38, 1) 28 +(68, 39, 1) 29 +(68, 40, 1) 29 +(68, 41, 1) 30 +(68, 42, 1) 30 +(68, 43, 1) 30 +(68, 44, 1) 31 +(68, 45, 1) 31 +(68, 46, 1) 31 +(68, 47, 1) 32 +(68, 48, 1) 32 +(68, 49, 1) 32 +(68, 50, 1) 32 +(68, 51, 1) 32 +(68, 52, 1) 32 +(68, 53, 1) 32 +(68, 54, 1) 32 +(68, 55, 1) 31 +(68, 56, 1) 31 +(68, 57, 1) 31 +(68, 58, 1) 30 +(68, 59, 1) 30 +(68, 60, 1) 30 +(68, 61, 1) 29 +(68, 62, 1) 29 +(68, 63, 1) 28 +(68, 64, 1) 27 +(68, 65, 1) 27 +(68, 66, 1) 26 +(68, 67, 1) 26 +(68, 68, 1) 25 +(68, 69, 1) 24 +(68, 70, 1) 23 +(68, 71, 1) 23 +(68, 72, 1) 22 +(68, 73, 1) 21 +(68, 74, 1) 20 +(68, 75, 1) 20 +(68, 76, 1) 19 +(68, 77, 1) 18 +(68, 78, 1) 17 +(68, 79, 1) 16 +(68, 80, 1) 15 +(68, 81, 1) 15 +(68, 82, 1) 14 +(68, 83, 1) 13 +(68, 84, 1) 12 +(68, 85, 1) 11 +(68, 86, 1) 10 +(68, 87, 1) 9 +(68, 88, 1) 8 +(68, 89, 1) 7 +(68, 90, 1) 7 +(68, 91, 1) 6 +(68, 92, 1) 5 +(68, 93, 1) 4 +(68, 94, 1) 3 +(68, 95, 1) 2 +(69, 6, 1) 2 +(69, 7, 1) 2 +(69, 8, 1) 3 +(69, 9, 1) 4 +(69, 10, 1) 5 +(69, 11, 1) 6 +(69, 12, 1) 7 +(69, 13, 1) 8 +(69, 14, 1) 9 +(69, 15, 1) 10 +(69, 16, 1) 11 +(69, 17, 1) 11 +(69, 18, 1) 12 +(69, 19, 1) 13 +(69, 20, 1) 14 +(69, 21, 1) 15 +(69, 22, 1) 16 +(69, 23, 1) 17 +(69, 24, 1) 17 +(69, 25, 1) 18 +(69, 26, 1) 19 +(69, 27, 1) 20 +(69, 28, 1) 20 +(69, 29, 1) 21 +(69, 30, 1) 22 +(69, 31, 1) 23 +(69, 32, 1) 23 +(69, 33, 1) 24 +(69, 34, 1) 25 +(69, 35, 1) 25 +(69, 36, 1) 26 +(69, 37, 1) 27 +(69, 38, 1) 27 +(69, 39, 1) 28 +(69, 40, 1) 28 +(69, 41, 1) 29 +(69, 42, 1) 29 +(69, 43, 1) 30 +(69, 44, 1) 30 +(69, 45, 1) 30 +(69, 46, 1) 30 +(69, 47, 1) 31 +(69, 48, 1) 31 +(69, 49, 1) 31 +(69, 50, 1) 31 +(69, 51, 1) 31 +(69, 52, 1) 31 +(69, 53, 1) 31 +(69, 54, 1) 31 +(69, 55, 1) 30 +(69, 56, 1) 30 +(69, 57, 1) 30 +(69, 58, 1) 30 +(69, 59, 1) 29 +(69, 60, 1) 29 +(69, 61, 1) 28 +(69, 62, 1) 28 +(69, 63, 1) 27 +(69, 64, 1) 27 +(69, 65, 1) 26 +(69, 66, 1) 25 +(69, 67, 1) 25 +(69, 68, 1) 24 +(69, 69, 1) 23 +(69, 70, 1) 23 +(69, 71, 1) 22 +(69, 72, 1) 21 +(69, 73, 1) 20 +(69, 74, 1) 20 +(69, 75, 1) 19 +(69, 76, 1) 18 +(69, 77, 1) 17 +(69, 78, 1) 17 +(69, 79, 1) 16 +(69, 80, 1) 15 +(69, 81, 1) 14 +(69, 82, 1) 13 +(69, 83, 1) 12 +(69, 84, 1) 11 +(69, 85, 1) 11 +(69, 86, 1) 10 +(69, 87, 1) 9 +(69, 88, 1) 8 +(69, 89, 1) 7 +(69, 90, 1) 6 +(69, 91, 1) 5 +(69, 92, 1) 4 +(69, 93, 1) 3 +(69, 94, 1) 2 +(69, 95, 1) 2 +(70, 6, 1) 1 +(70, 7, 1) 2 +(70, 8, 1) 3 +(70, 9, 1) 4 +(70, 10, 1) 5 +(70, 11, 1) 6 +(70, 12, 1) 7 +(70, 13, 1) 7 +(70, 14, 1) 8 +(70, 15, 1) 9 +(70, 16, 1) 10 +(70, 17, 1) 11 +(70, 18, 1) 12 +(70, 19, 1) 13 +(70, 20, 1) 13 +(70, 21, 1) 14 +(70, 22, 1) 15 +(70, 23, 1) 16 +(70, 24, 1) 17 +(70, 25, 1) 18 +(70, 26, 1) 18 +(70, 27, 1) 19 +(70, 28, 1) 20 +(70, 29, 1) 21 +(70, 30, 1) 21 +(70, 31, 1) 22 +(70, 32, 1) 23 +(70, 33, 1) 23 +(70, 34, 1) 24 +(70, 35, 1) 25 +(70, 36, 1) 25 +(70, 37, 1) 26 +(70, 38, 1) 26 +(70, 39, 1) 27 +(70, 40, 1) 27 +(70, 41, 1) 28 +(70, 42, 1) 28 +(70, 43, 1) 29 +(70, 44, 1) 29 +(70, 45, 1) 29 +(70, 46, 1) 30 +(70, 47, 1) 30 +(70, 48, 1) 30 +(70, 49, 1) 30 +(70, 50, 1) 30 +(70, 51, 1) 30 +(70, 52, 1) 30 +(70, 53, 1) 30 +(70, 54, 1) 30 +(70, 55, 1) 30 +(70, 56, 1) 29 +(70, 57, 1) 29 +(70, 58, 1) 29 +(70, 59, 1) 28 +(70, 60, 1) 28 +(70, 61, 1) 27 +(70, 62, 1) 27 +(70, 63, 1) 26 +(70, 64, 1) 26 +(70, 65, 1) 25 +(70, 66, 1) 25 +(70, 67, 1) 24 +(70, 68, 1) 23 +(70, 69, 1) 23 +(70, 70, 1) 22 +(70, 71, 1) 21 +(70, 72, 1) 21 +(70, 73, 1) 20 +(70, 74, 1) 19 +(70, 75, 1) 18 +(70, 76, 1) 18 +(70, 77, 1) 17 +(70, 78, 1) 16 +(70, 79, 1) 15 +(70, 80, 1) 14 +(70, 81, 1) 13 +(70, 82, 1) 13 +(70, 83, 1) 12 +(70, 84, 1) 11 +(70, 85, 1) 10 +(70, 86, 1) 9 +(70, 87, 1) 8 +(70, 88, 1) 7 +(70, 89, 1) 7 +(70, 90, 1) 6 +(70, 91, 1) 5 +(70, 92, 1) 4 +(70, 93, 1) 3 +(70, 94, 1) 2 +(70, 95, 1) 1 +(71, 6, 1) 1 +(71, 7, 1) 2 +(71, 8, 1) 3 +(71, 9, 1) 4 +(71, 10, 1) 5 +(71, 11, 1) 5 +(71, 12, 1) 6 +(71, 13, 1) 7 +(71, 14, 1) 8 +(71, 15, 1) 9 +(71, 16, 1) 10 +(71, 17, 1) 11 +(71, 18, 1) 11 +(71, 19, 1) 12 +(71, 20, 1) 13 +(71, 21, 1) 14 +(71, 22, 1) 15 +(71, 23, 1) 15 +(71, 24, 1) 16 +(71, 25, 1) 17 +(71, 26, 1) 18 +(71, 27, 1) 19 +(71, 28, 1) 19 +(71, 29, 1) 20 +(71, 30, 1) 21 +(71, 31, 1) 21 +(71, 32, 1) 22 +(71, 33, 1) 23 +(71, 34, 1) 23 +(71, 35, 1) 24 +(71, 36, 1) 24 +(71, 37, 1) 25 +(71, 38, 1) 26 +(71, 39, 1) 26 +(71, 40, 1) 27 +(71, 41, 1) 27 +(71, 42, 1) 27 +(71, 43, 1) 28 +(71, 44, 1) 28 +(71, 45, 1) 28 +(71, 46, 1) 29 +(71, 47, 1) 29 +(71, 48, 1) 29 +(71, 49, 1) 29 +(71, 50, 1) 29 +(71, 51, 1) 29 +(71, 52, 1) 29 +(71, 53, 1) 29 +(71, 54, 1) 29 +(71, 55, 1) 29 +(71, 56, 1) 28 +(71, 57, 1) 28 +(71, 58, 1) 28 +(71, 59, 1) 27 +(71, 60, 1) 27 +(71, 61, 1) 27 +(71, 62, 1) 26 +(71, 63, 1) 26 +(71, 64, 1) 25 +(71, 65, 1) 24 +(71, 66, 1) 24 +(71, 67, 1) 23 +(71, 68, 1) 23 +(71, 69, 1) 22 +(71, 70, 1) 21 +(71, 71, 1) 21 +(71, 72, 1) 20 +(71, 73, 1) 19 +(71, 74, 1) 19 +(71, 75, 1) 18 +(71, 76, 1) 17 +(71, 77, 1) 16 +(71, 78, 1) 15 +(71, 79, 1) 15 +(71, 80, 1) 14 +(71, 81, 1) 13 +(71, 82, 1) 12 +(71, 83, 1) 11 +(71, 84, 1) 11 +(71, 85, 1) 10 +(71, 86, 1) 9 +(71, 87, 1) 8 +(71, 88, 1) 7 +(71, 89, 1) 6 +(71, 90, 1) 5 +(71, 91, 1) 5 +(71, 92, 1) 4 +(71, 93, 1) 3 +(71, 94, 1) 2 +(71, 95, 1) 1 +(72, 6, 1) 1 +(72, 7, 1) 1 +(72, 8, 1) 2 +(72, 9, 1) 3 +(72, 10, 1) 4 +(72, 11, 1) 5 +(72, 12, 1) 6 +(72, 13, 1) 7 +(72, 14, 1) 7 +(72, 15, 1) 8 +(72, 16, 1) 9 +(72, 17, 1) 10 +(72, 18, 1) 11 +(72, 19, 1) 12 +(72, 20, 1) 12 +(72, 21, 1) 13 +(72, 22, 1) 14 +(72, 23, 1) 15 +(72, 24, 1) 16 +(72, 25, 1) 16 +(72, 26, 1) 17 +(72, 27, 1) 18 +(72, 28, 1) 19 +(72, 29, 1) 19 +(72, 30, 1) 20 +(72, 31, 1) 21 +(72, 32, 1) 21 +(72, 33, 1) 22 +(72, 34, 1) 23 +(72, 35, 1) 23 +(72, 36, 1) 24 +(72, 37, 1) 24 +(72, 38, 1) 25 +(72, 39, 1) 25 +(72, 40, 1) 26 +(72, 41, 1) 26 +(72, 42, 1) 26 +(72, 43, 1) 27 +(72, 44, 1) 27 +(72, 45, 1) 27 +(72, 46, 1) 28 +(72, 47, 1) 28 +(72, 48, 1) 28 +(72, 49, 1) 28 +(72, 50, 1) 28 +(72, 51, 1) 28 +(72, 52, 1) 28 +(72, 53, 1) 28 +(72, 54, 1) 28 +(72, 55, 1) 28 +(72, 56, 1) 27 +(72, 57, 1) 27 +(72, 58, 1) 27 +(72, 59, 1) 26 +(72, 60, 1) 26 +(72, 61, 1) 26 +(72, 62, 1) 25 +(72, 63, 1) 25 +(72, 64, 1) 24 +(72, 65, 1) 24 +(72, 66, 1) 23 +(72, 67, 1) 23 +(72, 68, 1) 22 +(72, 69, 1) 21 +(72, 70, 1) 21 +(72, 71, 1) 20 +(72, 72, 1) 19 +(72, 73, 1) 19 +(72, 74, 1) 18 +(72, 75, 1) 17 +(72, 76, 1) 16 +(72, 77, 1) 16 +(72, 78, 1) 15 +(72, 79, 1) 14 +(72, 80, 1) 13 +(72, 81, 1) 12 +(72, 82, 1) 12 +(72, 83, 1) 11 +(72, 84, 1) 10 +(72, 85, 1) 9 +(72, 86, 1) 8 +(72, 87, 1) 7 +(72, 88, 1) 7 +(72, 89, 1) 6 +(72, 90, 1) 5 +(72, 91, 1) 4 +(72, 92, 1) 3 +(72, 93, 1) 2 +(72, 94, 1) 1 +(72, 95, 1) 1 +(73, 6, 1) 0 +(73, 7, 1) 1 +(73, 8, 1) 2 +(73, 9, 1) 3 +(73, 10, 1) 4 +(73, 11, 1) 4 +(73, 12, 1) 5 +(73, 13, 1) 6 +(73, 14, 1) 7 +(73, 15, 1) 8 +(73, 16, 1) 9 +(73, 17, 1) 9 +(73, 18, 1) 10 +(73, 19, 1) 11 +(73, 20, 1) 12 +(73, 21, 1) 13 +(73, 22, 1) 13 +(73, 23, 1) 14 +(73, 24, 1) 15 +(73, 25, 1) 16 +(73, 26, 1) 16 +(73, 27, 1) 17 +(73, 28, 1) 18 +(73, 29, 1) 19 +(73, 30, 1) 19 +(73, 31, 1) 20 +(73, 32, 1) 20 +(73, 33, 1) 21 +(73, 34, 1) 22 +(73, 35, 1) 22 +(73, 36, 1) 23 +(73, 37, 1) 23 +(73, 38, 1) 24 +(73, 39, 1) 24 +(73, 40, 1) 25 +(73, 41, 1) 25 +(73, 42, 1) 25 +(73, 43, 1) 26 +(73, 44, 1) 26 +(73, 45, 1) 26 +(73, 46, 1) 27 +(73, 47, 1) 27 +(73, 48, 1) 27 +(73, 49, 1) 27 +(73, 50, 1) 27 +(73, 51, 1) 27 +(73, 52, 1) 27 +(73, 53, 1) 27 +(73, 54, 1) 27 +(73, 55, 1) 27 +(73, 56, 1) 26 +(73, 57, 1) 26 +(73, 58, 1) 26 +(73, 59, 1) 25 +(73, 60, 1) 25 +(73, 61, 1) 25 +(73, 62, 1) 24 +(73, 63, 1) 24 +(73, 64, 1) 23 +(73, 65, 1) 23 +(73, 66, 1) 22 +(73, 67, 1) 22 +(73, 68, 1) 21 +(73, 69, 1) 20 +(73, 70, 1) 20 +(73, 71, 1) 19 +(73, 72, 1) 19 +(73, 73, 1) 18 +(73, 74, 1) 17 +(73, 75, 1) 16 +(73, 76, 1) 16 +(73, 77, 1) 15 +(73, 78, 1) 14 +(73, 79, 1) 13 +(73, 80, 1) 13 +(73, 81, 1) 12 +(73, 82, 1) 11 +(73, 83, 1) 10 +(73, 84, 1) 9 +(73, 85, 1) 9 +(73, 86, 1) 8 +(73, 87, 1) 7 +(73, 88, 1) 6 +(73, 89, 1) 5 +(73, 90, 1) 4 +(73, 91, 1) 4 +(73, 92, 1) 3 +(73, 93, 1) 2 +(73, 94, 1) 1 +(73, 95, 1) 0 +(74, 6, 1) 0 +(74, 7, 1) 0 +(74, 8, 1) 1 +(74, 9, 1) 2 +(74, 10, 1) 3 +(74, 11, 1) 4 +(74, 12, 1) 5 +(74, 13, 1) 6 +(74, 14, 1) 6 +(74, 15, 1) 7 +(74, 16, 1) 8 +(74, 17, 1) 9 +(74, 18, 1) 10 +(74, 19, 1) 10 +(74, 20, 1) 11 +(74, 21, 1) 12 +(74, 22, 1) 13 +(74, 23, 1) 14 +(74, 24, 1) 14 +(74, 25, 1) 15 +(74, 26, 1) 16 +(74, 27, 1) 16 +(74, 28, 1) 17 +(74, 29, 1) 18 +(74, 30, 1) 18 +(74, 31, 1) 19 +(74, 32, 1) 20 +(74, 33, 1) 20 +(74, 34, 1) 21 +(74, 35, 1) 21 +(74, 36, 1) 22 +(74, 37, 1) 22 +(74, 38, 1) 23 +(74, 39, 1) 23 +(74, 40, 1) 24 +(74, 41, 1) 24 +(74, 42, 1) 25 +(74, 43, 1) 25 +(74, 44, 1) 25 +(74, 45, 1) 25 +(74, 46, 1) 26 +(74, 47, 1) 26 +(74, 48, 1) 26 +(74, 49, 1) 26 +(74, 50, 1) 26 +(74, 51, 1) 26 +(74, 52, 1) 26 +(74, 53, 1) 26 +(74, 54, 1) 26 +(74, 55, 1) 26 +(74, 56, 1) 25 +(74, 57, 1) 25 +(74, 58, 1) 25 +(74, 59, 1) 25 +(74, 60, 1) 24 +(74, 61, 1) 24 +(74, 62, 1) 23 +(74, 63, 1) 23 +(74, 64, 1) 22 +(74, 65, 1) 22 +(74, 66, 1) 21 +(74, 67, 1) 21 +(74, 68, 1) 20 +(74, 69, 1) 20 +(74, 70, 1) 19 +(74, 71, 1) 18 +(74, 72, 1) 18 +(74, 73, 1) 17 +(74, 74, 1) 16 +(74, 75, 1) 16 +(74, 76, 1) 15 +(74, 77, 1) 14 +(74, 78, 1) 14 +(74, 79, 1) 13 +(74, 80, 1) 12 +(74, 81, 1) 11 +(74, 82, 1) 10 +(74, 83, 1) 10 +(74, 84, 1) 9 +(74, 85, 1) 8 +(74, 86, 1) 7 +(74, 87, 1) 6 +(74, 88, 1) 6 +(74, 89, 1) 5 +(74, 90, 1) 4 +(74, 91, 1) 3 +(74, 92, 1) 2 +(74, 93, 1) 1 +(74, 94, 1) 0 +(74, 95, 1) 0 +(75, 6, 1) 0 +(75, 7, 1) 0 +(75, 8, 1) 1 +(75, 9, 1) 2 +(75, 10, 1) 3 +(75, 11, 1) 3 +(75, 12, 1) 4 +(75, 13, 1) 5 +(75, 14, 1) 6 +(75, 15, 1) 7 +(75, 16, 1) 7 +(75, 17, 1) 8 +(75, 18, 1) 9 +(75, 19, 1) 10 +(75, 20, 1) 11 +(75, 21, 1) 11 +(75, 22, 1) 12 +(75, 23, 1) 13 +(75, 24, 1) 14 +(75, 25, 1) 14 +(75, 26, 1) 15 +(75, 27, 1) 16 +(75, 28, 1) 16 +(75, 29, 1) 17 +(75, 30, 1) 18 +(75, 31, 1) 18 +(75, 32, 1) 19 +(75, 33, 1) 19 +(75, 34, 1) 20 +(75, 35, 1) 21 +(75, 36, 1) 21 +(75, 37, 1) 22 +(75, 38, 1) 22 +(75, 39, 1) 22 +(75, 40, 1) 23 +(75, 41, 1) 23 +(75, 42, 1) 24 +(75, 43, 1) 24 +(75, 44, 1) 24 +(75, 45, 1) 24 +(75, 46, 1) 25 +(75, 47, 1) 25 +(75, 48, 1) 25 +(75, 49, 1) 25 +(75, 50, 1) 25 +(75, 51, 1) 25 +(75, 52, 1) 25 +(75, 53, 1) 25 +(75, 54, 1) 25 +(75, 55, 1) 25 +(75, 56, 1) 24 +(75, 57, 1) 24 +(75, 58, 1) 24 +(75, 59, 1) 24 +(75, 60, 1) 23 +(75, 61, 1) 23 +(75, 62, 1) 22 +(75, 63, 1) 22 +(75, 64, 1) 22 +(75, 65, 1) 21 +(75, 66, 1) 21 +(75, 67, 1) 20 +(75, 68, 1) 19 +(75, 69, 1) 19 +(75, 70, 1) 18 +(75, 71, 1) 18 +(75, 72, 1) 17 +(75, 73, 1) 16 +(75, 74, 1) 16 +(75, 75, 1) 15 +(75, 76, 1) 14 +(75, 77, 1) 14 +(75, 78, 1) 13 +(75, 79, 1) 12 +(75, 80, 1) 11 +(75, 81, 1) 11 +(75, 82, 1) 10 +(75, 83, 1) 9 +(75, 84, 1) 8 +(75, 85, 1) 7 +(75, 86, 1) 7 +(75, 87, 1) 6 +(75, 88, 1) 5 +(75, 89, 1) 4 +(75, 90, 1) 3 +(75, 91, 1) 3 +(75, 92, 1) 2 +(75, 93, 1) 1 +(75, 94, 1) 0 +(75, 95, 1) 0 +(76, 9, 1) 1 +(76, 10, 1) 2 +(76, 11, 1) 3 +(76, 12, 1) 4 +(76, 13, 1) 5 +(76, 14, 1) 5 +(76, 15, 1) 6 +(76, 16, 1) 7 +(76, 17, 1) 8 +(76, 18, 1) 9 +(76, 19, 1) 9 +(76, 20, 1) 10 +(76, 21, 1) 11 +(76, 22, 1) 12 +(76, 23, 1) 12 +(76, 24, 1) 13 +(76, 25, 1) 14 +(76, 26, 1) 14 +(76, 27, 1) 15 +(76, 28, 1) 16 +(76, 29, 1) 16 +(76, 30, 1) 17 +(76, 31, 1) 18 +(76, 32, 1) 18 +(76, 33, 1) 19 +(76, 34, 1) 19 +(76, 35, 1) 20 +(76, 36, 1) 20 +(76, 37, 1) 21 +(76, 38, 1) 21 +(76, 39, 1) 22 +(76, 40, 1) 22 +(76, 41, 1) 22 +(76, 42, 1) 23 +(76, 43, 1) 23 +(76, 44, 1) 23 +(76, 45, 1) 23 +(76, 46, 1) 24 +(76, 47, 1) 24 +(76, 48, 1) 24 +(76, 49, 1) 24 +(76, 50, 1) 24 +(76, 51, 1) 24 +(76, 52, 1) 24 +(76, 53, 1) 24 +(76, 54, 1) 24 +(76, 55, 1) 24 +(76, 56, 1) 23 +(76, 57, 1) 23 +(76, 58, 1) 23 +(76, 59, 1) 23 +(76, 60, 1) 22 +(76, 61, 1) 22 +(76, 62, 1) 22 +(76, 63, 1) 21 +(76, 64, 1) 21 +(76, 65, 1) 20 +(76, 66, 1) 20 +(76, 67, 1) 19 +(76, 68, 1) 19 +(76, 69, 1) 18 +(76, 70, 1) 18 +(76, 71, 1) 17 +(76, 72, 1) 16 +(76, 73, 1) 16 +(76, 74, 1) 15 +(76, 75, 1) 14 +(76, 76, 1) 14 +(76, 77, 1) 13 +(76, 78, 1) 12 +(76, 79, 1) 12 +(76, 80, 1) 11 +(76, 81, 1) 10 +(76, 82, 1) 9 +(76, 83, 1) 9 +(76, 84, 1) 8 +(76, 85, 1) 7 +(76, 86, 1) 6 +(76, 87, 1) 5 +(76, 88, 1) 5 +(76, 89, 1) 4 +(76, 90, 1) 3 +(76, 91, 1) 2 +(76, 92, 1) 1 +(77, 9, 1) 1 +(77, 10, 1) 2 +(77, 11, 1) 2 +(77, 12, 1) 3 +(77, 13, 1) 4 +(77, 14, 1) 5 +(77, 15, 1) 6 +(77, 16, 1) 6 +(77, 17, 1) 7 +(77, 18, 1) 8 +(77, 19, 1) 9 +(77, 20, 1) 9 +(77, 21, 1) 10 +(77, 22, 1) 11 +(77, 23, 1) 12 +(77, 24, 1) 12 +(77, 25, 1) 13 +(77, 26, 1) 14 +(77, 27, 1) 14 +(77, 28, 1) 15 +(77, 29, 1) 16 +(77, 30, 1) 16 +(77, 31, 1) 17 +(77, 32, 1) 17 +(77, 33, 1) 18 +(77, 34, 1) 18 +(77, 35, 1) 19 +(77, 36, 1) 19 +(77, 37, 1) 20 +(77, 38, 1) 20 +(77, 39, 1) 21 +(77, 40, 1) 21 +(77, 41, 1) 21 +(77, 42, 1) 22 +(77, 43, 1) 22 +(77, 44, 1) 22 +(77, 45, 1) 22 +(77, 46, 1) 23 +(77, 47, 1) 23 +(77, 48, 1) 23 +(77, 49, 1) 23 +(77, 50, 1) 23 +(77, 51, 1) 23 +(77, 52, 1) 23 +(77, 53, 1) 23 +(77, 54, 1) 23 +(77, 55, 1) 23 +(77, 56, 1) 22 +(77, 57, 1) 22 +(77, 58, 1) 22 +(77, 59, 1) 22 +(77, 60, 1) 21 +(77, 61, 1) 21 +(77, 62, 1) 21 +(77, 63, 1) 20 +(77, 64, 1) 20 +(77, 65, 1) 19 +(77, 66, 1) 19 +(77, 67, 1) 18 +(77, 68, 1) 18 +(77, 69, 1) 17 +(77, 70, 1) 17 +(77, 71, 1) 16 +(77, 72, 1) 16 +(77, 73, 1) 15 +(77, 74, 1) 14 +(77, 75, 1) 14 +(77, 76, 1) 13 +(77, 77, 1) 12 +(77, 78, 1) 12 +(77, 79, 1) 11 +(77, 80, 1) 10 +(77, 81, 1) 9 +(77, 82, 1) 9 +(77, 83, 1) 8 +(77, 84, 1) 7 +(77, 85, 1) 6 +(77, 86, 1) 6 +(77, 87, 1) 5 +(77, 88, 1) 4 +(77, 89, 1) 3 +(77, 90, 1) 2 +(77, 91, 1) 2 +(77, 92, 1) 1 +(78, 9, 1) 0 +(78, 10, 1) 1 +(78, 11, 1) 2 +(78, 12, 1) 3 +(78, 13, 1) 3 +(78, 14, 1) 4 +(78, 15, 1) 5 +(78, 16, 1) 6 +(78, 17, 1) 7 +(78, 18, 1) 7 +(78, 19, 1) 8 +(78, 20, 1) 9 +(78, 21, 1) 9 +(78, 22, 1) 10 +(78, 23, 1) 11 +(78, 24, 1) 12 +(78, 25, 1) 12 +(78, 26, 1) 13 +(78, 27, 1) 14 +(78, 28, 1) 14 +(78, 29, 1) 15 +(78, 30, 1) 15 +(78, 31, 1) 16 +(78, 32, 1) 17 +(78, 33, 1) 17 +(78, 34, 1) 18 +(78, 35, 1) 18 +(78, 36, 1) 19 +(78, 37, 1) 19 +(78, 38, 1) 19 +(78, 39, 1) 20 +(78, 40, 1) 20 +(78, 41, 1) 20 +(78, 42, 1) 21 +(78, 43, 1) 21 +(78, 44, 1) 21 +(78, 45, 1) 21 +(78, 46, 1) 22 +(78, 47, 1) 22 +(78, 48, 1) 22 +(78, 49, 1) 22 +(78, 50, 1) 22 +(78, 51, 1) 22 +(78, 52, 1) 22 +(78, 53, 1) 22 +(78, 54, 1) 22 +(78, 55, 1) 22 +(78, 56, 1) 21 +(78, 57, 1) 21 +(78, 58, 1) 21 +(78, 59, 1) 21 +(78, 60, 1) 20 +(78, 61, 1) 20 +(78, 62, 1) 20 +(78, 63, 1) 19 +(78, 64, 1) 19 +(78, 65, 1) 19 +(78, 66, 1) 18 +(78, 67, 1) 18 +(78, 68, 1) 17 +(78, 69, 1) 17 +(78, 70, 1) 16 +(78, 71, 1) 15 +(78, 72, 1) 15 +(78, 73, 1) 14 +(78, 74, 1) 14 +(78, 75, 1) 13 +(78, 76, 1) 12 +(78, 77, 1) 12 +(78, 78, 1) 11 +(78, 79, 1) 10 +(78, 80, 1) 9 +(78, 81, 1) 9 +(78, 82, 1) 8 +(78, 83, 1) 7 +(78, 84, 1) 7 +(78, 85, 1) 6 +(78, 86, 1) 5 +(78, 87, 1) 4 +(78, 88, 1) 3 +(78, 89, 1) 3 +(78, 90, 1) 2 +(78, 91, 1) 1 +(78, 92, 1) 0 +(79, 9, 1) 0 +(79, 10, 1) 1 +(79, 11, 1) 1 +(79, 12, 1) 2 +(79, 13, 1) 3 +(79, 14, 1) 4 +(79, 15, 1) 4 +(79, 16, 1) 5 +(79, 17, 1) 6 +(79, 18, 1) 7 +(79, 19, 1) 7 +(79, 20, 1) 8 +(79, 21, 1) 9 +(79, 22, 1) 9 +(79, 23, 1) 10 +(79, 24, 1) 11 +(79, 25, 1) 12 +(79, 26, 1) 12 +(79, 27, 1) 13 +(79, 28, 1) 13 +(79, 29, 1) 14 +(79, 30, 1) 15 +(79, 31, 1) 15 +(79, 32, 1) 16 +(79, 33, 1) 16 +(79, 34, 1) 17 +(79, 35, 1) 17 +(79, 36, 1) 18 +(79, 37, 1) 18 +(79, 38, 1) 18 +(79, 39, 1) 19 +(79, 40, 1) 19 +(79, 41, 1) 20 +(79, 42, 1) 20 +(79, 43, 1) 20 +(79, 44, 1) 20 +(79, 45, 1) 20 +(79, 46, 1) 21 +(79, 47, 1) 21 +(79, 48, 1) 21 +(79, 49, 1) 21 +(79, 50, 1) 21 +(79, 51, 1) 21 +(79, 52, 1) 21 +(79, 53, 1) 21 +(79, 54, 1) 21 +(79, 55, 1) 21 +(79, 56, 1) 20 +(79, 57, 1) 20 +(79, 58, 1) 20 +(79, 59, 1) 20 +(79, 60, 1) 20 +(79, 61, 1) 19 +(79, 62, 1) 19 +(79, 63, 1) 18 +(79, 64, 1) 18 +(79, 65, 1) 18 +(79, 66, 1) 17 +(79, 67, 1) 17 +(79, 68, 1) 16 +(79, 69, 1) 16 +(79, 70, 1) 15 +(79, 71, 1) 15 +(79, 72, 1) 14 +(79, 73, 1) 13 +(79, 74, 1) 13 +(79, 75, 1) 12 +(79, 76, 1) 12 +(79, 77, 1) 11 +(79, 78, 1) 10 +(79, 79, 1) 9 +(79, 80, 1) 9 +(79, 81, 1) 8 +(79, 82, 1) 7 +(79, 83, 1) 7 +(79, 84, 1) 6 +(79, 85, 1) 5 +(79, 86, 1) 4 +(79, 87, 1) 4 +(79, 88, 1) 3 +(79, 89, 1) 2 +(79, 90, 1) 1 +(79, 91, 1) 1 +(79, 92, 1) 0 +(80, 9, 1) 0 +(80, 10, 1) 0 +(80, 11, 1) 1 +(80, 12, 1) 1 +(80, 13, 1) 2 +(80, 14, 1) 3 +(80, 15, 1) 4 +(80, 16, 1) 4 +(80, 17, 1) 5 +(80, 18, 1) 6 +(80, 19, 1) 7 +(80, 20, 1) 7 +(80, 21, 1) 8 +(80, 22, 1) 9 +(80, 23, 1) 9 +(80, 24, 1) 10 +(80, 25, 1) 11 +(80, 26, 1) 11 +(80, 27, 1) 12 +(80, 28, 1) 13 +(80, 29, 1) 13 +(80, 30, 1) 14 +(80, 31, 1) 14 +(80, 32, 1) 15 +(80, 33, 1) 15 +(80, 34, 1) 16 +(80, 35, 1) 16 +(80, 36, 1) 17 +(80, 37, 1) 17 +(80, 38, 1) 18 +(80, 39, 1) 18 +(80, 40, 1) 18 +(80, 41, 1) 19 +(80, 42, 1) 19 +(80, 43, 1) 19 +(80, 44, 1) 19 +(80, 45, 1) 20 +(80, 46, 1) 20 +(80, 47, 1) 20 +(80, 48, 1) 20 +(80, 49, 1) 20 +(80, 50, 1) 20 +(80, 51, 1) 20 +(80, 52, 1) 20 +(80, 53, 1) 20 +(80, 54, 1) 20 +(80, 55, 1) 20 +(80, 56, 1) 20 +(80, 57, 1) 19 +(80, 58, 1) 19 +(80, 59, 1) 19 +(80, 60, 1) 19 +(80, 61, 1) 18 +(80, 62, 1) 18 +(80, 63, 1) 18 +(80, 64, 1) 17 +(80, 65, 1) 17 +(80, 66, 1) 16 +(80, 67, 1) 16 +(80, 68, 1) 15 +(80, 69, 1) 15 +(80, 70, 1) 14 +(80, 71, 1) 14 +(80, 72, 1) 13 +(80, 73, 1) 13 +(80, 74, 1) 12 +(80, 75, 1) 11 +(80, 76, 1) 11 +(80, 77, 1) 10 +(80, 78, 1) 9 +(80, 79, 1) 9 +(80, 80, 1) 8 +(80, 81, 1) 7 +(80, 82, 1) 7 +(80, 83, 1) 6 +(80, 84, 1) 5 +(80, 85, 1) 4 +(80, 86, 1) 4 +(80, 87, 1) 3 +(80, 88, 1) 2 +(80, 89, 1) 1 +(80, 90, 1) 1 +(80, 91, 1) 0 +(80, 92, 1) 0 +(81, 14, 1) 3 +(81, 15, 1) 3 +(81, 16, 1) 4 +(81, 17, 1) 5 +(81, 18, 1) 5 +(81, 19, 1) 6 +(81, 20, 1) 7 +(81, 21, 1) 7 +(81, 22, 1) 8 +(81, 23, 1) 9 +(81, 24, 1) 9 +(81, 25, 1) 10 +(81, 26, 1) 11 +(81, 27, 1) 11 +(81, 28, 1) 12 +(81, 29, 1) 12 +(81, 30, 1) 13 +(81, 31, 1) 14 +(81, 32, 1) 14 +(81, 33, 1) 15 +(81, 34, 1) 15 +(81, 35, 1) 15 +(81, 36, 1) 16 +(81, 37, 1) 16 +(81, 38, 1) 17 +(81, 39, 1) 17 +(81, 40, 1) 17 +(81, 41, 1) 18 +(81, 42, 1) 18 +(81, 43, 1) 18 +(81, 44, 1) 18 +(81, 45, 1) 19 +(81, 46, 1) 19 +(81, 47, 1) 19 +(81, 48, 1) 19 +(81, 49, 1) 19 +(81, 50, 1) 19 +(81, 51, 1) 19 +(81, 52, 1) 19 +(81, 53, 1) 19 +(81, 54, 1) 19 +(81, 55, 1) 19 +(81, 56, 1) 19 +(81, 57, 1) 18 +(81, 58, 1) 18 +(81, 59, 1) 18 +(81, 60, 1) 18 +(81, 61, 1) 17 +(81, 62, 1) 17 +(81, 63, 1) 17 +(81, 64, 1) 16 +(81, 65, 1) 16 +(81, 66, 1) 15 +(81, 67, 1) 15 +(81, 68, 1) 15 +(81, 69, 1) 14 +(81, 70, 1) 14 +(81, 71, 1) 13 +(81, 72, 1) 12 +(81, 73, 1) 12 +(81, 74, 1) 11 +(81, 75, 1) 11 +(81, 76, 1) 10 +(81, 77, 1) 9 +(81, 78, 1) 9 +(81, 79, 1) 8 +(81, 80, 1) 7 +(81, 81, 1) 7 +(81, 82, 1) 6 +(81, 83, 1) 5 +(81, 84, 1) 5 +(81, 85, 1) 4 +(81, 86, 1) 3 +(81, 87, 1) 3 +(82, 14, 1) 2 +(82, 15, 1) 3 +(82, 16, 1) 3 +(82, 17, 1) 4 +(82, 18, 1) 5 +(82, 19, 1) 5 +(82, 20, 1) 6 +(82, 21, 1) 7 +(82, 22, 1) 7 +(82, 23, 1) 8 +(82, 24, 1) 9 +(82, 25, 1) 9 +(82, 26, 1) 10 +(82, 27, 1) 10 +(82, 28, 1) 11 +(82, 29, 1) 12 +(82, 30, 1) 12 +(82, 31, 1) 13 +(82, 32, 1) 13 +(82, 33, 1) 14 +(82, 34, 1) 14 +(82, 35, 1) 15 +(82, 36, 1) 15 +(82, 37, 1) 15 +(82, 38, 1) 16 +(82, 39, 1) 16 +(82, 40, 1) 16 +(82, 41, 1) 17 +(82, 42, 1) 17 +(82, 43, 1) 17 +(82, 44, 1) 17 +(82, 45, 1) 18 +(82, 46, 1) 18 +(82, 47, 1) 18 +(82, 48, 1) 18 +(82, 49, 1) 18 +(82, 50, 1) 18 +(82, 51, 1) 18 +(82, 52, 1) 18 +(82, 53, 1) 18 +(82, 54, 1) 18 +(82, 55, 1) 18 +(82, 56, 1) 18 +(82, 57, 1) 17 +(82, 58, 1) 17 +(82, 59, 1) 17 +(82, 60, 1) 17 +(82, 61, 1) 16 +(82, 62, 1) 16 +(82, 63, 1) 16 +(82, 64, 1) 15 +(82, 65, 1) 15 +(82, 66, 1) 15 +(82, 67, 1) 14 +(82, 68, 1) 14 +(82, 69, 1) 13 +(82, 70, 1) 13 +(82, 71, 1) 12 +(82, 72, 1) 12 +(82, 73, 1) 11 +(82, 74, 1) 10 +(82, 75, 1) 10 +(82, 76, 1) 9 +(82, 77, 1) 9 +(82, 78, 1) 8 +(82, 79, 1) 7 +(82, 80, 1) 7 +(82, 81, 1) 6 +(82, 82, 1) 5 +(82, 83, 1) 5 +(82, 84, 1) 4 +(82, 85, 1) 3 +(82, 86, 1) 3 +(82, 87, 1) 2 +(83, 14, 1) 1 +(83, 15, 1) 2 +(83, 16, 1) 3 +(83, 17, 1) 3 +(83, 18, 1) 4 +(83, 19, 1) 5 +(83, 20, 1) 5 +(83, 21, 1) 6 +(83, 22, 1) 7 +(83, 23, 1) 7 +(83, 24, 1) 8 +(83, 25, 1) 8 +(83, 26, 1) 9 +(83, 27, 1) 10 +(83, 28, 1) 10 +(83, 29, 1) 11 +(83, 30, 1) 11 +(83, 31, 1) 12 +(83, 32, 1) 12 +(83, 33, 1) 13 +(83, 34, 1) 13 +(83, 35, 1) 14 +(83, 36, 1) 14 +(83, 37, 1) 14 +(83, 38, 1) 15 +(83, 39, 1) 15 +(83, 40, 1) 15 +(83, 41, 1) 16 +(83, 42, 1) 16 +(83, 43, 1) 16 +(83, 44, 1) 16 +(83, 45, 1) 17 +(83, 46, 1) 17 +(83, 47, 1) 17 +(83, 48, 1) 17 +(83, 49, 1) 17 +(83, 50, 1) 17 +(83, 51, 1) 17 +(83, 52, 1) 17 +(83, 53, 1) 17 +(83, 54, 1) 17 +(83, 55, 1) 17 +(83, 56, 1) 17 +(83, 57, 1) 16 +(83, 58, 1) 16 +(83, 59, 1) 16 +(83, 60, 1) 16 +(83, 61, 1) 15 +(83, 62, 1) 15 +(83, 63, 1) 15 +(83, 64, 1) 14 +(83, 65, 1) 14 +(83, 66, 1) 14 +(83, 67, 1) 13 +(83, 68, 1) 13 +(83, 69, 1) 12 +(83, 70, 1) 12 +(83, 71, 1) 11 +(83, 72, 1) 11 +(83, 73, 1) 10 +(83, 74, 1) 10 +(83, 75, 1) 9 +(83, 76, 1) 8 +(83, 77, 1) 8 +(83, 78, 1) 7 +(83, 79, 1) 7 +(83, 80, 1) 6 +(83, 81, 1) 5 +(83, 82, 1) 5 +(83, 83, 1) 4 +(83, 84, 1) 3 +(83, 85, 1) 3 +(83, 86, 1) 2 +(83, 87, 1) 1 +(84, 14, 1) 1 +(84, 15, 1) 1 +(84, 16, 1) 2 +(84, 17, 1) 3 +(84, 18, 1) 3 +(84, 19, 1) 4 +(84, 20, 1) 5 +(84, 21, 1) 5 +(84, 22, 1) 6 +(84, 23, 1) 6 +(84, 24, 1) 7 +(84, 25, 1) 8 +(84, 26, 1) 8 +(84, 27, 1) 9 +(84, 28, 1) 9 +(84, 29, 1) 10 +(84, 30, 1) 10 +(84, 31, 1) 11 +(84, 32, 1) 11 +(84, 33, 1) 12 +(84, 34, 1) 12 +(84, 35, 1) 13 +(84, 36, 1) 13 +(84, 37, 1) 13 +(84, 38, 1) 14 +(84, 39, 1) 14 +(84, 40, 1) 14 +(84, 41, 1) 15 +(84, 42, 1) 15 +(84, 43, 1) 15 +(84, 44, 1) 15 +(84, 45, 1) 16 +(84, 46, 1) 16 +(84, 47, 1) 16 +(84, 48, 1) 16 +(84, 49, 1) 16 +(84, 50, 1) 16 +(84, 51, 1) 16 +(84, 52, 1) 16 +(84, 53, 1) 16 +(84, 54, 1) 16 +(84, 55, 1) 16 +(84, 56, 1) 16 +(84, 57, 1) 15 +(84, 58, 1) 15 +(84, 59, 1) 15 +(84, 60, 1) 15 +(84, 61, 1) 14 +(84, 62, 1) 14 +(84, 63, 1) 14 +(84, 64, 1) 13 +(84, 65, 1) 13 +(84, 66, 1) 13 +(84, 67, 1) 12 +(84, 68, 1) 12 +(84, 69, 1) 11 +(84, 70, 1) 11 +(84, 71, 1) 10 +(84, 72, 1) 10 +(84, 73, 1) 9 +(84, 74, 1) 9 +(84, 75, 1) 8 +(84, 76, 1) 8 +(84, 77, 1) 7 +(84, 78, 1) 6 +(84, 79, 1) 6 +(84, 80, 1) 5 +(84, 81, 1) 5 +(84, 82, 1) 4 +(84, 83, 1) 3 +(84, 84, 1) 3 +(84, 85, 1) 2 +(84, 86, 1) 1 +(84, 87, 1) 1 +(85, 14, 1) 0 +(85, 15, 1) 1 +(85, 16, 1) 1 +(85, 17, 1) 2 +(85, 18, 1) 2 +(85, 19, 1) 3 +(85, 20, 1) 4 +(85, 21, 1) 4 +(85, 22, 1) 5 +(85, 23, 1) 6 +(85, 24, 1) 6 +(85, 25, 1) 7 +(85, 26, 1) 7 +(85, 27, 1) 8 +(85, 28, 1) 9 +(85, 29, 1) 9 +(85, 30, 1) 10 +(85, 31, 1) 10 +(85, 32, 1) 11 +(85, 33, 1) 11 +(85, 34, 1) 11 +(85, 35, 1) 12 +(85, 36, 1) 12 +(85, 37, 1) 13 +(85, 38, 1) 13 +(85, 39, 1) 13 +(85, 40, 1) 13 +(85, 41, 1) 14 +(85, 42, 1) 14 +(85, 43, 1) 14 +(85, 44, 1) 14 +(85, 45, 1) 15 +(85, 46, 1) 15 +(85, 47, 1) 15 +(85, 48, 1) 15 +(85, 49, 1) 15 +(85, 50, 1) 15 +(85, 51, 1) 15 +(85, 52, 1) 15 +(85, 53, 1) 15 +(85, 54, 1) 15 +(85, 55, 1) 15 +(85, 56, 1) 15 +(85, 57, 1) 14 +(85, 58, 1) 14 +(85, 59, 1) 14 +(85, 60, 1) 14 +(85, 61, 1) 13 +(85, 62, 1) 13 +(85, 63, 1) 13 +(85, 64, 1) 13 +(85, 65, 1) 12 +(85, 66, 1) 12 +(85, 67, 1) 11 +(85, 68, 1) 11 +(85, 69, 1) 11 +(85, 70, 1) 10 +(85, 71, 1) 10 +(85, 72, 1) 9 +(85, 73, 1) 9 +(85, 74, 1) 8 +(85, 75, 1) 7 +(85, 76, 1) 7 +(85, 77, 1) 6 +(85, 78, 1) 6 +(85, 79, 1) 5 +(85, 80, 1) 4 +(85, 81, 1) 4 +(85, 82, 1) 3 +(85, 83, 1) 2 +(85, 84, 1) 2 +(85, 85, 1) 1 +(85, 86, 1) 1 +(85, 87, 1) 0 +(86, 16, 1) 1 +(86, 17, 1) 1 +(86, 18, 1) 2 +(86, 19, 1) 3 +(86, 20, 1) 3 +(86, 21, 1) 4 +(86, 22, 1) 4 +(86, 23, 1) 5 +(86, 24, 1) 6 +(86, 25, 1) 6 +(86, 26, 1) 7 +(86, 27, 1) 7 +(86, 28, 1) 8 +(86, 29, 1) 8 +(86, 30, 1) 9 +(86, 31, 1) 9 +(86, 32, 1) 10 +(86, 33, 1) 10 +(86, 34, 1) 11 +(86, 35, 1) 11 +(86, 36, 1) 11 +(86, 37, 1) 12 +(86, 38, 1) 12 +(86, 39, 1) 12 +(86, 40, 1) 13 +(86, 41, 1) 13 +(86, 42, 1) 13 +(86, 43, 1) 13 +(86, 44, 1) 13 +(86, 45, 1) 14 +(86, 46, 1) 14 +(86, 47, 1) 14 +(86, 48, 1) 14 +(86, 49, 1) 14 +(86, 50, 1) 14 +(86, 51, 1) 14 +(86, 52, 1) 14 +(86, 53, 1) 14 +(86, 54, 1) 14 +(86, 55, 1) 14 +(86, 56, 1) 14 +(86, 57, 1) 13 +(86, 58, 1) 13 +(86, 59, 1) 13 +(86, 60, 1) 13 +(86, 61, 1) 13 +(86, 62, 1) 12 +(86, 63, 1) 12 +(86, 64, 1) 12 +(86, 65, 1) 11 +(86, 66, 1) 11 +(86, 67, 1) 11 +(86, 68, 1) 10 +(86, 69, 1) 10 +(86, 70, 1) 9 +(86, 71, 1) 9 +(86, 72, 1) 8 +(86, 73, 1) 8 +(86, 74, 1) 7 +(86, 75, 1) 7 +(86, 76, 1) 6 +(86, 77, 1) 6 +(86, 78, 1) 5 +(86, 79, 1) 4 +(86, 80, 1) 4 +(86, 81, 1) 3 +(86, 82, 1) 3 +(86, 83, 1) 2 +(86, 84, 1) 1 +(86, 85, 1) 1 +(87, 16, 1) 0 +(87, 17, 1) 1 +(87, 18, 1) 1 +(87, 19, 1) 2 +(87, 20, 1) 2 +(87, 21, 1) 3 +(87, 22, 1) 4 +(87, 23, 1) 4 +(87, 24, 1) 5 +(87, 25, 1) 5 +(87, 26, 1) 6 +(87, 27, 1) 6 +(87, 28, 1) 7 +(87, 29, 1) 7 +(87, 30, 1) 8 +(87, 31, 1) 8 +(87, 32, 1) 9 +(87, 33, 1) 9 +(87, 34, 1) 10 +(87, 35, 1) 10 +(87, 36, 1) 10 +(87, 37, 1) 11 +(87, 38, 1) 11 +(87, 39, 1) 11 +(87, 40, 1) 12 +(87, 41, 1) 12 +(87, 42, 1) 12 +(87, 43, 1) 12 +(87, 44, 1) 12 +(87, 45, 1) 13 +(87, 46, 1) 13 +(87, 47, 1) 13 +(87, 48, 1) 13 +(87, 49, 1) 13 +(87, 50, 1) 13 +(87, 51, 1) 13 +(87, 52, 1) 13 +(87, 53, 1) 13 +(87, 54, 1) 13 +(87, 55, 1) 13 +(87, 56, 1) 13 +(87, 57, 1) 12 +(87, 58, 1) 12 +(87, 59, 1) 12 +(87, 60, 1) 12 +(87, 61, 1) 12 +(87, 62, 1) 11 +(87, 63, 1) 11 +(87, 64, 1) 11 +(87, 65, 1) 10 +(87, 66, 1) 10 +(87, 67, 1) 10 +(87, 68, 1) 9 +(87, 69, 1) 9 +(87, 70, 1) 8 +(87, 71, 1) 8 +(87, 72, 1) 7 +(87, 73, 1) 7 +(87, 74, 1) 6 +(87, 75, 1) 6 +(87, 76, 1) 5 +(87, 77, 1) 5 +(87, 78, 1) 4 +(87, 79, 1) 4 +(87, 80, 1) 3 +(87, 81, 1) 2 +(87, 82, 1) 2 +(87, 83, 1) 1 +(87, 84, 1) 1 +(87, 85, 1) 0 +(88, 21, 1) 2 +(88, 22, 1) 3 +(88, 23, 1) 3 +(88, 24, 1) 4 +(88, 25, 1) 5 +(88, 26, 1) 5 +(88, 27, 1) 6 +(88, 28, 1) 6 +(88, 29, 1) 7 +(88, 30, 1) 7 +(88, 31, 1) 7 +(88, 32, 1) 8 +(88, 33, 1) 8 +(88, 34, 1) 9 +(88, 35, 1) 9 +(88, 36, 1) 9 +(88, 37, 1) 10 +(88, 38, 1) 10 +(88, 39, 1) 10 +(88, 40, 1) 11 +(88, 41, 1) 11 +(88, 42, 1) 11 +(88, 43, 1) 11 +(88, 44, 1) 11 +(88, 45, 1) 12 +(88, 46, 1) 12 +(88, 47, 1) 12 +(88, 48, 1) 12 +(88, 49, 1) 12 +(88, 50, 1) 12 +(88, 51, 1) 12 +(88, 52, 1) 12 +(88, 53, 1) 12 +(88, 54, 1) 12 +(88, 55, 1) 12 +(88, 56, 1) 12 +(88, 57, 1) 11 +(88, 58, 1) 11 +(88, 59, 1) 11 +(88, 60, 1) 11 +(88, 61, 1) 11 +(88, 62, 1) 10 +(88, 63, 1) 10 +(88, 64, 1) 10 +(88, 65, 1) 9 +(88, 66, 1) 9 +(88, 67, 1) 9 +(88, 68, 1) 8 +(88, 69, 1) 8 +(88, 70, 1) 7 +(88, 71, 1) 7 +(88, 72, 1) 7 +(88, 73, 1) 6 +(88, 74, 1) 6 +(88, 75, 1) 5 +(88, 76, 1) 5 +(88, 77, 1) 4 +(88, 78, 1) 3 +(88, 79, 1) 3 +(88, 80, 1) 2 +(89, 21, 1) 1 +(89, 22, 1) 2 +(89, 23, 1) 3 +(89, 24, 1) 3 +(89, 25, 1) 4 +(89, 26, 1) 4 +(89, 27, 1) 5 +(89, 28, 1) 5 +(89, 29, 1) 6 +(89, 30, 1) 6 +(89, 31, 1) 7 +(89, 32, 1) 7 +(89, 33, 1) 7 +(89, 34, 1) 8 +(89, 35, 1) 8 +(89, 36, 1) 8 +(89, 37, 1) 9 +(89, 38, 1) 9 +(89, 39, 1) 9 +(89, 40, 1) 10 +(89, 41, 1) 10 +(89, 42, 1) 10 +(89, 43, 1) 10 +(89, 44, 1) 10 +(89, 45, 1) 11 +(89, 46, 1) 11 +(89, 47, 1) 11 +(89, 48, 1) 11 +(89, 49, 1) 11 +(89, 50, 1) 11 +(89, 51, 1) 11 +(89, 52, 1) 11 +(89, 53, 1) 11 +(89, 54, 1) 11 +(89, 55, 1) 11 +(89, 56, 1) 11 +(89, 57, 1) 10 +(89, 58, 1) 10 +(89, 59, 1) 10 +(89, 60, 1) 10 +(89, 61, 1) 10 +(89, 62, 1) 9 +(89, 63, 1) 9 +(89, 64, 1) 9 +(89, 65, 1) 8 +(89, 66, 1) 8 +(89, 67, 1) 8 +(89, 68, 1) 7 +(89, 69, 1) 7 +(89, 70, 1) 7 +(89, 71, 1) 6 +(89, 72, 1) 6 +(89, 73, 1) 5 +(89, 74, 1) 5 +(89, 75, 1) 4 +(89, 76, 1) 4 +(89, 77, 1) 3 +(89, 78, 1) 3 +(89, 79, 1) 2 +(89, 80, 1) 1 +(90, 21, 1) 1 +(90, 22, 1) 1 +(90, 23, 1) 2 +(90, 24, 1) 2 +(90, 25, 1) 3 +(90, 26, 1) 3 +(90, 27, 1) 4 +(90, 28, 1) 4 +(90, 29, 1) 5 +(90, 30, 1) 5 +(90, 31, 1) 6 +(90, 32, 1) 6 +(90, 33, 1) 6 +(90, 34, 1) 7 +(90, 35, 1) 7 +(90, 36, 1) 8 +(90, 37, 1) 8 +(90, 38, 1) 8 +(90, 39, 1) 8 +(90, 40, 1) 9 +(90, 41, 1) 9 +(90, 42, 1) 9 +(90, 43, 1) 9 +(90, 44, 1) 9 +(90, 45, 1) 10 +(90, 46, 1) 10 +(90, 47, 1) 10 +(90, 48, 1) 10 +(90, 49, 1) 10 +(90, 50, 1) 10 +(90, 51, 1) 10 +(90, 52, 1) 10 +(90, 53, 1) 10 +(90, 54, 1) 10 +(90, 55, 1) 10 +(90, 56, 1) 10 +(90, 57, 1) 9 +(90, 58, 1) 9 +(90, 59, 1) 9 +(90, 60, 1) 9 +(90, 61, 1) 9 +(90, 62, 1) 8 +(90, 63, 1) 8 +(90, 64, 1) 8 +(90, 65, 1) 8 +(90, 66, 1) 7 +(90, 67, 1) 7 +(90, 68, 1) 6 +(90, 69, 1) 6 +(90, 70, 1) 6 +(90, 71, 1) 5 +(90, 72, 1) 5 +(90, 73, 1) 4 +(90, 74, 1) 4 +(90, 75, 1) 3 +(90, 76, 1) 3 +(90, 77, 1) 2 +(90, 78, 1) 2 +(90, 79, 1) 1 +(90, 80, 1) 1 +(91, 21, 1) 0 +(91, 22, 1) 1 +(91, 23, 1) 1 +(91, 24, 1) 2 +(91, 25, 1) 2 +(91, 26, 1) 3 +(91, 27, 1) 3 +(91, 28, 1) 4 +(91, 29, 1) 4 +(91, 30, 1) 4 +(91, 31, 1) 5 +(91, 32, 1) 5 +(91, 33, 1) 6 +(91, 34, 1) 6 +(91, 35, 1) 6 +(91, 36, 1) 7 +(91, 37, 1) 7 +(91, 38, 1) 7 +(91, 39, 1) 8 +(91, 40, 1) 8 +(91, 41, 1) 8 +(91, 42, 1) 8 +(91, 43, 1) 8 +(91, 44, 1) 9 +(91, 45, 1) 9 +(91, 46, 1) 9 +(91, 47, 1) 9 +(91, 48, 1) 9 +(91, 49, 1) 9 +(91, 50, 1) 9 +(91, 51, 1) 9 +(91, 52, 1) 9 +(91, 53, 1) 9 +(91, 54, 1) 9 +(91, 55, 1) 9 +(91, 56, 1) 9 +(91, 57, 1) 9 +(91, 58, 1) 8 +(91, 59, 1) 8 +(91, 60, 1) 8 +(91, 61, 1) 8 +(91, 62, 1) 8 +(91, 63, 1) 7 +(91, 64, 1) 7 +(91, 65, 1) 7 +(91, 66, 1) 6 +(91, 67, 1) 6 +(91, 68, 1) 6 +(91, 69, 1) 5 +(91, 70, 1) 5 +(91, 71, 1) 4 +(91, 72, 1) 4 +(91, 73, 1) 4 +(91, 74, 1) 3 +(91, 75, 1) 3 +(91, 76, 1) 2 +(91, 77, 1) 2 +(91, 78, 1) 1 +(91, 79, 1) 1 +(91, 80, 1) 0 +(92, 21, 1) 0 +(92, 22, 1) 0 +(92, 23, 1) 0 +(92, 24, 1) 1 +(92, 25, 1) 1 +(92, 26, 1) 2 +(92, 27, 1) 2 +(92, 28, 1) 3 +(92, 29, 1) 3 +(92, 30, 1) 4 +(92, 31, 1) 4 +(92, 32, 1) 4 +(92, 33, 1) 5 +(92, 34, 1) 5 +(92, 35, 1) 5 +(92, 36, 1) 6 +(92, 37, 1) 6 +(92, 38, 1) 6 +(92, 39, 1) 7 +(92, 40, 1) 7 +(92, 41, 1) 7 +(92, 42, 1) 7 +(92, 43, 1) 7 +(92, 44, 1) 8 +(92, 45, 1) 8 +(92, 46, 1) 8 +(92, 47, 1) 8 +(92, 48, 1) 8 +(92, 49, 1) 8 +(92, 50, 1) 8 +(92, 51, 1) 8 +(92, 52, 1) 8 +(92, 53, 1) 8 +(92, 54, 1) 8 +(92, 55, 1) 8 +(92, 56, 1) 8 +(92, 57, 1) 8 +(92, 58, 1) 7 +(92, 59, 1) 7 +(92, 60, 1) 7 +(92, 61, 1) 7 +(92, 62, 1) 7 +(92, 63, 1) 6 +(92, 64, 1) 6 +(92, 65, 1) 6 +(92, 66, 1) 5 +(92, 67, 1) 5 +(92, 68, 1) 5 +(92, 69, 1) 4 +(92, 70, 1) 4 +(92, 71, 1) 4 +(92, 72, 1) 3 +(92, 73, 1) 3 +(92, 74, 1) 2 +(92, 75, 1) 2 +(92, 76, 1) 1 +(92, 77, 1) 1 +(92, 78, 1) 0 +(92, 79, 1) 0 +(92, 80, 1) 0 +(93, 26, 1) 1 +(93, 27, 1) 1 +(93, 28, 1) 2 +(93, 29, 1) 2 +(93, 30, 1) 3 +(93, 31, 1) 3 +(93, 32, 1) 3 +(93, 33, 1) 4 +(93, 34, 1) 4 +(93, 35, 1) 4 +(93, 36, 1) 5 +(93, 37, 1) 5 +(93, 38, 1) 5 +(93, 39, 1) 6 +(93, 40, 1) 6 +(93, 41, 1) 6 +(93, 42, 1) 6 +(93, 43, 1) 6 +(93, 44, 1) 7 +(93, 45, 1) 7 +(93, 46, 1) 7 +(93, 47, 1) 7 +(93, 48, 1) 7 +(93, 49, 1) 7 +(93, 50, 1) 7 +(93, 51, 1) 7 +(93, 52, 1) 7 +(93, 53, 1) 7 +(93, 54, 1) 7 +(93, 55, 1) 7 +(93, 56, 1) 7 +(93, 57, 1) 7 +(93, 58, 1) 6 +(93, 59, 1) 6 +(93, 60, 1) 6 +(93, 61, 1) 6 +(93, 62, 1) 6 +(93, 63, 1) 5 +(93, 64, 1) 5 +(93, 65, 1) 5 +(93, 66, 1) 4 +(93, 67, 1) 4 +(93, 68, 1) 4 +(93, 69, 1) 3 +(93, 70, 1) 3 +(93, 71, 1) 3 +(93, 72, 1) 2 +(93, 73, 1) 2 +(93, 74, 1) 1 +(93, 75, 1) 1 +(94, 26, 1) 0 +(94, 27, 1) 0 +(94, 28, 1) 1 +(94, 29, 1) 1 +(94, 30, 1) 2 +(94, 31, 1) 2 +(94, 32, 1) 2 +(94, 33, 1) 3 +(94, 34, 1) 3 +(94, 35, 1) 3 +(94, 36, 1) 4 +(94, 37, 1) 4 +(94, 38, 1) 4 +(94, 39, 1) 5 +(94, 40, 1) 5 +(94, 41, 1) 5 +(94, 42, 1) 5 +(94, 43, 1) 5 +(94, 44, 1) 6 +(94, 45, 1) 6 +(94, 46, 1) 6 +(94, 47, 1) 6 +(94, 48, 1) 6 +(94, 49, 1) 6 +(94, 50, 1) 6 +(94, 51, 1) 6 +(94, 52, 1) 6 +(94, 53, 1) 6 +(94, 54, 1) 6 +(94, 55, 1) 6 +(94, 56, 1) 6 +(94, 57, 1) 6 +(94, 58, 1) 5 +(94, 59, 1) 5 +(94, 60, 1) 5 +(94, 61, 1) 5 +(94, 62, 1) 5 +(94, 63, 1) 4 +(94, 64, 1) 4 +(94, 65, 1) 4 +(94, 66, 1) 3 +(94, 67, 1) 3 +(94, 68, 1) 3 +(94, 69, 1) 2 +(94, 70, 1) 2 +(94, 71, 1) 2 +(94, 72, 1) 1 +(94, 73, 1) 1 +(94, 74, 1) 0 +(94, 75, 1) 0 +(95, 26, 1) 0 +(95, 27, 1) 0 +(95, 28, 1) 0 +(95, 29, 1) 0 +(95, 30, 1) 1 +(95, 31, 1) 1 +(95, 32, 1) 1 +(95, 33, 1) 2 +(95, 34, 1) 2 +(95, 35, 1) 3 +(95, 36, 1) 3 +(95, 37, 1) 3 +(95, 38, 1) 3 +(95, 39, 1) 4 +(95, 40, 1) 4 +(95, 41, 1) 4 +(95, 42, 1) 4 +(95, 43, 1) 4 +(95, 44, 1) 5 +(95, 45, 1) 5 +(95, 46, 1) 5 +(95, 47, 1) 5 +(95, 48, 1) 5 +(95, 49, 1) 5 +(95, 50, 1) 5 +(95, 51, 1) 5 +(95, 52, 1) 5 +(95, 53, 1) 5 +(95, 54, 1) 5 +(95, 55, 1) 5 +(95, 56, 1) 5 +(95, 57, 1) 5 +(95, 58, 1) 4 +(95, 59, 1) 4 +(95, 60, 1) 4 +(95, 61, 1) 4 +(95, 62, 1) 4 +(95, 63, 1) 3 +(95, 64, 1) 3 +(95, 65, 1) 3 +(95, 66, 1) 3 +(95, 67, 1) 2 +(95, 68, 1) 2 +(95, 69, 1) 1 +(95, 70, 1) 1 +(95, 71, 1) 1 +(95, 72, 1) 0 +(95, 73, 1) 0 +(95, 74, 1) 0 +(95, 75, 1) 0 +(96, 36, 1) 2 +(96, 37, 1) 2 +(96, 38, 1) 2 +(96, 39, 1) 3 +(96, 40, 1) 3 +(96, 41, 1) 3 +(96, 42, 1) 3 +(96, 43, 1) 3 +(96, 44, 1) 4 +(96, 45, 1) 4 +(96, 46, 1) 4 +(96, 47, 1) 4 +(96, 48, 1) 4 +(96, 49, 1) 4 +(96, 50, 1) 4 +(96, 51, 1) 4 +(96, 52, 1) 4 +(96, 53, 1) 4 +(96, 54, 1) 4 +(96, 55, 1) 4 +(96, 56, 1) 4 +(96, 57, 1) 4 +(96, 58, 1) 3 +(96, 59, 1) 3 +(96, 60, 1) 3 +(96, 61, 1) 3 +(96, 62, 1) 3 +(96, 63, 1) 2 +(96, 64, 1) 2 +(96, 65, 1) 2 +(97, 36, 1) 1 +(97, 37, 1) 1 +(97, 38, 1) 2 +(97, 39, 1) 2 +(97, 40, 1) 2 +(97, 41, 1) 2 +(97, 42, 1) 2 +(97, 43, 1) 2 +(97, 44, 1) 3 +(97, 45, 1) 3 +(97, 46, 1) 3 +(97, 47, 1) 3 +(97, 48, 1) 3 +(97, 49, 1) 3 +(97, 50, 1) 3 +(97, 51, 1) 3 +(97, 52, 1) 3 +(97, 53, 1) 3 +(97, 54, 1) 3 +(97, 55, 1) 3 +(97, 56, 1) 3 +(97, 57, 1) 3 +(97, 58, 1) 2 +(97, 59, 1) 2 +(97, 60, 1) 2 +(97, 61, 1) 2 +(97, 62, 1) 2 +(97, 63, 1) 2 +(97, 64, 1) 1 +(97, 65, 1) 1 +(98, 41, 1) 1 +(98, 42, 1) 1 +(98, 43, 1) 1 +(98, 44, 1) 2 +(98, 45, 1) 2 +(98, 46, 1) 2 +(98, 47, 1) 2 +(98, 48, 1) 2 +(98, 49, 1) 2 +(98, 50, 1) 2 +(98, 51, 1) 2 +(98, 52, 1) 2 +(98, 53, 1) 2 +(98, 54, 1) 2 +(98, 55, 1) 2 +(98, 56, 1) 2 +(98, 57, 1) 2 +(98, 58, 1) 1 +(98, 59, 1) 1 +(98, 60, 1) 1 +(99, 41, 1) 0 +(99, 42, 1) 0 +(99, 43, 1) 0 +(99, 44, 1) 1 +(99, 45, 1) 1 +(99, 46, 1) 1 +(99, 47, 1) 1 +(99, 48, 1) 1 +(99, 49, 1) 1 +(99, 50, 1) 1 +(99, 51, 1) 1 +(99, 52, 1) 1 +(99, 53, 1) 1 +(99, 54, 1) 1 +(99, 55, 1) 1 +(99, 56, 1) 1 +(99, 57, 1) 1 +(99, 58, 1) 0 +(99, 59, 1) 0 +(99, 60, 1) 0 +(100, 41, 1) 0 +(100, 42, 1) 0 +(100, 43, 1) 0 +(100, 44, 1) 0 +(100, 45, 1) 0 +(100, 46, 1) 0 +(100, 47, 1) 0 +(100, 48, 1) 0 +(100, 49, 1) 0 +(100, 50, 1) 0 +(100, 51, 1) 0 +(100, 52, 1) 0 +(100, 53, 1) 0 +(100, 54, 1) 0 +(100, 55, 1) 0 +(100, 56, 1) 0 +(100, 57, 1) 0 +(100, 58, 1) 0 +(100, 59, 1) 0 +(100, 60, 1) 0 \ No newline at end of file diff --git a/EOverPCalibration/src/CalibrationUtils.cc b/EOverPCalibration/src/CalibrationUtils.cc new file mode 100644 index 00000000000..34dea0da4f1 --- /dev/null +++ b/EOverPCalibration/src/CalibrationUtils.cc @@ -0,0 +1,1069 @@ +#include "../interface/CalibrationUtils.h" + + + + + + +/////////////////////////////////////////////////////////////// +// check if a xtal confines with a bad xtal or lies in a bad TT +/////////////////////////////////////////////////////////////// + +bool CheckxtalIC_EB(TH2F* h_scale_EB, int iPhi, int iEta) +{ + if( h_scale_EB->GetBinContent(iPhi,iEta) == 0 ) return false; + if( h_scale_EB->GetBinContent(iPhi,iEta) > 5 ) return false; + + int bx = h_scale_EB->GetNbinsX(); + int by = h_scale_EB->GetNbinsY(); + + if( (iPhiGetBinContent(iPhi+1,iEta)==0) || + (iPhi>1 && h_scale_EB->GetBinContent(iPhi-1,iEta)==0) ) return false; + + if( (iEta!=85 && iEtaGetBinContent(iPhi,iEta+1)==0) || + (iEta!=87 && iEta>1 && h_scale_EB->GetBinContent(iPhi,iEta-1)==0) ) return false; + + if( (iEta!=85 && iEtaGetBinContent(iPhi+1,iEta+1)==0) || + (iEta!=87 && iEta>1 && iPhi>1 && h_scale_EB->GetBinContent(iPhi-1,iEta-1)==0) ) return false; + + if( (iEta!=87 && iEta>1 && iPhiGetBinContent(iPhi+1,iEta-1)==0) || + (iEta!=85 && iEta1 && h_scale_EB->GetBinContent(iPhi-1,iEta+1)==0) ) return false; + + return true; +} + +bool CheckxtalTT_EB(int iPhi, int iEta, const std::vector >& TT_centre) +{ + for(unsigned int k = 0; k < TT_centre.size(); ++k) + if( (fabs(iPhi-TT_centre.at(k).second) < 5) && (fabs(iEta-86-TT_centre.at(k).first) < 5) ) return false; + + return true; +} + + + +bool CheckxtalIC_EE(TH2F* h_scale_EE,int ix, int iy, int ir) +{ + if( h_scale_EE->GetBinContent(ix,iy)==0 ) return false; + if( h_scale_EE->GetBinContent(ix,iy) > 5 ) return false; + + int bx= h_scale_EE->GetNbinsX(); + int by= h_scale_EE->GetNbinsY(); + + if( ( h_scale_EE->GetBinContent(ix+1,iy)==0 && (ir!=0 || ir<33) && ixGetBinContent(ix-1,iy)==0 && (ir!=0 || ir<33) && ix>1 ) ) return false; + + if( ( h_scale_EE->GetBinContent(ix,iy+1)==0 && (ir!=0 || ir<33) && iyGetBinContent(ix,iy-1)==0 && (ir!=0 || ir<33) && iy>1) ) return false; + + if( ( h_scale_EE->GetBinContent(ix+1,iy+1)==0 && (ir!=0 || ir<33) && ixGetBinContent(ix-1,iy-1)==0 && (ir!=0 || ir<33) && iy>1 && ix>1 ) ) return false; + + if( ( h_scale_EE->GetBinContent(ix+1,iy-1)==0 && (ir!=0 || ir<33) && iy>1 && ixGetBinContent(ix-1,iy+1)==0 && (ir!=0 || ir<33) && ix>1 && iy >& TT_centre) +{ + for( unsigned int k =0; k > & TT_centre, bool skip) +{ + // mean over phi corrected skipping dead channel + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + float sumIC = 0.; + int numIC = 0; + + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + + if( isGood && isGoodTT ) + { + sumIC += h_scale_EB -> GetBinContent(iPhi,iEta); + ++numIC; + } + } + + // normalize IC skipping bad channels and bad TTs + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX(); ++iPhi) + { + if( numIC == 0 || sumIC == 0 ) continue; + + if( !skip ) + { + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC/numIC)); + continue; + } + else + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + if( !isGood || !isGoodTT ) continue; + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC/numIC)); + } + } + } +} + +///////////////////////////////////////////////////////////////////////// + +void NormalizeIC_LMR_EB(TH2F* h_scale_EB, TH2F* hcmap_EB, const std::vector< std::pair > & TT_centre, bool skip) +{ + TFile* inFile = TFile::Open("./src/drawRegions.root", "READ"); + TH2F* h2_EB_LMR = (TH2F*)(inFile -> Get("h2_EB_LMR")); + + float sumIC[325]; + float numIC[325]; + for(int ii = 0; ii < 325; ii++) + { + sumIC[ii] = 0; + numIC[ii] = 0; + } + + // mean over LMR corrected skipping dead channel + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + int regionId = h2_EB_LMR -> GetBinContent(iEta,iPhi); + if( isGood && isGoodTT ) + { + sumIC[regionId] = sumIC[regionId] + h_scale_EB -> GetBinContent(iPhi,iEta); + numIC[regionId] = numIC[regionId] + 1; + } + } + } + + // normalize IC skipping bad channels and bad TTs + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + int regionId = h2_EB_LMR -> GetBinContent(iPhi,iEta); + if( numIC[regionId] == 0 || sumIC[regionId] == 0 ) continue; + + if( !skip ) + { + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + continue; + } + else + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + if( !isGood || !isGoodTT ) continue; + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + } + } + } +} + +///////////////////////////////////////////////////////////////////////// + +void NormalizeIC_SM_EB(TH2F* h_scale_EB, TH2F* hcmap_EB, const std::vector< std::pair > & TT_centre, bool skip) +{ + TFile* inFile = TFile::Open("./src/drawRegions.root", "READ"); + TH2F* h2_EB_LMR = (TH2F*)(inFile -> Get("h2_EB_SM")); + + float sumIC[36]; + float numIC[36]; + for(int ii = 0; ii < 36; ii++) + { + sumIC[ii] = 0; + numIC[ii] = 0; + } + + // mean over LMR corrected skipping dead channel + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + int regionId = h2_EB_LMR -> GetBinContent(iEta,iPhi); + if( isGood && isGoodTT ) + { + sumIC[regionId] = sumIC[regionId] + h_scale_EB -> GetBinContent(iPhi,iEta); + numIC[regionId] = numIC[regionId] + 1; + } + } + } + + // normalize IC skipping bad channels and bad TTs + for(int iEta = 1; iEta <= h_scale_EB->GetNbinsY(); ++iEta) + { + for(int iPhi = 1; iPhi <= h_scale_EB->GetNbinsX() ; ++iPhi) + { + int regionId = h2_EB_LMR -> GetBinContent(iPhi,iEta); + if( numIC[regionId] == 0 || sumIC[regionId] == 0 ) continue; + + if( !skip ) + { + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + continue; + } + else + { + bool isGood = CheckxtalIC_EB(h_scale_EB,iPhi,iEta); + bool isGoodTT = CheckxtalTT_EB(iPhi,iEta,TT_centre); + if( !isGood || !isGoodTT ) continue; + hcmap_EB -> SetBinContent(iPhi,iEta,h_scale_EB->GetBinContent(iPhi,iEta)/(sumIC[regionId]/numIC[regionId])); + } + } + } +} + + +///////////////////////////////////////////////////////////////////////// +void NormalizeIC_EE(TH2F* h_scale_EEM, TH2F* h_scale_EEP, + TH2F* hcmap_EEM, TH2F* hcmap_EEP, + const std::vector< std::pair >& TT_centre_EEM, + const std::vector< std::pair >& TT_centre_EEP, + TEndcapRings* eRings, bool skip) +{ + std::map h_scale_EE; + std::map hcmap_EE; + + h_scale_EE[0] = h_scale_EEM; + h_scale_EE[1] = h_scale_EEP; + + hcmap_EE[0] = hcmap_EEM; + hcmap_EE[1] = hcmap_EEP; + + + + std::map > sumIC; + std::map > numIC; + + (sumIC[0]).assign(40,0.); + (sumIC[1]).assign(40,0.); + + (numIC[0]).assign(40,0); + (numIC[1]).assign(40,0); + + + + // mean over phi corrected skipping dead channel + for(int k = 0; k < 2; ++k) + for(int ix = 1; ix <= h_scale_EE[k] -> GetNbinsX(); ++ix) + for(int iy = 1; iy <= h_scale_EE[k] -> GetNbinsY(); ++iy) + { + int ring = eRings->GetEndcapRing(ix,iy,k); + if( ring == -1 ) continue; + + bool isGood = CheckxtalIC_EE(h_scale_EE[k],ix,iy,ring); + bool isGoodTT; + if( k == 0 ) isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEM); + else isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEP); + + if( isGoodTT && isGood ) + { + (sumIC[k]).at(ring) += h_scale_EE[k]->GetBinContent(ix,iy); + (numIC[k]).at(ring) += 1; + } + } + + // normalize IC skipping bad channels and bad TTs + for(int k = 0; k < 2; ++k) + for(int ix = 1; ix <= h_scale_EE[k]->GetNbinsX(); ++ix) + for(int iy = 1; iy <= h_scale_EE[k]->GetNbinsY(); ++iy) + { + int ring = eRings->GetEndcapRing(ix,iy,k); + if( ring == -1 ) continue; + + if( !skip ) + { + if( ring > 33 ) + { + hcmap_EE[k] -> Fill(ix,iy,0.); + continue; + } + else + { + if( (numIC[k]).at(ring) != 0 && (sumIC[k]).at(ring) != 0 ) + hcmap_EE[k] -> Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/((sumIC[k]).at(ring)/(numIC[k]).at(ring))); + } + } + + if( skip ) + { + bool isGood = CheckxtalIC_EE(h_scale_EE[k],ix,iy,ring); + bool isGoodTT; + + if( k == 0 ) isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEM); + else isGoodTT = CheckxtalTT_EE(ix,iy,ring,TT_centre_EEP); + + if( isGood && isGoodTT ) + { + if( ring > 33 ) + { + hcmap_EE[k] -> Fill(ix,iy,0.); + continue; + } + else + { + if( (numIC[k]).at(ring) != 0 && (sumIC[k]).at(ring) != 0 ) + hcmap_EE[k] -> Fill(ix,iy,h_scale_EE[k]->GetBinContent(ix,iy)/((sumIC[k]).at(ring)/(numIC[k]).at(ring))); + } + } + } + } + +} + + + + + + + +//------------------------------------------------------------------------------------------------------------- + + + + + + +/////////////////////////////////////////////////////////////////////// +void BookSpreadHistos_EB(TH1F* h_spread, std::vector& h_spread_vsEta, TGraphErrors* g_spread_vsEta, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + TH2F* hcmap, TH2F* hcmap2) +{ + char histoName[100]; + char funcName[100]; + + std::ofstream RMSFile; + if (hcmap2 == NULL) { + RMSFile.open ("RMSFile.txt"); + } + + // define the number of eta rings + int nEtaRings = 85/etaRingWidth; + if( 85%etaRingWidth > 0 ) nEtaRings += 1; + + // initialize the histograms + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + int etaMin = 1 + etaRing * etaRingWidth; + + sprintf(histoName,"h_%s%02d",name.c_str(),etaMin); + h_spread_vsEta.push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + + + // spread histos folding EB+ and EB- + for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) + { + float etaRingMin = hcmap->GetYaxis()->GetBinLowEdge(jbin); + int etaRing = int( (fabs(etaRingMin) - 1.)/etaRingWidth ); + if( etaRing == -1 ) continue; + + + for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) + { + if( hcmap2 == NULL ) + { + float IC = hcmap->GetBinContent(ibin,jbin); + if( IC > 0. && IC < 2. ) + { + h_spread -> Fill(IC); + h_spread_vsEta.at(etaRing) -> Fill(IC); + } + } + else + { + float IC1 = hcmap -> GetBinContent(ibin,jbin); + float IC2 = hcmap2 -> GetBinContent(ibin,jbin); + if( IC1 > 0. && IC1 < 2. && IC2 > 0. && IC2 < 2. ) + { + h_spread -> Fill((IC1-IC2)/(IC1+IC2)); + h_spread_vsEta.at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); + // std::cout<<"eta: "< SetNpx(10000); + if( hcmap2 == NULL ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kRed+2); + + float center = 0.5*(spreadMin+spreadMax); + fgaus -> SetParameter(1,h_spread->GetMean()); + fgaus -> SetParameter(2,h_spread->GetRMS()); + h_spread -> Fit(funcName,"QLS+","",center-h_spread->GetRMS(),center+h_spread->GetRMS()); + + + // fill the TGraph + g_spread_vsEta -> SetMarkerStyle(20); + g_spread_vsEta -> SetMarkerSize(1); + g_spread_vsEta -> GetYaxis() -> SetRangeUser(0.,0.05); + if( hcmap2 == NULL ) g_spread_vsEta -> SetMarkerColor(kBlue+2); + else g_spread_vsEta -> SetMarkerColor(kRed+2); + + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + int etaMin = 1 + etaRing * etaRingWidth; + + sprintf(funcName,"f_%s%02d",name.c_str(),etaMin); + fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); + + fgaus -> SetNpx(10000); + if( hcmap2 == NULL ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kRed+2); + + fgaus -> SetParameter(1,h_spread_vsEta[etaRing]->GetMean()); + fgaus -> SetParameter(2,h_spread_vsEta[etaRing]->GetRMS()); + h_spread_vsEta[etaRing] -> Fit(funcName,"QLS+","",center-3.*h_spread_vsEta[etaRing]->GetRMS(),center+3.*h_spread_vsEta[etaRing]->GetRMS()); + + g_spread_vsEta -> SetPoint(etaRing,etaMin,fgaus->GetParameter(2)); + g_spread_vsEta -> SetPointError(etaRing,0.5*etaRingWidth,fgaus->GetParError(2)); + + // std::cout<GetParameter(2)<GetParameter(2)<<"\n"; + } +} + + + + + + +/////////////////////////////////////////////////////////////////////////////// +void PhiProfile(TH1F* h_phiAvgICSpread, TGraphErrors* g_avgIC_vsPhi, const int& phiRegionWidth, + TH2F* hcmap, TEndcapRings* eRings) +{ + // define the number of phi regions + int nPhiRegions = 360/phiRegionWidth; + if( 360%phiRegionWidth > 0 ) nPhiRegions += 1; + + std::vector h_IC_vsPhi(nPhiRegions); + for(int i = 0; i < nPhiRegions; ++i) + { + char histoName[50]; + sprintf(histoName,"h_IC_vsPhi%03d",i); + h_IC_vsPhi.at(i) = new TH1F(histoName,"",1000,0.,2.); + } + + + for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) + { + float IC = hcmap->GetBinContent(ibin,jbin); + if( IC <= 0. || IC >= 2. ) continue; + + float phiRegionMin = hcmap->GetXaxis()->GetBinLowEdge(ibin); + if( eRings != NULL ) phiRegionMin = eRings -> GetEndcapIphi(ibin,jbin,1); + + int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ); + + h_IC_vsPhi.at(phiRegion) -> Fill(IC); + } + + + for(int i = 0; i < nPhiRegions; ++i) + { + int phiMin = 1 + i * phiRegionWidth; + + h_phiAvgICSpread -> Fill(h_IC_vsPhi.at(i)->GetMean()); + + g_avgIC_vsPhi -> SetPoint(i,phiMin,h_IC_vsPhi.at(i)->GetMean()); + g_avgIC_vsPhi -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhi.at(i)->GetMeanError()); + } + + + TF1* fgaus = new TF1("f_phiAvgICSpread","gaus",0.,2.); + fgaus -> SetNpx(10000); + fgaus -> SetLineColor(kBlack); + + fgaus -> SetParameter(1,h_phiAvgICSpread->GetMean()); + fgaus -> SetParameter(2,h_phiAvgICSpread->GetRMS()); + h_phiAvgICSpread -> Fit("f_phiAvgICSpread","QLS+","",1.-3.*h_phiAvgICSpread->GetRMS(),1.+3.*h_phiAvgICSpread->GetRMS()); + + + + for(int i = 0; i < nPhiRegions; ++i) + { + delete h_IC_vsPhi.at(i); + } +} + + + +void PhiFoldProfile_EB(TGraphErrors* g_avgIC_vsPhiFold_EBM, TGraphErrors* g_avgIC_vsPhiFold_EBP, const int& phiRegionWidth, + TH2F* hcmap) +{ + // define the number of phi regions + int nPhiRegions = 20/phiRegionWidth; + if( 20%phiRegionWidth > 0 ) nPhiRegions += 1; + + std::vector h_IC_vsPhiFold_EBM(nPhiRegions); + std::vector h_IC_vsPhiFold_EBP(nPhiRegions); + for(int i = 0; i < nPhiRegions; ++i) + { + char histoName[50]; + sprintf(histoName,"h_IC_vsPhiFold_EBM_%03d",i); + h_IC_vsPhiFold_EBM.at(i) = new TH1F(histoName,"",1000,0.,2.); + sprintf(histoName,"h_IC_vsPhiFold_EBP_%03d",i); + h_IC_vsPhiFold_EBP.at(i) = new TH1F(histoName,"",1000,0.,2.); + } + + + for(int ibin = 1; ibin <= hcmap->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= hcmap->GetNbinsY(); ++jbin) + { + float IC = hcmap->GetBinContent(ibin,jbin); + if( IC <= 0. || IC >= 2. ) continue; + + float phiRegionMin = hcmap->GetXaxis()->GetBinLowEdge(ibin); + int phiRegion = int( (fabs(phiRegionMin) - 1.)/phiRegionWidth ) % 20; + + float etaBinCenter = hcmap->GetYaxis()->GetBinCenter(jbin); + + if( etaBinCenter < 0. ) h_IC_vsPhiFold_EBM.at(phiRegion) -> Fill(IC); + if( etaBinCenter > 0. ) h_IC_vsPhiFold_EBP.at(phiRegion) -> Fill(IC); + } + + + for(int i = 0; i < nPhiRegions; ++i) + { + int phiMin = 1 + i * phiRegionWidth; + + g_avgIC_vsPhiFold_EBM -> SetPoint(i,phiMin,h_IC_vsPhiFold_EBM.at(i)->GetMean()); + g_avgIC_vsPhiFold_EBM -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhiFold_EBM.at(i)->GetMeanError()); + + g_avgIC_vsPhiFold_EBP -> SetPoint(i,phiMin,h_IC_vsPhiFold_EBP.at(i)->GetMean()); + g_avgIC_vsPhiFold_EBP -> SetPointError(i,0.5*phiRegionWidth,h_IC_vsPhiFold_EBP.at(i)->GetMeanError()); + } +} + +//////////////////////////////////////////////////////////////////////////// +void ResidualSpread(TGraphErrors* g_stat, TGraphErrors* g_spread, TGraphErrors* g_residual) +{ + g_residual -> SetMarkerStyle(20); + g_residual -> SetMarkerSize(1); + g_residual -> SetMarkerColor(kGreen+2); + + + for(int i = 0; i < g_stat->GetN(); ++i) + { + double spread, espread; + double stat, estat; + double residual, eresidual; + double x,ex; + + ex = g_stat-> GetErrorX(i); + + g_stat -> GetPoint(i,x,stat); + estat = g_stat-> GetErrorY(i); + + g_spread -> GetPoint(i,x,spread); + espread = g_spread -> GetErrorY(i); + + if( spread > stat ) + { + residual = sqrt( pow(spread,2) - pow(stat,2) ); + eresidual = sqrt( pow(spread*espread,2) + pow(stat*estat,2) ) / residual; + } + else + { + residual = 0; + eresidual = 0; + } + + g_residual -> SetPoint(i,x,residual); + g_residual -> SetPointError(i,ex,eresidual); + } +} + +////////////////////////////////////////////////////////////// + + + + +///////////////////////////////////////////////////////////////////////////// +void BookSpreadHistos_EE(std::map& h_spread, std::map >& h_spread_vsEta, std::map& g_spread_vsEta, + TEndcapRings* eRings, const int& etaRingWidth, + const std::string& name, const int& nBins_spread, const float& spreadMin, const float& spreadMax, + std::map& hcmap, std::map& hcmap2) +{ + char histoName[100]; + char funcName[100]; + + + // define the number of eta rings + int nEtaRings = 39/etaRingWidth; + if( 39%etaRingWidth > 0 ) nEtaRings += 1; + + + // initialize the histograms (EE-, all EE, EE+) + for(int k = -1; k <= 1; ++k) + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + int etaMin = 0 + etaRing * etaRingWidth; + + if( k == -1 ) + { + sprintf(histoName,"h_%s%02d_EEM",name.c_str(),etaMin); + h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + if( k == 0 ) + { + sprintf(histoName,"h_%s%02d_EE",name.c_str(),etaMin); + h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + if( k == 1 ) + { + sprintf(histoName,"h_%s%02d_EEP",name.c_str(),etaMin); + h_spread_vsEta[k].push_back( new TH1F(histoName,"",nBins_spread,spreadMin,spreadMax) ); + } + } + + + // spread histos + for(int k = -1; k <= 1; ++k) + { + if( k == 0 ) continue; + + for(int ibin = 1; ibin <= hcmap[k]->GetNbinsX(); ++ibin) + for(int jbin = 1; jbin <= hcmap[k]->GetNbinsY(); ++jbin) + { + int etaRing = eRings -> GetEndcapRing(ibin,jbin,k); + if( etaRing == -1 ) continue; + + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) + { + float IC = hcmap[k]->GetBinContent(ibin,jbin); + if( IC > 0. && IC < 2. ) + { + h_spread[k] -> Fill(IC); + h_spread_vsEta[k].at(etaRing) -> Fill(IC); + + h_spread[0] -> Fill(IC); + h_spread_vsEta[0].at(etaRing) -> Fill(IC); + } + } + + else + { + float IC1 = hcmap[k] -> GetBinContent(ibin,jbin); + float IC2 = hcmap2[k] -> GetBinContent(ibin,jbin); + if( IC1 > 0. && IC1 < 2. && IC2 > 0. && IC2 < 2. ) + { + h_spread[k] -> Fill((IC1-IC2)/(IC1+IC2)); + h_spread_vsEta[k].at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); + + h_spread[0] -> Fill((IC1-IC2)/(IC1+IC2)); + h_spread_vsEta[0].at(etaRing) -> Fill((IC1-IC2)/(IC1+IC2)); + } + } + } + } + + + + // fit the global spread + for(int k = -1; k <= 1; ++k) + { + if( k == -1 ) sprintf(funcName,"f_%s_EEM",name.c_str()); + if( k == 0 ) sprintf(funcName,"f_%s_EE", name.c_str()); + if( k == +1 ) sprintf(funcName,"f_%s_EEP",name.c_str()); + + TF1* fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); + + fgaus -> SetNpx(10000); + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kBlue+2); + + float center = 0.5*(spreadMin+spreadMax); + fgaus -> SetParameter(1,h_spread[k]->GetMean()); + fgaus -> SetParameter(2,h_spread[k]->GetRMS()); + h_spread[k] -> Fit(funcName,"QLS+","",center-h_spread[k]->GetRMS(),center+h_spread[k]->GetRMS()); + + + // fill the TGraph + g_spread_vsEta[k] -> SetMarkerStyle(20); + g_spread_vsEta[k] -> SetMarkerSize(1); + g_spread_vsEta[k] -> GetYaxis() -> SetRangeUser(0.,0.05); + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) )g_spread_vsEta[k] -> SetMarkerColor(kBlue+2); + else g_spread_vsEta[k] -> SetMarkerColor(kRed+2); + + for(int etaRing = 0; etaRing < nEtaRings; ++etaRing) + { + if( (h_spread_vsEta[k])[etaRing]->Integral() == 0 ) continue; + + int etaMin = etaRing * etaRingWidth; + + sprintf(funcName,"f_%s%02d",name.c_str(),etaMin); + fgaus = new TF1(funcName,"gaus",spreadMin,spreadMax); + + fgaus -> SetNpx(10000); + if( (hcmap2[-1] == NULL) && (hcmap2[1] == NULL) ) fgaus -> SetLineColor(kBlue+2); + else fgaus -> SetLineColor(kRed+2); + + fgaus -> SetParameter(1,(h_spread_vsEta[k])[etaRing]->GetMean()); + fgaus -> SetParameter(2,(h_spread_vsEta[k])[etaRing]->GetRMS()); + (h_spread_vsEta[k])[etaRing] -> Fit(funcName,"QLS+","",center-3.*(h_spread_vsEta[k])[etaRing]->GetRMS(),center+3.*(h_spread_vsEta[k])[etaRing]->GetRMS()); + + g_spread_vsEta[k] -> SetPoint(etaRing,etaMin,fgaus->GetParameter(2)); + g_spread_vsEta[k] -> SetPointError(etaRing,0.5*etaRingWidth,fgaus->GetParError(2)); + } + } +} + + +/////////////////////////////////////////////////////////////////////// +void PhiProfileEE(TGraphErrors *phiProjection, TGraphErrors **MomentumScale, TH2F* hcmap,TEndcapRings *eRings, const int & iz) +{ + std::vector vectSum; + std::vector vectCounter; + + vectCounter.assign(MomentumScale[0]->GetN(),0.); + vectSum.assign(MomentumScale[0]->GetN(),0.); + + for(int ix=1; ixGetNbinsX()+1;ix++) + for(int iy=1; iyGetNbinsY()+1;iy++) + { + if(hcmap->GetBinContent(ix,iy)==0) continue; + int iPhi = int(eRings->GetEndcapIphi(ix,iy,iz)/(360./MomentumScale[0]->GetN())); + vectSum.at(iPhi) = vectSum.at(iPhi)+hcmap->GetBinContent(ix,iy); + vectCounter.at(iPhi) = vectCounter.at(iPhi)+1; + } + + for(unsigned int i=0; i SetPoint(i,int(i*(360./MomentumScale[0]->GetN())),vectSum.at(i)/vectCounter.at(i)); +} + + + + + + +//------------------------------------------------------------------------------------------------------------- + + + + + + +//////////////////////////// +// define the list of bad TT +//////////////////////////// + +void InitializeDeadTT_EB(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (58,49)); + TT_centre.push_back(std::pair (53,109)); + TT_centre.push_back(std::pair (8,114)); + TT_centre.push_back(std::pair (83,169)); + TT_centre.push_back(std::pair (53,174)); + TT_centre.push_back(std::pair (63,194)); + TT_centre.push_back(std::pair (83,224)); + TT_centre.push_back(std::pair (73,344)); + TT_centre.push_back(std::pair (83,358)); + TT_centre.push_back(std::pair (-13,18)); + TT_centre.push_back(std::pair (-18,23)); + TT_centre.push_back(std::pair (-8,53)); + TT_centre.push_back(std::pair (-3,63)); + TT_centre.push_back(std::pair (-53,128)); + TT_centre.push_back(std::pair (-53,183)); + TT_centre.push_back(std::pair (-83,193)); + TT_centre.push_back(std::pair (-74,218)); + TT_centre.push_back(std::pair (-8,223)); + TT_centre.push_back(std::pair (-68,303)); + TT_centre.push_back(std::pair (-43,328)); +} + +void InitializeDeadTT_EB2012(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (58,49)); + TT_centre.push_back(std::pair (53,109)); + TT_centre.push_back(std::pair (8,114)); + TT_centre.push_back(std::pair (83,169)); + TT_centre.push_back(std::pair (53,174)); + TT_centre.push_back(std::pair (63,194)); + TT_centre.push_back(std::pair (83,224)); + TT_centre.push_back(std::pair (73,344)); + TT_centre.push_back(std::pair (83,358)); + TT_centre.push_back(std::pair (-13,18)); + TT_centre.push_back(std::pair (-18,23)); + TT_centre.push_back(std::pair (-8,53)); + TT_centre.push_back(std::pair (-3,63)); + TT_centre.push_back(std::pair (-53,128)); + TT_centre.push_back(std::pair (-53,183)); + TT_centre.push_back(std::pair (-83,193)); + TT_centre.push_back(std::pair (-74,218)); + TT_centre.push_back(std::pair (-8,223)); + TT_centre.push_back(std::pair (-68,303)); + TT_centre.push_back(std::pair (-43,328)); + TT_centre.push_back(std::pair (-23,167)); +} + +void InitializeDeadTTEEP(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (78,78)); + TT_centre.push_back(std::pair (83,28)); + TT_centre.push_back(std::pair (83,23)); +} + +void InitializeDeadTTEEM(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (53,28)); +} + +void InitializeDeadTTEEP2012(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (78,78)); + TT_centre.push_back(std::pair (83,28)); + TT_centre.push_back(std::pair (83,23)); + TT_centre.push_back(std::pair (91,23)); +} + +void InitializeDeadTTEEM2012(std::vector >& TT_centre) +{ + TT_centre.push_back(std::pair (53,28)); + TT_centre.push_back(std::pair (28,33)); + TT_centre.push_back(std::pair (89,80)); +} + + + + + + +int GetNRegionsEB(const std::string& type) +{ + if( type == "none" ) return 1; + + if( type == "R9" ) return 2; + + if( type == "charge" ) return 2; + + if( type == "eta1" ) return 1; + if( type == "eta2" ) return 2; + if( type == "eta4" ) return 4; + + if( type == "absEta2" ) return 2; + + if( type == "eta2-charge" ) return 4; + + if( type == "absEta2-charge" ) return 4; + + return 0; +} + +int templIndexEB(const std::string& type, const float& eta, const float& charge, const float& R9) +{ + if( type == "none" ) + { + return 0; + } + + + if( type == "R9" ) + { + if( R9 < 0.94 ) return 0; + if( R9 >= 0.94 ) return 1; + } + + + if( type == "charge" ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + + + if( type == "eta1" ) + { + return 0; + } + if( type == "eta2" ) + { + if( eta < 0. ) return 0; + if( eta >= 0. ) return 1; + } + if( type == "eta4" ) + { + if( (eta < -1.) ) return 0; + if( (eta >= -1.) && (eta < 0.) ) return 1; + if( (eta >= 0.) && (eta < 1.) ) return 2; + if( (eta >= 1.) ) return 3; + } + + + if( type == "absEta2" ) + { + if( fabs(eta) < 1. ) return 0; + if( fabs(eta) >= 1. ) return 1; + } + + + if( type == "eta2-charge" ) + { + if( eta < 0. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( eta >= 0. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + if( type == "absEta2-charge" ) + { + if( fabs(eta) < 1. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( fabs(eta) >= 1. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + return -1; +} + + + +int GetNRegionsEE(const std::string& type) +{ + if( type == "none" ) return 1; + + if( type == "R9" ) return 2; + + if( type == "charge" ) return 2; + + if( type == "eta1" ) return 1; + if( type == "eta2" ) return 2; + if( type == "eta4" ) return 4; + + if( type == "absEta2" ) return 2; + + if( type == "eta2-charge" ) return 4; + + if( type == "absEta2-charge" ) return 4; + + return 0; +} + +int templIndexEE(const std::string& type, const float& eta, const float& charge, const float& R9) +{ + if( type == "none" ) + { + return 0; + } + + + if( type == "R9" ) + { + if( R9 < 0.94 ) return 0; + if( R9 >= 0.94 ) return 1; + } + + + if( type == "charge" ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + + + if( type == "eta1" ) + { + return 0; + } + if( type == "eta2" ) + { + if( eta < 0. ) return 0; + if( eta >= 0. ) return 1; + } + if( type == "eta4" ) + { + if( (eta < -2.) ) return 0; + if( (eta >= -2.) && (eta < -1.479) ) return 1; + if( (eta >= 1.479) && (eta < 2.) ) return 2; + if( (eta >= 2.) ) return 3; + } + + + if( type == "absEta2" ) + { + if( fabs(eta) < 2. ) return 0; + if( fabs(eta) >= 2. ) return 1; + } + + + if( type == "eta2-charge" ) + { + if( eta < 0. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( eta >= 0. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + + if( type == "absEta2-charge" ) + { + if( fabs(eta) < 2. ) + { + if( charge < 0. ) return 0; + if( charge > 0. ) return 1; + } + if( fabs(eta) >= 2. ) + { + if( charge < 0. ) return 2; + if( charge > 0. ) return 3; + } + } + + + return -1; +} diff --git a/EOverPCalibration/src/DrawingUtils.cc b/EOverPCalibration/src/DrawingUtils.cc new file mode 100644 index 00000000000..d2c20a79288 --- /dev/null +++ b/EOverPCalibration/src/DrawingUtils.cc @@ -0,0 +1,318 @@ +#include "../interface/DrawingUtils.h" + + + +void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c; + + SetLabelAndTitle(h2); + + if( isEB == true ) + { + c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + h2 -> GetXaxis() -> SetNdivisions(418); + h2 -> GetXaxis() -> SetTitle("i#phi"); + h2 -> GetYaxis() -> SetTitle("i#eta"); + h2 -> GetZaxis() -> SetRangeUser(0.90,1.10); + } + else + { + c = new TCanvas("c",fileName.c_str(),0,0,700,600); + c -> SetGridx(); + c -> SetGridy(); + + h2 -> GetXaxis() -> SetNdivisions(510); + h2 -> GetXaxis() -> SetTitle("ix"); + h2 -> GetYaxis() -> SetTitle("iy"); + h2 -> GetZaxis() -> SetRangeUser(0.70,1.30); + } + + h2 -> Draw("COLZ"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawSpreadHisto(TH1F* h, const std::string& fileName, const std::string& funcName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,700,600); + + SetLabelAndTitle(h); + + if( isEB == true ) h -> GetXaxis() -> SetRangeUser(0.9,1.0999); + else h -> GetXaxis() -> SetRangeUser(0.7,1.2999); + if( isEB == true ) h -> GetYaxis() -> SetRangeUser(0.,2500.*(h->GetNbinsX()/2000.)); + else h -> GetYaxis() -> SetRangeUser(0., 150.*(h->GetNbinsX()/2000.)); + h -> GetYaxis() -> SetTitle("entries"); + h -> GetXaxis() -> SetTitle("IC"); + h -> SetFillColor(kBlue+2); + h -> SetFillStyle(3002); + h -> Draw(""); + + TF1* f_spread = h -> GetFunction(funcName.c_str()); + f_spread -> SetLineWidth(2); + + char latexBuffer[50]; + sprintf(latexBuffer,"#mu = %1.2e",f_spread->GetParameter(1)); + TLatex* latex_mean = new TLatex(0.17,0.80,latexBuffer); + latex_mean -> SetNDC(); + latex_mean -> SetTextFont(42); + latex_mean -> SetTextSize(0.05); + latex_mean -> Draw("same"); + sprintf(latexBuffer,"#sigma = %1.2e",f_spread->GetParameter(2)); + TLatex* latex_sigma = new TLatex(0.17,0.75,latexBuffer); + latex_sigma -> SetNDC(); + latex_sigma -> SetTextFont(42); + latex_sigma -> SetTextSize(0.05); + latex_sigma -> Draw("same"); + sprintf(latexBuffer,"RMS = %1.2e",h->GetRMS()); + TLatex* latex_RMS = new TLatex(0.17,0.70,latexBuffer); + latex_RMS -> SetNDC(); + latex_RMS -> SetTextFont(42); + latex_RMS -> SetTextSize(0.05); + latex_RMS -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + +void DrawSpreadGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB, + TGraphErrors* g_stat) +{ + TCanvas* c; + + SetLabelAndTitle(g); + + if( isEB == true ) + { + c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(0.,85.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.05); + g -> GetXaxis() -> SetTitle("|i#eta|"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + else + { + c = new TCanvas("c",fileName.c_str(),0,0,700,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(-1.,38.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.30); + g -> GetXaxis() -> SetTitle("iRing"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + + TLegend* leg = new TLegend(0.15,0.74,0.43,0.89); + leg -> SetFillColor(0); + leg -> SetTextFont(42); + leg -> SetTextSize(0.05); + leg -> AddEntry(g,"IC spread","P"); + + if( g_stat != NULL ) + { + g_stat -> Draw("P,same"); + leg -> AddEntry(g_stat,"statistical precision","P"); + } + + leg -> Draw("same"); + + c -> Print((fileName+".png").c_str(),"png"); + + delete c; +} + + + +void DrawPhiAvgICSpread(TH1F* h, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,700,600); + + SetLabelAndTitle(h); + + if( isEB == true ) h -> GetXaxis() -> SetRangeUser(0.98,1.01999); + else h -> GetXaxis() -> SetRangeUser(0.90,1.0999); + if(isEB == true ) h -> GetYaxis() -> SetRangeUser(0.,70.); + h -> GetYaxis() -> SetTitle("entries"); + h -> GetXaxis() -> SetTitle("#LTIC#GT_{i#phi}"); + h -> SetFillColor(kBlack); + h -> SetFillStyle(3003); + h -> Draw(""); + + TF1* f_phiAvgICSpread = h -> GetFunction("f_phiAvgICSpread"); + f_phiAvgICSpread -> SetLineWidth(2); + + char latexBuffer[50]; + sprintf(latexBuffer,"#mu = %1.2e",f_phiAvgICSpread->GetParameter(1)); + TLatex* latex_mean = new TLatex(0.17,0.80,latexBuffer); + latex_mean -> SetNDC(); + latex_mean -> SetTextFont(42); + latex_mean -> SetTextSize(0.05); + latex_mean -> Draw("same"); + sprintf(latexBuffer,"#sigma = %1.2e",f_phiAvgICSpread->GetParameter(2)); + TLatex* latex_sigma = new TLatex(0.17,0.75,latexBuffer); + latex_sigma -> SetNDC(); + latex_sigma -> SetTextFont(42); + latex_sigma -> SetTextSize(0.05); + latex_sigma -> Draw("same"); + sprintf(latexBuffer,"RMS = %1.2e",h->GetRMS()); + TLatex* latex_RMS = new TLatex(0.17,0.70,latexBuffer); + latex_RMS -> SetNDC(); + latex_RMS -> SetTextFont(42); + latex_RMS -> SetTextSize(0.05); + latex_RMS -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawAvgICVsPhiGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const Color_t& color, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + SetLabelAndTitle(g); + + g -> GetXaxis() -> SetRangeUser(0.,360.999); + if( isEB == true) g -> GetYaxis() -> SetRangeUser(0.975,1.025); + else g -> GetYaxis() -> SetRangeUser(0.900,1.100); + g -> GetYaxis() -> SetTitle("#LTIC#GT_{i#phi}"); + g -> GetXaxis() -> SetTitle("i#phi"); + g -> SetMarkerStyle(20); + g -> SetMarkerSize(0.5); + g -> SetMarkerColor(color); + g -> Draw("APL"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawAvgICVsPhiFoldGraph(TGraphErrors* g, TGraphErrors* g2, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + SetLabelAndTitle(g); + SetLabelAndTitle(g2); + + g -> GetYaxis() -> SetRangeUser(0.98,1.01999); + g -> GetXaxis() -> SetRangeUser(0.,21.); + g -> GetYaxis() -> SetTitle("#LTIC#GT_{i#phi}"); + g -> GetXaxis() -> SetTitle("i#phi%20"); + g -> SetMarkerStyle(20); + g -> SetMarkerSize(0.7); + g -> SetMarkerColor(kRed+2); + g -> SetLineColor(kRed+2); + g -> Draw("APL"); + + g2 -> SetMarkerStyle(20); + g2 -> SetMarkerSize(0.7); + g2 -> SetMarkerColor(kGreen+2); + g2 -> SetLineColor(kGreen+2); + g2 -> Draw("PL,same"); + + TLegend* leg = new TLegend(0.13,0.74,0.43,0.89); + leg -> SetFillColor(0); + leg -> AddEntry(g, "w/o crack corr.","P"); + leg -> AddEntry(g2,"w/ crack corr.", "P"); + leg -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + delete c; +} + + + +void DrawResidualGraph(TGraphErrors* g, const std::string& fileName, const std::string& fileType, const bool& isEB) +{ + TCanvas* c; + + SetLabelAndTitle(g); + + if( isEB == true ) + { + c = new TCanvas("c",fileName.c_str(),0,0,1000,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(0.,85.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.03); + g -> GetXaxis() -> SetTitle("|i#eta|"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + else + { + c = new TCanvas("c",fileName.c_str(),0,0,700,600); + c -> SetGridx(); + c -> SetGridy(); + + g -> GetXaxis() -> SetRangeUser(-1.,38.999); + g -> GetYaxis() -> SetRangeUser(0.00,0.20); + g -> GetXaxis() -> SetTitle("iRing"); + g -> GetYaxis() -> SetTitle("#sigma"); + g -> Draw("AP"); + } + + TLegend* leg = new TLegend(0.15,0.74,0.43,0.89); + leg -> SetFillColor(0); + leg -> SetTextFont(42); + leg -> SetTextSize(0.05); + leg -> AddEntry(g,"IC residual spread","P"); + + leg -> Draw("same"); + + c -> Print((fileName+"."+fileType).c_str(),fileType.c_str()); + + delete c; +} + + + +void SetLabelAndTitle(TGraphErrors* g) +{ + g -> GetXaxis() -> SetLabelSize(0.04); + g -> GetYaxis() -> SetLabelSize(0.04); + g -> GetXaxis() -> SetTitleSize(0.05); + g -> GetYaxis() -> SetTitleSize(0.05); + g -> GetXaxis() -> SetTitleOffset(1.20); + g -> GetYaxis() -> SetTitleOffset(1.20); +} + +void SetLabelAndTitle(TH1F* h) +{ + h -> GetXaxis() -> SetLabelSize(0.04); + h -> GetYaxis() -> SetLabelSize(0.04); + h -> GetXaxis() -> SetTitleSize(0.05); + h -> GetYaxis() -> SetTitleSize(0.05); + h -> GetXaxis() -> SetTitleOffset(1.20); + h -> GetYaxis() -> SetTitleOffset(1.20); +} + +void SetLabelAndTitle(TH2F* h2) +{ + h2 -> GetXaxis() -> SetLabelSize(0.04); + h2 -> GetYaxis() -> SetLabelSize(0.04); + h2 -> GetXaxis() -> SetTitleSize(0.05); + h2 -> GetYaxis() -> SetTitleSize(0.05); + h2 -> GetXaxis() -> SetTitleOffset(1.20); + h2 -> GetYaxis() -> SetTitleOffset(1.20); +} diff --git a/EOverPCalibration/src/FastCalibratorEB.cc b/EOverPCalibration/src/FastCalibratorEB.cc new file mode 100644 index 00000000000..5d418535037 --- /dev/null +++ b/EOverPCalibration/src/FastCalibratorEB.cc @@ -0,0 +1,974 @@ +//adapting it to ECALELF ntuple + +#include "../interface/FastCalibratorEB.h" +#include "../interface/GetHashedIndexEB.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +///==== Default constructor Contructor + +FastCalibratorEB::FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + + // if parameter tree is not specified (or zero), connect the file + // used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + } + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEB = typeEB; +} + +///==== deconstructor + +FastCalibratorEB::~FastCalibratorEB(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +///=== Acces to the entry information in the input tree or chain + +Int_t FastCalibratorEB::GetEntry(Long64_t entry){ + + if (!fChain) return 0; + return fChain->GetEntry(entry); +} + +///==== Load information of input Ntupla + +Long64_t FastCalibratorEB::LoadTree(Long64_t entry){ +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + + +//===== Fill Scalibration Map + +void FastCalibratorEB::FillScalibMap(TString miscalibMap){ + + std::ifstream scalibFile; + scalibFile.open(miscalibMap.Data()); + + if (!scalibFile) { + std::cout<<"miscalib map missing!!!"<> eta >> scalibValue; + scalibMap.insert(std::pair(eta,scalibValue)); + } + scalibFile.close(); +} + + +///==== Variables initialization + +void FastCalibratorEB::Init(TTree *tree){ + + /// Set object pointer + + energyRecHitSCEle1 = 0; + XRecHitSCEle1 = 0; //ETA + YRecHitSCEle1 = 0; //PHI + ZRecHitSCEle1 = 0; + recoFlagRecHitSCEle1 = 0; + + energyRecHitSCEle2 = 0; + XRecHitSCEle2 = 0; //ETA + YRecHitSCEle2 = 0; //PHI + ZRecHitSCEle2 = 0; + recoFlagRecHitSCEle2 = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + + fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); + fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); + fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); + fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); + fChain->SetBranchStatus("PtEle", 1); fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); + fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); + fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); + fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); + fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); + fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); + fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); + fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); + fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); + fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); + fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); + fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); + fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); + + // ele1 + fChain->SetBranchStatus("energyRecHitSCEle1", 1); fChain->SetBranchAddress("energyRecHitSCEle1", &energyRecHitSCEle1, &b_energyRecHitSCEle1); + fChain->SetBranchStatus("XRecHitSCEle1", 1); fChain->SetBranchAddress("XRecHitSCEle1", &XRecHitSCEle1, &b_XRecHitSCEle1); + fChain->SetBranchStatus("YRecHitSCEle1", 1); fChain->SetBranchAddress("YRecHitSCEle1", &YRecHitSCEle1, &b_YRecHitSCEle1); + fChain->SetBranchStatus("ZRecHitSCEle1", 1); fChain->SetBranchAddress("ZRecHitSCEle1", &ZRecHitSCEle1, &b_ZRecHitSCEle1); + fChain->SetBranchStatus("recoFlagRecHitSCEle1", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle1", &recoFlagRecHitSCEle1, &b_recoFlagRecHitSCEle1); + + // ele2 + fChain->SetBranchStatus("energyRecHitSCEle2", 1); fChain->SetBranchAddress("energyRecHitSCEle2", &energyRecHitSCEle2, &b_energyRecHitSCEle2); + fChain->SetBranchStatus("XRecHitSCEle2", 1); fChain->SetBranchAddress("XRecHitSCEle2", &XRecHitSCEle2, &b_XRecHitSCEle2); + fChain->SetBranchStatus("YRecHitSCEle2", 1); fChain->SetBranchAddress("YRecHitSCEle2", &YRecHitSCEle2, &b_YRecHitSCEle2); + fChain->SetBranchStatus("ZRecHitSCEle2", 1); fChain->SetBranchAddress("ZRecHitSCEle2", &ZRecHitSCEle2, &b_ZRecHitSCEle2); + fChain->SetBranchStatus("recoFlagRecHitSCEle2", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle2", &recoFlagRecHitSCEle2, &b_recoFlagRecHitSCEle2); + +} + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEB::bookHistos(int nLoops){ + + hC_IntercalibValues = new hChain ("IntercalibValues", "IntercalibValues", 2000,0.5,1.5, nLoops); + + hC_PullFromScalib = new hChain ("hC_PullFromScalib", "hC_PullFromScalib", 2000,-0.5,0.5, nLoops); + + hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); + + hC_scale_EB = new h2Chain("hC_scale_EB", "hC_scale_EB", 360,1, 361, 171, -85, 86, nLoops ); + + h_scalib_EB = new TH2F("h_scalib_EB", "h_scalib_EB", 360,1, 361, 171, -85, 86 ); + + h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); + + p_IntercalibValues_iEta = new TProfile ("p_IntercalibValues_iEta","p_IntercalibValues_iEta", 171, -85, 86, -0.1, 2.1); + + h_IntercalibSpread_iEta = new TH1F ("h_IntercalibSpread_iEta", "h_IntercalibSpread_iEta", 171, -85, 86); + + h_IntercalibValues_test = new TH1F ("h_IntercalibValues_test", "h_IntercalibValues_test", 400, -1, 1); + + h_scale_EB_hashedIndex = new TH1F("h_scale_EB_hashedIndex", "h_scale_EB_hashedIndex", 61201,-0.5,61999.5 ); + + h_Init_IntercalibValues = new TH1F("h_Init_IntercalibValues","h_Init_IntercalibValues",2000,0.5,1.5); + + h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); + + g_ICmeanVsLoop = new TGraphErrors(); + g_ICmeanVsLoop -> SetName("g_ICmeanVsLoop"); + g_ICmeanVsLoop -> SetTitle("g_ICmeanVsLoop"); + + g_ICrmsVsLoop = new TGraphErrors(); + g_ICrmsVsLoop -> SetName("g_ICrmsVsLoop"); + g_ICrmsVsLoop ->SetTitle("g_ICrmsVsLoop"); + + h_scale_EB = new TH2F("h_scale_EB", "h_scale_EB", 360,1, 361, 171, -85, 86 ); + + h_scale_EB_meanOnPhi = new TH2F("h_scale_EB_meanOnPhi", "h_scale_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); + + h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); + + return; +} + +//! Build E/p distribution for both ele1 and ele2 + +void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, + float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, bool isMCTruth){ + + if(iLoop ==0){ + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + else{ + hC_EoP_eta_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1->at(iRecHit) < 4 ) /// control if this recHit is good + { + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle1 -> at(iRecHit); ///! Seed search + } + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle1->at(iRecHit) < 4) ///! SC energy taking only good channels + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && recoFlagRecHitSCEle1->at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + } + + ///! Eta seed from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + ///! different E/p if I am using MCThruth informations or not + if(!isMCTruth) { + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + /// fbrem Selection + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; + + /// fbrem Selection + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + + /// Save electron E/p in a chain of histogramm each for eta bin + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + + } + ///=== Second medium electron from Z + + if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = energySCEle[1]/rawEnergySCEle[1]; /// FEta approximation + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2->at(iRecHit) < 4) + { + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle2 -> at(iRecHit); ///Seed informations + } + + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if (recoFlagRecHitSCEle2->at(iRecHit) < 4 ) /// SC Energy only for good channels + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2->at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + } + + + /// Eta seed info from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + /// MCTruth analysis option + if(!isMCTruth) { + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + ///R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection==true ) skipElectron = true; + + /// fbrem Selection + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; + + /// fbrem Selection + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + + /// Save E/p electron information + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + } + } + + /// Histogramm Normalization + for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++) hC_EoP_eta_ele->Normalize(ieta); + + /// Save E/p pdf if it is required + if(isSaveEPDistribution == true) { + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// Calibration Loop over the ntu events +void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection,bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, + bool isMCTruth, std::map > > jsonMap, float miscalibMethod, TString miscalibMap){ + if (fChain == 0) return; + + if(isMiscalib == true) { + std::cout<<"method used for the scalibration (1=from map, 0=linear): "< theScalibration(m_regions, 0.); + TRandom3 genRand; + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { + + bool isDeadXtal = false ; + + /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); + } + else{ + if(isMiscalib == true) { + if (miscalibMethod == 1) { //miscalibration with a gaussian spread (eta-dependent) + theScalibration[iIndex] = scalibMap.at(GetIetaFromHashedIndex(iIndex)); //take the values from the map filled before + } + else + theScalibration[iIndex] = 1 + 0.1*fabs(GetIetaFromHashedIndex(iIndex))/85.; //linear eta-dependent scalibration + + } + +// theScalibration[iIndex] = 1.+ 0.01*fabs(GetIetaFromHashedIndex(iIndex));// genRand.Gaus(1.,0.01); ///! 5% of Miscalibration fixed + if(isMiscalib == false) theScalibration[iIndex] = 1.; + h_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map + } + } + + /// ----------------- Calibration Loops -----------------------------// + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// prepare the numerator and denominator for each Xtal + + std::vector theNumerator(m_regions, 0.); + std::vector theDenominator(m_regions, 0.); + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + ///==== build E/p distribution ele 1 and 2 + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isfbrem,fbremMax,isPtCut,PtMin,isMCTruth); + + // define map with events + std::map >,int> eventsMap; + + /// Loop on each entry + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + //********************************* + // JSON FILE AND DUPLIACTES IN DATA + + bool skipEvent = false; + if( isMCTruth == 0 ) + { + if(AcceptEventByRunAndLumiSection(runNumber,lumiBlock,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiBlock,eventNumber); + std::pair > eventRUNandLSandID(runNumber,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + float pIn, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Tight electron information from W and Z, it depends on the flag variable isW, isZ + + if ( isEBEle[0] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = energySCEle[0]/rawEnergySCEle[0]; + + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0 ; + + bool skipElectron = false; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0 ) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if (recoFlagRecHitSCEle1->at(iRecHit) < 4) ///! SC Energy + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + if(theScalibration[thisIndex] == 0 && energyRecHitSCEle1 -> at(iRecHit)/energySCEle[0] >= 0.15 ) ///! not to introduce a bias in the Dead xtal study + skipElectron = true; + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1->at(iRecHit)<4){ + E_seed=energyRecHitSCEle1 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); //! Seed Infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && + recoFlagRecHitSCEle1->at(iRecHit) < 4 ) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + } + + + ///! if MCTruth Analysis + if(!isMCTruth) { + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])); + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// Take the correct pdf for the ring in order to reweight the events in L3 + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + + /// Basic selection on E/p or R9 if you want to apply + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron = true; + if( !skipElectron) { + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + if (recoFlagRecHitSCEle1->at(iRecHit) >= 4) continue ; + + int thisIndex = GetHashedIndexEB(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/pIn); /// factor use to reweight the evemts + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + + } + /// Use Half Statistic only even + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odd event + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + skipElectron = false; + + /// Ele2 medium from Z only Barrel + if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + FdiEta = energySCEle[1]/rawEnergySCEle[1]; + // Electron energy + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle2->at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + if(theScalibration[thisIndex] == 0 && energyRecHitSCEle2 -> at(iRecHit)/energySCEle[1] >= 0.15 ) ///! not to introduce a bias in the Dead xtal study + skipElectron = true; + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2->at(iRecHit) < 4){ + E_seed=energyRecHitSCEle2 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); /// Seed information + } + + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2->at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + + } + + ///! Option for MCTruth analysis + if(!isMCTruth){ + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])); + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// discard electrons with bad E/P or R9 + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + + if( !skipElectron ){ + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + if (recoFlagRecHitSCEle2->at(iRecHit) >= 4) continue ; + + int thisIndex = GetHashedIndexEB(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + // std::cout<<"DEBUG: "<at(iRecHit)<<" "<at(iRecHit)<<" "<at(iRecHit)< 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use evens + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odds + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/pIn); + theNumerator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*(thisIC/thisE)*pIn/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + + } + + } + ///! End Cycle on the events + + ///New Loop cycle + Save info + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC("auxiliary_IC","auxiliary_IC",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < 61200; iIndex++ ){ + + if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ + + float thisIntercalibConstant = 1.; + /// Solve the cases where the recHit energy is always 0 (dead Xtal?) + bool isDeadXtal = false ; + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) continue; + + + if ( theDenominator[iIndex] != 0. ) thisIntercalibConstant = theNumerator[iIndex]/theDenominator[iIndex]; + float oldIntercalibConstant = 1.; + if ( iLoop > 0 ) oldIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (iIndex+1); + + h_scale_EB_hashedIndex -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); /// IC product useful for L3 methods + hC_IntercalibValues -> Fill(iLoop, thisIntercalibConstant); /// IC distribution at each loop + hC_PullFromScalib -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); ///IC Map + + ///Save the new IC coefficient + auxiliary_IC.Fill(thisIntercalibConstant); + + } + + } + /// Info in order to test convergence + g_ICmeanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetMean()); + g_ICmeanVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetMeanError()); + + g_ICrmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetRMS()); + g_ICrmsVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetRMSError()); + }/// end calibration loop + + + int myPhiIndex = 0; + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + ///Setup the histo for fit + TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",400, 0.2, 1.9); + TF1 f1("f1","gaus",0.2,1.9); + + int totIphi = 0; + float meanICforPhiRing = 0.; + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + float thisIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); + // std::cout< GetBinContent(thisHashedIndex+1)< Fill(iphi, iabseta*theZside, thisIntercalibConstant); ///Fill with Last IC Value + + if (GetIetaFromHashedIndex(thisHashedIndex) == 85) h_IntercalibValues_test -> Fill (thisIntercalibConstant); + + p_IntercalibValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisIntercalibConstant); + + histoAuxiliary . Fill (thisIntercalibConstant); + + + ///Vectors + IetaValues.push_back(iabseta*theZside); + IphiValues.push_back(iphi); + ICValues.push_back(thisIntercalibConstant); + + meanICforPhiRing += thisIntercalibConstant; + totIphi++; + + } + + for ( int uu = 0; uu < totIphi; uu++ ) + meanICforPhiRingValues.push_back(meanICforPhiRing/totIphi); + /// Note this info are not used furhter because channels near to the dead ones are not skipped + + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + + h_scale_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, ICValues.at(myPhiIndex)/meanICforPhiRingValues.at(myPhiIndex)); + myPhiIndex++; /// Normalization IC with the mean of each ring + + } + f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); + f1.SetRange(1-5*histoAuxiliary.GetRMS(), 1+5*histoAuxiliary.GetRMS()); + histoAuxiliary . Fit("f1","QR+"); + + if ( f1.GetParError(2) > 0.5 ) continue; + h_IntercalibSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); + h_IntercalibSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); + + } + + } + +} +/// Save infos in the output +void FastCalibratorEB::saveHistos(TFile * f1){ + + f1->cd(); + hC_IntercalibValues -> Write(*f1); + hC_PullFromScalib -> Write(*f1); + hC_EoP -> Write(*f1); + hC_scale_EB -> Write("",*f1); + h_scalib_EB -> Write(); + + h_IntercalibValues_test -> Write(); + h_Occupancy_hashedIndex -> Write(); + p_IntercalibValues_iEta -> Write(); + h_Init_IntercalibValues -> Write(); + + h_IntercalibSpread_iEta -> Write(); + h_scale_EB -> Write(); + h_scale_EB_meanOnPhi -> Write("h_scale_map"); + h_scale_EB_hashedIndex -> Write(); + + h_occupancy -> Write(); + + g_ICmeanVsLoop -> Write(); + g_ICrmsVsLoop -> Write(); + + h_map_Dead_Channels -> Write() ; + + f1->Close(); + + return; +} +/// Save E/0 distribution +void FastCalibratorEB::saveEoPeta(TFile * f2){ + f2->cd(); + hC_EoP_eta_ele ->Write(*f2); + f2->Close(); +} + +///! Acquire fake dead channel list on order to evaluate the effected of IC near to them +void FastCalibratorEB::AcquireDeadXtal(TString inputDeadXtal, const bool & isDeadTriggerTower){ + + if(inputDeadXtal!="NULL"){ + + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iEta, iPhi ; + + while(!DeadXtal.eof()){ + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iEta >> iPhi ; + + if(iEta >=0){ + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; + if(isDeadTriggerTower) { + for(int iphi = -2 ; iphi <= 2 ; iphi ++){ + for(int ieta = -2 ; ieta <=2 ; ieta ++){ + if(iphi==0 && ieta==0) continue ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta+ieta,iPhi+iphi,1)) ; + } + } + } + } + + else{ + + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; + if(isDeadTriggerTower) { + for(int iphi = -2 ; iphi <= 2 ; iphi ++){ + for(int ieta = -2 ; ieta <=2 ; ieta ++){ + if(iphi==0 && ieta==0) continue ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta+ieta,iPhi+iphi,-1)) ; + } + } + } + } + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + + else DeadXtal_HashedIndex.push_back(-9999); + +} + +///! Check if the channel is dead or not +bool FastCalibratorEB::CheckDeadXtal(const int & iEta, const int & iPhi){ + int hashed_Index; + if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); + else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} diff --git a/EOverPCalibration/src/FastCalibratorEB_MVA.cc b/EOverPCalibration/src/FastCalibratorEB_MVA.cc new file mode 100644 index 00000000000..b1949705b59 --- /dev/null +++ b/EOverPCalibration/src/FastCalibratorEB_MVA.cc @@ -0,0 +1,1048 @@ +#include "../interface/FastCalibratorEB_MVA.h" +#include "../interface/GetHashedIndexEB.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +///==== Default constructor Contructor + +FastCalibratorEB_MVA::FastCalibratorEB_MVA(TTree *tree,TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + +// if parameter tree is not specified (or zero), connect the file +// used to generate this class and read the Tree. + if (tree == 0) {TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject ("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + if (!f) f = new TFile("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + + tree = (TTree*)gDirectory->Get("ntu"); + } + Init(tree); +} + +///==== deconstructor + +FastCalibratorEB_MVA::~FastCalibratorEB_MVA(){ + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +///=== Acces to the entry information in the input tree or chain + +Int_t FastCalibratorEB_MVA::GetEntry(Long64_t entry){ + if (!fChain) return 0; + return fChain->GetEntry(entry); + +} + +///==== Load information of input Ntupla + +Long64_t FastCalibratorEB_MVA::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + Notify(); + } + return centry; +} + +///==== Variables initialization + +void FastCalibratorEB_MVA::Init(TTree *tree){ + + /// Set object pointer + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix = 0; + ele1_recHit_flag = 0; + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_flag = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchAddress("BDTG_weightEB_W_1", &BDTG_weightEB_W_1, &b_BDTG_weightEB_W_1); + fChain->SetBranchAddress("BDTG_weightEB_W_2", &BDTG_weightEB_W_2, &b_BDTG_weightEB_W_2); +// fChain->SetBranchAddress("BDTG_weightEB_Z_1", &BDTG_weightEB_Z_1, &b_BDTG_weightEB_Z_1); +// fChain->SetBranchAddress("BDTG_weightEB_Z_2", &BDTG_weightEB_Z_2, &b_BDTG_weightEB_Z_2); + + fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex, &b_ele1_recHit_hashedIndex); + fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); + fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + +// fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); +// fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); +// fChain->SetBranchAddress("ele1_DR", &ele1_DR, &b_ele1_DR); +// fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + + fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); + + + fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); + fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); + +// fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); +// fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); +// fChain->SetBranchAddress("ele2_DR", &ele2_DR, &b_ele2_DR); +// fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + + fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchAddress("ele2_scEta", &ele2_scEta, &b_ele2_scEta); + + fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); + fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); + + fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); + fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + + Notify(); +} + +Bool_t FastCalibratorEB_MVA::Notify(){ + // The Notify() function is called when a new file is opened. This + // can be either for a new TTree in a TChain or when when a new TTree + // is started when using PROOF. It is normally not necessary to make changes + // to the generated code, but the routine can be extended by the + // user if needed. The return value is currently not used. + + return kTRUE; +} + +void FastCalibratorEB_MVA::Show(Long64_t entry){ +// Print contents of entry. +// If entry is not specified, print current entry + if (!fChain) return; + fChain->Show(entry); +} + +Int_t FastCalibratorEB_MVA::Cut(Long64_t entry){ +// This function may be called from Loop. +// returns 1 if entry is accepted. +// returns -1 otherwise. + return 1; +} + + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEB_MVA::bookHistos(int nLoops){ + + hC_IntercalibValues = new hChain ("IntercalibValues", "IntercalibValues", 2000,0.5,1.5, nLoops); + + hC_PullFromScalib = new hChain ("hC_PullFromScalib", "hC_PullFromScalib", 2000,-0.5,0.5, nLoops); + + hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); + + hC_scale_EB = new h2Chain("hC_scale_EB", "hC_scale_EB", 360,1, 361, 171, -85, 86, nLoops ); + + h_scalib_EB = new TH2F("h_scalib_EB", "h_scalib_EB", 360,1, 361, 171, -85, 86 ); + + h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); + + p_IntercalibValues_iEta = new TProfile ("p_IntercalibValues_iEta","p_IntercalibValues_iEta", 171, -85, 86, -0.1, 2.1); + + h_IntercalibSpread_iEta = new TH1F ("h_IntercalibSpread_iEta", "h_IntercalibSpread_iEta", 171, -85, 86); + + h_IntercalibValues_test = new TH1F ("h_IntercalibValues_test", "h_IntercalibValues_test", 400, -1, 1); + + h_scale_EB_hashedIndex = new TH1F("h_scale_EB_hashedIndex", "h_scale_EB_hashedIndex", 61201,-0.5,61999.5 ); + + h_Init_IntercalibValues = new TH1F("h_Init_IntercalibValues","h_Init_IntercalibValues",2000,0.5,1.5); + + h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); + + h_WeigthEB_W_1 = new TH1F ("h_WeigthEB_W_1","h_WeigthEB_W_1",500,0.,1.5); + h_WeigthEB_W_2 = new TH1F ("h_WeigthEB_W_2","h_WeigthEB_W_2",500,0.,1.5); + + g_ICmeanVsLoop = new TGraphErrors(); + g_ICmeanVsLoop -> SetName("g_ICmeanVsLoop"); + g_ICmeanVsLoop -> SetTitle("g_ICmeanVsLoop"); + + g_ICrmsVsLoop = new TGraphErrors(); + g_ICrmsVsLoop -> SetName("g_ICrmsVsLoop"); + g_ICrmsVsLoop ->SetTitle("g_ICrmsVsLoop"); + + h_scale_EB = new TH2F("h_scale_EB", "h_scale_EB", 360,1, 361, 171, -85, 86 ); + + h_scale_EB_meanOnPhi = new TH2F("h_scale_EB_meanOnPhi", "h_scale_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); + + h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); + + return; +} + +//! Build weight distribution for TMVA correction +void FastCalibratorEB_MVA::BuildWeightDistribution_ele(int iLoop, int nentries , int useW, int useZ,std::vector theScalibration,bool isR9selection){ + +if(iLoop ==0){ + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building Weight distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag->at(iRecHit) < 4*/ ) /// control if this recHit is good + { + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + } + + // if(ele1_recHit_flag->at(iRecHit) < 4) ///! SC energy taking only good channels + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 + /*&& ele1_recHit_flag->at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + bool skipElectron = false; + + + /// R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; + + + if(!skipElectron){ h_WeigthEB_W_1->Fill(BDTG_weightEB_W_1); + h_WeigthEB_W_2->Fill(BDTG_weightEB_W_2); + } + } + } + } + else return; + +} + + + + +//! Build E/p distribution for both ele1 and ele2 + +void FastCalibratorEB_MVA::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration,bool isSaveEPDistribution,bool isR9selection, bool isMCTruth){ + + if(iLoop ==0) { + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + else{ + hC_EoP_eta_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& + ele1_recHit_flag->at(iRecHit) < 4*/ + ) /// control if this recHit is good + { + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + + } + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + // if(ele1_recHit_flag->at(iRecHit) < 4) ///! SC energy taking only good channels + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 + //&& ele1_recHit_flag->at(iRecHit) < 4 + ) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + ///! Eta seed from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + ///! different E/p if I am using MCThruth informations or not + if(!isMCTruth) pIn = ele1_tkP; + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; + + /// Save electron E/p in a chain of histogramm each for eta bin + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + + } + ///=== Second medium electron from Z + + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/ele2_scERaw; /// FEta approximation + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag->at(iRecHit) < 4*/){ + + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); ///Seed informations + + } + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + // if (ele2_recHit_flag->at(iRecHit) < 4 ) /// SC Energy only for good channels + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag->at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + /// Eta seed info from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + + bool skipElectron = false; + + /// MCTruth analysis option + + if(!isMCTruth) pIn = ele2_tkP; + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + ///R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.35 && fabs(ele2_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.7 && fabs(ele2_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>1.05) skipElectron = true; + /// Save E/p electron information + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + } + + + } + + /// Histogramm Normalization + for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++) hC_EoP_eta_ele->Normalize(ieta); + + /// Save E/p pdf if it is required + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL"){ + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// Calibration Loop over the ntu events + +void FastCalibratorEB_MVA::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution,bool isEPselection,bool isR9selection, bool isMCTruth) +{ + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = 0; + + + /// Define useful numbers + static const int MIN_IETA = 1; + static const int MIN_IPHI = 1; + static const int MAX_IETA = 85; + static const int MAX_IPHI = 360; + + for ( int iabseta = MIN_IETA; iabseta <= MAX_IETA; iabseta++ ){ + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + m_regions++; + + } + } + } + + /// Barrel region = Barrel xtal + std::cout << "m_regions " << m_regions << std::endl; + + /// Build the scalibration Map for MC Analysis + + std::vector theScalibration(m_regions, 0.); + TRandom3 genRand; + + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { + + bool isDeadXtal = false ; + + /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); + } + else{ + + if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); ///! 5% of Miscalibration fixed + if(isMiscalib == false) theScalibration[iIndex] = 1.; + h_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map + } + } + + /// ----------------- Calibration Loops -----------------------------// + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// prepare the numerator and denominator for each Xtal + + std::vector theNumerator(m_regions, 0.); + std::vector theDenominator(m_regions, 0.); + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + + /// === Build Weight Distribution + + BuildWeightDistribution_ele(iLoop,nentries,useW,useZ,theScalibration,isR9selection); + + ///==== build E/p distribution ele 1 and 2 + + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,isMCTruth); + + + Long64_t nbytes = 0, nb = 0; + + /// Loop on each entry + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + float pIn, pSub, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Tight electron information from W and Z, it depends on the flag variable isW, isZ + + if ( ele1_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/ele1_scERaw; + + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0 ; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0 ) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + //if (ele1_recHit_flag->at(iRecHit) < 4) ///! SC Energy + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag->at(iRecHit)<4*/) + { + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); //! Seed Infos + } + + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag->at(iRecHit) < 4 */) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + pSub = 0.; //NOTALEO : test dummy + bool skipElectron = false; + + ///! if MCTruth Analysis + if(!isMCTruth) + { + pIn = ele1_tkP; + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// Take the correct pdf for the ring in order to reweight the events in L3 + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// Basic selection on E/p or R9 if you want to apply + if ( fabs(thisE/pIn - 1) > 0.3 && isEPselection==true) skipElectron = true; + + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.35 && fabs(ele1_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>0.7 && fabs(ele1_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>1.05) skipElectron = true; + + if ( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if ( !skipElectron && BDTG_weightEB_W_1!=-99. && BDTG_weightEB_W_2!=-99. ) { + + double Maximum_h_WeigthEB_W_1 = h_WeigthEB_W_1->GetBinCenter(h_WeigthEB_W_1->GetMaximumBin()); + double Maximum_h_WeigthEB_W_2 = h_WeigthEB_W_2->GetBinCenter(h_WeigthEB_W_2->GetMaximumBin()); + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + // if (ele1_recHit_flag->at(iRecHit) >= 4) continue ; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)* + exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + } + /// Use Half Statistic only even + else if ( splitStat == 1 && jentry%2 == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + + /// use odd event + else if ( splitStat == -1 && jentry%2 != 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + + } + + } + + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + skipElectron = false; + + /// Ele2 medium from Z only Barrel + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + FdiEta = ele2_scE/ele2_scERaw; + // Electron energy + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + //if(ele2_recHit_flag->at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag->at(iRecHit) < 4*/){ + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); /// Seed information + + } + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag->at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + pSub = 0.; //NOTALEO : test dummy + + ///! Option for MCTruth analysis + if(!isMCTruth) pIn = ele2_tkP; + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// discard electrons with bad E/P or R9 + if ( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if ( fabs(thisE/pIn - 1) > 0.3 && isEPselection==true) skipElectron = true; + ///R9 Selection + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)<=0.35) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.35 && fabs(ele2_scEta)<=0.7) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>0.7 && fabs(ele2_scEta)<=1.05 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>1.05) skipElectron = true; + + if ( !skipElectron && BDTG_weightEB_W_1!=-99. && BDTG_weightEB_W_2!=-99. ) { + + double Maximum_h_WeigthEB_W_1 = h_WeigthEB_W_1->GetBinCenter(h_WeigthEB_W_1->GetMaximumBin()); + double Maximum_h_WeigthEB_W_2 = h_WeigthEB_W_2->GetBinCenter(h_WeigthEB_W_2->GetMaximumBin()); + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + // if (ele2_recHit_flag->at(iRecHit) >= 4) continue ; + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + /// use evens + else if ( splitStat == 1 && jentry%2 == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin) *exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + } + + /// use odds + else if ( splitStat == -1 && jentry%2 != 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*(thisIC/thisE)*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-1.*(fabs(BDTG_weightEB_W_1-Maximum_h_WeigthEB_W_1)+fabs(BDTG_weightEB_W_2-Maximum_h_WeigthEB_W_2))); + } + + } + + } + + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + } + ///! End Cycle on the events + + ///New Loop cycle + Save info + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC("auxiliary_IC","auxiliary_IC",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < 61200; iIndex++ ){ + + if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ + + float thisIntercalibConstant = 1.; + /// Solve the cases where the recHit energy is always 0 (dead Xtal?) + bool isDeadXtal = false ; + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) continue; + + + if ( theDenominator[iIndex] != 0. ) thisIntercalibConstant = theNumerator[iIndex]/theDenominator[iIndex]; + float oldIntercalibConstant = 1.; + if ( iLoop > 0 ) oldIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (iIndex+1); + + h_scale_EB_hashedIndex -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); /// IC product useful for L3 methods + hC_IntercalibValues -> Fill(iLoop, thisIntercalibConstant); /// IC distribution at each loop + hC_PullFromScalib -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); ///IC Map + + ///Save the new IC coefficient + auxiliary_IC.Fill(thisIntercalibConstant); + + } + + } + /// Info in order to test convergence + g_ICmeanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetMean()); + g_ICmeanVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetMeanError()); + + g_ICrmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_IC . GetRMS()); + g_ICrmsVsLoop -> SetPointError(iLoop, 0., auxiliary_IC . GetRMSError()); + }/// end calibration loop + + + int myPhiIndex = 0; + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + ///Setup the histo for fit + TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",400, 0.2, 1.9); + TF1 f1("f1","gaus",0.2,1.9); + + int totIphi = 0; + float meanICforPhiRing = 0.; + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + float thisIntercalibConstant = h_scale_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); + h_scale_EB -> Fill(iphi, iabseta*theZside, thisIntercalibConstant); ///Fill with Last IC Value + + if (GetIetaFromHashedIndex(thisHashedIndex) == 85) h_IntercalibValues_test -> Fill (thisIntercalibConstant); + p_IntercalibValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisIntercalibConstant); + + histoAuxiliary . Fill (thisIntercalibConstant); + + ///Vectors + IetaValues.push_back(iabseta*theZside); + IphiValues.push_back(iphi); + ICValues.push_back(thisIntercalibConstant); + + meanICforPhiRing += thisIntercalibConstant; + totIphi++; + + } + + for ( int uu = 0; uu < totIphi; uu++ ) meanICforPhiRingValues.push_back(meanICforPhiRing/totIphi); + + /// Note this info are not used furhter because channels near to the dead ones are not skipped + + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + + h_scale_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, ICValues.at(myPhiIndex)/meanICforPhiRingValues.at(myPhiIndex)); + myPhiIndex++; /// Normalization IC with the mean of each ring + + } + + f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); + f1.SetRange(1-5*histoAuxiliary.GetRMS(), 1+5*histoAuxiliary.GetRMS()); + histoAuxiliary . Fit("f1","QR"); + + if ( f1.GetParError(2) > 0.5 ) continue; + h_IntercalibSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); + h_IntercalibSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); + + } + + } +} +/// Save infos in the output +void FastCalibratorEB_MVA::saveHistos(TFile * f1){ + + f1->cd(); + hC_IntercalibValues -> Write(*f1); + hC_PullFromScalib -> Write(*f1); + hC_EoP -> Write(*f1); + hC_scale_EB -> Write("",*f1); + h_scalib_EB -> Write(); + + h_IntercalibValues_test -> Write(); + h_Occupancy_hashedIndex -> Write(); + p_IntercalibValues_iEta -> Write(); + h_Init_IntercalibValues -> Write(); + + h_IntercalibSpread_iEta -> Write(); + h_scale_EB -> Write(); + h_scale_EB_meanOnPhi -> Write("h_scale_map"); + h_scale_EB_hashedIndex -> Write(); + + h_occupancy -> Write(); + + g_ICmeanVsLoop -> Write(); + g_ICrmsVsLoop -> Write(); + + h_map_Dead_Channels -> Write() ; + + + f1->Close(); + + return; +} + +/// Save E/P distribution +void FastCalibratorEB_MVA::saveEoPeta(TFile * f2){ + f2->cd(); + hC_EoP_eta_ele ->Write(*f2); + f2->Close(); +} + +///! Acquire fake dead channel list on order to evaluate the effected of IC near to them +void FastCalibratorEB_MVA::AcquireDeadXtal(TString inputDeadXtal){ + + if(inputDeadXtal!="NULL"){ + + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iEta, iPhi ; + + while(!DeadXtal.eof()){ + + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iEta >> iPhi ; + + if(iEta >=0) DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; + else DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; + + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else DeadXtal_HashedIndex.push_back(-9999); + +} + +///! Check if the channel is dead or not +bool FastCalibratorEB_MVA::CheckDeadXtal(const int & iEta, const int & iPhi){ + int hashed_Index; + if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); + else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/src/FastCalibratorEE.cc b/EOverPCalibration/src/FastCalibratorEE.cc new file mode 100644 index 00000000000..e17fbc58663 --- /dev/null +++ b/EOverPCalibration/src/FastCalibratorEE.cc @@ -0,0 +1,1085 @@ +#include "../interface/FastCalibratorEE.h" +#include "../interface/GetHashedIndexEE.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/// Default constructor +FastCalibratorEE::FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + +// if parameter tree is not specified (or zero), connect the file +// used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + + } + + // endcap geometry + eRings = new TEndcapRings(); + + /// Vector for ring normalization IC + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEE = typeEE; +} + +/// Deconstructor + +FastCalibratorEE::~FastCalibratorEE(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +/// Get Entry Method +Int_t FastCalibratorEE::GetEntry(Long64_t entry){ +// Read contents of entry. + if (!fChain) return 0; + return fChain->GetEntry(entry); +} + +/// Load Tree infos in a chain +Long64_t FastCalibratorEE::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + +///Fill the miscalib map +void FastCalibratorEE::FillScalibMap(TString miscalibMap){ + + std::ifstream scalibFile; + scalibFile.open(miscalibMap.Data()); + + if (!scalibFile) { + std::cout<<"miscalib map missing!!!"<> etaRing >> scalibValue; + scalibMap.insert(std::pair(etaRing,scalibValue)); + } + scalibFile.close(); +} + + +/// Intialize pointers +void FastCalibratorEE::Init(TTree *tree){ + + /// Set object pointer + + energyRecHitSCEle1 = 0; + XRecHitSCEle1 = 0; + YRecHitSCEle1 = 0; + ZRecHitSCEle1 = 0; + recoFlagRecHitSCEle1 = 0; + + energyRecHitSCEle2 = 0; + XRecHitSCEle2 = 0; + YRecHitSCEle2 = 0; + ZRecHitSCEle2 = 0; + recoFlagRecHitSCEle2 = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + + fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); + fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); + fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); + fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); + fChain->SetBranchStatus("PtEle", 1); fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); + fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); + fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); + fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); + fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); + fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); + fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); + fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); + fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); + fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); + fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); + fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); + fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); + + // ele1 + fChain->SetBranchStatus("energyRecHitSCEle1", 1); fChain->SetBranchAddress("energyRecHitSCEle1", &energyRecHitSCEle1, &b_energyRecHitSCEle1); + fChain->SetBranchStatus("XRecHitSCEle1", 1); fChain->SetBranchAddress("XRecHitSCEle1", &XRecHitSCEle1, &b_XRecHitSCEle1); + fChain->SetBranchStatus("YRecHitSCEle1", 1); fChain->SetBranchAddress("YRecHitSCEle1", &YRecHitSCEle1, &b_YRecHitSCEle1); + fChain->SetBranchStatus("ZRecHitSCEle1", 1); fChain->SetBranchAddress("ZRecHitSCEle1", &ZRecHitSCEle1, &b_ZRecHitSCEle1); + fChain->SetBranchStatus("recoFlagRecHitSCEle1", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle1", &recoFlagRecHitSCEle1, &b_recoFlagRecHitSCEle1); + + // ele2 + fChain->SetBranchStatus("energyRecHitSCEle2", 1); fChain->SetBranchAddress("energyRecHitSCEle2", &energyRecHitSCEle2, &b_energyRecHitSCEle2); + fChain->SetBranchStatus("XRecHitSCEle2", 1); fChain->SetBranchAddress("XRecHitSCEle2", &XRecHitSCEle2, &b_XRecHitSCEle2); + fChain->SetBranchStatus("YRecHitSCEle2", 1); fChain->SetBranchAddress("YRecHitSCEle2", &YRecHitSCEle2, &b_YRecHitSCEle2); + fChain->SetBranchStatus("ZRecHitSCEle2", 1); fChain->SetBranchAddress("ZRecHitSCEle2", &ZRecHitSCEle2, &b_ZRecHitSCEle2); + fChain->SetBranchStatus("recoFlagRecHitSCEle2", 1); fChain->SetBranchAddress("recoFlagRecHitSCEle2", &recoFlagRecHitSCEle2, &b_recoFlagRecHitSCEle2); + +} + + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEE::bookHistos(int nLoops){ + + ///service histos + h_scale_hashedIndex_EE = new TH1F ("h_scale_hashedIndex_EE","h_scale_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); + + ///EE+ + + hC_IntercalibValues_EEP = new hChain ("IntercalibValues_EEP", "IntercalibValues_EEP", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEP = new hChain ("hC_PullFromScalib_EEP", "hC_PullFromScalib_EEP", 2000,-0.5,0.5, nLoops); + hC_scale_EEP = new h2Chain("hC_scale_EEP", "hC_scale_EEP", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEP = new TH2F("h_scale_EEP", "h_scale_EEP", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); + h_scalib_EEP = new TH2F("h_scalib_EEP", "h_scalib_EEP", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); + h_scale_meanOnring_EEP = new TH2F ("h_scale_meanOnring_EEP", "h_scale_meanOnring_EEP", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEP = new TGraphErrors(); + g_ICmeanVsLoop_EEP -> SetName("g_ICmeanVsLoop_EEP"); + g_ICmeanVsLoop_EEP -> SetTitle("g_ICmeanVsLoop_EEP"); + + g_ICrmsVsLoop_EEP = new TGraphErrors(); + g_ICrmsVsLoop_EEP -> SetName("g_ICrmsVsLoop_EEP"); + g_ICrmsVsLoop_EEP -> SetTitle("g_ICrmsVsLoop_EEP"); + + + + ///EE- + hC_IntercalibValues_EEM = new hChain ("IntercalibValues_EEM", "IntercalibValues_EEM", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEM = new hChain ("hC_PullFromScalib_EEM", "hC_PullFromScalib_EEM", 2000,-0.5,0.5, nLoops); + hC_scale_EEM = new h2Chain("hC_scale_EEM", "hC_scale_EEM", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEM = new TH2F("h_scale_EEM", "h_scale_EEM", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); + h_scalib_EEM = new TH2F("h_scalib_EEM", "h_scalib_EEM", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); + h_scale_meanOnring_EEM = new TH2F ("h_scale_meanOnring_EEM", "h_scale_meanOnring_EEM", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEM = new TGraphErrors(); + g_ICmeanVsLoop_EEM -> SetName("g_ICmeanVsLoop_EEM"); + g_ICmeanVsLoop_EEM -> SetTitle("g_ICmeanVsLoop_EEM"); + + g_ICrmsVsLoop_EEM = new TGraphErrors(); + g_ICrmsVsLoop_EEM -> SetName("g_ICrmsVsLoop_EEM"); + g_ICrmsVsLoop_EEM -> SetTitle("g_ICrmsVsLoop_EEM"); + + + return; +} + + + +///===== Build E/p for electron 1 and 2 + +void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, bool isMCTruth){ + + if(iLoop ==0){ + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + else{ + hC_EoP_ir_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + + Long64_t nbytes = 0, nb = 0; + /// Loop on ntu entries + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + // std::cerr<<"building E/p distribution ----> "< "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1 -> at(iRecHit) < 4 ){ + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle1 -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + //if(recoFlagRecHitSCEle1 -> at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; /// SC energy + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && + recoFlagRecHitSCEle1 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + + /// Option for MCTruth analysis + if(!isMCTruth){ + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9, fbrem selection before E/p distribution + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[0]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[0]) > 1.75 && fabs(etaSCEle[0]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[0]) > 2.00 && fabs(etaSCEle[0]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[0]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron =true; + + // std::cout< Fill(ir_seed,thisE/(pIn-esEnergySCEle[0])); + } + + ///=== Second medium electron from Z only Endcaps + if ( isEBEle[1] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2 -> at(iRecHit) < 4 ){ + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + iseed=iRecHit; + E_seed=energyRecHitSCEle2 -> at(iRecHit); + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle2 -> at(iRecHit) < 4) /// Only Good channels + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + } + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + } + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + /// Option for MCTruth Analysis + if(!isMCTruth){ + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[1]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[1]) > 1.75 && fabs(etaSCEle[1]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[1]) > 2.00 && fabs(etaSCEle[1]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[1]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron =true; + + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-esEnergySCEle[1])); + } + + + } + + /// Normalization E/p distribution + for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); + + /// Save E/p distributions + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// L3 Loop method ----> Calibration Loop function +void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection, bool isR9selection, float R9Min, bool isfbrem, float fbremMax, bool isPtCut, float PtMin, + bool isMCTruth, std::map > > jsonMap, float miscalibMethod, TString miscalibMap){ + + if (fChain == 0) return; + + if(isMiscalib == true) { + std::cout<<"method used for the scalibration (1=from map, 0=linear): "< theScalibration(m_regions*2, 0.); + TRandom3 genRand; + for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ + + bool isDeadXtal = false ; + /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + + if(GetZsideFromHashedIndex(iIndex)>0) + h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + } + else{ + if(isMiscalib == true) { + int etaRing = eRings->GetEndcapRing(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if (miscalibMethod == 1) { //miscalibration with a gaussian spread (eta-dependent) + theScalibration[iIndex] = scalibMap.at(etaRing); //take the values from the map filled before + } + else + theScalibration[iIndex] = 1 + 0.015*etaRing/33.; //linear eta-dependent scalibration + // theScalibration[iIndex] = genRand.Gaus(1.,0.001); + } + + // if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); /// Miscalibration fixed at 5% + if(isMiscalib == false) theScalibration[iIndex] = 1.; + if(GetZsideFromHashedIndex(iIndex)>0) + h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- + else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); + + } + } + + + /// ----------------- Calibration Loops -----------------------------// + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + /// L3 numerator and denominator for EE+ and EE- + std::vector theNumerator_EEP(m_regions*2+1, 0.); + std::vector theDenominator_EEP(m_regions*2+1, 0.); + std::vector theNumerator_EEM(m_regions+1, 0.); + std::vector theDenominator_EEM(m_regions+1, 0.); + + ///==== build E/p distribution ele 1 and 2 + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isfbrem,fbremMax,isPtCut,PtMin,isMCTruth); + + // define map with events + std::map >,int> eventsMap; + + /// Loop over events + std::cout << "Number of analyzed events = " << nentries << std::endl; + + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + + //********************************* + // JSON FILE AND DUPLIACTES IN DATA + + bool skipEvent = false; + if( isMCTruth == 0 ){ + + if(AcceptEventByRunAndLumiSection(runNumber,lumiBlock,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiBlock,eventNumber); + std::pair > eventRUNandLSandID(runNumber,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + float pIn, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Only tight electron from W and Z, only Endcap + + if ( isEBEle[0] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = energySCEle[0]/(rawEnergySCEle[0]+esEnergySCEle[0]); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0 ; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(recoFlagRecHitSCEle1 -> at(iRecHit) < 4) /// Skip bad channel + thisE += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + if(energyRecHitSCEle1 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle1 -> at(iRecHit) < 4 ){ + E_seed=energyRecHitSCEle1 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); /// Seed infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle1->at(iRecHit)-XRecHitSCEle1->at(iseed))<=1 && + fabs(YRecHitSCEle1->at(iRecHit)-YRecHitSCEle1->at(iseed))<=1 && + recoFlagRecHitSCEle1 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC; + + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(GetHashedIndexEE(XRecHitSCEle1->at(iseed), YRecHitSCEle1->at(iseed), ZRecHitSCEle1->at(iseed))) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// MCTruth option + if(!isMCTruth) { + pIn = pAtVtxGsfEle[0]; + int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[0] ); + } + else{ + pIn = energyMCEle[0]; + ele1_DR = TMath::Sqrt((etaMCEle[0]-etaEle[0])*(etaMCEle[0]-etaEle[0])+(phiMCEle[0]-phiEle[0])*(phiMCEle[0]-phiEle[0])) ; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); + + if ( fabs(thisE/(pAtVtxGsfEle[0]-esEnergySCEle[0]) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[0]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[0]) > 1.75 && fabs(etaSCEle[0]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[0]) > 2.00 && fabs(etaSCEle[0]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[0]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[0] < PtMin && isPtCut == true ) skipElectron =true; + + if( thisE/(pIn-esEnergySCEle[0]) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-esEnergySCEle[0]) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ){ + for( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle1->size(); iRecHit++){ + if(recoFlagRecHitSCEle1 -> at(iRecHit) >= 4) continue; + + int thisIndex = GetHashedIndexEE(XRecHitSCEle1->at(iRecHit), YRecHitSCEle1->at(iRecHit), ZRecHitSCEle1->at(iRecHit)); + float thisIC = 1.; + + if( iLoop > 0 ) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + ///Use full statistic + if( splitStat == 0 ){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ){ + if( thisCaliBlock == 0 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[0])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle1 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + ///Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-esEnergySCEle[0])); + } + + skipElectron = false; + + + /// Medium ele from Z only Endcap + if( isEBEle[1] == 0 && ( useZ == 1 && isZ == 1 ) ){ + /// SCL energy containment correction + FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for(unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ){ + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if( recoFlagRecHitSCEle2 -> at(iRecHit) < 4 ) + thisE += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + + if(energyRecHitSCEle2 -> at(iRecHit) > E_seed && recoFlagRecHitSCEle2 -> at(iRecHit) < 4){ + E_seed=energyRecHitSCEle2 -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + } + } + + for (unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ) + { + float thisIC = 1.; + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(XRecHitSCEle2->at(iRecHit)-XRecHitSCEle2->at(iseed))<=1 && + fabs(YRecHitSCEle2->at(iRecHit)-YRecHitSCEle2->at(iseed))<=1 && + recoFlagRecHitSCEle2 -> at(iRecHit) < 4) + thisE3x3+=theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC; + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(GetHashedIndexEE(XRecHitSCEle2->at(iseed), YRecHitSCEle2->at(iseed), ZRecHitSCEle2->at(iseed))) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// Option for MCTruth Analysis + if(!isMCTruth) { + pIn = pAtVtxGsfEle[1]; + int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + } + else{ + pIn = energyMCEle[1]; + ele2_DR = TMath::Sqrt((etaMCEle[1]-etaEle[1])*(etaMCEle[1]-etaEle[1])+(phiMCEle[1]-phiEle[1])*(phiMCEle[1]-phiEle[1])) ; + if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele + } + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure + + /// E/p and R9 selections + if ( fabs(thisE/(pIn-esEnergySCEle[1]) - 1) > 0.7 && isEPselection==true) skipElectron = true; + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(etaSCEle[1]) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(etaSCEle[1]) > 1.75 && fabs(etaSCEle[1]) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(etaSCEle[1]) > 2.00 && fabs(etaSCEle[1]) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(etaSCEle[1]) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron =true; + if( PtEle[1] < PtMin && isPtCut == true ) skipElectron =true; + + + if( thisE/(pIn-esEnergySCEle[1]) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-esEnergySCEle[1]) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ){ + for( unsigned int iRecHit = 0; iRecHit < energyRecHitSCEle2->size(); iRecHit++ ){ + if(recoFlagRecHitSCEle2 -> at(iRecHit) >= 4) continue; + + int thisIndex = GetHashedIndexEE(XRecHitSCEle2->at(iRecHit), YRecHitSCEle2->at(iRecHit), ZRecHitSCEle2->at(iRecHit)); + float thisIC = 1.; + + if(iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + /// Use full statistic + if( splitStat == 0){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ){ + if( thisCaliBlock == 0 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ){ + if(thisCaliBlock == 0){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[1])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin);} + + if( thisCaliBlock == 1 ){ + int EoPbin = EoPHisto->FindBin(thisE/(pIn-esEnergySCEle[1])); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*(pIn-esEnergySCEle[0])/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*energyRecHitSCEle2 -> at(iRecHit)*FdiEta*thisIC / + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + //Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-esEnergySCEle[1])); + } + } /// End Cycle on the events + + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC_EEM("auxiliary_IC_EEM","auxiliary_IC_EEM",50,0.2,1.9); + TH1F auxiliary_IC_EEP("auxiliary_IC_EEP","auxiliary_IC_EEP",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + int thisCaliBlock = -1; + if( GetZsideFromHashedIndex(iIndex) < 0 ) thisCaliBlock = 0; + else thisCaliBlock = 1; + + float thisIntercalibConstant = 1.; + + if( thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0. ) thisIntercalibConstant = theNumerator_EEM[iIndex] / theDenominator_EEM[iIndex]; + if( thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0. ) thisIntercalibConstant = theNumerator_EEP[iIndex] / theDenominator_EEP[iIndex]; + + float oldIntercalibConstant = 1.; + if( iLoop > 0 ) oldIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + h_scale_hashedIndex_EE -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); + + if( thisCaliBlock == 0 ){ + hC_IntercalibValues_EEM -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEM -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEM -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEM.Fill(thisIntercalibConstant); + } + if( thisCaliBlock == 1){ + hC_IntercalibValues_EEP -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEP -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEP.Fill(thisIntercalibConstant); + } + } + } + + g_ICmeanVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM.GetMean()); + g_ICmeanVsLoop_EEM -> SetPointError(iLoop, 0.,auxiliary_IC_EEM.GetMeanError()); + + g_ICrmsVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM . GetRMS()); + g_ICrmsVsLoop_EEM -> SetPointError(iLoop, 0., auxiliary_IC_EEM . GetRMSError()); + + g_ICmeanVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetMean()); + g_ICmeanVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetMeanError()); + + g_ICrmsVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetRMS()); + g_ICrmsVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetRMSError()); + + } /// End of Calibration Loops + + + + ///Fill the histo of IntercalibValues after the loops at last step + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value + if ( thisCaliBlock == 0 ) h_scale_EEM -> Fill (thisIx, thisIy, thisIntercalibConstant); + else h_scale_EEP -> Fill (thisIx, thisIy, thisIntercalibConstant); + + if( thisCaliBlock == 0 ) + { + ///Vectors for IC Normalization + IxValues_EEM.push_back(thisIx); + IyValues_EEM.push_back(thisIy); + ICValues_EEM.push_back(thisIntercalibConstant); + } + else + { + IxValues_EEP.push_back(thisIx); + IyValues_EEP.push_back(thisIy); + ICValues_EEP.push_back(thisIntercalibConstant); + } + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to + if(thisIz >0) + { + SumIC_Ring_EEP.at(thisIr) = SumIC_Ring_EEP.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEP.at(thisIr) = Sumxtal_Ring_EEP.at(thisIr) + 1; + } + else + { + SumIC_Ring_EEM.at(thisIr) = SumIC_Ring_EEM.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEM.at(thisIr) = Sumxtal_Ring_EEM.at(thisIr) + 1; + } + } + } + + /// IC Normaliztion trough the mean value of each ring + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ) + { + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ) + { + // int thisCaliBlock = -1; + // if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + // else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + + if( thisIz > 0 ) + { + if(Sumxtal_Ring_EEP.at(thisIr) != 0 && SumIC_Ring_EEP.at(thisIr)!= 0) + h_scale_meanOnring_EEP->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEP.at(thisIr)/Sumxtal_Ring_EEP.at(thisIr))); + } + else + { + if(Sumxtal_Ring_EEM.at(thisIr) != 0 && SumIC_Ring_EEM.at(thisIr) != 0) + h_scale_meanOnring_EEM->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEM.at(thisIr)/Sumxtal_Ring_EEM.at(thisIr))); + } + } + } + +} + +/// Save in the output +void FastCalibratorEE::saveHistos(TFile * f1) +{ + + f1->cd(); + + /// EE+ + hC_IntercalibValues_EEP-> Write(*f1); + hC_PullFromScalib_EEP->Write(*f1); + hC_EoP->Write(*f1); + hC_scale_EEP->Write("",*f1); + + h_occupancy_EEP->Write(); + h_scale_EEP->Write(); + h_scalib_EEP->Write(); + + h_scale_hashedIndex_EE->Write(); + h_occupancy_hashedIndex_EE->Write(); + h_map_Dead_Channels_EEP->Write(); + + g_ICmeanVsLoop_EEP->Write(); + g_ICrmsVsLoop_EEP->Write(); + h_scale_meanOnring_EEP->Write("h_scale_map_EEP"); + h_map_Dead_Channels_EEP->Write(); + + + /// EE- + hC_IntercalibValues_EEM-> Write(*f1); + hC_scale_EEM->Write("",*f1); + hC_PullFromScalib_EEM->Write(*f1); + h_occupancy_EEM->Write(); + h_scale_EEM->Write(); + h_scalib_EEM->Write(); + + g_ICmeanVsLoop_EEM->Write(); + g_ICrmsVsLoop_EEM->Write(); + h_scale_meanOnring_EEM->Write("h_scale_map_EEM"); + h_map_Dead_Channels_EEM->Write(); + + + f1->Close(); + + return; +} + +/// Save E/p distributions +void FastCalibratorEE::saveEoPeta(TFile * f2) +{ + f2->cd(); + hC_EoP_ir_ele ->Write(*f2); + f2->Close(); +} + +/// Acquire fake Dead Xtal in order to study the effect of IC near them +void FastCalibratorEE::AcquireDeadXtal(TString inputDeadXtal, const bool & isDeadTriggerTower){ + + if(inputDeadXtal!="NULL"){ + + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iX, iY ,iZ; + + while(!DeadXtal.eof()){ + + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iX >> iY >>iZ ; + + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; + if(isDeadTriggerTower){ + + for (int ix = -2 ; ix <=2 ; ix++){ + for (int iy = -2 ; iy <=2 ; iy++){ + if(ix==0 && iy==0) continue ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX+ix,iY+iy,iZ)) ; + } + } + } + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else DeadXtal_HashedIndex.push_back(-9999); + + +} +/// Check if the channel considered is in the list of dead or not +bool FastCalibratorEE::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ + + int hashed_Index; + hashed_Index = GetHashedIndexEE(iX,iY,iZ); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/src/FastCalibratorEE_MVA.cc b/EOverPCalibration/src/FastCalibratorEE_MVA.cc new file mode 100644 index 00000000000..238f92a2ebe --- /dev/null +++ b/EOverPCalibration/src/FastCalibratorEE_MVA.cc @@ -0,0 +1,1149 @@ +#include "../interface/FastCalibratorEE_MVA.h" +#include "../interface/GetHashedIndexEE.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/// Default constructor +FastCalibratorEE_MVA::FastCalibratorEE_MVA(TTree *tree,TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ +// if parameter tree is not specified (or zero), connect the file +// used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + if (!f) { + f = new TFile("/data2/rgerosa/Fall11/WZAnalysis_DATA.root"); + } + + tree = (TTree*)gDirectory->Get("ntu"); + } + + // endcap geometry + eRings = new TEndcapRings(); + + /// Vector for ring normalization IC + SumIC_Ring_EEP.assign(40,0); + SumIC_Ring_EEM.assign(40,0); + Sumxtal_Ring_EEP.assign(40,0); + Sumxtal_Ring_EEM.assign(40,0); + + Init(tree); +} + +/// Deconstructor + +FastCalibratorEE_MVA::~FastCalibratorEE_MVA(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + +/// Get Entry Method +Int_t FastCalibratorEE_MVA::GetEntry(Long64_t entry){ + +// Read contents of entry. + if (!fChain) return 0; + return fChain->GetEntry(entry); + +} + +/// Load Tree infos in a chain +Long64_t FastCalibratorEE_MVA::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + Notify(); + } + return centry; +} + +/// Intialize pointers +void FastCalibratorEE_MVA::Init(TTree *tree){ + + /// Set object pointer + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix =0 ; + ele1_recHit_flag =0 ; + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_flag =0 ; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + fChain->SetBranchAddress("BDTG_weightEE_W_1", &BDTG_weightEE_W_1, &b_BDTG_weightEE_W_1); + fChain->SetBranchAddress("BDTG_weightEE_W_2", &BDTG_weightEE_W_2, &b_BDTG_weightEE_W_2); +// fChain->SetBranchAddress("BDTG_weightEE_Z_1", &BDTG_weightEE_Z_1, &b_BDTG_weightEE_Z_1); +// fChain->SetBranchAddress("BDTG_weightEE_Z_2", &BDTG_weightEE_Z_2, &b_BDTG_weightEE_Z_2); + + + fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchAddress("ele1_recHit_hashedIndex", &ele1_recHit_hashedIndex, &b_ele1_recHit_hashedIndex); + fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); +// fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); + + fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); +// fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); +// fChain->SetBranchAddress("ele1_DR ", &ele1_DR , &b_ele1_DR); + fChain->SetBranchAddress("ele1_scERaw_PUcleaned", &ele1_scERaw_PUcleaned, &b_ele1_scERaw_PUcleaned); + fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); +// fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); + + fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); + fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); +// fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); +// fChain->SetBranchAddress("ele2_DR ", &ele2_DR , &b_ele2_DR); + fChain->SetBranchAddress("ele2_scERaw_PUcleaned", &ele2_scERaw_PUcleaned, &b_ele2_scERaw_PUcleaned); + fChain->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression, &b_ele2_scE_regression); + + fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + Notify(); +} + +Bool_t FastCalibratorEE_MVA::Notify(){ + // The Notify() function is called when a new file is opened. This + // can be either for a new TTree in a TChain or when when a new TTree + // is started when using PROOF. It is normally not necessary to make changes + // to the generated code, but the routine can be extended by the + // user if needed. The return value is currently not used. + + return kTRUE; +} + +void FastCalibratorEE_MVA::Show(Long64_t entry){ +/// Print contents of entry. +/// If entry is not specified, print current entry + if (!fChain) return; + fChain->Show(entry); +} + +Int_t FastCalibratorEE_MVA::Cut(Long64_t entry){ +// This function may be called from Loop. +// returns 1 if entry is accepted. +// returns -1 otherwise. + return 1; +} + +//! Declaration of the objects that are save in the output file + +void FastCalibratorEE_MVA::bookHistos(int nLoops) +{ + + ///service histos + h_scale_hashedIndex_EE = new TH1F ("h_scale_hashedIndex_EE","h_scale_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); + + h_WeightEE_W_1 = new TH1F ("h_WeightEE_W_1","h_WeightEE_W_1",500,0.,1.5); + + h_WeightEE_W_2 = new TH1F ("h_WeightEE_W_2","h_WeightEE_W_2",500,0.,1.5); + + ///EE+ + + hC_IntercalibValues_EEP = new hChain ("IntercalibValues_EEP", "IntercalibValues_EEP", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEP = new hChain ("hC_PullFromScalib_EEP", "hC_PullFromScalib_EEP", 2000,-0.5,0.5, nLoops); + hC_scale_EEP = new h2Chain("hC_scale_EEP", "hC_scale_EEP", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEP = new TH2F("h_scale_EEP", "h_scale_EEP", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); + h_scalib_EEP = new TH2F("h_scalib_EEP", "h_scalib_EEP", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); + h_scale_meanOnring_EEP = new TH2F ("h_scale_meanOnring_EEP", "h_scale_meanOnring_EEP", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEP = new TGraphErrors(); + g_ICmeanVsLoop_EEP -> SetName("g_ICmeanVsLoop_EEP"); + g_ICmeanVsLoop_EEP -> SetTitle("g_ICmeanVsLoop_EEP"); + + g_ICrmsVsLoop_EEP = new TGraphErrors(); + g_ICrmsVsLoop_EEP -> SetName("g_ICrmsVsLoop_EEP"); + g_ICrmsVsLoop_EEP -> SetTitle("g_ICrmsVsLoop_EEP"); + + + + ///EE- + hC_IntercalibValues_EEM = new hChain ("IntercalibValues_EEM", "IntercalibValues_EEM", 400,0.2,1.9, nLoops); + hC_PullFromScalib_EEM = new hChain ("hC_PullFromScalib_EEM", "hC_PullFromScalib_EEM", 2000,-0.5,0.5, nLoops); + hC_scale_EEM = new h2Chain("hC_scale_EEM", "hC_scale_EEM", 100,1, 101, 100, 1, 101, nLoops ); + + h_scale_EEM = new TH2F("h_scale_EEM", "h_scale_EEM", 100,1, 101, 100, 1, 101 ); + h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); + h_scalib_EEM = new TH2F("h_scalib_EEM", "h_scalib_EEM", 100,1, 101, 100, 1, 101); + h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); + h_scale_meanOnring_EEM = new TH2F ("h_scale_meanOnring_EEM", "h_scale_meanOnring_EEM", 100,1, 101, 100, 1, 101); + + g_ICmeanVsLoop_EEM = new TGraphErrors(); + g_ICmeanVsLoop_EEM -> SetName("g_ICmeanVsLoop_EEM"); + g_ICmeanVsLoop_EEM -> SetTitle("g_ICmeanVsLoop_EEM"); + + g_ICrmsVsLoop_EEM = new TGraphErrors(); + g_ICrmsVsLoop_EEM -> SetName("g_ICrmsVsLoop_EEM"); + g_ICrmsVsLoop_EEM -> SetTitle("g_ICrmsVsLoop_EEM"); + + + return; +} + +/// ===== Build Weight MVA distribution +void FastCalibratorEE_MVA::BuildWeightDistribution_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isR9selection,bool isfbrem){ + +if(iLoop ==0){ + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building Weight distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4 */){ + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + +// if(ele1_recHit_flag -> at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; /// SC energy + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + bool skipElectron = false; + + /// R9, fbrem selection before E/p distribution + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; + if(fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; + + if(!skipElectron){ h_WeightEE_W_1->Fill(BDTG_weightEE_W_1); + h_WeightEE_W_2->Fill(BDTG_weightEE_W_2); + } + } + } + } + else return; + +} + + +///===== Build E/p for electron 1 and 2 + +void FastCalibratorEE_MVA::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration,bool isSaveEPDistribution, bool isR9selection, bool isMCTruth,bool isfbrem){ + + if(iLoop ==0) { + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + else{ + hC_EoP_ir_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + + Long64_t nbytes = 0, nb = 0; + + /// Loop on ntu entries + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4 */){ + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + +// if(ele1_recHit_flag -> at(iRecHit) < 4) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; /// SC energy + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + + /// Option for MCTruth analysis + if(!isMCTruth) pIn = ele1_tkP; + else{ pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9, fbrem selection before E/p distribution + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; + + if(fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele1_es)); + + + } + ///=== Second medium electron from Z only Endcaps + if ( ele2_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag -> at(iRecHit) < 4*/){ + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); + + } + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + //if(ele2_recHit_flag -> at(iRecHit) < 4) /// Only Good channels + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + + bool skipElectron = false; + /// Option for MCTruth Analysis + if(!isMCTruth) pIn = ele2_tkP; + else{ pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 and fbrem selection + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta)>1.75 && fabs(ele2_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta)>2.0 && fabs(ele2_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>2.15) skipElectron = true; + + if ( fabs(ele2_fbrem)>0.4 && isfbrem==true) skipElectron =true; + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele2_es)); + + } + } + + /// Normalization E/p distribution + for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); + + + /// Save E/p distributions + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + +/// L3 Loop method ----> Calibration Loop function +void FastCalibratorEE_MVA::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection,bool isR9selection,bool isMCTruth,bool isfbrem){ + + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = kEEhalf; + + std::cout << "m_regions " << m_regions << std::endl; + + /// build up scalibration map + std::vector theScalibration(m_regions*2, 0.); + TRandom genRand; + for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ + + bool isDeadXtal = false ; + /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + + if(GetZsideFromHashedIndex(iIndex)>0) + h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + } + else{ + + if(isMiscalib==true) theScalibration[iIndex] = genRand.Gaus(1.,0.05); /// Miscalibration fixed at 5% + if(isMiscalib == false) theScalibration[iIndex] = 1.; + if(GetZsideFromHashedIndex(iIndex)>0) + h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- + else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); + + } + } + + + /// ----------------- Calibration Loops -----------------------------// + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + /// L3 numerator and denominator for EE+ and EE- + std::vector theNumerator_EEP(m_regions*2+1, 0.); + std::vector theDenominator_EEP(m_regions*2+1, 0.); + std::vector theNumerator_EEM(m_regions+1, 0.); + std::vector theDenominator_EEM(m_regions+1, 0.); + + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + /// === Build Weight Distribution + + BuildWeightDistribution_ele(iLoop,nentries,useW,useZ,theScalibration,isR9selection,isfbrem); + + ///==== build E/p distribution ele 1 and 2 + + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,isMCTruth,isfbrem); + + + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + float pIn, pSub, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Only tight electron from W and Z, only Endcap + + if ( ele1_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/(ele1_scERaw+ele1_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0 ; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + // if(ele1_recHit_flag -> at(iRecHit) < 4) /// Skip bad channel + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + if(ele1_recHit_E -> at(iRecHit) > E_seed /*&& ele1_recHit_flag -> at(iRecHit) < 4*/ ){ + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); /// Seed infos + + } + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 /*&& + ele1_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + pSub = 0.; //NOTALEO : test dummy + + /// MCTruth option + if(!isMCTruth) pIn = ele1_tkP; + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele1_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); + + if ( fabs(thisE/(ele1_tkP-ele1_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure + + /// R9 and fbrem selection + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta)>1.75 && fabs(ele1_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta)>2.0 && fabs(ele1_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta)>2.15) skipElectron = true; + + if ( fabs(ele1_fbrem)>0.4 && isfbrem==true) skipElectron =true; + if ( thisE/(pIn-ele1_es) < EoPHisto->GetXaxis()->GetXmin() || thisE/(pIn-ele1_es) > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + + if(!skipElectron && BDTG_weightEE_W_1!=-99. && BDTG_weightEE_W_2!=-99.){ + + double Maximum_h_WeightEE_W_1 = h_WeightEE_W_1->GetBinCenter(h_WeightEE_W_1->GetMaximumBin()); + double Maximum_h_WeightEE_W_2 = h_WeightEE_W_2->GetBinCenter(h_WeightEE_W_2->GetMaximumBin()); + + for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + +// if(ele1_recHit_flag -> at(iRecHit) >= 4) continue; + + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) + h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + ///Use full statistic + if ( splitStat == 0) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> + at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + + } + + /// use evens + if ( splitStat == 1 && jentry%2 == 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + } + + /// use odd + if ( splitStat == -1 && jentry%2 != 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2)));} + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele1_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); } + } + } + } + ///Fill EoP + if (thisCaliBlock != -1) hC_EoP -> Fill(iLoop, thisE/(pIn-ele1_es)); + + } + skipElectron = false; + + /// Medium ele from Z only Endcap + if ( ele2_isEB == 0 && ( useZ == 1 && isZ == 1 ) ) { + + /// SCL energy containment correction + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + +// if( ele2_recHit_flag -> at(iRecHit) < 4 ) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + if(ele2_recHit_E -> at(iRecHit) > E_seed /*&& ele2_recHit_flag -> at(iRecHit) < 4*/){ + + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + } + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisIC = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 /*&& + ele2_recHit_flag -> at(iRecHit) < 4*/) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC; + + } + + pSub = 0.; //NOTALEO : test dummy + /// Option for MCTruth Analysis + if(!isMCTruth) pIn = ele2_tkP; + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele2_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure + /// E/p and R9 selections + if ( fabs(thisE/(pIn-ele2_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; + /// R9 and fbrem selection + if(fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta)<=1.75) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta)>1.75 && fabs(ele2_scEta)<=2.0) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta)>2.0 && fabs(ele2_scEta)<=2.15 ) skipElectron = true; + if(fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta)>2.15) skipElectron = true; + + if ( fabs(ele2_fbrem)>0.4 && isfbrem==true) skipElectron =true; + + if ( thisE/(pIn-ele2_es) < EoPHisto->GetXaxis()->GetXmin() || thisE/(pIn-ele2_es) > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + + if(!skipElectron && BDTG_weightEE_W_1!=-99. && BDTG_weightEE_W_2!=-99.) { + + double Maximum_h_WeightEE_W_1 = h_WeightEE_W_1->GetBinCenter(h_WeightEE_W_1->GetMaximumBin()); + double Maximum_h_WeightEE_W_2 = h_WeightEE_W_2->GetBinCenter(h_WeightEE_W_2->GetMaximumBin()); + + + for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + +// if(ele2_recHit_flag -> at(iRecHit) >= 4) continue; + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisIC = 1.; + + if (iLoop > 0) thisIC = h_scale_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) + h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + /// Use full statistic + if ( splitStat == 0) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + } + + /// use evens + if ( splitStat == 1 && jentry%2 == 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + + if(thisCaliBlock == 1) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + } + + /// use odd + if ( splitStat == -1 && jentry%2 != 0 ) { + + if(thisCaliBlock == 0) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*(thisE3x3/thisE)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + } + + if(thisCaliBlock == 1) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub-ele2_es)); + + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*(pIn-pSub-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2))); + + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*thisIC/thisE*EoPHisto->GetBinContent(EoPbin)*exp(-(fabs(BDTG_weightEE_W_1-Maximum_h_WeightEE_W_1)+fabs(BDTG_weightEE_W_2-Maximum_h_WeightEE_W_2)));} + } + } + } + //Fill EoP + if (thisCaliBlock != -1) hC_EoP -> Fill(iLoop, thisE/(pIn-ele2_es)); + + } + } + /// End Cycle on the events + + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_IC_EEM("auxiliary_IC_EEM","auxiliary_IC_EEM",50,0.2,1.9); + TH1F auxiliary_IC_EEP("auxiliary_IC_EEP","auxiliary_IC_EEP",50,0.2,1.9); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + float thisIntercalibConstant =1. ; + + if(thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0.){ + thisIntercalibConstant = theNumerator_EEM[iIndex]/theDenominator_EEM[iIndex];} + else{ + if(thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0.) + thisIntercalibConstant = theNumerator_EEP[iIndex]/theDenominator_EEP[iIndex];} + + float oldIntercalibConstant = 1.; + if ( iLoop > 0 ) oldIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + h_scale_hashedIndex_EE -> SetBinContent(iIndex+1, thisIntercalibConstant*oldIntercalibConstant); + + if ( thisCaliBlock == 0 ) { + hC_IntercalibValues_EEM -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEM -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEM -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEM.Fill(thisIntercalibConstant); + + } + else { + if( thisCaliBlock == 1) + { + hC_IntercalibValues_EEP -> Fill (iLoop, thisIntercalibConstant); + hC_PullFromScalib_EEP -> Fill(iLoop,(thisIntercalibConstant*oldIntercalibConstant-1./theScalibration[iIndex])); + hC_scale_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisIntercalibConstant*oldIntercalibConstant); + + auxiliary_IC_EEP.Fill(thisIntercalibConstant);} + } + + + } + + } + + g_ICmeanVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM.GetMean()); + g_ICmeanVsLoop_EEM -> SetPointError(iLoop, 0.,auxiliary_IC_EEM.GetMeanError()); + + g_ICrmsVsLoop_EEM -> SetPoint(iLoop, iLoop, auxiliary_IC_EEM . GetRMS()); + g_ICrmsVsLoop_EEM -> SetPointError(iLoop, 0., auxiliary_IC_EEM . GetRMSError()); + + g_ICmeanVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetMean()); + g_ICmeanVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetMeanError()); + + g_ICrmsVsLoop_EEP -> SetPoint(iLoop, iLoop, auxiliary_IC_EEP . GetRMS()); + g_ICrmsVsLoop_EEP -> SetPointError(iLoop, 0., auxiliary_IC_EEP . GetRMSError()); + + } + /// End of Calibration Loops + + ///Fill the histo of IntercalibValues after the loops at last step + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value + if ( thisCaliBlock == 0 ) + h_scale_EEM -> Fill (thisIx, thisIy, thisIntercalibConstant); + else + h_scale_EEP -> Fill (thisIx, thisIy, thisIntercalibConstant); + + if ( thisCaliBlock == 0 ) + { + ///Vectors for IC Normalization + IxValues_EEM.push_back(thisIx); + IyValues_EEM.push_back(thisIy); + ICValues_EEM.push_back(thisIntercalibConstant); + } + else{ + IxValues_EEP.push_back(thisIx); + IyValues_EEP.push_back(thisIy); + ICValues_EEP.push_back(thisIntercalibConstant); + } + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to + if(thisIz >0) + { + SumIC_Ring_EEP.at(thisIr) = SumIC_Ring_EEP.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEP.at(thisIr) = Sumxtal_Ring_EEP.at(thisIr) + 1; + } + else{ + SumIC_Ring_EEM.at(thisIr) = SumIC_Ring_EEM.at(thisIr) + thisIntercalibConstant; + Sumxtal_Ring_EEM.at(thisIr) = Sumxtal_Ring_EEM.at(thisIr) + 1; + } + + } + + + } + /// IC Normaliztion trough the mean value of each ring + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + // int thisCaliBlock = -1; + // if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + // else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); + + float thisIntercalibConstant = h_scale_hashedIndex_EE -> GetBinContent (iIndex+1); + + + if(thisIz > 0) + { + if(Sumxtal_Ring_EEP.at(thisIr) != 0 && SumIC_Ring_EEP.at(thisIr)!= 0) + h_scale_meanOnring_EEP->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEP.at(thisIr)/Sumxtal_Ring_EEP.at(thisIr))); + } + else{ + if(Sumxtal_Ring_EEM.at(thisIr) != 0 && SumIC_Ring_EEM.at(thisIr) != 0) + h_scale_meanOnring_EEM->Fill(thisIx,thisIy,thisIntercalibConstant/(SumIC_Ring_EEM.at(thisIr)/Sumxtal_Ring_EEM.at(thisIr))); + } + } + } + +} + +/// Save in the output +void FastCalibratorEE_MVA::saveHistos(TFile * f1){ + + f1->cd(); + + /// EE+ + hC_IntercalibValues_EEP-> Write(*f1); + hC_PullFromScalib_EEP->Write(*f1); + hC_EoP->Write(*f1); + hC_scale_EEP->Write("",*f1); + + h_occupancy_EEP->Write(); + h_scale_EEP->Write(); + h_scalib_EEP->Write(); + + h_scale_hashedIndex_EE->Write(); + h_occupancy_hashedIndex_EE->Write(); + h_map_Dead_Channels_EEP->Write(); + + g_ICmeanVsLoop_EEP->Write(); + g_ICrmsVsLoop_EEP->Write(); + h_scale_meanOnring_EEP->Write("h_scale_map_EEP"); + h_map_Dead_Channels_EEP->Write(); + + + /// EE- + hC_IntercalibValues_EEM-> Write(*f1); + hC_scale_EEM->Write("",*f1); + hC_PullFromScalib_EEM->Write(*f1); + h_occupancy_EEM->Write(); + h_scale_EEM->Write(); + h_scalib_EEM->Write(); + + g_ICmeanVsLoop_EEM->Write(); + g_ICrmsVsLoop_EEM->Write(); + h_scale_meanOnring_EEM->Write("h_scale_map_EEM"); + h_map_Dead_Channels_EEM->Write(); + + + f1->Close(); + + return; +} + +/// Save E/p distributions +void FastCalibratorEE_MVA::saveEoPeta(TFile * f2){ + f2->cd(); + hC_EoP_ir_ele ->Write(*f2); + f2->Close(); +} + +/// Acquire fake Dead Xtal in order to study the effect of IC near them +void FastCalibratorEE_MVA::AcquireDeadXtal(TString inputDeadXtal){ + if(inputDeadXtal!="NULL") + { + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iX, iY ,iZ; + + while(!DeadXtal.eof()) + { + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iX >> iY >>iZ ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else{ + DeadXtal_HashedIndex.push_back(-9999); + } + +} +/// Check if the channel considered is in the list of dead or not +bool FastCalibratorEE_MVA::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ + + int hashed_Index; + hashed_Index = GetHashedIndexEE(iX,iY,iZ); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/src/GetHashedIndexEB.cc b/EOverPCalibration/src/GetHashedIndexEB.cc new file mode 100644 index 00000000000..82d323c622a --- /dev/null +++ b/EOverPCalibration/src/GetHashedIndexEB.cc @@ -0,0 +1,32 @@ +#include "../interface/GetHashedIndexEB.h" + +int GetHashedIndexEB(int iEta, int iPhi, int Zside) +{ + int MAX_IETA = 85; + int MAX_IPHI = 360; + bool positiveZ = true; + if ( Zside == -1 ) positiveZ = false; + int absEta = iEta * Zside; + + return ((MAX_IETA + (positiveZ ? absEta-1 : -absEta) )*MAX_IPHI+ iPhi-1); +} + +int GetIetaFromHashedIndex(int Index) +{ + int MAX_IETA = 85; + int MAX_IPHI = 360; + + int iEta = Index/MAX_IPHI - MAX_IETA; + if ( iEta >= 0 ) iEta++; + return iEta; +} + +int GetIphiFromHashedIndex(int Index) +{ + int MAX_IETA = 85; + int MAX_IPHI = 360; + + int iEta = Index/MAX_IPHI - MAX_IETA; + int iPhi = Index - (MAX_IETA + iEta)*MAX_IPHI + 1; + return iPhi; +} diff --git a/EOverPCalibration/src/GetHashedIndexEE.cc b/EOverPCalibration/src/GetHashedIndexEE.cc new file mode 100644 index 00000000000..7642ba7af47 --- /dev/null +++ b/EOverPCalibration/src/GetHashedIndexEE.cc @@ -0,0 +1,75 @@ +#include "../interface/GetHashedIndexEE.h" + +const int kxf[] = { + 41, 51, 41, 51, 41, 51, 36, 51, 36, 51, + 26, 51, 26, 51, 26, 51, 21, 51, 21, 51, + 21, 51, 21, 51, 21, 51, 16, 51, 16, 51, + 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, + 9, 51, 9, 51, 9, 51, 9, 51, 9, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 4, 51, 4, 51, 4, 51, 4, 51, 4, 56, + 1, 58, 1, 59, 1, 60, 1, 61, 1, 61, + 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, + 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, + 1, 61, 1, 61, 1, 60, 1, 59, 1, 58, + 4, 56, 4, 51, 4, 51, 4, 51, 4, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, + 9, 51, 9, 51, 9, 51, 9, 51, 9, 51, + 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, + 16, 51, 16, 51, 21, 51, 21, 51, 21, 51, + 21, 51, 21, 51, 26, 51, 26, 51, 26, 51, + 36, 51, 36, 51, 41, 51, 41, 51, 41, 51 +} ; + +const int kdi[] = { + 0, 10, 20, 30, 40, 50, 60, 75, 90, 105, + 120, 145, 170, 195, 220, 245, 270, 300, 330, 360, + 390, 420, 450, 480, 510, 540, 570, 605, 640, 675, + 710, 747, 784, 821, 858, 895, 932, 969, 1006, 1043, + 1080, 1122, 1164, 1206, 1248, 1290, 1332, 1374, 1416, 1458, + 1500, 1545, 1590, 1635, 1680, 1725, 1770, 1815, 1860, 1905, + 1950, 1995, 2040, 2085, 2130, 2175, 2220, 2265, 2310, 2355, + 2400, 2447, 2494, 2541, 2588, 2635, 2682, 2729, 2776, 2818, + 2860, 2903, 2946, 2988, 3030, 3071, 3112, 3152, 3192, 3232, + 3272, 3311, 3350, 3389, 3428, 3467, 3506, 3545, 3584, 3623, + 3662, 3701, 3740, 3779, 3818, 3857, 3896, 3935, 3974, 4013, + 4052, 4092, 4132, 4172, 4212, 4253, 4294, 4336, 4378, 4421, + 4464, 4506, 4548, 4595, 4642, 4689, 4736, 4783, 4830, 4877, + 4924, 4969, 5014, 5059, 5104, 5149, 5194, 5239, 5284, 5329, + 5374, 5419, 5464, 5509, 5554, 5599, 5644, 5689, 5734, 5779, + 5824, 5866, 5908, 5950, 5992, 6034, 6076, 6118, 6160, 6202, + 6244, 6281, 6318, 6355, 6392, 6429, 6466, 6503, 6540, 6577, + 6614, 6649, 6684, 6719, 6754, 6784, 6814, 6844, 6874, 6904, + 6934, 6964, 6994, 7024, 7054, 7079, 7104, 7129, 7154, 7179, + 7204, 7219, 7234, 7249, 7264, 7274, 7284, 7294, 7304, 7314 +} ; + + +int GetHashedIndexEE(int ix, int iy, int zside) +{ + int jx = ix ; + int jd = 2*( iy - 1 ) + ( jx - 1 )/50 ; + return ( ( zside < 0 ? 0 : kEEhalf ) + kdi[jd] + jx - kxf[jd] ) ; +} + +int GetIxFromHashedIndex(int Index) +{ + int di = Index%kEEhalf ; + int ii = ( std::upper_bound( kdi, kdi+(2*IY_MAX), di ) - kdi ) - 1 ; + return ( kxf[ii] + di - kdi[ii] ) ; +} + +int GetIyFromHashedIndex(int Index) +{ + int di = Index%kEEhalf ; + int ii = ( std::upper_bound( kdi, kdi+(2*IY_MAX), di ) - kdi ) - 1 ; + return ( 1 + ii/2 ) ; +} + +int GetZsideFromHashedIndex(int Index) +{ + + return ( Index < kEEhalf ? -1 : 1) ; +} diff --git a/EOverPCalibration/src/README b/EOverPCalibration/src/README new file mode 100644 index 00000000000..d273192073e --- /dev/null +++ b/EOverPCalibration/src/README @@ -0,0 +1,29 @@ +--------------------------------------------------------- +Summary of all the classes in FastCalibratot/src package: +---------------------------------------------------------- + +1) interface/GetHashedIndexEB.h src/GetHashedIndexEB.cc + + Functions to convert the hashed index of a xtal in EB in iEta and iPhi coordinates and + to get the hashed index from iPhi, iEta and zside + +2) interface/GetHashedIndexEE.h src/GetHashedIndexEE.cc + + Function to convert the hashed idexn xtal in EE in ix,iy and iz coordinates and to get + the hashed index from ix,iy and zside. + +3) interface/EERings.h src/EERings.cc + + Function that gives the EE ring from ix,iy and zside informations (EE is subdiveded in 40 rings from the external part to the inner one) + +4) interface/FastCalibratorWeight.h src/FastCalibratorWeight.cc + + Class used to calculate IC coefficient through L3 "weighted" method for EB + +5) interface/FastCalibratorEE.h src/FastCalibratorEE.cc + + Class used to calculate IC coefficient through L3 "weighted" method for EE+ and EE- + +##### Note #### + +In order to Run this package you have to use the NtuplePackage version in UserCode/RGerosa/NtuplePackage \ No newline at end of file diff --git a/EOverPCalibration/src/TEndcapRings.cc b/EOverPCalibration/src/TEndcapRings.cc new file mode 100644 index 00000000000..b8a61d872c8 --- /dev/null +++ b/EOverPCalibration/src/TEndcapRings.cc @@ -0,0 +1,71 @@ +#include "../interface/TEndcapRings.h" + + + +//----- +// ctor + +TEndcapRings::TEndcapRings() +{ + // initialization + for(int ix = 1; ix <= 100; ++ix) + for(int iy = 1; iy <= 100; ++iy) + for(int iz = 0; iz <= 1; ++iz) + iEndcapRing[ix][iy][iz] = -1; + + FILE *fRing; + fRing = fopen("./CommonTools/eerings.dat","r"); + std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; + int ix,iy,iz,ir; + while(fscanf(fRing,"(%d,%d,%d) %d \n",&ix,&iy,&iz,&ir) !=EOF ) + { + if( iz < 0 ) iz = 0; + iEndcapRing[ix][iy][iz] = ir; + } + + return; +} + +//----- +// dtor + +TEndcapRings::~TEndcapRings() +{ + return; +} + + + +//-------- +// methods + +int TEndcapRings::GetEndcapRing(int ix, int iy, int iz) +{ + int iSide = iz; + if( iSide < 0 ) iSide = 0; + return iEndcapRing[ix][iy][iSide]; +} + +int TEndcapRings::GetEndcapIeta(int ix, int iy, int iz) +{ + int iSide = iz; + if( iSide < 0 ) iSide = 0; + int iEtaOffset = 86*iz; + int iEta = iEtaOffset + iz*iEndcapRing[ix][iy][iSide]; + + return iEta; +} + +int TEndcapRings::GetEndcapIphi(int ix, int iy, int iz) +{ + double iX = ix-50.5; + double iY = iy-50.5; + int iPhi = -1; + + if( iX > 0 && iY > 0 ) iPhi = int( 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + if( iX < 0 && iY > 0 ) iPhi = int( 180 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + if( iX < 0 && iY < 0 ) iPhi = int( 180 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + if( iX > 0 && iY < 0 ) iPhi = int( 360 + 10 + TMath::ATan(iY/iX)*360. / (2.*TMath::Pi()) ) % 360 + 1; + + return iPhi; +} diff --git a/EOverPCalibration/src/TSicCrystals.cc b/EOverPCalibration/src/TSicCrystals.cc new file mode 100644 index 00000000000..ff752fc15de --- /dev/null +++ b/EOverPCalibration/src/TSicCrystals.cc @@ -0,0 +1,28 @@ +#include "../interface/TSicCrystals.h" + +// default constructor, reading the map from file +TSicCrystals::TSicCrystals() +{ + int ix,iy,iz; + for (ix=0;ix<100;ix++) + { + for (iy=0;iy<100;iy++) + { + for (iz=-1;iz<2;iz++) sicMap[ix][iy][iz]=0; + } + } + + FILE *fSic; + fSic = fopen("./interface/SIC_ixiyiz.list","r"); + std::cout << "Reading SIC crystals map: SIC_ixiyiz.list" << std::endl; + while(fscanf(fSic,"%d %d %d \n",&ix,&iy,&iz) !=EOF ) { + sicMap[ix][iy][iz] = 1; + } + return; + +} +TSicCrystals::~TSicCrystals() { return;} + +int TSicCrystals::isSic(Int_t ix, Int_t iy, Int_t iz){ + return sicMap[ix][iy][iz]; +} diff --git a/EOverPCalibration/src/XtalAlphaEB.cc b/EOverPCalibration/src/XtalAlphaEB.cc new file mode 100644 index 00000000000..83588d53d6c --- /dev/null +++ b/EOverPCalibration/src/XtalAlphaEB.cc @@ -0,0 +1,998 @@ +#include "../interface/XtalAlphaEB.h" +#include "../interface/GetHashedIndexEB.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +///==== Default constructor Contructor + +XtalAlphaEB::XtalAlphaEB(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEB, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + + // if parameter tree is not specified (or zero), connect the file + // used to generate this class and read the Tree. + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + + } + + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEB = typeEB; +} + +///==== deconstructor + +XtalAlphaEB::~XtalAlphaEB(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + + +///==== Load information of input Ntupla + +Long64_t XtalAlphaEB::LoadTree(Long64_t entry){ + +// Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + +///==== Variables initialization + +void XtalAlphaEB::Init(TTree *tree) +{ + /// Set object pointer + + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix = 0; + ele1_recHit_flag = 0; + ele1_recHit_LaserCorr = 0; + ele1_recHit_Alpha = 0; + + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_flag = 0; + ele2_recHit_LaserCorr = 0; + ele2_recHit_Alpha = 0; + + /// Set branch addresses and branch pointers + + if (!tree) return; + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + + fChain->SetBranchStatus("runId", 1); fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchStatus("lumiId", 1); fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchStatus("eventId", 1); fChain->SetBranchAddress("eventId", &eventId, &b_eventId); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + // ele1 + fChain->SetBranchStatus("ele1_recHit_E", 1); fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchStatus("ele1_recHit_hashedIndex",1); fChain->SetBranchAddress("ele1_recHit_hashedIndex",&ele1_recHit_hashedIndex,&b_ele1_recHit_hashedIndex); + fChain->SetBranchStatus("ele1_recHit_ietaORix", 1); fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); + fChain->SetBranchStatus("ele1_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + fChain->SetBranchStatus("ele1_recHit_flag", 1); fChain->SetBranchAddress("ele1_recHit_flag", &ele1_recHit_flag, &b_ele1_recHit_flag); + fChain->SetBranchStatus("ele1_recHit_laserCorrection", 1); fChain->SetBranchAddress("ele1_recHit_laserCorrection", &ele1_recHit_LaserCorr, &b_ele1_recHit_LaserCorr); + fChain->SetBranchStatus("ele1_recHit_Alpha", 1); fChain->SetBranchAddress("ele1_recHit_Alpha", &ele1_recHit_Alpha, &b_ele1_recHit_Alpha); + + //fChain->SetBranchStatus("ele1_E_true", 1); fChain->SetBranchAddress("ele1_E_true", &ele1_E_true, &b_ele1_E_true); + //fChain->SetBranchStatus("ele1_DR", 1); fChain->SetBranchAddress("ele1_DR", &ele1_DR, &b_ele1_DR); + + fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + fChain->SetBranchStatus("ele1_eta", 1); fChain->SetBranchAddress("ele1_eta", &ele1_eta, &b_ele1_eta); + fChain->SetBranchStatus("ele1_phi", 1); fChain->SetBranchAddress("ele1_phi", &ele1_phi, &b_ele1_phi); + fChain->SetBranchStatus("ele1_scERaw", 1); fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchStatus("ele1_scE", 1); fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchStatus("ele1_es", 1); fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + fChain->SetBranchStatus("ele1_e3x3", 1); fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchStatus("ele1_tkP", 1); fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchStatus("ele1_fbrem", 1); fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchStatus("ele1_EOverP", 1); fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchStatus("ele1_isEB", 1); fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchStatus("ele1_isEBEEGap", 1); fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); + fChain->SetBranchStatus("ele1_isEBEtaGap", 1); fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchStatus("ele1_isEBPhiGap", 1); fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchStatus("ele1_isEEDeeGap", 1); fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchStatus("ele1_isEERingGap", 1); fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + + fChain->SetBranchStatus("ele1_seedLaserAlpha", 1); fChain->SetBranchAddress("ele1_seedLaserAlpha", &ele1_seedLaserAlpha, &b_ele1_seedLaserAlpha); + fChain->SetBranchStatus("ele1_seedLaserCorr", 1); fChain->SetBranchAddress("ele1_seedLaserCorr", &ele1_seedLaserCorr, &b_ele1_seedLaserCorr); + + // ele2 + fChain->SetBranchStatus("ele2_recHit_E", 1); fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchStatus("ele2_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchStatus("ele2_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchStatus("ele2_recHit_ietaORix", 1); fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); + fChain->SetBranchStatus("ele2_recHit_flag", 1); fChain->SetBranchAddress("ele2_recHit_flag", &ele2_recHit_flag, &b_ele2_recHit_flag); + fChain->SetBranchStatus("ele2_recHit_laserCorrection", 1); fChain->SetBranchAddress("ele2_recHit_laserCorrection", &ele2_recHit_LaserCorr, &b_ele2_recHit_LaserCorr); + fChain->SetBranchStatus("ele2_recHit_Alpha", 1); fChain->SetBranchAddress("ele2_recHit_Alpha", &ele2_recHit_Alpha, &b_ele2_recHit_Alpha); + + //fChain->SetBranchStatus("ele2_E_true", 1); fChain->SetBranchAddress("ele2_E_true", &ele2_E_true, &b_ele2_E_true); + //fChain->SetBranchStatus("ele2_DR", 1); fChain->SetBranchAddress("ele2_DR", &ele2_DR, &b_ele2_DR); + fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + + fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + fChain->SetBranchStatus("ele2_eta", 1); fChain->SetBranchAddress("ele2_eta", &ele2_eta, &b_ele2_eta); + fChain->SetBranchStatus("ele2_phi", 1); fChain->SetBranchAddress("ele2_phi", &ele2_phi, &b_ele2_phi); + fChain->SetBranchStatus("ele2_scERaw", 1); fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchStatus("ele2_scE", 1); fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchStatus("ele2_e3x3", 1); fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchStatus("ele2_tkP", 1); fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchStatus("ele2_fbrem", 1); fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchStatus("ele2_EOverP", 1); fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchStatus("ele2_isEB", 1); fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); + fChain->SetBranchStatus("ele2_isEBEEGap", 1); fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchStatus("ele2_isEBEtaGap", 1); fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchStatus("ele2_isEBPhiGap", 1); fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchStatus("ele2_isEEDeeGap", 1); fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchStatus("ele2_isEERingGap", 1); fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + + fChain->SetBranchStatus("ele2_seedLaserAlpha", 1); fChain->SetBranchAddress("ele2_seedLaserAlpha", &ele2_seedLaserAlpha, &b_ele2_seedLaserAlpha); + fChain->SetBranchStatus("ele2_seedLaserCorr", 1); fChain->SetBranchAddress("ele2_seedLaserCorr", &ele2_seedLaserCorr, &b_ele2_seedLaserCorr); + +} + + + +//! Declaration of the objects that are save in the output file + +void XtalAlphaEB::bookHistos(int nLoops){ + + hC_AlphaValues = new hChain ("AlphaValues", "AlphaValues", 2000,0.5,1.5, nLoops); + + hC_EoP = new hChain ("EoP", "EoP", 100,0.2,1.9, nLoops); + + hC_AlphaSpreadVsLoop = new hChain ("hC_AlphaSpreadVsLoop", "hC_AlphaSpreadVsLoop", 171,-85,86,nLoops); + + hC_Alpha_EB = new h2Chain("hC_Alpha_EB", "hC_Alpha_EB", 360,1, 361, 171, -85, 86, nLoops ); + + h_Alpha_EB = new TH2F("h_Alpha_EB", "h_Alpha_EB", 360,1, 361, 171, -85, 86 ); + + h_Intial_AlphaValues = new TH2F("h_Intial_AlphaValues","h_Intial_AlphaValues",360,1,361,171,-85,86); + + h_Alpha_scalib_EB = new TH2F("h_Alpha_scalib_EB", "h_Alpha_scalib_EB", 360,1, 361, 171, -85, 86 ); + + p_AlphaValues_iEta = new TProfile ("p_AlphaValues_iEta","p_AlphaValues_iEta", 171, -85, 86, -0.1, 2.1); + + h_AlphaSpread_iEta = new TH1F ("h_AlphaSpread_iEta", "h_AlphaSpread_iEta", 171, -85, 86); + + h_Alpha_EB_hashedIndex = new TH1F("h_Alpha_EB_hashedIndex", "h_Alpha_EB_hashedIndex", 61201,-0.5,61999.5 ); + + h_map_Dead_Channels = new TH2F("h_map_Dead_Channels","h_map_Dead_Channels",360,1,361,171,-85,86); + + g_AlphameanVsLoop = new TGraphErrors(); + g_AlphameanVsLoop -> SetName("g_AlphameanVsLoop"); + g_AlphameanVsLoop -> SetTitle("g_AlphameanVsLoop"); + + g_AlpharmsVsLoop = new TGraphErrors(); + g_AlpharmsVsLoop ->SetName("g_AlpharmsVsLoop"); + g_AlpharmsVsLoop ->SetTitle("g_AlpharmsVsLoop"); + + g_AlphaSigmaVsLoop = new TGraphErrors(); + g_AlphaSigmaVsLoop ->SetName("g_AlphaSigmaVsLoop"); + g_AlphaSigmaVsLoop ->SetTitle("g_AlphaSigmaVsLoop"); + + h_Alpha_EB_meanOnPhi = new TH2F("h_Alpha_EB_meanOnPhi", "h_Alpha_EB_meanOnPhi", 360,1, 361, 171, -85, 86 ); + + h_Occupancy_hashedIndex = new TH1F ("h_Occupancy_hashedIndex", "h_Occupancy_hashedIndex", 61201,-0.5,61199.5); + + h_occupancy = new TH2F("h_occupancy", "h_occupancy", 360,1, 361, 171, -85, 86 ); + + return; +} + +//! Build E/p distribution for both ele1 and ele2 + +void XtalAlphaEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution, bool isR9selection, float R9Min, bool isMCTruth){ + + if(iLoop ==0) { // Set Chain fo Histogram for E/p distribution + + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + else{ + hC_EoP_eta_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_eta_ele = new hChain (name,name, 100,0.2,1.9,171); + } + + + Long64_t nbytes = 0, nb = 0; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_LaserCorr->at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) /// control if this recHit is good + { + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///! Seed search + } + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + ///! 3x3 matrix informations in order to apply R9 selection + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_LaserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0. + ) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + } + + ///! Eta seed from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + ///! different E/p if I am using MCThruth informations or not + if(!isMCTruth) { + + pIn = ele1_tkP; + int regionId = templIndexEB(myTypeEB,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + /// Save electron E/p in a chain of histogramm each for eta bin + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + + } + ///=== Second medium electron from Z + + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/ele2_scERaw; /// FEta approximation + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + { + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); ///Seed informations + } + + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_LaserCorr -> at(iRecHit)>0. && + ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + } + + + /// Eta seed info from hashed index + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + + bool skipElectron = false; + + /// MCTruth analysis option + if(!isMCTruth) { + + pIn = ele2_tkP; + int regionId = templIndexEB(myTypeEB,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + ///R9 Selection + if( fabs(thisE3x3/thisE) < R9Min && isR9selection==true ) skipElectron = true; + /// Save E/p electron information + if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed+85,thisE/pIn); + + } + + + } + + /// Histogramm Normalization + for(unsigned int ieta=0 ; ieta < hC_EoP_eta_ele->Size() ; ieta++){ + + hC_EoP_eta_ele->Normalize(ieta); + } + + /// Save E/p pdf if it is required + if(isSaveEPDistribution == true) { + + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + +} + + +/// Calibration Loop over the ntu events + +void XtalAlphaEB::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection,bool isR9selection, float R9Min, bool isMCTruth, std::map > > jsonMap){ + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = 0; + + + /// Define useful numbers + static const int MIN_IETA = 1; + static const int MIN_IPHI = 1; + static const int MAX_IETA = 85; + static const int MAX_IPHI = 360; + + for ( int iabseta = MIN_IETA; iabseta <= MAX_IETA; iabseta++ ){ + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + m_regions++; + + } + } + } + + /// Barrel region = Barrel xtal + std::cout << "m_regions " << m_regions << std::endl; + + /// Build the scalibration Map for MC Analysis + + std::vector theScalibration(m_regions, 0.); + TRandom3 genRand; + + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ) { + + bool isDeadXtal = false ; + + /// Save Map of DeadXtal and put the scalibration value = 0 in order to skip them in the calibration procedure -> Fake dead list given by user + + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex), GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + theScalibration[iIndex]=0; + h_map_Dead_Channels->Fill(GetIphiFromHashedIndex(iIndex),GetIetaFromHashedIndex(iIndex)); + } + else{ + + if(isMiscalib == true) theScalibration[iIndex] = genRand.Gaus(1.,0.01); ///! 1% of Miscalibration fixed + if(isMiscalib == false) theScalibration[iIndex] = 1.; + h_Alpha_scalib_EB -> Fill ( GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex), theScalibration[iIndex] ); ///! Scalib map + } + } + + /// ----------------- Calibration Loops -----------------------------// + + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// prepare the numerator and denominator for each Xtal + + std::vector theNumerator(m_regions, 0.); + std::vector theDenominator(m_regions, 0.); + + std::cout << "Number of analyzed events = " << nentries << std::endl; + + ///==== build E/p distribution ele 1 and 2 + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isMCTruth); + + // define map with events + std::map >,int> eventsMap; + + /// Loop on each entry + Long64_t nbytes = 0, nb = 0; + for (Long64_t jentry=0; jentryGetEntry(jentry); + nbytes += nb; + + + //********************************* + // JSON FILE AND DUPLIACTES IN DATA + + bool skipEvent = false; + if( isMCTruth == 0 ){ + + if(AcceptEventByRunAndLumiSection(runId,lumiId,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiId,eventId); + std::pair > eventRUNandLSandID(runId,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + + + float pIn, pSub, FdiEta; + + std::map map; + bool skipElectron=false; + + /// Tight electron information from W and Z, it depends on the flag variable isW, isZ + + if ( ele1_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/ele1_scERaw; + + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0 ; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0 ) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(ele1_recHit_LaserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_LaserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ + + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); //! Seed Infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_LaserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + } + + // Iniatila Map of Alpha Values + + if(iLoop==0) { + for ( unsigned int iRecHit = 0; iRecHit< ele1_recHit_Alpha->size(); iRecHit++){ + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + int ieta = GetIetaFromHashedIndex(thisIndex); + int iphi = GetIphiFromHashedIndex(thisIndex); + if(h_Intial_AlphaValues->GetBinContent(iphi,fabs(ieta+85))!=0) continue; + h_Intial_AlphaValues -> SetBinContent(iphi,fabs(ieta+85),ele1_recHit_Alpha->at(iRecHit)); + } + } + + + + pSub = 0.; //NOTALEO : test dummy + bool skipElectron = false; + + ///! if MCTruth Analysis + if(!isMCTruth) { + + pIn = ele1_tkP; + int regionId = templIndexEB(myTypeEB,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// Take the correct pdf for the ring in order to reweight the events in L3 + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// Basic selection on E/p or R9 if you want to apply + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron = true; + if( !skipElectron) { + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); /// factor use to reweight the evemts + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + + } + /// Use Half Statistic only even + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odd event + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*TMath::Power(ele1_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + skipElectron = false; + + /// Ele2 medium from Z only Barrel + if ( ele2_isEB == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + FdiEta = ele2_scE/ele2_scERaw; + // Electron energy + float thisE = 0; + int iseed = 0 ; + float E_seed = 0; + int seed_hashedIndex = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + if( ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_LaserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.){ + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); /// Seed information + } + + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_LaserCorr -> at(iRecHit)>0. && + ele2_recHit_Alpha -> at(iRecHit)>0.) + + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.); + + } + + if(iLoop==0) { + for ( unsigned int iRecHit = 0; iRecHit< ele2_recHit_Alpha->size(); iRecHit++){ + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + int ieta = GetIetaFromHashedIndex(thisIndex); + int iphi = GetIphiFromHashedIndex(thisIndex); + + if(h_Intial_AlphaValues->GetBinContent(iphi,fabs(ieta+85))!=0) continue; + h_Intial_AlphaValues -> SetBinContent(iphi,fabs(ieta+85),ele2_recHit_Alpha->at(iRecHit)); + + } + } + + pSub = 0.; //NOTALEO : test dummy + + ///! Option for MCTruth analysis + if(!isMCTruth) + { + pIn = ele2_tkP; + int regionId = templIndexEB(myTypeEB,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else{ + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + int eta_seed = GetIetaFromHashedIndex(seed_hashedIndex); + TH1F* EoPHisto = hC_EoP_eta_ele->GetHisto(eta_seed+85); + + /// discard electrons with bad E/P or R9 + if( thisE/pIn < EoPHisto->GetXaxis()->GetXmin() || thisE/pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron=true; + if( fabs(thisE/pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( !skipElectron ){ + + /// Now cycle on the all the recHits and update the numerator and denominator + for ( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + if (iLoop > 0) thisAlpha = h_Alpha_EB_hashedIndex -> GetBinContent(thisIndex+1); + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ) { + h_Occupancy_hashedIndex -> Fill(thisIndex); + h_occupancy -> Fill(GetIphiFromHashedIndex(thisIndex), GetIetaFromHashedIndex(thisIndex)); + } + + /// use full statistics + if ( splitStat == 0 ) { + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use evens + else if ( splitStat == 1 && jentry%2 == 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + /// use odds + else if ( splitStat == -1 && jentry%2 != 0 ) { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-pSub)); + theNumerator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*(pIn-pSub)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*TMath::Power(ele2_recHit_LaserCorr->at(iRecHit),thisAlpha-1.)*FdiEta*1/thisE*EoPHisto->GetBinContent(EoPbin); + } + + } + + } + //Fill EoP + hC_EoP -> Fill(iLoop, thisE/pIn); + + } + + } + + ///! End Cycle on the events + + ///New Loop cycle + Save info + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F auxiliary_Alpha("auxiliary_Alpha","auxiliary_Alpha",50,0.2,1.9); + + TF1* f1 = new TF1("f1","gaus",0,5); + + ///Fill the histo of IntercalibValues before the solve + for ( int iIndex = 0; iIndex < m_regions; iIndex++ ){ + + if ( h_Occupancy_hashedIndex -> GetBinContent(iIndex+1) > 0 ){ + + float thisAlphaConstant = 1.; + /// Solve the cases where the recHit energy is always 0 (dead Xtal?) + bool isDeadXtal = false ; + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIetaFromHashedIndex(iIndex),GetIphiFromHashedIndex(iIndex)); + if(isDeadXtal == true ) continue; + + + if (theNumerator[iIndex]/theDenominator[iIndex]>0 && theDenominator[iIndex]!=0) thisAlphaConstant = theNumerator[iIndex]/theDenominator[iIndex]; + float oldAlphaConstant = 1.; + if ( iLoop > 0 ) oldAlphaConstant = h_Alpha_EB_hashedIndex -> GetBinContent (iIndex+1); + + h_Alpha_EB_hashedIndex -> SetBinContent(iIndex+1, thisAlphaConstant*oldAlphaConstant); /// Alpha product useful for L3 methods + hC_AlphaValues -> Fill(iLoop, thisAlphaConstant); /// Alpha correction distribution at each loop + hC_Alpha_EB -> Fill(iLoop, GetIphiFromHashedIndex(iIndex), GetIetaFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + ///Save the new IC coefficient + auxiliary_Alpha.Fill(thisAlphaConstant); + } + + } + /// Info in order to test convergence + g_AlphameanVsLoop -> SetPoint(iLoop, iLoop, auxiliary_Alpha . GetMean()); + g_AlphameanVsLoop -> SetPointError(iLoop, 0., auxiliary_Alpha . GetMeanError()); + + g_AlpharmsVsLoop -> SetPoint(iLoop, iLoop, auxiliary_Alpha . GetRMS()); + g_AlpharmsVsLoop -> SetPointError(iLoop, 0., auxiliary_Alpha . GetRMSError()); + + auxiliary_Alpha.Fit("f1","QR"); + + g_AlphaSigmaVsLoop -> SetPoint(iLoop, iLoop, f1->GetParameter(2)); + g_AlphaSigmaVsLoop -> SetPointError(iLoop, 0., f1->GetParError(2)); + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + TH1F* histoTemp = new TH1F("histoTemp","histoTemp",800, 0., 3.); + ///Setup the histo for fit + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + int hashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(hashedIndex+1) == 0 ) continue; + histoTemp->Fill(h_Alpha_EB_hashedIndex->GetBinContent(hashedIndex+1)); + } + + TF1* f2 = new TF1("f2","gaus",0,5); + f2->SetParameters(histoTemp->GetEntries(),histoTemp->GetMean(),histoTemp->GetRMS()); + f2->SetRange(histoTemp->GetMean()-8*histoTemp->GetRMS(),histoTemp->GetMean()+8*histoTemp->GetRMS()); + histoTemp -> Fit("f2","QR"); + hC_AlphaSpreadVsLoop -> SetBinContent(iLoop,iabseta*theZside + 85 + 1, f2->GetParameter(2)); + hC_AlphaSpreadVsLoop -> SetBinError(iLoop, iabseta*theZside + 85 + 1, f2->GetParError(2) ); + + delete histoTemp; + delete f2; + } + } + + delete f1; + }/// end calibration loop + + int myPhiIndex = 0; + + for ( int iabseta = MIN_IETA; iabseta < MAX_IETA + 1; iabseta++ ){ + for ( int theZside = -1; theZside < 2; theZside = theZside+2 ){ + + ///Setup the histo for fit + TH1F histoAuxiliary("histoAuxiliary","histoAuxiliary",800, 0., 3.); + TF1 f1("f1","gaus",0.,5.); + + int totIphi = 0; + float meanAlphaforPhiRing =0.; + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + float thisAlphaConstant = h_Alpha_EB_hashedIndex -> GetBinContent (thisHashedIndex+1); + + h_Alpha_EB -> Fill(iphi, iabseta*theZside, thisAlphaConstant); ///Fill with Last Alpha correction Value + + p_AlphaValues_iEta -> Fill(GetIetaFromHashedIndex(thisHashedIndex), thisAlphaConstant); + + histoAuxiliary . Fill (thisAlphaConstant); + + ///Vectors + IetaValues.push_back(iabseta*theZside); + IphiValues.push_back(iphi); + AlphaValues.push_back(thisAlphaConstant); + + meanAlphaforPhiRing += thisAlphaConstant; + totIphi++; + + } + + for ( int uu = 0; uu < totIphi; uu++ ) meanAlphaforPhiRingValues.push_back(meanAlphaforPhiRing/totIphi); + /// Note this info are not used furhter because channels near to the dead ones are not skipped + + + for ( int iphi = MIN_IPHI; iphi <= MAX_IPHI; iphi++ ){ + + int thisHashedIndex = GetHashedIndexEB(iabseta*theZside, iphi, theZside); + if ( h_Occupancy_hashedIndex -> GetBinContent(thisHashedIndex+1) == 0 ) continue; + + h_Alpha_EB_meanOnPhi -> Fill(iphi, iabseta*theZside, AlphaValues.at(myPhiIndex)/meanAlphaforPhiRingValues.at(myPhiIndex)); + myPhiIndex++; /// Normalization IC with the mean of each ring + + } + + f1.SetParameters(histoAuxiliary.GetEntries(),histoAuxiliary.GetMean(),histoAuxiliary.GetRMS()); + f1.SetRange(histoAuxiliary.GetMean()-8*histoAuxiliary.GetRMS(), histoAuxiliary.GetMean()+8*histoAuxiliary.GetRMS()); + histoAuxiliary . Fit("f1","QR"); + + h_AlphaSpread_iEta -> SetBinContent( iabseta*theZside + 85 + 1, f1.GetParameter(2) ); + h_AlphaSpread_iEta -> SetBinError( iabseta*theZside + 85 + 1, f1.GetParError(2) ); + + } + + } +} +/// Save infos in the output +void XtalAlphaEB::saveHistos(TFile * f1){ + + f1->cd(); + + h_occupancy -> Write(); + h_Occupancy_hashedIndex -> Write(); + h_Intial_AlphaValues -> Write(); + + hC_AlphaValues -> Write(*f1); + hC_Alpha_EB -> Write("",*f1); + hC_EoP -> Write(*f1); + + g_AlphameanVsLoop -> Write(); + g_AlpharmsVsLoop -> Write(); + g_AlphaSigmaVsLoop -> Write(); + + hC_AlphaSpreadVsLoop -> Write(*f1); + + h_Alpha_EB_hashedIndex -> Write(); + h_Alpha_EB -> Write(); + h_Alpha_EB_meanOnPhi -> Write(); + + + p_AlphaValues_iEta -> Write(); + h_AlphaSpread_iEta -> Write(); + + + h_map_Dead_Channels -> Write() ; + + + f1->Close(); + + return; +} +/// Save E/0 distribution +void XtalAlphaEB::saveEoPeta(TFile * f2){ + + f2->cd(); + + hC_EoP_eta_ele ->Write(*f2); + + f2->Close(); +} + +///! Acquire fake dead channel list on order to evaluate the effected of IC near to them +void XtalAlphaEB::AcquireDeadXtal(TString inputDeadXtal){ + + if(inputDeadXtal!="NULL") + { + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iEta, iPhi ; + + + while(!DeadXtal.eof()) + { + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iEta >> iPhi ; + + if(iEta >=0) DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,1)) ; + else DeadXtal_HashedIndex.push_back(GetHashedIndexEB(iEta,iPhi,-1)) ; + + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else{ + DeadXtal_HashedIndex.push_back(-9999); + } + +} +///! Check if the channel is dead or not +bool XtalAlphaEB::CheckDeadXtal(const int & iEta, const int & iPhi){ + int hashed_Index; + if(iEta>=0) hashed_Index = GetHashedIndexEB(iEta,iPhi,1); + else hashed_Index = GetHashedIndexEB(iEta,iPhi,-1); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} diff --git a/EOverPCalibration/src/XtalAlphaEE.cc b/EOverPCalibration/src/XtalAlphaEE.cc new file mode 100644 index 00000000000..9a4be80299d --- /dev/null +++ b/EOverPCalibration/src/XtalAlphaEE.cc @@ -0,0 +1,1474 @@ +#include "../interface/XtalAlphaEE.h" +#include "../interface/GetHashedIndexEE.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/// Default constructor +XtalAlphaEE::XtalAlphaEE(TTree *tree, std::vector & inputMomentumScale, const std::string& typeEE, TString outEPDistribution): +outEPDistribution_p(outEPDistribution){ + + if (tree == 0) { + TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A- WElectron-May10ReReco-v1.root"); + if (!f) { + f = new TFile("/data1/dimatteo/Calibration/Ntuples/Run2011A/WZAnalysisSingleXtal/WZAnalysis_SingleElectron_Run2011A-WElectron-May10ReReco-v1.root"); + } + tree = (TTree*)gDirectory->Get("ntu"); + } + + // endcap geometry + eRings = new TEndcapRings(); + SicCrystal = new TSicCrystals(); + + Init(tree); + + // Set my momentum scale using the input graphs + myMomentumScale = inputMomentumScale; + myTypeEE = typeEE; +} + +/// Deconstructor + +XtalAlphaEE::~XtalAlphaEE(){ + + if (!fChain) return; + delete fChain->GetCurrentFile(); +} + + +Long64_t XtalAlphaEE::LoadTree(Long64_t entry){ + + // Set the environment to read one entry + if (!fChain) return -5; + Long64_t centry = fChain->LoadTree(entry); + if (centry < 0) return centry; + if (!fChain->InheritsFrom(TChain::Class())) return centry; + + TChain *chain = (TChain*)fChain; + if (chain->GetTreeNumber() != fCurrent) { + fCurrent = chain->GetTreeNumber(); + } + return centry; +} + + +/// Intialize pointers +void XtalAlphaEE::Init(TTree *tree){ + + /// Set object pointer + + ele1_recHit_E = 0; + ele1_recHit_hashedIndex = 0; + ele1_recHit_iphiORiy = 0; + ele1_recHit_ietaORix =0 ; + ele1_recHit_laserCorr =0 ; + ele1_recHit_Alpha =0 ; + + + ele2_recHit_E = 0; + ele2_recHit_hashedIndex = 0; + ele2_recHit_iphiORiy = 0; + ele2_recHit_ietaORix = 0; + ele2_recHit_laserCorr= 0 ; + ele2_recHit_Alpha =0 ; + + /// Set branch addresses and branch pointers + + if (!tree) return; + + fChain = tree; + fCurrent = -1; + fChain->SetMakeClass(1); + + fChain->SetBranchStatus("*", 0); + fChain->SetBranchStatus("runId", 1); fChain->SetBranchAddress("runId", &runId, &b_runId); + fChain->SetBranchStatus("lumiId", 1); fChain->SetBranchAddress("lumiId", &lumiId, &b_lumiId); + fChain->SetBranchStatus("eventId", 1); fChain->SetBranchAddress("eventId", &eventId, &b_eventId); + fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); + fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); + + // ele1 + fChain->SetBranchStatus("ele1_recHit_E", 1); fChain->SetBranchAddress("ele1_recHit_E", &ele1_recHit_E, &b_ele1_recHit_E); + fChain->SetBranchStatus("ele1_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele1_recHit_hashedIndex",&ele1_recHit_hashedIndex,&b_ele1_recHit_hashedIndex); + fChain->SetBranchStatus("ele1_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele1_recHit_iphiORiy", &ele1_recHit_iphiORiy, &b_ele1_recHit_iphiORiy); + fChain->SetBranchStatus("ele1_recHit_ietaORix", 1); fChain->SetBranchAddress("ele1_recHit_ietaORix", &ele1_recHit_ietaORix, &b_ele1_recHit_ietaORix); + fChain->SetBranchStatus("ele1_recHit_laserCorrection",1); fChain->SetBranchAddress("ele1_recHit_laserCorrection",&ele1_recHit_laserCorr,&b_ele1_recHit_laserCorr); + fChain->SetBranchStatus("ele1_recHit_Alpha", 1); fChain->SetBranchAddress("ele1_recHit_Alpha", &ele1_recHit_Alpha, &b_ele1_recHit_Alpha); + + fChain->SetBranchStatus("ele1_charge", 1); fChain->SetBranchAddress("ele1_charge", &ele1_charge, &b_ele1_charge); + fChain->SetBranchStatus("ele1_eta", 1); fChain->SetBranchAddress("ele1_eta", &ele1_eta, &b_ele1_eta); + fChain->SetBranchStatus("ele1_phi", 1); fChain->SetBranchAddress("ele1_phi", &ele1_phi, &b_ele1_phi); + fChain->SetBranchStatus("ele1_scERaw", 1); fChain->SetBranchAddress("ele1_scERaw", &ele1_scERaw, &b_ele1_scERaw); + fChain->SetBranchStatus("ele1_scE", 1); fChain->SetBranchAddress("ele1_scE", &ele1_scE, &b_ele1_scE); + fChain->SetBranchStatus("ele1_scEta", 1); fChain->SetBranchAddress("ele1_scEta", &ele1_scEta, &b_ele1_scEta); + fChain->SetBranchStatus("ele1_es", 1); fChain->SetBranchAddress("ele1_es", &ele1_es, &b_ele1_es); + fChain->SetBranchStatus("ele1_e3x3", 1); fChain->SetBranchAddress("ele1_e3x3", &ele1_e3x3, &b_ele1_e3x3); + fChain->SetBranchStatus("ele1_tkP", 1); fChain->SetBranchAddress("ele1_tkP", &ele1_tkP, &b_ele1_tkP); + fChain->SetBranchStatus("ele1_fbrem", 1); fChain->SetBranchAddress("ele1_fbrem", &ele1_fbrem, &b_ele1_fbrem); + fChain->SetBranchStatus("ele1_EOverP", 1); fChain->SetBranchAddress("ele1_EOverP", &ele1_EOverP, &b_ele1_EOverP); + fChain->SetBranchStatus("ele1_isEB", 1); fChain->SetBranchAddress("ele1_isEB", &ele1_isEB, &b_ele1_isEB); + fChain->SetBranchStatus("ele1_isEBEEGap", 1); fChain->SetBranchAddress("ele1_isEBEEGap", &ele1_isEBEEGap, &b_ele1_isEBEEGap); + fChain->SetBranchStatus("ele1_scE_regression", 1); fChain->SetBranchAddress("ele1_scE_regression", &ele1_scE_regression, &b_ele1_scE_regression); + + fChain->SetBranchStatus("ele1_seedLaserAlpha", 1); fChain->SetBranchAddress("ele1_seedLaserAlpha", &ele1_seedLaserAlpha, &b_ele1_seedLaserAlpha); + fChain->SetBranchStatus("ele1_seedLaserCorr", 1); fChain->SetBranchAddress("ele1_seedLaserCorr", &ele1_seedLaserCorr, &b_ele1_seedLaserCorr); + + fChain->SetBranchStatus("ele1_isEBEtaGap", 1); fChain->SetBranchAddress("ele1_isEBEtaGap", &ele1_isEBEtaGap, &b_ele1_isEBEtaGap); + fChain->SetBranchStatus("ele1_isEBPhiGap", 1); fChain->SetBranchAddress("ele1_isEBPhiGap", &ele1_isEBPhiGap, &b_ele1_isEBPhiGap); + fChain->SetBranchStatus("ele1_isEEDeeGap", 1); fChain->SetBranchAddress("ele1_isEEDeeGap", &ele1_isEEDeeGap, &b_ele1_isEEDeeGap); + fChain->SetBranchStatus("ele1_isEERingGap", 1); fChain->SetBranchAddress("ele1_isEERingGap", &ele1_isEERingGap, &b_ele1_isEERingGap); + + // ele2 + fChain->SetBranchStatus("ele2_recHit_E", 1); fChain->SetBranchAddress("ele2_recHit_E", &ele2_recHit_E, &b_ele2_recHit_E); + fChain->SetBranchStatus("ele2_recHit_hashedIndex", 1); fChain->SetBranchAddress("ele2_recHit_hashedIndex", &ele2_recHit_hashedIndex, &b_ele2_recHit_hashedIndex); + fChain->SetBranchStatus("ele2_recHit_iphiORiy", 1); fChain->SetBranchAddress("ele2_recHit_iphiORiy", &ele2_recHit_iphiORiy, &b_ele2_recHit_iphiORiy); + fChain->SetBranchStatus("ele2_recHit_ietaORix", 1); fChain->SetBranchAddress("ele2_recHit_ietaORix", &ele2_recHit_ietaORix, &b_ele2_recHit_ietaORix); + fChain->SetBranchStatus("ele2_recHit_laserCorrection",1); fChain->SetBranchAddress("ele2_recHit_laserCorrection",&ele2_recHit_laserCorr,&b_ele2_recHit_laserCorr); + fChain->SetBranchStatus("ele2_recHit_Alpha", 1); fChain->SetBranchAddress("ele2_recHit_Alpha", &ele2_recHit_Alpha, &b_ele2_recHit_Alpha); + + + fChain->SetBranchStatus("ele2_charge", 1); fChain->SetBranchAddress("ele2_charge", &ele2_charge, &b_ele2_charge); + fChain->SetBranchStatus("ele2_eta", 1); fChain->SetBranchAddress("ele2_eta", &ele2_eta, &b_ele2_eta); + fChain->SetBranchStatus("ele2_phi", 1); fChain->SetBranchAddress("ele2_phi", &ele2_phi, &b_ele2_phi); + fChain->SetBranchStatus("ele2_scERaw", 1); fChain->SetBranchAddress("ele2_scERaw", &ele2_scERaw, &b_ele2_scERaw); + fChain->SetBranchStatus("ele2_scE", 1); fChain->SetBranchAddress("ele2_scE", &ele2_scE, &b_ele2_scE); + fChain->SetBranchStatus("ele2_scEta", 1); fChain->SetBranchAddress("ele2_scEta", &ele2_scEta, &b_ele2_scEta); + fChain->SetBranchStatus("ele2_es", 1); fChain->SetBranchAddress("ele2_es", &ele2_es, &b_ele2_es); + fChain->SetBranchStatus("ele2_e3x3", 1); fChain->SetBranchAddress("ele2_e3x3", &ele2_e3x3, &b_ele2_e3x3); + fChain->SetBranchStatus("ele2_tkP", 1); fChain->SetBranchAddress("ele2_tkP", &ele2_tkP, &b_ele2_tkP); + fChain->SetBranchStatus("ele2_fbrem", 1); fChain->SetBranchAddress("ele2_fbrem", &ele2_fbrem, &b_ele2_fbrem); + fChain->SetBranchStatus("ele2_EOverP", 1); fChain->SetBranchAddress("ele2_EOverP", &ele2_EOverP, &b_ele2_EOverP); + fChain->SetBranchStatus("ele2_isEB", 1); fChain->SetBranchAddress("ele2_isEB", &ele2_isEB, &b_ele2_isEB); + fChain->SetBranchStatus("ele2_scE_regression", 1); fChain->SetBranchAddress("ele2_scE_regression", &ele2_scE_regression, &b_ele2_scE_regression); + + fChain->SetBranchStatus("ele2_seedLaserAlpha", 1); fChain->SetBranchAddress("ele2_seedLaserAlpha", &ele2_seedLaserAlpha, &b_ele2_seedLaserAlpha); + fChain->SetBranchStatus("ele2_seedLaserCorr", 1); fChain->SetBranchAddress("ele2_seedLaserCorr", &ele2_seedLaserCorr, &b_ele2_seedLaserCorr); + + fChain->SetBranchStatus("ele2_isEBEEGap", 1); fChain->SetBranchAddress("ele2_isEBEEGap", &ele2_isEBEEGap, &b_ele2_isEBEEGap); + fChain->SetBranchStatus("ele2_isEBEtaGap", 1); fChain->SetBranchAddress("ele2_isEBEtaGap", &ele2_isEBEtaGap, &b_ele2_isEBEtaGap); + fChain->SetBranchStatus("ele2_isEBPhiGap", 1); fChain->SetBranchAddress("ele2_isEBPhiGap", &ele2_isEBPhiGap, &b_ele2_isEBPhiGap); + fChain->SetBranchStatus("ele2_isEEDeeGap", 1); fChain->SetBranchAddress("ele2_isEEDeeGap", &ele2_isEEDeeGap, &b_ele2_isEEDeeGap); + fChain->SetBranchStatus("ele2_isEERingGap", 1); fChain->SetBranchAddress("ele2_isEERingGap", &ele2_isEERingGap, &b_ele2_isEERingGap); + +} + + +//! Declaration of the objects that are save in the output file + +void XtalAlphaEE::bookHistos(int nLoops){ + + ///service histos + + h_Alpha_hashedIndex_EE = new TH1F ("h_scale_Alpha_EE","h_Alpha_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + h_occupancy_hashedIndex_EE = new TH1F ("h_occupancy_hashedIndex_EE","h_occupancy_hashedIndex_EE", kEEhalf*2, 0, kEEhalf*2 - 1 ); + hC_EoP = new hChain ("EoP", "EoP", 500,0.2,3.0, nLoops); + + ///EE+ + + hC_AlphaValues_BTCP_EEP = new hChain ("AlphaValues_BTCP_EEP", "AlphaValues_BTCP_EEP", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_BTCP_EEP = new hChain ("hC_AlphaSpreadVsLoop_BTCP_EEP", "hC_AlphaSpreadVsLoop_BTCP_EEP", 40,0,40,nLoops); + hC_Alpha_BTCP_EEP = new h2Chain("hC_Alpha_BTCP_EEP", "hC_Alpha_BTCP_EEP", 100,1, 101, 100, 1, 101, nLoops ); + hC_AlphaValues_SIC_EEP = new hChain ("AlphaValues_SIC_EEP", "AlphaValues_SIC_EEP", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_SIC_EEP = new hChain ("hC_AlphaSpreadVsLoop_SIC_EEP", "hC_AlphaSpreadVsLoop_SIC_EEP", 40,0,40,nLoops); + hC_Alpha_SIC_EEP = new h2Chain("hC_Alpha_SIC_EEP", "hC_Alpha_SIC_EEP", 100,1, 101, 100, 1, 101, nLoops ); + + h_Alpha_EEP = new TH2F("h_Alpha_EEP", "h_Alpha_EEP", 100,1,101,100,1,101); + h_scalib_EEP = new TH2F("h_scalib_EEP","h_scalib_EEP",100,1,101,100,1,101); + + h_occupancy_EEP = new TH2F("h_occupancy_EEP", "h_occupancy_EEP", 100,1, 101, 100, 1, 101 ); + h_map_Dead_Channels_EEP = new TH2F("h_map_Dead_Channels_EEP","h_map_Dead_Channels_EEP",100,1,101,100,1,101); + + p_AlphaVsIeta_BTCP_EEP = new TProfile("p_AlphaVsIeta_BTCP_EEP","p_AlphaVsIeta_BTCP_EEP",40,0,40); + AlphaSpreadVsIeta_BTCP_EEP = new TH1F("AlphaSpreadVsIeta_BTCP_EEP","AlphaSpreadVsIeta_BTCP_EEP",40,0,40); + + g_AlphameanVsLoop_BTCP_EEP = new TGraphErrors(); + g_AlphameanVsLoop_BTCP_EEP -> SetName("g_AlphameanVsLoop_BTCP_EEP"); + g_AlphameanVsLoop_BTCP_EEP -> SetTitle("g_AlphameanVsLoop_BTCP_EEP"); + + g_AlpharmsVsLoop_BTCP_EEP = new TGraphErrors(); + g_AlpharmsVsLoop_BTCP_EEP -> SetName("g_AlpharmsVsLoop_BTCP_EEP"); + g_AlpharmsVsLoop_BTCP_EEP -> SetTitle("g_AlpharmsVsLoop_BTCP_EEP"); + + g_AlphaSigmaVsLoop_BTCP_EEP = new TGraphErrors(); + g_AlphaSigmaVsLoop_BTCP_EEP -> SetName("g_AlpharmsVsLoop_BTCP_EEP"); + g_AlphaSigmaVsLoop_BTCP_EEP -> SetTitle("g_AlpharmsVsLoop_BTCP_EEP"); + + p_AlphaVsIeta_SIC_EEP = new TProfile("p_AlphaVsIeta_SIC_EEP","p_AlphaVsIeta_SIC_EEP",40,0,40); + AlphaSpreadVsIeta_SIC_EEP = new TH1F("AlphaSpreadVsIeta_SIC_EEP","AlphaSpreadVsIeta_SIC_EEP",40,0,40); + + g_AlphameanVsLoop_SIC_EEP = new TGraphErrors(); + g_AlphameanVsLoop_SIC_EEP -> SetName("g_AlphameanVsLoop_SIC_EEP"); + g_AlphameanVsLoop_SIC_EEP -> SetTitle("g_AlphameanVsLoop_SIC_EEP"); + + g_AlpharmsVsLoop_SIC_EEP = new TGraphErrors(); + g_AlpharmsVsLoop_SIC_EEP -> SetName("g_AlpharmsVsLoop_SIC_EEP"); + g_AlpharmsVsLoop_SIC_EEP -> SetTitle("g_AlpharmsVsLoop_SIC_EEP"); + + g_AlphaSigmaVsLoop_SIC_EEP = new TGraphErrors(); + g_AlphaSigmaVsLoop_SIC_EEP -> SetName("g_AlpharmsVsLoop_SIC_EEP"); + g_AlphaSigmaVsLoop_SIC_EEP -> SetTitle("g_AlpharmsVsLoop_SIC_EEP"); + + ///EE+ + + hC_AlphaValues_BTCP_EEM = new hChain ("AlphaValues_BTCP_EEM", "AlphaValues_BTCP_EEM", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_BTCP_EEM = new hChain ("hC_AlphaSpreadVsLoop_BTCP_EEM", "hC_AlphaSpreadVsLoop_BTCP_EEM", 40,0,40,nLoops); + hC_Alpha_BTCP_EEM = new h2Chain("hC_Alpha_BTCP_EEM", "hC_Alpha_BTCP_EEM", 100,1, 101, 100, 1, 101, nLoops ); + hC_AlphaValues_SIC_EEM = new hChain ("AlphaValues_SIC_EEM", "AlphaValues_SIC_EEM", 400,0.2,1.9, nLoops); + hC_AlphaSpreadVsLoop_SIC_EEM = new hChain ("hC_AlphaSpreadVsLoop_SIC_EEM", "hC_AlphaSpreadVsLoop_SIC_EEM", 40,0,40,nLoops); + hC_Alpha_SIC_EEM = new h2Chain("hC_Alpha_SIC_EEM", "hC_Alpha_SIC_EEM", 100,1, 101, 100, 1, 101, nLoops ); + + h_Alpha_EEM = new TH2F("h_Alpha_EEM", "h_Alpha_EEM", 100,1,101,100,1,101); + h_scalib_EEM = new TH2F("h_scalib_EEM","h_scalib_EEM",100,1,101,100,1,101); + + h_occupancy_EEM = new TH2F("h_occupancy_EEM", "h_occupancy_EEM", 100,1, 101, 100, 1, 101 ); + h_map_Dead_Channels_EEM = new TH2F("h_map_Dead_Channels_EEM","h_map_Dead_Channels_EEM",100,1,101,100,1,101); + + p_AlphaVsIeta_BTCP_EEM = new TProfile("p_AlphaVsIeta_BTCP_EEM","p_AlphaVsIeta_BTCP_EEM",40,0,40); + AlphaSpreadVsIeta_BTCP_EEM = new TH1F("AlphaSpreadVsIeta_BTCP_EEM","AlphaSpreadVsIeta_BTCP_EEM",40,0,40); + + g_AlphameanVsLoop_BTCP_EEM = new TGraphErrors(); + g_AlphameanVsLoop_BTCP_EEM -> SetName("g_AlphameanVsLoop_BTCP_EEM"); + g_AlphameanVsLoop_BTCP_EEM -> SetTitle("g_AlphameanVsLoop_BTCP_EEM"); + + g_AlpharmsVsLoop_BTCP_EEM = new TGraphErrors(); + g_AlpharmsVsLoop_BTCP_EEM -> SetName("g_AlpharmsVsLoop_BTCP_EEM"); + g_AlpharmsVsLoop_BTCP_EEM -> SetTitle("g_AlpharmsVsLoop_BTCP_EEM"); + + g_AlphaSigmaVsLoop_BTCP_EEM = new TGraphErrors(); + g_AlphaSigmaVsLoop_BTCP_EEM -> SetName("g_AlpharmsVsLoop_BTCP_EEM"); + g_AlphaSigmaVsLoop_BTCP_EEM -> SetTitle("g_AlpharmsVsLoop_BTCP_EEM"); + + p_AlphaVsIeta_SIC_EEM = new TProfile("p_AlphaVsIeta_SIC_EEM","p_AlphaVsIeta_SIC_EEM",40,0,40); + AlphaSpreadVsIeta_SIC_EEM = new TH1F("AlphaSpreadVsIeta_SIC_EEM","AlphaSpreadVsIeta_SIC_EEM",40,0,40); + + g_AlphameanVsLoop_SIC_EEM = new TGraphErrors(); + g_AlphameanVsLoop_SIC_EEM -> SetName("g_AlphameanVsLoop_SIC_EEM"); + g_AlphameanVsLoop_SIC_EEM -> SetTitle("g_AlphameanVsLoop_SIC_EEM"); + + g_AlpharmsVsLoop_SIC_EEM = new TGraphErrors(); + g_AlpharmsVsLoop_SIC_EEM -> SetName("g_AlpharmsVsLoop_SIC_EEM"); + g_AlpharmsVsLoop_SIC_EEM -> SetTitle("g_AlpharmsVsLoop_SIC_EEM"); + + g_AlphaSigmaVsLoop_SIC_EEM = new TGraphErrors(); + g_AlphaSigmaVsLoop_SIC_EEM -> SetName("g_AlpharmsVsLoop_SIC_EEM"); + g_AlphaSigmaVsLoop_SIC_EEM -> SetTitle("g_AlpharmsVsLoop_SIC_EEM"); + + + return; +} + + + + +///===== Build E/p for electron 1 and 2 + +void XtalAlphaEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int useZ, std::vector theScalibration, bool isSaveEPDistribution,bool isR9selection, float R9Min, bool isMCTruth,bool isfbrem){ + + if(iLoop ==0){ + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + else{ + hC_EoP_ir_ele -> Reset(); + TString name = Form ("hC_EoP_eta_%d",iLoop); + hC_EoP_ir_ele = new hChain (name,name, 250,0.1,3.0,41); + } + + // Long64_t nb = 0; + + for(Long64_t jentry=0; jentryGetEntry(jentry); + + if (!(jentry%1000000))std::cerr<<"building E/p distribution ----> "<size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele1_recHit_E -> at(iRecHit); ///Seed infos + + } + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + if(ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); /// SC energy + + } + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_laserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + + /// Option for MCTruth analysis + if(!isMCTruth){ + + pIn = ele1_tkP; + int regionId = templIndexEE(myTypeEE,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9, fbrem selection before E/p distribution + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta) > 1.75 && fabs(ele1_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta) > 2.00 && fabs(ele1_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele1_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; + + if( !skipElectron ) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele1_es)); // Fill E/p ditribution + } + + ///=== Second medium electron from Z only Endcaps + if ( ele2_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + float thisE3x3 = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if(ele2_recHit_E -> at(iRecHit) > E_seed && ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0. ) { + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + iseed=iRecHit; + E_seed=ele2_recHit_E -> at(iRecHit); + } + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + // IC obtained from previous Loops + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_laserCorr -> at(iRecHit)>0. && + ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + } + + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); /// Seed ring + + bool skipElectron = false; + /// Option for MCTruth Analysis + if(!isMCTruth){ + + pIn = ele2_tkP; + int regionId = templIndexEE(myTypeEE,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else{ + + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta) > 1.75 && fabs(ele2_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta) > 2.00 && fabs(ele2_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele2_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; + + if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed,thisE/(pIn-ele2_es)); + + } + } + + + /// Normalization E/p distribution + for(unsigned int ir=0 ; ir < hC_EoP_ir_ele->Size() ; ir++) hC_EoP_ir_ele->Normalize(ir); + + + /// Save E/p distributions + if(isSaveEPDistribution == true && outEPDistribution_p!="NULL" ) { + + if(iLoop ==0){ + TFile *f2 = new TFile(outEPDistribution_p.Data(),"RECREATE"); + saveEoPeta(f2); + } + else{ + TFile *f2 = new TFile(outEPDistribution_p.Data(),"UPDATE"); + saveEoPeta(f2); + } + + } + +} + + +/// L3 Loop method ----> Calibration Loop function +void XtalAlphaEE::Loop(int nentries, int useZ, int useW, int splitStat, int nLoops, bool isMiscalib,bool isSaveEPDistribution, + bool isEPselection, bool isR9selection, float R9Min, bool isMCTruth, bool isfbrem, std::map > > jsonMap){ + + if (fChain == 0) return; + + /// Define the number of crystal you want to calibrate + int m_regions = kEEhalf; + + std::cout << "m_regions " << m_regions << std::endl; + + /// build up scalibration map + std::vector theScalibration(m_regions*2, 0.); + TRandom genRand; + + for ( int iIndex = 0; iIndex < m_regions*2; iIndex++ ){ + + bool isDeadXtal = false ; + + /// Check if the xtal has to be considered dead or not ---> >Fake dead list given by user + if(DeadXtal_HashedIndex.at(0)!=-9999) isDeadXtal = CheckDeadXtal(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex),GetZsideFromHashedIndex(iIndex)); + if(isDeadXtal == true ) { + + theScalibration[iIndex]=0; + + if(GetZsideFromHashedIndex(iIndex)>0) + h_map_Dead_Channels_EEP->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + else h_map_Dead_Channels_EEM->Fill(GetIxFromHashedIndex(iIndex),GetIyFromHashedIndex(iIndex)); + } + else{ + if(isMiscalib == true) theScalibration[iIndex] = genRand.Gaus(1.,0.03); /// Miscalibration fixed at 5% + if(isMiscalib == false) theScalibration[iIndex] = 1.; + if(GetZsideFromHashedIndex(iIndex)>0) + h_scalib_EEP -> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); /// scalibration map for EE+ and EE- + else h_scalib_EEM-> Fill ( GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), theScalibration[iIndex] ); + + } + } + + /// ----------------- Calibration Loops -----------------------------// + for ( int iLoop = 0; iLoop < nLoops; iLoop++ ) { + + std::cout << "Starting iteration " << iLoop + 1 << std::endl; + + /// L3 numerator and denominator for EE+ and EE- + std::vector theNumerator_EEP(m_regions*2+1, 0.); + std::vector theDenominator_EEP(m_regions*2+1, 0.); + std::vector theNumerator_EEM(m_regions+1, 0.); + std::vector theDenominator_EEM(m_regions+1, 0.); + + ///==== build E/p distribution ele 1 and 2 + + BuildEoPeta_ele(iLoop,nentries,useW,useZ,theScalibration,isSaveEPDistribution,isR9selection,R9Min,isMCTruth,isfbrem); + + // define map with events + std::map >,int> eventsMap; + + /// Loop over events + std::cout << "Number of analyzed events = " << nentries << std::endl; + + for (Long64_t jentry=0; jentryGetEntry(jentry); + + bool skipEvent = false; + + if( isMCTruth == 0 ){ + + if(AcceptEventByRunAndLumiSection(runId,lumiId,jsonMap) == false) skipEvent = true; + + std::pair eventLSandID(lumiId,eventId); + std::pair > eventRUNandLSandID(runId,eventLSandID); + if( eventsMap[eventRUNandLSandID] == 1 ) skipEvent = true; + else eventsMap[eventRUNandLSandID] = 1; + } + + if( skipEvent == true ) continue; + + float pIn, FdiEta; + std::map map; + bool skipElectron=false; + + /// Only tight electron from W and Z, only Endcap + + if ( ele1_isEB == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + + /// SCL energy containment correction + FdiEta = ele1_scE/(ele1_scERaw+ele1_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0 ; + float E_seed = 0; + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + if(ele1_recHit_E -> at(iRecHit) > E_seed && ele1_recHit_laserCorr -> at(iRecHit)>0. && ele1_recHit_Alpha -> at(iRecHit)>0.){ + + E_seed=ele1_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele1_recHit_hashedIndex -> at(iRecHit); /// Seed infos + } + + } + + for (unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++ ) { + + float thisAlpha = 1.; + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele1_recHit_ietaORix->at(iRecHit)-ele1_recHit_ietaORix->at(iseed))<=1 && + fabs(ele1_recHit_iphiORiy->at(iRecHit)-ele1_recHit_iphiORiy->at(iseed))<=1 && ele1_recHit_laserCorr -> at(iRecHit)>0. && + ele1_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele1_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// MCTruth option + if(!isMCTruth) { + + pIn = ele1_tkP; + int regionId = templIndexEE(myTypeEE,ele1_eta,ele1_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele1_phi ); + } + else{ + pIn = ele1_E_true; + if(fabs(ele1_DR)>0.1) skipElectron = true; /// No macthing beetween gen ele and reco ele + } + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); + + if ( fabs(thisE/(ele1_tkP-ele1_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; /// Take the correct E/p pdf to weight events in the calib procedure + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele1_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele1_scEta) > 1.75 && fabs(ele1_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele1_scEta) > 2.00 && fabs(ele1_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele1_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele1_fbrem) > 0.4 && isfbrem == true ) skipElectron =true; + + if( thisE/(pIn-ele1_es) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-ele1_es) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ){ + + for( unsigned int iRecHit = 0; iRecHit < ele1_recHit_E->size(); iRecHit++){ + + int thisIndex = ele1_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + /// Fill the occupancy map JUST for the first Loop + if( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if ( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + if( iLoop > 0 ) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + + ///Use full statistic + if( splitStat == 0 ){ + + if(thisCaliBlock == 0){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.) / + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ){ + + if( thisCaliBlock == 0 ){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ){ + + if(thisCaliBlock == 0){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if(thisCaliBlock == 1){ + + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele1_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele1_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele1_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele1_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + ///Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-ele1_es)); + } + + skipElectron = false; + + /// Medium ele from Z only Endcap + if( ele2_isEB == 0 && ( useZ == 1 && isZ == 1 ) ){ + /// SCL energy containment correction + FdiEta = ele2_scE/(ele2_scERaw+ele2_es); + + float thisE = 0; + float thisE3x3 =0 ; + int iseed = 0 ; + int seed_hashedIndex = 0; + float E_seed = 0; + + + /// Cycle on the all the recHits of the Event: to get the old IC and the corrected SC energy + for(unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(ele2_recHit_laserCorr -> at(iRecHit)>0. && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + + if(ele2_recHit_E -> at(iRecHit) > E_seed){ + E_seed=ele2_recHit_E -> at(iRecHit); + iseed=iRecHit; + seed_hashedIndex=ele2_recHit_hashedIndex -> at(iRecHit); + } + } + + for (unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ + + float thisAlpha = 1.; + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + + if (iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + if(fabs(ele2_recHit_ietaORix->at(iRecHit)-ele2_recHit_ietaORix->at(iseed))<=1 && + fabs(ele2_recHit_iphiORiy->at(iRecHit)-ele2_recHit_iphiORiy->at(iseed))<=1 && ele2_recHit_laserCorr -> at(iRecHit)>0. + && ele2_recHit_Alpha -> at(iRecHit)>0.) + thisE3x3+=theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta*TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.); + } + + /// find the zside + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(ele2_recHit_hashedIndex -> at(iseed)) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int ix_seed = GetIxFromHashedIndex(seed_hashedIndex); + int iy_seed = GetIyFromHashedIndex(seed_hashedIndex); + int iz_seed = GetZsideFromHashedIndex(seed_hashedIndex); + int ir_seed = eRings -> GetEndcapRing(ix_seed,iy_seed,iz_seed); + + /// Option for MCTruth Analysis + if(!isMCTruth) { + pIn = ele2_tkP; + int regionId = templIndexEE(myTypeEE,ele2_eta,ele2_charge,thisE3x3/thisE); + pIn /= myMomentumScale[regionId] -> Eval( ele2_phi ); + } + else + { + pIn = ele2_E_true; + if(fabs(ele2_DR)>0.1) skipElectron = true ; /// No macthing beetween gen ele and reco ele + } + + TH1F* EoPHisto = hC_EoP_ir_ele->GetHisto(ir_seed); /// Use correct pdf for reweight events in the L3 procedure + + /// E/p and R9 selections + if ( fabs(thisE/(pIn-ele2_es) - 1) > 0.7 && isEPselection==true) skipElectron = true; + + /// R9 and fbrem selection + if( fabs(thisE3x3/thisE) < 0.80 && isR9selection == true && fabs(ele2_scEta) <= 1.75 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.88 && isR9selection == true && fabs(ele2_scEta) > 1.75 && fabs(ele2_scEta) <= 2.00 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.92 && isR9selection == true && fabs(ele2_scEta) > 2.00 && fabs(ele2_scEta) <= 2.15 ) skipElectron = true; + if( fabs(thisE3x3/thisE) < 0.94 && isR9selection == true && fabs(ele2_scEta) > 2.15 ) skipElectron = true; + + if( fabs(thisE3x3/thisE) < R9Min && isR9selection == true ) skipElectron = true; + + if( fabs(ele2_fbrem) > 0.4 && isfbrem == true) skipElectron =true; + + if( thisE/(pIn-ele2_es) < EoPHisto->GetXaxis()->GetXmin() || + thisE/(pIn-ele2_es) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron=true; + + if( !skipElectron ) + { + for( unsigned int iRecHit = 0; iRecHit < ele2_recHit_E->size(); iRecHit++ ){ + + int thisIndex = ele2_recHit_hashedIndex -> at(iRecHit); + float thisAlpha = 1.; + + /// Fill the occupancy map JUST for the first Loop + if ( iLoop == 0 ){ + h_occupancy_hashedIndex_EE -> Fill(thisIndex); + if( GetZsideFromHashedIndex(thisIndex) < 0 ) h_occupancy_EEM -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + else h_occupancy_EEP -> Fill(GetIxFromHashedIndex(thisIndex), GetIyFromHashedIndex(thisIndex) ); + } + + if(iLoop > 0) thisAlpha = h_Alpha_hashedIndex_EE -> GetBinContent(thisIndex+1); + + /// Use full statistic + if( splitStat == 0){ + if(thisCaliBlock == 0) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + + /// use evens + if( splitStat == 1 && jentry%2 == 0 ) + { + if( thisCaliBlock == 0 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + + if( thisCaliBlock == 1 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + + /// use odd + if( splitStat == -1 && jentry%2 != 0 ) + { + if(thisCaliBlock == 0) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEM[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin);} + + if( thisCaliBlock == 1 ) + { + int EoPbin = EoPHisto->FindBin(thisE/(pIn-ele2_es)); + theNumerator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*(pIn-ele2_es)/thisE*EoPHisto->GetBinContent(EoPbin); + theDenominator_EEP[thisIndex] += theScalibration[thisIndex]*ele2_recHit_E -> at(iRecHit)*FdiEta* + TMath::Power(ele2_recHit_laserCorr -> at(iRecHit),thisAlpha-1.)/ + thisE*EoPHisto->GetBinContent(EoPbin); + } + } + } + } + + //Fill EoP + if( thisCaliBlock != -1 ) hC_EoP -> Fill(iLoop, thisE/(pIn-ele2_es)); + } + } /// End Cycle on the events + + std::cout << ">>>>> [L3][endOfLoop] entering..." << std::endl; + + TH1F* auxiliary_Alpha_BTCP_EEM = new TH1F("auxiliary_Alpha_BTCP_EEM","auxiliary_Alpha_BTCP_EEM",400,0.,3.); + TH1F* auxiliary_Alpha_BTCP_EEP = new TH1F("auxiliary_Alpha_BTCP_EEP","auxiliary_Alpha_BTCP_EEP",400,0.,3.); + TH1F* auxiliary_Alpha_SIC_EEM = new TH1F("auxiliary_Alpha_SIC_EEM","auxiliary_Alpha_SIC_EEM",400,0.,3.); + TH1F* auxiliary_Alpha_SIC_EEP = new TH1F("auxiliary_Alpha_SIC_EEP","auxiliary_Alpha_SIC_EEP",400,0.,3.); + + TF1* f_BTCP_EEP = new TF1("f_BTCP_EEP","gaus",0.,3.); + TF1* f_BTCP_EEM = new TF1("f_BTCP_EEM","gaus",0.,3.); + TF1* f_SIC_EEP = new TF1("f_SIC_EEP","gaus",0.,3.); + TF1* f_SIC_EEM = new TF1("f_SIC_EEM","gaus",0.,3.); + + ///Fill the histo of IntercalibValues before the solve + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) > 0 ){ + + int thisCaliBlock = -1; + if( GetZsideFromHashedIndex(iIndex) < 0 ) thisCaliBlock = 0; + else thisCaliBlock = 1; + + float thisAlphaConstant = 1.; + float oldAlphaConstant = 1.; + if( iLoop > 0 ) oldAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); + + + if( thisCaliBlock == 0 && theDenominator_EEM[iIndex] != 0. ) thisAlphaConstant = theNumerator_EEM[iIndex] / theDenominator_EEM[iIndex]; + if( thisCaliBlock == 1 && theDenominator_EEP[iIndex] != 0. ) thisAlphaConstant = theNumerator_EEP[iIndex] / theDenominator_EEP[iIndex]; + + h_Alpha_hashedIndex_EE -> SetBinContent(iIndex+1, thisAlphaConstant*oldAlphaConstant); + + if(SicCrystal->isSic(GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex), GetZsideFromHashedIndex(iIndex))){ + if( thisCaliBlock == 0 ){ + + hC_AlphaValues_SIC_EEM -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_SIC_EEM -> Fill (iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_SIC_EEM->Fill(thisAlphaConstant); + } + if( thisCaliBlock == 1){ + hC_AlphaValues_SIC_EEP -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_SIC_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_SIC_EEP->Fill(thisAlphaConstant); + } + } + else{ + if( thisCaliBlock == 0 ){ + + hC_AlphaValues_BTCP_EEM -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_BTCP_EEM -> Fill (iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_BTCP_EEM->Fill(thisAlphaConstant); + } + if( thisCaliBlock == 1){ + hC_AlphaValues_BTCP_EEP -> Fill (iLoop, thisAlphaConstant); + hC_Alpha_BTCP_EEP -> Fill(iLoop, GetIxFromHashedIndex(iIndex), GetIyFromHashedIndex(iIndex),thisAlphaConstant*oldAlphaConstant); + + auxiliary_Alpha_BTCP_EEP->Fill(thisAlphaConstant); + } + } + + } + } + //******************************* EE- *************************** + + g_AlphameanVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEM->GetMean()); + g_AlphameanVsLoop_SIC_EEM -> SetPointError(iLoop, 0.,auxiliary_Alpha_SIC_EEM->GetMeanError()); + + g_AlpharmsVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEM -> GetRMS()); + g_AlpharmsVsLoop_SIC_EEM -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEM -> GetRMSError()); + + f_SIC_EEM -> SetParameters (auxiliary_Alpha_SIC_EEM->GetEntries(),auxiliary_Alpha_SIC_EEM->GetMean(),auxiliary_Alpha_SIC_EEM->GetRMS()); + f_SIC_EEM -> SetRange (auxiliary_Alpha_SIC_EEM->GetMean()-8*auxiliary_Alpha_SIC_EEM->GetRMS(),auxiliary_Alpha_SIC_EEM->GetMean()+ + 8*auxiliary_Alpha_SIC_EEM->GetRMS()); + + auxiliary_Alpha_SIC_EEM->Fit("f_SIC_EEM","QR"); + + g_AlphaSigmaVsLoop_SIC_EEM -> SetPoint(iLoop, iLoop, f_SIC_EEM -> GetParameter(2)); + g_AlphaSigmaVsLoop_SIC_EEM -> SetPointError(iLoop, 0., f_SIC_EEM -> GetParError(2)); + + g_AlphameanVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEM->GetMean()); + g_AlphameanVsLoop_BTCP_EEM -> SetPointError(iLoop, 0.,auxiliary_Alpha_BTCP_EEM->GetMeanError()); + + g_AlpharmsVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEM -> GetRMS()); + g_AlpharmsVsLoop_BTCP_EEM -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEM -> GetRMSError()); + + f_BTCP_EEM -> SetParameters (auxiliary_Alpha_BTCP_EEM->GetEntries(),auxiliary_Alpha_BTCP_EEM->GetMean(),auxiliary_Alpha_BTCP_EEM->GetRMS()); + f_BTCP_EEM -> SetRange (auxiliary_Alpha_BTCP_EEM->GetMean()-8*auxiliary_Alpha_BTCP_EEM->GetRMS(),auxiliary_Alpha_BTCP_EEM->GetMean()+ + 8*auxiliary_Alpha_BTCP_EEM->GetRMS()); + + auxiliary_Alpha_BTCP_EEM->Fit("f_BTCP_EEM","QR"); + + g_AlphaSigmaVsLoop_BTCP_EEM -> SetPoint(iLoop, iLoop, f_BTCP_EEM -> GetParameter(2)); + g_AlphaSigmaVsLoop_BTCP_EEM -> SetPointError(iLoop, 0., f_BTCP_EEM -> GetParError(2)); + + //******************************* EE+ *************************** + + g_AlphameanVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEP -> GetMean()); + g_AlphameanVsLoop_SIC_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEP -> GetMeanError()); + + g_AlpharmsVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_SIC_EEP -> GetRMS()); + g_AlpharmsVsLoop_SIC_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_SIC_EEP -> GetRMSError()); + + f_SIC_EEP -> SetParameters (auxiliary_Alpha_SIC_EEP->GetEntries(),auxiliary_Alpha_SIC_EEP->GetMean(),auxiliary_Alpha_SIC_EEP->GetRMS()); + f_SIC_EEP -> SetRange (auxiliary_Alpha_SIC_EEP->GetMean()-8*auxiliary_Alpha_SIC_EEP->GetRMS(),auxiliary_Alpha_SIC_EEP->GetMean()+ + 8*auxiliary_Alpha_SIC_EEP->GetRMS()); + + auxiliary_Alpha_SIC_EEP->Fit("f_SIC_EEP","QR"); + + g_AlphaSigmaVsLoop_SIC_EEP -> SetPoint(iLoop, iLoop, f_SIC_EEP -> GetParameter(2)); + g_AlphaSigmaVsLoop_SIC_EEP -> SetPointError(iLoop, 0., f_SIC_EEP -> GetParError(2)); + + g_AlphameanVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEP -> GetMean()); + g_AlphameanVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEP -> GetMeanError()); + + g_AlpharmsVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, auxiliary_Alpha_BTCP_EEP -> GetRMS()); + g_AlpharmsVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., auxiliary_Alpha_BTCP_EEP -> GetRMSError()); + + f_BTCP_EEP -> SetParameters (auxiliary_Alpha_BTCP_EEP->GetEntries(),auxiliary_Alpha_BTCP_EEP->GetMean(),auxiliary_Alpha_BTCP_EEP->GetRMS()); + f_BTCP_EEP -> SetRange (auxiliary_Alpha_BTCP_EEP->GetMean()-8*auxiliary_Alpha_BTCP_EEP->GetRMS(),auxiliary_Alpha_BTCP_EEP->GetMean()+ + 8*auxiliary_Alpha_BTCP_EEP->GetRMS()); + + auxiliary_Alpha_BTCP_EEP->Fit("f_BTCP_EEP","QR"); + + g_AlphaSigmaVsLoop_BTCP_EEP -> SetPoint(iLoop, iLoop, f_BTCP_EEP -> GetParameter(2)); + g_AlphaSigmaVsLoop_BTCP_EEP -> SetPointError(iLoop, 0., f_BTCP_EEP -> GetParError(2)); + + delete auxiliary_Alpha_SIC_EEP ; + delete auxiliary_Alpha_SIC_EEM ; + delete auxiliary_Alpha_BTCP_EEP ; + delete auxiliary_Alpha_BTCP_EEM ; + delete f_SIC_EEP; + delete f_SIC_EEM; + delete f_BTCP_EEP; + delete f_BTCP_EEM; + + //Alpha spread in each ring + std::map *histoTemp_BTCP_EEP = new std::map (); + std::map *histoTemp_BTCP_EEM = new std::map (); + std::map *histoTemp_SIC_EEP = new std::map (); + std::map *histoTemp_SIC_EEM = new std::map (); + + TString Name ; + + for ( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if ( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) == 0) continue; + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); + + if(SicCrystal->isSic(thisIx,thisIy,thisIz)){ + if(!((*histoTemp_SIC_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histoTemp_SIC_EEP_%d",thisIr); + (*histoTemp_SIC_EEP)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(!((*histoTemp_SIC_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histoTemp_SIC_EEM_%d",thisIr); + (*histoTemp_SIC_EEM)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Alpha value + + if(thisCaliBlock==0) (*histoTemp_SIC_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histoTemp_SIC_EEP)[thisIr]->Fill(thisAlphaConstant); + } + + else{ + if(!((*histoTemp_BTCP_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histoTemp_BTCP_EEP_%d",thisIr); + (*histoTemp_BTCP_EEP)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(!((*histoTemp_BTCP_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histoTemp_BTCP_EEM_%d",thisIr); + (*histoTemp_BTCP_EEM)[thisIr]= new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Alpha value + + if(thisCaliBlock==0) (*histoTemp_BTCP_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histoTemp_BTCP_EEP)[thisIr]->Fill(thisAlphaConstant); + } + + } + + + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_SIC_EEP)[iRing]) continue; + + TF1* funz_SIC_EEP = new TF1("funz_SIC_EEP","gaus",0.,3.); + + funz_SIC_EEP->SetParameters((*histoTemp_SIC_EEP)[iRing]->GetEntries(),(*histoTemp_SIC_EEP)[iRing]->GetMean(),(*histoTemp_SIC_EEP)[iRing]->GetRMS()); + funz_SIC_EEP->SetRange((*histoTemp_SIC_EEP)[iRing]->GetMean()-8*(*histoTemp_SIC_EEP)[iRing]->GetRMS(),(*histoTemp_SIC_EEP)[iRing]->GetMean() + +8*(*histoTemp_SIC_EEP)[iRing]->GetRMS()); + + (*histoTemp_SIC_EEP)[iRing]->Fit("funz_SIC_EEP","QR"); + + hC_AlphaSpreadVsLoop_SIC_EEP->SetBinContent(iLoop,iRing,funz_SIC_EEP->GetParameter(2)); + hC_AlphaSpreadVsLoop_SIC_EEP->SetBinError(iLoop,iRing,funz_SIC_EEP->GetParError(2)); + + delete funz_SIC_EEP; + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_BTCP_EEP)[iRing]) continue; + + TF1* funz_BTCP_EEP = new TF1("funz_BTCP_EEP","gaus",0.,3.); + + funz_BTCP_EEP->SetParameters((*histoTemp_BTCP_EEP)[iRing]->GetEntries(),(*histoTemp_BTCP_EEP)[iRing]->GetMean(),(*histoTemp_BTCP_EEP)[iRing]->GetRMS()); + funz_BTCP_EEP->SetRange((*histoTemp_BTCP_EEP)[iRing]->GetMean()-8*(*histoTemp_BTCP_EEP)[iRing]->GetRMS(),(*histoTemp_BTCP_EEP)[iRing]->GetMean() + +8*(*histoTemp_BTCP_EEP)[iRing]->GetRMS()); + + (*histoTemp_BTCP_EEP)[iRing]->Fit("funz_BTCP_EEP","QR"); + + hC_AlphaSpreadVsLoop_BTCP_EEP->SetBinContent(iLoop,iRing,funz_BTCP_EEP->GetParameter(2)); + hC_AlphaSpreadVsLoop_BTCP_EEP->SetBinError(iLoop,iRing,funz_BTCP_EEP->GetParError(2)); + + delete funz_BTCP_EEP; + } + + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_SIC_EEM)[iRing]) continue; + + TF1* funz_SIC_EEM = new TF1("funz_SIC_EEM","gaus",0.,3.); + funz_SIC_EEM->SetParameters((*histoTemp_SIC_EEM)[iRing]->GetEntries(),(*histoTemp_SIC_EEM)[iRing]->GetMean(),(*histoTemp_SIC_EEM)[iRing]->GetRMS()); + funz_SIC_EEM->SetRange((*histoTemp_SIC_EEM)[iRing]->GetMean()-8*(*histoTemp_SIC_EEM)[iRing]->GetRMS(),(*histoTemp_SIC_EEM)[iRing]->GetMean() + +8*(*histoTemp_SIC_EEM)[iRing]->GetRMS()); + + (*histoTemp_SIC_EEM)[iRing]->Fit("funz_SIC_EEM","QR"); + + hC_AlphaSpreadVsLoop_SIC_EEM->SetBinContent(iLoop,iRing,funz_SIC_EEM->GetParameter(2)); + hC_AlphaSpreadVsLoop_SIC_EEM->SetBinError(iLoop,iRing,funz_SIC_EEM->GetParError(2)); + delete funz_SIC_EEM; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + + if(!(*histoTemp_SIC_EEM)[iRing]) continue; + + TF1* funz_BTCP_EEM = new TF1("funz_BTCP_EEM","gaus",0.,3.); + funz_BTCP_EEM->SetParameters((*histoTemp_BTCP_EEM)[iRing]->GetEntries(),(*histoTemp_BTCP_EEM)[iRing]->GetMean(),(*histoTemp_BTCP_EEM)[iRing]->GetRMS()); + funz_BTCP_EEM->SetRange((*histoTemp_BTCP_EEM)[iRing]->GetMean()-8*(*histoTemp_BTCP_EEM)[iRing]->GetRMS(),(*histoTemp_BTCP_EEM)[iRing]->GetMean() + +8*(*histoTemp_BTCP_EEM)[iRing]->GetRMS()); + + (*histoTemp_BTCP_EEM)[iRing]->Fit("funz_BTCP_EEM","QR"); + + hC_AlphaSpreadVsLoop_BTCP_EEM->SetBinContent(iLoop,iRing,funz_BTCP_EEM->GetParameter(2)); + hC_AlphaSpreadVsLoop_BTCP_EEM->SetBinError(iLoop,iRing,funz_BTCP_EEM->GetParError(2)); + delete funz_BTCP_EEM; + + } + + for( std::map::const_iterator itrechit = histoTemp_SIC_EEM->begin(); itrechit !=histoTemp_SIC_EEM->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histoTemp_SIC_EEP->begin(); itrechit !=histoTemp_SIC_EEP->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histoTemp_BTCP_EEM->begin(); itrechit !=histoTemp_BTCP_EEM->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histoTemp_BTCP_EEP->begin(); itrechit !=histoTemp_BTCP_EEP->end(); itrechit++) delete itrechit->second; + + delete histoTemp_BTCP_EEP; + delete histoTemp_BTCP_EEM; + delete histoTemp_SIC_EEP; + delete histoTemp_SIC_EEM; + + + } /// End of Calibration Loops + + std::map *histo_SIC_EEP = new std::map(); + std::map *histo_SIC_EEM = new std::map(); + std::map *histo_BTCP_EEP = new std::map(); + std::map *histo_BTCP_EEM = new std::map(); + + TString Name ; + + ///Fill the histo of IntercalibValues after the loops at last step + for( int iIndex = 0; iIndex < kEEhalf*2; iIndex++ ){ + + if( h_occupancy_hashedIndex_EE -> GetBinContent(iIndex+1) == 0 ) continue; + + int thisCaliBlock = -1; + if (GetZsideFromHashedIndex(iIndex) < 0) thisCaliBlock = 0; + else thisCaliBlock = 1; + + int thisIx = GetIxFromHashedIndex(iIndex); + int thisIy = GetIyFromHashedIndex(iIndex); + int thisIz = GetZsideFromHashedIndex(iIndex); /// Ix, Iy and Iz info for each xtal + + int thisIr = eRings -> GetEndcapRing(thisIx,thisIy,thisIz); /// Endcap ring xtal belongs to + + float thisAlphaConstant = h_Alpha_hashedIndex_EE -> GetBinContent (iIndex+1); /// Final IC value + + if ( thisCaliBlock == 0 ) h_Alpha_EEM -> Fill (thisIx, thisIy, thisAlphaConstant); + else h_Alpha_EEP -> Fill (thisIx, thisIy, thisAlphaConstant); + + + if(SicCrystal->isSic(thisIx,thisIy,thisIz)){ + + if ( thisCaliBlock == 0 ) p_AlphaVsIeta_SIC_EEM -> Fill (thisIr,thisAlphaConstant); + else p_AlphaVsIeta_SIC_EEP -> Fill (thisIr,thisAlphaConstant); + + + if((!(*histo_SIC_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histo_SIC_EEP_%d",thisIr); + (*histo_SIC_EEP)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + if((!(*histo_SIC_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histo_SIC_EEM_%d",thisIr); + (*histo_SIC_EEM)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(thisCaliBlock==0) (*histo_SIC_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histo_SIC_EEP)[thisIr]->Fill(thisAlphaConstant); + } + else{ + + if ( thisCaliBlock == 0 ) p_AlphaVsIeta_BTCP_EEM -> Fill (thisIr,thisAlphaConstant); + else p_AlphaVsIeta_BTCP_EEP -> Fill (thisIr,thisAlphaConstant); + + if((!(*histo_BTCP_EEP)[thisIr]) && thisCaliBlock==1){ Name = Form("histo_BTCP_EEP_%d",thisIr); + (*histo_BTCP_EEP)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + if((!(*histo_BTCP_EEM)[thisIr]) && thisCaliBlock==0){ Name = Form("histo_BTCP_EEM_%d",thisIr); + (*histo_BTCP_EEM)[thisIr] = new TH1F(Name.Data(),Name.Data(),400,0.,3.); + } + + if(thisCaliBlock==0) (*histo_BTCP_EEM)[thisIr]->Fill(thisAlphaConstant); + else if(thisCaliBlock==1) (*histo_BTCP_EEP)[thisIr]->Fill(thisAlphaConstant); + } + + } + + // spread and mean value vs iRing + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_SIC_EEP)[iRing]) continue; + + TF1* f_SIC_EEP = new TF1("f_SIC_EEP","gaus",0.,3.); + f_SIC_EEP->SetParameters((*histo_SIC_EEP)[iRing]->GetEntries(),(*histo_SIC_EEP)[iRing]->GetMean(),(*histo_SIC_EEP)[iRing]->GetRMS()); + f_SIC_EEP->SetRange((*histo_SIC_EEP)[iRing]->GetMean()-8*(*histo_SIC_EEP)[iRing]->GetRMS(),(*histo_SIC_EEP)[iRing]->GetMean() + +8*(*histo_SIC_EEP)[iRing]->GetRMS()); + + (*histo_SIC_EEP)[iRing]->Fit("f_SIC_EEP","QR"); + + AlphaSpreadVsIeta_SIC_EEP->SetBinContent(iRing,f_SIC_EEP->GetParameter(2)); + AlphaSpreadVsIeta_SIC_EEP->SetBinError(iRing,f_SIC_EEP->GetParError(2)); + + delete f_SIC_EEP; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_BTCP_EEP)[iRing]) continue; + + TF1* f_BTCP_EEP = new TF1("f_BTCP_EEP","gaus",0.,3.); + f_BTCP_EEP->SetParameters((*histo_BTCP_EEP)[iRing]->GetEntries(),(*histo_BTCP_EEP)[iRing]->GetMean(),(*histo_BTCP_EEP)[iRing]->GetRMS()); + f_BTCP_EEP->SetRange((*histo_BTCP_EEP)[iRing]->GetMean()-8*(*histo_BTCP_EEP)[iRing]->GetRMS(),(*histo_BTCP_EEP)[iRing]->GetMean() + +8*(*histo_BTCP_EEP)[iRing]->GetRMS()); + + (*histo_BTCP_EEP)[iRing]->Fit("f_BTCP_EEP","QR"); + + AlphaSpreadVsIeta_BTCP_EEP->SetBinContent(iRing,f_BTCP_EEP->GetParameter(2)); + AlphaSpreadVsIeta_BTCP_EEP->SetBinError(iRing,f_BTCP_EEP->GetParError(2)); + + delete f_BTCP_EEP; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_SIC_EEM)[iRing]) continue; + + TF1* f_SIC_EEM = new TF1("f_SIC_EEM","gaus",0.,3.); + f_SIC_EEM->SetParameters((*histo_SIC_EEM)[iRing]->GetEntries(),(*histo_SIC_EEM)[iRing]->GetMean(),(*histo_SIC_EEM)[iRing]->GetRMS()); + f_SIC_EEM->SetRange((*histo_SIC_EEM)[iRing]->GetMean()-8*(*histo_SIC_EEM)[iRing]->GetRMS(),(*histo_SIC_EEM)[iRing]->GetMean() + +8*(*histo_SIC_EEM)[iRing]->GetRMS()); + + (*histo_SIC_EEM)[iRing]->Fit("f_SIC_EEM","QR"); + + AlphaSpreadVsIeta_SIC_EEM->SetBinContent(iRing,f_SIC_EEM->GetParameter(2)); + AlphaSpreadVsIeta_SIC_EEM->SetBinError(iRing,f_SIC_EEM->GetParError(2)); + + delete f_SIC_EEM; + + } + + for( unsigned int iRing = 0; iRingsize(); iRing++){ + if(!(*histo_BTCP_EEM)[iRing]) continue; + + TF1* f_BTCP_EEM = new TF1("f_BTCP_EEM","gaus",0.,3.); + f_BTCP_EEM->SetParameters((*histo_BTCP_EEM)[iRing]->GetEntries(),(*histo_BTCP_EEM)[iRing]->GetMean(),(*histo_BTCP_EEM)[iRing]->GetRMS()); + f_BTCP_EEM->SetRange((*histo_BTCP_EEM)[iRing]->GetMean()-8*(*histo_BTCP_EEM)[iRing]->GetRMS(),(*histo_BTCP_EEM)[iRing]->GetMean() + +8*(*histo_BTCP_EEM)[iRing]->GetRMS()); + + (*histo_BTCP_EEM)[iRing]->Fit("f_BTCP_EEM","QR"); + + AlphaSpreadVsIeta_BTCP_EEM->SetBinContent(iRing,f_BTCP_EEM->GetParameter(2)); + AlphaSpreadVsIeta_BTCP_EEM->SetBinError(iRing,f_BTCP_EEM->GetParError(2)); + + delete f_BTCP_EEM; + + } + + + for( std::map::const_iterator itrechit = histo_SIC_EEP->begin(); itrechit !=histo_SIC_EEP->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histo_SIC_EEM->begin(); itrechit !=histo_SIC_EEM->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histo_BTCP_EEP->begin(); itrechit !=histo_BTCP_EEP->end(); itrechit++) delete itrechit->second; + for( std::map::const_iterator itrechit = histo_BTCP_EEM->begin(); itrechit !=histo_BTCP_EEM->end(); itrechit++) delete itrechit->second; + + delete histo_SIC_EEP; + delete histo_SIC_EEM; + delete histo_BTCP_EEP; + delete histo_BTCP_EEM; +} + + +/// Save in the output +void XtalAlphaEE::saveHistos(TFile * f1){ + + f1->cd(); + + ///service histos + h_Alpha_hashedIndex_EE ->Write(); + h_occupancy_hashedIndex_EE ->Write(); + hC_EoP ->Write(*f1); + + ///EE+ + + hC_AlphaValues_SIC_EEP ->Write(*f1); + hC_AlphaSpreadVsLoop_SIC_EEP ->Write(*f1); + hC_Alpha_SIC_EEP ->Write("",*f1); + hC_AlphaValues_BTCP_EEP ->Write(*f1); + hC_AlphaSpreadVsLoop_BTCP_EEP ->Write(*f1); + hC_Alpha_BTCP_EEP ->Write("",*f1); + + h_Alpha_EEP ->Write(); + h_scalib_EEP ->Write(); + + h_occupancy_EEP ->Write(); + h_map_Dead_Channels_EEP ->Write(); + + p_AlphaVsIeta_SIC_EEP ->Write(); + AlphaSpreadVsIeta_SIC_EEP ->Write(); + + g_AlphameanVsLoop_SIC_EEP ->Write("g_AlphameanVsLoop_SIC_EEP"); + g_AlpharmsVsLoop_SIC_EEP ->Write("g_AlpharmsVsLoop_SIC_EEP"); + g_AlphaSigmaVsLoop_SIC_EEP ->Write("g_AlphaSigmaVsLoop_SIC_EEP"); + + p_AlphaVsIeta_BTCP_EEP ->Write(); + AlphaSpreadVsIeta_BTCP_EEP ->Write(); + + g_AlphameanVsLoop_BTCP_EEP ->Write("g_AlphameanVsLoop_BTCP_EEP"); + g_AlpharmsVsLoop_BTCP_EEP ->Write("g_AlpharmsVsLoop_BTCP_EEP"); + g_AlphaSigmaVsLoop_BTCP_EEP ->Write("g_AlphaSigmaVsLoop_BTCP_EEP"); + + ///EE- + + hC_AlphaValues_SIC_EEM ->Write(*f1); + hC_AlphaSpreadVsLoop_SIC_EEM ->Write(*f1); + hC_Alpha_SIC_EEM ->Write("",*f1); + hC_AlphaValues_BTCP_EEM ->Write(*f1); + hC_AlphaSpreadVsLoop_BTCP_EEM ->Write(*f1); + hC_Alpha_BTCP_EEM ->Write("",*f1); + + h_Alpha_EEM ->Write(); + h_scalib_EEM ->Write(); + + h_occupancy_EEM ->Write(); + h_map_Dead_Channels_EEM ->Write(); + + p_AlphaVsIeta_SIC_EEM ->Write(); + AlphaSpreadVsIeta_SIC_EEM ->Write(); + + g_AlphameanVsLoop_SIC_EEM ->Write("g_AlphameanVsLoop_SIC_EEM"); + g_AlpharmsVsLoop_SIC_EEM ->Write("g_AlpharmsVsLoop_SIC_EEM"); + g_AlphaSigmaVsLoop_SIC_EEM ->Write("g_AlphaSigmaVsLoop_SIC_EEM"); + + p_AlphaVsIeta_BTCP_EEM ->Write(); + AlphaSpreadVsIeta_BTCP_EEM ->Write(); + + g_AlphameanVsLoop_BTCP_EEM ->Write("g_AlphameanVsLoop_BTCP_EEM"); + g_AlpharmsVsLoop_BTCP_EEM ->Write("g_AlpharmsVsLoop_BTCP_EEM"); + g_AlphaSigmaVsLoop_BTCP_EEM ->Write("g_AlphaSigmaVsLoop_BTCP_EEM"); + + f1->Close(); + + return; +} + +/// Save E/p distributions +void XtalAlphaEE::saveEoPeta(TFile * f2){ + + f2->cd(); + + hC_EoP_ir_ele ->Write(*f2); + + f2->Close(); +} + +/// Acquire fake Dead Xtal in order to study the effect of IC near them +void XtalAlphaEE::AcquireDeadXtal(TString inputDeadXtal){ + + if(inputDeadXtal!="NULL") + { + std::ifstream DeadXtal (inputDeadXtal.Data(),std::ios::binary); + + std::string buffer; + int iX, iY ,iZ; + + while(!DeadXtal.eof()) + { + getline(DeadXtal,buffer); + std::stringstream line( buffer ); + line >> iX >> iY >>iZ ; + DeadXtal_HashedIndex.push_back(GetHashedIndexEE(iX,iY,iZ)) ; + + } + + sort(DeadXtal_HashedIndex.begin(), DeadXtal_HashedIndex.end()); + } + else{ + DeadXtal_HashedIndex.push_back(-9999); + } + +} +/// Check if the channel considered is in the list of dead or not +bool XtalAlphaEE::CheckDeadXtal(const int & iX, const int & iY, const int & iZ){ + + int hashed_Index; + hashed_Index = GetHashedIndexEE(iX,iY,iZ); + + std::vector::iterator iter = find(DeadXtal_HashedIndex.begin(),DeadXtal_HashedIndex.end(),hashed_Index); + + if(iter !=DeadXtal_HashedIndex.end()) + return true; + else return false; +} + diff --git a/EOverPCalibration/src/Zutils.cc b/EOverPCalibration/src/Zutils.cc new file mode 100644 index 00000000000..8c7b0581ddb --- /dev/null +++ b/EOverPCalibration/src/Zutils.cc @@ -0,0 +1,640 @@ +#include "../interface/Zutils.h" +#include +#include "TMath.h" +#include "TRandom3.h" +#include "TStyle.h" + +int nPoint; +double mZ_min, mZ_max ; +std::string energySC ; + +/*** breit-wigner ***/ +double breitWigner(double* x, double* par){ + //[0] = N + //[1] = mass + //[2] = width + + double xx = x[0]; + double M = par[1]; + double G = par[2]; + + double gamma = sqrt(M*M*(M*M+G*G)); + double norm =(2.*sqrt(2)*M*G*gamma)/(TMath::Pi()*sqrt(M*M+gamma)); + + return par[0]*norm / ( pow((xx*xx-M*M),2) + M*M*G*G ); +} + +/*** crystall ball with low tail ***/ +double crystalBallLow(double* x, double* par){ + //[0] = N + //[1] = mean + //[2] = sigma + //[3] = alpha + //[4] = n + + double xx = x[0]; + double mean = par[1]; + double sigma = par[2]; + double alpha = par[3]; + double n = par[4]; + + if( (xx-mean)/sigma <= -1.*fabs(alpha) ) { + double A = pow(n/fabs(alpha), n) * exp(-0.5 * TMath::Power(fabs(alpha),2)); + double B = n/fabs(alpha) - fabs(alpha); + return par[0] * A * pow((B - (xx-mean)/sigma), -1.*n); + } + + else{ + return par[0] * exp(-1. * (xx-mean)*(xx-mean) / (2*sigma*sigma) ); + } + +} + +/*** double crystall ball ***/ +double crystalBallLowHigh(double* x, double* par) +{ + //[0] = N + //[1] = mean + //[2] = sigma + //[3] = alpha + //[4] = n + //[5] = alpha2 + //[6] = n2 + //[7] = scale + + double xx = x[0] * par[7]; + double mean = par[1]; + double sigma = par[2]; + double alpha = par[3]; + double n = par[4]; + double alpha2 = par[5]; + double n2 = par[6]; + + if( (xx-mean)/sigma > fabs(alpha) ) + { + double A = pow(n/fabs(alpha), n) * exp(-0.5 * alpha*alpha); + double B = n/fabs(alpha) - fabs(alpha); + + return par[0] * par[7] * A * pow(B + (xx-mean)/sigma, -1.*n); + } + + else if( (xx-mean)/sigma < -1.*fabs(alpha2) ) + { + double A = pow(n2/fabs(alpha2), n2) * exp(-0.5 * alpha2*alpha2); + double B = n2/fabs(alpha2) - fabs(alpha2); + + return par[0] * par[7] * A * pow(B - (xx-mean)/sigma, -1.*n2); + } + + else + { + return par[0] * par[7] * exp(-1. * (xx-mean)*(xx-mean) / (2*sigma*sigma) ); + } + +} + +/*** breit-wigner convoluted with crystalBall ***/ +double breitWigner_crystalBallLow(double* x, double* par){ + //[0] = N + //[1] = b.w. - mass + //[2] = b.w. - width + //[3] = c.b. - mean + //[4] = c.b. - sigma + //[5] = c.b. - alpha + //[6] = c.b. - n + + double xx = x[0]; + double N = par[0]; + double M = par[1]; + double G = par[2]; + double mean = par[3]; + double sigma = par[4]; + double alpha = par[5]; + double n = par[6]; + + TF1* bw = new TF1("temp_bw",breitWigner,mZ_min,mZ_max,3); + bw -> FixParameter(0,1.); + bw -> FixParameter(1,M); + bw -> FixParameter(2,G); + + TF1* cb = new TF1("temp_cb",crystalBallLow,mZ_min,mZ_max,5); + + cb -> FixParameter(0,N); + cb -> FixParameter(1,mean); + cb -> FixParameter(2,sigma); + cb -> FixParameter(3,alpha); + cb -> FixParameter(4,n); + + double stepWidth = (mZ_max-mZ_min)/nPoint; + double val = 0.; + + for(int ibin = 0; ibin < nPoint; ++ibin){ + double yy = mZ_min+ibin*stepWidth; + val += bw->Eval(yy) * cb->Eval(xx-yy); + } + + delete bw; + delete cb; + return val; +} + +/*** Visible BwCB FWH estimation assumption the function is monotonic in the interval***/ +std::pair breitWigner_crystalBallLowFWHM(TF1* bwcb, const double &min,const double &max, const double &Precision,const int & maxCycle){ + +std::pair extreme ; +extreme.first = -99. ; extreme.second=-99.; + +std::cout<<" Entering "<GetMaximumX(); + +std::cout<<" xMax = "<GetMaximum(); + +std::cout<<" MAX = "< IntervalUp ; +IntervalUp.first = xMAX ; IntervalUp.second=max; + +std::pair IntervalDown ; +IntervalDown.first = min ; IntervalDown.second=xMAX; + +bool EndUp=false, EndDown=false; + +for(int icycle=0; icycleEval(IntervalDown.second)-bwcb->Eval(IntervalDown.first))<=Precision) EndDown = true; + +if(fabs(bwcb->Eval(IntervalUp.second)-bwcb->Eval(IntervalUp.first))<=Precision) EndUp = true; + +if(EndUp && EndDown) break; + +} + +extreme.first=(IntervalDown.second -IntervalDown.first )/2 +IntervalDown.first; +extreme.second=(IntervalUp.second -IntervalUp.first )/2 +IntervalUp.first; + +std::cout<<" extreme first = "<>>Zutils::DrawZPeak::draw peaks" << std::endl; + std::string h_mZ_DATA_Name = h_mZ_DATA->GetName(); + std::string h_mZ_MC_Name = h_mZ_MC->GetName(); + + TCanvas* c = new TCanvas(("c_mZ_DATA"+h_mZ_DATA_Name).c_str(),("mZ - "+h_mZ_DATA_Name).c_str(),0,0,600,600); + c -> cd(); + c -> SetGridx(); + c -> SetGridy(); + + c -> SetLeftMargin(0.15); + c -> SetRightMargin(0.15); + + char axisTitle[50]; + sprintf(axisTitle,"events / %.2e GeV/c^{2}",h_mZ_DATA->GetBinWidth(1)); + h_mZ_DATA -> Rebin(rebin); + h_mZ_DATA -> GetXaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetLabelFont(42); + h_mZ_DATA -> GetXaxis() -> SetTitleSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); + h_mZ_DATA -> GetYaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetYaxis() -> SetTitle(axisTitle); + + h_mZ_DATA -> SetLineWidth(2); + h_mZ_DATA -> SetLineColor(kGreen+2); + h_mZ_DATA -> SetMarkerColor(kBlack); + h_mZ_DATA -> SetMarkerStyle(20); + h_mZ_DATA -> SetMarkerSize(0.5); + h_mZ_DATA -> GetYaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> Draw("P"); + gPad->Update(); + + h_mZ_DATA -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_DATA->GetMaximum()); + gPad->Update(); + + TCanvas* c1 = new TCanvas(("c_mZ_MC"+h_mZ_MC_Name).c_str(),("mZ - "+h_mZ_MC_Name).c_str(),0,0,600,600); + c1 -> cd(); + c1 -> SetGridx(); + c1 -> SetGridy(); + + c1 -> SetLeftMargin(0.15); + c1 -> SetRightMargin(0.15); + + h_mZ_MC -> Rebin(rebin); + h_mZ_MC -> Scale(1.*h_mZ_DATA->GetEntries()/h_mZ_MC->GetEntries()); + h_mZ_MC -> GetXaxis() -> SetLabelSize(0.03); + h_mZ_MC -> GetXaxis() -> SetLabelFont(42); + h_mZ_MC -> GetXaxis() -> SetTitleSize(0.03); + h_mZ_MC -> GetXaxis() -> SetTitleOffset(1.5); + h_mZ_MC -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); + h_mZ_MC -> GetYaxis() -> SetLabelSize(0.03); + h_mZ_MC -> GetYaxis() -> SetTitleOffset(1.5); + h_mZ_MC -> GetYaxis() -> SetTitle(axisTitle); + + h_mZ_MC -> SetLineWidth(2); + h_mZ_MC -> SetLineColor(kRed+1); + h_mZ_MC -> SetMarkerColor(kBlack); + h_mZ_MC -> SetMarkerStyle(20); + h_mZ_MC -> SetMarkerSize(0.5); + h_mZ_MC -> Draw("P"); + gPad->Update(); + + h_mZ_MC -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_MC->GetMaximum()); + gPad->Update(); + + //---------- + // fit peaks + + std::cout << ">>>Zutils::DrawZPeak::fit peaks" << std::endl; + std::string funcNameDATA = "bw_cb_DATA_" + category +"_"+energySC; + std::string funcNameMC = "bw_cb_MC_" + category +"_"+energySC; + + if(category == "EE-EE" || category == "EEp" || category == "EEm" || category=="EE_R9_g" || category=="EE_R9_l" || category=="EE_Eta_l" || category=="EE_Eta_g" ){ + + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + + TFitResultPtr rpDATA; + int fStatusDATA; + do{ + SetParameterFunctionEE_EE(bw_cb_DATA, rand); + rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatusDATA = rpDATA; + } while(fStatusDATA!=0); + + bw_cb_DATA -> Draw("same"); + + + TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_MC -> SetNpx(10000); + bw_cb_MC -> SetLineWidth(2); + bw_cb_MC -> SetLineStyle(1); + bw_cb_MC -> SetLineColor(kRed+1); + c1->cd(); + + int fStatusMC; + TFitResultPtr rpMC; + do{ + + SetParameterFunctionEE_EE(bw_cb_MC, rand); + rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL"); + fStatusMC = rpMC; + std::cout<<" fStatus "< Draw("same"); + } + +if(category == "EB-EE" || category=="EB_R9_l"){ + + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rpDATA; + int fStatusDATA; + do{ + SetParameterFunctionEB_EE(bw_cb_DATA, rand); + rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatusDATA = rpDATA; + } while(fStatusDATA!=0); + + bw_cb_DATA -> Draw("same"); + + TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_MC -> SetNpx(10000); + bw_cb_MC -> SetLineWidth(2); + bw_cb_MC -> SetLineStyle(1); + bw_cb_MC -> SetLineColor(kRed+1); + c1->cd(); + + TFitResultPtr rpMC; + int fStatusMC; + do{ + SetParameterFunctionEB_EE(bw_cb_MC, rand); + rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL"); + fStatusMC = rpMC; + } while(fStatusMC!=0); + + bw_cb_MC -> Draw("same"); + } + +if(category == "EB-EB" || category == "EBp" || category == "EBm" || category=="EB_R9_g" || category=="EB_Eta_l"|| category=="EB_Eta_g"){ + + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + + TFitResultPtr rpDATA; + int fStatusDATA; + do{ + SetParameterFunctionEB_EB(bw_cb_DATA, rand); + rpDATA=h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatusDATA = rpDATA; + } while(fStatusDATA!=0); + + bw_cb_DATA -> Draw("same"); + + TF1* bw_cb_MC = new TF1(funcNameMC.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_MC -> SetNpx(10000); + bw_cb_MC -> SetLineWidth(2); + bw_cb_MC -> SetLineStyle(1); + bw_cb_MC -> SetLineColor(kRed+1); + c1->cd(); + + TFitResultPtr rpMC; + int fStatusMC; + do{ + SetParameterFunctionEB_EB(bw_cb_MC, rand); + rpMC=h_mZ_MC -> Fit(funcNameMC.c_str(),"SR0EWL+"); + fStatusMC = rpMC; + } while(fStatusMC!=0); + + bw_cb_MC -> Draw("same"); + + } + + // ------------------ + // get the statistics + + + TPaveStats* p_mZ_DATA = (TPaveStats*)(h_mZ_DATA->GetListOfFunctions()->FindObject("stats")); + p_mZ_DATA->SetX1NDC(0.69); + p_mZ_DATA->SetX2NDC(0.99); + p_mZ_DATA->SetY1NDC(0.69); + p_mZ_DATA->SetY2NDC(0.99); + p_mZ_DATA->SetTextColor(kGreen+2); + p_mZ_DATA->SetOptFit(0012); + p_mZ_DATA->Draw("same"); + + TPaveStats* p_mZ_MC = (TPaveStats*)(h_mZ_MC->GetListOfFunctions()->FindObject("stats")); + p_mZ_MC->SetX1NDC(0.69); + p_mZ_MC->SetX2NDC(0.99); + p_mZ_MC->SetY1NDC(0.69); + p_mZ_MC->SetY2NDC(0.99); + p_mZ_MC->SetTextColor(kRed+1); + p_mZ_MC->SetOptFit(0012); + p_mZ_MC->Draw("same"); + + + // --------------- + // print the plots + + c -> Print((h_mZ_DATA_Name+"_rerecoICHEP2012.png").c_str(),"png"); + c1 -> Print((h_mZ_MC_Name+"_MC_IC_v2.png").c_str(),"png"); + + delete c; + delete c1; +} + + +void BinnedFitZPeak(const std::string& category, const int& rebin, TH1F* h_mZ_DATA, + int nPoints, const double &min,const double &max,std::string energyType ){ + + nPoint = nPoints; + mZ_min = min; + mZ_max = max; + energySC = energyType ; + + TRandom3 * rand = new TRandom3(); + + //----------- + // draw peaks + std::cout << ">>>Zutils::DrawZPeak::draw peaks" << std::endl; + std::string h_mZ_DATA_Name = h_mZ_DATA->GetName(); + + TCanvas* c = new TCanvas(("c_mZ_DATA"+h_mZ_DATA_Name).c_str(),("mZ - "+h_mZ_DATA_Name).c_str(),0,0,600,600); + c -> cd(); + c -> SetGridx(); + c -> SetGridy(); + + c -> SetLeftMargin(0.15); + c -> SetRightMargin(0.15); + + char axisTitle[50]; + sprintf(axisTitle,"events / %.2e GeV/c^{2}",h_mZ_DATA->GetBinWidth(1)); + h_mZ_DATA -> Rebin(rebin); + h_mZ_DATA -> GetXaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetLabelFont(42); + h_mZ_DATA -> GetXaxis() -> SetTitleSize(0.03); + h_mZ_DATA -> GetXaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> GetXaxis() -> SetTitle(("m(e^{+}e^{-}) - "+category).c_str()); + h_mZ_DATA -> GetYaxis() -> SetLabelSize(0.03); + h_mZ_DATA -> GetYaxis() -> SetTitle(axisTitle); + + h_mZ_DATA -> SetLineWidth(2); + h_mZ_DATA -> SetLineColor(kGreen+2); + h_mZ_DATA -> SetMarkerColor(kBlack); + h_mZ_DATA -> SetMarkerStyle(20); + h_mZ_DATA -> SetMarkerSize(0.5); + h_mZ_DATA -> GetYaxis() -> SetTitleOffset(1.5); + h_mZ_DATA -> Draw("P"); + gPad->Update(); + + h_mZ_DATA -> GetYaxis() -> SetRangeUser(0.,1.05*h_mZ_DATA->GetMaximum()); + gPad->Update(); + + //---------- + // fit peaks + + std::cout << ">>>Zutils::DrawZPeak::fit peaks" << std::endl; + std::string funcNameDATA = "bw_cb_DATA_" + category+"_"+energyType; + + + if(category == "EE-EE" || category == "EEp" || category == "EEm" || category=="EE_R9_g" || category=="EE_R9_l" || category=="EE_Eta_l" || category=="EE_Eta_g" ){ + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rp; + int fStatus; + do{ + SetParameterFunctionEE_EE(bw_cb_DATA, rand); + rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatus = rp; + }while(fStatus!=0); + + bw_cb_DATA -> Draw("same"); + + } + +if(category == "EB-EE" || category=="EB_R9_l" ){ + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rp; + int fStatus; + do{ + SetParameterFunctionEB_EE(bw_cb_DATA, rand); + rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatus = rp; + }while(fStatus!=0); + bw_cb_DATA -> Draw("same"); + } + +if(category == "EB-EB" || category == "EBp" || category == "EBm" || category=="EB_R9_g" || category=="EB_Eta_l" || category=="EB_Eta_g"){ + TF1* bw_cb_DATA = new TF1(funcNameDATA.c_str(),breitWigner_crystalBallLow,mZ_min,mZ_max,7); + bw_cb_DATA -> SetNpx(10000); + bw_cb_DATA -> SetLineColor(kGreen+2); + bw_cb_DATA -> SetLineWidth(2); + bw_cb_DATA -> SetLineStyle(1); + c->cd(); + TFitResultPtr rp; + int fStatus; + do{ + SetParameterFunctionEB_EB(bw_cb_DATA, rand); + rp = h_mZ_DATA -> Fit(funcNameDATA.c_str(),"SR0EL"); + fStatus = rp; + }while(fStatus!=0); + bw_cb_DATA -> Draw("same"); + } + + + // ------------------ + // get the statistics + + + TPaveStats* p_mZ_DATA = (TPaveStats*)(h_mZ_DATA->GetListOfFunctions()->FindObject("stats")); + p_mZ_DATA->SetX1NDC(0.69); + p_mZ_DATA->SetX2NDC(0.99); + p_mZ_DATA->SetY1NDC(0.69); + p_mZ_DATA->SetY2NDC(0.99); + p_mZ_DATA->SetTextColor(kGreen+2); + p_mZ_DATA->SetOptFit(0012); + p_mZ_DATA->Draw("same"); + + // --------------- + // print the plots + + c -> Print((h_mZ_DATA_Name+"_DATA_DATA_rerecoICHEP2012_v2.png").c_str(),"png"); + + delete c; +} + +void SetParameterFunctionEE_EE(TF1* bw_cb, TRandom3 * rand){ + + // Z invariant Mass + bw_cb -> SetParName(1,"M_{Z}"); + bw_cb -> FixParameter(1,91.18); + // Z FWHM + bw_cb -> SetParName(2,"#Gamma_{Z}"); + bw_cb -> FixParameter(2,2.4952); + // Normalization + bw_cb -> SetParName(0,"N"); + bw_cb -> SetParameter(0,rand->Uniform(10.,20.)); + // Delta M + bw_cb -> SetParName(3,"#Deltam"); + bw_cb -> SetParameter(3,rand->Uniform(0.,1.5)); + // Sigma CB + bw_cb -> SetParName(4,"#sigma_{CB}"); + bw_cb -> SetParameter(4,rand->Uniform(2.,3.5)); + // Alpha CB + bw_cb -> SetParName(5,"#alpha"); + bw_cb -> SetParameter(5,rand->Uniform(1.,2.)); + // n parameter CB + bw_cb -> SetParName(6,"n"); + bw_cb -> SetParameter(6,rand->Uniform(1.5,4.)); +} + +void SetParameterFunctionEB_EE(TF1* bw_cb, TRandom3 * rand){ + + // Z invariant Mass + bw_cb -> SetParName(1,"M_{Z}"); + bw_cb -> FixParameter(1,91.18); + // Z FWHM + bw_cb -> SetParName(2,"#Gamma_{Z}"); + bw_cb -> FixParameter(2,2.4952); + // Normalization + bw_cb -> SetParName(0,"N"); + bw_cb -> SetParameter(0,rand->Uniform(300.,600.)); + // Delta M + bw_cb -> SetParName(3,"#Deltam"); + bw_cb -> SetParameter(3,rand->Uniform(0.9,1.5)); + // Sigma CB + bw_cb -> SetParName(4,"#sigma_{CB}"); + bw_cb -> SetParameter(4,rand->Uniform(2.,3.)); + // Alpha CB + bw_cb -> SetParName(5,"#alpha"); + bw_cb -> SetParameter(5,rand->Uniform(0.7,1.4)); + // n parameter CB + bw_cb -> SetParName(6,"n"); + bw_cb -> SetParameter(6,rand->Uniform(2.,4.)); +} + +void SetParameterFunctionEB_EB(TF1* bw_cb, TRandom3 * rand){ + + // Z invariant Mass + bw_cb -> SetParName(1,"M_{Z}"); + bw_cb -> FixParameter(1,91.18); + // Z FWHM + bw_cb -> SetParName(2,"#Gamma_{Z}"); + bw_cb -> FixParameter(2,2.4952); + // Normalization + bw_cb -> SetParName(0,"N"); + bw_cb -> SetParameter(0,rand->Uniform(300.,500.)); + // Delta M + bw_cb -> SetParName(3,"#Deltam"); + bw_cb -> SetParameter(3,rand->Uniform(-0.5,0.7)); + // Sigma CB + bw_cb -> SetParName(4,"#sigma_{CB}"); + bw_cb -> SetParameter(4,rand->Uniform(0.7,1.6)); + // Alpha CB + bw_cb -> SetParName(5,"#alpha"); + bw_cb -> SetParameter(5,rand->Uniform(1.,1.9)); + // n parameter CB + bw_cb -> SetParName(6,"n"); + bw_cb -> SetParameter(6,rand->Uniform(1.5,3.7)); +} diff --git a/EOverPCalibration/src/geometryUtils.cc b/EOverPCalibration/src/geometryUtils.cc new file mode 100644 index 00000000000..155b76e722a --- /dev/null +++ b/EOverPCalibration/src/geometryUtils.cc @@ -0,0 +1,256 @@ +#include "../interface/geometryUtils.h" + +// --- EE --- +// default constructor, reading the map from file +TEndcapRegions::TEndcapRegions() +{ + //initializing the matrix + for(int ii=0; ii<100; ++ii) + for(int jj=0; jj<100; ++jj) + { + iEndcapRing[ii][jj][-1] = -1; + iEndcapRing[ii][jj][0] = -1; + iEndcapRing[ii][jj][+1] = -1; + iLMR[ii][jj][0] = -1; + iLMR[ii][jj][1] = -1; + } + FILE *fRing; + fRing = fopen("eeregions.dat","r"); + std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; + int ix,iy,iz,ir,lmr; + while(fscanf(fRing,"(%d,%d,%d) %d %d\n",&ix,&iy,&iz,&lmr,&ir) !=EOF ) { + iEndcapRing[ix-1][iy-1][iz] = ir; + iLMR[ix-1][iy-1][iz] = lmr; + } + return; +} + +//dtor +TEndcapRegions::~TEndcapRegions() { return;} + + + + +//methods +int TEndcapRegions::GetNRegions(const std::string& type, const int nRings) +{ + if( type == "LMR" ) return 38; + if( type == "RING" && nRings == 0 ) return 78; + if( type == "RING" ) return 2*nRings; + + return -1; +} + +int TEndcapRegions::GetRegionId(const int ix, const int iy, const int iz, const std::string& type) +{ + int iSide = iz; + if (iSide<0) iSide=0; + if( type == "LMR" ) + { + return iLMR[ix-1][iy-1][iSide] + 19*iSide; + } + if(type == "RING") + { + if(iSide == 0) + return -(iEndcapRing[ix-1][iy-1][iz]); + if(iSide > 0) + return iEndcapRing[ix-1][iy-1][iz]; + } + return -1; +} + +int TEndcapRegions::GetEndcapRing(const int ix, const int iy, const int iz, const int nRings ){ + int iSide = iz; + float ringWidth = int(39./nRings)+1; + if(nRings == 0) + { + if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; + else return iEndcapRing[ix-1][iy-1][iSide]; + } + else + { + if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; + else + { + if(iSide < 0) return -int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + if(iSide > 0) return int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + } + } + return -1; +} + +int TEndcapRegions::GetEndcapIeta(const int ix, const int iy, const int iz, const std::string& type, const int nRings){ + int iSide = iz; + int iEtaOffset = 86*iz; + int iEta = iEtaOffset + iz*iEndcapRing[ix-1][iy-1][iSide]; + float ringWidth = int(39./nRings); + if(type == "RING") + { + if(iEndcapRing[ix-1][iy-1][iSide] == -1) return -999; + else + { + if(iSide < 0) return -int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + if(iSide > 0) return int(((float)iEndcapRing[ix-1][iy-1][iSide]/(float)ringWidth)); + } + } + return iEta; +} + + + + +// --- EB --- +// default constructor (NEEDED FOR INPUT REGIONS FROM EXTERNAL FILE) +TBarrelRegions::TBarrelRegions() { + //initializing the matrix + for(int ii=0; ii<171; ++ii) + for(int kk=0; kk<360; ++kk) + { + iBarrelRings[ii][kk] = -1; + iLMR[ii][kk] = -1; + iSM[ii][kk] = -1; + iTT[ii][kk] = -1; + } + + FILE *fRegion; + fRegion = fopen("ebregions.dat","r"); + std::cout << "Inizializing barrel geometry from: ebregions.dat" << std::endl; + + int ieta,iphi,sm,tt,lmr; + std::map dummyMap; + while(fscanf(fRegion,"(%d ,%d) %d %d %d\n",&ieta,&iphi,&sm,&tt,&lmr) !=EOF ) + { + iBarrelRings[ieta+85][iphi-1] = ieta+85; + iLMR[ieta+85][iphi-1] = lmr; + iSM[ieta+85][iphi-1] = sm; + iTT[ieta+85][iphi-1] = tt; + + //inverse map containing the ietaMin in that region + if(dummyMap.find(lmr) == dummyMap.end()) dummyMap[lmr] = abs(ieta); + else if(abs(ieta) < dummyMap[lmr]) dummyMap[lmr] = abs(ieta); + } + + int counter=0; + std::map dummyMapEtaCount; + for(std::map::const_iterator itr = dummyMap.begin(); itr != dummyMap.end(); ++itr) + { + if(dummyMapEtaCount.find(itr->second) == dummyMapEtaCount.end()) + { + dummyMapEtaCount[itr->second] = counter; + ++counter; + } + LmrEtaMap[itr->first] = dummyMapEtaCount[itr->second]; + } + + + return; +} + +//dtor +TBarrelRegions::~TBarrelRegions() +{ + return; +} + + + +//methods +int TBarrelRegions::GetNRegions(const std::string& type) +{ + if( type == "ALL" ) return 1; + if( type == "SM" ) return 36; + if( type == "LMR" ) return 324; + if( type == "TT" ) return 2448; + if( type == "RING" ) return 171; + + return -1; +} + +int TBarrelRegions::GetRegionId(const int iEta, const int iPhi, const std::string& type) +{ + if( (iEta < -85) || (iEta == 0) || (iEta > 85) ) return -1; + if( (iPhi < 1) || (iPhi > 360) ) return -1; + + if( type == "ALL" ) + { + return 0; + } + if( type == "SM" ) + { + return iSM[iEta+85][iPhi-1]; + } + if( type == "LMR" ) + { + return iLMR[iEta+85][iPhi-1]; + } + if( type == "TT" ) + { + return iTT[iEta+85][iPhi-1]; + } + if( type == "RING" ) + { + return iBarrelRings[iEta+85][iPhi-1]; + } + return -1; +} + + + +// ---- geometry functions ---- +int TBarrelRegions::GetNRegionsIeta(const std::string& type) +{ + if( type == "SM" ) return 36; + if( type == "LMR" ) return 5; + if( type == "TT" ) return 17; + if( type == "RING" ) return 171; + + + return -1; +} + + +int TBarrelRegions::GetRegionIdIeta(const int& regionId, const std::string& type) +{ + if( type == "LMR" ) + { + return ( LmrEtaMap[regionId] ); + } + if( type == "SM" ) + { + return regionId; + } + if( type == "RING" ) + { + return regionId; + } + + return -1; + + //-------------------------------- + + // int nPhiRegions; + // float regionEtaWidth; + // float regionPhiWidth; + + // if( type == "SM" ) + // { + // nPhiRegions = 18; + // regionEtaWidth = 85.; + // regionPhiWidth = 20.; + // } + // if( type == "TT" ) + // { + // nPhiRegions = 72; + // regionEtaWidth = 5.; + // regionPhiWidth = 5.; + // } + + // iPhi = regionPhiWidth/2. + regionPhiWidth * (regionId % nPhiRegions); + // iEta = regionEtaWidth/2. + regionPhiWidth * (regionId / nPhiRegions); + + // iPhi += 1.; + // if( iEta < 75 ) iEta = -1. * (iEta+1.); + // if( iEta >= 75 ) iEta -= 74.; +} + + diff --git a/EOverPCalibration/src/setTDRStyle.cc b/EOverPCalibration/src/setTDRStyle.cc new file mode 100755 index 00000000000..5818b23dc26 --- /dev/null +++ b/EOverPCalibration/src/setTDRStyle.cc @@ -0,0 +1,168 @@ +#include "../interface/setTDRStyle.h" + + + +void setTDRStyle() +{ + TStyle* tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); + + // For the canvas: + tdrStyle->SetCanvasBorderMode(0); + tdrStyle->SetCanvasColor(kWhite); + tdrStyle->SetCanvasDefH(600); //Height of canvas + tdrStyle->SetCanvasDefW(700); //Width of canvas + //tdrStyle->SetCanvasDefW(800); //Width of canvas + tdrStyle->SetCanvasDefX(0); //POsition on screen + tdrStyle->SetCanvasDefY(0); + + // For the Pad: + tdrStyle->SetPadBorderMode(0); + // tdrStyle->SetPadBorderSize(Width_t size = 1); + tdrStyle->SetPadColor(kWhite); + tdrStyle->SetPadGridX(false); + tdrStyle->SetPadGridY(false); + tdrStyle->SetGridColor(0); + tdrStyle->SetGridStyle(3); + tdrStyle->SetGridWidth(1); + + // For the frame: + tdrStyle->SetFrameBorderMode(0); + tdrStyle->SetFrameBorderSize(1); + tdrStyle->SetFrameFillColor(0); + tdrStyle->SetFrameFillStyle(0); + tdrStyle->SetFrameLineColor(1); + tdrStyle->SetFrameLineStyle(1); + tdrStyle->SetFrameLineWidth(1); + + // For the histo: + // tdrStyle->SetHistFillColor(1); + // tdrStyle->SetHistFillStyle(0); + tdrStyle->SetHistLineColor(1); + tdrStyle->SetHistLineStyle(0); + tdrStyle->SetHistLineWidth(1); + // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); + // tdrStyle->SetNumberContours(Int_t number = 20); + + tdrStyle->SetEndErrorSize(2); + // tdrStyle->SetErrorMarker(20); + //tdrStyle->SetErrorX(0.); + + tdrStyle->SetMarkerStyle(20); + + //For the fit/function: + tdrStyle->SetOptFit(0); + tdrStyle->SetFitFormat("5.4g"); + tdrStyle->SetFuncColor(2); + tdrStyle->SetFuncStyle(1); + tdrStyle->SetFuncWidth(1); + + //For the date: + tdrStyle->SetOptDate(0); + // tdrStyle->SetDateX(Float_t x = 0.01); + // tdrStyle->SetDateY(Float_t y = 0.01); + + // For the statistics box: + tdrStyle->SetOptFile(0); + tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); + tdrStyle->SetStatColor(kWhite); + tdrStyle->SetStatFont(42); + tdrStyle->SetStatFontSize(0.025); + tdrStyle->SetStatTextColor(1); + tdrStyle->SetStatFormat("6.4g"); + tdrStyle->SetStatBorderSize(1); + tdrStyle->SetStatH(0.1); + tdrStyle->SetStatW(0.15); + // tdrStyle->SetStatStyle(Style_t style = 1001); + // tdrStyle->SetStatX(Float_t x = 0); + // tdrStyle->SetStatY(Float_t y = 0); + + // Margins: + tdrStyle->SetPadTopMargin(0.05); + tdrStyle->SetPadBottomMargin(0.13); + tdrStyle->SetPadLeftMargin(0.13); + tdrStyle->SetPadRightMargin(0.17); + //tdrStyle->SetPadRightMargin(0.25); + + // For the Global title: + tdrStyle->SetOptTitle(0); + tdrStyle->SetTitleFont(42); + tdrStyle->SetTitleColor(1); + tdrStyle->SetTitleTextColor(1); + tdrStyle->SetTitleFillColor(10); + tdrStyle->SetTitleFontSize(0.05); + // tdrStyle->SetTitleH(0); // Set the height of the title box + // tdrStyle->SetTitleW(0); // Set the width of the title box + // tdrStyle->SetTitleX(0); // Set the position of the title box + // tdrStyle->SetTitleY(0.985); // Set the position of the title box + // tdrStyle->SetTitleStyle(Style_t style = 1001); + // tdrStyle->SetTitleBorderSize(2); + + // For the axis titles: + tdrStyle->SetTitleColor(1, "XYZ"); + tdrStyle->SetTitleFont(42, "XYZ"); + tdrStyle->SetTitleSize(0.05, "XYZ"); + // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? + // tdrStyle->SetTitleYSize(Float_t size = 0.02); + tdrStyle->SetTitleXOffset(1.20); + tdrStyle->SetTitleYOffset(1.40); + tdrStyle->SetTitleOffset(1.30, "Z"); + // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset + + // For the axis labels: + tdrStyle->SetLabelColor(1, "XYZ"); + tdrStyle->SetLabelFont(42, "XYZ"); + tdrStyle->SetLabelOffset(0.005, "XYZ"); + tdrStyle->SetLabelSize(0.04, "XYZ"); + + // For the axis: + tdrStyle->SetAxisColor(1, "XYZ"); + tdrStyle->SetStripDecimals(kTRUE); + tdrStyle->SetTickLength(0.03, "XYZ"); + tdrStyle->SetNdivisions(510, "XYZ"); + tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame + tdrStyle->SetPadTickY(1); + + // Change for log plots: + tdrStyle->SetOptLogx(0); + tdrStyle->SetOptLogy(0); + tdrStyle->SetOptLogz(0); + + // Postscript options: + tdrStyle->SetPaperSize(20.,20.); + // tdrStyle->SetLineScalePS(Float_t scale = 3); + // tdrStyle->SetLineStyleString(Int_t i, const char* text); + // tdrStyle->SetHeaderPS(const char* header); + // tdrStyle->SetTitlePS(const char* pstitle); + + //tdrStyle->SetBarOffset(Float_t baroff = 0.5); + //tdrStyle->SetBarWidth(Float_t barwidth = 0.5); + //tdrStyle->SetPaintTextFormat(const char* format = "g"); + tdrStyle->SetPalette(1); + //tdrStyle->SetTimeOffset(Double_t toffset); + //tdrStyle->SetHistMinimumZero(kTRUE); + + + + const Int_t NRGBs = 5; + const Int_t NCont = 255; + + Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; + Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; + Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; + Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + tdrStyle->SetNumberContours(NCont); + + //TLatex *lab = new TLatex(0.70,0.85, "CMS 2008"); + //lab->SetNDC(); + //lab->SetTextFont(42); + //lab->SetTextSize(0.05); + //lab->Draw("same"); + + + + gROOT -> ForceStyle(); + + tdrStyle->cd(); +} From aa09d1ac29a896bff8b4fc7229b2d11a10f83554 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 21 Sep 2014 18:36:17 +0200 Subject: [PATCH 452/475] E/P calibration area --- NtuplePackage/BuildFile.xml | 7 + NtuplePackage/interface/ConfigFileLine.h | 77 ++ NtuplePackage/interface/ConfigParser.h | 95 +++ NtuplePackage/interface/LHEReader.h | 74 ++ NtuplePackage/interface/LinkDef.h | 19 + NtuplePackage/interface/h2Chain.h | 37 + NtuplePackage/interface/hChain.h | 46 ++ NtuplePackage/interface/ntpleUtils.h | 51 ++ NtuplePackage/interface/readJSONFile.h | 23 + NtuplePackage/interface/setTDRStyle.h | 15 + NtuplePackage/interface/treeReader.h | 70 ++ NtuplePackage/obj/mydict.cc | 858 +++++++++++++++++++++++ NtuplePackage/obj/mydict.h | 114 +++ NtuplePackage/src/ConfigFileLine.cc | 106 +++ NtuplePackage/src/LHEReader.cc | 135 ++++ NtuplePackage/src/Makefile | 127 ++++ NtuplePackage/src/h2Chain.cc | 153 ++++ NtuplePackage/src/hChain.cc | 282 ++++++++ NtuplePackage/src/ntpleUtils.cc | 214 ++++++ NtuplePackage/src/readJSONFile.cc | 111 +++ NtuplePackage/src/setTDRStyle.cc | 203 ++++++ NtuplePackage/src/treeReader.cc | 691 ++++++++++++++++++ 22 files changed, 3508 insertions(+) create mode 100644 NtuplePackage/BuildFile.xml create mode 100644 NtuplePackage/interface/ConfigFileLine.h create mode 100644 NtuplePackage/interface/ConfigParser.h create mode 100644 NtuplePackage/interface/LHEReader.h create mode 100644 NtuplePackage/interface/LinkDef.h create mode 100644 NtuplePackage/interface/h2Chain.h create mode 100644 NtuplePackage/interface/hChain.h create mode 100644 NtuplePackage/interface/ntpleUtils.h create mode 100644 NtuplePackage/interface/readJSONFile.h create mode 100755 NtuplePackage/interface/setTDRStyle.h create mode 100644 NtuplePackage/interface/treeReader.h create mode 100644 NtuplePackage/obj/mydict.cc create mode 100644 NtuplePackage/obj/mydict.h create mode 100644 NtuplePackage/src/ConfigFileLine.cc create mode 100644 NtuplePackage/src/LHEReader.cc create mode 100644 NtuplePackage/src/Makefile create mode 100644 NtuplePackage/src/h2Chain.cc create mode 100644 NtuplePackage/src/hChain.cc create mode 100644 NtuplePackage/src/ntpleUtils.cc create mode 100644 NtuplePackage/src/readJSONFile.cc create mode 100755 NtuplePackage/src/setTDRStyle.cc create mode 100644 NtuplePackage/src/treeReader.cc diff --git a/NtuplePackage/BuildFile.xml b/NtuplePackage/BuildFile.xml new file mode 100644 index 00000000000..39cdb79b8a2 --- /dev/null +++ b/NtuplePackage/BuildFile.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/NtuplePackage/interface/ConfigFileLine.h b/NtuplePackage/interface/ConfigFileLine.h new file mode 100644 index 00000000000..39b5b7733bf --- /dev/null +++ b/NtuplePackage/interface/ConfigFileLine.h @@ -0,0 +1,77 @@ +// H4ConfigFileLine.h +// +// A class representing a (continued) line in the configuration +// file, that is a pair of an option name and a (list of) value(s) +// +// last change : $Date: 2012/02/12 20:14:50 $ +// by : $Author: rgerosa $ +// + +#ifndef CONFIGFILELINE_H +#define CONFIGFILELINE_H + +#include +#include + +class ConfigFileLine { + public: + + //! Constructor with name of the option and a single option value (no list!) + ConfigFileLine(const std::string &option, const std::string &value=""); + + //! Destructor: Does currently nothing + virtual ~ConfigFileLine(); + + //! Append the option name of another ConfigFileLine as value + void append(const ConfigFileLine &other); + + //! Append the values of another ConfigFileLine + void appendList(const ConfigFileLine &other); + + //! Check whether name of option is "name" + bool isOption(const std::string &name) const{ + return name==option; + } + + //! Check whether the option line has a name, i.e. is defined + bool isDefined() const{ + return option.length(); + } + + //! Return the list of configuration values + std::list getValues() const{ + // This operation is somewhat time-consuming! + return values; + } + + //! Sets the list of configuration values + void setValues(const std::list &v){ + values=v; + } + + //! Get option name + const std::string &getOptionName() const{ + return option; + } + + //! Sets the scope by prepending "scope":: to the option name + void setScope(const std::string &scope); + + //! Print the contents of the rule to stdout + void print() const; + + //! stream operator + friend std::ostream & operator<< (std::ostream & out, const ConfigFileLine & line) ; + + private: + + std::string option; //!< The name of the option + std::list values; //!< The list of option values + + //! For convinience a ValueIterator type is defined which walks along + //! the list of option strings + typedef std::list::const_iterator ValueIterator; + +}; + +#endif // #ifndef CONFIGFILELINE diff --git a/NtuplePackage/interface/ConfigParser.h b/NtuplePackage/interface/ConfigParser.h new file mode 100644 index 00000000000..02d25c089ee --- /dev/null +++ b/NtuplePackage/interface/ConfigParser.h @@ -0,0 +1,95 @@ +// ConfigParser.h +// +// A class representing the configuration of the analysis program, +// gathered from the configuration file and the command line +// +// last change : $Date: 2012/02/12 20:14:50 $ +// by : $Author: rgerosa $ +// + +#ifndef CONFIGPARSER_H +#define CONFIGPARSER_H + +#include "ConfigFileLine.h" +#include "TROOT.h" +#include "TObject.h" + +#include "stdio.h" +#include +#include + +class ConfigParser { + public: + + + FILE *config_file; + + // Constructor which does basically nothing + ConfigParser(); + + // Initialize configuration using the command line arguments + bool init(const char *fileName=0); + + // Destructor: Deletes the entries in the list of configuration file lines + virtual ~ConfigParser(); + + // Append the option name of another ConfigFileLine as value + void appendLine(ConfigFileLine *line); + + // Deletes a line from the already parsed configuration file lines + bool deleteLine(const char *name, const char *scope=0); + + // Override an option + bool overrideOption(const char *name, std::list &values, + const char *scope = 0); + + // Is this option defined? + bool isDefined(const char *name) const; + + // Read Integer Option + int readIntOption(const char *name) const throw(const char *); + + // Read Double Option + double readDoubleOption(const char *name) const throw(const char *); + + // Read Float Option + float readFloatOption(const char *name) const throw(const char *); + + // Read bool Option + const bool readBoolOption(const char *name) const throw(const char *); + + // Read Integer Option + const char *readStringOption(const char *name) const throw(const char *); + + // Read Integer List Option + std::vector readIntListOption(const char *name) const throw(const char *); + + // Read Double List Option + std::vector readDoubleListOption(const char *name) + const throw(const char *); + + // Read String List Option + std::vector readStringListOption(const char *name) + const throw(const char *); + + // Print all options + void print() const; + + //! stream operator + friend std::ostream & operator<< (std::ostream & out, const ConfigParser & conf) ; + + private: + + std::list configLines; //!< A list of configuration file lines + + //! For convinience a ValueIterator type is defined which walks along + //! the list of option strings + typedef std::list::const_iterator LineIterator; + +}; + +// Do not forget to define the global variables so that rootcint +// produces the necessary stub +R__EXTERN ConfigParser *gConfigParser; + +#endif // #ifndef CONFIGPARSER_H diff --git a/NtuplePackage/interface/LHEReader.h b/NtuplePackage/interface/LHEReader.h new file mode 100644 index 00000000000..776fdb4975e --- /dev/null +++ b/NtuplePackage/interface/LHEReader.h @@ -0,0 +1,74 @@ +#ifndef LHEReader_h +#define LHEReader_h + +#include +#include +#include +#include +#include + + + +class LHEReader +{ + public: + + //! ctor + LHEReader(const std::string& LHEFileName); + + //! dtor + ~LHEReader(); + + //! methods + bool GetNextEvent(); + void PrintEvent(); + + int GetNUP() { return NUP; }; + int GetIDPRUP() { return IDPRUP; }; + float GetXWGTUP() { return XWGTUP; }; + float GetSCALUP() { return SCALUP; }; + float GetAQEDUP() { return AQEDUP; }; + float GetAQCDUP() { return AQCDUP; }; + + std::vector GetIDUP() { return IDUP; }; + std::vector GetISTUP() { return ISTUP; }; + std::vector GetMOTH1UP() { return MOTH1UP; }; + std::vector GetMOTH2UP() { return MOTH2UP; }; + std::vector GetICOL1UP() { return ICOL1UP; }; + std::vector GetICOL2UP() { return ICOL2UP; }; + std::vector GetPXUP() { return PXUP; }; + std::vector GetPYUP() { return PYUP; }; + std::vector GetPZUP() { return PZUP; }; + std::vector GetPEUP() { return PEUP; }; + std::vector GetPMUP() { return PMUP; }; + std::vector GetVTIMUP() { return VTIMUP; }; + std::vector GetSPINUP() { return SPINUP; }; + + + + private: + + int NUP; + int IDPRUP; + float XWGTUP; + float SCALUP; + float AQEDUP; + float AQCDUP; + + std::ifstream* m_LHEFile; + std::vector IDUP; + std::vector ISTUP; + std::vector MOTH1UP; + std::vector MOTH2UP; + std::vector ICOL1UP; + std::vector ICOL2UP; + std::vector PXUP; + std::vector PYUP; + std::vector PZUP; + std::vector PEUP; + std::vector PMUP; + std::vector VTIMUP; + std::vector SPINUP; +}; + +#endif diff --git a/NtuplePackage/interface/LinkDef.h b/NtuplePackage/interface/LinkDef.h new file mode 100644 index 00000000000..f66d3f12402 --- /dev/null +++ b/NtuplePackage/interface/LinkDef.h @@ -0,0 +1,19 @@ +#ifndef ROOT_TREE_VECTOR_LINKDEF_H +#define ROOT_TREE_VECTOR_LINKDEF_H 1 + +#include "Math/Vector4D.h" + +#ifdef __CINT__ + +#pragma link off all classes; +#pragma link off all function; + +#pragma link C++ class std::vector; +#pragma link C++ function deltaEta (const double&, const double&); +#pragma link C++ function deltaPhi (const double&, const double&); +#pragma link C++ function deltaR (const double&, const double&, const double&, const double&); + +#endif + +#endif + diff --git a/NtuplePackage/interface/h2Chain.h b/NtuplePackage/interface/h2Chain.h new file mode 100644 index 00000000000..a12aaf41e3f --- /dev/null +++ b/NtuplePackage/interface/h2Chain.h @@ -0,0 +1,37 @@ +#ifndef h2Chain_h +#define h2Chain_h + +#include "TROOT.h" +#include "TH1.h" +#include "TH2.h" +#include "TFile.h" +#include "THStack.h" +//#include "TCanvas.h" +#include "TPad.h" + +#include + + +struct h2Chain +{ + h2Chain (TString baseName, TString baseTitle, + int nbinsx, double minx, double maxx, + int nbinsy, double miny, double maxy, int NUM) ; + ~h2Chain () ; + + void SetColors (std::vector colors) ; + void Fill (int i, double valx, double valy) ; + void Fill (int i, double valx, double valy, double weight) ; + // void Print (bool isLog = false, int rebinx = 1, int rebiny = 1) ; + // void PrintEach () ; + void Scale (int index, double factor) ; + void Write (const std::string& dirName, TFile & outputFile) ; + + private : + + TString m_baseName ; + std::vector m_histos ; + +} ; + +#endif diff --git a/NtuplePackage/interface/hChain.h b/NtuplePackage/interface/hChain.h new file mode 100644 index 00000000000..05baba5f1f3 --- /dev/null +++ b/NtuplePackage/interface/hChain.h @@ -0,0 +1,46 @@ +#ifndef hChain_h +#define hChain_h + +#include "TROOT.h" +#include "TH1.h" +#include "TH2.h" +#include "TFile.h" +#include "THStack.h" +#include "TCanvas.h" +#include "TNtuple.h" + +#include + + +struct hChain +{ + hChain (TString baseName, TString baseTitle, + int nbins, double min, double max, int NUM) ; + virtual ~hChain (); + + void SetColors (std::vector colors) ; + void Fill (int i, double val) ; + double GetEffectiveEntries(int index); + TH1F* GetHisto (int index); + void SetBinContent (int i, int bin, double val) ; + void SetBinError (int i, int bin, double val) ; + void Print (bool isLog = false, int rebin = 1, TString altName = "default") ; + void PrintEach (bool isLog = false, int rebin = 1) ; + void Normalize (int index) ; + void Scale (int index, double factor) ; + void Reset(); + void Write (TFile & outputFile) ; + void Write (const std::string& dirName, TFile & outputFile) ; + unsigned int Size() { return m_histos.size(); }; + + + private : + + TString m_baseName ; + std::vector m_histos ; + + double findNMin () ; + double findNMax () ; +} ; + +#endif diff --git a/NtuplePackage/interface/ntpleUtils.h b/NtuplePackage/interface/ntpleUtils.h new file mode 100644 index 00000000000..e5c14d844ad --- /dev/null +++ b/NtuplePackage/interface/ntpleUtils.h @@ -0,0 +1,51 @@ +#ifndef ntpleUtils_h +#define ntpleUtils_h + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "TFile.h" +#include "TH1F.h" +#include "TChain.h" +#include "TVector3.h" +#include "Math/Vector3D.h" +#include "Math/Vector4D.h" +#include "Math/Boost.h" + + + +bool maggiore(double i, double j); + + + +/** get the number of events from a list of files */ +std::map GetTotalEvents(const std::string& histoName, const std::string& inputFileList); +TH1F* GetTotalHisto(const std::string& histoName, const std::string& inputFileList); +std::map GetBinLabels(const std::string& histoName, const std::string& inputFileList); + +/** fill a chain from a list of files */ +bool FillChain(TChain& chain, const std::string& inputFileList); + + +/** compute delta phi */ +double deltaPhi (const double& phi1, const double& phi2); + +/** compute delta eta */ +double deltaEta (const double& eta1, const double& eta2); + +/** compute delta R */ +double deltaR (const double& eta1, const double& phi1, + const double& eta2, const double& phi2); + + + +/** print 4-vector */ +void Print4V(const ROOT::Math::XYZTVector& p); + +#endif diff --git a/NtuplePackage/interface/readJSONFile.h b/NtuplePackage/interface/readJSONFile.h new file mode 100644 index 00000000000..34e29f6f744 --- /dev/null +++ b/NtuplePackage/interface/readJSONFile.h @@ -0,0 +1,23 @@ +#ifndef readJSONFile_h +#define readJSONFile_h + +#include +#include +#include +#include +#include +#include +#include + + + + + +std::map > > + readJSONFile(const std::string& inFileName); + +bool AcceptEventByRunAndLumiSection(const int& runId, const int& lumiId, + std::map > >& jsonMap); + + +#endif diff --git a/NtuplePackage/interface/setTDRStyle.h b/NtuplePackage/interface/setTDRStyle.h new file mode 100755 index 00000000000..3da88767dd1 --- /dev/null +++ b/NtuplePackage/interface/setTDRStyle.h @@ -0,0 +1,15 @@ +#ifndef setTDRStyle_h +#define setTDRStyle_h + +#include + +#include "TStyle.h" +#include "TColor.h" + + + +void setTDRStyle(); + +int getColor(const int& i); + +#endif diff --git a/NtuplePackage/interface/treeReader.h b/NtuplePackage/interface/treeReader.h new file mode 100644 index 00000000000..3c4ea2b2f14 --- /dev/null +++ b/NtuplePackage/interface/treeReader.h @@ -0,0 +1,70 @@ +#ifndef treeReader_h +#define treeReader_h + +#include +#include +#include +#include + +#include "TFile.h" +#include "TTree.h" +#include "TMath.h" +#include "Math/Vector4D.h" +#include "Math/Vector3D.h" +#include "TBranch.h" +#include "TBranchElement.h" +#include "TLeaf.h" + + +class treeReader +{ + public: + + treeReader (TTree *, bool verbosity = false) ; + ~treeReader () ; + + void GetEntry (int iEvent) {m_tree->GetEntry (iEvent) ; } ; + int GetEntries () {return m_tree->GetEntries () ; } ; + + std::vector* Get3V (const std::string &name); + std::vector* Get4V (const std::string &name); + std::vector* GetDouble(const std::string &name); + std::vector* GetFloat (const std::string &name); + std::vector* GetInt (const std::string &name); + std::vector* GetBool (const std::string &name); + std::vector* GetString(const std::string &name); + + ROOT::Math::XYZVector* get3V (const std::string &name); + ROOT::Math::XYZTVector* get4V (const std::string &name); + double* getDouble(const std::string &name); + float* getFloat (const std::string &name); + int* getInt (const std::string &name); + bool* getBool (const std::string &name); + std::string* getString(const std::string &name); + + private: + + std::map * > m_3Vvectors ; + std::map * > m_4Vvectors ; + std::map * > m_Dvectors ; + std::map * > m_Fvectors ; + std::map * > m_Ivectors ; + std::map * > m_Bvectors ; + std::map * > m_Svectors ; + + std::map k_3Vvectors ; + std::map k_4Vvectors ; + std::map k_Dvectors ; + std::map k_Fvectors ; + std::map k_Ivectors ; + std::map k_Bvectors ; + std::map k_Svectors ; + + + TTree * m_tree ; + bool m_verbosity ; + +} ; + +#endif + diff --git a/NtuplePackage/obj/mydict.cc b/NtuplePackage/obj/mydict.cc new file mode 100644 index 00000000000..bdb8aec6c9c --- /dev/null +++ b/NtuplePackage/obj/mydict.cc @@ -0,0 +1,858 @@ +// +// File generated by rootcint at Wed Jun 5 10:42:56 2013 + +// Do NOT change. Changes will be lost next time file is generated +// + +#define R__DICTIONARY_FILENAME dOdOdIobjdImydict +#include "RConfig.h" //rootcint 4834 +#if !defined(R__ACCESS_IN_SYMBOL) +//Break the privacy of classes -- Disabled for the moment +#define private public +#define protected public +#endif + +// Since CINT ignores the std namespace, we need to do so in this file. +namespace std {} using namespace std; +#include "mydict.h" + +#include "TCollectionProxyInfo.h" +#include "TClass.h" +#include "TBuffer.h" +#include "TMemberInspector.h" +#include "TError.h" + +#ifndef G__ROOT +#define G__ROOT +#endif + +#include "RtypesImp.h" +#include "TIsAProxy.h" +#include "TFileMergeInfo.h" + +// START OF SHADOWS + +namespace ROOT { + namespace Shadow { + } // of namespace Shadow +} // of namespace ROOT +// END OF SHADOWS + +namespace ROOT { + void vectorlEfloatgR_ShowMembers(void *obj, TMemberInspector &R__insp); + static void vectorlEfloatgR_Dictionary(); + static void *new_vectorlEfloatgR(void *p = 0); + static void *newArray_vectorlEfloatgR(Long_t size, void *p); + static void delete_vectorlEfloatgR(void *p); + static void deleteArray_vectorlEfloatgR(void *p); + static void destruct_vectorlEfloatgR(void *p); + + // Function generating the singleton type initializer + static TGenericClassInfo *GenerateInitInstanceLocal(const vector*) + { + vector *ptr = 0; + static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(vector),0); + static ::ROOT::TGenericClassInfo + instance("vector", -2, "vector.dll", 0, + typeid(vector), DefineBehavior(ptr, ptr), + 0, &vectorlEfloatgR_Dictionary, isa_proxy, 0, + sizeof(vector) ); + instance.SetNew(&new_vectorlEfloatgR); + instance.SetNewArray(&newArray_vectorlEfloatgR); + instance.SetDelete(&delete_vectorlEfloatgR); + instance.SetDeleteArray(&deleteArray_vectorlEfloatgR); + instance.SetDestructor(&destruct_vectorlEfloatgR); + instance.AdoptCollectionProxyInfo(TCollectionProxyInfo::Generate(TCollectionProxyInfo::Pushback< vector >())); + return &instance; + } + // Static variable to force the class initialization + static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstanceLocal((const vector*)0x0); R__UseDummy(_R__UNIQUE_(Init)); + + // Dictionary for non-ClassDef classes + static void vectorlEfloatgR_Dictionary() { + ::ROOT::GenerateInitInstanceLocal((const vector*)0x0)->GetClass(); + } + +} // end of namespace ROOT + +namespace ROOT { + // Wrappers around operator new + static void *new_vectorlEfloatgR(void *p) { + return p ? ::new((::ROOT::TOperatorNewHelper*)p) vector : new vector; + } + static void *newArray_vectorlEfloatgR(Long_t nElements, void *p) { + return p ? ::new((::ROOT::TOperatorNewHelper*)p) vector[nElements] : new vector[nElements]; + } + // Wrapper around operator delete + static void delete_vectorlEfloatgR(void *p) { + delete ((vector*)p); + } + static void deleteArray_vectorlEfloatgR(void *p) { + delete [] ((vector*)p); + } + static void destruct_vectorlEfloatgR(void *p) { + typedef vector current_t; + ((current_t*)p)->~current_t(); + } +} // end of namespace ROOT for class vector + +/******************************************************** +* ../obj/mydict.cc +* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED +* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). +* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. +********************************************************/ + +#ifdef G__MEMTEST +#undef malloc +#undef free +#endif + +#if defined(__GNUC__) && __GNUC__ >= 4 && ((__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >= 1) || (__GNUC_MINOR__ >= 3)) +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + +extern "C" void G__cpp_reset_tagtablemydict(); + +extern "C" void G__set_cpp_environmentmydict() { + G__cpp_reset_tagtablemydict(); +} +#include +extern "C" int G__cpp_dllrevmydict() { return(30051515); } + +/********************************************************* +* Member function Interface Method +*********************************************************/ + +/* Setting up global function */ +static int G__mydict__0_2602(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) +{ + G__letdouble(result7, 100, (double) deltaPhi(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__mydict__0_2603(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) +{ + G__letdouble(result7, 100, (double) deltaEta(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]))); + return(1 || funcname || hash || result7 || libp) ; +} + +static int G__mydict__0_2604(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) +{ + G__letdouble(result7, 100, (double) deltaR(*(double*) G__Doubleref(&libp->para[0]), *(double*) G__Doubleref(&libp->para[1]) +, *(double*) G__Doubleref(&libp->para[2]), *(double*) G__Doubleref(&libp->para[3]))); + return(1 || funcname || hash || result7 || libp) ; +} + + +/********************************************************* +* Member function Stub +*********************************************************/ + +/********************************************************* +* Global function Stub +*********************************************************/ + +/********************************************************* +* Get size of pointer to member function +*********************************************************/ +class G__Sizep2memfuncmydict { + public: + G__Sizep2memfuncmydict(): p(&G__Sizep2memfuncmydict::sizep2memfunc) {} + size_t sizep2memfunc() { return(sizeof(p)); } + private: + size_t (G__Sizep2memfuncmydict::*p)(); +}; + +size_t G__get_sizep2memfuncmydict() +{ + G__Sizep2memfuncmydict a; + G__setsizep2memfunc((int)a.sizep2memfunc()); + return((size_t)a.sizep2memfunc()); +} + + +/********************************************************* +* virtual base class offset calculation interface +*********************************************************/ + + /* Setting up class inheritance */ + +/********************************************************* +* Inheritance information setup/ +*********************************************************/ +extern "C" void G__cpp_setup_inheritancemydict() { + + /* Setting up class inheritance */ +} + +/********************************************************* +* typedef information setup/ +*********************************************************/ +extern "C" void G__cpp_setup_typetablemydict() { + + /* Setting up typedef entry */ + G__search_typename2("value_type",102,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("pointer",70,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_pointer",70,-1,256,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reference",102,-1,1,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_reference",102,-1,257,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("size_type",107,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("difference_type",108,-1,0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_iterator",117,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator),256,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("const_reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("list",117,G__get_linked_tagnum(&G__mydictLN_listlEstringcOallocatorlEstringgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("iterator",117,G__get_linked_tagnum(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("list",117,G__get_linked_tagnum(&G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TVectorT",117,G__get_linked_tagnum(&G__mydictLN_TVectorTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TVectorT",117,G__get_linked_tagnum(&G__mydictLN_TVectorTlEdoublegR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTBase",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTBaselEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTBase",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTBaselEdoublegR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixT",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTRow_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTRow_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTColumn_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTColumn_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTDiag_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTDiag_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTFlat_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTFlat_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSub_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSub_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseRow_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseRow_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseDiag_const",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseDiag_constlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTRow",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTRowlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTColumn",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTColumnlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTDiag",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTDiaglEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTFlat",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTFlatlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSub",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSublEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseRow",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseRowlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TMatrixTSparseDiag",117,G__get_linked_tagnum(&G__mydictLN_TMatrixTSparseDiaglEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TElementActionT",117,G__get_linked_tagnum(&G__mydictLN_TElementActionTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("TElementPosActionT",117,G__get_linked_tagnum(&G__mydictLN_TElementPosActionTlEfloatgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map > >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,allocator > > >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,allocator > >,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector,ROOT::Math::DefaultCoordinateSystemTag> >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("reverse_iterator",117,G__get_linked_tagnum(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR)); + G__setnewtype(-1,NULL,0); + G__search_typename2("vector > >",117,G__get_linked_tagnum(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >,allocator > > >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >,allocator > > >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map,ROOT::Math::DefaultCoordinateSystemTag>*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*>",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >*,less >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); + G__search_typename2("map >",117,G__get_linked_tagnum(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR),0,-1); + G__setnewtype(-1,NULL,0); +} + +/********************************************************* +* Data Member information setup/ +*********************************************************/ + + /* Setting up class,struct,union tag member variable */ +extern "C" void G__cpp_setup_memvarmydict() { +} +/*********************************************************** +************************************************************ +************************************************************ +************************************************************ +************************************************************ +************************************************************ +************************************************************ +***********************************************************/ + +/********************************************************* +* Member function information setup for each class +*********************************************************/ + +/********************************************************* +* Member function information setup +*********************************************************/ +extern "C" void G__cpp_setup_memfuncmydict() { +} + +/********************************************************* +* Global variable information setup for each class +*********************************************************/ +static void G__cpp_setup_global0() { + + /* Setting up global variables */ + G__resetplocal(); + +} + +static void G__cpp_setup_global1() { +} + +static void G__cpp_setup_global2() { +} + +static void G__cpp_setup_global3() { +} + +static void G__cpp_setup_global4() { + + G__resetglobalenv(); +} +extern "C" void G__cpp_setup_globalmydict() { + G__cpp_setup_global0(); + G__cpp_setup_global1(); + G__cpp_setup_global2(); + G__cpp_setup_global3(); + G__cpp_setup_global4(); +} + +/********************************************************* +* Global function information setup for each class +*********************************************************/ +static void G__cpp_setup_func0() { + G__lastifuncposition(); + +} + +static void G__cpp_setup_func1() { +} + +static void G__cpp_setup_func2() { +} + +static void G__cpp_setup_func3() { +} + +static void G__cpp_setup_func4() { +} + +static void G__cpp_setup_func5() { +} + +static void G__cpp_setup_func6() { +} + +static void G__cpp_setup_func7() { +} + +static void G__cpp_setup_func8() { +} + +static void G__cpp_setup_func9() { +} + +static void G__cpp_setup_func10() { +} + +static void G__cpp_setup_func11() { +} + +static void G__cpp_setup_func12() { +} + +static void G__cpp_setup_func13() { +} + +static void G__cpp_setup_func14() { +} + +static void G__cpp_setup_func15() { +} + +static void G__cpp_setup_func16() { +} + +static void G__cpp_setup_func17() { +} + +static void G__cpp_setup_func18() { +} + +static void G__cpp_setup_func19() { +} + +static void G__cpp_setup_func20() { +} + +static void G__cpp_setup_func21() { +} + +static void G__cpp_setup_func22() { +} + +static void G__cpp_setup_func23() { +} + +static void G__cpp_setup_func24() { +} + +static void G__cpp_setup_func25() { + G__memfunc_setup("deltaPhi", 811, G__mydict__0_2602, 100, -1, -1, 0, 2, 1, 1, 0, +"d - - 11 - phi1 d - - 11 - phi2", (char*) NULL +, (void*) NULL, 0); + G__memfunc_setup("deltaEta", 804, G__mydict__0_2603, 100, -1, -1, 0, 2, 1, 1, 0, +"d - - 11 - eta1 d - - 11 - eta2", (char*) NULL +, (void*) NULL, 0); + G__memfunc_setup("deltaR", 604, G__mydict__0_2604, 100, -1, -1, 0, 4, 1, 1, 0, +"d - - 11 - eta1 d - - 11 - phi1 " +"d - - 11 - eta2 d - - 11 - phi2", (char*) NULL +, (void*) NULL, 0); +} + +static void G__cpp_setup_func26() { +} + +static void G__cpp_setup_func27() { +} + +static void G__cpp_setup_func28() { + + G__resetifuncposition(); +} + +extern "C" void G__cpp_setup_funcmydict() { + G__cpp_setup_func0(); + G__cpp_setup_func1(); + G__cpp_setup_func2(); + G__cpp_setup_func3(); + G__cpp_setup_func4(); + G__cpp_setup_func5(); + G__cpp_setup_func6(); + G__cpp_setup_func7(); + G__cpp_setup_func8(); + G__cpp_setup_func9(); + G__cpp_setup_func10(); + G__cpp_setup_func11(); + G__cpp_setup_func12(); + G__cpp_setup_func13(); + G__cpp_setup_func14(); + G__cpp_setup_func15(); + G__cpp_setup_func16(); + G__cpp_setup_func17(); + G__cpp_setup_func18(); + G__cpp_setup_func19(); + G__cpp_setup_func20(); + G__cpp_setup_func21(); + G__cpp_setup_func22(); + G__cpp_setup_func23(); + G__cpp_setup_func24(); + G__cpp_setup_func25(); + G__cpp_setup_func26(); + G__cpp_setup_func27(); + G__cpp_setup_func28(); +} + +/********************************************************* +* Class,struct,union,enum tag information setup +*********************************************************/ +/* Setup class/struct taginfo */ +G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator = { "vector >::iterator" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_listlEstringcOallocatorlEstringgRsPgR = { "list >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR = { "iterator" , 115 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEintcOallocatorlEintgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR = { "list >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TVectorTlEfloatgR = { "TVectorT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TVectorTlEdoublegR = { "TVectorT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTBaselEfloatgR = { "TMatrixTBase" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTBaselEdoublegR = { "TMatrixTBase" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR = { "vector >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR = { "reverse_iterator >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TElementActionTlEfloatgR = { "TElementActionT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TElementPosActionTlEfloatgR = { "TElementPosActionT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTlEfloatgR = { "TMatrixT" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTRow_constlEfloatgR = { "TMatrixTRow_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTRowlEfloatgR = { "TMatrixTRow" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTDiag_constlEfloatgR = { "TMatrixTDiag_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTColumn_constlEfloatgR = { "TMatrixTColumn_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTFlat_constlEfloatgR = { "TMatrixTFlat_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSub_constlEfloatgR = { "TMatrixTSub_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseRow_constlEfloatgR = { "TMatrixTSparseRow_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseDiag_constlEfloatgR = { "TMatrixTSparseDiag_const" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTColumnlEfloatgR = { "TMatrixTColumn" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTDiaglEfloatgR = { "TMatrixTDiag" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTFlatlEfloatgR = { "TMatrixTFlat" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSublEfloatgR = { "TMatrixTSub" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseRowlEfloatgR = { "TMatrixTSparseRow" , 99 , -1 }; +G__linked_taginfo G__mydictLN_TMatrixTSparseDiaglEfloatgR = { "TMatrixTSparseDiag" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR = { "vector,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR = { "reverse_iterator,allocator > >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR = { "map,allocator > >,less,allocator,allocator > > > > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR = { "vector,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR = { "reverse_iterator,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR = { "vector >,allocator > > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR = { "reverse_iterator >,allocator > > >::iterator>" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR = { "map,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*,less,allocator,ROOT::Math::DefaultCoordinateSystemTag>,allocator,ROOT::Math::DefaultCoordinateSystemTag> > >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR = { "map >,allocator > > >*,less,allocator >,allocator > > >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR = { "map,ROOT::Math::DefaultCoordinateSystemTag>*,less,allocator,ROOT::Math::DefaultCoordinateSystemTag>*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR = { "map >*,less,allocator >*> > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; +G__linked_taginfo G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR = { "map,allocator > >" , 99 , -1 }; + +/* Reset class/struct taginfo */ +extern "C" void G__cpp_reset_tagtablemydict() { + G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_listlEstringcOallocatorlEstringgRsPgR.tagnum = -1 ; + G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR.tagnum = -1 ; + G__mydictLN_vectorlEintcOallocatorlEintgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR.tagnum = -1 ; + G__mydictLN_TVectorTlEfloatgR.tagnum = -1 ; + G__mydictLN_TVectorTlEdoublegR.tagnum = -1 ; + G__mydictLN_TMatrixTBaselEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTBaselEdoublegR.tagnum = -1 ; + G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_TElementActionTlEfloatgR.tagnum = -1 ; + G__mydictLN_TElementPosActionTlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTRow_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTRowlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTDiag_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTColumn_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTFlat_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSub_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseRow_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseDiag_constlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTColumnlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTDiaglEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTFlatlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSublEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseRowlEfloatgR.tagnum = -1 ; + G__mydictLN_TMatrixTSparseDiaglEfloatgR.tagnum = -1 ; + G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR.tagnum = -1 ; + G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR.tagnum = -1 ; +} + + +extern "C" void G__cpp_setup_tagtablemydict() { + + /* Setting up class,struct,union tag entry */ + G__tagtable_setup(G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR),0,-1,36608,(char*)NULL,NULL,NULL); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_listlEstringcOallocatorlEstringgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEintcOallocatorlEintgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TVectorTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TVectorTlEdoublegR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTBaselEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTBaselEdoublegR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TElementActionTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TElementPosActionTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTRow_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTRowlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTDiag_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTColumn_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTFlat_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSub_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseRow_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseDiag_constlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTColumnlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTDiaglEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTFlatlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSublEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseRowlEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_TMatrixTSparseDiaglEfloatgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR); + G__get_linked_tagnum_fwd(&G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR); +} +extern "C" void G__cpp_setupmydict(void) { + G__check_setup_version(30051515,"G__cpp_setupmydict()"); + G__set_cpp_environmentmydict(); + G__cpp_setup_tagtablemydict(); + + G__cpp_setup_inheritancemydict(); + + G__cpp_setup_typetablemydict(); + + G__cpp_setup_memvarmydict(); + + G__cpp_setup_memfuncmydict(); + G__cpp_setup_globalmydict(); + G__cpp_setup_funcmydict(); + + if(0==G__getsizep2memfunc()) G__get_sizep2memfuncmydict(); + return; +} +class G__cpp_setup_initmydict { + public: + G__cpp_setup_initmydict() { G__add_setup_func("mydict",(G__incsetup)(&G__cpp_setupmydict)); G__call_setup_funcs(); } + ~G__cpp_setup_initmydict() { G__remove_setup_func("mydict"); } +}; +G__cpp_setup_initmydict G__cpp_setup_initializermydict; + diff --git a/NtuplePackage/obj/mydict.h b/NtuplePackage/obj/mydict.h new file mode 100644 index 00000000000..1690231977a --- /dev/null +++ b/NtuplePackage/obj/mydict.h @@ -0,0 +1,114 @@ +/******************************************************************** +* ../obj/mydict.h +* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED +* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). +* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. +********************************************************************/ +#ifdef __CINT__ +#error ../obj/mydict.h/C is only for compilation. Abort cint. +#endif +#include +#include +#include +#include +#include +#define G__ANSIHEADER +#define G__DICTIONARY +#define G__PRIVATE_GVALUE +#include "G__ci.h" +#include "FastAllocString.h" +extern "C" { +extern void G__cpp_setup_tagtablemydict(); +extern void G__cpp_setup_inheritancemydict(); +extern void G__cpp_setup_typetablemydict(); +extern void G__cpp_setup_memvarmydict(); +extern void G__cpp_setup_globalmydict(); +extern void G__cpp_setup_memfuncmydict(); +extern void G__cpp_setup_funcmydict(); +extern void G__set_cpp_environmentmydict(); +} + + +#include "TObject.h" +#include "TMemberInspector.h" +#include "../interface/ConfigFileLine.h" +#include "../interface/ConfigParser.h" +#include "../interface/LHEReader.h" +#include "../interface/h2Chain.h" +#include "../interface/hChain.h" +#include "../interface/ntpleUtils.h" +#include "../interface/readJSONFile.h" +#include "../interface/setTDRStyle.h" +#include "../interface/treeReader.h" +#include +namespace std { } +using namespace std; + +#ifndef G__MEMFUNCBODY +#endif + +extern G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlEfloatcOallocatorlEfloatgRsPgRcLcLiterator; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEfloatcOallocatorlEfloatgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_listlEstringcOallocatorlEstringgRsPgR; +extern G__linked_taginfo G__mydictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR; +extern G__linked_taginfo G__mydictLN_vectorlEintcOallocatorlEintgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEintcOallocatorlEintgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlEstringcOallocatorlEstringgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEstringcOallocatorlEstringgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_listlEConfigFileLinemUcOallocatorlEConfigFileLinemUgRsPgR; +extern G__linked_taginfo G__mydictLN_TVectorTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TVectorTlEdoublegR; +extern G__linked_taginfo G__mydictLN_TMatrixTBaselEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTBaselEdoublegR; +extern G__linked_taginfo G__mydictLN_vectorlETH2FmUcOallocatorlETH2FmUgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH2FmUcOallocatorlETH2FmUgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOTObjArraymUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOTObjArraymUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlETH1FmUcOallocatorlETH1FmUgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlETH1FmUcOallocatorlETH1FmUgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_TElementActionTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TElementPosActionTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTRow_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTRowlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTDiag_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTColumn_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTFlat_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSub_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseRow_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseDiag_constlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTColumnlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTDiaglEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTFlatlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSublEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseRowlEfloatgR; +extern G__linked_taginfo G__mydictLN_TMatrixTSparseDiaglEfloatgR; +extern G__linked_taginfo G__mydictLN_maplEintcOstringcOlesslEintgRcOallocatorlEpairlEconstsPintcOstringgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_maplEintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRcOlesslEintgRcOallocatorlEpairlEconstsPintcOvectorlEpairlEintcOintgRcOallocatorlEpairlEintcOintgRsPgRsPgRsPgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_vectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_reverse_iteratorlEvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRcLcLiteratorgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRcOallocatorlEROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRsPgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRcOallocatorlEROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRsPgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEdoublecOallocatorlEdoublegRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEfloatcOallocatorlEfloatgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEintcOallocatorlEintgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEintcOallocatorlEintgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEboolcOallocatorlEboolgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEboolcOallocatorlEboolgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOvectorlEstringcOallocatorlEstringgRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOvectorlEstringcOallocatorlEstringgRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLDisplacementVector3DlEROOTcLcLMathcLcLCartesian3DlEdoublegRcOROOTcLcLMathcLcLDefaultCoordinateSystemTaggRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOROOTcLcLMathcLcLLorentzVectorlEROOTcLcLMathcLcLPxPyPzE4DlEdoublegRsPgRmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOdoublemUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOdoublemUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOfloatmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOfloatmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOintmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOintmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOboolmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOboolmUgRsPgRsPgR; +extern G__linked_taginfo G__mydictLN_maplEstringcOstringmUcOlesslEstringgRcOallocatorlEpairlEconstsPstringcOstringmUgRsPgRsPgR; + +/* STUB derived class for protected member access */ +typedef vector > G__vectorlEfloatcOallocatorlEfloatgRsPgR; diff --git a/NtuplePackage/src/ConfigFileLine.cc b/NtuplePackage/src/ConfigFileLine.cc new file mode 100644 index 00000000000..84d5f356a48 --- /dev/null +++ b/NtuplePackage/src/ConfigFileLine.cc @@ -0,0 +1,106 @@ +// +// File ConfigFileLine.C +// +/*! \class ConfigFileLine + * \brief A class representing a (continued) line in the configuration + * file, that is a pair of an option name and a (list of) value(s) + * + * + * $Date: 2012/02/12 20:16:10 $ + * $Author: rgerosa $ + * + * The class ConfigFileLine is used by the config_parser during + * parsing of the analyis configuration file. Every parsed line is put + * into a ConfigFile line object. Lines may be continued by the \ + * line continuation character. The name of the configuration option + * is stored as a string in the "values" class member, while options + * contains a list of configuration options. The latter field + * might also be empty if the option is boolean. As soon as the name + * field contains a non-zero string, the respective option is defined. + * + * The class is used during the parsing proceedure itself and must + * therefore also be able to contain the data during the parsing + * step. This includes ConfigFileLine objects which have no option + * name because they are on the right hand side of the '=' assignment + * operator. + * + * This class is not usable by root itself, no dictionary is generated + * for it. +*/ + +#include "../interface/ConfigFileLine.h" +#include + +using namespace std; + +ConfigFileLine::ConfigFileLine(const string &o, const string &v) +{ + option=o; + if( v.length()) + values.push_back(v); +} + + +ConfigFileLine::~ConfigFileLine() +{ + // The "option" string and the list are "self deleting" + // we do not need to do anything therefore, here. +} + +void ConfigFileLine::append(const ConfigFileLine &other){ + values.push_back(other.getOptionName()); +} + +void ConfigFileLine::appendList(const ConfigFileLine &other){ + ValueIterator I=other.values.begin(); + while (I != other.values.end()) { + values.push_back(*I); + I++; + } +} + +void ConfigFileLine::setScope(const string &scope){ + string s=scope; + s.append("::"); + s.append(option); + option=s; +} + +void ConfigFileLine::print() const{ + std::cout << "Option '" << option <<"' "; + if (!values.empty() ){ + ValueIterator I=values.begin(); + std::cout << "set to '"; + while (I != values.end()) { + std::cout << *I ; + I++; + if(I != values.end()) std::cout << ", "; + } + std::cout << "'" << std::endl; + } else { + std::cout << "is defined!" << std::endl; + } +} + + +//! stream operator +std::ostream & operator<< (std::ostream & out, const ConfigFileLine & line) +{ + out << "Option '" << line.option <<"' "; + if (!line.values.empty() ){ +// line.ValueIterator I=line.values.begin(); + std::list::const_iterator I=line.values.begin(); + out << "set to '"; + while (I != line.values.end()) { + out << *I ; + I++; + if(I != line.values.end()) out << ", "; + } + out << "'" << std::endl; + } else { + out << "is defined!" << std::endl; + } + return out ; +} + + diff --git a/NtuplePackage/src/LHEReader.cc b/NtuplePackage/src/LHEReader.cc new file mode 100644 index 00000000000..735bdb349e2 --- /dev/null +++ b/NtuplePackage/src/LHEReader.cc @@ -0,0 +1,135 @@ +#include "../interface/LHEReader.h" + + + +LHEReader::LHEReader(const std::string& LHEFileName) +{ + m_LHEFile = new std::ifstream(LHEFileName.c_str(), std::ios::in); + + std::string buffer; + while(1) + { + getline(*m_LHEFile, buffer); + if( buffer == "" ) break; + } +} + +// ---------------------------------------------------------------- + + + + + +LHEReader::~LHEReader() +{} + +// ---------------------------------------------------------------- + + + + + + +bool LHEReader::GetNextEvent() +{ + IDUP.clear(); + ISTUP.clear(); + MOTH1UP.clear(); + MOTH2UP.clear(); + ICOL1UP.clear(); + ICOL2UP.clear(); + PXUP.clear(); + PYUP.clear(); + PZUP.clear(); + PEUP.clear(); + PMUP.clear(); + VTIMUP.clear(); + SPINUP.clear(); + + + + //common event information + (*m_LHEFile) >> NUP >> IDPRUP >> XWGTUP >> SCALUP >> AQEDUP >> AQCDUP; + + // NUP lines, one for each particle + int idup,istup,moth1up,moth2up,icol1up,icol2up; + float pxup,pyup,pzup,peup,pmup,vtimup,spinup; + + for(int i = 0; i < NUP; ++i) + { + (*m_LHEFile) >> idup >> istup >> moth1up >> moth2up >> icol1up >> icol2up >> pxup >> pyup >> pzup >> peup >> pmup >> vtimup >> spinup; + + IDUP.push_back(idup); + ISTUP.push_back(istup); + MOTH1UP.push_back(moth1up); + MOTH2UP.push_back(moth2up); + ICOL1UP.push_back(icol1up); + ICOL2UP.push_back(icol2up); + PXUP.push_back(pxup); + PYUP.push_back(pyup); + PZUP.push_back(pzup); + PEUP.push_back(peup); + PMUP.push_back(pmup); + VTIMUP.push_back(vtimup); + SPINUP.push_back(spinup); + } + + + // Goto next event + bool nextEventFound = false; + std::string buffer; + while( !(*m_LHEFile).eof() ) + { + getline(*m_LHEFile, buffer); + if( buffer == "" ) + { + nextEventFound = true; + break; + } + } + + + return nextEventFound; +} + +// ---------------------------------------------------------------- + + + + + + +void LHEReader::PrintEvent() +{ + std::cout << "" << std::endl; + + std::cout << " " << NUP + << " " << IDPRUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << XWGTUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << SCALUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << AQEDUP + << " " << std::scientific << std::setprecision(7) << std::setw(14) << AQCDUP + << std::endl; + + for(int i = 0; i < NUP; ++i) + { + std::cout << " " << std::fixed << std::setprecision(0) << std::setw(7) << IDUP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << ISTUP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << MOTH1UP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << MOTH2UP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << ICOL1UP.at(i) + << " " << std::fixed << std::setprecision(0) << std::setw(4) << ICOL2UP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PXUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PYUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PZUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PEUP.at(i) + << " " << std::scientific << std::setprecision(11) << std::setw(18) << PMUP.at(i) + << " " << std::scientific << std::setprecision(5) << std::setw(10) << VTIMUP.at(i) + << " " << std::fixed << std::setprecision(1) << std::setw(4) << SPINUP.at(i) + << std::endl; + } + + std::cout << "" << std::endl; +} + +// ---------------------------------------------------------------- diff --git a/NtuplePackage/src/Makefile b/NtuplePackage/src/Makefile new file mode 100644 index 00000000000..7c09385686b --- /dev/null +++ b/NtuplePackage/src/Makefile @@ -0,0 +1,127 @@ +HDR = ../interface/ +OBJ = ../obj/ +LIB = ../lib/ +BIN = ../bin/ +PRG = ../test/ +SCRIPT = ../scripts/ + + +Shell = .sh +HdrSuf = .h +SrcSuf = .cc +ObjSuf = .o +PrgSuf = .cpp +BinSuf = .exe +LibSuf = .so + +HDRS = $(wildcard $(HDR)*$(HdrSuf)) +SRCS = $(wildcard *$(SrcSuf)) +_OBJS = $(patsubst %$(SrcSuf), %$(ObjSuf), $(SRCS)) +OBJS = $(addprefix $(OBJ),$(_OBJS)) +PRGS = $(wildcard $(PRG)*$(PrgSuf)) +_BINS = $(wildcard $(PRG)*$(PrgSuf)) +__BINS = $(_BINS:$(PrgSuf)=$(BinSuf)) +___BINS = $(notdir $(__BINS)) +BINS = $(addprefix $(BIN),${___BINS}) + +LINKDEF = $(wildcard ${HDR}*LinkDef.h) +DICTHDRS = $(patsubst $(LINKDEF),,$(HDRS)) $(LINKDEF) + + +ROOTCFLAGS = $(shell root-config --cflags) +ROOTGLIBS = $(shell root-config --glibs) + +ARCHL = -m64 + +CXX = c++ +CXXFLAGS = -Wall -O -fPIC -I$(HDR) $(ROOTCFLAGS) +CPP = c++ +CPPFLAGS = -Wall $(ARCHL) -I$(HDR) $(ROOTCFLAGS) + +LD = c++ +LDFLAGS = -rdynamic -shared $(ARCHL) +SONAME = libEvent.so +SOFLAGS = -Wl,-soname,$(SONAME) + +GLIBS = -lm -ldl -rdynamic $(ROOTGLIBS) -lGenVector + + +################################################# +#if mac +ARCH = $(shell root-config --arch) +ifeq ($(ARCH),macosx) +LibSuf = .dylib + +ARCHL = -m32 + +CPPFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +CXXFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +LDFLAGS = -dynamiclib -shared -single_module -undefined dynamic_lookup $(ARCHL) +SONAME = libEvent.dylib +SOFLAGS = +endif +################################################# + +################################################# +#if mac 64 +ARCH = $(shell root-config --arch) +ifeq ($(ARCH),macosx64) +LibSuf = .dylib + +ARCHL = -m64 + +CPPFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +CXXFLAGS = -Wall -W -Woverloaded-virtual -O2 $(ARCHL) -pipe -I$(HDR) $(ROOTCFLAGS) + +LDFLAGS = -dynamiclib -shared -single_module -undefined dynamic_lookup $(ARCHL) +SONAME = libEvent.dylib +SOFLAGS = +endif +################################################# + + + + +.PHONY: all exe test clean + + +all: $(LIB)$(SONAME) + + +exe: $(BINS) + + +test: + @echo "HDRS = $(HDRS)" + @echo "DICTHDRS = $(DICTHDRS)" + @echo "SRCS = $(SRCS)" + @echo "OBJS = $(OBJS)" + @echo "PRGS = $(PRGS)" + @echo "BINS = $(BINS)" + + +$(OBJ)%$(ObjSuf): %$(SrcSuf) $(HDRS) + $(CXX) -c $(CXXFLAGS) -o $@ $< + + +$(OBJ)mydict.o: $(OBJ)mydict.cc $(OBJ)mydict.h + $(CXX) -c $(CXXFLAGS) -o $@ $< + + +$(OBJ)mydict.cc: $(DICTHDRS) + @echo "Generating dictionary for ..." + rootcint -f $(OBJ)mydict.cc -c -p ${CXXFLAGS} $(DICTHDRS) + +$(LIB)$(SONAME): $(OBJS) $(OBJ)mydict.o + @echo "Linking $(SONAME):" + $(LD) $(LDFLAGS) $(OBJS) $(OBJ)mydict.o $(SOFLAGS) -o $(LIB)$(SONAME) + +$(BIN)%$(BinSuf): $(PRG)%$(PrgSuf) $(HDRS) $(LIB)$(SONAME) + $(CPP) $(CPPFLAGS) -L$(LIB) $(GLIBS) -lEvent -o $@ $< + + +clean: + rm -f $(OBJ)*$(ObjSuf) $(LIB)*$(LibSuf) $(OBJ)mydict* diff --git a/NtuplePackage/src/h2Chain.cc b/NtuplePackage/src/h2Chain.cc new file mode 100644 index 00000000000..a2a7fd9790f --- /dev/null +++ b/NtuplePackage/src/h2Chain.cc @@ -0,0 +1,153 @@ +#include "../interface/h2Chain.h" + + h2Chain::h2Chain (TString baseName, TString baseTitle, + int nbinsx, double minx, double maxx, + int nbinsy, double miny, double maxy, int NUM) : + m_baseName (baseName) + { + TString name ; + TString title ; + for (int i=0 ; iSetStats (0) ; + m_histos.push_back (dummy) ; + } + } + + +//PG -------------------------------------------------------- + + +h2Chain::~h2Chain () +{ + for (unsigned int i=0 ; i colors) + { + //PG this is weak, assumes correct number of elements + for (unsigned int i=0 ; iSetMarkerColor (colors.at (i)) ; + m_histos.at (i)->SetLineColor (colors.at (i)) ; + m_histos.at (i)->SetFillColor (colors.at (i)) ; + m_histos.at (i)->SetFillStyle (3001) ; + } + //PG this is a hack +// m_histos.back ()->SetLineColor (kBlack) ; +// m_histos.back ()->SetLineWidth (2) ; + } + + +//PG -------------------------------------------------------- + + +void +h2Chain::Fill (int i, double valx, double valy) + { + m_histos.at (i)->Fill (valx, valy) ; + return ; + } + + +//PG -------------------------------------------------------- + + +void +h2Chain::Fill (int i, double valx, double valy, double weight) + { + m_histos.at (i)->Fill (valx, valy, weight) ; + return ; + } + + + +//PG -------------------------------------------------------- + +/* +void +h2Chain::Print (bool isLog, int rebinx, int rebiny) + { + TCanvas *c1 = new TCanvas("c1", "c1", 52,180,500,500); + c1->cd () ; + if(isLog) c1->SetLogz(); + + m_histos.at (0)->Draw ("box") ; + for (unsigned int i=0 ; iSetStats (0) ; + m_histos.at (i)->Draw ("boxsame") ; + m_histos.at (i)->RebinX (rebinx) ; + m_histos.at (i)->RebinY (rebiny) ; + } + //PG this is a hack +// m_histos.back ()->Draw ("same") ; + TString name = m_baseName + TString ("_h2.gif") ; + c1->Print (name,"gif") ; + + m_histos.at (0)->DrawNormalized ("box") ; + for (unsigned int i=0 ; iDrawNormalized ("boxsame") ; + //PG this is a hack +// m_histos.back ()->DrawNormalized ("same") ; + name = TString ("N") + m_baseName + TString ("_h2.gif") ; + c1->Print (name,"gif") ; + } +*/ + +//PG -------------------------------------------------------- + +/* +void +h2Chain::PrintEach () + { + TCanvas *c1 = new TCanvas("c1","c1", 180, 52, 550, 550); + c1->cd () ; + for (unsigned int i=0 ; iSetStats (0) ; + m_histos.at (i)->Draw () ; + TString name = m_baseName ; + name += TString ("_") ; + name += i ; + name += TString ("_h2.gif") ; + c1->Print (name,"gif") ; + } + } +*/ + +//PG -------------------------------------------------------- + + +void +h2Chain::Write (const std::string& dirName, TFile & outputFile) + { + outputFile.cd () ; + outputFile.mkdir(dirName.c_str()); + outputFile.cd(dirName.c_str()); + for (unsigned int i=0 ; iWrite () ; + return ; + } + + +//PG -------------------------------------------------------- + + +void +h2Chain::Scale (int index, double factor) +{ + m_histos.at (index)->Scale (factor) ; +} diff --git a/NtuplePackage/src/hChain.cc b/NtuplePackage/src/hChain.cc new file mode 100644 index 00000000000..5c0ba042080 --- /dev/null +++ b/NtuplePackage/src/hChain.cc @@ -0,0 +1,282 @@ +#include "../interface/hChain.h" +#include "TStyle.h" +#include "TROOT.h" +#include "TCanvas.h" + +hChain::hChain (TString baseName, TString baseTitle, + int nbins, double min, double max, int NUM) : + m_baseName (baseName) + { + for (int i=0 ; i colors) + { + //PG this is weak, assumes correct number of elements + for (unsigned int i=0 ; iSetLineColor (colors.at (i)) ; + m_histos.at (i)->SetLineWidth (2) ; + } + } + + +//PG -------------------------------------------------------- + + +void +hChain::Fill (int i, double val) + { + m_histos.at (i)->Fill (val) ; +// m_ntuples.at (i)->Fill (val) ; + return ; + } + + +//RG -------------------------------------------------------- + + + +void +hChain::SetBinContent (int i, int bin, double val) + { + m_histos.at (i)->SetBinContent (bin,val) ; +// m_ntuples.at (i)->Fill (val) ; + return ; + } + +//RG -------------------------------------------------------- + + + +void +hChain::SetBinError (int i, int bin, double val) + { + m_histos.at (i)->SetBinError (bin,val) ; +// m_ntuples.at (i)->Fill (val) ; + return ; + } + + + +//PG -------------------------------------------------------- + + +void +hChain::Print (bool isLog, int rebin, TString altName) + { + gROOT->SetStyle ("Plain") ; + + for (unsigned int i=0 ; iSetFillStyle (3001) ; + m_histos.at (i)->SetStats (0) ; + m_histos.at (i)->Rebin (rebin) ; + } + + TString name = "s_" ; + if (altName == "default") name += m_baseName ; + else name += altName ; + THStack hs (name,"stacked m_histos") ; + for (unsigned int i=0 ; iGetXaxis ()->GetXmin (), + m_histos.at (0)->GetXaxis ()->GetXmax (), + 10,min,max) ; + bkg.SetStats (0) ; + bkg.AddDirectory (0) ; + bkg.Draw () ; + for (unsigned int i=0 ; iDrawNormalized ("same") ; + name = TString ("N") + m_baseName + TString ("_h1.gif") ; + c1.Print (name,"gif") ; + } + + +//PG -------------------------------------------------------- + +/* +void +hChain::PrintEach (bool isLog, int rebin) + { + for (unsigned int i=0 ; iSetFillStyle (3001) ; + m_histos.at (i)->SetStats (0) ; + m_histos.at (i)->Rebin (rebin) ; + } + + TCanvas c1 ; + c1.cd () ; + if(isLog) c1.SetLogy(); + + for (unsigned int i=0 ; iSetStats (0) ; + m_histos.at (i)->Draw () ; + TString name = m_baseName ; + name += TString ("_") ; + name += i ; + name += TString ("_h1.gif") ; + c1.Print (name,"gif") ; + } + + } +*/ + +//PG -------------------------------------------------------- + + +void +hChain::Write (TFile & outputFile) + { + outputFile.cd () ; + for (unsigned int i=0 ; i GetEntries() > 0) + m_histos.at (i)->Write () ; +// for (unsigned int i=0 ; iWrite () ; + return ; + } + + +//PG -------------------------------------------------------- + + + + +void +hChain::Write (const std::string& dirName, TFile & outputFile) + { + outputFile.cd () ; + outputFile.mkdir(dirName.c_str()); + outputFile.cd(dirName.c_str()); + for (unsigned int i=0 ; i GetEntries() > 0) + m_histos.at (i)->Write () ; +// for (unsigned int i=0 ; iWrite () ; + return ; + } + + +//PG -------------------------------------------------------- + + + +double +hChain::findNMin () + { + double minVal = m_histos.at (0)->GetMinimum (0.0000001)/ + m_histos.at (0)->Integral () ; + for (unsigned int i = 0 ; i < m_histos.size () ; ++i) + { + double dummy = m_histos.at (i)->GetMinimum (0.0000001)/ + m_histos.at (i)->Integral () ; + if (minVal > dummy) minVal = dummy ; + } + return minVal ; + } + + +//PG -------------------------------------------------------- + + +double +hChain::findNMax () + { + double maxVal = m_histos.at (0)->GetMaximum ()/ + m_histos.at (0)->Integral () ; + for (unsigned int i = 0 ; i < m_histos.size () ; ++i) + { + double dummy = m_histos.at (i)->GetMaximum ()/ + m_histos.at (i)->Integral () ; + if (maxVal < dummy) maxVal = dummy ; + } + return maxVal ; + } + + +//PG -------------------------------------------------------- + + +void +hChain::Normalize (int index) +{ + if(m_histos.at (index) -> GetEntries() > 0) + m_histos.at (index)->Scale (1./m_histos.at(index)->GetEntries()) ; +} + + + +void +hChain::Scale (int index, double factor) +{ + m_histos.at (index)->Scale (factor) ; +} + +//RG ----------------------------------------------------- +double +hChain::GetEffectiveEntries(int index) +{ + return m_histos.at(index)->GetEffectiveEntries(); +} + +//RG ----------------------------------------------------- +void +hChain::Reset() +{ + for(unsigned int index=0; indexDelete(); +} + +//RG ------------------------------------------------------- +TH1F* +hChain::GetHisto(int index) +{ + return m_histos.at(index); +} diff --git a/NtuplePackage/src/ntpleUtils.cc b/NtuplePackage/src/ntpleUtils.cc new file mode 100644 index 00000000000..a0b79d30998 --- /dev/null +++ b/NtuplePackage/src/ntpleUtils.cc @@ -0,0 +1,214 @@ +#include "../interface/ntpleUtils.h" + + + +bool maggiore(double i, double j) +{ + return( i>j ); +} + + + +// ------------------------------------------------------------ + + + +std::map GetTotalEvents(const std::string& histoName, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + std::map totalEvents; + + if(!inFile.is_open()) + { + std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; + return totalEvents; + } + + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + + TFile* f = TFile::Open(buffer.c_str()); + TH1F* histo = NULL; + f -> GetObject(histoName.c_str(), histo); + if(histo == NULL) + { + std::cout << ">>>ntpleUtils::Error in getting object " << histoName << std::endl; + exit(-1); + } + + + for(int bin = 1; bin <= histo -> GetNbinsX(); ++bin) + totalEvents[bin] += int(histo -> GetBinContent(bin)); + + f -> Close(); + delete f; + } + + return totalEvents; +} + + + +TH1F* GetTotalHisto(const std::string& histoName, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + TH1F* totalHisto = NULL; + + if(!inFile.is_open()) + { + std::cerr << ">>>ntpleUtils::GetTotalHisto::can't open file " << inputFileList << " for input" << std::endl; + return totalHisto; + } + + bool isFirstFile = true; + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + + //std::cout << "ntpleUtils::GetTotalHisto::getting histogram " << histoName << " from file " << buffer << std::endl; + TFile* f = TFile::Open(buffer.c_str()); + TH1F* histo = NULL; + f -> GetObject(histoName.c_str(), histo); + if(histo == NULL) + { + std::cout << ">>>ntpleUtils::GetTotalHisto::Error in getting object " << histoName << std::endl; + exit(-1); + } + + if( isFirstFile ) + totalHisto = (TH1F*)(histo->Clone()); + else + totalHisto -> Add(histo); + + if( !isFirstFile ) + { + f -> Close(); + delete f; + isFirstFile = false; + } + } + + return totalHisto; +} + + + +std::map GetBinLabels(const std::string& histoName, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + std::map binLabels; + + if(!inFile.is_open()) + { + std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; + return binLabels; + } + + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + + TFile* f = TFile::Open(buffer.c_str()); + TH1F* histo = NULL; + f -> GetObject(histoName.c_str(), histo); + if(histo == NULL) + { + std::cout << ">>>ntpleUtils::Error in getting object " << histoName << std::endl; + exit(-1); + } + + + for(int bin = 1; bin <= histo -> GetNbinsX(); ++bin) + binLabels[bin] = std::string(histo -> GetXaxis() -> GetBinLabel(bin)); + + f -> Close(); + delete f; + } + + return binLabels; +} + + + +bool FillChain(TChain& chain, const std::string& inputFileList) +{ + std::ifstream inFile(inputFileList.c_str()); + std::string buffer; + + if(!inFile.is_open()) + { + std::cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << std::endl; + return false; + } + + while(1) + { + inFile >> buffer; + if(!inFile.good()) break; + if( buffer.at(0) == '#' ) continue; + chain.Add(buffer.c_str()); + std::cout << ">>> ntupleUtils::FillChain - treeName = " << chain.GetName() << " from file " << buffer << std::endl; + } + + return true; +} + + + +// ------------------------------------------------------------ + + + +double deltaPhi(const double& phi1, const double& phi2) +{ + double deltaphi = fabs(phi1 - phi2); + if (deltaphi > 6.283185308) deltaphi -= 6.283185308; + if (deltaphi > 3.141592654) deltaphi = 6.283185308 - deltaphi; + return deltaphi; +} + +double deltaEta(const double& eta1, const double& eta2) +{ + double deltaeta = fabs(eta1 - eta2); + return deltaeta; +} + +double deltaR(const double& eta1, const double& phi1, + const double& eta2, const double& phi2) +{ + double deltaphi = deltaPhi(phi1, phi2); + double deltaeta = deltaEta(eta1, eta2); + double deltar = sqrt(deltaphi*deltaphi + deltaeta*deltaeta); + return deltar; +} + + + +// ------------------------------------------------------------ + + + +void Print4V(const ROOT::Math::XYZTVector& p) +{ + std::cout << std::fixed << std::setprecision(2) + << "(E,px,py,pz) = " + << "(" << std::setw(8) << p.energy() + << "," << std::setw(8) << p.px() + << "," << std::setw(8) << p.py() + << "," << std::setw(8) << p.pz() + << ")" + << "\tpt = " + << std::setw(7) << p.pt() + << "\teta = " + << std::setw(6) << p.eta() + << "\tphi = " + << std::setw(5) << p.phi() + << std::endl; +} diff --git a/NtuplePackage/src/readJSONFile.cc b/NtuplePackage/src/readJSONFile.cc new file mode 100644 index 00000000000..14052c644da --- /dev/null +++ b/NtuplePackage/src/readJSONFile.cc @@ -0,0 +1,111 @@ +#include "../interface/readJSONFile.h" + + + + + +std::map > > + readJSONFile(const std::string& inFileName) +{ + std::ifstream inFile(inFileName.c_str(), std::ios::in); + + std::string line; + while(!inFile.eof()) + { + std::string buffer; + inFile >> buffer; + line += buffer; + } + + + + // define map with result + std::map > > jsonMap; + + + + // loop on JSON file + for(std::string::const_iterator it = line.begin(); it < line.end(); ++it) + { + // find run number + if( (*(it) == '"') && (*(it+7) == '"') ) + { + std::string run(it+1, it+7); + //std::cout << "found run " << run << std::endl; + + + + // find lumi sections + std::vector > lumisections; + for(std::string::const_iterator it2 = it+10; it2 < line.end(); ++it2) + { + if( (*(it2) == ']') && (*(it2-1) == ']') ) break; + if( *(it2) != '[' ) continue; + + std::string::const_iterator it_beg = it2; + std::string::const_iterator it_mid; + std::string::const_iterator it_end; + + for(std::string::const_iterator it3 = it_beg; it3 < line.end(); ++it3) + { + if( *(it3) == ',' ) it_mid = it3; + if( *(it3) == ']' ) + { + it_end = it3; + break; + } + } + + + + std::string lumi_beg(it_beg+1, it_mid); + std::string lumi_end(it_mid+1, it_end); + //std::cout << "[" << lumi_beg; + //std::cout << ","; + //std::cout << lumi_end << "]" << std::endl; + + std::pair tempLS(atoi(lumi_beg.c_str()), atoi(lumi_end.c_str())); + lumisections.push_back(tempLS); + + it2 = it_end; + } + + + jsonMap[atoi(run.c_str())] = lumisections; + } // find run number + + } // loop on JSON file + + + + return jsonMap; +} + + + + + + +bool AcceptEventByRunAndLumiSection(const int& runId, const int& lumiId, + std::map > >& jsonMap) +{ + // select by runId + if( jsonMap.find(runId) == jsonMap.end() ) return false; + + + + // select by lumiId + std::vector > lumisections = jsonMap[runId]; + + int skipEvent = true; + for(unsigned int i = 0; i < lumisections.size(); ++i) + if( (lumiId >= lumisections.at(i).first) && + (lumiId <= lumisections.at(i).second) ) + skipEvent = false; + + if( skipEvent == true ) return false; + + + return true; +} + diff --git a/NtuplePackage/src/setTDRStyle.cc b/NtuplePackage/src/setTDRStyle.cc new file mode 100755 index 00000000000..beb0a29a60d --- /dev/null +++ b/NtuplePackage/src/setTDRStyle.cc @@ -0,0 +1,203 @@ +#include "../interface/setTDRStyle.h" + + + +void setTDRStyle() +{ + TStyle* tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); + + // For the canvas: + tdrStyle->SetCanvasBorderMode(0); + tdrStyle->SetCanvasColor(kWhite); + tdrStyle->SetCanvasDefH(600); //Height of canvas + tdrStyle->SetCanvasDefW(800); //Width of canvas + tdrStyle->SetCanvasDefX(0); //POsition on screen + tdrStyle->SetCanvasDefY(0); + + // For the Pad: + tdrStyle->SetPadBorderMode(0); + // tdrStyle->SetPadBorderSize(Width_t size = 1); + tdrStyle->SetPadColor(kWhite); + tdrStyle->SetPadGridX(false); + tdrStyle->SetPadGridY(false); + tdrStyle->SetGridColor(0); + tdrStyle->SetGridStyle(3); + tdrStyle->SetGridWidth(1); + + // For the frame: + tdrStyle->SetFrameBorderMode(0); + tdrStyle->SetFrameBorderSize(1); + tdrStyle->SetFrameFillColor(0); + tdrStyle->SetFrameFillStyle(0); + tdrStyle->SetFrameLineColor(1); + tdrStyle->SetFrameLineStyle(1); + tdrStyle->SetFrameLineWidth(1); + + // For the histo: + // tdrStyle->SetHistFillColor(1); + // tdrStyle->SetHistFillStyle(0); + tdrStyle->SetHistLineColor(1); + tdrStyle->SetHistLineStyle(0); + tdrStyle->SetHistLineWidth(1); + // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); + // tdrStyle->SetNumberContours(Int_t number = 20); + + tdrStyle->SetEndErrorSize(2); + // tdrStyle->SetErrorMarker(20); + //tdrStyle->SetErrorX(0.); + + tdrStyle->SetMarkerStyle(20); + + //For the fit/function: + tdrStyle->SetOptFit(1); + tdrStyle->SetFitFormat("5.4g"); + tdrStyle->SetFuncColor(2); + tdrStyle->SetFuncStyle(1); + tdrStyle->SetFuncWidth(1); + + //For the date: + tdrStyle->SetOptDate(0); + // tdrStyle->SetDateX(Float_t x = 0.01); + // tdrStyle->SetDateY(Float_t y = 0.01); + + // For the statistics box: + tdrStyle->SetOptFile(0); + tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); + tdrStyle->SetStatColor(kWhite); + tdrStyle->SetStatFont(42); + tdrStyle->SetStatFontSize(0.025); + tdrStyle->SetStatTextColor(1); + tdrStyle->SetStatFormat("6.4g"); + tdrStyle->SetStatBorderSize(1); + tdrStyle->SetStatH(0.1); + tdrStyle->SetStatW(0.15); + // tdrStyle->SetStatStyle(Style_t style = 1001); + // tdrStyle->SetStatX(Float_t x = 0); + // tdrStyle->SetStatY(Float_t y = 0); + + // Margins: + tdrStyle->SetPadTopMargin(0.05); + tdrStyle->SetPadBottomMargin(0.13); + tdrStyle->SetPadLeftMargin(0.13); + tdrStyle->SetPadRightMargin(0.25); + + // For the Global title: + tdrStyle->SetOptTitle(0); + tdrStyle->SetTitleFont(42); + tdrStyle->SetTitleColor(1); + tdrStyle->SetTitleTextColor(1); + tdrStyle->SetTitleFillColor(10); + tdrStyle->SetTitleFontSize(0.05); + // tdrStyle->SetTitleH(0); // Set the height of the title box + // tdrStyle->SetTitleW(0); // Set the width of the title box + // tdrStyle->SetTitleX(0); // Set the position of the title box + // tdrStyle->SetTitleY(0.985); // Set the position of the title box + // tdrStyle->SetTitleStyle(Style_t style = 1001); + // tdrStyle->SetTitleBorderSize(2); + + // For the axis titles: + tdrStyle->SetTitleColor(1, "XYZ"); + tdrStyle->SetTitleFont(42, "XYZ"); + tdrStyle->SetTitleSize(0.04, "XYZ"); + // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? + // tdrStyle->SetTitleYSize(Float_t size = 0.02); + tdrStyle->SetTitleXOffset(1.25); + tdrStyle->SetTitleYOffset(1.50); + // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset + + // For the axis labels: + tdrStyle->SetLabelColor(1, "XYZ"); + tdrStyle->SetLabelFont(42, "XYZ"); + tdrStyle->SetLabelOffset(0.007, "XYZ"); + tdrStyle->SetLabelSize(0.03, "XYZ"); + + // For the axis: + tdrStyle->SetAxisColor(1, "XYZ"); + tdrStyle->SetStripDecimals(kTRUE); + tdrStyle->SetTickLength(0.03, "XYZ"); + tdrStyle->SetNdivisions(510, "XYZ"); + tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame + tdrStyle->SetPadTickY(1); + + // Change for log plots: + tdrStyle->SetOptLogx(0); + tdrStyle->SetOptLogy(0); + tdrStyle->SetOptLogz(0); + + // Postscript options: + tdrStyle->SetPaperSize(20.,20.); + // tdrStyle->SetLineScalePS(Float_t scale = 3); + // tdrStyle->SetLineStyleString(Int_t i, const char* text); + // tdrStyle->SetHeaderPS(const char* header); + // tdrStyle->SetTitlePS(const char* pstitle); + + //tdrStyle->SetBarOffset(Float_t baroff = 0.5); + //tdrStyle->SetBarWidth(Float_t barwidth = 0.5); + //tdrStyle->SetPaintTextFormat(const char* format = "g"); + tdrStyle->SetPalette(1); + //tdrStyle->SetTimeOffset(Double_t toffset); + //tdrStyle->SetHistMinimumZero(kTRUE); + + + + + + + const Int_t NRGBs = 5; + const Int_t NCont = 255; + + Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; + Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; + Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; + Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + tdrStyle->SetNumberContours(NCont); + + + //TLatex *lab = new TLatex(0.70,0.85, "CMS 2008"); + //lab->SetNDC(); + //lab->SetTextFont(42); + //lab->SetTextSize(0.05); + //lab->Draw("same"); + + + + + //gROOT -> ForceStyle(); + + tdrStyle->cd(); +} + + + +int getColor(const int& i) +{ + std::vector colors(19); + + colors[0] = kBlack; + + colors[1] = kBlue; + colors[2] = kRed; + colors[3] = kGreen; + colors[4] = kMagenta; + colors[5] = kCyan; + colors[6] = kOrange; + colors[7] = kGray; + + colors[8] = kCyan+2; + colors[9] = kOrange+2; + colors[10] = kMagenta+2; + colors[11] = kRed+2; + colors[12] = kBlue+2; + colors[13] = kOrange+2; + colors[14] = kGray+2; + + colors[15] = kRed+3; + colors[16] = kBlue+3; + colors[17] = kGreen+3; + colors[18] = kMagenta+3; + + if(i < 19) return colors.at(i); + else return i; +} diff --git a/NtuplePackage/src/treeReader.cc b/NtuplePackage/src/treeReader.cc new file mode 100644 index 00000000000..00045319059 --- /dev/null +++ b/NtuplePackage/src/treeReader.cc @@ -0,0 +1,691 @@ +#include "../interface/treeReader.h" + +treeReader::treeReader (TTree * tree, bool verbosity) : +m_tree (tree), +m_verbosity (verbosity) +{ + + TObjArray * br_list = m_tree->GetListOfBranches () ; + TIter br_it (br_list) ; + + TBranch * iBranch ; + TBranchElement* bre ; + TLeaf* Leaf; + + while ((iBranch = (TBranch *) br_it.Next ())) { + bre = (TBranchElement*) iBranch ; + std::string bname = bre->GetClassName () ; + std::string branchTitle = iBranch->GetTitle(); + if(branchTitle.find("bsmReweight")!= std::string::npos) continue ; + if(bname!=""){ + + if (bname.find ("Event") != std::string::npos) continue ; + + if (!bname.find ("vector > >")){ + if (m_verbosity) + std::cout << "4V | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_4Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_4Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector,ROOT::Math::DefaultCoordinateSystemTag> >") ){ + if (m_verbosity) + std::cout << "3V | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_3Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_3Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Bvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Bvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "IV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Ivectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Ivectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "SV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Svectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Svectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Fvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Fvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + m_Dvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Dvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("ROOT::Math::LorentzVector > ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName() << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + else{ k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector ;m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>* ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + else{ k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector ;m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("bool") || !bname.find ("Bool_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Bvectors[bre->GetName ()] = new bool [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + else{ k_Bvectors[bre->GetName ()] = new bool ; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + } + + + else if (!bname.find ("int") || !bname.find ("Int_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Ivectors[bre->GetName ()] = new int [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + else{ k_Ivectors[bre->GetName ()] = new int ; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + } + + + else if (!bname.find ("std::string") || !bname.find ("TString") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Svectors[bre->GetName ()] = new std::string [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + else{ k_Svectors[bre->GetName ()] = new std::string ; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("float") || !bname.find ("Float_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Fvectors[bre->GetName ()] = new float [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + else if(vectorx==0 && vectory==0){ k_Fvectors[bre->GetName ()] = new float ; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + + } + + else if (!bname.find ("double") || !bname.find ("Double_t") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << bre->GetClassName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + if(vectorx!=0 && vectory==0){k_Dvectors[bre->GetName ()] = new double [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + else{ k_Dvectors[bre->GetName ()] = new double ; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + } + + } + + else{ + + Leaf = iBranch->GetLeaf(iBranch->GetName()); + if(Leaf==0) continue; + std::string bname = Leaf->GetTypeName(); + + if (!bname.find ("Event") ) continue ; + + else if (!bname.find ("vector > >") ){ + if (m_verbosity) + std::cout << "4V | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_4Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_4Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector,ROOT::Math::DefaultCoordinateSystemTag> >") ){ + if (m_verbosity) + std::cout << "3V | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_3Vvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_3Vvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "IV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Bvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Bvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "IV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Ivectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Ivectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "SV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Svectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Svectors[bre->GetName ()]) ; + } + + else if (bname.find ("vector") != std::string::npos){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Fvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (),&m_Fvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("vector") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + m_Dvectors[bre->GetName ()] = new std::vector ; + m_tree->SetBranchAddress (bre->GetName (), &m_Dvectors[bre->GetName ()]) ; + } + + else if (!bname.find ("ROOT::Math::LorentzVector >* ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + else{ k_4Vvectors[bre->GetName ()] = new ROOT::Math::XYZTVector ;m_tree->SetBranchAddress (bre->GetName (),k_4Vvectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>* ")){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + else{ k_3Vvectors[bre->GetName ()] = new ROOT::Math::XYZVector ;m_tree->SetBranchAddress (bre->GetName (),k_3Vvectors[bre->GetName ()]) ;} + } + + else if (!bname.find ("bool") || !bname.find ("Bool_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Bvectors[bre->GetName ()] = new bool [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + else{ k_Bvectors[bre->GetName ()] = new bool ; m_tree->SetBranchAddress (bre->GetName (),k_Bvectors[bre->GetName ()]) ;} + } + + + + else if (!bname.find ("int") || !bname.find ("Int_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Ivectors[bre->GetName ()] = new int [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + else{ k_Ivectors[bre->GetName ()] = new int ; m_tree->SetBranchAddress (bre->GetName (),k_Ivectors[bre->GetName ()]) ;} + } + + + else if (!bname.find ("std::string") || !bname.find ("TString") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Svectors[bre->GetName ()] = new std::string [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + else{ k_Svectors[bre->GetName ()] = new std::string ; m_tree->SetBranchAddress (bre->GetName (),k_Svectors[bre->GetName ()]) ;} + + } + + + else if (!bname.find ("float") || !bname.find ("Float_t") ){ + if (m_verbosity) + std::cout << "FV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + + if(vectorx!=0 && vectory==0){k_Fvectors[bre->GetName ()] = new float [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + else if(vectorx==0 && vectory==0){ k_Fvectors[bre->GetName ()] = new float ; m_tree->SetBranchAddress (bre->GetName (),k_Fvectors[bre->GetName ()]) ; } + + } + + else if (!bname.find ("double") || !bname.find ("Double_t") ){ + if (m_verbosity) + std::cout << "DV | setting " << bre->GetName () << " for type : " << Leaf->GetTypeName () << "\n" ; + + int foundFirst = branchTitle.find("/"); + int vectorx = 0 ; + int vectory = 0 ; + + if(branchTitle.at(foundFirst-1)==']'){ + + size_t foundUp = branchTitle.find_first_of("["); + size_t foundDw = branchTitle.find_first_of("]"); + + std::string npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + vectorx = atoi(npos.c_str()); + + branchTitle.replace(foundUp,foundDw-foundUp+1,""); + foundUp = branchTitle.find_first_of("["); + foundDw = branchTitle.find_first_of("]"); + npos = branchTitle.substr(foundUp+1,foundDw-foundUp-1); + + vectory = atoi(npos.c_str()); + + } + if(vectorx!=0 && vectory==0){k_Dvectors[bre->GetName ()] = new double [vectorx]; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + else{ k_Dvectors[bre->GetName ()] = new double ; m_tree->SetBranchAddress (bre->GetName (),k_Dvectors[bre->GetName ()]) ;} + } + + } + + } //PG loop over branches + + std::cout << " --> " << (m_3Vvectors.size () + m_4Vvectors.size () + m_Fvectors.size () + m_Dvectors.size () + m_Ivectors.size ()) + + (k_3Vvectors.size () + k_4Vvectors.size () + k_Fvectors.size () + k_Dvectors.size () + k_Ivectors.size ()) << " branches read\n" ; + +} + + +// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- + + +treeReader::~treeReader () { + + for (std::map * >::const_iterator iMap = m_Dvectors.begin () ; iMap != m_Dvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + + for (std::map * >::const_iterator iMap = m_Fvectors.begin () ; iMap != m_Fvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_Ivectors.begin () ; iMap != m_Ivectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_Svectors.begin () ; iMap != m_Svectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_4Vvectors.begin () ; iMap != m_4Vvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map * >::const_iterator iMap = m_3Vvectors.begin () ; iMap != m_3Vvectors.end (); ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Dvectors.begin () ; iMap != k_Dvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Fvectors.begin () ; iMap != k_Fvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Ivectors.begin () ; iMap != k_Ivectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_Svectors.begin () ; iMap != k_Svectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_4Vvectors.begin () ; iMap != k_4Vvectors.end () ; ++iMap) + if(iMap->second) delete iMap->second ; + + for (std::map ::const_iterator iMap = k_3Vvectors.begin () ; iMap != k_3Vvectors.end (); ++iMap) + if(iMap->second) delete iMap->second ; + +} + + +std::vector* treeReader::Get3V(const std::string &name){ + std::map * >::const_iterator it_3V = m_3Vvectors.find(name); + if (it_3V != m_3Vvectors.end() ) return m_3Vvectors[name]; + else return new std::vector; +} + +ROOT::Math::XYZVector* treeReader::get3V(const std::string &name){ + std::map::const_iterator it_3V = k_3Vvectors.find(name); + if (it_3V != k_3Vvectors.end() ) return k_3Vvectors[name]; + else return new ROOT::Math::XYZVector; +} + +std::vector* treeReader::Get4V(const std::string &name){ + std::map * >::const_iterator it_4V = m_4Vvectors.find(name); + if (it_4V != m_4Vvectors.end() ) return m_4Vvectors[name]; + else return new std::vector; +} + +ROOT::Math::XYZTVector* treeReader::get4V(const std::string &name){ + std::map::const_iterator it_4V = k_4Vvectors.find(name); + if (it_4V != k_4Vvectors.end() ) return k_4Vvectors[name]; + else return new ROOT::Math::XYZTVector; +} + +std::vector* treeReader::GetDouble(const std::string &name){ + std::map * >::const_iterator it_D = m_Dvectors.find(name); + if (it_D != m_Dvectors.end() ) return m_Dvectors[name]; + else return new std::vector; +} + +double* treeReader::getDouble(const std::string &name){ + std::map::const_iterator it_D = k_Dvectors.find(name); + if (it_D != k_Dvectors.end() ) return k_Dvectors[name]; + else return new double; +} + +std::vector* treeReader::GetFloat(const std::string &name){ + std::map * >::const_iterator it_F = m_Fvectors.find(name); + if (it_F != m_Fvectors.end() ) return m_Fvectors[name]; + else return new std::vector; +} + +float* treeReader::getFloat(const std::string &name){ + std::map::const_iterator it_F = k_Fvectors.find(name); + if (it_F != k_Fvectors.end() ) return k_Fvectors[name]; + else return new float; +} + +std::vector* treeReader::GetInt(const std::string &name){ + std::map * >::const_iterator it_I = m_Ivectors.find(name); + if (it_I != m_Ivectors.end() ) return m_Ivectors[name]; + else return new std::vector; +} + +int* treeReader::getInt(const std::string &name){ + std::map::const_iterator it_I = k_Ivectors.find(name); + if (it_I != k_Ivectors.end() ) return k_Ivectors[name]; + else return new int; +} + + +std::vector* treeReader::GetBool(const std::string &name){ + std::map * >::const_iterator it_I = m_Bvectors.find(name); + if (it_I != m_Bvectors.end() ) return m_Bvectors[name]; + else return new std::vector; +} + +bool* treeReader::getBool(const std::string &name){ + std::map::const_iterator it_I = k_Bvectors.find(name); + if (it_I != k_Bvectors.end() ) return k_Bvectors[name]; + else return new bool; +} + +std::vector* treeReader::GetString(const std::string &name){ + std::map * >::const_iterator it_S = m_Svectors.find(name); + if (it_S != m_Svectors.end() ) return m_Svectors[name]; + else return new std::vector; +} + +std::string* treeReader::getString(const std::string &name){ + std::map::const_iterator it_S = k_Svectors.find(name); + if (it_S != k_Svectors.end() ) return k_Svectors[name]; + else return new std::string; +} From c6078f68efa2c6b3ca7cce029c92674e6c1a8b43 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Fri, 26 Sep 2014 15:56:46 +0200 Subject: [PATCH 453/475] E/p calibration integrated in ZFitter.cpp --- EOverPCalibration/README | 46 ++---------------- EOverPCalibration/bin/BuildFile.xml | 2 - ...MomentumCalibration2012_charge_charge.root | Bin 0 -> 90974 bytes .../MomentumCalibration2012_eta1_eta1.root | Bin 0 -> 72694 bytes ...tumCalibrationCombined_2011AB-2012ABC.root | Bin 0 -> 18143 bytes EOverPCalibration/src/FastCalibratorEB.cc | 1 - EOverPCalibration/src/FastCalibratorEE.cc | 1 - EOverPCalibration/src/TEndcapRings.cc | 4 +- 8 files changed, 5 insertions(+), 49 deletions(-) create mode 100644 EOverPCalibration/output/MomentumCalibration2012_charge_charge.root create mode 100644 EOverPCalibration/output/MomentumCalibration2012_eta1_eta1.root create mode 100644 EOverPCalibration/output/MomentumCalibrationCombined_2011AB-2012ABC.root diff --git a/EOverPCalibration/README b/EOverPCalibration/README index 5d2d7261371..ceec2b84afa 100644 --- a/EOverPCalibration/README +++ b/EOverPCalibration/README @@ -4,49 +4,9 @@ Compile the package : scramv1 b -j16 -List of codes for intercalibration: - -1) Intercalibration on EB (Ecal Barrel) : - -Run the code: FastCalibratorEB cfg/FastCalibrator_EB_split_cfg.py - -Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu - -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC - -> inputTree = tree name - -> isMiscalib = Miscalibration 5% option - -> isSaveEPDistribution = save E/p pdf - -> isEPselection = apply E/p selection setted in the .cc - -> isR9selection = apply R9 selection > 0.9 - -> isMCTruth = use calibration E/E_{Truth} - -> outputFile = output file - -> numberOfEvents = -1 (all statistic) - -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) - -> useW = 1 (use W event) 0 (no W event in IC procedure) - -> splitStat = 1 (split odd and even event) 0 (no split) - -> nLoops = number of L3 iteration - -2) Intercalibration on EE (Ecal EndCaps) : - -Run the code: FastCalibratorEE cfg/FastCalibrator_EE_split_cfg.py - -Paramters to set in the cfg file: -> inputFile = Root file input data to analyse WZtoenu - -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC - -> inputTree = tree name - -> isMiscalib = Miscalibration 5% option - -> isSaveEPDistribution = save E/p pdf - -> isEPselection = apply E/p selection setted in the .cc - -> isR9selection = apply R9 selection > 0.9 - -> isfbrem = apply fbrem selection < 0.4 - -> isMCTruth = use calibration E/E_{Truth} - -> outputFile = output file - -> numberOfEvents = -1 (all statistic) - -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) - -> useW = 1 (use W event) 0 (no W event in IC procedure) - -> splitStat = 1 (split odd and even event) 0 (no split) - -> nLoops = number of L3 iteration - - -1b-2b) CalibrationPlots.cpp --> draw results of calibration (run it after FastCalibratorEB (EE)) +List of codes: + +1) CalibrationPlots.cpp --> draw results of calibration (run it after FastCalibratorEB (EE)) Run the code: CalibrationPlots cfg/calibrationPlots_EB_cfg.py diff --git a/EOverPCalibration/bin/BuildFile.xml b/EOverPCalibration/bin/BuildFile.xml index d9299479d8e..51791aec2f5 100644 --- a/EOverPCalibration/bin/BuildFile.xml +++ b/EOverPCalibration/bin/BuildFile.xml @@ -8,8 +8,6 @@ - - diff --git a/EOverPCalibration/output/MomentumCalibration2012_charge_charge.root b/EOverPCalibration/output/MomentumCalibration2012_charge_charge.root new file mode 100644 index 0000000000000000000000000000000000000000..044d8957fbc70b980c6c8fbb4e2a6404f978431e GIT binary patch literal 90974 zcmbTdbx<5l81BpB5G1%;fZ!e+76QRFxG!$O-4;zCI3YkF$fAMZ65JuU>jqtXad#HD zeCM93TXpJOsXJA_>3*N?p6;HSnm^{5*TdD-3khjr1_=qt8VO)!_5$FgZu-K1WhCnV zr~ovjkdW}ikpN7DKIbyG1RFod!n4P_J5F9&|34i)NdH~PRe?mr6G{7jT-o}+acDa7 z4o)_FuHIg5-d;RvuFf_tUf#~K7ETV99u{5>t}gt%eEc9QdkYUcoBvsGd;GWJ{~tq; z&|YSDe<1=12{r0v^2itd$10EjW&!_iTcfi5ZwFjq|6{zse>(uY{ck*uj)I4Uo4uTe zhpUGtwjD^$RTd;C1L8$8QpIGaLJH$T@&g=Y+)0syTnb6#WWpz+`0gFKM^5p-3ob^5359r`I9Kg#-i!Kk&< zH)||iKStkDe2cl~-824nUgaIk2{PR|{A8J2kG~gdSn2uJV7%?E- zh_L|9&CN#x+Q%pdH`Ro|Tj z-UEZR*u9FQ4byzSb82&b;M8~^;9L<935?F7{gjwZ*Q<5RDnp;lGjVNor}L$5g6pl} z(m_-D_OLMONOb9&G)-Xv$>ustdQyh+0z=F{?#5Va{tNaod?Ox#+?)e7l;BQ#_V#U+HK(i2}25+o~poM)LWq!7ofJ z0~g4MyVEbotP7d(H_nM|Le7dG2Q@luA22^VPdJO-w~^Idzr*;JQX$p(x4La-Yrw;q zc}T1Gi_J(T-RD^s(H7mrA~_TpdMB5g*LA8+q&3TbG7HS?;$~ggS55}_%YRrm-|}{A zslV44?*BudUE8F(%praT=lG%9Oh^5Fc(X*>tSghmjdI-W-u%@r7tYMZVi8pSw`vl)nMA!vJjz{@}V{hQp#du;~|FZa4N%O zBWImJr?TBxn6lB%9H5oJkV zHOvuH6!Z+vg`_Z7d0iE9CeV>F+Du^)$qf4*e>NEINmWr|d-ZFP5w$0%*GXo08DvwK zB6?%=SU9>mr@>^iGy2hz4dR>0h${23zw>j-#C;o)QU)b=0n4^*wo6ff+-~=s)O`xn@Aa}U? zBL}TYll)NVf|H#3qr;lpP=NS(ks~T=7sSDC{;z^)Wx0MpyWpay{`gYOVn`j_Yh?N? zT~ORvPjA#9Qvk@W3rch9jY(L^{k~_8O|hv3ts^0<>XZG}KJ{%&)LV6o+~^rJ`wcH- zzm-s1b%orF84~*)FLb|^FjDoXP$=`7H@1=JO1Pf-KyK=c;F>qyqR2{wkUB;fRL&mm zMYt%s^4UjSAq=X!yXHkICbIGcPdzFOYP04|>9>MzHjo!Pg3*EBxN?O0nf`5jM>uMff@t}r>%5-j}INljXL<$btAgFeNTJo0e&6O z+<_ScVL~;5y+Fr|Y65xz@&b(c7N~j(&PZCnf5*^!dc_WjP`Ta$3dGjK~tijo3!ZPbH(Oiz-5I2d&X|CRSv$b8Er!U}d_x)n{<+}Kf;iOv+j3O;5^X%bC&iM3wl ze`#e-X%+}Sab$;kA?+LpbyoCUp9Bd}~-xZmE2W~{+&DUx=JU{307_=I2nCS0bi zbiMOt^}i9s_;vU9o2Uv5Wu~KKw<|@K{#(1ZF$`T3^L+kf{-xO#FGGku7jxOm9v8X`Rn!S zRkH@&2Ji-#@QFP1>5oy?-96U5vEAH;4uyFDMA$Td6l*k!O96d#5lc05hkXg1fL9W3 zRRHAaxxLY@&ThaaKN~+P?f%&nw0df#q$|M7Q{M8yN4<-w(0RPTBTVU!pvk)fVP03A zI>K?nF4Uc`#xQeg73?n~1@}mv%qMndR#fI%dK7VuTzz~cdPkS_)Fv!k%%|tJNxP(~ zH8F9hLu+kTpe^1muTH*ffu2f1|sCMp(71bc`sw3)pUKlS1zU1rY~f9CDIrJ1+N zue37tZ#PIjPV^^97bpxNbj~TMXL_T)fbAyfeOd63o79S8cYt(Pah=iwD&7e@JUYnw zSNNq-;4#v@oP8yUQ6%Ejf*8z2nf_*1x=7_a@ANW zN(A$Ea$$&3=>xQ_zR!nj>6<^PI;>Iz65bG93Q8bP+_|ji#(&#|r?g`;|G*COcQ|o+ zYlJ>}_Gff4ji&3+e(34D^tvb>?yOrEIC|@*s=0|WJ(KF){>0qI;|*;_vl-gkx=t_%Fmtf-q*4If_t z*I zwd1N>)$>6*q70Po*YA#lOnn?Vd1Cf?jjkaSaMam^J=)X0BmHPH zjZM$8Y%*!RSG=ZNI!0dv_T>iFD}bLuqhB@U!@tMg3#|L@9GlPTCw?Z&m>ayi!o!o| zgL%7*wME{2Yxh;~dA$=DxxGB3f1n97rVg})nsu30fpZa`+__P0N=f~7^pZ`Ao^*)-Lr=ko5_f(Kf!DchmfYT zM?wAjSwL{s(I{&w&CAkS(uE4U6#aGbjs$Zzac9d!B7 zTT$~=rwLPu`QXY+S9jB|%K4sV+(6qwY5^}jFwa&4vT;{TJ)V7a&7s&IIPR(ABMmmT za$5f4U3@7%vh?!qoa#K13$ZEhq_^1CmpI8KxtF!1(j2HfywG?0Al1T+uZrIllo{Z8 zj}ll8WnSemdG32?6>b)#SOazlID@KB9JXek`w`zRSCT&di1S9UtS7qx`*l6qZkp5> z?t2Th)@!JCSn8OWF{GYpo?5+=$odEF4V|BqFEby*v1a(Ba5E&`31lwqdJc!Bv*;rI zIG4?q!yX0elnm>M;4vv0V+#;ze#;(gxZ5n`>3cm%<3z8&^LHeys z2-*Cz$|ROXOXJ^LS_;{j%s2$O^v1u6zc~w}C^j|`tU1nEtufg7e2@+K7l5?++X@W0 zW()lQ{&&a~p?cafgM#wv@ZlBbc@&oL8opl{*Vo_k^fgUSEfbA?5;yRufTd4vc-ljz zuFeTp*P{Zmuvb@t^lrw0ef3`+m#qaeAN8-XZbed)Dge_v}KeiIeETQwJ6q#1i)9PItihd1>#ru^l`h|iv_1`ogp z1r__2$}wn2>G|P=8QXZI<1z72`03%4=Q&`l3ghX2cM8ED486ENRlVp-408liBv;X3 z%=#A?Vn_Q(o0=2r{s{Ajke0BiOs*Th5C1HGM1#p zi(Ted1;}?_*S&i6LlW)&_TWC_HWqMy)dXpdi88P8{nnlM z9!&XJ{<9EJ4ODT<7u2E2S_G%+k<+5`pOj5g*D(I`{d8pFVFn#SYte3@fB{a*77TiEn4L1i)phA zlu~KZOrCiD2@FTojI-d2kkH!YIk|Q-Kw;D|>Kv6+SfTfcIu2jt`X|~CQVkjC>Pvz$ z^Qv?>TbTZvFz>3cWo|bwat3skZjOtInx@tFMM>j@R=mmrORgV&qbJo~tBq8(Bb{%M z*Y^{Mnp>`Y;`dZXC2yc!6?yaLRhGtIh?oB((QcqCT?vjO>ad@l=FpI0uAcY@A22D( z-5dMdsh>yE_i2(jDR!|FYRw*hY-y9qu&aO{jd8Xn4O=cNnxzAHI)2ZIAPov$g@3E9 zkhU#%1~qt+i3q+8pmz2|E8bbwII&Ix2y!3QbO<69ow{#By58lgMo`b09V79_1gEtv z;j_MPTsnP}m#%_h&17z(dJR7w(tHDj3i(T}&C}!4!=&zw59@r+2&A*QDON1v?lOK_z=$dUe|i$~bn$sB8-9R;yeE+Ar};Yji4RO9+spkg z6-VoS8e;wE4Fx(8f4W#Ac!!_P`Cz9dqDkwEZ_Nbl?W|KHRb9@1wRP05Hjd)i#n!mf z8nqqh#xB)5>!`$+q&vg2B;?$Wm>D96#N0LCW@y{RASX=_ueK*FMYvOI*>3t14{}l5 zp|lBv&g!3x_Es9NSxxG`5pVEA zY+4UHD3`}U%~PBh|Ifne;Li`E-^o!JU5g{CJ8J!=QrWQ9tcf#q+%ADh4lO_ZOE*J< z{M8-$7~|?jdXb>2Ch#Bo>0SKg1>s9nJyzL#AT+Sd%6Rwds!y%I@S7w22}BjgHrO-; z%@zmudj`ft_oWV{gw-O0>ZH|^Y2by%rOFtL34Rl?(X#Dm92H#hqxoRobzaFpGRIbL&aCju&1 zqQBammM0!sd(gb@IbitOb{3;f zPI|lrxE^@*dUmBl9J=@_G+84imR1-II#G8wDFwK>le}N_FZZ?RN@hr{3!Tmsd#`Yc zr8uy-jxwNt#=mT~ewaP; zt$F?+B$XJCUJ!YQ#t}3LdJ-3py)X@vm?V8%3r1SCllrjf4A3N60gIajSbF`i)%pjEn{8>@VPJ>TqY?cL-u}WVBkABaix678D+)W)rb?=^ zR4#FGPFdhF$|wD!mb;+|4AnA16fYL#>SucpjwB8C_?<_l>WF)Y`=@bkt^SAay`>k} zCcIUVeq!>SUjS9p1sL8g=!;fU7)8axp@c(5AqT+*?qwY&PY2D52GHJ+9leHj5!0t_vLKLwf%A?c9_>FjdsF-d3hh(3BKiDsa z7IyJ}+aa|DLwveyr;l+Yp*ekMsWoG{Y9 zA4X!MJiK;9zjtj`Ztmx>LP$(Ge6Hdu51}N`WL(85G&0t{CKsn?Q7)}|x7Sl$IG(Nl zd7xVfHskfdfh|sqW|>op_-fMibPngJUV0@3*P(I|SwKSA3*ylVuB zaX8<9*K5D|dGJZPD%1CNq$xOe=2O5p-vFRw4+acMj}j}>@vE}cVAC}G;`q%aU13K< zZ>T|$7a~RR)@~K$-065xIkBCJT`D}z|^d(r|I0JBP@BegzeE9;AfOI z1Yp9EC2<>oep0l%*Gq55>^_2crqwLYN^a5YNM9`6zcTJZH~o@y!V$r?lOfhPd?Z)nB1 zp=20tsJv76A5q4a6H+bGrm*Xv=BRU;DEW}ke_4kauh`JZT$eAl0GTv3g~s5Q?j z8;TEQ-C6#UQ~ina$QAkqi&}K3m+}RCtIi7Di>J+q>;69J6|>8+qhjhwl}mZ_Pp0TC zw&!PejW}Hk&h5RM-yNjsUR5;(kv~q^XCTh}7&IGQ?po%s!OHXkJNS9tXGnLWsL&=Sw0_B%yZ0L#%w_EgTILfntZ%KKvMDsr`}3}SY*k=P53@0EuMleKUNYYUTK|9oRi z{Ee0WXxigfHY@DYxaiH}-O&RX`HRQaJf3v{Jh`cFt2_u>Gd$cFB9zF+%c1Vx{C#G9 zN*8SH?{Q03#me_$vIXlW1^=iRaAj`;PM^@Ptt;53#wi+tOD@Y4f4fJAu3vbTXS2Sg z2&~FWUni6b&jaUw&GX^1;%NAZUDRON?T8XNG=v8lKJ%v1*!tps1<^MYE@X;quMB;wP#=1>jIwlYjkVtZ8_glJ*%-z3 z;ee``D9qa5So*DrcPB~3)Mw9A@LsQF%CPxo6QZ7Hr-oV#%g-k?sqtSAk;rjOiY+3TR4(+PlmJtde?T_ zpbi9D4>!%^D3PlX1omYEu|3MWhiz2XZpkzwPUY8R+lttt}P)_!6TbCIQ)(7bbFRGwA=U)qr) zy1#MG?V3zB3cYp=y&pgTS%`9S-nB>MQB@~_R;#2}JV3VC_N8+LhvF!2k=kFkIomXJ zsV`csS2OB>-V!M$*&8sbtf4;&n{h2(EzWW5+r*rJr#l34P$S+Ds`a(lJ7^yusN z7=7NbWj>4W`FJLAFw|$VFXNJrXE3MLo}C3T^q$3{X$hI+V@8T`5VRehSbXZ!nt%RB zZ`~BY!M5Evy@D#6`1)lL$M2iI=JkEdOR2XjP>Ot3rc=@Ef*^!}z~iJJ%xgehc|oqMuXnbz?qgtx7Uj z(Qh9ySfOeCQXL~y&bUnEX0S2o_C@6hJc0g}VM3@Ji@DtZZm8W3kQ%w&P5{U4T}LQQ zU_hhB+BNR7Xs9@u8yxj`x$6!f(uo9TSwo;_(S==bxCNt+pLF#BnwpTvSk^YsO{l|S zIdrPs(YcSiwgGPb09~gXq#weXV><+H{%9sS@3}I4yS5o-Yy7cHa(aY?T*F4JO6)Eu znxf9q8vhMiT}gRf_|j#1Wn8Zl?F=0zcrjjrApHsii) z>rK;Qm>uP!cN2DiavFQ|>II^%E8MkvOoZ(Nwi_6|sRKpQi7uSBfd>FB&i!#@JUMdB zw`=o2=?2Doss`h~@cIRUCZN*kzm6Ax$}i;$K$VwL#SNUkcF)hyd+i_-d9?HyXK4V7 zqM?e2-wDEE{jWpA%@e764DAD*k2?K*wI|9{R5s&R;GxNTH&68LF`Cbu;!&?_4^3p; zJh2%@#<^bNf&XGzH%~lPVX#iI%<5XKyuD6!Uh zzU>~%{`^Kf>c3do&6B-*tl~4F_yD2up@|A>jVE{BAE;*B{eM;7yuagpsKP8n%gdZ7 zV*@L2$RsPW*o=zZi~;TBw;=&;;dx|m+Sj;sT@-Nr*iy>`N$#twAmI3Sv=;ZK`SRb{ z^iwS>*~ZOeOeotdSx`~DU8<9zRix|@GiF1GJKf`+JHqeOWtXnk5_mjSkvLeVm(5LUu^tAm91IFAUOBIS)d^ zd&HAP9I|T5@+hV=w|lmsn7cdlL&?|dxm2r;5VK3X-Imc0uuP=ODDU-}RcP4wQX#2S zCB|-vCHapx7?%-bF(6NTHsX}5TY@iWX0kUiUA z^UjrPGFfB5d7n`_-^yx{mIn|mGrZn-vJ_U?)H)JGcl_`X`tI4-NIFE?0|>E z-Mt0%&#iNP(AQU!Ax{!@Uu%$}HmI}COA%Wpz-`6UfPRgEmJkRKr@ z3)h5?OJ@JF3Kw5pIxn>rNKDd=>%#^6cagyccc0f*DdIF9^F530bL&o|z;zF(le*i+ z-(7IfqLpKx3(!6`t@e$S7W@gT1VZbbZjsxbb@mBk=cJ)@z;hh{^mi>TogWbA@n>pF z$hSB5MK*hKGy3!tDL+~+%LMPYpHe!|9*Q20*=vqa@7GKJq;lKCj-9_0XiRpJHJCzs zt{jaTs4|3drR3ily0Cvha*33a_Ptq6PaboKp++Yi$)F=->3_+cjTOT-#| zGHR!=g10&PjtiET9{m*3^48JG6J=5^t>%dU9`PpE9%_65hS{l?L0$^eYN3E zhsZeCtb4H(S?6qG2ox{HNi$%EpPzpE=v&ZK>Sz4)7QGOeJc*4uY(I*5;!q@vCk?gk zy0sYBuUfnNrHjX%_}A|XxG?HNcwwjR(Is34vC?LsX&LD*PV8m5tu$H??;F2yCYn8A zmO$~y$AfEq`N+$Ya4CM;e8gB;^)J{yRdjx8s~YgW-yj5UUB`eP=;{ze&wt!0k#c!a zk}i6UHi`DCvWh(A5$4?@QBYp5OvA))`k39zs}VS7Mx%#`CiZM@IIVUGt2!^x(>{~T z)(H#b=x^WHfyQ8U`{jI>CFQ;Ww1}ugG;W~pY>)AQS=2CE7(YB*^(v8*O?zBKUD5NA zpSEz~9~2B^Z^*@?N6SAe5n%k0wzL;^NHY$JGd?$uUI7L@S08VJwx=c>lvWaUPtGhc zUvG5u$5zY)@!>0ov=MIQ)2fmO+|8|VCaE@R83Y(%F%ean@Ri?Vd&QQO&cxt0NvS>X z?WKd5>-1=@={`R=EPa1)q^vw~EdJmk6F3rTw8B^!T9kLE{iLPC+%iE<~Wecy`nrDs*XVwYuM9ki@E{3DKK-mE0Wx{BFx3 zZRyqNKFK=UywlODzf#o&A6s$-k!}WVH%hqkr0qOb4e;#0pY{#@yuXOMOV_I+s~-P8 zq{O88(qC$4&P-*+f@A9V;_h4-rJQX2pj$c3kNa8s{>yF^00ket_z``mx>y*+RRT47 zF2_K_b2Oy!?^=G#7kYQx)s|htW4rk$g3{lzlRQ?jc!m?G(GK1d=NSICt5$$ae->U^ z;jjG~i?=y&$_8zPaO;wuA^jy{Y0H~-qm(*QCQ`e!)m5t}P_QEL;fO7)t7X63z-BMv zVHcFbYmLB+16lYsVgsunfjo^8C`?w=)MglsmQUbxF6zXmT`IpCDsKb+zx_(a=-x|f z#e~k`586(zMGo{Vv-&K>=SY)w?@0Gs)=w6};CEGvxgaa4dtcW+c>Ezy)C!1$M_E6k zOm-l*0p!#rf@1xyh{>xSH(9O>*Z`)M>N&>!i|-t0=E_M5dw2&aZHwq>!&OXMu#16v zuIgSXpb{Pwf`Fph?>GDk6($@=6(tCD?2OE5<7>PFsyhfaZ_YRVqH)uQ`LC+sPE6rr z@X&em0d3t>HEwd5cT~=zK43)YJHScHg&3_uR!9m*W|Ew#_JI*lhyc1x!uFfH ztI3-RNXJJru~*#joR8km^1-46dEfp~x7Or@cpUJ_4A>U&c)B{Wm@)4z{R2|=^UxjZ zakY-ESCH<}^qqi(e2rIjQL1-F$tNNy(P5Ln9rTOm=hxzGJmynV=!PaBtK|h6Z+gCq zHbL`#$;&9yytfnNOmFXEG3?Ouq_Q_{{mt7cT3-vWq!x@HI2ZvJzkqpNyXRo(QA#cz zM2!>uce1_fUv0#$@yqnJ`FD`GE`_vDgCf9keTdCN+uXgcIiqU$?l8}rL3LqtF)k_R zNZkIgOuAh)*I<%BT)_P~o@@oaNaJ7wF4UdA`goY#w_RrCW57y7E`Fu{rWHwrf8_9OdvFN90UDZj{%3;!*gf_6_~OPK_iNt*EoOIr@sTW?KvEC0lS1C|mkZ+&zHmzS$2f{}o@+3r=gS z``KUe_O58d%C)HFx{S{jIBwcHnxD9^4$Qo6|I~G>hmVzbaQ_)j0-+*Kyf9#^KMj(M zzJP^? zp}c|bw;?L#{k=k7e>0Fcb(RqhcyxR^0K^jUb&9VZm3j5GQR#a-apo8o(wqjY3uS4W zTwkX``-2<*u$Rk`+>po~wRw|2Qo04XQXJQ9v{|(`N_B7IK14wL1@v5TcJhk4zYjd; z^(U5JPIS_JOu@gn0`dDI9yUQwS6v`{#Q*N}Oq&!|L17EeT#7X}d@k}H^GzRX>@B6Oh(=F(Bc_=#LIuejl4rWt4JWS}(S&5ISnRr1bbSchJilyo_f1gR)s z^wD-wF1IcJEvwiHptg7SclacZOoP5^>+gD$!QrO8N>37ZsrO^q69dQ;eAa z4=zsk?+6r^?8jy~ETp+v@lsjr>7(#Rr(ZoHbqLEBJ!`+i7+fPf=tvfpp2x;_uI>WU zgm_tP>>8Xd**CMprpQXdyW5|NPu80`5yp~1q0?&Mhqv@-wiCQLK~N};B30ERG`~Fz z$3ai`3ySnTs|2w31Z8%$^m9q3@l)dje+Tx749e}XiV5VGJ;v7LH9_AtyY#OHQlB3* zsLJV@^&+l(nk=RYG&p}@Cx1KjJL+i$iv-`MtvXBRRJH|KE|aV+Eu_4oVMlrD;ea|J z=Y*#Hm1gML7t}oKDRXg z!w<5vFO?K?!BL5AuQ<+{Le*L~jSSWlNn+l%4LM&0+-+P++I@eJ#(k>md!+6cJd^~V z4jSfS-&E1M6`_{Y+g;o87+_exKOwsykK3GGZpXXN=$Z&fZs84Li-Sia|GJ_>vd%k_ zoeKlM*Vt{-^gbld{Uy?-FFY3Ueujmn)j}I(D|xqFYBoDGMSp)*bKo|fT9z)O{!y%=IY5i}Ov!3PgTCy(en<}&751xtyC4pNoDnoQ`k;WG5+p zbzf}!?k7qIX#AGbbr02J_4`rx7&y$S(@)a0o#a*~gYS=FVjyb zpiTkGVy*ApQ2l<6W?}pbW|x406HNNv#mey~TO@0BTU)8KH}tX3?tC2<=(AscZl!4p zk)KTZm}WZC7fWXGi04z4FvrXG&RI@9e^YZ=IyGSwaBggPKyo0Zl^6tERGS5Ll|Tsk z3#L9PM{3hJg|ej5K~=b?Ga4i{5g-z6e~uu8W6; zE;_3PJk|6BNr+58i}aV}tilHak*wQf!WNv!awU4;QuaZ3L8cF$Fbz|Tj>rBX?O%h4 zA5l7+MM)Q(2VI^Wn@_L6l25+i!^M#Z6dnLcQJTk)FQ#VMg=fU?4C#g=-FRauEY?iZ zsJ7YdZjDMvdpYXKLy%=Rbuq3%r)MhdSaGNcjh#E6JdX9+dXE15V<;yRO)%#QAv+jbLOo#mLs1=_C;ebF9Axbmv!i1HQs?!-4zoLF8y~Qy39HcQqA5i z5A2K1u!{UL-}!#d$#En1svvg~O^2OC1pG9tRQyu1;RfXv*C{c!vl1V%cG|lVpBVNm z?YlOmLwhXsM{~kSA}QRa6Ifh|;%|P0q#=uy1Ul^a2k8O}aXR8@-XqU8k_d2Z_XDoX z#lP_#5^E|ux4VniB>1wV`KDhZWt?6s8V-NR-PxlNn!Q7_mOJY5XDg8fH73M+$UXR* z`Ly;^^R~Yw@_BY5IV~PfXxTgku*Q$6#MdIioFrzz4YTAWs0yifGe6&}@L4a6b_{i~ z2xsdC3X-s%WeoB3+UNTGTR6cgN8NYd91%dCotdOqS7x6H`zdt;9~<~q(mG+=jcdAQ ze4ugt^XnPO;xCRvJmg@@!TevjXVqq|Pfu6$O$!>F22yD&Z8|J&->$$&E6Pnbc%XT6Q zp0_dXY%J8LrN*UQVvbK9#EDtI%#3UNNJMiC+ZsE(NXHMi`g!K+723H`Vp$|=g7-|Y8V*|p4_$DdaVjJWq_m}0S<=cI>~j(Q!LqFXPY|5U2g2%83dKRzzRO)*}+ zk7h1`jR|0TOw$31nhYVFD;W1@KWj1@Th^N!vn$N5sS*AAP``sdK)pQq%@_>rs-u|E zb<~TVj;E~dfCDgWkqQ1Yf>u5t7&VKW+I5}OC*{UOS^`7qRHvCkLu~&soT$+{&AhPC zbiI{W195qFbX;?s#>b5x9WG)8Kf>5P>v8}>WG~CJe49B9vmunw`5`3~&Llk0CTN z1(rJI!>OMOgxKl$H2BYjf8l>wzhj`t>4YG8hn$Ed5?Fd-Tu4tl;zfHXnPHA)<4zJPNU-OJ!l_EZ zl41nK#PJCRe~9|=hYILgCSNPt1?7I_%TF%5=%Z09ZHA)&jodJj#DD4dNp##nLehZc2P+2A zE#+;$AT1y9G$|PIx3RTC7wc+%%@0yPEXP3V<_lah?3r1;$IyZcWzs$Tb9L03f95uTt{c&^FVM^AvPRWnv9Mz%ep)d!_!?G+ z4gq1{R)S~bO*sxOR|zmveC&*mt;KV#or3yzPCkTeS8}u#V<5URis8cb$Tr>@D;7DSW~EC)4;qbZ_C1s32$2T(4jWgP?V^q@|;f)jtZ^ z#!^P&e@*Zh4g7vuqph`M3IF_Q{fp zm&{3r@`)KeNESP7ZmSR_Bkgs)qj-*QgVm>yY!-9xxeM-;RAj+MSUq~DQ!Y-62Kz`u zmyUm|LWc^?lt%qx+3XIIZXiQ#5XyA{L2u9VZyw~*6IO*8&aNOghXC@l$cqHmU9SgI zY0+UI+Y|+A3TQX2%=R`*C4beaqL17)p17WP7LAG|;L8(`-n6vRfpu^VXgZMxQ-7iEgB+rHpNJ39M|zHgPuvq97AJ137zdbb`pa(f9KKU{>?B#{FvL&c zA~2ti4QQX6@EOT@D8WcPn1$VjZCfXDaIl#CZ7O#}IO<)6bXyspz1U@b|Epal-1>iO zm&yH~Nof-QS5g{C?dYaogED3C^>04wKGpgjOmKT&-Wxbn&LAb^CqI)=DJ3%MOV zjFS2FE~d^PzJCe!?4YZM-1l~w%49g@FuW8pRHq(}Hw=G`Jt%7v9b@w8HkSHar*f{M z>O9$`&Zi@3yTXZk6?8PwZyaA{IF6rhkg&*Ow{XBn<%p<6#Mt~3j(*2#ZZNtT_4mq6YCvczRlswVmtnk|6 zte1#S(RoZt={;X$ZN|xC!%q7K(2W7M9_tPlfXmZ}Pk6W<4 zgvOLP*hxnUbJf}rMmu_<2>QMw)5Yr&MMk{)yF>>9!v9ss-|Xrh?*HK9tW__ zXv{F8UDhPRJpqX)6V|EoqEM=NXT-w7>G({tK5?!})aS8>&X|T`jD;%a{ER7je5g6r zPy0qx#e0mJ*|_R2mSN@8nVm!S-`Z_$4P}Z(>tc$UEGtFn4VR2L+el3c zVO@<&yNuvWOHptsfl37iYIuIXB~Jnsd)b2Dtx0n-E(o+!z1%51IDJzgHDdP4@TtjI zmTi-6Lz6Kr0UP=KN3gb^;E48>N1DpK+q?VJg1Am87?X9z?D2$$2XUX4?uz1&>ldvA zf<-2#8XKAVkF>yKPlNIK&64j7I{jYx5hhA-5I(9V=M^atW=w}-nl8uP9ULagDLa41VR&IF&^Ij^DXn?ASF1Wc?P#2k zOjoCcF!WhbW4n8wu0qcm@O+e;WwUlh%?y(iJD8YehA9p;!m9{h|1|x`b1RefP3D z#6Q`Rt?$N<@hL$;UiJyei5m)<%0Qfg($t`}z4fXsaI5Icy^LWfN=a_~1bW~w^l5ot zV!gLN?!oLD$NyWew#geOELSnu8NFyLRULm@d55KpoGk-7AYZb@*4RVMj302It$bX1 zD?`t^XtbRs`!!?;gz*eKg`hl3u62?jz+EshgjiSAD}-2g6%_*5b@B=U>^`9iqV0mC z1?6)A(joYf5xzZF9Qk@*eGVcoWL2UaF@ zK}l}KdKD^U>2YksDgDsnMxw@!_La5f@m_|*_$id^G z5OMqMo!3Uq&8WfZdGVRX_M1E8i%rew!Q*+^nSu839s0%QX3Su9Eo2v$7ZP5md|~{B zV=V;ruiIwT-)^2iwbplpih9P}mA_;jq+kof*+^WDwcGG>{Xo**YeC3!VHdbM7~=|> zG$Nq)XTXRJFhB%VM_hbKL5CButqNc-z)N4{LHwOkl&;@Q)&Joa`xpd^va`H^%J}HU}E>ePA*A^}{g9p6Pj8t2& z7d&(-(5aSR6|Z0H*6xr2#7o-An3)d&!9k1eTN zCcdnDT-A7!{a%3QgVETYc?*2|guM*8-8pBxUQdcO`0=~X=pms&pdxx~J}W{waLaU( z<)L{Xi}uwb-;!0%7vwnI(SH}lwBaswP{XM&%f;>OeFjm>H#b{{TePiRmw`6QXn(`i zvp-P+7b)Yad~PqN;6sl<(O`)?qRW|UYxo-m@<%fw&U(qAU_CEvQ3i}hmrMSEUr_Ty zQf{-$UYxk8uT_a0C^f%<;4IT)s5 zmm_U$PLtyEeWJ6(VN;ctezU6Q;_eqKzIfK{iI&0|h9!7Lb*>Y?r;PIyX|6rW>IsN@ zrLxae=H7(UUaoKbXm~!qc74L6ixkO1&6ZlSS)ef0dWdQ`#O%AJima}c3KRLfVTo*VHp z(=O~tz282};;Gefy!_SqsXrz5piATf>A?pV^v$V2#nnIX|AViu42r8=x=liWAi>>T zf`{M??h=A~fZ*;74nYTZm%-iL3GVJP5Zv7vIc?5*(9`*KG%f<8KtC1zT2!Fz0{UD>G@wnxN9mZdZ#IU?$(dPaA4G2?wWhuCi)I z9k=FW@9PWfkGRNwo5mHInilie$MLs!`yy2tAN^e6##vB-GkQD!bnx8aYfrqI9QPIG zx~EH7*2jnHSzsHQxMJEBUTZGE-RU=5-xY;RDW?B~E7?&$0&A$0b>|HjdR55Q?a5JM z6;%xzi;(JgdNw`w1Q5yXsaHU}HiZOHJAn4j@O0B>=_MN4zgyNJdg8AXH}ovm#p=~? zUg}qM(zw&X&Deki>=QUcHH#lPfE3Tpq%t>{De&=W@l}MR|Mz5l#d>4>+*lqJr5N)smK<6@DPe`<>44(uup)d$f11g1|lB2A@SjszNn z(_+;_JvkfWuGo=JTxc`PUk~rXVnNK_XPX4p@A}G1^0rhnga_I!2n*f9ukAH_)tVD8 zJBa!A<2q(mR4Y=pMK1St4JJ2XOj0Dyqkek)2`^Kd8f^c-tI#t(5<;=}&DG0xspfU= z=EKQC&@%5$lb@2F$!KOSG-$5 zgE%=k@<$`|700O32uhQ1t(w=~uE{^%oU~FTy<_!PGlrsCQ+XvomMt<~JDm|f>h1zl zkyieEVD)8rCF>0`^4_t|ji?;m(2cz3n< z@O|kiu(~cjFo0~DDxLz|{iyXQ6OYah&n6e$Y~Zul#|1)NBC*5VyQcu^6ICO z%t7GS#7c~OmWO6qVgUdaBKgwd9*XP~^E?|$GY!9NE|IWwC0;%m&=cqgo~_$ZHFp_9h9I5w*fVdk^23X~KgJ}yJt zS8$EI*o__cMn08K2Yg|&$zsWfT|r*{V6u^A)VH#(uT=O9a(4~8exABDNLY~SRK@K05X|E+87v730=()t)GW)}-D#WhW@Ee%VhSpxlLI-tw^v zr0!eK=3^%jNcuK}%bo}(U#~PIJnK3QJvDSrE}vAhY2G#NH>^-8bZs%hS-u7<7#*(Peh7sRJG`@mA=qwc7^wR6hVm3N_>0?mTvS=7+M9rXikZ zvCl5ws~wt_;N11R4sQUGLwoCEQ|rlyyvJ@Eu0i|bk;^?S$I`EBpusvT0hw!)SBxvK z`Yfc(+goIEx7jh*G8-t;=FIJclE(v0md?rX_+&Z>BQg=FlTW5mKDiQ2NLbx7lNP=I{$KYp*-u(Am{#7>aT1 zLkWguiA3Lo%EZ>0#XSl6^e%&D6Du# z5O<6VOH{Nf`UebW+@iS7A92AYmkXV!Zm}%TYrUGY`@25Dr?}sO`1k*}7dSwMK%ds&j#t5>TD^S(n_aNOE_83n3LSRQ%`%WmaegAtje zWD9nkok;_dD`9Mw>(+brSyG6diqbxv?s2Tr+fnu+=w@c5df~*1p17ArkO~#>81v0J z5d8x416#RlS-l51C7H_62ZzBgsKG})}E94)R1Qrc@|Qmq>a7+?V!uOr_URqVdQyPVC!wZuC9JH{@rBYZc17N^rK4f zJ`iZdpHfHcB8n8XvljG7w9kAgYE}IBn`1DMyHMh;*@Q+Py+&E_QGULZ-Kb8q zYV$NT={uh7n|QvfkJ!E^vGcSlN($#l!1PT)bta%n@zsvbBw1K_xKDtlNP793vye?qq*a(g(?iVF;AfM@Szkb$^-_7D3zW36U6LZh*Pw->!zY_H9=wy7|Q}SCF%+rTHo+mF6zKs zx*k-(DtCIFyWJ|wv}sj&(}*k=JUe|?$v5#8jZ6P@a(JW>EzRf$tI;c$D{S!S2#>^} z#ufx>K zr3&_zm6SZ@@Tp$L=c#vYF4KtwVmo)4G*TKdDpG3%W@zL6$7Xx(5JI>Vdjdc23-%OM>8z_x^W_m*&t6_E^QOhAcG;1RpY{f_6vZyqHZ)KGi+9v_rp5cTUoG{G(^ZS{cJRdY8=DN$e(?H{F$C~qbFy@`aTSgmj(WfYQ z`GQC2?kwS-+HlukrhE5vm9|9DOR?M90p0H|u6hoGxL-bNu12(nmB5f4V6_R+x{&78 zW8(mQre5cqpX_f=idUq4@|)!B#7Aek(*DO(UEE^`@)Sb?f`CuGkjuGb<3f-j`Pz{x zE;(Y?JGT^JHw)Tcm6dBf)6 zH`^Y48PTuv=8e7EQ_X`JXiS}a6E-H?zbcRsTuOQ2hNd-xty=^n!_5bv8C)Hr;YXR> z@j-lO^2Jt)q_Mw?^jm?gq7GFz*^k{)@bFFbQ`V(cCcRS~DAazo0z!|V`KSokuhR&I&bx9wp({(>0ev|PE8{TXD=KAulPE%d0x zad2(=HJB3dF3o&NxFB<`abXbk{LzXw4j#=bv?;dDV%oWP%~7}hp@65i=~{%#3y>ER z1`~_KE^OVT^YW+kvQbHRI)%mw2Y9s6ze(}=S(Aec zbb7$WcH^$Wo?ZSZ0<@&MW~=3{S;oES`~_xqBm6v6N$JzN)+m_2e)_CkY}JKh_qNMsLR6Wi$Q3IVsK&=0=q(r4r;Pq8-kVD0 zjaV?&R%%A1_{fU(TDc0^UyQtdS_%%e3!N(O7A9R1j`Qvq)|qsOm95Vb1JY*6h7+(N zJ4}O;TWuFgNJ|5+YnJZ}l5WY{4!r6E^Khzz`=KomC!w<8BXDb)3mK>Wam@A>6NrT{ zj>F&(LFx`WMG#6P{-gkm@-9dlY_l_4jIP42Zifk4Z_V&`t-t4J6eN`l@AJ7<=Ztj|yk4p4ft-K26gWx92fJvKUW@vJ}*v)=6 zn0&Y?m29$8{Pb1BFxMLSSKT__=gip8*;g}h-2x5g$cGEt^=#-l-KBAbX>raW?sB8- zV35Y%ZxaLetG@!=t$Tso*iwhOFPhB6pNGN|NG3?QMTnH^ie0TSHdnd4`5LludRms{ zAH2rll{#JFE4gGr<4K(k4MhX1p=EHp$JEKIW-OnP8mXWb;6q>=29j38+GsUDQgMCS zNnhvhrkKF;pd{2^;*aByLJQtsR_42?wcrxFP~`fkePM%zCd;#h)QDHX$#ch^H{Ff( zKXo@{_WzIW_RpBw_5T`E6O2EB_MgZW)5)lSK(TpV_Nz=X)Y56wU(IHel@QG1tWA&; za=fxtrgP<6e@%-l*F~$viHM)3l_9Jj{S*NF%L=mpXa}%2+O*p;e#9Sj<(eID)ks&Y zB%^y2KTAiQA1O1u9n7zi@Fu)nhT_~Ix+U;0=z~kWDJPcci>oHkOTee3i`Xzn_(KxT=>aGx3`22Y6uI^ED*sG|ta+Vt+$v$B{D5t*``lZS|X z-3i@Z(TT~hQvEmPn5~Q?Pfr!W_%P93wCKCNV@!J@mAt=;L!dC#FZ?@JWwDL{o35LN z6azn$l_Qbb?p^N@Fk&YTeBORu2O`;ZG30RRID2YjSnV@Y@P7z>=KN=P^*zR`vyL^}&U14WlVXwrhWiuhCi$ybM=Y zw5yiQOV4dlqZmnCsreE4n^>F(zSsUqw?d)%;>-{#$K#HN9<6a#PHz(LBc0&qKVgdM;-LRnL7HI2+K7qlpVYUnoVx%@XewUo8cN>(QfuE z0D|MrYv1jxoJg(y72y-p*|4Vf@*Qh@?mRoX zY+wHe<-|T%bu31~pRJU?9yb19e#kGoOAE!&?9jgNi{H_nbV#%vO%-PhoBf8xh%~|* zT*EkcVmy4QTH;JGlEfxTm&o!&2RpK7!%UI*;Lrc|mojh1vNZ%sp6Gr(oQvqvjii6( zbx6FEOlHt9X$+_MF&w*YU#PKWb0;!>`AA}{oR}1GBBGfIPL3J8oYfHx-RUY^M~JU! zz*Uf=>V2haL)maddqL^uMVk*i2cUJ}b_YOp$t2$-z)ueslpLprs49Ba&UYD^jHFxpRagLcB$&w}5s?Bm&9xJA?V;^;@Pxf$aLT_qo@{>`Jn0 z{D2Ps$zc8aj*mTe^mrY%Z8(xYh48O@J5=l6p2xAT?|xSx{b`(Fs$ zGQ=q>Tg|qe@%)%YC(S>#d=?(K2wQM|+H@xAbcF=7!cUG)z<#@O{LsDX%PM)E24+Cp zMGk28$MHtV4g|}h?P6&?GzY4AM`kC0Ezx#~mhYQ`IlWPGBEVs2yHxqT6Y?@4;M{l& zL3Mg+?{OuWr`7xb9ytWZ6s6t0Z~3DW)-oyJt@y8k3-rd`mwcp~NxLvdsh?%3kLoLSO!?ftN5JIkJR zB^4{a=m05gd12)DLuq6p?iAzymeM(|nJON(o#o8BkxCR_b%ZPJc@gA~LpfzK?(F0L z9=%a%^3r|{FV_0u$8`B!RvQ`^Q!AEczvdLL`2gw$*?}1Kr5j{I;czx!P z?`N>^z_sPf>I`Z49kshnD2f|kd&GUSEkzhN_zuGhMi-Z#TV5Btx4_)S!~D~74dgH^ z67VP7EBbDK?ma8a*T?`YEx!~r^(EHGwu%cScuanwi4z)IH!$LInKo{ZdVbc3|Jc)V zpg)fQWp@g(dH{77Q|Z-lbwe1_%PqgvESRTx~RNE+x-n*EdHI!YG!rg-oy#lNJ* z>*9=a$1jugv2G-eI_pij)Yy-B2bnoODcUj0AOWwcjYq-HI2S{2y10Z^7!N%)opJFP z5+c(g3uCTuZ(8gU(tFq{!dBwo^@&2YcyGw|oYx-5Y>stUpT+wH(okYA(thFEUZIT! z9kLJTj{G5-?{I`{u_pV^lA~w6( zPYWk$PO{p9=`t1-1~z-$x)0(`p7?m%6#)>m6wxefxG=8o>*BpHRI|Wo<>2hv$Zc&8 zrT81>$t1AC>hP=|KJ(Y5Bj?jj573Q_tZq7}gr%kR_TVQxyLr5l<)I@dDX{!swwb~GgGt*~T-{QzP!zwBt#J#MoCthnWW|db+eLRV6$*{TcQB6^C?e8PIYb+$@{d0oHPosjw4jka&$vV)+dBl1zDoLEqxmntu4yxwaWu>BDVEe(uZf|XKb^CU|>let7GB@qojEqbN{D*fNi6 zRJwuInR3~}!-}uu>k&LlF_WmOzU@NI(1K7fn1fVV6Pdwb+qhekG*@axiVvr z&x{t{i{p!{KE{FQ#?Rz&;EMTz_eaBuOS6jb?T5eP0>Tpl*%s@K_W-uM3AMvYGZJu6 z$>nfP^_kpxu4nSS@T*tRV-XHJhc4-LIegR$`JVnV`+7maY)l)(CUSNCweu!IRi&fA ztlGZtdQnYf=Of5cr_!IZOnQGg9mjqT7*@SAFE|2cmwdHJihtxa0O>C{oJUt~H7 zwvra2`TcYxGPAKrnKSvuXqT6)WH(M&*VK0LQbIRLLQigMIMi+-1L0F}7rmzKI~LZT z_c^)-ST%lS{&bC#1hxiq`8S{teY^L@J_uvZL_k9RQ}k_YDP8E2Ti|4|cuoxb0t7$% zRH&#^UTyuwx{5!g$%6mxb}PHbKDBqr0jYOK2jE*{ZFwM$Msrn6%;Na6t#0b_C=-6G z^%#LJGU#990KHy*d#?L_mi(Z$ALG1+zb6(41(|h}4CnbDpjE{a>IB7W}21RlMJzr}9$*Q_ILr#NkE6ax#%#qYBFDn#MU*Y9Cy9h?na*&Re zKjf1{bsbwYFE{+2JsB!TC6Mj;1CkUtT@vo<-y>X8^>?e~F_vhI)8BpEn@ABlT(91o zxoU7bZZCJgykGO#J1vCP+>98gjD?=@JEJz!PE0F}C2~&=8=R=(#yr#(**YAqe48FP z0uu8HIhm^YKK_ZzTT>Pw^nmq1^XizH5Q*9j{4%RqRg47nj*6wp0aJ<&<5p5R4hSq% z%(49jOq^vgAg}0c)f9SB?m65U&BuCNU6UG?&&%BccGZrGb@jg^w zfG)c@R5)cFd&{r#hq_#2KA6B#Oc3$$<9#5`Y&y?Po z13yR z=jgHQZiz(N?d%Md4;$xlPGDKo`B;r__T2SF}6>`#Pq?aZiG0?8CY!Zp73AwdLhsoyVvhY#e1* zoOz8poW0v@K2GI7czO1U$lJ=kvyOF zd&h@-IUUE$jS~ctomps7Kla<6KAReeEbFe~U;)n3?^0Np?(Q%p5`X~ej#pznbKLG; z65>XcN6`ev6UPLL@YA$yIvJMbvbE-;B9-& z$0yi+jYK{6>p}#cs9^sL6^cNWz0*o%UX$pb$!2$L0{{?w;5WGOPPhx08x5!;HK>|C zBw5gfrC&8&*`^}0*RxbsfVcx*^qAeWL#7CUg2a8GX^#QTZQ&^6L0(X*@q0!6CxS4L zB#OXEY&W{W>=K)Kw~1JS`%V4&946*b)I+0BJEkIX&r_A_@9bKBF6QPMqF*O4&?IE* zpxNc?wK?vA|D=1Ut(+y zA~C=njtA(z+!}}6LJXRDT_v){jRr{qB?+~k|NJOqsd!$YAPeE>yoBsiP`yuS(8Osc zJ9+S^&mVKON^bkw;n`;^wiCp!ePN4~$C~?4VRtYHY`BQ#*CXL#+WANXeSqw5 zWIXTb#88$(t_%I?hl2 zRA!fr=|Z|<5lF5nuW{D{dzrt7=df;~1jX=$jQwTZ9H^z`CF#_H zBY-bG(zUUS^dKqo#L*vzqD}nQo+>8-daa4+(@$K)i{W2{)?0{Th54uZ;@aH?F`b)z zX9S>?bc}I57C&w^S>0-G7>tp+Y218XJK}@dKPA;9)xl<@k}EokQKh;Gbt~A8T;*Sw zkX-z^nJ=?CPAx&LIUX3AkR|a_D)S;}6InQs10!M@OH5aV&2o>~ZO?^7&QiLGjel6Gm0Z0IDH= zotoDF+^gOl`+;&^G`-Dj>3S0ev`CacCCT$L(Xye|xJ5jtV$dp9CiOhSfu zEQjF%H9AQ45j`P_qEON0BM;h?sA;fs-f-jE-U)R}o}lwg>}C=O>+^A^K_8pc^TKug zn1bKzs3u-NAJ)IAavIdzOQH@ZQTDj_x`Pb#+0fTC_^N&3|RyPV8FksMu%*f5FXwL z-&vI-sfKYHNTyIJ4mi=}q1HRq;)sjh0yclBh!Z`Q^UY2$RwIhS=UFuyltt}NlRzYb zhxFU+=C$t7-B?enn9rV76r`fs_m?@3QKl*-Z!qP(4A>02QUhrdUw9gw+Fn-*+z}ai zZMcXk*Sq2?Tfg(*d>1it2+?SV8r&Z%ERuVBU@PUP=G|R9*x3LrG*%nbL6?SW>FtXC zMfi!+H>4lPhCHeoj;2?th9P`eecF*`Vfo^?h72GQlG}2*2~qI(j0R38#XlW?p3{Ye zzZ#vX>=E4Bh+kL4&!>*#gFb)O<8DwO`6c5{KOvXYlEFu?iGS&q zcmoUi!vDxtKKvo}>PTUti6CTfe#irER9e#Lt%1IOtP|b7+Pxh3*W_bn>eZj^Jd$3f zX>FeRifA?F6-#_h1f__tLx8QmPo0hZ>q9*x)1~+mdCwRdKnhVJ4-rzs$2T)~lD!Ds zExsmz^^wTq4CT&Is{)>FRb!WD?_1ArfsF&uvzl3F?IFU2Pl(cD@O-@8`G~yP;-}`t z^hXp@r5-)APVwu?;ihoryi@IPTwI^_h?wv0JTE!yc--4dK&U^1zL&X+OC?vH0Mgjy z&LaSA#o74fVkt2CE#SFbOAauRDV;j&7sw1@h4p?>q#b4SocW z_Yj(b)0jo-mYxGQk|sotv7c|Rt1$usjazz`tp41l<$Ro?o6VApMx7^S%ALTrF+Ewg<~KxApW1N+NKj{Te!i3KD3t@QSv; zqGDnn<7*Bk%dsWsiI{Qqcu}e_kdr&^auPuBRPYhsBnl{--nn*1Ruwi=kbJMda zHI}1v2A}6Dy>yfG$a+rbS}Kd02JdlnQnZmbu(VpYyOS>Y7_N5tBf9eJE9j=4v-Fx0 z+)P;C`xbfOz<(YAc^6nQ(F4pw?Z#?6@WXb{R>Xd$clh0BH=<70f1P=q6`pPJApC~A zLviVNxHL>|1eu()p7`KF?l(OcN1F1o=XlHKdA4^D<1>#twv2l*x4RGxv=A94h+vc?TI1jl5W1;~;_<(mAf9%F{MuzY< z@+q{rsK;gbC$3C1GZPKR()X$m;%fK_IHs|KCB`@~7Kane_)IwGNry=j2E*Get>x8r zrz?MmlJ$$bwQO^rw z1>^V?BqN!%1MBb4p3%*SpVGgF$Fi?kh}aq{Ibl)`5v ztYdn-JL%8oS@CT?9sNr@67oQyXNjUS%*y;?Qk;RVeWm0j^HGjzf`giOGjyDwfj%|X zcKp#(IulzAN1>NAl3mCb7o%+_mdmE?wy?sd=1pW4w+m)D6X5Me6amtqVx>|)mSR1H?PXETE-oS}=0HG&7u8}?E z=cZiL4GHzle!cEzeoSBsk|0p<<=WwCn(^h>;OP?kK8f&Y80liqx?k_dZy#0Km+rV4 z)J;7%!IxE!bCwr`POJCcQ)J#oFsHpAPh~Uio+FxIa(wU>xJn!k(of*+$5{TJ3Iv7$ zg0;UD-OXx_i2ZhFC+`R|6zoLcqX?RvP*+~eNMT>kdNVRA+-#9;;3+;U$z)askG*rT zM|Ck!xf5z0!Rjp10_K0@6TKjUSdwb@sL7bzVCAY99P<0niI>z*A6oi`c6Fj93Tk|5wERBX0x$ z9kD)U395JlZ#VX=pr}g^D3u z6)wPV(fhY4E?Cl|m!trsTcuOlWFD;lcCR>DmlbB8m0 zFZtL^?dx~W%BmgEj$2ywS>u+&9`l!J>AmG(_?e;SJxd+FfvP1w5qXB$HoPB>V#tFp zALL@1q|44(OJPRc4@@4SWc|@cPmv2`U%G5Y8SF>dP#u+!zx@&z(jOloiTw$8r7K0b z8yY-j+Z)^cJ;bmOelhteWouD0V==8O(cGrEj^DpLu>$)Du9|Rrow&zFWzApunDYRq zFV$GEBz<7J5#`s4@mX1)0KgY=6Q|+tRe`%Q1%mKVeQRV1g^=o_-Whn*70~(vc>Ms0 z-5u4?aH=9k= z6AbDW%EUlB$-s?U6XuFtp?9BGd@xjwgZby5i1w&f2Yf*XTyJj#Z$-A3aL%VCl+J6k z7r(fBq|R6l}a zXnj-U7B3~Q?FV4x+KjfpEL>CXy9(~m5xtNMkfG#UspH`e{9P$HwEZI5U4U?fBg-~t z?Nr5fX4pK^fD8DGiyk=F1Tu`PUljLWberb!YM~qk$M)iw$x{VBXabL7gYi%Lb%>_g z<9ulTv@L)R;2pbr+L)kHL{}EROYpnK4<27zTBjpzAcm|bm*CH=^h@*yFu!sa$x`{l zS=x|yQ4UU~^E4Ps2ky{r-$!(M3^Y=I zsQ?sJA|g)}#S6abUr3rn{7LK2FHw%;z$R3r4hnu8e!Y!GUo`$UZciaHx>yooym6G9 z2$Vd-13Yf>cTtTia=(tbl)Y^6=XxwH?BPv}n8^G&+A7&ql{a0AMs9Y#QkulkslCqx z&zTHVJcT_1x-#Wk1p!S~oUCko#5(rrD#7)6^#Sc#CWWtaW$xb%(O!Ry>;lJ1tX+0H zlP{{7s3^8(`gzguby`J4lP;eh(5W~_1(-g&&$Uk*F5lykQc$YYtU{XQG8nW#npXO4H6apk%_Z`^Il7uSdgy~u&~qAQ z^h$X&)IiGqy;4C3iqNhp*%=P``iCFu{NJiReI^OuOv<*VHlu=t>wWEc_xG7-RW1C$O$WixN zw=1ANJ46I{|PTws{a?f{z(Tc|Av>ml!_wOz^iRXDow8dr5*?_Wf2VXLy4gazXAoUfA4x0e?@XEajO3PsuVuJi5vDZ zxHw(CAKd6;KIa;!-AYfW?MCg!%I(0%w`S0DUk+P%U*K!}>BWt(k1a10(3fAGAvD5j zpqP{b@$mhbmqj=f4eyodE(r6?48JwfQ>Mgv!(xDSaIGJke)W}=a>amI?vGApaPtG) z?hw}K6-hEK(7>e0v;k>%izM0B4WtZ%;1*qDK6rT)9V#1LA}n=6mq(7gWQSDahB1AK zH|>s7IlAS(KPceXc_bWsQ@X; z%AL)>PMX|R*co@Tt3@*1U(3$S6_k(|diT7QmrxhSIW0yoNT4K7VZ^cC$H*Zx7Gr)1 zT74Hjv_*T|(DeLhDQ|15z)yNcgYn&{B?y! zk{6eklTf)Ldbl-1NBF76a)&)Mi54dF57g+F6P1jrWoLc8 zjn;v;W)e*=ZhrP{%^;69%C1j(om_&?OaD`Pi>DDhp>YaR4TG%_m#I;oYRwANXa;g$U$cS7 z-CRttv`xMwR%jLeNO<>04_z=pHww)*;j?D~!~!Pjvf`aK(+ElQj)1bHLI(oMxo1Wh zsb?D%;Yn_1<}&-a0LAHhL0K;hVzZPWc4c`RHBMzwPmELgL%k8W17gY7L9c6|zFyYv zhdv_5`CMuyhU=L|_{f3T$nGmNB+1_|8y~Oy>~!OG0pgJvR}&jevhp~QvZJEf2H^nC zk%|o3iE;dMBCT4|WNmpt{v{6m;Em!e+>RJldy+^2r|X;$FJ_;3h?~MQy33kS#oM60 z{yzTmxt;CH(?_4Ek-9fLY5#+#;(zeO`!76suKqXP`k#0*GH^1`V@3QgME&c_8>a9+ zyes}MOvy{dD`Ew$rwj=POHm`>GJnYff`WX z)ld&55ss%M-dSNRHC3NFL3^n`V_H-XCSSS|nI4j|%j-Al%k^j`nm&xvPK!vC>C|p& zFErdltg#?*+PWcy5kII`%YZA~q1XHog1(Jai&L)@{q^$BbpU6s>`v>4=ON<>87^Dr zm}14bOj8VcKQ>frJsivyJ}jlNb?Tl!Q7s&O!ssWxUI{w>+;p{*W%hfafeRY3F_0 zY;_)UEEC5F33{RO$Y2bSu))1Y(d>wM>at(@5qnQ__%L<<(H5H{(qM?tuwawn z-nn;UFPQ}zl#bA}9pQjl+<4!b;=^vbdEl|_Ll%s`+K#ivHbDO^)DF5Yc*D*j`8{(f zm|*{ijDuuw^Ns=a8V0aBdGZFW@Bc|vK3xBX*8fITZ2z6AQ2$L;f@aDFSbYi@gwvZ~ zE#gq_BJ8do!rA`!ES2Ic6euX-79kSa2q9Tm&YNwS4iIGFK=}=Jm zy2R0AzAI%*;fiDBbh2nMHH7)ItOCz~r+~dx&k5x$Ixy`z5Ef7@F5u1op1#gXPm&S+ zNS4a5(8F*=#F5&N{NV{=6VJQ<={Ks%=Sx1u*hG)b%y<>RnJS7iT26^V<}t&!^dP_>y==Dfb-o!WTYJag&*a+HH^%%_s%foINRp!a z_k!>ohpY8oZ?vi5;8w~o%<+{^eeHf&J}HymTF{~HZVC#coM1V%9P8NZlKgs^mrw$| z;@G{z0@4ynjo2g@i^kQk2~N=vvJ6UK*6@|rybQd(m6TyI?(4b!T0*j<=3p?U@hi1 z5l5Lm?L}>~?v0qG2L`KqgCHg;hDp`suGN+#CvR?+W4+&?Y9TwLz&|S!%z9I9zu|!i zY45=A&*07|CK-3m&GLOf&nuIU;V<~yW=WiO0~xcfH&0LLg6~{u#{aybN$x+1>UZG3 z(e$r3WdDns^w|D)qC)sLQ3;yGDgGCtkmm(uC0~CNU}1@cs$CIWqo8~zt_$cF`ZT2U zk#82G${!SFX34~65nCW{T@OMGRW9z!4y)h=aZ3lH;Vi^{>n9b)1wUs`n%2A} zzcAFn%Cfjii`~|_ToMrtd9Q*Un^nYb4?edA@e&`qWq>z{9P$ zYSF&I1+@3TITWU`NsuC>UZ=PW(M~*`AwvX%fClZCtOw8+P<} zwteB}4A}AR&INhK!64JYJ>xlZcWz3L*}fMd7Oj~!RCcqrT!{(MU?U)|abwMXmOT_Z zRU4#t;mcQ#{=&J0X^~Iy>>CyNckAXNQ@=s@v9#An{IQbJ|13r~3@z^Z>GQaU!_(=R zFW7@yEVbx0t9FvxVyVU14#(MLnlCR53Yg6N#pMB z?l7GHoqJ~8Gc)z2YS*_~^;=Ip_3XXhHwc;ka5V6RCF%dEOyMsU{{K!}@#N+Ie@qne ze=CzZc-)+_uigE%c1+w`QFc!QnK4)BD#t}f61|8VCNK6ZzUG*fXDZW7nU!Xg&Ya5E z6a(wGg>|rCjg1{d)8QWgTp4h2eeU!h`;>Hj9k6_S9@sW|-sX;-#J)m$lh49>s1d@z z!4@fy`IqFBBo^{8lX8yjetoE9V@YKFzjp?Ne3b;b7=vbN7*cgmJ?{@37jV zea&3fQmebKN%C^U{GZv~XGDTciB}yS?%h$aqW%+Kz^{`-OZ~p-BjxnuT+W>1V!TFb z`{+6bR!8mi++a&bwZJC`%3yV@-fZBSOoIb$)^Yk`LjNyNwc$x?t%Fcs`9OJPt`4Mv z*%-TkODi{hIFxl2Tf15_fF%k-(9s}Ujict}ipJS=y6IQZSahKGUE-73$}PLzviw8u zn51&QHSvYQwGiVV{pZE95dEEh?EY~2ZU#{15sa9qiJ46lWJfZR6}s`kY&u~Ib@u0@30 zH7KWdu5V<7#({CSB>=>{no(r{63cq*yFX=@laH_4md{&`&)bf#sZh^O zsBTa`@pn+&T-c(8d=$-aA)e0iuwWAYt|BLcff0$mdQLFsa$6?w;?_+ugW@l3%=HIe z+1BnZn``1IQF3NLSOV$7)Ynm0<{hD}6y)s@Z|eyzFCO14*CS6+jF%)3Rg~RNZz^w# z4m)!kz4FRpx14xnd*Yar4bCbi9O)9^kP|&%^252s5&)TXt zV=pC#89R5VcQx3nwixJtV7*b9;$KnGYqL=9Uir+*>6(Tx)^aj!EI)hSbuL^9xL>mS z+cCW+Kz9;);wJwH>9~A*sfk8WefGEgdpc)`vp0-L?@9M0-)*2_!iMle;_p6cpXszG z!(rB-S>50{-tLtw3q9;E*tuHOGHK1DoV(C(u5wzG>FPb%OXaytDi`{>GyV1N9E_^w zY5cpdz3P{;Z0$b;#%3NOo3TCB6n>vGr7aDZ%-)1qbr2-&$#tfS4&R$#hchg09b98y zDOFZcmvm6%6~xeh(B1m zemL})e>_~+w7`G0OwoZW#MwNt;ZV6Z=(dh_B`+X-s+Cl@$gfLmLZuKD@+dVX&mXf8 z7kvEd<$5A*()`=E@L4zCM!4J&#d0jAUWgEybg8WyZ>P_5Ju&?9oa5|p|;)e;|zG2P;9F5 zdlW^xOY3*?ov|+vxeYU{d!TQ8MKMGf=;A8R3$AfdY(>CX`RB8|2m{vab6Q${^6!V@ zh_57^g=Xzpoo4>5V>COZ@9iwyqanU-T>E^Iju-;-Qt0JCb1Io#+rPj-EoP@RH@voi ziUd2(*DY_ulVO5$ugkD+DCgFehj9qP2xJDtPaF-t&vKUTgqt<@=#Ms&2d4iSCpu9z z%0XP3oCGSlbIgev>l|tmw=h&ZOXvX}&~J z=A`1zy;ZIPYPGJ@n9}T+^&~tG5%{$ZKp?P%iZEjqPv>2oop!CeRzy|TFBa{-AQrmd zC`MCrp-3Ftv_qq|yuY=W5dhKU&#!lX$uFIdou5f7pku0sr1`{&W2^uUZ zN+uyImY-f_F;Cd{Q zZH3uO#`A@z81FFRO>Vg??i_;597LTbpRcyo^D9QumGj%^ZLW6oZnM1I#}Jk4`~6Gl zNcf=Id%>%zcMiNwwk`uGxx*owZw$a;$#yG;SuF$-i^$5FCrNhGk?L%wYT=WVf9Ns# z&R4?hHWPdnS4!TxmaH7$opycH^is_tGVGlGfFeOI5UkL&*T|rsd@ziDBfui|+mzr# zO_hV1wf7&^MEOh3^p2mje||5?n@0-RPISa=4P(`uLQK(5%t-?(8Cz5TeCJJ>bUORX zB*b~V*?H}{OAs=vK9^4uu=K)BtblOq%S6#grolk3FDKQmB&lE^uNz9F#r ze9{!u#F6Z8{-cYeVWE^LX+qyol(dK}9giFs1>b9AlK;~oRLcCA@T0vCDyKQdNT_d{ zszS;mZSL6Pj=_Sri0Vnd9khHq;=A44!n)FouGn!KOO3?Wxfy$EmS9V3OMt`sMtSCRkVd#8%xJu=i86xI0d}%F!1%uB@_uV+DYOX zD^?u~Cn|_mOcZDxYpnf8@i3Ornj;~GM3+JC7ys_Ub80M}Aj(OC*TWXuV~s!Ns}$#` z^t?pa0#T7K+U1t0PAG3Mf!zU?juY#Il9Z=ogk3u_nUc&QWr*ED2(|){Vi1}e1z1i8 zuo6hAiAA(<3T2pCIYw|(go*X>iu(hS+rkrE7kfQ>q@o6)^Hlpb02F!{jf}+-fZIDO z?Uw0$4VO6C3848gNKuM2q6#-Bw&GHb|IE1mP&%H$D%N3EwRLwqw!l?BlbX5NFb)kaHYQWX%7?PFQR4I7+dKAD}hN zhvikDxcN5a^sMbNg#zCHq6ZZ6CM>|I?)MiT&_kogTYscC(N#z;Uw;pOm2F_9nGBk(!Yk11sOMsXHz$wca~nz$@3 zRx1B(k$Om2URX(bc;yx*C&()PidbUA4b0@eI4j6E9>p`sM$LX%3e2prk26-U4)Dgb zQa0t6nA+XnhgyuaTk%+;1U zwomY-vuGPf-d48(x}$iN&Z}2u^#4Uq5%PcNk^V1wQmp=OdUzBF9nD>2ot?a_+}v%Q zo#f?R{$DpgS#rR}{yqzot!i`pyG~CR?9#55CyjjRg$#V2 zBKedeHKvf)`+V~gNVxN@^jl5S^Y1S-6s0B&kja5i6#eIC{1a9WRJ%Rx_Q1G7qh*Pb zlzwLM(7Oi98RixJbN&EGtW2$su<{hvjSDDL1E5iIe+h}tY3RQ6 zqfvKWDw){dXyCfh+v4TCA;Hn;Xup-$-kH8;cwFO^Y?}Qld1h_=Je&DA_j=jrJe~Zh z$ZElnDo}K%;_kGuU3|~g@2&#l>FlY&=9Y^XQw8n&Ge7mSXQyO&SHu4Iirb2km+n^T z1P|xpuaZa9PGaV83I1~UP$x!jgFJnj1f#b#UW@H3c8`~!n>H}6)_J@Y3%6KRLRqy+ zL#uc@-@b@PPeaoQIztgNemoa^9%X$pC+Ij&MQZ`2tpuLZwwNh&HBVFc__s!11A`=~ z(Q}K9SJr1Rmei)(0*L~w{krbe*jn!9yKK~Ge6EjBj|FR1XS*?SR)0O8SU(Hjs$afp zQEcj9eS96j!y+TLjMe6yB)vw2>Dsq>5@?TBe1{T~?juVpK(Pk%A~eQ}@(Bm_{6#tu zp2Ju>HCt(37Y~@ni>}z*2;SRzZoH`wf5nj8dlLAEyiJipI*S6c|6B&FwI#hqgIkr0 z!=xQ0`;`u>SOs0_)&Q=?8On6d3E9p9W=>KP?_$HrFTzSw2q5~_(rbXoAv-LXSAf$l z5BPgvsN6E~njzgvX6NW6LgK`g@VO58`SrsheF(%|Hip0{a})le8yX!;iR-a_N(C zQT+CQf~)$A1PEI#uuZgd6EhLQ37=51I<)8Xc`p%@UU|F2{UN}I-KJY~fW3JEfo4G=ZPeJ*}nUAARF&XG_E8RfjWo{oB0(m?%yN;()u z%{0Aq#~j`b*ftRk)rKj3AIOBvLA^6W+bVOraq)0Zp z8Z-5wYqucOjQ4pnsrd5clE|Wxaw|9{s1nAZ9s10e0wszkVUC#eO$5>?Wkf~a!}3Pd z33d1hLhXn1;By#%eagRX z&^;)Y4EZEzV?-0xSw-F@0WWNFLxa4LaVD53Y&>0Ra{;L{$c#{klcw`)G~tXneHb;G zY|5LkmTeQ%jkZ-!EsCe~OsRTxekY_oq-Hvs6fF0!aaldu`ue09$J|j3eJdT7%)JaU50ZBpws$V#>AcQdllxY zVj$7oAMvibbPxpLSoA9=bbt@__oO2s!k1mgh#8ZbRR%iC%f@dl3;Yn-!JsGt#1dxOI0FF`bKEs;hVI;Kex$Jz?Sl%=ycf*Z`Efrvj}gSE7pVU z4py(nhJh|;2Qi4^wXByuiQDl%4Tm~e=(#=W-Zucejz9;^36rQ)CdQgs<^Y$FcrWe* z(HVp36brvgkEx|fVry56X{*KfM_13d6+&cTs;;1d@Q@=2i2cO=(u|Dxhv+P@X_K^P zgeIy;e4lXrAe_zLSx!@&v7C+2vz@AIafqmMb5EIKe2`YGmIeCOL$sx{G z!7O7aoOR6#f=eDoc5MhDm%~>XW~g~O56tF4!ZpMa(~qm}>X=*&WXnm9%`GebrUa=Q z;n23J@a3Z$=SzhSwwz=tULr~Z^i5xFHvRf&L>XR~8D99Fho#&M86e=qDPp-sY69I~ zj!8f!LGR5E=Q_EecQ!rv{L(7n=P}O+{3?P9ki>(;n#Vbjq#Ng2z&+^5ty1yUX2zFsK9D{Ck~7 zV2Z4#WT*!+{Qf=mZ$YFdd%MZd3B}OpQFQ^1T$RB0gmiX}}litl~S122e z)GuC!Adn<*$H?S0b->oS?EqBk?S!dk+Wm}dcWnbN3yEKK9CWDTys5}XmJpS zD4#xtvYHx*(25wT2(z0uMa5`|sNM`f^=p&~Qo=zRoQXOZBSMgILtomE-0!44msz5W ze#G<1cEVd;Z2(ez#oq1qg_a%RQ{hQT73ykyFbL1n5oIgW1Mb{$L>M#yON}vQN_s&m zmh6npt`NL|+j|ea zazjtu|B+JdgQT^@4&6Hl{ao-19LOkdq;3N%CI=llk*7A)%f#hiE0IM*X_wGqYsq6x zczhSuh`3ax9Ii`ZGU{lny5(X_SHj?(heVpUq~`Iz02jYSbOO8bsh!a`)o@THsIdMX z$vXJ=bsX;+UBx~EI9dh|t&PiHG|F;qwe=iN4DFfA`-GK%Iw0rWmgXJx8g~QW{tl_y zH+uD2Gbv=%6SHV0BJYu0L*k26;{j&a_9m!wm3t{oozX6zKe^9^9>=-IZyqH5B?fg7 zlL;~^kBGVji?}l=rT>5)FhqQwD+Bl0!N{qAhsu~d)sHEz{4p7ZMHCUl&UX|$L#*miN=)YU}7 zig=j}QC2g@$(EA6Iyn5EbA{iWyvcf%OEbMf&H@v`?tQb zt&jl93ZqaVXdzL_GQY}bc$!CKN6OaWTC`GE>Nrs5XRKKcJ)k}xmM^|1{9jwt!QeUc z3xZs@uO4t6*4H2*^VQxT;y{yp(eM{sk`q^p#gNiAk5r6B4&K#`ijbl&(e;O(Xk+wT zZ#24fXI=l%jd8n_+c>y)5ZqyOFvRZ~q5#bVg2EWE2-&=(LKbkJqE%NJEHN^U=)mX` zvKEyX64@$G6IG|0HpVLM!aV~t&{DC18%xRu_IcTnKd=CQ`mn?RB80iHjJOt&lTlR6 zQF+Yw8(Pi%S|U!#q!}nZc%nT%B5M;oFfQ|c3j*s`XH*>~-F@qv!aqtY>_r79ngek7 zai38yOCPNglJa571U1`{mQn!Qf$7Z0nl27vXMzOMonOP@$tw&ceQcD|biQURATBR9 zx2b)=b-y{pOc>vkI;94NY$!hpz2&CgjjIDMHxn19moxsXVotpWL&vz0PHia&-Oagv zG|@?2q_$yJ7$lF4oML9|;_9L|IQMF!?nX#eJ@IeE;}X4d0KsasfEgzE%f8{yFHcSf zw|5A)h59XrEVoXdEY}jAS@mL4d!h`?5NL2R47A;OMl@c?%i-QrwuTf9GZ5~>@2i5C ziDwB^4tVhT@$dnO*EzL%pp-Ayw1!FJDdSJrZUof8?N#dydv!VUdvCS}4|KHk^dC3x zk+3QH@{9U8NxcJOy4Z>0eyHaOv7rCO8U0aPj1-6e>&K@<6jJ(}kg(*s52i85n`or; z^D!+0*Km$n8MP@xhz*zG)RH^=&0K84I~v$5prLqp}#OaguL6gJVu z0By75LR6GWUlmcn@zvzKO3dLjgP))N2(VF$q5oBn*ZAR$`qQ>SQzV%5y>A5R?tl+^`L=SEy{w#l{#Od0*YZj&w3F4S!uhfTL9zsG?Kd%9fO zwc_2zrVwEHBmG%iEwpeuZb%s&9PL=h<7EK$mpON8%m17iY7l6+bnnA(KmH#j&`5Y7@>Kb64thY>>nV@M_% zXd7+xv}hBa`-dj-@3@8vj>d03g^X>v&))B4GX}vrPMmT-twiiR7&WbeFm(?KbW}y6 z<{X8Kwmg3swa|RQ#$pd|F0kV=le`pQCsoxHU&PfN_9{4tk$B&1Dw6@H`uS6r%_AW6 zhcOQ+ey!|NydiwC8E;nACo9R1aWRNc>!BXB8A7UruLfTDLsFHDOL$m~rCGxT601j% z0SSU&WDWEF7-1VY`QLg4pq9iBQ#}uwqj+NIJstLiq)VZ>l-d@wE~}bb(oVpS7FZ9< zKV@9+iIA5CLViyoMZ|3bTBc|<4;2ATlNR-=6~HGSMW%^rydf|3x$JRp^G;~O3?oEx z>(Y#a-q(v4DmjgdR*?_uWb@YDYu+ogrL^Zr5vJOGiF?y zvD|~r!l+If7KzeDVhr$*9bw?dmuw;sQxxuOz9S2mUXE}!bq4PzQdU?EE%xEZDP9wj zrs7z+V#|D>G#>gCTa;w_QaLhqhl_+T_$OIv+c&`9AY6oKo80$tR!C5sthEWvM$?jF zP(coxLm=Vb?YkcyTWC628{D@3WRq8sMZPXHo^99@kTZxc~;%$J9wO7DtkurAh>96w-V)$>a^Mlt+WcamB> z`#7ORpksEX5IN29Ibl9LHM3bW%PHvxvpDpbnW*uOA!V_MzuKux>MjWfyg!E1@5ccx z+D(qIpC+2O;Q8S|)j*?nRUmO+kkrWmkq8)32|ZqT4K-Db4(_MB>FR?62FLZ>?}Bw}r0fdm;e0!z68$0@stF3*|JM5hDj_m%rO~|$=Ri&D47_C^G!LhUIsaW#jB8POS6=^ zz*t!NebAFjQiOq5CZFg5<8Wsn*vA>Im^G03vJj*sJNKFI?J>x+;0^J@zJi_LXQrK+ zIMk$ljb;%Fepy;gs(R$jzawnZxk=UBZ^i}}5(BQqHX0U^TF6J>wI4!M;-|o5NiqXh zYT&HTA%CFiF}FNKnrBzR6G9I=5+`0Cm-LMBQptZphXbNtHNQbk@D#Fwz8umFPAMD?Zl)Iz;DkdrBo@jw_{JNhC7!HooB62Di(H%MDJ6uPeWf#8ow?PHrKqrwEf*@V)m|1>z;kaaiF zBd!TS?>qceIM-X9)>Cf0*efhU!9T^}29?OOPkqqyO(AT4gvJkdyr1hcBaRHC_JLeF zo;r$$zQR~VAZ1OGlkRJTGhl6G+yeav zcwlBeVW0cxQhannd<>u4FJ`ZgHJm&YR>ZX7-T@KMXj7k|{4jeQfb~MBe+^+yV&B?+ z*ZFerR_^O=-e8KJ`ZRzcKTY+Atwc#w8E!W*W(0&^x5L;7c;y5oA|mR| zpfCxd{y~MR;9%5@epaZe9z3%h39TuTjaq{4=lGgN3Lm>qk9=-bAVz1Cs4vI&`T?1EK20)JlV+^!!hWM~sOj{Fe!QryN8z*}&Re zC8r>`03RET#627A-`OJLA?$-n?_u%m1gBh-+@+NN0PQ-p$ux~(K-IeZ5Fn>dH>CF}9y_1cGWpzEv;lcEmK+Yj+7 zbrz7e`B>V%PaEojid9Y+pPlffXBXp(Uh2}#c@BdsAH|E+w{13YjxlD_!S-Fo2!w>G6=+D zMnrWL)5Hjq=RSXt*=;JS<8gs$4dEn1wx;(Lfe`;PBv8s&b2|swT9+XY4`#%fNtt~bgh&`mSu;;T za=5>!6uySHOk46O3CsK{@r2)W^7CNF0Z=Mls_82faYYo;?n&Rnx;A-Ax_sU64p>Rm3Zpe#T=F7tz)p z&LntiCW8ihfDp9O1HL&nLhIMJkGV9E{1-^q5?p`#&n9@EGT?jlNY4T5)cYlyz$Lb= zryO3Eb@a_7QA}G=G;_;i!0%gax#=&!wknBK7&SP9C`@PlD;zN@ceT<7cg*SBufuuI zG^}|A!TcRW{=-R@b8mWy^%6L$Brg1&PmrI9^U)PHzL?>0_yIh<%Cp-?z!Gk&0QsY% z)Jq|mc6y2h`Q8|-(y9*qn=}QndW?E=m&`Osf(6-ii72%ggjcuW8Gfc?E=f{=tOkC4 z^Vpuc>B5{L$)HSbWC)oOOHjEA0HmejKp-yPaNACdguqI7)1}}F7rtFF73Q*i78u#} z_lSOwZ{obFUFJ4aN&>>mMJ(Zs6xuH$_{TULpxf#%)a=H`X>O1=n?kOJ?^!@q||`*+fmxJKEop z4ZzM!Y%LmzjI^JGIfze!^$ToIQpMFvmOC55Vn?jH-86 zRQ0I0;d{Mm)h@AsbDVwn!J)h~xXpup2AV^__M5Fdw9iF`TSWM!lDB$m%*C>T=5 zne0+3!ZwY&Yb^Ak<6=o1$yD;0Nv}0K36gAQ-d(t0d5j(JmlBRi7zH(Bh`chUzzx?#A)yAmYF#x*_lo9QVp&rL(tl5sQ zVPtTD`fD=8jZhljoFky_tgz_(Hsp7TK*H{#>@1Lr)YLa(ft&|&Dg>eY$+)S;qQxk| z=(^(7<78bX>#Qz^>n;81NHpSuS$qfHTg(Gq5~S6;6XU-E^S|#;@NjQ5m!GG&r$Fhl z0z&DJ8GgM6v!fHc=$pg;Fc%AAE5A*~_`Rd!u8U6@vk@U4G~>mvh);+LOmUBVtb3iP z*(0XB3$HIC<&v+fMzc#^V(pBtKTuXkL7z~vuVUHdvr`ZOE`ozU(^2hErSz+6^E}O^ z4Ykn&2a(YXx$KqeMNuJS49Zt(k&s}LjguX^SbC}yOSLz`{L=uU`@$ch*Gi;|30W7B zOh(*UwCmLzW9{$92k`7m*y}rBq(dBgB;iHAs>2(xzR?I zoTZilR&MN{@nj;7{t9ryu$*eGIBjyHCYt8VA8140%uFxkr^C1n#fIx;MS6S?j460l z^dW#{8+TP~a=_7s(w^N&rB68te_RrpZ&!dUwhVeE1f>EBln)rpWWVQ#T0UOE7xcqh znyui@Rak#3C{F1`koet?^MCQ6T}IbK6)KR4=RPnG+rEZ9ihR3X6M&`Dszqsu^Vmtm zsZ8}i4Sk%e9Rxz&)GWZghCWoAHKox0Qf2BJuG-jPW6?~z-XJ}@Y1o=-IN#Xd&&>Ms zEbq#{F}5x&EZ`^OMXwLvf?!mWwK46N-S@u{4jT^T8V;~X!6q|h92KaX}q>Zh2b(ktnnNEvUZ$aavMka~E~x3eHKxwsFT zl9Hny_lN#6#XvY*e5qAwK7C46^HZltSxuqlk*LfVx)H7>bYQW^!Kl7EV=^|qKgjvO z9KB=@Kb^C2t1f3MOn$Z$=Mg^4QcSX~=wI#daT}vitS?+nb@cW&<)um6)B|QTLZC`7 z&W`#t_5$NBtxb)2_dp$Rc;v6-Q^H|O+oEDOP+x?nB0IUMp%WmKXpxk{(c*{Q*ueTO zs2Rmp#1#B?p}%ESzlUx)>{F2S4}}(mZ^PVEg;6rab!c&x?55KO`kLG5yWg;$TbG~z zEuWa2ViRjmp*B}re-OuybHdB>5J&rRC>9YrN%&+7uyB%)E**zXhU7EF_^4B7yk$ywimX-eWH#a8Mfg*Kqty2M$Li=Z z{&)au((n7v0_Y82x2Gl^@>RDZqPFj~i0Ml26)zucMpJg?eBEd#bLH@?(@Y$(XD`L1 z^o;HME$Ay870=)s=8RNJU?!CHN!avHj@=6jWBJdWqxVEw##>-Jw|X2E(xSL2h20o? zw%^?A0?G1D-#B?tOaWyQSpD^jDJNZc+!9)H?aom#hYl6YR_~&Tlcfr*prS)7RsYs} z030`dSK;cv&#r4x*2=YFWLcyI{E0XAxd4?--|BABOMMp-D#MKA_Jn~`jy!9Y`ammt zLPS#4NEly=|AoX^y@_J~jw72pp2FYPy=y-cuHR=Xm6>rNd}h=5%x zcyRFDmjtt)(8zP?>V>wnQmrny*QIpzb0dZDft}h9r2QcE>}S?#=y(*do6pN;(e>*T zT~C1F+d!qS?5aFvneTfGMN;#3eGto|f8-3scR!4>tbS32{WIso!Y);MH;2t{-;lrd zjbOG<@T!je`M55E|<+=_Cy%(&do%H>FrE+M!QDJ13`dK%10~~W z&0b#dS#x_~`E#5-{B;qI@PaY;Di8!8aO5;}JZC=VFkf!VOt|}%(#a(aBbg2N5GiFE z-k4=__#urvNiiYbFEyNc#AeB9zAL9pIx;Bhgt;&CwMLK42`|-xB;}6+O%)Z0i2vbr zSKnKi9nYy9&RuMIFgB_Bm9*D74vZpf^}h4rx)v=pv>%%2Ga_=BrcrAy2G4sPCVK@O zDku0cc@1K@5FwuX2{_f{g6&ZQ_ZN{jnwI5rVjeSOk2UFAUIe14z-xwFYcQ52@wFk0 zY9^z$ot|ZpLlvxUrJ|tBmF7AjQ2p&R>5Zs5$o^TR+W0B;fI|_*@g!qI`I>15>_trxaS>Div(^W zs{M^McIvQvqk930f>cz)7y#d5a$`sc1(ZKRf@tDkJk%Cfa_)PNIG)bN z&242(qr7^)qk-zm=vUKND&xB+r)Y~_2J7@aYj1-;AHGl8S4a&!;j7-IQ2)A44mA{I z;5l5(O>k_0cAmw;3diGWb@7zOGaDndb6|ROAtLb~bt2!`ERKqkE*T^uPyOC-(2?z( zdk?$fmaqOwWRZKVa8Z~TQyUyR1{5S}F{T-)RMjxRT78B9V3LA1P6w>LzeKxg&JBDX z9xm>^x@zV~Ol#5C+^Ap}qMclJ+z*c>`3?+tnR_?{pnpY0Ua@2J~5sAtbJZRkPU^uvbWxst~@{1>s+%odt{aANfeSd3ZBv)?Hs;-hl=;YR_KHW;UfQc8)?OojKQkp2KS`)p`5` zzTje9FqBwyJ7C zTQxLdnqh^5`DR+d3G&q>R>HZob=r7V-Zn4PCwX3As~gc;pF@RbPFEvm%({hf;IfmC z1XGf*Ri?BgDuUW(s-Hlyx;_UyWw3nL{7jWbdXmKlrULjDzXG^P9(nmeREm)-E@O^`8cmjNwvXy!Hr0 z_v~Bg^#S93Zh{h@_V&HV<3B4mKU?J=4JQ5O*p_ZK=_!+LC_FS@)L51{;42)KYtlAg z8+UTsh8%^iQcA4`U$rp!zaqzATr#|B!x|wGuv zp@|2%dH+H9(jmd5D;lzX_1C*iu~M?>;F=SWnANsRiuanpPRpQ(@K zXV-*>GB~Zp5$02kxXi0+90)!`m8L^6@bQukqQX?RHzx?fA}Y6~ERr@Xfam5Sp@JX0 zu=E_*{Oq4W%Ny2ziZH3JaZ=FxWj|Zbpv-ca0x_sf@r|TKELKL>W;Lg2=*rk(DT5uo zX!mvi_paF*Sz{#fn%*hRHE7jQG@#)z)Z&tJXeEN&mFt11|I}iYjtg+{y6*nVC#}JdbRInj_BQCY)=Lai4 zV|DC9hn<(x?H)sd4z#hTw#}>@Zh6;laQdfq>4o`P6&UZ2mZ!Hz+0(`|kv3+mgl6mB z0ry`PiJUrMXIRxS7SJX3cYGFhaiq_Liy+=$F(>BEr%6GR_wJ&L@IB=kJ&@xhuv7HE zMr7e3!DIGAAlW`lUThz8!z~$fC1MPULZQ=~M6|3r zeOZ3#Q+mI8`H8Eg%v<_w0u_N$hxy3}>$cJzvu!i!>-i3BR;V|I^!%j zijS9yXQ@mo$(#Hv*BSEkjLpuOlkau(k$9ro+Tj-kRl5*Pyb5UxABgyE+vCaiG5R(Tmu%Db zbB2wi@b)&`GZNXng(cj4UVPBS&}%s#FNIPsk+qR5xq(g@$ii!>sedd(T#-L^s_@n};1)B}=_cHG8j zfL{7g?}z`^&=5f0?5@>Z(u&!;E>!y1b2rGVh4|dUoNZ19JCEn0>hWah{^H$#FmmR6 z&625i4i7q%aZ|Z9@%igKd2QyI!yUVtu!+Z%8SC8tyVH&5UO4VHToq#AD1}a5+GtT$ zRR0ML3nw@At|NnqkVBK-3wz+}$;^k3tvU^6{F?BA%59;t^aSN(#ekCT7(>?88?E4o z%_(WCoL*m!qpGsMRcHNKmYr7IJ%@X%%t=u;Sr_;99UNcReR)Qt=Z=^k-UrN(3&nOE z(sKCMgsq>I5jt5X?+i-EoQ_Fbq-nuEMF1Z^2}1nc-Y5qMlFn8-`AQ43TenIlDzIT$ z*NmhJE3ZaR!7dYgx6q^ePoxQWj3m>C5SINslcA;M2h8(KAUF6EP4mXR-y@Y3@!zJ@ z?tHiELk(Gh!*9#`Q;{mp&Y*5sB22%4aWT39%_-Jy4@{3h*H%>wbp? zcl-S+b6Hr+N(7iZ-ZEXjQYQWrQdh*K0kky!QpX?ZW(H|r2rnHpOhBo@-yW9liR=aV z#gL}(8xvjmlIffuOEt!>!v&~o6uzG8)fv572GPd*9Px>wvX-hV^rz)cJ+?!|1rLQQccAT&Aq%>StrD_}KLg|ON*5;Usy*C3Vay{MV= z-)*9z-F3CFf=O5#dt&ar8qEE(aP4k4{NouPPtb^1zmR_Q!C6eH8Cq)hSAg4x@w*DL zTQd!SX1?e-W~sQ4Yh>xDNJ``;K96`?RKf?06zK*s7>T~x9H*nwI?B3$a@TF6tCVUU zkbOEmkEsYbvdal>(#DXH)(x#bL{Dwj18PnaSCw}Y?oMEtZ{}b+4p4{fP8-r#zG@#L zfi{u41bt1;st7qh4t$~!2ez0#;F__DZ~0kEfA8exR~{ys@W8dV%apzJB4Jc4lf96s z&&T=2$bG<{DliRjJTroPAwE-=+}{30Yc*NAzPBCzJq!glwJKm4)@_*Ppdg|juGBs* z#e-SRb{^q$1CO2dDt_W?AbIsl&y_!9$6MXA`jLZ&uDOJ`>ayq zobvDX9=1I&x1^f}o_`Z_I)4g#TMO#!WSj{26p7uB^Vw@mVX3AQzF$XY*e4G*UZ#rW zC?#xfCH>cx5`(J&bm)H-5nv(K6fC}h*gsLOvtp*)jxT`>8)e~|vIMWIcPN|Sv}q^H z4$;;w-}|Ae(7*aSZH_4rBO9~tASd=-v37{^6u%%PFQZiH~L9%xLDUAr!`Vh?~TRZk*3A#149N*tPWLQn@!~4z6MGV{7 z0Lr)A)nmZ}S+^=YrS|H6ht6qNsuT!z|My*&>fqrkdb{&+4Gy#L_xs6gzFye3KUIaJ ztlsg6QUV-7+rLln6=a6FVsiZPh%!|P=T_e8*d0taXGo9uskD!j39%aBfK|SB%m)&Q zS#`HLOSaS|xt1f|5~d%8FY}n8{^68a`6`X+<{P`hbx35?%8()uM0*Vv<_w#i)>V<& zI~<0y<;G@Jijca#G0(6@T1O_=bRcd!eumHZiL;wO}nVCv&8iyp(@Vm-{=KY zyND?0El%`by@Vib+`xY|1IPR4HeZ!s{!s^{ef@K3moe&+&|>zlD)J2dl_m7M3=HZ` z6vxo5&~w4NuEx)CzZ#X-&r|#src8 z&&Q(081);~Cm|9V3+=P!e{f3PtlGsr?b1653dGI%zv#N_r#8OuU*N?Z65L4w6xt#m z+${tt6fbVY9g4eKaBXpyQlu0s4#h*!;_g!1U2?hd(|6|XAFwk!dv?#9=bZQJxeiRp zq&C_%T<2+`*qt!d_f?RX5nBZ3|D*`fM+b#%e(cfQhG%xt{UsU$9nTmtxi^Q^?<6E% zHBbs=Pu9N-6a`s6DeraZsRn8#TmJXOUwfM*omO1+nv;%M`U?(15FqUjueBMt#;BlQ zUHJxI>&ahZQ3mGn?vBwWbS`COqv|J`Df+um_VEW8c-AILFkiIem>2I!Vh)OSI%1}b z8t%+gQ>C1K;P}pY4f8+a`glCHlTJpZ5bunC&81>K&6pHknCPxk=GgJ`k02r z`1pgd8#6boHgoqGAjTU1***g8pm-iLjrTmFx{K9|`uJYazoWg!E|1O+S4EmT?jnoK z7xFvjs=z;i(b|&>DjNtb+arLHJ1djyX2IFB`tAt?ijV0MVy$Paw(%tktXSfiJ=b*1 zJwMLVO159~sjqg6*7IK+d62w+nBbjQO&OxR4B+NBJ$%|?t(|E8z%Nig==hmK=qtTt z8|>OY=Q)-;Dw-s{$0YtlU8GjrP;w_n5n+GHw1abh5m2P))0h!SY@KYG@y;fji?M52 zqs&Q+hRlIjP2B1Af!HdDa|t&?$SmpElv>@LR9@7Dv}Te6^rw&nf=Um*OalDr=D}_o z$3K78I(@KUW+KR{vHXp)f|7l5|L4caA|dC2*eT%;vuDe9b{GchjghW)mB_ICo+5x> z;)RV49zZuacrJht-nkwhX4oQsl^#Dl^%`L_hl!z~pI^qoU}4r+VEYF=wG=qQWl~~a z;m>TcW3_`Xl4vxvau~?LR5bWar(zb)w#Q-%C*P&K(i)%w$2Q5HW5 z5zU>r+6)RwDkPSV)yVHK0B_s~3m+~e!~EWSbbOcZvYic7DalSKV0a8oXFRodIvV}# z^(7!I@@93zCihrrZPOg9hGDlNb|)K!mWAPS;HzDgEqC@{S8cvGQeN32g|}ixt8lZB z9gxf&x()ksQlId@rKB4*(EthsLHeruZt*Eu4@mGXbV4-?nyCg`c+yK$KBkG+bg_6+ z0Az?i!*;wYJ@;qx?BknK{D)c=ct%fX7W#miMNPipx3>>cNC)$oA)HXb&-C8RGf<3H)ZACs(7(DyKQcpOi2Pl~lsFuu_FL2djU zpm_rYQQI0)4+B}u+A!soNe`zVz}*6)PQ8hM8v>Z+Uo{F&t=c~{aO_5Y zXvRJ(4u1@Mbs5yTuD>%|4&-ej3)$rv@F<}L>I=>GckIAx0^#U46!Ol>Fg*-2ITlXH zyECTqgc0c9A)WYUsyKz!*JTOE&=4$t`Swe39L0{~FSN*d6a2khmDihO&%=hA z$rcv}=0Xc;_OT9#Q4dj}ICqd-pR0>7vPW=sm1iK}fZD}YOR;eM;H6a+(|l$%*e>8l zRb~Rqg`Fbe<0&51-Nn7)aq;djmqrX}@jP2FZ{cd99>Hc-%4oii4#P)>!?n*P8H!k-MmkNEdo_Xqh`(2nV_gVI3}dQ+Dv7J8ka( z)2V|9vT^_6NVNAlmI!tnQF(>8quBb{;8J)r&~RAjJ2&829S_)g?_&QREuPB;^J^T) zLQ%y$VDmoy&e<_jiFL^$r1n$)e=pNL)eteUwR3!|YXs90gPdNRlKjIaWB=!sKCo2nX#c#VYFyG!)==FbZ0|SUYa)(@wIu@A^E(L zz5EQn*x(;uR$W+glCu^q6~S#(!+xH;ClYUBemb;1bW`4I4}5TxUhSM4(IRxBS~X8g zCNW>&^*{Q!m-jMON8Tucw2neq1HxWY@mB={&ulvESIxXRi-poUDxZs>7EC$I@p;7uS#*GSKkO6K z_j(I47VJMYX3pavpo?saXB%(?#WX;;pUU3%D{|EC*t~i8>GRN#)%=M&SNAX5tiHRTqs}iEI61+O(b=wo75T!%f0}lMM&B>K zQk(yqO|i{9uy!r2PP8ML&?aRmWF}9wn8?W?cb3n|>fw~|w#QiYsg%_Ho&EbG%p@O; z_+4Xd*#*oL`J4FY%lm$pSUFKD!zP)2q>Aq@9j$x&kF!e!C^in06gEhyu?g6#QlzDcDx?fmTUBx@aE9xn-Smbf0~~(jl{HfiTGfOPqW* zjq`c_`Pq1}k8eGyiGNlNPm&=kra%yDiFj85?}yp1ztV{u>>@Xb1Y)+o>TzWaxR&#^hl?B+?mar+w|R}e=;+Z?m>&h{h$;Q1?1tY{c05! z;eVPHRVM>b_Q&|8HKH0R`~2DavxuT>VwBDQPW_C$m9IP;>Ago-*JMmHjdWTA9ym8k zN;(_s7Xpm3e<_iE6KGM)+N0la`6p)6x?5B4&#$)d#H(U3!UC^w+&s88Ho%jEA8a4B zv0RhQs+88rl7k&MJrnu$DWYSlN}6qzi&qHa}}@% z#kQFn@jS_a_=9iicu?TSa>~cQ-++x>E23OPdj6|jj9x=CwuLX!c|mFOtYEG$BIPtr(wr8ONTFb~L&KBAq$+Anj|>(=K|lkNknjHQUW8pO4kd5DRjV7OsKc4vE8`eZf znDk5BPq}LNo7`4no7z6uNz|2sB9wlkjU#8wZ+~?E<}Z)GKJ9W_Uw}$<{dlY5MX7Dg z{9hUS(iIXsm3wERvOc#_DXxsJ77c({IbMHZO`jichk4G^OUR+~D5@4d%4(|<*UdjQ z)#M|oLT=r{;{J=FQf^|nNdB{FoaHnr?7*e0xh!Pnf{M5Fq*mEAUWm#8cxolya8yOr;%_3Gcw>OIb`Ln^VHaf9(7H#s5u#%EB=_m;SsSTL2ZbbIPqo zSWM1deEuE3ctY>!v*@h9KyQFY%ACL>h_LQ*;$GMeJKnR`J1;}f=@;2IMZDg=GkE=b z8?eKER#c24krBfs+%j`Q;2+!Q5n=SC)ctpc2vuocIX&%qvVrH)joZ^oL4%@d-iUju z3OQ4K4`^lJJg3%TYg9=z?f2g>t`p^%ASyd$?U7ythY>!t^xxYZ{jw`1sD&}XABH?A zm#$bigE?sR$oF5&L6UdRtGy!x{RWq!=)JhPyM9DS4nY zj|5dcefqz%z$-K(PgJWcOR*`D1p7ZWb7DdcmdwmQ97JqYD#^$4$%gC$nx8D;9RXNL^s|6mx!n4` z&tchyQER^$fP%+LmMKY_Q{2byW=Q?Te0VD^a_SSh7Hx>_Oe<25KTjph^0(j2?A*mn zB1>CFb^#mrxSWGrrjk?fU!E_{fjHG?BnVD~w22d)LJNPPJ$t_xE=#e6OZD{hBip-up0dIBWECcdW`?a`{=GO;{qqXmykDw^4}KgT8H1)y zU)~ayp1`H`UMLrxG4B%>XF-u%{CLiiX?|{@Y|om}(@??JtK^XhcqJuQ^fjGRUvgi~ zq*^uqBwT^or^qVS&E)izTD9m@os-7!eH+A}V&3sbY^QI$mL1b^%H)l{`t8G&eulEI zfvVQZfv!m)oa#v+w~lybeU(8JoR%*T7{ZnSEpDHt8B8*|1nhu4H0azoWf}jN(LuPs zaZRqFPc1t%SsI{d&Kv$v!<0O0$7rbc5Bxu0@C)50p{yf@y6?kSb}kfh#h9TXef&}R zowZ6QC~cCuMJBs5uRRRiP?4#18D={PEuKDK;V*wBl+aj^zsOGdT#L>8*XN^NXJoln zC54xpq`wRu^->2(Xv{;Os?1TNuPfKGHQ4fLH>M9<8$`?zttlyD%YyK`xBa4HH3J{H z6f)ga=+xi;RHNT!d`K``n=rPbJVw?;ct{yS(hwK+?GGo!Yx6W@1O<-7AuT11m=E_%lC+=P)+-+btzM z_305W2uoe|B!SJ%_#4ow8Ip^sO{Zm z)2l1&n)CJafG->~cUvwp&MWQDfP*))eIETLH8CgeMk2{#mKWRT`E$q@jT*l<&%hnZ ztLLsa#!M3Vz3gYf@GY2~%Q|ch$%0iZ%hyfx?gRF9f{X1OtDB!jYMu(XlwCYaZidH215cBWxN zvL%z&MgiFRTVz&Sru?AfpgN?pE|s=09^O>E56w+o}~(=xAVOc&oKDb5iOCCw_5fBbq= zi+!KUT?#5!!YR!3?;ZYWq>B6r*9|bse+;3IyEg9X{6tP#PIxLrHXIPNlNa}NvOGF0 zPB1IXSa6>xiukJX(iRS9#KY2F*ATiDqjZ_E0GauTgTqss*j7xUu1PpWs@n6lOEfN} z2H{%#BKcC|B0jxa7D>ALrd-w}n|ow^y-}}Rruef!oEwT?Bo|ZgAj4&A^yW2AgX!a> zEf>Kz56BI}802D*v9IuetR_=jmn}DU_llHr=JJnD+|Jb%+-J_er`LzRIgCyv#^Ue$ zbCjjt@+@N&VouQg2PYQDWlnz@&hl!QR zUA9fbAKDm+TdrXfo6PdLH$oG&{)yYOIJ#Efz${hqLWJ|I`wIkpEP2U`XW;T|i4sqW zGMsfT+;iC{0h+-S5e`{GbKW0JJ$B>=9qoU<+n6MXv&arN?fe($+LEptXXUV-oX&Zh z?gu@$3iv=4qfcn+{LNsv@w};h>sGrp>W;$Q^v5cwG=T#C{`?Ksp7o_IKH{(4hNyW9 zrT1`&idhCFFQ?4rSwk7aIbd3-Q7z*xl`WTy)xkPESpZGdjTg=Po0fXk>b1KWJj`Sg z@NmiPb~K1snuu<89DeY6;GgpKkb1gOM;G!VC=n(KR+h^@ee1LA`&hA9mZgW;sj$O@ z@l)hOI2<^SZEM(b5h&!I!_tPM@`KoZ-VYCs#Te<&HPFwA)^GYt zA9~B?5;Dcl?d%ZYrA8}WbSDX1xLiwHZzHsQ;a%d-KmPi03F?L3i{q)?n9|tl)54TS z-99#J6`KAwNu?JF-4H!q4IWb!bS8Bf^!wus9y7U@KBrwW^0jw+2}2h+otCVZiE6a!;Qq?kRz#y<)$C^=*n)X>a3BpqAh zJ4ChQrIw9=9|E=@Q@#EP(Hcjp{7Lr%WS3U4?2>;=?N~4AL)$b1jq4Z}onCYEtumUS zA8;9GwL9VitBgbCZBcuaA{cr7NT8!X3BBvl%V`W4RFFy}& zPz7U#mdfpu^m!7^K|~14me0=)LpMJr1w)a1Q=YMPmDa+-;2Y%77AcJqOsV^IZB0wj z$__7e=`WZD1;td(l}wQxB{iEaBfnr$9*2u8trkL{Fqg&J~MXUfnoV&P{}*#Ip*t22CWjtEDnT7ZS$IAE-c0%qg~xbYinrYg;zi5`T2W#l{%) z9G2wTvVU7t~@sAPb=-wsz%1cJE-;8nAB8d6`bBSGTkTzSVR>OmT4jHQ^%96{Z)PS zKN2cMXrh|;t9$z4Ri6a2nuXApt`~?3+lX#Q6ISX|N}0xpq__uC3jzUEa(5C!%f-Nt0t=|6wIHszmEp54>^Hxi2=AKwXp!-;ofOBSDRtRU-&^f)Kf;60X^ z@wE6)#^X2{4jr#u4|%VM-jC}$nm8@Kkd*}IqPiMzgiJwhGZahbqUKU+unh2#Z9eQ= z?NF?8P6bn5^pB~nn!_{gHpXh9!clxQkDpS-i1`GeEJl0xc8^K{B-Uqgd78C#E3DSE zR_XYI?Qa3rIrSR0jB4h8zc`h z!W8&0%aDR{t@!4n#{e+ZImx@zNh;_0l}XK1@^EG-;@2;@@cxKB(K$}GGUWM^*7Cm` z=0Gb(^-;fJA=)~$>Zg!;oqMgoHhlkn6!W~|6NLuqJCStlDL*b;iZA)UKXF9k4ixr^ zMz>e`PAQQV6#Gh~miQJH^YFx$DoNppkyzkV?O|j_)HeLs;`WbE4yF4?Via2FDsx%9 zQ~2qF9cea;bkovH=A6%5TL*0QO!n^~vFOa2kULUMrLB-bz3Le3J;cRyLnwWo(+uYf zh-lhY%x~3&|1&3o-OWhrH&ZOQQsnQ+KO5f^RC3n!)6S;hztTU?^MpEg5Ii0aBY6@A zk&kSw(FVYu|IpA^=0_w>K)s3Wx%8;+$4X(1Hxd0Y^CQxY;Pc5rc-t|CVHdDh4qvL< zWGCNfA)&a&04q)pK2>ibf1;>t&rKB(Ai=2bPp(_kDRYeeZmXk2&M2O+xpl0T9w}h? zQ%Snxp_P@|ne^^G73+t$GU7a}3I^IqJuv>yJ0_NE{;{Y|`~O1cSdbm;=Wj=yl~gz; z&Z4qClcdsm?wx%D_f=gIb$JPO6)_pxTQR>6U%hW0YmVtA7(A)%?-(Gf*((AlR(ZyD z(ZM?X;Wuc^kl7{aTRhLO{u9Z6(>gO>s{rz7)51w&H$PnqPU~8 zE#PzrU!or_+pEKCj>%4v*u&b90KDC#PjI{THY=s(=&gx2npl`e^gmnzuB+Tv%t=Q@?2oeB|C zJzdzfR@eKJK4FJEvi}5m!nWCiEYVz}D_SIJ+G*5cSZd-wMb2@I05pz6<_zNd%E;tv z)fl-NB$Ay(q33n&mu3=D3j&1lao^33VL}rElxm^Nm{h}p!^(3(_S|1+8UjlD4^rv@!v@pCh(oO(KeCJ(_A8)8Yn7Km+9EV(LT7KT!f znZQkl)t?w?^R7ajkdi}N24R*S0gst0k zvgkza{kwVCUJwguZN}Q)z?}B_*4^w%dk)ir$Cta)7gQ|ZU8%+i^yrY_{cZ?wyd~(a z7~>x6K&yL3AU#^*(w$R)jbC4K9Oj_)THL4}OU4yDw&ZGBsq+xO;`ZHe(*1_X<)A5z z;V#2pls2o$a_trZ+!U@$6wXRz266a4K@-~7(y!--GS+c-7=*!3=og-%3ycl%cVu)T zjLSZ}>eu3?j!FdT29^-888-1U<^<>7z}30%wR0U{bFl4(rUyWm4li@QWDuho4%pBN zW5AaCx2^*8DPW({Xkna7I7ln^s^wlllJ!5{9HXILJHpmz^w6t*g_mmxhIl_my3cn} zLxp)c^nQf4fH#67GGX^}GYL?)*^Ke&TaYE=Y*oNJA%?|5hS;M~2UhMDgAa zRweQtg4JgdU7Z&IgG!T$whtu9VwRw0MN5${&s0og?0M>f= zObjCQCQmWIiFm(C9m~=(Qvl_Iz*{nXF}{D8Drw#c-8u%2P$oFCF#l z={w6+i`bpw=@Pp$SQGc18Jj` zrFhljPC`wNx&`IHf$Rx)RR*gcXNf4-55;8N2?=trC1n`jNrZI_$yWQRc;I)5LeIp5 zlS{Ch`xGg|am-wsAzZhX&KZv#fV>On%{rE}pU1y8l8`jGSMSyIl!2PlZ+IF@8Vvjm zWEi-e4~I9q(Ku^}fM$fSxSZ>}hEZ}Tb`4LAWT&(&lN_5QkGDOneaA0OgfOUg$*~t* zF$*vkbt`Dcti&?9n8{UFYNXd>?+32Qdrn%7*978pX|tY7a*-!=LlXDy=G$al0^eTY zVhP;dtnraPGNz_@JH>a#=dXxgPF;u#IC12aZ~_-P8KB>|8Qg>c;wF^!JzjKFpA9{; zeVY0(hP&aCTQtt_rDGTY{qA~)c7E2M$8n0?x!J6!^sSQdD<4$DKIh)i(r+%HyMVMv zh!0PLNvNrA9;;OSn+7R;ngab+6g4MyX#KV|Ow=DuuUbAVjoa!By!)0e56m0ulb*)` zDz+k@>VY8a{b&@}ueL6^FvtTEe)}e2|L2W~>>F5XG~xAIJq}89mV5qp_E5J<^o%Qp zdUy>v&3aYqiF8)R(wql-9giJKcr&I_-~24snZdQo-&0vln5N{GTLhVQQb1Y=rNZPy z3)8<)>@@&@S(Sh@W>+A^E_lL5tgx*Lkb$_%djkD7t6G56iVviq43Q;fe{aZ*D z9y;KHLWDqY0grE4lb%v@XY ziGNp`J}u**f3wa}v|HE_c6%v~J+_9Vp$Gf%=i#l$jw|z7?qt2IKkStATZ5l|V1S{! zE{k;2ts9=W(j~*Rfsv!XMNKL*+{8~>XxvC8>^8%0mq{mQNlCpNmaQCnhpBmOA++1L~)UZtQ`~f{R->2tK zy73Hcn^O=AsgB>toR47pB+csk0irk)IeTMA6|e!-8dphTtb z2EM1OcrD;wCjgXV z+BA`!8_%lRR#VGABeHO34{6c3m7WGouon9M?mSSx9+qA|sYi?6-Rh5DCJ68QaNFrm^6aD(l-G#aq{=9JTV4mJbI9#W<%^Er_CIy})6oB~ zj_>e4b$o{x9pA(etb0(~H_Jy!Hjd@oE{Jf0mzg(^8THMN(0>-JZMQ+A8Ltp!v`4rt^rE9Vb&#$nv& zqDs*OlOs17=z@QbyG*w=pv_dSv{^qzSlDS1QP=NF9IZJ~;?~!H3q+DT9RwnOC}TQN z;njDZ9JK2HmKd2m%e6pde0I3-Ke_Su^ABE`@zzgs0GuAnq8bKER$R}9viq#y2pl_b z)p=JFucoYWp897c)UP?Q?Pra3-VL~B?pEhX-1o@^xYaozQv@#VwVkdH^8HRmoWx$F zK(D!phlUjU`?H$PWyNn+&n=scW1V7u0=;q3wNTrUKl=l-PZP3EpW1c~o;MEzot}Kr zpRa(g__ELyDqppGqYFFUJ>i~Gwc~X#VD;>32>bEftfl-V6@Pc!v+IECNAw{m!Aasa zw;H35Eo^M+@9ADGO6q?^ZrYdCjcco`w{ncHRv+Tl1kBLG-br+gc>*5mJAMnOqL@Ij zZk6otO>FSsvL0co)jW@tue+*OTy9GVL!7E{PDS`AI_gThSp0DP4(OkX9v&a&I{8rn z9)4&A%>=#GkKhh&6v!evoNzf3fd$a44{KVafCuamoc(nL7~=+QC9yF1@PLm0l9-Ok z0&W~%{T1-M9h3oh7+qB_Kdo9JU+#595b3pn3fGnh_VT7=TBMOmK13f}&jTq>hMHRv znxhqgm5yK8Tw2~%JE0&gXTeoS^k=i<-+^ZA#i29OGe7Z@85zLtBA7^D{zU6akj+G_ z!}P0-M=5}BTv(Gg0~|L`s>y2K=>~bT8z_bf5aW$7PsU?9q5qAPQKY|lCGWW-ZOe;M zD~MCPg{#}|#;WBWbm;tci$)Z5;fOK+%^Kl%E$x_w)to`GwQD8GzXag+R77lNfge88 z*2=vD>%R>}wqPYrrFM62y5Ej{*uGIY>2&;yd}0JW@Si%{V6V2@tM?^bB=TB}Tn& zkX%c9P`$2`TU*q{UTVcbndO8Ec~hb0637HSIis&QzWhF%6FEgu?i7E`uf0*tw#H~~ z6)P65UJvx*XA)qLR)0i!R^*Tp{YM59ssRufqMEd#-o~}PTD|hg&u5m@%R|O|4M`{l z1Q_o0X!GG0@-u>t8Sn;uRdQW%!E|qfc-`pDZBp{*h%x$jgc6+pLxm9)!0$tX;B?rc zhVcAk3RTAh+3|WlRd>TU&^8#obu5hgi7SLr8erhW^Km8*z>8q$V!xKm@FD!8EsLE> zAp5D87~T3cN zOy~u~HqU2ld{$ZLSJ6Q;2_k^?e3NFQdSUs#CjJn_y0a8AHyHp|lb`t}5?ZuE(SP{k zY&VXo2KzDAU)2pm^5n$kk4wj-N-V=x`v9e$p15|DX-{C$E(Xh9TfP!NIz`_RiM_zQ>v=!_g=CTxH&{C}g zBoYTm@AeAV{d$}->!t9F3LMLmb`7L~H1bJ>xd=ky3BqN^$ugDh;BA!&h^QafNWI9P zx)i_}f99z?a%uKAvU6K}*bRq0C)0vuEmYtp55|x*BDu9~T2_V=*-wD63b7UF%FXMo z_bi~J_T1S%Yx%Zm01**CQ2z`A@qrmABkgs zBTbPa=<&p$|BBgD^*bf6ENDY`if(m1pmgncc>MB(e|CPeH#PM`DEyck>uIB2|XvL=O{b&_fc9w z(+#bQos&Gxb!h#S#!EC0Dq2MwP@n=n?A!?a;sEP11HWy-e}CnO=ogmmxMecOq6U8s zAY$DWhn-T>pc~`M!UH*=XeHP=OIRj1J;S7;CwNF_RkPrP0{DPNO1Wv z`s^^?I};YZ#V?@x4=d>e3jDhIDoKDHU@1sj@W3G1pcu5~!4BLCB=6dt zW&H1@=SN?7qS#q5+s&KegovI%DKU9b2B~`Uq5u7k1eOVrQOjT_T~zM?MOI;N(5HP} z^fOwDLK>XuNYyg!R4APws!81d=+OUFH|G}+cOU~VdnDvO=$)xYgQR@~rgPRXa4~M6 z^}RHcqlYxqR)vZFIV7w^EHQOEbSq6d>Ga2|K|>bMI*c!QLWHr#h@V(nLNcV4^ei9} zm^KfWUPRY$vbl}aRhAkC*llZ-=vbxHl$tM$VM3}hn5B@w z6Y_cn@9YQ_@M6pN(rd|k6-aKVR3&*W(7gAp2JgAzCmX9syRfh@6){Z2%0fzt$kj#7 z<=LCzq&@abo~u#jM-lQ1odj?Oxz%w4|LhcU`i7=Je2!tip8;rk74`&GVRg-tZhm-&iW(s$Zo+9UaMOj<5M^@6 zl|KK414GN1OIyUwW4%B!9Ad2d@P#?cfnE+pC7&53c5Gce|D;FVD#89ojk4YQ6+3_z zyM&G>HZuxQ<}iNg9Bf&RV@l&Fdsy%lzU-QJ1PJN-FzLsxVk7(N61v;$CY-cvG}E0J`W=Dq(tSjLG+o%$c-%7K(yd5-aE zQOVpLSIY98r#ZpDpkYxV7rk4s-3f-delKY83D-q`fzh-5jZ5@B<3$~PEpAAnuEZ;< zq#A?|H{srlFyizICL5_DZzw=LILiHcVds#Y4{ zKmr(2iZRuiAZchFJ>L5UdnG9(pCh4w^(@46l&?SJ*4tnU2YJm5*!G5QO+=r~)tvHi z+`h9%?@X{y>lpyA=)6Ln#nzRLNpZDcp~mYno`y1q5D7wH5A0*h8i1M4oRA4(piLU# z$d@e3hR#e-QEvcJM&{AeA>l`4WZI(UJvj^MzkIPoV*Zh1#|E<+>sN;hE7S#;+ z|SPy~Cgt7cZNA3|O&nXf>DLbM6~mPCuiwNw9z7gmkG=GmWd7ABD@ z{#18_RZv3Mi$az7uY4`Ak@kE54+v-M zJwL9q-fl#7hvumb+j*?JfEBW@^L0!k3QKTP*{DM%e5KX6KVr!o5#^t5@{&^X%XT$s zAx@4W+t9JLh<5D=?c%e6-x1;#al^xlh@bMZ{Ta^k4s4q@|H#xaMIdTtm}gntz?5}( z`j@vbg0^7z8XL^|7s&p`AU=s+%7S8`<7Fj$5Doa$fpw1I3)1wKo``eCNZ|tHetxPO zcuFuJ+6ZGzyuA*-%mQv*(11Xj93klOsy?1!Z@bCBt?GcUb7)ENp#^*AB)rBW0D%v2 zO+jSx^6Pv?M+wCsu8D;!=zR&Ld4_eOm^)!@hlkAZH`J{@a_~v&&I|EV>qZ{EuUF*e zAoxdIRL=X!hIO_PHhHgSgpwQi)CyxJe5pc6t6V z&_Okg7(P1wgj&E!-fBdvGXH^YZ{C&dO;PfRd@bT;q@Q;EREIP5Pj4~xG zdar?XnmT5~=rM3(jMe58Bm6Ir$XB>F%u*W zwxGQWR_DTZl$oa_@W)S)@B+L1V-l?CfcQ|O0NJ&OGwiulx@b>DkY=egaq5j+?gesG z2xK}v2~E8y71r521(GGof>xgZyl|R82G7O6zg&h zoP*%uYF>rbC@9R>OWF9A`1_&ax5Ypi*@_}W0IQU;yV=&*PuTNO2WzfV#0Jhg)qZiW zI}fangp~2+TE=P)AC(<_Be1Al;rDeQaKOVP+m&;w3(Z9IJUB_jMqL~BjXgC21 zEM4V{ObCM4Rrb$F18KeFyJ9hl;wRCxdLEy|Uw<7YR_edjLspYNx!6t75hwp1By!JN zESjkRXf9)vbqD~aMQGKuGGix}+F9cccFTIiUnM)U>4IY{ugD#e{mf8pGWsa8>V*;%%2m^u7@_flD-7VGrn+ zS;vq3$@$$U6shU;k~m_r!DSSE~@>kXev#V7PFAr{S8$uj)#&Smtt zL1tl_&0JY8{Lt(s(P?n(n+fySgOcjGW;iagl=Wnpe%jYfjonuUb(MgLvf~T7$!M|J zeVE&a(xept-(IE@$S@ALN06M{0SdZQBrVRfxv0p&$2fV>i3#=$#gy)qG|fNN=UtA{ zBpUq_ov45_=kP!#$l{ofep(irc}Kft8iUvg#sUk0Wlz>|u|PF2?EKnbRE*=3 z#45e5oEQw95IS{i5348zG7g(!+)Xk{iW}a|Mfmso=lIiM{E#SMTIa65 zs8Zu|gS@R;%-;{d#nB^Anwi8ajhWqf2gz958 zb5V}2Ije(W1k2@MQwI*!XvX^pk+{L1rDQMRQ83!-fw`AEFV(#}OQ@sigha-BpO~Q+ zMNDGi&OoWfZZ~=K*u8k!77M400_SBjU&)lRTrN*${%aAd%{jhBXg_EbNr}5qDRX`C z7tu1xb^5;mc0h^0`~^sr`y(;M3Grn@#C>24wekuydw6ae!@lYA*$5r<4nd_ZoL?OU z#fR-snB0K0V?Riwvmkoo{NJ?=P~;7tm%0#|4uUW}9pdTye(G<9V$o*CV@ja(D1z$v zDTH2Pe6S`B5oa4C+GaOmKRrX-C?kwjR&q?@wg@HWO;Kua z3{}P@sLBQEF7M^>dB$_sMbb{XNxIkdNzZ&0=|#^Z1FQ3-KlL;j>50kMu>%>ciX@W( zA~LE@B;yg?$RuYqnf|0p#$QMMsLy=f2r}N)l8hc|$Y69kG90*@3^rULJ+G^z6TFyo zjb@Q{Z&MOHRgz$HThw^ZWS>KY^1@vxDbYsh)?p}IAH#k&$3<5>kZB)>bRQq29%j79 z<2m9PM~prA0a4vt5c$3lBKA#0*gVd`dT^fg%~S-g=G=(-1EdG6;NRE^qS@==*Oc>H zp6Q^WnLldtKikJSqr>pMI|-tmxe#}f!+#swzcuIYpGpvz9fA;RKZJ%ZL0IJ(MBGb5 zjNLs%FMEN+<1>*MV~&)UT1Y!Pnz56C$aP(SoV*egY$`*E-y@Vxwny;Se9pbJLij-$!kgAYGt(c@3rZ0i z+z`n(n<2%M=d$XL$dtT7&cQ~=pFIfqoNFxpsE5jy_fc8j40XYdB-qdEvrZ?{UeoJ) z8%W=K8R>7>Kt^qD^4zq8jFR7z$?#Y*af>C>qFH2~W=<9!Z^)wcO0w)=PgYAD$g=-n zvTE!~*0zQ}>IYfsFCg=Eoyg3$GnrJ3A+t7oy>|P^C|*W}NjJzq)0y;5*{8U+fpp%C zBdu2|5~NQeL7y(Djxa`fS{2IAtw!01hA5g_jDjpP?ZS(F{lbDMyrw3%^mS^ zT{venj0VW2rgI#wd)1;$reJhnz4PueTe_L3lhqlkhFat z(rz9^*8SngId6fy6bTCRd!V?gJIcGVe;n}!wZBA@pumH)CUz#By2hk8Sw;FsVo5(` z78&a9A)}S1WW1%4%*G!kvt%zazuKNG8}1~_E+DJ=Gs)^?7THvvChKmgWP9`>+1YuK z&F7LI^@%L2yOH&^^<+`on9PG)k%g6p%=U`N6G^w(mpRZK8SHmv z=FLRjxf>`rFq8YFMCo8tj?F7k)lZIEw-uxnm_S;Ov`BaU8PdNrmkg#ll9AYmOb*T< zlP?{~Oqb`bNNciChLDBEfvn8={g96#>la~Ub7&yhy~rawO)%L75!qcBOpg8U{HRZ4 zH&;rwkGqkr#W%9j*+5o-LbA9um(0$MBGdDq$<%5l8AWB0k;OPNxOo{ILYP zW;~>g8%oan(5ENe&+I=Lxs(1GeujUZO(t6t$@KFnGR-~4_V|UY?kAJYx&vfgvW#pL z{mH)9Q*zwap6s7`lhZOMa#VVg^U}WL^zbt|>8v5=l%L5(zlNNAbI7^10Xg;%k)v)u zvagy!wmW>t_GBg5T)#;+$HtM>;1gtd^ck5=9!I88hGg2|G8t`}Ook3CNq_5U(k)3O zokJT*Yfvov@~=?6-UyX%)F>N#5Jj&OP%xwlIR)d9G4~0_rZbT;HyrVYdn4|GKB75J zjq*?+V)R{voipa#Df2^aHG+b%AGuT?GCht*lNvyn=Khat@LwH+SkH#}#mrGn@MPTo zID%IDAo%Jrgv=g}u&OqQbjU-@p2LV8?#B4#A|$t3fi&SQq(6I$?ArFoO@)$W!8B5Np^W>6gK&~g+lH2pSlr8bW5a9mve&92vc^A)|HKWU$za^c}~N?#B$$ zUA>I7EKj30{}ieN7{_~PfwDu^C|oH+-q&l$yf6isBibWv;T$BNW8eC76k>NRLG)B7 z#;xviezyfwkF}xV9IrC=2IONLAU);|@e$_LH_HCexcswy5Qm#X8rcG}W6hYiH4Z`E zJE3|R33Vjr_RliE!sRWZ;fDC>Cy_MoERyQxBmI2=vff`|yzo8p83Qe4OrYZR9#pOU zVZ22~!|cf@#fOYbO33W%Kr$bdLzYqlvKbpg*84V)E&Iv#1DBG6{}6KanMbbs+mg$I zb>wO}&FGpOFlzT5USC|O{Rf^=t|+lC@@r~@*W*&wagYb3ieM`6-zMCToa##e=~ zXiKOwS|NB@9fF4+g%VOIE^UWw@El0Azx^{i{OC9&Q(YmA<@d0oI|6bOpz0URxXe+g z=k$kWkOef`rf^<=DdL)^A$d(pq=YyiqyK$m<*1NXb_2yif0Vqvg=(G0s7~tkqkE8% zq&u0YBFX$z99itzNS1{>e+>vF+YLR)Zpl`1+VGB?rYHhoSelrp=$!!99>K{J@1pn$5gTy|A5T= zw8>;}3>nVoK?ZT!q_4Imoo7y@mD-5}QZZ_(UZNs14CSs}Q2fCe1^f=LB8 zPe!tb3JD`7^4!)IQ4%j`+ATw9crrqUbw_Z^RS0~|e1mptAl=UE&Qix8wfUdzga4OA z$U5|d;$wR#8!(q|>p+B-tblsmAVgAk#BlyBp7Sxuqmq#%nS^w|U}TF=Aun+a3WiTY zaqf6jIy^`9@cF2_nDV3hk;$SmGCAr-=4aGowbg^Hx(ATGdMDX|=b{fo$f;R(a&7BP z?hk(^_YWcDvAW%luJcFskw+oO-Q_;HPnk-tR?+18XaG5nc}9+-+{rekhOFvL$nxNfylzcUX>?X3TfovKV1AIoA0w8o^gmp{#w60B0-6#0w!6Km8+Z|Lq(I zqozaTbrb%K&&$3sUp!(O^I@MswR#BiSd|F#V@~D7OvI+|LcDD&Bz5SBw3s|(HLpPS zR(<3R28unKp{!2;`(!$(I}$`%HTy`rU=is(t|R?J9m&wplT3DU{McbOSsa*5R>cWq zJ@+Nqu1zBQIX2|*)`MJ{HzC*JD)Jcl>9@B18K2~_N(pX$YRKYCPFG1 z1M!xA5QhDs+%;>5T0vYJ$~-2<0EEL3(CQNB_P!yctu4Y%E=I(W(TJYGJUzTYLdz&5 zO$Gr5;n{~7l9(KX0j`wY20d`&J^1Ig*| zcCr`kCEKxg$@=Clj%NjAULz;7mD*(7buH;@7*lO7C!LXRNZTNQ1h;%qZ803>mMWC} zbRPweHzJSY{G8Jdk#X`El22bi(j?CF?&N$N>lz~DPoWO!%-rq_1P#1{zy>@YT`7V8 z>+$gS%7D1p?H{%A@Ap9@tc66$oS7OS05#!>Hgg&N7 zVjfy*DdT^B4UxMiQX_&=sKf1C>S-hLr8mZBhpFfLHYqB$k35fsGk;*>9}5GZW>0G zhU3WgnT+h}Ymr033v#MjLhkN46XklhRkS!X4Z z)qzAZuPi6CnXAcY@O09D!E>9D9qGQ`PFkbmNN`+%s^<4mHsC#D)=CswKSSPI&V!6d zK>5udUl6z(F z?;i=p*lYw;R6`kjAEA4!5ylvK#Ijw`Jk3VTX(uGk>Vo9PQ;@dZ2N`)=ko)ot3Oo`} zs+fcFP6tra#(@M4myyn-5YlVXi1fR}lHuq?GI`U3%$v+3%U)Szy>tiJyX%qttyAP! z^Ojt$x{`-O??2McKl2>&=*9Er%F*Q9y__7(XOaD^31oTw99g7{C$l9{WU^o=84s}_ zy)|PvU$>F8L%xw#8$;ABzJap*_b5FkLV+*|xmx_3elbPb>gGtjI|uQ(TM=`69%F1j zA!4>C)aIiQTEU!`3#_YSzOF2mxx2mDUkmR1U-bvHw+g=9zI;Cp$({v}c|3#s)p5oG zRLrNJ&;H**gmKO+V#pQ58hzyV<{}azy^*@vi8)@ak=6Yx@+LMyVZRiV%S}<~#5nT> z&IucQB<(G=q?_=S3=a<{<1r5Gm-&(T+NNYVGm&i1&L;<(VsdJElU%!uB=-bf`)B_p z+Dmdfc$=IbwI$~_9G~vcC7U@ap4S*xwcSo;<4VZLf#3bARMP8rfpp61lOX6V>VCS1 zs^Y;YDV~nPj{M&I#OrQ`H!@Q{B6;;?=8g&xU)&AR?>ZrJeKo@N_eJPVF9i2Hih#BI z5pc4S^$7_OzqtZYOegrR>Mw~OVMd`V&Y?s@p8O3rt^!M%hpZc3)*D2&ubC8@q z4qeO@)k9LjZl7YB#K7V zL*DQ{$Zog;=?8R?c91!dt4<@%CxQ8GZJ{|a6X8x`=6*OMNG@ZI>M7RBJ%qeX3M5Xh z5EYDrFTZ2-KJ@o}hEG^i2*>$Aw5TI%VGSU?e+>b>XF<7kB7)0LK+W2_NGn@t1}7tK zM-<~mbx1z-3~5=dkTuwc`IOI4Aa8)uGe)TRJRQ~73Q*TIiL_-?NN+WD;e3tiyXbilZ*I1xn{NceVhJ@ZF2jmDY+c=Cx@a<E4tR#h31x_Ih=F?CHiT?h#OruZ1nPHz++qtPUd+|)y9j;-li_1+_4~eq zGSQWS*HvHcNRnU9Fwj)+><2(iwSkXYRS$s=lzc4RGb zM)zhe>~a*$We#8AB$UNZMRmwY&i79vZSU2jx80EpTnCZiy|HAn@+Fy%VVtb01KG|` zBZv6Kj9s=PS4}f=FP-xHHvJXbA@LtSj^b<;3j09N1BJqV;#7mT|1w^6O@fbyBP%sm~2yp=PM@n8|sI;0|{eIF#=IfZD}vuZYt zMFhS&IU)N9u2I9QZE!3STwn6}*SS|8XZM z^jQxyZWYI{ixK?1H^Mm|5xL+sqO>`lik^W4@2g1JG#Y7Re2_a~KXUapqNJ@2N*^h| zk0}XST_WuhElIb366tF<<5-hpn%O7GtavwB)b}QWMkq==HXw-yn&RA(>9TTcN5Y(qf0v1Pm%Vk z)g(C65!DSlqV)JI6tA#m{!l5h`mIO0YzR`agh;r`yq4q4CwQg@jd>u{Qymfd>MNAd z`D~koko$42T2TdYat?eaXv6o>;@`IkK0BQuL>?qFyy5?x_1uXI5cqI2ly@)lb-F>_ zpZPOA2SIapFXGO-AgSREq_(R-`WY)^J9R+r$vhODvO(GAIjA0T7q$KiNf6b7bQ(S( zgQb(m$YU#+sNKozXKS)FeoHpB#$*gVk{0vYYI0prGu95}6B?l8lPU5%w;=1| zBV=X>kz$gAB-LcZl`uBU7=UK>F9;j;oViI05p*SueYF>m-?|Bjd^+o4qagCt{`Zyrkqlr}ppL^jG~&?m0KfZHR^(W%bGKG2@`V2gqtlA(;>HCF5C@oX-%E!8mi$ zyUadl{4UgLu5%p9{Hb~-C_FuhId|E}S<@3)7L0v5_#olRRK$;ZhS=FX5xKc1BJ`M- z-0=~DEvF;k{&FZ5b8VN3pCLYW5Ppv1;cF57`@X}s-2>J&XL2ou-jK>>Az(%Tl)JPM zyz~P?*JmL7s0kuIvi@>9=Qmg1LsBE=po(@PvsnPLKYR1DvH~TWGEug8B&yr;dwzcm zY4@xk9nEp(wA>@(HXX^t#(^wc){td;FS7M{Om;GFay;0b+$6T-VL9&i?fEOW$>Y=n za(9X(mj*>-w{;fTt)53#UA4)=^#OBwO3Ao`n)DaFWqyt!=^XP#-Lm7TJ;t2tDa?x> z&Ayu7ZDcQB$ej0ONJ-{=&fTks*PV};)~vUZvL8LBFGBWTM9@>#zwVw5g%RVPR~K;X zq6<+UOZZtw{l5S3Gnold#6?ILKlS(2gF=E4$o<{VHV?0nRqxSc zwmX_k40@2UB%Ta(k1#&afV3)xqRy%Vs*ZF-<(d~L&b)|1WFRM?2eQ_MA?5uzq>Knc z{JCC;ezgFRN4FwO#~mRXa}Yd>wL3Lq5YYY}q;?iOpM^na_ntL7E&sm%5VfBHv2i`f zrZj{+gljSM;Miuf5UM;G!nCrXX|@^B?2E@f)k5Odjz|ri^Zgpg9TCj_^I#Mw4nUck zKB_J}N8RK_r2UBFXsd^$Kd==UWj`g8zI(`GN&s0~>?517?&R>~0lB#FI3#3}$0o18 zZ_i)(H@WY*M^5Q4$=o2%M?p$vsV&Il8S~`Mo+X1Dqe*vZ0%<=^L*2{)s2$%J zmEreMR8_=WU328@N@t9*JJNbwK{Dsx;wxt&y0#jT78eoTs6Ik0yg0_OfN~M%E>$le zea-c$4)%knOEP@V{tdPU-yyybo#7fYgZjgtIf{zutD#(GkKhelbEL~1gxh`P^`Ch$#vjR_l}K5(jrAF<8|!) zMplqn!Z5NbXh^nNugEbkfSm5Lf7UOaJnsH#=fBb(zulWWl%L4MF_E15Paubxqsgv! zELm%Fjw!MQnHlxrbu)kXZW?=Z4VThY|dADEq-7kVi0&dDVW_^X`K1#s~PW8}nORzJJ2E zFq>=l?O;6g8)QF!dyJ7ELqN0gG$r4MAPxJKr~-;>qMi)2ev$$$hvfxm@Z&j;}cH7Cw-u=)ns5dl=Mb+ zCmk2&Nm;Pgf$OzZm=TI^vVQS_Kl`pzk#&9o(mg7X+`Jp&de3DIDaSX@3lZ_Y73(cF zKvnaJ>-MBUVa_!Ro;tE#wibTUV)(ZG8{88oaVd@YvxxphOC%tG)!xTprxk~ zy2cV=vB}WXX(L*&3~?zhksQ7gDTS<;+3k6JenLLx1HOJv^9Kr)U`CL_nwWUxm>da>*aEXyQ8<0@3A1LaeOvrgnQ3Oj6I zypw%smk&rgr-#G?wupC+Lu`X{T-U_};Y)5Kv>yAw-mKLL=Q?n_eoK#ch9uG$qODuu zBW>_oTfTq7XX$kav(`fNh3lKtcZJ+YhQOYzCE`r2V2L>3mHgJvv7Q6?tTQA&X4Yipg?C z2eMi4f*kg-4;|q|?n8y_L*M>=d;ZF8a+e(-*NY9wMR1cG`+g#8wINyV`$}dxVlu7U zOondEAs7@+x@kG2-Jm}Sy0t@f%1u-h0i|=>Bj1eq_(Lxu!#oFRSDPUry9W~7N)UCu z8=^L*BH~>~s0ZpGC?=b0=U8(cw*p8H)oa?KJ6zo$cxcK#$X>bzJt{saZSStz+_kFv^# zs4<>{+FlW)wXlSAPwgdrYv%G#;Fx+yQ!>>|BCA8Q$?6t!%t|hhV^}V^EeK{Vz+a9D z{5Brser^l7%sfhtnHsX2eVc4L`H|(amt=Zj1{phdCc`x!NN?Q^(lv=CttJ^H7?<$< zyC}0CD{Twko?U-y%dgj^f+YCOkwH}U2>t^WLZ%rDg--?J3S$x4|0TkfK4Jgw zJTylQ5c64%_?lfvK2w7Xo7KoF+lBm#A5bv98WmmFqRQ_z2~3zDuy!5kGQUsHbqyKX z7m%@aIGO5RWq$cLvgsfv+di|%iE~;m-5Zfxzj?oJ&tJJsZp|ymRc=O(n{obj|?BGNCoL?$M_WV-VenU8%>mIW`!?%hGM z9}rE>Rm}T4;X)qa^?%={zhav_#t-Ej=qYk}+>0E2w8(y>f@~Z(X70#*)9hws{Q5g) zDNT1n4bf0VIt*i&1__4q5JLuB{__F^jl+J_y=Tne1 z9nZCByrC>kXB{W&YnwMf_y_?a^VTD_?;|8OHDyh0W2ByEUY7P1 zZ-3vWzhav_`t#a%?+rQK?nDmVT*!9YOR}stpUf@~Cgbu5GIDxHhSOPh&`V9)Q+-hP z_&AL#zmSQL18_Au2Hd^H997&Z%IOu-+Clo>xbAI^$>j^84=~j5O#GxRJBdH z?h^AkF7jA^x&g_CH;@>QhhKx+@Y(+B`}14>L9e~xJ3|0ri(`-oOd$Kb27&DV1)jZt z5U%T|UhImnZI2LnqX^NAAH^0wL&{Y@q>t@_jOU!|>lDOzS_n##7cn3GD5^%VKXCpm zX^r7L;n2yXZ>vKF?*}n2B7w{;#}S7@WV200_FX5C({dHL)O$=GUCxrn1o3Ze`k(&f zeCs}Pzdw$gw{#$f4+F?WNd$c3|8zRz0VCvd-O^Y*mgzj z@XaX8Ifl}at5DFN^;3+EWG|7i4t_9F&J9AsJYH+cM?+(F65&&8pys(OWbGydEgTAk z_jdM+2SZZC@#WB_@XP1g@h|_={LVGwZ6O@2f_U6G_SFob@aqHRe6Dj@+Y6zh0)*$+ z;~H^3h^{({xHo0Y72v!l*Xhe>djmPzPq-e*AQYW+K}k*&D%*05(~mVQ)j^~?_cZA> zW_*CFikQrtP9~Y%$=tS(tR_EZ&T~Do?|FfoJbIA3gAsYS9QvQO$#3@~k9$?jAAL$L zhS$mA`E#igCGT63&bfxB`UD24d5=&7RxQsO*dr*FcHHbS| zTafb(S>k@kXg3xqj4dX=UW5c6FT^B`MbwVz2zTb1mg_DcSdMRnziSbrKnY0Lfv`~(*7bRy|f6@3v(o6gH2@m*p$ql z+mOX!BAY~zZC-zJ95#-z{6h}t-?#J6{F^*_I&n-ho171*$a!ctvI{UI z+d)Ifg1I&36-_vE39fOA*Y4X#Gantq5oHxEf$l94*$2C@bOB5xq;(GTuL zQG6Fvwmyv-K@oEu29nNvThcdU-BVZy8TOsVIroOl=kVcqT$?QSKOnolCgiX{j~o@R z$SE(L-1f|6-plqs($+ug9CEY$M6PenGLQWv*)3%b;Rx3Gd^|zsuIK6 za4g45FWJw~hNj72M8EBeg#9X{2)H&`uUp8p=!{&$QOMuEoO#f#QIYR~>eh=mH*H2* zhoadhSV#K%8j!x;H8N`1kBs}XR`Z1}Sv1uln^#}R_8Mcpwj0U$j)a^OzLEPC8F@4s z`A6FO-#LdomQN;+wYSLCkaMtanv+A{U1WEyn5^%fBCGjJ$$ZuvGBq7Wh5<{+u%kKW zaIHvpLoI26`CZ0GP;=A)Wuxz)Ff|AT{+7tqK8ehpI!Mh}hUBdy5O*~Zaoy}0M|*&X z9?Xl4|Af$ahoKCLM&QKOtkYNv>F4c`SpT8e8zKYdL1m4F>{TMyGv5Yf##gACgd${J zeb(JLK=XV8Vj|BWE;|X1(ugGO5uc<9XM~$kU4Se!0dP zyGqi*Z4x}cgF5d!%v))MlBy28&OSiy)V9c(`2uNAxhC5c<|8lvg7~2Ri2gbhkw>bb z-g=rb7JsP5aGfkwZv@;r3TdSa{N)cJZc+S?+WOlui1f`N<~qpIp|+fxet^K*Hwf~w z<@azf)ItNU;li~-;=nq>i%9I(4=L*kkt#_=`h}OsIi!Vxwq7Vcs6nOuAyk~$j5^yg z(jLE*v^8d=_vSk3_vSc3SBH!zg_7CAYh-E0DS)Cwkk#U(W8BWO} z1GCPgyOsM9Z9rOQwMejLEh=v@w!6w6B^|z@u&)Pl+HoDkGs}@S_z{xYl_RlcI^sIB z7Ut6?t{e3V>T<4)B`bpRG}q?myubWg7^JtZK+=c#PqQokmA-Kuy-AQ~wu0he3Fo%o zLe=>y!n`K2#`7kk#?L@>Pi@5ck6@mUCsJ3vnUADk?v6Da4$o7z(Z6| zOCrI=HKg_CDe2BzN_vAEkU^JbWTbvcCPf>_j4^79UfyKs%{sD2C&^*pC)Su*ljF-x zDWM30G(n1hAVs8$bVBb< zARt9R;CYkDB$G++$)wGscM{V3@4?^lk9)6w96jE1&pGR`mMa)0lbOBe``vrL@AG^f zjg6RTy~MOd6@9wb#PHZVO&a%~U5}!!C;e+PN2BcZF}yweK8o}YA;07lvU2GAOj(7L zQPl7CK82*2T@deCgP7~|$Jjqa7(PeH%N_{a)&&9g>2K=l^xJFuBVXx*7pUULAV{S^ z@N)}PIcd!exM35t(SLitnb z9*2{sklB&?`$=NhqrVs?kgu`EUQCl-i-o%%{r>~S_Fzx3(fl9|duNM%95vD~6X#Y} z=!=>suHJ#-N^fSfP7%^nJ4%`*&-o+oo7fT`f%qxQVlUqPPrn z5U16S;xOwb{nXT%Z2n%Xdo>lSTSj8}$y_n7rZ;zkff!v&;dReG&8o$sH`)R<4_Be= znjK2lS)r&sd4}%Y*qi4VWM&}aRVq^YD3RQ3Iuaae5%+Koq90vFoTqh|d_^5^$_ipW(Ch?{g1nsv>PRH+Z$GG4#; zvykpxz<$yeB>6F_9FIFV#Ia#QE@YACCx6Z zl4hYb(yZctoYmgFercxNAm$KUKitlx8$mv7yZ%*(YH)SbxU&G9t=V0Y$Fuy zBR9do69xABsh#MI42xfoih0o9F+ft{mxvD@N&Yk$UMnXdVj+3PhhHIh$!e&l2E%_^ z7x>A9cdzx2{(-OFQuv)DSLo1a1g3J`+1LhQZ9heXYbv5glPy2q9`RYHk@R>ZQVg%t zZ_*1HvBAjmre?bVIdv0yqc~|0N}X6Mh+Bu+OFd9unJoGqoq2DF7NbqBV%le;n5BFm zmL4s|^0Rqjb!?p2wca514a>#B>lbNoG*=or50OR-=1QYOi^Sy{Yu4X7Nz0&!AN38Z7r&sHuSo)t5)9j&Q>Z%r_K4g7O`$!Cqv);Uo`uj}> zLFG90&vkek)c{3L+)>c@1#%{jK&H_bNZ%O`-QnHzz?LI%-aN!N_y#e78Hh}8j4-GB z^f9d?|86Gy%MQc8Uo^eAe@Z6-!1$|221BV5k~QN2eZc9NEi z(JCaBo#8%l8B)3*L)NrtWS?LSwlEC^4LhM|E!mkpcA?_afz)_RL+vx}sdsi3Lt}D; z9$yio+$$W1*J66{pqLkr7t6Lo#d-iWEsZM0cF7uXXvfcWR**Pqno-y8C=J)Q7w6ty z(rC?XacQ_#oPB>5*If#6owJkI7q6=g^xCGJ7S~zq_a9{aa_J=2{-yNbE*JA3gT-V=l^C*?)8&*y#A z^{PcxHF;G5mMC6NMkwo&1xseL4*v;q?1GV=lZf<*%b<%dM*J2&^9o^=UV*8Fu91di>FA=H26={IDzYg4ROiLDqX%PXujXFVy!k!aJ5D zYA5v~+Z2d5>5TY*=15d4ka9j4X{N`KS^g<<<{js2c0r+;H%jy;qpaUpl;zZ;dP;NA zyK;p4oL@x$B` zbWbaePv3c`S&N+FDh*pZiSu=hG|GG=ja=zTsHhZ|(PPDB;vI4Bd`222ACN}w8RE2^ z-neQraoAWXj_o&#!Pahz=$ueY}qHiGG3c3p(NOs+Ygyr6dYqEx( zs3Jr@G)MS}7YJ$1e1kr%px)>O)tOfCdrf^nPR5^_8-;Hv*&YkvZ`Ky-4ucWY^ac4( zZp;Cih=_?d5w&<1V(wi)d~FsIlIb-my@Zrjqo^&}fUMc{Z;ks9dAdOQ49Q7@1Ijj^ zC+l=As`HzmzTH;QJ5$U4N39qRqd?t?8MdH*l zPVA>fio>ZMVmE4v*gVyvS6wMKH)e@tL+Z0U22cmoLCju$CnoEut$%z&jCwT}gE(?S zn)EA?Q;Smt8PLl8X#{!{kCkG^K#D^*bB6#S{V@ydyUV#PBkvuxpapBY=z z7a`!z352X817gP4i27hUqG!F2*pn&bKek7b?GpM6jF86tbf)BX=>-&e z9!GJkCCc`nMrG7S)JFG1-ReD}x2Zx5n)B@AQAnL(HhZL_#N_1+-er?%PR)2fvAtC$c8ATy{=qhKZRq1QVtr-SesLT=L>#-&54a?yXRSBw4NPsOe)Sw*|O#AdxM*A#kzbU%p2hvZKD;vlBI4~xkKa`O~iTPoU#ezA$@ z9otGT#2VCw^hU*wT_`!8iMO89QJC=)-dN2*-bozQ-qDGL2!;fg6?@BKtF{H8at?Fy$8jK%kUoa;LpuXb$2M{GK=R-9l3cb zsH!ayaEVz?PUjHTask3>ULmTl7otmsAujV25)Dg{e26viF4jn0*by22cFZ#NAp6mR@=uns#=U%2)r+~G18!@-p z!M%d7SRCz2Zic&9`WcB;_Zeb!szhvFbr##xN5pObeX|qv#b(nqvAgCfwqx##UE>NAQ_JM#i6=O?0U(>j#QOhVCv-N>&c1FF9oxmKO%9sG(M_&!J(*c{1g`ypX^ z0W>piAg1gYqBeemNZY3fdDRjj3z|TEf-Fsa)|(IVe)J79N>4Y0_mF@;GdJ&k28wS1 zMMhsJzn%;KEy++n?u{VN_YpFVzQvP))b-wC2FGLa>^nf?_yrO-D4@L>jFi|iq`mVw z+*pX*@m-KBI^=I4OWQsg#RF_ndZH)F1AS0E(-U>>gGA43m+1GoCI-eU#c<*`V*CU7 zfG;_A-+PM5)plZfqAi(cj$-kEHQ_g7>HQxe7HaP6?vE6!ha<#Fzm8r-_VhpL&iBr1t6AS&Oiqpz(@Aw=Y}HzfCms@m{$x+i=h~8P zjXLFW)a;{1HU9=G_7|h9#Ud2b?^5`p4ta~}k-v}(-1L`7PiTgeDLs&~Z5xua=aJ7v zEq@AqN^2G&Y9-fX;~ogJ9D~rE3Ir`XfdHfJP+ef2+5S3mRWHITQy{*L-i`C$^M`qx z%+>728krxom(~c(P_U zmuuIRNU?A_DQ30@#q?UOn9Ls{CaS^I0{0iAeW%5!>k9rZdTVELZ?dU}=yf=bx|8%0 z?~NoEMaMof`!WW7QRMj}3aspqcYYbNzutpP%V$WR%KcB1hs@&H!=A|rB#S`k||E@NL9F7nun{N7h=HkEqEPT}6;cHDj!L2vU<{65BBh>E%I3Uz&CL)~Zp?0BP z?&2V5o@_zFeK#b|nhvcQ*B;{+NZ-NzC3||AG2X~MN{#NbT;8);yKUDAC4I|Kp3M9C zfg03KUx4b@Kce20^{Vf)#lVv5@ys9S8J{l3T}Oyf;y5urTrbAMv|_UA9Q|WDF}qHW z?{`DR%x#I7l7DMD<%*ci{aj4jli%5PoS3v)ET(0-Vsh<_n2cQ^M$d}G$TUxkF7OPT zwUcbnKB%w%Mf41&pti*h)Edo0)zzygWsS1zQ!Q&721VFrT(9fnrd7)d9|CQt8*xD0>9nX%W^i!A(s|3&}z+jx@SR7?*3qu>7julNeZOXdsq z-wow<8>k0xez<=R{E0do&2EHLvA?ru12Zn#GK0$Qwg z+Cec29wCO`t`dX$tX0;&5Q7WLMX!FQ=sEO8tw$khPuxLeBDLm2zCwlN43v7X9%w>u z?G;PBsk)AWEk7gI?iRB0&Ld-_C(=~O(6zY=UAQ9>t5_d-_8Rf5Yej!Q1yQqV$lowR zXxjPT8+RzmvY~i%5=M1G(vdbuuJJ``zhb0~OF^bBdH)M@kaH*m`3c5&vve%AQ)MWA z{s?7V$WbpoiSnr~sP0vW>MM6pqvGfKdWGnvvMzu0uo%o?{ltEp=x43v-aDTR=yWkS zO0Mv|A~D#LEQW_Z5W@je#PIAG`j%q(y;yqa$(4RlCi-pG(iilR=wUc&!ycff1^M`2 z2XWun50#z`cn`aevL+2s;!i)(!)YjV7vzUuB}1q`vf2lc&rb%|dS`M-CP6p93$*sU zUK;j9ob?Vw*G@;|gVUTB=7Ej9jnIf;zc<$KPFzgS^T^-(w?F$m2>Yjs=6>*LKwao_ z?gKx(Oifi80vebi=&L}4EFq77^A<#E$ey518Kdyg?@}a9xoU<3jKb4?x_h}ThEN2hb896`fLe7Eb$mo=c z3}bRgzuf}uig;-CS|X{zGbDI_0?m7=h^b*dS@^ezwsc2W59WrNMKL#H;O~t!yp$_` z@B4rC_n?}|d)wnI1a|L*;1mr)yD%&B=j(|0g}uGanau0D$aBw5#7{IsvT+TP$L@h{ zt_Eo(?;~SQKV*?FnLTtEa=UmV|KeE`Oc;uyzH^w{z`T^6t5AB<1*N&sC?8ls#^(W4 zRE$H_Ps}GsI8BE0IMhi3s$V6r_xKQX?OjmQu?+PN&rm;mC~A!9!Tgzz%bJ3kxPGW1 z+pPM|5LAyeMMcfWsBoWx(vKdZWd8Rk(Vju!$@wU%yn+0)15nVpFL`y9$cgX3JPXzc zEoLLFnD=InanQO?LsA=ZV~;u_enb#rcM75sngNWmg|@jNv^(2VU*Cl}gKkK>yBlfcJf|M*z;nYIDbpO`+;+~V;+jVK0s;X z`zUt3#C;)oyY*yL`xr5|LyLkT^N?@Jef^-N$e~|0*W_Ddr!hn7&0b_=UP0=fbfm3i z?{dXPB(Ez&V$n_{^kxRzzSW3r*bY$*2P5j%280h=jj+M(5VETq0=HB{t<=Ilh91F@ z8{ymM@?Smff6Md1=ZZg+N)!0){)lOhsBx8~VHAk-5wS*^9#HPnd(89y)SlZzFgA z&&YqShd0CQQNT>SH-4@t9QFx0ty@rRre?0!CKL@GLd~x`b0@-3(n=4-du&ix!8LvJ z5xiMo&1{ZgDAi^CfQDNUadQVE+6+fnH!FmE)&oIBN#rx7LEW_rJD`By&%-lw-RG1dY0zo&9A~3cYLLX3vmFtLz_>ZZV zTaT#aLlFBO^OkCjph>Gj;sBo8n8A>I?*_CE^pK9-g*5#o$hdn1>AD}eFXEmdaxijd z86oE^?{`zbL;g*&3|!WspkN6Zvr6Q9TcLniF8OZb-@QNNuT!EREs%3Z{_&`M6znbF z^=FU#qXEbRb#y`A$aY9THZxVTDmEd5XR8eV)kxdBkGXp`WYv0va*5X4OR<4`?42z7!X0@pL={*fJm-A^HWa(mw6s0|%?A5n$u z$xWuV!Gs!z?njW|?2Lq!=JY=lKs$)FgovX^b?k-II(?+gKZA_ZJ&-v!4e3hyjvsDD z&Necz8e1W|!1ef3e8g~m2+(~eEhcwOsW+pR#=FD82b5*;$*So&8s-9iDtDap| zR8WkoGWbNQE0_~o;V((_VCCj39J7Io(5ntQi$XQ@h7B@XW9g(D@LLF#H~7hi^btYy zpWBqN#J!@^`{dy@U!~!AUM$bXd{B72&Buk@kiZF8NEmp1 z)>S&q^3a9Py+vfoyZ%6Z4fJ7cbjj!RamTL`>c1rZ+C}-^R>=ak1b#hJ^WGH9qP=BQLt<-iQ=Vf7vDXmdh_@Oa1Vg+7A_>E%I3#wT2w!$M zQYB9rxoLQ__-*xl*##XEg`zy|Y{G`J!`7szpH!e0y4#%7UrBo9v7Ft~F8PUH2H3aW z4KjuSZ&<#3KVC|2_l<~En$@l-gQSC7&e~mZ4xEu8`fqC~*6e64kW4aKkMeIi9i-TVIE=rPoj)eh>-SHyDw#G zj13*Kcf#L)4`p}-V2go^Fo=sC5Bgz|%r76SZ*@g3bDR-0?BA5UQjgLr2FlI&zpDJg#*meShD5`XyR<;Ju|S3$qjH`_`f>bWkk^(Cz8AgFj&YuHh>kM4~Z}P zc_WPsJ-9Yk#ZU>U7_dFBVmz?*JuGw0o_uNfW{_e%kc}qs&empYgEq=A?yD^}?tB?O zO^Xo7>bYrWqju*|F^9<%Pt8CR<8r=Z-a$S|av(9C*e2+_JRv-WaZEI1=WNUI!{%NX z=p0ktL2l1k(WNkN^rMIwO`Nc@WIJXWzIFIj7+(#pCV1K`j(&faIYM>8Nj&c zdV6PD;GuCFLjtFdwJ6quI3)hvtD(hORQc8jBxCo1Bez*ic3 zh)U%!d*!gxhx_izirV3WRJ`BEF6{;-0aqI}X%213f|a@NdSCSVbC<=t7WJU?zpdcK ze0K~u{3U!L*S&Ffe6(757BVG<%w#jzmM^-KZDHnbCyqT~+0T9#SeFq&k23q?-BqYP zNYf3 zw7^S0Kt9-GKm2*e!6(oHtqW914?FbB4JovzJlC?$cs=AhI(B;VMxDwj3cv38I!bSC zSO&>Tgp6CMgl8F7IPu^~*UuL+23Eb5Y*le)U|A~zT(3rf ztnJ>@=hoqySdqBSw)`|3_IGzv9iR2WJ=bj3qe7ZzZ(2H3wSa|)b{!l&sbAq(EBY;guSirj*mkr97NIKTIKDNxa7 z+ZrIWDK*UJpD?8?y@`Pis(&v#&8!Gg_5uwn z^mip4;Kx;|-)1EJBAELcz$y9alf=@4U zIAw+2T9S;lY*)3~QXjx(%Sk(%Jtb%cO4lXm9uK{0bL4)SX&?@=0l=RJ4A#Gu6ZoQ% zC)IR?G43^odk&5^%k<_~@7TBMkSth3g~n>z1VP|TCRVjY04n5ueX2BX@vAa99n~g$qDGm!vJt27 z*UHkyExqpmT4w4YirC;rCJJT{w5p8CG5tMWm)GY8_4s?JmPTYDSXQTp&5PL zkyw?e=G@l8ue`D)gBJJTC)e3n(pu>eFqlxklV+JfbHVW|cB;j8MFh7E(OyT9@pLV! zRzu1{ZD-ZJTdZ58)x_?f9WA6f(E9Jb>748FKJ6Z7^i18IH`xmtEqw0~TJSCVH#$C|XcO^Mhc^(|GxwXNhSaOh z68*6QUu^T4p8<)^7nYusW_yAi`P;mWMT3&%F+Uq7`$2P-*nm^xbGPxf4YImbo&>47 zW}Xd6#B`%cXzJ`DephkV;KgCxJ}RR7+B*fb^Q5LrOHY+M~J@j{%auq#TclR4a z1yPr!qUQ~A04z}iI_l2w5{nq`*m@sNwFrKh`ul4N6w4dI3>>50; z#-ECCy`Qp3p2uUfwyPoVR-B4n;kQ|aoaI%0WEj}pj}jf&kLKaoQS{bR&ykXZdzL8$ zOMM1Q_l%D2%lMOH9A}>lxHKF*75OjEq^JyI(XbD1?!e?jc5j**zP;CsFdc9oN8kmN*_(Tf_b9nkfu*7mBzH=oxcko>7RgMRpFmHEWMB_w- z*K-q3^k2YlT5p^(s-*RAMmM&_tO!opeO@sglN*6|r4vWO5Z)UllNOgI8B{?%wO8BB z>2kwj;+-2zp7$SB5QEswKM3KhslW;)Mh$@Ddovoy3SeLR7?F7Uw#w(;|a{g zwS>J6>QySyi??;SQGLfhqxKyalR-M4^pD^L-m6$=4Rs~a zHx3oEhJRrl9bRf2c4k7L$x@mui1RDAqez)1j8#wA5ZvL9d$}0>}*o&%;9smn*UY2w}bPNy3D6}DN)p~*ZD+dJSLlv$zt&Zfa@@e(@8EI zZr{!Fo9|t%0ryr!4OUAu7dWJQI9*8aRbLyHn-P}OF89TkX(*^8OC_eul)@P;dPbx5 zbJ~jDbu0H`wy~o3Npv5E4X)`=AafF0$BG_C;}WsTj8}l6G3$~24zbaz<@I;Vw}VKt z=@4{8@70aErx@t_V+$jcv-wclIu73sY>U>L%ABPwYqihMS7tZ3La%O!_TAw99m#2| zaOGuiU~M$8`m;H-2x1IzDfZAJg2H}%4NK#kMR!uZ^FBxz!bgbWusA~8*~G8XFWlaA zg-xuOC6A76ItX$yqS>w-|I(gcvTewvP^0MO`qbd{RE}>Tk$Wu{5D37xI776ucR?dC zgHIjHSz@Nu>>~4Vl$e0{_3oCmFQ%dFnBXUVfS^S$NmHCgzUv7o4Hu~nwF?o61FuwX zjD0U-4@mEp*>KF_VcDIs0R+u=X0vIBmoC>!kPGT@Zw-M=@kSE*AzrvHOh#Og&!dco zn*54FV?9Kj?g$5Ga{!^qK`#ExeG0I7YNvC^C-#QJVgk8 zHfOH{D$))}gn&adBEznT9Vf(TBRdxF0{#AE_6{&&Ww>Wg2&qv34ihC6Sj)DwPC<80Hy~R3)1*>3 zh=vPY&QH=;7WGax>Pv2fn64TFr0JC~9h*`UM<#M`#ysGu6BQkd&Flv+H;@={%c13| zQf41-eLIB@WfA#HodgE&r{wn))|o5`Fz#J)l0nN}%)}tZ=BpB&bJ3q0)}^|jl9_-W zkHH#9)%%@qqD1rQX@%lj3kJPQZWjUvADh<5<>MeR+>j}3hQ-A4+`pev9Tob49YJ15 zQaxyLm`}dZ2GK9Oo$058JX70m%tT31u1_w9d84pPVkPW8oLfr{8||J; z@3fAXE3NfQwav5?&g(X;?vaD1JtPu=r%l=TSEo1mSfBNI4On3m`;BiQh)OE>UgbuY zIo}NrZ!xR|i*gtlra$qSvd+x6Mh!j@b@UdRGCZUg_6-mBkG#K6EWRD8k-X8*95`64 zN9r$b?e`z&%tu^5y+b%Lq58&cozaWSB}PDK8pG#M%gENpb29^tzF%98Ep+@<1%t=7 z*4ts;X{o{}57Bkd_^C}>kmAiG-#})y8SM}<{-M00wrD&22&&yOsyvx*N_(P&XZGR- z{P_u7!0XKz0Ay}*1dl9m3-e`3z4cjGY$pOT`NEBfhWhBR}>J5CsdCj5i8Fg*!-r{A>1Qd~3B`3Z0*#pZC{LC5C%fOl%?MvO zDqG>4A><{DO}W%ebGU5;Z|Vl%!@+yFeAcAR(M<|O^vIy2ilySr zA_=4Jx{Obf`ruFG!&8N(U`iW}NV=VPGr5Yh{2H)YC_Q%LVm>{QX<@?G!5d}F&VlND zT#GY%Id6cBjSS@6Ku^LsX)U}hKB!WCIr?7Rki#dhZ|P@;;Pf}r>Q8ju($>0mU0_~) zJD-xH3Ue?!@~B^1(|$oQ4`Se?RD@&KG?jauZEeOfRL8oM1!mTdfjhENn8wosF!a5V zGt`*OHm;$dUKS(M^4W_Iom18?{A*~aJ&!R_+ic@Zq7^rD^-90as%a_LZ$?pxcqx_C zVw39>Ql?O)GVg4R35Ogie;p%}!oI6un`f0+P1`v! zaGh$Fkg(UT4uhCeP1NW;k(*5LCeMoXfQf^Zs-U=?`Umg{$ug~T@P>jSe!=+{1`DvU zKV~$oxjARgI{_BKkhQ8tr5eU>6z)EJIv@M1+G0I$f!M{9hzZ!AvWy2 z4O8>VRbRZ=%YH6`uc$?_y*NcM^TUFV3{wwUFrjl<6HXcP4s&c7A%D$r;-`&G{jhkkEmWwGZx(#5#F@8+Ph;{DB# z&u5q{TZ?ZcVhYDg)S}%ahjlxV^lBkJ5TaFF&T||4nz@f&`P4b*PR`=v~jOgCUv?;Y+@gB3+%Fqmo9xTy9a)n|PL%KX$Z?$#K1e>IJ#PpR zMSz>X)q)Z>e{{3<{Nh&A43t~v*CgpuvIZqCPAcW%^wV%u3NlvKvIs{~L^4Z*N1Qz} zEJAs4^jGV_yUoOng3N@IPWIF715a35BVVwtBY4MmB77A`!07tMR6-4g9VJP5nnn5% zh31Mal`as7tSTBq-WPsJpzy4(S#oWP%fRln_(AgOWnGeiDAKoJx!u_EXxC0iC~dAg zEg?Koa!ziYcVC}9>zN7skb$5>!us_^Td=;2(4jhq2{4o|n|yS8jh4&6>@LjSu&bv{ zOSXcj(8V|^q{ni-%3s-%dro{?*N`746MES~ z!5M7QsD}%c7srFv@^l96%n%5x|14~}kqZwO_avlj6(8-Zx>ZZ1_Yce()6yp;a+&ZS zc@K^2o9M|=W2WoitRD_Jv?d)Rt z@>%+z4kV+68%=vW`!4U#VmK3Gjvbiay_xbqu-AQPwfi#_A_q!4CRP-hO=J!yLFG_8@!KNy^OpKl{gi%w$3^+ zVc^;z4fmho%NkOQNF2y*(iCUE?kr<@7b=cVv>z=DZtkZoE$0jvcPF39)+^J$fNfnA z#an0<=VJHYaQ+l>zl9r_r? zD6Ke*{`&?0GF85SSeW;?&&NmKxn^r{I#+{__c(52ZaD#~S8K0j!nLpK7p0O203a5Y@D8SM?zkb=echn~{vb z^?GVzdKb&#mb~x_VB&s1k%2>a)@YXNHKnr*hb6a>Br&EyCv-m(Qxh*i$PpKokKX=n zNOoh`{;^djx-SQvpi({6GGo#x+UF&7MLK&ecTuCj1w)Jk&OI)-F1$SQ0)uwJ zUd!CZ`GO(+jJc5j_vi_!%i^t6HO>hO^Yqy=*NqD60)gpYh6N3KqUg77$Pdr`(*RT) zN=2&$yBVL{+iK|Uuv}Pexk2UG|Gf`LJJ`!IAw;C&oAYCH@b4ZZ(1bd)tcC&VL;O6Aw2AWzKyI7k4y7DH3c#n{OT;Ns%w;)-So1UO0q0a8HD``<`8{zS;4{tLqO zfO!6i2sHdh1n@T%&OZ?ip8tY8sK8e|Acz5vxo|$@;$ZrKAZW^S$ztC}?`CfAWM}MV z4&;24fdBfZy$j)gvVZUo2Yj%H@BXKM_pX1j2mI+D&gxHlPrCnP|L9-!(LVRlKmSAg z-j5ag7(eEH{8m6GD{G*=DUcK8AD8!0={-^fkCgBOd4hqQ~{GdN2Rf3kv;BJ=F3)C4gLi)sy^FFJ$C5i3tGwhy4CcFAVQDh5eiQ z-}00DQ!m``H~AO6zvQRzXMXQ;e^Y+ z7kf0%dNhB$^%za!kTe;)Pd^lxAMzYmYR j*D`pB00!+bg2!&i^gfD*8LaAk4_jYTg zcK23&U42gX>F#^$JJnr%?s2lWcY%SKnuURZF@=F8ynjR1TV3l7uy62%|F;5*5&{E* z#s>pihtI#HONP0ViW`_U*#o+GYyE$E+F}2F(WpBsE!pde~=3>P9Z^7jB&uafayTc&-GwU0^!@#^- zf1A|z4gby#1B=)Fe|sfDsee|^81Sz>`#&p(CHcqxqpGBnk%OhUlasxZGm3?QxV@-> zxQGD@jQ02U9|>Us7-2kM&(agsheLiSbK;Sc(i?gUq?=N&|3853qS*zuDF8!Owp%-U$Y7UetF?24HB~ z;?iKg%c2TkBgeSKq}d{Ura?}+vVRuOf+F}0T$GKw7ZN-dkt>>lf>ixULy}Rf1R6f3 zS6dwm3KTFH=x&`JvLV}CurQe%)n*!65oQfK2~paVb7~Ib=`b!z4zn@Ik2*~$z`uaj zWO}jQjcO9CncL2%JaG)F0|jFYJ-s`l%$DHD$C4Q{1^PbAbxe6gCgsUkIN^`=$|H{< zsmy9hNFk@d9%TwhN)NAmzGq93@x}<`_&dWuJC;O}37k>tT{%Hdsm;t0t!X$;9IPAi zAr~!-$Y)DAddvjs>x{1Gh`sM%ib$v-(oq~#R>^6^vB527Z8Bcq3H7u zvEG&`|0mcgRTiIaE+e^i{3@lU<8#I!+bvR$)3U>4_A#@mEz|>FRJfifV4Re~%+rS0 zg0zF#$o8U$E#)5jeM)aGhpDyusu%JYA0xc%CZk9SRn~i9>qQINA*lhjg>1rKgUaH1 zgEco-!n9-2z^@FFBxcJ>g>o!zLm@QevNEIrO$*Cxp=ZoU&TEde(T&u@|<7vkXoGVL$S}|0jjp3_t8Z{3rVp?@lw7P z$>RC)BnM#>e70wdV|_kVVlvf)cOmE#*>ywiduKM!7D`GFk;eD+V3iua1gK2jDLvGxgXsOiJ3WOdnwj)sWH)+&)?(eJ^|*Gn3Bt^;z=8ed_}5g=cFK z)>m(96YkkNU=!&Q^3FG>`-1Sn8OD!kYYO?fH2@5E=?lA|&<#QL5PWx`u?79uu^A8x zcj*WVknbKsefai{RO4ZE0RN!{E(fXm0Kw*iBgYX<@#HZOF{X6uINp(9MY3eCUz!^6lt@}(=Bt1dCDfkyWt{-rCD4{=~-xon)X zD~eNOUJ z^i1Ky3%X;-tPzROI65QuOwk5oaX0@Xi@wRIJySfvY}{as(KRA58fRzByzvR?Hw8E5 zn?n5387HrILMs@B+Z~f`jYy)z!5RNeVfChH{zoBs=}g=+G<2H;5m&T{u!YvY`4{B2ae&!&B9i(4Y;SNp;U-qT2RO0 z#10)NFb<5W^pPVzuw!T%z4BlIX8n6;%#XDXw+9ev!PBLWP7}&k>0^AtRj!W7OZMo) z^CEiMRq`;cy{fZhHrR1s_DX4o*#5gu6ZQ|MFs(afj;x#$Lhjkt3WUUnx6D08LE%|K z7O0Q6X6HD2`A6skJ^_0u&v4xn~#mwWExqGd2%M4!``IhF|4J7uDDqd(yuVr z*{KY!GEtXAYEJ?9$sQoB4@sz#uw~Ue zdnjQYtjBBddvJH{VUCZ1^dH<@(m^zBEhd-gVUYd?g9zU-~@!Qy2Suuue4Y`>v zHX!k|oa~?r=mo{4Ou0+$W@$$?TS)uBM6l4wDE#J`v z(i7rDGkuPBEWn_|X6kjpiNnbn~EZy$V(j-;ht?jO;~!N!2fA@ELM;OZgq` z_6%xGp)QE{5fh|CZ&yA-xt*H7 z64h3RgO0HCZ?|mv)ozL6RC{&4`N^43*Pd zFg{a4A#f^RE<5!;;HH$ot}79w7dw1BOd#PFAW{tg_}PzERZsmv&l~h^_AnwLyw6!r zo}4?w446haF(396Y$RLLurUk4+Bd6qHBp~z4e^Y(U~4;NSSZ~%CrruH+>B+;uF?N^ z8w+5!J5cBY+n}F}FCpBfg6Xp>#9lR~bk%AJPsA>rzc;|0LsUF8;*b|?I*%r>WU)?0 z{nopv4yV%O*=r-PHmaA*ZsUantL0wrVO@nOW{&T6mpwrG$Piyc==}QF6GjK_&FSHg z@#?3F;t+cI3xnWCmu+>BDSEd3)RMF;i#$}K%a+$jk zuG6;vIn~c7n`>}o z0%aw7>LL-xBK7wx&aY$Rc2tTC-XpbvUG$ z^;|%mC?o1l|MC1!89QRy#cUL*1%LOq`%S#0W_YOQChO|~XOyUP@)hjdEC^MldEzPf zB($i2zjnxH#i%;B9)C*oWLZG0OJMmKU&3?86Z9=cC)QVq{giLy6)=ocwVcdDcqiXX z!EcC^pZJSa9XoWpO*Z0uLL4~5yO+af`tIo{M^+80#O>?WgoX~i?&78724*J_MV%Z~ zpRcEshD_bnZ|qInhCETr7Y<$eFj2Lk2q^l!V1fxTLmsm%K|UnM5cCs0oMe2>;sDAj zQdibVZRJ!1_De7`^?CMkgeTN1%DGR+$3Q7jS@GM`kc;mk^EiD_Habb!WZzBbx(sO$ zM3IZHYnUXbnpxvF!=*qFqd-{w%dN}8*wEAA>Er156X%o7FU^T2#2fcV43nU5aT%5` zst(#w2lals8K+^MI#_F#0K%I?Ck+>l!JZbjisM`4j%vq|MdCvXD6U@<&WaI0oZ&?h zbvO5En$=nX2Gj-3-0QWSYtEk}{u3i)@Jx}xW{owSPVqH#Wx@kkbYnwNRF%`|qkAy& zV0HPFe5e3N+<08|HOl!Ao=%q-k`$`F!C0{08=_APbl9Y}f8@xYTtvrMZ>;KTu@rRn za({nw*-fUh%@>tV_MkNG5|uyM-c-1Rj>G`$v~i&wtRJ}U;9dwy@LMWT9EbFly@a0O zH6Jt+5wer)@NA|u5YP0sCA+1q=|>(MCYF=S_d(4CHrYr{T7I}VAO;*rkyXn_^>=iV z@ZGn+yRUzS3tBIUS0uBdO0CGCeM7_C1ryJ!1D3$8G9 z@m)SaET2A!%AHcAlhD&`qV<89BVII4zD;jd&mDDm2LPF0N1Janr!>ZiNy>6TcgIYb z=Z;9wt6ZZ5fOA!Ltlc-&ElBpkQH;#sOWxu<=L`mT^~~=tDN@uJYvfF0TJbTJd&OUF z#~h_TI^M9LHPyfS69`3k#UI$e!(Dli;zW1a*D^UA_oC}lYxnj#G7;dNm(q;%bvQ*F z%O`CK9w1p&$oD@|(pFR$4^e00I(gyxjlw=bZ6Vo+OSqt%)dtpE%qkPp1MJn9Cma?l zh;b2sYi7H#G0pvWvr{r=23}VaVkFtQXz(Z2T`VCZNr{=JYJ_S{83>u0u#XY)K?+dSNq`X@!E#_ zE3!XLV;%CW@3qUTGAP4`9pGEr;&+_-d9G5fn*NyB;r0091cx*iq&H7sXchyh(RApB zy)mG+QB|Y9r-*KkP8p!6MRWHmuSg%;Yn+d!?h*!+aK(1>C)h}@qlNyEMAK4Z!#oiG z%eg=$%Dv6Qwr@UBI^_Io?Lj&0g4Czba|?!g-xF>&9nMhz>e$;vn3nSsN-)d%>PN{# z^s@ew*P($x28+}bqW;!;i@6Re zowe8p>`xo? z_`^-uh&D26{taz+N8KotWTMrOd3k$;nG2D!$_TXZy3ArXe0wQ6FU{Lr2f}QgRcZO?4gfc5bKLcv?+zmUxgJLs24X`eM zakgB@OPkjZ@{A!R9AJ}^h%7YtGD*6%{9%|8;vU1RfuMTmsgml2K&FGvNf?s=)9PnE zjLnNG)>&>3{^koKro+rg{IEwE7uI}6z=r%t@IZ++JcEed2$LgyNPFKzUu!niW z?cU{wU>#g7Aa6hN#PD5tHGlO4FO z1LEzsu}2u~Gbkc)exGFVH+hPk5M^%=?u00&G4LdQ@}P=fgzQ+$e#Y~dJv^Rh9IW*GGo^agV8GATyfhEr5T8}AE`t9Q^?J$j!q$zl-oQ) z0|bQsl3{Sq=t6M%l{%9p`%4HAnAUgPLOKORIMG89YM60cN<(8O(|Hy-W7zdy+auRh z1d|Mh@aFUC?g!FTn-nvU?h?2|@2kYja_K_t+e&W<`hniWJT~NTbYzaM!re?5HsZvu z@;UHV(wsv;rk5huBK)CDK5nPJdvw)6#dAWbt2ZbnN7Wk5mB?DCpIK|Q`_0mCgp+*U` z@Tu%DSNE=bD_f5J&2!8RZB{(LgW#W2^#LnBS5@0NQn`a|1&nX^usa*G>aFlEh@)c5 zgNkCXkG|e@iHCr2r<@k#-3TFgLgi~I4Kj2P&(?m^hnu!$_m|)hp-227=+ZOh@O$dc z6SO9w&@{dn3~xC6W%sbqEQ&Y_=hN>DKEf^&PSTZU?qsN&ZBVJ64y$uZgBy#Fadlr~ zk;B&f*NU>J4d~#nn^|n@G!fP5)nd~^1P~m%ZE~t9n2bAR1>5yq;jljxN^<6t2GZ1Q z=u@Na8j(NG%wu~hT2$R6^9aQlFpSL5!j39)=a+A)*XXCRH*@gdNgaS8KW-Eiic-`X zeQw_=h3p)aSNr%^M0?zw4U&;*e5}n(2=`T8R#fu2VvTz_2H8ot2Vhwheb?88nX6tn zW_FqjqF6ubTu>3pa=kN{7I@#E?KL2X_8qoXN7c-)SzPE0;3M%eK~!S$>nb6>k0qNo zzqp5$%wS_G9TP8z_x^cb8&!~OK1-mlSQVD%udeawoio`2``s@S56qH^=%@5eR)vak z_iXJN;dQ!$zs zYSn?l2v6tz;!s%;UD7A3a_9F`XbpIF4k^$eTZo})s#P3l(^GGtG(|o>@LCp5)^vc@ zA1^$uuL$uH6^Wz$ZJ9C&Y`jmShWmVXWsQ$ISjPb#|EY=O+uQzxtr*)Gf{R9FqB~lg zN$cF}b6C&2)Az(n1|i^gnDV;u<85@B7-L^W8F@XX3AUinAOls|H8~v*?o$0 zPk;>R@}iqQuT}TZ$HKWfL5%KBa{TEOwU+i<5K0P`1zlY6pcR0nEqV!oXb20ZHEB3) zIfUdq(I4ffx`AbMTeW-bonb7*nHke};vjm5rt4hzk zn_uC!DfSWeH(%bWn|eq9jfD82f6B1iZK6S>10l{Y|pmpCV1?yShH)3pg{1`UA2JE zXl7n+(+uj!79PRY z(OI<+G+dY?l62;aAuTrvJ{9RyZ~cYG5fVbXC}iHi^U+;Dd^=A)$2&60l3Qo?!S+VIX_4#vV_40 zO={&2!wlauuz%U%nWXMTms~IgDQ^=KrkW7P{`|Sy+QV? zwY))yDB$Vnh%7s{t;D-=NI?VUxY)Wla_jy6HswhP!bV!ydMW*-pl)dj3jRFu%DuV%$(vL)qYkIv zBJ>``V>DCN@ADPL0n%(yB5AeZy6EDPIuJ`tX}6wqfk?>P)V7EG1DOijQ4%|j(8Tvj z_4*d19q5(H(5p9ce=@7+i`ee7F}nb;;F=vn)}|6ny$N>=ba|j|zandLT@&Ew!X6$B z-?UbrRXR}HtdJo=HH~^$-tMtwxy(4eJ_0OJ+d7#iaZe##@0MDD?)8_3vO?c83m`1U z%^nLt)r9$Xaasj`png;ZoiD6hVBXh@`wFi*2Xrvmx}oyIf6;1Du{q(vuvNURjNpFf zB$UQ-x$!Yqz0Ib9e+IU;@OZepO^^&t->}^nVUik(jpC=8ho(dGO^#O=`7^d^EX^v% z4v!3XsBYHJCv#KKKG!+D&BzMC96f-*{kB;4K#fe+3EhPr*U0xi(uO#^jaTtZWZ-rz zH<_o)S)`twVLx8zhOEsSXww{--PV(N(Z$N}3ujOSBtKS|<#z|xnC2s>%4 z@Y(#{qvRu@WN&rc(bRyJxk1CJPW4Sho5u=a zH8BJe`=JKG$Q0R)o*ES}&04X((N8SsU#-vF5ZdNn;jV^Fa$sNx{r=}T8j<<`F^(qw zA8|C%|BR#kdK6TBg}e^^Qe63JOJ)0&kxuOH8>3}>L#m9n5}lQj(f+uir4n7?uq?f_ z_{z^xePye7WlVgTFPZt#UqDkl2OS1En;<{o*|UAXVmkXl=D}S@)zID6XUe*dSXPR^ zs|3YCWba+m*>2bY5#D(dk8IGT59s7K1f~ZM4>Ig zWSbN{W^su28%Y6e%*n;|6$dISE_&vtDJ2u!0I58!U!u|)pl+a_;?URX6+nj5kQpHi!DzcpecRZee z{F2%X`z;>$q^sFf-rd$?NJ((Q0?@o7?E zxzY_(4m8DsjUOx))f)=_bncl z4D|uj(Ge1&d}rDicD;V0RS+458MK2t>>y@QhKZzBF>fc9dEkm@ilLB)i3z-A*%Gk} zF3zD9Qvkp1B!vC(YM+M2mq;}DM^RoR*`+`#)(e)W|hKNE(;G2B13K3^RKixuc z*wtEvqzD%JMzLyqRqaEV0s^mAX>nn0j*> zwTf0j?(E%R@rDS4Nv8a7Zg*cX%+$i3-WsfL-)<~ACqxIP#IYiF8!+A}shdf(1m^#J z@xT!r5chQ82+vck$W_1!uLCUPs5t0m6IJhorE2hhlW(I{uYK00g5CCqpx}(f0Dkiv z^Me(YT04a*jIDY&3nMP<*X|T+_m))N26gOS^}yL=e56sYeIF$<&(h6GQ zI5!>AtB#YbYn1ME3f{y2W*Au4N{VoIxxt~^;4h$3zp{?aYluiCp50aB=k6jb+_|!t zf9s`HYQj(cBDwu7_=d~}z1NjY7q=Hkwuam5EabuTehPWJmAnG3w~edVBa4*5yaN^>JMuZ!vWK=%#RH6E5`zbT|1@sNHUwT|GdJae;yn-{ zZ;I@eI2Zsw2By>mDfCY-j52GhApzAjO>JE9KX;hzGSNKg2y&i6T z3$jBr&P#(&-Fe9eI)Y3F9aT0VsOk45DQj?9NzITS7c-9SI zu^<~Ke%?O7c)4^&?#&eWAlN+JJH^^?>5ST&DM~L0o*tbNZn$>F?9D6?dtQ43QK8tg z?i(`SuvQq%^BvhaU3vF_qi}G_Rwg=UH;F)Sk(SeUQpNgttr(tE2pQzBd;ok`I0-?N z$pT|0@m|o=^jIhcUgUCkkcwDcf`YMpPzrk>pJjr;tVxI$HZ(m4ioZH8@;E$6#jLJD z;WK+ctillpl}sX7DQT;mhH=9}NxS3XcY_D1gw+)&YGwyWP&feLl8FR6CT*R(nJcYy zT;w-+l1f?KfZ}HMfnO*eBxEk*RS7pVlx;n7q>(|1)_oAgGSmxM+MZ(NK>I=$4^r8q zOHj(pHjt^1;w1m;)0+rLdlOkHA51xG;8Mn2Gs<>jQ+k{XX(e8V%-<>R_7(W*G{ephv_pF7Vayhqsz$4`bHoMrfqzD^WFe-?y7c+vb zqV={;zuhwsV(9tVxk^xX9FM zs&_Q&3gk^Vm^ji|p8mM-wP>Mf-J&McqActdAhEMnG8Zg#{>0^-uX@5vJ971PiXI2p zk%_eMr7SW3=sSx%cdSe81VRw9PIgk_U6vE?b$To8zWh*9k7sB1vAnZuTN0d`#L@s? zyG*x_W`mbq8+uwpN0|obEBay>&mZyC9ycj2&(Afur)i7naN~5{{E+QY9|ENPgW(E4 zKD+?pHO@lI213n@`8M(oDM7B*_$rV)l4a`kjzQbcCFLj+3kz(B`Ayarwr9>IvTdNF zz4=dbWLc20cTGYwu0E(%LY>v}ZfeJ$NyQXZP>Y zR0&qa%eNB)gV2O;d?)@fylK9|kGQ{pJ-Q&Gmi3i`u8w-6lW0EqwD(-ohqoDyAVa=Q zI{L;8^!-4CHPn1LLt}+Z49^ki?0vK`SE?yFKGk&43G9Nstnl6lo-%GHS_!^-ke1bX zxgc}c8a0Q{YmVKkJ5(BB;wUuUaIs}_LnQt#v5bnjh9avgt@5lQq6_bynZmV666`>+ zOg;9|byk-1)m=Y!+#AY2{6cNtngi{@8K3P%_lk%yl!$8bX&oep>WSPk>Rj(x(e6*1 z#_frTf$U~G;EvP3F024(zbfFOxOI@bZkS#kL~g6s2#Bk9hE=~y)aMeAt4%w-D6*F) zO*W+NWUU%^h2{HQG0lF#zvLD(s^^?!cnop%Jl_9kF53`fAV-3|GRJAvhvZPtV|VmKFfSh+f#FQtE4Eh{yjj|P(M~hIeU9>NuMD%u z5nlhJRL!hgO@5M%v$6XOQzM(h7eTZUq-SXQaHv*i4c$Qstt|kx;lO9Vid{Qx_tUqf z&8e9l*c#XQ-JA|lF`l6=?$NsULX+$jR{W9I+cTsS#2?P#RSyC3nd3n9vGN&y@UH24;Iogl z@0{0s*W>Z4)qtdN_oj?X+XE!}Uz9f&*Q{Ul@L|opg6=xQp@xvJnyGZ*`f@3A`mS{d z&d1ApD^~?MsT~&Oh_6zzpRhRVyFU!Z+L3_hZ z!Q!b^;X(MvWbCkLDq8UMMArPz1nq76gjlTYESCUv&eW*(<3P}1V9?mXqq>-&^%lY zD-S&d*^+uFAgpp5xe=~r(5=feRGmv7uhqqGEXcxg~>4Z^K&KD zqurw5Uc!`@6Dc}4wpq&H=Ul1Z$AtvQLnHVCFSadsQbOZPcHX4+GT$X`sfkuX&pbP< zA=_7WI@j@@CgLuifL%%_sGw(J0zK4o(v?eeVtYd-OrQp|6ipx84JntlCs-u4Ku?m}FAS1_Ij7b7(Ta>u9H zYBF9DC|097@;uXC(AB2r0CY8`OAC7}o)W-Hyfg3=)`-8rCuUgzr`?9_XEYU#6r%hROTMnpm zamT>qpLNa7Wk00aF<~=yNM*TpemiSK9+3?XN;oP-a9in4MN7;M;1poL+0@xKd?&!L zdPjL;yXm?AGrHg2bT~hB{hA!uK5E=7uEWASIc|q5c?+D$$U9dN8TLf<+8~VjS(WX! z$+bXmx`2I#g=j~8=U%sacV?;wfQvb`O%%J`_HJ;5dvs-6HVe%kK%EO=BJdt5MRAR! ztNTEj=(#@CIJlWIo-t%?i?|7qdE%+OcrG)VAY&dtA$97>iKE=lh7Vko)|M5&hC{5apLXC$%sy?Xv7H0?^t-BS1zids$Jn zQAd}!zZaHY7N}#6q(3yC*)-RvqY`VR@QiT!wQnGI{B6zqB^oGJjP}y5@ZClJqWQpQ z0^d+%)TgRfA~JEr%8*e{RVTWfm<&VIF_yecJ^iF}NltYR7d)q82 z76f*xyEDnBMn34ln7x%%x&1OZFyI7aqH6t`lzOZiNklHDdGopUPw$_OIH+22;hv zjD!)rt6UW_X8jxB_nkGcopc3*(~r^g*tgyUM}SOrt~>^yg_Q0}z2=pQw5&-8k?Zp! zzs!Aj8HTb=W4{|T^~r>*;WrhN1=Q zPlku2c-#D~C50mwP|xU)yZLD9S~Q8Cp%CCJ7E;Z>gQWFiX1V38nOtYi+5BhLXVYqk zpEKJh(U+!&g(arD!(^W%HNQLr&rr|fhR*eAzO`nr*~ZTIRrZ7>0-boby^NSRTw%3O z-ZvrZe@rk+v@qIip^C#)69u5=RpBb|Va3_4_N}{(6&)WJNy4E15$~cN8PL~h=1GAv z?%vG8*A+LQ2oXL#lMV6A-A%nrh3%_spm;tvIOyxl{q)I+d9H%|$VNdSYPzikvF9I# zVG@RCBVDRMRpXSjql_5;6bOFmvjUmrX1qIiP)~SErfnVOI;@x2QJYm^@E4h-aN<=P z#FpHQxdMVs7Es{DLANg$v=`&{{O18}vsibM24>8%u4_ycP zZ=}N6_B!9`Madtth*Nkb_PaWebS^rH-8OK0ij%>`+sLN+#`I&UZ3Spwv-y4_1r-(F zn=vtkaais;6o=Ek&#RZ`TF{elu#Mfnh@=(x#w{XJtC(mIyTj~x__;@ zSjli}@N;^9ZI(jsRv`%8yxJl+(b1OIGBK@~s%iS0{azlA2ke}T)x$@4Va}lNc){Na zW#O1Z4`uk_wp1{u7MIo0^m6?u9j9yM<@+SW^wpxxHsRB0fR9M;$G+?AxMt)Qoa1bm zr;#oEVz1Bs8%jGF3ji!Oh%@O-Sr!>O%cfgjDdC}3c|t6D7JPcU{g2WSr6nxQ zI6dqoK`+aHa}AP0lFb$4%q5?I(@(H%^FBj9#UZ)q;3^+-eetK|t2vW{p!V`NyS`RB#q8B-&jvLRipBBl7|9}TYvozjk`q(7u z%hFoDBIke@Nj|hjn~$r-;%XMwJBmzu!z~@_5pQp-6S{ywv)9~V!scrAO`%6f+E|7d z&ZF2|Ih$<+X$Imo&|1YZbyzLc;U4?lXQAqoJ*RsYzF~%yHNGqXm^w5Ril7EXWkDv& zwh*z@1yy&zkHqNQ)&p+%wCLXZEKtC?T4kI^(e2571p>X`xFgZmm*}$`dnTz0hA{c zf3ni(HT^*qW_Fo~WJe>Ha=OY9fOe93etR?z4q`eK%g1g!+Ylm{emoUaU^Y&He8S{= z!Y`<&|HxrwFfK3qEhCdgbd%bq2sMojmo48+A3-iXjhEu$RLoj%4-+jY6PPNb?b`d7 zs1s+#!)>T>q#$;)Q>#S4og#F})^dp_AGQZQHW{JKgZ!J##)SeC<9mHo2$}bgrQM-h2kZ>8@(*B1&0u+N6@%sr9|{{p0wz8gGFDIC={U zz}u-3bUu_lM78HPDu(z>7vbOFkldAz-1_1#zROum(#ud?hNm)d5@%GbZZXj*#%;p1 z=aKChk*Af6*nt+1LN7;}=~>ilXfb>NHg_<(_z4Vh%@(op!muIUQ0#rfm8vI&q^AckYU z>pXgn=!tnrM}lr(6j2Rv&f@Rg+_RNaH%sSyTwS##(gJfaR<=Z9le^w|HdYza7T8us z7KOzFMvz}QoW5hF7jLLwbrc2aHx#a@=J+Vws7n{GVw0yEJU=_G;S7HqDulA4AmR`t zxiLtivY|uSwVQ`9vS>C^T0w$=)b7NbZI@hoi4q;({f=axOajZDBB=^I5pUSImV_68 zTgObIqycDm&o?ClIJYR!ez!J%7n@%aBIlY?yeo8ejLac(8y&XQcJ0F8>|>v1zL8CH zueL0vKho`Hzt{)N-gn?_b=gR828JO_ly>}$$^x)y-8Qkt5&rO@&Y8!p8=?j+d}R{3 z^xqf+hN&BS1+Thr7BZEd^uAzoF_3{M7WNJLR^LY*s~Baz;MD!R1Ll}Y^f;=jM6mfV ziKw#&wSjRGq0`~+8X1VCK4u-SWGtU;=e%X^>uHKBz ziNWaHEcQcx3303*J^n!8Lq2uq`VG+h`Swt)ut%ehob<v6vZ1)%eT^xNHu>WZ>RPs1>vU`H8x4T_gS zun@7Cg7fbS(oUV{ec`5tb>Tm#Y<|AOh}2VDJtf4Va!+r+K$3M4Ix~z)WrfI-bPTLu zxKzjq@9!?=E*=Zg@L0oIO+JdIEcYXwljdRDEx+^n74JApE(uTE^(t4+9eqa1$^F{; z{ONi*+SZ~dfhSGHR3fa|*F{UV_^_M~`B#j;1XzxV> zwJ0$~PrDmdKNTrbExFlp6p87@{5&;CBa6>$Xf+N_zu(~sP*cDc?n*jQn?juk)|P0# z;qW{0pP*LluAB#~taQw4QFpdL37}4c>N27*X+ls}i>GKC#R_yZg+6ZoB*fm`>s_gt zdwE=>h7ffvh5PwBs^@4%&4H{!x5EoqZzXHQN1wOcZ!*{Jy=8wU&Le4f40Gm2T`}JE zc7^s%0L?HTkzd0>F!x^QPm0bBYGEenN^cf*R0=Sf$5Ii^?JF!glm1(v4Q}b5@Ed~P zziDhN|D>^T|NSTY2Cpi`DuMo%xaMMJ>+r+K#ms=^KVok=a4>!dZ#is@Nq*l`)IJRf z`cKnWcu@Wlobh5$5u&Wtl8x{pz1wiE3_l#AQsL59uh31oc$X^J2XN}`xJ7xem%evp|wa$y11?5ztV!^k0MYs<9T*4&` z`a?hnpiXYL^hjlDdhYs6xNZ?Az~!J6?T36ZGob#=JaD@tKT+jls2IuC?xamNIR;Vi zU1EJH-aEaX-E9-K-%QcfAZ~e-j3L04CyAoC@!@8={bN#nK2Q+UIyp41s7l2u%m3Y( z&s+um=BKeA)=hNSQLM>}jPYA`qdp3s^qq+K&o7?`CeQi-Y28dj-Gdpmu7;^aHS{xAxqp?OWgTOXUR)hByRTaA+3W%GDflDHR}<(Z6J&HtHn0* z<*&Gne)GCrv|#UddBh{(Ure6j#!%u;Wxl$X@6aT02k&W+tMo=>#Mz)xs3hln7Pey$ zE#fAlB#fKEmeL}}$_N=g85T&4k06Z?BaA-=#}h<*s-6|2fBE^XPM7CZeQyA^;0n?7 z>|KE;yr(VuOwr2(+3Ngao~v7yFd)s}hZlX>kBDb2hGFAb|>TVpUfBRp3-J^+?*1s*+Olv-*xH+*pKJS|w2oKO9c52BNzqB1s z+JTE+?H63cSL;plEipKtlkuzdb3tJ9(AGWY_Wijkf2cQipF1(I#n!BaYogv4Sst>N zo$=F~jZj0aj1%I>e$j`+aR>@^$m5G+SK8AN2x1l;mh>Fvv$*Swydzp5W2P~vzA&(f z3j;}vE13?GN-5!`uSM#rh3}PQA-hRIs{F85+5Mq1XK)IJVA|$({B}|APVoy78@zV% z0H9g+2I<}7s9<6*SIJAu^#_V2$zILbsLpn5KFPlf$&{te?zh^>Dv3)!;g+6Zkbk%_ zbJ534T(MGMjvMmrTMU$b+b>wzq-3RKk@WeV8pbmn^QajgWpe+O_2My2FQSsfToQhE zA#%CIEAm(lP$-gtw-uSp~!9o|BKJ?XZ@v@oVJc6#SLFfRYGb`UJ?}S9ESrTD+h~cs|&Bl#M$azND1Hb2Ye+Y zvqBhAoN^O=3L}SWCQscEuDTViIv{V>7dfxn_l4g{xRQ)J$codbkK`=c@>INsqgm^V)~X zO%GH~o6sI+_)n%!%fILCxi~RI|3#RaiY~m^a*E{5&WX$^JUAkNbWF#2AYvAlE3e`X zYuzsTy@ac`tJ&Hmuf<@#wI<^9=3_b)0-Nx89468N**0+n`<(Nf%AEeOyfN&PD~TY? z-LFoGH@a#6OSi&*>BjZXHUePyFS?<=Z6lTj4whC1wk8HF@Bg# zyAodL<|=Dq`j_a3F+K~bRMjo&^lg zg<;0^&T?0bxtOB4n6m5HraxV3zGq}8Hf&a)M0-RC0E>mtUDg)qKjyC|)NKbKTYUeZ~w)%d)P;waClL6l%h-48Ds`lw&(Rx(2-V zPCq8>2fO&KLIeFkgAbW2&@2QQ)8t}PGjFq>^y6GwP#rBNRrO{$b!Cc31vqbta=AD^ zO8Qp@=Ps;^)OlSBrew8Ee?BQa>Ib@(4AVbG4PnD)aRcgX7bD7Jf5wK*i_LJ*|5yh* z<4p1_WYvkQn5oURxo-nfI7#{mfBnJf_plD%vVn=7t@DJKMluh7&P-zLh+c5iV%@O0 z*u{;WBU(=At22uo)+-oNH)qb~Nz6z}_U(bQh{~q4Ba@7^?D}!8Y|L>|BE7wOX6}b< z7rwGs!M*I>BcO0`k{Jmp@d{0iy*&!L5#oBK^!VU@^@(|Ip!^B~%Pf41*29BnzNd55 z5&48&moDfxL^@zuboa(AjenU{`Y*G1|6!I;=zlTmp99K&(8<)u#mImK<-ZGW?E3T$ zru1KS#mic%7-57=$^DS4r&Xg16eEO4VPj{|9g5i46}k#t2FS!Ke+*E@S`SwX4^(!b zjA+~vL1Ai8)oa00!VD&BQCg!>o{P3CK7rsTP{OiCj~7g$9WP@=)W;d zX^@pz8$^uk4q+#WG_J4KKc4>aAz#hm%N{H0b4H$v>kz8WcdmAm>!GzXLLf@PPw+#qyLPEuvS2sz^y||)f6Qc%x4YR(HV;kTZeHkPRPygQpJY)=F&IL zyyEnH=6~5SrhZkc*qN1^`p!K40QV3Xnf1hM{A`<;Dp0#@Sv)2B;)z*8Tfn{isks#=w zAczUAxIkVgLuoDt=ii{#D9sVPb4_~Arcn|XI@2OtHgnild7LSMR{>Pb=4D9aW%IH4 z3IQ(<&Ld*Z!90@BQYqyStaSdLf+hE#77+g{?y8cagcx0|GgqVaZR~E7OOEqlbKcgHRWT$D{9Y(e1SZz zAM#0r|3(miPLYg52eq=2_dA~qyN@vF-x@iY81%P__9*NlSABHwmDBQ-N1MyxL#6D> zb6WImY-)lZlyOoO&xrqI^?SZp+EAEl_8p7H(*4vKAT-b04 zQC+(6heo$STTb^2<6rkK`j>6+Mdy#CumVEukm^DR>uhG>=~BCv7XaQ^{q}% zd{={xPu-vU1Vnz~aHf6Mg)39rU?lBTP#`^u+ zOvFrifbzmuVZ1nYj}J~JDjCZiW;n-5w~72~I`O~gb5f>8wmM?YovWZWYe^O!+K=yE zgJ^OSi#-Y3(Bp0YHIO*fz8DBI{XA=G_?qQU>2tMtQKzOT&E=Uz_O3AV%`43vLY|I? z_lw)bwLLTrGkUcid+Pb+UoOU9Y|9vlab=7;U0C^Tle6Xq$~OqGu1<7kAdb!WSEzOf za2I$ED)kn9^eodU+jgaYYgX-*&;4WS!~avN6nX!LDWd;j>ij84r-}#Mj24;}ap%`CA;Ehp8M+ zNJtlSPUJ}JO6;Uny0W6B{Uc%wl zz_AY%A-q03qSNxtxo-a}n1)ie8-Ni_QRz~qfeRad6_j_;*kCeK`<&fs!oT4{KQ&_P zEyoP|4A6sCJfK5UI!)r{+70@%aB|%j<}^b(TLV@xR~MXb^53XYF4$^Fb{OPai2n4X z%iI2D@X&9r;H1x_p0fGGxJRHq*|ojl^VC!Q*7{nrRp&#Blz*dlncueTx?ew!^Wtsl zur&I<++eSbZJf#c(oairi4@EU;W~3{_nh6Ih6tY+BB3WoeIha>%7(QaM(;aIr zKaK(W^=YM-9;+dAv4KvTM1mc*hS%nf%QTxK!LTkSH}_B#p1^N{2d~rOgVyI?Oh3sA zZgfPyUk!2lg5+3PRe3$Z?dN2%yTW{uO`&YeDsoLMA3;3v@pD0mML+v zy<{WRSv0G8!ICs*qrk7D-yf_K9ZWT(hI!76VBFt~H{-a{e3jv^5|)|0K#GCxcM& z1ulWrv?+y9-U5kwOK1Iw+#e%Gj(KH-+<^p>nc4oqIjYWO;{AIKKMKRwR;IQ8&e_fa*FXOEhd;=D8N zx^AerRFZBJ%vz#>kvf+-UG@yt1+q9z+D}uCe$8o`aB>gCP08HVcy_0Cw=MKtvgmQw zy;M6I?F)>sc3ZTxf`kb@4~ik+_2>7{EBPzFu&rkNR!G3Khy2}mCE<`P!$*oH$(`N9 zM5QZ+;JEGl@La0w2k80KbV%FfbMNngH|*!vQDtT+W7%|-gcSI&ZGR!wui zXUVlDv7T3vAqJpw?_44S;lpK;MpsY~aSQJbb1x*B8S}R)&!G$RB$S8wK#8V}`WJG)h0G z@&xRRcHV4t&AoP1jZupU#mM?an}um~LpwQ&=7+vRSCjS+9=ZR*Q}ADS{@bNUrRRU( z!TB#d|B<8rd-e|?EVO3@{|g{v$iEo(wD^f!IEn&`fb-0RNa*(rCJVjUwlC|+E2S0v zpTF$vFu-+Pm*cWQr?2osa-hH8y{ur}QQ?t<5LbZ47~pKAF_CUNhdu- z|CRLkEqk;tuhKsE!TJwC6wh6|*5bRd^dIIBXE!9Q*_saght{E+YM!tmgBE+ASiNWe z2ogR9GX~J!w={TtXFX96h%f1LN$qrgsS$8d_95nc$%pRmLaK!K{X*ix(zAFM<}QDc zmM@^NJzLhO#o@|_3cZ7@rR&GtH;GMPcVUiuO8&O`sle+JkFZ7THO+2&#*rMqIw4<~ ztRD*(U-8l{4|NjCWaw;E)>#4`td{&@d#U;Sp-*i8o1iPq(lP?3U?3}QhKRY_=^NG! zt`Syx`8ZsZz*+tkJUAf6xuOKOpNNg97#JK6L|5!-YmTsc+4KD$L7QZz(TY73p2<;K z2Iluz4P$i@&z>1={)eDawEq$$`ycsH$NJv{@hK78nK;Tj*t?rMyZr0PrKsrm|62IR zQ>M`~w9FMMaTZ9Ly;pyq3PHE}?29-#64R29c6B_LCvJ53ZXk-hoK!fZ2$Pw zVXUEhoF0mX{%C!1u;1Wve}gu5o4!X`NqW44g+>=BQ?_+Qnd#O{{$;k?R(0a=SAyBH z)XD;H`*_SUFQwOgV!IXi;qgvc`Z}3m(YD*zt0va}(xRPcpke90B3ycxipW5}>N4B? z;kvF}de6^v;E46{^6toZ^9dpI8ASZhEco~k^wfg0Txrv^wp{f%GuE!OG8+Hvk9gE7 zeKkFOY)VJBtAGUk7y0pRJPA3Wj`eD^gzw>SP6^z|1y0Xv@$hW!=Q~VHP1JKA(k_+<3F!+`(WrriF@*-qC^P-*q)b- zn3^Y34!P(%a{dtS#gLLEAINrgNDqpEe$V{acZ!xipWgpm*zQy3rj}dL8^$H z;#i+MWaigr&k8y;z4oSKZ)XCdXmw!j1RWo%Fe=U=$k+D;o7h6EtimgVgKd}mP&CE?zLTnKxJ$C4l_VPr z4zeegTx2PXdp;kyrGRtv$>!@0&2R;`Y(Gb7E}J!H2MpPh zKtGAgT@I3Xj=4j!&HbC7+Wnr^Ndjy?)3G^HoEEm`l^WqGI@++MV0D!&NO~?TgENOx>cC5rdaT%p=0`1S!`q71uh4`zcB z)X0AwA9T9U$)^7$@8uQYQd8KmA1Tg}k?FPPMz`fPbLmy8jQJ+|dpXI{1-um>CWf}d z^kpTYwoeQl4QjAbOPstYKTNk4E?;3wnFo7Hoht^}1AQEF&XvV$Or5ygmF#)6r7+g~ zmM!#OU8HPu?(+HT&l?e>MpA8X?vb$CGAgDiA-HQPwuc60+wHyo>aQnmA6aAx7t<$W zdGB++77WcBJ=pU(Hs+0RZrQd=z9hAWmF%Ass{WFtSen7?mgv4*_MHw!!lieup+}8x zuZO8I+DXI!5p#g2IUcq#(w&wBZSU6uR3~nz(d=G6NSKqs>`q#f}kU zgdAM@4og6{2+;HgFHkfN@H0CwpqG{8qI;`jO+7vBN?fZTlMdH=QG> zcw7G6BMzu988BiTMO@Jeu)CnhpD8D9xs(c8exu-MCdDl^I+G^jB1X}PW0rrji65jk zLEPesB_LKv;`ufVs8(-gPl2Xf5u9tw;oI$gT60Y5_sE}L=@vW+Pdvt zZZ@%_u$W{m90@={Iw73_;ry_l^MEHJ^%YB4oS;67Kl+8*z+#( z2TdZeU;ZnwZ48M!3`eeER3>d*P~l|+vEQo~Ch@H#?)nTS$>so_r+^4=*6XI1As0V` zj&H+>X<@|qZc!xj!*m&`n#AV|Re%C5j7Rp(yUT!fS@i45CxSME^A#I$y6+t8t2Nnn z>pfDr_e=}nu;Z(v)we;LW`cMKD+!-$Vx6+9=5 z07UOWsz?gNI8}u6URdc4sRB1`pjEJ(0^z7kkv1>bmjdkFhJ{$8x2<`r@Mk^*70pGA z*bV*>9ZQ_!glS@V3*wX@>4aqy^Kk+|qWr`~_aPlHwN>fU*J#r%VaDd@*Eln>4^vd^ z)=0mW7e(CO09dbMYH6SWPybQaxYSqR{3fTfVW>cK z5R?|=6G2#}G!$ADkzEom5^Whlb@ja3q>uQW1a9?rtcbZrqU!O{2vI2_Ui1T!Pa8ph z2YKe=sw0{tNJwOR@8^z)4~MSi=!4zz z!~)b#0Y9JGS_xq=ia68AvHp?&JB=ISKpXO-@PcGYHUgE>Kw>wA&FjGe+zJ+6Q~Cw! zoxyVIZUZh=(UUGch4mPZg8eM16r`YkFL6E5Pzf{b`XcAy2w?=c;L03uW%p8L|v26Ol zqi!*SPPlG|2kl)YD4yiE7{haUFU=}R0*y)j5U!h`-#gC%M+=mzDMZALuGj_S*u-Ct zl?^3D*UFcGhc&O(_6}u&wnP@dH2rS!aFN$UDg+ITug{)?R;1}O!G8yNtN#BNa zBP702CaBZFebzHt-9(Jmg(|&?j&f}Bqh1An@g|#0<~`1ABz&~r zCf=}$$|Irz=y}kZShoXh>(S-T-T=oR@C#H~8Qtw)nwId$%dM|RG|+~J484NPeh%%~ z`2^oZqQ7FOK#c#Uwyx$uWbjh&Ea1bZozVECz5<5}>G_1{<-#(h#u+df&9vG04DS)s z@*z4Jz=TZ`h-eFDKZO}wu17q$T& zM6w?_bVCRwV&T`qzhBlc_<`vCN(j3eN7m(1?n zMn?tkBu@L}=52V3=p5vV#n2VQ$=KGVx-6@SzpP1>n@V3>8DPAj!__F9`VF}tc9sv& zI=}Ca3WoMnYx=t&-j4x2*79&)0ore6fg6)}kh6ElPc4Xi6~(YA z7O12_+)zOu>XDg#PLu}@E9FIU9D(kV(dJg|;MQ&=qAYmuDKlZ@C$i;U09AY$!rc|? zZ7?Nxaa-tZ)sozRtuB))E9jdgkknw7vF(ndN5en%Wz|B&j^lGgt2@|v|8-G zYPW$lJY5W^e~Rkpo>`qS_$AdvS4u$9)mMTWbsP%Ucpb*6J5mkr)2xfNToi)SdxYAW z8L+)+4Rw~Yxz=%PaST`w8ErbQ$O_G)7X;i7REPU>glwrRdk&E*h@9y!n~9iu4M#Me zV^xQXgH2r75*#o=Uq1=G^;Sc?r3$E3@q&!TC{0gkK@X>aHo68IyOto!K^*AaQ`nza zUHA)b`9McJ=QRz)(|2xXRz1d&Au`c6Joq+?QssNejXyLI`!wb#XB?&CWjScf%gAzV zTxk8v5S;^2$bn5*QsQQdMUE`Es`JFb9q6Yfaij@~`1URorGZW|W)C}=+ z(T5yG)wgs-2gE>|TUsc2tL#X+&c;Do=)LzMVx1R&sm5K{aS6oL70WACVIXsFiVV7| z(t6nnz`POGc6H&wWw4cZTHIs%@<6T_Pf@UPjzf0282;y`0dBb!v!AE6QDmqvJ#_ri1(Ghnx?yGc6lM7SUM3^Xy}<1u-KW_{pnP$RjeIFc7&M#7=9^yHeZ&iakXI zEN2)UeW~tqGCTa=N?upeVjlUl%p4}k<VUk(fRyr}@PjIQV*R^Zq!saj93IJTP4HkK1cIzp1f_9kEFNJO=GGVhNy zi|TK}UyamBYX8bv=>yh`O|@O0=v6e=pO(Y80!?+ zizHB2{I*Py9C|vuBbAnVq8mE@2ffR{f;iSBQlq}&Ygx$w+{fti)h9vHz*8qc|5E@w z&V{7fgbGYVr!;AFxQvR8(D)hMGhBiwawD@Yv|wa*V;;X^N0__|v5kH}5gG*k32)Gb z+lLpJ#jzbuqAOYw6-=HIs1_3C2@K#Qk0i5kJR3;$mz|2UD?O$S7|6!cazedG-c2c$ zD3f`=>{dE!8yUr-%{FKk={&f^23vT+ywFwv&BMfXP%gCkff==Hr)=LZvZ2ZaH@knP zSDynhuBP7ElLp#(i6soH!zb54q|+af((PDdt#!n8n;>v64cO2iQp-cMPqu-0GR3Su zN#mFc8OYv%*HSWd|K2^&CzlOU&km%!OfajUMM=(dHkXno@u6R%+B+P^ReA$r=cFz0 zZ7%3BX7<7(?k-3g+0n*=C?fbZm11@Uq{GkPI?5qQSJXuW3*ogn)KJ2#z&|J+)H@OI z(-%x!O|Jsa1Yy+@g}ih2h4pcqr0ss~)^6b0^Qt#eJ@Da{Ot%gSGTnI+qKauaUEaX@_2p2ej{Io9Gxj_ z)HX(pA?3V$cgAVH=H;$OvVpnj*Z@VHvp->FXIK=0_*gByx3R90ZrS|+ZRwIK$5t2PrkY0yD?K{SZ=6noJlaw5Z&_r<3%)LUEIdu6__O zxg;5@|6pH=qo)|u>{mn%i?6+dKz!Cgz^=35M?r0Sx|zL|AAL*GLlZHYhWWxzi=k zeM0aZqP=CT2UnCcJ7CDG&dtlDBQY<4u=JXK5SFBavp7uz!9V(l5V zZ8~tRtvB=ZnJVI&I6GOiDq`8*iHF->MK*79T~m!&C6$H8VGlV9Qa43cL!qvC{3;IU zkOnoJ$l~S%HYitQ&L@`D9}7h_@{02{11cYlRrDqKAV7P~pkzF4a>HJizohJ9{tDI% z(qua)61($wH)f-ZsaJhNOU_09KcgloLLp0MVNO_hOj$IY)mm!3*HVw~-LJ=BFJDL# zHg0}o<4epRZw0vh_P#!>hz>|H0kCJHYYfSSz>o@)s|yj{*JMu0B|z??SERyDv~xi- z)gp1Mz58+_sZywTXIVc+9988k<(rWAY&3$j$-_B$`tM>hG#DVqZLh4C9f5Q+_~VT_ zN?o({MdAvn3W?K+Mu~+*S3=?E(zQ&jMuRHt+fL)s=Lr0zSk?y}Dymv)MXbzBge+n1 z5t*jk|(l_mSu4xwP=DT$~DIqyt@6NNYa(s+Sun!(64Z9*d^$@&bHQ+ zK_oKeOlv$GCUHiN;_wSMteQh*OknLWZ$jqML&&n9N3_?Fp2+X=UV7gvn_c>!(f*Of z>U8OFg4p$Sb8I~)E9~oBh;?fF%W`b+nnBjAmda*4sCbxQB(n%40b?p?@$~-|w=EP7 zwCJa8QfsL_HU({1 ztiy+yOw8%VTScPJsWq5C8H0A-TO@Xtu#anEP+jgTV`+}SSK$OuSN3Rp|3TJ5ll6Y9 z6?(p$iLjW1`NV2;V~-~f_1yF2CdA{a&iI{kE3M3EqN%hJyj1yk-6HJ;GLxqU5jIblPLCXOSH5u@Ed;2)zJT;gLe$dY zv&Mt16R|P$Usa}B-n)bYB}oNaEiZ6vixXEqIE)`&#?;=`v5ut(7d1Qa?X)>4-rC(I z`1#~uPjU4-UQ_ekHYKRv_QAECjQRY$W7NYvKxS^be65ZF>bOb?P9Jg8F^Cu^$a|q; zH#k%_-%!xMBz(?`kX}Y4>a#KT&ZxNNZN5f--U-1tc{$@)5?2xbx3rLG>4fPIyw+2h zk>7hwO2udc_?p$&-1Nc=FpM|qxD-bWd;M`|rC-y_D;%M9|U_LPz|<{WtN&5OxUTfHE8TScce_MFQ*QFhab&+((W(t(%l zRXC!*d)PL59h$I^I@B}+I#auW<{ak?U1hVnC?tfoM{u69B+MP8Kr1K0IVp4zJD(-_ z3~1jJzZiw%7@}s=50a5t_@6$Z;8inw`M}mfR>-#7OX(NynQUJw>c6Tlo$`syu+}gA zB2Kj_`BvL#lp&P=iOGnLnfab%h~e zu2*#4bp={frp0l_19?KR^)Z{@Q{mNPjmt59UHH&zyeJmGES@8R_qURzQqD%d16>+N z$pK4kWcek1jHg}13YSL#vvXUJw5*5?%|OVoWI&8?F2aid1#`s+|Hti1x&#aRY@fJg!LBbASucYiFMxz^~$c`=4xh0il6Y!tO_Ve5fG0E8~Kp|V!?IL z@9Ln;M;Xz7?#`87TLUVTH%6g)CG1)gg_7U1 zSPRN6Bvq9T6txRAP{{V1z7O%eq#*1#`Lmoeu(60Hm{N9gAni>P zFWH0{=tu-GUcw7cqI($gd72aTWPkVa$^k<$)$e#L7teT@zx2op1k?=4Q+r3;^!GWq zZA1aeG)lRn(9`Z89-<}=Z(_vRQSm_VOTG}Lp#VSqmM2RU|7U;^AK;iToQBeUaiCwH z?G6iREryRo{wfmx6LJ2jFCh>Tj-N0Cchap_8BylTrq|q3u1uUOTY_5eDx|=C;1{0$ z$iwEi^3dV_-uYD9itK*EqyEbAP+JNPRJ|?BoJA30m{bx8`+@jZrj~FqI|rTfXVptP zGh8?iQSZYCtsCT`uCoJTwp>BM!h%q(vG8+JQpkp2>_a1>NV0&u?}zE+pTmfOR|i^B zlElmm#RYl8jARi6@QD>dKE5j8`^)Yu0Xcs>c@(@7pl%f#ApfOwVzkTh(>u>2s?i$^ z7^>blV0%ydX^2qTo6hJeRldz%FsXSkKdJ#LHKcld^h&1V<10B+Qj*JkyiqDi1?yp@ ztbKG+{Wprp3*4f+3Wcpnferm1L*_RIWWAwz&|OO%LpJ%Ts$httHOSiFSgig}utMr? z!ctvR(Xx0TzBC=UuqOpN*~px3^`u(NY=>%@j^(7egHKUm&KXk4)h`$&X3uFMYtC4j zoy?&#UUZ^u+YX7uNa?E_TKT?&U~_Dw11Br?6|_E;W{%5)ap86tRXoa%JRHyEEHh3t ze~^T_-!rB&pDaxpEA)Dx_vihIdT2Gxkrszc9)Na!4l%D*5HhiSiK4EeDn*XS>Um>T z^)n)_yttk1Y~b&+BCHTfeFq;Cc=iwz%@iA+H@Kp7)vHx~mANf~L#$t3Uq45xnum7)n7`iIz^C=xE zW;yF(WxR?qh{>)`gXyOu!+UCuq&o?jZzeCJSO}HdCTKT`Z-CJkGS-Es@cXynXZ7_F zQxaQ$R+$xY0E!VO5RB+s-qZ*$$9{7y>0Ba*t4g?o7=c&fQ-Tn|>08XCKIY@}HU>W* zpKjx>`^4(F-<~l_3gMa&)Sn|~HAhJrjzFaG)WFso8mPo_WO5G=7_ z)Q{dIb;6xQz1&`?SI8B4KRxn0BXjdFgMOnspy&re=2VoSbNX0{Vc!h=x^P3f{w)46 zwL*Q&&`GqqNqUimsx#z}|P z)u%^%w7n%I6pJ5W(G1DlE{97u;ABD>w9^m^$^INNwAGKYh~6?_$rrg{Q6+lly5Uxy z%=!0E?a_y{@(uH9tV)r%4e?Gay>ggaJp69v__Zyv1pjJVa+sQ|c6L%0UFM6J=YBs(tEdv8;f2 zoY8c>tgCo~m;eo<-?kZ{TB(wN_Wd}k1<{Bzb@}lSUdXG1fZ8o%xJh#|4O(zBapUKnZZuZ)bK zt*1$xm>Ap;6Aw4ME5Bv5d#o~)uMEZRH#cGyC18-hl=plzBuBVSEI>hvZ;A(x;NQIX z`lP3z9S7qT`)>+xl)aW3Sh)rZOQ}8vL=|#rSy;yvWQeo1OyKF2?SUsgh9*(jAX>hO zl75UQez?IXpb%$tt;CVbpp@aS1fkv5hJC*j^3AyjaK5!g)n5kaKAiX$5e@M+qtdn( z89qh-uB#$$1f`sr6A`Dr55b7!N*ELex>zysAwMuWxROb$b!$%-V6!)zJX#O#oe$76 zwR{`(vnJiq5YxocJ%T$eS@9iot^Zzqq327IIJM#jZH|YnJHwp+h(;L-or7j}C#1i0 z`)`Xn51)Zjqcc(3c92UeIiVP114##^t=JNHx(yXo?!62aiBM5h-9Hz+jY`^4&+LLS zX^U@I#$vQ~)0Kd#Ee+^tjJ@~IJmcQ1SkZ!z{D8pLl-`KazUNkM1}?ES3^(7Bl96qN zagU+C^N87nqc>B|+8ZBP-FTcab{T(;haB6_4P6Y4Ul6?3YXWtgvjr8q$vZY2M*N+i z(AK1SGEND&RyjgkyGo3kaw8dTo;B9(u>BP${dKrhN^D;EMMmVyGN#KCQ?f!$tct^= z#W=%`W>`=S)O9&*2v@G(_6@n-@*vOv8*|Q5h@~WPz5nYkYf=N$6U5+2yb_cen7-lr zz$|*+CVx3T2hG0c(DUl`yR+q6oQsd49Z8VAv>%6UD>u>9LjKxyw{5++T&OQt`$o*n z)1p=DjDLE!3l`tS<(sAfe>EZ|WlyU~+>a_vPb3kwXO-ijlRhl{8y`6>#$ik`)*%}o z#1ZpNArBV4&o2dK0#Brpa*QJfe8NigX5ug=G*qq&Ks)vHZ@lra6FQx__}Jej;PmlW zEE%J~*01y!c))iAs?NLD$%cFO+Yh&z2l4(znos-G&aEOrS#;uwW;N7E29exyza2RW zR_cT~Xm2#FaDoZp`YgIZ!l5Stj)DK@Tsv{=hl~K~3z88hPWgP+?YdESg*Vf$p^`u3 z=XH%1^eut*trVu7xpDh2+WfM1AatA-BWIrQY5V=L(c&%H| zxoBV67dkdDA@VUq&`ADcG+F=bT=8=N|5AJe_nWLenuys%ANWrg$y;{MX%2S!EoV zZ@`(r@g?z?TKaEVZaZLhO8o-pZvfc{ETH8TKm6u9;ahnYu=Sl~Piyto{a+^qGES3W z6-kWd7-iz^zz5N)(xp;@+>tn~*Qv7gR{Rq28lf9&B)*c`@eB*?385Lb#q`wFQ%~-v}RZru; zY~fHP63h42XPgwN1yyA3=ib<{j!iw|yY>#o-{xm&d1Ojo9%LSDUFh%Ke>OL_omlwZ z(mBUL-gGtWXyHPaKG9R8Puivr(VZiLTFtLKP0I9duQZhkBuJcyC_&$ynY!HYh>>R` zLG_ct?dst-D2n5q{E$;7n@XhKix)0vIb|_=ly_J4PDD^TmDDP@1&eHs2<^aLYhL97 zj$d3E@p)xX%b;cbGCBk2 z-cYc8#A~IGiG2jrir%dvy%Zd?)r*)L%Z83rXD5$-Mp7{{_ALsFSj>QCBzOG3ay_oM zLVR0O41a`W9r7?Qu$uL&@`sm?zwP%ej8PYwX6$~U1pVxu;c9jSKkm>PdD=n9)Z*7QrUuxEuP$qOM^?rVn>9?Gd>!x1WIfK&H*0@|WK*YZ1 z*7I19vmkQmhc0sSkrr>){zDIm!r4)8bO7rwKmxk|#mBQrmNVGHVu4xGKzxE2)kf@00vz(=x|riE zKN&4ItTvL^wFMr9R5R)nE^5doTf9~0x9{L1;jK&={XhN3&G}+H)mc)F5!RJ(&bNJh z+%2)R4EAurx~n4T|p~PVRfcaVOn|uVOiDOdPfcLp+-z1u}fGcki>Vp8#{D(qj+=M!RJxi)1VIhUdQ4Gy(4@rzF}#8OO)em?}8%wBKD}4RpsB z?o*%DrRGB0S|rbQ;~DLWDEhXvAy$1EO+<_&Cgq{OIk7`%ofPt1p55Cs1P=rX@-ElT z8lwYiMDa$yR;(brH}4+h6Bh8sdtHDp_?5h;$)x6SY~Q(H*f*UuONnm0wrOE98A^{< z*mu~2J62Uo+J`6SSbW2rfUC3(U^14P*#v-3YgcAKR1S(+igd*Yd{4RYZQZac4^uo+kk75W&i zK2!-eVPzdpO;2QtwBvu`vnG0sng5!p6J)+wx95*+VY5nLE*mcH3^jt!M92Q8z2I{`pa-0m$O!k<>kVuoAg zj(JC9KmN$sW4as7l8(;pZ364^7qPS}-Nu%o-lU-n^~hD-Yh@arICKP;2kXaJS8KY9 zYMxlm`X~^q7llw-!OZO#sq~|t7Y9qwqY7n0i&ds+qw~@EQ{A>Vl_WPCq&l*M>um`d znS0RWPpO`%zziHXsQf3bF9O#n{Kq8+317D0buk|CY^~HiMbwH*3GqPr9o*Rb;G)#jGwbLE z<`2S&53(%g-AE2!ZT&)G^Kj)z=uL|jTOwn|BR|_LU#{^OVYN*Xu{cGfGQb5%Z=uoa za)mPc%Kkf+fQ&~g&v(#A$A6r;^R%kylQY8AqLSr-?iY09t(sDzB|n8@JZCF+f?c6D zw7n5WRMH2+O}7kNPRWI-uUW*RyzDugzsv^g=UDPewIy&G8JaR!h*A+5D~1(bKr}@o zLR@kae}4_ZfH@R8BUu;v$bK1pO2cDU+&VjiaGlGm4tP!XQGq|WVvH^5F*wJ&nbtLX zX_)ybPsvVqvb=t>;7B4^mUCYbp5`YAgZ}M3>U);Z{jeg~`yvXVqQz}LY8dQB*F^9qeBveFgLJ+v1IEXL71! z&ARGjgw80dreI4a+)TvocLPw@cJIb@E0`D6_*GbCQ)^2U;3+Wr?+b*=JA_Lvc3Zq2 zp>C3|Iw9?@==}!Uz%hHlwE;uD?XH{T$4ruYujhMZKUp9h7Ns_#kNbYla2bR>54LVh zq-p6H9=RXGieQouqN`9tORN^yY2K+cp7dxAU^go|uVVz@0bNqMn~tcIrgCyG)Qj$? z4SPX{Xls{r&XJbUZXRT_IPlVwXmA<+Jnr4;wOt&>MBVXc;6je?wFY>7E4shd97B)3 zhBXtr0(GfFFG}w%TM5&AP&c^m^GWpV5$lz~Ms#llLkIUVlLrBO4&T5N=G1&KCPv-C z^hGv8Q3`{-d_11gUrO9$LU+Ncclw2%JIWh3s_;e4xR?xlriQ)19xSQ|Ug|ij=GP$$ zZxlXCR~B~EvEN_WZ)d1bUmLD?zsJ@9He2A1R#QU`4{zEu;6I%|WvgSO44h%eXO$O; z+LV3^y?3e8ARHjp6b^pP>r}3bSF*jLj!-m`xcY4XBvb%H^=|K99LG` zq2AZ#?r-k{7tC+>-_>trS>dL;r^3fj;zh=H$*v`QN9UrWnIb-<0$CB%?Vs4BE9A7p z9m&q6;>!_Nh`D`^w?Oa=q+{wLG-E^3X=uBJT81 z*1L1Ozm3tq*&cndLehwn|f;Zpujw`Dn7Eh>7ji~wJ-6hy*8}bLjc+YDam?i-#I^BOxB(}c%@m6B7DMaaH zRtqcxk^09ewlf;cB}QufqL+Y3Y02w3p__#Vl@?!o(a_t3RwG8_o-X8ri&3KJ9Y0Ix zTfR5ul}TCaI|1uVyN0}UOSBPk2@l!R5rLlOW=8Hr z-nCdf;*=(u{6K@e8!gJmF2A8yM}$WkOUG@WFnNYQSAP0{7q9H^K%+8X?THzg_k%6W z*%W&V=eFyplM_Q{4(N$*GjbQdrcW_Ja#Q(y?X(yS+F^W~$_hLXtFms;E14-Ij|xsH zY*89+>u{h=q+?y}#_uLq!z_u4!^ZnNC?D@pm*YQ+lVzTqG5Fc+p2v%p{D|ydGbY#H(Ad z)o#6!R9&!BJQ<-was3I4@hOHZ|GGWoDW7N-53>owSDY-H0BF*6y6FeyH~xP9+=BjC z<9Cp%ZMV%78S0MTSYwfZJ~q=|8jJSG@gZzj1H`!H^r2#V9yoHW;T8Ujh##ZDvUNg5 zGsGqWR+qhB)}VNQ76zf;kBOm|@c3GVXm%&Nv$oV)Dg#WJrM=sK9UF3S3h6^~M1qSG z^CkUrlM?kN8lm;3OnQrHiuH|j{Zis7S@9~6KSFDFm-je75@B8MKFQyNE zXdp^I$n25WpMWOydT!@rGG!ptyWU?w$^>l~D%<70rkx#0>gT;y4YSn{hc0JDxUyEh zcj6#9>01JC`3ZqN@4MZ<0(DAdwAv-E&6#Dh+i|`-8Oq!5(RnT!0KUzbdx~(~wLKks z_R)SR(}o*Jh7~NlUMeh>J?O6+lydZ)V0mV8t4XqC%>YhUCVo+mt%7A*)F#+n!wHRhe?9|NrK6}vJjyeT z3EJaN0Ob+^pNT53CR(__-6Oy^J%+NGI1pajfLfai1dNkFl-Ep~b2ob2%%06ZGk7;# zujp&{9~9PhdUIzB4A1i4DL*C;ij;i0TAhCe@SyKI4Jq%?H|`hEoT)m}^fONHgdSqd zNJmvzESvS9%WeE~>fDTF8R$?a7XC)?zOsCP*1AdYu(2x5YlZXyjIDj|Y6YeCa1{BqKS7 zwe+FbaIX%{2q6c-R_K5oEdTO3hTw+x1aFTN#A%%y_t&At$-&+}Ywr~TP?JZ(KTk^> zB>{I&SQV}sLw+J`5aVaO;}ssj!Ai+9o1?tXp3hVnZu3vwbxD8n5w`xs!Qt3{xhw+l zzHNjaKfc;t7EioMi-o2is(y$|?RWPRc9wV@X4r=htRB%co?5sRp|A!`HxW0!xUoX!d!Ei!G2&SzmUfw6&vgbYPp!V20rrD|LRypE$vSP)I7R z>@L3tll|wGu!qIJ&r^w)j``)V)qdJ%O3loe(RwL7*V!I%TGWyOxrfv)_4kyU@l+@S?=yf1cG<(!Es2fS>=sZN9)Q)^+ zK-d371_Q|d5*@eVFVnyms`n&+og@;XkdiJmH!Vx~8((=jvQqPYsI%aT55aZ@Jx2C~ z3$Bf6sc}++3DjT>|)wCkB2GmDSy27a5o5iLhAQ{o(J zw4w&MFZgxx1$BJ2<;^}2A`8ZR_;f3vp2zdm3J#=IQ?ms=H81L~NHh&jwnVYT)R~^J zu=G=S&TU`twft;PZ_30SSLwN)QoLw7!ih=?`MCzh{7B98>4>J7k#T#0ra#fT3YsfL zo~6~bQXRV;qquqf5bBj;iSYhn=SAOFW`7wHx5QMO6lybXa$-(za8e;1Y|Ex#>PRW4 zkmU4GzzsV9#MG6UBkW3KT%dW z3)R0|ztk8Q+9lWdYoI6;_}7&7B8$!jeZU33pS)Mf_6V^rN$WV9qINZ$ny8l`^AXCL zC|@>gI(~vh%_Z^ng@GDhc6XXwivq$mknwzSve-vA{H)VjJ;4yP&NaC*QHZ9S}o zDs(Vpzi6TQ#8N zZ_2Ul`2+8^$1lkhJ7{sX(u!XL`@JxCpqVyf@Zce!p&CE$$N57t71;6vPXYJDx+q#E zf|{Sf!!Sc#d+NoeVq;z_|M@sEZ_0iH1h-`bl=-uyVCG*I!PW({$%Cq?Rl~FV-^lW3 z_{Q|yf>$J1a6|krg`?m!Wad}LLiWoU^sNtm=}@9j(gC|C-|09T@Sk!$(~r|()zQMH zt#@eqfv$)n0?_UoH}kA?c3j=$r|Ezs>;SFCVjQXIJbUm16e*Nd+WB_zjdtd2%q#NVwS3dY%0Ca|9R3k` zSb2Rgzn$<^8NGj0f!Rt!`Bsb=A;TaQrFEQ`CS{$PTm|O5Yd6hTVhTGE+!!}{w>GTK ztor!pqJr+)kZA_rXJ9u0O{82@wP8=lv_xECOXJ$HeHV?ok&rcixtY*|z?4Hs?)w_alRJ5)8~gt<07mx4FPhN!u=ucAwq>{K#U)plz9pO0L~`+QobK#c+99{Fwu@tTj>n}~ZKnAgP@5;>mj zTSf{tzn#$W`4mKl-ODrEEpU;cQ-NBU!eB5vtXVIFs)Rg``)kZhkUqq@Tu?xNMk0rL z=CuGL0eOEQUZq~izZ*=$#)U`NG83&7@!)Fg$qjO$+jaLu;u0&M))kDSKNCJ8^9d^=);3aqna9NYM8#v2 zq&`zob8XWd3m;6h^6J!oHJ0eNs!=jO+Ap2i5Lh8=BI`+T?|eg&y?d%ScW=}b+M~$8 zSJX&vE${x<#sKE3mC9*!6aK1b7ICvbV|u17{nE+pr9H=vb7 zn&Jfq-R2y> zW;5=FKYhbP+v2dR2oKZ7I6>{PD(b2?y);Y8rqjFh)J6kL5R*!SpJSQM8ZQtQc3xXJ z3+tX-hrd3`z2<1RhBjgKy9_xD>sf>zwCU#;@A?!(?14&3N!P63%=GFGokZw+<%*c} znKk1?OA$PUl@Bkh;!NeRBD^-FlLbf&hw&a&?wahrlDdz4$FA1{&fqNtNwfL{3zV&i zwv+zbb|0x1}X~-%-im-swOe^>C@(+7({Ps`1g<%O(5%L3;YQ)y$8@94s4}497r3+9JU-Gx*5* z?3--MJE`X6o*MRzJ-z^ax&DD&0c-MRH`e(;d{a(e<&U*tiM?MK`PRMrge4KxmprC$ zrx529A{O;SukodBUF5n~>a{c7ltEvv>>cL}hF93Vi8;cJl``!{83DRfIJ;kh)scbz z8WZNl?t;PP1fUT&-lB6+bY|9HL>>N5mFRbWUy8sF1|Jk{A4dK{A1g_{%>;u=1rqBc z^)sfo`2><(fOEb?;Ft7U54P-UVDlQEkB|~$o^hc`nZ6?uQ+qeLr4>WAG11VPc{eza z`=!i@&baRIzq&W6a&~6rl#EbMw4qZR4r4|Osk8#BTJAQ8&h!xIkBvbMP#)1H=;Y9L zjc~g5-Ow~tdMau=|F5!nVcOTzJ~#m&ODgvpUI0ZOK@Z5$-2H&#xWh!}8PA=I_ntr= z0cK)il7H@TeMvdEXqa&IWNp)OWJGNZp@xf{s%F$jGP?;9OuE=BGWUk1d<5 zOY54G&-IRPW_%T6`b;ccqVA$&6$^UD3dh%k&Pi+E_pT1OSW-0T((EU{&0obYP@k7H zme{V*_OVeq9FXC?gDXmuW>Cd^^0DeO9^3Ci%{B`atG~=$`yn~VL7bS@?^RPt?wA0H zck!gAHjP1Oy3&hw3-qKU)VurfHXUOF#=g<rin@Z7uj1s9btE-BX44l3R6D);)8MO2&8Pa2n!` zS@W+60(x_CH;Jy}U8UJ?Y{l5PN-Dk*ohE*yH-wdKX2Y!iWQ^Z-@@%OTx^zlg(j#70 zTqnWG47}~)W9q0JRlh&&vc%Gl_gH4uzbQ?rv0DKMMt?JQGZk@CuIdrJ3D=gCVolzk ziPXWdmg)c#v$peEV`~?U8wP3RnjT#+ldk=i*5t;Aj`e+EJGd1(^Zd#^;XpL7+2jq{ zzcD)g0`&&=dq}!g(~ON!fV=$7{}N?`QN6~PM6dF0FLU3c<4DT;J4|os#yI_QPl@%{ji8g6~xlhkA^M^{Z1eK+|sby;q55##+-*8hT;U zJEzucHSxfR-a_#$&DOy0D%Dv>+_TzDl&jC-5tqBr zp{F)hiZa&lv>V;C$gS||d3s*drz|QPGYQQp`AK0;5Pu|H_whloyjXZw)pz)7D}2X> z7Kjsuwc&Ltxc89Anfea#x(&;il~B%^(^2`@P9b<#9CQD$XgP`zefgzHPEyv#M1}|5 zyQk^(6F1Sf6x$z*`|)qkC4hO^A){h(0FO3*$^X`8rK%9GBh!C9{-~ zoUUv)L~n9FrAkKjzs$+&may7KzBmx1tom3YXOGvUIhj4!DFPocm1@<8h_6d2!jz@Lp)33jrD@&i?_x_rJk|v4bKi(y zDdB4gJEU9k{ACdCwX9Z6KQG_Ea4i>byCUoV?9=nvw?SanOELYGb4nlmMWMPoW%WQE zFvB)?A#pRju=4#77Mem0MS=&BM3o!7ql3<6CM!=ghUVi0j4XLG z_h$s}IkQ&0Qw=Ad?y~%u8)g;x_> z|4^lN7L`AfjUvn-Y0QtTVpj8~LwFE2@psq#N5zxi)Iy*v?mrZeEBy z%*p0XCU@6IXd;*2K@j`d9B z_D;k&uakPQ2e!wx8N_Rz66ySawu{{i7U>CFK#Gj|yvFAp`6a~pJnH=*ooWf;knGnM~f8D9g8Kp0)1fC<^RK(d^)Iy4 z1-lu^xyv_Gcl}8qe7W8wg}ViEAD`xt&PK6yY2~|B|CD&}&(61_gI#Zl<2k;l9FgCjCS-oRpY6UjC!l z(S@NO!Gj(E;~xYv3uhrPs=NONC^p(MYvpzGi;()uFGTF?<&Spb;IDV^-oB^Jw=n~k z-Y!dDo<9~7zYkv$G#|5`P$ifbCWVeT8Q%-unX{(p&k-3f#aY8i^{UwnSd*8_Ni*`r zo$3nP#}C z$>OiSmlt;$e*jOuPL3>WWO4D|`1#HbY?hJ6S@r~vPD%9oX&Ol7%1e$hA(JQND@Kz{ zkrV2jQ|e**Gqys07a7Z@IV>%6tGRKjDtq_+IKTWyUX#^3JQv+>{lSxc_7C_k%m{ zdiIOO5}98yqnF}}!*7)Rn3T6zkQ5J!TFeZ3VH<;DFzOS6UFed`mVo1qSTLyZ^HatQ zXW>zi_&Eg!XAF{V$A7L6Xz{N%9lHJ@&+opS>N#BA=Vlfj-=`dn;bJ^}nW~*?+1pjt zqV3zD_eu>beCn{txRzI|++?`N%+js;9X@G>F>5uoJ$J*4X#0_|c)#^NU0uEE`fZ&; zY$u+E0b~AG3gwXq6dKApkR1@k;lLoj8>L47mT6%1bIdk|swXs}QFuO#@ed)798 z-nf@ktv)=Dzv*lYQn)GHY>pL|S4toL;+X7@0X*c2^{xcIC*b$#38x{>H&5(w*B9nZ z6Ti6hqMU$&x1K*vCPk50P7)M~&zqxFg|?9ygWr>S^|VGrOuTBj{yS>x6M*%Ec=giB z+gCMtJyy5I)%yKSHMsrZXVIxmUT61zcs;8MsqBB4&8KZwDnNQZsYmWi(RY_+iovTg z{pWC@>bAmoUxcvOd~E!|j;nZUcnJHQ*o8FH;!H5>)~IZO9DMn#ga-GTnm?DqAY+nL z{f9YVwwLpTK_zHg8S1CDe19);QIng!F2j#G zWQR7qZhADkqbIaPz8ZG;%YL88HZeDRDq2xiR)QoU_PrK~+Do!)tgCW)4|6uh#B8Q2 zPd>cJV(Ui9sP|Q$G!KRqKRg&~hRo+SBu4Di+d*yzv5bGt7!cS=Qgm-98apRkhWEww zOx8VRNb>!mWi=B<{`N3sqZlwHx-x!%Wmg*e{?&V>YD0Ej5MjJ($wI;TEB2o^m?A!- zcj2KqmGS<)O4cP%Lq0tfX}~Mmt{A;w7db{Xo!2Tr*0!;mcU(<*88@H%$kNGKcMuc4OvP`tbr=%09)u|$}HFVSAtu%Zdgf9U@<%#H+HD{Cqs89 zDO%KCF2g#We1+uw(?2@$n}$ueW|FLn2rb%rT2+H}1Y$M?AX&%WRpch42{cjIUxFUw z#%a&=iS9*=AX=X(c8ZQDXRLZG4dK!50N$dcH)OtI;dCErDC{*88{N^rwencUIr%m7 z(qAezpA!@Se6D53o=Zv;E5gPCju<1d8^x;EKog$6bqbdpqJeBGmDtm?zO2hKJhZ0IEcNtM7=Qz9rW04V()Lgo1eF+-N7u7OID&CzOG9N9@vH7=> zy%!Je-$Y2KXw7nO+aea?7G--`rg4ev;sWP(*(}n6yzf||zYw9c{O<2L1*@!j7R5u0 zrL%a&OHPj&V}F)80a~Ag1oZ4d(#sJ;b<%tz&0T(@vDs4Bes>ZgMozn#Te8{Xo@{?0 zIS%2_ul?$ioo+J!s@cQ!ZHI14?84h@W3*FvVJCD7hT#nFxi4hq+Ff93Qc)_~08?xl za24kzQF{cN)g$n2UyQ8fzEAOxZ)B-MVeuh9O?~oT3${}-i4@Ywk49_W!a4*ozqmsf zK`o}aRKBm(32NuVPe1d$XWf1CRGnQJe@*WGPQ{fhd?4BK03(FTVCzvQ^;`J)6t$1KRVgbVoGMd%q42`Q%EH2uQ?5ETw`8NCQPgk!$jeO>(P`eSM0ic~Yd z_YwDP;S8!RZnZb@&q>>lPZGy2Z2k8bdyUhOlL}@`DesV<*Mc~HyMf`5w%zStjALon zfR?1YM%`OkmA1H~)#p2T+KA}0t&JtyPw%EwH@p%&T0%s{@c%j-eup=o{5KfKtr+4e zVKo+3uh3nBD-wRI%hP&Bum0+6lKo1nkW88D% zEX+IS4kLK!kqGgTBk**3*vn+U-5&Vn3uL>s7XG?)AoH=5y8b22WQ=EpZSj{(Clk%2 zseFzS!NDq>T<3cr8MZ#OQ^*lz(4=NeC{QSA_Y6Z10P-Plqqgl--h6q$9 zGl+1HE}YB%#=a;h*iLf%$#VBa{GQ05H>$HEiswRk#^-^`F#5-c$0y+Z@SB$qovQsg z8nk^u9GcybmBI^6OJ&tRAuZu5_{MFPuZ-^qWo!UGIFG0U=Ek_40>$lkaE*<>~uvyL037 z`n97U!#4A@T2iX}yYFxC_h3Aco%7RqQpV{!#Cpnqh12%T4Rcn1;Sp->$=OHX8*wE`GGe0y5D%4|nLjMrlf8NOOuI+5FKAC&H?&9&OtnbUH3* z{5DMB#QH?ThaW~qwO%so5`X?f11b-}22YQ18W#&2{|yDV%i=HIcryFw#BK<1QHwjp zFLeXcw(F34x^drgl94`gOQmDlWcR7zU15D}ZEpx!IyKytE=9Qg`_jAkg;a}m+D_)NIarDxYUZQ2%Aoz%%oP_=zazoEw z^Qdg1kpgUc^~%%^j4dTX+~jHcCr-luUJIfQcpYX4EpNo*0TDkbCYi>_>1-QrtX<2= zk2y4$b8r;JDNOxQQ$H^Nma1aqT74w2>Ozk0ibi@qb`~$5h*(jXmplF#>B;Jx943_M zmB!cH(|awHB^^rT<4BUkMgtG+`kWCz;_a~XRc(Xg9^n*xo2z@qg*`rzX8@|-3Kgey z{@j6*p{xt_SQhA+6_>s!U=2@y?s|A{HK=}ri`C-Fq$oi7he@nF{Yp#yf*nmzevJ}O z$c`Xmki@Wt$KRLtchm!F9DX00yNVPOqVzB+;dB)V%=^&--ysjoi|de!Zxn8eKtAa= z5r2_2icr!}Z{TJiAF<212m5@rgKO<|wu=?z_Bmp4^lO-$N?5A}>gHc$RIt@DMv^c> z$S4vcTI&QOD|Nq?lR=hGnI0n6;%mRWs!<>;?8gz&V=#}e31sjDy289K1WC3H<;1O% z*7_HU`q@k(2n|ZUSVe_TssWk@U*yie1iy)u%!%q}V!8xq24UogE2$1Qbv`}gcw1U1 z0}s4julbx&^H$Lqg13IRNZ;*Pgu|p!uZtW?)Jj&l3RLR$D$l;rR3-U7NWB-P?MNKK zl@9qLBH`fbtne0H5SyD6ktY54Z?Z}x#UkEBl7c6Ql6OSxzZ;&WmtVd^S7%9E`+4$S z7qCZ0VfL1(z{^2T_6u5UzS2Y!`M7LtlH@E>(J~Itv%{qu)a`bVNJ?)tvo^dC?B?9p zW|VlUvGTqXx~;8yktyUD2zpnB+3ahXt@oZ=y^GR&r$w+5u*NBUW#UD;sz6@Y>J^RW zbz5BO%jg?(c0kh^9{9yFG*z9{lkXx=7)p%k3ZB2;)MwLppYv;|UaA4TT}tJS|88S@ zCU7~#>dblD$*2v39U!R9v89>@jEv zwd<1J@!Uf!uv3*Nx63rI8hWk@GD(Dn%cXhrNcr%0YGWl1K|&kyZXKY7r)KLlV)_Cr#OgDVh-wUZpHMv;^x>Vb1>R zMD9`8dMxB46Zd6WSG?iJ_BIh_rE(z654g`q9QpMyI6>wMsiSM}qxLcSht}c8q2pD( z3*P%Io4~V9Nz7=Ld5gyxoYswi6(8YUuRorLjf`MNJA5mZ;xdL6qQeEP^0EmKcNRna z)y27Z-~ED?MtnJ4(1yGkRYr5{q+SuC^G4z!kpH~Iv|Icww84z8X1P@1Z=EFa-9do< zl`^-<3D0`F>{7p2{53M!m)2CnnhL|dRFJ4Oduw;dYSQ7=rudYtQ&UBh?3~VO22HwNl>`8WXLNirrU+Pa5^Q5VTUYA{YIuq zCmPwlXxY&zRk+qDr8o~Y2koA5EpjF&JL!1wsfzn#qE|bD@FwU zP`rCAZ<7wk?HrLJp3{ouF~U||zM<7ku*POt{zo^jsl96MOazaU2aPH5Bd!i~G5*5^ z-Yf&nhWM=i(DuOyZ)5SQbznKqONi5>7)jMl4L4ttA15;dBbotH zh}mvo%zfMB!1Oso%MI~f>YrV~VUKxnhV)?brCtwVwam~AcetRc!o?qwBjMc&Zx?XacJ!+D zY%BsG7#Pz4d0inTuoc~lD9TCCKGmu}KW^eqn#gb>7QxyJiazIJ#2PM^z_~Z&3~Vz7 z&i#UPA$h|Opi-Y2kAb_RXk*k9fJ2%H?JtTw!90rMPK>w`+)TM#Gi&NHqdJ8$jT;0B zqN5YcwhRfw*Pt(3I7j{8U>tP{Zxd%>o~c1e^%n&tJK?6R5{_@bmy{fb7MM_$6s|vx z2AXq?w81WRBZ9?azp0-C8wLM!Fr4HxT8^aJL+0C$*^5uSQ2%BRS~F-LsrUnMU8M`e z&;ub0sL`|OEh_B}VwKc~W`f>McBSJhbpC4Fz;4bbh4rQxI=N*Qbrt^QSTW2C^kNm7^2_#wU zLX3VTb;#ydQ_ghk@~_|ErI%G|LymL2mxRqgDW_}!0vn7UNx%it*~`uNVH_d^!+F1C zntpxO3h&MyUuv0a3mRt|N-t1&=8DF1K1HiUGEy5E)ckkqY5j&`D1J2iK2`O`eva2} zgzySYg7IN5ci5bu<7JX=QpQEdAL)y?eB|^Ci6%Se#tBWGo<0$eC6=LI{4FKu$C+X2Vf&YG_p?ZbzW&Zx4GlYxP-q}-_YQ46UmQ~8uR&hyRf*Jp4~uMr10UkU)N11}LO zXJHqG-kMm4pZZp7@1QMS{CPelDX1kHUa#qKwF}V^MsZR*wZbE0f{zF-ubZl@*g`-% zMLBIp*QISUejY>u=;2HPHXsFD-gs0VHv+R5f=-4N0S%7e^ANfjjNNnLRzQHc7n23f z$c^0*{Mvnx|54KMU2@mc862hN8hShka*uz5H?n^9_~Gzg(SXu7_agpj9HZ1SBL{Eq z>eeM!XTt@OoLf20JpgF>oTBZJ!_N6 zg_D&KAeZq__MebO@D|Rcx3adE2yQ@}GGH?GdokywU4i? zOO;AIs#akb#Wk*OYrbtaWJ{7j{^e!-uU-ao1j}|nl1<^aS!@xZ32-5#J$IjjI$tkp z<*k+@k_S?7XAyh==aU?#TwQEZAO_$4_8{s)F2+$UkOQF}BSthK;T0R4T;ojO;O&xF zn&8qqu)wNU@aBm)-x3-KJ8Gx;TNuLkLU!K#_gxN)j)Uo!VQzo3%@=%+_3*+uEmgjW7PDuCVa^et0Mz;BjkeWs4 zG;eI^oQKfluvFplQ4!ocJEYG-Py|^9bpK|fd~J-`9xaay|ASMS=Kl<6o{`xCjS~YA zk6eJ(pJ=(CC$WTQpkKGlf(amuVhseHB*WV$+gjzD%Z(HPZj(4eQZL>WvkQdnkUP8o z*I&V)8P`;F&rM?`jFl8(26wf?@Z%%DZ>0RKCJd0g%{&DkzKec}vx@WUp9yHDmw2ee z(Jb5?y@(5%Tg)g2+32P8?7La*a5RY)42d?r95MLQk9=A4>}HO=BE$ z)X4m1qSw{>>1}|3FK1~sqexT3Yqs5m$Q=L9P_IH#QX5+31aeOJb&iD#dE4BUf zZC{2rsy$UkBj@`U?81b*h{v|v=VafY+U!<;Th3c`>4!_cnu;)4pbpjttn+Pl{+zjf z?ZF#fc&J)__P|?|TQ;^-RR{U@$#PrVN`Api2;{supRwcd)k$2|=~H_;T&s0gf{mei zxUH%G5@trHjq8_PcJe1p{x6aYwa-b%CJ0#XnY@y z8a%Vg?}z7|jUe^Y!7>_2JBi3u&D&)|CD%MP9|j%|=%ZeJ4LVL}I}zj!iF19S6E#`V zpclJM_}Q;<=n4ZcYR-U*_AW(+W+4WM`u1ngV@addG7P>fH{eGiG+O((5O zqbB3-E5>6Kgj%2>De zGiP_R$J?kothtOWJKg4wzl&&b>M+q`(wB{FrXO5?$*4_Gzw;vVVt9JQT8_Ki!(g9mbqEVkh(lEmstO-ygx5wd_H1ycV6r4 z*!RrbU!bej?NRgZP>=0D%AVF2pCoUuaqib4|5@-2wI3iP9;mXSbGKt}u)SRMU;_Ei;Z7J()Eex3t_(Y%ka-UY zv$0_}y=(=|x}qg~J_a3o5RM~65OzaBHkTh^roG2ZQ9#AttE#o21 z;9>draRNs=j~0L6N(+%?^WU!hF(_&eJEDNslni(FTL!{N4EJ~#`56X1LdhtXO< zTfGLeE1!=0J0#H&sx;WM!H!5;QD|~D=5ZTiZYn*VeVHdBCH=S9HXGSm#tD5np-~Xg zNj#T-+>;1f!R4y86sF`yy_H%^Ofn-c>FN$nvb-|*zwn%Yhv>&4&{f-6e8&Mk_w1UD zn|jKcU$=-2znguo+vO)bWazb3|Lw^_EuP`JXZQY&Vz{|$kZHAGLD?cxl{xwiSPIF5 z2a<~auc;BI-G_A5X;r{`sWRl4*8t@@PrRvt&t|foBR+=n))IVAYx%pwia5#9hiybS zWSK;mZE;I_HX)l+>-UHW+r2_u$jG7DiMmoQ>bGmOOGw-waKkdWyYLQ%eTDkT(G6zJ z9U;i)-hZb14?^G@wAGogHCgKUeFPKyw=t8)(UXF5wUHn#LlI;5KJu&kp%k&@A9aL; z4RI42&JsB^=d~`n{1y@Q(B64+4CxCB9!S z1Md98Mtf)hTYT}uysDA@G(n0()lL==@$JOuf+D~~x0C0J`+kHH{OPMQiYq3hBZK>% zNHVC(fEEQ4>vYrP^{#j!Q$0o=*^-RN-Xp$wz0~MwEnDM<+Y?j(AXe|x=(?V+2zcVO zg)I31-Y5zN+WBdWm6_Xb1c9Xo-Yu8uaLESmxCg>djdhV)p^3nxp zfi|sxlUqJ?+bW3r3Iy{R+=Cks2A9*ue6r*VY*&#%68J7R-r+=4MXhLj!Kv{LMBKi> zNz!8~W&of9q<9z!pPqI3H}-+QT>?(#uhD&P6jy}b6Suo%{oXziLD_wSo;nJ)1~Iqt zq(McUFbb+fW%ybsvKnokisoO`of5Hqm0Gs81sT?&B?NFIN+o55ZUClPh9}jQxY;sZ zt1a$Aaq^68v@T)UC#3h-Q&8!mZ#Y!%DFcr8LGBJ(!8THXqqj>qK5g`$yQqS-S-`DJ z1i>Ce^8cKGU8L(MZzk~GvAlNvDh{oF&}$B9*eO+TU#o1fC2_FbQXHJvC)kxX7BEYS zdHDPnlbHgnW2QtaYUq~Yq(Pey?($oZU@LMC9Qo~ta<;_GZpr}pxscV234^@yum|i& z!|e^iW%=>Lz{i64G%XP!JmY_0!QI+_BFeY^pLdE- zXw?@jHYv`P{^*nF6JWK2u}0D-S)fvztg8%R(vkze2_>oUOb5|FEQ4fgKT4(`_k z^ReRsm-j%%QJk82@4{bsM;E^bf-63R>pD}$58r~s^JwB*6%^VJBaufYKp|$l)y+#F zO}R8%HvX<71Bjjgxpinaq{7M7R-h&r^M+DC6RF+G9rzkgWB4-WA zi%OQA@)0%mwMPHIJHMIuU+HOlxDwrs&v(FwpZH^$hkz;PH+i&Z>US@t1#jMfbycK$ ztf0Yer*iH*Qo)Cj(mSk%wELEze`@|K4N%~lTHfP#*EcEGZ8n^2!dLzy|DY#JCHTFg zk0%UCXuF9bhyx7f{ye7Xr{~pFtHiC7W^pF=|87a7Z-u)3W?iOlFY;((HNbrHUHJ69(?SApp|0Fr5{G@-!s?wW0*oMG7DxeSBVMGI-jC z!I*yw+%PNDGr}vgkZ>KI*-V8SBmoFp40kJ+R|zIu6Kj)S7>y4%6ei`Zkb~dg=BREkG@)l*>IP5MmD-k6)(-9%rf!pJ`rYPo%k2;LnZR_DOkSK{VR@$SQ_5P!ZEc~e!=jbO9 z=sX*=VQe347teH{A<{Ks7iu-fxCU z4BmOq?9nPM8%Pu3#f3mwU?#YU%jO|Tm1M9Hqt`?UEpI^8@gS1QXc^;~_;4*1#RVm& zo`%_w)DPt0e+lHBRm_WT8Kox=AmN^6vM6~L@GXj|?oJVtbyyab!GS5(D*YQ(f}=f2 z^w{=SdUuXNGW#ZLLIlsl6d&38*wIV9GTTLAc!4hWTndk1A$LwU30rE*>QWtITJ-}=G zm9pbK%sn$h3TMqeu%kvstBH6R1%-^yC#p#Y;@m8qkjdgs7&jU8;htvFW+Vxw!MslQ zK2!&M(`msxe-Y-HPL$xP4gPGT$841X@~sdfadnd(N<#~GPz~K{lE~Ym0yz%Y$;l5x zQJ+cWoW&wXZyo@p64+?oJSaBc~D) zq-(Ji_=O~Vr|nsWEdw|tmICish#WGl0E~HZYe|W)qdJ_uBcS-!B|_8*@?KFHQRBnI zr|<%FxoKy*Kov$%p$t2Zm7V(og(Z$an|*`}^a$nVw%lMokJKfFuCUp4|D7xhfX`(B{%z-&?ejnoL{u(@P{tUn2uMX3K%0-Ul7Y&)% zT*%OyI?(haR;wOJB*mzMUQdMPc_<_ADnm^lSYU<+fir(EJH~}hyubZdJxXM(-1oyf z2(;W0a|((3Q+4I{O6~?PYSDV=r`|VMw_94Bi;wEm+j*c^39t z`1~yGX1!-m!XJ%;B@OI{RNn^+xP3MVQ@iXy2uksST0h-w81!N4-L&%&VGnT_$^b+%x=GkdXlT zO=lJ|^8weRISx^Vqqwx@xbg2BXy%&V@hAzjKaXwNW*u{Y_N**c^3>QS&ibOkva2a9 z=^3DH#{VUJn@4D}$gDN5!yHYQ^BG5qC=d8A=z`h$apZIxWG&e4E*g_?9zKQrUVg*v zDIRl*eMR{LcXj;(-f`&+VpBh0Lq*D+oVu&*evPL(=AR1A>=hgtV+cKc1&BNWofNj5 zSPxP~2CxU>QGiS}n7Z^+K;m%^l|q>S@@4>UkPl$_iEvHA4AlOUPD$4nevKoyR~rOl zB#XN!ibd+j4_|vQ@!7X365+<{wbM6M(d092@ST;G!A+k?LfEn43rF~PqXby9{OZnj zoRLn+`KVzMvTy(LMz;kbU%D!++F!>nx3J<}Ny#6rP$J6~!VZRIkh;S3X$KVlPLuAQYR#* z%;nAFQN-8%f$)E`bR2!``7RQG7HgihF(TX_A7OinFo&U#xjgo91wXmI@;l@no&P~v zW<2fi`T9NQMjYcsn>`y}d=6k+{eBv!&?g!$gc69vf2A&YAo4b9QGHwzjXb3#x3vWO zE#r{P?C1@fuQzQW;UQe~=Ziw9TCS-nZ)C$O>9G;hoAS4!f(~2iz-@#N=&t8*p zEq@#G0BdtZW1r`U=W7#5NUqIH{sMjsMjs<@0s3s<<=K6;Nm^h8RXGE%GVo;H?SYw0 z(bhf5PyQ%}jCfszEWGS$N&9|N;MLJ1bVhswzqkklO96eeuvbQ^eWk&70=H;5i*D4P z8M(n-m;9P8u1vQX=+*QyOfu*A36XcwTmlM_40q~ zqyX9X^02kuMfKZD!oej81*MK4@uT?SQ6-tpZcI(94*A|9pW?9*`T7=uZ@Vm=QX>k^onmr@rGTb2p{}zZAoqRtU<+Tl z(a}zvUz9{&u$-uz`ntuS=uL-_Pge8(1gSwrKZy*@hIn821bAChx*Jsl$E7>S#>PF+ z>4Hx7$S}*YK$?Ki(G0pj_SF8xiWkIg_Am+EQy6ii2$#N(8%Ws{` zslI8Lwx#M&PT1%Zz7#8ox2Remtz z3^cAx4H6l0Er9kZFpjA>QR2&3*%N9x3sP8U-QNKVU+86NcbHy9&D30F0IB^5cm=PX zX1F6b<5#MJOg-4g1ytfC{V@0j*AZ>wXd+_`NHLBz!7bcKu}cLV6QiVNE}5oTfF^lT z-fazS=|o22N{v6}IGCjM3LIcD`6u%`Z zF)m;sPjls^F2tT(v}{6vH5<~b2(H*5(-tPe}szh+LuBlu;LR<-0p3PH{THo;r3g~UA2?jM9@ z(^hf6U~kbIrt-7?dXcd1wQ^~L(Hd$W+Mj{(^nTu5k_z{L+_GY{KjW!7*7eFhsI+R}cq@LVx0P zNzL&CgezZ|`FnL}-MkLsV+fj5EQD*stKf3uC9bkoyqN;Jr7@!=H;r<->m_VGoZYhL z%;bELIaPo{@UkUu&lfnzxt~-1S24-`F3&>Zj^Rryc14_m;iIx?TvNma6Ia24y+2tR z&VbA;%zX*{^xTN4A&*qkrT?7n%)B*>_xSQa51ap^F7vv>Y4C^{Dcg_CprKomf?@OD zoC}18q+<8Vw(C=|4_8~pu=82&%zr#l(f)or>?mTfKa#V!!3-7MzgB7F6c$6QatZUS z4*^fU!X!tbV3A51%lUf5m0;k5HZR}x7TAsEPK!JdKIu*Pb}uDIf0FRSd4Hax;v1__ zSH+6JnIA88nZpldx~7cBXg`B?=Md03WFiixTi65~yLDb7NR_lv5{w(nuv zb78c^h+SGF5V6Oo9Ll$qzDTA7_t;cW_!z^o*)X?&t#C< z5460lZXh?Y{0@t7aP%je`S;G}Qgi{dgd6oXw5{`8A#0BUD7KC+ zo)V1v&4cB*j3|U7dlzFef3hF3x*jFuZvqwmynlg{Z9E5UaI`CSd_4!wY>_Tx*;M%K z>SXTmGy3uQfre!X{L2zx3gV;G&6XzcE)d55M1?CM4%4_ya27KHXQFBg&I<*1rCOD4 zk8csag7Gpb0j8)O3F3W=izs)7F0%)h)a1#{zzt)}t6fqCC9xTyCCA+J+=_UYD%!sgCfr2><@ zMskQG1DQSjds--gS_3F|6ow)H9=MAI4V2vhvar?aQ^c0h;q+IV`|Qro%FRLv)5JQl zx~I z3{9PNpx3$}359@s*I^&ryczVtoV|u-@2q_<@Ovrr09z*)B`=)B{V`|l6JhDG3yVyC zbHVC8LO^jIG5YU&9g!lU;V*f6qgtY2e^G&yWDvm>3bFeA(3I-yw`fTt)^*B$Bz!6? zT3;*vbTZWRtbjT#dgr>B)XJBIfHGU;&ot2(O~Y zEkgaKw>sR27))qoUbW*!;97@DE{1jmcFb=}+%K0)=Zwe&w?0L_&I}0GA96U)V29iC zD}L|gVCGQ@xsB%?A2xz;nG@GMTVzWQAlG0 z&?_=;ID*Vqy&hV+Ez zyUli{iJq(ANs>0U@6 zU3nyF4=W(8jcFu2{fRV(yQ6meDH61vg38!4j4kv*;Z7;?F1ACyq?U2H45W<2F7ZBEA6hbEH!|yihu%=l;5%U4w%Z(r{572vxNbG3%cpKK?9{vl%4+6vV$qaY!giuce^u$}Ci!UXNO_GYK9KAT5*6q;;b+=|=S@og!P( zFaC`T&D)aUt$Sp$PKQkPhLCB^E;9Rgn9SGBA}jZ7vg{B`R26<6I-zl- zW6Zu@w-VCue!@O?770dQMeUI_sL0uhQpE`rEq6shhb-h2)FRW^0;!i9BKcDWl1e`# z{xtKf&n`gKtbjERO%OJ#F+v@45O^&R$_+>1yXi3$!95{6bd2{3zW1M-{jAM@?;IpT zA4pf`K|a73iW(vO)`uhDX$XRfg4vJ%iinpN5xL$J(b2sSvmg_Rku#9&@CK=Z9!Nje z3^|joBX3?V3g5p)ad`KiU5~VOMv+dN2c%Q%MS9%_k-^*nWVGr78SOkqrekZ#bl_>S zs69g#`zMf9RT5d3=8|o01G2Te!&f0^sPI0c*)|v?V!4nUeFdRB}G`ibSL5l7ng=Id+@E z?@J)ZM~-Ayq$c|oc4XVSkgO+!^8D*emWgg;n!bn3T_2ID&NVW;dz%b9Oeg*M`RpTX z=RK$^Y3r4caE>2ooMFt)T#cHDS1335fYPcOYfv10=CNBCeo4 zqJ#DziuuKeE{rWc`pD~y7yN5i!QXB;e7Z89y{i*spINUrH1)?Z|D(r{jW>X|G0($u zd*Q!(F#_bb5j^JtLiRJSUUm~vbDAP1MGFZX`8V1SDF^2w_1rpS&%TM=+ow@5j^hJY zSCks9M`i2DKf5mJz4%H7lX!0l=uJkEkID3g16i0yk>zi5$zrjJtV*wtjiCqG#hfCC z>tW<@xRjg+ULj|rPb6B|mYnmhlW6Q+a@pO5M1`d!Do7(2>$4e#zV307?kW|`BpYS zz}cq=-kZq$WmANk+(Fb_)NK3FNGiL{1+P$w5bx>{c`)8@KCZeQPjTykACU z*)PesG@lI5ts}#s4y1oJi1aR>BrUfX(rR~+W3SUBIPd_~jas2%N+L?8EJlIt4dg4d zkTvTyGO8v)-C;D;y-X4B>W8?&#}Or-hVbAq2yex>*3z2@+;AFxiHt+`VoY+%R>&HC z{8^j--Z|#KSu<>q45ddl{JXQx^@BS?mG2O?l6lL{W1-rUhPd6jNO<`TDHi6)c){4E zTMOizK7;&+vruY1fcO3-jQ=tw)^Ov`u15wj)5!44NHRV3i0yKbEC(5oRc$KSY|0^r z6M^Jd_ZB%{uqM%6S8_RRMlLJb{Oo)F$T@N;0EuqvlT&ayIeIC{;hu!-*YzQrhBC4q znnf1YqsiR2E}2c9#rMl2GWhn0^er<pGX~fN z1%_vsbJalh0*)KrT|sIeZzLRzWc@<}sI*NG+5Q!;Gm{ZKuL6OUz2G zpK$z-wEa)-fmk&SvfyU$4rlDUW5SZfuQ`32;H+9;l0-)+SnJ-gYF|Ckp25+ zo=CmXlYPq1$U64j$1F$T*S9Dc9)OCu)~GIMj@q~g((rsp+NS2D{Uw|9muw?Lz4l~y zF^fzG8!P^h8C5y(f~s=S0%>yG~jeV#c`pqNch9s`idR z#o%2i)w_X$Q0}wV1LW#mMf&sQNNMyNlJ+b>g27_Mni6YJpRwlgJ;EQKL5Ml)Kzg== z@BE@mkuWG+JQ=6sm_|L3HNy@F?QsmDD~7OUvOi+< zyC7zpCE}02LDB?2r12V>`D_VttotB8Y8Hy!l2O)oC#q6UqSiN^gv}R|mdjew8B|7k z`R1f==1Rs+MPy=>P9`zDzihiiR=$tO`s56kZ(#X3= zf}tHy*~OiCB|nttyh7n9bL5IPBJ+7~q|3^XlvR!dnF(UcMOeZWCZwb1 zM0&N4$Y|sZGKsiKW{!GfX}^K2oSKq#+&pr4wvYGuOmeQ(BGIa)e>tB2>gObSc7U8q zs>q>h9EbVlx@qbKLbpMA~W0Nt|#c&6q)>Kp^QTYZ&WHV!fRamWsDdLlo zktE)Ol;lUq*ftGW(SuMpCyhDZ)+n9)hB?aPs10KOGd!GxW@^%U?nZjoA8^bcM#ct> z$@KgkGTV5CES+zW&C07}6StS_->xL*4P8mpXVf2Q>%ZbXBx>bCPQ&uZX~+<=J=~M5 zhU<_;GYc{=ct<83ISwA9N&1_ON%xEgX)9YW=68)WR_{k`-WIZixGjv=E-ROcVsAOA?7{@#1YIj#YToD9j)x;xo6??#q|cgg&WnoJiKk+E|) z8MWy|da9MAV{S{@pH!rIxG4$b#i%yBfeI@*iq~Z#f9q#tvtOO1)e9NI>qx48k3`-d z;_7;GjsxqiyR$}qq#Pmrny^nW34YCYz_%A`-^UT_Ve9<0HiGt4!n4coIghNbTFThw zCeA_OTs_8~1Fx+_XtQ{PEnUePliP@CGX?SIb6LB(8YyevAtP!UGDjXo-kTT{Xjiem zMUC=3$*46iC5=hY#c^L@gK+}Yam%XpGlT9fNa#kWT#k34!)bn zIqWvM%+mgA?fkDiPof8!CTt zI;;hMjG*2d;b+Jgf$A>2uU&;S&m0opW$=io0kGpQ`w36o6i5sUARE^ZirTlFBNM>6 zk{5Zei9zs9)&@6SgQ(&!JVzHI)?0?;cZZN#?;>k0Cm_r81q$wWMWOCpRCKwIYU7!x zt_>kg_tvEC#Bp}FNancOlm4RMeo66y{SLhdgznm(FWvv&VWP@7yo6u z{=1%&%Um)02J6V7sy*2h944zhQDm`p5Sg1w$tbZg8B|4)-ms&jv->@1X-AXhgFz%{ zSc|IXKxxNSDAut>{-S%xI@=c+S7MN|aUT+UedOE*J49PDx1+3wu*dHal8}I)Ehji% z&IrmSpP=xq3#n^7q|W`}<#-%)uiKA(hR0&Aq0o}GvrQX9_IfFNomp=dEMVUI34#ZV zM#z~OL=M`D$nSYAhw>4}n%Be!i;=d=o9E2|=GNb%Fw_GjzVA``CO_Y(`{q)ridN2*~1e3$m`5OZMN?s1i7r$Y%;dFK|BOK_vnu3R3NCkii&i-k9qsvQnW;dkZS6)TkQ1j|AzyCq^6Doo$h3@&@X? z%roW{AT|kzuHJ{Jb-y9JF5|_5G6d{e&AB{_S$BB>^6Q+N-AM$m26~|CZ$I{v>%g3V zSKt>&=FfunhrygLTm$9kh6vbv3PHs-2zl&+@ZWkv)iEBiz1`VID@F3i(?~nf1X(Sw zAt!Az3hJ;<=HiI&-;3HO!$`1JN{@;%8 z(~+0S={4^&quc-3reASPE(&hPVhK59s>$}kHL^N6pDdRg=Qg({<2yr1Ka71ENe=0} zJV(NjS4q=Ij;a%DSpT*IWseS_$kl@5PzAEKjz^lq8P>LKMS`OPW79X7cWa2KDd$-y z#(75?fy_}}gx>{85#l9MALWiT)#V#;#_~ZZaa=#v$~S1i_b?ql{(E<%O&8@#_ii$A*v& z41&1#f5N2T5%~gMrp#sE?#Hps1^Ddk2<0Bm`@YC}o>lyvlifMzH3u=N-4VAYi|5QP z_Tkw!J2oK8UXGlIvnX735#`VGQHd@jQ1W^te zIP_s3pe5O=7n0MlrzCpPWLJ9R`Ui*i(MEu6hh~COM zjSg!#mwPNiY}X**ucwg9sN5gh z^DB?Zg?T!sxmo1cYcJVe9!FNU#*ldx&z(jb=gizgdc)1wSF^wa+!SR$M*cnV{(ZRl1QsN+1s=s8*Rq^B4#BcGI0W;&rLuA=V~PdXd!iI(f2V#&h2K!kLcZzh6x{+3o+a%N~MXi4Z zDx1Wiw6h2$Ha^Ht`wdy`7{6(H4C*TpND8Y$!h_R@F3Dpql(o5IdLsDka|HM^c9XXf zzAjHWcZusuxcb2B&Ukos`!n0XOMel(t}KL9KMdZH-cU~9S~5D<5IFrILMD$yg#9B# zJ_&{D!BWJvjb#kH9#Wv~o}zYE3Td8W4W(Z!Ys`Yl zpiwh2u5*iwldq83*dnr8FCm+nS7aZYMxu`G$YtfWzZ{=m^_*P%Kaq1hk;B|rvauUR z*4KHipV~sk8Qx@AK93B%<4HG;zPFDxhf$=lXE3TB&PDk>HzNMdLh^P3JUpNO*mrn# zO5*dpAGvT1jpuXW>mY%jl@I|vIwCmcFv6GjM3g})q7Sx0T%SQmC=(-f-~gmMbVt_q z9mt=*i~UE|1J1}mb^CK9IJkr~XKx|x+=Zk&WdZ5W^CaVT94AbjN@l0M$!h2^vfCd| zj-GePXKQLCrkUf7P6HpZSp1 z>W(Dz3M36HUej`~qwM1j6s8?SevSw^mJ^UZp&ioZEkQDK^a;22LG?8Vkxy?UBAzju ziX;S$+6w=@yni(2npd7&m#j0_?-SpHXX~v$wg(<*W)Oel*z_#diL(fR&$-4>zNm-5 zPi_bvs)L9XRfxF5zJOyeVy_QJ(&GZ8h!c?UyX!_lM z=JxM>O1ky;vR<|q87wzA6EEgVUZOLmg_0}N6X%kuJJC<|@H6dZB0SOlkB#pr>P;+rH%C~h#u^n@u zTc08`+?+ASr%>7uF>n?SJG&Py) zmaT?ov)}Vb{xk;g9Km&TjAlTptq(cZVDed~3BTwn1U#CFP*E3z7feCa)OU!TxCOBV zr;*(D2~wNfL%MrAWcwJQU{fLrp2VTNu?H&l2Xk)BCK9$fLD~~rl5TVi>&jWzbbJ<> zYONx3y|rZZPDr*LlF45Dn4I^2C71Rm|J0UW{YWD5X%cN{OO9)wl5IsRvNpX)W+BW5KYE&RAk;bgDg{|WOX`?94@pWC*>Ft z-COfxdw%6HiKN@eX=@ePyI&@&uf}B6@*A05;h4EeEg3FIBLm@m(kA9{XO1L|#)c$F z_`U5YRsDwIZl%b*;)CJphgt&wzNIOBL@kQS@r{P20mdtHX2^Z6)CI)IAJ^HANXDd&x`{;o+c(z&sV z^it=O{vCfZDqc&b_dk&3koRP5;YapfYI11Tg`C%G{Mepfc}y-1naBCCk?i;EBWwL- zWO4X2nG_bW{*yI08(BZ_Y6|E0%p$EQZPGMsgqknzsA{qV#aou3Ai|n+>SK{v63%+C z^+@JAFiG9C5ntyhR1=zTj!re-=S>h)*b{*{QH)tK-r3Fu-kc*U>+-v=3eTkNKlY#N zfZc^>LI@-SwnFZxg733y@GIwPiZcNy2Eyl)ThSgwn?bR#^!zJ$jS{Xeq}ePX}bf$L3Ood?;n=J4&f zm1~Ecga39J*KatEkmToxY~2b`XWk&rJr;3^t&rrrkaM0Eb51d16c5{?@QntFy*HrT zCIPjt?MZNE3JF)$B`w3<%z3sW1BcHXyImubu5-xzYB5>%7m)3jVsaQ5Pfk&*$mQbu zAKUaRj!E>+h@9PP$nMQDviXolmJMdIHfj_Zudrm@S`Fuj3?khzBT3s|pSA2xq%my- zV*;F?J-!V}0LRQCRisr7ggTb%Tg+vwtC1FK3EdH~G8LiQ*CIrZ^ZgH} zalOg{_^ka3*}P|vPCm@FmMh_L>Cfs)fnFbhm$4gI#lSk-DtJpza80VizheV|?OP+% zM2Lv;_K4Ct#mtt7J0 zBd5JlWOKQQY;v2DRo_-*dZrB-m!*^8kmaO5Q$e}|Vo6)yndeO+YLh0QMqPpm-^VE4 zmWup$F39#@k94U9QXZa1VwnhW-J2nL+asvn_Cuuc71k?pEj@8O{N!JtES&+xllqWz z{3Ff(z;(v2gI>=4%Q1jgv<}4K+ad2Lgm=qJJl{^iukT3a8CYY}mU(G+TlS;tBKmq1 z;!aIP;v&uu+P532)EzlHSp&pcwBoovC=skjxnGyxb2c@0j3wdw7NoO`^{f8R$xy`F zukp*t)VG*5{jbRK$vLvV!8*a$yq3%vLM~>uf7!18uIJ>^;1N07_a}#X+sXFKL$d6$ zi7Z{7k;&Y(%xy3pxS8#8lt{bdXwquRIQ!6ZsM(jo^(UAgxG)`s+gWS;_#u30ur^4?k$2dj95G1QWNZe{fE>c02DnlICeM_*3=Xy#eNZB1@B`OypJ^cBYlIkg7XIt`@mO&>+@m}0y%#+ zXv<=RqHE$zoSDS=D(-HmT8M|EMK7dG;We)-%aPn(_TA=?-RfIx7f&*~--1l4T9ZkS`DCciyv@x1r0dn6v=@#eVS~@8Elos~ zeKsmQ7NR7k0EH)eBIjy7WG(ED)R;V^H0yxGX_pae%=L;K*C65(*C!j=3PF{h5HK|c z{teE;*Ubptx11mi{)4*C!hVo#O@pHRJ$!}J;qSpU!$xdJ2D$l*O}%iVAB8uL4c`bX}kfA&4(^4lbG`M81{ z0>tE?yNGOk+mh9tw`6g_pUloLBI9G1$*}Gu(%+Fry7>j9ZN&bwCSz#(LQxag2NkPN zv*x=$iq-9qyQ4j_lw7mubs}r_vytff9C0(a{>3nNMAu;sZ2LWgUY(7gbJGy;r6YVL z58>kx4{tf=6Kw49NBRKCCf0$b%z|RoNzUbAU)tyt<2H8?QfD#O5Sxss!(5|g*fFjf z#C2ZUzClV_U!)!6`eyox$eS%?U)l#n?zd33BMY@6N7P>LPC_>)(z;ef+Lu?8-jQ`= z@aZ|PYaV2L;x?I$pGp=}=aKa)3E6HgBd6w{$*GPlxtREpOK`*=Y4bnx9_F7Lk@JpA z0Kkz>gi4zbI-DECZN`4 z6e{nq@4TCH4CNx^pX6F?8)qQ(ZZD`iM9m_WMe3%n<@A8p9|Li#?|sd4V@kPxoB@eJYHjzRTN z%sHNwh#%>Qq?R9$;ZZKXc4s9*~}|f@D_3U$*gYJ?Hp;L*d7HoBrLtaGj%1 zT-(i@>!B?|UsVJ=io`gMy*U#&w%%bJo&)AgKdyNmOoSl8mGO*Ua)$hOdc$E=DRi|dk8 zK?u2YW&Z7h=HF`XA9;;ja@vu|HjqS)2S}uGmh2M~$^LdPvWm7LtIvgG(W?{RE8b+1 zYe9ya*zXr|-u7dz0rIV!w9NfUqfrD2)vYG2j*Jy&| zV0W%{H3;!KtQj1di~rN!Sw}~GuG>FKga`>q2!s&4IKhjxK#|}y6mNkxq!hPeMMH5Y z6xTp-2+%^25}@oSHWQi1Ox)d-I5F<-S?m7syFb=Cy_}wPPVYMWQ~I4`n0deQzVGww z{n_y|C(*yQnfsc9h0FqJ(*13NtEdI#n{+~Ys<%9zWN?!?8yBLJ&UP8py zub{bfoXoKKh=(WHmh;I4UXL^~=rXvk${n;9`5k7W_`C*XhWRMFQ_g+pX0E4?pO zXho1KGjO2j&8KF4=tVKS=fpksRx$Q05HlkM^%A4SVs?LNZcER_p%AgjWM9<7M_LWM zEcOZWq|Fy2#bL-eaY*_6e}2}#_y6J$GGE%rH`1p69kK6VB6gvL($aaIwD@MeSi3!u z=Ej%BvW2Nwd@+sB+5KYLj(RjR?q|L|CVu+BW}~QA2Fh&mQ1v((H9n!JC-eX9`VFFeoO~Mkob{a^i$NsMPmf=v>1g(= z%YPFym!o37xV=~?&WPodR$^6&2nw|J$qm{<+2B&`s*9x`{*KB(ZO36#KSZBi}nJwqY7+#ktI8d26xm_C%~AJjf`Z zr(sR3n5use)8UK7#C5zFvYy`L5PRy6Qbp$`*-|Apxwbim`t@qmZkURy6nnf5+lJDD zPf(ci3b|*vr^q^vtaVS2yxIvVJ@zAEydnKcg@`CxM(z(eM2pBVu1sMrNk;@U+=DV< z+V7wBfBT1eDPIJhq1K>>2~=0f>NlGVb=YT!@Opr#hnD1&KS!cFJ<>JbBE9E_$T&zX z;hW>gk0sw})Etz2w;L7OKcKqz74qhktbYcRr|^O34yzHpZ*4^1ZMHPAYbr*rqgfAO zJ*WK+G4+@sW(6z6qGX#i-^n@P#3E^7Tq)Mu=`ol!S!_eQNGtkb>{AAd-38tU5iw#v zA%(T$hhiUVDh`JY#D2NAv|0L-w6Pv1_C2{a9yC>2rqN5iz(`saI!cRlD``|NoUbN;UKzmDn)0BrD&a>iu%&&sJ~Ez z>VPIFuOEogpsgrQ{}FkKdyqGotgFJ`*Uc`}RM0;jv;*ck%|J(EO`_IE~%ULKg7a^eIY6KSzM@RwdryVvT@^oiJg)ihYlzO!Y za)aZj!Ofw6yJ9Z;Z57C!n@FyZJxZrv#p}E&sMzL=+S}o%+tCq?%Nj&$@$&4XN<-R+3@Rgs9Brb}n-D5l8t;Dt~J<$f#o>%9I^;~Mr z&MlVa{l1~UhTfm%#bRzsZyNPKCbo`ZR4`nO_3GHur0=oA5z$Ms6YXkhX_k=@)pjTv zx)$S&1Nj`Y9&s&dg_0dUD4ZRO{DyAG?b8z(H>pjZ=0?`E7ZOenLVWK7h`tN{>)iNm)}p?h42gC_5cHc4g3sTjhm?M4hX6#} z+e%;dDa5`cmy3JiBpVB)YRyE3<8)-VyolVRi72>ih+^eVl+gcP-mwcR4~#%{NHQ8W zQ_tnNmE6W9qJ49M=+PIgZ+(mGA7?S_6)T1(d5#)&#rWX{?)|F8>}`UWKZqBLDtbcN zek~Rcw{kxETAELsD%SUP#QF;(vEH#?Y^+y^O#qo4OH1ib*d*2)7fJJ5WOrm2u+FcN z<_pJ&`L_ww&)yXC`;)|^`WBy|9%9_ZM2v@=r3dwZ80g<8Bai-v6Ca3ODmjQ2V>-uY4R{i-eX>&KZ{(+8?H6PV+4 z9${lzL1U_oh)P#Pf3HORq%rh=a$PVa2Wc3Oti!rwEe}WbMfR+pPeYMcE=qTPjLLRR zQFZ+V=g}lIEGEZifq`i2oe-U!+eP=vCef>Q76YRmVqjn{h6Bm8NlF&unk8c5OOM6( zd&SfuK+HE&S8?{Lm?vD3X6t>$GOn96D;zG(9aoVN&`m5mOc#rT^z?ELvK+jL{Gnyi zY;LVs4B8-Otuw_md8C*YJ)t-IE>@qdZWz;^8e!p{5*9SfUtdE9Lb67$z!c{U0 zKA(ZGxl0jNum!a>O1F9|@LHSP~p!7JO1q(A#_?bQO5+)%><%G<2r;)brI8p{LMN*g6i1mJg zm}2Hl^QEcE&*I zM;_$0aHtZwo^E*nnu~3q31)uK{iTRaJd6aFR?HLVkJOc8k=b=GvU*=f_E0tQW9o$5rZX@Y3&{zY_-$BIra8APwBYi*k%27SpG z^qnY%pRX39`cg5%Zy z4F3dCY3_*JU_-5w6T()QLA7H9y`6Rlbj=}${wwM{6-cd5oBgeW~@Gj|8Xhkkq_8Qrq@In&vbzf^CrPx&-+*uOPpa zeV(0UcH}%o`P}WO-hKx)##X2qL*10^Tr|4f5Uow~Mf(`NyB2PuyEI<(SIw6ufrCU} zQ7uglQXlGgg}M-x7;YKG9=DMgW<^WWu4K?miKSMA3@JxfF`g46#*Pcb$WtkXYU+Kv zbl}=+fEX^EEd~Xxs54#4et(JREmM)l+uf6Xv_`Ns;rRgmMoYmp8Z4`pR-4zz89osC_ckKmsT&Gw`=a#ecPPK7h4M|y$h`4F%@Qxv&mM-x zW32Jq8X(#;j*E8cNzpYsD0+QdMNf<4=vgOC7K{}AZX?8C%wg)qZMk>dD~6Us#4zwO z*{RRP;8vU%gh)xHM2#w zGBfV%Lxg``33bSQ@+s*n8R>*r%K?aYUyt~@bR^x`hLlCVNPm`!%=Y=n3GIWtLqRCW zAAk~91C$=~M%kn{s9fiT$_sb!#*Y5#wdcvY?TY$OLh*J<5?S0gMY}^k(TQox{;9v{ zl#UeLq8QO{xrfY1)*o*@5xt^JX)<}VG}&P)dP1-4$G)Pk?6G_**g}A=gCoRKMXM`E{N(&zQY9zgipb{#u|Q~rNFn# z<9EIGzQ^EQz-;Z4ui)prikbs*)k7kfN4pE5*3A%}9|v{f6>{I*m=)6s(N*jroKHrQ z^%SIxc!|`v!;qd`iL7OL$erPV{GEQt%{E2xkaH-?aYyOKDJTmvMa9EmsJZGwomT<9 zBHd9pNgE9-SF-QhQ?%N@6zyU9qOI5^+HOll_ggd3`O%u*F)}~CpbvW=S%LfL^&2#k zoC#0S9XwxjI$RXpb*z7PYbrXesR6d;Iq5k@v@XBmIp2f&HN(+Rn?)Y}LcGyAhMFBy zQ7)WUW-LOP1hH4R76r*YkmsgAe&~JV9^Q|v0j5ZI3q$I`K%|htoM@ei_%UM;yJZog ztkmRg6wtFoj)`sdyT+Px%zgNF(0$iy?|TeF?SXGwC3D}Hq3x9p<@1f?xhF$4EDFJK zhsbRk2X#RMH0r^Kj_2N|oj+o8oseY7K3wKDq@KHgw9Qq>OdXA^6=Zp2{P_E4;Tpjm zg_+-?jtV^KjK<$0IJ_SLw$?6Xeh74+mW84)lx;KeYj|OJSLNt z&!a&xKY0ajm%6jw(jIRI=%cZZ5gK-X zi`wxw_;37x8s-^QcH4*YD`Qc1wIlbGZBcmXFbbR6W%7cC0Fc;=~xFc>8dylbrC?Z5n8$N%hO2>9q{_TSbs z!&wI*tL>=Ky$#KyMnw28K;-okyp~oY!GvDAQ>&5Eau8DTUL$qYUGAS(k>Oi{>~RWm zllr5eKN-a#mr&BF5T!G<@cKwD%BpNoIgR-c+5V{BLET%@YE&mHQ2V1j>U;izTGo3T zx^+V%uZ#LE8K_Sgg~skvM9Xd)8axv4wtfxX9$AOF-PAFbxRG01hc}-TFk6EBnFwpt zOzMrwL++?3ClleL0eHRfW4v}sA_uxT3fDHG&~`a;T#b=^*BP0|79ykVX{4L%L-Ob$ z%xcRJf?O%{58)Ekop*3=)h9v4wF^C4;#eyC|Z7B!RSp>~ETYI4a8n@5dSb}wpy zE|VYXiE^JQcwNZ+kdP1*f9{B)XlE2$k3+$N6y&@JVTRZXWId{)F8>PB+wMl{00Xj8 z4ag^Zg!ul6h+RAn(Y9m=Ik_@xaUj&Qj1X2&ebUG5dktdVd+Bf}Ja+$)vHY`thU;|J z3%uV#nfM`sU;cuSaSaG-^(n%e?S=ZO9wKdyux7Ce(X}5T)^-5v<-?Km!#et`A0V}B z2r?EkyUxx4nWb}(ozt4W;>XC(e1QCD=4Y&WN`?aWM1C7k>hc*%JGr6!OY$WUp8}PA`k`Xz zCcHj09VN0HrOzIrIC2wv8fU1ldyE3T50QV&1KDKHWWLyl%$EyTAG?86b7%H1nGJF9 zXCzcxaXt11(MsmG?zluw06D3Ztd$tBcYl`p*=aKo7|cB8dl#Wd<{oor>(8TVfz^N|IzO6DPN^IhcacR~J{6DVk%kAiWmE1({Q1)eDGe;cJe z9q{@Tvsm&bp#0n`lm~o|@-{8;`o$cS%{_|p<_##L#^v?X0eoIHL#gj+lpcCTPSar& z(U9oqd0&8VK_nCBsE;SPjYpF_~#t_TdXf-?Ip{Nm|DTkuYv_#YYH zf8=N2b9Nj2dPKu7*A)J800HV*^dHPaNMA36+;BwLzT3=`cmxd@c~MX9A!c9)#4$HI z?n~y@e(HooOR_{p1t4|Smq?v-lj|Sm2p&6+?4~uy+D<)jFp&GjW8|f`KweTG%u6hG#@y@#0+ixG0G3p3ba5qdR(EW}1cwxLeDJ-rS)@)5Izb#&@Lu9(u2SKw6Fm($0=Y+RraJ4=+K+vs`2kVaCBu=AZ?+B4?a0vV2{TTlxTb9bJ&~ ziur>b44J3*6xm+X?)86woNv}6JFXY9LtFCvHbdr0uDizgAake>(ia*dgT0pY;zp!A zFhJ_hE0J`Ry-H8AGtTayUm_gwophPux09K1o`_1_56!9F2!9w1HTPg)A+r#&oLt67 zPuMGqLZFc~lz{`_cPofB$P4tG7ylV!`_Fg}C?|hJ-@+6GZ!CbSggPDPIM)2w`}u7e zG}OFD9c+r|gYywx;*01V8xfbk6A8=MZ`joxNn^VpG0FtVx0vHN^)YjF&XBLz73mY0 zr}M}JnG4gA`G)n>xbeu?+Jg)^=Hq_Gy=~20YDzXEyB#wiTR&qyZa-ue-a`7(OVlKF zL)td#geNy5&2lnQ>`x-)-Umotkb|UiZ;{}~T<{?BF13~*e$ykwYL7uo)Hp;a)2NN< z2F=En2>+OQY8TuQYF>%ZVAhqbiV)PT0s%3-{~2TW&w5YRjqIQ_?vKDjyUCLHTWtxd zj>{0XvL4~<9zyfeAw>N28+|CuGyU`zM5mDZwtG9`ejsP;MLpsd(6eyNg6yOdNcyHf z``)bePJBh)p$<|n(i7hPHj-1Am->r8Qk%!Jc4Ei9`Us>g%0ueZkw{g#BBf(6nc_W= zvV~r|ZI6&#UruhxDkSwJ2i8D|gb@nF-v?rSvk~9Z3$g6!#`GYQ^yUYM4meM~QXbTC zdeHRZzQDFO{Vw+q+UFyvRGWVvHw1M6lukOVGrm_3=ASk8fA4+aJ3147ferAl+Kzy! zP5$;>R1+>ibzllY2XsK_rJZF|8|}8ogS!z_t@z)xL$$oK&fSg{j-1B{?5NO3_+k9jl z)ez0v@nAC1S9ye?(vF0GU|N{sfq5Ut0}U1krb|=pPmt5ZTh`}hzFWm9$~#YhPRs~w z8wBY_wwe8>s|(3DWaREZ{zvavKD|cbZsTZ3OQ0QR`e^v^ldbshf~p3d28*)CVq~C@ z$l+?5`c09p{Q;@VrJgJN>kwqv!!sf&{OfJ6n^s@cA6yu44a_5CPSk^>lR}rH&B@H- zmHkNIyV@4?N?^H5TQm^6CdUDo6U2gI?v6W7m!P%UN?;y#mNcWy2h~)InGs;Kh-{;M z$B|y~nZm;ha!FFr0hc+tGptIMKZ_F8WNL%!1rF4+7kh@DDOl-vRWv(0GMELzrEA_W zWu@>dxw)t-l%xfQxeb0W9AsEizz9Zy5;IlV+M~Xa_PYfY<*`&N4h{&R@X-!Qm|FwI zS_fCOt-IRY>xjLRFI7*jkY2#nd1pQZiEexC73czEu9D`IfFhhc^C+kEY2tZKwKR+9 zH6V~T2JIR_W-2|+!tMQVa(79lDH4jw0(-&hpz!&oi|ZFEiyi07<=C*zoAvSfw8+_V zi*}(%xgEG~ampFf@DJ?o^tI!SBQtfUkq?lt&D7PfCg&JE4ro}jeQ*ItKydy6eyoQ)f3W{^lNcG~SNMC~aD&1($Sz}Zin?FeCxd<^+`r4^XB#vyV*n=u+U;d+ zK zXBDG0q*eE%ljbeFKU|g=g{8`>&nWn8X}&*rqAxoUuSY${n^C^d@z*$Zu)7Iwx}KqF z9|RX@5i;6biVM%MA_=xNpYXsut_y4>TSq8OT8MlOy`GV7*>1d?if*G$TWM@2xWI{V z(NKRktX1LS`z@pu?1pPbyJ#6omhhLI#D z?Sj*2l~?FK3S`~wgFO_ml=1FYkW~$f(7Woex~Es$z2XIl-Z*M;p>CAG0_s{Bk96zc z_(Q$;_^7WUL1cM{Tyj>da>Bjj%sdGiK8m}ubkiIi&89GnYQEE!psdJK@1Hhjk7#ky zheuWp+ggY=c1I8l%a>CoXOWB~>9i7Ol7@sKUC+;?_3^+CB+$xwC8jS=dSmBwq6J7T zUJRptlHd+skQRNn$6aw_6#pomzI}u-w+rq)iN$SMAX>52#&vU5^dNW>thGu5?I&D` z#Q_O5JeK3tdb6~5^B`t*bFxh^Jzq%C3g{()*isZNL3~-LWC0bfcO!9t3*0m%4c1yc zXm-&cMnR&Q$;TaXt)V)c(z85|#6}c`#0Zp0yF9zHL1J~e*-({4GwmNJU=nAG>>bwP zx*jQz&XCAnx@>kd!bn$1r(Z3BEY^GqvU=r}YvmosoeG|Z$Q?7Ms}7fHK+O7jtfHbX zicOHmgQTT$8XT1AI=iHk{b;h~2!@(z=GI=kejaweYA2M=O@;c#SPx(EvB&giYdIfr z>kOh=iIm9B!WhbEE4rT)w$QZ+zZidvTh*vSa^_Od&9~I>5$=eGhg)=pEsI|&c7l+L zImN${Ox=jzShb}@A4vu+i+Yv=t>n)K$~4Y+1I=DDa()9|Q7#={x3}Pdo$g`*%rd;_0ZpeeA7w@~6$v;+_{{6)FgU4@!2%Zd zFMdNmU0-irwqf0alI+be?SD#_tir?ZE^Ew^gC~S~+sE=npgH z(3p?WSRb;o7EDqfkUDu~pnoR4r>#tc2A^dA@)`~tv3u9l*d6sU++IX3HyOn^s9UAexfq&kdUlPN9Y26t<-ry9u@|e)>j7Av?oCWk62&uny-hK&jwO9j2V+P0iG}`0~rZIcmW9 zg^az4e^_S_WtL#wBFp!`7>LvBn13)yp1-driyS!kD{{|aIXPH2&fpiu<0y4V)<{

coi&%2Jyy{Nz(^$B;5h8Kaf3A-XM+{e}Y;`p9idx6f}{oqR}J zIi=@VZ`|=SWoMISXO8gO--{>3yW6DCn9IDHR}v+C`kW3GCZn?{IjxqTg8BEe_#BnO z(Dz*5bbDXd84COiuO)7Q@xz09M$^SaUk$VoyP6Qo?FgI~%$^2!WT{7YnKL-y!{%SK zrhQ)3zi1U$&Nfwr9>N9)ZOF|3GJcSR-?6Gsh*+UfpZD}LGUfhdzfEKE>ihbK?^nav z-_olHu%JIS>hBX0>`g3!5{Mbl4{Qt!`A@_ zvL;hjAVsrzK|Gkvt4$GYM8>d-A07~T@-_4`-!}rs=hskV!U#ELB(K#ktnE$mYJ;M! zO&7Gpif=$zOcOG|(FC+rIa$!2U$SMyuTrb(>2lxj^-PYpKb2b@zp*ix-0B$1+TIzT z!U7|8B4_0R%gZi$F9(^aDxbcclJ@1#xZ7sri65)*VJq?sM-d--gG$4m)P&dtJ^2J* zt=X99FXQn`?@`!r$P(n*nXv%}EOur;(g`d5-XH@M)ff0V5^R2NEMc(9lgydZgug0n zoMZo`h^p8`FIA@-Ci1xa7t7{Cm9~x|+O-<^Mzz)3+ycw|0WLdCj--@FGe)e)EAq|Oewd8`c!NRB>(>asE z)ak(lnxR~S&)Fs}Ojut#gd8Fo@FBTf3?6u3UaOQ(ip_pWud*2$9V4iJGE@^8@{tEq zSxi1-N!SC?5N4k znf!L^n5Ejo^__2wu*g!U#!7NW>1lsuK#@ z)UV4)sbw+7{jysj;BoTozk8t(JygsPOO2-@Kp08A0q|z=h3-vOu*ygz30JSy|TP_wM?=f_lzPUEQ5Dq)*Av= zj)VJC0qK;>NizigiM2iclyLdf4^`kd5Bww6M{u%T-*Jg2D!EU0*)o`qFGo(Vs_iGu*#?cs^FCSaD^%Qwb>A#`YIkvo8}~tLswfjDtz^)+)9&TR1Y6 z=pR%V3bbhSxs zE*_b!a>gF?3}90(H{Tp)8!nW(0se@LLeJ+;+8p0xz#@nU_*JnoS)KVVhAd0jemj-v zOZ=0BaW_2<>ZAdTL*=kku^B)q!i2WRQ7DtYILoJzxP{Su=TmeXwL%Lgx$eDjj_jOM z-PpBH7S9$9aY%5C`8EiWNDo_!u8NV>8qda~w2XMY@&;D^>JXjnrmKl#g~~(p?7HAW z26kR0H}y^6JUHV%ZB2WH#e!J=({kYsU9(JX^|o~xH!I4JQZB$ZA9jI=N^y{fJ9wlY z!53mmZ~LjSutAY9^UcGjA3J9tPkn1a%pM0scx|?y%wVdUx%#DFziDbeZ`h1vdg7^8 zQbz*REn-YzN`0`sF(Dqb|D4oIN|%wAitxoWMNh8&t3-ES%>38U3Mo80Dz38U%L?NIk~@n-pK6we6N&~u}Rze zs9GQRJum+~!Cl;mtC@(`Cq0k!M|H1jLr^UY ze1T>NeX>(!>3gSjf}H`|^AzG*e-$-dDuspJR7huRl^!3czS2x(^Yzb~&^Dl>a-Q-X zdlg=)GYd47!Gn`i*ko#}cB>4smFI(E)prv59HO2#le6usYyqKL`7}Zw*-;#*1H|nkBKVB}r$;cAl*-=L@J4J1rUibaF&x;NwSDwDWb_{mR%9 zbByd26?8q*b5+`NaV8>?x|((k>q~4N+p?yk0}DtW{OrINL)V7rCp?0+7V9=F!s{kl zHj{KcMH2cCPYf8#bUhLuRs~u9_!L_Cde^K%MNh70Sa5n$&nMpa1+=#!Xp(h%huB;A zjThcfGJcrJtoy@$WnWI{t3#x0pd#?PZnfuv8QSt;afsVu*PnK?@f8M67h;QnLPksU zwQ`2u(R+SsyL)VV@$i`)@xDQhO|Ow0>CP~2l&@>gB)MT!qCe%In^Fa9Ns+0Qd-XEH|YkP$<{A3I7e$;mb|yr z`gpLXZ2F)a1E`z5{G%(Fke~UOk*?hFVQwe`1pt_v6XL0W+C>t(qwmD~hm6FAa>(n_ zRL&4@Zw{(0FQF$UAu45y!aST5A5+@z9(=8A6n`zF95InpA`vx5l!EP%?p+B&S8FyJ zNe)>$ik&z1N;k3C92!7ZfOl2^#peL$su`lllQgBO-7e%zI?xLT4YrTr@GEojHk`#fF} zL5r2hN}l@oaSB9DWsp)HBP?<~XLP@#6Dw^b$xNuQirE0=YU5=nc|V2b6SRLAQQR1{ zPt*9V;uUC{=EJtYDGD&o6j6nj_y>V@a&{qz*cu*3V!e}>lTdx>0!FZgpW{4POs6I) z6!SQ{QRy*j0kSi=R9~aalrEA*qJ;H}?rzI<As`ZlH zyjSj3&FRjlQfM7w+$6h6QUS$#DpnN?0H812P94!Z>>p!NBiV!=?M-FbT zj&82JY7X|6Z(ZH&NWzy&&ZdsmU}t9sXBYf8#$X3|W3Zet-_3V)et$>kt^OkdzC$o(ZxJlN zI~TrNm&a?j2LG-~1%+$j^6~^4?~u^!^WtV|{Z}Z+_c9w>Rm@ z-O01=Df=iI#?(XjH!QK5Jm+$Y^dw<4_?+!l-6cl(oUNr@ zU7cLrP^^rlog|H=C5+jj^c0X_NudH*puC{ZQlE?!K(~WMB66tGzY4ACvcGTp z(ad#YG;u9>zyUXTi=`a0g?_O+j3bw76(IZHn|Otk@ubcd#YP#{Y8WU@v5?R-=!E|;J-+SL`a%PWcidO5o0y} zwa61%ejXf}GB3?#bNXK<$x9p#ve(4wJy1OgUBio&Ti`$S3zd+AohLLA|LXe}V(aY# zcT6PO#1jyMsm{X12>XWK&}BII`(e_=N`(1iq=Pl?h{`@~AbsL%GRyZ=&R_LGr-sC< zkc?lsy}p6Df5T({Q6Y8&bJnLw5*LC@&sIrb21Ki10xl|>&PSZ({{G56{xXp4s7I5y zG_%}@6!Op!!ijhJgqFEjeShowu{yUc9FAQ5aRgDv=I#hPr^L{u6iv7DE8IfE#(>qS zDn~BPbxR-8ZqYDIi1Lrx`(}RafsHu^Q){zt?7J7ZpJv}~y;?aVU!~dC{J@hcm6YA` zq+bZD+89|(Py6YE(f05p=}whJ=)WK4Z;v?7ScG(*@F0b~LMA*!do}a1tV@6XqCFj* zH#zdu9$M0R&c(TJkVYbsQFgXCB#>mE%NnaXa3eD|eK4q!qB@`tqdlcar86hWCKz#s z7$k={!Qntsh8B`cri22in-eFURiFb?7LuwX_X13@&C)9gfy0obDWP{3xAqNX}r<`6v>YqV-Rogwf;)#N&tD3B{6FrO-I3*`ucG z9T(j1AqkH|uot-}|0poRuhFA?z=DK~+Kv<#4380ENcX~TfghNX?3AeZ^|9iqv^2O` zSqL7-@sYXW(#IiMBM`2prUt81N< zUkvJiaO(vwV-tKsJ*-oy_@NVv5PXRrp2pmBEj$;dm=)lc3e48_W}C6rFz zwTC`eN4G}X1w;_Qtkw$z5eIvFtPYi)W0)zkvEY)}H1 zl3JUbAT_nXR7`+Ng|?2d`s@t@Q_Iz{YCTX5$YHe?r$!b8oINld$}j+=rKnQ_$8gRq z&}U`Q0HIQ*sflAW=N4G?%(7^4`ck{DBQp2u7DU4`449&b%ZT}J zkNwA=Urasl_zizLYFXu`&l?_EdJyp&A}AFF%sOnjllkZxh8k%dWXJ6QQZed+I|g2#zxl1!1WJ9@d^R2)dyXdhuWjbM@f^#DAEp zgaIcBa4~1;ALM^f`a$gnt#FH>$Q5k3YWCTm|15PVeys*(#F|0`sr&D}CBn}jaD0eZ zYX*R?wQexf;}ht?+(NQgGp7dP&Ta_ZmbThe7efAd9_bAU#y=MnF9{VHiv%6pHP7Y9RArAo(yjd>95l z9*}i*qoAIg00s*SA>v%08hjn9b^Fvk9tFoIi-U4%@a;>L+vo1_%wQOy(EoHfXE(;~ z@$%qLLW4Nrrv~z0YTQ_J4~v*2Ug_|b1yWVa4@?8o6ObJplVJqe?CeYZ@P5r3ph_Yn z2P|<5JvRr@{i5eZ+i2}W=%WE%$QZSvn)Z{kDbA3JGYbi@iin{embeCuWKssaxrExT6|6`+Ucrl72To z5qk-P>^VFNJThk4t({Z4^#K-F(S|qp;Sbd!aGl$s`%p&iXm}6-Wq#c~Tch8x?4roU zKodq-H_2IPbx4!+DUQv|^W=w<*#@7#paPg*{}?dF_COx}*}2nEOcQE)2sr$W#fr90 zHiW2>v$d@nU3sS1!uL8H1%5#Yq{^Ladm!YZdPTx`eJ`8M_|YO>F}|3}?Xw8aG0F3! z7qXB3$+x8xG;5WDR9n)*Q;G*depww*&pV8Sj2(opts>NBZY)z#OwY-dT6yp5m6tbb zR~t{;)l63gyzk7)*H?%f42H$;D2vk&cPV{&ICqF!x|qouU@__r!~2DFM-58?egon8 zHI0aU02sc3=}TD_0s&z{k}4wK_)m^K+DH$x16X*(#Sc@cP=7A>AEvz4K~UAPN|k@u z`KCts8#VzvSf3kBZ(?h6J*c!sQaz273Hm~SgM-1@QrArHa27#Jw%w8C{qg`|%ZafC z7N0{(Rion#RiZ}OPVG}E(8(!7S`*Q$l{M4ZWfMW)O42Mu@{;Vjgl5}(419hN<)0jO zGO8W@fbzFX*g0ZKOB{41hx!loxzWl0Fc`q)2YQcO@CN zF5uuF4X+iTRA*a-H!u8-_OZv9KItSKTW5#wzfK)O69~|n?bfNPwIv@W>!B@5^MnrT zJ%LE5HWzl$Nx*8M1n%~Nvsk2!;tRkz3a*=TA#$D^3oKT!(bdj~5a_ ze%{@v+snxB^$*bngXgoxA5H#eJCJuvx6>^lNa4jwI7Tj2;N6O2zk4HFy`UWYR=??& zsSlfFRr=yp&pY?irr}35;dD&tiDe@Q=4$TKylP8_*Lgpk-VX%8ti^D(HpjcIT129B z7T}@puP(v1|8;2t5nD%qcZpi8ty9qCUO@_8X-;SKrqIqS!NVOV1vdC8>tQRv!3IU` zCM2SU`?;Rq%Mxw@_;zF>CggVck`AKuTY+}3wi)ecGQaKZd37v$2QRI3?)j9_{~9-% zvu$$fck^F3KJyQMU=(r@m7}=fQ?xMaC(dzWx=(kE=()=hB{Hr@eXX5PV*N+I;2@u< zHpu#t6$ZQ-1U@$3t=C3WRWNztf4O?Sf>5g?E)mcuf88y9kw#J+G%a3q}J+Qew zhw#Nhu0eA5ehANJ)kn1$I|n5QHhyFcM2k*-rvGdaOr!q2K=P!<5)ycf4i<785zjij ztb{iXx~Cu7TiGg%w1Y!p)$f6Sll2u<4by-}^pjGK=m%zBDUC?bV4zL~Z8dZMSRdE#da zDH<1w;opEb-}|BXzEr#Qv)>F}Km zGogQk$Y~?Uz~QzuIczXy30MrfAvSvK7@*_k=o85^pe?Xn*0bc-w)tC(_eeW-;)U(* z!lk|OHF;L`faJ~rGdLL5uw5L>&d+wQD{Xj8)eHU!Yd`i|aE$X6qZ(Fpd34&T31-f1rvOw2)1fuu2QUj7I zW4|ZoUixa%!${566OgJ`2cKxq0NkyedwBwctIg9s#Ch3#F8ld4sY9nok~i^eE$}YS z@7$yk;y%Yge+71cA1FA$BaZO4%80K>4)qZ^ms`4)h9@e*U!^FolmxAuxKBn)iY(iB zwzCu8oZEffPw*|y4ytp*;jS{;?YxX+r!dUoMNL5oc)Q<&*dgjhrsq7&xtubU024^J zL$;e2Y$=c=Fm*C;Q!jIrl`lGM_@r{`7_Yi zf_Sr6ZZ^OYgGoexp?;xEWcGrir%`vYEuy|C)zD-@DcUerN_pcG@A$i)Z%(~;&;JBN z;5%7=Ij(xuCd1QDfwpeZwc6sGql52dd@;V+YE_+u_p4DJ{T^u@rBK&3%~fi9BYl?b=01J+?l$+AVi{B} zW46WsVc4L#q6jsHkIo3c*sLaY3Uo8>p8R8TU94XDLti&?6!E##<@wt6R)2UdNH>ma zif!38#@spk(h0*>#_MfEBPi+Sv+0`_R;c-n%6m*AoWX!E8j;6xWY0^24a4m#5Wh29 zDApP7BBA;3`%vyq@#61*LKby)F^8xU;VF<{Lq3mzs;7ot(b?r%n2Q3xk02VvUAf}7 z(;v~Spz9=RA!kZrRaLBG&7$6uiCb-*lxEQ##7Nc3NbNE2&?h=|y)1$l$nK-@oO5qS zTG5l17W{9A`)2!by_`*Z!7m*a-~-}#J&u)ttt%TX>zw9eQ)vVZM7g?dG$Od&v6Cyy>&uQ%pg!BXI zQ>4e!N?_({N^mDfD`DtJyQFtUDqqH*F)TOmgt4jtswN2lTO6qi}oUX8@g#vFqqNf<~}z@a$^y zmi4Y;*60#O;KJoE#Lioin~A@Qy;gjIr=&8AHv+x7;}+{)`LpiA zP_dn=XSZAt$KD-ZXpG80c^vv$nHyrLK+9gx@}fgCj`Q1iOwr~rGCyZc4%`u_9I}oRRU3~max|KOx#%7+^X?#glR+1oX=z8Ztp!!TZy5nx zu@GL2bH>%A%NgmP^msT!kWD|{iN9% zuqLFu`MpW-*=_H_O#2-AcimI3-6}Lyr}enf`*+mDY8UtGRivC-)14TedstnC<5SEh z%vS^IjWs{CA-fR4Zxe8_d`z`j*&Hw$Ai_jT+l<|lZoG$f#a(2GNwklhlkp* zcTOH3S-PVy;uouO_#+R`0F+Gv$VHH+j&a1Xa%(3XC+~=#Z7QA$m!+dI=LyF`zygGW zD=VK;zQRfWILt@fx&XPlVv@P~^h=l5VI4t7dw{p6KQj4?36_eU5lRs-BOu=ON^w1m z?B+6GVh)kY_*Z3!`#2QmyTne362*e=4dyB;J|Mh=ypDwv9G*$Qt*Q}n;&`tkNV)@( zl+@oiM^i~+<*{{b1lN?k8*!k3XZ+&vio*{YNO&yHO_Zz9S?6=>VVyG_MAwZ(05aN- zArB!>???`VCZ+K9HEwGz9FM_a`%r`x=qWidw*DQ6J&i8v=-tNpE(S9Jf5 zCq+Q!nhW=*ik)h$*(=qsX9U^mQDD*^U#cIm^WzXg3;j6}X6 zfUZBA;b3VeG63awj*p2t-zr=UudBh$)yL`5%gVsc=Wi!Fu%K(4=Y?Q+%%#jPP&n4- zb3_kcKfl0HX_Ix368;H(c0Bd!5X2plez$**@zqt<-N-AEZh!XEU2NbT~;+Kn| z?)EnrM$m9zstq*8OtHdoUaq%!5sD7n^sU};DT2{>XZ~h8z?(lDyv=*)Y;F$HYSo#p zBO79p*T04zEbg_V`l8JJ+zuwMQSx%4_dnD2^Y}nvky<*g+tO|93cl;C;mzkYWy-9@mvXT^WFw%mLZEYRpq0VikHzb+!>#!IEa_I5P zu%~vjAUV!7omYixfl1R=~Fy%AZs-Q)t+7oXiM<|T3pXVHfpe*?zFrXNV$yQbX- z==3*ho3j6U4>j6sS>u~+6xyOkt0BjEHkyHMG5t1IzK0$pdp9`7Qmf2ezW(+3@!gI# zqt1%D(&PD}9 zLEI~@`YnYINH^}=)!8REoYY=IuIhd>k)4NLb+A2n_x)T2L>cb=Zgj-ppD@BZxbcGJ zUm5)im$C^byL^~c($&3nX!J~5y@R!I#gd*tlVxHkC5CS(qyIWY3IXaIXd&Q6;zUF7 z{Ao3HrC#XV&%Ma?g@9l1rk>iMPuOT4bxh|7a=ef!lPPWyt}|^xV~?yu0RCr(f zZY7-*aH<;}QaCj}L35JokZdolTcl57pFor}_WnZ#Z(GqrjQ%Q>)3%EO@~ngMZnht_ zT~`w}_KQ_O6wStiy!7Yd1Kzkr9E>7;JnpPl5J`3xlNqy&Ibq126mQnmYQR3e{It8A z`>W3vB^8^2)gYFo*y?$xp$5Z|5Y^&d?Z8{3j=tt!3L75U*d7a<@1~P6N;%PZQhoZoB3Q94SPk6YRz|$K#@TMkDrq8i{%@S9bitYD+tf0OHw_F z50d&NGwe1oZ`eI)$9bPBwWz@!szs6v;b`02JFwbs6|j zijfV=z2BDD>>TBE&uqE`+Y*}eAzxxQt~6JftNlTUyUI&mghN_U%m-BZIl@tatGHLf z^tkR?^QN6!R}`%VslPllc)H7nP?rm=9*B=LR-Q!Ia4zV--gj_P?672OI+NZ!Hd*~T z=ega?=}4Y^{S4q~Bg-`iYiTmskD5Xw&k>C_HdE0Gd419I*hUAmr;<3!bP^qq1clXv z(SY^N4UYZI5LBFR_uZZ5Sn3}YHCs>s$)4F^t9da`P6a%)_J~U%Wn$h9htT`7KL&q1 zV;(!nq{)sepH5EVB|0_1T3pFU7kRS9z8$S9>!CrrQaw*Je5NehaiKX!A4e$pv9fY& z##F7;Xl)(w88)d(u+;DlC+ou8Z6WN(X{|B~rq@69mpOHEJ zKc>&5|9AS#`2R|u{eIF{beJ1dz5&N7;7eG1k&X}7OQ)yCSIfO5^X4o#JT;6vq79cw zpvGg6%!5Y$M*dqpEH<8ulgIiZPn=}K<9_49qg|{W6kw1tsS7!Ey9ZYKmR~%hP^Z?Z z=KzpG>QL~I0|1g#p`c4y@tj|v9emAu6r=vdk(vj*#auq|O$Xy`WPp)nC*HhT?g&97*~Z2+ z*(3_7t-~@tmhSPJ?y-4wwX1Kf6aiCbnq1XbUc3&)*tA)5M`px)fwC=7zp;yIw~ zNKK9Y5a*y)52uzw)otrwKPuksl2?Wyj{HydU_jpEzv@(rEE2*&A*AKh@WdJe4T-9Z zKh!3F8@?*b{AACL?vG<#f)MY?B3e?>R|@0N6gXuipalLi5j zm9cBbXq)*t^@j#d^a_~I3UQh58suW(+dCPkM@!G(Mx(lYmIR zvV#laZQ~=?J!$%xVR?d?6-{-10B1j$yDa|R@nKG}p<$0jHk1=cZj7m zvyv}K-Ls&f9_1m1lV4|G26c`sB=mP;D#}tFtR;^uO>?RDa28R8?d>m<4T|86ZvQwE zrXGE?f*b9h@L`@eqJo2W_*p>~wE1<}>)16cvK)Q>8}sBVlV$UELhRmmr{qq#4&0hY z?bH|w`PI+CIa^i`0*2ACY@Fm1Sb^hLrTBi9B%wZLGoPQ#NBq*tby z5*v#V|E1q4twa9CnM|1>GxRtU6Fc%~8kes!z*%d7BrbmRI2ar`Nn#hwDLQV8Kl;d@ zQzeQ^VWST9eY{0+M*aUVTkJ2AH&;9o=oHu)~Sp+wob z4v-()ptEJSZczNP0w#qn51?L}p+HJq*`${TNH5Jjvga8AVxC(kP>(HOy$U68CF$eX zJocprykBOwcEvfkQu1+Np6=2EWwW^jz9Tv}y3}s#gzT{;6rlnWe1U4c`waKk5kP4` z3B9S^^+0?HMD(MC>Aj<4H^}}FESEquKVwO*#e=Q~kveBVD3%OX0BR9#*9pSQt~;E+ zYYU8+Kqj=2=N4g+WY-DKr67EHhNC!Bk=fM95y_<>qC>{HIB8K(*U6_kH$mjH3`Yr} zqWrECMt5gHRPu~-3B;n_t`p8nLG(69*vg%$;UhtJS3%6ojB{8q#4Sud!Vl=d*`!^Q z*oWKuD3@*skIk^_Yh;0rj;zpPMLD7A`cu8*9Ebn*NiN+me43jP+t0%8yR;HW2`Py!!_;Vy)b;3q<{P%_x4y|N{~ICuP1+44in?Rp{!d=Lo!bl{65 zJ%NZFp27ABPas?Bi)%-i%B~+?H-u3l>_#^j=b#mdZXy(0E`yCGkw07Ji%Un8%C;X_ zH$*V-!8@4q0D@#OfrvAb!A6@Xkp1wo7?jwC-L*<_s81E_!FTxj2UcnUfFV& z9Z4#Ce$2TePkItbH_gGeL)Hw(Y#-|P54HazII{;ndeC$qmPg`Vw@8JYkg_{2utqO? zcLjH5Q2YSkrv7c@vq_HYQXpwBFGmlWcdckfe5G#>W8F z!JOKgJbLhrpX*Nuhg&)vzBUVFS4Mx4F0`pk4tx@{;J0$^@p?64ZdnO zS?THniMX1oVX_NN=)bHr5E8B4R$P20>00_5btr0saQiJ{dQ`9z=2iN{@hPGaz;&PP z)YJ-NsC#9UT8egCn)ioCF$g?Saqq9E4pj$In!keeXmXs?eBf(@=9)XN<#xql2cn=o z*iRxnuZBO{p77?}AT}UGzan-%giM!K^>&SIl4eyp*%uvoH8!yw%GRtkL(8PT}W_;mE!`KaMuCm~poC+lQa zRhB8`meTQ48R*Qn>NzEEl&KTB&tJ$lpl>@iQyrcx{Xygbx-&o6 zE?)?~M^CLgz+OSJZ-eF$ub#2>Yc<=wfZbC6(tPK;tn0l_Jo%u_+_@$?B=J*C;x^M( zdID6DZf}e{u!xe1_t*G*nl@{KVG$m^^X&#J4x*qe&;0boenHDr2v5x}QXb+-7FG0^ zO(lZrH*zQ!`sWhDhiy``=g>XL@X!KuD?zGP)_Cj^q@|px&|?!D5x`Fg0TnjWcQ$c| zE8|b{#}aMIqq}#lN!sk7Njp?&U;uR+_oB1`tf1w>RLk5V08!K6q@)4C=PE?*!jlI8 z@+$f?rvUpL9(VN5*94HAxpzgb0=+2!T8fh?Zx&pu^_znj3*2t~eOW3C1UPRBCo2;Lx1 z6=C4c9#}yEEeABqZ$toMO1JW+Bmugo*ZyaIVmYnR_ScvXP{bm!?#dGbn)EvSupbiYEAm=NhrMOYO5V0<#LOy(4$%3p_Z$?wj z@m%7Wz5m?oP%j9)qs64#NLoUi-&SAQ32@A?@EgNl^eigOeitIKW^fabe1}_@oclBy z=&iG8*dtj-%syN#UJtk6GS!%ldXR}=sb6Pj=**Gj^om64;U*kPnn}&*1XdL#7Tg%1 zOtm@CtDzy>>X`UqweXHO2KFc-YcOli*tFsKazr5d(Al)I5111%oYW;=B7{W0bZA<@ zxZ5w6^cyvJbr2eU;^COwy!ST0-MYKELEtBX-#*A{gnzq*v7A78I7rT2vU*re2br}q zvBvnfSfL+x)#Q=s&moE_Cd`NHIF(++M7@UHeJ^XPcy_0pOG)rHj)cIryDoyWL~g)Z zRmJpY?8XrrZ!Q$U2TjMb)~~oJxqs!)TIBf|OV1;Km_Ia$pj~t*LDT0n)wiXh&=4Rqv2{>OCV3N$7A)k` z7M&Lvtfk}|ok=X|@l92Fc#z6PuRN}Va^A)*Ml!Q`1q_hdV*ek-8c21-=&aRi6CvU3 zpV}$S#eB*DeiFIf)j@Zu$WYtDL%`lBQNy9wedB$BA6*6MfZIjk7 zfq$3hE8mJ6Bi?9)CC383S$m)R+>^8OV2ghuoQp~K+o)%&F}E$lobouE}^ zqbeg}Gz>rn;S7GtymYYbPfU&s<~WkD0#5@x)}42Ok2Ml=M}hsVR%Yv%wccx5xX@!= zCb=wc#Y}>lk>h=a0Byrtul+LEy2k#H2`<{H7nOcEvk<5*0WH8l}}n3=OzZqI}zv>DFM2*bZgzLu&IeBT<&eJU}XMV z<`USGp-=gsxPK<6q}io36XggpY#lEF*b}IOJB=CTrz(hQwRmOhPW^cg%Awx^cs;*m z#3sVt-bgQ$z)w%jsr~b;@5i@}A^+!j7{*UYe@p*C` zJpYa<2a^5gz4;gnytbdY{}t4<5g~6h>ORWGB_aYs+W@seyu6t2dx^?(G}XSB)uXs! zFzyInis*S6!YS@GUNHGSLAR^EyZfzM-SVXdbCh%iD}=q(9uWFZ-hmVb=5scwOIjB7 zVb(U zKBLQ4LL&H+^PjZ=_$IGPQPx8P2T2B^d_q5j*$YDGNCtetzhm?E)P6z??@G8W;t1X( zM{~NTxJeJIvW&frd;_vfr>%=a?@qi;98v_2$Mg1De@t|FM14&a^_wy)>+OT=h00fN zRIESW-7_Bts4&qOQ>0$WuxkDWzjY~%Zt3z&oe3pZ5S3vnypzY5flmNdD{MlIyx72) z`BR~jm~CMtk(;5vD0g}{f8M%iy3i>2U#7ED_&ps7qMq_GB1QUS$xl%g#J|~}itB&p zg$yV{+S%yW8GP1R9la#e4jbL10YnmMJesP`9J!Ro-GKg&lOyc0ZW4|aCFrQf@H$7pjL$KC9!)0qG! z@0M%FO;EW#P(m|`FQqamRE}|{0Z4H9K39YDF0kK_*-5^r#J@J^-KU?v-_V5VcFVlW z-$%dSyltj{xGwo%|4+@kGQ#fn6DfmNksOmg9jvPNj_ceP5G}Ib7l_{IOu~RINCZzC-Vp8(J#362^LV z;&;w9W6m*%7x&D4&dEc3)@|H{O~S^~5WC?}iNPUAMVSqV*I)hq*AgZ%e4_p&PBwt# zeqGD|;xpAKp|B7plz_PDG&8??akx!Es2c$NEzbXGeS_;h5R=-bZ5 zfKy_QTrYj{*!aRYlIRVMoCiz~uR7tg7QMr%-``tbLLw4jU|MBisj%Aw{Gw!diJh4tQ1k`6ONm zn*x;M`zHe`L&1l&EuZVH@Khp_iS0GDp*R37ZOEZ{TcW3tW8n@t5$D z`CV5y=#X@7eSzm;QdDgAOxDY;xL@g?{yktQz`Cl;oV&>{KoPeo{n-E_4)yOx6%?9M zy&@VoE;_;0%&hh;4x(=$7cVnHw{y$O#Zyv86&MTCLo%5yyaMj653NnlV+JCeb4WAjCHujh=er zWH|$WHN;-6NSAn&hO7z{(hB5|@ z*P|Q&#P6b{wWjPU%9`V@u0JGme*C_gde%TfD?cd(Zm~X|tG1FgzR{`Fy`B~?XkAv1 zw_ne7lfi8J3B}NnLzOrl5c2hcz=C4l{gM~dSXFC}Kd|?K>Nmxi4`wysnJ~39{A=vu z*?)GMKZ2p>^{ZanBt=xB2xeC%QhNhSj?nd}J;8d|70Do1u2>rqar_lAFxrE_){F)0 zZa4YHGg}8#f&U z-$P%K^}PU+{NflpO97#o;o`U_zL2SClorG(6=OG~DcyZfq3i^u6H|6f+}+du6!L}) zNPA9ixI;#mj>|VgD>8z;?!KG~elel)Y0dH@X~i0Y1S9v zAs&LinVF%W10U`@sUuvufln{gyjhvxhSD93=mpUO+AQ}o|1G1MXXwS78xX4uo?h^N zDTaCadNOz;o&X+OSt!WUhu(dbXm$^^0H8m`zw9yHzmv~HUh`VPE9X2{-MxNP#yn0g zm2!wRUbDk+l^8i>r?nxBbx_1Qq|Wd0qzjVD1P*_Gdem@KmyKicMmqS!6`rE~;a?N0 zhfpuU-}%;*uR{B!QQA^)KEp$&HwYD?lE~?HFlzq;&b? zF?>TB^TUJ^*m7w*>`!$zC)2Vy;Qvc?q&3wOb_lx=xB}#OpIkKpwj3b;S-2=AzFMNR zJjfQiVuW^;dl|@Vhl?HFe(N0s!Kq$^rtM~G0(kHL0Nw8b!Tmkw9{~m`d94Bx3PEJ^ zTJw{cVK4vn{#8fCB@AeS8?w;@7P#Zq&~IZ7bYrt!NeMCM-8W4g!WPrsOFA?9*ba$^ ziQ8Kxqsx?FKhd1?)Em0f+7&kiRgze@gB3B~3yj@xh*_^}D9qj~HJ2$bbnX3k`<8V( zc`>qb!{<4Cs6D%Fw;zsJaKT0%!%ghS#q#KwMg|5biTabaUcc@d_?|P;Y5X@fxrQF| zh+`?QQAj~=sDJkRQK{uJ0dLDrtn+`nd3f zH3=E*I-*y#Qu7as8VCn-#)L)xHpbkAcw~_*Pyib4y_qSZTJ}4=^$I!8>6y08{D;|d zWTHVYe0bJ(`)LxKeo!*nI#MC3mE5@J_(nxiQn6fy(g5d z)%{dhe=P^)YQeEUYGd?G^v;l4P8J#kcQps}qIWs#GVZ~z&cUcc51%Gu?e)EBofx~u zlcw@7J$EcArTQd62bsQSl=)XwKAmj0{_hlXljI%L)v240NpV1Kd2tPHhl-S0w#&(= z6)oO5xI1A@k`iGeh+X>xY)b8tX97;*>2oe?B@V-wN1u!CxRd*YA=$y0sDnWg_o|K_-g`P$!=z_`j%dWsCUEpi7zZ zY1+jk!Pc(#L3D~(RM}6xY#wOOsJYvzy8&4IS{$0vbI3oan;Bi~Sh^Ot4{!Zuzh=}n zvm)Y8K+jiKC;#ettFzZ~@ApsvMVI2+Jj2Y3cvtQ=A*f*6FurQ@L+i2^-`T?kLCVe- zUp`|L`x7Eh8kztG?k5!6gvg~9Wf;_84FMWg-~WkoA!dYXi5kvEfD@JYojN%PPLdeR zPpu@oYD6&ZTHyfFK)Kb;TM|g;LxB0cufb%*wM~In=a>F!Bf^`beKF1f43BSlojjhJ z6tQ-=$~==d2-7j;>iIiaFwJXBa~;C?Qej%SN!!lneT8Ui)~?X6>UzJcpG0ybPWF!F z*T66M4QGIMTpirI*&hR20$Cgku|(vss>;jQn+b=Q4NTrPGip@mwxQAY{V>yaHBbo%CkyeqfZ{ zr+urZXZZ`&&c-$W)fV`ZiKf|aN5uY};_u7y3$}Si4`R-DEYAhlKpB2R2w3#eH6-c_ zG>pvRUW=mmdKM)C9k~}y@t%#RG0TsicOn-)Xm#;`#2bI-JzizMji^(2RMix=XhT*T zMZ~zlK*RV-QoyYOC-uJqg4iNaIFvw_tYNmP%3Gv>%o*AAxA}VL>CX`4$;~oAwote2 zP;FGz-Tux!Ez&zB7H6)-{}lNBSJ_tiKb3KS|0>)5EBk{ohu2WBadSsgcXzcgajDZ{uiZVg4c9+&{|PtkIz=|EJ7NPv4$QoA}N1)KI7acQMS(=8JpU z1`fTAeIuTa{9yDBukCi-U7<((=ke3?NRjdLXf7_&)gy;*aVYS}#la}>!E=bQ#j&wD zYQ{s7eP;nEUJ_r0sdGz&!CvBw!d(yVRzHMmm+#KgRQ}=&rk!L7Y=XqzLDA?d@4N*J z($*x|Qw>CkJ`bDL%gbH0WAS_B46CgF&h+cLsYqlzpK?$S6n-FxpxjnsQW$kNGTi!z zcZg*9I`-U*;lG^=9HV@sai?1z&9O9b*b@q!u2!x7q8{MRMct5N6Jg((bCe`uhD^;4 zpD0s^Wz8FU2T{_ylr6W=(_3QZBU=BVf<_a~ycU)elO&l?M!t1$IjkG^!(iZEXVBT} zswN+$$wMX+a^`jrVg3q5By~`d=mWJVFyrj6=6uVqG%z73K23rY0OOy7!QLfx+|4*` zV{n1(;Sd#~ypHuPHtVJLg=oM6=pgmL=d38nB3JnskUl^kbm)d`5_Ve46p_c6&h5@m z???6v{L4BBn0IPWtRq|aBe+asSAd}<>To$K-)1y}UkxJ*9WC#P(FV0iRGwsl9^S>1 zjKe`$Frbs?08S83o%zuJI|9D3v1>aFHu|9sX->Whm0TxKr4@@(8&YAdb9+?lJtpZmefJ#RG<)M0L8*i2$L(MP z>b}zfIGBzhFiFdsJo-fhR0<8uDpBjG5Xt+kiXsFjwKSLf>1+?XEy^^Fqj>W6$LN)K zzU8|Oy*+yMIf_`j48oUtN3-$r(Nj2>_;c&65cif7CA2QJrXPy30*8a&2Ns-z9X*uS zq|4Wqk`el3`8^kCpF5~w%NLO0|&nok?#Fo3S`Oy3wC1h2wiKoQr)qJ^qf^yEOzS=El+H=Byc@ph z-{|*tcO?L)?djxFDQy?SKdc!J)X!YgsZwO|8bt|8323wx27J%Wgkmeq%F=3Wt%F#k!@ud`8j1qHiMSe242sE zGc%qZO;VequZ4f?SUE$ntFs9&eL<7P#is-xOb~7DRY$L#v9e;KS90Wl7r_n zl^UmdHrH&PTJSlGY{x=&GG#G`XzgsFNn4F5CwD!D)VQ@ z{w;pXDQM8|5ylcE_bEPT`WK!>H;pb5h2`;M%b8Eh-&zS2lkk#@{UTt?A9vr&X=*aN zhBV|NG`N70PyfndbGDbxTyXOG%wxHb*U@5K_Zb7`<7(Mwp0F6$zA{deG$Vx3kC}-6 zZFYTiKDE+@MiuMzKG$1~9=DP-@iU@K3%N4EkN;&z>#v8$%`fye)#7}+#N}P8bNf({ z<~hLtX&o%QKb_qp1U@{@Q2;N(U_gOU7m8AY*-XE zkb$at$^AXgUcP}9o_g6;;Bu1b%Jh{kSW`iCoAYXzUeznt{En%h;9nVOsx+`cZCk)( z*ma)}hQLntdlFWeR9ZlqGEpl%>mmg_ufH42c&Cc^2!=xiDUqsj(-`U{F|?9YJC>KX z9gI%3Ku^I}S-)h-Ca>2vu?efnZ8vW}U&*!!Y*NLO{BM0`mt$%LbzE)7gyW|DIH9`C zE#h7BwB$9*7{%&ZImbTa0R54M%`BJp8E#j(Mbdr!+Cu|Qfw%<+?`4K`V{5Eg`jNKV zpXTDdy2RH-3EQH($*_&v>&&C(K3m7|gT~BhOhdW5h;W4wT5*PlRM7-S>1dqr#Sxk- z*U|=~fBv;mh4?v<@tgHZrwn*9=y;)Jq>vZoVtNEd;z=(wOrX@H4dc=o#sK}|3WV#x zfkT-O3R@$n`z|oDs1*5{bxwS-4?7j=7%JC+M}$AYbS6N-37>2cLk9W&-Oc*{qY(<0z0W zJd8CniJ|IJ z?y;+D(a`RhNE+L7Na~lyOXA_jgPcf6`qPSElGz}{jl>+gCJQ7lUed~GAp});)dn)@ zWQ_`;`EH+HRcVLvjH{7Gn-fOdb=ex5{G9rdR`I*wEFWtrIc;tsVwRI|WJnG2$h+C2 zp$Qg%^N2V*ttE*rEPv>;Wqs8fTCn&ylL%?;#RxE0VV7_jbk%KtkhzT_#*Qw2mZzmF zF0MYM9!6mke+;n5+i&m==()}i7V5VoQ``QxQf2Yku<^^0BTq(u@;9zu!nvPSsqayF zW;1x7LHXXgIB3W6`xQ#+qM z>(*L6&dZyX z`D-K}D;bpjXZHGt@08<(!E%o^chrV!wuOkabZvGz8e6FKE9V){>7I4ld9%Yb zm=#^)%qQO!pRBH)dPr)WZ}gU*N$nMdy{b(P`!CI4;B#x3cuQibt%|lwRI;&iPO_Be zlLft#Re(z|vP3oti(YI<@(jIczT%fvVz=(~^VQ2L|Hj-|H<3a3q;lDb8^?{WcusJi&?z? zFgPz?y~8Z_MCfnV*{Zwa9u}0yd7p?`5FovFTgn_Z-IcMSigsIrJMPP<@00d^aQTY; zrz`%38K)F}vHvo6_zfyja-?qoPDuVSlQzn*3sK$%?Q$2#=hFi=lY-BEcvz?JXJft@AXd% z@mTeBzxRRrtwqrq;nFKR872oVzGo45`)1J2=f6^pp4uI1=M7BEaYc+rjV>?(VXs12S|c7!GTL z=671mI{Uq8Lk%9j(!@#&G%vKw3RG-0_`oUrFEaXZoQa z!Jm)j+~e@&O2MP)k4?VZI)0_@ z(z*|~65>70yY&u)du+VdoqbvCzCbR!j7*|>ZusZ9TS^-**E5*Ln7jja%?^Q&RmlQ( z*uclC0FN&Lci1R7Rt0DR6L6g-smGjSetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); - fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); diff --git a/EOverPCalibration/src/FastCalibratorEE.cc b/EOverPCalibration/src/FastCalibratorEE.cc index e17fbc58663..8797b605615 100644 --- a/EOverPCalibration/src/FastCalibratorEE.cc +++ b/EOverPCalibration/src/FastCalibratorEE.cc @@ -138,7 +138,6 @@ void FastCalibratorEE::Init(TTree *tree){ fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); - fChain->SetBranchStatus("e3x3SCEle", 1); fChain->SetBranchAddress("e3x3SCEle", &e3x3SCEle, &b_e3x3SCEle); fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); diff --git a/EOverPCalibration/src/TEndcapRings.cc b/EOverPCalibration/src/TEndcapRings.cc index b8a61d872c8..ddb38b1fbc5 100644 --- a/EOverPCalibration/src/TEndcapRings.cc +++ b/EOverPCalibration/src/TEndcapRings.cc @@ -14,8 +14,8 @@ TEndcapRings::TEndcapRings() iEndcapRing[ix][iy][iz] = -1; FILE *fRing; - fRing = fopen("./CommonTools/eerings.dat","r"); - std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; + fRing = fopen("../EOverPCalibration/CommonTools/eerings.dat","r"); + std::cout << "Inizializing endcap geometry from: eerings.dat"<< std::endl; int ix,iy,iz,ir; while(fscanf(fRing,"(%d,%d,%d) %d \n",&ix,&iy,&iz,&ir) !=EOF ) { From 30e056afbde3eadb0206d638da85edcede8e516d Mon Sep 17 00:00:00 2001 From: lbrianza Date: Fri, 26 Sep 2014 15:56:53 +0200 Subject: [PATCH 454/475] E/p calibration integrated in ZFitter.cpp --- ZFitter/BuildFile.xml | 1 + ZFitter/README | 18 + ZFitter/bin/ZFitter.cpp | 541 +++++++++++++++++- ZFitter/data/validation/EoverPcalibration.dat | 4 + ZFitter/data/validation/test.dat | 4 +- 5 files changed, 561 insertions(+), 7 deletions(-) create mode 100644 ZFitter/README create mode 100644 ZFitter/data/validation/EoverPcalibration.dat diff --git a/ZFitter/BuildFile.xml b/ZFitter/BuildFile.xml index 002a03db091..6426de96772 100644 --- a/ZFitter/BuildFile.xml +++ b/ZFitter/BuildFile.xml @@ -3,6 +3,7 @@ + diff --git a/ZFitter/README b/ZFitter/README new file mode 100644 index 00000000000..1f03afb5e59 --- /dev/null +++ b/ZFitter/README @@ -0,0 +1,18 @@ +for the E/p calibration, run with: (from the ZFitter directory) + +ZFitter.exe -f data/validation/EoverPcalibration.dat --EOverPCalib --isBarrel=1 + +Parameters: + -> inputFileDeadXtal= Add dead Channel to evaluate the effect on the IC + -> isMiscalib = Miscalibration 5% option + -> isSaveEPDistribution = save E/p pdf + -> isEPselection = apply E/p selection setted in the .cc + -> isR9selection = apply R9 selection > 0.9 + -> isMCTruth = use calibration E/E_{Truth} + -> outputFile = output file + -> numberOfEvents = -1 (all statistic) + -> useZ = 1 (use Z event) 0 (no Z event in IC procedure) + -> useW = 1 (use W event) 0 (no W event in IC procedure) + -> splitStat = 1 (split odd and even event) 0 (no split) + -> nLoops = number of L3 iteration + -> isBarrel = barrel (1) or endcap (0) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 0913194243a..ce105acffb9 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -40,6 +40,11 @@ configuration files. #include "../interface/RooSmearer.hh" #include "../src/nllProfile.cc" + +#include "../../NtuplePackage/interface/ntpleUtils.h" +#include "../../EOverPCalibration/interface/CalibrationUtils.h" +#include "../../EOverPCalibration/interface/FastCalibratorEB.h" +#include "../../EOverPCalibration/interface/FastCalibratorEE.h" /// \endcode /// @endcond @@ -289,6 +294,33 @@ int main(int argc, char **argv) { std::string minimType; std::vector branchList; +//options for E/p + std::string jsonFileName; + std::string miscalibMap; + bool isMiscalib; + bool isSaveEPDistribution; + bool isMCTruth; + bool isEPselection; + bool isPtCut; + float PtMin; + bool isfbrem; + float fbremMax; + bool isR9selection; + float R9Min; + int miscalibMethod; + std::string inputMomentumScale; + std::string typeEB; + std::string typeEE; + std::string outputPath; + std::string outputFile; + int numberOfEvents; + int useZ, useW; + int isBarrel; + int splitStat; + int nLoops; + bool isDeadTriggerTower; + std::string inputFileDeadXtal; + //------------------------------ setting option categories po::options_description desc("Main options"); po::options_description outputOption("Output options"); @@ -296,6 +328,7 @@ int main(int argc, char **argv) { po::options_description fitterOption("Z fitter options"); po::options_description smearerOption("Z smearer options"); po::options_description toyOption("toyMC options"); + po::options_description EoverPOption("EoverP options"); //po::options_description cmd_line_options; //cmd_line_options.add(desc).add(fitOption).add(smearOption); @@ -401,12 +434,42 @@ int main(int argc, char **argv) { ("constTermToy", po::value(&constTermToy)->default_value(0.01),"") ("eventsPerToy", po::value(&nEventsPerToy)->default_value(0),"=0: all events") ; + EoverPOption.add_options() + ("EOverPCalib", "call the E/p calibration") + ("isBarrel", po::value(&isBarrel)->default_value(1),"1=barrel, 0=endcap") + ("jsonFileName", po::value(&jsonFileName)->default_value("../EOverPCalibration/json/Cert_190456-208686_8TeV_PromptReco_Collisions12_JSON.txt"), "jsonFileName") + ("isMiscalib", po::value(&isMiscalib)->default_value(false),"apply the initial miscalibration") + ("miscalibMethod", po::value(&miscalibMethod)->default_value(1),"miscalibration method") + ("miscalibMap", po::value(&miscalibMap)->default_value("/gwteray/users/brianza/scalibMap2.txt"), "map for the miscalibration") + ("isSaveEPDistribution", po::value(&isSaveEPDistribution)->default_value(false),"save E/P distribution") + ("isMCTruth", po::value(&isMCTruth)->default_value(false),"option for MC") + ("isEPselection", po::value(&isEPselection)->default_value(false),"apply E/p selection") + ("isPtCut", po::value(&isPtCut)->default_value(false),"apply Pt cut") + ("PtMin", po::value(&PtMin)->default_value(0.),"treshold for the Pt cut") + ("isfbrem", po::value(&isfbrem)->default_value(false),"apply fbrem cut") + ("fbremMax", po::value(&fbremMax)->default_value(100.),"fbrem treshold") + ("isR9selection", po::value(&isR9selection)->default_value(false),"apply R9 selection") + ("R9Min", po::value(&R9Min)->default_value(-1.),"R9 treshold") + ("inputMomentumScale", po::value(&inputMomentumScale)->default_value("../EOverPCalibration/output/MomentumCalibration2012"),"input momentum scale") + ("typeEB", po::value(&typeEB)->default_value("eta1"),"") + ("typeEE", po::value(&typeEE)->default_value("eta1"),"") + ("outputPath", po::value(&outputPath)->default_value("output/output_runD/"),"output dir for E/P calibration") + ("outputFile", po::value(&outputFile)->default_value("FastCalibrator_Oct22_Run2012ABC_Cal_Dic2012"),"output file for E/P calibration") + ("numberOfEvents", po::value(&numberOfEvents)->default_value(-1),"number of events (-1=all)") + ("useZ", po::value(&useZ)->default_value(1),"use Z events") + ("useW", po::value(&useW)->default_value(1),"use W events") + ("splitStat", po::value(&splitStat)->default_value(1),"split statistic") + ("nLoops", po::value(&nLoops)->default_value(1),"number of iteration of the L3 algorithm") + ("isDeadTriggerTower", po::value(&isDeadTriggerTower)->default_value(false),"") + ("inputFileDeadXtal", po::value(&inputFileDeadXtal)->default_value("NULL"),"") + ; desc.add(inputOption); desc.add(outputOption); desc.add(fitterOption); desc.add(smearerOption); desc.add(toyOption); + desc.add(EoverPOption); po::variables_map vm; // @@ -441,7 +504,7 @@ int main(int argc, char **argv) { if(!vm.count("regionsFile") && !vm.count("runDivide") && !vm.count("savePUTreeWeight") && - !vm.count("saveR9TreeWeight") && !vm.count("saveCorrEleTree") + !vm.count("saveR9TreeWeight") && !vm.count("saveCorrEleTree") && !vm.count("EOverPCalib") //&& !vm.count("saveRootMacro") ){ std::cerr << "[ERROR] Missing mandatory option \"regionsFile\"" << std::endl; @@ -471,19 +534,19 @@ int main(int argc, char **argv) { //============================== Check output folders bool checkDirectories=true; checkDirectories=checkDirectories && !system("[ -d "+TString(outDirFitResMC)+" ]"); - if(!checkDirectories){ + if(!checkDirectories && !vm.count("EOverPCalib")){ std::cerr << "[ERROR] Directory " << outDirFitResMC << " not found" << std::endl; } checkDirectories=checkDirectories && !system("[ -d "+TString(outDirFitResData)+" ]"); - if(!checkDirectories){ + if(!checkDirectories && !vm.count("EOverPCalib")){ std::cerr << "[ERROR] Directory " << outDirFitResData << " not found" << std::endl; } checkDirectories=checkDirectories && !system("[ -d "+TString(outDirImgMC)+" ]"); - if(!checkDirectories){ + if(!checkDirectories && !vm.count("EOverPCalib")){ std::cerr << "[ERROR] Directory " << outDirImgMC << " not found" << std::endl; } checkDirectories=checkDirectories && !system("[ -d "+TString(outDirImgData)+" ]"); - if(!checkDirectories){ + if(!checkDirectories && !vm.count("EOverPCalib")){ std::cerr << "[ERROR] Directory " << outDirImgData << " not found" << std::endl; } // checkDirectories=checkDirectories && !system("[ -d "+TString(outDirTable)+" ]"); @@ -496,6 +559,7 @@ int main(int argc, char **argv) { && !vm.count("saveCorrEleTree") && !vm.count("saveR9TreeWeight") && !vm.count("saveRootMacro") + && !vm.count("EOverPCalib") ) return 1; if(!dataPUFileName.empty()) dataPUFileNameVec.push_back(dataPUFileName.c_str()); @@ -1100,6 +1164,473 @@ int main(int argc, char **argv) { data= (tagChainMap["d"])["selected"]; mc = (tagChainMap["s"])["selected"]; } + + if(vm.count("EOverPCalib") && isBarrel==1) { +///////// E/P calibration + + std::cout<<"---- START E/P CALIBRATION: BARREL ----"< > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + std::cout<<"JSON file: "< g_EoC_EB; + + for(int i = 0; i < nRegionsEB; ++i){ + TString Name = Form("g_EoC_EB_%d",i); + g_EoC_EB.push_back( (TGraphErrors*)(momentumscale->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = data->GetEntries(); + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + + if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_miscalib_EB",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_EB",outputFile.c_str()); + + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_R9_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_miscalib_EB",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_miscalib_EB",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_EB",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_EB",outputFile.c_str()); + else { std::cout<<" Option not considered --> exit "< exit "< > > jsonMap; + jsonMap = readJSONFile(jsonFileName); + std::cout<<"JSON file: "< g_EoC_EE; + + for(int i = 0; i < nRegionsEE; ++i){ + TString Name = Form("g_EoC_EE_%d",i); + g_EoC_EE.push_back( (TGraphErrors*)(f4->Get(Name)) ); + } + + ///Use the whole sample statistics if numberOfEvents < 0 + if ( numberOfEvents < 0 ) numberOfEvents = data->GetEntries(); + + + /// run in normal mode: full statistics + if ( splitStat == 0 ) { + + TString name ; + TString name_tmp; + + if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_miscalib_EE",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_WZ_Fbrem_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_WZ_PT_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_EP_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 1 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_WZ_noEP_EE",outputFile.c_str()); + + + + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_R9_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_miscalib_EE",outputFile.c_str()); + else if(isMiscalib == true && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_miscalib_EE",outputFile.c_str()); + + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_WZ_R9_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==false && isEPselection == false && isfbrem == true && isPtCut ==false ) + name_tmp = Form ("%s_W_Fbrem_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == false && isfbrem == false && isPtCut ==true ) + name_tmp = Form ("%s_W_PT_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isR9selection ==true && isEPselection == true && isfbrem == false && isPtCut ==false ) + name_tmp = Form ("%s_W_EP_EE",outputFile.c_str()); + else if(isMiscalib == false && useZ == 0 && isEPselection ==false && isR9selection==false && isPtCut ==false && isfbrem ==false ) + name_tmp =Form ("%s_W_noEP_EE",outputFile.c_str()); + else { std::cout<<" Option not considered --> exit "< exit "< Date: Fri, 26 Sep 2014 16:00:57 +0200 Subject: [PATCH 455/475] E/p calibration integrated in ZFitter.cpp --- ZNtupleDumper/src/ZNtupleDumper.cc | 411 ++++++++++++++--------------- 1 file changed, 203 insertions(+), 208 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index 7f09cd0585b..d99bf841d11 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -221,12 +221,11 @@ class ZNtupleDumper : public edm::EDAnalyzer { // selection Int_t eleID[2]; ///< bit mask for eleID: 1=fiducial, 2=loose, 6=medium, 14=tight, 16=WP90PU, 48=WP80PU. Selection from https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaCutBasedIdentification#Electron_ID_Working_Points - Int_t isW; - Int_t isZ; Int_t chargeEle[2]; Float_t etaSCEle[2], phiSCEle[2]; ///< phi of the SC Float_t etaEle[2], phiEle[2]; ///< phi of the electron (electron object) + Int_t isEBEle[2]; Int_t recoFlagsEle[2]; ///< 1=trackerDriven, 2=ecalDriven only, 3=tracker and ecal driven @@ -243,7 +242,9 @@ class ZNtupleDumper : public edm::EDAnalyzer { Float_t avgLCSCEle[2]; - Int_t isEBEle[2]; + + + Float_t energyMCEle[2]; ///< Electron MC true energy Float_t energySCEle[2]; ///< corrected SuperCluster energy @@ -335,13 +336,16 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t nHitsSCEle[2]; std::vector recoFlagRecHitSCEle[2]; std::vector rawIdRecHitSCEle[2]; - std::vector XRecHitSCEle[2]; - std::vector YRecHitSCEle[2]; - std::vector ZRecHitSCEle[2]; + std::vector XRecHitSCEle[2]; + std::vector YRecHitSCEle[2]; + std::vector ZRecHitSCEle[2]; std::vector energyRecHitSCEle[2]; std::vector LCRecHitSCEle[2]; std::vector ICRecHitSCEle[2]; std::vector AlphaRecHitSCEle[2]; + Int_t isW; + Int_t isZ; + //============================== //============================== check ele-id and iso @@ -560,7 +564,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(WZSkimResultsHandle->accept(*alcaSkimPath_itr)){ skipEvent=false; std::string hltName_str(alcaSkimPathNames.triggerName(*alcaSkimPath_itr)); - if(hltName_str.find("WElectron")!=std::string::npos) + if(hltName_str.find("WElectron")!=std::string::npos) eventType=WENU; else if(hltName_str.find("ZSCElectron")!=std::string::npos) eventType=ZSC; @@ -655,6 +659,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } bool doFill=false; + isW=0; + isZ=0; if(eventType==PARTGUN){ pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); pat::ElectronCollection::const_iterator eleIter2 = eleIter1; @@ -701,9 +707,8 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if( eleIter1->et()<30) continue; doFill=true; - isW=1; + isW=1; if(eventType==UNKNOWN) eventType=WENU; - TreeSetSingleElectronVar(*eleIter1, 0); //fill first electron TreeSetSingleElectronVar(*eleIter1, -1); // fill fake second electron @@ -727,7 +732,7 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if((mass < 55 || mass > 125)) continue; doFill=true; - isZ=1; + isZ=1; if(eventType==UNKNOWN) eventType=ZEE; TreeSetDiElectronVar(*eleIter1, *eleIter2); @@ -817,7 +822,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if(doFill){ - tree->Fill(); if(doExtraCalibTree) extraCalibTree->Fill(); if(doEleIDTree) eleIDTree->Fill(); @@ -974,10 +978,6 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("eleID",eleID, "eleID[2]/I"); // tree->Branch("nBCSCEle", nBCSCEle, "nBCSCEle[2]/I"); - tree->Branch("isW",&isW, "isW/I"); - tree->Branch("isZ",&isZ, "isZ/I"); - - tree->Branch("isEBEle",&isEBEle, "isEBEle[2]/I"); tree->Branch("chargeEle", chargeEle, "chargeEle[2]/I"); //[nEle] tree->Branch("etaSCEle", etaSCEle, "etaSCEle[2]/F"); //[nSCEle] @@ -996,7 +996,6 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("seedEnergySCEle", seedEnergySCEle, "seedEnergySCEle[2]/F"); tree->Branch("seedLCSCEle", seedLCSCEle, "seedLCSCEle[2]/F"); - tree->Branch("avgLCSCEle", avgLCSCEle, "avgLCSCEle[2]/F"); tree->Branch("gainEle", gainEle, "gainEle[2]/b"); @@ -1062,7 +1061,6 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("R9Ele", R9Ele, "R9Ele[2]/F"); - tree->Branch("e3x3SCEle", e3x3SCEle, "e3x3SCEle[2]/F"); tree->Branch("e5x5SCEle", e5x5SCEle, "e5x5SCEle[2]/F"); //tree->Branch("eSeedSCEle", eSeedSCEle, "eSeedSCEle[2]/F"); tree->Branch("pModeGsfEle", pModeGsfEle, "pModeGsfEle[2]/F"); @@ -1112,27 +1110,6 @@ void ZNtupleDumper::InitNewTree(){ tree->Branch("nHitsSCEle", nHitsSCEle, "nHitsSCEle[2]/I"); - tree->Branch("rawIdRecHitSCEle1", &(rawIdRecHitSCEle[0])); - tree->Branch("rawIdRecHitSCEle2", &(rawIdRecHitSCEle[1])); - tree->Branch("XRecHitSCEle1", &(XRecHitSCEle[0])); - tree->Branch("XRecHitSCEle2", &(XRecHitSCEle[1])); - tree->Branch("YRecHitSCEle1", &(YRecHitSCEle[0])); - tree->Branch("YRecHitSCEle2", &(YRecHitSCEle[1])); - tree->Branch("ZRecHitSCEle1", &(ZRecHitSCEle[0])); - tree->Branch("ZRecHitSCEle2", &(ZRecHitSCEle[1])); - tree->Branch("energyRecHitSCEle1", &(energyRecHitSCEle[0])); - tree->Branch("energyRecHitSCEle2", &(energyRecHitSCEle[1])); - tree->Branch("LCRecHitSCEle1", &(LCRecHitSCEle[0])); - tree->Branch("LCRecHitSCEle2", &(LCRecHitSCEle[1])); - tree->Branch("ICRecHitSCEle1", &(ICRecHitSCEle[0])); - tree->Branch("ICRecHitSCEle2", &(ICRecHitSCEle[1])); - tree->Branch("AlphaRecHitSCEle1", &(AlphaRecHitSCEle[0])); - tree->Branch("AlphaRecHitSCEle2", &(AlphaRecHitSCEle[1])); - - tree->Branch("recoFlagRecHitSCEle1", &(recoFlagRecHitSCEle[0])); - tree->Branch("recoFlagRecHitSCEle2", &(recoFlagRecHitSCEle[1])); - - #ifdef shervin tree->Branch("sigmaIEtaIEtaSCEle", sigmaIEtaIEtaSCEle, "sigmaIEtaIEtaSCEle[2]/F"); tree->Branch("sigmaIEtaIEtaSCEle", sigmaIEtaIEtaSCEle, "sigmaIEtaIEtaSCEle[2]/F"); @@ -1250,6 +1227,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int chargeEle[-index] = 0; etaEle[-index] = 0; phiEle[-index] = 0; + isEBEle[-index] = 0; return; } @@ -1257,6 +1235,8 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int chargeEle[index] = electron1.charge(); etaEle[index] = electron1.eta(); // degli elettroni phiEle[index] = electron1.phi(); + isEBEle[-index] = electron1.isEB(); + if(electron1.ecalDrivenSeed()){ if(electron1.trackerDrivenSeed()) recoFlagsEle[index]=3; @@ -1267,8 +1247,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int fbremEle[index] = electron1.fbrem(); // fatta con pIn-pOut etaSCEle[index] = electron1.superCluster()->eta(); - phiSCEle[index] = electron1.superCluster()->phi(); - isEBEle[index] = electron1.isEB(); + phiSCEle[index] = electron1.superCluster()->phi(); const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); //assert(recHits!=NULL); @@ -1426,74 +1405,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int classificationEle[index] = electron1.classification(); - - //THIS PART WAS IN THE EXTRACALIB TREE, ACTUALLY: - - recoFlagRecHitSCEle[index].clear(); - rawIdRecHitSCEle[index].clear(); - XRecHitSCEle[index].clear(); - YRecHitSCEle[index].clear(); - ZRecHitSCEle[index].clear(); - energyRecHitSCEle[index].clear(); - LCRecHitSCEle[index].clear(); - ICRecHitSCEle[index].clear(); - AlphaRecHitSCEle[index].clear(); - - // EcalIntercalibConstantMap icMap = icHandle->get() - std::vector< std::pair > hitsAndFractions_ele1 = electron1.superCluster()->hitsAndFractions(); - nHitsSCEle[index] = hitsAndFractions_ele1.size(); - - // const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); - const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); - // const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); - for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); - detitr != hitsAndFractions_ele1.end(); detitr++ ) - { - // EcalRecHitCollection::const_iterator theSeedHit = recHits->find (id); // trash this - EcalRecHitCollection::const_iterator oneHit = recHits->find( (detitr -> first) ) ; - if(oneHit==recHits->end()){ - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() - << " in subdetector " << (detitr->first).subdetId() << " bailing out"; - //assert(0); - continue; - } - recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); - rawIdRecHitSCEle[index].push_back(detitr->first.rawId()); - if(electron1.isEB()){ - EBDetId recHitId(detitr->first); - XRecHitSCEle[index].push_back(recHitId.ieta()); - YRecHitSCEle[index].push_back(recHitId.iphi()); - ZRecHitSCEle[index].push_back(recHitId.zside()); - } - else{ - EEDetId recHitId(detitr->first); - XRecHitSCEle[index].push_back(recHitId.ix()); - YRecHitSCEle[index].push_back(recHitId.iy()); - ZRecHitSCEle[index].push_back(recHitId.zside()); - } - energyRecHitSCEle[index].push_back(oneHit->energy()); - // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: - // 1) get laser correction coefficient - LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(detitr->first, runTime_)); - //laserHandle-> - // 2) get intercalibration - EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(detitr->first); - EcalIntercalibConstant icalconst = 1.; - if( icalit!=icalMap.end() ) { - icalconst = (*icalit); - // std::cout << "icalconst set to: " << icalconst << std::endl; - } else { - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() << "bailing out"; - //assert(0); - continue; - } - // 3) get adc2GeV - //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? - // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); - ICRecHitSCEle[index].push_back(icalconst); - } - - return; } @@ -1506,6 +1417,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 chargeEle[-index] = 0; etaEle[-index] = 0; phiEle[-index] = 0; + isEBEle[-index] = 0; return; } @@ -1515,6 +1427,7 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 chargeEle[index] = -100; // dont know the charge for SC etaEle[index] = electron1.eta(); // eta = etaSC phiEle[index] = electron1.phi(); + isEBEle[index] = -100; recoFlagsEle[index] = -1; // define -1 as a SC @@ -1646,100 +1559,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 eleID[index] = -100; classificationEle[index] = -100; - - //THESE INFOS WERE IN THE EXTRACALIB TREE, ACTUALLY: - - recoFlagRecHitSCEle[index].clear(); - rawIdRecHitSCEle[index].clear(); - XRecHitSCEle[index].clear(); - YRecHitSCEle[index].clear(); - ZRecHitSCEle[index].clear(); - energyRecHitSCEle[index].clear(); - LCRecHitSCEle[index].clear(); - ICRecHitSCEle[index].clear(); - AlphaRecHitSCEle[index].clear(); - - - std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); - nHitsSCEle[index] = hitsAndFractions_ele1.size(); - - const EcalRecHitCollection *recHitsEB = clustertools->getEcalEBRecHitCollection(); - // const EcalRecHitCollection *recHitsEE = clustertools->getEcalEERecHitCollection(); - - const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); - // const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); - - for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); - detitr != hitsAndFractions_ele1.end(); detitr++ ) - { - // get out the DetId of the hit - DetId hitId = (detitr -> first); - // define a iterator of the EcalRecoHit - EcalRecHitCollection::const_iterator oneHit(NULL); - - // treat it seperately for EB and EE - if ( hitId.subdetId() == EcalBarrel) - { - oneHit = recHitsEB->find( hitId ); - // protection of the missing hit - if(oneHit==recHitsEB->end()){ - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; - assert(0); - } - // redifine EBDetId and get EB hit position - EBDetId recHitId(hitId); - XRecHitSCEle[index].push_back(recHitId.ieta()); - YRecHitSCEle[index].push_back(recHitId.iphi()); - ZRecHitSCEle[index].push_back(recHitId.zside()); - } - else if ( hitId.subdetId() == EcalEndcap ) - { - oneHit = recHitsEE->find( hitId ); - // protection of the missing hit - if(oneHit==recHitsEE->end()){ - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; - assert(0); - } - // redifine EEDetId and get EE hit position - EEDetId recHitId(hitId); - XRecHitSCEle[index].push_back(recHitId.ix()); - YRecHitSCEle[index].push_back(recHitId.iy()); - ZRecHitSCEle[index].push_back(recHitId.zside()); - } - else - { - // error if not able to find the hit in EE and EB - edm::LogError("ZNtupleDumper") << "SC hit cannot be found in EB and EE. " ; - assert(0); - } - - // other information - recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); - rawIdRecHitSCEle[index].push_back(hitId.rawId()); - - energyRecHitSCEle[index].push_back(oneHit->energy()); - - // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: - // 1) get laser correction coefficient - LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(hitId, runTime_)); - // 2) get intercalibration - EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(hitId); - EcalIntercalibConstant icalconst = 1.; - if( icalit!=icalMap.end() ) { - icalconst = (*icalit); - // std::cout << "icalconst set to: " << icalconst << std::endl; - } else { - edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (hitId).rawId() << "bailing out"; - assert(0); - } - // 3) get adc2GeV - //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? - // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); - ICRecHitSCEle[index].push_back(icalconst); - - } - - return; } @@ -1927,11 +1746,35 @@ void ZNtupleDumper::InitExtraCalibTree(){ std::cout << "[STATUS] InitExtraCalibTree" << std::endl; if(extraCalibTree==NULL) return; - // extraCalibTree->Branch("runNumber", &runNumber, "runNumber/I"); - // extraCalibTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); - // extraCalibTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); - // extraCalibTree->Branch("runTime", &runTime, " runTime/i"); + extraCalibTree->Branch("runNumber", &runNumber, "runNumber/I"); + extraCalibTree->Branch("eventNumber", &eventNumber, "eventNumber/l"); + extraCalibTree->Branch("lumiBlock", &lumiBlock, "lumiBlock/I"); + extraCalibTree->Branch("runTime", &runTime, " runTime/i"); + extraCalibTree->Branch("nHitsSCEle", nHitsSCEle, "nHitsSCEle[2]/I"); + + extraCalibTree->Branch("recoFlagRecHitSCEle1", &(recoFlagRecHitSCEle[0])); + extraCalibTree->Branch("recoFlagRecHitSCEle2", &(recoFlagRecHitSCEle[1])); + extraCalibTree->Branch("rawIdRecHitSCEle1", &(rawIdRecHitSCEle[0])); + extraCalibTree->Branch("rawIdRecHitSCEle2", &(rawIdRecHitSCEle[1])); + extraCalibTree->Branch("XRecHitSCEle1", &(XRecHitSCEle[0])); + extraCalibTree->Branch("XRecHitSCEle2", &(XRecHitSCEle[1])); + extraCalibTree->Branch("YRecHitSCEle1", &(YRecHitSCEle[0])); + extraCalibTree->Branch("YRecHitSCEle2", &(YRecHitSCEle[1])); + extraCalibTree->Branch("ZRecHitSCEle1", &(ZRecHitSCEle[0])); + extraCalibTree->Branch("ZRecHitSCEle2", &(ZRecHitSCEle[1])); + extraCalibTree->Branch("energyRecHitSCEle1", &(energyRecHitSCEle[0])); + extraCalibTree->Branch("energyRecHitSCEle2", &(energyRecHitSCEle[1])); + extraCalibTree->Branch("LCRecHitSCEle1", &(LCRecHitSCEle[0])); + extraCalibTree->Branch("LCRecHitSCEle2", &(LCRecHitSCEle[1])); + extraCalibTree->Branch("ICRecHitSCEle1", &(ICRecHitSCEle[0])); + extraCalibTree->Branch("ICRecHitSCEle2", &(ICRecHitSCEle[1])); + extraCalibTree->Branch("AlphaRecHitSCEle1", &(AlphaRecHitSCEle[0])); + extraCalibTree->Branch("AlphaRecHitSCEle2", &(AlphaRecHitSCEle[1])); + + extraCalibTree->Branch("isW",&isW, "isW/I"); + extraCalibTree->Branch("isZ",&isZ, "isZ/I"); + extraCalibTree->Branch("isEBEle",&isEBEle, "isEBEle[2]/I"); return; } @@ -1952,13 +1795,165 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, const r void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int index){ - //THIS IS USELESS NOW!!! + recoFlagRecHitSCEle[index].clear(); + rawIdRecHitSCEle[index].clear(); + XRecHitSCEle[index].clear(); + YRecHitSCEle[index].clear(); + ZRecHitSCEle[index].clear(); + energyRecHitSCEle[index].clear(); + LCRecHitSCEle[index].clear(); + ICRecHitSCEle[index].clear(); + AlphaRecHitSCEle[index].clear(); + + // EcalIntercalibConstantMap icMap = icHandle->get() + std::vector< std::pair > hitsAndFractions_ele1 = electron1.superCluster()->hitsAndFractions(); + nHitsSCEle[index] = hitsAndFractions_ele1.size(); + isEBEle[index] = electron1.isEB(); + + const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); + const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); + const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); + for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); + detitr != hitsAndFractions_ele1.end(); detitr++ ) + { + // EcalRecHitCollection::const_iterator theSeedHit = recHits->find (id); // trash this + EcalRecHitCollection::const_iterator oneHit = recHits->find( (detitr -> first) ) ; + if(oneHit==recHits->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() + << " in subdetector " << (detitr->first).subdetId() << " bailing out"; + //assert(0); + continue; + } + recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); + rawIdRecHitSCEle[index].push_back(detitr->first.rawId()); + if(electron1.isEB()){ + EBDetId recHitId(detitr->first); + XRecHitSCEle[index].push_back(recHitId.ieta()); + YRecHitSCEle[index].push_back(recHitId.iphi()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + else{ + EEDetId recHitId(detitr->first); + XRecHitSCEle[index].push_back(recHitId.ix()); + YRecHitSCEle[index].push_back(recHitId.iy()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + energyRecHitSCEle[index].push_back(oneHit->energy()); + // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: + // 1) get laser correction coefficient + LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(detitr->first, runTime_)); + //laserHandle-> + // 2) get intercalibration + EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(detitr->first); + EcalIntercalibConstant icalconst = 1.; + if( icalit!=icalMap.end() ) { + icalconst = (*icalit); + // std::cout << "icalconst set to: " << icalconst << std::endl; + } else { + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (detitr->first).rawId() << "bailing out"; + //assert(0); + continue; + } + // 3) get adc2GeV + //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? + // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); + ICRecHitSCEle[index].push_back(icalconst); + } + return; } void ZNtupleDumper::TreeSetExtraCalibVar(const reco::SuperCluster& electron1, int index){ - //THIS IS USELESS NOW!!! + recoFlagRecHitSCEle[index].clear(); + rawIdRecHitSCEle[index].clear(); + XRecHitSCEle[index].clear(); + YRecHitSCEle[index].clear(); + ZRecHitSCEle[index].clear(); + energyRecHitSCEle[index].clear(); + LCRecHitSCEle[index].clear(); + ICRecHitSCEle[index].clear(); + AlphaRecHitSCEle[index].clear(); + + std::vector< std::pair > hitsAndFractions_ele1 = electron1.hitsAndFractions(); + nHitsSCEle[index] = hitsAndFractions_ele1.size(); + + const EcalRecHitCollection *recHitsEB = clustertools->getEcalEBRecHitCollection(); + const EcalRecHitCollection *recHitsEE = clustertools->getEcalEERecHitCollection(); + + const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); + const edm::ESHandle& laserHandle_ = clustertools->getLaserHandle(); + + for (std::vector >::const_iterator detitr = hitsAndFractions_ele1.begin(); + detitr != hitsAndFractions_ele1.end(); detitr++ ) + { + // get out the DetId of the hit + DetId hitId = (detitr -> first); + // define a iterator of the EcalRecoHit + EcalRecHitCollection::const_iterator oneHit(NULL); + + // treat it seperately for EB and EE + if ( hitId.subdetId() == EcalBarrel) + { + oneHit = recHitsEB->find( hitId ); + // protection of the missing hit + if(oneHit==recHitsEB->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; + assert(0); + } + // redifine EBDetId and get EB hit position + EBDetId recHitId(hitId); + XRecHitSCEle[index].push_back(recHitId.ieta()); + YRecHitSCEle[index].push_back(recHitId.iphi()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + else if ( hitId.subdetId() == EcalEndcap ) + { + oneHit = recHitsEE->find( hitId ); + // protection of the missing hit + if(oneHit==recHitsEE->end()){ + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << hitId.rawId() << "bailing out"; + assert(0); + } + // redifine EEDetId and get EE hit position + EEDetId recHitId(hitId); + XRecHitSCEle[index].push_back(recHitId.ix()); + YRecHitSCEle[index].push_back(recHitId.iy()); + ZRecHitSCEle[index].push_back(recHitId.zside()); + } + else + { + // error if not able to find the hit in EE and EB + edm::LogError("ZNtupleDumper") << "SC hit cannot be found in EB and EE. " ; + assert(0); + } + + // other information + recoFlagRecHitSCEle[index].push_back(oneHit->recoFlag()); + rawIdRecHitSCEle[index].push_back(hitId.rawId()); + + energyRecHitSCEle[index].push_back(oneHit->energy()); + + // in order to get back the ADC counts from the recHit energy, three ingredients are necessary: + // 1) get laser correction coefficient + LCRecHitSCEle[index].push_back(laserHandle_->getLaserCorrection(hitId, runTime_)); + // 2) get intercalibration + EcalIntercalibConstantMap::const_iterator icalit = icalMap.find(hitId); + EcalIntercalibConstant icalconst = 1.; + if( icalit!=icalMap.end() ) { + icalconst = (*icalit); + // std::cout << "icalconst set to: " << icalconst << std::endl; + } else { + edm::LogError("ZNtupleDumper") << "No intercalib const found for xtal " << (hitId).rawId() << "bailing out"; + assert(0); + } + // 3) get adc2GeV + //float adcToGeV = ( (detitr -> first).subdetId() == EcalBarrel ) ? + // float(adcToGeVHandle->getEBValue()) : float(adcToGeVHandle->getEEValue()); + ICRecHitSCEle[index].push_back(icalconst); + + } + return; } From 39d8f1a4c447c3adfe177b4e64d9e7ccd9ff5de0 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Fri, 26 Sep 2014 16:41:07 +0200 Subject: [PATCH 456/475] changed default value for nLoops --- ZFitter/bin/ZFitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index ce105acffb9..895b5b73197 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -459,7 +459,7 @@ int main(int argc, char **argv) { ("useZ", po::value(&useZ)->default_value(1),"use Z events") ("useW", po::value(&useW)->default_value(1),"use W events") ("splitStat", po::value(&splitStat)->default_value(1),"split statistic") - ("nLoops", po::value(&nLoops)->default_value(1),"number of iteration of the L3 algorithm") + ("nLoops", po::value(&nLoops)->default_value(20),"number of iteration of the L3 algorithm") ("isDeadTriggerTower", po::value(&isDeadTriggerTower)->default_value(false),"") ("inputFileDeadXtal", po::value(&inputFileDeadXtal)->default_value("NULL"),"") ; From 26983fdbb0cb641fefb0671c4c218097767ef9af Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 28 Sep 2014 12:54:28 +0200 Subject: [PATCH 457/475] isW, isZ, isEBEle: removed --- EOverPCalibration/src/FastCalibratorEB.cc | 17 +++++++---------- EOverPCalibration/src/FastCalibratorEE.cc | 11 ++++------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/EOverPCalibration/src/FastCalibratorEB.cc b/EOverPCalibration/src/FastCalibratorEB.cc index 5a991c269ec..88786b07555 100644 --- a/EOverPCalibration/src/FastCalibratorEB.cc +++ b/EOverPCalibration/src/FastCalibratorEB.cc @@ -121,8 +121,6 @@ void FastCalibratorEB::Init(TTree *tree){ fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); - fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); @@ -134,7 +132,6 @@ void FastCalibratorEB::Init(TTree *tree){ fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); - fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); @@ -229,9 +226,9 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u float pIn, FdiEta; - ///! Tight electron from W or Z only barrel + ///! Tight electron from W or Z only barrel (if chargeEle[1]==0: event from W) - if ( isEBEle[0] == 1 && (( useW == 1 && isW == 1 ) || ( useZ== 1 && isZ == 1 ))) { + if ( fabs(etaSCEle[0]) < 1.479 && (( useW == 1 && chargeEle[1]==0 ) || ( useZ== 1 && chargeEle[1]!=0 ))) { FdiEta = energySCEle[0]/rawEnergySCEle[0]; /// FEta approximation @@ -309,7 +306,7 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u } ///=== Second medium electron from Z - if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + if ( fabs(etaSCEle[1]) < 1.479 && ( useZ == 1 && chargeEle[1]!=0 ) ){ FdiEta = energySCEle[1]/rawEnergySCEle[1]; /// FEta approximation @@ -519,9 +516,9 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in std::map map; bool skipElectron=false; - /// Tight electron information from W and Z, it depends on the flag variable isW, isZ - - if ( isEBEle[0] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + /// Tight electron information from W and Z + + if ( fabs(etaSCEle[0]) < 1.479 && (( useW == 1 && chargeEle[1]==0 ) || ( useZ == 1 && chargeEle[1]!=0 )) ) { /// SCL energy containment correction FdiEta = energySCEle[0]/rawEnergySCEle[0]; @@ -646,7 +643,7 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in skipElectron = false; /// Ele2 medium from Z only Barrel - if ( isEBEle[1] == 1 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + if ( fabs(etaSCEle[1]) < 1.479 && ( useZ == 1 && chargeEle[1]!=0 ) ) { FdiEta = energySCEle[1]/rawEnergySCEle[1]; // Electron energy diff --git a/EOverPCalibration/src/FastCalibratorEE.cc b/EOverPCalibration/src/FastCalibratorEE.cc index 8797b605615..31a0b8184aa 100644 --- a/EOverPCalibration/src/FastCalibratorEE.cc +++ b/EOverPCalibration/src/FastCalibratorEE.cc @@ -127,8 +127,6 @@ void FastCalibratorEE::Init(TTree *tree){ fChain->SetBranchStatus("runNumber", 1); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); fChain->SetBranchStatus("lumiBlock", 1); fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock); fChain->SetBranchStatus("eventNumber", 1); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); - fChain->SetBranchStatus("isW", 1); fChain->SetBranchAddress("isW", &isW, &b_isW); - fChain->SetBranchStatus("isZ", 1); fChain->SetBranchAddress("isZ", &isZ, &b_isZ); fChain->SetBranchStatus("chargeEle", 1); fChain->SetBranchAddress("chargeEle", chargeEle); fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); @@ -140,7 +138,6 @@ void FastCalibratorEE::Init(TTree *tree){ fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); - fChain->SetBranchStatus("isEBEle", 1); fChain->SetBranchAddress("isEBEle", &isEBEle, &b_isEBEle); fChain->SetBranchStatus("energyMCEle", 1); fChain->SetBranchAddress("energyMCEle", &energyMCEle, &b_energyMCEle); fChain->SetBranchStatus("etaMCEle", 1); fChain->SetBranchAddress("etaMCEle", &etaMCEle, &b_etaMCEle); fChain->SetBranchStatus("phiMCEle", 1); fChain->SetBranchAddress("phiMCEle", &phiMCEle, &b_phiMCEle); @@ -245,7 +242,7 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u float pIn, FdiEta; ///=== electron tight W or Z only Endcap - if ( isEBEle[0] == 0 && (( useW == 1 && isW == 1 ) || ( useZ== 1 && isZ == 1 ))) { + if ( fabs(etaSCEle[0]) >= 1.479 && (( useW == 1 && chargeEle[1]==0 ) || ( useZ== 1 && chargeEle[1]!=0 ))) { FdiEta = energySCEle[0]/(rawEnergySCEle[0]+esEnergySCEle[0]); /// Cluster containment approximation using ps infos @@ -324,7 +321,7 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u } ///=== Second medium electron from Z only Endcaps - if ( isEBEle[1] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ){ + if ( fabs(etaSCEle[1]) >= 1.479 && ( useZ== 1 && chargeEle[1]!=0 )) { FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); @@ -521,7 +518,7 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in /// Only tight electron from W and Z, only Endcap - if ( isEBEle[0] == 0 && (( useW == 1 && isW == 1 ) || ( useZ == 1 && isZ == 1 )) ) { + if ( fabs(etaSCEle[0]) >= 1.479 && (( useW == 1 && chargeEle[1]==0 ) || ( useZ== 1 && chargeEle[1]!=0 ))) { /// SCL energy containment correction FdiEta = energySCEle[0]/(rawEnergySCEle[0]+esEnergySCEle[0]); @@ -690,7 +687,7 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in /// Medium ele from Z only Endcap - if( isEBEle[1] == 0 && ( useZ == 1 && isZ == 1 ) ){ + if ( fabs(etaSCEle[1]) >= 1.479 && ( useZ== 1 && chargeEle[1]!=0 )) { /// SCL energy containment correction FdiEta = energySCEle[1]/(rawEnergySCEle[1]+esEnergySCEle[1]); From 3f032a23fb7765f11c395fdc05a16c29fee26248 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 28 Sep 2014 12:54:40 +0200 Subject: [PATCH 458/475] isW, isZ, isEBEle: removed --- ZNtupleDumper/src/ZNtupleDumper.cc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/ZNtupleDumper/src/ZNtupleDumper.cc b/ZNtupleDumper/src/ZNtupleDumper.cc index d99bf841d11..b77cc183db6 100644 --- a/ZNtupleDumper/src/ZNtupleDumper.cc +++ b/ZNtupleDumper/src/ZNtupleDumper.cc @@ -225,7 +225,6 @@ class ZNtupleDumper : public edm::EDAnalyzer { Int_t chargeEle[2]; Float_t etaSCEle[2], phiSCEle[2]; ///< phi of the SC Float_t etaEle[2], phiEle[2]; ///< phi of the electron (electron object) - Int_t isEBEle[2]; Int_t recoFlagsEle[2]; ///< 1=trackerDriven, 2=ecalDriven only, 3=tracker and ecal driven @@ -343,8 +342,6 @@ class ZNtupleDumper : public edm::EDAnalyzer { std::vector LCRecHitSCEle[2]; std::vector ICRecHitSCEle[2]; std::vector AlphaRecHitSCEle[2]; - Int_t isW; - Int_t isZ; //============================== @@ -659,8 +656,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe } bool doFill=false; - isW=0; - isZ=0; if(eventType==PARTGUN){ pat::ElectronCollection::const_iterator eleIter1 = electronsHandle->begin(); pat::ElectronCollection::const_iterator eleIter2 = eleIter1; @@ -707,7 +702,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if( eleIter1->et()<30) continue; doFill=true; - isW=1; if(eventType==UNKNOWN) eventType=WENU; TreeSetSingleElectronVar(*eleIter1, 0); //fill first electron TreeSetSingleElectronVar(*eleIter1, -1); // fill fake second electron @@ -732,7 +726,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if((mass < 55 || mass > 125)) continue; doFill=true; - isZ=1; if(eventType==UNKNOWN) eventType=ZEE; TreeSetDiElectronVar(*eleIter1, *eleIter2); @@ -812,7 +805,6 @@ void ZNtupleDumper::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe // save the event in the tree if(HighEtaSC1!= EESuperClustersHandle->end()){ doFill=true; - isZ=1; TreeSetDiElectronVar(*PatEle1, *HighEtaSC1); if(doExtraCalibTree){ TreeSetExtraCalibVar(*PatEle1, *HighEtaSC1); @@ -1227,7 +1219,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int chargeEle[-index] = 0; etaEle[-index] = 0; phiEle[-index] = 0; - isEBEle[-index] = 0; return; } @@ -1235,7 +1226,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const pat::Electron& electron1, int chargeEle[index] = electron1.charge(); etaEle[index] = electron1.eta(); // degli elettroni phiEle[index] = electron1.phi(); - isEBEle[-index] = electron1.isEB(); if(electron1.ecalDrivenSeed()){ @@ -1417,7 +1407,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 chargeEle[-index] = 0; etaEle[-index] = 0; phiEle[-index] = 0; - isEBEle[-index] = 0; return; } @@ -1427,7 +1416,6 @@ void ZNtupleDumper::TreeSetSingleElectronVar(const reco::SuperCluster& electron1 chargeEle[index] = -100; // dont know the charge for SC etaEle[index] = electron1.eta(); // eta = etaSC phiEle[index] = electron1.phi(); - isEBEle[index] = -100; recoFlagsEle[index] = -1; // define -1 as a SC @@ -1772,10 +1760,6 @@ void ZNtupleDumper::InitExtraCalibTree(){ extraCalibTree->Branch("AlphaRecHitSCEle1", &(AlphaRecHitSCEle[0])); extraCalibTree->Branch("AlphaRecHitSCEle2", &(AlphaRecHitSCEle[1])); - extraCalibTree->Branch("isW",&isW, "isW/I"); - extraCalibTree->Branch("isZ",&isZ, "isZ/I"); - extraCalibTree->Branch("isEBEle",&isEBEle, "isEBEle[2]/I"); - return; } @@ -1808,7 +1792,6 @@ void ZNtupleDumper::TreeSetExtraCalibVar(const pat::Electron& electron1, int ind // EcalIntercalibConstantMap icMap = icHandle->get() std::vector< std::pair > hitsAndFractions_ele1 = electron1.superCluster()->hitsAndFractions(); nHitsSCEle[index] = hitsAndFractions_ele1.size(); - isEBEle[index] = electron1.isEB(); const EcalRecHitCollection *recHits = (electron1.isEB()) ? clustertools->getEcalEBRecHitCollection() : clustertools->getEcalEERecHitCollection(); const EcalIntercalibConstantMap& icalMap = clustertools->getEcalIntercalibConstants(); From 620fd127bdeff766073389fb9be18ad28bb97ab0 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Sun, 28 Sep 2014 12:55:03 +0200 Subject: [PATCH 459/475] E/p library included in the makefile --- ZFitter/Makefile | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/ZFitter/Makefile b/ZFitter/Makefile index 8249febcd66..8fd57433b7f 100644 --- a/ZFitter/Makefile +++ b/ZFitter/Makefile @@ -34,7 +34,10 @@ INCLUDEDIR=./interface SRCDIR=./src BUILDDIR=./bin OBJ_DIR=./lib - +INCLUDEEPDIR=../EOverPCalibration/interface +SRCEPDIR=../EOverPCalibration/src +INCLUDENPDIR=../NtuplePackage/interface +SRCNPDIR=../NtuplePackage/src #MODULES=hist_class #LINKER=g++ @@ -120,6 +123,41 @@ $(OBJ_DIR)/TestProposal.o: $(SRC)/TestProposal.cc $(INCLUDEDIR)/TestProposal.h @echo "--> Making class: TestProposal" @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/TestProposal.o $(SRC)/TestProposal.cc +$(OBJ_DIR)/hChain.o: $(SRCNPDIR)/hChain.cc $(INCLUDENPDIR)/hChain.h + @echo "--> Making class: hChain" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/hChain.o $(SRCNPDIR)/hChain.cc + +$(OBJ_DIR)/h2Chain.o: $(SRCNPDIR)/h2Chain.cc $(INCLUDENPDIR)/h2Chain.h + @echo "--> Making class: h2Chain" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/h2Chain.o $(SRCNPDIR)/h2Chain.cc + +$(OBJ_DIR)/readJSONFile.o: $(SRCNPDIR)/readJSONFile.cc $(INCLUDENPDIR)/readJSONFile.h + @echo "--> Making class: readJSONFile" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/readJSONFile.o $(SRCNPDIR)/readJSONFile.cc + +$(OBJ_DIR)/CalibrationUtils.o: $(SRCEPDIR)/CalibrationUtils.cc $(INCLUDEEPDIR)/CalibrationUtils.h + @echo "--> Making class: CalibrationUtils" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/CalibrationUtils.o $(SRCEPDIR)/CalibrationUtils.cc + +$(OBJ_DIR)/TEndcapRings.o: $(SRCEPDIR)/TEndcapRings.cc $(INCLUDEEPDIR)/TEndcapRings.h + @echo "--> Making class: TEndcapRings" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/TEndcapRings.o $(SRCEPDIR)/TEndcapRings.cc + +$(OBJ_DIR)/GetHashedIndexEB.o: $(SRCEPDIR)/GetHashedIndexEB.cc $(INCLUDEEPDIR)/GetHashedIndexEB.h + @echo "--> Making class: GetHashedIndexEB" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/GetHashedIndexEB.o $(SRCEPDIR)/GetHashedIndexEB.cc + +$(OBJ_DIR)/GetHashedIndexEE.o: $(SRCEPDIR)/GetHashedIndexEE.cc $(INCLUDEEPDIR)/GetHashedIndexEE.h + @echo "--> Making class: GetHashedIndexEE" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/GetHashedIndexEE.o $(SRCEPDIR)/GetHashedIndexEE.cc + +$(OBJ_DIR)/FastCalibratorEB.o: $(SRCEPDIR)/FastCalibratorEB.cc $(INCLUDEEPDIR)/FastCalibratorEB.h + @echo "--> Making class: FastCalibratorEB" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/FastCalibratorEB.o $(SRCEPDIR)/FastCalibratorEB.cc + +$(OBJ_DIR)/FastCalibratorEE.o: $(SRCEPDIR)/FastCalibratorEE.cc $(INCLUDEEPDIR)/FastCalibratorEE.h + @echo "--> Making class: FastCalibratorEE" + @g++ $(OPT) $(INCLUDE) -c -o $(OBJ_DIR)/FastCalibratorEE.o $(SRCEPDIR)/FastCalibratorEE.cc #------------------------------ PRINCIPLE CLASS @@ -151,7 +189,7 @@ $(BUILDDIR)/test.exe: test/test.cpp $(OBJ_DIR)/EnergyScaleCorrection_class.o # q ZFitter.exe: $(BUILDDIR)/ZFitter.exe -$(BUILDDIR)/ZFitter.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o $(OBJ_DIR)/ZPtWeights_class.o +$(BUILDDIR)/ZFitter.exe: $(BUILDDIR)/ZFitter.cpp $(OBJ_DIR)/ZFit_class.o $(OBJ_DIR)/ElectronCategory_class.o EnergyScaleCorrection_class.o $(OBJ_DIR)/puWeights_class.o $(OBJ_DIR)/runDivide_class.o $(OBJ_DIR)/r9Weights_class.o $(OBJ_DIR)/addBranch_class.o $(OBJ_DIR)/RooSmearer.o $(OBJ_DIR)/SmearingImporter.o $(OBJ_DIR)/ZPtWeights_class.o $(OBJ_DIR)/hChain.o $(OBJ_DIR)/h2Chain.o $(OBJ_DIR)/readJSONFile.o $(OBJ_DIR)/CalibrationUtils.o $(OBJ_DIR)/TEndcapRings.o $(OBJ_DIR)/GetHashedIndexEB.o $(OBJ_DIR)/GetHashedIndexEE.o $(OBJ_DIR)/FastCalibratorEB.o $(OBJ_DIR)/FastCalibratorEE.o @echo "---> Making ZFitter" @g++ $(OPT) $(INCLUDE) $(LIB) $(ROOT_LIB) $(ROOFIT_LIB) $(ROOSTAT_LIB) $(ROOT_FLAGS) \ -o $(BUILDDIR)/ZFitter.exe $(BUILDDIR)/ZFitter.cpp -lboost_program_options -lTreePlayer \ From c3a9b419051c5969a069246d7e2f5017fe3b0493 Mon Sep 17 00:00:00 2001 From: lbrianza Date: Fri, 10 Oct 2014 11:28:42 +0200 Subject: [PATCH 460/475] setup fixed for luca --- setup_git.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/setup_git.sh b/setup_git.sh index 21b820693c6..e9cf5051d71 100755 --- a/setup_git.sh +++ b/setup_git.sh @@ -12,6 +12,9 @@ checkVERSION(){ CMSSW_7_0_*) echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" ;; + CMSSW_7_2_0_pre7) + echo "[INFO] Installing for $CMSSW_VERSION (2012 8TeV)" + ;; *) echo "[ERROR] Sorry, $CMSSW_VERSION not configured for ECALELF" echo " Be sure that you don't want 4_2_8_patch7 or CMSSW_4_4_5_patch2 or 5_3_14_patch2 or CMSSW_7_0_*" @@ -63,6 +66,16 @@ if [ ! -d "$myDir" ];then cd $myDir/ALCARAW_RECO/ git clone https://github.com/hengne/Utilities.git bin ;; + lbrianza) + git clone git@github.com:lbrianza/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode + cd $myDir/ + case $CMSSW_VERSION in + CMSSW_7_2_0_pre7) + echo "[INFO] Checkout: download for 720_pre7" + git checkout devel_7_2_0_pre7 + ;; + esac + ;; *) ### if you are not Shervin download this to have some useful scripts git clone https://github.com/ECALELFS/ECALELF.git $myDir >> setup.log || exit 1 # read-only mode @@ -155,7 +168,7 @@ case $CMSSW_VERSION in scram b -j16 ;; - CMSSW_7_*) + CMSSW_7_2_0_pre7) git-cms-addpkg EgammaAnalysis/ElectronTools >> setup.log || exit 1 patch -p1 < $myDir/ALCARAW_RECO/test/electronRegression700.patch >> setup.log || exit 1 @@ -177,6 +190,44 @@ case $CMSSW_VERSION in echo "[STATUS] applying patch for CMSSW_5_X and following" sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + echo "[STATUS] applying patch for CMSSW_7_2_0_pre7" + patch -p1 < $myDir/ALCARAW_RECO/test/EGEnergyCorrectorSemiParm.h.patch >> setup.log || exit 1 + patch -p1 < $myDir/ALCARAW_RECO/test/EGEnergyCorrectorTraditional.h.patch >> setup.log || exit 1 + patch -p1 < $myDir/ALCARAW_RECO/test/EGEnergyAnalyzerSemiParm.cc.patch >> setup.log || exit 1 + + if [ ! -e "$CMSSW_BASE/src/RecoEcal/EgammaCoreTools" ];then + git-cms-addpkg RecoEcal/EgammaCoreTools >> setup.log || exit 1 + fi + if [ "`grep -c getEcalEBRecHitCollection $CMSSW_BASE/src/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h`" == "0" ];then + patch -p0 < $myDir/ALCARAW_RECO/test/clusterLazyTools.patch >> setup.log || exit 1 + fi + + cp /afs/cern.ch/user/b/bendavid/cmspublic/regweights52xV3/*.root $myDir/EleNewEnergiesProducer/data/ >> setup.log || exit 1 + + ;; + + CMSSW_7_*) + git-cms-addpkg EgammaAnalysis/ElectronTools >> setup.log || exit 1 + patch -p1 < $myDir/ALCARAW_RECO/test/electronRegression700.patch >> setup.log || exit 1 + + cd EgammaAnalysis/ElectronTools/data/ >> setup.log || exit 1 + cat download.url | grep '.root' | xargs wget >> setup.log || exit 1 + cd - >> setup.log || exit 1 + +###### New Josh regression + mkdir HiggsAnalysis/ + cd HiggsAnalysis/ + git clone -b legacyCompatibility https://github.com/bendavid/GBRLikelihood.git + git clone -b hggpaperV6 https://github.com/bendavid/GBRLikelihoodEGTools.git + cd - + mv GBRLikelihoodEGTools/data/*.root $myDir/EleNewEnergiesProducer/data/ + + sed -i 's|REGRESSION=3|REGRESSION=4|' Calibration/*/BuildFile.xml + echo "" >> $myDir/EleSelectionProducers/BuildFile.xml + + echo "[STATUS] applying patch for CMSSW_5_X and following" + sed 's|,eleIt->ecalEnergyError()\*(nearestSC.*);|);|' $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc_topatch > $myDir/ALCARAW_RECO/src/ElectronRecalibSuperClusterAssociatorSH.cc + if [ ! -e "$CMSSW_BASE/src/RecoEcal/EgammaCoreTools" ];then git-cms-addpkg RecoEcal/EgammaCoreTools >> setup.log || exit 1 From 2156d505f26c6d1cc7ad556442d5832d27cea5f9 Mon Sep 17 00:00:00 2001 From: mrappo Date: Mon, 19 Dec 2016 17:23:31 +0100 Subject: [PATCH 461/475] fix bugs when running E/p on master branch --- ZFitter/bin/ZFitter.cpp | 19 ++++++++----------- .../submit_calibration_jobs_multifit.py | 4 ++-- .../script/submit_calibration_jobs_weights.py | 7 ++++--- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index 0df8d964b0e..bd8c0a23b1f 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -1201,14 +1201,14 @@ int main(int argc, char **argv) std::cout << "start calibration. " << std::endl; - FastCalibratorEB analyzerEB(data, g_EoC, g_EoE, typeEB, outEPDistribution); - FastCalibratorEE analyzerEE(data, g_EoC, g_EoE, typeEE, outEPDistribution); if(isEB) { + FastCalibratorEB analyzerEB(data, g_EoC, g_EoE, typeEB, outEPDistribution); analyzerEB.bookHistos(nLoops); analyzerEB.AcquireDeadXtal(DeadXtal, isDeadTriggerTower); analyzerEB.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, applyPcorr, applyEcorr, useRawEnergy, isMiscalib, isSaveEPDistribution, isEPselection, isR9selection, R9Min, EPMin, smoothCut, isfbrem, fbremMax, isPtCut, PtMin, isMCTruth, miscalibMethod, miscalibMap); analyzerEB.saveHistos(outputName); } else { + FastCalibratorEE analyzerEE(data, g_EoC, g_EoE, typeEE, outEPDistribution); analyzerEE.bookHistos(nLoops); analyzerEE.AcquireDeadXtal(DeadXtal, isDeadTriggerTower); analyzerEE.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, applyPcorr, applyEcorr, useRawEnergy, isMiscalib, isSaveEPDistribution, isEPselection, isR9selection, R9Min, EPMin, smoothCut, isfbrem, fbremMax, isPtCut, PtMin, isMCTruth, miscalibMethod, miscalibMap); @@ -1228,35 +1228,32 @@ int main(int argc, char **argv) name2 = name1; name2.ReplaceAll("even", "odd"); - TFile *outputName1 = new TFile(outDirFitResData + name1, "RECREATE"); - TFile *outputName2 = new TFile(outDirFitResData + name2, "RECREATE"); + TFile *outputName1 = new TFile(name1, "RECREATE"); + TFile *outputName2 = new TFile(name2, "RECREATE"); TString DeadXtal = Form("%s", inputFileDeadXtal.c_str()); - /// Run on odd - FastCalibratorEB analyzer_even_EB(data, g_EoC, g_EoE, typeEB); - FastCalibratorEB analyzer_odd_EB(data, g_EoC, g_EoE, typeEB); - - FastCalibratorEE analyzer_even_EE(data, g_EoC, g_EoE, typeEE); - FastCalibratorEE analyzer_odd_EE(data, g_EoC, g_EoE, typeEE); if(isEB) { + FastCalibratorEB analyzer_even_EB(data, g_EoC, g_EoE, typeEB); analyzer_even_EB.bookHistos(nLoops); analyzer_even_EB.AcquireDeadXtal(DeadXtal, isDeadTriggerTower); analyzer_even_EB.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, applyPcorr, applyEcorr, useRawEnergy, isMiscalib, isSaveEPDistribution, isEPselection, isR9selection, R9Min, EPMin, smoothCut, isfbrem, fbremMax, isPtCut, PtMin, isMCTruth, miscalibMethod, miscalibMap); analyzer_even_EB.saveHistos(outputName1); + FastCalibratorEB analyzer_odd_EB(data, g_EoC, g_EoE, typeEB); analyzer_odd_EB.bookHistos(nLoops); analyzer_odd_EB.AcquireDeadXtal(DeadXtal, isDeadTriggerTower); analyzer_odd_EB.Loop(numberOfEvents, useZ, useW, -splitStat, nLoops, applyPcorr, applyEcorr, useRawEnergy, isMiscalib, isSaveEPDistribution, isEPselection, isR9selection, R9Min, EPMin, smoothCut, isfbrem, fbremMax, isPtCut, PtMin, isMCTruth, miscalibMethod, miscalibMap); analyzer_odd_EB.saveHistos(outputName2); } else { + FastCalibratorEE analyzer_even_EE(data, g_EoC, g_EoE, typeEE); analyzer_even_EE.bookHistos(nLoops); analyzer_even_EE.AcquireDeadXtal(DeadXtal, isDeadTriggerTower); analyzer_even_EE.Loop(numberOfEvents, useZ, useW, splitStat, nLoops, applyPcorr, applyEcorr, useRawEnergy, isMiscalib, isSaveEPDistribution, isEPselection, isR9selection, R9Min, EPMin, smoothCut, isfbrem, fbremMax, isPtCut, PtMin, isMCTruth, miscalibMethod, miscalibMap); analyzer_even_EE.saveHistos(outputName1); - + FastCalibratorEE analyzer_odd_EE(data, g_EoC, g_EoE, typeEE); analyzer_odd_EE.bookHistos(nLoops); analyzer_odd_EE.AcquireDeadXtal(DeadXtal, isDeadTriggerTower); analyzer_odd_EE.Loop(numberOfEvents, useZ, useW, -splitStat, nLoops, applyPcorr, applyEcorr, useRawEnergy, isMiscalib, isSaveEPDistribution, isEPselection, isR9selection, R9Min, EPMin, smoothCut, isfbrem, fbremMax, isPtCut, PtMin, isMCTruth, miscalibMethod, miscalibMap); diff --git a/ZFitter/script/submit_calibration_jobs_multifit.py b/ZFitter/script/submit_calibration_jobs_multifit.py index 21f8c3eadbb..51da83d9564 100644 --- a/ZFitter/script/submit_calibration_jobs_multifit.py +++ b/ZFitter/script/submit_calibration_jobs_multifit.py @@ -88,7 +88,7 @@ for g in range(len(energyType)): fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outputPath output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -133,7 +133,7 @@ for g in range(len(energyType)): fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outputPath output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EE"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); diff --git a/ZFitter/script/submit_calibration_jobs_weights.py b/ZFitter/script/submit_calibration_jobs_weights.py index 6b017ab793f..66df90fcf8d 100644 --- a/ZFitter/script/submit_calibration_jobs_weights.py +++ b/ZFitter/script/submit_calibration_jobs_weights.py @@ -21,7 +21,7 @@ applyPcorr = ["True"]; #decide if you want to apply momentum correction or not applyEcorr = ["False"]; #decide if you want to apply energy correction or not split = ["0","1"]; #0=full statistics, 1=even/odd -cut = ["0.15","0.20","0.30","100"];#size of the E/p cut window (default is 0.15) +cut = ["0.15","0.20","0.30","100."];#size of the E/p cut window (default is 0.15) #cut = ["0.10"] smoothCut = ["1"]; #0=use step-function to reweight, 1=use the E/p distribution energyType = ["0"]; #0=regression, 1=raw energy @@ -79,6 +79,7 @@ os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"2016_newPcorr") os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"2016_newPcorr") + ##RUN CALIBRATION ON BARREL for b in range(len(split)): for c in range(len(cut)): @@ -88,7 +89,7 @@ for g in range(len(energyType)): fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outputPath output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -133,7 +134,7 @@ for g in range(len(energyType)): fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outputPath output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EE"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); From 9fdbd7a3fc5c76aad1c28f0d6f1876eb0370b669 Mon Sep 17 00:00:00 2001 From: mrappo Date: Mon, 19 Dec 2016 17:24:55 +0100 Subject: [PATCH 462/475] fix bugs when running E/p on master branch --- ZFitter/script/submit_calibration_jobs_multifit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZFitter/script/submit_calibration_jobs_multifit.py b/ZFitter/script/submit_calibration_jobs_multifit.py index 51da83d9564..413fc1fa962 100644 --- a/ZFitter/script/submit_calibration_jobs_multifit.py +++ b/ZFitter/script/submit_calibration_jobs_multifit.py @@ -21,11 +21,11 @@ applyPcorr = ["True"]; #decide if you want to apply momentum correction or not applyEcorr = ["False"]; #decide if you want to apply energy correction or not split = ["0","1"]; #0=full statistics, 1=even/odd -cut = ["0.15","0.20","0.30","100"];#size of the E/p cut window (default is 0.15) +cut = ["0.15","0.20","0.30","100."];#size of the E/p cut window (default is 0.15) #cut = ["0.15"] smoothCut = ["1"]; #0=use step-function to reweight, 1=use the E/p distribution energyType = ["0"]; #0=regression, 1=raw energy -nLoops = "20"; #number of iterations +nLoops = "15"; #number of iterations ntupleName = "Run2016BCDEFG_WZSkim_Cal_Sep2016_final_v3_multifit" #ntupleName = "DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1-allRange" #options: "data-Run2015D-25ns-multifit", "data-Run2015D-25ns-multifit" or "data-Run2015D-25ns-stream". #For the MC use: "DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1-allRange" From 847599c5df76c0255ccf9a6f7a51eb5513d48920 Mon Sep 17 00:00:00 2001 From: mrappo Date: Mon, 16 Jan 2017 16:59:22 +0100 Subject: [PATCH 463/475] update branch names --- EOverPCalibration/src/FastCalibratorEB.cc | 18 +++++++++--------- EOverPCalibration/src/FastCalibratorEE.cc | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/EOverPCalibration/src/FastCalibratorEB.cc b/EOverPCalibration/src/FastCalibratorEB.cc index 1debb46c300..872cc749bf2 100644 --- a/EOverPCalibration/src/FastCalibratorEB.cc +++ b/EOverPCalibration/src/FastCalibratorEB.cc @@ -136,20 +136,20 @@ void FastCalibratorEB::Init(TTree *tree) fChain->SetBranchAddress("chargeEle", chargeEle); fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); - fChain->SetBranchStatus("PtEle", 1); - fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); + // fChain->SetBranchStatus("PtEle", 1); + //fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); - fChain->SetBranchStatus("energySCEle_must", 1); - fChain->SetBranchAddress("energySCEle_must", &energySCEle, &b_energySCEle); + fChain->SetBranchStatus("energy_ECAL_ele", 1); + fChain->SetBranchAddress("energy_ECAL_ele", &energySCEle, &b_energySCEle); //OLD ENERGY: energySCEle_must // fChain->SetBranchStatus("energySCEle", 1); fChain->SetBranchAddress("energySCEle", &energySCEle, &b_energySCEle); fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle, &b_esEnergySCEle); - fChain->SetBranchStatus("pAtVtxGsfEle", 1); + fChain->SetBranchStatus("pAtVtxGsfEle", 1); //please test also with: pModeGsfEle fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle, &b_pAtVtxGsfEle); fChain->SetBranchStatus("fbremEle", 1); fChain->SetBranchAddress("fbremEle", &fbremEle, &b_fbremEle); @@ -338,7 +338,7 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; /// fbrem Selection - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[0]/cosh(etaEle[0])) < PtMin && isPtCut == true ) skipElectron = true; /// Save electron E/p in a chain of histogramm each for eta bin if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed + 85, thisE / pIn); @@ -423,7 +423,7 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; /// fbrem Selection - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[1]/cosh(etaEle[1])) < PtMin && isPtCut == true ) skipElectron = true; /// Save E/p electron information if(!skipElectron) hC_EoP_eta_ele -> Fill(eta_seed + 85, thisE / pIn); @@ -653,7 +653,7 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in if( fabs(thisE / pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; if( fabs(thisE3x3 / thisE) < R9Min && isR9selection == true ) skipElectron = true; if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[0]/cosh(etaEle[0])) < PtMin && isPtCut == true ) skipElectron = true; if( thisE / pIn < EoPHisto->GetXaxis()->GetXmin() || thisE / pIn > EoPHisto->GetXaxis()->GetXmax()) skipElectron = true; if( !skipElectron) { @@ -794,7 +794,7 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in if( fabs(thisE / pIn - 1) > 0.3 && isEPselection == true ) skipElectron = true; if( fabs(thisE3x3 / thisE) < R9Min && isR9selection == true ) skipElectron = true; if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[1]/cosh(etaEle[1])) < PtMin && isPtCut == true ) skipElectron = true; if( !skipElectron ) { diff --git a/EOverPCalibration/src/FastCalibratorEE.cc b/EOverPCalibration/src/FastCalibratorEE.cc index 9b834c4f0f9..49db92ee5d4 100644 --- a/EOverPCalibration/src/FastCalibratorEE.cc +++ b/EOverPCalibration/src/FastCalibratorEE.cc @@ -137,14 +137,14 @@ void FastCalibratorEE::Init(TTree *tree) fChain->SetBranchAddress("chargeEle", chargeEle); fChain->SetBranchStatus("etaEle", 1); fChain->SetBranchAddress("etaEle", &etaEle, &b_etaEle); - fChain->SetBranchStatus("PtEle", 1); - fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); + // fChain->SetBranchStatus("PtEle", 1); + // fChain->SetBranchAddress("PtEle", &PtEle, &b_PtEle); fChain->SetBranchStatus("phiEle", 1); fChain->SetBranchAddress("phiEle", &phiEle, &b_phiEle); fChain->SetBranchStatus("rawEnergySCEle", 1); fChain->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle, &b_rawEnergySCEle); - fChain->SetBranchStatus("energySCEle_must", 1); - fChain->SetBranchAddress("energySCEle_must", &energySCEle, &b_energySCEle); + fChain->SetBranchStatus("energy_ECAL_ele", 1); + fChain->SetBranchAddress("energy_ECAL_ele", &energySCEle, &b_energySCEle); //OLD energy: energySCEle_must fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchAddress("etaSCEle", &etaSCEle, &b_etaSCEle); fChain->SetBranchStatus("esEnergySCEle", 1); @@ -356,7 +356,7 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if( fabs(thisE3x3 / thisE) < R9Min && isR9selection == true ) skipElectron = true; if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[0]/cosh(etaEle[0])) < PtMin && isPtCut == true ) skipElectron = true; // std::cout< Fill(ir_seed, thisE / (pIn - esEnergySCEle[0])); @@ -442,7 +442,7 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if( fabs(thisE3x3 / thisE) < R9Min && isR9selection == true ) skipElectron = true; if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[1]/cosh(etaEle[1])) < PtMin && isPtCut == true ) skipElectron = true; if(!skipElectron) hC_EoP_ir_ele -> Fill(ir_seed, thisE / (pIn - esEnergySCEle[1])); @@ -681,7 +681,7 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in if( fabs(thisE3x3 / thisE) < R9Min && isR9selection == true ) skipElectron = true; if( fabs(fbremEle[0]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[0] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[0]/cosh(etaEle[0])) < PtMin && isPtCut == true ) skipElectron = true; if( thisE / (pIn - esEnergySCEle[0]) < EoPHisto->GetXaxis()->GetXmin() || thisE / (pIn - esEnergySCEle[0]) > EoPHisto->GetXaxis()->GetXmax() ) skipElectron = true; @@ -877,7 +877,7 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in if( fabs(thisE3x3 / thisE) < R9Min && isR9selection == true ) skipElectron = true; if( fabs(fbremEle[1]) > fbremMax && isfbrem == true ) skipElectron = true; - if( PtEle[1] < PtMin && isPtCut == true ) skipElectron = true; + if( (energySCEle[1]/cosh(etaEle[1])) < PtMin && isPtCut == true ) skipElectron = true; if( thisE / (pIn - esEnergySCEle[1]) < EoPHisto->GetXaxis()->GetXmin() || From 43e4544708690eb90a70b5a034f8c83b0b0d24e4 Mon Sep 17 00:00:00 2001 From: mrappo Date: Tue, 17 Jan 2017 12:49:23 +0100 Subject: [PATCH 464/475] update laser monitoring to run with new ntuples --- EOverPCalibration/src/LaserMonitoringEoP.cc | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/EOverPCalibration/src/LaserMonitoringEoP.cc b/EOverPCalibration/src/LaserMonitoringEoP.cc index b1d323e839a..ef3f625c019 100644 --- a/EOverPCalibration/src/LaserMonitoringEoP.cc +++ b/EOverPCalibration/src/LaserMonitoringEoP.cc @@ -59,7 +59,7 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChain->SetBranchStatus("*", 0); fChain->SetBranchStatus("runNumber", 1); - fChain->SetBranchStatus("runTime", 1); + fChain->SetBranchStatus("eventTime", 1); fChain->SetBranchStatus("nPU", 1); fChain->SetBranchStatus("nPV", 1); fChain->SetBranchStatus("avgLCSCEle", 1); @@ -67,8 +67,8 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) // fChain->SetBranchStatus("ele1_EOverP",1); fChain->SetBranchStatus("etaSCEle", 1); fChain->SetBranchStatus("phiSCEle", 1); - fChain->SetBranchStatus("energySCEle_must", 1); - fChain->SetBranchStatus("energySCEle_corr", 1); + fChain->SetBranchStatus("energy_ECAL_ele", 1); + fChain->SetBranchStatus("energyEle", 1); fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchStatus("pAtVtxGsfEle", 1); fChain->SetBranchStatus("seedXSCEle", 1); @@ -76,7 +76,7 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) // fChain->SetBranchStatus("ele1_seedZside",1); fChain->SetBranchAddress("runNumber", &runNumber); - fChain->SetBranchAddress("runTime", &runTime); + fChain->SetBranchAddress("eventTime", &runTime); fChain->SetBranchAddress("nPU", &nPU); fChain->SetBranchAddress("nPV", &nPV); fChain->SetBranchAddress("avgLCSCEle", &avgLCSCEle[0]); @@ -85,9 +85,9 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChain->SetBranchAddress("etaSCEle", &etaSCEle); fChain->SetBranchAddress("phiSCEle", &phiSCEle); if( useRegression < 1 ) - fChain->SetBranchAddress("energySCEle_must", &energySCEle); + fChain->SetBranchAddress("energy_ECAL_ele", &energySCEle); else - fChain->SetBranchAddress("energySCEle_corr", &energySCEle_corr); + fChain->SetBranchAddress("energy_ECAL_ele", &energySCEle_corr); // fChain->SetBranchAddress("energySCEle_corr", &energySCEle); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle); @@ -108,7 +108,7 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChainMC->SetBranchStatus("*", 0); fChainMC->SetBranchStatus("runNumber", 1); - fChainMC->SetBranchStatus("runTime", 1); + fChainMC->SetBranchStatus("eventTime", 1); fChainMC->SetBranchStatus("nPU", 1); fChainMC->SetBranchStatus("nPV", 1); fChainMC->SetBranchStatus("avgLCSCEle", 1); @@ -116,8 +116,8 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) // fChainMC->SetBranchStatus("ele1_EOverP",1); fChainMC->SetBranchStatus("etaSCEle", 1); fChainMC->SetBranchStatus("phiSCEle", 1); - fChainMC->SetBranchStatus("energySCEle_must", 1); - fChainMC->SetBranchStatus("energySCEle_corr", 1); + fChainMC->SetBranchStatus("energy_ECAL_ele", 1); + fChainMC->SetBranchStatus("energyEle", 1); fChainMC->SetBranchStatus("esEnergySCEle", 1); fChainMC->SetBranchStatus("pAtVtxGsfEle", 1); fChainMC->SetBranchStatus("seedXSCEle", 1); @@ -125,7 +125,7 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) // fChainMC->SetBranchStatus("ele1_seedZside",1); fChainMC->SetBranchAddress("runNumber", &runNumber); - fChainMC->SetBranchAddress("runTime", &runTime); + fChainMC->SetBranchAddress("eventTime", &runTime); fChainMC->SetBranchAddress("nPU", &nPU); fChainMC->SetBranchAddress("nPV", &nPV); fChainMC->SetBranchAddress("avgLCSCEle", &avgLCSCEle[0]); @@ -134,9 +134,9 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChainMC->SetBranchAddress("etaSCEle", &etaSCEle); fChainMC->SetBranchAddress("phiSCEle", &phiSCEle); if( useRegression < 1 ) - fChainMC->SetBranchAddress("energySCEle_must", &energySCEle); + fChainMC->SetBranchAddress("energy_ECAL_ele", &energySCEle); else - fChainMC->SetBranchAddress("energySCEle_corr", &energySCEle_corr); + fChainMC->SetBranchAddress("energy_ECAL_ele", &energySCEle_corr); // fChainMC->SetBranchAddress("energySCEle_corr", &energySCEle); fChainMC->SetBranchAddress("esEnergySCEle", &esEnergySCEle); fChainMC->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle); From 96bee056d1f5d94772dc4e8cd043031694cb27da Mon Sep 17 00:00:00 2001 From: mrappo Date: Tue, 17 Jan 2017 13:03:01 +0100 Subject: [PATCH 465/475] update laser monitoring to run with new ntuples --- EOverPCalibration/src/LaserMonitoringEoP.cc | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/EOverPCalibration/src/LaserMonitoringEoP.cc b/EOverPCalibration/src/LaserMonitoringEoP.cc index ef3f625c019..7b48c6ca395 100644 --- a/EOverPCalibration/src/LaserMonitoringEoP.cc +++ b/EOverPCalibration/src/LaserMonitoringEoP.cc @@ -62,7 +62,7 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChain->SetBranchStatus("eventTime", 1); fChain->SetBranchStatus("nPU", 1); fChain->SetBranchStatus("nPV", 1); - fChain->SetBranchStatus("avgLCSCEle", 1); + fChain->SetBranchStatus("avgLCSC", 1); // fChain->SetBranchStatus("seedLaserAlphaSCEle1",1); // fChain->SetBranchStatus("ele1_EOverP",1); fChain->SetBranchStatus("etaSCEle", 1); @@ -71,15 +71,15 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChain->SetBranchStatus("energyEle", 1); fChain->SetBranchStatus("esEnergySCEle", 1); fChain->SetBranchStatus("pAtVtxGsfEle", 1); - fChain->SetBranchStatus("seedXSCEle", 1); - fChain->SetBranchStatus("seedYSCEle", 1); + fChain->SetBranchStatus("xSeedSC", 1); + fChain->SetBranchStatus("ySeedSC", 1); // fChain->SetBranchStatus("ele1_seedZside",1); fChain->SetBranchAddress("runNumber", &runNumber); fChain->SetBranchAddress("eventTime", &runTime); fChain->SetBranchAddress("nPU", &nPU); fChain->SetBranchAddress("nPV", &nPV); - fChain->SetBranchAddress("avgLCSCEle", &avgLCSCEle[0]); + fChain->SetBranchAddress("avgLCSC", &avgLCSCEle[0]); //fChain->SetBranchAddress("seedLaserAlphaSCEle1", &seedLaserAlphaSCEle1); // fChain->SetBranchAddress("ele1_EOverP", &EoP); fChain->SetBranchAddress("etaSCEle", &etaSCEle); @@ -91,8 +91,8 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) // fChain->SetBranchAddress("energySCEle_corr", &energySCEle); fChain->SetBranchAddress("esEnergySCEle", &esEnergySCEle); fChain->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle); - fChain->SetBranchAddress("seedXSCEle", &seedXSCEle); - fChain->SetBranchAddress("seedYSCEle", &seedYSCEle); + fChain->SetBranchAddress("xSeedSC", &seedXSCEle); + fChain->SetBranchAddress("ySeedSC", &seedYSCEle); // fChain->SetBranchAddress("ele1_seedZside", &seedZside); @@ -111,7 +111,7 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChainMC->SetBranchStatus("eventTime", 1); fChainMC->SetBranchStatus("nPU", 1); fChainMC->SetBranchStatus("nPV", 1); - fChainMC->SetBranchStatus("avgLCSCEle", 1); + fChainMC->SetBranchStatus("avgLCSC", 1); // fChainMC->SetBranchStatus("seedLaserAlphaSCEle1",1); // fChainMC->SetBranchStatus("ele1_EOverP",1); fChainMC->SetBranchStatus("etaSCEle", 1); @@ -120,15 +120,15 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) fChainMC->SetBranchStatus("energyEle", 1); fChainMC->SetBranchStatus("esEnergySCEle", 1); fChainMC->SetBranchStatus("pAtVtxGsfEle", 1); - fChainMC->SetBranchStatus("seedXSCEle", 1); - fChainMC->SetBranchStatus("seedYSCEle", 1); + fChainMC->SetBranchStatus("xSeedSC", 1); + fChainMC->SetBranchStatus("ySeedSC", 1); // fChainMC->SetBranchStatus("ele1_seedZside",1); fChainMC->SetBranchAddress("runNumber", &runNumber); fChainMC->SetBranchAddress("eventTime", &runTime); fChainMC->SetBranchAddress("nPU", &nPU); fChainMC->SetBranchAddress("nPV", &nPV); - fChainMC->SetBranchAddress("avgLCSCEle", &avgLCSCEle[0]); + fChainMC->SetBranchAddress("avgLCSC", &avgLCSCEle[0]); //fChainMC->SetBranchAddress("seedLaserAlphaSCEle1", &seedLaserAlphaSCEle1); // fChainMC->SetBranchAddress("ele1_EOverP", &EoP); fChainMC->SetBranchAddress("etaSCEle", &etaSCEle); @@ -140,8 +140,8 @@ void LaserMonitoringEoP::Init(TTree *tree, TTree *treeMC, int useRegression) // fChainMC->SetBranchAddress("energySCEle_corr", &energySCEle); fChainMC->SetBranchAddress("esEnergySCEle", &esEnergySCEle); fChainMC->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle); - fChainMC->SetBranchAddress("seedXSCEle", &seedXSCEle); - fChainMC->SetBranchAddress("seedYSCEle", &seedYSCEle); + fChainMC->SetBranchAddress("xSeedSC", &seedXSCEle); + fChainMC->SetBranchAddress("ySeedSC", &seedYSCEle); // fChainMC->SetBranchAddress("ele1_seedZside", &seedZside); } From b83437e94ea324dedd6976f8b19428642df0e95d Mon Sep 17 00:00:00 2001 From: mrappo Date: Fri, 20 Jan 2017 09:25:00 +0100 Subject: [PATCH 466/475] remove saving of root file in laserMonitoring class and update monitoring script --- EOverPCalibration/src/LaserMonitoringEoP.cc | 2 + .../script/submit_monitoring_jobs_multifit.py | 54 ++++++------------- 2 files changed, 18 insertions(+), 38 deletions(-) diff --git a/EOverPCalibration/src/LaserMonitoringEoP.cc b/EOverPCalibration/src/LaserMonitoringEoP.cc index 7b48c6ca395..1c1f7a8c5c3 100644 --- a/EOverPCalibration/src/LaserMonitoringEoP.cc +++ b/EOverPCalibration/src/LaserMonitoringEoP.cc @@ -1645,6 +1645,7 @@ void LaserMonitoringEoP::Loop( float yMIN, float yMAX, std::string EBEE, int evt //ciao + /* for(int i = 0; i < nBins; ++i) { gStyle->SetOptFit(1111); @@ -1656,6 +1657,7 @@ void LaserMonitoringEoP::Loop( float yMIN, float yMAX, std::string EBEE, int evt // // h_Cvl[i] -> Write(); } + */ o -> Close(); diff --git a/ZFitter/script/submit_monitoring_jobs_multifit.py b/ZFitter/script/submit_monitoring_jobs_multifit.py index f0296235b7f..73947ec4ad0 100644 --- a/ZFitter/script/submit_monitoring_jobs_multifit.py +++ b/ZFitter/script/submit_monitoring_jobs_multifit.py @@ -16,7 +16,8 @@ (options, args) = parser.parse_args() #ntupleName = "data-DoubleEG-Run2016BCD_ZSkim_12p9fb_multifit" -ntupleName = "Run2016BCDEFG_WZSkim_Cal_Sep2016_final_v3_multifit" +ntupleName = "Run2016BCDEFGH_WZSkim_Cal_Jan2017_ref_multifit" +#ntupleName = "Run2016BCDEFGH_WZSkim_Cal_Jan2017_ped_v1_multifit" #ntupleName = "data-SingleElectron-Run2016BCD_WSkim_12p9fb_weights" #options: "data-Run2015D-25ns-multifit", "data-Run2015D-25ns-multifit" or "data-Run2015D-25ns-stream". folder = "/store/group/dpg_ecal/alca_ecalcalib/ecalMIBI/lbrianza/ntupleEoP/" @@ -26,53 +27,30 @@ #yMIN = ["0.95","0.95","0.95","0.95","0.95","0.95","0.95","0.95","0.95","0.95","0.95","0.95"] #categories = ["EEp","EEp_1479_2","EEp_2_25","EEm","EEm_1479_2","EEm_2_25"] #yMIN = ["0.65","0.65","0.40","0.65","0.65","0.40"] -#ntuplelist = ["data-SingleElectron-Run2016BCD_WSkim_12p9fb_weights"] -#ntuplelist = ["data-DoubleEG-Run2016BCD_ZSkim_12p9fb_multifit"] -#ntuplelist = ["data-SingleElectron-Run2016BCD_WSkim_12p9fb_multifit","data-DoubleEG-Run2016BCD_ZSkim_12p9fb_multifit"] -#ntuplelist = ["SingleElectron-Run2016B-WSkim-Prompt_v2-273150-275376","SingleElectron-Run2016C-WSkim-Prompt_v2-275420-276283","SingleElectron-Run2016D-WSkim-Prompt_v2-276315-276811","SingleElectron-Run2016E-WSkim-Prompt_v1-276830-277420","SingleElectron-Run2016F-WSkim-Prompt_v1-277820-278808","SingleElectron-Run2016G-WSkim-Prompt_v1-278817-279488"] -#ntuplelist=["DoubleEG-Run2016B-ZSkim-Prompt_v2-273150-275376.root","DoubleEG-Run2016C-ZSkim-Prompt_v2-275420-276283.root","DoubleEG-Run2016D-ZSkim-Prompt_v2-276315-276811.root", -#"DoubleEG-Run2016E-ZSkim-Prompt-v2-276830-277420.root","DoubleEG-Run2016F-ZSkim-Prompt-v1-277820-278808.root","DoubleEG-Run2016G-ZSkim-Prompt-v1-278817-279588.root","DoubleEG-Run2016G-ZSkim-Prompt-v1-279589-279931.root"] ntuplelist = [ -#"DoubleEG-Run2016B-ZSkim-Prompt_v2-273150-275376", -#"DoubleEG-Run2016C-ZSkim-Prompt_v2-275420-276283", -#"DoubleEG-Run2016D-ZSkim-Prompt_v2-276315-276811", -#"DoubleEG-Run2016E-ZSkim-Prompt-v2-276830-277420", -#"DoubleEG-Run2016F-ZSkim-Prompt-v1-277820-278808", -#"DoubleEG-Run2016G-ZSkim-Prompt-v1-278817-279588", -#"DoubleEG-Run2016G-ZSkim-Prompt-v1-279589-279931", "SingleElectron-Run2016B-WSkim-Prompt_v2-273150-275376", "SingleElectron-Run2016C-WSkim-Prompt_v2-275420-276283", "SingleElectron-Run2016D-WSkim-Prompt_v2-276315-276811", "SingleElectron-Run2016E-WSkim-Prompt-v2-276830-277420", "SingleElectron-Run2016F-WSkim-Prompt-v1-277820-278808", -"SingleElectron-Run2016G-WSkim-Prompt-v1-278817-279588", -"SingleElectron-Run2016G-WSkim-Prompt-v1-279589-279931" +"SingleElectron-Run2016G-WSkim-Prompt-v1-278817-280385", +"SingleElectron-Run2016H-WSkim-Prompt-v2-281207-284035", +"SingleElectron-Run2016H-WSkim-Prompt-v3-284036-284068" ] folderlist=[ -#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016B-ZSkim-Prompt_v2/273150-275376/271036_279931-Cal_Sep2016/withExtras2/", -#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016C-ZSkim-Prompt_v2/275420-276283/271036_279931-Cal_Sep2016/withExtras2/", -#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016D-ZSkim-Prompt_v2/276315-276811/271036_279931-Cal_Sep2016/withExtras2/", -#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016E-ZSkim-Prompt-v2/276830-277420/271036_279931-Cal_Sep2016/withExtras2/", -#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016F-ZSkim-Prompt-v1/277820-278808/271036_279931-Cal_Sep2016/withExtras2/", -#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/278817-279588/271036_279931-Cal_Sep2016/withExtras2/", -#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/279589-279931/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016B-WSkim-Prompt_v2/273150-275376/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016C-WSkim-Prompt_v2/275420-276283/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016D-WSkim-Prompt_v2/276315-276811/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016E-WSkim-Prompt-v2/276830-277420/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016F-WSkim-Prompt-v1/277820-278808/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016G-WSkim-Prompt-v1/278817-279588/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016G-WSkim-Prompt-v1/279589-279931/271036_279931-Cal_Sep2016/withExtras/" +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016B-WSkim-Prompt_v2/273150-275376/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016C-WSkim-Prompt_v2/275420-276283/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016D-WSkim-Prompt_v2/276315-276811/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016E-WSkim-Prompt-v2/276830-277420/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016F-WSkim-Prompt-v1/277820-278808/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016G-WSkim-Prompt-v1/278817-280385/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v2/281207-284035/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v3/284036-284068/271036_284044-23Sep2016/newNtuples/" ] -#folderlist=["/store/group/dpg_ecal/alca_ecalcalib/ecalMIBI/lbrianza/ntupleEoP/"] -#folderlist=["/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/80X_dataRun2_Prompt_v10/SingleElectron-Run2016B-WSkim-Prompt_v2/273150-275376/271036_276811-ICHEP/withExtrasTest/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/80X_dataRun2_Prompt_v10/SingleElectron-Run2016C-WSkim-Prompt_v2/275420-276283/271036_276811-ICHEP/withExtrasTest/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/80X_dataRun2_Prompt_v10/SingleElectron-Run2016D-WSkim-Prompt_v2/276315-276811/271036_276811-ICHEP/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/80X_dataRun2_Prompt_v10/SingleElectron-Run2016E-WSkim-Prompt_v1/276830-277420/276830-277420/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/80X_dataRun2_Prompt_v10/SingleElectron-Run2016F-WSkim-Prompt_v1/277820-278808/271036-278808/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/80X_dataRun2_Prompt_v10/SingleElectron-Run2016G-WSkim-Prompt_v1/278817-279488/271036-279116/"] - -#folderlist=["/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016B-ZSkim-Prompt_v2/273150-275376/271036_279931-Cal_Sep2016/withExtras2/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016C-ZSkim-Prompt_v2/275420-276283/271036_279931-Cal_Sep2016/withExtras2/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016D-ZSkim-Prompt_v2/276315-276811/271036_279931-Cal_Sep2016/withExtras2/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016E-ZSkim-Prompt-v2/276830-277420/271036_279931-Cal_Sep2016/withExtras2/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016F-ZSkim-Prompt-v1/277820-278808/271036_279931-Cal_Sep2016/withExtras2/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/278817-279588/271036_279931-Cal_Sep2016/withExtras2/","/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/279589-279931/271036_279931-Cal_Sep2016/withExtras2/"] - currentDir = os.getcwd(); CMSSWDir = currentDir+"/../"; @@ -83,9 +61,9 @@ fn = "Job_monitoring_"+ntupleName+"/Job_"+categories[i]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPmonitoring_batch_"+ntupleName+".dat --evtsPerPoint 200000 --laserMonitoringEP --EBEE "+categories[i]+" --yMIN 0.95 --yMAX 1.05 --LUMI 24.1 --dayMin 15-03-2016 --dayMax 15-09-2016 --EoPvsPU 1" #use this if you want to run vs Nvtx -# command = "ZFitter.exe -f EoverPmonitoring_batch_"+ntupleName+".dat --evtsPerPoint 200000 --laserMonitoringEP --EBEE "+categories[i]+" --yMIN 0.8 --yMAX 1.20 --LUMI 24.1 --dayMin 15-03-2016 --dayMax 15-09-2016" #use this if you want to run E/p vs LC -# command = "ZFitter.exe -f EoverPmonitoring_batch_"+ntupleName+".dat --evtsPerPoint "+events[i]+" --laserMonitoringEP --EBEE "+categories[i]+" --yMIN "+yMIN[i]+" --yMAX 1.15 --LUMI 24.1 --dayMin 15-03-2016 --dayMax 15-09-2016" #default, to be run for E/p vs time +# command = "ZFitter.exe -f EoverPmonitoring_batch_"+ntupleName+".dat --evtsPerPoint 200000 --laserMonitoringEP --EBEE "+categories[i]+" --yMIN 0.95 --yMAX 1.05 --LUMI 24.1 --dayMin 15-03-2016 --dayMax 30-12-2016 --EoPvsPU 1 --noPU" #use this if you want to run vs Nvtx +# command = "ZFitter.exe -f EoverPmonitoring_batch_"+ntupleName+".dat --evtsPerPoint 200000 --laserMonitoringEP --EBEE "+categories[i]+" --yMIN 0.8 --yMAX 1.20 --LUMI 24.1 --dayMin 15-03-2016 --dayMax 30-12-2016 --noPU" #use this if you want to run E/p vs LC + command = "ZFitter.exe -f EoverPmonitoring_batch_"+ntupleName+".dat --evtsPerPoint "+events[i]+" --laserMonitoringEP --EBEE "+categories[i]+" --yMIN "+yMIN[i]+" --yMAX 1.15 --LUMI 36.4 --dayMin 15-03-2016 --dayMax 30-12-2016 --noPU" #default, to be run for E/p vs time print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); From 315040b91883d49e4741bf114c08430fa9e4574a Mon Sep 17 00:00:00 2001 From: mrappo Date: Fri, 20 Jan 2017 11:28:31 +0100 Subject: [PATCH 467/475] update calibration scripts --- .../submit_calibration_jobs_multifit.py | 106 +++++++++--------- .../script/submit_calibration_jobs_weights.py | 104 ++++++++--------- 2 files changed, 109 insertions(+), 101 deletions(-) diff --git a/ZFitter/script/submit_calibration_jobs_multifit.py b/ZFitter/script/submit_calibration_jobs_multifit.py index 413fc1fa962..8cfe728a247 100644 --- a/ZFitter/script/submit_calibration_jobs_multifit.py +++ b/ZFitter/script/submit_calibration_jobs_multifit.py @@ -1,4 +1,4 @@ -1#! /usr/bin/env python +#! /usr/bin/env python import os import glob import math @@ -26,7 +26,7 @@ smoothCut = ["1"]; #0=use step-function to reweight, 1=use the E/p distribution energyType = ["0"]; #0=regression, 1=raw energy nLoops = "15"; #number of iterations -ntupleName = "Run2016BCDEFG_WZSkim_Cal_Sep2016_final_v3_multifit" +ntupleName = "Run2016BCDEFGH_WZSkim_Cal_Jan2017_ref_multifit" #ntupleName = "DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1-allRange" #options: "data-Run2015D-25ns-multifit", "data-Run2015D-25ns-multifit" or "data-Run2015D-25ns-stream". #For the MC use: "DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1-allRange" #ntuplelist = ["data-SingleElectron-Run2016BCD_WSkim_12p9fb_multifit","data-DoubleEG-Run2016BCD_ZSkim_12p9fb_multifit"] @@ -36,48 +36,52 @@ #folder = "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARECOSIM/DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1/allRange/246908-258750-Prompt_25ns-v1-esPlanes/" #folder containing the MC ntuples ntuplelist = [ -"DoubleEG-Run2016B-ZSkim-Prompt_v2-273150-275376", -"DoubleEG-Run2016C-ZSkim-Prompt_v2-275420-276283", -"DoubleEG-Run2016D-ZSkim-Prompt_v2-276315-276811", -"DoubleEG-Run2016E-ZSkim-Prompt-v2-276830-277420", -"DoubleEG-Run2016F-ZSkim-Prompt-v1-277820-278808", -"DoubleEG-Run2016G-ZSkim-Prompt-v1-278817-279588", -"DoubleEG-Run2016G-ZSkim-Prompt-v1-279589-279931", -"SingleElectron-Run2016B-WSkim-Prompt_v2-273150-275376", -"SingleElectron-Run2016C-WSkim-Prompt_v2-275420-276283", -"SingleElectron-Run2016D-WSkim-Prompt_v2-276315-276811", -"SingleElectron-Run2016E-WSkim-Prompt-v2-276830-277420", -"SingleElectron-Run2016F-WSkim-Prompt-v1-277820-278808", -"SingleElectron-Run2016G-WSkim-Prompt-v1-278817-279588", -"SingleElectron-Run2016G-WSkim-Prompt-v1-279589-279931" +"DoubleEG-Run2016B-ZSkim-Prompt_v2-273150-275376.root", +"DoubleEG-Run2016C-ZSkim-Prompt_v2-275420-276283.root", +"DoubleEG-Run2016D-ZSkim-Prompt_v2-276315-276811.root", +"DoubleEG-Run2016E-ZSkim-Prompt-v2-276830-277420.root", +"DoubleEG-Run2016F-ZSkim-Prompt-v1-277820-278808.root", +"DoubleEG-Run2016G-ZSkim-Prompt-v1-278817-280385.root", +"DoubleEG-Run2016H-ZSkim-Prompt-v2-281207-284035.root", +"DoubleEG-Run2016H-ZSkim-Prompt-v3-284036-284068.root", +"SingleElectron-Run2016B-WSkim-Prompt_v2-273150-275376.root", +"SingleElectron-Run2016C-WSkim-Prompt_v2-275420-276283.root", +"SingleElectron-Run2016D-WSkim-Prompt_v2-276315-276811.root", +"SingleElectron-Run2016E-WSkim-Prompt-v2-276830-277420.root", +"SingleElectron-Run2016F-WSkim-Prompt-v1-277820-278808.root", +"SingleElectron-Run2016G-WSkim-Prompt-v1-278817-280385.root", +"SingleElectron-Run2016H-WSkim-Prompt-v2-281207-284035.root", +"SingleElectron-Run2016H-WSkim-Prompt-v3-284036-284068.root" ] #folderlist=["/store/group/dpg_ecal/alca_ecalcalib/ecalMIBI/lbrianza/ntupleEoP/"] folderlist=[ -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016B-ZSkim-Prompt_v2/273150-275376/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016C-ZSkim-Prompt_v2/275420-276283/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016D-ZSkim-Prompt_v2/276315-276811/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016E-ZSkim-Prompt-v2/276830-277420/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016F-ZSkim-Prompt-v1/277820-278808/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/278817-279588/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/279589-279931/271036_279931-Cal_Sep2016/withExtras2/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016B-WSkim-Prompt_v2/273150-275376/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016C-WSkim-Prompt_v2/275420-276283/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016D-WSkim-Prompt_v2/276315-276811/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016E-WSkim-Prompt-v2/276830-277420/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016F-WSkim-Prompt-v1/277820-278808/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016G-WSkim-Prompt-v1/278817-279588/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016G-WSkim-Prompt-v1/279589-279931/271036_279931-Cal_Sep2016/withExtras/" +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016B-ZSkim-Prompt_v2/273150-275376/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016C-ZSkim-Prompt_v2/275420-276283/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016D-ZSkim-Prompt_v2/276315-276811/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016E-ZSkim-Prompt-v2/276830-277420/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016F-ZSkim-Prompt-v1/277820-278808/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016G-ZSkim-Prompt-v1/278817-280385/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v2/281207-284035/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v3/284036-284068/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016B-WSkim-Prompt_v2/273150-275376/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016C-WSkim-Prompt_v2/275420-276283/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016D-WSkim-Prompt_v2/276315-276811/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016E-WSkim-Prompt-v2/276830-277420/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016F-WSkim-Prompt-v1/277820-278808/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016G-WSkim-Prompt-v1/278817-280385/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v2/281207-284035/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v3/284036-284068/271036_284044-23Sep2016/newNtuples/" ] TOP=currentDir #cmscaf1nd -#os.system("mkdir Job_"+ntupleName+""+nLoops+"loop_2016_newPcorr") -os.system("mkdir Job_"+ntupleName+""+nLoops+"2016_newPcorr") -os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"2016_newPcorr") -os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"2016_newPcorr") +#os.system("mkdir Job_"+ntupleName+""+nLoops+"loop__pCorr2016") +os.system("mkdir Job_"+ntupleName+""+nLoops+"_pCorr2016") +os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"_pCorr2016") +os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"_pCorr2016") ##RUN CALIBRATION ON BARREL for b in range(len(split)): @@ -86,9 +90,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -99,9 +103,9 @@ for j in range(len(ntuplelist)): outScript.write("\necho \"copy main tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+" ./") outScript.write("\necho \"copy extracalib tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+" ./") outScript.write("\necho \"copiy additional files\" "); # outScript.write("\ncp -v /afs/cern.ch/user/l/lbrianza/work/public/ntupleEoP/* .") @@ -115,7 +119,7 @@ outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -131,9 +135,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -144,9 +148,9 @@ for j in range(len(ntuplelist)): outScript.write("\necho \"copy main tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+" ./") outScript.write("\necho \"copy extracalib tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+" ./") outScript.write("\necho \"copy additional files\" "); # outScript.write("\ncp -v /afs/cern.ch/user/l/lbrianza/work/public/ntupleEoP/* .") @@ -159,7 +163,7 @@ outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -170,7 +174,7 @@ ##CREATE CFG FILES TO PRODUCE CALIBRATION PLOTS LATER -createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"2016_newPcorr.sh" +createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"_pCorr2016.sh" out2 = open(createAndPlotIC,"w") #for b in range(len(split)): @@ -180,8 +184,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EB"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"2016_newPcorr/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEBparameters\")") @@ -211,8 +215,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EE"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"2016_newPcorr/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEEparameters\")") @@ -234,7 +238,7 @@ ##CREATE FOLDER CONTAINING THE FINAL SET OF IC (EB+EE) -newFolder = "ICset_"+ntupleName+"_"+nLoops+"2016_newPcorr" +newFolder = "ICset_"+ntupleName+"_"+nLoops+"_pCorr2016" for c in range(len(cut)): for d in range(len(smoothCut)): @@ -242,6 +246,6 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "IC_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - folder = "output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" out2.write("\ncat "+folder+"IC_EB*txt "+folder+"IC_EE*txt > "+newFolder+"/"+name+".txt") diff --git a/ZFitter/script/submit_calibration_jobs_weights.py b/ZFitter/script/submit_calibration_jobs_weights.py index 66df90fcf8d..a34c181a7cf 100644 --- a/ZFitter/script/submit_calibration_jobs_weights.py +++ b/ZFitter/script/submit_calibration_jobs_weights.py @@ -26,7 +26,7 @@ smoothCut = ["1"]; #0=use step-function to reweight, 1=use the E/p distribution energyType = ["0"]; #0=regression, 1=raw energy nLoops = "15"; #number of iterations -ntupleName = "Run2016BCDEFG_WZSkim_Cal_Sep2016_final_v3_weights" +ntupleName = "Run2016BCDEFGH_WZSkim_Cal_Jan2017_ref_weights" #ntupleName = "DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1-allRange" #options: "data-Run2015D-25ns-multifit", "data-Run2015D-25ns-multifit" or "data-Run2015D-25ns-stream". #For the MC use: "DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1-allRange" #ntuplelist = ["data-SingleElectron-Run2016BCD_WSkim_12p9fb_multifit","data-DoubleEG-Run2016BCD_ZSkim_12p9fb_multifit"] @@ -36,48 +36,52 @@ #folder = "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARECOSIM/DYToEE_powheg_13TeV-RunIISpring15DR74-Asym25n-v1/allRange/246908-258750-Prompt_25ns-v1-esPlanes/" #folder containing the MC ntuples ntuplelist = [ -"DoubleEG-Run2016B-ZSkim-Prompt_v2-weightsReco-273150-275376", -"DoubleEG-Run2016C-ZSkim-Prompt_v2-weightsReco-275420-276283", -"DoubleEG-Run2016D-ZSkim-Prompt_v2-weightsReco-276315-276811", -"DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco-276830-277420", -"DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco-277820-278808", -"DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco-278817-279588", -"DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco-279589-279931", -"SingleElectron-Run2016B-WSkim-Prompt_v2-weightsReco-273150-275376", -"SingleElectron-Run2016C-WSkim-Prompt_v2-weightsReco-275420-276283", -"SingleElectron-Run2016D-WSkim-Prompt_v2-weightsReco-276315-276811", -"SingleElectron-Run2016E-WSkim-Prompt-v2-weightsReco-276830-277420", -"SingleElectron-Run2016F-WSkim-Prompt-v1-weightsReco-277820-278808", -"SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco-278817-279588", -"SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco-279589-279931" +"DoubleEG-Run2016B-ZSkim-Prompt_v2-weightsReco-273150-275376.root", +"DoubleEG-Run2016C-ZSkim-Prompt_v2-weightsReco-275420-276283.root", +"DoubleEG-Run2016D-ZSkim-Prompt_v2-weightsReco-276315-276811.root", +"DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco-276830-277420.root", +"DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco-277820-278808.root", +"DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco-278817-280385.root", +"DoubleEG-Run2016H-ZSkim-Prompt-v2-weightsReco-281207-284035.root", +"DoubleEG-Run2016H-ZSkim-Prompt-v3-weightsReco-284036-284068.root", +"SingleElectron-Run2016B-WSkim-Prompt_v2-weightsReco-273150-275376.root", +"SingleElectron-Run2016C-WSkim-Prompt_v2-weightsReco-275420-276283.root", +"SingleElectron-Run2016D-WSkim-Prompt_v2-weightsReco-276315-276811.root", +"SingleElectron-Run2016E-WSkim-Prompt-v2-weightsReco-276830-277420.root", +"SingleElectron-Run2016F-WSkim-Prompt-v1-weightsReco-277820-278808.root", +"SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco-278817-280385.root", +"SingleElectron-Run2016H-WSkim-Prompt-v2-weightsReco-281207-284035.root", +"SingleElectron-Run2016H-WSkim-Prompt-v3-weightsReco-284036-284068.root" ] #folderlist=["/store/group/dpg_ecal/alca_ecalcalib/ecalMIBI/lbrianza/ntupleEoP/"] folderlist=[ -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016B-ZSkim-Prompt_v2-weightsReco/273150-275376/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016C-ZSkim-Prompt_v2-weightsReco/275420-276283/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016D-ZSkim-Prompt_v2-weightsReco/276315-276811/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco/276830-277420/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco/277820-278808/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco/278817-279588/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco/279589-279931/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016B-WSkim-Prompt_v2-weightsReco/273150-275376/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016C-WSkim-Prompt_v2-weightsReco/275420-276283/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016D-WSkim-Prompt_v2-weightsReco/276315-276811/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016E-WSkim-Prompt-v2-weightsReco/276830-277420/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016F-WSkim-Prompt-v1-weightsReco/277820-278808/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco/278817-279588/271036_279931-Cal_Sep2016/withExtras/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco/279589-279931/271036_279931-Cal_Sep2016/withExtras/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016B-ZSkim-Prompt_v2-weightsReco/273150-275376/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016C-ZSkim-Prompt_v2-weightsReco/275420-276283/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016D-ZSkim-Prompt_v2-weightsReco/276315-276811/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco/276830-277420/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco/277820-278808/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco/278817-280385/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v2-weightsReco/281207-284035/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v3-weightsReco/284036-284068/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016B-WSkim-Prompt_v2-weightsReco/273150-275376/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016C-WSkim-Prompt_v2-weightsReco/275420-276283/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016D-WSkim-Prompt_v2-weightsReco/276315-276811/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016E-WSkim-Prompt-v2-weightsReco/276830-277420/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016F-WSkim-Prompt-v1-weightsReco/277820-278808/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco/278817-280385/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v2-weightsReco/281207-284035/271036_284044-23Sep2016/newNtuples/", +"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v3-weightsReco/284036-284068/271036_284044-23Sep2016/newNtuples/" ] TOP=currentDir #cmscaf1nd -#os.system("mkdir Job_"+ntupleName+""+nLoops+"loop_2016_newPcorr") -os.system("mkdir Job_"+ntupleName+""+nLoops+"2016_newPcorr") -os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"2016_newPcorr") -os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"2016_newPcorr") +#os.system("mkdir Job_"+ntupleName+""+nLoops+"loop__pCorr2016") +os.system("mkdir Job_"+ntupleName+""+nLoops+"_pCorr2016") +os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"_pCorr2016") +os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"_pCorr2016") ##RUN CALIBRATION ON BARREL @@ -87,9 +91,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -100,9 +104,9 @@ for j in range(len(ntuplelist)): outScript.write("\necho \"copy main tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+" ./") outScript.write("\necho \"copy extracalib tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+" ./") outScript.write("\necho \"copiy additional files\" "); # outScript.write("\ncp -v /afs/cern.ch/user/l/lbrianza/work/public/ntupleEoP/* .") @@ -116,7 +120,7 @@ outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -132,9 +136,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"2016_newPcorr/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -145,9 +149,9 @@ for j in range(len(ntuplelist)): outScript.write("\necho \"copy main tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+""+ntuplelist[j]+" ./") outScript.write("\necho \"copy extracalib tree\" "); - outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+".root ./") + outScript.write("\ncmsStage "+folderlist[j]+"extraCalibTree-"+ntuplelist[j]+" ./") outScript.write("\necho \"copy additional files\" "); # outScript.write("\ncp -v /afs/cern.ch/user/l/lbrianza/work/public/ntupleEoP/* .") @@ -160,7 +164,7 @@ outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -171,7 +175,7 @@ ##CREATE CFG FILES TO PRODUCE CALIBRATION PLOTS LATER -createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"2016_newPcorr.sh" +createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"_pCorr2016.sh" out2 = open(createAndPlotIC,"w") #for b in range(len(split)): @@ -181,8 +185,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EB"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"2016_newPcorr/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEBparameters\")") @@ -212,8 +216,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EE"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"2016_newPcorr/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEEparameters\")") @@ -235,7 +239,7 @@ ##CREATE FOLDER CONTAINING THE FINAL SET OF IC (EB+EE) -newFolder = "ICset_"+ntupleName+"_"+nLoops+"2016_newPcorr" +newFolder = "ICset_"+ntupleName+"_"+nLoops+"_pCorr2016" for c in range(len(cut)): for d in range(len(smoothCut)): @@ -243,6 +247,6 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "IC_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - folder = "output_"+ntupleName+"_"+nLoops+"2016_newPcorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" out2.write("\ncat "+folder+"IC_EB*txt "+folder+"IC_EE*txt > "+newFolder+"/"+name+".txt") From f6f46ea5957bceba1206d8aba3a9d2e44e018bac Mon Sep 17 00:00:00 2001 From: mrappo Date: Fri, 20 Jan 2017 17:25:33 +0100 Subject: [PATCH 468/475] update calibration script --- ZFitter/script/submit_calibration_jobs_weights.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ZFitter/script/submit_calibration_jobs_weights.py b/ZFitter/script/submit_calibration_jobs_weights.py index a34c181a7cf..d163c4b4002 100644 --- a/ZFitter/script/submit_calibration_jobs_weights.py +++ b/ZFitter/script/submit_calibration_jobs_weights.py @@ -42,7 +42,7 @@ "DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco-276830-277420.root", "DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco-277820-278808.root", "DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco-278817-280385.root", -"DoubleEG-Run2016H-ZSkim-Prompt-v2-weightsReco-281207-284035.root", +#"DoubleEG-Run2016H-ZSkim-Prompt-v2-weightsReco-281207-284035.root", "DoubleEG-Run2016H-ZSkim-Prompt-v3-weightsReco-284036-284068.root", "SingleElectron-Run2016B-WSkim-Prompt_v2-weightsReco-273150-275376.root", "SingleElectron-Run2016C-WSkim-Prompt_v2-weightsReco-275420-276283.root", @@ -50,7 +50,7 @@ "SingleElectron-Run2016E-WSkim-Prompt-v2-weightsReco-276830-277420.root", "SingleElectron-Run2016F-WSkim-Prompt-v1-weightsReco-277820-278808.root", "SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco-278817-280385.root", -"SingleElectron-Run2016H-WSkim-Prompt-v2-weightsReco-281207-284035.root", +#"SingleElectron-Run2016H-WSkim-Prompt-v2-weightsReco-281207-284035.root", "SingleElectron-Run2016H-WSkim-Prompt-v3-weightsReco-284036-284068.root" ] @@ -62,7 +62,7 @@ "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco/276830-277420/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco/277820-278808/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco/278817-280385/271036_284044-23Sep2016/newNtuples/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v2-weightsReco/281207-284035/271036_284044-23Sep2016/newNtuples/", +#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v2-weightsReco/281207-284035/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v3-weightsReco/284036-284068/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016B-WSkim-Prompt_v2-weightsReco/273150-275376/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016C-WSkim-Prompt_v2-weightsReco/275420-276283/271036_284044-23Sep2016/newNtuples/", @@ -70,7 +70,7 @@ "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016E-WSkim-Prompt-v2-weightsReco/276830-277420/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016F-WSkim-Prompt-v1-weightsReco/277820-278808/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016G-WSkim-Prompt-v1-weightsReco/278817-280385/271036_284044-23Sep2016/newNtuples/", -"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v2-weightsReco/281207-284035/271036_284044-23Sep2016/newNtuples/", +#"/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v2-weightsReco/281207-284035/271036_284044-23Sep2016/newNtuples/", "/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/SingleElectron-Run2016H-WSkim-Prompt-v3-weightsReco/284036-284068/271036_284044-23Sep2016/newNtuples/" ] From 69cfba7b74e338e944c37098d78daf7b93773a9b Mon Sep 17 00:00:00 2001 From: mrappo Date: Tue, 24 Jan 2017 10:54:57 +0100 Subject: [PATCH 469/475] fix bug in the names saved in the scripts --- ZFitter/script/submit_calibration_jobs_multifit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ZFitter/script/submit_calibration_jobs_multifit.py b/ZFitter/script/submit_calibration_jobs_multifit.py index 8cfe728a247..9b104ccace9 100644 --- a/ZFitter/script/submit_calibration_jobs_multifit.py +++ b/ZFitter/script/submit_calibration_jobs_multifit.py @@ -190,9 +190,9 @@ outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEBparameters\")") outScript.write("\nprocess.Options = cms.PSet(") - outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EB.root\"),") - outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EB_even.root\"),") - outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EB_odd.root\"),") + outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EB.root\"),") + outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EB_even.root\"),") + outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EB_odd.root\"),") outScript.write("\n\tnEtaBinsEB = cms.int32(1),") outScript.write("\n\tnEtaBinsEE = cms.int32(1),") outScript.write("\n\tis2012Calib = cms.bool(False),") @@ -221,9 +221,9 @@ outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEEparameters\")") outScript.write("\nprocess.Options = cms.PSet(") - outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EE.root\"),") - outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EE_even.root\"),") - outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EE_odd.root\"),") + outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EE.root\"),") + outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EE_even.root\"),") + outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EE_odd.root\"),") outScript.write("\n\tnEtaBinsEB = cms.int32(1),") outScript.write("\n\tnEtaBinsEE = cms.int32(1),") outScript.write("\n\tis2012Calib = cms.bool(False),") From 9f6c43df75e5dbb4749999ea3deab912edb52360 Mon Sep 17 00:00:00 2001 From: mrappo Date: Tue, 24 Jan 2017 11:54:05 +0100 Subject: [PATCH 470/475] fix bug in the names saved in the scripts --- ZFitter/script/submit_calibration_jobs_weights.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ZFitter/script/submit_calibration_jobs_weights.py b/ZFitter/script/submit_calibration_jobs_weights.py index d163c4b4002..599004850d3 100644 --- a/ZFitter/script/submit_calibration_jobs_weights.py +++ b/ZFitter/script/submit_calibration_jobs_weights.py @@ -191,9 +191,9 @@ outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEBparameters\")") outScript.write("\nprocess.Options = cms.PSet(") - outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EB.root\"),") - outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EB_even.root\"),") - outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EB_odd.root\"),") + outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EB.root\"),") + outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EB_even.root\"),") + outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EB_odd.root\"),") outScript.write("\n\tnEtaBinsEB = cms.int32(1),") outScript.write("\n\tnEtaBinsEE = cms.int32(1),") outScript.write("\n\tis2012Calib = cms.bool(False),") @@ -222,9 +222,9 @@ outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEEparameters\")") outScript.write("\nprocess.Options = cms.PSet(") - outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EE.root\"),") - outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EE_even.root\"),") - outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_WZ_noEP_EE_odd.root\"),") + outScript.write("\n\tinFileName = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EE.root\"),") + outScript.write("\n\tinFileNameEven = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EE_even.root\"),") + outScript.write("\n\tinFileNameOdd = cms.string(\""+TOP+"/"+folder+"FastCalibrator_Oct2015_runD_EE_odd.root\"),") outScript.write("\n\tnEtaBinsEB = cms.int32(1),") outScript.write("\n\tnEtaBinsEE = cms.int32(1),") outScript.write("\n\tis2012Calib = cms.bool(False),") From c0f4e25c5faa31aa813fec57bf5c41a824e6e48c Mon Sep 17 00:00:00 2001 From: mrappo Date: Mon, 20 Feb 2017 15:47:29 +0100 Subject: [PATCH 471/475] update scripts --- ZFitter/script/submit_monitoring_jobs_multifit.py | 2 +- ZFitter/script/submit_monitoring_jobs_weights.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ZFitter/script/submit_monitoring_jobs_multifit.py b/ZFitter/script/submit_monitoring_jobs_multifit.py index 73947ec4ad0..d0c93c2b1f8 100644 --- a/ZFitter/script/submit_monitoring_jobs_multifit.py +++ b/ZFitter/script/submit_monitoring_jobs_multifit.py @@ -70,7 +70,7 @@ outScript.write("\n"+'eval `scram runtime -sh`'); outScript.write("\n"+'cd -'); outScript.write("\necho $PWD"); - outScript.write("mkdir "+categories[i]+"__"); + outScript.write("\nmkdir "+categories[i]+"__"); outScript.write("\nll"); for j in range(len(ntuplelist)): diff --git a/ZFitter/script/submit_monitoring_jobs_weights.py b/ZFitter/script/submit_monitoring_jobs_weights.py index bf184f524c4..4482a4adbaa 100644 --- a/ZFitter/script/submit_monitoring_jobs_weights.py +++ b/ZFitter/script/submit_monitoring_jobs_weights.py @@ -91,7 +91,7 @@ outScript.write("\n"+'eval `scram runtime -sh`'); outScript.write("\n"+'cd -'); outScript.write("\necho $PWD"); - outScript.write("mkdir "+categories[i]+"__"); + outScript.write("\nmkdir "+categories[i]+"__"); outScript.write("\nll"); for j in range(len(ntuplelist)): From f9c687875535db2a179708325d96c047d10b97f3 Mon Sep 17 00:00:00 2001 From: mrappo Date: Mon, 20 Feb 2017 17:34:45 +0100 Subject: [PATCH 472/475] coherent names of folders between script and code --- EOverPCalibration/src/LaserMonitoringEoP.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EOverPCalibration/src/LaserMonitoringEoP.cc b/EOverPCalibration/src/LaserMonitoringEoP.cc index 1c1f7a8c5c3..9a3d6a3ba91 100644 --- a/EOverPCalibration/src/LaserMonitoringEoP.cc +++ b/EOverPCalibration/src/LaserMonitoringEoP.cc @@ -263,6 +263,7 @@ void LaserMonitoringEoP::Loop( float yMIN, float yMAX, std::string EBEE, int evt // Define in/outfiles std::string folderName = std::string(EBEE) + "_" + dayMinLabel + "_" + dayMaxLabel; + /* if( (absEtaMin != -1.) && (absEtaMax != -1.) ) { char absEtaBuffer[50]; sprintf(absEtaBuffer, "_%.2f-%.2f", absEtaMin, absEtaMax); @@ -274,7 +275,7 @@ void LaserMonitoringEoP::Loop( float yMIN, float yMAX, std::string EBEE, int evt sprintf(absEtaBuffer, "_Ieta_%d-%d_Iphi_%d-%d", IetaMin, IetaMax, IphiMin, IphiMax); folderName += std::string(absEtaBuffer); } - + */ gSystem->mkdir(folderName.c_str()); TFile* o = new TFile((folderName + "/" + folderName + "_histos.root").c_str(), "RECREATE"); From 58c8fd47fba53356214b033ce6297c44ef4888ae Mon Sep 17 00:00:00 2001 From: mrappo Date: Thu, 9 Mar 2017 12:20:23 +0100 Subject: [PATCH 473/475] separate momentum corrections for electrons and positrons --- EOverPCalibration/bin/CalibrationMomentum.cpp | 132 +++++++++--------- .../cfg/calibrationMomentum_cfg.py | 5 +- .../cfg/listDATA_momentumCalibration.txt | 24 ++-- .../interface/FastCalibratorEB.h | 8 +- .../interface/FastCalibratorEE.h | 8 +- EOverPCalibration/src/DrawingUtils.cc | 4 +- EOverPCalibration/src/FastCalibratorEB.cc | 47 ++++--- EOverPCalibration/src/FastCalibratorEE.cc | 54 +++---- ZFitter/bin/ZFitter.cpp | 33 +++-- .../submit_calibration_jobs_multifit.py | 40 +++--- .../script/submit_calibration_jobs_weights.py | 45 +++--- 11 files changed, 205 insertions(+), 195 deletions(-) diff --git a/EOverPCalibration/bin/CalibrationMomentum.cpp b/EOverPCalibration/bin/CalibrationMomentum.cpp index db51c1bad74..3ae2029cc2b 100644 --- a/EOverPCalibration/bin/CalibrationMomentum.cpp +++ b/EOverPCalibration/bin/CalibrationMomentum.cpp @@ -131,6 +131,10 @@ int main(int argc, char** argv) if(Options.existsAs("usePUweights")) usePUweights = Options.getParameter("usePUweights"); + int chargeValue = -1; + if(Options.existsAs("chargeValue")) + chargeValue = Options.getParameter("chargeValue"); + cout << " Basic Configuration " << endl; cout << " Tree Name = " << TreeName << endl; cout << " infileDATA = " << infileDATA << endl; @@ -145,6 +149,7 @@ int main(int argc, char** argv) cout << " rebinEB = " << rebinEB << endl; cout << " rebinEE = " << rebinEE << endl; cout << " usePUweights = " << usePUweights << endl; + cout << " chargeValue = " << chargeValue << endl; cout << "Making calibration plots for Momentum scale studies " << endl; @@ -155,15 +160,15 @@ int main(int argc, char** argv) float eta2Max = 2.5; //--- weights for MC - TFile weightsFile (WeightforMC.c_str(), "READ"); - TH1F* hweights = (TH1F*)weightsFile.Get("pileup"); + // TFile weightsFile (WeightforMC.c_str(), "READ"); + // TH1F* hweights = (TH1F*)weightsFile.Get("pileup"); - float w[100]; + /* float w[100]; for (int ibin = 1; ibin < hweights->GetNbinsX() + 1; ibin++) { w[ibin - 1] = hweights->GetBinContent(ibin); // bin 1 --> nvtx = 0 } weightsFile.Close(); - + */ //histos to get the bin in phi given the electron phi TH1F* hPhiBinEB = new TH1F("hphiEB", "hphiEB", nPhiBinsEB, -1.*TMath::Pi(), 1.*TMath::Pi()); TH1F* hPhiBinEE = new TH1F("hphiEE", "hphiEE", nPhiBinsEE, -1.*TMath::Pi(), 1.*TMath::Pi()); @@ -180,15 +185,14 @@ int main(int argc, char** argv) // observables // int isW; - float invMass_SC; + float invMass_ECAL_ele; float etaSCEle[3], phiSCEle[3]; float etaEle[3], phiEle[3]; float energySCEle[3], rawEnergySCEle[3], R9Ele[3]; int chargeEle[3]; float pAtVtxGsfEle[3]; - float seedXSCEle[3], seedYSCEle[3]; + float xSeedSC[3], ySeedSC[3]; int NPU[1]; - float PtEle[3]; int ele1_iz, ele2_iz; // Set branch addresses for Data @@ -202,22 +206,20 @@ int main(int argc, char** argv) ntu_DA->SetBranchAddress("etaSCEle", &etaSCEle); ntu_DA->SetBranchStatus("phiSCEle", 1); ntu_DA->SetBranchAddress("phiSCEle", &phiSCEle); - ntu_DA->SetBranchStatus("energySCEle", 1); - ntu_DA->SetBranchAddress("energySCEle", &energySCEle); + ntu_DA->SetBranchStatus("energy_ECAL_ele", 1); + ntu_DA->SetBranchAddress("energy_ECAL_ele", &energySCEle); ntu_DA->SetBranchStatus("rawEnergySCEle", 1); ntu_DA->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle); - ntu_DA->SetBranchStatus("PtEle", 1); - ntu_DA->SetBranchAddress("PtEle", &PtEle); - ntu_DA->SetBranchStatus("invMass_SC", 1); - ntu_DA->SetBranchAddress("invMass_SC", &invMass_SC); + ntu_DA->SetBranchStatus("invMass_ECAL_ele", 1); + ntu_DA->SetBranchAddress("invMass_ECAL_ele", &invMass_ECAL_ele); ntu_DA->SetBranchStatus("chargeEle", 1); ntu_DA->SetBranchAddress("chargeEle", &chargeEle); ntu_DA->SetBranchStatus("pAtVtxGsfEle", 1); ntu_DA->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle); - ntu_DA->SetBranchStatus("seedXSCEle", 1); - ntu_DA->SetBranchAddress("seedXSCEle", &seedXSCEle); - ntu_DA->SetBranchStatus("seedYSCEle", 1); - ntu_DA->SetBranchAddress("seedYSCEle", &seedYSCEle); + ntu_DA->SetBranchStatus("xSeedSC", 1); + ntu_DA->SetBranchAddress("xSeedSC", &xSeedSC); + ntu_DA->SetBranchStatus("ySeedSC", 1); + ntu_DA->SetBranchAddress("ySeedSC", &ySeedSC); // Set branch addresses for MC @@ -231,22 +233,20 @@ int main(int argc, char** argv) ntu_MC->SetBranchAddress("etaSCEle", &etaSCEle); ntu_MC->SetBranchStatus("phiSCEle", 1); ntu_MC->SetBranchAddress("phiSCEle", &phiSCEle); - ntu_MC->SetBranchStatus("energySCEle", 1); - ntu_MC->SetBranchAddress("energySCEle", &energySCEle); + ntu_MC->SetBranchStatus("energy_ECAL_ele", 1); + ntu_MC->SetBranchAddress("energy_ECAL_ele", &energySCEle); ntu_MC->SetBranchStatus("rawEnergySCEle", 1); ntu_MC->SetBranchAddress("rawEnergySCEle", &rawEnergySCEle); - ntu_MC->SetBranchStatus("PtEle", 1); - ntu_MC->SetBranchAddress("PtEle", &PtEle); - ntu_MC->SetBranchStatus("invMass_SC", 1); - ntu_MC->SetBranchAddress("invMass_SC", &invMass_SC); + ntu_MC->SetBranchStatus("invMass_ECAL_ele", 1); + ntu_MC->SetBranchAddress("invMass_ECAL_ele", &invMass_ECAL_ele); ntu_MC->SetBranchStatus("chargeEle", 1); ntu_MC->SetBranchAddress("chargeEle", &chargeEle); ntu_MC->SetBranchStatus("pAtVtxGsfEle", 1); ntu_MC->SetBranchAddress("pAtVtxGsfEle", &pAtVtxGsfEle); - ntu_MC->SetBranchStatus("seedXSCEle", 1); - ntu_MC->SetBranchAddress("seedXSCEle", &seedXSCEle); - ntu_MC->SetBranchStatus("seedYSCEle", 1); - ntu_MC->SetBranchAddress("seedYSCEle", &seedYSCEle); + ntu_MC->SetBranchStatus("xSeedSC", 1); + ntu_MC->SetBranchAddress("xSeedSC", &xSeedSC); + ntu_MC->SetBranchStatus("ySeedSC", 1); + ntu_MC->SetBranchAddress("ySeedSC", &ySeedSC); if(usePUweights) { ntu_MC->SetBranchStatus("NPU", 1); @@ -440,8 +440,8 @@ int main(int argc, char** argv) // if( isW == 1 ) continue; if( fabs(etaSCEle[0]) > etaMax ) continue; if( fabs(etaSCEle[1]) > eta2Max ) continue; - if( PtEle[0] < 20. ) continue; - if( PtEle[1] < 20. ) continue; + if( (energySCEle[0]/cosh(etaEle[0])) < 20. ) continue; + if( (energySCEle[1]/cosh(etaEle[1])) < 20. ) continue; if ( fabs(etaEle[0]) < 1.479) ele1_iz = 0; else if (etaEle[0] > 0) ele1_iz = 1; @@ -453,11 +453,12 @@ int main(int argc, char** argv) //--- PU weights float ww = 1.; - if( usePUweights ) ww *= w[NPU[0]]; + // if( usePUweights ) ww *= w[NPU[0]]; + if( (chargeEle[1]<0 && chargeValue<0) || (chargeEle[1]>0 && chargeValue>0)) { //--- set the mass for ele1 - // var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19; - var = ( invMass_SC * sqrt(pAtVtxGsfEle[0] / energySCEle[0]) ) / 91.19; + // var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19; + var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[0] / energySCEle[0]) ) / 91.19; // simulate e+/e- asymmetry //if( chargeEle[0] > 0 ) ww *= 1.*(6/5); //else ww *= 1.*(4/5); @@ -465,7 +466,7 @@ int main(int argc, char** argv) // MC - BARREL - ele1 if( ele1_iz == 0 ) { // fill MC templates - int modPhi = int(seedYSCEle[0] / (360. / nPhiBinsTempEB)); + int modPhi = int(ySeedSC[0] / (360. / nPhiBinsTempEB)); if( modPhi == nPhiBinsTempEB ) modPhi = 0; int regionId = templIndexEB(typeEB, etaEle[0], chargeEle[0], R9Ele[0]); @@ -484,10 +485,10 @@ int main(int argc, char** argv) // MC - ENDCAP - ele1 else { - int iphi = eRings->GetEndcapIphi(seedXSCEle[0], seedYSCEle[0], ele1_iz); + int iphi = eRings->GetEndcapIphi(xSeedSC[0], ySeedSC[0], ele1_iz); - if( ele1_iz == 1 )mapConversionEEp -> SetBinContent(seedXSCEle[0], seedYSCEle[0], etaSCEle[0]); - if( ele1_iz == -1 )mapConversionEEm -> SetBinContent(seedXSCEle[0], seedYSCEle[0], etaSCEle[0]); + if( ele1_iz == 1 )mapConversionEEp -> SetBinContent(xSeedSC[0], ySeedSC[0], etaSCEle[0]); + if( ele1_iz == -1 )mapConversionEEm -> SetBinContent(xSeedSC[0], ySeedSC[0], etaSCEle[0]); // fill MC templates @@ -507,12 +508,13 @@ int main(int argc, char** argv) (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var * var, ww); // This is MC h_phi_mc_EE[regionId] -> Fill(phiSCEle[0], ww); } + } - + else{ //--- set the mass for ele2 - // var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19; - var = ( invMass_SC * sqrt(pAtVtxGsfEle[1] / energySCEle[1]) ) / 91.19; + // var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19; + var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[1] / energySCEle[1]) ) / 91.19; // simulate e+/e- asymmetry //if( chargeEle[0] > 0 ) ww *= 1.*(6/5); //else ww *= 1.*(4/5); @@ -520,7 +522,7 @@ int main(int argc, char** argv) // MC - BARREL - ele2 if( ele2_iz == 0) { // fill MC templates - int modPhi = int (seedYSCEle[1] / (360. / nPhiBinsTempEB)); + int modPhi = int (ySeedSC[1] / (360. / nPhiBinsTempEB)); if( modPhi == nPhiBinsTempEB ) modPhi = 0; int regionId = templIndexEB(typeEB, etaEle[1], chargeEle[1], R9Ele[1]); @@ -539,10 +541,10 @@ int main(int argc, char** argv) // MC - ENDCAP - ele2 else { - if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(seedXSCEle[1], seedYSCEle[1], etaSCEle[1]); - if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(seedXSCEle[1], seedYSCEle[1], etaSCEle[1]); + if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(xSeedSC[1], ySeedSC[1], etaSCEle[1]); + if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(xSeedSC[1], ySeedSC[1], etaSCEle[1]); - int iphi = eRings->GetEndcapIphi(seedXSCEle[1], seedYSCEle[1], ele2_iz); + int iphi = eRings->GetEndcapIphi(xSeedSC[1], ySeedSC[1], ele2_iz); // fill MC templates @@ -562,9 +564,10 @@ int main(int argc, char** argv) (h_EoP_EE.at(PhibinEE)).at(regionId) -> Fill(var * var, ww); // This is MC h_phi_mc_EE[regionId]->Fill(phiSCEle[1], ww); } + } - h_et_mc ->Fill(PtEle[0], ww); - h_et_mc ->Fill(PtEle[1], ww); + h_et_mc ->Fill((energySCEle[0]/cosh(etaEle[0])), ww); + h_et_mc ->Fill((energySCEle[1]/cosh(etaEle[1])), ww); } @@ -584,8 +587,8 @@ int main(int argc, char** argv) // if( isW == 1 ) continue; if( fabs(etaSCEle[0]) > etaMax ) continue; if( fabs(etaSCEle[1]) > eta2Max ) continue; - if( PtEle[0] < 20. ) continue; - if( PtEle[1] < 20. ) continue; + if( (energySCEle[0]/cosh(etaEle[0])) < 20. ) continue; + if( (energySCEle[1]/cosh(etaEle[1])) < 20. ) continue; float ww = 1.; @@ -597,12 +600,12 @@ int main(int argc, char** argv) else if (etaEle[1] > 0) ele2_iz = 1; else ele2_iz = -1; - + if( (chargeEle[1]<0 && chargeValue<0) || (chargeEle[1]>0 && chargeValue>0)) { //--- set the mass for ele1 - // if( ele1_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19; - // else var = ( invMass_SC * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19; - if( ele1_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[0] / energySCEle[0]) ) / 91.19; - else var = ( invMass_SC * sqrt(pAtVtxGsfEle[0] / energySCEle[0]) ) / 91.19; + // if( ele1_iz == 0 ) var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19; + // else var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[0]/energySCEle[0]) * sqrt(scEneReg2/energySCEle[1]) ) / 91.19; + if( ele1_iz == 0 ) var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[0] / energySCEle[0]) ) / 91.19; + else var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[0] / energySCEle[0]) ) / 91.19; // simulate e+/e- asymmetry //if( chargeEle[0] > 0 ) ww *= 1.*(6/5); //else ww *= 1.*(4/5); @@ -622,8 +625,8 @@ int main(int argc, char** argv) // DATA - ENDCAP - ele1 else { - if( ele1_iz == 1 ) mapConversionEEp -> SetBinContent(seedXSCEle[0], seedYSCEle[0], etaSCEle[0]); - if( ele1_iz == -1 ) mapConversionEEm -> SetBinContent(seedXSCEle[0], seedYSCEle[0], etaSCEle[0]); + if( ele1_iz == 1 ) mapConversionEEp -> SetBinContent(xSeedSC[0], ySeedSC[0], etaSCEle[0]); + if( ele1_iz == -1 ) mapConversionEEm -> SetBinContent(xSeedSC[0], ySeedSC[0], etaSCEle[0]); int PhibinEE = hPhiBinEE->FindBin(phiEle[0]) - 1; if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; @@ -635,14 +638,14 @@ int main(int argc, char** argv) (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(phiEle[0]); h_phi_data_EE[regionId] -> Fill(phiEle[0]); } + } - - + else{ //--- set the mass for ele2 - // if( ele2_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19; - // else var = ( invMass_SC * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19; - if( ele2_iz == 0 ) var = ( invMass_SC * sqrt(pAtVtxGsfEle[1] / energySCEle[1]) ) / 91.19; - else var = ( invMass_SC * sqrt(pAtVtxGsfEle[1] / energySCEle[1]) ) / 91.19; + // if( ele2_iz == 0 ) var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19; + // else var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[1]/energySCEle[1]) * sqrt(scEneReg/energySCEle[0]) ) / 91.19; + if( ele2_iz == 0 ) var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[1] / energySCEle[1]) ) / 91.19; + else var = ( invMass_ECAL_ele * sqrt(pAtVtxGsfEle[1] / energySCEle[1]) ) / 91.19; // simulate e+/e- asymmetry //if( chargeEle[0]Ele[1] > 0 ) ww *= 1.*(6/5); //else ww *= 1.*(4/5); @@ -659,8 +662,8 @@ int main(int argc, char** argv) (h_Phi_EB.at(PhibinEB)).at(regionId) -> Fill(phiEle[1]); h_phi_data_EB[regionId] -> Fill(phiEle[1]); } else { - if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(seedXSCEle[1], seedYSCEle[1], etaSCEle[1]); - if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(seedXSCEle[1], seedYSCEle[1], etaSCEle[1]); + if( ele2_iz == 1 ) mapConversionEEp -> SetBinContent(xSeedSC[1], ySeedSC[1], etaSCEle[1]); + if( ele2_iz == -1 ) mapConversionEEm -> SetBinContent(xSeedSC[1], ySeedSC[1], etaSCEle[1]); int PhibinEE = hPhiBinEE->FindBin(phiEle[1]) - 1; if( PhibinEE == nPhiBinsEE ) PhibinEE = 0; @@ -672,9 +675,10 @@ int main(int argc, char** argv) (h_Phi_EE.at(PhibinEE)).at(regionId) -> Fill(phiEle[1]); h_phi_data_EE[regionId] ->Fill(phiEle[1]); } + } - h_et_data ->Fill(PtEle[0]); - h_et_data ->Fill(PtEle[1]); + h_et_data ->Fill((energySCEle[0]/cosh(etaEle[0]))); + h_et_data ->Fill((energySCEle[1]/cosh(etaEle[1]))); } std::cout << "End loop: Analyze events " << endl; diff --git a/EOverPCalibration/cfg/calibrationMomentum_cfg.py b/EOverPCalibration/cfg/calibrationMomentum_cfg.py index 50ee397d421..37f9de31654 100644 --- a/EOverPCalibration/cfg/calibrationMomentum_cfg.py +++ b/EOverPCalibration/cfg/calibrationMomentum_cfg.py @@ -17,9 +17,10 @@ nPhiBinsTempEE = cms.int32(1), rebinEB = cms.int32(10), rebinEE = cms.int32(20), - outputFile = cms.string("output/MomentumCalibration2016.root"), + outputFile = cms.string("output/MomentumCalibration2016"), typeEB = cms.string("eta1"), - typeEE = cms.string("eta1") + typeEE = cms.string("eta1"), + chargeValue = cms.int32(-1) ) diff --git a/EOverPCalibration/cfg/listDATA_momentumCalibration.txt b/EOverPCalibration/cfg/listDATA_momentumCalibration.txt index 79cb419a477..4a09bf02cea 100644 --- a/EOverPCalibration/cfg/listDATA_momentumCalibration.txt +++ b/EOverPCalibration/cfg/listDATA_momentumCalibration.txt @@ -1,18 +1,10 @@ ##MULTIFIT -#eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016B-ZSkim-Prompt_v2/273150-275376/271036_279931-Cal_Sep2016/withExtras2/DoubleEG-Run2016B-ZSkim-Prompt_v2-273150-275376.root -#eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016C-ZSkim-Prompt_v2/275420-276283/271036_279931-Cal_Sep2016/withExtras2/DoubleEG-Run2016C-ZSkim-Prompt_v2-275420-276283.root -#eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016D-ZSkim-Prompt_v2/276315-276811/271036_279931-Cal_Sep2016/withExtras2/DoubleEG-Run2016D-ZSkim-Prompt_v2-276315-276811.root -#eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016E-ZSkim-Prompt-v2/276830-277420/271036_279931-Cal_Sep2016/withExtras2/DoubleEG-Run2016E-ZSkim-Prompt-v2-276830-277420.root -#eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016F-ZSkim-Prompt-v1/277820-278808/271036_279931-Cal_Sep2016/withExtras2/DoubleEG-Run2016F-ZSkim-Prompt-v1-277820-278808.root -#eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/278817-279588/271036_279931-Cal_Sep2016/withExtras2/DoubleEG-Run2016G-ZSkim-Prompt-v1-278817-279588.root -#eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1/279589-279931/271036_279931-Cal_Sep2016/withExtras2/DoubleEG-Run2016G-ZSkim-Prompt-v1-279589-279931.root - -##WEIGHTS -eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016B-ZSkim-Prompt_v2-weightsReco/273150-275376/271036_279931-Cal_Sep2016/withExtras/DoubleEG-Run2016B-ZSkim-Prompt_v2-weightsReco-273150-275376.root -eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016C-ZSkim-Prompt_v2-weightsReco/275420-276283/271036_279931-Cal_Sep2016/withExtras/DoubleEG-Run2016C-ZSkim-Prompt_v2-weightsReco-275420-276283.root -eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016D-ZSkim-Prompt_v2-weightsReco/276315-276811/271036_279931-Cal_Sep2016/withExtras/DoubleEG-Run2016D-ZSkim-Prompt_v2-weightsReco-276315-276811.root -eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco/276830-277420/271036_279931-Cal_Sep2016/withExtras/DoubleEG-Run2016E-ZSkim-Prompt-v2-weightsReco-276830-277420.root -eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco/277820-278808/271036_279931-Cal_Sep2016/withExtras/DoubleEG-Run2016F-ZSkim-Prompt-v1-weightsReco-277820-278808.root -eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco/278817-279588/271036_279931-Cal_Sep2016/withExtras/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco-278817-279588.root -eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Sep2016_final_v3/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco/279589-279931/271036_279931-Cal_Sep2016/withExtras/DoubleEG-Run2016G-ZSkim-Prompt-v1-weightsReco-279589-279931.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016B-ZSkim-Prompt_v2/273150-275376/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016B-ZSkim-Prompt_v2-273150-275376.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016C-ZSkim-Prompt_v2/275420-276283/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016C-ZSkim-Prompt_v2-275420-276283.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016D-ZSkim-Prompt_v2/276315-276811/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016D-ZSkim-Prompt_v2-276315-276811.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016E-ZSkim-Prompt-v2/276830-277420/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016E-ZSkim-Prompt-v2-276830-277420.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016F-ZSkim-Prompt-v1/277820-278808/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016F-ZSkim-Prompt-v1-277820-278808.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016G-ZSkim-Prompt-v1/278817-280385/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016G-ZSkim-Prompt-v1-278817-280385.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v2/281207-284035/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016H-ZSkim-Prompt-v2-281207-284035.root +eos/cms/store/group/dpg_ecal/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/Cal_Jan2017_ref/DoubleEG-Run2016H-ZSkim-Prompt-v3/284036-284068/271036_284044-23Sep2016/newNtuples/DoubleEG-Run2016H-ZSkim-Prompt-v3-284036-284068.root diff --git a/EOverPCalibration/interface/FastCalibratorEB.h b/EOverPCalibration/interface/FastCalibratorEB.h index 5c6c179d788..c95d0a27d35 100644 --- a/EOverPCalibration/interface/FastCalibratorEB.h +++ b/EOverPCalibration/interface/FastCalibratorEB.h @@ -34,7 +34,7 @@ public : ///! List of class methods - FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, std::vector & inputEnergyScale, const std::string& typeEB, TString outEPDistribution = "NULL"); + FastCalibratorEB(TTree *tree, std::vector & inputMomentumScaleElectrons, std::vector & inputMomentumScalePositrons, const std::string& typeEB, TString outEPDistribution = "NULL"); virtual ~FastCalibratorEB(); @@ -63,8 +63,8 @@ public : // Public Variables - std::vector myMomentumScale; - std::vector myEnergyScale; + std::vector myMomentumScaleElectrons; + std::vector myMomentumScalePositrons; std::string myTypeEB; TTree *fChain; //!pointer to the analyzed TTree or TChain @@ -78,7 +78,7 @@ public : Int_t isW; Int_t isZ; - Int_t chargeEle[3]; + Short_t chargeEle[3]; Float_t etaEle[3]; Float_t PtEle[3]; Float_t phiEle[3]; diff --git a/EOverPCalibration/interface/FastCalibratorEE.h b/EOverPCalibration/interface/FastCalibratorEE.h index 14faf08f3cc..18c4a45c1d8 100644 --- a/EOverPCalibration/interface/FastCalibratorEE.h +++ b/EOverPCalibration/interface/FastCalibratorEE.h @@ -34,7 +34,7 @@ class FastCalibratorEE public : ///! Class methods - FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, std::vector & inputEnergyScale, const std::string& typeEE, TString outEPDistribution = "NULL"); + FastCalibratorEE(TTree *tree, std::vector & inputMomentumScaleElectrons, std::vector & inputMomentumScalePositrons, const std::string& typeEE, TString outEPDistribution = "NULL"); virtual ~FastCalibratorEE(); @@ -60,8 +60,8 @@ public : virtual bool CheckDeadXtal(const int & iX, const int & iY, const int & iZ); - std::vector myMomentumScale; - std::vector myEnergyScale; + std::vector myMomentumScaleElectrons; + std::vector myMomentumScalePositrons; std::string myTypeEE; TTree *fChain; //!pointer to the analyzed TTree or TChain @@ -76,7 +76,7 @@ public : Int_t isW; Int_t isZ; - Int_t chargeEle[3]; + Short_t chargeEle[3]; Float_t etaEle[3]; Float_t PtEle[3]; Float_t phiEle[3]; diff --git a/EOverPCalibration/src/DrawingUtils.cc b/EOverPCalibration/src/DrawingUtils.cc index 4ace9d88097..6377b0f62c3 100644 --- a/EOverPCalibration/src/DrawingUtils.cc +++ b/EOverPCalibration/src/DrawingUtils.cc @@ -16,7 +16,7 @@ void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileTyp h2 -> GetXaxis() -> SetNdivisions(418); h2 -> GetXaxis() -> SetTitle("i#phi"); h2 -> GetYaxis() -> SetTitle("i#eta"); - h2 -> GetZaxis() -> SetRangeUser(0.90, 1.10); + h2 -> GetZaxis() -> SetRangeUser(0.95, 1.05); } else { c = new TCanvas("c", fileName.c_str(), 0, 0, 700, 600); c -> SetGridx(); @@ -25,7 +25,7 @@ void DrawICMap(TH2F* h2, const std::string& fileName, const std::string& fileTyp h2 -> GetXaxis() -> SetNdivisions(510); h2 -> GetXaxis() -> SetTitle("ix"); h2 -> GetYaxis() -> SetTitle("iy"); - h2 -> GetZaxis() -> SetRangeUser(0.70, 1.30); + h2 -> GetZaxis() -> SetRangeUser(0.90, 1.10); } h2 -> Draw("COLZ"); diff --git a/EOverPCalibration/src/FastCalibratorEB.cc b/EOverPCalibration/src/FastCalibratorEB.cc index 872cc749bf2..754c017ec27 100644 --- a/EOverPCalibration/src/FastCalibratorEB.cc +++ b/EOverPCalibration/src/FastCalibratorEB.cc @@ -16,7 +16,7 @@ ///==== Default constructor Contructor -FastCalibratorEB::FastCalibratorEB(TTree *tree, std::vector & inputMomentumScale, std::vector & inputEnergyScale, const std::string& typeEB, TString outEPDistribution): +FastCalibratorEB::FastCalibratorEB(TTree *tree, std::vector & inputMomentumScaleElectrons, std::vector & inputMomentumScalePositrons, const std::string& typeEB, TString outEPDistribution): outEPDistribution_p(outEPDistribution) { @@ -32,8 +32,8 @@ FastCalibratorEB::FastCalibratorEB(TTree *tree, std::vector & inp Init(tree); // Set my momentum scale using the input graphs - myMomentumScale = inputMomentumScale; - myEnergyScale = inputEnergyScale; + myMomentumScaleElectrons = inputMomentumScaleElectrons; + myMomentumScalePositrons = inputMomentumScalePositrons; myTypeEB = typeEB; } @@ -269,8 +269,8 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u FdiEta = energySCEle[0] / rawEnergySCEle[0]; /// FEta approximation if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) - FdiEta /= myEnergyScale[0] -> Eval( phiEle[0] ); + // if (applyEnergyCorrection) + // FdiEta /= myEnergyScale[0] -> Eval( phiEle[0] ); float thisE = 0; int iseed = 0 ; @@ -323,8 +323,10 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if(!isMCTruth) { pIn = pAtVtxGsfEle[0]; // int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); - if (applyMomentumCorrection) - pIn /= myMomentumScale[0] -> Eval( phiEle[0] ); + if (applyMomentumCorrection) { + if (chargeEle[0]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[0] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[0] ); + } } else { pIn = energyMCEle[0]; ele1_DR = TMath::Sqrt((etaMCEle[0] - etaEle[0]) * (etaMCEle[0] - etaEle[0]) + (phiMCEle[0] - phiEle[0]) * (phiMCEle[0] - phiEle[0])) ; @@ -352,8 +354,8 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u FdiEta = energySCEle[1] / rawEnergySCEle[1]; /// FEta approximation if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) - FdiEta /= myEnergyScale[0] -> Eval( phiEle[1] ); + // if (applyEnergyCorrection) + // FdiEta /= myEnergyScale[0] -> Eval( phiEle[1] ); float thisE = 0; int iseed = 0 ; @@ -407,9 +409,10 @@ void FastCalibratorEB::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if(!isMCTruth) { pIn = pAtVtxGsfEle[1]; // int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); - if (applyMomentumCorrection) - pIn /= myMomentumScale[0] -> Eval( phiEle[0] ); - // pIn /= myMomentumScale[regionId] -> Eval( phiEle[1] ); + if (applyMomentumCorrection) { + if (chargeEle[1]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[1] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[1] ); + } } else { pIn = energyMCEle[1]; ele2_DR = TMath::Sqrt((etaMCEle[1] - etaEle[1]) * (etaMCEle[1] - etaEle[1]) + (phiMCEle[1] - phiEle[1]) * (phiMCEle[1] - phiEle[1])) ; @@ -582,8 +585,8 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in FdiEta = energySCEle[0] / rawEnergySCEle[0]; if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) - FdiEta /= myEnergyScale[0] -> Eval( phiEle[0] ); + // if (applyEnergyCorrection) + // FdiEta /= myEnergyScale[0] -> Eval( phiEle[0] ); float thisE = 0; int iseed = 0 ; @@ -636,8 +639,10 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in if(!isMCTruth) { pIn = pAtVtxGsfEle[0]; // int regionId = templIndexEB(myTypeEB,etaEle[0],chargeEle[0],thisE3x3/thisE); - if (applyMomentumCorrection) - pIn /= myMomentumScale[0] -> Eval( phiEle[0] ); + if (applyMomentumCorrection) { + if (chargeEle[0]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[0] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[0] ); + } } else { pIn = energyMCEle[0]; ele1_DR = TMath::Sqrt((etaMCEle[0] - etaEle[0]) * (etaMCEle[0] - etaEle[0]) + (phiMCEle[0] - phiEle[0]) * (phiMCEle[0] - phiEle[0])); @@ -722,8 +727,8 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in FdiEta = energySCEle[1] / rawEnergySCEle[1]; if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) - FdiEta /= myEnergyScale[0] -> Eval( phiEle[1] ); + // if (applyEnergyCorrection) + // FdiEta /= myEnergyScale[0] -> Eval( phiEle[1] ); // Electron energy float thisE = 0; @@ -779,8 +784,10 @@ void FastCalibratorEB::Loop( int nentries, int useZ, int useW, int splitStat, in if(!isMCTruth) { pIn = pAtVtxGsfEle[1]; // int regionId = templIndexEB(myTypeEB,etaEle[1],ele2_charge,thisE3x3/thisE); - if (applyMomentumCorrection) - pIn /= myMomentumScale[0] -> Eval( phiEle[1] ); + if (applyMomentumCorrection) { + if (chargeEle[1]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[1] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[1] ); + } } else { pIn = energyMCEle[1]; ele2_DR = TMath::Sqrt((etaMCEle[1] - etaEle[1]) * (etaMCEle[1] - etaEle[1]) + (phiMCEle[1] - phiEle[1]) * (phiMCEle[1] - phiEle[1])); diff --git a/EOverPCalibration/src/FastCalibratorEE.cc b/EOverPCalibration/src/FastCalibratorEE.cc index 49db92ee5d4..fcc4c98c2c5 100644 --- a/EOverPCalibration/src/FastCalibratorEE.cc +++ b/EOverPCalibration/src/FastCalibratorEE.cc @@ -7,7 +7,7 @@ /// Default constructor -FastCalibratorEE::FastCalibratorEE(TTree *tree, std::vector & inputMomentumScale, std::vector & inputEnergyScale, const std::string& typeEE, TString outEPDistribution): +FastCalibratorEE::FastCalibratorEE(TTree *tree, std::vector & inputMomentumScaleElectrons, std::vector & inputMomentumScalePositrons, const std::string& typeEE, TString outEPDistribution): outEPDistribution_p(outEPDistribution) { @@ -34,8 +34,8 @@ FastCalibratorEE::FastCalibratorEE(TTree *tree, std::vector & inp Init(tree); // Set my momentum scale using the input graphs - myMomentumScale = inputMomentumScale; - myEnergyScale = inputEnergyScale; + myMomentumScaleElectrons = inputMomentumScaleElectrons; + myMomentumScalePositrons = inputMomentumScalePositrons; myTypeEE = typeEE; } @@ -279,10 +279,10 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u FdiEta = energySCEle[0] / (rawEnergySCEle[0] + esEnergySCEle[0]); /// Cluster containment approximation using ps infos if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) { - int regionId = templIndexEE(myTypeEE, etaEle[0], chargeEle[0], 1.); - FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[0] ); - } + // if (applyEnergyCorrection) { + // int regionId = templIndexEE(myTypeEE, etaEle[0], chargeEle[0], 1.); + // FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[0] ); + //} float thisE = 0; int iseed = 0 ; @@ -338,8 +338,8 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if(!isMCTruth) { pIn = pAtVtxGsfEle[0]; if (applyMomentumCorrection) { - // int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); - pIn /= myMomentumScale[0] -> Eval( phiEle[0] ); + if (chargeEle[0]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[0] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[0] ); } } else { pIn = energyMCEle[0]; @@ -368,10 +368,10 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u FdiEta = energySCEle[1] / (rawEnergySCEle[1] + esEnergySCEle[1]); if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) { - int regionId = templIndexEE(myTypeEE, etaEle[1], chargeEle[1], 1.); - FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[1] ); - } + // if (applyEnergyCorrection) { + // int regionId = templIndexEE(myTypeEE, etaEle[1], chargeEle[1], 1.); + // FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[1] ); + //} float thisE = 0; int iseed = 0 ; @@ -424,8 +424,8 @@ void FastCalibratorEE::BuildEoPeta_ele(int iLoop, int nentries , int useW, int u if(!isMCTruth) { pIn = pAtVtxGsfEle[1]; if (applyMomentumCorrection) { - // int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); - pIn /= myMomentumScale[0] -> Eval( phiEle[1] ); + if (chargeEle[1]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[1] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[1] ); } } else { pIn = energyMCEle[1]; @@ -596,10 +596,10 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in FdiEta = energySCEle[0] / (rawEnergySCEle[0] + esEnergySCEle[0]); if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) { - int regionId = templIndexEE(myTypeEE, etaEle[0], chargeEle[0], 1.); - FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[0] ); - } + // if (applyEnergyCorrection) { + // int regionId = templIndexEE(myTypeEE, etaEle[0], chargeEle[0], 1.); + // FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[0] ); + //} float thisE = 0; float thisE3x3 = 0 ; @@ -659,8 +659,8 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in if(!isMCTruth) { pIn = pAtVtxGsfEle[0]; if (applyMomentumCorrection) { - // int regionId = templIndexEE(myTypeEE,etaEle[0],chargeEle[0],thisE3x3/thisE); - pIn /= myMomentumScale[0] -> Eval( phiEle[0] ); + if (chargeEle[0]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[0] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[0] ); } } else { pIn = energyMCEle[0]; @@ -795,10 +795,10 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in FdiEta = energySCEle[1] / (rawEnergySCEle[1] + esEnergySCEle[1]); if (useRawEnergy == 1) FdiEta = 1.; - if (applyEnergyCorrection) { - int regionId = templIndexEE(myTypeEE, etaEle[1], chargeEle[1], 1.); - FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[1] ); - } + // if (applyEnergyCorrection) { + // int regionId = templIndexEE(myTypeEE, etaEle[1], chargeEle[1], 1.); + // FdiEta /= myEnergyScale[regionId] -> Eval( phiEle[1] ); + //} float thisE = 0; float thisE3x3 = 0 ; @@ -854,8 +854,8 @@ void FastCalibratorEE::Loop( int nentries, int useZ, int useW, int splitStat, in if(!isMCTruth) { pIn = pAtVtxGsfEle[1]; if (applyMomentumCorrection) { - // int regionId = templIndexEE(myTypeEE,etaEle[1],chargeEle[1],thisE3x3/thisE); - pIn /= myMomentumScale[0] -> Eval( phiEle[1] ); + if (chargeEle[1]<0) pIn /= myMomentumScaleElectrons[0] -> Eval( phiEle[1] ); + else pIn /= myMomentumScalePositrons[0] -> Eval( phiEle[1] ); } } else { pIn = energyMCEle[1]; diff --git a/ZFitter/bin/ZFitter.cpp b/ZFitter/bin/ZFitter.cpp index bd8c0a23b1f..adb03f4560b 100644 --- a/ZFitter/bin/ZFitter.cpp +++ b/ZFitter/bin/ZFitter.cpp @@ -289,8 +289,8 @@ int main(int argc, char **argv) float EPMin; int smoothCut; int miscalibMethod; - std::string inputMomentumScale; - std::string inputEnergyScale; + std::string inputMomentumScaleElectrons; + std::string inputMomentumScalePositrons; std::string typeEB; std::string typeEE; std::string outputFile; @@ -462,9 +462,9 @@ int main(int argc, char **argv) ("isR9selection", po::value(&isR9selection)->default_value(false), "apply R9 selection") ("R9Min", po::value(&R9Min)->default_value(-1.), "R9 treshold") ("applyPcorr", po::value(&applyPcorr)->default_value(true), "apply momentum correction") - ("inputMomentumScale", po::value(&inputMomentumScale)->default_value("/afs/cern.ch/user/l/lbrianza/work/public/EoP_additionalFiles/MomentumCalibration2015_eta1_eta1.root"), "input momentum scale") + ("inputMomentumScaleElectrons", po::value(&inputMomentumScaleElectrons)->default_value("/afs/cern.ch/user/l/lbrianza/work/public/EoP_additionalFiles/MomentumCalibration2015_eta1_eta1.root"), "input momentum scale for electrons") ("applyEcorr", po::value(&applyEcorr)->default_value(false), "apply energy correction") - ("inputEnergyScale", po::value(&inputEnergyScale)->default_value("/afs/cern.ch/user/l/lbrianza/work/public/EoP_additionalFiles/momentumCalibration2015_EB_scE.root"), "input energy scale") + ("inputMomentumScalePositrons", po::value(&inputMomentumScalePositrons)->default_value("/afs/cern.ch/user/l/lbrianza/work/public/EoP_additionalFiles/momentumCalibration2015_EB_scE.root"), "input momentum scale for positrons") ("typeEB", po::value(&typeEB)->default_value("eta1"), "") ("typeEE", po::value(&typeEE)->default_value("eta1"), "") ("outputFile", po::value(&outputFile)->default_value("FastCalibrator_Oct2015_runD"), "output file for E/P calibration") @@ -1156,29 +1156,32 @@ int main(int argc, char **argv) std::cout << "---- START E/P CALIBRATION: ENDCAP ----" << std::endl; } - int nRegions = (isEB) ? GetNRegionsEB(typeEB) : GetNRegionsEE(typeEE); + // int nRegions = (isEB) ? GetNRegionsEB(typeEB) : GetNRegionsEE(typeEE); system(("mkdir -p " + outDirFitResData).c_str()); - /// open calibration momentum graph - TFile* momentumscale = new TFile((inputMomentumScale.c_str()));//+"_"+typeEB+"_"+typeEE+".root").c_str()); + /// open calibration momentum graph (electrons) + TFile* momentumscaleElectrons = new TFile((inputMomentumScaleElectrons.c_str()));//+"_"+typeEB+"_"+typeEE+".root").c_str()); std::vector g_EoC; TString Name = (isEB) ? "g_EoC_EB_0" : "g_EoC_EE_0"; - g_EoC.push_back( (TGraphErrors*)(momentumscale->Get(Name)) ); + g_EoC.push_back( (TGraphErrors*)(momentumscaleElectrons->Get(Name)) ); - std::cout << "momentum calibration file correctly opened" << std::endl; + std::cout << "momentum calibration file for electrons correctly opened" << std::endl; - /// open calibration energy graph - TFile* energyscale = new TFile((inputEnergyScale.c_str())); + /// open calibration momentum graph (positrons) + TFile* momentumscalePositrons = new TFile((inputMomentumScalePositrons.c_str())); std::vector g_EoE; + g_EoE.push_back( (TGraphErrors*)(momentumscalePositrons->Get(Name)) ); + + std::cout << "momentum calibration file for positrons correctly opened" << std::endl; + + /* for(int i = 0; i < nRegions; ++i) { TString Name = "g_pData_" + partition + Form("_0_%d", i); - g_EoE.push_back( (TGraphErrors*)(energyscale->Get(Name)) ); - } - - std::cout << "energy calibration file correctly opened" << std::endl; + g_EoE.push_back( (TGraphErrors*)(momentumscalePositrons->Get(Name)) ); + } */ ///Use the whole sample statistics if numberOfEvents < 0 if ( numberOfEvents < 0 ) numberOfEvents = data->GetEntries(); diff --git a/ZFitter/script/submit_calibration_jobs_multifit.py b/ZFitter/script/submit_calibration_jobs_multifit.py index 9b104ccace9..0259bc34a08 100644 --- a/ZFitter/script/submit_calibration_jobs_multifit.py +++ b/ZFitter/script/submit_calibration_jobs_multifit.py @@ -21,7 +21,7 @@ applyPcorr = ["True"]; #decide if you want to apply momentum correction or not applyEcorr = ["False"]; #decide if you want to apply energy correction or not split = ["0","1"]; #0=full statistics, 1=even/odd -cut = ["0.15","0.20","0.30","100."];#size of the E/p cut window (default is 0.15) +cut = ["0.15","0.20","100."];#size of the E/p cut window (default is 0.15) #cut = ["0.15"] smoothCut = ["1"]; #0=use step-function to reweight, 1=use the E/p distribution energyType = ["0"]; #0=regression, 1=raw energy @@ -79,9 +79,9 @@ #cmscaf1nd #os.system("mkdir Job_"+ntupleName+""+nLoops+"loop__pCorr2016") -os.system("mkdir Job_"+ntupleName+""+nLoops+"_pCorr2016") -os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"_pCorr2016") -os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"_pCorr2016") +os.system("mkdir Job_"+ntupleName+""+nLoops+"_separateElePosCorr") +os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"_separateElePosCorr") +os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"_separateElePosCorr") ##RUN CALIBRATION ON BARREL for b in range(len(split)): @@ -90,9 +90,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_separateElePosCorr/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScaleElectrons ELECTRONS_MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputMomentumScalePositrons POSITRONS_MomentumCalibration2016_eta1_eta1.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -112,14 +112,15 @@ outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EB_pTk.root ./") outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EB_scE.root ./") outScript.write("\ncmsStage "+folder_dat+"EoverPcalibration_batch_"+ntupleName+".dat ./") - outScript.write("\ncmsStage "+folder_dat+"MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"ELECTRONS_MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"POSITRONS_MomentumCalibration2016_eta1_eta1.root ./") outScript.write("\necho \"end copy\" "); outScript.write("\nls") outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -135,9 +136,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_separateElePosCorr/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScaleElectrons ELECTRONS_MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputMomentumScalePositrons POSITRONS_MomentumCalibration2016_eta1_eta1.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -157,13 +158,14 @@ outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EE_pTk.root ./") outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EE_scE.root ./") outScript.write("\ncmsStage "+folder_dat+"EoverPcalibration_batch_"+ntupleName+".dat ./") - outScript.write("\ncmsStage "+folder_dat+"MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"ELECTRONS_MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"POSITRONS_MomentumCalibration2016_eta1_eta1.root ./") outScript.write("\necho \"end copy\" "); outScript.write("\nls") outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -174,7 +176,7 @@ ##CREATE CFG FILES TO PRODUCE CALIBRATION PLOTS LATER -createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"_pCorr2016.sh" +createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"_separateElePosCorr.sh" out2 = open(createAndPlotIC,"w") #for b in range(len(split)): @@ -184,8 +186,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EB"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_separateElePosCorr/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEBparameters\")") @@ -215,8 +217,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EE"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_separateElePosCorr/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEEparameters\")") @@ -238,7 +240,7 @@ ##CREATE FOLDER CONTAINING THE FINAL SET OF IC (EB+EE) -newFolder = "ICset_"+ntupleName+"_"+nLoops+"_pCorr2016" +newFolder = "ICset_"+ntupleName+"_"+nLoops+"_separateElePosCorr" for c in range(len(cut)): for d in range(len(smoothCut)): @@ -246,6 +248,6 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "IC_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + folder = "output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" out2.write("\ncat "+folder+"IC_EB*txt "+folder+"IC_EE*txt > "+newFolder+"/"+name+".txt") diff --git a/ZFitter/script/submit_calibration_jobs_weights.py b/ZFitter/script/submit_calibration_jobs_weights.py index 599004850d3..5e2dcd0950a 100644 --- a/ZFitter/script/submit_calibration_jobs_weights.py +++ b/ZFitter/script/submit_calibration_jobs_weights.py @@ -1,4 +1,4 @@ -1#! /usr/bin/env python +#! /usr/bin/env python import os import glob import math @@ -21,8 +21,8 @@ applyPcorr = ["True"]; #decide if you want to apply momentum correction or not applyEcorr = ["False"]; #decide if you want to apply energy correction or not split = ["0","1"]; #0=full statistics, 1=even/odd -cut = ["0.15","0.20","0.30","100."];#size of the E/p cut window (default is 0.15) -#cut = ["0.10"] +cut = ["0.15","0.20","100."];#size of the E/p cut window (default is 0.15) +#cut = ["0.15"] smoothCut = ["1"]; #0=use step-function to reweight, 1=use the E/p distribution energyType = ["0"]; #0=regression, 1=raw energy nLoops = "15"; #number of iterations @@ -79,10 +79,9 @@ #cmscaf1nd #os.system("mkdir Job_"+ntupleName+""+nLoops+"loop__pCorr2016") -os.system("mkdir Job_"+ntupleName+""+nLoops+"_pCorr2016") -os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"_pCorr2016") -os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"_pCorr2016") - +os.system("mkdir Job_"+ntupleName+""+nLoops+"_separateElePosCorr") +os.system("mkdir cfg_"+ntupleName+"_"+nLoops+"_separateElePosCorr") +os.system("mkdir ICset_"+ntupleName+"_"+nLoops+"_separateElePosCorr") ##RUN CALIBRATION ON BARREL for b in range(len(split)): @@ -91,9 +90,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_separateElePosCorr/Job_"+"EB"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EB_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --do"+"EB"+" --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScaleElectrons ELECTRONS_MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputMomentumScalePositrons POSITRONS_MomentumCalibration2016_eta1_eta1.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -113,14 +112,15 @@ outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EB_pTk.root ./") outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EB_scE.root ./") outScript.write("\ncmsStage "+folder_dat+"EoverPcalibration_batch_"+ntupleName+".dat ./") - outScript.write("\ncmsStage "+folder_dat+"MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"ELECTRONS_MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"POSITRONS_MomentumCalibration2016_eta1_eta1.root ./") outScript.write("\necho \"end copy\" "); outScript.write("\nls") outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -136,9 +136,9 @@ for e in range(len(applyPcorr)): for f in range(len(applyEcorr)): for g in range(len(energyType)): - fn = "Job_"+ntupleName+""+nLoops+"_pCorr2016/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; + fn = "Job_"+ntupleName+""+nLoops+"_separateElePosCorr/Job_"+"EE"+"_"+split[b]+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]; outScript = open(fn+".sh","w"); - command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScale MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputEnergyScale momentumCalibration2015_EE_scE.root" + command = "ZFitter.exe -f EoverPcalibration_batch_"+ntupleName+".dat --EOverPCalib --outDirFitResData output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ --splitStat "+split[b]+" --nLoops "+nLoops+" --EPMin "+cut[c]+" --noPU --smoothCut "+smoothCut[d]+" --applyPcorr "+applyPcorr[e]+" --inputMomentumScaleElectrons ELECTRONS_MomentumCalibration2016_eta1_eta1.root --applyEcorr "+applyEcorr[f]+" useRawEnergy "+energyType[g]+" --inputMomentumScalePositrons POSITRONS_MomentumCalibration2016_eta1_eta1.root" print command; outScript.write('#!/bin/bash'); outScript.write("\n"+'cd '+CMSSWDir); @@ -158,13 +158,14 @@ outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EE_pTk.root ./") outScript.write("\ncmsStage "+folder_dat+"momentumCalibration2015_EE_scE.root ./") outScript.write("\ncmsStage "+folder_dat+"EoverPcalibration_batch_"+ntupleName+".dat ./") - outScript.write("\ncmsStage "+folder_dat+"MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"ELECTRONS_MomentumCalibration2016_eta1_eta1.root ./") + outScript.write("\ncmsStage "+folder_dat+"POSITRONS_MomentumCalibration2016_eta1_eta1.root ./") outScript.write("\necho \"end copy\" "); outScript.write("\nls") outScript.write("\necho \"eseguo: "+command+"\" ") outScript.write("\n"+command); outScript.write("\nls") - outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) + outScript.write("\ncp -v -r output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/ "+currentDir) outScript.close(); os.system("chmod 777 "+currentDir+"/"+fn+".sh"); command2 = "bsub -q cmscaf1nw -cwd "+currentDir+" "+currentDir+"/"+fn+".sh"; @@ -175,7 +176,7 @@ ##CREATE CFG FILES TO PRODUCE CALIBRATION PLOTS LATER -createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"_pCorr2016.sh" +createAndPlotIC = "createAndPlotIC_"+ntupleName+"_"+nLoops+"_separateElePosCorr.sh" out2 = open(createAndPlotIC,"w") #for b in range(len(split)): @@ -185,8 +186,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EB"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_separateElePosCorr/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEBparameters\")") @@ -216,8 +217,8 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "EE"+"_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - fn = "cfg_"+ntupleName+"_"+nLoops+"_pCorr2016/calibrationPlots_"+name+".py"; - folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + fn = "cfg_"+ntupleName+"_"+nLoops+"_separateElePosCorr/calibrationPlots_"+name+".py"; + folder = "output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" outScript = open(fn,"w"); outScript.write("import FWCore.ParameterSet.Config as cms"); outScript.write("\nprocess = cms.Process(\"calibrationPlotsEEparameters\")") @@ -239,7 +240,7 @@ ##CREATE FOLDER CONTAINING THE FINAL SET OF IC (EB+EE) -newFolder = "ICset_"+ntupleName+"_"+nLoops+"_pCorr2016" +newFolder = "ICset_"+ntupleName+"_"+nLoops+"_separateElePosCorr" for c in range(len(cut)): for d in range(len(smoothCut)): @@ -247,6 +248,6 @@ for f in range(len(applyEcorr)): for g in range(len(energyType)): name = "IC_"+cut[c]+"_smoothCut"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g] - folder = "output_"+ntupleName+"_"+nLoops+"_pCorr2016_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" + folder = "output_"+ntupleName+"_"+nLoops+"_separateElePosCorr_"+cut[c]+"_smooth"+smoothCut[d]+"_pCorr_"+applyPcorr[e]+"_ECorr_"+applyEcorr[f]+"_useRaw"+energyType[g]+"/" out2.write("\ncat "+folder+"IC_EB*txt "+folder+"IC_EE*txt > "+newFolder+"/"+name+".txt") From 59145fb9b667813710a80cd3c3660137883e8538 Mon Sep 17 00:00:00 2001 From: mrappo Date: Mon, 20 Mar 2017 15:39:37 +0100 Subject: [PATCH 474/475] fix bug in TEndcapRings --- EOverPCalibration/src/TEndcapRings.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EOverPCalibration/src/TEndcapRings.cc b/EOverPCalibration/src/TEndcapRings.cc index 94e2d09c666..fa0c0a00879 100644 --- a/EOverPCalibration/src/TEndcapRings.cc +++ b/EOverPCalibration/src/TEndcapRings.cc @@ -14,7 +14,7 @@ TEndcapRings::TEndcapRings() iEndcapRing[ix][iy][iz] = -1; FILE *fRing; - fRing = fopen("/afs/cern.ch/user/l/lbrianza/work/PHD/DEF_ECALELF/CHE_SUCCEDE_IN_ECALELF/CALIBRAZIONI/CMSSW_7_4_12/src/Calibration/EOverPCalibration/CommonTools/eerings.dat", "r"); + fRing = fopen("/afs/cern.ch/user/l/lbrianza/work/public/EoP_additionalFiles/eerings.dat", "r"); std::cout << "Inizializing endcap geometry from: eerings.dat" << std::endl; int ix, iy, iz, ir; while(fscanf(fRing, "(%d,%d,%d) %d \n", &ix, &iy, &iz, &ir) != EOF ) { From 05fbf857ccc1f1196c1446eae86f2e6317d87445 Mon Sep 17 00:00:00 2001 From: mrappo Date: Fri, 24 Mar 2017 16:07:25 +0100 Subject: [PATCH 475/475] fix type of chargeEle --- EOverPCalibration/bin/CalibrationMomentum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EOverPCalibration/bin/CalibrationMomentum.cpp b/EOverPCalibration/bin/CalibrationMomentum.cpp index 3ae2029cc2b..3a39dd6fc6f 100644 --- a/EOverPCalibration/bin/CalibrationMomentum.cpp +++ b/EOverPCalibration/bin/CalibrationMomentum.cpp @@ -189,7 +189,7 @@ int main(int argc, char** argv) float etaSCEle[3], phiSCEle[3]; float etaEle[3], phiEle[3]; float energySCEle[3], rawEnergySCEle[3], R9Ele[3]; - int chargeEle[3]; + Short_t chargeEle[3]; float pAtVtxGsfEle[3]; float xSeedSC[3], ySeedSC[3]; int NPU[1];